@memberjunction/ng-core-entity-forms 2.72.0 → 2.74.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 (57) hide show
  1. package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts.map +1 -1
  2. package/dist/lib/custom/AIAgents/ai-agent-form.component.js +592 -580
  3. package/dist/lib/custom/AIAgents/ai-agent-form.component.js.map +1 -1
  4. package/dist/lib/custom/Queries/query-category-dialog.component.d.ts +33 -0
  5. package/dist/lib/custom/Queries/query-category-dialog.component.d.ts.map +1 -0
  6. package/dist/lib/custom/Queries/query-category-dialog.component.js +241 -0
  7. package/dist/lib/custom/Queries/query-category-dialog.component.js.map +1 -0
  8. package/dist/lib/custom/Queries/query-form.component.d.ts +135 -0
  9. package/dist/lib/custom/Queries/query-form.component.d.ts.map +1 -0
  10. package/dist/lib/custom/Queries/query-form.component.js +1563 -0
  11. package/dist/lib/custom/Queries/query-form.component.js.map +1 -0
  12. package/dist/lib/custom/Queries/query-run-dialog.component.d.ts +66 -0
  13. package/dist/lib/custom/Queries/query-run-dialog.component.d.ts.map +1 -0
  14. package/dist/lib/custom/Queries/query-run-dialog.component.js +788 -0
  15. package/dist/lib/custom/Queries/query-run-dialog.component.js.map +1 -0
  16. package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts +162 -0
  17. package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts.map +1 -0
  18. package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js +2091 -0
  19. package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js.map +1 -0
  20. package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.js +1 -1
  21. package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.js.map +1 -1
  22. package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.d.ts +2 -8
  23. package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.d.ts.map +1 -1
  24. package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.js +122 -128
  25. package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.js.map +1 -1
  26. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.d.ts +6 -1
  27. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.d.ts.map +1 -1
  28. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js +218 -156
  29. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js.map +1 -1
  30. package/dist/lib/custom/custom-forms.module.d.ts +26 -22
  31. package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
  32. package/dist/lib/custom/custom-forms.module.js +23 -3
  33. package/dist/lib/custom/custom-forms.module.js.map +1 -1
  34. package/dist/lib/generated/Entities/Query/query.form.component.js +14 -4
  35. package/dist/lib/generated/Entities/Query/query.form.component.js.map +1 -1
  36. package/dist/lib/generated/Entities/Query/sections/details.component.d.ts.map +1 -1
  37. package/dist/lib/generated/Entities/Query/sections/details.component.js +13 -4
  38. package/dist/lib/generated/Entities/Query/sections/details.component.js.map +1 -1
  39. package/dist/lib/generated/Entities/QueryEntity/sections/details.component.d.ts.map +1 -1
  40. package/dist/lib/generated/Entities/QueryEntity/sections/details.component.js +22 -4
  41. package/dist/lib/generated/Entities/QueryEntity/sections/details.component.js.map +1 -1
  42. package/dist/lib/generated/Entities/QueryField/sections/details.component.d.ts.map +1 -1
  43. package/dist/lib/generated/Entities/QueryField/sections/details.component.js +22 -4
  44. package/dist/lib/generated/Entities/QueryField/sections/details.component.js.map +1 -1
  45. package/dist/lib/generated/Entities/QueryParameter/queryparameter.form.component.d.ts +10 -0
  46. package/dist/lib/generated/Entities/QueryParameter/queryparameter.form.component.d.ts.map +1 -0
  47. package/dist/lib/generated/Entities/QueryParameter/queryparameter.form.component.js +59 -0
  48. package/dist/lib/generated/Entities/QueryParameter/queryparameter.form.component.js.map +1 -0
  49. package/dist/lib/generated/Entities/QueryParameter/sections/details.component.d.ts +11 -0
  50. package/dist/lib/generated/Entities/QueryParameter/sections/details.component.d.ts.map +1 -0
  51. package/dist/lib/generated/Entities/QueryParameter/sections/details.component.js +172 -0
  52. package/dist/lib/generated/Entities/QueryParameter/sections/details.component.js.map +1 -0
  53. package/dist/lib/generated/generated-forms.module.d.ts +265 -263
  54. package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
  55. package/dist/lib/generated/generated-forms.module.js +74 -66
  56. package/dist/lib/generated/generated-forms.module.js.map +1 -1
  57. package/package.json +18 -16
