@genexus/genexus-ide-ui 1.1.61 → 1.1.62
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/{common-f2540d3e.js → common-51d68918.js} +1 -31
- package/dist/cjs/common-51d68918.js.map +1 -0
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-edit-module-server.cjs.entry.js +111 -49
- package/dist/cjs/gx-ide-edit-module-server.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-empty-state.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js +358 -266
- package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-new-environment.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-progress-bar.cjs.entry.js +141 -0
- package/dist/cjs/gx-ide-progress-bar.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-splash.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-ww-images.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/common/common.js +0 -21
- package/dist/collection/common/common.js.map +1 -1
- package/dist/collection/components/_helpers/empty-state/gx-ide-empty-state.css +1 -1
- package/dist/collection/components/_helpers/progress-bar/gx-ide-assets/progress-bar/langs/progress-bar.lang.en.json +5 -0
- package/dist/collection/components/_helpers/progress-bar/gx-ide-assets/progress-bar/langs/progress-bar.lang.ja.json +5 -0
- package/dist/collection/components/_helpers/progress-bar/gx-ide-assets/progress-bar/langs/progress-bar.lang.zh.json +5 -0
- package/dist/collection/components/_helpers/progress-bar/progress-bar.css +210 -0
- package/dist/collection/components/_helpers/progress-bar/progress-bar.js +320 -0
- package/dist/collection/components/_helpers/progress-bar/progress-bar.js.map +1 -0
- package/dist/collection/components/modules/edit-module-server/edit-module-server.css +30 -639
- package/dist/collection/components/modules/edit-module-server/edit-module-server.js +179 -110
- package/dist/collection/components/modules/edit-module-server/edit-module-server.js.map +1 -1
- package/dist/collection/components/modules/edit-module-server/gx-ide-assets/edit-module-server/shortcuts.json +15 -0
- package/dist/collection/components/modules/edit-module-server/helpers.js +12 -0
- package/dist/collection/components/modules/edit-module-server/helpers.js.map +1 -0
- package/dist/collection/components/modules/manage-module-references/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.en.json +6 -2
- package/dist/collection/components/modules/manage-module-references/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.ja.json +6 -2
- package/dist/collection/components/modules/manage-module-references/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.zh.json +6 -2
- package/dist/collection/components/modules/manage-module-references/helpers.js +32 -0
- package/dist/collection/components/modules/manage-module-references/helpers.js.map +1 -0
- package/dist/collection/components/modules/manage-module-references/manage-module-references.css +116 -789
- package/dist/collection/components/modules/manage-module-references/manage-module-references.js +378 -373
- package/dist/collection/components/modules/manage-module-references/manage-module-references.js.map +1 -1
- package/dist/collection/testing/locale.e2e.js +1 -0
- package/dist/collection/testing/locale.e2e.js.map +1 -1
- package/dist/components/common.js +1 -30
- package/dist/components/common.js.map +1 -1
- package/dist/components/gx-ide-edit-module-server.js +118 -68
- package/dist/components/gx-ide-edit-module-server.js.map +1 -1
- package/dist/components/gx-ide-empty-state2.js +1 -1
- package/dist/components/gx-ide-empty-state2.js.map +1 -1
- package/dist/components/gx-ide-manage-module-references.js +384 -291
- package/dist/components/gx-ide-manage-module-references.js.map +1 -1
- package/dist/components/gx-ide-progress-bar.d.ts +11 -0
- package/dist/components/gx-ide-progress-bar.js +8 -0
- package/dist/components/gx-ide-progress-bar.js.map +1 -0
- package/dist/components/gx-ide-ww-images.js +1 -1
- package/dist/components/progress-bar.js +166 -0
- package/dist/components/progress-bar.js.map +1 -0
- package/dist/esm/{common-b811a822.js → common-dc966e64.js} +2 -31
- package/dist/esm/common-dc966e64.js.map +1 -0
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-edit-module-server.entry.js +112 -50
- package/dist/esm/gx-ide-edit-module-server.entry.js.map +1 -1
- package/dist/esm/gx-ide-empty-state.entry.js +1 -1
- package/dist/esm/gx-ide-empty-state.entry.js.map +1 -1
- package/dist/esm/gx-ide-manage-module-references.entry.js +359 -267
- package/dist/esm/gx-ide-manage-module-references.entry.js.map +1 -1
- package/dist/esm/gx-ide-new-environment.entry.js +1 -1
- package/dist/esm/gx-ide-new-kb.entry.js +1 -1
- package/dist/esm/gx-ide-progress-bar.entry.js +137 -0
- package/dist/esm/gx-ide-progress-bar.entry.js.map +1 -0
- package/dist/esm/gx-ide-splash.entry.js +1 -1
- package/dist/esm/gx-ide-ww-images.entry.js +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/edit-module-server/shortcuts.json +15 -0
- package/dist/genexus-ide-ui/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.en.json +6 -2
- package/dist/genexus-ide-ui/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.ja.json +6 -2
- package/dist/genexus-ide-ui/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.zh.json +6 -2
- package/dist/genexus-ide-ui/gx-ide-assets/progress-bar/langs/progress-bar.lang.en.json +5 -0
- package/dist/genexus-ide-ui/gx-ide-assets/progress-bar/langs/progress-bar.lang.ja.json +5 -0
- package/dist/genexus-ide-ui/gx-ide-assets/progress-bar/langs/progress-bar.lang.zh.json +5 -0
- package/dist/genexus-ide-ui/p-29ac6b13.entry.js +582 -0
- package/dist/genexus-ide-ui/p-29ac6b13.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-3a22af5d.entry.js +249 -0
- package/dist/genexus-ide-ui/p-3a22af5d.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-45d9dcbc.entry.js +166 -0
- package/dist/genexus-ide-ui/p-45d9dcbc.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-84d39fc6.entry.js → p-5f7de718.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-84d39fc6.entry.js.map → p-5f7de718.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-f5734cc7.entry.js → p-630581df.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-d41d52f6.entry.js → p-70038e09.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-b5aadc8d.entry.js → p-8f2f8995.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-ae33da9a.entry.js → p-9606ebed.entry.js} +19 -19
- package/dist/genexus-ide-ui/p-97bbd54c.js +132 -0
- package/dist/genexus-ide-ui/p-97bbd54c.js.map +1 -0
- package/dist/types/common/common.d.ts +0 -2
- package/dist/types/components/_helpers/progress-bar/progress-bar.d.ts +61 -0
- package/dist/types/components/modules/edit-module-server/edit-module-server.d.ts +15 -30
- package/dist/types/components/modules/edit-module-server/helpers.d.ts +3 -0
- package/dist/types/components/modules/manage-module-references/helpers.d.ts +5 -0
- package/dist/types/components/modules/manage-module-references/manage-module-references.d.ts +43 -88
- package/dist/types/components.d.ts +109 -42
- package/package.json +1 -1
- package/dist/cjs/common-f2540d3e.js.map +0 -1
- package/dist/esm/common-b811a822.js.map +0 -1
- package/dist/genexus-ide-ui/p-67e3486a.entry.js +0 -498
- package/dist/genexus-ide-ui/p-67e3486a.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-714b37c0.js +0 -159
- package/dist/genexus-ide-ui/p-714b37c0.js.map +0 -1
- package/dist/genexus-ide-ui/p-e13998a5.entry.js +0 -141
- package/dist/genexus-ide-ui/p-e13998a5.entry.js.map +0 -1
- /package/dist/genexus-ide-ui/{p-f5734cc7.entry.js.map → p-630581df.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-d41d52f6.entry.js.map → p-70038e09.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-b5aadc8d.entry.js.map → p-8f2f8995.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-ae33da9a.entry.js.map → p-9606ebed.entry.js.map} +0 -0
|
@@ -1,39 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 _GxIdeEditModuleServer__componentLocale, _GxIdeEditModuleServer_renderedFirstTime, _GxIdeEditModuleServer_serverTypesModel, _GxIdeEditModuleServer_shortcutsSrc, _GxIdeEditModuleServer_chShortcutsEl, _GxIdeEditModuleServer_nameEl, _GxIdeEditModuleServer_passwordEl, _GxIdeEditModuleServer_serverTypeEl, _GxIdeEditModuleServer_sourceEl, _GxIdeEditModuleServer_userEl, _GxIdeEditModuleServer_cancelCallbackHandler, _GxIdeEditModuleServer_confirmCallbackHandler, _GxIdeEditModuleServer_handleServerTypeChange, _GxIdeEditModuleServer_renderFooter, _GxIdeEditModuleServer_renderServerOptions, _GxIdeEditModuleServer_selectSourceCallbackHandle;
|
|
18
|
+
import { Host, h, getAssetPath } from "@stencil/core";
|
|
5
19
|
import { Locale } from "../../../common/locale";
|
|
20
|
+
import { getIconPath } from "@genexus/mercury";
|
|
21
|
+
import { mapTypesToComboboxItemModel } from "./helpers";
|
|
22
|
+
const CSS_BUNDLES = [
|
|
23
|
+
"resets/box-sizing",
|
|
24
|
+
"utils/form--full",
|
|
25
|
+
"utils/layout",
|
|
26
|
+
"utils/typography",
|
|
27
|
+
"utils/spacing",
|
|
28
|
+
"chameleon/scrollbar"
|
|
29
|
+
];
|
|
30
|
+
const MORE_ICON = getIconPath({
|
|
31
|
+
category: "gemini-tools",
|
|
32
|
+
name: "show-more-horizontal",
|
|
33
|
+
colorType: "on-surface"
|
|
34
|
+
});
|
|
6
35
|
export class GxIdeEditModuleServer {
|
|
7
36
|
constructor() {
|
|
8
|
-
this
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
this
|
|
37
|
+
_GxIdeEditModuleServer__componentLocale.set(this, void 0);
|
|
38
|
+
_GxIdeEditModuleServer_renderedFirstTime.set(this, false);
|
|
39
|
+
_GxIdeEditModuleServer_serverTypesModel.set(this, []);
|
|
40
|
+
_GxIdeEditModuleServer_shortcutsSrc.set(this, getAssetPath(`./gx-ide-assets/edit-module-server/shortcuts.json`));
|
|
41
|
+
_GxIdeEditModuleServer_chShortcutsEl.set(this, void 0);
|
|
42
|
+
_GxIdeEditModuleServer_nameEl.set(this, void 0);
|
|
43
|
+
_GxIdeEditModuleServer_passwordEl.set(this, void 0);
|
|
44
|
+
_GxIdeEditModuleServer_serverTypeEl.set(this, void 0);
|
|
45
|
+
_GxIdeEditModuleServer_sourceEl.set(this, void 0);
|
|
46
|
+
_GxIdeEditModuleServer_userEl.set(this, void 0);
|
|
47
|
+
_GxIdeEditModuleServer_cancelCallbackHandler.set(this, async () => {
|
|
48
|
+
await this.cancelCallback();
|
|
49
|
+
});
|
|
50
|
+
_GxIdeEditModuleServer_confirmCallbackHandler.set(this, async () => {
|
|
16
51
|
if (this.confirmCallback) {
|
|
17
52
|
const selectedTypeId = this.types.find(({ type }) => type === this.selectedType);
|
|
18
53
|
let data = {};
|
|
19
54
|
if (selectedTypeId.type === "remote") {
|
|
20
55
|
data = {
|
|
21
56
|
id: selectedTypeId.id,
|
|
22
|
-
name: this.
|
|
23
|
-
type: this.
|
|
57
|
+
name: __classPrivateFieldGet(this, _GxIdeEditModuleServer_nameEl, "f").value,
|
|
58
|
+
type: __classPrivateFieldGet(this, _GxIdeEditModuleServer_serverTypeEl, "f").value,
|
|
24
59
|
authenticated: selectedTypeId.authenticated,
|
|
25
|
-
source: this.
|
|
26
|
-
user: this.
|
|
27
|
-
password: this.
|
|
60
|
+
source: __classPrivateFieldGet(this, _GxIdeEditModuleServer_sourceEl, "f").value,
|
|
61
|
+
user: __classPrivateFieldGet(this, _GxIdeEditModuleServer_userEl, "f").value,
|
|
62
|
+
password: __classPrivateFieldGet(this, _GxIdeEditModuleServer_passwordEl, "f").value
|
|
28
63
|
};
|
|
29
64
|
}
|
|
30
65
|
else {
|
|
31
66
|
data = {
|
|
32
67
|
id: selectedTypeId.id,
|
|
33
|
-
name: this.
|
|
34
|
-
type: this.
|
|
68
|
+
name: __classPrivateFieldGet(this, _GxIdeEditModuleServer_nameEl, "f").value,
|
|
69
|
+
type: __classPrivateFieldGet(this, _GxIdeEditModuleServer_serverTypeEl, "f").value,
|
|
35
70
|
authenticated: selectedTypeId.authenticated,
|
|
36
|
-
source: this.
|
|
71
|
+
source: __classPrivateFieldGet(this, _GxIdeEditModuleServer_sourceEl, "f").value
|
|
37
72
|
};
|
|
38
73
|
}
|
|
39
74
|
const result = await this.confirmCallback(data);
|
|
@@ -44,50 +79,58 @@ export class GxIdeEditModuleServer {
|
|
|
44
79
|
// display error message
|
|
45
80
|
}
|
|
46
81
|
}
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
this
|
|
52
|
-
|
|
53
|
-
};
|
|
54
|
-
this
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
82
|
+
});
|
|
83
|
+
_GxIdeEditModuleServer_handleServerTypeChange.set(this, (e) => {
|
|
84
|
+
this.selectedType = e.detail;
|
|
85
|
+
});
|
|
86
|
+
_GxIdeEditModuleServer_renderFooter.set(this, () => {
|
|
87
|
+
return (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: __classPrivateFieldGet(this, _GxIdeEditModuleServer_cancelCallbackHandler, "f"), part: "button-cancel" }, __classPrivateFieldGet(this, _GxIdeEditModuleServer__componentLocale, "f").footer.btnCancel), h("button", { class: "button-primary", id: "button-create", onClick: __classPrivateFieldGet(this, _GxIdeEditModuleServer_confirmCallbackHandler, "f"), part: "button-create" }, __classPrivateFieldGet(this, _GxIdeEditModuleServer__componentLocale, "f").footer.btnConfirm))));
|
|
88
|
+
});
|
|
89
|
+
_GxIdeEditModuleServer_renderServerOptions.set(this, () => {
|
|
90
|
+
return (h("div", { class: "spacing-body user-password" }, h("div", { class: "auth-column-1" }, h("label", { class: "label", htmlFor: "user" }, __classPrivateFieldGet(this, _GxIdeEditModuleServer__componentLocale, "f").user), h("label", { class: "label", htmlFor: "password" }, __classPrivateFieldGet(this, _GxIdeEditModuleServer__componentLocale, "f").password)), h("div", { class: "auth-column-2" }, h("ch-edit", { id: "user", part: "user", class: "input", placeholder: __classPrivateFieldGet(this, _GxIdeEditModuleServer__componentLocale, "f").user, ref: (el) => (__classPrivateFieldSet(this, _GxIdeEditModuleServer_userEl, el, "f")) }), h("ch-edit", { id: "password", part: "password", class: "input", placeholder: __classPrivateFieldGet(this, _GxIdeEditModuleServer__componentLocale, "f").password, ref: (el) => (__classPrivateFieldSet(this, _GxIdeEditModuleServer_passwordEl, el, "f")) }))));
|
|
91
|
+
});
|
|
92
|
+
_GxIdeEditModuleServer_selectSourceCallbackHandle.set(this, async () => {
|
|
93
|
+
if (this.selectSourceCallback) {
|
|
94
|
+
const path = await this.selectSourceCallback();
|
|
95
|
+
if (path) {
|
|
96
|
+
__classPrivateFieldGet(this, _GxIdeEditModuleServer_sourceEl, "f").value = path;
|
|
97
|
+
}
|
|
58
98
|
}
|
|
59
|
-
};
|
|
60
|
-
// 10.LOCAL METHODS //
|
|
61
|
-
this.renderServerOptions = () => {
|
|
62
|
-
return [
|
|
63
|
-
h("div", { class: "grid-server-auth-column-1" }, h("gxg-label", null, this._componentLocale.user), h("gxg-label", null, this._componentLocale.password)),
|
|
64
|
-
h("div", { class: "grid-server-auth-column-2" }, h("gxg-form-text", { placeholder: this._componentLocale.user, ref: (el) => (this.userEl = el), part: "user" }), h("gxg-form-text", { password: true, placeholder: this._componentLocale.password, ref: (el) => (this.passwordEl = el), part: "password" }))
|
|
65
|
-
];
|
|
66
|
-
};
|
|
99
|
+
});
|
|
67
100
|
this.selectedType = "local";
|
|
68
|
-
this.
|
|
101
|
+
this.cancelCallback = undefined;
|
|
102
|
+
this.confirmCallback = undefined;
|
|
69
103
|
this.name = undefined;
|
|
104
|
+
this.selectSourceCallback = undefined;
|
|
70
105
|
this.source = undefined;
|
|
71
106
|
this.type = undefined;
|
|
72
|
-
this.
|
|
73
|
-
this.selectSourceCallback = undefined;
|
|
74
|
-
this.cancelCallback = undefined;
|
|
107
|
+
this.types = undefined;
|
|
75
108
|
}
|
|
76
|
-
// 6.COMPONENT LIFECYCLE EVENTS //
|
|
77
109
|
async componentWillLoad() {
|
|
78
|
-
this
|
|
110
|
+
__classPrivateFieldSet(this, _GxIdeEditModuleServer__componentLocale, await Locale.getComponentStrings(this.el), "f");
|
|
111
|
+
__classPrivateFieldSet(this, _GxIdeEditModuleServer_serverTypesModel, mapTypesToComboboxItemModel(this.types), "f");
|
|
79
112
|
}
|
|
80
113
|
componentDidRender() {
|
|
81
|
-
if (!this
|
|
82
|
-
this.componentDidRenderFirstTime.emit(this.
|
|
83
|
-
this
|
|
114
|
+
if (!__classPrivateFieldGet(this, _GxIdeEditModuleServer_renderedFirstTime, "f")) {
|
|
115
|
+
this.componentDidRenderFirstTime.emit(__classPrivateFieldGet(this, _GxIdeEditModuleServer__componentLocale, "f").componentName);
|
|
116
|
+
__classPrivateFieldSet(this, _GxIdeEditModuleServer_renderedFirstTime, true, "f");
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Suspends or reactivates the shortcuts
|
|
121
|
+
*/
|
|
122
|
+
async suspendShortcuts(suspendShortcuts) {
|
|
123
|
+
if (suspendShortcuts) {
|
|
124
|
+
__classPrivateFieldGet(this, _GxIdeEditModuleServer_chShortcutsEl, "f").suspend = true;
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
__classPrivateFieldGet(this, _GxIdeEditModuleServer_chShortcutsEl, "f").suspend = false;
|
|
84
128
|
}
|
|
85
129
|
}
|
|
86
130
|
render() {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
: "grid module-servers-grid-server" }, h("div", { class: "module-servers-grid-column-1" }, h("gxg-label", null, " ", this._componentLocale.type), h("gxg-label", null, " ", this._componentLocale.name), h("gxg-label", null, " ", this._componentLocale.source)), h("div", { class: "module-servers-grid-column-2" }, h("gxg-combo-box", { value: this.type, ref: (el) => (this.serverTypeEl = el) }, (_a = this.types) === null || _a === void 0 ? void 0 : _a.map(type => (h("gxg-combo-box-item", { value: type.id, onItemSelected: item => (this.selectedType = item.detail.value) }, type.type)))), h("gxg-form-text", { placeholder: this._componentLocale.name, ref: (el) => (this.nameEl = el), value: this.name, part: "name" }), h("gxg-form-text", { placeholder: this._componentLocale.source, ref: (el) => (this.sourceEl = el), value: this.source, part: "source" })), this.selectedType === "local" && (h("gxg-button", { onClick: this.selectSourceCallbackHandle }, "...")), this.selectedType === "remote" && this.renderServerOptions()), h("gxg-button", { slot: "footer-end", type: "outlined", onClick: this.cancelCallbackHandler }, this._componentLocale.footer.btnCancel), h("gxg-button", { slot: "footer-end", type: "primary-text-only", onClick: this.confirmCallbackHandler }, this._componentLocale.footer.btnConfirm)))));
|
|
131
|
+
return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("ch-shortcuts", { src: __classPrivateFieldGet(this, _GxIdeEditModuleServer_shortcutsSrc, "f"), ref: (el) => (__classPrivateFieldSet(this, _GxIdeEditModuleServer_chShortcutsEl, el, "f")) }), h("div", { class: this.selectedType === "local"
|
|
132
|
+
? "module-servers-grid-local"
|
|
133
|
+
: "module-servers-grid-server" }, h("div", { class: "server-options spacing-body" }, h("div", { class: "server-options__col1" }, h("label", { class: "label", htmlFor: "server-type" }, __classPrivateFieldGet(this, _GxIdeEditModuleServer__componentLocale, "f").type), h("label", { class: "label", htmlFor: "name" }, __classPrivateFieldGet(this, _GxIdeEditModuleServer__componentLocale, "f").name), h("label", { class: "label", htmlFor: "source" }, __classPrivateFieldGet(this, _GxIdeEditModuleServer__componentLocale, "f").source)), h("div", { class: "server-options__col2" }, h("ch-combo-box-render", { accessibleName: "server types", id: "server-type", part: "server-type", class: "combo-box", model: __classPrivateFieldGet(this, _GxIdeEditModuleServer_serverTypesModel, "f"), value: this.types[0].type, onChange: __classPrivateFieldGet(this, _GxIdeEditModuleServer_handleServerTypeChange, "f"), ref: (el) => (__classPrivateFieldSet(this, _GxIdeEditModuleServer_serverTypeEl, el, "f")) }), h("ch-edit", { placeholder: __classPrivateFieldGet(this, _GxIdeEditModuleServer__componentLocale, "f").name, ref: (el) => (__classPrivateFieldSet(this, _GxIdeEditModuleServer_nameEl, el, "f")), value: this.name, part: "name", class: "input", id: "name" }), h("div", { class: "source-input" }, h("ch-edit", { placeholder: __classPrivateFieldGet(this, _GxIdeEditModuleServer__componentLocale, "f").source, ref: (el) => (__classPrivateFieldSet(this, _GxIdeEditModuleServer_sourceEl, el, "f")), value: this.source, class: "input", part: "source", id: "source" }), this.selectedType === "local" && (h("button", { class: "button-tertiary button-icon-only", "aria-label": "caption", onClick: __classPrivateFieldGet(this, _GxIdeEditModuleServer_selectSourceCallbackHandle, "f") }, h("ch-image", { class: "icon-sm", src: MORE_ICON })))))), this.selectedType === "remote" && __classPrivateFieldGet(this, _GxIdeEditModuleServer_renderServerOptions, "f").call(this), __classPrivateFieldGet(this, _GxIdeEditModuleServer_renderFooter, "f").call(this))));
|
|
91
134
|
}
|
|
92
135
|
static get is() { return "gx-ide-edit-module-server"; }
|
|
93
136
|
static get encapsulation() { return "shadow"; }
|
|
@@ -104,17 +147,17 @@ export class GxIdeEditModuleServer {
|
|
|
104
147
|
static get assetsDirs() { return ["gx-ide-assets/edit-module-server"]; }
|
|
105
148
|
static get properties() {
|
|
106
149
|
return {
|
|
107
|
-
"
|
|
150
|
+
"cancelCallback": {
|
|
108
151
|
"type": "unknown",
|
|
109
152
|
"mutable": false,
|
|
110
153
|
"complexType": {
|
|
111
|
-
"original": "
|
|
112
|
-
"resolved": "
|
|
154
|
+
"original": "CancelCallback",
|
|
155
|
+
"resolved": "() => Promise<void>",
|
|
113
156
|
"references": {
|
|
114
|
-
"
|
|
115
|
-
"location": "
|
|
116
|
-
"path": "
|
|
117
|
-
"id": "src/components/modules/
|
|
157
|
+
"CancelCallback": {
|
|
158
|
+
"location": "local",
|
|
159
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/modules/edit-module-server/edit-module-server.tsx",
|
|
160
|
+
"id": "src/components/modules/edit-module-server/edit-module-server.tsx::CancelCallback"
|
|
118
161
|
}
|
|
119
162
|
}
|
|
120
163
|
},
|
|
@@ -122,7 +165,28 @@ export class GxIdeEditModuleServer {
|
|
|
122
165
|
"optional": false,
|
|
123
166
|
"docs": {
|
|
124
167
|
"tags": [],
|
|
125
|
-
"text": "
|
|
168
|
+
"text": "Cancel callback"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"confirmCallback": {
|
|
172
|
+
"type": "unknown",
|
|
173
|
+
"mutable": false,
|
|
174
|
+
"complexType": {
|
|
175
|
+
"original": "ConfirmCallback",
|
|
176
|
+
"resolved": "(data: ModuleServerFullData) => Promise<EditServerModuleResult>",
|
|
177
|
+
"references": {
|
|
178
|
+
"ConfirmCallback": {
|
|
179
|
+
"location": "local",
|
|
180
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/modules/edit-module-server/edit-module-server.tsx",
|
|
181
|
+
"id": "src/components/modules/edit-module-server/edit-module-server.tsx::ConfirmCallback"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"required": false,
|
|
186
|
+
"optional": false,
|
|
187
|
+
"docs": {
|
|
188
|
+
"tags": [],
|
|
189
|
+
"text": "Confirm callback"
|
|
126
190
|
}
|
|
127
191
|
},
|
|
128
192
|
"name": {
|
|
@@ -142,6 +206,27 @@ export class GxIdeEditModuleServer {
|
|
|
142
206
|
"attribute": "name",
|
|
143
207
|
"reflect": false
|
|
144
208
|
},
|
|
209
|
+
"selectSourceCallback": {
|
|
210
|
+
"type": "unknown",
|
|
211
|
+
"mutable": false,
|
|
212
|
+
"complexType": {
|
|
213
|
+
"original": "SelectSourceCallback",
|
|
214
|
+
"resolved": "() => Promise<string>",
|
|
215
|
+
"references": {
|
|
216
|
+
"SelectSourceCallback": {
|
|
217
|
+
"location": "local",
|
|
218
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/modules/edit-module-server/edit-module-server.tsx",
|
|
219
|
+
"id": "src/components/modules/edit-module-server/edit-module-server.tsx::SelectSourceCallback"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"required": false,
|
|
224
|
+
"optional": false,
|
|
225
|
+
"docs": {
|
|
226
|
+
"tags": [],
|
|
227
|
+
"text": "Callback invoked when wants to select a local folder that have modules inside"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
145
230
|
"source": {
|
|
146
231
|
"type": "string",
|
|
147
232
|
"mutable": false,
|
|
@@ -176,59 +261,17 @@ export class GxIdeEditModuleServer {
|
|
|
176
261
|
"attribute": "type",
|
|
177
262
|
"reflect": false
|
|
178
263
|
},
|
|
179
|
-
"
|
|
180
|
-
"type": "unknown",
|
|
181
|
-
"mutable": false,
|
|
182
|
-
"complexType": {
|
|
183
|
-
"original": "ConfirmCallback",
|
|
184
|
-
"resolved": "(data: ModuleServerFullData) => Promise<EditServerModuleResult>",
|
|
185
|
-
"references": {
|
|
186
|
-
"ConfirmCallback": {
|
|
187
|
-
"location": "local",
|
|
188
|
-
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/modules/edit-module-server/edit-module-server.tsx",
|
|
189
|
-
"id": "src/components/modules/edit-module-server/edit-module-server.tsx::ConfirmCallback"
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
"required": false,
|
|
194
|
-
"optional": false,
|
|
195
|
-
"docs": {
|
|
196
|
-
"tags": [],
|
|
197
|
-
"text": "Confirm callback"
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
"selectSourceCallback": {
|
|
201
|
-
"type": "unknown",
|
|
202
|
-
"mutable": false,
|
|
203
|
-
"complexType": {
|
|
204
|
-
"original": "SelectSourceCallback",
|
|
205
|
-
"resolved": "() => Promise<string>",
|
|
206
|
-
"references": {
|
|
207
|
-
"SelectSourceCallback": {
|
|
208
|
-
"location": "local",
|
|
209
|
-
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/modules/edit-module-server/edit-module-server.tsx",
|
|
210
|
-
"id": "src/components/modules/edit-module-server/edit-module-server.tsx::SelectSourceCallback"
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
"required": false,
|
|
215
|
-
"optional": false,
|
|
216
|
-
"docs": {
|
|
217
|
-
"tags": [],
|
|
218
|
-
"text": "Callback invoked when wants to select a local folder that have modules inside"
|
|
219
|
-
}
|
|
220
|
-
},
|
|
221
|
-
"cancelCallback": {
|
|
264
|
+
"types": {
|
|
222
265
|
"type": "unknown",
|
|
223
266
|
"mutable": false,
|
|
224
267
|
"complexType": {
|
|
225
|
-
"original": "
|
|
226
|
-
"resolved": "
|
|
268
|
+
"original": "ModuleServerType[]",
|
|
269
|
+
"resolved": "ModuleServerType[]",
|
|
227
270
|
"references": {
|
|
228
|
-
"
|
|
229
|
-
"location": "
|
|
230
|
-
"path": "
|
|
231
|
-
"id": "src/components/modules/
|
|
271
|
+
"ModuleServerType": {
|
|
272
|
+
"location": "import",
|
|
273
|
+
"path": "../types",
|
|
274
|
+
"id": "src/components/modules/types.ts::ModuleServerType"
|
|
232
275
|
}
|
|
233
276
|
}
|
|
234
277
|
},
|
|
@@ -236,7 +279,7 @@ export class GxIdeEditModuleServer {
|
|
|
236
279
|
"optional": false,
|
|
237
280
|
"docs": {
|
|
238
281
|
"tags": [],
|
|
239
|
-
"text": "
|
|
282
|
+
"text": "The type of the server"
|
|
240
283
|
}
|
|
241
284
|
}
|
|
242
285
|
};
|
|
@@ -264,6 +307,32 @@ export class GxIdeEditModuleServer {
|
|
|
264
307
|
}
|
|
265
308
|
}];
|
|
266
309
|
}
|
|
310
|
+
static get methods() {
|
|
311
|
+
return {
|
|
312
|
+
"suspendShortcuts": {
|
|
313
|
+
"complexType": {
|
|
314
|
+
"signature": "(suspendShortcuts: boolean) => Promise<void>",
|
|
315
|
+
"parameters": [{
|
|
316
|
+
"name": "suspendShortcuts",
|
|
317
|
+
"type": "boolean",
|
|
318
|
+
"docs": ""
|
|
319
|
+
}],
|
|
320
|
+
"references": {
|
|
321
|
+
"Promise": {
|
|
322
|
+
"location": "global",
|
|
323
|
+
"id": "global::Promise"
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"return": "Promise<void>"
|
|
327
|
+
},
|
|
328
|
+
"docs": {
|
|
329
|
+
"text": "Suspends or reactivates the shortcuts",
|
|
330
|
+
"tags": []
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
}
|
|
267
335
|
static get elementRef() { return "el"; }
|
|
268
336
|
}
|
|
337
|
+
_GxIdeEditModuleServer__componentLocale = new WeakMap(), _GxIdeEditModuleServer_renderedFirstTime = new WeakMap(), _GxIdeEditModuleServer_serverTypesModel = new WeakMap(), _GxIdeEditModuleServer_shortcutsSrc = new WeakMap(), _GxIdeEditModuleServer_chShortcutsEl = new WeakMap(), _GxIdeEditModuleServer_nameEl = new WeakMap(), _GxIdeEditModuleServer_passwordEl = new WeakMap(), _GxIdeEditModuleServer_serverTypeEl = new WeakMap(), _GxIdeEditModuleServer_sourceEl = new WeakMap(), _GxIdeEditModuleServer_userEl = new WeakMap(), _GxIdeEditModuleServer_cancelCallbackHandler = new WeakMap(), _GxIdeEditModuleServer_confirmCallbackHandler = new WeakMap(), _GxIdeEditModuleServer_handleServerTypeChange = new WeakMap(), _GxIdeEditModuleServer_renderFooter = new WeakMap(), _GxIdeEditModuleServer_renderServerOptions = new WeakMap(), _GxIdeEditModuleServer_selectSourceCallbackHandle = new WeakMap();
|
|
269
338
|
//# sourceMappingURL=edit-module-server.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-module-server.js","sourceRoot":"","sources":["../../../../src/components/modules/edit-module-server/edit-module-server.tsx"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,OAAO,EACP,KAAK,EACL,KAAK,EAEN,MAAM,eAAe,CAAC;AAEvB,6BAA6B;AAC7B,oBAAoB;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAYhD,MAAM,OAAO,qBAAqB;;QAOxB,sBAAiB,GAAG,KAAK,CAAC;QA0ElC,iBAAiB;QAEjB,0BAA0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AE,EAAE,CAClC,CAAC,IAAI,CAAC,QAAQ,GAAG,EAA4B,CAAC,EAEhD,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,IAAI,EAAC,QAAQ,GACE,CACb;wBACL,IAAI,CAAC,YAAY,KAAK,OAAO,IAAI,CAChC,kBAAY,OAAO,EAAE,IAAI,CAAC,0BAA0B,UAEvC,CACd;wBACA,IAAI,CAAC,YAAY,KAAK,QAAQ,IAAI,IAAI,CAAC,mBAAmB,EAAE,CACzD;oBAEN,kBACE,IAAI,EAAC,YAAY,EACjB,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,IAAI,CAAC,qBAAqB,IAElC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAC5B;oBACb,kBACE,IAAI,EAAC,YAAY,EACjB,IAAI,EAAC,mBAAmB,EACxB,OAAO,EAAE,IAAI,CAAC,sBAAsB,IAEnC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,UAAU,CAC7B,CACI,CACf,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n State,\n EventEmitter\n} from \"@stencil/core\";\n\n/* OTHER LIBRARIES IMPORTS */\n/* CUSTOM IMPORTS */\nimport { Locale } from \"../../../common/locale\";\nimport {\n ModuleServerType,\n ModuleServerFullData,\n EditServerModuleResult\n} from \"../types\";\n@Component({\n tag: \"gx-ide-edit-module-server\",\n styleUrl: \"edit-module-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/edit-module-server\"]\n})\nexport class GxIdeEditModuleServer {\n // 1.OWN PROPERTIES | WATCH'S //\n\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n private renderedFirstTime = false;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeEditModuleServerElement;\n private serverTypeEl: HTMLGxgComboBoxElement;\n private nameEl: HTMLGxgFormTextElement;\n private sourceEl: HTMLGxgFormTextElement;\n private userEl: HTMLGxgFormTextElement;\n private passwordEl: HTMLGxgFormTextElement;\n\n // 3.STATE() VARIABLES //\n\n @State() selectedType: \"local\" | \"remote\" = \"local\";\n\n // 4.PUBLIC PROPERTY API //\n\n /**\n * The type of the server\n */\n @Prop() readonly types: ModuleServerType[];\n\n /**\n * The name of the server\n */\n @Prop() readonly name: string;\n\n /**\n * Disk path or server url\n */\n @Prop() readonly source: string;\n\n /**\n * Id of the currently selected server type\n */\n @Prop() readonly type: string;\n\n /**\n * Confirm callback\n */\n @Prop() readonly confirmCallback: ConfirmCallback;\n\n /**\n * Callback invoked when wants to select a local folder that have modules inside\n */\n @Prop() readonly selectSourceCallback: SelectSourceCallback;\n\n /**\n * Cancel callback\n */\n @Prop() readonly cancelCallback: CancelCallback;\n\n // 5.EVENTS (EMIT) //\n\n /**\n * This event is emitted once just after the component is fully loaded and the first render() occurs\n */\n @Event() componentDidRenderFirstTime: EventEmitter<boolean>;\n\n // 6.COMPONENT LIFECYCLE EVENTS //\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n componentDidRender() {\n if (!this.renderedFirstTime) {\n this.componentDidRenderFirstTime.emit(\n this._componentLocale.componentName\n );\n this.renderedFirstTime = true;\n }\n }\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n /**\n * Executed when user click on confirm button\n */\n private confirmCallbackHandler = async () => {\n if (this.confirmCallback) {\n const selectedTypeId = this.types.find(\n ({ type }) => type === this.selectedType\n );\n let data = {} as ModuleServerFullData;\n if (selectedTypeId.type === \"remote\") {\n data = {\n id: selectedTypeId.id,\n name: this.nameEl.value,\n type: this.serverTypeEl.value,\n authenticated: selectedTypeId.authenticated,\n source: this.sourceEl.value,\n user: this.userEl.value,\n password: this.passwordEl.value\n };\n } else {\n data = {\n id: selectedTypeId.id,\n name: this.nameEl.value,\n type: this.serverTypeEl.value,\n authenticated: selectedTypeId.authenticated,\n source: this.sourceEl.value\n };\n }\n const result = await this.confirmCallback(data);\n if (result.success) {\n // display success message\n } else {\n // display error message\n }\n }\n };\n\n /**\n * Executed when user click on cancel button\n */\n private cancelCallbackHandler = async () => {\n await this.cancelCallback();\n };\n private selectSourceCallbackHandle = async () => {\n const path = await this.selectSourceCallback();\n\n if (path) {\n this.sourceEl.value = path;\n }\n };\n\n // 10.LOCAL METHODS //\n\n private renderServerOptions = (): Element[] => {\n return [\n <div class=\"grid-server-auth-column-1\">\n <gxg-label>{this._componentLocale.user}</gxg-label>\n <gxg-label>{this._componentLocale.password}</gxg-label>\n </div>,\n <div class=\"grid-server-auth-column-2\">\n <gxg-form-text\n placeholder={this._componentLocale.user}\n ref={(el: HTMLGxgFormTextElement) =>\n (this.userEl = el as HTMLGxgFormTextElement)\n }\n part=\"user\"\n ></gxg-form-text>\n <gxg-form-text\n password\n placeholder={this._componentLocale.password}\n ref={(el: HTMLGxgFormTextElement) =>\n (this.passwordEl = el as HTMLGxgFormTextElement)\n }\n part=\"password\"\n ></gxg-form-text>\n </div>\n ];\n };\n\n render() {\n return (\n <Host class=\"gx-ide-component\">\n <div class=\"gx-ide-main-wrapper gx-ide-overflow\">\n <gx-ide-container slimmerFooter>\n <div\n class={\n this.selectedType === \"local\"\n ? \"grid module-servers-grid-local\"\n : \"grid module-servers-grid-server\"\n }\n >\n <div class=\"module-servers-grid-column-1\">\n <gxg-label> {this._componentLocale.type}</gxg-label>\n <gxg-label> {this._componentLocale.name}</gxg-label>\n <gxg-label> {this._componentLocale.source}</gxg-label>\n </div>\n <div class=\"module-servers-grid-column-2\">\n <gxg-combo-box\n value={this.type}\n ref={(el: HTMLGxgComboBoxElement) =>\n (this.serverTypeEl = el as HTMLGxgComboBoxElement)\n }\n >\n {this.types?.map(type => (\n <gxg-combo-box-item\n value={type.id}\n onItemSelected={item =>\n (this.selectedType = item.detail.value)\n }\n >\n {type.type}\n </gxg-combo-box-item>\n ))}\n </gxg-combo-box>\n <gxg-form-text\n placeholder={this._componentLocale.name}\n ref={(el: HTMLGxgFormTextElement) =>\n (this.nameEl = el as HTMLGxgFormTextElement)\n }\n value={this.name}\n part=\"name\"\n ></gxg-form-text>\n <gxg-form-text\n placeholder={this._componentLocale.source}\n ref={(el: HTMLGxgFormTextElement) =>\n (this.sourceEl = el as HTMLGxgFormTextElement)\n }\n value={this.source}\n part=\"source\"\n ></gxg-form-text>\n </div>\n {this.selectedType === \"local\" && (\n <gxg-button onClick={this.selectSourceCallbackHandle}>\n ...\n </gxg-button>\n )}\n {this.selectedType === \"remote\" && this.renderServerOptions()}\n </div>\n\n <gxg-button\n slot=\"footer-end\"\n type=\"outlined\"\n onClick={this.cancelCallbackHandler}\n >\n {this._componentLocale.footer.btnCancel}\n </gxg-button>\n <gxg-button\n slot=\"footer-end\"\n type=\"primary-text-only\"\n onClick={this.confirmCallbackHandler}\n >\n {this._componentLocale.footer.btnConfirm}\n </gxg-button>\n </gx-ide-container>\n </div>\n </Host>\n );\n }\n}\nexport type ConfirmCallback = (\n data: ModuleServerFullData\n) => Promise<EditServerModuleResult>;\nexport type CancelCallback = () => Promise<void>;\nexport type SelectSourceCallback = () => Promise<string | undefined>;\n"]}
|
|
1
|
+
{"version":3,"file":"edit-module-server.js","sourceRoot":"","sources":["../../../../src/components/modules/edit-module-server/edit-module-server.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,OAAO,EACP,KAAK,EACL,KAAK,EAEL,YAAY,EACZ,MAAM,EACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,MAAM,EAAE,MAA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KAAK,QAAQ,IAAI,uBAAA,IAAI,kDAAqB,MAAzB,IAAI,CAAuB;gBAE7D,uBAAA,IAAI,2CAAc,MAAlB,IAAI,CAAgB,CACjB,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n State,\n EventEmitter,\n getAssetPath,\n Method\n} from \"@stencil/core\";\n\nimport { Locale } from \"../../../common/locale\";\nimport {\n ModuleServerType,\n ModuleServerFullData,\n EditServerModuleResult\n} from \"../types\";\nimport { getIconPath, MercuryBundles } from \"@genexus/mercury\";\nimport { ComboBoxItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\nimport { mapTypesToComboboxItemModel } from \"./helpers\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/form--full\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst MORE_ICON = getIconPath({\n category: \"gemini-tools\",\n name: \"show-more-horizontal\",\n colorType: \"on-surface\"\n});\n\n@Component({\n tag: \"gx-ide-edit-module-server\",\n styleUrl: \"edit-module-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/edit-module-server\"]\n})\nexport class GxIdeEditModuleServer {\n #_componentLocale: any;\n #renderedFirstTime = false;\n #serverTypesModel: ComboBoxItemModel[] = [];\n #shortcutsSrc = getAssetPath(\n `./gx-ide-assets/edit-module-server/shortcuts.json`\n );\n\n @Element() el: HTMLGxIdeEditModuleServerElement;\n #chShortcutsEl: HTMLChShortcutsElement;\n #nameEl: HTMLChEditElement;\n #passwordEl: HTMLChEditElement;\n #serverTypeEl: HTMLChComboBoxRenderElement;\n #sourceEl: HTMLChEditElement;\n #userEl: HTMLChEditElement;\n\n @State() selectedType: \"local\" | \"remote\" = \"local\";\n\n /**\n * Cancel callback\n */\n @Prop() readonly cancelCallback: CancelCallback;\n\n /**\n * Confirm callback\n */\n @Prop() readonly confirmCallback: ConfirmCallback;\n\n /**\n * The name of the server\n */\n @Prop() readonly name: string;\n\n /**\n * Callback invoked when wants to select a local folder that have modules inside\n */\n @Prop() readonly selectSourceCallback: SelectSourceCallback;\n\n /**\n * Disk path or server url\n */\n @Prop() readonly source: string;\n\n /**\n * Id of the currently selected server type\n */\n @Prop() readonly type: string;\n\n /**\n * The type of the server\n */\n @Prop() readonly types: ModuleServerType[];\n\n /**\n * This event is emitted once just after the component is fully loaded and the first render() occurs\n */\n @Event() componentDidRenderFirstTime: EventEmitter<boolean>;\n\n async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n this.#serverTypesModel = mapTypesToComboboxItemModel(this.types);\n }\n\n componentDidRender() {\n if (!this.#renderedFirstTime) {\n this.componentDidRenderFirstTime.emit(\n this.#_componentLocale.componentName\n );\n this.#renderedFirstTime = true;\n }\n }\n\n /**\n * Suspends or reactivates the shortcuts\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n if (suspendShortcuts) {\n this.#chShortcutsEl.suspend = true;\n } else {\n this.#chShortcutsEl.suspend = false;\n }\n }\n\n #cancelCallbackHandler = async () => {\n await this.cancelCallback();\n };\n\n #confirmCallbackHandler = async () => {\n if (this.confirmCallback) {\n const selectedTypeId = this.types.find(\n ({ type }) => type === this.selectedType\n );\n let data = {} as ModuleServerFullData;\n if (selectedTypeId.type === \"remote\") {\n data = {\n id: selectedTypeId.id,\n name: this.#nameEl.value,\n type: this.#serverTypeEl.value as \"remote\" | \"local\",\n authenticated: selectedTypeId.authenticated,\n source: this.#sourceEl.value,\n user: this.#userEl.value,\n password: this.#passwordEl.value\n };\n } else {\n data = {\n id: selectedTypeId.id,\n name: this.#nameEl.value,\n type: this.#serverTypeEl.value as \"remote\" | \"local\",\n authenticated: selectedTypeId.authenticated,\n source: this.#sourceEl.value\n };\n }\n const result = await this.confirmCallback(data);\n if (result.success) {\n // display success message\n } else {\n // display error message\n }\n }\n };\n\n #handleServerTypeChange = (e: CustomEvent<string>) => {\n this.selectedType = e.detail as \"local\" | \"remote\";\n };\n\n #renderFooter = () => {\n return (\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.#cancelCallbackHandler}\n part=\"button-cancel\"\n >\n {this.#_componentLocale.footer.btnCancel}\n </button>\n <button\n class=\"button-primary\"\n id=\"button-create\"\n onClick={this.#confirmCallbackHandler}\n part=\"button-create\"\n >\n {this.#_componentLocale.footer.btnConfirm}\n </button>\n </div>\n </footer>\n );\n };\n\n #renderServerOptions = (): Element[] => {\n return (\n <div class=\"spacing-body user-password\">\n <div class=\"auth-column-1\">\n <label class=\"label\" htmlFor=\"user\">\n {this.#_componentLocale.user}\n </label>\n <label class=\"label\" htmlFor=\"password\">\n {this.#_componentLocale.password}\n </label>\n </div>\n <div class=\"auth-column-2\">\n <ch-edit\n id=\"user\"\n part=\"user\"\n class=\"input\"\n placeholder={this.#_componentLocale.user}\n ref={(el: HTMLChEditElement) =>\n (this.#userEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n <ch-edit\n id=\"password\"\n part=\"password\"\n class=\"input\"\n placeholder={this.#_componentLocale.password}\n ref={(el: HTMLChEditElement) =>\n (this.#passwordEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n </div>\n </div>\n );\n };\n\n #selectSourceCallbackHandle = async () => {\n if (this.selectSourceCallback) {\n const path = await this.selectSourceCallback();\n\n if (path) {\n this.#sourceEl.value = path;\n }\n }\n };\n\n render() {\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 <div\n class={\n this.selectedType === \"local\"\n ? \"module-servers-grid-local\"\n : \"module-servers-grid-server\"\n }\n >\n <div class=\"server-options spacing-body\">\n <div class=\"server-options__col1\">\n <label class=\"label\" htmlFor=\"server-type\">\n {this.#_componentLocale.type}\n </label>\n <label class=\"label\" htmlFor=\"name\">\n {this.#_componentLocale.name}\n </label>\n <label class=\"label\" htmlFor=\"source\">\n {this.#_componentLocale.source}\n </label>\n </div>\n <div class=\"server-options__col2\">\n <ch-combo-box-render\n accessibleName=\"server types\"\n id=\"server-type\"\n part=\"server-type\"\n class=\"combo-box\"\n model={this.#serverTypesModel}\n value={this.types[0].type as \"local\" | \"remote\"}\n onChange={this.#handleServerTypeChange}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#serverTypeEl = el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n <ch-edit\n placeholder={this.#_componentLocale.name}\n ref={(el: HTMLChEditElement) =>\n (this.#nameEl = el as HTMLChEditElement)\n }\n value={this.name}\n part=\"name\"\n class=\"input\"\n id=\"name\"\n ></ch-edit>\n <div class=\"source-input\">\n <ch-edit\n placeholder={this.#_componentLocale.source}\n ref={(el: HTMLChEditElement) =>\n (this.#sourceEl = el as HTMLChEditElement)\n }\n value={this.source}\n class=\"input\"\n part=\"source\"\n id=\"source\"\n ></ch-edit>\n\n {this.selectedType === \"local\" && (\n <button\n class=\"button-tertiary button-icon-only\"\n aria-label=\"caption\"\n onClick={this.#selectSourceCallbackHandle}\n >\n <ch-image class=\"icon-sm\" src={MORE_ICON}></ch-image>\n </button>\n )}\n </div>\n </div>\n </div>\n\n {this.selectedType === \"remote\" && this.#renderServerOptions()}\n\n {this.#renderFooter()}\n </div>\n </Host>\n );\n }\n}\nexport type ConfirmCallback = (\n data: ModuleServerFullData\n) => Promise<EditServerModuleResult>;\nexport type CancelCallback = () => Promise<void>;\nexport type SelectSourceCallback = () => Promise<string | undefined>;\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"selector": "[part='button-create']",
|
|
4
|
+
"keyShortcuts": "Enter",
|
|
5
|
+
"action": "click",
|
|
6
|
+
"conditions": {
|
|
7
|
+
"focusExclude": "[part='button-cancel']"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"selector": "[part='button-cancel']",
|
|
12
|
+
"keyShortcuts": "Escape",
|
|
13
|
+
"action": "click"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const mapTypesToComboboxItemModel = (types) => {
|
|
2
|
+
const typesComboBoxItemModel = [];
|
|
3
|
+
types.forEach(type => {
|
|
4
|
+
const typeObject = {
|
|
5
|
+
value: type.type,
|
|
6
|
+
caption: type.type
|
|
7
|
+
};
|
|
8
|
+
typesComboBoxItemModel.push(typeObject);
|
|
9
|
+
});
|
|
10
|
+
return typesComboBoxItemModel;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../src/components/modules/edit-module-server/helpers.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,KAAyB,EACJ,EAAE;IACvB,MAAM,sBAAsB,GAAwB,EAAE,CAAC;IACvD,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACnB,MAAM,UAAU,GAAsB;YACpC,KAAK,EAAE,IAAI,CAAC,IAAI;YAChB,OAAO,EAAE,IAAI,CAAC,IAAI;SACnB,CAAC;QACF,sBAAsB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IACH,OAAO,sBAAsB,CAAC;AAChC,CAAC,CAAC","sourcesContent":["import { ComboBoxItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\nimport { ModuleServerType } from \"../types\";\n\nexport const mapTypesToComboboxItemModel = (\n types: ModuleServerType[]\n): ComboBoxItemModel[] => {\n const typesComboBoxItemModel: ComboBoxItemModel[] = [];\n types.forEach(type => {\n const typeObject: ComboBoxItemModel = {\n value: type.type,\n caption: type.type\n };\n typesComboBoxItemModel.push(typeObject);\n });\n return typesComboBoxItemModel;\n};\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"componentName": "Manage Module References",
|
|
3
|
+
"showServerMenu": "Show server commands",
|
|
4
|
+
"reloadModules": "Reload modules from server",
|
|
5
|
+
"availableVersions": "Available Versions",
|
|
3
6
|
"progressBar": {
|
|
4
7
|
"defaultCaption": "Wait Please...",
|
|
5
8
|
"completed": "Process completed"
|
|
@@ -22,8 +25,9 @@
|
|
|
22
25
|
"modulesInformation": {
|
|
23
26
|
"header": "Module Information",
|
|
24
27
|
"moduleProperties": {
|
|
25
|
-
"installed": "
|
|
26
|
-
"
|
|
28
|
+
"installed": "Module is installed",
|
|
29
|
+
"version": "Version: ",
|
|
30
|
+
"notInstalled": "Module is not installed"
|
|
27
31
|
},
|
|
28
32
|
"moduleVersion": {
|
|
29
33
|
"canNotBeInstalled": "This module version can not be installed",
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"componentName": "参照モジュールの管理",
|
|
3
|
+
"showServerMenu": "",
|
|
4
|
+
"reloadModules": "",
|
|
5
|
+
"availableVersions": "",
|
|
3
6
|
"progressBar": {
|
|
4
7
|
"defaultCaption": "お待ちください...",
|
|
5
8
|
"completed": "プロセスが完了しました"
|
|
@@ -22,7 +25,8 @@
|
|
|
22
25
|
"modulesInformation": {
|
|
23
26
|
"header": "モジュール情報",
|
|
24
27
|
"moduleProperties": {
|
|
25
|
-
"installed": "
|
|
28
|
+
"installed": "",
|
|
29
|
+
"version": "",
|
|
26
30
|
"notInstalled": "モジュールがインストールされていません"
|
|
27
31
|
},
|
|
28
32
|
"moduleVersion": {
|
|
@@ -36,4 +40,4 @@
|
|
|
36
40
|
}
|
|
37
41
|
},
|
|
38
42
|
"modalTitle": "モジュールサーバーの定義"
|
|
39
|
-
}
|
|
43
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"componentName": "Manage Module References",
|
|
3
|
+
"showServerMenu": "Show server commands",
|
|
4
|
+
"reloadModules": "Reload modules from server",
|
|
5
|
+
"availableVersions": "Available Versions",
|
|
3
6
|
"progressBar": {
|
|
4
7
|
"defaultCaption": "Wait Please...",
|
|
5
8
|
"completed": "Process completed"
|
|
@@ -22,8 +25,9 @@
|
|
|
22
25
|
"modulesInformation": {
|
|
23
26
|
"header": "Module Information",
|
|
24
27
|
"moduleProperties": {
|
|
25
|
-
"installed": "
|
|
26
|
-
"
|
|
28
|
+
"installed": "Module is installed",
|
|
29
|
+
"version": "Version: ",
|
|
30
|
+
"notInstalled": "Module is not installed"
|
|
27
31
|
},
|
|
28
32
|
"moduleVersion": {
|
|
29
33
|
"canNotBeInstalled": "This module version can not be installed",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export const mapModuleServerDataToComboBoxModel = (servers) => servers.map(server => ({
|
|
3
|
+
value: server.id,
|
|
4
|
+
caption: server.name
|
|
5
|
+
}));
|
|
6
|
+
export const mapModuleVersionDataToComboBoxModel = (moduleVersions) => moduleVersions.map(moduleVersion => ({
|
|
7
|
+
value: moduleVersion.id,
|
|
8
|
+
caption: moduleVersion.name
|
|
9
|
+
}));
|
|
10
|
+
export const renderModuleDataProperties = (options) => {
|
|
11
|
+
if (options.length) {
|
|
12
|
+
const items = [];
|
|
13
|
+
options.forEach(option => {
|
|
14
|
+
const isArray = Array.isArray(option.value);
|
|
15
|
+
if (isArray && option.value.length) {
|
|
16
|
+
const item = (h("div", { class: "md-property__list-container" }, h("p", { class: "md-property__key subtitle-semi-bold-xs" }, option.name, " :"), h("ul", { class: "md-property__list" }, option.value.map(subItem => {
|
|
17
|
+
return (h("li", { class: "md-property__list-item body-regular-s" }, subItem));
|
|
18
|
+
}))));
|
|
19
|
+
items.push(item);
|
|
20
|
+
}
|
|
21
|
+
else if (!isArray) {
|
|
22
|
+
const item = (h("div", { class: option.inline
|
|
23
|
+
? "md-property md-property--inline"
|
|
24
|
+
: "md-property md-property--block" }, h("p", { class: "md-property__key subtitle-semi-bold-xs" }, option.name, " :"), h("p", { class: "md-property__value body-regular-s" }, option.value)));
|
|
25
|
+
items.push(item);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return items;
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../src/components/modules/manage-module-references/helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAQlC,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAChD,OAA2B,EACZ,EAAE,CACjB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC,EAAE;IAChB,OAAO,EAAE,MAAM,CAAC,IAAI;CACrB,CAAC,CAAC,CAAC;AAEN,MAAM,CAAC,MAAM,mCAAmC,GAAG,CACjD,cAAmC,EACpB,EAAE,CACjB,cAAc,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IACnC,KAAK,EAAE,aAAa,CAAC,EAAE;IACvB,OAAO,EAAE,aAAa,CAAC,IAAI;CAC5B,CAAC,CAAC,CAAC;AAEN,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,OAAkC,EACZ,EAAE;IACxB,IAAI,OAAO,CAAC,MAAM,EAAE;QAClB,MAAM,KAAK,GAAyB,EAAE,CAAC;QAEvC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YACvB,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAE5C,IAAI,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE;gBAClC,MAAM,IAAI,GAAG,CACX,WAAK,KAAK,EAAC,6BAA6B;oBACtC,SAAG,KAAK,EAAC,wCAAwC;wBAC9C,MAAM,CAAC,IAAI;6BACV;oBACJ,UAAI,KAAK,EAAC,mBAAmB,IACzB,MAAM,CAAC,KAAkB,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;wBACxC,OAAO,CACL,UAAI,KAAK,EAAC,uCAAuC,IAC9C,OAAO,CACL,CACN,CAAC;oBACJ,CAAC,CAAC,CACC,CACD,CACP,CAAC;gBACF,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAClB;iBAAM,IAAI,CAAC,OAAO,EAAE;gBACnB,MAAM,IAAI,GAAG,CACX,WACE,KAAK,EACH,MAAM,CAAC,MAAM;wBACX,CAAC,CAAC,iCAAiC;wBACnC,CAAC,CAAC,gCAAgC;oBAGtC,SAAG,KAAK,EAAC,wCAAwC;wBAC9C,MAAM,CAAC,IAAI;6BACV;oBACJ,SAAG,KAAK,EAAC,mCAAmC,IAAE,MAAM,CAAC,KAAK,CAAK,CAC3D,CACP,CAAC;gBACF,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAClB;QACH,CAAC,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;KACd;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["import { h } from \"@stencil/core\";\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\nimport {\n ModulePropertyData,\n ModuleServerData,\n ModuleVersionData\n} from \"../types\";\n\nexport const mapModuleServerDataToComboBoxModel = (\n servers: ModuleServerData[]\n): ComboBoxModel =>\n servers.map(server => ({\n value: server.id,\n caption: server.name\n }));\n\nexport const mapModuleVersionDataToComboBoxModel = (\n moduleVersions: ModuleVersionData[]\n): ComboBoxModel =>\n moduleVersions.map(moduleVersion => ({\n value: moduleVersion.id,\n caption: moduleVersion.name\n }));\n\nexport const renderModuleDataProperties = (\n options: Array<ModulePropertyData>\n): ModulePropertyData[] => {\n if (options.length) {\n const items: ModulePropertyData[] = [];\n\n options.forEach(option => {\n const isArray = Array.isArray(option.value);\n\n if (isArray && option.value.length) {\n const item = (\n <div class=\"md-property__list-container\">\n <p class=\"md-property__key subtitle-semi-bold-xs\">\n {option.name} :\n </p>\n <ul class=\"md-property__list\">\n {(option.value as string[]).map(subItem => {\n return (\n <li class=\"md-property__list-item body-regular-s\">\n {subItem}\n </li>\n );\n })}\n </ul>\n </div>\n );\n items.push(item);\n } else if (!isArray) {\n const item = (\n <div\n class={\n option.inline\n ? \"md-property md-property--inline\"\n : \"md-property md-property--block\"\n }\n >\n <p class=\"md-property__key subtitle-semi-bold-xs\">\n {option.name} :\n </p>\n <p class=\"md-property__value body-regular-s\">{option.value}</p>\n </div>\n );\n items.push(item);\n }\n });\n return items;\n }\n return null;\n};\n"]}
|