@genexus/genexus-ide-ui 3.2.8 → 3.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-db-instance-selector.cjs.entry.js +147 -0
  3. package/dist/cjs/gx-ide-db-instance-selector.cjs.entry.js.map +1 -0
  4. package/dist/cjs/gx-ide-mcp-server.cjs.entry.js +6 -20
  5. package/dist/cjs/gx-ide-mcp-server.cjs.entry.js.map +1 -1
  6. package/dist/cjs/gx-ide-new-kb.cjs.entry.js +261 -138
  7. package/dist/cjs/gx-ide-new-kb.cjs.entry.js.map +1 -1
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/collection/collection-manifest.json +1 -0
  10. package/dist/collection/components/db-instance-selector/db-instance-selector.css +20 -0
  11. package/dist/collection/components/db-instance-selector/db-instance-selector.js +262 -0
  12. package/dist/collection/components/db-instance-selector/db-instance-selector.js.map +1 -0
  13. package/dist/collection/components/db-instance-selector/gx-ide-assets/db-instance-selector/langs/db-instance-selector.lang.en.json +14 -0
  14. package/dist/collection/components/db-instance-selector/gx-ide-assets/db-instance-selector/langs/db-instance-selector.lang.ja.json +14 -0
  15. package/dist/collection/components/db-instance-selector/gx-ide-assets/db-instance-selector/langs/db-instance-selector.lang.zh.json +14 -0
  16. package/dist/collection/components/db-instance-selector/gx-ide-assets/db-instance-selector/shortcuts.json +15 -0
  17. package/dist/collection/components/mcp-server/mcp-server.js +6 -20
  18. package/dist/collection/components/mcp-server/mcp-server.js.map +1 -1
  19. package/dist/collection/components/mcp-server/types.js.map +1 -1
  20. package/dist/collection/components/new-kb/gx-ide-assets/new-kb/langs/new-kb.lang.en.json +17 -4
  21. package/dist/collection/components/new-kb/gx-ide-assets/new-kb/langs/new-kb.lang.ja.json +17 -4
  22. package/dist/collection/components/new-kb/gx-ide-assets/new-kb/langs/new-kb.lang.zh.json +17 -4
  23. package/dist/collection/components/new-kb/new-kb.css +122 -17
  24. package/dist/collection/components/new-kb/new-kb.js +320 -193
  25. package/dist/collection/components/new-kb/new-kb.js.map +1 -1
  26. package/dist/collection/components/new-kb/tests/new-kb.e2e.js +48 -60
  27. package/dist/collection/components/new-kb/tests/new-kb.e2e.js.map +1 -1
  28. package/dist/collection/testing/locale.e2e.js +1 -0
  29. package/dist/collection/testing/locale.e2e.js.map +1 -1
  30. package/dist/components/gx-ide-db-instance-selector.d.ts +11 -0
  31. package/dist/components/gx-ide-db-instance-selector.js +168 -0
  32. package/dist/components/gx-ide-db-instance-selector.js.map +1 -0
  33. package/dist/components/gx-ide-mcp-server.js +6 -20
  34. package/dist/components/gx-ide-mcp-server.js.map +1 -1
  35. package/dist/components/gx-ide-new-kb.js +281 -152
  36. package/dist/components/gx-ide-new-kb.js.map +1 -1
  37. package/dist/esm/genexus-ide-ui.js +1 -1
  38. package/dist/esm/gx-ide-db-instance-selector.entry.js +143 -0
  39. package/dist/esm/gx-ide-db-instance-selector.entry.js.map +1 -0
  40. package/dist/esm/gx-ide-mcp-server.entry.js +6 -20
  41. package/dist/esm/gx-ide-mcp-server.entry.js.map +1 -1
  42. package/dist/esm/gx-ide-new-kb.entry.js +261 -138
  43. package/dist/esm/gx-ide-new-kb.entry.js.map +1 -1
  44. package/dist/esm/loader.js +1 -1
  45. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  46. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  47. package/dist/genexus-ide-ui/gx-ide-assets/db-instance-selector/langs/db-instance-selector.lang.en.json +14 -0
  48. package/dist/genexus-ide-ui/gx-ide-assets/db-instance-selector/langs/db-instance-selector.lang.ja.json +14 -0
  49. package/dist/genexus-ide-ui/gx-ide-assets/db-instance-selector/langs/db-instance-selector.lang.zh.json +14 -0
  50. package/dist/genexus-ide-ui/gx-ide-assets/db-instance-selector/shortcuts.json +15 -0
  51. package/dist/genexus-ide-ui/gx-ide-assets/new-kb/langs/new-kb.lang.en.json +17 -4
  52. package/dist/genexus-ide-ui/gx-ide-assets/new-kb/langs/new-kb.lang.ja.json +17 -4
  53. package/dist/genexus-ide-ui/gx-ide-assets/new-kb/langs/new-kb.lang.zh.json +17 -4
  54. package/dist/genexus-ide-ui/{p-45b6dc45.entry.js → p-a456237f.entry.js} +7 -19
  55. package/dist/genexus-ide-ui/p-a456237f.entry.js.map +1 -0
  56. package/dist/genexus-ide-ui/p-c1db7f38.entry.js +182 -0
  57. package/dist/genexus-ide-ui/p-c1db7f38.entry.js.map +1 -0
  58. package/dist/genexus-ide-ui/p-eeae9dd5.entry.js +1020 -0
  59. package/dist/genexus-ide-ui/p-eeae9dd5.entry.js.map +1 -0
  60. package/dist/types/components/db-instance-selector/db-instance-selector.d.ts +39 -0
  61. package/dist/types/components/mcp-server/types.d.ts +0 -2
  62. package/dist/types/components/new-kb/new-kb.d.ts +51 -23
  63. package/dist/types/components.d.ts +135 -84
  64. package/package.json +1 -1
  65. package/dist/genexus-ide-ui/p-45b6dc45.entry.js.map +0 -1
  66. package/dist/genexus-ide-ui/p-76e1c357.entry.js +0 -802
  67. package/dist/genexus-ide-ui/p-76e1c357.entry.js.map +0 -1
