@genexus/genexus-ide-ui 1.0.44 → 1.0.46
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 +10 -11
- package/dist/cjs/gx-ide-current-user-info.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-entity-selector.cjs.entry.js +3 -1
- package/dist/cjs/gx-ide-entity-selector.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-loader.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-loader.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-select-user-team.cjs.entry.js +38 -11
- package/dist/cjs/gx-ide-select-user-team.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-sign-in-team.cjs.entry.js +75 -13
- package/dist/cjs/gx-ide-sign-in-team.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-ww-attributes.cjs.entry.js +244 -0
- package/dist/cjs/gx-ide-ww-attributes.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/_helpers/entity-selector/entity-selector.js +4 -2
- package/dist/collection/components/_helpers/entity-selector/entity-selector.js.map +1 -1
- package/dist/collection/components/_helpers/ide-loader/ide-loader.css +1 -1
- package/dist/collection/components/current-user-info/current-user-info.css +6 -1
- package/dist/collection/components/current-user-info/current-user-info.js +32 -11
- package/dist/collection/components/current-user-info/current-user-info.js.map +1 -1
- package/dist/collection/components/current-user-info/gx-ide-assets/current-user-info/langs/current-user-info.lang.en.json +2 -1
- package/dist/collection/components/current-user-info/gx-ide-assets/current-user-info/langs/current-user-info.lang.ja.json +2 -1
- package/dist/collection/components/current-user-info/gx-ide-assets/current-user-info/langs/current-user-info.lang.zh.json +2 -1
- package/dist/collection/components/select-user-team/gx-ide-assets/select-user-team/langs/select-user-team.lang.en.json +5 -1
- package/dist/collection/components/select-user-team/gx-ide-assets/select-user-team/langs/select-user-team.lang.ja.json +5 -1
- package/dist/collection/components/select-user-team/gx-ide-assets/select-user-team/langs/select-user-team.lang.zh.json +5 -1
- package/dist/collection/components/select-user-team/helpers.js +1 -1
- package/dist/collection/components/select-user-team/helpers.js.map +1 -1
- package/dist/collection/components/select-user-team/select-user-team.css +8 -0
- package/dist/collection/components/select-user-team/select-user-team.js +42 -9
- package/dist/collection/components/select-user-team/select-user-team.js.map +1 -1
- package/dist/collection/components/sign-in-team/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.en.json +15 -5
- package/dist/collection/components/sign-in-team/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.ja.json +13 -3
- package/dist/collection/components/sign-in-team/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.zh.json +13 -3
- package/dist/collection/components/sign-in-team/sign-in-team.css +9 -4
- package/dist/collection/components/sign-in-team/sign-in-team.js +116 -15
- package/dist/collection/components/sign-in-team/sign-in-team.js.map +1 -1
- package/dist/collection/components/ww-attributes/gx-ide-assets/ww-attributes/langs/ww-attributes.lang.en.json +30 -0
- package/dist/collection/components/ww-attributes/gx-ide-assets/ww-attributes/langs/ww-attributes.lang.ja.json +30 -0
- package/dist/collection/components/ww-attributes/gx-ide-assets/ww-attributes/langs/ww-attributes.lang.zh.json +30 -0
- package/dist/collection/components/ww-attributes/helpers.js +11 -0
- package/dist/collection/components/ww-attributes/helpers.js.map +1 -0
- package/dist/collection/components/ww-attributes/ww-attributes.css +70 -0
- package/dist/collection/components/ww-attributes/ww-attributes.js +468 -0
- package/dist/collection/components/ww-attributes/ww-attributes.js.map +1 -0
- package/dist/collection/testing/locale.e2e.js +1 -0
- package/dist/collection/testing/locale.e2e.js.map +1 -1
- package/dist/components/entity-selector.js +3 -1
- package/dist/components/entity-selector.js.map +1 -1
- package/dist/components/gx-ide-current-user-info.js +12 -12
- package/dist/components/gx-ide-current-user-info.js.map +1 -1
- package/dist/components/gx-ide-select-user-team.js +48 -13
- package/dist/components/gx-ide-select-user-team.js.map +1 -1
- package/dist/components/gx-ide-sign-in-team.js +86 -15
- package/dist/components/gx-ide-sign-in-team.js.map +1 -1
- package/dist/components/gx-ide-ww-attributes.d.ts +11 -0
- package/dist/components/gx-ide-ww-attributes.js +294 -0
- package/dist/components/gx-ide-ww-attributes.js.map +1 -0
- package/dist/components/ide-loader.js +1 -1
- package/dist/components/ide-loader.js.map +1 -1
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-current-user-info.entry.js +10 -11
- package/dist/esm/gx-ide-current-user-info.entry.js.map +1 -1
- package/dist/esm/gx-ide-entity-selector.entry.js +3 -1
- package/dist/esm/gx-ide-entity-selector.entry.js.map +1 -1
- package/dist/esm/gx-ide-loader.entry.js +1 -1
- package/dist/esm/gx-ide-loader.entry.js.map +1 -1
- package/dist/esm/gx-ide-select-user-team.entry.js +38 -11
- package/dist/esm/gx-ide-select-user-team.entry.js.map +1 -1
- package/dist/esm/gx-ide-sign-in-team.entry.js +75 -13
- package/dist/esm/gx-ide-sign-in-team.entry.js.map +1 -1
- package/dist/esm/gx-ide-ww-attributes.entry.js +240 -0
- package/dist/esm/gx-ide-ww-attributes.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/current-user-info/langs/current-user-info.lang.en.json +2 -1
- package/dist/genexus-ide-ui/gx-ide-assets/current-user-info/langs/current-user-info.lang.ja.json +2 -1
- package/dist/genexus-ide-ui/gx-ide-assets/current-user-info/langs/current-user-info.lang.zh.json +2 -1
- package/dist/genexus-ide-ui/gx-ide-assets/select-user-team/langs/select-user-team.lang.en.json +5 -1
- package/dist/genexus-ide-ui/gx-ide-assets/select-user-team/langs/select-user-team.lang.ja.json +5 -1
- package/dist/genexus-ide-ui/gx-ide-assets/select-user-team/langs/select-user-team.lang.zh.json +5 -1
- package/dist/genexus-ide-ui/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.en.json +15 -5
- package/dist/genexus-ide-ui/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.ja.json +13 -3
- package/dist/genexus-ide-ui/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.zh.json +13 -3
- package/dist/genexus-ide-ui/gx-ide-assets/ww-attributes/langs/ww-attributes.lang.en.json +30 -0
- package/dist/genexus-ide-ui/gx-ide-assets/ww-attributes/langs/ww-attributes.lang.ja.json +30 -0
- package/dist/genexus-ide-ui/gx-ide-assets/ww-attributes/langs/ww-attributes.lang.zh.json +30 -0
- package/dist/genexus-ide-ui/{p-04d7f44c.entry.js → p-1693a2d1.entry.js} +4 -2
- package/dist/genexus-ide-ui/p-1693a2d1.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-5619120d.entry.js +341 -0
- package/dist/genexus-ide-ui/p-5619120d.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-b12a5426.entry.js → p-a27c088d.entry.js} +45 -41
- package/dist/genexus-ide-ui/p-a27c088d.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-c9b0fd13.entry.js → p-ab653cc2.entry.js} +44 -18
- package/dist/genexus-ide-ui/p-ab653cc2.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-b04a0ae3.entry.js +236 -0
- package/dist/genexus-ide-ui/p-b04a0ae3.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-6db2056c.entry.js → p-efebc74b.entry.js} +7 -7
- package/dist/genexus-ide-ui/p-efebc74b.entry.js.map +1 -0
- package/dist/types/components/_helpers/entity-selector/entity-selector.d.ts +1 -1
- package/dist/types/components/current-user-info/current-user-info.d.ts +6 -2
- package/dist/types/components/select-user-team/select-user-team.d.ts +9 -0
- package/dist/types/components/sign-in-team/sign-in-team.d.ts +13 -1
- package/dist/types/components/ww-attributes/helpers.d.ts +3 -0
- package/dist/types/components/ww-attributes/ww-attributes.d.ts +95 -0
- package/dist/types/components.d.ts +128 -17
- package/package.json +1 -1
- package/dist/genexus-ide-ui/p-04d7f44c.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-0b33d2f9.entry.js +0 -163
- package/dist/genexus-ide-ui/p-0b33d2f9.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-6db2056c.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-b12a5426.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-c9b0fd13.entry.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { getAssetPath, proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { L as Locale } from './locale.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './ide-loader.js';
|
|
3
4
|
|
|
4
5
|
const mapTeamsToComboBoxItemModel = (teams) => {
|
|
5
6
|
if (!teams) {
|
|
@@ -11,7 +12,7 @@ const mapTeamsToComboBoxItemModel = (teams) => {
|
|
|
11
12
|
}));
|
|
12
13
|
};
|
|
13
14
|
|
|
14
|
-
const signInTeamCss = ":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 padding: var(--mer-spacing--xl);\n}\n\n.slide {\n display: grid;\n grid-template-columns: 1fr 1fr;\n block-size: 100%;\n max-block-size: 700px;\n max-inline-size: 1100px;\n background-color: var(--mer-surface__elevation--01);\n border-radius: var(--mer-spacing--md);\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: var(--mer-spacing--3xl);\n transform: translateY(var(--mer-spacing--2xs));\n transition: var(--switch-step-transtion-time) all;\n opacity: 0;\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(--mer-spacing--lg);\n max-inline-size: 480px;\n}\n.slide__main-header {\n display: grid;\n gap: var(--mer-spacing--lg);\n}\n.slide__main-title {\n display: flex;\n flex-direction: column;\n font-size: var(--mer-font__size--xl);\n font-weight: var(--mer-font__weight--semi-bold);\n letter-spacing: 0.02em;\n color: var(--mer-text__on-surface);\n}\n.slide__main-description {\n display: grid;\n gap: var(--mer-spacing--2xl);\n font-size: var(--mer-font__size--sm);\n font-weight: var(--mer-font__weight--light);\n line-height: var(--mer-line-height--spaced);\n color: var(--mer-text__complementary);\n
|
|
15
|
+
const signInTeamCss = ":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 padding: var(--mer-spacing--xl);\n}\n\n.slide {\n display: grid;\n grid-template-columns: 1fr 1fr;\n block-size: 100%;\n max-block-size: 700px;\n max-inline-size: 1100px;\n background-color: var(--mer-surface__elevation--01);\n border-radius: var(--mer-spacing--md);\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: var(--mer-spacing--3xl);\n transform: translateY(var(--mer-spacing--2xs));\n transition: var(--switch-step-transtion-time) all;\n opacity: 0;\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(--mer-spacing--lg);\n max-inline-size: 480px;\n}\n.slide__main-header {\n display: grid;\n gap: var(--mer-spacing--lg);\n}\n.slide__main-title {\n display: flex;\n flex-direction: column;\n font-size: var(--mer-font__size--xl);\n font-weight: var(--mer-font__weight--semi-bold);\n letter-spacing: 0.02em;\n color: var(--mer-text__on-surface);\n}\n.slide__main-description {\n display: grid;\n gap: var(--mer-spacing--2xl);\n font-size: var(--mer-font__size--sm);\n font-weight: var(--mer-font__weight--light);\n line-height: var(--mer-line-height--spaced);\n color: var(--mer-text__complementary);\n max-inline-size: 370px;\n}\n\n.teams-list {\n inline-size: 100%;\n max-inline-size: 400px;\n}\n\n.main-btn {\n inline-size: 100%;\n max-inline-size: 124px;\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}\n.hyperlink {\n text-decoration: underline;\n cursor: pointer;\n}\n\n.field-inline > .label-agreement {\n margin-block-start: 0 !important;\n}";
|
|
15
16
|
|
|
16
17
|
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
17
18
|
if (kind === "a" && !f)
|
|
@@ -29,15 +30,18 @@ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) ||
|
|
|
29
30
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
30
31
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
31
32
|
};
|
|
32
|
-
var _GxIdeSignInTeam_componentLocale, _GxIdeSignInTeam_userTeamsModel, _GxIdeSignInTeam_chSelectTeamEl, _GxIdeSignInTeam_switchStepTransitionTime, _GxIdeSignInTeam_authStepCallback, _GxIdeSignInTeam_continueHandler;
|
|
33
|
+
var _GxIdeSignInTeam_componentLocale, _GxIdeSignInTeam_userTeamsModel, _GxIdeSignInTeam_chSelectTeamEl, _GxIdeSignInTeam_switchStepTransitionTime, _GxIdeSignInTeam_termsAndConditionsCheckboxEl, _GxIdeSignInTeam_privacyPolicyCheckboxEl, _GxIdeSignInTeam_authStepCallback, _GxIdeSignInTeam_continueHandler, _GxIdeSignInTeam_renderStepHeader, _GxIdeSignInTeam_renderStepFooter, _GxIdeSignInTeam_evaluateTermsConditionsAndPrivacyAccepted, _GxIdeSignInTeam_termsAndConditionsClickedHandler, _GxIdeSignInTeam_privacyPolicyClickedHandler, _GxIdeSignInTeam_evaluateStepRender;
|
|
33
34
|
const COPYRIGHTS_ILLUSTRATION = getAssetPath(`./gx-ide-assets/welcome-page/images/copyrights-illustration.png`);
|
|
34
35
|
const ICON_NEXT = getAssetPath(`./gx-ide-assets/welcome-page/images/icon-next.svg`);
|
|
35
36
|
const CSS_BUNDLES = [
|
|
36
37
|
"resets/box-sizing",
|
|
37
38
|
"utils/typography",
|
|
38
39
|
"components/button",
|
|
39
|
-
"components/combo-box"
|
|
40
|
+
"components/combo-box",
|
|
41
|
+
"components/checkbox",
|
|
42
|
+
"utils/form"
|
|
40
43
|
];
|
|
44
|
+
const CHECKED_VALUE = "on";
|
|
41
45
|
const GxIdeSignInTeam$1 = /*@__PURE__*/ proxyCustomElement(class GxIdeSignInTeam extends HTMLElement {
|
|
42
46
|
constructor() {
|
|
43
47
|
super();
|
|
@@ -52,6 +56,8 @@ const GxIdeSignInTeam$1 = /*@__PURE__*/ proxyCustomElement(class GxIdeSignInTeam
|
|
|
52
56
|
_GxIdeSignInTeam_userTeamsModel.set(this, []);
|
|
53
57
|
_GxIdeSignInTeam_chSelectTeamEl.set(this, void 0);
|
|
54
58
|
_GxIdeSignInTeam_switchStepTransitionTime.set(this, 100);
|
|
59
|
+
_GxIdeSignInTeam_termsAndConditionsCheckboxEl.set(this, void 0);
|
|
60
|
+
_GxIdeSignInTeam_privacyPolicyCheckboxEl.set(this, void 0);
|
|
55
61
|
_GxIdeSignInTeam_authStepCallback.set(this, () => {
|
|
56
62
|
if (this.authStep === "signIn") {
|
|
57
63
|
this.signInCallback();
|
|
@@ -63,13 +69,78 @@ const GxIdeSignInTeam$1 = /*@__PURE__*/ proxyCustomElement(class GxIdeSignInTeam
|
|
|
63
69
|
_GxIdeSignInTeam_continueHandler.set(this, async () => {
|
|
64
70
|
await this.continueCallback(__classPrivateFieldGet(this, _GxIdeSignInTeam_chSelectTeamEl, "f").value);
|
|
65
71
|
});
|
|
72
|
+
_GxIdeSignInTeam_renderStepHeader.set(this, () => {
|
|
73
|
+
return (h("header", { class: "slide__main-header" }, h("img", { src: ICON_NEXT, alt: "" // decorative
|
|
74
|
+
}), h("h2", {
|
|
75
|
+
// Split the title into two spans for better styling
|
|
76
|
+
class: "slide__main-title"
|
|
77
|
+
}, h("span", null, __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f")[this.authStepInternal].titlePart1), h("span", null, __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f")[this.authStepInternal].titlePart2))));
|
|
78
|
+
});
|
|
79
|
+
_GxIdeSignInTeam_renderStepFooter.set(this, () => {
|
|
80
|
+
const signInDisabled = this.authStep === "signIn" &&
|
|
81
|
+
this.termsConfirmationRequired &&
|
|
82
|
+
!this.termsAndConditionsAccepted;
|
|
83
|
+
return (h("div", null, h("button", { class: "button-primary main-btn", onClick: __classPrivateFieldGet(this, _GxIdeSignInTeam_authStepCallback, "f"), disabled: signInDisabled }, __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f")[this.authStepInternal].buttonCaption)));
|
|
84
|
+
});
|
|
85
|
+
_GxIdeSignInTeam_evaluateTermsConditionsAndPrivacyAccepted.set(this, () => {
|
|
86
|
+
const termsAndConditionsAccepted = __classPrivateFieldGet(this, _GxIdeSignInTeam_termsAndConditionsCheckboxEl, "f").value === CHECKED_VALUE;
|
|
87
|
+
const privacyPolicyAccepted = __classPrivateFieldGet(this, _GxIdeSignInTeam_privacyPolicyCheckboxEl, "f").value === CHECKED_VALUE;
|
|
88
|
+
this.termsAndConditionsAccepted =
|
|
89
|
+
termsAndConditionsAccepted && privacyPolicyAccepted;
|
|
90
|
+
});
|
|
91
|
+
_GxIdeSignInTeam_termsAndConditionsClickedHandler.set(this, (event) => {
|
|
92
|
+
event.preventDefault();
|
|
93
|
+
this.termsCallback();
|
|
94
|
+
});
|
|
95
|
+
_GxIdeSignInTeam_privacyPolicyClickedHandler.set(this, (event) => {
|
|
96
|
+
event.preventDefault();
|
|
97
|
+
this.privacyCallback();
|
|
98
|
+
});
|
|
99
|
+
_GxIdeSignInTeam_evaluateStepRender.set(this, () => {
|
|
100
|
+
var _a;
|
|
101
|
+
if (this.authStepInternal === "signIn") {
|
|
102
|
+
return [
|
|
103
|
+
__classPrivateFieldGet(this, _GxIdeSignInTeam_renderStepHeader, "f").call(this),
|
|
104
|
+
h("p", { class: "text-body-regular-l" }, __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f").signIn.description),
|
|
105
|
+
this.termsConfirmationRequired && (h("div", { class: "field-group" }, h("div", {
|
|
106
|
+
// terms and conditions
|
|
107
|
+
class: "field field-inline"
|
|
108
|
+
}, h("ch-checkbox", { checkedValue: CHECKED_VALUE, id: "terms-and-conditions", class: "checkbox", ref: (el) => (__classPrivateFieldSet(this, _GxIdeSignInTeam_termsAndConditionsCheckboxEl, el, "f")), onInput: __classPrivateFieldGet(this, _GxIdeSignInTeam_evaluateTermsConditionsAndPrivacyAccepted, "f") }), h("label", { htmlFor: "terms-and-conditions", class: "label label-agreement" }, __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f").agreement.termsAndConditionsLabel, h("span", { class: { hyperlink: !!this.termsCallback }, onClick: this.termsCallback && __classPrivateFieldGet(this, _GxIdeSignInTeam_termsAndConditionsClickedHandler, "f") }, __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f").agreement.termsAndConditionsLink))), h("div", {
|
|
109
|
+
// privacy policy
|
|
110
|
+
class: "field field-inline"
|
|
111
|
+
}, h("ch-checkbox", { checkedValue: CHECKED_VALUE, id: "privacy-policy", class: "checkbox", ref: (el) => (__classPrivateFieldSet(this, _GxIdeSignInTeam_privacyPolicyCheckboxEl, el, "f")), onInput: __classPrivateFieldGet(this, _GxIdeSignInTeam_evaluateTermsConditionsAndPrivacyAccepted, "f") }), h("label", { htmlFor: "privacy-policy", class: "label label-agreement" }, __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f").agreement.privacyAndPolicyLabel, h("span", { class: { hyperlink: !!this.privacyCallback }, onClick: this.privacyCallback && __classPrivateFieldGet(this, _GxIdeSignInTeam_privacyPolicyClickedHandler, "f") }, __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f").agreement.privacyAndPolicyLink))))),
|
|
112
|
+
__classPrivateFieldGet(this, _GxIdeSignInTeam_renderStepFooter, "f").call(this)
|
|
113
|
+
];
|
|
114
|
+
}
|
|
115
|
+
else if (this.authStepInternal === "fetchUserTeams" ||
|
|
116
|
+
this.authStepInternal === "settingUpSession") {
|
|
117
|
+
const loaderTitle = this.authStepInternal === "fetchUserTeams"
|
|
118
|
+
? __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f").loader.fetchingTeamsTitle
|
|
119
|
+
: __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f").loader.settingUpSessionTitle;
|
|
120
|
+
const loaderDescription = this.authStepInternal === "fetchUserTeams"
|
|
121
|
+
? __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f").loader.fetchingTeamsDescription
|
|
122
|
+
: __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f").loader.settingUpDescription;
|
|
123
|
+
return (h("gx-ide-loader", { show: true, loaderTitle: loaderTitle, description: loaderDescription }));
|
|
124
|
+
}
|
|
125
|
+
else if (this.authStepInternal === "selectUserTeam") {
|
|
126
|
+
return [
|
|
127
|
+
__classPrivateFieldGet(this, _GxIdeSignInTeam_renderStepHeader, "f").call(this),
|
|
128
|
+
h("div", { class: "slide__select-team-description" }, h("p", { class: "text-body-highlighted-l" }, __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f").selectUserTeam.infoMessage)),
|
|
129
|
+
h("div", { class: "field-group" }, h("div", { class: "field field-block" }, h("label", { htmlFor: "teams" }, __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f").selectUserTeam.label), h("ch-combo-box-render", { id: "teams", accessibleName: "Teams", class: "combo-box teams-list", model: __classPrivateFieldGet(this, _GxIdeSignInTeam_userTeamsModel, "f"), value: (_a = __classPrivateFieldGet(this, _GxIdeSignInTeam_userTeamsModel, "f")[0]) === null || _a === void 0 ? void 0 : _a.value, ref: (el) => (__classPrivateFieldSet(this, _GxIdeSignInTeam_chSelectTeamEl, el, "f")) }))),
|
|
130
|
+
__classPrivateFieldGet(this, _GxIdeSignInTeam_renderStepFooter, "f").call(this)
|
|
131
|
+
];
|
|
132
|
+
}
|
|
133
|
+
});
|
|
66
134
|
this.authStepInternal = undefined;
|
|
67
135
|
this.slideIsVisible = true;
|
|
136
|
+
this.termsAndConditionsAccepted = false;
|
|
68
137
|
this.authStep = "signIn";
|
|
69
138
|
this.continueCallback = undefined;
|
|
70
139
|
this.signInCallback = undefined;
|
|
140
|
+
this.termsConfirmationRequired = false;
|
|
71
141
|
this.teams = undefined;
|
|
72
142
|
this.termsCallback = undefined;
|
|
143
|
+
this.privacyCallback = undefined;
|
|
73
144
|
}
|
|
74
145
|
authStepChanged(newAuthStep) {
|
|
75
146
|
this.slideIsVisible = false;
|
|
@@ -93,19 +164,11 @@ const GxIdeSignInTeam$1 = /*@__PURE__*/ proxyCustomElement(class GxIdeSignInTeam
|
|
|
93
164
|
this.teamsChanged(this.teams);
|
|
94
165
|
}
|
|
95
166
|
render() {
|
|
96
|
-
var _a;
|
|
97
167
|
return (h(Host, null, h("ch-theme", { model: CSS_BUNDLES }), h("section", { class: "slide" }, h("img", { src: COPYRIGHTS_ILLUSTRATION, class: "slide__illustration", alt: "" // decorative
|
|
98
168
|
}), h("div", { class: {
|
|
99
169
|
"slide__main": true,
|
|
100
170
|
"slide__main--visible": this.slideIsVisible
|
|
101
|
-
} }, h("div", { class: "slide__main-container" },
|
|
102
|
-
}), h("h2", {
|
|
103
|
-
// Split the title into two spans for better styling
|
|
104
|
-
class: "slide__main-title"
|
|
105
|
-
}, h("span", null, __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f")[this.authStepInternal].titlePart1), h("span", null, __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f")[this.authStepInternal].titlePart2))), this.authStepInternal === "signIn" ? (h("div", { class: "slide__main-description" }, h("p", { hidden: true }, h("span", null, __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f").descriptionText)), h("span", null, __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f").signIn.byContinuingText, h("a", { class: "terms-conditions", onClick: this.termsCallback }, __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f").signIn.byContinuingCallBackText)))) : ([
|
|
106
|
-
h("div", { class: "slide__select-team-description" }, h("p", { class: "text-body-highlighted-l" }, __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f").selectUserTeam.infoMessage)),
|
|
107
|
-
h("div", { class: "field-group" }, h("div", { class: "field field-block" }, h("label", { htmlFor: "teams" }, __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f").teams), h("ch-combo-box-render", { id: "teams", accessibleName: "Teams", class: "combo-box teams-list", model: __classPrivateFieldGet(this, _GxIdeSignInTeam_userTeamsModel, "f"), value: (_a = __classPrivateFieldGet(this, _GxIdeSignInTeam_userTeamsModel, "f")[0]) === null || _a === void 0 ? void 0 : _a.value, ref: (el) => (__classPrivateFieldSet(this, _GxIdeSignInTeam_chSelectTeamEl, el, "f")) })))
|
|
108
|
-
]), h("div", null, h("button", { class: "button-primary main-btn", onClick: __classPrivateFieldGet(this, _GxIdeSignInTeam_authStepCallback, "f") }, __classPrivateFieldGet(this, _GxIdeSignInTeam_componentLocale, "f")[this.authStepInternal].buttonCaption)))))));
|
|
171
|
+
} }, h("div", { class: "slide__main-container" }, __classPrivateFieldGet(this, _GxIdeSignInTeam_evaluateStepRender, "f").call(this))))));
|
|
109
172
|
}
|
|
110
173
|
static get assetsDirs() { return ["gx-ide-assets/sign-in-team"]; }
|
|
111
174
|
get el() { return this; }
|
|
@@ -118,26 +181,34 @@ const GxIdeSignInTeam$1 = /*@__PURE__*/ proxyCustomElement(class GxIdeSignInTeam
|
|
|
118
181
|
"authStep": [1, "auth-step"],
|
|
119
182
|
"continueCallback": [16],
|
|
120
183
|
"signInCallback": [16],
|
|
184
|
+
"termsConfirmationRequired": [4, "terms-confirmation-required"],
|
|
121
185
|
"teams": [16],
|
|
122
186
|
"termsCallback": [16],
|
|
187
|
+
"privacyCallback": [16],
|
|
123
188
|
"authStepInternal": [32],
|
|
124
|
-
"slideIsVisible": [32]
|
|
189
|
+
"slideIsVisible": [32],
|
|
190
|
+
"termsAndConditionsAccepted": [32]
|
|
125
191
|
}, undefined, {
|
|
126
192
|
"authStep": ["authStepChanged"],
|
|
127
193
|
"teams": ["teamsChanged"]
|
|
128
194
|
}]);
|
|
129
|
-
_GxIdeSignInTeam_componentLocale = new WeakMap(), _GxIdeSignInTeam_userTeamsModel = new WeakMap(), _GxIdeSignInTeam_chSelectTeamEl = new WeakMap(), _GxIdeSignInTeam_switchStepTransitionTime = new WeakMap(), _GxIdeSignInTeam_authStepCallback = new WeakMap(), _GxIdeSignInTeam_continueHandler = new WeakMap();
|
|
195
|
+
_GxIdeSignInTeam_componentLocale = new WeakMap(), _GxIdeSignInTeam_userTeamsModel = new WeakMap(), _GxIdeSignInTeam_chSelectTeamEl = new WeakMap(), _GxIdeSignInTeam_switchStepTransitionTime = new WeakMap(), _GxIdeSignInTeam_termsAndConditionsCheckboxEl = new WeakMap(), _GxIdeSignInTeam_privacyPolicyCheckboxEl = new WeakMap(), _GxIdeSignInTeam_authStepCallback = new WeakMap(), _GxIdeSignInTeam_continueHandler = new WeakMap(), _GxIdeSignInTeam_renderStepHeader = new WeakMap(), _GxIdeSignInTeam_renderStepFooter = new WeakMap(), _GxIdeSignInTeam_evaluateTermsConditionsAndPrivacyAccepted = new WeakMap(), _GxIdeSignInTeam_termsAndConditionsClickedHandler = new WeakMap(), _GxIdeSignInTeam_privacyPolicyClickedHandler = new WeakMap(), _GxIdeSignInTeam_evaluateStepRender = new WeakMap();
|
|
130
196
|
function defineCustomElement$1() {
|
|
131
197
|
if (typeof customElements === "undefined") {
|
|
132
198
|
return;
|
|
133
199
|
}
|
|
134
|
-
const components = ["gx-ide-sign-in-team"];
|
|
200
|
+
const components = ["gx-ide-sign-in-team", "gx-ide-loader"];
|
|
135
201
|
components.forEach(tagName => { switch (tagName) {
|
|
136
202
|
case "gx-ide-sign-in-team":
|
|
137
203
|
if (!customElements.get(tagName)) {
|
|
138
204
|
customElements.define(tagName, GxIdeSignInTeam$1);
|
|
139
205
|
}
|
|
140
206
|
break;
|
|
207
|
+
case "gx-ide-loader":
|
|
208
|
+
if (!customElements.get(tagName)) {
|
|
209
|
+
defineCustomElement$2();
|
|
210
|
+
}
|
|
211
|
+
break;
|
|
141
212
|
} });
|
|
142
213
|
}
|
|
143
214
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gx-ide-sign-in-team.js","mappings":";;;AAGO,MAAM,2BAA2B,GAAG,CACzC,KAAkB;IAElB,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,EAAE,CAAC;KACX;IACD,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,KAAK;QACxB,KAAK,EAAE,IAAI,CAAC,EAAE;QACd,OAAO,EAAE,IAAI,CAAC,IAAI;KACnB,CAAC,CAAC,CAAC;AACN,CAAC;;ACbD,MAAM,aAAa,GAAG,s/DAAs/D;;;;;;;;;;;;;;;;;;;ACkB5gE,MAAM,uBAAuB,GAAG,YAAY,CAC1C,iEAAiE,CAClE,CAAC;AACF,MAAM,SAAS,GAAG,YAAY,CAC5B,mDAAmD,CACpD,CAAC;AACF,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,kBAAkB;IAClB,mBAAmB;IACnB,sBAAsB;CACvB,CAAC;MAQWA,iBAAe;;;;;;;;;QAK1B,mDAAsB;;QAEtB,0CAAuC,EAAE,EAAC;QAC1C,kDAA6C;QAC7C,oDAAoC,GAAG,EAAC;QAqExC,4CAAoB;YAClB,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,EAAE;gBAC9B,IAAI,CAAC,cAAc,EAAE,C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I,uCAAgB,CAAC,CAAC,CAAC,0CAAE,KAAK,EACrC,GAAG,EAAE,CAAC,EAA+B,MAClC,uBAAA,IAAI,mCACH,EAAiC,MAAA,CAAC,GAEjB,CACnB,CACF;SACP,CACF,EAED,eACE,cACE,KAAK,EAAC,yBAAyB,EAC/B,OAAO,EAAE,uBAAA,IAAI,yCAAkB,IAE9B,uBAAA,IAAI,wCAAiB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,aAAa,CACpD,CACL,CACF,CACF,CACE,CACL,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GxIdeSignInTeam"],"sources":["src/components/sign-in-team/helpers.ts","src/components/sign-in-team/sign-in-team.scss?tag=gx-ide-sign-in-team&encapsulation=shadow","src/components/sign-in-team/sign-in-team.tsx"],"sourcesContent":["import { ComboBoxItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\nimport { TeamData } from \"./sign-in-team\";\n\nexport const mapTeamsToComboBoxItemModel = (\n teams?: TeamData[]\n): ComboBoxItemModel[] | undefined => {\n if (!teams) {\n return [];\n }\n return teams.map(team => ({\n value: team.id,\n caption: team.name\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 padding: var(--mer-spacing--xl);\n}\n\n.slide {\n display: grid;\n grid-template-columns: 1fr 1fr;\n block-size: 100%;\n max-block-size: 700px;\n max-inline-size: 1100px;\n background-color: var(--mer-surface__elevation--01);\n border-radius: var(--mer-spacing--md);\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: var(--mer-spacing--3xl);\n transform: translateY(var(--mer-spacing--2xs));\n transition: var(--switch-step-transtion-time) all;\n opacity: 0;\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(--mer-spacing--lg);\n max-inline-size: 480px;\n }\n\n &__main-header {\n display: grid;\n gap: var(--mer-spacing--lg);\n }\n\n &__main-title {\n display: flex;\n flex-direction: column;\n font-size: var(--mer-font__size--xl);\n font-weight: var(--mer-font__weight--semi-bold);\n letter-spacing: 0.02em;\n color: var(--mer-text__on-surface);\n }\n\n &__main-description {\n display: grid;\n gap: var(--mer-spacing--2xl);\n font-size: var(--mer-font__size--sm);\n font-weight: var(--mer-font__weight--light);\n line-height: var(--mer-line-height--spaced);\n color: var(--mer-text__complementary);\n }\n}\n\n.terms-conditions {\n text-decoration: underline;\n}\n\n.teams-list {\n inline-size: 100%;\n max-inline-size: 400px;\n}\n\n.main-btn {\n inline-size: 100%;\n max-inline-size: 124px;\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 { 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);\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-sign-in-team\",\n styleUrl: \"sign-in-team.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/sign-in-team\"]\n})\nexport class GxIdeSignInTeam {\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 // Select User Team References :\n #userTeamsModel: ComboBoxItemModel[] = [];\n #chSelectTeamEl: HTMLChComboBoxRenderElement;\n #switchStepTransitionTime: number = 100;\n\n @Element() el: HTMLGxIdeSignInTeamElement;\n\n /**\n * This is a handover from \"authStep\" that allows updating descriptions once\n * the slide is hidden. This enables a smooth transition between descriptions.\n */\n\n @State() authStepInternal: AuthStep;\n\n /**\n * Defines if the main slide is visible or not. Used for smooth transitions\n * between slides.\n */\n @State() slideIsVisible: boolean = true;\n\n /**\n * The authentication step to display\n */\n @Prop() readonly authStep: AuthStep = \"signIn\";\n @Watch(\"authStep\")\n authStepChanged(newAuthStep: AuthStep) {\n this.slideIsVisible = false;\n // switch step\n setTimeout(() => {\n this.authStepInternal = newAuthStep;\n }, this.#switchStepTransitionTime);\n // show slide\n setTimeout(() => {\n this.slideIsVisible = true;\n }, this.#switchStepTransitionTime * 2);\n }\n\n /**\n * Callback executed when the user clicks the 'Continue' button\n */\n @Prop() readonly continueCallback!: (teamId: string) => Promise<void>;\n\n /**\n * Callback executed when the user click the \"Sign In\" button\n */\n @Prop() readonly signInCallback: () => Promise<void>;\n\n /**\n * Array that contains the user's teams\n */\n @Prop() readonly teams!: TeamData[];\n @Watch(\"teams\")\n teamsChanged(newTeams: TeamData[]) {\n this.#userTeamsModel = mapTeamsToComboBoxItemModel(newTeams);\n }\n\n /**\n * Callback executed when the user clicks on the \"term and conditions\" link\n */\n @Prop() readonly termsCallback: () => Promise<void>;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.el.style.setProperty(\n \"--switch-step-transtion-time\",\n this.#switchStepTransitionTime.toString() + \"ms\"\n );\n // Initialize values\n this.authStepInternal = this.authStep;\n this.teamsChanged(this.teams);\n }\n\n #authStepCallback = () => {\n if (this.authStep === \"signIn\") {\n this.signInCallback();\n } else if (this.authStep === \"selectUserTeam\") {\n this.#continueHandler();\n }\n };\n\n #continueHandler = 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 <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 <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>\n {this.#componentLocale[this.authStepInternal].titlePart1}\n </span>\n <span>\n {this.#componentLocale[this.authStepInternal].titlePart2}\n </span>\n </h2>\n </header>\n\n {this.authStepInternal === \"signIn\" ? (\n <div class=\"slide__main-description\">\n <p hidden>\n <span>{this.#componentLocale.descriptionText}</span>\n </p>\n <span>\n {this.#componentLocale.signIn.byContinuingText}\n <a class=\"terms-conditions\" onClick={this.termsCallback}>\n {this.#componentLocale.signIn.byContinuingCallBackText}\n </a>\n </span>\n </div>\n ) : (\n [\n <div class=\"slide__select-team-description\">\n <p class=\"text-body-highlighted-l\">\n {this.#componentLocale.selectUserTeam.infoMessage}\n </p>\n </div>,\n\n <div class=\"field-group\">\n <div class=\"field field-block\">\n <label htmlFor=\"teams\">\n {this.#componentLocale.teams}\n </label>\n <ch-combo-box-render\n id=\"teams\"\n accessibleName=\"Teams\"\n class=\"combo-box teams-list\"\n model={this.#userTeamsModel}\n value={this.#userTeamsModel[0]?.value}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#chSelectTeamEl =\n el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n </div>\n </div>\n ]\n )}\n\n <div>\n <button\n class=\"button-primary main-btn\"\n onClick={this.#authStepCallback}\n >\n {this.#componentLocale[this.authStepInternal].buttonCaption}\n </button>\n </div>\n </div>\n </div>\n </section>\n </Host>\n );\n }\n}\n\nexport type AuthStep = \"signIn\" | \"selectUserTeam\";\n\nexport type TeamData = {\n id: string;\n name: string;\n};\n"],"version":3}
|
|
1
|
+
{"file":"gx-ide-sign-in-team.js","mappings":";;;;AAGO,MAAM,2BAA2B,GAAG,CACzC,KAAkB;IAElB,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,EAAE,CAAC;KACX;IACD,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,KAAK;QACxB,KAAK,EAAE,IAAI,CAAC,EAAE;QACd,OAAO,EAAE,IAAI,CAAC,IAAI;KACnB,CAAC,CAAC,CAAC;AACN,CAAC;;ACbD,MAAM,aAAa,GAAG,0mEAA0mE;;;;;;;;;;;;;;;;;;;ACkBhoE,MAAM,uBAAuB,GAAG,YAAY,CAC1C,iEAAiE,CAClE,CAAC;AACF,MAAM,SAAS,GAAG,YAAY,CAC5B,mDAAmD,CACpD,CAAC;AACF,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,kBAAkB;IAClB,mBAAmB;IACnB,sBAAsB;IACtB,qBAAqB;IACrB,YAAY;CACb,CAAC;AAEF,MAAM,aAAa,GAAG,IAAI,CAAC;MAQdA,iBAAe;;;;;;;;;QAK1B,mDAAsB;;QAEtB,0CAAuC,EAAE,EAAC;QAC1C,kDAA6C;QAC7C,oDAAoC,GAAG,EAAC;QACxC,gEAAsD;QACtD,2DAAiD;QAoFjD,4CAAoB;YAClB,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,EAAE;gBAC9B,IAAI,CAAC,cAAc,EAAE,CAAC;aACvB;iBAAM,IAAI,IAAI,CAAC,QAAQ,KAAK,gBAAgB,EAAE;gBAC7C,uBAAA,IAAI,wCAAiB,MAArB,IAAI,CAAmB,CAAC;aACzB;SACF,EAAC;QAEF,2CAAmB;YACjB,MAAM,IAAI,CAAC,gBAAgB,CAAC,uBAAA,IAAI,uCAAgB,CAAC,KAAK,CAAC,CAA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S,KAAK,EAAC,OAAO,IACpB,WACE,GAAG,EAAE,uBAAuB,EAC5B,KAAK,EAAC,qBAAqB,EAC3B,GAAG,EAAC,EAAE;UACN,EAEF,WACE,KAAK,EAAE;gBACL,aAAa,EAAE,IAAI;gBACnB,sBAAsB,EAAE,IAAI,CAAC,cAAc;aAC5C,IAED,WAAK,KAAK,EAAC,uBAAuB,IAC/B,uBAAA,IAAI,2CAAoB,MAAxB,IAAI,CAAsB,CACvB,CACF,CACE,CACL,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GxIdeSignInTeam"],"sources":["src/components/sign-in-team/helpers.ts","src/components/sign-in-team/sign-in-team.scss?tag=gx-ide-sign-in-team&encapsulation=shadow","src/components/sign-in-team/sign-in-team.tsx"],"sourcesContent":["import { ComboBoxItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\nimport { TeamData } from \"./sign-in-team\";\n\nexport const mapTeamsToComboBoxItemModel = (\n teams?: TeamData[]\n): ComboBoxItemModel[] | undefined => {\n if (!teams) {\n return [];\n }\n return teams.map(team => ({\n value: team.id,\n caption: team.name\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 padding: var(--mer-spacing--xl);\n}\n\n.slide {\n display: grid;\n grid-template-columns: 1fr 1fr;\n block-size: 100%;\n max-block-size: 700px;\n max-inline-size: 1100px;\n background-color: var(--mer-surface__elevation--01);\n border-radius: var(--mer-spacing--md);\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: var(--mer-spacing--3xl);\n transform: translateY(var(--mer-spacing--2xs));\n transition: var(--switch-step-transtion-time) all;\n opacity: 0;\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(--mer-spacing--lg);\n max-inline-size: 480px;\n }\n\n &__main-header {\n display: grid;\n gap: var(--mer-spacing--lg);\n }\n\n &__main-title {\n display: flex;\n flex-direction: column;\n font-size: var(--mer-font__size--xl);\n font-weight: var(--mer-font__weight--semi-bold);\n letter-spacing: 0.02em;\n color: var(--mer-text__on-surface);\n }\n\n &__main-description {\n display: grid;\n gap: var(--mer-spacing--2xl);\n font-size: var(--mer-font__size--sm);\n font-weight: var(--mer-font__weight--light);\n line-height: var(--mer-line-height--spaced);\n color: var(--mer-text__complementary);\n max-inline-size: 370px;\n }\n}\n\n.teams-list {\n inline-size: 100%;\n max-inline-size: 400px;\n}\n\n.main-btn {\n inline-size: 100%;\n max-inline-size: 124px;\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\n// WA (this class should be defined on Mercury\n.hyperlink {\n text-decoration: underline;\n cursor: pointer;\n}\n// WA checkboxes labels should not include margin-block-start when\n// placed inside a field-inline.\n.field-inline > .label-agreement {\n margin-block-start: 0 !important;\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 { 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);\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/typography\",\n \"components/button\",\n \"components/combo-box\",\n \"components/checkbox\",\n \"utils/form\"\n];\n\nconst CHECKED_VALUE = \"on\";\n\n@Component({\n tag: \"gx-ide-sign-in-team\",\n styleUrl: \"sign-in-team.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/sign-in-team\"]\n})\nexport class GxIdeSignInTeam {\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 // Select User Team References :\n #userTeamsModel: ComboBoxItemModel[] = [];\n #chSelectTeamEl: HTMLChComboBoxRenderElement;\n #switchStepTransitionTime: number = 100;\n #termsAndConditionsCheckboxEl!: HTMLChCheckboxElement;\n #privacyPolicyCheckboxEl!: HTMLChCheckboxElement;\n\n @Element() el: HTMLGxIdeSignInTeamElement;\n\n /**\n * This is a handover from \"authStep\" that allows updating descriptions once\n * the slide is hidden. This enables a smooth transition between descriptions.\n */\n\n @State() authStepInternal: AuthStep;\n\n /**\n * Defines if the main slide is visible or not. Used for smooth transitions\n * between slides.\n */\n @State() slideIsVisible: boolean = true;\n\n /**\n * True if terms and conditions are accepted.\n */\n @State() termsAndConditionsAccepted: boolean = false;\n\n /**\n * The authentication step to display\n */\n @Prop() readonly authStep: AuthStep = \"signIn\";\n @Watch(\"authStep\")\n authStepChanged(newAuthStep: AuthStep) {\n this.slideIsVisible = false;\n // switch step\n setTimeout(() => {\n this.authStepInternal = newAuthStep;\n }, this.#switchStepTransitionTime);\n // show slide\n setTimeout(() => {\n this.slideIsVisible = true;\n }, this.#switchStepTransitionTime * 2);\n }\n\n /**\n * Callback executed when the user clicks the 'Continue' button\n */\n @Prop() readonly continueCallback!: (teamId: string) => Promise<void>;\n\n /**\n * Callback executed when the user click the \"Sign In\" button\n */\n @Prop() readonly signInCallback!: () => Promise<void>;\n\n /**\n * When true, it will diplay checkboxes for the user to confirm terms and conditions\n */\n @Prop() readonly termsConfirmationRequired: boolean = false;\n\n /**\n * Array that contains the user's teams\n */\n @Prop() readonly teams!: TeamData[];\n @Watch(\"teams\")\n teamsChanged(newTeams: TeamData[]) {\n this.#userTeamsModel = mapTeamsToComboBoxItemModel(newTeams);\n }\n\n /**\n * Callback executed when the user clicks on the \"term and conditions\" link\n */\n @Prop() readonly termsCallback: () => Promise<void>;\n\n /**\n * Callback executed when the user clicks on the \"privacy policy\" link\n */\n @Prop() readonly privacyCallback: () => Promise<void>;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.el.style.setProperty(\n \"--switch-step-transtion-time\",\n this.#switchStepTransitionTime.toString() + \"ms\"\n );\n // Initialize values\n this.authStepInternal = this.authStep;\n this.teamsChanged(this.teams);\n }\n\n #authStepCallback = () => {\n if (this.authStep === \"signIn\") {\n this.signInCallback();\n } else if (this.authStep === \"selectUserTeam\") {\n this.#continueHandler();\n }\n };\n\n #continueHandler = async () => {\n await this.continueCallback(this.#chSelectTeamEl.value);\n };\n\n #renderStepHeader = (): HTMLElement => {\n return (\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>{this.#componentLocale[this.authStepInternal].titlePart1}</span>\n <span>{this.#componentLocale[this.authStepInternal].titlePart2}</span>\n </h2>\n </header>\n );\n };\n\n #renderStepFooter = (): HTMLElement => {\n const signInDisabled =\n this.authStep === \"signIn\" &&\n this.termsConfirmationRequired &&\n !this.termsAndConditionsAccepted;\n return (\n <div>\n <button\n class=\"button-primary main-btn\"\n onClick={this.#authStepCallback}\n disabled={signInDisabled}\n >\n {this.#componentLocale[this.authStepInternal].buttonCaption}\n </button>\n </div>\n );\n };\n\n #evaluateTermsConditionsAndPrivacyAccepted = () => {\n const termsAndConditionsAccepted =\n this.#termsAndConditionsCheckboxEl.value === CHECKED_VALUE;\n const privacyPolicyAccepted =\n this.#privacyPolicyCheckboxEl.value === CHECKED_VALUE;\n this.termsAndConditionsAccepted =\n termsAndConditionsAccepted && privacyPolicyAccepted;\n };\n\n #termsAndConditionsClickedHandler = (event: MouseEvent) => {\n event.preventDefault();\n this.termsCallback();\n };\n\n #privacyPolicyClickedHandler = (event: MouseEvent) => {\n event.preventDefault();\n this.privacyCallback();\n };\n\n #evaluateStepRender = () => {\n if (this.authStepInternal === \"signIn\") {\n return [\n this.#renderStepHeader(),\n <p class=\"text-body-regular-l\">\n {this.#componentLocale.signIn.description}\n </p>,\n this.termsConfirmationRequired && (\n <div class=\"field-group\">\n <div\n // terms and conditions\n class=\"field field-inline\"\n >\n <ch-checkbox\n checkedValue={CHECKED_VALUE}\n id=\"terms-and-conditions\"\n class=\"checkbox\"\n ref={(el: HTMLChCheckboxElement) =>\n (this.#termsAndConditionsCheckboxEl =\n el as HTMLChCheckboxElement)\n }\n onInput={this.#evaluateTermsConditionsAndPrivacyAccepted}\n ></ch-checkbox>\n <label\n htmlFor=\"terms-and-conditions\"\n class=\"label label-agreement\"\n >\n {this.#componentLocale.agreement.termsAndConditionsLabel}\n <span\n class={{ hyperlink: !!this.termsCallback }}\n onClick={\n this.termsCallback && this.#termsAndConditionsClickedHandler\n }\n >\n {this.#componentLocale.agreement.termsAndConditionsLink}\n </span>\n </label>\n </div>\n <div\n // privacy policy\n class=\"field field-inline\"\n >\n <ch-checkbox\n checkedValue={CHECKED_VALUE}\n id=\"privacy-policy\"\n class=\"checkbox\"\n ref={(el: HTMLChCheckboxElement) =>\n (this.#privacyPolicyCheckboxEl = el as HTMLChCheckboxElement)\n }\n onInput={this.#evaluateTermsConditionsAndPrivacyAccepted}\n ></ch-checkbox>\n <label htmlFor=\"privacy-policy\" class=\"label label-agreement\">\n {this.#componentLocale.agreement.privacyAndPolicyLabel}\n <span\n class={{ hyperlink: !!this.privacyCallback }}\n onClick={\n this.privacyCallback && this.#privacyPolicyClickedHandler\n }\n >\n {this.#componentLocale.agreement.privacyAndPolicyLink}\n </span>\n </label>\n </div>\n </div>\n ),\n\n this.#renderStepFooter()\n ];\n } else if (\n this.authStepInternal === \"fetchUserTeams\" ||\n this.authStepInternal === \"settingUpSession\"\n ) {\n const loaderTitle =\n this.authStepInternal === \"fetchUserTeams\"\n ? this.#componentLocale.loader.fetchingTeamsTitle\n : this.#componentLocale.loader.settingUpSessionTitle;\n const loaderDescription =\n this.authStepInternal === \"fetchUserTeams\"\n ? this.#componentLocale.loader.fetchingTeamsDescription\n : this.#componentLocale.loader.settingUpDescription;\n return (\n <gx-ide-loader\n show\n loaderTitle={loaderTitle}\n description={loaderDescription}\n ></gx-ide-loader>\n );\n } else if (this.authStepInternal === \"selectUserTeam\") {\n return [\n this.#renderStepHeader(),\n <div class=\"slide__select-team-description\">\n <p class=\"text-body-highlighted-l\">\n {this.#componentLocale.selectUserTeam.infoMessage}\n </p>\n </div>,\n <div class=\"field-group\">\n <div class=\"field field-block\">\n <label htmlFor=\"teams\">\n {this.#componentLocale.selectUserTeam.label}\n </label>\n <ch-combo-box-render\n id=\"teams\"\n accessibleName=\"Teams\"\n class=\"combo-box teams-list\"\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 this.#renderStepFooter()\n ];\n }\n };\n\n render() {\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.#evaluateStepRender()}\n </div>\n </div>\n </section>\n </Host>\n );\n }\n}\n\nexport type AuthStep =\n | \"signIn\"\n | \"fetchUserTeams\"\n | \"selectUserTeam\"\n | \"settingUpSession\";\n\nexport type TeamData = {\n id: string;\n name: string;\n};\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface GxIdeWwAttributes extends Components.GxIdeWwAttributes, HTMLElement {}
|
|
4
|
+
export const GxIdeWwAttributes: {
|
|
5
|
+
prototype: GxIdeWwAttributes;
|
|
6
|
+
new (): GxIdeWwAttributes;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { g as getIconPath } from './MERCURY_ASSETS.js';
|
|
3
|
+
import { c as config } from './config.js';
|
|
4
|
+
import { L as Locale } from './locale.js';
|
|
5
|
+
import { d as defineCustomElement$4 } from './gx-ide-empty-state2.js';
|
|
6
|
+
import { d as defineCustomElement$3 } from './entity-selector.js';
|
|
7
|
+
import { d as defineCustomElement$2 } from './ide-loader.js';
|
|
8
|
+
|
|
9
|
+
const mapOptionsToComboBoxItemModel = (options) => {
|
|
10
|
+
return options.map(option => {
|
|
11
|
+
var _a;
|
|
12
|
+
return {
|
|
13
|
+
value: option.id,
|
|
14
|
+
caption: option.label,
|
|
15
|
+
startImgSrc: (_a = option.iconName) !== null && _a !== void 0 ? _a : ""
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const wwAttributesCss = "@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host{display:grid;block-size:100%;overflow:auto;grid-template-rows:max-content 1fr max-content}.section{display:contents}.header{grid-template:\"name type\" max-content \"object object\" max-content;grid-template-columns:1fr 1fr}.name__field{grid-area:name}.name__label{inline-size:40px}.type__field{grid-area:type}.more__btn{grid-area:more;inline-size:64px}.object-selector__field{grid-area:object}.main{overflow:auto}ch-tabular-grid.tabular-grid--empty::part(main){overflow:hidden}ch-tabular-grid-rowset-empty{position:relative}.tabular-grid-row ch-tabular-grid-cell:is(:nth-child(2),:nth-child(3),:nth-child(4)){padding-block:var(--grid-cell__padding-block);padding-inline:var(--grid-cell__padding-inline);align-items:start;justify-content:start;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.matching-attributes{margin:0}";
|
|
21
|
+
|
|
22
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
23
|
+
if (kind === "a" && !f)
|
|
24
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
25
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
26
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
27
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
28
|
+
};
|
|
29
|
+
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
30
|
+
if (kind === "m")
|
|
31
|
+
throw new TypeError("Private method is not writable");
|
|
32
|
+
if (kind === "a" && !f)
|
|
33
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
34
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
35
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
36
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
37
|
+
};
|
|
38
|
+
var _GxIdeWWAttributes__componentLocale, _GxIdeWWAttributes_chGridEl, _GxIdeWWAttributes_contextMenuCallbackHandler, _GxIdeWWAttributes_deleteSelectionCallbackHandle, _GxIdeWWAttributes_deselectAll, _GxIdeWWAttributes_getAttributes, _GxIdeWWAttributes_listenChanges, _GxIdeWWAttributes_openSelectionCallbackHandle, _GxIdeWWAttributes_entityCallbackHandler, _GxIdeWWAttributes_entityValueChangedHandler, _GxIdeWWAttributes_renderAttributesGrid, _GxIdeWWAttributes_evaluateAttributesGridContent, _GxIdeWWAttributes_renderFilter, _GxIdeWWAttributes_selectAll, _GxIdeWWAttributes_nameInputHandler, _GxIdeWWAttributes_typeInputHandler;
|
|
39
|
+
const CSS_BUNDLES = [
|
|
40
|
+
"resets/box-sizing",
|
|
41
|
+
"components/button",
|
|
42
|
+
"components/edit",
|
|
43
|
+
"components/combo-box",
|
|
44
|
+
"components/tabular-grid",
|
|
45
|
+
"components/icon",
|
|
46
|
+
"utils/form",
|
|
47
|
+
"utils/layout",
|
|
48
|
+
"utils/spacing",
|
|
49
|
+
"chameleon/scrollbar"
|
|
50
|
+
];
|
|
51
|
+
const FILTER_ICON = getIconPath({
|
|
52
|
+
category: "window-tools",
|
|
53
|
+
name: "filter",
|
|
54
|
+
colorType: "on-elevation"
|
|
55
|
+
});
|
|
56
|
+
const GxIdeWWAttributes = /*@__PURE__*/ proxyCustomElement(class GxIdeWWAttributes extends HTMLElement {
|
|
57
|
+
constructor() {
|
|
58
|
+
super();
|
|
59
|
+
this.__registerHost();
|
|
60
|
+
this.__attachShadow();
|
|
61
|
+
/**
|
|
62
|
+
* Component hard-coded strings translations.
|
|
63
|
+
*/
|
|
64
|
+
_GxIdeWWAttributes__componentLocale.set(this, void 0);
|
|
65
|
+
/* References needed to collect data */
|
|
66
|
+
_GxIdeWWAttributes_chGridEl.set(this, void 0);
|
|
67
|
+
_GxIdeWWAttributes_contextMenuCallbackHandler.set(this, (ev) => {
|
|
68
|
+
this.contextMenuCallback({
|
|
69
|
+
selection: this.selectedAttributesIds,
|
|
70
|
+
clientX: ev.clientX,
|
|
71
|
+
clientY: ev.clientY
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
_GxIdeWWAttributes_deleteSelectionCallbackHandle.set(this, () => {
|
|
75
|
+
this.deleteSelectionCallback(this.selectedAttributesIds);
|
|
76
|
+
});
|
|
77
|
+
_GxIdeWWAttributes_deselectAll.set(this, () => {
|
|
78
|
+
__classPrivateFieldGet(this, _GxIdeWWAttributes_chGridEl, "f").selectAllRows(false);
|
|
79
|
+
});
|
|
80
|
+
_GxIdeWWAttributes_getAttributes.set(this, () => {
|
|
81
|
+
var _a;
|
|
82
|
+
this.loading = true;
|
|
83
|
+
const filters = {
|
|
84
|
+
name: this.name.trim(),
|
|
85
|
+
type: this.type,
|
|
86
|
+
object: (_a = this.object) === null || _a === void 0 ? void 0 : _a.id
|
|
87
|
+
};
|
|
88
|
+
this.loadCallback(filters).then((items) => {
|
|
89
|
+
var _a;
|
|
90
|
+
this.attributes = items;
|
|
91
|
+
if (((_a = this.selectedAttributesIds) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
92
|
+
this.selectedAttributesIds = [];
|
|
93
|
+
__classPrivateFieldGet(this, _GxIdeWWAttributes_deselectAll, "f").call(this);
|
|
94
|
+
}
|
|
95
|
+
this.loading = false;
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
_GxIdeWWAttributes_listenChanges.set(this, () => {
|
|
99
|
+
// for grid selection
|
|
100
|
+
__classPrivateFieldGet(this, _GxIdeWWAttributes_chGridEl, "f").addEventListener("selectionChanged", (ev) => {
|
|
101
|
+
this.selectedAttributesIds = ev.detail.rowsId;
|
|
102
|
+
this.selectionChangeCallback(this.selectedAttributesIds);
|
|
103
|
+
});
|
|
104
|
+
__classPrivateFieldGet(this, _GxIdeWWAttributes_chGridEl, "f").addEventListener("contextmenu", (ev) => {
|
|
105
|
+
ev.preventDefault();
|
|
106
|
+
ev.stopPropagation();
|
|
107
|
+
__classPrivateFieldGet(this, _GxIdeWWAttributes_contextMenuCallbackHandler, "f").call(this, ev);
|
|
108
|
+
});
|
|
109
|
+
__classPrivateFieldGet(this, _GxIdeWWAttributes_chGridEl, "f").addEventListener("rowDoubleClicked", () => {
|
|
110
|
+
__classPrivateFieldGet(this, _GxIdeWWAttributes_openSelectionCallbackHandle, "f").call(this);
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
_GxIdeWWAttributes_openSelectionCallbackHandle.set(this, () => {
|
|
114
|
+
this.openSelectionCallback(this.selectedAttributesIds);
|
|
115
|
+
});
|
|
116
|
+
_GxIdeWWAttributes_entityCallbackHandler.set(this, async () => {
|
|
117
|
+
const result = await this.objectActionCallback();
|
|
118
|
+
this.object = {
|
|
119
|
+
id: result.id,
|
|
120
|
+
name: result.name,
|
|
121
|
+
iconSrc: result.iconSrc
|
|
122
|
+
};
|
|
123
|
+
return new Promise(resolve => {
|
|
124
|
+
resolve(null);
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
_GxIdeWWAttributes_entityValueChangedHandler.set(this, (event) => {
|
|
128
|
+
this.object = event.detail;
|
|
129
|
+
__classPrivateFieldGet(this, _GxIdeWWAttributes_getAttributes, "f").call(this);
|
|
130
|
+
});
|
|
131
|
+
_GxIdeWWAttributes_renderAttributesGrid.set(this, () => {
|
|
132
|
+
var _a;
|
|
133
|
+
const tabularGridEmpty = ((_a = this.attributes) === null || _a === void 0 ? void 0 : _a.length) === 0 || !this.attributes;
|
|
134
|
+
return (h("ch-tabular-grid", { class: {
|
|
135
|
+
"tabular-grid": true,
|
|
136
|
+
"tabular-grid--empty": tabularGridEmpty,
|
|
137
|
+
"main": true
|
|
138
|
+
}, ref: (el) => (__classPrivateFieldSet(this, _GxIdeWWAttributes_chGridEl, el, "f")), "row-selection-mode": "multiple", part: "ch-grid-attributes" }, h("ch-tabular-grid-columnset", { class: "tabular-grid-column-set" }, h("ch-tabular-grid-column", { "column-name": "", "column-name-position": "text", settingable: false, size: config.tabularGrid.colSize.maxContent, class: "tabular-grid-column" }), h("ch-tabular-grid-column", { "column-name": __classPrivateFieldGet(this, _GxIdeWWAttributes__componentLocale, "f").tableHead.name, "column-name-position": "text", size: config.tabularGrid.colSize.auto, class: "tabular-grid-column", settingable: false }), h("ch-tabular-grid-column", { "column-name": __classPrivateFieldGet(this, _GxIdeWWAttributes__componentLocale, "f").tableHead.type, "column-name-position": "text", class: "tabular-grid-column", size: config.tabularGrid.colSize.auto, settingable: false }), h("ch-tabular-grid-column", { "column-name": __classPrivateFieldGet(this, _GxIdeWWAttributes__componentLocale, "f").tableHead.description, "column-name-position": "text", size: config.tabularGrid.colSize.auto, class: "tabular-grid-column", settingable: false })), __classPrivateFieldGet(this, _GxIdeWWAttributes_evaluateAttributesGridContent, "f").call(this)));
|
|
139
|
+
});
|
|
140
|
+
_GxIdeWWAttributes_evaluateAttributesGridContent.set(this, () => {
|
|
141
|
+
if (this.loading) {
|
|
142
|
+
return (h("ch-tabular-grid-rowset", { class: "tabular-grid-rowset" }, h("ch-tabular-grid-rowset-empty", null, h("gx-ide-loader", { loaderTitle: __classPrivateFieldGet(this, _GxIdeWWAttributes__componentLocale, "f").loader.title, description: __classPrivateFieldGet(this, _GxIdeWWAttributes__componentLocale, "f").loader.description, show: true }))));
|
|
143
|
+
}
|
|
144
|
+
else if (this.attributes.length) {
|
|
145
|
+
return (h("ch-tabular-grid-rowset", { class: "tabular-grid-rowset" }, this.attributes.map((attr) => (h("ch-tabular-grid-row", { class: "tabular-grid-row", rowid: attr.id }, h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-image", { class: "icon-sm", src: attr.icon })), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, attr.name), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, attr.type), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, attr.description))))));
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
// filter returned none
|
|
149
|
+
return (h("ch-tabular-grid-rowset", { class: "tabular-grid-rowset" }, h("ch-tabular-grid-rowset-empty", null, h("gx-ide-empty-state", { stateIconSrc: FILTER_ICON, stateTitle: __classPrivateFieldGet(this, _GxIdeWWAttributes__componentLocale, "f").emptyStateTitle, isAnimated: true }))));
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
_GxIdeWWAttributes_renderFilter.set(this, () => {
|
|
153
|
+
var _a;
|
|
154
|
+
return (h("header", { class: "header field-group control-header-with-border spacing-body" }, h("div", { class: "field field-inline name__field" }, h("label", { class: "label name__label", htmlFor: "name" }, __classPrivateFieldGet(this, _GxIdeWWAttributes__componentLocale, "f").filter.name), h("ch-edit", {
|
|
155
|
+
// Name
|
|
156
|
+
id: "name", class: "input", value: this.name, debounce: 300, onInput: __classPrivateFieldGet(this, _GxIdeWWAttributes_nameInputHandler, "f"), part: "filter-name"
|
|
157
|
+
})), h("div", { class: "field field-inline type__field" }, h("label", { class: "label", htmlFor: "type" }, __classPrivateFieldGet(this, _GxIdeWWAttributes__componentLocale, "f").filter.type), h("ch-combo-box-render", {
|
|
158
|
+
// Type
|
|
159
|
+
id: "type", class: "combo-box", disabled: !this.types, value: this.type, model: mapOptionsToComboBoxItemModel((_a = this.types) !== null && _a !== void 0 ? _a : []), part: "filter-type", onInput: __classPrivateFieldGet(this, _GxIdeWWAttributes_typeInputHandler, "f")
|
|
160
|
+
})), h("div", { class: "field field-inline object-selector__field" }, h("label", { class: "label", htmlFor: "object-selector" }, __classPrivateFieldGet(this, _GxIdeWWAttributes__componentLocale, "f").filter.object), h("gx-ide-entity-selector", {
|
|
161
|
+
// Object
|
|
162
|
+
id: "object-selector", value: this.object, labelPosition: "none", defaultValue: null, selectEntityCallback: __classPrivateFieldGet(this, _GxIdeWWAttributes_entityCallbackHandler, "f"), onValueChanged: __classPrivateFieldGet(this, _GxIdeWWAttributes_entityValueChangedHandler, "f"), part: "filter-module-folder"
|
|
163
|
+
}))));
|
|
164
|
+
});
|
|
165
|
+
_GxIdeWWAttributes_selectAll.set(this, () => {
|
|
166
|
+
__classPrivateFieldGet(this, _GxIdeWWAttributes_chGridEl, "f").selectAllRows();
|
|
167
|
+
});
|
|
168
|
+
_GxIdeWWAttributes_nameInputHandler.set(this, (e) => {
|
|
169
|
+
this.name = e.detail.trim();
|
|
170
|
+
__classPrivateFieldGet(this, _GxIdeWWAttributes_getAttributes, "f").call(this);
|
|
171
|
+
});
|
|
172
|
+
_GxIdeWWAttributes_typeInputHandler.set(this, (e) => {
|
|
173
|
+
this.type = e.detail;
|
|
174
|
+
__classPrivateFieldGet(this, _GxIdeWWAttributes_getAttributes, "f").call(this);
|
|
175
|
+
});
|
|
176
|
+
this.attributes = undefined;
|
|
177
|
+
this.selectedAttributesIds = [];
|
|
178
|
+
this.filterMore = false;
|
|
179
|
+
this.name = "";
|
|
180
|
+
this.loading = true;
|
|
181
|
+
this.object = undefined;
|
|
182
|
+
this.type = undefined;
|
|
183
|
+
this.contextMenuCallback = undefined;
|
|
184
|
+
this.deleteSelectionCallback = undefined;
|
|
185
|
+
this.loadCallback = undefined;
|
|
186
|
+
this.objectActionCallback = undefined;
|
|
187
|
+
this.objects = undefined;
|
|
188
|
+
this.openSelectionCallback = undefined;
|
|
189
|
+
this.selectionChangeCallback = undefined;
|
|
190
|
+
this.types = undefined;
|
|
191
|
+
}
|
|
192
|
+
async componentWillLoad() {
|
|
193
|
+
__classPrivateFieldSet(this, _GxIdeWWAttributes__componentLocale, await Locale.getComponentStrings(this.el), "f");
|
|
194
|
+
}
|
|
195
|
+
componentDidLoad() {
|
|
196
|
+
__classPrivateFieldGet(this, _GxIdeWWAttributes_listenChanges, "f").call(this);
|
|
197
|
+
this.type = this.types[0].id; // before #getAttributes
|
|
198
|
+
__classPrivateFieldGet(this, _GxIdeWWAttributes_getAttributes, "f").call(this);
|
|
199
|
+
}
|
|
200
|
+
keyDownHandler(eventInfo) {
|
|
201
|
+
if (document.activeElement === this.el) {
|
|
202
|
+
switch (eventInfo.key) {
|
|
203
|
+
case "Enter":
|
|
204
|
+
__classPrivateFieldGet(this, _GxIdeWWAttributes_openSelectionCallbackHandle, "f").call(this);
|
|
205
|
+
break;
|
|
206
|
+
case "Delete":
|
|
207
|
+
__classPrivateFieldGet(this, _GxIdeWWAttributes_deleteSelectionCallbackHandle, "f").call(this);
|
|
208
|
+
break;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Reloads the view, refreshing the filters and attributes table.
|
|
214
|
+
*/
|
|
215
|
+
async reload() {
|
|
216
|
+
this.name = "";
|
|
217
|
+
this.type = this.types[0].id;
|
|
218
|
+
this.object = null;
|
|
219
|
+
__classPrivateFieldGet(this, _GxIdeWWAttributes_getAttributes, "f").call(this);
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Validate necessary data input
|
|
223
|
+
*/
|
|
224
|
+
async validate() {
|
|
225
|
+
const isValid = true;
|
|
226
|
+
return isValid;
|
|
227
|
+
}
|
|
228
|
+
render() {
|
|
229
|
+
var _a, _b;
|
|
230
|
+
const btnDisabled = !this.attributes || this.attributes.length === 0;
|
|
231
|
+
const matchingAttributesLabel = ((_a = this.attributes) === null || _a === void 0 ? void 0 : _a.length) === 1
|
|
232
|
+
? __classPrivateFieldGet(this, _GxIdeWWAttributes__componentLocale, "f").matchingAttribute
|
|
233
|
+
: __classPrivateFieldGet(this, _GxIdeWWAttributes__componentLocale, "f").matchingAttributes;
|
|
234
|
+
const attributesLength = ((_b = this.attributes) === null || _b === void 0 ? void 0 : _b.length) || 0;
|
|
235
|
+
return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("section", { class: "section" }, __classPrivateFieldGet(this, _GxIdeWWAttributes_renderFilter, "f").call(this), __classPrivateFieldGet(this, _GxIdeWWAttributes_renderAttributesGrid, "f").call(this), h("footer", { class: "control-footer control-footer-with-border spacing-body-block-end spacing-body-inline control-footer-space-between" }, h("p", { class: "text-body-regular-s matching-attributes" }, `${attributesLength} ${matchingAttributesLabel}`), h("button", { id: "button-select-all", class: "button-primary", onClick: __classPrivateFieldGet(this, _GxIdeWWAttributes_selectAll, "f"), disabled: btnDisabled, part: "button button--select-all" }, __classPrivateFieldGet(this, _GxIdeWWAttributes__componentLocale, "f").footer.btnSelectAll)))));
|
|
236
|
+
}
|
|
237
|
+
static get assetsDirs() { return ["gx-ide-assets/ww-attributes"]; }
|
|
238
|
+
get el() { return this; }
|
|
239
|
+
static get style() { return wwAttributesCss; }
|
|
240
|
+
}, [1, "gx-ide-ww-attributes", {
|
|
241
|
+
"contextMenuCallback": [16],
|
|
242
|
+
"deleteSelectionCallback": [16],
|
|
243
|
+
"loadCallback": [16],
|
|
244
|
+
"objectActionCallback": [16],
|
|
245
|
+
"objects": [16],
|
|
246
|
+
"openSelectionCallback": [16],
|
|
247
|
+
"selectionChangeCallback": [16],
|
|
248
|
+
"types": [16],
|
|
249
|
+
"attributes": [32],
|
|
250
|
+
"selectedAttributesIds": [32],
|
|
251
|
+
"filterMore": [32],
|
|
252
|
+
"name": [32],
|
|
253
|
+
"loading": [32],
|
|
254
|
+
"object": [32],
|
|
255
|
+
"type": [32],
|
|
256
|
+
"reload": [64],
|
|
257
|
+
"validate": [64]
|
|
258
|
+
}, [[1, "keydown", "keyDownHandler"]]]);
|
|
259
|
+
_GxIdeWWAttributes__componentLocale = new WeakMap(), _GxIdeWWAttributes_chGridEl = new WeakMap(), _GxIdeWWAttributes_contextMenuCallbackHandler = new WeakMap(), _GxIdeWWAttributes_deleteSelectionCallbackHandle = new WeakMap(), _GxIdeWWAttributes_deselectAll = new WeakMap(), _GxIdeWWAttributes_getAttributes = new WeakMap(), _GxIdeWWAttributes_listenChanges = new WeakMap(), _GxIdeWWAttributes_openSelectionCallbackHandle = new WeakMap(), _GxIdeWWAttributes_entityCallbackHandler = new WeakMap(), _GxIdeWWAttributes_entityValueChangedHandler = new WeakMap(), _GxIdeWWAttributes_renderAttributesGrid = new WeakMap(), _GxIdeWWAttributes_evaluateAttributesGridContent = new WeakMap(), _GxIdeWWAttributes_renderFilter = new WeakMap(), _GxIdeWWAttributes_selectAll = new WeakMap(), _GxIdeWWAttributes_nameInputHandler = new WeakMap(), _GxIdeWWAttributes_typeInputHandler = new WeakMap();
|
|
260
|
+
function defineCustomElement$1() {
|
|
261
|
+
if (typeof customElements === "undefined") {
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
const components = ["gx-ide-ww-attributes", "gx-ide-empty-state", "gx-ide-entity-selector", "gx-ide-loader"];
|
|
265
|
+
components.forEach(tagName => { switch (tagName) {
|
|
266
|
+
case "gx-ide-ww-attributes":
|
|
267
|
+
if (!customElements.get(tagName)) {
|
|
268
|
+
customElements.define(tagName, GxIdeWWAttributes);
|
|
269
|
+
}
|
|
270
|
+
break;
|
|
271
|
+
case "gx-ide-empty-state":
|
|
272
|
+
if (!customElements.get(tagName)) {
|
|
273
|
+
defineCustomElement$4();
|
|
274
|
+
}
|
|
275
|
+
break;
|
|
276
|
+
case "gx-ide-entity-selector":
|
|
277
|
+
if (!customElements.get(tagName)) {
|
|
278
|
+
defineCustomElement$3();
|
|
279
|
+
}
|
|
280
|
+
break;
|
|
281
|
+
case "gx-ide-loader":
|
|
282
|
+
if (!customElements.get(tagName)) {
|
|
283
|
+
defineCustomElement$2();
|
|
284
|
+
}
|
|
285
|
+
break;
|
|
286
|
+
} });
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
const GxIdeWwAttributes = GxIdeWWAttributes;
|
|
290
|
+
const defineCustomElement = defineCustomElement$1;
|
|
291
|
+
|
|
292
|
+
export { GxIdeWwAttributes, defineCustomElement };
|
|
293
|
+
|
|
294
|
+
//# sourceMappingURL=gx-ide-ww-attributes.js.map
|