@genexus/genexus-ide-ui 1.1.18 → 1.1.20
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/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-connect-gx-server.cjs.entry.js +8 -10
- package/dist/cjs/gx-ide-connect-gx-server.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-json-import.cjs.entry.js +31 -7
- package/dist/cjs/gx-ide-json-import.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/json-import/json-import.js +33 -9
- package/dist/collection/components/json-import/json-import.js.map +1 -1
- package/dist/collection/components/team-dev/connect-gx-server/connect-gx-server.js +8 -10
- package/dist/collection/components/team-dev/connect-gx-server/connect-gx-server.js.map +1 -1
- package/dist/components/gx-ide-connect-gx-server.js +8 -10
- package/dist/components/gx-ide-connect-gx-server.js.map +1 -1
- package/dist/components/gx-ide-json-import.js +32 -8
- package/dist/components/gx-ide-json-import.js.map +1 -1
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-connect-gx-server.entry.js +8 -10
- package/dist/esm/gx-ide-connect-gx-server.entry.js.map +1 -1
- package/dist/esm/gx-ide-json-import.entry.js +31 -7
- package/dist/esm/gx-ide-json-import.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
- package/dist/genexus-ide-ui/{p-2bfae98b.entry.js → p-8bb9242a.entry.js} +129 -106
- package/dist/genexus-ide-ui/p-8bb9242a.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-e502c2fd.entry.js → p-b822181c.entry.js} +21 -21
- package/dist/genexus-ide-ui/p-b822181c.entry.js.map +1 -0
- package/dist/types/components/json-import/json-import.d.ts +3 -1
- package/package.json +1 -1
- package/dist/genexus-ide-ui/p-2bfae98b.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-e502c2fd.entry.js.map +0 -1
|
@@ -1,136 +1,160 @@
|
|
|
1
|
-
import { r as t, g as i, h as e, H as s, a } from "./p-25a9f1d7.js";
|
|
1
|
+
import { r as t, g as i, h as e, H as s, a as n } from "./p-25a9f1d7.js";
|
|
2
2
|
|
|
3
|
-
import { g as
|
|
3
|
+
import { g as o } from "./p-2987a259.js";
|
|
4
4
|
|
|
5
|
-
import { c as
|
|
5
|
+
import { c as a } from "./p-13738332.js";
|
|
6
6
|
|
|
7
7
|
import { L as l } from "./p-311eedf3.js";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
import { v as r } from "./p-289c3290.js";
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const d = ':host{display:grid;grid-template-rows:max-content 1fr max-content;block-size:100%;overflow:auto}.section{display:contents}.main{display:grid;grid-template-rows:1fr max-content;overflow:auto}.field-group-name-description-module{grid-template-areas:"name-label name-input" "description-label description-input" "module-label module-entity-selector";grid-template-columns:max-content 1fr}.name-label{grid-area:name-label}.name-input{grid-area:name-input}.description-label{grid-area:description-label}.description-input{grid-area:description-input}.module-label{grid-area:module-label}.module-entity-selector{grid-area:module-entity-selector}.radio-file-input-wrapper{grid-template-columns:max-content 1fr}div.field-file-input{grid-template-columns:1fr max-content}.json-area{display:grid;grid-template-rows:1fr max-content;overflow:auto}.slotted-container{overflow:auto;block-size:100%}.input-file{display:grid;grid-template-columns:1fr max-content}.radio-group{gap:30px !important}.tooltip{height:0px}';
|
|
12
|
+
|
|
13
|
+
var h = undefined && undefined.__classPrivateFieldGet || function(t, i, e, s) {
|
|
12
14
|
if (e === "a" && !s) throw new TypeError("Private accessor was defined without a getter");
|
|
13
15
|
if (typeof i === "function" ? t !== i || !s : !i.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14
16
|
return e === "m" ? s : e === "a" ? s.call(t) : s ? s.value : i.get(t);
|
|
15
17
|
};
|
|
16
18
|
|
|
17
|
-
var
|
|
19
|
+
var c = undefined && undefined.__classPrivateFieldSet || function(t, i, e, s, n) {
|
|
18
20
|
if (s === "m") throw new TypeError("Private method is not writable");
|
|
19
|
-
if (s === "a" && !
|
|
20
|
-
if (typeof i === "function" ? t !== i || !
|
|
21
|
-
return s === "a" ?
|
|
21
|
+
if (s === "a" && !n) throw new TypeError("Private accessor was defined without a setter");
|
|
22
|
+
if (typeof i === "function" ? t !== i || !n : !i.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
23
|
+
return s === "a" ? n.call(t, e) : n ? n.value = e : i.set(t, e), e;
|
|
22
24
|
};
|
|
23
25
|
|
|
24
|
-
var
|
|
26
|
+
var f, p, u, m, b, v, g, w, y, k, M, W, x, j, C, E, T, F, P, z, I, L;
|
|
25
27
|
|
|
26
|
-
const
|
|
28
|
+
const S = [ "resets/box-sizing", "components/tab", "components/tooltip", "utils/form--full", "utils/layout", "utils/typography", "utils/spacing", "chameleon/scrollbar" ];
|
|
27
29
|
|
|
28
|
-
const
|
|
30
|
+
const V = o({
|
|
29
31
|
category: "gemini-tools",
|
|
30
32
|
name: "file",
|
|
31
33
|
colorType: "primary"
|
|
32
34
|
});
|
|
33
35
|
|
|
34
|
-
const
|
|
36
|
+
const _ = o({
|
|
35
37
|
category: "menus",
|
|
36
38
|
name: "delete",
|
|
37
39
|
colorType: "primary"
|
|
38
40
|
});
|
|
39
41
|
|
|
40
|
-
const
|
|
41
|
-
constructor(
|
|
42
|
-
t(this,
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
const A = class {
|
|
43
|
+
constructor(s) {
|
|
44
|
+
t(this, s);
|
|
45
|
+
f.set(this, void 0);
|
|
46
|
+
p.set(this, {
|
|
45
47
|
name: "",
|
|
46
48
|
description: "",
|
|
47
49
|
assumeVarcharForNull: false,
|
|
48
50
|
parentId: "",
|
|
49
51
|
json: ""
|
|
50
52
|
});
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
m.set(this, void 0);
|
|
53
|
+
u.set(this, []);
|
|
54
|
+
m.set(this, i(`./gx-ide-assets/json-import/shortcuts.json`));
|
|
54
55
|
b.set(this, void 0);
|
|
55
|
-
g.set(this, void 0);
|
|
56
56
|
v.set(this, void 0);
|
|
57
|
+
g.set(this, void 0);
|
|
57
58
|
w.set(this, void 0);
|
|
58
59
|
y.set(this, void 0);
|
|
59
60
|
k.set(this, void 0);
|
|
60
|
-
|
|
61
|
+
M.set(this, void 0);
|
|
62
|
+
W.set(this, (() => {
|
|
63
|
+
const t = [ h(this, k, "f"), h(this, y, "f") ];
|
|
64
|
+
t.forEach((t => {
|
|
65
|
+
if (t.id) {
|
|
66
|
+
this.validatableControls.set(t.id, {
|
|
67
|
+
reference: t,
|
|
68
|
+
hasError: false,
|
|
69
|
+
message: undefined
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}));
|
|
73
|
+
}));
|
|
74
|
+
x.set(this, (t => {
|
|
75
|
+
var i, s, n;
|
|
76
|
+
return ((s = (i = this.validatableControls) === null || i === void 0 ? void 0 : i.get(t === null || t === void 0 ? void 0 : t.id)) === null || s === void 0 ? void 0 : s.hasError) && ((n = this.validatableControls.get(t.id)) === null || n === void 0 ? void 0 : n.message) && e("ch-tooltip", {
|
|
77
|
+
class: "tooltip",
|
|
78
|
+
actionElement: t,
|
|
79
|
+
blockAlign: a.tooltipSettings.blockAlign,
|
|
80
|
+
inlineAlign: a.tooltipSettings.inlineAlign,
|
|
81
|
+
delay: a.tooltipSettings.delay
|
|
82
|
+
}, this.validatableControls.get(t.id).message);
|
|
83
|
+
}));
|
|
84
|
+
j.set(this, (() => {
|
|
61
85
|
var t, i;
|
|
62
|
-
const e = ((i = (t =
|
|
86
|
+
const e = ((i = (t = h(this, k, "f")) === null || t === void 0 ? void 0 : t.value) === null || i === void 0 ? void 0 : i.trim()) || "";
|
|
63
87
|
const s = this.radioGroupValue === "file" ? this.fileName : this.jsonContent;
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
this.isFormValid =
|
|
88
|
+
const n = this.validateNameCallback ? this.validateNameCallback(e) : Boolean(e);
|
|
89
|
+
const o = this.radioGroupValue === "file" ? Boolean(this.fileName) : this.validateJSONCallback ? this.validateJSONCallback(s) : false;
|
|
90
|
+
this.isFormValid = n && o;
|
|
67
91
|
}));
|
|
68
|
-
|
|
69
|
-
|
|
92
|
+
C.set(this, (() => {
|
|
93
|
+
h(this, j, "f").call(this);
|
|
70
94
|
}));
|
|
71
|
-
|
|
95
|
+
E.set(this, (() => {
|
|
72
96
|
var t;
|
|
73
|
-
this.radioGroupValue =
|
|
97
|
+
this.radioGroupValue = h(this, M, "f").value;
|
|
74
98
|
if (this.radioGroupValue === "file") {
|
|
75
|
-
|
|
99
|
+
h(this, b, "f").value = "false";
|
|
76
100
|
} else {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
101
|
+
h(this, p, "f").json = null;
|
|
102
|
+
h(this, F, "f").call(this);
|
|
103
|
+
h(this, j, "f").call(this);
|
|
80
104
|
}
|
|
81
105
|
(t = this.modeChangeCallback) === null || t === void 0 ? void 0 : t.call(this, this.radioGroupValue);
|
|
82
106
|
}));
|
|
83
|
-
|
|
107
|
+
T.set(this, (() => {
|
|
84
108
|
var t;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
this.confirmCallback(
|
|
90
|
-
this.
|
|
109
|
+
h(this, p, "f").name = h(this, k, "f").value;
|
|
110
|
+
h(this, p, "f").description = h(this, g, "f").value;
|
|
111
|
+
h(this, p, "f").parentId = (t = h(this, y, "f").value) === null || t === void 0 ? void 0 : t.id;
|
|
112
|
+
h(this, p, "f").assumeVarcharForNull = h(this, b, "f").value === "true";
|
|
113
|
+
this.confirmCallback(h(this, p, "f")).then((t => {
|
|
114
|
+
this.validatableControls = r(t, this.validatableControls);
|
|
91
115
|
}));
|
|
92
116
|
}));
|
|
93
|
-
|
|
117
|
+
F.set(this, (() => {
|
|
94
118
|
var t;
|
|
95
|
-
|
|
96
|
-
|
|
119
|
+
h(this, p, "f").json = null;
|
|
120
|
+
h(this, w, "f").value = null;
|
|
97
121
|
this.fileName = null;
|
|
98
122
|
(t = this.fileChangeCallback) === null || t === void 0 ? void 0 : t.call(this, null);
|
|
99
|
-
|
|
123
|
+
h(this, j, "f").call(this);
|
|
100
124
|
}));
|
|
101
|
-
|
|
125
|
+
P.set(this, (t => {
|
|
102
126
|
var i, e;
|
|
103
127
|
const s = t.target;
|
|
104
128
|
if (((i = s.files) === null || i === void 0 ? void 0 : i.length) > 0 && this.radioGroupValue === "file") {
|
|
105
|
-
|
|
129
|
+
h(this, p, "f").json = s.files[0];
|
|
106
130
|
this.fileName = s.files[0].name;
|
|
107
131
|
(e = this.fileChangeCallback) === null || e === void 0 ? void 0 : e.call(this, s.files[0]);
|
|
108
|
-
|
|
132
|
+
h(this, j, "f").call(this);
|
|
109
133
|
}
|
|
110
134
|
}));
|
|
111
|
-
|
|
112
|
-
|
|
135
|
+
z.set(this, (() => {
|
|
136
|
+
h(this, w, "f").click();
|
|
113
137
|
}));
|
|
114
|
-
|
|
115
|
-
|
|
138
|
+
I.set(this, (() => {
|
|
139
|
+
h(this, j, "f").call(this);
|
|
116
140
|
}));
|
|
117
|
-
|
|
141
|
+
L.set(this, (t => {
|
|
118
142
|
const i = t.target.assignedElements();
|
|
119
143
|
if (i.length > 0) {
|
|
120
144
|
const t = i[0];
|
|
121
145
|
t.addEventListener("json-content-change", (t => {
|
|
122
146
|
if (this.radioGroupValue === "text") {
|
|
123
147
|
this.jsonContent = t.detail.content;
|
|
124
|
-
|
|
148
|
+
h(this, I, "f").call(this);
|
|
125
149
|
}
|
|
126
150
|
}));
|
|
127
151
|
}
|
|
128
152
|
}));
|
|
129
153
|
this.fileName = undefined;
|
|
130
154
|
this.radioGroupValue = "file";
|
|
131
|
-
this.showTooltipError = false;
|
|
132
155
|
this.isFormValid = false;
|
|
133
156
|
this.jsonContent = "";
|
|
157
|
+
this.validatableControls = new Map;
|
|
134
158
|
this.cancelCallback = undefined;
|
|
135
159
|
this.confirmCallback = undefined;
|
|
136
160
|
this.defaultParent = undefined;
|
|
@@ -144,28 +168,31 @@ const V = class {
|
|
|
144
168
|
this.onJsonContentChange = undefined;
|
|
145
169
|
}
|
|
146
170
|
async componentWillLoad() {
|
|
147
|
-
|
|
148
|
-
|
|
171
|
+
c(this, f, await l.getComponentStrings(this.el), "f");
|
|
172
|
+
c(this, u, [ {
|
|
149
173
|
value: "file",
|
|
150
|
-
caption:
|
|
174
|
+
caption: h(this, f, "f").header.filePathLabel
|
|
151
175
|
}, {
|
|
152
176
|
value: "text",
|
|
153
|
-
caption:
|
|
177
|
+
caption: h(this, f, "f").main.jsonAreaLabel
|
|
154
178
|
} ], "f");
|
|
155
179
|
}
|
|
180
|
+
componentDidLoad() {
|
|
181
|
+
h(this, W, "f").call(this);
|
|
182
|
+
}
|
|
156
183
|
/**
|
|
157
184
|
* Suspends or reactivates the shortcuts
|
|
158
185
|
*/ async suspendShortcuts(t) {
|
|
159
|
-
|
|
186
|
+
h(this, v, "f").suspend = t;
|
|
160
187
|
}
|
|
161
188
|
render() {
|
|
162
189
|
return e(s, {
|
|
163
190
|
class: "widget"
|
|
164
191
|
}, e("ch-theme", {
|
|
165
|
-
model:
|
|
192
|
+
model: S
|
|
166
193
|
}), e("ch-shortcuts", {
|
|
167
|
-
src:
|
|
168
|
-
ref: t =>
|
|
194
|
+
src: h(this, m, "f"),
|
|
195
|
+
ref: t => c(this, v, t, "f")
|
|
169
196
|
}), e("section", {
|
|
170
197
|
class: "section"
|
|
171
198
|
}, e("header", {
|
|
@@ -176,40 +203,40 @@ const V = class {
|
|
|
176
203
|
// name
|
|
177
204
|
class: "label name-label",
|
|
178
205
|
htmlFor: "input-name"
|
|
179
|
-
},
|
|
206
|
+
}, h(this, f, "f").header.nameFieldLabel), e("ch-edit", {
|
|
180
207
|
class: "input name-input",
|
|
181
208
|
id: "input-name",
|
|
182
|
-
ref: t =>
|
|
183
|
-
onInput:
|
|
184
|
-
}), e("label", {
|
|
209
|
+
ref: t => c(this, k, t, "f"),
|
|
210
|
+
onInput: h(this, C, "f")
|
|
211
|
+
}), h(this, x, "f").call(this, h(this, k, "f")), e("label", {
|
|
185
212
|
// description
|
|
186
213
|
class: "label description-label",
|
|
187
214
|
htmlFor: "input-description"
|
|
188
|
-
},
|
|
215
|
+
}, h(this, f, "f").header.descriptionFieldLabel), e("ch-edit", {
|
|
189
216
|
class: "input description-input",
|
|
190
217
|
id: "input-description",
|
|
191
|
-
ref: t =>
|
|
218
|
+
ref: t => c(this, g, t, "f")
|
|
192
219
|
}), e("label", {
|
|
193
220
|
// module/folder
|
|
194
221
|
class: "label module-label",
|
|
195
222
|
htmlFor: "input-module"
|
|
196
|
-
},
|
|
223
|
+
}, h(this, f, "f").header.moduleFolderLabel), e("gx-ide-entity-selector", {
|
|
197
224
|
class: "module module-entity-selector",
|
|
198
225
|
id: "module",
|
|
199
226
|
value: this.defaultParent,
|
|
200
|
-
ref: t =>
|
|
227
|
+
ref: t => c(this, y, t, "f"),
|
|
201
228
|
labelPosition: "none",
|
|
202
229
|
defaultValue: this.defaultParent,
|
|
203
230
|
selectEntityCallback: this.selectModuleCallback
|
|
204
|
-
})), e("div", {
|
|
231
|
+
}), h(this, x, "f").call(this, h(this, y, "f"))), e("div", {
|
|
205
232
|
class: "radio-file-input-wrapper field-group"
|
|
206
233
|
}, e("ch-radio-group-render", {
|
|
207
234
|
// file url/text
|
|
208
235
|
class: "radio-group",
|
|
209
|
-
model:
|
|
210
|
-
onChange:
|
|
236
|
+
model: h(this, u, "f"),
|
|
237
|
+
onChange: h(this, E, "f"),
|
|
211
238
|
value: this.defaultRadioValue,
|
|
212
|
-
ref: t =>
|
|
239
|
+
ref: t => c(this, M, t, "f")
|
|
213
240
|
}), e("div", {
|
|
214
241
|
class: "field field-inline field-file-input"
|
|
215
242
|
}, e("ch-edit", {
|
|
@@ -220,35 +247,35 @@ const V = class {
|
|
|
220
247
|
type: "text",
|
|
221
248
|
value: this.fileName,
|
|
222
249
|
readonly: true,
|
|
223
|
-
placeholder:
|
|
224
|
-
startImgSrc:
|
|
250
|
+
placeholder: h(this, f, "f").header.fileNamePlaceholder,
|
|
251
|
+
startImgSrc: V,
|
|
225
252
|
disabled: this.radioGroupValue !== "file"
|
|
226
253
|
}), e("input", {
|
|
227
254
|
hidden: true,
|
|
228
255
|
type: "file",
|
|
229
256
|
accept: ".json",
|
|
230
|
-
onChange:
|
|
231
|
-
ref: t =>
|
|
257
|
+
onChange: h(this, P, "f"),
|
|
258
|
+
ref: t => c(this, w, t, "f")
|
|
232
259
|
}), e("div", {
|
|
233
260
|
class: "buttons-spacer"
|
|
234
261
|
}, e("button", {
|
|
235
|
-
"aria-label":
|
|
236
|
-
title:
|
|
262
|
+
"aria-label": h(this, f, "f").header.removeFileSelection,
|
|
263
|
+
title: h(this, f, "f").header.removeFileSelection,
|
|
237
264
|
id: "reset-all-button",
|
|
238
265
|
class: "button-tertiary button-icon-only",
|
|
239
266
|
part: "reset-all-button",
|
|
240
|
-
onClick:
|
|
267
|
+
onClick: h(this, F, "f"),
|
|
241
268
|
disabled: this.radioGroupValue !== "file"
|
|
242
269
|
}, e("ch-image", {
|
|
243
270
|
class: "icon-md",
|
|
244
|
-
src:
|
|
271
|
+
src: _
|
|
245
272
|
})), e("button", {
|
|
246
273
|
id: "select-file-load-button",
|
|
247
274
|
class: "button-primary",
|
|
248
275
|
part: "select-file-load-button",
|
|
249
|
-
onClick:
|
|
276
|
+
onClick: h(this, z, "f"),
|
|
250
277
|
disabled: this.radioGroupValue !== "file"
|
|
251
|
-
},
|
|
278
|
+
}, h(this, f, "f").header.selectfileButton))))), e("div", {
|
|
252
279
|
class: "main field-group"
|
|
253
280
|
}, e("div", {
|
|
254
281
|
class: "json-area"
|
|
@@ -256,17 +283,12 @@ const V = class {
|
|
|
256
283
|
class: "slotted-container scrollable"
|
|
257
284
|
}, e("slot", {
|
|
258
285
|
name: "JsonTextEditor",
|
|
259
|
-
onSlotchange:
|
|
260
|
-
})),
|
|
261
|
-
class: "tooltip",
|
|
262
|
-
blockAlign: o.tooltipSettings.blockAlign,
|
|
263
|
-
inlineAlign: o.tooltipSettings.inlineAlign,
|
|
264
|
-
delay: o.tooltipSettings.delay
|
|
265
|
-
}, "Error message")), e("ch-checkbox", {
|
|
286
|
+
onSlotchange: h(this, L, "f")
|
|
287
|
+
}))), e("ch-checkbox", {
|
|
266
288
|
class: "checkbox spacing-body-block-end spacing-body-inline-start",
|
|
267
|
-
caption:
|
|
289
|
+
caption: h(this, f, "f").main.checkBoxLabel,
|
|
268
290
|
checkedValue: "true",
|
|
269
|
-
ref: t =>
|
|
291
|
+
ref: t => c(this, b, t, "f")
|
|
270
292
|
})), e("footer", {
|
|
271
293
|
class: "control-footer control-footer-with-border spacing-body-block-end spacing-body-inline"
|
|
272
294
|
}, e("div", {
|
|
@@ -276,28 +298,29 @@ const V = class {
|
|
|
276
298
|
id: "button-cancel",
|
|
277
299
|
onClick: this.cancelCallback,
|
|
278
300
|
part: "button-cancel"
|
|
279
|
-
},
|
|
301
|
+
}, h(this, f, "f").footer.btnCancel), e("button", {
|
|
280
302
|
class: "button-primary",
|
|
281
303
|
id: "button-ok",
|
|
282
|
-
onClick:
|
|
304
|
+
onClick: h(this, T, "f"),
|
|
283
305
|
part: "button-ok",
|
|
284
306
|
disabled: !this.isFormValid
|
|
285
|
-
},
|
|
307
|
+
}, h(this, f, "f").footer.btnOk)))));
|
|
286
308
|
}
|
|
287
309
|
static get assetsDirs() {
|
|
288
310
|
return [ "gx-ide-assets/json-import" ];
|
|
289
311
|
}
|
|
290
312
|
get el() {
|
|
291
|
-
return
|
|
313
|
+
return n(this);
|
|
292
314
|
}
|
|
293
315
|
};
|
|
294
316
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
317
|
+
f = new WeakMap, p = new WeakMap, u = new WeakMap, m = new WeakMap, b = new WeakMap,
|
|
318
|
+
v = new WeakMap, g = new WeakMap, w = new WeakMap, y = new WeakMap, k = new WeakMap,
|
|
319
|
+
M = new WeakMap, W = new WeakMap, x = new WeakMap, j = new WeakMap, C = new WeakMap,
|
|
320
|
+
E = new WeakMap, T = new WeakMap, F = new WeakMap, P = new WeakMap, z = new WeakMap,
|
|
321
|
+
I = new WeakMap, L = new WeakMap;
|
|
299
322
|
|
|
300
|
-
|
|
323
|
+
A.style = d;
|
|
301
324
|
|
|
302
|
-
export {
|
|
303
|
-
//# sourceMappingURL=p-
|
|
325
|
+
export { A as gx_ide_json_import };
|
|
326
|
+
//# sourceMappingURL=p-8bb9242a.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jsonImportCss","CSS_BUNDLES","FILE_ICON","getIconPath","category","name","colorType","MENU_DELETE","GxIdeJsonImport","_GxIdeJsonImport_componentLocale","set","this","_GxIdeJsonImport_data","description","assumeVarcharForNull","parentId","json","_GxIdeJsonImport_radioOptionsModel","_GxIdeJsonImport_shortcutsSrc","getAssetPath","_GxIdeJsonImport_checkBoxEl","_GxIdeJsonImport_chShortcutsEl","_GxIdeJsonImport_descriptionEl","_GxIdeJsonImport_fileInputHiddenEl","_GxIdeJsonImport_moduleEntitySelector","_GxIdeJsonImport_nameEl","_GxIdeJsonImport_radioGroup","_GxIdeJsonImport_initializeValidatableControls","validatableControls","__classPrivateFieldGet","forEach","validatableControl","id","reference","hasError","message","undefined","_GxIdeJsonImport_evaluateTooltipRender","controlReference","_b","_a","get","_c","h","class","actionElement","blockAlign","config","tooltipSettings","inlineAlign","delay","_GxIdeJsonImport_validateForm","value","trim","radioGroupValue","fileName","jsonContent","isNameValid","validateNameCallback","Boolean","isJsonValid","validateJSONCallback","isFormValid","_GxIdeJsonImport_nameChangedHandler","call","_GxIdeJsonImport_changeRadioHandler","_GxIdeJsonImport_removeFileSelection","modeChangeCallback","_GxIdeJsonImport_createHandler","confirmCallback","then","formSubmitResult","validateControls","fileChangeCallback","_GxIdeJsonImport_selectFileInputChangedHandler","event","target","files","length","_GxIdeJsonImport_selectFileInputHandler","click","_GxIdeJsonImport_handleEditorChange","_GxIdeJsonImport_handleSlotChange","e","elements","assignedElements","element","addEventListener","detail","content","Map","componentWillLoad","__classPrivateFieldSet","Locale","getComponentStrings","el","caption","header","filePathLabel","main","jsonAreaLabel","componentDidLoad","suspendShortcuts","suspend","render","Host","model","src","ref","htmlFor","nameFieldLabel","onInput","descriptionFieldLabel","moduleFolderLabel","defaultParent","labelPosition","defaultValue","selectEntityCallback","selectModuleCallback","onChange","defaultRadioValue","autoFocus","part","type","readonly","placeholder","fileNamePlaceholder","startImgSrc","disabled","hidden","accept","removeFileSelection","title","onClick","selectfileButton","onSlotchange","checkBoxLabel","checkedValue","cancelCallback","footer","btnCancel","btnOk"],"sources":["src/components/json-import/json-import.scss?tag=gx-ide-json-import&encapsulation=shadow","src/components/json-import/json-import.tsx"],"sourcesContent":[":host {\n display: grid;\n grid-template-rows: max-content 1fr max-content;\n block-size: 100%;\n overflow: auto;\n}\n\n.section {\n // just for semantics (allows header and footer element)\n display: contents;\n}\n\n.header {\n}\n\n.main {\n display: grid;\n grid-template-rows: 1fr max-content;\n overflow: auto;\n}\n.field-group-name-description-module {\n grid-template-areas:\n \"name-label name-input\"\n \"description-label description-input\"\n \"module-label module-entity-selector\";\n grid-template-columns: max-content 1fr;\n}\n\n.name-label {\n grid-area: name-label;\n}\n.name-input {\n grid-area: name-input;\n}\n.description-label {\n grid-area: description-label;\n}\n.description-input {\n grid-area: description-input;\n}\n.module-label {\n grid-area: module-label;\n}\n.module-entity-selector {\n grid-area: module-entity-selector;\n}\n.radio-file-input-wrapper {\n grid-template-columns: max-content 1fr;\n}\ndiv.field-file-input {\n grid-template-columns: 1fr max-content;\n}\n\n.json-area {\n display: grid;\n grid-template-rows: 1fr max-content;\n overflow: auto;\n}\n.slotted-container {\n overflow: auto;\n block-size: 100%;\n}\n\n.input-file {\n display: grid;\n grid-template-columns: 1fr max-content;\n}\n\n.radio-group {\n gap: 30px !important;\n}\n.tooltip {\n height: 0px;\n}\n","import {\n Component,\n Host,\n Prop,\n Element,\n State,\n getAssetPath,\n Method,\n h\n} from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport { config } from \"../../common/config\";\n\nimport { Locale } from \"../../common/locale\";\nimport { FormSubmitResult } from \"../../common/types\";\nimport { RadioGroupItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/radio-group/types\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../common/form-validation\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/tab\",\n \"components/tooltip\",\n \"utils/form--full\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst FILE_ICON = getIconPath({\n category: \"gemini-tools\",\n name: \"file\",\n colorType: \"primary\"\n});\n\nconst MENU_DELETE = getIconPath({\n category: \"menus\",\n name: \"delete\",\n colorType: \"primary\"\n});\n\n@Component({\n tag: \"gx-ide-json-import\",\n styleUrl: \"json-import.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/json-import\"]\n})\nexport class GxIdeJsonImport {\n #componentLocale: any;\n #data: JsonImportData = {\n name: \"\",\n description: \"\",\n assumeVarcharForNull: false,\n parentId: \"\",\n json: \"\"\n };\n #radioOptionsModel: RadioGroupItemModel[] = [];\n #shortcutsSrc = getAssetPath(`./gx-ide-assets/json-import/shortcuts.json`);\n\n @Element() el: HTMLGxIdeJsonImportElement;\n #checkBoxEl!: HTMLChCheckboxElement;\n #chShortcutsEl: HTMLChShortcutsElement;\n #descriptionEl!: HTMLChEditElement;\n #fileInputHiddenEl!: HTMLInputElement;\n #moduleEntitySelector!: HTMLGxIdeEntitySelectorElement;\n #nameEl!: HTMLChEditElement;\n #radioGroup!: HTMLChRadioGroupRenderElement;\n\n @State() fileName: string;\n @State() radioGroupValue: string = \"file\";\n @State() isFormValid: boolean = false;\n @State() jsonContent: string = \"\";\n @State() validatableControls = new Map<string, ControlValidation>();\n\n /**\n * Callback that must be invoked when the user want to cancel the operation\n */\n @Prop() readonly cancelCallback: () => Promise<void>;\n\n /**\n * Callback that must be invoked when the user confirms the creation of the SDT. It receives as parameters the data necessary to create the SDT.\n */\n @Prop() readonly confirmCallback!: (\n data: JsonImportData\n ) => Promise<FormSubmitResult>;\n\n /**\n * Default value for Module/Folder field\n */\n @Prop() readonly defaultParent: EntityData;\n\n /**\n * Default value for Module/Folder field\n */\n @Prop() readonly defaultRadioValue: string;\n\n /**\n * Actual value for Module/Folder field\n */\n @Prop() readonly parent: EntityData;\n\n /**\n * Callback invoked when the action is executed in the Module/Folder filter. It returns the information of the selected object (id and name) or 'undefined' if it was canceled.\n */\n @Prop() readonly selectModuleCallback: SelectModuleCallback;\n\n /**\n * Callback invoked when the input mode changes between file and text.\n */\n @Prop() readonly modeChangeCallback?: (\n mode: \"file\" | \"text\"\n ) => Promise<void>;\n\n /**\n * Callback invoked when a file is selected or removed.\n */\n @Prop() readonly fileChangeCallback?: (file: File | null) => Promise<void>;\n\n /**\n * Callback para validar el nombre del objeto. Debe retornar true si el nombre es válido, false en caso contrario.\n */\n @Prop() readonly validateNameCallback?: (name: string) => boolean;\n\n /**\n * Callback para validar el JSON. Debe retornar true si el JSON es válido, false en caso contrario.\n */\n @Prop() readonly validateJSONCallback?: (json: string) => boolean;\n\n /**\n * Callback invocado cuando el contenido del JSON cambia\n */\n @Prop() readonly onJsonContentChange?: (content: string) => void;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.#radioOptionsModel = [\n {\n value: \"file\",\n caption: this.#componentLocale.header.filePathLabel\n },\n { value: \"text\", caption: this.#componentLocale.main.jsonAreaLabel }\n ];\n }\n\n componentDidLoad() {\n this.#initializeValidatableControls();\n }\n\n /**\n * Suspends or reactivates the shortcuts\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n this.#chShortcutsEl.suspend = suspendShortcuts;\n }\n\n #initializeValidatableControls = () => {\n const validatableControls: HTMLElement[] = [\n this.#nameEl,\n this.#moduleEntitySelector\n ];\n validatableControls.forEach(validatableControl => {\n if (validatableControl.id) {\n this.validatableControls.set(validatableControl.id, {\n reference: validatableControl,\n hasError: false,\n message: undefined\n });\n }\n });\n };\n\n #evaluateTooltipRender = (\n controlReference: HTMLElement\n ): HTMLChTooltipElement =>\n this.validatableControls?.get(controlReference?.id)?.hasError &&\n this.validatableControls.get(controlReference.id)?.message && (\n <ch-tooltip\n class=\"tooltip\"\n actionElement={controlReference as unknown as HTMLButtonElement}\n blockAlign={config.tooltipSettings.blockAlign}\n inlineAlign={config.tooltipSettings.inlineAlign}\n delay={config.tooltipSettings.delay}\n >\n {this.validatableControls.get(controlReference.id).message}\n </ch-tooltip>\n );\n\n #validateForm = () => {\n const name = this.#nameEl?.value?.trim() || \"\";\n const json =\n this.radioGroupValue === \"file\" ? this.fileName : this.jsonContent;\n\n const isNameValid = this.validateNameCallback\n ? this.validateNameCallback(name)\n : Boolean(name);\n\n const isJsonValid =\n this.radioGroupValue === \"file\"\n ? Boolean(this.fileName)\n : this.validateJSONCallback\n ? this.validateJSONCallback(json)\n : false;\n\n this.isFormValid = isNameValid && isJsonValid;\n };\n\n #nameChangedHandler = () => {\n this.#validateForm();\n };\n\n #changeRadioHandler = () => {\n this.radioGroupValue = this.#radioGroup.value;\n if (this.radioGroupValue === \"file\") {\n this.#checkBoxEl.value = \"false\";\n } else {\n this.#data.json = null;\n this.#removeFileSelection();\n this.#validateForm();\n }\n this.modeChangeCallback?.(this.radioGroupValue as \"file\" | \"text\");\n };\n\n #createHandler = () => {\n this.#data.name = this.#nameEl.value;\n this.#data.description = this.#descriptionEl.value;\n this.#data.parentId = this.#moduleEntitySelector.value?.id;\n this.#data.assumeVarcharForNull = this.#checkBoxEl.value === \"true\";\n this.confirmCallback(this.#data).then(\n (formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n }\n );\n };\n\n #removeFileSelection = () => {\n this.#data.json = null;\n this.#fileInputHiddenEl.value = null;\n this.fileName = null;\n this.fileChangeCallback?.(null);\n this.#validateForm();\n };\n\n #selectFileInputChangedHandler = (event: InputEvent) => {\n const target = event.target as HTMLInputElement;\n if (target.files?.length > 0 && this.radioGroupValue === \"file\") {\n this.#data.json = target.files[0];\n this.fileName = target.files[0].name;\n this.fileChangeCallback?.(target.files[0]);\n this.#validateForm();\n }\n };\n\n #selectFileInputHandler = () => {\n this.#fileInputHiddenEl.click();\n };\n\n #handleEditorChange = () => {\n this.#validateForm();\n };\n\n #handleSlotChange = (e: Event) => {\n const elements = (e.target as HTMLSlotElement).assignedElements();\n if (elements.length > 0) {\n const element = elements[0];\n element.addEventListener(\"json-content-change\", ((event: CustomEvent) => {\n if (this.radioGroupValue === \"text\") {\n this.jsonContent = event.detail.content;\n this.#handleEditorChange();\n }\n }) as EventListener);\n }\n };\n\n render(): void {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n <section class=\"section\">\n <header class=\"header field-group spacing-body control-header-with-border\">\n <div class=\"field-group field-group-name-description-module\">\n <label\n // name\n class=\"label name-label\"\n htmlFor=\"input-name\"\n >\n {this.#componentLocale.header.nameFieldLabel}\n </label>\n <ch-edit\n class=\"input name-input\"\n id=\"input-name\"\n ref={(el: HTMLChEditElement) =>\n (this.#nameEl = el as HTMLChEditElement)\n }\n onInput={this.#nameChangedHandler}\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#nameEl)}\n\n <label\n // description\n class=\"label description-label\"\n htmlFor=\"input-description\"\n >\n {this.#componentLocale.header.descriptionFieldLabel}\n </label>\n <ch-edit\n class=\"input description-input\"\n id=\"input-description\"\n ref={(el: HTMLChEditElement) =>\n (this.#descriptionEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n\n <label\n // module/folder\n class=\"label module-label\"\n htmlFor=\"input-module\"\n >\n {this.#componentLocale.header.moduleFolderLabel}\n </label>\n <gx-ide-entity-selector\n class=\"module module-entity-selector\"\n id=\"module\"\n value={this.defaultParent}\n ref={(el: HTMLGxIdeEntitySelectorElement) =>\n (this.#moduleEntitySelector =\n el as HTMLGxIdeEntitySelectorElement)\n }\n labelPosition=\"none\"\n defaultValue={this.defaultParent}\n selectEntityCallback={this.selectModuleCallback}\n ></gx-ide-entity-selector>\n {this.#evaluateTooltipRender(this.#moduleEntitySelector)}\n </div>\n\n <div class=\"radio-file-input-wrapper field-group\">\n <ch-radio-group-render\n // file url/text\n class=\"radio-group\"\n model={this.#radioOptionsModel}\n onChange={this.#changeRadioHandler}\n value={this.defaultRadioValue}\n ref={(el: HTMLChRadioGroupRenderElement) =>\n (this.#radioGroup = el as HTMLChRadioGroupRenderElement)\n }\n ></ch-radio-group-render>\n <div class=\"field field-inline field-file-input\">\n <ch-edit\n autoFocus\n id=\"file-name\"\n class=\"input\"\n part=\"file-name\"\n type=\"text\"\n value={this.fileName}\n readonly\n placeholder={this.#componentLocale.header.fileNamePlaceholder}\n startImgSrc={FILE_ICON}\n disabled={this.radioGroupValue !== \"file\"}\n ></ch-edit>\n <input\n hidden\n type=\"file\"\n accept=\".json\"\n onChange={this.#selectFileInputChangedHandler}\n ref={(el: HTMLInputElement) =>\n (this.#fileInputHiddenEl = el as HTMLInputElement)\n }\n />\n <div class=\"buttons-spacer\">\n <button\n aria-label={\n this.#componentLocale.header.removeFileSelection\n }\n title={this.#componentLocale.header.removeFileSelection}\n id=\"reset-all-button\"\n class=\"button-tertiary button-icon-only\"\n part=\"reset-all-button\"\n onClick={this.#removeFileSelection}\n disabled={this.radioGroupValue !== \"file\"}\n >\n <ch-image class=\"icon-md\" src={MENU_DELETE}></ch-image>\n </button>\n\n <button\n id=\"select-file-load-button\"\n class=\"button-primary\"\n part=\"select-file-load-button\"\n onClick={this.#selectFileInputHandler}\n disabled={this.radioGroupValue !== \"file\"}\n >\n {this.#componentLocale.header.selectfileButton}\n </button>\n </div>\n </div>\n </div>\n </header>\n <div class=\"main field-group\">\n <div class=\"json-area\">\n <div class=\"slotted-container scrollable\">\n <slot\n name=\"JsonTextEditor\"\n onSlotchange={this.#handleSlotChange}\n ></slot>\n </div>\n </div>\n <ch-checkbox\n class=\"checkbox spacing-body-block-end spacing-body-inline-start\"\n caption={this.#componentLocale.main.checkBoxLabel}\n checkedValue=\"true\"\n ref={(el: HTMLChCheckboxElement) =>\n (this.#checkBoxEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n </div>\n\n <footer class=\"control-footer control-footer-with-border spacing-body-block-end spacing-body-inline\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n id=\"button-cancel\"\n onClick={this.cancelCallback}\n part=\"button-cancel\"\n >\n {this.#componentLocale.footer.btnCancel}\n </button>\n <button\n class=\"button-primary\"\n id=\"button-ok\"\n onClick={this.#createHandler}\n part=\"button-ok\"\n disabled={!this.isFormValid}\n >\n {this.#componentLocale.footer.btnOk}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type JsonImportData = {\n name: string;\n description: string;\n parentId: string;\n json: File | string;\n assumeVarcharForNull: boolean;\n};\n\nexport type EntityData = {\n id: string;\n name: string;\n iconSrc?: string;\n};\n\nexport type SelectModuleCallback = () => Promise<EntityData | undefined>;\n"],"mappings":";;;;;;;;;;AAAA,MAAMA,IAAgB;;;;;;;;;;;;;;;;;ACsBtB,MAAMC,IAA8B,EAClC,qBACA,kBACA,sBACA,oBACA,gBACA,oBACA,iBACA;;AAGF,MAAMC,IAAYC,EAAY;EAC5BC,UAAU;EACVC,MAAM;EACNC,WAAW;;;AAGb,MAAMC,IAAcJ,EAAY;EAC9BC,UAAU;EACVC,MAAM;EACNC,WAAW;;;MASAE,IAAe;;;IAC1BC,EAAAC,IA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,KAAKpG;SAGjCoC,EAAA;MACEX,IAAG;MACHY,OAAM;MACN8E,MAAK;MACLW,SAASxG,EAAAlB,MAAIoE,GAAA;MACbiD,UAAUrH,KAAK2C,oBAAoB;OAElCzB,EAAAlB,MAAIF,GAAA,KAAkBwF,OAAOqC,uBAMxC3F,EAAA;MAAKC,OAAM;OACTD,EAAA;MAAKC,OAAM;OACTD,EAAA;MAAKC,OAAM;OACTD,EAAA;MACEtC,MAAK;MACLkI,cAAc1G,EAAAlB,MAAIuE,GAAA;UAIxBvC,EAAA;MACEC,OAAM;MACNoD,SAASnE,EAAAlB,MAAIF,GAAA,KAAkB0F,KAAKqC;MACpCC,cAAa;MACb7B,KAAMb,KACHH,EAAAjF,MAAIS,GAAe2E,GAA2B;SAKrDpD,EAAA;MAAQC,OAAM;OACZD,EAAA;MAAKC,OAAM;OACTD,EAAA;MACEC,OAAM;MACNZ,IAAG;MACHqG,SAAS1H,KAAK+H;MACdhB,MAAK;OAEJ7F,EAAAlB,MAAIF,GAAA,KAAkBkI,OAAOC,YAEhCjG,EAAA;MACEC,OAAM;MACNZ,IAAG;MACHqG,SAASxG,EAAAlB,MAAIyD,GAAA;MACbsD,MAAK;MACLM,WAAWrH,KAAKmD;OAEfjC,EAAAlB,MAAIF,GAAA,KAAkBkI,OAAOE"}
|
|
@@ -24,14 +24,14 @@ var l = undefined && undefined.__classPrivateFieldGet || function(e, t, s, i) {
|
|
|
24
24
|
return s === "m" ? i : s === "a" ? i.call(e) : i ? i.value : t.get(e);
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var h = undefined && undefined.__classPrivateFieldSet || function(e, t, s, i, a) {
|
|
28
28
|
if (i === "m") throw new TypeError("Private method is not writable");
|
|
29
29
|
if (i === "a" && !a) throw new TypeError("Private accessor was defined without a setter");
|
|
30
30
|
if (typeof t === "function" ? e !== t || !a : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
31
31
|
return i === "a" ? a.call(e, s) : a ? a.value = s : t.set(e, s), s;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var d, c, u, f, p, v, m, w, b, g, y, k, M;
|
|
35
35
|
|
|
36
36
|
const x = [ "resets/box-sizing", "components/tab", "components/tooltip", "utils/form--full", "utils/layout", "utils/typography", "utils/spacing", "chameleon/scrollbar" ];
|
|
37
37
|
|
|
@@ -42,7 +42,7 @@ const W = class {
|
|
|
42
42
|
* The component hard-coded strings translations.
|
|
43
43
|
*/
|
|
44
44
|
// eslint-disable-next-line @stencil-community/own-props-must-be-private
|
|
45
|
-
|
|
45
|
+
d.set(this, void 0);
|
|
46
46
|
c.set(this, void 0);
|
|
47
47
|
u.set(this, void 0);
|
|
48
48
|
f.set(this, void 0);
|
|
@@ -67,20 +67,20 @@ const W = class {
|
|
|
67
67
|
}, this.validatableControls.get(e.id).message);
|
|
68
68
|
}));
|
|
69
69
|
w.set(this, (() => {
|
|
70
|
-
var e, t, s, i, a, n
|
|
70
|
+
var e, t, s, i, a, n;
|
|
71
71
|
this.authenticationTypesChanged(this.authenticationTypes);
|
|
72
72
|
this.serverUrlsChanged(this.serverUrls);
|
|
73
73
|
// set initial values:
|
|
74
74
|
// server url
|
|
75
|
-
this.gxServerConnectionData.serverUrl =
|
|
75
|
+
this.gxServerConnectionData.serverUrl = "";
|
|
76
76
|
// authentication type
|
|
77
77
|
this.gxServerConnectionData.authenticationType = {
|
|
78
|
-
id: ((
|
|
79
|
-
name: ((
|
|
78
|
+
id: ((e = this.defaultConnectionData) === null || e === void 0 ? void 0 : e.authenticationType.id) || ((t = this.authenticationTypesComboBoxModel[0]) === null || t === void 0 ? void 0 : t.value),
|
|
79
|
+
name: ((s = this.defaultConnectionData) === null || s === void 0 ? void 0 : s.authenticationType.name) || ((i = this.authenticationTypesComboBoxModel[0]) === null || i === void 0 ? void 0 : i.caption)
|
|
80
80
|
};
|
|
81
81
|
// user name
|
|
82
|
-
this.gxServerConnectionData.userName = (
|
|
83
|
-
this.gxServerConnectionData.userPassword = (
|
|
82
|
+
this.gxServerConnectionData.userName = (a = this.defaultConnectionData) === null || a === void 0 ? void 0 : a.userName;
|
|
83
|
+
this.gxServerConnectionData.userPassword = (n = this.defaultConnectionData) === null || n === void 0 ? void 0 : n.userPassword;
|
|
84
84
|
}));
|
|
85
85
|
b.set(this, (() => {
|
|
86
86
|
// populate #controlsValidation with the controls that could have errors.
|
|
@@ -144,7 +144,7 @@ const W = class {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
async componentWillLoad() {
|
|
147
|
-
|
|
147
|
+
h(this, d, await n.getComponentStrings(this.el), "f");
|
|
148
148
|
l(this, w, "f").call(this);
|
|
149
149
|
}
|
|
150
150
|
async componentDidLoad() {
|
|
@@ -166,7 +166,7 @@ const W = class {
|
|
|
166
166
|
}, t("label", {
|
|
167
167
|
class: "label",
|
|
168
168
|
htmlFor: "server-url"
|
|
169
|
-
}, l(this,
|
|
169
|
+
}, l(this, d, "f").main.serverURLLabel), t("ch-combo-box-render", {
|
|
170
170
|
id: "server-url",
|
|
171
171
|
class: "combo-box",
|
|
172
172
|
accessibleName: "Server Url",
|
|
@@ -185,14 +185,14 @@ const W = class {
|
|
|
185
185
|
renderActiveItemIconOnExpand: true,
|
|
186
186
|
strict: false
|
|
187
187
|
},
|
|
188
|
-
ref: e =>
|
|
188
|
+
ref: e => h(this, f, e, "f")
|
|
189
189
|
}), l(this, m, "f").call(this, l(this, f, "f"))), t("div", {
|
|
190
190
|
// authentication types
|
|
191
191
|
class: "field field-block authentication-type"
|
|
192
192
|
}, t("label", {
|
|
193
193
|
class: "label",
|
|
194
194
|
htmlFor: "authentication-type"
|
|
195
|
-
}, l(this,
|
|
195
|
+
}, l(this, d, "f").main.authenticationTypeLabel), t("ch-combo-box-render", {
|
|
196
196
|
id: "authentication-type",
|
|
197
197
|
class: "combo-box",
|
|
198
198
|
accessibleName: "Authentication Types",
|
|
@@ -206,26 +206,26 @@ const W = class {
|
|
|
206
206
|
}, t("label", {
|
|
207
207
|
class: "label",
|
|
208
208
|
htmlFor: "username"
|
|
209
|
-
}, l(this,
|
|
209
|
+
}, l(this, d, "f").main.usernameLabel), t("ch-edit", {
|
|
210
210
|
type: "text",
|
|
211
211
|
id: "username",
|
|
212
212
|
class: "input",
|
|
213
213
|
value: (a = this.gxServerConnectionData) === null || a === void 0 ? void 0 : a.userName,
|
|
214
214
|
onInput: l(this, k, "f"),
|
|
215
|
-
ref: e =>
|
|
215
|
+
ref: e => h(this, c, e, "f")
|
|
216
216
|
}), l(this, m, "f").call(this, l(this, c, "f"))), t("div", {
|
|
217
217
|
// user password
|
|
218
218
|
class: "field field-block user-password"
|
|
219
219
|
}, t("label", {
|
|
220
220
|
class: "label",
|
|
221
221
|
htmlFor: "password"
|
|
222
|
-
}, l(this,
|
|
222
|
+
}, l(this, d, "f").main.passwordLabel), t("ch-edit", {
|
|
223
223
|
type: "password",
|
|
224
224
|
id: "password",
|
|
225
225
|
class: "input",
|
|
226
226
|
value: (n = this.gxServerConnectionData) === null || n === void 0 ? void 0 : n.userPassword,
|
|
227
227
|
onInput: l(this, M, "f"),
|
|
228
|
-
ref: e =>
|
|
228
|
+
ref: e => h(this, u, e, "f")
|
|
229
229
|
}), l(this, m, "f").call(this, l(this, u, "f")))), t("footer", {
|
|
230
230
|
class: "control-footer-with-border spacing-body"
|
|
231
231
|
}, t("div", {
|
|
@@ -234,11 +234,11 @@ const W = class {
|
|
|
234
234
|
// cancel button
|
|
235
235
|
class: "button-secondary",
|
|
236
236
|
onClick: l(this, p, "f")
|
|
237
|
-
}, l(this,
|
|
237
|
+
}, l(this, d, "f").footer.cancelButtonCaption), t("button", {
|
|
238
238
|
// connect button
|
|
239
239
|
class: "button-primary",
|
|
240
240
|
onClick: l(this, v, "f")
|
|
241
|
-
}, l(this,
|
|
241
|
+
}, l(this, d, "f").footer.connectButtonCaption)))));
|
|
242
242
|
}
|
|
243
243
|
static get assetsDirs() {
|
|
244
244
|
return [ "gx-ide-assets/connect-gx-server" ];
|
|
@@ -254,11 +254,11 @@ const W = class {
|
|
|
254
254
|
}
|
|
255
255
|
};
|
|
256
256
|
|
|
257
|
-
|
|
257
|
+
d = new WeakMap, c = new WeakMap, u = new WeakMap, f = new WeakMap, p = new WeakMap,
|
|
258
258
|
v = new WeakMap, m = new WeakMap, w = new WeakMap, b = new WeakMap, g = new WeakMap,
|
|
259
259
|
y = new WeakMap, k = new WeakMap, M = new WeakMap;
|
|
260
260
|
|
|
261
261
|
W.style = r;
|
|
262
262
|
|
|
263
263
|
export { W as gx_ide_connect_gx_server };
|
|
264
|
-
//# sourceMappingURL=p-
|
|
264
|
+
//# sourceMappingURL=p-b822181c.entry.js.map
|