@genexus/genexus-ide-ui 1.1.16 → 1.1.18
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-json-import.cjs.entry.js +201 -0
- package/dist/cjs/gx-ide-json-import.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-object-selector.cjs.entry.js +2 -2
- package/dist/cjs/gx-ide-object-selector.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-team-dev-bring-changes.cjs.entry.js +30 -17
- package/dist/cjs/gx-ide-team-dev-bring-changes.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/json-import/gx-ide-assets/json-import/langs/json-import.lang.en.json +18 -0
- package/dist/collection/components/json-import/gx-ide-assets/json-import/langs/json-import.lang.ja.json +18 -0
- package/dist/collection/components/json-import/gx-ide-assets/json-import/langs/json-import.lang.zh.json +18 -0
- package/dist/collection/components/json-import/gx-ide-assets/json-import/shortcuts.json +15 -0
- package/dist/collection/components/json-import/json-import.css +77 -0
- package/dist/collection/components/json-import/json-import.js +458 -0
- package/dist/collection/components/json-import/json-import.js.map +1 -0
- package/dist/collection/components/object-selector/object-selector.js +2 -2
- package/dist/collection/components/object-selector/object-selector.js.map +1 -1
- package/dist/collection/components/team-dev/bring-changes/bring-changes.css +2 -2
- package/dist/collection/components/team-dev/bring-changes/bring-changes.js +54 -17
- package/dist/collection/components/team-dev/bring-changes/bring-changes.js.map +1 -1
- package/dist/collection/components/team-dev/bring-changes/gx-ide-assets/team-dev-bring-changes/langs/team-dev-bring-changes.lang.en.json +9 -3
- package/dist/collection/components/team-dev/bring-changes/gx-ide-assets/team-dev-bring-changes/langs/team-dev-bring-changes.lang.ja.json +9 -3
- package/dist/collection/components/team-dev/bring-changes/gx-ide-assets/team-dev-bring-changes/langs/team-dev-bring-changes.lang.zh.json +9 -3
- package/dist/collection/testing/locale.e2e.js +1 -0
- package/dist/collection/testing/locale.e2e.js.map +1 -1
- package/dist/components/gx-ide-json-import.d.ts +11 -0
- package/dist/components/gx-ide-json-import.js +239 -0
- package/dist/components/gx-ide-json-import.js.map +1 -0
- package/dist/components/gx-ide-object-selector.js +2 -2
- package/dist/components/gx-ide-object-selector.js.map +1 -1
- package/dist/components/gx-ide-team-dev-bring-changes.js +31 -17
- package/dist/components/gx-ide-team-dev-bring-changes.js.map +1 -1
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-json-import.entry.js +197 -0
- package/dist/esm/gx-ide-json-import.entry.js.map +1 -0
- package/dist/esm/gx-ide-object-selector.entry.js +2 -2
- package/dist/esm/gx-ide-object-selector.entry.js.map +1 -1
- package/dist/esm/gx-ide-team-dev-bring-changes.entry.js +30 -17
- package/dist/esm/gx-ide-team-dev-bring-changes.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/gx-ide-assets/json-import/langs/json-import.lang.en.json +18 -0
- package/dist/genexus-ide-ui/gx-ide-assets/json-import/langs/json-import.lang.ja.json +18 -0
- package/dist/genexus-ide-ui/gx-ide-assets/json-import/langs/json-import.lang.zh.json +18 -0
- package/dist/genexus-ide-ui/gx-ide-assets/json-import/shortcuts.json +15 -0
- package/dist/genexus-ide-ui/gx-ide-assets/team-dev-bring-changes/langs/team-dev-bring-changes.lang.en.json +9 -3
- package/dist/genexus-ide-ui/gx-ide-assets/team-dev-bring-changes/langs/team-dev-bring-changes.lang.ja.json +9 -3
- package/dist/genexus-ide-ui/gx-ide-assets/team-dev-bring-changes/langs/team-dev-bring-changes.lang.zh.json +9 -3
- package/dist/genexus-ide-ui/p-2bfae98b.entry.js +303 -0
- package/dist/genexus-ide-ui/p-2bfae98b.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-16138f55.entry.js → p-3fbc5a02.entry.js} +38 -37
- package/dist/genexus-ide-ui/p-3fbc5a02.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-83cc3bcd.entry.js → p-ac131847.entry.js} +7 -7
- package/dist/genexus-ide-ui/{p-83cc3bcd.entry.js.map → p-ac131847.entry.js.map} +1 -1
- package/dist/types/components/json-import/json-import.d.ts +73 -0
- package/dist/types/components/team-dev/bring-changes/bring-changes.d.ts +8 -3
- package/dist/types/components.d.ts +141 -18
- package/package.json +1 -1
- package/dist/genexus-ide-ui/p-16138f55.entry.js.map +0 -1
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import { r as t, g as i, h as e, H as s, a } from "./p-25a9f1d7.js";
|
|
2
|
+
|
|
3
|
+
import { g as n } from "./p-2987a259.js";
|
|
4
|
+
|
|
5
|
+
import { c as o } from "./p-13738332.js";
|
|
6
|
+
|
|
7
|
+
import { L as l } from "./p-311eedf3.js";
|
|
8
|
+
|
|
9
|
+
const r = ':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}';
|
|
10
|
+
|
|
11
|
+
var d = undefined && undefined.__classPrivateFieldGet || function(t, i, e, s) {
|
|
12
|
+
if (e === "a" && !s) throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
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
|
+
return e === "m" ? s : e === "a" ? s.call(t) : s ? s.value : i.get(t);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var h = undefined && undefined.__classPrivateFieldSet || function(t, i, e, s, a) {
|
|
18
|
+
if (s === "m") throw new TypeError("Private method is not writable");
|
|
19
|
+
if (s === "a" && !a) throw new TypeError("Private accessor was defined without a setter");
|
|
20
|
+
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");
|
|
21
|
+
return s === "a" ? a.call(t, e) : a ? a.value = e : i.set(t, e), e;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var c, f, p, u, m, b, g, v, w, y, k, x, W, M, j, C, E, T, F, P;
|
|
25
|
+
|
|
26
|
+
const z = [ "resets/box-sizing", "components/tab", "components/tooltip", "utils/form--full", "utils/layout", "utils/typography", "utils/spacing", "chameleon/scrollbar" ];
|
|
27
|
+
|
|
28
|
+
const I = n({
|
|
29
|
+
category: "gemini-tools",
|
|
30
|
+
name: "file",
|
|
31
|
+
colorType: "primary"
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const S = n({
|
|
35
|
+
category: "menus",
|
|
36
|
+
name: "delete",
|
|
37
|
+
colorType: "primary"
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const V = class {
|
|
41
|
+
constructor(e) {
|
|
42
|
+
t(this, e);
|
|
43
|
+
c.set(this, void 0);
|
|
44
|
+
f.set(this, {
|
|
45
|
+
name: "",
|
|
46
|
+
description: "",
|
|
47
|
+
assumeVarcharForNull: false,
|
|
48
|
+
parentId: "",
|
|
49
|
+
json: ""
|
|
50
|
+
});
|
|
51
|
+
p.set(this, []);
|
|
52
|
+
u.set(this, i(`./gx-ide-assets/json-import/shortcuts.json`));
|
|
53
|
+
m.set(this, void 0);
|
|
54
|
+
b.set(this, void 0);
|
|
55
|
+
g.set(this, void 0);
|
|
56
|
+
v.set(this, void 0);
|
|
57
|
+
w.set(this, void 0);
|
|
58
|
+
y.set(this, void 0);
|
|
59
|
+
k.set(this, void 0);
|
|
60
|
+
x.set(this, (() => {
|
|
61
|
+
var t, i;
|
|
62
|
+
const e = ((i = (t = d(this, y, "f")) === null || t === void 0 ? void 0 : t.value) === null || i === void 0 ? void 0 : i.trim()) || "";
|
|
63
|
+
const s = this.radioGroupValue === "file" ? this.fileName : this.jsonContent;
|
|
64
|
+
const a = this.validateNameCallback ? this.validateNameCallback(e) : Boolean(e);
|
|
65
|
+
const n = this.radioGroupValue === "file" ? Boolean(this.fileName) : this.validateJSONCallback ? this.validateJSONCallback(s) : false;
|
|
66
|
+
this.isFormValid = a && n;
|
|
67
|
+
}));
|
|
68
|
+
W.set(this, (() => {
|
|
69
|
+
d(this, x, "f").call(this);
|
|
70
|
+
}));
|
|
71
|
+
M.set(this, (() => {
|
|
72
|
+
var t;
|
|
73
|
+
this.radioGroupValue = d(this, k, "f").value;
|
|
74
|
+
if (this.radioGroupValue === "file") {
|
|
75
|
+
d(this, m, "f").value = "false";
|
|
76
|
+
} else {
|
|
77
|
+
d(this, f, "f").json = null;
|
|
78
|
+
d(this, C, "f").call(this);
|
|
79
|
+
d(this, x, "f").call(this);
|
|
80
|
+
}
|
|
81
|
+
(t = this.modeChangeCallback) === null || t === void 0 ? void 0 : t.call(this, this.radioGroupValue);
|
|
82
|
+
}));
|
|
83
|
+
j.set(this, (() => {
|
|
84
|
+
var t;
|
|
85
|
+
d(this, f, "f").name = d(this, y, "f").value;
|
|
86
|
+
d(this, f, "f").description = d(this, g, "f").value;
|
|
87
|
+
d(this, f, "f").parentId = (t = d(this, w, "f").value) === null || t === void 0 ? void 0 : t.id;
|
|
88
|
+
d(this, f, "f").assumeVarcharForNull = d(this, m, "f").value === "true";
|
|
89
|
+
this.confirmCallback(d(this, f, "f")).then((t => {
|
|
90
|
+
this.showTooltipError = !t.success;
|
|
91
|
+
}));
|
|
92
|
+
}));
|
|
93
|
+
C.set(this, (() => {
|
|
94
|
+
var t;
|
|
95
|
+
d(this, f, "f").json = null;
|
|
96
|
+
d(this, v, "f").value = null;
|
|
97
|
+
this.fileName = null;
|
|
98
|
+
(t = this.fileChangeCallback) === null || t === void 0 ? void 0 : t.call(this, null);
|
|
99
|
+
d(this, x, "f").call(this);
|
|
100
|
+
}));
|
|
101
|
+
E.set(this, (t => {
|
|
102
|
+
var i, e;
|
|
103
|
+
const s = t.target;
|
|
104
|
+
if (((i = s.files) === null || i === void 0 ? void 0 : i.length) > 0 && this.radioGroupValue === "file") {
|
|
105
|
+
d(this, f, "f").json = s.files[0];
|
|
106
|
+
this.fileName = s.files[0].name;
|
|
107
|
+
(e = this.fileChangeCallback) === null || e === void 0 ? void 0 : e.call(this, s.files[0]);
|
|
108
|
+
d(this, x, "f").call(this);
|
|
109
|
+
}
|
|
110
|
+
}));
|
|
111
|
+
T.set(this, (() => {
|
|
112
|
+
d(this, v, "f").click();
|
|
113
|
+
}));
|
|
114
|
+
F.set(this, (() => {
|
|
115
|
+
d(this, x, "f").call(this);
|
|
116
|
+
}));
|
|
117
|
+
P.set(this, (t => {
|
|
118
|
+
const i = t.target.assignedElements();
|
|
119
|
+
if (i.length > 0) {
|
|
120
|
+
const t = i[0];
|
|
121
|
+
t.addEventListener("json-content-change", (t => {
|
|
122
|
+
if (this.radioGroupValue === "text") {
|
|
123
|
+
this.jsonContent = t.detail.content;
|
|
124
|
+
d(this, F, "f").call(this);
|
|
125
|
+
}
|
|
126
|
+
}));
|
|
127
|
+
}
|
|
128
|
+
}));
|
|
129
|
+
this.fileName = undefined;
|
|
130
|
+
this.radioGroupValue = "file";
|
|
131
|
+
this.showTooltipError = false;
|
|
132
|
+
this.isFormValid = false;
|
|
133
|
+
this.jsonContent = "";
|
|
134
|
+
this.cancelCallback = undefined;
|
|
135
|
+
this.confirmCallback = undefined;
|
|
136
|
+
this.defaultParent = undefined;
|
|
137
|
+
this.defaultRadioValue = undefined;
|
|
138
|
+
this.parent = undefined;
|
|
139
|
+
this.selectModuleCallback = undefined;
|
|
140
|
+
this.modeChangeCallback = undefined;
|
|
141
|
+
this.fileChangeCallback = undefined;
|
|
142
|
+
this.validateNameCallback = undefined;
|
|
143
|
+
this.validateJSONCallback = undefined;
|
|
144
|
+
this.onJsonContentChange = undefined;
|
|
145
|
+
}
|
|
146
|
+
async componentWillLoad() {
|
|
147
|
+
h(this, c, await l.getComponentStrings(this.el), "f");
|
|
148
|
+
h(this, p, [ {
|
|
149
|
+
value: "file",
|
|
150
|
+
caption: d(this, c, "f").header.filePathLabel
|
|
151
|
+
}, {
|
|
152
|
+
value: "text",
|
|
153
|
+
caption: d(this, c, "f").main.jsonAreaLabel
|
|
154
|
+
} ], "f");
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Suspends or reactivates the shortcuts
|
|
158
|
+
*/ async suspendShortcuts(t) {
|
|
159
|
+
d(this, b, "f").suspend = t;
|
|
160
|
+
}
|
|
161
|
+
render() {
|
|
162
|
+
return e(s, {
|
|
163
|
+
class: "widget"
|
|
164
|
+
}, e("ch-theme", {
|
|
165
|
+
model: z
|
|
166
|
+
}), e("ch-shortcuts", {
|
|
167
|
+
src: d(this, u, "f"),
|
|
168
|
+
ref: t => h(this, b, t, "f")
|
|
169
|
+
}), e("section", {
|
|
170
|
+
class: "section"
|
|
171
|
+
}, e("header", {
|
|
172
|
+
class: "header field-group spacing-body control-header-with-border"
|
|
173
|
+
}, e("div", {
|
|
174
|
+
class: "field-group field-group-name-description-module"
|
|
175
|
+
}, e("label", {
|
|
176
|
+
// name
|
|
177
|
+
class: "label name-label",
|
|
178
|
+
htmlFor: "input-name"
|
|
179
|
+
}, d(this, c, "f").header.nameFieldLabel), e("ch-edit", {
|
|
180
|
+
class: "input name-input",
|
|
181
|
+
id: "input-name",
|
|
182
|
+
ref: t => h(this, y, t, "f"),
|
|
183
|
+
onInput: d(this, W, "f")
|
|
184
|
+
}), e("label", {
|
|
185
|
+
// description
|
|
186
|
+
class: "label description-label",
|
|
187
|
+
htmlFor: "input-description"
|
|
188
|
+
}, d(this, c, "f").header.descriptionFieldLabel), e("ch-edit", {
|
|
189
|
+
class: "input description-input",
|
|
190
|
+
id: "input-description",
|
|
191
|
+
ref: t => h(this, g, t, "f")
|
|
192
|
+
}), e("label", {
|
|
193
|
+
// module/folder
|
|
194
|
+
class: "label module-label",
|
|
195
|
+
htmlFor: "input-module"
|
|
196
|
+
}, d(this, c, "f").header.moduleFolderLabel), e("gx-ide-entity-selector", {
|
|
197
|
+
class: "module module-entity-selector",
|
|
198
|
+
id: "module",
|
|
199
|
+
value: this.defaultParent,
|
|
200
|
+
ref: t => h(this, w, t, "f"),
|
|
201
|
+
labelPosition: "none",
|
|
202
|
+
defaultValue: this.defaultParent,
|
|
203
|
+
selectEntityCallback: this.selectModuleCallback
|
|
204
|
+
})), e("div", {
|
|
205
|
+
class: "radio-file-input-wrapper field-group"
|
|
206
|
+
}, e("ch-radio-group-render", {
|
|
207
|
+
// file url/text
|
|
208
|
+
class: "radio-group",
|
|
209
|
+
model: d(this, p, "f"),
|
|
210
|
+
onChange: d(this, M, "f"),
|
|
211
|
+
value: this.defaultRadioValue,
|
|
212
|
+
ref: t => h(this, k, t, "f")
|
|
213
|
+
}), e("div", {
|
|
214
|
+
class: "field field-inline field-file-input"
|
|
215
|
+
}, e("ch-edit", {
|
|
216
|
+
autoFocus: true,
|
|
217
|
+
id: "file-name",
|
|
218
|
+
class: "input",
|
|
219
|
+
part: "file-name",
|
|
220
|
+
type: "text",
|
|
221
|
+
value: this.fileName,
|
|
222
|
+
readonly: true,
|
|
223
|
+
placeholder: d(this, c, "f").header.fileNamePlaceholder,
|
|
224
|
+
startImgSrc: I,
|
|
225
|
+
disabled: this.radioGroupValue !== "file"
|
|
226
|
+
}), e("input", {
|
|
227
|
+
hidden: true,
|
|
228
|
+
type: "file",
|
|
229
|
+
accept: ".json",
|
|
230
|
+
onChange: d(this, E, "f"),
|
|
231
|
+
ref: t => h(this, v, t, "f")
|
|
232
|
+
}), e("div", {
|
|
233
|
+
class: "buttons-spacer"
|
|
234
|
+
}, e("button", {
|
|
235
|
+
"aria-label": d(this, c, "f").header.removeFileSelection,
|
|
236
|
+
title: d(this, c, "f").header.removeFileSelection,
|
|
237
|
+
id: "reset-all-button",
|
|
238
|
+
class: "button-tertiary button-icon-only",
|
|
239
|
+
part: "reset-all-button",
|
|
240
|
+
onClick: d(this, C, "f"),
|
|
241
|
+
disabled: this.radioGroupValue !== "file"
|
|
242
|
+
}, e("ch-image", {
|
|
243
|
+
class: "icon-md",
|
|
244
|
+
src: S
|
|
245
|
+
})), e("button", {
|
|
246
|
+
id: "select-file-load-button",
|
|
247
|
+
class: "button-primary",
|
|
248
|
+
part: "select-file-load-button",
|
|
249
|
+
onClick: d(this, T, "f"),
|
|
250
|
+
disabled: this.radioGroupValue !== "file"
|
|
251
|
+
}, d(this, c, "f").header.selectfileButton))))), e("div", {
|
|
252
|
+
class: "main field-group"
|
|
253
|
+
}, e("div", {
|
|
254
|
+
class: "json-area"
|
|
255
|
+
}, e("div", {
|
|
256
|
+
class: "slotted-container scrollable"
|
|
257
|
+
}, e("slot", {
|
|
258
|
+
name: "JsonTextEditor",
|
|
259
|
+
onSlotchange: d(this, P, "f")
|
|
260
|
+
})), this.showTooltipError && e("ch-tooltip", {
|
|
261
|
+
class: "tooltip",
|
|
262
|
+
blockAlign: o.tooltipSettings.blockAlign,
|
|
263
|
+
inlineAlign: o.tooltipSettings.inlineAlign,
|
|
264
|
+
delay: o.tooltipSettings.delay
|
|
265
|
+
}, "Error message")), e("ch-checkbox", {
|
|
266
|
+
class: "checkbox spacing-body-block-end spacing-body-inline-start",
|
|
267
|
+
caption: d(this, c, "f").main.checkBoxLabel,
|
|
268
|
+
checkedValue: "true",
|
|
269
|
+
ref: t => h(this, m, t, "f")
|
|
270
|
+
})), e("footer", {
|
|
271
|
+
class: "control-footer control-footer-with-border spacing-body-block-end spacing-body-inline"
|
|
272
|
+
}, e("div", {
|
|
273
|
+
class: "buttons-spacer"
|
|
274
|
+
}, e("button", {
|
|
275
|
+
class: "button-secondary",
|
|
276
|
+
id: "button-cancel",
|
|
277
|
+
onClick: this.cancelCallback,
|
|
278
|
+
part: "button-cancel"
|
|
279
|
+
}, d(this, c, "f").footer.btnCancel), e("button", {
|
|
280
|
+
class: "button-primary",
|
|
281
|
+
id: "button-ok",
|
|
282
|
+
onClick: d(this, j, "f"),
|
|
283
|
+
part: "button-ok",
|
|
284
|
+
disabled: !this.isFormValid
|
|
285
|
+
}, d(this, c, "f").footer.btnOk)))));
|
|
286
|
+
}
|
|
287
|
+
static get assetsDirs() {
|
|
288
|
+
return [ "gx-ide-assets/json-import" ];
|
|
289
|
+
}
|
|
290
|
+
get el() {
|
|
291
|
+
return a(this);
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
c = new WeakMap, f = new WeakMap, p = new WeakMap, u = new WeakMap, m = new WeakMap,
|
|
296
|
+
b = new WeakMap, g = new WeakMap, v = new WeakMap, w = new WeakMap, y = new WeakMap,
|
|
297
|
+
k = new WeakMap, x = new WeakMap, W = new WeakMap, M = new WeakMap, j = new WeakMap,
|
|
298
|
+
C = new WeakMap, E = new WeakMap, T = new WeakMap, F = new WeakMap, P = new WeakMap;
|
|
299
|
+
|
|
300
|
+
V.style = r;
|
|
301
|
+
|
|
302
|
+
export { V as gx_ide_json_import };
|
|
303
|
+
//# sourceMappingURL=p-2bfae98b.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_validateForm","_b","_a","__classPrivateFieldGet","value","trim","radioGroupValue","fileName","jsonContent","isNameValid","validateNameCallback","Boolean","isJsonValid","validateJSONCallback","isFormValid","_GxIdeJsonImport_nameChangedHandler","call","_GxIdeJsonImport_changeRadioHandler","_GxIdeJsonImport_removeFileSelection","modeChangeCallback","_GxIdeJsonImport_createHandler","id","confirmCallback","then","formSubmitResult","showTooltipError","success","fileChangeCallback","_GxIdeJsonImport_selectFileInputChangedHandler","event","target","files","length","_GxIdeJsonImport_selectFileInputHandler","click","_GxIdeJsonImport_handleEditorChange","_GxIdeJsonImport_handleSlotChange","e","elements","assignedElements","element","addEventListener","detail","content","componentWillLoad","__classPrivateFieldSet","Locale","getComponentStrings","el","caption","header","filePathLabel","main","jsonAreaLabel","suspendShortcuts","suspend","render","h","Host","class","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","blockAlign","config","tooltipSettings","inlineAlign","delay","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\";\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() showTooltipError: boolean = false;\n @State() isFormValid: boolean = false;\n @State() jsonContent: string = \"\";\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 /**\n * Suspends or reactivates the shortcuts\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n this.#chShortcutsEl.suspend = suspendShortcuts;\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.showTooltipError = !formSubmitResult.success;\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\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 </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 {this.showTooltipError && (\n <ch-tooltip\n class=\"tooltip\"\n blockAlign={config.tooltipSettings.blockAlign}\n inlineAlign={config.tooltipSettings.inlineAlign}\n delay={config.tooltipSettings.delay}\n >\n Error message\n </ch-tooltip>\n )}\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;;;;;;;;;;;;;;;;;ACkBtB,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,IAAAC,WAAA;IACAC,EAAAF,IAAAC,MAAwB;MACtBN,MAAM;MACNQ,aAAa;MACbC,sBAAs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|
-
const l = ':host{--pill-border-radius:12px;--pill-padding-inline:8px;--pill-padding-block:2px;--pill-font-size:var(--font-size-body-s);display:grid;block-size:100%;overflow:auto;grid-template-rows:max-content max-content 1fr}.detail__current-version,.detail__knowledge-base{max-inline-size:250px;min-inline-size:180px}.detail__current-version,.detail__knowledge-base{padding-inline:24px;border-inline-end:1px solid var(--mer-border-color__on-elevation--01)}.information__col-1,.detail__genexus-server{padding-inline-end:24px;border-inline-end:1px solid var(--mer-border-color__on-elevation--01)}.information__col-2,.detail__merge-from-version{padding-inline-start:24px}.section{display:contents}.header{display:grid;gap:24px}.header__detail{display:grid;grid-template-areas:"detail-title detail-title detail-title detail-title" "detail-commit-name detail-commit-name detail-commit-name detail-commit-name" "detail-genexus-server detail-knowledge-base detail-current-version detail-merge-from-version";row-gap:16px;grid-template-columns:minmax(250px, 350px) repeat(3, minmax(180px, 250px))}.detail__label{color:var(--mer-color__neutral-gray--400)}.detail__title{grid-area:detail-title}.detail__commit-name{grid-area:detail-commit-name}.detail__genexus-server{grid-area:detail-genexus-server}.detail__genexus-server>a{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}.detail__link{align-items:start;color:var(--mer-text__primary);text-decoration:underline}.detail__link:hover{color:var(--mer-text__primary--hover)}.detail__link:active{color:var(--mer-text__primary--active)}.detail__knowledge-base{grid-area:detail-knowledge-base}.detail__current-version{grid-area:detail-current-version}.detail__merge-from-version{grid-area:detail-merge-from-version}.header__information{display:grid;row-gap:10px;grid-template-areas:"information-title information-title" "information-col-1 information-col-2";grid-template-columns:max-content 1fr;grid-template-rows:max-content 64px}.information__title{grid-area:information-title}.information__col-1{grid-area:information-col-1;display:flex;gap:24px}.information__col-2{display:grid;grid-area:information-col-2}.controls-container{display:grid;margin-block-start:24px}.filter{grid-template-columns:232px 186px 1fr;gap:12px}.button-merge-checked{margin-inline-start:auto}.main{position:relative;display:grid;overflow:auto}.loader{position:relative;inline-size:100%;block-size:100%;inset-block-start:0}.tabular-grid{border-radius:4px;overflow:hidden}.empty-state{block-size:100%}.loader{--elevation-background-color:var(--mer-surface__elevation--01)}.warning-error-description{display:flex;align-items:center;gap:8px;padding:8px;max-inline-size:800px;line-height:1.5}.warning-error-icon{flex-shrink:0}.tabular-grid.empty-result::part(main){overflow:hidden}.input-comments-container{position:relative}.input-comments{--control__border-color:transparent;padding-block:0 !important;padding-inline:0 !important;--line-height-tight:1.4;block-size:100%;background-color:var(--mer-surface);transition:var(--mer-timing--super-fast) block-size, var(--mer-timing--super-fast) background-color, var(--mer-timing--super-fast) padding-block, var(--mer-timing--super-fast) padding-inline}.input-comments:focus{position:absolute;block-size:200px;inline-size:100%;z-index:99;background-color:var(--mer-surface__elevation--01);padding-block:var(--control__padding-block) !important;padding-inline:var(--control__padding-inline) !important}ch-tabular-grid-cell.tabular-grid-cell::part(actions-icon){background-size:contain;margin-inline-end:0;--icon-path:var(--icon__gemini-tools_show-more-vertical_neutral--enabled);cursor:pointer}ch-tabular-grid-cell.tabular-grid-cell::part(actions-icon):hover{--icon-path:var(--icon__gemini-tools_show-more-vertical_neutral--hover)}ch-tabular-grid-cell.tabular-grid-cell::part(actions-icon):active{--icon-path:var(--icon__gemini-tools_show-more-vertical_neutral--active)}.tabular-grid-row-actions::part(main),.property-grid-row-actions::part(main){gap:0 !important}.custom-icon-text-wrapper{display:flex;align-items:center;gap:10px}.tabular-grid-row-actions>button{justify-content:start}.pill{--pill-background-color:transparent;--pill-color:transparent;--pill-border-color:transparent;background-color:var(--pill-background-color);color:var(--pill-color);border:1px solid var(--pill-border-color);inline-size:100%;padding:var(--pill-padding-block) var(--pill-padding-inline);display:flex;align-items:center;justify-content:center;border-radius:var(--pill-border-radius);position:relative;font-weight:var(--font-weight-semi-bold)}.pill--to-merge{--pill-background-color:var();--pill-color:var(--mer-color__neutral-gray--400);--pill-border-color:var()}.pill--to-merge-marked{--pill-background-color:var();--pill-color:var(--mer-border-color__primary);--pill-border-color:var()}.pill--pending{--pill-background-color:var(--mer-color__tinted-primary--8);--pill-color:var(--mer-border-color__primary);--pill-border-color:var(--mer-color__tinted-primary--50)}.pill--warning{--pill-background-color:var(--mer-color__tinted-yellow--5);--pill-color:var(--mer-border-color__warning);--pill-border-color:var(--mer-color__tinted-yellow--60)}.pill--error{--pill-background-color:var(--mer-color__tinted-red--5);--pill-color:var(--mer-border-color__error);--pill-border-color:var(--mer-color__tinted-red--60)}.pill--merged{--pill-background-color:var(--mer-color__tinted-green--5);--pill-color:var(--mer-border-color__success);--pill-border-color:var(--mer-color__tinted-green--60)}.pill--transitioning{--pill-color:transparent}.merging-spinner-caption{display:flex;align-items:center;gap:6px;--status-circle-color:transparent;--status-circle-size:$size;--status-circle-inset-inline-start:14px;--pill-color:var(--mer-border-color__primary)}.merging-spinner-caption::before{display:inline-block;content:"";width:14px;height:14px;border:calc(14px / 7) solid var(--mer-color__tinted-primary--50);border-top:calc(14px / 7) solid var(--mer-color__primary--300);border-radius:50%;animation:spin var(--mer-timing--regular) linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.tabular-grid .button-secondary{--control__padding-block:var(--pill-padding-block);--control__padding-inline:var(--pill-padding-inline);font-size:inherit;font-weight:inherit;}.tabular-grid .tabular-grid-cell--for-pill{--grid-cell__padding-block:4px;align-items:center;justify-content:center}.tabular-grid.disabled-custom-selector .tabular-grid-cell::part(selector-label),.tabular-grid.disabled-custom-selector .tabular-grid-column::part(bar-selector),.tabular-grid.disabled-custom-selector .tabular-grid-cell::part(actions-icon){pointer-events:none;opacity:0.5}.tabular-grid-column--settings-custom-selector,.tabular-grid-cell--settings-custom-selector{--grid-cell__padding-inline:0;--grid-cell__padding-block:0}.tabular-grid-cell::part(actions-icon){padding-block:6px}ch-tabular-grid-cell.tabular-grid-cell::part(actions-icon){block-size:100%;display:block;background-size:14px;padding-inline:16px}.tabular-grid-cell.no-checkbox-custom-selector::part(selector-label){visibility:hidden}.tabular-grid-row-actions::part(window){background-color:var(--mer-surface__elevation--02) !important}.tabular-grid-row .tabular-grid-cell:nth-child(3){min-inline-size:400px}';
|
|
7
|
+
const l = ':host{--pill-border-radius:12px;--pill-padding-inline:8px;--pill-padding-block:2px;--pill-font-size:var(--font-size-body-s);display:grid;block-size:100%;overflow:auto;grid-template-rows:max-content max-content 1fr}.detail__current-version,.detail__knowledge-base{max-inline-size:250px;min-inline-size:180px}.detail__current-version,.detail__knowledge-base{padding-inline:24px;border-inline-end:1px solid var(--mer-border-color__on-elevation--01)}.information__col-1,.detail__genexus-server{padding-inline-end:24px;border-inline-end:1px solid var(--mer-border-color__on-elevation--01)}.information__col-2,.detail__merge-from-version{padding-inline-start:24px}.section{display:contents}.header{display:grid;gap:24px}.header__detail{display:grid;grid-template-areas:"detail-title detail-title detail-title detail-title" "detail-commit-name detail-commit-name detail-commit-name detail-commit-name" "detail-genexus-server detail-knowledge-base detail-current-version detail-merge-from-version";row-gap:16px;grid-template-columns:minmax(250px, 350px) repeat(3, minmax(180px, 250px))}.detail__label{color:var(--mer-color__neutral-gray--400)}.detail__title{grid-area:detail-title}.detail__commit-name{grid-area:detail-commit-name}.detail__genexus-server{grid-area:detail-genexus-server}.detail__genexus-server>a{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}.detail__link{align-items:start;color:var(--mer-text__primary);text-decoration:underline}.detail__link:hover{color:var(--mer-text__primary--hover)}.detail__link:active{color:var(--mer-text__primary--active)}.detail__knowledge-base{grid-area:detail-knowledge-base}.detail__current-version{grid-area:detail-current-version}.detail__merge-from-version{grid-area:detail-merge-from-version}.header__information{display:grid;row-gap:10px;grid-template-areas:"information-title information-title" "information-col-1 information-col-2";grid-template-columns:max-content 1fr;grid-template-rows:max-content 64px}.information__title{grid-area:information-title}.information__col-1{grid-area:information-col-1;display:flex;gap:24px}.information__col-2{display:grid;grid-area:information-col-2}.controls-container{display:grid;margin-block-start:24px}.filter{grid-template-columns:232px 186px 1fr;gap:12px}.button-merge-checked{margin-inline-start:auto}.main{position:relative;display:grid;overflow:auto}.loader{position:relative;inline-size:100%;block-size:100%;inset-block-start:0}.tabular-grid{border-radius:4px;overflow:hidden}.empty-state{block-size:100%}.loader{--elevation-background-color:var(--mer-surface__elevation--01)}.warning-error-description{display:flex;align-items:center;gap:8px;padding:8px;max-inline-size:800px;line-height:1.5}.warning-error-icon{flex-shrink:0}.tabular-grid.empty-result::part(main){overflow:hidden}.input-comments-container{position:relative}.input-comments{--control__border-color:transparent;padding-block:0 !important;padding-inline:0 !important;--line-height-tight:1.4;block-size:100%;background-color:var(--mer-surface);transition:var(--mer-timing--super-fast) block-size, var(--mer-timing--super-fast) background-color, var(--mer-timing--super-fast) padding-block, var(--mer-timing--super-fast) padding-inline}.input-comments:focus{position:absolute;block-size:200px;inline-size:100%;z-index:99;background-color:var(--mer-surface__elevation--01);padding-block:var(--control__padding-block) !important;padding-inline:var(--control__padding-inline) !important}ch-tabular-grid-cell.tabular-grid-cell::part(actions-icon){background-size:contain;margin-inline-end:0;--icon-path:var(--icon__gemini-tools_show-more-vertical_neutral--enabled);cursor:pointer}ch-tabular-grid-cell.tabular-grid-cell::part(actions-icon):hover{--icon-path:var(--icon__gemini-tools_show-more-vertical_neutral--hover)}ch-tabular-grid-cell.tabular-grid-cell::part(actions-icon):active{--icon-path:var(--icon__gemini-tools_show-more-vertical_neutral--active)}.tabular-grid-row-actions::part(main),.property-grid-row-actions::part(main){gap:0 !important}.custom-icon-text-wrapper{display:flex;align-items:center;gap:10px}.tabular-grid-row-actions>button{justify-content:start}.pill{--pill-background-color:transparent;--pill-color:transparent;--pill-border-color:transparent;background-color:var(--pill-background-color);color:var(--pill-color);border:1px solid var(--pill-border-color);inline-size:100%;padding:var(--pill-padding-block) var(--pill-padding-inline);display:flex;align-items:center;justify-content:center;border-radius:var(--pill-border-radius);position:relative;font-weight:var(--font-weight-semi-bold)}.pill--to-merge,.pill--to-revert{--pill-background-color:var();--pill-color:var(--mer-color__neutral-gray--400);--pill-border-color:var()}.pill--to-merge-marked{--pill-background-color:var();--pill-color:var(--mer-border-color__primary);--pill-border-color:var()}.pill--pending{--pill-background-color:var(--mer-color__tinted-primary--8);--pill-color:var(--mer-border-color__primary);--pill-border-color:var(--mer-color__tinted-primary--50)}.pill--warning{--pill-background-color:var(--mer-color__tinted-yellow--5);--pill-color:var(--mer-border-color__warning);--pill-border-color:var(--mer-color__tinted-yellow--60)}.pill--error{--pill-background-color:var(--mer-color__tinted-red--5);--pill-color:var(--mer-border-color__error);--pill-border-color:var(--mer-color__tinted-red--60)}.pill--merged,.pill--reverted{--pill-background-color:var(--mer-color__tinted-green--5);--pill-color:var(--mer-border-color__success);--pill-border-color:var(--mer-color__tinted-green--60)}.pill--transitioning{--pill-color:transparent}.merging-spinner-caption{display:flex;align-items:center;gap:6px;--status-circle-color:transparent;--status-circle-size:$size;--status-circle-inset-inline-start:14px;--pill-color:var(--mer-border-color__primary)}.merging-spinner-caption::before{display:inline-block;content:"";width:14px;height:14px;border:calc(14px / 7) solid var(--mer-color__tinted-primary--50);border-top:calc(14px / 7) solid var(--mer-color__primary--300);border-radius:50%;animation:spin var(--mer-timing--regular) linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.tabular-grid .button-secondary{--control__padding-block:var(--pill-padding-block);--control__padding-inline:var(--pill-padding-inline);font-size:inherit;font-weight:inherit;}.tabular-grid .tabular-grid-cell--for-pill{--grid-cell__padding-block:4px;align-items:center;justify-content:center}.tabular-grid.disabled-custom-selector .tabular-grid-cell::part(selector-label),.tabular-grid.disabled-custom-selector .tabular-grid-column::part(bar-selector),.tabular-grid.disabled-custom-selector .tabular-grid-cell::part(actions-icon){pointer-events:none;opacity:0.5}.tabular-grid-column--settings-custom-selector,.tabular-grid-cell--settings-custom-selector{--grid-cell__padding-inline:0;--grid-cell__padding-block:0}.tabular-grid-cell::part(actions-icon){padding-block:6px}ch-tabular-grid-cell.tabular-grid-cell::part(actions-icon){block-size:100%;display:block;background-size:14px;padding-inline:16px}.tabular-grid-cell.no-checkbox-custom-selector::part(selector-label){visibility:hidden}.tabular-grid-row-actions::part(window){background-color:var(--mer-surface__elevation--02) !important}.tabular-grid-row .tabular-grid-cell:nth-child(3){min-inline-size:400px}';
|
|
8
8
|
|
|
9
9
|
var o = undefined && undefined.__classPrivateFieldGet || function(t, e, i, r) {
|
|
10
10
|
if (i === "a" && !r) throw new TypeError("Private accessor was defined without a getter");
|
|
@@ -19,7 +19,7 @@ var n = undefined && undefined.__classPrivateFieldSet || function(t, e, i, r, a)
|
|
|
19
19
|
return r === "a" ? a.call(t, i) : a ? a.value = i : e.set(t, i), i;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
var c, d,
|
|
22
|
+
var c, d, h, p, m, u, g, b, f, v, _, w, y, k, x, M, z, W, $, j;
|
|
23
23
|
|
|
24
24
|
const T = [ "resets/box-sizing", "components/tabular-grid", "utils/form--full", "utils/layout", "utils/typography", "utils/spacing", "chameleon/scrollbar" ];
|
|
25
25
|
|
|
@@ -78,8 +78,8 @@ const L = class {
|
|
|
78
78
|
// eslint-disable-next-line @stencil-community/own-props-must-be-private
|
|
79
79
|
c.set(this, void 0);
|
|
80
80
|
d.set(this, void 0);
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
h.set(this, void 0);
|
|
82
|
+
p.set(this, []);
|
|
83
83
|
m.set(this, (() => {
|
|
84
84
|
if (this.commitInformation.length === 1) {
|
|
85
85
|
// return comment without revison number
|
|
@@ -97,16 +97,16 @@ const L = class {
|
|
|
97
97
|
u.set(this, (async () => {
|
|
98
98
|
this.merging = true;
|
|
99
99
|
const t = new Map(this.objectsStatesMap);
|
|
100
|
-
o(this,
|
|
101
|
-
t.set(e, "merging");
|
|
100
|
+
o(this, p, "f").forEach((e => {
|
|
101
|
+
t.set(e, this.operationType === "revert" ? "reverting" : "merging");
|
|
102
102
|
}));
|
|
103
103
|
this.objectsStatesMap = t;
|
|
104
|
-
await this.mergeObjectsCallback(o(this,
|
|
104
|
+
await this.mergeObjectsCallback(o(this, p, "f"));
|
|
105
105
|
}));
|
|
106
106
|
g.set(this, (t => async () => {
|
|
107
107
|
this.merging = true;
|
|
108
108
|
const e = new Map(this.objectsStatesMap);
|
|
109
|
-
e.set(t, "merging");
|
|
109
|
+
e.set(t, this.operationType === "revert" ? "reverting" : "merging");
|
|
110
110
|
this.objectsStatesMap = e;
|
|
111
111
|
await this.mergeObjectsCallback([ t ]);
|
|
112
112
|
}));
|
|
@@ -152,7 +152,7 @@ const L = class {
|
|
|
152
152
|
return t ? `${o(this, c, "f").loading}` : `${o(this, d, "f")} ${o(this, c, "f").loading}`;
|
|
153
153
|
}
|
|
154
154
|
}));
|
|
155
|
-
|
|
155
|
+
v.set(this, (t => {
|
|
156
156
|
var e;
|
|
157
157
|
const i = new Date(t);
|
|
158
158
|
const r = ((e = navigator.languages) === null || e === void 0 ? void 0 : e[0]) || navigator.language;
|
|
@@ -162,7 +162,7 @@ const L = class {
|
|
|
162
162
|
hour12: false
|
|
163
163
|
})}`;
|
|
164
164
|
}));
|
|
165
|
-
|
|
165
|
+
_.set(this, (() => {
|
|
166
166
|
const t = false;
|
|
167
167
|
const i = this.menuContextAction === "Inserted";
|
|
168
168
|
const r = this.menuContextAction === "Inserted";
|
|
@@ -186,13 +186,13 @@ const L = class {
|
|
|
186
186
|
}, o(this, c, "f").objectActions.previewMerge) ];
|
|
187
187
|
}));
|
|
188
188
|
w.set(this, ((t, i) => {
|
|
189
|
-
if (t === "merging") {
|
|
189
|
+
if (t === "merging" || t === "reverting") {
|
|
190
190
|
return e("span", {
|
|
191
191
|
class: "merging-spinner-caption"
|
|
192
|
-
}, o(this, c, "f").states.merging);
|
|
192
|
+
}, this.operationType === "revert" ? o(this, c, "f").states.reverting : o(this, c, "f").states.merging);
|
|
193
193
|
}
|
|
194
194
|
const r = `pill pill--${t}`;
|
|
195
|
-
if (this.mergePillAsButton && (t === "to-merge" || t === "to-merge-marked")) {
|
|
195
|
+
if (this.mergePillAsButton && (t === "to-merge" || t === "to-merge-marked" || t === "to-revert")) {
|
|
196
196
|
return e("button", {
|
|
197
197
|
class: {
|
|
198
198
|
[r]: true,
|
|
@@ -274,9 +274,9 @@ const L = class {
|
|
|
274
274
|
const i = new Map(this.objectsStatesMap);
|
|
275
275
|
const r = t.detail.rowsId;
|
|
276
276
|
const a = r.filter((t => !this.alreadyMergedObjectsIdsArray.includes(t)));
|
|
277
|
-
n(this,
|
|
277
|
+
n(this, p, [ ...a ], "f");
|
|
278
278
|
// Update markedObjectsSet
|
|
279
|
-
o(this,
|
|
279
|
+
o(this, p, "f").forEach((t => {
|
|
280
280
|
e.add(t);
|
|
281
281
|
}));
|
|
282
282
|
this.markedObjectsSet = e;
|
|
@@ -345,11 +345,12 @@ const L = class {
|
|
|
345
345
|
this.commitObjects = [];
|
|
346
346
|
this.enableRowOptions = false;
|
|
347
347
|
this.hideFilters = false;
|
|
348
|
+
this.operationType = "merge";
|
|
348
349
|
this.mergeObjectsCallback = undefined;
|
|
349
350
|
this.mergePillAsButton = undefined;
|
|
350
351
|
}
|
|
351
352
|
objectsStatesMapChanged(t) {
|
|
352
|
-
const e = [ ...t.entries() ].find((([, t]) => t === "merging"));
|
|
353
|
+
const e = [ ...t.entries() ].find((([, t]) => t === "merging" || t === "reverting"));
|
|
353
354
|
if (!e) {
|
|
354
355
|
this.merging = false;
|
|
355
356
|
}
|
|
@@ -360,7 +361,7 @@ const L = class {
|
|
|
360
361
|
this.loading = false;
|
|
361
362
|
// All commit objects begin as "pending to merge"
|
|
362
363
|
t.forEach((t => {
|
|
363
|
-
this.objectsStatesMap.set(t.id, "to-merge");
|
|
364
|
+
this.objectsStatesMap.set(t.id, this.operationType === "revert" ? "to-revert" : "to-merge");
|
|
364
365
|
}));
|
|
365
366
|
this.objectsFiltered = this.commitObjects;
|
|
366
367
|
}
|
|
@@ -370,12 +371,12 @@ const L = class {
|
|
|
370
371
|
n(this, c, await s.getComponentStrings(this.el), "f");
|
|
371
372
|
n(this, d, this.commitInformation.length > 1 ? o(this, c, "f").commmits : o(this, c, "f").commmit, "f");
|
|
372
373
|
// Initiate "states" combo box filter
|
|
373
|
-
n(this,
|
|
374
|
+
n(this, h, [ {
|
|
374
375
|
caption: o(this, c, "f").states.all,
|
|
375
376
|
value: C
|
|
376
377
|
}, {
|
|
377
|
-
caption: o(this, c, "f").states["to-merge"],
|
|
378
|
-
value: "to-merge"
|
|
378
|
+
caption: this.operationType === "revert" ? o(this, c, "f").states["to-revert"] : o(this, c, "f").states["to-merge"],
|
|
379
|
+
value: this.operationType === "revert" ? "to-revert" : "to-merge"
|
|
379
380
|
}, {
|
|
380
381
|
caption: o(this, c, "f").states.warning,
|
|
381
382
|
value: "warning"
|
|
@@ -383,8 +384,8 @@ const L = class {
|
|
|
383
384
|
caption: o(this, c, "f").states.error,
|
|
384
385
|
value: "error"
|
|
385
386
|
}, {
|
|
386
|
-
caption: o(this, c, "f").states.merged,
|
|
387
|
-
value: "merged"
|
|
387
|
+
caption: this.operationType === "revert" ? o(this, c, "f").states.reverted : o(this, c, "f").states.merged,
|
|
388
|
+
value: this.operationType === "revert" ? "reverted" : "merged"
|
|
388
389
|
} ], "f");
|
|
389
390
|
if ((t = this.commitObjects) === null || t === void 0 ? void 0 : t.length) {
|
|
390
391
|
// if commitObjects already set...
|
|
@@ -409,9 +410,9 @@ const L = class {
|
|
|
409
410
|
if ((i === null || i === void 0 ? void 0 : i.length) > 0) {
|
|
410
411
|
this.commitObjectsMessagesMap.set(t, i);
|
|
411
412
|
}
|
|
412
|
-
if (e === "merged") {
|
|
413
|
+
if (e === "merged" || e === "reverted") {
|
|
413
414
|
// remove from checked
|
|
414
|
-
n(this,
|
|
415
|
+
n(this, p, o(this, p, "f").filter((e => e !== t)), "f");
|
|
415
416
|
// add to "already merged". This will hide the checkbox
|
|
416
417
|
this.alreadyMergedObjectsIdsArray.push(t);
|
|
417
418
|
// unmark checkbox:
|
|
@@ -436,7 +437,7 @@ const L = class {
|
|
|
436
437
|
class: "header__detail"
|
|
437
438
|
}, e("p", {
|
|
438
439
|
class: "detail__title subtitle-semi-bold-xs"
|
|
439
|
-
}, o(this, c, "f").commitDetail.bringChangesDetail), e("p", {
|
|
440
|
+
}, this.operationType === "revert" ? o(this, c, "f").commitDetail.revertChangesDetail : o(this, c, "f").commitDetail.bringChangesDetail), e("p", {
|
|
440
441
|
class: "detail__commit-name subtitle-semi-bold-s"
|
|
441
442
|
}, o(this, f, "f").call(this)), e("div", {
|
|
442
443
|
// genexus server
|
|
@@ -461,7 +462,7 @@ const L = class {
|
|
|
461
462
|
class: I
|
|
462
463
|
}, o(this, c, "f").commitDetail.currentVersion), e("a", {
|
|
463
464
|
class: "body-regular-s"
|
|
464
|
-
}, this.commitDetail.currentVersion)), e("div", {
|
|
465
|
+
}, this.commitDetail.currentVersion)), this.operationType === "merge" && e("div", {
|
|
465
466
|
// merge from version
|
|
466
467
|
class: "detail__merge-from-version field field-block"
|
|
467
468
|
}, e("span", {
|
|
@@ -489,19 +490,19 @@ const L = class {
|
|
|
489
490
|
class: I
|
|
490
491
|
}, o(this, c, "f").commitInformation.date), e("p", {
|
|
491
492
|
class: "body-regular-s"
|
|
492
|
-
}, o(this,
|
|
493
|
+
}, o(this, v, "f").call(this, this.commitInformation[0].date))) : [ e("div", {
|
|
493
494
|
class: "field field-block"
|
|
494
495
|
}, e("span", {
|
|
495
496
|
class: I
|
|
496
497
|
}, o(this, c, "f").commitInformation.from), e("p", {
|
|
497
498
|
class: "body-regular-s"
|
|
498
|
-
}, o(this,
|
|
499
|
+
}, o(this, v, "f").call(this, this.commitInformation[0].date))), e("div", {
|
|
499
500
|
class: "field field-block"
|
|
500
501
|
}, e("span", {
|
|
501
502
|
class: I
|
|
502
503
|
}, o(this, c, "f").commitInformation.to), e("p", {
|
|
503
504
|
class: "body-regular-s"
|
|
504
|
-
}, o(this,
|
|
505
|
+
}, o(this, v, "f").call(this, this.commitInformation[this.commitInformation.length - 1].date))) ]), e("div", {
|
|
505
506
|
// header information (col-2)
|
|
506
507
|
class: "information__col-2"
|
|
507
508
|
}, e("div", {
|
|
@@ -535,7 +536,7 @@ const L = class {
|
|
|
535
536
|
}), e("ch-combo-box-render", {
|
|
536
537
|
class: "combo-box",
|
|
537
538
|
disabled: r,
|
|
538
|
-
model: o(this,
|
|
539
|
+
model: o(this, h, "f"),
|
|
539
540
|
value: this.stateFilterValue,
|
|
540
541
|
onInput: o(this, W, "f"),
|
|
541
542
|
placeholder: o(this, c, "f").filter.statePlaceholder
|
|
@@ -543,7 +544,7 @@ const L = class {
|
|
|
543
544
|
class: "button-primary button-merge-checked",
|
|
544
545
|
disabled: !this.atLeastOneObjectIsChecked || r,
|
|
545
546
|
onClick: o(this, u, "f")
|
|
546
|
-
}, o(this, c, "f").filter.
|
|
547
|
+
}, this.operationType === "revert" ? o(this, c, "f").filter.revertSelected : o(this, c, "f").filter.mergeSelected)), e("div", {
|
|
547
548
|
class: "main spacing-body"
|
|
548
549
|
}, this.commitObjects.length ? e("ch-tabular-grid", {
|
|
549
550
|
class: {
|
|
@@ -606,10 +607,10 @@ const L = class {
|
|
|
606
607
|
})), o(this, k, "f").call(this), this.enableRowOptions && e("ch-tabular-grid-row-actions", {
|
|
607
608
|
class: "tabular-grid-row-actions",
|
|
608
609
|
showOnRowActions: true
|
|
609
|
-
}, o(this,
|
|
610
|
+
}, o(this, _, "f").call(this)), this.enableRowOptions && e("ch-tabular-grid-row-actions", {
|
|
610
611
|
class: "tabular-grid-row-actions",
|
|
611
612
|
showOnRowContext: true
|
|
612
|
-
}, o(this,
|
|
613
|
+
}, o(this, _, "f").call(this)), e("ch-tabular-grid-rowset", {
|
|
613
614
|
class: "tabular-grid-rowset"
|
|
614
615
|
}, this.objectsFiltered.length === 0 && e("ch-tabular-grid-rowset-empty", null, e("gx-ide-empty-state", {
|
|
615
616
|
class: "empty-state",
|
|
@@ -638,12 +639,12 @@ const L = class {
|
|
|
638
639
|
}
|
|
639
640
|
};
|
|
640
641
|
|
|
641
|
-
c = new WeakMap, d = new WeakMap,
|
|
642
|
-
u = new WeakMap, g = new WeakMap, b = new WeakMap, f = new WeakMap,
|
|
643
|
-
|
|
642
|
+
c = new WeakMap, d = new WeakMap, h = new WeakMap, p = new WeakMap, m = new WeakMap,
|
|
643
|
+
u = new WeakMap, g = new WeakMap, b = new WeakMap, f = new WeakMap, v = new WeakMap,
|
|
644
|
+
_ = new WeakMap, w = new WeakMap, y = new WeakMap, k = new WeakMap, x = new WeakMap,
|
|
644
645
|
M = new WeakMap, z = new WeakMap, W = new WeakMap, $ = new WeakMap, j = new WeakMap;
|
|
645
646
|
|
|
646
647
|
L.style = l;
|
|
647
648
|
|
|
648
649
|
export { L as gx_ide_team_dev_bring_changes };
|
|
649
|
-
//# sourceMappingURL=p-
|
|
650
|
+
//# sourceMappingURL=p-3fbc5a02.entry.js.map
|