@memberjunction/ng-core-entity-forms 5.30.1 → 5.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/dist/lib/__tests__/content-source-form.test.d.ts +2 -0
  2. package/dist/lib/__tests__/content-source-form.test.d.ts.map +1 -0
  3. package/dist/lib/__tests__/content-source-form.test.js +183 -0
  4. package/dist/lib/__tests__/content-source-form.test.js.map +1 -0
  5. package/dist/lib/custom/AIAgents/add-action-dialog.component.d.ts +2 -1
  6. package/dist/lib/custom/AIAgents/add-action-dialog.component.d.ts.map +1 -1
  7. package/dist/lib/custom/AIAgents/add-action-dialog.component.js +6 -4
  8. package/dist/lib/custom/AIAgents/add-action-dialog.component.js.map +1 -1
  9. package/dist/lib/custom/AIAgents/agent-advanced-settings-dialog.component.js +2 -2
  10. package/dist/lib/custom/AIAgents/agent-advanced-settings-dialog.component.js.map +1 -1
  11. package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.d.ts +2 -1
  12. package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.d.ts.map +1 -1
  13. package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.js +6 -4
  14. package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.js.map +1 -1
  15. package/dist/lib/custom/AIAgents/ai-agent-form.component.js +15 -15
  16. package/dist/lib/custom/AIAgents/ai-agent-form.component.js.map +1 -1
  17. package/dist/lib/custom/AIAgents/create-prompt-dialog.component.d.ts +2 -1
  18. package/dist/lib/custom/AIAgents/create-prompt-dialog.component.d.ts.map +1 -1
  19. package/dist/lib/custom/AIAgents/create-prompt-dialog.component.js +9 -7
  20. package/dist/lib/custom/AIAgents/create-prompt-dialog.component.js.map +1 -1
  21. package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.d.ts +2 -1
  22. package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.d.ts.map +1 -1
  23. package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.js +11 -9
  24. package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.js.map +1 -1
  25. package/dist/lib/custom/AIAgents/new-agent-dialog.component.d.ts +2 -1
  26. package/dist/lib/custom/AIAgents/new-agent-dialog.component.d.ts.map +1 -1
  27. package/dist/lib/custom/AIAgents/new-agent-dialog.component.js +6 -5
  28. package/dist/lib/custom/AIAgents/new-agent-dialog.component.js.map +1 -1
  29. package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.d.ts +2 -1
  30. package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.d.ts.map +1 -1
  31. package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.js +6 -4
  32. package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.js.map +1 -1
  33. package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.d.ts +2 -1
  34. package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.d.ts.map +1 -1
  35. package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.js +6 -4
  36. package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.js.map +1 -1
  37. package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.d.ts +2 -1
  38. package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.d.ts.map +1 -1
  39. package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.js +6 -4
  40. package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.js.map +1 -1
  41. package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js +3 -3
  42. package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js.map +1 -1
  43. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts +1 -1
  44. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts.map +1 -1
  45. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js +6 -6
  46. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js.map +1 -1
  47. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.d.ts +2 -1
  48. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.d.ts.map +1 -1
  49. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.js +7 -5
  50. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.js.map +1 -1
  51. package/dist/lib/custom/Actions/action-execution-log-form.component.js +3 -3
  52. package/dist/lib/custom/Actions/action-execution-log-form.component.js.map +1 -1
  53. package/dist/lib/custom/Actions/action-form.component.js +12 -12
  54. package/dist/lib/custom/Actions/action-form.component.js.map +1 -1
  55. package/dist/lib/custom/ContentSources/content-source-form.component.d.ts +59 -5
  56. package/dist/lib/custom/ContentSources/content-source-form.component.d.ts.map +1 -1
  57. package/dist/lib/custom/ContentSources/content-source-form.component.js +379 -34
  58. package/dist/lib/custom/ContentSources/content-source-form.component.js.map +1 -1
  59. package/dist/lib/custom/Entities/entity-form.component.d.ts +1 -1
  60. package/dist/lib/custom/Entities/entity-form.component.d.ts.map +1 -1
  61. package/dist/lib/custom/Entities/entity-form.component.js +5 -5
  62. package/dist/lib/custom/Entities/entity-form.component.js.map +1 -1
  63. package/dist/lib/custom/Lists/list-form.component.d.ts +1 -1
  64. package/dist/lib/custom/Lists/list-form.component.d.ts.map +1 -1
  65. package/dist/lib/custom/Lists/list-form.component.js +10 -10
  66. package/dist/lib/custom/Lists/list-form.component.js.map +1 -1
  67. package/dist/lib/custom/Queries/query-category-dialog.component.d.ts +2 -1
  68. package/dist/lib/custom/Queries/query-category-dialog.component.d.ts.map +1 -1
  69. package/dist/lib/custom/Queries/query-category-dialog.component.js +9 -7
  70. package/dist/lib/custom/Queries/query-category-dialog.component.js.map +1 -1
  71. package/dist/lib/custom/Queries/query-form.component.js +17 -17
  72. package/dist/lib/custom/Queries/query-form.component.js.map +1 -1
  73. package/dist/lib/custom/Queries/query-run-dialog.component.d.ts +2 -1
  74. package/dist/lib/custom/Queries/query-run-dialog.component.d.ts.map +1 -1
  75. package/dist/lib/custom/Queries/query-run-dialog.component.js +7 -6
  76. package/dist/lib/custom/Queries/query-run-dialog.component.js.map +1 -1
  77. package/dist/lib/custom/Templates/template-param-dialog.component.d.ts +2 -1
  78. package/dist/lib/custom/Templates/template-param-dialog.component.d.ts.map +1 -1
  79. package/dist/lib/custom/Templates/template-param-dialog.component.js +10 -8
  80. package/dist/lib/custom/Templates/template-param-dialog.component.js.map +1 -1
  81. package/dist/lib/custom/Templates/template-params-grid.component.d.ts +2 -1
  82. package/dist/lib/custom/Templates/template-params-grid.component.d.ts.map +1 -1
  83. package/dist/lib/custom/Templates/template-params-grid.component.js +9 -7
  84. package/dist/lib/custom/Templates/template-params-grid.component.js.map +1 -1
  85. package/dist/lib/custom/Templates/templates-form.component.js +8 -8
  86. package/dist/lib/custom/Templates/templates-form.component.js.map +1 -1
  87. package/dist/lib/custom/Tests/entity-link-pill.component.d.ts +3 -2
  88. package/dist/lib/custom/Tests/entity-link-pill.component.d.ts.map +1 -1
  89. package/dist/lib/custom/Tests/entity-link-pill.component.js +8 -6
  90. package/dist/lib/custom/Tests/entity-link-pill.component.js.map +1 -1
  91. package/dist/lib/custom/Tests/test-form.component.d.ts +1 -1
  92. package/dist/lib/custom/Tests/test-form.component.d.ts.map +1 -1
  93. package/dist/lib/custom/Tests/test-form.component.js +7 -7
  94. package/dist/lib/custom/Tests/test-form.component.js.map +1 -1
  95. package/dist/lib/custom/Tests/test-run-form.component.js +5 -5
  96. package/dist/lib/custom/Tests/test-run-form.component.js.map +1 -1
  97. package/dist/lib/custom/Tests/test-suite-form.component.d.ts +1 -1
  98. package/dist/lib/custom/Tests/test-suite-form.component.d.ts.map +1 -1
  99. package/dist/lib/custom/Tests/test-suite-form.component.js +8 -8
  100. package/dist/lib/custom/Tests/test-suite-form.component.js.map +1 -1
  101. package/dist/lib/custom/Tests/test-suite-run-form.component.d.ts +1 -1
  102. package/dist/lib/custom/Tests/test-suite-run-form.component.d.ts.map +1 -1
  103. package/dist/lib/custom/Tests/test-suite-run-form.component.js +6 -6
  104. package/dist/lib/custom/Tests/test-suite-run-form.component.js.map +1 -1
  105. package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts +2 -1
  106. package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts.map +1 -1
  107. package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js +8 -6
  108. package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js.map +1 -1
  109. package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.d.ts +9 -0
  110. package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.d.ts.map +1 -1
  111. package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.js +15 -3
  112. package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.js.map +1 -1
  113. package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.d.ts +3 -2
  114. package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.d.ts.map +1 -1
  115. package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.js +10 -5
  116. package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.js.map +1 -1
  117. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js +2 -2
  118. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js.map +1 -1
  119. package/dist/lib/custom/shared/entity-selector-dialog.component.d.ts +2 -1
  120. package/dist/lib/custom/shared/entity-selector-dialog.component.d.ts.map +1 -1
  121. package/dist/lib/custom/shared/entity-selector-dialog.component.js +6 -4
  122. package/dist/lib/custom/shared/entity-selector-dialog.component.js.map +1 -1
  123. package/dist/lib/generated/Entities/MJAIModel/mjaimodel.form.component.d.ts.map +1 -1
  124. package/dist/lib/generated/Entities/MJAIModel/mjaimodel.form.component.js +46 -28
  125. package/dist/lib/generated/Entities/MJAIModel/mjaimodel.form.component.js.map +1 -1
  126. package/dist/lib/generated/Entities/MJCompanyIntegrationEntityMap/mjcompanyintegrationentitymap.form.component.js +10 -10
  127. package/dist/lib/generated/Entities/MJCompanyIntegrationEntityMap/mjcompanyintegrationentitymap.form.component.js.map +1 -1
  128. package/dist/lib/generated/Entities/MJContentItem/mjcontentitem.form.component.d.ts.map +1 -1
  129. package/dist/lib/generated/Entities/MJContentItem/mjcontentitem.form.component.js +25 -7
  130. package/dist/lib/generated/Entities/MJContentItem/mjcontentitem.form.component.js.map +1 -1
  131. package/dist/lib/generated/Entities/MJContentSource/mjcontentsource.form.component.d.ts.map +1 -1
  132. package/dist/lib/generated/Entities/MJContentSource/mjcontentsource.form.component.js +25 -7
  133. package/dist/lib/generated/Entities/MJContentSource/mjcontentsource.form.component.js.map +1 -1
  134. package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.d.ts.map +1 -1
  135. package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.js +106 -88
  136. package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.js.map +1 -1
  137. package/dist/lib/generated/Entities/MJTag/mjtag.form.component.d.ts.map +1 -1
  138. package/dist/lib/generated/Entities/MJTag/mjtag.form.component.js +181 -61
  139. package/dist/lib/generated/Entities/MJTag/mjtag.form.component.js.map +1 -1
  140. package/dist/lib/generated/Entities/MJTagScope/mjtagscope.form.component.d.ts +10 -0
  141. package/dist/lib/generated/Entities/MJTagScope/mjtagscope.form.component.d.ts.map +1 -0
  142. package/dist/lib/generated/Entities/MJTagScope/mjtagscope.form.component.js +63 -0
  143. package/dist/lib/generated/Entities/MJTagScope/mjtagscope.form.component.js.map +1 -0
  144. package/dist/lib/generated/Entities/MJTagSuggestion/mjtagsuggestion.form.component.d.ts +10 -0
  145. package/dist/lib/generated/Entities/MJTagSuggestion/mjtagsuggestion.form.component.d.ts.map +1 -0
  146. package/dist/lib/generated/Entities/MJTagSuggestion/mjtagsuggestion.form.component.js +95 -0
  147. package/dist/lib/generated/Entities/MJTagSuggestion/mjtagsuggestion.form.component.js.map +1 -0
  148. package/dist/lib/generated/Entities/MJTagSynonym/mjtagsynonym.form.component.d.ts +10 -0
  149. package/dist/lib/generated/Entities/MJTagSynonym/mjtagsynonym.form.component.d.ts.map +1 -0
  150. package/dist/lib/generated/Entities/MJTagSynonym/mjtagsynonym.form.component.js +63 -0
  151. package/dist/lib/generated/Entities/MJTagSynonym/mjtagsynonym.form.component.js.map +1 -0
  152. package/dist/lib/generated/Entities/MJUser/mjuser.form.component.d.ts.map +1 -1
  153. package/dist/lib/generated/Entities/MJUser/mjuser.form.component.js +199 -181
  154. package/dist/lib/generated/Entities/MJUser/mjuser.form.component.js.map +1 -1
  155. package/dist/lib/generated/generated-forms.module.d.ts +51 -48
  156. package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
  157. package/dist/lib/generated/generated-forms.module.js +27 -18
  158. package/dist/lib/generated/generated-forms.module.js.map +1 -1
  159. package/dist/lib/shared/components/template-editor.component.d.ts +3 -2
  160. package/dist/lib/shared/components/template-editor.component.d.ts.map +1 -1
  161. package/dist/lib/shared/components/template-editor.component.js +8 -6
  162. package/dist/lib/shared/components/template-editor.component.js.map +1 -1
  163. package/package.json +37 -35
@@ -1,6 +1,6 @@
1
1
  import { Component, Input, Output, EventEmitter, ChangeDetectorRef, inject } from '@angular/core';
2
2
  import { MJNotificationService } from '@memberjunction/ng-notifications';
3
- import { Metadata } from '@memberjunction/core';
3
+ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
4
4
  import * as i0 from "@angular/core";
