@memberjunction/ng-dashboards 5.31.0 → 5.33.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/Admin/admin-data-schema.component.d.ts +16 -0
- package/dist/Admin/admin-data-schema.component.d.ts.map +1 -0
- package/dist/Admin/admin-data-schema.component.js +136 -0
- package/dist/Admin/admin-data-schema.component.js.map +1 -0
- package/dist/Admin/admin-dev-tools-resource.component.d.ts +14 -0
- package/dist/Admin/admin-dev-tools-resource.component.d.ts.map +1 -0
- package/dist/Admin/admin-dev-tools-resource.component.js +162 -0
- package/dist/Admin/admin-dev-tools-resource.component.js.map +1 -0
- package/dist/Admin/admin-identity-access.component.d.ts +15 -0
- package/dist/Admin/admin-identity-access.component.d.ts.map +1 -0
- package/dist/Admin/admin-identity-access.component.js +156 -0
- package/dist/Admin/admin-identity-access.component.js.map +1 -0
- package/dist/Admin/admin-monitoring.component.d.ts +15 -0
- package/dist/Admin/admin-monitoring.component.d.ts.map +1 -0
- package/dist/Admin/admin-monitoring.component.js +130 -0
- package/dist/Admin/admin-monitoring.component.js.map +1 -0
- package/dist/Admin/base-admin-container.component.d.ts +80 -0
- package/dist/Admin/base-admin-container.component.d.ts.map +1 -0
- package/dist/Admin/base-admin-container.component.js +198 -0
- package/dist/Admin/base-admin-container.component.js.map +1 -0
- package/dist/Admin/index.d.ts +6 -0
- package/dist/Admin/index.d.ts.map +1 -0
- package/dist/Admin/index.js +6 -0
- package/dist/Admin/index.js.map +1 -0
- package/dist/DevTools/app-state-inspector.component.d.ts +53 -0
- package/dist/DevTools/app-state-inspector.component.d.ts.map +1 -0
- package/dist/DevTools/app-state-inspector.component.js +301 -0
- package/dist/DevTools/app-state-inspector.component.js.map +1 -0
- package/dist/DevTools/class-registry.component.d.ts +64 -0
- package/dist/DevTools/class-registry.component.d.ts.map +1 -0
- package/dist/DevTools/class-registry.component.js +423 -0
- package/dist/DevTools/class-registry.component.js.map +1 -0
- package/dist/DevTools/dev-tools-prefs.d.ts +21 -0
- package/dist/DevTools/dev-tools-prefs.d.ts.map +1 -0
- package/dist/DevTools/dev-tools-prefs.js +48 -0
- package/dist/DevTools/dev-tools-prefs.js.map +1 -0
- package/dist/DevTools/event-monitor.component.d.ts +78 -0
- package/dist/DevTools/event-monitor.component.d.ts.map +1 -0
- package/dist/DevTools/event-monitor.component.js +659 -0
- package/dist/DevTools/event-monitor.component.js.map +1 -0
- package/dist/DevTools/graphql-console.component.d.ts +153 -0
- package/dist/DevTools/graphql-console.component.d.ts.map +1 -0
- package/dist/DevTools/graphql-console.component.js +1463 -0
- package/dist/DevTools/graphql-console.component.js.map +1 -0
- package/dist/DevTools/index.d.ts +8 -0
- package/dist/DevTools/index.d.ts.map +1 -0
- package/dist/DevTools/index.js +8 -0
- package/dist/DevTools/index.js.map +1 -0
- package/dist/DevTools/layout-inspector.component.d.ts +42 -0
- package/dist/DevTools/layout-inspector.component.d.ts.map +1 -0
- package/dist/DevTools/layout-inspector.component.js +208 -0
- package/dist/DevTools/layout-inspector.component.js.map +1 -0
- package/dist/DevTools/lazy-module-status.component.d.ts +65 -0
- package/dist/DevTools/lazy-module-status.component.d.ts.map +1 -0
- package/dist/DevTools/lazy-module-status.component.js +388 -0
- package/dist/DevTools/lazy-module-status.component.js.map +1 -0
- package/dist/DevTools/settings-explorer.component.d.ts +55 -0
- package/dist/DevTools/settings-explorer.component.d.ts.map +1 -0
- package/dist/DevTools/settings-explorer.component.js +394 -0
- package/dist/DevTools/settings-explorer.component.js.map +1 -0
- package/dist/core-dashboards.module.d.ts +45 -34
- package/dist/core-dashboards.module.d.ts.map +1 -1
- package/dist/core-dashboards.module.js +57 -0
- package/dist/core-dashboards.module.js.map +1 -1
- package/dist/public-api.d.ts +2 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +2 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +52 -52
|
@@ -0,0 +1,1463 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { Component, ElementRef, ViewChild, HostListener, inject } from '@angular/core';
|
|
8
|
+
import { BaseResourceComponent } from '@memberjunction/ng-shared';
|
|
9
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
10
|
+
import { getGraphQLTypeNameBase } from '@memberjunction/core';
|
|
11
|
+
import { GraphQLDataProvider, FieldMapper } from '@memberjunction/graphql-dataprovider';
|
|
12
|
+
import { DevToolsPrefs } from './dev-tools-prefs';
|
|
13
|
+
import * as i0 from "@angular/core";
|
|
14
|
+
import * as i1 from "@angular/forms";
|
|
15
|
+
import * as i2 from "@memberjunction/ng-code-editor";
|
|
16
|
+
import * as i3 from "@angular/common";
|
|
17
|
+
const _c0 = ["queryEditor"];
|
|
18
|
+
function GraphQLConsoleComponent_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
19
|
+
i0.ɵɵtext(0, " Connected to ");
|
|
20
|
+
i0.ɵɵelementStart(1, "code", 38);
|
|
21
|
+
i0.ɵɵtext(2);
|
|
22
|
+
i0.ɵɵelementEnd();
|
|
23
|
+
} if (rf & 2) {
|
|
24
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
25
|
+
i0.ɵɵadvance(2);
|
|
26
|
+
i0.ɵɵtextInterpolate(ctx_r0.ApiUrl);
|
|
27
|
+
} }
|
|
28
|
+
function GraphQLConsoleComponent_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
29
|
+
i0.ɵɵtext(0, " Run queries against the connected MJ API ");
|
|
30
|
+
} }
|
|
31
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_11_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
32
|
+
i0.ɵɵelementStart(0, "div", 47);
|
|
33
|
+
i0.ɵɵelement(1, "i", 49);
|
|
34
|
+
i0.ɵɵtext(2, " Run a query to see it here. Star ");
|
|
35
|
+
i0.ɵɵelement(3, "i", 50);
|
|
36
|
+
i0.ɵɵtext(4, " to keep it. ");
|
|
37
|
+
i0.ɵɵelementEnd();
|
|
38
|
+
} }
|
|
39
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_11_Conditional_6_For_2_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
40
|
+
i0.ɵɵelementStart(0, "span");
|
|
41
|
+
i0.ɵɵtext(1, "\u00B7");
|
|
42
|
+
i0.ɵɵelementEnd();
|
|
43
|
+
i0.ɵɵelementStart(2, "span");
|
|
44
|
+
i0.ɵɵtext(3);
|
|
45
|
+
i0.ɵɵelementEnd();
|
|
46
|
+
} if (rf & 2) {
|
|
47
|
+
const h_r5 = i0.ɵɵnextContext().$implicit;
|
|
48
|
+
i0.ɵɵadvance(3);
|
|
49
|
+
i0.ɵɵtextInterpolate1("", h_r5.durationMs, "ms");
|
|
50
|
+
} }
|
|
51
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_11_Conditional_6_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
52
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
53
|
+
i0.ɵɵelementStart(0, "button", 52);
|
|
54
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Conditional_11_Conditional_6_For_2_Template_button_click_0_listener() { const h_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.OnRestoreHistory(h_r5)); });
|
|
55
|
+
i0.ɵɵelementStart(1, "div", 53);
|
|
56
|
+
i0.ɵɵelement(2, "i", 54);
|
|
57
|
+
i0.ɵɵelementStart(3, "span", 55);
|
|
58
|
+
i0.ɵɵtext(4);
|
|
59
|
+
i0.ɵɵelementEnd();
|
|
60
|
+
i0.ɵɵelementStart(5, "button", 56);
|
|
61
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Conditional_11_Conditional_6_For_2_Template_button_click_5_listener($event) { const h_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.OnToggleFavorite(h_r5, $event)); });
|
|
62
|
+
i0.ɵɵelement(6, "i");
|
|
63
|
+
i0.ɵɵelementEnd();
|
|
64
|
+
i0.ɵɵelementStart(7, "button", 57);
|
|
65
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Conditional_11_Conditional_6_For_2_Template_button_click_7_listener($event) { const h_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.OnDeleteHistory(h_r5, $event)); });
|
|
66
|
+
i0.ɵɵelement(8, "i", 58);
|
|
67
|
+
i0.ɵɵelementEnd()();
|
|
68
|
+
i0.ɵɵelementStart(9, "div", 59)(10, "span");
|
|
69
|
+
i0.ɵɵtext(11);
|
|
70
|
+
i0.ɵɵpipe(12, "date");
|
|
71
|
+
i0.ɵɵelementEnd();
|
|
72
|
+
i0.ɵɵconditionalCreate(13, GraphQLConsoleComponent_Conditional_19_Conditional_11_Conditional_6_For_2_Conditional_13_Template, 4, 1);
|
|
73
|
+
i0.ɵɵelementEnd()();
|
|
74
|
+
} if (rf & 2) {
|
|
75
|
+
const h_r5 = ctx.$implicit;
|
|
76
|
+
i0.ɵɵclassProp("gc-history-item--error", h_r5.status === "error")("gc-history-item--fav", h_r5.favorite);
|
|
77
|
+
i0.ɵɵadvance(2);
|
|
78
|
+
i0.ɵɵclassProp("fa-solid", true)("fa-circle-check", h_r5.status === "ok")("fa-circle-xmark", h_r5.status === "error")("gc-status--ok", h_r5.status === "ok")("gc-status--err", h_r5.status === "error");
|
|
79
|
+
i0.ɵɵadvance(2);
|
|
80
|
+
i0.ɵɵtextInterpolate(h_r5.label || "unnamed");
|
|
81
|
+
i0.ɵɵadvance();
|
|
82
|
+
i0.ɵɵproperty("title", h_r5.favorite ? "Unfavorite" : "Favorite");
|
|
83
|
+
i0.ɵɵadvance();
|
|
84
|
+
i0.ɵɵclassMap(h_r5.favorite ? "fa-solid fa-star" : "fa-regular fa-star");
|
|
85
|
+
i0.ɵɵadvance(5);
|
|
86
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(12, 20, h_r5.timestamp, "HH:mm:ss"));
|
|
87
|
+
i0.ɵɵadvance(2);
|
|
88
|
+
i0.ɵɵconditional(h_r5.durationMs != null ? 13 : -1);
|
|
89
|
+
} }
|
|
90
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_11_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
91
|
+
i0.ɵɵelementStart(0, "div", 48);
|
|
92
|
+
i0.ɵɵrepeaterCreate(1, GraphQLConsoleComponent_Conditional_19_Conditional_11_Conditional_6_For_2_Template, 14, 23, "button", 51, i0.ɵɵcomponentInstance().TrackByHistory, true);
|
|
93
|
+
i0.ɵɵelementEnd();
|
|
94
|
+
} if (rf & 2) {
|
|
95
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
96
|
+
i0.ɵɵadvance();
|
|
97
|
+
i0.ɵɵrepeater(ctx_r0.History);
|
|
98
|
+
} }
|
|
99
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
100
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
101
|
+
i0.ɵɵelementStart(0, "div", 45)(1, "span");
|
|
102
|
+
i0.ɵɵtext(2);
|
|
103
|
+
i0.ɵɵelementEnd();
|
|
104
|
+
i0.ɵɵelementStart(3, "button", 46);
|
|
105
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Conditional_11_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.OnClearHistory()); });
|
|
106
|
+
i0.ɵɵelement(4, "i", 19);
|
|
107
|
+
i0.ɵɵelementEnd()();
|
|
108
|
+
i0.ɵɵconditionalCreate(5, GraphQLConsoleComponent_Conditional_19_Conditional_11_Conditional_5_Template, 5, 0, "div", 47)(6, GraphQLConsoleComponent_Conditional_19_Conditional_11_Conditional_6_Template, 3, 0, "div", 48);
|
|
109
|
+
} if (rf & 2) {
|
|
110
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
111
|
+
i0.ɵɵadvance(2);
|
|
112
|
+
i0.ɵɵtextInterpolate2("", ctx_r0.History.length, " ", ctx_r0.History.length === 1 ? "entry" : "entries");
|
|
113
|
+
i0.ɵɵadvance(3);
|
|
114
|
+
i0.ɵɵconditional(ctx_r0.History.length === 0 ? 5 : 6);
|
|
115
|
+
} }
|
|
116
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_12_Conditional_4_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
117
|
+
i0.ɵɵelementStart(0, "option", 72);
|
|
118
|
+
i0.ɵɵtext(1);
|
|
119
|
+
i0.ɵɵelementEnd();
|
|
120
|
+
} if (rf & 2) {
|
|
121
|
+
const s_r8 = ctx.$implicit;
|
|
122
|
+
i0.ɵɵproperty("value", s_r8);
|
|
123
|
+
i0.ɵɵadvance();
|
|
124
|
+
i0.ɵɵtextInterpolate(s_r8);
|
|
125
|
+
} }
|
|
126
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_12_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
127
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
128
|
+
i0.ɵɵelementStart(0, "select", 70);
|
|
129
|
+
i0.ɵɵtwoWayListener("ngModelChange", function GraphQLConsoleComponent_Conditional_19_Conditional_12_Conditional_4_Template_select_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r0.EntitySchemaFilter, $event) || (ctx_r0.EntitySchemaFilter = $event); return i0.ɵɵresetView($event); });
|
|
130
|
+
i0.ɵɵelementStart(1, "option", 71);
|
|
131
|
+
i0.ɵɵtext(2);
|
|
132
|
+
i0.ɵɵelementEnd();
|
|
133
|
+
i0.ɵɵrepeaterCreate(3, GraphQLConsoleComponent_Conditional_19_Conditional_12_Conditional_4_For_4_Template, 2, 2, "option", 72, i0.ɵɵrepeaterTrackByIdentity);
|
|
134
|
+
i0.ɵɵelementEnd();
|
|
135
|
+
} if (rf & 2) {
|
|
136
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
137
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r0.EntitySchemaFilter);
|
|
138
|
+
i0.ɵɵadvance(2);
|
|
139
|
+
i0.ɵɵtextInterpolate1("All schemas (", ctx_r0.KnownSchemas.length, ")");
|
|
140
|
+
i0.ɵɵadvance();
|
|
141
|
+
i0.ɵɵrepeater(ctx_r0.KnownSchemas);
|
|
142
|
+
} }
|
|
143
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_12_For_12_Conditional_11_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
144
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
145
|
+
i0.ɵɵelementStart(0, "button", 90);
|
|
146
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Conditional_12_For_12_Conditional_11_Conditional_7_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r12); const item_r10 = i0.ɵɵnextContext(2).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.OnEntityOp(item_r10, "create", $event)); });
|
|
147
|
+
i0.ɵɵelement(1, "i", 91);
|
|
148
|
+
i0.ɵɵtext(2, " Create ");
|
|
149
|
+
i0.ɵɵelementEnd();
|
|
150
|
+
} }
|
|
151
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_12_For_12_Conditional_11_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
152
|
+
const _r13 = i0.ɵɵgetCurrentView();
|
|
153
|
+
i0.ɵɵelementStart(0, "button", 92);
|
|
154
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Conditional_12_For_12_Conditional_11_Conditional_8_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r13); const item_r10 = i0.ɵɵnextContext(2).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.OnEntityOp(item_r10, "update", $event)); });
|
|
155
|
+
i0.ɵɵelement(1, "i", 93);
|
|
156
|
+
i0.ɵɵtext(2, " Update ");
|
|
157
|
+
i0.ɵɵelementEnd();
|
|
158
|
+
} }
|
|
159
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_12_For_12_Conditional_11_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
160
|
+
const _r14 = i0.ɵɵgetCurrentView();
|
|
161
|
+
i0.ɵɵelementStart(0, "button", 94);
|
|
162
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Conditional_12_For_12_Conditional_11_Conditional_9_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r14); const item_r10 = i0.ɵɵnextContext(2).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.OnEntityOp(item_r10, "delete", $event)); });
|
|
163
|
+
i0.ɵɵelement(1, "i", 95);
|
|
164
|
+
i0.ɵɵtext(2, " Delete ");
|
|
165
|
+
i0.ɵɵelementEnd();
|
|
166
|
+
} }
|
|
167
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_12_For_12_Conditional_11_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
168
|
+
i0.ɵɵelementStart(0, "div", 89);
|
|
169
|
+
i0.ɵɵtext(1);
|
|
170
|
+
i0.ɵɵelementEnd();
|
|
171
|
+
} if (rf & 2) {
|
|
172
|
+
const item_r10 = i0.ɵɵnextContext(2).$implicit;
|
|
173
|
+
i0.ɵɵadvance();
|
|
174
|
+
i0.ɵɵtextInterpolate(item_r10.info.Description);
|
|
175
|
+
} }
|
|
176
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_12_For_12_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
177
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
178
|
+
i0.ɵɵelementStart(0, "div", 81)(1, "button", 82);
|
|
179
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Conditional_12_For_12_Conditional_11_Template_button_click_1_listener($event) { i0.ɵɵrestoreView(_r11); const item_r10 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.OnEntityOp(item_r10, "view", $event)); });
|
|
180
|
+
i0.ɵɵelement(2, "i", 83);
|
|
181
|
+
i0.ɵɵtext(3, " Run view ");
|
|
182
|
+
i0.ɵɵelementEnd();
|
|
183
|
+
i0.ɵɵelementStart(4, "button", 84);
|
|
184
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Conditional_12_For_12_Conditional_11_Template_button_click_4_listener($event) { i0.ɵɵrestoreView(_r11); const item_r10 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.OnEntityOp(item_r10, "byId", $event)); });
|
|
185
|
+
i0.ɵɵelement(5, "i", 85);
|
|
186
|
+
i0.ɵɵtext(6, " Get by ID ");
|
|
187
|
+
i0.ɵɵelementEnd();
|
|
188
|
+
i0.ɵɵconditionalCreate(7, GraphQLConsoleComponent_Conditional_19_Conditional_12_For_12_Conditional_11_Conditional_7_Template, 3, 0, "button", 86);
|
|
189
|
+
i0.ɵɵconditionalCreate(8, GraphQLConsoleComponent_Conditional_19_Conditional_12_For_12_Conditional_11_Conditional_8_Template, 3, 0, "button", 87);
|
|
190
|
+
i0.ɵɵconditionalCreate(9, GraphQLConsoleComponent_Conditional_19_Conditional_12_For_12_Conditional_11_Conditional_9_Template, 3, 0, "button", 88);
|
|
191
|
+
i0.ɵɵelementEnd();
|
|
192
|
+
i0.ɵɵconditionalCreate(10, GraphQLConsoleComponent_Conditional_19_Conditional_12_For_12_Conditional_11_Conditional_10_Template, 2, 1, "div", 89);
|
|
193
|
+
} if (rf & 2) {
|
|
194
|
+
const item_r10 = i0.ɵɵnextContext().$implicit;
|
|
195
|
+
i0.ɵɵadvance(7);
|
|
196
|
+
i0.ɵɵconditional(item_r10.info.AllowCreateAPI ? 7 : -1);
|
|
197
|
+
i0.ɵɵadvance();
|
|
198
|
+
i0.ɵɵconditional(item_r10.info.AllowUpdateAPI ? 8 : -1);
|
|
199
|
+
i0.ɵɵadvance();
|
|
200
|
+
i0.ɵɵconditional(item_r10.info.AllowDeleteAPI ? 9 : -1);
|
|
201
|
+
i0.ɵɵadvance();
|
|
202
|
+
i0.ɵɵconditional(item_r10.info.Description ? 10 : -1);
|
|
203
|
+
} }
|
|
204
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_12_For_12_Template(rf, ctx) { if (rf & 1) {
|
|
205
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
206
|
+
i0.ɵɵelementStart(0, "div", 73)(1, "button", 74);
|
|
207
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Conditional_12_For_12_Template_button_click_1_listener() { const item_r10 = i0.ɵɵrestoreView(_r9).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.ToggleEntity(item_r10)); });
|
|
208
|
+
i0.ɵɵelement(2, "i", 75);
|
|
209
|
+
i0.ɵɵelementStart(3, "div", 76)(4, "div", 77);
|
|
210
|
+
i0.ɵɵtext(5);
|
|
211
|
+
i0.ɵɵelementEnd();
|
|
212
|
+
i0.ɵɵelementStart(6, "div", 78)(7, "code", 79);
|
|
213
|
+
i0.ɵɵtext(8);
|
|
214
|
+
i0.ɵɵelementEnd();
|
|
215
|
+
i0.ɵɵelementStart(9, "span", 80);
|
|
216
|
+
i0.ɵɵtext(10);
|
|
217
|
+
i0.ɵɵelementEnd()()()();
|
|
218
|
+
i0.ɵɵconditionalCreate(11, GraphQLConsoleComponent_Conditional_19_Conditional_12_For_12_Conditional_11_Template, 11, 4);
|
|
219
|
+
i0.ɵɵelementEnd();
|
|
220
|
+
} if (rf & 2) {
|
|
221
|
+
const item_r10 = ctx.$implicit;
|
|
222
|
+
i0.ɵɵclassProp("gc-ent-card--expanded", item_r10.expanded);
|
|
223
|
+
i0.ɵɵadvance(2);
|
|
224
|
+
i0.ɵɵclassProp("gc-ent-chev--down", item_r10.expanded);
|
|
225
|
+
i0.ɵɵadvance(3);
|
|
226
|
+
i0.ɵɵtextInterpolate(item_r10.info.Name);
|
|
227
|
+
i0.ɵɵadvance(3);
|
|
228
|
+
i0.ɵɵtextInterpolate(item_r10.typeName);
|
|
229
|
+
i0.ɵɵadvance(2);
|
|
230
|
+
i0.ɵɵtextInterpolate(item_r10.schema);
|
|
231
|
+
i0.ɵɵadvance();
|
|
232
|
+
i0.ɵɵconditional(item_r10.expanded ? 11 : -1);
|
|
233
|
+
} }
|
|
234
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_12_Conditional_13_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
235
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
236
|
+
i0.ɵɵelementStart(0, "button", 98);
|
|
237
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Conditional_12_Conditional_13_Conditional_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r15); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.ClearEntityFilters()); });
|
|
238
|
+
i0.ɵɵtext(1, " Clear filters ");
|
|
239
|
+
i0.ɵɵelementEnd();
|
|
240
|
+
} }
|
|
241
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_12_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
242
|
+
i0.ɵɵelementStart(0, "div", 69);
|
|
243
|
+
i0.ɵɵelement(1, "i", 96);
|
|
244
|
+
i0.ɵɵelementStart(2, "span");
|
|
245
|
+
i0.ɵɵtext(3, "No entities match.");
|
|
246
|
+
i0.ɵɵelementEnd();
|
|
247
|
+
i0.ɵɵconditionalCreate(4, GraphQLConsoleComponent_Conditional_19_Conditional_12_Conditional_13_Conditional_4_Template, 2, 0, "button", 97);
|
|
248
|
+
i0.ɵɵelementEnd();
|
|
249
|
+
} if (rf & 2) {
|
|
250
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
251
|
+
i0.ɵɵadvance(4);
|
|
252
|
+
i0.ɵɵconditional(ctx_r0.EntitiesSearch || ctx_r0.EntitySchemaFilter ? 4 : -1);
|
|
253
|
+
} }
|
|
254
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
255
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
256
|
+
i0.ɵɵelementStart(0, "div", 60)(1, "div", 61);
|
|
257
|
+
i0.ɵɵelement(2, "i", 62);
|
|
258
|
+
i0.ɵɵelementStart(3, "input", 63);
|
|
259
|
+
i0.ɵɵtwoWayListener("ngModelChange", function GraphQLConsoleComponent_Conditional_19_Conditional_12_Template_input_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.EntitiesSearch, $event) || (ctx_r0.EntitiesSearch = $event); return i0.ɵɵresetView($event); });
|
|
260
|
+
i0.ɵɵelementEnd()();
|
|
261
|
+
i0.ɵɵconditionalCreate(4, GraphQLConsoleComponent_Conditional_19_Conditional_12_Conditional_4_Template, 5, 2, "select", 64);
|
|
262
|
+
i0.ɵɵelementEnd();
|
|
263
|
+
i0.ɵɵelementStart(5, "div", 65)(6, "span");
|
|
264
|
+
i0.ɵɵtext(7);
|
|
265
|
+
i0.ɵɵelementEnd();
|
|
266
|
+
i0.ɵɵelementStart(8, "span", 66);
|
|
267
|
+
i0.ɵɵtext(9, "Click an entity to see operations");
|
|
268
|
+
i0.ɵɵelementEnd()();
|
|
269
|
+
i0.ɵɵelementStart(10, "div", 67);
|
|
270
|
+
i0.ɵɵrepeaterCreate(11, GraphQLConsoleComponent_Conditional_19_Conditional_12_For_12_Template, 12, 8, "div", 68, i0.ɵɵcomponentInstance().TrackByEntity, true);
|
|
271
|
+
i0.ɵɵconditionalCreate(13, GraphQLConsoleComponent_Conditional_19_Conditional_12_Conditional_13_Template, 5, 1, "div", 69);
|
|
272
|
+
i0.ɵɵelementEnd();
|
|
273
|
+
} if (rf & 2) {
|
|
274
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
275
|
+
i0.ɵɵadvance(3);
|
|
276
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r0.EntitiesSearch);
|
|
277
|
+
i0.ɵɵadvance();
|
|
278
|
+
i0.ɵɵconditional(ctx_r0.KnownSchemas.length > 1 ? 4 : -1);
|
|
279
|
+
i0.ɵɵadvance(3);
|
|
280
|
+
i0.ɵɵtextInterpolate2("", ctx_r0.FilteredEntities.length, " of ", ctx_r0.Entities.length);
|
|
281
|
+
i0.ɵɵadvance(4);
|
|
282
|
+
i0.ɵɵrepeater(ctx_r0.FilteredEntities);
|
|
283
|
+
i0.ɵɵadvance(2);
|
|
284
|
+
i0.ɵɵconditional(ctx_r0.FilteredEntities.length === 0 ? 13 : -1);
|
|
285
|
+
} }
|
|
286
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
287
|
+
const _r17 = i0.ɵɵgetCurrentView();
|
|
288
|
+
i0.ɵɵelementStart(0, "div", 105)(1, "button", 110);
|
|
289
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_6_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r17); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.SchemaKindFilter = "all"); });
|
|
290
|
+
i0.ɵɵtext(2, " All ");
|
|
291
|
+
i0.ɵɵelementStart(3, "span");
|
|
292
|
+
i0.ɵɵtext(4);
|
|
293
|
+
i0.ɵɵelementEnd()();
|
|
294
|
+
i0.ɵɵelementStart(5, "button", 111);
|
|
295
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_6_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r17); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.SchemaKindFilter = "query"); });
|
|
296
|
+
i0.ɵɵelement(6, "i", 83);
|
|
297
|
+
i0.ɵɵtext(7, " Query ");
|
|
298
|
+
i0.ɵɵelementStart(8, "span");
|
|
299
|
+
i0.ɵɵtext(9);
|
|
300
|
+
i0.ɵɵelementEnd()();
|
|
301
|
+
i0.ɵɵelementStart(10, "button", 112);
|
|
302
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_6_Template_button_click_10_listener() { i0.ɵɵrestoreView(_r17); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.SchemaKindFilter = "mutation"); });
|
|
303
|
+
i0.ɵɵelement(11, "i", 93);
|
|
304
|
+
i0.ɵɵtext(12, " Mutation ");
|
|
305
|
+
i0.ɵɵelementStart(13, "span");
|
|
306
|
+
i0.ɵɵtext(14);
|
|
307
|
+
i0.ɵɵelementEnd()()();
|
|
308
|
+
} if (rf & 2) {
|
|
309
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
310
|
+
i0.ɵɵadvance();
|
|
311
|
+
i0.ɵɵclassProp("gc-schema-kind--active", ctx_r0.SchemaKindFilter === "all");
|
|
312
|
+
i0.ɵɵadvance(3);
|
|
313
|
+
i0.ɵɵtextInterpolate(ctx_r0.OperationCounts.all);
|
|
314
|
+
i0.ɵɵadvance();
|
|
315
|
+
i0.ɵɵclassProp("gc-schema-kind--active", ctx_r0.SchemaKindFilter === "query");
|
|
316
|
+
i0.ɵɵadvance(4);
|
|
317
|
+
i0.ɵɵtextInterpolate(ctx_r0.OperationCounts.query);
|
|
318
|
+
i0.ɵɵadvance();
|
|
319
|
+
i0.ɵɵclassProp("gc-schema-kind--active", ctx_r0.SchemaKindFilter === "mutation");
|
|
320
|
+
i0.ɵɵadvance(4);
|
|
321
|
+
i0.ɵɵtextInterpolate(ctx_r0.OperationCounts.mutation);
|
|
322
|
+
} }
|
|
323
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
324
|
+
i0.ɵɵelementStart(0, "div", 106);
|
|
325
|
+
i0.ɵɵelement(1, "i", 113);
|
|
326
|
+
i0.ɵɵelementStart(2, "span");
|
|
327
|
+
i0.ɵɵtext(3, "Introspecting schema\u2026");
|
|
328
|
+
i0.ɵɵelementEnd()();
|
|
329
|
+
} }
|
|
330
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
331
|
+
i0.ɵɵelementStart(0, "div", 107);
|
|
332
|
+
i0.ɵɵelement(1, "i", 114);
|
|
333
|
+
i0.ɵɵelementStart(2, "div", 115);
|
|
334
|
+
i0.ɵɵtext(3, "Introspection disabled");
|
|
335
|
+
i0.ɵɵelementEnd();
|
|
336
|
+
i0.ɵɵelementStart(4, "div", 116);
|
|
337
|
+
i0.ɵɵtext(5, " This server has GraphQL introspection turned off (typical in production). Schema browsing isn't available \u2014 write queries directly in the editor, or use the History tab to revisit previous queries. ");
|
|
338
|
+
i0.ɵɵelementEnd()();
|
|
339
|
+
} }
|
|
340
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
341
|
+
i0.ɵɵelementStart(0, "div", 108);
|
|
342
|
+
i0.ɵɵelement(1, "i", 117);
|
|
343
|
+
i0.ɵɵelementStart(2, "div", 118);
|
|
344
|
+
i0.ɵɵtext(3, "Couldn't load schema");
|
|
345
|
+
i0.ɵɵelementEnd();
|
|
346
|
+
i0.ɵɵelementStart(4, "div", 119);
|
|
347
|
+
i0.ɵɵtext(5);
|
|
348
|
+
i0.ɵɵelementEnd()();
|
|
349
|
+
} if (rf & 2) {
|
|
350
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
351
|
+
i0.ɵɵadvance(5);
|
|
352
|
+
i0.ɵɵtextInterpolate(ctx_r0.SchemaError);
|
|
353
|
+
} }
|
|
354
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
355
|
+
i0.ɵɵelementStart(0, "div", 106);
|
|
356
|
+
i0.ɵɵelement(1, "i", 96);
|
|
357
|
+
i0.ɵɵelementStart(2, "span");
|
|
358
|
+
i0.ɵɵtext(3, "No operations match.");
|
|
359
|
+
i0.ɵɵelementEnd()();
|
|
360
|
+
} }
|
|
361
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_11_For_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
362
|
+
i0.ɵɵelementStart(0, "div", 125);
|
|
363
|
+
i0.ɵɵtext(1);
|
|
364
|
+
i0.ɵɵelementEnd();
|
|
365
|
+
} if (rf & 2) {
|
|
366
|
+
const op_r19 = i0.ɵɵnextContext().$implicit;
|
|
367
|
+
i0.ɵɵadvance();
|
|
368
|
+
i0.ɵɵtextInterpolate1("(", op_r19.argSummary, ")");
|
|
369
|
+
} }
|
|
370
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_11_For_2_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
371
|
+
i0.ɵɵelementStart(0, "div", 128);
|
|
372
|
+
i0.ɵɵtext(1);
|
|
373
|
+
i0.ɵɵelementEnd();
|
|
374
|
+
} if (rf & 2) {
|
|
375
|
+
const op_r19 = i0.ɵɵnextContext().$implicit;
|
|
376
|
+
i0.ɵɵadvance();
|
|
377
|
+
i0.ɵɵtextInterpolate(op_r19.description);
|
|
378
|
+
} }
|
|
379
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_11_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
380
|
+
const _r18 = i0.ɵɵgetCurrentView();
|
|
381
|
+
i0.ɵɵelementStart(0, "button", 121);
|
|
382
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_11_For_2_Template_button_click_0_listener($event) { const op_r19 = i0.ɵɵrestoreView(_r18).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.OnInsertOperation(op_r19, $event)); });
|
|
383
|
+
i0.ɵɵelementStart(1, "div", 122)(2, "span", 123);
|
|
384
|
+
i0.ɵɵtext(3);
|
|
385
|
+
i0.ɵɵelementEnd();
|
|
386
|
+
i0.ɵɵelementStart(4, "span", 124);
|
|
387
|
+
i0.ɵɵtext(5);
|
|
388
|
+
i0.ɵɵelementEnd()();
|
|
389
|
+
i0.ɵɵconditionalCreate(6, GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_11_For_2_Conditional_6_Template, 2, 1, "div", 125);
|
|
390
|
+
i0.ɵɵelementStart(7, "div", 126);
|
|
391
|
+
i0.ɵɵelement(8, "i", 127);
|
|
392
|
+
i0.ɵɵtext(9);
|
|
393
|
+
i0.ɵɵelementEnd();
|
|
394
|
+
i0.ɵɵconditionalCreate(10, GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_11_For_2_Conditional_10_Template, 2, 1, "div", 128);
|
|
395
|
+
i0.ɵɵelementEnd();
|
|
396
|
+
} if (rf & 2) {
|
|
397
|
+
const op_r19 = ctx.$implicit;
|
|
398
|
+
i0.ɵɵclassProp("gc-schema-op--mutation", op_r19.kind === "mutation");
|
|
399
|
+
i0.ɵɵproperty("title", (op_r19.description || "Insert " + op_r19.kind + " template") + " \u00B7 Shift-click to append");
|
|
400
|
+
i0.ɵɵadvance(3);
|
|
401
|
+
i0.ɵɵtextInterpolate(op_r19.kind);
|
|
402
|
+
i0.ɵɵadvance(2);
|
|
403
|
+
i0.ɵɵtextInterpolate(op_r19.name);
|
|
404
|
+
i0.ɵɵadvance();
|
|
405
|
+
i0.ɵɵconditional(op_r19.argSummary ? 6 : -1);
|
|
406
|
+
i0.ɵɵadvance(3);
|
|
407
|
+
i0.ɵɵtextInterpolate1(" ", op_r19.returnSummary, " ");
|
|
408
|
+
i0.ɵɵadvance();
|
|
409
|
+
i0.ɵɵconditional(op_r19.description ? 10 : -1);
|
|
410
|
+
} }
|
|
411
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
412
|
+
i0.ɵɵelementStart(0, "div", 109);
|
|
413
|
+
i0.ɵɵrepeaterCreate(1, GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_11_For_2_Template, 11, 8, "button", 120, i0.ɵɵcomponentInstance().TrackByOp, true);
|
|
414
|
+
i0.ɵɵelementEnd();
|
|
415
|
+
} if (rf & 2) {
|
|
416
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
417
|
+
i0.ɵɵadvance();
|
|
418
|
+
i0.ɵɵrepeater(ctx_r0.FilteredOperations);
|
|
419
|
+
} }
|
|
420
|
+
function GraphQLConsoleComponent_Conditional_19_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
421
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
422
|
+
i0.ɵɵelementStart(0, "div", 99)(1, "div", 100);
|
|
423
|
+
i0.ɵɵelement(2, "i", 101);
|
|
424
|
+
i0.ɵɵelementStart(3, "input", 102);
|
|
425
|
+
i0.ɵɵtwoWayListener("ngModelChange", function GraphQLConsoleComponent_Conditional_19_Conditional_13_Template_input_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r16); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.SchemaSearch, $event) || (ctx_r0.SchemaSearch = $event); return i0.ɵɵresetView($event); });
|
|
426
|
+
i0.ɵɵelementEnd()();
|
|
427
|
+
i0.ɵɵelementStart(4, "button", 103);
|
|
428
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Conditional_13_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r16); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.OnReloadSchema()); });
|
|
429
|
+
i0.ɵɵelement(5, "i", 104);
|
|
430
|
+
i0.ɵɵelementEnd()();
|
|
431
|
+
i0.ɵɵconditionalCreate(6, GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_6_Template, 15, 9, "div", 105);
|
|
432
|
+
i0.ɵɵconditionalCreate(7, GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_7_Template, 4, 0, "div", 106)(8, GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_8_Template, 6, 0, "div", 107)(9, GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_9_Template, 6, 1, "div", 108)(10, GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_10_Template, 4, 0, "div", 106)(11, GraphQLConsoleComponent_Conditional_19_Conditional_13_Conditional_11_Template, 3, 0, "div", 109);
|
|
433
|
+
} if (rf & 2) {
|
|
434
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
435
|
+
i0.ɵɵadvance(3);
|
|
436
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r0.SchemaSearch);
|
|
437
|
+
i0.ɵɵadvance();
|
|
438
|
+
i0.ɵɵproperty("disabled", ctx_r0.SchemaLoading);
|
|
439
|
+
i0.ɵɵadvance();
|
|
440
|
+
i0.ɵɵclassProp("fa-rotate", !ctx_r0.SchemaLoading)("fa-spinner", ctx_r0.SchemaLoading)("fa-spin", ctx_r0.SchemaLoading);
|
|
441
|
+
i0.ɵɵadvance();
|
|
442
|
+
i0.ɵɵconditional(ctx_r0.Operations.length > 0 ? 6 : -1);
|
|
443
|
+
i0.ɵɵadvance();
|
|
444
|
+
i0.ɵɵconditional(ctx_r0.SchemaLoading ? 7 : ctx_r0.SchemaIntrospectionDisabled ? 8 : ctx_r0.SchemaError ? 9 : ctx_r0.FilteredOperations.length === 0 ? 10 : 11);
|
|
445
|
+
} }
|
|
446
|
+
function GraphQLConsoleComponent_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
447
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
448
|
+
i0.ɵɵelementStart(0, "aside", 39)(1, "div", 40)(2, "button", 41);
|
|
449
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnSidebarTabChange("history")); });
|
|
450
|
+
i0.ɵɵelement(3, "i", 9);
|
|
451
|
+
i0.ɵɵtext(4, " History ");
|
|
452
|
+
i0.ɵɵelementEnd();
|
|
453
|
+
i0.ɵɵelementStart(5, "button", 41);
|
|
454
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnSidebarTabChange("entities")); });
|
|
455
|
+
i0.ɵɵelement(6, "i", 42);
|
|
456
|
+
i0.ɵɵtext(7, " Entities ");
|
|
457
|
+
i0.ɵɵelementEnd();
|
|
458
|
+
i0.ɵɵelementStart(8, "button", 41);
|
|
459
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_19_Template_button_click_8_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnSidebarTabChange("schema")); });
|
|
460
|
+
i0.ɵɵelement(9, "i", 43);
|
|
461
|
+
i0.ɵɵtext(10, " Schema ");
|
|
462
|
+
i0.ɵɵelementEnd()();
|
|
463
|
+
i0.ɵɵconditionalCreate(11, GraphQLConsoleComponent_Conditional_19_Conditional_11_Template, 7, 3)(12, GraphQLConsoleComponent_Conditional_19_Conditional_12_Template, 14, 5)(13, GraphQLConsoleComponent_Conditional_19_Conditional_13_Template, 12, 10);
|
|
464
|
+
i0.ɵɵelementEnd();
|
|
465
|
+
i0.ɵɵelementStart(14, "div", 44);
|
|
466
|
+
i0.ɵɵlistener("mousedown", function GraphQLConsoleComponent_Conditional_19_Template_div_mousedown_14_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnSplitterDown($event, "sidebar")); });
|
|
467
|
+
i0.ɵɵelementEnd();
|
|
468
|
+
} if (rf & 2) {
|
|
469
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
470
|
+
i0.ɵɵstyleProp("width", ctx_r0.SidebarWidthPx, "px");
|
|
471
|
+
i0.ɵɵadvance(2);
|
|
472
|
+
i0.ɵɵclassProp("gc-sidebar-tab--active", ctx_r0.SidebarTab === "history");
|
|
473
|
+
i0.ɵɵadvance(3);
|
|
474
|
+
i0.ɵɵclassProp("gc-sidebar-tab--active", ctx_r0.SidebarTab === "entities");
|
|
475
|
+
i0.ɵɵadvance(3);
|
|
476
|
+
i0.ɵɵclassProp("gc-sidebar-tab--active", ctx_r0.SidebarTab === "schema");
|
|
477
|
+
i0.ɵɵadvance(3);
|
|
478
|
+
i0.ɵɵconditional(ctx_r0.SidebarTab === "history" ? 11 : ctx_r0.SidebarTab === "entities" ? 12 : 13);
|
|
479
|
+
} }
|
|
480
|
+
function GraphQLConsoleComponent_Conditional_39_Template(rf, ctx) { if (rf & 1) {
|
|
481
|
+
i0.ɵɵelementStart(0, "span", 27);
|
|
482
|
+
i0.ɵɵtext(1, "configured");
|
|
483
|
+
i0.ɵɵelementEnd();
|
|
484
|
+
} }
|
|
485
|
+
function GraphQLConsoleComponent_Conditional_40_Template(rf, ctx) { if (rf & 1) {
|
|
486
|
+
const _r20 = i0.ɵɵgetCurrentView();
|
|
487
|
+
i0.ɵɵelementStart(0, "mj-code-editor", 129);
|
|
488
|
+
i0.ɵɵtwoWayListener("ngModelChange", function GraphQLConsoleComponent_Conditional_40_Template_mj_code_editor_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r20); const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r0.Variables, $event) || (ctx_r0.Variables = $event); return i0.ɵɵresetView($event); });
|
|
489
|
+
i0.ɵɵelementEnd();
|
|
490
|
+
} if (rf & 2) {
|
|
491
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
492
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r0.Variables);
|
|
493
|
+
i0.ɵɵproperty("language", "json")("lineWrapping", true);
|
|
494
|
+
} }
|
|
495
|
+
function GraphQLConsoleComponent_Conditional_43_Template(rf, ctx) { if (rf & 1) {
|
|
496
|
+
i0.ɵɵelement(0, "i", 113);
|
|
497
|
+
i0.ɵɵtext(1, " Running\u2026 ");
|
|
498
|
+
} }
|
|
499
|
+
function GraphQLConsoleComponent_Conditional_44_Template(rf, ctx) { if (rf & 1) {
|
|
500
|
+
i0.ɵɵelement(0, "i", 130);
|
|
501
|
+
i0.ɵɵtext(1, " Run ");
|
|
502
|
+
} }
|
|
503
|
+
function GraphQLConsoleComponent_Conditional_45_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
504
|
+
i0.ɵɵelementStart(0, "span", 131);
|
|
505
|
+
i0.ɵɵelement(1, "i", 134);
|
|
506
|
+
i0.ɵɵtext(2, " 200 OK ");
|
|
507
|
+
i0.ɵɵelementEnd();
|
|
508
|
+
} }
|
|
509
|
+
function GraphQLConsoleComponent_Conditional_45_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
510
|
+
i0.ɵɵelementStart(0, "span", 132);
|
|
511
|
+
i0.ɵɵelement(1, "i", 117);
|
|
512
|
+
i0.ɵɵtext(2, " Error ");
|
|
513
|
+
i0.ɵɵelementEnd();
|
|
514
|
+
} }
|
|
515
|
+
function GraphQLConsoleComponent_Conditional_45_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
516
|
+
i0.ɵɵelementStart(0, "span", 133);
|
|
517
|
+
i0.ɵɵelement(1, "i", 135);
|
|
518
|
+
i0.ɵɵtext(2);
|
|
519
|
+
i0.ɵɵelementEnd();
|
|
520
|
+
} if (rf & 2) {
|
|
521
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
522
|
+
i0.ɵɵadvance(2);
|
|
523
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.ResponseDurationMs, "ms");
|
|
524
|
+
} }
|
|
525
|
+
function GraphQLConsoleComponent_Conditional_45_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
526
|
+
i0.ɵɵelementStart(0, "span", 133);
|
|
527
|
+
i0.ɵɵelement(1, "i", 136);
|
|
528
|
+
i0.ɵɵtext(2);
|
|
529
|
+
i0.ɵɵelementEnd();
|
|
530
|
+
} if (rf & 2) {
|
|
531
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
532
|
+
i0.ɵɵadvance(2);
|
|
533
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.FormattedSize);
|
|
534
|
+
} }
|
|
535
|
+
function GraphQLConsoleComponent_Conditional_45_Template(rf, ctx) { if (rf & 1) {
|
|
536
|
+
i0.ɵɵelementStart(0, "div", 31);
|
|
537
|
+
i0.ɵɵconditionalCreate(1, GraphQLConsoleComponent_Conditional_45_Conditional_1_Template, 3, 0, "span", 131)(2, GraphQLConsoleComponent_Conditional_45_Conditional_2_Template, 3, 0, "span", 132);
|
|
538
|
+
i0.ɵɵconditionalCreate(3, GraphQLConsoleComponent_Conditional_45_Conditional_3_Template, 3, 1, "span", 133);
|
|
539
|
+
i0.ɵɵconditionalCreate(4, GraphQLConsoleComponent_Conditional_45_Conditional_4_Template, 3, 1, "span", 133);
|
|
540
|
+
i0.ɵɵelementEnd();
|
|
541
|
+
} if (rf & 2) {
|
|
542
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
543
|
+
i0.ɵɵadvance();
|
|
544
|
+
i0.ɵɵconditional(ctx_r0.ResponseStatus === "ok" ? 1 : 2);
|
|
545
|
+
i0.ɵɵadvance(2);
|
|
546
|
+
i0.ɵɵconditional(ctx_r0.ResponseDurationMs != null ? 3 : -1);
|
|
547
|
+
i0.ɵɵadvance();
|
|
548
|
+
i0.ɵɵconditional(ctx_r0.ResponseSizeBytes != null ? 4 : -1);
|
|
549
|
+
} }
|
|
550
|
+
function GraphQLConsoleComponent_Conditional_47_Template(rf, ctx) { if (rf & 1) {
|
|
551
|
+
const _r21 = i0.ɵɵgetCurrentView();
|
|
552
|
+
i0.ɵɵelementStart(0, "button", 137);
|
|
553
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Conditional_47_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r21); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnCopyResponse()); });
|
|
554
|
+
i0.ɵɵelement(1, "i", 104);
|
|
555
|
+
i0.ɵɵtext(2);
|
|
556
|
+
i0.ɵɵelementEnd();
|
|
557
|
+
} if (rf & 2) {
|
|
558
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
559
|
+
i0.ɵɵclassProp("mj-inspector__btn--success", ctx_r0.CopyConfirmed);
|
|
560
|
+
i0.ɵɵadvance();
|
|
561
|
+
i0.ɵɵclassProp("fa-clipboard", !ctx_r0.CopyConfirmed)("fa-check", ctx_r0.CopyConfirmed);
|
|
562
|
+
i0.ɵɵadvance();
|
|
563
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.CopyConfirmed ? "Copied" : "Copy", " ");
|
|
564
|
+
} }
|
|
565
|
+
function GraphQLConsoleComponent_Conditional_52_Template(rf, ctx) { if (rf & 1) {
|
|
566
|
+
i0.ɵɵelementStart(0, "div", 36);
|
|
567
|
+
i0.ɵɵelement(1, "i", 117);
|
|
568
|
+
i0.ɵɵelementStart(2, "span");
|
|
569
|
+
i0.ɵɵtext(3);
|
|
570
|
+
i0.ɵɵelementEnd()();
|
|
571
|
+
} if (rf & 2) {
|
|
572
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
573
|
+
i0.ɵɵadvance(3);
|
|
574
|
+
i0.ɵɵtextInterpolate(ctx_r0.ErrorMessage);
|
|
575
|
+
} }
|
|
576
|
+
function GraphQLConsoleComponent_Conditional_53_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
577
|
+
i0.ɵɵelementStart(0, "div", 138);
|
|
578
|
+
i0.ɵɵelement(1, "i", 117);
|
|
579
|
+
i0.ɵɵelementStart(2, "span");
|
|
580
|
+
i0.ɵɵtext(3);
|
|
581
|
+
i0.ɵɵelementEnd()();
|
|
582
|
+
} if (rf & 2) {
|
|
583
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
584
|
+
i0.ɵɵadvance(3);
|
|
585
|
+
i0.ɵɵtextInterpolate(ctx_r0.ErrorMessage);
|
|
586
|
+
} }
|
|
587
|
+
function GraphQLConsoleComponent_Conditional_53_Template(rf, ctx) { if (rf & 1) {
|
|
588
|
+
i0.ɵɵconditionalCreate(0, GraphQLConsoleComponent_Conditional_53_Conditional_0_Template, 4, 1, "div", 138);
|
|
589
|
+
i0.ɵɵelementStart(1, "pre", 139)(2, "code");
|
|
590
|
+
i0.ɵɵtext(3);
|
|
591
|
+
i0.ɵɵelementEnd()();
|
|
592
|
+
} if (rf & 2) {
|
|
593
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
594
|
+
i0.ɵɵconditional(ctx_r0.ErrorMessage ? 0 : -1);
|
|
595
|
+
i0.ɵɵadvance(3);
|
|
596
|
+
i0.ɵɵtextInterpolate(ctx_r0.ResponseJson);
|
|
597
|
+
} }
|
|
598
|
+
function GraphQLConsoleComponent_Conditional_54_Template(rf, ctx) { if (rf & 1) {
|
|
599
|
+
i0.ɵɵelementStart(0, "div", 37);
|
|
600
|
+
i0.ɵɵelement(1, "i", 140);
|
|
601
|
+
i0.ɵɵelementStart(2, "span");
|
|
602
|
+
i0.ɵɵtext(3, "Run a query to see results here.");
|
|
603
|
+
i0.ɵɵelementEnd()();
|
|
604
|
+
} }
|
|
605
|
+
const PREFS_KEY = 'graphqlConsole';
|
|
606
|
+
const HISTORY_LIMIT = 30;
|
|
607
|
+
const SAMPLE_QUERY = `# Welcome to the GraphQL Console
|
|
608
|
+
# Press Cmd/Ctrl+Enter to run.
|
|
609
|
+
# Authentication is handled by the active GraphQL provider.
|
|
610
|
+
|
|
611
|
+
query GetCurrentUser {
|
|
612
|
+
CurrentUser {
|
|
613
|
+
ID
|
|
614
|
+
Name
|
|
615
|
+
Email
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
`;
|
|
619
|
+
/**
|
|
620
|
+
* GraphQL Console — write and run arbitrary GraphQL queries against the
|
|
621
|
+
* connected MJ API. Re-uses the active GraphQLDataProvider client (auth +
|
|
622
|
+
* session intact). Local history with copy / favorite / replay; copy-as-curl;
|
|
623
|
+
* keyboard shortcut (Cmd/Ctrl+Enter) to run.
|
|
624
|
+
*/
|
|
625
|
+
let GraphQLConsoleComponent = class GraphQLConsoleComponent extends BaseResourceComponent {
|
|
626
|
+
cdr;
|
|
627
|
+
queryEditor;
|
|
628
|
+
Query = SAMPLE_QUERY;
|
|
629
|
+
Variables = '{}';
|
|
630
|
+
ShowVariables = false;
|
|
631
|
+
Running = false;
|
|
632
|
+
ResponseJson = '';
|
|
633
|
+
ResponseStatus = 'idle';
|
|
634
|
+
ResponseDurationMs = null;
|
|
635
|
+
ResponseSizeBytes = null;
|
|
636
|
+
ErrorMessage = null;
|
|
637
|
+
History = [];
|
|
638
|
+
ShowHistory = true;
|
|
639
|
+
CopyConfirmed = false;
|
|
640
|
+
ApiUrl = '';
|
|
641
|
+
// Schema explorer state
|
|
642
|
+
SidebarTab = 'history';
|
|
643
|
+
SchemaLoading = false;
|
|
644
|
+
SchemaError = null;
|
|
645
|
+
SchemaIntrospectionDisabled = false;
|
|
646
|
+
SchemaSearch = '';
|
|
647
|
+
SchemaKindFilter = 'all';
|
|
648
|
+
Operations = [];
|
|
649
|
+
schemaLoaded = false;
|
|
650
|
+
// Entities tab state
|
|
651
|
+
EntitiesSearch = '';
|
|
652
|
+
Entities = [];
|
|
653
|
+
EntitySchemaFilter = ''; // '' = all
|
|
654
|
+
KnownSchemas = [];
|
|
655
|
+
// Pane sizing (resizable splitters)
|
|
656
|
+
SidebarWidthPx = 280;
|
|
657
|
+
EditorHeightPct = 50; // % of main pane height for editor (50/50 split default)
|
|
658
|
+
resizing = null;
|
|
659
|
+
elementRef = inject(ElementRef);
|
|
660
|
+
constructor(cdr) {
|
|
661
|
+
super();
|
|
662
|
+
this.cdr = cdr;
|
|
663
|
+
}
|
|
664
|
+
ngOnInit() {
|
|
665
|
+
this.loadFromStorage();
|
|
666
|
+
try {
|
|
667
|
+
this.ApiUrl = GraphQLDataProvider.Instance.ConfigData?.URL ?? '';
|
|
668
|
+
}
|
|
669
|
+
catch { /* not configured */ }
|
|
670
|
+
this.loadEntities();
|
|
671
|
+
this.NotifyLoadComplete();
|
|
672
|
+
}
|
|
673
|
+
ngOnDestroy() {
|
|
674
|
+
this.saveToStorage();
|
|
675
|
+
this.detachResizeListeners();
|
|
676
|
+
}
|
|
677
|
+
loadEntities() {
|
|
678
|
+
try {
|
|
679
|
+
const md = this.ProviderToUse;
|
|
680
|
+
if (!md)
|
|
681
|
+
return;
|
|
682
|
+
const items = (md.Entities ?? []).map(e => ({
|
|
683
|
+
info: e,
|
|
684
|
+
typeName: getGraphQLTypeNameBase(e),
|
|
685
|
+
schema: e.SchemaName ?? '(unknown)',
|
|
686
|
+
expanded: false
|
|
687
|
+
})).sort((a, b) => a.info.Name.localeCompare(b.info.Name));
|
|
688
|
+
this.Entities = items;
|
|
689
|
+
const schemas = new Set();
|
|
690
|
+
for (const i of items)
|
|
691
|
+
schemas.add(i.schema);
|
|
692
|
+
this.KnownSchemas = Array.from(schemas).sort();
|
|
693
|
+
}
|
|
694
|
+
catch { /* metadata not ready */ }
|
|
695
|
+
}
|
|
696
|
+
async GetResourceDisplayName() { return 'GraphQL Console'; }
|
|
697
|
+
async GetResourceIconClass() { return 'fa-solid fa-code'; }
|
|
698
|
+
OnHostKeydown(event) {
|
|
699
|
+
if ((event.metaKey || event.ctrlKey) && event.key === 'Enter') {
|
|
700
|
+
event.preventDefault();
|
|
701
|
+
void this.OnRun();
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
async OnRun() {
|
|
705
|
+
const trimmedQuery = this.Query.trim();
|
|
706
|
+
if (!trimmedQuery) {
|
|
707
|
+
this.ErrorMessage = 'Query is empty.';
|
|
708
|
+
return;
|
|
709
|
+
}
|
|
710
|
+
let parsedVars = null;
|
|
711
|
+
if (this.Variables.trim()) {
|
|
712
|
+
try {
|
|
713
|
+
parsedVars = JSON.parse(this.Variables);
|
|
714
|
+
}
|
|
715
|
+
catch (err) {
|
|
716
|
+
this.ResponseStatus = 'error';
|
|
717
|
+
this.ErrorMessage = 'Variables must be valid JSON: ' + (err instanceof Error ? err.message : String(err));
|
|
718
|
+
this.ResponseJson = '';
|
|
719
|
+
this.cdr.markForCheck();
|
|
720
|
+
return;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
this.Running = true;
|
|
724
|
+
this.ErrorMessage = null;
|
|
725
|
+
this.ResponseStatus = 'idle';
|
|
726
|
+
this.ResponseJson = '';
|
|
727
|
+
this.cdr.markForCheck();
|
|
728
|
+
const start = performance.now();
|
|
729
|
+
try {
|
|
730
|
+
const data = await GraphQLDataProvider.ExecuteGQL(trimmedQuery, parsedVars);
|
|
731
|
+
const elapsed = performance.now() - start;
|
|
732
|
+
const text = JSON.stringify(data, null, 2);
|
|
733
|
+
this.ResponseJson = text;
|
|
734
|
+
this.ResponseStatus = 'ok';
|
|
735
|
+
this.ResponseDurationMs = Math.round(elapsed);
|
|
736
|
+
this.ResponseSizeBytes = new Blob([text]).size;
|
|
737
|
+
this.recordHistory(trimmedQuery, this.Variables, 'ok', this.ResponseDurationMs);
|
|
738
|
+
}
|
|
739
|
+
catch (err) {
|
|
740
|
+
const elapsed = performance.now() - start;
|
|
741
|
+
this.ResponseStatus = 'error';
|
|
742
|
+
this.ResponseDurationMs = Math.round(elapsed);
|
|
743
|
+
const formatted = this.formatError(err);
|
|
744
|
+
this.ResponseJson = formatted;
|
|
745
|
+
this.ResponseSizeBytes = new Blob([formatted]).size;
|
|
746
|
+
this.ErrorMessage = this.extractErrorSummary(err);
|
|
747
|
+
this.recordHistory(trimmedQuery, this.Variables, 'error', this.ResponseDurationMs);
|
|
748
|
+
}
|
|
749
|
+
finally {
|
|
750
|
+
this.Running = false;
|
|
751
|
+
this.cdr.markForCheck();
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
OnRestoreHistory(entry) {
|
|
755
|
+
this.Query = entry.query;
|
|
756
|
+
this.Variables = entry.variables;
|
|
757
|
+
if (entry.variables.trim() && entry.variables.trim() !== '{}') {
|
|
758
|
+
this.ShowVariables = true;
|
|
759
|
+
}
|
|
760
|
+
this.cdr.markForCheck();
|
|
761
|
+
}
|
|
762
|
+
OnToggleFavorite(entry, event) {
|
|
763
|
+
event.stopPropagation();
|
|
764
|
+
entry.favorite = !entry.favorite;
|
|
765
|
+
this.saveToStorage();
|
|
766
|
+
this.cdr.markForCheck();
|
|
767
|
+
}
|
|
768
|
+
OnDeleteHistory(entry, event) {
|
|
769
|
+
event.stopPropagation();
|
|
770
|
+
this.History = this.History.filter(h => h.id !== entry.id);
|
|
771
|
+
this.saveToStorage();
|
|
772
|
+
this.cdr.markForCheck();
|
|
773
|
+
}
|
|
774
|
+
OnClearHistory() {
|
|
775
|
+
// Keep favorites
|
|
776
|
+
this.History = this.History.filter(h => h.favorite);
|
|
777
|
+
this.saveToStorage();
|
|
778
|
+
this.cdr.markForCheck();
|
|
779
|
+
}
|
|
780
|
+
async OnCopyResponse() {
|
|
781
|
+
if (!this.ResponseJson)
|
|
782
|
+
return;
|
|
783
|
+
try {
|
|
784
|
+
await navigator.clipboard.writeText(this.ResponseJson);
|
|
785
|
+
this.CopyConfirmed = true;
|
|
786
|
+
setTimeout(() => { this.CopyConfirmed = false; this.cdr.markForCheck(); }, 1800);
|
|
787
|
+
this.cdr.markForCheck();
|
|
788
|
+
}
|
|
789
|
+
catch { /* unavailable */ }
|
|
790
|
+
}
|
|
791
|
+
async OnCopyAsCurl() {
|
|
792
|
+
const url = this.ApiUrl || '<API_URL>';
|
|
793
|
+
const body = JSON.stringify({
|
|
794
|
+
query: this.Query.trim(),
|
|
795
|
+
variables: this.Variables.trim() ? JSON.parse(this.Variables) : null
|
|
796
|
+
});
|
|
797
|
+
const escaped = body.replace(/'/g, `'\\''`);
|
|
798
|
+
const curl = [
|
|
799
|
+
`curl -X POST '${url}'`,
|
|
800
|
+
` -H 'Content-Type: application/json'`,
|
|
801
|
+
` -H 'Authorization: Bearer <YOUR_TOKEN>'`,
|
|
802
|
+
` -d '${escaped}'`
|
|
803
|
+
].join(' \\\n');
|
|
804
|
+
try {
|
|
805
|
+
await navigator.clipboard.writeText(curl);
|
|
806
|
+
}
|
|
807
|
+
catch { /* unavailable */ }
|
|
808
|
+
}
|
|
809
|
+
OnFormatQuery() {
|
|
810
|
+
// Tiny pretty-printer: collapse multiple blank lines + trim trailing whitespace
|
|
811
|
+
this.Query = this.Query
|
|
812
|
+
.split('\n')
|
|
813
|
+
.map(line => line.replace(/\s+$/, ''))
|
|
814
|
+
.join('\n')
|
|
815
|
+
.replace(/\n{3,}/g, '\n\n')
|
|
816
|
+
.trim() + '\n';
|
|
817
|
+
}
|
|
818
|
+
ToggleHistoryPanel() {
|
|
819
|
+
this.ShowHistory = !this.ShowHistory;
|
|
820
|
+
}
|
|
821
|
+
ToggleVariables() {
|
|
822
|
+
this.ShowVariables = !this.ShowVariables;
|
|
823
|
+
}
|
|
824
|
+
OnSidebarTabChange(tab) {
|
|
825
|
+
this.SidebarTab = tab;
|
|
826
|
+
this.saveToStorage();
|
|
827
|
+
if (tab === 'schema' && !this.schemaLoaded && !this.SchemaLoading) {
|
|
828
|
+
void this.loadSchema();
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
async OnReloadSchema() {
|
|
832
|
+
this.schemaLoaded = false;
|
|
833
|
+
await this.loadSchema();
|
|
834
|
+
}
|
|
835
|
+
OnInsertOperation(op, event) {
|
|
836
|
+
const template = this.buildOperationTemplate(op);
|
|
837
|
+
this.insertTemplate(template, !!event?.shiftKey);
|
|
838
|
+
}
|
|
839
|
+
OnClearQuery() {
|
|
840
|
+
this.Query = '';
|
|
841
|
+
this.saveToStorage();
|
|
842
|
+
this.cdr.markForCheck();
|
|
843
|
+
}
|
|
844
|
+
get FilteredOperations() {
|
|
845
|
+
const q = this.SchemaSearch.trim().toLowerCase();
|
|
846
|
+
return this.Operations.filter(op => {
|
|
847
|
+
if (this.SchemaKindFilter !== 'all' && op.kind !== this.SchemaKindFilter)
|
|
848
|
+
return false;
|
|
849
|
+
if (!q)
|
|
850
|
+
return true;
|
|
851
|
+
return op.name.toLowerCase().includes(q)
|
|
852
|
+
|| op.returnSummary.toLowerCase().includes(q)
|
|
853
|
+
|| op.description.toLowerCase().includes(q);
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
get OperationCounts() {
|
|
857
|
+
const q = this.Operations.filter(o => o.kind === 'query').length;
|
|
858
|
+
const m = this.Operations.filter(o => o.kind === 'mutation').length;
|
|
859
|
+
return { all: this.Operations.length, query: q, mutation: m };
|
|
860
|
+
}
|
|
861
|
+
TrackByOp = (_i, o) => o.kind + ':' + o.name;
|
|
862
|
+
// ---------- Entities tab ----------
|
|
863
|
+
TrackByEntity = (_i, e) => e.info.ID;
|
|
864
|
+
get FilteredEntities() {
|
|
865
|
+
const q = this.EntitiesSearch.trim().toLowerCase();
|
|
866
|
+
return this.Entities.filter(e => {
|
|
867
|
+
if (this.EntitySchemaFilter && e.schema !== this.EntitySchemaFilter)
|
|
868
|
+
return false;
|
|
869
|
+
if (!q)
|
|
870
|
+
return true;
|
|
871
|
+
return e.info.Name.toLowerCase().includes(q)
|
|
872
|
+
|| e.typeName.toLowerCase().includes(q)
|
|
873
|
+
|| e.schema.toLowerCase().includes(q)
|
|
874
|
+
|| (e.info.Description ?? '').toLowerCase().includes(q);
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
ToggleEntity(e) {
|
|
878
|
+
e.expanded = !e.expanded;
|
|
879
|
+
}
|
|
880
|
+
OnEntityOp(item, op, event) {
|
|
881
|
+
event.stopPropagation();
|
|
882
|
+
const template = this.buildEntityOpTemplate(item, op);
|
|
883
|
+
this.insertTemplate(template, !!event.shiftKey);
|
|
884
|
+
}
|
|
885
|
+
/**
|
|
886
|
+
* Default: replace the editor contents with the new template.
|
|
887
|
+
* Shift-click: append to the end (with a blank-line separator) so the
|
|
888
|
+
* user can stage multiple operations in one document.
|
|
889
|
+
*/
|
|
890
|
+
insertTemplate(template, append) {
|
|
891
|
+
const trimmed = this.Query.trimEnd();
|
|
892
|
+
const isFresh = trimmed.length === 0 || trimmed === SAMPLE_QUERY.trimEnd();
|
|
893
|
+
if (append && !isFresh) {
|
|
894
|
+
this.Query = trimmed + '\n\n' + template;
|
|
895
|
+
}
|
|
896
|
+
else {
|
|
897
|
+
this.Query = template;
|
|
898
|
+
}
|
|
899
|
+
this.saveToStorage();
|
|
900
|
+
this.cdr.markForCheck();
|
|
901
|
+
}
|
|
902
|
+
buildEntityOpTemplate(item, op) {
|
|
903
|
+
const e = item.info;
|
|
904
|
+
const typeName = item.typeName;
|
|
905
|
+
const mapper = new FieldMapper();
|
|
906
|
+
const fieldList = this.pickRepresentativeFields(e).map(name => {
|
|
907
|
+
const mapped = mapper.MapFieldName(name);
|
|
908
|
+
// Annotate any remapped fields so users see why the GraphQL field
|
|
909
|
+
// name differs from the database column. (`__` is reserved by the
|
|
910
|
+
// GraphQL spec, so MJ rewrites `__mj_*` columns to `_mj__*` over
|
|
911
|
+
// the wire.)
|
|
912
|
+
return mapped === name ? mapped : `${mapped} # from ${name}`;
|
|
913
|
+
});
|
|
914
|
+
const fieldSelection = fieldList.join('\n ');
|
|
915
|
+
const pkField = mapper.MapFieldName(e.PrimaryKeys?.[0]?.Name ?? 'ID');
|
|
916
|
+
switch (op) {
|
|
917
|
+
case 'view':
|
|
918
|
+
return `# Run a dynamic view over ${e.Name}
|
|
919
|
+
query Run${typeName}DynamicView {
|
|
920
|
+
Run${typeName}DynamicView(input: {
|
|
921
|
+
EntityName: "${e.Name}"
|
|
922
|
+
ExtraFilter: ""
|
|
923
|
+
OrderBy: ""
|
|
924
|
+
UserSearchString: ""
|
|
925
|
+
Fields: null
|
|
926
|
+
MaxRows: 100
|
|
927
|
+
StartRow: 0
|
|
928
|
+
IgnoreMaxRows: false
|
|
929
|
+
ForceAuditLog: false
|
|
930
|
+
ResultType: "simple"
|
|
931
|
+
}) {
|
|
932
|
+
Success
|
|
933
|
+
RowCount
|
|
934
|
+
TotalRowCount
|
|
935
|
+
ExecutionTime
|
|
936
|
+
ErrorMessage
|
|
937
|
+
Results {
|
|
938
|
+
${fieldSelection}
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
`;
|
|
943
|
+
case 'byId':
|
|
944
|
+
return `# Fetch a single ${e.Name} record by primary key
|
|
945
|
+
query Run${typeName}ByID($id: String!) {
|
|
946
|
+
Run${typeName}DynamicView(input: {
|
|
947
|
+
EntityName: "${e.Name}"
|
|
948
|
+
ExtraFilter: "${pkField}='" + $id + "'"
|
|
949
|
+
Fields: null
|
|
950
|
+
MaxRows: 1
|
|
951
|
+
StartRow: 0
|
|
952
|
+
IgnoreMaxRows: false
|
|
953
|
+
ForceAuditLog: false
|
|
954
|
+
ResultType: "simple"
|
|
955
|
+
OrderBy: ""
|
|
956
|
+
UserSearchString: ""
|
|
957
|
+
}) {
|
|
958
|
+
Success
|
|
959
|
+
Results {
|
|
960
|
+
${fieldSelection}
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
# Variables (paste into the Variables panel):
|
|
966
|
+
# { "id": "<your-id-here>" }
|
|
967
|
+
`;
|
|
968
|
+
case 'create':
|
|
969
|
+
return `# Create a new ${e.Name}
|
|
970
|
+
mutation Create${typeName}($input: Create${typeName}Input!) {
|
|
971
|
+
Create${typeName}(input: $input) {
|
|
972
|
+
${fieldSelection}
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
# Variables — populate the writable fields, then Run
|
|
977
|
+
# {
|
|
978
|
+
# "input": {
|
|
979
|
+
# # required + writable fields go here
|
|
980
|
+
# }
|
|
981
|
+
# }
|
|
982
|
+
`;
|
|
983
|
+
case 'update':
|
|
984
|
+
return `# Update an existing ${e.Name}
|
|
985
|
+
mutation Update${typeName}($input: Update${typeName}Input!) {
|
|
986
|
+
Update${typeName}(input: $input) {
|
|
987
|
+
${fieldSelection}
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
# Variables — must include the primary key (${pkField})
|
|
992
|
+
# {
|
|
993
|
+
# "input": {
|
|
994
|
+
# "${pkField}": "<id-here>"
|
|
995
|
+
# # ...changed fields
|
|
996
|
+
# }
|
|
997
|
+
# }
|
|
998
|
+
`;
|
|
999
|
+
case 'delete':
|
|
1000
|
+
return `# Delete a ${e.Name}
|
|
1001
|
+
mutation Delete${typeName}($input: Delete${typeName}Input!) {
|
|
1002
|
+
Delete${typeName}(input: $input) {
|
|
1003
|
+
${pkField}
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
# Variables:
|
|
1008
|
+
# { "input": { "${pkField}": "<id-here>" } }
|
|
1009
|
+
`;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
/** Pick the first ~10 displayable fields, prioritizing primary key and common fields. */
|
|
1013
|
+
pickRepresentativeFields(e) {
|
|
1014
|
+
const fields = e.Fields ?? [];
|
|
1015
|
+
if (fields.length === 0)
|
|
1016
|
+
return ['ID'];
|
|
1017
|
+
const out = [];
|
|
1018
|
+
const seen = new Set();
|
|
1019
|
+
const push = (n) => { if (n && !seen.has(n)) {
|
|
1020
|
+
seen.add(n);
|
|
1021
|
+
out.push(n);
|
|
1022
|
+
} };
|
|
1023
|
+
for (const f of fields) {
|
|
1024
|
+
if (f.IsPrimaryKey)
|
|
1025
|
+
push(f.Name);
|
|
1026
|
+
}
|
|
1027
|
+
// Prefer common, lightweight fields
|
|
1028
|
+
for (const f of fields) {
|
|
1029
|
+
if (out.length >= 10)
|
|
1030
|
+
break;
|
|
1031
|
+
if (f.IsBinaryFieldType)
|
|
1032
|
+
continue;
|
|
1033
|
+
const lower = f.Name.toLowerCase();
|
|
1034
|
+
if (lower === 'name' || lower === 'description' || lower === 'status' || lower === 'type') {
|
|
1035
|
+
push(f.Name);
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
// Fill with the rest, skipping huge / private fields
|
|
1039
|
+
for (const f of fields) {
|
|
1040
|
+
if (out.length >= 10)
|
|
1041
|
+
break;
|
|
1042
|
+
if (f.IsBinaryFieldType)
|
|
1043
|
+
continue;
|
|
1044
|
+
if (this.isExpensiveField(f))
|
|
1045
|
+
continue;
|
|
1046
|
+
push(f.Name);
|
|
1047
|
+
}
|
|
1048
|
+
return out;
|
|
1049
|
+
}
|
|
1050
|
+
isExpensiveField(f) {
|
|
1051
|
+
const t = (f.Type ?? '').toLowerCase();
|
|
1052
|
+
if (t === 'nvarchar(max)' || t === 'varchar(max)' || t === 'text' || t === 'ntext')
|
|
1053
|
+
return true;
|
|
1054
|
+
if (t.includes('blob') || t.includes('binary') || t === 'image' || t === 'varbinary')
|
|
1055
|
+
return true;
|
|
1056
|
+
return false;
|
|
1057
|
+
}
|
|
1058
|
+
ClearEntityFilters() {
|
|
1059
|
+
this.EntitiesSearch = '';
|
|
1060
|
+
this.EntitySchemaFilter = '';
|
|
1061
|
+
}
|
|
1062
|
+
// ---------- Resizable splitters ----------
|
|
1063
|
+
OnSplitterDown(event, kind) {
|
|
1064
|
+
event.preventDefault();
|
|
1065
|
+
this.resizing = kind;
|
|
1066
|
+
document.addEventListener('mousemove', this.onMouseMove);
|
|
1067
|
+
document.addEventListener('mouseup', this.onMouseUp);
|
|
1068
|
+
document.body.style.cursor = kind === 'sidebar' ? 'col-resize' : 'row-resize';
|
|
1069
|
+
document.body.style.userSelect = 'none';
|
|
1070
|
+
}
|
|
1071
|
+
onMouseMove = (e) => {
|
|
1072
|
+
if (!this.resizing)
|
|
1073
|
+
return;
|
|
1074
|
+
const host = this.elementRef.nativeElement;
|
|
1075
|
+
if (this.resizing === 'sidebar') {
|
|
1076
|
+
const bodyRect = host.querySelector('.gc-body')?.getBoundingClientRect();
|
|
1077
|
+
if (!bodyRect)
|
|
1078
|
+
return;
|
|
1079
|
+
const x = e.clientX - bodyRect.left;
|
|
1080
|
+
this.SidebarWidthPx = Math.max(200, Math.min(560, x));
|
|
1081
|
+
}
|
|
1082
|
+
else if (this.resizing === 'editor') {
|
|
1083
|
+
const mainRect = host.querySelector('.gc-main')?.getBoundingClientRect();
|
|
1084
|
+
if (!mainRect)
|
|
1085
|
+
return;
|
|
1086
|
+
const yPct = ((e.clientY - mainRect.top) / mainRect.height) * 100;
|
|
1087
|
+
this.EditorHeightPct = Math.max(20, Math.min(80, yPct));
|
|
1088
|
+
}
|
|
1089
|
+
this.cdr.markForCheck();
|
|
1090
|
+
};
|
|
1091
|
+
onMouseUp = () => {
|
|
1092
|
+
if (!this.resizing)
|
|
1093
|
+
return;
|
|
1094
|
+
this.resizing = null;
|
|
1095
|
+
document.body.style.cursor = '';
|
|
1096
|
+
document.body.style.userSelect = '';
|
|
1097
|
+
this.detachResizeListeners();
|
|
1098
|
+
this.saveToStorage();
|
|
1099
|
+
};
|
|
1100
|
+
detachResizeListeners() {
|
|
1101
|
+
document.removeEventListener('mousemove', this.onMouseMove);
|
|
1102
|
+
document.removeEventListener('mouseup', this.onMouseUp);
|
|
1103
|
+
}
|
|
1104
|
+
get FormattedSize() {
|
|
1105
|
+
if (this.ResponseSizeBytes == null)
|
|
1106
|
+
return '';
|
|
1107
|
+
const b = this.ResponseSizeBytes;
|
|
1108
|
+
if (b < 1024)
|
|
1109
|
+
return `${b} B`;
|
|
1110
|
+
if (b < 1024 * 1024)
|
|
1111
|
+
return `${(b / 1024).toFixed(1)} KB`;
|
|
1112
|
+
return `${(b / 1024 / 1024).toFixed(2)} MB`;
|
|
1113
|
+
}
|
|
1114
|
+
TrackByHistory = (_i, h) => h.id;
|
|
1115
|
+
// ---------- private ----------
|
|
1116
|
+
recordHistory(query, variables, status, durationMs) {
|
|
1117
|
+
const entry = {
|
|
1118
|
+
id: `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
1119
|
+
query,
|
|
1120
|
+
variables,
|
|
1121
|
+
timestamp: new Date(),
|
|
1122
|
+
durationMs,
|
|
1123
|
+
status,
|
|
1124
|
+
favorite: false,
|
|
1125
|
+
label: this.deriveLabel(query)
|
|
1126
|
+
};
|
|
1127
|
+
// De-dupe: if last non-favorite entry has the same query+vars, replace it instead of stacking
|
|
1128
|
+
const last = this.History[0];
|
|
1129
|
+
if (last && !last.favorite && last.query === query && last.variables === variables) {
|
|
1130
|
+
this.History[0] = entry;
|
|
1131
|
+
}
|
|
1132
|
+
else {
|
|
1133
|
+
this.History = [entry, ...this.History];
|
|
1134
|
+
}
|
|
1135
|
+
// Trim history (preserve favorites)
|
|
1136
|
+
if (this.History.length > HISTORY_LIMIT) {
|
|
1137
|
+
const favorites = this.History.filter(h => h.favorite);
|
|
1138
|
+
const nonFavorites = this.History.filter(h => !h.favorite).slice(0, HISTORY_LIMIT - favorites.length);
|
|
1139
|
+
this.History = [...favorites, ...nonFavorites].sort((a, b) => b.timestamp.getTime() - a.timestamp.getTime());
|
|
1140
|
+
}
|
|
1141
|
+
this.saveToStorage();
|
|
1142
|
+
}
|
|
1143
|
+
deriveLabel(query) {
|
|
1144
|
+
const m = query.match(/(query|mutation|subscription)\s+(\w+)/);
|
|
1145
|
+
if (m)
|
|
1146
|
+
return `${m[1]} ${m[2]}`;
|
|
1147
|
+
const firstField = query.match(/[\{\s](\w+)\s*[\(\{]/);
|
|
1148
|
+
if (firstField)
|
|
1149
|
+
return firstField[1];
|
|
1150
|
+
return 'unnamed';
|
|
1151
|
+
}
|
|
1152
|
+
formatError(err) {
|
|
1153
|
+
if (err && typeof err === 'object') {
|
|
1154
|
+
const e = err;
|
|
1155
|
+
if (e.response?.errors) {
|
|
1156
|
+
return JSON.stringify({ errors: e.response.errors }, null, 2);
|
|
1157
|
+
}
|
|
1158
|
+
if (e.message) {
|
|
1159
|
+
return JSON.stringify({ error: e.message }, null, 2);
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
return JSON.stringify({ error: String(err) }, null, 2);
|
|
1163
|
+
}
|
|
1164
|
+
extractErrorSummary(err) {
|
|
1165
|
+
if (err && typeof err === 'object') {
|
|
1166
|
+
const e = err;
|
|
1167
|
+
if (e.response?.errors?.[0]?.message)
|
|
1168
|
+
return e.response.errors[0].message;
|
|
1169
|
+
if (e.message)
|
|
1170
|
+
return e.message;
|
|
1171
|
+
}
|
|
1172
|
+
return String(err);
|
|
1173
|
+
}
|
|
1174
|
+
loadFromStorage() {
|
|
1175
|
+
const parsed = DevToolsPrefs.Get(PREFS_KEY);
|
|
1176
|
+
if (!parsed)
|
|
1177
|
+
return;
|
|
1178
|
+
if (parsed.history) {
|
|
1179
|
+
this.History = parsed.history.map(h => ({ ...h, timestamp: new Date(h.timestamp) }));
|
|
1180
|
+
}
|
|
1181
|
+
if (parsed.query)
|
|
1182
|
+
this.Query = parsed.query;
|
|
1183
|
+
if (parsed.variables)
|
|
1184
|
+
this.Variables = parsed.variables;
|
|
1185
|
+
if (parsed.sidebarTab)
|
|
1186
|
+
this.SidebarTab = parsed.sidebarTab;
|
|
1187
|
+
if (parsed.schemaKindFilter)
|
|
1188
|
+
this.SchemaKindFilter = parsed.schemaKindFilter;
|
|
1189
|
+
if (parsed.entitiesSearch)
|
|
1190
|
+
this.EntitiesSearch = parsed.entitiesSearch;
|
|
1191
|
+
if (parsed.entitySchemaFilter)
|
|
1192
|
+
this.EntitySchemaFilter = parsed.entitySchemaFilter;
|
|
1193
|
+
if (typeof parsed.sidebarWidthPx === 'number')
|
|
1194
|
+
this.SidebarWidthPx = parsed.sidebarWidthPx;
|
|
1195
|
+
if (typeof parsed.editorHeightPct === 'number')
|
|
1196
|
+
this.EditorHeightPct = parsed.editorHeightPct;
|
|
1197
|
+
}
|
|
1198
|
+
saveToStorage() {
|
|
1199
|
+
DevToolsPrefs.Save(PREFS_KEY, {
|
|
1200
|
+
history: this.History,
|
|
1201
|
+
query: this.Query,
|
|
1202
|
+
variables: this.Variables,
|
|
1203
|
+
sidebarTab: this.SidebarTab,
|
|
1204
|
+
schemaKindFilter: this.SchemaKindFilter,
|
|
1205
|
+
entitiesSearch: this.EntitiesSearch,
|
|
1206
|
+
entitySchemaFilter: this.EntitySchemaFilter,
|
|
1207
|
+
sidebarWidthPx: this.SidebarWidthPx,
|
|
1208
|
+
editorHeightPct: this.EditorHeightPct
|
|
1209
|
+
});
|
|
1210
|
+
}
|
|
1211
|
+
// ---------- schema introspection ----------
|
|
1212
|
+
async loadSchema() {
|
|
1213
|
+
this.SchemaLoading = true;
|
|
1214
|
+
this.SchemaError = null;
|
|
1215
|
+
this.SchemaIntrospectionDisabled = false;
|
|
1216
|
+
this.cdr.markForCheck();
|
|
1217
|
+
try {
|
|
1218
|
+
const data = await GraphQLDataProvider.ExecuteGQL(INTROSPECTION_QUERY, null);
|
|
1219
|
+
const schema = data.__schema;
|
|
1220
|
+
if (!schema)
|
|
1221
|
+
throw new Error('No __schema in introspection response');
|
|
1222
|
+
const queryTypeName = schema.queryType?.name;
|
|
1223
|
+
const mutationTypeName = schema.mutationType?.name;
|
|
1224
|
+
const ops = [];
|
|
1225
|
+
for (const type of schema.types) {
|
|
1226
|
+
if (type.name === queryTypeName) {
|
|
1227
|
+
for (const f of type.fields ?? [])
|
|
1228
|
+
ops.push(this.toOperation(f, 'query'));
|
|
1229
|
+
}
|
|
1230
|
+
else if (type.name === mutationTypeName) {
|
|
1231
|
+
for (const f of type.fields ?? [])
|
|
1232
|
+
ops.push(this.toOperation(f, 'mutation'));
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
ops.sort((a, b) => {
|
|
1236
|
+
if (a.kind !== b.kind)
|
|
1237
|
+
return a.kind === 'query' ? -1 : 1;
|
|
1238
|
+
return a.name.localeCompare(b.name);
|
|
1239
|
+
});
|
|
1240
|
+
this.Operations = ops;
|
|
1241
|
+
this.schemaLoaded = true;
|
|
1242
|
+
}
|
|
1243
|
+
catch (err) {
|
|
1244
|
+
// Detect introspection-disabled (Apollo + most servers in production)
|
|
1245
|
+
const errStr = this.extractErrorSummary(err);
|
|
1246
|
+
const code = this.extractErrorCode(err);
|
|
1247
|
+
const looksDisabled = code === 'INTROSPECTION_DISABLED' ||
|
|
1248
|
+
code === 'GRAPHQL_VALIDATION_FAILED' ||
|
|
1249
|
+
/__schema|__type|introspection/i.test(errStr);
|
|
1250
|
+
if (looksDisabled) {
|
|
1251
|
+
this.SchemaIntrospectionDisabled = true;
|
|
1252
|
+
this.SchemaError = null;
|
|
1253
|
+
}
|
|
1254
|
+
else {
|
|
1255
|
+
// Trim huge stack-laden messages — show first 240 chars
|
|
1256
|
+
this.SchemaError = errStr.length > 240 ? errStr.slice(0, 240) + '…' : errStr;
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
finally {
|
|
1260
|
+
this.SchemaLoading = false;
|
|
1261
|
+
this.cdr.markForCheck();
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
extractErrorCode(err) {
|
|
1265
|
+
if (err && typeof err === 'object') {
|
|
1266
|
+
const e = err;
|
|
1267
|
+
return e.response?.errors?.[0]?.extensions?.code;
|
|
1268
|
+
}
|
|
1269
|
+
return undefined;
|
|
1270
|
+
}
|
|
1271
|
+
toOperation(field, kind) {
|
|
1272
|
+
const argSummary = field.args.length === 0
|
|
1273
|
+
? ''
|
|
1274
|
+
: field.args.map(a => `${a.name}: ${this.typeRefToString(a.type)}`).join(', ');
|
|
1275
|
+
return {
|
|
1276
|
+
name: field.name,
|
|
1277
|
+
kind,
|
|
1278
|
+
description: field.description ?? '',
|
|
1279
|
+
argSummary,
|
|
1280
|
+
returnSummary: this.typeRefToString(field.type),
|
|
1281
|
+
field
|
|
1282
|
+
};
|
|
1283
|
+
}
|
|
1284
|
+
typeRefToString(t) {
|
|
1285
|
+
if (!t)
|
|
1286
|
+
return '?';
|
|
1287
|
+
if (t.kind === 'NON_NULL')
|
|
1288
|
+
return this.typeRefToString(t.ofType) + '!';
|
|
1289
|
+
if (t.kind === 'LIST')
|
|
1290
|
+
return '[' + this.typeRefToString(t.ofType) + ']';
|
|
1291
|
+
return t.name ?? '?';
|
|
1292
|
+
}
|
|
1293
|
+
isObjectReturn(t) {
|
|
1294
|
+
let cur = t;
|
|
1295
|
+
while (cur && (cur.kind === 'NON_NULL' || cur.kind === 'LIST'))
|
|
1296
|
+
cur = cur.ofType;
|
|
1297
|
+
return !!cur && (cur.kind === 'OBJECT' || cur.kind === 'INTERFACE' || cur.kind === 'UNION');
|
|
1298
|
+
}
|
|
1299
|
+
buildOperationTemplate(op) {
|
|
1300
|
+
const opNameUpper = op.name.charAt(0).toUpperCase() + op.name.slice(1);
|
|
1301
|
+
const f = op.field;
|
|
1302
|
+
// Variable declarations + arg passing
|
|
1303
|
+
let varDecls = '';
|
|
1304
|
+
let argPass = '';
|
|
1305
|
+
if (f.args.length > 0) {
|
|
1306
|
+
varDecls = '(' + f.args.map(a => `$${a.name}: ${this.typeRefToString(a.type)}`).join(', ') + ')';
|
|
1307
|
+
argPass = '(' + f.args.map(a => `${a.name}: $${a.name}`).join(', ') + ')';
|
|
1308
|
+
}
|
|
1309
|
+
const isObject = this.isObjectReturn(f.type);
|
|
1310
|
+
const selection = isObject
|
|
1311
|
+
? ' {\n # TODO: select fields from ' + this.typeRefToString(f.type) + '\n }'
|
|
1312
|
+
: '';
|
|
1313
|
+
return `${op.kind} ${opNameUpper}${varDecls} {\n ${op.name}${argPass}${selection}\n}\n`;
|
|
1314
|
+
}
|
|
1315
|
+
static ɵfac = function GraphQLConsoleComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || GraphQLConsoleComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
1316
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GraphQLConsoleComponent, selectors: [["mj-graphql-console"]], viewQuery: function GraphQLConsoleComponent_Query(rf, ctx) { if (rf & 1) {
|
|
1317
|
+
i0.ɵɵviewQuery(_c0, 5);
|
|
1318
|
+
} if (rf & 2) {
|
|
1319
|
+
let _t;
|
|
1320
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.queryEditor = _t.first);
|
|
1321
|
+
} }, hostBindings: function GraphQLConsoleComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
1322
|
+
i0.ɵɵlistener("keydown", function GraphQLConsoleComponent_keydown_HostBindingHandler($event) { return ctx.OnHostKeydown($event); });
|
|
1323
|
+
} }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 55, vars: 18, consts: [[1, "mj-inspector", "mj-inspector--solo"], [1, "mj-inspector__header"], [1, "mj-inspector__header-icon"], [1, "fa-solid", "fa-code"], [1, "mj-inspector__header-title"], [1, "mj-inspector__header-sub"], [1, "mj-inspector__header-spacer"], [1, "mj-inspector__header-actions"], ["type", "button", "title", "Toggle history sidebar", 1, "mj-inspector__btn", 3, "click"], [1, "fa-solid", "fa-clock-rotate-left"], ["type", "button", "title", "Copy as cURL command", 1, "mj-inspector__btn", 3, "click"], [1, "fa-solid", "fa-terminal"], [1, "gc-body"], [1, "gc-main"], [1, "gc-editor-wrap"], [1, "gc-editor-head"], [1, "gc-editor-label"], [1, "gc-editor-hint"], ["type", "button", "title", "Tidy whitespace", 1, "gc-mini-btn", 3, "click"], [1, "fa-solid", "fa-broom"], ["type", "button", "title", "Clear editor", 1, "gc-mini-btn", "gc-mini-btn--danger", 3, "click"], [1, "fa-solid", "fa-eraser"], ["placeholder", "Enter your GraphQL query\u2026", 1, "gc-editor", 3, "ngModelChange", "ngModel", "language", "lineWrapping"], ["title", "Drag to resize editor / response", 1, "gc-splitter", "gc-splitter--horiz", 3, "mousedown"], [1, "gc-vars-wrap"], ["type", "button", 1, "gc-vars-toggle", 3, "click"], [1, "fa-solid", "fa-chevron-right", "gc-vars-chev"], [1, "gc-vars-pill"], ["placeholder", "{}", 1, "gc-editor", "gc-editor--vars", 3, "ngModel", "language", "lineWrapping"], [1, "gc-run-bar"], ["type", "button", 1, "gc-run-btn", 3, "click", "disabled"], [1, "gc-run-meta"], [1, "gc-spacer"], ["type", "button", 1, "mj-inspector__btn", 3, "mj-inspector__btn--success"], [1, "gc-response-wrap"], [1, "gc-response-head"], [1, "gc-error"], [1, "gc-empty"], [1, "gc-endpoint"], [1, "gc-sidebar"], [1, "gc-sidebar-tabs"], ["type", "button", 1, "gc-sidebar-tab", 3, "click"], [1, "fa-solid", "fa-table-list"], [1, "fa-solid", "fa-sitemap"], ["title", "Drag to resize sidebar", 1, "gc-splitter", "gc-splitter--vert", 3, "mousedown"], [1, "gc-history-head"], ["type", "button", "title", "Clear non-favorite history", 1, "gc-history-clear", 3, "click"], [1, "gc-history-empty"], [1, "gc-history-list"], [1, "fa-regular", "fa-circle-question"], [1, "fa-solid", "fa-star"], ["type", "button", 1, "gc-history-item", 3, "gc-history-item--error", "gc-history-item--fav"], ["type", "button", 1, "gc-history-item", 3, "click"], [1, "gc-history-item-head"], [1, "gc-history-status"], [1, "gc-history-label"], ["type", "button", 1, "gc-history-fav", 3, "click", "title"], ["type", "button", "title", "Remove from history", 1, "gc-history-del", 3, "click"], [1, "fa-solid", "fa-xmark"], [1, "gc-history-meta"], [1, "gc-ent-toolbar"], [1, "gc-ent-search-wrap"], [1, "fa-solid", "fa-search", "gc-ent-search-icon"], ["type", "search", "placeholder", "Search entities\u2026", 1, "gc-ent-search", 3, "ngModelChange", "ngModel"], [1, "gc-ent-schema", 3, "ngModel"], [1, "gc-ent-meta"], [1, "gc-ent-hint"], [1, "gc-ent-list"], [1, "gc-ent-card", 3, "gc-ent-card--expanded"], [1, "gc-ent-empty"], [1, "gc-ent-schema", 3, "ngModelChange", "ngModel"], ["value", ""], [3, "value"], [1, "gc-ent-card"], ["type", "button", 1, "gc-ent-row", 3, "click"], [1, "fa-solid", "fa-chevron-right", "gc-ent-chev"], [1, "gc-ent-info"], [1, "gc-ent-name"], [1, "gc-ent-meta-row"], [1, "gc-ent-typename"], [1, "gc-ent-schema-badge"], [1, "gc-ent-actions"], ["type", "button", "title", "Insert a Run View template (Shift-click to append)", 1, "gc-ent-op", "gc-ent-op--read", 3, "click"], [1, "fa-solid", "fa-magnifying-glass"], ["type", "button", "title", "Fetch a single record by ID (Shift-click to append)", 1, "gc-ent-op", "gc-ent-op--read", 3, "click"], [1, "fa-solid", "fa-fingerprint"], ["type", "button", "title", "Create a new record (Shift-click to append)", 1, "gc-ent-op", "gc-ent-op--write"], ["type", "button", "title", "Update an existing record (Shift-click to append)", 1, "gc-ent-op", "gc-ent-op--write"], ["type", "button", "title", "Delete a record (Shift-click to append)", 1, "gc-ent-op", "gc-ent-op--danger"], [1, "gc-ent-desc"], ["type", "button", "title", "Create a new record (Shift-click to append)", 1, "gc-ent-op", "gc-ent-op--write", 3, "click"], [1, "fa-solid", "fa-plus"], ["type", "button", "title", "Update an existing record (Shift-click to append)", 1, "gc-ent-op", "gc-ent-op--write", 3, "click"], [1, "fa-solid", "fa-pen"], ["type", "button", "title", "Delete a record (Shift-click to append)", 1, "gc-ent-op", "gc-ent-op--danger", 3, "click"], [1, "fa-solid", "fa-trash"], [1, "fa-solid", "fa-search"], ["type", "button", 1, "gc-ent-clear"], ["type", "button", 1, "gc-ent-clear", 3, "click"], [1, "gc-schema-toolbar"], [1, "gc-schema-search-wrap"], [1, "fa-solid", "fa-search", "gc-schema-search-icon"], ["type", "search", "placeholder", "Search operations\u2026", 1, "gc-schema-search", 3, "ngModelChange", "ngModel"], ["type", "button", "title", "Reload schema", 1, "gc-schema-reload", 3, "click", "disabled"], [1, "fa-solid"], [1, "gc-schema-kinds"], [1, "gc-schema-state"], [1, "gc-schema-state", "gc-schema-disabled"], [1, "gc-schema-state", "gc-schema-state--err"], [1, "gc-schema-list"], ["type", "button", 1, "gc-schema-kind", 3, "click"], ["type", "button", 1, "gc-schema-kind", "gc-schema-kind--query", 3, "click"], ["type", "button", 1, "gc-schema-kind", "gc-schema-kind--mutation", 3, "click"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-lock"], [1, "gc-schema-disabled-title"], [1, "gc-schema-disabled-body"], [1, "fa-solid", "fa-triangle-exclamation"], [1, "gc-schema-err-title"], [1, "gc-schema-err-body"], ["type", "button", 1, "gc-schema-op", 3, "gc-schema-op--mutation", "title"], ["type", "button", 1, "gc-schema-op", 3, "click", "title"], [1, "gc-schema-op-head"], [1, "gc-schema-op-kind"], [1, "gc-schema-op-name"], [1, "gc-schema-op-args"], [1, "gc-schema-op-return"], [1, "fa-solid", "fa-arrow-right"], [1, "gc-schema-op-desc"], ["placeholder", "{}", 1, "gc-editor", "gc-editor--vars", 3, "ngModelChange", "ngModel", "language", "lineWrapping"], [1, "fa-solid", "fa-play"], [1, "gc-status-badge", "gc-status-badge--ok"], [1, "gc-status-badge", "gc-status-badge--err"], [1, "gc-meta-pill"], [1, "fa-solid", "fa-circle-check"], [1, "fa-regular", "fa-clock"], [1, "fa-solid", "fa-database"], ["type", "button", 1, "mj-inspector__btn", 3, "click"], [1, "gc-error", "gc-error--inline"], [1, "gc-response"], [1, "fa-solid", "fa-arrow-up-from-bracket"]], template: function GraphQLConsoleComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1324
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2);
|
|
1325
|
+
i0.ɵɵelement(3, "i", 3);
|
|
1326
|
+
i0.ɵɵelementEnd();
|
|
1327
|
+
i0.ɵɵelementStart(4, "div")(5, "h3", 4);
|
|
1328
|
+
i0.ɵɵtext(6, "GraphQL Console");
|
|
1329
|
+
i0.ɵɵelementEnd();
|
|
1330
|
+
i0.ɵɵelementStart(7, "div", 5);
|
|
1331
|
+
i0.ɵɵconditionalCreate(8, GraphQLConsoleComponent_Conditional_8_Template, 3, 1)(9, GraphQLConsoleComponent_Conditional_9_Template, 1, 0);
|
|
1332
|
+
i0.ɵɵelementEnd()();
|
|
1333
|
+
i0.ɵɵelement(10, "span", 6);
|
|
1334
|
+
i0.ɵɵelementStart(11, "div", 7)(12, "button", 8);
|
|
1335
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Template_button_click_12_listener() { return ctx.ToggleHistoryPanel(); });
|
|
1336
|
+
i0.ɵɵelement(13, "i", 9);
|
|
1337
|
+
i0.ɵɵtext(14, " History ");
|
|
1338
|
+
i0.ɵɵelementEnd();
|
|
1339
|
+
i0.ɵɵelementStart(15, "button", 10);
|
|
1340
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Template_button_click_15_listener() { return ctx.OnCopyAsCurl(); });
|
|
1341
|
+
i0.ɵɵelement(16, "i", 11);
|
|
1342
|
+
i0.ɵɵtext(17, " Copy cURL ");
|
|
1343
|
+
i0.ɵɵelementEnd()()();
|
|
1344
|
+
i0.ɵɵelementStart(18, "div", 12);
|
|
1345
|
+
i0.ɵɵconditionalCreate(19, GraphQLConsoleComponent_Conditional_19_Template, 15, 9);
|
|
1346
|
+
i0.ɵɵelementStart(20, "div", 13)(21, "div", 14)(22, "div", 15)(23, "span", 16);
|
|
1347
|
+
i0.ɵɵtext(24, "Query");
|
|
1348
|
+
i0.ɵɵelementEnd();
|
|
1349
|
+
i0.ɵɵelementStart(25, "span", 17);
|
|
1350
|
+
i0.ɵɵtext(26, "\u2318/Ctrl+Enter to run \u00B7 Shift+click an entity/op to append");
|
|
1351
|
+
i0.ɵɵelementEnd();
|
|
1352
|
+
i0.ɵɵelementStart(27, "button", 18);
|
|
1353
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Template_button_click_27_listener() { return ctx.OnFormatQuery(); });
|
|
1354
|
+
i0.ɵɵelement(28, "i", 19);
|
|
1355
|
+
i0.ɵɵtext(29, " Tidy ");
|
|
1356
|
+
i0.ɵɵelementEnd();
|
|
1357
|
+
i0.ɵɵelementStart(30, "button", 20);
|
|
1358
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Template_button_click_30_listener() { return ctx.OnClearQuery(); });
|
|
1359
|
+
i0.ɵɵelement(31, "i", 21);
|
|
1360
|
+
i0.ɵɵtext(32, " Clear ");
|
|
1361
|
+
i0.ɵɵelementEnd()();
|
|
1362
|
+
i0.ɵɵelementStart(33, "mj-code-editor", 22);
|
|
1363
|
+
i0.ɵɵtwoWayListener("ngModelChange", function GraphQLConsoleComponent_Template_mj_code_editor_ngModelChange_33_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.Query, $event) || (ctx.Query = $event); return $event; });
|
|
1364
|
+
i0.ɵɵelementEnd()();
|
|
1365
|
+
i0.ɵɵelementStart(34, "div", 23);
|
|
1366
|
+
i0.ɵɵlistener("mousedown", function GraphQLConsoleComponent_Template_div_mousedown_34_listener($event) { return ctx.OnSplitterDown($event, "editor"); });
|
|
1367
|
+
i0.ɵɵelementEnd();
|
|
1368
|
+
i0.ɵɵelementStart(35, "div", 24)(36, "button", 25);
|
|
1369
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Template_button_click_36_listener() { return ctx.ToggleVariables(); });
|
|
1370
|
+
i0.ɵɵelement(37, "i", 26);
|
|
1371
|
+
i0.ɵɵtext(38, " Variables ");
|
|
1372
|
+
i0.ɵɵconditionalCreate(39, GraphQLConsoleComponent_Conditional_39_Template, 2, 0, "span", 27);
|
|
1373
|
+
i0.ɵɵelementEnd();
|
|
1374
|
+
i0.ɵɵconditionalCreate(40, GraphQLConsoleComponent_Conditional_40_Template, 1, 3, "mj-code-editor", 28);
|
|
1375
|
+
i0.ɵɵelementEnd();
|
|
1376
|
+
i0.ɵɵelementStart(41, "div", 29)(42, "button", 30);
|
|
1377
|
+
i0.ɵɵlistener("click", function GraphQLConsoleComponent_Template_button_click_42_listener() { return ctx.OnRun(); });
|
|
1378
|
+
i0.ɵɵconditionalCreate(43, GraphQLConsoleComponent_Conditional_43_Template, 2, 0)(44, GraphQLConsoleComponent_Conditional_44_Template, 2, 0);
|
|
1379
|
+
i0.ɵɵelementEnd();
|
|
1380
|
+
i0.ɵɵconditionalCreate(45, GraphQLConsoleComponent_Conditional_45_Template, 5, 3, "div", 31);
|
|
1381
|
+
i0.ɵɵelement(46, "span", 32);
|
|
1382
|
+
i0.ɵɵconditionalCreate(47, GraphQLConsoleComponent_Conditional_47_Template, 3, 7, "button", 33);
|
|
1383
|
+
i0.ɵɵelementEnd();
|
|
1384
|
+
i0.ɵɵelementStart(48, "div", 34)(49, "div", 35)(50, "span", 16);
|
|
1385
|
+
i0.ɵɵtext(51, "Response");
|
|
1386
|
+
i0.ɵɵelementEnd()();
|
|
1387
|
+
i0.ɵɵconditionalCreate(52, GraphQLConsoleComponent_Conditional_52_Template, 4, 1, "div", 36)(53, GraphQLConsoleComponent_Conditional_53_Template, 4, 2)(54, GraphQLConsoleComponent_Conditional_54_Template, 4, 0, "div", 37);
|
|
1388
|
+
i0.ɵɵelementEnd()()()();
|
|
1389
|
+
} if (rf & 2) {
|
|
1390
|
+
i0.ɵɵadvance(8);
|
|
1391
|
+
i0.ɵɵconditional(ctx.ApiUrl ? 8 : 9);
|
|
1392
|
+
i0.ɵɵadvance(4);
|
|
1393
|
+
i0.ɵɵclassProp("gc-toggle--active", ctx.ShowHistory);
|
|
1394
|
+
i0.ɵɵadvance(7);
|
|
1395
|
+
i0.ɵɵconditional(ctx.ShowHistory ? 19 : -1);
|
|
1396
|
+
i0.ɵɵadvance(2);
|
|
1397
|
+
i0.ɵɵstyleProp("flex", "0 0 " + ctx.EditorHeightPct + "%");
|
|
1398
|
+
i0.ɵɵadvance(12);
|
|
1399
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx.Query);
|
|
1400
|
+
i0.ɵɵproperty("language", "graphql")("lineWrapping", true);
|
|
1401
|
+
i0.ɵɵadvance(4);
|
|
1402
|
+
i0.ɵɵclassProp("gc-vars-chev--down", ctx.ShowVariables);
|
|
1403
|
+
i0.ɵɵadvance(2);
|
|
1404
|
+
i0.ɵɵconditional(ctx.Variables && ctx.Variables.trim() !== "{}" && ctx.Variables.trim() !== "" ? 39 : -1);
|
|
1405
|
+
i0.ɵɵadvance();
|
|
1406
|
+
i0.ɵɵconditional(ctx.ShowVariables ? 40 : -1);
|
|
1407
|
+
i0.ɵɵadvance(2);
|
|
1408
|
+
i0.ɵɵproperty("disabled", ctx.Running);
|
|
1409
|
+
i0.ɵɵadvance();
|
|
1410
|
+
i0.ɵɵconditional(ctx.Running ? 43 : 44);
|
|
1411
|
+
i0.ɵɵadvance(2);
|
|
1412
|
+
i0.ɵɵconditional(ctx.ResponseStatus !== "idle" ? 45 : -1);
|
|
1413
|
+
i0.ɵɵadvance(2);
|
|
1414
|
+
i0.ɵɵconditional(ctx.ResponseJson ? 47 : -1);
|
|
1415
|
+
i0.ɵɵadvance(5);
|
|
1416
|
+
i0.ɵɵconditional(ctx.ErrorMessage && !ctx.ResponseJson ? 52 : ctx.ResponseJson ? 53 : 54);
|
|
1417
|
+
} }, dependencies: [i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.DefaultValueAccessor, i1.SelectControlValueAccessor, i1.NgControlStatus, i1.NgModel, i2.CodeEditorComponent, i3.DatePipe], styles: ["[_nghost-%COMP%] { display: block; height: 100%; }\n\n.mj-inspector[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n background: var(--mj-bg-page);\n color: var(--mj-text-primary);\n font-family: inherit;\n}\n\n\n\n.mj-inspector__header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 14px;\n padding: 14px 20px;\n border-bottom: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n flex-shrink: 0;\n}\n.mj-inspector__header-icon[_ngcontent-%COMP%] {\n width: 36px; height: 36px;\n border-radius: 9px;\n background: linear-gradient(135deg, #264FAF 0%, #0076b6 100%);\n color: white;\n display: flex; align-items: center; justify-content: center;\n font-size: 15px;\n flex-shrink: 0;\n}\n.mj-inspector__header-title[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--mj-text-primary);\n letter-spacing: -0.2px;\n}\n.mj-inspector__header-sub[_ngcontent-%COMP%] {\n font-size: 11.5px;\n color: var(--mj-text-muted);\n margin-top: 2px;\n}\n.mj-inspector__header-spacer[_ngcontent-%COMP%] { flex: 1; }\n.mj-inspector__header-actions[_ngcontent-%COMP%] {\n display: flex; gap: 6px;\n}\n.mj-inspector__btn[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 7px 12px;\n border-radius: 7px;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n font-family: inherit;\n transition: all 0.15s;\n}\n.mj-inspector__btn[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n border-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary);\n}\n.mj-inspector__btn--success[_ngcontent-%COMP%] {\n color: var(--mj-status-success);\n border-color: color-mix(in srgb, var(--mj-status-success) 30%, var(--mj-border-default));\n}\n\n\n\n.mj-inspector__body[_ngcontent-%COMP%] {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n.mj-inspector__sidebar[_ngcontent-%COMP%] {\n width: 220px;\n border-right: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n overflow-y: auto;\n flex-shrink: 0;\n padding: 8px;\n}\n.mj-inspector__nav-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 10px 12px;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.12s;\n margin-bottom: 2px;\n font-family: inherit;\n border: none;\n background: transparent;\n color: var(--mj-text-secondary);\n text-align: left;\n width: 100%;\n}\n.mj-inspector__nav-item[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n.mj-inspector__nav-item--active[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n color: var(--mj-brand-primary);\n}\n.mj-inspector__nav-item--active[_ngcontent-%COMP%]:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 14%, transparent);\n}\n.mj-inspector__nav-icon[_ngcontent-%COMP%] {\n width: 18px;\n text-align: center;\n font-size: 13px;\n margin-top: 1px;\n flex-shrink: 0;\n color: inherit;\n}\n.mj-inspector__nav-text[_ngcontent-%COMP%] { flex: 1; min-width: 0; }\n.mj-inspector__nav-label[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 500;\n line-height: 1.2;\n}\n.mj-inspector__nav-desc[_ngcontent-%COMP%] {\n font-size: 11px;\n color: var(--mj-text-muted);\n margin-top: 3px;\n line-height: 1.3;\n}\n.mj-inspector__nav-item--active[_ngcontent-%COMP%] .mj-inspector__nav-desc[_ngcontent-%COMP%] {\n color: color-mix(in srgb, var(--mj-brand-primary) 70%, var(--mj-text-muted));\n}\n\n\n\n.mj-inspector__content[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n background: var(--mj-bg-page);\n}\n.mj-inspector__content-head[_ngcontent-%COMP%] {\n padding: 12px 20px;\n border-bottom: 1px solid var(--mj-border-subtle);\n display: flex;\n align-items: center;\n justify-content: space-between;\n background: var(--mj-bg-surface-card);\n}\n.mj-inspector__content-title[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n.mj-inspector__content-meta[_ngcontent-%COMP%] {\n font-size: 11px;\n color: var(--mj-text-muted);\n}\n.mj-inspector__editor[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n.mj-inspector__editor[_ngcontent-%COMP%] mj-code-editor[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 0;\n display: block;\n}\n\n\n\n.mj-inspector__empty[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-muted);\n font-size: 13px;\n}\n\n@media (max-width: 700px) {\n .mj-inspector__body[_ngcontent-%COMP%] { flex-direction: column; }\n .mj-inspector__sidebar[_ngcontent-%COMP%] {\n width: 100%;\n height: auto;\n max-height: 200px;\n border-right: none;\n border-bottom: 1px solid var(--mj-border-default);\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n }\n .mj-inspector__nav-item[_ngcontent-%COMP%] { flex: 1 1 calc(50% - 8px); margin-bottom: 0; }\n .mj-inspector__nav-desc[_ngcontent-%COMP%] { display: none; }\n .mj-inspector__header[_ngcontent-%COMP%] { padding: 12px 14px; gap: 10px; }\n}", ".mj-inspector--solo[_ngcontent-%COMP%] { background: var(--mj-bg-page); }\n.gc-toggle--active[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, transparent) !important;\n color: var(--mj-brand-primary) !important;\n border-color: var(--mj-brand-primary) !important;\n}\n.gc-endpoint[_ngcontent-%COMP%] {\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n font-size: 11px;\n background: var(--mj-bg-surface-sunken);\n padding: 1px 6px;\n border-radius: 4px;\n color: var(--mj-text-secondary);\n}\n\n.gc-body[_ngcontent-%COMP%] {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n\n\n\n.gc-sidebar[_ngcontent-%COMP%] {\n flex-shrink: 0;\n background: var(--mj-bg-surface);\n display: flex;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n min-width: 200px;\n max-width: 560px;\n}\n\n\n\n.gc-splitter[_ngcontent-%COMP%] {\n flex-shrink: 0;\n background: var(--mj-border-subtle);\n transition: background 0.15s;\n position: relative;\n}\n.gc-splitter[_ngcontent-%COMP%]:hover { background: var(--mj-brand-primary); }\n.gc-splitter[_ngcontent-%COMP%]:active { background: color-mix(in srgb, var(--mj-brand-primary) 80%, black); }\n.gc-splitter--vert[_ngcontent-%COMP%] {\n width: 4px;\n cursor: col-resize;\n}\n.gc-splitter--horiz[_ngcontent-%COMP%] {\n height: 4px;\n cursor: row-resize;\n}\n\n\n.gc-splitter[_ngcontent-%COMP%]::before {\n content: '';\n position: absolute;\n inset: -3px;\n}\n.gc-sidebar-tabs[_ngcontent-%COMP%] {\n display: flex;\n border-bottom: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n flex-shrink: 0;\n}\n.gc-sidebar-tab[_ngcontent-%COMP%] {\n flex: 1;\n padding: 10px 8px;\n background: transparent;\n border: none;\n color: var(--mj-text-muted);\n font-size: 11.5px;\n font-weight: 600;\n cursor: pointer;\n font-family: inherit;\n border-bottom: 2px solid transparent;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n transition: all 0.15s;\n}\n.gc-sidebar-tab[_ngcontent-%COMP%]:hover { color: var(--mj-text-primary); }\n.gc-sidebar-tab--active[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n border-bottom-color: var(--mj-brand-primary);\n background: var(--mj-bg-surface);\n}\n\n\n\n.gc-history[_ngcontent-%COMP%] {\n width: 280px;\n flex-shrink: 0;\n border-right: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n display: flex;\n flex-direction: column;\n}\n.gc-history-head[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 14px;\n border-bottom: 1px solid var(--mj-border-subtle);\n font-size: 10.5px;\n font-weight: 700;\n color: var(--mj-text-muted);\n text-transform: uppercase;\n letter-spacing: 0.5px;\n background: var(--mj-bg-surface-card);\n}\n.gc-history-clear[_ngcontent-%COMP%] {\n background: transparent;\n border: none;\n color: var(--mj-text-muted);\n cursor: pointer;\n width: 24px;\n height: 24px;\n border-radius: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n}\n.gc-history-clear[_ngcontent-%COMP%]:hover { background: var(--mj-bg-surface-hover); color: var(--mj-text-primary); }\n\n.gc-history-empty[_ngcontent-%COMP%] {\n padding: 20px 16px;\n color: var(--mj-text-muted);\n font-size: 12px;\n text-align: center;\n line-height: 1.5;\n}\n.gc-history-empty[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { display: block; font-size: 22px; margin-bottom: 8px; opacity: 0.5; }\n\n.gc-history-list[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n padding: 4px;\n}\n.gc-history-item[_ngcontent-%COMP%] {\n width: 100%;\n text-align: left;\n background: transparent;\n border: 1px solid transparent;\n padding: 8px 10px;\n border-radius: 7px;\n cursor: pointer;\n margin-bottom: 2px;\n font-family: inherit;\n transition: background 0.12s, border-color 0.12s;\n}\n.gc-history-item[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n border-color: var(--mj-border-subtle);\n}\n.gc-history-item--fav[_ngcontent-%COMP%] {\n border-color: color-mix(in srgb, var(--mj-status-warning) 30%, transparent);\n}\n\n.gc-history-item-head[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.gc-history-status[_ngcontent-%COMP%] {\n font-size: 11px;\n flex-shrink: 0;\n}\n.gc-status--ok[_ngcontent-%COMP%] { color: var(--mj-status-success); }\n.gc-status--err[_ngcontent-%COMP%] { color: var(--mj-status-error); }\n\n.gc-history-label[_ngcontent-%COMP%] {\n flex: 1;\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n font-size: 11.5px;\n font-weight: 500;\n color: var(--mj-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.gc-history-fav[_ngcontent-%COMP%], \n.gc-history-del[_ngcontent-%COMP%] {\n background: transparent;\n border: none;\n color: var(--mj-text-muted);\n cursor: pointer;\n width: 22px;\n height: 22px;\n border-radius: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n flex-shrink: 0;\n opacity: 0;\n transition: all 0.12s;\n}\n.gc-history-item[_ngcontent-%COMP%]:hover .gc-history-fav[_ngcontent-%COMP%], \n.gc-history-item[_ngcontent-%COMP%]:hover .gc-history-del[_ngcontent-%COMP%] { opacity: 1; }\n.gc-history-item--fav[_ngcontent-%COMP%] .gc-history-fav[_ngcontent-%COMP%] { opacity: 1; color: var(--mj-status-warning); }\n.gc-history-fav[_ngcontent-%COMP%]:hover { color: var(--mj-status-warning); background: color-mix(in srgb, var(--mj-status-warning) 10%, transparent); }\n.gc-history-del[_ngcontent-%COMP%]:hover { color: var(--mj-status-error); background: color-mix(in srgb, var(--mj-status-error) 10%, transparent); }\n\n.gc-history-meta[_ngcontent-%COMP%] {\n margin-top: 3px;\n margin-left: 18px;\n display: flex;\n gap: 4px;\n font-size: 10.5px;\n color: var(--mj-text-muted);\n}\n\n\n\n.gc-ent-toolbar[_ngcontent-%COMP%] {\n display: flex;\n gap: 6px;\n padding: 8px;\n border-bottom: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n flex-shrink: 0;\n}\n.gc-ent-search-wrap[_ngcontent-%COMP%] {\n position: relative;\n flex: 1;\n min-width: 0;\n}\n.gc-ent-search-icon[_ngcontent-%COMP%] {\n position: absolute;\n left: 9px;\n top: 50%;\n transform: translateY(-50%);\n color: var(--mj-text-muted);\n font-size: 11px;\n pointer-events: none;\n}\n.gc-ent-search[_ngcontent-%COMP%] {\n width: 100%;\n padding: 6px 10px 6px 26px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font-size: 12px;\n font-family: inherit;\n}\n.gc-ent-search[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n}\n.gc-ent-schema[_ngcontent-%COMP%] {\n padding: 5px 8px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font-size: 11.5px;\n font-family: inherit;\n cursor: pointer;\n max-width: 130px;\n}\n\n.gc-ent-meta[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 6px 12px;\n border-bottom: 1px solid var(--mj-border-subtle);\n font-size: 10.5px;\n color: var(--mj-text-muted);\n background: var(--mj-bg-surface);\n flex-shrink: 0;\n}\n.gc-ent-hint[_ngcontent-%COMP%] { font-style: italic; }\n\n.gc-ent-list[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n padding: 6px;\n}\n.gc-ent-card[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 7px;\n margin-bottom: 4px;\n overflow: hidden;\n transition: border-color 0.12s, box-shadow 0.15s;\n}\n.gc-ent-card[_ngcontent-%COMP%]:hover { border-color: var(--mj-border-default); }\n.gc-ent-card--expanded[_ngcontent-%COMP%] {\n border-color: var(--mj-brand-primary);\n box-shadow: 0 2px 8px color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n}\n.gc-ent-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 8px 10px;\n background: transparent;\n border: none;\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n}\n.gc-ent-row[_ngcontent-%COMP%]:hover { background: var(--mj-bg-surface-hover); }\n.gc-ent-card--expanded[_ngcontent-%COMP%] .gc-ent-row[_ngcontent-%COMP%] { background: color-mix(in srgb, var(--mj-brand-primary) 5%, transparent); }\n.gc-ent-chev[_ngcontent-%COMP%] {\n color: var(--mj-text-muted);\n font-size: 10px;\n width: 12px;\n flex-shrink: 0;\n transition: transform 0.15s;\n}\n.gc-ent-chev--down[_ngcontent-%COMP%] { transform: rotate(90deg); }\n.gc-ent-info[_ngcontent-%COMP%] { flex: 1; min-width: 0; }\n.gc-ent-name[_ngcontent-%COMP%] {\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.gc-ent-meta-row[_ngcontent-%COMP%] {\n display: flex;\n gap: 6px;\n margin-top: 2px;\n align-items: center;\n}\n.gc-ent-typename[_ngcontent-%COMP%] {\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n font-size: 10.5px;\n color: var(--mj-text-muted);\n background: var(--mj-bg-surface-sunken);\n padding: 1px 6px;\n border-radius: 4px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.gc-ent-schema-badge[_ngcontent-%COMP%] {\n font-size: 10px;\n color: var(--mj-text-secondary);\n background: var(--mj-bg-surface-sunken);\n padding: 1px 6px;\n border-radius: 4px;\n text-transform: uppercase;\n font-weight: 600;\n letter-spacing: 0.4px;\n}\n\n.gc-ent-actions[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n padding: 6px 10px 8px 30px;\n border-top: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n}\n.gc-ent-op[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 5px 9px;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n font-size: 11px;\n font-weight: 500;\n cursor: pointer;\n font-family: inherit;\n transition: all 0.12s;\n}\n.gc-ent-op[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n border-color: var(--mj-border-strong);\n}\n.gc-ent-op--read[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary);\n}\n.gc-ent-op--write[_ngcontent-%COMP%]:hover {\n border-color: color-mix(in srgb, var(--mj-status-warning) 50%, var(--mj-border-strong));\n color: color-mix(in srgb, var(--mj-status-warning) 70%, var(--mj-text-primary));\n}\n.gc-ent-op--danger[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-status-error);\n color: var(--mj-status-error);\n background: color-mix(in srgb, var(--mj-status-error) 6%, transparent);\n}\n.gc-ent-desc[_ngcontent-%COMP%] {\n padding: 4px 10px 8px 30px;\n font-size: 11px;\n color: var(--mj-text-muted);\n line-height: 1.45;\n}\n\n.gc-ent-empty[_ngcontent-%COMP%] {\n padding: 30px 18px;\n color: var(--mj-text-muted);\n text-align: center;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n}\n.gc-ent-empty[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 18px; opacity: 0.5; }\n.gc-ent-clear[_ngcontent-%COMP%] {\n background: transparent;\n border: 1px solid var(--mj-border-default);\n color: var(--mj-text-secondary);\n padding: 5px 12px;\n border-radius: 6px;\n font-size: 11.5px;\n cursor: pointer;\n font-family: inherit;\n margin-top: 4px;\n}\n.gc-ent-clear[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n border-color: var(--mj-brand-primary);\n}\n\n\n\n.gc-schema-toolbar[_ngcontent-%COMP%] {\n display: flex;\n gap: 6px;\n padding: 8px;\n border-bottom: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n flex-shrink: 0;\n}\n.gc-schema-search-wrap[_ngcontent-%COMP%] {\n position: relative;\n flex: 1;\n}\n.gc-schema-search-icon[_ngcontent-%COMP%] {\n position: absolute;\n left: 9px;\n top: 50%;\n transform: translateY(-50%);\n color: var(--mj-text-muted);\n font-size: 11px;\n pointer-events: none;\n}\n.gc-schema-search[_ngcontent-%COMP%] {\n width: 100%;\n padding: 6px 10px 6px 26px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font-size: 12px;\n font-family: inherit;\n}\n.gc-schema-search[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n}\n.gc-schema-reload[_ngcontent-%COMP%] {\n background: transparent;\n border: 1px solid var(--mj-border-default);\n color: var(--mj-text-muted);\n cursor: pointer;\n width: 30px;\n height: 30px;\n border-radius: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n flex-shrink: 0;\n}\n.gc-schema-reload[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n border-color: var(--mj-border-strong);\n}\n\n.gc-schema-kinds[_ngcontent-%COMP%] {\n display: flex;\n gap: 4px;\n padding: 6px 8px;\n border-bottom: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface);\n flex-shrink: 0;\n}\n.gc-schema-kind[_ngcontent-%COMP%] {\n flex: 1;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n color: var(--mj-text-secondary);\n padding: 5px 6px;\n border-radius: 6px;\n font-size: 11px;\n font-weight: 600;\n cursor: pointer;\n font-family: inherit;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n transition: all 0.12s;\n}\n.gc-schema-kind[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n.gc-schema-kind[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-subtle);\n padding: 0 6px;\n border-radius: 100px;\n font-size: 10px;\n color: var(--mj-text-muted);\n}\n.gc-schema-kind--active[_ngcontent-%COMP%] {\n background: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n color: white;\n}\n.gc-schema-kind--active[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n background: rgba(255, 255, 255, 0.25);\n border-color: transparent;\n color: white;\n}\n\n.gc-schema-state[_ngcontent-%COMP%] {\n padding: 28px 18px;\n text-align: center;\n color: var(--mj-text-muted);\n font-size: 12px;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n line-height: 1.5;\n}\n.gc-schema-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 22px; opacity: 0.5; }\n\n.gc-schema-disabled[_ngcontent-%COMP%] {\n color: var(--mj-text-secondary);\n}\n.gc-schema-disabled[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-status-warning);\n opacity: 0.85;\n font-size: 24px;\n margin-bottom: 4px;\n}\n.gc-schema-disabled-title[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n.gc-schema-disabled-body[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--mj-text-muted);\n max-width: 240px;\n}\n\n.gc-schema-state--err[_ngcontent-%COMP%] {\n color: var(--mj-status-error);\n align-items: stretch;\n text-align: left;\n}\n.gc-schema-state--err[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { color: var(--mj-status-error); opacity: 0.9; align-self: center; }\n.gc-schema-err-title[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 600;\n text-align: center;\n color: var(--mj-status-error);\n}\n.gc-schema-err-body[_ngcontent-%COMP%] {\n font-size: 11.5px;\n color: var(--mj-text-secondary);\n background: var(--mj-bg-surface-sunken);\n padding: 8px 10px;\n border-radius: 6px;\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n word-break: break-word;\n max-height: 160px;\n overflow-y: auto;\n}\n\n.gc-schema-list[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n padding: 6px;\n}\n.gc-schema-op[_ngcontent-%COMP%] {\n width: 100%;\n text-align: left;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 7px;\n padding: 8px 10px;\n margin-bottom: 4px;\n cursor: pointer;\n font-family: inherit;\n transition: all 0.12s;\n}\n.gc-schema-op[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n border-color: var(--mj-brand-primary);\n transform: translateX(2px);\n}\n.gc-schema-op-head[_ngcontent-%COMP%] {\n display: flex;\n align-items: baseline;\n gap: 8px;\n margin-bottom: 3px;\n}\n.gc-schema-op-kind[_ngcontent-%COMP%] {\n font-size: 9.5px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n padding: 1px 6px;\n border-radius: 4px;\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n color: var(--mj-brand-primary);\n}\n.gc-schema-op--mutation[_ngcontent-%COMP%] .gc-schema-op-kind[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-status-warning) 14%, transparent);\n color: color-mix(in srgb, var(--mj-status-warning) 70%, var(--mj-text-primary));\n}\n.gc-schema-op-name[_ngcontent-%COMP%] {\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-primary);\n word-break: break-all;\n}\n.gc-schema-op-args[_ngcontent-%COMP%], \n.gc-schema-op-return[_ngcontent-%COMP%] {\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n font-size: 10.5px;\n color: var(--mj-text-muted);\n line-height: 1.4;\n word-break: break-word;\n}\n.gc-schema-op-return[_ngcontent-%COMP%] {\n color: var(--mj-text-secondary);\n margin-top: 2px;\n}\n.gc-schema-op-return[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 9px; margin-right: 3px; opacity: 0.6; }\n.gc-schema-op-desc[_ngcontent-%COMP%] {\n font-size: 11px;\n color: var(--mj-text-muted);\n margin-top: 5px;\n line-height: 1.4;\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n\n\n.gc-main[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n}\n\n.gc-editor-wrap[_ngcontent-%COMP%], \n.gc-vars-wrap[_ngcontent-%COMP%], \n.gc-response-wrap[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n background: var(--mj-bg-surface);\n}\n.gc-editor-wrap[_ngcontent-%COMP%] {\n border-bottom: 1px solid var(--mj-border-subtle);\n flex: 1;\n min-height: 200px;\n}\n.gc-response-wrap[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 200px;\n background: var(--mj-bg-page);\n}\n\n.gc-editor-head[_ngcontent-%COMP%], \n.gc-response-head[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 16px;\n background: var(--mj-bg-surface-card);\n border-bottom: 1px solid var(--mj-border-subtle);\n font-size: 10.5px;\n font-weight: 700;\n color: var(--mj-text-muted);\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n.gc-editor-label[_ngcontent-%COMP%] { flex: 0 0 auto; }\n.gc-editor-hint[_ngcontent-%COMP%] {\n font-weight: 500;\n text-transform: none;\n letter-spacing: normal;\n color: var(--mj-text-muted);\n font-size: 11px;\n}\n.gc-mini-btn[_ngcontent-%COMP%] {\n margin-left: auto;\n background: transparent;\n border: 1px solid var(--mj-border-subtle);\n color: var(--mj-text-secondary);\n padding: 4px 10px;\n border-radius: 5px;\n font-size: 11px;\n cursor: pointer;\n font-family: inherit;\n text-transform: none;\n letter-spacing: normal;\n font-weight: 500;\n}\n.gc-mini-btn[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n border-color: var(--mj-border-default);\n}\n.gc-mini-btn--danger[_ngcontent-%COMP%]:hover {\n background: color-mix(in srgb, var(--mj-status-error) 8%, transparent);\n color: var(--mj-status-error);\n border-color: color-mix(in srgb, var(--mj-status-error) 40%, var(--mj-border-default));\n}\n\n\n\n\nmj-code-editor.gc-editor[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 0;\n width: 100%;\n display: block;\n background: var(--mj-bg-surface);\n overflow: hidden;\n}\nmj-code-editor.gc-editor[_ngcontent-%COMP%] .cm-editor {\n height: 100%;\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n font-size: 12.5px;\n}\nmj-code-editor.gc-editor[_ngcontent-%COMP%] .cm-scroller {\n line-height: 1.55;\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n}\nmj-code-editor.gc-editor--vars[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken);\n flex: 0 0 auto;\n min-height: 80px;\n max-height: 160px;\n}\nmj-code-editor.gc-editor--vars[_ngcontent-%COMP%] .cm-editor {\n background: var(--mj-bg-surface-sunken);\n}\n\n\n\n.gc-vars-wrap[_ngcontent-%COMP%] {\n border-bottom: 1px solid var(--mj-border-subtle);\n flex-shrink: 0;\n}\n.gc-vars-toggle[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n background: var(--mj-bg-surface-card);\n border: none;\n padding: 7px 16px;\n cursor: pointer;\n font-size: 11.5px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n font-family: inherit;\n text-align: left;\n transition: background 0.12s;\n}\n.gc-vars-toggle[_ngcontent-%COMP%]:hover { background: var(--mj-bg-surface-hover); color: var(--mj-text-primary); }\n.gc-vars-chev[_ngcontent-%COMP%] {\n color: var(--mj-text-muted);\n font-size: 10px;\n transition: transform 0.15s;\n}\n.gc-vars-chev--down[_ngcontent-%COMP%] { transform: rotate(90deg); }\n.gc-vars-pill[_ngcontent-%COMP%] {\n margin-left: auto;\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n color: var(--mj-brand-primary);\n font-size: 10px;\n padding: 1px 8px;\n border-radius: 100px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.4px;\n}\n\n\n\n.gc-run-bar[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 10px 16px;\n background: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-subtle);\n flex-shrink: 0;\n}\n.gc-run-btn[_ngcontent-%COMP%] {\n background: var(--mj-brand-primary);\n color: white;\n border: 1px solid var(--mj-brand-primary);\n padding: 8px 18px;\n border-radius: 8px;\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n font-family: inherit;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n box-shadow: 0 2px 6px color-mix(in srgb, var(--mj-brand-primary) 30%, transparent);\n transition: background 0.15s, transform 0.1s;\n}\n.gc-run-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-brand-primary) 88%, black);\n border-color: color-mix(in srgb, var(--mj-brand-primary) 88%, black);\n}\n.gc-run-btn[_ngcontent-%COMP%]:active:not(:disabled) { transform: scale(0.98); }\n.gc-run-btn[_ngcontent-%COMP%]:disabled {\n background: var(--mj-bg-surface-sunken);\n border-color: var(--mj-border-default);\n color: var(--mj-text-muted);\n box-shadow: none;\n cursor: wait;\n}\n\n.gc-run-meta[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.gc-status-badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 4px 10px;\n border-radius: 100px;\n font-size: 11px;\n font-weight: 600;\n}\n.gc-status-badge--ok[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-status-success) 14%, transparent);\n color: color-mix(in srgb, var(--mj-status-success) 70%, var(--mj-text-primary));\n}\n.gc-status-badge--err[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-status-error) 14%, transparent);\n color: color-mix(in srgb, var(--mj-status-error) 70%, var(--mj-text-primary));\n}\n.gc-meta-pill[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 11px;\n color: var(--mj-text-muted);\n background: var(--mj-bg-surface-sunken);\n padding: 3px 9px;\n border-radius: 100px;\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n}\n.gc-spacer[_ngcontent-%COMP%] { flex: 1; }\n\n\n\n.gc-response[_ngcontent-%COMP%] {\n margin: 0;\n flex: 1;\n overflow: auto;\n padding: 14px 16px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n font-size: 12px;\n line-height: 1.55;\n}\n.gc-response[_ngcontent-%COMP%] code[_ngcontent-%COMP%] { white-space: pre-wrap; word-break: break-word; }\n\n.gc-error[_ngcontent-%COMP%] {\n margin: 12px 16px;\n padding: 10px 14px;\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n border: 1px solid color-mix(in srgb, var(--mj-status-error) 30%, var(--mj-border-subtle));\n border-radius: 8px;\n color: color-mix(in srgb, var(--mj-status-error) 70%, var(--mj-text-primary));\n font-size: 12.5px;\n display: flex;\n align-items: flex-start;\n gap: 10px;\n}\n.gc-error[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { margin-top: 2px; flex-shrink: 0; }\n.gc-error--inline[_ngcontent-%COMP%] { margin-bottom: 0; }\n\n.gc-empty[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 10px;\n color: var(--mj-text-muted);\n font-size: 13px;\n}\n.gc-empty[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 24px; opacity: 0.4; }\n\n@media (max-width: 900px) {\n .gc-sidebar[_ngcontent-%COMP%], .gc-history[_ngcontent-%COMP%] { display: none; }\n}"] });
|
|
1418
|
+
};
|
|
1419
|
+
GraphQLConsoleComponent = __decorate([
|
|
1420
|
+
RegisterClass(BaseResourceComponent, 'GraphQLConsoleInspector')
|
|
1421
|
+
], GraphQLConsoleComponent);
|
|
1422
|
+
export { GraphQLConsoleComponent };
|
|
1423
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GraphQLConsoleComponent, [{
|
|
1424
|
+
type: Component,
|
|
1425
|
+
args: [{ standalone: false, selector: 'mj-graphql-console', template: "<div class=\"mj-inspector mj-inspector--solo\">\n <div class=\"mj-inspector__header\">\n <div class=\"mj-inspector__header-icon\"><i class=\"fa-solid fa-code\"></i></div>\n <div>\n <h3 class=\"mj-inspector__header-title\">GraphQL Console</h3>\n <div class=\"mj-inspector__header-sub\">\n @if (ApiUrl) {\n Connected to <code class=\"gc-endpoint\">{{ ApiUrl }}</code>\n } @else {\n Run queries against the connected MJ API\n }\n </div>\n </div>\n <span class=\"mj-inspector__header-spacer\"></span>\n <div class=\"mj-inspector__header-actions\">\n <button class=\"mj-inspector__btn\"\n [class.gc-toggle--active]=\"ShowHistory\"\n type=\"button\" (click)=\"ToggleHistoryPanel()\"\n title=\"Toggle history sidebar\">\n <i class=\"fa-solid fa-clock-rotate-left\"></i> History\n </button>\n <button class=\"mj-inspector__btn\" type=\"button\" (click)=\"OnCopyAsCurl()\" title=\"Copy as cURL command\">\n <i class=\"fa-solid fa-terminal\"></i> Copy cURL\n </button>\n </div>\n </div>\n\n <div class=\"gc-body\">\n @if (ShowHistory) {\n <aside class=\"gc-sidebar\" [style.width.px]=\"SidebarWidthPx\">\n <div class=\"gc-sidebar-tabs\">\n <button type=\"button\"\n class=\"gc-sidebar-tab\"\n [class.gc-sidebar-tab--active]=\"SidebarTab === 'history'\"\n (click)=\"OnSidebarTabChange('history')\">\n <i class=\"fa-solid fa-clock-rotate-left\"></i> History\n </button>\n <button type=\"button\"\n class=\"gc-sidebar-tab\"\n [class.gc-sidebar-tab--active]=\"SidebarTab === 'entities'\"\n (click)=\"OnSidebarTabChange('entities')\">\n <i class=\"fa-solid fa-table-list\"></i> Entities\n </button>\n <button type=\"button\"\n class=\"gc-sidebar-tab\"\n [class.gc-sidebar-tab--active]=\"SidebarTab === 'schema'\"\n (click)=\"OnSidebarTabChange('schema')\">\n <i class=\"fa-solid fa-sitemap\"></i> Schema\n </button>\n </div>\n\n @if (SidebarTab === 'history') {\n <div class=\"gc-history-head\">\n <span>{{ History.length }} {{ History.length === 1 ? 'entry' : 'entries' }}</span>\n <button class=\"gc-history-clear\"\n type=\"button\"\n (click)=\"OnClearHistory()\"\n title=\"Clear non-favorite history\">\n <i class=\"fa-solid fa-broom\"></i>\n </button>\n </div>\n @if (History.length === 0) {\n <div class=\"gc-history-empty\">\n <i class=\"fa-regular fa-circle-question\"></i>\n Run a query to see it here. Star <i class=\"fa-solid fa-star\"></i> to keep it.\n </div>\n } @else {\n <div class=\"gc-history-list\">\n @for (h of History; track TrackByHistory($index, h)) {\n <button type=\"button\"\n class=\"gc-history-item\"\n [class.gc-history-item--error]=\"h.status === 'error'\"\n [class.gc-history-item--fav]=\"h.favorite\"\n (click)=\"OnRestoreHistory(h)\">\n <div class=\"gc-history-item-head\">\n <i class=\"gc-history-status\"\n [class.fa-solid]=\"true\"\n [class.fa-circle-check]=\"h.status === 'ok'\"\n [class.fa-circle-xmark]=\"h.status === 'error'\"\n [class.gc-status--ok]=\"h.status === 'ok'\"\n [class.gc-status--err]=\"h.status === 'error'\"></i>\n <span class=\"gc-history-label\">{{ h.label || 'unnamed' }}</span>\n <button class=\"gc-history-fav\"\n type=\"button\"\n (click)=\"OnToggleFavorite(h, $event)\"\n [title]=\"h.favorite ? 'Unfavorite' : 'Favorite'\">\n <i [class]=\"h.favorite ? 'fa-solid fa-star' : 'fa-regular fa-star'\"></i>\n </button>\n <button class=\"gc-history-del\"\n type=\"button\"\n (click)=\"OnDeleteHistory(h, $event)\"\n title=\"Remove from history\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n <div class=\"gc-history-meta\">\n <span>{{ h.timestamp | date:'HH:mm:ss' }}</span>\n @if (h.durationMs != null) {\n <span>\u00B7</span>\n <span>{{ h.durationMs }}ms</span>\n }\n </div>\n </button>\n }\n </div>\n }\n } @else if (SidebarTab === 'entities') {\n <div class=\"gc-ent-toolbar\">\n <div class=\"gc-ent-search-wrap\">\n <i class=\"fa-solid fa-search gc-ent-search-icon\"></i>\n <input type=\"search\"\n class=\"gc-ent-search\"\n placeholder=\"Search entities\u2026\"\n [(ngModel)]=\"EntitiesSearch\" />\n </div>\n @if (KnownSchemas.length > 1) {\n <select class=\"gc-ent-schema\" [(ngModel)]=\"EntitySchemaFilter\">\n <option value=\"\">All schemas ({{ KnownSchemas.length }})</option>\n @for (s of KnownSchemas; track s) {\n <option [value]=\"s\">{{ s }}</option>\n }\n </select>\n }\n </div>\n <div class=\"gc-ent-meta\">\n <span>{{ FilteredEntities.length }} of {{ Entities.length }}</span>\n <span class=\"gc-ent-hint\">Click an entity to see operations</span>\n </div>\n <div class=\"gc-ent-list\">\n @for (item of FilteredEntities; track TrackByEntity($index, item)) {\n <div class=\"gc-ent-card\" [class.gc-ent-card--expanded]=\"item.expanded\">\n <button type=\"button\"\n class=\"gc-ent-row\"\n (click)=\"ToggleEntity(item)\">\n <i class=\"fa-solid fa-chevron-right gc-ent-chev\"\n [class.gc-ent-chev--down]=\"item.expanded\"></i>\n <div class=\"gc-ent-info\">\n <div class=\"gc-ent-name\">{{ item.info.Name }}</div>\n <div class=\"gc-ent-meta-row\">\n <code class=\"gc-ent-typename\">{{ item.typeName }}</code>\n <span class=\"gc-ent-schema-badge\">{{ item.schema }}</span>\n </div>\n </div>\n </button>\n @if (item.expanded) {\n <div class=\"gc-ent-actions\">\n <button type=\"button\" class=\"gc-ent-op gc-ent-op--read\"\n (click)=\"OnEntityOp(item, 'view', $event)\"\n title=\"Insert a Run View template (Shift-click to append)\">\n <i class=\"fa-solid fa-magnifying-glass\"></i>\n Run view\n </button>\n <button type=\"button\" class=\"gc-ent-op gc-ent-op--read\"\n (click)=\"OnEntityOp(item, 'byId', $event)\"\n title=\"Fetch a single record by ID (Shift-click to append)\">\n <i class=\"fa-solid fa-fingerprint\"></i>\n Get by ID\n </button>\n @if (item.info.AllowCreateAPI) {\n <button type=\"button\" class=\"gc-ent-op gc-ent-op--write\"\n (click)=\"OnEntityOp(item, 'create', $event)\"\n title=\"Create a new record (Shift-click to append)\">\n <i class=\"fa-solid fa-plus\"></i>\n Create\n </button>\n }\n @if (item.info.AllowUpdateAPI) {\n <button type=\"button\" class=\"gc-ent-op gc-ent-op--write\"\n (click)=\"OnEntityOp(item, 'update', $event)\"\n title=\"Update an existing record (Shift-click to append)\">\n <i class=\"fa-solid fa-pen\"></i>\n Update\n </button>\n }\n @if (item.info.AllowDeleteAPI) {\n <button type=\"button\" class=\"gc-ent-op gc-ent-op--danger\"\n (click)=\"OnEntityOp(item, 'delete', $event)\"\n title=\"Delete a record (Shift-click to append)\">\n <i class=\"fa-solid fa-trash\"></i>\n Delete\n </button>\n }\n </div>\n @if (item.info.Description) {\n <div class=\"gc-ent-desc\">{{ item.info.Description }}</div>\n }\n }\n </div>\n }\n @if (FilteredEntities.length === 0) {\n <div class=\"gc-ent-empty\">\n <i class=\"fa-solid fa-search\"></i>\n <span>No entities match.</span>\n @if (EntitiesSearch || EntitySchemaFilter) {\n <button class=\"gc-ent-clear\" type=\"button\" (click)=\"ClearEntityFilters()\">\n Clear filters\n </button>\n }\n </div>\n }\n </div>\n } @else {\n <div class=\"gc-schema-toolbar\">\n <div class=\"gc-schema-search-wrap\">\n <i class=\"fa-solid fa-search gc-schema-search-icon\"></i>\n <input type=\"search\"\n class=\"gc-schema-search\"\n placeholder=\"Search operations\u2026\"\n [(ngModel)]=\"SchemaSearch\" />\n </div>\n <button class=\"gc-schema-reload\"\n type=\"button\"\n (click)=\"OnReloadSchema()\"\n [disabled]=\"SchemaLoading\"\n title=\"Reload schema\">\n <i class=\"fa-solid\" [class.fa-rotate]=\"!SchemaLoading\" [class.fa-spinner]=\"SchemaLoading\" [class.fa-spin]=\"SchemaLoading\"></i>\n </button>\n </div>\n\n @if (Operations.length > 0) {\n <div class=\"gc-schema-kinds\">\n <button type=\"button\"\n class=\"gc-schema-kind\"\n [class.gc-schema-kind--active]=\"SchemaKindFilter === 'all'\"\n (click)=\"SchemaKindFilter = 'all'\">\n All <span>{{ OperationCounts.all }}</span>\n </button>\n <button type=\"button\"\n class=\"gc-schema-kind gc-schema-kind--query\"\n [class.gc-schema-kind--active]=\"SchemaKindFilter === 'query'\"\n (click)=\"SchemaKindFilter = 'query'\">\n <i class=\"fa-solid fa-magnifying-glass\"></i> Query <span>{{ OperationCounts.query }}</span>\n </button>\n <button type=\"button\"\n class=\"gc-schema-kind gc-schema-kind--mutation\"\n [class.gc-schema-kind--active]=\"SchemaKindFilter === 'mutation'\"\n (click)=\"SchemaKindFilter = 'mutation'\">\n <i class=\"fa-solid fa-pen\"></i> Mutation <span>{{ OperationCounts.mutation }}</span>\n </button>\n </div>\n }\n\n @if (SchemaLoading) {\n <div class=\"gc-schema-state\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>Introspecting schema\u2026</span>\n </div>\n } @else if (SchemaIntrospectionDisabled) {\n <div class=\"gc-schema-state gc-schema-disabled\">\n <i class=\"fa-solid fa-lock\"></i>\n <div class=\"gc-schema-disabled-title\">Introspection disabled</div>\n <div class=\"gc-schema-disabled-body\">\n This server has GraphQL introspection turned off (typical in production). Schema browsing isn't available \u2014 write queries directly in the editor, or use the History tab to revisit previous queries.\n </div>\n </div>\n } @else if (SchemaError) {\n <div class=\"gc-schema-state gc-schema-state--err\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n <div class=\"gc-schema-err-title\">Couldn't load schema</div>\n <div class=\"gc-schema-err-body\">{{ SchemaError }}</div>\n </div>\n } @else if (FilteredOperations.length === 0) {\n <div class=\"gc-schema-state\">\n <i class=\"fa-solid fa-search\"></i>\n <span>No operations match.</span>\n </div>\n } @else {\n <div class=\"gc-schema-list\">\n @for (op of FilteredOperations; track TrackByOp($index, op)) {\n <button type=\"button\"\n class=\"gc-schema-op\"\n [class.gc-schema-op--mutation]=\"op.kind === 'mutation'\"\n (click)=\"OnInsertOperation(op, $event)\"\n [title]=\"(op.description || ('Insert ' + op.kind + ' template')) + ' \u00B7 Shift-click to append'\">\n <div class=\"gc-schema-op-head\">\n <span class=\"gc-schema-op-kind\">{{ op.kind }}</span>\n <span class=\"gc-schema-op-name\">{{ op.name }}</span>\n </div>\n @if (op.argSummary) {\n <div class=\"gc-schema-op-args\">({{ op.argSummary }})</div>\n }\n <div class=\"gc-schema-op-return\">\n <i class=\"fa-solid fa-arrow-right\"></i> {{ op.returnSummary }}\n </div>\n @if (op.description) {\n <div class=\"gc-schema-op-desc\">{{ op.description }}</div>\n }\n </button>\n }\n </div>\n }\n }\n </aside>\n <div class=\"gc-splitter gc-splitter--vert\"\n (mousedown)=\"OnSplitterDown($event, 'sidebar')\"\n title=\"Drag to resize sidebar\"></div>\n }\n\n <div class=\"gc-main\">\n <div class=\"gc-editor-wrap\" [style.flex]=\"'0 0 ' + EditorHeightPct + '%'\">\n <div class=\"gc-editor-head\">\n <span class=\"gc-editor-label\">Query</span>\n <span class=\"gc-editor-hint\">\u2318/Ctrl+Enter to run \u00B7 Shift+click an entity/op to append</span>\n <button class=\"gc-mini-btn\" type=\"button\" (click)=\"OnFormatQuery()\" title=\"Tidy whitespace\">\n <i class=\"fa-solid fa-broom\"></i> Tidy\n </button>\n <button class=\"gc-mini-btn gc-mini-btn--danger\" type=\"button\" (click)=\"OnClearQuery()\" title=\"Clear editor\">\n <i class=\"fa-solid fa-eraser\"></i> Clear\n </button>\n </div>\n <mj-code-editor\n class=\"gc-editor\"\n [(ngModel)]=\"Query\"\n [language]=\"'graphql'\"\n [lineWrapping]=\"true\"\n placeholder=\"Enter your GraphQL query\u2026\">\n </mj-code-editor>\n </div>\n\n <div class=\"gc-splitter gc-splitter--horiz\"\n (mousedown)=\"OnSplitterDown($event, 'editor')\"\n title=\"Drag to resize editor / response\"></div>\n\n <div class=\"gc-vars-wrap\">\n <button class=\"gc-vars-toggle\" type=\"button\" (click)=\"ToggleVariables()\">\n <i class=\"fa-solid fa-chevron-right gc-vars-chev\" [class.gc-vars-chev--down]=\"ShowVariables\"></i>\n Variables\n @if (Variables && Variables.trim() !== '{}' && Variables.trim() !== '') {\n <span class=\"gc-vars-pill\">configured</span>\n }\n </button>\n @if (ShowVariables) {\n <mj-code-editor\n class=\"gc-editor gc-editor--vars\"\n [(ngModel)]=\"Variables\"\n [language]=\"'json'\"\n [lineWrapping]=\"true\"\n placeholder=\"{}\">\n </mj-code-editor>\n }\n </div>\n\n <div class=\"gc-run-bar\">\n <button class=\"gc-run-btn\"\n type=\"button\"\n [disabled]=\"Running\"\n (click)=\"OnRun()\">\n @if (Running) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Running\u2026\n } @else {\n <i class=\"fa-solid fa-play\"></i> Run\n }\n </button>\n @if (ResponseStatus !== 'idle') {\n <div class=\"gc-run-meta\">\n @if (ResponseStatus === 'ok') {\n <span class=\"gc-status-badge gc-status-badge--ok\">\n <i class=\"fa-solid fa-circle-check\"></i> 200 OK\n </span>\n } @else {\n <span class=\"gc-status-badge gc-status-badge--err\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i> Error\n </span>\n }\n @if (ResponseDurationMs != null) {\n <span class=\"gc-meta-pill\"><i class=\"fa-regular fa-clock\"></i> {{ ResponseDurationMs }}ms</span>\n }\n @if (ResponseSizeBytes != null) {\n <span class=\"gc-meta-pill\"><i class=\"fa-solid fa-database\"></i> {{ FormattedSize }}</span>\n }\n </div>\n }\n <span class=\"gc-spacer\"></span>\n @if (ResponseJson) {\n <button class=\"mj-inspector__btn\"\n [class.mj-inspector__btn--success]=\"CopyConfirmed\"\n type=\"button\"\n (click)=\"OnCopyResponse()\">\n <i class=\"fa-solid\" [class.fa-clipboard]=\"!CopyConfirmed\" [class.fa-check]=\"CopyConfirmed\"></i>\n {{ CopyConfirmed ? 'Copied' : 'Copy' }}\n </button>\n }\n </div>\n\n <div class=\"gc-response-wrap\">\n <div class=\"gc-response-head\">\n <span class=\"gc-editor-label\">Response</span>\n </div>\n @if (ErrorMessage && !ResponseJson) {\n <div class=\"gc-error\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n <span>{{ ErrorMessage }}</span>\n </div>\n } @else if (ResponseJson) {\n @if (ErrorMessage) {\n <div class=\"gc-error gc-error--inline\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n <span>{{ ErrorMessage }}</span>\n </div>\n }\n <pre class=\"gc-response\"><code>{{ ResponseJson }}</code></pre>\n } @else {\n <div class=\"gc-empty\">\n <i class=\"fa-solid fa-arrow-up-from-bracket\"></i>\n <span>Run a query to see results here.</span>\n </div>\n }\n </div>\n </div>\n </div>\n</div>\n", styles: [":host { display: block; height: 100%; }\n\n.mj-inspector {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n background: var(--mj-bg-page);\n color: var(--mj-text-primary);\n font-family: inherit;\n}\n\n/* Header */\n.mj-inspector__header {\n display: flex;\n align-items: center;\n gap: 14px;\n padding: 14px 20px;\n border-bottom: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n flex-shrink: 0;\n}\n.mj-inspector__header-icon {\n width: 36px; height: 36px;\n border-radius: 9px;\n background: linear-gradient(135deg, #264FAF 0%, #0076b6 100%);\n color: white;\n display: flex; align-items: center; justify-content: center;\n font-size: 15px;\n flex-shrink: 0;\n}\n.mj-inspector__header-title {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--mj-text-primary);\n letter-spacing: -0.2px;\n}\n.mj-inspector__header-sub {\n font-size: 11.5px;\n color: var(--mj-text-muted);\n margin-top: 2px;\n}\n.mj-inspector__header-spacer { flex: 1; }\n.mj-inspector__header-actions {\n display: flex; gap: 6px;\n}\n.mj-inspector__btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 7px 12px;\n border-radius: 7px;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n font-family: inherit;\n transition: all 0.15s;\n}\n.mj-inspector__btn:hover {\n background: var(--mj-bg-surface-hover);\n border-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary);\n}\n.mj-inspector__btn--success {\n color: var(--mj-status-success);\n border-color: color-mix(in srgb, var(--mj-status-success) 30%, var(--mj-border-default));\n}\n\n/* Layout: sidebar + content */\n.mj-inspector__body {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n.mj-inspector__sidebar {\n width: 220px;\n border-right: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n overflow-y: auto;\n flex-shrink: 0;\n padding: 8px;\n}\n.mj-inspector__nav-item {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 10px 12px;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.12s;\n margin-bottom: 2px;\n font-family: inherit;\n border: none;\n background: transparent;\n color: var(--mj-text-secondary);\n text-align: left;\n width: 100%;\n}\n.mj-inspector__nav-item:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n.mj-inspector__nav-item--active {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n color: var(--mj-brand-primary);\n}\n.mj-inspector__nav-item--active:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 14%, transparent);\n}\n.mj-inspector__nav-icon {\n width: 18px;\n text-align: center;\n font-size: 13px;\n margin-top: 1px;\n flex-shrink: 0;\n color: inherit;\n}\n.mj-inspector__nav-text { flex: 1; min-width: 0; }\n.mj-inspector__nav-label {\n font-size: 13px;\n font-weight: 500;\n line-height: 1.2;\n}\n.mj-inspector__nav-desc {\n font-size: 11px;\n color: var(--mj-text-muted);\n margin-top: 3px;\n line-height: 1.3;\n}\n.mj-inspector__nav-item--active .mj-inspector__nav-desc {\n color: color-mix(in srgb, var(--mj-brand-primary) 70%, var(--mj-text-muted));\n}\n\n/* Content area */\n.mj-inspector__content {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n background: var(--mj-bg-page);\n}\n.mj-inspector__content-head {\n padding: 12px 20px;\n border-bottom: 1px solid var(--mj-border-subtle);\n display: flex;\n align-items: center;\n justify-content: space-between;\n background: var(--mj-bg-surface-card);\n}\n.mj-inspector__content-title {\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n.mj-inspector__content-meta {\n font-size: 11px;\n color: var(--mj-text-muted);\n}\n.mj-inspector__editor {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n.mj-inspector__editor mj-code-editor {\n flex: 1;\n min-height: 0;\n display: block;\n}\n\n/* Empty state */\n.mj-inspector__empty {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-muted);\n font-size: 13px;\n}\n\n@media (max-width: 700px) {\n .mj-inspector__body { flex-direction: column; }\n .mj-inspector__sidebar {\n width: 100%;\n height: auto;\n max-height: 200px;\n border-right: none;\n border-bottom: 1px solid var(--mj-border-default);\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n }\n .mj-inspector__nav-item { flex: 1 1 calc(50% - 8px); margin-bottom: 0; }\n .mj-inspector__nav-desc { display: none; }\n .mj-inspector__header { padding: 12px 14px; gap: 10px; }\n}\n", ".mj-inspector--solo { background: var(--mj-bg-page); }\n.gc-toggle--active {\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, transparent) !important;\n color: var(--mj-brand-primary) !important;\n border-color: var(--mj-brand-primary) !important;\n}\n.gc-endpoint {\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n font-size: 11px;\n background: var(--mj-bg-surface-sunken);\n padding: 1px 6px;\n border-radius: 4px;\n color: var(--mj-text-secondary);\n}\n\n.gc-body {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n\n/* Sidebar (history + entities + schema) \u2014 width is bound from component */\n.gc-sidebar {\n flex-shrink: 0;\n background: var(--mj-bg-surface);\n display: flex;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n min-width: 200px;\n max-width: 560px;\n}\n\n/* Resizable splitters */\n.gc-splitter {\n flex-shrink: 0;\n background: var(--mj-border-subtle);\n transition: background 0.15s;\n position: relative;\n}\n.gc-splitter:hover { background: var(--mj-brand-primary); }\n.gc-splitter:active { background: color-mix(in srgb, var(--mj-brand-primary) 80%, black); }\n.gc-splitter--vert {\n width: 4px;\n cursor: col-resize;\n}\n.gc-splitter--horiz {\n height: 4px;\n cursor: row-resize;\n}\n/* Bigger invisible hit area so the splitter is easier to grab */\n.gc-splitter::before {\n content: '';\n position: absolute;\n inset: -3px;\n}\n.gc-sidebar-tabs {\n display: flex;\n border-bottom: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n flex-shrink: 0;\n}\n.gc-sidebar-tab {\n flex: 1;\n padding: 10px 8px;\n background: transparent;\n border: none;\n color: var(--mj-text-muted);\n font-size: 11.5px;\n font-weight: 600;\n cursor: pointer;\n font-family: inherit;\n border-bottom: 2px solid transparent;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n transition: all 0.15s;\n}\n.gc-sidebar-tab:hover { color: var(--mj-text-primary); }\n.gc-sidebar-tab--active {\n color: var(--mj-brand-primary);\n border-bottom-color: var(--mj-brand-primary);\n background: var(--mj-bg-surface);\n}\n\n/* History sidebar (legacy classname kept for the inner head row) */\n.gc-history {\n width: 280px;\n flex-shrink: 0;\n border-right: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n display: flex;\n flex-direction: column;\n}\n.gc-history-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 14px;\n border-bottom: 1px solid var(--mj-border-subtle);\n font-size: 10.5px;\n font-weight: 700;\n color: var(--mj-text-muted);\n text-transform: uppercase;\n letter-spacing: 0.5px;\n background: var(--mj-bg-surface-card);\n}\n.gc-history-clear {\n background: transparent;\n border: none;\n color: var(--mj-text-muted);\n cursor: pointer;\n width: 24px;\n height: 24px;\n border-radius: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n}\n.gc-history-clear:hover { background: var(--mj-bg-surface-hover); color: var(--mj-text-primary); }\n\n.gc-history-empty {\n padding: 20px 16px;\n color: var(--mj-text-muted);\n font-size: 12px;\n text-align: center;\n line-height: 1.5;\n}\n.gc-history-empty i { display: block; font-size: 22px; margin-bottom: 8px; opacity: 0.5; }\n\n.gc-history-list {\n flex: 1;\n overflow-y: auto;\n padding: 4px;\n}\n.gc-history-item {\n width: 100%;\n text-align: left;\n background: transparent;\n border: 1px solid transparent;\n padding: 8px 10px;\n border-radius: 7px;\n cursor: pointer;\n margin-bottom: 2px;\n font-family: inherit;\n transition: background 0.12s, border-color 0.12s;\n}\n.gc-history-item:hover {\n background: var(--mj-bg-surface-hover);\n border-color: var(--mj-border-subtle);\n}\n.gc-history-item--fav {\n border-color: color-mix(in srgb, var(--mj-status-warning) 30%, transparent);\n}\n\n.gc-history-item-head {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.gc-history-status {\n font-size: 11px;\n flex-shrink: 0;\n}\n.gc-status--ok { color: var(--mj-status-success); }\n.gc-status--err { color: var(--mj-status-error); }\n\n.gc-history-label {\n flex: 1;\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n font-size: 11.5px;\n font-weight: 500;\n color: var(--mj-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.gc-history-fav,\n.gc-history-del {\n background: transparent;\n border: none;\n color: var(--mj-text-muted);\n cursor: pointer;\n width: 22px;\n height: 22px;\n border-radius: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n flex-shrink: 0;\n opacity: 0;\n transition: all 0.12s;\n}\n.gc-history-item:hover .gc-history-fav,\n.gc-history-item:hover .gc-history-del { opacity: 1; }\n.gc-history-item--fav .gc-history-fav { opacity: 1; color: var(--mj-status-warning); }\n.gc-history-fav:hover { color: var(--mj-status-warning); background: color-mix(in srgb, var(--mj-status-warning) 10%, transparent); }\n.gc-history-del:hover { color: var(--mj-status-error); background: color-mix(in srgb, var(--mj-status-error) 10%, transparent); }\n\n.gc-history-meta {\n margin-top: 3px;\n margin-left: 18px;\n display: flex;\n gap: 4px;\n font-size: 10.5px;\n color: var(--mj-text-muted);\n}\n\n/* ---------- Entities tab ---------- */\n.gc-ent-toolbar {\n display: flex;\n gap: 6px;\n padding: 8px;\n border-bottom: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n flex-shrink: 0;\n}\n.gc-ent-search-wrap {\n position: relative;\n flex: 1;\n min-width: 0;\n}\n.gc-ent-search-icon {\n position: absolute;\n left: 9px;\n top: 50%;\n transform: translateY(-50%);\n color: var(--mj-text-muted);\n font-size: 11px;\n pointer-events: none;\n}\n.gc-ent-search {\n width: 100%;\n padding: 6px 10px 6px 26px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font-size: 12px;\n font-family: inherit;\n}\n.gc-ent-search:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n}\n.gc-ent-schema {\n padding: 5px 8px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font-size: 11.5px;\n font-family: inherit;\n cursor: pointer;\n max-width: 130px;\n}\n\n.gc-ent-meta {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 6px 12px;\n border-bottom: 1px solid var(--mj-border-subtle);\n font-size: 10.5px;\n color: var(--mj-text-muted);\n background: var(--mj-bg-surface);\n flex-shrink: 0;\n}\n.gc-ent-hint { font-style: italic; }\n\n.gc-ent-list {\n flex: 1;\n overflow-y: auto;\n padding: 6px;\n}\n.gc-ent-card {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 7px;\n margin-bottom: 4px;\n overflow: hidden;\n transition: border-color 0.12s, box-shadow 0.15s;\n}\n.gc-ent-card:hover { border-color: var(--mj-border-default); }\n.gc-ent-card--expanded {\n border-color: var(--mj-brand-primary);\n box-shadow: 0 2px 8px color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n}\n.gc-ent-row {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 8px 10px;\n background: transparent;\n border: none;\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n}\n.gc-ent-row:hover { background: var(--mj-bg-surface-hover); }\n.gc-ent-card--expanded .gc-ent-row { background: color-mix(in srgb, var(--mj-brand-primary) 5%, transparent); }\n.gc-ent-chev {\n color: var(--mj-text-muted);\n font-size: 10px;\n width: 12px;\n flex-shrink: 0;\n transition: transform 0.15s;\n}\n.gc-ent-chev--down { transform: rotate(90deg); }\n.gc-ent-info { flex: 1; min-width: 0; }\n.gc-ent-name {\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.gc-ent-meta-row {\n display: flex;\n gap: 6px;\n margin-top: 2px;\n align-items: center;\n}\n.gc-ent-typename {\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n font-size: 10.5px;\n color: var(--mj-text-muted);\n background: var(--mj-bg-surface-sunken);\n padding: 1px 6px;\n border-radius: 4px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.gc-ent-schema-badge {\n font-size: 10px;\n color: var(--mj-text-secondary);\n background: var(--mj-bg-surface-sunken);\n padding: 1px 6px;\n border-radius: 4px;\n text-transform: uppercase;\n font-weight: 600;\n letter-spacing: 0.4px;\n}\n\n.gc-ent-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n padding: 6px 10px 8px 30px;\n border-top: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n}\n.gc-ent-op {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 5px 9px;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n font-size: 11px;\n font-weight: 500;\n cursor: pointer;\n font-family: inherit;\n transition: all 0.12s;\n}\n.gc-ent-op:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n border-color: var(--mj-border-strong);\n}\n.gc-ent-op--read:hover {\n border-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary);\n}\n.gc-ent-op--write:hover {\n border-color: color-mix(in srgb, var(--mj-status-warning) 50%, var(--mj-border-strong));\n color: color-mix(in srgb, var(--mj-status-warning) 70%, var(--mj-text-primary));\n}\n.gc-ent-op--danger:hover {\n border-color: var(--mj-status-error);\n color: var(--mj-status-error);\n background: color-mix(in srgb, var(--mj-status-error) 6%, transparent);\n}\n.gc-ent-desc {\n padding: 4px 10px 8px 30px;\n font-size: 11px;\n color: var(--mj-text-muted);\n line-height: 1.45;\n}\n\n.gc-ent-empty {\n padding: 30px 18px;\n color: var(--mj-text-muted);\n text-align: center;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n}\n.gc-ent-empty i { font-size: 18px; opacity: 0.5; }\n.gc-ent-clear {\n background: transparent;\n border: 1px solid var(--mj-border-default);\n color: var(--mj-text-secondary);\n padding: 5px 12px;\n border-radius: 6px;\n font-size: 11.5px;\n cursor: pointer;\n font-family: inherit;\n margin-top: 4px;\n}\n.gc-ent-clear:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n border-color: var(--mj-brand-primary);\n}\n\n/* ---------- Schema explorer ---------- */\n.gc-schema-toolbar {\n display: flex;\n gap: 6px;\n padding: 8px;\n border-bottom: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n flex-shrink: 0;\n}\n.gc-schema-search-wrap {\n position: relative;\n flex: 1;\n}\n.gc-schema-search-icon {\n position: absolute;\n left: 9px;\n top: 50%;\n transform: translateY(-50%);\n color: var(--mj-text-muted);\n font-size: 11px;\n pointer-events: none;\n}\n.gc-schema-search {\n width: 100%;\n padding: 6px 10px 6px 26px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font-size: 12px;\n font-family: inherit;\n}\n.gc-schema-search:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n}\n.gc-schema-reload {\n background: transparent;\n border: 1px solid var(--mj-border-default);\n color: var(--mj-text-muted);\n cursor: pointer;\n width: 30px;\n height: 30px;\n border-radius: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n flex-shrink: 0;\n}\n.gc-schema-reload:hover:not(:disabled) {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n border-color: var(--mj-border-strong);\n}\n\n.gc-schema-kinds {\n display: flex;\n gap: 4px;\n padding: 6px 8px;\n border-bottom: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface);\n flex-shrink: 0;\n}\n.gc-schema-kind {\n flex: 1;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n color: var(--mj-text-secondary);\n padding: 5px 6px;\n border-radius: 6px;\n font-size: 11px;\n font-weight: 600;\n cursor: pointer;\n font-family: inherit;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n transition: all 0.12s;\n}\n.gc-schema-kind:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n.gc-schema-kind span {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-subtle);\n padding: 0 6px;\n border-radius: 100px;\n font-size: 10px;\n color: var(--mj-text-muted);\n}\n.gc-schema-kind--active {\n background: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n color: white;\n}\n.gc-schema-kind--active span {\n background: rgba(255, 255, 255, 0.25);\n border-color: transparent;\n color: white;\n}\n\n.gc-schema-state {\n padding: 28px 18px;\n text-align: center;\n color: var(--mj-text-muted);\n font-size: 12px;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n line-height: 1.5;\n}\n.gc-schema-state i { font-size: 22px; opacity: 0.5; }\n\n.gc-schema-disabled {\n color: var(--mj-text-secondary);\n}\n.gc-schema-disabled i {\n color: var(--mj-status-warning);\n opacity: 0.85;\n font-size: 24px;\n margin-bottom: 4px;\n}\n.gc-schema-disabled-title {\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n.gc-schema-disabled-body {\n font-size: 12px;\n color: var(--mj-text-muted);\n max-width: 240px;\n}\n\n.gc-schema-state--err {\n color: var(--mj-status-error);\n align-items: stretch;\n text-align: left;\n}\n.gc-schema-state--err i { color: var(--mj-status-error); opacity: 0.9; align-self: center; }\n.gc-schema-err-title {\n font-size: 13px;\n font-weight: 600;\n text-align: center;\n color: var(--mj-status-error);\n}\n.gc-schema-err-body {\n font-size: 11.5px;\n color: var(--mj-text-secondary);\n background: var(--mj-bg-surface-sunken);\n padding: 8px 10px;\n border-radius: 6px;\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n word-break: break-word;\n max-height: 160px;\n overflow-y: auto;\n}\n\n.gc-schema-list {\n flex: 1;\n overflow-y: auto;\n padding: 6px;\n}\n.gc-schema-op {\n width: 100%;\n text-align: left;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 7px;\n padding: 8px 10px;\n margin-bottom: 4px;\n cursor: pointer;\n font-family: inherit;\n transition: all 0.12s;\n}\n.gc-schema-op:hover {\n background: var(--mj-bg-surface-hover);\n border-color: var(--mj-brand-primary);\n transform: translateX(2px);\n}\n.gc-schema-op-head {\n display: flex;\n align-items: baseline;\n gap: 8px;\n margin-bottom: 3px;\n}\n.gc-schema-op-kind {\n font-size: 9.5px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n padding: 1px 6px;\n border-radius: 4px;\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n color: var(--mj-brand-primary);\n}\n.gc-schema-op--mutation .gc-schema-op-kind {\n background: color-mix(in srgb, var(--mj-status-warning) 14%, transparent);\n color: color-mix(in srgb, var(--mj-status-warning) 70%, var(--mj-text-primary));\n}\n.gc-schema-op-name {\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-primary);\n word-break: break-all;\n}\n.gc-schema-op-args,\n.gc-schema-op-return {\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n font-size: 10.5px;\n color: var(--mj-text-muted);\n line-height: 1.4;\n word-break: break-word;\n}\n.gc-schema-op-return {\n color: var(--mj-text-secondary);\n margin-top: 2px;\n}\n.gc-schema-op-return i { font-size: 9px; margin-right: 3px; opacity: 0.6; }\n.gc-schema-op-desc {\n font-size: 11px;\n color: var(--mj-text-muted);\n margin-top: 5px;\n line-height: 1.4;\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n/* Main panel */\n.gc-main {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n}\n\n.gc-editor-wrap,\n.gc-vars-wrap,\n.gc-response-wrap {\n display: flex;\n flex-direction: column;\n background: var(--mj-bg-surface);\n}\n.gc-editor-wrap {\n border-bottom: 1px solid var(--mj-border-subtle);\n flex: 1;\n min-height: 200px;\n}\n.gc-response-wrap {\n flex: 1;\n min-height: 200px;\n background: var(--mj-bg-page);\n}\n\n.gc-editor-head,\n.gc-response-head {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 16px;\n background: var(--mj-bg-surface-card);\n border-bottom: 1px solid var(--mj-border-subtle);\n font-size: 10.5px;\n font-weight: 700;\n color: var(--mj-text-muted);\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n.gc-editor-label { flex: 0 0 auto; }\n.gc-editor-hint {\n font-weight: 500;\n text-transform: none;\n letter-spacing: normal;\n color: var(--mj-text-muted);\n font-size: 11px;\n}\n.gc-mini-btn {\n margin-left: auto;\n background: transparent;\n border: 1px solid var(--mj-border-subtle);\n color: var(--mj-text-secondary);\n padding: 4px 10px;\n border-radius: 5px;\n font-size: 11px;\n cursor: pointer;\n font-family: inherit;\n text-transform: none;\n letter-spacing: normal;\n font-weight: 500;\n}\n.gc-mini-btn:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n border-color: var(--mj-border-default);\n}\n.gc-mini-btn--danger:hover {\n background: color-mix(in srgb, var(--mj-status-error) 8%, transparent);\n color: var(--mj-status-error);\n border-color: color-mix(in srgb, var(--mj-status-error) 40%, var(--mj-border-default));\n}\n\n/* mj-code-editor host fill \u2014 the component renders CodeMirror internally\n and we want it to use the full available area of its flex parent. */\nmj-code-editor.gc-editor {\n flex: 1;\n min-height: 0;\n width: 100%;\n display: block;\n background: var(--mj-bg-surface);\n overflow: hidden;\n}\nmj-code-editor.gc-editor ::ng-deep .cm-editor {\n height: 100%;\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n font-size: 12.5px;\n}\nmj-code-editor.gc-editor ::ng-deep .cm-scroller {\n line-height: 1.55;\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n}\nmj-code-editor.gc-editor--vars {\n background: var(--mj-bg-surface-sunken);\n flex: 0 0 auto;\n min-height: 80px;\n max-height: 160px;\n}\nmj-code-editor.gc-editor--vars ::ng-deep .cm-editor {\n background: var(--mj-bg-surface-sunken);\n}\n\n/* Variables collapsible */\n.gc-vars-wrap {\n border-bottom: 1px solid var(--mj-border-subtle);\n flex-shrink: 0;\n}\n.gc-vars-toggle {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n background: var(--mj-bg-surface-card);\n border: none;\n padding: 7px 16px;\n cursor: pointer;\n font-size: 11.5px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n font-family: inherit;\n text-align: left;\n transition: background 0.12s;\n}\n.gc-vars-toggle:hover { background: var(--mj-bg-surface-hover); color: var(--mj-text-primary); }\n.gc-vars-chev {\n color: var(--mj-text-muted);\n font-size: 10px;\n transition: transform 0.15s;\n}\n.gc-vars-chev--down { transform: rotate(90deg); }\n.gc-vars-pill {\n margin-left: auto;\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n color: var(--mj-brand-primary);\n font-size: 10px;\n padding: 1px 8px;\n border-radius: 100px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.4px;\n}\n\n/* Run bar */\n.gc-run-bar {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 10px 16px;\n background: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-subtle);\n flex-shrink: 0;\n}\n.gc-run-btn {\n background: var(--mj-brand-primary);\n color: white;\n border: 1px solid var(--mj-brand-primary);\n padding: 8px 18px;\n border-radius: 8px;\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n font-family: inherit;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n box-shadow: 0 2px 6px color-mix(in srgb, var(--mj-brand-primary) 30%, transparent);\n transition: background 0.15s, transform 0.1s;\n}\n.gc-run-btn:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-brand-primary) 88%, black);\n border-color: color-mix(in srgb, var(--mj-brand-primary) 88%, black);\n}\n.gc-run-btn:active:not(:disabled) { transform: scale(0.98); }\n.gc-run-btn:disabled {\n background: var(--mj-bg-surface-sunken);\n border-color: var(--mj-border-default);\n color: var(--mj-text-muted);\n box-shadow: none;\n cursor: wait;\n}\n\n.gc-run-meta {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.gc-status-badge {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 4px 10px;\n border-radius: 100px;\n font-size: 11px;\n font-weight: 600;\n}\n.gc-status-badge--ok {\n background: color-mix(in srgb, var(--mj-status-success) 14%, transparent);\n color: color-mix(in srgb, var(--mj-status-success) 70%, var(--mj-text-primary));\n}\n.gc-status-badge--err {\n background: color-mix(in srgb, var(--mj-status-error) 14%, transparent);\n color: color-mix(in srgb, var(--mj-status-error) 70%, var(--mj-text-primary));\n}\n.gc-meta-pill {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 11px;\n color: var(--mj-text-muted);\n background: var(--mj-bg-surface-sunken);\n padding: 3px 9px;\n border-radius: 100px;\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n}\n.gc-spacer { flex: 1; }\n\n/* Response */\n.gc-response {\n margin: 0;\n flex: 1;\n overflow: auto;\n padding: 14px 16px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font-family: 'SF Mono', Menlo, Consolas, monospace;\n font-size: 12px;\n line-height: 1.55;\n}\n.gc-response code { white-space: pre-wrap; word-break: break-word; }\n\n.gc-error {\n margin: 12px 16px;\n padding: 10px 14px;\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n border: 1px solid color-mix(in srgb, var(--mj-status-error) 30%, var(--mj-border-subtle));\n border-radius: 8px;\n color: color-mix(in srgb, var(--mj-status-error) 70%, var(--mj-text-primary));\n font-size: 12.5px;\n display: flex;\n align-items: flex-start;\n gap: 10px;\n}\n.gc-error i { margin-top: 2px; flex-shrink: 0; }\n.gc-error--inline { margin-bottom: 0; }\n\n.gc-empty {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 10px;\n color: var(--mj-text-muted);\n font-size: 13px;\n}\n.gc-empty i { font-size: 24px; opacity: 0.4; }\n\n@media (max-width: 900px) {\n .gc-sidebar, .gc-history { display: none; }\n}\n"] }]
|
|
1426
|
+
}], () => [{ type: i0.ChangeDetectorRef }], { queryEditor: [{
|
|
1427
|
+
type: ViewChild,
|
|
1428
|
+
args: ['queryEditor']
|
|
1429
|
+
}], OnHostKeydown: [{
|
|
1430
|
+
type: HostListener,
|
|
1431
|
+
args: ['keydown', ['$event']]
|
|
1432
|
+
}] }); })();
|
|
1433
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(GraphQLConsoleComponent, { className: "GraphQLConsoleComponent", filePath: "src/DevTools/graphql-console.component.ts", lineNumber: 92 }); })();
|
|
1434
|
+
const INTROSPECTION_QUERY = `
|
|
1435
|
+
query MJDevToolsIntrospection {
|
|
1436
|
+
__schema {
|
|
1437
|
+
queryType { name }
|
|
1438
|
+
mutationType { name }
|
|
1439
|
+
types {
|
|
1440
|
+
kind
|
|
1441
|
+
name
|
|
1442
|
+
description
|
|
1443
|
+
fields(includeDeprecated: false) {
|
|
1444
|
+
name
|
|
1445
|
+
description
|
|
1446
|
+
args {
|
|
1447
|
+
name
|
|
1448
|
+
description
|
|
1449
|
+
type { ...TypeRef }
|
|
1450
|
+
defaultValue
|
|
1451
|
+
}
|
|
1452
|
+
type { ...TypeRef }
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
fragment TypeRef on __Type {
|
|
1458
|
+
kind
|
|
1459
|
+
name
|
|
1460
|
+
ofType { kind name ofType { kind name ofType { kind name ofType { kind name } } } }
|
|
1461
|
+
}
|
|
1462
|
+
`;
|
|
1463
|
+
//# sourceMappingURL=graphql-console.component.js.map
|