@genexus/genexus-ide-ui 0.0.110 → 0.0.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-edit-module-server.cjs.entry.js +98 -0
  3. package/dist/cjs/gx-ide-edit-module-server.cjs.entry.js.map +1 -0
  4. package/dist/cjs/gx-ide-gam-installation-settings.cjs.entry.js +107 -0
  5. package/dist/cjs/gx-ide-gam-installation-settings.cjs.entry.js.map +1 -0
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/collection-manifest.json +2 -1
  8. package/dist/collection/components/gam-installation-settings/gam-installation-settings.css +539 -0
  9. package/dist/collection/components/gam-installation-settings/gam-installation-settings.js +240 -0
  10. package/dist/collection/components/gam-installation-settings/gam-installation-settings.js.map +1 -0
  11. package/dist/collection/components/gam-installation-settings/gx-ide-assets/gam-installation-settings/langs/gam-installation-settings.lang.en.json +34 -0
  12. package/dist/collection/components/modules/{edit-module-servers/edit-module-servers.js → edit-module-server/edit-module-server.js} +12 -12
  13. package/dist/collection/components/modules/edit-module-server/edit-module-server.js.map +1 -0
  14. package/dist/components/gx-ide-edit-module-server.d.ts +11 -0
  15. package/dist/components/gx-ide-edit-module-server.js +186 -0
  16. package/dist/components/gx-ide-edit-module-server.js.map +1 -0
  17. package/dist/components/gx-ide-gam-installation-settings.d.ts +11 -0
  18. package/dist/components/gx-ide-gam-installation-settings.js +208 -0
  19. package/dist/components/gx-ide-gam-installation-settings.js.map +1 -0
  20. package/dist/esm/genexus-ide-ui.js +1 -1
  21. package/dist/esm/gx-ide-edit-module-server.entry.js +94 -0
  22. package/dist/{collection/components/modules/edit-module-servers/edit-module-servers.js.map → esm/gx-ide-edit-module-server.entry.js.map} +1 -1
  23. package/dist/esm/gx-ide-gam-installation-settings.entry.js +103 -0
  24. package/dist/esm/gx-ide-gam-installation-settings.entry.js.map +1 -0
  25. package/dist/esm/loader.js +1 -1
  26. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  27. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  28. package/dist/genexus-ide-ui/gx-ide-assets/edit-module-server/langs/edit-module-server.lang.ja.json +3 -0
  29. package/dist/genexus-ide-ui/gx-ide-assets/edit-module-server/langs/edit-module-server.lang.zh.json +3 -0
  30. package/dist/genexus-ide-ui/gx-ide-assets/gam-installation-settings/langs/gam-installation-settings.lang.en.json +34 -0
  31. package/dist/genexus-ide-ui/gx-ide-assets/gam-installation-settings/langs/gam-installation-settings.lang.ja.json +3 -0
  32. package/dist/genexus-ide-ui/gx-ide-assets/gam-installation-settings/langs/gam-installation-settings.lang.zh.json +3 -0
  33. package/dist/genexus-ide-ui/p-84934392.entry.js +149 -0
  34. package/dist/genexus-ide-ui/p-84934392.entry.js.map +1 -0
  35. package/dist/genexus-ide-ui/{p-b7d0697f.entry.js → p-f91c432e.entry.js} +3 -3
  36. package/dist/genexus-ide-ui/p-f91c432e.entry.js.map +1 -0
  37. package/dist/types/components/gam-installation-settings/gam-installation-settings.d.ts +58 -0
  38. package/dist/types/components/modules/{edit-module-servers/edit-module-servers.d.ts → edit-module-server/edit-module-server.d.ts} +2 -2
  39. package/dist/types/components.d.ts +123 -49
  40. package/package.json +1 -1
  41. package/dist/cjs/gx-ide-edit-module-servers.cjs.entry.js +0 -98
  42. package/dist/cjs/gx-ide-edit-module-servers.cjs.entry.js.map +0 -1
  43. package/dist/components/gx-ide-edit-module-servers.d.ts +0 -11
  44. package/dist/components/gx-ide-edit-module-servers.js +0 -186
  45. package/dist/components/gx-ide-edit-module-servers.js.map +0 -1
  46. package/dist/esm/gx-ide-edit-module-servers.entry.js +0 -94
  47. package/dist/esm/gx-ide-edit-module-servers.entry.js.map +0 -1
  48. package/dist/genexus-ide-ui/p-b7d0697f.entry.js.map +0 -1
  49. /package/dist/collection/components/{modules/edit-module-servers/gx-ide-assets/edit-module-servers/langs/edit-module-servers.lang.ja.json → gam-installation-settings/gx-ide-assets/gam-installation-settings/langs/gam-installation-settings.lang.ja.json} +0 -0
  50. /package/dist/collection/components/{modules/edit-module-servers/gx-ide-assets/edit-module-servers/langs/edit-module-servers.lang.zh.json → gam-installation-settings/gx-ide-assets/gam-installation-settings/langs/gam-installation-settings.lang.zh.json} +0 -0
  51. /package/dist/collection/components/modules/{edit-module-servers/edit-module-servers.css → edit-module-server/edit-module-server.css} +0 -0
  52. /package/dist/collection/components/modules/{edit-module-servers/gx-ide-assets/edit-module-servers/langs/edit-module-servers.lang.en.json → edit-module-server/gx-ide-assets/edit-module-server/langs/edit-module-server.lang.en.json} +0 -0
  53. /package/dist/{genexus-ide-ui/gx-ide-assets/edit-module-servers/langs/edit-module-servers.lang.ja.json → collection/components/modules/edit-module-server/gx-ide-assets/edit-module-server/langs/edit-module-server.lang.ja.json} +0 -0
  54. /package/dist/{genexus-ide-ui/gx-ide-assets/edit-module-servers/langs/edit-module-servers.lang.zh.json → collection/components/modules/edit-module-server/gx-ide-assets/edit-module-server/langs/edit-module-server.lang.zh.json} +0 -0
  55. /package/dist/genexus-ide-ui/gx-ide-assets/{edit-module-servers/langs/edit-module-servers.lang.en.json → edit-module-server/langs/edit-module-server.lang.en.json} +0 -0
