@genexus/genexus-ide-ui 0.0.40 → 0.0.42
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-icon.cjs.entry.js +116 -0
- package/dist/cjs/{form-validation-f8e709d0.js → common-facb7f18.js} +0 -19
- package/dist/cjs/constants-e63c0ad9.js +10 -0
- package/dist/cjs/form-validation-b7fb4ca8.js +21 -0
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js +137 -0
- package/dist/cjs/{gxg-date-picker.cjs.entry.js → gx-ide-entity-selector_2.cjs.entry.js} +81 -0
- package/dist/cjs/gx-ide-new-environment.cjs.entry.js +3 -2
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js +7 -6
- package/dist/cjs/gx-ide-object-selector.cjs.entry.js +30 -24
- package/dist/cjs/gx-ide-ww-images.cjs.entry.js +229 -0
- package/dist/cjs/{gxg-button.cjs.entry.js → gxg-button_2.cjs.entry.js} +61 -0
- package/dist/cjs/gxg-combo-box_2.cjs.entry.js +705 -0
- package/dist/cjs/gxg-form-checkbox-group.cjs.entry.js +91 -0
- package/dist/cjs/{gxg-form-checkbox-group_2.cjs.entry.js → gxg-form-radio.cjs.entry.js} +0 -85
- package/dist/cjs/gxg-list-box_2.cjs.entry.js +1 -6
- package/dist/cjs/{gxg-combo-box_6.cjs.entry.js → gxg-tab_4.cjs.entry.js} +1 -699
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/common/constants.js +6 -0
- package/dist/collection/components/create-kb-from-server/create-kb-from-server.css +162 -0
- package/dist/collection/components/create-kb-from-server/create-kb-from-server.js +302 -0
- package/dist/collection/components/create-kb-from-server/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.en.json +17 -0
- package/dist/collection/components/create-kb-from-server/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.ja.json +3 -0
- package/dist/collection/components/create-kb-from-server/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.zh.json +3 -0
- package/dist/collection/components/new-kb/new-kb.js +1 -1
- package/dist/collection/components/object-selector/gx-ide-assets/object-selector/langs/object-selector.lang.en.json +1 -1
- package/dist/collection/components/object-selector/object-selector.js +33 -26
- package/dist/collection/components/ww-images/gx-ide-assets/ww-images/langs/ww-images.lang.en.json +47 -0
- package/dist/collection/components/ww-images/gx-ide-assets/ww-images/langs/ww-images.lang.ja.json +3 -0
- package/dist/collection/components/ww-images/gx-ide-assets/ww-images/langs/ww-images.lang.zh.json +3 -0
- package/dist/collection/components/ww-images/ww-images.css +229 -0
- package/dist/collection/components/ww-images/ww-images.js +674 -0
- package/dist/collection/pages/assets/common.js +20 -0
- package/dist/components/combo-box.js +0 -1
- package/dist/components/common.js +46 -0
- package/dist/components/constants.js +8 -0
- package/dist/components/form-validation.js +1 -46
- package/dist/components/gx-ide-create-kb-from-server.d.ts +11 -0
- package/dist/components/gx-ide-create-kb-from-server.js +246 -0
- package/dist/components/gx-ide-new-environment.js +2 -1
- package/dist/components/gx-ide-new-kb.js +3 -2
- package/dist/components/gx-ide-object-selector.js +30 -24
- package/dist/components/gx-ide-ww-images.d.ts +11 -0
- package/dist/components/gx-ide-ww-images.js +421 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/list-box-item.js +0 -1
- package/dist/components/list-box.js +1 -5
- package/dist/esm/ch-icon.entry.js +112 -0
- package/dist/esm/{form-validation-cdb16431.js → common-a3df0966.js} +1 -19
- package/dist/esm/constants-7882d1a8.js +8 -0
- package/dist/esm/form-validation-09bd4504.js +19 -0
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-create-kb-from-server.entry.js +133 -0
- package/dist/esm/{gxg-date-picker.entry.js → gx-ide-entity-selector_2.entry.js} +81 -1
- package/dist/esm/gx-ide-new-environment.entry.js +2 -1
- package/dist/esm/gx-ide-new-kb.entry.js +3 -2
- package/dist/esm/gx-ide-object-selector.entry.js +30 -24
- package/dist/esm/gx-ide-ww-images.entry.js +225 -0
- package/dist/esm/{gxg-button.entry.js → gxg-button_2.entry.js} +62 -2
- package/dist/esm/gxg-combo-box_2.entry.js +700 -0
- package/dist/esm/gxg-form-checkbox-group.entry.js +87 -0
- package/dist/esm/{gxg-form-checkbox-group_2.entry.js → gxg-form-radio.entry.js} +1 -85
- package/dist/esm/gxg-list-box_2.entry.js +1 -6
- package/dist/esm/{gxg-combo-box_6.entry.js → gxg-tab_4.entry.js} +3 -699
- 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/create-kb-from-server/langs/create-kb-from-server.lang.en.json +17 -0
- package/dist/genexus-ide-ui/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.ja.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.zh.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/object-selector/langs/object-selector.lang.en.json +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/ww-images/langs/ww-images.lang.en.json +47 -0
- package/dist/genexus-ide-ui/gx-ide-assets/ww-images/langs/ww-images.lang.ja.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/ww-images/langs/ww-images.lang.zh.json +3 -0
- package/dist/genexus-ide-ui/p-07e89cdd.entry.js +1 -0
- package/dist/genexus-ide-ui/p-35fc1102.entry.js +1 -0
- package/dist/genexus-ide-ui/p-44964acf.js +1 -0
- package/dist/genexus-ide-ui/p-4b7f7425.entry.js +1 -0
- package/dist/genexus-ide-ui/p-4d39c34a.entry.js +1 -0
- package/dist/genexus-ide-ui/p-5ad757f4.entry.js +1 -0
- package/dist/genexus-ide-ui/p-6010dc9d.js +1 -0
- package/dist/genexus-ide-ui/p-764ab316.entry.js +1 -0
- package/dist/genexus-ide-ui/p-7a83018d.entry.js +1 -0
- package/dist/genexus-ide-ui/p-7a90def4.entry.js +1 -0
- package/dist/genexus-ide-ui/p-8bf7f0e1.entry.js +1 -0
- package/dist/genexus-ide-ui/p-c6ad49cc.entry.js +1 -0
- package/dist/genexus-ide-ui/p-daf4eb69.js +1 -0
- package/dist/genexus-ide-ui/p-f305e4d3.entry.js +1 -0
- package/dist/genexus-ide-ui/p-f3a1dc7c.entry.js +1 -0
- package/dist/genexus-ide-ui/p-fcdcb919.entry.js +1 -0
- package/dist/types/common/constants.d.ts +6 -0
- package/dist/types/components/create-kb-from-server/create-kb-from-server.d.ts +90 -0
- package/dist/types/components/object-selector/object-selector.d.ts +5 -7
- package/dist/types/components/ww-images/ww-images.d.ts +191 -0
- package/dist/types/components.d.ts +271 -3
- package/package.json +3 -3
- package/dist/cjs/ch-icon_2.cjs.entry.js +0 -177
- package/dist/cjs/gx-ide-entity-selector.cjs.entry.js +0 -87
- package/dist/esm/ch-icon_2.entry.js +0 -172
- package/dist/esm/gx-ide-entity-selector.entry.js +0 -83
- package/dist/genexus-ide-ui/p-2ebd392f.entry.js +0 -1
- package/dist/genexus-ide-ui/p-34721f1c.entry.js +0 -1
- package/dist/genexus-ide-ui/p-5884a014.entry.js +0 -1
- package/dist/genexus-ide-ui/p-5c560dd0.entry.js +0 -1
- package/dist/genexus-ide-ui/p-7285d245.entry.js +0 -1
- package/dist/genexus-ide-ui/p-a708db45.entry.js +0 -1
- package/dist/genexus-ide-ui/p-ad03b1e0.entry.js +0 -1
- package/dist/genexus-ide-ui/p-c304345f.entry.js +0 -1
- package/dist/genexus-ide-ui/p-c38c6957.entry.js +0 -1
- package/dist/genexus-ide-ui/p-db945a17.js +0 -1
- package/dist/genexus-ide-ui/p-e1fea866.entry.js +0 -1
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
/* STENCIL IMPORTS */
|
|
2
|
+
import { Host, h } from "@stencil/core";
|
|
3
|
+
import { Locale } from "../../common/locale";
|
|
4
|
+
import { renderFormItems } from "../../common/common";
|
|
5
|
+
import { formSubmitValidation } from "../../common/form-validation";
|
|
6
|
+
export class GxIdeCreateKbFromServer {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.kbIdSelected = null;
|
|
9
|
+
this.authenticationTypes = [];
|
|
10
|
+
// 7.LISTENERS //
|
|
11
|
+
// 8.PUBLIC METHODS API //
|
|
12
|
+
// 9.LOCAL METHODS //
|
|
13
|
+
this.setAuthenticationTypes = () => {
|
|
14
|
+
this.authenticationTypes = [
|
|
15
|
+
{
|
|
16
|
+
id: "genexus",
|
|
17
|
+
value: "genexus",
|
|
18
|
+
label: this._componentLocale.authenticationTypes.genexusAccount
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "local",
|
|
22
|
+
value: "local",
|
|
23
|
+
label: this._componentLocale.authenticationTypes.local
|
|
24
|
+
}
|
|
25
|
+
];
|
|
26
|
+
};
|
|
27
|
+
this.addEventListeners = () => {
|
|
28
|
+
this.serverUrlsEl.addEventListener("valueChanged", () => {
|
|
29
|
+
this.reset();
|
|
30
|
+
});
|
|
31
|
+
this.searchKBEl.addEventListener("valueChanged", (e) => {
|
|
32
|
+
this.kbNameEl.value = "";
|
|
33
|
+
this.kbIdSelected = null;
|
|
34
|
+
this.kbSearchText = e.detail;
|
|
35
|
+
});
|
|
36
|
+
this.listBoxEl.addEventListener("selectionChanged", (ev) => {
|
|
37
|
+
const selectedItems = ev.detail.items;
|
|
38
|
+
let selectedItem;
|
|
39
|
+
if (selectedItems.length > 0) {
|
|
40
|
+
selectedItem = ev.detail.items[0];
|
|
41
|
+
}
|
|
42
|
+
if (selectedItem) {
|
|
43
|
+
this.kbIdSelected = selectedItem.value;
|
|
44
|
+
const kbSelected = this.kbs.find(kb => kb.id === this.kbIdSelected);
|
|
45
|
+
if (kbSelected) {
|
|
46
|
+
this.kbNameEl.value = kbSelected.name;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
this.createKbHandler = () => {
|
|
52
|
+
if (this.createKBCallback) {
|
|
53
|
+
const createKBCallbackPromise = this.createKBCallback({
|
|
54
|
+
id: this.kbIdSelected,
|
|
55
|
+
name: this.kbNameEl.value
|
|
56
|
+
});
|
|
57
|
+
createKBCallbackPromise.then((formSubmitResult) => {
|
|
58
|
+
formSubmitValidation(formSubmitResult, this);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
this.connectCallbackHandler = () => {
|
|
63
|
+
var _a, _b;
|
|
64
|
+
if (this.connectCallback) {
|
|
65
|
+
const connectCallbackPromise = this.connectCallback({
|
|
66
|
+
serverUrl: this.serverUrlsEl.value,
|
|
67
|
+
authenticationType: this.authenticationTypeEl.value,
|
|
68
|
+
user: (_a = this.userNameEl) === null || _a === void 0 ? void 0 : _a.value,
|
|
69
|
+
password: (_b = this.passwordEl) === null || _b === void 0 ? void 0 : _b.value
|
|
70
|
+
});
|
|
71
|
+
connectCallbackPromise.then((connectionResultData) => {
|
|
72
|
+
formSubmitValidation(connectionResultData.formResult, this);
|
|
73
|
+
if (connectionResultData.formResult.success &&
|
|
74
|
+
connectionResultData.kbs) {
|
|
75
|
+
this.kbs = connectionResultData.kbs;
|
|
76
|
+
this.selectionKbDisabled = false;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
this.selectionKbDisabled = true;
|
|
82
|
+
this.kbs = [];
|
|
83
|
+
this.kbSearchText = "";
|
|
84
|
+
this.connectCallback = undefined;
|
|
85
|
+
this.createKBCallback = undefined;
|
|
86
|
+
this.enableCustomServer = false;
|
|
87
|
+
this.kbName = undefined;
|
|
88
|
+
this.password = undefined;
|
|
89
|
+
this.serverUrls = undefined;
|
|
90
|
+
this.userName = undefined;
|
|
91
|
+
}
|
|
92
|
+
// 6.METHODS //
|
|
93
|
+
async componentWillLoad() {
|
|
94
|
+
this._componentLocale = await Locale.getComponentStrings(this.el);
|
|
95
|
+
// this.setInitialValues();
|
|
96
|
+
this.setAuthenticationTypes();
|
|
97
|
+
}
|
|
98
|
+
componentDidLoad() {
|
|
99
|
+
this.serverUrlsEl.focus();
|
|
100
|
+
this.addEventListeners();
|
|
101
|
+
}
|
|
102
|
+
reset() {
|
|
103
|
+
this.kbs = [];
|
|
104
|
+
this.kbIdSelected = null;
|
|
105
|
+
this.selectionKbDisabled = true;
|
|
106
|
+
this.searchKBEl.value = "";
|
|
107
|
+
this.kbSearchText = "";
|
|
108
|
+
}
|
|
109
|
+
// 10.RENDER() FUNCTION //
|
|
110
|
+
// 11.RENDER() FUNCTION //
|
|
111
|
+
render() {
|
|
112
|
+
return (h(Host, { class: { "gx-ide-component": true } }, h("div", { class: `main-wrapper` }, h("gxg-container", null, h("div", { class: "flex" }, h("gxg-label", { labelPosition: "start", class: "kb-label" }, this._componentLocale.label.serverUrl), h("gxg-combo-box", { disableFilter: !this.enableCustomServer, ref: (el) => (this.serverUrlsEl = el), class: "server-urls-combo-box", part: "server-urls" }, this.serverUrls
|
|
113
|
+
? renderFormItems("gxg-combo-box-item", this.serverUrls.map(sUrl => ({
|
|
114
|
+
id: sUrl,
|
|
115
|
+
label: sUrl,
|
|
116
|
+
value: sUrl
|
|
117
|
+
})), "server-urls")
|
|
118
|
+
: null)), h("div", { class: "grid grid-data" }, h("div", null, h("div", { class: "grid grid-data-account" }, h("gxg-combo-box", { disableFilter: true, value: this.authenticationTypes[0].id, ref: (el) => (this.authenticationTypeEl = el), class: "authentication-type", part: "authentication-type", onValueChanged: this.evaluateAuthenticationType }, renderFormItems("gxg-combo-box-item", this.authenticationTypes, "authentication-type")), h("gxg-label", { labelPosition: "start", class: "kb-label" }, `${this._componentLocale.label.userName}:`), h("gxg-form-text", { ref: (el) => (this.userNameEl = el), value: this.userName, class: "user-name", part: "user-name" }), h("gxg-label", { labelPosition: "start", class: "kb-label" }, `${this._componentLocale.label.password}:`), h("gxg-form-text", { password: true, ref: (el) => (this.passwordEl = el), value: this.password, class: "password", part: "password" }), h("div", null, h("gxg-button", { id: "button-connect", type: "primary-text-only", onClick: this.connectCallbackHandler, part: "button-connect" }, this._componentLocale.btn.btnConnect)))), h("div", { class: "grid" }, h("div", { class: "grid-data-kbs" }, h("div", { class: "search-kbs" }, h("gxg-form-text", { ref: (el) => (this.searchKBEl = el), class: "search-kb-input", part: "search-kb", disabled: this.selectionKbDisabled, placeholder: this._componentLocale.label.searchKbs })), h("div", { class: "box-kbs" }, h("gxg-list-box", { id: "max-height", height: "100%", "min-height": "50%", "no-border": true, "single-selection": true, disabled: this.selectionKbDisabled, ref: (el) => (this.listBoxEl = el), part: "kbs", onSelectionChanged: this.kbsOnSelectionChangedHander }, this.kbs
|
|
119
|
+
.filter(kb => kb.name
|
|
120
|
+
.toLowerCase()
|
|
121
|
+
.includes(this.kbSearchText.toLowerCase()))
|
|
122
|
+
.map(kb => (h("gxg-list-box-item", { value: kb.id, key: kb.id }, kb.name)))))), h("div", { class: "grid grid-data-kbs-footer" }, h("gxg-form-text", { ref: (el) => (this.kbNameEl = el), value: this.kbName, class: "kb-name", part: "kb-name", disabled: this.selectionKbDisabled }), h("div", null, h("gxg-button", { id: "button-create", type: "primary-text-only", onClick: this.createKbHandler, part: "button-create", disabled: this.selectionKbDisabled }, this._componentLocale.btn.btnCreate)))))))));
|
|
123
|
+
}
|
|
124
|
+
static get is() { return "gx-ide-create-kb-from-server"; }
|
|
125
|
+
static get encapsulation() { return "shadow"; }
|
|
126
|
+
static get originalStyleUrls() {
|
|
127
|
+
return {
|
|
128
|
+
"$": ["create-kb-from-server.scss"]
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
static get styleUrls() {
|
|
132
|
+
return {
|
|
133
|
+
"$": ["create-kb-from-server.css"]
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
static get assetsDirs() { return ["gx-ide-assets/create-kb-from-server"]; }
|
|
137
|
+
static get properties() {
|
|
138
|
+
return {
|
|
139
|
+
"connectCallback": {
|
|
140
|
+
"type": "unknown",
|
|
141
|
+
"mutable": false,
|
|
142
|
+
"complexType": {
|
|
143
|
+
"original": "(\n data: GXServerConnectionData\n ) => Promise<ConnectionResultData>",
|
|
144
|
+
"resolved": "(data: GXServerConnectionData) => Promise<ConnectionResultData>",
|
|
145
|
+
"references": {
|
|
146
|
+
"GXServerConnectionData": {
|
|
147
|
+
"location": "local"
|
|
148
|
+
},
|
|
149
|
+
"Promise": {
|
|
150
|
+
"location": "global"
|
|
151
|
+
},
|
|
152
|
+
"ConnectionResultData": {
|
|
153
|
+
"location": "local"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"required": false,
|
|
158
|
+
"optional": false,
|
|
159
|
+
"docs": {
|
|
160
|
+
"tags": [],
|
|
161
|
+
"text": "Callback that will be invoked when the user connect to the kb server (\u2018Connect\u2019 button)"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"createKBCallback": {
|
|
165
|
+
"type": "unknown",
|
|
166
|
+
"mutable": false,
|
|
167
|
+
"complexType": {
|
|
168
|
+
"original": "(\n data: CreateKBData\n ) => Promise<FormSubmitResult>",
|
|
169
|
+
"resolved": "(data: CreateKBData) => Promise<FormSubmitResult>",
|
|
170
|
+
"references": {
|
|
171
|
+
"CreateKBData": {
|
|
172
|
+
"location": "local"
|
|
173
|
+
},
|
|
174
|
+
"Promise": {
|
|
175
|
+
"location": "global"
|
|
176
|
+
},
|
|
177
|
+
"FormSubmitResult": {
|
|
178
|
+
"location": "import",
|
|
179
|
+
"path": "../../common/types"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"required": false,
|
|
184
|
+
"optional": false,
|
|
185
|
+
"docs": {
|
|
186
|
+
"tags": [],
|
|
187
|
+
"text": "Callback that will be invoked when the user confirms KB creation (\u2018Create\u2019 button)"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"enableCustomServer": {
|
|
191
|
+
"type": "boolean",
|
|
192
|
+
"mutable": false,
|
|
193
|
+
"complexType": {
|
|
194
|
+
"original": "boolean",
|
|
195
|
+
"resolved": "boolean",
|
|
196
|
+
"references": {}
|
|
197
|
+
},
|
|
198
|
+
"required": false,
|
|
199
|
+
"optional": false,
|
|
200
|
+
"docs": {
|
|
201
|
+
"tags": [],
|
|
202
|
+
"text": "If is true then the user can specify a server url that don't be in the combo box of server urls."
|
|
203
|
+
},
|
|
204
|
+
"attribute": "enable-custom-server",
|
|
205
|
+
"reflect": false,
|
|
206
|
+
"defaultValue": "false"
|
|
207
|
+
},
|
|
208
|
+
"kbName": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"mutable": false,
|
|
211
|
+
"complexType": {
|
|
212
|
+
"original": "string",
|
|
213
|
+
"resolved": "string",
|
|
214
|
+
"references": {}
|
|
215
|
+
},
|
|
216
|
+
"required": false,
|
|
217
|
+
"optional": false,
|
|
218
|
+
"docs": {
|
|
219
|
+
"tags": [],
|
|
220
|
+
"text": "The knowledge base default suggested name"
|
|
221
|
+
},
|
|
222
|
+
"attribute": "kb-name",
|
|
223
|
+
"reflect": false
|
|
224
|
+
},
|
|
225
|
+
"password": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"mutable": false,
|
|
228
|
+
"complexType": {
|
|
229
|
+
"original": "string",
|
|
230
|
+
"resolved": "string",
|
|
231
|
+
"references": {}
|
|
232
|
+
},
|
|
233
|
+
"required": false,
|
|
234
|
+
"optional": false,
|
|
235
|
+
"docs": {
|
|
236
|
+
"tags": [],
|
|
237
|
+
"text": "Password for the database connection."
|
|
238
|
+
},
|
|
239
|
+
"attribute": "password",
|
|
240
|
+
"reflect": false
|
|
241
|
+
},
|
|
242
|
+
"serverUrls": {
|
|
243
|
+
"type": "unknown",
|
|
244
|
+
"mutable": false,
|
|
245
|
+
"complexType": {
|
|
246
|
+
"original": "string[]",
|
|
247
|
+
"resolved": "string[]",
|
|
248
|
+
"references": {}
|
|
249
|
+
},
|
|
250
|
+
"required": true,
|
|
251
|
+
"optional": false,
|
|
252
|
+
"docs": {
|
|
253
|
+
"tags": [],
|
|
254
|
+
"text": "Array of URLs of cataloged servers to be displayed in the combo"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"userName": {
|
|
258
|
+
"type": "string",
|
|
259
|
+
"mutable": false,
|
|
260
|
+
"complexType": {
|
|
261
|
+
"original": "string",
|
|
262
|
+
"resolved": "string",
|
|
263
|
+
"references": {}
|
|
264
|
+
},
|
|
265
|
+
"required": false,
|
|
266
|
+
"optional": false,
|
|
267
|
+
"docs": {
|
|
268
|
+
"tags": [],
|
|
269
|
+
"text": "Username for the database connection."
|
|
270
|
+
},
|
|
271
|
+
"attribute": "user-name",
|
|
272
|
+
"reflect": false
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
static get states() {
|
|
277
|
+
return {
|
|
278
|
+
"selectionKbDisabled": {},
|
|
279
|
+
"kbs": {},
|
|
280
|
+
"kbSearchText": {}
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
static get events() {
|
|
284
|
+
return [{
|
|
285
|
+
"method": "componentDidLoadEvent",
|
|
286
|
+
"name": "componentDidLoadEvent",
|
|
287
|
+
"bubbles": true,
|
|
288
|
+
"cancelable": true,
|
|
289
|
+
"composed": true,
|
|
290
|
+
"docs": {
|
|
291
|
+
"tags": [],
|
|
292
|
+
"text": "This event is emitted once just after the component is fully loaded and the first render() occurs"
|
|
293
|
+
},
|
|
294
|
+
"complexType": {
|
|
295
|
+
"original": "boolean",
|
|
296
|
+
"resolved": "boolean",
|
|
297
|
+
"references": {}
|
|
298
|
+
}
|
|
299
|
+
}];
|
|
300
|
+
}
|
|
301
|
+
static get elementRef() { return "el"; }
|
|
302
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"label": {
|
|
3
|
+
"serverUrl": "GXServer URL",
|
|
4
|
+
"authenticationType": "Authentication Type",
|
|
5
|
+
"userName": "User Name",
|
|
6
|
+
"password": "Password",
|
|
7
|
+
"searchKbs": "Search KBs"
|
|
8
|
+
},
|
|
9
|
+
"authenticationTypes": {
|
|
10
|
+
"genexusAccount": "GeneXus Account",
|
|
11
|
+
"local": "Local"
|
|
12
|
+
},
|
|
13
|
+
"btn": {
|
|
14
|
+
"btnCreate": "Create",
|
|
15
|
+
"btnConnect": "Connect >>"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -124,7 +124,7 @@ export class GxIdeNewKb {
|
|
|
124
124
|
password: (_o = this.passwordEl) === null || _o === void 0 ? void 0 : _o.value,
|
|
125
125
|
savePassword: (_p = this.savePasswordEl) === null || _p === void 0 ? void 0 : _p.checked
|
|
126
126
|
});
|
|
127
|
-
createCallbackPromise.then(formSubmitResult => {
|
|
127
|
+
createCallbackPromise.then((formSubmitResult) => {
|
|
128
128
|
formSubmitValidation(formSubmitResult, this);
|
|
129
129
|
});
|
|
130
130
|
}
|
|
@@ -6,10 +6,7 @@ import { Locale } from "../../common/locale";
|
|
|
6
6
|
import { renderComboItems } from "../../common/render-combo-items";
|
|
7
7
|
import { formatDate } from "../../common/helpers";
|
|
8
8
|
import { gridCommon } from "../../common/grid";
|
|
9
|
-
|
|
10
|
-
const FILTER_AFTER_DATE_TIME = "afterDateTime";
|
|
11
|
-
const FILTER_AFTER_LAST_BUILD = "afterLastBuild";
|
|
12
|
-
const FILTER_AFTER_IMPORT = "afterImport";
|
|
9
|
+
import { FILTER_AFTER } from "../../common/constants";
|
|
13
10
|
export class GxIdeObjectSelector {
|
|
14
11
|
constructor() {
|
|
15
12
|
// 9.LOCAL METHODS //
|
|
@@ -17,33 +14,33 @@ export class GxIdeObjectSelector {
|
|
|
17
14
|
var _a, _b;
|
|
18
15
|
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.module, "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([
|
|
19
16
|
{
|
|
20
|
-
id:
|
|
21
|
-
label: this._componentLocale.filter.
|
|
22
|
-
value:
|
|
17
|
+
id: FILTER_AFTER.NONE,
|
|
18
|
+
label: this._componentLocale.filter.afterNone,
|
|
19
|
+
value: FILTER_AFTER.NONE
|
|
23
20
|
},
|
|
24
21
|
{
|
|
25
|
-
id:
|
|
26
|
-
label: this._componentLocale.filter[
|
|
27
|
-
value:
|
|
22
|
+
id: FILTER_AFTER.DATE_TIME,
|
|
23
|
+
label: this._componentLocale.filter[FILTER_AFTER.DATE_TIME],
|
|
24
|
+
value: FILTER_AFTER.DATE_TIME
|
|
28
25
|
},
|
|
29
26
|
{
|
|
30
|
-
id:
|
|
31
|
-
label: this._componentLocale.filter[
|
|
32
|
-
value:
|
|
27
|
+
id: FILTER_AFTER.IMPORT,
|
|
28
|
+
label: this._componentLocale.filter[FILTER_AFTER.IMPORT],
|
|
29
|
+
value: FILTER_AFTER.IMPORT
|
|
33
30
|
},
|
|
34
31
|
{
|
|
35
|
-
id:
|
|
36
|
-
label: this._componentLocale.filter[
|
|
37
|
-
value:
|
|
32
|
+
id: FILTER_AFTER.LAST_BUILD,
|
|
33
|
+
label: this._componentLocale.filter[FILTER_AFTER.LAST_BUILD],
|
|
34
|
+
value: FILTER_AFTER.LAST_BUILD
|
|
38
35
|
}
|
|
39
36
|
])), 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: {
|
|
40
37
|
flex: true,
|
|
41
38
|
hide: !this.filterModified ||
|
|
42
|
-
this.filterAfterType !==
|
|
39
|
+
this.filterAfterType !== FILTER_AFTER.DATE_TIME
|
|
43
40
|
}, part: "filter-datetime" }, h("gxg-label", { "label-position": "start" }, this._componentLocale.filter.dateTime), h("gxg-date-picker", { ref: (el) => (this.filterModifiedDateEl = el) }))))));
|
|
44
41
|
};
|
|
45
42
|
this.renderObjects = () => {
|
|
46
|
-
return (h("gxg-container", null, h("gxg-grid", { "ellipsis-cell-wrapper": true }, 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-position": "text", settingable: false, size: gridCommon.colSize.auto }), h("ch-grid-column", { "column-name": this._componentLocale.tableHead.name, "column-name-position": "text", settingable: false, size: gridCommon.colSize.common }), h("ch-grid-column", { "column-name": this._componentLocale.tableHead.type, "column-name-position": "text", settingable: false, size: gridCommon.colSize.common }), h("ch-grid-column", { "column-name": this._componentLocale.tableHead.module, "column-name-position": "text", settingable: false, size: gridCommon.colSize.common }), h("ch-grid-column", { "column-name": this._componentLocale.tableHead.description, "column-name-position": "text", settingable: false, size: gridCommon.colSize.common }), h("ch-grid-column", { "column-name": this._componentLocale.tableHead.modifiedDate, "column-name-position": "text", settingable: false, size: gridCommon.colSize.auto }), h("ch-grid-column", { "column-name": this._componentLocale.tableHead.importDate, "column-name-position": "text", settingable: false, size: gridCommon.colSize.auto })), this.objects.map((obj) => (h("ch-grid-row", { rowid: obj.id, onDblClick: this.openSelectionCallbackHandler }, h("ch-grid-cell", null, h("span", { class: "cell-wrapper" }, h("gxg-icon", { type: obj.icon, color: "auto" }))), h("ch-grid-cell", null, h("span", { class: "cell-wrapper" }, " ", obj.name, " ")), h("ch-grid-cell", null, h("span", { class: "cell-wrapper" }, obj.type)), h("ch-grid-cell", null, h("span", { class: "cell-wrapper" }, obj.module)), h("ch-grid-cell", null, h("span", { class: "cell-wrapper" }, obj.description)), h("ch-grid-cell", null, h("span", { class: "cell-wrapper" }, `${formatDate(obj.modifiedDate, "date-time")}`)), h("ch-grid-cell", null, h("span", { class: "cell-wrapper" }, `${formatDate(obj.importDate, "date")}`)))))))));
|
|
43
|
+
return (h("gxg-container", null, h("gxg-grid", { "ellipsis-cell-wrapper": true }, h("ch-grid", { "row-selection-mode": this.multiSelection ? "multiple" : "single", ref: (el) => (this.chGridEl = el), onKeyDown: this.chGridKeyDownHandler, part: "ch-grid-objects" }, h("ch-grid-columnset", null, h("ch-grid-column", { "column-name-position": "text", settingable: false, size: gridCommon.colSize.auto }), h("ch-grid-column", { "column-name": this._componentLocale.tableHead.name, "column-name-position": "text", settingable: false, size: gridCommon.colSize.common }), h("ch-grid-column", { "column-name": this._componentLocale.tableHead.type, "column-name-position": "text", settingable: false, size: gridCommon.colSize.common }), h("ch-grid-column", { "column-name": this._componentLocale.tableHead.module, "column-name-position": "text", settingable: false, size: gridCommon.colSize.common }), h("ch-grid-column", { "column-name": this._componentLocale.tableHead.description, "column-name-position": "text", settingable: false, size: gridCommon.colSize.common }), h("ch-grid-column", { "column-name": this._componentLocale.tableHead.modifiedDate, "column-name-position": "text", settingable: false, size: gridCommon.colSize.auto }), h("ch-grid-column", { "column-name": this._componentLocale.tableHead.importDate, "column-name-position": "text", settingable: false, size: gridCommon.colSize.auto })), this.objects.map((obj) => (h("ch-grid-row", { rowid: obj.id, onDblClick: this.openSelectionCallbackHandler }, h("ch-grid-cell", null, h("span", { class: "cell-wrapper" }, h("gxg-icon", { type: obj.icon, color: "auto" }))), h("ch-grid-cell", null, h("span", { class: "cell-wrapper" }, " ", obj.name, " ")), h("ch-grid-cell", null, h("span", { class: "cell-wrapper" }, obj.type)), h("ch-grid-cell", null, h("span", { class: "cell-wrapper" }, obj.module)), h("ch-grid-cell", null, h("span", { class: "cell-wrapper" }, obj.description)), h("ch-grid-cell", null, h("span", { class: "cell-wrapper" }, `${formatDate(obj.modifiedDate, "date-time")}`)), h("ch-grid-cell", null, h("span", { class: "cell-wrapper" }, `${formatDate(obj.importDate, "date")}`)))))))));
|
|
47
44
|
};
|
|
48
45
|
this.getObjects = () => {
|
|
49
46
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
@@ -58,7 +55,7 @@ export class GxIdeObjectSelector {
|
|
|
58
55
|
module: (_g = (_f = this.filterModuleEl) === null || _f === void 0 ? void 0 : _f.value) === null || _g === void 0 ? void 0 : _g.id,
|
|
59
56
|
modifiedAfter: modified && modifiedAfter ? modifiedAfter : null,
|
|
60
57
|
modifiedBy: modified && user ? user : null,
|
|
61
|
-
modifiedDate: modified && modifiedAfter ===
|
|
58
|
+
modifiedDate: modified && modifiedAfter === FILTER_AFTER.DATE_TIME
|
|
62
59
|
? (_h = this.filterModifiedDateEl) === null || _h === void 0 ? void 0 : _h.value
|
|
63
60
|
: null
|
|
64
61
|
};
|
|
@@ -69,7 +66,6 @@ export class GxIdeObjectSelector {
|
|
|
69
66
|
});
|
|
70
67
|
};
|
|
71
68
|
this.openSelectionCallbackHandler = (e) => {
|
|
72
|
-
console.log("openSelectionCallbackHandler");
|
|
73
69
|
e.stopPropagation();
|
|
74
70
|
this.openSelectionCallback(this.selectedObjectsIds);
|
|
75
71
|
};
|
|
@@ -117,8 +113,7 @@ export class GxIdeObjectSelector {
|
|
|
117
113
|
this.getObjects();
|
|
118
114
|
});
|
|
119
115
|
/* Date/Time */
|
|
120
|
-
this.filterModifiedDateEl.addEventListener("valueChanged",
|
|
121
|
-
console.log("e", e);
|
|
116
|
+
this.filterModifiedDateEl.addEventListener("valueChanged", () => {
|
|
122
117
|
this.getObjects();
|
|
123
118
|
});
|
|
124
119
|
// for grid selection
|
|
@@ -126,11 +121,22 @@ export class GxIdeObjectSelector {
|
|
|
126
121
|
this.selectedObjectsIds = ev.detail.rowsId;
|
|
127
122
|
});
|
|
128
123
|
};
|
|
124
|
+
this.chGridKeyDownHandler = (e) => {
|
|
125
|
+
if (e.key === "Enter") {
|
|
126
|
+
this.openSelectionCallbackHandler(e);
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
this.hostKeyPressHandler = (e) => {
|
|
130
|
+
// just prevent keypress propagation
|
|
131
|
+
if (e.key === "Enter") {
|
|
132
|
+
e.stopPropagation();
|
|
133
|
+
}
|
|
134
|
+
};
|
|
129
135
|
this.filterAfterType = "";
|
|
130
136
|
this.filterModified = false;
|
|
131
137
|
this.objects = [];
|
|
132
138
|
this.selectedObjectsIds = [];
|
|
133
|
-
this.multiSelection =
|
|
139
|
+
this.multiSelection = true;
|
|
134
140
|
this.patternValue = undefined;
|
|
135
141
|
this.types = undefined;
|
|
136
142
|
this.defaultType = undefined;
|
|
@@ -163,7 +169,7 @@ export class GxIdeObjectSelector {
|
|
|
163
169
|
}
|
|
164
170
|
// 10.RENDER() FUNCTION //
|
|
165
171
|
render() {
|
|
166
|
-
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.openSelectionCallbackHandler, 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)))))));
|
|
172
|
+
return (h(Host, { class: "gx-ide-component", onKeyPress: this.hostKeyPressHandler }, 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.openSelectionCallbackHandler, 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)))))));
|
|
167
173
|
}
|
|
168
174
|
static get is() { return "gx-ide-object-selector"; }
|
|
169
175
|
static get encapsulation() { return "shadow"; }
|
|
@@ -184,7 +190,7 @@ export class GxIdeObjectSelector {
|
|
|
184
190
|
"type": "boolean",
|
|
185
191
|
"mutable": false,
|
|
186
192
|
"complexType": {
|
|
187
|
-
"original": "
|
|
193
|
+
"original": "boolean",
|
|
188
194
|
"resolved": "boolean",
|
|
189
195
|
"references": {}
|
|
190
196
|
},
|
|
@@ -195,7 +201,8 @@ export class GxIdeObjectSelector {
|
|
|
195
201
|
"text": "True' if multiple object selection is allowed. Default is 'True'"
|
|
196
202
|
},
|
|
197
203
|
"attribute": "multi-selection",
|
|
198
|
-
"reflect": false
|
|
204
|
+
"reflect": false,
|
|
205
|
+
"defaultValue": "true"
|
|
199
206
|
},
|
|
200
207
|
"patternValue": {
|
|
201
208
|
"type": "string",
|
package/dist/collection/components/ww-images/gx-ide-assets/ww-images/langs/ww-images.lang.en.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Name",
|
|
3
|
+
"location": "Location",
|
|
4
|
+
"filter": {
|
|
5
|
+
"title": "Filters",
|
|
6
|
+
"name": "Name",
|
|
7
|
+
"type": "Type",
|
|
8
|
+
"category": "Category",
|
|
9
|
+
"moduleFolder": "Module/Folder",
|
|
10
|
+
"search": "Search contents",
|
|
11
|
+
"allDescendants": "All descendants",
|
|
12
|
+
"modified": "Modified",
|
|
13
|
+
"user": "User",
|
|
14
|
+
"dateTime": "Date/time",
|
|
15
|
+
"afterNone": "None",
|
|
16
|
+
"afterDateTime": "After Date/Time",
|
|
17
|
+
"afterLastBuild": "After Last Build",
|
|
18
|
+
"afterImport": "After Import",
|
|
19
|
+
"style": "Style",
|
|
20
|
+
"language": "Language",
|
|
21
|
+
"density": "Density",
|
|
22
|
+
"layer": "Layer",
|
|
23
|
+
"btnMore": "More >>",
|
|
24
|
+
"btnLess": "<< Less"
|
|
25
|
+
},
|
|
26
|
+
"objCount": {
|
|
27
|
+
"selected": "selected object(s)",
|
|
28
|
+
"matching": "matching object(s)"
|
|
29
|
+
},
|
|
30
|
+
"tableHead": {
|
|
31
|
+
"name": "Name",
|
|
32
|
+
"type": "Type",
|
|
33
|
+
"module": "Module",
|
|
34
|
+
"description": "Description",
|
|
35
|
+
"modifiedDate": "Modified Date",
|
|
36
|
+
"importDate": "Import Date",
|
|
37
|
+
"lastBuildDate": "Last Build Date",
|
|
38
|
+
"lastUser": "Last User"
|
|
39
|
+
},
|
|
40
|
+
"footer": {
|
|
41
|
+
"btnSelectAll": "Select All",
|
|
42
|
+
"btnNew": "New...",
|
|
43
|
+
"btnOk": "OK",
|
|
44
|
+
"btnCancel": "Cancel"
|
|
45
|
+
},
|
|
46
|
+
"imageDataTitle": "Tiles"
|
|
47
|
+
}
|