@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.
- package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js +592 -580
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js.map +1 -1
- package/dist/lib/custom/Queries/query-category-dialog.component.d.ts +33 -0
- package/dist/lib/custom/Queries/query-category-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/Queries/query-category-dialog.component.js +241 -0
- package/dist/lib/custom/Queries/query-category-dialog.component.js.map +1 -0
- package/dist/lib/custom/Queries/query-form.component.d.ts +135 -0
- package/dist/lib/custom/Queries/query-form.component.d.ts.map +1 -0
- package/dist/lib/custom/Queries/query-form.component.js +1563 -0
- package/dist/lib/custom/Queries/query-form.component.js.map +1 -0
- package/dist/lib/custom/Queries/query-run-dialog.component.d.ts +66 -0
- package/dist/lib/custom/Queries/query-run-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/Queries/query-run-dialog.component.js +788 -0
- package/dist/lib/custom/Queries/query-run-dialog.component.js.map +1 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts +162 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts.map +1 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js +2091 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js.map +1 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.js +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.d.ts +2 -8
- package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.js +122 -128
- package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run.component.d.ts +6 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js +218 -156
- package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js.map +1 -1
- package/dist/lib/custom/custom-forms.module.d.ts +26 -22
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +23 -3
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/generated/Entities/Query/query.form.component.js +14 -4
- package/dist/lib/generated/Entities/Query/query.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/Query/sections/details.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/Query/sections/details.component.js +13 -4
- package/dist/lib/generated/Entities/Query/sections/details.component.js.map +1 -1
- package/dist/lib/generated/Entities/QueryEntity/sections/details.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/QueryEntity/sections/details.component.js +22 -4
- package/dist/lib/generated/Entities/QueryEntity/sections/details.component.js.map +1 -1
- package/dist/lib/generated/Entities/QueryField/sections/details.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/QueryField/sections/details.component.js +22 -4
- package/dist/lib/generated/Entities/QueryField/sections/details.component.js.map +1 -1
- package/dist/lib/generated/Entities/QueryParameter/queryparameter.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/QueryParameter/queryparameter.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/QueryParameter/queryparameter.form.component.js +59 -0
- package/dist/lib/generated/Entities/QueryParameter/queryparameter.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/QueryParameter/sections/details.component.d.ts +11 -0
- package/dist/lib/generated/Entities/QueryParameter/sections/details.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/QueryParameter/sections/details.component.js +172 -0
- package/dist/lib/generated/Entities/QueryParameter/sections/details.component.js.map +1 -0
- package/dist/lib/generated/generated-forms.module.d.ts +265 -263
- package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
- package/dist/lib/generated/generated-forms.module.js +74 -66
- package/dist/lib/generated/generated-forms.module.js.map +1 -1
- package/package.json +18 -16
|
@@ -0,0 +1,1563 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { Component, ViewChild } from '@angular/core';
|
|
8
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
9
|
+
import { BaseFormComponent } from '@memberjunction/ng-base-forms';
|
|
10
|
+
import { QueryFormComponent } from '../../generated/Entities/Query/query.form.component';
|
|
11
|
+
import { Metadata, RunView, RUN_QUERY_SQL_FILTERS } from '@memberjunction/core';
|
|
12
|
+
import { MJNotificationService } from '@memberjunction/ng-notifications';
|
|
13
|
+
import { Subject } from 'rxjs';
|
|
14
|
+
import * as i0 from "@angular/core";
|
|
15
|
+
import * as i1 from "@angular/common";
|
|
16
|
+
import * as i2 from "@angular/forms";
|
|
17
|
+
import * as i3 from "@progress/kendo-angular-layout";
|
|
18
|
+
import * as i4 from "@progress/kendo-angular-inputs";
|
|
19
|
+
import * as i5 from "@progress/kendo-angular-dropdowns";
|
|
20
|
+
import * as i6 from "@progress/kendo-angular-buttons";
|
|
21
|
+
import * as i7 from "@memberjunction/ng-user-view-grid";
|
|
22
|
+
import * as i8 from "@memberjunction/ng-form-toolbar";
|
|
23
|
+
import * as i9 from "@memberjunction/ng-code-editor";
|
|
24
|
+
import * as i10 from "./query-run-dialog.component";
|
|
25
|
+
import * as i11 from "./query-category-dialog.component";
|
|
26
|
+
const _c0 = ["sqlEditor"];
|
|
27
|
+
const _forTrack0 = ($index, $item) => $item.name;
|
|
28
|
+
const _forTrack1 = ($index, $item) => $item.ID || $index;
|
|
29
|
+
const _forTrack2 = ($index, $item) => $item.ID;
|
|
30
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
31
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
32
|
+
i0.ɵɵelementStart(0, "kendo-textbox", 40);
|
|
33
|
+
i0.ɵɵtwoWayListener("ngModelChange", function QueryFormExtendedComponent_Conditional_1_Conditional_9_Template_kendo_textbox_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r2.record.Name, $event) || (ctx_r2.record.Name = $event); return i0.ɵɵresetView($event); });
|
|
34
|
+
i0.ɵɵelementEnd();
|
|
35
|
+
} if (rf & 2) {
|
|
36
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
37
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r2.record.Name);
|
|
38
|
+
} }
|
|
39
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
40
|
+
i0.ɵɵelementStart(0, "h4", 12);
|
|
41
|
+
i0.ɵɵtext(1);
|
|
42
|
+
i0.ɵɵelementEnd();
|
|
43
|
+
} if (rf & 2) {
|
|
44
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
45
|
+
i0.ɵɵadvance();
|
|
46
|
+
i0.ɵɵtextInterpolate(ctx_r2.record.Name || "Untitled Query");
|
|
47
|
+
} }
|
|
48
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
49
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
50
|
+
i0.ɵɵelementStart(0, "button", 41);
|
|
51
|
+
i0.ɵɵlistener("click", function QueryFormExtendedComponent_Conditional_1_Conditional_12_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.runQuery()); });
|
|
52
|
+
i0.ɵɵelement(1, "i", 42);
|
|
53
|
+
i0.ɵɵtext(2, " Run ");
|
|
54
|
+
i0.ɵɵelementEnd();
|
|
55
|
+
} if (rf & 2) {
|
|
56
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
57
|
+
i0.ɵɵproperty("themeColor", "primary")("size", "large")("disabled", ctx_r2.EditMode || ctx_r2.record.Status !== "Approved" || !ctx_r2.record.SQL || ctx_r2.record.SQL.trim().length === 0);
|
|
58
|
+
} }
|
|
59
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
60
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
61
|
+
i0.ɵɵelementStart(0, "kendo-dropdownlist", 43);
|
|
62
|
+
i0.ɵɵtwoWayListener("ngModelChange", function QueryFormExtendedComponent_Conditional_1_Conditional_17_Template_kendo_dropdownlist_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r2.record.CategoryID, $event) || (ctx_r2.record.CategoryID = $event); return i0.ɵɵresetView($event); });
|
|
63
|
+
i0.ɵɵelementEnd();
|
|
64
|
+
} if (rf & 2) {
|
|
65
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
66
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r2.record.CategoryID);
|
|
67
|
+
i0.ɵɵproperty("data", ctx_r2.categoryOptions)("valuePrimitive", true);
|
|
68
|
+
} }
|
|
69
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
70
|
+
i0.ɵɵelementStart(0, "span", 18);
|
|
71
|
+
i0.ɵɵtext(1);
|
|
72
|
+
i0.ɵɵelementEnd();
|
|
73
|
+
} if (rf & 2) {
|
|
74
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
75
|
+
i0.ɵɵadvance();
|
|
76
|
+
i0.ɵɵtextInterpolate(ctx_r2.getCategoryPath() || "Uncategorized");
|
|
77
|
+
} }
|
|
78
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_22_Template(rf, ctx) { if (rf & 1) {
|
|
79
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
80
|
+
i0.ɵɵelementStart(0, "kendo-dropdownlist", 44);
|
|
81
|
+
i0.ɵɵtwoWayListener("ngModelChange", function QueryFormExtendedComponent_Conditional_1_Conditional_22_Template_kendo_dropdownlist_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r2.record.Status, $event) || (ctx_r2.record.Status = $event); return i0.ɵɵresetView($event); });
|
|
82
|
+
i0.ɵɵelementEnd();
|
|
83
|
+
} if (rf & 2) {
|
|
84
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
85
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r2.record.Status);
|
|
86
|
+
i0.ɵɵproperty("data", ctx_r2.statusOptions)("valuePrimitive", true);
|
|
87
|
+
} }
|
|
88
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_23_i_1_Template(rf, ctx) { if (rf & 1) {
|
|
89
|
+
i0.ɵɵelement(0, "i", 49);
|
|
90
|
+
} }
|
|
91
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_23_i_2_Template(rf, ctx) { if (rf & 1) {
|
|
92
|
+
i0.ɵɵelement(0, "i", 50);
|
|
93
|
+
} }
|
|
94
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_23_i_3_Template(rf, ctx) { if (rf & 1) {
|
|
95
|
+
i0.ɵɵelement(0, "i", 51);
|
|
96
|
+
} }
|
|
97
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_23_Template(rf, ctx) { if (rf & 1) {
|
|
98
|
+
i0.ɵɵelementStart(0, "span", 45);
|
|
99
|
+
i0.ɵɵtemplate(1, QueryFormExtendedComponent_Conditional_1_Conditional_23_i_1_Template, 1, 0, "i", 46)(2, QueryFormExtendedComponent_Conditional_1_Conditional_23_i_2_Template, 1, 0, "i", 47)(3, QueryFormExtendedComponent_Conditional_1_Conditional_23_i_3_Template, 1, 0, "i", 48);
|
|
100
|
+
i0.ɵɵtext(4);
|
|
101
|
+
i0.ɵɵelementEnd();
|
|
102
|
+
} if (rf & 2) {
|
|
103
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
104
|
+
i0.ɵɵstyleProp("background", ctx_r2.getStatusBadgeColor());
|
|
105
|
+
i0.ɵɵadvance();
|
|
106
|
+
i0.ɵɵproperty("ngIf", ctx_r2.record.Status === "Approved");
|
|
107
|
+
i0.ɵɵadvance();
|
|
108
|
+
i0.ɵɵproperty("ngIf", ctx_r2.record.Status === "Pending");
|
|
109
|
+
i0.ɵɵadvance();
|
|
110
|
+
i0.ɵɵproperty("ngIf", ctx_r2.record.Status === "Rejected");
|
|
111
|
+
i0.ɵɵadvance();
|
|
112
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r2.record.Status || "Unknown", " ");
|
|
113
|
+
} }
|
|
114
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_24_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
115
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
116
|
+
i0.ɵɵelementStart(0, "kendo-textarea", 54);
|
|
117
|
+
i0.ɵɵtwoWayListener("ngModelChange", function QueryFormExtendedComponent_Conditional_1_Conditional_24_Conditional_1_Template_kendo_textarea_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r2 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r2.record.Description, $event) || (ctx_r2.record.Description = $event); return i0.ɵɵresetView($event); });
|
|
118
|
+
i0.ɵɵelementEnd();
|
|
119
|
+
} if (rf & 2) {
|
|
120
|
+
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
121
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r2.record.Description);
|
|
122
|
+
i0.ɵɵproperty("rows", 2);
|
|
123
|
+
} }
|
|
124
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_24_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
125
|
+
i0.ɵɵelementStart(0, "p", 53);
|
|
126
|
+
i0.ɵɵtext(1);
|
|
127
|
+
i0.ɵɵelementEnd();
|
|
128
|
+
} if (rf & 2) {
|
|
129
|
+
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
130
|
+
i0.ɵɵadvance();
|
|
131
|
+
i0.ɵɵtextInterpolate(ctx_r2.record.Description);
|
|
132
|
+
} }
|
|
133
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_24_Template(rf, ctx) { if (rf & 1) {
|
|
134
|
+
i0.ɵɵelementStart(0, "div");
|
|
135
|
+
i0.ɵɵtemplate(1, QueryFormExtendedComponent_Conditional_1_Conditional_24_Conditional_1_Template, 1, 2, "kendo-textarea", 52)(2, QueryFormExtendedComponent_Conditional_1_Conditional_24_Conditional_2_Template, 2, 1, "p", 53);
|
|
136
|
+
i0.ɵɵelementEnd();
|
|
137
|
+
} if (rf & 2) {
|
|
138
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
139
|
+
i0.ɵɵadvance();
|
|
140
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 1 : 2);
|
|
141
|
+
} }
|
|
142
|
+
function QueryFormExtendedComponent_Conditional_1_ng_template_27_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
143
|
+
i0.ɵɵelementStart(0, "span", 58);
|
|
144
|
+
i0.ɵɵelement(1, "i", 63);
|
|
145
|
+
i0.ɵɵtext(2, " Defined ");
|
|
146
|
+
i0.ɵɵelementEnd();
|
|
147
|
+
} }
|
|
148
|
+
function QueryFormExtendedComponent_Conditional_1_ng_template_27_Template(rf, ctx) { if (rf & 1) {
|
|
149
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
150
|
+
i0.ɵɵelementStart(0, "span", 55)(1, "span", 56);
|
|
151
|
+
i0.ɵɵelement(2, "i", 57);
|
|
152
|
+
i0.ɵɵtext(3, " SQL ");
|
|
153
|
+
i0.ɵɵtemplate(4, QueryFormExtendedComponent_Conditional_1_ng_template_27_Conditional_4_Template, 3, 0, "span", 58);
|
|
154
|
+
i0.ɵɵelementEnd();
|
|
155
|
+
i0.ɵɵelementStart(5, "button", 59);
|
|
156
|
+
i0.ɵɵlistener("click", function QueryFormExtendedComponent_Conditional_1_ng_template_27_Template_button_click_5_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(2); ctx_r2.toggleFiltersHelp(); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
157
|
+
i0.ɵɵelement(6, "i", 60);
|
|
158
|
+
i0.ɵɵelementStart(7, "span", 61);
|
|
159
|
+
i0.ɵɵtext(8, "Filters Help");
|
|
160
|
+
i0.ɵɵelementEnd();
|
|
161
|
+
i0.ɵɵelement(9, "i", 62);
|
|
162
|
+
i0.ɵɵelementEnd()();
|
|
163
|
+
} if (rf & 2) {
|
|
164
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
165
|
+
i0.ɵɵadvance(4);
|
|
166
|
+
i0.ɵɵconditional(ctx_r2.record.SQL ? 4 : -1);
|
|
167
|
+
i0.ɵɵadvance(5);
|
|
168
|
+
i0.ɵɵproperty("ngClass", ctx_r2.showFiltersHelp ? "fa-chevron-up" : "fa-chevron-down");
|
|
169
|
+
} }
|
|
170
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_31_For_6_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
171
|
+
i0.ɵɵelementStart(0, "div", 71);
|
|
172
|
+
i0.ɵɵtext(1);
|
|
173
|
+
i0.ɵɵelementEnd();
|
|
174
|
+
} if (rf & 2) {
|
|
175
|
+
const filter_r9 = i0.ɵɵnextContext().$implicit;
|
|
176
|
+
i0.ɵɵadvance();
|
|
177
|
+
i0.ɵɵtextInterpolate1(" ", filter_r9.notes, " ");
|
|
178
|
+
} }
|
|
179
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_31_For_6_Template(rf, ctx) { if (rf & 1) {
|
|
180
|
+
i0.ɵɵelementStart(0, "div", 67)(1, "div", 68);
|
|
181
|
+
i0.ɵɵtext(2);
|
|
182
|
+
i0.ɵɵelementEnd();
|
|
183
|
+
i0.ɵɵelementStart(3, "div", 69);
|
|
184
|
+
i0.ɵɵtext(4);
|
|
185
|
+
i0.ɵɵelementEnd();
|
|
186
|
+
i0.ɵɵelementStart(5, "div", 70);
|
|
187
|
+
i0.ɵɵtext(6);
|
|
188
|
+
i0.ɵɵelementEnd();
|
|
189
|
+
i0.ɵɵtemplate(7, QueryFormExtendedComponent_Conditional_1_Conditional_31_For_6_Conditional_7_Template, 2, 1, "div", 71);
|
|
190
|
+
i0.ɵɵelementEnd();
|
|
191
|
+
} if (rf & 2) {
|
|
192
|
+
const filter_r9 = ctx.$implicit;
|
|
193
|
+
i0.ɵɵadvance(2);
|
|
194
|
+
i0.ɵɵtextInterpolate1(" ", filter_r9.name, " ");
|
|
195
|
+
i0.ɵɵadvance(2);
|
|
196
|
+
i0.ɵɵtextInterpolate1(" ", filter_r9.description, " ");
|
|
197
|
+
i0.ɵɵadvance(2);
|
|
198
|
+
i0.ɵɵtextInterpolate1(" ", filter_r9.exampleSyntax, " ");
|
|
199
|
+
i0.ɵɵadvance();
|
|
200
|
+
i0.ɵɵconditional(filter_r9.notes ? 7 : -1);
|
|
201
|
+
} }
|
|
202
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_31_Template(rf, ctx) { if (rf & 1) {
|
|
203
|
+
i0.ɵɵelementStart(0, "div", 27)(1, "h6", 64);
|
|
204
|
+
i0.ɵɵelement(2, "i", 65);
|
|
205
|
+
i0.ɵɵtext(3, " Available SQL Filters for Parameterized Queries ");
|
|
206
|
+
i0.ɵɵelementEnd();
|
|
207
|
+
i0.ɵɵelementStart(4, "div", 66);
|
|
208
|
+
i0.ɵɵrepeaterCreate(5, QueryFormExtendedComponent_Conditional_1_Conditional_31_For_6_Template, 8, 4, "div", 67, _forTrack0);
|
|
209
|
+
i0.ɵɵelementEnd()();
|
|
210
|
+
} if (rf & 2) {
|
|
211
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
212
|
+
i0.ɵɵadvance(5);
|
|
213
|
+
i0.ɵɵrepeater(ctx_r2.sqlFilters);
|
|
214
|
+
} }
|
|
215
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_32_ng_template_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
216
|
+
i0.ɵɵelementStart(0, "span", 75);
|
|
217
|
+
i0.ɵɵtext(1);
|
|
218
|
+
i0.ɵɵelementEnd();
|
|
219
|
+
} if (rf & 2) {
|
|
220
|
+
const ctx_r2 = i0.ɵɵnextContext(4);
|
|
221
|
+
i0.ɵɵadvance();
|
|
222
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r2.queryParameters.length, " ");
|
|
223
|
+
} }
|
|
224
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_32_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
225
|
+
i0.ɵɵelementStart(0, "span", 56);
|
|
226
|
+
i0.ɵɵelement(1, "i", 74);
|
|
227
|
+
i0.ɵɵtext(2, " Query Parameters ");
|
|
228
|
+
i0.ɵɵtemplate(3, QueryFormExtendedComponent_Conditional_1_Conditional_32_ng_template_1_Conditional_3_Template, 2, 1, "span", 75);
|
|
229
|
+
i0.ɵɵelementEnd();
|
|
230
|
+
} if (rf & 2) {
|
|
231
|
+
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
232
|
+
i0.ɵɵadvance(3);
|
|
233
|
+
i0.ɵɵconditional(ctx_r2.queryParameters.length > 0 ? 3 : -1);
|
|
234
|
+
} }
|
|
235
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
236
|
+
i0.ɵɵelementStart(0, "div", 73);
|
|
237
|
+
i0.ɵɵelement(1, "i", 76);
|
|
238
|
+
i0.ɵɵelementStart(2, "span", 77);
|
|
239
|
+
i0.ɵɵtext(3, "Loading parameters...");
|
|
240
|
+
i0.ɵɵelementEnd()();
|
|
241
|
+
} }
|
|
242
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_0_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
243
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
244
|
+
i0.ɵɵelementStart(0, "button", 84);
|
|
245
|
+
i0.ɵɵlistener("click", function QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_0_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r11); const ctx_r2 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r2.addParameter()); });
|
|
246
|
+
i0.ɵɵelement(1, "i", 85);
|
|
247
|
+
i0.ɵɵtext(2, " Add First Parameter ");
|
|
248
|
+
i0.ɵɵelementEnd();
|
|
249
|
+
} }
|
|
250
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
251
|
+
i0.ɵɵelementStart(0, "div", 78);
|
|
252
|
+
i0.ɵɵelement(1, "i", 80);
|
|
253
|
+
i0.ɵɵelementStart(2, "div", 81);
|
|
254
|
+
i0.ɵɵtext(3, "No Parameters Defined");
|
|
255
|
+
i0.ɵɵelementEnd();
|
|
256
|
+
i0.ɵɵelementStart(4, "div", 82);
|
|
257
|
+
i0.ɵɵtext(5, " Add parameters to make your query dynamic and reusable. ");
|
|
258
|
+
i0.ɵɵelementEnd();
|
|
259
|
+
i0.ɵɵtemplate(6, QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_0_Conditional_6_Template, 3, 0, "button", 83);
|
|
260
|
+
i0.ɵɵelementEnd();
|
|
261
|
+
} if (rf & 2) {
|
|
262
|
+
const ctx_r2 = i0.ɵɵnextContext(4);
|
|
263
|
+
i0.ɵɵadvance(6);
|
|
264
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 6 : -1);
|
|
265
|
+
} }
|
|
266
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
267
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
268
|
+
i0.ɵɵelementStart(0, "div", 86)(1, "button", 84);
|
|
269
|
+
i0.ɵɵlistener("click", function QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_Conditional_0_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r12); const ctx_r2 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r2.addParameter()); });
|
|
270
|
+
i0.ɵɵelement(2, "i", 85);
|
|
271
|
+
i0.ɵɵtext(3, " Add Parameter ");
|
|
272
|
+
i0.ɵɵelementEnd()();
|
|
273
|
+
} }
|
|
274
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_For_3_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
275
|
+
i0.ɵɵelementStart(0, "span", 93);
|
|
276
|
+
i0.ɵɵtext(1, "Required");
|
|
277
|
+
i0.ɵɵelementEnd();
|
|
278
|
+
} }
|
|
279
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_For_3_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
280
|
+
i0.ɵɵelementStart(0, "div", 95);
|
|
281
|
+
i0.ɵɵtext(1);
|
|
282
|
+
i0.ɵɵelementEnd();
|
|
283
|
+
} if (rf & 2) {
|
|
284
|
+
const param_r14 = i0.ɵɵnextContext().$implicit;
|
|
285
|
+
i0.ɵɵadvance();
|
|
286
|
+
i0.ɵɵtextInterpolate(param_r14.Description);
|
|
287
|
+
} }
|
|
288
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_For_3_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
289
|
+
i0.ɵɵelementStart(0, "div")(1, "strong");
|
|
290
|
+
i0.ɵɵtext(2, "Default:");
|
|
291
|
+
i0.ɵɵelementEnd();
|
|
292
|
+
i0.ɵɵelementStart(3, "code", 98);
|
|
293
|
+
i0.ɵɵtext(4);
|
|
294
|
+
i0.ɵɵelementEnd()();
|
|
295
|
+
} if (rf & 2) {
|
|
296
|
+
const param_r14 = i0.ɵɵnextContext().$implicit;
|
|
297
|
+
i0.ɵɵadvance(4);
|
|
298
|
+
i0.ɵɵtextInterpolate1(" ", param_r14.DefaultValue, " ");
|
|
299
|
+
} }
|
|
300
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_For_3_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
301
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
302
|
+
i0.ɵɵelementStart(0, "div", 99);
|
|
303
|
+
i0.ɵɵlistener("click", function QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_For_3_Conditional_15_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r15); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
304
|
+
i0.ɵɵelementStart(1, "button", 100);
|
|
305
|
+
i0.ɵɵlistener("click", function QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_For_3_Conditional_15_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r15); const param_r14 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r2.editParameter(param_r14)); });
|
|
306
|
+
i0.ɵɵelement(2, "i", 101);
|
|
307
|
+
i0.ɵɵelementEnd();
|
|
308
|
+
i0.ɵɵelementStart(3, "button", 102);
|
|
309
|
+
i0.ɵɵlistener("click", function QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_For_3_Conditional_15_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r15); const param_r14 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r2.deleteParameter(param_r14)); });
|
|
310
|
+
i0.ɵɵelement(4, "i", 103);
|
|
311
|
+
i0.ɵɵelementEnd()();
|
|
312
|
+
} }
|
|
313
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
314
|
+
const _r13 = i0.ɵɵgetCurrentView();
|
|
315
|
+
i0.ɵɵelementStart(0, "div", 88);
|
|
316
|
+
i0.ɵɵlistener("click", function QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_For_3_Template_div_click_0_listener() { const param_r14 = i0.ɵɵrestoreView(_r13).$implicit; const ctx_r2 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r2.editParameter(param_r14)); });
|
|
317
|
+
i0.ɵɵelementStart(1, "div", 89)(2, "div", 90);
|
|
318
|
+
i0.ɵɵelement(3, "i", 91);
|
|
319
|
+
i0.ɵɵtext(4);
|
|
320
|
+
i0.ɵɵelementEnd();
|
|
321
|
+
i0.ɵɵelementStart(5, "div", 92);
|
|
322
|
+
i0.ɵɵtemplate(6, QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_For_3_Conditional_6_Template, 2, 0, "span", 93);
|
|
323
|
+
i0.ɵɵelementEnd()();
|
|
324
|
+
i0.ɵɵelementStart(7, "div", 94);
|
|
325
|
+
i0.ɵɵtemplate(8, QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_For_3_Conditional_8_Template, 2, 1, "div", 95);
|
|
326
|
+
i0.ɵɵelementStart(9, "div", 96)(10, "div")(11, "strong");
|
|
327
|
+
i0.ɵɵtext(12, "Type:");
|
|
328
|
+
i0.ɵɵelementEnd();
|
|
329
|
+
i0.ɵɵtext(13);
|
|
330
|
+
i0.ɵɵelementEnd();
|
|
331
|
+
i0.ɵɵtemplate(14, QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_For_3_Conditional_14_Template, 5, 1, "div");
|
|
332
|
+
i0.ɵɵelementEnd()();
|
|
333
|
+
i0.ɵɵtemplate(15, QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_For_3_Conditional_15_Template, 5, 0, "div", 97);
|
|
334
|
+
i0.ɵɵelementEnd();
|
|
335
|
+
} if (rf & 2) {
|
|
336
|
+
const param_r14 = ctx.$implicit;
|
|
337
|
+
const ctx_r2 = i0.ɵɵnextContext(5);
|
|
338
|
+
i0.ɵɵclassProp("required", param_r14.IsRequired);
|
|
339
|
+
i0.ɵɵadvance(4);
|
|
340
|
+
i0.ɵɵtextInterpolate1(" ", param_r14.Name, " ");
|
|
341
|
+
i0.ɵɵadvance(2);
|
|
342
|
+
i0.ɵɵconditional(param_r14.IsRequired ? 6 : -1);
|
|
343
|
+
i0.ɵɵadvance(2);
|
|
344
|
+
i0.ɵɵconditional(param_r14.Description ? 8 : -1);
|
|
345
|
+
i0.ɵɵadvance(5);
|
|
346
|
+
i0.ɵɵtextInterpolate1(" ", param_r14.Type || "Text", " ");
|
|
347
|
+
i0.ɵɵadvance();
|
|
348
|
+
i0.ɵɵconditional(param_r14.DefaultValue ? 14 : -1);
|
|
349
|
+
i0.ɵɵadvance();
|
|
350
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 15 : -1);
|
|
351
|
+
} }
|
|
352
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
353
|
+
i0.ɵɵtemplate(0, QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_Conditional_0_Template, 4, 0, "div", 86);
|
|
354
|
+
i0.ɵɵelementStart(1, "div", 79);
|
|
355
|
+
i0.ɵɵrepeaterCreate(2, QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_For_3_Template, 16, 8, "div", 87, _forTrack1);
|
|
356
|
+
i0.ɵɵelementEnd();
|
|
357
|
+
} if (rf & 2) {
|
|
358
|
+
const ctx_r2 = i0.ɵɵnextContext(4);
|
|
359
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 0 : -1);
|
|
360
|
+
i0.ɵɵadvance(2);
|
|
361
|
+
i0.ɵɵrepeater(ctx_r2.queryParameters);
|
|
362
|
+
} }
|
|
363
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
364
|
+
i0.ɵɵtemplate(0, QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_0_Template, 7, 1, "div", 78)(1, QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Conditional_1_Template, 4, 1, "div", 79);
|
|
365
|
+
} if (rf & 2) {
|
|
366
|
+
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
367
|
+
i0.ɵɵconditional(ctx_r2.queryParameters.length === 0 ? 0 : 1);
|
|
368
|
+
} }
|
|
369
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_32_Template(rf, ctx) { if (rf & 1) {
|
|
370
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
371
|
+
i0.ɵɵelementStart(0, "kendo-expansionpanel", 23);
|
|
372
|
+
i0.ɵɵtwoWayListener("expandedChange", function QueryFormExtendedComponent_Conditional_1_Conditional_32_Template_kendo_expansionpanel_expandedChange_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r2.parametersPanelExpanded, $event) || (ctx_r2.parametersPanelExpanded = $event); return i0.ɵɵresetView($event); });
|
|
373
|
+
i0.ɵɵtemplate(1, QueryFormExtendedComponent_Conditional_1_Conditional_32_ng_template_1_Template, 4, 1, "ng-template", 24);
|
|
374
|
+
i0.ɵɵelementStart(2, "div", 72);
|
|
375
|
+
i0.ɵɵtemplate(3, QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_3_Template, 4, 0, "div", 73)(4, QueryFormExtendedComponent_Conditional_1_Conditional_32_Conditional_4_Template, 2, 1);
|
|
376
|
+
i0.ɵɵelementEnd()();
|
|
377
|
+
} if (rf & 2) {
|
|
378
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
379
|
+
i0.ɵɵtwoWayProperty("expanded", ctx_r2.parametersPanelExpanded);
|
|
380
|
+
i0.ɵɵadvance(3);
|
|
381
|
+
i0.ɵɵconditional(ctx_r2.isLoadingParameters ? 3 : 4);
|
|
382
|
+
} }
|
|
383
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_33_ng_template_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
384
|
+
i0.ɵɵelementStart(0, "span", 75);
|
|
385
|
+
i0.ɵɵtext(1);
|
|
386
|
+
i0.ɵɵelementEnd();
|
|
387
|
+
} if (rf & 2) {
|
|
388
|
+
const ctx_r2 = i0.ɵɵnextContext(4);
|
|
389
|
+
i0.ɵɵadvance();
|
|
390
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r2.queryFields.length, " ");
|
|
391
|
+
} }
|
|
392
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_33_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
393
|
+
i0.ɵɵelementStart(0, "span", 56);
|
|
394
|
+
i0.ɵɵelement(1, "i", 105);
|
|
395
|
+
i0.ɵɵtext(2, " Query Fields ");
|
|
396
|
+
i0.ɵɵtemplate(3, QueryFormExtendedComponent_Conditional_1_Conditional_33_ng_template_1_Conditional_3_Template, 2, 1, "span", 75);
|
|
397
|
+
i0.ɵɵelementEnd();
|
|
398
|
+
} if (rf & 2) {
|
|
399
|
+
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
400
|
+
i0.ɵɵadvance(3);
|
|
401
|
+
i0.ɵɵconditional(ctx_r2.queryFields.length > 0 ? 3 : -1);
|
|
402
|
+
} }
|
|
403
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
404
|
+
i0.ɵɵelementStart(0, "div", 104);
|
|
405
|
+
i0.ɵɵelement(1, "i", 106);
|
|
406
|
+
i0.ɵɵelementEnd();
|
|
407
|
+
} }
|
|
408
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_0_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
409
|
+
const _r17 = i0.ɵɵgetCurrentView();
|
|
410
|
+
i0.ɵɵelementStart(0, "button", 84);
|
|
411
|
+
i0.ɵɵlistener("click", function QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_0_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r17); const ctx_r2 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r2.addField()); });
|
|
412
|
+
i0.ɵɵelement(1, "i", 85);
|
|
413
|
+
i0.ɵɵtext(2, " Add First Field ");
|
|
414
|
+
i0.ɵɵelementEnd();
|
|
415
|
+
} }
|
|
416
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
417
|
+
i0.ɵɵelementStart(0, "div", 78);
|
|
418
|
+
i0.ɵɵelement(1, "i", 107);
|
|
419
|
+
i0.ɵɵelementStart(2, "h5", 108);
|
|
420
|
+
i0.ɵɵtext(3, "No Fields Defined");
|
|
421
|
+
i0.ɵɵelementEnd();
|
|
422
|
+
i0.ɵɵelementStart(4, "div", 109);
|
|
423
|
+
i0.ɵɵtext(5, " Define output fields for your query results. ");
|
|
424
|
+
i0.ɵɵelementEnd();
|
|
425
|
+
i0.ɵɵtemplate(6, QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_0_Conditional_6_Template, 3, 0, "button", 83);
|
|
426
|
+
i0.ɵɵelementEnd();
|
|
427
|
+
} if (rf & 2) {
|
|
428
|
+
const ctx_r2 = i0.ɵɵnextContext(4);
|
|
429
|
+
i0.ɵɵadvance(6);
|
|
430
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 6 : -1);
|
|
431
|
+
} }
|
|
432
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
433
|
+
const _r18 = i0.ɵɵgetCurrentView();
|
|
434
|
+
i0.ɵɵelementStart(0, "div", 86)(1, "button", 84);
|
|
435
|
+
i0.ɵɵlistener("click", function QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_1_Conditional_0_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r18); const ctx_r2 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r2.addField()); });
|
|
436
|
+
i0.ɵɵelement(2, "i", 85);
|
|
437
|
+
i0.ɵɵtext(3, " Add Field ");
|
|
438
|
+
i0.ɵɵelementEnd()();
|
|
439
|
+
} }
|
|
440
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_1_For_3_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
441
|
+
i0.ɵɵelementStart(0, "span", 113);
|
|
442
|
+
i0.ɵɵtext(1);
|
|
443
|
+
i0.ɵɵelementEnd();
|
|
444
|
+
} if (rf & 2) {
|
|
445
|
+
const field_r19 = i0.ɵɵnextContext().$implicit;
|
|
446
|
+
i0.ɵɵadvance();
|
|
447
|
+
i0.ɵɵtextInterpolate1("#", field_r19.Sequence, "");
|
|
448
|
+
} }
|
|
449
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_1_For_3_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
450
|
+
i0.ɵɵelementStart(0, "div", 114);
|
|
451
|
+
i0.ɵɵtext(1);
|
|
452
|
+
i0.ɵɵelementEnd();
|
|
453
|
+
} if (rf & 2) {
|
|
454
|
+
const field_r19 = i0.ɵɵnextContext().$implicit;
|
|
455
|
+
i0.ɵɵadvance();
|
|
456
|
+
i0.ɵɵtextInterpolate(field_r19.Description);
|
|
457
|
+
} }
|
|
458
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_1_For_3_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
459
|
+
const _r20 = i0.ɵɵgetCurrentView();
|
|
460
|
+
i0.ɵɵelementStart(0, "div", 118)(1, "button", 119);
|
|
461
|
+
i0.ɵɵlistener("click", function QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_1_For_3_Conditional_15_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r20); const field_r19 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r2.deleteField(field_r19)); });
|
|
462
|
+
i0.ɵɵelement(2, "i", 103);
|
|
463
|
+
i0.ɵɵelementEnd()();
|
|
464
|
+
} }
|
|
465
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_1_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
466
|
+
i0.ɵɵelementStart(0, "div", 110)(1, "div", 89)(2, "div", 90);
|
|
467
|
+
i0.ɵɵelement(3, "i", 111);
|
|
468
|
+
i0.ɵɵtext(4);
|
|
469
|
+
i0.ɵɵelementEnd();
|
|
470
|
+
i0.ɵɵelementStart(5, "div", 92)(6, "span", 112);
|
|
471
|
+
i0.ɵɵtext(7);
|
|
472
|
+
i0.ɵɵelementEnd();
|
|
473
|
+
i0.ɵɵtemplate(8, QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_1_For_3_Conditional_8_Template, 2, 1, "span", 113);
|
|
474
|
+
i0.ɵɵelementEnd()();
|
|
475
|
+
i0.ɵɵelementStart(9, "div", 94);
|
|
476
|
+
i0.ɵɵtemplate(10, QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_1_For_3_Conditional_10_Template, 2, 1, "div", 114);
|
|
477
|
+
i0.ɵɵelementStart(11, "div", 115)(12, "span", 116);
|
|
478
|
+
i0.ɵɵelement(13, "i", 117);
|
|
479
|
+
i0.ɵɵtext(14);
|
|
480
|
+
i0.ɵɵelementEnd()()();
|
|
481
|
+
i0.ɵɵtemplate(15, QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_1_For_3_Conditional_15_Template, 3, 0, "div", 118);
|
|
482
|
+
i0.ɵɵelementEnd();
|
|
483
|
+
} if (rf & 2) {
|
|
484
|
+
const field_r19 = ctx.$implicit;
|
|
485
|
+
const ctx_r2 = i0.ɵɵnextContext(5);
|
|
486
|
+
i0.ɵɵadvance(4);
|
|
487
|
+
i0.ɵɵtextInterpolate1(" ", field_r19.Name, " ");
|
|
488
|
+
i0.ɵɵadvance(3);
|
|
489
|
+
i0.ɵɵtextInterpolate(field_r19.SQLBaseType);
|
|
490
|
+
i0.ɵɵadvance();
|
|
491
|
+
i0.ɵɵconditional(field_r19.Sequence ? 8 : -1);
|
|
492
|
+
i0.ɵɵadvance(2);
|
|
493
|
+
i0.ɵɵconditional(field_r19.Description ? 10 : -1);
|
|
494
|
+
i0.ɵɵadvance(4);
|
|
495
|
+
i0.ɵɵtextInterpolate1(" ", field_r19.SQLFullType || field_r19.SQLBaseType, " ");
|
|
496
|
+
i0.ɵɵadvance();
|
|
497
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 15 : -1);
|
|
498
|
+
} }
|
|
499
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
500
|
+
i0.ɵɵtemplate(0, QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_1_Conditional_0_Template, 4, 0, "div", 86);
|
|
501
|
+
i0.ɵɵelementStart(1, "div", 79);
|
|
502
|
+
i0.ɵɵrepeaterCreate(2, QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_1_For_3_Template, 16, 6, "div", 110, _forTrack2);
|
|
503
|
+
i0.ɵɵelementEnd();
|
|
504
|
+
} if (rf & 2) {
|
|
505
|
+
const ctx_r2 = i0.ɵɵnextContext(4);
|
|
506
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 0 : -1);
|
|
507
|
+
i0.ɵɵadvance(2);
|
|
508
|
+
i0.ɵɵrepeater(ctx_r2.queryFields);
|
|
509
|
+
} }
|
|
510
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
511
|
+
i0.ɵɵtemplate(0, QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_0_Template, 7, 1, "div", 78)(1, QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Conditional_1_Template, 4, 1, "div", 79);
|
|
512
|
+
} if (rf & 2) {
|
|
513
|
+
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
514
|
+
i0.ɵɵconditional(ctx_r2.queryFields.length === 0 ? 0 : 1);
|
|
515
|
+
} }
|
|
516
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_33_Template(rf, ctx) { if (rf & 1) {
|
|
517
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
518
|
+
i0.ɵɵelementStart(0, "kendo-expansionpanel", 23);
|
|
519
|
+
i0.ɵɵtwoWayListener("expandedChange", function QueryFormExtendedComponent_Conditional_1_Conditional_33_Template_kendo_expansionpanel_expandedChange_0_listener($event) { i0.ɵɵrestoreView(_r16); const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r2.fieldsPanelExpanded, $event) || (ctx_r2.fieldsPanelExpanded = $event); return i0.ɵɵresetView($event); });
|
|
520
|
+
i0.ɵɵtemplate(1, QueryFormExtendedComponent_Conditional_1_Conditional_33_ng_template_1_Template, 4, 1, "ng-template", 24);
|
|
521
|
+
i0.ɵɵelementStart(2, "div", 72);
|
|
522
|
+
i0.ɵɵtemplate(3, QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_3_Template, 2, 0, "div", 104)(4, QueryFormExtendedComponent_Conditional_1_Conditional_33_Conditional_4_Template, 2, 1);
|
|
523
|
+
i0.ɵɵelementEnd()();
|
|
524
|
+
} if (rf & 2) {
|
|
525
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
526
|
+
i0.ɵɵtwoWayProperty("expanded", ctx_r2.fieldsPanelExpanded);
|
|
527
|
+
i0.ɵɵadvance(3);
|
|
528
|
+
i0.ɵɵconditional(ctx_r2.isLoadingFields ? 3 : 4);
|
|
529
|
+
} }
|
|
530
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_34_ng_template_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
531
|
+
i0.ɵɵelementStart(0, "span", 75);
|
|
532
|
+
i0.ɵɵtext(1);
|
|
533
|
+
i0.ɵɵelementEnd();
|
|
534
|
+
} if (rf & 2) {
|
|
535
|
+
const ctx_r2 = i0.ɵɵnextContext(4);
|
|
536
|
+
i0.ɵɵadvance();
|
|
537
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r2.queryEntities.length, " ");
|
|
538
|
+
} }
|
|
539
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_34_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
540
|
+
i0.ɵɵelementStart(0, "span", 56);
|
|
541
|
+
i0.ɵɵelement(1, "i", 120);
|
|
542
|
+
i0.ɵɵtext(2, " Query Entities ");
|
|
543
|
+
i0.ɵɵtemplate(3, QueryFormExtendedComponent_Conditional_1_Conditional_34_ng_template_1_Conditional_3_Template, 2, 1, "span", 75);
|
|
544
|
+
i0.ɵɵelementEnd();
|
|
545
|
+
} if (rf & 2) {
|
|
546
|
+
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
547
|
+
i0.ɵɵadvance(3);
|
|
548
|
+
i0.ɵɵconditional(ctx_r2.queryEntities.length > 0 ? 3 : -1);
|
|
549
|
+
} }
|
|
550
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
551
|
+
i0.ɵɵelementStart(0, "div", 104);
|
|
552
|
+
i0.ɵɵelement(1, "i", 106);
|
|
553
|
+
i0.ɵɵelementEnd();
|
|
554
|
+
} }
|
|
555
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_0_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
556
|
+
const _r22 = i0.ɵɵgetCurrentView();
|
|
557
|
+
i0.ɵɵelementStart(0, "button", 84);
|
|
558
|
+
i0.ɵɵlistener("click", function QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_0_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r22); const ctx_r2 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r2.addEntity()); });
|
|
559
|
+
i0.ɵɵelement(1, "i", 85);
|
|
560
|
+
i0.ɵɵtext(2, " Add First Entity ");
|
|
561
|
+
i0.ɵɵelementEnd();
|
|
562
|
+
} }
|
|
563
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
564
|
+
i0.ɵɵelementStart(0, "div", 78);
|
|
565
|
+
i0.ɵɵelement(1, "i", 121);
|
|
566
|
+
i0.ɵɵelementStart(2, "h5", 108);
|
|
567
|
+
i0.ɵɵtext(3, "No Entities Tracked");
|
|
568
|
+
i0.ɵɵelementEnd();
|
|
569
|
+
i0.ɵɵelementStart(4, "div", 109);
|
|
570
|
+
i0.ɵɵtext(5, " Track which entities this query uses for documentation. ");
|
|
571
|
+
i0.ɵɵelementEnd();
|
|
572
|
+
i0.ɵɵtemplate(6, QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_0_Conditional_6_Template, 3, 0, "button", 83);
|
|
573
|
+
i0.ɵɵelementEnd();
|
|
574
|
+
} if (rf & 2) {
|
|
575
|
+
const ctx_r2 = i0.ɵɵnextContext(4);
|
|
576
|
+
i0.ɵɵadvance(6);
|
|
577
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 6 : -1);
|
|
578
|
+
} }
|
|
579
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
580
|
+
const _r23 = i0.ɵɵgetCurrentView();
|
|
581
|
+
i0.ɵɵelementStart(0, "div", 86)(1, "button", 84);
|
|
582
|
+
i0.ɵɵlistener("click", function QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_1_Conditional_0_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r23); const ctx_r2 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r2.addEntity()); });
|
|
583
|
+
i0.ɵɵelement(2, "i", 85);
|
|
584
|
+
i0.ɵɵtext(3, " Add Entity ");
|
|
585
|
+
i0.ɵɵelementEnd()();
|
|
586
|
+
} }
|
|
587
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_1_For_3_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
588
|
+
const _r24 = i0.ɵɵgetCurrentView();
|
|
589
|
+
i0.ɵɵelementStart(0, "div", 123)(1, "kendo-dropdownlist", 124);
|
|
590
|
+
i0.ɵɵtwoWayListener("ngModelChange", function QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_1_For_3_Conditional_5_Template_kendo_dropdownlist_ngModelChange_1_listener($event) { i0.ɵɵrestoreView(_r24); const entity_r25 = i0.ɵɵnextContext().$implicit; i0.ɵɵtwoWayBindingSet(entity_r25.EntityID, $event) || (entity_r25.EntityID = $event); return i0.ɵɵresetView($event); });
|
|
591
|
+
i0.ɵɵelementEnd()();
|
|
592
|
+
} if (rf & 2) {
|
|
593
|
+
const entity_r25 = i0.ɵɵnextContext().$implicit;
|
|
594
|
+
const ctx_r2 = i0.ɵɵnextContext(5);
|
|
595
|
+
i0.ɵɵadvance();
|
|
596
|
+
i0.ɵɵtwoWayProperty("ngModel", entity_r25.EntityID);
|
|
597
|
+
i0.ɵɵproperty("name", "entity_" + entity_r25.ID)("data", ctx_r2.getEntityOptions())("valuePrimitive", true);
|
|
598
|
+
} }
|
|
599
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_1_For_3_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
600
|
+
i0.ɵɵelementStart(0, "div", 94)(1, "div", 115)(2, "span", 116);
|
|
601
|
+
i0.ɵɵelement(3, "i", 125);
|
|
602
|
+
i0.ɵɵtext(4, " Data Source ");
|
|
603
|
+
i0.ɵɵelementEnd()()();
|
|
604
|
+
} }
|
|
605
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_1_For_3_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
606
|
+
const _r26 = i0.ɵɵgetCurrentView();
|
|
607
|
+
i0.ɵɵelementStart(0, "div", 118)(1, "button", 126);
|
|
608
|
+
i0.ɵɵlistener("click", function QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_1_For_3_Conditional_7_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r26); const entity_r25 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r2.deleteEntity(entity_r25)); });
|
|
609
|
+
i0.ɵɵelement(2, "i", 103);
|
|
610
|
+
i0.ɵɵelementEnd()();
|
|
611
|
+
} }
|
|
612
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_1_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
613
|
+
i0.ɵɵelementStart(0, "div", 110)(1, "div", 89)(2, "div", 90);
|
|
614
|
+
i0.ɵɵelement(3, "i", 122);
|
|
615
|
+
i0.ɵɵtext(4);
|
|
616
|
+
i0.ɵɵelementEnd();
|
|
617
|
+
i0.ɵɵtemplate(5, QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_1_For_3_Conditional_5_Template, 2, 4, "div", 123);
|
|
618
|
+
i0.ɵɵelementEnd();
|
|
619
|
+
i0.ɵɵtemplate(6, QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_1_For_3_Conditional_6_Template, 5, 0, "div", 94)(7, QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_1_For_3_Conditional_7_Template, 3, 0, "div", 118);
|
|
620
|
+
i0.ɵɵelementEnd();
|
|
621
|
+
} if (rf & 2) {
|
|
622
|
+
const entity_r25 = ctx.$implicit;
|
|
623
|
+
const ctx_r2 = i0.ɵɵnextContext(5);
|
|
624
|
+
i0.ɵɵadvance(4);
|
|
625
|
+
i0.ɵɵtextInterpolate1(" ", entity_r25.Entity || "Select Entity...", " ");
|
|
626
|
+
i0.ɵɵadvance();
|
|
627
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 5 : -1);
|
|
628
|
+
i0.ɵɵadvance();
|
|
629
|
+
i0.ɵɵconditional(!ctx_r2.EditMode && entity_r25.Entity ? 6 : -1);
|
|
630
|
+
i0.ɵɵadvance();
|
|
631
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 7 : -1);
|
|
632
|
+
} }
|
|
633
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
634
|
+
i0.ɵɵtemplate(0, QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_1_Conditional_0_Template, 4, 0, "div", 86);
|
|
635
|
+
i0.ɵɵelementStart(1, "div", 79);
|
|
636
|
+
i0.ɵɵrepeaterCreate(2, QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_1_For_3_Template, 8, 4, "div", 110, _forTrack2);
|
|
637
|
+
i0.ɵɵelementEnd();
|
|
638
|
+
} if (rf & 2) {
|
|
639
|
+
const ctx_r2 = i0.ɵɵnextContext(4);
|
|
640
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 0 : -1);
|
|
641
|
+
i0.ɵɵadvance(2);
|
|
642
|
+
i0.ɵɵrepeater(ctx_r2.queryEntities);
|
|
643
|
+
} }
|
|
644
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
645
|
+
i0.ɵɵtemplate(0, QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_0_Template, 7, 1, "div", 78)(1, QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Conditional_1_Template, 4, 1, "div", 79);
|
|
646
|
+
} if (rf & 2) {
|
|
647
|
+
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
648
|
+
i0.ɵɵconditional(ctx_r2.queryEntities.length === 0 ? 0 : 1);
|
|
649
|
+
} }
|
|
650
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_34_Template(rf, ctx) { if (rf & 1) {
|
|
651
|
+
const _r21 = i0.ɵɵgetCurrentView();
|
|
652
|
+
i0.ɵɵelementStart(0, "kendo-expansionpanel", 23);
|
|
653
|
+
i0.ɵɵtwoWayListener("expandedChange", function QueryFormExtendedComponent_Conditional_1_Conditional_34_Template_kendo_expansionpanel_expandedChange_0_listener($event) { i0.ɵɵrestoreView(_r21); const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r2.entitiesPanelExpanded, $event) || (ctx_r2.entitiesPanelExpanded = $event); return i0.ɵɵresetView($event); });
|
|
654
|
+
i0.ɵɵtemplate(1, QueryFormExtendedComponent_Conditional_1_Conditional_34_ng_template_1_Template, 4, 1, "ng-template", 24);
|
|
655
|
+
i0.ɵɵelementStart(2, "div", 72);
|
|
656
|
+
i0.ɵɵtemplate(3, QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_3_Template, 2, 0, "div", 104)(4, QueryFormExtendedComponent_Conditional_1_Conditional_34_Conditional_4_Template, 2, 1);
|
|
657
|
+
i0.ɵɵelementEnd()();
|
|
658
|
+
} if (rf & 2) {
|
|
659
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
660
|
+
i0.ɵɵtwoWayProperty("expanded", ctx_r2.entitiesPanelExpanded);
|
|
661
|
+
i0.ɵɵadvance(3);
|
|
662
|
+
i0.ɵɵconditional(ctx_r2.isLoadingEntities ? 3 : 4);
|
|
663
|
+
} }
|
|
664
|
+
function QueryFormExtendedComponent_Conditional_1_ng_template_36_Template(rf, ctx) { if (rf & 1) {
|
|
665
|
+
i0.ɵɵelementStart(0, "span", 56);
|
|
666
|
+
i0.ɵɵelement(1, "i", 127);
|
|
667
|
+
i0.ɵɵtext(2, " Query Details ");
|
|
668
|
+
i0.ɵɵelementEnd();
|
|
669
|
+
} }
|
|
670
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_43_Template(rf, ctx) { if (rf & 1) {
|
|
671
|
+
const _r27 = i0.ɵɵgetCurrentView();
|
|
672
|
+
i0.ɵɵelementStart(0, "kendo-switch", 128);
|
|
673
|
+
i0.ɵɵtwoWayListener("ngModelChange", function QueryFormExtendedComponent_Conditional_1_Conditional_43_Template_kendo_switch_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r27); const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r2.record.UsesTemplate, $event) || (ctx_r2.record.UsesTemplate = $event); return i0.ɵɵresetView($event); });
|
|
674
|
+
i0.ɵɵelementEnd();
|
|
675
|
+
} if (rf & 2) {
|
|
676
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
677
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r2.record.UsesTemplate);
|
|
678
|
+
} }
|
|
679
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_44_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
680
|
+
i0.ɵɵelementStart(0, "span", 129);
|
|
681
|
+
i0.ɵɵelement(1, "i", 63);
|
|
682
|
+
i0.ɵɵtext(2, " Uses Templates");
|
|
683
|
+
i0.ɵɵelementEnd();
|
|
684
|
+
} }
|
|
685
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_44_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
686
|
+
i0.ɵɵelementStart(0, "span", 77);
|
|
687
|
+
i0.ɵɵelement(1, "i", 130);
|
|
688
|
+
i0.ɵɵtext(2, " No Templates");
|
|
689
|
+
i0.ɵɵelementEnd();
|
|
690
|
+
} }
|
|
691
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_44_Template(rf, ctx) { if (rf & 1) {
|
|
692
|
+
i0.ɵɵelementStart(0, "div", 35);
|
|
693
|
+
i0.ɵɵtemplate(1, QueryFormExtendedComponent_Conditional_1_Conditional_44_Conditional_1_Template, 3, 0, "span", 129)(2, QueryFormExtendedComponent_Conditional_1_Conditional_44_Conditional_2_Template, 3, 0, "span", 77);
|
|
694
|
+
i0.ɵɵelementEnd();
|
|
695
|
+
} if (rf & 2) {
|
|
696
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
697
|
+
i0.ɵɵadvance();
|
|
698
|
+
i0.ɵɵconditional(ctx_r2.record.UsesTemplate ? 1 : 2);
|
|
699
|
+
} }
|
|
700
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_57_Template(rf, ctx) { if (rf & 1) {
|
|
701
|
+
i0.ɵɵelementStart(0, "div", 31)(1, "label", 32);
|
|
702
|
+
i0.ɵɵelement(2, "i", 131);
|
|
703
|
+
i0.ɵɵtext(3, " Quality Rank ");
|
|
704
|
+
i0.ɵɵelementEnd();
|
|
705
|
+
i0.ɵɵelementStart(4, "div", 35);
|
|
706
|
+
i0.ɵɵtext(5);
|
|
707
|
+
i0.ɵɵelementEnd()();
|
|
708
|
+
} if (rf & 2) {
|
|
709
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
710
|
+
i0.ɵɵadvance(5);
|
|
711
|
+
i0.ɵɵtextInterpolate1("", ctx_r2.record.QualityRank, "/10");
|
|
712
|
+
} }
|
|
713
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_58_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
714
|
+
i0.ɵɵelementStart(0, "span", 56);
|
|
715
|
+
i0.ɵɵelement(1, "i", 132);
|
|
716
|
+
i0.ɵɵtext(2, " Query Permissions ");
|
|
717
|
+
i0.ɵɵelementEnd();
|
|
718
|
+
} }
|
|
719
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_58_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
720
|
+
i0.ɵɵelementStart(0, "div", 104);
|
|
721
|
+
i0.ɵɵelement(1, "i", 106);
|
|
722
|
+
i0.ɵɵelementEnd();
|
|
723
|
+
} }
|
|
724
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_58_Conditional_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
725
|
+
i0.ɵɵelementStart(0, "div", 78);
|
|
726
|
+
i0.ɵɵelement(1, "i", 133);
|
|
727
|
+
i0.ɵɵelementStart(2, "h5", 108);
|
|
728
|
+
i0.ɵɵtext(3, "No Permissions Set");
|
|
729
|
+
i0.ɵɵelementEnd();
|
|
730
|
+
i0.ɵɵelementStart(4, "div", 134);
|
|
731
|
+
i0.ɵɵtext(5, " This query uses default permissions. ");
|
|
732
|
+
i0.ɵɵelementEnd()();
|
|
733
|
+
} }
|
|
734
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_58_Conditional_4_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
735
|
+
i0.ɵɵelement(0, "mj-user-view-grid", 135);
|
|
736
|
+
} if (rf & 2) {
|
|
737
|
+
const ctx_r2 = i0.ɵɵnextContext(5);
|
|
738
|
+
i0.ɵɵproperty("Params", ctx_r2.BuildRelationshipViewParamsByEntityName("Query Permissions", "QueryID"))("NewRecordValues", ctx_r2.NewRecordValues("Query Permissions"))("AllowLoad", true)("EditMode", ctx_r2.GridEditMode());
|
|
739
|
+
} }
|
|
740
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_58_Conditional_4_Conditional_1_Conditional_1_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
741
|
+
i0.ɵɵelementStart(0, "div", 137)(1, "div", 9);
|
|
742
|
+
i0.ɵɵelement(2, "i", 138);
|
|
743
|
+
i0.ɵɵelementStart(3, "div", 139)(4, "div", 140);
|
|
744
|
+
i0.ɵɵtext(5);
|
|
745
|
+
i0.ɵɵelementEnd();
|
|
746
|
+
i0.ɵɵelementStart(6, "div", 141);
|
|
747
|
+
i0.ɵɵtext(7, " Role Permission ");
|
|
748
|
+
i0.ɵɵelementEnd()();
|
|
749
|
+
i0.ɵɵelementStart(8, "div", 142)(9, "span", 143);
|
|
750
|
+
i0.ɵɵelement(10, "i", 42);
|
|
751
|
+
i0.ɵɵtext(11, " Can Execute ");
|
|
752
|
+
i0.ɵɵelementEnd()()()();
|
|
753
|
+
} if (rf & 2) {
|
|
754
|
+
const permission_r29 = ctx.$implicit;
|
|
755
|
+
i0.ɵɵadvance(5);
|
|
756
|
+
i0.ɵɵtextInterpolate1(" ", permission_r29.Role, " ");
|
|
757
|
+
} }
|
|
758
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_58_Conditional_4_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
759
|
+
i0.ɵɵelementStart(0, "div", 136);
|
|
760
|
+
i0.ɵɵrepeaterCreate(1, QueryFormExtendedComponent_Conditional_1_Conditional_58_Conditional_4_Conditional_1_Conditional_1_For_2_Template, 12, 1, "div", 137, _forTrack2);
|
|
761
|
+
i0.ɵɵelementEnd();
|
|
762
|
+
} if (rf & 2) {
|
|
763
|
+
const ctx_r2 = i0.ɵɵnextContext(5);
|
|
764
|
+
i0.ɵɵadvance();
|
|
765
|
+
i0.ɵɵrepeater(ctx_r2.queryPermissions);
|
|
766
|
+
} }
|
|
767
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_58_Conditional_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
768
|
+
i0.ɵɵtemplate(0, QueryFormExtendedComponent_Conditional_1_Conditional_58_Conditional_4_Conditional_1_Conditional_0_Template, 1, 4, "mj-user-view-grid", 135)(1, QueryFormExtendedComponent_Conditional_1_Conditional_58_Conditional_4_Conditional_1_Conditional_1_Template, 3, 0, "div", 136);
|
|
769
|
+
} if (rf & 2) {
|
|
770
|
+
const ctx_r2 = i0.ɵɵnextContext(4);
|
|
771
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 0 : 1);
|
|
772
|
+
} }
|
|
773
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_58_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
774
|
+
i0.ɵɵtemplate(0, QueryFormExtendedComponent_Conditional_1_Conditional_58_Conditional_4_Conditional_0_Template, 6, 0, "div", 78)(1, QueryFormExtendedComponent_Conditional_1_Conditional_58_Conditional_4_Conditional_1_Template, 2, 1);
|
|
775
|
+
} if (rf & 2) {
|
|
776
|
+
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
777
|
+
i0.ɵɵconditional(ctx_r2.queryPermissions.length === 0 && !ctx_r2.EditMode ? 0 : 1);
|
|
778
|
+
} }
|
|
779
|
+
function QueryFormExtendedComponent_Conditional_1_Conditional_58_Template(rf, ctx) { if (rf & 1) {
|
|
780
|
+
const _r28 = i0.ɵɵgetCurrentView();
|
|
781
|
+
i0.ɵɵelementStart(0, "kendo-expansionpanel", 23);
|
|
782
|
+
i0.ɵɵtwoWayListener("expandedChange", function QueryFormExtendedComponent_Conditional_1_Conditional_58_Template_kendo_expansionpanel_expandedChange_0_listener($event) { i0.ɵɵrestoreView(_r28); const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r2.permissionsPanelExpanded, $event) || (ctx_r2.permissionsPanelExpanded = $event); return i0.ɵɵresetView($event); });
|
|
783
|
+
i0.ɵɵtemplate(1, QueryFormExtendedComponent_Conditional_1_Conditional_58_ng_template_1_Template, 3, 0, "ng-template", 24);
|
|
784
|
+
i0.ɵɵelementStart(2, "div", 72);
|
|
785
|
+
i0.ɵɵtemplate(3, QueryFormExtendedComponent_Conditional_1_Conditional_58_Conditional_3_Template, 2, 0, "div", 104)(4, QueryFormExtendedComponent_Conditional_1_Conditional_58_Conditional_4_Template, 2, 1);
|
|
786
|
+
i0.ɵɵelementEnd()();
|
|
787
|
+
} if (rf & 2) {
|
|
788
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
789
|
+
i0.ɵɵtwoWayProperty("expanded", ctx_r2.permissionsPanelExpanded);
|
|
790
|
+
i0.ɵɵadvance(3);
|
|
791
|
+
i0.ɵɵconditional(ctx_r2.isLoadingPermissions ? 3 : 4);
|
|
792
|
+
} }
|
|
793
|
+
function QueryFormExtendedComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
794
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
795
|
+
i0.ɵɵelementStart(0, "form", 3, 0);
|
|
796
|
+
i0.ɵɵelement(2, "mj-form-toolbar", 4);
|
|
797
|
+
i0.ɵɵelementStart(3, "div", 5)(4, "div", 6)(5, "div", 7)(6, "div", 8)(7, "div", 9);
|
|
798
|
+
i0.ɵɵelement(8, "i", 10);
|
|
799
|
+
i0.ɵɵtemplate(9, QueryFormExtendedComponent_Conditional_1_Conditional_9_Template, 1, 1, "kendo-textbox", 11)(10, QueryFormExtendedComponent_Conditional_1_Conditional_10_Template, 2, 1, "h4", 12);
|
|
800
|
+
i0.ɵɵelementEnd()();
|
|
801
|
+
i0.ɵɵelementStart(11, "div", 13);
|
|
802
|
+
i0.ɵɵtemplate(12, QueryFormExtendedComponent_Conditional_1_Conditional_12_Template, 3, 3, "button", 14);
|
|
803
|
+
i0.ɵɵelementEnd()();
|
|
804
|
+
i0.ɵɵelementStart(13, "div", 15)(14, "div", 9)(15, "label", 16);
|
|
805
|
+
i0.ɵɵtext(16, "Category:");
|
|
806
|
+
i0.ɵɵelementEnd();
|
|
807
|
+
i0.ɵɵtemplate(17, QueryFormExtendedComponent_Conditional_1_Conditional_17_Template, 1, 3, "kendo-dropdownlist", 17)(18, QueryFormExtendedComponent_Conditional_1_Conditional_18_Template, 2, 1, "span", 18);
|
|
808
|
+
i0.ɵɵelementEnd();
|
|
809
|
+
i0.ɵɵelementStart(19, "div", 9)(20, "label", 19);
|
|
810
|
+
i0.ɵɵtext(21, "Status:");
|
|
811
|
+
i0.ɵɵelementEnd();
|
|
812
|
+
i0.ɵɵtemplate(22, QueryFormExtendedComponent_Conditional_1_Conditional_22_Template, 1, 3, "kendo-dropdownlist", 20)(23, QueryFormExtendedComponent_Conditional_1_Conditional_23_Template, 5, 6, "span", 21);
|
|
813
|
+
i0.ɵɵelementEnd()();
|
|
814
|
+
i0.ɵɵtemplate(24, QueryFormExtendedComponent_Conditional_1_Conditional_24_Template, 3, 1, "div");
|
|
815
|
+
i0.ɵɵelementEnd()();
|
|
816
|
+
i0.ɵɵelementStart(25, "div", 22)(26, "kendo-expansionpanel", 23);
|
|
817
|
+
i0.ɵɵtwoWayListener("expandedChange", function QueryFormExtendedComponent_Conditional_1_Template_kendo_expansionpanel_expandedChange_26_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r2.sqlPanelExpanded, $event) || (ctx_r2.sqlPanelExpanded = $event); return i0.ɵɵresetView($event); });
|
|
818
|
+
i0.ɵɵtemplate(27, QueryFormExtendedComponent_Conditional_1_ng_template_27_Template, 10, 2, "ng-template", 24);
|
|
819
|
+
i0.ɵɵelementStart(28, "div", 25)(29, "mj-code-editor", 26, 1);
|
|
820
|
+
i0.ɵɵlistener("change", function QueryFormExtendedComponent_Conditional_1_Template_mj_code_editor_change_29_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onSQLChange($event)); });
|
|
821
|
+
i0.ɵɵelementEnd();
|
|
822
|
+
i0.ɵɵtemplate(31, QueryFormExtendedComponent_Conditional_1_Conditional_31_Template, 7, 0, "div", 27);
|
|
823
|
+
i0.ɵɵelementEnd()();
|
|
824
|
+
i0.ɵɵtemplate(32, QueryFormExtendedComponent_Conditional_1_Conditional_32_Template, 5, 2, "kendo-expansionpanel", 28)(33, QueryFormExtendedComponent_Conditional_1_Conditional_33_Template, 5, 2, "kendo-expansionpanel", 28)(34, QueryFormExtendedComponent_Conditional_1_Conditional_34_Template, 5, 2, "kendo-expansionpanel", 28);
|
|
825
|
+
i0.ɵɵelementStart(35, "kendo-expansionpanel", 23);
|
|
826
|
+
i0.ɵɵtwoWayListener("expandedChange", function QueryFormExtendedComponent_Conditional_1_Template_kendo_expansionpanel_expandedChange_35_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r2.detailsPanelExpanded, $event) || (ctx_r2.detailsPanelExpanded = $event); return i0.ɵɵresetView($event); });
|
|
827
|
+
i0.ɵɵtemplate(36, QueryFormExtendedComponent_Conditional_1_ng_template_36_Template, 3, 0, "ng-template", 24);
|
|
828
|
+
i0.ɵɵelementStart(37, "div", 29)(38, "div", 30)(39, "div", 31)(40, "label", 32);
|
|
829
|
+
i0.ɵɵelement(41, "i", 33);
|
|
830
|
+
i0.ɵɵtext(42, " Template Usage ");
|
|
831
|
+
i0.ɵɵelementEnd();
|
|
832
|
+
i0.ɵɵtemplate(43, QueryFormExtendedComponent_Conditional_1_Conditional_43_Template, 1, 1, "kendo-switch", 34)(44, QueryFormExtendedComponent_Conditional_1_Conditional_44_Template, 3, 1, "div", 35);
|
|
833
|
+
i0.ɵɵelementEnd();
|
|
834
|
+
i0.ɵɵelementStart(45, "div", 31)(46, "label", 32);
|
|
835
|
+
i0.ɵɵelement(47, "i", 36);
|
|
836
|
+
i0.ɵɵtext(48, " Created ");
|
|
837
|
+
i0.ɵɵelementEnd();
|
|
838
|
+
i0.ɵɵelementStart(49, "div", 35);
|
|
839
|
+
i0.ɵɵtext(50);
|
|
840
|
+
i0.ɵɵelementEnd()();
|
|
841
|
+
i0.ɵɵelementStart(51, "div", 31)(52, "label", 32);
|
|
842
|
+
i0.ɵɵelement(53, "i", 37);
|
|
843
|
+
i0.ɵɵtext(54, " Last Updated ");
|
|
844
|
+
i0.ɵɵelementEnd();
|
|
845
|
+
i0.ɵɵelementStart(55, "div", 35);
|
|
846
|
+
i0.ɵɵtext(56);
|
|
847
|
+
i0.ɵɵelementEnd()();
|
|
848
|
+
i0.ɵɵtemplate(57, QueryFormExtendedComponent_Conditional_1_Conditional_57_Template, 6, 1, "div", 31);
|
|
849
|
+
i0.ɵɵelementEnd()()();
|
|
850
|
+
i0.ɵɵtemplate(58, QueryFormExtendedComponent_Conditional_1_Conditional_58_Template, 5, 2, "kendo-expansionpanel", 28);
|
|
851
|
+
i0.ɵɵelementEnd()();
|
|
852
|
+
i0.ɵɵelementStart(59, "mj-query-run-dialog", 38);
|
|
853
|
+
i0.ɵɵtwoWayListener("isVisibleChange", function QueryFormExtendedComponent_Conditional_1_Template_mj_query_run_dialog_isVisibleChange_59_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r2.showRunDialog, $event) || (ctx_r2.showRunDialog = $event); return i0.ɵɵresetView($event); });
|
|
854
|
+
i0.ɵɵlistener("onClose", function QueryFormExtendedComponent_Conditional_1_Template_mj_query_run_dialog_onClose_59_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onRunDialogClose()); });
|
|
855
|
+
i0.ɵɵelementEnd();
|
|
856
|
+
i0.ɵɵelementStart(60, "mj-query-category-dialog", 39);
|
|
857
|
+
i0.ɵɵtwoWayListener("isVisibleChange", function QueryFormExtendedComponent_Conditional_1_Template_mj_query_category_dialog_isVisibleChange_60_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r2.showCategoryDialog, $event) || (ctx_r2.showCategoryDialog = $event); return i0.ɵɵresetView($event); });
|
|
858
|
+
i0.ɵɵlistener("onCategoryCreated", function QueryFormExtendedComponent_Conditional_1_Template_mj_query_category_dialog_onCategoryCreated_60_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onCategoryCreated($event)); });
|
|
859
|
+
i0.ɵɵelementEnd();
|
|
860
|
+
} if (rf & 2) {
|
|
861
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
862
|
+
i0.ɵɵadvance(2);
|
|
863
|
+
i0.ɵɵproperty("form", ctx_r2);
|
|
864
|
+
i0.ɵɵadvance(7);
|
|
865
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 9 : 10);
|
|
866
|
+
i0.ɵɵadvance(3);
|
|
867
|
+
i0.ɵɵconditional(ctx_r2.record.ID ? 12 : -1);
|
|
868
|
+
i0.ɵɵadvance(5);
|
|
869
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 17 : 18);
|
|
870
|
+
i0.ɵɵadvance(5);
|
|
871
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 22 : 23);
|
|
872
|
+
i0.ɵɵadvance(2);
|
|
873
|
+
i0.ɵɵconditional(ctx_r2.EditMode || ctx_r2.record.Description ? 24 : -1);
|
|
874
|
+
i0.ɵɵadvance(2);
|
|
875
|
+
i0.ɵɵtwoWayProperty("expanded", ctx_r2.sqlPanelExpanded);
|
|
876
|
+
i0.ɵɵadvance(3);
|
|
877
|
+
i0.ɵɵproperty("language", "sql");
|
|
878
|
+
i0.ɵɵadvance(2);
|
|
879
|
+
i0.ɵɵconditional(ctx_r2.showFiltersHelp ? 31 : -1);
|
|
880
|
+
i0.ɵɵadvance();
|
|
881
|
+
i0.ɵɵconditional(ctx_r2.record.IsSaved ? 32 : -1);
|
|
882
|
+
i0.ɵɵadvance();
|
|
883
|
+
i0.ɵɵconditional(ctx_r2.record.IsSaved ? 33 : -1);
|
|
884
|
+
i0.ɵɵadvance();
|
|
885
|
+
i0.ɵɵconditional(ctx_r2.record.IsSaved ? 34 : -1);
|
|
886
|
+
i0.ɵɵadvance();
|
|
887
|
+
i0.ɵɵtwoWayProperty("expanded", ctx_r2.detailsPanelExpanded);
|
|
888
|
+
i0.ɵɵadvance(8);
|
|
889
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 43 : 44);
|
|
890
|
+
i0.ɵɵadvance(7);
|
|
891
|
+
i0.ɵɵtextInterpolate(ctx_r2.formatDate(ctx_r2.record.__mj_CreatedAt));
|
|
892
|
+
i0.ɵɵadvance(6);
|
|
893
|
+
i0.ɵɵtextInterpolate(ctx_r2.formatDate(ctx_r2.record.__mj_UpdatedAt));
|
|
894
|
+
i0.ɵɵadvance();
|
|
895
|
+
i0.ɵɵconditional(ctx_r2.record.QualityRank != null ? 57 : -1);
|
|
896
|
+
i0.ɵɵadvance();
|
|
897
|
+
i0.ɵɵconditional(ctx_r2.record.IsSaved ? 58 : -1);
|
|
898
|
+
i0.ɵɵadvance();
|
|
899
|
+
i0.ɵɵproperty("query", ctx_r2.record)("parameters", ctx_r2.queryParameters);
|
|
900
|
+
i0.ɵɵtwoWayProperty("isVisible", ctx_r2.showRunDialog);
|
|
901
|
+
i0.ɵɵadvance();
|
|
902
|
+
i0.ɵɵtwoWayProperty("isVisible", ctx_r2.showCategoryDialog);
|
|
903
|
+
} }
|
|
904
|
+
let QueryFormExtendedComponent = class QueryFormExtendedComponent extends QueryFormComponent {
|
|
905
|
+
constructor() {
|
|
906
|
+
super(...arguments);
|
|
907
|
+
this.queryParameters = [];
|
|
908
|
+
this.queryFields = [];
|
|
909
|
+
this.queryEntities = [];
|
|
910
|
+
this.queryPermissions = [];
|
|
911
|
+
this.isLoadingParameters = false;
|
|
912
|
+
this.isLoadingFields = false;
|
|
913
|
+
this.isLoadingEntities = false;
|
|
914
|
+
this.isLoadingPermissions = false;
|
|
915
|
+
this.hasUnsavedChanges = false;
|
|
916
|
+
this.showFiltersHelp = false;
|
|
917
|
+
this.showRunDialog = false;
|
|
918
|
+
this.showCategoryDialog = false;
|
|
919
|
+
// Expansion panel states
|
|
920
|
+
this.sqlPanelExpanded = true;
|
|
921
|
+
this.parametersPanelExpanded = false;
|
|
922
|
+
this.fieldsPanelExpanded = false;
|
|
923
|
+
this.entitiesPanelExpanded = false;
|
|
924
|
+
this.detailsPanelExpanded = false;
|
|
925
|
+
this.permissionsPanelExpanded = false;
|
|
926
|
+
// Category data
|
|
927
|
+
this.categoryOptions = [
|
|
928
|
+
{ text: 'Select Category...', value: '' }
|
|
929
|
+
];
|
|
930
|
+
this.categories = [];
|
|
931
|
+
this.categoryTreeData = [];
|
|
932
|
+
this.isCategoriesLoaded = false;
|
|
933
|
+
// Status options
|
|
934
|
+
this.statusOptions = [
|
|
935
|
+
{ text: 'Pending', value: 'Pending' },
|
|
936
|
+
{ text: 'Approved', value: 'Approved' },
|
|
937
|
+
{ text: 'Rejected', value: 'Rejected' },
|
|
938
|
+
{ text: 'Expired', value: 'Expired' }
|
|
939
|
+
];
|
|
940
|
+
this.sqlEditor = null;
|
|
941
|
+
// SQL Filters for help display
|
|
942
|
+
this.sqlFilters = RUN_QUERY_SQL_FILTERS;
|
|
943
|
+
this.destroy$ = new Subject();
|
|
944
|
+
this.isUpdatingEditorValue = false;
|
|
945
|
+
}
|
|
946
|
+
async ngOnInit() {
|
|
947
|
+
await super.ngOnInit();
|
|
948
|
+
// Load categories first to ensure they're available for the dropdown
|
|
949
|
+
await this.loadCategories();
|
|
950
|
+
// Then load other data in parallel
|
|
951
|
+
await Promise.all([
|
|
952
|
+
this.loadQueryParameters(),
|
|
953
|
+
this.loadQueryFields(),
|
|
954
|
+
this.loadQueryEntities(),
|
|
955
|
+
this.loadQueryPermissions()
|
|
956
|
+
]);
|
|
957
|
+
// Ensure form is properly initialized after all data is loaded
|
|
958
|
+
this.cdr.detectChanges();
|
|
959
|
+
}
|
|
960
|
+
ngOnDestroy() {
|
|
961
|
+
this.destroy$.next();
|
|
962
|
+
this.destroy$.complete();
|
|
963
|
+
}
|
|
964
|
+
ngAfterViewInit() {
|
|
965
|
+
super.ngAfterViewInit();
|
|
966
|
+
this.sqlEditor?.setEditable(this.EditMode);
|
|
967
|
+
// Set initial SQL value in the editor
|
|
968
|
+
this.updateEditorValue();
|
|
969
|
+
// Ensure all form controls are properly initialized with data
|
|
970
|
+
setTimeout(() => {
|
|
971
|
+
// Force Angular to update all bindings
|
|
972
|
+
this.cdr.detectChanges();
|
|
973
|
+
// If in edit mode, trigger another update to ensure Kendo components are initialized
|
|
974
|
+
if (this.EditMode) {
|
|
975
|
+
setTimeout(() => {
|
|
976
|
+
this.cdr.detectChanges();
|
|
977
|
+
}, 50);
|
|
978
|
+
}
|
|
979
|
+
}, 100);
|
|
980
|
+
}
|
|
981
|
+
EndEditMode() {
|
|
982
|
+
super.EndEditMode();
|
|
983
|
+
this.sqlEditor?.setEditable(false);
|
|
984
|
+
}
|
|
985
|
+
StartEditMode() {
|
|
986
|
+
super.StartEditMode();
|
|
987
|
+
this.sqlEditor?.setEditable(true);
|
|
988
|
+
// Force change detection after a brief delay to ensure form controls are initialized
|
|
989
|
+
setTimeout(() => {
|
|
990
|
+
this.cdr.detectChanges();
|
|
991
|
+
}, 50);
|
|
992
|
+
}
|
|
993
|
+
CancelEdit() {
|
|
994
|
+
super.CancelEdit();
|
|
995
|
+
this.updateEditorValue(); // Reset editor value to record SQL
|
|
996
|
+
this.sqlEditor?.setEditable(false);
|
|
997
|
+
this.updateUnsavedChangesFlag(); // Reset unsaved changes flag
|
|
998
|
+
}
|
|
999
|
+
updateEditorValue() {
|
|
1000
|
+
if (!this.sqlEditor || this.isUpdatingEditorValue) {
|
|
1001
|
+
return;
|
|
1002
|
+
}
|
|
1003
|
+
// Use setTimeout to avoid ExpressionChangedAfterItHasBeenCheckedError
|
|
1004
|
+
setTimeout(() => {
|
|
1005
|
+
if (!this.sqlEditor) {
|
|
1006
|
+
return;
|
|
1007
|
+
}
|
|
1008
|
+
this.isUpdatingEditorValue = true;
|
|
1009
|
+
const sqlValue = this.record?.SQL || '';
|
|
1010
|
+
// Use the setValue method from mj-code-editor component
|
|
1011
|
+
this.sqlEditor.setValue(sqlValue);
|
|
1012
|
+
this.isUpdatingEditorValue = false;
|
|
1013
|
+
}, 0);
|
|
1014
|
+
}
|
|
1015
|
+
isFormReadOnly() {
|
|
1016
|
+
return !this.EditMode;
|
|
1017
|
+
}
|
|
1018
|
+
async loadQueryParameters() {
|
|
1019
|
+
if (this.record && this.record.ID) {
|
|
1020
|
+
this.isLoadingParameters = true;
|
|
1021
|
+
try {
|
|
1022
|
+
const rv = new RunView();
|
|
1023
|
+
const results = await rv.RunView({
|
|
1024
|
+
EntityName: 'MJ: Query Parameters',
|
|
1025
|
+
ExtraFilter: `QueryID='${this.record.ID}'`,
|
|
1026
|
+
OrderBy: 'Name ASC',
|
|
1027
|
+
ResultType: 'entity_object'
|
|
1028
|
+
});
|
|
1029
|
+
if (results.Success) {
|
|
1030
|
+
this.queryParameters = results.Results || [];
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
catch (error) {
|
|
1034
|
+
console.error('Error loading query parameters:', error);
|
|
1035
|
+
}
|
|
1036
|
+
finally {
|
|
1037
|
+
this.isLoadingParameters = false;
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
async loadQueryFields() {
|
|
1042
|
+
if (this.record && this.record.ID) {
|
|
1043
|
+
this.isLoadingFields = true;
|
|
1044
|
+
try {
|
|
1045
|
+
const rv = new RunView();
|
|
1046
|
+
const results = await rv.RunView({
|
|
1047
|
+
EntityName: 'Query Fields',
|
|
1048
|
+
ExtraFilter: `QueryID='${this.record.ID}'`,
|
|
1049
|
+
OrderBy: 'Sequence ASC, Name ASC',
|
|
1050
|
+
ResultType: 'entity_object'
|
|
1051
|
+
});
|
|
1052
|
+
if (results.Success) {
|
|
1053
|
+
this.queryFields = results.Results || [];
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
catch (error) {
|
|
1057
|
+
console.error('Error loading query fields:', error);
|
|
1058
|
+
}
|
|
1059
|
+
finally {
|
|
1060
|
+
this.isLoadingFields = false;
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
async loadQueryEntities() {
|
|
1065
|
+
if (this.record && this.record.ID) {
|
|
1066
|
+
this.isLoadingEntities = true;
|
|
1067
|
+
try {
|
|
1068
|
+
const rv = new RunView();
|
|
1069
|
+
const results = await rv.RunView({
|
|
1070
|
+
EntityName: 'Query Entities',
|
|
1071
|
+
ExtraFilter: `QueryID='${this.record.ID}'`,
|
|
1072
|
+
OrderBy: 'Entity ASC',
|
|
1073
|
+
ResultType: 'entity_object'
|
|
1074
|
+
});
|
|
1075
|
+
if (results.Success) {
|
|
1076
|
+
this.queryEntities = results.Results || [];
|
|
1077
|
+
console.log('Loaded query entities:', this.queryEntities);
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
catch (error) {
|
|
1081
|
+
console.error('Error loading query entities:', error);
|
|
1082
|
+
}
|
|
1083
|
+
finally {
|
|
1084
|
+
this.isLoadingEntities = false;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
async loadQueryPermissions() {
|
|
1089
|
+
if (this.record && this.record.ID) {
|
|
1090
|
+
this.isLoadingPermissions = true;
|
|
1091
|
+
try {
|
|
1092
|
+
const rv = new RunView();
|
|
1093
|
+
const results = await rv.RunView({
|
|
1094
|
+
EntityName: 'Query Permissions',
|
|
1095
|
+
ExtraFilter: `QueryID='${this.record.ID}'`,
|
|
1096
|
+
OrderBy: 'Type ASC',
|
|
1097
|
+
ResultType: 'entity_object'
|
|
1098
|
+
});
|
|
1099
|
+
if (results.Success) {
|
|
1100
|
+
this.queryPermissions = results.Results || [];
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
catch (error) {
|
|
1104
|
+
console.error('Error loading query permissions:', error);
|
|
1105
|
+
}
|
|
1106
|
+
finally {
|
|
1107
|
+
this.isLoadingPermissions = false;
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
async loadCategories() {
|
|
1112
|
+
try {
|
|
1113
|
+
const rv = new RunView();
|
|
1114
|
+
const results = await rv.RunView({
|
|
1115
|
+
EntityName: 'Query Categories',
|
|
1116
|
+
OrderBy: 'Name',
|
|
1117
|
+
ResultType: 'entity_object'
|
|
1118
|
+
});
|
|
1119
|
+
if (results.Success && results.Results) {
|
|
1120
|
+
this.categories = results.Results;
|
|
1121
|
+
// Build flat options for legacy compatibility
|
|
1122
|
+
this.categoryOptions = [
|
|
1123
|
+
{ text: 'Select Category...', value: '' },
|
|
1124
|
+
...this.categories.map(cat => ({
|
|
1125
|
+
text: cat.Name,
|
|
1126
|
+
value: cat.ID
|
|
1127
|
+
}))
|
|
1128
|
+
];
|
|
1129
|
+
// Build tree data after options are set
|
|
1130
|
+
this.categoryTreeData = this.buildCategoryTree(this.categories);
|
|
1131
|
+
// Trigger change detection to update the view
|
|
1132
|
+
this.cdr.detectChanges();
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
catch (error) {
|
|
1136
|
+
console.error('Error loading categories:', error);
|
|
1137
|
+
this.categoryOptions = [{ text: 'Select Category...', value: '' }];
|
|
1138
|
+
this.categoryTreeData = [];
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
buildCategoryTree(categories) {
|
|
1142
|
+
const categoryMap = new Map();
|
|
1143
|
+
const rootCategories = [];
|
|
1144
|
+
// Create nodes for all categories
|
|
1145
|
+
categories.forEach(cat => {
|
|
1146
|
+
categoryMap.set(cat.ID, {
|
|
1147
|
+
id: cat.ID,
|
|
1148
|
+
name: cat.Name,
|
|
1149
|
+
items: []
|
|
1150
|
+
});
|
|
1151
|
+
});
|
|
1152
|
+
// Build the tree structure
|
|
1153
|
+
categories.forEach(cat => {
|
|
1154
|
+
const node = categoryMap.get(cat.ID);
|
|
1155
|
+
if (cat.ParentID && categoryMap.has(cat.ParentID)) {
|
|
1156
|
+
const parent = categoryMap.get(cat.ParentID);
|
|
1157
|
+
if (!parent.items)
|
|
1158
|
+
parent.items = [];
|
|
1159
|
+
parent.items.push(node);
|
|
1160
|
+
}
|
|
1161
|
+
else {
|
|
1162
|
+
rootCategories.push(node);
|
|
1163
|
+
}
|
|
1164
|
+
});
|
|
1165
|
+
// Sort children alphabetically
|
|
1166
|
+
const sortNodes = (nodes) => {
|
|
1167
|
+
nodes.sort((a, b) => a.name.localeCompare(b.name));
|
|
1168
|
+
nodes.forEach(node => {
|
|
1169
|
+
if (node.items && node.items.length > 0) {
|
|
1170
|
+
sortNodes(node.items);
|
|
1171
|
+
}
|
|
1172
|
+
});
|
|
1173
|
+
};
|
|
1174
|
+
sortNodes(rootCategories);
|
|
1175
|
+
return rootCategories;
|
|
1176
|
+
}
|
|
1177
|
+
getCategoryPath() {
|
|
1178
|
+
if (!this.record.CategoryID)
|
|
1179
|
+
return '';
|
|
1180
|
+
const findPath = (categoryId) => {
|
|
1181
|
+
const category = this.categories.find(c => c.ID === categoryId);
|
|
1182
|
+
if (!category)
|
|
1183
|
+
return [];
|
|
1184
|
+
if (category.ParentID) {
|
|
1185
|
+
return [...findPath(category.ParentID), category.Name];
|
|
1186
|
+
}
|
|
1187
|
+
return [category.Name];
|
|
1188
|
+
};
|
|
1189
|
+
return findPath(this.record.CategoryID).join(' / ');
|
|
1190
|
+
}
|
|
1191
|
+
async onCategoryChange(value) {
|
|
1192
|
+
// If it's a new category (string but not in existing options)
|
|
1193
|
+
if (value && !this.categoryOptions.find(opt => opt.value === value)) {
|
|
1194
|
+
// Check for duplicate category names (case-insensitive, trimmed)
|
|
1195
|
+
if (this.isDuplicateCategory(value)) {
|
|
1196
|
+
const existingCategory = this.categoryOptions.find(option => option.text && option.text.trim().toLowerCase() === value.trim().toLowerCase());
|
|
1197
|
+
if (existingCategory) {
|
|
1198
|
+
// Use the existing category instead
|
|
1199
|
+
this.record.CategoryID = existingCategory.value;
|
|
1200
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Category "${existingCategory.text}" already exists. Using existing category.`, 'warning', 3000);
|
|
1201
|
+
}
|
|
1202
|
+
return;
|
|
1203
|
+
}
|
|
1204
|
+
try {
|
|
1205
|
+
// Create new category with trimmed name
|
|
1206
|
+
const md = new Metadata();
|
|
1207
|
+
const newCategory = await md.GetEntityObject('Query Categories');
|
|
1208
|
+
newCategory.Name = value.trim();
|
|
1209
|
+
const saved = await newCategory.Save();
|
|
1210
|
+
if (saved) {
|
|
1211
|
+
// Add to options and set the ID
|
|
1212
|
+
this.categoryOptions.push({
|
|
1213
|
+
text: newCategory.Name,
|
|
1214
|
+
value: newCategory.ID
|
|
1215
|
+
});
|
|
1216
|
+
this.record.CategoryID = newCategory.ID;
|
|
1217
|
+
MJNotificationService.Instance.CreateSimpleNotification(`New category "${newCategory.Name}" created successfully.`, 'success', 3000);
|
|
1218
|
+
}
|
|
1219
|
+
else {
|
|
1220
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Failed to create new category. ${newCategory.LatestResult?.Message || ''}`, 'error', 3000);
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
catch (error) {
|
|
1224
|
+
console.error('Error creating new category:', error);
|
|
1225
|
+
MJNotificationService.Instance.CreateSimpleNotification('Error creating new category. Please try again.', 'error', 3000);
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
isDuplicateCategory(categoryName) {
|
|
1230
|
+
const normalizedName = categoryName?.trim().toLowerCase();
|
|
1231
|
+
return this.categoryOptions.some(option => option.text && option.text.trim().toLowerCase() === normalizedName);
|
|
1232
|
+
}
|
|
1233
|
+
/**
|
|
1234
|
+
* Updates the hasUnsavedChanges flag based on entity dirty states
|
|
1235
|
+
*/
|
|
1236
|
+
updateUnsavedChangesFlag() {
|
|
1237
|
+
this.hasUnsavedChanges = this.queryParameters.some(param => param.Dirty) ||
|
|
1238
|
+
this.record?.Dirty || false;
|
|
1239
|
+
}
|
|
1240
|
+
toggleFiltersHelp() {
|
|
1241
|
+
this.showFiltersHelp = !this.showFiltersHelp;
|
|
1242
|
+
}
|
|
1243
|
+
/**
|
|
1244
|
+
* Run the query with parameter dialog
|
|
1245
|
+
*/
|
|
1246
|
+
async runQuery() {
|
|
1247
|
+
if (!this.record?.IsSaved) {
|
|
1248
|
+
MJNotificationService.Instance.CreateSimpleNotification('Please save the query before running it.', 'warning', 3000);
|
|
1249
|
+
return;
|
|
1250
|
+
}
|
|
1251
|
+
// Save any unsaved changes first
|
|
1252
|
+
if (this.hasUnsavedChanges) {
|
|
1253
|
+
const saveResult = await this.SaveRecord(false); // Don't exit edit mode
|
|
1254
|
+
if (!saveResult) {
|
|
1255
|
+
MJNotificationService.Instance.CreateSimpleNotification('Failed to save query changes.', 'error', 3000);
|
|
1256
|
+
return;
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
// Reload parameters in case they were updated
|
|
1260
|
+
await this.loadQueryParameters();
|
|
1261
|
+
// Show the run dialog
|
|
1262
|
+
this.showRunDialog = true;
|
|
1263
|
+
}
|
|
1264
|
+
/**
|
|
1265
|
+
* Handle run dialog close
|
|
1266
|
+
*/
|
|
1267
|
+
onRunDialogClose() {
|
|
1268
|
+
this.showRunDialog = false;
|
|
1269
|
+
}
|
|
1270
|
+
/**
|
|
1271
|
+
* Add a new parameter
|
|
1272
|
+
*/
|
|
1273
|
+
async addParameter() {
|
|
1274
|
+
try {
|
|
1275
|
+
const md = new Metadata();
|
|
1276
|
+
const newParam = await md.GetEntityObject('MJ: Query Parameters');
|
|
1277
|
+
newParam.QueryID = this.record.ID;
|
|
1278
|
+
newParam.Name = `param${this.queryParameters.length + 1}`;
|
|
1279
|
+
newParam.Type = 'string';
|
|
1280
|
+
newParam.IsRequired = false;
|
|
1281
|
+
const saved = await newParam.Save();
|
|
1282
|
+
if (saved) {
|
|
1283
|
+
this.queryParameters.push(newParam);
|
|
1284
|
+
this.updateUnsavedChangesFlag();
|
|
1285
|
+
MJNotificationService.Instance.CreateSimpleNotification('Parameter added successfully', 'success', 3000);
|
|
1286
|
+
}
|
|
1287
|
+
else {
|
|
1288
|
+
MJNotificationService.Instance.CreateSimpleNotification('Failed to add parameter', 'error', 3000);
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
catch (error) {
|
|
1292
|
+
console.error('Error adding parameter:', error);
|
|
1293
|
+
MJNotificationService.Instance.CreateSimpleNotification('Error adding parameter', 'error', 3000);
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
/**
|
|
1297
|
+
* Edit a parameter
|
|
1298
|
+
*/
|
|
1299
|
+
async editParameter(param) {
|
|
1300
|
+
// TODO: Show parameter edit dialog
|
|
1301
|
+
console.log('Edit parameter:', param);
|
|
1302
|
+
}
|
|
1303
|
+
/**
|
|
1304
|
+
* Delete a parameter
|
|
1305
|
+
*/
|
|
1306
|
+
async deleteParameter(param) {
|
|
1307
|
+
if (!confirm(`Are you sure you want to delete parameter "${param.Name}"?`)) {
|
|
1308
|
+
return;
|
|
1309
|
+
}
|
|
1310
|
+
try {
|
|
1311
|
+
const deleted = await param.Delete();
|
|
1312
|
+
if (deleted) {
|
|
1313
|
+
const index = this.queryParameters.indexOf(param);
|
|
1314
|
+
if (index > -1) {
|
|
1315
|
+
this.queryParameters.splice(index, 1);
|
|
1316
|
+
}
|
|
1317
|
+
MJNotificationService.Instance.CreateSimpleNotification('Parameter deleted successfully', 'success', 3000);
|
|
1318
|
+
}
|
|
1319
|
+
else {
|
|
1320
|
+
MJNotificationService.Instance.CreateSimpleNotification('Failed to delete parameter', 'error', 3000);
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
catch (error) {
|
|
1324
|
+
console.error('Error deleting parameter:', error);
|
|
1325
|
+
MJNotificationService.Instance.CreateSimpleNotification('Error deleting parameter', 'error', 3000);
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
/**
|
|
1329
|
+
* Handle category creation from dialog
|
|
1330
|
+
*/
|
|
1331
|
+
async onCategoryCreated(newCategory) {
|
|
1332
|
+
// Reload categories to include the new one
|
|
1333
|
+
await this.loadCategories();
|
|
1334
|
+
// Set the new category as selected
|
|
1335
|
+
this.record.CategoryID = newCategory.ID;
|
|
1336
|
+
// Trigger change detection
|
|
1337
|
+
this.cdr.detectChanges();
|
|
1338
|
+
}
|
|
1339
|
+
/**
|
|
1340
|
+
* Format date for display
|
|
1341
|
+
*/
|
|
1342
|
+
formatDate(date) {
|
|
1343
|
+
if (!date)
|
|
1344
|
+
return '-';
|
|
1345
|
+
const d = typeof date === 'string' ? new Date(date) : date;
|
|
1346
|
+
return d.toLocaleDateString() + ' ' + d.toLocaleTimeString();
|
|
1347
|
+
}
|
|
1348
|
+
async SaveRecord(StopEditModeAfterSave = true) {
|
|
1349
|
+
// Handle category creation before saving query
|
|
1350
|
+
if (this.record.CategoryID && !this.categoryOptions.find(opt => opt.value === this.record.CategoryID)) {
|
|
1351
|
+
if (this.isDuplicateCategory(this.record.CategoryID)) {
|
|
1352
|
+
const existingCategory = this.categoryOptions.find(option => option.text && option.text.trim().toLowerCase() === this.record.CategoryID?.trim().toLowerCase());
|
|
1353
|
+
if (existingCategory) {
|
|
1354
|
+
this.record.CategoryID = existingCategory.value;
|
|
1355
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Category "${existingCategory.text}" already exists. Using existing category.`, 'warning', 3000);
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
else {
|
|
1359
|
+
try {
|
|
1360
|
+
const md = new Metadata();
|
|
1361
|
+
const newCategory = await md.GetEntityObject('Query Categories');
|
|
1362
|
+
newCategory.Name = this.record.CategoryID.trim();
|
|
1363
|
+
const saved = await newCategory.Save();
|
|
1364
|
+
if (saved) {
|
|
1365
|
+
this.categoryOptions.push({
|
|
1366
|
+
text: newCategory.Name,
|
|
1367
|
+
value: newCategory.ID
|
|
1368
|
+
});
|
|
1369
|
+
this.record.CategoryID = newCategory.ID;
|
|
1370
|
+
}
|
|
1371
|
+
else {
|
|
1372
|
+
console.error('Failed to create new category');
|
|
1373
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Failed to create new category. ${newCategory.LatestResult?.Message || ''}`, 'error');
|
|
1374
|
+
return false;
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
catch (error) {
|
|
1378
|
+
console.error('Error creating new category during save:', error);
|
|
1379
|
+
MJNotificationService.Instance.CreateSimpleNotification('Error creating new category during save. Please try again.', 'error');
|
|
1380
|
+
return false;
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
// Save any unsaved query entities first
|
|
1385
|
+
if (this.EditMode) {
|
|
1386
|
+
for (const entity of this.queryEntities) {
|
|
1387
|
+
if (!entity.IsSaved && entity.EntityID) {
|
|
1388
|
+
try {
|
|
1389
|
+
await entity.Save();
|
|
1390
|
+
}
|
|
1391
|
+
catch (error) {
|
|
1392
|
+
console.error('Error saving query entity:', error);
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
// Call the parent save method
|
|
1398
|
+
const result = await super.SaveRecord(StopEditModeAfterSave);
|
|
1399
|
+
if (result) {
|
|
1400
|
+
this.updateUnsavedChangesFlag();
|
|
1401
|
+
// Reload related data after successful save as server-side processes may have updated them
|
|
1402
|
+
if (this.record && this.record.ID) {
|
|
1403
|
+
await Promise.all([
|
|
1404
|
+
this.loadQueryParameters(),
|
|
1405
|
+
this.loadQueryFields(),
|
|
1406
|
+
this.loadQueryEntities()
|
|
1407
|
+
]);
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
return result;
|
|
1411
|
+
}
|
|
1412
|
+
getStatusBadgeColor() {
|
|
1413
|
+
switch (this.record?.Status) {
|
|
1414
|
+
case 'Approved':
|
|
1415
|
+
return '#28a745';
|
|
1416
|
+
case 'Pending':
|
|
1417
|
+
return '#ffc107';
|
|
1418
|
+
case 'Rejected':
|
|
1419
|
+
return '#dc3545';
|
|
1420
|
+
default:
|
|
1421
|
+
return '#6c757d';
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
/**
|
|
1425
|
+
* Handle SQL value changes from the code editor
|
|
1426
|
+
*/
|
|
1427
|
+
onSQLChange(value) {
|
|
1428
|
+
if (this.isUpdatingEditorValue || !this.record) {
|
|
1429
|
+
return;
|
|
1430
|
+
}
|
|
1431
|
+
// Update the record SQL value
|
|
1432
|
+
this.record.SQL = value;
|
|
1433
|
+
this.updateUnsavedChangesFlag();
|
|
1434
|
+
}
|
|
1435
|
+
/**
|
|
1436
|
+
* Add a new field
|
|
1437
|
+
*/
|
|
1438
|
+
async addField() {
|
|
1439
|
+
try {
|
|
1440
|
+
const md = new Metadata();
|
|
1441
|
+
const newField = await md.GetEntityObject('Query Fields');
|
|
1442
|
+
newField.QueryID = this.record.ID;
|
|
1443
|
+
newField.Name = `field${this.queryFields.length + 1}`;
|
|
1444
|
+
newField.Description = '';
|
|
1445
|
+
newField.Sequence = (this.queryFields.length + 1) * 10;
|
|
1446
|
+
newField.SQLBaseType = 'nvarchar';
|
|
1447
|
+
newField.SQLFullType = 'nvarchar(255)';
|
|
1448
|
+
const saved = await newField.Save();
|
|
1449
|
+
if (saved) {
|
|
1450
|
+
this.queryFields.push(newField);
|
|
1451
|
+
this.queryFields.sort((a, b) => (a.Sequence || 0) - (b.Sequence || 0));
|
|
1452
|
+
this.updateUnsavedChangesFlag();
|
|
1453
|
+
MJNotificationService.Instance.CreateSimpleNotification('Field added successfully', 'success', 3000);
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
catch (error) {
|
|
1457
|
+
console.error('Error adding field:', error);
|
|
1458
|
+
MJNotificationService.Instance.CreateSimpleNotification('Failed to add field', 'error', 3000);
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
/**
|
|
1462
|
+
* Delete a field
|
|
1463
|
+
*/
|
|
1464
|
+
async deleteField(field) {
|
|
1465
|
+
if (!confirm(`Are you sure you want to delete field "${field.Name}"?`)) {
|
|
1466
|
+
return;
|
|
1467
|
+
}
|
|
1468
|
+
try {
|
|
1469
|
+
const deleted = await field.Delete();
|
|
1470
|
+
if (deleted) {
|
|
1471
|
+
this.queryFields = this.queryFields.filter(f => f.ID !== field.ID);
|
|
1472
|
+
this.updateUnsavedChangesFlag();
|
|
1473
|
+
MJNotificationService.Instance.CreateSimpleNotification('Field deleted successfully', 'success', 3000);
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
catch (error) {
|
|
1477
|
+
console.error('Error deleting field:', error);
|
|
1478
|
+
MJNotificationService.Instance.CreateSimpleNotification('Failed to delete field', 'error', 3000);
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
/**
|
|
1482
|
+
* Add a new entity
|
|
1483
|
+
*/
|
|
1484
|
+
async addEntity() {
|
|
1485
|
+
try {
|
|
1486
|
+
const md = new Metadata();
|
|
1487
|
+
const newEntity = await md.GetEntityObject('Query Entities');
|
|
1488
|
+
newEntity.QueryID = this.record.ID;
|
|
1489
|
+
// Add to the list immediately for UI responsiveness
|
|
1490
|
+
this.queryEntities.push(newEntity);
|
|
1491
|
+
this.updateUnsavedChangesFlag();
|
|
1492
|
+
}
|
|
1493
|
+
catch (error) {
|
|
1494
|
+
console.error('Error adding entity:', error);
|
|
1495
|
+
MJNotificationService.Instance.CreateSimpleNotification('Failed to add entity', 'error', 3000);
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
/**
|
|
1499
|
+
* Delete an entity
|
|
1500
|
+
*/
|
|
1501
|
+
async deleteEntity(entity) {
|
|
1502
|
+
if (!confirm(`Are you sure you want to delete entity "${entity.Entity}"?`)) {
|
|
1503
|
+
return;
|
|
1504
|
+
}
|
|
1505
|
+
try {
|
|
1506
|
+
const deleted = await entity.Delete();
|
|
1507
|
+
if (deleted) {
|
|
1508
|
+
this.queryEntities = this.queryEntities.filter(e => e.ID !== entity.ID);
|
|
1509
|
+
this.updateUnsavedChangesFlag();
|
|
1510
|
+
MJNotificationService.Instance.CreateSimpleNotification('Entity deleted successfully', 'success', 3000);
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
catch (error) {
|
|
1514
|
+
console.error('Error deleting entity:', error);
|
|
1515
|
+
MJNotificationService.Instance.CreateSimpleNotification('Failed to delete entity', 'error', 3000);
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
/**
|
|
1519
|
+
* Get entity options for dropdown
|
|
1520
|
+
*/
|
|
1521
|
+
getEntityOptions() {
|
|
1522
|
+
return Metadata.Provider.Entities.map(e => ({
|
|
1523
|
+
text: e.Name,
|
|
1524
|
+
id: e.ID
|
|
1525
|
+
})).sort((a, b) => a.text.localeCompare(b.text));
|
|
1526
|
+
}
|
|
1527
|
+
/**
|
|
1528
|
+
* Get the grid edit mode based on component edit mode
|
|
1529
|
+
*/
|
|
1530
|
+
GridEditMode() {
|
|
1531
|
+
return this.EditMode ? "Queue" : "None";
|
|
1532
|
+
}
|
|
1533
|
+
static { this.ɵfac = /*@__PURE__*/ (() => { let ɵQueryFormExtendedComponent_BaseFactory; return function QueryFormExtendedComponent_Factory(t) { return (ɵQueryFormExtendedComponent_BaseFactory || (ɵQueryFormExtendedComponent_BaseFactory = i0.ɵɵgetInheritedFactory(QueryFormExtendedComponent)))(t || QueryFormExtendedComponent); }; })(); }
|
|
1534
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryFormExtendedComponent, selectors: [["mj-query-form"]], viewQuery: function QueryFormExtendedComponent_Query(rf, ctx) { if (rf & 1) {
|
|
1535
|
+
i0.ɵɵviewQuery(_c0, 5);
|
|
1536
|
+
} if (rf & 2) {
|
|
1537
|
+
let _t;
|
|
1538
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.sqlEditor = _t.first);
|
|
1539
|
+
} }, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 1, consts: [["form", "ngForm"], ["sqlEditor", ""], [1, "record-form-container"], [1, "record-form"], [3, "form"], [1, "query-header", 2, "background", "#f8f9fa", "border-bottom", "1px solid #dee2e6", "padding", "20px"], [2, "display", "flex", "flex-direction", "column", "gap", "16px"], [2, "display", "flex", "justify-content", "space-between", "align-items", "flex-start", "gap", "20px"], [2, "flex", "1", "min-width", "0"], [2, "display", "flex", "align-items", "center", "gap", "12px"], [1, "fa-solid", "fa-database", 2, "color", "#17a2b8", "font-size", "1.4em"], ["name", "queryName", "placeholder", "Enter query name...", 2, "font-size", "1.2em", "font-weight", "600", "min-width", "300px", "flex", "1", 3, "ngModel"], [2, "margin", "0", "color", "#495057", "font-weight", "600", "flex", "1"], [1, "action-buttons", 2, "display", "flex", "gap", "8px", "align-items", "center"], ["kendoButton", "", "title", "Run Query", 3, "themeColor", "size", "disabled"], [2, "display", "grid", "grid-template-columns", "1fr auto", "gap", "24px", "align-items", "center"], [2, "font-weight", "600", "color", "#495057", "min-width", "80px"], ["name", "categoryId", "textField", "text", "valueField", "value", "placeholder", "Select category...", 2, "flex", "1", 3, "ngModel", "data", "valuePrimitive"], [2, "color", "#495057"], [2, "font-weight", "600", "color", "#495057", "min-width", "50px"], ["name", "status", "textField", "text", "valueField", "value", 2, "flex", "1", 3, "ngModel", "data", "valuePrimitive"], [1, "badge", 2, "color", "white", "padding", "6px 12px", "border-radius", "12px", "font-size", "0.85em", 3, "background"], [1, "query-content", 2, "padding", "20px", "overflow-y", "auto", "background", "#f5f7fa"], [2, "margin-bottom", "16px", 3, "expandedChange", "expanded"], ["kendoExpansionPanelTitleDirective", ""], [2, "display", "flex", "flex-direction", "column"], [2, "flex", "1", "height", "400px", "border", "1px solid #ced4da", "border-radius", "4px", 3, "change", "language"], [1, "filters-help", 2, "background", "#f8f9fa", "border", "1px solid #dee2e6", "border-radius", "6px", "padding", "16px", "margin-top", "16px"], [2, "margin-bottom", "16px", 3, "expanded"], [2, "padding", "20px"], [1, "details-grid"], [1, "detail-item"], [1, "detail-label"], [1, "fa-solid", "fa-file-code"], ["name", "usesTemplate", 3, "ngModel"], [1, "detail-value"], [1, "fa-solid", "fa-calendar-plus"], [1, "fa-solid", "fa-calendar-check"], [3, "isVisibleChange", "onClose", "query", "parameters", "isVisible"], [3, "isVisibleChange", "onCategoryCreated", "isVisible"], ["name", "queryName", "placeholder", "Enter query name...", 2, "font-size", "1.2em", "font-weight", "600", "min-width", "300px", "flex", "1", 3, "ngModelChange", "ngModel"], ["kendoButton", "", "title", "Run Query", 3, "click", "themeColor", "size", "disabled"], [1, "fa-solid", "fa-play"], ["name", "categoryId", "textField", "text", "valueField", "value", "placeholder", "Select category...", 2, "flex", "1", 3, "ngModelChange", "ngModel", "data", "valuePrimitive"], ["name", "status", "textField", "text", "valueField", "value", 2, "flex", "1", 3, "ngModelChange", "ngModel", "data", "valuePrimitive"], [1, "badge", 2, "color", "white", "padding", "6px 12px", "border-radius", "12px", "font-size", "0.85em"], ["class", "fa-solid fa-check-circle", 4, "ngIf"], ["class", "fa-solid fa-clock", 4, "ngIf"], ["class", "fa-solid fa-times-circle", 4, "ngIf"], [1, "fa-solid", "fa-check-circle"], [1, "fa-solid", "fa-clock"], [1, "fa-solid", "fa-times-circle"], ["name", "description", "placeholder", "Enter query description...", 2, "width", "100%", 3, "ngModel", "rows"], [2, "margin", "0", "color", "#6c757d", "font-size", "0.9em", "line-height", "1.4"], ["name", "description", "placeholder", "Enter query description...", 2, "width", "100%", 3, "ngModelChange", "ngModel", "rows"], [2, "display", "flex", "align-items", "center", "justify-content", "space-between", "width", "100%"], [2, "display", "flex", "align-items", "center", "gap", "8px", "font-weight", "600"], [1, "fa-solid", "fa-code", 2, "color", "#17a2b8"], [1, "badge", 2, "background", "#28a745", "color", "white", "padding", "2px 6px", "border-radius", "10px", "font-size", "0.7em"], ["type", "button", "kendoButton", "", "fillMode", "flat", "size", "small", "title", "Show/hide SQL filters help", 2, "margin-right", "8px", 3, "click"], [1, "fa-solid", "fa-question-circle"], [2, "margin-left", "4px"], [1, "fa-solid", 2, "margin-left", "4px", 3, "ngClass"], [1, "fa-solid", "fa-check"], [2, "margin", "0 0 12px 0", "color", "#495057", "font-weight", "600"], [1, "fa-solid", "fa-filter"], [2, "display", "grid", "grid-template-columns", "repeat(auto-fit, minmax(300px, 1fr))", "gap", "12px"], [1, "filter-card", 2, "background", "white", "border", "1px solid #e9ecef", "border-radius", "4px", "padding", "12px"], [2, "font-family", "'Courier New', monospace", "font-weight", "bold", "color", "#007bff", "margin-bottom", "4px"], [2, "font-size", "0.85em", "color", "#495057", "margin-bottom", "8px"], [2, "font-family", "'Courier New', monospace", "font-size", "0.8em", "background", "#f1f3f4", "padding", "6px", "border-radius", "3px", "margin-bottom", "4px"], [2, "font-size", "0.75em", "color", "#6c757d", "font-style", "italic"], [2, "padding", "16px 0"], [2, "display", "flex", "align-items", "center", "justify-content", "center", "padding", "40px"], [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"], [1, "fa-solid", "fa-spinner", "fa-spin", 2, "font-size", "24px", "color", "#6c757d", "margin-right", "12px"], [2, "color", "#6c757d"], [1, "empty-state"], [1, "parameters-grid"], [1, "fa-solid", "fa-sliders", "empty-state-icon"], [1, "empty-state-title"], [1, "empty-state-text"], ["type", "button", 1, "add-param-btn"], ["type", "button", 1, "add-param-btn", 3, "click"], [1, "fa-solid", "fa-plus"], [2, "display", "flex", "justify-content", "flex-end", "margin-bottom", "16px", "padding", "0 20px"], [1, "param-card", 3, "required"], [1, "param-card", 3, "click"], [1, "param-card-header"], [1, "param-name"], [1, "fa-solid", "fa-at", 2, "color", "#007bff"], [1, "param-badges"], [1, "param-badge", "required"], [1, "param-card-body"], [2, "margin-bottom", "8px"], [2, "display", "flex", "gap", "16px", "font-size", "0.85em"], [1, "param-actions"], [2, "background", "#f1f3f4", "padding", "2px 4px", "border-radius", "3px"], [1, "param-actions", 3, "click"], ["type", "button", "title", "Edit parameter", 1, "param-action-btn", 3, "click"], [1, "fa-solid", "fa-pen"], ["type", "button", "title", "Delete parameter", 1, "param-action-btn", "delete", 3, "click"], [1, "fa-solid", "fa-trash"], [2, "display", "flex", "justify-content", "center", "padding", "40px"], [1, "fa-solid", "fa-table", 2, "color", "#6c757d"], [1, "fa-solid", "fa-spinner", "fa-spin", 2, "font-size", "2em", "color", "#007bff"], [1, "fa-solid", "fa-table", 2, "font-size", "3em", "color", "#dee2e6", "margin-bottom", "12px"], [2, "color", "#6c757d", "margin-bottom", "8px"], [2, "color", "#adb5bd", "margin-bottom", "16px"], [1, "param-card"], [1, "fa-solid", "fa-columns", 2, "color", "#17a2b8"], [1, "param-badge", 2, "background", "#e3f2fd", "color", "#1976d2"], [1, "param-badge", 2, "background", "#f3e5f5", "color", "#7b1fa2"], [1, "param-description"], [1, "param-meta"], [1, "meta-item"], [1, "fa-solid", "fa-code"], [1, "param-card-actions"], ["type", "button", "title", "Delete field", 1, "action-btn", "danger", 3, "click"], [1, "fa-solid", "fa-database", 2, "color", "#6c757d"], [1, "fa-solid", "fa-database", 2, "font-size", "3em", "color", "#dee2e6", "margin-bottom", "12px"], [1, "fa-solid", "fa-table", 2, "color", "#28a745"], [2, "flex", "1", "margin-left", "12px"], ["textField", "text", "valueField", "id", "placeholder", "Select entity...", 2, "width", "100%", 3, "ngModelChange", "ngModel", "name", "data", "valuePrimitive"], [1, "fa-solid", "fa-database"], ["type", "button", "title", "Delete entity", 1, "action-btn", "danger", 3, "click"], [1, "fa-solid", "fa-info-circle", 2, "color", "#6c757d"], ["name", "usesTemplate", 3, "ngModelChange", "ngModel"], [2, "color", "#28a745"], [1, "fa-solid", "fa-times"], [1, "fa-solid", "fa-star"], [1, "fa-solid", "fa-shield-alt", 2, "color", "#6c757d"], [1, "fa-solid", "fa-shield-alt", 2, "font-size", "3em", "color", "#dee2e6", "margin-bottom", "12px"], [2, "color", "#adb5bd"], [3, "Params", "NewRecordValues", "AllowLoad", "EditMode"], [1, "permissions-display"], [1, "permission-card", 2, "background", "#f8f9fa", "border", "1px solid #dee2e6", "border-radius", "8px", "padding", "16px", "margin-bottom", "12px"], [1, "fa-solid", "fa-users", 2, "font-size", "1.5em", "color", "#6c757d"], [2, "flex", "1"], [2, "font-weight", "600", "color", "#495057"], [2, "font-size", "0.85em", "color", "#6c757d"], [2, "display", "flex", "gap", "8px"], [1, "permission-badge", 2, "background", "#6f42c1", "color", "white", "padding", "4px 8px", "border-radius", "4px", "font-size", "0.8em"]], template: function QueryFormExtendedComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1540
|
+
i0.ɵɵelementStart(0, "div", 2);
|
|
1541
|
+
i0.ɵɵtemplate(1, QueryFormExtendedComponent_Conditional_1_Template, 61, 22);
|
|
1542
|
+
i0.ɵɵelementEnd();
|
|
1543
|
+
} if (rf & 2) {
|
|
1544
|
+
i0.ɵɵadvance();
|
|
1545
|
+
i0.ɵɵconditional(ctx.record ? 1 : -1);
|
|
1546
|
+
} }, dependencies: [i1.NgClass, i1.NgIf, i2.ɵNgNoValidate, i2.NgControlStatus, i2.NgControlStatusGroup, i2.NgModel, i2.NgForm, i3.ExpansionPanelComponent, i3.ExpansionPanelTitleDirective, i4.TextAreaComponent, i4.TextBoxComponent, i4.SwitchComponent, i5.DropDownListComponent, i6.ButtonComponent, i7.UserViewGridComponent, i8.FormToolbarComponent, i9.CodeEditorComponent, i10.QueryRunDialogComponent, i11.QueryCategoryDialogComponent], styles: [".k-pane[_ngcontent-%COMP%] {\n background-color: #F5F6FA;\n}\n\n.content-margin[_ngcontent-%COMP%] {\n margin: 10px;\n} \n\n\na[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: bolder;\n}\n\n.tab-header-icon[_ngcontent-%COMP%] {\n margin-right: 5px;\n}\n\n.record-form[_ngcontent-%COMP%] {\n display: block;\n flex-direction: column;\n background-color: #F5F6FA;\n padding: 10px;\n}\n\n.record-form-group[_ngcontent-%COMP%] {\n margin-top: 0px;\n background-color: #F5F6FA;\n}\n\nbutton[_ngcontent-%COMP%] {\n margin-right: 5px;\n}\n\n.record-form[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n margin-bottom: 10px;\n}\n\n.k-splitter[_ngcontent-%COMP%] {\n border-width: 0px;\n}\n\n.record-form-row[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: auto 1fr;\n align-items: start;\n gap: 10px;\n margin-bottom: 12px;\n padding-top: 5px;\n padding-bottom: 5px;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n.record-form[_ngcontent-%COMP%] .record-form-row[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child {\n font-weight: bold;\n padding-right: 10px;\n} \n\n.record-form[_ngcontent-%COMP%] .record-form-row[_ngcontent-%COMP%] > span[_ngcontent-%COMP%] {\n white-space: pre-line;\n max-height: 300px;\n overflow: auto;\n}\n\n \n\n@media (min-width: 768px) {\n .record-form-row[_ngcontent-%COMP%] {\n flex-direction: row;\n align-items: center;\n }\n\n .record-form-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n width: 240px;\n margin-bottom: 0;\n }\n}", ".sql-editor-container[_ngcontent-%COMP%] {\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n\n.filters-help[_ngcontent-%COMP%] .filter-card[_ngcontent-%COMP%] {\n transition: transform 0.2s ease;\n}\n\n.filters-help[_ngcontent-%COMP%] .filter-card[_ngcontent-%COMP%]:hover {\n transform: translateY(-2px);\n box-shadow: 0 4px 8px rgba(0,0,0,0.1);\n}\n\n.toolbar-actions[_ngcontent-%COMP%] {\n margin-left: auto;\n}\n\n.query-header[_ngcontent-%COMP%] {\n border-bottom: 2px solid #dee2e6;\n}\n\n.badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n\n\n .query-content kendo-expansionpanel {\n border: none !important;\n border-radius: 12px !important;\n margin-bottom: 16px !important;\n box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;\n background: white !important;\n overflow: hidden !important;\n}\n\n .query-content .k-expander-header {\n background: white !important;\n border: none !important;\n padding: 16px 20px !important;\n border-radius: 12px !important;\n color: #2c3e50 !important;\n font-weight: 600 !important;\n font-size: 16px !important;\n transition: all 0.2s ease !important;\n}\n\n .query-content .k-expander-header:hover {\n background: #f8f9fa !important;\n}\n\n\n\n .query-content kendo-expansionpanel[aria-expanded=\"true\"] .k-expander-header {\n background: #2196f3 !important;\n color: white !important;\n border-radius: 12px 12px 0 0 !important;\n}\n\n\n\n .query-content .k-expander-content {\n padding: 0 !important;\n border: none !important;\n background: white !important;\n border-radius: 0 0 12px 12px !important;\n}\n\n\n\n .query-content .k-expander-header .fa-solid {\n transition: transform 0.2s ease !important;\n}\n\n .query-content kendo-expansionpanel[aria-expanded=\"true\"] .k-expander-header .fa-chevron-down {\n transform: rotate(180deg) !important;\n}\n\n\n\n.parameters-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));\n gap: 16px;\n padding: 20px;\n}\n\n.param-card[_ngcontent-%COMP%] {\n background: white;\n border: 2px solid #e9ecef;\n border-radius: 8px;\n padding: 16px;\n transition: all 0.2s;\n cursor: pointer;\n position: relative;\n}\n\n.param-card[_ngcontent-%COMP%]:hover {\n border-color: #007bff;\n box-shadow: 0 2px 8px rgba(0,123,255,0.1);\n transform: translateY(-1px);\n}\n\n.param-card.required[_ngcontent-%COMP%] {\n border-color: #ffc107;\n}\n\n.param-card-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 12px;\n}\n\n.param-name[_ngcontent-%COMP%] {\n font-weight: 600;\n font-size: 1.1em;\n color: #2c3e50;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.param-badges[_ngcontent-%COMP%] {\n display: flex;\n gap: 6px;\n}\n\n.param-badge[_ngcontent-%COMP%] {\n padding: 2px 8px;\n border-radius: 12px;\n font-size: 0.75em;\n font-weight: 600;\n color: white;\n}\n\n.param-badge.required[_ngcontent-%COMP%] {\n background: #ffc107;\n}\n\n.param-badge.array[_ngcontent-%COMP%] {\n background: #9c27b0;\n}\n\n.param-card-body[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 0.9em;\n}\n\n.param-actions[_ngcontent-%COMP%] {\n position: absolute;\n top: 12px;\n right: 12px;\n display: flex;\n gap: 4px;\n opacity: 0;\n transition: opacity 0.2s;\n}\n\n.param-card[_ngcontent-%COMP%]:hover .param-actions[_ngcontent-%COMP%] {\n opacity: 1;\n}\n\n.param-action-btn[_ngcontent-%COMP%] {\n background: none;\n border: none;\n padding: 4px 8px;\n border-radius: 4px;\n cursor: pointer;\n color: #6c757d;\n transition: all 0.2s;\n}\n\n.param-action-btn[_ngcontent-%COMP%]:hover {\n background: #f8f9fa;\n color: #007bff;\n}\n\n.param-action-btn.delete[_ngcontent-%COMP%]:hover {\n background: #fff5f5;\n color: #dc3545;\n}\n\n\n\n.details-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 20px;\n padding: 20px;\n}\n\n.detail-item[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.detail-label[_ngcontent-%COMP%] {\n font-size: 0.85em;\n font-weight: 600;\n color: #6c757d;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.detail-value[_ngcontent-%COMP%] {\n font-size: 1em;\n color: #2c3e50;\n}\n\n\n\n.category-selector[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n.category-tree-dropdown[_ngcontent-%COMP%] {\n flex: 1;\n}\n\n.add-category-btn[_ngcontent-%COMP%] {\n background: #28a745;\n color: white;\n border: none;\n padding: 8px 12px;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.add-category-btn[_ngcontent-%COMP%]:hover {\n background: #218838;\n transform: translateY(-1px);\n box-shadow: 0 2px 4px rgba(40,167,69,0.2);\n}\n\n\n\n.empty-state[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 60px 20px;\n text-align: center;\n color: #6c757d;\n}\n\n.empty-state-icon[_ngcontent-%COMP%] {\n font-size: 48px;\n margin-bottom: 16px;\n opacity: 0.3;\n}\n\n.empty-state-title[_ngcontent-%COMP%] {\n font-size: 1.2em;\n font-weight: 600;\n margin-bottom: 8px;\n color: #495057;\n}\n\n.empty-state-text[_ngcontent-%COMP%] {\n font-size: 0.9em;\n margin-bottom: 20px;\n}\n\n.add-param-btn[_ngcontent-%COMP%] {\n background: #007bff;\n color: white;\n border: none;\n padding: 10px 20px;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 500;\n}\n\n.add-param-btn[_ngcontent-%COMP%]:hover {\n background: #0056b3;\n transform: translateY(-1px);\n box-shadow: 0 2px 4px rgba(0,123,255,0.2);\n}"] }); }
|
|
1547
|
+
};
|
|
1548
|
+
QueryFormExtendedComponent = __decorate([
|
|
1549
|
+
RegisterClass(BaseFormComponent, 'Queries')
|
|
1550
|
+
], QueryFormExtendedComponent);
|
|
1551
|
+
export { QueryFormExtendedComponent };
|
|
1552
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryFormExtendedComponent, [{
|
|
1553
|
+
type: Component,
|
|
1554
|
+
args: [{ selector: 'mj-query-form', template: "<div class=\"record-form-container\">\n @if (record) {\n <form class=\"record-form\" #form=\"ngForm\">\n <mj-form-toolbar [form]=\"this\"></mj-form-toolbar>\n\n <!-- Header Section -->\n <div class=\"query-header\" style=\"background: #f8f9fa; border-bottom: 1px solid #dee2e6; padding: 20px;\">\n <div style=\"display: flex; flex-direction: column; gap: 16px;\">\n \n <!-- Top Row: Name and Run Button -->\n <div style=\"display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;\">\n <!-- Left: Query Name -->\n <div style=\"flex: 1; min-width: 0;\">\n <div style=\"display: flex; align-items: center; gap: 12px;\">\n <i class=\"fa-solid fa-database\" style=\"color: #17a2b8; font-size: 1.4em;\"></i>\n @if (EditMode) {\n <kendo-textbox [(ngModel)]=\"record.Name\" \n name=\"queryName\"\n placeholder=\"Enter query name...\"\n style=\"font-size: 1.2em; font-weight: 600; min-width: 300px; flex: 1;\">\n </kendo-textbox>\n } @else {\n <h4 style=\"margin: 0; color: #495057; font-weight: 600; flex: 1;\">{{ record.Name || 'Untitled Query' }}</h4>\n }\n </div>\n </div>\n\n <!-- Right: Action Buttons -->\n <div class=\"action-buttons\" style=\"display: flex; gap: 8px; align-items: center;\">\n @if (record.ID) {\n <button kendoButton \n [themeColor]=\"'primary'\" \n [size]=\"'large'\"\n [disabled]=\"EditMode || record.Status !== 'Approved' || !record.SQL || record.SQL.trim().length === 0\"\n (click)=\"runQuery()\"\n title=\"Run Query\">\n <i class=\"fa-solid fa-play\"></i> Run\n </button>\n }\n </div>\n </div>\n\n <!-- Second Row: Category and Status -->\n <div style=\"display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;\">\n <!-- Category -->\n <div style=\"display: flex; align-items: center; gap: 12px;\">\n <label style=\"font-weight: 600; color: #495057; min-width: 80px;\">Category:</label>\n @if (EditMode) {\n <kendo-dropdownlist\n [(ngModel)]=\"record.CategoryID\"\n name=\"categoryId\"\n [data]=\"categoryOptions\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n placeholder=\"Select category...\"\n style=\"flex: 1;\">\n </kendo-dropdownlist>\n } @else {\n <span style=\"color: #495057;\">{{ getCategoryPath() || 'Uncategorized' }}</span>\n }\n </div>\n\n <!-- Status -->\n <div style=\"display: flex; align-items: center; gap: 12px;\">\n <label style=\"font-weight: 600; color: #495057; min-width: 50px;\">Status:</label>\n @if (EditMode) {\n <kendo-dropdownlist\n [(ngModel)]=\"record.Status\"\n name=\"status\"\n [data]=\"statusOptions\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n style=\"flex: 1;\">\n </kendo-dropdownlist>\n } @else {\n <span class=\"badge\" \n [style.background]=\"getStatusBadgeColor()\" \n style=\"color: white; padding: 6px 12px; border-radius: 12px; font-size: 0.85em;\">\n <i class=\"fa-solid fa-check-circle\" *ngIf=\"record.Status === 'Approved'\"></i>\n <i class=\"fa-solid fa-clock\" *ngIf=\"record.Status === 'Pending'\"></i>\n <i class=\"fa-solid fa-times-circle\" *ngIf=\"record.Status === 'Rejected'\"></i>\n {{ record.Status || 'Unknown' }}\n </span>\n }\n </div>\n </div>\n\n <!-- Third Row: Description -->\n @if (EditMode || record.Description) {\n <div>\n @if (EditMode) {\n <kendo-textarea [(ngModel)]=\"record.Description\" \n name=\"description\"\n [rows]=\"2\"\n placeholder=\"Enter query description...\"\n style=\"width: 100%;\">\n </kendo-textarea>\n } @else {\n <p style=\"margin: 0; color: #6c757d; font-size: 0.9em; line-height: 1.4;\">{{ record.Description }}</p>\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Main Content Area with Expansion Panels -->\n <div class=\"query-content\" style=\"padding: 20px; overflow-y: auto; background: #f5f7fa;\">\n \n <!-- SQL Query Panel -->\n <kendo-expansionpanel \n [(expanded)]=\"sqlPanelExpanded\"\n style=\"margin-bottom: 16px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; justify-content: space-between; width: 100%;\">\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-code\" style=\"color: #17a2b8;\"></i>\n SQL\n @if (record.SQL) {\n <span class=\"badge\" style=\"background: #28a745; color: white; padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n <i class=\"fa-solid fa-check\"></i> Defined\n </span>\n }\n </span>\n <button type=\"button\"\n kendoButton \n fillMode=\"flat\"\n size=\"small\"\n (click)=\"toggleFiltersHelp(); $event.stopPropagation()\"\n title=\"Show/hide SQL filters help\"\n style=\"margin-right: 8px;\">\n <i class=\"fa-solid fa-question-circle\"></i>\n <span style=\"margin-left: 4px;\">Filters Help</span>\n <i class=\"fa-solid\" [ngClass]=\"showFiltersHelp ? 'fa-chevron-up' : 'fa-chevron-down'\" style=\"margin-left: 4px;\"></i>\n </button>\n </span>\n </ng-template>\n \n <div style=\"display: flex; flex-direction: column;\">\n <!-- Code Editor -->\n <mj-code-editor #sqlEditor\n (change)=\"onSQLChange($event)\"\n [language]=\"'sql'\"\n style=\"flex: 1; height: 400px; border: 1px solid #ced4da; border-radius: 4px;\">\n </mj-code-editor>\n \n <!-- SQL Filters Help (Below Editor) -->\n @if (showFiltersHelp) {\n <div class=\"filters-help\" style=\"background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 6px; padding: 16px; margin-top: 16px;\">\n <h6 style=\"margin: 0 0 12px 0; color: #495057; font-weight: 600;\">\n <i class=\"fa-solid fa-filter\"></i> Available SQL Filters for Parameterized Queries\n </h6>\n \n <div style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px;\">\n @for (filter of sqlFilters; track filter.name) {\n <div class=\"filter-card\" style=\"background: white; border: 1px solid #e9ecef; border-radius: 4px; padding: 12px;\">\n <div style=\"font-family: 'Courier New', monospace; font-weight: bold; color: #007bff; margin-bottom: 4px;\">\n {{ filter.name }}\n </div>\n <div style=\"font-size: 0.85em; color: #495057; margin-bottom: 8px;\">\n {{ filter.description }}\n </div>\n <div style=\"font-family: 'Courier New', monospace; font-size: 0.8em; background: #f1f3f4; padding: 6px; border-radius: 3px; margin-bottom: 4px;\">\n {{ filter.exampleSyntax }}\n </div>\n @if (filter.notes) {\n <div style=\"font-size: 0.75em; color: #6c757d; font-style: italic;\">\n {{ filter.notes }}\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n </kendo-expansionpanel>\n\n <!-- Parameters Panel -->\n @if (record.IsSaved) {\n <kendo-expansionpanel \n [(expanded)]=\"parametersPanelExpanded\"\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-sliders\" style=\"color: #6c757d;\"></i>\n Query Parameters\n @if (queryParameters.length > 0) {\n <span class=\"badge\" style=\"background: #17a2b8; color: white; padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n {{ queryParameters.length }}\n </span>\n }\n </span>\n </ng-template>\n \n <div style=\"padding: 16px 0;\">\n @if (isLoadingParameters) {\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 parameters...</span>\n </div>\n } @else {\n @if (queryParameters.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-sliders empty-state-icon\"></i>\n <div class=\"empty-state-title\">No Parameters Defined</div>\n <div class=\"empty-state-text\">\n Add parameters to make your query dynamic and reusable.\n </div>\n @if (EditMode) {\n <button type=\"button\" class=\"add-param-btn\" (click)=\"addParameter()\">\n <i class=\"fa-solid fa-plus\"></i> Add First Parameter\n </button>\n }\n </div>\n } @else {\n <!-- Parameters Header with Add Button -->\n @if (EditMode) {\n <div style=\"display: flex; justify-content: flex-end; margin-bottom: 16px; padding: 0 20px;\">\n <button type=\"button\" class=\"add-param-btn\" (click)=\"addParameter()\">\n <i class=\"fa-solid fa-plus\"></i> Add Parameter\n </button>\n </div>\n }\n \n <!-- Parameters Grid -->\n <div class=\"parameters-grid\">\n @for (param of queryParameters; track param.ID || $index) {\n <div class=\"param-card\" [class.required]=\"param.IsRequired\" (click)=\"editParameter(param)\">\n <div class=\"param-card-header\">\n <div class=\"param-name\">\n <i class=\"fa-solid fa-at\" style=\"color: #007bff;\"></i>\n {{ param.Name }}\n </div>\n <div class=\"param-badges\">\n @if (param.IsRequired) {\n <span class=\"param-badge required\">Required</span>\n }\n </div>\n </div>\n \n <div class=\"param-card-body\">\n @if (param.Description) {\n <div style=\"margin-bottom: 8px;\">{{ param.Description }}</div>\n }\n \n <div style=\"display: flex; gap: 16px; font-size: 0.85em;\">\n <div>\n <strong>Type:</strong> {{ param.Type || 'Text' }}\n </div>\n @if (param.DefaultValue) {\n <div>\n <strong>Default:</strong> \n <code style=\"background: #f1f3f4; padding: 2px 4px; border-radius: 3px;\">\n {{ param.DefaultValue }}\n </code>\n </div>\n }\n </div>\n </div>\n \n @if (EditMode) {\n <div class=\"param-actions\" (click)=\"$event.stopPropagation()\">\n <button type=\"button\" class=\"param-action-btn\" (click)=\"editParameter(param)\" title=\"Edit parameter\">\n <i class=\"fa-solid fa-pen\"></i>\n </button>\n <button type=\"button\" class=\"param-action-btn delete\" (click)=\"deleteParameter(param)\" title=\"Delete parameter\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n }\n </div>\n </kendo-expansionpanel>\n }\n\n <!-- Query Fields Panel -->\n @if (record.IsSaved) {\n <kendo-expansionpanel \n [(expanded)]=\"fieldsPanelExpanded\"\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\" style=\"color: #6c757d;\"></i>\n Query Fields\n @if (queryFields.length > 0) {\n <span class=\"badge\" style=\"background: #17a2b8; color: white; padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n {{ queryFields.length }}\n </span>\n }\n </span>\n </ng-template>\n \n <div style=\"padding: 16px 0;\">\n @if (isLoadingFields) {\n <div style=\"display: flex; justify-content: center; padding: 40px;\">\n <i class=\"fa-solid fa-spinner fa-spin\" style=\"font-size: 2em; color: #007bff;\"></i>\n </div>\n } @else {\n @if (queryFields.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-table\" style=\"font-size: 3em; color: #dee2e6; margin-bottom: 12px;\"></i>\n <h5 style=\"color: #6c757d; margin-bottom: 8px;\">No Fields Defined</h5>\n <div style=\"color: #adb5bd; margin-bottom: 16px;\">\n Define output fields for your query results.\n </div>\n @if (EditMode) {\n <button type=\"button\" class=\"add-param-btn\" (click)=\"addField()\">\n <i class=\"fa-solid fa-plus\"></i> Add First Field\n </button>\n }\n </div>\n } @else {\n <!-- Fields Header with Add Button -->\n @if (EditMode) {\n <div style=\"display: flex; justify-content: flex-end; margin-bottom: 16px; padding: 0 20px;\">\n <button type=\"button\" class=\"add-param-btn\" (click)=\"addField()\">\n <i class=\"fa-solid fa-plus\"></i> Add Field\n </button>\n </div>\n }\n \n <!-- Fields Grid -->\n <div class=\"parameters-grid\">\n @for (field of queryFields; track field.ID) {\n <div class=\"param-card\">\n <div class=\"param-card-header\">\n <div class=\"param-name\">\n <i class=\"fa-solid fa-columns\" style=\"color: #17a2b8;\"></i>\n {{ field.Name }}\n </div>\n <div class=\"param-badges\">\n <span class=\"param-badge\" style=\"background: #e3f2fd; color: #1976d2;\">{{ field.SQLBaseType }}</span>\n @if (field.Sequence) {\n <span class=\"param-badge\" style=\"background: #f3e5f5; color: #7b1fa2;\">#{{ field.Sequence }}</span>\n }\n </div>\n </div>\n \n <div class=\"param-card-body\">\n @if (field.Description) {\n <div class=\"param-description\">{{ field.Description }}</div>\n }\n <div class=\"param-meta\">\n <span class=\"meta-item\">\n <i class=\"fa-solid fa-code\"></i> {{ field.SQLFullType || field.SQLBaseType }}\n </span>\n </div>\n </div>\n \n @if (EditMode) {\n <div class=\"param-card-actions\">\n <button type=\"button\" class=\"action-btn danger\" (click)=\"deleteField(field)\" title=\"Delete field\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n }\n </div>\n </kendo-expansionpanel>\n }\n\n <!-- Query Entities Panel -->\n @if (record.IsSaved) {\n <kendo-expansionpanel \n [(expanded)]=\"entitiesPanelExpanded\"\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-database\" style=\"color: #6c757d;\"></i>\n Query Entities\n @if (queryEntities.length > 0) {\n <span class=\"badge\" style=\"background: #17a2b8; color: white; padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n {{ queryEntities.length }}\n </span>\n }\n </span>\n </ng-template>\n \n <div style=\"padding: 16px 0;\">\n @if (isLoadingEntities) {\n <div style=\"display: flex; justify-content: center; padding: 40px;\">\n <i class=\"fa-solid fa-spinner fa-spin\" style=\"font-size: 2em; color: #007bff;\"></i>\n </div>\n } @else {\n @if (queryEntities.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-database\" style=\"font-size: 3em; color: #dee2e6; margin-bottom: 12px;\"></i>\n <h5 style=\"color: #6c757d; margin-bottom: 8px;\">No Entities Tracked</h5>\n <div style=\"color: #adb5bd; margin-bottom: 16px;\">\n Track which entities this query uses for documentation.\n </div>\n @if (EditMode) {\n <button type=\"button\" class=\"add-param-btn\" (click)=\"addEntity()\">\n <i class=\"fa-solid fa-plus\"></i> Add First Entity\n </button>\n }\n </div>\n } @else {\n <!-- Entities Header with Add Button -->\n @if (EditMode) {\n <div style=\"display: flex; justify-content: flex-end; margin-bottom: 16px; padding: 0 20px;\">\n <button type=\"button\" class=\"add-param-btn\" (click)=\"addEntity()\">\n <i class=\"fa-solid fa-plus\"></i> Add Entity\n </button>\n </div>\n }\n \n <!-- Entities Grid -->\n <div class=\"parameters-grid\">\n @for (entity of queryEntities; track entity.ID) {\n <div class=\"param-card\">\n <div class=\"param-card-header\">\n <div class=\"param-name\">\n <i class=\"fa-solid fa-table\" style=\"color: #28a745;\"></i>\n {{ entity.Entity || 'Select Entity...' }}\n </div>\n @if (EditMode) {\n <div style=\"flex: 1; margin-left: 12px;\">\n <kendo-dropdownlist\n [(ngModel)]=\"entity.EntityID\"\n [name]=\"'entity_' + entity.ID\"\n [data]=\"getEntityOptions()\"\n textField=\"text\"\n valueField=\"id\"\n [valuePrimitive]=\"true\"\n placeholder=\"Select entity...\"\n style=\"width: 100%;\">\n </kendo-dropdownlist>\n </div>\n }\n </div>\n \n @if (!EditMode && entity.Entity) {\n <div class=\"param-card-body\">\n <div class=\"param-meta\">\n <span class=\"meta-item\">\n <i class=\"fa-solid fa-database\"></i> Data Source\n </span>\n </div>\n </div>\n }\n \n @if (EditMode) {\n <div class=\"param-card-actions\">\n <button type=\"button\" class=\"action-btn danger\" (click)=\"deleteEntity(entity)\" title=\"Delete entity\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n }\n </div>\n </kendo-expansionpanel>\n }\n\n <!-- Details Panel -->\n <kendo-expansionpanel \n [(expanded)]=\"detailsPanelExpanded\"\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-info-circle\" style=\"color: #6c757d;\"></i>\n Query Details\n </span>\n </ng-template>\n \n <div style=\"padding: 20px;\">\n <div class=\"details-grid\">\n <!-- Uses Template -->\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-file-code\"></i> Template Usage\n </label>\n @if (EditMode) {\n <kendo-switch [(ngModel)]=\"record.UsesTemplate\" name=\"usesTemplate\"></kendo-switch>\n } @else {\n <div class=\"detail-value\">\n @if (record.UsesTemplate) {\n <span style=\"color: #28a745;\"><i class=\"fa-solid fa-check\"></i> Uses Templates</span>\n } @else {\n <span style=\"color: #6c757d;\"><i class=\"fa-solid fa-times\"></i> No Templates</span>\n }\n </div>\n }\n </div>\n\n <!-- Created Date -->\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-calendar-plus\"></i> Created\n </label>\n <div class=\"detail-value\">{{ formatDate(record.__mj_CreatedAt) }}</div>\n </div>\n\n <!-- Updated Date -->\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-calendar-check\"></i> Last Updated\n </label>\n <div class=\"detail-value\">{{ formatDate(record.__mj_UpdatedAt) }}</div>\n </div>\n\n <!-- Quality Rank -->\n @if (record.QualityRank != null) {\n <div class=\"detail-item\">\n <label class=\"detail-label\">\n <i class=\"fa-solid fa-star\"></i> Quality Rank\n </label>\n <div class=\"detail-value\">{{ record.QualityRank }}/10</div>\n </div>\n }\n </div>\n </div>\n </kendo-expansionpanel>\n\n <!-- Permissions Panel -->\n @if (record.IsSaved) {\n <kendo-expansionpanel \n [(expanded)]=\"permissionsPanelExpanded\"\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-shield-alt\" style=\"color: #6c757d;\"></i>\n Query Permissions\n </span>\n </ng-template>\n \n <div style=\"padding: 16px 0;\">\n @if (isLoadingPermissions) {\n <div style=\"display: flex; justify-content: center; padding: 40px;\">\n <i class=\"fa-solid fa-spinner fa-spin\" style=\"font-size: 2em; color: #007bff;\"></i>\n </div>\n } @else {\n @if (queryPermissions.length === 0 && !EditMode) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-shield-alt\" style=\"font-size: 3em; color: #dee2e6; margin-bottom: 12px;\"></i>\n <h5 style=\"color: #6c757d; margin-bottom: 8px;\">No Permissions Set</h5>\n <div style=\"color: #adb5bd;\">\n This query uses default permissions.\n </div>\n </div>\n } @else {\n @if (EditMode) {\n <!-- Edit Mode: Use the standard grid -->\n <mj-user-view-grid \n [Params]=\"BuildRelationshipViewParamsByEntityName('Query Permissions','QueryID')\" \n [NewRecordValues]=\"NewRecordValues('Query Permissions')\"\n [AllowLoad]=\"true\" \n [EditMode]=\"GridEditMode()\">\n </mj-user-view-grid>\n } @else {\n <!-- Read Mode: Nice card-based display -->\n <div class=\"permissions-display\">\n @for (permission of queryPermissions; track permission.ID) {\n <div class=\"permission-card\" style=\"background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 8px; padding: 16px; margin-bottom: 12px;\">\n <div style=\"display: flex; align-items: center; gap: 12px;\">\n <i class=\"fa-solid fa-users\" style=\"font-size: 1.5em; color: #6c757d;\"></i>\n <div style=\"flex: 1;\">\n <div style=\"font-weight: 600; color: #495057;\">\n {{ permission.Role }}\n </div>\n <div style=\"font-size: 0.85em; color: #6c757d;\">\n Role Permission\n </div>\n </div>\n <div style=\"display: flex; gap: 8px;\">\n <span class=\"permission-badge\" style=\"background: #6f42c1; color: white; padding: 4px 8px; border-radius: 4px; font-size: 0.8em;\">\n <i class=\"fa-solid fa-play\"></i> Can Execute\n </span>\n </div>\n </div>\n </div>\n }\n </div>\n }\n }\n }\n </div>\n </kendo-expansionpanel>\n }\n </div>\n </form>\n\n <!-- Query Run Dialog -->\n <mj-query-run-dialog \n [query]=\"record\"\n [parameters]=\"queryParameters\"\n [(isVisible)]=\"showRunDialog\"\n (onClose)=\"onRunDialogClose()\">\n </mj-query-run-dialog>\n\n <!-- Category Creation Dialog -->\n <mj-query-category-dialog\n [(isVisible)]=\"showCategoryDialog\"\n (onCategoryCreated)=\"onCategoryCreated($event)\">\n </mj-query-category-dialog>\n }\n</div>", styles: [".k-pane {\n background-color: #F5F6FA;\n}\n\n.content-margin {\n margin: 10px;\n} \n\n\na {\n font-size: 14px;\n font-weight: bolder;\n}\n\n.tab-header-icon {\n margin-right: 5px;\n}\n\n.record-form {\n display: block;\n flex-direction: column;\n background-color: #F5F6FA;\n padding: 10px;\n}\n\n.record-form-group {\n margin-top: 0px;\n background-color: #F5F6FA;\n}\n\nbutton {\n margin-right: 5px;\n}\n\n.record-form h2 {\n margin-bottom: 10px;\n}\n\n.k-splitter {\n border-width: 0px;\n}\n\n.record-form-row {\n display: grid;\n grid-template-columns: auto 1fr;\n align-items: start;\n gap: 10px;\n margin-bottom: 12px;\n padding-top: 5px;\n padding-bottom: 5px;\n}\n\n\n/* .record-form .record-form-row:nth-child(odd) {\n background-color: #f2f2f2; \n} */\n\n/* \n.record-form .record-form-row:nth-child(even) {\n background-color: #ffffff; \n} */\n\n.record-form .record-form-row > :first-child {\n font-weight: bold;\n padding-right: 10px;\n} \n\n.record-form .record-form-row > span {\n white-space: pre-line;\n max-height: 300px;\n overflow: auto;\n}\n\n \n\n@media (min-width: 768px) {\n .record-form-row {\n flex-direction: row;\n align-items: center;\n }\n\n .record-form-row label {\n width: 240px;\n margin-bottom: 0;\n }\n}\n", ".sql-editor-container {\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n\n.filters-help .filter-card {\n transition: transform 0.2s ease;\n}\n\n.filters-help .filter-card:hover {\n transform: translateY(-2px);\n box-shadow: 0 4px 8px rgba(0,0,0,0.1);\n}\n\n.toolbar-actions {\n margin-left: auto;\n}\n\n.query-header {\n border-bottom: 2px solid #dee2e6;\n}\n\n.badge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n/* Modern Expansion Panel Styling */\n::ng-deep .query-content kendo-expansionpanel {\n border: none !important;\n border-radius: 12px !important;\n margin-bottom: 16px !important;\n box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;\n background: white !important;\n overflow: hidden !important;\n}\n\n::ng-deep .query-content .k-expander-header {\n background: white !important;\n border: none !important;\n padding: 16px 20px !important;\n border-radius: 12px !important;\n color: #2c3e50 !important;\n font-weight: 600 !important;\n font-size: 16px !important;\n transition: all 0.2s ease !important;\n}\n\n::ng-deep .query-content .k-expander-header:hover {\n background: #f8f9fa !important;\n}\n\n/* Expanded state header */\n::ng-deep .query-content kendo-expansionpanel[aria-expanded=\"true\"] .k-expander-header {\n background: #2196f3 !important;\n color: white !important;\n border-radius: 12px 12px 0 0 !important;\n}\n\n/* Content area */\n::ng-deep .query-content .k-expander-content {\n padding: 0 !important;\n border: none !important;\n background: white !important;\n border-radius: 0 0 12px 12px !important;\n}\n\n/* Icon in header */\n::ng-deep .query-content .k-expander-header .fa-solid {\n transition: transform 0.2s ease !important;\n}\n\n::ng-deep .query-content kendo-expansionpanel[aria-expanded=\"true\"] .k-expander-header .fa-chevron-down {\n transform: rotate(180deg) !important;\n}\n\n/* Parameter Cards */\n.parameters-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));\n gap: 16px;\n padding: 20px;\n}\n\n.param-card {\n background: white;\n border: 2px solid #e9ecef;\n border-radius: 8px;\n padding: 16px;\n transition: all 0.2s;\n cursor: pointer;\n position: relative;\n}\n\n.param-card:hover {\n border-color: #007bff;\n box-shadow: 0 2px 8px rgba(0,123,255,0.1);\n transform: translateY(-1px);\n}\n\n.param-card.required {\n border-color: #ffc107;\n}\n\n.param-card-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 12px;\n}\n\n.param-name {\n font-weight: 600;\n font-size: 1.1em;\n color: #2c3e50;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.param-badges {\n display: flex;\n gap: 6px;\n}\n\n.param-badge {\n padding: 2px 8px;\n border-radius: 12px;\n font-size: 0.75em;\n font-weight: 600;\n color: white;\n}\n\n.param-badge.required {\n background: #ffc107;\n}\n\n.param-badge.array {\n background: #9c27b0;\n}\n\n.param-card-body {\n color: #6c757d;\n font-size: 0.9em;\n}\n\n.param-actions {\n position: absolute;\n top: 12px;\n right: 12px;\n display: flex;\n gap: 4px;\n opacity: 0;\n transition: opacity 0.2s;\n}\n\n.param-card:hover .param-actions {\n opacity: 1;\n}\n\n.param-action-btn {\n background: none;\n border: none;\n padding: 4px 8px;\n border-radius: 4px;\n cursor: pointer;\n color: #6c757d;\n transition: all 0.2s;\n}\n\n.param-action-btn:hover {\n background: #f8f9fa;\n color: #007bff;\n}\n\n.param-action-btn.delete:hover {\n background: #fff5f5;\n color: #dc3545;\n}\n\n/* Details Section */\n.details-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 20px;\n padding: 20px;\n}\n\n.detail-item {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.detail-label {\n font-size: 0.85em;\n font-weight: 600;\n color: #6c757d;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.detail-value {\n font-size: 1em;\n color: #2c3e50;\n}\n\n/* Category Tree Dropdown */\n.category-selector {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n.category-tree-dropdown {\n flex: 1;\n}\n\n.add-category-btn {\n background: #28a745;\n color: white;\n border: none;\n padding: 8px 12px;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.add-category-btn:hover {\n background: #218838;\n transform: translateY(-1px);\n box-shadow: 0 2px 4px rgba(40,167,69,0.2);\n}\n\n/* Empty State */\n.empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 60px 20px;\n text-align: center;\n color: #6c757d;\n}\n\n.empty-state-icon {\n font-size: 48px;\n margin-bottom: 16px;\n opacity: 0.3;\n}\n\n.empty-state-title {\n font-size: 1.2em;\n font-weight: 600;\n margin-bottom: 8px;\n color: #495057;\n}\n\n.empty-state-text {\n font-size: 0.9em;\n margin-bottom: 20px;\n}\n\n.add-param-btn {\n background: #007bff;\n color: white;\n border: none;\n padding: 10px 20px;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 500;\n}\n\n.add-param-btn:hover {\n background: #0056b3;\n transform: translateY(-1px);\n box-shadow: 0 2px 4px rgba(0,123,255,0.2);\n}"] }]
|
|
1555
|
+
}], null, { sqlEditor: [{
|
|
1556
|
+
type: ViewChild,
|
|
1557
|
+
args: ['sqlEditor']
|
|
1558
|
+
}] }); })();
|
|
1559
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryFormExtendedComponent, { className: "QueryFormExtendedComponent", filePath: "src/lib/custom/Queries/query-form.component.ts", lineNumber: 24 }); })();
|
|
1560
|
+
export function LoadQueryFormExtendedComponent() {
|
|
1561
|
+
// prevents tree shaking
|
|
1562
|
+
}
|
|
1563
|
+
//# sourceMappingURL=query-form.component.js.map
|