@genexus/genexus-ide-ui 0.0.125 → 0.0.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/{gxg-combo-box_2.cjs.entry.js → gx-ide-container_3.cjs.entry.js} +174 -1
- package/dist/cjs/gx-ide-container_3.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-manage-module-references-v2.cjs.entry.js +304 -0
- package/dist/cjs/gx-ide-manage-module-references-v2.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js +8 -7
- package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js.map +1 -1
- package/dist/cjs/{gx-ide-container_2.cjs.entry.js → gxg-form-checkbox.cjs.entry.js} +1 -174
- package/dist/cjs/gxg-form-checkbox.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/modules/manage-module-references/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.en.json +1 -1
- package/dist/collection/components/modules/manage-module-references/manage-module-references.css +7 -2
- package/dist/collection/components/modules/manage-module-references/manage-module-references.js +7 -6
- package/dist/collection/components/modules/manage-module-references/manage-module-references.js.map +1 -1
- package/dist/collection/components/modules/manage-module-references-v2/gx-ide-assets/manage-module-references-v2/langs/manage-module-references-v2.lang.en.json +39 -0
- package/dist/collection/components/modules/manage-module-references-v2/gx-ide-assets/manage-module-references-v2/langs/manage-module-references-v2.lang.ja.json +3 -0
- package/dist/collection/components/modules/manage-module-references-v2/gx-ide-assets/manage-module-references-v2/langs/manage-module-references-v2.lang.zh.json +3 -0
- package/dist/collection/components/modules/manage-module-references-v2/manage-module-references-v2.js +469 -0
- package/dist/collection/components/modules/manage-module-references-v2/manage-module-references-v2.js.map +1 -0
- package/dist/collection/components/modules/manage-module-references-v2/manage-module-references.css +770 -0
- package/dist/collection/components/modules/types.js.map +1 -1
- package/dist/components/gx-ide-manage-module-references-v2.d.ts +11 -0
- package/dist/components/gx-ide-manage-module-references-v2.js +510 -0
- package/dist/components/gx-ide-manage-module-references-v2.js.map +1 -0
- package/dist/components/gx-ide-manage-module-references.js +8 -7
- package/dist/components/gx-ide-manage-module-references.js.map +1 -1
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/{gxg-combo-box_2.entry.js → gx-ide-container_3.entry.js} +175 -3
- package/dist/esm/gx-ide-container_3.entry.js.map +1 -0
- package/dist/esm/gx-ide-manage-module-references-v2.entry.js +300 -0
- package/dist/esm/gx-ide-manage-module-references-v2.entry.js.map +1 -0
- package/dist/esm/gx-ide-manage-module-references.entry.js +8 -7
- package/dist/esm/gx-ide-manage-module-references.entry.js.map +1 -1
- package/dist/esm/gxg-form-checkbox.entry.js +147 -0
- package/dist/esm/gxg-form-checkbox.entry.js.map +1 -0
- 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/manage-module-references/langs/manage-module-references.lang.en.json +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/manage-module-references-v2/langs/manage-module-references-v2.lang.en.json +39 -0
- package/dist/genexus-ide-ui/gx-ide-assets/manage-module-references-v2/langs/manage-module-references-v2.lang.ja.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/manage-module-references-v2/langs/manage-module-references-v2.lang.zh.json +3 -0
- package/dist/genexus-ide-ui/{p-c9b810e3.entry.js → p-34850af1.entry.js} +7 -6
- package/dist/genexus-ide-ui/p-34850af1.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-f37ec5b8.entry.js → p-74bfec22.entry.js} +286 -103
- package/dist/genexus-ide-ui/p-74bfec22.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-9d7a1451.entry.js +181 -0
- package/dist/genexus-ide-ui/p-9d7a1451.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-d0a8d025.entry.js +435 -0
- package/dist/genexus-ide-ui/p-d0a8d025.entry.js.map +1 -0
- package/dist/types/components/modules/manage-module-references/manage-module-references.d.ts +1 -1
- package/dist/types/components/modules/manage-module-references-v2/manage-module-references-v2.d.ts +107 -0
- package/dist/types/components/modules/types.d.ts +4 -1
- package/dist/types/components.d.ts +82 -0
- package/package.json +1 -1
- package/dist/cjs/gx-ide-container_2.cjs.entry.js.map +0 -1
- package/dist/cjs/gxg-combo-box_2.cjs.entry.js.map +0 -1
- package/dist/esm/gx-ide-container_2.entry.js +0 -319
- package/dist/esm/gx-ide-container_2.entry.js.map +0 -1
- package/dist/esm/gxg-combo-box_2.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-7a5810d6.entry.js +0 -364
- package/dist/genexus-ide-ui/p-7a5810d6.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-c9b810e3.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-f37ec5b8.entry.js.map +0 -1
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
/* STENCIL IMPORTS */
|
|
2
|
+
import { Host, h } from "@stencil/core";
|
|
3
|
+
import { renderModuleDataProperties } from "../../../common/common";
|
|
4
|
+
import { Locale } from "../../../common/locale";
|
|
5
|
+
export class GxManageModuleReferencesV2 {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.renderedFirstTime = false;
|
|
8
|
+
// 7.LISTENERS //
|
|
9
|
+
// 8.PUBLIC METHODS API //
|
|
10
|
+
// 9.LOCAL METHODS //
|
|
11
|
+
/**
|
|
12
|
+
* Callback invoked to get the progress when module is performing an action
|
|
13
|
+
*/
|
|
14
|
+
this.onProgress = (message, progress, state) => {
|
|
15
|
+
const data = { message, progress, state };
|
|
16
|
+
this.selectedModuleAction = Object.assign({}, data);
|
|
17
|
+
this.progressValue = this.selectedModuleAction.progress;
|
|
18
|
+
this.progressState = this.selectedModuleAction.state;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Used for changing the selected module
|
|
22
|
+
*/
|
|
23
|
+
this.handleModuleChange = (event) => {
|
|
24
|
+
const selectedModuleId = event.detail.rowsId[0];
|
|
25
|
+
this.selectedModule = this.modulesMap.get(selectedModuleId);
|
|
26
|
+
};
|
|
27
|
+
this.moduleActionHandler = (module) => () => {
|
|
28
|
+
this.actionCompleted = false;
|
|
29
|
+
this.closeProgressBar = false;
|
|
30
|
+
this.executeActionCallbackHandler(module);
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Perform an action relative to a module using callbackExecuteAction callback and receive the state of that action with onProgress callback
|
|
34
|
+
*/
|
|
35
|
+
this.executeActionCallbackHandler = async (module) => {
|
|
36
|
+
if (this.executeActionCallback) {
|
|
37
|
+
this.actionCompleted = false;
|
|
38
|
+
const moduleSelectedVersionId = this.modulesMap.get(module.id)
|
|
39
|
+
.selectedVersion.id;
|
|
40
|
+
const moduleSelectedVersionAction = this.modulesMap.get(module.id)
|
|
41
|
+
.selectedVersion.action;
|
|
42
|
+
const actionCompleted = await this.executeActionCallback(this.selectedServerId, module.id, moduleSelectedVersionId, moduleSelectedVersionAction, this.onProgress);
|
|
43
|
+
if (actionCompleted) {
|
|
44
|
+
this.serverSelectedCallbackHandler(this.selectedServerId, false);
|
|
45
|
+
}
|
|
46
|
+
this.actionCompleted = true;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
this.showModuleMenu = async (e) => {
|
|
50
|
+
if (this.serverContextMenuCallback) {
|
|
51
|
+
const buttonBoundingClientRect = e.target.getBoundingClientRect();
|
|
52
|
+
await this.serverContextMenuCallback({
|
|
53
|
+
selection: [this.selectedServerId],
|
|
54
|
+
clientX: buttonBoundingClientRect.x,
|
|
55
|
+
clientY: buttonBoundingClientRect.y
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
this.searchModulesFilterHandler = (e) => {
|
|
60
|
+
this.searchModulesFilterValue = e.detail.trim().toLowerCase();
|
|
61
|
+
};
|
|
62
|
+
this.getFilteredServerModules = () => {
|
|
63
|
+
return this.serverModulesExtended.filter(module => {
|
|
64
|
+
// Filter conditions
|
|
65
|
+
const nameMatch = module.selectedVersion.name
|
|
66
|
+
.toLowerCase()
|
|
67
|
+
.includes(this.searchModulesFilterValue);
|
|
68
|
+
const descriptionMatch = module.selectedVersion.description
|
|
69
|
+
.toLowerCase()
|
|
70
|
+
.includes(this.searchModulesFilterValue);
|
|
71
|
+
let actionMatch;
|
|
72
|
+
if (this.selectedButtonFilter === "browse") {
|
|
73
|
+
// If browse is selected, display all
|
|
74
|
+
actionMatch = true;
|
|
75
|
+
}
|
|
76
|
+
else if (this.selectedButtonFilter === "installed") {
|
|
77
|
+
actionMatch = !!(module.selectedVersion.action === "update" ||
|
|
78
|
+
module.selectedVersion.action === "restore");
|
|
79
|
+
}
|
|
80
|
+
else if (this.selectedButtonFilter === "updates") {
|
|
81
|
+
actionMatch = !!(module.selectedVersion.action === "update");
|
|
82
|
+
}
|
|
83
|
+
const filtered = (nameMatch || descriptionMatch) && actionMatch;
|
|
84
|
+
return filtered;
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
// 9.LOCAL METHODS > RENDERS //
|
|
88
|
+
this.renderGridOrEmptyState = () => {
|
|
89
|
+
this.filteredServerModules = this.getFilteredServerModules();
|
|
90
|
+
if (this.filteredServerModules.length > 0) {
|
|
91
|
+
return this.renderModulesVersionsGrid();
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
return this.renderEmptyStateModules();
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
this.renderModulesVersionsGrid = () => {
|
|
98
|
+
return (h("gxg-grid", { noBorder: true, fullHeight: true }, h("ch-grid", { rowSelectionMode: "single", part: "ch-grid-pending-commits", class: "servers-detail no-border", onSelectionChanged: this.handleModuleChange }, h("ch-grid-columnset", null, h("ch-grid-column", { settingable: false }), h("ch-grid-column", { settingable: false, size: "min-content" })), this.filteredServerModules.map((module) => (h("ch-grid-row", { rowid: module.id, key: module.id, selected: this.selectedModule && this.selectedModule.id === module.id }, h("ch-grid-cell", { class: "grid-cell-module__info" }, h("span", { class: "grid-cell-module__name" }, h("gxg-icon", { type: "objects/module", "data-action": module.selectedVersion.action, color: this.moduleVersionIconColor(module.id), size: "small" }), module.selectedVersion.name), h("span", { class: "grid-cell-module__description" }, module.selectedVersion.description)), h("ch-grid-cell", null, this.selectedModule && this.selectedModule.id === module.id ? (h("gxg-button", { disabled: !this.actionCompleted ||
|
|
99
|
+
module.selectedVersion.action === "incompatible" ||
|
|
100
|
+
module.selectedVersion.action === "not-installable", fit: true, part: "module-action", onClick: this.moduleActionHandler(module) }, module.selectedVersion.action)) : null)))))));
|
|
101
|
+
};
|
|
102
|
+
this.renderEmptyStateModules = () => {
|
|
103
|
+
return (h("gx-ide-empty-state", { stateIcon: "mercury/filters", stateTitle: this._componentLocale.modules.noModulesFilter }));
|
|
104
|
+
};
|
|
105
|
+
this.moduleVersionIconColor = (moduleId) => {
|
|
106
|
+
const foundModule = this.serverModulesExtended.find(module => {
|
|
107
|
+
return module.id === moduleId;
|
|
108
|
+
});
|
|
109
|
+
if (foundModule) {
|
|
110
|
+
const moduleAction = foundModule.selectedVersion.action;
|
|
111
|
+
const moduleCurrentVersion = foundModule.currentVersion;
|
|
112
|
+
if (moduleAction === "not-installable" ||
|
|
113
|
+
moduleAction === "incompatible") {
|
|
114
|
+
return "warning";
|
|
115
|
+
}
|
|
116
|
+
else if (!moduleCurrentVersion) {
|
|
117
|
+
return "mercury-primary-disabled";
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
return "mercury-primary";
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return "mercury-primary";
|
|
124
|
+
};
|
|
125
|
+
this.renderVersionIcon = () => {
|
|
126
|
+
return (h("gxg-icon", { type: "objects/module", color: this.moduleVersionIconColor(this.selectedModule.id) }));
|
|
127
|
+
};
|
|
128
|
+
/* module details/information renders*/
|
|
129
|
+
this.renderVersionName = () => {
|
|
130
|
+
return (h("gxg-title", { part: "module-info__name", type: "title-05" }, h("div", { class: "module-info__name" }, this.selectedModule.selectedVersion.name)));
|
|
131
|
+
};
|
|
132
|
+
this.renderVersionWarningMessage = () => {
|
|
133
|
+
const warningMessage = this.selectedModule.selectedVersion.warningMessage;
|
|
134
|
+
if (warningMessage) {
|
|
135
|
+
return h("p", { class: "module-info__warning-message" }, warningMessage);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
this.renderInstalledVersion = () => {
|
|
139
|
+
const currentVersion = this.selectedModule.currentVersion;
|
|
140
|
+
let caption;
|
|
141
|
+
let cssClass = "module-info__action-container";
|
|
142
|
+
if (currentVersion) {
|
|
143
|
+
caption = `${this._componentLocale.modulesInformation.moduleProperties.installed}: ${currentVersion}`;
|
|
144
|
+
cssClass += ` module-info__action-container--installed`;
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
caption =
|
|
148
|
+
this._componentLocale.modulesInformation.moduleProperties.notInstalled;
|
|
149
|
+
}
|
|
150
|
+
return (h("div", { class: cssClass }, h("gxg-text", { part: "module-info__action" }, caption)));
|
|
151
|
+
};
|
|
152
|
+
// Update selected version
|
|
153
|
+
this.moduleVersionsValueChangedHandler = (e) => {
|
|
154
|
+
const selectedVersionId = e.detail.value;
|
|
155
|
+
this.updateSelectedModuleVersion(selectedVersionId);
|
|
156
|
+
};
|
|
157
|
+
this.moduleVersionsItemChangedHandler = (e) => {
|
|
158
|
+
const selectedVersionId = e.detail.value;
|
|
159
|
+
this.updateSelectedModuleVersion(selectedVersionId);
|
|
160
|
+
};
|
|
161
|
+
this.updateSelectedModuleVersion = (selectedVersionId) => {
|
|
162
|
+
const moduleSelectedVersion = this.selectedModule.versions.find(version => {
|
|
163
|
+
return version.id === selectedVersionId;
|
|
164
|
+
});
|
|
165
|
+
if (moduleSelectedVersion) {
|
|
166
|
+
const updatedSelectedModule = Object.assign(Object.assign({}, this.selectedModule), { selectedVersion: moduleSelectedVersion });
|
|
167
|
+
this.selectedModule = updatedSelectedModule;
|
|
168
|
+
// update module selected in modules array as well
|
|
169
|
+
const updatedModuleIndex = this.serverModulesExtended.findIndex(module => module.id === updatedSelectedModule.id);
|
|
170
|
+
if (updatedModuleIndex !== -1) {
|
|
171
|
+
// Update the object with new information
|
|
172
|
+
this.serverModulesExtended[updatedModuleIndex] = Object.assign(Object.assign({}, this.serverModulesExtended[updatedModuleIndex]), updatedSelectedModule);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
this.renderModuleVersions = () => {
|
|
177
|
+
return (h("div", { part: "available-versions" }, h("gxg-combo-box", { id: "versions-combo-box", "disable-filter": true, value: "", part: "module-versions", "display-validation-styles": true, "display-validation-message": true, label: this._componentLocale.modulesInformation.moduleProperties
|
|
178
|
+
.availableVersions, labelPosition: "start", centerLabel: true, onValueChanged: this.moduleVersionsValueChangedHandler, disabled: this.loadingServer || !this.actionCompleted }, this.selectedModule.versions.map(item => (h("gxg-combo-box-item", { value: item.id, onItemSelected: this.moduleVersionsItemChangedHandler }, item.id))))));
|
|
179
|
+
};
|
|
180
|
+
this.selectedButtonChangedHandler = (e) => {
|
|
181
|
+
this.selectedButtonFilter = e.detail;
|
|
182
|
+
};
|
|
183
|
+
// Update server selected
|
|
184
|
+
this.serverItemSelectedHandler = (e) => {
|
|
185
|
+
const serverId = e.detail.value;
|
|
186
|
+
this.serverSelectedCallbackHandler(serverId, false);
|
|
187
|
+
};
|
|
188
|
+
this.serverValueChangedHandler = (e) => {
|
|
189
|
+
const serverId = e.detail;
|
|
190
|
+
this.serverSelectedCallbackHandler(serverId, false);
|
|
191
|
+
};
|
|
192
|
+
this.reloadServer = () => {
|
|
193
|
+
this.serverSelectedCallbackHandler(this.selectedServerId, true);
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* Change the server selected value in response to callbackServerSelected callback
|
|
197
|
+
*/
|
|
198
|
+
this.serverSelectedCallbackHandler = async (serverId, reload) => {
|
|
199
|
+
if (this.serverSelectedCallback) {
|
|
200
|
+
this.loadingServer = true;
|
|
201
|
+
// clear
|
|
202
|
+
this.serverModules = [];
|
|
203
|
+
this.serverModulesExtended = [];
|
|
204
|
+
this.filteredServerModules = [];
|
|
205
|
+
this.modulesMap.clear();
|
|
206
|
+
this.modulesSelectedVersionMap.clear();
|
|
207
|
+
this.serverModules = await this.serverSelectedCallback(serverId, reload);
|
|
208
|
+
// Save modules on Map as well to get information about modules faster
|
|
209
|
+
this.serverModules.forEach(module => {
|
|
210
|
+
const extendedModuleData = Object.assign(Object.assign({}, module), { selectedVersion: module.versions[0] });
|
|
211
|
+
// When the server retrieves the modules, the selected module is by default the first one.
|
|
212
|
+
this.serverModulesExtended.push(extendedModuleData);
|
|
213
|
+
// Save modules on a map as well, for faster retrieval.
|
|
214
|
+
this.modulesMap.set(module.id, extendedModuleData);
|
|
215
|
+
});
|
|
216
|
+
this.selectedServerId = serverId;
|
|
217
|
+
this.loadingServer = false;
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
this.progressBarCloseHandler = () => {
|
|
221
|
+
setTimeout(() => {
|
|
222
|
+
this.actionCompleted = true;
|
|
223
|
+
this.closeProgressBar = true;
|
|
224
|
+
// reset
|
|
225
|
+
this.progressValue = 0;
|
|
226
|
+
this.progressState = "in-progress";
|
|
227
|
+
}, 400);
|
|
228
|
+
// delay to force the footer line disappear after the top-state-bar has been closed.
|
|
229
|
+
};
|
|
230
|
+
this.searchModulesFilterValue = "";
|
|
231
|
+
this.selectedButtonFilter = "browse";
|
|
232
|
+
this.serverModules = [];
|
|
233
|
+
this.serverModulesExtended = [];
|
|
234
|
+
this.filteredServerModules = [];
|
|
235
|
+
this.modulesMap = new Map();
|
|
236
|
+
this.selectedModule = undefined;
|
|
237
|
+
this.selectedServerId = undefined;
|
|
238
|
+
this.selectedModuleAction = {
|
|
239
|
+
message: "",
|
|
240
|
+
progress: 0,
|
|
241
|
+
state: "in-progress"
|
|
242
|
+
};
|
|
243
|
+
this.modulesSelectedVersionMap = new Map();
|
|
244
|
+
this.actionCompleted = true;
|
|
245
|
+
this.closeProgressBar = true;
|
|
246
|
+
this.progressValue = 0;
|
|
247
|
+
this.progressState = "in-progress";
|
|
248
|
+
this.loadingServer = false;
|
|
249
|
+
this.displayTitle = false;
|
|
250
|
+
this.servers = [];
|
|
251
|
+
this.serverSelectedCallback = undefined;
|
|
252
|
+
this.executeActionCallback = undefined;
|
|
253
|
+
this.serverContextMenuCallback = undefined;
|
|
254
|
+
this.showServerCommands = false;
|
|
255
|
+
}
|
|
256
|
+
loadingServerHandler(loading) {
|
|
257
|
+
if (loading) {
|
|
258
|
+
this.loaderEl.show = true;
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
this.loaderEl.show = false;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
// 6.COMPONENT LIFECYCLE EVENTS //
|
|
265
|
+
componentDidRender() {
|
|
266
|
+
if (!this.renderedFirstTime) {
|
|
267
|
+
this.componentDidRenderFirstTime.emit(this._componentLocale.componentName);
|
|
268
|
+
this.renderedFirstTime = true;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
async componentWillLoad() {
|
|
272
|
+
this._componentLocale = await Locale.getComponentStrings(this.el);
|
|
273
|
+
}
|
|
274
|
+
async componentDidLoad() {
|
|
275
|
+
await this.serverSelectedCallbackHandler(this.servers[0].id, false);
|
|
276
|
+
}
|
|
277
|
+
// 11.RENDER() FUNCTION //
|
|
278
|
+
render() {
|
|
279
|
+
return (h(Host, { class: {
|
|
280
|
+
"gx-ide-component": true
|
|
281
|
+
} }, h("div", { class: "gx-ide-main-wrapper" }, h("gx-ide-container", { noContentPadding: true, noAboveFooterPadding: true, noBorderAboveFooter: this.closeProgressBar, part: "servers", containerTitle: this.displayTitle ? this._componentLocale.componentName : null }, h("main", { class: "main" }, h("div", { class: "modules__container" }, h("header", { class: "modules__header" }, h("div", { class: "modules__combo-container" }, h("gxg-label", null, this._componentLocale.modules.selectServer), h("div", { class: "modules__combo" }, h("gxg-combo-box", { disabled: this.loadingServer || !this.actionCompleted, disableFilter: true, onValueChanged: this.serverValueChangedHandler }, this.servers.map(item => (h("gxg-combo-box-item", { value: item.id, onItemSelected: this.serverItemSelectedHandler }, item.name)))), this.showServerCommands ? (h("span", { class: "modules__server-commands" }, h("gxg-button", { type: "secondary-icon-only", icon: "gemini-tools/show-more-horizontal", onClick: this.showModuleMenu }))) : null, h("gxg-button", { type: "secondary-icon-only", icon: "gemini-tools/reset", onClick: this.reloadServer })))), h("div", { class: "modules__main" }, h("div", { class: "modules__main-header" }, h("gxg-form-text", { label: this._componentLocale.modules.searchModules, labelPosition: "above", centerLabel: false, onValueChanged: this.searchModulesFilterHandler, disabled: this.loadingServer || !this.actionCompleted }), h("gxg-buttons-container", { reduced: true, fullWidth: true, class: "modules__browser", onSelectedButtonChanged: this.selectedButtonChangedHandler }, h("gxg-button", { id: "browse", selected: true, disabled: this.loadingServer || !this.actionCompleted }, this._componentLocale.modules.buttonsContainer.browse), h("gxg-button", { id: "installed", disabled: this.loadingServer || !this.actionCompleted }, this._componentLocale.modules.buttonsContainer
|
|
282
|
+
.installed), h("gxg-button", { id: "updates", disabled: this.loadingServer || !this.actionCompleted }, this._componentLocale.modules.buttonsContainer.updates))), h("div", { class: "grid-container", ref: el => (this.serversDetail = el) }, this.renderGridOrEmptyState()))), this.selectedModule ? (h("div", { class: "module-info" }, h("header", { class: "module-info__header" }, h("div", { class: "module-info__title" }, this.renderVersionIcon(), this.renderVersionName()), this.renderInstalledVersion(), this.renderModuleVersions(), this.renderVersionWarningMessage()), h("div", { class: "module-info__properties gxg-scrollbar" }, renderModuleDataProperties(this.selectedModule.selectedVersion.properties)))) : (h("gx-ide-empty-state", { class: "recent-objects__empty-state", stateIcon: "objects/module", stateTitle: this._componentLocale.modulesInformation.emptyState.title, stateDescription: this._componentLocale.modulesInformation.emptyState
|
|
283
|
+
.description }))), h("gxg-top-state-bar", { slot: "footer-above", part: "progress-bar", stateType: this.progressState, noBorder: true, caption: this.selectedModuleAction.message ||
|
|
284
|
+
this._componentLocale.progressBar.defaultCaption, progress: this.progressValue, active: !this.actionCompleted || !this.closeProgressBar, closeType: "not-progress", closedCallback: this.progressBarCloseHandler }))), h("gxg-ide-loader", { loaderTitle: this._componentLocale.servers.loading, ref: el => (this.loaderEl = el), container: this.serversDetail, borderRadius: "0 0 0 8px", abortTime: 60000 })));
|
|
285
|
+
}
|
|
286
|
+
static get is() { return "gx-ide-manage-module-references-v2"; }
|
|
287
|
+
static get encapsulation() { return "shadow"; }
|
|
288
|
+
static get originalStyleUrls() {
|
|
289
|
+
return {
|
|
290
|
+
"$": ["manage-module-references.scss"]
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
static get styleUrls() {
|
|
294
|
+
return {
|
|
295
|
+
"$": ["manage-module-references.css"]
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
static get assetsDirs() { return ["gx-ide-assets/manage-module-references-v2"]; }
|
|
299
|
+
static get properties() {
|
|
300
|
+
return {
|
|
301
|
+
"displayTitle": {
|
|
302
|
+
"type": "boolean",
|
|
303
|
+
"mutable": false,
|
|
304
|
+
"complexType": {
|
|
305
|
+
"original": "false",
|
|
306
|
+
"resolved": "boolean",
|
|
307
|
+
"references": {}
|
|
308
|
+
},
|
|
309
|
+
"required": false,
|
|
310
|
+
"optional": false,
|
|
311
|
+
"docs": {
|
|
312
|
+
"tags": [],
|
|
313
|
+
"text": "If true it displays the component title on the header"
|
|
314
|
+
},
|
|
315
|
+
"attribute": "display-title",
|
|
316
|
+
"reflect": false,
|
|
317
|
+
"defaultValue": "false"
|
|
318
|
+
},
|
|
319
|
+
"servers": {
|
|
320
|
+
"type": "unknown",
|
|
321
|
+
"mutable": false,
|
|
322
|
+
"complexType": {
|
|
323
|
+
"original": "ModuleServerData[]",
|
|
324
|
+
"resolved": "ModuleServerData[]",
|
|
325
|
+
"references": {
|
|
326
|
+
"ModuleServerData": {
|
|
327
|
+
"location": "import",
|
|
328
|
+
"path": "../types",
|
|
329
|
+
"id": "src/components/modules/types.ts::ModuleServerData"
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"required": false,
|
|
334
|
+
"optional": false,
|
|
335
|
+
"docs": {
|
|
336
|
+
"tags": [],
|
|
337
|
+
"text": "List of module servers currently cataloged"
|
|
338
|
+
},
|
|
339
|
+
"defaultValue": "[]"
|
|
340
|
+
},
|
|
341
|
+
"serverSelectedCallback": {
|
|
342
|
+
"type": "unknown",
|
|
343
|
+
"mutable": false,
|
|
344
|
+
"complexType": {
|
|
345
|
+
"original": "ServerSelectedCallback",
|
|
346
|
+
"resolved": "(id: string, reload: boolean) => Promise<ModuleData[]>",
|
|
347
|
+
"references": {
|
|
348
|
+
"ServerSelectedCallback": {
|
|
349
|
+
"location": "local",
|
|
350
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/modules/manage-module-references-v2/manage-module-references-v2.tsx",
|
|
351
|
+
"id": "src/components/modules/manage-module-references-v2/manage-module-references-v2.tsx::ServerSelectedCallback"
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
"required": false,
|
|
356
|
+
"optional": false,
|
|
357
|
+
"docs": {
|
|
358
|
+
"tags": [],
|
|
359
|
+
"text": "Callback invoked when a server is selected. Returns the set of modules available on that server."
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
"executeActionCallback": {
|
|
363
|
+
"type": "unknown",
|
|
364
|
+
"mutable": false,
|
|
365
|
+
"complexType": {
|
|
366
|
+
"original": "ExecuteActionCallback",
|
|
367
|
+
"resolved": "(serverId: string, moduleId: string, moduleVersionId: string, action: ModuleActionType, onProgress: (message: string, progress: number, state: topStateBarType) => void) => Promise<boolean>",
|
|
368
|
+
"references": {
|
|
369
|
+
"ExecuteActionCallback": {
|
|
370
|
+
"location": "local",
|
|
371
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/modules/manage-module-references-v2/manage-module-references-v2.tsx",
|
|
372
|
+
"id": "src/components/modules/manage-module-references-v2/manage-module-references-v2.tsx::ExecuteActionCallback"
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
"required": false,
|
|
377
|
+
"optional": false,
|
|
378
|
+
"docs": {
|
|
379
|
+
"tags": [],
|
|
380
|
+
"text": "Callback invoked when the user wants to execute the action corresponding to a selected module. When the action begins to be executed, the component must be able to show the progress of the action. For this, the onProgress parameter is available, which is in turn a callback used by the host to notify the progress by text message and percentage."
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"serverContextMenuCallback": {
|
|
384
|
+
"type": "unknown",
|
|
385
|
+
"mutable": false,
|
|
386
|
+
"complexType": {
|
|
387
|
+
"original": "ServerContextMenuCallback",
|
|
388
|
+
"resolved": "(contextMenuInfo: ContextMenuInfo) => Promise<void>",
|
|
389
|
+
"references": {
|
|
390
|
+
"ServerContextMenuCallback": {
|
|
391
|
+
"location": "local",
|
|
392
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/modules/manage-module-references-v2/manage-module-references-v2.tsx",
|
|
393
|
+
"id": "src/components/modules/manage-module-references-v2/manage-module-references-v2.tsx::ServerContextMenuCallback"
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
"required": false,
|
|
398
|
+
"optional": false,
|
|
399
|
+
"docs": {
|
|
400
|
+
"tags": [],
|
|
401
|
+
"text": "Callback invoked when an element is right clicked on servers list"
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
"showServerCommands": {
|
|
405
|
+
"type": "boolean",
|
|
406
|
+
"mutable": false,
|
|
407
|
+
"complexType": {
|
|
408
|
+
"original": "boolean",
|
|
409
|
+
"resolved": "boolean",
|
|
410
|
+
"references": {}
|
|
411
|
+
},
|
|
412
|
+
"required": false,
|
|
413
|
+
"optional": false,
|
|
414
|
+
"docs": {
|
|
415
|
+
"tags": [],
|
|
416
|
+
"text": "Allows you to hide the button (...) that executes serverContextMenuCallback, if we do not implement the commands in a first version"
|
|
417
|
+
},
|
|
418
|
+
"attribute": "show-server-commands",
|
|
419
|
+
"reflect": false,
|
|
420
|
+
"defaultValue": "false"
|
|
421
|
+
}
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
static get states() {
|
|
425
|
+
return {
|
|
426
|
+
"searchModulesFilterValue": {},
|
|
427
|
+
"selectedButtonFilter": {},
|
|
428
|
+
"serverModules": {},
|
|
429
|
+
"serverModulesExtended": {},
|
|
430
|
+
"filteredServerModules": {},
|
|
431
|
+
"modulesMap": {},
|
|
432
|
+
"selectedModule": {},
|
|
433
|
+
"selectedServerId": {},
|
|
434
|
+
"selectedModuleAction": {},
|
|
435
|
+
"modulesSelectedVersionMap": {},
|
|
436
|
+
"actionCompleted": {},
|
|
437
|
+
"closeProgressBar": {},
|
|
438
|
+
"progressValue": {},
|
|
439
|
+
"progressState": {},
|
|
440
|
+
"loadingServer": {}
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
static get events() {
|
|
444
|
+
return [{
|
|
445
|
+
"method": "componentDidRenderFirstTime",
|
|
446
|
+
"name": "componentDidRenderFirstTime",
|
|
447
|
+
"bubbles": true,
|
|
448
|
+
"cancelable": true,
|
|
449
|
+
"composed": true,
|
|
450
|
+
"docs": {
|
|
451
|
+
"tags": [],
|
|
452
|
+
"text": "This event is emitted once just after the component is fully loaded and the first render() occurs"
|
|
453
|
+
},
|
|
454
|
+
"complexType": {
|
|
455
|
+
"original": "boolean",
|
|
456
|
+
"resolved": "boolean",
|
|
457
|
+
"references": {}
|
|
458
|
+
}
|
|
459
|
+
}];
|
|
460
|
+
}
|
|
461
|
+
static get elementRef() { return "el"; }
|
|
462
|
+
static get watchers() {
|
|
463
|
+
return [{
|
|
464
|
+
"propName": "loadingServer",
|
|
465
|
+
"methodName": "loadingServerHandler"
|
|
466
|
+
}];
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
//# sourceMappingURL=manage-module-references-v2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manage-module-references-v2.js","sourceRoot":"","sources":["../../../../src/components/modules/manage-module-references-v2/manage-module-references-v2.tsx"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EACL,OAAO,EAEP,KAAK,EACL,KAAK,EACN,MAAM,eAAe,CAAC;AAavB,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAShD,MAAM,OAAO,0BAA0B;;QAO7B,sBAAiB,GAAG,KAAK,CAAC;QAkGlC,iBAAiB;QAEjB,0BAA0B;QAE1B,qBAAqB;QAErB;;WAEG;QACK,eAAU,GAAG,CACnB,OAAe,EACf,QAAgB,EAChB,KAAsB,EAChB,EAAE;YACR,MAAM,IAAI,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;YAC1C,IAAI,CAAC,oBAAoB,qBAAQ,IAAI,CAAE,CAAC;YACxC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC;YACxD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC;QACvD,CAAC,CAAC;QAEF;;WAEG;QACK,uBAAkB,GAAG,CAC3B,KAA+C,EAC/C,EAAE;YACF,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAChD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAC9D,CAAC,CAAC;QAEM,wBAAmB,GAAG,CAAC,MAAkB,EAAE,EAAE,CAAC,GA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CIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Event,\n Element,\n EventEmitter,\n State,\n Watch\n} from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\nimport { Color } from \"@genexus/gemini\";\nimport { topStateBarType } from \"@genexus/gemini\";\nimport { ChGridSelectionChangedEvent } from \"@genexus/chameleon-controls-library\";\n/* CUSTOM IMPORTS */\nimport {\n ModuleServerData,\n ModuleData,\n ModuleActionType,\n ModuleFilterType,\n ExtendedModuleData\n} from \"../types\";\nimport { renderModuleDataProperties } from \"../../../common/common\";\nimport { Locale } from \"../../../common/locale\";\nimport { ContextMenuInfo } from \"../../../common/types\";\n\n@Component({\n tag: \"gx-ide-manage-module-references-v2\",\n styleUrl: \"manage-module-references.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/manage-module-references-v2\"]\n})\nexport class GxManageModuleReferencesV2 {\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: HTMLGxIdeManageModuleReferencesV2Element;\n private loaderEl!: HTMLGxgIdeLoaderElement;\n private serversDetail!: HTMLDivElement;\n\n // 3.STATE() VARIABLES //\n\n // Filtering modules\n @State() searchModulesFilterValue: string = \"\";\n @State() selectedButtonFilter: ModuleFilterType = \"browse\";\n @State() serverModules: ModuleData[] = [];\n @State() serverModulesExtended: ExtendedModuleData[] = [];\n @State() filteredServerModules: ExtendedModuleData[] = [];\n @State() modulesMap: Map<string, ExtendedModuleData> = new Map();\n\n @State() selectedModule: ExtendedModuleData;\n @State() selectedServerId: string;\n @State() selectedModuleAction: ActionInfo = {\n message: \"\",\n progress: 0,\n state: \"in-progress\"\n };\n @State() modulesSelectedVersionMap: Map<string, string> = new Map();\n @State() actionCompleted = true;\n @State() closeProgressBar = true;\n @State() progressValue: number = 0;\n @State() progressState: topStateBarType = \"in-progress\";\n @State() loadingServer = false;\n @Watch(\"loadingServer\")\n loadingServerHandler(loading: boolean) {\n if (loading) {\n this.loaderEl.show = true;\n } else {\n this.loaderEl.show = false;\n }\n }\n\n // 4.PUBLIC PROPERTY API //\n\n /**\n * If true it displays the component title on the header\n */\n @Prop() readonly displayTitle = false;\n\n /**\n * List of module servers currently cataloged\n */\n @Prop() readonly servers: ModuleServerData[] = [];\n\n /**\n * Callback invoked when a server is selected. Returns the set of modules available on that server.\n */\n @Prop() readonly serverSelectedCallback: ServerSelectedCallback;\n\n /**\n * Callback invoked when the user wants to execute the action corresponding to a selected module. When the action begins to be executed, the component must be able to show the progress of the action. For this, the onProgress parameter is available, which is in turn a callback used by the host to notify the progress by text message and percentage.\n */\n @Prop() readonly executeActionCallback: ExecuteActionCallback;\n\n /**\n * Callback invoked when an element is right clicked on servers list\n */\n @Prop() readonly serverContextMenuCallback: ServerContextMenuCallback;\n\n /**\n * Allows you to hide the button (...) that executes serverContextMenuCallback, if we do not implement the commands in a first version\n */\n @Prop() readonly showServerCommands: boolean = false;\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 componentDidRender() {\n if (!this.renderedFirstTime) {\n this.componentDidRenderFirstTime.emit(\n this._componentLocale.componentName\n );\n this.renderedFirstTime = true;\n }\n }\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n async componentDidLoad() {\n await this.serverSelectedCallbackHandler(this.servers[0].id, false);\n }\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n /**\n * Callback invoked to get the progress when module is performing an action\n */\n private onProgress = (\n message: string,\n progress: number,\n state: topStateBarType\n ): void => {\n const data = { message, progress, state };\n this.selectedModuleAction = { ...data };\n this.progressValue = this.selectedModuleAction.progress;\n this.progressState = this.selectedModuleAction.state;\n };\n\n /**\n * Used for changing the selected module\n */\n private handleModuleChange = (\n event: CustomEvent<ChGridSelectionChangedEvent>\n ) => {\n const selectedModuleId = event.detail.rowsId[0];\n this.selectedModule = this.modulesMap.get(selectedModuleId);\n };\n\n private moduleActionHandler = (module: ModuleData) => () => {\n this.actionCompleted = false;\n this.closeProgressBar = false;\n this.executeActionCallbackHandler(module);\n };\n\n /**\n * Perform an action relative to a module using callbackExecuteAction callback and receive the state of that action with onProgress callback\n */\n private executeActionCallbackHandler = async (module: ModuleData) => {\n if (this.executeActionCallback) {\n this.actionCompleted = false;\n const moduleSelectedVersionId = this.modulesMap.get(module.id)\n .selectedVersion.id;\n const moduleSelectedVersionAction = this.modulesMap.get(module.id)\n .selectedVersion.action;\n const actionCompleted = await this.executeActionCallback(\n this.selectedServerId,\n module.id,\n moduleSelectedVersionId,\n moduleSelectedVersionAction,\n this.onProgress\n );\n if (actionCompleted) {\n this.serverSelectedCallbackHandler(this.selectedServerId, false);\n }\n this.actionCompleted = true;\n }\n };\n\n private showModuleMenu = async (e: MouseEvent) => {\n if (this.serverContextMenuCallback) {\n const buttonBoundingClientRect = (\n e.target as HTMLElement\n ).getBoundingClientRect();\n await this.serverContextMenuCallback({\n selection: [this.selectedServerId],\n clientX: buttonBoundingClientRect.x,\n clientY: buttonBoundingClientRect.y\n });\n }\n };\n\n private searchModulesFilterHandler = (e: CustomEvent<string>) => {\n this.searchModulesFilterValue = e.detail.trim().toLowerCase();\n };\n\n private getFilteredServerModules = (): ExtendedModuleData[] => {\n return this.serverModulesExtended.filter(module => {\n // Filter conditions\n const nameMatch = module.selectedVersion.name\n .toLowerCase()\n .includes(this.searchModulesFilterValue);\n const descriptionMatch = module.selectedVersion.description\n .toLowerCase()\n .includes(this.searchModulesFilterValue);\n let actionMatch;\n if (this.selectedButtonFilter === \"browse\") {\n // If browse is selected, display all\n actionMatch = true;\n } else if (this.selectedButtonFilter === \"installed\") {\n actionMatch = !!(\n module.selectedVersion.action === \"update\" ||\n module.selectedVersion.action === \"restore\"\n );\n } else if (this.selectedButtonFilter === \"updates\") {\n actionMatch = !!(module.selectedVersion.action === \"update\");\n }\n\n const filtered = (nameMatch || descriptionMatch) && actionMatch;\n return filtered;\n });\n };\n\n // 9.LOCAL METHODS > RENDERS //\n private renderGridOrEmptyState = () => {\n this.filteredServerModules = this.getFilteredServerModules();\n if (this.filteredServerModules.length > 0) {\n return this.renderModulesVersionsGrid();\n } else {\n return this.renderEmptyStateModules();\n }\n };\n\n private renderModulesVersionsGrid = (): HTMLGxgGridElement => {\n return (\n <gxg-grid noBorder fullHeight>\n <ch-grid\n rowSelectionMode=\"single\"\n part=\"ch-grid-pending-commits\"\n class=\"servers-detail no-border\"\n onSelectionChanged={this.handleModuleChange}\n >\n <ch-grid-columnset>\n <ch-grid-column settingable={false}></ch-grid-column>\n <ch-grid-column\n settingable={false}\n size=\"min-content\"\n ></ch-grid-column>\n </ch-grid-columnset>\n\n {this.filteredServerModules.map((module: ExtendedModuleData) => (\n <ch-grid-row\n rowid={module.id}\n key={module.id}\n selected={\n this.selectedModule && this.selectedModule.id === module.id\n }\n >\n <ch-grid-cell class=\"grid-cell-module__info\">\n <span class=\"grid-cell-module__name\">\n <gxg-icon\n type=\"objects/module\"\n data-action={module.selectedVersion.action}\n color={this.moduleVersionIconColor(module.id)}\n size=\"small\"\n ></gxg-icon>\n {module.selectedVersion.name}\n </span>\n <span class=\"grid-cell-module__description\">\n {module.selectedVersion.description}\n </span>\n </ch-grid-cell>\n\n <ch-grid-cell>\n {this.selectedModule && this.selectedModule.id === module.id ? (\n <gxg-button\n disabled={\n !this.actionCompleted ||\n module.selectedVersion.action === \"incompatible\" ||\n module.selectedVersion.action === \"not-installable\"\n }\n fit\n part=\"module-action\"\n onClick={this.moduleActionHandler(module)}\n >\n {module.selectedVersion.action}\n </gxg-button>\n ) : null}\n </ch-grid-cell>\n </ch-grid-row>\n ))}\n </ch-grid>\n </gxg-grid>\n );\n };\n\n private renderEmptyStateModules = () => {\n return (\n <gx-ide-empty-state\n stateIcon=\"mercury/filters\"\n stateTitle={this._componentLocale.modules.noModulesFilter}\n ></gx-ide-empty-state>\n );\n };\n\n private moduleVersionIconColor = (moduleId: string): Color => {\n const foundModule = this.serverModulesExtended.find(module => {\n return module.id === moduleId;\n });\n if (foundModule) {\n const moduleAction = foundModule.selectedVersion.action;\n const moduleCurrentVersion = foundModule.currentVersion;\n if (\n moduleAction === \"not-installable\" ||\n moduleAction === \"incompatible\"\n ) {\n return \"warning\";\n } else if (!moduleCurrentVersion) {\n return \"mercury-primary-disabled\";\n } else {\n return \"mercury-primary\";\n }\n }\n\n return \"mercury-primary\";\n };\n\n private renderVersionIcon = () => {\n return (\n <gxg-icon\n type=\"objects/module\"\n color={this.moduleVersionIconColor(this.selectedModule.id)}\n ></gxg-icon>\n );\n };\n\n /* module details/information renders*/\n private renderVersionName = () => {\n return (\n <gxg-title part=\"module-info__name\" type=\"title-05\">\n <div class=\"module-info__name\">\n {this.selectedModule.selectedVersion.name}\n </div>\n </gxg-title>\n );\n };\n\n private renderVersionWarningMessage = () => {\n const warningMessage = this.selectedModule.selectedVersion.warningMessage;\n if (warningMessage) {\n return <p class=\"module-info__warning-message\">{warningMessage}</p>;\n }\n };\n\n private renderInstalledVersion = () => {\n const currentVersion = this.selectedModule.currentVersion;\n let caption;\n let cssClass = \"module-info__action-container\";\n if (currentVersion) {\n caption = `${this._componentLocale.modulesInformation.moduleProperties.installed}: ${currentVersion}`;\n cssClass += ` module-info__action-container--installed`;\n } else {\n caption =\n this._componentLocale.modulesInformation.moduleProperties.notInstalled;\n }\n return (\n <div class={cssClass}>\n <gxg-text part=\"module-info__action\">{caption}</gxg-text>\n </div>\n );\n };\n\n // Update selected version\n private moduleVersionsValueChangedHandler = (e: CustomEvent<any>) => {\n const selectedVersionId = e.detail.value;\n this.updateSelectedModuleVersion(selectedVersionId);\n };\n private moduleVersionsItemChangedHandler = (e: CustomEvent<any>) => {\n const selectedVersionId = e.detail.value;\n this.updateSelectedModuleVersion(selectedVersionId);\n };\n private updateSelectedModuleVersion = (selectedVersionId: string) => {\n const moduleSelectedVersion = this.selectedModule.versions.find(version => {\n return version.id === selectedVersionId;\n });\n if (moduleSelectedVersion) {\n const updatedSelectedModule = {\n ...this.selectedModule,\n selectedVersion: moduleSelectedVersion\n };\n this.selectedModule = updatedSelectedModule;\n\n // update module selected in modules array as well\n const updatedModuleIndex = this.serverModulesExtended.findIndex(\n module => module.id === updatedSelectedModule.id\n );\n if (updatedModuleIndex !== -1) {\n // Update the object with new information\n this.serverModulesExtended[updatedModuleIndex] = {\n ...this.serverModulesExtended[updatedModuleIndex],\n ...updatedSelectedModule\n };\n }\n }\n };\n\n private renderModuleVersions = () => {\n return (\n <div part=\"available-versions\">\n <gxg-combo-box\n id=\"versions-combo-box\"\n disable-filter\n value=\"\"\n part=\"module-versions\"\n display-validation-styles\n display-validation-message\n label={\n this._componentLocale.modulesInformation.moduleProperties\n .availableVersions\n }\n labelPosition=\"start\"\n centerLabel\n onValueChanged={this.moduleVersionsValueChangedHandler}\n disabled={this.loadingServer || !this.actionCompleted}\n >\n {this.selectedModule.versions.map(item => (\n <gxg-combo-box-item\n value={item.id}\n onItemSelected={this.moduleVersionsItemChangedHandler}\n >\n {item.id}\n </gxg-combo-box-item>\n ))}\n </gxg-combo-box>\n </div>\n );\n };\n\n private selectedButtonChangedHandler = (e: CustomEvent<string>) => {\n this.selectedButtonFilter = e.detail as ModuleFilterType;\n };\n\n // Update server selected\n private serverItemSelectedHandler = (\n e: CustomEvent<{\n el: HTMLGxgComboBoxItemElement;\n index: number;\n value: any;\n icon?: string;\n }>\n ) => {\n const serverId = e.detail.value;\n this.serverSelectedCallbackHandler(serverId, false);\n };\n private serverValueChangedHandler = (e: CustomEvent<any>) => {\n const serverId = e.detail;\n this.serverSelectedCallbackHandler(serverId, false);\n };\n\n private reloadServer = () => {\n this.serverSelectedCallbackHandler(this.selectedServerId, true);\n };\n /**\n * Change the server selected value in response to callbackServerSelected callback\n */\n private serverSelectedCallbackHandler = async (\n serverId: any,\n reload: boolean\n ) => {\n if (this.serverSelectedCallback) {\n this.loadingServer = true;\n\n // clear\n this.serverModules = [];\n this.serverModulesExtended = [];\n this.filteredServerModules = [];\n this.modulesMap.clear();\n this.modulesSelectedVersionMap.clear();\n\n this.serverModules = await this.serverSelectedCallback(serverId, reload);\n // Save modules on Map as well to get information about modules faster\n this.serverModules.forEach(module => {\n const extendedModuleData = {\n ...module,\n selectedVersion: module.versions[0]\n };\n // When the server retrieves the modules, the selected module is by default the first one.\n this.serverModulesExtended.push(extendedModuleData);\n // Save modules on a map as well, for faster retrieval.\n this.modulesMap.set(module.id, extendedModuleData);\n });\n this.selectedServerId = serverId;\n this.loadingServer = false;\n }\n };\n\n private progressBarCloseHandler = () => {\n setTimeout(() => {\n this.actionCompleted = true;\n this.closeProgressBar = true;\n // reset\n this.progressValue = 0;\n this.progressState = \"in-progress\";\n }, 400);\n // delay to force the footer line disappear after the top-state-bar has been closed.\n };\n\n // 11.RENDER() FUNCTION //\n\n render(): void {\n return (\n <Host\n class={{\n \"gx-ide-component\": true\n }}\n >\n <div class=\"gx-ide-main-wrapper\">\n <gx-ide-container\n noContentPadding\n noAboveFooterPadding\n noBorderAboveFooter={this.closeProgressBar}\n part=\"servers\"\n containerTitle={\n this.displayTitle ? this._componentLocale.componentName : null\n }\n >\n {/* Servers*/}\n <main class=\"main\">\n <div class=\"modules__container\">\n <header class=\"modules__header\">\n <div class=\"modules__combo-container\">\n <gxg-label>\n {this._componentLocale.modules.selectServer}\n </gxg-label>\n <div class=\"modules__combo\">\n <gxg-combo-box\n disabled={this.loadingServer || !this.actionCompleted}\n disableFilter\n onValueChanged={this.serverValueChangedHandler}\n >\n {this.servers.map(item => (\n <gxg-combo-box-item\n value={item.id}\n onItemSelected={this.serverItemSelectedHandler}\n >\n {item.name}\n </gxg-combo-box-item>\n ))}\n </gxg-combo-box>\n {this.showServerCommands ? (\n <span class=\"modules__server-commands\">\n <gxg-button\n type=\"secondary-icon-only\"\n icon=\"gemini-tools/show-more-horizontal\"\n onClick={this.showModuleMenu}\n ></gxg-button>\n </span>\n ) : null}\n <gxg-button\n type=\"secondary-icon-only\"\n icon=\"gemini-tools/reset\"\n onClick={this.reloadServer}\n ></gxg-button>\n </div>\n </div>\n </header>\n\n <div class=\"modules__main\">\n <div class=\"modules__main-header\">\n <gxg-form-text\n label={this._componentLocale.modules.searchModules}\n labelPosition=\"above\"\n centerLabel={false}\n onValueChanged={this.searchModulesFilterHandler}\n disabled={this.loadingServer || !this.actionCompleted}\n ></gxg-form-text>\n <gxg-buttons-container\n reduced\n fullWidth\n class=\"modules__browser\"\n onSelectedButtonChanged={\n this.selectedButtonChangedHandler\n }\n >\n <gxg-button\n id=\"browse\"\n selected\n disabled={this.loadingServer || !this.actionCompleted}\n >\n {this._componentLocale.modules.buttonsContainer.browse}\n </gxg-button>\n <gxg-button\n id=\"installed\"\n disabled={this.loadingServer || !this.actionCompleted}\n >\n {\n this._componentLocale.modules.buttonsContainer\n .installed\n }\n </gxg-button>\n <gxg-button\n id=\"updates\"\n disabled={this.loadingServer || !this.actionCompleted}\n >\n {this._componentLocale.modules.buttonsContainer.updates}\n </gxg-button>\n </gxg-buttons-container>\n </div>\n {/* modules grid*/}\n <div\n class=\"grid-container\"\n ref={el => (this.serversDetail = el as HTMLDivElement)}\n >\n {this.renderGridOrEmptyState()}\n </div>\n </div>\n </div>\n\n {/* Module version information*/}\n {this.selectedModule ? (\n <div class=\"module-info\">\n <header class=\"module-info__header\">\n <div class=\"module-info__title\">\n {this.renderVersionIcon()}\n {this.renderVersionName()}\n </div>\n {this.renderInstalledVersion()}\n {this.renderModuleVersions()}\n {this.renderVersionWarningMessage()}\n </header>\n <div class=\"module-info__properties gxg-scrollbar\">\n {renderModuleDataProperties(\n this.selectedModule.selectedVersion.properties\n )}\n </div>\n </div>\n ) : (\n <gx-ide-empty-state\n class=\"recent-objects__empty-state\"\n stateIcon=\"objects/module\"\n stateTitle={\n this._componentLocale.modulesInformation.emptyState.title\n }\n stateDescription={\n this._componentLocale.modulesInformation.emptyState\n .description\n }\n ></gx-ide-empty-state>\n )}\n </main>\n {/* Top State Bar*/}\n <gxg-top-state-bar\n slot=\"footer-above\"\n part=\"progress-bar\"\n stateType={this.progressState}\n noBorder\n caption={\n this.selectedModuleAction.message ||\n this._componentLocale.progressBar.defaultCaption\n }\n progress={this.progressValue}\n active={!this.actionCompleted || !this.closeProgressBar}\n closeType=\"not-progress\"\n closedCallback={this.progressBarCloseHandler}\n ></gxg-top-state-bar>\n </gx-ide-container>\n </div>\n <gxg-ide-loader\n loaderTitle={this._componentLocale.servers.loading}\n ref={el => (this.loaderEl = el as HTMLGxgIdeLoaderElement)}\n container={this.serversDetail}\n borderRadius=\"0 0 0 8px\"\n abortTime={60000}\n ></gxg-ide-loader>\n </Host>\n );\n }\n}\n\nexport type ExecuteActionCallback = (\n serverId: string,\n moduleId: string,\n moduleVersionId: string,\n action: ModuleActionType,\n onProgress: (\n message: string,\n progress: number,\n state: topStateBarType\n ) => void\n) => Promise<boolean>;\n\nexport type ServerSelectedCallback = (\n id: string,\n reload: boolean\n) => Promise<ModuleData[]>;\n\nexport type ServerContextMenuCallback = (\n contextMenuInfo: ContextMenuInfo\n) => Promise<void>;\nexport interface ActionInfo {\n message: string;\n progress: number;\n state: topStateBarType;\n}\n"]}
|