@@ -0,0 +1,240 @@
1
+ /* STENCIL IMPORTS */
2
+ import { Host, h } from "@stencil/core";
3
+ /* OTHER LIBRARIES IMPORTS */
4
+ /* CUSTOM IMPORTS */
5
+ import { config } from "../../common/config";
6
+ import { Locale } from "../../common/locale";
7
+ import { renderComboItems } from "../../common/render-combo-items";
8
+ const COMBO_BOX_DATA = [
9
+ {
10
+ id: "install-automatically",
11
+ name: "Install Updates Automatically",
12
+ value: "automatic"
13
+ },
14
+ {
15
+ id: "prompt-update",
16
+ name: "Prompt me to Update",
17
+ value: "prompt"
18
+ },
19
+ {
20
+ id: "never-update",
21
+ name: "Never Update",
22
+ value: "never"
23
+ }
24
+ ];
25
+ export class GxIdeGamInstallationSettings {
26
+ constructor() {
27
+ this.renderedFirstTime = false;
28
+ // 7.LISTENERS //
29
+ // 8.PUBLIC METHODS API //
30
+ // 9.LOCAL METHODS //
31
+ this.repairCallbackHandler = async () => {
32
+ if (this.saveCallback) {
33
+ const data = {
34
+ importWebPanels: this.webPanelsCheckboxEl.checked,
35
+ importPanels: this.panelsCheckboxEl.checked,
36
+ futureUpgrades: this.futureUpgradesComboEl.value
37
+ ? this.futureUpgradesComboEl.value
38
+ : null
39
+ };
40
+ await this.repairCallback(data);
41
+ }
42
+ };
43
+ this.saveCallbackHandler = async () => {
44
+ if (this.saveCallback) {
45
+ const data = {
46
+ importWebPanels: this.webPanelsCheckboxEl.checked,
47
+ importPanels: this.panelsCheckboxEl.checked,
48
+ futureUpgrades: this.futureUpgradesComboEl.value
49
+ ? this.futureUpgradesComboEl.value
50
+ : null
51
+ };
52
+ await this.saveCallback(data);
53
+ }
54
+ };
55
+ this.cancelCallbackHandler = () => {
56
+ this.cancelCallback();
57
+ };
58
+ /* Renders*/
59
+ this.renderHeader = () => {
60
+ return (h("header", { class: "header", slot: "header" }, h("gxg-text", { type: "text-regular" }, this.configurationType === "installation"
61
+ ? this._componentLocale.header.headerTextInstallation.firstSentence
62
+ : this._componentLocale.header.headerTextUpdate.firstSentence), h("gxg-text", { type: "text-regular" }, this.configurationType === "installation"
63
+ ? this._componentLocale.header.headerTextInstallation.secondSentence
64
+ : this._componentLocale.header.headerTextUpdate.secondSentence), h("gxg-text", { type: "text-regular" }, this.configurationType === "installation"
65
+ ? this._componentLocale.header.headerTextInstallation.thirdSentence
66
+ : this._componentLocale.header.headerTextUpdate.thirdSentence)));
67
+ };
68
+ this.renderFilters = () => {
69
+ return (h("div", { class: "filters" }, h("gxg-title", { type: "title-05" }, this._componentLocale.filters.filtersHeading), h("gxg-form-checkbox", { label: this._componentLocale.filters.webPanelsCheckbox, part: "web-panels-checkbox", slot: "footer-start", ref: (el) => (this.webPanelsCheckboxEl = el) }), h("gxg-form-checkbox", { label: this._componentLocale.filters.panelsCheckbox, part: "panels-checkbox", slot: "footer-start", ref: (el) => (this.panelsCheckboxEl = el) }), h("gxg-combo-box", { label: this._componentLocale.filters.futureUpgradesComboLabel, disableFilter: true, value: COMBO_BOX_DATA[0].value, part: "future-upgrades-combo", ref: (el) => (this.futureUpgradesComboEl = el) }, renderComboItems(COMBO_BOX_DATA !== null && COMBO_BOX_DATA !== void 0 ? COMBO_BOX_DATA : []))));
70
+ };
71
+ this.fileName = "";
72
+ this.selectedFile = undefined;
73
+ this.importingIsInProcess = false;
74
+ this.displayTitle = false;
75
+ this.configurationType = "installation";
76
+ this.repairCallback = undefined;
77
+ this.saveCallback = undefined;
78
+ this.cancelCallback = undefined;
79
+ }
80
+ // 6.COMPONENT LIFECYCLE METHODS //
81
+ async componentWillLoad() {
82
+ this._componentLocale = await Locale.getComponentStrings(this.el);
83
+ }
84
+ componentDidRender() {
85
+ if (!this.renderedFirstTime) {
86
+ this.componentDidRenderFirstTime.emit(this._componentLocale.componentName);
87
+ this.renderedFirstTime = true;
88
+ }
89
+ }
90
+ // 10.RENDER() FUNCTION //
91
+ render() {
92
+ return (h(Host, { class: "gx-ide-component" }, h("div", { class: "gx-ide-main-wrapper" }, h("gx-ide-container", { noHeadingPadding: true, headingPaddingTop: true, noContentPadding: true, noContentGap: true, containerTitle: this.displayTitle ? this._componentLocale.componentName : null, slimmerFooter: config.gxIdeContainer.slimmerFooter }, this.renderHeader(), this.renderFilters(), h("gxg-text", { type: "text-regular", slot: "footer-above" }, this._componentLocale.footer.footerSaveCancelText), h("gxg-text", { type: "text-regular", slot: "footer-above" }, this._componentLocale.footer.footerRepairText), h("gxg-button", { type: "outlined", slot: "footer-start", onClick: this.repairCallbackHandler }, this._componentLocale.footer.repairButton), h("gxg-button", { type: "outlined", slot: "footer-end", onClick: this.cancelCallbackHandler }, this._componentLocale.footer.cancelButton), h("gxg-button", { slot: "footer-end", onClick: this.saveCallbackHandler }, this._componentLocale.footer.confirmButton)))));
93
+ }
94
+ static get is() { return "gx-ide-gam-installation-settings"; }
95
+ static get encapsulation() { return "shadow"; }
96
+ static get originalStyleUrls() {
97
+ return {
98
+ "$": ["gam-installation-settings.scss"]
99
+ };
100
+ }
101
+ static get styleUrls() {
102
+ return {
103
+ "$": ["gam-installation-settings.css"]
104
+ };
105
+ }
106
+ static get assetsDirs() { return ["gx-ide-assets/gam-installation-settings"]; }
107
+ static get properties() {
108
+ return {
109
+ "displayTitle": {
110
+ "type": "boolean",
111
+ "mutable": false,
112
+ "complexType": {
113
+ "original": "false",
114
+ "resolved": "boolean",
115
+ "references": {}
116
+ },
117
+ "required": false,
118
+ "optional": false,
119
+ "docs": {
120
+ "tags": [],
121
+ "text": "If true it displays the component title on the header"
122
+ },
123
+ "attribute": "display-title",
124
+ "reflect": false,
125
+ "defaultValue": "false"
126
+ },
127
+ "configurationType": {
128
+ "type": "string",
129
+ "mutable": false,
130
+ "complexType": {
131
+ "original": "\"installation\" | \"update\"",
132
+ "resolved": "\"installation\" | \"update\"",
133
+ "references": {}
134
+ },
135
+ "required": false,
136
+ "optional": false,
137
+ "docs": {
138
+ "tags": [],
139
+ "text": "Specifies the configuration type to be used"
140
+ },
141
+ "attribute": "configuration-type",
142
+ "reflect": false,
143
+ "defaultValue": "\"installation\""
144
+ },
145
+ "repairCallback": {
146
+ "type": "unknown",
147
+ "mutable": false,
148
+ "complexType": {
149
+ "original": "RepairCallback",
150
+ "resolved": "(config: GamConfigData) => Promise<void>",
151
+ "references": {
152
+ "RepairCallback": {
153
+ "location": "local",
154
+ "path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/gam-installation-settings/gam-installation-settings.tsx",
155
+ "id": "src/components/gam-installation-settings/gam-installation-settings.tsx::RepairCallback"
156
+ }
157
+ }
158
+ },
159
+ "required": false,
160
+ "optional": false,
161
+ "docs": {
162
+ "tags": [],
163
+ "text": "Callback invoked when the user press repair button"
164
+ }
165
+ },
166
+ "saveCallback": {
167
+ "type": "unknown",
168
+ "mutable": false,
169
+ "complexType": {
170
+ "original": "SaveCallback",
171
+ "resolved": "(data: GamConfigData) => Promise<void>",
172
+ "references": {
173
+ "SaveCallback": {
174
+ "location": "local",
175
+ "path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/gam-installation-settings/gam-installation-settings.tsx",
176
+ "id": "src/components/gam-installation-settings/gam-installation-settings.tsx::SaveCallback"
177
+ }
178
+ }
179
+ },
180
+ "required": false,
181
+ "optional": false,
182
+ "docs": {
183
+ "tags": [],
184
+ "text": "Callback invoked when the user wants to start the exportation process"
185
+ }
186
+ },
187
+ "cancelCallback": {
188
+ "type": "unknown",
189
+ "mutable": false,
190
+ "complexType": {
191
+ "original": "CancelCallback",
192
+ "resolved": "() => Promise<void>",
193
+ "references": {
194
+ "CancelCallback": {
195
+ "location": "local",
196
+ "path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/gam-installation-settings/gam-installation-settings.tsx",
197
+ "id": "src/components/gam-installation-settings/gam-installation-settings.tsx::CancelCallback"
198
+ }
199
+ }
200
+ },
201
+ "required": false,
202
+ "optional": false,
203
+ "docs": {
204
+ "tags": [],
205
+ "text": "Callback invoked when the user wants to cancel the exportation process"
206
+ }
207
+ }
208
+ };
209
+ }
210
+ static get states() {
211
+ return {
212
+ "fileName": {},
213
+ "selectedFile": {},
214
+ "importingIsInProcess": {}
215
+ };
216
+ }
217
+ static get events() {
218
+ return [{
219
+ "method": "componentDidRenderFirstTime",
220
+ "name": "componentDidRenderFirstTime",
221
+ "bubbles": true,
222
+ "cancelable": true,
223
+ "composed": true,
224
+ "docs": {
225
+ "tags": [{
226
+ "name": "description",
227
+ "text": "Gets fired when the component has rendered for the first time."
228
+ }],
229
+ "text": ""
230
+ },
231
+ "complexType": {
232
+ "original": "string",
233
+ "resolved": "string",
234
+ "references": {}
235
+ }
236
+ }];
237
+ }
238
+ static get elementRef() { return "el"; }
239
+ }
240
+ //# sourceMappingURL=gam-installation-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gam-installation-settings.js","sourceRoot":"","sources":["../../../src/components/gam-installation-settings/gam-installation-settings.tsx"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,OAAO,EACP,KAAK,EAEL,KAAK,EACN,MAAM,eAAe,CAAC;AACvB,6BAA6B;AAC7B,oBAAoB;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGnE,MAAM,cAAc,GAAe;IACjC;QACE,EAAE,EAAE,uBAAuB;QAC3B,IAAI,EAAE,+BAA+B;QACrC,KAAK,EAAE,WAAW;KACnB;IACD;QACE,EAAE,EAAE,eAAe;QACnB,IAAI,EAAE,qBAAqB;QAC3B,KAAK,EAAE,QAAQ;KAChB;IACD;QACE,EAAE,EAAE,cAAc;QAClB,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,OAAO;KACf;CACF,CAAC;AAQF,MAAM,OAAO,4BAA4B;;QAqB/B,sBAAiB,GAAG,KAAK,CAAC;QAsElC,iBAAiB;QAEjB,0BAA0B;QAE1B,qBAAqB;QAEb,0BAAqB,GAAG,KAAK,IAAI,EAAE;YACzC,IAAI,IAAI,CAAC,YAAY,EAAE;gBACrB,MAAM,IAAI,GAAkB;oBAC1B,eAAe,EAAE,IAAI,CAAC,mBAAmB,CAAC,OAAO;oBACjD,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAAC,OAAO;oBAC3C,cAAc,EAAE,IAAI,CAAC,qBAAqB,CAAC,KAAK;wBAC9C,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,KAAK;wBAClC,CAAC,CAAC,IAAI;iBACT,CAAC;gBACF,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;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AAgB,CAAC,MAAM,CAAC,YAAY,CAC/B;oBACb,kBAAY,IAAI,EAAC,YAAY,EAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,IAC5D,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,aAAa,CAChC,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 EventEmitter,\n State\n} from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\n/* CUSTOM IMPORTS */\nimport { config } from \"../../common/config\";\nimport { Locale } from \"../../common/locale\";\nimport { renderComboItems } from \"../../common/render-combo-items\";\nimport { GxOption } from \"../../common/types\";\n\nconst COMBO_BOX_DATA: GxOption[] = [\n {\n id: \"install-automatically\",\n name: \"Install Updates Automatically\",\n value: \"automatic\"\n },\n {\n id: \"prompt-update\",\n name: \"Prompt me to Update\",\n value: \"prompt\"\n },\n {\n id: \"never-update\",\n name: \"Never Update\",\n value: \"never\"\n }\n];\n\n@Component({\n tag: \"gx-ide-gam-installation-settings\",\n styleUrl: \"gam-installation-settings.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/gam-installation-settings\"]\n})\nexport class GxIdeGamInstallationSettings {\n /*\nINDEX:\n1.OWN PROPERTIES \n2.REFERENCE TO ELEMENTS\n3.STATE() VARIABLES\n4.PUBLIC PROPERTY API | WATCH'S\n5.EVENTS (EMIT)\n6.COMPONENT LIFECYCLE METHODS\n7.LISTENERS\n8.PUBLIC METHODS API\n9.LOCAL METHODS\n10.RENDER() FUNCTION\n*/\n\n // 1.OWN PROPERTIES //\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: HTMLGxIdeGamInstallationSettingsElement;\n\n private webPanelsCheckboxEl!: HTMLGxgFormCheckboxElement;\n private panelsCheckboxEl!: HTMLGxgFormCheckboxElement;\n private futureUpgradesComboEl!: HTMLGxgComboBoxElement;\n\n // 3.STATE() VARIABLES //\n\n /**\n * Current value for Used in objects\n */\n\n @State() fileName: string = \"\";\n @State() selectedFile: File;\n @State() importingIsInProcess = false;\n\n // 4.PUBLIC PROPERTY API | WATCH'S //\n\n /**\n * If true it displays the component title on the header\n */\n @Prop() readonly displayTitle = false;\n\n /**\n * Specifies the configuration type to be used\n */\n @Prop() readonly configurationType: \"installation\" | \"update\" =\n \"installation\";\n\n /**\n * Callback invoked when the user press repair button\n */\n @Prop() readonly repairCallback: RepairCallback;\n\n /**\n * Callback invoked when the user wants to start the exportation process\n */\n @Prop() readonly saveCallback: SaveCallback;\n\n /**\n * Callback invoked when the user wants to cancel the exportation process\n */\n @Prop() readonly cancelCallback: CancelCallback;\n\n // 5.EVENTS (EMIT) //\n\n /**\n * @description Gets fired when the component has rendered for the first time.\n */\n @Event() componentDidRenderFirstTime: EventEmitter<string>;\n\n // 6.COMPONENT LIFECYCLE METHODS //\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 private repairCallbackHandler = async () => {\n if (this.saveCallback) {\n const data: GamConfigData = {\n importWebPanels: this.webPanelsCheckboxEl.checked,\n importPanels: this.panelsCheckboxEl.checked,\n futureUpgrades: this.futureUpgradesComboEl.value\n ? this.futureUpgradesComboEl.value\n : null\n };\n await this.repairCallback(data);\n }\n };\n\n private saveCallbackHandler = async () => {\n if (this.saveCallback) {\n const data: GamConfigData = {\n importWebPanels: this.webPanelsCheckboxEl.checked,\n importPanels: this.panelsCheckboxEl.checked,\n futureUpgrades: this.futureUpgradesComboEl.value\n ? this.futureUpgradesComboEl.value\n : null\n };\n await this.saveCallback(data);\n }\n };\n private cancelCallbackHandler = () => {\n this.cancelCallback();\n };\n\n /* Renders*/\n private renderHeader = () => {\n return (\n <header class=\"header\" slot=\"header\">\n {/* header text */}\n <gxg-text type=\"text-regular\">\n {this.configurationType === \"installation\"\n ? this._componentLocale.header.headerTextInstallation.firstSentence\n : this._componentLocale.header.headerTextUpdate.firstSentence}\n </gxg-text>\n <gxg-text type=\"text-regular\">\n {this.configurationType === \"installation\"\n ? this._componentLocale.header.headerTextInstallation.secondSentence\n : this._componentLocale.header.headerTextUpdate.secondSentence}\n </gxg-text>\n <gxg-text type=\"text-regular\">\n {this.configurationType === \"installation\"\n ? this._componentLocale.header.headerTextInstallation.thirdSentence\n : this._componentLocale.header.headerTextUpdate.thirdSentence}\n </gxg-text>\n </header>\n );\n };\n\n private renderFilters = () => {\n return (\n <div class=\"filters\">\n <gxg-title type=\"title-05\">\n {this._componentLocale.filters.filtersHeading}\n </gxg-title>\n\n <gxg-form-checkbox\n label={this._componentLocale.filters.webPanelsCheckbox}\n part=\"web-panels-checkbox\"\n slot=\"footer-start\"\n ref={(el: HTMLGxgFormCheckboxElement) =>\n (this.webPanelsCheckboxEl = el as HTMLGxgFormCheckboxElement)\n }\n ></gxg-form-checkbox>\n <gxg-form-checkbox\n label={this._componentLocale.filters.panelsCheckbox}\n part=\"panels-checkbox\"\n slot=\"footer-start\"\n ref={(el: HTMLGxgFormCheckboxElement) =>\n (this.panelsCheckboxEl = el as HTMLGxgFormCheckboxElement)\n }\n ></gxg-form-checkbox>\n\n <gxg-combo-box\n label={this._componentLocale.filters.futureUpgradesComboLabel}\n disableFilter\n value={COMBO_BOX_DATA[0].value}\n part=\"future-upgrades-combo\"\n ref={(el: HTMLGxgComboBoxElement) =>\n (this.futureUpgradesComboEl = el as HTMLGxgComboBoxElement)\n }\n >\n {renderComboItems(COMBO_BOX_DATA ?? [])}\n </gxg-combo-box>\n </div>\n );\n };\n\n // 10.RENDER() FUNCTION //\n\n render() {\n return (\n <Host class=\"gx-ide-component\">\n <div class=\"gx-ide-main-wrapper\">\n <gx-ide-container\n noHeadingPadding\n headingPaddingTop\n noContentPadding\n noContentGap\n containerTitle={\n this.displayTitle ? this._componentLocale.componentName : null\n }\n slimmerFooter={config.gxIdeContainer.slimmerFooter}\n >\n {this.renderHeader()}\n {this.renderFilters()}\n <gxg-text type=\"text-regular\" slot=\"footer-above\">\n {this._componentLocale.footer.footerSaveCancelText}\n </gxg-text>\n <gxg-text type=\"text-regular\" slot=\"footer-above\">\n {this._componentLocale.footer.footerRepairText}\n </gxg-text>\n\n <gxg-button\n type=\"outlined\"\n slot=\"footer-start\"\n onClick={this.repairCallbackHandler}\n >\n {this._componentLocale.footer.repairButton}\n </gxg-button>\n\n <gxg-button\n type=\"outlined\"\n slot=\"footer-end\"\n onClick={this.cancelCallbackHandler}\n >\n {this._componentLocale.footer.cancelButton}\n </gxg-button>\n <gxg-button slot=\"footer-end\" onClick={this.saveCallbackHandler}>\n {this._componentLocale.footer.confirmButton}\n </gxg-button>\n </gx-ide-container>\n </div>\n </Host>\n );\n }\n}\n\nexport type GamConfigData = {\n importWebPanels: boolean;\n importPanels: boolean;\n futureUpgrades: \"never\" | \"prompt\" | \"automatic\";\n};\n\nexport type SaveCallback = (data: GamConfigData) => Promise<void>;\nexport type CancelCallback = () => Promise<void>;\nexport type RepairCallback = (config: GamConfigData) => Promise<void>;\n"]}
@@ -0,0 +1,34 @@
1
+ {
2
+ "componentName": "GAM Installation Settings",
3
+ "header": {
4
+ "headerTextInstallation": {
5
+ "firstSentence": "Enabling Integrated Security imports GeneXus Access Manager (GAM) components to the Knowledge Base, providing authentication and security to your applications.",
6
+ "secondSentence": "You will be able to manage users, roles and permissions to control access to your application (authentication), and to grant access permissions to your programs (authorization).",
7
+ "thirdSentence": "Please select the additional objects you want to import and how to manage their future upgrades."
8
+ },
9
+ "headerTextUpdate": {
10
+ "firstSentence": "Use this dialog to check installed and available GAM versions and to install additional components.",
11
+ "secondSentence": "Please select the additional objects you want to import and how to manage their future upgrades.",
12
+ "thirdSentence": ""
13
+ },
14
+ "translationFileLabel": "Translation File:",
15
+ "importButtonText": "Select File"
16
+ },
17
+ "filters": {
18
+ "filtersHeading": "Security Objects : Login, Not Authorized, Change Password, Register, etc",
19
+ "webPanelsCheckbox": "Web Panels",
20
+ "panelsCheckbox": "Panels",
21
+ "futureUpgradesComboLabel": "Select How to manage the future upgrades:"
22
+ },
23
+ "footer": {
24
+ "footerSaveCancelText": "Select Save to Apply your Changes or Cancel to Ignore Them",
25
+ "footerRepairText": "Use Repair to import GAM components again",
26
+ "repairButton": "Repair",
27
+ "confirmButton": "Save",
28
+ "cancelButton": "Cancel"
29
+ },
30
+ "loader": {
31
+ "title": "Loading...",
32
+ "cancelLabel": "Cancel"
33
+ }
34
+ }
@@ -3,7 +3,7 @@ import { Host, h } from "@stencil/core";
3
3
  /* OTHER LIBRARIES IMPORTS */
