@genexus/genexus-ide-ui 0.0.13 → 0.0.15
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-suggest_5.cjs.entry.js +379 -0
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-container_2.cjs.entry.js +168 -0
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js +13 -5
- package/dist/cjs/gx-ide-references.cjs.entry.js +299 -0
- package/dist/cjs/gx-ide-test.cjs.entry.js +2 -25
- package/dist/cjs/{gx-ide-container_10.cjs.entry.js → gxg-combo-box_8.cjs.entry.js} +58 -178
- package/dist/cjs/gxg-test.cjs.entry.js +2 -2
- package/dist/cjs/{gxg-tree-item.cjs.entry.js → gxg-tree_2.cjs.entry.js} +167 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/render-tree-25d5b8a1.js +29 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/common/render-suggest.js +18 -0
- package/dist/collection/components/new-kb/new-kb.css +8 -4
- package/dist/collection/components/new-kb/new-kb.js +12 -4
- package/dist/collection/components/references/gx-ide-assets/references/langs/references.lang.en.json +15 -0
- package/dist/collection/components/references/gx-ide-assets/references/langs/references.lang.ja.json +3 -0
- package/dist/collection/components/references/gx-ide-assets/references/langs/references.lang.zh.json +3 -0
- package/dist/collection/components/references/helpers.js +76 -0
- package/dist/collection/components/references/references.css +194 -0
- package/dist/collection/components/references/references.js +377 -0
- package/dist/collection/index.js +1 -0
- package/dist/components/ch-suggest-list-item.js +1 -58
- package/dist/{esm/ch-suggest-list-item.entry.js → components/ch-suggest-list-item2.js} +27 -8
- package/dist/components/ch-suggest-list.js +1 -39
- package/dist/components/ch-suggest-list2.js +41 -0
- package/dist/components/ch-suggest.js +1 -259
- package/dist/{esm/ch-suggest.entry.js → components/ch-suggest2.js} +49 -19
- package/dist/components/gx-ide-new-kb.js +13 -5
- package/dist/components/gx-ide-references.d.ts +11 -0
- package/dist/components/gx-ide-references.js +433 -0
- package/dist/components/gx-ide-test.js +2 -25
- package/dist/components/gxg-suggest.js +1 -55
- package/dist/components/gxg-test.js +2 -2
- package/dist/components/gxg-text.js +1 -88
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/render-tree.js +27 -0
- package/dist/{esm/gxg-suggest.entry.js → components/suggest.js} +29 -10
- package/dist/components/tab-bar.js +29 -13
- package/dist/components/tab-button.js +18 -2
- package/dist/components/tabs.js +15 -2
- package/dist/{esm/gxg-text.entry.js → components/text.js} +30 -8
- package/dist/esm/ch-suggest_5.entry.js +371 -0
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-container_2.entry.js +163 -0
- package/dist/esm/gx-ide-new-kb.entry.js +13 -5
- package/dist/esm/gx-ide-references.entry.js +295 -0
- package/dist/esm/gx-ide-test.entry.js +2 -25
- package/dist/esm/{gx-ide-container_10.entry.js → gxg-combo-box_8.entry.js} +60 -178
- package/dist/esm/gxg-test.entry.js +2 -2
- package/dist/esm/{gxg-tree-item.entry.js → gxg-tree_2.entry.js} +168 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/render-tree-fc8636a3.js +27 -0
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/references/langs/references.lang.en.json +15 -0
- package/dist/genexus-ide-ui/gx-ide-assets/references/langs/references.lang.ja.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/references/langs/references.lang.zh.json +3 -0
- package/dist/genexus-ide-ui/p-0f5d0ccc.entry.js +1 -0
- package/dist/genexus-ide-ui/p-1dcba164.entry.js +1 -0
- package/dist/genexus-ide-ui/p-1e412d88.entry.js +1 -0
- package/dist/genexus-ide-ui/p-2761a056.entry.js +1 -0
- package/dist/genexus-ide-ui/p-62814082.entry.js +1 -0
- package/dist/genexus-ide-ui/{p-f5aa333b.entry.js → p-97430828.entry.js} +1 -1
- package/dist/genexus-ide-ui/p-a5fee36d.entry.js +1 -0
- package/dist/genexus-ide-ui/p-abee8c7b.js +1 -0
- package/dist/genexus-ide-ui/p-be9406e7.entry.js +1 -0
- package/dist/node_modules/@genexus/gemini/dist/collection/components/tab-bar/tab-bar.css +4 -0
- package/dist/node_modules/@genexus/gemini/dist/collection/components/tab-button/tab-button.css +3 -0
- package/dist/node_modules/@genexus/gemini/dist/collection/components/tabs/tabs.css +1 -1
- package/dist/types/common/render-suggest.d.ts +2 -0
- package/dist/types/components/references/helpers.d.ts +17 -0
- package/dist/types/components/references/references.d.ts +125 -0
- package/dist/types/components.d.ts +78 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +3 -3
- package/dist/cjs/ch-suggest-list-item.cjs.entry.js +0 -45
- package/dist/cjs/ch-suggest-list.cjs.entry.js +0 -28
- package/dist/cjs/ch-suggest.cjs.entry.js +0 -226
- package/dist/cjs/gxg-suggest.cjs.entry.js +0 -42
- package/dist/cjs/gxg-text.cjs.entry.js +0 -72
- package/dist/cjs/gxg-tree.cjs.entry.js +0 -173
- package/dist/esm/ch-suggest-list.entry.js +0 -24
- package/dist/esm/gxg-tree.entry.js +0 -169
- package/dist/genexus-ide-ui/p-0a954e0f.entry.js +0 -1
- package/dist/genexus-ide-ui/p-20a45778.entry.js +0 -1
- package/dist/genexus-ide-ui/p-23d4b295.entry.js +0 -1
- package/dist/genexus-ide-ui/p-4e78d56d.entry.js +0 -1
- package/dist/genexus-ide-ui/p-5463844e.entry.js +0 -1
- package/dist/genexus-ide-ui/p-5faaf0e5.entry.js +0 -1
- package/dist/genexus-ide-ui/p-7a5e0988.entry.js +0 -1
- package/dist/genexus-ide-ui/p-a985b448.entry.js +0 -1
- package/dist/genexus-ide-ui/p-ad9fe469.entry.js +0 -1
- package/dist/genexus-ide-ui/p-b3727324.entry.js +0 -1
|
@@ -1,61 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const chSuggestListItemCss = ":host{display:block}:where(button){all:unset;display:flex;width:100%;cursor:pointer}*,::after,::before{box-sizing:border-box}";
|
|
4
|
-
|
|
5
|
-
const ARROW_DOWN = "ArrowDown";
|
|
6
|
-
const ARROW_UP = "ArrowUp";
|
|
7
|
-
const ChSuggestListItem$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
this.__registerHost();
|
|
11
|
-
this.__attachShadow();
|
|
12
|
-
this.itemSelected = createEvent(this, "itemSelected", 7);
|
|
13
|
-
this.focusChangeAttempt = createEvent(this, "focusChangeAttempt", 7);
|
|
14
|
-
// 6.COMPONENT LIFECYCLE EVENTS //
|
|
15
|
-
// 7.LISTENERS //
|
|
16
|
-
// 8.PUBLIC METHODS API //
|
|
17
|
-
// 9.LOCAL METHODS //
|
|
18
|
-
this.handleClick = () => {
|
|
19
|
-
this.itemSelected.emit({
|
|
20
|
-
value: this.value || this.el.innerText,
|
|
21
|
-
description: this.description
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
this.handleKeyDown = (e) => {
|
|
25
|
-
if (e.code === ARROW_UP || e.code === ARROW_DOWN) {
|
|
26
|
-
e.preventDefault();
|
|
27
|
-
this.focusChangeAttempt.emit({
|
|
28
|
-
el: this.el,
|
|
29
|
-
code: e.code
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
// 10.RENDER() FUNCTION //
|
|
35
|
-
render() {
|
|
36
|
-
return (h(Host, { role: "listitem", onKeyDown: this.handleKeyDown }, h("button", { part: "button", onClick: this.handleClick }, h("slot", { name: "icon" }), h("div", { class: "content-wrapper", part: "content-wrapper" }, h("slot", null), this.description && (h("span", { part: "description" }, this.description))))));
|
|
37
|
-
}
|
|
38
|
-
static get delegatesFocus() { return true; }
|
|
39
|
-
get el() { return this; }
|
|
40
|
-
static get style() { return chSuggestListItemCss; }
|
|
41
|
-
}, [17, "ch-suggest-list-item", {
|
|
42
|
-
"iconSrc": [1, "icon-src"],
|
|
43
|
-
"description": [1],
|
|
44
|
-
"value": [8]
|
|
45
|
-
}]);
|
|
46
|
-
function defineCustomElement$1() {
|
|
47
|
-
if (typeof customElements === "undefined") {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
const components = ["ch-suggest-list-item"];
|
|
51
|
-
components.forEach(tagName => { switch (tagName) {
|
|
52
|
-
case "ch-suggest-list-item":
|
|
53
|
-
if (!customElements.get(tagName)) {
|
|
54
|
-
customElements.define(tagName, ChSuggestListItem$1);
|
|
55
|
-
}
|
|
56
|
-
break;
|
|
57
|
-
} });
|
|
58
|
-
}
|
|
1
|
+
import { C as ChSuggestListItem$1, d as defineCustomElement$1 } from './ch-suggest-list-item2.js';
|
|
59
2
|
|
|
60
3
|
const ChSuggestListItem = ChSuggestListItem$1;
|
|
61
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
3
|
const chSuggestListItemCss = ":host{display:block}:where(button){all:unset;display:flex;width:100%;cursor:pointer}*,::after,::before{box-sizing:border-box}";
|
|
4
4
|
|
|
5
5
|
const ARROW_DOWN = "ArrowDown";
|
|
6
6
|
const ARROW_UP = "ArrowUp";
|
|
7
|
-
const ChSuggestListItem = class {
|
|
8
|
-
constructor(
|
|
9
|
-
|
|
7
|
+
const ChSuggestListItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
this.__attachShadow();
|
|
10
12
|
this.itemSelected = createEvent(this, "itemSelected", 7);
|
|
11
13
|
this.focusChangeAttempt = createEvent(this, "focusChangeAttempt", 7);
|
|
12
14
|
// 6.COMPONENT LIFECYCLE EVENTS //
|
|
@@ -34,8 +36,25 @@ const ChSuggestListItem = class {
|
|
|
34
36
|
return (h(Host, { role: "listitem", onKeyDown: this.handleKeyDown }, h("button", { part: "button", onClick: this.handleClick }, h("slot", { name: "icon" }), h("div", { class: "content-wrapper", part: "content-wrapper" }, h("slot", null), this.description && (h("span", { part: "description" }, this.description))))));
|
|
35
37
|
}
|
|
36
38
|
static get delegatesFocus() { return true; }
|
|
37
|
-
get el() { return
|
|
38
|
-
}
|
|
39
|
-
|
|
39
|
+
get el() { return this; }
|
|
40
|
+
static get style() { return chSuggestListItemCss; }
|
|
41
|
+
}, [17, "ch-suggest-list-item", {
|
|
42
|
+
"iconSrc": [1, "icon-src"],
|
|
43
|
+
"description": [1],
|
|
44
|
+
"value": [8]
|
|
45
|
+
}]);
|
|
46
|
+
function defineCustomElement() {
|
|
47
|
+
if (typeof customElements === "undefined") {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const components = ["ch-suggest-list-item"];
|
|
51
|
+
components.forEach(tagName => { switch (tagName) {
|
|
52
|
+
case "ch-suggest-list-item":
|
|
53
|
+
if (!customElements.get(tagName)) {
|
|
54
|
+
customElements.define(tagName, ChSuggestListItem);
|
|
55
|
+
}
|
|
56
|
+
break;
|
|
57
|
+
} });
|
|
58
|
+
}
|
|
40
59
|
|
|
41
|
-
export { ChSuggestListItem as
|
|
60
|
+
export { ChSuggestListItem as C, defineCustomElement as d };
|
|
@@ -1,42 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const chSuggestListCss = "*,::after,::before{box-sizing:border-box}:host{display:block}.title{margin:0;font:inherit}.list{margin:0;padding:0}";
|
|
4
|
-
|
|
5
|
-
const ChSuggestList$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
-
constructor() {
|
|
7
|
-
super();
|
|
8
|
-
this.__registerHost();
|
|
9
|
-
this.__attachShadow();
|
|
10
|
-
}
|
|
11
|
-
// 2.REFERENCE TO ELEMENTS //
|
|
12
|
-
// 3.STATE() VARIABLES //
|
|
13
|
-
// 4.PUBLIC PROPERTY API / WATCH'S //
|
|
14
|
-
// 5.EVENTS (EMIT) //
|
|
15
|
-
// 6.COMPONENT LIFECYCLE EVENTS //
|
|
16
|
-
// 7.LISTENERS //
|
|
17
|
-
// 8.PUBLIC METHODS API //
|
|
18
|
-
// 9.LOCAL METHODS //
|
|
19
|
-
// 10.RENDER() FUNCTION //
|
|
20
|
-
render() {
|
|
21
|
-
return (h(Host, null, this.label && (h("h2", { id: "heading", part: "title", class: "title" }, this.label)), h("ul", { "aria-labelledby": this.label ? "heading" : undefined, part: "list", class: "list" }, h("slot", null))));
|
|
22
|
-
}
|
|
23
|
-
static get style() { return chSuggestListCss; }
|
|
24
|
-
}, [1, "ch-suggest-list", {
|
|
25
|
-
"label": [1]
|
|
26
|
-
}]);
|
|
27
|
-
function defineCustomElement$1() {
|
|
28
|
-
if (typeof customElements === "undefined") {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
const components = ["ch-suggest-list"];
|
|
32
|
-
components.forEach(tagName => { switch (tagName) {
|
|
33
|
-
case "ch-suggest-list":
|
|
34
|
-
if (!customElements.get(tagName)) {
|
|
35
|
-
customElements.define(tagName, ChSuggestList$1);
|
|
36
|
-
}
|
|
37
|
-
break;
|
|
38
|
-
} });
|
|
39
|
-
}
|
|
1
|
+
import { C as ChSuggestList$1, d as defineCustomElement$1 } from './ch-suggest-list2.js';
|
|
40
2
|
|
|
41
3
|
const ChSuggestList = ChSuggestList$1;
|
|
42
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const chSuggestListCss = "*,::after,::before{box-sizing:border-box}:host{display:block}.title{margin:0;font:inherit}.list{margin:0;padding:0}";
|
|
4
|
+
|
|
5
|
+
const ChSuggestList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
}
|
|
11
|
+
// 2.REFERENCE TO ELEMENTS //
|
|
12
|
+
// 3.STATE() VARIABLES //
|
|
13
|
+
// 4.PUBLIC PROPERTY API / WATCH'S //
|
|
14
|
+
// 5.EVENTS (EMIT) //
|
|
15
|
+
// 6.COMPONENT LIFECYCLE EVENTS //
|
|
16
|
+
// 7.LISTENERS //
|
|
17
|
+
// 8.PUBLIC METHODS API //
|
|
18
|
+
// 9.LOCAL METHODS //
|
|
19
|
+
// 10.RENDER() FUNCTION //
|
|
20
|
+
render() {
|
|
21
|
+
return (h(Host, null, this.label && (h("h2", { id: "heading", part: "title", class: "title" }, this.label)), h("ul", { "aria-labelledby": this.label ? "heading" : undefined, part: "list", class: "list" }, h("slot", null))));
|
|
22
|
+
}
|
|
23
|
+
static get style() { return chSuggestListCss; }
|
|
24
|
+
}, [1, "ch-suggest-list", {
|
|
25
|
+
"label": [1]
|
|
26
|
+
}]);
|
|
27
|
+
function defineCustomElement() {
|
|
28
|
+
if (typeof customElements === "undefined") {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const components = ["ch-suggest-list"];
|
|
32
|
+
components.forEach(tagName => { switch (tagName) {
|
|
33
|
+
case "ch-suggest-list":
|
|
34
|
+
if (!customElements.get(tagName)) {
|
|
35
|
+
customElements.define(tagName, ChSuggestList);
|
|
36
|
+
}
|
|
37
|
+
break;
|
|
38
|
+
} });
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { ChSuggestList as C, defineCustomElement as d };
|
|
@@ -1,262 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as defineCustomElement$3 } from './ch-window2.js';
|
|
3
|
-
import { d as defineCustomElement$2 } from './ch-window-close2.js';
|
|
4
|
-
|
|
5
|
-
const chSuggestCss = "*,::after,::before{box-sizing:border-box}:host{--window-max-height:none;--window-gap:50px}.main-wrapper{display:block}.label-input-wrapper{display:flex}.label-input-wrapper .input{flex:1}:host([label-position=start]) .label-input-wrapper{flex-direction:row}:host([label-position=above]) .label-input-wrapper{flex-direction:column}.input{background-color:unset;border:none;color:inherit;font:inherit;margin:0;padding:0;outline:0}.ch-window-container{position:relative}ch-window::part(window){width:100%;max-height:calc(var(--window-max-height) - var(--window-gap));overflow-y:auto}";
|
|
6
|
-
|
|
7
|
-
const ARROW_DOWN = "ArrowDown";
|
|
8
|
-
const ARROW_UP = "ArrowUp";
|
|
9
|
-
const ChSuggest$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
this.__registerHost();
|
|
13
|
-
this.__attachShadow();
|
|
14
|
-
this.valueChanged = createEvent(this, "valueChanged", 7);
|
|
15
|
-
this.keyEventsDictionary = {
|
|
16
|
-
ArrowDown: (e) => {
|
|
17
|
-
const newFocusedItem = this.getNewFocusedItem(e.currentFocusedItem, ARROW_DOWN);
|
|
18
|
-
const nextFocusedItem = this.getNewFocusedItem(newFocusedItem, ARROW_DOWN);
|
|
19
|
-
newFocusedItem && newFocusedItem.focus();
|
|
20
|
-
if (!nextFocusedItem) {
|
|
21
|
-
/* This is the last item. Adjust window scroll to be at the very bottom*/
|
|
22
|
-
this.scrollListToBottom();
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
ArrowUp: (e) => {
|
|
26
|
-
const newFocusedItem = this.getNewFocusedItem(e.currentFocusedItem, ARROW_UP);
|
|
27
|
-
const nextFocusedItem = this.getNewFocusedItem(newFocusedItem, ARROW_UP);
|
|
28
|
-
newFocusedItem && newFocusedItem.focus();
|
|
29
|
-
if (!nextFocusedItem) {
|
|
30
|
-
/* This is the first item. Adjust window scroll to be at the very top*/
|
|
31
|
-
this.scrollListToTop();
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
// 3.STATE() VARIABLES //
|
|
36
|
-
this.windowHidden = true;
|
|
37
|
-
this.slotIsEmpty = true;
|
|
38
|
-
// 4.PUBLIC PROPERTY API / WATCH'S //
|
|
39
|
-
/**
|
|
40
|
-
* The debounce amount in milliseconds (This is the time the suggest waits after the user has finished typing, to show the suggestions).
|
|
41
|
-
*/
|
|
42
|
-
this.debounce = 500;
|
|
43
|
-
/**
|
|
44
|
-
* The label position
|
|
45
|
-
*/
|
|
46
|
-
this.labelPosition = "start";
|
|
47
|
-
/**
|
|
48
|
-
* Whether or not to display the label
|
|
49
|
-
*/
|
|
50
|
-
this.showLabel = true;
|
|
51
|
-
/**
|
|
52
|
-
* Wether or not the suggest has a header. The header will show the "suggestTitle" if provided, and a close button.
|
|
53
|
-
*/
|
|
54
|
-
this.showHeader = false;
|
|
55
|
-
/**
|
|
56
|
-
* If true, it will position the cursor at the end when the input is focused.
|
|
57
|
-
*/
|
|
58
|
-
this.cursorEnd = false;
|
|
59
|
-
// 10.LOCAL METHODS //
|
|
60
|
-
this.evaluateSlotIsEmpty = () => {
|
|
61
|
-
this.slotIsEmpty = !this.el.firstElementChild;
|
|
62
|
-
};
|
|
63
|
-
this.setFocusOnFirstItem = () => {
|
|
64
|
-
const firstItem = this.el.querySelector("ch-suggest-list-item");
|
|
65
|
-
firstItem && firstItem.focus();
|
|
66
|
-
};
|
|
67
|
-
this.getChSuggestListItems = () => Array.from(this.el.querySelectorAll("ch-suggest-list-item"));
|
|
68
|
-
this.getNewFocusedItem = (currentFocusedItem, direction) => {
|
|
69
|
-
/* Helper function that returns the list item that should get focus (the first one, or the last one)*/
|
|
70
|
-
const getListChild = (list) => {
|
|
71
|
-
const listItems = list.querySelectorAll("ch-suggest-list-item");
|
|
72
|
-
let listChild = listItems && listItems[listItems.length - 1];
|
|
73
|
-
if (direction === ARROW_DOWN) {
|
|
74
|
-
listChild = list.querySelector("ch-suggest-list-item");
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
const parentListItems = list.querySelectorAll("ch-suggest-list-item");
|
|
78
|
-
listChild =
|
|
79
|
-
parentListItems && parentListItems[parentListItems.length - 1];
|
|
80
|
-
}
|
|
81
|
-
return listChild;
|
|
82
|
-
};
|
|
83
|
-
if (!currentFocusedItem) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
let newFocusedItem = direction === ARROW_DOWN
|
|
87
|
-
? currentFocusedItem.nextElementSibling
|
|
88
|
-
: currentFocusedItem.previousElementSibling;
|
|
89
|
-
if ((newFocusedItem === null || newFocusedItem === void 0 ? void 0 : newFocusedItem.nodeName) === "CH-SUGGEST-LIST") {
|
|
90
|
-
newFocusedItem = getListChild(newFocusedItem);
|
|
91
|
-
}
|
|
92
|
-
else if (!newFocusedItem) {
|
|
93
|
-
/* this could be the last item of a list, but not the last item*/
|
|
94
|
-
const parent = currentFocusedItem.parentElement;
|
|
95
|
-
const sibling = direction === ARROW_DOWN
|
|
96
|
-
? parent.nextElementSibling
|
|
97
|
-
: parent.previousElementSibling;
|
|
98
|
-
const parentIsList = parent.nodeName === "CH-SUGGEST-LIST";
|
|
99
|
-
if (parentIsList &&
|
|
100
|
-
sibling &&
|
|
101
|
-
sibling.nodeName === "CH-SUGGEST-LIST-ITEM") {
|
|
102
|
-
newFocusedItem =
|
|
103
|
-
direction === ARROW_DOWN
|
|
104
|
-
? parent.nextElementSibling
|
|
105
|
-
: parent.previousElementSibling;
|
|
106
|
-
}
|
|
107
|
-
else if (parentIsList &&
|
|
108
|
-
sibling &&
|
|
109
|
-
sibling.nodeName === "CH-SUGGEST-LIST") {
|
|
110
|
-
const parentList = direction === ARROW_DOWN
|
|
111
|
-
? parent.nextElementSibling
|
|
112
|
-
: parent.previousElementSibling;
|
|
113
|
-
let listChild;
|
|
114
|
-
if (direction === ARROW_DOWN) {
|
|
115
|
-
listChild = parentList.querySelector("ch-suggest-list-item");
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
listChild = getListChild(parentList);
|
|
119
|
-
}
|
|
120
|
-
newFocusedItem = listChild ? listChild : null;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return newFocusedItem;
|
|
124
|
-
};
|
|
125
|
-
/**
|
|
126
|
-
* Every time the input event is triggered, the value of the input is sent to processInputEvent, which is responsible for displaying a window with the suggested options. this.debounce is a delay that, along with clearTimeout, ensures that the window is only shown after the user has stopped typing.
|
|
127
|
-
*/
|
|
128
|
-
this.handleInput = (e) => {
|
|
129
|
-
this.value = e.target.value;
|
|
130
|
-
if (this.timeoutReference) {
|
|
131
|
-
clearTimeout(this.timeoutReference);
|
|
132
|
-
}
|
|
133
|
-
this.timeoutReference = setTimeout(() => {
|
|
134
|
-
this.processInputEvent();
|
|
135
|
-
}, this.debounce);
|
|
136
|
-
};
|
|
137
|
-
this.handleKeyDown = (e) => {
|
|
138
|
-
if (e.key === ARROW_DOWN) {
|
|
139
|
-
e.preventDefault();
|
|
140
|
-
this.setFocusOnFirstItem();
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
this.evaluateWindowMaxHeight = () => {
|
|
144
|
-
const viewportHeight = window.innerHeight;
|
|
145
|
-
const documentHeight = document.body.scrollHeight;
|
|
146
|
-
const height = documentHeight >= viewportHeight ? documentHeight : viewportHeight;
|
|
147
|
-
const inputBottomPosition = this.textInput.getBoundingClientRect().bottom + window.scrollY;
|
|
148
|
-
const windowMaxHeight = height - inputBottomPosition + "px";
|
|
149
|
-
this.el.style.setProperty("--window-max-height", windowMaxHeight);
|
|
150
|
-
};
|
|
151
|
-
this.scrollListToTop = () => {
|
|
152
|
-
const partWindow = this.chWindow.shadowRoot.querySelector("[part='window']");
|
|
153
|
-
partWindow.scrollTop = 0;
|
|
154
|
-
};
|
|
155
|
-
this.scrollListToBottom = () => {
|
|
156
|
-
const partWindow = this.chWindow.shadowRoot.querySelector("[part='window']");
|
|
157
|
-
partWindow.scrollTop = partWindow.scrollHeight;
|
|
158
|
-
};
|
|
159
|
-
this.processInputEvent = () => {
|
|
160
|
-
this.evaluateWindowMaxHeight();
|
|
161
|
-
this.chWindow.hidden = this.slotIsEmpty;
|
|
162
|
-
};
|
|
163
|
-
this.closeWindow = () => {
|
|
164
|
-
this.chWindow.hidden = true;
|
|
165
|
-
};
|
|
166
|
-
this.onFocusHandler = () => {
|
|
167
|
-
if (this.cursorEnd) {
|
|
168
|
-
this.textInput.setSelectionRange(this.textInput.value.length, this.textInput.value.length);
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
watchValueHandler(newValue) {
|
|
173
|
-
this.valueChanged.emit(newValue);
|
|
174
|
-
}
|
|
175
|
-
// 6.COMPONENT LIFECYCLE EVENTS //
|
|
176
|
-
componentWillLoad() {
|
|
177
|
-
this.evaluateSlotIsEmpty();
|
|
178
|
-
}
|
|
179
|
-
// 7.LISTENERS //
|
|
180
|
-
itemSelectedHandler(event) {
|
|
181
|
-
this.value = event.detail.value;
|
|
182
|
-
this.closeWindow();
|
|
183
|
-
}
|
|
184
|
-
focusChangeAttemptHandler(event) {
|
|
185
|
-
const keyEventHandler = this.keyEventsDictionary[event.detail.code];
|
|
186
|
-
if (keyEventHandler) {
|
|
187
|
-
const currentFocusedItem = event.detail.el;
|
|
188
|
-
const chSuggestListItemsArray = this.getChSuggestListItems();
|
|
189
|
-
const currentFocusedItemIndex = chSuggestListItemsArray.findIndex(item => {
|
|
190
|
-
return item === currentFocusedItem;
|
|
191
|
-
});
|
|
192
|
-
const newItemToSetFocusOn = null;
|
|
193
|
-
keyEventHandler({
|
|
194
|
-
event: event.detail,
|
|
195
|
-
currentFocusedItem: currentFocusedItem,
|
|
196
|
-
chSuggestListItemsArray: chSuggestListItemsArray,
|
|
197
|
-
currentFocusedItemIndex: currentFocusedItemIndex,
|
|
198
|
-
newItemToSetFocusOn: newItemToSetFocusOn
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
windowClosedHandler() {
|
|
203
|
-
this.textInput.focus();
|
|
204
|
-
this.windowHidden = true;
|
|
205
|
-
}
|
|
206
|
-
// 9.PUBLIC METHODS API //
|
|
207
|
-
/**
|
|
208
|
-
* @description It selects/highlights the input text.
|
|
209
|
-
*/
|
|
210
|
-
async selectInputText() {
|
|
211
|
-
this.textInput.focus();
|
|
212
|
-
this.textInput.select();
|
|
213
|
-
}
|
|
214
|
-
// 10.RENDER() FUNCTION //
|
|
215
|
-
render() {
|
|
216
|
-
return (h(Host, null, h("div", { class: "main-wrapper", part: "main-wrapper" }, h("div", { class: "label-input-wrapper", part: "label-input-wrapper" }, this.showLabel && this.label && (h("label", { id: "label", htmlFor: "input", part: "label" }, this.label)), h("input", { type: "text", id: "input", part: "input", class: "input", ref: el => (this.textInput = el), onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: this.onFocusHandler, value: this.value, autocomplete: "off", "aria-controls": "ch-window", "aria-label": !this.showLabel && this.label ? this.label : undefined, "aria-labelledby": this.showLabel && this.label ? "label" : undefined, "aria-expanded": this.windowHidden.toString() })), h("ch-window", { id: "ch-window", container: this.textInput, "close-on-outside-click": true, "close-on-escape": true, xAlign: "inside-start", yAlign: "outside-end", ref: el => (this.chWindow = el), showHeader: this.showHeader, caption: this.suggestTitle, exportparts: "\n header:header, \n caption:title, \n close:close-button,\n window:dropdown" }, h("slot", { onSlotchange: this.evaluateSlotIsEmpty })))));
|
|
217
|
-
}
|
|
218
|
-
static get delegatesFocus() { return true; }
|
|
219
|
-
get el() { return this; }
|
|
220
|
-
static get watchers() { return {
|
|
221
|
-
"value": ["watchValueHandler"]
|
|
222
|
-
}; }
|
|
223
|
-
static get style() { return chSuggestCss; }
|
|
224
|
-
}, [17, "ch-suggest", {
|
|
225
|
-
"debounce": [2],
|
|
226
|
-
"label": [1],
|
|
227
|
-
"labelPosition": [513, "label-position"],
|
|
228
|
-
"showLabel": [4, "show-label"],
|
|
229
|
-
"value": [1025],
|
|
230
|
-
"showHeader": [4, "show-header"],
|
|
231
|
-
"suggestTitle": [1, "suggest-title"],
|
|
232
|
-
"cursorEnd": [4, "cursor-end"],
|
|
233
|
-
"windowHidden": [32],
|
|
234
|
-
"slotIsEmpty": [32],
|
|
235
|
-
"selectInputText": [64]
|
|
236
|
-
}, [[0, "itemSelected", "itemSelectedHandler"], [0, "focusChangeAttempt", "focusChangeAttemptHandler"], [0, "windowClosed", "windowClosedHandler"]]]);
|
|
237
|
-
function defineCustomElement$1() {
|
|
238
|
-
if (typeof customElements === "undefined") {
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
const components = ["ch-suggest", "ch-window", "ch-window-close"];
|
|
242
|
-
components.forEach(tagName => { switch (tagName) {
|
|
243
|
-
case "ch-suggest":
|
|
244
|
-
if (!customElements.get(tagName)) {
|
|
245
|
-
customElements.define(tagName, ChSuggest$1);
|
|
246
|
-
}
|
|
247
|
-
break;
|
|
248
|
-
case "ch-window":
|
|
249
|
-
if (!customElements.get(tagName)) {
|
|
250
|
-
defineCustomElement$3();
|
|
251
|
-
}
|
|
252
|
-
break;
|
|
253
|
-
case "ch-window-close":
|
|
254
|
-
if (!customElements.get(tagName)) {
|
|
255
|
-
defineCustomElement$2();
|
|
256
|
-
}
|
|
257
|
-
break;
|
|
258
|
-
} });
|
|
259
|
-
}
|
|
1
|
+
import { C as ChSuggest$1, d as defineCustomElement$1 } from './ch-suggest2.js';
|
|
260
2
|
|
|
261
3
|
const ChSuggest = ChSuggest$1;
|
|
262
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$2 } from './ch-window2.js';
|
|
3
|
+
import { d as defineCustomElement$1 } from './ch-window-close2.js';
|
|
2
4
|
|
|
3
5
|
const chSuggestCss = "*,::after,::before{box-sizing:border-box}:host{--window-max-height:none;--window-gap:50px}.main-wrapper{display:block}.label-input-wrapper{display:flex}.label-input-wrapper .input{flex:1}:host([label-position=start]) .label-input-wrapper{flex-direction:row}:host([label-position=above]) .label-input-wrapper{flex-direction:column}.input{background-color:unset;border:none;color:inherit;font:inherit;margin:0;padding:0;outline:0}.ch-window-container{position:relative}ch-window::part(window){width:100%;max-height:calc(var(--window-max-height) - var(--window-gap));overflow-y:auto}";
|
|
4
6
|
|
|
5
7
|
const ARROW_DOWN = "ArrowDown";
|
|
6
8
|
const ARROW_UP = "ArrowUp";
|
|
7
|
-
const ChSuggest = class {
|
|
8
|
-
constructor(
|
|
9
|
-
|
|
9
|
+
const ChSuggest = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.__registerHost();
|
|
13
|
+
this.__attachShadow();
|
|
10
14
|
this.valueChanged = createEvent(this, "valueChanged", 7);
|
|
11
15
|
this.keyEventsDictionary = {
|
|
12
16
|
ArrowDown: (e) => {
|
|
@@ -54,7 +58,7 @@ const ChSuggest = class {
|
|
|
54
58
|
this.cursorEnd = false;
|
|
55
59
|
// 10.LOCAL METHODS //
|
|
56
60
|
this.evaluateSlotIsEmpty = () => {
|
|
57
|
-
this.
|
|
61
|
+
this.chWindow.hidden = !this.el.firstElementChild;
|
|
58
62
|
};
|
|
59
63
|
this.setFocusOnFirstItem = () => {
|
|
60
64
|
const firstItem = this.el.querySelector("ch-suggest-list-item");
|
|
@@ -154,7 +158,7 @@ const ChSuggest = class {
|
|
|
154
158
|
};
|
|
155
159
|
this.processInputEvent = () => {
|
|
156
160
|
this.evaluateWindowMaxHeight();
|
|
157
|
-
this.
|
|
161
|
+
this.valueChanged.emit(this.value);
|
|
158
162
|
};
|
|
159
163
|
this.closeWindow = () => {
|
|
160
164
|
this.chWindow.hidden = true;
|
|
@@ -165,13 +169,7 @@ const ChSuggest = class {
|
|
|
165
169
|
}
|
|
166
170
|
};
|
|
167
171
|
}
|
|
168
|
-
watchValueHandler(newValue) {
|
|
169
|
-
this.valueChanged.emit(newValue);
|
|
170
|
-
}
|
|
171
172
|
// 6.COMPONENT LIFECYCLE EVENTS //
|
|
172
|
-
componentWillLoad() {
|
|
173
|
-
this.evaluateSlotIsEmpty();
|
|
174
|
-
}
|
|
175
173
|
// 7.LISTENERS //
|
|
176
174
|
itemSelectedHandler(event) {
|
|
177
175
|
this.value = event.detail.value;
|
|
@@ -212,11 +210,43 @@ const ChSuggest = class {
|
|
|
212
210
|
return (h(Host, null, h("div", { class: "main-wrapper", part: "main-wrapper" }, h("div", { class: "label-input-wrapper", part: "label-input-wrapper" }, this.showLabel && this.label && (h("label", { id: "label", htmlFor: "input", part: "label" }, this.label)), h("input", { type: "text", id: "input", part: "input", class: "input", ref: el => (this.textInput = el), onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: this.onFocusHandler, value: this.value, autocomplete: "off", "aria-controls": "ch-window", "aria-label": !this.showLabel && this.label ? this.label : undefined, "aria-labelledby": this.showLabel && this.label ? "label" : undefined, "aria-expanded": this.windowHidden.toString() })), h("ch-window", { id: "ch-window", container: this.textInput, "close-on-outside-click": true, "close-on-escape": true, xAlign: "inside-start", yAlign: "outside-end", ref: el => (this.chWindow = el), showHeader: this.showHeader, caption: this.suggestTitle, exportparts: "\n header:header, \n caption:title, \n close:close-button,\n window:dropdown" }, h("slot", { onSlotchange: this.evaluateSlotIsEmpty })))));
|
|
213
211
|
}
|
|
214
212
|
static get delegatesFocus() { return true; }
|
|
215
|
-
get el() { return
|
|
216
|
-
static get
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
213
|
+
get el() { return this; }
|
|
214
|
+
static get style() { return chSuggestCss; }
|
|
215
|
+
}, [17, "ch-suggest", {
|
|
216
|
+
"debounce": [2],
|
|
217
|
+
"label": [1],
|
|
218
|
+
"labelPosition": [513, "label-position"],
|
|
219
|
+
"showLabel": [4, "show-label"],
|
|
220
|
+
"value": [1025],
|
|
221
|
+
"showHeader": [4, "show-header"],
|
|
222
|
+
"suggestTitle": [1, "suggest-title"],
|
|
223
|
+
"cursorEnd": [4, "cursor-end"],
|
|
224
|
+
"windowHidden": [32],
|
|
225
|
+
"slotIsEmpty": [32],
|
|
226
|
+
"selectInputText": [64]
|
|
227
|
+
}, [[0, "itemSelected", "itemSelectedHandler"], [0, "focusChangeAttempt", "focusChangeAttemptHandler"], [0, "windowClosed", "windowClosedHandler"]]]);
|
|
228
|
+
function defineCustomElement() {
|
|
229
|
+
if (typeof customElements === "undefined") {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
const components = ["ch-suggest", "ch-window", "ch-window-close"];
|
|
233
|
+
components.forEach(tagName => { switch (tagName) {
|
|
234
|
+
case "ch-suggest":
|
|
235
|
+
if (!customElements.get(tagName)) {
|
|
236
|
+
customElements.define(tagName, ChSuggest);
|
|
237
|
+
}
|
|
238
|
+
break;
|
|
239
|
+
case "ch-window":
|
|
240
|
+
if (!customElements.get(tagName)) {
|
|
241
|
+
defineCustomElement$2();
|
|
242
|
+
}
|
|
243
|
+
break;
|
|
244
|
+
case "ch-window-close":
|
|
245
|
+
if (!customElements.get(tagName)) {
|
|
246
|
+
defineCustomElement$1();
|
|
247
|
+
}
|
|
248
|
+
break;
|
|
249
|
+
} });
|
|
250
|
+
}
|
|
221
251
|
|
|
222
|
-
export { ChSuggest as
|
|
252
|
+
export { ChSuggest as C, defineCustomElement as d };
|
|
@@ -20,7 +20,7 @@ import { d as defineCustomElement$4 } from './tabs.js';
|
|
|
20
20
|
import { d as defineCustomElement$3 } from './title.js';
|
|
21
21
|
import { d as defineCustomElement$2 } from './tooltip.js';
|
|
22
22
|
|
|
23
|
-
const newKbCss = ".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-right: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-right:2px}:host{display:block;border:1px solid var(--gxg-border-color--regular);background-color:var(--color-background)}.header{grid-template-columns:auto 1fr min-content;grid-template-areas:\"kb-label kb-input .\" \"location-label location-input location-icon\"}.header .kb-input{grid-area:kb-input}.header .kb-label{grid-area:kb-label}.header .location-label{grid-area:location-label}.header .location-input{grid-area:location-input}.header .location-icon{grid-area:location-icon}.gxg-tabs{margin-top:0;box-shadow:none}.basic-row-first{grid-template-areas:\"prototyping-target user-interface-language\";grid-template-columns:repeat(2, 1fr)}.basic-row-second{grid-template-areas:\"prototyping-environment data-source\";grid-template-columns:repeat(2, 1fr);grid-column-gap:0;grid-row-gap:0;flex-grow:1}.basic-row-second>*:first-child{border-right:1px solid var(--gx-ide-container-border-color)}.knowledge-base-storage{grid-template-areas:\"knowledge-base-storage__col-left knowledge-base-storage__col-right\";grid-template-columns:repeat(2, 1fr);flex-grow:1;gap:0}.knowledge-base-storage>*:first-child{border-right:1px solid var(--gx-ide-container-border-color)}.knowledge-base-storage__col-left{grid-area:knowledge-base-storage__col-left;grid-template-columns:1fr auto;grid-template-areas:\"server-name-combo-box server-name-button\" \"database-name .\" \"collation-combo-box collation-button\" \"create-data-in-kb .\"}.knowledge-base-storage__col-left .server-name-combo-box{grid-area:server-name-combo-box}.knowledge-base-storage__col-left .server-name-button{grid-area:server-name-button;align-self:
|
|
23
|
+
const newKbCss = ".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-right: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-right:2px}:host{display:block;border:1px solid var(--gxg-border-color--regular);background-color:var(--color-background)}.header{grid-template-columns:auto 1fr;grid-template-areas:\"kb-name-label kb-input\"}.header--is-advanced{grid-template-columns:auto 1fr min-content;grid-template-areas:\"kb-name-label kb-input .\" \"location-label location-input location-icon\"}.header .kb-input{grid-area:kb-input}.header .kb-name-label{grid-area:kb-label}.header .location-label{grid-area:location-label}.header .location-input{grid-area:location-input}.header .location-icon{grid-area:location-icon}.gxg-tabs{margin-top:0;box-shadow:none}.basic-row-first{grid-template-areas:\"prototyping-target user-interface-language\";grid-template-columns:repeat(2, 1fr)}.basic-row-second{grid-template-areas:\"prototyping-environment data-source\";grid-template-columns:repeat(2, 1fr);grid-column-gap:0;grid-row-gap:0;flex-grow:1}.basic-row-second>*:first-child{border-right:1px solid var(--gx-ide-container-border-color)}.knowledge-base-storage{grid-template-areas:\"knowledge-base-storage__col-left knowledge-base-storage__col-right\";grid-template-columns:repeat(2, 1fr);flex-grow:1;gap:0}.knowledge-base-storage>*:first-child{border-right:1px solid var(--gx-ide-container-border-color)}.knowledge-base-storage__col-left{grid-area:knowledge-base-storage__col-left;grid-template-columns:1fr auto;grid-template-areas:\"server-name-combo-box server-name-button\" \"database-name .\" \"collation-combo-box collation-button\" \"create-data-in-kb .\"}.knowledge-base-storage__col-left .server-name-combo-box{grid-area:server-name-combo-box}.knowledge-base-storage__col-left .server-name-button{grid-area:server-name-button;align-self:end}.knowledge-base-storage__col-left .database-name{grid-area:database-name}.knowledge-base-storage__col-left .collation-combo-box{grid-area:collation-combo-box}.knowledge-base-storage__col-left .collation-button{grid-area:collation-button;align-self:end}.knowledge-base-storage__col-left .create-data-in-kb{grid-area:create-data-in-kb}.knowledge-base-storage__col-right{grid-area:knowledge-base-storage__col-right;grid-template-columns:1fr;grid-template-areas:\"authentication-type\" \"user-name\" \"password\" \"save-password\"}.knowledge-base-storage__col-right .authentication-type{grid-area:authentication-type}.knowledge-base-storage__col-right .user-name{grid-area:user-name}.knowledge-base-storage__col-right .password{grid-area:password}.knowledge-base-storage__col-right .save-password{grid-area:save-password}.knowledge-base-storage__col-right--windows-authentication{grid-template-areas:\"authentication-type\"}";
|
|
24
24
|
|
|
25
25
|
const GxIdeNewKb$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
26
26
|
constructor() {
|
|
@@ -156,7 +156,7 @@ const GxIdeNewKb$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
156
156
|
// 10.RENDER() FUNCTION //
|
|
157
157
|
this.renderTabBasic = () => {
|
|
158
158
|
var _a, _b, _c, _d;
|
|
159
|
-
return (h("gxg-tab", { tab: "basic", "no-padding": true, flexContainer: true }, h("gx-ide-container", { displayBorderTop: true, displayBorderBottom: true }, h("div", { class: "grid basic-row-first" }, h("gxg-combo-box", {
|
|
159
|
+
return (h("gxg-tab", { tab: "basic", "no-padding": true, flexContainer: true }, h("gx-ide-container", { displayBorderTop: true, displayBorderBottom: true }, h("div", { class: "grid basic-row-first" }, h("gxg-combo-box", { disableFilter: true, label: this._componentLocale.tabBasic.prototypingTarget, value: (_a = this._initialComboValue["prototypingTargets"]) !== null && _a !== void 0 ? _a : this.prototypingTargets[0].id, ref: (el) => (this.prototypingTargetEl = el), class: "prototyping-target", part: "prototyping-target" }, renderFormItems("gxg-combo-box-item", this.prototypingTargets, "prototyping-target")), h("gxg-combo-box", { disableFilter: true, label: this._componentLocale.tabBasic.userInterfaceLanguage, value: (_b = this._initialComboValue["userInterfaceLanguages"]) !== null && _b !== void 0 ? _b : this.userInterfaceLanguages[0].id, ref: (el) => (this.userInterfaceLanguageEl = el), class: "user-interface-language", part: "user-interface-language" }, renderFormItems("gxg-combo-box-item", this.userInterfaceLanguages, "user-interface-language")))), h("div", { class: "grid basic-row-second" }, h("gx-ide-container", { fieldset: true, noHeadingBorder: true, containerTitle: this._componentLocale.tabBasic.backEnd.backEndLabel }, h("gxg-combo-box", { disableFilter: true, label: this._componentLocale.tabBasic.backEnd.prototypingEnvironment, value: (_c = this._initialComboValue["prototypingEnvironments"]) !== null && _c !== void 0 ? _c : this.prototypingEnvironments[0].id, ref: (el) => (this.prototypingEnvironmentEl = el), class: "prototyping-environment", part: "prototyping-environment" }, renderFormItems("gxg-combo-box-item", this.prototypingEnvironments, "prototyping-environment")), h("gxg-combo-box", { label: this._componentLocale.tabBasic.backEnd.dataSource, disableFilter: true, value: (_d = this._initialComboValue["dataSources"]) !== null && _d !== void 0 ? _d : this.dataSources[0].id, ref: (el) => (this.dataSourceEl = el), class: "data-source", part: "data-source" }, renderFormItems("gxg-combo-box-item", this.dataSources, "data-source"))), h("gx-ide-container", { fieldset: true, noHeadingBorder: true, containerTitle: this._componentLocale.tabBasic.frontEnd.frontEndLabel }, h("gxg-form-checkbox-group", { ref: el => (this.frontEndsEl = el) }, renderFormItems("gxg-form-checkbox", this.frontEnds, "front-end"))))));
|
|
160
160
|
};
|
|
161
161
|
this.renderTabAdvanced = () => {
|
|
162
162
|
var _a, _b, _c;
|
|
@@ -207,9 +207,17 @@ const GxIdeNewKb$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
207
207
|
* 11.RENDER() FUNCTION
|
|
208
208
|
********************************/
|
|
209
209
|
render() {
|
|
210
|
-
return (h(Host, { class: "gx-ide-component" }, !this.hideTopBar ? (h("gx-ide-top-bar", { topBarTitle: this._componentLocale.componentName })) : null, h("div", { class: "gx-ide-main-wrapper gx-ide-overflow" }, h("gx-ide-container", null, h("header", { class:
|
|
211
|
-
|
|
212
|
-
|
|
210
|
+
return (h(Host, { class: "gx-ide-component" }, !this.hideTopBar ? (h("gx-ide-top-bar", { topBarTitle: this._componentLocale.componentName })) : null, h("div", { class: "gx-ide-main-wrapper gx-ide-overflow" }, h("gx-ide-container", null, h("header", { class: {
|
|
211
|
+
"header": true,
|
|
212
|
+
"grid": true,
|
|
213
|
+
"header--is-advanced": this.isAdvanced
|
|
214
|
+
} }, h("gxg-label", { labelPosition: "start", class: "kb-label", noMargin: true }, this._componentLocale.header.kbName), h("gxg-form-text", { labelPosition: "start", placeholder: "SalesInventory", "max-width": "100%", value: this.kbName, ref: (el) => (this.kbNameEl = el), part: "kb-name", class: "kb-input" }), this.isAdvanced
|
|
215
|
+
? [
|
|
216
|
+
h("gxg-label", { labelPosition: "start", class: "location-label" }, this._componentLocale.header.kbLocation),
|
|
217
|
+
h("gxg-form-text", { labelPosition: "start", placeholder: "C:\\Models", maxWidth: "100%", value: this.kbLocation, ref: (el) => (this.locationEl = el), disabled: !this.isAdvanced, part: "kb-location", class: "location-input" }),
|
|
218
|
+
h("gxg-button", { type: "secondary-icon-only", icon: "gemini-tools/folder", onClick: this.selectLocationHandler, part: "button-select-location", class: "location-icon" })
|
|
219
|
+
]
|
|
220
|
+
: null)), h("main", { class: "gxi-full-height" }, h("gxg-tabs", { height: "100%", position: "top", class: "gxg-tabs" }, h("gxg-tab-bar", { slot: "tab-bar-container", part: "tab-bar" }, h("gxg-tab-button", { slot: "tab-bar", tabLabel: this._componentLocale.tabBasic.tabLabel, tab: "basic", "is-selected": true, hidden: !this.isAdvanced, part: "tab-button-basic" }), h("gxg-tab-button", { slot: "tab-bar", tabLabel: this._componentLocale.tabAdvanced.tabLabel, tab: "advanced", hidden: !this.isAdvanced, part: "tab-button-advanced" })), this.renderTabBasic(), this.renderTabAdvanced())), h("gx-ide-container", { displayBorderTop: true }, h("gxg-button", { id: "button-create", type: "primary-text-only", onClick: this.createKbHandler, part: "button-create", slot: "footer-end" }, this._componentLocale.footer.btnCreate), h("gxg-button", { id: "button-cancel", type: "outlined", onClick: this.cancelKbHandler, part: "button-cancel", slot: "footer-end" }, this._componentLocale.footer.btnCancel)))));
|
|
213
221
|
}
|
|
214
222
|
static get assetsDirs() { return ["gx-ide-assets/new-kb"]; }
|
|
215
223
|
get el() { return this; }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface GxIdeReferences extends Components.GxIdeReferences, HTMLElement {}
|
|
4
|
+
export const GxIdeReferences: {
|
|
5
|
+
prototype: GxIdeReferences;
|
|
6
|
+
new (): GxIdeReferences;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|