@genexus/genexus-ide-ui 1.0.30 → 1.0.32
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-current-user-info.cjs.entry.js +133 -0
- package/dist/cjs/gx-ide-current-user-info.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-select-user-team.cjs.entry.js +79 -0
- package/dist/cjs/gx-ide-select-user-team.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-sign-in-team.cjs.entry.js +123 -0
- package/dist/cjs/gx-ide-sign-in-team.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-sign-in.cjs.entry.js +62 -0
- package/dist/cjs/gx-ide-sign-in.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-splash.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-splash.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/current-user-info/current-user-info.css +55 -0
- package/dist/collection/components/current-user-info/current-user-info.js +280 -0
- package/dist/collection/components/current-user-info/current-user-info.js.map +1 -0
- package/dist/collection/components/current-user-info/gx-ide-assets/current-user-info/langs/current-user-info.lang.en.json +10 -0
- package/dist/collection/components/current-user-info/gx-ide-assets/current-user-info/langs/current-user-info.lang.ja.json +10 -0
- package/dist/collection/components/current-user-info/gx-ide-assets/current-user-info/langs/current-user-info.lang.zh.json +10 -0
- package/dist/collection/components/current-user-info/gx-ide-assets/current-user-info/shortcuts.json +15 -0
- package/dist/collection/components/current-user-info/helpers.js +10 -0
- package/dist/collection/components/current-user-info/helpers.js.map +1 -0
- package/dist/collection/components/select-user-team/gx-ide-assets/select-user-team/images/copyrights-illustration.png +0 -0
- package/dist/collection/components/select-user-team/gx-ide-assets/select-user-team/images/icon-next.svg +4 -0
- package/dist/collection/components/select-user-team/gx-ide-assets/select-user-team/langs/select-user-team.lang.en.json +10 -0
- package/dist/collection/components/select-user-team/gx-ide-assets/select-user-team/langs/select-user-team.lang.ja.json +10 -0
- package/dist/collection/components/select-user-team/gx-ide-assets/select-user-team/langs/select-user-team.lang.zh.json +10 -0
- package/dist/collection/components/select-user-team/helpers.js +9 -0
- package/dist/collection/components/select-user-team/helpers.js.map +1 -0
- package/dist/collection/components/select-user-team/select-user-team.css +62 -0
- package/dist/collection/components/select-user-team/select-user-team.js +118 -0
- package/dist/collection/components/select-user-team/select-user-team.js.map +1 -0
- package/dist/collection/components/sign-in/gx-ide-assets/sign-in/images/copyrights-illustration.png +0 -0
- package/dist/collection/components/sign-in/gx-ide-assets/sign-in/images/icon-next.svg +4 -0
- package/dist/collection/components/sign-in/gx-ide-assets/sign-in/langs/sign-in.lang.en.json +10 -0
- package/dist/collection/components/sign-in/gx-ide-assets/sign-in/langs/sign-in.lang.ja.json +10 -0
- package/dist/collection/components/sign-in/gx-ide-assets/sign-in/langs/sign-in.lang.zh.json +10 -0
- package/dist/collection/components/sign-in/sign-in.css +60 -0
- package/dist/collection/components/sign-in/sign-in.js +108 -0
- package/dist/collection/components/sign-in/sign-in.js.map +1 -0
- package/dist/collection/components/sign-in-team/gx-ide-assets/sign-in-team/images/copyrights-illustration.png +0 -0
- package/dist/collection/components/sign-in-team/gx-ide-assets/sign-in-team/images/icon-next.svg +4 -0
- package/dist/collection/components/sign-in-team/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.en.json +18 -0
- package/dist/collection/components/sign-in-team/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.ja.json +18 -0
- package/dist/collection/components/sign-in-team/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.zh.json +18 -0
- package/dist/collection/components/sign-in-team/helpers.js +10 -0
- package/dist/collection/components/sign-in-team/helpers.js.map +1 -0
- package/dist/collection/components/sign-in-team/sign-in-team.css +92 -0
- package/dist/collection/components/sign-in-team/sign-in-team.js +234 -0
- package/dist/collection/components/sign-in-team/sign-in-team.js.map +1 -0
- package/dist/collection/components/splash/splash.js +1 -1
- package/dist/collection/components/splash/splash.js.map +1 -1
- package/dist/collection/testing/locale.e2e.js +4 -0
- package/dist/collection/testing/locale.e2e.js.map +1 -1
- package/dist/components/gx-ide-current-user-info.d.ts +11 -0
- package/dist/components/gx-ide-current-user-info.js +156 -0
- package/dist/components/gx-ide-current-user-info.js.map +1 -0
- package/dist/components/gx-ide-select-user-team.d.ts +11 -0
- package/dist/components/gx-ide-select-user-team.js +96 -0
- package/dist/components/gx-ide-select-user-team.js.map +1 -0
- package/dist/components/gx-ide-sign-in-team.d.ts +11 -0
- package/dist/components/gx-ide-sign-in-team.js +147 -0
- package/dist/components/gx-ide-sign-in-team.js.map +1 -0
- package/dist/components/gx-ide-sign-in.d.ts +11 -0
- package/dist/components/gx-ide-sign-in.js +79 -0
- package/dist/components/gx-ide-sign-in.js.map +1 -0
- package/dist/components/gx-ide-splash.js +1 -1
- package/dist/components/gx-ide-splash.js.map +1 -1
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-current-user-info.entry.js +129 -0
- package/dist/esm/gx-ide-current-user-info.entry.js.map +1 -0
- package/dist/esm/gx-ide-select-user-team.entry.js +75 -0
- package/dist/esm/gx-ide-select-user-team.entry.js.map +1 -0
- package/dist/esm/gx-ide-sign-in-team.entry.js +119 -0
- package/dist/esm/gx-ide-sign-in-team.entry.js.map +1 -0
- package/dist/esm/gx-ide-sign-in.entry.js +58 -0
- package/dist/esm/gx-ide-sign-in.entry.js.map +1 -0
- package/dist/esm/gx-ide-splash.entry.js +1 -1
- package/dist/esm/gx-ide-splash.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/current-user-info/langs/current-user-info.lang.en.json +10 -0
- package/dist/genexus-ide-ui/gx-ide-assets/current-user-info/langs/current-user-info.lang.ja.json +10 -0
- package/dist/genexus-ide-ui/gx-ide-assets/current-user-info/langs/current-user-info.lang.zh.json +10 -0
- package/dist/genexus-ide-ui/gx-ide-assets/current-user-info/shortcuts.json +15 -0
- package/dist/genexus-ide-ui/gx-ide-assets/select-user-team/images/copyrights-illustration.png +0 -0
- package/dist/genexus-ide-ui/gx-ide-assets/select-user-team/images/icon-next.svg +4 -0
- package/dist/genexus-ide-ui/gx-ide-assets/select-user-team/langs/select-user-team.lang.en.json +10 -0
- package/dist/genexus-ide-ui/gx-ide-assets/select-user-team/langs/select-user-team.lang.ja.json +10 -0
- package/dist/genexus-ide-ui/gx-ide-assets/select-user-team/langs/select-user-team.lang.zh.json +10 -0
- package/dist/genexus-ide-ui/gx-ide-assets/sign-in/images/copyrights-illustration.png +0 -0
- package/dist/genexus-ide-ui/gx-ide-assets/sign-in/images/icon-next.svg +4 -0
- package/dist/genexus-ide-ui/gx-ide-assets/sign-in/langs/sign-in.lang.en.json +10 -0
- package/dist/genexus-ide-ui/gx-ide-assets/sign-in/langs/sign-in.lang.ja.json +10 -0
- package/dist/genexus-ide-ui/gx-ide-assets/sign-in/langs/sign-in.lang.zh.json +10 -0
- package/dist/genexus-ide-ui/gx-ide-assets/sign-in-team/images/copyrights-illustration.png +0 -0
- package/dist/genexus-ide-ui/gx-ide-assets/sign-in-team/images/icon-next.svg +4 -0
- package/dist/genexus-ide-ui/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.en.json +18 -0
- package/dist/genexus-ide-ui/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.ja.json +18 -0
- package/dist/genexus-ide-ui/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.zh.json +18 -0
- package/dist/genexus-ide-ui/p-90c8cb0d.entry.js +92 -0
- package/dist/genexus-ide-ui/p-90c8cb0d.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-b189e45d.entry.js +113 -0
- package/dist/genexus-ide-ui/p-b189e45d.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-edd6ebef.entry.js +149 -0
- package/dist/genexus-ide-ui/p-edd6ebef.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-3c3b276e.entry.js → p-f0efd16f.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-3c3b276e.entry.js.map → p-f0efd16f.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/p-fe063c9e.entry.js +162 -0
- package/dist/genexus-ide-ui/p-fe063c9e.entry.js.map +1 -0
- package/dist/types/components/current-user-info/current-user-info.d.ts +40 -0
- package/dist/types/components/current-user-info/helpers.d.ts +1 -0
- package/dist/types/components/select-user-team/helpers.d.ts +3 -0
- package/dist/types/components/select-user-team/select-user-team.d.ts +18 -0
- package/dist/types/components/sign-in/sign-in.d.ts +14 -0
- package/dist/types/components/sign-in-team/helpers.d.ts +3 -0
- package/dist/types/components/sign-in-team/sign-in-team.d.ts +42 -0
- package/dist/types/components.d.ts +186 -0
- package/package.json +3 -3
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m")
|
|
3
|
+
throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f)
|
|
5
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
6
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
7
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
8
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
9
|
+
};
|
|
10
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
11
|
+
if (kind === "a" && !f)
|
|
12
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
14
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
15
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
16
|
+
};
|
|
17
|
+
var _GxIdeNewEnvironment_componentLocale, _GxIdeNewEnvironment_initials, _GxIdeNewEnvironment_menuDropdownModel, _GxIdeNewEnvironment_userLoginButton, _GxIdeNewEnvironment_dropDownitemClickHandler;
|
|
18
|
+
/* STENCIL IMPORTS */
|
|
19
|
+
import { Host, h } from "@stencil/core";
|
|
20
|
+
import { getIconPath } from "@genexus/mercury";
|
|
21
|
+
import { Locale } from "../../common/locale";
|
|
22
|
+
import { getInitialsFromName } from "./helpers";
|
|
23
|
+
const CSS_BUNDLES = [
|
|
24
|
+
// TODO: review if "utils/form--full" is required.
|
|
25
|
+
"resets/box-sizing",
|
|
26
|
+
"components/tooltip",
|
|
27
|
+
"components/toggle",
|
|
28
|
+
"components/icon",
|
|
29
|
+
"components/dropdown",
|
|
30
|
+
"utils/layout",
|
|
31
|
+
"utils/typography",
|
|
32
|
+
"utils/spacing",
|
|
33
|
+
"chameleon/scrollbar"
|
|
34
|
+
];
|
|
35
|
+
const CHEVRON_DOWN_ICON = getIconPath({
|
|
36
|
+
category: "navigation",
|
|
37
|
+
name: "chevron-down",
|
|
38
|
+
colorType: "neutral"
|
|
39
|
+
});
|
|
40
|
+
const MY_ACCOUNT_ID = "my-account";
|
|
41
|
+
const CHANGE_TEAM_ID = "change-team";
|
|
42
|
+
const LOGOUT_ID = "log-out";
|
|
43
|
+
const LANGUAGE_ID = "language";
|
|
44
|
+
export class GxIdeNewEnvironment {
|
|
45
|
+
constructor() {
|
|
46
|
+
_GxIdeNewEnvironment_componentLocale.set(this, void 0);
|
|
47
|
+
_GxIdeNewEnvironment_initials.set(this, "");
|
|
48
|
+
// #mode: Mode;
|
|
49
|
+
_GxIdeNewEnvironment_menuDropdownModel.set(this, void 0);
|
|
50
|
+
_GxIdeNewEnvironment_userLoginButton.set(this, void 0);
|
|
51
|
+
// #handleModeSwitch = () => {
|
|
52
|
+
// this.#mode = this.#mode === "dark" ? "light" : "dark";
|
|
53
|
+
// if (this.changeModeCallback) {
|
|
54
|
+
// this.changeModeCallback(this.#mode);
|
|
55
|
+
// }
|
|
56
|
+
// };
|
|
57
|
+
_GxIdeNewEnvironment_dropDownitemClickHandler.set(this, (_event, _target, itemId) => {
|
|
58
|
+
if (itemId === MY_ACCOUNT_ID) {
|
|
59
|
+
this.myAccountCallback();
|
|
60
|
+
}
|
|
61
|
+
else if (itemId === CHANGE_TEAM_ID) {
|
|
62
|
+
this.changeTeamCallback();
|
|
63
|
+
}
|
|
64
|
+
else if (itemId === LOGOUT_ID) {
|
|
65
|
+
this.changeLanguageCallback();
|
|
66
|
+
}
|
|
67
|
+
else if (itemId === LANGUAGE_ID) {
|
|
68
|
+
this.signOutCallback();
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
this.showMenu = false;
|
|
72
|
+
this.userInfo = undefined;
|
|
73
|
+
this.myAccountCallback = undefined;
|
|
74
|
+
this.changeTeamCallback = undefined;
|
|
75
|
+
this.changeLanguageCallback = undefined;
|
|
76
|
+
this.changeModeCallback = undefined;
|
|
77
|
+
this.signOutCallback = undefined;
|
|
78
|
+
this.showTermsCallback = undefined;
|
|
79
|
+
}
|
|
80
|
+
async componentWillLoad() {
|
|
81
|
+
__classPrivateFieldSet(this, _GxIdeNewEnvironment_componentLocale, await Locale.getComponentStrings(this.el), "f");
|
|
82
|
+
__classPrivateFieldSet(this, _GxIdeNewEnvironment_initials, getInitialsFromName(this.userInfo.name), "f");
|
|
83
|
+
__classPrivateFieldSet(this, _GxIdeNewEnvironment_menuDropdownModel, [
|
|
84
|
+
{
|
|
85
|
+
id: MY_ACCOUNT_ID,
|
|
86
|
+
caption: __classPrivateFieldGet(this, _GxIdeNewEnvironment_componentLocale, "f").myAccountLabel,
|
|
87
|
+
showSeparator: false
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: CHANGE_TEAM_ID,
|
|
91
|
+
caption: __classPrivateFieldGet(this, _GxIdeNewEnvironment_componentLocale, "f").changeTeamLabel,
|
|
92
|
+
showSeparator: false
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: LOGOUT_ID,
|
|
96
|
+
caption: __classPrivateFieldGet(this, _GxIdeNewEnvironment_componentLocale, "f").logOutLabel,
|
|
97
|
+
showSeparator: true
|
|
98
|
+
}
|
|
99
|
+
// {
|
|
100
|
+
// id: LANGUAGE_ID,
|
|
101
|
+
// caption: this.#componentLocale.languageLabel,
|
|
102
|
+
// showSeparator: true
|
|
103
|
+
// }
|
|
104
|
+
], "f");
|
|
105
|
+
}
|
|
106
|
+
render() {
|
|
107
|
+
return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("ch-dropdown-render", { class: "dropdown", model: __classPrivateFieldGet(this, _GxIdeNewEnvironment_menuDropdownModel, "f"), position: "InsideEnd_OutsideEnd", itemClickCallback: __classPrivateFieldGet(this, _GxIdeNewEnvironment_dropDownitemClickHandler, "f") }, h("button", { class: "user-login__button", ref: el => (__classPrivateFieldSet(this, _GxIdeNewEnvironment_userLoginButton, el, "f")), slot: "action" }, h("div", { class: "user-login__details" }, h("span", { class: "user-login__name" }, this.userInfo.name), h("span", { class: "user-login__organization" }, this.userInfo.team)), h("div", { class: "user-login__avatar" }, __classPrivateFieldGet(this, _GxIdeNewEnvironment_initials, "f")), h("ch-image", { src: CHEVRON_DOWN_ICON, class: "icon-md", containerRef: __classPrivateFieldGet(this, _GxIdeNewEnvironment_userLoginButton, "f") })), h("div", { class: "user-login__footer footer-slot", slot: "footer" }, h("p", { class: "text-body-regular-s privacy-policy", onClick: this.showTermsCallback }, __classPrivateFieldGet(this, _GxIdeNewEnvironment_componentLocale, "f").privacyAndTerms)))));
|
|
108
|
+
}
|
|
109
|
+
static get is() { return "gx-ide-current-user-info"; }
|
|
110
|
+
static get encapsulation() { return "shadow"; }
|
|
111
|
+
static get originalStyleUrls() {
|
|
112
|
+
return {
|
|
113
|
+
"$": ["current-user-info.scss"]
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
static get styleUrls() {
|
|
117
|
+
return {
|
|
118
|
+
"$": ["current-user-info.css"]
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
static get assetsDirs() { return ["gx-ide-assets/current-user-info"]; }
|
|
122
|
+
static get properties() {
|
|
123
|
+
return {
|
|
124
|
+
"userInfo": {
|
|
125
|
+
"type": "unknown",
|
|
126
|
+
"mutable": false,
|
|
127
|
+
"complexType": {
|
|
128
|
+
"original": "UserInfo",
|
|
129
|
+
"resolved": "{ name: string; team: string; }",
|
|
130
|
+
"references": {
|
|
131
|
+
"UserInfo": {
|
|
132
|
+
"location": "local",
|
|
133
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/current-user-info/current-user-info.tsx",
|
|
134
|
+
"id": "src/components/current-user-info/current-user-info.tsx::UserInfo"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": false,
|
|
139
|
+
"optional": false,
|
|
140
|
+
"docs": {
|
|
141
|
+
"tags": [],
|
|
142
|
+
"text": "User data"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"myAccountCallback": {
|
|
146
|
+
"type": "unknown",
|
|
147
|
+
"mutable": false,
|
|
148
|
+
"complexType": {
|
|
149
|
+
"original": "() => Promise<void>",
|
|
150
|
+
"resolved": "() => Promise<void>",
|
|
151
|
+
"references": {
|
|
152
|
+
"Promise": {
|
|
153
|
+
"location": "global",
|
|
154
|
+
"id": "global::Promise"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"required": true,
|
|
159
|
+
"optional": false,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": "Callback executed when the user click \"My Account\" link"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"changeTeamCallback": {
|
|
166
|
+
"type": "unknown",
|
|
167
|
+
"mutable": false,
|
|
168
|
+
"complexType": {
|
|
169
|
+
"original": "() => Promise<void>",
|
|
170
|
+
"resolved": "() => Promise<void>",
|
|
171
|
+
"references": {
|
|
172
|
+
"Promise": {
|
|
173
|
+
"location": "global",
|
|
174
|
+
"id": "global::Promise"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"required": true,
|
|
179
|
+
"optional": false,
|
|
180
|
+
"docs": {
|
|
181
|
+
"tags": [],
|
|
182
|
+
"text": "Callback executed when the user click \"change team\" link"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"changeLanguageCallback": {
|
|
186
|
+
"type": "unknown",
|
|
187
|
+
"mutable": false,
|
|
188
|
+
"complexType": {
|
|
189
|
+
"original": "() => Promise<void>",
|
|
190
|
+
"resolved": "() => Promise<void>",
|
|
191
|
+
"references": {
|
|
192
|
+
"Promise": {
|
|
193
|
+
"location": "global",
|
|
194
|
+
"id": "global::Promise"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"required": true,
|
|
199
|
+
"optional": false,
|
|
200
|
+
"docs": {
|
|
201
|
+
"tags": [],
|
|
202
|
+
"text": "Callback executed when the user click \"Language\" link"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"changeModeCallback": {
|
|
206
|
+
"type": "unknown",
|
|
207
|
+
"mutable": false,
|
|
208
|
+
"complexType": {
|
|
209
|
+
"original": "(mode: Mode) => Promise<void>",
|
|
210
|
+
"resolved": "(mode: Mode) => Promise<void>",
|
|
211
|
+
"references": {
|
|
212
|
+
"Mode": {
|
|
213
|
+
"location": "local",
|
|
214
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/current-user-info/current-user-info.tsx",
|
|
215
|
+
"id": "src/components/current-user-info/current-user-info.tsx::Mode"
|
|
216
|
+
},
|
|
217
|
+
"Promise": {
|
|
218
|
+
"location": "global",
|
|
219
|
+
"id": "global::Promise"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"required": true,
|
|
224
|
+
"optional": false,
|
|
225
|
+
"docs": {
|
|
226
|
+
"tags": [],
|
|
227
|
+
"text": "Callback executed when the user switch the \"Mode\" status"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"signOutCallback": {
|
|
231
|
+
"type": "unknown",
|
|
232
|
+
"mutable": false,
|
|
233
|
+
"complexType": {
|
|
234
|
+
"original": "() => Promise<void>",
|
|
235
|
+
"resolved": "() => Promise<void>",
|
|
236
|
+
"references": {
|
|
237
|
+
"Promise": {
|
|
238
|
+
"location": "global",
|
|
239
|
+
"id": "global::Promise"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"required": true,
|
|
244
|
+
"optional": false,
|
|
245
|
+
"docs": {
|
|
246
|
+
"tags": [],
|
|
247
|
+
"text": "Callback executed when the user click \"Sign Out\" link"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"showTermsCallback": {
|
|
251
|
+
"type": "unknown",
|
|
252
|
+
"mutable": false,
|
|
253
|
+
"complexType": {
|
|
254
|
+
"original": "() => Promise<void>",
|
|
255
|
+
"resolved": "() => Promise<void>",
|
|
256
|
+
"references": {
|
|
257
|
+
"Promise": {
|
|
258
|
+
"location": "global",
|
|
259
|
+
"id": "global::Promise"
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"required": true,
|
|
264
|
+
"optional": false,
|
|
265
|
+
"docs": {
|
|
266
|
+
"tags": [],
|
|
267
|
+
"text": "Callback executed when the user click \"Privacy Policy & Terms of use\" link"
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
static get states() {
|
|
273
|
+
return {
|
|
274
|
+
"showMenu": {}
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
static get elementRef() { return "el"; }
|
|
278
|
+
}
|
|
279
|
+
_GxIdeNewEnvironment_componentLocale = new WeakMap(), _GxIdeNewEnvironment_initials = new WeakMap(), _GxIdeNewEnvironment_menuDropdownModel = new WeakMap(), _GxIdeNewEnvironment_userLoginButton = new WeakMap(), _GxIdeNewEnvironment_dropDownitemClickHandler = new WeakMap();
|
|
280
|
+
//# sourceMappingURL=current-user-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"current-user-info.js","sourceRoot":"","sources":["../../../src/components/current-user-info/current-user-info.tsx"],"names":[],"mappings":"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","sourcesContent":["/* STENCIL IMPORTS */\nimport { Component, Element, Host, Prop, State, h } from \"@stencil/core\";\n\nimport { getIconPath, MercuryBundles } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\nimport { getInitialsFromName } from \"./helpers\";\nimport { DropdownModel } from \"@genexus/chameleon-controls-library\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n // TODO: review if \"utils/form--full\" is required.\n \"resets/box-sizing\",\n \"components/tooltip\",\n \"components/toggle\",\n \"components/icon\",\n \"components/dropdown\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst CHEVRON_DOWN_ICON = getIconPath({\n category: \"navigation\",\n name: \"chevron-down\",\n colorType: \"neutral\"\n});\n\nconst MY_ACCOUNT_ID = \"my-account\";\nconst CHANGE_TEAM_ID = \"change-team\";\nconst LOGOUT_ID = \"log-out\";\nconst LANGUAGE_ID = \"language\";\n\n@Component({\n tag: \"gx-ide-current-user-info\",\n styleUrl: \"current-user-info.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/current-user-info\"]\n})\nexport class GxIdeNewEnvironment {\n #componentLocale: any;\n #initials: string = \"\";\n // #mode: Mode;\n #menuDropdownModel: DropdownModel;\n\n @Element() el: HTMLGxIdeCurrentUserInfoElement;\n #userLoginButton: HTMLButtonElement;\n\n @State() showMenu: boolean = false;\n\n /**\n * User data\n */\n @Prop() readonly userInfo: UserInfo;\n\n /**\n * Callback executed when the user click \"My Account\" link\n */\n @Prop() readonly myAccountCallback!: () => Promise<void>;\n\n /**\n * Callback executed when the user click \"change team\" link\n */\n @Prop() readonly changeTeamCallback!: () => Promise<void>;\n\n /**\n * Callback executed when the user click \"Language\" link\n */\n @Prop() readonly changeLanguageCallback!: () => Promise<void>;\n\n /**\n * Callback executed when the user switch the \"Mode\" status\n */\n @Prop() readonly changeModeCallback!: (mode: Mode) => Promise<void>;\n\n /**\n * Callback executed when the user click \"Sign Out\" link\n */\n @Prop() readonly signOutCallback!: () => Promise<void>;\n\n /**\n * Callback executed when the user click \"Privacy Policy & Terms of use\" link\n */\n @Prop() readonly showTermsCallback!: () => Promise<void>;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.#initials = getInitialsFromName(this.userInfo.name);\n this.#menuDropdownModel = [\n {\n id: MY_ACCOUNT_ID,\n caption: this.#componentLocale.myAccountLabel,\n showSeparator: false\n },\n {\n id: CHANGE_TEAM_ID,\n caption: this.#componentLocale.changeTeamLabel,\n showSeparator: false\n },\n {\n id: LOGOUT_ID,\n caption: this.#componentLocale.logOutLabel,\n showSeparator: true\n }\n // {\n // id: LANGUAGE_ID,\n // caption: this.#componentLocale.languageLabel,\n // showSeparator: true\n // }\n ];\n }\n\n // #handleModeSwitch = () => {\n // this.#mode = this.#mode === \"dark\" ? \"light\" : \"dark\";\n // if (this.changeModeCallback) {\n // this.changeModeCallback(this.#mode);\n // }\n // };\n\n #dropDownitemClickHandler = (\n _event: UIEvent,\n _target: string,\n itemId: string\n ): void => {\n if (itemId === MY_ACCOUNT_ID) {\n this.myAccountCallback();\n } else if (itemId === CHANGE_TEAM_ID) {\n this.changeTeamCallback();\n } else if (itemId === LOGOUT_ID) {\n this.changeLanguageCallback();\n } else if (itemId === LANGUAGE_ID) {\n this.signOutCallback();\n }\n };\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-dropdown-render\n class=\"dropdown\"\n model={this.#menuDropdownModel}\n position=\"InsideEnd_OutsideEnd\"\n itemClickCallback={this.#dropDownitemClickHandler}\n >\n <button\n class=\"user-login__button\"\n ref={el => (this.#userLoginButton = el as HTMLButtonElement)}\n slot=\"action\"\n >\n <div class=\"user-login__details\">\n <span class=\"user-login__name\">{this.userInfo.name}</span>\n <span class=\"user-login__organization\">{this.userInfo.team}</span>\n </div>\n <div class=\"user-login__avatar\">{this.#initials}</div>\n <ch-image\n src={CHEVRON_DOWN_ICON}\n class=\"icon-md\"\n containerRef={this.#userLoginButton}\n ></ch-image>\n </button>\n <div class=\"user-login__footer footer-slot\" slot=\"footer\">\n <p\n class=\"text-body-regular-s privacy-policy\"\n onClick={this.showTermsCallback}\n >\n {this.#componentLocale.privacyAndTerms}\n </p>\n </div>\n </ch-dropdown-render>\n </Host>\n );\n }\n}\n\nexport type UserInfo = {\n name: string;\n team: string;\n};\n\nexport type Mode = \"dark\" | \"light\";\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"myAccountLabel": "My Account",
|
|
3
|
+
"changeTeamLabel": "Change Team",
|
|
4
|
+
"languageLabel": "Language",
|
|
5
|
+
"modeLabel": "Mode",
|
|
6
|
+
"logOutLabel": "Log Out",
|
|
7
|
+
"privacyAndTerms": "Privacy Policy & Terms of use",
|
|
8
|
+
"labelModeDark": "Dark",
|
|
9
|
+
"labelModeLight": "Light"
|
|
10
|
+
}
|
package/dist/collection/components/current-user-info/gx-ide-assets/current-user-info/shortcuts.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"selector": "[part~='button-create']",
|
|
4
|
+
"keyShortcuts": "Enter",
|
|
5
|
+
"action": "click",
|
|
6
|
+
"conditions": {
|
|
7
|
+
"focusExclude": " [part~='button-cancel'], [part~='language'], [part~='data-store']"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"selector": "[part~='button-cancel']",
|
|
12
|
+
"keyShortcuts": "Escape",
|
|
13
|
+
"action": "click"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const getInitialsFromName = (name) => {
|
|
2
|
+
const nameData = name.split(" ");
|
|
3
|
+
if (nameData.length === 1) {
|
|
4
|
+
return nameData[0][0].toUpperCase();
|
|
5
|
+
}
|
|
6
|
+
else {
|
|
7
|
+
return `${nameData[0][0].toUpperCase()}${nameData[1][0].toUpperCase()}`;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/components/current-user-info/helpers.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAU,EAAE;IAC1D,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QACzB,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;KACrC;SAAM;QACL,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;KACzE;AACH,CAAC,CAAC","sourcesContent":["export const getInitialsFromName = (name: string): string => {\n const nameData = name.split(\" \");\n if (nameData.length === 1) {\n return nameData[0][0].toUpperCase();\n } else {\n return `${nameData[0][0].toUpperCase()}${nameData[1][0].toUpperCase()}`;\n }\n};\n"]}
|
|
Binary file
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="30" height="31" viewBox="0 0 30 31" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M0 3.7C0 2.5799 0 2.01984 0.217987 1.59202C0.409734 1.21569 0.715695 0.909734 1.09202 0.717987C1.51984 0.5 2.07989 0.5 3.2 0.5H26.8C27.9201 0.5 28.4802 0.5 28.908 0.717987C29.2843 0.909734 29.5903 1.21569 29.782 1.59202C30 2.01984 30 2.57989 30 3.7V27.3C30 28.4201 30 28.9802 29.782 29.408C29.5903 29.7843 29.2843 30.0903 28.908 30.282C28.4802 30.5 27.9201 30.5 26.8 30.5H3.2C2.0799 30.5 1.51984 30.5 1.09202 30.282C0.715695 30.0903 0.409734 29.7843 0.217987 29.408C0 28.9802 0 28.4201 0 27.3V3.7Z" fill="#5BA7FF"/>
|
|
3
|
+
<path d="M14.8361 26.63L7.73975 26.6245L15.8043 15.5027L7.73975 4.37271H14.8361L22.2543 15.5027L14.8361 26.6327V26.63Z" fill="black"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"teams": "Teams",
|
|
3
|
+
"illustrationAriaLabel": "GeneXus Next geometric shapes illustration",
|
|
4
|
+
"illustrationFigureAriaLabel": "Geometric shape illustration",
|
|
5
|
+
"illustrationAlternativeText": "GeneXus Next isologotype",
|
|
6
|
+
"title": "You have successfully logged in",
|
|
7
|
+
"infoMessage": "Before proceeding please select your team from the list below",
|
|
8
|
+
"teamSelectorLabel": "Team",
|
|
9
|
+
"continueButtonCaption": "Continue"
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/components/select-user-team/helpers.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,KAAiB,EACI,EAAE;IACvB,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QACtB,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,EAAE;YACd,OAAO,EAAE,IAAI,CAAC,IAAI;SACnB,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["import { ComboBoxItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\nimport { TeamData } from \"./select-user-team\";\n\nexport const mapTeamsToComboBoxItemModel = (\n teams: TeamData[]\n): ComboBoxItemModel[] => {\n return teams.map(team => {\n return {\n value: team.id,\n caption: team.name\n };\n });\n};\n"]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: grid;
|
|
3
|
+
block-size: 100%;
|
|
4
|
+
inline-size: 100%;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
padding: var(--mer-spacing--xl);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.slide {
|
|
11
|
+
display: grid;
|
|
12
|
+
max-inline-size: 1100px;
|
|
13
|
+
grid-template-columns: 1fr 550px;
|
|
14
|
+
background-color: var(--mer-surface__elevation--01);
|
|
15
|
+
border-radius: var(--mer-spacing--md);
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
transition: var(--slide-fade-duration) opacity;
|
|
18
|
+
}
|
|
19
|
+
.slide__illustration {
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
max-block-size: 700px;
|
|
22
|
+
}
|
|
23
|
+
.slide__select-team {
|
|
24
|
+
display: grid;
|
|
25
|
+
block-size: 100%;
|
|
26
|
+
inline-size: 100%;
|
|
27
|
+
padding: var(--mer-spacing--3xl);
|
|
28
|
+
}
|
|
29
|
+
.slide__select-team-container {
|
|
30
|
+
display: grid;
|
|
31
|
+
gap: var(--mer-spacing--lg);
|
|
32
|
+
max-inline-size: 480px;
|
|
33
|
+
place-self: center;
|
|
34
|
+
}
|
|
35
|
+
.slide__select-team-header {
|
|
36
|
+
display: grid;
|
|
37
|
+
gap: var(--mer-spacing--lg);
|
|
38
|
+
}
|
|
39
|
+
.slide__select-team-title {
|
|
40
|
+
font-size: var(--mer-font__size--xl);
|
|
41
|
+
color: var(--mer-text__on-surface);
|
|
42
|
+
letter-spacing: 0.02em;
|
|
43
|
+
font-weight: var(--mer-font__weight--semi-bold);
|
|
44
|
+
}
|
|
45
|
+
.slide__select-team-description {
|
|
46
|
+
display: grid;
|
|
47
|
+
color: var(--mer-text__complementary);
|
|
48
|
+
gap: var(--mer-spacing--md);
|
|
49
|
+
font-size: var(--mer-font__size--sm);
|
|
50
|
+
font-weight: var(--mer-font__weight--light);
|
|
51
|
+
line-height: var(--mer-line-height--spaced);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.info-message {
|
|
55
|
+
font-weight: bold;
|
|
56
|
+
color: var(--mer-text__on-surface);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.continue-button {
|
|
60
|
+
padding-inline-start: var(--mer-spacing--3xl) !important;
|
|
61
|
+
padding-inline-end: var(--mer-spacing--3xl) !important;
|
|
62
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f)
|
|
3
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
5
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
6
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
9
|
+
if (kind === "m")
|
|
10
|
+
throw new TypeError("Private method is not writable");
|
|
11
|
+
if (kind === "a" && !f)
|
|
12
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
14
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
16
|
+
};
|
|
17
|
+
var _GxIdeUiSplash_componentLocale, _GxIdeUiSplash_userTeamsModel, _GxIdeUiSplash_chSelectTeamEl, _GxIdeUiSplash_continueHandle;
|
|
18
|
+
// Stencil
|
|
19
|
+
import { Host, h, getAssetPath } from "@stencil/core";
|
|
20
|
+
// Custom Imports
|
|
21
|
+
import { Locale } from "../../common/locale";
|
|
22
|
+
import { mapTeamsToComboBoxItemModel } from "./helpers";
|
|
23
|
+
const COPYRIGHTS_ILLUSTRATION = getAssetPath(`./gx-ide-assets/welcome-page/images/copyrights-illustration.png`);
|
|
24
|
+
const ICON_NEXT = getAssetPath(`./gx-ide-assets/welcome-page/images/icon-next.svg`);
|
|
25
|
+
const CSS_BUNDLES = [
|
|
26
|
+
"resets/box-sizing",
|
|
27
|
+
"utils/typography",
|
|
28
|
+
"components/combo-box",
|
|
29
|
+
"components/button",
|
|
30
|
+
"utils/form"
|
|
31
|
+
];
|
|
32
|
+
export class GxIdeUiSplash {
|
|
33
|
+
constructor() {
|
|
34
|
+
/**
|
|
35
|
+
* The component hard-coded strings translations.
|
|
36
|
+
*/
|
|
37
|
+
// eslint-disable-next-line @stencil-community/own-props-must-be-private
|
|
38
|
+
_GxIdeUiSplash_componentLocale.set(this, void 0);
|
|
39
|
+
_GxIdeUiSplash_userTeamsModel.set(this, []);
|
|
40
|
+
_GxIdeUiSplash_chSelectTeamEl.set(this, void 0);
|
|
41
|
+
_GxIdeUiSplash_continueHandle.set(this, async () => {
|
|
42
|
+
await this.continueCallback(__classPrivateFieldGet(this, _GxIdeUiSplash_chSelectTeamEl, "f").value);
|
|
43
|
+
});
|
|
44
|
+
this.teams = undefined;
|
|
45
|
+
this.continueCallback = undefined;
|
|
46
|
+
}
|
|
47
|
+
async componentWillLoad() {
|
|
48
|
+
__classPrivateFieldSet(this, _GxIdeUiSplash_componentLocale, await Locale.getComponentStrings(this.el), "f");
|
|
49
|
+
__classPrivateFieldSet(this, _GxIdeUiSplash_userTeamsModel, mapTeamsToComboBoxItemModel(this.teams), "f");
|
|
50
|
+
}
|
|
51
|
+
render() {
|
|
52
|
+
return (h(Host, null, h("ch-theme", { model: CSS_BUNDLES }), h("section", { class: "slide" }, h("div", { class: "slide__illustration", role: "img", "aria-label": __classPrivateFieldGet(this, _GxIdeUiSplash_componentLocale, "f").illustrationAriaLabel }, h("img", {
|
|
53
|
+
// base image (acts like a background)
|
|
54
|
+
src: COPYRIGHTS_ILLUSTRATION, class: "slide__illustration", alt: __classPrivateFieldGet(this, _GxIdeUiSplash_componentLocale, "f").illustrationFigureAriaLabel
|
|
55
|
+
})), h("section", { class: "slide__select-team" }, h("div", { class: "slide__select-team-container" }, h("header", { class: "slide__select-team-header" }, h("img", { src: ICON_NEXT, alt: __classPrivateFieldGet(this, _GxIdeUiSplash_componentLocale, "f").illustrationAlternativeText }), h("h2", { class: "slide__select-team-title" }, __classPrivateFieldGet(this, _GxIdeUiSplash_componentLocale, "f").title)), h("div", { class: "slide__select-team-description" }, h("p", null, h("span", { class: "info-message" }, __classPrivateFieldGet(this, _GxIdeUiSplash_componentLocale, "f").infoMessage))), h("div", { class: "field-group" }, h("div", { class: "field field-block" }, h("label", { htmlFor: "teams" }, __classPrivateFieldGet(this, _GxIdeUiSplash_componentLocale, "f").teams), h("ch-combo-box-render", { id: "teams", accessibleName: "Teams", class: "combo-box", model: __classPrivateFieldGet(this, _GxIdeUiSplash_userTeamsModel, "f"), value: __classPrivateFieldGet(this, _GxIdeUiSplash_userTeamsModel, "f")[0].value, ref: (el) => (__classPrivateFieldSet(this, _GxIdeUiSplash_chSelectTeamEl, el, "f")) }))), h("div", null, h("button", { class: "button-primary continue-button", onClick: __classPrivateFieldGet(this, _GxIdeUiSplash_continueHandle, "f") }, __classPrivateFieldGet(this, _GxIdeUiSplash_componentLocale, "f").continueButtonCaption)))))));
|
|
56
|
+
}
|
|
57
|
+
static get is() { return "gx-ide-select-user-team"; }
|
|
58
|
+
static get encapsulation() { return "shadow"; }
|
|
59
|
+
static get originalStyleUrls() {
|
|
60
|
+
return {
|
|
61
|
+
"$": ["select-user-team.scss"]
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
static get styleUrls() {
|
|
65
|
+
return {
|
|
66
|
+
"$": ["select-user-team.css"]
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
static get assetsDirs() { return ["gx-ide-assets/select-user-team"]; }
|
|
70
|
+
static get properties() {
|
|
71
|
+
return {
|
|
72
|
+
"teams": {
|
|
73
|
+
"type": "unknown",
|
|
74
|
+
"mutable": false,
|
|
75
|
+
"complexType": {
|
|
76
|
+
"original": "TeamData[]",
|
|
77
|
+
"resolved": "TeamData[]",
|
|
78
|
+
"references": {
|
|
79
|
+
"TeamData": {
|
|
80
|
+
"location": "local",
|
|
81
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/select-user-team/select-user-team.tsx",
|
|
82
|
+
"id": "src/components/select-user-team/select-user-team.tsx::TeamData"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"required": true,
|
|
87
|
+
"optional": false,
|
|
88
|
+
"docs": {
|
|
89
|
+
"tags": [],
|
|
90
|
+
"text": "Array that contain the user's teams"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"continueCallback": {
|
|
94
|
+
"type": "unknown",
|
|
95
|
+
"mutable": false,
|
|
96
|
+
"complexType": {
|
|
97
|
+
"original": "(teamId: string) => Promise<void>",
|
|
98
|
+
"resolved": "(teamId: string) => Promise<void>",
|
|
99
|
+
"references": {
|
|
100
|
+
"Promise": {
|
|
101
|
+
"location": "global",
|
|
102
|
+
"id": "global::Promise"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"required": true,
|
|
107
|
+
"optional": false,
|
|
108
|
+
"docs": {
|
|
109
|
+
"tags": [],
|
|
110
|
+
"text": "Callback executed when the user click the 'continue' button"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
static get elementRef() { return "el"; }
|
|
116
|
+
}
|
|
117
|
+
_GxIdeUiSplash_componentLocale = new WeakMap(), _GxIdeUiSplash_userTeamsModel = new WeakMap(), _GxIdeUiSplash_chSelectTeamEl = new WeakMap(), _GxIdeUiSplash_continueHandle = new WeakMap();
|
|
118
|
+
//# sourceMappingURL=select-user-team.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-user-team.js","sourceRoot":"","sources":["../../../src/components/select-user-team/select-user-team.tsx"],"names":[],"mappings":"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","sourcesContent":["// Stencil\nimport { Component, Host, h, Prop, Element, getAssetPath } from \"@stencil/core\";\n// Other Libraries\nimport { MercuryBundles } from \"@genexus/mercury\";\n// Custom Imports\nimport { Locale } from \"../../common/locale\";\nimport { ComboBoxItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\nimport { mapTeamsToComboBoxItemModel } 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);\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/typography\",\n \"components/combo-box\",\n \"components/button\",\n \"utils/form\"\n];\n\n@Component({\n tag: \"gx-ide-select-user-team\",\n styleUrl: \"select-user-team.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/select-user-team\"]\n})\nexport class GxIdeUiSplash {\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 #userTeamsModel: ComboBoxItemModel[] = [];\n #chSelectTeamEl: HTMLChComboBoxRenderElement;\n\n /**\n * Array that contain the user's teams\n */\n @Prop() readonly teams!: TeamData[];\n\n /**\n * Callback executed when the user click the 'continue' button\n */\n @Prop() readonly continueCallback!: (teamId: string) => Promise<void>;\n\n @Element() el: HTMLGxIdeSelectUserTeamElement;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.#userTeamsModel = mapTeamsToComboBoxItemModel(this.teams);\n }\n\n #continueHandle = async () => {\n await this.continueCallback(this.#chSelectTeamEl.value);\n };\n\n render() {\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <section class=\"slide\">\n <div\n class=\"slide__illustration\"\n role=\"img\"\n aria-label={this.#componentLocale.illustrationAriaLabel}\n >\n <img\n // base image (acts like a background)\n src={COPYRIGHTS_ILLUSTRATION}\n class=\"slide__illustration\"\n alt={this.#componentLocale.illustrationFigureAriaLabel}\n />\n </div>\n\n <section class=\"slide__select-team\">\n <div class=\"slide__select-team-container\">\n <header class=\"slide__select-team-header\">\n <img\n src={ICON_NEXT}\n alt={this.#componentLocale.illustrationAlternativeText}\n />\n <h2 class=\"slide__select-team-title\">\n {this.#componentLocale.title}\n </h2>\n </header>\n\n <div class=\"slide__select-team-description\">\n <p>\n <span class=\"info-message\">\n {this.#componentLocale.infoMessage}\n </span>\n </p>\n </div>\n\n <div class=\"field-group\">\n <div class=\"field field-block\">\n <label htmlFor=\"teams\">{this.#componentLocale.teams}</label>\n <ch-combo-box-render\n id=\"teams\"\n accessibleName=\"Teams\"\n class=\"combo-box\"\n model={this.#userTeamsModel}\n value={this.#userTeamsModel[0].value}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#chSelectTeamEl = el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n </div>\n </div>\n\n <div>\n <button\n class=\"button-primary continue-button\"\n onClick={this.#continueHandle}\n >\n {this.#componentLocale.continueButtonCaption}\n </button>\n </div>\n </div>\n </section>\n </section>\n </Host>\n );\n }\n}\n\nexport type TeamData = {\n id: string;\n name: string;\n};\n"]}
|
package/dist/collection/components/sign-in/gx-ide-assets/sign-in/images/copyrights-illustration.png
ADDED
|
Binary file
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="30" height="31" viewBox="0 0 30 31" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M0 3.7C0 2.5799 0 2.01984 0.217987 1.59202C0.409734 1.21569 0.715695 0.909734 1.09202 0.717987C1.51984 0.5 2.07989 0.5 3.2 0.5H26.8C27.9201 0.5 28.4802 0.5 28.908 0.717987C29.2843 0.909734 29.5903 1.21569 29.782 1.59202C30 2.01984 30 2.57989 30 3.7V27.3C30 28.4201 30 28.9802 29.782 29.408C29.5903 29.7843 29.2843 30.0903 28.908 30.282C28.4802 30.5 27.9201 30.5 26.8 30.5H3.2C2.0799 30.5 1.51984 30.5 1.09202 30.282C0.715695 30.0903 0.409734 29.7843 0.217987 29.408C0 28.9802 0 28.4201 0 27.3V3.7Z" fill="#5BA7FF"/>
|
|
3
|
+
<path d="M14.8361 26.63L7.73975 26.6245L15.8043 15.5027L7.73975 4.37271H14.8361L22.2543 15.5027L14.8361 26.6327V26.63Z" fill="black"/>
|
|
4
|
+
</svg>
|