4
4
  /* CUSTOM IMPORTS */
5
5
  import { Locale } from "../../../common/locale";
6
- export class GxIdeEditModuleServers {
6
+ export class GxIdeEditModuleServer {
7
7
  constructor() {
8
8
  this.renderedFirstTime = false;
9
9
  // 7.LISTENERS //
@@ -88,19 +88,19 @@ export class GxIdeEditModuleServers {
88
88
  ? "grid module-servers-grid-local"
89
89
  : "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.selectedType, ref: (el) => (this.serverTypeEl = el) }, (_a = this.types) === null || _a === void 0 ? void 0 : _a.map(type => (h("gxg-combo-box-item", { value: type.type, onItemSelected: item => (this.selectedType = item.detail.value) }, type.type)))), h("gxg-form-text", { placeholder: this._componentLocale.name, ref: (el) => (this.nameEl = el), part: "name" }), h("gxg-form-text", { placeholder: this._componentLocale.source, ref: (el) => (this.sourceEl = el), 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)))));
90
90
  }
91
- static get is() { return "gx-ide-edit-module-servers"; }
91
+ static get is() { return "gx-ide-edit-module-server"; }
92
92
  static get encapsulation() { return "shadow"; }
93
93
  static get originalStyleUrls() {
94
94
  return {
95
- "$": ["edit-module-servers.scss"]
95
+ "$": ["edit-module-server.scss"]
96
96
  };
97
97
  }
98
98
  static get styleUrls() {
99
99
  return {
100
- "$": ["edit-module-servers.css"]
100
+ "$": ["edit-module-server.css"]
101
101
  };
102
102
  }
103
- static get assetsDirs() { return ["gx-ide-assets/edit-module-servers"]; }
103
+ static get assetsDirs() { return ["gx-ide-assets/edit-module-server"]; }
104
104
  static get properties() {
105
105
  return {
106
106
  "types": {
@@ -167,8 +167,8 @@ export class GxIdeEditModuleServers {
167
167
  "references": {
168
168
  "ConfirmCallback": {
169
169
  "location": "local",
170
- "path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/modules/edit-module-servers/edit-module-servers.tsx",
171
- "id": "src/components/modules/edit-module-servers/edit-module-servers.tsx::ConfirmCallback"
170
+ "path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/modules/edit-module-server/edit-module-server.tsx",
171
+ "id": "src/components/modules/edit-module-server/edit-module-server.tsx::ConfirmCallback"
172
172
  }
173
173
  }
174
174
  },
@@ -188,8 +188,8 @@ export class GxIdeEditModuleServers {
188
188
  "references": {
189
189
  "SelectSourceCallback": {
190
190
  "location": "local",
191
- "path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/modules/edit-module-servers/edit-module-servers.tsx",
192
- "id": "src/components/modules/edit-module-servers/edit-module-servers.tsx::SelectSourceCallback"
191
+ "path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/modules/edit-module-server/edit-module-server.tsx",
192
+ "id": "src/components/modules/edit-module-server/edit-module-server.tsx::SelectSourceCallback"
193
193
  }
194
194
  }
195
195
  },
@@ -209,8 +209,8 @@ export class GxIdeEditModuleServers {
209
209
  "references": {
210
210
  "CancelCallback": {
211
211
  "location": "local",
212
- "path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/modules/edit-module-servers/edit-module-servers.tsx",
213
- "id": "src/components/modules/edit-module-servers/edit-module-servers.tsx::CancelCallback"
212
+ "path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/modules/edit-module-server/edit-module-server.tsx",
213
+ "id": "src/components/modules/edit-module-server/edit-module-server.tsx::CancelCallback"
214
214
  }
215
215
  }
216
216
  },
@@ -248,4 +248,4 @@ export class GxIdeEditModuleServers {
248
248
  }
249
249
  static get elementRef() { return "el"; }
250
250
  }
251
- //# sourceMappingURL=edit-module-servers.js.map
251
+ //# sourceMappingURL=edit-module-server.js.map
@@ -0,0 +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;QAqElC,iBAAiB;QAEjB,0BAA0B;QAE1B,qBAAqB;QAErB;;WAEG;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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 * 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\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.selectedType}\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.type}\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 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 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"]}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GxIdeEditModuleServer extends Components.GxIdeEditModuleServer, HTMLElement {}
4
+ export const GxIdeEditModuleServer: {
5
+ prototype: GxIdeEditModuleServer;
6
+ new (): GxIdeEditModuleServer;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,186 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { L as Locale } from './locale.js';
3
+ import { d as defineCustomElement$c } from './icon.js';
4
+ import { d as defineCustomElement$b } from './container.js';
5
+ import { d as defineCustomElement$a } from './title2.js';
6
+ import { d as defineCustomElement$9 } from './button.js';
7
+ import { d as defineCustomElement$8 } from './combo-box.js';
8
+ import { d as defineCustomElement$7 } from './combo-box-item.js';
9
+ import { d as defineCustomElement$6 } from './form-text.js';
10
+ import { d as defineCustomElement$5 } from './icon2.js';
11
+ import { d as defineCustomElement$4 } from './gxg-label2.js';
12
+ import { d as defineCustomElement$3 } from './title.js';
13
+ import { d as defineCustomElement$2 } from './tooltip.js';
14
+
15
+ const editModuleServerCss = ":root{--ui-animaton-speed:0.2s}.gxg-title-01{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-01--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-02{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-02--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--color-on-primary)}.gxg-title-03{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-03--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-04{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-04--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-05{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-05--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable)}.gxg-text--negative{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text--gray{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--dimmed)}.gxg-quote{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);font-style:italic}.gxg-quote--negative{color:var(--ds-base-font-color--negative)}.gxg-link{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block}.gxg-link:hover{color:var(--ds-base-font-color--link-hover)}.gxg-link:active{color:var(--ds-base-font-color--link-active)}.gxg-link-gray{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed)}.gxg-link-gray:hover{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed);filter:brightness(1.4)}.gxg-alert-error{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--error);display:inline-block}.gxg-alert-warning{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--warning);display:inline-block}.gxg-alert-success{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--success);display:inline-block}.gxg-tab--disabled{color:var(--color-primary-disabled);pointer-events:none}.gxg-tab--disabled[disabled]{color:var(--color-primary-disabled);pointer-events:none}.gxg-label{font-family:var(--ds-base-font-family-primary);font-weight:var(--gxg-label-font-weight);font-size:var(--gxg-label-font-size);color:var(--gxg-label-color);text-align:center;line-height:1.455em;display:flex;align-items:center}.gxg-label:hover{color:var(--color-primary-hover)}.gxg-label:focus{color:var(--color-primary-active)}.gxg-label:active{color:var(--color-primary-active)}.gxg-label[disabled]{color:var(--color-primary-disabled)}.gxg-label--negative{color:var(--color-on-primary)}.gxg-label--negative[disabled]{color:var(--color-on-disabled)}.gxg-scrollbar{}.gxg-scrollbar::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gxg-scrollbar::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gxg-scrollbar::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.overflow-auto{overflow:auto}.justify-start{display:flex;justify-content:start}.justify-center{display:flex;justify-content:center}.justify-end{display:flex;justify-content:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--mer-color__neutral-gray--800)}ch-grid-column:first-child{padding-inline-start:var(--gx-ide-container__padding) !important}ch-grid-column:last-child{padding-inline-end:var(--gx-ide-container__padding) !important}ch-grid-cell{--mer-spacing--xs:var(--gx-ide-container__padding)}.layout{display:grid;gap:var(--mer-spacing--lg);box-sizing:border-box}.layout--two-cols{grid-template-columns:1fr 1fr}.layout--space-above{padding-block-start:var(--mer-spacing--lg)}gxg-tabs{box-shadow:none}:host(.gx-ide-component){height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--mer-font__weight--regular);font-size:var(--mer-font__size--xs);font-family:var(--mer-font-family--primary);height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1;box-sizing:border-box}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-main::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-main::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-main::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-overflow::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.tree-container{display:flex;height:100%;width:100%;box-sizing:border-box}:host{display:block}.module-servers-grid-local{gap:var(--spacing-comp-03);display:grid;grid-template-columns:auto 1fr auto}.module-servers-grid-local *:nth-child(3){align-self:end}.module-servers-grid-server{gap:var(--spacing-comp-03);display:grid;grid-template-columns:auto 1fr}.module-servers-grid-server *:nth-child(3){align-self:end}.module-servers-grid-column-1{gap:var(--spacing-comp-03);display:grid;grid-template-rows:repeat(3, 1fr)}.module-servers-grid-column-2{gap:var(--spacing-comp-03);display:grid;grid-template-rows:repeat(2, 1fr)}.grid-server-auth-column-1{gap:var(--spacing-comp-03);display:grid;grid-template-rows:repeat(2, 1fr)}.grid-server-auth-column-2{gap:var(--spacing-comp-03);display:grid;grid-template-rows:repeat(2, 1fr)}";
16
+
17
+ const GxIdeEditModuleServer$1 = /*@__PURE__*/ proxyCustomElement(class GxIdeEditModuleServer extends HTMLElement {
18
+ constructor() {
19
+ super();
20
+ this.__registerHost();
21
+ this.__attachShadow();
22
+ this.componentDidRenderFirstTime = createEvent(this, "componentDidRenderFirstTime", 7);
23
+ this.renderedFirstTime = false;
24
+ // 7.LISTENERS //
25
+ // 8.PUBLIC METHODS API //
26
+ // 9.LOCAL METHODS //
27
+ /**
28
+ * Executed when user click on confirm button
29
+ */
30
+ this.confirmCallbackHandler = async () => {
31
+ if (this.confirmCallback) {
32
+ const selectedTypeId = this.types.find(({ type }) => type === this.selectedType);
33
+ let data = {};
34
+ if (selectedTypeId.type === "remote") {
35
+ data = {
36
+ id: selectedTypeId.id,
37
+ name: this.nameEl.value,
38
+ type: this.serverTypeEl.value,
39
+ authenticated: selectedTypeId.authenticated,
40
+ source: this.sourceEl.value,
41
+ user: this.userEl.value,
42
+ password: this.passwordEl.value
43
+ };
44
+ }
45
+ else {
46
+ data = {
47
+ id: selectedTypeId.id,
48
+ name: this.nameEl.value,
49
+ type: this.serverTypeEl.value,
50
+ authenticated: selectedTypeId.authenticated,
51
+ source: this.sourceEl.value
52
+ };
53
+ }
54
+ await this.confirmCallback(data);
55
+ }
56
+ };
57
+ /**
58
+ * Executed when user click on cancel button
59
+ */
60
+ this.cancelCallbackHandler = async () => {
61
+ await this.cancelCallback();
62
+ };
63
+ this.selectSourceCallbackHandle = async () => {
64
+ const path = await this.selectSourceCallback();
65
+ if (path) {
66
+ this.sourceEl.value = path;
67
+ }
68
+ };
69
+ // 10.LOCAL METHODS //
70
+ this.renderServerOptions = () => {
71
+ return [
72
+ h("div", { class: "grid-server-auth-column-1" }, h("gxg-label", null, this._componentLocale.user), h("gxg-label", null, this._componentLocale.password)),
73
+ 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" }))
74
+ ];
75
+ };
76
+ this.selectedType = "local";
77
+ this.types = undefined;
78
+ this.name = undefined;
79
+ this.source = undefined;
80
+ this.confirmCallback = undefined;
81
+ this.selectSourceCallback = undefined;
82
+ this.cancelCallback = undefined;
83
+ }
84
+ // 6.COMPONENT LIFECYCLE EVENTS //
85
+ async componentWillLoad() {
86
+ this._componentLocale = await Locale.getComponentStrings(this.el);
87
+ }
88
+ componentDidRender() {
89
+ if (!this.renderedFirstTime) {
90
+ this.componentDidRenderFirstTime.emit(this._componentLocale.componentName);
91
+ this.renderedFirstTime = true;
92
+ }
93
+ }
94
+ render() {
95
+ var _a;
96
+ return (h(Host, { class: "gx-ide-component" }, h("div", { class: "gx-ide-main-wrapper gx-ide-overflow" }, h("gx-ide-container", { slimmerFooter: true }, h("div", { class: this.selectedType === "local"
97
+ ? "grid module-servers-grid-local"
98
+ : "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.selectedType, ref: (el) => (this.serverTypeEl = el) }, (_a = this.types) === null || _a === void 0 ? void 0 : _a.map(type => (h("gxg-combo-box-item", { value: type.type, onItemSelected: item => (this.selectedType = item.detail.value) }, type.type)))), h("gxg-form-text", { placeholder: this._componentLocale.name, ref: (el) => (this.nameEl = el), part: "name" }), h("gxg-form-text", { placeholder: this._componentLocale.source, ref: (el) => (this.sourceEl = el), 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)))));
99
+ }
100
+ static get assetsDirs() { return ["gx-ide-assets/edit-module-server"]; }
101
+ get el() { return this; }
102
+ static get style() { return editModuleServerCss; }
103
+ }, [1, "gx-ide-edit-module-server", {
104
+ "types": [16],
105
+ "name": [1],
106
+ "source": [1],
107
+ "confirmCallback": [16],
108
+ "selectSourceCallback": [16],
109
+ "cancelCallback": [16],
110
+ "selectedType": [32]
111
+ }]);
112
+ function defineCustomElement$1() {
113
+ if (typeof customElements === "undefined") {
114
+ return;
115
+ }
116
+ const components = ["gx-ide-edit-module-server", "ch-icon", "gx-ide-container", "gx-ide-title", "gxg-button", "gxg-combo-box", "gxg-combo-box-item", "gxg-form-text", "gxg-icon", "gxg-label", "gxg-title", "gxg-tooltip"];
117
+ components.forEach(tagName => { switch (tagName) {
118
+ case "gx-ide-edit-module-server":
119
+ if (!customElements.get(tagName)) {
120
+ customElements.define(tagName, GxIdeEditModuleServer$1);
121
+ }
122
+ break;
123
+ case "ch-icon":
124
+ if (!customElements.get(tagName)) {
125
+ defineCustomElement$c();
126
+ }
127
+ break;
128
+ case "gx-ide-container":
129
+ if (!customElements.get(tagName)) {
130
+ defineCustomElement$b();
131
+ }
132
+ break;
133
+ case "gx-ide-title":
134
+ if (!customElements.get(tagName)) {
135
+ defineCustomElement$a();
136
+ }
137
+ break;
138
+ case "gxg-button":
139
+ if (!customElements.get(tagName)) {
140
+ defineCustomElement$9();
141
+ }
142
+ break;
143
+ case "gxg-combo-box":
144
+ if (!customElements.get(tagName)) {
145
+ defineCustomElement$8();
146
+ }
147
+ break;
148
+ case "gxg-combo-box-item":
149
+ if (!customElements.get(tagName)) {
150
+ defineCustomElement$7();
151
+ }
152
+ break;
153
+ case "gxg-form-text":
154
+ if (!customElements.get(tagName)) {
155
+ defineCustomElement$6();
156
+ }
157
+ break;
158
+ case "gxg-icon":
159
+ if (!customElements.get(tagName)) {
160
+ defineCustomElement$5();
161
+ }
162
+ break;
163
+ case "gxg-label":
164
+ if (!customElements.get(tagName)) {
165
+ defineCustomElement$4();
166
+ }
167
+ break;
168
+ case "gxg-title":
169
+ if (!customElements.get(tagName)) {
170
+ defineCustomElement$3();
171
+ }
172
+ break;
173
+ case "gxg-tooltip":
174
+ if (!customElements.get(tagName)) {
175
+ defineCustomElement$2();
176
+ }
177
+ break;
178
+ } });
179
+ }
180
+
181
+ const GxIdeEditModuleServer = GxIdeEditModuleServer$1;
182
+ const defineCustomElement = defineCustomElement$1;
183
+
184
+ export { GxIdeEditModuleServer, defineCustomElement };
185
+
186
+ //# sourceMappingURL=gx-ide-edit-module-server.js.map