@@ -0,0 +1,1020 @@
1
+ import { r as t, g as i, h as s, H as e, a } from "./p-9b9ccd0c.js";
2
+
3
+ import { g as o } from "./p-d42e842b.js";
4
+
5
+ import "./p-6534555e.js";
6
+
7
+ import "lit";
8
+
9
+ import "lit/directives/when.js";
10
+
11
+ import "lit/directives/if-defined.js";
12
+
13
+ import { c as n } from "./p-c5196b3b.js";
14
+
15
+ import { L as l } from "./p-311eedf3.js";
16
+
17
+ import { s as r, g as h } from "./p-91e2ebb0.js";
18
+
19
+ import { r as d, m as c } from "./p-4d330836.js";
20
+
21
+ import { v as f } from "./p-b32b6b1f.js";
22
+
23
+ import { r as u } from "./p-1252519a.js";
24
+
25
+ const p = ':host{display:grid;block-size:100%;overflow:auto;grid-template-rows:max-content 1fr max-content}.section{display:contents}.header-one-col{grid-template-columns:1fr}.location-wrapper{display:flex;align-items:center;gap:var(--spacing-gap-xs);min-block-size:var(--control-block-size)}.location-custom-wrapper{display:flex;align-items:center;gap:var(--spacing-gap-xs);flex-grow:1;min-inline-size:0}.location-field{flex-grow:1;min-inline-size:0}.location-field>.input{inline-size:100%}.basic{display:grid;grid-template:"basic-top basic-top" max-content "back-end front-end" 1fr;grid-template-columns:1fr 1fr}.basic__header{grid-area:basic-top;grid-template-columns:1fr 1fr}.dialog-header__back-end,.dialog-header__front-end{padding-block-start:16px}.main__back-end{border-inline-end:var(--section-common-border)}.main__back-end,.main__front-end{grid-auto-rows:max-content;padding-block:12px;overflow:auto}.section__back-end{grid-area:back-end;grid-auto-rows:max-content}.section__front-end{grid-area:front-end}.section__back-end,.section__front-end{display:grid;grid-template-rows:max-content 1fr;overflow:auto}.basic,.advanced{padding-block-start:12px;overflow:auto;block-size:100%}.kb-storage-card{display:flex;flex-direction:column;gap:var(--spacing-gap-l);padding-inline:var(--spacing-padding-xl)}.kb-storage-card__header{display:flex;align-items:center;gap:var(--spacing-gap-s);padding-block-end:var(--spacing-padding-m);border-bottom:1px solid var(--color-border-surface-on-elevation-1)}.kb-storage-card__heading{display:flex;flex-direction:column;gap:var(--spacing-gap-xs);min-inline-size:0}.kb-storage-card__title{margin:0;color:var(--color-text-neutral-default)}.kb-storage-card__grid{display:grid;grid-template-columns:1fr 1fr;column-gap:var(--spacing-gap-xl);row-gap:var(--spacing-gap-l)}.kb-storage-column{display:flex;flex-direction:column;gap:var(--spacing-gap-m);min-inline-size:0}.kb-storage-column__title{display:flex;align-items:center;gap:var(--spacing-gap-s);color:var(--color-text-neutral-disabled);text-transform:uppercase;letter-spacing:0.04em}.kb-storage-column__title-text{white-space:nowrap}.kb-storage-column__title-rule{flex:1;block-size:1px;background-color:var(--color-border-surface-on-elevation-1)}.field-group--stacked{display:flex;flex-direction:column;gap:var(--spacing-gap-m)}.server-name-wrapper{display:grid;grid-template-columns:1fr max-content;gap:var(--spacing-gap-xs);min-inline-size:0}.kb-storage-credentials{display:flex;flex-direction:column;gap:var(--spacing-gap-m)}.kb-storage-callout{display:flex;flex-direction:row;gap:var(--spacing-gap-xs);padding:var(--spacing-padding-m);border:1px solid var(--color-border-surface-on-elevation-2);border-radius:var(--border-radius-s);background-color:var(--color-accent-surface-elevation-2)}.kb-storage-callout-inner{display:flex;flex-direction:column}.kb-storage-callout__title{display:flex;gap:var(--spacing-gap-xs)}.kb-storage-callout__description{color:var(--color-text-neutral-disabled)}.text-align-center{text-align:center}.tab::part(page){scrollbar-width:thin}.tab::part(tab-list block-start){padding-inline:var(--spacing-padding-xl)}.checkbox{inline-size:max-content}.footer.dialog-footer-with-border{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-gap-m)}.footer.dialog-footer-with-border>.buttons-spacer{margin-inline-start:auto}.connection-status--connecting{color:var(--color-text-neutral-disabled)}.connection-status--success{color:var(--color-text-success-default)}.connection-status--failed{color:var(--color-text-error-default)}';
26
+
27
+ var b = undefined && undefined.__classPrivateFieldGet || function(t, i, s, e) {
28
+ if (s === "a" && !e) throw new TypeError("Private accessor was defined without a getter");
29
+ if (typeof i === "function" ? t !== i || !e : !i.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
30
+ return s === "m" ? e : s === "a" ? e.call(t) : e ? e.value : i.get(t);
31
+ };
32
+
33
+ var v = undefined && undefined.__classPrivateFieldSet || function(t, i, s, e, a) {
34
+ if (e === "m") throw new TypeError("Private method is not writable");
35
+ if (e === "a" && !a) throw new TypeError("Private accessor was defined without a setter");
36
+ if (typeof i === "function" ? t !== i || !a : !i.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
37
+ return e === "a" ? a.call(t, s) : a ? a.value = s : i.set(t, s), s;
38
+ };
39
+
40
+ var g, m, k, w, y, x, _, M, W, I, T, E, D, F, j, L, N, z, C, S, P, A, B, $, K, U, H, O, V, G, Q, R, X, q, J, Y, Z, tt, it, st, et, at, ot, nt, lt, rt, ht, dt, ct, ft, ut, pt, bt, vt, gt, mt, kt, wt;
41
+
42
+ const yt = [ "resets/box-sizing", "components/tab", "components/tooltip", "utils/form--full", "utils/layout", "utils/typography", "utils/spacing", "chameleon/scrollbar" ];
43
+
44
+ const xt = "WINDOWS_AUTHENTICATION";
45
+
46
+ const _t = "(LocalDB)\\MSSQLLocalDB";
47
+
48
+ const Mt = "main";
49
+
50
+ const Wt = "basic";
51
+
52
+ const It = o({
53
+ category: "system",
54
+ name: "folder",
55
+ colorType: "primary"
56
+ });
57
+
58
+ const Tt = o({
59
+ category: "system",
60
+ name: "warning",
61
+ colorType: "on-interactive"
62
+ });
63
+
64
+ const Et = o({
65
+ category: "system",
66
+ name: "database",
67
+ colorType: "primary"
68
+ });
69
+
70
+ const Dt = "default";
71
+
72
+ const Ft = "custom";
73
+
74
+ const jt = "GX_KB_";
75
+
76
+ const Lt = "basic";
77
+
78
+ const Nt = "advanced";
79
+
80
+ const zt = class {
81
+ constructor(e) {
82
+ t(this, e);
83
+ g.set(this, false);
84
+ /**
85
+ * The component hard-coded strings translations.
86
+ */
87
+ // eslint-disable-next-line @stencil-community/own-props-must-be-private
88
+ m.set(this, void 0);
89
+ /**
90
+ * frontEndsState saves the id's of the front ends checkboxes that are checked
91
+ */
92
+ // eslint-disable-next-line @stencil-community/own-props-must-be-private
93
+ k.set(this, new Map);
94
+ w.set(this, void 0);
95
+ y.set(this, void 0);
96
+ x.set(this, i(`./gx-ide-assets/new-kb/shortcuts.json`));
97
+ _.set(this, []);
98
+ /* References needed to collect data con "Create" button submit*/ M.set(this, void 0);
99
+ W.set(this, void 0);
100
+ I.set(this, void 0);
101
+ T.set(this, void 0);
102
+ E.set(this, void 0);
103
+ D.set(this, void 0);
104
+ F.set(this, void 0);
105
+ j.set(this, void 0);
106
+ L.set(this, void 0);
107
+ N.set(this, false);
108
+ z.set(this, false);
109
+ C.set(this, void 0);
110
+ S.set(this, void 0);
111
+ P.set(this, void 0);
112
+ A.set(this, void 0);
113
+ B.set(this, void 0);
114
+ $.set(this, void 0);
115
+ K.set(this, void 0);
116
+ U.set(this, void 0);
117
+ H.set(this, (t => `${jt}${t !== null && t !== void 0 ? t : ""}`));
118
+ O.set(this, (t => {
119
+ var i, s;
120
+ const e = (i = t.detail) !== null && i !== void 0 ? i : (s = b(this, D, "f")) === null || s === void 0 ? void 0 : s.value;
121
+ this.databaseNameValue = b(this, H, "f").call(this, e);
122
+ }));
123
+ V.set(this, (t => {
124
+ var i, s;
125
+ this.databaseNameValue = (i = t.detail) !== null && i !== void 0 ? i : (s = b(this, T, "f")) === null || s === void 0 ? void 0 : s.value;
126
+ }));
127
+ G.set(this, (async t => {
128
+ this.authenticationTypeValue = t === null || t === void 0 ? void 0 : t.detail;
129
+ this.collations = [];
130
+ this.defaultCollation = undefined;
131
+ this.connectionStatus = undefined;
132
+ await b(this, tt, "f").call(this);
133
+ }));
134
+ Q.set(this, (async () => {
135
+ var t, i, s, e;
136
+ this.userNameValue = (i = (t = b(this, K, "f")) === null || t === void 0 ? void 0 : t.value) !== null && i !== void 0 ? i : "";
137
+ this.passwordValue = (e = (s = b(this, C, "f")) === null || s === void 0 ? void 0 : s.value) !== null && e !== void 0 ? e : "";
138
+ await b(this, tt, "f").call(this);
139
+ }));
140
+ R.set(this, (async () => {
141
+ if (!this.browseForMoreCallback) {
142
+ return;
143
+ }
144
+ this.browseForMoreDialogOpen = true;
145
+ try {
146
+ const t = await this.browseForMoreCallback();
147
+ if (t) {
148
+ this.serverNameValue = t;
149
+ if (b(this, B, "f")) {
150
+ b(this, B, "f").value = t;
151
+ }
152
+ await b(this, X, "f").call(this, new CustomEvent("change", {
153
+ detail: t
154
+ }));
155
+ }
156
+ } catch (t) {} finally {
157
+ this.browseForMoreDialogOpen = false;
158
+ }
159
+ }));
160
+ X.set(this, (async t => {
161
+ var i, s;
162
+ const e = (i = t === null || t === void 0 ? void 0 : t.detail) !== null && i !== void 0 ? i : (s = t.target) === null || s === void 0 ? void 0 : s.value;
163
+ this.serverNameValue = e !== null && e !== void 0 ? e : "";
164
+ b(this, Z, "f").call(this);
165
+ await b(this, tt, "f").call(this);
166
+ }));
167
+ q.set(this, (t => {
168
+ var i;
169
+ if (!t) {
170
+ return "empty";
171
+ }
172
+ if (t.toLowerCase() === _t.toLowerCase()) {
173
+ return "localdb";
174
+ }
175
+ const s = ((i = this.serverInstances) !== null && i !== void 0 ? i : []).some((i => {
176
+ var s;
177
+ return ((s = i.label) === null || s === void 0 ? void 0 : s.toLowerCase()) === t.toLowerCase();
178
+ }));
179
+ return s ? "local" : "remote";
180
+ }));
181
+ J.set(this, (() => {
182
+ const t = b(this, q, "f").call(this, this.serverNameValue);
183
+ return t === "localdb" || t === "remote" || t === "empty";
184
+ }));
185
+ Y.set(this, (() => {
186
+ const t = this.authenticationTypeValue;
187
+ if (!t || t === xt) {
188
+ return false;
189
+ }
190
+ return !this.userNameValue || !this.passwordValue;
191
+ }));
192
+ Z.set(this, (() => {
193
+ const t = b(this, q, "f").call(this, this.serverNameValue);
194
+ if (t === "local" || t === "localdb") {
195
+ this.createDataFilesInKBFolder = true;
196
+ } else if (t === "remote") {
197
+ this.createDataFilesInKBFolder = false;
198
+ }
199
+ }));
200
+ tt.set(this, (async () => {
201
+ var t, i, s, e;
202
+ const a = this.serverNameValue;
203
+ if (!a || !this.getCollationsForInstanceCallback || this.connectionStatus === "connecting") {
204
+ return;
205
+ }
206
+ const o = this.authenticationTypeValue;
207
+ const n = o === xt;
208
+ const l = n ? undefined : (t = b(this, K, "f")) === null || t === void 0 ? void 0 : t.value;
209
+ const r = n ? undefined : (i = b(this, C, "f")) === null || i === void 0 ? void 0 : i.value;
210
+ if (!n && o && (!l || !r)) {
211
+ return;
212
+ }
213
+ this.connectionStatus = "connecting";
214
+ try {
215
+ const t = await this.getCollationsForInstanceCallback(a, o, l, r);
216
+ if (t) {
217
+ this.collations = (s = t.collations) !== null && s !== void 0 ? s : [];
218
+ this.defaultCollation = (e = t.defaultCollation) !== null && e !== void 0 ? e : undefined;
219
+ this.connectionStatus = "success";
220
+ } else {
221
+ this.collations = [];
222
+ this.defaultCollation = undefined;
223
+ this.connectionStatus = "failed";
224
+ }
225
+ } catch (t) {
226
+ this.collations = [];
227
+ this.defaultCollation = undefined;
228
+ this.connectionStatus = "failed";
229
+ }
230
+ }));
231
+ it.set(this, (t => {
232
+ v(this, w, t.detail, "f");
233
+ b(this, ft, "f").call(this);
234
+ b(this, wt, "f").call(this);
235
+ }));
236
+ st.set(this, (async () => {
237
+ await b(this, ct, "f").call(this);
238
+ b(this, ft, "f").call(this);
239
+ }));
240
+ et.set(this, (() => {
241
+ v(this, y, b(this, E, "f").value, "f");
242
+ }));
243
+ at.set(this, (() => {
244
+ const t = this.authenticationTypeValue !== xt;
245
+ return [ s("section", {
246
+ class: "kb-storage-card",
247
+ part: "kb-storage-card"
248
+ }, s("header", {
249
+ class: "kb-storage-card__header"
250
+ }, s("div", {
251
+ class: "kb-storage-card__heading"
252
+ }, s("h2", {
253
+ class: "kb-storage-card__title body-semi-bold-m"
254
+ }, b(this, m, "f").tabAdvanced.tabTitle))), s("div", {
255
+ class: "kb-storage-card__grid"
256
+ }, s("div", {
257
+ class: "kb-storage-column"
258
+ }, s("div", {
259
+ class: "kb-storage-column__title body-regular-xs"
260
+ }, s("span", {
261
+ class: "kb-storage-column__title-text"
262
+ }, b(this, m, "f").tabAdvanced.connectionGroup), s("span", {
263
+ class: "kb-storage-column__title-rule",
264
+ "aria-hidden": "true"
265
+ })), s("div", {
266
+ class: "field-group field-group--stacked"
267
+ }, s("div", {
268
+ class: "field field-block server-name-field"
269
+ }, s("label", {
270
+ class: "label",
271
+ htmlFor: "serverName"
272
+ }, b(this, m, "f").tabAdvanced.serverName.label), s("div", {
273
+ class: "server-name-wrapper"
274
+ }, s("ch-combo-box-render", {
275
+ class: "combo-box",
276
+ value: this.serverNameValue,
277
+ ref: t => v(this, B, t, "f"),
278
+ id: "serverName",
279
+ part: "server-name",
280
+ model: this.serverInstancesComboBoxModel,
281
+ suggest: true,
282
+ suggestDebounce: n.inputDebounce,
283
+ onInput: b(this, X, "f"),
284
+ onChange: b(this, X, "f")
285
+ }), s("button", {
286
+ class: "button-tertiary button-icon-only",
287
+ "aria-label": b(this, m, "f").tabAdvanced.serverName.browseForMore,
288
+ part: "button-browse-for-more",
289
+ onClick: b(this, R, "f")
290
+ }, s("ch-image", {
291
+ class: "icon-m",
292
+ src: Et
293
+ }), !this.browseForMoreDialogOpen && s("ch-tooltip", {
294
+ class: "tooltip",
295
+ actionElement: null,
296
+ blockAlign: "outside-start",
297
+ inlineAlign: "center",
298
+ delay: n.tooltipSettings.delay
299
+ }, b(this, m, "f").tabAdvanced.serverName.browseForMore))), b(this, rt, "f").call(this, b(this, B, "f"))), s("div", {
300
+ class: "field field-block database-field"
301
+ }, s("label", {
302
+ class: "label",
303
+ htmlFor: "databaseName"
304
+ }, b(this, m, "f").tabAdvanced.databaseName.label), s("ch-edit", {
305
+ class: "input",
306
+ value: this.databaseNameValue,
307
+ id: "databaseName",
308
+ part: "database-name",
309
+ onInput: b(this, V, "f"),
310
+ ref: t => v(this, T, t, "f")
311
+ }), b(this, rt, "f").call(this, b(this, T, "f"))), s("div", {
312
+ class: "field field-block collation-field"
313
+ }, s("label", {
314
+ class: "label",
315
+ htmlFor: "collation"
316
+ }, b(this, m, "f").tabAdvanced.collation.label), s("ch-combo-box-render", {
317
+ class: "combo-box",
318
+ disabled: !this.serverNameValue || this.collations.length === 0,
319
+ placeholder: this.collations.length === 0 ? b(this, m, "f").tabAdvanced.collation.disabledPlaceholder : "",
320
+ value: this.defaultCollation,
321
+ ref: t => v(this, W, t, "f"),
322
+ model: this.collationsComboBoxModel,
323
+ id: "collation",
324
+ part: "collation"
325
+ }), b(this, rt, "f").call(this, b(this, W, "f"))), s("ch-checkbox", {
326
+ class: "checkbox",
327
+ checkedValue: "true",
328
+ value: this.createDataFilesInKBFolder ? "true" : undefined,
329
+ disabled: b(this, J, "f").call(this),
330
+ caption: b(this, m, "f").tabAdvanced.createDataFilesInKbFolder,
331
+ part: "create-data-in-kb",
332
+ id: "createDataFilesInKBFolder",
333
+ ref: t => v(this, I, t, "f")
334
+ }))), s("div", {
335
+ class: "kb-storage-column"
336
+ }, s("div", {
337
+ class: "kb-storage-column__title body-regular-xs"
338
+ }, s("span", {
339
+ class: "kb-storage-column__title-text"
340
+ }, b(this, m, "f").tabAdvanced.authenticationGroup), s("span", {
341
+ class: "kb-storage-column__title-rule",
342
+ "aria-hidden": "true"
343
+ })), s("div", {
344
+ class: "field-group field-group--stacked"
345
+ }, s("div", {
346
+ class: "field field-block authentication-type-field"
347
+ }, s("label", {
348
+ class: "label",
349
+ htmlFor: "authenticationType"
350
+ }, b(this, m, "f").tabAdvanced.authenticationType.label), s("ch-combo-box-render", {
351
+ class: "combo-box",
352
+ disabled: this.authenticationTypes.length === 0,
353
+ placeholder: this.authenticationTypes.length === 0 ? b(this, m, "f").tabAdvanced.authenticationType.disabledPlaceholder : "",
354
+ value: this.authenticationTypeValue,
355
+ ref: t => v(this, M, t, "f"),
356
+ model: this.authenticationTypesComboBoxModel,
357
+ id: "authenticationType",
358
+ part: "authentication-type",
359
+ onInput: this.authenticationTypes.length > 0 ? b(this, G, "f") : undefined
360
+ }), b(this, rt, "f").call(this, b(this, M, "f"))), t ? s("div", {
361
+ class: "kb-storage-credentials"
362
+ }, s("div", {
363
+ class: "field field-block username-field"
364
+ }, s("label", {
365
+ class: "label",
366
+ htmlFor: "userName"
367
+ }, b(this, m, "f").tabAdvanced.userName.label), s("ch-edit", {
368
+ class: "input",
369
+ value: this.userName,
370
+ id: "userName",
371
+ part: "user-name",
372
+ ref: t => v(this, K, t, "f"),
373
+ onInput: b(this, Q, "f"),
374
+ debounce: n.inputDebounce
375
+ }), b(this, rt, "f").call(this, b(this, K, "f"))), s("div", {
376
+ class: "field field-block password-field"
377
+ }, s("label", {
378
+ class: "label",
379
+ htmlFor: "password"
380
+ }, b(this, m, "f").tabAdvanced.password.label), s("ch-edit", {
381
+ class: "input",
382
+ type: "password",
383
+ showPasswordButton: true,
384
+ value: this.password,
385
+ id: "password",
386
+ part: "password",
387
+ ref: t => v(this, C, t, "f"),
388
+ onInput: b(this, Q, "f"),
389
+ debounce: n.inputDebounce
390
+ }), b(this, rt, "f").call(this, b(this, C, "f"))), s("ch-checkbox", {
391
+ class: "checkbox",
392
+ checkedValue: "password",
393
+ value: "password",
394
+ caption: b(this, m, "f").tabAdvanced.savePassword,
395
+ part: "save-password",
396
+ id: "savePassword",
397
+ ref: t => v(this, A, t, "f"),
398
+ disabled: true
399
+ })) : s("div", {
400
+ class: "kb-storage-callout",
401
+ part: "windows-auth-callout"
402
+ }, s("ch-image", {
403
+ class: "icon-l",
404
+ src: Tt,
405
+ type: "mask"
406
+ }), s("div", {
407
+ class: "kb-storage-callout-inner"
408
+ }, s("span", {
409
+ class: "kb-storage-callout__title body-semi-bold-s"
410
+ }, b(this, m, "f").tabAdvanced.windowsAuthCalloutTitle), s("span", {
411
+ class: "kb-storage-callout__description body-regular-xs"
412
+ }, b(this, m, "f").tabAdvanced.windowsAuthCalloutDescription))))))) ];
413
+ }));
414
+ ot.set(this, (() => [ s("section", {
415
+ class: "basic__header field-group dialog-header-with-border spacing-body-inline"
416
+ }, s("div", {
417
+ // #prototyping target
418
+ class: "field field-block prototyping-target"
419
+ }, s("label", {
420
+ class: "label",
421
+ htmlFor: "prototypingTarget"
422
+ }, b(this, m, "f").tabBasic.prototypingTarget.label), s("ch-combo-box-render", {
423
+ id: "prototypingTarget",
424
+ class: "combo-box",
425
+ part: "prototyping-target",
426
+ disabled: this.prototypingTargets.length === 0,
427
+ placeholder: this.prototypingTargets.length === 0 ? b(this, m, "f").tabBasic.prototypingTarget.disabledPlaceholder : "",
428
+ value: this.prototypingTargetsInitialValue,
429
+ model: this.prototypingTargetsComboBoxModel,
430
+ onInput: this.prototypingTargets.length > 0 ? b(this, st, "f") : undefined,
431
+ ref: t => v(this, P, t, "f")
432
+ }), b(this, rt, "f").call(this, b(this, P, "f"))), s("div", {
433
+ // #user interface
434
+ class: "field field-block user-interface-language"
435
+ }, s("label", {
436
+ class: "label",
437
+ htmlFor: "userInterfaceLanguage"
438
+ }, b(this, m, "f").tabBasic.userInterfaceLanguage.label), s("ch-combo-box-render", {
439
+ class: "combo-box",
440
+ disabled: this.userInterfaceLanguages.length === 0,
441
+ placeholder: this.userInterfaceLanguages.length === 0 ? b(this, m, "f").tabBasic.userInterfaceLanguage.disabledPlaceholder : "",
442
+ value: this.userInterfaceLanguagesInitialValue,
443
+ ref: t => v(this, $, t, "f"),
444
+ model: this.userInterfaceLanguagesComboBoxModel,
445
+ id: "userInterfaceLanguage",
446
+ part: "user-interface-language"
447
+ }), b(this, rt, "f").call(this, b(this, $, "f")))), s("section", {
448
+ class: "section__back-end"
449
+ }, s("h2", {
450
+ // back end
451
+ class: "dialog-header dialog-header-with-border dialog-header__back-end subtitle-regular-xs\t text-align-center spacing-body-inline"
452
+ }, b(this, m, "f").tabBasic.backEnd.backEndLabel), s("div", {
453
+ class: "field-group main__back-end spacing-body-inline scrollable"
454
+ }, s("div", {
455
+ // #prototyping environment
456
+ class: "field field-block"
457
+ }, s("label", {
458
+ class: "label",
459
+ htmlFor: "prototypingEnvironment"
460
+ }, b(this, m, "f").tabBasic.backEnd.prototypingEnvironment.label), s("ch-combo-box-render", {
461
+ class: "combo-box",
462
+ disabled: this.defaultPrototypingEnvironments.length === 0,
463
+ placeholder: this.defaultPrototypingEnvironments.length === 0 ? b(this, m, "f").tabBasic.backEnd.prototypingEnvironment.disabledPlaceholder : "",
464
+ value: b(this, w, "f"),
465
+ ref: t => v(this, S, t, "f"),
466
+ model: this.prototypingEnvironmentsComboBoxModel,
467
+ onInput: b(this, it, "f"),
468
+ part: "prototyping-environment",
469
+ id: "prototypingEnvironment"
470
+ }), b(this, rt, "f").call(this, b(this, S, "f"))), s("div", {
471
+ // #data source
472
+ class: "field field-block"
473
+ }, s("label", {
474
+ class: "label",
475
+ htmlFor: "dataSource"
476
+ }, b(this, m, "f").tabBasic.backEnd.dataSource.label), s("ch-combo-box-render", {
477
+ class: "combo-box",
478
+ disabled: this.defaultDataSources.length === 0,
479
+ placeholder: this.defaultDataSources.length === 0 ? b(this, m, "f").tabBasic.backEnd.dataSource.disabledPlaceholder : "",
480
+ value: b(this, y, "f"),
481
+ ref: t => v(this, E, t, "f"),
482
+ onInput: b(this, et, "f"),
483
+ model: this.defaultDataSourcesComboBoxModel,
484
+ part: "data-source",
485
+ id: "dataSource"
486
+ }), b(this, rt, "f").call(this, b(this, E, "f"))))), s("section", {
487
+ class: "section__front-end"
488
+ }, s("h2", {
489
+ class: "dialog-header dialog-header-with-border dialog-header__front-end subtitle-regular-xs\t text-align-center spacing-body-inline"
490
+ }, b(this, m, "f").tabBasic.frontEnd.frontEndLabel), s("div", {
491
+ class: "field-group main__front-end spacing-body-inline scrollable"
492
+ }, d(this.frontEnds, b(this, ht, "f"), b(this, k, "f").get(b(this, w, "f"))))) ]));
493
+ // - - - - - - - - - -
494
+ nt.set(this, (() => {
495
+ if (this.cancelCallback) {
496
+ this.cancelCallback();
497
+ }
498
+ }));
499
+ lt.set(this, (() => {
500
+ var t, i, s, e, a, o, n, l, r, h, d, c, u, p, v;
501
+ const g = (t = b(this, k, "f").get(b(this, w, "f"))) !== null && t !== void 0 ? t : [];
502
+ this.createCallback({
503
+ authenticationType: (i = b(this, M, "f")) === null || i === void 0 ? void 0 : i.value,
504
+ collation: (s = b(this, W, "f")) === null || s === void 0 ? void 0 : s.value,
505
+ createDataFilesInKBFolder: !!((e = b(this, I, "f")) === null || e === void 0 ? void 0 : e.value),
506
+ dataSource: (a = b(this, E, "f")) === null || a === void 0 ? void 0 : a.value,
507
+ databaseName: (o = b(this, T, "f")) === null || o === void 0 ? void 0 : o.value,
508
+ frontEnds: g,
509
+ kbLocation: (n = b(this, F, "f")) === null || n === void 0 ? void 0 : n.value,
510
+ kbName: (l = b(this, D, "f")) === null || l === void 0 ? void 0 : l.value,
511
+ password: (r = b(this, C, "f")) === null || r === void 0 ? void 0 : r.value,
512
+ prototypingEnvironment: (h = b(this, S, "f")) === null || h === void 0 ? void 0 : h.value,
513
+ prototypingTarget: (d = b(this, P, "f")) === null || d === void 0 ? void 0 : d.value,
514
+ savePassword: !!((c = b(this, A, "f")) === null || c === void 0 ? void 0 : c.value),
515
+ serverName: (u = b(this, B, "f")) === null || u === void 0 ? void 0 : u.value,
516
+ userInterfaceLanguage: (p = b(this, $, "f")) === null || p === void 0 ? void 0 : p.value,
517
+ userName: (v = b(this, K, "f")) === null || v === void 0 ? void 0 : v.value,
518
+ creationMode: this.selectedTab
519
+ }).then((t => {
520
+ this.validatableControls = f(t, this.validatableControls);
521
+ }));
522
+ }));
523
+ // TODO: evaluate if this should be a global helper function.
524
+ // It is used on new-kb as well.
525
+ rt.set(this, (t => {
526
+ var i, e, a;
527
+ return ((e = (i = this.validatableControls) === null || i === void 0 ? void 0 : i.get(t === null || t === void 0 ? void 0 : t.id)) === null || e === void 0 ? void 0 : e.hasError) && ((a = this.validatableControls.get(t.id)) === null || a === void 0 ? void 0 : a.message) && s("ch-tooltip", {
528
+ class: "tooltip",
529
+ actionElement: t,
530
+ blockAlign: n.tooltipSettings.blockAlign,
531
+ inlineAlign: n.tooltipSettings.inlineAlign,
532
+ delay: n.tooltipSettings.delay
533
+ }, this.validatableControls.get(t.id).message);
534
+ }));
535
+ ht.set(this, (t => {
536
+ const i = t.target.checkedValue;
537
+ const s = t.detail === i;
538
+ b(this, dt, "f").call(this, i, s);
539
+ }));
540
+ /**
541
+ * This function updates frontEndsCheckedMap, that contains the checked
542
+ * checkboxes for each language front ends.
543
+ */
544
+ // eslint-disable-next-line @stencil-community/own-props-must-be-private
545
+ dt.set(this, ((t, i) => {
546
+ let s = b(this, k, "f").get(b(this, w, "f"));
547
+ if (!s) {
548
+ // first time
549
+ s = [];
550
+ b(this, k, "f").set(b(this, w, "f"), s);
551
+ }
552
+ if (i) {
553
+ // update by adding
554
+ s.push(t);
555
+ } else {
556
+ // update by removing
557
+ const i = s.findIndex((i => i === t));
558
+ u(s, i);
559
+ }
560
+ }));
561
+ ct.set(this, (async () => {
562
+ if (this.getPrototypingEnvironmentsCallback) {
563
+ const t = b(this, P, "f") ? b(this, P, "f").value : this.prototypingTargetsInitialValue;
564
+ const i = await this.getPrototypingEnvironmentsCallback(t);
565
+ if (i) {
566
+ this.defaultPrototypingEnvironments = i;
567
+ }
568
+ }
569
+ }));
570
+ ft.set(this, (() => {
571
+ if (this.getDataSourcesCallback) {
572
+ const t = b(this, S, "f").value;
573
+ const i = b(this, P, "f").value;
574
+ const s = this.getDataSourcesCallback(t, i);
575
+ s.then((t => {
576
+ if (t.length > 0) {
577
+ t = r(t, b(this, y, "f"));
578
+ v(this, y, h(t), "f");
579
+ this.defaultDataSources = t;
580
+ // set first option as selected
581
+ b(this, E, "f").value = b(this, y, "f") !== undefined ? b(this, y, "f") : this.defaultDataSources[0].id;
582
+ }
583
+ })).catch((() => {}));
584
+ }
585
+ }));
586
+ ut.set(this, (() => {
587
+ const t = this.authenticationTypes.some((t => t.id === xt));
588
+ if (t) {
589
+ this.authenticationTypeValue = xt;
590
+ }
591
+ }));
592
+ pt.set(this, (() => {
593
+ // populate #controlsValidation with the controls that could have errors.
594
+ const t = [ b(this, E, "f"), b(this, D, "f"), b(this, S, "f"), b(this, P, "f"), b(this, $, "f") ];
595
+ t.forEach((t => {
596
+ if (t.id) {
597
+ this.validatableControls.set(t.id, {
598
+ reference: t,
599
+ hasError: false,
600
+ message: undefined
601
+ });
602
+ }
603
+ }));
604
+ }));
605
+ bt.set(this, (() => {
606
+ // populate #controlsValidation with the controls that could have errors.
607
+ const t = [ b(this, M, "f"), b(this, I, "f"), b(this, B, "f"), b(this, M, "f"), b(this, T, "f"), b(this, K, "f"), b(this, W, "f"), b(this, C, "f"), b(this, A, "f") ];
608
+ t.forEach((t => {
609
+ if (t.id) {
610
+ this.validatableControls.set(t.id, {
611
+ reference: t,
612
+ hasError: false,
613
+ message: undefined
614
+ });
615
+ }
616
+ }));
617
+ }));
618
+ /**
619
+ * @description It allows defining the DBMS that will be used in the solution
620
+ */
621
+ // eslint-disable-next-line @stencil-community/own-props-must-be-private
622
+ vt.set(this, (() => {
623
+ this.selectLocationCallback().then((t => {
624
+ if (t) {
625
+ this.kbLocation = t;
626
+ }
627
+ }));
628
+ }));
629
+ gt.set(this, (() => {
630
+ this.locationMode = b(this, j, "f").value;
631
+ }));
632
+ mt.set(this, (t => {
633
+ this.selectedTab = t.detail.newSelectedId;
634
+ if (t.detail.newSelectedId === Nt) {
635
+ if (!this.advancedTabIsVisible) {
636
+ this.advancedTabIsVisible = true;
637
+ b(this, kt, "f").call(this);
638
+ }
639
+ } else {
640
+ this.connectionStatus = undefined;
641
+ }
642
+ }));
643
+ kt.set(this, (async () => {
644
+ var t, i, s, e, a, o, n;
645
+ if (!this.getAdvancedTabDataCallback || this.loadingAdvancedTab) {
646
+ return;
647
+ }
648
+ this.loadingAdvancedTab = true;
649
+ this.connectionStatus = "connecting";
650
+ try {
651
+ const l = await this.getAdvancedTabDataCallback();
652
+ if (l) {
653
+ if (l.serverName != null) {
654
+ this.serverNameValue = l.serverName;
655
+ b(this, Z, "f").call(this);
656
+ }
657
+ this.serverInstances = (t = l.serverInstances) !== null && t !== void 0 ? t : this.serverInstances;
658
+ this.collations = (i = l.collations) !== null && i !== void 0 ? i : this.collations;
659
+ this.authenticationTypes = (s = l.authenticationTypes) !== null && s !== void 0 ? s : this.authenticationTypes;
660
+ this.defaultCollation = (e = l.defaultCollation) !== null && e !== void 0 ? e : this.defaultCollation;
661
+ this.authenticationTypeValue = (n = (o = (a = l.authenticationTypes) === null || a === void 0 ? void 0 : a[0]) === null || o === void 0 ? void 0 : o.id) !== null && n !== void 0 ? n : this.authenticationTypeValue;
662
+ this.connectionStatus = "success";
663
+ } else {
664
+ this.connectionStatus = "failed";
665
+ }
666
+ } catch (t) {
667
+ this.connectionStatus = "failed";
668
+ } finally {
669
+ this.loadingAdvancedTab = false;
670
+ }
671
+ }));
672
+ /**
673
+ * Evaluates which front-end options need updates on 'getFrontEndsCallback'
674
+ * by comparing the new state (getFrontEndsCallback result) and previous state.
675
+ */
676
+ // eslint-disable-next-line @stencil-community/own-props-must-be-private
677
+ wt.set(this, (async () => {
678
+ const t = await this.getFrontEndsCallback(b(this, w, "f"));
679
+ if ((t === null || t === void 0 ? void 0 : t.length) > 0) {
680
+ this.frontEnds = t;
681
+ // Seed the checked map from the data's checked property so that
682
+ // initially checked items render as checked on first load.
683
+ if (!b(this, k, "f").has(b(this, w, "f"))) {
684
+ const i = t.filter((t => t.checked)).map((t => t.value || t.id));
685
+ if (i.length > 0) {
686
+ b(this, k, "f").set(b(this, w, "f"), i);
687
+ }
688
+ }
689
+ }
690
+ }));
691
+ this.advancedTabIsVisible = false;
692
+ this.loadingAdvancedTab = false;
693
+ this.browseForMoreDialogOpen = false;
694
+ this.databaseNameValue = "";
695
+ this.locationMode = Dt;
696
+ this.frontEnds = undefined;
697
+ this.validatableControls = new Map;
698
+ this.connectionStatus = undefined;
699
+ this.userNameValue = "";
700
+ this.passwordValue = "";
701
+ this.authenticationTypes = [];
702
+ this.authenticationTypesComboBoxModel = [];
703
+ this.authenticationTypeValue = undefined;
704
+ this.collations = [];
705
+ this.collationsComboBoxModel = [];
706
+ this.defaultCollation = undefined;
707
+ this.defaultDataSourcesComboBoxModel = [];
708
+ this.prototypingTargetsComboBoxModel = [];
709
+ this.prototypingTargetsInitialValue = undefined;
710
+ this.prototypingEnvironmentsComboBoxModel = [];
711
+ this.prototypingEnvironmentsInitialValue = undefined;
712
+ this.serverInstances = [];
713
+ this.serverInstancesComboBoxModel = [];
714
+ this.serverNameValue = "";
715
+ this.userInterfaceLanguagesComboBoxModel = [];
716
+ this.userInterfaceLanguagesInitialValue = undefined;
717
+ this.selectedTab = Lt;
718
+ this.cancelCallback = undefined;
719
+ this.canSetLocation = false;
720
+ this.getAdvancedTabDataCallback = undefined;
721
+ this.createCallback = undefined;
722
+ this.createDataFilesInKBFolder = true;
723
+ this.databaseName = undefined;
724
+ this.defaultDataSources = [];
725
+ this.getDataSourcesCallback = undefined;
726
+ this.getFrontEndsCallback = undefined;
727
+ this.getPrototypingEnvironmentsCallback = undefined;
728
+ this.isAdvanced = false;
729
+ this.kbLocation = undefined;
730
+ this.kbName = undefined;
731
+ this.password = undefined;
732
+ this.defaultPrototypingEnvironments = [];
733
+ this.prototypingTargets = [];
734
+ this.savePassword = false;
735
+ this.selectLocationCallback = undefined;
736
+ this.browseForMoreCallback = undefined;
737
+ this.getCollationsForInstanceCallback = undefined;
738
+ this.userInterfaceLanguages = [];
739
+ this.userName = undefined;
740
+ }
741
+ watchAuthenticationTypes(t) {
742
+ if (t === null || t === void 0 ? void 0 : t.length) {
743
+ this.authenticationTypesComboBoxModel = c(t);
744
+ this.authenticationTypeValue = h(t);
745
+ }
746
+ }
747
+ watchCollations(t) {
748
+ if (!(t === null || t === void 0 ? void 0 : t.length)) {
749
+ this.collationsComboBoxModel = [];
750
+ return;
751
+ }
752
+ this.collationsComboBoxModel = c(t);
753
+ }
754
+ watchServerInstances(t) {
755
+ if (!(t === null || t === void 0 ? void 0 : t.length)) {
756
+ this.serverInstancesComboBoxModel = [];
757
+ return;
758
+ }
759
+ this.serverInstancesComboBoxModel = c(t);
760
+ }
761
+ watchDefaultDataSources(t) {
762
+ if (t === null || t === void 0 ? void 0 : t.length) {
763
+ this.defaultDataSourcesComboBoxModel = c(t);
764
+ const i = r(t, b(this, y, "f"));
765
+ v(this, y, h(i), "f");
766
+ }
767
+ }
768
+ watchDefaultPrototypingEnvironments(t) {
769
+ if (t === null || t === void 0 ? void 0 : t.length) {
770
+ this.prototypingEnvironmentsComboBoxModel = c(t);
771
+ v(this, w, h(t), "f");
772
+ b(this, wt, "f").call(this);
773
+ }
774
+ }
775
+ watchPrototypingTargets(t) {
776
+ if (t === null || t === void 0 ? void 0 : t.length) {
777
+ this.prototypingTargetsComboBoxModel = c(t);
778
+ this.prototypingTargetsInitialValue = h(t);
779
+ b(this, ct, "f").call(this);
780
+ }
781
+ }
782
+ watchUserInterfaceLanguages(t) {
783
+ if (t === null || t === void 0 ? void 0 : t.length) {
784
+ this.userInterfaceLanguagesComboBoxModel = c(t);
785
+ this.userInterfaceLanguagesInitialValue = h(t);
786
+ }
787
+ }
788
+ async componentWillLoad() {
789
+ var t, i;
790
+ v(this, m, await l.getComponentStrings(this.el), "f");
791
+ this.databaseNameValue = b(this, H, "f").call(this, this.kbName);
792
+ if (this.databaseName) {
793
+ this.databaseNameValue = this.databaseName;
794
+ }
795
+ this.userNameValue = (t = this.userName) !== null && t !== void 0 ? t : "";
796
+ this.passwordValue = (i = this.password) !== null && i !== void 0 ? i : "";
797
+ v(this, _, [ {
798
+ id: Lt,
799
+ name: b(this, m, "f").tabBasic.tabLabel
800
+ }, {
801
+ id: Nt,
802
+ name: b(this, m, "f").tabAdvanced.tabLabel
803
+ } ], "f");
804
+ v(this, L, [ {
805
+ value: Dt,
806
+ caption: b(this, m, "f").header.kbLocationDefault
807
+ }, {
808
+ value: Ft,
809
+ caption: b(this, m, "f").header.kbLocationCustom
810
+ } ], "f");
811
+ }
812
+ connectedCallback() {
813
+ this.watchDefaultDataSources(this.defaultDataSources);
814
+ this.watchDefaultPrototypingEnvironments(this.defaultPrototypingEnvironments);
815
+ this.watchPrototypingTargets(this.prototypingTargets);
816
+ this.watchUserInterfaceLanguages(this.userInterfaceLanguages);
817
+ }
818
+ componentDidLoad() {
819
+ b(this, pt, "f").call(this);
820
+ }
821
+ componentDidRender() {
822
+ if (this.advancedTabIsVisible && !b(this, g, "f")) {
823
+ // just call this once.
824
+ b(this, ut, "f").call(this);
825
+ b(this, bt, "f").call(this);
826
+ v(this, g, true, "f");
827
+ }
828
+ // Register the location input for validation once it's rendered (custom mode)
829
+ if (this.locationMode === Ft && !b(this, N, "f") && b(this, F, "f")) {
830
+ this.validatableControls.set(b(this, F, "f").id, {
831
+ reference: b(this, F, "f"),
832
+ hasError: false,
833
+ message: undefined
834
+ });
835
+ v(this, N, true, "f");
836
+ }
837
+ // Register credential controls when they become visible (SQL Auth selected)
838
+ if (this.authenticationTypeValue !== xt && !b(this, z, "f") && b(this, K, "f") && b(this, C, "f")) {
839
+ this.validatableControls.set(b(this, K, "f").id, {
840
+ reference: b(this, K, "f"),
841
+ hasError: false,
842
+ message: undefined
843
+ });
844
+ this.validatableControls.set(b(this, C, "f").id, {
845
+ reference: b(this, C, "f"),
846
+ hasError: false,
847
+ message: undefined
848
+ });
849
+ v(this, z, true, "f");
850
+ }
851
+ // Reset flag when switching back to Windows Auth so they re-register next time
852
+ if (this.authenticationTypeValue === xt && b(this, z, "f")) {
853
+ v(this, z, false, "f");
854
+ }
855
+ }
856
+ /**
857
+ * Suspends or reactivates the shortcuts
858
+ */ async suspendShortcuts(t) {
859
+ if (t) {
860
+ b(this, U, "f").suspend = true;
861
+ } else {
862
+ b(this, U, "f").suspend = false;
863
+ }
864
+ }
865
+ render() {
866
+ return s(e, {
867
+ class: "widget"
868
+ }, s("ch-theme", {
869
+ model: yt
870
+ }), s("ch-shortcuts", {
871
+ src: b(this, x, "f"),
872
+ ref: t => v(this, U, t, "f")
873
+ }), s("section", {
874
+ class: "section"
875
+ }, s("header", {
876
+ class: {
877
+ "field-group": true,
878
+ "dialog-header-with-border": !this.isAdvanced,
879
+ "dialog-header": this.isAdvanced,
880
+ header: true,
881
+ "header-one-col": true,
882
+ "spacing-body-block-start": true,
883
+ "spacing-body-inline": true
884
+ }
885
+ }, s("div", {
886
+ // #kb name
887
+ class: "field field-inline kb-name"
888
+ }, s("label", {
889
+ class: "label kb-label",
890
+ htmlFor: "kbName"
891
+ }, b(this, m, "f").header.kbName), s("ch-edit", {
892
+ // TODO add placeholder
893
+ autoFocus: true,
894
+ class: "input kb-input",
895
+ placeholder: "SalesInventory",
896
+ value: this.kbName,
897
+ onInput: b(this, O, "f"),
898
+ ref: t => v(this, D, t, "f"),
899
+ id: "kbName",
900
+ part: "kb-name"
901
+ }), b(this, rt, "f").call(this, b(this, D, "f"))), this.canSetLocation && s("div", {
902
+ class: "location-wrapper"
903
+ }, s("label", {
904
+ class: "label location-label"
905
+ }, b(this, m, "f").header.kbLocation), s("ch-radio-group-render", {
906
+ class: "radio-group",
907
+ model: b(this, L, "f"),
908
+ value: Dt,
909
+ onChange: b(this, gt, "f"),
910
+ ref: t => v(this, j, t, "f")
911
+ }), this.locationMode === Ft && s("div", {
912
+ class: "location-custom-wrapper"
913
+ }, s("div", {
914
+ class: "location-field"
915
+ }, s("ch-edit", {
916
+ class: "input",
917
+ value: this.kbLocation,
918
+ ref: t => v(this, F, t, "f"),
919
+ id: "kbLocation",
920
+ part: "kb-location"
921
+ }), b(this, rt, "f").call(this, b(this, F, "f"))), s("button", {
922
+ class: "button-tertiary button-icon-only location-icon",
923
+ "aria-label": b(this, m, "f").header.selectLocationButton,
924
+ title: b(this, m, "f").header.selectLocationButton,
925
+ part: "button-select-location",
926
+ onClick: b(this, vt, "f")
927
+ }, s("ch-image", {
928
+ class: "icon-m",
929
+ src: It
930
+ }))))), this.isAdvanced ? s("ch-tab-render", {
931
+ // #tab
932
+ class: {
933
+ scrollable: true,
934
+ tab: true,
935
+ [Mt]: true
936
+ },
937
+ tabListPosition: "block-start",
938
+ model: b(this, _, "f"),
939
+ selectedId: Lt,
940
+ overflow: "auto",
941
+ contain: "size",
942
+ onSelectedItemChange: b(this, mt, "f")
943
+ }, s("div", {
944
+ slot: Lt,
945
+ class: Wt,
946
+ part: "tab-button-basic"
947
+ }, b(this, ot, "f").call(this)), this.advancedTabIsVisible && s("div", {
948
+ slot: Nt,
949
+ class: "advanced",
950
+ part: "tab-button-advanced"
951
+ }, b(this, at, "f").call(this))) : s("div", {
952
+ class: Mt
953
+ }, s("div", {
954
+ class: Wt
955
+ }, b(this, ot, "f").call(this))), s("footer", {
956
+ class: {
957
+ footer: true,
958
+ "dialog-footer-with-border": true,
959
+ "spacing-body-block-end": true,
960
+ "spacing-body-inline": true
961
+ }
962
+ }, this.connectionStatus && s("span", {
963
+ class: {
964
+ "connection-status": true,
965
+ [`connection-status--${this.connectionStatus}`]: true
966
+ },
967
+ part: `connection-status connection-status-${this.connectionStatus}`
968
+ }, b(this, m, "f").footer.connectionStatus[this.connectionStatus]), s("div", {
969
+ class: "buttons-spacer"
970
+ }, s("button", {
971
+ // #cancel
972
+ class: "button-secondary",
973
+ id: "button-cancel",
974
+ onClick: b(this, nt, "f"),
975
+ part: "button-cancel"
976
+ }, b(this, m, "f").footer.btnCancel), s("button", {
977
+ // #create
978
+ class: "button-primary",
979
+ id: "button-create",
980
+ disabled: this.connectionStatus === "failed" || this.connectionStatus === "connecting" || b(this, Y, "f").call(this),
981
+ onClick: b(this, lt, "f"),
982
+ part: "button-create"
983
+ }, b(this, m, "f").footer.btnCreate)))));
984
+ }
985
+ static get assetsDirs() {
986
+ return [ "gx-ide-assets/new-kb" ];
987
+ }
988
+ get el() {
989
+ return a(this);
990
+ }
991
+ static get watchers() {
992
+ return {
993
+ authenticationTypes: [ "watchAuthenticationTypes" ],
994
+ collations: [ "watchCollations" ],
995
+ serverInstances: [ "watchServerInstances" ],
996
+ defaultDataSources: [ "watchDefaultDataSources" ],
997
+ defaultPrototypingEnvironments: [ "watchDefaultPrototypingEnvironments" ],
998
+ prototypingTargets: [ "watchPrototypingTargets" ],
999
+ userInterfaceLanguages: [ "watchUserInterfaceLanguages" ]
1000
+ };
1001
+ }
1002
+ };
1003
+
1004
+ g = new WeakMap, m = new WeakMap, k = new WeakMap, w = new WeakMap, y = new WeakMap,
1005
+ x = new WeakMap, _ = new WeakMap, M = new WeakMap, W = new WeakMap, I = new WeakMap,
1006
+ T = new WeakMap, E = new WeakMap, D = new WeakMap, F = new WeakMap, j = new WeakMap,
1007
+ L = new WeakMap, N = new WeakMap, z = new WeakMap, C = new WeakMap, S = new WeakMap,
1008
+ P = new WeakMap, A = new WeakMap, B = new WeakMap, $ = new WeakMap, K = new WeakMap,
1009
+ U = new WeakMap, H = new WeakMap, O = new WeakMap, V = new WeakMap, G = new WeakMap,
1010
+ Q = new WeakMap, R = new WeakMap, X = new WeakMap, q = new WeakMap, J = new WeakMap,
1011
+ Y = new WeakMap, Z = new WeakMap, tt = new WeakMap, it = new WeakMap, st = new WeakMap,
1012
+ et = new WeakMap, at = new WeakMap, ot = new WeakMap, nt = new WeakMap, lt = new WeakMap,
1013
+ rt = new WeakMap, ht = new WeakMap, dt = new WeakMap, ct = new WeakMap, ft = new WeakMap,
1014
+ ut = new WeakMap, pt = new WeakMap, bt = new WeakMap, vt = new WeakMap, gt = new WeakMap,
1015
+ mt = new WeakMap, kt = new WeakMap, wt = new WeakMap;
1016
+
1017
+ zt.style = p;
1018
+
1019
+ export { zt as gx_ide_new_kb };
1020
+ //# sourceMappingURL=p-eeae9dd5.entry.js.map