@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,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"header": {
|
|
3
|
+
"nameFieldLabel": "",
|
|
4
|
+
"descriptionFieldLabel": "",
|
|
5
|
+
"moduleFolderLabel": "",
|
|
6
|
+
"filePathLabel": "",
|
|
7
|
+
"selectfileButton": "",
|
|
8
|
+
"fileNamePlaceholder": ""
|
|
9
|
+
},
|
|
10
|
+
"main": {
|
|
11
|
+
"jsonAreaLabel": "",
|
|
12
|
+
"checkBoxLabel": ""
|
|
13
|
+
},
|
|
14
|
+
"footer": {
|
|
15
|
+
"btnCancel": "",
|
|
16
|
+
"btnOk": ""
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"selector": "[part='button-ok']",
|
|
4
|
+
"keyShortcuts": "Enter",
|
|
5
|
+
"action": "click",
|
|
6
|
+
"conditions": {
|
|
7
|
+
"focusExclude": "[part='button-select-location'],[part='button-cancel']"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"selector": "[part='button-cancel']",
|
|
12
|
+
"keyShortcuts": "Escape",
|
|
13
|
+
"action": "click"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-rows: max-content 1fr max-content;
|
|
4
|
+
block-size: 100%;
|
|
5
|
+
overflow: auto;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.section {
|
|
9
|
+
display: contents;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.main {
|
|
13
|
+
display: grid;
|
|
14
|
+
grid-template-rows: 1fr max-content;
|
|
15
|
+
overflow: auto;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.field-group-name-description-module {
|
|
19
|
+
grid-template-areas: "name-label name-input" "description-label description-input" "module-label module-entity-selector";
|
|
20
|
+
grid-template-columns: max-content 1fr;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.name-label {
|
|
24
|
+
grid-area: name-label;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.name-input {
|
|
28
|
+
grid-area: name-input;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.description-label {
|
|
32
|
+
grid-area: description-label;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.description-input {
|
|
36
|
+
grid-area: description-input;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.module-label {
|
|
40
|
+
grid-area: module-label;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.module-entity-selector {
|
|
44
|
+
grid-area: module-entity-selector;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.radio-file-input-wrapper {
|
|
48
|
+
grid-template-columns: max-content 1fr;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
div.field-file-input {
|
|
52
|
+
grid-template-columns: 1fr max-content;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.json-area {
|
|
56
|
+
display: grid;
|
|
57
|
+
grid-template-rows: 1fr max-content;
|
|
58
|
+
overflow: auto;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.slotted-container {
|
|
62
|
+
overflow: auto;
|
|
63
|
+
block-size: 100%;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.input-file {
|
|
67
|
+
display: grid;
|
|
68
|
+
grid-template-columns: 1fr max-content;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.radio-group {
|
|
72
|
+
gap: 30px !important;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.tooltip {
|
|
76
|
+
height: 0px;
|
|
77
|
+
}
|
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f)
|
|
3
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
5
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
6
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
9
|
+
if (kind === "m")
|
|
10
|
+
throw new TypeError("Private method is not writable");
|
|
11
|
+
if (kind === "a" && !f)
|
|
12
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
14
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
16
|
+
};
|
|
17
|
+
var _GxIdeJsonImport_componentLocale, _GxIdeJsonImport_data, _GxIdeJsonImport_radioOptionsModel, _GxIdeJsonImport_shortcutsSrc, _GxIdeJsonImport_checkBoxEl, _GxIdeJsonImport_chShortcutsEl, _GxIdeJsonImport_descriptionEl, _GxIdeJsonImport_fileInputHiddenEl, _GxIdeJsonImport_moduleEntitySelector, _GxIdeJsonImport_nameEl, _GxIdeJsonImport_radioGroup, _GxIdeJsonImport_validateForm, _GxIdeJsonImport_nameChangedHandler, _GxIdeJsonImport_changeRadioHandler, _GxIdeJsonImport_createHandler, _GxIdeJsonImport_removeFileSelection, _GxIdeJsonImport_selectFileInputChangedHandler, _GxIdeJsonImport_selectFileInputHandler, _GxIdeJsonImport_handleEditorChange, _GxIdeJsonImport_handleSlotChange;
|
|
18
|
+
import { Host, getAssetPath, h } from "@stencil/core";
|
|
19
|
+
import { getIconPath } from "@genexus/mercury";
|
|
20
|
+
import { config } from "../../common/config";
|
|
21
|
+
import { Locale } from "../../common/locale";
|
|
22
|
+
const CSS_BUNDLES = [
|
|
23
|
+
"resets/box-sizing",
|
|
24
|
+
"components/tab",
|
|
25
|
+
"components/tooltip",
|
|
26
|
+
"utils/form--full",
|
|
27
|
+
"utils/layout",
|
|
28
|
+
"utils/typography",
|
|
29
|
+
"utils/spacing",
|
|
30
|
+
"chameleon/scrollbar"
|
|
31
|
+
];
|
|
32
|
+
const FILE_ICON = getIconPath({
|
|
33
|
+
category: "gemini-tools",
|
|
34
|
+
name: "file",
|
|
35
|
+
colorType: "primary"
|
|
36
|
+
});
|
|
37
|
+
const MENU_DELETE = getIconPath({
|
|
38
|
+
category: "menus",
|
|
39
|
+
name: "delete",
|
|
40
|
+
colorType: "primary"
|
|
41
|
+
});
|
|
42
|
+
export class GxIdeJsonImport {
|
|
43
|
+
constructor() {
|
|
44
|
+
_GxIdeJsonImport_componentLocale.set(this, void 0);
|
|
45
|
+
_GxIdeJsonImport_data.set(this, {
|
|
46
|
+
name: "",
|
|
47
|
+
description: "",
|
|
48
|
+
assumeVarcharForNull: false,
|
|
49
|
+
parentId: "",
|
|
50
|
+
json: ""
|
|
51
|
+
});
|
|
52
|
+
_GxIdeJsonImport_radioOptionsModel.set(this, []);
|
|
53
|
+
_GxIdeJsonImport_shortcutsSrc.set(this, getAssetPath(`./gx-ide-assets/json-import/shortcuts.json`));
|
|
54
|
+
_GxIdeJsonImport_checkBoxEl.set(this, void 0);
|
|
55
|
+
_GxIdeJsonImport_chShortcutsEl.set(this, void 0);
|
|
56
|
+
_GxIdeJsonImport_descriptionEl.set(this, void 0);
|
|
57
|
+
_GxIdeJsonImport_fileInputHiddenEl.set(this, void 0);
|
|
58
|
+
_GxIdeJsonImport_moduleEntitySelector.set(this, void 0);
|
|
59
|
+
_GxIdeJsonImport_nameEl.set(this, void 0);
|
|
60
|
+
_GxIdeJsonImport_radioGroup.set(this, void 0);
|
|
61
|
+
_GxIdeJsonImport_validateForm.set(this, () => {
|
|
62
|
+
var _a, _b;
|
|
63
|
+
const name = ((_b = (_a = __classPrivateFieldGet(this, _GxIdeJsonImport_nameEl, "f")) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim()) || "";
|
|
64
|
+
const json = this.radioGroupValue === "file" ? this.fileName : this.jsonContent;
|
|
65
|
+
const isNameValid = this.validateNameCallback
|
|
66
|
+
? this.validateNameCallback(name)
|
|
67
|
+
: Boolean(name);
|
|
68
|
+
const isJsonValid = this.radioGroupValue === "file"
|
|
69
|
+
? Boolean(this.fileName)
|
|
70
|
+
: this.validateJSONCallback
|
|
71
|
+
? this.validateJSONCallback(json)
|
|
72
|
+
: false;
|
|
73
|
+
this.isFormValid = isNameValid && isJsonValid;
|
|
74
|
+
});
|
|
75
|
+
_GxIdeJsonImport_nameChangedHandler.set(this, () => {
|
|
76
|
+
__classPrivateFieldGet(this, _GxIdeJsonImport_validateForm, "f").call(this);
|
|
77
|
+
});
|
|
78
|
+
_GxIdeJsonImport_changeRadioHandler.set(this, () => {
|
|
79
|
+
var _a;
|
|
80
|
+
this.radioGroupValue = __classPrivateFieldGet(this, _GxIdeJsonImport_radioGroup, "f").value;
|
|
81
|
+
if (this.radioGroupValue === "file") {
|
|
82
|
+
__classPrivateFieldGet(this, _GxIdeJsonImport_checkBoxEl, "f").value = "false";
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
__classPrivateFieldGet(this, _GxIdeJsonImport_data, "f").json = null;
|
|
86
|
+
__classPrivateFieldGet(this, _GxIdeJsonImport_removeFileSelection, "f").call(this);
|
|
87
|
+
__classPrivateFieldGet(this, _GxIdeJsonImport_validateForm, "f").call(this);
|
|
88
|
+
}
|
|
89
|
+
(_a = this.modeChangeCallback) === null || _a === void 0 ? void 0 : _a.call(this, this.radioGroupValue);
|
|
90
|
+
});
|
|
91
|
+
_GxIdeJsonImport_createHandler.set(this, () => {
|
|
92
|
+
var _a;
|
|
93
|
+
__classPrivateFieldGet(this, _GxIdeJsonImport_data, "f").name = __classPrivateFieldGet(this, _GxIdeJsonImport_nameEl, "f").value;
|
|
94
|
+
__classPrivateFieldGet(this, _GxIdeJsonImport_data, "f").description = __classPrivateFieldGet(this, _GxIdeJsonImport_descriptionEl, "f").value;
|
|
95
|
+
__classPrivateFieldGet(this, _GxIdeJsonImport_data, "f").parentId = (_a = __classPrivateFieldGet(this, _GxIdeJsonImport_moduleEntitySelector, "f").value) === null || _a === void 0 ? void 0 : _a.id;
|
|
96
|
+
__classPrivateFieldGet(this, _GxIdeJsonImport_data, "f").assumeVarcharForNull = __classPrivateFieldGet(this, _GxIdeJsonImport_checkBoxEl, "f").value === "true";
|
|
97
|
+
this.confirmCallback(__classPrivateFieldGet(this, _GxIdeJsonImport_data, "f")).then((formSubmitResult) => {
|
|
98
|
+
this.showTooltipError = !formSubmitResult.success;
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
_GxIdeJsonImport_removeFileSelection.set(this, () => {
|
|
102
|
+
var _a;
|
|
103
|
+
__classPrivateFieldGet(this, _GxIdeJsonImport_data, "f").json = null;
|
|
104
|
+
__classPrivateFieldGet(this, _GxIdeJsonImport_fileInputHiddenEl, "f").value = null;
|
|
105
|
+
this.fileName = null;
|
|
106
|
+
(_a = this.fileChangeCallback) === null || _a === void 0 ? void 0 : _a.call(this, null);
|
|
107
|
+
__classPrivateFieldGet(this, _GxIdeJsonImport_validateForm, "f").call(this);
|
|
108
|
+
});
|
|
109
|
+
_GxIdeJsonImport_selectFileInputChangedHandler.set(this, (event) => {
|
|
110
|
+
var _a, _b;
|
|
111
|
+
const target = event.target;
|
|
112
|
+
if (((_a = target.files) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.radioGroupValue === "file") {
|
|
113
|
+
__classPrivateFieldGet(this, _GxIdeJsonImport_data, "f").json = target.files[0];
|
|
114
|
+
this.fileName = target.files[0].name;
|
|
115
|
+
(_b = this.fileChangeCallback) === null || _b === void 0 ? void 0 : _b.call(this, target.files[0]);
|
|
116
|
+
__classPrivateFieldGet(this, _GxIdeJsonImport_validateForm, "f").call(this);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
_GxIdeJsonImport_selectFileInputHandler.set(this, () => {
|
|
120
|
+
__classPrivateFieldGet(this, _GxIdeJsonImport_fileInputHiddenEl, "f").click();
|
|
121
|
+
});
|
|
122
|
+
_GxIdeJsonImport_handleEditorChange.set(this, () => {
|
|
123
|
+
__classPrivateFieldGet(this, _GxIdeJsonImport_validateForm, "f").call(this);
|
|
124
|
+
});
|
|
125
|
+
_GxIdeJsonImport_handleSlotChange.set(this, (e) => {
|
|
126
|
+
const elements = e.target.assignedElements();
|
|
127
|
+
if (elements.length > 0) {
|
|
128
|
+
const element = elements[0];
|
|
129
|
+
element.addEventListener("json-content-change", ((event) => {
|
|
130
|
+
if (this.radioGroupValue === "text") {
|
|
131
|
+
this.jsonContent = event.detail.content;
|
|
132
|
+
__classPrivateFieldGet(this, _GxIdeJsonImport_handleEditorChange, "f").call(this);
|
|
133
|
+
}
|
|
134
|
+
}));
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
this.fileName = undefined;
|
|
138
|
+
this.radioGroupValue = "file";
|
|
139
|
+
this.showTooltipError = false;
|
|
140
|
+
this.isFormValid = false;
|
|
141
|
+
this.jsonContent = "";
|
|
142
|
+
this.cancelCallback = undefined;
|
|
143
|
+
this.confirmCallback = undefined;
|
|
144
|
+
this.defaultParent = undefined;
|
|
145
|
+
this.defaultRadioValue = undefined;
|
|
146
|
+
this.parent = undefined;
|
|
147
|
+
this.selectModuleCallback = undefined;
|
|
148
|
+
this.modeChangeCallback = undefined;
|
|
149
|
+
this.fileChangeCallback = undefined;
|
|
150
|
+
this.validateNameCallback = undefined;
|
|
151
|
+
this.validateJSONCallback = undefined;
|
|
152
|
+
this.onJsonContentChange = undefined;
|
|
153
|
+
}
|
|
154
|
+
async componentWillLoad() {
|
|
155
|
+
__classPrivateFieldSet(this, _GxIdeJsonImport_componentLocale, await Locale.getComponentStrings(this.el), "f");
|
|
156
|
+
__classPrivateFieldSet(this, _GxIdeJsonImport_radioOptionsModel, [
|
|
157
|
+
{
|
|
158
|
+
value: "file",
|
|
159
|
+
caption: __classPrivateFieldGet(this, _GxIdeJsonImport_componentLocale, "f").header.filePathLabel
|
|
160
|
+
},
|
|
161
|
+
{ value: "text", caption: __classPrivateFieldGet(this, _GxIdeJsonImport_componentLocale, "f").main.jsonAreaLabel }
|
|
162
|
+
], "f");
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Suspends or reactivates the shortcuts
|
|
166
|
+
*/
|
|
167
|
+
async suspendShortcuts(suspendShortcuts) {
|
|
168
|
+
__classPrivateFieldGet(this, _GxIdeJsonImport_chShortcutsEl, "f").suspend = suspendShortcuts;
|
|
169
|
+
}
|
|
170
|
+
render() {
|
|
171
|
+
return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("ch-shortcuts", { src: __classPrivateFieldGet(this, _GxIdeJsonImport_shortcutsSrc, "f"), ref: (el) => (__classPrivateFieldSet(this, _GxIdeJsonImport_chShortcutsEl, el, "f")) }), h("section", { class: "section" }, h("header", { class: "header field-group spacing-body control-header-with-border" }, h("div", { class: "field-group field-group-name-description-module" }, h("label", {
|
|
172
|
+
// name
|
|
173
|
+
class: "label name-label", htmlFor: "input-name"
|
|
174
|
+
}, __classPrivateFieldGet(this, _GxIdeJsonImport_componentLocale, "f").header.nameFieldLabel), h("ch-edit", { class: "input name-input", id: "input-name", ref: (el) => (__classPrivateFieldSet(this, _GxIdeJsonImport_nameEl, el, "f")), onInput: __classPrivateFieldGet(this, _GxIdeJsonImport_nameChangedHandler, "f") }), h("label", {
|
|
175
|
+
// description
|
|
176
|
+
class: "label description-label", htmlFor: "input-description"
|
|
177
|
+
}, __classPrivateFieldGet(this, _GxIdeJsonImport_componentLocale, "f").header.descriptionFieldLabel), h("ch-edit", { class: "input description-input", id: "input-description", ref: (el) => (__classPrivateFieldSet(this, _GxIdeJsonImport_descriptionEl, el, "f")) }), h("label", {
|
|
178
|
+
// module/folder
|
|
179
|
+
class: "label module-label", htmlFor: "input-module"
|
|
180
|
+
}, __classPrivateFieldGet(this, _GxIdeJsonImport_componentLocale, "f").header.moduleFolderLabel), h("gx-ide-entity-selector", { class: "module module-entity-selector", id: "module", value: this.defaultParent, ref: (el) => (__classPrivateFieldSet(this, _GxIdeJsonImport_moduleEntitySelector, el, "f")), labelPosition: "none", defaultValue: this.defaultParent, selectEntityCallback: this.selectModuleCallback })), h("div", { class: "radio-file-input-wrapper field-group" }, h("ch-radio-group-render", {
|
|
181
|
+
// file url/text
|
|
182
|
+
class: "radio-group", model: __classPrivateFieldGet(this, _GxIdeJsonImport_radioOptionsModel, "f"), onChange: __classPrivateFieldGet(this, _GxIdeJsonImport_changeRadioHandler, "f"), value: this.defaultRadioValue, ref: (el) => (__classPrivateFieldSet(this, _GxIdeJsonImport_radioGroup, el, "f"))
|
|
183
|
+
}), h("div", { class: "field field-inline field-file-input" }, h("ch-edit", { autoFocus: true, id: "file-name", class: "input", part: "file-name", type: "text", value: this.fileName, readonly: true, placeholder: __classPrivateFieldGet(this, _GxIdeJsonImport_componentLocale, "f").header.fileNamePlaceholder, startImgSrc: FILE_ICON, disabled: this.radioGroupValue !== "file" }), h("input", { hidden: true, type: "file", accept: ".json", onChange: __classPrivateFieldGet(this, _GxIdeJsonImport_selectFileInputChangedHandler, "f"), ref: (el) => (__classPrivateFieldSet(this, _GxIdeJsonImport_fileInputHiddenEl, el, "f")) }), h("div", { class: "buttons-spacer" }, h("button", { "aria-label": __classPrivateFieldGet(this, _GxIdeJsonImport_componentLocale, "f").header.removeFileSelection, title: __classPrivateFieldGet(this, _GxIdeJsonImport_componentLocale, "f").header.removeFileSelection, id: "reset-all-button", class: "button-tertiary button-icon-only", part: "reset-all-button", onClick: __classPrivateFieldGet(this, _GxIdeJsonImport_removeFileSelection, "f"), disabled: this.radioGroupValue !== "file" }, h("ch-image", { class: "icon-md", src: MENU_DELETE })), h("button", { id: "select-file-load-button", class: "button-primary", part: "select-file-load-button", onClick: __classPrivateFieldGet(this, _GxIdeJsonImport_selectFileInputHandler, "f"), disabled: this.radioGroupValue !== "file" }, __classPrivateFieldGet(this, _GxIdeJsonImport_componentLocale, "f").header.selectfileButton))))), h("div", { class: "main field-group" }, h("div", { class: "json-area" }, h("div", { class: "slotted-container scrollable" }, h("slot", { name: "JsonTextEditor", onSlotchange: __classPrivateFieldGet(this, _GxIdeJsonImport_handleSlotChange, "f") })), this.showTooltipError && (h("ch-tooltip", { class: "tooltip", blockAlign: config.tooltipSettings.blockAlign, inlineAlign: config.tooltipSettings.inlineAlign, delay: config.tooltipSettings.delay }, "Error message"))), h("ch-checkbox", { class: "checkbox spacing-body-block-end spacing-body-inline-start", caption: __classPrivateFieldGet(this, _GxIdeJsonImport_componentLocale, "f").main.checkBoxLabel, checkedValue: "true", ref: (el) => (__classPrivateFieldSet(this, _GxIdeJsonImport_checkBoxEl, el, "f")) })), h("footer", { class: "control-footer control-footer-with-border spacing-body-block-end spacing-body-inline" }, h("div", { class: "buttons-spacer" }, h("button", { class: "button-secondary", id: "button-cancel", onClick: this.cancelCallback, part: "button-cancel" }, __classPrivateFieldGet(this, _GxIdeJsonImport_componentLocale, "f").footer.btnCancel), h("button", { class: "button-primary", id: "button-ok", onClick: __classPrivateFieldGet(this, _GxIdeJsonImport_createHandler, "f"), part: "button-ok", disabled: !this.isFormValid }, __classPrivateFieldGet(this, _GxIdeJsonImport_componentLocale, "f").footer.btnOk))))));
|
|
184
|
+
}
|
|
185
|
+
static get is() { return "gx-ide-json-import"; }
|
|
186
|
+
static get encapsulation() { return "shadow"; }
|
|
187
|
+
static get originalStyleUrls() {
|
|
188
|
+
return {
|
|
189
|
+
"$": ["json-import.scss"]
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
static get styleUrls() {
|
|
193
|
+
return {
|
|
194
|
+
"$": ["json-import.css"]
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
static get assetsDirs() { return ["gx-ide-assets/json-import"]; }
|
|
198
|
+
static get properties() {
|
|
199
|
+
return {
|
|
200
|
+
"cancelCallback": {
|
|
201
|
+
"type": "unknown",
|
|
202
|
+
"mutable": false,
|
|
203
|
+
"complexType": {
|
|
204
|
+
"original": "() => Promise<void>",
|
|
205
|
+
"resolved": "() => Promise<void>",
|
|
206
|
+
"references": {
|
|
207
|
+
"Promise": {
|
|
208
|
+
"location": "global",
|
|
209
|
+
"id": "global::Promise"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"required": false,
|
|
214
|
+
"optional": false,
|
|
215
|
+
"docs": {
|
|
216
|
+
"tags": [],
|
|
217
|
+
"text": "Callback that must be invoked when the user want to cancel the operation"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"confirmCallback": {
|
|
221
|
+
"type": "unknown",
|
|
222
|
+
"mutable": false,
|
|
223
|
+
"complexType": {
|
|
224
|
+
"original": "(\n data: JsonImportData\n ) => Promise<FormSubmitResult>",
|
|
225
|
+
"resolved": "(data: JsonImportData) => Promise<FormSubmitResult>",
|
|
226
|
+
"references": {
|
|
227
|
+
"JsonImportData": {
|
|
228
|
+
"location": "local",
|
|
229
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/json-import/json-import.tsx",
|
|
230
|
+
"id": "src/components/json-import/json-import.tsx::JsonImportData"
|
|
231
|
+
},
|
|
232
|
+
"Promise": {
|
|
233
|
+
"location": "global",
|
|
234
|
+
"id": "global::Promise"
|
|
235
|
+
},
|
|
236
|
+
"FormSubmitResult": {
|
|
237
|
+
"location": "import",
|
|
238
|
+
"path": "../../common/types",
|
|
239
|
+
"id": "src/common/types.ts::FormSubmitResult"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"required": true,
|
|
244
|
+
"optional": false,
|
|
245
|
+
"docs": {
|
|
246
|
+
"tags": [],
|
|
247
|
+
"text": "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."
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"defaultParent": {
|
|
251
|
+
"type": "unknown",
|
|
252
|
+
"mutable": false,
|
|
253
|
+
"complexType": {
|
|
254
|
+
"original": "EntityData",
|
|
255
|
+
"resolved": "{ id: string; name: string; iconSrc?: string; }",
|
|
256
|
+
"references": {
|
|
257
|
+
"EntityData": {
|
|
258
|
+
"location": "local",
|
|
259
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/json-import/json-import.tsx",
|
|
260
|
+
"id": "src/components/json-import/json-import.tsx::EntityData"
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"required": false,
|
|
265
|
+
"optional": false,
|
|
266
|
+
"docs": {
|
|
267
|
+
"tags": [],
|
|
268
|
+
"text": "Default value for Module/Folder field"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"defaultRadioValue": {
|
|
272
|
+
"type": "string",
|
|
273
|
+
"mutable": false,
|
|
274
|
+
"complexType": {
|
|
275
|
+
"original": "string",
|
|
276
|
+
"resolved": "string",
|
|
277
|
+
"references": {}
|
|
278
|
+
},
|
|
279
|
+
"required": false,
|
|
280
|
+
"optional": false,
|
|
281
|
+
"docs": {
|
|
282
|
+
"tags": [],
|
|
283
|
+
"text": "Default value for Module/Folder field"
|
|
284
|
+
},
|
|
285
|
+
"attribute": "default-radio-value",
|
|
286
|
+
"reflect": false
|
|
287
|
+
},
|
|
288
|
+
"parent": {
|
|
289
|
+
"type": "unknown",
|
|
290
|
+
"mutable": false,
|
|
291
|
+
"complexType": {
|
|
292
|
+
"original": "EntityData",
|
|
293
|
+
"resolved": "{ id: string; name: string; iconSrc?: string; }",
|
|
294
|
+
"references": {
|
|
295
|
+
"EntityData": {
|
|
296
|
+
"location": "local",
|
|
297
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/json-import/json-import.tsx",
|
|
298
|
+
"id": "src/components/json-import/json-import.tsx::EntityData"
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"required": false,
|
|
303
|
+
"optional": false,
|
|
304
|
+
"docs": {
|
|
305
|
+
"tags": [],
|
|
306
|
+
"text": "Actual value for Module/Folder field"
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"selectModuleCallback": {
|
|
310
|
+
"type": "unknown",
|
|
311
|
+
"mutable": false,
|
|
312
|
+
"complexType": {
|
|
313
|
+
"original": "SelectModuleCallback",
|
|
314
|
+
"resolved": "() => Promise<EntityData>",
|
|
315
|
+
"references": {
|
|
316
|
+
"SelectModuleCallback": {
|
|
317
|
+
"location": "local",
|
|
318
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/json-import/json-import.tsx",
|
|
319
|
+
"id": "src/components/json-import/json-import.tsx::SelectModuleCallback"
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"required": false,
|
|
324
|
+
"optional": false,
|
|
325
|
+
"docs": {
|
|
326
|
+
"tags": [],
|
|
327
|
+
"text": "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."
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
"modeChangeCallback": {
|
|
331
|
+
"type": "unknown",
|
|
332
|
+
"mutable": false,
|
|
333
|
+
"complexType": {
|
|
334
|
+
"original": "(\n mode: \"file\" | \"text\"\n ) => Promise<void>",
|
|
335
|
+
"resolved": "(mode: \"text\" | \"file\") => Promise<void>",
|
|
336
|
+
"references": {
|
|
337
|
+
"Promise": {
|
|
338
|
+
"location": "global",
|
|
339
|
+
"id": "global::Promise"
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"required": false,
|
|
344
|
+
"optional": true,
|
|
345
|
+
"docs": {
|
|
346
|
+
"tags": [],
|
|
347
|
+
"text": "Callback invoked when the input mode changes between file and text."
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"fileChangeCallback": {
|
|
351
|
+
"type": "unknown",
|
|
352
|
+
"mutable": false,
|
|
353
|
+
"complexType": {
|
|
354
|
+
"original": "(file: File | null) => Promise<void>",
|
|
355
|
+
"resolved": "(file: File) => Promise<void>",
|
|
356
|
+
"references": {
|
|
357
|
+
"File": {
|
|
358
|
+
"location": "global",
|
|
359
|
+
"id": "global::File"
|
|
360
|
+
},
|
|
361
|
+
"Promise": {
|
|
362
|
+
"location": "global",
|
|
363
|
+
"id": "global::Promise"
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"required": false,
|
|
368
|
+
"optional": true,
|
|
369
|
+
"docs": {
|
|
370
|
+
"tags": [],
|
|
371
|
+
"text": "Callback invoked when a file is selected or removed."
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"validateNameCallback": {
|
|
375
|
+
"type": "unknown",
|
|
376
|
+
"mutable": false,
|
|
377
|
+
"complexType": {
|
|
378
|
+
"original": "(name: string) => boolean",
|
|
379
|
+
"resolved": "(name: string) => boolean",
|
|
380
|
+
"references": {}
|
|
381
|
+
},
|
|
382
|
+
"required": false,
|
|
383
|
+
"optional": true,
|
|
384
|
+
"docs": {
|
|
385
|
+
"tags": [],
|
|
386
|
+
"text": "Callback para validar el nombre del objeto. Debe retornar true si el nombre es v\u00E1lido, false en caso contrario."
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"validateJSONCallback": {
|
|
390
|
+
"type": "unknown",
|
|
391
|
+
"mutable": false,
|
|
392
|
+
"complexType": {
|
|
393
|
+
"original": "(json: string) => boolean",
|
|
394
|
+
"resolved": "(json: string) => boolean",
|
|
395
|
+
"references": {}
|
|
396
|
+
},
|
|
397
|
+
"required": false,
|
|
398
|
+
"optional": true,
|
|
399
|
+
"docs": {
|
|
400
|
+
"tags": [],
|
|
401
|
+
"text": "Callback para validar el JSON. Debe retornar true si el JSON es v\u00E1lido, false en caso contrario."
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
"onJsonContentChange": {
|
|
405
|
+
"type": "unknown",
|
|
406
|
+
"mutable": false,
|
|
407
|
+
"complexType": {
|
|
408
|
+
"original": "(content: string) => void",
|
|
409
|
+
"resolved": "(content: string) => void",
|
|
410
|
+
"references": {}
|
|
411
|
+
},
|
|
412
|
+
"required": false,
|
|
413
|
+
"optional": true,
|
|
414
|
+
"docs": {
|
|
415
|
+
"tags": [],
|
|
416
|
+
"text": "Callback invocado cuando el contenido del JSON cambia"
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
static get states() {
|
|
422
|
+
return {
|
|
423
|
+
"fileName": {},
|
|
424
|
+
"radioGroupValue": {},
|
|
425
|
+
"showTooltipError": {},
|
|
426
|
+
"isFormValid": {},
|
|
427
|
+
"jsonContent": {}
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
static get methods() {
|
|
431
|
+
return {
|
|
432
|
+
"suspendShortcuts": {
|
|
433
|
+
"complexType": {
|
|
434
|
+
"signature": "(suspendShortcuts: boolean) => Promise<void>",
|
|
435
|
+
"parameters": [{
|
|
436
|
+
"name": "suspendShortcuts",
|
|
437
|
+
"type": "boolean",
|
|
438
|
+
"docs": ""
|
|
439
|
+
}],
|
|
440
|
+
"references": {
|
|
441
|
+
"Promise": {
|
|
442
|
+
"location": "global",
|
|
443
|
+
"id": "global::Promise"
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
"return": "Promise<void>"
|
|
447
|
+
},
|
|
448
|
+
"docs": {
|
|
449
|
+
"text": "Suspends or reactivates the shortcuts",
|
|
450
|
+
"tags": []
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
static get elementRef() { return "el"; }
|
|
456
|
+
}
|
|
457
|
+
_GxIdeJsonImport_componentLocale = new WeakMap(), _GxIdeJsonImport_data = new WeakMap(), _GxIdeJsonImport_radioOptionsModel = new WeakMap(), _GxIdeJsonImport_shortcutsSrc = new WeakMap(), _GxIdeJsonImport_checkBoxEl = new WeakMap(), _GxIdeJsonImport_chShortcutsEl = new WeakMap(), _GxIdeJsonImport_descriptionEl = new WeakMap(), _GxIdeJsonImport_fileInputHiddenEl = new WeakMap(), _GxIdeJsonImport_moduleEntitySelector = new WeakMap(), _GxIdeJsonImport_nameEl = new WeakMap(), _GxIdeJsonImport_radioGroup = new WeakMap(), _GxIdeJsonImport_validateForm = new WeakMap(), _GxIdeJsonImport_nameChangedHandler = new WeakMap(), _GxIdeJsonImport_changeRadioHandler = new WeakMap(), _GxIdeJsonImport_createHandler = new WeakMap(), _GxIdeJsonImport_removeFileSelection = new WeakMap(), _GxIdeJsonImport_selectFileInputChangedHandler = new WeakMap(), _GxIdeJsonImport_selectFileInputHandler = new WeakMap(), _GxIdeJsonImport_handleEditorChange = new WeakMap(), _GxIdeJsonImport_handleSlotChange = new WeakMap();
|
|
458
|
+
//# sourceMappingURL=json-import.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-import.js","sourceRoot":"","sources":["../../../src/components/json-import/json-import.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,KAAK,EACL,YAAY,EACZ,MAAM,EACN,CAAC,EACF,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAkB,WAA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ACE,KAAK,EAAC,kBAAkB,EACxB,EAAE,EAAC,eAAe,EAClB,OAAO,EAAE,IAAI,CAAC,cAAc,EAC5B,IAAI,EAAC,eAAe,IAEnB,uBAAA,IAAI,wCAAiB,CAAC,MAAM,CAAC,SAAS,CAChC;wBACT,cACE,KAAK,EAAC,gBAAgB,EACtB,EAAE,EAAC,WAAW,EACd,OAAO,EAAE,uBAAA,IAAI,sCAAe,EAC5B,IAAI,EAAC,WAAW,EAChB,QAAQ,EAAE,CAAC,IAAI,CAAC,WAAW,IAE1B,uBAAA,IAAI,wCAAiB,CAAC,MAAM,CAAC,KAAK,CAC5B,CACL,CACC,CACD,CACL,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
|
|
@@ -190,10 +190,10 @@ export class GxIdeObjectSelector {
|
|
|
190
190
|
}, __classPrivateFieldGet(this, _GxIdeObjectSelector_componentLocale, "f").footer.btnNew), h("div", { class: "end buttons-spacer" }, h("button", {
|
|
191
191
|
// button cancel
|
|
192
192
|
class: "button-secondary", part: "button button-cancel", onClick: __classPrivateFieldGet(this, _GxIdeObjectSelector_cancelCallbackHandler, "f")
|
|
193
|
-
}, __classPrivateFieldGet(this, _GxIdeObjectSelector_componentLocale, "f").footer.btnCancel), h("button", {
|
|
193
|
+
}, __classPrivateFieldGet(this, _GxIdeObjectSelector_componentLocale, "f").footer.btnCancel), this.multiSelection ? (h("button", { class: "button-secondary", onClick: __classPrivateFieldGet(this, _GxIdeObjectSelector_selectAll, "f"), part: "button button-select-all" }, __classPrivateFieldGet(this, _GxIdeObjectSelector_componentLocale, "f").footer.btnSelectAll)) : null, h("button", {
|
|
194
194
|
// button confirm
|
|
195
195
|
class: "button-primary", part: "button button-confirm", onClick: __classPrivateFieldGet(this, _GxIdeObjectSelector_openSelectionCallbackHandler, "f"), disabled: this.loading
|
|
196
|
-
}, __classPrivateFieldGet(this, _GxIdeObjectSelector_componentLocale, "f").footer.btnConfirm)
|
|
196
|
+
}, __classPrivateFieldGet(this, _GxIdeObjectSelector_componentLocale, "f").footer.btnConfirm)))));
|
|
197
197
|
});
|
|
198
198
|
_GxIdeObjectSelector_renderObjects.set(this, () => {
|
|
199
199
|
return (h("ch-tabular-grid", { class: {
|