@genexus/genexus-ide-ui 0.0.31 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +19 -6
- package/dist/cjs/gx-ide-team-dev-update-partial-selection.cjs.entry.js +17 -32
- package/dist/cjs/gx-ide-team-dev-update-to-revision.cjs.entry.js +16 -1
- package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js +33 -31
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/team-dev-commit/team-dev-commit.js +31 -23
- package/dist/collection/components/team-dev-update/team-dev-update.js +75 -35
- package/dist/collection/components/team-dev-update-partial-selection/gx-ide-assets/team-dev-update-partial-selection/langs/team-dev-update-partial-selection.lang.en.json +4 -2
- package/dist/collection/components/team-dev-update-partial-selection/team-dev-update-partial-selection.css +1 -0
- package/dist/collection/components/team-dev-update-partial-selection/team-dev-update-partial-selection.js +22 -46
- package/dist/collection/components/team-dev-update-to-revision/gx-ide-assets/team-dev-update-to-revision/langs/team-dev-update-to-revision.lang.en.json +1 -1
- package/dist/collection/components/team-dev-update-to-revision/team-dev-update-to-revision.js +33 -1
- package/dist/components/gx-ide-team-dev-commit.js +21 -7
- package/dist/components/gx-ide-team-dev-update-partial-selection.js +18 -33
- package/dist/components/gx-ide-team-dev-update-to-revision.js +17 -1
- package/dist/components/gx-ide-team-dev-update.js +36 -32
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-team-dev-commit.entry.js +19 -6
- package/dist/esm/gx-ide-team-dev-update-partial-selection.entry.js +17 -32
- package/dist/esm/gx-ide-team-dev-update-to-revision.entry.js +16 -1
- package/dist/esm/gx-ide-team-dev-update.entry.js +33 -31
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/team-dev-update-partial-selection/langs/team-dev-update-partial-selection.lang.en.json +4 -2
- package/dist/genexus-ide-ui/gx-ide-assets/team-dev-update-to-revision/langs/team-dev-update-to-revision.lang.en.json +1 -1
- package/dist/genexus-ide-ui/p-1b6b11e1.entry.js +1 -0
- package/dist/genexus-ide-ui/p-8592f072.entry.js +1 -0
- package/dist/genexus-ide-ui/p-bc2d4253.entry.js +1 -0
- package/dist/genexus-ide-ui/p-f794dc13.entry.js +1 -0
- package/dist/types/common/types.d.ts +9 -0
- package/dist/types/components/team-dev-commit/team-dev-commit.d.ts +12 -17
- package/dist/types/components/team-dev-update/team-dev-update.d.ts +16 -13
- package/dist/types/components/team-dev-update-partial-selection/team-dev-update-partial-selection.d.ts +11 -14
- package/dist/types/components/team-dev-update-to-revision/team-dev-update-to-revision.d.ts +8 -0
- package/dist/types/components.d.ts +39 -19
- package/package.json +1 -1
- package/dist/genexus-ide-ui/p-32b8abf6.entry.js +0 -1
- package/dist/genexus-ide-ui/p-53d36ef7.entry.js +0 -1
- package/dist/genexus-ide-ui/p-6e80380b.entry.js +0 -1
- package/dist/genexus-ide-ui/p-b54f448c.entry.js +0 -1
|
@@ -10,6 +10,16 @@ const GxIdeTeamDevCommit = class {
|
|
|
10
10
|
this.componentDidLoadEvent = createEvent(this, "componentDidLoadEvent", 7);
|
|
11
11
|
this.loadDataCalledFirstTime = false; // pending commits grid checkboxes, should be checked, after loadData has loaded commits for the first time.
|
|
12
12
|
// 9.LOCAL METHODS //
|
|
13
|
+
this.conditionToCommit = async () => {
|
|
14
|
+
const commitComment = !!this.commitCommentEl.value.length;
|
|
15
|
+
const pendingChecked = await this.chGridPendingCommitsEl.getMarkedRows();
|
|
16
|
+
if (commitComment && pendingChecked.length > 0) {
|
|
17
|
+
this.commitButtonEnabled = true;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
this.commitButtonEnabled = false;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
13
23
|
this.markAllPendingCommitsRows = () => {
|
|
14
24
|
this.chGridPendingCommitsEl.markAllRows();
|
|
15
25
|
};
|
|
@@ -66,7 +76,7 @@ const GxIdeTeamDevCommit = class {
|
|
|
66
76
|
if (this.chGridPendingCommitsEl) {
|
|
67
77
|
const addedRowsIds = e.detail.addedRowsId;
|
|
68
78
|
const removedRowsId = e.detail.removedRowsId;
|
|
69
|
-
const pendingItemCheckedResult = await this.
|
|
79
|
+
const pendingItemCheckedResult = await this.pendingItemsCheckedCallback({
|
|
70
80
|
itemsChecked: addedRowsIds,
|
|
71
81
|
itemsUnchecked: removedRowsId
|
|
72
82
|
});
|
|
@@ -77,6 +87,7 @@ const GxIdeTeamDevCommit = class {
|
|
|
77
87
|
else {
|
|
78
88
|
await this.togglePendingCommitsCheckboxes(pendingItemCheckedResult);
|
|
79
89
|
}
|
|
90
|
+
this.conditionToCommit();
|
|
80
91
|
this.chGridPendingCommitsEl.addEventListener("rowMarkingChanged", this.pendingCommitsRowMarkingChangedHandler);
|
|
81
92
|
}
|
|
82
93
|
};
|
|
@@ -120,11 +131,11 @@ const GxIdeTeamDevCommit = class {
|
|
|
120
131
|
}
|
|
121
132
|
};
|
|
122
133
|
this.commitCallbackHandler = async () => {
|
|
123
|
-
const
|
|
134
|
+
const commitCommentEl = this.commitCommentEl.value;
|
|
124
135
|
this.chGridPendingCommitsEl
|
|
125
136
|
.getMarkedRows()
|
|
126
137
|
.then(async (pendingCommitsCheckedIds) => {
|
|
127
|
-
await this.commitCallback(pendingCommitsCheckedIds,
|
|
138
|
+
await this.commitCallback(pendingCommitsCheckedIds, commitCommentEl);
|
|
128
139
|
/* returns boolean*/
|
|
129
140
|
});
|
|
130
141
|
};
|
|
@@ -150,6 +161,7 @@ const GxIdeTeamDevCommit = class {
|
|
|
150
161
|
this.comment = "";
|
|
151
162
|
this.pendingCommits = [];
|
|
152
163
|
this.ignoredObjects = [];
|
|
164
|
+
this.commitButtonEnabled = false;
|
|
153
165
|
this.changeSet = undefined;
|
|
154
166
|
this.types = undefined;
|
|
155
167
|
this.folders = undefined;
|
|
@@ -158,7 +170,7 @@ const GxIdeTeamDevCommit = class {
|
|
|
158
170
|
this.loadCallback = undefined;
|
|
159
171
|
this.commitCallback = undefined;
|
|
160
172
|
this.selectCallback = undefined;
|
|
161
|
-
this.
|
|
173
|
+
this.pendingItemsCheckedCallback = undefined;
|
|
162
174
|
this.objectsContextMenuCallback = undefined;
|
|
163
175
|
}
|
|
164
176
|
// 6.COMPONENT LIFECYCLE METHODS //
|
|
@@ -169,6 +181,7 @@ const GxIdeTeamDevCommit = class {
|
|
|
169
181
|
await this.loadData();
|
|
170
182
|
this.loadDataCalledFirstTime = true;
|
|
171
183
|
this.componentDidLoadEvent.emit(true);
|
|
184
|
+
this.conditionToCommit();
|
|
172
185
|
}
|
|
173
186
|
async componentDidRender() {
|
|
174
187
|
if (this.loadDataCalledFirstTime) {
|
|
@@ -189,8 +202,8 @@ const GxIdeTeamDevCommit = class {
|
|
|
189
202
|
}
|
|
190
203
|
// 10.RENDER() FUNCTION //
|
|
191
204
|
render() {
|
|
192
|
-
return (h(Host, { class: "gx-ide-component" }, h("div", { class: "gx-ide-main-wrapper gx-ide-overflow" }, h("gxg-container", null, h("header", { class: "header grid" }, h("gxg-form-textarea", { id: "gxg-textarea", height: "100px", label: this._componentLocale.topMenu.commentLabel, value: this.comment, ref: (el) => (this.
|
|
193
|
-
(this.filtersHidden ? "hidden" : null) }, h("div", { class: "first-row grid" }, h("gxg-combo-box", { labelPosition: "start", label: this._componentLocale.filtersMenu.changesetLabel, value: this.changeSet[0]["id"], ref: (el) => (this.changeSetEl = el), part: "change-set", "display-validation-styles": true, "display-validation-message": true, onValueChanged: this.loadData }, renderComboItems(this.changeSet)), h("gxg-combo-box", { labelPosition: "start", label: this._componentLocale.filtersMenu.typeLabel, value: this.types[0]["id"], ref: (el) => (this.typesEl = el), part: "type", onValueChanged: this.loadData }, renderComboItems(this.types))), h("div", { class: "second-row grid" }, h("gxg-combo-box", { labelPosition: "start", label: this._componentLocale.filtersMenu.folderLabel, value: this.folders[0]["id"], ref: (el) => (this.foldersEl = el), part: "folder", "display-validation-styles": true, "display-validation-message": true, onValueChanged: this.loadData }, renderComboItems(this.folders)), h("gxg-combo-box", { labelPosition: "start", label: this._componentLocale.filtersMenu.categoryLabel, value: this.categories[0]["id"], ref: (el) => (this.categoriesEl = el), part: "categories", onValueChanged: this.loadData }, renderComboItems(this.categories)))))), h("gxg-container", null, h("gxg-tabs", { height: "100%", position: "top", class: "gxg-tabs" }, h("gxg-tab-bar", { slot: "tab-bar-container" }, h("gxg-tab-button", { slot: "tab-bar", "tab-label": `${this._componentLocale.tabs.pendingCommits} (${this.pendingCommits.length})`, tab: "pending-commits", "is-selected": true }), h("gxg-tab-button", { slot: "tab-bar", "tab-label": `${this._componentLocale.tabs.ignoredObjects} (${this.ignoredObjects.length})`, tab: "ignored-objects" })), h("gxg-tab", { tab: "pending-commits", "no-padding": true }, this.renderPendingCommitsGrid()), h("gxg-tab", { tab: "ignored-objects", "no-padding": true }, this.renderIgnoredObjectsGrid())), h("gxg-button", { slot: "footer", type: "primary-text-only", onClick: this.commitCallbackHandler, part: "commit-button" }, this._componentLocale.footer.commitButton))))));
|
|
205
|
+
return (h(Host, { class: "gx-ide-component" }, h("div", { class: "gx-ide-main-wrapper gx-ide-overflow" }, h("gxg-container", null, h("header", { class: "header grid" }, h("gxg-form-textarea", { id: "gxg-textarea", height: "100px", label: this._componentLocale.topMenu.commentLabel, value: this.comment, ref: (el) => (this.commitCommentEl = el), onInput: this.conditionToCommit, placeholder: this._componentLocale.topMenu.commentPlaceholder, part: "comment" }), h("gxg-button", { class: "header-button", type: "outlined", part: "location", onClick: this.getRecentCommentHandler }, this._componentLocale.topMenu.recentCommentsButton))), h("main", { class: "main" }, h("gxg-container", { fieldset: true, noContentPadding: !!this.filtersHidden }, h("div", { class: "grid second-grid" }, h("div", { class: "actions-row grid" }, h("gxg-form-text", { class: this.filtersHidden ? "hidden" : null, "disable-filter": true, label: this._componentLocale.filtersMenu.patternLabel, labelPosition: "start", value: "", ref: (el) => (this.patternEl = el), "display-validation-styles": true, "display-validation-message": true, part: "pattern", onInput: this.loadData }), h("div", { class: "action-buttons", slot: "tab-bar" }, h("gxg-button", { onClick: this.toggleFiltersHandler, type: "secondary-icon-only", icon: "patterns/filters", part: "gxg-button gxg-button--show-filter" }), h("gxg-button", { type: "secondary-icon-only", icon: "gemini-tools/reset", onClick: this.loadData, part: "gxg-button gxg-button--reload" }))), h("div", { class: "filters-grid grid " +
|
|
206
|
+
(this.filtersHidden ? "hidden" : null) }, h("div", { class: "first-row grid" }, h("gxg-combo-box", { labelPosition: "start", label: this._componentLocale.filtersMenu.changesetLabel, value: this.changeSet[0]["id"], ref: (el) => (this.changeSetEl = el), part: "change-set", "display-validation-styles": true, "display-validation-message": true, onValueChanged: this.loadData }, renderComboItems(this.changeSet)), h("gxg-combo-box", { labelPosition: "start", label: this._componentLocale.filtersMenu.typeLabel, value: this.types[0]["id"], ref: (el) => (this.typesEl = el), part: "type", onValueChanged: this.loadData }, renderComboItems(this.types))), h("div", { class: "second-row grid" }, h("gxg-combo-box", { labelPosition: "start", label: this._componentLocale.filtersMenu.folderLabel, value: this.folders[0]["id"], ref: (el) => (this.foldersEl = el), part: "folder", "display-validation-styles": true, "display-validation-message": true, onValueChanged: this.loadData }, renderComboItems(this.folders)), h("gxg-combo-box", { labelPosition: "start", label: this._componentLocale.filtersMenu.categoryLabel, value: this.categories[0]["id"], ref: (el) => (this.categoriesEl = el), part: "categories", onValueChanged: this.loadData }, renderComboItems(this.categories)))))), h("gxg-container", null, h("gxg-tabs", { height: "100%", position: "top", class: "gxg-tabs" }, h("gxg-tab-bar", { slot: "tab-bar-container" }, h("gxg-tab-button", { slot: "tab-bar", "tab-label": `${this._componentLocale.tabs.pendingCommits} (${this.pendingCommits.length})`, tab: "pending-commits", "is-selected": true }), h("gxg-tab-button", { slot: "tab-bar", "tab-label": `${this._componentLocale.tabs.ignoredObjects} (${this.ignoredObjects.length})`, tab: "ignored-objects" })), h("gxg-tab", { tab: "pending-commits", "no-padding": true }, this.renderPendingCommitsGrid()), h("gxg-tab", { tab: "ignored-objects", "no-padding": true }, this.renderIgnoredObjectsGrid())), h("gxg-button", { slot: "footer", type: "primary-text-only", onClick: this.commitCallbackHandler, part: "commit-button", disabled: !this.commitButtonEnabled }, this._componentLocale.footer.commitButton))))));
|
|
194
207
|
}
|
|
195
208
|
static get assetsDirs() { return ["gx-ide-assets/team-dev-commit"]; }
|
|
196
209
|
get el() { return getElement(this); }
|
|
@@ -1,48 +1,43 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-0da01575.js';
|
|
2
2
|
import { L as Locale } from './locale-e183487a.js';
|
|
3
3
|
|
|
4
|
-
const teamDevUpdatePartialSelectionCss = ".gxi-hidden{display:none !important}.gxi-full-height{height:100%}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items: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}:host(.gx-ide-component){box-shadow:var(--box-shadow-01) !important;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(--font-weight-regular);font-size:var(--font-size-lg);line-height:1.6em;height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:6px;height:6px}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-main .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:6px;height:6px}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-overflow .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}:host{display:block;border:1px solid var(--gxg-border-color--regular);background-color:var(--color-background)}:host(.gxi-object-selector--shadow){border:none;box-shadow:var(--box-shadow-01)}.top-actions{display:flex;align-items:center;justify-content:flex-end}.actions{grid-template-columns:repeat(2, 1fr)}.actions>*{display:flex;flex-direction:row;gap:var(--gx-ide-grid-row-gap)}.actions>*:nth-child(2){justify-content:flex-end}";
|
|
4
|
+
const teamDevUpdatePartialSelectionCss = ".gxi-hidden{display:none !important}.gxi-full-height{height:100%}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items: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}:host(.gx-ide-component){box-shadow:var(--box-shadow-01) !important;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(--font-weight-regular);font-size:var(--font-size-lg);line-height:1.6em;height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:6px;height:6px}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-main .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:6px;height:6px}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-overflow .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}:host{display:block;border:1px solid var(--gxg-border-color--regular);background-color:var(--color-background)}:host(.gxi-object-selector--shadow){border:none;box-shadow:var(--box-shadow-01)}.top-actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--gx-ide-grid-row-gap)}.actions{grid-template-columns:repeat(2, 1fr)}.actions>*{display:flex;flex-direction:row;gap:var(--gx-ide-grid-row-gap)}.actions>*:nth-child(2){justify-content:flex-end}";
|
|
5
5
|
|
|
6
6
|
const GxIdeTeamDevUpdatePartialSelection = class {
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.componentDidLoadEvent = createEvent(this, "componentDidLoadEvent", 7);
|
|
10
10
|
// 9.LOCAL METHODS //
|
|
11
|
-
this.handleKeyDownEvent = (add) => {
|
|
12
|
-
if (add) {
|
|
13
|
-
document.addEventListener("keydown", this.keyDownEventHandler);
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
document.removeEventListener("keydown", this.keyDownEventHandler);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
this.keyDownEventHandler = (e) => {
|
|
20
|
-
console.log(e.detail);
|
|
21
|
-
};
|
|
22
11
|
this.renderObjects = () => {
|
|
23
|
-
return (h("gxg-grid", null, h("ch-grid", { "row-selection-mode": "multiple", ref: (el) => (this.chGridEl = el), part: "ch-grid-objects" }, h("ch-grid-columnset", null, h("ch-grid-column", { columnName: "", settingable: false, sortable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.name, settingable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.type, settingable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.description, settingable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.modifiedOn, settingable: false })), this.selection.map((obj) => (h("ch-grid-row", { rowid: obj.id }, h("ch-grid-cell", null, h("gxg-icon", { type: obj.typeIcon })), h("ch-grid-cell", null, " ", obj.name, " "), h("ch-grid-cell", null, " ", obj.type, " "), h("ch-grid-cell", null, " ", obj.description, " "), h("ch-grid-cell", null, `${obj.modifiedOn.toISOString().slice(0, 10)}`)))))));
|
|
12
|
+
return (h("gxg-grid", null, h("ch-grid", { "row-selection-mode": "multiple", ref: (el) => (this.chGridEl = el), part: "ch-grid-objects" }, h("ch-grid-columnset", null, h("ch-grid-column", { columnName: "", settingable: false, sortable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.name, settingable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.type, settingable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.description, settingable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.modifiedOn, settingable: false })), this.selection.map((obj) => (h("ch-grid-row", { rowid: obj.id }, h("ch-grid-cell", null, h("gxg-icon", { type: obj.typeIcon, color: "auto" })), h("ch-grid-cell", null, " ", obj.name, " "), h("ch-grid-cell", null, " ", obj.type, " "), h("ch-grid-cell", null, " ", obj.description, " "), h("ch-grid-cell", null, `${obj.modifiedOn.toISOString().slice(0, 10)}`)))))));
|
|
24
13
|
};
|
|
25
|
-
this.
|
|
14
|
+
this.getObjectsHandler = () => {
|
|
26
15
|
this.addCallback().then((items) => {
|
|
27
16
|
if ((items === null || items === void 0 ? void 0 : items.length) > 0) {
|
|
28
17
|
this.selection = [...this.selection, ...items];
|
|
29
18
|
this.selectedObjectsIds = [];
|
|
30
|
-
this.
|
|
19
|
+
this.deselectAllHandler();
|
|
31
20
|
}
|
|
32
21
|
});
|
|
33
22
|
};
|
|
34
|
-
this.
|
|
23
|
+
this.removeObjectsHandler = () => {
|
|
35
24
|
this.selection = this.selection.filter(item => !this.selectedObjectsIds.includes(item.id));
|
|
36
25
|
this.selectedObjectsIds = [];
|
|
37
|
-
this.
|
|
26
|
+
this.deselectAllHandler();
|
|
38
27
|
};
|
|
39
|
-
this.
|
|
40
|
-
this.confirmCallback
|
|
28
|
+
this.confirmHandler = () => {
|
|
29
|
+
if (this.confirmCallback) {
|
|
30
|
+
const allRowsIds = [];
|
|
31
|
+
this.selection.forEach(row => {
|
|
32
|
+
allRowsIds.push(row.id);
|
|
33
|
+
});
|
|
34
|
+
this.confirmCallback(allRowsIds);
|
|
35
|
+
}
|
|
41
36
|
};
|
|
42
|
-
this.
|
|
37
|
+
this.cancelHandler = () => {
|
|
43
38
|
this.cancelCallback();
|
|
44
39
|
};
|
|
45
|
-
this.
|
|
40
|
+
this.deselectAllHandler = () => {
|
|
46
41
|
this.chGridEl.selectAllRows(false);
|
|
47
42
|
};
|
|
48
43
|
this.listenChanges = () => {
|
|
@@ -61,21 +56,11 @@ const GxIdeTeamDevUpdatePartialSelection = class {
|
|
|
61
56
|
async componentWillLoad() {
|
|
62
57
|
this._componentLocale = await Locale.getComponentStrings(this.el);
|
|
63
58
|
this.componentDidLoadEvent.emit(true);
|
|
64
|
-
this.handleKeyDownEvent(true);
|
|
65
59
|
}
|
|
66
60
|
componentDidLoad() {
|
|
67
61
|
this.listenChanges();
|
|
68
62
|
}
|
|
69
63
|
// 7.LISTENERS //
|
|
70
|
-
keyDownHandler(eventInfo) {
|
|
71
|
-
if (document.activeElement === this.el) {
|
|
72
|
-
switch (eventInfo.key) {
|
|
73
|
-
case "Delete":
|
|
74
|
-
this.removeObjects();
|
|
75
|
-
break;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
64
|
// 8.PUBLIC METHODS API //
|
|
80
65
|
/**
|
|
81
66
|
* Validate necessary data input
|
|
@@ -88,7 +73,7 @@ const GxIdeTeamDevUpdatePartialSelection = class {
|
|
|
88
73
|
render() {
|
|
89
74
|
return (h(Host, { class: {
|
|
90
75
|
"gxi-team-dev-update-partial-selection": true
|
|
91
|
-
} }, h("div", { class: `main-wrapper` }, h("gxg-container", { containerTitle: this._componentLocale.title }, h("div", { class: "top-actions" }, h("gxg-button", { id: "button-add", type: "
|
|
76
|
+
} }, h("div", { class: `main-wrapper` }, h("gxg-container", { containerTitle: this._componentLocale.title }, h("div", { class: "top-actions" }, h("gxg-button", { id: "button-add", type: "outlined", onClick: this.getObjectsHandler, part: "add" }, this._componentLocale.addObject), h("gxg-button", { id: "button-remove", type: "outlined", onClick: this.removeObjectsHandler, part: "remove", disabled: !(this.selectedObjectsIds.length > 0) }, this._componentLocale.removeObject)), this.renderObjects(), h("gxg-container", { displayBorderTop: true }, h("div", { class: "grid actions" }, h("div", null, h("gxg-button", { id: "button-clear", type: "outlined", onClick: this.deselectAllHandler, part: "clear", disabled: !(this.selectedObjectsIds.length > 0) }, this._componentLocale.footer.btnDeselectAll)), h("div", null, h("gxg-button", { id: "button-ok", type: "primary-text-only", onClick: this.confirmHandler, part: "confirm" }, this._componentLocale.footer.btnConfirm), h("gxg-button", { id: "button-cancel", type: "outlined", onClick: this.cancelHandler, part: "cancel" }, this._componentLocale.footer.btnCancel))))))));
|
|
92
77
|
}
|
|
93
78
|
static get assetsDirs() { return ["gx-ide-assets/team-dev-update-partial-selection"]; }
|
|
94
79
|
get el() { return getElement(this); }
|
|
@@ -8,6 +8,14 @@ const GxIdeTeamDevUpdateToRevision = class {
|
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.componentDidLoadEvent = createEvent(this, "componentDidLoadEvent", 7);
|
|
10
10
|
// 9.LOCAL METHODS //
|
|
11
|
+
this.setInitialCheckedRadio = () => {
|
|
12
|
+
if (this.currentRevision === undefined) {
|
|
13
|
+
this.updateToLatestEl.checked = true;
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
this.updateToRevisionEl.checked = true;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
11
19
|
this.confirm = () => {
|
|
12
20
|
let revision = undefined;
|
|
13
21
|
if (this.updateToRevisionEl.checked) {
|
|
@@ -18,13 +26,20 @@ const GxIdeTeamDevUpdateToRevision = class {
|
|
|
18
26
|
this.cancel = () => {
|
|
19
27
|
this.cancelCallback();
|
|
20
28
|
};
|
|
29
|
+
this.updateToRevisionOnFocusHandler = () => {
|
|
30
|
+
this.updateToRevisionEl.checked = true;
|
|
31
|
+
};
|
|
21
32
|
this.cancelCallback = undefined;
|
|
22
33
|
this.confirmCallback = undefined;
|
|
34
|
+
this.currentRevision = undefined;
|
|
23
35
|
}
|
|
24
36
|
// 6.COMPONENT LIFECYCLE EVENTS //
|
|
25
37
|
async componentWillLoad() {
|
|
26
38
|
this._componentLocale = await Locale.getComponentStrings(this.el);
|
|
39
|
+
}
|
|
40
|
+
componentDidLoad() {
|
|
27
41
|
this.componentDidLoadEvent.emit(true);
|
|
42
|
+
this.setInitialCheckedRadio();
|
|
28
43
|
}
|
|
29
44
|
// 7.LISTENERS //
|
|
30
45
|
// 8.PUBLIC METHODS API //
|
|
@@ -39,7 +54,7 @@ const GxIdeTeamDevUpdateToRevision = class {
|
|
|
39
54
|
render() {
|
|
40
55
|
return (h(Host, { class: {
|
|
41
56
|
"gxi-team-dev-update-to-revision": true
|
|
42
|
-
} }, h("div", { class: `main-wrapper` }, h("gxg-container", null, h("gxg-form-radio-group", null, h("gxg-form-radio", { label: this._componentLocale.options.updateToLatest, value: "updateToLatest", part: "radio-to-latest" }), h("div", { class: "revision-number" }, h("gxg-form-radio", { label: this._componentLocale.options.updateToRevision, value: "updateToRevision", ref: (el) => (this.updateToRevisionEl = el), part: "radio-to-revision" }), h("gxg-form-text", { ref: (el) => (this.revisionNumberEl = el), part: "revision-number" })))), h("gxg-container", { displayBorderTop: true }, h("div", { class: "actions" }, h("gxg-button", { id: "button-ok", type: "primary-text-only", onClick: this.confirm, part: "
|
|
57
|
+
} }, h("div", { class: `main-wrapper` }, h("gxg-container", null, h("gxg-form-radio-group", null, h("gxg-form-radio", { label: this._componentLocale.options.updateToLatest, value: "updateToLatest", ref: (el) => (this.updateToLatestEl = el), part: "radio-to-latest" }), h("div", { class: "revision-number" }, h("gxg-form-radio", { label: this._componentLocale.options.updateToRevision, value: "updateToRevision", ref: (el) => (this.updateToRevisionEl = el), part: "radio-to-revision" }), h("gxg-form-text", { ref: (el) => (this.revisionNumberEl = el), onFocus: this.updateToRevisionOnFocusHandler, value: this.currentRevision, part: "revision-number" })))), h("gxg-container", { displayBorderTop: true }, h("div", { class: "actions" }, h("gxg-button", { id: "button-ok", type: "primary-text-only", onClick: this.confirm, part: "update" }, this._componentLocale.footer.btnUpdate), h("gxg-button", { id: "button-cancel", type: "outlined", onClick: this.cancel, part: "cancel" }, this._componentLocale.footer.btnCancel))))));
|
|
43
58
|
}
|
|
44
59
|
static get assetsDirs() { return ["gx-ide-assets/team-dev-update-to-revision"]; }
|
|
45
60
|
get el() { return getElement(this); }
|
|
@@ -10,9 +10,35 @@ const GxIdeTeamDevUpdate = class {
|
|
|
10
10
|
this.componentDidLoadEvent = createEvent(this, "componentDidLoadEvent", 7);
|
|
11
11
|
this.loadDataCalledFirstTime = false; // pending for update grid checkboxes, should be checked, after loadData has loaded objects for the first time.
|
|
12
12
|
// 9.LOCAL METHODS //
|
|
13
|
+
this.onRowContextMenuHandler = (grid) => async (ev) => {
|
|
14
|
+
if (this.objectsContextMenuCallback) {
|
|
15
|
+
ev.preventDefault();
|
|
16
|
+
ev.stopPropagation();
|
|
17
|
+
let selection = [];
|
|
18
|
+
if (grid === "pending") {
|
|
19
|
+
selection = await this.chGridPendingForUpdateEl.getSelectedRows();
|
|
20
|
+
}
|
|
21
|
+
else if (grid === "ignored") {
|
|
22
|
+
selection = await this.chGridIgnoredObjectsEl.getSelectedRows();
|
|
23
|
+
}
|
|
24
|
+
else if (grid === "results") {
|
|
25
|
+
selection = await this.chGridResultsEl.getSelectedRows();
|
|
26
|
+
}
|
|
27
|
+
await this.objectsContextMenuCallback(grid, {
|
|
28
|
+
selection: selection,
|
|
29
|
+
clientX: ev.detail.clientX,
|
|
30
|
+
clientY: ev.detail.clientY
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
};
|
|
13
34
|
this.markAllPendingToUpdateRows = () => {
|
|
14
35
|
this.chGridPendingForUpdateEl.markAllRows();
|
|
15
36
|
};
|
|
37
|
+
this.gridOnSelectionChangedCallbackHandler = (grid) => async (ev) => {
|
|
38
|
+
if (this.selectCallback) {
|
|
39
|
+
await this.selectCallback(grid, ev.detail.rowsId);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
16
42
|
this.renderOptions = () => {
|
|
17
43
|
return (h("gxg-container", { part: "options-container" }, h("div", { class: "grid options-grid" }, h("gxg-container", { displayBorder: true, part: "options-update-from", containerTitle: this._componentLocale.options.updateFrom }, h("div", { class: "grid options-update-from-grid" }, h("gxg-text", { type: "text-regular" }, this._componentLocale.options.updateFrom, ":"), h("gxg-text", { type: "text-link", onClick: this.openServerCallback }, this.updateFrom ? this.updateFrom.serverUrl : ""), h("gxg-text", { type: "text-regular" }, this._componentLocale.options.knowledgeBase, ":"), h("gxg-text", { type: "text-regular" }, this.updateFrom ? this.updateFrom.kbName : ""), h("gxg-text", { type: "text-regular" }, this._componentLocale.options.version, ":"), h("gxg-text", { type: "text-regular" }, this.updateFrom ? this.updateFrom.versionName : ""), h("gxg-text", { type: "text-regular" }, this._componentLocale.options.lastFullUpdate, ":"), h("gxg-text", { type: "text-regular" }, this.updateFrom
|
|
18
44
|
? formatDate(this.updateFrom.lastFullUpdate)
|
|
@@ -31,13 +57,13 @@ const GxIdeTeamDevUpdate = class {
|
|
|
31
57
|
return (h("gxg-container", { part: "data-container" }, h("gxg-tabs", { id: "dataTabs", part: "data-tabs" }, h("gxg-tab-bar", { slot: "tab-bar-container" }, h("gxg-tab-button", { slot: "tab-bar", "tab-label": this._componentLocale.tabs.pendingForUpdate, tab: "pendingForUpdate", key: "pendingForUpdate", isSelected: true }), h("gxg-tab-button", { slot: "tab-bar", "tab-label": this._componentLocale.tabs.ignoredObjects, tab: "ignoredObjects", key: "ignoredObjects" }), h("gxg-tab-button", { slot: "tab-bar", "tab-label": this._componentLocale.tabs.results, tab: "results", key: "results", ref: (el) => (this.gxgTabButtonResultsEl = el) })), h("gxg-tab", { tab: "pendingForUpdate", key: "pendingForUpdate", isSelected: true }, this.renderPendingForUpdate()), h("gxg-tab", { tab: "ignoredObjects", key: "ignoredObjects" }, this.renderIgnoredObjects()), h("gxg-tab", { tab: "results", key: "results" }, this.renderResults()))));
|
|
32
58
|
};
|
|
33
59
|
this.renderPendingForUpdate = () => {
|
|
34
|
-
return (h("gxg-grid", null, h("ch-grid", { "row-selection-mode": "
|
|
60
|
+
return (h("gxg-grid", null, h("ch-grid", { "row-selection-mode": "multiple", ref: (el) => (this.chGridPendingForUpdateEl = el), part: "ch-grid-pending-for-updates", class: "no-border", onRowContextMenu: this.onRowContextMenuHandler("pending"), onSelectionChanged: this.gridOnSelectionChangedCallbackHandler("pending") }, h("ch-grid-columnset", null, h("ch-grid-column", { settingable: false, sortable: false, "column-type": "rich", richRowSelector: true, richRowSelectorMode: "mark" }), h("ch-grid-column", { settingable: false, sortable: false }), h("ch-grid-column", { settingable: false, sortable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.name, settingable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.type, settingable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.description, settingable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.modifiedOn, settingable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.status, settingable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.action, settingable: false })), this.updateData.pendingForUpdate.map((obj) => (h("ch-grid-row", { rowid: obj.id }, h("ch-grid-cell", { "cell-type": "rich", "row-selector": true }), h("ch-grid-cell", null, h("gxg-icon", { type: obj.typeIcon, color: "auto" })), h("ch-grid-cell", null, " ", this.renderIconState(obj.state), " "), h("ch-grid-cell", null, " ", obj.name, " "), h("ch-grid-cell", null, " ", obj.type, " "), h("ch-grid-cell", null, " ", obj.description, " "), h("ch-grid-cell", null, `${formatDate(obj.modifiedOn)}`), h("ch-grid-cell", null, " ", obj.status, " "), h("ch-grid-cell", null, " ", obj.action, " ")))))));
|
|
35
61
|
};
|
|
36
62
|
this.renderIgnoredObjects = () => {
|
|
37
|
-
return (h("gxg-grid", null, h("ch-grid", { "row-selection-mode": "multiple", ref: (el) => (this.chGridIgnoredObjectsEl = el), part: "ch-grid-ignored-objects", class: "no-border" }, h("ch-grid-columnset", null, h("ch-grid-column", { settingable: false, sortable: false, size: "min-content" }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.name, settingable: false, size: "1fr" }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.type, settingable: false, size: "1fr" })), this.updateData.ignoredObjects.map((obj) => (h("ch-grid-row", { rowid: obj.id }, h("ch-grid-cell", null, h("gxg-icon", { type: obj.typeIcon })), h("ch-grid-cell", null, " ", obj.name, " "), h("ch-grid-cell", null, " ", obj.type, " ")))))));
|
|
63
|
+
return (h("gxg-grid", null, h("ch-grid", { "row-selection-mode": "multiple", ref: (el) => (this.chGridIgnoredObjectsEl = el), part: "ch-grid-ignored-objects", class: "no-border", onRowContextMenu: this.onRowContextMenuHandler("ignored"), onSelectionChanged: this.gridOnSelectionChangedCallbackHandler("ignored") }, h("ch-grid-columnset", null, h("ch-grid-column", { settingable: false, sortable: false, size: "min-content" }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.name, settingable: false, size: "1fr" }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.type, settingable: false, size: "1fr" })), this.updateData.ignoredObjects.map((obj) => (h("ch-grid-row", { rowid: obj.id }, h("ch-grid-cell", null, h("gxg-icon", { type: obj.typeIcon, color: "auto" })), h("ch-grid-cell", null, " ", obj.name, " "), h("ch-grid-cell", null, " ", obj.type, " ")))))));
|
|
38
64
|
};
|
|
39
65
|
this.renderResults = () => {
|
|
40
|
-
return (h("gxg-grid", null, h("ch-grid", { "row-selection-mode": "multiple", ref: (el) => (this.chGridResultsEl = el), part: "ch-grid-results", class: "no-border" }, h("ch-grid-columnset", null, h("ch-grid-column", { settingable: false, sortable: false, "column-type": "tree" }), h("ch-grid-column", { settingable: false, sortable: false }), h("ch-grid-column", { settingable: false, sortable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.name, settingable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.type, settingable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.description, settingable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.notes, settingable: false })), this.updateResultData.map((obj) => (h("ch-grid-row", { rowid: obj.id }, h("ch-grid-cell", null, " ", this.renderIconResult(obj.result), " "), h("ch-grid-cell", null, h("gxg-icon", { type: obj.typeIcon })), h("ch-grid-cell", null, " ", this.renderIconState(obj.state), " "), h("ch-grid-cell", null, " ", obj.name, " "), h("ch-grid-cell", null, " ", obj.type, " "), h("ch-grid-cell", null, " ", obj.description, " "), h("ch-grid-cell", null, " ", obj.notes, " "), h("ch-grid-rowset", null, obj.messages.map(msg => {
|
|
66
|
+
return (h("gxg-grid", null, h("ch-grid", { "row-selection-mode": "multiple", ref: (el) => (this.chGridResultsEl = el), part: "ch-grid-results", class: "no-border", onRowContextMenu: this.onRowContextMenuHandler("results"), onSelectionChanged: this.gridOnSelectionChangedCallbackHandler("results") }, h("ch-grid-columnset", null, h("ch-grid-column", { settingable: false, sortable: false, "column-type": "tree" }), h("ch-grid-column", { settingable: false, sortable: false }), h("ch-grid-column", { settingable: false, sortable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.name, settingable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.type, settingable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.description, settingable: false }), h("ch-grid-column", { columnName: this._componentLocale.tableHead.notes, settingable: false })), this.updateResultData.map((obj) => (h("ch-grid-row", { rowid: obj.id }, h("ch-grid-cell", null, " ", this.renderIconResult(obj.result), " "), h("ch-grid-cell", null, h("gxg-icon", { type: obj.typeIcon, color: "auto" })), h("ch-grid-cell", null, " ", this.renderIconState(obj.state), " "), h("ch-grid-cell", null, " ", obj.name, " "), h("ch-grid-cell", null, " ", obj.type, " "), h("ch-grid-cell", null, " ", obj.description, " "), h("ch-grid-cell", null, " ", obj.notes, " "), h("ch-grid-rowset", null, obj.messages.map(msg => {
|
|
41
67
|
let msgType;
|
|
42
68
|
switch (msg.type) {
|
|
43
69
|
case "info":
|
|
@@ -144,38 +170,13 @@ const GxIdeTeamDevUpdate = class {
|
|
|
144
170
|
});
|
|
145
171
|
}
|
|
146
172
|
};
|
|
147
|
-
this.addListeners = async () => {
|
|
148
|
-
// for pending-for-update grid events
|
|
149
|
-
if (this.updateData.pendingForUpdate) {
|
|
150
|
-
this.chGridPendingForUpdateEl.addEventListener("contextmenu", async (ev) => {
|
|
151
|
-
ev.preventDefault();
|
|
152
|
-
ev.stopPropagation();
|
|
153
|
-
const pendingForUpdateMarked = await this.chGridPendingForUpdateEl.getMarkedRows();
|
|
154
|
-
this.gridContextMenuCallback(pendingForUpdateMarked, "update");
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
// for ignored-objects grid events
|
|
158
|
-
this.chGridIgnoredObjectsEl.addEventListener("contextmenu", async (ev) => {
|
|
159
|
-
ev.preventDefault();
|
|
160
|
-
ev.stopPropagation();
|
|
161
|
-
const ignoredObjectsSelected = await this.chGridIgnoredObjectsEl.getSelectedRows();
|
|
162
|
-
this.gridContextMenuCallback(ignoredObjectsSelected, "ignored");
|
|
163
|
-
});
|
|
164
|
-
// for results grid events
|
|
165
|
-
this.chGridResultsEl.addEventListener("contextmenu", async (ev) => {
|
|
166
|
-
ev.preventDefault();
|
|
167
|
-
ev.stopPropagation();
|
|
168
|
-
const resultsObjectsSelected = await this.chGridResultsEl.getMarkedRows();
|
|
169
|
-
this.gridContextMenuCallback(resultsObjectsSelected, "results");
|
|
170
|
-
});
|
|
171
|
-
};
|
|
172
173
|
this.pendingForUpdatesRowMarkingChangedHandler = async (e) => {
|
|
173
174
|
// remove "rowMarkingChanged" until checkboxes have been added/removed on togglePendingCommitsCheckboxes, to prevent loops.
|
|
174
175
|
this.chGridPendingForUpdateEl.removeEventListener("rowMarkingChanged", this.pendingForUpdatesRowMarkingChangedHandler);
|
|
175
176
|
if (this.chGridPendingForUpdateEl) {
|
|
176
177
|
const addedRowsIds = e.detail.addedRowsId;
|
|
177
178
|
const removedRowsId = e.detail.removedRowsId;
|
|
178
|
-
const pendingItemCheckedResult = await this.
|
|
179
|
+
const pendingItemCheckedResult = await this.pendingItemsCheckedCallback({
|
|
179
180
|
itemsChecked: addedRowsIds,
|
|
180
181
|
itemsUnchecked: removedRowsId
|
|
181
182
|
});
|
|
@@ -229,8 +230,10 @@ const GxIdeTeamDevUpdate = class {
|
|
|
229
230
|
this.loadCallback = undefined;
|
|
230
231
|
this.objectsScopeCallback = undefined;
|
|
231
232
|
this.openServerCallback = undefined;
|
|
232
|
-
this.
|
|
233
|
+
this.pendingItemsCheckedCallback = undefined;
|
|
233
234
|
this.revisionScopeCallback = undefined;
|
|
235
|
+
this.objectsContextMenuCallback = undefined;
|
|
236
|
+
this.selectCallback = undefined;
|
|
234
237
|
this.types = undefined;
|
|
235
238
|
this.updateCallback = undefined;
|
|
236
239
|
this.updateFrom = undefined;
|
|
@@ -242,7 +245,6 @@ const GxIdeTeamDevUpdate = class {
|
|
|
242
245
|
}
|
|
243
246
|
async componentDidLoad() {
|
|
244
247
|
await this.loadData();
|
|
245
|
-
this.addListeners();
|
|
246
248
|
}
|
|
247
249
|
async componentDidRender() {
|
|
248
250
|
if (this.loadDataCalledFirstTime) {
|