@memberjunction/ng-core-entity-forms 6.2.0-edge.0 → 6.2.0-edge.2

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 (398) hide show
  1. package/dist/lib/custom/AIAgentCategories/ai-agent-category-overview.panel.d.ts +1 -1
  2. package/dist/lib/custom/AIAgentCategories/ai-agent-category-overview.panel.js +2 -2
  3. package/dist/lib/custom/AIAgentCategories/ai-agent-category-overview.panel.js.map +1 -1
  4. package/dist/lib/custom/AIAgentSessions/ai-agent-session-form.component.js.map +1 -1
  5. package/dist/lib/custom/AIAgents/add-action-dialog.component.d.ts +90 -16
  6. package/dist/lib/custom/AIAgents/add-action-dialog.component.d.ts.map +1 -1
  7. package/dist/lib/custom/AIAgents/add-action-dialog.component.js +218 -70
  8. package/dist/lib/custom/AIAgents/add-action-dialog.component.js.map +1 -1
  9. package/dist/lib/custom/AIAgents/agent-form-tabs.d.ts +1 -0
  10. package/dist/lib/custom/AIAgents/agent-form-tabs.d.ts.map +1 -1
  11. package/dist/lib/custom/AIAgents/agent-form-tabs.js +2 -0
  12. package/dist/lib/custom/AIAgents/agent-form-tabs.js.map +1 -1
  13. package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.d.ts +80 -16
  14. package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.d.ts.map +1 -1
  15. package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.js +146 -46
  16. package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.js.map +1 -1
  17. package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts +329 -27
  18. package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts.map +1 -1
  19. package/dist/lib/custom/AIAgents/ai-agent-form.component.js +1322 -783
  20. package/dist/lib/custom/AIAgents/ai-agent-form.component.js.map +1 -1
  21. package/dist/lib/custom/AIAgents/ai-agent-management.service.d.ts +76 -0
  22. package/dist/lib/custom/AIAgents/ai-agent-management.service.d.ts.map +1 -1
  23. package/dist/lib/custom/AIAgents/ai-agent-management.service.js +77 -33
  24. package/dist/lib/custom/AIAgents/ai-agent-management.service.js.map +1 -1
  25. package/dist/lib/custom/AIAgents/create-prompt-dialog.component.d.ts +69 -15
  26. package/dist/lib/custom/AIAgents/create-prompt-dialog.component.d.ts.map +1 -1
  27. package/dist/lib/custom/AIAgents/create-prompt-dialog.component.js +182 -74
  28. package/dist/lib/custom/AIAgents/create-prompt-dialog.component.js.map +1 -1
  29. package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.d.ts +105 -25
  30. package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.d.ts.map +1 -1
  31. package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.js +272 -112
  32. package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.js.map +1 -1
  33. package/dist/lib/custom/AIAgents/new-agent-dialog.component.d.ts +32 -6
  34. package/dist/lib/custom/AIAgents/new-agent-dialog.component.d.ts.map +1 -1
  35. package/dist/lib/custom/AIAgents/new-agent-dialog.component.js +71 -19
  36. package/dist/lib/custom/AIAgents/new-agent-dialog.component.js.map +1 -1
  37. package/dist/lib/custom/AIAgents/new-agent-dialog.service.d.ts +10 -0
  38. package/dist/lib/custom/AIAgents/new-agent-dialog.service.d.ts.map +1 -1
  39. package/dist/lib/custom/AIAgents/new-agent-dialog.service.js +27 -7
  40. package/dist/lib/custom/AIAgents/new-agent-dialog.service.js.map +1 -1
  41. package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.d.ts +65 -15
  42. package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.d.ts.map +1 -1
  43. package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.js +152 -52
  44. package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.js.map +1 -1
  45. package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.d.ts +81 -15
  46. package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.d.ts.map +1 -1
  47. package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.js +145 -45
  48. package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.js.map +1 -1
  49. package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.d.ts +71 -17
  50. package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.d.ts.map +1 -1
  51. package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.js +175 -67
  52. package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.js.map +1 -1
  53. package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.d.ts +173 -27
  54. package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.d.ts.map +1 -1
  55. package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js +385 -93
  56. package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js.map +1 -1
  57. package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.d.ts +64 -4
  58. package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.d.ts.map +1 -1
  59. package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.js +129 -29
  60. package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.js.map +1 -1
  61. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts +260 -27
  62. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts.map +1 -1
  63. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js +694 -252
  64. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js.map +1 -1
  65. package/dist/lib/custom/AIPrompts/ai-prompt-management.service.d.ts +10 -0
  66. package/dist/lib/custom/AIPrompts/ai-prompt-management.service.d.ts.map +1 -1
  67. package/dist/lib/custom/AIPrompts/ai-prompt-management.service.js +17 -9
  68. package/dist/lib/custom/AIPrompts/ai-prompt-management.service.js.map +1 -1
  69. package/dist/lib/custom/AIPrompts/pending-records.d.ts +11 -0
  70. package/dist/lib/custom/AIPrompts/pending-records.d.ts.map +1 -0
  71. package/dist/lib/custom/AIPrompts/pending-records.js +21 -0
  72. package/dist/lib/custom/AIPrompts/pending-records.js.map +1 -0
  73. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.d.ts +74 -16
  74. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.d.ts.map +1 -1
  75. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.js +174 -58
  76. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.js.map +1 -1
  77. package/dist/lib/custom/Actions/action-execution-log-form.component.d.ts +108 -14
  78. package/dist/lib/custom/Actions/action-execution-log-form.component.d.ts.map +1 -1
  79. package/dist/lib/custom/Actions/action-execution-log-form.component.js +258 -70
  80. package/dist/lib/custom/Actions/action-execution-log-form.component.js.map +1 -1
  81. package/dist/lib/custom/Actions/action-form.component.d.ts +198 -14
  82. package/dist/lib/custom/Actions/action-form.component.d.ts.map +1 -1
  83. package/dist/lib/custom/Actions/action-form.component.js +387 -107
  84. package/dist/lib/custom/Actions/action-form.component.js.map +1 -1
  85. package/dist/lib/custom/BridgeProviders/bridge-provider-features.d.ts +12 -6
  86. package/dist/lib/custom/BridgeProviders/bridge-provider-features.d.ts.map +1 -1
  87. package/dist/lib/custom/BridgeProviders/bridge-provider-features.js +41 -29
  88. package/dist/lib/custom/BridgeProviders/bridge-provider-features.js.map +1 -1
  89. package/dist/lib/custom/BridgeProviders/bridge-provider-form.component.js +14 -14
  90. package/dist/lib/custom/BridgeProviders/bridge-provider-form.component.js.map +1 -1
  91. package/dist/lib/custom/Companies/company-overview.panel.d.ts +1 -1
  92. package/dist/lib/custom/Companies/company-overview.panel.js +2 -2
  93. package/dist/lib/custom/Companies/company-overview.panel.js.map +1 -1
  94. package/dist/lib/custom/Conversations/conversation-overview.panel.d.ts +1 -1
  95. package/dist/lib/custom/Conversations/conversation-overview.panel.js +2 -2
  96. package/dist/lib/custom/Conversations/conversation-overview.panel.js.map +1 -1
  97. package/dist/lib/custom/Employees/employee-overview.panel.d.ts +1 -1
  98. package/dist/lib/custom/Employees/employee-overview.panel.js +2 -2
  99. package/dist/lib/custom/Employees/employee-overview.panel.js.map +1 -1
  100. package/dist/lib/custom/Entities/entity-form.component.d.ts +217 -29
  101. package/dist/lib/custom/Entities/entity-form.component.d.ts.map +1 -1
  102. package/dist/lib/custom/Entities/entity-form.component.js +734 -285
  103. package/dist/lib/custom/Entities/entity-form.component.js.map +1 -1
  104. package/dist/lib/custom/EntityActions/entityaction.form.component.d.ts +5 -1
  105. package/dist/lib/custom/EntityActions/entityaction.form.component.d.ts.map +1 -1
  106. package/dist/lib/custom/EntityActions/entityaction.form.component.js +10 -2
  107. package/dist/lib/custom/EntityActions/entityaction.form.component.js.map +1 -1
  108. package/dist/lib/custom/Files/file-form.component.d.ts +1 -1
  109. package/dist/lib/custom/Files/file-form.component.js +2 -2
  110. package/dist/lib/custom/Files/file-form.component.js.map +1 -1
  111. package/dist/lib/custom/Lists/list-form.component.d.ts +300 -36
  112. package/dist/lib/custom/Lists/list-form.component.d.ts.map +1 -1
  113. package/dist/lib/custom/Lists/list-form.component.js +664 -208
  114. package/dist/lib/custom/Lists/list-form.component.js.map +1 -1
  115. package/dist/lib/custom/MLModels/ml-model-view-models.d.ts +31 -0
  116. package/dist/lib/custom/MLModels/ml-model-view-models.d.ts.map +1 -1
  117. package/dist/lib/custom/MLModels/ml-model-view-models.js +52 -16
  118. package/dist/lib/custom/MLModels/ml-model-view-models.js.map +1 -1
  119. package/dist/lib/custom/MLModels/ps-model-detail.component.d.ts +107 -10
  120. package/dist/lib/custom/MLModels/ps-model-detail.component.d.ts.map +1 -1
  121. package/dist/lib/custom/MLModels/ps-model-detail.component.js +291 -101
  122. package/dist/lib/custom/MLModels/ps-model-detail.component.js.map +1 -1
  123. package/dist/lib/custom/Queries/query-form.component.d.ts +201 -26
  124. package/dist/lib/custom/Queries/query-form.component.d.ts.map +1 -1
  125. package/dist/lib/custom/Queries/query-form.component.js +429 -109
  126. package/dist/lib/custom/Queries/query-form.component.js.map +1 -1
  127. package/dist/lib/custom/Queries/query-run-dialog.component.d.ts +107 -14
  128. package/dist/lib/custom/Queries/query-run-dialog.component.d.ts.map +1 -1
  129. package/dist/lib/custom/Queries/query-run-dialog.component.js +249 -79
  130. package/dist/lib/custom/Queries/query-run-dialog.component.js.map +1 -1
  131. package/dist/lib/custom/RecordProcesses/record-process-form.component.d.ts +129 -4
  132. package/dist/lib/custom/RecordProcesses/record-process-form.component.d.ts.map +1 -1
  133. package/dist/lib/custom/RecordProcesses/record-process-form.component.js +904 -90
  134. package/dist/lib/custom/RecordProcesses/record-process-form.component.js.map +1 -1
  135. package/dist/lib/custom/Rubrics/evaluation-form.component.d.ts +37 -0
  136. package/dist/lib/custom/Rubrics/evaluation-form.component.d.ts.map +1 -0
  137. package/dist/lib/custom/Rubrics/evaluation-form.component.js +399 -0
  138. package/dist/lib/custom/Rubrics/evaluation-form.component.js.map +1 -0
  139. package/dist/lib/custom/Rubrics/record-forms.component.d.ts +69 -0
  140. package/dist/lib/custom/Rubrics/record-forms.component.d.ts.map +1 -0
  141. package/dist/lib/custom/Rubrics/record-forms.component.js +587 -0
  142. package/dist/lib/custom/Rubrics/record-forms.component.js.map +1 -0
  143. package/dist/lib/custom/Rubrics/rubric-form.component.d.ts +67 -0
  144. package/dist/lib/custom/Rubrics/rubric-form.component.d.ts.map +1 -0
  145. package/dist/lib/custom/Rubrics/rubric-form.component.js +534 -0
  146. package/dist/lib/custom/Rubrics/rubric-form.component.js.map +1 -0
  147. package/dist/lib/custom/Rubrics/rubric-form.panels.d.ts +25 -0
  148. package/dist/lib/custom/Rubrics/rubric-form.panels.d.ts.map +1 -0
  149. package/dist/lib/custom/Rubrics/rubric-form.panels.js +299 -0
  150. package/dist/lib/custom/Rubrics/rubric-form.panels.js.map +1 -0
  151. package/dist/lib/custom/Rubrics/scale-form.component.d.ts +31 -0
  152. package/dist/lib/custom/Rubrics/scale-form.component.d.ts.map +1 -0
  153. package/dist/lib/custom/Rubrics/scale-form.component.js +395 -0
  154. package/dist/lib/custom/Rubrics/scale-form.component.js.map +1 -0
  155. package/dist/lib/custom/SearchScopes/searchscope-form.component.d.ts +1 -1
  156. package/dist/lib/custom/SearchScopes/searchscope-form.component.js +4 -4
  157. package/dist/lib/custom/SearchScopes/searchscope-form.component.js.map +1 -1
  158. package/dist/lib/custom/SessionBridges/session-bridge-form.component.js.map +1 -1
  159. package/dist/lib/custom/Templates/template-param-dialog.component.d.ts +77 -13
  160. package/dist/lib/custom/Templates/template-param-dialog.component.d.ts.map +1 -1
  161. package/dist/lib/custom/Templates/template-param-dialog.component.js +196 -78
  162. package/dist/lib/custom/Templates/template-param-dialog.component.js.map +1 -1
  163. package/dist/lib/custom/Templates/template-params-grid.component.d.ts +49 -7
  164. package/dist/lib/custom/Templates/template-params-grid.component.d.ts.map +1 -1
  165. package/dist/lib/custom/Templates/template-params-grid.component.js +132 -44
  166. package/dist/lib/custom/Templates/template-params-grid.component.js.map +1 -1
  167. package/dist/lib/custom/Templates/templates-form.component.d.ts +153 -19
  168. package/dist/lib/custom/Templates/templates-form.component.d.ts.map +1 -1
  169. package/dist/lib/custom/Templates/templates-form.component.js +434 -217
  170. package/dist/lib/custom/Templates/templates-form.component.js.map +1 -1
  171. package/dist/lib/custom/Tests/entity-link-pill.component.d.ts +24 -4
  172. package/dist/lib/custom/Tests/entity-link-pill.component.d.ts.map +1 -1
  173. package/dist/lib/custom/Tests/entity-link-pill.component.js +64 -20
  174. package/dist/lib/custom/Tests/entity-link-pill.component.js.map +1 -1
  175. package/dist/lib/custom/Tests/test-form.component.d.ts +223 -27
  176. package/dist/lib/custom/Tests/test-form.component.d.ts.map +1 -1
  177. package/dist/lib/custom/Tests/test-form.component.js +951 -530
  178. package/dist/lib/custom/Tests/test-form.component.js.map +1 -1
  179. package/dist/lib/custom/Tests/test-run-checks.d.ts +2 -0
  180. package/dist/lib/custom/Tests/test-run-checks.d.ts.map +1 -1
  181. package/dist/lib/custom/Tests/test-run-checks.js +5 -1
  182. package/dist/lib/custom/Tests/test-run-checks.js.map +1 -1
  183. package/dist/lib/custom/Tests/test-run-feedback-form.component.d.ts +2 -0
  184. package/dist/lib/custom/Tests/test-run-feedback-form.component.d.ts.map +1 -1
  185. package/dist/lib/custom/Tests/test-run-feedback-form.component.js +5 -1
  186. package/dist/lib/custom/Tests/test-run-feedback-form.component.js.map +1 -1
  187. package/dist/lib/custom/Tests/test-run-form.component.d.ts +146 -18
  188. package/dist/lib/custom/Tests/test-run-form.component.d.ts.map +1 -1
  189. package/dist/lib/custom/Tests/test-run-form.component.js +362 -106
  190. package/dist/lib/custom/Tests/test-run-form.component.js.map +1 -1
  191. package/dist/lib/custom/Tests/test-suite-form.component.d.ts +395 -47
  192. package/dist/lib/custom/Tests/test-suite-form.component.d.ts.map +1 -1
  193. package/dist/lib/custom/Tests/test-suite-form.component.js +1719 -1007
  194. package/dist/lib/custom/Tests/test-suite-form.component.js.map +1 -1
  195. package/dist/lib/custom/Tests/test-suite-run-form.component.d.ts +214 -26
  196. package/dist/lib/custom/Tests/test-suite-run-form.component.d.ts.map +1 -1
  197. package/dist/lib/custom/Tests/test-suite-run-form.component.js +535 -159
  198. package/dist/lib/custom/Tests/test-suite-run-form.component.js.map +1 -1
  199. package/dist/lib/custom/Users/user-overview.panel.d.ts +1 -1
  200. package/dist/lib/custom/Users/user-overview.panel.js +3 -3
  201. package/dist/lib/custom/Users/user-overview.panel.js.map +1 -1
  202. package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts +208 -29
  203. package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts.map +1 -1
  204. package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js +446 -138
  205. package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js.map +1 -1
  206. package/dist/lib/custom/ai-agent-run/ai-agent-run-cost.service.d.ts +6 -0
  207. package/dist/lib/custom/ai-agent-run/ai-agent-run-cost.service.d.ts.map +1 -1
  208. package/dist/lib/custom/ai-agent-run/ai-agent-run-cost.service.js +16 -4
  209. package/dist/lib/custom/ai-agent-run/ai-agent-run-cost.service.js.map +1 -1
  210. package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.d.ts +50 -6
  211. package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.d.ts.map +1 -1
  212. package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.js +84 -12
  213. package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.js.map +1 -1
  214. package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.d.ts +89 -5
  215. package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.d.ts.map +1 -1
  216. package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.js +216 -70
  217. package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.js.map +1 -1
  218. package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.d.ts +62 -3
  219. package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.d.ts.map +1 -1
  220. package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.js +140 -42
  221. package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.js.map +1 -1
  222. package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.d.ts +81 -10
  223. package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.d.ts.map +1 -1
  224. package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.js +165 -37
  225. package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.js.map +1 -1
  226. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.d.ts +140 -15
  227. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.d.ts.map +1 -1
  228. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js +326 -100
  229. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js.map +1 -1
  230. package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.d.ts +101 -15
  231. package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.d.ts.map +1 -1
  232. package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.js +281 -97
  233. package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.js.map +1 -1
  234. package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.d.ts +43 -25
  235. package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.d.ts.map +1 -1
  236. package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.js +100 -64
  237. package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.js.map +1 -1
  238. package/dist/lib/custom/ai-agent-run/flow/constellation.component.d.ts +14 -2
  239. package/dist/lib/custom/ai-agent-run/flow/constellation.component.d.ts.map +1 -1
  240. package/dist/lib/custom/ai-agent-run/flow/constellation.component.js +71 -53
  241. package/dist/lib/custom/ai-agent-run/flow/constellation.component.js.map +1 -1
  242. package/dist/lib/custom/ai-agent-run/flow/flame-cascade.component.d.ts +14 -2
  243. package/dist/lib/custom/ai-agent-run/flow/flame-cascade.component.d.ts.map +1 -1
  244. package/dist/lib/custom/ai-agent-run/flow/flame-cascade.component.js +70 -52
  245. package/dist/lib/custom/ai-agent-run/flow/flame-cascade.component.js.map +1 -1
  246. package/dist/lib/custom/ai-agent-run/flow/flow-svg.util.d.ts +8 -0
  247. package/dist/lib/custom/ai-agent-run/flow/flow-svg.util.d.ts.map +1 -1
  248. package/dist/lib/custom/ai-agent-run/flow/flow-svg.util.js +22 -6
  249. package/dist/lib/custom/ai-agent-run/flow/flow-svg.util.js.map +1 -1
  250. package/dist/lib/custom/ai-agent-run/flow/flowchart.component.d.ts +24 -2
  251. package/dist/lib/custom/ai-agent-run/flow/flowchart.component.d.ts.map +1 -1
  252. package/dist/lib/custom/ai-agent-run/flow/flowchart.component.js +91 -59
  253. package/dist/lib/custom/ai-agent-run/flow/flowchart.component.js.map +1 -1
  254. package/dist/lib/custom/ai-agent-run/flow/pan-zoom.d.ts +10 -2
  255. package/dist/lib/custom/ai-agent-run/flow/pan-zoom.d.ts.map +1 -1
  256. package/dist/lib/custom/ai-agent-run/flow/pan-zoom.js +33 -17
  257. package/dist/lib/custom/ai-agent-run/flow/pan-zoom.js.map +1 -1
  258. package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.d.ts +2 -0
  259. package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.d.ts.map +1 -1
  260. package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.js +34 -30
  261. package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.js.map +1 -1
  262. package/dist/lib/custom/ai-agent-run/flow/subway-lines.component.d.ts +14 -2
  263. package/dist/lib/custom/ai-agent-run/flow/subway-lines.component.d.ts.map +1 -1
  264. package/dist/lib/custom/ai-agent-run/flow/subway-lines.component.js +69 -51
  265. package/dist/lib/custom/ai-agent-run/flow/subway-lines.component.js.map +1 -1
  266. package/dist/lib/custom/custom-forms.module.d.ts +56 -48
  267. package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
  268. package/dist/lib/custom/custom-forms.module.js +60 -0
  269. package/dist/lib/custom/custom-forms.module.js.map +1 -1
  270. package/dist/lib/custom/shared/entity-selector-dialog.component.d.ts +38 -12
  271. package/dist/lib/custom/shared/entity-selector-dialog.component.d.ts.map +1 -1
  272. package/dist/lib/custom/shared/entity-selector-dialog.component.js +103 -51
  273. package/dist/lib/custom/shared/entity-selector-dialog.component.js.map +1 -1
  274. package/dist/lib/generated/Entities/MJAIAgent/mjaiagent.form.component.d.ts.map +1 -1
  275. package/dist/lib/generated/Entities/MJAIAgent/mjaiagent.form.component.js +61 -43
  276. package/dist/lib/generated/Entities/MJAIAgent/mjaiagent.form.component.js.map +1 -1
  277. package/dist/lib/generated/Entities/MJAIAgentRubric/mjaiagentrubric.form.component.d.ts +10 -0
  278. package/dist/lib/generated/Entities/MJAIAgentRubric/mjaiagentrubric.form.component.d.ts.map +1 -0
  279. package/dist/lib/generated/Entities/MJAIAgentRubric/mjaiagentrubric.form.component.js +74 -0
  280. package/dist/lib/generated/Entities/MJAIAgentRubric/mjaiagentrubric.form.component.js.map +1 -0
  281. package/dist/lib/generated/Entities/MJAIAgentRun/mjaiagentrun.form.component.d.ts.map +1 -1
  282. package/dist/lib/generated/Entities/MJAIAgentRun/mjaiagentrun.form.component.js +37 -19
  283. package/dist/lib/generated/Entities/MJAIAgentRun/mjaiagentrun.form.component.js.map +1 -1
  284. package/dist/lib/generated/Entities/MJAIPromptRun/mjaipromptrun.form.component.d.ts.map +1 -1
  285. package/dist/lib/generated/Entities/MJAIPromptRun/mjaipromptrun.form.component.js +78 -52
  286. package/dist/lib/generated/Entities/MJAIPromptRun/mjaipromptrun.form.component.js.map +1 -1
  287. package/dist/lib/generated/Entities/MJAIVendor/mjaivendor.form.component.js +76 -74
  288. package/dist/lib/generated/Entities/MJAIVendor/mjaivendor.form.component.js.map +1 -1
  289. package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.d.ts.map +1 -1
  290. package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.js +156 -84
  291. package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.js.map +1 -1
  292. package/dist/lib/generated/Entities/MJFeaturePipelineType/mjfeaturepipelinetype.form.component.d.ts +10 -0
  293. package/dist/lib/generated/Entities/MJFeaturePipelineType/mjfeaturepipelinetype.form.component.d.ts.map +1 -0
  294. package/dist/lib/generated/Entities/MJFeaturePipelineType/mjfeaturepipelinetype.form.component.js +62 -0
  295. package/dist/lib/generated/Entities/MJFeaturePipelineType/mjfeaturepipelinetype.form.component.js.map +1 -0
  296. package/dist/lib/generated/Entities/MJProcessRun/mjprocessrun.form.component.d.ts.map +1 -1
  297. package/dist/lib/generated/Entities/MJProcessRun/mjprocessrun.form.component.js +24 -6
  298. package/dist/lib/generated/Entities/MJProcessRun/mjprocessrun.form.component.js.map +1 -1
  299. package/dist/lib/generated/Entities/MJProject/mjproject.form.component.js +27 -25
  300. package/dist/lib/generated/Entities/MJProject/mjproject.form.component.js.map +1 -1
  301. package/dist/lib/generated/Entities/MJRecordChange/mjrecordchange.form.component.d.ts.map +1 -1
  302. package/dist/lib/generated/Entities/MJRecordChange/mjrecordchange.form.component.js +24 -16
  303. package/dist/lib/generated/Entities/MJRecordChange/mjrecordchange.form.component.js.map +1 -1
  304. package/dist/lib/generated/Entities/MJRecordCloneLog/mjrecordclonelog.form.component.d.ts +10 -0
  305. package/dist/lib/generated/Entities/MJRecordCloneLog/mjrecordclonelog.form.component.d.ts.map +1 -0
  306. package/dist/lib/generated/Entities/MJRecordCloneLog/mjrecordclonelog.form.component.js +107 -0
  307. package/dist/lib/generated/Entities/MJRecordCloneLog/mjrecordclonelog.form.component.js.map +1 -0
  308. package/dist/lib/generated/Entities/MJRecordCloneLogItem/mjrecordclonelogitem.form.component.d.ts +10 -0
  309. package/dist/lib/generated/Entities/MJRecordCloneLogItem/mjrecordclonelogitem.form.component.d.ts.map +1 -0
  310. package/dist/lib/generated/Entities/MJRecordCloneLogItem/mjrecordclonelogitem.form.component.js +74 -0
  311. package/dist/lib/generated/Entities/MJRecordCloneLogItem/mjrecordclonelogitem.form.component.js.map +1 -0
  312. package/dist/lib/generated/Entities/MJRubric/mjrubric.form.component.d.ts +10 -0
  313. package/dist/lib/generated/Entities/MJRubric/mjrubric.form.component.d.ts.map +1 -0
  314. package/dist/lib/generated/Entities/MJRubric/mjrubric.form.component.js +135 -0
  315. package/dist/lib/generated/Entities/MJRubric/mjrubric.form.component.js.map +1 -0
  316. package/dist/lib/generated/Entities/MJRubricBand/mjrubricband.form.component.d.ts +10 -0
  317. package/dist/lib/generated/Entities/MJRubricBand/mjrubricband.form.component.d.ts.map +1 -0
  318. package/dist/lib/generated/Entities/MJRubricBand/mjrubricband.form.component.js +87 -0
  319. package/dist/lib/generated/Entities/MJRubricBand/mjrubricband.form.component.js.map +1 -0
  320. package/dist/lib/generated/Entities/MJRubricCategory/mjrubriccategory.form.component.d.ts +10 -0
  321. package/dist/lib/generated/Entities/MJRubricCategory/mjrubriccategory.form.component.d.ts.map +1 -0
  322. package/dist/lib/generated/Entities/MJRubricCategory/mjrubriccategory.form.component.js +107 -0
  323. package/dist/lib/generated/Entities/MJRubricCategory/mjrubriccategory.form.component.js.map +1 -0
  324. package/dist/lib/generated/Entities/MJRubricCriterion/mjrubriccriterion.form.component.d.ts +10 -0
  325. package/dist/lib/generated/Entities/MJRubricCriterion/mjrubriccriterion.form.component.d.ts.map +1 -0
  326. package/dist/lib/generated/Entities/MJRubricCriterion/mjrubriccriterion.form.component.js +155 -0
  327. package/dist/lib/generated/Entities/MJRubricCriterion/mjrubriccriterion.form.component.js.map +1 -0
  328. package/dist/lib/generated/Entities/MJRubricCriterionLevel/mjrubriccriterionlevel.form.component.d.ts +10 -0
  329. package/dist/lib/generated/Entities/MJRubricCriterionLevel/mjrubriccriterionlevel.form.component.d.ts.map +1 -0
  330. package/dist/lib/generated/Entities/MJRubricCriterionLevel/mjrubriccriterionlevel.form.component.js +62 -0
  331. package/dist/lib/generated/Entities/MJRubricCriterionLevel/mjrubriccriterionlevel.form.component.js.map +1 -0
  332. package/dist/lib/generated/Entities/MJRubricEvaluation/mjrubricevaluation.form.component.d.ts +10 -0
  333. package/dist/lib/generated/Entities/MJRubricEvaluation/mjrubricevaluation.form.component.d.ts.map +1 -0
  334. package/dist/lib/generated/Entities/MJRubricEvaluation/mjrubricevaluation.form.component.js +183 -0
  335. package/dist/lib/generated/Entities/MJRubricEvaluation/mjrubricevaluation.form.component.js.map +1 -0
  336. package/dist/lib/generated/Entities/MJRubricEvaluationScore/mjrubricevaluationscore.form.component.d.ts +10 -0
  337. package/dist/lib/generated/Entities/MJRubricEvaluationScore/mjrubricevaluationscore.form.component.d.ts.map +1 -0
  338. package/dist/lib/generated/Entities/MJRubricEvaluationScore/mjrubricevaluationscore.form.component.js +120 -0
  339. package/dist/lib/generated/Entities/MJRubricEvaluationScore/mjrubricevaluationscore.form.component.js.map +1 -0
  340. package/dist/lib/generated/Entities/MJRubricScale/mjrubricscale.form.component.d.ts +10 -0
  341. package/dist/lib/generated/Entities/MJRubricScale/mjrubricscale.form.component.d.ts.map +1 -0
  342. package/dist/lib/generated/Entities/MJRubricScale/mjrubricscale.form.component.js +107 -0
  343. package/dist/lib/generated/Entities/MJRubricScale/mjrubricscale.form.component.js.map +1 -0
  344. package/dist/lib/generated/Entities/MJRubricScaleLevel/mjrubricscalelevel.form.component.d.ts +10 -0
  345. package/dist/lib/generated/Entities/MJRubricScaleLevel/mjrubricscalelevel.form.component.d.ts.map +1 -0
  346. package/dist/lib/generated/Entities/MJRubricScaleLevel/mjrubricscalelevel.form.component.js +103 -0
  347. package/dist/lib/generated/Entities/MJRubricScaleLevel/mjrubricscalelevel.form.component.js.map +1 -0
  348. package/dist/lib/generated/Entities/MJRubricVersion/mjrubricversion.form.component.d.ts +10 -0
  349. package/dist/lib/generated/Entities/MJRubricVersion/mjrubricversion.form.component.d.ts.map +1 -0
  350. package/dist/lib/generated/Entities/MJRubricVersion/mjrubricversion.form.component.js +171 -0
  351. package/dist/lib/generated/Entities/MJRubricVersion/mjrubricversion.form.component.js.map +1 -0
  352. package/dist/lib/generated/Entities/MJTest/mjtest.form.component.d.ts.map +1 -1
  353. package/dist/lib/generated/Entities/MJTest/mjtest.form.component.js +24 -16
  354. package/dist/lib/generated/Entities/MJTest/mjtest.form.component.js.map +1 -1
  355. package/dist/lib/generated/Entities/MJTestSuite/mjtestsuite.form.component.js +27 -25
  356. package/dist/lib/generated/Entities/MJTestSuite/mjtestsuite.form.component.js.map +1 -1
  357. package/dist/lib/generated/Entities/MJTestSuiteRun/mjtestsuiterun.form.component.d.ts.map +1 -1
  358. package/dist/lib/generated/Entities/MJTestSuiteRun/mjtestsuiterun.form.component.js +19 -11
  359. package/dist/lib/generated/Entities/MJTestSuiteRun/mjtestsuiterun.form.component.js.map +1 -1
  360. package/dist/lib/generated/Entities/MJUser/mjuser.form.component.d.ts.map +1 -1
  361. package/dist/lib/generated/Entities/MJUser/mjuser.form.component.js +209 -119
  362. package/dist/lib/generated/Entities/MJUser/mjuser.form.component.js.map +1 -1
  363. package/dist/lib/generated/generated-forms.module.d.ts +436 -422
  364. package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
  365. package/dist/lib/generated/generated-forms.module.js +44 -2
  366. package/dist/lib/generated/generated-forms.module.js.map +1 -1
  367. package/dist/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.d.ts +5 -1
  368. package/dist/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.d.ts.map +1 -1
  369. package/dist/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.js +11 -3
  370. package/dist/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.js.map +1 -1
  371. package/dist/lib/panels/content-sources/tag-pipeline-configuration.panel.d.ts +2 -0
  372. package/dist/lib/panels/content-sources/tag-pipeline-configuration.panel.d.ts.map +1 -1
  373. package/dist/lib/panels/content-sources/tag-pipeline-configuration.panel.js +16 -12
  374. package/dist/lib/panels/content-sources/tag-pipeline-configuration.panel.js.map +1 -1
  375. package/dist/lib/panels/content-sources/website-crawler-settings.panel.d.ts +1 -1
  376. package/dist/lib/panels/content-sources/website-crawler-settings.panel.js +2 -2
  377. package/dist/lib/panels/content-sources/website-crawler-settings.panel.js.map +1 -1
  378. package/dist/lib/panels/model-predictions/model-prediction.logic.d.ts +45 -19
  379. package/dist/lib/panels/model-predictions/model-prediction.logic.d.ts.map +1 -1
  380. package/dist/lib/panels/model-predictions/model-prediction.logic.js +95 -43
  381. package/dist/lib/panels/model-predictions/model-prediction.logic.js.map +1 -1
  382. package/dist/lib/panels/model-predictions/model-prediction.panel.d.ts +20 -16
  383. package/dist/lib/panels/model-predictions/model-prediction.panel.d.ts.map +1 -1
  384. package/dist/lib/panels/model-predictions/model-prediction.panel.js +73 -65
  385. package/dist/lib/panels/model-predictions/model-prediction.panel.js.map +1 -1
  386. package/dist/lib/panels/record-clone/entity-clone-config-editor.component.d.ts +116 -0
  387. package/dist/lib/panels/record-clone/entity-clone-config-editor.component.d.ts.map +1 -0
  388. package/dist/lib/panels/record-clone/entity-clone-config-editor.component.js +820 -0
  389. package/dist/lib/panels/record-clone/entity-clone-config-editor.component.js.map +1 -0
  390. package/dist/lib/shared/components/template-editor.component.d.ts +158 -15
  391. package/dist/lib/shared/components/template-editor.component.d.ts.map +1 -1
  392. package/dist/lib/shared/components/template-editor.component.js +389 -127
  393. package/dist/lib/shared/components/template-editor.component.js.map +1 -1
  394. package/dist/public-api.d.ts +5 -0
  395. package/dist/public-api.d.ts.map +1 -1
  396. package/dist/public-api.js +5 -0
  397. package/dist/public-api.js.map +1 -1
  398. package/package.json +47 -42
