@genexus/genexus-ide-ui 0.0.22 → 0.0.23
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/{ch-grid_4.cjs.entry.js → ch-grid_8.cjs.entry.js} +143 -0
- package/dist/cjs/{ch-suggest_5.cjs.entry.js → ch-suggest_4.cjs.entry.js} +0 -65
- package/dist/cjs/format-date-f2c49d1a.js +28 -0
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +4 -24
- package/dist/cjs/gx-ide-team-dev-select-recent-comment.cjs.entry.js +5 -15
- package/dist/cjs/gx-ide-team-dev-update-partial-selection.cjs.entry.js +102 -0
- package/dist/cjs/gx-ide-team-dev-update-to-revision.cjs.entry.js +53 -0
- package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js +278 -0
- package/dist/cjs/gx-ide-top-bar.cjs.entry.js +37 -0
- package/dist/cjs/{gxg-combo-box_8.cjs.entry.js → gxg-combo-box_6.cjs.entry.js} +0 -132
- package/dist/cjs/gxg-form-checkbox-group_2.cjs.entry.js +140 -0
- package/dist/cjs/{gx-ide-top-bar_2.cjs.entry.js → gxg-form-radio-group.cjs.entry.js} +0 -31
- package/dist/cjs/gxg-text.cjs.entry.js +72 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/common/format-date.js +11 -0
- package/dist/collection/components/team-dev-commit/team-dev-commit.js +3 -13
- package/dist/collection/components/team-dev-select-recent-comment/team-dev-select-recent-comment.js +6 -16
- package/dist/collection/components/team-dev-update/gx-ide-assets/team-dev-update/langs/team-dev-update.lang.en.json +45 -0
- package/dist/collection/components/team-dev-update/gx-ide-assets/team-dev-update/langs/team-dev-update.lang.ja.json +3 -0
- package/dist/collection/components/team-dev-update/gx-ide-assets/team-dev-update/langs/team-dev-update.lang.zh.json +3 -0
- package/dist/collection/components/team-dev-update/team-dev-update.css +216 -0
- package/dist/collection/components/team-dev-update/team-dev-update.js +524 -0
- 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 +15 -0
- package/dist/collection/components/team-dev-update-partial-selection/gx-ide-assets/team-dev-update-partial-selection/langs/team-dev-update-partial-selection.lang.ja.json +3 -0
- package/dist/collection/components/team-dev-update-partial-selection/gx-ide-assets/team-dev-update-partial-selection/langs/team-dev-update-partial-selection.lang.zh.json +3 -0
- package/dist/collection/components/team-dev-update-partial-selection/team-dev-update-partial-selection.css +149 -0
- package/dist/collection/components/team-dev-update-partial-selection/team-dev-update-partial-selection.js +238 -0
- 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 +11 -0
- package/dist/collection/components/team-dev-update-to-revision/gx-ide-assets/team-dev-update-to-revision/langs/team-dev-update-to-revision.lang.ja.json +3 -0
- package/dist/collection/components/team-dev-update-to-revision/gx-ide-assets/team-dev-update-to-revision/langs/team-dev-update-to-revision.lang.zh.json +3 -0
- package/dist/collection/components/team-dev-update-to-revision/team-dev-update-to-revision.css +147 -0
- package/dist/collection/components/team-dev-update-to-revision/team-dev-update-to-revision.js +136 -0
- package/dist/components/ch-grid-rowset-empty.js +1 -24
- package/dist/components/ch-grid-rowset-empty2.js +26 -0
- package/dist/components/format-date.js +25 -0
- package/dist/components/gx-ide-team-dev-commit.js +4 -24
- package/dist/components/gx-ide-team-dev-select-recent-comment.js +5 -15
- package/dist/components/gx-ide-team-dev-update-partial-selection.d.ts +11 -0
- package/dist/components/gx-ide-team-dev-update-partial-selection.js +213 -0
- package/dist/components/gx-ide-team-dev-update-to-revision.d.ts +11 -0
- package/dist/components/gx-ide-team-dev-update-to-revision.js +131 -0
- package/dist/components/gx-ide-team-dev-update.d.ts +11 -0
- package/dist/components/gx-ide-team-dev-update.js +473 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/esm/{ch-grid_4.entry.js → ch-grid_8.entry.js} +140 -1
- package/dist/esm/{ch-suggest_5.entry.js → ch-suggest_4.entry.js} +1 -65
- package/dist/esm/format-date-e9ca0786.js +25 -0
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-team-dev-commit.entry.js +4 -24
- package/dist/esm/gx-ide-team-dev-select-recent-comment.entry.js +5 -15
- package/dist/esm/gx-ide-team-dev-update-partial-selection.entry.js +98 -0
- package/dist/esm/gx-ide-team-dev-update-to-revision.entry.js +49 -0
- package/dist/esm/gx-ide-team-dev-update.entry.js +274 -0
- package/dist/esm/gx-ide-top-bar.entry.js +33 -0
- package/dist/esm/{gxg-combo-box_8.entry.js → gxg-combo-box_6.entry.js} +2 -132
- package/dist/esm/gxg-form-checkbox-group_2.entry.js +135 -0
- package/dist/esm/{gx-ide-top-bar_2.entry.js → gxg-form-radio-group.entry.js} +2 -32
- package/dist/esm/gxg-text.entry.js +68 -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/gx-ide-assets/team-dev-update/langs/team-dev-update.lang.en.json +45 -0
- package/dist/genexus-ide-ui/gx-ide-assets/team-dev-update/langs/team-dev-update.lang.ja.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/team-dev-update/langs/team-dev-update.lang.zh.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/team-dev-update-partial-selection/langs/team-dev-update-partial-selection.lang.en.json +15 -0
- package/dist/genexus-ide-ui/gx-ide-assets/team-dev-update-partial-selection/langs/team-dev-update-partial-selection.lang.ja.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/team-dev-update-partial-selection/langs/team-dev-update-partial-selection.lang.zh.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/team-dev-update-to-revision/langs/team-dev-update-to-revision.lang.en.json +11 -0
- package/dist/genexus-ide-ui/gx-ide-assets/team-dev-update-to-revision/langs/team-dev-update-to-revision.lang.ja.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/team-dev-update-to-revision/langs/team-dev-update-to-revision.lang.zh.json +3 -0
- package/dist/genexus-ide-ui/p-16bd5578.entry.js +1 -0
- package/dist/genexus-ide-ui/p-32b8abf6.entry.js +1 -0
- package/dist/genexus-ide-ui/p-3bdcb73b.entry.js +1 -0
- package/dist/genexus-ide-ui/p-53d36ef7.entry.js +1 -0
- package/dist/genexus-ide-ui/p-5884a014.entry.js +1 -0
- package/dist/genexus-ide-ui/p-66072dce.entry.js +1 -0
- package/dist/genexus-ide-ui/p-6e80380b.entry.js +1 -0
- package/dist/genexus-ide-ui/p-718759e7.entry.js +1 -0
- package/dist/genexus-ide-ui/p-72303355.js +1 -0
- package/dist/genexus-ide-ui/p-757f8567.entry.js +1 -0
- package/dist/genexus-ide-ui/p-a0e85c2a.entry.js +1 -0
- package/dist/genexus-ide-ui/p-afe9515e.entry.js +1 -0
- package/dist/types/common/format-date.d.ts +1 -0
- package/dist/types/components/team-dev-commit/team-dev-commit.d.ts +0 -1
- package/dist/types/components/team-dev-select-recent-comment/team-dev-select-recent-comment.d.ts +1 -31
- package/dist/types/components/team-dev-update/team-dev-update.d.ts +173 -0
- package/dist/types/components/team-dev-update-partial-selection/team-dev-update-partial-selection.d.ts +61 -0
- package/dist/types/components/team-dev-update-to-revision/team-dev-update-to-revision.d.ts +41 -0
- package/dist/types/components.d.ts +207 -1
- package/package.json +1 -1
- package/dist/cjs/ch-grid-column-resize_4.cjs.entry.js +0 -150
- package/dist/esm/ch-grid-column-resize_4.entry.js +0 -143
- package/dist/genexus-ide-ui/p-54cef7ae.entry.js +0 -1
- package/dist/genexus-ide-ui/p-554ed73a.entry.js +0 -1
- package/dist/genexus-ide-ui/p-6d378d61.entry.js +0 -1
- package/dist/genexus-ide-ui/p-b26b5d74.entry.js +0 -1
- package/dist/genexus-ide-ui/p-d5c29251.entry.js +0 -1
- package/dist/genexus-ide-ui/p-f1a3397d.entry.js +0 -1
|
@@ -0,0 +1,524 @@
|
|
|
1
|
+
/* STENCIL IMPORTS */
|
|
2
|
+
import { Host, h } from "@stencil/core";
|
|
3
|
+
/* CUSTOM IMPORTS */
|
|
4
|
+
import { Locale } from "../../common/locale";
|
|
5
|
+
import { renderComboItems } from "../../common/render-combo-items";
|
|
6
|
+
import { formatDate } from "../../common/format-date";
|
|
7
|
+
export class GxIdeTeamDevUpdate {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.loadDataCalledFirstTime = false; // pending for update grid checkboxes, should be checked, after loadData has loaded objects for the first time.
|
|
10
|
+
// 9.LOCAL METHODS //
|
|
11
|
+
this.markAllPendingToUpdateRows = () => {
|
|
12
|
+
this.chGridPendingForUpdateEl.markAllRows();
|
|
13
|
+
};
|
|
14
|
+
this.renderOptions = () => {
|
|
15
|
+
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
|
|
16
|
+
? formatDate(this.updateFrom.lastFullUpdate)
|
|
17
|
+
: ""))), h("gxg-container", { displayBorder: true, part: "options-scope", containerTitle: this._componentLocale.options.scope }, h("div", { class: "grid options-scope-grid" }, h("gxg-text", { type: "text-regular" }, this._componentLocale.options.objects, ":"), h("gxg-text", { type: "text-regular" }, h("span", { class: { bold: this.objectScopeText === "partial" } }, this._componentLocale.options.scopeData.objects[this.objectScopeText.toLocaleLowerCase()])), h("gxg-button", { id: "button-scope-objects-change", type: "outlined", onClick: this.objectsScope, part: "gxg-button gxg-button--scope-objects-change" }, this._componentLocale.options.changeBtn), h("gxg-text", { type: "text-regular" }, this._componentLocale.options.revision, ":"), h("gxg-text", { type: "text-regular" }, h("span", { class: { bold: this.revisionScopeText !== undefined } }, this.revisionScopeText === undefined
|
|
18
|
+
? this._componentLocale.options.scopeData.revision.latest
|
|
19
|
+
: this.revisionScopeText)), h("gxg-button", { id: "button-scope-revision-change", type: "outlined", onClick: this.revisionScope, part: "gxg-button gxg-button--scope-revision-change" }, this._componentLocale.options.changeBtn), h("gxg-form-checkbox", { label: this._componentLocale.options.kbProperties, class: "align-center", part: "option-kb-properties" }))))));
|
|
20
|
+
};
|
|
21
|
+
this.renderFilter = () => {
|
|
22
|
+
return (h("gxg-container", { part: "filters-container" }, h("div", { class: "filters-container-body with-gap" }, h("div", { class: {
|
|
23
|
+
"grid": true,
|
|
24
|
+
"filter-grid": true,
|
|
25
|
+
"hide": !this.showFilter
|
|
26
|
+
} }, h("gxg-form-text", { "label-position": "above", label: this._componentLocale.filter.pattern, ref: (el) => (this.filterPatternEl = el), part: "filter-pattern", onInput: this.loadData }), h("gxg-combo-box", { "disable-filter": true, label: this._componentLocale.filter.type, disabled: !this.types, ref: (el) => (this.filterTypeEl = el), onValueChanged: this.loadData, part: "filter-type", value: this.types[0].id }, renderComboItems(this.types))), h("div", { class: { actions: true, close: !this.showFilter } }, h("gxg-button", { type: "secondary-icon-only", icon: "patterns/filters", onClick: this.toggleFilter, 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" })))));
|
|
27
|
+
};
|
|
28
|
+
this.renderData = () => {
|
|
29
|
+
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()))));
|
|
30
|
+
};
|
|
31
|
+
this.renderPendingForUpdate = () => {
|
|
32
|
+
return (h("gxg-grid", null, h("ch-grid", { "row-selection-mode": "none", ref: (el) => (this.chGridPendingForUpdateEl = el), part: "ch-grid-pending-for-updates", class: "no-border" }, 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 })), 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, " ")))))));
|
|
33
|
+
};
|
|
34
|
+
this.renderIgnoredObjects = () => {
|
|
35
|
+
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, " ")))))));
|
|
36
|
+
};
|
|
37
|
+
this.renderResults = () => {
|
|
38
|
+
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 => {
|
|
39
|
+
let msgType;
|
|
40
|
+
switch (msg.type) {
|
|
41
|
+
case "info":
|
|
42
|
+
msgType = "text-alert-info";
|
|
43
|
+
break;
|
|
44
|
+
case "success":
|
|
45
|
+
msgType = "text-alert-success";
|
|
46
|
+
break;
|
|
47
|
+
case "warning":
|
|
48
|
+
msgType = "text-alert-warning";
|
|
49
|
+
break;
|
|
50
|
+
case "error":
|
|
51
|
+
msgType = "text-alert-error";
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
return (h("ch-grid-rowset-empty", null, h("gxg-text", { type: msgType }, msg.text)));
|
|
55
|
+
}))))))));
|
|
56
|
+
};
|
|
57
|
+
this.renderIconState = (state) => {
|
|
58
|
+
let type;
|
|
59
|
+
let color;
|
|
60
|
+
switch (state) {
|
|
61
|
+
case "modified":
|
|
62
|
+
type = "gx-server/changes-commit-pending";
|
|
63
|
+
color = "primary-active";
|
|
64
|
+
break;
|
|
65
|
+
case "inserted":
|
|
66
|
+
type = "gx-server/new";
|
|
67
|
+
color = "success";
|
|
68
|
+
break;
|
|
69
|
+
case "deleted":
|
|
70
|
+
type = "gx-server/delete";
|
|
71
|
+
color = "error";
|
|
72
|
+
break;
|
|
73
|
+
case "conflicted":
|
|
74
|
+
type = "gx-server/conflict";
|
|
75
|
+
color = "warning";
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
return h("gxg-icon", { type: type, color: color });
|
|
79
|
+
};
|
|
80
|
+
this.renderIconResult = (result) => {
|
|
81
|
+
let type;
|
|
82
|
+
let color;
|
|
83
|
+
switch (result) {
|
|
84
|
+
case "info":
|
|
85
|
+
type = "gemini-tools/notice";
|
|
86
|
+
color = "primary-active";
|
|
87
|
+
break;
|
|
88
|
+
case "success":
|
|
89
|
+
type = "gemini-tools/success";
|
|
90
|
+
color = "success";
|
|
91
|
+
break;
|
|
92
|
+
case "warning":
|
|
93
|
+
type = "gemini-tools/warning";
|
|
94
|
+
color = "warning";
|
|
95
|
+
break;
|
|
96
|
+
case "error":
|
|
97
|
+
type = "gemini-tools/error";
|
|
98
|
+
color = "error";
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
return h("gxg-icon", { type: type, color: color });
|
|
102
|
+
};
|
|
103
|
+
this.loadData = async () => {
|
|
104
|
+
const filters = {
|
|
105
|
+
pattern: this.showFilter ? this.filterPatternEl.value : null,
|
|
106
|
+
type: this.showFilter ? this.filterTypeEl.value : null
|
|
107
|
+
};
|
|
108
|
+
// this.updateData = null;
|
|
109
|
+
this.isLoading = true;
|
|
110
|
+
this.updateData = await this.loadCallback(filters);
|
|
111
|
+
this.isLoading = false;
|
|
112
|
+
if (!this.loadDataCalledFirstTime) {
|
|
113
|
+
/* this allows checking the pending commits checkboxes on first load*/
|
|
114
|
+
this.loadDataCalledFirstTime = true;
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
this.update = async () => {
|
|
118
|
+
if (this.updateCallback) {
|
|
119
|
+
const pendingForUpdateMarked = await this.chGridPendingForUpdateEl.getMarkedRows();
|
|
120
|
+
this.updateCallback(pendingForUpdateMarked).then((updateResultData) => {
|
|
121
|
+
this.updateResultData = updateResultData;
|
|
122
|
+
this.gxgTabButtonResultsEl.tabButtonClick();
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
this.toggleFilter = () => {
|
|
127
|
+
this.showFilter = !this.showFilter;
|
|
128
|
+
};
|
|
129
|
+
this.objectsScope = () => {
|
|
130
|
+
if (this.objectsScopeCallback) {
|
|
131
|
+
this.objectsScopeCallback().then(objectData => {
|
|
132
|
+
if (objectData) {
|
|
133
|
+
this.objectScopeText = objectData;
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
this.revisionScope = () => {
|
|
139
|
+
if (this.revisionScopeCallback) {
|
|
140
|
+
this.revisionScopeCallback().then(revisionData => {
|
|
141
|
+
this.revisionScopeText = revisionData;
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
this.addListeners = async () => {
|
|
146
|
+
// for pending-for-update grid events
|
|
147
|
+
if (this.updateData.pendingForUpdate) {
|
|
148
|
+
this.chGridPendingForUpdateEl.addEventListener("contextmenu", async (ev) => {
|
|
149
|
+
ev.preventDefault();
|
|
150
|
+
ev.stopPropagation();
|
|
151
|
+
const pendingForUpdateMarked = await this.chGridPendingForUpdateEl.getMarkedRows();
|
|
152
|
+
this.gridContextMenuCallback(pendingForUpdateMarked, "update");
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
// for ignored-objects grid events
|
|
156
|
+
this.chGridIgnoredObjectsEl.addEventListener("contextmenu", async (ev) => {
|
|
157
|
+
ev.preventDefault();
|
|
158
|
+
ev.stopPropagation();
|
|
159
|
+
const ignoredObjectsSelected = await this.chGridIgnoredObjectsEl.getSelectedRows();
|
|
160
|
+
this.gridContextMenuCallback(ignoredObjectsSelected, "ignored");
|
|
161
|
+
});
|
|
162
|
+
// for results grid events
|
|
163
|
+
this.chGridResultsEl.addEventListener("contextmenu", async (ev) => {
|
|
164
|
+
ev.preventDefault();
|
|
165
|
+
ev.stopPropagation();
|
|
166
|
+
const resultsObjectsSelected = await this.chGridResultsEl.getMarkedRows();
|
|
167
|
+
this.gridContextMenuCallback(resultsObjectsSelected, "results");
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
this.pendingForUpdatesRowMarkingChangedHandler = async (e) => {
|
|
171
|
+
// remove "rowMarkingChanged" until checkboxes have been added/removed on togglePendingCommitsCheckboxes, to prevent loops.
|
|
172
|
+
this.chGridPendingForUpdateEl.removeEventListener("rowMarkingChanged", this.pendingForUpdatesRowMarkingChangedHandler);
|
|
173
|
+
if (this.chGridPendingForUpdateEl) {
|
|
174
|
+
const addedRowsIds = e.detail.addedRowsId;
|
|
175
|
+
const removedRowsId = e.detail.removedRowsId;
|
|
176
|
+
const pendingItemCheckedResult = await this.pendingItemCheckedCallback({
|
|
177
|
+
itemsChecked: addedRowsIds,
|
|
178
|
+
itemsUnchecked: removedRowsId
|
|
179
|
+
});
|
|
180
|
+
if (pendingItemCheckedResult === undefined) {
|
|
181
|
+
// undo check/uncheck
|
|
182
|
+
await this.revertPendingCommitsCheckboxes(addedRowsIds, removedRowsId);
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
await this.togglePendingCommitsCheckboxes(pendingItemCheckedResult);
|
|
186
|
+
}
|
|
187
|
+
this.chGridPendingForUpdateEl.addEventListener("rowMarkingChanged", this.pendingForUpdatesRowMarkingChangedHandler);
|
|
188
|
+
}
|
|
189
|
+
this.chGridPendingForUpdateEl.addEventListener("rowMarkingChanged", this.pendingForUpdatesRowMarkingChangedHandler);
|
|
190
|
+
};
|
|
191
|
+
this.togglePendingCommitsCheckboxes = async (itemsToToggle) => {
|
|
192
|
+
if (this.chGridPendingForUpdateEl) {
|
|
193
|
+
const itemsToCheck = itemsToToggle.itemsToCheck;
|
|
194
|
+
const itemsToUncheck = itemsToToggle.itemsToUncheck;
|
|
195
|
+
// check
|
|
196
|
+
for (const rowId of itemsToCheck) {
|
|
197
|
+
await this.chGridPendingForUpdateEl.markRow(rowId, true);
|
|
198
|
+
}
|
|
199
|
+
// uncheck
|
|
200
|
+
for (const rowId of itemsToUncheck) {
|
|
201
|
+
await this.chGridPendingForUpdateEl.markRow(rowId, false);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
this.revertPendingCommitsCheckboxes = async (addedRowsIds, removedRowsId) => {
|
|
206
|
+
if (this.chGridPendingForUpdateEl) {
|
|
207
|
+
for (const rowId of addedRowsIds) {
|
|
208
|
+
await this.chGridPendingForUpdateEl.markRow(rowId, false);
|
|
209
|
+
}
|
|
210
|
+
for (const rowId of removedRowsId) {
|
|
211
|
+
await this.chGridPendingForUpdateEl.markRow(rowId, true);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
this.isLoading = false;
|
|
216
|
+
this.objectScopeText = "all";
|
|
217
|
+
this.openTab = "pending";
|
|
218
|
+
this.revisionScopeText = undefined;
|
|
219
|
+
this.showFilter = false;
|
|
220
|
+
this.updateData = {
|
|
221
|
+
pendingForUpdate: [],
|
|
222
|
+
ignoredObjects: []
|
|
223
|
+
};
|
|
224
|
+
this.updateResultData = [];
|
|
225
|
+
this.confirmCallback = undefined;
|
|
226
|
+
this.gridContextMenuCallback = undefined;
|
|
227
|
+
this.loadCallback = undefined;
|
|
228
|
+
this.objectsScopeCallback = undefined;
|
|
229
|
+
this.openServerCallback = undefined;
|
|
230
|
+
this.pendingItemCheckedCallback = undefined;
|
|
231
|
+
this.revisionScopeCallback = undefined;
|
|
232
|
+
this.types = undefined;
|
|
233
|
+
this.updateCallback = undefined;
|
|
234
|
+
this.updateFrom = undefined;
|
|
235
|
+
}
|
|
236
|
+
// 6.COMPONENT LIFECYCLE EVENTS //
|
|
237
|
+
async componentWillLoad() {
|
|
238
|
+
this._componentLocale = await Locale.getComponentStrings(this.el);
|
|
239
|
+
this.componentDidLoadEvent.emit(true);
|
|
240
|
+
}
|
|
241
|
+
async componentDidLoad() {
|
|
242
|
+
await this.loadData();
|
|
243
|
+
this.addListeners();
|
|
244
|
+
}
|
|
245
|
+
async componentDidRender() {
|
|
246
|
+
if (this.loadDataCalledFirstTime) {
|
|
247
|
+
// call this method only once
|
|
248
|
+
await this.markAllPendingToUpdateRows();
|
|
249
|
+
// attach "rowMarkingChanged" after rows have been checked for the first time.
|
|
250
|
+
this.chGridPendingForUpdateEl.addEventListener("rowMarkingChanged", this.pendingForUpdatesRowMarkingChangedHandler);
|
|
251
|
+
this.loadDataCalledFirstTime = false;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
// 7.LISTENERS //
|
|
255
|
+
// 8.PUBLIC METHODS API //
|
|
256
|
+
/**
|
|
257
|
+
* Validate necessary data input
|
|
258
|
+
*/
|
|
259
|
+
async validate() {
|
|
260
|
+
const isValid = true;
|
|
261
|
+
return isValid;
|
|
262
|
+
}
|
|
263
|
+
// 10.RENDER() FUNCTION //
|
|
264
|
+
render() {
|
|
265
|
+
return (h(Host, { class: "gx-ide-component" }, h("div", { class: "gx-ide-main-wrapper gx-ide-overflow" }, this.renderOptions(), this.renderFilter(), this.renderData(), h("gxg-container", { displayBorderTop: true }, h("div", { class: "align-center with-gap actions" }, h("gxg-button", { id: "button-update", type: "primary-text-only", onClick: this.update, part: "gxg-button gxg-button--update", disabled: this.isLoading }, this._componentLocale.footer.btnUpdate))))));
|
|
266
|
+
}
|
|
267
|
+
static get is() { return "gx-ide-team-dev-update"; }
|
|
268
|
+
static get encapsulation() { return "shadow"; }
|
|
269
|
+
static get originalStyleUrls() {
|
|
270
|
+
return {
|
|
271
|
+
"$": ["team-dev-update.scss"]
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
static get styleUrls() {
|
|
275
|
+
return {
|
|
276
|
+
"$": ["team-dev-update.css"]
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
static get assetsDirs() { return ["gx-ide-assets/team-dev-update"]; }
|
|
280
|
+
static get properties() {
|
|
281
|
+
return {
|
|
282
|
+
"confirmCallback": {
|
|
283
|
+
"type": "unknown",
|
|
284
|
+
"mutable": false,
|
|
285
|
+
"complexType": {
|
|
286
|
+
"original": "ConfirmCallback",
|
|
287
|
+
"resolved": "(data: any) => Promise<boolean>",
|
|
288
|
+
"references": {
|
|
289
|
+
"ConfirmCallback": {
|
|
290
|
+
"location": "local"
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
"required": true,
|
|
295
|
+
"optional": false,
|
|
296
|
+
"docs": {
|
|
297
|
+
"tags": [],
|
|
298
|
+
"text": "This is a function provided by the developer that init the process of import a design."
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
"gridContextMenuCallback": {
|
|
302
|
+
"type": "unknown",
|
|
303
|
+
"mutable": false,
|
|
304
|
+
"complexType": {
|
|
305
|
+
"original": "GridContextMenuCallback",
|
|
306
|
+
"resolved": "(selection: string[], grid: \"results\" | \"update\" | \"ignored\") => Promise<void>",
|
|
307
|
+
"references": {
|
|
308
|
+
"GridContextMenuCallback": {
|
|
309
|
+
"location": "local"
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"required": true,
|
|
314
|
+
"optional": false,
|
|
315
|
+
"docs": {
|
|
316
|
+
"tags": [],
|
|
317
|
+
"text": "This is a function provided by the developer that return the information of an Image System type of data."
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"loadCallback": {
|
|
321
|
+
"type": "unknown",
|
|
322
|
+
"mutable": false,
|
|
323
|
+
"complexType": {
|
|
324
|
+
"original": "LoadCallback",
|
|
325
|
+
"resolved": "(filters: FiltersData) => Promise<UpdateData>",
|
|
326
|
+
"references": {
|
|
327
|
+
"LoadCallback": {
|
|
328
|
+
"location": "local"
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"required": true,
|
|
333
|
+
"optional": false,
|
|
334
|
+
"docs": {
|
|
335
|
+
"tags": [],
|
|
336
|
+
"text": "This is a function provided by the developer that return the list of types of data loaded from file or url."
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
"objectsScopeCallback": {
|
|
340
|
+
"type": "unknown",
|
|
341
|
+
"mutable": false,
|
|
342
|
+
"complexType": {
|
|
343
|
+
"original": "() => Promise<\"all\" | \"partial\">",
|
|
344
|
+
"resolved": "() => Promise<\"all\" | \"partial\">",
|
|
345
|
+
"references": {
|
|
346
|
+
"Promise": {
|
|
347
|
+
"location": "global"
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
"required": true,
|
|
352
|
+
"optional": false,
|
|
353
|
+
"docs": {
|
|
354
|
+
"tags": [],
|
|
355
|
+
"text": "This is a function provided by the developer to call when the user makes a partial selection from button Change of Scope group."
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
"openServerCallback": {
|
|
359
|
+
"type": "unknown",
|
|
360
|
+
"mutable": false,
|
|
361
|
+
"complexType": {
|
|
362
|
+
"original": "() => Promise<void>",
|
|
363
|
+
"resolved": "() => Promise<void>",
|
|
364
|
+
"references": {
|
|
365
|
+
"Promise": {
|
|
366
|
+
"location": "global"
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"required": true,
|
|
371
|
+
"optional": false,
|
|
372
|
+
"docs": {
|
|
373
|
+
"tags": [],
|
|
374
|
+
"text": "This is a function provided by the developer to call when the user clicked in server url of Update From group."
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"pendingItemCheckedCallback": {
|
|
378
|
+
"type": "unknown",
|
|
379
|
+
"mutable": false,
|
|
380
|
+
"complexType": {
|
|
381
|
+
"original": "PendingItemCheckedCallback",
|
|
382
|
+
"resolved": "(pendingItemsCheckedState: PendingItemsCheckedState) => Promise<PendingItemCheckedResult>",
|
|
383
|
+
"references": {
|
|
384
|
+
"PendingItemCheckedCallback": {
|
|
385
|
+
"location": "local"
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"required": true,
|
|
390
|
+
"optional": false,
|
|
391
|
+
"docs": {
|
|
392
|
+
"tags": [],
|
|
393
|
+
"text": "This is a function provided by the developer that return the information of a Font type of data."
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
"revisionScopeCallback": {
|
|
397
|
+
"type": "unknown",
|
|
398
|
+
"mutable": false,
|
|
399
|
+
"complexType": {
|
|
400
|
+
"original": "() => Promise<string | undefined>",
|
|
401
|
+
"resolved": "() => Promise<string>",
|
|
402
|
+
"references": {
|
|
403
|
+
"Promise": {
|
|
404
|
+
"location": "global"
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
"required": true,
|
|
409
|
+
"optional": false,
|
|
410
|
+
"docs": {
|
|
411
|
+
"tags": [],
|
|
412
|
+
"text": "This is a function provided by the developer to call when the user wants to select the revision to work on."
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"types": {
|
|
416
|
+
"type": "unknown",
|
|
417
|
+
"mutable": false,
|
|
418
|
+
"complexType": {
|
|
419
|
+
"original": "ObjectType[]",
|
|
420
|
+
"resolved": "ObjectType[]",
|
|
421
|
+
"references": {
|
|
422
|
+
"ObjectType": {
|
|
423
|
+
"location": "local"
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
"required": false,
|
|
428
|
+
"optional": false,
|
|
429
|
+
"docs": {
|
|
430
|
+
"tags": [],
|
|
431
|
+
"text": "Possibly values for the filter type"
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
"updateCallback": {
|
|
435
|
+
"type": "unknown",
|
|
436
|
+
"mutable": false,
|
|
437
|
+
"complexType": {
|
|
438
|
+
"original": "UpdateCallback",
|
|
439
|
+
"resolved": "(selection: string[]) => Promise<UpdateResultData[]>",
|
|
440
|
+
"references": {
|
|
441
|
+
"UpdateCallback": {
|
|
442
|
+
"location": "local"
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
"required": true,
|
|
447
|
+
"optional": false,
|
|
448
|
+
"docs": {
|
|
449
|
+
"tags": [],
|
|
450
|
+
"text": "This is a function provided by the developer that return the information of a Design System type of data."
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
"updateFrom": {
|
|
454
|
+
"type": "unknown",
|
|
455
|
+
"mutable": false,
|
|
456
|
+
"complexType": {
|
|
457
|
+
"original": "UpdateFromData",
|
|
458
|
+
"resolved": "UpdateFromData",
|
|
459
|
+
"references": {
|
|
460
|
+
"UpdateFromData": {
|
|
461
|
+
"location": "local"
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
"required": false,
|
|
466
|
+
"optional": false,
|
|
467
|
+
"docs": {
|
|
468
|
+
"tags": [],
|
|
469
|
+
"text": "Information to show in the container of group 'Update From'"
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
static get states() {
|
|
475
|
+
return {
|
|
476
|
+
"isLoading": {},
|
|
477
|
+
"objectScopeText": {},
|
|
478
|
+
"openTab": {},
|
|
479
|
+
"revisionScopeText": {},
|
|
480
|
+
"showFilter": {},
|
|
481
|
+
"updateData": {},
|
|
482
|
+
"updateResultData": {}
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
static get events() {
|
|
486
|
+
return [{
|
|
487
|
+
"method": "componentDidLoadEvent",
|
|
488
|
+
"name": "componentDidLoadEvent",
|
|
489
|
+
"bubbles": true,
|
|
490
|
+
"cancelable": true,
|
|
491
|
+
"composed": true,
|
|
492
|
+
"docs": {
|
|
493
|
+
"tags": [],
|
|
494
|
+
"text": "This event is emitted once just after the component is fully loaded and the first render() occurs."
|
|
495
|
+
},
|
|
496
|
+
"complexType": {
|
|
497
|
+
"original": "boolean",
|
|
498
|
+
"resolved": "boolean",
|
|
499
|
+
"references": {}
|
|
500
|
+
}
|
|
501
|
+
}];
|
|
502
|
+
}
|
|
503
|
+
static get methods() {
|
|
504
|
+
return {
|
|
505
|
+
"validate": {
|
|
506
|
+
"complexType": {
|
|
507
|
+
"signature": "() => Promise<boolean>",
|
|
508
|
+
"parameters": [],
|
|
509
|
+
"references": {
|
|
510
|
+
"Promise": {
|
|
511
|
+
"location": "global"
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
"return": "Promise<boolean>"
|
|
515
|
+
},
|
|
516
|
+
"docs": {
|
|
517
|
+
"text": "Validate necessary data input",
|
|
518
|
+
"tags": []
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
static get elementRef() { return "el"; }
|
|
524
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Name",
|
|
3
|
+
"title": "Partial Selection",
|
|
4
|
+
"tableHead": {
|
|
5
|
+
"name": "Name",
|
|
6
|
+
"type": "Type",
|
|
7
|
+
"description": "Description",
|
|
8
|
+
"modifiedOn": "Modified On"
|
|
9
|
+
},
|
|
10
|
+
"footer": {
|
|
11
|
+
"btnClear": "Clear",
|
|
12
|
+
"btnOk": "Confirm",
|
|
13
|
+
"btnCancel": "Cancel"
|
|
14
|
+
}
|
|
15
|
+
}
|