@genexus/genexus-ide-ui 0.0.32 → 0.0.34
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/format-date-c32a19bd.js +15 -0
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/{gxg-date-picker.cjs.entry.js → gx-ide-entity-selector_2.cjs.entry.js} +81 -0
- package/dist/cjs/gx-ide-object-selector.cjs.entry.js +174 -0
- package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +19 -5
- package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js +3 -2
- package/dist/cjs/gx-ide-test.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/render-combo-items-ef403ec4.js +16 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/common/render-combo-items.js +2 -1
- package/dist/collection/components/_test/test.js +1 -1
- package/dist/collection/components/entity-selector/entity-selector.js +1 -1
- package/dist/collection/components/object-selector/gx-ide-assets/object-selector/langs/object-selector.lang.en.json +36 -0
- package/dist/collection/components/object-selector/gx-ide-assets/object-selector/langs/object-selector.lang.ja.json +3 -0
- package/dist/collection/components/object-selector/gx-ide-assets/object-selector/langs/object-selector.lang.zh.json +3 -0
- package/dist/collection/components/object-selector/object-selector.css +169 -0
- package/dist/collection/components/object-selector/object-selector.js +449 -0
- package/dist/collection/components/team-dev-commit/team-dev-commit.js +20 -6
- package/dist/{esm/gxg-date-picker.entry.js → components/date-picker.js} +47 -11
- package/dist/{esm/gx-ide-entity-selector.entry.js → components/entity-selector.js} +63 -8
- package/dist/components/format-date.js +1 -13
- package/dist/components/gx-ide-entity-selector.js +1 -136
- package/dist/components/gx-ide-object-selector.d.ts +11 -0
- package/dist/components/gx-ide-object-selector.js +350 -0
- package/dist/components/gx-ide-team-dev-commit.js +20 -5
- package/dist/components/gx-ide-team-dev-update.js +2 -1
- package/dist/components/gx-ide-test.js +3 -3
- package/dist/components/gxg-date-picker.js +1 -206
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +1 -0
- package/dist/components/render-combo-items.js +14 -0
- package/dist/esm/format-date-3c7cead5.js +13 -0
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-entity-selector_2.entry.js +252 -0
- package/dist/esm/gx-ide-object-selector.entry.js +170 -0
- package/dist/esm/gx-ide-team-dev-commit.entry.js +19 -5
- package/dist/esm/gx-ide-team-dev-update.entry.js +2 -1
- package/dist/esm/gx-ide-test.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/render-combo-items-84c5ea90.js +14 -0
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/object-selector/langs/object-selector.lang.en.json +36 -0
- package/dist/genexus-ide-ui/gx-ide-assets/object-selector/langs/object-selector.lang.ja.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/object-selector/langs/object-selector.lang.zh.json +3 -0
- package/dist/genexus-ide-ui/p-04e80c6b.entry.js +1 -0
- package/dist/genexus-ide-ui/p-35bc6e3a.entry.js +1 -0
- package/dist/genexus-ide-ui/p-379b0fdc.entry.js +1 -0
- package/dist/genexus-ide-ui/p-98906eb4.js +1 -0
- package/dist/genexus-ide-ui/p-d3c40681.js +1 -0
- package/dist/genexus-ide-ui/p-ee458561.entry.js +1 -0
- package/dist/types/components/_test/test.d.ts +1 -1
- package/dist/types/components/object-selector/object-selector.d.ts +134 -0
- package/dist/types/components/team-dev-commit/team-dev-commit.d.ts +4 -2
- package/dist/types/components.d.ts +131 -8
- package/package.json +1 -1
- package/dist/cjs/format-date-f2c49d1a.js +0 -28
- package/dist/cjs/gx-ide-entity-selector.cjs.entry.js +0 -87
- package/dist/esm/format-date-e9ca0786.js +0 -25
- package/dist/genexus-ide-ui/p-48412811.entry.js +0 -1
- package/dist/genexus-ide-ui/p-72303355.js +0 -1
- package/dist/genexus-ide-ui/p-b2923298.entry.js +0 -1
- package/dist/genexus-ide-ui/p-c580682f.entry.js +0 -1
- package/dist/genexus-ide-ui/p-f794dc13.entry.js +0 -1
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
/* STENCIL IMPORTS */
|
|
2
|
+
import { Host, h } from "@stencil/core";
|
|
3
|
+
/* OTHER LIBRARIES IMPORTS */
|
|
4
|
+
/* CUSTOM IMPORTS */
|
|
5
|
+
import { Locale } from "../../common/locale";
|
|
6
|
+
import { renderComboItems } from "../../common/render-combo-items";
|
|
7
|
+
const FILTER_AFTER_NONE = "none";
|
|
8
|
+
const FILTER_AFTER_DATE_TIME = "afterDateTime";
|
|
9
|
+
const FILTER_AFTER_LAST_BUILD = "afterLastBuild";
|
|
10
|
+
const FILTER_AFTER_IMPORT = "afterImport";
|
|
11
|
+
export class GxIdeObjectSelector {
|
|
12
|
+
constructor() {
|
|
13
|
+
// 9.LOCAL METHODS //
|
|
14
|
+
this.renderFilter = () => {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
return (h("gxg-container", { fieldset: true, displayBorderBottom: true, containerTitle: this._componentLocale.filter.title, part: "filters-container" }, h("div", { class: "grid filter-grid" }, h("gxg-form-text", { "label-position": "above", label: this._componentLocale.filter.pattern, ref: (el) => (this.filterPatternEl = el), value: this.patternValue, part: "filter-pattern" }), h("gxg-combo-box", { "disable-filter": true, label: this._componentLocale.filter.type, value: this.defaultType, disabled: !this.types, "display-validation-styles": true, "display-validation-message": true, ref: (el) => (this.filterTypeEl = el), part: "filter-type" }, renderComboItems((_a = this.types) !== null && _a !== void 0 ? _a : [])), h("gxg-combo-box", { "disable-filter": true, label: this._componentLocale.filter.category, value: this.defaultCategory, disabled: !this.categories, "display-validation-styles": true, "display-validation-message": true, ref: (el) => (this.filterCategoryEl = el), part: "filter-category" }, renderComboItems((_b = this.categories) !== null && _b !== void 0 ? _b : [])), h("gx-ide-entity-selector", { label: this._componentLocale.filter.moduleFolder, "label-position": "above", value: this.defaultModule, defaultValue: this.defaultModule, selectEntityCallback: this.selectModuleCallback, ref: (el) => (this.filterModuleEl = el) }), h("div", { class: "flex with-gap" }, h("gxg-form-checkbox", { label: this._componentLocale.filter.modified, class: "align-center", ref: (el) => (this.filterModifiedEl = el), part: "filter-modified" }), h("gxg-combo-box", { class: { hide: !this.filterModified }, "disable-filter": true, value: this.filterAfterType, "display-validation-styles": true, "display-validation-message": true, ref: (el) => (this.filterAfterTypeEl = el), part: "filter-after-type" }, renderComboItems([
|
|
17
|
+
{
|
|
18
|
+
id: FILTER_AFTER_NONE,
|
|
19
|
+
label: this._componentLocale.filter.modifiedEmpty,
|
|
20
|
+
value: FILTER_AFTER_NONE
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: FILTER_AFTER_DATE_TIME,
|
|
24
|
+
label: this._componentLocale.filter[FILTER_AFTER_DATE_TIME],
|
|
25
|
+
value: FILTER_AFTER_DATE_TIME
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: FILTER_AFTER_IMPORT,
|
|
29
|
+
label: this._componentLocale.filter[FILTER_AFTER_IMPORT],
|
|
30
|
+
value: FILTER_AFTER_IMPORT
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: FILTER_AFTER_LAST_BUILD,
|
|
34
|
+
label: this._componentLocale.filter[FILTER_AFTER_LAST_BUILD],
|
|
35
|
+
value: FILTER_AFTER_LAST_BUILD
|
|
36
|
+
}
|
|
37
|
+
])), h("gxg-form-text", { class: { hide: !this.filterModified }, "label-position": "start", label: this._componentLocale.filter.user, "max-width": "150px", ref: (el) => (this.filterUserEl = el), part: "filter-user" }), h("div", { class: {
|
|
38
|
+
flex: true,
|
|
39
|
+
hide: !this.filterModified ||
|
|
40
|
+
this.filterAfterType !== FILTER_AFTER_DATE_TIME
|
|
41
|
+
}, part: "filter-datetime" }, h("gxg-label", { "label-position": "start" }, this._componentLocale.filter.dateTime), h("gxg-date-picker", { ref: (el) => (this.filterModifiedDateEl = el) }))))));
|
|
42
|
+
};
|
|
43
|
+
this.renderObjects = () => {
|
|
44
|
+
return (h("gxg-container", null, h("gxg-grid", null, h("ch-grid", { "row-selection-mode": this.multiSelection ? "multiple" : "single", ref: (el) => (this.chGridEl = el), part: "ch-grid-objects" }, h("ch-grid-columnset", null, h("ch-grid-column", { "column-name": "", "column-name-position": "text", settingable: false }), h("ch-grid-column", { "column-name": this._componentLocale.tableHead.name, "column-name-position": "text", settingable: false }), h("ch-grid-column", { "column-name": this._componentLocale.tableHead.type, "column-name-position": "text", settingable: false }), h("ch-grid-column", { "column-name": this._componentLocale.tableHead.module, "column-name-position": "text", settingable: false }), h("ch-grid-column", { "column-name": this._componentLocale.tableHead.description, "column-name-position": "text", settingable: false }), h("ch-grid-column", { "column-name": this._componentLocale.tableHead.modifiedDate, "column-name-position": "text", settingable: false }), h("ch-grid-column", { "column-name": this._componentLocale.tableHead.importDate, "column-name-position": "text", settingable: false })), this.objects.map((obj) => (h("ch-grid-row", { rowid: obj.id }, h("ch-grid-cell", null, h("gxg-icon", { type: obj.icon, color: "auto" })), h("ch-grid-cell", null, " ", obj.name, " "), h("ch-grid-cell", null, " ", obj.type, " "), h("ch-grid-cell", null, " ", obj.module, " "), h("ch-grid-cell", null, " ", obj.description, " "), h("ch-grid-cell", null, `${obj.modifiedDate.toISOString().slice(0, 10)}`), h("ch-grid-cell", null, `${obj.importDate.toISOString().slice(0, 10)}`))))))));
|
|
45
|
+
};
|
|
46
|
+
this.getObjects = () => {
|
|
47
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
48
|
+
/* 'modified' checkbox, should only be considered if 'date' || 'user' */
|
|
49
|
+
const modified = this.filterModifiedEl.checked;
|
|
50
|
+
const modifiedAfter = this.filterAfterTypeEl.value;
|
|
51
|
+
const user = (_b = (_a = this.filterUserEl) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim();
|
|
52
|
+
const filters = {
|
|
53
|
+
pattern: (_c = this.filterPatternEl) === null || _c === void 0 ? void 0 : _c.value,
|
|
54
|
+
type: (_d = this.filterTypeEl) === null || _d === void 0 ? void 0 : _d.value,
|
|
55
|
+
category: (_e = this.filterCategoryEl) === null || _e === void 0 ? void 0 : _e.value,
|
|
56
|
+
module: (_g = (_f = this.filterModuleEl) === null || _f === void 0 ? void 0 : _f.value) === null || _g === void 0 ? void 0 : _g.id,
|
|
57
|
+
modifiedAfter: modified && modifiedAfter ? modifiedAfter : null,
|
|
58
|
+
modifiedBy: modified && user ? user : null,
|
|
59
|
+
modifiedDate: modified && modifiedAfter === FILTER_AFTER_DATE_TIME
|
|
60
|
+
? (_h = this.filterModifiedDateEl) === null || _h === void 0 ? void 0 : _h.value
|
|
61
|
+
: null
|
|
62
|
+
};
|
|
63
|
+
this.loadCallback(filters).then((items) => {
|
|
64
|
+
this.objects = items;
|
|
65
|
+
this.selectedObjectsIds = [];
|
|
66
|
+
this.deselectAll();
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
this.openSelectionCallbackHandle = () => {
|
|
70
|
+
this.openSelectionCallback(this.selectedObjectsIds);
|
|
71
|
+
};
|
|
72
|
+
this.cancelCallbackHandle = () => {
|
|
73
|
+
this.cancelCallback();
|
|
74
|
+
};
|
|
75
|
+
this.selectAll = () => {
|
|
76
|
+
this.chGridEl.selectAllRows();
|
|
77
|
+
};
|
|
78
|
+
this.deselectAll = () => {
|
|
79
|
+
this.chGridEl.selectAllRows(false);
|
|
80
|
+
};
|
|
81
|
+
this.newObjectCallbackHandle = () => {
|
|
82
|
+
this.newObjectCallback();
|
|
83
|
+
};
|
|
84
|
+
this.listenChanges = async () => {
|
|
85
|
+
/* pattern*/
|
|
86
|
+
this.filterPatternEl.addEventListener("input", () => {
|
|
87
|
+
this.getObjects();
|
|
88
|
+
});
|
|
89
|
+
/* type*/
|
|
90
|
+
this.filterTypeEl.addEventListener("valueChanged", () => {
|
|
91
|
+
this.getObjects();
|
|
92
|
+
});
|
|
93
|
+
/* category*/
|
|
94
|
+
this.filterCategoryEl.addEventListener("valueChanged", () => {
|
|
95
|
+
this.getObjects();
|
|
96
|
+
});
|
|
97
|
+
/* module/folder*/
|
|
98
|
+
this.filterModuleEl.addEventListener("valueChanged", () => {
|
|
99
|
+
this.getObjects();
|
|
100
|
+
});
|
|
101
|
+
/* modified */
|
|
102
|
+
this.filterModifiedEl.addEventListener("change", (e) => {
|
|
103
|
+
this.filterModified = e.detail.value;
|
|
104
|
+
this.getObjects();
|
|
105
|
+
});
|
|
106
|
+
/* modified after... */
|
|
107
|
+
this.filterAfterTypeEl.addEventListener("valueChanged", () => {
|
|
108
|
+
this.filterAfterType = this.filterAfterTypeEl.value;
|
|
109
|
+
this.getObjects();
|
|
110
|
+
});
|
|
111
|
+
/* user... */
|
|
112
|
+
this.filterUserEl.addEventListener("input", () => {
|
|
113
|
+
this.getObjects();
|
|
114
|
+
});
|
|
115
|
+
/* Date/Time */
|
|
116
|
+
this.filterModifiedDateEl.addEventListener("valueChanged", () => {
|
|
117
|
+
this.getObjects();
|
|
118
|
+
});
|
|
119
|
+
// for grid selection
|
|
120
|
+
this.chGridEl.addEventListener("selectionChanged", (ev) => {
|
|
121
|
+
this.selectedObjectsIds = ev.detail.rowsId;
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
this.filterAfterType = "";
|
|
125
|
+
this.filterModified = false;
|
|
126
|
+
this.objects = [];
|
|
127
|
+
this.selectedObjectsIds = [];
|
|
128
|
+
this.multiSelection = undefined;
|
|
129
|
+
this.patternValue = undefined;
|
|
130
|
+
this.types = undefined;
|
|
131
|
+
this.defaultType = undefined;
|
|
132
|
+
this.categories = undefined;
|
|
133
|
+
this.defaultCategory = undefined;
|
|
134
|
+
this.defaultModule = undefined;
|
|
135
|
+
this.selectModuleCallback = undefined;
|
|
136
|
+
this.cancelCallback = undefined;
|
|
137
|
+
this.loadCallback = undefined;
|
|
138
|
+
this.newObjectCallback = undefined;
|
|
139
|
+
this.openSelectionCallback = undefined;
|
|
140
|
+
}
|
|
141
|
+
// 6.COMPONENT LIFECYCLE EVENTS //
|
|
142
|
+
async componentWillLoad() {
|
|
143
|
+
this._componentLocale = await Locale.getComponentStrings(this.el);
|
|
144
|
+
this.componentDidLoadEvent.emit(true);
|
|
145
|
+
}
|
|
146
|
+
componentDidLoad() {
|
|
147
|
+
this.listenChanges();
|
|
148
|
+
this.getObjects();
|
|
149
|
+
}
|
|
150
|
+
// 7.LISTENERS //
|
|
151
|
+
// 8.PUBLIC METHODS API //
|
|
152
|
+
/**
|
|
153
|
+
* Validate necessary data input
|
|
154
|
+
*/
|
|
155
|
+
async validate() {
|
|
156
|
+
const isValid = true;
|
|
157
|
+
return isValid;
|
|
158
|
+
}
|
|
159
|
+
// 10.RENDER() FUNCTION //
|
|
160
|
+
render() {
|
|
161
|
+
return (h(Host, { class: "gx-ide-component" }, h("div", { class: "gx-ide-main-wrapper gx-ide-overflow" }, this.renderFilter(), this.renderObjects(), h("gxg-container", null, h("div", { class: "grid objects-count" }, h("gxg-text", { class: "align-end", part: "objects-selected" }, `${this.selectedObjectsIds.length} ${this._componentLocale.objCount.selected}`), h("gxg-text", { class: "align-end", part: "objects-matching" }, `${this.objects.length} ${this._componentLocale.objCount.matching}`))), h("gxg-container", { displayBorderTop: true }, h("div", { class: "grid actions" }, h("div", null, h("gxg-button", { id: "button-select-all", type: "primary-text-only", onClick: this.selectAll, part: "gxg-button gxg-button--select-all" }, this._componentLocale.footer.btnSelectAll), h("gxg-button", { id: "button-new", type: "primary-text-only", onClick: this.newObjectCallbackHandle, part: "gxg-button gxg-button--new" }, this._componentLocale.footer.btnNew)), h("div", null, h("gxg-button", { id: "button-ok", type: "primary-text-only", onClick: this.openSelectionCallbackHandle, part: "gxg-button gxg-button--ok" }, this._componentLocale.footer.btnConfirm), h("gxg-button", { id: "button-cancel", type: "outlined", onClick: this.cancelCallbackHandle, part: "gxg-button gxg-button--cancel" }, this._componentLocale.footer.btnCancel)))))));
|
|
162
|
+
}
|
|
163
|
+
static get is() { return "gx-ide-object-selector"; }
|
|
164
|
+
static get encapsulation() { return "shadow"; }
|
|
165
|
+
static get originalStyleUrls() {
|
|
166
|
+
return {
|
|
167
|
+
"$": ["object-selector.scss"]
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
static get styleUrls() {
|
|
171
|
+
return {
|
|
172
|
+
"$": ["object-selector.css"]
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
static get assetsDirs() { return ["gx-ide-assets/object-selector"]; }
|
|
176
|
+
static get properties() {
|
|
177
|
+
return {
|
|
178
|
+
"multiSelection": {
|
|
179
|
+
"type": "boolean",
|
|
180
|
+
"mutable": false,
|
|
181
|
+
"complexType": {
|
|
182
|
+
"original": "true",
|
|
183
|
+
"resolved": "boolean",
|
|
184
|
+
"references": {}
|
|
185
|
+
},
|
|
186
|
+
"required": false,
|
|
187
|
+
"optional": false,
|
|
188
|
+
"docs": {
|
|
189
|
+
"tags": [],
|
|
190
|
+
"text": "True' if multiple object selection is allowed. Default is 'True'"
|
|
191
|
+
},
|
|
192
|
+
"attribute": "multi-selection",
|
|
193
|
+
"reflect": false
|
|
194
|
+
},
|
|
195
|
+
"patternValue": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"mutable": false,
|
|
198
|
+
"complexType": {
|
|
199
|
+
"original": "string",
|
|
200
|
+
"resolved": "string",
|
|
201
|
+
"references": {}
|
|
202
|
+
},
|
|
203
|
+
"required": false,
|
|
204
|
+
"optional": false,
|
|
205
|
+
"docs": {
|
|
206
|
+
"tags": [],
|
|
207
|
+
"text": "Current value of the input pattern. It is also used to set the default value when initializing the component"
|
|
208
|
+
},
|
|
209
|
+
"attribute": "pattern-value",
|
|
210
|
+
"reflect": false
|
|
211
|
+
},
|
|
212
|
+
"types": {
|
|
213
|
+
"type": "unknown",
|
|
214
|
+
"mutable": false,
|
|
215
|
+
"complexType": {
|
|
216
|
+
"original": "ObjectType[]",
|
|
217
|
+
"resolved": "ObjectType[]",
|
|
218
|
+
"references": {
|
|
219
|
+
"ObjectType": {
|
|
220
|
+
"location": "local"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"required": true,
|
|
225
|
+
"optional": false,
|
|
226
|
+
"docs": {
|
|
227
|
+
"tags": [],
|
|
228
|
+
"text": "The types render in the filter type selector"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"defaultType": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"mutable": false,
|
|
234
|
+
"complexType": {
|
|
235
|
+
"original": "string",
|
|
236
|
+
"resolved": "string",
|
|
237
|
+
"references": {}
|
|
238
|
+
},
|
|
239
|
+
"required": false,
|
|
240
|
+
"optional": false,
|
|
241
|
+
"docs": {
|
|
242
|
+
"tags": [],
|
|
243
|
+
"text": "The default value for the type filter"
|
|
244
|
+
},
|
|
245
|
+
"attribute": "default-type",
|
|
246
|
+
"reflect": false
|
|
247
|
+
},
|
|
248
|
+
"categories": {
|
|
249
|
+
"type": "unknown",
|
|
250
|
+
"mutable": false,
|
|
251
|
+
"complexType": {
|
|
252
|
+
"original": "GxOption[]",
|
|
253
|
+
"resolved": "GxOption[]",
|
|
254
|
+
"references": {
|
|
255
|
+
"GxOption": {
|
|
256
|
+
"location": "import",
|
|
257
|
+
"path": "../../common/types"
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"required": true,
|
|
262
|
+
"optional": false,
|
|
263
|
+
"docs": {
|
|
264
|
+
"tags": [],
|
|
265
|
+
"text": "The categories render in the filter category selector"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"defaultCategory": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"mutable": false,
|
|
271
|
+
"complexType": {
|
|
272
|
+
"original": "string",
|
|
273
|
+
"resolved": "string",
|
|
274
|
+
"references": {}
|
|
275
|
+
},
|
|
276
|
+
"required": false,
|
|
277
|
+
"optional": false,
|
|
278
|
+
"docs": {
|
|
279
|
+
"tags": [],
|
|
280
|
+
"text": "The default id value for the category filter"
|
|
281
|
+
},
|
|
282
|
+
"attribute": "default-category",
|
|
283
|
+
"reflect": false
|
|
284
|
+
},
|
|
285
|
+
"defaultModule": {
|
|
286
|
+
"type": "unknown",
|
|
287
|
+
"mutable": false,
|
|
288
|
+
"complexType": {
|
|
289
|
+
"original": "EntityData",
|
|
290
|
+
"resolved": "{ id: string; name: string; iconSrc?: string; iconColor?: Color; }",
|
|
291
|
+
"references": {
|
|
292
|
+
"EntityData": {
|
|
293
|
+
"location": "import",
|
|
294
|
+
"path": "../entity-selector/entity-selector"
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"required": false,
|
|
299
|
+
"optional": false,
|
|
300
|
+
"docs": {
|
|
301
|
+
"tags": [],
|
|
302
|
+
"text": "The default value for the module/folder filter"
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
"selectModuleCallback": {
|
|
306
|
+
"type": "unknown",
|
|
307
|
+
"mutable": false,
|
|
308
|
+
"complexType": {
|
|
309
|
+
"original": "SelectModuleCallback",
|
|
310
|
+
"resolved": "() => Promise<EntityData>",
|
|
311
|
+
"references": {
|
|
312
|
+
"SelectModuleCallback": {
|
|
313
|
+
"location": "local"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"required": false,
|
|
318
|
+
"optional": false,
|
|
319
|
+
"docs": {
|
|
320
|
+
"tags": [],
|
|
321
|
+
"text": "Callback invoked when the action is executed in the Module/Folder filter. It returns the information of the selected object (id and name) or 'undefined' if it was canceled."
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
"cancelCallback": {
|
|
325
|
+
"type": "unknown",
|
|
326
|
+
"mutable": false,
|
|
327
|
+
"complexType": {
|
|
328
|
+
"original": "CancelCallback",
|
|
329
|
+
"resolved": "() => Promise<void>",
|
|
330
|
+
"references": {
|
|
331
|
+
"CancelCallback": {
|
|
332
|
+
"location": "local"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"required": true,
|
|
337
|
+
"optional": false,
|
|
338
|
+
"docs": {
|
|
339
|
+
"tags": [],
|
|
340
|
+
"text": "Callback invoked when the user wishes to cancel the selection of objects."
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"loadCallback": {
|
|
344
|
+
"type": "unknown",
|
|
345
|
+
"mutable": false,
|
|
346
|
+
"complexType": {
|
|
347
|
+
"original": "LoadCallback",
|
|
348
|
+
"resolved": "(filters: ObjectFiltersData) => Promise<ObjectData[]>",
|
|
349
|
+
"references": {
|
|
350
|
+
"LoadCallback": {
|
|
351
|
+
"location": "local"
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
"required": true,
|
|
356
|
+
"optional": false,
|
|
357
|
+
"docs": {
|
|
358
|
+
"tags": [],
|
|
359
|
+
"text": "Callback invoked when the component needs to reload the list of attributes."
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
"newObjectCallback": {
|
|
363
|
+
"type": "unknown",
|
|
364
|
+
"mutable": false,
|
|
365
|
+
"complexType": {
|
|
366
|
+
"original": "NewObjectCallback",
|
|
367
|
+
"resolved": "() => Promise<void>",
|
|
368
|
+
"references": {
|
|
369
|
+
"NewObjectCallback": {
|
|
370
|
+
"location": "local"
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"required": true,
|
|
375
|
+
"optional": false,
|
|
376
|
+
"docs": {
|
|
377
|
+
"tags": [],
|
|
378
|
+
"text": "Callback invoked when the user presses the 'New' button."
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"openSelectionCallback": {
|
|
382
|
+
"type": "unknown",
|
|
383
|
+
"mutable": false,
|
|
384
|
+
"complexType": {
|
|
385
|
+
"original": "OpenSelectionCallback",
|
|
386
|
+
"resolved": "(ids: string[]) => Promise<void>",
|
|
387
|
+
"references": {
|
|
388
|
+
"OpenSelectionCallback": {
|
|
389
|
+
"location": "local"
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
"required": true,
|
|
394
|
+
"optional": false,
|
|
395
|
+
"docs": {
|
|
396
|
+
"tags": [],
|
|
397
|
+
"text": "This is a function provided by the developer for expanded the data of object that is double-clicked or entered."
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
static get states() {
|
|
403
|
+
return {
|
|
404
|
+
"filterAfterType": {},
|
|
405
|
+
"filterModified": {},
|
|
406
|
+
"objects": {},
|
|
407
|
+
"selectedObjectsIds": {}
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
static get events() {
|
|
411
|
+
return [{
|
|
412
|
+
"method": "componentDidLoadEvent",
|
|
413
|
+
"name": "componentDidLoadEvent",
|
|
414
|
+
"bubbles": true,
|
|
415
|
+
"cancelable": true,
|
|
416
|
+
"composed": true,
|
|
417
|
+
"docs": {
|
|
418
|
+
"tags": [],
|
|
419
|
+
"text": "This event is emitted once just after the component is fully loaded and the first render() occurs."
|
|
420
|
+
},
|
|
421
|
+
"complexType": {
|
|
422
|
+
"original": "boolean",
|
|
423
|
+
"resolved": "boolean",
|
|
424
|
+
"references": {}
|
|
425
|
+
}
|
|
426
|
+
}];
|
|
427
|
+
}
|
|
428
|
+
static get methods() {
|
|
429
|
+
return {
|
|
430
|
+
"validate": {
|
|
431
|
+
"complexType": {
|
|
432
|
+
"signature": "() => Promise<boolean>",
|
|
433
|
+
"parameters": [],
|
|
434
|
+
"references": {
|
|
435
|
+
"Promise": {
|
|
436
|
+
"location": "global"
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
"return": "Promise<boolean>"
|
|
440
|
+
},
|
|
441
|
+
"docs": {
|
|
442
|
+
"text": "Validate necessary data input",
|
|
443
|
+
"tags": []
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
static get elementRef() { return "el"; }
|
|
449
|
+
}
|
|
@@ -8,6 +8,16 @@ export class GxIdeTeamDevCommit {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
this.loadDataCalledFirstTime = false; // pending commits grid checkboxes, should be checked, after loadData has loaded commits for the first time.
|
|
10
10
|
// 9.LOCAL METHODS //
|
|
11
|
+
this.conditionToCommit = async () => {
|
|
12
|
+
const commitComment = !!this.commitCommentEl.value.length;
|
|
13
|
+
const pendingChecked = await this.chGridPendingCommitsEl.getMarkedRows();
|
|
14
|
+
if (commitComment && pendingChecked.length > 0) {
|
|
15
|
+
this.commitButtonEnabled = true;
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
this.commitButtonEnabled = false;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
11
21
|
this.markAllPendingCommitsRows = () => {
|
|
12
22
|
this.chGridPendingCommitsEl.markAllRows();
|
|
13
23
|
};
|
|
@@ -75,6 +85,7 @@ export class GxIdeTeamDevCommit {
|
|
|
75
85
|
else {
|
|
76
86
|
await this.togglePendingCommitsCheckboxes(pendingItemCheckedResult);
|
|
77
87
|
}
|
|
88
|
+
this.conditionToCommit();
|
|
78
89
|
this.chGridPendingCommitsEl.addEventListener("rowMarkingChanged", this.pendingCommitsRowMarkingChangedHandler);
|
|
79
90
|
}
|
|
80
91
|
};
|
|
@@ -118,11 +129,11 @@ export class GxIdeTeamDevCommit {
|
|
|
118
129
|
}
|
|
119
130
|
};
|
|
120
131
|
this.commitCallbackHandler = async () => {
|
|
121
|
-
const
|
|
132
|
+
const commitCommentEl = this.commitCommentEl.value;
|
|
122
133
|
this.chGridPendingCommitsEl
|
|
123
134
|
.getMarkedRows()
|
|
124
135
|
.then(async (pendingCommitsCheckedIds) => {
|
|
125
|
-
await this.commitCallback(pendingCommitsCheckedIds,
|
|
136
|
+
await this.commitCallback(pendingCommitsCheckedIds, commitCommentEl);
|
|
126
137
|
/* returns boolean*/
|
|
127
138
|
});
|
|
128
139
|
};
|
|
@@ -148,6 +159,7 @@ export class GxIdeTeamDevCommit {
|
|
|
148
159
|
this.comment = "";
|
|
149
160
|
this.pendingCommits = [];
|
|
150
161
|
this.ignoredObjects = [];
|
|
162
|
+
this.commitButtonEnabled = false;
|
|
151
163
|
this.changeSet = undefined;
|
|
152
164
|
this.types = undefined;
|
|
153
165
|
this.folders = undefined;
|
|
@@ -167,6 +179,7 @@ export class GxIdeTeamDevCommit {
|
|
|
167
179
|
await this.loadData();
|
|
168
180
|
this.loadDataCalledFirstTime = true;
|
|
169
181
|
this.componentDidLoadEvent.emit(true);
|
|
182
|
+
this.conditionToCommit();
|
|
170
183
|
}
|
|
171
184
|
async componentDidRender() {
|
|
172
185
|
if (this.loadDataCalledFirstTime) {
|
|
@@ -187,8 +200,8 @@ export class GxIdeTeamDevCommit {
|
|
|
187
200
|
}
|
|
188
201
|
// 10.RENDER() FUNCTION //
|
|
189
202
|
render() {
|
|
190
|
-
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.
|
|
191
|
-
(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))))));
|
|
203
|
+
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 " +
|
|
204
|
+
(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))))));
|
|
192
205
|
}
|
|
193
206
|
static get is() { return "gx-ide-team-dev-commit"; }
|
|
194
207
|
static get encapsulation() { return "shadow"; }
|
|
@@ -328,7 +341,7 @@ export class GxIdeTeamDevCommit {
|
|
|
328
341
|
"mutable": false,
|
|
329
342
|
"complexType": {
|
|
330
343
|
"original": "CommitCallback",
|
|
331
|
-
"resolved": "(selection: string[],
|
|
344
|
+
"resolved": "(selection: string[], commitCommentEl: string) => Promise<boolean>",
|
|
332
345
|
"references": {
|
|
333
346
|
"CommitCallback": {
|
|
334
347
|
"location": "local"
|
|
@@ -406,7 +419,8 @@ export class GxIdeTeamDevCommit {
|
|
|
406
419
|
"filtersHidden": {},
|
|
407
420
|
"comment": {},
|
|
408
421
|
"pendingCommits": {},
|
|
409
|
-
"ignoredObjects": {}
|
|
422
|
+
"ignoredObjects": {},
|
|
423
|
+
"commitButtonEnabled": {}
|
|
410
424
|
};
|
|
411
425
|
}
|
|
412
426
|
static get events() {
|