@genexus/genexus-ide-ui 3.0.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-file-item.cjs.entry.js +21 -2
- package/dist/cjs/gx-ide-file-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-file-uploader.cjs.entry.js +11 -8
- package/dist/cjs/gx-ide-file-uploader.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-launchpad.cjs.entry.js +4 -16
- package/dist/cjs/gx-ide-launchpad.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-multi-select.cjs.entry.js +113 -0
- package/dist/cjs/gx-ide-multi-select.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-search.cjs.entry.js +171 -0
- package/dist/cjs/gx-ide-search.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-ww-files.cjs.entry.js +4 -9
- package/dist/cjs/gx-ide-ww-files.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/_helpers/multi-select/gx-ide-multi-select.css +193 -0
- package/dist/collection/components/_helpers/multi-select/gx-ide-multi-select.js +209 -0
- package/dist/collection/components/_helpers/multi-select/gx-ide-multi-select.js.map +1 -0
- package/dist/collection/components/file-uploader/file-item/file-item.css +23 -28
- package/dist/collection/components/file-uploader/file-item/file-item.js +37 -1
- package/dist/collection/components/file-uploader/file-item/file-item.js.map +1 -1
- package/dist/collection/components/file-uploader/file-uploader.css +11 -22
- package/dist/collection/components/file-uploader/file-uploader.js +10 -7
- package/dist/collection/components/file-uploader/file-uploader.js.map +1 -1
- package/dist/collection/components/file-uploader/gx-ide-assets/file-uploader/langs/file-uploader.lang.en.json +7 -3
- package/dist/collection/components/file-uploader/gx-ide-assets/file-uploader/langs/file-uploader.lang.ja.json +7 -3
- package/dist/collection/components/file-uploader/gx-ide-assets/file-uploader/langs/file-uploader.lang.zh.json +8 -3
- package/dist/collection/components/launchpad/root/gx-ide-assets/launchpad/shortcuts.json +1 -26
- package/dist/collection/components/launchpad/root/launchpad.js +5 -42
- package/dist/collection/components/launchpad/root/launchpad.js.map +1 -1
- package/dist/collection/components/search/gx-ide-assets/search/langs/search.lang.en.json +37 -0
- package/dist/collection/components/search/gx-ide-assets/search/langs/search.lang.ja.json +37 -0
- package/dist/collection/components/search/gx-ide-assets/search/langs/search.lang.zh.json +37 -0
- package/dist/collection/components/search/search.css +44 -0
- package/dist/collection/components/search/search.js +275 -0
- package/dist/collection/components/search/search.js.map +1 -0
- package/dist/collection/components/ww-files/ww-files.js +4 -9
- package/dist/collection/components/ww-files/ww-files.js.map +1 -1
- package/dist/collection/testing/locale.e2e.js +4 -1
- package/dist/collection/testing/locale.e2e.js.map +1 -1
- package/dist/components/file-item.js +22 -2
- package/dist/components/file-item.js.map +1 -1
- package/dist/components/gx-ide-file-uploader.js +11 -8
- package/dist/components/gx-ide-file-uploader.js.map +1 -1
- package/dist/components/gx-ide-launchpad.js +6 -19
- package/dist/components/gx-ide-launchpad.js.map +1 -1
- package/dist/components/gx-ide-multi-select.d.ts +11 -0
- package/dist/components/gx-ide-multi-select.js +132 -0
- package/dist/components/gx-ide-multi-select.js.map +1 -0
- package/dist/components/gx-ide-search.d.ts +11 -0
- package/dist/components/gx-ide-search.js +206 -0
- package/dist/components/gx-ide-search.js.map +1 -0
- package/dist/components/gx-ide-ww-files.js +4 -9
- package/dist/components/gx-ide-ww-files.js.map +1 -1
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-file-item.entry.js +21 -2
- package/dist/esm/gx-ide-file-item.entry.js.map +1 -1
- package/dist/esm/gx-ide-file-uploader.entry.js +11 -8
- package/dist/esm/gx-ide-file-uploader.entry.js.map +1 -1
- package/dist/esm/gx-ide-launchpad.entry.js +5 -17
- package/dist/esm/gx-ide-launchpad.entry.js.map +1 -1
- package/dist/esm/gx-ide-multi-select.entry.js +109 -0
- package/dist/esm/gx-ide-multi-select.entry.js.map +1 -0
- package/dist/esm/gx-ide-search.entry.js +167 -0
- package/dist/esm/gx-ide-search.entry.js.map +1 -0
- package/dist/esm/gx-ide-ww-files.entry.js +4 -9
- package/dist/esm/gx-ide-ww-files.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/file-uploader/langs/file-uploader.lang.en.json +7 -3
- package/dist/genexus-ide-ui/gx-ide-assets/file-uploader/langs/file-uploader.lang.ja.json +7 -3
- package/dist/genexus-ide-ui/gx-ide-assets/file-uploader/langs/file-uploader.lang.zh.json +8 -3
- package/dist/genexus-ide-ui/gx-ide-assets/launchpad/shortcuts.json +1 -26
- package/dist/genexus-ide-ui/gx-ide-assets/search/langs/search.lang.en.json +37 -0
- package/dist/genexus-ide-ui/gx-ide-assets/search/langs/search.lang.ja.json +37 -0
- package/dist/genexus-ide-ui/gx-ide-assets/search/langs/search.lang.zh.json +37 -0
- package/dist/genexus-ide-ui/p-0745a565.entry.js +152 -0
- package/dist/genexus-ide-ui/p-0745a565.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-6246204f.entry.js → p-25e749c7.entry.js} +44 -57
- package/dist/genexus-ide-ui/p-25e749c7.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-60db2f02.entry.js → p-7bdeae77.entry.js} +106 -108
- package/dist/genexus-ide-ui/p-7bdeae77.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-8b5c826b.entry.js +212 -0
- package/dist/genexus-ide-ui/p-8b5c826b.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-c460c9e7.entry.js +187 -0
- package/dist/genexus-ide-ui/p-c460c9e7.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-aad714a5.entry.js → p-e2b88bea.entry.js} +70 -67
- package/dist/genexus-ide-ui/p-e2b88bea.entry.js.map +1 -0
- package/dist/types/components/_helpers/multi-select/gx-ide-multi-select.d.ts +29 -0
- package/dist/types/components/file-uploader/file-item/file-item.d.ts +2 -0
- package/dist/types/components/launchpad/root/launchpad.d.ts +0 -4
- package/dist/types/components/search/search.d.ts +59 -0
- package/dist/types/components.d.ts +121 -4
- package/package.json +1 -1
- package/dist/genexus-ide-ui/p-60db2f02.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-6246204f.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-aad714a5.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-f3c3e830.entry.js +0 -163
- package/dist/genexus-ide-ui/p-f3c3e830.entry.js.map +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"labels": {
|
|
3
|
+
"includeTypes": "Include types",
|
|
4
|
+
"excludeTypes": "Exclude types",
|
|
5
|
+
"module": "Module",
|
|
6
|
+
"properties": "Properties",
|
|
7
|
+
"results": "Results"
|
|
8
|
+
},
|
|
9
|
+
"buttons": {
|
|
10
|
+
"cancel": "Cancel",
|
|
11
|
+
"confirm": "Confirm"
|
|
12
|
+
},
|
|
13
|
+
"footer": {},
|
|
14
|
+
"placeholders": {
|
|
15
|
+
"search": "Search...",
|
|
16
|
+
"typesToInclude": "Types to include",
|
|
17
|
+
"typesToExclude": "Types to exclude",
|
|
18
|
+
"searchAModule": "Search a module ",
|
|
19
|
+
"addProperties": "Add properties"
|
|
20
|
+
},
|
|
21
|
+
"accessibleName": "Search in Knowledge Base",
|
|
22
|
+
"settingsButtonAriaLabel": "Toggle search settings",
|
|
23
|
+
"tooltips": {
|
|
24
|
+
"searchInAllSiblings": "Search in all siblings"
|
|
25
|
+
},
|
|
26
|
+
"emptyState": {
|
|
27
|
+
"title": "No results found",
|
|
28
|
+
"description": "Try adjusting your filters or checking your spelling to find what you’re looking for"
|
|
29
|
+
},
|
|
30
|
+
"noKbOpenState": {
|
|
31
|
+
"title": "No Knowledge Base open",
|
|
32
|
+
"description": "Open a Knowledge Base to start searching"
|
|
33
|
+
},
|
|
34
|
+
"loader": {
|
|
35
|
+
"title": "Loading..."
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"labels": {
|
|
3
|
+
"includeTypes": "Include types",
|
|
4
|
+
"excludeTypes": "Exclude types",
|
|
5
|
+
"module": "Module",
|
|
6
|
+
"properties": "Properties",
|
|
7
|
+
"results": "Results"
|
|
8
|
+
},
|
|
9
|
+
"buttons": {
|
|
10
|
+
"cancel": "Cancel",
|
|
11
|
+
"confirm": "Confirm"
|
|
12
|
+
},
|
|
13
|
+
"footer": {},
|
|
14
|
+
"placeholders": {
|
|
15
|
+
"search": "Search...",
|
|
16
|
+
"typesToInclude": "Types to include",
|
|
17
|
+
"typesToExclude": "Types to exclude",
|
|
18
|
+
"searchAModule": "Search a module ",
|
|
19
|
+
"addProperties": "Add properties"
|
|
20
|
+
},
|
|
21
|
+
"accessibleName": "Search in Knowledge Base",
|
|
22
|
+
"settingsButtonAriaLabel": "Toggle search settings",
|
|
23
|
+
"tooltips": {
|
|
24
|
+
"searchInAllSiblings": "Search in all siblings"
|
|
25
|
+
},
|
|
26
|
+
"emptyState": {
|
|
27
|
+
"title": "No results found",
|
|
28
|
+
"description": "Try adjusting your filters or checking your spelling to find what you’re looking for"
|
|
29
|
+
},
|
|
30
|
+
"noKbOpenState": {
|
|
31
|
+
"title": "No Knowledge Base open",
|
|
32
|
+
"description": "Open a Knowledge Base to start searching"
|
|
33
|
+
},
|
|
34
|
+
"loader": {
|
|
35
|
+
"title": "Loading..."
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"labels": {
|
|
3
|
+
"includeTypes": "Include types",
|
|
4
|
+
"excludeTypes": "Exclude types",
|
|
5
|
+
"module": "Module",
|
|
6
|
+
"properties": "Properties",
|
|
7
|
+
"results": "Results"
|
|
8
|
+
},
|
|
9
|
+
"buttons": {
|
|
10
|
+
"cancel": "Cancel",
|
|
11
|
+
"confirm": "Confirm"
|
|
12
|
+
},
|
|
13
|
+
"footer": {},
|
|
14
|
+
"placeholders": {
|
|
15
|
+
"search": "Search...",
|
|
16
|
+
"typesToInclude": "Types to include",
|
|
17
|
+
"typesToExclude": "Types to exclude",
|
|
18
|
+
"searchAModule": "Search a module ",
|
|
19
|
+
"addProperties": "Add properties"
|
|
20
|
+
},
|
|
21
|
+
"accessibleName": "Search in Knowledge Base",
|
|
22
|
+
"settingsButtonAriaLabel": "Toggle search settings",
|
|
23
|
+
"tooltips": {
|
|
24
|
+
"searchInAllSiblings": "Search in all siblings"
|
|
25
|
+
},
|
|
26
|
+
"emptyState": {
|
|
27
|
+
"title": "No results found",
|
|
28
|
+
"description": "Try adjusting your filters or checking your spelling to find what you’re looking for"
|
|
29
|
+
},
|
|
30
|
+
"noKbOpenState": {
|
|
31
|
+
"title": "No Knowledge Base open",
|
|
32
|
+
"description": "Open a Knowledge Base to start searching"
|
|
33
|
+
},
|
|
34
|
+
"loader": {
|
|
35
|
+
"title": "Loading..."
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { r as e, c as t, h as i, H as o, a } from "./p-9b9ccd0c.js";
|
|
2
|
+
|
|
3
|
+
import { g as n } from "./p-d42e842b.js";
|
|
4
|
+
|
|
5
|
+
import "./p-6534555e.js";
|
|
6
|
+
|
|
7
|
+
import "lit";
|
|
8
|
+
|
|
9
|
+
import "lit/directives/when.js";
|
|
10
|
+
|
|
11
|
+
import "lit/directives/if-defined.js";
|
|
12
|
+
|
|
13
|
+
const s = ":host{display:grid;block-size:100%}.opacity-0{opacity:0}.gxi-hidden{display:none !important}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.overflow-auto{overflow:auto}:host(.gx-ide-component){height:100% !important;display:flex !important;flex-direction:column !important}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--font-style-regular);font-size:var(--font-size-body-m);font-family:var(--font-family-body);height:100%;display:flex;flex-direction:column;flex-grow:1;box-sizing:border-box}.buttons-container{display:flex;gap:var(--spacing-gap-m)}.giu-static-pill-icon-and-text,.giu-static-pill{background-color:var(--elevation-background-color, var(--color-accent-surface-elevation-1));padding-inline:var(--spacing-padding-m);color:var(--color-text-neutral-default);font-size:var(--font-size-body-s);line-height:var(--line-height-relaxed);font-weight:var(--font-style-regular);border-radius:4px;min-block-size:25px;display:inline-grid;align-items:center;pointer-events:none;inline-size:max-content}.giu-static-pill-icon-and-text{display:inline-grid;grid-auto-flow:column;grid-auto-columns:max-content;gap:var(--spacing-gap-m)}.tab-full-width-buttons::part(tab-list block-start),.tab-full-width-buttons::part(tab-list block-end){grid-auto-columns:1fr}.tab-full-width-buttons::part(tab block-start){justify-content:center}.tree-view::part(item__header){--icon__system_warning_warning--disabled:var(\n --icon__system_warning_warning--enabled\n )}.tabular-grid{--focus-outline-width:1px}ch-popover{background-color:var(--color-accent-surface-elevation-1);border:1px solid var(--color-border-surface-on-surface);border-radius:var(--border-radius-s);box-shadow:var(--shadow-elevation-2)}ch-popover>div{display:flex;flex-direction:column;gap:0;padding:var(--spacing-padding-m);max-block-size:300px;overflow-y:auto}.checkbox-item{display:flex;inline-size:100%;padding-block:var(--spacing-padding-xs);padding-inline:var(--spacing-padding-m);cursor:pointer;border-radius:var(--border-radius-s)}.checkbox-item:hover{background-color:var(--color-accent-item-selected)}.checkbox-item::part(checkbox){inline-size:100%}.checkbox-item::part(label){inline-size:100%;cursor:pointer;flex:1}.multi-select__button{display:flex;align-items:center;gap:var(--spacing-gap-s);overflow:hidden}.multi-select__chevron{flex-shrink:0;margin-inline-start:auto}.multi-select__placeholder{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-select__items{display:flex;flex-wrap:wrap;gap:var(--spacing-gap-xs);flex:1;align-items:center}.multi-select__item{display:inline-flex;align-items:center;gap:var(--spacing-gap-xs);padding:2px var(--spacing-padding-xs);background-color:var(--color-accent-item-pressed);border-radius:var(--border-radius-s)}.multi-select__item button{padding:0}.multi-select__caption{color:var(--color-text-neutral-on-disabled)}.multi-select__close{padding:0;margin:0}ch-checkbox.checkbox::part(label){font-weight:var(--font-style-regular);color:var(--color-text-neutral-default)}";
|
|
14
|
+
|
|
15
|
+
var r = undefined && undefined.__classPrivateFieldGet || function(e, t, i, o) {
|
|
16
|
+
if (i === "a" && !o) throw new TypeError("Private accessor was defined without a getter");
|
|
17
|
+
if (typeof t === "function" ? e !== t || !o : !t.has(e)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
18
|
+
return i === "m" ? o : i === "a" ? o.call(e) : o ? o.value : t.get(e);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
var l = undefined && undefined.__classPrivateFieldSet || function(e, t, i, o, a) {
|
|
22
|
+
if (o === "m") throw new TypeError("Private method is not writable");
|
|
23
|
+
if (o === "a" && !a) throw new TypeError("Private accessor was defined without a setter");
|
|
24
|
+
if (typeof t === "function" ? e !== t || !a : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
25
|
+
return o === "a" ? a.call(e, i) : a ? a.value = i : t.set(e, i), i;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var c, d, p, h, u, m, g;
|
|
29
|
+
|
|
30
|
+
const f = [ "resets/box-sizing", "components/button", "components/icon", "components/checkbox", "utils/typography", "utils/spacing", "chameleon/scrollbar", "components/combo-box" ];
|
|
31
|
+
|
|
32
|
+
const b = n({
|
|
33
|
+
category: "navigation",
|
|
34
|
+
name: "chevron-down",
|
|
35
|
+
colorType: "on-interactive"
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const v = n({
|
|
39
|
+
category: "system",
|
|
40
|
+
name: "close",
|
|
41
|
+
colorType: "on-interactive"
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const x = class {
|
|
45
|
+
constructor(o) {
|
|
46
|
+
e(this, o);
|
|
47
|
+
this.gxSelectionChange = t(this, "gxSelectionChange", 7);
|
|
48
|
+
c.set(this, void 0);
|
|
49
|
+
d.set(this, void 0);
|
|
50
|
+
p.set(this, (() => {
|
|
51
|
+
if (!this.disabled) {
|
|
52
|
+
this.showPopover = !this.showPopover;
|
|
53
|
+
}
|
|
54
|
+
}));
|
|
55
|
+
h.set(this, ((e, t) => {
|
|
56
|
+
const i = t.target;
|
|
57
|
+
const o = i.value === i.checkedValue;
|
|
58
|
+
let a;
|
|
59
|
+
if (o) {
|
|
60
|
+
a = [ ...this.value, e ];
|
|
61
|
+
} else {
|
|
62
|
+
a = this.value.filter((t => t !== e));
|
|
63
|
+
}
|
|
64
|
+
this.gxSelectionChange.emit(a);
|
|
65
|
+
}));
|
|
66
|
+
u.set(this, (e => {
|
|
67
|
+
const t = this.value.filter((t => t !== e));
|
|
68
|
+
this.gxSelectionChange.emit(t);
|
|
69
|
+
}));
|
|
70
|
+
m.set(this, (e => this.value.includes(e)));
|
|
71
|
+
g.set(this, (() => {
|
|
72
|
+
if (this.value.length === 0) {
|
|
73
|
+
return i("span", {
|
|
74
|
+
class: "multi-select__placeholder body-italic-m"
|
|
75
|
+
}, this.placeholder);
|
|
76
|
+
}
|
|
77
|
+
const e = this.model.filter((e => this.value.includes(e.value)));
|
|
78
|
+
return i("div", {
|
|
79
|
+
class: "multi-select__items"
|
|
80
|
+
}, e.map((e => i("div", {
|
|
81
|
+
class: "multi-select__item",
|
|
82
|
+
key: e.value
|
|
83
|
+
}, i("span", {
|
|
84
|
+
class: "multi-select__caption body-regular-s"
|
|
85
|
+
}, e.caption), i("button", {
|
|
86
|
+
type: "button",
|
|
87
|
+
class: "button-tertiary button-icon-only multi-select__close",
|
|
88
|
+
onClick: t => {
|
|
89
|
+
t.stopPropagation();
|
|
90
|
+
t.preventDefault();
|
|
91
|
+
r(this, u, "f").call(this, e.value);
|
|
92
|
+
},
|
|
93
|
+
"aria-label": `Remove ${e.caption}`
|
|
94
|
+
}, i("ch-image", {
|
|
95
|
+
class: "icon-xs",
|
|
96
|
+
src: v,
|
|
97
|
+
type: "mask"
|
|
98
|
+
}))))));
|
|
99
|
+
}));
|
|
100
|
+
this.showPopover = false;
|
|
101
|
+
this.model = [];
|
|
102
|
+
this.value = [];
|
|
103
|
+
this.placeholder = "Select options";
|
|
104
|
+
this.disabled = false;
|
|
105
|
+
}
|
|
106
|
+
componentDidLoad() {
|
|
107
|
+
if (r(this, d, "f") && r(this, c, "f")) {
|
|
108
|
+
r(this, d, "f").actionElement = r(this, c, "f");
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
render() {
|
|
112
|
+
return i(o, null, i("ch-theme", {
|
|
113
|
+
model: f
|
|
114
|
+
}), i("button", {
|
|
115
|
+
class: "combo-box multi-select__button",
|
|
116
|
+
type: "button",
|
|
117
|
+
ref: e => l(this, c, e, "f"),
|
|
118
|
+
onClick: r(this, p, "f"),
|
|
119
|
+
disabled: this.disabled
|
|
120
|
+
}, r(this, g, "f").call(this), i("ch-image", {
|
|
121
|
+
class: "icon-m multi-select__chevron",
|
|
122
|
+
src: b,
|
|
123
|
+
type: "mask"
|
|
124
|
+
})), i("ch-popover", {
|
|
125
|
+
ref: e => l(this, d, e, "f"),
|
|
126
|
+
closeOnClickOutside: true,
|
|
127
|
+
show: this.showPopover,
|
|
128
|
+
blockAlign: "outside-end",
|
|
129
|
+
inlineAlign: "inside-end",
|
|
130
|
+
inlineSizeMatch: "action-element",
|
|
131
|
+
class: "scrollable"
|
|
132
|
+
}, i("div", null, this.model.map((e => i("ch-checkbox", {
|
|
133
|
+
class: "checkbox checkbox-item",
|
|
134
|
+
caption: e.caption,
|
|
135
|
+
checkedValue: "true",
|
|
136
|
+
value: r(this, m, "f").call(this, e.value) ? "true" : "false",
|
|
137
|
+
startImgSrc: e.startImgSrc,
|
|
138
|
+
onInput: t => r(this, h, "f").call(this, e.value, t)
|
|
139
|
+
}))))));
|
|
140
|
+
}
|
|
141
|
+
get el() {
|
|
142
|
+
return a(this);
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
c = new WeakMap, d = new WeakMap, p = new WeakMap, h = new WeakMap, u = new WeakMap,
|
|
147
|
+
m = new WeakMap, g = new WeakMap;
|
|
148
|
+
|
|
149
|
+
x.style = s;
|
|
150
|
+
|
|
151
|
+
export { x as gx_ide_multi_select };
|
|
152
|
+
//# sourceMappingURL=p-0745a565.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["gxIdeMultiSelectCss","CSS_BUNDLES","CHEVRON_DOWN_ICON","getIconPath","category","name","colorType","CLOSE_ICON","GxIdeMultiSelect","_GxIdeMultiSelect_multiButtonEl","set","this","_GxIdeMultiSelect_popoverEl","_GxIdeMultiSelect_togglePopover","disabled","showPopover","_GxIdeMultiSelect_checkboxChangeHandler","optionValue","event","target","isChecked","value","checkedValue","newValue","filter","val","gxSelectionChange","emit","_GxIdeMultiSelect_removeSelectedItemHandler","itemValue","_GxIdeMultiSelect_isItemSelected","includes","_GxIdeMultiSelect_renderSelectedItems","length","h","class","placeholder","selectedOptions","model","opt","map","item","key","caption","type","onClick","e","stopPropagation","preventDefault","__classPrivateFieldGet","call","src","componentDidLoad","actionElement","render","Host","ref","el","__classPrivateFieldSet","closeOnClickOutside","show","blockAlign","inlineAlign","inlineSizeMatch","option","startImgSrc","onInput"],"sources":["src/components/_helpers/multi-select/gx-ide-multi-select.scss?tag=gx-ide-multi-select&encapsulation=shadow","src/components/_helpers/multi-select/gx-ide-multi-select.tsx"],"sourcesContent":["@import \"../../../global/gx-ide-common\";\n\nch-popover {\n background-color: var(--color-accent-surface-elevation-1);\n border: 1px solid var(--color-border-surface-on-surface);\n border-radius: var(--border-radius-s);\n box-shadow: var(--shadow-elevation-2);\n\n > div {\n display: flex;\n flex-direction: column;\n gap: 0;\n padding: var(--spacing-padding-m);\n max-block-size: 300px;\n overflow-y: auto;\n }\n}\n\n.checkbox-item {\n display: flex;\n inline-size: 100%;\n padding-block: var(--spacing-padding-xs);\n padding-inline: var(--spacing-padding-m);\n cursor: pointer;\n border-radius: var(--border-radius-s);\n\n &:hover {\n background-color: var(--color-accent-item-selected);\n }\n\n &::part(checkbox) {\n inline-size: 100%;\n }\n\n &::part(label) {\n inline-size: 100%;\n cursor: pointer;\n flex: 1;\n }\n}\n\n.multi-select {\n &__button {\n display: flex;\n align-items: center;\n gap: var(--spacing-gap-s);\n overflow: hidden;\n }\n\n &__chevron {\n flex-shrink: 0;\n margin-inline-start: auto;\n }\n\n &__placeholder {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &__items {\n display: flex;\n flex-wrap: wrap;\n gap: var(--spacing-gap-xs);\n flex: 1;\n align-items: center;\n }\n\n &__item {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-gap-xs);\n padding: 2px var(--spacing-padding-xs);\n background-color: var(--color-accent-item-pressed);\n border-radius: var(--border-radius-s);\n\n & button {\n padding: 0;\n }\n }\n\n &__caption {\n color: var(--color-text-neutral-on-disabled);\n }\n\n &__close {\n padding: 0;\n margin: 0;\n }\n}\n\nch-checkbox.checkbox::part(label) {\n font-weight: var(--font-style-regular);\n color: var(--color-text-neutral-default);\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter\n} from \"@stencil/core\";\nimport { getIconPath, MercuryBundles } from \"@genexus/mercury\";\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"components/checkbox\",\n \"utils/typography\",\n \"utils/spacing\",\n \"chameleon/scrollbar\",\n \"components/combo-box\"\n];\n\nconst CHEVRON_DOWN_ICON = getIconPath({\n category: \"navigation\",\n name: \"chevron-down\",\n colorType: \"on-interactive\"\n});\n\nconst CLOSE_ICON = getIconPath({\n category: \"system\",\n name: \"close\",\n colorType: \"on-interactive\"\n});\n\n@Component({\n tag: \"gx-ide-multi-select\",\n styleUrl: \"gx-ide-multi-select.scss\",\n shadow: true\n})\nexport class GxIdeMultiSelect {\n #multiButtonEl: HTMLButtonElement;\n #popoverEl: HTMLChPopoverElement;\n\n @Element() el: HTMLGxIdeMultiSelectElement;\n\n @State() showPopover = false;\n\n /**\n * Model with available options to select from\n */\n @Prop() readonly model: ComboBoxModel = [];\n\n /**\n * Currently selected item values\n */\n @Prop() readonly value: string[] = [];\n\n /**\n * Placeholder text when no items are selected\n */\n @Prop() readonly placeholder: string = \"Select options\";\n\n /**\n * Disabled state\n */\n @Prop() readonly disabled: boolean = false;\n\n /**\n * Emitted when the selection changes\n */\n @Event() gxSelectionChange: EventEmitter<string[]>;\n\n componentDidLoad() {\n if (this.#popoverEl && this.#multiButtonEl) {\n this.#popoverEl.actionElement = this.#multiButtonEl;\n }\n }\n\n #togglePopover = () => {\n if (!this.disabled) {\n this.showPopover = !this.showPopover;\n }\n };\n\n #checkboxChangeHandler = (\n optionValue: string,\n event: CustomEvent | InputEvent\n ) => {\n const target = event.target as HTMLChCheckboxElement;\n const isChecked = target.value === target.checkedValue;\n\n let newValue: string[];\n if (isChecked) {\n newValue = [...this.value, optionValue];\n } else {\n newValue = this.value.filter(val => val !== optionValue);\n }\n\n this.gxSelectionChange.emit(newValue);\n };\n\n #removeSelectedItemHandler = (itemValue: string) => {\n const newValue = this.value.filter(val => val !== itemValue);\n this.gxSelectionChange.emit(newValue);\n };\n\n #isItemSelected = (itemValue: string): boolean => {\n return this.value.includes(itemValue);\n };\n\n #renderSelectedItems = () => {\n if (this.value.length === 0) {\n return (\n <span class=\"multi-select__placeholder body-italic-m\">\n {this.placeholder}\n </span>\n );\n }\n\n const selectedOptions = this.model.filter(opt =>\n this.value.includes(opt.value)\n );\n\n return (\n <div class=\"multi-select__items\">\n {selectedOptions.map(item => (\n <div class=\"multi-select__item\" key={item.value}>\n <span class=\"multi-select__caption body-regular-s\">\n {item.caption}\n </span>\n <button\n type=\"button\"\n class=\"button-tertiary button-icon-only multi-select__close\"\n onClick={e => {\n e.stopPropagation();\n e.preventDefault();\n this.#removeSelectedItemHandler(item.value);\n }}\n aria-label={`Remove ${item.caption}`}\n >\n <ch-image class=\"icon-xs\" src={CLOSE_ICON} type=\"mask\"></ch-image>\n </button>\n </div>\n ))}\n </div>\n );\n };\n\n render() {\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <button\n class=\"combo-box multi-select__button\"\n type=\"button\"\n ref={(el: HTMLButtonElement) => (this.#multiButtonEl = el)}\n onClick={this.#togglePopover}\n disabled={this.disabled}\n >\n {this.#renderSelectedItems()}\n <ch-image\n class=\"icon-m multi-select__chevron\"\n src={CHEVRON_DOWN_ICON}\n type=\"mask\"\n />\n </button>\n\n <ch-popover\n ref={(el: HTMLChPopoverElement) => (this.#popoverEl = el)}\n closeOnClickOutside\n show={this.showPopover}\n blockAlign=\"outside-end\"\n inlineAlign=\"inside-end\"\n inlineSizeMatch=\"action-element\"\n class={\"scrollable\"}\n >\n <div>\n {this.model.map(option => (\n <ch-checkbox\n class=\"checkbox checkbox-item\"\n caption={option.caption}\n checkedValue=\"true\"\n value={this.#isItemSelected(option.value) ? \"true\" : \"false\"}\n startImgSrc={option.startImgSrc}\n onInput={e => this.#checkboxChangeHandler(option.value, e)}\n />\n ))}\n </div>\n </ch-popover>\n </Host>\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA,MAAMA,IAAsB;;;;;;;;;;;;;;;;;ACa5B,MAAMC,IAA8B,EAClC,qBACA,qBACA,mBACA,uBACA,oBACA,iBACA,uBACA;;AAGF,MAAMC,IAAoBC,EAAY;EACpCC,UAAU;EACVC,MAAM;EACNC,WAAW;;;AAGb,MAAMC,IAAaJ,EAAY;EAC7BC,UAAU;EACVC,MAAM;EACNC,WAAW;;;MAQAE,IAAgB;;;;IAC3BC,EAAA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;EAOrC,gBAAAQ;IACE,IAAIH,EAAAtC,MAAIC,GAAA,QAAeqC,EAAAtC,MAAIF,GAAA,MAAiB;MAC1CwC,EAAAtC,MAAIC,GAAA,KAAYyC,gBAAgBJ,EAAAtC,MAAIF,GAAA;;;EA0ExC,MAAA6C;IACE,OACEpB,EAACqB,GAAI,MACHrB,EAAA;MAAUI,OAAOrC;QAEjBiC,EAAA;MACEC,OAAM;MACNS,MAAK;MACLY,KAAMC,KAA2BC,EAAA/C,MAAIF,GAAkBgD,GAAE;MACzDZ,SAASI,EAAAtC,MAAIE,GAAA;MACbC,UAAUH,KAAKG;OAEdmC,EAAAtC,MAAIqB,GAAA,KAAqBkB,KAAzBvC,OACDuB,EAAA;MACEC,OAAM;MACNgB,KAAKjD;MACL0C,MAAK;SAITV,EAAA;MACEsB,KAAMC,KAA8BC,EAAA/C,MAAIC,GAAc6C,GAAE;MACxDE,qBAAmB;MACnBC,MAAMjD,KAAKI;MACX8C,YAAW;MACXC,aAAY;MACZC,iBAAgB;MAChB5B,OAAO;OAEPD,EAAA,aACGvB,KAAK2B,MAAME,KAAIwB,KACd9B,EAAA;MACEC,OAAM;MACNQ,SAASqB,EAAOrB;MAChBrB,cAAa;MACbD,OAAO4B,EAAAtC,MAAImB,GAAA,KAAgBoB,KAApBvC,MAAqBqD,EAAO3C,SAAS,SAAS;MACrD4C,aAAaD,EAAOC;MACpBC,SAASpB,KAAKG,EAAAtC,MAAIK,GAAA,KAAuBkC,KAA3BvC,MAA4BqD,EAAO3C,OAAOyB"}
|
|
@@ -1,46 +1,44 @@
|
|
|
1
|
-
import { r as t, c as e,
|
|
1
|
+
import { r as t, c as e, h as a, H as s, a as i } from "./p-9b9ccd0c.js";
|
|
2
2
|
|
|
3
|
-
import { L as
|
|
3
|
+
import { L as o } from "./p-311eedf3.js";
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const r = "ch-tab-render.tab{background-color:transparent;border-color:transparent}ch-tab-render.tab::part(tab-list block-start){border-block-end:none}ch-tab-render.tab::part(tab block closable),ch-tab-render.tab::part(tab block not-closable){background-color:transparent}:host{display:grid;block-size:100%;overflow:auto;grid-template-rows:1fr}.web-apps,.native-apps,.apis{padding-block-start:16px;overflow:auto;block-size:100%}.tab::part(page){scrollbar-width:thin}.spacing-body>ch-tab-render>.tab-slot-spacing-body,:host(.spacing-body)>ch-tab-render>.tab-slot-spacing-body{padding-block:var(--spacing-body-block-start) var(--spacing-body-block-end);padding-inline:var(--spacing-body-inline-start) var(--spacing-body-inline-end)}";
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var n = undefined && undefined.__classPrivateFieldSet || function(t, e, a, s, i) {
|
|
8
8
|
if (s === "m") throw new TypeError("Private method is not writable");
|
|
9
9
|
if (s === "a" && !i) throw new TypeError("Private accessor was defined without a setter");
|
|
10
10
|
if (typeof e === "function" ? t !== e || !i : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
11
11
|
return s === "a" ? i.call(t, a) : i ? i.value = a : e.set(t, a), a;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var c = undefined && undefined.__classPrivateFieldGet || function(t, e, a, s) {
|
|
15
15
|
if (a === "a" && !s) throw new TypeError("Private accessor was defined without a getter");
|
|
16
16
|
if (typeof e === "function" ? t !== e || !s : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
17
17
|
return a === "m" ? s : a === "a" ? s.call(t) : s ? s.value : e.get(t);
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var p;
|
|
21
21
|
|
|
22
|
-
const
|
|
22
|
+
const d = [ "resets/box-sizing", "components/tab", "utils/form--full", "utils/layout", "utils/typography", "utils/spacing", "chameleon/scrollbar" ];
|
|
23
23
|
|
|
24
|
-
const
|
|
24
|
+
const l = "main";
|
|
25
25
|
|
|
26
|
-
const
|
|
26
|
+
const h = "web-apps";
|
|
27
27
|
|
|
28
|
-
const
|
|
28
|
+
const b = "native-apps";
|
|
29
29
|
|
|
30
|
-
const
|
|
30
|
+
const u = "apis";
|
|
31
31
|
|
|
32
32
|
// Temporary WA (Read WA in launchpad.scss)
|
|
33
|
-
const
|
|
33
|
+
const f = "tab-slot-spacing-body";
|
|
34
34
|
|
|
35
|
-
const
|
|
36
|
-
constructor(
|
|
37
|
-
t(this,
|
|
35
|
+
const v = class {
|
|
36
|
+
constructor(a) {
|
|
37
|
+
t(this, a);
|
|
38
38
|
this.objectSelected = e(this, "objectSelected", 7);
|
|
39
39
|
this.copyToClipboard = e(this, "copyToClipboard", 7);
|
|
40
40
|
this.openOnTheAppStore = e(this, "openOnTheAppStore", 7);
|
|
41
|
-
|
|
42
|
-
l.set(this, a(`./gx-ide-assets/launchpad/shortcuts.json`));
|
|
43
|
-
h.set(this, void 0);
|
|
41
|
+
p.set(this, void 0);
|
|
44
42
|
this.data = undefined;
|
|
45
43
|
this.isStandalone = true;
|
|
46
44
|
this.sections = [];
|
|
@@ -53,10 +51,10 @@ const y = class {
|
|
|
53
51
|
}
|
|
54
52
|
async componentWillLoad() {
|
|
55
53
|
try {
|
|
56
|
-
|
|
54
|
+
n(this, p, await o.getComponentStrings(this.el), "f");
|
|
57
55
|
} catch (t) {
|
|
58
56
|
console.error("Error loading locale:", t);
|
|
59
|
-
|
|
57
|
+
n(this, p, {
|
|
60
58
|
tabs: {
|
|
61
59
|
webApps: "WEB APPS",
|
|
62
60
|
nativeApps: "NATIVE APPS",
|
|
@@ -69,15 +67,6 @@ const y = class {
|
|
|
69
67
|
}
|
|
70
68
|
}
|
|
71
69
|
componentDidLoad() {}
|
|
72
|
-
/**
|
|
73
|
-
* Suspends or reactivates the shortcuts
|
|
74
|
-
*/ async suspendShortcuts(t) {
|
|
75
|
-
if (t) {
|
|
76
|
-
p(this, d, "f").suspend = true;
|
|
77
|
-
} else {
|
|
78
|
-
p(this, d, "f").suspend = false;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
70
|
/**
|
|
82
71
|
* Organizes received data and builds tab model
|
|
83
72
|
*/ organizeData() {
|
|
@@ -107,7 +96,7 @@ const y = class {
|
|
|
107
96
|
* Gets localized tab name based on section ID
|
|
108
97
|
*/ getLocalizedTabName(t) {
|
|
109
98
|
var e;
|
|
110
|
-
const a = ((e =
|
|
99
|
+
const a = ((e = c(this, p, "f")) === null || e === void 0 ? void 0 : e.tabs) || {};
|
|
111
100
|
switch (t) {
|
|
112
101
|
case "web-apps":
|
|
113
102
|
return a.webApps || "WEB APPS";
|
|
@@ -155,47 +144,45 @@ const y = class {
|
|
|
155
144
|
});
|
|
156
145
|
}
|
|
157
146
|
render() {
|
|
158
|
-
var t, e,
|
|
147
|
+
var t, e, i;
|
|
159
148
|
if (!this.data || !this.sections || this.sections.length === 0) {
|
|
160
149
|
return null;
|
|
161
150
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
ref: t => c(this, d, t, "f")
|
|
167
|
-
}), s("ch-tab-render", {
|
|
151
|
+
// TODO: Revisit re-enabling keyboard shortcuts 1, 2, 3 for switching launchpad tabs (Web Apps, Native Apps, APIs)
|
|
152
|
+
return a(s, null, a("ch-theme", {
|
|
153
|
+
model: d
|
|
154
|
+
}), a("ch-tab-render", {
|
|
168
155
|
class: {
|
|
169
156
|
scrollable: true,
|
|
170
157
|
tab: true,
|
|
171
|
-
[
|
|
158
|
+
[l]: true
|
|
172
159
|
},
|
|
173
160
|
tabListPosition: "block-start",
|
|
174
161
|
model: this.tabModel,
|
|
175
|
-
selectedId:
|
|
162
|
+
selectedId: h,
|
|
176
163
|
overflow: "auto",
|
|
177
164
|
contain: "size"
|
|
178
|
-
},
|
|
179
|
-
slot:
|
|
165
|
+
}, a("div", {
|
|
166
|
+
slot: h,
|
|
180
167
|
class: {
|
|
181
168
|
"web-apps": true,
|
|
182
|
-
[
|
|
169
|
+
[f]: true
|
|
183
170
|
},
|
|
184
171
|
part: "tab-button-web-apps"
|
|
185
|
-
},
|
|
172
|
+
}, a("gx-ide-launchpad-web-apps", Object.assign({
|
|
186
173
|
objects: ((t = this.sections.find((t => t.id === "web-apps"))) === null || t === void 0 ? void 0 : t.objects) || []
|
|
187
174
|
}, {
|
|
188
175
|
onObjectSelected: t => this.handleObjectSelection(t)
|
|
189
176
|
}, {
|
|
190
177
|
onCopyToClipboard: t => this.handleCopyToClipboard(t)
|
|
191
|
-
}))),
|
|
192
|
-
slot:
|
|
178
|
+
}))), a("div", {
|
|
179
|
+
slot: b,
|
|
193
180
|
class: {
|
|
194
181
|
"native-apps": true,
|
|
195
|
-
[
|
|
182
|
+
[f]: true
|
|
196
183
|
},
|
|
197
184
|
part: "tab-button-native-apps"
|
|
198
|
-
},
|
|
185
|
+
}, a("gx-ide-launchpad-native-apps", Object.assign({
|
|
199
186
|
objects: ((e = this.sections.find((t => t.id === "native-apps"))) === null || e === void 0 ? void 0 : e.objects) || []
|
|
200
187
|
}, {
|
|
201
188
|
onObjectSelected: t => this.handleObjectSelection(t)
|
|
@@ -203,15 +190,15 @@ const y = class {
|
|
|
203
190
|
onCopyToClipboard: t => this.handleCopyToClipboard(t)
|
|
204
191
|
}, {
|
|
205
192
|
onOpenOnTheAppStore: t => this.handleOpenAppStore(t)
|
|
206
|
-
}))),
|
|
207
|
-
slot:
|
|
193
|
+
}))), a("div", {
|
|
194
|
+
slot: u,
|
|
208
195
|
class: {
|
|
209
196
|
apis: true,
|
|
210
|
-
[
|
|
197
|
+
[f]: true
|
|
211
198
|
},
|
|
212
199
|
part: "tab-button-apis"
|
|
213
|
-
},
|
|
214
|
-
apis: ((
|
|
200
|
+
}, a("gx-ide-launchpad-apis", Object.assign({
|
|
201
|
+
apis: ((i = this.sections.find((t => t.id === "apis"))) === null || i === void 0 ? void 0 : i.apis) || []
|
|
215
202
|
}, {
|
|
216
203
|
onObjectSelected: t => this.handleObjectSelection(t)
|
|
217
204
|
}, {
|
|
@@ -222,7 +209,7 @@ const y = class {
|
|
|
222
209
|
return [ "gx-ide-assets/launchpad" ];
|
|
223
210
|
}
|
|
224
211
|
get el() {
|
|
225
|
-
return
|
|
212
|
+
return i(this);
|
|
226
213
|
}
|
|
227
214
|
static get watchers() {
|
|
228
215
|
return {
|
|
@@ -231,9 +218,9 @@ const y = class {
|
|
|
231
218
|
}
|
|
232
219
|
};
|
|
233
220
|
|
|
234
|
-
|
|
221
|
+
p = new WeakMap;
|
|
235
222
|
|
|
236
|
-
|
|
223
|
+
v.style = r;
|
|
237
224
|
|
|
238
|
-
export {
|
|
239
|
-
//# sourceMappingURL=p-
|
|
225
|
+
export { v as gx_ide_launchpad };
|
|
226
|
+
//# sourceMappingURL=p-25e749c7.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["launchpadCss","CSS_BUNDLES","MAIN_SECTION_CLASSES","WEB_APPS_TAB_SELECTOR","NATIVE_APPS_TAB_SELECTOR","APIS_TAB_SELECTOR","TAB_SLOT_SPACING_BODY_SELECTOR","GxIdeLaunchpad","_GxIdeLaunchpad_componentLocale","set","this","undefined","watchDataHandler","newValue","organizeData","componentWillLoad","__classPrivateFieldSet","Locale","getComponentStrings","el","error","console","tabs","webApps","nativeApps","apis","data","componentDidLoad","parsedData","JSON","parse","sections","buildTabModel","tabModel","length","map","section","id","name","getLocalizedTabName","sectionId","tabNames","_a","__classPrivateFieldGet","toUpperCase","replace","handleObjectSelection","event","key","detail","includes","parts","split","type","objectSelected","emit","handleCopyToClipboard","copyToClipboard","url","handleOpenAppStore","openOnTheAppStore","render","h","Host","model","class","scrollable","tab","tabListPosition","selectedId","overflow","contain","slot","part","Object","assign","objects","find","s","onObjectSelected","onCopyToClipboard","_b","onOpenOnTheAppStore","_c"],"sources":["src/components/launchpad/root/launchpad.scss?tag=gx-ide-launchpad&encapsulation=shadow","src/components/launchpad/root/launchpad.tsx"],"sourcesContent":["@use \"../../../global/temporary-mercury-overrides/tab.scss\" as *;\n\n:host {\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr;\n}\n\n.web-apps,\n.native-apps,\n.apis {\n padding-block-start: 16px;\n overflow: auto;\n block-size: 100%;\n}\n\n// WA: Add scrollbar styling for ch-tab-render until Mercury provides proper support\n.tab::part(page) {\n scrollbar-width: thin;\n}\n\n// WA: Apply spacing body to tab slots, instad of the whole component.\n// TODO: Resolve this on Mercury, with some addition class maybe.\n.spacing-body,\n:host(.spacing-body) {\n > ch-tab-render > .tab-slot-spacing-body {\n padding-block: var(--spacing-body-block-start) var(--spacing-body-block-end);\n padding-inline: var(--spacing-body-inline-start)\n var(--spacing-body-inline-end);\n }\n}\n","import {\n Component,\n Host,\n Prop,\n Element,\n State,\n h,\n Watch,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport { MercuryBundles } from \"@genexus/mercury\";\nimport { TabModel } from \"@genexus/chameleon-controls-library\";\nimport { Locale } from \"../../../common/locale\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/tab\",\n \"utils/form--full\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst MAIN_SECTION_CLASSES: string = \"main\";\nconst WEB_APPS_TAB_SELECTOR: string = \"web-apps\";\nconst NATIVE_APPS_TAB_SELECTOR: string = \"native-apps\";\nconst APIS_TAB_SELECTOR: string = \"apis\";\n\n// Temporary WA (Read WA in launchpad.scss)\nconst TAB_SLOT_SPACING_BODY_SELECTOR: string = \"tab-slot-spacing-body\";\n\n@Component({\n tag: \"gx-ide-launchpad\",\n styleUrl: \"launchpad.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/launchpad\"]\n})\nexport class GxIdeLaunchpad {\n #componentLocale: any;\n\n @Element() el: HTMLGxIdeLaunchpadElement;\n\n /**\n * JSON data containing section structure\n */\n @Prop() data: string | undefined = undefined;\n\n /**\n * Determines if the component runs in standalone mode\n */\n @Prop() isStandalone: boolean = true;\n\n /**\n * Array of sections for tabs\n */\n @State() sections: Array<any> = [];\n\n /**\n * Tab model for ch-tab-render\n */\n @State() tabModel: TabModel = [];\n\n /**\n * Event emitted when an object is selected for execution\n */\n @Event() objectSelected: EventEmitter<{\n key: { type: string; id: string } | string;\n }>;\n\n /**\n * Event emitted when copying to clipboard\n */\n @Event() copyToClipboard: EventEmitter<{ url: string }>;\n\n /**\n * Event emitted when opening app store\n */\n @Event() openOnTheAppStore: EventEmitter<{ url: string }>;\n\n @Watch(\"data\")\n watchDataHandler(newValue: string | undefined) {\n if (newValue !== undefined) {\n this.organizeData();\n }\n }\n\n async componentWillLoad() {\n try {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n } catch (error) {\n console.error(\"Error loading locale:\", error);\n this.#componentLocale = {\n tabs: {\n webApps: \"WEB APPS\",\n nativeApps: \"NATIVE APPS\",\n apis: \"APIS\"\n }\n };\n }\n\n if (this.data) {\n this.organizeData();\n }\n }\n\n componentDidLoad() {}\n\n /**\n * Organizes received data and builds tab model\n */\n private organizeData(): void {\n if (this.data) {\n try {\n const parsedData =\n typeof this.data === \"string\" ? JSON.parse(this.data) : this.data;\n this.sections = parsedData.sections || [];\n this.buildTabModel();\n } catch (error) {\n console.error(\"Error parsing launchpad data:\", error);\n this.sections = [];\n this.tabModel = [];\n }\n }\n }\n\n /**\n * Builds tab model based on sections\n */\n private buildTabModel(): void {\n if (this.sections && this.sections.length > 0) {\n this.tabModel = this.sections.map(section => ({\n id: section.id,\n name: this.getLocalizedTabName(section.id)\n }));\n }\n }\n\n /**\n * Gets localized tab name based on section ID\n */\n private getLocalizedTabName(sectionId: string): string {\n const tabNames = this.#componentLocale?.tabs || {};\n\n switch (sectionId) {\n case \"web-apps\":\n return tabNames.webApps || \"WEB APPS\";\n case \"native-apps\":\n return tabNames.nativeApps || \"NATIVE APPS\";\n case \"apis\":\n return tabNames.apis || \"APIS\";\n default:\n return sectionId.toUpperCase().replace(/-/g, \" \");\n }\n }\n\n /**\n * Handles object selection from subcomponents\n */\n private handleObjectSelection(event: any) {\n let key = event.detail.key;\n\n // Convert string format \"type|id\" to object format\n if (typeof key === \"string\" && key.includes(\"|\")) {\n const parts = key.split(\"|\");\n if (parts.length === 2) {\n key = {\n type: parts[0],\n id: parts[1]\n };\n }\n }\n\n this.objectSelected.emit({ key });\n }\n\n /**\n * Handles copy to clipboard from subcomponents\n */\n private handleCopyToClipboard(event: any) {\n this.copyToClipboard.emit({ url: event.detail.url });\n }\n\n /**\n * Handles open app store from subcomponents\n */\n private handleOpenAppStore(event: any) {\n this.openOnTheAppStore.emit({ url: event.detail.url });\n }\n\n render() {\n if (!this.data || !this.sections || this.sections.length === 0) {\n return null;\n }\n\n // TODO: Revisit re-enabling keyboard shortcuts 1, 2, 3 for switching launchpad tabs (Web Apps, Native Apps, APIs)\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <ch-tab-render\n class={{\n scrollable: true,\n tab: true,\n [MAIN_SECTION_CLASSES]: true\n }}\n tabListPosition=\"block-start\"\n model={this.tabModel}\n selectedId={WEB_APPS_TAB_SELECTOR}\n overflow=\"auto\"\n contain=\"size\"\n >\n <div\n slot={WEB_APPS_TAB_SELECTOR}\n class={{ \"web-apps\": true, [TAB_SLOT_SPACING_BODY_SELECTOR]: true }}\n part=\"tab-button-web-apps\"\n >\n <gx-ide-launchpad-web-apps\n objects={\n this.sections.find(s => s.id === \"web-apps\")?.objects || []\n }\n {...({\n onObjectSelected: (event: any) =>\n this.handleObjectSelection(event)\n } as any)}\n {...({\n onCopyToClipboard: (event: any) =>\n this.handleCopyToClipboard(event)\n } as any)}\n />\n </div>\n\n <div\n slot={NATIVE_APPS_TAB_SELECTOR}\n class={{\n \"native-apps\": true,\n [TAB_SLOT_SPACING_BODY_SELECTOR]: true\n }}\n part=\"tab-button-native-apps\"\n >\n <gx-ide-launchpad-native-apps\n objects={\n this.sections.find(s => s.id === \"native-apps\")?.objects || []\n }\n {...({\n onObjectSelected: (event: any) =>\n this.handleObjectSelection(event)\n } as any)}\n {...({\n onCopyToClipboard: (event: any) =>\n this.handleCopyToClipboard(event)\n } as any)}\n {...({\n onOpenOnTheAppStore: (event: any) =>\n this.handleOpenAppStore(event)\n } as any)}\n />\n </div>\n\n <div\n slot={APIS_TAB_SELECTOR}\n class={{ apis: true, [TAB_SLOT_SPACING_BODY_SELECTOR]: true }}\n part=\"tab-button-apis\"\n >\n <gx-ide-launchpad-apis\n apis={this.sections.find(s => s.id === \"apis\")?.apis || []}\n {...({\n onObjectSelected: (event: any) =>\n this.handleObjectSelection(event)\n } as any)}\n {...({\n onCopyToClipboard: (event: any) =>\n this.handleCopyToClipboard(event)\n } as any)}\n />\n </div>\n </ch-tab-render>\n </Host>\n );\n }\n}\n"],"mappings":";;;;AAAA,MAAMA,IAAe;;;;;;;;;;;;;;;;;ACgBrB,MAAMC,IAA8B,EAClC,qBACA,kBACA,oBACA,gBACA,oBACA,iBACA;;AAGF,MAAMC,IAA+B;;AACrC,MAAMC,IAAgC;;AACtC,MAAMC,IAAmC;;AACzC,MAAMC,IAA4B;;2CAGlC;MAAMC,IAAyC;;MAQlCC,IAAc;;;;;;IACzBC,EAAAC,IAAAC,WAAA;gBAOmCC;wBAKH;oBAKA;oBAKF;;EAoB9B,gBAAAC,CAAiBC;IACf,IAAIA,MAAaF,WAAW;MAC1BD,KAAKI;;;EAIT,uBAAMC;IACJ;MACEC,EAAAN,MAAIF,SAA0BS,EAAOC,oBAAoBR,KAAKS,KAAG;MACjE,OAAOC;MACPC,QAAQD,MAAM,yBAAyBA;MACvCJ,EAAAN,MAAIF,GAAoB;QACtBc,MAAM;UACJC,SAAS;UACTC,YAAY;UACZC,MAAM;;SAET;;IAGH,IAAIf,KAAKgB,MAAM;MACbhB,KAAKI;;;EAIT,gBAAAa,IAAgB;;;SAKR,YAAAb;IACN,IAAIJ,KAAKgB,MAAM;MACb;QACE,MAAME,WACGlB,KAAKgB,SAAS,WAAWG,KAAKC,MAAMpB,KAAKgB,QAAQhB,KAAKgB;QAC/DhB,KAAKqB,WAAWH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