5
5
  import * as i1 from "@angular/forms";
6
6
  import * as i2 from "@memberjunction/ng-ui-components";
@@ -454,8 +454,9 @@ function QueryRunDialogComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
454
454
  i0.ɵɵadvance(3);
455
455
  i0.ɵɵconditional(!ctx_r1.runResult ? 9 : 10);
456
456
  } }
457
- export class QueryRunDialogComponent {
457
+ export class QueryRunDialogComponent extends BaseAngularComponent {
458
458
  constructor() {
459
+ super(...arguments);
459
460
  this.cdr = inject(ChangeDetectorRef);
460
461
  this.query = null;
461
462
  this.parameters = [];
@@ -552,7 +553,7 @@ export class QueryRunDialogComponent {
552
553
  }
553
554
  });
554
555
  // Get GraphQL data provider
555
- const dataProvider = Metadata.Provider;
556
+ const dataProvider = this.ProviderToUse;
556
557
  // Execute the GetQueryData GraphQL query
557
558
  const query = `
558
559
  query GetQueryData($QueryID: String!, $Parameters: JSONObject, $MaxRows: Int, $StartRow: Int) {
@@ -757,8 +758,8 @@ export class QueryRunDialogComponent {
757
758
  this.runQuery(true);
758
759
  }
759
760
  }
760
- static { this.ɵfac = function QueryRunDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryRunDialogComponent)(); }; }
761
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryRunDialogComponent, selectors: [["mj-query-run-dialog"]], inputs: { query: "query", parameters: "parameters", isVisible: "isVisible" }, outputs: { isVisibleChange: "isVisibleChange", onClose: "onClose" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[3, "Visible", "Width"], [3, "Close", "Visible", "Width"], [2, "display", "flex", "align-items", "center", "gap", "8px"], [1, "fa-solid", "fa-play-circle", 2, "color", "var(--mj-brand-primary)"], [2, "display", "flex", "flex-direction", "column", "height", "100%", "overflow-y", "auto", "overflow-x", "hidden"], [2, "display", "flex", "align-items", "center", "justify-content", "center", "padding", "40px"], [1, "fa-solid", "fa-spinner", "fa-spin", 2, "font-size", "24px", "color", "var(--mj-text-muted)", "margin-right", "12px"], [2, "color", "var(--mj-text-muted)"], [2, "margin-bottom", "16px", "flex-shrink", "0", 3, "Expanded"], [2, "padding", "20px", "background", "var(--mj-bg-surface-sunken)", "border-radius", "6px", "margin-bottom", "16px", "text-align", "center", "color", "var(--mj-text-muted)"], [2, "margin-bottom", "16px", 3, "ExpandedChange", "Expanded"], ["mjAccordionTitle", ""], [2, "padding", "12px 0"], [2, "display", "flex", "flex-direction", "column", "gap", "12px"], [2, "display", "flex", "align-items", "center", "gap", "12px"], [2, "font-weight", "600", "color", "var(--mj-text-secondary)", "white-space", "nowrap", "min-width", "100px"], [1, "fa-solid", "fa-list-ol", 2, "color", "var(--mj-text-muted)", "margin-right", "6px"], ["type", "number", "min", "1", "step", "100", "placeholder", "All rows", 1, "mj-input", 2, "width", "150px", 3, "ngModelChange", "ngModel"], [2, "font-size", "0.85em", "color", "var(--mj-text-muted)"], [1, "fa-solid", "fa-forward", 2, "color", "var(--mj-text-muted)", "margin-right", "6px"], ["type", "number", "min", "0", "step", "1", "placeholder", "0", 1, "mj-input", 2, "width", "150px", 3, "ngModelChange", "ngModel"], [2, "flex", "1", "display", "flex", "flex-direction", "column", "overflow", "hidden", "min-height", "0", 3, "Expanded"], [2, "margin-bottom", "16px", "flex-shrink", "0", 3, "ExpandedChange", "Expanded"], [2, "margin-bottom", "12px", "color", "var(--mj-text-muted)", "font-size", "0.85em"], [1, "fa-solid", "fa-info-circle"], [2, "display", "flex", "flex-direction", "column", "gap", "16px"], [2, "background", "var(--mj-bg-surface-sunken)", "border", "1px solid var(--mj-border-default)", "border-radius", "6px", "padding", "16px"], [2, "display", "flex", "align-items", "center", "gap", "8px", "font-weight", "600"], [1, "fa-solid", "fa-sliders", 2, "color", "var(--mj-text-muted)"], [2, "background", "var(--mj-status-info)", "color", "var(--mj-text-inverse)", "padding", "2px 6px", "border-radius", "10px", "font-size", "0.7em"], [2, "display", "flex", "justify-content", "space-between", "align-items", "flex-start", "margin-bottom", "8px"], [2, "font-weight", "600", "color", "var(--mj-text-secondary)", "display", "flex", "align-items", "center", "gap", "6px"], [1, "fa-solid", "fa-at", 2, "color", "var(--mj-brand-primary)"], [2, "color", "#dc3545"], [2, "font-size", "0.85em", "color", "var(--mj-text-muted)", "margin-top", "4px"], [2, "display", "flex", "gap", "8px", "align-items", "center"], [1, "badge", 2, "background", "var(--mj-text-muted)", "color", "white", "padding", "2px 6px", "border-radius", "4px", "font-size", "0.75em"], ["title", "Required parameter is empty", 1, "fa-solid", "fa-exclamation-triangle", 2, "color", "#dc3545"], ["type", "number", "placeholder", "Enter number value...", 1, "mj-input", 2, "width", "100%", 3, "ngModel"], ["rows", "2", "placeholder", "Enter value (JSON, string, or number)...", 1, "mj-input", 2, "width", "100%", "font-family", "'Courier New', monospace", 3, "ngModel"], [2, "font-size", "0.8em", "color", "var(--mj-text-muted)", "margin-top", "4px"], ["type", "number", "placeholder", "Enter number value...", 1, "mj-input", 2, "width", "100%", 3, "ngModelChange", "ngModel"], ["rows", "2", "placeholder", "Enter value (JSON, string, or number)...", 1, "mj-input", 2, "width", "100%", "font-family", "'Courier New', monospace", 3, "ngModelChange", "ngModel"], [2, "background", "var(--mj-bg-surface-sunken)", "padding", "2px 4px", "border-radius", "3px"], [1, "fa-solid", "fa-table-list", 2, "color", "var(--mj-text-muted)"], [2, "background", "var(--mj-text-muted)", "color", "var(--mj-text-inverse)", "padding", "2px 6px", "border-radius", "10px", "font-size", "0.7em"], [2, "flex", "1", "display", "flex", "flex-direction", "column", "overflow", "hidden", "min-height", "0", 3, "ExpandedChange", "Expanded"], [2, "flex", "1", "display", "flex", "flex-direction", "column", "overflow", "hidden", "min-height", "0"], [2, "padding", "20px", "background", "#f8d7da", "border", "1px solid #f5c6cb", "border-radius", "6px", "margin", "12px"], [1, "fa-solid", "fa-table", 2, "color", "var(--mj-status-success)"], [2, "background", "var(--mj-status-success)", "color", "var(--mj-text-inverse)", "padding", "2px 6px", "border-radius", "10px", "font-size", "0.7em"], [2, "color", "var(--mj-text-muted)", "font-size", "0.85em", "font-weight", "normal"], [1, "fa-solid", "fa-exclamation-circle", 2, "color", "var(--mj-status-error)"], [2, "display", "flex", "align-items", "center", "justify-content", "center", "height", "200px", "color", "var(--mj-text-muted)"], [2, "display", "flex", "justify-content", "space-between", "align-items", "center", "padding", "12px", "border-bottom", "1px solid var(--mj-border-default)"], [2, "display", "flex", "gap", "8px"], ["mjButton", "", "variant", "flat", "title", "Copy to clipboard", 3, "click"], [1, "fa-solid", "fa-copy"], ["mjButton", "", "variant", "flat", "title", "Export to CSV", 3, "click"], [1, "fa-solid", "fa-download"], [1, "results-table-container", 2, "flex", "1", "overflow", "auto", "border", "1px solid var(--mj-border-default)", "border-radius", "4px", "min-height", "0"], [1, "results-table", 2, "width", "100%", "border-collapse", "collapse", "font-size", "14px"], [2, "position", "sticky", "top", "0", "background", "var(--mj-bg-surface-sunken)", "z-index", "10"], [2, "padding", "12px 16px", "text-align", "left", "font-weight", "600", "color", "var(--mj-text-secondary)", "border-bottom", "2px solid var(--mj-border-default)", "background", "var(--mj-bg-surface-sunken)", "white-space", "nowrap"], [2, "border-bottom", "1px solid var(--mj-border-default)", "transition", "background-color 0.2s"], [2, "padding", "40px", "text-align", "center", "color", "var(--mj-text-muted)"], [2, "font-size", "0.9em", "color", "var(--mj-text-muted)"], [2, "display", "flex", "gap", "4px"], ["mjButton", "", "variant", "flat", "title", "First page", 3, "click", "disabled"], [1, "fa-solid", "fa-angles-left"], ["mjButton", "", "variant", "flat", "title", "Previous page", 3, "click", "disabled"], [1, "fa-solid", "fa-angle-left"], ["mjButton", "", "variant", "flat", "title", "Next page", 3, "click", "disabled"], [1, "fa-solid", "fa-angle-right"], ["mjButton", "", "variant", "flat", "title", "Last page", 3, "click", "disabled"], [1, "fa-solid", "fa-angles-right"], [2, "padding", "10px 16px", "color", "var(--mj-text-primary)", "max-width", "300px", "overflow", "hidden", "text-overflow", "ellipsis", "white-space", "nowrap", 3, "title"], [1, "fa-solid", "fa-table", 2, "font-size", "48px", "margin-bottom", "12px", "opacity", "0.3"], [1, "fa-solid", "fa-inbox", 2, "font-size", "48px", "margin-bottom", "12px"], [2, "color", "#721c24"], [1, "fa-solid", "fa-exclamation-circle"], [2, "margin-top", "8px", "font-family", "'Courier New', monospace", "font-size", "0.9em"], ["mjButton", "", 3, "click"], [1, "fa-solid", "fa-times"], ["mjButton", "", "variant", "primary", 3, "click", "disabled"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-play"], [1, "fa-solid", "fa-refresh"]], template: function QueryRunDialogComponent_Template(rf, ctx) { if (rf & 1) {
761
+ static { this.ɵfac = /*@__PURE__*/ (() => { let ɵQueryRunDialogComponent_BaseFactory; return function QueryRunDialogComponent_Factory(__ngFactoryType__) { return (ɵQueryRunDialogComponent_BaseFactory || (ɵQueryRunDialogComponent_BaseFactory = i0.ɵɵgetInheritedFactory(QueryRunDialogComponent)))(__ngFactoryType__ || QueryRunDialogComponent); }; })(); }
762
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryRunDialogComponent, selectors: [["mj-query-run-dialog"]], inputs: { query: "query", parameters: "parameters", isVisible: "isVisible" }, outputs: { isVisibleChange: "isVisibleChange", onClose: "onClose" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[3, "Visible", "Width"], [3, "Close", "Visible", "Width"], [2, "display", "flex", "align-items", "center", "gap", "8px"], [1, "fa-solid", "fa-play-circle", 2, "color", "var(--mj-brand-primary)"], [2, "display", "flex", "flex-direction", "column", "height", "100%", "overflow-y", "auto", "overflow-x", "hidden"], [2, "display", "flex", "align-items", "center", "justify-content", "center", "padding", "40px"], [1, "fa-solid", "fa-spinner", "fa-spin", 2, "font-size", "24px", "color", "var(--mj-text-muted)", "margin-right", "12px"], [2, "color", "var(--mj-text-muted)"], [2, "margin-bottom", "16px", "flex-shrink", "0", 3, "Expanded"], [2, "padding", "20px", "background", "var(--mj-bg-surface-sunken)", "border-radius", "6px", "margin-bottom", "16px", "text-align", "center", "color", "var(--mj-text-muted)"], [2, "margin-bottom", "16px", 3, "ExpandedChange", "Expanded"], ["mjAccordionTitle", ""], [2, "padding", "12px 0"], [2, "display", "flex", "flex-direction", "column", "gap", "12px"], [2, "display", "flex", "align-items", "center", "gap", "12px"], [2, "font-weight", "600", "color", "var(--mj-text-secondary)", "white-space", "nowrap", "min-width", "100px"], [1, "fa-solid", "fa-list-ol", 2, "color", "var(--mj-text-muted)", "margin-right", "6px"], ["type", "number", "min", "1", "step", "100", "placeholder", "All rows", 1, "mj-input", 2, "width", "150px", 3, "ngModelChange", "ngModel"], [2, "font-size", "0.85em", "color", "var(--mj-text-muted)"], [1, "fa-solid", "fa-forward", 2, "color", "var(--mj-text-muted)", "margin-right", "6px"], ["type", "number", "min", "0", "step", "1", "placeholder", "0", 1, "mj-input", 2, "width", "150px", 3, "ngModelChange", "ngModel"], [2, "flex", "1", "display", "flex", "flex-direction", "column", "overflow", "hidden", "min-height", "0", 3, "Expanded"], [2, "margin-bottom", "16px", "flex-shrink", "0", 3, "ExpandedChange", "Expanded"], [2, "margin-bottom", "12px", "color", "var(--mj-text-muted)", "font-size", "0.85em"], [1, "fa-solid", "fa-info-circle"], [2, "display", "flex", "flex-direction", "column", "gap", "16px"], [2, "background", "var(--mj-bg-surface-sunken)", "border", "1px solid var(--mj-border-default)", "border-radius", "6px", "padding", "16px"], [2, "display", "flex", "align-items", "center", "gap", "8px", "font-weight", "600"], [1, "fa-solid", "fa-sliders", 2, "color", "var(--mj-text-muted)"], [2, "background", "var(--mj-status-info)", "color", "var(--mj-text-inverse)", "padding", "2px 6px", "border-radius", "10px", "font-size", "0.7em"], [2, "display", "flex", "justify-content", "space-between", "align-items", "flex-start", "margin-bottom", "8px"], [2, "font-weight", "600", "color", "var(--mj-text-secondary)", "display", "flex", "align-items", "center", "gap", "6px"], [1, "fa-solid", "fa-at", 2, "color", "var(--mj-brand-primary)"], [2, "color", "#dc3545"], [2, "font-size", "0.85em", "color", "var(--mj-text-muted)", "margin-top", "4px"], [2, "display", "flex", "gap", "8px", "align-items", "center"], [1, "badge", 2, "background", "var(--mj-text-muted)", "color", "white", "padding", "2px 6px", "border-radius", "4px", "font-size", "0.75em"], ["title", "Required parameter is empty", 1, "fa-solid", "fa-exclamation-triangle", 2, "color", "#dc3545"], ["type", "number", "placeholder", "Enter number value...", 1, "mj-input", 2, "width", "100%", 3, "ngModel"], ["rows", "2", "placeholder", "Enter value (JSON, string, or number)...", 1, "mj-input", 2, "width", "100%", "font-family", "'Courier New', monospace", 3, "ngModel"], [2, "font-size", "0.8em", "color", "var(--mj-text-muted)", "margin-top", "4px"], ["type", "number", "placeholder", "Enter number value...", 1, "mj-input", 2, "width", "100%", 3, "ngModelChange", "ngModel"], ["rows", "2", "placeholder", "Enter value (JSON, string, or number)...", 1, "mj-input", 2, "width", "100%", "font-family", "'Courier New', monospace", 3, "ngModelChange", "ngModel"], [2, "background", "var(--mj-bg-surface-sunken)", "padding", "2px 4px", "border-radius", "3px"], [1, "fa-solid", "fa-table-list", 2, "color", "var(--mj-text-muted)"], [2, "background", "var(--mj-text-muted)", "color", "var(--mj-text-inverse)", "padding", "2px 6px", "border-radius", "10px", "font-size", "0.7em"], [2, "flex", "1", "display", "flex", "flex-direction", "column", "overflow", "hidden", "min-height", "0", 3, "ExpandedChange", "Expanded"], [2, "flex", "1", "display", "flex", "flex-direction", "column", "overflow", "hidden", "min-height", "0"], [2, "padding", "20px", "background", "#f8d7da", "border", "1px solid #f5c6cb", "border-radius", "6px", "margin", "12px"], [1, "fa-solid", "fa-table", 2, "color", "var(--mj-status-success)"], [2, "background", "var(--mj-status-success)", "color", "var(--mj-text-inverse)", "padding", "2px 6px", "border-radius", "10px", "font-size", "0.7em"], [2, "color", "var(--mj-text-muted)", "font-size", "0.85em", "font-weight", "normal"], [1, "fa-solid", "fa-exclamation-circle", 2, "color", "var(--mj-status-error)"], [2, "display", "flex", "align-items", "center", "justify-content", "center", "height", "200px", "color", "var(--mj-text-muted)"], [2, "display", "flex", "justify-content", "space-between", "align-items", "center", "padding", "12px", "border-bottom", "1px solid var(--mj-border-default)"], [2, "display", "flex", "gap", "8px"], ["mjButton", "", "variant", "flat", "title", "Copy to clipboard", 3, "click"], [1, "fa-solid", "fa-copy"], ["mjButton", "", "variant", "flat", "title", "Export to CSV", 3, "click"], [1, "fa-solid", "fa-download"], [1, "results-table-container", 2, "flex", "1", "overflow", "auto", "border", "1px solid var(--mj-border-default)", "border-radius", "4px", "min-height", "0"], [1, "results-table", 2, "width", "100%", "border-collapse", "collapse", "font-size", "14px"], [2, "position", "sticky", "top", "0", "background", "var(--mj-bg-surface-sunken)", "z-index", "10"], [2, "padding", "12px 16px", "text-align", "left", "font-weight", "600", "color", "var(--mj-text-secondary)", "border-bottom", "2px solid var(--mj-border-default)", "background", "var(--mj-bg-surface-sunken)", "white-space", "nowrap"], [2, "border-bottom", "1px solid var(--mj-border-default)", "transition", "background-color 0.2s"], [2, "padding", "40px", "text-align", "center", "color", "var(--mj-text-muted)"], [2, "font-size", "0.9em", "color", "var(--mj-text-muted)"], [2, "display", "flex", "gap", "4px"], ["mjButton", "", "variant", "flat", "title", "First page", 3, "click", "disabled"], [1, "fa-solid", "fa-angles-left"], ["mjButton", "", "variant", "flat", "title", "Previous page", 3, "click", "disabled"], [1, "fa-solid", "fa-angle-left"], ["mjButton", "", "variant", "flat", "title", "Next page", 3, "click", "disabled"], [1, "fa-solid", "fa-angle-right"], ["mjButton", "", "variant", "flat", "title", "Last page", 3, "click", "disabled"], [1, "fa-solid", "fa-angles-right"], [2, "padding", "10px 16px", "color", "var(--mj-text-primary)", "max-width", "300px", "overflow", "hidden", "text-overflow", "ellipsis", "white-space", "nowrap", 3, "title"], [1, "fa-solid", "fa-table", 2, "font-size", "48px", "margin-bottom", "12px", "opacity", "0.3"], [1, "fa-solid", "fa-inbox", 2, "font-size", "48px", "margin-bottom", "12px"], [2, "color", "#721c24"], [1, "fa-solid", "fa-exclamation-circle"], [2, "margin-top", "8px", "font-family", "'Courier New', monospace", "font-size", "0.9em"], ["mjButton", "", 3, "click"], [1, "fa-solid", "fa-times"], ["mjButton", "", "variant", "primary", 3, "click", "disabled"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-play"], [1, "fa-solid", "fa-refresh"]], template: function QueryRunDialogComponent_Template(rf, ctx) { if (rf & 1) {
762
763
  i0.ɵɵconditionalCreate(0, QueryRunDialogComponent_Conditional_0_Template, 11, 5, "mj-dialog", 0);
763
764
  } if (rf & 2) {
764
765
  i0.ɵɵconditional(ctx.isVisible ? 0 : -1);
@@ -778,5 +779,5 @@ export class QueryRunDialogComponent {
778
779
  }], onClose: [{
779
780
  type: Output
780
781
  }] }); })();
781
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryRunDialogComponent, { className: "QueryRunDialogComponent", filePath: "src/lib/custom/Queries/query-run-dialog.component.ts", lineNumber: 34 }); })();
782
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryRunDialogComponent, { className: "QueryRunDialogComponent", filePath: "src/lib/custom/Queries/query-run-dialog.component.ts", lineNumber: 35 }); })();
782
783
  //# sourceMappingURL=query-run-dialog.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"query-run-dialog.component.js","sourceRoot":"","sources":["../../../../src/lib/custom/Queries/query-run-dialog.component.ts","../../../../src/lib/custom/Queries/query-run-dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAoC,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGpI,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;;;;;;;ICSxC,8BAAyF;IACvF,uBAAqH;IACrH,+BAA2C;IAAA,2CAA2B;IACxE,AADwE,iBAAO,EACzE;;;IAQA,gCAA8E;IAC5E,wBAAwE;IACxE,kCACA;IAAA,gCAAyI;IACvI,YACF;IACF,AADE,iBAAO,EACF;;;IAFH,eACF;IADE,6DACF;;;IAkBY,gCAA8B;IAAA,iBAAC;IAAA,iBAAO;;;IAIxC,+BAA8E;IAC5E,YACF;IAAA,iBAAM;;;IADJ,cACF;IADE,qDACF;;;IAQA,wBAA4G;;;;IAMhH,iCAGyB;IAFvB,0WAAyB;IAD3B,iBAGy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AAC,OAAO,CAAC;YAC9B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACxB,CAAC;IACL,CAAC;IAED,YAAY;QACR,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACjC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;YAC1E,IAAI,CAAC,QAAQ,GAAG,CAAC,UAAU,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;YAChD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACxB,CAAC;IACL,CAAC;wHAlYQ,uBAAuB;oEAAvB,uBAAuB;YCjCpC,gGAAiB;;YAAjB,wCAuTC;;;iFDtRY,uBAAuB;cANnC,SAAS;6BACI,KAAK,YACL,qBAAqB;;kBAO9B,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,MAAM;;kBACN,MAAM;;kFAPE,uBAAuB","sourcesContent":["import { Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges, ChangeDetectorRef, inject } from '@angular/core';\nimport { MJQueryEntity, MJQueryParameterEntity } from '@memberjunction/core-entities';\nimport { GraphQLDataProvider } from '@memberjunction/graphql-dataprovider';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\nimport { Metadata } from '@memberjunction/core';\n\ninterface QueryRunResult {\n QueryID: string;\n QueryName: string;\n Success: boolean;\n Results: string; // This is a JSON string that needs to be parsed\n ErrorMessage: string;\n RowCount: number;\n TotalRowCount: number;\n ExecutionTime: number;\n AppliedParameters?: string; // JSON string of applied parameters\n}\n\ninterface ParameterPair {\n name: string;\n value: string;\n type: string;\n defaultValue: string;\n description: string;\n isRequired: boolean;\n}\n\n@Component({\n standalone: false,\n selector: 'mj-query-run-dialog',\n templateUrl: './query-run-dialog.component.html',\n styleUrls: ['./query-run-dialog.component.css']\n})\nexport class QueryRunDialogComponent implements OnInit, OnChanges {\n private cdr = inject(ChangeDetectorRef);\n\n @Input() query: MJQueryEntity | null = null;\n @Input() parameters: MJQueryParameterEntity[] = [];\n @Input() isVisible = false;\n @Output() isVisibleChange = new EventEmitter<boolean>();\n @Output() onClose = new EventEmitter<void>();\n\n public isRunning = false;\n public isLoadingParams = false;\n public parameterPairs: ParameterPair[] = [];\n public parametersExpanded = true;\n public resultsExpanded = true;\n public paginationExpanded = false;\n public runResult: QueryRunResult | null = null;\n public resultColumns: any[] = [];\n public resultRows: any[] = [];\n public selectedRows: any[] = [];\n public maxRows: number | null = null;\n public startRow: number = 0;\n\n ngOnInit() {\n this.initializeParameters();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['isVisible'] && changes['isVisible'].currentValue) {\n this.initializeParameters();\n }\n if (changes['parameters']) {\n this.initializeParameters();\n }\n }\n\n private initializeParameters() {\n if (!this.query || !this.parameters) return;\n\n // Create parameter pairs from defined query parameters only\n this.parameterPairs = this.parameters.map(param => ({\n name: param.Name,\n value: param.DefaultValue || '',\n type: param.Type || 'string',\n defaultValue: param.DefaultValue || '',\n description: param.Description || '',\n isRequired: param.IsRequired || false\n }));\n }\n\n getValueListOptions(valueList: string): Array<{text: string, value: string}> {\n if (!valueList) return [];\n \n try {\n const options = valueList.split(',').map(v => v.trim());\n return options.map(opt => ({ text: opt, value: opt }));\n } catch {\n return [];\n }\n }\n\n isParameterValid(param: ParameterPair): boolean {\n if (param.isRequired && !param.value) {\n return false;\n }\n \n // Additional type-specific validation could go here\n if (param.type === 'number' && param.value) {\n return !isNaN(Number(param.value));\n }\n \n return true;\n }\n\n async runQuery(isPaginationRequest: boolean = false) {\n if (!this.query?.ID) return;\n\n // Validate required parameters\n const invalidParams = this.parameterPairs.filter(p => p.isRequired && !p.value);\n if (invalidParams.length > 0) {\n MJNotificationService.Instance.CreateSimpleNotification(\n `Required parameters missing: ${invalidParams.map(p => p.name).join(', ')}`,\n 'warning',\n 3000\n );\n return;\n }\n\n this.isRunning = true;\n this.runResult = null;\n\n try {\n // Build parameters object\n const queryParameters: Record<string, any> = {};\n this.parameterPairs.forEach(param => {\n if (param.value) {\n try {\n // Try to parse as JSON first, fallback to string\n queryParameters[param.name] = JSON.parse(param.value);\n } catch {\n // If JSON parsing fails, treat as string or number based on type\n if (param.type === 'number') {\n queryParameters[param.name] = Number(param.value);\n } else {\n queryParameters[param.name] = param.value;\n }\n }\n }\n });\n\n // Get GraphQL data provider\n const dataProvider = Metadata.Provider as GraphQLDataProvider;\n \n // Execute the GetQueryData GraphQL query\n const query = `\n query GetQueryData($QueryID: String!, $Parameters: JSONObject, $MaxRows: Int, $StartRow: Int) {\n GetQueryData(QueryID: $QueryID, Parameters: $Parameters, MaxRows: $MaxRows, StartRow: $StartRow) {\n QueryID\n QueryName\n Success\n Results\n ErrorMessage\n RowCount\n TotalRowCount\n ExecutionTime\n AppliedParameters\n }\n }\n `;\n\n const variables: any = {\n QueryID: this.query.ID,\n Parameters: queryParameters\n };\n \n // Only include MaxRows if it's set\n if (this.maxRows && this.maxRows > 0) {\n variables.MaxRows = this.maxRows;\n }\n \n // Only include StartRow if it's set and greater than 0\n if (this.startRow && this.startRow > 0) {\n variables.StartRow = this.startRow;\n }\n\n console.log('Executing query with variables:', variables);\n \n const response = await dataProvider.ExecuteGQL(\n query, \n variables\n ) as {GetQueryData: QueryRunResult};\n\n if (response?.GetQueryData) {\n this.runResult = response.GetQueryData;\n \n if (this.runResult.Success && this.runResult.Results) {\n // Parse the JSON string results\n try {\n const parsedResults = JSON.parse(this.runResult.Results);\n this.processResults(parsedResults);\n // Only show notification on first run (not pagination)\n if (!isPaginationRequest) {\n const rowCountMsg = this.runResult.TotalRowCount > this.runResult.RowCount\n ? `Query executed successfully. Showing ${this.runResult.RowCount} of ${this.runResult.TotalRowCount} total rows.`\n : `Query executed successfully. ${this.runResult.RowCount} rows returned.`;\n MJNotificationService.Instance.CreateSimpleNotification(\n rowCountMsg,\n 'success',\n 3000\n );\n }\n \n // Automatically expand results and collapse other sections\n this.parametersExpanded = false;\n this.paginationExpanded = false;\n this.resultsExpanded = true;\n } catch (error) {\n console.error('Error parsing results:', error);\n MJNotificationService.Instance.CreateSimpleNotification(\n 'Failed to parse query results',\n 'error',\n 3000\n );\n }\n } else {\n console.error('Query execution failed:', this.runResult);\n MJNotificationService.Instance.CreateSimpleNotification(\n this.runResult?.ErrorMessage || 'Query execution failed',\n 'error',\n 3000\n );\n \n // Expand results section to show error\n this.parametersExpanded = false;\n this.paginationExpanded = false;\n this.resultsExpanded = true;\n }\n } else {\n throw new Error('No response from server');\n }\n } catch (error) {\n console.error('Error running query:', error);\n this.runResult = {\n QueryID: this.query.ID,\n QueryName: this.query.Name,\n Success: false,\n Results: '[]',\n ErrorMessage: error instanceof Error ? error.message : 'Unknown error occurred',\n RowCount: 0,\n TotalRowCount: 0,\n ExecutionTime: 0\n };\n MJNotificationService.Instance.CreateSimpleNotification(\n 'Failed to execute query. Please check your parameters and try again.',\n 'error',\n 3000\n );\n } finally {\n this.isRunning = false;\n this.cdr.detectChanges();\n }\n }\n\n private processResults(results: any[]) {\n if (!results || results.length === 0) {\n this.resultColumns = [];\n this.resultRows = [];\n return;\n }\n\n // Extract columns from first row\n const firstRow = results[0];\n this.resultColumns = Object.keys(firstRow).map(key => ({\n field: key,\n title: this.formatColumnTitle(key),\n width: this.calculateColumnWidth(key, results)\n }));\n\n // Set rows\n this.resultRows = results;\n }\n\n private formatColumnTitle(field: string): string {\n // Convert camelCase or snake_case to Title Case\n return field\n .replace(/([A-Z])/g, ' $1')\n .replace(/_/g, ' ')\n .replace(/^\\s+/, '')\n .split(' ')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n }\n\n private calculateColumnWidth(field: string, data: any[]): number {\n // Calculate appropriate column width based on content\n const maxLength = Math.max(\n field.length,\n ...data.slice(0, 10).map(row => String(row[field] || '').length)\n );\n return Math.min(Math.max(maxLength * 10, 100), 300);\n }\n\n exportToCSV() {\n if (!this.resultRows || this.resultRows.length === 0) {\n MJNotificationService.Instance.CreateSimpleNotification(\n 'No data to export',\n 'warning',\n 3000\n );\n return;\n }\n\n // Create CSV content\n const headers = this.resultColumns.map(col => col.title).join(',');\n const rows = this.resultRows.map(row =>\n this.resultColumns.map(col => {\n const value = row[col.field];\n // Escape values containing commas or quotes\n if (typeof value === 'string' && (value.includes(',') || value.includes('\"'))) {\n return `\"${value.replace(/\"/g, '\"\"')}\"`;\n }\n return value;\n }).join(',')\n );\n\n const csv = [headers, ...rows].join('\\n');\n\n // Create and download file\n const blob = new Blob([csv], { type: 'text/csv' });\n const url = window.URL.createObjectURL(blob);\n const a = document.createElement('a');\n a.href = url;\n a.download = `${this.query?.Name || 'query'}_results_${new Date().toISOString().slice(0, 10)}.csv`;\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n\n MJNotificationService.Instance.CreateSimpleNotification(\n 'Results exported to CSV',\n 'success',\n 3000\n );\n }\n\n async copyToClipboard() {\n if (!this.resultRows || this.resultRows.length === 0) {\n MJNotificationService.Instance.CreateSimpleNotification(\n 'No data to copy',\n 'warning',\n 3000\n );\n return;\n }\n\n try {\n // Create tab-delimited content for pasting into Excel\n const headers = this.resultColumns.map(col => col.title).join('\\t');\n const rows = this.resultRows.map(row =>\n this.resultColumns.map(col => row[col.field] || '').join('\\t')\n );\n\n const content = [headers, ...rows].join('\\n');\n await navigator.clipboard.writeText(content);\n\n MJNotificationService.Instance.CreateSimpleNotification(\n 'Results copied to clipboard',\n 'success',\n 3000\n );\n } catch (error) {\n console.error('Failed to copy to clipboard:', error);\n MJNotificationService.Instance.CreateSimpleNotification(\n 'Failed to copy to clipboard',\n 'error',\n 3000\n );\n }\n }\n\n close() {\n this.isVisible = false;\n this.isVisibleChange.emit(false);\n this.onClose.emit();\n \n // Reset state\n this.runResult = null;\n this.resultColumns = [];\n this.resultRows = [];\n this.selectedRows = [];\n this.startRow = 0;\n }\n\n getAppliedParametersCount(): number {\n return this.parameterPairs.filter(p => p.value).length;\n }\n \n hasInvalidParameters(): boolean {\n return this.parameterPairs.some(p => !this.isParameterValid(p));\n }\n \n // Pagination methods\n goToFirstPage() {\n this.startRow = 0;\n this.runQuery(true);\n }\n \n goToPreviousPage() {\n if (this.startRow > 0 && this.maxRows) {\n this.startRow = Math.max(0, this.startRow - this.maxRows);\n this.runQuery(true);\n }\n }\n \n goToNextPage() {\n if (this.maxRows && this.runResult && this.startRow + this.runResult.RowCount < this.runResult.TotalRowCount) {\n this.startRow += this.maxRows;\n this.runQuery(true);\n }\n }\n \n goToLastPage() {\n if (this.maxRows && this.runResult) {\n const totalPages = Math.ceil(this.runResult.TotalRowCount / this.maxRows);\n this.startRow = (totalPages - 1) * this.maxRows;\n this.runQuery(true);\n }\n }\n}","@if (isVisible) {\n <mj-dialog\n [Visible]=\"true\"\n [Width]=\"900\"\n (Close)=\"close()\">\n <mj-dialog-titlebar>\n <div style=\"display: flex; align-items: center; gap: 8px;\">\n <i class=\"fa-solid fa-play-circle\" style=\"color: var(--mj-brand-primary);\"></i>\n Run Query: {{ query?.Name || 'Untitled' }}\n </div>\n </mj-dialog-titlebar>\n <div style=\"display: flex; flex-direction: column; height: 100%; overflow-y: auto; overflow-x: hidden;\">\n @if (isLoadingParams) {\n <div style=\"display: flex; align-items: center; justify-content: center; padding: 40px;\">\n <i class=\"fa-solid fa-spinner fa-spin\" style=\"font-size: 24px; color: var(--mj-text-muted); margin-right: 12px;\"></i>\n <span style=\"color: var(--mj-text-muted);\">Loading query parameters...</span>\n </div>\n } @else {\n <!-- Query Parameters Section -->\n @if (parameterPairs.length > 0) {\n <mj-accordion-panel\n [(Expanded)]=\"parametersExpanded\"\n style=\"margin-bottom: 16px; flex-shrink: 0;\">\n <ng-template mjAccordionTitle>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-sliders\" style=\"color: var(--mj-text-muted);\"></i>\n Query Parameters\n <span style=\"background: var(--mj-status-info); color: var(--mj-text-inverse); padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n {{ parameterPairs.length }}\n </span>\n </span>\n </ng-template>\n <div style=\"padding: 12px 0;\">\n <div style=\"margin-bottom: 12px; color: var(--mj-text-muted); font-size: 0.85em;\">\n <i class=\"fa-solid fa-info-circle\"></i>\n Configure parameter values for query execution.\n </div>\n <!-- Parameters List -->\n <div style=\"display: flex; flex-direction: column; gap: 16px;\">\n @for (param of parameterPairs; track param.name) {\n <div style=\"background: var(--mj-bg-surface-sunken); border: 1px solid var(--mj-border-default); border-radius: 6px; padding: 16px;\">\n <div style=\"display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px;\">\n <div>\n <label style=\"font-weight: 600; color: var(--mj-text-secondary); display: flex; align-items: center; gap: 6px;\">\n <i class=\"fa-solid fa-at\" style=\"color: var(--mj-brand-primary);\"></i>\n {{ param.name }}\n @if (param.isRequired) {\n <span style=\"color: #dc3545;\">*</span>\n }\n </label>\n @if (param.description) {\n <div style=\"font-size: 0.85em; color: var(--mj-text-muted); margin-top: 4px;\">\n {{ param.description }}\n </div>\n }\n </div>\n <div style=\"display: flex; gap: 8px; align-items: center;\">\n <span class=\"badge\" style=\"background: var(--mj-text-muted); color: white; padding: 2px 6px; border-radius: 4px; font-size: 0.75em;\">\n {{ param.type }}\n </span>\n @if (!isParameterValid(param)) {\n <i class=\"fa-solid fa-exclamation-triangle\" style=\"color: #dc3545;\" title=\"Required parameter is empty\"></i>\n }\n </div>\n </div>\n <!-- Parameter Value Input -->\n @if (param.type === 'number') {\n <input type=\"number\" class=\"mj-input\"\n [(ngModel)]=\"param.value\"\n placeholder=\"Enter number value...\"\n style=\"width: 100%;\" />\n } @else {\n <textarea class=\"mj-input\"\n [(ngModel)]=\"param.value\"\n rows=\"2\"\n placeholder=\"Enter value (JSON, string, or number)...\"\n style=\"width: 100%; font-family: 'Courier New', monospace;\">\n </textarea>\n }\n @if (param.defaultValue) {\n <div style=\"font-size: 0.8em; color: var(--mj-text-muted); margin-top: 4px;\">\n Default: <code style=\"background: var(--mj-bg-surface-sunken); padding: 2px 4px; border-radius: 3px;\">{{ param.defaultValue }}</code>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </mj-accordion-panel>\n } @else {\n <div style=\"padding: 20px; background: var(--mj-bg-surface-sunken); border-radius: 6px; margin-bottom: 16px; text-align: center; color: var(--mj-text-muted);\">\n <i class=\"fa-solid fa-info-circle\"></i> This query has no parameters.\n </div>\n }\n <!-- Pagination Settings -->\n <mj-accordion-panel\n [(Expanded)]=\"paginationExpanded\"\n style=\"margin-bottom: 16px;\">\n <ng-template mjAccordionTitle>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-table-list\" style=\"color: var(--mj-text-muted);\"></i>\n Pagination Settings\n @if (maxRows && maxRows > 0) {\n <span style=\"background: var(--mj-text-muted); color: var(--mj-text-inverse); padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n {{ maxRows }} rows/page\n </span>\n }\n </span>\n </ng-template>\n <div style=\"padding: 12px 0;\">\n <div style=\"display: flex; flex-direction: column; gap: 12px;\">\n <!-- Max Rows -->\n <div style=\"display: flex; align-items: center; gap: 12px;\">\n <label style=\"font-weight: 600; color: var(--mj-text-secondary); white-space: nowrap; min-width: 100px;\">\n <i class=\"fa-solid fa-list-ol\" style=\"color: var(--mj-text-muted); margin-right: 6px;\"></i>\n Max Rows:\n </label>\n <input type=\"number\" class=\"mj-input\"\n [(ngModel)]=\"maxRows\"\n min=\"1\"\n step=\"100\"\n placeholder=\"All rows\"\n style=\"width: 150px;\" />\n <span style=\"font-size: 0.85em; color: var(--mj-text-muted);\">\n Leave empty to return all rows\n </span>\n </div>\n <!-- Start Row -->\n <div style=\"display: flex; align-items: center; gap: 12px;\">\n <label style=\"font-weight: 600; color: var(--mj-text-secondary); white-space: nowrap; min-width: 100px;\">\n <i class=\"fa-solid fa-forward\" style=\"color: var(--mj-text-muted); margin-right: 6px;\"></i>\n Start Row:\n </label>\n <input type=\"number\" class=\"mj-input\"\n [(ngModel)]=\"startRow\"\n min=\"0\"\n step=\"1\"\n placeholder=\"0\"\n style=\"width: 150px;\" />\n <span style=\"font-size: 0.85em; color: var(--mj-text-muted);\">\n 0-based offset for pagination\n </span>\n </div>\n </div>\n </div>\n </mj-accordion-panel>\n <!-- Results Section -->\n @if (runResult) {\n <mj-accordion-panel\n [(Expanded)]=\"resultsExpanded\"\n style=\"flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0;\">\n <ng-template mjAccordionTitle>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n @if (runResult.Success) {\n <i class=\"fa-solid fa-table\" style=\"color: var(--mj-status-success);\"></i>\n Query Results\n <span style=\"background: var(--mj-status-success); color: var(--mj-text-inverse); padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n {{ runResult.RowCount }} rows@if (runResult.TotalRowCount > runResult.RowCount) { of {{ runResult.TotalRowCount }} total}\n </span>\n @if (runResult.ExecutionTime) {\n <span style=\"color: var(--mj-text-muted); font-size: 0.85em; font-weight: normal;\">&mdash; {{ runResult.ExecutionTime }}ms</span>\n }\n } @else {\n <i class=\"fa-solid fa-exclamation-circle\" style=\"color: var(--mj-status-error);\"></i>\n Query Results &mdash; Error\n }\n </span>\n </ng-template>\n <div style=\"flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0;\">\n @if (runResult.Success) {\n @if (resultRows.length > 0) {\n <!-- Export and Pagination Controls -->\n <div style=\"display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid var(--mj-border-default);\">\n <!-- Pagination Info and Controls -->\n <div style=\"display: flex; align-items: center; gap: 12px;\">\n @if (runResult.TotalRowCount > runResult.RowCount || startRow > 0) {\n <span style=\"font-size: 0.9em; color: var(--mj-text-muted);\">\n Showing rows {{ startRow + 1 }} - {{ startRow + runResult.RowCount }} of {{ runResult.TotalRowCount }}\n </span>\n <div style=\"display: flex; gap: 4px;\">\n <button mjButton\n variant=\"flat\"\n [disabled]=\"startRow === 0\"\n (click)=\"goToFirstPage()\"\n title=\"First page\">\n <i class=\"fa-solid fa-angles-left\"></i>\n </button>\n <button mjButton\n variant=\"flat\"\n [disabled]=\"startRow === 0\"\n (click)=\"goToPreviousPage()\"\n title=\"Previous page\">\n <i class=\"fa-solid fa-angle-left\"></i>\n </button>\n <button mjButton\n variant=\"flat\"\n [disabled]=\"startRow + runResult.RowCount >= runResult.TotalRowCount\"\n (click)=\"goToNextPage()\"\n title=\"Next page\">\n <i class=\"fa-solid fa-angle-right\"></i>\n </button>\n <button mjButton\n variant=\"flat\"\n [disabled]=\"startRow + runResult.RowCount >= runResult.TotalRowCount\"\n (click)=\"goToLastPage()\"\n title=\"Last page\">\n <i class=\"fa-solid fa-angles-right\"></i>\n </button>\n </div>\n }\n </div>\n <!-- Export Buttons -->\n <div style=\"display: flex; gap: 8px;\">\n <button mjButton\n variant=\"flat\"\n (click)=\"copyToClipboard()\"\n title=\"Copy to clipboard\">\n <i class=\"fa-solid fa-copy\"></i> Copy\n </button>\n <button mjButton\n variant=\"flat\"\n (click)=\"exportToCSV()\"\n title=\"Export to CSV\">\n <i class=\"fa-solid fa-download\"></i> Export CSV\n </button>\n </div>\n </div>\n <!-- Results Grid -->\n <div class=\"results-table-container\" style=\"flex: 1; overflow: auto; border: 1px solid var(--mj-border-default); border-radius: 4px; min-height: 0;\">\n <table class=\"results-table\" style=\"width: 100%; border-collapse: collapse; font-size: 14px;\">\n <thead style=\"position: sticky; top: 0; background: var(--mj-bg-surface-sunken); z-index: 10;\">\n <tr>\n @for (col of resultColumns; track col.field) {\n <th style=\"padding: 12px 16px; text-align: left; font-weight: 600; color: var(--mj-text-secondary); border-bottom: 2px solid var(--mj-border-default); background: var(--mj-bg-surface-sunken); white-space: nowrap;\">\n {{ col.title }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of resultRows; track $index) {\n <tr style=\"border-bottom: 1px solid var(--mj-border-default); transition: background-color 0.2s;\">\n @for (col of resultColumns; track col.field) {\n <td style=\"padding: 10px 16px; color: var(--mj-text-primary); max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\"\n [title]=\"row[col.field]\">\n {{ row[col.field] || '' }}\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n @if (resultRows.length === 0) {\n <div style=\"padding: 40px; text-align: center; color: var(--mj-text-muted);\">\n <i class=\"fa-solid fa-table\" style=\"font-size: 48px; margin-bottom: 12px; opacity: 0.3;\"></i>\n <p>No data in results</p>\n </div>\n }\n </div>\n } @else {\n <div style=\"display: flex; align-items: center; justify-content: center; height: 200px; color: var(--mj-text-muted);\">\n <i class=\"fa-solid fa-inbox\" style=\"font-size: 48px; margin-bottom: 12px;\"></i>\n <p>No results returned</p>\n </div>\n }\n } @else {\n <div style=\"padding: 20px; background: #f8d7da; border: 1px solid #f5c6cb; border-radius: 6px; margin: 12px;\">\n <div style=\"color: #721c24;\">\n <i class=\"fa-solid fa-exclamation-circle\"></i>\n <strong>Query execution failed</strong>\n </div>\n @if (runResult.ErrorMessage) {\n <div style=\"margin-top: 8px; font-family: 'Courier New', monospace; font-size: 0.9em;\">\n {{ runResult.ErrorMessage }}\n </div>\n }\n </div>\n }\n </div>\n </mj-accordion-panel>\n }\n }\n </div>\n <mj-dialog-actions>\n @if (!runResult) {\n <button mjButton (click)=\"close()\">\n <i class=\"fa-solid fa-times\"></i> Cancel\n </button>\n <button mjButton\n variant=\"primary\"\n [disabled]=\"isRunning || hasInvalidParameters()\"\n (click)=\"runQuery()\">\n @if (isRunning) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Running...\n } @else {\n <i class=\"fa-solid fa-play\"></i> Run Query\n }\n </button>\n } @else {\n <button mjButton (click)=\"close()\">\n <i class=\"fa-solid fa-times\"></i> Close\n </button>\n <button mjButton\n variant=\"primary\"\n [disabled]=\"isRunning\"\n (click)=\"runQuery()\">\n <i class=\"fa-solid fa-refresh\"></i> Run Again\n </button>\n }\n </mj-dialog-actions>\n </mj-dialog>\n}\n"]}