@@ -0,0 +1,788 @@
1
+ import { Component, Input, Output, EventEmitter } from '@angular/core';
2
+ import { MJNotificationService } from '@memberjunction/ng-notifications';
3
+ import { Metadata } from '@memberjunction/core';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@angular/common";
6
+ import * as i2 from "@angular/forms";
7
+ import * as i3 from "@progress/kendo-angular-layout";
8
+ import * as i4 from "@progress/kendo-angular-dialog";
9
+ import * as i5 from "@progress/kendo-angular-inputs";
10
+ import * as i6 from "@progress/kendo-angular-buttons";
11
+ const _forTrack0 = ($index, $item) => $item.name;
12
+ const _forTrack1 = ($index, $item) => $item.field;
13
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_6_Template(rf, ctx) { if (rf & 1) {
14
+ i0.ɵɵelementStart(0, "div", 5);
15
+ i0.ɵɵelement(1, "i", 6);
16
+ i0.ɵɵelementStart(2, "span", 7);
17
+ i0.ɵɵtext(3, "Loading query parameters...");
18
+ i0.ɵɵelementEnd()();
19
+ } }
20
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_ng_template_1_Template(rf, ctx) { if (rf & 1) {
21
+ i0.ɵɵelementStart(0, "span", 27);
22
+ i0.ɵɵelement(1, "i", 28);
23
+ i0.ɵɵtext(2, " Query Parameters ");
24
+ i0.ɵɵelementStart(3, "span", 29);
25
+ i0.ɵɵtext(4);
26
+ i0.ɵɵelementEnd()();
27
+ } if (rf & 2) {
28
+ const ctx_r1 = i0.ɵɵnextContext(4);
29
+ i0.ɵɵadvance(4);
30
+ i0.ɵɵtextInterpolate1(" ", ctx_r1.parameterPairs.length, " ");
31
+ } }
32
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_For_8_Conditional_6_Template(rf, ctx) { if (rf & 1) {
33
+ i0.ɵɵelementStart(0, "span", 33);
34
+ i0.ɵɵtext(1, "*");
35
+ i0.ɵɵelementEnd();
36
+ } }
37
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_For_8_Conditional_7_Template(rf, ctx) { if (rf & 1) {
38
+ i0.ɵɵelementStart(0, "div", 34);
39
+ i0.ɵɵtext(1);
40
+ i0.ɵɵelementEnd();
41
+ } if (rf & 2) {
42
+ const param_r5 = i0.ɵɵnextContext().$implicit;
43
+ i0.ɵɵadvance();
44
+ i0.ɵɵtextInterpolate1(" ", param_r5.description, " ");
45
+ } }
46
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_For_8_Conditional_11_Template(rf, ctx) { if (rf & 1) {
47
+ i0.ɵɵelement(0, "i", 37);
48
+ } }
49
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_For_8_Conditional_12_Template(rf, ctx) { if (rf & 1) {
50
+ const _r6 = i0.ɵɵgetCurrentView();
51
+ i0.ɵɵelementStart(0, "kendo-numerictextbox", 41);
52
+ i0.ɵɵtwoWayListener("ngModelChange", function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_For_8_Conditional_12_Template_kendo_numerictextbox_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r6); const param_r5 = i0.ɵɵnextContext().$implicit; i0.ɵɵtwoWayBindingSet(param_r5.value, $event) || (param_r5.value = $event); return i0.ɵɵresetView($event); });
53
+ i0.ɵɵelementEnd();
54
+ } if (rf & 2) {
55
+ const param_r5 = i0.ɵɵnextContext().$implicit;
56
+ i0.ɵɵtwoWayProperty("ngModel", param_r5.value);
57
+ } }
58
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_For_8_Conditional_13_Template(rf, ctx) { if (rf & 1) {
59
+ const _r7 = i0.ɵɵgetCurrentView();
60
+ i0.ɵɵelementStart(0, "kendo-textarea", 42);
61
+ i0.ɵɵtwoWayListener("ngModelChange", function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_For_8_Conditional_13_Template_kendo_textarea_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r7); const param_r5 = i0.ɵɵnextContext().$implicit; i0.ɵɵtwoWayBindingSet(param_r5.value, $event) || (param_r5.value = $event); return i0.ɵɵresetView($event); });
62
+ i0.ɵɵelementEnd();
63
+ } if (rf & 2) {
64
+ const param_r5 = i0.ɵɵnextContext().$implicit;
65
+ i0.ɵɵtwoWayProperty("ngModel", param_r5.value);
66
+ i0.ɵɵproperty("rows", 2);
67
+ } }
68
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_For_8_Conditional_14_Template(rf, ctx) { if (rf & 1) {
69
+ i0.ɵɵelementStart(0, "div", 40);
70
+ i0.ɵɵtext(1, " Default: ");
71
+ i0.ɵɵelementStart(2, "code", 43);
72
+ i0.ɵɵtext(3);
73
+ i0.ɵɵelementEnd()();
74
+ } if (rf & 2) {
75
+ const param_r5 = i0.ɵɵnextContext().$implicit;
76
+ i0.ɵɵadvance(3);
77
+ i0.ɵɵtextInterpolate(param_r5.defaultValue);
78
+ } }
79
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_For_8_Template(rf, ctx) { if (rf & 1) {
80
+ i0.ɵɵelementStart(0, "div", 26)(1, "div", 30)(2, "div")(3, "label", 31);
81
+ i0.ɵɵelement(4, "i", 32);
82
+ i0.ɵɵtext(5);
83
+ i0.ɵɵtemplate(6, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_For_8_Conditional_6_Template, 2, 0, "span", 33);
84
+ i0.ɵɵelementEnd();
85
+ i0.ɵɵtemplate(7, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_For_8_Conditional_7_Template, 2, 1, "div", 34);
86
+ i0.ɵɵelementEnd();
87
+ i0.ɵɵelementStart(8, "div", 35)(9, "span", 36);
88
+ i0.ɵɵtext(10);
89
+ i0.ɵɵelementEnd();
90
+ i0.ɵɵtemplate(11, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_For_8_Conditional_11_Template, 1, 0, "i", 37);
91
+ i0.ɵɵelementEnd()();
92
+ i0.ɵɵtemplate(12, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_For_8_Conditional_12_Template, 1, 1, "kendo-numerictextbox", 38)(13, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_For_8_Conditional_13_Template, 1, 2, "kendo-textarea", 39)(14, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_For_8_Conditional_14_Template, 4, 1, "div", 40);
93
+ i0.ɵɵelementEnd();
94
+ } if (rf & 2) {
95
+ const param_r5 = ctx.$implicit;
96
+ const ctx_r1 = i0.ɵɵnextContext(4);
97
+ i0.ɵɵadvance(5);
98
+ i0.ɵɵtextInterpolate1(" ", param_r5.name, " ");
99
+ i0.ɵɵadvance();
100
+ i0.ɵɵconditional(param_r5.isRequired ? 6 : -1);
101
+ i0.ɵɵadvance();
102
+ i0.ɵɵconditional(param_r5.description ? 7 : -1);
103
+ i0.ɵɵadvance(3);
104
+ i0.ɵɵtextInterpolate1(" ", param_r5.type, " ");
105
+ i0.ɵɵadvance();
106
+ i0.ɵɵconditional(!ctx_r1.isParameterValid(param_r5) ? 11 : -1);
107
+ i0.ɵɵadvance();
108
+ i0.ɵɵconditional(param_r5.type === "number" ? 12 : 13);
109
+ i0.ɵɵadvance(2);
110
+ i0.ɵɵconditional(param_r5.defaultValue ? 14 : -1);
111
+ } }
112
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_Template(rf, ctx) { if (rf & 1) {
113
+ const _r4 = i0.ɵɵgetCurrentView();
114
+ i0.ɵɵelementStart(0, "kendo-expansionpanel", 22);
115
+ i0.ɵɵtwoWayListener("expandedChange", function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_Template_kendo_expansionpanel_expandedChange_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.parametersExpanded, $event) || (ctx_r1.parametersExpanded = $event); return i0.ɵɵresetView($event); });
116
+ i0.ɵɵtemplate(1, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_ng_template_1_Template, 5, 1, "ng-template", 11);
117
+ i0.ɵɵelementStart(2, "div", 12)(3, "div", 23);
118
+ i0.ɵɵelement(4, "i", 24);
119
+ i0.ɵɵtext(5, " Configure parameter values for query execution. ");
120
+ i0.ɵɵelementEnd();
121
+ i0.ɵɵelementStart(6, "div", 25);
122
+ i0.ɵɵrepeaterCreate(7, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_For_8_Template, 15, 7, "div", 26, _forTrack0);
123
+ i0.ɵɵelementEnd()()();
124
+ } if (rf & 2) {
125
+ const ctx_r1 = i0.ɵɵnextContext(3);
126
+ i0.ɵɵtwoWayProperty("expanded", ctx_r1.parametersExpanded);
127
+ i0.ɵɵadvance(7);
128
+ i0.ɵɵrepeater(ctx_r1.parameterPairs);
129
+ } }
130
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_1_Template(rf, ctx) { if (rf & 1) {
131
+ i0.ɵɵelementStart(0, "div", 9);
132
+ i0.ɵɵelement(1, "i", 24);
133
+ i0.ɵɵtext(2, " This query has no parameters. ");
134
+ i0.ɵɵelementEnd();
135
+ } }
136
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_ng_template_3_Conditional_3_Template(rf, ctx) { if (rf & 1) {
137
+ i0.ɵɵelementStart(0, "span", 45);
138
+ i0.ɵɵtext(1);
139
+ i0.ɵɵelementEnd();
140
+ } if (rf & 2) {
141
+ const ctx_r1 = i0.ɵɵnextContext(4);
142
+ i0.ɵɵadvance();
143
+ i0.ɵɵtextInterpolate1(" ", ctx_r1.maxRows, " rows/page ");
144
+ } }
145
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_ng_template_3_Template(rf, ctx) { if (rf & 1) {
146
+ i0.ɵɵelementStart(0, "span", 27);
147
+ i0.ɵɵelement(1, "i", 44);
148
+ i0.ɵɵtext(2, " Pagination Settings ");
149
+ i0.ɵɵtemplate(3, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_ng_template_3_Conditional_3_Template, 2, 1, "span", 45);
150
+ i0.ɵɵelementEnd();
151
+ } if (rf & 2) {
152
+ const ctx_r1 = i0.ɵɵnextContext(3);
153
+ i0.ɵɵadvance(3);
154
+ i0.ɵɵconditional(ctx_r1.maxRows && ctx_r1.maxRows > 0 ? 3 : -1);
155
+ } }
156
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_ng_template_1_Conditional_3_Conditional_2_Template(rf, ctx) { if (rf & 1) {
157
+ i0.ɵɵelementStart(0, "span", 29);
158
+ i0.ɵɵtext(1);
159
+ i0.ɵɵelementEnd();
160
+ } if (rf & 2) {
161
+ const ctx_r1 = i0.ɵɵnextContext(6);
162
+ i0.ɵɵadvance();
163
+ i0.ɵɵtextInterpolate1(" of ", ctx_r1.runResult.TotalRowCount, " total ");
164
+ } }
165
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_ng_template_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
166
+ i0.ɵɵelementStart(0, "span", 52);
167
+ i0.ɵɵtext(1);
168
+ i0.ɵɵelementEnd();
169
+ i0.ɵɵtemplate(2, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_ng_template_1_Conditional_3_Conditional_2_Template, 2, 1, "span", 29);
170
+ } if (rf & 2) {
171
+ const ctx_r1 = i0.ɵɵnextContext(5);
172
+ i0.ɵɵadvance();
173
+ i0.ɵɵtextInterpolate1(" ", ctx_r1.runResult.RowCount, " rows ");
174
+ i0.ɵɵadvance();
175
+ i0.ɵɵconditional(ctx_r1.runResult.TotalRowCount > ctx_r1.runResult.RowCount ? 2 : -1);
176
+ } }
177
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_ng_template_1_Conditional_4_Template(rf, ctx) { if (rf & 1) {
178
+ i0.ɵɵelementStart(0, "span", 50);
179
+ i0.ɵɵtext(1, " Error ");
180
+ i0.ɵɵelementEnd();
181
+ } }
182
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_ng_template_1_Conditional_5_Template(rf, ctx) { if (rf & 1) {
183
+ i0.ɵɵelementStart(0, "span", 51);
184
+ i0.ɵɵtext(1);
185
+ i0.ɵɵelementEnd();
186
+ } if (rf & 2) {
187
+ const ctx_r1 = i0.ɵɵnextContext(5);
188
+ i0.ɵɵadvance();
189
+ i0.ɵɵtextInterpolate1(" (", ctx_r1.runResult.ExecutionTime, "ms) ");
190
+ } }
191
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_ng_template_1_Template(rf, ctx) { if (rf & 1) {
192
+ i0.ɵɵelementStart(0, "span", 27);
193
+ i0.ɵɵelement(1, "i", 49);
194
+ i0.ɵɵtext(2, " Query Results ");
195
+ i0.ɵɵtemplate(3, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_ng_template_1_Conditional_3_Template, 3, 2)(4, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_ng_template_1_Conditional_4_Template, 2, 0, "span", 50)(5, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_ng_template_1_Conditional_5_Template, 2, 1, "span", 51);
196
+ i0.ɵɵelementEnd();
197
+ } if (rf & 2) {
198
+ const ctx_r1 = i0.ɵɵnextContext(4);
199
+ i0.ɵɵadvance(3);
200
+ i0.ɵɵconditional(ctx_r1.runResult.Success ? 3 : 4);
201
+ i0.ɵɵadvance(2);
202
+ i0.ɵɵconditional(ctx_r1.runResult.ExecutionTime ? 5 : -1);
203
+ } }
204
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
205
+ const _r10 = i0.ɵɵgetCurrentView();
206
+ i0.ɵɵelementStart(0, "span", 66);
207
+ i0.ɵɵtext(1);
208
+ i0.ɵɵelementEnd();
209
+ i0.ɵɵelementStart(2, "div", 67)(3, "button", 68);
210
+ i0.ɵɵlistener("click", function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_0_Conditional_2_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(6); return i0.ɵɵresetView(ctx_r1.goToFirstPage()); });
211
+ i0.ɵɵelement(4, "i", 69);
212
+ i0.ɵɵelementEnd();
213
+ i0.ɵɵelementStart(5, "button", 70);
214
+ i0.ɵɵlistener("click", function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_0_Conditional_2_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(6); return i0.ɵɵresetView(ctx_r1.goToPreviousPage()); });
215
+ i0.ɵɵelement(6, "i", 71);
216
+ i0.ɵɵelementEnd();
217
+ i0.ɵɵelementStart(7, "button", 72);
218
+ i0.ɵɵlistener("click", function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_0_Conditional_2_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(6); return i0.ɵɵresetView(ctx_r1.goToNextPage()); });
219
+ i0.ɵɵelement(8, "i", 73);
220
+ i0.ɵɵelementEnd();
221
+ i0.ɵɵelementStart(9, "button", 74);
222
+ i0.ɵɵlistener("click", function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_0_Conditional_2_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(6); return i0.ɵɵresetView(ctx_r1.goToLastPage()); });
223
+ i0.ɵɵelement(10, "i", 75);
224
+ i0.ɵɵelementEnd()();
225
+ } if (rf & 2) {
226
+ const ctx_r1 = i0.ɵɵnextContext(6);
227
+ i0.ɵɵadvance();
228
+ i0.ɵɵtextInterpolate3(" Showing rows ", ctx_r1.startRow + 1, " - ", ctx_r1.startRow + ctx_r1.runResult.RowCount, " of ", ctx_r1.runResult.TotalRowCount, " ");
229
+ i0.ɵɵadvance(2);
230
+ i0.ɵɵproperty("disabled", ctx_r1.startRow === 0);
231
+ i0.ɵɵadvance(2);
232
+ i0.ɵɵproperty("disabled", ctx_r1.startRow === 0);
233
+ i0.ɵɵadvance(2);
234
+ i0.ɵɵproperty("disabled", ctx_r1.startRow + ctx_r1.runResult.RowCount >= ctx_r1.runResult.TotalRowCount);
235
+ i0.ɵɵadvance(2);
236
+ i0.ɵɵproperty("disabled", ctx_r1.startRow + ctx_r1.runResult.RowCount >= ctx_r1.runResult.TotalRowCount);
237
+ } }
238
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_0_For_15_Template(rf, ctx) { if (rf & 1) {
239
+ i0.ɵɵelementStart(0, "th", 63);
240
+ i0.ɵɵtext(1);
241
+ i0.ɵɵelementEnd();
242
+ } if (rf & 2) {
243
+ const col_r11 = ctx.$implicit;
244
+ i0.ɵɵadvance();
245
+ i0.ɵɵtextInterpolate1(" ", col_r11.title, " ");
246
+ } }
247
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_0_For_18_For_2_Template(rf, ctx) { if (rf & 1) {
248
+ i0.ɵɵelementStart(0, "td", 76);
249
+ i0.ɵɵtext(1);
250
+ i0.ɵɵelementEnd();
251
+ } if (rf & 2) {
252
+ const col_r12 = ctx.$implicit;
253
+ const row_r13 = i0.ɵɵnextContext().$implicit;
254
+ i0.ɵɵproperty("title", row_r13[col_r12.field]);
255
+ i0.ɵɵadvance();
256
+ i0.ɵɵtextInterpolate1(" ", row_r13[col_r12.field] || "", " ");
257
+ } }
258
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_0_For_18_Template(rf, ctx) { if (rf & 1) {
259
+ i0.ɵɵelementStart(0, "tr", 64);
260
+ i0.ɵɵrepeaterCreate(1, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_0_For_18_For_2_Template, 2, 2, "td", 76, _forTrack1);
261
+ i0.ɵɵelementEnd();
262
+ } if (rf & 2) {
263
+ const ctx_r1 = i0.ɵɵnextContext(6);
264
+ i0.ɵɵadvance();
265
+ i0.ɵɵrepeater(ctx_r1.resultColumns);
266
+ } }
267
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_0_Conditional_19_Template(rf, ctx) { if (rf & 1) {
268
+ i0.ɵɵelementStart(0, "div", 65);
269
+ i0.ɵɵelement(1, "i", 77);
270
+ i0.ɵɵelementStart(2, "p");
271
+ i0.ɵɵtext(3, "No data in results");
272
+ i0.ɵɵelementEnd()();
273
+ } }
274
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_0_Template(rf, ctx) { if (rf & 1) {
275
+ const _r9 = i0.ɵɵgetCurrentView();
276
+ i0.ɵɵelementStart(0, "div", 54)(1, "div", 14);
277
+ i0.ɵɵtemplate(2, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_0_Conditional_2_Template, 11, 7);
278
+ i0.ɵɵelementEnd();
279
+ i0.ɵɵelementStart(3, "div", 55)(4, "button", 56);
280
+ i0.ɵɵlistener("click", function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_0_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.copyToClipboard()); });
281
+ i0.ɵɵelement(5, "i", 57);
282
+ i0.ɵɵtext(6, " Copy ");
283
+ i0.ɵɵelementEnd();
284
+ i0.ɵɵelementStart(7, "button", 58);
285
+ i0.ɵɵlistener("click", function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_0_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.exportToCSV()); });
286
+ i0.ɵɵelement(8, "i", 59);
287
+ i0.ɵɵtext(9, " Export CSV ");
288
+ i0.ɵɵelementEnd()()();
289
+ i0.ɵɵelementStart(10, "div", 60)(11, "table", 61)(12, "thead", 62)(13, "tr");
290
+ i0.ɵɵrepeaterCreate(14, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_0_For_15_Template, 2, 1, "th", 63, _forTrack1);
291
+ i0.ɵɵelementEnd()();
292
+ i0.ɵɵelementStart(16, "tbody");
293
+ i0.ɵɵrepeaterCreate(17, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_0_For_18_Template, 3, 0, "tr", 64, i0.ɵɵrepeaterTrackByIndex);
294
+ i0.ɵɵelementEnd()();
295
+ i0.ɵɵtemplate(19, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_0_Conditional_19_Template, 4, 0, "div", 65);
296
+ i0.ɵɵelementEnd();
297
+ } if (rf & 2) {
298
+ const ctx_r1 = i0.ɵɵnextContext(5);
299
+ i0.ɵɵadvance(2);
300
+ i0.ɵɵconditional(ctx_r1.runResult.TotalRowCount > ctx_r1.runResult.RowCount || ctx_r1.startRow > 0 ? 2 : -1);
301
+ i0.ɵɵadvance(12);
302
+ i0.ɵɵrepeater(ctx_r1.resultColumns);
303
+ i0.ɵɵadvance(3);
304
+ i0.ɵɵrepeater(ctx_r1.resultRows);
305
+ i0.ɵɵadvance(2);
306
+ i0.ɵɵconditional(ctx_r1.resultRows.length === 0 ? 19 : -1);
307
+ } }
308
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_1_Template(rf, ctx) { if (rf & 1) {
309
+ i0.ɵɵelementStart(0, "div", 53);
310
+ i0.ɵɵelement(1, "i", 78);
311
+ i0.ɵɵelementStart(2, "p");
312
+ i0.ɵɵtext(3, "No results returned");
313
+ i0.ɵɵelementEnd()();
314
+ } }
315
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Template(rf, ctx) { if (rf & 1) {
316
+ i0.ɵɵtemplate(0, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_0_Template, 20, 2)(1, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Conditional_1_Template, 4, 0, "div", 53);
317
+ } if (rf & 2) {
318
+ const ctx_r1 = i0.ɵɵnextContext(4);
319
+ i0.ɵɵconditional(ctx_r1.resultRows.length > 0 ? 0 : 1);
320
+ } }
321
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_4_Conditional_5_Template(rf, ctx) { if (rf & 1) {
322
+ i0.ɵɵelementStart(0, "div", 81);
323
+ i0.ɵɵtext(1);
324
+ i0.ɵɵelementEnd();
325
+ } if (rf & 2) {
326
+ const ctx_r1 = i0.ɵɵnextContext(5);
327
+ i0.ɵɵadvance();
328
+ i0.ɵɵtextInterpolate1(" ", ctx_r1.runResult.ErrorMessage, " ");
329
+ } }
330
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_4_Template(rf, ctx) { if (rf & 1) {
331
+ i0.ɵɵelementStart(0, "div", 48)(1, "div", 79);
332
+ i0.ɵɵelement(2, "i", 80);
333
+ i0.ɵɵelementStart(3, "strong");
334
+ i0.ɵɵtext(4, "Query execution failed");
335
+ i0.ɵɵelementEnd()();
336
+ i0.ɵɵtemplate(5, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_4_Conditional_5_Template, 2, 1, "div", 81);
337
+ i0.ɵɵelementEnd();
338
+ } if (rf & 2) {
339
+ const ctx_r1 = i0.ɵɵnextContext(4);
340
+ i0.ɵɵadvance(5);
341
+ i0.ɵɵconditional(ctx_r1.runResult.ErrorMessage ? 5 : -1);
342
+ } }
343
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Template(rf, ctx) { if (rf & 1) {
344
+ const _r8 = i0.ɵɵgetCurrentView();
345
+ i0.ɵɵelementStart(0, "kendo-expansionpanel", 46);
346
+ i0.ɵɵtwoWayListener("expandedChange", function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Template_kendo_expansionpanel_expandedChange_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.resultsExpanded, $event) || (ctx_r1.resultsExpanded = $event); return i0.ɵɵresetView($event); });
347
+ i0.ɵɵtemplate(1, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_ng_template_1_Template, 6, 2, "ng-template", 11);
348
+ i0.ɵɵelementStart(2, "div", 47);
349
+ i0.ɵɵtemplate(3, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_3_Template, 2, 1)(4, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Conditional_4_Template, 6, 1, "div", 48);
350
+ i0.ɵɵelementEnd()();
351
+ } if (rf & 2) {
352
+ const ctx_r1 = i0.ɵɵnextContext(3);
353
+ i0.ɵɵtwoWayProperty("expanded", ctx_r1.resultsExpanded);
354
+ i0.ɵɵadvance(3);
355
+ i0.ɵɵconditional(ctx_r1.runResult.Success ? 3 : 4);
356
+ } }
357
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Template(rf, ctx) { if (rf & 1) {
358
+ const _r3 = i0.ɵɵgetCurrentView();
359
+ i0.ɵɵtemplate(0, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_0_Template, 9, 1, "kendo-expansionpanel", 8)(1, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_1_Template, 3, 0, "div", 9);
360
+ i0.ɵɵelementStart(2, "kendo-expansionpanel", 10);
361
+ i0.ɵɵtwoWayListener("expandedChange", function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Template_kendo_expansionpanel_expandedChange_2_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.paginationExpanded, $event) || (ctx_r1.paginationExpanded = $event); return i0.ɵɵresetView($event); });
362
+ i0.ɵɵtemplate(3, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_ng_template_3_Template, 4, 1, "ng-template", 11);
363
+ i0.ɵɵelementStart(4, "div", 12)(5, "div", 13)(6, "div", 14)(7, "label", 15);
364
+ i0.ɵɵelement(8, "i", 16);
365
+ i0.ɵɵtext(9, " Max Rows: ");
366
+ i0.ɵɵelementEnd();
367
+ i0.ɵɵelementStart(10, "kendo-numerictextbox", 17);
368
+ i0.ɵɵtwoWayListener("ngModelChange", function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Template_kendo_numerictextbox_ngModelChange_10_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.maxRows, $event) || (ctx_r1.maxRows = $event); return i0.ɵɵresetView($event); });
369
+ i0.ɵɵelementEnd();
370
+ i0.ɵɵelementStart(11, "span", 18);
371
+ i0.ɵɵtext(12, " Leave empty to return all rows ");
372
+ i0.ɵɵelementEnd()();
373
+ i0.ɵɵelementStart(13, "div", 14)(14, "label", 15);
374
+ i0.ɵɵelement(15, "i", 19);
375
+ i0.ɵɵtext(16, " Start Row: ");
376
+ i0.ɵɵelementEnd();
377
+ i0.ɵɵelementStart(17, "kendo-numerictextbox", 20);
378
+ i0.ɵɵtwoWayListener("ngModelChange", function QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Template_kendo_numerictextbox_ngModelChange_17_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.startRow, $event) || (ctx_r1.startRow = $event); return i0.ɵɵresetView($event); });
379
+ i0.ɵɵelementEnd();
380
+ i0.ɵɵelementStart(18, "span", 18);
381
+ i0.ɵɵtext(19, " 0-based offset for pagination ");
382
+ i0.ɵɵelementEnd()()()()();
383
+ i0.ɵɵtemplate(20, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Conditional_20_Template, 5, 2, "kendo-expansionpanel", 21);
384
+ } if (rf & 2) {
385
+ const ctx_r1 = i0.ɵɵnextContext(2);
386
+ i0.ɵɵconditional(ctx_r1.parameterPairs.length > 0 ? 0 : 1);
387
+ i0.ɵɵadvance(2);
388
+ i0.ɵɵtwoWayProperty("expanded", ctx_r1.paginationExpanded);
389
+ i0.ɵɵadvance(8);
390
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r1.maxRows);
391
+ i0.ɵɵproperty("min", 1)("step", 100);
392
+ i0.ɵɵadvance(7);
393
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r1.startRow);
394
+ i0.ɵɵproperty("min", 0)("step", 1);
395
+ i0.ɵɵadvance(3);
396
+ i0.ɵɵconditional(ctx_r1.runResult ? 20 : -1);
397
+ } }
398
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_9_Conditional_4_Template(rf, ctx) { if (rf & 1) {
399
+ i0.ɵɵelement(0, "i", 85);
400
+ i0.ɵɵtext(1, " Running... ");
401
+ } }
402
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_9_Conditional_5_Template(rf, ctx) { if (rf & 1) {
403
+ i0.ɵɵelement(0, "i", 86);
404
+ i0.ɵɵtext(1, " Run Query ");
405
+ } }
406
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_9_Template(rf, ctx) { if (rf & 1) {
407
+ const _r14 = i0.ɵɵgetCurrentView();
408
+ i0.ɵɵelementStart(0, "button", 82);
409
+ i0.ɵɵlistener("click", function QueryRunDialogComponent_kendo_dialog_0_Conditional_9_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.close()); });
410
+ i0.ɵɵelement(1, "i", 83);
411
+ i0.ɵɵtext(2, " Cancel ");
412
+ i0.ɵɵelementEnd();
413
+ i0.ɵɵelementStart(3, "button", 84);
414
+ i0.ɵɵlistener("click", function QueryRunDialogComponent_kendo_dialog_0_Conditional_9_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.runQuery()); });
415
+ i0.ɵɵtemplate(4, QueryRunDialogComponent_kendo_dialog_0_Conditional_9_Conditional_4_Template, 2, 0)(5, QueryRunDialogComponent_kendo_dialog_0_Conditional_9_Conditional_5_Template, 2, 0);
416
+ i0.ɵɵelementEnd();
417
+ } if (rf & 2) {
418
+ const ctx_r1 = i0.ɵɵnextContext(2);
419
+ i0.ɵɵadvance(3);
420
+ i0.ɵɵproperty("themeColor", "primary")("disabled", ctx_r1.isRunning || ctx_r1.hasInvalidParameters());
421
+ i0.ɵɵadvance();
422
+ i0.ɵɵconditional(ctx_r1.isRunning ? 4 : 5);
423
+ } }
424
+ function QueryRunDialogComponent_kendo_dialog_0_Conditional_10_Template(rf, ctx) { if (rf & 1) {
425
+ const _r15 = i0.ɵɵgetCurrentView();
426
+ i0.ɵɵelementStart(0, "button", 82);
427
+ i0.ɵɵlistener("click", function QueryRunDialogComponent_kendo_dialog_0_Conditional_10_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.close()); });
428
+ i0.ɵɵelement(1, "i", 83);
429
+ i0.ɵɵtext(2, " Close ");
430
+ i0.ɵɵelementEnd();
431
+ i0.ɵɵelementStart(3, "button", 84);
432
+ i0.ɵɵlistener("click", function QueryRunDialogComponent_kendo_dialog_0_Conditional_10_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.runQuery()); });
433
+ i0.ɵɵelement(4, "i", 87);
434
+ i0.ɵɵtext(5, " Run Again ");
435
+ i0.ɵɵelementEnd();
436
+ } if (rf & 2) {
437
+ const ctx_r1 = i0.ɵɵnextContext(2);
438
+ i0.ɵɵadvance(3);
439
+ i0.ɵɵproperty("themeColor", "primary")("disabled", ctx_r1.isRunning);
440
+ } }
441
+ function QueryRunDialogComponent_kendo_dialog_0_Template(rf, ctx) { if (rf & 1) {
442
+ const _r1 = i0.ɵɵgetCurrentView();
443
+ i0.ɵɵelementStart(0, "kendo-dialog", 1);
444
+ i0.ɵɵlistener("close", function QueryRunDialogComponent_kendo_dialog_0_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.close()); });
445
+ i0.ɵɵelementStart(1, "kendo-dialog-titlebar")(2, "div", 2);
446
+ i0.ɵɵelement(3, "i", 3);
447
+ i0.ɵɵtext(4);
448
+ i0.ɵɵelementEnd()();
449
+ i0.ɵɵelementStart(5, "div", 4);
450
+ i0.ɵɵtemplate(6, QueryRunDialogComponent_kendo_dialog_0_Conditional_6_Template, 4, 0, "div", 5)(7, QueryRunDialogComponent_kendo_dialog_0_Conditional_7_Template, 21, 9);
451
+ i0.ɵɵelementEnd();
452
+ i0.ɵɵelementStart(8, "kendo-dialog-actions");
453
+ i0.ɵɵtemplate(9, QueryRunDialogComponent_kendo_dialog_0_Conditional_9_Template, 6, 3)(10, QueryRunDialogComponent_kendo_dialog_0_Conditional_10_Template, 6, 2);
454
+ i0.ɵɵelementEnd()();
455
+ } if (rf & 2) {
456
+ const ctx_r1 = i0.ɵɵnextContext();
457
+ i0.ɵɵproperty("width", 900)("height", 800);
458
+ i0.ɵɵadvance(4);
459
+ i0.ɵɵtextInterpolate1(" Run Query: ", (ctx_r1.query == null ? null : ctx_r1.query.Name) || "Untitled", " ");
460
+ i0.ɵɵadvance(2);
461
+ i0.ɵɵconditional(ctx_r1.isLoadingParams ? 6 : 7);
462
+ i0.ɵɵadvance(3);
463
+ i0.ɵɵconditional(!ctx_r1.runResult ? 9 : 10);
464
+ } }
465
+ export class QueryRunDialogComponent {
466
+ constructor() {
467
+ this.query = null;
468
+ this.parameters = [];
469
+ this.isVisible = false;
470
+ this.isVisibleChange = new EventEmitter();
471
+ this.onClose = new EventEmitter();
472
+ this.isRunning = false;
473
+ this.isLoadingParams = false;
474
+ this.parameterPairs = [];
475
+ this.parametersExpanded = true;
476
+ this.resultsExpanded = true;
477
+ this.paginationExpanded = false;
478
+ this.runResult = null;
479
+ this.resultColumns = [];
480
+ this.resultRows = [];
481
+ this.selectedRows = [];
482
+ this.maxRows = null;
483
+ this.startRow = 0;
484
+ }
485
+ ngOnInit() {
486
+ this.initializeParameters();
487
+ }
488
+ ngOnChanges(changes) {
489
+ if (changes['isVisible'] && changes['isVisible'].currentValue) {
490
+ this.initializeParameters();
491
+ }
492
+ if (changes['parameters']) {
493
+ this.initializeParameters();
494
+ }
495
+ }
496
+ initializeParameters() {
497
+ if (!this.query || !this.parameters)
498
+ return;
499
+ // Create parameter pairs from defined query parameters only
500
+ this.parameterPairs = this.parameters.map(param => ({
501
+ name: param.Name,
502
+ value: param.DefaultValue || '',
503
+ type: param.Type || 'string',
504
+ defaultValue: param.DefaultValue || '',
505
+ description: param.Description || '',
506
+ isRequired: param.IsRequired || false
507
+ }));
508
+ }
509
+ getValueListOptions(valueList) {
510
+ if (!valueList)
511
+ return [];
512
+ try {
513
+ const options = valueList.split(',').map(v => v.trim());
514
+ return options.map(opt => ({ text: opt, value: opt }));
515
+ }
516
+ catch {
517
+ return [];
518
+ }
519
+ }
520
+ isParameterValid(param) {
521
+ if (param.isRequired && !param.value) {
522
+ return false;
523
+ }
524
+ // Additional type-specific validation could go here
525
+ if (param.type === 'number' && param.value) {
526
+ return !isNaN(Number(param.value));
527
+ }
528
+ return true;
529
+ }
530
+ async runQuery(isPaginationRequest = false) {
531
+ if (!this.query?.ID)
532
+ return;
533
+ // Validate required parameters
534
+ const invalidParams = this.parameterPairs.filter(p => p.isRequired && !p.value);
535
+ if (invalidParams.length > 0) {
536
+ MJNotificationService.Instance.CreateSimpleNotification(`Required parameters missing: ${invalidParams.map(p => p.name).join(', ')}`, 'warning', 3000);
537
+ return;
538
+ }
539
+ this.isRunning = true;
540
+ this.runResult = null;
541
+ try {
542
+ // Build parameters object
543
+ const queryParameters = {};
544
+ this.parameterPairs.forEach(param => {
545
+ if (param.value) {
546
+ try {
547
+ // Try to parse as JSON first, fallback to string
548
+ queryParameters[param.name] = JSON.parse(param.value);
549
+ }
550
+ catch {
551
+ // If JSON parsing fails, treat as string or number based on type
552
+ if (param.type === 'number') {
553
+ queryParameters[param.name] = Number(param.value);
554
+ }
555
+ else {
556
+ queryParameters[param.name] = param.value;
557
+ }
558
+ }
559
+ }
560
+ });
561
+ // Get GraphQL data provider
562
+ const dataProvider = Metadata.Provider;
563
+ // Execute the GetQueryData GraphQL query
564
+ const query = `
565
+ query GetQueryData($QueryID: String!, $Parameters: JSONObject, $MaxRows: Int, $StartRow: Int) {
566
+ GetQueryData(QueryID: $QueryID, Parameters: $Parameters, MaxRows: $MaxRows, StartRow: $StartRow) {
567
+ QueryID
568
+ QueryName
569
+ Success
570
+ Results
571
+ ErrorMessage
572
+ RowCount
573
+ TotalRowCount
574
+ ExecutionTime
575
+ AppliedParameters
576
+ }
577
+ }
578
+ `;
579
+ const variables = {
580
+ QueryID: this.query.ID,
581
+ Parameters: queryParameters
582
+ };
583
+ // Only include MaxRows if it's set
584
+ if (this.maxRows && this.maxRows > 0) {
585
+ variables.MaxRows = this.maxRows;
586
+ }
587
+ // Only include StartRow if it's set and greater than 0
588
+ if (this.startRow && this.startRow > 0) {
589
+ variables.StartRow = this.startRow;
590
+ }
591
+ console.log('Executing query with variables:', variables);
592
+ const response = await dataProvider.ExecuteGQL(query, variables);
593
+ if (response?.GetQueryData) {
594
+ this.runResult = response.GetQueryData;
595
+ if (this.runResult.Success && this.runResult.Results) {
596
+ // Parse the JSON string results
597
+ try {
598
+ const parsedResults = JSON.parse(this.runResult.Results);
599
+ this.processResults(parsedResults);
600
+ // Only show notification on first run (not pagination)
601
+ if (!isPaginationRequest) {
602
+ const rowCountMsg = this.runResult.TotalRowCount > this.runResult.RowCount
603
+ ? `Query executed successfully. Showing ${this.runResult.RowCount} of ${this.runResult.TotalRowCount} total rows.`
604
+ : `Query executed successfully. ${this.runResult.RowCount} rows returned.`;
605
+ MJNotificationService.Instance.CreateSimpleNotification(rowCountMsg, 'success', 3000);
606
+ }
607
+ // Automatically expand results and collapse other sections
608
+ this.parametersExpanded = false;
609
+ this.paginationExpanded = false;
610
+ this.resultsExpanded = true;
611
+ }
612
+ catch (error) {
613
+ console.error('Error parsing results:', error);
614
+ MJNotificationService.Instance.CreateSimpleNotification('Failed to parse query results', 'error', 3000);
615
+ }
616
+ }
617
+ else {
618
+ console.error('Query execution failed:', this.runResult);
619
+ MJNotificationService.Instance.CreateSimpleNotification(this.runResult?.ErrorMessage || 'Query execution failed', 'error', 3000);
620
+ // Expand results section to show error
621
+ this.parametersExpanded = false;
622
+ this.paginationExpanded = false;
623
+ this.resultsExpanded = true;
624
+ }
625
+ }
626
+ else {
627
+ throw new Error('No response from server');
628
+ }
629
+ }
630
+ catch (error) {
631
+ console.error('Error running query:', error);
632
+ this.runResult = {
633
+ QueryID: this.query.ID,
634
+ QueryName: this.query.Name,
635
+ Success: false,
636
+ Results: '[]',
637
+ ErrorMessage: error instanceof Error ? error.message : 'Unknown error occurred',
638
+ RowCount: 0,
639
+ TotalRowCount: 0,
640
+ ExecutionTime: 0
641
+ };
642
+ MJNotificationService.Instance.CreateSimpleNotification('Failed to execute query. Please check your parameters and try again.', 'error', 3000);
643
+ }
644
+ finally {
645
+ this.isRunning = false;
646
+ }
647
+ }
648
+ processResults(results) {
649
+ if (!results || results.length === 0) {
650
+ this.resultColumns = [];
651
+ this.resultRows = [];
652
+ return;
653
+ }
654
+ // Extract columns from first row
655
+ const firstRow = results[0];
656
+ this.resultColumns = Object.keys(firstRow).map(key => ({
657
+ field: key,
658
+ title: this.formatColumnTitle(key),
659
+ width: this.calculateColumnWidth(key, results)
660
+ }));
661
+ // Set rows
662
+ this.resultRows = results;
663
+ }
664
+ formatColumnTitle(field) {
665
+ // Convert camelCase or snake_case to Title Case
666
+ return field
667
+ .replace(/([A-Z])/g, ' $1')
668
+ .replace(/_/g, ' ')
669
+ .replace(/^\s+/, '')
670
+ .split(' ')
671
+ .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
672
+ .join(' ');
673
+ }
674
+ calculateColumnWidth(field, data) {
675
+ // Calculate appropriate column width based on content
676
+ const maxLength = Math.max(field.length, ...data.slice(0, 10).map(row => String(row[field] || '').length));
677
+ return Math.min(Math.max(maxLength * 10, 100), 300);
678
+ }
679
+ exportToCSV() {
680
+ if (!this.resultRows || this.resultRows.length === 0) {
681
+ MJNotificationService.Instance.CreateSimpleNotification('No data to export', 'warning', 3000);
682
+ return;
683
+ }
684
+ // Create CSV content
685
+ const headers = this.resultColumns.map(col => col.title).join(',');
686
+ const rows = this.resultRows.map(row => this.resultColumns.map(col => {
687
+ const value = row[col.field];
688
+ // Escape values containing commas or quotes
689
+ if (typeof value === 'string' && (value.includes(',') || value.includes('"'))) {
690
+ return `"${value.replace(/"/g, '""')}"`;
691
+ }
692
+ return value;
693
+ }).join(','));
694
+ const csv = [headers, ...rows].join('\n');
695
+ // Create and download file
696
+ const blob = new Blob([csv], { type: 'text/csv' });
697
+ const url = window.URL.createObjectURL(blob);
698
+ const a = document.createElement('a');
699
+ a.href = url;
700
+ a.download = `${this.query?.Name || 'query'}_results_${new Date().toISOString().slice(0, 10)}.csv`;
701
+ document.body.appendChild(a);
702
+ a.click();
703
+ document.body.removeChild(a);
704
+ window.URL.revokeObjectURL(url);
705
+ MJNotificationService.Instance.CreateSimpleNotification('Results exported to CSV', 'success', 3000);
706
+ }
707
+ async copyToClipboard() {
708
+ if (!this.resultRows || this.resultRows.length === 0) {
709
+ MJNotificationService.Instance.CreateSimpleNotification('No data to copy', 'warning', 3000);
710
+ return;
711
+ }
712
+ try {
713
+ // Create tab-delimited content for pasting into Excel
714
+ const headers = this.resultColumns.map(col => col.title).join('\t');
715
+ const rows = this.resultRows.map(row => this.resultColumns.map(col => row[col.field] || '').join('\t'));
716
+ const content = [headers, ...rows].join('\n');
717
+ await navigator.clipboard.writeText(content);
718
+ MJNotificationService.Instance.CreateSimpleNotification('Results copied to clipboard', 'success', 3000);
719
+ }
720
+ catch (error) {
721
+ console.error('Failed to copy to clipboard:', error);
722
+ MJNotificationService.Instance.CreateSimpleNotification('Failed to copy to clipboard', 'error', 3000);
723
+ }
724
+ }
725
+ close() {
726
+ this.isVisible = false;
727
+ this.isVisibleChange.emit(false);
728
+ this.onClose.emit();
729
+ // Reset state
730
+ this.runResult = null;
731
+ this.resultColumns = [];
732
+ this.resultRows = [];
733
+ this.selectedRows = [];
734
+ this.startRow = 0;
735
+ }
736
+ getAppliedParametersCount() {
737
+ return this.parameterPairs.filter(p => p.value).length;
738
+ }
739
+ hasInvalidParameters() {
740
+ return this.parameterPairs.some(p => !this.isParameterValid(p));
741
+ }
742
+ // Pagination methods
743
+ goToFirstPage() {
744
+ this.startRow = 0;
745
+ this.runQuery(true);
746
+ }
747
+ goToPreviousPage() {
748
+ if (this.startRow > 0 && this.maxRows) {
749
+ this.startRow = Math.max(0, this.startRow - this.maxRows);
750
+ this.runQuery(true);
751
+ }
752
+ }
753
+ goToNextPage() {
754
+ if (this.maxRows && this.runResult && this.startRow + this.runResult.RowCount < this.runResult.TotalRowCount) {
755
+ this.startRow += this.maxRows;
756
+ this.runQuery(true);
757
+ }
758
+ }
759
+ goToLastPage() {
760
+ if (this.maxRows && this.runResult) {
761
+ const totalPages = Math.ceil(this.runResult.TotalRowCount / this.maxRows);
762
+ this.startRow = (totalPages - 1) * this.maxRows;
763
+ this.runQuery(true);
764
+ }
765
+ }
766
+ static { this.ɵfac = function QueryRunDialogComponent_Factory(t) { return new (t || QueryRunDialogComponent)(); }; }
767
+ 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" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[3, "width", "height", "close", 4, "ngIf"], [3, "close", "width", "height"], [2, "display", "flex", "align-items", "center", "gap", "8px"], [1, "fa-solid", "fa-play-circle", 2, "color", "#007bff"], [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", "#6c757d", "margin-right", "12px"], [2, "color", "#6c757d"], [2, "margin-bottom", "16px", "flex-shrink", "0", 3, "expanded"], [2, "padding", "20px", "background", "#f8f9fa", "border-radius", "6px", "margin-bottom", "16px", "text-align", "center", "color", "#6c757d"], [2, "margin-bottom", "16px", 3, "expandedChange", "expanded"], ["kendoExpansionPanelTitleDirective", ""], [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", "#495057", "white-space", "nowrap", "min-width", "100px"], [1, "fa-solid", "fa-list-ol", 2, "color", "#6c757d", "margin-right", "6px"], ["placeholder", "All rows", 2, "width", "150px", 3, "ngModelChange", "ngModel", "min", "step"], [2, "font-size", "0.85em", "color", "#6c757d"], [1, "fa-solid", "fa-forward", 2, "color", "#6c757d", "margin-right", "6px"], ["placeholder", "0", 2, "width", "150px", 3, "ngModelChange", "ngModel", "min", "step"], [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", "#6c757d", "font-size", "0.85em"], [1, "fa-solid", "fa-info-circle"], [2, "display", "flex", "flex-direction", "column", "gap", "16px"], [2, "background", "#f8f9fa", "border", "1px solid #dee2e6", "border-radius", "6px", "padding", "16px"], [2, "display", "flex", "align-items", "center", "gap", "8px", "font-weight", "600"], [1, "fa-solid", "fa-sliders", 2, "color", "#6c757d"], [1, "badge", 2, "background", "#17a2b8", "color", "white", "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", "#495057", "display", "flex", "align-items", "center", "gap", "6px"], [1, "fa-solid", "fa-at", 2, "color", "#007bff"], [2, "color", "#dc3545"], [2, "font-size", "0.85em", "color", "#6c757d", "margin-top", "4px"], [2, "display", "flex", "gap", "8px", "align-items", "center"], [1, "badge", 2, "background", "#6c757d", "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"], ["placeholder", "Enter number value...", 2, "width", "100%", 3, "ngModel"], ["placeholder", "Enter value (JSON, string, or number)...", 2, "width", "100%", "font-family", "'Courier New', monospace", 3, "ngModel", "rows"], [2, "font-size", "0.8em", "color", "#6c757d", "margin-top", "4px"], ["placeholder", "Enter number value...", 2, "width", "100%", 3, "ngModelChange", "ngModel"], ["placeholder", "Enter value (JSON, string, or number)...", 2, "width", "100%", "font-family", "'Courier New', monospace", 3, "ngModelChange", "ngModel", "rows"], [2, "background", "#e9ecef", "padding", "2px 4px", "border-radius", "3px"], [1, "fa-solid", "fa-table-list", 2, "color", "#6c757d"], [1, "badge", 2, "background", "#6c757d", "color", "white", "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", "#28a745"], [1, "badge", 2, "background", "#dc3545", "color", "white", "padding", "2px 6px", "border-radius", "10px", "font-size", "0.7em"], [2, "font-size", "0.8em", "color", "#6c757d", "font-weight", "normal"], [1, "badge", 2, "background", "#28a745", "color", "white", "padding", "2px 6px", "border-radius", "10px", "font-size", "0.7em"], [2, "display", "flex", "align-items", "center", "justify-content", "center", "height", "200px", "color", "#6c757d"], [2, "display", "flex", "justify-content", "space-between", "align-items", "center", "padding", "12px", "border-bottom", "1px solid #dee2e6"], [2, "display", "flex", "gap", "8px"], ["kendoButton", "", "fillMode", "flat", "title", "Copy to clipboard", 3, "click"], [1, "fa-solid", "fa-copy"], ["kendoButton", "", "fillMode", "flat", "title", "Export to CSV", 3, "click"], [1, "fa-solid", "fa-download"], [1, "results-table-container", 2, "flex", "1", "overflow", "auto", "border", "1px solid #dee2e6", "border-radius", "4px", "min-height", "0"], [1, "results-table", 2, "width", "100%", "border-collapse", "collapse", "font-size", "14px"], [2, "position", "sticky", "top", "0", "background", "#f8f9fa", "z-index", "10"], [2, "padding", "12px 16px", "text-align", "left", "font-weight", "600", "color", "#495057", "border-bottom", "2px solid #dee2e6", "background", "#f8f9fa", "white-space", "nowrap"], [2, "border-bottom", "1px solid #e9ecef", "transition", "background-color 0.2s"], [2, "padding", "40px", "text-align", "center", "color", "#6c757d"], [2, "font-size", "0.9em", "color", "#6c757d"], [2, "display", "flex", "gap", "4px"], ["kendoButton", "", "fillMode", "flat", "size", "small", "title", "First page", 3, "click", "disabled"], [1, "fa-solid", "fa-angles-left"], ["kendoButton", "", "fillMode", "flat", "size", "small", "title", "Previous page", 3, "click", "disabled"], [1, "fa-solid", "fa-angle-left"], ["kendoButton", "", "fillMode", "flat", "size", "small", "title", "Next page", 3, "click", "disabled"], [1, "fa-solid", "fa-angle-right"], ["kendoButton", "", "fillMode", "flat", "size", "small", "title", "Last page", 3, "click", "disabled"], [1, "fa-solid", "fa-angles-right"], [2, "padding", "10px 16px", "color", "#212529", "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"], ["kendoButton", "", 3, "click"], [1, "fa-solid", "fa-times"], ["kendoButton", "", 3, "click", "themeColor", "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) {
768
+ i0.ɵɵtemplate(0, QueryRunDialogComponent_kendo_dialog_0_Template, 11, 5, "kendo-dialog", 0);
769
+ } if (rf & 2) {
770
+ i0.ɵɵproperty("ngIf", ctx.isVisible);
771
+ } }, dependencies: [i1.NgIf, i2.NgControlStatus, i2.NgModel, i3.ExpansionPanelComponent, i3.ExpansionPanelTitleDirective, i4.DialogComponent, i4.DialogTitleBarComponent, i4.DialogActionsComponent, i5.TextAreaComponent, i5.NumericTextBoxComponent, i6.ButtonComponent], styles: [".param-value[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] {\n resize: vertical;\n min-height: 60px;\n}\n\n.loading-state[_ngcontent-%COMP%] {\n color: #6c757d;\n}\n\n.badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n\n\n.results-table-container[_ngcontent-%COMP%] {\n background: white;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n display: flex;\n flex-direction: column;\n}\n\n.results-table-container[_ngcontent-%COMP%]::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.results-table-container[_ngcontent-%COMP%]::-webkit-scrollbar-track {\n background: #f1f1f1;\n}\n\n.results-table-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\n background: #c1c1c1;\n border-radius: 4px;\n}\n\n.results-table-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\n background: #a8a8a8;\n}\n\n.results-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover {\n background-color: #f8f9fa !important;\n}\n\n.results-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(even) {\n background-color: #fafbfc;\n}\n\n.dialog-content[_ngcontent-%COMP%] {\n overflow-y: auto;\n}\n\n.header-section[_ngcontent-%COMP%] {\n flex-shrink: 0;\n}\n\n.param-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n min-width: 30px;\n padding: 4px 6px;\n}\n\n\n\n .k-expander-content-wrapper {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n overflow: hidden;\n}\n\n .k-expander-content {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n overflow: hidden;\n}"] }); }
772
+ }
773
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryRunDialogComponent, [{
774
+ type: Component,
775
+ args: [{ selector: 'mj-query-run-dialog', template: "<kendo-dialog \n *ngIf=\"isVisible\"\n [width]=\"900\"\n [height]=\"800\"\n (close)=\"close()\">\n \n <kendo-dialog-titlebar>\n <div style=\"display: flex; align-items: center; gap: 8px;\">\n <i class=\"fa-solid fa-play-circle\" style=\"color: #007bff;\"></i>\n Run Query: {{ query?.Name || 'Untitled' }}\n </div>\n </kendo-dialog-titlebar>\n \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: #6c757d; margin-right: 12px;\"></i>\n <span style=\"color: #6c757d;\">Loading query parameters...</span>\n </div>\n } @else {\n \n <!-- Query Parameters Section -->\n @if (parameterPairs.length > 0) {\n <kendo-expansionpanel \n [(expanded)]=\"parametersExpanded\"\n style=\"margin-bottom: 16px; flex-shrink: 0;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-sliders\" style=\"color: #6c757d;\"></i>\n Query Parameters\n <span class=\"badge\" style=\"background: #17a2b8; color: white; padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n {{ parameterPairs.length }}\n </span>\n </span>\n </ng-template>\n \n <div style=\"padding: 12px 0;\">\n <div style=\"margin-bottom: 12px; color: #6c757d; font-size: 0.85em;\">\n <i class=\"fa-solid fa-info-circle\"></i>\n Configure parameter values for query execution.\n </div>\n \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: #f8f9fa; border: 1px solid #dee2e6; 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: #495057; display: flex; align-items: center; gap: 6px;\">\n <i class=\"fa-solid fa-at\" style=\"color: #007bff;\"></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: #6c757d; 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: #6c757d; 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 \n <!-- Parameter Value Input -->\n @if (param.type === 'number') {\n <kendo-numerictextbox\n [(ngModel)]=\"param.value\"\n placeholder=\"Enter number value...\"\n style=\"width: 100%;\">\n </kendo-numerictextbox>\n } @else {\n <kendo-textarea\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 </kendo-textarea>\n }\n \n @if (param.defaultValue) {\n <div style=\"font-size: 0.8em; color: #6c757d; margin-top: 4px;\">\n Default: <code style=\"background: #e9ecef; padding: 2px 4px; border-radius: 3px;\">{{ param.defaultValue }}</code>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </kendo-expansionpanel>\n } @else {\n <div style=\"padding: 20px; background: #f8f9fa; border-radius: 6px; margin-bottom: 16px; text-align: center; color: #6c757d;\">\n <i class=\"fa-solid fa-info-circle\"></i> This query has no parameters.\n </div>\n }\n \n <!-- Pagination Settings -->\n <kendo-expansionpanel \n [(expanded)]=\"paginationExpanded\"\n style=\"margin-bottom: 16px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-table-list\" style=\"color: #6c757d;\"></i>\n Pagination Settings\n @if (maxRows && maxRows > 0) {\n <span class=\"badge\" style=\"background: #6c757d; color: white; padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n {{ maxRows }} rows/page\n </span>\n }\n </span>\n </ng-template>\n \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: #495057; white-space: nowrap; min-width: 100px;\">\n <i class=\"fa-solid fa-list-ol\" style=\"color: #6c757d; margin-right: 6px;\"></i>\n Max Rows:\n </label>\n <kendo-numerictextbox\n [(ngModel)]=\"maxRows\"\n [min]=\"1\"\n [step]=\"100\"\n placeholder=\"All rows\"\n style=\"width: 150px;\">\n </kendo-numerictextbox>\n <span style=\"font-size: 0.85em; color: #6c757d;\">\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: #495057; white-space: nowrap; min-width: 100px;\">\n <i class=\"fa-solid fa-forward\" style=\"color: #6c757d; margin-right: 6px;\"></i>\n Start Row:\n </label>\n <kendo-numerictextbox\n [(ngModel)]=\"startRow\"\n [min]=\"0\"\n [step]=\"1\"\n placeholder=\"0\"\n style=\"width: 150px;\">\n </kendo-numerictextbox>\n <span style=\"font-size: 0.85em; color: #6c757d;\">\n 0-based offset for pagination\n </span>\n </div>\n </div>\n </div>\n </kendo-expansionpanel>\n \n <!-- Results Section -->\n @if (runResult) {\n <kendo-expansionpanel \n [(expanded)]=\"resultsExpanded\"\n style=\"flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-table\" style=\"color: #28a745;\"></i>\n Query Results\n @if (runResult.Success) {\n <span class=\"badge\" style=\"background: #28a745; color: white; padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n {{ runResult.RowCount }} rows\n </span>\n @if (runResult.TotalRowCount > runResult.RowCount) {\n <span class=\"badge\" style=\"background: #17a2b8; color: white; padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n of {{ runResult.TotalRowCount }} total\n </span>\n }\n } @else {\n <span class=\"badge\" style=\"background: #dc3545; color: white; padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n Error\n </span>\n }\n @if (runResult.ExecutionTime) {\n <span style=\"font-size: 0.8em; color: #6c757d; font-weight: normal;\">\n ({{ runResult.ExecutionTime }}ms)\n </span>\n }\n </span>\n </ng-template>\n \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 #dee2e6;\">\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: #6c757d;\">\n Showing rows {{ startRow + 1 }} - {{ startRow + runResult.RowCount }} of {{ runResult.TotalRowCount }}\n </span>\n <div style=\"display: flex; gap: 4px;\">\n <button kendoButton \n fillMode=\"flat\"\n size=\"small\"\n [disabled]=\"startRow === 0\"\n (click)=\"goToFirstPage()\"\n title=\"First page\">\n <i class=\"fa-solid fa-angles-left\"></i>\n </button>\n <button kendoButton \n fillMode=\"flat\"\n size=\"small\"\n [disabled]=\"startRow === 0\"\n (click)=\"goToPreviousPage()\"\n title=\"Previous page\">\n <i class=\"fa-solid fa-angle-left\"></i>\n </button>\n <button kendoButton \n fillMode=\"flat\"\n size=\"small\"\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 kendoButton \n fillMode=\"flat\"\n size=\"small\"\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 kendoButton \n fillMode=\"flat\"\n (click)=\"copyToClipboard()\"\n title=\"Copy to clipboard\">\n <i class=\"fa-solid fa-copy\"></i> Copy\n </button>\n <button kendoButton \n fillMode=\"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 \n <!-- Results Grid -->\n <div class=\"results-table-container\" style=\"flex: 1; overflow: auto; border: 1px solid #dee2e6; 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: #f8f9fa; 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: #495057; border-bottom: 2px solid #dee2e6; background: #f8f9fa; 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 #e9ecef; transition: background-color 0.2s;\">\n @for (col of resultColumns; track col.field) {\n <td style=\"padding: 10px 16px; color: #212529; 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: #6c757d;\">\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: #6c757d;\">\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 </kendo-expansionpanel>\n }\n }\n </div>\n \n <kendo-dialog-actions>\n @if (!runResult) {\n <button kendoButton (click)=\"close()\">\n <i class=\"fa-solid fa-times\"></i> Cancel\n </button>\n <button kendoButton \n [themeColor]=\"'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 kendoButton (click)=\"close()\">\n <i class=\"fa-solid fa-times\"></i> Close\n </button>\n <button kendoButton \n [themeColor]=\"'primary'\"\n [disabled]=\"isRunning\"\n (click)=\"runQuery()\">\n <i class=\"fa-solid fa-refresh\"></i> Run Again\n </button>\n }\n </kendo-dialog-actions>\n</kendo-dialog>", styles: [".param-value textarea {\n resize: vertical;\n min-height: 60px;\n}\n\n.loading-state {\n color: #6c757d;\n}\n\n.badge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n/* Professional Results Table Styling */\n.results-table-container {\n background: white;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n display: flex;\n flex-direction: column;\n}\n\n.results-table-container::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.results-table-container::-webkit-scrollbar-track {\n background: #f1f1f1;\n}\n\n.results-table-container::-webkit-scrollbar-thumb {\n background: #c1c1c1;\n border-radius: 4px;\n}\n\n.results-table-container::-webkit-scrollbar-thumb:hover {\n background: #a8a8a8;\n}\n\n.results-table tbody tr:hover {\n background-color: #f8f9fa !important;\n}\n\n.results-table tbody tr:nth-child(even) {\n background-color: #fafbfc;\n}\n\n.dialog-content {\n overflow-y: auto;\n}\n\n.header-section {\n flex-shrink: 0;\n}\n\n.param-actions button {\n min-width: 30px;\n padding: 4px 6px;\n}\n\n/* Ensure expansion panel content flexes properly */\n::ng-deep .k-expander-content-wrapper {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n overflow: hidden;\n}\n\n::ng-deep .k-expander-content {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n overflow: hidden;\n}"] }]
776
+ }], null, { query: [{
777
+ type: Input
778
+ }], parameters: [{
779
+ type: Input
780
+ }], isVisible: [{
781
+ type: Input
782
+ }], isVisibleChange: [{
783
+ type: Output
784
+ }], onClose: [{
785
+ type: Output
786
+ }] }); })();
787
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryRunDialogComponent, { className: "QueryRunDialogComponent", filePath: "src/lib/custom/Queries/query-run-dialog.component.ts", lineNumber: 33 }); })();
788
+ //# sourceMappingURL=query-run-dialog.component.js.map