@memberjunction/ng-core-entity-forms 6.2.0-edge.5 → 6.2.0-edge.7

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 (228) hide show
  1. package/dist/lib/custom/AIAgentSessions/ai-agent-session-form.component.d.ts +2 -0
  2. package/dist/lib/custom/AIAgentSessions/ai-agent-session-form.component.d.ts.map +1 -1
  3. package/dist/lib/custom/AIAgentSessions/ai-agent-session-form.component.js +103 -95
  4. package/dist/lib/custom/AIAgentSessions/ai-agent-session-form.component.js.map +1 -1
  5. package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts +6 -0
  6. package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts.map +1 -1
  7. package/dist/lib/custom/AIAgents/ai-agent-form.component.js +7 -1
  8. package/dist/lib/custom/AIAgents/ai-agent-form.component.js.map +1 -1
  9. package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.d.ts +2 -0
  10. package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.d.ts.map +1 -1
  11. package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js +4 -2
  12. package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js.map +1 -1
  13. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts +2 -0
  14. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts.map +1 -1
  15. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js +21 -1
  16. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js.map +1 -1
  17. package/dist/lib/custom/Actions/action-form.component.d.ts +2 -0
  18. package/dist/lib/custom/Actions/action-form.component.d.ts.map +1 -1
  19. package/dist/lib/custom/Actions/action-form.component.js +29 -11
  20. package/dist/lib/custom/Actions/action-form.component.js.map +1 -1
  21. package/dist/lib/custom/Conversations/conversation-overview.panel.js +1 -1
  22. package/dist/lib/custom/Conversations/conversation-overview.panel.js.map +1 -1
  23. package/dist/lib/custom/Entities/entity-form.component.js +3 -3
  24. package/dist/lib/custom/Entities/entity-form.component.js.map +1 -1
  25. package/dist/lib/custom/EntityActions/entityaction.form.component.d.ts +2 -0
  26. package/dist/lib/custom/EntityActions/entityaction.form.component.d.ts.map +1 -1
  27. package/dist/lib/custom/EntityActions/entityaction.form.component.js +2 -0
  28. package/dist/lib/custom/EntityActions/entityaction.form.component.js.map +1 -1
  29. package/dist/lib/custom/Files/file-form.component.d.ts +8 -0
  30. package/dist/lib/custom/Files/file-form.component.d.ts.map +1 -1
  31. package/dist/lib/custom/Files/file-form.component.js +21 -5
  32. package/dist/lib/custom/Files/file-form.component.js.map +1 -1
  33. package/dist/lib/custom/Files/file-form.logic.d.ts +7 -0
  34. package/dist/lib/custom/Files/file-form.logic.d.ts.map +1 -1
  35. package/dist/lib/custom/Files/file-form.logic.js +20 -0
  36. package/dist/lib/custom/Files/file-form.logic.js.map +1 -1
  37. package/dist/lib/custom/Lists/list-form.component.js +5 -5
  38. package/dist/lib/custom/Lists/list-form.component.js.map +1 -1
  39. package/dist/lib/custom/MLModels/ml-model-view-models.d.ts +11 -4
  40. package/dist/lib/custom/MLModels/ml-model-view-models.d.ts.map +1 -1
  41. package/dist/lib/custom/MLModels/ml-model-view-models.js +14 -0
  42. package/dist/lib/custom/MLModels/ml-model-view-models.js.map +1 -1
  43. package/dist/lib/custom/MLModels/ps-model-detail.component.d.ts +15 -0
  44. package/dist/lib/custom/MLModels/ps-model-detail.component.d.ts.map +1 -1
  45. package/dist/lib/custom/MLModels/ps-model-detail.component.js +186 -92
  46. package/dist/lib/custom/MLModels/ps-model-detail.component.js.map +1 -1
  47. package/dist/lib/custom/Queries/query-child-labels.d.ts +12 -0
  48. package/dist/lib/custom/Queries/query-child-labels.d.ts.map +1 -0
  49. package/dist/lib/custom/Queries/query-child-labels.js +28 -0
  50. package/dist/lib/custom/Queries/query-child-labels.js.map +1 -0
  51. package/dist/lib/custom/Queries/query-fields-grid.component.d.ts +37 -0
  52. package/dist/lib/custom/Queries/query-fields-grid.component.d.ts.map +1 -0
  53. package/dist/lib/custom/Queries/query-fields-grid.component.js +321 -0
  54. package/dist/lib/custom/Queries/query-fields-grid.component.js.map +1 -0
  55. package/dist/lib/custom/Queries/query-form-logic.d.ts +37 -0
  56. package/dist/lib/custom/Queries/query-form-logic.d.ts.map +1 -0
  57. package/dist/lib/custom/Queries/query-form-logic.js +48 -0
  58. package/dist/lib/custom/Queries/query-form-logic.js.map +1 -0
  59. package/dist/lib/custom/Queries/query-form.component.d.ts +78 -7
  60. package/dist/lib/custom/Queries/query-form.component.d.ts.map +1 -1
  61. package/dist/lib/custom/Queries/query-form.component.js +742 -688
  62. package/dist/lib/custom/Queries/query-form.component.js.map +1 -1
  63. package/dist/lib/custom/Queries/query-parameters-grid.component.d.ts +31 -0
  64. package/dist/lib/custom/Queries/query-parameters-grid.component.d.ts.map +1 -0
  65. package/dist/lib/custom/Queries/query-parameters-grid.component.js +298 -0
  66. package/dist/lib/custom/Queries/query-parameters-grid.component.js.map +1 -0
  67. package/dist/lib/custom/Rubrics/record-forms.component.js +2 -2
  68. package/dist/lib/custom/Rubrics/record-forms.component.js.map +1 -1
  69. package/dist/lib/custom/Rubrics/scale-form.component.d.ts.map +1 -1
  70. package/dist/lib/custom/Rubrics/scale-form.component.js +2 -1
  71. package/dist/lib/custom/Rubrics/scale-form.component.js.map +1 -1
  72. package/dist/lib/custom/SearchScopes/searchscope-form.component.js +1 -1
  73. package/dist/lib/custom/SearchScopes/searchscope-form.component.js.map +1 -1
  74. package/dist/lib/custom/Templates/templates-form.component.d.ts +19 -1
  75. package/dist/lib/custom/Templates/templates-form.component.d.ts.map +1 -1
  76. package/dist/lib/custom/Templates/templates-form.component.js +20 -27
  77. package/dist/lib/custom/Templates/templates-form.component.js.map +1 -1
  78. package/dist/lib/custom/Tests/entity-link-pill.component.d.ts.map +1 -1
  79. package/dist/lib/custom/Tests/entity-link-pill.component.js +14 -6
  80. package/dist/lib/custom/Tests/entity-link-pill.component.js.map +1 -1
  81. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.d.ts.map +1 -1
  82. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js +121 -111
  83. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js.map +1 -1
  84. package/dist/lib/custom/custom-forms.module.d.ts +41 -35
  85. package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
  86. package/dist/lib/custom/custom-forms.module.js +32 -3
  87. package/dist/lib/custom/custom-forms.module.js.map +1 -1
  88. package/dist/lib/generated/Entities/MJAIAgent/mjaiagent.form.component.d.ts.map +1 -1
  89. package/dist/lib/generated/Entities/MJAIAgent/mjaiagent.form.component.js +234 -226
  90. package/dist/lib/generated/Entities/MJAIAgent/mjaiagent.form.component.js.map +1 -1
  91. package/dist/lib/generated/Entities/MJAIAgentConfiguration/mjaiagentconfiguration.form.component.d.ts.map +1 -1
  92. package/dist/lib/generated/Entities/MJAIAgentConfiguration/mjaiagentconfiguration.form.component.js +25 -6
  93. package/dist/lib/generated/Entities/MJAIAgentConfiguration/mjaiagentconfiguration.form.component.js.map +1 -1
  94. package/dist/lib/generated/Entities/MJAIAgentRelationship/mjaiagentrelationship.form.component.d.ts.map +1 -1
  95. package/dist/lib/generated/Entities/MJAIAgentRelationship/mjaiagentrelationship.form.component.js +13 -3
  96. package/dist/lib/generated/Entities/MJAIAgentRelationship/mjaiagentrelationship.form.component.js.map +1 -1
  97. package/dist/lib/generated/Entities/MJAIAgentRun/mjaiagentrun.form.component.js +105 -103
  98. package/dist/lib/generated/Entities/MJAIAgentRun/mjaiagentrun.form.component.js.map +1 -1
  99. package/dist/lib/generated/Entities/MJAIAgentSession/mjaiagentsession.form.component.js +2 -2
  100. package/dist/lib/generated/Entities/MJAIAgentSession/mjaiagentsession.form.component.js.map +1 -1
  101. package/dist/lib/generated/Entities/MJBrandKit/mjbrandkit.form.component.d.ts +10 -0
  102. package/dist/lib/generated/Entities/MJBrandKit/mjbrandkit.form.component.d.ts.map +1 -0
  103. package/dist/lib/generated/Entities/MJBrandKit/mjbrandkit.form.component.js +91 -0
  104. package/dist/lib/generated/Entities/MJBrandKit/mjbrandkit.form.component.js.map +1 -0
  105. package/dist/lib/generated/Entities/MJBrandKitAsset/mjbrandkitasset.form.component.d.ts +10 -0
  106. package/dist/lib/generated/Entities/MJBrandKitAsset/mjbrandkitasset.form.component.d.ts.map +1 -0
  107. package/dist/lib/generated/Entities/MJBrandKitAsset/mjbrandkitasset.form.component.js +72 -0
  108. package/dist/lib/generated/Entities/MJBrandKitAsset/mjbrandkitasset.form.component.js.map +1 -0
  109. package/dist/lib/generated/Entities/MJCalendarEventLink/mjcalendareventlink.form.component.d.ts +10 -0
  110. package/dist/lib/generated/Entities/MJCalendarEventLink/mjcalendareventlink.form.component.d.ts.map +1 -0
  111. package/dist/lib/generated/Entities/MJCalendarEventLink/mjcalendareventlink.form.component.js +74 -0
  112. package/dist/lib/generated/Entities/MJCalendarEventLink/mjcalendareventlink.form.component.js.map +1 -0
  113. package/dist/lib/generated/Entities/MJCalendarSyncState/mjcalendarsyncstate.form.component.d.ts +10 -0
  114. package/dist/lib/generated/Entities/MJCalendarSyncState/mjcalendarsyncstate.form.component.d.ts.map +1 -0
  115. package/dist/lib/generated/Entities/MJCalendarSyncState/mjcalendarsyncstate.form.component.js +64 -0
  116. package/dist/lib/generated/Entities/MJCalendarSyncState/mjcalendarsyncstate.form.component.js.map +1 -0
  117. package/dist/lib/generated/Entities/MJCommunicationProvider/mjcommunicationprovider.form.component.d.ts.map +1 -1
  118. package/dist/lib/generated/Entities/MJCommunicationProvider/mjcommunicationprovider.form.component.js +62 -16
  119. package/dist/lib/generated/Entities/MJCommunicationProvider/mjcommunicationprovider.form.component.js.map +1 -1
  120. package/dist/lib/generated/Entities/MJCompany/mjcompany.form.component.d.ts.map +1 -1
  121. package/dist/lib/generated/Entities/MJCompany/mjcompany.form.component.js +46 -10
  122. package/dist/lib/generated/Entities/MJCompany/mjcompany.form.component.js.map +1 -1
  123. package/dist/lib/generated/Entities/MJCompanyIntegration/mjcompanyintegration.form.component.d.ts.map +1 -1
  124. package/dist/lib/generated/Entities/MJCompanyIntegration/mjcompanyintegration.form.component.js +28 -10
  125. package/dist/lib/generated/Entities/MJCompanyIntegration/mjcompanyintegration.form.component.js.map +1 -1
  126. package/dist/lib/generated/Entities/MJCompanyIntegrationObject/mjcompanyintegrationobject.form.component.d.ts +10 -0
  127. package/dist/lib/generated/Entities/MJCompanyIntegrationObject/mjcompanyintegrationobject.form.component.d.ts.map +1 -0
  128. package/dist/lib/generated/Entities/MJCompanyIntegrationObject/mjcompanyintegrationobject.form.component.js +189 -0
  129. package/dist/lib/generated/Entities/MJCompanyIntegrationObject/mjcompanyintegrationobject.form.component.js.map +1 -0
  130. package/dist/lib/generated/Entities/MJCompanyIntegrationObjectField/mjcompanyintegrationobjectfield.form.component.d.ts +10 -0
  131. package/dist/lib/generated/Entities/MJCompanyIntegrationObjectField/mjcompanyintegrationobjectfield.form.component.d.ts.map +1 -0
  132. package/dist/lib/generated/Entities/MJCompanyIntegrationObjectField/mjcompanyintegrationobjectfield.form.component.js +116 -0
  133. package/dist/lib/generated/Entities/MJCompanyIntegrationObjectField/mjcompanyintegrationobjectfield.form.component.js.map +1 -0
  134. package/dist/lib/generated/Entities/MJComponent/mjcomponent.form.component.d.ts.map +1 -1
  135. package/dist/lib/generated/Entities/MJComponent/mjcomponent.form.component.js +51 -35
  136. package/dist/lib/generated/Entities/MJComponent/mjcomponent.form.component.js.map +1 -1
  137. package/dist/lib/generated/Entities/MJContentFileType/mjcontentfiletype.form.component.d.ts.map +1 -1
  138. package/dist/lib/generated/Entities/MJContentFileType/mjcontentfiletype.form.component.js +36 -18
  139. package/dist/lib/generated/Entities/MJContentFileType/mjcontentfiletype.form.component.js.map +1 -1
  140. package/dist/lib/generated/Entities/MJContentItem/mjcontentitem.form.component.d.ts.map +1 -1
  141. package/dist/lib/generated/Entities/MJContentItem/mjcontentitem.form.component.js +74 -60
  142. package/dist/lib/generated/Entities/MJContentItem/mjcontentitem.form.component.js.map +1 -1
  143. package/dist/lib/generated/Entities/MJContentItemChunk/mjcontentitemchunk.form.component.d.ts.map +1 -1
  144. package/dist/lib/generated/Entities/MJContentItemChunk/mjcontentitemchunk.form.component.js +30 -32
  145. package/dist/lib/generated/Entities/MJContentItemChunk/mjcontentitemchunk.form.component.js.map +1 -1
  146. package/dist/lib/generated/Entities/MJContentSource/mjcontentsource.form.component.js +43 -35
  147. package/dist/lib/generated/Entities/MJContentSource/mjcontentsource.form.component.js.map +1 -1
  148. package/dist/lib/generated/Entities/MJContentType/mjcontenttype.form.component.js +21 -19
  149. package/dist/lib/generated/Entities/MJContentType/mjcontenttype.form.component.js.map +1 -1
  150. package/dist/lib/generated/Entities/MJDashboard/mjdashboard.form.component.d.ts.map +1 -1
  151. package/dist/lib/generated/Entities/MJDashboard/mjdashboard.form.component.js +45 -29
  152. package/dist/lib/generated/Entities/MJDashboard/mjdashboard.form.component.js.map +1 -1
  153. package/dist/lib/generated/Entities/MJDuplicateRun/mjduplicaterun.form.component.js +19 -17
  154. package/dist/lib/generated/Entities/MJDuplicateRun/mjduplicaterun.form.component.js.map +1 -1
  155. package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.d.ts.map +1 -1
  156. package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.js +485 -441
  157. package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.js.map +1 -1
  158. package/dist/lib/generated/Entities/MJEntityAlternateBaseView/mjentityalternatebaseview.form.component.d.ts +10 -0
  159. package/dist/lib/generated/Entities/MJEntityAlternateBaseView/mjentityalternatebaseview.form.component.d.ts.map +1 -0
  160. package/dist/lib/generated/Entities/MJEntityAlternateBaseView/mjentityalternatebaseview.form.component.js +129 -0
  161. package/dist/lib/generated/Entities/MJEntityAlternateBaseView/mjentityalternatebaseview.form.component.js.map +1 -0
  162. package/dist/lib/generated/Entities/MJEntityDocument/mjentitydocument.form.component.d.ts.map +1 -1
  163. package/dist/lib/generated/Entities/MJEntityDocument/mjentitydocument.form.component.js +27 -9
  164. package/dist/lib/generated/Entities/MJEntityDocument/mjentitydocument.form.component.js.map +1 -1
  165. package/dist/lib/generated/Entities/MJEntityField/mjentityfield.form.component.d.ts.map +1 -1
  166. package/dist/lib/generated/Entities/MJEntityField/mjentityfield.form.component.js +24 -6
  167. package/dist/lib/generated/Entities/MJEntityField/mjentityfield.form.component.js.map +1 -1
  168. package/dist/lib/generated/Entities/MJFile/mjfile.form.component.d.ts.map +1 -1
  169. package/dist/lib/generated/Entities/MJFile/mjfile.form.component.js +48 -12
  170. package/dist/lib/generated/Entities/MJFile/mjfile.form.component.js.map +1 -1
  171. package/dist/lib/generated/Entities/MJIntegration/mjintegration.form.component.d.ts.map +1 -1
  172. package/dist/lib/generated/Entities/MJIntegration/mjintegration.form.component.js +26 -8
  173. package/dist/lib/generated/Entities/MJIntegration/mjintegration.form.component.js.map +1 -1
  174. package/dist/lib/generated/Entities/MJIntegrationObject/mjintegrationobject.form.component.d.ts.map +1 -1
  175. package/dist/lib/generated/Entities/MJIntegrationObject/mjintegrationobject.form.component.js +24 -6
  176. package/dist/lib/generated/Entities/MJIntegrationObject/mjintegrationobject.form.component.js.map +1 -1
  177. package/dist/lib/generated/Entities/MJIntegrationObjectField/mjintegrationobjectfield.form.component.d.ts.map +1 -1
  178. package/dist/lib/generated/Entities/MJIntegrationObjectField/mjintegrationobjectfield.form.component.js +25 -6
  179. package/dist/lib/generated/Entities/MJIntegrationObjectField/mjintegrationobjectfield.form.component.js.map +1 -1
  180. package/dist/lib/generated/Entities/MJQuery/mjquery.form.component.d.ts.map +1 -1
  181. package/dist/lib/generated/Entities/MJQuery/mjquery.form.component.js +77 -57
  182. package/dist/lib/generated/Entities/MJQuery/mjquery.form.component.js.map +1 -1
  183. package/dist/lib/generated/Entities/MJQueryEntity/mjqueryentity.form.component.js +10 -8
  184. package/dist/lib/generated/Entities/MJQueryEntity/mjqueryentity.form.component.js.map +1 -1
  185. package/dist/lib/generated/Entities/MJQueryField/mjqueryfield.form.component.d.ts.map +1 -1
  186. package/dist/lib/generated/Entities/MJQueryField/mjqueryfield.form.component.js +15 -3
  187. package/dist/lib/generated/Entities/MJQueryField/mjqueryfield.form.component.js.map +1 -1
  188. package/dist/lib/generated/Entities/MJQueryParameter/mjqueryparameter.form.component.d.ts.map +1 -1
  189. package/dist/lib/generated/Entities/MJQueryParameter/mjqueryparameter.form.component.js +12 -4
  190. package/dist/lib/generated/Entities/MJQueryParameter/mjqueryparameter.form.component.js.map +1 -1
  191. package/dist/lib/generated/Entities/MJUser/mjuser.form.component.d.ts.map +1 -1
  192. package/dist/lib/generated/Entities/MJUser/mjuser.form.component.js +209 -137
  193. package/dist/lib/generated/Entities/MJUser/mjuser.form.component.js.map +1 -1
  194. package/dist/lib/generated/Entities/MJUserView/mjuserview.form.component.js +50 -38
  195. package/dist/lib/generated/Entities/MJUserView/mjuserview.form.component.js.map +1 -1
  196. package/dist/lib/generated/Entities/MJVideoArchetype/mjvideoarchetype.form.component.d.ts +10 -0
  197. package/dist/lib/generated/Entities/MJVideoArchetype/mjvideoarchetype.form.component.d.ts.map +1 -0
  198. package/dist/lib/generated/Entities/MJVideoArchetype/mjvideoarchetype.form.component.js +80 -0
  199. package/dist/lib/generated/Entities/MJVideoArchetype/mjvideoarchetype.form.component.js.map +1 -0
  200. package/dist/lib/generated/generated-forms.module.d.ts +449 -441
  201. package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
  202. package/dist/lib/generated/generated-forms.module.js +26 -2
  203. package/dist/lib/generated/generated-forms.module.js.map +1 -1
  204. package/dist/lib/panels/brand-kits/brand-kit-assets.panel.d.ts +15 -0
  205. package/dist/lib/panels/brand-kits/brand-kit-assets.panel.d.ts.map +1 -0
  206. package/dist/lib/panels/brand-kits/brand-kit-assets.panel.js +52 -0
  207. package/dist/lib/panels/brand-kits/brand-kit-assets.panel.js.map +1 -0
  208. package/dist/lib/panels/brand-kits/brand-kit-generation-policy.panel.d.ts +15 -0
  209. package/dist/lib/panels/brand-kits/brand-kit-generation-policy.panel.d.ts.map +1 -0
  210. package/dist/lib/panels/brand-kits/brand-kit-generation-policy.panel.js +52 -0
  211. package/dist/lib/panels/brand-kits/brand-kit-generation-policy.panel.js.map +1 -0
  212. package/dist/lib/panels/model-predictions/model-prediction.logic.d.ts +10 -0
  213. package/dist/lib/panels/model-predictions/model-prediction.logic.d.ts.map +1 -1
  214. package/dist/lib/panels/model-predictions/model-prediction.logic.js +15 -1
  215. package/dist/lib/panels/model-predictions/model-prediction.logic.js.map +1 -1
  216. package/dist/lib/panels/model-predictions/model-prediction.panel.d.ts +4 -0
  217. package/dist/lib/panels/model-predictions/model-prediction.panel.d.ts.map +1 -1
  218. package/dist/lib/panels/model-predictions/model-prediction.panel.js +77 -61
  219. package/dist/lib/panels/model-predictions/model-prediction.panel.js.map +1 -1
  220. package/dist/lib/shared/components/template-editor.component.d.ts +37 -0
  221. package/dist/lib/shared/components/template-editor.component.d.ts.map +1 -1
  222. package/dist/lib/shared/components/template-editor.component.js +424 -285
  223. package/dist/lib/shared/components/template-editor.component.js.map +1 -1
  224. package/dist/public-api.d.ts +2 -0
  225. package/dist/public-api.d.ts.map +1 -1
  226. package/dist/public-api.js +3 -0
  227. package/dist/public-api.js.map +1 -1
  228. package/package.json +50 -48
@@ -5,12 +5,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { Component, ViewChild, inject } from '@angular/core';
8
- import { QueryEngine } from '@memberjunction/core-entities';
8
+ import { QueryEngine, ParseQueryDiagnostics } from '@memberjunction/core-entities';
9
9
  import { RegisterClass, UUIDsEqual } from '@memberjunction/global';
10
10
  import { BaseFormComponent, CUSTOM_LAYOUT_TOOLBAR_CONFIG, MJFormPresenterService } from '@memberjunction/ng-base-forms';
11
11
  import { MJQueryFormComponent } from '../../generated/Entities/MJQuery/mjquery.form.component';
12
12
  import { RUN_QUERY_SQL_FILTERS, CompositeKey } from '@memberjunction/core';
13
13
  import { MJNotificationService } from '@memberjunction/ng-notifications';
14
+ import { EditorMarkersFor, ExtractionSeverityOf, HideUnreadableFieldRows, SaveRefusalOf } from './query-form-logic';
14
15
  import { NavigationService } from '@memberjunction/ng-shared';
15
16
  import { MJConfirmService } from '@memberjunction/ng-ui-components';
16
17
  import { Subject } from 'rxjs';
@@ -20,24 +21,27 @@ import * as i2 from "@angular/forms";
20
21
  import * as i3 from "@memberjunction/ng-ui-components";
21
22
  import * as i4 from "@memberjunction/ng-base-forms";
22
23
  import * as i5 from "@memberjunction/ng-code-editor";
23
- import * as i6 from "@memberjunction/ng-shared-generic";
24
- import * as i7 from "@memberjunction/ng-markdown";
25
- import * as i8 from "@memberjunction/ng-trees";
26
- import * as i9 from "./query-run-dialog.component";
24
+ import * as i6 from "./query-fields-grid.component";
25
+ import * as i7 from "./query-parameters-grid.component";
26
+ import * as i8 from "@memberjunction/ng-query-viewer";
27
+ import * as i9 from "@memberjunction/ng-shared-generic";
28
+ import * as i10 from "@memberjunction/ng-markdown";
29
+ import * as i11 from "@memberjunction/ng-trees";
30
+ import * as i12 from "./query-run-dialog.component";
27
31
  const _c0 = ["sqlEditor"];
28
32
  const _forTrack0 = ($index, $item) => $item.name;
29
- const _forTrack1 = ($index, $item) => $item.ID || $index;
30
- const _forTrack2 = ($index, $item) => $item.ID;
33
+ const _forTrack1 = ($index, $item) => $item.ID;
34
+ const _forTrack2 = ($index, $item) => $item.ID || $index;
31
35
  function MJQueryFormComponentExtended_Conditional_0_Conditional_3_Template(rf, ctx) { if (rf & 1) {
32
36
  i0.ɵɵelementStart(0, "div", 4);
33
- i0.ɵɵelement(1, "i", 47);
37
+ i0.ɵɵelement(1, "i", 50);
34
38
  i0.ɵɵelementStart(2, "span");
35
39
  i0.ɵɵtext(3, "Saving...");
36
40
  i0.ɵɵelementEnd()();
37
41
  } }
38
42
  function MJQueryFormComponentExtended_Conditional_0_Conditional_9_Template(rf, ctx) { if (rf & 1) {
39
43
  const _r3 = i0.ɵɵgetCurrentView();
40
- i0.ɵɵelementStart(0, "input", 48);
44
+ i0.ɵɵelementStart(0, "input", 51);
41
45
  i0.ɵɵtwoWayListener("ngModelChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_9_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.record.Name, $event) || (ctx_r1.record.Name = $event); return i0.ɵɵresetView($event); });
42
46
  i0.ɵɵelementEnd();
43
47
  } if (rf & 2) {
@@ -55,9 +59,9 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_10_Template(rf,
55
59
  } }
56
60
  function MJQueryFormComponentExtended_Conditional_0_Conditional_12_Template(rf, ctx) { if (rf & 1) {
57
61
  const _r4 = i0.ɵɵgetCurrentView();
58
- i0.ɵɵelementStart(0, "button", 49);
62
+ i0.ɵɵelementStart(0, "button", 52);
59
63
  i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_12_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.runQuery()); });
60
- i0.ɵɵelement(1, "i", 50);
64
+ i0.ɵɵelement(1, "i", 53);
61
65
  i0.ɵɵtext(2, " Run ");
62
66
  i0.ɵɵelementEnd();
63
67
  } if (rf & 2) {
@@ -66,21 +70,21 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_12_Template(rf,
66
70
  } }
67
71
  function MJQueryFormComponentExtended_Conditional_0_Conditional_17_Conditional_4_Template(rf, ctx) { if (rf & 1) {
68
72
  const _r6 = i0.ɵɵgetCurrentView();
69
- i0.ɵɵelementStart(0, "button", 55);
73
+ i0.ɵɵelementStart(0, "button", 58);
70
74
  i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_17_Conditional_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.editSelectedCategory()); });
71
- i0.ɵɵelement(1, "i", 56);
75
+ i0.ɵɵelement(1, "i", 59);
72
76
  i0.ɵɵelementEnd();
73
77
  } }
74
78
  function MJQueryFormComponentExtended_Conditional_0_Conditional_17_Template(rf, ctx) { if (rf & 1) {
75
79
  const _r5 = i0.ɵɵgetCurrentView();
76
- i0.ɵɵelementStart(0, "div", 17)(1, "mj-tree-dropdown", 51);
80
+ i0.ɵɵelementStart(0, "div", 17)(1, "mj-tree-dropdown", 54);
77
81
  i0.ɵɵlistener("ValueChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_17_Template_mj_tree_dropdown_ValueChange_1_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnCategoryTreeChange($event)); });
78
82
  i0.ɵɵelementEnd();
79
- i0.ɵɵelementStart(2, "button", 52);
83
+ i0.ɵɵelementStart(2, "button", 55);
80
84
  i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_17_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.createCategory()); });
81
- i0.ɵɵelement(3, "i", 53);
85
+ i0.ɵɵelement(3, "i", 56);
82
86
  i0.ɵɵelementEnd();
83
- i0.ɵɵconditionalCreate(4, MJQueryFormComponentExtended_Conditional_0_Conditional_17_Conditional_4_Template, 2, 0, "button", 54);
87
+ i0.ɵɵconditionalCreate(4, MJQueryFormComponentExtended_Conditional_0_Conditional_17_Conditional_4_Template, 2, 0, "button", 57);
84
88
  i0.ɵɵelementEnd();
85
89
  } if (rf & 2) {
86
90
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -100,7 +104,7 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_18_Template(rf,
100
104
  } }
101
105
  function MJQueryFormComponentExtended_Conditional_0_Conditional_22_Template(rf, ctx) { if (rf & 1) {
102
106
  const _r7 = i0.ɵɵgetCurrentView();
103
- i0.ɵɵelementStart(0, "mj-dropdown", 57);
107
+ i0.ɵɵelementStart(0, "mj-dropdown", 60);
104
108
  i0.ɵɵtwoWayListener("ngModelChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_22_Template_mj_dropdown_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.record.Status, $event) || (ctx_r1.record.Status = $event); return i0.ɵɵresetView($event); });
105
109
  i0.ɵɵelementEnd();
106
110
  } if (rf & 2) {
@@ -109,8 +113,8 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_22_Template(rf,
109
113
  i0.ɵɵproperty("Data", ctx_r1.statusOptions)("ValuePrimitive", true);
110
114
  } }
111
115
  function MJQueryFormComponentExtended_Conditional_0_Conditional_23_Template(rf, ctx) { if (rf & 1) {
112
- i0.ɵɵelementStart(0, "span", 58);
113
- i0.ɵɵelement(1, "i", 59);
116
+ i0.ɵɵelementStart(0, "span", 61);
117
+ i0.ɵɵelement(1, "i", 62);
114
118
  i0.ɵɵtext(2);
115
119
  i0.ɵɵelementEnd();
116
120
  } if (rf & 2) {
@@ -121,18 +125,45 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_23_Template(rf,
121
125
  i0.ɵɵadvance();
122
126
  i0.ɵɵtextInterpolate1(" ", ctx_r1.record.Status || "Unknown", " ");
123
127
  } }
124
- function MJQueryFormComponentExtended_Conditional_0_Conditional_24_Conditional_1_Template(rf, ctx) { if (rf & 1) {
128
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_24_Conditional_6_Template(rf, ctx) { if (rf & 1) {
125
129
  const _r8 = i0.ɵɵgetCurrentView();
126
- i0.ɵɵelementStart(0, "textarea", 62);
127
- i0.ɵɵtwoWayListener("ngModelChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_24_Conditional_1_Template_textarea_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.record.Description, $event) || (ctx_r1.record.Description = $event); return i0.ɵɵresetView($event); });
130
+ i0.ɵɵelementStart(0, "button", 65);
131
+ i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_24_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OpenRefreshDialog()); });
132
+ i0.ɵɵelement(1, "i", 66);
133
+ i0.ɵɵtext(2, " Refresh metadata ");
134
+ i0.ɵɵelementEnd();
135
+ } }
136
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_24_Template(rf, ctx) { if (rf & 1) {
137
+ i0.ɵɵelementStart(0, "div", 15)(1, "label", 16);
138
+ i0.ɵɵtext(2, "Metadata");
139
+ i0.ɵɵelementEnd();
140
+ i0.ɵɵelementStart(3, "div", 17)(4, "span", 63);
141
+ i0.ɵɵtext(5);
142
+ i0.ɵɵelementEnd();
143
+ i0.ɵɵconditionalCreate(6, MJQueryFormComponentExtended_Conditional_0_Conditional_24_Conditional_6_Template, 3, 0, "button", 64);
144
+ i0.ɵɵelementEnd()();
145
+ } if (rf & 2) {
146
+ const ctx_r1 = i0.ɵɵnextContext(2);
147
+ i0.ɵɵadvance(4);
148
+ i0.ɵɵclassMap("extraction-badge " + ctx_r1.ExtractionStatusClass);
149
+ i0.ɵɵproperty("title", "Last metadata extraction: " + ctx_r1.ExtractionStatusLabel);
150
+ i0.ɵɵadvance();
151
+ i0.ɵɵtextInterpolate1(" ", ctx_r1.ExtractionStatusLabel, " ");
152
+ i0.ɵɵadvance();
153
+ i0.ɵɵconditional(ctx_r1.CanRefreshMetadata ? 6 : -1);
154
+ } }
155
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_25_Conditional_1_Template(rf, ctx) { if (rf & 1) {
156
+ const _r9 = i0.ɵɵgetCurrentView();
157
+ i0.ɵɵelementStart(0, "textarea", 69);
158
+ i0.ɵɵtwoWayListener("ngModelChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_25_Conditional_1_Template_textarea_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.record.Description, $event) || (ctx_r1.record.Description = $event); return i0.ɵɵresetView($event); });
128
159
  i0.ɵɵtext(1, " ");
129
160
  i0.ɵɵelementEnd();
130
161
  } if (rf & 2) {
131
162
  const ctx_r1 = i0.ɵɵnextContext(3);
132
163
  i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.Description);
133
164
  } }
134
- function MJQueryFormComponentExtended_Conditional_0_Conditional_24_Conditional_2_Template(rf, ctx) { if (rf & 1) {
135
- i0.ɵɵelementStart(0, "p", 61);
165
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_25_Conditional_2_Template(rf, ctx) { if (rf & 1) {
166
+ i0.ɵɵelementStart(0, "p", 68);
136
167
  i0.ɵɵtext(1);
137
168
  i0.ɵɵelementEnd();
138
169
  } if (rf & 2) {
@@ -140,16 +171,16 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_24_Conditional_2
140
171
  i0.ɵɵadvance();
141
172
  i0.ɵɵtextInterpolate(ctx_r1.record.Description);
142
173
  } }
143
- function MJQueryFormComponentExtended_Conditional_0_Conditional_24_Template(rf, ctx) { if (rf & 1) {
174
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_25_Template(rf, ctx) { if (rf & 1) {
144
175
  i0.ɵɵelementStart(0, "div", 21);
145
- i0.ɵɵconditionalCreate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_24_Conditional_1_Template, 2, 1, "textarea", 60)(2, MJQueryFormComponentExtended_Conditional_0_Conditional_24_Conditional_2_Template, 2, 1, "p", 61);
176
+ i0.ɵɵconditionalCreate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_25_Conditional_1_Template, 2, 1, "textarea", 67)(2, MJQueryFormComponentExtended_Conditional_0_Conditional_25_Conditional_2_Template, 2, 1, "p", 68);
146
177
  i0.ɵɵelementEnd();
147
178
  } if (rf & 2) {
148
179
  const ctx_r1 = i0.ɵɵnextContext(2);
149
180
  i0.ɵɵadvance();
150
181
  i0.ɵɵconditional(ctx_r1.EditMode ? 1 : 2);
151
182
  } }
152
- function MJQueryFormComponentExtended_Conditional_0_Conditional_25_Template(rf, ctx) { if (rf & 1) {
183
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_26_Template(rf, ctx) { if (rf & 1) {
153
184
  i0.ɵɵelementStart(0, "mj-alert", 22)(1, "span");
154
185
  i0.ɵɵtext(2, " This query has status ");
155
186
  i0.ɵɵelementStart(3, "strong");
@@ -164,124 +195,142 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_25_Template(rf,
164
195
  i0.ɵɵadvance();
165
196
  i0.ɵɵtextInterpolate1(". ", ctx_r1.getStatusBannerMessage(), " ");
166
197
  } }
167
- function MJQueryFormComponentExtended_Conditional_0_ng_template_28_Conditional_4_Template(rf, ctx) { if (rf & 1) {
168
- i0.ɵɵelementStart(0, "span", 66);
198
+ function MJQueryFormComponentExtended_Conditional_0_ng_template_29_Conditional_4_Template(rf, ctx) { if (rf & 1) {
199
+ i0.ɵɵelementStart(0, "span", 73);
169
200
  i0.ɵɵtext(1, "\u2014 Defined");
170
201
  i0.ɵɵelementEnd();
171
202
  } }
172
- function MJQueryFormComponentExtended_Conditional_0_ng_template_28_Template(rf, ctx) { if (rf & 1) {
173
- i0.ɵɵelementStart(0, "span", 63)(1, "span", 64);
174
- i0.ɵɵelement(2, "i", 65);
203
+ function MJQueryFormComponentExtended_Conditional_0_ng_template_29_Template(rf, ctx) { if (rf & 1) {
204
+ i0.ɵɵelementStart(0, "span", 70)(1, "span", 71);
205
+ i0.ɵɵelement(2, "i", 72);
175
206
  i0.ɵɵtext(3, " SQL ");
176
- i0.ɵɵconditionalCreate(4, MJQueryFormComponentExtended_Conditional_0_ng_template_28_Conditional_4_Template, 2, 0, "span", 66);
207
+ i0.ɵɵconditionalCreate(4, MJQueryFormComponentExtended_Conditional_0_ng_template_29_Conditional_4_Template, 2, 0, "span", 73);
177
208
  i0.ɵɵelementEnd()();
178
209
  } if (rf & 2) {
179
210
  const ctx_r1 = i0.ɵɵnextContext(2);
180
211
  i0.ɵɵadvance(4);
181
212
  i0.ɵɵconditional(ctx_r1.record.SQL ? 4 : -1);
182
213
  } }
183
- function MJQueryFormComponentExtended_Conditional_0_Conditional_38_For_6_Conditional_7_Template(rf, ctx) { if (rf & 1) {
184
- i0.ɵɵelementStart(0, "div", 74);
214
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_37_Template(rf, ctx) { if (rf & 1) {
215
+ const _r10 = i0.ɵɵgetCurrentView();
216
+ i0.ɵɵelementStart(0, "mj-query-diagnostics", 74);
217
+ i0.ɵɵlistener("LocationClick", function MJQueryFormComponentExtended_Conditional_0_Conditional_37_Template_mj_query_diagnostics_LocationClick_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnDiagnosticLocationClick($event)); });
218
+ i0.ɵɵelementEnd();
219
+ } if (rf & 2) {
220
+ const ctx_r1 = i0.ɵɵnextContext(2);
221
+ i0.ɵɵproperty("Headline", ctx_r1.SaveDiagnosticsHeadline)("Diagnostics", ctx_r1.SaveDiagnostics)("LocationsClickable", true);
222
+ } }
223
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Template(rf, ctx) { if (rf & 1) {
224
+ const _r11 = i0.ɵɵgetCurrentView();
225
+ i0.ɵɵelementStart(0, "mj-query-diagnostics", 75);
226
+ i0.ɵɵlistener("LocationClick", function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Template_mj_query_diagnostics_LocationClick_0_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnDiagnosticLocationClick($event)); });
227
+ i0.ɵɵelementEnd();
228
+ } if (rf & 2) {
229
+ const ctx_r1 = i0.ɵɵnextContext(2);
230
+ i0.ɵɵproperty("Headline", "Last metadata extraction: " + ctx_r1.ExtractionStatusLabel)("Diagnostics", ctx_r1.ExtractionDiagnostics)("Severity", ctx_r1.ExtractionSeverity)("LocationsClickable", true);
231
+ } }
232
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_41_For_6_Conditional_7_Template(rf, ctx) { if (rf & 1) {
233
+ i0.ɵɵelementStart(0, "div", 83);
185
234
  i0.ɵɵtext(1);
186
235
  i0.ɵɵelementEnd();
187
236
  } if (rf & 2) {
188
- const filter_r9 = i0.ɵɵnextContext().$implicit;
237
+ const filter_r12 = i0.ɵɵnextContext().$implicit;
189
238
  i0.ɵɵadvance();
190
- i0.ɵɵtextInterpolate(filter_r9.notes);
239
+ i0.ɵɵtextInterpolate(filter_r12.notes);
191
240
  } }
192
- function MJQueryFormComponentExtended_Conditional_0_Conditional_38_For_6_Template(rf, ctx) { if (rf & 1) {
193
- i0.ɵɵelementStart(0, "div", 70)(1, "div", 71);
241
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_41_For_6_Template(rf, ctx) { if (rf & 1) {
242
+ i0.ɵɵelementStart(0, "div", 79)(1, "div", 80);
194
243
  i0.ɵɵtext(2);
195
244
  i0.ɵɵelementEnd();
196
- i0.ɵɵelementStart(3, "div", 72);
245
+ i0.ɵɵelementStart(3, "div", 81);
197
246
  i0.ɵɵtext(4);
198
247
  i0.ɵɵelementEnd();
199
- i0.ɵɵelementStart(5, "div", 73);
248
+ i0.ɵɵelementStart(5, "div", 82);
200
249
  i0.ɵɵtext(6);
201
250
  i0.ɵɵelementEnd();
202
- i0.ɵɵconditionalCreate(7, MJQueryFormComponentExtended_Conditional_0_Conditional_38_For_6_Conditional_7_Template, 2, 1, "div", 74);
251
+ i0.ɵɵconditionalCreate(7, MJQueryFormComponentExtended_Conditional_0_Conditional_41_For_6_Conditional_7_Template, 2, 1, "div", 83);
203
252
  i0.ɵɵelementEnd();
204
253
  } if (rf & 2) {
205
- const filter_r9 = ctx.$implicit;
254
+ const filter_r12 = ctx.$implicit;
206
255
  i0.ɵɵadvance(2);
207
- i0.ɵɵtextInterpolate(filter_r9.name);
256
+ i0.ɵɵtextInterpolate(filter_r12.name);
208
257
  i0.ɵɵadvance(2);
209
- i0.ɵɵtextInterpolate(filter_r9.description);
258
+ i0.ɵɵtextInterpolate(filter_r12.description);
210
259
  i0.ɵɵadvance(2);
211
- i0.ɵɵtextInterpolate(filter_r9.exampleSyntax);
260
+ i0.ɵɵtextInterpolate(filter_r12.exampleSyntax);
212
261
  i0.ɵɵadvance();
213
- i0.ɵɵconditional(filter_r9.notes ? 7 : -1);
262
+ i0.ɵɵconditional(filter_r12.notes ? 7 : -1);
214
263
  } }
215
- function MJQueryFormComponentExtended_Conditional_0_Conditional_38_Template(rf, ctx) { if (rf & 1) {
216
- i0.ɵɵelementStart(0, "div", 32)(1, "h6", 67);
217
- i0.ɵɵelement(2, "i", 68);
264
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_41_Template(rf, ctx) { if (rf & 1) {
265
+ i0.ɵɵelementStart(0, "div", 34)(1, "h6", 76);
266
+ i0.ɵɵelement(2, "i", 77);
218
267
  i0.ɵɵtext(3, " Available SQL Filters for Parameterized Queries ");
219
268
  i0.ɵɵelementEnd();
220
- i0.ɵɵelementStart(4, "div", 69);
221
- i0.ɵɵrepeaterCreate(5, MJQueryFormComponentExtended_Conditional_0_Conditional_38_For_6_Template, 8, 4, "div", 70, _forTrack0);
269
+ i0.ɵɵelementStart(4, "div", 78);
270
+ i0.ɵɵrepeaterCreate(5, MJQueryFormComponentExtended_Conditional_0_Conditional_41_For_6_Template, 8, 4, "div", 79, _forTrack0);
222
271
  i0.ɵɵelementEnd()();
223
272
  } if (rf & 2) {
224
273
  const ctx_r1 = i0.ɵɵnextContext(2);
225
274
  i0.ɵɵadvance(5);
226
275
  i0.ɵɵrepeater(ctx_r1.sqlFilters);
227
276
  } }
228
- function MJQueryFormComponentExtended_Conditional_0_Conditional_39_ng_template_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
229
- i0.ɵɵelementStart(0, "span", 66);
277
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_42_ng_template_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
278
+ i0.ɵɵelementStart(0, "span", 73);
230
279
  i0.ɵɵtext(1, "\u2014 Documented");
231
280
  i0.ɵɵelementEnd();
232
281
  } }
233
- function MJQueryFormComponentExtended_Conditional_0_Conditional_39_ng_template_1_Template(rf, ctx) { if (rf & 1) {
234
- i0.ɵɵelementStart(0, "span", 64);
235
- i0.ɵɵelement(1, "i", 76);
282
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_42_ng_template_1_Template(rf, ctx) { if (rf & 1) {
283
+ i0.ɵɵelementStart(0, "span", 71);
284
+ i0.ɵɵelement(1, "i", 85);
236
285
  i0.ɵɵtext(2, " Technical Description ");
237
- i0.ɵɵconditionalCreate(3, MJQueryFormComponentExtended_Conditional_0_Conditional_39_ng_template_1_Conditional_3_Template, 2, 0, "span", 66);
286
+ i0.ɵɵconditionalCreate(3, MJQueryFormComponentExtended_Conditional_0_Conditional_42_ng_template_1_Conditional_3_Template, 2, 0, "span", 73);
238
287
  i0.ɵɵelementEnd();
239
288
  } if (rf & 2) {
240
289
  const ctx_r1 = i0.ɵɵnextContext(3);
241
290
  i0.ɵɵadvance(3);
242
291
  i0.ɵɵconditional(ctx_r1.record.TechnicalDescription ? 3 : -1);
243
292
  } }
244
- function MJQueryFormComponentExtended_Conditional_0_Conditional_39_Conditional_3_Conditional_2_Template(rf, ctx) { if (rf & 1) {
245
- i0.ɵɵelementStart(0, "div", 78)(1, "div", 79);
246
- i0.ɵɵelement(2, "i", 80);
293
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_42_Conditional_3_Conditional_2_Template(rf, ctx) { if (rf & 1) {
294
+ i0.ɵɵelementStart(0, "div", 87)(1, "div", 88);
295
+ i0.ɵɵelement(2, "i", 89);
247
296
  i0.ɵɵtext(3, " Preview ");
248
297
  i0.ɵɵelementEnd();
249
- i0.ɵɵelement(4, "mj-markdown", 81);
298
+ i0.ɵɵelement(4, "mj-markdown", 90);
250
299
  i0.ɵɵelementEnd();
251
300
  } if (rf & 2) {
252
301
  const ctx_r1 = i0.ɵɵnextContext(4);
253
302
  i0.ɵɵadvance(4);
254
303
  i0.ɵɵproperty("data", ctx_r1.record.TechnicalDescription || "")("enableMermaid", true)("enableHighlight", true)("enableCollapsibleHeadings", false)("enableSmartypants", true);
255
304
  } }
256
- function MJQueryFormComponentExtended_Conditional_0_Conditional_39_Conditional_3_Template(rf, ctx) { if (rf & 1) {
257
- const _r11 = i0.ɵɵgetCurrentView();
258
- i0.ɵɵelementStart(0, "textarea", 77);
259
- i0.ɵɵtwoWayListener("ngModelChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_39_Conditional_3_Template_textarea_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.record.TechnicalDescription, $event) || (ctx_r1.record.TechnicalDescription = $event); return i0.ɵɵresetView($event); });
305
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_42_Conditional_3_Template(rf, ctx) { if (rf & 1) {
306
+ const _r14 = i0.ɵɵgetCurrentView();
307
+ i0.ɵɵelementStart(0, "textarea", 86);
308
+ i0.ɵɵtwoWayListener("ngModelChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_42_Conditional_3_Template_textarea_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.record.TechnicalDescription, $event) || (ctx_r1.record.TechnicalDescription = $event); return i0.ɵɵresetView($event); });
260
309
  i0.ɵɵtext(1, " ");
261
310
  i0.ɵɵelementEnd();
262
- i0.ɵɵconditionalCreate(2, MJQueryFormComponentExtended_Conditional_0_Conditional_39_Conditional_3_Conditional_2_Template, 5, 5, "div", 78);
311
+ i0.ɵɵconditionalCreate(2, MJQueryFormComponentExtended_Conditional_0_Conditional_42_Conditional_3_Conditional_2_Template, 5, 5, "div", 87);
263
312
  } if (rf & 2) {
264
313
  const ctx_r1 = i0.ɵɵnextContext(3);
265
314
  i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.TechnicalDescription);
266
315
  i0.ɵɵadvance(2);
267
316
  i0.ɵɵconditional(ctx_r1.record.TechnicalDescription ? 2 : -1);
268
317
  } }
269
- function MJQueryFormComponentExtended_Conditional_0_Conditional_39_Conditional_4_Template(rf, ctx) { if (rf & 1) {
270
- i0.ɵɵelementStart(0, "div", 75);
271
- i0.ɵɵelement(1, "mj-markdown", 81);
318
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_42_Conditional_4_Template(rf, ctx) { if (rf & 1) {
319
+ i0.ɵɵelementStart(0, "div", 84);
320
+ i0.ɵɵelement(1, "mj-markdown", 90);
272
321
  i0.ɵɵelementEnd();
273
322
  } if (rf & 2) {
274
323
  const ctx_r1 = i0.ɵɵnextContext(3);
275
324
  i0.ɵɵadvance();
276
325
  i0.ɵɵproperty("data", ctx_r1.record.TechnicalDescription || "")("enableMermaid", true)("enableHighlight", true)("enableCollapsibleHeadings", false)("enableSmartypants", true);
277
326
  } }
278
- function MJQueryFormComponentExtended_Conditional_0_Conditional_39_Template(rf, ctx) { if (rf & 1) {
279
- const _r10 = i0.ɵɵgetCurrentView();
327
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_42_Template(rf, ctx) { if (rf & 1) {
328
+ const _r13 = i0.ɵɵgetCurrentView();
280
329
  i0.ɵɵelementStart(0, "mj-accordion-panel", 24);
281
- i0.ɵɵtwoWayListener("ExpandedChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_39_Template_mj_accordion_panel_ExpandedChange_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.technicalDescriptionPanelExpanded, $event) || (ctx_r1.technicalDescriptionPanelExpanded = $event); return i0.ɵɵresetView($event); });
282
- i0.ɵɵtemplate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_39_ng_template_1_Template, 4, 1, "ng-template", 25);
283
- i0.ɵɵelementStart(2, "div", 34);
284
- i0.ɵɵconditionalCreate(3, MJQueryFormComponentExtended_Conditional_0_Conditional_39_Conditional_3_Template, 3, 2)(4, MJQueryFormComponentExtended_Conditional_0_Conditional_39_Conditional_4_Template, 2, 5, "div", 75);
330
+ i0.ɵɵtwoWayListener("ExpandedChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_42_Template_mj_accordion_panel_ExpandedChange_0_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.technicalDescriptionPanelExpanded, $event) || (ctx_r1.technicalDescriptionPanelExpanded = $event); return i0.ɵɵresetView($event); });
331
+ i0.ɵɵtemplate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_42_ng_template_1_Template, 4, 1, "ng-template", 25);
332
+ i0.ɵɵelementStart(2, "div", 36);
333
+ i0.ɵɵconditionalCreate(3, MJQueryFormComponentExtended_Conditional_0_Conditional_42_Conditional_3_Template, 3, 2)(4, MJQueryFormComponentExtended_Conditional_0_Conditional_42_Conditional_4_Template, 2, 5, "div", 84);
285
334
  i0.ɵɵelementEnd()();
286
335
  } if (rf & 2) {
287
336
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -289,8 +338,8 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_39_Template(rf,
289
338
  i0.ɵɵadvance(3);
290
339
  i0.ɵɵconditional(ctx_r1.EditMode ? 3 : 4);
291
340
  } }
292
- function MJQueryFormComponentExtended_Conditional_0_Conditional_40_ng_template_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
293
- i0.ɵɵelementStart(0, "span", 84);
341
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_43_ng_template_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
342
+ i0.ɵɵelementStart(0, "span", 93);
294
343
  i0.ɵɵtext(1);
295
344
  i0.ɵɵelementEnd();
296
345
  } if (rf & 2) {
@@ -298,141 +347,64 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_40_ng_template_1
298
347
  i0.ɵɵadvance();
299
348
  i0.ɵɵtextInterpolate(ctx_r1.queryParameters.length);
300
349
  } }
301
- function MJQueryFormComponentExtended_Conditional_0_Conditional_40_ng_template_1_Template(rf, ctx) { if (rf & 1) {
302
- i0.ɵɵelementStart(0, "span", 64);
303
- i0.ɵɵelement(1, "i", 83);
350
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_43_ng_template_1_Template(rf, ctx) { if (rf & 1) {
351
+ i0.ɵɵelementStart(0, "span", 71);
352
+ i0.ɵɵelement(1, "i", 92);
304
353
  i0.ɵɵtext(2, " Parameters ");
305
- i0.ɵɵconditionalCreate(3, MJQueryFormComponentExtended_Conditional_0_Conditional_40_ng_template_1_Conditional_3_Template, 2, 1, "span", 84);
354
+ i0.ɵɵconditionalCreate(3, MJQueryFormComponentExtended_Conditional_0_Conditional_43_ng_template_1_Conditional_3_Template, 2, 1, "span", 93);
306
355
  i0.ɵɵelementEnd();
307
356
  } if (rf & 2) {
308
357
  const ctx_r1 = i0.ɵɵnextContext(3);
309
358
  i0.ɵɵadvance(3);
310
359
  i0.ɵɵconditional(ctx_r1.queryParameters.length > 0 ? 3 : -1);
311
360
  } }
312
- function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_3_Template(rf, ctx) { if (rf & 1) {
313
- i0.ɵɵelementStart(0, "div", 82);
314
- i0.ɵɵelement(1, "mj-loading", 85);
361
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_3_Template(rf, ctx) { if (rf & 1) {
362
+ i0.ɵɵelementStart(0, "div", 91);
363
+ i0.ɵɵelement(1, "mj-loading", 94);
315
364
  i0.ɵɵelementEnd();
316
365
  } }
317
- function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
318
- const _r13 = i0.ɵɵgetCurrentView();
319
- i0.ɵɵelementStart(0, "mj-empty-state", 87);
320
- i0.ɵɵlistener("Action", function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_0_Template_mj_empty_state_Action_0_listener() { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.addParameter()); });
366
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
367
+ const _r16 = i0.ɵɵgetCurrentView();
368
+ i0.ɵɵelementStart(0, "mj-empty-state", 96);
369
+ i0.ɵɵlistener("Action", function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_0_Template_mj_empty_state_Action_0_listener() { i0.ɵɵrestoreView(_r16); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.addParameter()); });
321
370
  i0.ɵɵelementEnd();
322
371
  } if (rf & 2) {
323
372
  const ctx_r1 = i0.ɵɵnextContext(4);
324
373
  i0.ɵɵproperty("ActionText", ctx_r1.EditMode ? "Add First Parameter" : "");
325
374
  } }
326
- function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
327
- const _r14 = i0.ɵɵgetCurrentView();
328
- i0.ɵɵelementStart(0, "div", 88)(1, "button", 91);
329
- i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_Conditional_0_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.addParameter()); });
330
- i0.ɵɵelement(2, "i", 53);
375
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
376
+ const _r18 = i0.ɵɵgetCurrentView();
377
+ i0.ɵɵelementStart(0, "div", 97)(1, "button", 99);
378
+ i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_Conditional_0_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r18); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.addParameter()); });
379
+ i0.ɵɵelement(2, "i", 56);
331
380
  i0.ɵɵtext(3, " Add Parameter ");
332
381
  i0.ɵɵelementEnd()();
333
382
  } }
334
- function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_For_3_Conditional_6_Template(rf, ctx) { if (rf & 1) {
335
- i0.ɵɵelementStart(0, "span", 97);
336
- i0.ɵɵtext(1, "Required");
337
- i0.ɵɵelementEnd();
338
- } }
339
- function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_For_3_Conditional_8_Template(rf, ctx) { if (rf & 1) {
340
- i0.ɵɵelementStart(0, "div", 99);
341
- i0.ɵɵtext(1);
342
- i0.ɵɵelementEnd();
343
- } if (rf & 2) {
344
- const param_r16 = i0.ɵɵnextContext().$implicit;
345
- i0.ɵɵadvance();
346
- i0.ɵɵtextInterpolate(param_r16.Description);
347
- } }
348
- function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_For_3_Conditional_14_Template(rf, ctx) { if (rf & 1) {
349
- i0.ɵɵelementStart(0, "span", 101)(1, "strong");
350
- i0.ɵɵtext(2, "Default:");
351
- i0.ɵɵelementEnd();
352
- i0.ɵɵelementStart(3, "code", 103);
353
- i0.ɵɵtext(4);
354
- i0.ɵɵelementEnd()();
355
- } if (rf & 2) {
356
- const param_r16 = i0.ɵɵnextContext().$implicit;
357
- i0.ɵɵadvance(4);
358
- i0.ɵɵtextInterpolate(param_r16.DefaultValue);
359
- } }
360
- function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_For_3_Conditional_15_Template(rf, ctx) { if (rf & 1) {
383
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
361
384
  const _r17 = i0.ɵɵgetCurrentView();
362
- i0.ɵɵelementStart(0, "div", 104);
363
- i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_For_3_Conditional_15_Template_div_click_0_listener($event) { return $event.stopPropagation(); });
364
- i0.ɵɵelementStart(1, "button", 105);
365
- i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_For_3_Conditional_15_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r17); const param_r16 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.editParameter(param_r16)); });
366
- i0.ɵɵelement(2, "i", 56);
367
- i0.ɵɵelementEnd();
368
- i0.ɵɵelementStart(3, "button", 106);
369
- i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_For_3_Conditional_15_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r17); const param_r16 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.deleteParameter(param_r16)); });
370
- i0.ɵɵelement(4, "i", 107);
371
- i0.ɵɵelementEnd()();
372
- } }
373
- function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_For_3_Template(rf, ctx) { if (rf & 1) {
374
- const _r15 = i0.ɵɵgetCurrentView();
375
- i0.ɵɵelementStart(0, "div", 92);
376
- i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_For_3_Template_div_click_0_listener() { const param_r16 = i0.ɵɵrestoreView(_r15).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.editParameter(param_r16)); });
377
- i0.ɵɵelementStart(1, "div", 93)(2, "div", 94);
378
- i0.ɵɵelement(3, "i", 95);
379
- i0.ɵɵtext(4);
380
- i0.ɵɵelementEnd();
381
- i0.ɵɵelementStart(5, "div", 96);
382
- i0.ɵɵconditionalCreate(6, MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_For_3_Conditional_6_Template, 2, 0, "span", 97);
383
- i0.ɵɵelementEnd()();
384
- i0.ɵɵelementStart(7, "div", 98);
385
- i0.ɵɵconditionalCreate(8, MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_For_3_Conditional_8_Template, 2, 1, "div", 99);
386
- i0.ɵɵelementStart(9, "div", 100)(10, "span", 101)(11, "strong");
387
- i0.ɵɵtext(12, "Type:");
388
- i0.ɵɵelementEnd();
389
- i0.ɵɵtext(13);
390
- i0.ɵɵelementEnd();
391
- i0.ɵɵconditionalCreate(14, MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_For_3_Conditional_14_Template, 5, 1, "span", 101);
392
- i0.ɵɵelementEnd()();
393
- i0.ɵɵconditionalCreate(15, MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_For_3_Conditional_15_Template, 5, 0, "div", 102);
394
- i0.ɵɵelementEnd();
395
- } if (rf & 2) {
396
- const param_r16 = ctx.$implicit;
397
- const ctx_r1 = i0.ɵɵnextContext(5);
398
- i0.ɵɵclassProp("required", param_r16.IsRequired);
399
- i0.ɵɵadvance(4);
400
- i0.ɵɵtextInterpolate1(" ", param_r16.Name, " ");
401
- i0.ɵɵadvance(2);
402
- i0.ɵɵconditional(param_r16.IsRequired ? 6 : -1);
403
- i0.ɵɵadvance(2);
404
- i0.ɵɵconditional(param_r16.Description ? 8 : -1);
405
- i0.ɵɵadvance(5);
406
- i0.ɵɵtextInterpolate1(" ", param_r16.Type || "Text", " ");
407
- i0.ɵɵadvance();
408
- i0.ɵɵconditional(param_r16.DefaultValue ? 14 : -1);
409
- i0.ɵɵadvance();
410
- i0.ɵɵconditional(ctx_r1.EditMode ? 15 : -1);
411
- } }
412
- function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
413
- i0.ɵɵconditionalCreate(0, MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_Conditional_0_Template, 4, 0, "div", 88);
414
- i0.ɵɵelementStart(1, "div", 89);
415
- i0.ɵɵrepeaterCreate(2, MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_For_3_Template, 16, 8, "div", 90, _forTrack1);
385
+ i0.ɵɵconditionalCreate(0, MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_Conditional_0_Template, 4, 0, "div", 97);
386
+ i0.ɵɵelementStart(1, "mj-query-parameters-grid", 98);
387
+ i0.ɵɵlistener("Remove", function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_Template_mj_query_parameters_grid_Remove_1_listener($event) { i0.ɵɵrestoreView(_r17); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.deleteParameter($event)); })("Changed", function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_Template_mj_query_parameters_grid_Changed_1_listener() { i0.ɵɵrestoreView(_r17); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.OnChildRowChanged()); });
416
388
  i0.ɵɵelementEnd();
417
389
  } if (rf & 2) {
418
390
  const ctx_r1 = i0.ɵɵnextContext(4);
419
391
  i0.ɵɵconditional(ctx_r1.EditMode ? 0 : -1);
420
- i0.ɵɵadvance(2);
421
- i0.ɵɵrepeater(ctx_r1.queryParameters);
392
+ i0.ɵɵadvance();
393
+ i0.ɵɵproperty("Parameters", ctx_r1.queryParameters)("EditMode", ctx_r1.EditMode);
422
394
  } }
423
- function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Template(rf, ctx) { if (rf & 1) {
424
- i0.ɵɵconditionalCreate(0, MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_0_Template, 1, 1, "mj-empty-state", 86)(1, MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Conditional_1_Template, 4, 1);
395
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Template(rf, ctx) { if (rf & 1) {
396
+ i0.ɵɵconditionalCreate(0, MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_0_Template, 1, 1, "mj-empty-state", 95)(1, MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_Template, 2, 3);
425
397
  } if (rf & 2) {
426
398
  const ctx_r1 = i0.ɵɵnextContext(3);
427
399
  i0.ɵɵconditional(ctx_r1.queryParameters.length === 0 ? 0 : 1);
428
400
  } }
429
- function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Template(rf, ctx) { if (rf & 1) {
430
- const _r12 = i0.ɵɵgetCurrentView();
401
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Template(rf, ctx) { if (rf & 1) {
402
+ const _r15 = i0.ɵɵgetCurrentView();
431
403
  i0.ɵɵelementStart(0, "mj-accordion-panel", 24);
432
- i0.ɵɵtwoWayListener("ExpandedChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Template_mj_accordion_panel_ExpandedChange_0_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.parametersPanelExpanded, $event) || (ctx_r1.parametersPanelExpanded = $event); return i0.ɵɵresetView($event); });
433
- i0.ɵɵtemplate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_40_ng_template_1_Template, 4, 1, "ng-template", 25);
434
- i0.ɵɵelementStart(2, "div", 34);
435
- i0.ɵɵconditionalCreate(3, MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_3_Template, 2, 0, "div", 82)(4, MJQueryFormComponentExtended_Conditional_0_Conditional_40_Conditional_4_Template, 2, 1);
404
+ i0.ɵɵtwoWayListener("ExpandedChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Template_mj_accordion_panel_ExpandedChange_0_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.parametersPanelExpanded, $event) || (ctx_r1.parametersPanelExpanded = $event); return i0.ɵɵresetView($event); });
405
+ i0.ɵɵtemplate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_43_ng_template_1_Template, 4, 1, "ng-template", 25);
406
+ i0.ɵɵelementStart(2, "div", 36);
407
+ i0.ɵɵconditionalCreate(3, MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_3_Template, 2, 0, "div", 91)(4, MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Template, 2, 1);
436
408
  i0.ɵɵelementEnd()();
437
409
  } if (rf & 2) {
438
410
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -440,8 +412,8 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_40_Template(rf,
440
412
  i0.ɵɵadvance(3);
441
413
  i0.ɵɵconditional(ctx_r1.isLoadingParameters ? 3 : 4);
442
414
  } }
443
- function MJQueryFormComponentExtended_Conditional_0_Conditional_41_ng_template_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
444
- i0.ɵɵelementStart(0, "span", 84);
415
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_44_ng_template_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
416
+ i0.ɵɵelementStart(0, "span", 93);
445
417
  i0.ɵɵtext(1);
446
418
  i0.ɵɵelementEnd();
447
419
  } if (rf & 2) {
@@ -449,122 +421,64 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_41_ng_template_1
449
421
  i0.ɵɵadvance();
450
422
  i0.ɵɵtextInterpolate(ctx_r1.queryFields.length);
451
423
  } }
452
- function MJQueryFormComponentExtended_Conditional_0_Conditional_41_ng_template_1_Template(rf, ctx) { if (rf & 1) {
453
- i0.ɵɵelementStart(0, "span", 64);
454
- i0.ɵɵelement(1, "i", 108);
424
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_44_ng_template_1_Template(rf, ctx) { if (rf & 1) {
425
+ i0.ɵɵelementStart(0, "span", 71);
426
+ i0.ɵɵelement(1, "i", 100);
455
427
  i0.ɵɵtext(2, " Fields ");
456
- i0.ɵɵconditionalCreate(3, MJQueryFormComponentExtended_Conditional_0_Conditional_41_ng_template_1_Conditional_3_Template, 2, 1, "span", 84);
428
+ i0.ɵɵconditionalCreate(3, MJQueryFormComponentExtended_Conditional_0_Conditional_44_ng_template_1_Conditional_3_Template, 2, 1, "span", 93);
457
429
  i0.ɵɵelementEnd();
458
430
  } if (rf & 2) {
459
431
  const ctx_r1 = i0.ɵɵnextContext(3);
460
432
  i0.ɵɵadvance(3);
461
433
  i0.ɵɵconditional(ctx_r1.queryFields.length > 0 ? 3 : -1);
462
434
  } }
463
- function MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_3_Template(rf, ctx) { if (rf & 1) {
464
- i0.ɵɵelementStart(0, "div", 82);
465
- i0.ɵɵelement(1, "mj-loading", 109);
435
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_44_Conditional_3_Template(rf, ctx) { if (rf & 1) {
436
+ i0.ɵɵelementStart(0, "div", 91);
437
+ i0.ɵɵelement(1, "mj-loading", 101);
466
438
  i0.ɵɵelementEnd();
467
439
  } }
468
- function MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
469
- const _r19 = i0.ɵɵgetCurrentView();
470
- i0.ɵɵelementStart(0, "mj-empty-state", 111);
471
- i0.ɵɵlistener("Action", function MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Conditional_0_Template_mj_empty_state_Action_0_listener() { i0.ɵɵrestoreView(_r19); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.addField()); });
440
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_44_Conditional_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
441
+ const _r20 = i0.ɵɵgetCurrentView();
442
+ i0.ɵɵelementStart(0, "mj-empty-state", 103);
443
+ i0.ɵɵlistener("Action", function MJQueryFormComponentExtended_Conditional_0_Conditional_44_Conditional_4_Conditional_0_Template_mj_empty_state_Action_0_listener() { i0.ɵɵrestoreView(_r20); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.addField()); });
472
444
  i0.ɵɵelementEnd();
473
445
  } if (rf & 2) {
474
446
  const ctx_r1 = i0.ɵɵnextContext(4);
475
447
  i0.ɵɵproperty("ActionText", ctx_r1.EditMode ? "Add First Field" : "");
476
448
  } }
477
- function MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
478
- const _r20 = i0.ɵɵgetCurrentView();
479
- i0.ɵɵelementStart(0, "div", 88)(1, "button", 91);
480
- i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Conditional_1_Conditional_0_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r20); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.addField()); });
481
- i0.ɵɵelement(2, "i", 53);
482
- i0.ɵɵtext(3, " Add Field ");
483
- i0.ɵɵelementEnd()();
484
- } }
485
- function MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Conditional_1_For_3_Conditional_8_Template(rf, ctx) { if (rf & 1) {
486
- i0.ɵɵelementStart(0, "span", 115);
487
- i0.ɵɵtext(1);
488
- i0.ɵɵelementEnd();
489
- } if (rf & 2) {
490
- const field_r21 = i0.ɵɵnextContext().$implicit;
491
- i0.ɵɵadvance();
492
- i0.ɵɵtextInterpolate1("#", field_r21.Sequence);
493
- } }
494
- function MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Conditional_1_For_3_Conditional_10_Template(rf, ctx) { if (rf & 1) {
495
- i0.ɵɵelementStart(0, "div", 99);
496
- i0.ɵɵtext(1);
497
- i0.ɵɵelementEnd();
498
- } if (rf & 2) {
499
- const field_r21 = i0.ɵɵnextContext().$implicit;
500
- i0.ɵɵadvance();
501
- i0.ɵɵtextInterpolate(field_r21.Description);
502
- } }
503
- function MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Conditional_1_For_3_Conditional_15_Template(rf, ctx) { if (rf & 1) {
449
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_44_Conditional_4_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
504
450
  const _r22 = i0.ɵɵgetCurrentView();
505
- i0.ɵɵelementStart(0, "div", 117)(1, "button", 118);
506
- i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Conditional_1_For_3_Conditional_15_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r22); const field_r21 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.deleteField(field_r21)); });
507
- i0.ɵɵelement(2, "i", 107);
508
- i0.ɵɵelementEnd()();
509
- } }
510
- function MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Conditional_1_For_3_Template(rf, ctx) { if (rf & 1) {
511
- i0.ɵɵelementStart(0, "div", 112)(1, "div", 93)(2, "div", 94);
512
- i0.ɵɵelement(3, "i", 113);
513
- i0.ɵɵtext(4);
514
- i0.ɵɵelementEnd();
515
- i0.ɵɵelementStart(5, "div", 96)(6, "span", 114);
516
- i0.ɵɵtext(7);
517
- i0.ɵɵelementEnd();
518
- i0.ɵɵconditionalCreate(8, MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Conditional_1_For_3_Conditional_8_Template, 2, 1, "span", 115);
451
+ i0.ɵɵelementStart(0, "div", 97)(1, "button", 99);
452
+ i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_44_Conditional_4_Conditional_1_Conditional_0_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r22); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.addField()); });
453
+ i0.ɵɵelement(2, "i", 56);
454
+ i0.ɵɵtext(3, " Add Field ");
519
455
  i0.ɵɵelementEnd()();
520
- i0.ɵɵelementStart(9, "div", 98);
521
- i0.ɵɵconditionalCreate(10, MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Conditional_1_For_3_Conditional_10_Template, 2, 1, "div", 99);
522
- i0.ɵɵelementStart(11, "div", 100)(12, "span", 101);
523
- i0.ɵɵelement(13, "i", 116);
524
- i0.ɵɵtext(14);
525
- i0.ɵɵelementEnd()()();
526
- i0.ɵɵconditionalCreate(15, MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Conditional_1_For_3_Conditional_15_Template, 3, 0, "div", 117);
527
- i0.ɵɵelementEnd();
528
- } if (rf & 2) {
529
- const field_r21 = ctx.$implicit;
530
- const ctx_r1 = i0.ɵɵnextContext(5);
531
- i0.ɵɵadvance(4);
532
- i0.ɵɵtextInterpolate1(" ", field_r21.Name, " ");
533
- i0.ɵɵadvance(3);
534
- i0.ɵɵtextInterpolate(field_r21.SQLBaseType);
535
- i0.ɵɵadvance();
536
- i0.ɵɵconditional(field_r21.Sequence ? 8 : -1);
537
- i0.ɵɵadvance(2);
538
- i0.ɵɵconditional(field_r21.Description ? 10 : -1);
539
- i0.ɵɵadvance(4);
540
- i0.ɵɵtextInterpolate1(" ", field_r21.SQLFullType || field_r21.SQLBaseType, " ");
541
- i0.ɵɵadvance();
542
- i0.ɵɵconditional(ctx_r1.EditMode ? 15 : -1);
543
456
  } }
544
- function MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
545
- i0.ɵɵconditionalCreate(0, MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Conditional_1_Conditional_0_Template, 4, 0, "div", 88);
546
- i0.ɵɵelementStart(1, "div", 89);
547
- i0.ɵɵrepeaterCreate(2, MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Conditional_1_For_3_Template, 16, 6, "div", 112, _forTrack2);
457
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_44_Conditional_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
458
+ const _r21 = i0.ɵɵgetCurrentView();
459
+ i0.ɵɵconditionalCreate(0, MJQueryFormComponentExtended_Conditional_0_Conditional_44_Conditional_4_Conditional_1_Conditional_0_Template, 4, 0, "div", 97);
460
+ i0.ɵɵelementStart(1, "mj-query-fields-grid", 104);
461
+ i0.ɵɵlistener("Remove", function MJQueryFormComponentExtended_Conditional_0_Conditional_44_Conditional_4_Conditional_1_Template_mj_query_fields_grid_Remove_1_listener($event) { i0.ɵɵrestoreView(_r21); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.deleteField($event)); })("OpenSourceField", function MJQueryFormComponentExtended_Conditional_0_Conditional_44_Conditional_4_Conditional_1_Template_mj_query_fields_grid_OpenSourceField_1_listener($event) { i0.ɵɵrestoreView(_r21); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.OnOpenSourceField($event)); })("Changed", function MJQueryFormComponentExtended_Conditional_0_Conditional_44_Conditional_4_Conditional_1_Template_mj_query_fields_grid_Changed_1_listener() { i0.ɵɵrestoreView(_r21); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.OnChildRowChanged()); });
548
462
  i0.ɵɵelementEnd();
549
463
  } if (rf & 2) {
550
464
  const ctx_r1 = i0.ɵɵnextContext(4);
551
465
  i0.ɵɵconditional(ctx_r1.EditMode ? 0 : -1);
552
- i0.ɵɵadvance(2);
553
- i0.ɵɵrepeater(ctx_r1.queryFields);
466
+ i0.ɵɵadvance();
467
+ i0.ɵɵproperty("Fields", ctx_r1.queryFields)("EditMode", ctx_r1.EditMode);
554
468
  } }
555
- function MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Template(rf, ctx) { if (rf & 1) {
556
- i0.ɵɵconditionalCreate(0, MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Conditional_0_Template, 1, 1, "mj-empty-state", 110)(1, MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Conditional_1_Template, 4, 1);
469
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_44_Conditional_4_Template(rf, ctx) { if (rf & 1) {
470
+ i0.ɵɵconditionalCreate(0, MJQueryFormComponentExtended_Conditional_0_Conditional_44_Conditional_4_Conditional_0_Template, 1, 1, "mj-empty-state", 102)(1, MJQueryFormComponentExtended_Conditional_0_Conditional_44_Conditional_4_Conditional_1_Template, 2, 3);
557
471
  } if (rf & 2) {
558
472
  const ctx_r1 = i0.ɵɵnextContext(3);
559
473
  i0.ɵɵconditional(ctx_r1.queryFields.length === 0 ? 0 : 1);
560
474
  } }
561
- function MJQueryFormComponentExtended_Conditional_0_Conditional_41_Template(rf, ctx) { if (rf & 1) {
562
- const _r18 = i0.ɵɵgetCurrentView();
475
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_44_Template(rf, ctx) { if (rf & 1) {
476
+ const _r19 = i0.ɵɵgetCurrentView();
563
477
  i0.ɵɵelementStart(0, "mj-accordion-panel", 24);
564
- i0.ɵɵtwoWayListener("ExpandedChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_41_Template_mj_accordion_panel_ExpandedChange_0_listener($event) { i0.ɵɵrestoreView(_r18); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.fieldsPanelExpanded, $event) || (ctx_r1.fieldsPanelExpanded = $event); return i0.ɵɵresetView($event); });
565
- i0.ɵɵtemplate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_41_ng_template_1_Template, 4, 1, "ng-template", 25);
566
- i0.ɵɵelementStart(2, "div", 34);
567
- i0.ɵɵconditionalCreate(3, MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_3_Template, 2, 0, "div", 82)(4, MJQueryFormComponentExtended_Conditional_0_Conditional_41_Conditional_4_Template, 2, 1);
478
+ i0.ɵɵtwoWayListener("ExpandedChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_44_Template_mj_accordion_panel_ExpandedChange_0_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.fieldsPanelExpanded, $event) || (ctx_r1.fieldsPanelExpanded = $event); return i0.ɵɵresetView($event); });
479
+ i0.ɵɵtemplate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_44_ng_template_1_Template, 4, 1, "ng-template", 25);
480
+ i0.ɵɵelementStart(2, "div", 36);
481
+ i0.ɵɵconditionalCreate(3, MJQueryFormComponentExtended_Conditional_0_Conditional_44_Conditional_3_Template, 2, 0, "div", 91)(4, MJQueryFormComponentExtended_Conditional_0_Conditional_44_Conditional_4_Template, 2, 1);
568
482
  i0.ɵɵelementEnd()();
569
483
  } if (rf & 2) {
570
484
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -572,11 +486,11 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_41_Template(rf,
572
486
  i0.ɵɵadvance(3);
573
487
  i0.ɵɵconditional(ctx_r1.isLoadingFields ? 3 : 4);
574
488
  } }
575
- function MJQueryFormComponentExtended_Conditional_0_Conditional_42_ng_template_1_Template(rf, ctx) { if (rf & 1) {
576
- i0.ɵɵelementStart(0, "span", 64);
577
- i0.ɵɵelement(1, "i", 121);
489
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_45_ng_template_1_Template(rf, ctx) { if (rf & 1) {
490
+ i0.ɵɵelementStart(0, "span", 71);
491
+ i0.ɵɵelement(1, "i", 108);
578
492
  i0.ɵɵtext(2, " Dependent Queries ");
579
- i0.ɵɵelementStart(3, "span", 84);
493
+ i0.ɵɵelementStart(3, "span", 93);
580
494
  i0.ɵɵtext(4);
581
495
  i0.ɵɵelementEnd()();
582
496
  } if (rf & 2) {
@@ -584,9 +498,9 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_42_ng_template_1
584
498
  i0.ɵɵadvance(4);
585
499
  i0.ɵɵtextInterpolate(ctx_r1.DependentQueries.length);
586
500
  } }
587
- function MJQueryFormComponentExtended_Conditional_0_Conditional_42_For_10_Conditional_6_Template(rf, ctx) { if (rf & 1) {
588
- i0.ɵɵelementStart(0, "div", 100)(1, "span", 101);
589
- i0.ɵɵelement(2, "i", 127);
501
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_45_For_10_Conditional_6_Template(rf, ctx) { if (rf & 1) {
502
+ i0.ɵɵelementStart(0, "div", 114)(1, "span", 118);
503
+ i0.ɵɵelement(2, "i", 119);
590
504
  i0.ɵɵtext(3);
591
505
  i0.ɵɵelementEnd()();
592
506
  } if (rf & 2) {
@@ -594,11 +508,11 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_42_For_10_Condit
594
508
  i0.ɵɵadvance(3);
595
509
  i0.ɵɵtextInterpolate1(" ", dep_r25.ReferencePath, " ");
596
510
  } }
597
- function MJQueryFormComponentExtended_Conditional_0_Conditional_42_For_10_Conditional_7_Template(rf, ctx) { if (rf & 1) {
598
- i0.ɵɵelementStart(0, "div", 100)(1, "span", 101)(2, "strong");
511
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_45_For_10_Conditional_7_Template(rf, ctx) { if (rf & 1) {
512
+ i0.ɵɵelementStart(0, "div", 114)(1, "span", 118)(2, "strong");
599
513
  i0.ɵɵtext(3, "Alias:");
600
514
  i0.ɵɵelementEnd();
601
- i0.ɵɵelementStart(4, "code", 103);
515
+ i0.ɵɵelementStart(4, "code", 120);
602
516
  i0.ɵɵtext(5);
603
517
  i0.ɵɵelementEnd()()();
604
518
  } if (rf & 2) {
@@ -606,20 +520,20 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_42_For_10_Condit
606
520
  i0.ɵɵadvance(5);
607
521
  i0.ɵɵtextInterpolate(dep_r25.Alias);
608
522
  } }
609
- function MJQueryFormComponentExtended_Conditional_0_Conditional_42_For_10_Template(rf, ctx) { if (rf & 1) {
523
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_45_For_10_Template(rf, ctx) { if (rf & 1) {
610
524
  const _r24 = i0.ɵɵgetCurrentView();
611
- i0.ɵɵelementStart(0, "div", 122);
612
- i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_42_For_10_Template_div_click_0_listener() { const dep_r25 = i0.ɵɵrestoreView(_r24).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onDependentQueryClick(dep_r25)); });
613
- i0.ɵɵelementStart(1, "div", 93)(2, "div", 94);
614
- i0.ɵɵelement(3, "i", 123);
525
+ i0.ɵɵelementStart(0, "div", 109);
526
+ i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_45_For_10_Template_div_click_0_listener() { const dep_r25 = i0.ɵɵrestoreView(_r24).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onDependentQueryClick(dep_r25)); });
527
+ i0.ɵɵelementStart(1, "div", 110)(2, "div", 111);
528
+ i0.ɵɵelement(3, "i", 112);
615
529
  i0.ɵɵtext(4);
616
530
  i0.ɵɵelementEnd()();
617
- i0.ɵɵelementStart(5, "div", 98);
618
- i0.ɵɵconditionalCreate(6, MJQueryFormComponentExtended_Conditional_0_Conditional_42_For_10_Conditional_6_Template, 4, 1, "div", 100);
619
- i0.ɵɵconditionalCreate(7, MJQueryFormComponentExtended_Conditional_0_Conditional_42_For_10_Conditional_7_Template, 6, 1, "div", 100);
531
+ i0.ɵɵelementStart(5, "div", 113);
532
+ i0.ɵɵconditionalCreate(6, MJQueryFormComponentExtended_Conditional_0_Conditional_45_For_10_Conditional_6_Template, 4, 1, "div", 114);
533
+ i0.ɵɵconditionalCreate(7, MJQueryFormComponentExtended_Conditional_0_Conditional_45_For_10_Conditional_7_Template, 6, 1, "div", 114);
620
534
  i0.ɵɵelementEnd();
621
- i0.ɵɵelementStart(8, "div", 124)(9, "span", 125);
622
- i0.ɵɵelement(10, "i", 126);
535
+ i0.ɵɵelementStart(8, "div", 115)(9, "span", 116);
536
+ i0.ɵɵelement(10, "i", 117);
623
537
  i0.ɵɵtext(11, " Open ");
624
538
  i0.ɵɵelementEnd()()();
625
539
  } if (rf & 2) {
@@ -631,20 +545,20 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_42_For_10_Templa
631
545
  i0.ɵɵadvance();
632
546
  i0.ɵɵconditional(dep_r25.Alias ? 7 : -1);
633
547
  } }
634
- function MJQueryFormComponentExtended_Conditional_0_Conditional_42_Template(rf, ctx) { if (rf & 1) {
548
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_45_Template(rf, ctx) { if (rf & 1) {
635
549
  const _r23 = i0.ɵɵgetCurrentView();
636
550
  i0.ɵɵelementStart(0, "mj-accordion-panel", 24);
637
- i0.ɵɵtwoWayListener("ExpandedChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_42_Template_mj_accordion_panel_ExpandedChange_0_listener($event) { i0.ɵɵrestoreView(_r23); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.dependentsPanelExpanded, $event) || (ctx_r1.dependentsPanelExpanded = $event); return i0.ɵɵresetView($event); });
638
- i0.ɵɵtemplate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_42_ng_template_1_Template, 5, 1, "ng-template", 25);
639
- i0.ɵɵelementStart(2, "div", 34)(3, "div", 119);
551
+ i0.ɵɵtwoWayListener("ExpandedChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_45_Template_mj_accordion_panel_ExpandedChange_0_listener($event) { i0.ɵɵrestoreView(_r23); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.dependentsPanelExpanded, $event) || (ctx_r1.dependentsPanelExpanded = $event); return i0.ɵɵresetView($event); });
552
+ i0.ɵɵtemplate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_45_ng_template_1_Template, 5, 1, "ng-template", 25);
553
+ i0.ɵɵelementStart(2, "div", 36)(3, "div", 105);
640
554
  i0.ɵɵtext(4, " These queries reference this query via ");
641
555
  i0.ɵɵelementStart(5, "code");
642
556
  i0.ɵɵtext(6);
643
557
  i0.ɵɵelementEnd();
644
558
  i0.ɵɵtext(7, " composition syntax. ");
645
559
  i0.ɵɵelementEnd();
646
- i0.ɵɵelementStart(8, "div", 89);
647
- i0.ɵɵrepeaterCreate(9, MJQueryFormComponentExtended_Conditional_0_Conditional_42_For_10_Template, 12, 3, "div", 120, _forTrack2);
560
+ i0.ɵɵelementStart(8, "div", 106);
561
+ i0.ɵɵrepeaterCreate(9, MJQueryFormComponentExtended_Conditional_0_Conditional_45_For_10_Template, 12, 3, "div", 107, _forTrack1);
648
562
  i0.ɵɵelementEnd()()();
649
563
  } if (rf & 2) {
650
564
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -654,8 +568,8 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_42_Template(rf,
654
568
  i0.ɵɵadvance(3);
655
569
  i0.ɵɵrepeater(ctx_r1.DependentQueries);
656
570
  } }
657
- function MJQueryFormComponentExtended_Conditional_0_Conditional_43_ng_template_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
658
- i0.ɵɵelementStart(0, "span", 84);
571
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_46_ng_template_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
572
+ i0.ɵɵelementStart(0, "span", 93);
659
573
  i0.ɵɵtext(1);
660
574
  i0.ɵɵelementEnd();
661
575
  } if (rf & 2) {
@@ -663,73 +577,92 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_43_ng_template_1
663
577
  i0.ɵɵadvance();
664
578
  i0.ɵɵtextInterpolate(ctx_r1.queryEntities.length);
665
579
  } }
666
- function MJQueryFormComponentExtended_Conditional_0_Conditional_43_ng_template_1_Template(rf, ctx) { if (rf & 1) {
667
- i0.ɵɵelementStart(0, "span", 64);
668
- i0.ɵɵelement(1, "i", 128);
580
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_46_ng_template_1_Template(rf, ctx) { if (rf & 1) {
581
+ i0.ɵɵelementStart(0, "span", 71);
582
+ i0.ɵɵelement(1, "i", 121);
669
583
  i0.ɵɵtext(2, " Entities ");
670
- i0.ɵɵconditionalCreate(3, MJQueryFormComponentExtended_Conditional_0_Conditional_43_ng_template_1_Conditional_3_Template, 2, 1, "span", 84);
584
+ i0.ɵɵconditionalCreate(3, MJQueryFormComponentExtended_Conditional_0_Conditional_46_ng_template_1_Conditional_3_Template, 2, 1, "span", 93);
671
585
  i0.ɵɵelementEnd();
672
586
  } if (rf & 2) {
673
587
  const ctx_r1 = i0.ɵɵnextContext(3);
674
588
  i0.ɵɵadvance(3);
675
589
  i0.ɵɵconditional(ctx_r1.queryEntities.length > 0 ? 3 : -1);
676
590
  } }
677
- function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_3_Template(rf, ctx) { if (rf & 1) {
678
- i0.ɵɵelementStart(0, "div", 82);
679
- i0.ɵɵelement(1, "mj-loading", 129);
591
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_3_Template(rf, ctx) { if (rf & 1) {
592
+ i0.ɵɵelementStart(0, "div", 91);
593
+ i0.ɵɵelement(1, "mj-loading", 122);
680
594
  i0.ɵɵelementEnd();
681
595
  } }
682
- function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
596
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
683
597
  const _r27 = i0.ɵɵgetCurrentView();
684
- i0.ɵɵelementStart(0, "mj-empty-state", 131);
685
- i0.ɵɵlistener("Action", function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_0_Template_mj_empty_state_Action_0_listener() { i0.ɵɵrestoreView(_r27); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.addEntity()); });
598
+ i0.ɵɵelementStart(0, "mj-empty-state", 124);
599
+ i0.ɵɵlistener("Action", function MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_0_Template_mj_empty_state_Action_0_listener() { i0.ɵɵrestoreView(_r27); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.addEntity()); });
686
600
  i0.ɵɵelementEnd();
687
601
  } if (rf & 2) {
688
602
  const ctx_r1 = i0.ɵɵnextContext(4);
689
603
  i0.ɵɵproperty("ActionText", ctx_r1.EditMode ? "Add First Entity" : "");
690
604
  } }
691
- function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
605
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
692
606
  const _r28 = i0.ɵɵgetCurrentView();
693
- i0.ɵɵelementStart(0, "div", 88)(1, "button", 91);
694
- i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_Conditional_0_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r28); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.addEntity()); });
695
- i0.ɵɵelement(2, "i", 53);
607
+ i0.ɵɵelementStart(0, "div", 97)(1, "button", 99);
608
+ i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_1_Conditional_0_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r28); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.addEntity()); });
609
+ i0.ɵɵelement(2, "i", 56);
696
610
  i0.ɵɵtext(3, " Add Entity ");
697
611
  i0.ɵɵelementEnd()();
698
612
  } }
699
- function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_For_3_Conditional_5_Template(rf, ctx) { if (rf & 1) {
613
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_1_For_3_Conditional_5_Template(rf, ctx) { if (rf & 1) {
700
614
  const _r29 = i0.ɵɵgetCurrentView();
701
- i0.ɵɵelementStart(0, "div", 133)(1, "mj-dropdown", 134);
702
- i0.ɵɵtwoWayListener("ngModelChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_For_3_Conditional_5_Template_mj_dropdown_ngModelChange_1_listener($event) { i0.ɵɵrestoreView(_r29); const entity_r30 = i0.ɵɵnextContext().$implicit; i0.ɵɵtwoWayBindingSet(entity_r30.EntityID, $event) || (entity_r30.EntityID = $event); return i0.ɵɵresetView($event); });
615
+ i0.ɵɵelementStart(0, "div", 127)(1, "mj-dropdown", 129);
616
+ i0.ɵɵtwoWayListener("ngModelChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_1_For_3_Conditional_5_Template_mj_dropdown_ngModelChange_1_listener($event) { i0.ɵɵrestoreView(_r29); const entity_r30 = i0.ɵɵnextContext().$implicit; i0.ɵɵtwoWayBindingSet(entity_r30.EntityID, $event) || (entity_r30.EntityID = $event); return i0.ɵɵresetView($event); });
703
617
  i0.ɵɵelementEnd()();
704
618
  } if (rf & 2) {
705
- const entity_r30 = i0.ɵɵnextContext().$implicit;
619
+ const ctx_r30 = i0.ɵɵnextContext();
620
+ const entity_r30 = ctx_r30.$implicit;
621
+ const $index_r32 = ctx_r30.$index;
706
622
  const ctx_r1 = i0.ɵɵnextContext(5);
707
623
  i0.ɵɵadvance();
708
624
  i0.ɵɵtwoWayProperty("ngModel", entity_r30.EntityID);
709
- i0.ɵɵproperty("name", "entity_" + entity_r30.ID)("Data", ctx_r1.getEntityOptions())("ValuePrimitive", true);
625
+ i0.ɵɵproperty("name", "entity_" + (entity_r30.ID || $index_r32))("Data", ctx_r1.getEntityOptions())("ValuePrimitive", true);
626
+ } }
627
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_1_For_3_Conditional_6_Conditional_5_Template(rf, ctx) { if (rf & 1) {
628
+ i0.ɵɵelementStart(0, "span", 131)(1, "strong");
629
+ i0.ɵɵtext(2, "Detected by:");
630
+ i0.ɵɵelementEnd();
631
+ i0.ɵɵtext(3);
632
+ i0.ɵɵelementEnd();
633
+ } if (rf & 2) {
634
+ const entity_r30 = i0.ɵɵnextContext(2).$implicit;
635
+ i0.ɵɵadvance(3);
636
+ i0.ɵɵtextInterpolate1(" ", entity_r30.DetectionMethod, " ");
710
637
  } }
711
- function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_For_3_Conditional_6_Template(rf, ctx) { if (rf & 1) {
712
- i0.ɵɵelementStart(0, "div", 98)(1, "div", 100)(2, "span", 101);
713
- i0.ɵɵelement(3, "i", 135);
638
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_1_For_3_Conditional_6_Template(rf, ctx) { if (rf & 1) {
639
+ i0.ɵɵelementStart(0, "div", 113)(1, "div", 114)(2, "span", 118);
640
+ i0.ɵɵelement(3, "i", 130);
714
641
  i0.ɵɵtext(4, " Data Source ");
715
- i0.ɵɵelementEnd()()();
642
+ i0.ɵɵelementEnd();
643
+ i0.ɵɵconditionalCreate(5, MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_1_For_3_Conditional_6_Conditional_5_Template, 4, 1, "span", 131);
644
+ i0.ɵɵelementEnd()();
645
+ } if (rf & 2) {
646
+ const entity_r30 = i0.ɵɵnextContext().$implicit;
647
+ i0.ɵɵadvance(5);
648
+ i0.ɵɵconditional(entity_r30.DetectionMethod ? 5 : -1);
716
649
  } }
717
- function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_For_3_Conditional_7_Template(rf, ctx) { if (rf & 1) {
718
- const _r31 = i0.ɵɵgetCurrentView();
719
- i0.ɵɵelementStart(0, "div", 117)(1, "button", 136);
720
- i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_For_3_Conditional_7_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r31); const entity_r30 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.deleteEntity(entity_r30)); });
721
- i0.ɵɵelement(2, "i", 107);
650
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_1_For_3_Conditional_7_Template(rf, ctx) { if (rf & 1) {
651
+ const _r33 = i0.ɵɵgetCurrentView();
652
+ i0.ɵɵelementStart(0, "div", 128)(1, "button", 132);
653
+ i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_1_For_3_Conditional_7_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r33); const entity_r30 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.deleteEntity(entity_r30)); });
654
+ i0.ɵɵelement(2, "i", 133);
722
655
  i0.ɵɵelementEnd()();
723
656
  } }
724
- function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_For_3_Template(rf, ctx) { if (rf & 1) {
725
- i0.ɵɵelementStart(0, "div", 112)(1, "div", 93)(2, "div", 94);
726
- i0.ɵɵelement(3, "i", 132);
657
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_1_For_3_Template(rf, ctx) { if (rf & 1) {
658
+ i0.ɵɵelementStart(0, "div", 125)(1, "div", 110)(2, "div", 111);
659
+ i0.ɵɵelement(3, "i", 126);
727
660
  i0.ɵɵtext(4);
728
661
  i0.ɵɵelementEnd();
729
- i0.ɵɵconditionalCreate(5, MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_For_3_Conditional_5_Template, 2, 4, "div", 133);
662
+ i0.ɵɵconditionalCreate(5, MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_1_For_3_Conditional_5_Template, 2, 4, "div", 127);
730
663
  i0.ɵɵelementEnd();
731
- i0.ɵɵconditionalCreate(6, MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_For_3_Conditional_6_Template, 5, 0, "div", 98);
732
- i0.ɵɵconditionalCreate(7, MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_For_3_Conditional_7_Template, 3, 0, "div", 117);
664
+ i0.ɵɵconditionalCreate(6, MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_1_For_3_Conditional_6_Template, 6, 1, "div", 113);
665
+ i0.ɵɵconditionalCreate(7, MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_1_For_3_Conditional_7_Template, 3, 0, "div", 128);
733
666
  i0.ɵɵelementEnd();
734
667
  } if (rf & 2) {
735
668
  const entity_r30 = ctx.$implicit;
@@ -743,10 +676,10 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4
743
676
  i0.ɵɵadvance();
744
677
  i0.ɵɵconditional(ctx_r1.EditMode ? 7 : -1);
745
678
  } }
746
- function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
747
- i0.ɵɵconditionalCreate(0, MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_Conditional_0_Template, 4, 0, "div", 88);
748
- i0.ɵɵelementStart(1, "div", 89);
749
- i0.ɵɵrepeaterCreate(2, MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_For_3_Template, 8, 4, "div", 112, _forTrack2);
679
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
680
+ i0.ɵɵconditionalCreate(0, MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_1_Conditional_0_Template, 4, 0, "div", 97);
681
+ i0.ɵɵelementStart(1, "div", 106);
682
+ i0.ɵɵrepeaterCreate(2, MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_1_For_3_Template, 8, 4, "div", 125, _forTrack2);
750
683
  i0.ɵɵelementEnd();
751
684
  } if (rf & 2) {
752
685
  const ctx_r1 = i0.ɵɵnextContext(4);
@@ -754,19 +687,19 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4
754
687
  i0.ɵɵadvance(2);
755
688
  i0.ɵɵrepeater(ctx_r1.queryEntities);
756
689
  } }
757
- function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Template(rf, ctx) { if (rf & 1) {
758
- i0.ɵɵconditionalCreate(0, MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_0_Template, 1, 1, "mj-empty-state", 130)(1, MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Conditional_1_Template, 4, 1);
690
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Template(rf, ctx) { if (rf & 1) {
691
+ i0.ɵɵconditionalCreate(0, MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_0_Template, 1, 1, "mj-empty-state", 123)(1, MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Conditional_1_Template, 4, 1);
759
692
  } if (rf & 2) {
760
693
  const ctx_r1 = i0.ɵɵnextContext(3);
761
694
  i0.ɵɵconditional(ctx_r1.queryEntities.length === 0 ? 0 : 1);
762
695
  } }
763
- function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Template(rf, ctx) { if (rf & 1) {
696
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_46_Template(rf, ctx) { if (rf & 1) {
764
697
  const _r26 = i0.ɵɵgetCurrentView();
765
698
  i0.ɵɵelementStart(0, "mj-accordion-panel", 24);
766
- i0.ɵɵtwoWayListener("ExpandedChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Template_mj_accordion_panel_ExpandedChange_0_listener($event) { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.entitiesPanelExpanded, $event) || (ctx_r1.entitiesPanelExpanded = $event); return i0.ɵɵresetView($event); });
767
- i0.ɵɵtemplate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_43_ng_template_1_Template, 4, 1, "ng-template", 25);
768
- i0.ɵɵelementStart(2, "div", 34);
769
- i0.ɵɵconditionalCreate(3, MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_3_Template, 2, 0, "div", 82)(4, MJQueryFormComponentExtended_Conditional_0_Conditional_43_Conditional_4_Template, 2, 1);
699
+ i0.ɵɵtwoWayListener("ExpandedChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_46_Template_mj_accordion_panel_ExpandedChange_0_listener($event) { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.entitiesPanelExpanded, $event) || (ctx_r1.entitiesPanelExpanded = $event); return i0.ɵɵresetView($event); });
700
+ i0.ɵɵtemplate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_46_ng_template_1_Template, 4, 1, "ng-template", 25);
701
+ i0.ɵɵelementStart(2, "div", 36);
702
+ i0.ɵɵconditionalCreate(3, MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_3_Template, 2, 0, "div", 91)(4, MJQueryFormComponentExtended_Conditional_0_Conditional_46_Conditional_4_Template, 2, 1);
770
703
  i0.ɵɵelementEnd()();
771
704
  } if (rf & 2) {
772
705
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -774,92 +707,92 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_43_Template(rf,
774
707
  i0.ɵɵadvance(3);
775
708
  i0.ɵɵconditional(ctx_r1.isLoadingEntities ? 3 : 4);
776
709
  } }
777
- function MJQueryFormComponentExtended_Conditional_0_ng_template_45_Template(rf, ctx) { if (rf & 1) {
778
- i0.ɵɵelementStart(0, "span", 64);
779
- i0.ɵɵelement(1, "i", 137);
710
+ function MJQueryFormComponentExtended_Conditional_0_ng_template_48_Template(rf, ctx) { if (rf & 1) {
711
+ i0.ɵɵelementStart(0, "span", 71);
712
+ i0.ɵɵelement(1, "i", 134);
780
713
  i0.ɵɵtext(2, " Details ");
781
714
  i0.ɵɵelementEnd();
782
715
  } }
783
- function MJQueryFormComponentExtended_Conditional_0_Conditional_52_Template(rf, ctx) { if (rf & 1) {
784
- const _r32 = i0.ɵɵgetCurrentView();
785
- i0.ɵɵelementStart(0, "mj-switch", 138);
786
- i0.ɵɵtwoWayListener("ngModelChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_52_Template_mj_switch_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r32); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.record.Reusable, $event) || (ctx_r1.record.Reusable = $event); return i0.ɵɵresetView($event); });
716
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_55_Template(rf, ctx) { if (rf & 1) {
717
+ const _r34 = i0.ɵɵgetCurrentView();
718
+ i0.ɵɵelementStart(0, "mj-switch", 135);
719
+ i0.ɵɵtwoWayListener("ngModelChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_55_Template_mj_switch_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r34); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.record.Reusable, $event) || (ctx_r1.record.Reusable = $event); return i0.ɵɵresetView($event); });
787
720
  i0.ɵɵelementEnd();
788
- i0.ɵɵelementStart(1, "div", 139);
721
+ i0.ɵɵelementStart(1, "div", 136);
789
722
  i0.ɵɵtext(2, "Allow other queries to reference this query using composition syntax");
790
723
  i0.ɵɵelementEnd();
791
724
  } if (rf & 2) {
792
725
  const ctx_r1 = i0.ɵɵnextContext(2);
793
726
  i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.Reusable);
794
727
  } }
795
- function MJQueryFormComponentExtended_Conditional_0_Conditional_53_Conditional_1_Template(rf, ctx) { if (rf & 1) {
796
- i0.ɵɵelementStart(0, "span", 140);
797
- i0.ɵɵelement(1, "i", 142);
728
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_56_Conditional_1_Template(rf, ctx) { if (rf & 1) {
729
+ i0.ɵɵelementStart(0, "span", 137);
730
+ i0.ɵɵelement(1, "i", 139);
798
731
  i0.ɵɵtext(2, " Reusable");
799
732
  i0.ɵɵelementEnd();
800
733
  } }
801
- function MJQueryFormComponentExtended_Conditional_0_Conditional_53_Conditional_2_Template(rf, ctx) { if (rf & 1) {
802
- i0.ɵɵelementStart(0, "span", 141);
803
- i0.ɵɵelement(1, "i", 143);
734
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_56_Conditional_2_Template(rf, ctx) { if (rf & 1) {
735
+ i0.ɵɵelementStart(0, "span", 138);
736
+ i0.ɵɵelement(1, "i", 140);
804
737
  i0.ɵɵtext(2, " Not Reusable");
805
738
  i0.ɵɵelementEnd();
806
739
  } }
807
- function MJQueryFormComponentExtended_Conditional_0_Conditional_53_Template(rf, ctx) { if (rf & 1) {
808
- i0.ɵɵelementStart(0, "div", 39);
809
- i0.ɵɵconditionalCreate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_53_Conditional_1_Template, 3, 0, "span", 140)(2, MJQueryFormComponentExtended_Conditional_0_Conditional_53_Conditional_2_Template, 3, 0, "span", 141);
740
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_56_Template(rf, ctx) { if (rf & 1) {
741
+ i0.ɵɵelementStart(0, "div", 41);
742
+ i0.ɵɵconditionalCreate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_56_Conditional_1_Template, 3, 0, "span", 137)(2, MJQueryFormComponentExtended_Conditional_0_Conditional_56_Conditional_2_Template, 3, 0, "span", 138);
810
743
  i0.ɵɵelementEnd();
811
744
  } if (rf & 2) {
812
745
  const ctx_r1 = i0.ɵɵnextContext(2);
813
746
  i0.ɵɵadvance();
814
747
  i0.ɵɵconditional(ctx_r1.record.Reusable ? 1 : 2);
815
748
  } }
816
- function MJQueryFormComponentExtended_Conditional_0_Conditional_58_Template(rf, ctx) { if (rf & 1) {
817
- const _r33 = i0.ɵɵgetCurrentView();
818
- i0.ɵɵelementStart(0, "mj-switch", 144);
819
- i0.ɵɵtwoWayListener("ngModelChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_58_Template_mj_switch_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r33); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.record.CacheEnabled, $event) || (ctx_r1.record.CacheEnabled = $event); return i0.ɵɵresetView($event); });
749
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_61_Template(rf, ctx) { if (rf & 1) {
750
+ const _r35 = i0.ɵɵgetCurrentView();
751
+ i0.ɵɵelementStart(0, "mj-switch", 141);
752
+ i0.ɵɵtwoWayListener("ngModelChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_61_Template_mj_switch_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r35); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.record.CacheEnabled, $event) || (ctx_r1.record.CacheEnabled = $event); return i0.ɵɵresetView($event); });
820
753
  i0.ɵɵelementEnd();
821
- i0.ɵɵelementStart(1, "div", 139);
754
+ i0.ɵɵelementStart(1, "div", 136);
822
755
  i0.ɵɵtext(2, "Cache query results in memory to reduce database load on repeated runs");
823
756
  i0.ɵɵelementEnd();
824
757
  } if (rf & 2) {
825
758
  const ctx_r1 = i0.ɵɵnextContext(2);
826
759
  i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.CacheEnabled);
827
760
  } }
828
- function MJQueryFormComponentExtended_Conditional_0_Conditional_59_Conditional_1_Template(rf, ctx) { if (rf & 1) {
829
- i0.ɵɵelementStart(0, "span", 140);
830
- i0.ɵɵelement(1, "i", 142);
761
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_62_Conditional_1_Template(rf, ctx) { if (rf & 1) {
762
+ i0.ɵɵelementStart(0, "span", 137);
763
+ i0.ɵɵelement(1, "i", 139);
831
764
  i0.ɵɵtext(2, " Caching On");
832
765
  i0.ɵɵelementEnd();
833
766
  } }
834
- function MJQueryFormComponentExtended_Conditional_0_Conditional_59_Conditional_2_Template(rf, ctx) { if (rf & 1) {
835
- i0.ɵɵelementStart(0, "span", 141);
836
- i0.ɵɵelement(1, "i", 143);
767
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_62_Conditional_2_Template(rf, ctx) { if (rf & 1) {
768
+ i0.ɵɵelementStart(0, "span", 138);
769
+ i0.ɵɵelement(1, "i", 140);
837
770
  i0.ɵɵtext(2, " Caching Off");
838
771
  i0.ɵɵelementEnd();
839
772
  } }
840
- function MJQueryFormComponentExtended_Conditional_0_Conditional_59_Template(rf, ctx) { if (rf & 1) {
841
- i0.ɵɵelementStart(0, "div", 39);
842
- i0.ɵɵconditionalCreate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_59_Conditional_1_Template, 3, 0, "span", 140)(2, MJQueryFormComponentExtended_Conditional_0_Conditional_59_Conditional_2_Template, 3, 0, "span", 141);
773
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_62_Template(rf, ctx) { if (rf & 1) {
774
+ i0.ɵɵelementStart(0, "div", 41);
775
+ i0.ɵɵconditionalCreate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_62_Conditional_1_Template, 3, 0, "span", 137)(2, MJQueryFormComponentExtended_Conditional_0_Conditional_62_Conditional_2_Template, 3, 0, "span", 138);
843
776
  i0.ɵɵelementEnd();
844
777
  } if (rf & 2) {
845
778
  const ctx_r1 = i0.ɵɵnextContext(2);
846
779
  i0.ɵɵadvance();
847
780
  i0.ɵɵconditional(ctx_r1.record.CacheEnabled ? 1 : 2);
848
781
  } }
849
- function MJQueryFormComponentExtended_Conditional_0_Conditional_60_Conditional_4_Template(rf, ctx) { if (rf & 1) {
850
- const _r34 = i0.ɵɵgetCurrentView();
851
- i0.ɵɵelementStart(0, "input", 146);
852
- i0.ɵɵtwoWayListener("ngModelChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_60_Conditional_4_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r34); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.record.CacheTTLMinutes, $event) || (ctx_r1.record.CacheTTLMinutes = $event); return i0.ɵɵresetView($event); });
782
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_63_Conditional_4_Template(rf, ctx) { if (rf & 1) {
783
+ const _r36 = i0.ɵɵgetCurrentView();
784
+ i0.ɵɵelementStart(0, "input", 143);
785
+ i0.ɵɵtwoWayListener("ngModelChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_63_Conditional_4_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r36); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.record.CacheTTLMinutes, $event) || (ctx_r1.record.CacheTTLMinutes = $event); return i0.ɵɵresetView($event); });
853
786
  i0.ɵɵelementEnd();
854
- i0.ɵɵelementStart(1, "div", 139);
787
+ i0.ɵɵelementStart(1, "div", 136);
855
788
  i0.ɵɵtext(2, "How long cached results remain valid. Leave blank for default TTL.");
856
789
  i0.ɵɵelementEnd();
857
790
  } if (rf & 2) {
858
791
  const ctx_r1 = i0.ɵɵnextContext(3);
859
792
  i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.CacheTTLMinutes);
860
793
  } }
861
- function MJQueryFormComponentExtended_Conditional_0_Conditional_60_Conditional_5_Template(rf, ctx) { if (rf & 1) {
862
- i0.ɵɵelementStart(0, "div", 39);
794
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_63_Conditional_5_Template(rf, ctx) { if (rf & 1) {
795
+ i0.ɵɵelementStart(0, "div", 41);
863
796
  i0.ɵɵtext(1);
864
797
  i0.ɵɵelementEnd();
865
798
  } if (rf & 2) {
@@ -867,87 +800,87 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_60_Conditional_5
867
800
  i0.ɵɵadvance();
868
801
  i0.ɵɵtextInterpolate(ctx_r1.record.CacheTTLMinutes != null ? ctx_r1.record.CacheTTLMinutes + " min" : "Default");
869
802
  } }
870
- function MJQueryFormComponentExtended_Conditional_0_Conditional_60_Template(rf, ctx) { if (rf & 1) {
871
- i0.ɵɵelementStart(0, "div", 36)(1, "label", 37);
872
- i0.ɵɵelement(2, "i", 145);
803
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_63_Template(rf, ctx) { if (rf & 1) {
804
+ i0.ɵɵelementStart(0, "div", 38)(1, "label", 39);
805
+ i0.ɵɵelement(2, "i", 142);
873
806
  i0.ɵɵtext(3, " Cache TTL (Minutes) ");
874
807
  i0.ɵɵelementEnd();
875
- i0.ɵɵconditionalCreate(4, MJQueryFormComponentExtended_Conditional_0_Conditional_60_Conditional_4_Template, 3, 1)(5, MJQueryFormComponentExtended_Conditional_0_Conditional_60_Conditional_5_Template, 2, 1, "div", 39);
808
+ i0.ɵɵconditionalCreate(4, MJQueryFormComponentExtended_Conditional_0_Conditional_63_Conditional_4_Template, 3, 1)(5, MJQueryFormComponentExtended_Conditional_0_Conditional_63_Conditional_5_Template, 2, 1, "div", 41);
876
809
  i0.ɵɵelementEnd();
877
810
  } if (rf & 2) {
878
811
  const ctx_r1 = i0.ɵɵnextContext(2);
879
812
  i0.ɵɵadvance(4);
880
813
  i0.ɵɵconditional(ctx_r1.EditMode ? 4 : 5);
881
814
  } }
882
- function MJQueryFormComponentExtended_Conditional_0_Conditional_65_Template(rf, ctx) { if (rf & 1) {
883
- const _r35 = i0.ɵɵgetCurrentView();
884
- i0.ɵɵelementStart(0, "mj-switch", 147);
885
- i0.ɵɵtwoWayListener("ngModelChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_65_Template_mj_switch_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r35); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.record.AuditQueryRuns, $event) || (ctx_r1.record.AuditQueryRuns = $event); return i0.ɵɵresetView($event); });
815
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_68_Template(rf, ctx) { if (rf & 1) {
816
+ const _r37 = i0.ɵɵgetCurrentView();
817
+ i0.ɵɵelementStart(0, "mj-switch", 144);
818
+ i0.ɵɵtwoWayListener("ngModelChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_68_Template_mj_switch_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r37); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.record.AuditQueryRuns, $event) || (ctx_r1.record.AuditQueryRuns = $event); return i0.ɵɵresetView($event); });
886
819
  i0.ɵɵelementEnd();
887
- i0.ɵɵelementStart(1, "div", 139);
820
+ i0.ɵɵelementStart(1, "div", 136);
888
821
  i0.ɵɵtext(2, "Log all executions of this query to the Audit Log for tracking and compliance");
889
822
  i0.ɵɵelementEnd();
890
823
  } if (rf & 2) {
891
824
  const ctx_r1 = i0.ɵɵnextContext(2);
892
825
  i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.AuditQueryRuns);
893
826
  } }
894
- function MJQueryFormComponentExtended_Conditional_0_Conditional_66_Conditional_1_Template(rf, ctx) { if (rf & 1) {
895
- i0.ɵɵelementStart(0, "span", 140);
896
- i0.ɵɵelement(1, "i", 142);
827
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_69_Conditional_1_Template(rf, ctx) { if (rf & 1) {
828
+ i0.ɵɵelementStart(0, "span", 137);
829
+ i0.ɵɵelement(1, "i", 139);
897
830
  i0.ɵɵtext(2, " Auditing On");
898
831
  i0.ɵɵelementEnd();
899
832
  } }
900
- function MJQueryFormComponentExtended_Conditional_0_Conditional_66_Conditional_2_Template(rf, ctx) { if (rf & 1) {
901
- i0.ɵɵelementStart(0, "span", 141);
902
- i0.ɵɵelement(1, "i", 143);
833
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_69_Conditional_2_Template(rf, ctx) { if (rf & 1) {
834
+ i0.ɵɵelementStart(0, "span", 138);
835
+ i0.ɵɵelement(1, "i", 140);
903
836
  i0.ɵɵtext(2, " Auditing Off");
904
837
  i0.ɵɵelementEnd();
905
838
  } }
906
- function MJQueryFormComponentExtended_Conditional_0_Conditional_66_Template(rf, ctx) { if (rf & 1) {
907
- i0.ɵɵelementStart(0, "div", 39);
908
- i0.ɵɵconditionalCreate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_66_Conditional_1_Template, 3, 0, "span", 140)(2, MJQueryFormComponentExtended_Conditional_0_Conditional_66_Conditional_2_Template, 3, 0, "span", 141);
839
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_69_Template(rf, ctx) { if (rf & 1) {
840
+ i0.ɵɵelementStart(0, "div", 41);
841
+ i0.ɵɵconditionalCreate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_69_Conditional_1_Template, 3, 0, "span", 137)(2, MJQueryFormComponentExtended_Conditional_0_Conditional_69_Conditional_2_Template, 3, 0, "span", 138);
909
842
  i0.ɵɵelementEnd();
910
843
  } if (rf & 2) {
911
844
  const ctx_r1 = i0.ɵɵnextContext(2);
912
845
  i0.ɵɵadvance();
913
846
  i0.ɵɵconditional(ctx_r1.record.AuditQueryRuns ? 1 : 2);
914
847
  } }
915
- function MJQueryFormComponentExtended_Conditional_0_Conditional_71_Template(rf, ctx) { if (rf & 1) {
916
- const _r36 = i0.ɵɵgetCurrentView();
917
- i0.ɵɵelementStart(0, "mj-switch", 148);
918
- i0.ɵɵtwoWayListener("ngModelChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_71_Template_mj_switch_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r36); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.record.UsesTemplate, $event) || (ctx_r1.record.UsesTemplate = $event); return i0.ɵɵresetView($event); });
848
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_74_Template(rf, ctx) { if (rf & 1) {
849
+ const _r38 = i0.ɵɵgetCurrentView();
850
+ i0.ɵɵelementStart(0, "mj-switch", 145);
851
+ i0.ɵɵtwoWayListener("ngModelChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_74_Template_mj_switch_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r38); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.record.UsesTemplate, $event) || (ctx_r1.record.UsesTemplate = $event); return i0.ɵɵresetView($event); });
919
852
  i0.ɵɵelementEnd();
920
853
  } if (rf & 2) {
921
854
  const ctx_r1 = i0.ɵɵnextContext(2);
922
855
  i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.UsesTemplate);
923
856
  } }
924
- function MJQueryFormComponentExtended_Conditional_0_Conditional_72_Conditional_1_Template(rf, ctx) { if (rf & 1) {
925
- i0.ɵɵelementStart(0, "span", 140);
926
- i0.ɵɵelement(1, "i", 142);
857
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_75_Conditional_1_Template(rf, ctx) { if (rf & 1) {
858
+ i0.ɵɵelementStart(0, "span", 137);
859
+ i0.ɵɵelement(1, "i", 139);
927
860
  i0.ɵɵtext(2, " Uses Templates");
928
861
  i0.ɵɵelementEnd();
929
862
  } }
930
- function MJQueryFormComponentExtended_Conditional_0_Conditional_72_Conditional_2_Template(rf, ctx) { if (rf & 1) {
931
- i0.ɵɵelementStart(0, "span", 141);
932
- i0.ɵɵelement(1, "i", 143);
863
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_75_Conditional_2_Template(rf, ctx) { if (rf & 1) {
864
+ i0.ɵɵelementStart(0, "span", 138);
865
+ i0.ɵɵelement(1, "i", 140);
933
866
  i0.ɵɵtext(2, " No Templates");
934
867
  i0.ɵɵelementEnd();
935
868
  } }
936
- function MJQueryFormComponentExtended_Conditional_0_Conditional_72_Template(rf, ctx) { if (rf & 1) {
937
- i0.ɵɵelementStart(0, "div", 39);
938
- i0.ɵɵconditionalCreate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_72_Conditional_1_Template, 3, 0, "span", 140)(2, MJQueryFormComponentExtended_Conditional_0_Conditional_72_Conditional_2_Template, 3, 0, "span", 141);
869
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_75_Template(rf, ctx) { if (rf & 1) {
870
+ i0.ɵɵelementStart(0, "div", 41);
871
+ i0.ɵɵconditionalCreate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_75_Conditional_1_Template, 3, 0, "span", 137)(2, MJQueryFormComponentExtended_Conditional_0_Conditional_75_Conditional_2_Template, 3, 0, "span", 138);
939
872
  i0.ɵɵelementEnd();
940
873
  } if (rf & 2) {
941
874
  const ctx_r1 = i0.ɵɵnextContext(2);
942
875
  i0.ɵɵadvance();
943
876
  i0.ɵɵconditional(ctx_r1.record.UsesTemplate ? 1 : 2);
944
877
  } }
945
- function MJQueryFormComponentExtended_Conditional_0_Conditional_85_Template(rf, ctx) { if (rf & 1) {
946
- i0.ɵɵelementStart(0, "div", 36)(1, "label", 37);
947
- i0.ɵɵelement(2, "i", 149);
878
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_88_Template(rf, ctx) { if (rf & 1) {
879
+ i0.ɵɵelementStart(0, "div", 38)(1, "label", 39);
880
+ i0.ɵɵelement(2, "i", 146);
948
881
  i0.ɵɵtext(3, " Quality Rank ");
949
882
  i0.ɵɵelementEnd();
950
- i0.ɵɵelementStart(4, "div", 39);
883
+ i0.ɵɵelementStart(4, "div", 41);
951
884
  i0.ɵɵtext(5);
952
885
  i0.ɵɵelementEnd()();
953
886
  } if (rf & 2) {
@@ -955,72 +888,72 @@ function MJQueryFormComponentExtended_Conditional_0_Conditional_85_Template(rf,
955
888
  i0.ɵɵadvance(5);
956
889
  i0.ɵɵtextInterpolate1("", ctx_r1.record.QualityRank, "/10");
957
890
  } }
958
- function MJQueryFormComponentExtended_Conditional_0_Conditional_86_ng_template_1_Template(rf, ctx) { if (rf & 1) {
959
- i0.ɵɵelementStart(0, "span", 64);
960
- i0.ɵɵelement(1, "i", 150);
891
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_89_ng_template_1_Template(rf, ctx) { if (rf & 1) {
892
+ i0.ɵɵelementStart(0, "span", 71);
893
+ i0.ɵɵelement(1, "i", 147);
961
894
  i0.ɵɵtext(2, " Permissions ");
962
895
  i0.ɵɵelementEnd();
963
896
  } }
964
- function MJQueryFormComponentExtended_Conditional_0_Conditional_86_Conditional_3_Template(rf, ctx) { if (rf & 1) {
965
- i0.ɵɵelementStart(0, "div", 82);
966
- i0.ɵɵelement(1, "mj-loading", 151);
897
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_89_Conditional_3_Template(rf, ctx) { if (rf & 1) {
898
+ i0.ɵɵelementStart(0, "div", 91);
899
+ i0.ɵɵelement(1, "mj-loading", 148);
967
900
  i0.ɵɵelementEnd();
968
901
  } }
969
- function MJQueryFormComponentExtended_Conditional_0_Conditional_86_Conditional_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
970
- i0.ɵɵelement(0, "mj-empty-state", 152);
902
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_89_Conditional_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
903
+ i0.ɵɵelement(0, "mj-empty-state", 149);
971
904
  } }
972
- function MJQueryFormComponentExtended_Conditional_0_Conditional_86_Conditional_4_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
973
- i0.ɵɵelement(0, "mj-explorer-entity-data-grid", 153);
905
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_89_Conditional_4_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
906
+ i0.ɵɵelement(0, "mj-explorer-entity-data-grid", 150);
974
907
  } if (rf & 2) {
975
908
  const ctx_r1 = i0.ɵɵnextContext(5);
976
909
  i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("MJ: Query Permissions", "QueryID"))("NewRecordValues", ctx_r1.NewRecordValues("MJ: Query Permissions"))("AllowLoad", true)("ShowToolbar", false);
977
910
  } }
978
- function MJQueryFormComponentExtended_Conditional_0_Conditional_86_Conditional_4_Conditional_1_Conditional_1_For_2_Template(rf, ctx) { if (rf & 1) {
979
- i0.ɵɵelementStart(0, "div", 155);
980
- i0.ɵɵelement(1, "i", 156);
981
- i0.ɵɵelementStart(2, "div", 157)(3, "div", 158);
911
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_89_Conditional_4_Conditional_1_Conditional_1_For_2_Template(rf, ctx) { if (rf & 1) {
912
+ i0.ɵɵelementStart(0, "div", 152);
913
+ i0.ɵɵelement(1, "i", 153);
914
+ i0.ɵɵelementStart(2, "div", 154)(3, "div", 155);
982
915
  i0.ɵɵtext(4);
983
916
  i0.ɵɵelementEnd();
984
- i0.ɵɵelementStart(5, "div", 159);
917
+ i0.ɵɵelementStart(5, "div", 156);
985
918
  i0.ɵɵtext(6, "Role Permission");
986
919
  i0.ɵɵelementEnd()();
987
- i0.ɵɵelementStart(7, "span", 160);
988
- i0.ɵɵelement(8, "i", 50);
920
+ i0.ɵɵelementStart(7, "span", 157);
921
+ i0.ɵɵelement(8, "i", 53);
989
922
  i0.ɵɵtext(9, " Can Execute ");
990
923
  i0.ɵɵelementEnd()();
991
924
  } if (rf & 2) {
992
- const permission_r38 = ctx.$implicit;
925
+ const permission_r40 = ctx.$implicit;
993
926
  i0.ɵɵadvance(4);
994
- i0.ɵɵtextInterpolate(permission_r38.Role);
927
+ i0.ɵɵtextInterpolate(permission_r40.Role);
995
928
  } }
996
- function MJQueryFormComponentExtended_Conditional_0_Conditional_86_Conditional_4_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
997
- i0.ɵɵelementStart(0, "div", 154);
998
- i0.ɵɵrepeaterCreate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_86_Conditional_4_Conditional_1_Conditional_1_For_2_Template, 10, 1, "div", 155, _forTrack2);
929
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_89_Conditional_4_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
930
+ i0.ɵɵelementStart(0, "div", 151);
931
+ i0.ɵɵrepeaterCreate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_89_Conditional_4_Conditional_1_Conditional_1_For_2_Template, 10, 1, "div", 152, _forTrack1);
999
932
  i0.ɵɵelementEnd();
1000
933
  } if (rf & 2) {
1001
934
  const ctx_r1 = i0.ɵɵnextContext(5);
1002
935
  i0.ɵɵadvance();
1003
936
  i0.ɵɵrepeater(ctx_r1.queryPermissions);
1004
937
  } }
1005
- function MJQueryFormComponentExtended_Conditional_0_Conditional_86_Conditional_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
1006
- i0.ɵɵconditionalCreate(0, MJQueryFormComponentExtended_Conditional_0_Conditional_86_Conditional_4_Conditional_1_Conditional_0_Template, 1, 4, "mj-explorer-entity-data-grid", 153)(1, MJQueryFormComponentExtended_Conditional_0_Conditional_86_Conditional_4_Conditional_1_Conditional_1_Template, 3, 0, "div", 154);
938
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_89_Conditional_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
939
+ i0.ɵɵconditionalCreate(0, MJQueryFormComponentExtended_Conditional_0_Conditional_89_Conditional_4_Conditional_1_Conditional_0_Template, 1, 4, "mj-explorer-entity-data-grid", 150)(1, MJQueryFormComponentExtended_Conditional_0_Conditional_89_Conditional_4_Conditional_1_Conditional_1_Template, 3, 0, "div", 151);
1007
940
  } if (rf & 2) {
1008
941
  const ctx_r1 = i0.ɵɵnextContext(4);
1009
942
  i0.ɵɵconditional(ctx_r1.EditMode ? 0 : 1);
1010
943
  } }
1011
- function MJQueryFormComponentExtended_Conditional_0_Conditional_86_Conditional_4_Template(rf, ctx) { if (rf & 1) {
1012
- i0.ɵɵconditionalCreate(0, MJQueryFormComponentExtended_Conditional_0_Conditional_86_Conditional_4_Conditional_0_Template, 1, 0, "mj-empty-state", 152)(1, MJQueryFormComponentExtended_Conditional_0_Conditional_86_Conditional_4_Conditional_1_Template, 2, 1);
944
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_89_Conditional_4_Template(rf, ctx) { if (rf & 1) {
945
+ i0.ɵɵconditionalCreate(0, MJQueryFormComponentExtended_Conditional_0_Conditional_89_Conditional_4_Conditional_0_Template, 1, 0, "mj-empty-state", 149)(1, MJQueryFormComponentExtended_Conditional_0_Conditional_89_Conditional_4_Conditional_1_Template, 2, 1);
1013
946
  } if (rf & 2) {
1014
947
  const ctx_r1 = i0.ɵɵnextContext(3);
1015
948
  i0.ɵɵconditional(ctx_r1.queryPermissions.length === 0 && !ctx_r1.EditMode ? 0 : 1);
1016
949
  } }
1017
- function MJQueryFormComponentExtended_Conditional_0_Conditional_86_Template(rf, ctx) { if (rf & 1) {
1018
- const _r37 = i0.ɵɵgetCurrentView();
950
+ function MJQueryFormComponentExtended_Conditional_0_Conditional_89_Template(rf, ctx) { if (rf & 1) {
951
+ const _r39 = i0.ɵɵgetCurrentView();
1019
952
  i0.ɵɵelementStart(0, "mj-accordion-panel", 24);
1020
- i0.ɵɵtwoWayListener("ExpandedChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_86_Template_mj_accordion_panel_ExpandedChange_0_listener($event) { i0.ɵɵrestoreView(_r37); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.permissionsPanelExpanded, $event) || (ctx_r1.permissionsPanelExpanded = $event); return i0.ɵɵresetView($event); });
1021
- i0.ɵɵtemplate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_86_ng_template_1_Template, 3, 0, "ng-template", 25);
1022
- i0.ɵɵelementStart(2, "div", 34);
1023
- i0.ɵɵconditionalCreate(3, MJQueryFormComponentExtended_Conditional_0_Conditional_86_Conditional_3_Template, 2, 0, "div", 82)(4, MJQueryFormComponentExtended_Conditional_0_Conditional_86_Conditional_4_Template, 2, 1);
953
+ i0.ɵɵtwoWayListener("ExpandedChange", function MJQueryFormComponentExtended_Conditional_0_Conditional_89_Template_mj_accordion_panel_ExpandedChange_0_listener($event) { i0.ɵɵrestoreView(_r39); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.permissionsPanelExpanded, $event) || (ctx_r1.permissionsPanelExpanded = $event); return i0.ɵɵresetView($event); });
954
+ i0.ɵɵtemplate(1, MJQueryFormComponentExtended_Conditional_0_Conditional_89_ng_template_1_Template, 3, 0, "ng-template", 25);
955
+ i0.ɵɵelementStart(2, "div", 36);
956
+ i0.ɵɵconditionalCreate(3, MJQueryFormComponentExtended_Conditional_0_Conditional_89_Conditional_3_Template, 2, 0, "div", 91)(4, MJQueryFormComponentExtended_Conditional_0_Conditional_89_Conditional_4_Template, 2, 1);
1024
957
  i0.ɵɵelementEnd()();
1025
958
  } if (rf & 2) {
1026
959
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -1050,80 +983,88 @@ function MJQueryFormComponentExtended_Conditional_0_Template(rf, ctx) { if (rf &
1050
983
  i0.ɵɵtext(21, "Status");
1051
984
  i0.ɵɵelementEnd();
1052
985
  i0.ɵɵconditionalCreate(22, MJQueryFormComponentExtended_Conditional_0_Conditional_22_Template, 1, 3, "mj-dropdown", 19)(23, MJQueryFormComponentExtended_Conditional_0_Conditional_23_Template, 3, 5, "span", 20);
986
+ i0.ɵɵelementEnd();
987
+ i0.ɵɵconditionalCreate(24, MJQueryFormComponentExtended_Conditional_0_Conditional_24_Template, 7, 5, "div", 15);
988
+ i0.ɵɵelementEnd();
989
+ i0.ɵɵconditionalCreate(25, MJQueryFormComponentExtended_Conditional_0_Conditional_25_Template, 3, 1, "div", 21);
1053
990
  i0.ɵɵelementEnd()();
1054
- i0.ɵɵconditionalCreate(24, MJQueryFormComponentExtended_Conditional_0_Conditional_24_Template, 3, 1, "div", 21);
1055
- i0.ɵɵelementEnd()();
1056
- i0.ɵɵconditionalCreate(25, MJQueryFormComponentExtended_Conditional_0_Conditional_25_Template, 6, 2, "mj-alert", 22);
1057
- i0.ɵɵelementStart(26, "div", 23)(27, "mj-accordion-panel", 24);
1058
- i0.ɵɵtwoWayListener("ExpandedChange", function MJQueryFormComponentExtended_Conditional_0_Template_mj_accordion_panel_ExpandedChange_27_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.sqlPanelExpanded, $event) || (ctx_r1.sqlPanelExpanded = $event); return i0.ɵɵresetView($event); });
1059
- i0.ɵɵtemplate(28, MJQueryFormComponentExtended_Conditional_0_ng_template_28_Template, 5, 1, "ng-template", 25);
1060
- i0.ɵɵelementStart(29, "div", 26)(30, "button", 27);
1061
- i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Template_button_click_30_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.toggleFiltersHelp()); });
1062
- i0.ɵɵelement(31, "i", 28);
1063
- i0.ɵɵelementStart(32, "span");
1064
- i0.ɵɵtext(33, "Filters Help");
1065
- i0.ɵɵelementEnd();
1066
- i0.ɵɵelement(34, "i", 29);
991
+ i0.ɵɵconditionalCreate(26, MJQueryFormComponentExtended_Conditional_0_Conditional_26_Template, 6, 2, "mj-alert", 22);
992
+ i0.ɵɵelementStart(27, "div", 23)(28, "mj-accordion-panel", 24);
993
+ i0.ɵɵtwoWayListener("ExpandedChange", function MJQueryFormComponentExtended_Conditional_0_Template_mj_accordion_panel_ExpandedChange_28_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.sqlPanelExpanded, $event) || (ctx_r1.sqlPanelExpanded = $event); return i0.ɵɵresetView($event); });
994
+ i0.ɵɵtemplate(29, MJQueryFormComponentExtended_Conditional_0_ng_template_29_Template, 5, 1, "ng-template", 25);
995
+ i0.ɵɵelementStart(30, "div", 26)(31, "button", 27);
996
+ i0.ɵɵlistener("click", function MJQueryFormComponentExtended_Conditional_0_Template_button_click_31_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.toggleFiltersHelp()); });
997
+ i0.ɵɵelement(32, "i", 28);
998
+ i0.ɵɵelementStart(33, "span");
999
+ i0.ɵɵtext(34, "Filters Help");
1000
+ i0.ɵɵelementEnd();
1001
+ i0.ɵɵelement(35, "i", 29);
1067
1002
  i0.ɵɵelementEnd()();
1068
- i0.ɵɵelementStart(35, "div", 30)(36, "mj-code-editor", 31, 1);
1069
- i0.ɵɵlistener("change", function MJQueryFormComponentExtended_Conditional_0_Template_mj_code_editor_change_36_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSQLChange($event)); })("CompositionTokenClick", function MJQueryFormComponentExtended_Conditional_0_Template_mj_code_editor_CompositionTokenClick_36_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCompositionTokenClick($event)); });
1003
+ i0.ɵɵelementStart(36, "div", 30);
1004
+ i0.ɵɵconditionalCreate(37, MJQueryFormComponentExtended_Conditional_0_Conditional_37_Template, 1, 3, "mj-query-diagnostics", 31);
1005
+ i0.ɵɵelementStart(38, "mj-code-editor", 32, 1);
1006
+ i0.ɵɵlistener("change", function MJQueryFormComponentExtended_Conditional_0_Template_mj_code_editor_change_38_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSQLChange($event)); })("CompositionTokenClick", function MJQueryFormComponentExtended_Conditional_0_Template_mj_code_editor_CompositionTokenClick_38_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCompositionTokenClick($event)); });
1070
1007
  i0.ɵɵelementEnd();
1071
- i0.ɵɵconditionalCreate(38, MJQueryFormComponentExtended_Conditional_0_Conditional_38_Template, 7, 0, "div", 32);
1008
+ i0.ɵɵconditionalCreate(40, MJQueryFormComponentExtended_Conditional_0_Conditional_40_Template, 1, 4, "mj-query-diagnostics", 33);
1009
+ i0.ɵɵconditionalCreate(41, MJQueryFormComponentExtended_Conditional_0_Conditional_41_Template, 7, 0, "div", 34);
1072
1010
  i0.ɵɵelementEnd()();
1073
- i0.ɵɵconditionalCreate(39, MJQueryFormComponentExtended_Conditional_0_Conditional_39_Template, 5, 2, "mj-accordion-panel", 33);
1074
- i0.ɵɵconditionalCreate(40, MJQueryFormComponentExtended_Conditional_0_Conditional_40_Template, 5, 2, "mj-accordion-panel", 33);
1075
- i0.ɵɵconditionalCreate(41, MJQueryFormComponentExtended_Conditional_0_Conditional_41_Template, 5, 2, "mj-accordion-panel", 33);
1076
- i0.ɵɵconditionalCreate(42, MJQueryFormComponentExtended_Conditional_0_Conditional_42_Template, 11, 2, "mj-accordion-panel", 33);
1077
- i0.ɵɵconditionalCreate(43, MJQueryFormComponentExtended_Conditional_0_Conditional_43_Template, 5, 2, "mj-accordion-panel", 33);
1078
- i0.ɵɵelementStart(44, "mj-accordion-panel", 24);
1079
- i0.ɵɵtwoWayListener("ExpandedChange", function MJQueryFormComponentExtended_Conditional_0_Template_mj_accordion_panel_ExpandedChange_44_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.detailsPanelExpanded, $event) || (ctx_r1.detailsPanelExpanded = $event); return i0.ɵɵresetView($event); });
1080
- i0.ɵɵtemplate(45, MJQueryFormComponentExtended_Conditional_0_ng_template_45_Template, 3, 0, "ng-template", 25);
1081
- i0.ɵɵelementStart(46, "div", 34)(47, "div", 35)(48, "div", 36)(49, "label", 37);
1082
- i0.ɵɵelement(50, "i", 38);
1083
- i0.ɵɵtext(51, " Reusable ");
1011
+ i0.ɵɵconditionalCreate(42, MJQueryFormComponentExtended_Conditional_0_Conditional_42_Template, 5, 2, "mj-accordion-panel", 35);
1012
+ i0.ɵɵconditionalCreate(43, MJQueryFormComponentExtended_Conditional_0_Conditional_43_Template, 5, 2, "mj-accordion-panel", 35);
1013
+ i0.ɵɵconditionalCreate(44, MJQueryFormComponentExtended_Conditional_0_Conditional_44_Template, 5, 2, "mj-accordion-panel", 35);
1014
+ i0.ɵɵconditionalCreate(45, MJQueryFormComponentExtended_Conditional_0_Conditional_45_Template, 11, 2, "mj-accordion-panel", 35);
1015
+ i0.ɵɵconditionalCreate(46, MJQueryFormComponentExtended_Conditional_0_Conditional_46_Template, 5, 2, "mj-accordion-panel", 35);
1016
+ i0.ɵɵelementStart(47, "mj-accordion-panel", 24);
1017
+ i0.ɵɵtwoWayListener("ExpandedChange", function MJQueryFormComponentExtended_Conditional_0_Template_mj_accordion_panel_ExpandedChange_47_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.detailsPanelExpanded, $event) || (ctx_r1.detailsPanelExpanded = $event); return i0.ɵɵresetView($event); });
1018
+ i0.ɵɵtemplate(48, MJQueryFormComponentExtended_Conditional_0_ng_template_48_Template, 3, 0, "ng-template", 25);
1019
+ i0.ɵɵelementStart(49, "div", 36)(50, "div", 37)(51, "div", 38)(52, "label", 39);
1020
+ i0.ɵɵelement(53, "i", 40);
1021
+ i0.ɵɵtext(54, " Reusable ");
1084
1022
  i0.ɵɵelementEnd();
1085
- i0.ɵɵconditionalCreate(52, MJQueryFormComponentExtended_Conditional_0_Conditional_52_Template, 3, 1)(53, MJQueryFormComponentExtended_Conditional_0_Conditional_53_Template, 3, 1, "div", 39);
1023
+ i0.ɵɵconditionalCreate(55, MJQueryFormComponentExtended_Conditional_0_Conditional_55_Template, 3, 1)(56, MJQueryFormComponentExtended_Conditional_0_Conditional_56_Template, 3, 1, "div", 41);
1086
1024
  i0.ɵɵelementEnd();
1087
- i0.ɵɵelementStart(54, "div", 36)(55, "label", 37);
1088
- i0.ɵɵelement(56, "i", 40);
1089
- i0.ɵɵtext(57, " Cache Enabled ");
1025
+ i0.ɵɵelementStart(57, "div", 38)(58, "label", 39);
1026
+ i0.ɵɵelement(59, "i", 42);
1027
+ i0.ɵɵtext(60, " Cache Enabled ");
1090
1028
  i0.ɵɵelementEnd();
1091
- i0.ɵɵconditionalCreate(58, MJQueryFormComponentExtended_Conditional_0_Conditional_58_Template, 3, 1)(59, MJQueryFormComponentExtended_Conditional_0_Conditional_59_Template, 3, 1, "div", 39);
1029
+ i0.ɵɵconditionalCreate(61, MJQueryFormComponentExtended_Conditional_0_Conditional_61_Template, 3, 1)(62, MJQueryFormComponentExtended_Conditional_0_Conditional_62_Template, 3, 1, "div", 41);
1092
1030
  i0.ɵɵelementEnd();
1093
- i0.ɵɵconditionalCreate(60, MJQueryFormComponentExtended_Conditional_0_Conditional_60_Template, 6, 1, "div", 36);
1094
- i0.ɵɵelementStart(61, "div", 36)(62, "label", 37);
1095
- i0.ɵɵelement(63, "i", 41);
1096
- i0.ɵɵtext(64, " Audit Runs ");
1031
+ i0.ɵɵconditionalCreate(63, MJQueryFormComponentExtended_Conditional_0_Conditional_63_Template, 6, 1, "div", 38);
1032
+ i0.ɵɵelementStart(64, "div", 38)(65, "label", 39);
1033
+ i0.ɵɵelement(66, "i", 43);
1034
+ i0.ɵɵtext(67, " Audit Runs ");
1097
1035
  i0.ɵɵelementEnd();
1098
- i0.ɵɵconditionalCreate(65, MJQueryFormComponentExtended_Conditional_0_Conditional_65_Template, 3, 1)(66, MJQueryFormComponentExtended_Conditional_0_Conditional_66_Template, 3, 1, "div", 39);
1036
+ i0.ɵɵconditionalCreate(68, MJQueryFormComponentExtended_Conditional_0_Conditional_68_Template, 3, 1)(69, MJQueryFormComponentExtended_Conditional_0_Conditional_69_Template, 3, 1, "div", 41);
1099
1037
  i0.ɵɵelementEnd();
1100
- i0.ɵɵelementStart(67, "div", 36)(68, "label", 37);
1101
- i0.ɵɵelement(69, "i", 42);
1102
- i0.ɵɵtext(70, " Template Usage ");
1038
+ i0.ɵɵelementStart(70, "div", 38)(71, "label", 39);
1039
+ i0.ɵɵelement(72, "i", 44);
1040
+ i0.ɵɵtext(73, " Template Usage ");
1103
1041
  i0.ɵɵelementEnd();
1104
- i0.ɵɵconditionalCreate(71, MJQueryFormComponentExtended_Conditional_0_Conditional_71_Template, 1, 1, "mj-switch", 43)(72, MJQueryFormComponentExtended_Conditional_0_Conditional_72_Template, 3, 1, "div", 39);
1042
+ i0.ɵɵconditionalCreate(74, MJQueryFormComponentExtended_Conditional_0_Conditional_74_Template, 1, 1, "mj-switch", 45)(75, MJQueryFormComponentExtended_Conditional_0_Conditional_75_Template, 3, 1, "div", 41);
1105
1043
  i0.ɵɵelementEnd();
1106
- i0.ɵɵelementStart(73, "div", 36)(74, "label", 37);
1107
- i0.ɵɵelement(75, "i", 44);
1108
- i0.ɵɵtext(76, " Created ");
1044
+ i0.ɵɵelementStart(76, "div", 38)(77, "label", 39);
1045
+ i0.ɵɵelement(78, "i", 46);
1046
+ i0.ɵɵtext(79, " Created ");
1109
1047
  i0.ɵɵelementEnd();
1110
- i0.ɵɵelementStart(77, "div", 39);
1111
- i0.ɵɵtext(78);
1048
+ i0.ɵɵelementStart(80, "div", 41);
1049
+ i0.ɵɵtext(81);
1112
1050
  i0.ɵɵelementEnd()();
1113
- i0.ɵɵelementStart(79, "div", 36)(80, "label", 37);
1114
- i0.ɵɵelement(81, "i", 45);
1115
- i0.ɵɵtext(82, " Last Updated ");
1051
+ i0.ɵɵelementStart(82, "div", 38)(83, "label", 39);
1052
+ i0.ɵɵelement(84, "i", 47);
1053
+ i0.ɵɵtext(85, " Last Updated ");
1116
1054
  i0.ɵɵelementEnd();
1117
- i0.ɵɵelementStart(83, "div", 39);
1118
- i0.ɵɵtext(84);
1055
+ i0.ɵɵelementStart(86, "div", 41);
1056
+ i0.ɵɵtext(87);
1119
1057
  i0.ɵɵelementEnd()();
1120
- i0.ɵɵconditionalCreate(85, MJQueryFormComponentExtended_Conditional_0_Conditional_85_Template, 6, 1, "div", 36);
1058
+ i0.ɵɵconditionalCreate(88, MJQueryFormComponentExtended_Conditional_0_Conditional_88_Template, 6, 1, "div", 38);
1121
1059
  i0.ɵɵelementEnd()()();
1122
- i0.ɵɵconditionalCreate(86, MJQueryFormComponentExtended_Conditional_0_Conditional_86_Template, 5, 2, "mj-accordion-panel", 33);
1060
+ i0.ɵɵconditionalCreate(89, MJQueryFormComponentExtended_Conditional_0_Conditional_89_Template, 5, 2, "mj-accordion-panel", 35);
1123
1061
  i0.ɵɵelementEnd()()();
1124
- i0.ɵɵelementStart(87, "mj-query-run-dialog", 46);
1125
- i0.ɵɵtwoWayListener("isVisibleChange", function MJQueryFormComponentExtended_Conditional_0_Template_mj_query_run_dialog_isVisibleChange_87_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.showRunDialog, $event) || (ctx_r1.showRunDialog = $event); return i0.ɵɵresetView($event); });
1126
- i0.ɵɵlistener("onClose", function MJQueryFormComponentExtended_Conditional_0_Template_mj_query_run_dialog_onClose_87_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onRunDialogClose()); });
1062
+ i0.ɵɵelementStart(90, "mj-query-refresh-dialog", 48);
1063
+ i0.ɵɵlistener("Closed", function MJQueryFormComponentExtended_Conditional_0_Template_mj_query_refresh_dialog_Closed_90_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnRefreshDialogClosed()); })("Applied", function MJQueryFormComponentExtended_Conditional_0_Template_mj_query_refresh_dialog_Applied_90_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnRefreshApplied($event)); });
1064
+ i0.ɵɵelementEnd();
1065
+ i0.ɵɵelementStart(91, "mj-query-run-dialog", 49);
1066
+ i0.ɵɵtwoWayListener("isVisibleChange", function MJQueryFormComponentExtended_Conditional_0_Template_mj_query_run_dialog_isVisibleChange_91_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.showRunDialog, $event) || (ctx_r1.showRunDialog = $event); return i0.ɵɵresetView($event); });
1067
+ i0.ɵɵlistener("onClose", function MJQueryFormComponentExtended_Conditional_0_Template_mj_query_run_dialog_onClose_91_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onRunDialogClose()); });
1127
1068
  i0.ɵɵelementEnd();
1128
1069
  } if (rf & 2) {
1129
1070
  const ctx_r1 = i0.ɵɵnextContext();
@@ -1141,9 +1082,11 @@ function MJQueryFormComponentExtended_Conditional_0_Template(rf, ctx) { if (rf &
1141
1082
  i0.ɵɵadvance(5);
1142
1083
  i0.ɵɵconditional(ctx_r1.EditMode ? 22 : 23);
1143
1084
  i0.ɵɵadvance(2);
1144
- i0.ɵɵconditional(ctx_r1.EditMode || ctx_r1.record.Description ? 24 : -1);
1085
+ i0.ɵɵconditional(ctx_r1.record.IsSaved ? 24 : -1);
1145
1086
  i0.ɵɵadvance();
1146
- i0.ɵɵconditional(ctx_r1.record.Status && ctx_r1.record.Status !== "Approved" && !ctx_r1.EditMode ? 25 : -1);
1087
+ i0.ɵɵconditional(ctx_r1.EditMode || ctx_r1.record.Description ? 25 : -1);
1088
+ i0.ɵɵadvance();
1089
+ i0.ɵɵconditional(ctx_r1.record.Status && ctx_r1.record.Status !== "Approved" && !ctx_r1.EditMode ? 26 : -1);
1147
1090
  i0.ɵɵadvance();
1148
1091
  i0.ɵɵclassProp("content-saving", ctx_r1.IsSaving);
1149
1092
  i0.ɵɵadvance();
@@ -1151,39 +1094,45 @@ function MJQueryFormComponentExtended_Conditional_0_Template(rf, ctx) { if (rf &
1151
1094
  i0.ɵɵadvance(7);
1152
1095
  i0.ɵɵproperty("ngClass", ctx_r1.showFiltersHelp ? "fa-chevron-up" : "fa-chevron-down");
1153
1096
  i0.ɵɵadvance(2);
1097
+ i0.ɵɵconditional(ctx_r1.SaveDiagnostics.length > 0 || ctx_r1.SaveDiagnosticsHeadline ? 37 : -1);
1098
+ i0.ɵɵadvance();
1154
1099
  i0.ɵɵproperty("language", "sql");
1155
1100
  i0.ɵɵadvance(2);
1156
- i0.ɵɵconditional(ctx_r1.showFiltersHelp ? 38 : -1);
1101
+ i0.ɵɵconditional(ctx_r1.SaveDiagnostics.length === 0 && ctx_r1.ExtractionDiagnostics.length > 0 ? 40 : -1);
1157
1102
  i0.ɵɵadvance();
1158
- i0.ɵɵconditional(ctx_r1.record.TechnicalDescription || ctx_r1.EditMode ? 39 : -1);
1103
+ i0.ɵɵconditional(ctx_r1.showFiltersHelp ? 41 : -1);
1159
1104
  i0.ɵɵadvance();
1160
- i0.ɵɵconditional(ctx_r1.record.IsSaved ? 40 : -1);
1105
+ i0.ɵɵconditional(ctx_r1.record.TechnicalDescription || ctx_r1.EditMode ? 42 : -1);
1161
1106
  i0.ɵɵadvance();
1162
- i0.ɵɵconditional(ctx_r1.record.IsSaved ? 41 : -1);
1107
+ i0.ɵɵconditional(ctx_r1.record.IsSaved || ctx_r1.EditMode ? 43 : -1);
1163
1108
  i0.ɵɵadvance();
1164
- i0.ɵɵconditional(ctx_r1.record.IsSaved && ctx_r1.DependentQueries.length > 0 ? 42 : -1);
1109
+ i0.ɵɵconditional(ctx_r1.record.IsSaved || ctx_r1.EditMode ? 44 : -1);
1165
1110
  i0.ɵɵadvance();
1166
- i0.ɵɵconditional(ctx_r1.record.IsSaved ? 43 : -1);
1111
+ i0.ɵɵconditional(ctx_r1.record.IsSaved && ctx_r1.DependentQueries.length > 0 ? 45 : -1);
1112
+ i0.ɵɵadvance();
1113
+ i0.ɵɵconditional(ctx_r1.record.IsSaved || ctx_r1.EditMode ? 46 : -1);
1167
1114
  i0.ɵɵadvance();
1168
1115
  i0.ɵɵtwoWayProperty("Expanded", ctx_r1.detailsPanelExpanded);
1169
1116
  i0.ɵɵadvance(8);
1170
- i0.ɵɵconditional(ctx_r1.EditMode ? 52 : 53);
1117
+ i0.ɵɵconditional(ctx_r1.EditMode ? 55 : 56);
1171
1118
  i0.ɵɵadvance(6);
1172
- i0.ɵɵconditional(ctx_r1.EditMode ? 58 : 59);
1119
+ i0.ɵɵconditional(ctx_r1.EditMode ? 61 : 62);
1173
1120
  i0.ɵɵadvance(2);
1174
- i0.ɵɵconditional(ctx_r1.record.CacheEnabled ? 60 : -1);
1121
+ i0.ɵɵconditional(ctx_r1.record.CacheEnabled ? 63 : -1);
1175
1122
  i0.ɵɵadvance(5);
1176
- i0.ɵɵconditional(ctx_r1.EditMode ? 65 : 66);
1123
+ i0.ɵɵconditional(ctx_r1.EditMode ? 68 : 69);
1177
1124
  i0.ɵɵadvance(6);
1178
- i0.ɵɵconditional(ctx_r1.EditMode ? 71 : 72);
1125
+ i0.ɵɵconditional(ctx_r1.EditMode ? 74 : 75);
1179
1126
  i0.ɵɵadvance(7);
1180
1127
  i0.ɵɵtextInterpolate(ctx_r1.formatDate(ctx_r1.record.__mj_CreatedAt));
1181
1128
  i0.ɵɵadvance(6);
1182
1129
  i0.ɵɵtextInterpolate(ctx_r1.formatDate(ctx_r1.record.__mj_UpdatedAt));
1183
1130
  i0.ɵɵadvance();
1184
- i0.ɵɵconditional(ctx_r1.record.QualityRank != null ? 85 : -1);
1131
+ i0.ɵɵconditional(ctx_r1.record.QualityRank != null ? 88 : -1);
1132
+ i0.ɵɵadvance();
1133
+ i0.ɵɵconditional(ctx_r1.record.IsSaved ? 89 : -1);
1185
1134
  i0.ɵɵadvance();
1186
- i0.ɵɵconditional(ctx_r1.record.IsSaved ? 86 : -1);
1135
+ i0.ɵɵproperty("Visible", ctx_r1.ShowRefreshDialog)("Scope", ctx_r1.RefreshScope)("ScopeLabel", ctx_r1.RefreshScopeLabel)("AllowSkipDryRun", true)("Provider", ctx_r1.ProviderToUse);
1187
1136
  i0.ɵɵadvance();
1188
1137
  i0.ɵɵproperty("query", ctx_r1.record)("parameters", ctx_r1.queryParameters);
1189
1138
  i0.ɵɵtwoWayProperty("isVisible", ctx_r1.showRunDialog);
@@ -1249,6 +1198,13 @@ let MJQueryFormComponentExtended = class MJQueryFormComponentExtended extends MJ
1249
1198
  this.destroy$ = new Subject();
1250
1199
  this.isUpdatingEditorValue = false;
1251
1200
  this.isInitialLoad = true;
1201
+ // ─── Save-time diagnostics and extraction status ────────────────────────────
1202
+ /** Why the last save was refused, one finding per rule the SQL broke; empty after a successful save. */
1203
+ this.SaveDiagnostics = [];
1204
+ /** The refusal's headline, e.g. `Query "X" was not saved:`. */
1205
+ this.SaveDiagnosticsHeadline = null;
1206
+ // ─── Refresh metadata ───────────────────────────────────────────────────────
1207
+ this.ShowRefreshDialog = false;
1252
1208
  }
1253
1209
  /** @deprecated Use {@link QueryParameters}. */
1254
1210
  get queryParameters() {
@@ -1460,6 +1416,8 @@ let MJQueryFormComponentExtended = class MJQueryFormComponentExtended extends MJ
1460
1416
  }
1461
1417
  /** Custom-layout Query form looks best full-width on first open. */
1462
1418
  getDefaultFormWidthMode() { return 'full-width'; }
1419
+ /** Custom-layout form owns its entire body; suppress auto-filled relationship sections. */
1420
+ get OwnsEntireFormBody() { return true; }
1463
1421
  /** @deprecated Use {@link SqlEditor}. */
1464
1422
  get sqlEditor() {
1465
1423
  return this.SqlEditor;
@@ -1495,6 +1453,9 @@ let MJQueryFormComponentExtended = class MJQueryFormComponentExtended extends MJ
1495
1453
  this.LoadQueryPermissions();
1496
1454
  this.isInitialLoad = false;
1497
1455
  this.cdr.detectChanges();
1456
+ // The editable child rows come from the database, not the cache, so a save writes exactly
1457
+ // what the user saw and changed.
1458
+ await this.loadDeclaredChildren();
1498
1459
  }
1499
1460
  ngOnDestroy() {
1500
1461
  super.ngOnDestroy();
@@ -1521,8 +1482,11 @@ let MJQueryFormComponentExtended = class MJQueryFormComponentExtended extends MJ
1521
1482
  }
1522
1483
  CancelEdit() {
1523
1484
  super.CancelEdit();
1485
+ this.clearSaveDiagnostics();
1524
1486
  this.updateEditorValue(); // Reset editor value to record SQL
1525
1487
  this.SqlEditor?.setEditable(false);
1488
+ // Discard added, removed and edited child rows: reload them as stored.
1489
+ void this.loadDeclaredChildren(true).then(() => this.updateUnsavedChangesFlag());
1526
1490
  this.updateUnsavedChangesFlag(); // Reset unsaved changes flag
1527
1491
  }
1528
1492
  updateEditorValue() {
@@ -1539,6 +1503,8 @@ let MJQueryFormComponentExtended = class MJQueryFormComponentExtended extends MJ
1539
1503
  // Use the setValue method from mj-code-editor component
1540
1504
  this.SqlEditor.setValue(sqlValue);
1541
1505
  this.isUpdatingEditorValue = false;
1506
+ // Replacing the text drops the markers, so set them again for the new text.
1507
+ this.applyEditorMarkers();
1542
1508
  }, 0);
1543
1509
  }
1544
1510
  IsFormReadOnly() {
@@ -1549,8 +1515,9 @@ let MJQueryFormComponentExtended = class MJQueryFormComponentExtended extends MJ
1549
1515
  return this.IsFormReadOnly();
1550
1516
  }
1551
1517
  LoadQueryParameters() {
1552
- if (this.record && this.record.ID) {
1553
- this.QueryParameters = this.record.QueryParameters;
1518
+ if (this.record) {
1519
+ const declared = this.record.DeclaredParameters;
1520
+ this.QueryParameters = declared.IsLoaded || !this.record.IsSaved ? [...declared.Items] : this.record.QueryParameters;
1554
1521
  if (!this.isInitialLoad)
1555
1522
  this.cdr.detectChanges();
1556
1523
  }
@@ -1560,23 +1527,71 @@ let MJQueryFormComponentExtended = class MJQueryFormComponentExtended extends MJ
1560
1527
  return this.LoadQueryParameters();
1561
1528
  }
1562
1529
  LoadQueryFields() {
1563
- if (this.record && this.record.ID) {
1564
- this.QueryFields = this.record.QueryFields;
1530
+ if (this.record) {
1531
+ const declared = this.record.DeclaredFields;
1532
+ const rows = declared.IsLoaded || !this.record.IsSaved ? [...declared.Items] : this.record.QueryFields;
1533
+ this.QueryFields = this.fieldsVisibleToUser(rows);
1565
1534
  if (!this.isInitialLoad)
1566
1535
  this.cdr.detectChanges();
1567
1536
  }
1568
1537
  }
1538
+ /**
1539
+ * Leaves out the fields whose source the current user may not read: the user's results never
1540
+ * carry those columns, so the form does not name them either.
1541
+ */
1542
+ fieldsVisibleToUser(rows) {
1543
+ const provider = this.ProviderToUse;
1544
+ const visible = this.record.QueryFieldsVisibleTo(provider.CurrentUser, provider.Entities);
1545
+ return HideUnreadableFieldRows(rows, this.record.QueryFields, visible);
1546
+ }
1569
1547
  /** @deprecated Use {@link LoadQueryFields}. */
1570
1548
  loadQueryFields() {
1571
1549
  return this.LoadQueryFields();
1572
1550
  }
1573
1551
  LoadQueryEntities() {
1574
- if (this.record && this.record.ID) {
1575
- this.QueryEntities = this.record.QueryEntities;
1552
+ if (this.record) {
1553
+ const declared = this.record.DeclaredEntities;
1554
+ this.QueryEntities = declared.IsLoaded || !this.record.IsSaved ? [...declared.Items] : this.record.QueryEntities;
1576
1555
  if (!this.isInitialLoad)
1577
1556
  this.cdr.detectChanges();
1578
1557
  }
1579
1558
  }
1559
+ /**
1560
+ * Loads the query's parameters, fields and entity links into the declared collections, which
1561
+ * the form edits and the query's save writes as one unit (a graph save). `force` discards
1562
+ * unsaved changes to them.
1563
+ */
1564
+ async loadDeclaredChildren(force = false) {
1565
+ if (!this.record?.IsSaved) {
1566
+ this.refreshChildLists();
1567
+ return;
1568
+ }
1569
+ this.IsLoadingParameters = this.IsLoadingFields = this.IsLoadingEntities = true;
1570
+ this.cdr.detectChanges();
1571
+ try {
1572
+ await Promise.all([
1573
+ this.record.DeclaredParameters.Load(force),
1574
+ this.record.DeclaredFields.Load(force),
1575
+ this.record.DeclaredEntities.Load(force),
1576
+ ]);
1577
+ }
1578
+ catch (error) {
1579
+ console.error('Error loading the query\'s parameters, fields and entities:', error);
1580
+ MJNotificationService.Instance.CreateSimpleNotification('Could not load this query\'s parameters, fields and entities for editing; showing the cached copy.', 'warning', 5000);
1581
+ }
1582
+ finally {
1583
+ this.IsLoadingParameters = this.IsLoadingFields = this.IsLoadingEntities = false;
1584
+ this.refreshChildLists();
1585
+ }
1586
+ }
1587
+ /** Copies the declared collections into the lists the template shows. */
1588
+ refreshChildLists() {
1589
+ this.LoadQueryParameters();
1590
+ this.LoadQueryFields();
1591
+ this.LoadQueryEntities();
1592
+ this.updateUnsavedChangesFlag();
1593
+ this.cdr.detectChanges();
1594
+ }
1580
1595
  /** @deprecated Use {@link LoadQueryEntities}. */
1581
1596
  loadQueryEntities() {
1582
1597
  return this.LoadQueryEntities();
@@ -1721,8 +1736,12 @@ let MJQueryFormComponentExtended = class MJQueryFormComponentExtended extends MJ
1721
1736
  * Updates the hasUnsavedChanges flag based on entity dirty states
1722
1737
  */
1723
1738
  updateUnsavedChangesFlag() {
1724
- this.HasUnsavedChanges = this.QueryParameters.some(param => param.Dirty) ||
1725
- this.record?.Dirty || false;
1739
+ // The record's Dirty includes its declared collections (added, removed and edited rows).
1740
+ this.HasUnsavedChanges = this.record?.Dirty ?? false;
1741
+ }
1742
+ /** A child row's annotation changed in a grid. */
1743
+ OnChildRowChanged() {
1744
+ this.updateUnsavedChangesFlag();
1726
1745
  }
1727
1746
  ToggleFiltersHelp() {
1728
1747
  this.ShowFiltersHelp = !this.ShowFiltersHelp;
@@ -1772,25 +1791,17 @@ let MJQueryFormComponentExtended = class MJQueryFormComponentExtended extends MJ
1772
1791
  return this.OnRunDialogClose();
1773
1792
  }
1774
1793
  /**
1775
- * Add a new parameter
1794
+ * Adds a parameter the user declares. It is written with the query when the query is saved.
1776
1795
  */
1777
1796
  async AddParameter() {
1778
1797
  try {
1779
- const md = this.ProviderToUse;
1780
- const newParam = await md.GetEntityObject('MJ: Query Parameters');
1781
- newParam.QueryID = this.record.ID;
1782
- newParam.Name = `param${this.QueryParameters.length + 1}`;
1783
- newParam.Type = 'string';
1784
- newParam.IsRequired = false;
1785
- const saved = await newParam.Save();
1786
- if (saved) {
1787
- this.QueryParameters.push(newParam);
1788
- this.updateUnsavedChangesFlag();
1789
- MJNotificationService.Instance.CreateSimpleNotification('Parameter added successfully', 'success', 3000);
1790
- }
1791
- else {
1792
- MJNotificationService.Instance.CreateSimpleNotification('Failed to add parameter', 'error', 3000);
1793
- }
1798
+ const param = await this.record.DeclaredParameters.Create();
1799
+ param.Name = `param${this.QueryParameters.length + 1}`;
1800
+ param.Type = 'string';
1801
+ param.IsRequired = false;
1802
+ param.DetectionMethod = 'Manual';
1803
+ this.ParametersPanelExpanded = true;
1804
+ this.refreshChildLists();
1794
1805
  }
1795
1806
  catch (error) {
1796
1807
  console.error('Error adding parameter:', error);
@@ -1813,50 +1824,29 @@ let MJQueryFormComponentExtended = class MJQueryFormComponentExtended extends MJ
1813
1824
  return this.EditParameter(param);
1814
1825
  }
1815
1826
  /**
1816
- * Delete a parameter
1827
+ * Removes a parameter. A stored one is deleted when the query is saved.
1817
1828
  */
1818
1829
  async DeleteParameter(param) {
1819
- if (!(await this.confirmService.ConfirmDelete({ title: 'Delete Parameter', message: `Delete parameter "${param.Name}"?` }))) {
1830
+ if (!(await this.confirmService.ConfirmDelete({ title: 'Remove Parameter', message: `Remove parameter "${param.Name}"? It is deleted when you save the query.` }))) {
1820
1831
  return;
1821
1832
  }
1822
- try {
1823
- // Reload the parameter entity fresh to ensure we have a clean copy
1824
- // not tied to any form transaction state
1825
- const md = this.ProviderToUse;
1826
- const freshParam = await md.GetEntityObject('MJ: Query Parameters');
1827
- const loaded = await freshParam.Load(param.ID);
1828
- if (!loaded) {
1829
- MJNotificationService.Instance.CreateSimpleNotification('Could not load parameter record. It may have already been deleted.', 'warning', 3000);
1830
- // Remove from local list anyway since it doesn't exist
1831
- this.removeParameterFromList(param);
1832
- return;
1833
- }
1834
- const deleted = await freshParam.Delete();
1835
- if (deleted) {
1836
- this.removeParameterFromList(param);
1837
- MJNotificationService.Instance.CreateSimpleNotification('Parameter deleted successfully', 'success', 3000);
1838
- }
1839
- else {
1840
- const errorDetail = freshParam.LatestResult?.CompleteMessage ?? 'Unknown reason';
1841
- console.error('Failed to delete parameter:', errorDetail);
1842
- MJNotificationService.Instance.CreateSimpleNotification(`Failed to delete parameter: ${errorDetail}`, 'error', 5000);
1843
- }
1844
- }
1845
- catch (error) {
1846
- console.error('Error deleting parameter:', error);
1847
- MJNotificationService.Instance.CreateSimpleNotification('Error deleting parameter', 'error', 3000);
1848
- }
1833
+ this.removeChildRow(this.record.DeclaredParameters.Items, row => this.record.DeclaredParameters.Remove(row), param);
1849
1834
  }
1850
1835
  /** @deprecated Use {@link DeleteParameter}. */
1851
1836
  async deleteParameter(param) {
1852
1837
  return this.DeleteParameter(param);
1853
1838
  }
1854
- removeParameterFromList(param) {
1855
- const index = this.QueryParameters.indexOf(param);
1856
- if (index > -1) {
1857
- this.QueryParameters.splice(index, 1);
1839
+ /**
1840
+ * Removes a row from one of the declared collections and refreshes the lists. A row the form
1841
+ * shows from the cache (the collections could not be loaded) cannot be removed this way.
1842
+ */
1843
+ removeChildRow(items, remove, row) {
1844
+ if (!items.includes(row)) {
1845
+ MJNotificationService.Instance.CreateSimpleNotification('This row cannot be removed here; reload the query and try again.', 'warning', 4000);
1846
+ return;
1858
1847
  }
1859
- this.cdr.detectChanges();
1848
+ remove(row);
1849
+ this.refreshChildLists();
1860
1850
  }
1861
1851
  /**
1862
1852
  * Create a new Query Category in a slide-in via the generic
@@ -1977,34 +1967,153 @@ let MJQueryFormComponentExtended = class MJQueryFormComponentExtended extends MJ
1977
1967
  }
1978
1968
  }
1979
1969
  }
1980
- // Save any unsaved query entities first
1981
- if (this.EditMode) {
1982
- for (const entity of this.QueryEntities) {
1983
- if (!entity.IsSaved && entity.EntityID) {
1984
- try {
1985
- await entity.Save();
1986
- }
1987
- catch (error) {
1988
- console.error('Error saving query entity:', error);
1989
- }
1990
- }
1991
- }
1970
+ // An entity link with no entity chosen yet is not saved with the query.
1971
+ for (const link of [...this.record.DeclaredEntities.Items]) {
1972
+ if (!link.IsSaved && !link.EntityID)
1973
+ this.record.DeclaredEntities.Remove(link);
1992
1974
  }
1993
- // Call the parent save method
1975
+ // One graph save: the query row and its declared parameters, fields and entity links are
1976
+ // written together, so the server's extraction sees the children in the same transaction.
1994
1977
  const result = await super.SaveRecord(StopEditModeAfterSave);
1995
1978
  if (result) {
1996
- this.updateUnsavedChangesFlag();
1997
- // Reload related data after successful save as server-side processes may have updated them
1998
- if (this.record && this.record.ID) {
1999
- this.LoadQueryParameters();
2000
- this.LoadQueryFields();
2001
- this.LoadQueryEntities();
2002
- this.updateCategoryPathDisplay();
2003
- this.cdr.detectChanges();
2004
- }
1979
+ this.clearSaveDiagnostics();
1980
+ // The server re-derives facts after the save, so reload the rows as now stored.
1981
+ await this.loadDeclaredChildren(true);
1982
+ this.updateCategoryPathDisplay();
1983
+ this.applyEditorMarkers();
1984
+ this.cdr.detectChanges();
1985
+ }
1986
+ else {
1987
+ this.showSaveDiagnostics();
2005
1988
  }
2006
1989
  return result;
2007
1990
  }
1991
+ /**
1992
+ * Saves the query with its declared parameters, fields and entity links as one graph save, then
1993
+ * any permission rows the permissions grid queued, in a transaction group of their own.
1994
+ *
1995
+ * The base form enrols the record in a transaction group whenever rows are queued, and a graph
1996
+ * save cannot run inside one (the group defers the query's own write, so its children would be
1997
+ * written against a row that does not exist yet). The query is therefore written first; if a
1998
+ * permission row then fails, the query stays saved and the save reports the failure.
1999
+ */
2000
+ async InternalSaveRecord() {
2001
+ if (!this.record)
2002
+ return false;
2003
+ if (!(await this.record.Save()))
2004
+ return false;
2005
+ return this.savePendingRows();
2006
+ }
2007
+ async savePendingRows() {
2008
+ const pending = this.PendingRecords;
2009
+ if (pending.length === 0)
2010
+ return true;
2011
+ const tg = await this.ProviderToUse.CreateTransactionGroup();
2012
+ try {
2013
+ for (const item of pending) {
2014
+ item.entityObject.TransactionGroup = tg;
2015
+ if (item.action === 'save')
2016
+ await item.entityObject.Save();
2017
+ else
2018
+ await item.entityObject.Delete();
2019
+ }
2020
+ return await tg.Submit();
2021
+ }
2022
+ finally {
2023
+ // A member left in a submitted group would queue its next write into a group that is done.
2024
+ for (const item of pending) {
2025
+ if (item.entityObject.TransactionGroup === tg)
2026
+ item.entityObject.TransactionGroup = null;
2027
+ }
2028
+ }
2029
+ }
2030
+ /** The findings of the query's last metadata extraction (`ExtractionMessage`), one per line. */
2031
+ get ExtractionDiagnostics() {
2032
+ return ParseQueryDiagnostics(this.record?.ExtractionMessage);
2033
+ }
2034
+ /** The extraction status as the badge shows it. */
2035
+ get ExtractionStatusLabel() {
2036
+ return this.record?.ExtractionStatus ?? 'Not extracted';
2037
+ }
2038
+ /** CSS modifier for the extraction status badge. */
2039
+ get ExtractionStatusClass() {
2040
+ return `extraction-badge--${(this.record?.ExtractionStatus ?? 'none').toLowerCase()}`;
2041
+ }
2042
+ /** How serious the extraction message is, for the diagnostics list. */
2043
+ get ExtractionSeverity() {
2044
+ return ExtractionSeverityOf(this.record?.ExtractionStatus);
2045
+ }
2046
+ showSaveDiagnostics() {
2047
+ const refusal = SaveRefusalOf(this.record.LatestResult?.Message || this.record.LatestResult?.CompleteMessage);
2048
+ this.SaveDiagnostics = refusal ? [...refusal.Diagnostics] : [];
2049
+ this.SaveDiagnosticsHeadline = refusal?.Headline ?? null;
2050
+ if (refusal)
2051
+ this.SqlPanelExpanded = true;
2052
+ this.applyEditorMarkers();
2053
+ this.cdr.detectChanges();
2054
+ }
2055
+ clearSaveDiagnostics() {
2056
+ this.SaveDiagnostics = [];
2057
+ this.SaveDiagnosticsHeadline = null;
2058
+ }
2059
+ /**
2060
+ * Marks findings in the SQL editor: a refused save's findings as errors while there are any,
2061
+ * otherwise the last extraction's findings that carry a location.
2062
+ */
2063
+ applyEditorMarkers() {
2064
+ this.SqlEditor?.SetDiagnosticMarkers(EditorMarkersFor(this.SaveDiagnostics, this.ExtractionDiagnostics, this.record?.ExtractionStatus));
2065
+ }
2066
+ /** A finding's location was clicked: show that place in the SQL editor. */
2067
+ OnDiagnosticLocationClick(diagnostic) {
2068
+ if (diagnostic.Line === null || diagnostic.Column === null)
2069
+ return;
2070
+ this.SqlPanelExpanded = true;
2071
+ this.cdr.detectChanges();
2072
+ this.SqlEditor?.RevealPosition(diagnostic.Line, diagnostic.Column);
2073
+ }
2074
+ /** This query, as the refresh dialog's scope. */
2075
+ get RefreshScope() {
2076
+ return this.record?.IsSaved ? { Kind: 'Queries', QueryIDs: [this.record.ID] } : null;
2077
+ }
2078
+ /** Names this query in the refresh dialog. */
2079
+ get RefreshScopeLabel() {
2080
+ return `Query “${this.record?.Name ?? ''}”`;
2081
+ }
2082
+ /** Whether the user may refresh this query's metadata: a saved query, not being edited, and Update permission on queries. */
2083
+ get CanRefreshMetadata() {
2084
+ if (!this.record?.IsSaved || this.EditMode)
2085
+ return false;
2086
+ const user = this.ProviderToUse.CurrentUser;
2087
+ return !!user && !!this.record.EntityInfo?.GetUserPermisions(user)?.CanUpdate;
2088
+ }
2089
+ OpenRefreshDialog() {
2090
+ this.ShowRefreshDialog = true;
2091
+ this.cdr.detectChanges();
2092
+ }
2093
+ OnRefreshDialogClosed() {
2094
+ this.ShowRefreshDialog = false;
2095
+ this.cdr.detectChanges();
2096
+ }
2097
+ /** A refresh was applied: reload the query row (its extraction status) and its child rows. */
2098
+ async OnRefreshApplied(_output) {
2099
+ try {
2100
+ await this.record.Load(this.record.ID);
2101
+ }
2102
+ catch (error) {
2103
+ console.error('Error reloading the query after a refresh:', error);
2104
+ }
2105
+ await this.loadDeclaredChildren(true);
2106
+ this.applyEditorMarkers();
2107
+ this.cdr.detectChanges();
2108
+ }
2109
+ /** Opens a query named in the refresh report. */
2110
+ OnRefreshOpenQuery(queryID) {
2111
+ this.navigationService.OpenEntityRecord('MJ: Queries', CompositeKey.FromID(queryID));
2112
+ }
2113
+ /** Opens the entity field a query column comes from. */
2114
+ OnOpenSourceField(entityFieldID) {
2115
+ this.navigationService.OpenEntityRecord('MJ: Entity Fields', CompositeKey.FromID(entityFieldID));
2116
+ }
2008
2117
  GetStatusBadgeColor() {
2009
2118
  switch (this.record?.Status) {
2010
2119
  case 'Approved': return '#28a745';
@@ -2102,25 +2211,20 @@ let MJQueryFormComponentExtended = class MJQueryFormComponentExtended extends MJ
2102
2211
  return this.OnSQLChange(value);
2103
2212
  }
2104
2213
  /**
2105
- * Add a new field
2214
+ * Adds a field the user declares, by name. Its facts (type, nullability, source) come from the
2215
+ * database server when the query is saved; the user supplies the annotations.
2106
2216
  */
2107
2217
  async AddField() {
2108
2218
  try {
2109
- const md = this.ProviderToUse;
2110
- const newField = await md.GetEntityObject('MJ: Query Fields');
2111
- newField.QueryID = this.record.ID;
2112
- newField.Name = `field${this.QueryFields.length + 1}`;
2113
- newField.Description = '';
2114
- newField.Sequence = (this.QueryFields.length + 1) * 10;
2115
- newField.SQLBaseType = 'nvarchar';
2116
- newField.SQLFullType = 'nvarchar(255)';
2117
- const saved = await newField.Save();
2118
- if (saved) {
2119
- this.QueryFields.push(newField);
2120
- this.QueryFields.sort((a, b) => (a.Sequence || 0) - (b.Sequence || 0));
2121
- this.updateUnsavedChangesFlag();
2122
- MJNotificationService.Instance.CreateSimpleNotification('Field added successfully', 'success', 3000);
2123
- }
2219
+ const field = await this.record.DeclaredFields.Create();
2220
+ field.Name = `field${this.QueryFields.length + 1}`;
2221
+ field.Description = '';
2222
+ field.Sequence = this.QueryFields.length + 1;
2223
+ field.SQLBaseType = 'nvarchar';
2224
+ field.SQLFullType = 'nvarchar(255)';
2225
+ field.DetectionMethod = 'Manual';
2226
+ this.FieldsPanelExpanded = true;
2227
+ this.refreshChildLists();
2124
2228
  }
2125
2229
  catch (error) {
2126
2230
  console.error('Error adding field:', error);
@@ -2132,53 +2236,27 @@ let MJQueryFormComponentExtended = class MJQueryFormComponentExtended extends MJ
2132
2236
  return this.AddField();
2133
2237
  }
2134
2238
  /**
2135
- * Delete a field
2239
+ * Removes a field. A stored one is deleted when the query is saved.
2136
2240
  */
2137
2241
  async DeleteField(field) {
2138
- if (!(await this.confirmService.ConfirmDelete({ title: 'Delete Field', message: `Delete field "${field.Name}"?` }))) {
2242
+ if (!(await this.confirmService.ConfirmDelete({ title: 'Remove Field', message: `Remove field "${field.Name}"? It is deleted when you save the query.` }))) {
2139
2243
  return;
2140
2244
  }
2141
- try {
2142
- const md = this.ProviderToUse;
2143
- const freshField = await md.GetEntityObject('MJ: Query Fields');
2144
- const loaded = await freshField.Load(field.ID);
2145
- if (!loaded) {
2146
- this.QueryFields = this.QueryFields.filter(f => !UUIDsEqual(f.ID, field.ID));
2147
- this.cdr.detectChanges();
2148
- return;
2149
- }
2150
- const deleted = await freshField.Delete();
2151
- if (deleted) {
2152
- this.QueryFields = this.QueryFields.filter(f => !UUIDsEqual(f.ID, field.ID));
2153
- this.updateUnsavedChangesFlag();
2154
- MJNotificationService.Instance.CreateSimpleNotification('Field deleted successfully', 'success', 3000);
2155
- }
2156
- else {
2157
- const errorDetail = freshField.LatestResult?.CompleteMessage ?? 'Unknown reason';
2158
- console.error('Failed to delete field:', errorDetail);
2159
- MJNotificationService.Instance.CreateSimpleNotification(`Failed to delete field: ${errorDetail}`, 'error', 5000);
2160
- }
2161
- }
2162
- catch (error) {
2163
- console.error('Error deleting field:', error);
2164
- MJNotificationService.Instance.CreateSimpleNotification('Failed to delete field', 'error', 3000);
2165
- }
2245
+ this.removeChildRow(this.record.DeclaredFields.Items, row => this.record.DeclaredFields.Remove(row), field);
2166
2246
  }
2167
2247
  /** @deprecated Use {@link DeleteField}. */
2168
2248
  async deleteField(field) {
2169
2249
  return this.DeleteField(field);
2170
2250
  }
2171
2251
  /**
2172
- * Add a new entity
2252
+ * Adds an entity link the user declares. It is written with the query when the query is saved.
2173
2253
  */
2174
2254
  async AddEntity() {
2175
2255
  try {
2176
- const md = this.ProviderToUse;
2177
- const newEntity = await md.GetEntityObject('MJ: Query Entities');
2178
- newEntity.QueryID = this.record.ID;
2179
- // Add to the list immediately for UI responsiveness
2180
- this.QueryEntities.push(newEntity);
2181
- this.updateUnsavedChangesFlag();
2256
+ const entity = await this.record.DeclaredEntities.Create();
2257
+ entity.DetectionMethod = 'Manual';
2258
+ this.EntitiesPanelExpanded = true;
2259
+ this.refreshChildLists();
2182
2260
  }
2183
2261
  catch (error) {
2184
2262
  console.error('Error adding entity:', error);
@@ -2190,37 +2268,13 @@ let MJQueryFormComponentExtended = class MJQueryFormComponentExtended extends MJ
2190
2268
  return this.AddEntity();
2191
2269
  }
2192
2270
  /**
2193
- * Delete an entity
2271
+ * Removes an entity link. A stored one is deleted when the query is saved.
2194
2272
  */
2195
2273
  async DeleteEntity(entity) {
2196
- if (!(await this.confirmService.ConfirmDelete({ title: 'Delete Entity', message: `Delete entity "${entity.Entity}"?` }))) {
2274
+ if (!(await this.confirmService.ConfirmDelete({ title: 'Remove Entity', message: `Remove entity "${entity.Entity || 'this entity'}"? It is deleted when you save the query.` }))) {
2197
2275
  return;
2198
2276
  }
2199
- try {
2200
- const md = this.ProviderToUse;
2201
- const freshEntity = await md.GetEntityObject('MJ: Query Entities');
2202
- const loaded = await freshEntity.Load(entity.ID);
2203
- if (!loaded) {
2204
- this.QueryEntities = this.QueryEntities.filter(e => !UUIDsEqual(e.ID, entity.ID));
2205
- this.cdr.detectChanges();
2206
- return;
2207
- }
2208
- const deleted = await freshEntity.Delete();
2209
- if (deleted) {
2210
- this.QueryEntities = this.QueryEntities.filter(e => !UUIDsEqual(e.ID, entity.ID));
2211
- this.updateUnsavedChangesFlag();
2212
- MJNotificationService.Instance.CreateSimpleNotification('Entity deleted successfully', 'success', 3000);
2213
- }
2214
- else {
2215
- const errorDetail = freshEntity.LatestResult?.CompleteMessage ?? 'Unknown reason';
2216
- console.error('Failed to delete entity:', errorDetail);
2217
- MJNotificationService.Instance.CreateSimpleNotification(`Failed to delete entity: ${errorDetail}`, 'error', 5000);
2218
- }
2219
- }
2220
- catch (error) {
2221
- console.error('Error deleting entity:', error);
2222
- MJNotificationService.Instance.CreateSimpleNotification('Failed to delete entity', 'error', 3000);
2223
- }
2277
+ this.removeChildRow(this.record.DeclaredEntities.Items, row => this.record.DeclaredEntities.Remove(row), entity);
2224
2278
  }
2225
2279
  /** @deprecated Use {@link DeleteEntity}. */
2226
2280
  async deleteEntity(entity) {
@@ -2251,11 +2305,11 @@ let MJQueryFormComponentExtended = class MJQueryFormComponentExtended extends MJ
2251
2305
  } if (rf & 2) {
2252
2306
  let _t;
2253
2307
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.SqlEditor = _t.first);
2254
- } }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["form", "ngForm"], ["sqlEditor", ""], [3, "Navigate", "DeleteRequested", "FavoriteToggled", "HistoryRequested", "ListManagementRequested", "Record", "FormComponent", "ToolbarConfig", "IsSaving", "WidthMode"], [1, "record-form", 2, "display", "flex", "flex-direction", "column", "height", "100%", "overflow", "hidden"], [1, "saving-overlay"], [1, "query-header"], [1, "query-header-content"], [1, "query-header-top"], [1, "query-name-section"], [1, "fa-solid", "fa-database", "query-title-icon"], ["name", "queryName", "placeholder", "Enter query name...", 1, "mj-input", "query-name-input", 3, "ngModel"], [1, "query-name-display"], [1, "query-header-actions"], ["mjButton", "", "variant", "primary", "title", "Run Query", 1, "run-query-btn", 3, "disabled"], [1, "query-meta-row"], [1, "query-meta-item"], [1, "meta-label"], [1, "meta-dropdown-row"], [1, "meta-value"], ["name", "status", "TextField", "text", "ValueField", "value", 1, "meta-dropdown", "status-dropdown", 3, "ngModel", "Data", "ValuePrimitive"], [1, "status-pill", 3, "background"], [1, "query-description-row"], ["Variant", "warning"], [1, "query-content"], [1, "query-panel", 3, "ExpandedChange", "Expanded"], ["mjAccordionTitle", ""], [1, "sql-panel-toolbar", 2, "display", "flex", "justify-content", "flex-end", "padding", "4px 0 8px"], ["type", "button", "mjButton", "", "variant", "flat", "title", "Show/hide SQL filters help", 1, "filters-help-btn", 3, "click"], [1, "fa-solid", "fa-question-circle"], [1, "fa-solid", 3, "ngClass"], [1, "sql-panel-content"], [1, "sql-editor", 3, "change", "CompositionTokenClick", "language"], [1, "filters-help"], [1, "query-panel", 3, "Expanded"], [1, "panel-body"], [1, "details-grid"], [1, "detail-item"], [1, "detail-label"], [1, "fa-solid", "fa-puzzle-piece"], [1, "detail-value"], [1, "fa-solid", "fa-bolt"], [1, "fa-solid", "fa-clipboard-list"], [1, "fa-solid", "fa-file-code"], ["name", "usesTemplate", 3, "ngModel"], [1, "fa-solid", "fa-calendar-plus"], [1, "fa-solid", "fa-calendar-check"], [3, "isVisibleChange", "onClose", "query", "parameters", "isVisible"], [1, "fa-solid", "fa-spinner", "fa-spin", "saving-spinner"], ["name", "queryName", "placeholder", "Enter query name...", 1, "mj-input", "query-name-input", 3, "ngModelChange", "ngModel"], ["mjButton", "", "variant", "primary", "title", "Run Query", 1, "run-query-btn", 3, "click", "disabled"], [1, "fa-solid", "fa-play"], [1, "meta-dropdown", 3, "ValueChange", "BranchConfig", "Value", "SelectableTypes", "SelectionMode", "Placeholder", "EnableSearch", "Clearable"], ["mjButton", "", "variant", "icon", "title", "New category", 3, "click"], [1, "fa-solid", "fa-plus"], ["mjButton", "", "variant", "icon", "title", "Edit category"], ["mjButton", "", "variant", "icon", "title", "Edit category", 3, "click"], [1, "fa-solid", "fa-pen"], ["name", "status", "TextField", "text", "ValueField", "value", 1, "meta-dropdown", "status-dropdown", 3, "ngModelChange", "ngModel", "Data", "ValuePrimitive"], [1, "status-pill"], [1, "fa-solid"], ["name", "description", "rows", "2", "placeholder", "Enter query description...", 1, "mj-input", "query-description-input", 3, "ngModel"], [1, "query-description-text"], ["name", "description", "rows", "2", "placeholder", "Enter query description...", 1, "mj-input", "query-description-input", 3, "ngModelChange", "ngModel"], [1, "panel-title-row"], [1, "panel-title"], [1, "fa-solid", "fa-code", "panel-icon", "sql-icon"], [1, "panel-badge", "defined"], [1, "filters-help-title"], [1, "fa-solid", "fa-filter"], [1, "filters-grid"], [1, "filter-card"], [1, "filter-name"], [1, "filter-description"], [1, "filter-syntax"], [1, "filter-notes"], [1, "technical-description-view"], [1, "fa-solid", "fa-book", "panel-icon"], ["name", "technicalDescription", "rows", "8", "placeholder", "Technical documentation of the query logic, performance considerations, and parameter usage. Supports markdown and mermaid diagrams.", 1, "mj-input", "technical-description-textarea", 3, "ngModelChange", "ngModel"], [1, "technical-description-preview"], [1, "preview-label"], [1, "fa-solid", "fa-eye"], [3, "data", "enableMermaid", "enableHighlight", "enableCollapsibleHeadings", "enableSmartypants"], [1, "panel-loading"], [1, "fa-solid", "fa-sliders", "panel-icon"], [1, "panel-badge", "count"], ["text", "Loading parameters..."], ["Icon", "fa-solid fa-sliders", "Title", "No Parameters Defined", "Message", "Add parameters to make your query dynamic and reusable.", "ActionIcon", "fa-solid fa-plus", 3, "ActionText"], ["Icon", "fa-solid fa-sliders", "Title", "No Parameters Defined", "Message", "Add parameters to make your query dynamic and reusable.", "ActionIcon", "fa-solid fa-plus", 3, "Action", "ActionText"], [1, "panel-toolbar"], [1, "card-grid"], [1, "item-card", 3, "required"], ["type", "button", 1, "add-item-btn", 3, "click"], [1, "item-card", 3, "click"], [1, "item-card-header"], [1, "item-name"], [1, "fa-solid", "fa-at", "item-name-icon", "param-icon"], [1, "item-badges"], [1, "item-badge", "required"], [1, "item-card-body"], [1, "item-description"], [1, "item-meta"], [1, "meta-tag"], [1, "item-actions"], [1, "meta-code"], [1, "item-actions", 3, "click"], ["type", "button", "title", "Edit parameter", 1, "item-action-btn", 3, "click"], ["type", "button", "title", "Delete parameter", 1, "item-action-btn", "delete", 3, "click"], [1, "fa-solid", "fa-trash"], [1, "fa-solid", "fa-table", "panel-icon"], ["text", "Loading fields..."], ["Icon", "fa-solid fa-table", "Title", "No Fields Defined", "Message", "Define output fields for your query results.", "ActionIcon", "fa-solid fa-plus", 3, "ActionText"], ["Icon", "fa-solid fa-table", "Title", "No Fields Defined", "Message", "Define output fields for your query results.", "ActionIcon", "fa-solid fa-plus", 3, "Action", "ActionText"], [1, "item-card"], [1, "fa-solid", "fa-columns", "item-name-icon", "field-icon"], [1, "item-badge", "type"], [1, "item-badge", "sequence"], [1, "fa-solid", "fa-code"], [1, "item-card-actions"], ["type", "button", "title", "Delete field", 1, "item-action-btn", "delete", 3, "click"], [1, "dependents-description"], [1, "item-card", "dependent-card"], [1, "fa-solid", "fa-arrow-left", "panel-icon", "dependents-icon"], [1, "item-card", "dependent-card", 3, "click"], [1, "fa-solid", "fa-arrow-left", "item-name-icon", "dependent-query-icon"], [1, "item-card-footer"], [1, "open-link"], [1, "fa-solid", "fa-arrow-up-right-from-square"], [1, "fa-solid", "fa-link"], [1, "fa-solid", "fa-database", "panel-icon"], ["text", "Loading entities..."], ["Icon", "fa-solid fa-database", "Title", "No Entities Tracked", "Message", "Track which entities this query uses for documentation.", "ActionIcon", "fa-solid fa-plus", 3, "ActionText"], ["Icon", "fa-solid fa-database", "Title", "No Entities Tracked", "Message", "Track which entities this query uses for documentation.", "ActionIcon", "fa-solid fa-plus", 3, "Action", "ActionText"], [1, "fa-solid", "fa-table", "item-name-icon", "entity-icon"], [1, "entity-dropdown-wrapper"], ["TextField", "text", "ValueField", "id", "Placeholder", "Select entity...", 1, "entity-dropdown", 3, "ngModelChange", "ngModel", "name", "Data", "ValuePrimitive"], [1, "fa-solid", "fa-database"], ["type", "button", "title", "Delete entity", 1, "item-action-btn", "delete", 3, "click"], [1, "fa-solid", "fa-info-circle", "panel-icon"], ["name", "reusable", 3, "ngModelChange", "ngModel"], [1, "detail-hint"], [1, "detail-tag", "positive"], [1, "detail-tag", "neutral"], [1, "fa-solid", "fa-check"], [1, "fa-solid", "fa-times"], ["name", "cacheEnabled", 3, "ngModelChange", "ngModel"], [1, "fa-solid", "fa-clock"], ["type", "number", "name", "cacheTTLMinutes", "min", "1", "placeholder", "Default", 1, "mj-input", "detail-input-narrow", 3, "ngModelChange", "ngModel"], ["name", "auditQueryRuns", 3, "ngModelChange", "ngModel"], ["name", "usesTemplate", 3, "ngModelChange", "ngModel"], [1, "fa-solid", "fa-star"], [1, "fa-solid", "fa-shield-alt", "panel-icon"], ["text", "Loading permissions..."], ["Icon", "fa-solid fa-shield-halved", "Title", "No Permissions Set", "Message", "This query uses default permissions."], [3, "Params", "NewRecordValues", "AllowLoad", "ShowToolbar"], [1, "permissions-list"], [1, "permission-card"], [1, "fa-solid", "fa-users", "permission-icon"], [1, "permission-info"], [1, "permission-role"], [1, "permission-type"], [1, "permission-badge"]], template: function MJQueryFormComponentExtended_Template(rf, ctx) { if (rf & 1) {
2255
- i0.ɵɵconditionalCreate(0, MJQueryFormComponentExtended_Conditional_0_Template, 88, 38);
2308
+ } }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["form", "ngForm"], ["sqlEditor", ""], [3, "Navigate", "DeleteRequested", "FavoriteToggled", "HistoryRequested", "ListManagementRequested", "Record", "FormComponent", "ToolbarConfig", "IsSaving", "WidthMode"], [1, "record-form", 2, "display", "flex", "flex-direction", "column", "height", "100%", "overflow", "hidden"], [1, "saving-overlay"], [1, "query-header"], [1, "query-header-content"], [1, "query-header-top"], [1, "query-name-section"], [1, "fa-solid", "fa-database", "query-title-icon"], ["name", "queryName", "placeholder", "Enter query name...", 1, "mj-input", "query-name-input", 3, "ngModel"], [1, "query-name-display"], [1, "query-header-actions"], ["mjButton", "", "variant", "primary", "title", "Run Query", 1, "run-query-btn", 3, "disabled"], [1, "query-meta-row"], [1, "query-meta-item"], [1, "meta-label"], [1, "meta-dropdown-row"], [1, "meta-value"], ["name", "status", "TextField", "text", "ValueField", "value", 1, "meta-dropdown", "status-dropdown", 3, "ngModel", "Data", "ValuePrimitive"], [1, "status-pill", 3, "background"], [1, "query-description-row"], ["Variant", "warning"], [1, "query-content"], [1, "query-panel", 3, "ExpandedChange", "Expanded"], ["mjAccordionTitle", ""], [1, "sql-panel-toolbar", 2, "display", "flex", "justify-content", "flex-end", "padding", "4px 0 8px"], ["type", "button", "mjButton", "", "variant", "flat", "title", "Show/hide SQL filters help", 1, "filters-help-btn", 3, "click"], [1, "fa-solid", "fa-question-circle"], [1, "fa-solid", 3, "ngClass"], [1, "sql-panel-content"], ["Severity", "error", 1, "save-diagnostics", 3, "Headline", "Diagnostics", "LocationsClickable"], [1, "sql-editor", 3, "change", "CompositionTokenClick", "language"], [1, "extraction-diagnostics", 3, "Headline", "Diagnostics", "Severity", "LocationsClickable"], [1, "filters-help"], [1, "query-panel", 3, "Expanded"], [1, "panel-body"], [1, "details-grid"], [1, "detail-item"], [1, "detail-label"], [1, "fa-solid", "fa-puzzle-piece"], [1, "detail-value"], [1, "fa-solid", "fa-bolt"], [1, "fa-solid", "fa-clipboard-list"], [1, "fa-solid", "fa-file-code"], ["name", "usesTemplate", 3, "ngModel"], [1, "fa-solid", "fa-calendar-plus"], [1, "fa-solid", "fa-calendar-check"], [3, "Closed", "Applied", "Visible", "Scope", "ScopeLabel", "AllowSkipDryRun", "Provider"], [3, "isVisibleChange", "onClose", "query", "parameters", "isVisible"], [1, "fa-solid", "fa-spinner", "fa-spin", "saving-spinner"], ["name", "queryName", "placeholder", "Enter query name...", 1, "mj-input", "query-name-input", 3, "ngModelChange", "ngModel"], ["mjButton", "", "variant", "primary", "title", "Run Query", 1, "run-query-btn", 3, "click", "disabled"], [1, "fa-solid", "fa-play"], [1, "meta-dropdown", 3, "ValueChange", "BranchConfig", "Value", "SelectableTypes", "SelectionMode", "Placeholder", "EnableSearch", "Clearable"], ["mjButton", "", "variant", "icon", "title", "New category", 3, "click"], [1, "fa-solid", "fa-plus"], ["mjButton", "", "variant", "icon", "title", "Edit category"], ["mjButton", "", "variant", "icon", "title", "Edit category", 3, "click"], [1, "fa-solid", "fa-pen"], ["name", "status", "TextField", "text", "ValueField", "value", 1, "meta-dropdown", "status-dropdown", 3, "ngModelChange", "ngModel", "Data", "ValuePrimitive"], [1, "status-pill"], [1, "fa-solid"], [1, "extraction-badge", 3, "title"], ["mjButton", "", "Variant", "outline", "Size", "sm", "type", "button", "title", "Re-derive the fields, parameters and entities from the SQL and the database server", 1, "refresh-metadata-btn"], ["mjButton", "", "Variant", "outline", "Size", "sm", "type", "button", "title", "Re-derive the fields, parameters and entities from the SQL and the database server", 1, "refresh-metadata-btn", 3, "click"], [1, "fa-solid", "fa-rotate"], ["name", "description", "rows", "2", "placeholder", "Enter query description...", 1, "mj-input", "query-description-input", 3, "ngModel"], [1, "query-description-text"], ["name", "description", "rows", "2", "placeholder", "Enter query description...", 1, "mj-input", "query-description-input", 3, "ngModelChange", "ngModel"], [1, "panel-title-row"], [1, "panel-title"], [1, "fa-solid", "fa-code", "panel-icon", "sql-icon"], [1, "panel-badge", "defined"], ["Severity", "error", 1, "save-diagnostics", 3, "LocationClick", "Headline", "Diagnostics", "LocationsClickable"], [1, "extraction-diagnostics", 3, "LocationClick", "Headline", "Diagnostics", "Severity", "LocationsClickable"], [1, "filters-help-title"], [1, "fa-solid", "fa-filter"], [1, "filters-grid"], [1, "filter-card"], [1, "filter-name"], [1, "filter-description"], [1, "filter-syntax"], [1, "filter-notes"], [1, "technical-description-view"], [1, "fa-solid", "fa-book", "panel-icon"], ["name", "technicalDescription", "rows", "8", "placeholder", "Technical documentation of the query logic, performance considerations, and parameter usage. Supports markdown and mermaid diagrams.", 1, "mj-input", "technical-description-textarea", 3, "ngModelChange", "ngModel"], [1, "technical-description-preview"], [1, "preview-label"], [1, "fa-solid", "fa-eye"], [3, "data", "enableMermaid", "enableHighlight", "enableCollapsibleHeadings", "enableSmartypants"], [1, "panel-loading"], [1, "fa-solid", "fa-sliders", "panel-icon"], [1, "panel-badge", "count"], ["text", "Loading parameters..."], ["Icon", "fa-solid fa-sliders", "Title", "No Parameters Defined", "Message", "Parameters are found in the SQL when you save. Add one here to describe it before it is used.", "ActionIcon", "fa-solid fa-plus", 3, "ActionText"], ["Icon", "fa-solid fa-sliders", "Title", "No Parameters Defined", "Message", "Parameters are found in the SQL when you save. Add one here to describe it before it is used.", "ActionIcon", "fa-solid fa-plus", 3, "Action", "ActionText"], [1, "panel-toolbar"], [3, "Remove", "Changed", "Parameters", "EditMode"], ["type", "button", 1, "add-item-btn", 3, "click"], [1, "fa-solid", "fa-table", "panel-icon"], ["text", "Loading fields..."], ["Icon", "fa-solid fa-table", "Title", "No Fields Defined", "Message", "Output fields are described by the database server when you save. Add one here to annotate it.", "ActionIcon", "fa-solid fa-plus", 3, "ActionText"], ["Icon", "fa-solid fa-table", "Title", "No Fields Defined", "Message", "Output fields are described by the database server when you save. Add one here to annotate it.", "ActionIcon", "fa-solid fa-plus", 3, "Action", "ActionText"], [3, "Remove", "OpenSourceField", "Changed", "Fields", "EditMode"], [1, "dependents-description"], [1, "card-grid"], [1, "item-card", "dependent-card"], [1, "fa-solid", "fa-arrow-left", "panel-icon", "dependents-icon"], [1, "item-card", "dependent-card", 3, "click"], [1, "item-card-header"], [1, "item-name"], [1, "fa-solid", "fa-arrow-left", "item-name-icon", "dependent-query-icon"], [1, "item-card-body"], [1, "item-meta"], [1, "item-card-footer"], [1, "open-link"], [1, "fa-solid", "fa-arrow-up-right-from-square"], [1, "meta-tag"], [1, "fa-solid", "fa-link"], [1, "meta-code"], [1, "fa-solid", "fa-database", "panel-icon"], ["text", "Loading entities..."], ["Icon", "fa-solid fa-database", "Title", "No Entities Tracked", "Message", "Track which entities this query uses for documentation.", "ActionIcon", "fa-solid fa-plus", 3, "ActionText"], ["Icon", "fa-solid fa-database", "Title", "No Entities Tracked", "Message", "Track which entities this query uses for documentation.", "ActionIcon", "fa-solid fa-plus", 3, "Action", "ActionText"], [1, "item-card"], [1, "fa-solid", "fa-table", "item-name-icon", "entity-icon"], [1, "entity-dropdown-wrapper"], [1, "item-card-actions"], ["TextField", "text", "ValueField", "id", "Placeholder", "Select entity...", 1, "entity-dropdown", 3, "ngModelChange", "ngModel", "name", "Data", "ValuePrimitive"], [1, "fa-solid", "fa-database"], ["title", "How this entity link was detected", 1, "meta-tag"], ["type", "button", "title", "Delete entity", 1, "item-action-btn", "delete", 3, "click"], [1, "fa-solid", "fa-trash"], [1, "fa-solid", "fa-info-circle", "panel-icon"], ["name", "reusable", 3, "ngModelChange", "ngModel"], [1, "detail-hint"], [1, "detail-tag", "positive"], [1, "detail-tag", "neutral"], [1, "fa-solid", "fa-check"], [1, "fa-solid", "fa-times"], ["name", "cacheEnabled", 3, "ngModelChange", "ngModel"], [1, "fa-solid", "fa-clock"], ["type", "number", "name", "cacheTTLMinutes", "min", "1", "placeholder", "Default", 1, "mj-input", "detail-input-narrow", 3, "ngModelChange", "ngModel"], ["name", "auditQueryRuns", 3, "ngModelChange", "ngModel"], ["name", "usesTemplate", 3, "ngModelChange", "ngModel"], [1, "fa-solid", "fa-star"], [1, "fa-solid", "fa-shield-alt", "panel-icon"], ["text", "Loading permissions..."], ["Icon", "fa-solid fa-shield-halved", "Title", "No Permissions Set", "Message", "This query uses default permissions."], [3, "Params", "NewRecordValues", "AllowLoad", "ShowToolbar"], [1, "permissions-list"], [1, "permission-card"], [1, "fa-solid", "fa-users", "permission-icon"], [1, "permission-info"], [1, "permission-role"], [1, "permission-type"], [1, "permission-badge"]], template: function MJQueryFormComponentExtended_Template(rf, ctx) { if (rf & 1) {
2309
+ i0.ɵɵconditionalCreate(0, MJQueryFormComponentExtended_Conditional_0_Template, 92, 46);
2256
2310
  } if (rf & 2) {
2257
2311
  i0.ɵɵconditional(ctx.record ? 0 : -1);
2258
- } }, dependencies: [i1.NgClass, i2.ɵNgNoValidate, i2.DefaultValueAccessor, i2.NumberValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.MinValidator, i2.NgModel, i2.NgForm, i3.MJEmptyStateComponent, i3.MJAlertComponent, i3.MJButtonDirective, i3.MJAccordionPanelComponent, i3.MJAccordionTitleDirective, i3.MJDropdownComponent, i3.MJSwitchComponent, i4.MjRecordFormContainerComponent, i4.ExplorerEntityDataGridComponent, i5.CodeEditorComponent, i6.LoadingComponent, i7.MarkdownComponent, i8.TreeDropdownComponent, i9.QueryRunDialogComponent], styles: [".k-pane[_ngcontent-%COMP%] {\n background-color: var(--mj-bg-surface);\n}\n\n.content-margin[_ngcontent-%COMP%] {\n margin: 10px;\n}\n\n\na[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: bolder;\n}\n\n.tab-header-icon[_ngcontent-%COMP%] {\n margin-right: 5px;\n}\n\n.record-form[_ngcontent-%COMP%] {\n display: block;\n flex-direction: column;\n background-color: var(--mj-bg-surface);\n padding: 0;\n min-height: 100vh;\n}\n\n.record-form-group[_ngcontent-%COMP%] {\n margin-top: 0px;\n background-color: var(--mj-bg-surface);\n}\n\nbutton[_ngcontent-%COMP%] {\n margin-right: 5px;\n}\n\n.record-form[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n margin-bottom: 10px;\n}\n\n.k-splitter[_ngcontent-%COMP%] {\n border-width: 0px;\n}\n\n.record-form-row[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: auto 1fr;\n align-items: start;\n gap: 10px;\n margin-bottom: 12px;\n padding-top: 5px;\n padding-bottom: 5px;\n}\n\n.record-form[_ngcontent-%COMP%] .record-form-row[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child {\n font-weight: bold;\n padding-right: 10px;\n}\n\n.record-form[_ngcontent-%COMP%] .record-form-row[_ngcontent-%COMP%] > span[_ngcontent-%COMP%] {\n white-space: pre-line;\n max-height: 300px;\n overflow: auto;\n}\n\n@media (min-width: 768px) {\n .record-form-row[_ngcontent-%COMP%] {\n flex-direction: row;\n align-items: center;\n }\n\n .record-form-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n width: 240px;\n margin-bottom: 0;\n }\n}\n\n\n.form-panels-container[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: 16px;\n background-color: var(--mj-bg-surface);\n}\n\n\n.form-panels-container[_ngcontent-%COMP%] > .form-card[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n\n.form-panels-container[_ngcontent-%COMP%] .related-entity-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n}\n\n\n@media (min-width: 1400px) {\n .form-panels-container[_ngcontent-%COMP%] .related-entity-grid[_ngcontent-%COMP%] {\n grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));\n }\n}\n\n.form-card[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-card);\n border-radius: 8px;\n box-shadow: 0 2px 4px var(--mj-shadow-sm);\n overflow: hidden;\n}\n\n.collapsible-card[_ngcontent-%COMP%] {\n overflow: hidden;\n}\n\n.collapsible-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px 24px;\n background: var(--mj-bg-surface-card);\n border-bottom: 2px solid var(--mj-border-default);\n cursor: pointer;\n user-select: none;\n transition: all 0.3s ease;\n}\n\n.collapsible-header[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-sunken);\n border-bottom-color: var(--mj-brand-primary);\n}\n\n.collapsible-title[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n}\n\n.collapsible-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 20px;\n color: var(--mj-brand-primary);\n}\n\n.collapsible-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.collapsible-header[_ngcontent-%COMP%] .collapse-icon[_ngcontent-%COMP%] {\n color: var(--mj-text-muted);\n transition: transform 0.3s ease;\n}\n\n.collapsible-body[_ngcontent-%COMP%] {\n max-height: 2000px;\n overflow: hidden;\n transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;\n opacity: 1;\n}\n\n.collapsible-body.collapsed[_ngcontent-%COMP%] {\n max-height: 0;\n padding: 0;\n opacity: 0;\n}\n\n.form-body[_ngcontent-%COMP%] {\n padding: 24px;\n}\n\n\n.form-card.related-entity[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-card);\n border-left: 3px solid var(--mj-brand-primary);\n}\n\n.form-card.related-entity[_ngcontent-%COMP%] .collapsible-header[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken);\n}\n\n.form-card.related-entity[_ngcontent-%COMP%] .collapsible-header[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-card);\n border-bottom-color: var(--mj-brand-primary);\n}\n\n.form-card.related-entity[_ngcontent-%COMP%] .collapsible-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n}\n\n\n.form-section-controls[_ngcontent-%COMP%] {\n display: flex;\n gap: 10px;\n padding: 14px 18px;\n background: var(--mj-bg-surface-card);\n border-bottom: 2px solid var(--mj-border-default);\n align-items: center;\n flex-wrap: wrap;\n box-shadow: 0 1px 3px var(--mj-shadow-sm);\n}\n\n.form-section-controls[_ngcontent-%COMP%] .control-group[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n.form-section-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n padding: 8px 14px;\n font-size: 13px;\n border: 1px solid var(--mj-border-strong);\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-secondary);\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s;\n margin-right: 0;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-weight: 500;\n}\n\n.form-section-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border-color: var(--mj-brand-primary);\n transform: translateY(-1px);\n box-shadow: 0 2px 4px var(--mj-shadow-md);\n}\n\n.form-section-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active {\n transform: translateY(0);\n}\n\n.form-section-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n margin-right: 0;\n font-size: 14px;\n}\n\n.form-section-controls[_ngcontent-%COMP%] .section-search[_ngcontent-%COMP%] {\n padding: 8px 14px;\n font-size: 13px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n width: 240px;\n transition: all 0.2s;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.form-section-controls[_ngcontent-%COMP%] .section-search[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.form-section-controls[_ngcontent-%COMP%] .section-search[_ngcontent-%COMP%]::placeholder {\n color: var(--mj-text-muted);\n font-style: italic;\n}\n\n.form-section-controls[_ngcontent-%COMP%] .section-count[_ngcontent-%COMP%] {\n font-size: 13px;\n color: var(--mj-text-muted);\n margin-left: auto;\n font-weight: 500;\n}\n\n\n.form-card.search-hidden[_ngcontent-%COMP%] {\n display: none;\n}\n\n\n.section-count-badge[_ngcontent-%COMP%] {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n padding: 2px 8px;\n border-radius: 12px;\n font-size: 12px;\n font-weight: 600;\n}\n\n\n.collapsible-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] .search-highlight[_ngcontent-%COMP%] {\n background-color: var(--mj-status-warning);\n color: var(--mj-text-primary);\n padding: 2px 4px;\n border-radius: 3px;\n font-weight: 700;\n}\n\n\n.collapsible-title[_ngcontent-%COMP%] .row-count-badge[_ngcontent-%COMP%] {\n background: var(--mj-status-success);\n color: var(--mj-text-inverse);\n padding: 3px 6px 2px 6px;\n border-radius: 12px;\n font-size: 12px;\n font-weight: 600;\n margin-left: 8px;\n vertical-align: middle;\n position: relative;\n top: -2px;\n display: inline-block;\n line-height: 1;\n}\n\n\n.collapsible-title[_ngcontent-%COMP%] .row-count-badge.zero-rows[_ngcontent-%COMP%] {\n background: var(--mj-text-muted);\n}", "\n[_nghost-%COMP%] {\n display: block;\n height: 100%;\n}\n\n\n.record-form[_ngcontent-%COMP%] {\n min-height: 0 !important;\n}\n\n\n\n\n\n.saving-overlay[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 8px 16px;\n background: color-mix(in srgb, var(--mj-status-info) 10%, var(--mj-bg-surface));\n border-bottom: 1px solid var(--mj-border-subtle);\n color: var(--mj-text-secondary);\n font-size: 13px;\n font-weight: 500;\n flex-shrink: 0;\n}\n\n.saving-spinner[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n font-size: 14px;\n}\n\n.content-saving[_ngcontent-%COMP%] {\n pointer-events: none;\n opacity: 0.6;\n}\n\n\n\n\n\n.query-header[_ngcontent-%COMP%] {\n flex-shrink: 0;\n background: var(--mj-brand-primary);\n border-bottom: none;\n padding: 0;\n}\n\n.query-header-content[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px 20px;\n}\n\n.query-header-top[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 20px;\n}\n\n.query-name-section[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.query-title-icon[_ngcontent-%COMP%] {\n color: rgba(255, 255, 255, 0.85);\n font-size: 1.3em;\n flex-shrink: 0;\n}\n\n.query-name-input[_ngcontent-%COMP%] {\n font-size: 1.2em;\n font-weight: 600;\n min-width: 300px;\n flex: 1;\n}\n\n.query-name-display[_ngcontent-%COMP%] {\n margin: 0;\n color: var(--mj-text-inverse, white);\n font-weight: 600;\n font-size: 1.2em;\n flex: 1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.query-header-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n.run-query-btn[_ngcontent-%COMP%] {\n white-space: nowrap;\n}\n\n\n.query-meta-row[_ngcontent-%COMP%] {\n display: flex;\n gap: 24px;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.query-meta-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.meta-label[_ngcontent-%COMP%] {\n font-weight: 500;\n color: rgba(255, 255, 255, 0.75);\n font-size: var(--mj-text-sm);\n min-width: 60px;\n}\n\n.meta-value[_ngcontent-%COMP%] {\n color: rgba(255, 255, 255, 0.95);\n font-size: var(--mj-text-sm);\n}\n\n.meta-dropdown[_ngcontent-%COMP%] {\n min-width: 200px;\n}\n\n.status-pill[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 4px 12px;\n border-radius: var(--mj-radius-xl);\n color: var(--mj-text-inverse, white);\n font-size: var(--mj-text-sm);\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.status-pill[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n}\n\n\n.query-description-row[_ngcontent-%COMP%] {\n margin-top: 2px;\n}\n\n.query-description-input[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n.query-description-text[_ngcontent-%COMP%] {\n margin: 0;\n color: rgba(255, 255, 255, 0.8);\n font-size: var(--mj-text-sm);\n line-height: 1.4;\n}\n\n\n\n\n\n\n\n\n\n\n.query-content[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 0;\n padding: 16px;\n overflow-y: auto;\n background: var(--mj-bg-surface-card);\n}\n\n\n\n\n\n.query-panel[_ngcontent-%COMP%] {\n margin-bottom: 12px;\n}\n\n .query-content mj-accordion-panel .mj-accordion-panel {\n border: none !important;\n border-radius: var(--mj-radius-md) !important;\n margin-bottom: 12px !important;\n box-shadow: var(--mj-shadow-sm) !important;\n background: var(--mj-bg-surface) !important;\n overflow: hidden !important;\n}\n\n .query-content .mj-accordion-header {\n background: var(--mj-bg-surface) !important;\n border: none !important;\n padding: 14px 18px !important;\n border-radius: var(--mj-radius-md) !important;\n color: var(--mj-text-primary) !important;\n font-weight: 600 !important;\n font-size: var(--mj-text-sm) !important;\n transition: background 0.15s ease !important;\n}\n\n .query-content .mj-accordion-header:hover {\n background: var(--mj-bg-surface-card) !important;\n}\n\n .query-content .mj-accordion-panel--expanded .mj-accordion-header {\n background: var(--mj-brand-primary) !important;\n color: white !important;\n border-radius: var(--mj-radius-md) var(--mj-radius-md) 0 0 !important;\n outline-color: var(--mj-text-inverse);\n}\n\n .query-content .mj-accordion-body {\n padding: 0 !important;\n border: none !important;\n background: var(--mj-bg-surface) !important;\n border-radius: 0 0 var(--mj-radius-md) var(--mj-radius-md) !important;\n}\n\n\n\n\n\n.panel-title-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n}\n\n.panel-title[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 600;\n}\n\n.panel-icon[_ngcontent-%COMP%] {\n opacity: 0.7;\n}\n\n.sql-icon[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n}\n\n .mj-accordion-panel--expanded .panel-icon {\n color: rgba(255, 255, 255, 0.85) !important;\n opacity: 1;\n}\n\n.panel-badge[_ngcontent-%COMP%] {\n padding: 2px 8px;\n border-radius: var(--mj-radius-lg);\n font-size: var(--mj-text-xs);\n font-weight: 600;\n}\n\n.panel-badge.defined[_ngcontent-%COMP%] {\n background: var(--mj-status-success);\n color: white;\n}\n\n.panel-badge.count[_ngcontent-%COMP%] {\n background: var(--mj-brand-primary);\n color: white;\n}\n\n .mj-accordion-panel--expanded .panel-badge.count {\n background: rgba(255, 255, 255, 0.25) !important;\n}\n\n .mj-accordion-panel--expanded .panel-badge.defined {\n background: rgba(255, 255, 255, 0.25) !important;\n}\n\n.filters-help-btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n margin-right: 8px;\n font-size: var(--mj-text-xs);\n}\n\n\n\n\n\n.panel-body[_ngcontent-%COMP%] {\n padding: 16px 0;\n}\n\n.panel-loading[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 40px;\n}\n\n.panel-toolbar[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n padding: 0 20px 12px;\n}\n\n\n\n\n\n.sql-panel-content[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n}\n\n.sql-editor[_ngcontent-%COMP%] {\n flex: 1;\n height: 400px;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-sm);\n margin: 16px;\n}\n\n\n.filters-help[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 16px;\n margin: 0 16px 16px;\n}\n\n.filters-help-title[_ngcontent-%COMP%] {\n margin: 0 0 12px 0;\n color: var(--mj-text-primary);\n font-weight: 600;\n font-size: var(--mj-text-sm);\n}\n\n.filters-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 10px;\n}\n\n.filter-card[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 12px;\n transition: transform 0.15s ease, box-shadow 0.15s ease;\n}\n\n.filter-card[_ngcontent-%COMP%]:hover {\n transform: translateY(-1px);\n box-shadow: var(--mj-shadow-md);\n}\n\n.filter-name[_ngcontent-%COMP%] {\n font-family: 'Courier New', monospace;\n font-weight: bold;\n color: var(--mj-brand-primary);\n margin-bottom: 4px;\n}\n\n.filter-description[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-secondary);\n margin-bottom: 6px;\n}\n\n.filter-syntax[_ngcontent-%COMP%] {\n font-family: 'Courier New', monospace;\n font-size: var(--mj-text-xs);\n background: var(--mj-bg-surface-card);\n padding: 6px;\n border-radius: var(--mj-radius-sm);\n margin-bottom: 4px;\n}\n\n.filter-notes[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-disabled);\n font-style: italic;\n}\n\n\n\n\n\n.card-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));\n gap: 12px;\n padding: 0 20px 20px;\n}\n\n.item-card[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 14px;\n transition: all 0.15s ease;\n cursor: pointer;\n position: relative;\n}\n\n.item-card[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-brand-primary);\n box-shadow: 0 2px 8px color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n}\n\n.item-card.required[_ngcontent-%COMP%] {\n border-left: 3px solid var(--mj-status-warning);\n}\n\n.item-card-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 10px;\n}\n\n.item-name[_ngcontent-%COMP%] {\n font-weight: 600;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.item-name-icon[_ngcontent-%COMP%] {\n font-size: var(--mj-text-sm);\n}\n\n.item-name-icon.param-icon[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n}\n\n.item-name-icon.field-icon[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n}\n\n.item-name-icon.entity-icon[_ngcontent-%COMP%] {\n color: var(--mj-status-success);\n}\n\n.item-badges[_ngcontent-%COMP%] {\n display: flex;\n gap: 6px;\n}\n\n.item-badge[_ngcontent-%COMP%] {\n padding: 2px 8px;\n border-radius: var(--mj-radius-lg);\n font-size: var(--mj-text-xs);\n font-weight: 600;\n color: white;\n}\n\n.item-badge.required[_ngcontent-%COMP%] {\n background: var(--mj-status-warning);\n}\n\n.item-badge.type[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.item-badge.sequence[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n color: color-mix(in srgb, var(--mj-brand-primary) 80%, purple);\n}\n\n.item-card-body[_ngcontent-%COMP%] {\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-sm);\n}\n\n.item-description[_ngcontent-%COMP%] {\n margin-bottom: 8px;\n}\n\n.item-meta[_ngcontent-%COMP%] {\n display: flex;\n gap: 16px;\n font-size: var(--mj-text-xs);\n}\n\n.meta-tag[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.meta-code[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-card);\n padding: 1px 4px;\n border-radius: var(--mj-radius-sm);\n font-size: var(--mj-text-xs);\n}\n\n\n.item-actions[_ngcontent-%COMP%] {\n position: absolute;\n top: 10px;\n right: 10px;\n display: flex;\n gap: 4px;\n opacity: 0;\n transition: opacity 0.15s ease;\n}\n\n.item-card[_ngcontent-%COMP%]:hover .item-actions[_ngcontent-%COMP%] {\n opacity: 1;\n}\n\n.item-card-actions[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n margin-top: 8px;\n}\n\n.item-action-btn[_ngcontent-%COMP%] {\n background: none;\n border: none;\n padding: 4px 8px;\n border-radius: var(--mj-radius-sm);\n cursor: pointer;\n color: var(--mj-text-disabled);\n transition: all 0.15s ease;\n}\n\n.item-action-btn[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-brand-primary);\n}\n\n.item-action-btn.delete[_ngcontent-%COMP%]:hover {\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n color: var(--mj-status-error);\n}\n\n\n.entity-dropdown-wrapper[_ngcontent-%COMP%] {\n flex: 1;\n margin-left: 12px;\n}\n\n.entity-dropdown[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n\n\n\n\n.details-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));\n gap: 16px;\n padding: 16px 20px;\n}\n\n.detail-item[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.detail-label[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n font-weight: 600;\n color: var(--mj-text-disabled);\n display: flex;\n align-items: center;\n gap: 6px;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n.detail-value[_ngcontent-%COMP%] {\n font-size: var(--mj-text-sm);\n color: var(--mj-text-primary);\n}\n\n.detail-tag[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: var(--mj-text-sm);\n}\n\n.detail-tag.positive[_ngcontent-%COMP%] {\n color: var(--mj-status-success);\n}\n\n.detail-tag.neutral[_ngcontent-%COMP%] {\n color: var(--mj-text-disabled);\n}\n\n.detail-hint[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n line-height: 1.4;\n}\n\n.detail-input-narrow[_ngcontent-%COMP%] {\n max-width: 120px;\n padding: 4px 8px;\n font-size: var(--mj-text-sm);\n}\n\n\n\n\n\n.permissions-list[_ngcontent-%COMP%] {\n padding: 0 20px;\n}\n\n.permission-card[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 14px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 14px 16px;\n margin-bottom: 8px;\n}\n\n.permission-icon[_ngcontent-%COMP%] {\n font-size: 1.3em;\n color: var(--mj-brand-primary);\n}\n\n.permission-info[_ngcontent-%COMP%] {\n flex: 1;\n}\n\n.permission-role[_ngcontent-%COMP%] {\n font-weight: 600;\n color: var(--mj-text-primary);\n font-size: var(--mj-text-sm);\n}\n\n.permission-type[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-disabled);\n}\n\n.permission-badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n background: var(--mj-brand-primary);\n color: white;\n padding: 4px 10px;\n border-radius: var(--mj-radius-md);\n font-size: var(--mj-text-xs);\n font-weight: 500;\n}\n\n\n\n\n\n\n\n\n\n.add-item-btn[_ngcontent-%COMP%] {\n background: var(--mj-brand-primary);\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: var(--mj-radius-md);\n cursor: pointer;\n transition: all 0.15s ease;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-weight: 500;\n font-size: var(--mj-text-sm);\n}\n\n.add-item-btn[_ngcontent-%COMP%]:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 85%, black);\n box-shadow: 0 2px 6px color-mix(in srgb, var(--mj-brand-primary) 30%, transparent);\n}\n\n\n\n\n\n.badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n\n\n\n\n.technical-description-textarea[_ngcontent-%COMP%] {\n width: 100%;\n font-family: 'Consolas', 'Monaco', 'Courier New', monospace;\n font-size: 13px;\n}\n\n.technical-description-preview[_ngcontent-%COMP%] {\n margin-top: 16px;\n border-top: 1px solid var(--mj-border-default);\n padding-top: 12px;\n}\n\n.preview-label[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-text-muted);\n margin-bottom: 8px;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.technical-description-view[_ngcontent-%COMP%] {\n max-height: 500px;\n overflow-y: auto;\n padding: 12px 16px;\n}\n\n\n.dependents-icon[_ngcontent-%COMP%] {\n color: var(--mj-status-warning);\n}\n\n.dependents-description[_ngcontent-%COMP%] {\n padding: 0 20px 12px;\n font-size: 13px;\n color: var(--mj-text-muted);\n}\n\n.dependents-description[_ngcontent-%COMP%] code[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken);\n padding: 1px 5px;\n border-radius: 3px;\n font-size: 12px;\n}\n\n.dependent-card[_ngcontent-%COMP%] {\n cursor: pointer;\n border-left: 3px solid var(--mj-status-warning) !important;\n}\n\n.dependent-card[_ngcontent-%COMP%]:hover {\n border-left-color: var(--mj-status-warning-text) !important;\n background: color-mix(in srgb, var(--mj-status-warning) 8%, var(--mj-bg-surface)) !important;\n}\n\n.dependent-query-icon[_ngcontent-%COMP%] {\n color: var(--mj-status-warning) !important;\n}\n\n.item-card-footer[_ngcontent-%COMP%] {\n padding-top: 8px;\n border-top: 1px solid var(--mj-bg-surface-sunken);\n margin-top: 8px;\n}\n\n.open-link[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: var(--mj-brand-primary);\n font-weight: 500;\n}\n\n.dependent-card[_ngcontent-%COMP%]:hover .open-link[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary-hover);\n}\n\n\n.meta-dropdown-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.meta-dropdown-row[_ngcontent-%COMP%] .meta-dropdown[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}"] }); }
2312
+ } }, dependencies: [i1.NgClass, i2.ɵNgNoValidate, i2.DefaultValueAccessor, i2.NumberValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.MinValidator, i2.NgModel, i2.NgForm, i3.MJEmptyStateComponent, i3.MJAlertComponent, i3.MJButtonDirective, i3.MJAccordionPanelComponent, i3.MJAccordionTitleDirective, i3.MJDropdownComponent, i3.MJSwitchComponent, i4.MjRecordFormContainerComponent, i4.ExplorerEntityDataGridComponent, i5.CodeEditorComponent, i6.QueryFieldsGridComponent, i7.QueryParametersGridComponent, i8.QueryDiagnosticsComponent, i8.QueryRefreshDialogComponent, i9.LoadingComponent, i10.MarkdownComponent, i11.TreeDropdownComponent, i12.QueryRunDialogComponent], styles: [".k-pane[_ngcontent-%COMP%] {\n background-color: var(--mj-bg-surface);\n}\n\n.content-margin[_ngcontent-%COMP%] {\n margin: 10px;\n}\n\n\na[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: bolder;\n}\n\n.tab-header-icon[_ngcontent-%COMP%] {\n margin-right: 5px;\n}\n\n.record-form[_ngcontent-%COMP%] {\n display: block;\n flex-direction: column;\n background-color: var(--mj-bg-surface);\n padding: 0;\n min-height: 100vh;\n}\n\n.record-form-group[_ngcontent-%COMP%] {\n margin-top: 0px;\n background-color: var(--mj-bg-surface);\n}\n\nbutton[_ngcontent-%COMP%] {\n margin-right: 5px;\n}\n\n.record-form[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n margin-bottom: 10px;\n}\n\n.k-splitter[_ngcontent-%COMP%] {\n border-width: 0px;\n}\n\n.record-form-row[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: auto 1fr;\n align-items: start;\n gap: 10px;\n margin-bottom: 12px;\n padding-top: 5px;\n padding-bottom: 5px;\n}\n\n.record-form[_ngcontent-%COMP%] .record-form-row[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child {\n font-weight: bold;\n padding-right: 10px;\n}\n\n.record-form[_ngcontent-%COMP%] .record-form-row[_ngcontent-%COMP%] > span[_ngcontent-%COMP%] {\n white-space: pre-line;\n max-height: 300px;\n overflow: auto;\n}\n\n@media (min-width: 768px) {\n .record-form-row[_ngcontent-%COMP%] {\n flex-direction: row;\n align-items: center;\n }\n\n .record-form-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n width: 240px;\n margin-bottom: 0;\n }\n}\n\n\n.form-panels-container[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: 16px;\n background-color: var(--mj-bg-surface);\n}\n\n\n.form-panels-container[_ngcontent-%COMP%] > .form-card[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n\n.form-panels-container[_ngcontent-%COMP%] .related-entity-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n}\n\n\n@media (min-width: 1400px) {\n .form-panels-container[_ngcontent-%COMP%] .related-entity-grid[_ngcontent-%COMP%] {\n grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));\n }\n}\n\n.form-card[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-card);\n border-radius: 8px;\n box-shadow: 0 2px 4px var(--mj-shadow-sm);\n overflow: hidden;\n}\n\n.collapsible-card[_ngcontent-%COMP%] {\n overflow: hidden;\n}\n\n.collapsible-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px 24px;\n background: var(--mj-bg-surface-card);\n border-bottom: 2px solid var(--mj-border-default);\n cursor: pointer;\n user-select: none;\n transition: all 0.3s ease;\n}\n\n.collapsible-header[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-sunken);\n border-bottom-color: var(--mj-brand-primary);\n}\n\n.collapsible-title[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n}\n\n.collapsible-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 20px;\n color: var(--mj-brand-primary);\n}\n\n.collapsible-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.collapsible-header[_ngcontent-%COMP%] .collapse-icon[_ngcontent-%COMP%] {\n color: var(--mj-text-muted);\n transition: transform 0.3s ease;\n}\n\n.collapsible-body[_ngcontent-%COMP%] {\n max-height: 2000px;\n overflow: hidden;\n transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;\n opacity: 1;\n}\n\n.collapsible-body.collapsed[_ngcontent-%COMP%] {\n max-height: 0;\n padding: 0;\n opacity: 0;\n}\n\n.form-body[_ngcontent-%COMP%] {\n padding: 24px;\n}\n\n\n.form-card.related-entity[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-card);\n border-left: 3px solid var(--mj-brand-primary);\n}\n\n.form-card.related-entity[_ngcontent-%COMP%] .collapsible-header[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken);\n}\n\n.form-card.related-entity[_ngcontent-%COMP%] .collapsible-header[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-card);\n border-bottom-color: var(--mj-brand-primary);\n}\n\n.form-card.related-entity[_ngcontent-%COMP%] .collapsible-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n}\n\n\n.form-section-controls[_ngcontent-%COMP%] {\n display: flex;\n gap: 10px;\n padding: 14px 18px;\n background: var(--mj-bg-surface-card);\n border-bottom: 2px solid var(--mj-border-default);\n align-items: center;\n flex-wrap: wrap;\n box-shadow: 0 1px 3px var(--mj-shadow-sm);\n}\n\n.form-section-controls[_ngcontent-%COMP%] .control-group[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n.form-section-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n padding: 8px 14px;\n font-size: 13px;\n border: 1px solid var(--mj-border-strong);\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-secondary);\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s;\n margin-right: 0;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-weight: 500;\n}\n\n.form-section-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border-color: var(--mj-brand-primary);\n transform: translateY(-1px);\n box-shadow: 0 2px 4px var(--mj-shadow-md);\n}\n\n.form-section-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active {\n transform: translateY(0);\n}\n\n.form-section-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n margin-right: 0;\n font-size: 14px;\n}\n\n.form-section-controls[_ngcontent-%COMP%] .section-search[_ngcontent-%COMP%] {\n padding: 8px 14px;\n font-size: 13px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n width: 240px;\n transition: all 0.2s;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.form-section-controls[_ngcontent-%COMP%] .section-search[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.form-section-controls[_ngcontent-%COMP%] .section-search[_ngcontent-%COMP%]::placeholder {\n color: var(--mj-text-muted);\n font-style: italic;\n}\n\n.form-section-controls[_ngcontent-%COMP%] .section-count[_ngcontent-%COMP%] {\n font-size: 13px;\n color: var(--mj-text-muted);\n margin-left: auto;\n font-weight: 500;\n}\n\n\n.form-card.search-hidden[_ngcontent-%COMP%] {\n display: none;\n}\n\n\n.section-count-badge[_ngcontent-%COMP%] {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n padding: 2px 8px;\n border-radius: 12px;\n font-size: 12px;\n font-weight: 600;\n}\n\n\n.collapsible-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] .search-highlight[_ngcontent-%COMP%] {\n background-color: var(--mj-status-warning);\n color: var(--mj-text-primary);\n padding: 2px 4px;\n border-radius: 3px;\n font-weight: 700;\n}\n\n\n.collapsible-title[_ngcontent-%COMP%] .row-count-badge[_ngcontent-%COMP%] {\n background: var(--mj-status-success);\n color: var(--mj-text-inverse);\n padding: 3px 6px 2px 6px;\n border-radius: 12px;\n font-size: 12px;\n font-weight: 600;\n margin-left: 8px;\n vertical-align: middle;\n position: relative;\n top: -2px;\n display: inline-block;\n line-height: 1;\n}\n\n\n.collapsible-title[_ngcontent-%COMP%] .row-count-badge.zero-rows[_ngcontent-%COMP%] {\n background: var(--mj-text-muted);\n}", "\n[_nghost-%COMP%] {\n display: block;\n height: 100%;\n}\n\n\n.record-form[_ngcontent-%COMP%] {\n min-height: 0 !important;\n}\n\n\n\n\n\n.saving-overlay[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 8px 16px;\n background: color-mix(in srgb, var(--mj-status-info) 10%, var(--mj-bg-surface));\n border-bottom: 1px solid var(--mj-border-subtle);\n color: var(--mj-text-secondary);\n font-size: 13px;\n font-weight: 500;\n flex-shrink: 0;\n}\n\n.saving-spinner[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n font-size: 14px;\n}\n\n.content-saving[_ngcontent-%COMP%] {\n pointer-events: none;\n opacity: 0.6;\n}\n\n\n\n\n\n.query-header[_ngcontent-%COMP%] {\n flex-shrink: 0;\n background: var(--mj-brand-primary);\n border-bottom: none;\n padding: 0;\n}\n\n.query-header-content[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px 20px;\n}\n\n.query-header-top[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 20px;\n}\n\n.query-name-section[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.query-title-icon[_ngcontent-%COMP%] {\n color: rgba(255, 255, 255, 0.85);\n font-size: 1.3em;\n flex-shrink: 0;\n}\n\n.query-name-input[_ngcontent-%COMP%] {\n font-size: 1.2em;\n font-weight: 600;\n min-width: 300px;\n flex: 1;\n}\n\n.query-name-display[_ngcontent-%COMP%] {\n margin: 0;\n color: var(--mj-text-inverse, white);\n font-weight: 600;\n font-size: 1.2em;\n flex: 1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.query-header-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n.run-query-btn[_ngcontent-%COMP%] {\n white-space: nowrap;\n}\n\n\n.query-meta-row[_ngcontent-%COMP%] {\n display: flex;\n gap: 24px;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.query-meta-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.meta-label[_ngcontent-%COMP%] {\n font-weight: 500;\n color: rgba(255, 255, 255, 0.75);\n font-size: var(--mj-text-sm);\n min-width: 60px;\n}\n\n.meta-value[_ngcontent-%COMP%] {\n color: rgba(255, 255, 255, 0.95);\n font-size: var(--mj-text-sm);\n}\n\n.meta-dropdown[_ngcontent-%COMP%] {\n min-width: 200px;\n}\n\n.status-pill[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 4px 12px;\n border-radius: var(--mj-radius-xl);\n color: var(--mj-text-inverse, white);\n font-size: var(--mj-text-sm);\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.status-pill[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n}\n\n\n.query-description-row[_ngcontent-%COMP%] {\n margin-top: 2px;\n}\n\n.query-description-input[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n.query-description-text[_ngcontent-%COMP%] {\n margin: 0;\n color: rgba(255, 255, 255, 0.8);\n font-size: var(--mj-text-sm);\n line-height: 1.4;\n}\n\n\n\n\n\n\n\n\n\n\n.query-content[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 0;\n padding: 16px;\n overflow-y: auto;\n background: var(--mj-bg-surface-card);\n}\n\n\n\n\n\n.query-panel[_ngcontent-%COMP%] {\n margin-bottom: 12px;\n}\n\n .query-content mj-accordion-panel .mj-accordion-panel {\n border: none !important;\n border-radius: var(--mj-radius-md) !important;\n margin-bottom: 12px !important;\n box-shadow: var(--mj-shadow-sm) !important;\n background: var(--mj-bg-surface) !important;\n overflow: hidden !important;\n}\n\n .query-content .mj-accordion-header {\n background: var(--mj-bg-surface) !important;\n border: none !important;\n padding: 14px 18px !important;\n border-radius: var(--mj-radius-md) !important;\n color: var(--mj-text-primary) !important;\n font-weight: 600 !important;\n font-size: var(--mj-text-sm) !important;\n transition: background 0.15s ease !important;\n}\n\n .query-content .mj-accordion-header:hover {\n background: var(--mj-bg-surface-card) !important;\n}\n\n .query-content .mj-accordion-panel--expanded .mj-accordion-header {\n background: var(--mj-brand-primary) !important;\n color: var(--mj-brand-on-primary) !important;\n border-radius: var(--mj-radius-md) var(--mj-radius-md) 0 0 !important;\n outline-color: var(--mj-text-inverse);\n}\n\n .query-content .mj-accordion-body {\n padding: 0 !important;\n border: none !important;\n background: var(--mj-bg-surface) !important;\n border-radius: 0 0 var(--mj-radius-md) var(--mj-radius-md) !important;\n}\n\n\n\n\n\n.panel-title-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n}\n\n.panel-title[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 600;\n}\n\n.panel-icon[_ngcontent-%COMP%] {\n opacity: 0.7;\n}\n\n.sql-icon[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n}\n\n .mj-accordion-panel--expanded .panel-icon {\n color: rgba(255, 255, 255, 0.85) !important;\n opacity: 1;\n}\n\n.panel-badge[_ngcontent-%COMP%] {\n padding: 2px 8px;\n border-radius: var(--mj-radius-lg);\n font-size: var(--mj-text-xs);\n font-weight: 600;\n}\n\n.panel-badge.defined[_ngcontent-%COMP%] {\n background: var(--mj-status-success);\n color: var(--mj-text-inverse);\n}\n\n.panel-badge.count[_ngcontent-%COMP%] {\n background: var(--mj-brand-primary);\n color: var(--mj-brand-on-primary);\n}\n\n .mj-accordion-panel--expanded .panel-badge.count {\n background: rgba(255, 255, 255, 0.25) !important;\n}\n\n .mj-accordion-panel--expanded .panel-badge.defined {\n background: rgba(255, 255, 255, 0.25) !important;\n}\n\n.filters-help-btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n margin-right: 8px;\n font-size: var(--mj-text-xs);\n}\n\n\n\n\n\n.panel-body[_ngcontent-%COMP%] {\n padding: 16px 0;\n}\n\n.panel-loading[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 40px;\n}\n\n.panel-toolbar[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n padding: 0 20px 12px;\n}\n\n\n\n\n\n.sql-panel-content[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n}\n\n.sql-editor[_ngcontent-%COMP%] {\n flex: 1;\n height: 400px;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-sm);\n margin: 16px;\n}\n\n\n.filters-help[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 16px;\n margin: 0 16px 16px;\n}\n\n.filters-help-title[_ngcontent-%COMP%] {\n margin: 0 0 12px 0;\n color: var(--mj-text-primary);\n font-weight: 600;\n font-size: var(--mj-text-sm);\n}\n\n.filters-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 10px;\n}\n\n.filter-card[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 12px;\n transition: transform 0.15s ease, box-shadow 0.15s ease;\n}\n\n.filter-card[_ngcontent-%COMP%]:hover {\n transform: translateY(-1px);\n box-shadow: var(--mj-shadow-md);\n}\n\n.filter-name[_ngcontent-%COMP%] {\n font-family: 'Courier New', monospace;\n font-weight: bold;\n color: var(--mj-brand-primary);\n margin-bottom: 4px;\n}\n\n.filter-description[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-secondary);\n margin-bottom: 6px;\n}\n\n.filter-syntax[_ngcontent-%COMP%] {\n font-family: 'Courier New', monospace;\n font-size: var(--mj-text-xs);\n background: var(--mj-bg-surface-card);\n padding: 6px;\n border-radius: var(--mj-radius-sm);\n margin-bottom: 4px;\n}\n\n.filter-notes[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-disabled);\n font-style: italic;\n}\n\n\n\n\n\n.card-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));\n gap: 12px;\n padding: 0 20px 20px;\n}\n\n.item-card[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 14px;\n transition: all 0.15s ease;\n cursor: pointer;\n position: relative;\n}\n\n.item-card[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-brand-primary);\n box-shadow: 0 2px 8px color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n}\n\n.item-card.required[_ngcontent-%COMP%] {\n border-left: 3px solid var(--mj-status-warning);\n}\n\n.item-card-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 10px;\n}\n\n.item-name[_ngcontent-%COMP%] {\n font-weight: 600;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.item-name-icon[_ngcontent-%COMP%] {\n font-size: var(--mj-text-sm);\n}\n\n.item-name-icon.param-icon[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n}\n\n.item-name-icon.field-icon[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n}\n\n.item-name-icon.entity-icon[_ngcontent-%COMP%] {\n color: var(--mj-status-success);\n}\n\n.item-badges[_ngcontent-%COMP%] {\n display: flex;\n gap: 6px;\n}\n\n.item-badge[_ngcontent-%COMP%] {\n padding: 2px 8px;\n border-radius: var(--mj-radius-lg);\n font-size: var(--mj-text-xs);\n font-weight: 600;\n color: var(--mj-text-inverse);\n}\n\n.item-badge.required[_ngcontent-%COMP%] {\n background: var(--mj-status-warning);\n}\n\n.item-badge.type[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.item-badge.sequence[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n color: color-mix(in srgb, var(--mj-brand-primary) 80%, var(--mj-text-violet));\n}\n\n.item-card-body[_ngcontent-%COMP%] {\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-sm);\n}\n\n.item-description[_ngcontent-%COMP%] {\n margin-bottom: 8px;\n}\n\n.item-meta[_ngcontent-%COMP%] {\n display: flex;\n gap: 16px;\n font-size: var(--mj-text-xs);\n}\n\n.meta-tag[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.meta-code[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-card);\n padding: 1px 4px;\n border-radius: var(--mj-radius-sm);\n font-size: var(--mj-text-xs);\n}\n\n\n.item-actions[_ngcontent-%COMP%] {\n position: absolute;\n top: 10px;\n right: 10px;\n display: flex;\n gap: 4px;\n opacity: 0;\n transition: opacity 0.15s ease;\n}\n\n.item-card[_ngcontent-%COMP%]:hover .item-actions[_ngcontent-%COMP%] {\n opacity: 1;\n}\n\n.item-card-actions[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n margin-top: 8px;\n}\n\n.item-action-btn[_ngcontent-%COMP%] {\n background: none;\n border: none;\n padding: 4px 8px;\n border-radius: var(--mj-radius-sm);\n cursor: pointer;\n color: var(--mj-text-disabled);\n transition: all 0.15s ease;\n}\n\n.item-action-btn[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-brand-primary);\n}\n\n.item-action-btn.delete[_ngcontent-%COMP%]:hover {\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n color: var(--mj-status-error);\n}\n\n\n.entity-dropdown-wrapper[_ngcontent-%COMP%] {\n flex: 1;\n margin-left: 12px;\n}\n\n.entity-dropdown[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n\n\n\n\n.details-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));\n gap: 16px;\n padding: 16px 20px;\n}\n\n.detail-item[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.detail-label[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n font-weight: 600;\n color: var(--mj-text-disabled);\n display: flex;\n align-items: center;\n gap: 6px;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n.detail-value[_ngcontent-%COMP%] {\n font-size: var(--mj-text-sm);\n color: var(--mj-text-primary);\n}\n\n.detail-tag[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: var(--mj-text-sm);\n}\n\n.detail-tag.positive[_ngcontent-%COMP%] {\n color: var(--mj-status-success);\n}\n\n.detail-tag.neutral[_ngcontent-%COMP%] {\n color: var(--mj-text-disabled);\n}\n\n.detail-hint[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n line-height: 1.4;\n}\n\n.detail-input-narrow[_ngcontent-%COMP%] {\n max-width: 120px;\n padding: 4px 8px;\n font-size: var(--mj-text-sm);\n}\n\n\n\n\n\n.permissions-list[_ngcontent-%COMP%] {\n padding: 0 20px;\n}\n\n.permission-card[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 14px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 14px 16px;\n margin-bottom: 8px;\n}\n\n.permission-icon[_ngcontent-%COMP%] {\n font-size: 1.3em;\n color: var(--mj-brand-primary);\n}\n\n.permission-info[_ngcontent-%COMP%] {\n flex: 1;\n}\n\n.permission-role[_ngcontent-%COMP%] {\n font-weight: 600;\n color: var(--mj-text-primary);\n font-size: var(--mj-text-sm);\n}\n\n.permission-type[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-disabled);\n}\n\n.permission-badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n background: var(--mj-brand-primary);\n color: var(--mj-brand-on-primary);\n padding: 4px 10px;\n border-radius: var(--mj-radius-md);\n font-size: var(--mj-text-xs);\n font-weight: 500;\n}\n\n\n\n\n\n\n\n\n\n.add-item-btn[_ngcontent-%COMP%] {\n background: var(--mj-brand-primary);\n color: var(--mj-brand-on-primary);\n border: none;\n padding: 8px 16px;\n border-radius: var(--mj-radius-md);\n cursor: pointer;\n transition: all 0.15s ease;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-weight: 500;\n font-size: var(--mj-text-sm);\n}\n\n.add-item-btn[_ngcontent-%COMP%]:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 85%, black);\n box-shadow: 0 2px 6px color-mix(in srgb, var(--mj-brand-primary) 30%, transparent);\n}\n\n\n\n\n\n.badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n\n\n\n\n.technical-description-textarea[_ngcontent-%COMP%] {\n width: 100%;\n font-family: 'Consolas', 'Monaco', 'Courier New', monospace;\n font-size: 13px;\n}\n\n.technical-description-preview[_ngcontent-%COMP%] {\n margin-top: 16px;\n border-top: 1px solid var(--mj-border-default);\n padding-top: 12px;\n}\n\n.preview-label[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-text-muted);\n margin-bottom: 8px;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.technical-description-view[_ngcontent-%COMP%] {\n max-height: 500px;\n overflow-y: auto;\n padding: 12px 16px;\n}\n\n\n.dependents-icon[_ngcontent-%COMP%] {\n color: var(--mj-status-warning);\n}\n\n.dependents-description[_ngcontent-%COMP%] {\n padding: 0 20px 12px;\n font-size: 13px;\n color: var(--mj-text-muted);\n}\n\n.dependents-description[_ngcontent-%COMP%] code[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken);\n padding: 1px 5px;\n border-radius: 3px;\n font-size: 12px;\n}\n\n.dependent-card[_ngcontent-%COMP%] {\n cursor: pointer;\n border-left: 3px solid var(--mj-status-warning) !important;\n}\n\n.dependent-card[_ngcontent-%COMP%]:hover {\n border-left-color: var(--mj-status-warning-text) !important;\n background: color-mix(in srgb, var(--mj-status-warning) 8%, var(--mj-bg-surface)) !important;\n}\n\n.dependent-query-icon[_ngcontent-%COMP%] {\n color: var(--mj-status-warning) !important;\n}\n\n.item-card-footer[_ngcontent-%COMP%] {\n padding-top: 8px;\n border-top: 1px solid var(--mj-bg-surface-sunken);\n margin-top: 8px;\n}\n\n.open-link[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: var(--mj-brand-primary);\n font-weight: 500;\n}\n\n.dependent-card[_ngcontent-%COMP%]:hover .open-link[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary-hover);\n}\n\n\n.meta-dropdown-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.meta-dropdown-row[_ngcontent-%COMP%] .meta-dropdown[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n\n\n.extraction-badge[_ngcontent-%COMP%] {\n --extraction-accent: var(--mj-text-muted);\n display: inline-flex;\n align-items: center;\n border-radius: var(--mj-radius-full);\n padding: 2px var(--mj-space-3);\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-medium);\n color: var(--extraction-accent);\n background: color-mix(in srgb, var(--extraction-accent) 12%, transparent);\n border: 1px solid color-mix(in srgb, var(--extraction-accent) 30%, transparent);\n white-space: nowrap;\n}\n\n.extraction-badge--ok[_ngcontent-%COMP%] { --extraction-accent: var(--mj-status-success); }\n.extraction-badge--warning[_ngcontent-%COMP%] { --extraction-accent: var(--mj-status-warning); }\n.extraction-badge--error[_ngcontent-%COMP%] { --extraction-accent: var(--mj-status-error); }\n.extraction-badge--skipped[_ngcontent-%COMP%], \n.extraction-badge--none[_ngcontent-%COMP%] { --extraction-accent: var(--mj-text-muted); }\n\n.save-diagnostics[_ngcontent-%COMP%] {\n margin-bottom: var(--mj-space-3);\n}\n\n.extraction-diagnostics[_ngcontent-%COMP%] {\n margin-top: var(--mj-space-3);\n}\n\n\n.query-header[_ngcontent-%COMP%] .extraction-badge[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface);\n}\n\n.query-header[_ngcontent-%COMP%] button.refresh-metadata-btn[_ngcontent-%COMP%] {\n color: var(--mj-text-inverse);\n border-color: color-mix(in srgb, var(--mj-text-inverse) 60%, transparent);\n background: transparent;\n}\n\n.query-header[_ngcontent-%COMP%] button.refresh-metadata-btn[_ngcontent-%COMP%]:hover {\n background: color-mix(in srgb, var(--mj-text-inverse) 15%, transparent);\n}"] }); }
2259
2313
  };
2260
2314
  MJQueryFormComponentExtended = __decorate([
2261
2315
  RegisterClass(BaseFormComponent, 'MJ: Queries')
@@ -2263,10 +2317,10 @@ MJQueryFormComponentExtended = __decorate([
2263
2317
  export { MJQueryFormComponentExtended };
2264
2318
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJQueryFormComponentExtended, [{
2265
2319
  type: Component,
2266
- args: [{ standalone: false, selector: 'mj-query-form', template: "@if (record) {\n<mj-record-form-container [Record]=\"record\" [FormComponent]=\"this\"\n [ToolbarConfig]=\"ToolbarConfig\"\n [IsSaving]=\"IsSaving\"\n [WidthMode]=\"'full-width'\"\n (Navigate)=\"OnFormNavigate($event)\"\n (DeleteRequested)=\"OnDeleteRequested()\"\n (FavoriteToggled)=\"OnFavoriteToggled()\"\n (HistoryRequested)=\"OnHistoryRequested()\"\n (ListManagementRequested)=\"OnListManagementRequested()\">\n <form class=\"record-form\" #form=\"ngForm\" style=\"display: flex; flex-direction: column; height: 100%; overflow: hidden;\">\n\n <!-- Saving Overlay -->\n @if (IsSaving) {\n <div class=\"saving-overlay\">\n <i class=\"fa-solid fa-spinner fa-spin saving-spinner\"></i>\n <span>Saving...</span>\n </div>\n }\n\n <!-- Header Section -->\n <div class=\"query-header\" [class.content-saving]=\"IsSaving\">\n <div class=\"query-header-content\">\n <!-- Top Row: Name and Run Button -->\n <div class=\"query-header-top\">\n <!-- Left: Query Name -->\n <div class=\"query-name-section\">\n <i class=\"fa-solid fa-database query-title-icon\"></i>\n @if (EditMode) {\n <input class=\"mj-input query-name-input\"\n [(ngModel)]=\"record.Name\"\n name=\"queryName\"\n placeholder=\"Enter query name...\" />\n } @else {\n <h4 class=\"query-name-display\">{{ record.Name || 'Untitled Query' }}</h4>\n }\n </div>\n\n <!-- Right: Action Buttons -->\n <div class=\"query-header-actions\">\n @if (record.ID) {\n <button mjButton\n variant=\"primary\"\n [disabled]=\"EditMode || !record.SQL || record.SQL.trim().length === 0\"\n (click)=\"runQuery()\"\n title=\"Run Query\"\n class=\"run-query-btn\">\n <i class=\"fa-solid fa-play\"></i> Run\n </button>\n }\n </div>\n </div>\n\n <!-- Second Row: Category and Status -->\n <div class=\"query-meta-row\">\n <!-- Category -->\n <div class=\"query-meta-item\">\n <label class=\"meta-label\">Category</label>\n @if (EditMode) {\n <div class=\"meta-dropdown-row\">\n <mj-tree-dropdown\n [BranchConfig]=\"CategoryBranchConfig\"\n [Value]=\"CategoryIDAsKey\"\n [SelectableTypes]=\"'branch'\"\n [SelectionMode]=\"'single'\"\n [Placeholder]=\"'Select category...'\"\n [EnableSearch]=\"true\"\n [Clearable]=\"true\"\n (ValueChange)=\"OnCategoryTreeChange($event)\"\n class=\"meta-dropdown\">\n </mj-tree-dropdown>\n <button mjButton variant=\"icon\" title=\"New category\" (click)=\"createCategory()\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n @if (record.CategoryID) {\n <button mjButton variant=\"icon\" title=\"Edit category\" (click)=\"editSelectedCategory()\">\n <i class=\"fa-solid fa-pen\"></i>\n </button>\n }\n </div>\n } @else {\n <span class=\"meta-value\">{{ categoryPathDisplay || 'Uncategorized' }}</span>\n }\n </div>\n\n <!-- Status -->\n <div class=\"query-meta-item\">\n <label class=\"meta-label\">Status</label>\n @if (EditMode) {\n <mj-dropdown\n [(ngModel)]=\"record.Status\"\n name=\"status\"\n [Data]=\"statusOptions\"\n TextField=\"text\"\n ValueField=\"value\"\n [ValuePrimitive]=\"true\"\n class=\"meta-dropdown status-dropdown\">\n </mj-dropdown>\n } @else {\n <span class=\"status-pill\"\n [style.background]=\"getStatusBadgeColor()\">\n <i class=\"fa-solid\" [class]=\"getStatusBannerIcon()\"></i>\n {{ record.Status || 'Unknown' }}\n </span>\n }\n </div>\n </div>\n\n <!-- Third Row: Description -->\n @if (EditMode || record.Description) {\n <div class=\"query-description-row\">\n @if (EditMode) {\n <textarea class=\"mj-input query-description-input\"\n [(ngModel)]=\"record.Description\"\n name=\"description\"\n rows=\"2\"\n placeholder=\"Enter query description...\">\n </textarea>\n } @else {\n <p class=\"query-description-text\">{{ record.Description }}</p>\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Status Warning Banner for Non-Approved Queries -->\n @if (record.Status && record.Status !== 'Approved' && !EditMode) {\n <mj-alert Variant=\"warning\">\n <span>\n This query has status <strong>{{ record.Status }}</strong>. {{ getStatusBannerMessage() }}\n </span>\n </mj-alert>\n }\n\n <!-- Main Content Area with Expansion Panels -->\n <div class=\"query-content\" [class.content-saving]=\"IsSaving\">\n\n <!-- SQL Query Panel -->\n <mj-accordion-panel\n [(Expanded)]=\"sqlPanelExpanded\"\n class=\"query-panel\">\n <ng-template mjAccordionTitle>\n <span class=\"panel-title-row\">\n <span class=\"panel-title\">\n <i class=\"fa-solid fa-code panel-icon sql-icon\"></i>\n SQL\n @if (record.SQL) {\n <span class=\"panel-badge defined\">&mdash; Defined</span>\n }\n </span>\n </span>\n </ng-template>\n\n <div class=\"sql-panel-toolbar\" style=\"display: flex; justify-content: flex-end; padding: 4px 0 8px;\">\n <button type=\"button\"\n mjButton\n variant=\"flat\"\n (click)=\"toggleFiltersHelp()\"\n title=\"Show/hide SQL filters help\"\n class=\"filters-help-btn\">\n <i class=\"fa-solid fa-question-circle\"></i>\n <span>Filters Help</span>\n <i class=\"fa-solid\" [ngClass]=\"showFiltersHelp ? 'fa-chevron-up' : 'fa-chevron-down'\"></i>\n </button>\n </div>\n\n <div class=\"sql-panel-content\">\n <!-- Code Editor -->\n <mj-code-editor #sqlEditor\n (change)=\"onSQLChange($event)\"\n (CompositionTokenClick)=\"onCompositionTokenClick($event)\"\n [language]=\"'sql'\"\n class=\"sql-editor\">\n </mj-code-editor>\n\n <!-- SQL Filters Help (Below Editor) -->\n @if (showFiltersHelp) {\n <div class=\"filters-help\">\n <h6 class=\"filters-help-title\">\n <i class=\"fa-solid fa-filter\"></i> Available SQL Filters for Parameterized Queries\n </h6>\n <div class=\"filters-grid\">\n @for (filter of sqlFilters; track filter.name) {\n <div class=\"filter-card\">\n <div class=\"filter-name\">{{ filter.name }}</div>\n <div class=\"filter-description\">{{ filter.description }}</div>\n <div class=\"filter-syntax\">{{ filter.exampleSyntax }}</div>\n @if (filter.notes) {\n <div class=\"filter-notes\">{{ filter.notes }}</div>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n </mj-accordion-panel>\n\n <!-- Technical Description Panel -->\n @if (record.TechnicalDescription || EditMode) {\n <mj-accordion-panel\n [(Expanded)]=\"technicalDescriptionPanelExpanded\"\n class=\"query-panel\">\n <ng-template mjAccordionTitle>\n <span class=\"panel-title\">\n <i class=\"fa-solid fa-book panel-icon\"></i>\n Technical Description\n @if (record.TechnicalDescription) {\n <span class=\"panel-badge defined\">&mdash; Documented</span>\n }\n </span>\n </ng-template>\n\n <div class=\"panel-body\">\n @if (EditMode) {\n <textarea class=\"mj-input technical-description-textarea\"\n [(ngModel)]=\"record.TechnicalDescription\"\n name=\"technicalDescription\"\n rows=\"8\"\n placeholder=\"Technical documentation of the query logic, performance considerations, and parameter usage. Supports markdown and mermaid diagrams.\">\n </textarea>\n @if (record.TechnicalDescription) {\n <div class=\"technical-description-preview\">\n <div class=\"preview-label\">\n <i class=\"fa-solid fa-eye\"></i> Preview\n </div>\n <mj-markdown\n [data]=\"record.TechnicalDescription || ''\"\n [enableMermaid]=\"true\"\n [enableHighlight]=\"true\"\n [enableCollapsibleHeadings]=\"false\"\n [enableSmartypants]=\"true\">\n </mj-markdown>\n </div>\n }\n } @else {\n <div class=\"technical-description-view\">\n <mj-markdown\n [data]=\"record.TechnicalDescription || ''\"\n [enableMermaid]=\"true\"\n [enableHighlight]=\"true\"\n [enableCollapsibleHeadings]=\"false\"\n [enableSmartypants]=\"true\">\n </mj-markdown>\n </div>\n }\n </div>\n </mj-accordion-panel>\n }\n\n <!-- Parameters Panel -->\n @if (record.IsSaved) {\n <mj-accordion-panel\n [(Expanded)]=\"parametersPanelExpanded\"\n class=\"query-panel\">\n <ng-template mjAccordionTitle>\n <span class=\"panel-title\">\n <i class=\"fa-solid fa-sliders panel-icon\"></i>\n Parameters\n @if (queryParameters.length > 0) {\n <span class=\"panel-badge count\">{{ queryParameters.length }}</span>\n }\n </span>\n </ng-template>\n\n <div class=\"panel-body\">\n @if (isLoadingParameters) {\n <div class=\"panel-loading\">\n <mj-loading text=\"Loading parameters...\"></mj-loading>\n </div>\n } @else {\n @if (queryParameters.length === 0) {\n <mj-empty-state Icon=\"fa-solid fa-sliders\"\n Title=\"No Parameters Defined\"\n Message=\"Add parameters to make your query dynamic and reusable.\"\n [ActionText]=\"EditMode ? 'Add First Parameter' : ''\"\n ActionIcon=\"fa-solid fa-plus\"\n (Action)=\"addParameter()\" />\n } @else {\n @if (EditMode) {\n <div class=\"panel-toolbar\">\n <button type=\"button\" class=\"add-item-btn\" (click)=\"addParameter()\">\n <i class=\"fa-solid fa-plus\"></i> Add Parameter\n </button>\n </div>\n }\n <div class=\"card-grid\">\n @for (param of queryParameters; track param.ID || $index) {\n <div class=\"item-card\" [class.required]=\"param.IsRequired\" (click)=\"editParameter(param)\">\n <div class=\"item-card-header\">\n <div class=\"item-name\">\n <i class=\"fa-solid fa-at item-name-icon param-icon\"></i>\n {{ param.Name }}\n </div>\n <div class=\"item-badges\">\n @if (param.IsRequired) {\n <span class=\"item-badge required\">Required</span>\n }\n </div>\n </div>\n <div class=\"item-card-body\">\n @if (param.Description) {\n <div class=\"item-description\">{{ param.Description }}</div>\n }\n <div class=\"item-meta\">\n <span class=\"meta-tag\">\n <strong>Type:</strong> {{ param.Type || 'Text' }}\n </span>\n @if (param.DefaultValue) {\n <span class=\"meta-tag\">\n <strong>Default:</strong>\n <code class=\"meta-code\">{{ param.DefaultValue }}</code>\n </span>\n }\n </div>\n </div>\n @if (EditMode) {\n <div class=\"item-actions\" (click)=\"$event.stopPropagation()\">\n <button type=\"button\" class=\"item-action-btn\" (click)=\"editParameter(param)\" title=\"Edit parameter\">\n <i class=\"fa-solid fa-pen\"></i>\n </button>\n <button type=\"button\" class=\"item-action-btn delete\" (click)=\"deleteParameter(param)\" title=\"Delete parameter\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n }\n </div>\n </mj-accordion-panel>\n }\n\n <!-- Query Fields Panel -->\n @if (record.IsSaved) {\n <mj-accordion-panel\n [(Expanded)]=\"fieldsPanelExpanded\"\n class=\"query-panel\">\n <ng-template mjAccordionTitle>\n <span class=\"panel-title\">\n <i class=\"fa-solid fa-table panel-icon\"></i>\n Fields\n @if (queryFields.length > 0) {\n <span class=\"panel-badge count\">{{ queryFields.length }}</span>\n }\n </span>\n </ng-template>\n\n <div class=\"panel-body\">\n @if (isLoadingFields) {\n <div class=\"panel-loading\">\n <mj-loading text=\"Loading fields...\"></mj-loading>\n </div>\n } @else {\n @if (queryFields.length === 0) {\n <mj-empty-state Icon=\"fa-solid fa-table\"\n Title=\"No Fields Defined\"\n Message=\"Define output fields for your query results.\"\n [ActionText]=\"EditMode ? 'Add First Field' : ''\"\n ActionIcon=\"fa-solid fa-plus\"\n (Action)=\"addField()\" />\n } @else {\n @if (EditMode) {\n <div class=\"panel-toolbar\">\n <button type=\"button\" class=\"add-item-btn\" (click)=\"addField()\">\n <i class=\"fa-solid fa-plus\"></i> Add Field\n </button>\n </div>\n }\n <div class=\"card-grid\">\n @for (field of queryFields; track field.ID) {\n <div class=\"item-card\">\n <div class=\"item-card-header\">\n <div class=\"item-name\">\n <i class=\"fa-solid fa-columns item-name-icon field-icon\"></i>\n {{ field.Name }}\n </div>\n <div class=\"item-badges\">\n <span class=\"item-badge type\">{{ field.SQLBaseType }}</span>\n @if (field.Sequence) {\n <span class=\"item-badge sequence\">#{{ field.Sequence }}</span>\n }\n </div>\n </div>\n <div class=\"item-card-body\">\n @if (field.Description) {\n <div class=\"item-description\">{{ field.Description }}</div>\n }\n <div class=\"item-meta\">\n <span class=\"meta-tag\">\n <i class=\"fa-solid fa-code\"></i> {{ field.SQLFullType || field.SQLBaseType }}\n </span>\n </div>\n </div>\n @if (EditMode) {\n <div class=\"item-card-actions\">\n <button type=\"button\" class=\"item-action-btn delete\" (click)=\"deleteField(field)\" title=\"Delete field\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n }\n </div>\n </mj-accordion-panel>\n }\n\n <!-- Dependent Queries Panel -->\n @if (record.IsSaved && DependentQueries.length > 0) {\n <mj-accordion-panel\n [(Expanded)]=\"dependentsPanelExpanded\"\n class=\"query-panel\">\n <ng-template mjAccordionTitle>\n <span class=\"panel-title\">\n <i class=\"fa-solid fa-arrow-left panel-icon dependents-icon\"></i>\n Dependent Queries\n <span class=\"panel-badge count\">{{ DependentQueries.length }}</span>\n </span>\n </ng-template>\n\n <div class=\"panel-body\">\n <div class=\"dependents-description\">\n These queries reference this query via <code>{{\"{{query:\\\"...\\\"}}\"}} </code> composition syntax.\n </div>\n <div class=\"card-grid\">\n @for (dep of DependentQueries; track dep.ID) {\n <div class=\"item-card dependent-card\" (click)=\"onDependentQueryClick(dep)\">\n <div class=\"item-card-header\">\n <div class=\"item-name\">\n <i class=\"fa-solid fa-arrow-left item-name-icon dependent-query-icon\"></i>\n {{ dep.Query }}\n </div>\n </div>\n <div class=\"item-card-body\">\n @if (dep.ReferencePath) {\n <div class=\"item-meta\">\n <span class=\"meta-tag\">\n <i class=\"fa-solid fa-link\"></i> {{ dep.ReferencePath }}\n </span>\n </div>\n }\n @if (dep.Alias) {\n <div class=\"item-meta\">\n <span class=\"meta-tag\">\n <strong>Alias:</strong> <code class=\"meta-code\">{{ dep.Alias }}</code>\n </span>\n </div>\n }\n </div>\n <div class=\"item-card-footer\">\n <span class=\"open-link\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\"></i> Open\n </span>\n </div>\n </div>\n }\n </div>\n </div>\n </mj-accordion-panel>\n }\n\n <!-- Query Entities Panel -->\n @if (record.IsSaved) {\n <mj-accordion-panel\n [(Expanded)]=\"entitiesPanelExpanded\"\n class=\"query-panel\">\n <ng-template mjAccordionTitle>\n <span class=\"panel-title\">\n <i class=\"fa-solid fa-database panel-icon\"></i>\n Entities\n @if (queryEntities.length > 0) {\n <span class=\"panel-badge count\">{{ queryEntities.length }}</span>\n }\n </span>\n </ng-template>\n\n <div class=\"panel-body\">\n @if (isLoadingEntities) {\n <div class=\"panel-loading\">\n <mj-loading text=\"Loading entities...\"></mj-loading>\n </div>\n } @else {\n @if (queryEntities.length === 0) {\n <mj-empty-state Icon=\"fa-solid fa-database\"\n Title=\"No Entities Tracked\"\n Message=\"Track which entities this query uses for documentation.\"\n [ActionText]=\"EditMode ? 'Add First Entity' : ''\"\n ActionIcon=\"fa-solid fa-plus\"\n (Action)=\"addEntity()\" />\n } @else {\n @if (EditMode) {\n <div class=\"panel-toolbar\">\n <button type=\"button\" class=\"add-item-btn\" (click)=\"addEntity()\">\n <i class=\"fa-solid fa-plus\"></i> Add Entity\n </button>\n </div>\n }\n <div class=\"card-grid\">\n @for (entity of queryEntities; track entity.ID) {\n <div class=\"item-card\">\n <div class=\"item-card-header\">\n <div class=\"item-name\">\n <i class=\"fa-solid fa-table item-name-icon entity-icon\"></i>\n {{ entity.Entity || 'Select Entity...' }}\n </div>\n @if (EditMode) {\n <div class=\"entity-dropdown-wrapper\">\n <mj-dropdown\n [(ngModel)]=\"entity.EntityID\"\n [name]=\"'entity_' + entity.ID\"\n [Data]=\"getEntityOptions()\"\n TextField=\"text\"\n ValueField=\"id\"\n [ValuePrimitive]=\"true\"\n Placeholder=\"Select entity...\"\n class=\"entity-dropdown\">\n </mj-dropdown>\n </div>\n }\n </div>\n @if (!EditMode && entity.Entity) {\n <div class=\"item-card-body\">\n <div class=\"item-meta\">\n <span class=\"meta-tag\">\n <i class=\"fa-solid fa-database\"></i> Data Source\n </span>\n </div>\n </div>\n }\n @if (EditMode) {\n <div class=\"item-card-actions\">\n <button type=\"button\" class=\"item-action-btn delete\" (click)=\"deleteEntity(entity)\" title=\"Delete entity\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n }\n </div>\n </mj-accordion-panel>\n }\n\n <!-- Details Panel -->\n <mj-accordion-panel\n [(Expanded)]=\"detailsPanelExpanded\"\n class=\"query-panel\">\n <ng-template mjAccordionTitle>\n <span class=\"panel-title\">\n <i class=\"fa-solid fa-info-circle panel-icon\"></i>\n Details\n </span>\n </ng-template>\n\n <div class=\"panel-body\">\n <div class=\"details-grid\">\n <!-- Reusable -->\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-puzzle-piece\"></i> Reusable\n </label>\n @if (EditMode) {\n <mj-switch [(ngModel)]=\"record.Reusable\" name=\"reusable\"></mj-switch>\n <div class=\"detail-hint\">Allow other queries to reference this query using composition syntax</div>\n } @else {\n <div class=\"detail-value\">\n @if (record.Reusable) {\n <span class=\"detail-tag positive\"><i class=\"fa-solid fa-check\"></i> Reusable</span>\n } @else {\n <span class=\"detail-tag neutral\"><i class=\"fa-solid fa-times\"></i> Not Reusable</span>\n }\n </div>\n }\n </div>\n\n <!-- Cache Enabled -->\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-bolt\"></i> Cache Enabled\n </label>\n @if (EditMode) {\n <mj-switch [(ngModel)]=\"record.CacheEnabled\" name=\"cacheEnabled\"></mj-switch>\n <div class=\"detail-hint\">Cache query results in memory to reduce database load on repeated runs</div>\n } @else {\n <div class=\"detail-value\">\n @if (record.CacheEnabled) {\n <span class=\"detail-tag positive\"><i class=\"fa-solid fa-check\"></i> Caching On</span>\n } @else {\n <span class=\"detail-tag neutral\"><i class=\"fa-solid fa-times\"></i> Caching Off</span>\n }\n </div>\n }\n </div>\n\n <!-- Cache TTL -->\n @if (record.CacheEnabled) {\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-clock\"></i> Cache TTL (Minutes)\n </label>\n @if (EditMode) {\n <input class=\"mj-input detail-input-narrow\"\n type=\"number\"\n [(ngModel)]=\"record.CacheTTLMinutes\"\n name=\"cacheTTLMinutes\"\n min=\"1\"\n placeholder=\"Default\" />\n <div class=\"detail-hint\">How long cached results remain valid. Leave blank for default TTL.</div>\n } @else {\n <div class=\"detail-value\">{{ record.CacheTTLMinutes != null ? record.CacheTTLMinutes + ' min' : 'Default' }}</div>\n }\n </div>\n }\n\n <!-- Audit Query Runs -->\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-clipboard-list\"></i> Audit Runs\n </label>\n @if (EditMode) {\n <mj-switch [(ngModel)]=\"record.AuditQueryRuns\" name=\"auditQueryRuns\"></mj-switch>\n <div class=\"detail-hint\">Log all executions of this query to the Audit Log for tracking and compliance</div>\n } @else {\n <div class=\"detail-value\">\n @if (record.AuditQueryRuns) {\n <span class=\"detail-tag positive\"><i class=\"fa-solid fa-check\"></i> Auditing On</span>\n } @else {\n <span class=\"detail-tag neutral\"><i class=\"fa-solid fa-times\"></i> Auditing Off</span>\n }\n </div>\n }\n </div>\n\n <!-- Uses Template -->\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-file-code\"></i> Template Usage\n </label>\n @if (EditMode) {\n <mj-switch [(ngModel)]=\"record.UsesTemplate\" name=\"usesTemplate\"></mj-switch>\n } @else {\n <div class=\"detail-value\">\n @if (record.UsesTemplate) {\n <span class=\"detail-tag positive\"><i class=\"fa-solid fa-check\"></i> Uses Templates</span>\n } @else {\n <span class=\"detail-tag neutral\"><i class=\"fa-solid fa-times\"></i> No Templates</span>\n }\n </div>\n }\n </div>\n\n <!-- Created Date -->\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-calendar-plus\"></i> Created\n </label>\n <div class=\"detail-value\">{{ formatDate(record.__mj_CreatedAt) }}</div>\n </div>\n\n <!-- Updated Date -->\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-calendar-check\"></i> Last Updated\n </label>\n <div class=\"detail-value\">{{ formatDate(record.__mj_UpdatedAt) }}</div>\n </div>\n\n <!-- Quality Rank -->\n @if (record.QualityRank != null) {\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-star\"></i> Quality Rank\n </label>\n <div class=\"detail-value\">{{ record.QualityRank }}/10</div>\n </div>\n }\n </div>\n </div>\n </mj-accordion-panel>\n\n <!-- Permissions Panel -->\n @if (record.IsSaved) {\n <mj-accordion-panel\n [(Expanded)]=\"permissionsPanelExpanded\"\n class=\"query-panel\">\n <ng-template mjAccordionTitle>\n <span class=\"panel-title\">\n <i class=\"fa-solid fa-shield-alt panel-icon\"></i>\n Permissions\n </span>\n </ng-template>\n\n <div class=\"panel-body\">\n @if (isLoadingPermissions) {\n <div class=\"panel-loading\">\n <mj-loading text=\"Loading permissions...\"></mj-loading>\n </div>\n } @else {\n @if (queryPermissions.length === 0 && !EditMode) {\n <mj-empty-state Icon=\"fa-solid fa-shield-halved\"\n Title=\"No Permissions Set\"\n Message=\"This query uses default permissions.\" />\n } @else {\n @if (EditMode) {\n <mj-explorer-entity-data-grid\n [Params]=\"BuildRelationshipViewParamsByEntityName('MJ: Query Permissions','QueryID')\"\n [NewRecordValues]=\"NewRecordValues('MJ: Query Permissions')\"\n [AllowLoad]=\"true\"\n [ShowToolbar]=\"false\">\n </mj-explorer-entity-data-grid>\n } @else {\n <div class=\"permissions-list\">\n @for (permission of queryPermissions; track permission.ID) {\n <div class=\"permission-card\">\n <i class=\"fa-solid fa-users permission-icon\"></i>\n <div class=\"permission-info\">\n <div class=\"permission-role\">{{ permission.Role }}</div>\n <div class=\"permission-type\">Role Permission</div>\n </div>\n <span class=\"permission-badge\">\n <i class=\"fa-solid fa-play\"></i> Can Execute\n </span>\n </div>\n }\n </div>\n }\n }\n }\n </div>\n </mj-accordion-panel>\n }\n\n </div>\n </form>\n</mj-record-form-container>\n\n<!-- Query Run Dialog -->\n<mj-query-run-dialog\n [query]=\"record\"\n [parameters]=\"queryParameters\"\n [(isVisible)]=\"showRunDialog\"\n (onClose)=\"onRunDialogClose()\">\n</mj-query-run-dialog>\n}\n", styles: [".k-pane {\n background-color: var(--mj-bg-surface);\n}\n\n.content-margin {\n margin: 10px;\n}\n\n\na {\n font-size: 14px;\n font-weight: bolder;\n}\n\n.tab-header-icon {\n margin-right: 5px;\n}\n\n.record-form {\n display: block;\n flex-direction: column;\n background-color: var(--mj-bg-surface);\n padding: 0;\n min-height: 100vh;\n}\n\n.record-form-group {\n margin-top: 0px;\n background-color: var(--mj-bg-surface);\n}\n\nbutton {\n margin-right: 5px;\n}\n\n.record-form h2 {\n margin-bottom: 10px;\n}\n\n.k-splitter {\n border-width: 0px;\n}\n\n.record-form-row {\n display: grid;\n grid-template-columns: auto 1fr;\n align-items: start;\n gap: 10px;\n margin-bottom: 12px;\n padding-top: 5px;\n padding-bottom: 5px;\n}\n\n.record-form .record-form-row > :first-child {\n font-weight: bold;\n padding-right: 10px;\n}\n\n.record-form .record-form-row > span {\n white-space: pre-line;\n max-height: 300px;\n overflow: auto;\n}\n\n@media (min-width: 768px) {\n .record-form-row {\n flex-direction: row;\n align-items: center;\n }\n\n .record-form-row label {\n width: 240px;\n margin-bottom: 0;\n }\n}\n\n/* Collapsible Panel Styles */\n.form-panels-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: 16px;\n background-color: var(--mj-bg-surface);\n}\n\n/* All field sections take full width */\n.form-panels-container > .form-card {\n width: 100%;\n}\n\n/* Related entity grid container - responsive layout */\n.form-panels-container .related-entity-grid {\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n}\n\n/* Responsive multi-column layout for related entities on wider screens */\n@media (min-width: 1400px) {\n .form-panels-container .related-entity-grid {\n grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));\n }\n}\n\n.form-card {\n background: var(--mj-bg-surface-card);\n border-radius: 8px;\n box-shadow: 0 2px 4px var(--mj-shadow-sm);\n overflow: hidden;\n}\n\n.collapsible-card {\n overflow: hidden;\n}\n\n.collapsible-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px 24px;\n background: var(--mj-bg-surface-card);\n border-bottom: 2px solid var(--mj-border-default);\n cursor: pointer;\n user-select: none;\n transition: all 0.3s ease;\n}\n\n.collapsible-header:hover {\n background: var(--mj-bg-surface-sunken);\n border-bottom-color: var(--mj-brand-primary);\n}\n\n.collapsible-title {\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n}\n\n.collapsible-title i {\n font-size: 20px;\n color: var(--mj-brand-primary);\n}\n\n.collapsible-title h3 {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.collapsible-header .collapse-icon {\n color: var(--mj-text-muted);\n transition: transform 0.3s ease;\n}\n\n.collapsible-body {\n max-height: 2000px;\n overflow: hidden;\n transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;\n opacity: 1;\n}\n\n.collapsible-body.collapsed {\n max-height: 0;\n padding: 0;\n opacity: 0;\n}\n\n.form-body {\n padding: 24px;\n}\n\n/* Related Entity Sections - Visual Distinction */\n.form-card.related-entity {\n background: var(--mj-bg-surface-card);\n border-left: 3px solid var(--mj-brand-primary);\n}\n\n.form-card.related-entity .collapsible-header {\n background: var(--mj-bg-surface-sunken);\n}\n\n.form-card.related-entity .collapsible-header:hover {\n background: var(--mj-bg-surface-card);\n border-bottom-color: var(--mj-brand-primary);\n}\n\n.form-card.related-entity .collapsible-title i {\n color: var(--mj-brand-primary);\n}\n\n/* Section Controls */\n.form-section-controls {\n display: flex;\n gap: 10px;\n padding: 14px 18px;\n background: var(--mj-bg-surface-card);\n border-bottom: 2px solid var(--mj-border-default);\n align-items: center;\n flex-wrap: wrap;\n box-shadow: 0 1px 3px var(--mj-shadow-sm);\n}\n\n.form-section-controls .control-group {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n.form-section-controls button {\n padding: 8px 14px;\n font-size: 13px;\n border: 1px solid var(--mj-border-strong);\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-secondary);\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s;\n margin-right: 0;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-weight: 500;\n}\n\n.form-section-controls button:hover {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border-color: var(--mj-brand-primary);\n transform: translateY(-1px);\n box-shadow: 0 2px 4px var(--mj-shadow-md);\n}\n\n.form-section-controls button:active {\n transform: translateY(0);\n}\n\n.form-section-controls button i {\n margin-right: 0;\n font-size: 14px;\n}\n\n.form-section-controls .section-search {\n padding: 8px 14px;\n font-size: 13px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n width: 240px;\n transition: all 0.2s;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.form-section-controls .section-search:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.form-section-controls .section-search::placeholder {\n color: var(--mj-text-muted);\n font-style: italic;\n}\n\n.form-section-controls .section-count {\n font-size: 13px;\n color: var(--mj-text-muted);\n margin-left: auto;\n font-weight: 500;\n}\n\n/* Hidden sections for search filter */\n.form-card.search-hidden {\n display: none;\n}\n\n/* Section count badge */\n.section-count-badge {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n padding: 2px 8px;\n border-radius: 12px;\n font-size: 12px;\n font-weight: 600;\n}\n\n/* Search highlighting in section names */\n.collapsible-title h3 .search-highlight {\n background-color: var(--mj-status-warning);\n color: var(--mj-text-primary);\n padding: 2px 4px;\n border-radius: 3px;\n font-weight: 700;\n}\n\n/* Row count badge in section headers */\n.collapsible-title .row-count-badge {\n background: var(--mj-status-success);\n color: var(--mj-text-inverse);\n padding: 3px 6px 2px 6px;\n border-radius: 12px;\n font-size: 12px;\n font-weight: 600;\n margin-left: 8px;\n vertical-align: middle;\n position: relative;\n top: -2px;\n display: inline-block;\n line-height: 1;\n}\n\n/* Gray badge for zero rows (loaded but empty) */\n.collapsible-title .row-count-badge.zero-rows {\n background: var(--mj-text-muted);\n}\n", "/* Override shared form-styles to enable flex layout */\n:host {\n display: block;\n height: 100%;\n}\n\n/* Override the shared record-form min-height so flex layout works properly */\n.record-form {\n min-height: 0 !important;\n}\n\n/* ========================================\n Saving Overlay\n ======================================== */\n\n.saving-overlay {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 8px 16px;\n background: color-mix(in srgb, var(--mj-status-info) 10%, var(--mj-bg-surface));\n border-bottom: 1px solid var(--mj-border-subtle);\n color: var(--mj-text-secondary);\n font-size: 13px;\n font-weight: 500;\n flex-shrink: 0;\n}\n\n.saving-spinner {\n color: var(--mj-brand-primary);\n font-size: 14px;\n}\n\n.content-saving {\n pointer-events: none;\n opacity: 0.6;\n}\n\n/* ========================================\n Header Section \u2014 matches Query Browser gradient\n ======================================== */\n\n.query-header {\n flex-shrink: 0;\n background: var(--mj-brand-primary);\n border-bottom: none;\n padding: 0;\n}\n\n.query-header-content {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px 20px;\n}\n\n.query-header-top {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 20px;\n}\n\n.query-name-section {\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.query-title-icon {\n color: rgba(255, 255, 255, 0.85);\n font-size: 1.3em;\n flex-shrink: 0;\n}\n\n.query-name-input {\n font-size: 1.2em;\n font-weight: 600;\n min-width: 300px;\n flex: 1;\n}\n\n.query-name-display {\n margin: 0;\n color: var(--mj-text-inverse, white);\n font-weight: 600;\n font-size: 1.2em;\n flex: 1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.query-header-actions {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n.run-query-btn {\n white-space: nowrap;\n}\n\n/* Meta row (category + status) */\n.query-meta-row {\n display: flex;\n gap: 24px;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.query-meta-item {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.meta-label {\n font-weight: 500;\n color: rgba(255, 255, 255, 0.75);\n font-size: var(--mj-text-sm);\n min-width: 60px;\n}\n\n.meta-value {\n color: rgba(255, 255, 255, 0.95);\n font-size: var(--mj-text-sm);\n}\n\n.meta-dropdown {\n min-width: 200px;\n}\n\n.status-pill {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 4px 12px;\n border-radius: var(--mj-radius-xl);\n color: var(--mj-text-inverse, white);\n font-size: var(--mj-text-sm);\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.status-pill i {\n font-size: var(--mj-text-xs);\n}\n\n/* Description row */\n.query-description-row {\n margin-top: 2px;\n}\n\n.query-description-input {\n width: 100%;\n}\n\n.query-description-text {\n margin: 0;\n color: rgba(255, 255, 255, 0.8);\n font-size: var(--mj-text-sm);\n line-height: 1.4;\n}\n\n/* ========================================\n Status Warning Banner\n ======================================== */\n\n\n/* ========================================\n Main Content Area\n ======================================== */\n\n.query-content {\n flex: 1;\n min-height: 0;\n padding: 16px;\n overflow-y: auto;\n background: var(--mj-bg-surface-card);\n}\n\n/* ========================================\n Accordion Panel Overrides \u2014 Modern Style\n ======================================== */\n\n.query-panel {\n margin-bottom: 12px;\n}\n\n::ng-deep .query-content mj-accordion-panel .mj-accordion-panel {\n border: none !important;\n border-radius: var(--mj-radius-md) !important;\n margin-bottom: 12px !important;\n box-shadow: var(--mj-shadow-sm) !important;\n background: var(--mj-bg-surface) !important;\n overflow: hidden !important;\n}\n\n::ng-deep .query-content .mj-accordion-header {\n background: var(--mj-bg-surface) !important;\n border: none !important;\n padding: 14px 18px !important;\n border-radius: var(--mj-radius-md) !important;\n color: var(--mj-text-primary) !important;\n font-weight: 600 !important;\n font-size: var(--mj-text-sm) !important;\n transition: background 0.15s ease !important;\n}\n\n::ng-deep .query-content .mj-accordion-header:hover {\n background: var(--mj-bg-surface-card) !important;\n}\n\n::ng-deep .query-content .mj-accordion-panel--expanded .mj-accordion-header {\n background: var(--mj-brand-primary) !important;\n color: white !important;\n border-radius: var(--mj-radius-md) var(--mj-radius-md) 0 0 !important;\n outline-color: var(--mj-text-inverse);\n}\n\n::ng-deep .query-content .mj-accordion-body {\n padding: 0 !important;\n border: none !important;\n background: var(--mj-bg-surface) !important;\n border-radius: 0 0 var(--mj-radius-md) var(--mj-radius-md) !important;\n}\n\n/* ========================================\n Panel Title & Badges\n ======================================== */\n\n.panel-title-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n}\n\n.panel-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 600;\n}\n\n.panel-icon {\n opacity: 0.7;\n}\n\n.sql-icon {\n color: var(--mj-brand-primary);\n}\n\n::ng-deep .mj-accordion-panel--expanded .panel-icon {\n color: rgba(255, 255, 255, 0.85) !important;\n opacity: 1;\n}\n\n.panel-badge {\n padding: 2px 8px;\n border-radius: var(--mj-radius-lg);\n font-size: var(--mj-text-xs);\n font-weight: 600;\n}\n\n.panel-badge.defined {\n background: var(--mj-status-success);\n color: white;\n}\n\n.panel-badge.count {\n background: var(--mj-brand-primary);\n color: white;\n}\n\n::ng-deep .mj-accordion-panel--expanded .panel-badge.count {\n background: rgba(255, 255, 255, 0.25) !important;\n}\n\n::ng-deep .mj-accordion-panel--expanded .panel-badge.defined {\n background: rgba(255, 255, 255, 0.25) !important;\n}\n\n.filters-help-btn {\n display: flex;\n align-items: center;\n gap: 4px;\n margin-right: 8px;\n font-size: var(--mj-text-xs);\n}\n\n/* ========================================\n Panel Body & Loading\n ======================================== */\n\n.panel-body {\n padding: 16px 0;\n}\n\n.panel-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 40px;\n}\n\n.panel-toolbar {\n display: flex;\n justify-content: flex-end;\n padding: 0 20px 12px;\n}\n\n/* ========================================\n SQL Panel\n ======================================== */\n\n.sql-panel-content {\n display: flex;\n flex-direction: column;\n}\n\n.sql-editor {\n flex: 1;\n height: 400px;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-sm);\n margin: 16px;\n}\n\n/* Filters Help */\n.filters-help {\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 16px;\n margin: 0 16px 16px;\n}\n\n.filters-help-title {\n margin: 0 0 12px 0;\n color: var(--mj-text-primary);\n font-weight: 600;\n font-size: var(--mj-text-sm);\n}\n\n.filters-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 10px;\n}\n\n.filter-card {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 12px;\n transition: transform 0.15s ease, box-shadow 0.15s ease;\n}\n\n.filter-card:hover {\n transform: translateY(-1px);\n box-shadow: var(--mj-shadow-md);\n}\n\n.filter-name {\n font-family: 'Courier New', monospace;\n font-weight: bold;\n color: var(--mj-brand-primary);\n margin-bottom: 4px;\n}\n\n.filter-description {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-secondary);\n margin-bottom: 6px;\n}\n\n.filter-syntax {\n font-family: 'Courier New', monospace;\n font-size: var(--mj-text-xs);\n background: var(--mj-bg-surface-card);\n padding: 6px;\n border-radius: var(--mj-radius-sm);\n margin-bottom: 4px;\n}\n\n.filter-notes {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-disabled);\n font-style: italic;\n}\n\n/* ========================================\n Card Grid (Parameters, Fields, Entities)\n ======================================== */\n\n.card-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));\n gap: 12px;\n padding: 0 20px 20px;\n}\n\n.item-card {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 14px;\n transition: all 0.15s ease;\n cursor: pointer;\n position: relative;\n}\n\n.item-card:hover {\n border-color: var(--mj-brand-primary);\n box-shadow: 0 2px 8px color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n}\n\n.item-card.required {\n border-left: 3px solid var(--mj-status-warning);\n}\n\n.item-card-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 10px;\n}\n\n.item-name {\n font-weight: 600;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.item-name-icon {\n font-size: var(--mj-text-sm);\n}\n\n.item-name-icon.param-icon {\n color: var(--mj-brand-primary);\n}\n\n.item-name-icon.field-icon {\n color: var(--mj-brand-primary);\n}\n\n.item-name-icon.entity-icon {\n color: var(--mj-status-success);\n}\n\n.item-badges {\n display: flex;\n gap: 6px;\n}\n\n.item-badge {\n padding: 2px 8px;\n border-radius: var(--mj-radius-lg);\n font-size: var(--mj-text-xs);\n font-weight: 600;\n color: white;\n}\n\n.item-badge.required {\n background: var(--mj-status-warning);\n}\n\n.item-badge.type {\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.item-badge.sequence {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n color: color-mix(in srgb, var(--mj-brand-primary) 80%, purple);\n}\n\n.item-card-body {\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-sm);\n}\n\n.item-description {\n margin-bottom: 8px;\n}\n\n.item-meta {\n display: flex;\n gap: 16px;\n font-size: var(--mj-text-xs);\n}\n\n.meta-tag {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.meta-code {\n background: var(--mj-bg-surface-card);\n padding: 1px 4px;\n border-radius: var(--mj-radius-sm);\n font-size: var(--mj-text-xs);\n}\n\n/* Card actions (edit/delete) */\n.item-actions {\n position: absolute;\n top: 10px;\n right: 10px;\n display: flex;\n gap: 4px;\n opacity: 0;\n transition: opacity 0.15s ease;\n}\n\n.item-card:hover .item-actions {\n opacity: 1;\n}\n\n.item-card-actions {\n display: flex;\n justify-content: flex-end;\n margin-top: 8px;\n}\n\n.item-action-btn {\n background: none;\n border: none;\n padding: 4px 8px;\n border-radius: var(--mj-radius-sm);\n cursor: pointer;\n color: var(--mj-text-disabled);\n transition: all 0.15s ease;\n}\n\n.item-action-btn:hover {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-brand-primary);\n}\n\n.item-action-btn.delete:hover {\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n color: var(--mj-status-error);\n}\n\n/* Entity dropdown in card */\n.entity-dropdown-wrapper {\n flex: 1;\n margin-left: 12px;\n}\n\n.entity-dropdown {\n width: 100%;\n}\n\n/* ========================================\n Details Grid\n ======================================== */\n\n.details-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));\n gap: 16px;\n padding: 16px 20px;\n}\n\n.detail-item {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.detail-label {\n font-size: var(--mj-text-xs);\n font-weight: 600;\n color: var(--mj-text-disabled);\n display: flex;\n align-items: center;\n gap: 6px;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n.detail-value {\n font-size: var(--mj-text-sm);\n color: var(--mj-text-primary);\n}\n\n.detail-tag {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: var(--mj-text-sm);\n}\n\n.detail-tag.positive {\n color: var(--mj-status-success);\n}\n\n.detail-tag.neutral {\n color: var(--mj-text-disabled);\n}\n\n.detail-hint {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n line-height: 1.4;\n}\n\n.detail-input-narrow {\n max-width: 120px;\n padding: 4px 8px;\n font-size: var(--mj-text-sm);\n}\n\n/* ========================================\n Permissions\n ======================================== */\n\n.permissions-list {\n padding: 0 20px;\n}\n\n.permission-card {\n display: flex;\n align-items: center;\n gap: 14px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 14px 16px;\n margin-bottom: 8px;\n}\n\n.permission-icon {\n font-size: 1.3em;\n color: var(--mj-brand-primary);\n}\n\n.permission-info {\n flex: 1;\n}\n\n.permission-role {\n font-weight: 600;\n color: var(--mj-text-primary);\n font-size: var(--mj-text-sm);\n}\n\n.permission-type {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-disabled);\n}\n\n.permission-badge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n background: var(--mj-brand-primary);\n color: white;\n padding: 4px 10px;\n border-radius: var(--mj-radius-md);\n font-size: var(--mj-text-xs);\n font-weight: 500;\n}\n\n/* ========================================\n Empty State\n ======================================== */\n\n/* ========================================\n Buttons\n ======================================== */\n\n.add-item-btn {\n background: var(--mj-brand-primary);\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: var(--mj-radius-md);\n cursor: pointer;\n transition: all 0.15s ease;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-weight: 500;\n font-size: var(--mj-text-sm);\n}\n\n.add-item-btn:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 85%, black);\n box-shadow: 0 2px 6px color-mix(in srgb, var(--mj-brand-primary) 30%, transparent);\n}\n\n/* ========================================\n Badge (reused across components)\n ======================================== */\n\n.badge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n/* ========================================\n Technical Description Panel\n ======================================== */\n\n.technical-description-textarea {\n width: 100%;\n font-family: 'Consolas', 'Monaco', 'Courier New', monospace;\n font-size: 13px;\n}\n\n.technical-description-preview {\n margin-top: 16px;\n border-top: 1px solid var(--mj-border-default);\n padding-top: 12px;\n}\n\n.preview-label {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-text-muted);\n margin-bottom: 8px;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.technical-description-view {\n max-height: 500px;\n overflow-y: auto;\n padding: 12px 16px;\n}\n\n/* Dependent Queries */\n.dependents-icon {\n color: var(--mj-status-warning);\n}\n\n.dependents-description {\n padding: 0 20px 12px;\n font-size: 13px;\n color: var(--mj-text-muted);\n}\n\n.dependents-description code {\n background: var(--mj-bg-surface-sunken);\n padding: 1px 5px;\n border-radius: 3px;\n font-size: 12px;\n}\n\n.dependent-card {\n cursor: pointer;\n border-left: 3px solid var(--mj-status-warning) !important;\n}\n\n.dependent-card:hover {\n border-left-color: var(--mj-status-warning-text) !important;\n background: color-mix(in srgb, var(--mj-status-warning) 8%, var(--mj-bg-surface)) !important;\n}\n\n.dependent-query-icon {\n color: var(--mj-status-warning) !important;\n}\n\n.item-card-footer {\n padding-top: 8px;\n border-top: 1px solid var(--mj-bg-surface-sunken);\n margin-top: 8px;\n}\n\n.open-link {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: var(--mj-brand-primary);\n font-weight: 500;\n}\n\n.dependent-card:hover .open-link {\n color: var(--mj-brand-primary-hover);\n}\n\n/* Category selector row: tree-dropdown + create/edit icon buttons */\n.meta-dropdown-row {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.meta-dropdown-row .meta-dropdown {\n flex: 1;\n min-width: 0;\n}\n"] }]
2320
+ args: [{ standalone: false, selector: 'mj-query-form', template: "@if (record) {\n<mj-record-form-container [Record]=\"record\" [FormComponent]=\"this\"\n [ToolbarConfig]=\"ToolbarConfig\"\n [IsSaving]=\"IsSaving\"\n [WidthMode]=\"'full-width'\"\n (Navigate)=\"OnFormNavigate($event)\"\n (DeleteRequested)=\"OnDeleteRequested()\"\n (FavoriteToggled)=\"OnFavoriteToggled()\"\n (HistoryRequested)=\"OnHistoryRequested()\"\n (ListManagementRequested)=\"OnListManagementRequested()\">\n <form class=\"record-form\" #form=\"ngForm\" style=\"display: flex; flex-direction: column; height: 100%; overflow: hidden;\">\n\n <!-- Saving Overlay -->\n @if (IsSaving) {\n <div class=\"saving-overlay\">\n <i class=\"fa-solid fa-spinner fa-spin saving-spinner\"></i>\n <span>Saving...</span>\n </div>\n }\n\n <!-- Header Section -->\n <div class=\"query-header\" [class.content-saving]=\"IsSaving\">\n <div class=\"query-header-content\">\n <!-- Top Row: Name and Run Button -->\n <div class=\"query-header-top\">\n <!-- Left: Query Name -->\n <div class=\"query-name-section\">\n <i class=\"fa-solid fa-database query-title-icon\"></i>\n @if (EditMode) {\n <input class=\"mj-input query-name-input\"\n [(ngModel)]=\"record.Name\"\n name=\"queryName\"\n placeholder=\"Enter query name...\" />\n } @else {\n <h4 class=\"query-name-display\">{{ record.Name || 'Untitled Query' }}</h4>\n }\n </div>\n\n <!-- Right: Action Buttons -->\n <div class=\"query-header-actions\">\n @if (record.ID) {\n <button mjButton\n variant=\"primary\"\n [disabled]=\"EditMode || !record.SQL || record.SQL.trim().length === 0\"\n (click)=\"runQuery()\"\n title=\"Run Query\"\n class=\"run-query-btn\">\n <i class=\"fa-solid fa-play\"></i> Run\n </button>\n }\n </div>\n </div>\n\n <!-- Second Row: Category and Status -->\n <div class=\"query-meta-row\">\n <!-- Category -->\n <div class=\"query-meta-item\">\n <label class=\"meta-label\">Category</label>\n @if (EditMode) {\n <div class=\"meta-dropdown-row\">\n <mj-tree-dropdown\n [BranchConfig]=\"CategoryBranchConfig\"\n [Value]=\"CategoryIDAsKey\"\n [SelectableTypes]=\"'branch'\"\n [SelectionMode]=\"'single'\"\n [Placeholder]=\"'Select category...'\"\n [EnableSearch]=\"true\"\n [Clearable]=\"true\"\n (ValueChange)=\"OnCategoryTreeChange($event)\"\n class=\"meta-dropdown\">\n </mj-tree-dropdown>\n <button mjButton variant=\"icon\" title=\"New category\" (click)=\"createCategory()\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n @if (record.CategoryID) {\n <button mjButton variant=\"icon\" title=\"Edit category\" (click)=\"editSelectedCategory()\">\n <i class=\"fa-solid fa-pen\"></i>\n </button>\n }\n </div>\n } @else {\n <span class=\"meta-value\">{{ categoryPathDisplay || 'Uncategorized' }}</span>\n }\n </div>\n\n <!-- Status -->\n <div class=\"query-meta-item\">\n <label class=\"meta-label\">Status</label>\n @if (EditMode) {\n <mj-dropdown\n [(ngModel)]=\"record.Status\"\n name=\"status\"\n [Data]=\"statusOptions\"\n TextField=\"text\"\n ValueField=\"value\"\n [ValuePrimitive]=\"true\"\n class=\"meta-dropdown status-dropdown\">\n </mj-dropdown>\n } @else {\n <span class=\"status-pill\"\n [style.background]=\"getStatusBadgeColor()\">\n <i class=\"fa-solid\" [class]=\"getStatusBannerIcon()\"></i>\n {{ record.Status || 'Unknown' }}\n </span>\n }\n </div>\n\n <!-- Metadata extraction status -->\n @if (record.IsSaved) {\n <div class=\"query-meta-item\">\n <label class=\"meta-label\">Metadata</label>\n <div class=\"meta-dropdown-row\">\n <span class=\"extraction-badge\" [class]=\"'extraction-badge ' + ExtractionStatusClass\"\n [title]=\"'Last metadata extraction: ' + ExtractionStatusLabel\">\n {{ ExtractionStatusLabel }}\n </span>\n @if (CanRefreshMetadata) {\n <button mjButton Variant=\"outline\" Size=\"sm\" type=\"button\" class=\"refresh-metadata-btn\"\n (click)=\"OpenRefreshDialog()\" title=\"Re-derive the fields, parameters and entities from the SQL and the database server\">\n <i class=\"fa-solid fa-rotate\"></i> Refresh metadata\n </button>\n }\n </div>\n </div>\n }\n </div>\n\n <!-- Third Row: Description -->\n @if (EditMode || record.Description) {\n <div class=\"query-description-row\">\n @if (EditMode) {\n <textarea class=\"mj-input query-description-input\"\n [(ngModel)]=\"record.Description\"\n name=\"description\"\n rows=\"2\"\n placeholder=\"Enter query description...\">\n </textarea>\n } @else {\n <p class=\"query-description-text\">{{ record.Description }}</p>\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Status Warning Banner for Non-Approved Queries -->\n @if (record.Status && record.Status !== 'Approved' && !EditMode) {\n <mj-alert Variant=\"warning\">\n <span>\n This query has status <strong>{{ record.Status }}</strong>. {{ getStatusBannerMessage() }}\n </span>\n </mj-alert>\n }\n\n <!-- Main Content Area with Expansion Panels -->\n <div class=\"query-content\" [class.content-saving]=\"IsSaving\">\n\n <!-- SQL Query Panel -->\n <mj-accordion-panel\n [(Expanded)]=\"sqlPanelExpanded\"\n class=\"query-panel\">\n <ng-template mjAccordionTitle>\n <span class=\"panel-title-row\">\n <span class=\"panel-title\">\n <i class=\"fa-solid fa-code panel-icon sql-icon\"></i>\n SQL\n @if (record.SQL) {\n <span class=\"panel-badge defined\">&mdash; Defined</span>\n }\n </span>\n </span>\n </ng-template>\n\n <div class=\"sql-panel-toolbar\" style=\"display: flex; justify-content: flex-end; padding: 4px 0 8px;\">\n <button type=\"button\"\n mjButton\n variant=\"flat\"\n (click)=\"toggleFiltersHelp()\"\n title=\"Show/hide SQL filters help\"\n class=\"filters-help-btn\">\n <i class=\"fa-solid fa-question-circle\"></i>\n <span>Filters Help</span>\n <i class=\"fa-solid\" [ngClass]=\"showFiltersHelp ? 'fa-chevron-up' : 'fa-chevron-down'\"></i>\n </button>\n </div>\n\n <div class=\"sql-panel-content\">\n @if (SaveDiagnostics.length > 0 || SaveDiagnosticsHeadline) {\n <mj-query-diagnostics class=\"save-diagnostics\"\n [Headline]=\"SaveDiagnosticsHeadline\"\n [Diagnostics]=\"SaveDiagnostics\"\n Severity=\"error\"\n [LocationsClickable]=\"true\"\n (LocationClick)=\"OnDiagnosticLocationClick($event)\" />\n }\n <!-- Code Editor -->\n <mj-code-editor #sqlEditor\n (change)=\"onSQLChange($event)\"\n (CompositionTokenClick)=\"onCompositionTokenClick($event)\"\n [language]=\"'sql'\"\n class=\"sql-editor\">\n </mj-code-editor>\n\n @if (SaveDiagnostics.length === 0 && ExtractionDiagnostics.length > 0) {\n <mj-query-diagnostics class=\"extraction-diagnostics\"\n [Headline]=\"'Last metadata extraction: ' + ExtractionStatusLabel\"\n [Diagnostics]=\"ExtractionDiagnostics\"\n [Severity]=\"ExtractionSeverity\"\n [LocationsClickable]=\"true\"\n (LocationClick)=\"OnDiagnosticLocationClick($event)\" />\n }\n\n <!-- SQL Filters Help (Below Editor) -->\n @if (showFiltersHelp) {\n <div class=\"filters-help\">\n <h6 class=\"filters-help-title\">\n <i class=\"fa-solid fa-filter\"></i> Available SQL Filters for Parameterized Queries\n </h6>\n <div class=\"filters-grid\">\n @for (filter of sqlFilters; track filter.name) {\n <div class=\"filter-card\">\n <div class=\"filter-name\">{{ filter.name }}</div>\n <div class=\"filter-description\">{{ filter.description }}</div>\n <div class=\"filter-syntax\">{{ filter.exampleSyntax }}</div>\n @if (filter.notes) {\n <div class=\"filter-notes\">{{ filter.notes }}</div>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n </mj-accordion-panel>\n\n <!-- Technical Description Panel -->\n @if (record.TechnicalDescription || EditMode) {\n <mj-accordion-panel\n [(Expanded)]=\"technicalDescriptionPanelExpanded\"\n class=\"query-panel\">\n <ng-template mjAccordionTitle>\n <span class=\"panel-title\">\n <i class=\"fa-solid fa-book panel-icon\"></i>\n Technical Description\n @if (record.TechnicalDescription) {\n <span class=\"panel-badge defined\">&mdash; Documented</span>\n }\n </span>\n </ng-template>\n\n <div class=\"panel-body\">\n @if (EditMode) {\n <textarea class=\"mj-input technical-description-textarea\"\n [(ngModel)]=\"record.TechnicalDescription\"\n name=\"technicalDescription\"\n rows=\"8\"\n placeholder=\"Technical documentation of the query logic, performance considerations, and parameter usage. Supports markdown and mermaid diagrams.\">\n </textarea>\n @if (record.TechnicalDescription) {\n <div class=\"technical-description-preview\">\n <div class=\"preview-label\">\n <i class=\"fa-solid fa-eye\"></i> Preview\n </div>\n <mj-markdown\n [data]=\"record.TechnicalDescription || ''\"\n [enableMermaid]=\"true\"\n [enableHighlight]=\"true\"\n [enableCollapsibleHeadings]=\"false\"\n [enableSmartypants]=\"true\">\n </mj-markdown>\n </div>\n }\n } @else {\n <div class=\"technical-description-view\">\n <mj-markdown\n [data]=\"record.TechnicalDescription || ''\"\n [enableMermaid]=\"true\"\n [enableHighlight]=\"true\"\n [enableCollapsibleHeadings]=\"false\"\n [enableSmartypants]=\"true\">\n </mj-markdown>\n </div>\n }\n </div>\n </mj-accordion-panel>\n }\n\n <!-- Parameters Panel -->\n @if (record.IsSaved || EditMode) {\n <mj-accordion-panel\n [(Expanded)]=\"parametersPanelExpanded\"\n class=\"query-panel\">\n <ng-template mjAccordionTitle>\n <span class=\"panel-title\">\n <i class=\"fa-solid fa-sliders panel-icon\"></i>\n Parameters\n @if (queryParameters.length > 0) {\n <span class=\"panel-badge count\">{{ queryParameters.length }}</span>\n }\n </span>\n </ng-template>\n\n <div class=\"panel-body\">\n @if (isLoadingParameters) {\n <div class=\"panel-loading\">\n <mj-loading text=\"Loading parameters...\"></mj-loading>\n </div>\n } @else {\n @if (queryParameters.length === 0) {\n <mj-empty-state Icon=\"fa-solid fa-sliders\"\n Title=\"No Parameters Defined\"\n Message=\"Parameters are found in the SQL when you save. Add one here to describe it before it is used.\"\n [ActionText]=\"EditMode ? 'Add First Parameter' : ''\"\n ActionIcon=\"fa-solid fa-plus\"\n (Action)=\"addParameter()\" />\n } @else {\n @if (EditMode) {\n <div class=\"panel-toolbar\">\n <button type=\"button\" class=\"add-item-btn\" (click)=\"addParameter()\">\n <i class=\"fa-solid fa-plus\"></i> Add Parameter\n </button>\n </div>\n }\n <mj-query-parameters-grid\n [Parameters]=\"queryParameters\"\n [EditMode]=\"EditMode\"\n (Remove)=\"deleteParameter($event)\"\n (Changed)=\"OnChildRowChanged()\" />\n }\n }\n </div>\n </mj-accordion-panel>\n }\n\n <!-- Query Fields Panel -->\n @if (record.IsSaved || EditMode) {\n <mj-accordion-panel\n [(Expanded)]=\"fieldsPanelExpanded\"\n class=\"query-panel\">\n <ng-template mjAccordionTitle>\n <span class=\"panel-title\">\n <i class=\"fa-solid fa-table panel-icon\"></i>\n Fields\n @if (queryFields.length > 0) {\n <span class=\"panel-badge count\">{{ queryFields.length }}</span>\n }\n </span>\n </ng-template>\n\n <div class=\"panel-body\">\n @if (isLoadingFields) {\n <div class=\"panel-loading\">\n <mj-loading text=\"Loading fields...\"></mj-loading>\n </div>\n } @else {\n @if (queryFields.length === 0) {\n <mj-empty-state Icon=\"fa-solid fa-table\"\n Title=\"No Fields Defined\"\n Message=\"Output fields are described by the database server when you save. Add one here to annotate it.\"\n [ActionText]=\"EditMode ? 'Add First Field' : ''\"\n ActionIcon=\"fa-solid fa-plus\"\n (Action)=\"addField()\" />\n } @else {\n @if (EditMode) {\n <div class=\"panel-toolbar\">\n <button type=\"button\" class=\"add-item-btn\" (click)=\"addField()\">\n <i class=\"fa-solid fa-plus\"></i> Add Field\n </button>\n </div>\n }\n <mj-query-fields-grid\n [Fields]=\"queryFields\"\n [EditMode]=\"EditMode\"\n (Remove)=\"deleteField($event)\"\n (OpenSourceField)=\"OnOpenSourceField($event)\"\n (Changed)=\"OnChildRowChanged()\" />\n }\n }\n </div>\n </mj-accordion-panel>\n }\n\n <!-- Dependent Queries Panel -->\n @if (record.IsSaved && DependentQueries.length > 0) {\n <mj-accordion-panel\n [(Expanded)]=\"dependentsPanelExpanded\"\n class=\"query-panel\">\n <ng-template mjAccordionTitle>\n <span class=\"panel-title\">\n <i class=\"fa-solid fa-arrow-left panel-icon dependents-icon\"></i>\n Dependent Queries\n <span class=\"panel-badge count\">{{ DependentQueries.length }}</span>\n </span>\n </ng-template>\n\n <div class=\"panel-body\">\n <div class=\"dependents-description\">\n These queries reference this query via <code>{{\"{{query:\\\"...\\\"}}\"}} </code> composition syntax.\n </div>\n <div class=\"card-grid\">\n @for (dep of DependentQueries; track dep.ID) {\n <div class=\"item-card dependent-card\" (click)=\"onDependentQueryClick(dep)\">\n <div class=\"item-card-header\">\n <div class=\"item-name\">\n <i class=\"fa-solid fa-arrow-left item-name-icon dependent-query-icon\"></i>\n {{ dep.Query }}\n </div>\n </div>\n <div class=\"item-card-body\">\n @if (dep.ReferencePath) {\n <div class=\"item-meta\">\n <span class=\"meta-tag\">\n <i class=\"fa-solid fa-link\"></i> {{ dep.ReferencePath }}\n </span>\n </div>\n }\n @if (dep.Alias) {\n <div class=\"item-meta\">\n <span class=\"meta-tag\">\n <strong>Alias:</strong> <code class=\"meta-code\">{{ dep.Alias }}</code>\n </span>\n </div>\n }\n </div>\n <div class=\"item-card-footer\">\n <span class=\"open-link\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\"></i> Open\n </span>\n </div>\n </div>\n }\n </div>\n </div>\n </mj-accordion-panel>\n }\n\n <!-- Query Entities Panel -->\n @if (record.IsSaved || EditMode) {\n <mj-accordion-panel\n [(Expanded)]=\"entitiesPanelExpanded\"\n class=\"query-panel\">\n <ng-template mjAccordionTitle>\n <span class=\"panel-title\">\n <i class=\"fa-solid fa-database panel-icon\"></i>\n Entities\n @if (queryEntities.length > 0) {\n <span class=\"panel-badge count\">{{ queryEntities.length }}</span>\n }\n </span>\n </ng-template>\n\n <div class=\"panel-body\">\n @if (isLoadingEntities) {\n <div class=\"panel-loading\">\n <mj-loading text=\"Loading entities...\"></mj-loading>\n </div>\n } @else {\n @if (queryEntities.length === 0) {\n <mj-empty-state Icon=\"fa-solid fa-database\"\n Title=\"No Entities Tracked\"\n Message=\"Track which entities this query uses for documentation.\"\n [ActionText]=\"EditMode ? 'Add First Entity' : ''\"\n ActionIcon=\"fa-solid fa-plus\"\n (Action)=\"addEntity()\" />\n } @else {\n @if (EditMode) {\n <div class=\"panel-toolbar\">\n <button type=\"button\" class=\"add-item-btn\" (click)=\"addEntity()\">\n <i class=\"fa-solid fa-plus\"></i> Add Entity\n </button>\n </div>\n }\n <div class=\"card-grid\">\n @for (entity of queryEntities; track entity.ID || $index) {\n <div class=\"item-card\">\n <div class=\"item-card-header\">\n <div class=\"item-name\">\n <i class=\"fa-solid fa-table item-name-icon entity-icon\"></i>\n {{ entity.Entity || 'Select Entity...' }}\n </div>\n @if (EditMode) {\n <div class=\"entity-dropdown-wrapper\">\n <mj-dropdown\n [(ngModel)]=\"entity.EntityID\"\n [name]=\"'entity_' + (entity.ID || $index)\"\n [Data]=\"getEntityOptions()\"\n TextField=\"text\"\n ValueField=\"id\"\n [ValuePrimitive]=\"true\"\n Placeholder=\"Select entity...\"\n class=\"entity-dropdown\">\n </mj-dropdown>\n </div>\n }\n </div>\n @if (!EditMode && entity.Entity) {\n <div class=\"item-card-body\">\n <div class=\"item-meta\">\n <span class=\"meta-tag\">\n <i class=\"fa-solid fa-database\"></i> Data Source\n </span>\n @if (entity.DetectionMethod) {\n <span class=\"meta-tag\" title=\"How this entity link was detected\">\n <strong>Detected by:</strong> {{ entity.DetectionMethod }}\n </span>\n }\n </div>\n </div>\n }\n @if (EditMode) {\n <div class=\"item-card-actions\">\n <button type=\"button\" class=\"item-action-btn delete\" (click)=\"deleteEntity(entity)\" title=\"Delete entity\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n }\n </div>\n </mj-accordion-panel>\n }\n\n <!-- Details Panel -->\n <mj-accordion-panel\n [(Expanded)]=\"detailsPanelExpanded\"\n class=\"query-panel\">\n <ng-template mjAccordionTitle>\n <span class=\"panel-title\">\n <i class=\"fa-solid fa-info-circle panel-icon\"></i>\n Details\n </span>\n </ng-template>\n\n <div class=\"panel-body\">\n <div class=\"details-grid\">\n <!-- Reusable -->\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-puzzle-piece\"></i> Reusable\n </label>\n @if (EditMode) {\n <mj-switch [(ngModel)]=\"record.Reusable\" name=\"reusable\"></mj-switch>\n <div class=\"detail-hint\">Allow other queries to reference this query using composition syntax</div>\n } @else {\n <div class=\"detail-value\">\n @if (record.Reusable) {\n <span class=\"detail-tag positive\"><i class=\"fa-solid fa-check\"></i> Reusable</span>\n } @else {\n <span class=\"detail-tag neutral\"><i class=\"fa-solid fa-times\"></i> Not Reusable</span>\n }\n </div>\n }\n </div>\n\n <!-- Cache Enabled -->\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-bolt\"></i> Cache Enabled\n </label>\n @if (EditMode) {\n <mj-switch [(ngModel)]=\"record.CacheEnabled\" name=\"cacheEnabled\"></mj-switch>\n <div class=\"detail-hint\">Cache query results in memory to reduce database load on repeated runs</div>\n } @else {\n <div class=\"detail-value\">\n @if (record.CacheEnabled) {\n <span class=\"detail-tag positive\"><i class=\"fa-solid fa-check\"></i> Caching On</span>\n } @else {\n <span class=\"detail-tag neutral\"><i class=\"fa-solid fa-times\"></i> Caching Off</span>\n }\n </div>\n }\n </div>\n\n <!-- Cache TTL -->\n @if (record.CacheEnabled) {\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-clock\"></i> Cache TTL (Minutes)\n </label>\n @if (EditMode) {\n <input class=\"mj-input detail-input-narrow\"\n type=\"number\"\n [(ngModel)]=\"record.CacheTTLMinutes\"\n name=\"cacheTTLMinutes\"\n min=\"1\"\n placeholder=\"Default\" />\n <div class=\"detail-hint\">How long cached results remain valid. Leave blank for default TTL.</div>\n } @else {\n <div class=\"detail-value\">{{ record.CacheTTLMinutes != null ? record.CacheTTLMinutes + ' min' : 'Default' }}</div>\n }\n </div>\n }\n\n <!-- Audit Query Runs -->\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-clipboard-list\"></i> Audit Runs\n </label>\n @if (EditMode) {\n <mj-switch [(ngModel)]=\"record.AuditQueryRuns\" name=\"auditQueryRuns\"></mj-switch>\n <div class=\"detail-hint\">Log all executions of this query to the Audit Log for tracking and compliance</div>\n } @else {\n <div class=\"detail-value\">\n @if (record.AuditQueryRuns) {\n <span class=\"detail-tag positive\"><i class=\"fa-solid fa-check\"></i> Auditing On</span>\n } @else {\n <span class=\"detail-tag neutral\"><i class=\"fa-solid fa-times\"></i> Auditing Off</span>\n }\n </div>\n }\n </div>\n\n <!-- Uses Template -->\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-file-code\"></i> Template Usage\n </label>\n @if (EditMode) {\n <mj-switch [(ngModel)]=\"record.UsesTemplate\" name=\"usesTemplate\"></mj-switch>\n } @else {\n <div class=\"detail-value\">\n @if (record.UsesTemplate) {\n <span class=\"detail-tag positive\"><i class=\"fa-solid fa-check\"></i> Uses Templates</span>\n } @else {\n <span class=\"detail-tag neutral\"><i class=\"fa-solid fa-times\"></i> No Templates</span>\n }\n </div>\n }\n </div>\n\n <!-- Created Date -->\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-calendar-plus\"></i> Created\n </label>\n <div class=\"detail-value\">{{ formatDate(record.__mj_CreatedAt) }}</div>\n </div>\n\n <!-- Updated Date -->\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-calendar-check\"></i> Last Updated\n </label>\n <div class=\"detail-value\">{{ formatDate(record.__mj_UpdatedAt) }}</div>\n </div>\n\n <!-- Quality Rank -->\n @if (record.QualityRank != null) {\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-star\"></i> Quality Rank\n </label>\n <div class=\"detail-value\">{{ record.QualityRank }}/10</div>\n </div>\n }\n </div>\n </div>\n </mj-accordion-panel>\n\n <!-- Permissions Panel -->\n @if (record.IsSaved) {\n <mj-accordion-panel\n [(Expanded)]=\"permissionsPanelExpanded\"\n class=\"query-panel\">\n <ng-template mjAccordionTitle>\n <span class=\"panel-title\">\n <i class=\"fa-solid fa-shield-alt panel-icon\"></i>\n Permissions\n </span>\n </ng-template>\n\n <div class=\"panel-body\">\n @if (isLoadingPermissions) {\n <div class=\"panel-loading\">\n <mj-loading text=\"Loading permissions...\"></mj-loading>\n </div>\n } @else {\n @if (queryPermissions.length === 0 && !EditMode) {\n <mj-empty-state Icon=\"fa-solid fa-shield-halved\"\n Title=\"No Permissions Set\"\n Message=\"This query uses default permissions.\" />\n } @else {\n @if (EditMode) {\n <mj-explorer-entity-data-grid\n [Params]=\"BuildRelationshipViewParamsByEntityName('MJ: Query Permissions','QueryID')\"\n [NewRecordValues]=\"NewRecordValues('MJ: Query Permissions')\"\n [AllowLoad]=\"true\"\n [ShowToolbar]=\"false\">\n </mj-explorer-entity-data-grid>\n } @else {\n <div class=\"permissions-list\">\n @for (permission of queryPermissions; track permission.ID) {\n <div class=\"permission-card\">\n <i class=\"fa-solid fa-users permission-icon\"></i>\n <div class=\"permission-info\">\n <div class=\"permission-role\">{{ permission.Role }}</div>\n <div class=\"permission-type\">Role Permission</div>\n </div>\n <span class=\"permission-badge\">\n <i class=\"fa-solid fa-play\"></i> Can Execute\n </span>\n </div>\n }\n </div>\n }\n }\n }\n </div>\n </mj-accordion-panel>\n }\n\n </div>\n </form>\n</mj-record-form-container>\n\n<!-- Refresh metadata: always a dry run first unless the user turned that off -->\n<mj-query-refresh-dialog\n [Visible]=\"ShowRefreshDialog\"\n [Scope]=\"RefreshScope\"\n [ScopeLabel]=\"RefreshScopeLabel\"\n [AllowSkipDryRun]=\"true\"\n [Provider]=\"ProviderToUse\"\n (Closed)=\"OnRefreshDialogClosed()\"\n (Applied)=\"OnRefreshApplied($event)\" />\n\n<!-- Query Run Dialog -->\n<mj-query-run-dialog\n [query]=\"record\"\n [parameters]=\"queryParameters\"\n [(isVisible)]=\"showRunDialog\"\n (onClose)=\"onRunDialogClose()\">\n</mj-query-run-dialog>\n}\n", styles: [".k-pane {\n background-color: var(--mj-bg-surface);\n}\n\n.content-margin {\n margin: 10px;\n}\n\n\na {\n font-size: 14px;\n font-weight: bolder;\n}\n\n.tab-header-icon {\n margin-right: 5px;\n}\n\n.record-form {\n display: block;\n flex-direction: column;\n background-color: var(--mj-bg-surface);\n padding: 0;\n min-height: 100vh;\n}\n\n.record-form-group {\n margin-top: 0px;\n background-color: var(--mj-bg-surface);\n}\n\nbutton {\n margin-right: 5px;\n}\n\n.record-form h2 {\n margin-bottom: 10px;\n}\n\n.k-splitter {\n border-width: 0px;\n}\n\n.record-form-row {\n display: grid;\n grid-template-columns: auto 1fr;\n align-items: start;\n gap: 10px;\n margin-bottom: 12px;\n padding-top: 5px;\n padding-bottom: 5px;\n}\n\n.record-form .record-form-row > :first-child {\n font-weight: bold;\n padding-right: 10px;\n}\n\n.record-form .record-form-row > span {\n white-space: pre-line;\n max-height: 300px;\n overflow: auto;\n}\n\n@media (min-width: 768px) {\n .record-form-row {\n flex-direction: row;\n align-items: center;\n }\n\n .record-form-row label {\n width: 240px;\n margin-bottom: 0;\n }\n}\n\n/* Collapsible Panel Styles */\n.form-panels-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: 16px;\n background-color: var(--mj-bg-surface);\n}\n\n/* All field sections take full width */\n.form-panels-container > .form-card {\n width: 100%;\n}\n\n/* Related entity grid container - responsive layout */\n.form-panels-container .related-entity-grid {\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n}\n\n/* Responsive multi-column layout for related entities on wider screens */\n@media (min-width: 1400px) {\n .form-panels-container .related-entity-grid {\n grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));\n }\n}\n\n.form-card {\n background: var(--mj-bg-surface-card);\n border-radius: 8px;\n box-shadow: 0 2px 4px var(--mj-shadow-sm);\n overflow: hidden;\n}\n\n.collapsible-card {\n overflow: hidden;\n}\n\n.collapsible-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px 24px;\n background: var(--mj-bg-surface-card);\n border-bottom: 2px solid var(--mj-border-default);\n cursor: pointer;\n user-select: none;\n transition: all 0.3s ease;\n}\n\n.collapsible-header:hover {\n background: var(--mj-bg-surface-sunken);\n border-bottom-color: var(--mj-brand-primary);\n}\n\n.collapsible-title {\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n}\n\n.collapsible-title i {\n font-size: 20px;\n color: var(--mj-brand-primary);\n}\n\n.collapsible-title h3 {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.collapsible-header .collapse-icon {\n color: var(--mj-text-muted);\n transition: transform 0.3s ease;\n}\n\n.collapsible-body {\n max-height: 2000px;\n overflow: hidden;\n transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;\n opacity: 1;\n}\n\n.collapsible-body.collapsed {\n max-height: 0;\n padding: 0;\n opacity: 0;\n}\n\n.form-body {\n padding: 24px;\n}\n\n/* Related Entity Sections - Visual Distinction */\n.form-card.related-entity {\n background: var(--mj-bg-surface-card);\n border-left: 3px solid var(--mj-brand-primary);\n}\n\n.form-card.related-entity .collapsible-header {\n background: var(--mj-bg-surface-sunken);\n}\n\n.form-card.related-entity .collapsible-header:hover {\n background: var(--mj-bg-surface-card);\n border-bottom-color: var(--mj-brand-primary);\n}\n\n.form-card.related-entity .collapsible-title i {\n color: var(--mj-brand-primary);\n}\n\n/* Section Controls */\n.form-section-controls {\n display: flex;\n gap: 10px;\n padding: 14px 18px;\n background: var(--mj-bg-surface-card);\n border-bottom: 2px solid var(--mj-border-default);\n align-items: center;\n flex-wrap: wrap;\n box-shadow: 0 1px 3px var(--mj-shadow-sm);\n}\n\n.form-section-controls .control-group {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n.form-section-controls button {\n padding: 8px 14px;\n font-size: 13px;\n border: 1px solid var(--mj-border-strong);\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-secondary);\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s;\n margin-right: 0;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-weight: 500;\n}\n\n.form-section-controls button:hover {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border-color: var(--mj-brand-primary);\n transform: translateY(-1px);\n box-shadow: 0 2px 4px var(--mj-shadow-md);\n}\n\n.form-section-controls button:active {\n transform: translateY(0);\n}\n\n.form-section-controls button i {\n margin-right: 0;\n font-size: 14px;\n}\n\n.form-section-controls .section-search {\n padding: 8px 14px;\n font-size: 13px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n width: 240px;\n transition: all 0.2s;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.form-section-controls .section-search:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.form-section-controls .section-search::placeholder {\n color: var(--mj-text-muted);\n font-style: italic;\n}\n\n.form-section-controls .section-count {\n font-size: 13px;\n color: var(--mj-text-muted);\n margin-left: auto;\n font-weight: 500;\n}\n\n/* Hidden sections for search filter */\n.form-card.search-hidden {\n display: none;\n}\n\n/* Section count badge */\n.section-count-badge {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n padding: 2px 8px;\n border-radius: 12px;\n font-size: 12px;\n font-weight: 600;\n}\n\n/* Search highlighting in section names */\n.collapsible-title h3 .search-highlight {\n background-color: var(--mj-status-warning);\n color: var(--mj-text-primary);\n padding: 2px 4px;\n border-radius: 3px;\n font-weight: 700;\n}\n\n/* Row count badge in section headers */\n.collapsible-title .row-count-badge {\n background: var(--mj-status-success);\n color: var(--mj-text-inverse);\n padding: 3px 6px 2px 6px;\n border-radius: 12px;\n font-size: 12px;\n font-weight: 600;\n margin-left: 8px;\n vertical-align: middle;\n position: relative;\n top: -2px;\n display: inline-block;\n line-height: 1;\n}\n\n/* Gray badge for zero rows (loaded but empty) */\n.collapsible-title .row-count-badge.zero-rows {\n background: var(--mj-text-muted);\n}\n", "/* Override shared form-styles to enable flex layout */\n:host {\n display: block;\n height: 100%;\n}\n\n/* Override the shared record-form min-height so flex layout works properly */\n.record-form {\n min-height: 0 !important;\n}\n\n/* ========================================\n Saving Overlay\n ======================================== */\n\n.saving-overlay {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 8px 16px;\n background: color-mix(in srgb, var(--mj-status-info) 10%, var(--mj-bg-surface));\n border-bottom: 1px solid var(--mj-border-subtle);\n color: var(--mj-text-secondary);\n font-size: 13px;\n font-weight: 500;\n flex-shrink: 0;\n}\n\n.saving-spinner {\n color: var(--mj-brand-primary);\n font-size: 14px;\n}\n\n.content-saving {\n pointer-events: none;\n opacity: 0.6;\n}\n\n/* ========================================\n Header Section \u2014 matches Query Browser gradient\n ======================================== */\n\n.query-header {\n flex-shrink: 0;\n background: var(--mj-brand-primary);\n border-bottom: none;\n padding: 0;\n}\n\n.query-header-content {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px 20px;\n}\n\n.query-header-top {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 20px;\n}\n\n.query-name-section {\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.query-title-icon {\n color: rgba(255, 255, 255, 0.85);\n font-size: 1.3em;\n flex-shrink: 0;\n}\n\n.query-name-input {\n font-size: 1.2em;\n font-weight: 600;\n min-width: 300px;\n flex: 1;\n}\n\n.query-name-display {\n margin: 0;\n color: var(--mj-text-inverse, white);\n font-weight: 600;\n font-size: 1.2em;\n flex: 1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.query-header-actions {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n.run-query-btn {\n white-space: nowrap;\n}\n\n/* Meta row (category + status) */\n.query-meta-row {\n display: flex;\n gap: 24px;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.query-meta-item {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.meta-label {\n font-weight: 500;\n color: rgba(255, 255, 255, 0.75);\n font-size: var(--mj-text-sm);\n min-width: 60px;\n}\n\n.meta-value {\n color: rgba(255, 255, 255, 0.95);\n font-size: var(--mj-text-sm);\n}\n\n.meta-dropdown {\n min-width: 200px;\n}\n\n.status-pill {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 4px 12px;\n border-radius: var(--mj-radius-xl);\n color: var(--mj-text-inverse, white);\n font-size: var(--mj-text-sm);\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.status-pill i {\n font-size: var(--mj-text-xs);\n}\n\n/* Description row */\n.query-description-row {\n margin-top: 2px;\n}\n\n.query-description-input {\n width: 100%;\n}\n\n.query-description-text {\n margin: 0;\n color: rgba(255, 255, 255, 0.8);\n font-size: var(--mj-text-sm);\n line-height: 1.4;\n}\n\n/* ========================================\n Status Warning Banner\n ======================================== */\n\n\n/* ========================================\n Main Content Area\n ======================================== */\n\n.query-content {\n flex: 1;\n min-height: 0;\n padding: 16px;\n overflow-y: auto;\n background: var(--mj-bg-surface-card);\n}\n\n/* ========================================\n Accordion Panel Overrides \u2014 Modern Style\n ======================================== */\n\n.query-panel {\n margin-bottom: 12px;\n}\n\n::ng-deep .query-content mj-accordion-panel .mj-accordion-panel {\n border: none !important;\n border-radius: var(--mj-radius-md) !important;\n margin-bottom: 12px !important;\n box-shadow: var(--mj-shadow-sm) !important;\n background: var(--mj-bg-surface) !important;\n overflow: hidden !important;\n}\n\n::ng-deep .query-content .mj-accordion-header {\n background: var(--mj-bg-surface) !important;\n border: none !important;\n padding: 14px 18px !important;\n border-radius: var(--mj-radius-md) !important;\n color: var(--mj-text-primary) !important;\n font-weight: 600 !important;\n font-size: var(--mj-text-sm) !important;\n transition: background 0.15s ease !important;\n}\n\n::ng-deep .query-content .mj-accordion-header:hover {\n background: var(--mj-bg-surface-card) !important;\n}\n\n::ng-deep .query-content .mj-accordion-panel--expanded .mj-accordion-header {\n background: var(--mj-brand-primary) !important;\n color: var(--mj-brand-on-primary) !important;\n border-radius: var(--mj-radius-md) var(--mj-radius-md) 0 0 !important;\n outline-color: var(--mj-text-inverse);\n}\n\n::ng-deep .query-content .mj-accordion-body {\n padding: 0 !important;\n border: none !important;\n background: var(--mj-bg-surface) !important;\n border-radius: 0 0 var(--mj-radius-md) var(--mj-radius-md) !important;\n}\n\n/* ========================================\n Panel Title & Badges\n ======================================== */\n\n.panel-title-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n}\n\n.panel-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 600;\n}\n\n.panel-icon {\n opacity: 0.7;\n}\n\n.sql-icon {\n color: var(--mj-brand-primary);\n}\n\n::ng-deep .mj-accordion-panel--expanded .panel-icon {\n color: rgba(255, 255, 255, 0.85) !important;\n opacity: 1;\n}\n\n.panel-badge {\n padding: 2px 8px;\n border-radius: var(--mj-radius-lg);\n font-size: var(--mj-text-xs);\n font-weight: 600;\n}\n\n.panel-badge.defined {\n background: var(--mj-status-success);\n color: var(--mj-text-inverse);\n}\n\n.panel-badge.count {\n background: var(--mj-brand-primary);\n color: var(--mj-brand-on-primary);\n}\n\n::ng-deep .mj-accordion-panel--expanded .panel-badge.count {\n background: rgba(255, 255, 255, 0.25) !important;\n}\n\n::ng-deep .mj-accordion-panel--expanded .panel-badge.defined {\n background: rgba(255, 255, 255, 0.25) !important;\n}\n\n.filters-help-btn {\n display: flex;\n align-items: center;\n gap: 4px;\n margin-right: 8px;\n font-size: var(--mj-text-xs);\n}\n\n/* ========================================\n Panel Body & Loading\n ======================================== */\n\n.panel-body {\n padding: 16px 0;\n}\n\n.panel-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 40px;\n}\n\n.panel-toolbar {\n display: flex;\n justify-content: flex-end;\n padding: 0 20px 12px;\n}\n\n/* ========================================\n SQL Panel\n ======================================== */\n\n.sql-panel-content {\n display: flex;\n flex-direction: column;\n}\n\n.sql-editor {\n flex: 1;\n height: 400px;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-sm);\n margin: 16px;\n}\n\n/* Filters Help */\n.filters-help {\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 16px;\n margin: 0 16px 16px;\n}\n\n.filters-help-title {\n margin: 0 0 12px 0;\n color: var(--mj-text-primary);\n font-weight: 600;\n font-size: var(--mj-text-sm);\n}\n\n.filters-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 10px;\n}\n\n.filter-card {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 12px;\n transition: transform 0.15s ease, box-shadow 0.15s ease;\n}\n\n.filter-card:hover {\n transform: translateY(-1px);\n box-shadow: var(--mj-shadow-md);\n}\n\n.filter-name {\n font-family: 'Courier New', monospace;\n font-weight: bold;\n color: var(--mj-brand-primary);\n margin-bottom: 4px;\n}\n\n.filter-description {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-secondary);\n margin-bottom: 6px;\n}\n\n.filter-syntax {\n font-family: 'Courier New', monospace;\n font-size: var(--mj-text-xs);\n background: var(--mj-bg-surface-card);\n padding: 6px;\n border-radius: var(--mj-radius-sm);\n margin-bottom: 4px;\n}\n\n.filter-notes {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-disabled);\n font-style: italic;\n}\n\n/* ========================================\n Card Grid (Parameters, Fields, Entities)\n ======================================== */\n\n.card-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));\n gap: 12px;\n padding: 0 20px 20px;\n}\n\n.item-card {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 14px;\n transition: all 0.15s ease;\n cursor: pointer;\n position: relative;\n}\n\n.item-card:hover {\n border-color: var(--mj-brand-primary);\n box-shadow: 0 2px 8px color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n}\n\n.item-card.required {\n border-left: 3px solid var(--mj-status-warning);\n}\n\n.item-card-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 10px;\n}\n\n.item-name {\n font-weight: 600;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.item-name-icon {\n font-size: var(--mj-text-sm);\n}\n\n.item-name-icon.param-icon {\n color: var(--mj-brand-primary);\n}\n\n.item-name-icon.field-icon {\n color: var(--mj-brand-primary);\n}\n\n.item-name-icon.entity-icon {\n color: var(--mj-status-success);\n}\n\n.item-badges {\n display: flex;\n gap: 6px;\n}\n\n.item-badge {\n padding: 2px 8px;\n border-radius: var(--mj-radius-lg);\n font-size: var(--mj-text-xs);\n font-weight: 600;\n color: var(--mj-text-inverse);\n}\n\n.item-badge.required {\n background: var(--mj-status-warning);\n}\n\n.item-badge.type {\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.item-badge.sequence {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n color: color-mix(in srgb, var(--mj-brand-primary) 80%, var(--mj-text-violet));\n}\n\n.item-card-body {\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-sm);\n}\n\n.item-description {\n margin-bottom: 8px;\n}\n\n.item-meta {\n display: flex;\n gap: 16px;\n font-size: var(--mj-text-xs);\n}\n\n.meta-tag {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.meta-code {\n background: var(--mj-bg-surface-card);\n padding: 1px 4px;\n border-radius: var(--mj-radius-sm);\n font-size: var(--mj-text-xs);\n}\n\n/* Card actions (edit/delete) */\n.item-actions {\n position: absolute;\n top: 10px;\n right: 10px;\n display: flex;\n gap: 4px;\n opacity: 0;\n transition: opacity 0.15s ease;\n}\n\n.item-card:hover .item-actions {\n opacity: 1;\n}\n\n.item-card-actions {\n display: flex;\n justify-content: flex-end;\n margin-top: 8px;\n}\n\n.item-action-btn {\n background: none;\n border: none;\n padding: 4px 8px;\n border-radius: var(--mj-radius-sm);\n cursor: pointer;\n color: var(--mj-text-disabled);\n transition: all 0.15s ease;\n}\n\n.item-action-btn:hover {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-brand-primary);\n}\n\n.item-action-btn.delete:hover {\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n color: var(--mj-status-error);\n}\n\n/* Entity dropdown in card */\n.entity-dropdown-wrapper {\n flex: 1;\n margin-left: 12px;\n}\n\n.entity-dropdown {\n width: 100%;\n}\n\n/* ========================================\n Details Grid\n ======================================== */\n\n.details-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));\n gap: 16px;\n padding: 16px 20px;\n}\n\n.detail-item {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.detail-label {\n font-size: var(--mj-text-xs);\n font-weight: 600;\n color: var(--mj-text-disabled);\n display: flex;\n align-items: center;\n gap: 6px;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n.detail-value {\n font-size: var(--mj-text-sm);\n color: var(--mj-text-primary);\n}\n\n.detail-tag {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: var(--mj-text-sm);\n}\n\n.detail-tag.positive {\n color: var(--mj-status-success);\n}\n\n.detail-tag.neutral {\n color: var(--mj-text-disabled);\n}\n\n.detail-hint {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n line-height: 1.4;\n}\n\n.detail-input-narrow {\n max-width: 120px;\n padding: 4px 8px;\n font-size: var(--mj-text-sm);\n}\n\n/* ========================================\n Permissions\n ======================================== */\n\n.permissions-list {\n padding: 0 20px;\n}\n\n.permission-card {\n display: flex;\n align-items: center;\n gap: 14px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 14px 16px;\n margin-bottom: 8px;\n}\n\n.permission-icon {\n font-size: 1.3em;\n color: var(--mj-brand-primary);\n}\n\n.permission-info {\n flex: 1;\n}\n\n.permission-role {\n font-weight: 600;\n color: var(--mj-text-primary);\n font-size: var(--mj-text-sm);\n}\n\n.permission-type {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-disabled);\n}\n\n.permission-badge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n background: var(--mj-brand-primary);\n color: var(--mj-brand-on-primary);\n padding: 4px 10px;\n border-radius: var(--mj-radius-md);\n font-size: var(--mj-text-xs);\n font-weight: 500;\n}\n\n/* ========================================\n Empty State\n ======================================== */\n\n/* ========================================\n Buttons\n ======================================== */\n\n.add-item-btn {\n background: var(--mj-brand-primary);\n color: var(--mj-brand-on-primary);\n border: none;\n padding: 8px 16px;\n border-radius: var(--mj-radius-md);\n cursor: pointer;\n transition: all 0.15s ease;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-weight: 500;\n font-size: var(--mj-text-sm);\n}\n\n.add-item-btn:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 85%, black);\n box-shadow: 0 2px 6px color-mix(in srgb, var(--mj-brand-primary) 30%, transparent);\n}\n\n/* ========================================\n Badge (reused across components)\n ======================================== */\n\n.badge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n/* ========================================\n Technical Description Panel\n ======================================== */\n\n.technical-description-textarea {\n width: 100%;\n font-family: 'Consolas', 'Monaco', 'Courier New', monospace;\n font-size: 13px;\n}\n\n.technical-description-preview {\n margin-top: 16px;\n border-top: 1px solid var(--mj-border-default);\n padding-top: 12px;\n}\n\n.preview-label {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-text-muted);\n margin-bottom: 8px;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.technical-description-view {\n max-height: 500px;\n overflow-y: auto;\n padding: 12px 16px;\n}\n\n/* Dependent Queries */\n.dependents-icon {\n color: var(--mj-status-warning);\n}\n\n.dependents-description {\n padding: 0 20px 12px;\n font-size: 13px;\n color: var(--mj-text-muted);\n}\n\n.dependents-description code {\n background: var(--mj-bg-surface-sunken);\n padding: 1px 5px;\n border-radius: 3px;\n font-size: 12px;\n}\n\n.dependent-card {\n cursor: pointer;\n border-left: 3px solid var(--mj-status-warning) !important;\n}\n\n.dependent-card:hover {\n border-left-color: var(--mj-status-warning-text) !important;\n background: color-mix(in srgb, var(--mj-status-warning) 8%, var(--mj-bg-surface)) !important;\n}\n\n.dependent-query-icon {\n color: var(--mj-status-warning) !important;\n}\n\n.item-card-footer {\n padding-top: 8px;\n border-top: 1px solid var(--mj-bg-surface-sunken);\n margin-top: 8px;\n}\n\n.open-link {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: var(--mj-brand-primary);\n font-weight: 500;\n}\n\n.dependent-card:hover .open-link {\n color: var(--mj-brand-primary-hover);\n}\n\n/* Category selector row: tree-dropdown + create/edit icon buttons */\n.meta-dropdown-row {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.meta-dropdown-row .meta-dropdown {\n flex: 1;\n min-width: 0;\n}\n\n/* \u2500\u2500\u2500 Metadata extraction status \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.extraction-badge {\n --extraction-accent: var(--mj-text-muted);\n display: inline-flex;\n align-items: center;\n border-radius: var(--mj-radius-full);\n padding: 2px var(--mj-space-3);\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-medium);\n color: var(--extraction-accent);\n background: color-mix(in srgb, var(--extraction-accent) 12%, transparent);\n border: 1px solid color-mix(in srgb, var(--extraction-accent) 30%, transparent);\n white-space: nowrap;\n}\n\n.extraction-badge--ok { --extraction-accent: var(--mj-status-success); }\n.extraction-badge--warning { --extraction-accent: var(--mj-status-warning); }\n.extraction-badge--error { --extraction-accent: var(--mj-status-error); }\n.extraction-badge--skipped,\n.extraction-badge--none { --extraction-accent: var(--mj-text-muted); }\n\n.save-diagnostics {\n margin-bottom: var(--mj-space-3);\n}\n\n.extraction-diagnostics {\n margin-top: var(--mj-space-3);\n}\n\n/* The header sits on the brand colour: a light pill and a light outline button stay readable. */\n.query-header .extraction-badge {\n background: var(--mj-bg-surface);\n}\n\n.query-header button.refresh-metadata-btn {\n color: var(--mj-text-inverse);\n border-color: color-mix(in srgb, var(--mj-text-inverse) 60%, transparent);\n background: transparent;\n}\n\n.query-header button.refresh-metadata-btn:hover {\n background: color-mix(in srgb, var(--mj-text-inverse) 15%, transparent);\n}\n"] }]
2267
2321
  }], null, { SqlEditor: [{
2268
2322
  type: ViewChild,
2269
2323
  args: ['sqlEditor']
2270
2324
  }] }); })();
2271
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJQueryFormComponentExtended, { className: "MJQueryFormComponentExtended", filePath: "src/lib/custom/Queries/query-form.component.ts", lineNumber: 27 }); })();
2325
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJQueryFormComponentExtended, { className: "MJQueryFormComponentExtended", filePath: "src/lib/custom/Queries/query-form.component.ts", lineNumber: 30 }); })();
2272
2326
  //# sourceMappingURL=query-form.component.js.map