1
+ {"version":3,"file":"query-run-dialog.component.js","sourceRoot":"","sources":["../../../../src/lib/custom/Queries/query-run-dialog.component.ts","../../../../src/lib/custom/Queries/query-run-dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAoC,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGpI,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAGzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;;;;;;ICO7D,8BAAyF;IACvF,uBAAqH;IACrH,+BAA2C;IAAA,2CAA2B;IACxE,AADwE,iBAAO,EACzE;;;IAQA,gCAA8E;IAC5E,wBAAwE;IACxE,kCACA;IAAA,gCAAyI;IACvI,YACF;IACF,AADE,iBAAO,EACF;;;IAFH,eACF;IADE,6DACF;;;IAkBY,gCAA8B;IAAA,iBAAC;IAAA,iBAAO;;;IAIxC,+BAA8E;IAC5E,YACF;IAAA,iBAAM;;;IADJ,cACF;IADE,qDACF;;;IAQA,wBAA4G;;;;IAMhH,iCAGyB;IAFvB,0WAAyB;IAD3B,iBAGyB;;;IAFvB,8CAAyB;;;;IAI3B,oCAI8D;IAH5D,6WAAyB;IAI3B,sCAAA;IAAA,iBAAW;;;IAJT,8CAAyB;;;IAO3B,+BAA6E;IAC3E,0BAAS;IAAA,gCAA6F;IAAA,YAAwB;IAChI,AADgI,iBAAO,EACjI;;;IADkG,eAAwB;IAAxB,2CAAwB;;;IAtC9H,AADF,AADF,AADF,+BAAqI,cAC1B,UAClG,gBAC6G;IAC9G,wBAAsE;IACtE,YACA;IAAA,2IAAwB;IAG1B,iBAAQ;IACR,0IAAyB;IAK3B,iBAAM;IAEJ,AADF,+BAA2D,eAC4E;IACnI,aACF;IAAA,iBAAO;IACP,0IAAgC;IAIpC,AAD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,CAAC;QACxB,CAAC;IACL,CAAC;gRAlYQ,uBAAuB,yBAAvB,uBAAuB;oEAAvB,uBAAuB;YClCpC,gGAAiB;;YAAjB,wCAuTC;;;iFDrRY,uBAAuB;cANnC,SAAS;6BACI,KAAK,YACL,qBAAqB;;kBAO9B,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,MAAM;;kBACN,MAAM;;kFAPE,uBAAuB","sourcesContent":["import { Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges, ChangeDetectorRef, inject } from '@angular/core';\nimport { MJQueryEntity, MJQueryParameterEntity } from '@memberjunction/core-entities';\nimport { GraphQLDataProvider } from '@memberjunction/graphql-dataprovider';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\nimport { Metadata } from '@memberjunction/core';\n\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\ninterface QueryRunResult {\n QueryID: string;\n QueryName: string;\n Success: boolean;\n Results: string; // This is a JSON string that needs to be parsed\n ErrorMessage: string;\n RowCount: number;\n TotalRowCount: number;\n ExecutionTime: number;\n AppliedParameters?: string; // JSON string of applied parameters\n}\n\ninterface ParameterPair {\n name: string;\n value: string;\n type: string;\n defaultValue: string;\n description: string;\n isRequired: boolean;\n}\n\n@Component({\n standalone: false,\n selector: 'mj-query-run-dialog',\n templateUrl: './query-run-dialog.component.html',\n styleUrls: ['./query-run-dialog.component.css']\n})\nexport class QueryRunDialogComponent extends BaseAngularComponent implements OnInit, OnChanges {\n private cdr = inject(ChangeDetectorRef);\n\n @Input() query: MJQueryEntity | null = null;\n @Input() parameters: MJQueryParameterEntity[] = [];\n @Input() isVisible = false;\n @Output() isVisibleChange = new EventEmitter<boolean>();\n @Output() onClose = new EventEmitter<void>();\n\n public isRunning = false;\n public isLoadingParams = false;\n public parameterPairs: ParameterPair[] = [];\n public parametersExpanded = true;\n public resultsExpanded = true;\n public paginationExpanded = false;\n public runResult: QueryRunResult | null = null;\n public resultColumns: any[] = [];\n public resultRows: any[] = [];\n public selectedRows: any[] = [];\n public maxRows: number | null = null;\n public startRow: number = 0;\n\n ngOnInit() {\n this.initializeParameters();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['isVisible'] && changes['isVisible'].currentValue) {\n this.initializeParameters();\n }\n if (changes['parameters']) {\n this.initializeParameters();\n }\n }\n\n private initializeParameters() {\n if (!this.query || !this.parameters) return;\n\n // Create parameter pairs from defined query parameters only\n this.parameterPairs = this.parameters.map(param => ({\n name: param.Name,\n value: param.DefaultValue || '',\n type: param.Type || 'string',\n defaultValue: param.DefaultValue || '',\n description: param.Description || '',\n isRequired: param.IsRequired || false\n }));\n }\n\n getValueListOptions(valueList: string): Array<{text: string, value: string}> {\n if (!valueList) return [];\n \n try {\n const options = valueList.split(',').map(v => v.trim());\n return options.map(opt => ({ text: opt, value: opt }));\n } catch {\n return [];\n }\n }\n\n isParameterValid(param: ParameterPair): boolean {\n if (param.isRequired && !param.value) {\n return false;\n }\n \n // Additional type-specific validation could go here\n if (param.type === 'number' && param.value) {\n return !isNaN(Number(param.value));\n }\n \n return true;\n }\n\n async runQuery(isPaginationRequest: boolean = false) {\n if (!this.query?.ID) return;\n\n // Validate required parameters\n const invalidParams = this.parameterPairs.filter(p => p.isRequired && !p.value);\n if (invalidParams.length > 0) {\n MJNotificationService.Instance.CreateSimpleNotification(\n `Required parameters missing: ${invalidParams.map(p => p.name).join(', ')}`,\n 'warning',\n 3000\n );\n return;\n }\n\n this.isRunning = true;\n this.runResult = null;\n\n try {\n // Build parameters object\n const queryParameters: Record<string, any> = {};\n this.parameterPairs.forEach(param => {\n if (param.value) {\n try {\n // Try to parse as JSON first, fallback to string\n queryParameters[param.name] = JSON.parse(param.value);\n } catch {\n // If JSON parsing fails, treat as string or number based on type\n if (param.type === 'number') {\n queryParameters[param.name] = Number(param.value);\n } else {\n queryParameters[param.name] = param.value;\n }\n }\n }\n });\n\n // Get GraphQL data provider\n const dataProvider = this.ProviderToUse as GraphQLDataProvider;\n \n // Execute the GetQueryData GraphQL query\n const query = `\n query GetQueryData($QueryID: String!, $Parameters: JSONObject, $MaxRows: Int, $StartRow: Int) {\n GetQueryData(QueryID: $QueryID, Parameters: $Parameters, MaxRows: $MaxRows, StartRow: $StartRow) {\n QueryID\n QueryName\n Success\n Results\n ErrorMessage\n RowCount\n TotalRowCount\n ExecutionTime\n AppliedParameters\n }\n }\n `;\n\n const variables: any = {\n QueryID: this.query.ID,\n Parameters: queryParameters\n };\n \n // Only include MaxRows if it's set\n if (this.maxRows && this.maxRows > 0) {\n variables.MaxRows = this.maxRows;\n }\n \n // Only include StartRow if it's set and greater than 0\n if (this.startRow && this.startRow > 0) {\n variables.StartRow = this.startRow;\n }\n\n console.log('Executing query with variables:', variables);\n \n const response = await dataProvider.ExecuteGQL(\n query, \n variables\n ) as {GetQueryData: QueryRunResult};\n\n if (response?.GetQueryData) {\n this.runResult = response.GetQueryData;\n \n if (this.runResult.Success && this.runResult.Results) {\n // Parse the JSON string results\n try {\n const parsedResults = JSON.parse(this.runResult.Results);\n this.processResults(parsedResults);\n // Only show notification on first run (not pagination)\n if (!isPaginationRequest) {\n const rowCountMsg = this.runResult.TotalRowCount > this.runResult.RowCount\n ? `Query executed successfully. Showing ${this.runResult.RowCount} of ${this.runResult.TotalRowCount} total rows.`\n : `Query executed successfully. ${this.runResult.RowCount} rows returned.`;\n MJNotificationService.Instance.CreateSimpleNotification(\n rowCountMsg,\n 'success',\n 3000\n );\n }\n \n // Automatically expand results and collapse other sections\n this.parametersExpanded = false;\n this.paginationExpanded = false;\n this.resultsExpanded = true;\n } catch (error) {\n console.error('Error parsing results:', error);\n MJNotificationService.Instance.CreateSimpleNotification(\n 'Failed to parse query results',\n 'error',\n 3000\n );\n }\n } else {\n console.error('Query execution failed:', this.runResult);\n MJNotificationService.Instance.CreateSimpleNotification(\n this.runResult?.ErrorMessage || 'Query execution failed',\n 'error',\n 3000\n );\n \n // Expand results section to show error\n this.parametersExpanded = false;\n this.paginationExpanded = false;\n this.resultsExpanded = true;\n }\n } else {\n throw new Error('No response from server');\n }\n } catch (error) {\n console.error('Error running query:', error);\n this.runResult = {\n QueryID: this.query.ID,\n QueryName: this.query.Name,\n Success: false,\n Results: '[]',\n ErrorMessage: error instanceof Error ? error.message : 'Unknown error occurred',\n RowCount: 0,\n TotalRowCount: 0,\n ExecutionTime: 0\n };\n MJNotificationService.Instance.CreateSimpleNotification(\n 'Failed to execute query. Please check your parameters and try again.',\n 'error',\n 3000\n );\n } finally {\n this.isRunning = false;\n this.cdr.detectChanges();\n }\n }\n\n private processResults(results: any[]) {\n if (!results || results.length === 0) {\n this.resultColumns = [];\n this.resultRows = [];\n return;\n }\n\n // Extract columns from first row\n const firstRow = results[0];\n this.resultColumns = Object.keys(firstRow).map(key => ({\n field: key,\n title: this.formatColumnTitle(key),\n width: this.calculateColumnWidth(key, results)\n }));\n\n // Set rows\n this.resultRows = results;\n }\n\n private formatColumnTitle(field: string): string {\n // Convert camelCase or snake_case to Title Case\n return field\n .replace(/([A-Z])/g, ' $1')\n .replace(/_/g, ' ')\n .replace(/^\\s+/, '')\n .split(' ')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n }\n\n private calculateColumnWidth(field: string, data: any[]): number {\n // Calculate appropriate column width based on content\n const maxLength = Math.max(\n field.length,\n ...data.slice(0, 10).map(row => String(row[field] || '').length)\n );\n return Math.min(Math.max(maxLength * 10, 100), 300);\n }\n\n exportToCSV() {\n if (!this.resultRows || this.resultRows.length === 0) {\n MJNotificationService.Instance.CreateSimpleNotification(\n 'No data to export',\n 'warning',\n 3000\n );\n return;\n }\n\n // Create CSV content\n const headers = this.resultColumns.map(col => col.title).join(',');\n const rows = this.resultRows.map(row =>\n this.resultColumns.map(col => {\n const value = row[col.field];\n // Escape values containing commas or quotes\n if (typeof value === 'string' && (value.includes(',') || value.includes('\"'))) {\n return `\"${value.replace(/\"/g, '\"\"')}\"`;\n }\n return value;\n }).join(',')\n );\n\n const csv = [headers, ...rows].join('\\n');\n\n // Create and download file\n const blob = new Blob([csv], { type: 'text/csv' });\n const url = window.URL.createObjectURL(blob);\n const a = document.createElement('a');\n a.href = url;\n a.download = `${this.query?.Name || 'query'}_results_${new Date().toISOString().slice(0, 10)}.csv`;\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n\n MJNotificationService.Instance.CreateSimpleNotification(\n 'Results exported to CSV',\n 'success',\n 3000\n );\n }\n\n async copyToClipboard() {\n if (!this.resultRows || this.resultRows.length === 0) {\n MJNotificationService.Instance.CreateSimpleNotification(\n 'No data to copy',\n 'warning',\n 3000\n );\n return;\n }\n\n try {\n // Create tab-delimited content for pasting into Excel\n const headers = this.resultColumns.map(col => col.title).join('\\t');\n const rows = this.resultRows.map(row =>\n this.resultColumns.map(col => row[col.field] || '').join('\\t')\n );\n\n const content = [headers, ...rows].join('\\n');\n await navigator.clipboard.writeText(content);\n\n MJNotificationService.Instance.CreateSimpleNotification(\n 'Results copied to clipboard',\n 'success',\n 3000\n );\n } catch (error) {\n console.error('Failed to copy to clipboard:', error);\n MJNotificationService.Instance.CreateSimpleNotification(\n 'Failed to copy to clipboard',\n 'error',\n 3000\n );\n }\n }\n\n close() {\n this.isVisible = false;\n this.isVisibleChange.emit(false);\n this.onClose.emit();\n \n // Reset state\n this.runResult = null;\n this.resultColumns = [];\n this.resultRows = [];\n this.selectedRows = [];\n this.startRow = 0;\n }\n\n getAppliedParametersCount(): number {\n return this.parameterPairs.filter(p => p.value).length;\n }\n \n hasInvalidParameters(): boolean {\n return this.parameterPairs.some(p => !this.isParameterValid(p));\n }\n \n // Pagination methods\n goToFirstPage() {\n this.startRow = 0;\n this.runQuery(true);\n }\n \n goToPreviousPage() {\n if (this.startRow > 0 && this.maxRows) {\n this.startRow = Math.max(0, this.startRow - this.maxRows);\n this.runQuery(true);\n }\n }\n \n goToNextPage() {\n if (this.maxRows && this.runResult && this.startRow + this.runResult.RowCount < this.runResult.TotalRowCount) {\n this.startRow += this.maxRows;\n this.runQuery(true);\n }\n }\n \n goToLastPage() {\n if (this.maxRows && this.runResult) {\n const totalPages = Math.ceil(this.runResult.TotalRowCount / this.maxRows);\n this.startRow = (totalPages - 1) * this.maxRows;\n this.runQuery(true);\n }\n }\n}","@if (isVisible) {\n <mj-dialog\n [Visible]=\"true\"\n [Width]=\"900\"\n (Close)=\"close()\">\n <mj-dialog-titlebar>\n <div style=\"display: flex; align-items: center; gap: 8px;\">\n <i class=\"fa-solid fa-play-circle\" style=\"color: var(--mj-brand-primary);\"></i>\n Run Query: {{ query?.Name || 'Untitled' }}\n </div>\n </mj-dialog-titlebar>\n <div style=\"display: flex; flex-direction: column; height: 100%; overflow-y: auto; overflow-x: hidden;\">\n @if (isLoadingParams) {\n <div style=\"display: flex; align-items: center; justify-content: center; padding: 40px;\">\n <i class=\"fa-solid fa-spinner fa-spin\" style=\"font-size: 24px; color: var(--mj-text-muted); margin-right: 12px;\"></i>\n <span style=\"color: var(--mj-text-muted);\">Loading query parameters...</span>\n </div>\n } @else {\n <!-- Query Parameters Section -->\n @if (parameterPairs.length > 0) {\n <mj-accordion-panel\n [(Expanded)]=\"parametersExpanded\"\n style=\"margin-bottom: 16px; flex-shrink: 0;\">\n <ng-template mjAccordionTitle>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-sliders\" style=\"color: var(--mj-text-muted);\"></i>\n Query Parameters\n <span style=\"background: var(--mj-status-info); color: var(--mj-text-inverse); padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n {{ parameterPairs.length }}\n </span>\n </span>\n </ng-template>\n <div style=\"padding: 12px 0;\">\n <div style=\"margin-bottom: 12px; color: var(--mj-text-muted); font-size: 0.85em;\">\n <i class=\"fa-solid fa-info-circle\"></i>\n Configure parameter values for query execution.\n </div>\n <!-- Parameters List -->\n <div style=\"display: flex; flex-direction: column; gap: 16px;\">\n @for (param of parameterPairs; track param.name) {\n <div style=\"background: var(--mj-bg-surface-sunken); border: 1px solid var(--mj-border-default); border-radius: 6px; padding: 16px;\">\n <div style=\"display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px;\">\n <div>\n <label style=\"font-weight: 600; color: var(--mj-text-secondary); display: flex; align-items: center; gap: 6px;\">\n <i class=\"fa-solid fa-at\" style=\"color: var(--mj-brand-primary);\"></i>\n {{ param.name }}\n @if (param.isRequired) {\n <span style=\"color: #dc3545;\">*</span>\n }\n </label>\n @if (param.description) {\n <div style=\"font-size: 0.85em; color: var(--mj-text-muted); margin-top: 4px;\">\n {{ param.description }}\n </div>\n }\n </div>\n <div style=\"display: flex; gap: 8px; align-items: center;\">\n <span class=\"badge\" style=\"background: var(--mj-text-muted); color: white; padding: 2px 6px; border-radius: 4px; font-size: 0.75em;\">\n {{ param.type }}\n </span>\n @if (!isParameterValid(param)) {\n <i class=\"fa-solid fa-exclamation-triangle\" style=\"color: #dc3545;\" title=\"Required parameter is empty\"></i>\n }\n </div>\n </div>\n <!-- Parameter Value Input -->\n @if (param.type === 'number') {\n <input type=\"number\" class=\"mj-input\"\n [(ngModel)]=\"param.value\"\n placeholder=\"Enter number value...\"\n style=\"width: 100%;\" />\n } @else {\n <textarea class=\"mj-input\"\n [(ngModel)]=\"param.value\"\n rows=\"2\"\n placeholder=\"Enter value (JSON, string, or number)...\"\n style=\"width: 100%; font-family: 'Courier New', monospace;\">\n </textarea>\n }\n @if (param.defaultValue) {\n <div style=\"font-size: 0.8em; color: var(--mj-text-muted); margin-top: 4px;\">\n Default: <code style=\"background: var(--mj-bg-surface-sunken); padding: 2px 4px; border-radius: 3px;\">{{ param.defaultValue }}</code>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </mj-accordion-panel>\n } @else {\n <div style=\"padding: 20px; background: var(--mj-bg-surface-sunken); border-radius: 6px; margin-bottom: 16px; text-align: center; color: var(--mj-text-muted);\">\n <i class=\"fa-solid fa-info-circle\"></i> This query has no parameters.\n </div>\n }\n <!-- Pagination Settings -->\n <mj-accordion-panel\n [(Expanded)]=\"paginationExpanded\"\n style=\"margin-bottom: 16px;\">\n <ng-template mjAccordionTitle>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-table-list\" style=\"color: var(--mj-text-muted);\"></i>\n Pagination Settings\n @if (maxRows && maxRows > 0) {\n <span style=\"background: var(--mj-text-muted); color: var(--mj-text-inverse); padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n {{ maxRows }} rows/page\n </span>\n }\n </span>\n </ng-template>\n <div style=\"padding: 12px 0;\">\n <div style=\"display: flex; flex-direction: column; gap: 12px;\">\n <!-- Max Rows -->\n <div style=\"display: flex; align-items: center; gap: 12px;\">\n <label style=\"font-weight: 600; color: var(--mj-text-secondary); white-space: nowrap; min-width: 100px;\">\n <i class=\"fa-solid fa-list-ol\" style=\"color: var(--mj-text-muted); margin-right: 6px;\"></i>\n Max Rows:\n </label>\n <input type=\"number\" class=\"mj-input\"\n [(ngModel)]=\"maxRows\"\n min=\"1\"\n step=\"100\"\n placeholder=\"All rows\"\n style=\"width: 150px;\" />\n <span style=\"font-size: 0.85em; color: var(--mj-text-muted);\">\n Leave empty to return all rows\n </span>\n </div>\n <!-- Start Row -->\n <div style=\"display: flex; align-items: center; gap: 12px;\">\n <label style=\"font-weight: 600; color: var(--mj-text-secondary); white-space: nowrap; min-width: 100px;\">\n <i class=\"fa-solid fa-forward\" style=\"color: var(--mj-text-muted); margin-right: 6px;\"></i>\n Start Row:\n </label>\n <input type=\"number\" class=\"mj-input\"\n [(ngModel)]=\"startRow\"\n min=\"0\"\n step=\"1\"\n placeholder=\"0\"\n style=\"width: 150px;\" />\n <span style=\"font-size: 0.85em; color: var(--mj-text-muted);\">\n 0-based offset for pagination\n </span>\n </div>\n </div>\n </div>\n </mj-accordion-panel>\n <!-- Results Section -->\n @if (runResult) {\n <mj-accordion-panel\n [(Expanded)]=\"resultsExpanded\"\n style=\"flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0;\">\n <ng-template mjAccordionTitle>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n @if (runResult.Success) {\n <i class=\"fa-solid fa-table\" style=\"color: var(--mj-status-success);\"></i>\n Query Results\n <span style=\"background: var(--mj-status-success); color: var(--mj-text-inverse); padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n {{ runResult.RowCount }} rows@if (runResult.TotalRowCount > runResult.RowCount) { of {{ runResult.TotalRowCount }} total}\n </span>\n @if (runResult.ExecutionTime) {\n <span style=\"color: var(--mj-text-muted); font-size: 0.85em; font-weight: normal;\">&mdash; {{ runResult.ExecutionTime }}ms</span>\n }\n } @else {\n <i class=\"fa-solid fa-exclamation-circle\" style=\"color: var(--mj-status-error);\"></i>\n Query Results &mdash; Error\n }\n </span>\n </ng-template>\n <div style=\"flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0;\">\n @if (runResult.Success) {\n @if (resultRows.length > 0) {\n <!-- Export and Pagination Controls -->\n <div style=\"display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid var(--mj-border-default);\">\n <!-- Pagination Info and Controls -->\n <div style=\"display: flex; align-items: center; gap: 12px;\">\n @if (runResult.TotalRowCount > runResult.RowCount || startRow > 0) {\n <span style=\"font-size: 0.9em; color: var(--mj-text-muted);\">\n Showing rows {{ startRow + 1 }} - {{ startRow + runResult.RowCount }} of {{ runResult.TotalRowCount }}\n </span>\n <div style=\"display: flex; gap: 4px;\">\n <button mjButton\n variant=\"flat\"\n [disabled]=\"startRow === 0\"\n (click)=\"goToFirstPage()\"\n title=\"First page\">\n <i class=\"fa-solid fa-angles-left\"></i>\n </button>\n <button mjButton\n variant=\"flat\"\n [disabled]=\"startRow === 0\"\n (click)=\"goToPreviousPage()\"\n title=\"Previous page\">\n <i class=\"fa-solid fa-angle-left\"></i>\n </button>\n <button mjButton\n variant=\"flat\"\n [disabled]=\"startRow + runResult.RowCount >= runResult.TotalRowCount\"\n (click)=\"goToNextPage()\"\n title=\"Next page\">\n <i class=\"fa-solid fa-angle-right\"></i>\n </button>\n <button mjButton\n variant=\"flat\"\n [disabled]=\"startRow + runResult.RowCount >= runResult.TotalRowCount\"\n (click)=\"goToLastPage()\"\n title=\"Last page\">\n <i class=\"fa-solid fa-angles-right\"></i>\n </button>\n </div>\n }\n </div>\n <!-- Export Buttons -->\n <div style=\"display: flex; gap: 8px;\">\n <button mjButton\n variant=\"flat\"\n (click)=\"copyToClipboard()\"\n title=\"Copy to clipboard\">\n <i class=\"fa-solid fa-copy\"></i> Copy\n </button>\n <button mjButton\n variant=\"flat\"\n (click)=\"exportToCSV()\"\n title=\"Export to CSV\">\n <i class=\"fa-solid fa-download\"></i> Export CSV\n </button>\n </div>\n </div>\n <!-- Results Grid -->\n <div class=\"results-table-container\" style=\"flex: 1; overflow: auto; border: 1px solid var(--mj-border-default); border-radius: 4px; min-height: 0;\">\n <table class=\"results-table\" style=\"width: 100%; border-collapse: collapse; font-size: 14px;\">\n <thead style=\"position: sticky; top: 0; background: var(--mj-bg-surface-sunken); z-index: 10;\">\n <tr>\n @for (col of resultColumns; track col.field) {\n <th style=\"padding: 12px 16px; text-align: left; font-weight: 600; color: var(--mj-text-secondary); border-bottom: 2px solid var(--mj-border-default); background: var(--mj-bg-surface-sunken); white-space: nowrap;\">\n {{ col.title }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of resultRows; track $index) {\n <tr style=\"border-bottom: 1px solid var(--mj-border-default); transition: background-color 0.2s;\">\n @for (col of resultColumns; track col.field) {\n <td style=\"padding: 10px 16px; color: var(--mj-text-primary); max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\"\n [title]=\"row[col.field]\">\n {{ row[col.field] || '' }}\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n @if (resultRows.length === 0) {\n <div style=\"padding: 40px; text-align: center; color: var(--mj-text-muted);\">\n <i class=\"fa-solid fa-table\" style=\"font-size: 48px; margin-bottom: 12px; opacity: 0.3;\"></i>\n <p>No data in results</p>\n </div>\n }\n </div>\n } @else {\n <div style=\"display: flex; align-items: center; justify-content: center; height: 200px; color: var(--mj-text-muted);\">\n <i class=\"fa-solid fa-inbox\" style=\"font-size: 48px; margin-bottom: 12px;\"></i>\n <p>No results returned</p>\n </div>\n }\n } @else {\n <div style=\"padding: 20px; background: #f8d7da; border: 1px solid #f5c6cb; border-radius: 6px; margin: 12px;\">\n <div style=\"color: #721c24;\">\n <i class=\"fa-solid fa-exclamation-circle\"></i>\n <strong>Query execution failed</strong>\n </div>\n @if (runResult.ErrorMessage) {\n <div style=\"margin-top: 8px; font-family: 'Courier New', monospace; font-size: 0.9em;\">\n {{ runResult.ErrorMessage }}\n </div>\n }\n </div>\n }\n </div>\n </mj-accordion-panel>\n }\n }\n </div>\n <mj-dialog-actions>\n @if (!runResult) {\n <button mjButton (click)=\"close()\">\n <i class=\"fa-solid fa-times\"></i> Cancel\n </button>\n <button mjButton\n variant=\"primary\"\n [disabled]=\"isRunning || hasInvalidParameters()\"\n (click)=\"runQuery()\">\n @if (isRunning) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Running...\n } @else {\n <i class=\"fa-solid fa-play\"></i> Run Query\n }\n </button>\n } @else {\n <button mjButton (click)=\"close()\">\n <i class=\"fa-solid fa-times\"></i> Close\n </button>\n <button mjButton\n variant=\"primary\"\n [disabled]=\"isRunning\"\n (click)=\"runQuery()\">\n <i class=\"fa-solid fa-refresh\"></i> Run Again\n </button>\n }\n </mj-dialog-actions>\n </mj-dialog>\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { MJTemplateEntity } from '@memberjunction/core-entities';
3
+ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
3
4
  import * as i0 from "@angular/core";
4
5
  export interface ParameterPair {
5
6
  key: string;
@@ -15,7 +16,7 @@ export interface TemplateRunResult {
15
16
  error?: string;
16
17
  executionTimeMs?: number;
17
18
  }
18
- export declare class TemplateParamDialogComponent implements OnInit {
19
+ export declare class TemplateParamDialogComponent extends BaseAngularComponent implements OnInit {
19
20
  template: MJTemplateEntity | null;
20
21
  _isVisible: boolean;
21
22
  get isVisible(): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"template-param-dialog.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/custom/Templates/template-param-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAyB,MAAM,+BAA+B,CAAC;;AAKxF,MAAM,WAAW,aAAa;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,qBAMa,4BAA6B,YAAW,MAAM;IAC9C,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAE3C,UAAU,EAAE,OAAO,CAAS;IACnC,IACI,SAAS,IAAI,OAAO,CAEvB;IACD,IAAI,SAAS,CAAC,KAAK,EAAE,OAAO,EAQ3B;IAES,eAAe,wBAA+B;IAC9C,OAAO,qBAA4B;IAEtC,UAAU,EAAE,aAAa,EAAE,CAAM;IACjC,SAAS,UAAS;IAClB,SAAS,UAAS;IAClB,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAAQ;IAC5C,oBAAoB,UAAS;IAC7B,kBAAkB,UAAQ;IAC1B,mBAAmB,UAAS;IAC5B,eAAe,UAAQ;IAE9B,OAAO,CAAC,sBAAsB,CAA+B;IAE7D,QAAQ;IAMF,kBAAkB;IAwCxB,YAAY;IAQZ,eAAe,CAAC,KAAK,EAAE,MAAM;IAM7B,iBAAiB;IASX,WAAW;IA2GX,oBAAoB;IAgD1B,KAAK;IAML,OAAO,CAAC,gBAAgB;IAcxB,WAAW;IA6BX,IAAI,gBAAgB,IAAI,MAAM,CAY7B;yCA7TQ,4BAA4B;2CAA5B,4BAA4B;CA8TxC"}
1
+ {"version":3,"file":"template-param-dialog.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/custom/Templates/template-param-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAyB,MAAM,+BAA+B,CAAC;AAKxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;AACrE,MAAM,WAAW,aAAa;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,qBAMa,4BAA6B,SAAQ,oBAAqB,YAAW,MAAM;IAC3E,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAE3C,UAAU,EAAE,OAAO,CAAS;IACnC,IACI,SAAS,IAAI,OAAO,CAEvB;IACD,IAAI,SAAS,CAAC,KAAK,EAAE,OAAO,EAQ3B;IAES,eAAe,wBAA+B;IAC9C,OAAO,qBAA4B;IAEtC,UAAU,EAAE,aAAa,EAAE,CAAM;IACjC,SAAS,UAAS;IAClB,SAAS,UAAS;IAClB,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAAQ;IAC5C,oBAAoB,UAAS;IAC7B,kBAAkB,UAAQ;IAC1B,mBAAmB,UAAS;IAC5B,eAAe,UAAQ;IAE9B,OAAO,CAAC,sBAAsB,CAA+B;IAE7D,QAAQ;IAMF,kBAAkB;IAwCxB,YAAY;IAQZ,eAAe,CAAC,KAAK,EAAE,MAAM;IAM7B,iBAAiB;IASX,WAAW;IA2GX,oBAAoB;IAgD1B,KAAK;IAML,OAAO,CAAC,gBAAgB;IAcxB,WAAW;IA6BX,IAAI,gBAAgB,IAAI,MAAM,CAY7B;yCA7TQ,4BAA4B;2CAA5B,4BAA4B;CA8TxC"}
@@ -1,6 +1,7 @@
1
1
  import { Component, Input, Output, EventEmitter } from '@angular/core';
2
- import { Metadata, RunView } from '@memberjunction/core';
2
+ import { RunView } from '@memberjunction/core';
3
3
  import { MJNotificationService } from '@memberjunction/ng-notifications';
4
+ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
4
5
  import * as i0 from "@angular/core";
5
6
  import * as i1 from "@angular/forms";
6
7
  import * as i2 from "@memberjunction/ng-ui-components";
@@ -398,8 +399,9 @@ function TemplateParamDialogComponent_Conditional_0_Template(rf, ctx) { if (rf &
398
399
  i0.ɵɵadvance();
399
400
  i0.ɵɵconditional(ctx_r1.isRunning ? 25 : 26);
400
401
  } }
401
- export class TemplateParamDialogComponent {
402
+ export class TemplateParamDialogComponent extends BaseAngularComponent {
402
403
  constructor() {
404
+ super(...arguments);
403
405
  this.template = null;
404
406
  this._isVisible = false;
405
407
  this.isVisibleChange = new EventEmitter();
@@ -435,7 +437,7 @@ export class TemplateParamDialogComponent {
435
437
  return;
436
438
  this.isLoading = true;
437
439
  try {
438
- const rv = new RunView();
440
+ const rv = RunView.FromMetadataProvider(this.ProviderToUse);
439
441
  const results = await rv.RunView({
440
442
  EntityName: 'MJ: Template Params',
441
443
  ExtraFilter: `TemplateID='${this.template.ID}'`,
@@ -514,7 +516,7 @@ export class TemplateParamDialogComponent {
514
516
  }
515
517
  });
516
518
  // Get GraphQL data provider
517
- const dataProvider = Metadata.Provider;
519
+ const dataProvider = this.ProviderToUse;
518
520
  // Execute the RunTemplate GraphQL mutation
519
521
  const query = `
520
522
  mutation RunTemplate($templateId: String!, $contextData: String) {
@@ -571,7 +573,7 @@ export class TemplateParamDialogComponent {
571
573
  if (newParams.length === 0)
572
574
  return;
573
575
  try {
574
- const md = new Metadata();
576
+ const md = this.ProviderToUse;
575
577
  for (const param of newParams) {
576
578
  const templateParam = await md.GetEntityObject('MJ: Template Params');
577
579
  templateParam.TemplateID = this.template.ID;
@@ -647,8 +649,8 @@ export class TemplateParamDialogComponent {
647
649
  });
648
650
  return JSON.stringify(contextData, null, 2);
649
651
  }
650
- static { this.ɵfac = function TemplateParamDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TemplateParamDialogComponent)(); }; }
651
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TemplateParamDialogComponent, selectors: [["mj-template-param-dialog"]], inputs: { template: "template", isVisible: "isVisible" }, outputs: { isVisibleChange: "isVisibleChange", onClose: "onClose" }, standalone: false, decls: 1, vars: 1, consts: [[3, "Visible", "Width"], [3, "Close", "Visible", "Width"], [1, "dialog-content", 2, "display", "flex", "flex-direction", "column", "height", "100%", "font-family", "'Segoe UI', Tahoma, Geneva, Verdana, sans-serif"], [1, "dlg-header"], [1, "dlg-header-row"], [1, "fa-solid", "fa-sliders"], [1, "required-marker"], [1, "dlg-loading"], [2, "display", "flex", "justify-content", "space-between", "align-items", "center", "width", "100%"], ["mjButton", "", "variant", "outline", 3, "disabled"], [2, "display", "flex", "gap", "8px"], ["mjButton", "", "variant", "outline", 3, "click"], ["mjButton", "", "variant", "outline"], ["mjButton", "", "variant", "primary", 3, "click", "disabled"], [1, "fa-solid", "fa-spinner", "fa-spin"], [2, "margin-bottom", "16px", "flex-shrink", "0", 3, "ExpandedChange", "Expanded"], ["mjAccordionTitle", ""], [2, "padding", "12px 0"], [1, "dlg-info-text"], [1, "fa-solid", "fa-info-circle"], [1, "params-table"], [1, "no-params-state"], [1, "json-preview-box"], [2, "margin-bottom", "16px", "flex", "1", "display", "flex", "flex-direction", "column", 3, "ExpandedChange", "Expanded"], [2, "padding", "12px 0", "flex", "1", "display", "flex", "flex-direction", "column"], [1, "dlg-loading", 2, "flex", "1"], [2, "flex", "1", "display", "flex", "flex-direction", "column"], [1, "no-results-state"], [1, "dlg-panel-title"], [1, "count-badge"], [1, "params-table-header"], [1, "params-table-row"], [1, "add-param-row"], ["mjButton", "", "variant", "success", "size", "sm", 3, "click", "disabled"], [1, "fa-solid", "fa-plus"], [1, "param-name", 2, "display", "flex", "flex-direction", "column"], [2, "display", "flex", "align-items", "center", "gap", "4px", "margin-bottom", "4px"], ["title", "From template definition", 1, "fa-solid", "fa-database", "param-source-icon-template"], ["title", "Custom parameter", 1, "fa-solid", "fa-edit", "param-source-icon-custom"], [1, "param-required-marker"], ["type", "text", "placeholder", "Parameter name...", 1, "mj-input", 2, "font-family", "'Courier New', monospace", "width", "100%", 3, "ngModel", "disabled"], [1, "param-value"], ["placeholder", "Enter value (JSON strings, numbers, objects)...", 1, "mj-textarea", 2, "font-family", "'Courier New', monospace", "font-size", "0.9em", "width", "100%", 3, "ngModelChange", "ngModel", "rows", "disabled"], [1, "param-actions"], ["mjButton", "", "variant", "danger", "size", "sm", "title", "Remove parameter", 3, "disabled"], [1, "param-key-text"], [1, "param-description-text"], [1, "param-type-text"], ["type", "text", "placeholder", "Parameter name...", 1, "mj-input", 2, "font-family", "'Courier New', monospace", "width", "100%", 3, "ngModelChange", "ngModel", "disabled"], ["mjButton", "", "variant", "danger", "size", "sm", "title", "Remove parameter", 3, "click", "disabled"], [1, "fa-solid", "fa-times"], ["mjButton", "", "variant", "primary", "size", "sm", 3, "click", "disabled"], [1, "fa-solid", "fa-code"], [1, "fa-solid", "fa-chart-line"], [1, "result-badge", "success"], [1, "result-badge", "error"], [1, "fa-solid", "fa-check"], [1, "result-stats"], [1, "result-stat"], [1, "result-stat-label"], [1, "result-stat-value"], ["mjButton", "", "variant", "flat", "size", "sm", "title", "Save results to file", 3, "click"], [1, "fa-solid", "fa-download"], [2, "margin-bottom", "12px", "flex", "1", "display", "flex", "flex-direction", "column"], [1, "output-header"], [1, "fa-solid", "fa-check-circle", "success-icon"], [1, "output-box"], [1, "fa-solid", "fa-exclamation-triangle", "error-icon"], [1, "error-output-box"], [2, "text-align", "center"], [1, "fa-solid", "fa-play-circle"], ["mjButton", "", "variant", "outline", 3, "click", "disabled"], [1, "fa-solid", "fa-save"], [1, "fa-solid", "fa-play"]], template: function TemplateParamDialogComponent_Template(rf, ctx) { if (rf & 1) {
652
+ static { this.ɵfac = /*@__PURE__*/ (() => { let ɵTemplateParamDialogComponent_BaseFactory; return function TemplateParamDialogComponent_Factory(__ngFactoryType__) { return (ɵTemplateParamDialogComponent_BaseFactory || (ɵTemplateParamDialogComponent_BaseFactory = i0.ɵɵgetInheritedFactory(TemplateParamDialogComponent)))(__ngFactoryType__ || TemplateParamDialogComponent); }; })(); }
653
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TemplateParamDialogComponent, selectors: [["mj-template-param-dialog"]], inputs: { template: "template", isVisible: "isVisible" }, outputs: { isVisibleChange: "isVisibleChange", onClose: "onClose" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[3, "Visible", "Width"], [3, "Close", "Visible", "Width"], [1, "dialog-content", 2, "display", "flex", "flex-direction", "column", "height", "100%", "font-family", "'Segoe UI', Tahoma, Geneva, Verdana, sans-serif"], [1, "dlg-header"], [1, "dlg-header-row"], [1, "fa-solid", "fa-sliders"], [1, "required-marker"], [1, "dlg-loading"], [2, "display", "flex", "justify-content", "space-between", "align-items", "center", "width", "100%"], ["mjButton", "", "variant", "outline", 3, "disabled"], [2, "display", "flex", "gap", "8px"], ["mjButton", "", "variant", "outline", 3, "click"], ["mjButton", "", "variant", "outline"], ["mjButton", "", "variant", "primary", 3, "click", "disabled"], [1, "fa-solid", "fa-spinner", "fa-spin"], [2, "margin-bottom", "16px", "flex-shrink", "0", 3, "ExpandedChange", "Expanded"], ["mjAccordionTitle", ""], [2, "padding", "12px 0"], [1, "dlg-info-text"], [1, "fa-solid", "fa-info-circle"], [1, "params-table"], [1, "no-params-state"], [1, "json-preview-box"], [2, "margin-bottom", "16px", "flex", "1", "display", "flex", "flex-direction", "column", 3, "ExpandedChange", "Expanded"], [2, "padding", "12px 0", "flex", "1", "display", "flex", "flex-direction", "column"], [1, "dlg-loading", 2, "flex", "1"], [2, "flex", "1", "display", "flex", "flex-direction", "column"], [1, "no-results-state"], [1, "dlg-panel-title"], [1, "count-badge"], [1, "params-table-header"], [1, "params-table-row"], [1, "add-param-row"], ["mjButton", "", "variant", "success", "size", "sm", 3, "click", "disabled"], [1, "fa-solid", "fa-plus"], [1, "param-name", 2, "display", "flex", "flex-direction", "column"], [2, "display", "flex", "align-items", "center", "gap", "4px", "margin-bottom", "4px"], ["title", "From template definition", 1, "fa-solid", "fa-database", "param-source-icon-template"], ["title", "Custom parameter", 1, "fa-solid", "fa-edit", "param-source-icon-custom"], [1, "param-required-marker"], ["type", "text", "placeholder", "Parameter name...", 1, "mj-input", 2, "font-family", "'Courier New', monospace", "width", "100%", 3, "ngModel", "disabled"], [1, "param-value"], ["placeholder", "Enter value (JSON strings, numbers, objects)...", 1, "mj-textarea", 2, "font-family", "'Courier New', monospace", "font-size", "0.9em", "width", "100%", 3, "ngModelChange", "ngModel", "rows", "disabled"], [1, "param-actions"], ["mjButton", "", "variant", "danger", "size", "sm", "title", "Remove parameter", 3, "disabled"], [1, "param-key-text"], [1, "param-description-text"], [1, "param-type-text"], ["type", "text", "placeholder", "Parameter name...", 1, "mj-input", 2, "font-family", "'Courier New', monospace", "width", "100%", 3, "ngModelChange", "ngModel", "disabled"], ["mjButton", "", "variant", "danger", "size", "sm", "title", "Remove parameter", 3, "click", "disabled"], [1, "fa-solid", "fa-times"], ["mjButton", "", "variant", "primary", "size", "sm", 3, "click", "disabled"], [1, "fa-solid", "fa-code"], [1, "fa-solid", "fa-chart-line"], [1, "result-badge", "success"], [1, "result-badge", "error"], [1, "fa-solid", "fa-check"], [1, "result-stats"], [1, "result-stat"], [1, "result-stat-label"], [1, "result-stat-value"], ["mjButton", "", "variant", "flat", "size", "sm", "title", "Save results to file", 3, "click"], [1, "fa-solid", "fa-download"], [2, "margin-bottom", "12px", "flex", "1", "display", "flex", "flex-direction", "column"], [1, "output-header"], [1, "fa-solid", "fa-check-circle", "success-icon"], [1, "output-box"], [1, "fa-solid", "fa-exclamation-triangle", "error-icon"], [1, "error-output-box"], [2, "text-align", "center"], [1, "fa-solid", "fa-play-circle"], ["mjButton", "", "variant", "outline", 3, "click", "disabled"], [1, "fa-solid", "fa-save"], [1, "fa-solid", "fa-play"]], template: function TemplateParamDialogComponent_Template(rf, ctx) { if (rf & 1) {
652
654
  i0.ɵɵconditionalCreate(0, TemplateParamDialogComponent_Conditional_0_Template, 27, 8, "mj-dialog", 0);
653
655
  } if (rf & 2) {
654
656
  i0.ɵɵconditional(ctx._isVisible ? 0 : -1);
@@ -666,5 +668,5 @@ export class TemplateParamDialogComponent {
666
668
  }], onClose: [{
667
669
  type: Output
668
670
  }] }); })();
669
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TemplateParamDialogComponent, { className: "TemplateParamDialogComponent", filePath: "src/lib/custom/Templates/template-param-dialog.component.ts", lineNumber: 29 }); })();
671
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TemplateParamDialogComponent, { className: "TemplateParamDialogComponent", filePath: "src/lib/custom/Templates/template-param-dialog.component.ts", lineNumber: 30 }); })();
670
672
  //# sourceMappingURL=template-param-dialog.component.js.map