@@ -1,11 +1,14 @@
1
- import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core';
1
+ import { Component, Input, Output, EventEmitter, ViewChild, ElementRef, inject } from '@angular/core';
2
2
  import { RunView } from '@memberjunction/core';
3
+ import { MJEventType, MJGlobal } from '@memberjunction/global';
3
4
  import { MJNotificationService } from '@memberjunction/ng-notifications';
5
+ import { IsDescendantElement } from '@memberjunction/ng-shared-generic';
4
6
  import { TemplateEngineBase } from '@memberjunction/templates-base-types';
5
7
  import { languages } from '@codemirror/language-data';
6
8
  import { Subject } from 'rxjs';
9
+ import { takeUntil } from 'rxjs/operators';
7
10
  import { DEFAULT_SYSTEM_PLACEHOLDERS, SYSTEM_PLACEHOLDER_CATEGORIES } from '@memberjunction/ai-core-plus';
8
- import { BaseAngularComponent } from '@memberjunction/ng-base-types';
11
+ import { BaseAngularComponent, BaseFormComponentEventCodes, PendingRecordItem } from '@memberjunction/ng-base-types';
9
12
  import * as i0 from "@angular/core";
10
13
  import * as i1 from "@memberjunction/ng-notifications";
11
14
  import * as i2 from "@memberjunction/ng-ui-components";
