@memberjunction/ng-dashboards 5.10.0 → 5.11.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/DataExplorer/data-explorer-dashboard.component.d.ts +6 -2
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.js +24 -6
- package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.d.ts +55 -1
- package/dist/QueryBrowser/query-browser-resource.component.d.ts.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.js +659 -194
- package/dist/QueryBrowser/query-browser-resource.component.js.map +1 -1
- package/package.json +40 -40
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
var QueryBrowserResourceComponent_1;
|
|
8
|
-
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
8
|
+
import { Component, ChangeDetectionStrategy, HostListener, ViewChild } from '@angular/core';
|
|
9
9
|
import { NavigationEnd } from '@angular/router';
|
|
10
10
|
import { Subject } from 'rxjs';
|
|
11
11
|
import { takeUntil, filter } from 'rxjs/operators';
|
|
@@ -17,62 +17,73 @@ import * as i0 from "@angular/core";
|
|
|
17
17
|
import * as i1 from "@memberjunction/ng-shared";
|
|
18
18
|
import * as i2 from "@angular/router";
|
|
19
19
|
import * as i3 from "@angular/common";
|
|
20
|
-
import * as i4 from "@
|
|
21
|
-
import * as i5 from "@memberjunction/ng-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
import * as i4 from "@angular/forms";
|
|
21
|
+
import * as i5 from "@memberjunction/ng-code-editor";
|
|
22
|
+
import * as i6 from "@memberjunction/ng-shared-generic";
|
|
23
|
+
import * as i7 from "@memberjunction/ng-query-viewer";
|
|
24
|
+
const _c0 = ["drawerSqlEditor"];
|
|
25
|
+
const _c1 = a0 => ({ node: a0 });
|
|
26
|
+
const _forTrack0 = ($index, $item) => $item.ID;
|
|
27
|
+
function QueryBrowserResourceComponent_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
24
28
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
25
|
-
i0.ɵɵelementStart(0, "button",
|
|
26
|
-
i0.ɵɵlistener("click", function
|
|
27
|
-
i0.ɵɵelement(1, "i",
|
|
29
|
+
i0.ɵɵelementStart(0, "button", 32);
|
|
30
|
+
i0.ɵɵlistener("click", function QueryBrowserResourceComponent_Conditional_10_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.OpenCreateDrawer()); });
|
|
31
|
+
i0.ɵɵelement(1, "i", 33);
|
|
28
32
|
i0.ɵɵelementEnd();
|
|
29
33
|
} }
|
|
30
|
-
function
|
|
34
|
+
function QueryBrowserResourceComponent_Conditional_21_Template(rf, ctx) { if (rf & 1) {
|
|
31
35
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
32
|
-
i0.ɵɵelementStart(0, "button",
|
|
33
|
-
i0.ɵɵlistener("click", function
|
|
34
|
-
i0.ɵɵelement(1, "i",
|
|
36
|
+
i0.ɵɵelementStart(0, "button", 34);
|
|
37
|
+
i0.ɵɵlistener("click", function QueryBrowserResourceComponent_Conditional_21_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.clearSearch()); });
|
|
38
|
+
i0.ɵɵelement(1, "i", 35);
|
|
39
|
+
i0.ɵɵelementEnd();
|
|
40
|
+
} }
|
|
41
|
+
function QueryBrowserResourceComponent_For_24_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
42
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
43
|
+
i0.ɵɵelementStart(0, "button", 37);
|
|
44
|
+
i0.ɵɵlistener("click", function QueryBrowserResourceComponent_For_24_Conditional_0_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const status_r6 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.toggleStatusFilter(status_r6)); });
|
|
45
|
+
i0.ɵɵelement(1, "i", 38);
|
|
35
46
|
i0.ɵɵelementStart(2, "span");
|
|
36
47
|
i0.ɵɵtext(3);
|
|
37
48
|
i0.ɵɵelementEnd();
|
|
38
|
-
i0.ɵɵelementStart(4, "span",
|
|
49
|
+
i0.ɵɵelementStart(4, "span", 39);
|
|
39
50
|
i0.ɵɵtext(5);
|
|
40
51
|
i0.ɵɵelementEnd()();
|
|
41
52
|
} if (rf & 2) {
|
|
42
|
-
const
|
|
53
|
+
const status_r6 = i0.ɵɵnextContext().$implicit;
|
|
43
54
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
44
|
-
i0.ɵɵstyleProp("--chip-color", ctx_r2.getStatusColor(
|
|
45
|
-
i0.ɵɵclassProp("active", ctx_r2.StatusFilters[
|
|
46
|
-
i0.ɵɵproperty("title", (ctx_r2.StatusFilters[
|
|
55
|
+
i0.ɵɵstyleProp("--chip-color", ctx_r2.getStatusColor(status_r6));
|
|
56
|
+
i0.ɵɵclassProp("active", ctx_r2.StatusFilters[status_r6]);
|
|
57
|
+
i0.ɵɵproperty("title", (ctx_r2.StatusFilters[status_r6] ? "Hide" : "Show") + " " + status_r6 + " queries");
|
|
47
58
|
i0.ɵɵadvance();
|
|
48
|
-
i0.ɵɵclassMap(ctx_r2.getStatusIcon(
|
|
59
|
+
i0.ɵɵclassMap(ctx_r2.getStatusIcon(status_r6));
|
|
49
60
|
i0.ɵɵadvance(2);
|
|
50
|
-
i0.ɵɵtextInterpolate(
|
|
61
|
+
i0.ɵɵtextInterpolate(status_r6);
|
|
51
62
|
i0.ɵɵadvance(2);
|
|
52
|
-
i0.ɵɵtextInterpolate(ctx_r2.getStatusCount(
|
|
63
|
+
i0.ɵɵtextInterpolate(ctx_r2.getStatusCount(status_r6));
|
|
53
64
|
} }
|
|
54
|
-
function
|
|
55
|
-
i0.ɵɵconditionalCreate(0,
|
|
65
|
+
function QueryBrowserResourceComponent_For_24_Template(rf, ctx) { if (rf & 1) {
|
|
66
|
+
i0.ɵɵconditionalCreate(0, QueryBrowserResourceComponent_For_24_Conditional_0_Template, 6, 9, "button", 36);
|
|
56
67
|
} if (rf & 2) {
|
|
57
|
-
const
|
|
68
|
+
const status_r6 = ctx.$implicit;
|
|
58
69
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
59
|
-
i0.ɵɵconditional(ctx_r2.getStatusCount(
|
|
70
|
+
i0.ɵɵconditional(ctx_r2.getStatusCount(status_r6) > 0 ? 0 : -1);
|
|
60
71
|
} }
|
|
61
|
-
function
|
|
62
|
-
i0.ɵɵelementStart(0, "div",
|
|
63
|
-
i0.ɵɵelement(1, "mj-loading",
|
|
72
|
+
function QueryBrowserResourceComponent_Conditional_26_Template(rf, ctx) { if (rf & 1) {
|
|
73
|
+
i0.ɵɵelementStart(0, "div", 23);
|
|
74
|
+
i0.ɵɵelement(1, "mj-loading", 40);
|
|
64
75
|
i0.ɵɵelementEnd();
|
|
65
76
|
} }
|
|
66
|
-
function
|
|
67
|
-
i0.ɵɵelementStart(0, "div",
|
|
68
|
-
i0.ɵɵelement(1, "i",
|
|
77
|
+
function QueryBrowserResourceComponent_Conditional_27_Template(rf, ctx) { if (rf & 1) {
|
|
78
|
+
i0.ɵɵelementStart(0, "div", 24);
|
|
79
|
+
i0.ɵɵelement(1, "i", 41);
|
|
69
80
|
i0.ɵɵelementStart(2, "p");
|
|
70
81
|
i0.ɵɵtext(3, "No queries available");
|
|
71
82
|
i0.ɵɵelementEnd()();
|
|
72
83
|
} }
|
|
73
|
-
function
|
|
74
|
-
i0.ɵɵelementStart(0, "div",
|
|
75
|
-
i0.ɵɵelement(1, "i",
|
|
84
|
+
function QueryBrowserResourceComponent_Conditional_28_Template(rf, ctx) { if (rf & 1) {
|
|
85
|
+
i0.ɵɵelementStart(0, "div", 24);
|
|
86
|
+
i0.ɵɵelement(1, "i", 42);
|
|
76
87
|
i0.ɵɵelementStart(2, "p");
|
|
77
88
|
i0.ɵɵtext(3);
|
|
78
89
|
i0.ɵɵelementEnd()();
|
|
@@ -81,39 +92,53 @@ function QueryBrowserResourceComponent_Conditional_27_Template(rf, ctx) { if (rf
|
|
|
81
92
|
i0.ɵɵadvance(3);
|
|
82
93
|
i0.ɵɵtextInterpolate1("No queries match \"", ctx_r2.searchText, "\"");
|
|
83
94
|
} }
|
|
84
|
-
function
|
|
95
|
+
function QueryBrowserResourceComponent_Conditional_29_For_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
85
96
|
i0.ɵɵelementContainer(0);
|
|
86
97
|
} }
|
|
87
|
-
function
|
|
88
|
-
i0.ɵɵtemplate(0,
|
|
98
|
+
function QueryBrowserResourceComponent_Conditional_29_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
99
|
+
i0.ɵɵtemplate(0, QueryBrowserResourceComponent_Conditional_29_For_2_ng_container_0_Template, 1, 0, "ng-container", 43);
|
|
89
100
|
} if (rf & 2) {
|
|
90
|
-
const
|
|
101
|
+
const node_r7 = ctx.$implicit;
|
|
91
102
|
i0.ɵɵnextContext(2);
|
|
92
|
-
const
|
|
93
|
-
i0.ɵɵproperty("ngTemplateOutlet",
|
|
103
|
+
const categoryNode_r8 = i0.ɵɵreference(36);
|
|
104
|
+
i0.ɵɵproperty("ngTemplateOutlet", categoryNode_r8)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c1, node_r7));
|
|
94
105
|
} }
|
|
95
|
-
function
|
|
96
|
-
i0.ɵɵelementStart(0, "div",
|
|
97
|
-
i0.ɵɵrepeaterCreate(1,
|
|
106
|
+
function QueryBrowserResourceComponent_Conditional_29_Template(rf, ctx) { if (rf & 1) {
|
|
107
|
+
i0.ɵɵelementStart(0, "div", 25);
|
|
108
|
+
i0.ɵɵrepeaterCreate(1, QueryBrowserResourceComponent_Conditional_29_For_2_Template, 1, 4, "ng-container", null, i0.ɵɵcomponentInstance().trackByCategory, true);
|
|
98
109
|
i0.ɵɵelementEnd();
|
|
99
110
|
} if (rf & 2) {
|
|
100
111
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
101
112
|
i0.ɵɵadvance();
|
|
102
113
|
i0.ɵɵrepeater(ctx_r2.categoryTree);
|
|
103
114
|
} }
|
|
104
|
-
function
|
|
105
|
-
i0.ɵɵ
|
|
106
|
-
i0.ɵɵ
|
|
107
|
-
i0.ɵɵ
|
|
115
|
+
function QueryBrowserResourceComponent_Conditional_33_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
116
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
117
|
+
i0.ɵɵelementStart(0, "button", 48);
|
|
118
|
+
i0.ɵɵlistener("click", function QueryBrowserResourceComponent_Conditional_33_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r9); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.OpenCreateDrawer()); });
|
|
119
|
+
i0.ɵɵelement(1, "i", 33);
|
|
120
|
+
i0.ɵɵtext(2, " New Query ");
|
|
121
|
+
i0.ɵɵelementEnd();
|
|
122
|
+
} }
|
|
123
|
+
function QueryBrowserResourceComponent_Conditional_33_Template(rf, ctx) { if (rf & 1) {
|
|
124
|
+
i0.ɵɵelementStart(0, "div", 29);
|
|
125
|
+
i0.ɵɵelement(1, "i", 44);
|
|
126
|
+
i0.ɵɵelementStart(2, "p", 45);
|
|
108
127
|
i0.ɵɵtext(3, "Select a query from the list");
|
|
109
128
|
i0.ɵɵelementEnd();
|
|
110
|
-
i0.ɵɵelementStart(4, "p",
|
|
129
|
+
i0.ɵɵelementStart(4, "p", 46);
|
|
111
130
|
i0.ɵɵtext(5, "Click on a query to view and run it");
|
|
112
|
-
i0.ɵɵelementEnd()
|
|
131
|
+
i0.ɵɵelementEnd();
|
|
132
|
+
i0.ɵɵconditionalCreate(6, QueryBrowserResourceComponent_Conditional_33_Conditional_6_Template, 3, 0, "button", 47);
|
|
133
|
+
i0.ɵɵelementEnd();
|
|
134
|
+
} if (rf & 2) {
|
|
135
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
136
|
+
i0.ɵɵadvance(6);
|
|
137
|
+
i0.ɵɵconditional(ctx_r2.CanCreateQuery ? 6 : -1);
|
|
113
138
|
} }
|
|
114
|
-
function
|
|
115
|
-
i0.ɵɵelementStart(0, "span",
|
|
116
|
-
i0.ɵɵelement(1, "i",
|
|
139
|
+
function QueryBrowserResourceComponent_Conditional_34_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
140
|
+
i0.ɵɵelementStart(0, "span", 57);
|
|
141
|
+
i0.ɵɵelement(1, "i", 38);
|
|
117
142
|
i0.ɵɵtext(2);
|
|
118
143
|
i0.ɵɵelementEnd();
|
|
119
144
|
} if (rf & 2) {
|
|
@@ -124,155 +149,351 @@ function QueryBrowserResourceComponent_Conditional_33_Conditional_5_Template(rf,
|
|
|
124
149
|
i0.ɵɵadvance();
|
|
125
150
|
i0.ɵɵtextInterpolate1(" ", ctx_r2.selectedQuery.Status, " ");
|
|
126
151
|
} }
|
|
127
|
-
function
|
|
128
|
-
i0.ɵɵelementStart(0, "span",
|
|
129
|
-
i0.ɵɵelement(1, "i",
|
|
152
|
+
function QueryBrowserResourceComponent_Conditional_34_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
153
|
+
i0.ɵɵelementStart(0, "span", 58);
|
|
154
|
+
i0.ɵɵelement(1, "i", 59);
|
|
130
155
|
i0.ɵɵtext(2, " Approved ");
|
|
131
156
|
i0.ɵɵelementEnd();
|
|
132
157
|
} if (rf & 2) {
|
|
133
158
|
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
134
159
|
i0.ɵɵstyleProp("background", ctx_r2.getStatusColor("Approved"));
|
|
135
160
|
} }
|
|
136
|
-
function
|
|
137
|
-
const
|
|
138
|
-
i0.ɵɵelementStart(0, "
|
|
139
|
-
i0.ɵɵ
|
|
161
|
+
function QueryBrowserResourceComponent_Conditional_34_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
162
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
163
|
+
i0.ɵɵelementStart(0, "button", 60);
|
|
164
|
+
i0.ɵɵlistener("click", function QueryBrowserResourceComponent_Conditional_34_Conditional_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r11); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.OpenEditDrawer(ctx_r2.selectedQuery)); });
|
|
165
|
+
i0.ɵɵelement(1, "i", 61);
|
|
166
|
+
i0.ɵɵelementEnd();
|
|
167
|
+
} }
|
|
168
|
+
function QueryBrowserResourceComponent_Conditional_34_Template(rf, ctx) { if (rf & 1) {
|
|
169
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
170
|
+
i0.ɵɵelementStart(0, "div", 49)(1, "div", 50);
|
|
171
|
+
i0.ɵɵelement(2, "i", 51);
|
|
140
172
|
i0.ɵɵelementStart(3, "span");
|
|
141
173
|
i0.ɵɵtext(4);
|
|
142
174
|
i0.ɵɵelementEnd()();
|
|
143
|
-
i0.ɵɵ
|
|
144
|
-
i0.ɵɵ
|
|
145
|
-
i0.ɵɵ
|
|
146
|
-
i0.ɵɵ
|
|
175
|
+
i0.ɵɵelementStart(5, "div", 52);
|
|
176
|
+
i0.ɵɵconditionalCreate(6, QueryBrowserResourceComponent_Conditional_34_Conditional_6_Template, 3, 5, "span", 53)(7, QueryBrowserResourceComponent_Conditional_34_Conditional_7_Template, 3, 2, "span", 54);
|
|
177
|
+
i0.ɵɵconditionalCreate(8, QueryBrowserResourceComponent_Conditional_34_Conditional_8_Template, 2, 0, "button", 55);
|
|
178
|
+
i0.ɵɵelementEnd()();
|
|
179
|
+
i0.ɵɵelementStart(9, "mj-query-viewer", 56);
|
|
180
|
+
i0.ɵɵlistener("EntityLinkClick", function QueryBrowserResourceComponent_Conditional_34_Template_mj_query_viewer_EntityLinkClick_9_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onEntityLinkClick($event)); })("RowDoubleClick", function QueryBrowserResourceComponent_Conditional_34_Template_mj_query_viewer_RowDoubleClick_9_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onRowDoubleClick($event)); })("OpenQueryRecord", function QueryBrowserResourceComponent_Conditional_34_Template_mj_query_viewer_OpenQueryRecord_9_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onOpenQueryRecord($event)); })("CompositionTokenClick", function QueryBrowserResourceComponent_Conditional_34_Template_mj_query_viewer_CompositionTokenClick_9_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onCompositionTokenClick($event)); });
|
|
147
181
|
i0.ɵɵelementEnd();
|
|
148
182
|
} if (rf & 2) {
|
|
149
183
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
150
184
|
i0.ɵɵadvance(4);
|
|
151
185
|
i0.ɵɵtextInterpolate(ctx_r2.selectedQuery.Name);
|
|
152
|
-
i0.ɵɵadvance();
|
|
153
|
-
i0.ɵɵconditional(ctx_r2.selectedQuery.Status !== "Approved" ? 5 : 6);
|
|
154
186
|
i0.ɵɵadvance(2);
|
|
187
|
+
i0.ɵɵconditional(ctx_r2.selectedQuery.Status !== "Approved" ? 6 : 7);
|
|
188
|
+
i0.ɵɵadvance(2);
|
|
189
|
+
i0.ɵɵconditional(ctx_r2.CanEditQuery ? 8 : -1);
|
|
190
|
+
i0.ɵɵadvance();
|
|
155
191
|
i0.ɵɵproperty("QueryId", ctx_r2.selectedQuery.ID)("AutoRun", true)("SelectionMode", "multiple");
|
|
156
192
|
} }
|
|
157
|
-
function
|
|
158
|
-
i0.ɵɵelementStart(0, "span",
|
|
193
|
+
function QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_8_For_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
194
|
+
i0.ɵɵelementStart(0, "span", 76);
|
|
159
195
|
i0.ɵɵtext(1);
|
|
160
196
|
i0.ɵɵelementEnd();
|
|
161
197
|
} if (rf & 2) {
|
|
162
|
-
const
|
|
198
|
+
const query_r15 = i0.ɵɵnextContext().$implicit;
|
|
163
199
|
i0.ɵɵadvance();
|
|
164
|
-
i0.ɵɵtextInterpolate(
|
|
200
|
+
i0.ɵɵtextInterpolate(query_r15.Description);
|
|
165
201
|
} }
|
|
166
|
-
function
|
|
167
|
-
i0.ɵɵelement(0, "i",
|
|
202
|
+
function QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_8_For_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
203
|
+
i0.ɵɵelement(0, "i", 77);
|
|
168
204
|
} }
|
|
169
|
-
function
|
|
170
|
-
i0.ɵɵelementStart(0, "span",
|
|
205
|
+
function QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_8_For_2_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
206
|
+
i0.ɵɵelementStart(0, "span", 80);
|
|
171
207
|
i0.ɵɵtext(1);
|
|
172
208
|
i0.ɵɵelementEnd();
|
|
173
209
|
} if (rf & 2) {
|
|
174
|
-
const
|
|
210
|
+
const query_r15 = i0.ɵɵnextContext().$implicit;
|
|
175
211
|
const ctx_r2 = i0.ɵɵnextContext(4);
|
|
176
|
-
i0.ɵɵstyleProp("background", ctx_r2.getStatusColor(
|
|
177
|
-
i0.ɵɵproperty("title",
|
|
212
|
+
i0.ɵɵstyleProp("background", ctx_r2.getStatusColor(query_r15.Status));
|
|
213
|
+
i0.ɵɵproperty("title", query_r15.Status);
|
|
178
214
|
i0.ɵɵadvance();
|
|
179
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
215
|
+
i0.ɵɵtextInterpolate1(" ", query_r15.Status, " ");
|
|
180
216
|
} }
|
|
181
|
-
function
|
|
182
|
-
const
|
|
183
|
-
i0.ɵɵelementStart(0, "
|
|
184
|
-
i0.ɵɵlistener("click", function
|
|
185
|
-
i0.ɵɵelement(1, "
|
|
186
|
-
i0.ɵɵ
|
|
217
|
+
function QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_8_For_2_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
218
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
219
|
+
i0.ɵɵelementStart(0, "button", 81);
|
|
220
|
+
i0.ɵɵlistener("click", function QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_8_For_2_Conditional_9_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r16); const query_r15 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r2.OpenEditDrawer(query_r15, $event)); });
|
|
221
|
+
i0.ɵɵelement(1, "i", 61);
|
|
222
|
+
i0.ɵɵelementEnd();
|
|
223
|
+
} }
|
|
224
|
+
function QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_8_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
225
|
+
const _r14 = i0.ɵɵgetCurrentView();
|
|
226
|
+
i0.ɵɵelementStart(0, "div", 71);
|
|
227
|
+
i0.ɵɵlistener("click", function QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_8_For_2_Template_div_click_0_listener($event) { const query_r15 = i0.ɵɵrestoreView(_r14).$implicit; const ctx_r2 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r2.selectQuery(query_r15, $event)); });
|
|
228
|
+
i0.ɵɵelement(1, "span", 72)(2, "i", 73);
|
|
229
|
+
i0.ɵɵelementStart(3, "div", 74)(4, "span", 75);
|
|
187
230
|
i0.ɵɵtext(5);
|
|
188
231
|
i0.ɵɵelementEnd();
|
|
189
|
-
i0.ɵɵconditionalCreate(6,
|
|
232
|
+
i0.ɵɵconditionalCreate(6, QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_8_For_2_Conditional_6_Template, 2, 1, "span", 76);
|
|
190
233
|
i0.ɵɵelementEnd();
|
|
191
|
-
i0.ɵɵconditionalCreate(7,
|
|
192
|
-
i0.ɵɵconditionalCreate(8,
|
|
234
|
+
i0.ɵɵconditionalCreate(7, QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_8_For_2_Conditional_7_Template, 1, 0, "i", 77);
|
|
235
|
+
i0.ɵɵconditionalCreate(8, QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_8_For_2_Conditional_8_Template, 2, 4, "span", 78);
|
|
236
|
+
i0.ɵɵconditionalCreate(9, QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_8_For_2_Conditional_9_Template, 2, 0, "button", 79);
|
|
193
237
|
i0.ɵɵelementEnd();
|
|
194
238
|
} if (rf & 2) {
|
|
195
|
-
const
|
|
239
|
+
const query_r15 = ctx.$implicit;
|
|
196
240
|
const ctx_r2 = i0.ɵɵnextContext(4);
|
|
197
|
-
i0.ɵɵclassProp("selected", ctx_r2.IsQuerySelected(
|
|
241
|
+
i0.ɵɵclassProp("selected", ctx_r2.IsQuerySelected(query_r15))("hidden", !ctx_r2.isQueryVisible(query_r15));
|
|
198
242
|
i0.ɵɵadvance();
|
|
199
|
-
i0.ɵɵstyleProp("background", ctx_r2.getStatusColor(
|
|
200
|
-
i0.ɵɵproperty("title",
|
|
243
|
+
i0.ɵɵstyleProp("background", ctx_r2.getStatusColor(query_r15.Status));
|
|
244
|
+
i0.ɵɵproperty("title", query_r15.Status);
|
|
201
245
|
i0.ɵɵadvance(2);
|
|
202
|
-
i0.ɵɵproperty("title",
|
|
246
|
+
i0.ɵɵproperty("title", query_r15.Description || query_r15.Name);
|
|
203
247
|
i0.ɵɵadvance(2);
|
|
204
|
-
i0.ɵɵtextInterpolate(
|
|
248
|
+
i0.ɵɵtextInterpolate(query_r15.Name);
|
|
249
|
+
i0.ɵɵadvance();
|
|
250
|
+
i0.ɵɵconditional(query_r15.Description ? 6 : -1);
|
|
205
251
|
i0.ɵɵadvance();
|
|
206
|
-
i0.ɵɵconditional(
|
|
252
|
+
i0.ɵɵconditional(query_r15.UsesTemplate ? 7 : -1);
|
|
207
253
|
i0.ɵɵadvance();
|
|
208
|
-
i0.ɵɵconditional(
|
|
254
|
+
i0.ɵɵconditional(query_r15.Status !== "Approved" ? 8 : -1);
|
|
209
255
|
i0.ɵɵadvance();
|
|
210
|
-
i0.ɵɵconditional(
|
|
256
|
+
i0.ɵɵconditional(ctx_r2.CanEditQuery ? 9 : -1);
|
|
211
257
|
} }
|
|
212
|
-
function
|
|
213
|
-
i0.ɵɵelementStart(0, "div",
|
|
214
|
-
i0.ɵɵrepeaterCreate(1,
|
|
258
|
+
function QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
259
|
+
i0.ɵɵelementStart(0, "div", 69);
|
|
260
|
+
i0.ɵɵrepeaterCreate(1, QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_8_For_2_Template, 10, 13, "div", 70, i0.ɵɵcomponentInstance().trackByQuery, true);
|
|
215
261
|
i0.ɵɵelementEnd();
|
|
216
262
|
} if (rf & 2) {
|
|
217
|
-
const
|
|
263
|
+
const node_r13 = i0.ɵɵnextContext(2).node;
|
|
218
264
|
i0.ɵɵadvance();
|
|
219
|
-
i0.ɵɵrepeater(
|
|
265
|
+
i0.ɵɵrepeater(node_r13.queries);
|
|
220
266
|
} }
|
|
221
|
-
function
|
|
267
|
+
function QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_9_For_1_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
222
268
|
i0.ɵɵelementContainer(0);
|
|
223
269
|
} }
|
|
224
|
-
function
|
|
225
|
-
i0.ɵɵtemplate(0,
|
|
270
|
+
function QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_9_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
271
|
+
i0.ɵɵtemplate(0, QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_9_For_1_ng_container_0_Template, 1, 0, "ng-container", 43);
|
|
226
272
|
} if (rf & 2) {
|
|
227
|
-
const
|
|
273
|
+
const child_r17 = ctx.$implicit;
|
|
228
274
|
i0.ɵɵnextContext(4);
|
|
229
|
-
const
|
|
230
|
-
i0.ɵɵproperty("ngTemplateOutlet",
|
|
275
|
+
const categoryNode_r8 = i0.ɵɵreference(36);
|
|
276
|
+
i0.ɵɵproperty("ngTemplateOutlet", categoryNode_r8)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c1, child_r17));
|
|
231
277
|
} }
|
|
232
|
-
function
|
|
233
|
-
i0.ɵɵrepeaterCreate(0,
|
|
278
|
+
function QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
279
|
+
i0.ɵɵrepeaterCreate(0, QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_9_For_1_Template, 1, 4, "ng-container", null, i0.ɵɵcomponentInstance().trackByCategory, true);
|
|
234
280
|
} if (rf & 2) {
|
|
235
|
-
const
|
|
236
|
-
i0.ɵɵrepeater(
|
|
281
|
+
const node_r13 = i0.ɵɵnextContext(2).node;
|
|
282
|
+
i0.ɵɵrepeater(node_r13.children);
|
|
237
283
|
} }
|
|
238
|
-
function
|
|
239
|
-
const
|
|
240
|
-
i0.ɵɵelementStart(0, "div",
|
|
241
|
-
i0.ɵɵlistener("click", function
|
|
242
|
-
i0.ɵɵelement(2, "i",
|
|
243
|
-
i0.ɵɵelementStart(4, "span",
|
|
284
|
+
function QueryBrowserResourceComponent_ng_template_35_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
285
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
286
|
+
i0.ɵɵelementStart(0, "div", 63)(1, "div", 64);
|
|
287
|
+
i0.ɵɵlistener("click", function QueryBrowserResourceComponent_ng_template_35_Conditional_0_Template_div_click_1_listener() { i0.ɵɵrestoreView(_r12); const node_r13 = i0.ɵɵnextContext().node; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.toggleExpand(node_r13)); });
|
|
288
|
+
i0.ɵɵelement(2, "i", 65)(3, "i", 66);
|
|
289
|
+
i0.ɵɵelementStart(4, "span", 67);
|
|
244
290
|
i0.ɵɵtext(5);
|
|
245
291
|
i0.ɵɵelementEnd();
|
|
246
|
-
i0.ɵɵelementStart(6, "span",
|
|
292
|
+
i0.ɵɵelementStart(6, "span", 68);
|
|
247
293
|
i0.ɵɵtext(7);
|
|
248
294
|
i0.ɵɵelementEnd()();
|
|
249
|
-
i0.ɵɵconditionalCreate(8,
|
|
250
|
-
i0.ɵɵconditionalCreate(9,
|
|
295
|
+
i0.ɵɵconditionalCreate(8, QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_8_Template, 3, 0, "div", 69);
|
|
296
|
+
i0.ɵɵconditionalCreate(9, QueryBrowserResourceComponent_ng_template_35_Conditional_0_Conditional_9_Template, 2, 0);
|
|
251
297
|
i0.ɵɵelementEnd();
|
|
252
298
|
} if (rf & 2) {
|
|
253
|
-
const
|
|
299
|
+
const node_r13 = i0.ɵɵnextContext().node;
|
|
254
300
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
255
|
-
i0.ɵɵstyleProp("padding-left",
|
|
256
|
-
i0.ɵɵclassProp("expanded",
|
|
301
|
+
i0.ɵɵstyleProp("padding-left", node_r13.level * 16 + 8, "px");
|
|
302
|
+
i0.ɵɵclassProp("expanded", node_r13.expanded);
|
|
257
303
|
i0.ɵɵadvance(2);
|
|
258
|
-
i0.ɵɵclassProp("fa-chevron-down",
|
|
304
|
+
i0.ɵɵclassProp("fa-chevron-down", node_r13.expanded)("fa-chevron-right", !node_r13.expanded);
|
|
259
305
|
i0.ɵɵadvance();
|
|
260
|
-
i0.ɵɵclassProp("fa-folder-open",
|
|
306
|
+
i0.ɵɵclassProp("fa-folder-open", node_r13.expanded);
|
|
261
307
|
i0.ɵɵadvance(2);
|
|
262
|
-
i0.ɵɵtextInterpolate(
|
|
308
|
+
i0.ɵɵtextInterpolate(node_r13.category.Name);
|
|
263
309
|
i0.ɵɵadvance(2);
|
|
264
|
-
i0.ɵɵtextInterpolate1("(", ctx_r2.getNodeQueryCount(
|
|
310
|
+
i0.ɵɵtextInterpolate1("(", ctx_r2.getNodeQueryCount(node_r13), ")");
|
|
311
|
+
i0.ɵɵadvance();
|
|
312
|
+
i0.ɵɵconditional(node_r13.expanded ? 8 : -1);
|
|
313
|
+
i0.ɵɵadvance();
|
|
314
|
+
i0.ɵɵconditional(node_r13.expanded ? 9 : -1);
|
|
315
|
+
} }
|
|
316
|
+
function QueryBrowserResourceComponent_ng_template_35_Template(rf, ctx) { if (rf & 1) {
|
|
317
|
+
i0.ɵɵconditionalCreate(0, QueryBrowserResourceComponent_ng_template_35_Conditional_0_Template, 10, 14, "div", 62);
|
|
318
|
+
} if (rf & 2) {
|
|
319
|
+
const node_r13 = ctx.node;
|
|
320
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
321
|
+
i0.ɵɵconditional(ctx_r2.hasVisibleContent(node_r13) ? 0 : -1);
|
|
322
|
+
} }
|
|
323
|
+
function QueryBrowserResourceComponent_Conditional_37_Template(rf, ctx) { if (rf & 1) {
|
|
324
|
+
const _r18 = i0.ɵɵgetCurrentView();
|
|
325
|
+
i0.ɵɵelementStart(0, "div", 82);
|
|
326
|
+
i0.ɵɵlistener("click", function QueryBrowserResourceComponent_Conditional_37_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r18); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.OnDrawerBackdropClick()); });
|
|
327
|
+
i0.ɵɵelementEnd();
|
|
328
|
+
} }
|
|
329
|
+
function QueryBrowserResourceComponent_Conditional_38_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
330
|
+
i0.ɵɵelementStart(0, "div", 86);
|
|
331
|
+
i0.ɵɵtext(1);
|
|
332
|
+
i0.ɵɵelementEnd();
|
|
333
|
+
} if (rf & 2) {
|
|
334
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
335
|
+
i0.ɵɵadvance();
|
|
336
|
+
i0.ɵɵtextInterpolate(ctx_r2.DrawerName);
|
|
337
|
+
} }
|
|
338
|
+
function QueryBrowserResourceComponent_Conditional_38_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
339
|
+
i0.ɵɵelementStart(0, "span", 93);
|
|
340
|
+
i0.ɵɵtext(1, "Name is required");
|
|
341
|
+
i0.ɵɵelementEnd();
|
|
342
|
+
} }
|
|
343
|
+
function QueryBrowserResourceComponent_Conditional_38_For_26_Template(rf, ctx) { if (rf & 1) {
|
|
344
|
+
i0.ɵɵelementStart(0, "option", 98);
|
|
345
|
+
i0.ɵɵtext(1);
|
|
346
|
+
i0.ɵɵelementEnd();
|
|
347
|
+
} if (rf & 2) {
|
|
348
|
+
const cat_r20 = ctx.$implicit;
|
|
349
|
+
i0.ɵɵproperty("value", cat_r20.ID);
|
|
265
350
|
i0.ɵɵadvance();
|
|
266
|
-
i0.ɵɵ
|
|
351
|
+
i0.ɵɵtextInterpolate(cat_r20.Name);
|
|
352
|
+
} }
|
|
353
|
+
function QueryBrowserResourceComponent_Conditional_38_For_32_Template(rf, ctx) { if (rf & 1) {
|
|
354
|
+
i0.ɵɵelementStart(0, "option", 98);
|
|
355
|
+
i0.ɵɵtext(1);
|
|
356
|
+
i0.ɵɵelementEnd();
|
|
357
|
+
} if (rf & 2) {
|
|
358
|
+
const s_r21 = ctx.$implicit;
|
|
359
|
+
i0.ɵɵproperty("value", s_r21);
|
|
267
360
|
i0.ɵɵadvance();
|
|
268
|
-
i0.ɵɵ
|
|
361
|
+
i0.ɵɵtextInterpolate(s_r21);
|
|
362
|
+
} }
|
|
363
|
+
function QueryBrowserResourceComponent_Conditional_38_Conditional_42_Template(rf, ctx) { if (rf & 1) {
|
|
364
|
+
const _r22 = i0.ɵɵgetCurrentView();
|
|
365
|
+
i0.ɵɵelementStart(0, "div", 102);
|
|
366
|
+
i0.ɵɵelement(1, "i", 108);
|
|
367
|
+
i0.ɵɵtext(2, " To manage Parameters, Fields, and Permissions \u2014 ");
|
|
368
|
+
i0.ɵɵelementStart(3, "button", 109);
|
|
369
|
+
i0.ɵɵlistener("click", function QueryBrowserResourceComponent_Conditional_38_Conditional_42_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r22); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.OpenFullRecord()); });
|
|
370
|
+
i0.ɵɵtext(4, " Open full record ");
|
|
371
|
+
i0.ɵɵelement(5, "i", 110);
|
|
372
|
+
i0.ɵɵelementEnd()();
|
|
373
|
+
} }
|
|
374
|
+
function QueryBrowserResourceComponent_Conditional_38_Conditional_44_Template(rf, ctx) { if (rf & 1) {
|
|
375
|
+
i0.ɵɵelementStart(0, "div", 104);
|
|
376
|
+
i0.ɵɵelement(1, "i", 111);
|
|
377
|
+
i0.ɵɵtext(2);
|
|
378
|
+
i0.ɵɵelementEnd();
|
|
379
|
+
} if (rf & 2) {
|
|
380
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
381
|
+
i0.ɵɵadvance(2);
|
|
382
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r2.DrawerSaveError, " ");
|
|
383
|
+
} }
|
|
384
|
+
function QueryBrowserResourceComponent_Conditional_38_Conditional_47_Template(rf, ctx) { if (rf & 1) {
|
|
385
|
+
i0.ɵɵelement(0, "i", 112);
|
|
386
|
+
i0.ɵɵtext(1, " Saving... ");
|
|
269
387
|
} }
|
|
270
|
-
function
|
|
271
|
-
i0.ɵɵ
|
|
388
|
+
function QueryBrowserResourceComponent_Conditional_38_Conditional_48_Template(rf, ctx) { if (rf & 1) {
|
|
389
|
+
i0.ɵɵelement(0, "i", 113);
|
|
390
|
+
i0.ɵɵtext(1, " Save ");
|
|
391
|
+
} }
|
|
392
|
+
function QueryBrowserResourceComponent_Conditional_38_Template(rf, ctx) { if (rf & 1) {
|
|
393
|
+
const _r19 = i0.ɵɵgetCurrentView();
|
|
394
|
+
i0.ɵɵelementStart(0, "div", 31)(1, "div", 83)(2, "div", 84);
|
|
395
|
+
i0.ɵɵelement(3, "i", 38);
|
|
396
|
+
i0.ɵɵelementStart(4, "div")(5, "div", 85);
|
|
397
|
+
i0.ɵɵtext(6);
|
|
398
|
+
i0.ɵɵelementEnd();
|
|
399
|
+
i0.ɵɵconditionalCreate(7, QueryBrowserResourceComponent_Conditional_38_Conditional_7_Template, 2, 1, "div", 86);
|
|
400
|
+
i0.ɵɵelementEnd()();
|
|
401
|
+
i0.ɵɵelementStart(8, "button", 87);
|
|
402
|
+
i0.ɵɵlistener("click", function QueryBrowserResourceComponent_Conditional_38_Template_button_click_8_listener() { i0.ɵɵrestoreView(_r19); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.CloseDrawer()); });
|
|
403
|
+
i0.ɵɵelement(9, "i", 35);
|
|
404
|
+
i0.ɵɵelementEnd()();
|
|
405
|
+
i0.ɵɵelementStart(10, "div", 88)(11, "div", 89)(12, "label", 90);
|
|
406
|
+
i0.ɵɵtext(13, "Name ");
|
|
407
|
+
i0.ɵɵelementStart(14, "span", 91);
|
|
408
|
+
i0.ɵɵtext(15, "*");
|
|
409
|
+
i0.ɵɵelementEnd()();
|
|
410
|
+
i0.ɵɵelementStart(16, "input", 92);
|
|
411
|
+
i0.ɵɵtwoWayListener("ngModelChange", function QueryBrowserResourceComponent_Conditional_38_Template_input_ngModelChange_16_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r2.DrawerName, $event) || (ctx_r2.DrawerName = $event); return i0.ɵɵresetView($event); });
|
|
412
|
+
i0.ɵɵlistener("ngModelChange", function QueryBrowserResourceComponent_Conditional_38_Template_input_ngModelChange_16_listener() { i0.ɵɵrestoreView(_r19); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.DrawerNameError = false); });
|
|
413
|
+
i0.ɵɵelementEnd();
|
|
414
|
+
i0.ɵɵconditionalCreate(17, QueryBrowserResourceComponent_Conditional_38_Conditional_17_Template, 2, 0, "span", 93);
|
|
415
|
+
i0.ɵɵelementEnd();
|
|
416
|
+
i0.ɵɵelementStart(18, "div", 94)(19, "div", 95)(20, "label", 90);
|
|
417
|
+
i0.ɵɵtext(21, "Category");
|
|
418
|
+
i0.ɵɵelementEnd();
|
|
419
|
+
i0.ɵɵelementStart(22, "select", 96);
|
|
420
|
+
i0.ɵɵtwoWayListener("ngModelChange", function QueryBrowserResourceComponent_Conditional_38_Template_select_ngModelChange_22_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r2.DrawerCategoryID, $event) || (ctx_r2.DrawerCategoryID = $event); return i0.ɵɵresetView($event); });
|
|
421
|
+
i0.ɵɵelementStart(23, "option", 97);
|
|
422
|
+
i0.ɵɵtext(24, "(none)");
|
|
423
|
+
i0.ɵɵelementEnd();
|
|
424
|
+
i0.ɵɵrepeaterCreate(25, QueryBrowserResourceComponent_Conditional_38_For_26_Template, 2, 2, "option", 98, _forTrack0);
|
|
425
|
+
i0.ɵɵelementEnd()();
|
|
426
|
+
i0.ɵɵelementStart(27, "div", 95)(28, "label", 90);
|
|
427
|
+
i0.ɵɵtext(29, "Status");
|
|
428
|
+
i0.ɵɵelementEnd();
|
|
429
|
+
i0.ɵɵelementStart(30, "select", 96);
|
|
430
|
+
i0.ɵɵtwoWayListener("ngModelChange", function QueryBrowserResourceComponent_Conditional_38_Template_select_ngModelChange_30_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r2.DrawerStatus, $event) || (ctx_r2.DrawerStatus = $event); return i0.ɵɵresetView($event); });
|
|
431
|
+
i0.ɵɵrepeaterCreate(31, QueryBrowserResourceComponent_Conditional_38_For_32_Template, 2, 2, "option", 98, i0.ɵɵrepeaterTrackByIdentity);
|
|
432
|
+
i0.ɵɵelementEnd()()();
|
|
433
|
+
i0.ɵɵelementStart(33, "div", 89)(34, "label", 90);
|
|
434
|
+
i0.ɵɵtext(35, "Description");
|
|
435
|
+
i0.ɵɵelementEnd();
|
|
436
|
+
i0.ɵɵelementStart(36, "textarea", 99);
|
|
437
|
+
i0.ɵɵtwoWayListener("ngModelChange", function QueryBrowserResourceComponent_Conditional_38_Template_textarea_ngModelChange_36_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r2.DrawerDescription, $event) || (ctx_r2.DrawerDescription = $event); return i0.ɵɵresetView($event); });
|
|
438
|
+
i0.ɵɵelementEnd()();
|
|
439
|
+
i0.ɵɵelementStart(37, "div", 100)(38, "label", 90);
|
|
440
|
+
i0.ɵɵtext(39, "SQL");
|
|
441
|
+
i0.ɵɵelementEnd();
|
|
442
|
+
i0.ɵɵelementStart(40, "mj-code-editor", 101, 1);
|
|
443
|
+
i0.ɵɵlistener("change", function QueryBrowserResourceComponent_Conditional_38_Template_mj_code_editor_change_40_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.OnDrawerSQLChange($event)); });
|
|
444
|
+
i0.ɵɵelementEnd()();
|
|
445
|
+
i0.ɵɵconditionalCreate(42, QueryBrowserResourceComponent_Conditional_38_Conditional_42_Template, 6, 0, "div", 102);
|
|
446
|
+
i0.ɵɵelementEnd();
|
|
447
|
+
i0.ɵɵelementStart(43, "div", 103);
|
|
448
|
+
i0.ɵɵconditionalCreate(44, QueryBrowserResourceComponent_Conditional_38_Conditional_44_Template, 3, 1, "div", 104);
|
|
449
|
+
i0.ɵɵelementStart(45, "div", 105)(46, "button", 106);
|
|
450
|
+
i0.ɵɵlistener("click", function QueryBrowserResourceComponent_Conditional_38_Template_button_click_46_listener() { i0.ɵɵrestoreView(_r19); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.SaveDrawer()); });
|
|
451
|
+
i0.ɵɵconditionalCreate(47, QueryBrowserResourceComponent_Conditional_38_Conditional_47_Template, 2, 0)(48, QueryBrowserResourceComponent_Conditional_38_Conditional_48_Template, 2, 0);
|
|
452
|
+
i0.ɵɵelementEnd();
|
|
453
|
+
i0.ɵɵelementStart(49, "button", 107);
|
|
454
|
+
i0.ɵɵlistener("click", function QueryBrowserResourceComponent_Conditional_38_Template_button_click_49_listener() { i0.ɵɵrestoreView(_r19); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.CloseDrawer()); });
|
|
455
|
+
i0.ɵɵtext(50, " Cancel ");
|
|
456
|
+
i0.ɵɵelementEnd()()()();
|
|
272
457
|
} if (rf & 2) {
|
|
273
|
-
const node_r10 = ctx.node;
|
|
274
458
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
275
|
-
i0.ɵɵ
|
|
459
|
+
i0.ɵɵadvance(3);
|
|
460
|
+
i0.ɵɵclassProp("fa-plus", ctx_r2.DrawerMode === "create")("fa-pen-to-square", ctx_r2.DrawerMode === "edit");
|
|
461
|
+
i0.ɵɵadvance(3);
|
|
462
|
+
i0.ɵɵtextInterpolate(ctx_r2.DrawerMode === "create" ? "New Query" : "Edit Query");
|
|
463
|
+
i0.ɵɵadvance();
|
|
464
|
+
i0.ɵɵconditional(ctx_r2.DrawerMode === "edit" && ctx_r2.DrawerName ? 7 : -1);
|
|
465
|
+
i0.ɵɵadvance(4);
|
|
466
|
+
i0.ɵɵclassProp("drawer-field-error", ctx_r2.DrawerNameError);
|
|
467
|
+
i0.ɵɵadvance(5);
|
|
468
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r2.DrawerName);
|
|
469
|
+
i0.ɵɵproperty("disabled", ctx_r2.IsSavingDrawer);
|
|
470
|
+
i0.ɵɵadvance();
|
|
471
|
+
i0.ɵɵconditional(ctx_r2.DrawerNameError ? 17 : -1);
|
|
472
|
+
i0.ɵɵadvance(5);
|
|
473
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r2.DrawerCategoryID);
|
|
474
|
+
i0.ɵɵproperty("disabled", ctx_r2.IsSavingDrawer);
|
|
475
|
+
i0.ɵɵadvance(3);
|
|
476
|
+
i0.ɵɵrepeater(ctx_r2.categories);
|
|
477
|
+
i0.ɵɵadvance(5);
|
|
478
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r2.DrawerStatus);
|
|
479
|
+
i0.ɵɵproperty("disabled", ctx_r2.IsSavingDrawer);
|
|
480
|
+
i0.ɵɵadvance();
|
|
481
|
+
i0.ɵɵrepeater(ctx_r2.DrawerStatuses);
|
|
482
|
+
i0.ɵɵadvance(5);
|
|
483
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r2.DrawerDescription);
|
|
484
|
+
i0.ɵɵproperty("disabled", ctx_r2.IsSavingDrawer);
|
|
485
|
+
i0.ɵɵadvance(4);
|
|
486
|
+
i0.ɵɵproperty("language", "sql")("indentWithTab", true)("readonly", ctx_r2.IsSavingDrawer);
|
|
487
|
+
i0.ɵɵadvance(2);
|
|
488
|
+
i0.ɵɵconditional(ctx_r2.DrawerMode === "edit" && ctx_r2.DrawerQueryId ? 42 : -1);
|
|
489
|
+
i0.ɵɵadvance(2);
|
|
490
|
+
i0.ɵɵconditional(ctx_r2.DrawerSaveError ? 44 : -1);
|
|
491
|
+
i0.ɵɵadvance(2);
|
|
492
|
+
i0.ɵɵproperty("disabled", ctx_r2.IsSavingDrawer || !ctx_r2.DrawerName.trim());
|
|
493
|
+
i0.ɵɵadvance();
|
|
494
|
+
i0.ɵɵconditional(ctx_r2.IsSavingDrawer ? 47 : 48);
|
|
495
|
+
i0.ɵɵadvance(2);
|
|
496
|
+
i0.ɵɵproperty("disabled", ctx_r2.IsSavingDrawer);
|
|
276
497
|
} }
|
|
277
498
|
/**
|
|
278
499
|
* A resource component for browsing and executing stored queries.
|
|
@@ -301,6 +522,7 @@ let QueryBrowserResourceComponent = class QueryBrowserResourceComponent extends
|
|
|
301
522
|
/** All queries the user has permission to run */
|
|
302
523
|
queries = [];
|
|
303
524
|
filteredQueries = [];
|
|
525
|
+
filteredQueryIds = new Set();
|
|
304
526
|
selectedQuery = null;
|
|
305
527
|
searchText = '';
|
|
306
528
|
PanelWidth = QueryBrowserResourceComponent_1.DEFAULT_PANEL_WIDTH;
|
|
@@ -324,6 +546,24 @@ let QueryBrowserResourceComponent = class QueryBrowserResourceComponent extends
|
|
|
324
546
|
// Bound event handlers for resize (need references for removeEventListener)
|
|
325
547
|
boundOnResizeMove = this.onResizeMove.bind(this);
|
|
326
548
|
boundOnResizeEnd = this.onResizeEnd.bind(this);
|
|
549
|
+
// ========================================
|
|
550
|
+
// Drawer State (Create / Edit)
|
|
551
|
+
// ========================================
|
|
552
|
+
ShowQueryDrawer = false;
|
|
553
|
+
DrawerMode = 'create';
|
|
554
|
+
DrawerQueryId = null;
|
|
555
|
+
DrawerName = '';
|
|
556
|
+
DrawerSQL = '';
|
|
557
|
+
drawerSqlEditor = null;
|
|
558
|
+
DrawerDescription = '';
|
|
559
|
+
DrawerCategoryID = '';
|
|
560
|
+
DrawerStatus = 'Pending';
|
|
561
|
+
IsSavingDrawer = false;
|
|
562
|
+
DrawerNameError = false;
|
|
563
|
+
DrawerSaveError = null;
|
|
564
|
+
/** Ordered status options for the drawer dropdown — all valid Query statuses */
|
|
565
|
+
DrawerStatuses = ['Pending', 'Approved', 'Rejected', 'Expired'];
|
|
566
|
+
initialDrawerSnapshot = '';
|
|
327
567
|
constructor(cdr, navigationService, router, elementRef, zone) {
|
|
328
568
|
super();
|
|
329
569
|
this.cdr = cdr;
|
|
@@ -527,6 +767,7 @@ let QueryBrowserResourceComponent = class QueryBrowserResourceComponent extends
|
|
|
527
767
|
q.Category?.toLowerCase().includes(searchLower));
|
|
528
768
|
}
|
|
529
769
|
this.filteredQueries = result;
|
|
770
|
+
this.filteredQueryIds = new Set(result.map(q => q.ID.toLowerCase()));
|
|
530
771
|
}
|
|
531
772
|
/** Load saved status filter preferences */
|
|
532
773
|
loadSavedStatusFilters() {
|
|
@@ -622,7 +863,7 @@ let QueryBrowserResourceComponent = class QueryBrowserResourceComponent extends
|
|
|
622
863
|
isQueryVisible(query) {
|
|
623
864
|
if (!this.searchText)
|
|
624
865
|
return true;
|
|
625
|
-
return this.
|
|
866
|
+
return this.filteredQueryIds.has(query.ID.toLowerCase());
|
|
626
867
|
}
|
|
627
868
|
hasVisibleContent(node) {
|
|
628
869
|
if (!this.searchText)
|
|
@@ -639,8 +880,7 @@ let QueryBrowserResourceComponent = class QueryBrowserResourceComponent extends
|
|
|
639
880
|
// ========================================
|
|
640
881
|
onEntityLinkClick(event) {
|
|
641
882
|
// Look up the entity's actual primary key field name from metadata
|
|
642
|
-
const
|
|
643
|
-
const entity = md.Entities.find(e => e.Name === event.entityName);
|
|
883
|
+
const entity = this.metadata.Entities.find(e => e.Name === event.entityName);
|
|
644
884
|
const pkField = entity?.FirstPrimaryKey;
|
|
645
885
|
const pkFieldName = pkField?.Name || 'ID';
|
|
646
886
|
const compositeKey = new CompositeKey([{ FieldName: pkFieldName, Value: event.recordId }]);
|
|
@@ -654,12 +894,223 @@ let QueryBrowserResourceComponent = class QueryBrowserResourceComponent extends
|
|
|
654
894
|
const compositeKey = CompositeKey.FromID(event.queryId);
|
|
655
895
|
this.navigationService.OpenEntityRecord('MJ: Queries', compositeKey);
|
|
656
896
|
}
|
|
657
|
-
|
|
658
|
-
//
|
|
659
|
-
event.
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
897
|
+
onCompositionTokenClick(event) {
|
|
898
|
+
// Find the referenced query by matching name and category path
|
|
899
|
+
const targetQuery = this.findQueryByCompositionPath(event.FullPath);
|
|
900
|
+
if (targetQuery) {
|
|
901
|
+
this.expandTreeToQuery(targetQuery);
|
|
902
|
+
this.selectQuery(targetQuery);
|
|
903
|
+
}
|
|
904
|
+
else {
|
|
905
|
+
// Query not in the current list — could be filtered out or in a different status
|
|
906
|
+
console.warn(`Composition target query not found: "${event.FullPath}"`);
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* Find a query by its composition path (e.g., "Demos/Active Users").
|
|
911
|
+
* Matches the last segment as query name and preceding segments as category hierarchy.
|
|
912
|
+
*/
|
|
913
|
+
findQueryByCompositionPath(fullPath) {
|
|
914
|
+
const segments = fullPath.split('/').map(s => s.trim()).filter(s => s.length > 0);
|
|
915
|
+
if (segments.length === 0)
|
|
916
|
+
return null;
|
|
917
|
+
const queryName = segments[segments.length - 1];
|
|
918
|
+
const categorySegments = segments.slice(0, -1);
|
|
919
|
+
// First try: exact match on Name + CategoryPath
|
|
920
|
+
let result = this.queries.find(q => {
|
|
921
|
+
if (q.Name !== queryName)
|
|
922
|
+
return false;
|
|
923
|
+
if (categorySegments.length === 0)
|
|
924
|
+
return true;
|
|
925
|
+
const expectedPath = '/' + categorySegments.join('/') + '/';
|
|
926
|
+
return q.CategoryPath === expectedPath;
|
|
927
|
+
});
|
|
928
|
+
// Fallback: match on Name alone if category path didn't match
|
|
929
|
+
if (!result) {
|
|
930
|
+
result = this.queries.find(q => q.Name === queryName);
|
|
931
|
+
}
|
|
932
|
+
return result ?? null;
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* Expand category tree nodes to reveal a specific query.
|
|
936
|
+
*/
|
|
937
|
+
expandTreeToQuery(query) {
|
|
938
|
+
const expandInNodes = (nodes) => {
|
|
939
|
+
for (const node of nodes) {
|
|
940
|
+
// Check if this node directly contains the query
|
|
941
|
+
if (node.queries.some(q => UUIDsEqual(q.ID, query.ID))) {
|
|
942
|
+
node.expanded = true;
|
|
943
|
+
return true;
|
|
944
|
+
}
|
|
945
|
+
// Check children recursively
|
|
946
|
+
if (expandInNodes(node.children)) {
|
|
947
|
+
node.expanded = true;
|
|
948
|
+
return true;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
return false;
|
|
952
|
+
};
|
|
953
|
+
expandInNodes(this.categoryTree);
|
|
954
|
+
this.cdr.markForCheck();
|
|
955
|
+
}
|
|
956
|
+
/** True when the current user has permission to create new queries. */
|
|
957
|
+
get CanCreateQuery() {
|
|
958
|
+
const entity = this.metadata.EntityByName('MJ: Queries');
|
|
959
|
+
if (!entity || !this.metadata.CurrentUser)
|
|
960
|
+
return false;
|
|
961
|
+
return entity.GetUserPermisions(this.metadata.CurrentUser).CanCreate;
|
|
962
|
+
}
|
|
963
|
+
/** True when the current user has permission to edit queries. */
|
|
964
|
+
get CanEditQuery() {
|
|
965
|
+
const entity = this.metadata.EntityByName('MJ: Queries');
|
|
966
|
+
if (!entity || !this.metadata.CurrentUser)
|
|
967
|
+
return false;
|
|
968
|
+
return entity.GetUserPermisions(this.metadata.CurrentUser).CanUpdate;
|
|
969
|
+
}
|
|
970
|
+
// ========================================
|
|
971
|
+
// Drawer — Open / Close
|
|
972
|
+
// ========================================
|
|
973
|
+
/** Close the drawer when Escape is pressed (if open). */
|
|
974
|
+
OnEscapeKey() {
|
|
975
|
+
if (this.ShowQueryDrawer) {
|
|
976
|
+
this.CloseDrawer();
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
/** Open the drawer in create mode. */
|
|
980
|
+
OpenCreateDrawer() {
|
|
981
|
+
this.DrawerMode = 'create';
|
|
982
|
+
this.DrawerQueryId = null;
|
|
983
|
+
this.DrawerName = '';
|
|
984
|
+
this.DrawerSQL = '';
|
|
985
|
+
this.DrawerDescription = '';
|
|
986
|
+
this.DrawerCategoryID = '';
|
|
987
|
+
this.DrawerStatus = 'Pending';
|
|
988
|
+
this.DrawerNameError = false;
|
|
989
|
+
this.DrawerSaveError = null;
|
|
990
|
+
this.captureDrawerSnapshot();
|
|
991
|
+
this.ShowQueryDrawer = true;
|
|
992
|
+
this.cdr.markForCheck();
|
|
993
|
+
setTimeout(() => this.drawerSqlEditor?.setValue(''), 0);
|
|
994
|
+
}
|
|
995
|
+
/**
|
|
996
|
+
* Open the drawer in edit mode, pre-populated from a QueryInfo.
|
|
997
|
+
* Stops event propagation so clicking the edit icon doesn't also select the query.
|
|
998
|
+
*/
|
|
999
|
+
OpenEditDrawer(query, event) {
|
|
1000
|
+
if (event)
|
|
1001
|
+
event.stopPropagation();
|
|
1002
|
+
this.DrawerMode = 'edit';
|
|
1003
|
+
this.DrawerQueryId = query.ID;
|
|
1004
|
+
this.DrawerName = query.Name ?? '';
|
|
1005
|
+
this.DrawerSQL = query.SQL ?? '';
|
|
1006
|
+
this.DrawerDescription = query.Description ?? '';
|
|
1007
|
+
this.DrawerCategoryID = query.CategoryID ?? '';
|
|
1008
|
+
this.DrawerStatus = query.Status ?? 'Pending';
|
|
1009
|
+
this.DrawerNameError = false;
|
|
1010
|
+
this.DrawerSaveError = null;
|
|
1011
|
+
this.captureDrawerSnapshot();
|
|
1012
|
+
this.ShowQueryDrawer = true;
|
|
1013
|
+
this.cdr.markForCheck();
|
|
1014
|
+
setTimeout(() => this.drawerSqlEditor?.setValue(this.DrawerSQL), 0);
|
|
1015
|
+
}
|
|
1016
|
+
/**
|
|
1017
|
+
* Close the drawer. If dirty, ask for confirmation unless force=true.
|
|
1018
|
+
*/
|
|
1019
|
+
CloseDrawer(force = false) {
|
|
1020
|
+
if (!force && this.IsDrawerDirty) {
|
|
1021
|
+
if (!confirm('You have unsaved changes. Discard them?'))
|
|
1022
|
+
return;
|
|
1023
|
+
}
|
|
1024
|
+
this.ShowQueryDrawer = false;
|
|
1025
|
+
this.cdr.markForCheck();
|
|
1026
|
+
}
|
|
1027
|
+
/** Close drawer when clicking the backdrop. */
|
|
1028
|
+
OnDrawerBackdropClick() {
|
|
1029
|
+
this.CloseDrawer();
|
|
1030
|
+
}
|
|
1031
|
+
// ========================================
|
|
1032
|
+
// Drawer — Form Helpers
|
|
1033
|
+
// ========================================
|
|
1034
|
+
/** Update DrawerSQL when the code editor emits a change. */
|
|
1035
|
+
OnDrawerSQLChange(value) {
|
|
1036
|
+
this.DrawerSQL = value;
|
|
1037
|
+
}
|
|
1038
|
+
get currentDrawerSnapshot() {
|
|
1039
|
+
return JSON.stringify({
|
|
1040
|
+
name: this.DrawerName,
|
|
1041
|
+
sql: this.DrawerSQL,
|
|
1042
|
+
description: this.DrawerDescription,
|
|
1043
|
+
categoryID: this.DrawerCategoryID,
|
|
1044
|
+
status: this.DrawerStatus,
|
|
1045
|
+
});
|
|
1046
|
+
}
|
|
1047
|
+
captureDrawerSnapshot() {
|
|
1048
|
+
this.initialDrawerSnapshot = this.currentDrawerSnapshot;
|
|
1049
|
+
}
|
|
1050
|
+
get IsDrawerDirty() {
|
|
1051
|
+
return this.currentDrawerSnapshot !== this.initialDrawerSnapshot;
|
|
1052
|
+
}
|
|
1053
|
+
// ========================================
|
|
1054
|
+
// Drawer — Save
|
|
1055
|
+
// ========================================
|
|
1056
|
+
/** Save the drawer form (create or edit). */
|
|
1057
|
+
async SaveDrawer() {
|
|
1058
|
+
this.DrawerNameError = !this.DrawerName.trim();
|
|
1059
|
+
this.DrawerSaveError = null;
|
|
1060
|
+
if (this.DrawerNameError) {
|
|
1061
|
+
this.cdr.markForCheck();
|
|
1062
|
+
return;
|
|
1063
|
+
}
|
|
1064
|
+
this.IsSavingDrawer = true;
|
|
1065
|
+
this.cdr.markForCheck();
|
|
1066
|
+
try {
|
|
1067
|
+
const entity = await this.metadata.GetEntityObject('MJ: Queries');
|
|
1068
|
+
if (this.DrawerMode === 'edit' && this.DrawerQueryId) {
|
|
1069
|
+
const loaded = await entity.Load(this.DrawerQueryId);
|
|
1070
|
+
if (!loaded) {
|
|
1071
|
+
this.DrawerSaveError = 'Could not load query record. Please refresh and try again.';
|
|
1072
|
+
return;
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
entity.Name = this.DrawerName.trim();
|
|
1076
|
+
entity.SQL = this.DrawerSQL;
|
|
1077
|
+
entity.Description = this.DrawerDescription;
|
|
1078
|
+
entity.CategoryID = this.DrawerCategoryID || null;
|
|
1079
|
+
entity.Status = this.DrawerStatus;
|
|
1080
|
+
const saved = await entity.Save();
|
|
1081
|
+
if (saved) {
|
|
1082
|
+
const savedId = entity.ID;
|
|
1083
|
+
this.ShowQueryDrawer = false;
|
|
1084
|
+
await this.loadData(true);
|
|
1085
|
+
const refreshed = this.queries.find(q => UUIDsEqual(q.ID, savedId));
|
|
1086
|
+
if (refreshed) {
|
|
1087
|
+
this.selectedQuery = refreshed;
|
|
1088
|
+
this.expandCategoryForQuery(refreshed);
|
|
1089
|
+
this.updateUrl();
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
else {
|
|
1093
|
+
this.DrawerSaveError = 'Save failed. Please check your inputs and try again.';
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
catch (e) {
|
|
1097
|
+
console.error('Error saving query:', e);
|
|
1098
|
+
this.DrawerSaveError = 'An unexpected error occurred while saving.';
|
|
1099
|
+
}
|
|
1100
|
+
finally {
|
|
1101
|
+
this.IsSavingDrawer = false;
|
|
1102
|
+
this.cdr.markForCheck();
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
// ========================================
|
|
1106
|
+
// Drawer — Open Full Record
|
|
1107
|
+
// ========================================
|
|
1108
|
+
/** Open the full entity form in a new tab (for sub-entity management). */
|
|
1109
|
+
OpenFullRecord() {
|
|
1110
|
+
if (!this.DrawerQueryId)
|
|
1111
|
+
return;
|
|
1112
|
+
this.navigationService.OpenEntityRecord('MJ: Queries', CompositeKey.FromID(this.DrawerQueryId));
|
|
1113
|
+
this.CloseDrawer(true);
|
|
663
1114
|
}
|
|
664
1115
|
// ========================================
|
|
665
1116
|
// Utilities
|
|
@@ -692,16 +1143,7 @@ let QueryBrowserResourceComponent = class QueryBrowserResourceComponent extends
|
|
|
692
1143
|
* Query params: queryId
|
|
693
1144
|
*/
|
|
694
1145
|
parseUrlState() {
|
|
695
|
-
|
|
696
|
-
const queryIndex = url.indexOf('?');
|
|
697
|
-
if (queryIndex === -1)
|
|
698
|
-
return null;
|
|
699
|
-
const queryString = url.substring(queryIndex + 1);
|
|
700
|
-
const params = new URLSearchParams(queryString);
|
|
701
|
-
const queryId = params.get('queryId');
|
|
702
|
-
if (!queryId)
|
|
703
|
-
return null;
|
|
704
|
-
return { queryId };
|
|
1146
|
+
return this.parseUrlFromString(this.router.url);
|
|
705
1147
|
}
|
|
706
1148
|
/**
|
|
707
1149
|
* Update URL query string to reflect current state.
|
|
@@ -848,80 +1290,97 @@ let QueryBrowserResourceComponent = class QueryBrowserResourceComponent extends
|
|
|
848
1290
|
return UUIDsEqual(this.selectedQuery?.ID, query.ID);
|
|
849
1291
|
}
|
|
850
1292
|
static ɵfac = function QueryBrowserResourceComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryBrowserResourceComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.NavigationService), i0.ɵɵdirectiveInject(i2.Router), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.NgZone)); };
|
|
851
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryBrowserResourceComponent, selectors: [["mj-query-browser-resource"]],
|
|
1293
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryBrowserResourceComponent, selectors: [["mj-query-browser-resource"]], viewQuery: function QueryBrowserResourceComponent_Query(rf, ctx) { if (rf & 1) {
|
|
1294
|
+
i0.ɵɵviewQuery(_c0, 5);
|
|
1295
|
+
} if (rf & 2) {
|
|
1296
|
+
let _t;
|
|
1297
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.drawerSqlEditor = _t.first);
|
|
1298
|
+
} }, hostBindings: function QueryBrowserResourceComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
1299
|
+
i0.ɵɵlistener("keydown.escape", function QueryBrowserResourceComponent_keydown_escape_HostBindingHandler() { return ctx.OnEscapeKey(); }, i0.ɵɵresolveDocument);
|
|
1300
|
+
} }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 39, vars: 18, consts: [["categoryNode", ""], ["drawerSqlEditor", ""], [1, "query-browser-container"], [1, "query-tree-panel"], [1, "tree-header"], [1, "header-title"], [1, "fa-solid", "fa-database"], [1, "query-count"], [1, "header-actions"], ["title", "New Query", 1, "icon-btn"], ["title", "Expand all", 1, "icon-btn", 3, "click"], [1, "fa-solid", "fa-folder-open"], ["title", "Collapse all", 1, "icon-btn", 3, "click"], [1, "fa-solid", "fa-folder"], ["title", "Refresh", 1, "icon-btn", 3, "click"], [1, "fa-solid", "fa-refresh"], [1, "tree-search"], [1, "search-input-wrapper"], [1, "fa-solid", "fa-search", "search-icon"], ["type", "text", "placeholder", "Search queries...", 1, "search-input", 3, "input", "value"], [1, "clear-btn"], [1, "status-filter-bar"], [1, "tree-content"], [1, "loading-state"], [1, "empty-state"], [1, "category-tree"], [1, "resize-handle", 3, "mousedown"], [1, "resize-handle-grip"], [1, "query-viewer-panel"], [1, "no-selection"], [1, "query-drawer-backdrop"], [1, "query-drawer"], ["title", "New Query", 1, "icon-btn", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "clear-btn", 3, "click"], [1, "fa-solid", "fa-times"], [1, "status-filter-chip", 3, "active", "--chip-color", "title"], [1, "status-filter-chip", 3, "click", "title"], [1, "fa-solid"], [1, "chip-count"], ["text", "Loading queries..."], [1, "fa-solid", "fa-database", "empty-icon"], [1, "fa-solid", "fa-search", "empty-icon"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "fa-solid", "fa-hand-pointer", "no-selection-icon"], [1, "no-selection-message"], [1, "no-selection-hint"], [1, "no-selection-create-btn"], [1, "no-selection-create-btn", 3, "click"], [1, "query-viewer-header"], [1, "query-viewer-title"], [1, "fa-solid", "fa-file-code"], [1, "query-viewer-header-actions"], [1, "query-viewer-status-pill", 3, "background"], [1, "query-viewer-status-pill", "approved", 3, "background"], ["title", "Edit Query", 1, "icon-btn"], [3, "EntityLinkClick", "RowDoubleClick", "OpenQueryRecord", "CompositionTokenClick", "QueryId", "AutoRun", "SelectionMode"], [1, "query-viewer-status-pill"], [1, "query-viewer-status-pill", "approved"], [1, "fa-solid", "fa-check-circle"], ["title", "Edit Query", 1, "icon-btn", 3, "click"], [1, "fa-solid", "fa-pen-to-square"], [1, "category-item", 3, "expanded", "padding-left"], [1, "category-item"], [1, "category-header", 3, "click"], [1, "fa-solid", "expand-icon"], [1, "fa-solid", "fa-folder", "category-icon"], [1, "category-name"], [1, "category-count"], [1, "category-queries"], [1, "query-item", 3, "selected", "hidden"], [1, "query-item", 3, "click"], [1, "status-dot", 3, "title"], [1, "fa-solid", "fa-file-code", "query-icon"], [1, "query-info", 3, "title"], [1, "query-name"], [1, "query-description"], ["title", "Has parameters", 1, "fa-solid", "fa-sliders", "param-icon"], [1, "query-status-badge", 3, "background", "title"], ["title", "Edit query", 1, "query-details-btn"], [1, "query-status-badge", 3, "title"], ["title", "Edit query", 1, "query-details-btn", 3, "click"], [1, "query-drawer-backdrop", 3, "click"], [1, "query-drawer-header"], [1, "query-drawer-title"], [1, "query-drawer-title-main"], [1, "query-drawer-title-sub"], ["title", "Close", 1, "query-drawer-close", 3, "click"], [1, "query-drawer-body"], [1, "drawer-field"], [1, "drawer-label"], [1, "drawer-required"], ["type", "text", "placeholder", "Enter query name", 1, "drawer-input", 3, "ngModelChange", "ngModel", "disabled"], [1, "drawer-field-hint"], [1, "drawer-row"], [1, "drawer-field", "drawer-field-flex"], [1, "drawer-select", 3, "ngModelChange", "ngModel", "disabled"], ["value", ""], [3, "value"], ["rows", "3", "placeholder", "Optional description", 1, "drawer-textarea", 3, "ngModelChange", "ngModel", "disabled"], [1, "drawer-field", "drawer-field-sql"], [1, "drawer-sql-editor", 3, "change", "language", "indentWithTab", "readonly"], [1, "drawer-full-record"], [1, "query-drawer-footer"], [1, "drawer-error"], [1, "drawer-footer-actions"], [1, "drawer-btn", "drawer-btn-primary", 3, "click", "disabled"], [1, "drawer-btn", "drawer-btn-secondary", 3, "click", "disabled"], [1, "fa-solid", "fa-circle-info"], [1, "drawer-link-btn", 3, "click"], [1, "fa-solid", "fa-arrow-up-right-from-square"], [1, "fa-solid", "fa-triangle-exclamation"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-floppy-disk"]], template: function QueryBrowserResourceComponent_Template(rf, ctx) { if (rf & 1) {
|
|
852
1301
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
853
|
-
i0.ɵɵelementStart(0, "div",
|
|
854
|
-
i0.ɵɵelement(4, "i",
|
|
1302
|
+
i0.ɵɵelementStart(0, "div", 2)(1, "div", 3)(2, "div", 4)(3, "div", 5);
|
|
1303
|
+
i0.ɵɵelement(4, "i", 6);
|
|
855
1304
|
i0.ɵɵelementStart(5, "span");
|
|
856
1305
|
i0.ɵɵtext(6, "Queries");
|
|
857
1306
|
i0.ɵɵelementEnd();
|
|
858
|
-
i0.ɵɵelementStart(7, "span",
|
|
1307
|
+
i0.ɵɵelementStart(7, "span", 7);
|
|
859
1308
|
i0.ɵɵtext(8);
|
|
860
1309
|
i0.ɵɵelementEnd()();
|
|
861
|
-
i0.ɵɵelementStart(9, "div",
|
|
862
|
-
i0.ɵɵ
|
|
863
|
-
i0.ɵɵ
|
|
1310
|
+
i0.ɵɵelementStart(9, "div", 8);
|
|
1311
|
+
i0.ɵɵconditionalCreate(10, QueryBrowserResourceComponent_Conditional_10_Template, 2, 0, "button", 9);
|
|
1312
|
+
i0.ɵɵelementStart(11, "button", 10);
|
|
1313
|
+
i0.ɵɵlistener("click", function QueryBrowserResourceComponent_Template_button_click_11_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.expandAll()); });
|
|
1314
|
+
i0.ɵɵelement(12, "i", 11);
|
|
864
1315
|
i0.ɵɵelementEnd();
|
|
865
|
-
i0.ɵɵelementStart(
|
|
866
|
-
i0.ɵɵlistener("click", function
|
|
867
|
-
i0.ɵɵelement(
|
|
1316
|
+
i0.ɵɵelementStart(13, "button", 12);
|
|
1317
|
+
i0.ɵɵlistener("click", function QueryBrowserResourceComponent_Template_button_click_13_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.collapseAll()); });
|
|
1318
|
+
i0.ɵɵelement(14, "i", 13);
|
|
868
1319
|
i0.ɵɵelementEnd();
|
|
869
|
-
i0.ɵɵelementStart(
|
|
870
|
-
i0.ɵɵlistener("click", function
|
|
871
|
-
i0.ɵɵelement(
|
|
1320
|
+
i0.ɵɵelementStart(15, "button", 14);
|
|
1321
|
+
i0.ɵɵlistener("click", function QueryBrowserResourceComponent_Template_button_click_15_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.refresh()); });
|
|
1322
|
+
i0.ɵɵelement(16, "i", 15);
|
|
872
1323
|
i0.ɵɵelementEnd()()();
|
|
873
|
-
i0.ɵɵelementStart(
|
|
874
|
-
i0.ɵɵelement(
|
|
875
|
-
i0.ɵɵelementStart(
|
|
876
|
-
i0.ɵɵlistener("input", function
|
|
1324
|
+
i0.ɵɵelementStart(17, "div", 16)(18, "div", 17);
|
|
1325
|
+
i0.ɵɵelement(19, "i", 18);
|
|
1326
|
+
i0.ɵɵelementStart(20, "input", 19);
|
|
1327
|
+
i0.ɵɵlistener("input", function QueryBrowserResourceComponent_Template_input_input_20_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onSearchChange($event.target.value)); });
|
|
877
1328
|
i0.ɵɵelementEnd();
|
|
878
|
-
i0.ɵɵconditionalCreate(
|
|
1329
|
+
i0.ɵɵconditionalCreate(21, QueryBrowserResourceComponent_Conditional_21_Template, 2, 0, "button", 20);
|
|
879
1330
|
i0.ɵɵelementEnd()();
|
|
880
|
-
i0.ɵɵelementStart(
|
|
881
|
-
i0.ɵɵrepeaterCreate(
|
|
1331
|
+
i0.ɵɵelementStart(22, "div", 21);
|
|
1332
|
+
i0.ɵɵrepeaterCreate(23, QueryBrowserResourceComponent_For_24_Template, 1, 1, null, null, i0.ɵɵrepeaterTrackByIdentity);
|
|
882
1333
|
i0.ɵɵelementEnd();
|
|
883
|
-
i0.ɵɵelementStart(
|
|
884
|
-
i0.ɵɵconditionalCreate(
|
|
885
|
-
i0.ɵɵconditionalCreate(
|
|
886
|
-
i0.ɵɵconditionalCreate(
|
|
887
|
-
i0.ɵɵconditionalCreate(
|
|
1334
|
+
i0.ɵɵelementStart(25, "div", 22);
|
|
1335
|
+
i0.ɵɵconditionalCreate(26, QueryBrowserResourceComponent_Conditional_26_Template, 2, 0, "div", 23);
|
|
1336
|
+
i0.ɵɵconditionalCreate(27, QueryBrowserResourceComponent_Conditional_27_Template, 4, 0, "div", 24);
|
|
1337
|
+
i0.ɵɵconditionalCreate(28, QueryBrowserResourceComponent_Conditional_28_Template, 4, 1, "div", 24);
|
|
1338
|
+
i0.ɵɵconditionalCreate(29, QueryBrowserResourceComponent_Conditional_29_Template, 3, 0, "div", 25);
|
|
888
1339
|
i0.ɵɵelementEnd()();
|
|
889
|
-
i0.ɵɵelementStart(
|
|
890
|
-
i0.ɵɵlistener("mousedown", function
|
|
891
|
-
i0.ɵɵelement(
|
|
1340
|
+
i0.ɵɵelementStart(30, "div", 26);
|
|
1341
|
+
i0.ɵɵlistener("mousedown", function QueryBrowserResourceComponent_Template_div_mousedown_30_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onResizeStart($event)); });
|
|
1342
|
+
i0.ɵɵelement(31, "div", 27);
|
|
892
1343
|
i0.ɵɵelementEnd();
|
|
893
|
-
i0.ɵɵelementStart(
|
|
894
|
-
i0.ɵɵconditionalCreate(
|
|
895
|
-
i0.ɵɵconditionalCreate(
|
|
1344
|
+
i0.ɵɵelementStart(32, "div", 28);
|
|
1345
|
+
i0.ɵɵconditionalCreate(33, QueryBrowserResourceComponent_Conditional_33_Template, 7, 1, "div", 29);
|
|
1346
|
+
i0.ɵɵconditionalCreate(34, QueryBrowserResourceComponent_Conditional_34_Template, 10, 6);
|
|
896
1347
|
i0.ɵɵelementEnd()();
|
|
897
|
-
i0.ɵɵtemplate(
|
|
1348
|
+
i0.ɵɵtemplate(35, QueryBrowserResourceComponent_ng_template_35_Template, 1, 1, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
1349
|
+
i0.ɵɵconditionalCreate(37, QueryBrowserResourceComponent_Conditional_37_Template, 1, 0, "div", 30);
|
|
1350
|
+
i0.ɵɵconditionalCreate(38, QueryBrowserResourceComponent_Conditional_38_Template, 51, 25, "div", 31);
|
|
898
1351
|
} if (rf & 2) {
|
|
899
1352
|
i0.ɵɵclassProp("resizing", ctx.IsResizing);
|
|
900
1353
|
i0.ɵɵadvance();
|
|
901
1354
|
i0.ɵɵstyleProp("width", ctx.PanelWidth, "px");
|
|
902
1355
|
i0.ɵɵadvance(7);
|
|
903
1356
|
i0.ɵɵtextInterpolate1("(", ctx.getTotalQueryCount(), ")");
|
|
904
|
-
i0.ɵɵadvance(
|
|
1357
|
+
i0.ɵɵadvance(2);
|
|
1358
|
+
i0.ɵɵconditional(ctx.CanCreateQuery ? 10 : -1);
|
|
1359
|
+
i0.ɵɵadvance(10);
|
|
905
1360
|
i0.ɵɵproperty("value", ctx.searchText);
|
|
906
1361
|
i0.ɵɵadvance();
|
|
907
|
-
i0.ɵɵconditional(ctx.searchText ?
|
|
1362
|
+
i0.ɵɵconditional(ctx.searchText ? 21 : -1);
|
|
908
1363
|
i0.ɵɵadvance(2);
|
|
909
1364
|
i0.ɵɵrepeater(ctx.AllStatuses);
|
|
910
1365
|
i0.ɵɵadvance(3);
|
|
911
|
-
i0.ɵɵconditional(ctx.isLoading ?
|
|
1366
|
+
i0.ɵɵconditional(ctx.isLoading ? 26 : -1);
|
|
912
1367
|
i0.ɵɵadvance();
|
|
913
|
-
i0.ɵɵconditional(!ctx.isLoading && ctx.queries.length === 0 ?
|
|
1368
|
+
i0.ɵɵconditional(!ctx.isLoading && ctx.queries.length === 0 ? 27 : -1);
|
|
914
1369
|
i0.ɵɵadvance();
|
|
915
|
-
i0.ɵɵconditional(!ctx.isLoading && ctx.searchText && ctx.filteredQueries.length === 0 ?
|
|
1370
|
+
i0.ɵɵconditional(!ctx.isLoading && ctx.searchText && ctx.filteredQueries.length === 0 ? 28 : -1);
|
|
916
1371
|
i0.ɵɵadvance();
|
|
917
|
-
i0.ɵɵconditional(!ctx.isLoading && ctx.queries.length > 0 ?
|
|
1372
|
+
i0.ɵɵconditional(!ctx.isLoading && ctx.queries.length > 0 ? 29 : -1);
|
|
918
1373
|
i0.ɵɵadvance();
|
|
919
1374
|
i0.ɵɵclassProp("active", ctx.IsResizing);
|
|
920
1375
|
i0.ɵɵadvance(3);
|
|
921
|
-
i0.ɵɵconditional(!ctx.selectedQuery ?
|
|
1376
|
+
i0.ɵɵconditional(!ctx.selectedQuery ? 33 : -1);
|
|
1377
|
+
i0.ɵɵadvance();
|
|
1378
|
+
i0.ɵɵconditional(ctx.selectedQuery ? 34 : -1);
|
|
1379
|
+
i0.ɵɵadvance(3);
|
|
1380
|
+
i0.ɵɵconditional(ctx.ShowQueryDrawer ? 37 : -1);
|
|
922
1381
|
i0.ɵɵadvance();
|
|
923
|
-
i0.ɵɵconditional(ctx.
|
|
924
|
-
} }, dependencies: [i3.NgTemplateOutlet, i4.LoadingComponent, i5.QueryViewerComponent], styles: ["\n\n\n[_nghost-%COMP%] {\n display: block;\n height: 100%;\n}\n\n.query-browser-container[_ngcontent-%COMP%] {\n display: flex;\n height: 100%;\n background: #f5f5f5;\n}\n\n\n\n.query-tree-panel[_ngcontent-%COMP%] {\n flex-shrink: 0;\n background: #fff;\n border-right: 1px solid #e0e0e0;\n display: flex;\n flex-direction: column;\n \n\n}\n\n\n\n.tree-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 16px;\n background: linear-gradient(135deg, #5c6bc0 0%, #3949ab 100%);\n color: #fff;\n}\n\n.header-title[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 600;\n}\n\n.header-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 16px;\n}\n\n.query-count[_ngcontent-%COMP%] {\n font-weight: 400;\n opacity: 0.8;\n font-size: 13px;\n}\n\n.header-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 4px;\n}\n\n.icon-btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n background: rgba(255, 255, 255, 0.15);\n color: #fff;\n border-radius: 4px;\n cursor: pointer;\n transition: background 0.15s ease;\n}\n\n.icon-btn[_ngcontent-%COMP%]:hover {\n background: rgba(255, 255, 255, 0.25);\n}\n\n\n\n.tree-search[_ngcontent-%COMP%] {\n padding: 12px;\n border-bottom: 1px solid #e0e0e0;\n}\n\n.search-input-wrapper[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n width: 100%;\n border: 1px solid #ccc;\n border-radius: 4px;\n background: #fff;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n\n.search-input-wrapper[_ngcontent-%COMP%]:focus-within {\n border-color: #5c6bc0;\n box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.15);\n}\n\n.search-icon[_ngcontent-%COMP%] {\n color: #888;\n margin-left: 10px;\n font-size: 14px;\n}\n\n.search-input[_ngcontent-%COMP%] {\n flex: 1;\n border: none;\n outline: none;\n padding: 8px 10px;\n font-size: 14px;\n background: transparent;\n}\n\n.search-input[_ngcontent-%COMP%]::placeholder {\n color: #999;\n}\n\n.clear-btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n background: transparent;\n color: #888;\n cursor: pointer;\n margin-right: 4px;\n border-radius: 4px;\n}\n\n.clear-btn[_ngcontent-%COMP%]:hover {\n color: #333;\n background: #f0f0f0;\n}\n\n\n\n.status-filter-bar[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n padding: 8px 12px;\n border-bottom: 1px solid #e0e0e0;\n background: #fafafa;\n}\n\n.status-filter-chip[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px;\n border: 1px solid #ddd;\n border-radius: 12px;\n background: #fff;\n color: #888;\n font-size: 11px;\n cursor: pointer;\n transition: all 0.15s ease;\n line-height: 1.2;\n}\n\n.status-filter-chip[_ngcontent-%COMP%]:hover {\n border-color: var(--chip-color, #888);\n color: var(--chip-color, #888);\n}\n\n.status-filter-chip.active[_ngcontent-%COMP%] {\n background: var(--chip-color, #888);\n border-color: var(--chip-color, #888);\n color: #fff;\n}\n\n.status-filter-chip[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 10px;\n}\n\n.chip-count[_ngcontent-%COMP%] {\n font-weight: 600;\n font-size: 10px;\n opacity: 0.85;\n}\n\n\n\n.status-dot[_ngcontent-%COMP%] {\n display: inline-block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n flex-shrink: 0;\n margin-top: 4px;\n}\n\n\n\n.query-status-badge[_ngcontent-%COMP%] {\n font-size: 9px;\n color: #fff;\n padding: 1px 6px;\n border-radius: 8px;\n flex-shrink: 0;\n font-weight: 500;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n margin-top: 2px;\n}\n\n\n\n.tree-content[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n padding: 8px 0;\n}\n\n\n\n.loading-state[_ngcontent-%COMP%], \n.empty-state[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px 20px;\n text-align: center;\n}\n\n.empty-icon[_ngcontent-%COMP%] {\n font-size: 36px;\n color: #ccc;\n margin-bottom: 12px;\n}\n\n.empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n color: #666;\n font-size: 14px;\n}\n\n\n\n.category-tree[_ngcontent-%COMP%] {\n padding: 0 4px;\n}\n\n.category-item[_ngcontent-%COMP%] {\n margin-bottom: 2px;\n}\n\n.category-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 8px 12px;\n cursor: pointer;\n border-radius: 4px;\n transition: background 0.15s ease;\n}\n\n.category-header[_ngcontent-%COMP%]:hover {\n background: #f0f0f0;\n}\n\n.expand-icon[_ngcontent-%COMP%] {\n font-size: 10px;\n color: #888;\n width: 12px;\n text-align: center;\n}\n\n.category-icon[_ngcontent-%COMP%] {\n color: #f9a825;\n font-size: 14px;\n}\n\n.category-name[_ngcontent-%COMP%] {\n flex: 1;\n font-weight: 500;\n color: #333;\n font-size: 13px;\n}\n\n.category-count[_ngcontent-%COMP%] {\n color: #888;\n font-size: 12px;\n}\n\n\n\n.category-queries[_ngcontent-%COMP%] {\n margin-left: 28px;\n}\n\n.query-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 8px 12px;\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.15s ease;\n margin: 2px 0;\n}\n\n.query-item[_ngcontent-%COMP%]:hover {\n background: #f0f7ff;\n}\n\n.query-item.selected[_ngcontent-%COMP%] {\n background: #e3f2fd;\n border-left: 3px solid #2196f3;\n margin-left: -3px;\n}\n\n.query-item.hidden[_ngcontent-%COMP%] {\n display: none;\n}\n\n.query-icon[_ngcontent-%COMP%] {\n color: #5c6bc0;\n font-size: 14px;\n margin-top: 2px;\n}\n\n.query-info[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.query-name[_ngcontent-%COMP%] {\n font-size: 13px;\n color: #333;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.query-description[_ngcontent-%COMP%] {\n font-size: 11px;\n color: #888;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.param-icon[_ngcontent-%COMP%] {\n color: #f9a825;\n font-size: 12px;\n margin-top: 2px;\n}\n\n.query-details-btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n background: transparent;\n color: #999;\n cursor: pointer;\n border-radius: 4px;\n opacity: 0;\n transition: all 0.15s ease;\n flex-shrink: 0;\n}\n\n.query-item[_ngcontent-%COMP%]:hover .query-details-btn[_ngcontent-%COMP%] {\n opacity: 1;\n}\n\n.query-details-btn[_ngcontent-%COMP%]:hover {\n background: rgba(92, 107, 192, 0.15);\n color: #5c6bc0;\n}\n\n\n\n.resize-handle[_ngcontent-%COMP%] {\n flex-shrink: 0;\n width: 6px;\n cursor: col-resize;\n background: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background 0.15s ease;\n position: relative;\n z-index: 10;\n}\n\n.resize-handle[_ngcontent-%COMP%]:hover, \n.resize-handle.active[_ngcontent-%COMP%] {\n background: rgba(92, 107, 192, 0.15);\n}\n\n.resize-handle-grip[_ngcontent-%COMP%] {\n width: 2px;\n height: 32px;\n border-radius: 1px;\n background: #ccc;\n transition: background 0.15s ease;\n}\n\n.resize-handle[_ngcontent-%COMP%]:hover .resize-handle-grip[_ngcontent-%COMP%], \n.resize-handle.active[_ngcontent-%COMP%] .resize-handle-grip[_ngcontent-%COMP%] {\n background: #5c6bc0;\n}\n\n\n\n.query-browser-container.resizing[_ngcontent-%COMP%] {\n cursor: col-resize;\n user-select: none;\n}\n\n.query-browser-container.resizing[_ngcontent-%COMP%] *[_ngcontent-%COMP%] {\n pointer-events: none;\n}\n\n.query-browser-container.resizing[_ngcontent-%COMP%] .resize-handle[_ngcontent-%COMP%] {\n pointer-events: auto;\n}\n\n\n\n.query-viewer-panel[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n}\n\n\n\n.no-selection[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 40px;\n}\n\n.no-selection-icon[_ngcontent-%COMP%] {\n font-size: 64px;\n color: #ddd;\n margin-bottom: 20px;\n}\n\n.no-selection-message[_ngcontent-%COMP%] {\n font-size: 18px;\n color: #666;\n margin: 0 0 8px 0;\n}\n\n.no-selection-hint[_ngcontent-%COMP%] {\n font-size: 14px;\n color: #999;\n margin: 0;\n}\n\n\n\n.query-viewer-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 16px;\n background: #fff;\n border-bottom: 1px solid #e0e0e0;\n flex-shrink: 0;\n}\n\n.query-viewer-title[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 15px;\n font-weight: 600;\n color: #333;\n min-width: 0;\n overflow: hidden;\n}\n\n.query-viewer-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #5c6bc0;\n font-size: 16px;\n flex-shrink: 0;\n}\n\n.query-viewer-title[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.query-viewer-status-pill[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 4px 12px;\n border-radius: 14px;\n color: #fff;\n font-size: 13px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n flex-shrink: 0;\n}\n\n.query-viewer-status-pill[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 12px;\n}\n\n.query-viewer-status-pill.approved[_ngcontent-%COMP%] {\n opacity: 0.7;\n}\n\n\n\nmj-query-viewer[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 0;\n}\n\n\n\n.tree-content[_ngcontent-%COMP%]::-webkit-scrollbar {\n width: 6px;\n}\n\n.tree-content[_ngcontent-%COMP%]::-webkit-scrollbar-track {\n background: #f1f1f1;\n}\n\n.tree-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\n background: #ccc;\n border-radius: 3px;\n}\n\n.tree-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\n background: #aaa;\n}\n\n\n\n@media (max-width: 768px) {\n .query-browser-container[_ngcontent-%COMP%] {\n flex-direction: column;\n }\n\n .query-tree-panel[_ngcontent-%COMP%] {\n width: 100% !important;\n height: 40%;\n border-right: none;\n border-bottom: 1px solid #e0e0e0;\n }\n\n .resize-handle[_ngcontent-%COMP%] {\n display: none;\n }\n\n .query-viewer-panel[_ngcontent-%COMP%] {\n height: 60%;\n }\n}"], changeDetection: 0 });
|
|
1382
|
+
i0.ɵɵconditional(ctx.ShowQueryDrawer ? 38 : -1);
|
|
1383
|
+
} }, dependencies: [i3.NgTemplateOutlet, i4.NgSelectOption, i4.ɵNgSelectMultipleOption, i4.DefaultValueAccessor, i4.SelectControlValueAccessor, i4.NgControlStatus, i4.NgModel, i5.CodeEditorComponent, i6.LoadingComponent, i7.QueryViewerComponent], styles: ["\n\n\n[_nghost-%COMP%] {\n display: block;\n height: 100%;\n}\n\n.query-browser-container[_ngcontent-%COMP%] {\n display: flex;\n height: 100%;\n background: #f5f5f5;\n}\n\n\n\n.query-tree-panel[_ngcontent-%COMP%] {\n flex-shrink: 0;\n background: #fff;\n border-right: 1px solid #e0e0e0;\n display: flex;\n flex-direction: column;\n \n\n}\n\n\n\n.tree-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 16px;\n background: linear-gradient(135deg, #5c6bc0 0%, #3949ab 100%);\n color: #fff;\n}\n\n.header-title[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 600;\n}\n\n.header-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 16px;\n}\n\n.query-count[_ngcontent-%COMP%] {\n font-weight: 400;\n opacity: 0.8;\n font-size: 13px;\n}\n\n.header-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 4px;\n}\n\n.icon-btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n background: rgba(255, 255, 255, 0.15);\n color: #fff;\n border-radius: 4px;\n cursor: pointer;\n transition: background 0.15s ease;\n}\n\n.icon-btn[_ngcontent-%COMP%]:hover {\n background: rgba(255, 255, 255, 0.25);\n}\n\n\n\n.tree-search[_ngcontent-%COMP%] {\n padding: 12px;\n border-bottom: 1px solid #e0e0e0;\n}\n\n.search-input-wrapper[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n width: 100%;\n border: 1px solid #ccc;\n border-radius: 4px;\n background: #fff;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n\n.search-input-wrapper[_ngcontent-%COMP%]:focus-within {\n border-color: #5c6bc0;\n box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.15);\n}\n\n.search-icon[_ngcontent-%COMP%] {\n color: #888;\n margin-left: 10px;\n font-size: 14px;\n}\n\n.search-input[_ngcontent-%COMP%] {\n flex: 1;\n border: none;\n outline: none;\n padding: 8px 10px;\n font-size: 14px;\n background: transparent;\n}\n\n.search-input[_ngcontent-%COMP%]::placeholder {\n color: #999;\n}\n\n.clear-btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n background: transparent;\n color: #888;\n cursor: pointer;\n margin-right: 4px;\n border-radius: 4px;\n}\n\n.clear-btn[_ngcontent-%COMP%]:hover {\n color: #333;\n background: #f0f0f0;\n}\n\n\n\n.status-filter-bar[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n padding: 8px 12px;\n border-bottom: 1px solid #e0e0e0;\n background: #fafafa;\n}\n\n.status-filter-chip[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px;\n border: 1px solid #ddd;\n border-radius: 12px;\n background: #fff;\n color: #888;\n font-size: 11px;\n cursor: pointer;\n transition: all 0.15s ease;\n line-height: 1.2;\n}\n\n.status-filter-chip[_ngcontent-%COMP%]:hover {\n border-color: var(--chip-color, #888);\n color: var(--chip-color, #888);\n}\n\n.status-filter-chip.active[_ngcontent-%COMP%] {\n background: var(--chip-color, #888);\n border-color: var(--chip-color, #888);\n color: #fff;\n}\n\n.status-filter-chip[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 10px;\n}\n\n.chip-count[_ngcontent-%COMP%] {\n font-weight: 600;\n font-size: 10px;\n opacity: 0.85;\n}\n\n\n\n.status-dot[_ngcontent-%COMP%] {\n display: inline-block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n flex-shrink: 0;\n margin-top: 4px;\n}\n\n\n\n.query-status-badge[_ngcontent-%COMP%] {\n font-size: 9px;\n color: #fff;\n padding: 1px 6px;\n border-radius: 8px;\n flex-shrink: 0;\n font-weight: 500;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n margin-top: 2px;\n}\n\n\n\n.tree-content[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n padding: 8px 0;\n}\n\n\n\n.loading-state[_ngcontent-%COMP%], \n.empty-state[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px 20px;\n text-align: center;\n}\n\n.empty-icon[_ngcontent-%COMP%] {\n font-size: 36px;\n color: #ccc;\n margin-bottom: 12px;\n}\n\n.empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n color: #666;\n font-size: 14px;\n}\n\n\n\n.category-tree[_ngcontent-%COMP%] {\n padding: 0 4px;\n}\n\n.category-item[_ngcontent-%COMP%] {\n margin-bottom: 2px;\n}\n\n.category-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 8px 12px;\n cursor: pointer;\n border-radius: 4px;\n transition: background 0.15s ease;\n}\n\n.category-header[_ngcontent-%COMP%]:hover {\n background: #f0f0f0;\n}\n\n.expand-icon[_ngcontent-%COMP%] {\n font-size: 10px;\n color: #888;\n width: 12px;\n text-align: center;\n}\n\n.category-icon[_ngcontent-%COMP%] {\n color: #f9a825;\n font-size: 14px;\n}\n\n.category-name[_ngcontent-%COMP%] {\n flex: 1;\n font-weight: 500;\n color: #333;\n font-size: 13px;\n}\n\n.category-count[_ngcontent-%COMP%] {\n color: #888;\n font-size: 12px;\n}\n\n\n\n.category-queries[_ngcontent-%COMP%] {\n margin-left: 28px;\n}\n\n.query-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 8px 12px;\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.15s ease;\n margin: 2px 0;\n}\n\n.query-item[_ngcontent-%COMP%]:hover {\n background: #f0f7ff;\n}\n\n.query-item.selected[_ngcontent-%COMP%] {\n background: #e3f2fd;\n border-left: 3px solid #2196f3;\n margin-left: -3px;\n}\n\n.query-item.hidden[_ngcontent-%COMP%] {\n display: none;\n}\n\n.query-icon[_ngcontent-%COMP%] {\n color: #5c6bc0;\n font-size: 14px;\n margin-top: 2px;\n}\n\n.query-info[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.query-name[_ngcontent-%COMP%] {\n font-size: 13px;\n color: #333;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.query-description[_ngcontent-%COMP%] {\n font-size: 11px;\n color: #888;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.param-icon[_ngcontent-%COMP%] {\n color: #f9a825;\n font-size: 12px;\n margin-top: 2px;\n}\n\n.query-details-btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n background: transparent;\n color: #999;\n cursor: pointer;\n border-radius: 4px;\n opacity: 0;\n transition: all 0.15s ease;\n flex-shrink: 0;\n}\n\n.query-item[_ngcontent-%COMP%]:hover .query-details-btn[_ngcontent-%COMP%] {\n opacity: 1;\n}\n\n.query-details-btn[_ngcontent-%COMP%]:hover {\n background: rgba(92, 107, 192, 0.15);\n color: #5c6bc0;\n}\n\n\n\n.resize-handle[_ngcontent-%COMP%] {\n flex-shrink: 0;\n width: 6px;\n cursor: col-resize;\n background: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background 0.15s ease;\n position: relative;\n z-index: 10;\n}\n\n.resize-handle[_ngcontent-%COMP%]:hover, \n.resize-handle.active[_ngcontent-%COMP%] {\n background: rgba(92, 107, 192, 0.15);\n}\n\n.resize-handle-grip[_ngcontent-%COMP%] {\n width: 2px;\n height: 32px;\n border-radius: 1px;\n background: #ccc;\n transition: background 0.15s ease;\n}\n\n.resize-handle[_ngcontent-%COMP%]:hover .resize-handle-grip[_ngcontent-%COMP%], \n.resize-handle.active[_ngcontent-%COMP%] .resize-handle-grip[_ngcontent-%COMP%] {\n background: #5c6bc0;\n}\n\n\n\n.query-browser-container.resizing[_ngcontent-%COMP%] {\n cursor: col-resize;\n user-select: none;\n}\n\n.query-browser-container.resizing[_ngcontent-%COMP%] *[_ngcontent-%COMP%] {\n pointer-events: none;\n}\n\n.query-browser-container.resizing[_ngcontent-%COMP%] .resize-handle[_ngcontent-%COMP%] {\n pointer-events: auto;\n}\n\n\n\n.query-viewer-panel[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n}\n\n\n\n.no-selection[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 40px;\n}\n\n.no-selection-icon[_ngcontent-%COMP%] {\n font-size: 64px;\n color: #ddd;\n margin-bottom: 20px;\n}\n\n.no-selection-message[_ngcontent-%COMP%] {\n font-size: 18px;\n color: #666;\n margin: 0 0 8px 0;\n}\n\n.no-selection-hint[_ngcontent-%COMP%] {\n font-size: 14px;\n color: #999;\n margin: 0;\n}\n\n\n\n.query-viewer-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 16px;\n background: #fff;\n border-bottom: 1px solid #e0e0e0;\n flex-shrink: 0;\n}\n\n.query-viewer-title[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 15px;\n font-weight: 600;\n color: #333;\n min-width: 0;\n overflow: hidden;\n}\n\n.query-viewer-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #5c6bc0;\n font-size: 16px;\n flex-shrink: 0;\n}\n\n.query-viewer-title[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.query-viewer-status-pill[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 4px 12px;\n border-radius: 14px;\n color: #fff;\n font-size: 13px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n flex-shrink: 0;\n}\n\n.query-viewer-status-pill[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 12px;\n}\n\n.query-viewer-status-pill.approved[_ngcontent-%COMP%] {\n opacity: 0.7;\n}\n\n.query-viewer-header-actions[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-shrink: 0;\n}\n\n\n\nmj-query-viewer[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 0;\n}\n\n\n\n.tree-content[_ngcontent-%COMP%]::-webkit-scrollbar {\n width: 6px;\n}\n\n.tree-content[_ngcontent-%COMP%]::-webkit-scrollbar-track {\n background: #f1f1f1;\n}\n\n.tree-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\n background: #ccc;\n border-radius: 3px;\n}\n\n.tree-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\n background: #aaa;\n}\n\n\n\n@media (max-width: 768px) {\n .query-browser-container[_ngcontent-%COMP%] {\n flex-direction: column;\n }\n\n .query-tree-panel[_ngcontent-%COMP%] {\n width: 100% !important;\n height: 40%;\n border-right: none;\n border-bottom: 1px solid #e0e0e0;\n }\n\n .resize-handle[_ngcontent-%COMP%] {\n display: none;\n }\n\n .query-viewer-panel[_ngcontent-%COMP%] {\n height: 60%;\n }\n}\n\n\n\n.query-viewer-header[_ngcontent-%COMP%] .icon-btn[_ngcontent-%COMP%] {\n background: transparent;\n color: #555;\n}\n\n.query-viewer-header[_ngcontent-%COMP%] .icon-btn[_ngcontent-%COMP%]:hover {\n background: #f0f0f0;\n color: #333;\n}\n\n\n\n.no-selection-create-btn[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n margin-top: 16px;\n padding: 8px 20px;\n background: #5c6bc0;\n color: #fff;\n border: none;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s ease;\n}\n\n.no-selection-create-btn[_ngcontent-%COMP%]:hover {\n background: #3949ab;\n}\n\n\n\n.query-drawer-backdrop[_ngcontent-%COMP%] {\n position: fixed;\n inset: 0;\n background: rgba(0, 0, 0, 0.35);\n z-index: 1100;\n animation: _ngcontent-%COMP%_backdropFadeIn 0.22s ease-out;\n}\n\n@keyframes _ngcontent-%COMP%_backdropFadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n\n\n.query-drawer[_ngcontent-%COMP%] {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n width: 480px;\n max-width: 96vw;\n background: #fff;\n box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);\n z-index: 1101;\n display: flex;\n flex-direction: column;\n animation: _ngcontent-%COMP%_drawerSlideIn 0.22s ease-out;\n}\n\n@keyframes _ngcontent-%COMP%_drawerSlideIn {\n from { transform: translateX(100%); }\n to { transform: translateX(0); }\n}\n\n\n\n.query-drawer-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n background: linear-gradient(135deg, #5c6bc0 0%, #3949ab 100%);\n color: #fff;\n flex-shrink: 0;\n}\n\n.query-drawer-title[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n min-width: 0;\n}\n\n.query-drawer-title[_ngcontent-%COMP%] > i[_ngcontent-%COMP%] {\n font-size: 18px;\n opacity: 0.9;\n flex-shrink: 0;\n}\n\n.query-drawer-title-main[_ngcontent-%COMP%] {\n font-size: 16px;\n font-weight: 600;\n line-height: 1.2;\n}\n\n.query-drawer-title-sub[_ngcontent-%COMP%] {\n font-size: 12px;\n opacity: 0.75;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 360px;\n margin-top: 2px;\n}\n\n.query-drawer-close[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n border: none;\n background: rgba(255, 255, 255, 0.15);\n color: #fff;\n border-radius: 6px;\n cursor: pointer;\n font-size: 16px;\n flex-shrink: 0;\n transition: background 0.15s ease;\n}\n\n.query-drawer-close[_ngcontent-%COMP%]:hover {\n background: rgba(255, 255, 255, 0.28);\n}\n\n\n\n.query-drawer-body[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n padding: 20px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.query-drawer-body[_ngcontent-%COMP%]::-webkit-scrollbar { width: 6px; }\n.query-drawer-body[_ngcontent-%COMP%]::-webkit-scrollbar-track { background: #f1f1f1; }\n.query-drawer-body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }\n.query-drawer-body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover { background: #aaa; }\n\n\n\n.drawer-field[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.drawer-row[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n}\n\n.drawer-field-flex[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.drawer-field-sql[_ngcontent-%COMP%] {\n flex: 1;\n}\n\n.drawer-label[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 500;\n color: #555;\n}\n\n.drawer-required[_ngcontent-%COMP%] {\n color: #e53e3e;\n margin-left: 2px;\n}\n\n.drawer-input[_ngcontent-%COMP%], \n.drawer-select[_ngcontent-%COMP%], \n.drawer-textarea[_ngcontent-%COMP%] {\n width: 100%;\n padding: 8px 12px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n font-size: 14px;\n color: #333;\n background: #fff;\n box-sizing: border-box;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n outline: none;\n font-family: inherit;\n}\n\n.drawer-input[_ngcontent-%COMP%]:focus, \n.drawer-select[_ngcontent-%COMP%]:focus, \n.drawer-textarea[_ngcontent-%COMP%]:focus {\n border-color: #5c6bc0;\n box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.15);\n}\n\n.drawer-input[_ngcontent-%COMP%]:disabled, \n.drawer-select[_ngcontent-%COMP%]:disabled, \n.drawer-textarea[_ngcontent-%COMP%]:disabled {\n background: #f9f9f9;\n color: #999;\n cursor: not-allowed;\n}\n\n.drawer-textarea[_ngcontent-%COMP%] {\n resize: vertical;\n min-height: 70px;\n}\n\n.drawer-sql-editor[_ngcontent-%COMP%] {\n display: block;\n min-height: 220px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n overflow: hidden;\n}\n\n.drawer-field-error[_ngcontent-%COMP%] .drawer-input[_ngcontent-%COMP%], \n.drawer-field-error[_ngcontent-%COMP%] .drawer-select[_ngcontent-%COMP%] {\n border-color: #e53e3e;\n box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.12);\n}\n\n.drawer-field-hint[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #e53e3e;\n}\n\n\n\n.drawer-full-record[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 10px 14px;\n background: #f0f4ff;\n border: 1px solid #c7d2fe;\n border-radius: 6px;\n font-size: 13px;\n color: #4338ca;\n flex-wrap: wrap;\n}\n\n.drawer-full-record[_ngcontent-%COMP%] > i[_ngcontent-%COMP%] {\n flex-shrink: 0;\n color: #6366f1;\n}\n\n.drawer-link-btn[_ngcontent-%COMP%] {\n background: none;\n border: none;\n color: #4338ca;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n padding: 0;\n text-decoration: underline;\n text-underline-offset: 2px;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.drawer-link-btn[_ngcontent-%COMP%]:hover {\n color: #3730a3;\n}\n\n\n\n.query-drawer-footer[_ngcontent-%COMP%] {\n flex-shrink: 0;\n padding: 16px 20px;\n border-top: 1px solid #e5e7eb;\n background: #fafafa;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.drawer-error[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n background: #fff5f5;\n border: 1px solid #fed7d7;\n border-radius: 6px;\n font-size: 13px;\n color: #c53030;\n}\n\n.drawer-footer-actions[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n\n\n.drawer-btn[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 8px 18px;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n border: 1px solid transparent;\n transition: all 0.15s ease;\n white-space: nowrap;\n}\n\n.drawer-btn[_ngcontent-%COMP%]:disabled {\n opacity: 0.55;\n cursor: not-allowed;\n}\n\n.drawer-btn-primary[_ngcontent-%COMP%] {\n background: #5c6bc0;\n color: #fff;\n border-color: #5c6bc0;\n}\n\n.drawer-btn-primary[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: #3949ab;\n border-color: #3949ab;\n}\n\n.drawer-btn-secondary[_ngcontent-%COMP%] {\n background: #fff;\n color: #555;\n border-color: #d1d5db;\n}\n\n.drawer-btn-secondary[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: #f5f5f5;\n color: #333;\n}\n\n\n\n@media (max-width: 600px) {\n .query-drawer[_ngcontent-%COMP%] {\n width: 100vw;\n max-width: 100vw;\n }\n\n .drawer-row[_ngcontent-%COMP%] {\n flex-direction: column;\n }\n}"], changeDetection: 0 });
|
|
925
1384
|
};
|
|
926
1385
|
QueryBrowserResourceComponent = QueryBrowserResourceComponent_1 = __decorate([
|
|
927
1386
|
RegisterClass(BaseResourceComponent, 'QueryBrowserResource')
|
|
@@ -929,7 +1388,13 @@ QueryBrowserResourceComponent = QueryBrowserResourceComponent_1 = __decorate([
|
|
|
929
1388
|
export { QueryBrowserResourceComponent };
|
|
930
1389
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryBrowserResourceComponent, [{
|
|
931
1390
|
type: Component,
|
|
932
|
-
args: [{ standalone: false, selector: 'mj-query-browser-resource', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- Query Browser Resource -->\n<div class=\"query-browser-container\" [class.resizing]=\"IsResizing\">\n <!-- Left Panel: Query Tree -->\n <div class=\"query-tree-panel\" [style.width.px]=\"PanelWidth\">\n <!-- Header -->\n <div class=\"tree-header\">\n <div class=\"header-title\">\n <i class=\"fa-solid fa-database\"></i>\n <span>Queries</span>\n <span class=\"query-count\">({{ getTotalQueryCount() }})</span>\n </div>\n <div class=\"header-actions\">\n <button class=\"icon-btn\" (click)=\"expandAll()\" title=\"Expand all\">\n <i class=\"fa-solid fa-folder-open\"></i>\n </button>\n <button class=\"icon-btn\" (click)=\"collapseAll()\" title=\"Collapse all\">\n <i class=\"fa-solid fa-folder\"></i>\n </button>\n <button class=\"icon-btn\" (click)=\"refresh()\" title=\"Refresh\">\n <i class=\"fa-solid fa-refresh\"></i>\n </button>\n </div>\n </div>\n\n <!-- Search -->\n <div class=\"tree-search\">\n <div class=\"search-input-wrapper\">\n <i class=\"fa-solid fa-search search-icon\"></i>\n <input type=\"text\"\n class=\"search-input\"\n [value]=\"searchText\"\n placeholder=\"Search queries...\"\n (input)=\"onSearchChange($any($event.target).value)\">\n @if (searchText) {\n <button class=\"clear-btn\" (click)=\"clearSearch()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n }\n </div>\n </div>\n\n <!-- Status Filters -->\n <div class=\"status-filter-bar\">\n @for (status of AllStatuses; track status) {\n @if (getStatusCount(status) > 0) {\n <button class=\"status-filter-chip\"\n [class.active]=\"StatusFilters[status]\"\n [style.--chip-color]=\"getStatusColor(status)\"\n (click)=\"toggleStatusFilter(status)\"\n [title]=\"(StatusFilters[status] ? 'Hide' : 'Show') + ' ' + status + ' queries'\">\n <i class=\"fa-solid\" [class]=\"getStatusIcon(status)\"></i>\n <span>{{ status }}</span>\n <span class=\"chip-count\">{{ getStatusCount(status) }}</span>\n </button>\n }\n }\n </div>\n\n <!-- Tree Content -->\n <div class=\"tree-content\">\n <!-- Loading -->\n @if (isLoading) {\n <div class=\"loading-state\">\n <mj-loading text=\"Loading queries...\"></mj-loading>\n </div>\n }\n\n <!-- Empty -->\n @if (!isLoading && queries.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-database empty-icon\"></i>\n <p>No queries available</p>\n </div>\n }\n\n <!-- No results -->\n @if (!isLoading && searchText && filteredQueries.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-search empty-icon\"></i>\n <p>No queries match \"{{ searchText }}\"</p>\n </div>\n }\n\n <!-- Category Tree -->\n @if (!isLoading && queries.length > 0) {\n <div class=\"category-tree\">\n @for (node of categoryTree; track trackByCategory($index, node)) {\n <ng-container *ngTemplateOutlet=\"categoryNode; context: { node: node }\"></ng-container>\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Resize Handle -->\n <div class=\"resize-handle\"\n [class.active]=\"IsResizing\"\n (mousedown)=\"onResizeStart($event)\">\n <div class=\"resize-handle-grip\"></div>\n </div>\n\n <!-- Right Panel: Query Viewer -->\n <div class=\"query-viewer-panel\">\n <!-- No query selected -->\n @if (!selectedQuery) {\n <div class=\"no-selection\">\n <i class=\"fa-solid fa-hand-pointer no-selection-icon\"></i>\n <p class=\"no-selection-message\">Select a query from the list</p>\n <p class=\"no-selection-hint\">Click on a query to view and run it</p>\n </div>\n }\n\n <!-- Query Viewer -->\n @if (selectedQuery) {\n <!-- Query Header with Status -->\n <div class=\"query-viewer-header\">\n <div class=\"query-viewer-title\">\n <i class=\"fa-solid fa-file-code\"></i>\n <span>{{ selectedQuery.Name }}</span>\n </div>\n @if (selectedQuery.Status !== 'Approved') {\n <span class=\"query-viewer-status-pill\"\n [style.background]=\"getStatusColor(selectedQuery.Status)\">\n <i class=\"fa-solid\" [class]=\"getStatusIcon(selectedQuery.Status)\"></i>\n {{ selectedQuery.Status }}\n </span>\n } @else {\n <span class=\"query-viewer-status-pill approved\"\n [style.background]=\"getStatusColor('Approved')\">\n <i class=\"fa-solid fa-check-circle\"></i>\n Approved\n </span>\n }\n </div>\n <mj-query-viewer\n [QueryId]=\"selectedQuery.ID\"\n [AutoRun]=\"true\"\n [SelectionMode]=\"'multiple'\"\n (EntityLinkClick)=\"onEntityLinkClick($event)\"\n (RowDoubleClick)=\"onRowDoubleClick($event)\"\n (OpenQueryRecord)=\"onOpenQueryRecord($event)\">\n </mj-query-viewer>\n }\n </div>\n</div>\n\n<!-- Category Node Template -->\n<ng-template #categoryNode let-node=\"node\">\n @if (hasVisibleContent(node)) {\n <div class=\"category-item\"\n [class.expanded]=\"node.expanded\"\n [style.padding-left.px]=\"node.level * 16 + 8\">\n <div class=\"category-header\" (click)=\"toggleExpand(node)\">\n <i class=\"fa-solid expand-icon\"\n [class.fa-chevron-down]=\"node.expanded\"\n [class.fa-chevron-right]=\"!node.expanded\"></i>\n <i class=\"fa-solid fa-folder category-icon\"\n [class.fa-folder-open]=\"node.expanded\"></i>\n <span class=\"category-name\">{{ node.category.Name }}</span>\n <span class=\"category-count\">({{ getNodeQueryCount(node) }})</span>\n </div>\n <!-- Queries in this category -->\n @if (node.expanded) {\n <div class=\"category-queries\">\n @for (query of node.queries; track trackByQuery($index, query)) {\n <div class=\"query-item\"\n [class.selected]=\"IsQuerySelected(query)\"\n [class.hidden]=\"!isQueryVisible(query)\"\n (click)=\"selectQuery(query, $event)\">\n <span class=\"status-dot\"\n [style.background]=\"getStatusColor(query.Status)\"\n [title]=\"query.Status\"></span>\n <i class=\"fa-solid fa-file-code query-icon\"></i>\n <div class=\"query-info\" [title]=\"query.Description || query.Name\">\n <span class=\"query-name\">{{ query.Name }}</span>\n @if (query.Description) {\n <span class=\"query-description\">{{ query.Description }}</span>\n }\n </div>\n @if (query.UsesTemplate) {\n <i class=\"fa-solid fa-sliders param-icon\" title=\"Has parameters\"></i>\n }\n @if (query.Status !== 'Approved') {\n <span class=\"query-status-badge\"\n [style.background]=\"getStatusColor(query.Status)\"\n [title]=\"query.Status\">\n {{ query.Status }}\n </span>\n }\n </div>\n }\n </div>\n }\n <!-- Child categories -->\n @if (node.expanded) {\n @for (child of node.children; track trackByCategory($index, child)) {\n <ng-container *ngTemplateOutlet=\"categoryNode; context: { node: child }\"></ng-container>\n }\n }\n </div>\n }\n</ng-template>\n", styles: ["/* Query Browser Resource Styles */\n\n:host {\n display: block;\n height: 100%;\n}\n\n.query-browser-container {\n display: flex;\n height: 100%;\n background: #f5f5f5;\n}\n\n/* Left Panel: Query Tree */\n.query-tree-panel {\n flex-shrink: 0;\n background: #fff;\n border-right: 1px solid #e0e0e0;\n display: flex;\n flex-direction: column;\n /* Width controlled by [style.width.px] binding */\n}\n\n/* Tree Header */\n.tree-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 16px;\n background: linear-gradient(135deg, #5c6bc0 0%, #3949ab 100%);\n color: #fff;\n}\n\n.header-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 600;\n}\n\n.header-title i {\n font-size: 16px;\n}\n\n.query-count {\n font-weight: 400;\n opacity: 0.8;\n font-size: 13px;\n}\n\n.header-actions {\n display: flex;\n gap: 4px;\n}\n\n.icon-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n background: rgba(255, 255, 255, 0.15);\n color: #fff;\n border-radius: 4px;\n cursor: pointer;\n transition: background 0.15s ease;\n}\n\n.icon-btn:hover {\n background: rgba(255, 255, 255, 0.25);\n}\n\n/* Tree Search */\n.tree-search {\n padding: 12px;\n border-bottom: 1px solid #e0e0e0;\n}\n\n.search-input-wrapper {\n display: flex;\n align-items: center;\n width: 100%;\n border: 1px solid #ccc;\n border-radius: 4px;\n background: #fff;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n\n.search-input-wrapper:focus-within {\n border-color: #5c6bc0;\n box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.15);\n}\n\n.search-icon {\n color: #888;\n margin-left: 10px;\n font-size: 14px;\n}\n\n.search-input {\n flex: 1;\n border: none;\n outline: none;\n padding: 8px 10px;\n font-size: 14px;\n background: transparent;\n}\n\n.search-input::placeholder {\n color: #999;\n}\n\n.clear-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n background: transparent;\n color: #888;\n cursor: pointer;\n margin-right: 4px;\n border-radius: 4px;\n}\n\n.clear-btn:hover {\n color: #333;\n background: #f0f0f0;\n}\n\n/* Status Filter Bar */\n.status-filter-bar {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n padding: 8px 12px;\n border-bottom: 1px solid #e0e0e0;\n background: #fafafa;\n}\n\n.status-filter-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px;\n border: 1px solid #ddd;\n border-radius: 12px;\n background: #fff;\n color: #888;\n font-size: 11px;\n cursor: pointer;\n transition: all 0.15s ease;\n line-height: 1.2;\n}\n\n.status-filter-chip:hover {\n border-color: var(--chip-color, #888);\n color: var(--chip-color, #888);\n}\n\n.status-filter-chip.active {\n background: var(--chip-color, #888);\n border-color: var(--chip-color, #888);\n color: #fff;\n}\n\n.status-filter-chip i {\n font-size: 10px;\n}\n\n.chip-count {\n font-weight: 600;\n font-size: 10px;\n opacity: 0.85;\n}\n\n/* Status Dot on Query Items */\n.status-dot {\n display: inline-block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n flex-shrink: 0;\n margin-top: 4px;\n}\n\n/* Status Badge on Non-Approved Queries */\n.query-status-badge {\n font-size: 9px;\n color: #fff;\n padding: 1px 6px;\n border-radius: 8px;\n flex-shrink: 0;\n font-weight: 500;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n margin-top: 2px;\n}\n\n/* Tree Content */\n.tree-content {\n flex: 1;\n overflow-y: auto;\n padding: 8px 0;\n}\n\n/* Loading & Empty States */\n.loading-state,\n.empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px 20px;\n text-align: center;\n}\n\n.empty-icon {\n font-size: 36px;\n color: #ccc;\n margin-bottom: 12px;\n}\n\n.empty-state p {\n margin: 0;\n color: #666;\n font-size: 14px;\n}\n\n/* Category Tree */\n.category-tree {\n padding: 0 4px;\n}\n\n.category-item {\n margin-bottom: 2px;\n}\n\n.category-header {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 8px 12px;\n cursor: pointer;\n border-radius: 4px;\n transition: background 0.15s ease;\n}\n\n.category-header:hover {\n background: #f0f0f0;\n}\n\n.expand-icon {\n font-size: 10px;\n color: #888;\n width: 12px;\n text-align: center;\n}\n\n.category-icon {\n color: #f9a825;\n font-size: 14px;\n}\n\n.category-name {\n flex: 1;\n font-weight: 500;\n color: #333;\n font-size: 13px;\n}\n\n.category-count {\n color: #888;\n font-size: 12px;\n}\n\n/* Query Items */\n.category-queries {\n margin-left: 28px;\n}\n\n.query-item {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 8px 12px;\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.15s ease;\n margin: 2px 0;\n}\n\n.query-item:hover {\n background: #f0f7ff;\n}\n\n.query-item.selected {\n background: #e3f2fd;\n border-left: 3px solid #2196f3;\n margin-left: -3px;\n}\n\n.query-item.hidden {\n display: none;\n}\n\n.query-icon {\n color: #5c6bc0;\n font-size: 14px;\n margin-top: 2px;\n}\n\n.query-info {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.query-name {\n font-size: 13px;\n color: #333;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.query-description {\n font-size: 11px;\n color: #888;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.param-icon {\n color: #f9a825;\n font-size: 12px;\n margin-top: 2px;\n}\n\n.query-details-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n background: transparent;\n color: #999;\n cursor: pointer;\n border-radius: 4px;\n opacity: 0;\n transition: all 0.15s ease;\n flex-shrink: 0;\n}\n\n.query-item:hover .query-details-btn {\n opacity: 1;\n}\n\n.query-details-btn:hover {\n background: rgba(92, 107, 192, 0.15);\n color: #5c6bc0;\n}\n\n/* Resize Handle */\n.resize-handle {\n flex-shrink: 0;\n width: 6px;\n cursor: col-resize;\n background: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background 0.15s ease;\n position: relative;\n z-index: 10;\n}\n\n.resize-handle:hover,\n.resize-handle.active {\n background: rgba(92, 107, 192, 0.15);\n}\n\n.resize-handle-grip {\n width: 2px;\n height: 32px;\n border-radius: 1px;\n background: #ccc;\n transition: background 0.15s ease;\n}\n\n.resize-handle:hover .resize-handle-grip,\n.resize-handle.active .resize-handle-grip {\n background: #5c6bc0;\n}\n\n/* Prevent text selection and set cursor during resize */\n.query-browser-container.resizing {\n cursor: col-resize;\n user-select: none;\n}\n\n.query-browser-container.resizing * {\n pointer-events: none;\n}\n\n.query-browser-container.resizing .resize-handle {\n pointer-events: auto;\n}\n\n/* Right Panel: Query Viewer */\n.query-viewer-panel {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n}\n\n/* No Selection State */\n.no-selection {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 40px;\n}\n\n.no-selection-icon {\n font-size: 64px;\n color: #ddd;\n margin-bottom: 20px;\n}\n\n.no-selection-message {\n font-size: 18px;\n color: #666;\n margin: 0 0 8px 0;\n}\n\n.no-selection-hint {\n font-size: 14px;\n color: #999;\n margin: 0;\n}\n\n/* Query Viewer Header */\n.query-viewer-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 16px;\n background: #fff;\n border-bottom: 1px solid #e0e0e0;\n flex-shrink: 0;\n}\n\n.query-viewer-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 15px;\n font-weight: 600;\n color: #333;\n min-width: 0;\n overflow: hidden;\n}\n\n.query-viewer-title i {\n color: #5c6bc0;\n font-size: 16px;\n flex-shrink: 0;\n}\n\n.query-viewer-title span {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.query-viewer-status-pill {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 4px 12px;\n border-radius: 14px;\n color: #fff;\n font-size: 13px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n flex-shrink: 0;\n}\n\n.query-viewer-status-pill i {\n font-size: 12px;\n}\n\n.query-viewer-status-pill.approved {\n opacity: 0.7;\n}\n\n/* Query Viewer fills remaining space */\nmj-query-viewer {\n flex: 1;\n min-height: 0;\n}\n\n/* Scrollbar styling */\n.tree-content::-webkit-scrollbar {\n width: 6px;\n}\n\n.tree-content::-webkit-scrollbar-track {\n background: #f1f1f1;\n}\n\n.tree-content::-webkit-scrollbar-thumb {\n background: #ccc;\n border-radius: 3px;\n}\n\n.tree-content::-webkit-scrollbar-thumb:hover {\n background: #aaa;\n}\n\n/* Responsive */\n@media (max-width: 768px) {\n .query-browser-container {\n flex-direction: column;\n }\n\n .query-tree-panel {\n width: 100% !important;\n height: 40%;\n border-right: none;\n border-bottom: 1px solid #e0e0e0;\n }\n\n .resize-handle {\n display: none;\n }\n\n .query-viewer-panel {\n height: 60%;\n }\n}\n"] }]
|
|
933
|
-
}], () => [{ type: i0.ChangeDetectorRef }, { type: i1.NavigationService }, { type: i2.Router }, { type: i0.ElementRef }, { type: i0.NgZone }],
|
|
934
|
-
|
|
1391
|
+
args: [{ standalone: false, selector: 'mj-query-browser-resource', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- Query Browser Resource -->\n<div class=\"query-browser-container\" [class.resizing]=\"IsResizing\">\n <!-- Left Panel: Query Tree -->\n <div class=\"query-tree-panel\" [style.width.px]=\"PanelWidth\">\n <!-- Header -->\n <div class=\"tree-header\">\n <div class=\"header-title\">\n <i class=\"fa-solid fa-database\"></i>\n <span>Queries</span>\n <span class=\"query-count\">({{ getTotalQueryCount() }})</span>\n </div>\n <div class=\"header-actions\">\n @if (CanCreateQuery) {\n <button class=\"icon-btn\" (click)=\"OpenCreateDrawer()\" title=\"New Query\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n }\n <button class=\"icon-btn\" (click)=\"expandAll()\" title=\"Expand all\">\n <i class=\"fa-solid fa-folder-open\"></i>\n </button>\n <button class=\"icon-btn\" (click)=\"collapseAll()\" title=\"Collapse all\">\n <i class=\"fa-solid fa-folder\"></i>\n </button>\n <button class=\"icon-btn\" (click)=\"refresh()\" title=\"Refresh\">\n <i class=\"fa-solid fa-refresh\"></i>\n </button>\n </div>\n </div>\n\n <!-- Search -->\n <div class=\"tree-search\">\n <div class=\"search-input-wrapper\">\n <i class=\"fa-solid fa-search search-icon\"></i>\n <input type=\"text\"\n class=\"search-input\"\n [value]=\"searchText\"\n placeholder=\"Search queries...\"\n (input)=\"onSearchChange($any($event.target).value)\">\n @if (searchText) {\n <button class=\"clear-btn\" (click)=\"clearSearch()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n }\n </div>\n </div>\n\n <!-- Status Filters -->\n <div class=\"status-filter-bar\">\n @for (status of AllStatuses; track status) {\n @if (getStatusCount(status) > 0) {\n <button class=\"status-filter-chip\"\n [class.active]=\"StatusFilters[status]\"\n [style.--chip-color]=\"getStatusColor(status)\"\n (click)=\"toggleStatusFilter(status)\"\n [title]=\"(StatusFilters[status] ? 'Hide' : 'Show') + ' ' + status + ' queries'\">\n <i class=\"fa-solid\" [class]=\"getStatusIcon(status)\"></i>\n <span>{{ status }}</span>\n <span class=\"chip-count\">{{ getStatusCount(status) }}</span>\n </button>\n }\n }\n </div>\n\n <!-- Tree Content -->\n <div class=\"tree-content\">\n <!-- Loading -->\n @if (isLoading) {\n <div class=\"loading-state\">\n <mj-loading text=\"Loading queries...\"></mj-loading>\n </div>\n }\n\n <!-- Empty -->\n @if (!isLoading && queries.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-database empty-icon\"></i>\n <p>No queries available</p>\n </div>\n }\n\n <!-- No results -->\n @if (!isLoading && searchText && filteredQueries.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-search empty-icon\"></i>\n <p>No queries match \"{{ searchText }}\"</p>\n </div>\n }\n\n <!-- Category Tree -->\n @if (!isLoading && queries.length > 0) {\n <div class=\"category-tree\">\n @for (node of categoryTree; track trackByCategory($index, node)) {\n <ng-container *ngTemplateOutlet=\"categoryNode; context: { node: node }\"></ng-container>\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Resize Handle -->\n <div class=\"resize-handle\"\n [class.active]=\"IsResizing\"\n (mousedown)=\"onResizeStart($event)\">\n <div class=\"resize-handle-grip\"></div>\n </div>\n\n <!-- Right Panel: Query Viewer -->\n <div class=\"query-viewer-panel\">\n <!-- No query selected -->\n @if (!selectedQuery) {\n <div class=\"no-selection\">\n <i class=\"fa-solid fa-hand-pointer no-selection-icon\"></i>\n <p class=\"no-selection-message\">Select a query from the list</p>\n <p class=\"no-selection-hint\">Click on a query to view and run it</p>\n @if (CanCreateQuery) {\n <button class=\"no-selection-create-btn\" (click)=\"OpenCreateDrawer()\">\n <i class=\"fa-solid fa-plus\"></i> New Query\n </button>\n }\n </div>\n }\n\n <!-- Query Viewer -->\n @if (selectedQuery) {\n <!-- Query Header with Status -->\n <div class=\"query-viewer-header\">\n <div class=\"query-viewer-title\">\n <i class=\"fa-solid fa-file-code\"></i>\n <span>{{ selectedQuery.Name }}</span>\n </div>\n <div class=\"query-viewer-header-actions\">\n @if (selectedQuery.Status !== 'Approved') {\n <span class=\"query-viewer-status-pill\"\n [style.background]=\"getStatusColor(selectedQuery.Status)\">\n <i class=\"fa-solid\" [class]=\"getStatusIcon(selectedQuery.Status)\"></i>\n {{ selectedQuery.Status }}\n </span>\n } @else {\n <span class=\"query-viewer-status-pill approved\"\n [style.background]=\"getStatusColor('Approved')\">\n <i class=\"fa-solid fa-check-circle\"></i>\n Approved\n </span>\n }\n @if (CanEditQuery) {\n <button class=\"icon-btn\" (click)=\"OpenEditDrawer(selectedQuery)\" title=\"Edit Query\">\n <i class=\"fa-solid fa-pen-to-square\"></i>\n </button>\n }\n </div>\n </div>\n <mj-query-viewer\n [QueryId]=\"selectedQuery.ID\"\n [AutoRun]=\"true\"\n [SelectionMode]=\"'multiple'\"\n (EntityLinkClick)=\"onEntityLinkClick($event)\"\n (RowDoubleClick)=\"onRowDoubleClick($event)\"\n (OpenQueryRecord)=\"onOpenQueryRecord($event)\"\n (CompositionTokenClick)=\"onCompositionTokenClick($event)\">\n </mj-query-viewer>\n }\n </div>\n</div>\n\n<!-- Category Node Template -->\n<ng-template #categoryNode let-node=\"node\">\n @if (hasVisibleContent(node)) {\n <div class=\"category-item\"\n [class.expanded]=\"node.expanded\"\n [style.padding-left.px]=\"node.level * 16 + 8\">\n <div class=\"category-header\" (click)=\"toggleExpand(node)\">\n <i class=\"fa-solid expand-icon\"\n [class.fa-chevron-down]=\"node.expanded\"\n [class.fa-chevron-right]=\"!node.expanded\"></i>\n <i class=\"fa-solid fa-folder category-icon\"\n [class.fa-folder-open]=\"node.expanded\"></i>\n <span class=\"category-name\">{{ node.category.Name }}</span>\n <span class=\"category-count\">({{ getNodeQueryCount(node) }})</span>\n </div>\n <!-- Queries in this category -->\n @if (node.expanded) {\n <div class=\"category-queries\">\n @for (query of node.queries; track trackByQuery($index, query)) {\n <div class=\"query-item\"\n [class.selected]=\"IsQuerySelected(query)\"\n [class.hidden]=\"!isQueryVisible(query)\"\n (click)=\"selectQuery(query, $event)\">\n <span class=\"status-dot\"\n [style.background]=\"getStatusColor(query.Status)\"\n [title]=\"query.Status\"></span>\n <i class=\"fa-solid fa-file-code query-icon\"></i>\n <div class=\"query-info\" [title]=\"query.Description || query.Name\">\n <span class=\"query-name\">{{ query.Name }}</span>\n @if (query.Description) {\n <span class=\"query-description\">{{ query.Description }}</span>\n }\n </div>\n @if (query.UsesTemplate) {\n <i class=\"fa-solid fa-sliders param-icon\" title=\"Has parameters\"></i>\n }\n @if (query.Status !== 'Approved') {\n <span class=\"query-status-badge\"\n [style.background]=\"getStatusColor(query.Status)\"\n [title]=\"query.Status\">\n {{ query.Status }}\n </span>\n }\n @if (CanEditQuery) {\n <button class=\"query-details-btn\" (click)=\"OpenEditDrawer(query, $event)\" title=\"Edit query\">\n <i class=\"fa-solid fa-pen-to-square\"></i>\n </button>\n }\n </div>\n }\n </div>\n }\n <!-- Child categories -->\n @if (node.expanded) {\n @for (child of node.children; track trackByCategory($index, child)) {\n <ng-container *ngTemplateOutlet=\"categoryNode; context: { node: child }\"></ng-container>\n }\n }\n </div>\n }\n</ng-template>\n\n<!-- Query Drawer Backdrop -->\n@if (ShowQueryDrawer) {\n <div class=\"query-drawer-backdrop\" (click)=\"OnDrawerBackdropClick()\"></div>\n}\n\n<!-- Query Drawer Panel -->\n@if (ShowQueryDrawer) {\n <div class=\"query-drawer\">\n\n <!-- Drawer Header -->\n <div class=\"query-drawer-header\">\n <div class=\"query-drawer-title\">\n <i class=\"fa-solid\" [class.fa-plus]=\"DrawerMode === 'create'\" [class.fa-pen-to-square]=\"DrawerMode === 'edit'\"></i>\n <div>\n <div class=\"query-drawer-title-main\">{{ DrawerMode === 'create' ? 'New Query' : 'Edit Query' }}</div>\n @if (DrawerMode === 'edit' && DrawerName) {\n <div class=\"query-drawer-title-sub\">{{ DrawerName }}</div>\n }\n </div>\n </div>\n <button class=\"query-drawer-close\" (click)=\"CloseDrawer()\" title=\"Close\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n\n <!-- Drawer Body -->\n <div class=\"query-drawer-body\">\n\n <!-- Name -->\n <div class=\"drawer-field\" [class.drawer-field-error]=\"DrawerNameError\">\n <label class=\"drawer-label\">Name <span class=\"drawer-required\">*</span></label>\n <input class=\"drawer-input\"\n type=\"text\"\n [(ngModel)]=\"DrawerName\"\n (ngModelChange)=\"DrawerNameError = false\"\n placeholder=\"Enter query name\"\n [disabled]=\"IsSavingDrawer\">\n @if (DrawerNameError) {\n <span class=\"drawer-field-hint\">Name is required</span>\n }\n </div>\n\n <!-- Category + Status (side by side) -->\n <div class=\"drawer-row\">\n <div class=\"drawer-field drawer-field-flex\">\n <label class=\"drawer-label\">Category</label>\n <select class=\"drawer-select\"\n [(ngModel)]=\"DrawerCategoryID\"\n [disabled]=\"IsSavingDrawer\">\n <option value=\"\">(none)</option>\n @for (cat of categories; track cat.ID) {\n <option [value]=\"cat.ID\">{{ cat.Name }}</option>\n }\n </select>\n </div>\n <div class=\"drawer-field drawer-field-flex\">\n <label class=\"drawer-label\">Status</label>\n <select class=\"drawer-select\"\n [(ngModel)]=\"DrawerStatus\"\n [disabled]=\"IsSavingDrawer\">\n @for (s of DrawerStatuses; track s) {\n <option [value]=\"s\">{{ s }}</option>\n }\n </select>\n </div>\n </div>\n\n <!-- Description -->\n <div class=\"drawer-field\">\n <label class=\"drawer-label\">Description</label>\n <textarea class=\"drawer-textarea\"\n rows=\"3\"\n [(ngModel)]=\"DrawerDescription\"\n placeholder=\"Optional description\"\n [disabled]=\"IsSavingDrawer\"></textarea>\n </div>\n\n <!-- SQL -->\n <div class=\"drawer-field drawer-field-sql\">\n <label class=\"drawer-label\">SQL</label>\n <mj-code-editor #drawerSqlEditor\n [language]=\"'sql'\"\n [indentWithTab]=\"true\"\n [readonly]=\"IsSavingDrawer\"\n (change)=\"OnDrawerSQLChange($event)\"\n class=\"drawer-sql-editor\">\n </mj-code-editor>\n </div>\n\n <!-- Open Full Record link (edit mode only) -->\n @if (DrawerMode === 'edit' && DrawerQueryId) {\n <div class=\"drawer-full-record\">\n <i class=\"fa-solid fa-circle-info\"></i>\n To manage Parameters, Fields, and Permissions \u2014\n <button class=\"drawer-link-btn\" (click)=\"OpenFullRecord()\">\n Open full record <i class=\"fa-solid fa-arrow-up-right-from-square\"></i>\n </button>\n </div>\n }\n\n </div>\n\n <!-- Drawer Footer -->\n <div class=\"query-drawer-footer\">\n\n <!-- Error message -->\n @if (DrawerSaveError) {\n <div class=\"drawer-error\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i> {{ DrawerSaveError }}\n </div>\n }\n\n <!-- Action buttons -->\n <div class=\"drawer-footer-actions\">\n <button class=\"drawer-btn drawer-btn-primary\"\n (click)=\"SaveDrawer()\"\n [disabled]=\"IsSavingDrawer || !DrawerName.trim()\">\n @if (IsSavingDrawer) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Saving...\n } @else {\n <i class=\"fa-solid fa-floppy-disk\"></i> Save\n }\n </button>\n <button class=\"drawer-btn drawer-btn-secondary\"\n (click)=\"CloseDrawer()\"\n [disabled]=\"IsSavingDrawer\">\n Cancel\n </button>\n </div>\n\n </div>\n\n </div>\n}\n", styles: ["/* Query Browser Resource Styles */\n\n:host {\n display: block;\n height: 100%;\n}\n\n.query-browser-container {\n display: flex;\n height: 100%;\n background: #f5f5f5;\n}\n\n/* Left Panel: Query Tree */\n.query-tree-panel {\n flex-shrink: 0;\n background: #fff;\n border-right: 1px solid #e0e0e0;\n display: flex;\n flex-direction: column;\n /* Width controlled by [style.width.px] binding */\n}\n\n/* Tree Header */\n.tree-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 16px;\n background: linear-gradient(135deg, #5c6bc0 0%, #3949ab 100%);\n color: #fff;\n}\n\n.header-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 600;\n}\n\n.header-title i {\n font-size: 16px;\n}\n\n.query-count {\n font-weight: 400;\n opacity: 0.8;\n font-size: 13px;\n}\n\n.header-actions {\n display: flex;\n gap: 4px;\n}\n\n.icon-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n background: rgba(255, 255, 255, 0.15);\n color: #fff;\n border-radius: 4px;\n cursor: pointer;\n transition: background 0.15s ease;\n}\n\n.icon-btn:hover {\n background: rgba(255, 255, 255, 0.25);\n}\n\n/* Tree Search */\n.tree-search {\n padding: 12px;\n border-bottom: 1px solid #e0e0e0;\n}\n\n.search-input-wrapper {\n display: flex;\n align-items: center;\n width: 100%;\n border: 1px solid #ccc;\n border-radius: 4px;\n background: #fff;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n\n.search-input-wrapper:focus-within {\n border-color: #5c6bc0;\n box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.15);\n}\n\n.search-icon {\n color: #888;\n margin-left: 10px;\n font-size: 14px;\n}\n\n.search-input {\n flex: 1;\n border: none;\n outline: none;\n padding: 8px 10px;\n font-size: 14px;\n background: transparent;\n}\n\n.search-input::placeholder {\n color: #999;\n}\n\n.clear-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n background: transparent;\n color: #888;\n cursor: pointer;\n margin-right: 4px;\n border-radius: 4px;\n}\n\n.clear-btn:hover {\n color: #333;\n background: #f0f0f0;\n}\n\n/* Status Filter Bar */\n.status-filter-bar {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n padding: 8px 12px;\n border-bottom: 1px solid #e0e0e0;\n background: #fafafa;\n}\n\n.status-filter-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px;\n border: 1px solid #ddd;\n border-radius: 12px;\n background: #fff;\n color: #888;\n font-size: 11px;\n cursor: pointer;\n transition: all 0.15s ease;\n line-height: 1.2;\n}\n\n.status-filter-chip:hover {\n border-color: var(--chip-color, #888);\n color: var(--chip-color, #888);\n}\n\n.status-filter-chip.active {\n background: var(--chip-color, #888);\n border-color: var(--chip-color, #888);\n color: #fff;\n}\n\n.status-filter-chip i {\n font-size: 10px;\n}\n\n.chip-count {\n font-weight: 600;\n font-size: 10px;\n opacity: 0.85;\n}\n\n/* Status Dot on Query Items */\n.status-dot {\n display: inline-block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n flex-shrink: 0;\n margin-top: 4px;\n}\n\n/* Status Badge on Non-Approved Queries */\n.query-status-badge {\n font-size: 9px;\n color: #fff;\n padding: 1px 6px;\n border-radius: 8px;\n flex-shrink: 0;\n font-weight: 500;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n margin-top: 2px;\n}\n\n/* Tree Content */\n.tree-content {\n flex: 1;\n overflow-y: auto;\n padding: 8px 0;\n}\n\n/* Loading & Empty States */\n.loading-state,\n.empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px 20px;\n text-align: center;\n}\n\n.empty-icon {\n font-size: 36px;\n color: #ccc;\n margin-bottom: 12px;\n}\n\n.empty-state p {\n margin: 0;\n color: #666;\n font-size: 14px;\n}\n\n/* Category Tree */\n.category-tree {\n padding: 0 4px;\n}\n\n.category-item {\n margin-bottom: 2px;\n}\n\n.category-header {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 8px 12px;\n cursor: pointer;\n border-radius: 4px;\n transition: background 0.15s ease;\n}\n\n.category-header:hover {\n background: #f0f0f0;\n}\n\n.expand-icon {\n font-size: 10px;\n color: #888;\n width: 12px;\n text-align: center;\n}\n\n.category-icon {\n color: #f9a825;\n font-size: 14px;\n}\n\n.category-name {\n flex: 1;\n font-weight: 500;\n color: #333;\n font-size: 13px;\n}\n\n.category-count {\n color: #888;\n font-size: 12px;\n}\n\n/* Query Items */\n.category-queries {\n margin-left: 28px;\n}\n\n.query-item {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 8px 12px;\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.15s ease;\n margin: 2px 0;\n}\n\n.query-item:hover {\n background: #f0f7ff;\n}\n\n.query-item.selected {\n background: #e3f2fd;\n border-left: 3px solid #2196f3;\n margin-left: -3px;\n}\n\n.query-item.hidden {\n display: none;\n}\n\n.query-icon {\n color: #5c6bc0;\n font-size: 14px;\n margin-top: 2px;\n}\n\n.query-info {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.query-name {\n font-size: 13px;\n color: #333;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.query-description {\n font-size: 11px;\n color: #888;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.param-icon {\n color: #f9a825;\n font-size: 12px;\n margin-top: 2px;\n}\n\n.query-details-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n background: transparent;\n color: #999;\n cursor: pointer;\n border-radius: 4px;\n opacity: 0;\n transition: all 0.15s ease;\n flex-shrink: 0;\n}\n\n.query-item:hover .query-details-btn {\n opacity: 1;\n}\n\n.query-details-btn:hover {\n background: rgba(92, 107, 192, 0.15);\n color: #5c6bc0;\n}\n\n/* Resize Handle */\n.resize-handle {\n flex-shrink: 0;\n width: 6px;\n cursor: col-resize;\n background: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background 0.15s ease;\n position: relative;\n z-index: 10;\n}\n\n.resize-handle:hover,\n.resize-handle.active {\n background: rgba(92, 107, 192, 0.15);\n}\n\n.resize-handle-grip {\n width: 2px;\n height: 32px;\n border-radius: 1px;\n background: #ccc;\n transition: background 0.15s ease;\n}\n\n.resize-handle:hover .resize-handle-grip,\n.resize-handle.active .resize-handle-grip {\n background: #5c6bc0;\n}\n\n/* Prevent text selection and set cursor during resize */\n.query-browser-container.resizing {\n cursor: col-resize;\n user-select: none;\n}\n\n.query-browser-container.resizing * {\n pointer-events: none;\n}\n\n.query-browser-container.resizing .resize-handle {\n pointer-events: auto;\n}\n\n/* Right Panel: Query Viewer */\n.query-viewer-panel {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n}\n\n/* No Selection State */\n.no-selection {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 40px;\n}\n\n.no-selection-icon {\n font-size: 64px;\n color: #ddd;\n margin-bottom: 20px;\n}\n\n.no-selection-message {\n font-size: 18px;\n color: #666;\n margin: 0 0 8px 0;\n}\n\n.no-selection-hint {\n font-size: 14px;\n color: #999;\n margin: 0;\n}\n\n/* Query Viewer Header */\n.query-viewer-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 16px;\n background: #fff;\n border-bottom: 1px solid #e0e0e0;\n flex-shrink: 0;\n}\n\n.query-viewer-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 15px;\n font-weight: 600;\n color: #333;\n min-width: 0;\n overflow: hidden;\n}\n\n.query-viewer-title i {\n color: #5c6bc0;\n font-size: 16px;\n flex-shrink: 0;\n}\n\n.query-viewer-title span {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.query-viewer-status-pill {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 4px 12px;\n border-radius: 14px;\n color: #fff;\n font-size: 13px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n flex-shrink: 0;\n}\n\n.query-viewer-status-pill i {\n font-size: 12px;\n}\n\n.query-viewer-status-pill.approved {\n opacity: 0.7;\n}\n\n.query-viewer-header-actions {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-shrink: 0;\n}\n\n/* Query Viewer fills remaining space */\nmj-query-viewer {\n flex: 1;\n min-height: 0;\n}\n\n/* Scrollbar styling */\n.tree-content::-webkit-scrollbar {\n width: 6px;\n}\n\n.tree-content::-webkit-scrollbar-track {\n background: #f1f1f1;\n}\n\n.tree-content::-webkit-scrollbar-thumb {\n background: #ccc;\n border-radius: 3px;\n}\n\n.tree-content::-webkit-scrollbar-thumb:hover {\n background: #aaa;\n}\n\n/* Responsive */\n@media (max-width: 768px) {\n .query-browser-container {\n flex-direction: column;\n }\n\n .query-tree-panel {\n width: 100% !important;\n height: 40%;\n border-right: none;\n border-bottom: 1px solid #e0e0e0;\n }\n\n .resize-handle {\n display: none;\n }\n\n .query-viewer-panel {\n height: 60%;\n }\n}\n\n/* \u2500\u2500\u2500 Right-panel icon button override (white background context) \u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.query-viewer-header .icon-btn {\n background: transparent;\n color: #555;\n}\n\n.query-viewer-header .icon-btn:hover {\n background: #f0f0f0;\n color: #333;\n}\n\n/* \u2500\u2500\u2500 No-selection create button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.no-selection-create-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n margin-top: 16px;\n padding: 8px 20px;\n background: #5c6bc0;\n color: #fff;\n border: none;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s ease;\n}\n\n.no-selection-create-btn:hover {\n background: #3949ab;\n}\n\n/* \u2500\u2500\u2500 Drawer Backdrop \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.query-drawer-backdrop {\n position: fixed;\n inset: 0;\n background: rgba(0, 0, 0, 0.35);\n z-index: 1100;\n animation: backdropFadeIn 0.22s ease-out;\n}\n\n@keyframes backdropFadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n/* \u2500\u2500\u2500 Drawer Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.query-drawer {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n width: 480px;\n max-width: 96vw;\n background: #fff;\n box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);\n z-index: 1101;\n display: flex;\n flex-direction: column;\n animation: drawerSlideIn 0.22s ease-out;\n}\n\n@keyframes drawerSlideIn {\n from { transform: translateX(100%); }\n to { transform: translateX(0); }\n}\n\n/* \u2500\u2500\u2500 Drawer Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.query-drawer-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n background: linear-gradient(135deg, #5c6bc0 0%, #3949ab 100%);\n color: #fff;\n flex-shrink: 0;\n}\n\n.query-drawer-title {\n display: flex;\n align-items: center;\n gap: 12px;\n min-width: 0;\n}\n\n.query-drawer-title > i {\n font-size: 18px;\n opacity: 0.9;\n flex-shrink: 0;\n}\n\n.query-drawer-title-main {\n font-size: 16px;\n font-weight: 600;\n line-height: 1.2;\n}\n\n.query-drawer-title-sub {\n font-size: 12px;\n opacity: 0.75;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 360px;\n margin-top: 2px;\n}\n\n.query-drawer-close {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n border: none;\n background: rgba(255, 255, 255, 0.15);\n color: #fff;\n border-radius: 6px;\n cursor: pointer;\n font-size: 16px;\n flex-shrink: 0;\n transition: background 0.15s ease;\n}\n\n.query-drawer-close:hover {\n background: rgba(255, 255, 255, 0.28);\n}\n\n/* \u2500\u2500\u2500 Drawer Body \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.query-drawer-body {\n flex: 1;\n overflow-y: auto;\n padding: 20px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.query-drawer-body::-webkit-scrollbar { width: 6px; }\n.query-drawer-body::-webkit-scrollbar-track { background: #f1f1f1; }\n.query-drawer-body::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }\n.query-drawer-body::-webkit-scrollbar-thumb:hover { background: #aaa; }\n\n/* \u2500\u2500\u2500 Drawer Form Fields \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.drawer-field {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.drawer-row {\n display: flex;\n gap: 12px;\n}\n\n.drawer-field-flex {\n flex: 1;\n min-width: 0;\n}\n\n.drawer-field-sql {\n flex: 1;\n}\n\n.drawer-label {\n font-size: 13px;\n font-weight: 500;\n color: #555;\n}\n\n.drawer-required {\n color: #e53e3e;\n margin-left: 2px;\n}\n\n.drawer-input,\n.drawer-select,\n.drawer-textarea {\n width: 100%;\n padding: 8px 12px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n font-size: 14px;\n color: #333;\n background: #fff;\n box-sizing: border-box;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n outline: none;\n font-family: inherit;\n}\n\n.drawer-input:focus,\n.drawer-select:focus,\n.drawer-textarea:focus {\n border-color: #5c6bc0;\n box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.15);\n}\n\n.drawer-input:disabled,\n.drawer-select:disabled,\n.drawer-textarea:disabled {\n background: #f9f9f9;\n color: #999;\n cursor: not-allowed;\n}\n\n.drawer-textarea {\n resize: vertical;\n min-height: 70px;\n}\n\n.drawer-sql-editor {\n display: block;\n min-height: 220px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n overflow: hidden;\n}\n\n.drawer-field-error .drawer-input,\n.drawer-field-error .drawer-select {\n border-color: #e53e3e;\n box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.12);\n}\n\n.drawer-field-hint {\n font-size: 12px;\n color: #e53e3e;\n}\n\n/* \u2500\u2500\u2500 Open Full Record link \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.drawer-full-record {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 10px 14px;\n background: #f0f4ff;\n border: 1px solid #c7d2fe;\n border-radius: 6px;\n font-size: 13px;\n color: #4338ca;\n flex-wrap: wrap;\n}\n\n.drawer-full-record > i {\n flex-shrink: 0;\n color: #6366f1;\n}\n\n.drawer-link-btn {\n background: none;\n border: none;\n color: #4338ca;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n padding: 0;\n text-decoration: underline;\n text-underline-offset: 2px;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.drawer-link-btn:hover {\n color: #3730a3;\n}\n\n/* \u2500\u2500\u2500 Drawer Footer \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.query-drawer-footer {\n flex-shrink: 0;\n padding: 16px 20px;\n border-top: 1px solid #e5e7eb;\n background: #fafafa;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.drawer-error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n background: #fff5f5;\n border: 1px solid #fed7d7;\n border-radius: 6px;\n font-size: 13px;\n color: #c53030;\n}\n\n.drawer-footer-actions {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n/* \u2500\u2500\u2500 Drawer Buttons \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.drawer-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 8px 18px;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n border: 1px solid transparent;\n transition: all 0.15s ease;\n white-space: nowrap;\n}\n\n.drawer-btn:disabled {\n opacity: 0.55;\n cursor: not-allowed;\n}\n\n.drawer-btn-primary {\n background: #5c6bc0;\n color: #fff;\n border-color: #5c6bc0;\n}\n\n.drawer-btn-primary:hover:not(:disabled) {\n background: #3949ab;\n border-color: #3949ab;\n}\n\n.drawer-btn-secondary {\n background: #fff;\n color: #555;\n border-color: #d1d5db;\n}\n\n.drawer-btn-secondary:hover:not(:disabled) {\n background: #f5f5f5;\n color: #333;\n}\n\n/* \u2500\u2500\u2500 Responsive drawer \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n@media (max-width: 600px) {\n .query-drawer {\n width: 100vw;\n max-width: 100vw;\n }\n\n .drawer-row {\n flex-direction: column;\n }\n}\n"] }]
|
|
1392
|
+
}], () => [{ type: i0.ChangeDetectorRef }, { type: i1.NavigationService }, { type: i2.Router }, { type: i0.ElementRef }, { type: i0.NgZone }], { drawerSqlEditor: [{
|
|
1393
|
+
type: ViewChild,
|
|
1394
|
+
args: ['drawerSqlEditor']
|
|
1395
|
+
}], OnEscapeKey: [{
|
|
1396
|
+
type: HostListener,
|
|
1397
|
+
args: ['document:keydown.escape']
|
|
1398
|
+
}] }); })();
|
|
1399
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryBrowserResourceComponent, { className: "QueryBrowserResourceComponent", filePath: "src/QueryBrowser/query-browser-resource.component.ts", lineNumber: 42 }); })();
|
|
935
1400
|
//# sourceMappingURL=query-browser-resource.component.js.map
|