@genexus/genexus-ide-ui 3.2.10 → 3.2.12
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-db-properties-configurator.cjs.entry.js +165 -0
- package/dist/cjs/gx-ide-db-properties-configurator.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-select-team-or-org.cjs.entry.js +128 -0
- package/dist/cjs/gx-ide-select-team-or-org.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-sign-in-organization.cjs.entry.js +187 -0
- package/dist/cjs/gx-ide-sign-in-organization.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/db-properties-configurator/db-properties-configurator.css +127 -0
- package/dist/collection/components/db-properties-configurator/db-properties-configurator.js +250 -0
- package/dist/collection/components/db-properties-configurator/db-properties-configurator.js.map +1 -0
- package/dist/collection/components/db-properties-configurator/gx-ide-assets/db-properties-configurator/langs/db-properties-configurator.lang.en.json +24 -0
- package/dist/collection/components/db-properties-configurator/gx-ide-assets/db-properties-configurator/langs/db-properties-configurator.lang.ja.json +24 -0
- package/dist/collection/components/db-properties-configurator/gx-ide-assets/db-properties-configurator/langs/db-properties-configurator.lang.zh.json +24 -0
- package/dist/collection/components/select-team-or-org/gx-ide-assets/select-team-or-org/langs/select-team-or-org.lang.en.json +18 -0
- package/dist/collection/components/select-team-or-org/gx-ide-assets/select-team-or-org/langs/select-team-or-org.lang.ja.json +18 -0
- package/dist/collection/components/select-team-or-org/gx-ide-assets/select-team-or-org/langs/select-team-or-org.lang.zh.json +18 -0
- package/dist/collection/components/select-team-or-org/helpers.js +9 -0
- package/dist/collection/components/select-team-or-org/helpers.js.map +1 -0
- package/dist/collection/components/{select-user-team/select-user-team.css → select-team-or-org/select-team-or-org.css} +7 -4
- package/dist/collection/components/select-team-or-org/select-team-or-org.js +220 -0
- package/dist/collection/components/select-team-or-org/select-team-or-org.js.map +1 -0
- package/dist/{genexus-ide-ui/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.en.json → collection/components/sign-in-organization/gx-ide-assets/sign-in-organization/langs/sign-in-organization.lang.en.json} +5 -5
- package/dist/{genexus-ide-ui/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.ja.json → collection/components/sign-in-organization/gx-ide-assets/sign-in-organization/langs/sign-in-organization.lang.ja.json} +5 -5
- package/dist/collection/components/{sign-in-team/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.en.json → sign-in-organization/gx-ide-assets/sign-in-organization/langs/sign-in-organization.lang.zh.json} +5 -5
- package/dist/collection/components/sign-in-organization/helpers.js +10 -0
- package/dist/collection/components/sign-in-organization/helpers.js.map +1 -0
- package/dist/collection/components/{sign-in-team/sign-in-team.js → sign-in-organization/sign-in-organization.js} +72 -72
- package/dist/collection/components/sign-in-organization/sign-in-organization.js.map +1 -0
- package/dist/collection/testing/locale.e2e.js +3 -2
- package/dist/collection/testing/locale.e2e.js.map +1 -1
- package/dist/components/gx-ide-db-properties-configurator.d.ts +11 -0
- package/dist/components/gx-ide-db-properties-configurator.js +183 -0
- package/dist/components/gx-ide-db-properties-configurator.js.map +1 -0
- package/dist/components/gx-ide-select-team-or-org.d.ts +11 -0
- package/dist/components/gx-ide-select-team-or-org.js +157 -0
- package/dist/components/gx-ide-select-team-or-org.js.map +1 -0
- package/dist/components/gx-ide-sign-in-organization.d.ts +11 -0
- package/dist/components/gx-ide-sign-in-organization.js +221 -0
- package/dist/components/gx-ide-sign-in-organization.js.map +1 -0
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-db-properties-configurator.entry.js +161 -0
- package/dist/esm/gx-ide-db-properties-configurator.entry.js.map +1 -0
- package/dist/esm/gx-ide-select-team-or-org.entry.js +124 -0
- package/dist/esm/gx-ide-select-team-or-org.entry.js.map +1 -0
- package/dist/esm/gx-ide-sign-in-organization.entry.js +183 -0
- package/dist/esm/gx-ide-sign-in-organization.entry.js.map +1 -0
- 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/db-properties-configurator/langs/db-properties-configurator.lang.en.json +24 -0
- package/dist/genexus-ide-ui/gx-ide-assets/db-properties-configurator/langs/db-properties-configurator.lang.ja.json +24 -0
- package/dist/genexus-ide-ui/gx-ide-assets/db-properties-configurator/langs/db-properties-configurator.lang.zh.json +24 -0
- package/dist/genexus-ide-ui/gx-ide-assets/select-team-or-org/langs/select-team-or-org.lang.en.json +18 -0
- package/dist/genexus-ide-ui/gx-ide-assets/select-team-or-org/langs/select-team-or-org.lang.ja.json +18 -0
- package/dist/genexus-ide-ui/gx-ide-assets/select-team-or-org/langs/select-team-or-org.lang.zh.json +18 -0
- package/dist/genexus-ide-ui/gx-ide-assets/{sign-in-team/langs/sign-in-team.lang.zh.json → sign-in-organization/langs/sign-in-organization.lang.en.json} +5 -5
- package/dist/{collection/components/sign-in-team/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.ja.json → genexus-ide-ui/gx-ide-assets/sign-in-organization/langs/sign-in-organization.lang.ja.json} +5 -5
- package/dist/{collection/components/sign-in-team/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.zh.json → genexus-ide-ui/gx-ide-assets/sign-in-organization/langs/sign-in-organization.lang.zh.json} +5 -5
- package/dist/genexus-ide-ui/{p-1d44dd0a.entry.js → p-15b1c9be.entry.js} +72 -72
- package/dist/genexus-ide-ui/p-15b1c9be.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-2129d0d2.entry.js +164 -0
- package/dist/genexus-ide-ui/p-2129d0d2.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-e759cfdb.entry.js +281 -0
- package/dist/genexus-ide-ui/p-e759cfdb.entry.js.map +1 -0
- package/dist/types/components/db-properties-configurator/db-properties-configurator.d.ts +50 -0
- package/dist/types/components/select-team-or-org/helpers.d.ts +3 -0
- package/dist/types/components/select-team-or-org/select-team-or-org.d.ts +38 -0
- package/dist/types/components/sign-in-organization/helpers.d.ts +3 -0
- package/dist/types/components/{sign-in-team/sign-in-team.d.ts → sign-in-organization/sign-in-organization.d.ts} +8 -8
- package/dist/types/components.d.ts +161 -106
- package/package.json +1 -1
- package/dist/cjs/gx-ide-select-user-team.cjs.entry.js +0 -121
- package/dist/cjs/gx-ide-select-user-team.cjs.entry.js.map +0 -1
- package/dist/cjs/gx-ide-sign-in-team.cjs.entry.js +0 -187
- package/dist/cjs/gx-ide-sign-in-team.cjs.entry.js.map +0 -1
- package/dist/collection/components/select-user-team/gx-ide-assets/select-user-team/langs/select-user-team.lang.en.json +0 -10
- package/dist/collection/components/select-user-team/gx-ide-assets/select-user-team/langs/select-user-team.lang.ja.json +0 -10
- package/dist/collection/components/select-user-team/gx-ide-assets/select-user-team/langs/select-user-team.lang.zh.json +0 -10
- package/dist/collection/components/select-user-team/helpers.js +0 -9
- package/dist/collection/components/select-user-team/helpers.js.map +0 -1
- package/dist/collection/components/select-user-team/select-user-team.js +0 -189
- package/dist/collection/components/select-user-team/select-user-team.js.map +0 -1
- package/dist/collection/components/sign-in-team/helpers.js +0 -10
- package/dist/collection/components/sign-in-team/helpers.js.map +0 -1
- package/dist/collection/components/sign-in-team/sign-in-team.js.map +0 -1
- package/dist/components/gx-ide-select-user-team.d.ts +0 -11
- package/dist/components/gx-ide-select-user-team.js +0 -149
- package/dist/components/gx-ide-select-user-team.js.map +0 -1
- package/dist/components/gx-ide-sign-in-team.d.ts +0 -11
- package/dist/components/gx-ide-sign-in-team.js +0 -221
- package/dist/components/gx-ide-sign-in-team.js.map +0 -1
- package/dist/esm/gx-ide-select-user-team.entry.js +0 -117
- package/dist/esm/gx-ide-select-user-team.entry.js.map +0 -1
- package/dist/esm/gx-ide-sign-in-team.entry.js +0 -183
- package/dist/esm/gx-ide-sign-in-team.entry.js.map +0 -1
- package/dist/genexus-ide-ui/gx-ide-assets/select-user-team/langs/select-user-team.lang.en.json +0 -10
- package/dist/genexus-ide-ui/gx-ide-assets/select-user-team/langs/select-user-team.lang.ja.json +0 -10
- package/dist/genexus-ide-ui/gx-ide-assets/select-user-team/langs/select-user-team.lang.zh.json +0 -10
- package/dist/genexus-ide-ui/p-1d44dd0a.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-2317ffcb.entry.js +0 -156
- package/dist/genexus-ide-ui/p-2317ffcb.entry.js.map +0 -1
- package/dist/types/components/select-user-team/helpers.d.ts +0 -3
- package/dist/types/components/select-user-team/select-user-team.d.ts +0 -32
- package/dist/types/components/sign-in-team/helpers.d.ts +0 -3
- /package/dist/collection/components/{select-user-team/gx-ide-assets/select-user-team → select-team-or-org/gx-ide-assets/select-team-or-org}/images/copyrights-illustration.png +0 -0
- /package/dist/collection/components/{select-user-team/gx-ide-assets/select-user-team → select-team-or-org/gx-ide-assets/select-team-or-org}/images/icon-next.svg +0 -0
- /package/dist/collection/components/{sign-in-team/gx-ide-assets/sign-in-team → sign-in-organization/gx-ide-assets/sign-in-organization}/images/copyrights-illustration.png +0 -0
- /package/dist/collection/components/{sign-in-team/gx-ide-assets/sign-in-team → sign-in-organization/gx-ide-assets/sign-in-organization}/images/icon-next.svg +0 -0
- /package/dist/collection/components/{sign-in-team/sign-in-team.css → sign-in-organization/sign-in-organization.css} +0 -0
- /package/dist/genexus-ide-ui/gx-ide-assets/{select-user-team → select-team-or-org}/images/copyrights-illustration.png +0 -0
- /package/dist/genexus-ide-ui/gx-ide-assets/{select-user-team → select-team-or-org}/images/icon-next.svg +0 -0
- /package/dist/genexus-ide-ui/gx-ide-assets/{sign-in-team → sign-in-organization}/images/copyrights-illustration.png +0 -0
- /package/dist/genexus-ide-ui/gx-ide-assets/{sign-in-team → sign-in-organization}/images/icon-next.svg +0 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { g as n, r as e, h as i, H as t, a as s } from "./p-9b9ccd0c.js";
|
|
2
|
+
|
|
3
|
+
import { L as a } from "./p-311eedf3.js";
|
|
4
|
+
|
|
5
|
+
const mapItemsToComboBoxItemModel = n => n === null || n === void 0 ? void 0 : n.map((n => ({
|
|
6
|
+
value: n.id,
|
|
7
|
+
caption: n.name
|
|
8
|
+
})));
|
|
9
|
+
|
|
10
|
+
const o = "button.button-secondary {\n border-color: var(--color-border-neutral-default);\n}\n\n:host {\n display: grid;\n container-type: inline-size;\n container-name: host-container;\n block-size: 100%;\n inline-size: 100%;\n align-items: center;\n justify-content: center;\n}\n\n.slide {\n display: grid;\n grid-template-columns: 1fr 1fr;\n block-size: 100%;\n border-radius: var(--border-radius-m);\n max-block-size: 700px;\n max-inline-size: 1100px;\n background-color: var(--color-accent-surface-elevation-1);\n overflow: hidden;\n}\n.slide__illustration {\n overflow: hidden;\n object-fit: cover;\n object-position: left;\n block-size: 100%;\n inline-size: 100%;\n}\n.slide__main {\n display: grid;\n block-size: 100%;\n inline-size: 100%;\n padding: 48px;\n transform: translateY(4px);\n transition: var(--display-items-transtion-time) all;\n opacity: 0;\n position: relative;\n}\n.slide__main--visible {\n transform: translateY(0);\n opacity: 1;\n}\n.slide__main-container {\n display: grid;\n place-self: center;\n gap: var(--spacing-gap-xxl);\n inline-size: 100%;\n max-inline-size: 480px;\n}\n.slide__main-header {\n display: grid;\n gap: var(--spacing-gap-xxl);\n}\n.slide__main-title {\n display: flex;\n flex-direction: column;\n font-size: var(--font-size-header-h2);\n font-weight: var(--font-style-semi-bold);\n letter-spacing: 0.02em;\n line-height: var(--line-height-tight);\n color: var(--color-text-neutral-strawberry);\n}\n.slide__main-description {\n display: grid;\n gap: 40px;\n font-size: var(--font-size-body-l);\n font-weight: var(--font-style-regular);\n line-height: var(--line-height-spacious);\n color: var(--color-text-neutral-disabled);\n}\n\n.terms-conditions {\n text-decoration: underline;\n}\n\n.items-list {\n inline-size: 100%;\n --ch-combo-box__popover-max-inline-size: 100%;\n}\n\n.buttons-container {\n display: flex;\n inline-size: 100%;\n gap: var(--spacing-gap-xl);\n}\n\n.continue-btn,\n.cancel-btn {\n flex: 1;\n}\n\n@container host-container (max-width: 768px) {\n .slide {\n grid-template-columns: 1fr 2fr;\n }\n}\n@container host-container (max-width: 640px) {\n .slide {\n grid-template-columns: 1fr 5fr;\n }\n}";
|
|
11
|
+
|
|
12
|
+
var r = undefined && undefined.__classPrivateFieldGet || function(n, e, i, t) {
|
|
13
|
+
if (i === "a" && !t) throw new TypeError("Private accessor was defined without a getter");
|
|
14
|
+
if (typeof e === "function" ? n !== e || !t : !e.has(n)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
15
|
+
return i === "m" ? t : i === "a" ? t.call(n) : t ? t.value : e.get(n);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
var l = undefined && undefined.__classPrivateFieldSet || function(n, e, i, t, s) {
|
|
19
|
+
if (t === "m") throw new TypeError("Private method is not writable");
|
|
20
|
+
if (t === "a" && !s) throw new TypeError("Private accessor was defined without a setter");
|
|
21
|
+
if (typeof e === "function" ? n !== e || !s : !e.has(n)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
22
|
+
return t === "a" ? s.call(n, i) : s ? s.value = i : e.set(n, i), i;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var d, c, h, m, f, p;
|
|
26
|
+
|
|
27
|
+
const u = n(`./gx-ide-assets/welcome-page/images/copyrights-illustration.png`);
|
|
28
|
+
|
|
29
|
+
const g = n(`./gx-ide-assets/welcome-page/images/icon-next.svg`);
|
|
30
|
+
|
|
31
|
+
const v = [ "resets/box-sizing", "utils/typography", "components/button", "components/combo-box" ];
|
|
32
|
+
|
|
33
|
+
const b = class {
|
|
34
|
+
constructor(n) {
|
|
35
|
+
e(this, n);
|
|
36
|
+
/**
|
|
37
|
+
* The component hard-coded strings translations.
|
|
38
|
+
*/
|
|
39
|
+
// eslint-disable-next-line @stencil-community/own-props-must-be-private
|
|
40
|
+
d.set(this, void 0);
|
|
41
|
+
c.set(this, []);
|
|
42
|
+
h.set(this, void 0);
|
|
43
|
+
m.set(this, 100);
|
|
44
|
+
f.set(this, (async () => {
|
|
45
|
+
await this.confirmCallback(r(this, h, "f").value);
|
|
46
|
+
}));
|
|
47
|
+
p.set(this, (async () => {
|
|
48
|
+
await this.cancelCallback();
|
|
49
|
+
}));
|
|
50
|
+
this.slideIsVisible = false;
|
|
51
|
+
this.itemsModelReady = false;
|
|
52
|
+
this.cancelCallback = undefined;
|
|
53
|
+
this.confirmCallback = undefined;
|
|
54
|
+
this.selectionType = "team";
|
|
55
|
+
this.items = undefined;
|
|
56
|
+
}
|
|
57
|
+
itemsChanged(n) {
|
|
58
|
+
this.slideIsVisible = false;
|
|
59
|
+
if (!(n === null || n === void 0 ? void 0 : n.length)) {
|
|
60
|
+
this.itemsModelReady = false;
|
|
61
|
+
setTimeout((() => {
|
|
62
|
+
this.slideIsVisible = true;
|
|
63
|
+
}), r(this, m, "f"));
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
// switch step
|
|
67
|
+
setTimeout((() => {
|
|
68
|
+
l(this, c, mapItemsToComboBoxItemModel(n), "f");
|
|
69
|
+
this.itemsModelReady = true;
|
|
70
|
+
}), r(this, m, "f"));
|
|
71
|
+
// show slide
|
|
72
|
+
setTimeout((() => {
|
|
73
|
+
this.slideIsVisible = true;
|
|
74
|
+
}), r(this, m, "f") * 2);
|
|
75
|
+
}
|
|
76
|
+
async componentWillLoad() {
|
|
77
|
+
var n;
|
|
78
|
+
l(this, d, await a.getComponentStrings(this.el), "f");
|
|
79
|
+
if ((n = this.items) === null || n === void 0 ? void 0 : n.length) {
|
|
80
|
+
l(this, c, mapItemsToComboBoxItemModel(this.items), "f");
|
|
81
|
+
this.itemsModelReady = true;
|
|
82
|
+
}
|
|
83
|
+
this.el.style.setProperty("--display-items-transtion-time", r(this, m, "f").toString() + "ms");
|
|
84
|
+
}
|
|
85
|
+
componentDidLoad() {
|
|
86
|
+
this.slideIsVisible = true;
|
|
87
|
+
}
|
|
88
|
+
render() {
|
|
89
|
+
var n;
|
|
90
|
+
const e = r(this, d, "f")[this.selectionType];
|
|
91
|
+
return i(t, null, i("ch-theme", {
|
|
92
|
+
model: v
|
|
93
|
+
}), i("section", {
|
|
94
|
+
class: "slide"
|
|
95
|
+
}, i("img", {
|
|
96
|
+
src: u,
|
|
97
|
+
class: "slide__illustration",
|
|
98
|
+
alt: ""
|
|
99
|
+
}), i("div", {
|
|
100
|
+
class: {
|
|
101
|
+
slide__main: true,
|
|
102
|
+
"slide__main--visible": this.slideIsVisible
|
|
103
|
+
}
|
|
104
|
+
}, i("div", {
|
|
105
|
+
class: "slide__main-container"
|
|
106
|
+
}, this.itemsModelReady ? [ i("header", {
|
|
107
|
+
class: "slide__main-header"
|
|
108
|
+
}, i("img", {
|
|
109
|
+
src: g,
|
|
110
|
+
alt: ""
|
|
111
|
+
}), i("h2", {
|
|
112
|
+
// Split the title into two spans for better styling
|
|
113
|
+
class: "slide__main-title"
|
|
114
|
+
}, i("span", null, e.title))), i("div", {
|
|
115
|
+
class: "slide__select-item-description"
|
|
116
|
+
}, i("p", {
|
|
117
|
+
class: "body-semi-bold-l"
|
|
118
|
+
}, e.infoMessage)), i("div", {
|
|
119
|
+
class: "field-group"
|
|
120
|
+
}, i("div", {
|
|
121
|
+
class: "field field-block"
|
|
122
|
+
}, i("label", {
|
|
123
|
+
htmlFor: "items"
|
|
124
|
+
}, e.label), i("ch-combo-box-render", {
|
|
125
|
+
id: "items",
|
|
126
|
+
accessibleName: e.label,
|
|
127
|
+
class: "combo-box items-list",
|
|
128
|
+
model: r(this, c, "f"),
|
|
129
|
+
value: r(this, c, "f") && ((n = r(this, c, "f")[0]) === null || n === void 0 ? void 0 : n.value),
|
|
130
|
+
ref: n => l(this, h, n, "f")
|
|
131
|
+
}))), i("div", {
|
|
132
|
+
class: "buttons-container"
|
|
133
|
+
}, i("button", {
|
|
134
|
+
class: "button-primary continue-btn",
|
|
135
|
+
onClick: r(this, f, "f")
|
|
136
|
+
}, r(this, d, "f").confirmButtonCaption), i("button", {
|
|
137
|
+
class: "button-secondary cancel-btn",
|
|
138
|
+
onClick: r(this, p, "f")
|
|
139
|
+
}, r(this, d, "f").cancelButtonCaption)) ] : i("gx-ide-loader", {
|
|
140
|
+
show: true,
|
|
141
|
+
loaderTitle: r(this, d, "f").loader.title,
|
|
142
|
+
description: r(this, d, "f").loader.description
|
|
143
|
+
})))));
|
|
144
|
+
}
|
|
145
|
+
static get assetsDirs() {
|
|
146
|
+
return [ "gx-ide-assets/select-team-or-org" ];
|
|
147
|
+
}
|
|
148
|
+
get el() {
|
|
149
|
+
return s(this);
|
|
150
|
+
}
|
|
151
|
+
static get watchers() {
|
|
152
|
+
return {
|
|
153
|
+
items: [ "itemsChanged" ]
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
d = new WeakMap, c = new WeakMap, h = new WeakMap, m = new WeakMap, f = new WeakMap,
|
|
159
|
+
p = new WeakMap;
|
|
160
|
+
|
|
161
|
+
b.style = o;
|
|
162
|
+
|
|
163
|
+
export { b as gx_ide_select_team_or_org };
|
|
164
|
+
//# sourceMappingURL=p-2129d0d2.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["mapItemsToComboBoxItemModel","items","map","item","value","id","caption","name","selectTeamOrOrgCss","COPYRIGHTS_ILLUSTRATION","getAssetPath","ICON_NEXT","CSS_BUNDLES","GxIdeSelectTeamOrOrg","_GxIdeSelectTeamOrOrg_componentLocale","set","this","_GxIdeSelectTeamOrOrg_itemsModel","_GxIdeSelectTeamOrOrg_chSelectItemEl","_GxIdeSelectTeamOrOrg_displayItemsTransitionTime","_GxIdeSelectTeamOrOrg_continueHandler","async","confirmCallback","__classPrivateFieldGet","_GxIdeSelectTeamOrOrg_cancelHandler","cancelCallback","itemsChanged","newItems","slideIsVisible","length","itemsModelReady","setTimeout","__classPrivateFieldSet","componentWillLoad","Locale","getComponentStrings","el","_a","style","setProperty","toString","componentDidLoad","render","kindLocale","selectionType","h","Host","model","class","src","alt","slide__main","title","infoMessage","htmlFor","label","accessibleName","ref","onClick","confirmButtonCaption","cancelButtonCaption","show","loaderTitle","loader","description"],"sources":["src/components/select-team-or-org/helpers.tsx","src/components/select-team-or-org/select-team-or-org.scss?tag=gx-ide-select-team-or-org&encapsulation=shadow","src/components/select-team-or-org/select-team-or-org.tsx"],"sourcesContent":["import { ComboBoxItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\nimport { SelectableItem } from \"./select-team-or-org\";\n\nexport const mapItemsToComboBoxItemModel = (\n items: SelectableItem[]\n): ComboBoxItemModel[] => {\n return items?.map(item => {\n return {\n value: item.id,\n caption: item.name\n };\n });\n};\n","@import \"../../global/temporary-mercury-overrides/_button.scss\";\n\n:host {\n display: grid;\n container-type: inline-size;\n container-name: host-container;\n block-size: 100%;\n inline-size: 100%;\n align-items: center;\n justify-content: center;\n}\n\n.slide {\n display: grid;\n grid-template-columns: 1fr 1fr;\n block-size: 100%;\n border-radius: var(--border-radius-m);\n max-block-size: 700px;\n max-inline-size: 1100px;\n background-color: var(--color-accent-surface-elevation-1);\n overflow: hidden;\n\n &__illustration {\n overflow: hidden;\n object-fit: cover;\n object-position: left;\n block-size: 100%;\n inline-size: 100%;\n }\n\n &__main {\n display: grid;\n block-size: 100%;\n inline-size: 100%;\n padding: 48px;\n transform: translateY(4px);\n transition: var(--display-items-transtion-time) all;\n opacity: 0;\n\n position: relative;\n\n &--visible {\n transform: translateY(0);\n opacity: 1;\n }\n }\n\n &__main-container {\n display: grid;\n place-self: center;\n gap: var(--spacing-gap-xxl);\n inline-size: 100%;\n max-inline-size: 480px;\n }\n\n &__main-header {\n display: grid;\n gap: var(--spacing-gap-xxl);\n }\n\n &__main-title {\n display: flex;\n flex-direction: column;\n font-size: var(--font-size-header-h2);\n font-weight: var(--font-style-semi-bold);\n letter-spacing: 0.02em;\n line-height: var(--line-height-tight);\n color: var(--color-text-neutral-strawberry);\n }\n\n &__main-description {\n display: grid;\n gap: 40px;\n font-size: var(--font-size-body-l);\n font-weight: var(--font-style-regular);\n line-height: var(--line-height-spacious);\n color: var(--color-text-neutral-disabled);\n }\n}\n\n.terms-conditions {\n text-decoration: underline;\n}\n\n.items-list {\n inline-size: 100%;\n --ch-combo-box__popover-max-inline-size: 100%;\n}\n\n.buttons-container {\n display: flex;\n inline-size: 100%;\n gap: var(--spacing-gap-xl);\n}\n\n.continue-btn,\n.cancel-btn {\n flex: 1;\n}\n\n@container host-container (max-width: 768px) {\n .slide {\n grid-template-columns: 1fr 2fr;\n }\n}\n\n@container host-container (max-width: 640px) {\n .slide {\n grid-template-columns: 1fr 5fr;\n }\n}\n","// Stencil\nimport {\n Component,\n Host,\n h,\n Prop,\n State,\n Watch,\n Element,\n getAssetPath\n} from \"@stencil/core\";\n// Other Libraries\nimport { MercuryBundles } from \"@genexus/mercury\";\nimport { ComboBoxItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\n// Custom Imports\nimport { Locale } from \"../../common/locale\";\nimport { mapItemsToComboBoxItemModel } from \"./helpers\";\n\nconst COPYRIGHTS_ILLUSTRATION = getAssetPath(\n `./gx-ide-assets/welcome-page/images/copyrights-illustration.png`\n);\nconst ICON_NEXT = getAssetPath(\n `./gx-ide-assets/welcome-page/images/icon-next.svg`\n);\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/typography\",\n \"components/button\",\n \"components/combo-box\"\n];\n\n@Component({\n tag: \"gx-ide-select-team-or-org\",\n styleUrl: \"select-team-or-org.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/select-team-or-org\"]\n})\nexport class GxIdeSelectTeamOrOrg {\n /**\n * The component hard-coded strings translations.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n #itemsModel: ComboBoxItemModel[] = [];\n #chSelectItemEl: HTMLChComboBoxRenderElement;\n #displayItemsTransitionTime: number = 100;\n\n @Element() el: HTMLGxIdeSelectTeamOrOrgElement;\n\n /**\n * Defines if the main slide is visible or not. Used for smooth transitions between slides.\n */\n @State() slideIsVisible: boolean = false;\n\n /**\n * Defines if the items model is ready to be rendered.\n */\n @State() itemsModelReady: boolean = false;\n\n /**\n * Callback executed when the user clicks the 'Cancel' button\n */\n @Prop() readonly cancelCallback!: () => Promise<void>;\n\n /**\n * Callback executed when the user clicks the 'Confirm' button\n */\n @Prop() readonly confirmCallback!: (itemId: string) => Promise<void>;\n\n /**\n * Whether the picker is selecting a team or an organization.\n * Drives the title, info message and combo label.\n */\n @Prop() readonly selectionType: SelectionType = \"team\";\n\n /**\n * Array that contains the selectable items (teams or organizations).\n */\n @Prop() readonly items!: SelectableItem[];\n @Watch(\"items\")\n itemsChanged(newItems: SelectableItem[]) {\n this.slideIsVisible = false;\n\n if (!newItems?.length) {\n this.itemsModelReady = false;\n setTimeout(() => {\n this.slideIsVisible = true;\n }, this.#displayItemsTransitionTime);\n return;\n }\n\n // switch step\n setTimeout(() => {\n this.#itemsModel = mapItemsToComboBoxItemModel(newItems);\n this.itemsModelReady = true;\n }, this.#displayItemsTransitionTime);\n // show slide\n setTimeout(() => {\n this.slideIsVisible = true;\n }, this.#displayItemsTransitionTime * 2);\n }\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n\n if (this.items?.length) {\n this.#itemsModel = mapItemsToComboBoxItemModel(this.items);\n this.itemsModelReady = true;\n }\n\n this.el.style.setProperty(\n \"--display-items-transtion-time\",\n this.#displayItemsTransitionTime.toString() + \"ms\"\n );\n }\n\n componentDidLoad() {\n this.slideIsVisible = true;\n }\n\n #continueHandler = async () => {\n await this.confirmCallback(this.#chSelectItemEl.value);\n };\n\n #cancelHandler = async () => {\n await this.cancelCallback();\n };\n\n render() {\n const kindLocale = this.#componentLocale[this.selectionType];\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <section class=\"slide\">\n <img\n src={COPYRIGHTS_ILLUSTRATION}\n class=\"slide__illustration\"\n alt=\"\" // decorative\n />\n\n <div\n class={{\n \"slide__main\": true,\n \"slide__main--visible\": this.slideIsVisible\n }}\n >\n <div class=\"slide__main-container\">\n {this.itemsModelReady ? (\n [\n <header class=\"slide__main-header\">\n <img\n src={ICON_NEXT}\n alt=\"\" // decorative\n />\n <h2\n // Split the title into two spans for better styling\n class=\"slide__main-title\"\n >\n <span>{kindLocale.title}</span>\n </h2>\n </header>,\n <div class=\"slide__select-item-description\">\n <p class=\"body-semi-bold-l\">{kindLocale.infoMessage}</p>\n </div>,\n <div class=\"field-group\">\n <div class=\"field field-block\">\n <label htmlFor=\"items\">{kindLocale.label}</label>\n <ch-combo-box-render\n id=\"items\"\n accessibleName={kindLocale.label}\n class=\"combo-box items-list\"\n model={this.#itemsModel}\n value={this.#itemsModel && this.#itemsModel[0]?.value}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#chSelectItemEl =\n el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n </div>\n </div>,\n <div class=\"buttons-container\">\n <button\n class=\"button-primary continue-btn\"\n onClick={this.#continueHandler}\n >\n {this.#componentLocale.confirmButtonCaption}\n </button>\n <button\n class=\"button-secondary cancel-btn\"\n onClick={this.#cancelHandler}\n >\n {this.#componentLocale.cancelButtonCaption}\n </button>\n </div>\n ]\n ) : (\n <gx-ide-loader\n show\n loaderTitle={this.#componentLocale.loader.title}\n description={this.#componentLocale.loader.description}\n ></gx-ide-loader>\n )}\n </div>\n </div>\n </section>\n </Host>\n );\n }\n}\n\nexport type SelectableItem = {\n id: string;\n name: string;\n};\n\nexport type SelectionType = \"team\" | \"organization\";\n"],"mappings":";;;;AAGO,MAAMA,8BACXC,KAEOA,MAAK,QAALA,WAAK,aAALA,EAAOC,KAAIC,MACT;EACLC,OAAOD,EAAKE;EACZC,SAASH,EAAKI;;;ACTpB,MAAMC,IAAqB;;;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0c.js";
|
|
2
|
+
|
|
3
|
+
import { g as a } 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
|
+
import { L as s } from "./p-311eedf3.js";
|
|
14
|
+
|
|
15
|
+
import { c as n } from "./p-c5196b3b.js";
|
|
16
|
+
|
|
17
|
+
const r = "button.button-secondary{border-color:var(--color-border-neutral-default)}:host{display:grid;block-size:100%;overflow:hidden;grid-template-rows:max-content 1fr max-content;background-color:var(--color-accent-surface-elevation-1);color:var(--color-text-neutral-default)}.section{display:contents}.hero{display:flex;align-items:flex-start;gap:var(--spacing-gap-xl);padding-block:var(--spacing-padding-l);padding-inline:var(--spacing-padding-l);border-block-end:var(--size-1) solid var(--color-border-surface-on-elevation-1)}.hero__text{flex:1;min-inline-size:0}.hero__title{margin:0;color:var(--color-text-neutral-default)}.hero__description{margin-block:var(--spacing-gap-xs) 0;margin-inline:0;color:var(--color-text-neutral-disabled);text-wrap:pretty}.hero__badge{flex:none;display:grid;place-items:center;inline-size:44px;block-size:44px;border-radius:var(--border-radius-m);background-color:var(--color-accent-item-hover);color:var(--color-icon-primary-default)}.main{overflow:auto;display:flex;flex-direction:column;gap:var(--spacing-gap-xxl);padding-block:var(--spacing-padding-l);padding-inline:var(--spacing-padding-l)}.field-section{display:flex;flex-direction:column;gap:var(--spacing-gap-l)}.field-section+.field-section{padding-block-start:var(--spacing-padding-xl);border-block-start:var(--size-1) solid var(--color-border-surface-on-elevation-1)}.field-section__head{display:flex;align-items:baseline;gap:var(--spacing-gap-m)}.field-section__title{font-family:var(--font-family-body);font-weight:var(--font-style-semi-bold);font-size:var(--font-size-caption-m);letter-spacing:0.06em;text-transform:uppercase;color:var(--color-text-neutral-neutral)}.fields{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:var(--spacing-gap-l)}.field--full{grid-column:1/-1}.field--checkbox{display:flex;flex-direction:column;gap:var(--spacing-gap-xs)}.field--checkbox .field__row{display:flex;align-items:center;gap:var(--spacing-gap-xs)}.field--checkbox .label{margin:0;cursor:pointer}.field--checkbox .field__hint{margin:0;margin-inline-start:calc(var(--spacing-gap-m) + var(--spacing-gap-m));color:var(--color-text-neutral-disabled);text-wrap:pretty}.footer{padding-block:var(--spacing-padding-m);padding-inline:var(--spacing-padding-l)}";
|
|
18
|
+
|
|
19
|
+
var l = undefined && undefined.__classPrivateFieldGet || function(e, t, i, o) {
|
|
20
|
+
if (i === "a" && !o) throw new TypeError("Private accessor was defined without a getter");
|
|
21
|
+
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");
|
|
22
|
+
return i === "m" ? o : i === "a" ? o.call(e) : o ? o.value : t.get(e);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var c = undefined && undefined.__classPrivateFieldSet || function(e, t, i, o, a) {
|
|
26
|
+
if (o === "m") throw new TypeError("Private method is not writable");
|
|
27
|
+
if (o === "a" && !a) throw new TypeError("Private accessor was defined without a setter");
|
|
28
|
+
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");
|
|
29
|
+
return o === "a" ? a.call(e, i) : a ? a.value = i : t.set(e, i), i;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var d, p, h, u, f, b, g, v, m, x, w, y;
|
|
33
|
+
|
|
34
|
+
const k = [ "resets/box-sizing", "components/button", "components/combo-box", "components/edit", "components/icon", "utils/form", "utils/layout", "utils/typography", "utils/spacing", "chameleon/scrollbar" ];
|
|
35
|
+
|
|
36
|
+
const _ = a({
|
|
37
|
+
category: "system",
|
|
38
|
+
name: "database",
|
|
39
|
+
colorType: "primary"
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Name of the property that toggles integrated security. Its presence in
|
|
44
|
+
* `properties` is what drives the rendering of the Authentication section.
|
|
45
|
+
*/ const W = "TRUSTED_CONNECTION";
|
|
46
|
+
|
|
47
|
+
const M = "USER_ID";
|
|
48
|
+
|
|
49
|
+
const j = "USER_PASSWORD";
|
|
50
|
+
|
|
51
|
+
/** Category that groups the authentication-related fields. */ const z = "authentication";
|
|
52
|
+
|
|
53
|
+
const C = class {
|
|
54
|
+
constructor(i) {
|
|
55
|
+
e(this, i);
|
|
56
|
+
// eslint-disable-next-line @stencil-community/own-props-must-be-private
|
|
57
|
+
d.set(this, void 0);
|
|
58
|
+
p.set(this, (e => {
|
|
59
|
+
var t;
|
|
60
|
+
return (t = e.value) !== null && t !== void 0 ? t : "";
|
|
61
|
+
}));
|
|
62
|
+
h.set(this, (() => {
|
|
63
|
+
var e;
|
|
64
|
+
return ((e = this.properties) !== null && e !== void 0 ? e : []).some((e => e.missing && l(this, p, "f").call(this, e).trim() === ""));
|
|
65
|
+
}));
|
|
66
|
+
u.set(this, (e => {
|
|
67
|
+
var t;
|
|
68
|
+
return ((t = e.standardValues) !== null && t !== void 0 ? t : []).map((e => ({
|
|
69
|
+
value: e,
|
|
70
|
+
caption: e
|
|
71
|
+
})));
|
|
72
|
+
}));
|
|
73
|
+
f.set(this, (e => {
|
|
74
|
+
var t;
|
|
75
|
+
return e.name === W || e.name === M || e.name === j || ((t = e.category) === null || t === void 0 ? void 0 : t.toLowerCase()) === z;
|
|
76
|
+
}));
|
|
77
|
+
/** Whether the host sent the TRUSTED_CONNECTION property. Only then is the
|
|
78
|
+
* Authentication section rendered. */ b.set(this, (() => {
|
|
79
|
+
var e;
|
|
80
|
+
return ((e = this.properties) !== null && e !== void 0 ? e : []).some((e => e.name === W));
|
|
81
|
+
}));
|
|
82
|
+
g.set(this, (e => t => {
|
|
83
|
+
var i, o;
|
|
84
|
+
const a = t.detail;
|
|
85
|
+
const s = typeof a === "string" ? a : (o = (i = t.target) === null || i === void 0 ? void 0 : i.value) !== null && o !== void 0 ? o : "";
|
|
86
|
+
this.propertyChangeCallback(e, s);
|
|
87
|
+
}));
|
|
88
|
+
v.set(this, (() => {
|
|
89
|
+
var e;
|
|
90
|
+
(e = this.cancelCallback) === null || e === void 0 ? void 0 : e.call(this);
|
|
91
|
+
}));
|
|
92
|
+
m.set(this, (() => {
|
|
93
|
+
var e;
|
|
94
|
+
(e = this.confirmCallback) === null || e === void 0 ? void 0 : e.call(this);
|
|
95
|
+
}));
|
|
96
|
+
// #region Renders
|
|
97
|
+
x.set(this, (e => {
|
|
98
|
+
const i = `field-${e.name}`;
|
|
99
|
+
const o = l(this, p, "f").call(this, e);
|
|
100
|
+
switch (e.control) {
|
|
101
|
+
case "password":
|
|
102
|
+
return t("ch-edit", {
|
|
103
|
+
id: i,
|
|
104
|
+
class: "input",
|
|
105
|
+
type: "password",
|
|
106
|
+
showPasswordButton: true,
|
|
107
|
+
debounce: n.inputDebounce,
|
|
108
|
+
value: o,
|
|
109
|
+
onInput: l(this, g, "f").call(this, e.name)
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
case "combo":
|
|
113
|
+
return t("ch-combo-box-render", {
|
|
114
|
+
id: i,
|
|
115
|
+
class: "combo-box",
|
|
116
|
+
value: o,
|
|
117
|
+
model: l(this, u, "f").call(this, e),
|
|
118
|
+
onInput: l(this, g, "f").call(this, e.name),
|
|
119
|
+
onChange: l(this, g, "f").call(this, e.name)
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
case "checkbox":
|
|
123
|
+
return t("ch-checkbox", {
|
|
124
|
+
id: i,
|
|
125
|
+
class: "checkbox",
|
|
126
|
+
value: o,
|
|
127
|
+
checkedValue: "Yes",
|
|
128
|
+
unCheckedValue: "No",
|
|
129
|
+
onInput: l(this, g, "f").call(this, e.name)
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
case "combo-editable":
|
|
133
|
+
return t("ch-combo-box-render", {
|
|
134
|
+
id: i,
|
|
135
|
+
class: "combo-box",
|
|
136
|
+
suggest: true,
|
|
137
|
+
suggestDebounce: n.inputDebounce,
|
|
138
|
+
value: o,
|
|
139
|
+
model: l(this, u, "f").call(this, e),
|
|
140
|
+
onInput: l(this, g, "f").call(this, e.name),
|
|
141
|
+
onChange: l(this, g, "f").call(this, e.name),
|
|
142
|
+
part: `combo-box combo-box--editable combo-box--${e.name}`
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
case "custom":
|
|
146
|
+
case "readonly":
|
|
147
|
+
return t("ch-edit", {
|
|
148
|
+
id: i,
|
|
149
|
+
class: "input",
|
|
150
|
+
readonly: true,
|
|
151
|
+
value: o,
|
|
152
|
+
part: `input input--${e.control} input--${e.name}`
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
// "text"
|
|
156
|
+
default:
|
|
157
|
+
return t("ch-edit", {
|
|
158
|
+
id: i,
|
|
159
|
+
class: "input",
|
|
160
|
+
debounce: n.inputDebounce,
|
|
161
|
+
value: o,
|
|
162
|
+
onInput: l(this, g, "f").call(this, e.name),
|
|
163
|
+
part: `input input--text input--${e.name}`
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}));
|
|
167
|
+
w.set(this, (e => {
|
|
168
|
+
const i = `field-${e.name}`;
|
|
169
|
+
const o = e.control === "readonly" || e.control === "custom";
|
|
170
|
+
const a = e.control === "checkbox";
|
|
171
|
+
if (a) {
|
|
172
|
+
return t("div", {
|
|
173
|
+
class: "field field--checkbox field--full",
|
|
174
|
+
key: e.name
|
|
175
|
+
}, t("div", {
|
|
176
|
+
class: "field__row"
|
|
177
|
+
}, l(this, x, "f").call(this, e), t("label", {
|
|
178
|
+
class: "label",
|
|
179
|
+
htmlFor: i
|
|
180
|
+
}, e.label)), e.description && t("p", {
|
|
181
|
+
class: "field__hint body-regular-s"
|
|
182
|
+
}, e.description));
|
|
183
|
+
}
|
|
184
|
+
return t("div", {
|
|
185
|
+
class: "field field-block",
|
|
186
|
+
key: e.name
|
|
187
|
+
}, t("label", {
|
|
188
|
+
class: {
|
|
189
|
+
label: true,
|
|
190
|
+
"label--disabled": o
|
|
191
|
+
},
|
|
192
|
+
htmlFor: i
|
|
193
|
+
}, e.label), l(this, x, "f").call(this, e));
|
|
194
|
+
}));
|
|
195
|
+
y.set(this, ((e, i) => t("section", {
|
|
196
|
+
class: "field-section"
|
|
197
|
+
}, t("div", {
|
|
198
|
+
class: "field-section__head"
|
|
199
|
+
}, t("span", {
|
|
200
|
+
class: "field-section__title"
|
|
201
|
+
}, e)), t("div", {
|
|
202
|
+
class: "fields"
|
|
203
|
+
}, i.map(l(this, w, "f"))))));
|
|
204
|
+
this.properties = [];
|
|
205
|
+
this.cancelCallback = undefined;
|
|
206
|
+
this.confirmCallback = undefined;
|
|
207
|
+
this.propertyChangeCallback = undefined;
|
|
208
|
+
}
|
|
209
|
+
async componentWillLoad() {
|
|
210
|
+
c(this, d, await s.getComponentStrings(this.el), "f");
|
|
211
|
+
}
|
|
212
|
+
// #endregion Renders
|
|
213
|
+
render() {
|
|
214
|
+
var e;
|
|
215
|
+
const o = l(this, d, "f").header.title;
|
|
216
|
+
const a = l(this, d, "f").header.description;
|
|
217
|
+
const s = l(this, d, "f").sections;
|
|
218
|
+
const n = (e = this.properties) !== null && e !== void 0 ? e : [];
|
|
219
|
+
const r = l(this, b, "f").call(this);
|
|
220
|
+
// The Authentication section is only rendered when TRUSTED_CONNECTION is
|
|
221
|
+
// present; otherwise every field stays in the always-present Connection
|
|
222
|
+
// section so nothing is dropped.
|
|
223
|
+
const c = r ? n.filter(l(this, f, "f")) : [];
|
|
224
|
+
const p = r ? n.filter((e => !l(this, f, "f").call(this, e))) : n;
|
|
225
|
+
return t(i, {
|
|
226
|
+
class: "widget"
|
|
227
|
+
}, t("ch-theme", {
|
|
228
|
+
model: k
|
|
229
|
+
}), t("section", {
|
|
230
|
+
class: "section"
|
|
231
|
+
}, t("div", {
|
|
232
|
+
class: "hero"
|
|
233
|
+
}, t("div", {
|
|
234
|
+
class: "hero__text"
|
|
235
|
+
}, t("h1", {
|
|
236
|
+
class: "hero__title subtitle-semi-bold-l"
|
|
237
|
+
}, o), a && t("p", {
|
|
238
|
+
class: "hero__description body-regular-s"
|
|
239
|
+
}, a)), t("div", {
|
|
240
|
+
class: "hero__badge",
|
|
241
|
+
"aria-hidden": "true"
|
|
242
|
+
}, t("ch-image", {
|
|
243
|
+
class: "icon-xl",
|
|
244
|
+
src: _
|
|
245
|
+
}))), t("div", {
|
|
246
|
+
class: "main scrollable"
|
|
247
|
+
}, p.length > 0 && l(this, y, "f").call(this, s.connection, p), r && c.length > 0 && l(this, y, "f").call(this, s.authentication, c)), t("footer", {
|
|
248
|
+
class: "dialog-footer-with-border footer"
|
|
249
|
+
}, t("div", {
|
|
250
|
+
class: "buttons-spacer"
|
|
251
|
+
}, t("button", {
|
|
252
|
+
class: "button-secondary",
|
|
253
|
+
id: "button-cancel",
|
|
254
|
+
type: "button",
|
|
255
|
+
onClick: l(this, v, "f"),
|
|
256
|
+
part: "button-cancel"
|
|
257
|
+
}, l(this, d, "f").footer.btnCancel), t("button", {
|
|
258
|
+
class: "button-primary",
|
|
259
|
+
id: "button-confirm",
|
|
260
|
+
type: "button",
|
|
261
|
+
disabled: l(this, h, "f").call(this),
|
|
262
|
+
onClick: l(this, m, "f"),
|
|
263
|
+
part: "button-confirm"
|
|
264
|
+
}, l(this, d, "f").footer.btnConfirm)))));
|
|
265
|
+
}
|
|
266
|
+
static get assetsDirs() {
|
|
267
|
+
return [ "gx-ide-assets/db-properties-configurator" ];
|
|
268
|
+
}
|
|
269
|
+
get el() {
|
|
270
|
+
return o(this);
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
d = new WeakMap, p = new WeakMap, h = new WeakMap, u = new WeakMap, f = new WeakMap,
|
|
275
|
+
b = new WeakMap, g = new WeakMap, v = new WeakMap, m = new WeakMap, x = new WeakMap,
|
|
276
|
+
w = new WeakMap, y = new WeakMap;
|
|
277
|
+
|
|
278
|
+
C.style = r;
|
|
279
|
+
|
|
280
|
+
export { C as gx_ide_db_properties_configurator };
|
|
281
|
+
//# sourceMappingURL=p-e759cfdb.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["dbPropertiesConfiguratorCss","CSS_BUNDLES","DATABASE_ICON","getIconPath","category","name","colorType","TRUSTED_CONNECTION","USER_ID","USER_PASSWORD","AUTH_CATEGORY","GxIdeDbPropertiesConfigurator","_GxIdeDbPropertiesConfigurator_componentLocale","set","this","_GxIdeDbPropertiesConfigurator_getValue","field","_a","value","_GxIdeDbPropertiesConfigurator_hasPendingRequired","properties","some","missing","__classPrivateFieldGet","call","trim","_GxIdeDbPropertiesConfigurator_buildComboModel","standardValues","map","caption","_GxIdeDbPropertiesConfigurator_isAuthField","toLowerCase","_GxIdeDbPropertiesConfigurator_hasTrustedConnection","_GxIdeDbPropertiesConfigurator_valueChangeHandler","event","detail","_b","target","propertyChangeCallback","_GxIdeDbPropertiesConfigurator_cancelButtonClickedHandler","cancelCallback","_GxIdeDbPropertiesConfigurator_confirmButtonClickedHandler","confirmCallback","_GxIdeDbPropertiesConfigurator_renderControl","fieldId","control","h","id","class","type","showPasswordButton","debounce","config","inputDebounce","onInput","model","onChange","checkedValue","unCheckedValue","suggest","suggestDebounce","part","readonly","_GxIdeDbPropertiesConfigurator_renderField","isReadonly","isCheckbox","key","htmlFor","label","description","_GxIdeDbPropertiesConfigurator_renderSection","title","fields","componentWillLoad","__classPrivateFieldSet","Locale","getComponentStrings","el","render","header","sections","allFields","hasAuthSection","authFields","filter","connectionFields","Host","src","length","connection","authentication","onClick","footer","btnCancel","disabled","btnConfirm"],"sources":["src/components/db-properties-configurator/db-properties-configurator.scss?tag=gx-ide-db-properties-configurator&encapsulation=shadow","src/components/db-properties-configurator/db-properties-configurator.tsx"],"sourcesContent":["@import \"../../global/temporary-mercury-overrides/_button.scss\";\n\n// The component reproduces the Mercury \"Set required properties\" connection\n// dialog. Real Mercury classes (.dialog-header-with-border, .field-group-\n// justified-end, .label, .input, .combo-box, .button-*, typography) come from\n// the loaded bundles; the rules below only add the scaffolding Mercury does\n// not define (hero banner, badge, close button, field help) using DS tokens.\n\n:host {\n display: grid;\n block-size: 100%;\n overflow: hidden;\n grid-template-rows: max-content 1fr max-content;\n background-color: var(--color-accent-surface-elevation-1);\n color: var(--color-text-neutral-default);\n}\n\n.section {\n // section is just for semantics; the host owns the grid.\n display: contents;\n}\n\n// #region Hero\n.hero {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-xl);\n padding-block: var(--spacing-padding-l);\n padding-inline: var(--spacing-padding-l);\n border-block-end: var(--size-1) solid\n var(--color-border-surface-on-elevation-1);\n}\n\n.hero__text {\n flex: 1;\n min-inline-size: 0;\n}\n\n.hero__title {\n margin: 0;\n color: var(--color-text-neutral-default);\n}\n\n.hero__description {\n margin-block: var(--spacing-gap-xs) 0;\n margin-inline: 0;\n color: var(--color-text-neutral-disabled);\n text-wrap: pretty;\n}\n\n.hero__badge {\n flex: none;\n display: grid;\n place-items: center;\n inline-size: 44px;\n block-size: 44px;\n border-radius: var(--border-radius-m);\n background-color: var(--color-accent-item-hover);\n color: var(--color-icon-primary-default);\n}\n// #endregion Hero\n\n// #region Body\n.main {\n overflow: auto;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-xxl);\n padding-block: var(--spacing-padding-l);\n padding-inline: var(--spacing-padding-l);\n}\n\n// Field section: a quiet uppercase header + its field grid. Sections after\n// the first get a divider so the body reads as structured groups.\n.field-section {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-l);\n}\n\n.field-section + .field-section {\n padding-block-start: var(--spacing-padding-xl);\n border-block-start: var(--size-1) solid\n var(--color-border-surface-on-elevation-1);\n}\n\n.field-section__head {\n display: flex;\n align-items: baseline;\n gap: var(--spacing-gap-m);\n}\n\n.field-section__title {\n font-family: var(--font-family-body);\n font-weight: var(--font-style-semi-bold);\n font-size: var(--font-size-caption-m);\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--color-text-neutral-neutral);\n}\n\n// Two-column field grid. Each field occupies one column; checkbox fields\n// (and any other field marked as full-width) span the entire row, forcing\n// the following fields to wrap onto the next row.\n.fields {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--spacing-gap-l);\n}\n\n.field--full {\n grid-column: 1 / -1;\n}\n\n// Inline checkbox field: control + label on the same row, optional help text\n// flows below aligned with the label.\n.field--checkbox {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-xs);\n}\n\n.field--checkbox .field__row {\n display: flex;\n align-items: center;\n gap: var(--spacing-gap-xs);\n}\n\n.field--checkbox .label {\n margin: 0;\n cursor: pointer;\n}\n\n// Help text below a checkbox, indented to align with the label past the box.\n.field--checkbox .field__hint {\n margin: 0;\n margin-inline-start: calc(var(--spacing-gap-m) + var(--spacing-gap-m));\n color: var(--color-text-neutral-disabled);\n text-wrap: pretty;\n}\n// #endregion Body\n\n// #region Footer\n.footer {\n padding-block: var(--spacing-padding-m);\n padding-inline: var(--spacing-padding-l);\n}\n// #endregion Footer\n","import { Component, Host, Prop, Element, h } from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\n\nimport { Locale } from \"../../common/locale\";\nimport { config } from \"../../common/config\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/combo-box\",\n \"components/edit\",\n \"components/icon\",\n \"utils/form\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst DATABASE_ICON = getIconPath({\n category: \"system\",\n name: \"database\",\n colorType: \"primary\"\n});\n\n/**\n * Name of the property that toggles integrated security. Its presence in\n * `properties` is what drives the rendering of the Authentication section.\n */\nconst TRUSTED_CONNECTION = \"TRUSTED_CONNECTION\";\nconst USER_ID = \"USER_ID\";\nconst USER_PASSWORD = \"USER_PASSWORD\";\n\n/** Category that groups the authentication-related fields. */\nconst AUTH_CATEGORY = \"authentication\";\n\n@Component({\n tag: \"gx-ide-db-properties-configurator\",\n styleUrl: \"db-properties-configurator.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/db-properties-configurator\"]\n})\nexport class GxIdeDbPropertiesConfigurator {\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n\n @Element() el: HTMLGxIdeDbPropertiesConfiguratorElement;\n\n /**\n * The list of properties to configure. Acts as the single source of truth:\n * the dialog reads each value from `DSPropertyField.value` and notifies the\n * host of every edit through `propertyChangeCallback`.\n */\n @Prop() readonly properties: DSPropertyField[] = [];\n\n /**\n * Callback invoked when the user cancels the configuration.\n */\n @Prop() readonly cancelCallback!: CancelCallback;\n\n /**\n * Callback invoked when the user confirms the configuration.\n */\n @Prop() readonly confirmCallback!: ConfirmCallback;\n\n /**\n * Callback invoked on every input change. Receives the name of the\n * property that changed and its new value. The host is expected to apply\n * the change and push an updated `properties` array back to the component.\n */\n @Prop() readonly propertyChangeCallback!: PropertyChangeCallback;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n #getValue = (field: DSPropertyField): string => field.value ?? \"\";\n\n #hasPendingRequired = (): boolean =>\n (this.properties ?? []).some(\n field => field.missing && this.#getValue(field).trim() === \"\"\n );\n\n #buildComboModel = (field: DSPropertyField): ComboBoxModel =>\n (field.standardValues ?? []).map(value => ({ value, caption: value }));\n\n #isAuthField = (field: DSPropertyField): boolean =>\n field.name === TRUSTED_CONNECTION ||\n field.name === USER_ID ||\n field.name === USER_PASSWORD ||\n field.category?.toLowerCase() === AUTH_CATEGORY;\n\n /** Whether the host sent the TRUSTED_CONNECTION property. Only then is the\n * Authentication section rendered. */\n #hasTrustedConnection = (): boolean =>\n (this.properties ?? []).some(field => field.name === TRUSTED_CONNECTION);\n\n #valueChangeHandler =\n (name: string) => (event: CustomEvent<string> | InputEvent) => {\n const detail = (event as CustomEvent<string>).detail;\n const value =\n typeof detail === \"string\"\n ? detail\n : ((event.target as HTMLChEditElement)?.value ?? \"\");\n this.propertyChangeCallback(name, value);\n };\n\n #cancelButtonClickedHandler = () => {\n this.cancelCallback?.();\n };\n\n #confirmButtonClickedHandler = () => {\n this.confirmCallback?.();\n };\n\n // #region Renders\n\n #renderControl = (field: DSPropertyField) => {\n const fieldId = `field-${field.name}`;\n const value = this.#getValue(field);\n\n switch (field.control) {\n case \"password\":\n return (\n <ch-edit\n id={fieldId}\n class=\"input\"\n type=\"password\"\n showPasswordButton\n debounce={config.inputDebounce}\n value={value}\n onInput={this.#valueChangeHandler(field.name)}\n ></ch-edit>\n );\n\n case \"combo\":\n return (\n <ch-combo-box-render\n id={fieldId}\n class=\"combo-box\"\n value={value}\n model={this.#buildComboModel(field)}\n onInput={this.#valueChangeHandler(field.name)}\n onChange={this.#valueChangeHandler(field.name)}\n ></ch-combo-box-render>\n );\n\n case \"checkbox\":\n return (\n <ch-checkbox\n id={fieldId}\n class=\"checkbox\"\n value={value}\n checkedValue=\"Yes\"\n unCheckedValue=\"No\"\n onInput={this.#valueChangeHandler(field.name)}\n ></ch-checkbox>\n );\n\n case \"combo-editable\":\n return (\n <ch-combo-box-render\n id={fieldId}\n class=\"combo-box\"\n suggest\n suggestDebounce={config.inputDebounce}\n value={value}\n model={this.#buildComboModel(field)}\n onInput={this.#valueChangeHandler(field.name)}\n onChange={this.#valueChangeHandler(field.name)}\n part={`combo-box combo-box--editable combo-box--${field.name}`}\n ></ch-combo-box-render>\n );\n\n case \"custom\":\n case \"readonly\":\n return (\n <ch-edit\n id={fieldId}\n class=\"input\"\n readonly\n value={value}\n part={`input input--${field.control} input--${field.name}`}\n ></ch-edit>\n );\n\n // \"text\"\n default:\n return (\n <ch-edit\n id={fieldId}\n class=\"input\"\n debounce={config.inputDebounce}\n value={value}\n onInput={this.#valueChangeHandler(field.name)}\n part={`input input--text input--${field.name}`}\n ></ch-edit>\n );\n }\n };\n\n #renderField = (field: DSPropertyField) => {\n const fieldId = `field-${field.name}`;\n const isReadonly =\n field.control === \"readonly\" || field.control === \"custom\";\n const isCheckbox = field.control === \"checkbox\";\n\n if (isCheckbox) {\n return (\n <div class=\"field field--checkbox field--full\" key={field.name}>\n <div class=\"field__row\">\n {this.#renderControl(field)}\n <label class=\"label\" htmlFor={fieldId}>\n {field.label}\n </label>\n </div>\n {field.description && (\n <p class=\"field__hint body-regular-s\">{field.description}</p>\n )}\n </div>\n );\n }\n\n return (\n <div class=\"field field-block\" key={field.name}>\n <label\n class={{ \"label\": true, \"label--disabled\": isReadonly }}\n htmlFor={fieldId}\n >\n {field.label}\n </label>\n\n {this.#renderControl(field)}\n </div>\n );\n };\n\n #renderSection = (title: string, fields: DSPropertyField[]) => (\n <section class=\"field-section\">\n <div class=\"field-section__head\">\n <span class=\"field-section__title\">{title}</span>\n </div>\n <div class=\"fields\">{fields.map(this.#renderField)}</div>\n </section>\n );\n\n // #endregion Renders\n\n render() {\n const title = this.#componentLocale.header.title;\n const description = this.#componentLocale.header.description;\n const sections = this.#componentLocale.sections;\n\n const allFields = this.properties ?? [];\n const hasAuthSection = this.#hasTrustedConnection();\n\n // The Authentication section is only rendered when TRUSTED_CONNECTION is\n // present; otherwise every field stays in the always-present Connection\n // section so nothing is dropped.\n const authFields = hasAuthSection\n ? allFields.filter(this.#isAuthField)\n : [];\n const connectionFields = hasAuthSection\n ? allFields.filter(field => !this.#isAuthField(field))\n : allFields;\n\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <section class=\"section\">\n <div class=\"hero\">\n <div class=\"hero__text\">\n <h1 class=\"hero__title subtitle-semi-bold-l\">{title}</h1>\n {description && (\n <p class=\"hero__description body-regular-s\">{description}</p>\n )}\n </div>\n <div class=\"hero__badge\" aria-hidden=\"true\">\n <ch-image class=\"icon-xl\" src={DATABASE_ICON}></ch-image>\n </div>\n </div>\n\n <div class=\"main scrollable\">\n {connectionFields.length > 0 &&\n this.#renderSection(sections.connection, connectionFields)}\n\n {hasAuthSection &&\n authFields.length > 0 &&\n this.#renderSection(sections.authentication, authFields)}\n </div>\n\n <footer class=\"dialog-footer-with-border footer\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n id=\"button-cancel\"\n type=\"button\"\n onClick={this.#cancelButtonClickedHandler}\n part=\"button-cancel\"\n >\n {this.#componentLocale.footer.btnCancel}\n </button>\n <button\n class=\"button-primary\"\n id=\"button-confirm\"\n type=\"button\"\n disabled={this.#hasPendingRequired()}\n onClick={this.#confirmButtonClickedHandler}\n part=\"button-confirm\"\n >\n {this.#componentLocale.footer.btnConfirm}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type DSControlKind =\n | \"checkbox\"\n | \"text\"\n | \"password\"\n | \"combo\"\n | \"combo-editable\"\n | \"custom\"\n | \"readonly\";\n\nexport interface DSPropertyField {\n /** `PropertyData.name` — key used to set the property value. */\n name: string;\n /** `definition.displayName`. */\n label: string;\n /** `definition.description` (rendered below the control). */\n description?: string;\n /** `definition.category` (optional grouping). */\n category?: string;\n\n /** Control resolved by the host. */\n control: DSControlKind;\n\n /** `PropertyData.value` (masked when password). */\n value: string;\n /** `required && isDefault` (host detection). */\n missing: boolean;\n\n // combos:\n /** `PropertyData.standardValues`. */\n standardValues?: string[];\n /** `PropertyData.isStandardValuesExclusive`. */\n exclusive?: boolean;\n}\n\nexport type CancelCallback = () => void | Promise<void>;\n\nexport type ConfirmCallback = () => void | Promise<void>;\n\nexport type PropertyChangeCallback = (\n name: string,\n value: string\n) => void | Promise<void>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,MAAMA,IAA8B;;;;;;;;;;;;;;;;;ACQpC,MAAMC,IAA8B,EAClC,qBACA,qBACA,wBACA,mBACA,mBACA,cACA,gBACA,oBACA,iBACA;;AAGF,MAAMC,IAAgBC,EAAY;EAChCC,UAAU;EACVC,MAAM;EACNC,WAAW;;;;;;GAOb,OAAMC,IAAqB;;AA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AIyB,GAAA;MACbsB,MAAK;OAEJtC,EAAAT,MAAIF,GAAA,KAAkBgF,OAAOC,YAEhC/C,EAAA;MACEE,OAAM;MACND,IAAG;MACHE,MAAK;MACL6C,UAAUvE,EAAAT,MAAIK,GAAA,KAAoBK,KAAxBV;MACV6E,SAASpE,EAAAT,MAAI2B,GAAA;MACboB,MAAK;OAEJtC,EAAAT,MAAIF,GAAA,KAAkBgF,OAAOG"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare class GxIdeDbPropertiesConfigurator {
|
|
2
|
+
#private;
|
|
3
|
+
el: HTMLGxIdeDbPropertiesConfiguratorElement;
|
|
4
|
+
/**
|
|
5
|
+
* The list of properties to configure. Acts as the single source of truth:
|
|
6
|
+
* the dialog reads each value from `DSPropertyField.value` and notifies the
|
|
7
|
+
* host of every edit through `propertyChangeCallback`.
|
|
8
|
+
*/
|
|
9
|
+
readonly properties: DSPropertyField[];
|
|
10
|
+
/**
|
|
11
|
+
* Callback invoked when the user cancels the configuration.
|
|
12
|
+
*/
|
|
13
|
+
readonly cancelCallback: CancelCallback;
|
|
14
|
+
/**
|
|
15
|
+
* Callback invoked when the user confirms the configuration.
|
|
16
|
+
*/
|
|
17
|
+
readonly confirmCallback: ConfirmCallback;
|
|
18
|
+
/**
|
|
19
|
+
* Callback invoked on every input change. Receives the name of the
|
|
20
|
+
* property that changed and its new value. The host is expected to apply
|
|
21
|
+
* the change and push an updated `properties` array back to the component.
|
|
22
|
+
*/
|
|
23
|
+
readonly propertyChangeCallback: PropertyChangeCallback;
|
|
24
|
+
componentWillLoad(): Promise<void>;
|
|
25
|
+
render(): any;
|
|
26
|
+
}
|
|
27
|
+
export type DSControlKind = "checkbox" | "text" | "password" | "combo" | "combo-editable" | "custom" | "readonly";
|
|
28
|
+
export interface DSPropertyField {
|
|
29
|
+
/** `PropertyData.name` — key used to set the property value. */
|
|
30
|
+
name: string;
|
|
31
|
+
/** `definition.displayName`. */
|
|
32
|
+
label: string;
|
|
33
|
+
/** `definition.description` (rendered below the control). */
|
|
34
|
+
description?: string;
|
|
35
|
+
/** `definition.category` (optional grouping). */
|
|
36
|
+
category?: string;
|
|
37
|
+
/** Control resolved by the host. */
|
|
38
|
+
control: DSControlKind;
|
|
39
|
+
/** `PropertyData.value` (masked when password). */
|
|
40
|
+
value: string;
|
|
41
|
+
/** `required && isDefault` (host detection). */
|
|
42
|
+
missing: boolean;
|
|
43
|
+
/** `PropertyData.standardValues`. */
|
|
44
|
+
standardValues?: string[];
|
|
45
|
+
/** `PropertyData.isStandardValuesExclusive`. */
|
|
46
|
+
exclusive?: boolean;
|
|
47
|
+
}
|
|
48
|
+
export type CancelCallback = () => void | Promise<void>;
|
|
49
|
+
export type ConfirmCallback = () => void | Promise<void>;
|
|
50
|
+
export type PropertyChangeCallback = (name: string, value: string) => void | Promise<void>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare class GxIdeSelectTeamOrOrg {
|
|
2
|
+
#private;
|
|
3
|
+
el: HTMLGxIdeSelectTeamOrOrgElement;
|
|
4
|
+
/**
|
|
5
|
+
* Defines if the main slide is visible or not. Used for smooth transitions between slides.
|
|
6
|
+
*/
|
|
7
|
+
slideIsVisible: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Defines if the items model is ready to be rendered.
|
|
10
|
+
*/
|
|
11
|
+
itemsModelReady: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Callback executed when the user clicks the 'Cancel' button
|
|
14
|
+
*/
|
|
15
|
+
readonly cancelCallback: () => Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Callback executed when the user clicks the 'Confirm' button
|
|
18
|
+
*/
|
|
19
|
+
readonly confirmCallback: (itemId: string) => Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the picker is selecting a team or an organization.
|
|
22
|
+
* Drives the title, info message and combo label.
|
|
23
|
+
*/
|
|
24
|
+
readonly selectionType: SelectionType;
|
|
25
|
+
/**
|
|
26
|
+
* Array that contains the selectable items (teams or organizations).
|
|
27
|
+
*/
|
|
28
|
+
readonly items: SelectableItem[];
|
|
29
|
+
itemsChanged(newItems: SelectableItem[]): void;
|
|
30
|
+
componentWillLoad(): Promise<void>;
|
|
31
|
+
componentDidLoad(): void;
|
|
32
|
+
render(): any;
|
|
33
|
+
}
|
|
34
|
+
export type SelectableItem = {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
};
|
|
38
|
+
export type SelectionType = "team" | "organization";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ComboBoxItemModel } from "@genexus/chameleon-controls-library/dist/types/components/combo-box/types";
|
|
2
|
+
import { OrganizationData } from "./sign-in-organization";
|
|
3
|
+
export declare const mapOrganizationsToComboBoxItemModel: (organizations?: OrganizationData[]) => ComboBoxItemModel[] | undefined;
|