@genexus/genexus-ide-ui 0.0.31 → 0.0.32
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 +2 -2
- 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 +11 -17
- 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 +3 -3
- 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 +2 -2
- 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-b2923298.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 +8 -15
- 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
|
@@ -6,41 +6,36 @@ import { Locale } from "../../common/locale";
|
|
|
6
6
|
export class GxIdeTeamDevUpdatePartialSelection {
|
|
7
7
|
constructor() {
|
|
8
8
|
// 9.LOCAL METHODS //
|
|
9
|
-
this.handleKeyDownEvent = (add) => {
|
|
10
|
-
if (add) {
|
|
11
|
-
document.addEventListener("keydown", this.keyDownEventHandler);
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
document.removeEventListener("keydown", this.keyDownEventHandler);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
this.keyDownEventHandler = (e) => {
|
|
18
|
-
console.log(e.detail);
|
|
19
|
-
};
|
|
20
9
|
this.renderObjects = () => {
|
|
21
|
-
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)}`)))))));
|
|
10
|
+
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)}`)))))));
|
|
22
11
|
};
|
|
23
|
-
this.
|
|
12
|
+
this.getObjectsHandler = () => {
|
|
24
13
|
this.addCallback().then((items) => {
|
|
25
14
|
if ((items === null || items === void 0 ? void 0 : items.length) > 0) {
|
|
26
15
|
this.selection = [...this.selection, ...items];
|
|
27
16
|
this.selectedObjectsIds = [];
|
|
28
|
-
this.
|
|
17
|
+
this.deselectAllHandler();
|
|
29
18
|
}
|
|
30
19
|
});
|
|
31
20
|
};
|
|
32
|
-
this.
|
|
21
|
+
this.removeObjectsHandler = () => {
|
|
33
22
|
this.selection = this.selection.filter(item => !this.selectedObjectsIds.includes(item.id));
|
|
34
23
|
this.selectedObjectsIds = [];
|
|
35
|
-
this.
|
|
24
|
+
this.deselectAllHandler();
|
|
36
25
|
};
|
|
37
|
-
this.
|
|
38
|
-
this.confirmCallback
|
|
26
|
+
this.confirmHandler = () => {
|
|
27
|
+
if (this.confirmCallback) {
|
|
28
|
+
const allRowsIds = [];
|
|
29
|
+
this.selection.forEach(row => {
|
|
30
|
+
allRowsIds.push(row.id);
|
|
31
|
+
});
|
|
32
|
+
this.confirmCallback(allRowsIds);
|
|
33
|
+
}
|
|
39
34
|
};
|
|
40
|
-
this.
|
|
35
|
+
this.cancelHandler = () => {
|
|
41
36
|
this.cancelCallback();
|
|
42
37
|
};
|
|
43
|
-
this.
|
|
38
|
+
this.deselectAllHandler = () => {
|
|
44
39
|
this.chGridEl.selectAllRows(false);
|
|
45
40
|
};
|
|
46
41
|
this.listenChanges = () => {
|
|
@@ -59,21 +54,11 @@ export class GxIdeTeamDevUpdatePartialSelection {
|
|
|
59
54
|
async componentWillLoad() {
|
|
60
55
|
this._componentLocale = await Locale.getComponentStrings(this.el);
|
|
61
56
|
this.componentDidLoadEvent.emit(true);
|
|
62
|
-
this.handleKeyDownEvent(true);
|
|
63
57
|
}
|
|
64
58
|
componentDidLoad() {
|
|
65
59
|
this.listenChanges();
|
|
66
60
|
}
|
|
67
61
|
// 7.LISTENERS //
|
|
68
|
-
keyDownHandler(eventInfo) {
|
|
69
|
-
if (document.activeElement === this.el) {
|
|
70
|
-
switch (eventInfo.key) {
|
|
71
|
-
case "Delete":
|
|
72
|
-
this.removeObjects();
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
62
|
// 8.PUBLIC METHODS API //
|
|
78
63
|
/**
|
|
79
64
|
* Validate necessary data input
|
|
@@ -86,7 +71,7 @@ export class GxIdeTeamDevUpdatePartialSelection {
|
|
|
86
71
|
render() {
|
|
87
72
|
return (h(Host, { class: {
|
|
88
73
|
"gxi-team-dev-update-partial-selection": true
|
|
89
|
-
} }, h("div", { class: `main-wrapper` }, h("gxg-container", { containerTitle: this._componentLocale.title }, h("div", { class: "top-actions" }, h("gxg-button", { id: "button-add", type: "
|
|
74
|
+
} }, 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))))))));
|
|
90
75
|
}
|
|
91
76
|
static get is() { return "gx-ide-team-dev-update-partial-selection"; }
|
|
92
77
|
static get encapsulation() { return "shadow"; }
|
|
@@ -107,10 +92,10 @@ export class GxIdeTeamDevUpdatePartialSelection {
|
|
|
107
92
|
"type": "unknown",
|
|
108
93
|
"mutable": false,
|
|
109
94
|
"complexType": {
|
|
110
|
-
"original": "
|
|
95
|
+
"original": "AddCallback",
|
|
111
96
|
"resolved": "() => Promise<ObjectData[]>",
|
|
112
97
|
"references": {
|
|
113
|
-
"
|
|
98
|
+
"AddCallback": {
|
|
114
99
|
"location": "local"
|
|
115
100
|
}
|
|
116
101
|
}
|
|
@@ -126,10 +111,10 @@ export class GxIdeTeamDevUpdatePartialSelection {
|
|
|
126
111
|
"type": "unknown",
|
|
127
112
|
"mutable": false,
|
|
128
113
|
"complexType": {
|
|
129
|
-
"original": "
|
|
114
|
+
"original": "CancelCallback",
|
|
130
115
|
"resolved": "() => Promise<void>",
|
|
131
116
|
"references": {
|
|
132
|
-
"
|
|
117
|
+
"CancelCallback": {
|
|
133
118
|
"location": "local"
|
|
134
119
|
}
|
|
135
120
|
}
|
|
@@ -145,10 +130,10 @@ export class GxIdeTeamDevUpdatePartialSelection {
|
|
|
145
130
|
"type": "unknown",
|
|
146
131
|
"mutable": false,
|
|
147
132
|
"complexType": {
|
|
148
|
-
"original": "
|
|
133
|
+
"original": "ConfirmCallback",
|
|
149
134
|
"resolved": "(ids: string[]) => Promise<void>",
|
|
150
135
|
"references": {
|
|
151
|
-
"
|
|
136
|
+
"ConfirmCallback": {
|
|
152
137
|
"location": "local"
|
|
153
138
|
}
|
|
154
139
|
}
|
|
@@ -226,13 +211,4 @@ export class GxIdeTeamDevUpdatePartialSelection {
|
|
|
226
211
|
};
|
|
227
212
|
}
|
|
228
213
|
static get elementRef() { return "el"; }
|
|
229
|
-
static get listeners() {
|
|
230
|
-
return [{
|
|
231
|
-
"name": "keydown",
|
|
232
|
-
"method": "keyDownHandler",
|
|
233
|
-
"target": undefined,
|
|
234
|
-
"capture": false,
|
|
235
|
-
"passive": true
|
|
236
|
-
}];
|
|
237
|
-
}
|
|
238
214
|
}
|
package/dist/collection/components/team-dev-update-to-revision/team-dev-update-to-revision.js
CHANGED
|
@@ -6,6 +6,14 @@ import { Locale } from "../../common/locale";
|
|
|
6
6
|
export class GxIdeTeamDevUpdateToRevision {
|
|
7
7
|
constructor() {
|
|
8
8
|
// 9.LOCAL METHODS //
|
|
9
|
+
this.setInitialCheckedRadio = () => {
|
|
10
|
+
if (this.currentRevision === undefined) {
|
|
11
|
+
this.updateToLatestEl.checked = true;
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
this.updateToRevisionEl.checked = true;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
9
17
|
this.confirm = () => {
|
|
10
18
|
let revision = undefined;
|
|
11
19
|
if (this.updateToRevisionEl.checked) {
|
|
@@ -16,13 +24,20 @@ export class GxIdeTeamDevUpdateToRevision {
|
|
|
16
24
|
this.cancel = () => {
|
|
17
25
|
this.cancelCallback();
|
|
18
26
|
};
|
|
27
|
+
this.updateToRevisionOnFocusHandler = () => {
|
|
28
|
+
this.updateToRevisionEl.checked = true;
|
|
29
|
+
};
|
|
19
30
|
this.cancelCallback = undefined;
|
|
20
31
|
this.confirmCallback = undefined;
|
|
32
|
+
this.currentRevision = undefined;
|
|
21
33
|
}
|
|
22
34
|
// 6.COMPONENT LIFECYCLE EVENTS //
|
|
23
35
|
async componentWillLoad() {
|
|
24
36
|
this._componentLocale = await Locale.getComponentStrings(this.el);
|
|
37
|
+
}
|
|
38
|
+
componentDidLoad() {
|
|
25
39
|
this.componentDidLoadEvent.emit(true);
|
|
40
|
+
this.setInitialCheckedRadio();
|
|
26
41
|
}
|
|
27
42
|
// 7.LISTENERS //
|
|
28
43
|
// 8.PUBLIC METHODS API //
|
|
@@ -37,7 +52,7 @@ export class GxIdeTeamDevUpdateToRevision {
|
|
|
37
52
|
render() {
|
|
38
53
|
return (h(Host, { class: {
|
|
39
54
|
"gxi-team-dev-update-to-revision": true
|
|
40
|
-
} }, 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: "
|
|
55
|
+
} }, 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))))));
|
|
41
56
|
}
|
|
42
57
|
static get is() { return "gx-ide-team-dev-update-to-revision"; }
|
|
43
58
|
static get encapsulation() { return "shadow"; }
|
|
@@ -91,6 +106,23 @@ export class GxIdeTeamDevUpdateToRevision {
|
|
|
91
106
|
"tags": [],
|
|
92
107
|
"text": "This is a function provided by the developer and is invoked when the action confirm is executed passing the selected objects of the grid"
|
|
93
108
|
}
|
|
109
|
+
},
|
|
110
|
+
"currentRevision": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"mutable": false,
|
|
113
|
+
"complexType": {
|
|
114
|
+
"original": "string | undefined",
|
|
115
|
+
"resolved": "string",
|
|
116
|
+
"references": {}
|
|
117
|
+
},
|
|
118
|
+
"required": false,
|
|
119
|
+
"optional": false,
|
|
120
|
+
"docs": {
|
|
121
|
+
"tags": [],
|
|
122
|
+
"text": "Set an initial value for the review"
|
|
123
|
+
},
|
|
124
|
+
"attribute": "current-revision",
|
|
125
|
+
"reflect": false
|
|
94
126
|
}
|
|
95
127
|
};
|
|
96
128
|
}
|
|
@@ -93,7 +93,7 @@ const GxIdeTeamDevCommit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
93
93
|
if (this.chGridPendingCommitsEl) {
|
|
94
94
|
const addedRowsIds = e.detail.addedRowsId;
|
|
95
95
|
const removedRowsId = e.detail.removedRowsId;
|
|
96
|
-
const pendingItemCheckedResult = await this.
|
|
96
|
+
const pendingItemCheckedResult = await this.pendingItemsCheckedCallback({
|
|
97
97
|
itemsChecked: addedRowsIds,
|
|
98
98
|
itemsUnchecked: removedRowsId
|
|
99
99
|
});
|
|
@@ -185,7 +185,7 @@ const GxIdeTeamDevCommit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
185
185
|
this.loadCallback = undefined;
|
|
186
186
|
this.commitCallback = undefined;
|
|
187
187
|
this.selectCallback = undefined;
|
|
188
|
-
this.
|
|
188
|
+
this.pendingItemsCheckedCallback = undefined;
|
|
189
189
|
this.objectsContextMenuCallback = undefined;
|
|
190
190
|
}
|
|
191
191
|
// 6.COMPONENT LIFECYCLE METHODS //
|
|
@@ -231,7 +231,7 @@ const GxIdeTeamDevCommit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
231
231
|
"loadCallback": [16],
|
|
232
232
|
"commitCallback": [16],
|
|
233
233
|
"selectCallback": [16],
|
|
234
|
-
"
|
|
234
|
+
"pendingItemsCheckedCallback": [16],
|
|
235
235
|
"objectsContextMenuCallback": [16],
|
|
236
236
|
"filtersHidden": [32],
|
|
237
237
|
"comment": [32],
|
|
@@ -16,7 +16,7 @@ import { d as defineCustomElement$4 } from './gxg-grid2.js';
|
|
|
16
16
|
import { d as defineCustomElement$3 } from './icon2.js';
|
|
17
17
|
import { d as defineCustomElement$2 } from './title.js';
|
|
18
18
|
|
|
19
|
-
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}";
|
|
19
|
+
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}";
|
|
20
20
|
|
|
21
21
|
const GxIdeTeamDevUpdatePartialSelection$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
22
22
|
constructor() {
|
|
@@ -25,41 +25,36 @@ const GxIdeTeamDevUpdatePartialSelection$1 = /*@__PURE__*/ proxyCustomElement(cl
|
|
|
25
25
|
this.__attachShadow();
|
|
26
26
|
this.componentDidLoadEvent = createEvent(this, "componentDidLoadEvent", 7);
|
|
27
27
|
// 9.LOCAL METHODS //
|
|
28
|
-
this.handleKeyDownEvent = (add) => {
|
|
29
|
-
if (add) {
|
|
30
|
-
document.addEventListener("keydown", this.keyDownEventHandler);
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
document.removeEventListener("keydown", this.keyDownEventHandler);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
this.keyDownEventHandler = (e) => {
|
|
37
|
-
console.log(e.detail);
|
|
38
|
-
};
|
|
39
28
|
this.renderObjects = () => {
|
|
40
|
-
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)}`)))))));
|
|
29
|
+
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)}`)))))));
|
|
41
30
|
};
|
|
42
|
-
this.
|
|
31
|
+
this.getObjectsHandler = () => {
|
|
43
32
|
this.addCallback().then((items) => {
|
|
44
33
|
if ((items === null || items === void 0 ? void 0 : items.length) > 0) {
|
|
45
34
|
this.selection = [...this.selection, ...items];
|
|
46
35
|
this.selectedObjectsIds = [];
|
|
47
|
-
this.
|
|
36
|
+
this.deselectAllHandler();
|
|
48
37
|
}
|
|
49
38
|
});
|
|
50
39
|
};
|
|
51
|
-
this.
|
|
40
|
+
this.removeObjectsHandler = () => {
|
|
52
41
|
this.selection = this.selection.filter(item => !this.selectedObjectsIds.includes(item.id));
|
|
53
42
|
this.selectedObjectsIds = [];
|
|
54
|
-
this.
|
|
43
|
+
this.deselectAllHandler();
|
|
55
44
|
};
|
|
56
|
-
this.
|
|
57
|
-
this.confirmCallback
|
|
45
|
+
this.confirmHandler = () => {
|
|
46
|
+
if (this.confirmCallback) {
|
|
47
|
+
const allRowsIds = [];
|
|
48
|
+
this.selection.forEach(row => {
|
|
49
|
+
allRowsIds.push(row.id);
|
|
50
|
+
});
|
|
51
|
+
this.confirmCallback(allRowsIds);
|
|
52
|
+
}
|
|
58
53
|
};
|
|
59
|
-
this.
|
|
54
|
+
this.cancelHandler = () => {
|
|
60
55
|
this.cancelCallback();
|
|
61
56
|
};
|
|
62
|
-
this.
|
|
57
|
+
this.deselectAllHandler = () => {
|
|
63
58
|
this.chGridEl.selectAllRows(false);
|
|
64
59
|
};
|
|
65
60
|
this.listenChanges = () => {
|
|
@@ -78,21 +73,11 @@ const GxIdeTeamDevUpdatePartialSelection$1 = /*@__PURE__*/ proxyCustomElement(cl
|
|
|
78
73
|
async componentWillLoad() {
|
|
79
74
|
this._componentLocale = await Locale.getComponentStrings(this.el);
|
|
80
75
|
this.componentDidLoadEvent.emit(true);
|
|
81
|
-
this.handleKeyDownEvent(true);
|
|
82
76
|
}
|
|
83
77
|
componentDidLoad() {
|
|
84
78
|
this.listenChanges();
|
|
85
79
|
}
|
|
86
80
|
// 7.LISTENERS //
|
|
87
|
-
keyDownHandler(eventInfo) {
|
|
88
|
-
if (document.activeElement === this.el) {
|
|
89
|
-
switch (eventInfo.key) {
|
|
90
|
-
case "Delete":
|
|
91
|
-
this.removeObjects();
|
|
92
|
-
break;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
81
|
// 8.PUBLIC METHODS API //
|
|
97
82
|
/**
|
|
98
83
|
* Validate necessary data input
|
|
@@ -105,7 +90,7 @@ const GxIdeTeamDevUpdatePartialSelection$1 = /*@__PURE__*/ proxyCustomElement(cl
|
|
|
105
90
|
render() {
|
|
106
91
|
return (h(Host, { class: {
|
|
107
92
|
"gxi-team-dev-update-partial-selection": true
|
|
108
|
-
} }, h("div", { class: `main-wrapper` }, h("gxg-container", { containerTitle: this._componentLocale.title }, h("div", { class: "top-actions" }, h("gxg-button", { id: "button-add", type: "
|
|
93
|
+
} }, 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))))))));
|
|
109
94
|
}
|
|
110
95
|
static get assetsDirs() { return ["gx-ide-assets/team-dev-update-partial-selection"]; }
|
|
111
96
|
get el() { return this; }
|
|
@@ -117,7 +102,7 @@ const GxIdeTeamDevUpdatePartialSelection$1 = /*@__PURE__*/ proxyCustomElement(cl
|
|
|
117
102
|
"selection": [1040],
|
|
118
103
|
"selectedObjectsIds": [32],
|
|
119
104
|
"validate": [64]
|
|
120
|
-
}
|
|
105
|
+
}]);
|
|
121
106
|
function defineCustomElement$1() {
|
|
122
107
|
if (typeof customElements === "undefined") {
|
|
123
108
|
return;
|
|
@@ -20,6 +20,14 @@ const GxIdeTeamDevUpdateToRevision$1 = /*@__PURE__*/ proxyCustomElement(class ex
|
|
|
20
20
|
this.__attachShadow();
|
|
21
21
|
this.componentDidLoadEvent = createEvent(this, "componentDidLoadEvent", 7);
|
|
22
22
|
// 9.LOCAL METHODS //
|
|
23
|
+
this.setInitialCheckedRadio = () => {
|
|
24
|
+
if (this.currentRevision === undefined) {
|
|
25
|
+
this.updateToLatestEl.checked = true;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
this.updateToRevisionEl.checked = true;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
23
31
|
this.confirm = () => {
|
|
24
32
|
let revision = undefined;
|
|
25
33
|
if (this.updateToRevisionEl.checked) {
|
|
@@ -30,13 +38,20 @@ const GxIdeTeamDevUpdateToRevision$1 = /*@__PURE__*/ proxyCustomElement(class ex
|
|
|
30
38
|
this.cancel = () => {
|
|
31
39
|
this.cancelCallback();
|
|
32
40
|
};
|
|
41
|
+
this.updateToRevisionOnFocusHandler = () => {
|
|
42
|
+
this.updateToRevisionEl.checked = true;
|
|
43
|
+
};
|
|
33
44
|
this.cancelCallback = undefined;
|
|
34
45
|
this.confirmCallback = undefined;
|
|
46
|
+
this.currentRevision = undefined;
|
|
35
47
|
}
|
|
36
48
|
// 6.COMPONENT LIFECYCLE EVENTS //
|
|
37
49
|
async componentWillLoad() {
|
|
38
50
|
this._componentLocale = await Locale.getComponentStrings(this.el);
|
|
51
|
+
}
|
|
52
|
+
componentDidLoad() {
|
|
39
53
|
this.componentDidLoadEvent.emit(true);
|
|
54
|
+
this.setInitialCheckedRadio();
|
|
40
55
|
}
|
|
41
56
|
// 7.LISTENERS //
|
|
42
57
|
// 8.PUBLIC METHODS API //
|
|
@@ -51,7 +66,7 @@ const GxIdeTeamDevUpdateToRevision$1 = /*@__PURE__*/ proxyCustomElement(class ex
|
|
|
51
66
|
render() {
|
|
52
67
|
return (h(Host, { class: {
|
|
53
68
|
"gxi-team-dev-update-to-revision": true
|
|
54
|
-
} }, 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: "
|
|
69
|
+
} }, 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))))));
|
|
55
70
|
}
|
|
56
71
|
static get assetsDirs() { return ["gx-ide-assets/team-dev-update-to-revision"]; }
|
|
57
72
|
get el() { return this; }
|
|
@@ -59,6 +74,7 @@ const GxIdeTeamDevUpdateToRevision$1 = /*@__PURE__*/ proxyCustomElement(class ex
|
|
|
59
74
|
}, [1, "gx-ide-team-dev-update-to-revision", {
|
|
60
75
|
"cancelCallback": [16],
|
|
61
76
|
"confirmCallback": [16],
|
|
77
|
+
"currentRevision": [1, "current-revision"],
|
|
62
78
|
"validate": [64]
|
|
63
79
|
}]);
|
|
64
80
|
function defineCustomElement$1() {
|
|
@@ -39,9 +39,35 @@ const GxIdeTeamDevUpdate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
39
39
|
this.componentDidLoadEvent = createEvent(this, "componentDidLoadEvent", 7);
|
|
40
40
|
this.loadDataCalledFirstTime = false; // pending for update grid checkboxes, should be checked, after loadData has loaded objects for the first time.
|
|
41
41
|
// 9.LOCAL METHODS //
|
|
42
|
+
this.onRowContextMenuHandler = (grid) => async (ev) => {
|
|
43
|
+
if (this.objectsContextMenuCallback) {
|
|
44
|
+
ev.preventDefault();
|
|
45
|
+
ev.stopPropagation();
|
|
46
|
+
let selection = [];
|
|
47
|
+
if (grid === "pending") {
|
|
48
|
+
selection = await this.chGridPendingForUpdateEl.getSelectedRows();
|
|
49
|
+
}
|
|
50
|
+
else if (grid === "ignored") {
|
|
51
|
+
selection = await this.chGridIgnoredObjectsEl.getSelectedRows();
|
|
52
|
+
}
|
|
53
|
+
else if (grid === "results") {
|
|
54
|
+
selection = await this.chGridResultsEl.getSelectedRows();
|
|
55
|
+
}
|
|
56
|
+
await this.objectsContextMenuCallback(grid, {
|
|
57
|
+
selection: selection,
|
|
58
|
+
clientX: ev.detail.clientX,
|
|
59
|
+
clientY: ev.detail.clientY
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
};
|
|
42
63
|
this.markAllPendingToUpdateRows = () => {
|
|
43
64
|
this.chGridPendingForUpdateEl.markAllRows();
|
|
44
65
|
};
|
|
66
|
+
this.gridOnSelectionChangedCallbackHandler = (grid) => async (ev) => {
|
|
67
|
+
if (this.selectCallback) {
|
|
68
|
+
await this.selectCallback(grid, ev.detail.rowsId);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
45
71
|
this.renderOptions = () => {
|
|
46
72
|
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
|
|
47
73
|
? formatDate(this.updateFrom.lastFullUpdate)
|
|
@@ -60,13 +86,13 @@ const GxIdeTeamDevUpdate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
60
86
|
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()))));
|
|
61
87
|
};
|
|
62
88
|
this.renderPendingForUpdate = () => {
|
|
63
|
-
return (h("gxg-grid", null, h("ch-grid", { "row-selection-mode": "
|
|
89
|
+
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, " ")))))));
|
|
64
90
|
};
|
|
65
91
|
this.renderIgnoredObjects = () => {
|
|
66
|
-
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, " ")))))));
|
|
92
|
+
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, " ")))))));
|
|
67
93
|
};
|
|
68
94
|
this.renderResults = () => {
|
|
69
|
-
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 => {
|
|
95
|
+
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 => {
|
|
70
96
|
let msgType;
|
|
71
97
|
switch (msg.type) {
|
|
72
98
|
case "info":
|
|
@@ -173,38 +199,13 @@ const GxIdeTeamDevUpdate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
173
199
|
});
|
|
174
200
|
}
|
|
175
201
|
};
|
|
176
|
-
this.addListeners = async () => {
|
|
177
|
-
// for pending-for-update grid events
|
|
178
|
-
if (this.updateData.pendingForUpdate) {
|
|
179
|
-
this.chGridPendingForUpdateEl.addEventListener("contextmenu", async (ev) => {
|
|
180
|
-
ev.preventDefault();
|
|
181
|
-
ev.stopPropagation();
|
|
182
|
-
const pendingForUpdateMarked = await this.chGridPendingForUpdateEl.getMarkedRows();
|
|
183
|
-
this.gridContextMenuCallback(pendingForUpdateMarked, "update");
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
// for ignored-objects grid events
|
|
187
|
-
this.chGridIgnoredObjectsEl.addEventListener("contextmenu", async (ev) => {
|
|
188
|
-
ev.preventDefault();
|
|
189
|
-
ev.stopPropagation();
|
|
190
|
-
const ignoredObjectsSelected = await this.chGridIgnoredObjectsEl.getSelectedRows();
|
|
191
|
-
this.gridContextMenuCallback(ignoredObjectsSelected, "ignored");
|
|
192
|
-
});
|
|
193
|
-
// for results grid events
|
|
194
|
-
this.chGridResultsEl.addEventListener("contextmenu", async (ev) => {
|
|
195
|
-
ev.preventDefault();
|
|
196
|
-
ev.stopPropagation();
|
|
197
|
-
const resultsObjectsSelected = await this.chGridResultsEl.getMarkedRows();
|
|
198
|
-
this.gridContextMenuCallback(resultsObjectsSelected, "results");
|
|
199
|
-
});
|
|
200
|
-
};
|
|
201
202
|
this.pendingForUpdatesRowMarkingChangedHandler = async (e) => {
|
|
202
203
|
// remove "rowMarkingChanged" until checkboxes have been added/removed on togglePendingCommitsCheckboxes, to prevent loops.
|
|
203
204
|
this.chGridPendingForUpdateEl.removeEventListener("rowMarkingChanged", this.pendingForUpdatesRowMarkingChangedHandler);
|
|
204
205
|
if (this.chGridPendingForUpdateEl) {
|
|
205
206
|
const addedRowsIds = e.detail.addedRowsId;
|
|
206
207
|
const removedRowsId = e.detail.removedRowsId;
|
|
207
|
-
const pendingItemCheckedResult = await this.
|
|
208
|
+
const pendingItemCheckedResult = await this.pendingItemsCheckedCallback({
|
|
208
209
|
itemsChecked: addedRowsIds,
|
|
209
210
|
itemsUnchecked: removedRowsId
|
|
210
211
|
});
|
|
@@ -258,8 +259,10 @@ const GxIdeTeamDevUpdate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
258
259
|
this.loadCallback = undefined;
|
|
259
260
|
this.objectsScopeCallback = undefined;
|
|
260
261
|
this.openServerCallback = undefined;
|
|
261
|
-
this.
|
|
262
|
+
this.pendingItemsCheckedCallback = undefined;
|
|
262
263
|
this.revisionScopeCallback = undefined;
|
|
264
|
+
this.objectsContextMenuCallback = undefined;
|
|
265
|
+
this.selectCallback = undefined;
|
|
263
266
|
this.types = undefined;
|
|
264
267
|
this.updateCallback = undefined;
|
|
265
268
|
this.updateFrom = undefined;
|
|
@@ -271,7 +274,6 @@ const GxIdeTeamDevUpdate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
271
274
|
}
|
|
272
275
|
async componentDidLoad() {
|
|
273
276
|
await this.loadData();
|
|
274
|
-
this.addListeners();
|
|
275
277
|
}
|
|
276
278
|
async componentDidRender() {
|
|
277
279
|
if (this.loadDataCalledFirstTime) {
|
|
@@ -304,8 +306,10 @@ const GxIdeTeamDevUpdate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
304
306
|
"loadCallback": [16],
|
|
305
307
|
"objectsScopeCallback": [16],
|
|
306
308
|
"openServerCallback": [16],
|
|
307
|
-
"
|
|
309
|
+
"pendingItemsCheckedCallback": [16],
|
|
308
310
|
"revisionScopeCallback": [16],
|
|
311
|
+
"objectsContextMenuCallback": [16],
|
|
312
|
+
"selectCallback": [16],
|
|
309
313
|
"types": [16],
|
|
310
314
|
"updateCallback": [16],
|
|
311
315
|
"updateFrom": [16],
|