@@ -462,62 +465,206 @@ function TemplateEditorComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
462
465
  i0.ɵɵconditional(ctx_r2.currentTemplateContent ? 2 : 3);
463
466
  } }
464
467
  export class TemplateEditorComponent extends BaseAngularComponent {
468
+ /** @deprecated Use {@link Template}. */
469
+ set template(value) {
470
+ this.Template = value;
471
+ }
472
+ /** @deprecated Use {@link Template}. */
473
+ get template() {
474
+ return this.Template;
475
+ }
476
+ /** @deprecated Use {@link TemplateContents}. */
477
+ get templateContents() {
478
+ return this.TemplateContents;
479
+ }
480
+ /** @deprecated Use {@link TemplateContents}. */
481
+ set templateContents(value) {
482
+ this.TemplateContents = value;
483
+ }
484
+ /** @deprecated Use {@link SelectedContentIndex}. */
485
+ get selectedContentIndex() {
486
+ return this.SelectedContentIndex;
487
+ }
488
+ /** @deprecated Use {@link SelectedContentIndex}. */
489
+ set selectedContentIndex(value) {
490
+ this.SelectedContentIndex = value;
491
+ }
492
+ /** @deprecated Use {@link IsAddingNewContent}. */
493
+ get isAddingNewContent() {
494
+ return this.IsAddingNewContent;
495
+ }
496
+ /** @deprecated Use {@link IsAddingNewContent}. */
497
+ set isAddingNewContent(value) {
498
+ this.IsAddingNewContent = value;
499
+ }
500
+ /** @deprecated Use {@link NewTemplateContent}. */
501
+ get newTemplateContent() {
502
+ return this.NewTemplateContent;
503
+ }
504
+ /** @deprecated Use {@link NewTemplateContent}. */
505
+ set newTemplateContent(value) {
506
+ this.NewTemplateContent = value;
507
+ }
508
+ /** @deprecated Use {@link HasUnsavedChanges}. */
509
+ get hasUnsavedChanges() {
510
+ return this.HasUnsavedChanges;
511
+ }
512
+ /** @deprecated Use {@link HasUnsavedChanges}. */
513
+ set hasUnsavedChanges(value) {
514
+ this.HasUnsavedChanges = value;
515
+ }
516
+ /** @deprecated Use {@link ContentTypeOptions}. */
517
+ get contentTypeOptions() {
518
+ return this.ContentTypeOptions;
519
+ }
520
+ /** @deprecated Use {@link ContentTypeOptions}. */
521
+ set contentTypeOptions(value) {
522
+ this.ContentTypeOptions = value;
523
+ }
524
+ /** @deprecated Use {@link SupportedLanguages}. */
525
+ get supportedLanguages() {
526
+ return this.SupportedLanguages;
527
+ }
528
+ /** @deprecated Use {@link SupportedLanguages}. */
529
+ set supportedLanguages(value) {
530
+ this.SupportedLanguages = value;
531
+ }
532
+ /** @deprecated Use {@link IsRunningTemplate}. */
533
+ get isRunningTemplate() {
534
+ return this.IsRunningTemplate;
535
+ }
536
+ /** @deprecated Use {@link IsRunningTemplate}. */
537
+ set isRunningTemplate(value) {
538
+ this.IsRunningTemplate = value;
539
+ }
540
+ /** @deprecated Use {@link ActiveHelpTab}. */
541
+ get activeHelpTab() {
542
+ return this.ActiveHelpTab;
543
+ }
544
+ /** @deprecated Use {@link ActiveHelpTab}. */
545
+ set activeHelpTab(value) {
546
+ this.ActiveHelpTab = value;
547
+ }
548
+ /** @deprecated Use {@link ActivePlaceholderCategory}. */
549
+ get activePlaceholderCategory() {
550
+ return this.ActivePlaceholderCategory;
551
+ }
552
+ /** @deprecated Use {@link ActivePlaceholderCategory}. */
553
+ set activePlaceholderCategory(value) {
554
+ this.ActivePlaceholderCategory = value;
555
+ }
556
+ /** @deprecated Use {@link PlaceholderCategories}. */
557
+ get placeholderCategories() {
558
+ return this.PlaceholderCategories;
559
+ }
560
+ /** @deprecated Use {@link PlaceholderCategories}. */
561
+ set placeholderCategories(value) {
562
+ this.PlaceholderCategories = value;
563
+ }
564
+ /** @deprecated Use {@link CodeEditor}. */
565
+ get codeEditor() {
566
+ return this.CodeEditor;
567
+ }
568
+ /** @deprecated Use {@link CodeEditor}. */
569
+ set codeEditor(value) {
570
+ this.CodeEditor = value;
571
+ }
465
572
  get _metadata() { return this.ProviderToUse; }
466
573
  constructor(notificationService, confirmService) {
467
574
  super();
468
575
  this.notificationService = notificationService;
469
576
  this.confirmService = confirmService;
470
- this.template = null;
577
+ this.Template = null;
471
578
  this.config = {
472
579
  allowEdit: true,
473
580
  showRunButton: false,
474
581
  compactMode: false
475
582
  };
476
- this.contentChange = new EventEmitter();
477
- this.runTemplate = new EventEmitter();
478
- this.templateContents = [];
479
- this.selectedContentIndex = 0;
480
- this.isAddingNewContent = false;
481
- this.newTemplateContent = null;
482
- this.hasUnsavedChanges = false;
483
- this.contentTypeOptions = [];
484
- this.supportedLanguages = languages;
485
- this.isRunningTemplate = false;
486
- this.activeHelpTab = 'syntax';
487
- this.activePlaceholderCategory = '';
583
+ this.ContentChange = new EventEmitter();
584
+ /**
585
+ * @deprecated Use {@link ContentChange}.
586
+ *
587
+ * The same emitter under the old binding name, so a template still binding
588
+ * (contentChange) keeps working. Must stay AFTER ContentChange: class fields
589
+ * initialise in order, and the other way round this captures undefined.
590
+ */
591
+ this.contentChange = this.ContentChange;
592
+ this.RunTemplate = new EventEmitter();
593
+ /**
594
+ * @deprecated Use {@link RunTemplate}.
595
+ *
596
+ * The same emitter under the old binding name, so a template still binding
597
+ * (runTemplate) keeps working. Must stay AFTER RunTemplate: class fields
598
+ * initialise in order, and the other way round this captures undefined.
599
+ */
600
+ this.runTemplate = this.RunTemplate;
601
+ this.TemplateContents = [];
602
+ this.SelectedContentIndex = 0;
603
+ this.IsAddingNewContent = false;
604
+ this.NewTemplateContent = null;
605
+ this.HasUnsavedChanges = false;
606
+ this.ContentTypeOptions = [];
607
+ this.SupportedLanguages = languages;
608
+ this.IsRunningTemplate = false;
609
+ this.ActiveHelpTab = 'syntax';
610
+ this.ActivePlaceholderCategory = '';
488
611
  // System placeholders organized by category
489
- this.placeholderCategories = [];
490
- this.codeEditor = null;
612
+ this.PlaceholderCategories = [];
613
+ this.CodeEditor = null;
491
614
  this.isUpdatingEditorValue = false;
492
615
  this.destroy$ = new Subject();
493
616
  this.activeTimeouts = [];
617
+ this.elementRef = inject(ElementRef);
494
618
  }
495
619
  async ngOnInit() {
496
- this.loadContentTypes();
620
+ this.LoadContentTypes();
497
621
  this.organizePlaceholdersByCategory();
498
- if (this.template) {
499
- await this.loadTemplateContents();
622
+ this.listenForHostFormEvents();
623
+ if (this.Template) {
624
+ await this.LoadTemplateContents();
500
625
  }
501
626
  }
627
+ /**
628
+ * A host form that folds this editor's contents into its pending records (see GetPendingChanges)
629
+ * also reverts them when the user discards the edit: `BaseFormComponent.CancelEdit()` calls
630
+ * `Revert()` on every pending record and broadcasts REVERT_PENDING_CHANGES. The entities roll back
631
+ * on their own, but this editor's rows, CodeMirror's text and the dirty flag would not know, so
632
+ * the screen would keep showing discarded text and the next save would fail on it. Reload from
633
+ * the saved state when the event comes from a form this editor sits inside.
634
+ */
635
+ listenForHostFormEvents() {
636
+ MJGlobal.Instance.GetEventListener(false).pipe(takeUntil(this.destroy$)).subscribe((e) => {
637
+ if (e.event !== MJEventType.ComponentEvent || e.eventCode !== BaseFormComponentEventCodes.BASE_CODE) {
638
+ return;
639
+ }
640
+ const formEvent = e.args;
641
+ if (formEvent.subEventCode !== BaseFormComponentEventCodes.REVERT_PENDING_CHANGES) {
642
+ return;
643
+ }
644
+ if (IsDescendantElement(formEvent.elementRef, this.elementRef)) {
645
+ void this.RefreshAndDiscardChanges();
646
+ }
647
+ });
648
+ }
502
649
  async ngOnChanges(changes) {
503
650
  if (changes['template']) {
504
651
  // Template input has changed, reload contents
505
- if (this.template) {
506
- await this.loadTemplateContents();
652
+ if (this.Template) {
653
+ await this.LoadTemplateContents();
507
654
  }
508
655
  else {
509
656
  // Template cleared, reset state
510
- this.templateContents = [];
511
- this.selectedContentIndex = 0;
512
- this.isAddingNewContent = false;
513
- this.newTemplateContent = null;
514
- this.hasUnsavedChanges = false;
657
+ this.TemplateContents = [];
658
+ this.SelectedContentIndex = 0;
659
+ this.IsAddingNewContent = false;
660
+ this.NewTemplateContent = null;
661
+ this.HasUnsavedChanges = false;
515
662
  }
516
663
  }
517
664
  }
518
665
  organizePlaceholdersByCategory() {
519
666
  // Group placeholders by their category
520
- this.placeholderCategories = SYSTEM_PLACEHOLDER_CATEGORIES.map(category => {
667
+ this.PlaceholderCategories = SYSTEM_PLACEHOLDER_CATEGORIES.map(category => {
521
668
  const categoryPlaceholders = DEFAULT_SYSTEM_PLACEHOLDERS.filter(placeholder => placeholder.category === category.name);
522
669
  return {
523
670
  category: category,
@@ -528,7 +675,7 @@ export class TemplateEditorComponent extends BaseAngularComponent {
528
675
  const categorized = DEFAULT_SYSTEM_PLACEHOLDERS.filter(p => p.category);
529
676
  const uncategorized = DEFAULT_SYSTEM_PLACEHOLDERS.filter(p => !p.category);
530
677
  if (uncategorized.length > 0) {
531
- this.placeholderCategories.push({
678
+ this.PlaceholderCategories.push({
532
679
  category: {
533
680
  name: 'Other',
534
681
  icon: 'fa-ellipsis-h',
@@ -538,14 +685,14 @@ export class TemplateEditorComponent extends BaseAngularComponent {
538
685
  });
539
686
  }
540
687
  // Set the first category as active
541
- if (this.placeholderCategories.length > 0) {
542
- this.activePlaceholderCategory = this.placeholderCategories[0].category.name;
688
+ if (this.PlaceholderCategories.length > 0) {
689
+ this.ActivePlaceholderCategory = this.PlaceholderCategories[0].category.name;
543
690
  }
544
691
  }
545
692
  /**
546
693
  * Copies a placeholder to the clipboard
547
694
  */
548
- async copyPlaceholder(placeholderName) {
695
+ async CopyPlaceholder(placeholderName) {
549
696
  try {
550
697
  await navigator.clipboard.writeText(`{{ ${placeholderName} }}`);
551
698
  this.notificationService.CreateSimpleNotification('Placeholder copied to clipboard!', 'success', 2000);
@@ -555,6 +702,10 @@ export class TemplateEditorComponent extends BaseAngularComponent {
555
702
  this.notificationService.CreateSimpleNotification('Failed to copy placeholder', 'error', 3000);
556
703
  }
557
704
  }
705
+ /** @deprecated Use {@link CopyPlaceholder}. */
706
+ async copyPlaceholder(placeholderName) {
707
+ return this.CopyPlaceholder(placeholderName);
708
+ }
558
709
  ngOnDestroy() {
559
710
  this.destroy$.next();
560
711
  this.destroy$.complete();
@@ -566,86 +717,102 @@ export class TemplateEditorComponent extends BaseAngularComponent {
566
717
  // Initial sync when view is ready
567
718
  this.syncEditorValue();
568
719
  }
569
- async loadTemplateContents() {
570
- if (this.template) {
720
+ async LoadTemplateContents() {
721
+ if (this.Template) {
571
722
  // Reset state first
572
- this.templateContents = [];
573
- this.selectedContentIndex = 0;
574
- this.isAddingNewContent = false;
575
- this.newTemplateContent = null;
576
- this.hasUnsavedChanges = false;
577
- if (this.template.IsSaved && this.template.ID) {
723
+ this.TemplateContents = [];
724
+ this.SelectedContentIndex = 0;
725
+ this.IsAddingNewContent = false;
726
+ this.NewTemplateContent = null;
727
+ this.HasUnsavedChanges = false;
728
+ if (this.Template.IsSaved && this.Template.ID) {
578
729
  // Load existing template contents for saved templates
579
730
  try {
580
731
  const rv = RunView.FromMetadataProvider(this.ProviderToUse);
581
732
  const results = await rv.RunView({
582
733
  EntityName: 'MJ: Template Contents',
583
- ExtraFilter: `TemplateID='${this.template.ID}'`,
734
+ ExtraFilter: `TemplateID='${this.Template.ID}'`,
584
735
  OrderBy: 'Priority ASC, __mj_CreatedAt ASC',
585
736
  ResultType: 'entity_object'
586
737
  });
587
- this.templateContents = results.Results;
738
+ this.TemplateContents = results.Results;
588
739
  }
589
740
  catch (error) {
590
741
  console.error('Error loading template contents:', error);
591
742
  }
592
743
  }
593
744
  // If we have contents but no selection, select the first one
594
- if (this.templateContents.length > 0) {
595
- this.selectedContentIndex = 0;
745
+ if (this.TemplateContents.length > 0) {
746
+ this.SelectedContentIndex = 0;
596
747
  }
597
748
  // If no template contents exist (either new template or saved template with no content),
598
749
  // create a default one for single-content optimization
599
- if (this.templateContents.length === 0) {
600
- await this.createDefaultTemplateContent();
750
+ if (this.TemplateContents.length === 0) {
751
+ await this.CreateDefaultTemplateContent();
601
752
  }
602
753
  // Sync editor value after loading content
603
754
  this.syncEditorValue();
604
- this.contentChange.emit(this.templateContents);
755
+ this.ContentChange.emit(this.TemplateContents);
605
756
  }
606
757
  }
758
+ /** @deprecated Use {@link LoadTemplateContents}. */
759
+ async loadTemplateContents() {
760
+ return this.LoadTemplateContents();
761
+ }
607
762
  /**
608
763
  * Public method to refresh the template editor and discard unsaved changes
609
764
  * This should be called when canceling edits to restore the original state
610
765
  */
766
+ async RefreshAndDiscardChanges() {
767
+ await this.LoadTemplateContents();
768
+ }
769
+ /** @deprecated Use {@link RefreshAndDiscardChanges}. */
611
770
  async refreshAndDiscardChanges() {
612
- await this.loadTemplateContents();
771
+ return this.RefreshAndDiscardChanges();
613
772
  }
614
- async createDefaultTemplateContent() {
773
+ async CreateDefaultTemplateContent() {
615
774
  const defaultContent = await this._metadata.GetEntityObject('MJ: Template Contents');
616
- defaultContent.TemplateID = this.template.ID;
775
+ defaultContent.TemplateID = this.Template.ID;
617
776
  defaultContent.Priority = 1;
618
777
  defaultContent.IsActive = true;
619
778
  // Set default to first real content type (skip "Select Type..." if it exists)
620
- const validContentTypes = this.contentTypeOptions.filter(option => option.value !== '');
779
+ const validContentTypes = this.ContentTypeOptions.filter(option => option.value !== '');
621
780
  if (validContentTypes.length > 0) {
622
781
  defaultContent.TypeID = validContentTypes[0].value;
623
782
  }
624
- this.templateContents = [defaultContent];
625
- this.selectedContentIndex = 0;
783
+ this.TemplateContents = [defaultContent];
784
+ this.SelectedContentIndex = 0;
626
785
  // Sync editor value after creating default content
627
786
  this.syncEditorValue();
628
787
  }
629
- async selectTemplateContent(index, confirmSwitch = true) {
788
+ /** @deprecated Use {@link CreateDefaultTemplateContent}. */
789
+ async createDefaultTemplateContent() {
790
+ return this.CreateDefaultTemplateContent();
791
+ }
792
+ async SelectTemplateContent(index, confirmSwitch = true) {
630
793
  // If we're adding new content and user clicks on existing content, ask for confirmation
631
- if (this.isAddingNewContent && confirmSwitch) {
794
+ if (this.IsAddingNewContent && confirmSwitch) {
632
795
  if (!(await this.confirmService.Confirm({ title: 'Discard changes?', message: 'Switch content version and lose your unsaved changes?', detail: 'Your changes to the new content version will be lost.' }))) {
633
796
  return;
634
797
  }
635
798
  }
636
- if (index >= 0 && index < this.templateContents.length) {
637
- this.selectedContentIndex = index;
638
- this.isAddingNewContent = false;
799
+ if (index >= 0 && index < this.TemplateContents.length) {
800
+ this.SelectedContentIndex = index;
801
+ this.IsAddingNewContent = false;
639
802
  // Don't clear newTemplateContent to preserve the work in progress
640
803
  // Sync editor value when switching content
641
804
  this.syncEditorValue();
642
805
  }
643
806
  }
644
- loadContentTypes() {
807
+ /** @deprecated Use {@link SelectTemplateContent}. */
808
+ async selectTemplateContent(index, confirmSwitch = true) {
809
+ return this.SelectTemplateContent(index, confirmSwitch);
810
+ }
811
+ LoadContentTypes() {
645
812
  try {
646
813
  // Get content types from TemplateEngine cache
647
814
  const contentTypes = TemplateEngineBase.Instance.TemplateContentTypes;
648
- this.contentTypeOptions = [
815
+ this.ContentTypeOptions = [
649
816
  { text: 'Select Type...', value: '' },
650
817
  ...contentTypes.map(ct => ({
651
818
  text: ct.Name,
@@ -656,7 +823,7 @@ export class TemplateEditorComponent extends BaseAngularComponent {
656
823
  catch (error) {
657
824
  console.error('Error loading content types:', error);
658
825
  // Fallback to basic types
659
- this.contentTypeOptions = [
826
+ this.ContentTypeOptions = [
660
827
  { text: 'Select Type...', value: '' },
661
828
  { text: 'HTML', value: 'HTML' },
662
829
  { text: 'Plain Text', value: 'Text' },
@@ -664,45 +831,53 @@ export class TemplateEditorComponent extends BaseAngularComponent {
664
831
  ];
665
832
  }
666
833
  }
667
- async addNewTemplateContent() {
834
+ /** @deprecated Use {@link LoadContentTypes}. */
835
+ loadContentTypes() {
836
+ return this.LoadContentTypes();
837
+ }
838
+ async AddNewTemplateContent() {
668
839
  if (!this.config.allowEdit)
669
840
  return;
670
- this.newTemplateContent = await this._metadata.GetEntityObject('MJ: Template Contents');
671
- this.newTemplateContent.TemplateID = this.template.ID;
672
- this.newTemplateContent.Priority = this.templateContents.length + 1;
673
- this.newTemplateContent.IsActive = true;
841
+ this.NewTemplateContent = await this._metadata.GetEntityObject('MJ: Template Contents');
842
+ this.NewTemplateContent.TemplateID = this.Template.ID;
843
+ this.NewTemplateContent.Priority = this.TemplateContents.length + 1;
844
+ this.NewTemplateContent.IsActive = true;
674
845
  // Set default to first real content type (skip "Select Type..." if it exists)
675
- const validContentTypes = this.contentTypeOptions.filter(option => option.value !== '');
846
+ const validContentTypes = this.ContentTypeOptions.filter(option => option.value !== '');
676
847
  if (validContentTypes.length > 0) {
677
- this.newTemplateContent.TypeID = validContentTypes[0].value;
848
+ this.NewTemplateContent.TypeID = validContentTypes[0].value;
678
849
  }
679
- this.newTemplateContent.TemplateText = '';
850
+ this.NewTemplateContent.TemplateText = '';
680
851
  // Add immediately to the array
681
- this.templateContents.push(this.newTemplateContent);
682
- this.selectedContentIndex = this.templateContents.length - 1;
683
- this.isAddingNewContent = true;
852
+ this.TemplateContents.push(this.NewTemplateContent);
853
+ this.SelectedContentIndex = this.TemplateContents.length - 1;
854
+ this.IsAddingNewContent = true;
684
855
  // Sync editor value when adding new content
685
856
  this.syncEditorValue();
686
857
  }
687
- async deleteTemplateContent(index) {
688
- if (!this.config.allowEdit || index < 0 || index >= this.templateContents.length)
858
+ /** @deprecated Use {@link AddNewTemplateContent}. */
859
+ async addNewTemplateContent() {
860
+ return this.AddNewTemplateContent();
861
+ }
862
+ async DeleteTemplateContent(index) {
863
+ if (!this.config.allowEdit || index < 0 || index >= this.TemplateContents.length)
689
864
  return;
690
- const contentToDelete = this.templateContents[index];
865
+ const contentToDelete = this.TemplateContents[index];
691
866
  // Check if the entity is actually saved, not just if it has an ID
692
867
  if (contentToDelete.IsSaved) {
693
868
  try {
694
869
  const result = await contentToDelete.Delete();
695
870
  if (result) {
696
- this.templateContents.splice(index, 1);
871
+ this.TemplateContents.splice(index, 1);
697
872
  // Adjust selected index if necessary
698
- if (this.selectedContentIndex >= this.templateContents.length) {
699
- this.selectedContentIndex = Math.max(0, this.templateContents.length - 1);
873
+ if (this.SelectedContentIndex >= this.TemplateContents.length) {
874
+ this.SelectedContentIndex = Math.max(0, this.TemplateContents.length - 1);
700
875
  }
701
876
  // If no contents remain, create a default one
702
- if (this.templateContents.length === 0) {
703
- await this.createDefaultTemplateContent();
877
+ if (this.TemplateContents.length === 0) {
878
+ await this.CreateDefaultTemplateContent();
704
879
  }
705
- this.contentChange.emit(this.templateContents);
880
+ this.ContentChange.emit(this.TemplateContents);
706
881
  }
707
882
  else {
708
883
  MJNotificationService.Instance.CreateSimpleNotification(`Failed to delete template content. ${contentToDelete.LatestResult?.Message}`, 'error');
@@ -715,53 +890,77 @@ export class TemplateEditorComponent extends BaseAngularComponent {
715
890
  }
716
891
  else {
717
892
  // Not saved yet, just remove from array
718
- this.templateContents.splice(index, 1);
719
- if (this.selectedContentIndex >= this.templateContents.length) {
720
- this.selectedContentIndex = Math.max(0, this.templateContents.length - 1);
893
+ this.TemplateContents.splice(index, 1);
894
+ if (this.SelectedContentIndex >= this.TemplateContents.length) {
895
+ this.SelectedContentIndex = Math.max(0, this.TemplateContents.length - 1);
721
896
  }
722
897
  // Reset adding new content state if we're deleting the new content
723
- if (this.isAddingNewContent && index === this.templateContents.length) {
724
- this.isAddingNewContent = false;
725
- this.newTemplateContent = null;
898
+ if (this.IsAddingNewContent && index === this.TemplateContents.length) {
899
+ this.IsAddingNewContent = false;
900
+ this.NewTemplateContent = null;
726
901
  }
727
- this.contentChange.emit(this.templateContents);
902
+ this.ContentChange.emit(this.TemplateContents);
728
903
  }
729
904
  }
730
- get currentTemplateContent() {
731
- if (this.isAddingNewContent) {
732
- return this.newTemplateContent;
905
+ /** @deprecated Use {@link DeleteTemplateContent}. */
906
+ async deleteTemplateContent(index) {
907
+ return this.DeleteTemplateContent(index);
908
+ }
909
+ get CurrentTemplateContent() {
910
+ if (this.IsAddingNewContent) {
911
+ return this.NewTemplateContent;
733
912
  }
734
- return this.templateContents[this.selectedContentIndex] || null;
913
+ return this.TemplateContents[this.SelectedContentIndex] || null;
914
+ }
915
+ /** @deprecated Use {@link CurrentTemplateContent}. */
916
+ get currentTemplateContent() {
917
+ return this.CurrentTemplateContent;
918
+ }
919
+ get HasMultipleContents() {
920
+ return this.TemplateContents.length > 1 || this.IsAddingNewContent;
735
921
  }
922
+ /** @deprecated Use {@link HasMultipleContents}. */
736
923
  get hasMultipleContents() {
737
- return this.templateContents.length > 1 || this.isAddingNewContent;
924
+ return this.HasMultipleContents;
738
925
  }
739
- onContentTypeChange() {
926
+ OnContentTypeChange() {
740
927
  // Content type changes just modify the current content, no new record creation
741
928
  this.updateUnsavedChangesFlag();
742
929
  }
743
- onContentChange() {
930
+ /** @deprecated Use {@link OnContentTypeChange}. */
931
+ onContentTypeChange() {
932
+ return this.OnContentTypeChange();
933
+ }
934
+ OnContentChange() {
744
935
  this.updateUnsavedChangesFlag();
745
936
  }
937
+ /** @deprecated Use {@link OnContentChange}. */
938
+ onContentChange() {
939
+ return this.OnContentChange();
940
+ }
746
941
  /**
747
942
  * Updates the hasUnsavedChanges flag based on entity dirty states
748
943
  */
749
944
  updateUnsavedChangesFlag() {
750
- this.hasUnsavedChanges = this.templateContents.some(content => content.Dirty) ||
751
- this.isAddingNewContent;
945
+ this.HasUnsavedChanges = this.TemplateContents.some(content => content.Dirty) ||
946
+ this.IsAddingNewContent;
752
947
  }
753
- onTemplateTextChange(event) {
948
+ OnTemplateTextChange(event) {
754
949
  if (this.isUpdatingEditorValue) {
755
950
  // Ignore change events when we're programmatically updating the editor
756
951
  return;
757
952
  }
758
- if (this.currentTemplateContent) {
953
+ if (this.CurrentTemplateContent) {
759
954
  // Extract value from event - might be event.target.value or just event depending on component
760
955
  const value = typeof event === 'string' ? event : (event.target?.value || event);
761
- this.currentTemplateContent.TemplateText = value;
956
+ this.CurrentTemplateContent.TemplateText = value;
762
957
  this.updateUnsavedChangesFlag();
763
958
  }
764
959
  }
960
+ /** @deprecated Use {@link OnTemplateTextChange}. */
961
+ onTemplateTextChange(event) {
962
+ return this.OnTemplateTextChange(event);
963
+ }
765
964
  /**
766
965
  * Helper method to track setTimeout calls for cleanup
767
966
  */
@@ -785,26 +984,26 @@ export class TemplateEditorComponent extends BaseAngularComponent {
785
984
  Promise.resolve().then(() => {
786
985
  // Then tracked setTimeout for the next macrotask to ensure DOM is updated
787
986
  this.setTrackedTimeout(() => {
788
- if (!this.codeEditor) {
987
+ if (!this.CodeEditor) {
789
988
  return;
790
989
  }
791
990
  this.isUpdatingEditorValue = true;
792
- const newValue = this.currentTemplateContent?.TemplateText || '';
991
+ const newValue = this.CurrentTemplateContent?.TemplateText || '';
793
992
  // Use the setValue method from mj-code-editor component
794
- this.codeEditor.setValue(newValue);
993
+ this.CodeEditor.setValue(newValue);
795
994
  this.isUpdatingEditorValue = false;
796
995
  }, 0);
797
996
  });
798
997
  }
799
- async saveTemplateContents() {
998
+ async SaveTemplateContents() {
800
999
  if (!this.config.allowEdit)
801
1000
  return false;
802
1001
  try {
803
1002
  // Ensure FK is set on all contents, then persist the dirty/new ones atomically
804
- for (const content of this.templateContents) {
805
- content.TemplateID = this.template.ID;
1003
+ for (const content of this.TemplateContents) {
1004
+ content.TemplateID = this.Template.ID;
806
1005
  }
807
- const toSave = this.templateContents.filter(c => c.Dirty || !c.ID);
1006
+ const toSave = this.TemplateContents.filter(c => c.Dirty || !c.ID);
808
1007
  if (toSave.length > 0) {
809
1008
  const tg = await this._metadata.CreateTransactionGroup();
810
1009
  for (const content of toSave) {
@@ -817,10 +1016,10 @@ export class TemplateEditorComponent extends BaseAngularComponent {
817
1016
  return false;
818
1017
  }
819
1018
  }
820
- this.isAddingNewContent = false;
821
- this.newTemplateContent = null;
1019
+ this.IsAddingNewContent = false;
1020
+ this.NewTemplateContent = null;
822
1021
  this.updateUnsavedChangesFlag();
823
- this.contentChange.emit(this.templateContents);
1022
+ this.ContentChange.emit(this.TemplateContents);
824
1023
  return true;
825
1024
  }
826
1025
  catch (error) {
@@ -828,17 +1027,62 @@ export class TemplateEditorComponent extends BaseAngularComponent {
828
1027
  return false;
829
1028
  }
830
1029
  }
831
- getContentTypeDisplayText(typeId) {
1030
+ /**
1031
+ * The content rows a HOST FORM should persist inside its own save: every content that is new or
1032
+ * dirty, each stamped with the template's ID. Forms that embed this editor (Templates, AI Prompts)
1033
+ * call this from their `PopulatePendingRecords()` override, so the template and its contents
1034
+ * commit in one transaction and a content that fails validation blocks the save visibly instead
1035
+ * of being dropped on the floor. A brand-new content nobody typed into is not a change and is
1036
+ * skipped; a read-only editor contributes nothing.
1037
+ */
1038
+ GetPendingChanges() {
1039
+ if (!this.config.allowEdit || !this.Template) {
1040
+ return [];
1041
+ }
1042
+ const pending = [];
1043
+ for (const content of this.TemplateContents) {
1044
+ // An unsaved entity always reports Dirty; the empty-text guard keeps a default row nobody used out.
1045
+ const untouchedNew = !content.IsSaved && !(content.TemplateText ?? '').trim();
1046
+ if (untouchedNew || !content.Dirty) {
1047
+ continue;
1048
+ }
1049
+ content.TemplateID = this.Template.ID;
1050
+ const item = new PendingRecordItem();
1051
+ item.entityObject = content;
1052
+ item.action = 'save';
1053
+ pending.push(item);
1054
+ }
1055
+ return pending;
1056
+ }
1057
+ /**
1058
+ * The host form has persisted the rows from {@link GetPendingChanges}: clear the local dirty state
1059
+ * and publish the saved set to listeners.
1060
+ */
1061
+ MarkContentsSaved() {
1062
+ this.IsAddingNewContent = false;
1063
+ this.NewTemplateContent = null;
1064
+ this.updateUnsavedChangesFlag();
1065
+ this.ContentChange.emit(this.TemplateContents);
1066
+ }
1067
+ /** @deprecated Use {@link SaveTemplateContents}. */
1068
+ async saveTemplateContents() {
1069
+ return this.SaveTemplateContents();
1070
+ }
1071
+ GetContentTypeDisplayText(typeId) {
832
1072
  if (!typeId)
833
1073
  return '-';
834
- const option = this.contentTypeOptions.find(opt => opt.value === typeId);
1074
+ const option = this.ContentTypeOptions.find(opt => opt.value === typeId);
835
1075
  return option ? option.text : typeId;
836
1076
  }
837
- getEditorLanguage() {
838
- if (!this.currentTemplateContent?.TypeID) {
1077
+ /** @deprecated Use {@link GetContentTypeDisplayText}. */
1078
+ getContentTypeDisplayText(typeId) {
1079
+ return this.GetContentTypeDisplayText(typeId);
1080
+ }
1081
+ GetEditorLanguage() {
1082
+ if (!this.CurrentTemplateContent?.TypeID) {
839
1083
  return 'jinja2'; // default to jinja2 for template syntax (compatible with Nunjucks)
840
1084
  }
841
- const contentType = this.currentTemplateContent.TypeID.toLowerCase();
1085
+ const contentType = this.CurrentTemplateContent.TypeID.toLowerCase();
842
1086
  // Map content types to CodeMirror language modes
843
1087
  switch (contentType) {
844
1088
  case 'html':
@@ -863,36 +1107,48 @@ export class TemplateEditorComponent extends BaseAngularComponent {
863
1107
  return 'jinja2'; // Default to jinja2 since templates often contain template syntax
864
1108
  }
865
1109
  }
1110
+ /** @deprecated Use {@link GetEditorLanguage}. */
1111
+ getEditorLanguage() {
1112
+ return this.GetEditorLanguage();
1113
+ }
866
1114
  /**
867
1115
  * Test run the current template using the parameter dialog
868
1116
  */
869
- async onRunTemplate() {
870
- if (!this.template?.IsSaved || !this.currentTemplateContent) {
1117
+ async OnRunTemplate() {
1118
+ if (!this.Template?.IsSaved || !this.CurrentTemplateContent) {
871
1119
  MJNotificationService.Instance.CreateSimpleNotification('Please save the template before running it.', 'warning');
872
1120
  return;
873
1121
  }
874
1122
  // Save any unsaved changes first
875
- if (this.hasUnsavedChanges) {
876
- const saveResult = await this.saveTemplateContents();
1123
+ if (this.HasUnsavedChanges) {
1124
+ const saveResult = await this.SaveTemplateContents();
877
1125
  if (!saveResult) {
878
1126
  MJNotificationService.Instance.CreateSimpleNotification('Failed to save template changes.', 'error');
879
1127
  return;
880
1128
  }
881
1129
  }
882
1130
  // Emit the run template event
883
- this.runTemplate.emit(this.template);
1131
+ this.RunTemplate.emit(this.Template);
884
1132
  }
885
- getContentTypeOptionsForContent() {
1133
+ /** @deprecated Use {@link OnRunTemplate}. */
1134
+ async onRunTemplate() {
1135
+ return this.OnRunTemplate();
1136
+ }
1137
+ GetContentTypeOptionsForContent() {
886
1138
  // Always exclude "Select Type..." option for all content
887
- return this.contentTypeOptions.filter(option => option.value !== '');
1139
+ return this.ContentTypeOptions.filter(option => option.value !== '');
1140
+ }
1141
+ /** @deprecated Use {@link GetContentTypeOptionsForContent}. */
1142
+ getContentTypeOptionsForContent() {
1143
+ return this.GetContentTypeOptionsForContent();
888
1144
  }
889
1145
  static { this.ɵfac = function TemplateEditorComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TemplateEditorComponent)(i0.ɵɵdirectiveInject(i1.MJNotificationService), i0.ɵɵdirectiveInject(i2.MJConfirmService)); }; }
890
1146
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TemplateEditorComponent, selectors: [["mj-template-editor"]], viewQuery: function TemplateEditorComponent_Query(rf, ctx) { if (rf & 1) {
891
1147
  i0.ɵɵviewQuery(_c0, 5);
892
1148
  } if (rf & 2) {
893
1149
  let _t;
894
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.codeEditor = _t.first);
895
- } }, inputs: { template: "template", config: "config" }, outputs: { contentChange: "contentChange", runTemplate: "runTemplate" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [["codeEditor", ""], [1, "template-editor", 2, "height", "100%", "display", "flex", "flex-direction", "column"], [1, "content-versions-tabs"], [1, "content-editor-container"], [1, "no-content-state"], [1, "content-tabs"], [1, "content-version-tab", 3, "active"], [1, "content-version-tab", "adding-new"], ["title", "Add new template content", 1, "content-version-tab", "add-new"], [1, "content-version-tab", 3, "click"], [2, "flex", "1"], [1, "tab-label"], [1, "tab-meta"], ["type", "button", "title", "Delete this content version", 1, "delete-btn"], [1, "inactive-label"], ["type", "button", "title", "Delete this content version", 1, "delete-btn", 3, "click"], [1, "fa-solid", "fa-trash", "fa-xs"], [1, "fa-solid", "fa-plus", "text-success"], [1, "new-label"], ["title", "Add new template content", 1, "content-version-tab", "add-new", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "content-metadata-bar"], [1, "metadata-grid"], [1, "form-group"], ["for", "contentType", 1, "form-label"], [1, "fa-solid", "fa-tag"], ["name", "contentType", "TextField", "text", "ValueField", "value", 3, "ngModel", "Data", "ValuePrimitive"], [1, "form-control-plaintext"], ["for", "priority", 1, "form-label"], [1, "fa-solid", "fa-sort-numeric-up"], ["name", "priority", 3, "ngModel", "Min", "Step", "Format"], [1, "form-label"], [1, "fa-solid", "fa-toggle-on"], [1, "form-check"], [1, "content-text-editor"], [1, "editor-header"], ["for", "templateContent", 1, "editor-label"], [1, "fa-solid", "fa-code"], [1, "content-type-badge"], [1, "editor-actions"], [1, "unsaved-indicator"], ["type", "button", "title", "Test run this template", 1, "run-btn", 3, "disabled"], [1, "code-editor-wrapper", 3, "change", "readonly", "language", "languages"], [1, "template-help-section"], ["name", "contentType", "TextField", "text", "ValueField", "value", 3, "ngModelChange", "ValueChange", "ngModel", "Data", "ValuePrimitive"], ["name", "priority", 3, "ngModelChange", "ngModel", "Min", "Step", "Format"], ["type", "checkbox", "id", "isActive", "name", "isActive", 1, "form-check-input", 3, "ngModelChange", "ngModel"], ["for", "isActive", 1, "form-check-label"], [1, "badge-success"], [1, "badge-secondary"], [1, "fa-solid", "fa-check-circle"], [1, "fa-solid", "fa-pause-circle"], [1, "fa-solid", "fa-circle"], ["type", "button", "title", "Test run this template", 1, "run-btn", 3, "click", "disabled"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-play"], [1, "help-tabs"], ["type", "button", 1, "help-tab", 3, "click"], [1, "fa-solid", "fa-at"], [1, "help-content"], [1, "syntax-help"], [1, "placeholders-help"], [1, "section-title"], [1, "fa-solid", "fa-lightbulb"], [1, "syntax-grid"], [1, "syntax-item"], [1, "placeholders-description"], [1, "category-tabs"], ["type", "button", 1, "category-tab", 3, "active"], [1, "placeholder-content"], [1, "usage-example"], [1, "usage-example-inner"], [1, "fa-solid", "fa-info-circle"], [1, "usage-example-text"], ["type", "button", 1, "category-tab", 3, "click"], [2, "font-size", "0.9em"], [1, "tab-badge"], [1, "category-header"], [1, "placeholder-grid"], [1, "placeholder-item"], [1, "placeholder-item-inner"], [1, "placeholder-name-row"], [1, "placeholder-code"], ["type", "button", "title", "Copy placeholder to clipboard", 1, "copy-btn", 3, "click"], [1, "fa-solid", "fa-copy"], [1, "placeholder-description"], [1, "fa-solid", "fa-file-plus"], ["type", "button", 1, "btn", "btn-primary"], ["type", "button", 1, "btn", "btn-primary", 3, "click"]], template: function TemplateEditorComponent_Template(rf, ctx) { if (rf & 1) {
1150
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.CodeEditor = _t.first);
1151
+ } }, inputs: { Template: "Template", template: "template", config: "config" }, outputs: { ContentChange: "ContentChange", contentChange: "contentChange", RunTemplate: "RunTemplate", runTemplate: "runTemplate" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [["codeEditor", ""], [1, "template-editor", 2, "height", "100%", "display", "flex", "flex-direction", "column"], [1, "content-versions-tabs"], [1, "content-editor-container"], [1, "no-content-state"], [1, "content-tabs"], [1, "content-version-tab", 3, "active"], [1, "content-version-tab", "adding-new"], ["title", "Add new template content", 1, "content-version-tab", "add-new"], [1, "content-version-tab", 3, "click"], [2, "flex", "1"], [1, "tab-label"], [1, "tab-meta"], ["type", "button", "title", "Delete this content version", 1, "delete-btn"], [1, "inactive-label"], ["type", "button", "title", "Delete this content version", 1, "delete-btn", 3, "click"], [1, "fa-solid", "fa-trash", "fa-xs"], [1, "fa-solid", "fa-plus", "text-success"], [1, "new-label"], ["title", "Add new template content", 1, "content-version-tab", "add-new", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "content-metadata-bar"], [1, "metadata-grid"], [1, "form-group"], ["for", "contentType", 1, "form-label"], [1, "fa-solid", "fa-tag"], ["name", "contentType", "TextField", "text", "ValueField", "value", 3, "ngModel", "Data", "ValuePrimitive"], [1, "form-control-plaintext"], ["for", "priority", 1, "form-label"], [1, "fa-solid", "fa-sort-numeric-up"], ["name", "priority", 3, "ngModel", "Min", "Step", "Format"], [1, "form-label"], [1, "fa-solid", "fa-toggle-on"], [1, "form-check"], [1, "content-text-editor"], [1, "editor-header"], ["for", "templateContent", 1, "editor-label"], [1, "fa-solid", "fa-code"], [1, "content-type-badge"], [1, "editor-actions"], [1, "unsaved-indicator"], ["type", "button", "title", "Test run this template", 1, "run-btn", 3, "disabled"], [1, "code-editor-wrapper", 3, "change", "readonly", "language", "languages"], [1, "template-help-section"], ["name", "contentType", "TextField", "text", "ValueField", "value", 3, "ngModelChange", "ValueChange", "ngModel", "Data", "ValuePrimitive"], ["name", "priority", 3, "ngModelChange", "ngModel", "Min", "Step", "Format"], ["type", "checkbox", "id", "isActive", "name", "isActive", 1, "form-check-input", 3, "ngModelChange", "ngModel"], ["for", "isActive", 1, "form-check-label"], [1, "badge-success"], [1, "badge-secondary"], [1, "fa-solid", "fa-check-circle"], [1, "fa-solid", "fa-pause-circle"], [1, "fa-solid", "fa-circle"], ["type", "button", "title", "Test run this template", 1, "run-btn", 3, "click", "disabled"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-play"], [1, "help-tabs"], ["type", "button", 1, "help-tab", 3, "click"], [1, "fa-solid", "fa-at"], [1, "help-content"], [1, "syntax-help"], [1, "placeholders-help"], [1, "section-title"], [1, "fa-solid", "fa-lightbulb"], [1, "syntax-grid"], [1, "syntax-item"], [1, "placeholders-description"], [1, "category-tabs"], ["type", "button", 1, "category-tab", 3, "active"], [1, "placeholder-content"], [1, "usage-example"], [1, "usage-example-inner"], [1, "fa-solid", "fa-info-circle"], [1, "usage-example-text"], ["type", "button", 1, "category-tab", 3, "click"], [2, "font-size", "0.9em"], [1, "tab-badge"], [1, "category-header"], [1, "placeholder-grid"], [1, "placeholder-item"], [1, "placeholder-item-inner"], [1, "placeholder-name-row"], [1, "placeholder-code"], ["type", "button", "title", "Copy placeholder to clipboard", 1, "copy-btn", 3, "click"], [1, "fa-solid", "fa-copy"], [1, "placeholder-description"], [1, "fa-solid", "fa-file-plus"], ["type", "button", 1, "btn", "btn-primary"], ["type", "button", 1, "btn", "btn-primary", 3, "click"]], template: function TemplateEditorComponent_Template(rf, ctx) { if (rf & 1) {
896
1152
  i0.ɵɵconditionalCreate(0, TemplateEditorComponent_Conditional_0_Template, 4, 2, "div", 1);
897
1153
  } if (rf & 2) {
898
1154
  i0.ɵɵconditional(ctx.template ? 0 : -1);
@@ -901,17 +1157,23 @@ export class TemplateEditorComponent extends BaseAngularComponent {
901
1157
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TemplateEditorComponent, [{
902
1158
  type: Component,
903
1159
  args: [{ standalone: false, selector: 'mj-template-editor', template: "@if (template) {\n <div class=\"template-editor\" style=\"height: 100%; display: flex; flex-direction: column;\">\n <!-- Content Versions List/Tabs -->\n @if (templateContents.length > 0) {\n <div class=\"content-versions-tabs\">\n <div class=\"content-tabs\">\n @for (content of templateContents; track content.ID || $index; let i = $index) {\n <div class=\"content-version-tab\"\n [class.active]=\"selectedContentIndex === i && !isAddingNewContent\"\n (click)=\"selectTemplateContent(i, false)\">\n <div style=\"flex: 1;\">\n <div class=\"tab-label\">\n {{ content.Type || 'Version ' + (i + 1) }}\n </div>\n <div class=\"tab-meta\">\n P:{{ content.Priority }}\n @if (!content.IsActive) {\n \u2022 <span class=\"inactive-label\">Inactive</span>\n }\n </div>\n </div>\n @if (templateContents.length > 1 && config.allowEdit) {\n <button type=\"button\"\n (click)=\"deleteTemplateContent(i); $event.stopPropagation()\"\n class=\"delete-btn\"\n title=\"Delete this content version\">\n <i class=\"fa-solid fa-trash fa-xs\"></i>\n </button>\n }\n </div>\n }\n @if (isAddingNewContent) {\n <div class=\"content-version-tab adding-new\">\n <i class=\"fa-solid fa-plus text-success\"></i>\n <span class=\"new-label\">New</span>\n </div>\n }\n <!-- Add New Content (Edit Mode Only) -->\n @if (config.allowEdit && !isAddingNewContent) {\n <div class=\"content-version-tab add-new\"\n (click)=\"addNewTemplateContent()\"\n title=\"Add new template content\">\n <i class=\"fa-solid fa-plus\"></i>\n <span>New</span>\n </div>\n }\n </div>\n </div>\n }\n <!-- Content Editor -->\n @if (currentTemplateContent) {\n <div class=\"content-editor-container\">\n <!-- Content Metadata Bar -->\n <div class=\"content-metadata-bar\">\n <div class=\"metadata-grid\">\n <div class=\"form-group\">\n <label for=\"contentType\" class=\"form-label\">\n <i class=\"fa-solid fa-tag\"></i> Content Type\n </label>\n @if (config.allowEdit) {\n <mj-dropdown [(ngModel)]=\"currentTemplateContent.TypeID\"\n name=\"contentType\"\n [Data]=\"getContentTypeOptionsForContent()\"\n TextField=\"text\"\n ValueField=\"value\"\n [ValuePrimitive]=\"true\"\n (ValueChange)=\"onContentTypeChange()\">\n </mj-dropdown>\n } @else {\n <div class=\"form-control-plaintext\">\n {{ getContentTypeDisplayText(currentTemplateContent.TypeID) }}\n </div>\n }\n </div>\n <div class=\"form-group\">\n <label for=\"priority\" class=\"form-label\">\n <i class=\"fa-solid fa-sort-numeric-up\"></i> Priority\n </label>\n @if (config.allowEdit) {\n <mj-numeric-input [(ngModel)]=\"currentTemplateContent.Priority\"\n name=\"priority\"\n [Min]=\"1\"\n [Step]=\"1\"\n [Format]=\"'n0'\">\n </mj-numeric-input>\n } @else {\n <div class=\"form-control-plaintext\">\n {{ currentTemplateContent.Priority || '-' }}\n </div>\n }\n </div>\n <div class=\"form-group\">\n <label class=\"form-label\">\n <i class=\"fa-solid fa-toggle-on\"></i> Status\n </label>\n @if (config.allowEdit) {\n <div class=\"form-check\">\n <input type=\"checkbox\"\n id=\"isActive\"\n class=\"form-check-input\"\n [(ngModel)]=\"currentTemplateContent.IsActive\"\n name=\"isActive\">\n <label class=\"form-check-label\" for=\"isActive\">\n Active\n </label>\n </div>\n } @else {\n <div class=\"form-control-plaintext\">\n @if (currentTemplateContent.IsActive) {\n <span class=\"badge-success\">\n <i class=\"fa-solid fa-check-circle\"></i> Active\n </span>\n } @else {\n <span class=\"badge-secondary\">\n <i class=\"fa-solid fa-pause-circle\"></i> Inactive\n </span>\n }\n </div>\n }\n </div>\n </div>\n </div>\n <!-- Content Text Editor -->\n <div class=\"content-text-editor\">\n <div class=\"editor-header\">\n <label for=\"templateContent\" class=\"editor-label\">\n <i class=\"fa-solid fa-code\"></i> Template Content\n <span class=\"content-type-badge\"\n [class.new]=\"!currentTemplateContent.ID\"\n [class.existing]=\"!!currentTemplateContent.ID\">\n @if (!currentTemplateContent.ID) {\n New\n } @else {\n {{ getContentTypeDisplayText(currentTemplateContent.TypeID) }}\n }\n </span>\n </label>\n <div class=\"editor-actions\">\n @if (!isAddingNewContent && hasUnsavedChanges) {\n <span class=\"unsaved-indicator\">\n <i class=\"fa-solid fa-circle\"></i>\n Unsaved changes\n </span>\n }\n @if (template.IsSaved && currentTemplateContent && config.showRunButton) {\n <button type=\"button\"\n class=\"run-btn\"\n [disabled]=\"isRunningTemplate\"\n (click)=\"onRunTemplate()\"\n title=\"Test run this template\">\n @if (isRunningTemplate) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n Running...\n } @else {\n <i class=\"fa-solid fa-play\"></i>\n Run\n }\n </button>\n }\n </div>\n </div>\n <mj-code-editor\n #codeEditor\n (change)=\"onTemplateTextChange($event)\"\n [readonly]=\"!config.allowEdit\"\n [language]=\"getEditorLanguage()\"\n [languages]=\"supportedLanguages\"\n class=\"code-editor-wrapper\">\n </mj-code-editor>\n <!-- Template Help Section with Tabs -->\n @if (!config.compactMode) {\n <div class=\"template-help-section\">\n <!-- Tab Navigation -->\n <div class=\"help-tabs\">\n <button type=\"button\"\n class=\"help-tab\"\n [class.active]=\"activeHelpTab === 'syntax'\"\n (click)=\"activeHelpTab = 'syntax'\">\n <i class=\"fa-solid fa-code\"></i> Template Syntax\n </button>\n <button type=\"button\"\n class=\"help-tab\"\n [class.active]=\"activeHelpTab === 'placeholders'\"\n (click)=\"activeHelpTab = 'placeholders'\">\n <i class=\"fa-solid fa-at\"></i> System Placeholders\n </button>\n </div>\n <!-- Tab Content -->\n <div class=\"help-content\">\n <!-- Template Syntax Tab -->\n @if (activeHelpTab === 'syntax') {\n <div class=\"syntax-help\">\n <div class=\"section-title\">\n <i class=\"fa-solid fa-lightbulb\"></i> Template Syntax Quick Reference\n </div>\n <div class=\"syntax-grid\">\n <div>\n <div class=\"syntax-item\">\n <strong>Parameters:</strong><br>\n <code>{{'{{'}} paramName {{'}}'}}</code>\n </div>\n <div>\n <strong>Template Includes:</strong><br>\n <code>{{'{% template \"TemplateName\" %}'}}</code>\n </div>\n </div>\n <div>\n <div class=\"syntax-item\">\n <strong>Conditionals:</strong><br>\n <code>{{'{% if condition %}'}} ... {{'{% endif %}'}}</code>\n </div>\n <div>\n <strong>Loops:</strong><br>\n <code>{{'{% for item in items %}'}} ... {{'{% endfor %}'}}</code>\n </div>\n </div>\n </div>\n </div>\n }\n <!-- System Placeholders Tab -->\n @if (activeHelpTab === 'placeholders') {\n <div class=\"placeholders-help\">\n <div class=\"section-title\">\n <i class=\"fa-solid fa-at\"></i> System Placeholders Reference\n </div>\n <p class=\"placeholders-description\">\n System placeholders are automatically available in all AI prompt templates. Simply use them in your template text and they will be replaced with their current values at execution time.\n </p>\n <!-- Category Sub-tabs -->\n <div class=\"category-tabs\">\n @for (categoryGroup of placeholderCategories; track categoryGroup.category.name) {\n <button type=\"button\"\n class=\"category-tab\"\n [class.active]=\"activePlaceholderCategory === categoryGroup.category.name\"\n (click)=\"activePlaceholderCategory = categoryGroup.category.name\">\n <i [class]=\"'fa-solid ' + categoryGroup.category.icon\" style=\"font-size: 0.9em;\"></i>\n {{ categoryGroup.category.name }}\n <span class=\"tab-badge\">\n {{ categoryGroup.placeholders.length }}\n </span>\n </button>\n }\n </div>\n <!-- Active Category Content -->\n <div class=\"placeholder-content\">\n @for (categoryGroup of placeholderCategories; track categoryGroup.category.name) {\n @if (activePlaceholderCategory === categoryGroup.category.name) {\n <div class=\"category-header\">\n <i [class]=\"'fa-solid ' + categoryGroup.category.icon\"\n [style.color]=\"categoryGroup.category.color\"></i>\n <h5>{{ categoryGroup.category.name }}</h5>\n </div>\n <div class=\"placeholder-grid\">\n @for (placeholder of categoryGroup.placeholders; track placeholder.name) {\n <div class=\"placeholder-item\">\n <div class=\"placeholder-item-inner\">\n <div>\n <div class=\"placeholder-name-row\">\n <code class=\"placeholder-code\">{{'{{'}} {{ placeholder.name }} {{'}}'}}</code>\n <button type=\"button\"\n class=\"copy-btn\"\n (click)=\"copyPlaceholder(placeholder.name)\"\n title=\"Copy placeholder to clipboard\">\n <i class=\"fa-solid fa-copy\"></i>\n </button>\n </div>\n @if (placeholder.description) {\n <div class=\"placeholder-description\">{{ placeholder.description }}</div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n }\n </div>\n <!-- Usage Example -->\n <div class=\"usage-example\">\n <div class=\"usage-example-inner\">\n <i class=\"fa-solid fa-info-circle\"></i>\n <div class=\"usage-example-text\">\n <strong>Usage Example:</strong> To use a system placeholder in your template, simply include it in double curly braces.\n For example: <code>\"Today is {{'{{'}} _CURRENT_DATE {{'}}'}} and the current user is {{'{{'}} _USER_NAME {{'}}'}}\"</code>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n } @else {\n <!-- No Content State -->\n <div class=\"no-content-state\">\n <i class=\"fa-solid fa-file-plus\"></i>\n <h5>No Template Content</h5>\n <p>Create your first template content version to get started.</p>\n @if (config.allowEdit) {\n <button type=\"button\"\n (click)=\"addNewTemplateContent()\"\n class=\"btn btn-primary\">\n <i class=\"fa-solid fa-plus\"></i> Create First Content Version\n </button>\n }\n </div>\n }\n </div>\n}\n", styles: [".template-editor {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n}\n\n.section-header h6 {\n font-size: 0.9em;\n}\n\n.param-row:hover {\n background-color: var(--mj-bg-surface-card) !important;\n}\n\n.content-item {\n transition: box-shadow 0.2s ease;\n}\n\n.content-item:hover {\n box-shadow: 0 2px 4px var(--mj-shadow-sm);\n}\n\n.loading-state {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n}\n\n.empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n}\n\n.badge {\n display: inline-block;\n font-size: 0.7em;\n line-height: 1;\n}\n\n/* Form control sizing */\n.template-editor .mj-input,\n.template-editor .mj-textarea,\n.template-editor mj-dropdown {\n width: 100%;\n}\n\n.template-editor [mjButton] {\n min-width: auto;\n}\n\n/* Content version tabs */\n.content-versions-tabs {\n margin-bottom: 16px;\n border-bottom: 2px solid var(--mj-border-default);\n padding-bottom: 8px;\n}\n\n.content-tabs {\n display: flex;\n gap: 6px;\n flex-wrap: wrap;\n}\n\n.content-version-tab {\n padding: 8px 12px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n cursor: pointer;\n background: var(--mj-bg-surface);\n display: flex;\n align-items: center;\n gap: 6px;\n transition: all 0.2s;\n position: relative;\n}\n\n.content-version-tab.active {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n}\n\n.content-version-tab .tab-label {\n font-weight: 600;\n font-size: 0.85em;\n color: var(--mj-text-secondary);\n}\n\n.content-version-tab .tab-meta {\n font-size: 0.7em;\n color: var(--mj-text-muted);\n}\n\n.content-version-tab .tab-meta .inactive-label {\n color: var(--mj-status-error);\n}\n\n.content-version-tab .delete-btn {\n background: none;\n border: none;\n color: var(--mj-status-error);\n padding: 4px;\n border-radius: 3px;\n transition: all 0.2s;\n cursor: pointer;\n}\n\n.content-version-tab .delete-btn:hover {\n background-color: var(--mj-status-error);\n color: var(--mj-text-inverse);\n}\n\n/* New content tab (adding state) */\n.content-version-tab.adding-new {\n border-color: var(--mj-status-success);\n background: color-mix(in srgb, var(--mj-status-success) 10%, var(--mj-bg-surface));\n}\n\n.content-version-tab.adding-new .new-label {\n font-weight: 600;\n color: var(--mj-status-success);\n font-size: 0.85em;\n}\n\n/* Add new content button */\n.content-version-tab.add-new {\n border: 1px dashed var(--mj-status-success);\n background: var(--mj-bg-surface-card);\n}\n\n.content-version-tab.add-new:hover {\n background: color-mix(in srgb, var(--mj-status-success) 8%, var(--mj-bg-surface));\n border-style: solid;\n}\n\n.content-version-tab.add-new i {\n color: var(--mj-status-success);\n font-size: 0.75em;\n}\n\n.content-version-tab.add-new span {\n font-weight: 500;\n color: var(--mj-status-success);\n font-size: 0.85em;\n}\n\n/* Content editor container */\n.content-editor-container {\n flex: 1;\n display: flex;\n flex-direction: column;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n overflow: hidden;\n}\n\n/* Content metadata bar */\n.content-metadata-bar {\n background: var(--mj-bg-surface-card);\n border-bottom: 1px solid var(--mj-border-default);\n padding: 16px 20px;\n}\n\n.metadata-grid {\n display: grid;\n grid-template-columns: 2fr 1fr 1fr auto;\n gap: 20px;\n align-items: end;\n}\n\n.form-group {\n margin: 0;\n}\n\n.form-label {\n margin-bottom: 4px;\n font-size: 0.9em;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.form-control-plaintext {\n font-size: 0.9em;\n padding: 4px 0;\n}\n\n.form-check {\n margin-top: 8px;\n}\n\n.form-check-label {\n font-size: 0.9em;\n}\n\n.badge-success {\n background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n color: var(--mj-status-success);\n border: 1px solid color-mix(in srgb, var(--mj-status-success) 30%, transparent);\n padding: 3px 8px;\n border-radius: 10px;\n font-size: 0.75em;\n font-weight: 600;\n}\n\n.badge-secondary {\n background: color-mix(in srgb, var(--mj-text-muted) 15%, var(--mj-bg-surface));\n color: var(--mj-text-muted);\n border: 1px solid color-mix(in srgb, var(--mj-text-muted) 30%, transparent);\n padding: 3px 8px;\n border-radius: 10px;\n font-size: 0.75em;\n font-weight: 600;\n}\n\n/* Content text editor area */\n.content-text-editor {\n flex: 1;\n padding: 20px;\n display: flex;\n flex-direction: column;\n}\n\n.editor-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 12px;\n}\n\n.editor-label {\n margin: 0;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.content-type-badge {\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 0.75em;\n color: var(--mj-text-inverse);\n}\n\n.content-type-badge.new {\n background: var(--mj-status-success);\n}\n\n.content-type-badge.existing {\n background: var(--mj-text-muted);\n}\n\n.editor-actions {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.unsaved-indicator {\n color: var(--mj-status-warning);\n font-size: 0.85em;\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.unsaved-indicator i {\n font-size: 0.5em;\n}\n\n.run-btn {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border: none;\n padding: 6px 12px;\n border-radius: 4px;\n font-size: 0.85em;\n display: flex;\n align-items: center;\n gap: 6px;\n transition: all 0.2s;\n cursor: pointer;\n}\n\n.run-btn:hover {\n background: var(--mj-brand-primary-hover);\n}\n\n/* Code editor border */\n.code-editor-wrapper {\n flex: 1;\n height: 350px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 4px;\n}\n\n/* Help section tabs */\n.template-help-section {\n margin-top: 16px;\n}\n\n.help-tabs {\n display: flex;\n border-bottom: 2px solid var(--mj-border-default);\n margin-bottom: 0;\n}\n\n.help-tab {\n padding: 8px 16px;\n border: none;\n background: none;\n cursor: pointer;\n font-size: 0.9em;\n font-weight: 600;\n color: var(--mj-text-muted);\n border-bottom: 3px solid transparent;\n transition: all 0.2s;\n}\n\n.help-tab.active {\n color: var(--mj-status-success);\n border-bottom-color: var(--mj-status-success);\n}\n\n/* Help content area */\n.help-content {\n padding: 16px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-top: none;\n border-radius: 0 0 4px 4px;\n}\n\n/* Syntax help */\n.syntax-help {\n font-size: 0.85em;\n}\n\n.syntax-help .section-title {\n font-weight: 600;\n margin-bottom: 12px;\n color: var(--mj-status-success);\n}\n\n.syntax-grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 16px;\n}\n\n.syntax-item {\n margin-bottom: 8px;\n}\n\n.syntax-help code {\n background: var(--mj-bg-surface);\n padding: 4px 6px;\n border-radius: 3px;\n display: inline-block;\n margin-top: 4px;\n color: var(--mj-text-primary);\n}\n\n/* Placeholders help */\n.placeholders-help {\n font-size: 0.85em;\n}\n\n.placeholders-help .section-title {\n font-weight: 600;\n margin-bottom: 12px;\n color: var(--mj-status-success);\n}\n\n.placeholders-description {\n margin-bottom: 16px;\n color: var(--mj-text-secondary);\n line-height: 1.5;\n}\n\n/* Category tabs */\n.category-tabs {\n display: flex;\n gap: 8px;\n margin-bottom: 16px;\n flex-wrap: wrap;\n}\n\n.category-tab {\n padding: 6px 14px;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n border-radius: 20px;\n cursor: pointer;\n font-size: 0.85em;\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 6px;\n transition: all 0.2s;\n color: var(--mj-text-muted);\n}\n\n.category-tab.active {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.category-tab .tab-badge {\n background: color-mix(in srgb, var(--mj-text-primary) 10%, transparent);\n color: inherit;\n padding: 2px 6px;\n border-radius: 10px;\n font-size: 0.75em;\n margin-left: 4px;\n}\n\n/* Placeholder content area */\n.placeholder-content {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n padding: 16px;\n}\n\n.category-header {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 16px;\n}\n\n.category-header i {\n font-size: 1.2em;\n}\n\n.category-header h5 {\n margin: 0;\n color: var(--mj-text-primary);\n font-weight: 600;\n}\n\n.placeholder-grid {\n display: grid;\n gap: 10px;\n}\n\n/* Placeholder item */\n.placeholder-item {\n padding: 12px 16px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n position: relative;\n transition: all 0.2s;\n max-width: 800px;\n}\n\n.placeholder-item:hover {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 5%, var(--mj-bg-surface));\n}\n\n.placeholder-item:hover .copy-btn {\n opacity: 1 !important;\n}\n\n.placeholder-item-inner {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n}\n\n.placeholder-name-row {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n}\n\n.placeholder-code {\n color: var(--mj-status-error);\n font-weight: 600;\n font-size: 0.95em;\n}\n\n.copy-btn {\n opacity: 0;\n transition: opacity 0.2s;\n background: none;\n border: none;\n padding: 4px 8px;\n cursor: pointer;\n color: var(--mj-brand-primary);\n border-radius: 4px;\n display: inline-flex;\n align-items: center;\n}\n\n.copy-btn:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n}\n\n.copy-btn i {\n font-size: 0.85em;\n}\n\n.placeholder-description {\n color: var(--mj-text-muted);\n margin-top: 4px;\n line-height: 1.4;\n}\n\n/* Usage example box */\n.usage-example {\n margin-top: 20px;\n padding: 12px;\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface));\n border-radius: 6px;\n border: 1px solid color-mix(in srgb, var(--mj-brand-primary) 20%, var(--mj-bg-surface));\n}\n\n.usage-example-inner {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n}\n\n.usage-example i {\n color: var(--mj-brand-primary);\n margin-top: 2px;\n}\n\n.usage-example-text {\n flex: 1;\n font-size: 0.85em;\n color: var(--mj-brand-primary);\n line-height: 1.5;\n}\n\n.usage-example code {\n background: var(--mj-bg-surface);\n padding: 2px 4px;\n border-radius: 3px;\n}\n\n/* No content state */\n.no-content-state {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background: var(--mj-bg-surface-card);\n border: 2px dashed var(--mj-border-default);\n border-radius: 8px;\n padding: 40px;\n text-align: center;\n}\n\n.no-content-state i {\n font-size: 48px;\n margin-bottom: 16px;\n color: var(--mj-text-muted);\n opacity: 0.6;\n}\n\n.no-content-state h5 {\n color: var(--mj-text-secondary);\n margin-bottom: 8px;\n}\n\n.no-content-state p {\n color: var(--mj-text-muted);\n margin-bottom: 20px;\n}\n"] }]
904
- }], () => [{ type: i1.MJNotificationService }, { type: i2.MJConfirmService }], { template: [{
1160
+ }], () => [{ type: i1.MJNotificationService }, { type: i2.MJConfirmService }], { Template: [{
1161
+ type: Input
1162
+ }], template: [{
905
1163
  type: Input
906
1164
  }], config: [{
907
1165
  type: Input
1166
+ }], ContentChange: [{
1167
+ type: Output
908
1168
  }], contentChange: [{
909
1169
  type: Output
1170
+ }], RunTemplate: [{
1171
+ type: Output
910
1172
  }], runTemplate: [{
911
1173
  type: Output
912
- }], codeEditor: [{
1174
+ }], CodeEditor: [{
913
1175
  type: ViewChild,
914
1176
  args: ['codeEditor']
915
1177
  }] }); })();
916
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TemplateEditorComponent, { className: "TemplateEditorComponent", filePath: "src/lib/shared/components/template-editor.component.ts", lineNumber: 26 }); })();
1178
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TemplateEditorComponent, { className: "TemplateEditorComponent", filePath: "src/lib/shared/components/template-editor.component.ts", lineNumber: 29 }); })();
917
1179
  //# sourceMappingURL=template-editor.component.js.map