@genexus/genexus-ide-ui 3.2.10 → 3.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-db-properties-configurator.cjs.entry.js +165 -0
  3. package/dist/cjs/gx-ide-db-properties-configurator.cjs.entry.js.map +1 -0
  4. package/dist/cjs/gx-ide-select-team-or-org.cjs.entry.js +128 -0
  5. package/dist/cjs/gx-ide-select-team-or-org.cjs.entry.js.map +1 -0
  6. package/dist/cjs/gx-ide-sign-in-organization.cjs.entry.js +187 -0
  7. package/dist/cjs/gx-ide-sign-in-organization.cjs.entry.js.map +1 -0
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/collection/collection-manifest.json +3 -2
  10. package/dist/collection/components/db-properties-configurator/db-properties-configurator.css +127 -0
  11. package/dist/collection/components/db-properties-configurator/db-properties-configurator.js +250 -0
  12. package/dist/collection/components/db-properties-configurator/db-properties-configurator.js.map +1 -0
  13. package/dist/collection/components/db-properties-configurator/gx-ide-assets/db-properties-configurator/langs/db-properties-configurator.lang.en.json +24 -0
  14. package/dist/collection/components/db-properties-configurator/gx-ide-assets/db-properties-configurator/langs/db-properties-configurator.lang.ja.json +24 -0
  15. package/dist/collection/components/db-properties-configurator/gx-ide-assets/db-properties-configurator/langs/db-properties-configurator.lang.zh.json +24 -0
  16. package/dist/collection/components/select-team-or-org/gx-ide-assets/select-team-or-org/langs/select-team-or-org.lang.en.json +18 -0
  17. package/dist/collection/components/select-team-or-org/gx-ide-assets/select-team-or-org/langs/select-team-or-org.lang.ja.json +18 -0
  18. package/dist/collection/components/select-team-or-org/gx-ide-assets/select-team-or-org/langs/select-team-or-org.lang.zh.json +18 -0
  19. package/dist/collection/components/select-team-or-org/helpers.js +9 -0
  20. package/dist/collection/components/select-team-or-org/helpers.js.map +1 -0
  21. package/dist/collection/components/{select-user-team/select-user-team.css → select-team-or-org/select-team-or-org.css} +7 -4
  22. package/dist/collection/components/select-team-or-org/select-team-or-org.js +220 -0
  23. package/dist/collection/components/select-team-or-org/select-team-or-org.js.map +1 -0
  24. package/dist/{genexus-ide-ui/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.en.json → collection/components/sign-in-organization/gx-ide-assets/sign-in-organization/langs/sign-in-organization.lang.en.json} +5 -5
  25. package/dist/{genexus-ide-ui/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.ja.json → collection/components/sign-in-organization/gx-ide-assets/sign-in-organization/langs/sign-in-organization.lang.ja.json} +5 -5
  26. package/dist/collection/components/{sign-in-team/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.en.json → sign-in-organization/gx-ide-assets/sign-in-organization/langs/sign-in-organization.lang.zh.json} +5 -5
  27. package/dist/collection/components/sign-in-organization/helpers.js +10 -0
  28. package/dist/collection/components/sign-in-organization/helpers.js.map +1 -0
  29. package/dist/collection/components/{sign-in-team/sign-in-team.js → sign-in-organization/sign-in-organization.js} +72 -72
  30. package/dist/collection/components/sign-in-organization/sign-in-organization.js.map +1 -0
  31. package/dist/collection/testing/locale.e2e.js +3 -2
  32. package/dist/collection/testing/locale.e2e.js.map +1 -1
  33. package/dist/components/gx-ide-db-properties-configurator.d.ts +11 -0
  34. package/dist/components/gx-ide-db-properties-configurator.js +183 -0
  35. package/dist/components/gx-ide-db-properties-configurator.js.map +1 -0
  36. package/dist/components/gx-ide-select-team-or-org.d.ts +11 -0
  37. package/dist/components/gx-ide-select-team-or-org.js +157 -0
  38. package/dist/components/gx-ide-select-team-or-org.js.map +1 -0
  39. package/dist/components/gx-ide-sign-in-organization.d.ts +11 -0
  40. package/dist/components/gx-ide-sign-in-organization.js +221 -0
  41. package/dist/components/gx-ide-sign-in-organization.js.map +1 -0
  42. package/dist/esm/genexus-ide-ui.js +1 -1
  43. package/dist/esm/gx-ide-db-properties-configurator.entry.js +161 -0
  44. package/dist/esm/gx-ide-db-properties-configurator.entry.js.map +1 -0
  45. package/dist/esm/gx-ide-select-team-or-org.entry.js +124 -0
  46. package/dist/esm/gx-ide-select-team-or-org.entry.js.map +1 -0
  47. package/dist/esm/gx-ide-sign-in-organization.entry.js +183 -0
  48. package/dist/esm/gx-ide-sign-in-organization.entry.js.map +1 -0
  49. package/dist/esm/loader.js +1 -1
  50. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  51. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  52. package/dist/genexus-ide-ui/gx-ide-assets/db-properties-configurator/langs/db-properties-configurator.lang.en.json +24 -0
  53. package/dist/genexus-ide-ui/gx-ide-assets/db-properties-configurator/langs/db-properties-configurator.lang.ja.json +24 -0
  54. package/dist/genexus-ide-ui/gx-ide-assets/db-properties-configurator/langs/db-properties-configurator.lang.zh.json +24 -0
  55. package/dist/genexus-ide-ui/gx-ide-assets/select-team-or-org/langs/select-team-or-org.lang.en.json +18 -0
  56. package/dist/genexus-ide-ui/gx-ide-assets/select-team-or-org/langs/select-team-or-org.lang.ja.json +18 -0
  57. package/dist/genexus-ide-ui/gx-ide-assets/select-team-or-org/langs/select-team-or-org.lang.zh.json +18 -0
  58. package/dist/genexus-ide-ui/gx-ide-assets/{sign-in-team/langs/sign-in-team.lang.zh.json → sign-in-organization/langs/sign-in-organization.lang.en.json} +5 -5
  59. package/dist/{collection/components/sign-in-team/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.ja.json → genexus-ide-ui/gx-ide-assets/sign-in-organization/langs/sign-in-organization.lang.ja.json} +5 -5
  60. package/dist/{collection/components/sign-in-team/gx-ide-assets/sign-in-team/langs/sign-in-team.lang.zh.json → genexus-ide-ui/gx-ide-assets/sign-in-organization/langs/sign-in-organization.lang.zh.json} +5 -5
  61. package/dist/genexus-ide-ui/{p-1d44dd0a.entry.js → p-15b1c9be.entry.js} +72 -72
  62. package/dist/genexus-ide-ui/p-15b1c9be.entry.js.map +1 -0
  63. package/dist/genexus-ide-ui/p-2129d0d2.entry.js +164 -0
  64. package/dist/genexus-ide-ui/p-2129d0d2.entry.js.map +1 -0
  65. package/dist/genexus-ide-ui/p-e759cfdb.entry.js +281 -0
  66. package/dist/genexus-ide-ui/p-e759cfdb.entry.js.map +1 -0
  67. package/dist/types/components/db-properties-configurator/db-properties-configurator.d.ts +50 -0
  68. package/dist/types/components/select-team-or-org/helpers.d.ts +3 -0
  69. package/dist/types/components/select-team-or-org/select-team-or-org.d.ts +38 -0
  70. package/dist/types/components/sign-in-organization/helpers.d.ts +3 -0
  71. package/dist/types/components/{sign-in-team/sign-in-team.d.ts → sign-in-organization/sign-in-organization.d.ts} +8 -8
  72. package/dist/types/components.d.ts +161 -106
  73. package/package.json +1 -1
  74. package/dist/cjs/gx-ide-select-user-team.cjs.entry.js +0 -121
  75. package/dist/cjs/gx-ide-select-user-team.cjs.entry.js.map +0 -1
  76. package/dist/cjs/gx-ide-sign-in-team.cjs.entry.js +0 -187
  77. package/dist/cjs/gx-ide-sign-in-team.cjs.entry.js.map +0 -1
  78. package/dist/collection/components/select-user-team/gx-ide-assets/select-user-team/langs/select-user-team.lang.en.json +0 -10
  79. package/dist/collection/components/select-user-team/gx-ide-assets/select-user-team/langs/select-user-team.lang.ja.json +0 -10
  80. package/dist/collection/components/select-user-team/gx-ide-assets/select-user-team/langs/select-user-team.lang.zh.json +0 -10
  81. package/dist/collection/components/select-user-team/helpers.js +0 -9
  82. package/dist/collection/components/select-user-team/helpers.js.map +0 -1
  83. package/dist/collection/components/select-user-team/select-user-team.js +0 -189
  84. package/dist/collection/components/select-user-team/select-user-team.js.map +0 -1
  85. package/dist/collection/components/sign-in-team/helpers.js +0 -10
  86. package/dist/collection/components/sign-in-team/helpers.js.map +0 -1
  87. package/dist/collection/components/sign-in-team/sign-in-team.js.map +0 -1
  88. package/dist/components/gx-ide-select-user-team.d.ts +0 -11
  89. package/dist/components/gx-ide-select-user-team.js +0 -149
  90. package/dist/components/gx-ide-select-user-team.js.map +0 -1
  91. package/dist/components/gx-ide-sign-in-team.d.ts +0 -11
  92. package/dist/components/gx-ide-sign-in-team.js +0 -221
  93. package/dist/components/gx-ide-sign-in-team.js.map +0 -1
  94. package/dist/esm/gx-ide-select-user-team.entry.js +0 -117
  95. package/dist/esm/gx-ide-select-user-team.entry.js.map +0 -1
  96. package/dist/esm/gx-ide-sign-in-team.entry.js +0 -183
  97. package/dist/esm/gx-ide-sign-in-team.entry.js.map +0 -1
  98. package/dist/genexus-ide-ui/gx-ide-assets/select-user-team/langs/select-user-team.lang.en.json +0 -10
  99. package/dist/genexus-ide-ui/gx-ide-assets/select-user-team/langs/select-user-team.lang.ja.json +0 -10
  100. package/dist/genexus-ide-ui/gx-ide-assets/select-user-team/langs/select-user-team.lang.zh.json +0 -10
  101. package/dist/genexus-ide-ui/p-1d44dd0a.entry.js.map +0 -1
  102. package/dist/genexus-ide-ui/p-2317ffcb.entry.js +0 -156
  103. package/dist/genexus-ide-ui/p-2317ffcb.entry.js.map +0 -1
  104. package/dist/types/components/select-user-team/helpers.d.ts +0 -3
  105. package/dist/types/components/select-user-team/select-user-team.d.ts +0 -32
  106. package/dist/types/components/sign-in-team/helpers.d.ts +0 -3
  107. /package/dist/collection/components/{select-user-team/gx-ide-assets/select-user-team → select-team-or-org/gx-ide-assets/select-team-or-org}/images/copyrights-illustration.png +0 -0
  108. /package/dist/collection/components/{select-user-team/gx-ide-assets/select-user-team → select-team-or-org/gx-ide-assets/select-team-or-org}/images/icon-next.svg +0 -0
  109. /package/dist/collection/components/{sign-in-team/gx-ide-assets/sign-in-team → sign-in-organization/gx-ide-assets/sign-in-organization}/images/copyrights-illustration.png +0 -0
  110. /package/dist/collection/components/{sign-in-team/gx-ide-assets/sign-in-team → sign-in-organization/gx-ide-assets/sign-in-organization}/images/icon-next.svg +0 -0
  111. /package/dist/collection/components/{sign-in-team/sign-in-team.css → sign-in-organization/sign-in-organization.css} +0 -0
  112. /package/dist/genexus-ide-ui/gx-ide-assets/{select-user-team → select-team-or-org}/images/copyrights-illustration.png +0 -0
  113. /package/dist/genexus-ide-ui/gx-ide-assets/{select-user-team → select-team-or-org}/images/icon-next.svg +0 -0
  114. /package/dist/genexus-ide-ui/gx-ide-assets/{sign-in-team → sign-in-organization}/images/copyrights-illustration.png +0 -0
  115. /package/dist/genexus-ide-ui/gx-ide-assets/{sign-in-team → sign-in-organization}/images/icon-next.svg +0 -0
@@ -0,0 +1,161 @@
1
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-b153bfd0.js';
2
+ import { g as getIconPath } from './assets-manager-7d6fc08f.js';
3
+ import './mer-animated-dots-7cbae6ef.js';
4
+ import 'lit';
5
+ import 'lit/directives/when.js';
6
+ import 'lit/directives/if-defined.js';
7
+ import { L as Locale } from './locale-e5107fad.js';
8
+ import { c as config } from './config-5a775b7a.js';
9
+
10
+ const dbPropertiesConfiguratorCss = "button.button-secondary{border-color:var(--color-border-neutral-default)}:host{display:grid;block-size:100%;overflow:hidden;grid-template-rows:max-content 1fr max-content;background-color:var(--color-accent-surface-elevation-1);color:var(--color-text-neutral-default)}.section{display:contents}.hero{display:flex;align-items:flex-start;gap:var(--spacing-gap-xl);padding-block:var(--spacing-padding-l);padding-inline:var(--spacing-padding-l);border-block-end:var(--size-1) solid var(--color-border-surface-on-elevation-1)}.hero__text{flex:1;min-inline-size:0}.hero__title{margin:0;color:var(--color-text-neutral-default)}.hero__description{margin-block:var(--spacing-gap-xs) 0;margin-inline:0;color:var(--color-text-neutral-disabled);text-wrap:pretty}.hero__badge{flex:none;display:grid;place-items:center;inline-size:44px;block-size:44px;border-radius:var(--border-radius-m);background-color:var(--color-accent-item-hover);color:var(--color-icon-primary-default)}.main{overflow:auto;display:flex;flex-direction:column;gap:var(--spacing-gap-xxl);padding-block:var(--spacing-padding-l);padding-inline:var(--spacing-padding-l)}.field-section{display:flex;flex-direction:column;gap:var(--spacing-gap-l)}.field-section+.field-section{padding-block-start:var(--spacing-padding-xl);border-block-start:var(--size-1) solid var(--color-border-surface-on-elevation-1)}.field-section__head{display:flex;align-items:baseline;gap:var(--spacing-gap-m)}.field-section__title{font-family:var(--font-family-body);font-weight:var(--font-style-semi-bold);font-size:var(--font-size-caption-m);letter-spacing:0.06em;text-transform:uppercase;color:var(--color-text-neutral-neutral)}.fields{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:var(--spacing-gap-l)}.field--full{grid-column:1/-1}.field--checkbox{display:flex;flex-direction:column;gap:var(--spacing-gap-xs)}.field--checkbox .field__row{display:flex;align-items:center;gap:var(--spacing-gap-xs)}.field--checkbox .label{margin:0;cursor:pointer}.field--checkbox .field__hint{margin:0;margin-inline-start:calc(var(--spacing-gap-m) + var(--spacing-gap-m));color:var(--color-text-neutral-disabled);text-wrap:pretty}.footer{padding-block:var(--spacing-padding-m);padding-inline:var(--spacing-padding-l)}";
11
+
12
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13
+ if (kind === "a" && !f)
14
+ throw new TypeError("Private accessor was defined without a getter");
15
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
16
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
17
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
18
+ };
19
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
20
+ if (kind === "m")
21
+ throw new TypeError("Private method is not writable");
22
+ if (kind === "a" && !f)
23
+ throw new TypeError("Private accessor was defined without a setter");
24
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
25
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
26
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
27
+ };
28
+ var _GxIdeDbPropertiesConfigurator_componentLocale, _GxIdeDbPropertiesConfigurator_getValue, _GxIdeDbPropertiesConfigurator_hasPendingRequired, _GxIdeDbPropertiesConfigurator_buildComboModel, _GxIdeDbPropertiesConfigurator_isAuthField, _GxIdeDbPropertiesConfigurator_hasTrustedConnection, _GxIdeDbPropertiesConfigurator_valueChangeHandler, _GxIdeDbPropertiesConfigurator_cancelButtonClickedHandler, _GxIdeDbPropertiesConfigurator_confirmButtonClickedHandler, _GxIdeDbPropertiesConfigurator_renderControl, _GxIdeDbPropertiesConfigurator_renderField, _GxIdeDbPropertiesConfigurator_renderSection;
29
+ const CSS_BUNDLES = [
30
+ "resets/box-sizing",
31
+ "components/button",
32
+ "components/combo-box",
33
+ "components/edit",
34
+ "components/icon",
35
+ "utils/form",
36
+ "utils/layout",
37
+ "utils/typography",
38
+ "utils/spacing",
39
+ "chameleon/scrollbar"
40
+ ];
41
+ const DATABASE_ICON = getIconPath({
42
+ category: "system",
43
+ name: "database",
44
+ colorType: "primary"
45
+ });
46
+ /**
47
+ * Name of the property that toggles integrated security. Its presence in
48
+ * `properties` is what drives the rendering of the Authentication section.
49
+ */
50
+ const TRUSTED_CONNECTION = "TRUSTED_CONNECTION";
51
+ const USER_ID = "USER_ID";
52
+ const USER_PASSWORD = "USER_PASSWORD";
53
+ /** Category that groups the authentication-related fields. */
54
+ const AUTH_CATEGORY = "authentication";
55
+ const GxIdeDbPropertiesConfigurator = class {
56
+ constructor(hostRef) {
57
+ registerInstance(this, hostRef);
58
+ // eslint-disable-next-line @stencil-community/own-props-must-be-private
59
+ _GxIdeDbPropertiesConfigurator_componentLocale.set(this, void 0);
60
+ _GxIdeDbPropertiesConfigurator_getValue.set(this, (field) => { var _a; return (_a = field.value) !== null && _a !== void 0 ? _a : ""; });
61
+ _GxIdeDbPropertiesConfigurator_hasPendingRequired.set(this, () => {
62
+ var _a;
63
+ return ((_a = this.properties) !== null && _a !== void 0 ? _a : []).some(field => field.missing && __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_getValue, "f").call(this, field).trim() === "");
64
+ });
65
+ _GxIdeDbPropertiesConfigurator_buildComboModel.set(this, (field) => { var _a; return ((_a = field.standardValues) !== null && _a !== void 0 ? _a : []).map(value => ({ value, caption: value })); });
66
+ _GxIdeDbPropertiesConfigurator_isAuthField.set(this, (field) => {
67
+ var _a;
68
+ return field.name === TRUSTED_CONNECTION ||
69
+ field.name === USER_ID ||
70
+ field.name === USER_PASSWORD ||
71
+ ((_a = field.category) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === AUTH_CATEGORY;
72
+ });
73
+ /** Whether the host sent the TRUSTED_CONNECTION property. Only then is the
74
+ * Authentication section rendered. */
75
+ _GxIdeDbPropertiesConfigurator_hasTrustedConnection.set(this, () => { var _a; return ((_a = this.properties) !== null && _a !== void 0 ? _a : []).some(field => field.name === TRUSTED_CONNECTION); });
76
+ _GxIdeDbPropertiesConfigurator_valueChangeHandler.set(this, (name) => (event) => {
77
+ var _a, _b;
78
+ const detail = event.detail;
79
+ const value = typeof detail === "string"
80
+ ? detail
81
+ : ((_b = (_a = event.target) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "");
82
+ this.propertyChangeCallback(name, value);
83
+ });
84
+ _GxIdeDbPropertiesConfigurator_cancelButtonClickedHandler.set(this, () => {
85
+ var _a;
86
+ (_a = this.cancelCallback) === null || _a === void 0 ? void 0 : _a.call(this);
87
+ });
88
+ _GxIdeDbPropertiesConfigurator_confirmButtonClickedHandler.set(this, () => {
89
+ var _a;
90
+ (_a = this.confirmCallback) === null || _a === void 0 ? void 0 : _a.call(this);
91
+ });
92
+ // #region Renders
93
+ _GxIdeDbPropertiesConfigurator_renderControl.set(this, (field) => {
94
+ const fieldId = `field-${field.name}`;
95
+ const value = __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_getValue, "f").call(this, field);
96
+ switch (field.control) {
97
+ case "password":
98
+ return (h("ch-edit", { id: fieldId, class: "input", type: "password", showPasswordButton: true, debounce: config.inputDebounce, value: value, onInput: __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_valueChangeHandler, "f").call(this, field.name) }));
99
+ case "combo":
100
+ return (h("ch-combo-box-render", { id: fieldId, class: "combo-box", value: value, model: __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_buildComboModel, "f").call(this, field), onInput: __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_valueChangeHandler, "f").call(this, field.name), onChange: __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_valueChangeHandler, "f").call(this, field.name) }));
101
+ case "checkbox":
102
+ return (h("ch-checkbox", { id: fieldId, class: "checkbox", value: value, checkedValue: "Yes", unCheckedValue: "No", onInput: __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_valueChangeHandler, "f").call(this, field.name) }));
103
+ case "combo-editable":
104
+ return (h("ch-combo-box-render", { id: fieldId, class: "combo-box", suggest: true, suggestDebounce: config.inputDebounce, value: value, model: __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_buildComboModel, "f").call(this, field), onInput: __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_valueChangeHandler, "f").call(this, field.name), onChange: __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_valueChangeHandler, "f").call(this, field.name), part: `combo-box combo-box--editable combo-box--${field.name}` }));
105
+ case "custom":
106
+ case "readonly":
107
+ return (h("ch-edit", { id: fieldId, class: "input", readonly: true, value: value, part: `input input--${field.control} input--${field.name}` }));
108
+ // "text"
109
+ default:
110
+ return (h("ch-edit", { id: fieldId, class: "input", debounce: config.inputDebounce, value: value, onInput: __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_valueChangeHandler, "f").call(this, field.name), part: `input input--text input--${field.name}` }));
111
+ }
112
+ });
113
+ _GxIdeDbPropertiesConfigurator_renderField.set(this, (field) => {
114
+ const fieldId = `field-${field.name}`;
115
+ const isReadonly = field.control === "readonly" || field.control === "custom";
116
+ const isCheckbox = field.control === "checkbox";
117
+ if (isCheckbox) {
118
+ return (h("div", { class: "field field--checkbox field--full", key: field.name }, h("div", { class: "field__row" }, __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_renderControl, "f").call(this, field), h("label", { class: "label", htmlFor: fieldId }, field.label)), field.description && (h("p", { class: "field__hint body-regular-s" }, field.description))));
119
+ }
120
+ return (h("div", { class: "field field-block", key: field.name }, h("label", { class: { "label": true, "label--disabled": isReadonly }, htmlFor: fieldId }, field.label), __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_renderControl, "f").call(this, field)));
121
+ });
122
+ _GxIdeDbPropertiesConfigurator_renderSection.set(this, (title, fields) => (h("section", { class: "field-section" }, h("div", { class: "field-section__head" }, h("span", { class: "field-section__title" }, title)), h("div", { class: "fields" }, fields.map(__classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_renderField, "f"))))));
123
+ this.properties = [];
124
+ this.cancelCallback = undefined;
125
+ this.confirmCallback = undefined;
126
+ this.propertyChangeCallback = undefined;
127
+ }
128
+ async componentWillLoad() {
129
+ __classPrivateFieldSet(this, _GxIdeDbPropertiesConfigurator_componentLocale, await Locale.getComponentStrings(this.el), "f");
130
+ }
131
+ // #endregion Renders
132
+ render() {
133
+ var _a;
134
+ const title = __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_componentLocale, "f").header.title;
135
+ const description = __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_componentLocale, "f").header.description;
136
+ const sections = __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_componentLocale, "f").sections;
137
+ const allFields = (_a = this.properties) !== null && _a !== void 0 ? _a : [];
138
+ const hasAuthSection = __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_hasTrustedConnection, "f").call(this);
139
+ // The Authentication section is only rendered when TRUSTED_CONNECTION is
140
+ // present; otherwise every field stays in the always-present Connection
141
+ // section so nothing is dropped.
142
+ const authFields = hasAuthSection
143
+ ? allFields.filter(__classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_isAuthField, "f"))
144
+ : [];
145
+ const connectionFields = hasAuthSection
146
+ ? allFields.filter(field => !__classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_isAuthField, "f").call(this, field))
147
+ : allFields;
148
+ return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("section", { class: "section" }, h("div", { class: "hero" }, h("div", { class: "hero__text" }, h("h1", { class: "hero__title subtitle-semi-bold-l" }, title), description && (h("p", { class: "hero__description body-regular-s" }, description))), h("div", { class: "hero__badge", "aria-hidden": "true" }, h("ch-image", { class: "icon-xl", src: DATABASE_ICON }))), h("div", { class: "main scrollable" }, connectionFields.length > 0 &&
149
+ __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_renderSection, "f").call(this, sections.connection, connectionFields), hasAuthSection &&
150
+ authFields.length > 0 &&
151
+ __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_renderSection, "f").call(this, sections.authentication, authFields)), h("footer", { class: "dialog-footer-with-border footer" }, h("div", { class: "buttons-spacer" }, h("button", { class: "button-secondary", id: "button-cancel", type: "button", onClick: __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_cancelButtonClickedHandler, "f"), part: "button-cancel" }, __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_componentLocale, "f").footer.btnCancel), h("button", { class: "button-primary", id: "button-confirm", type: "button", disabled: __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_hasPendingRequired, "f").call(this), onClick: __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_confirmButtonClickedHandler, "f"), part: "button-confirm" }, __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_componentLocale, "f").footer.btnConfirm))))));
152
+ }
153
+ static get assetsDirs() { return ["gx-ide-assets/db-properties-configurator"]; }
154
+ get el() { return getElement(this); }
155
+ };
156
+ _GxIdeDbPropertiesConfigurator_componentLocale = new WeakMap(), _GxIdeDbPropertiesConfigurator_getValue = new WeakMap(), _GxIdeDbPropertiesConfigurator_hasPendingRequired = new WeakMap(), _GxIdeDbPropertiesConfigurator_buildComboModel = new WeakMap(), _GxIdeDbPropertiesConfigurator_isAuthField = new WeakMap(), _GxIdeDbPropertiesConfigurator_hasTrustedConnection = new WeakMap(), _GxIdeDbPropertiesConfigurator_valueChangeHandler = new WeakMap(), _GxIdeDbPropertiesConfigurator_cancelButtonClickedHandler = new WeakMap(), _GxIdeDbPropertiesConfigurator_confirmButtonClickedHandler = new WeakMap(), _GxIdeDbPropertiesConfigurator_renderControl = new WeakMap(), _GxIdeDbPropertiesConfigurator_renderField = new WeakMap(), _GxIdeDbPropertiesConfigurator_renderSection = new WeakMap();
157
+ GxIdeDbPropertiesConfigurator.style = dbPropertiesConfiguratorCss;
158
+
159
+ export { GxIdeDbPropertiesConfigurator as gx_ide_db_properties_configurator };
160
+
161
+ //# sourceMappingURL=gx-ide-db-properties-configurator.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"gx-ide-db-properties-configurator.entry.js","mappings":";;;;;;;;;AAAA,MAAM,2BAA2B,GAAG,4sEAA4sE;;;;;;;;;;;;;;;;;;;ACQhvE,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,mBAAmB;IACnB,sBAAsB;IACtB,iBAAiB;IACjB,iBAAiB;IACjB,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,eAAe;IACf,qBAAqB;CACtB,CAAC;AAEF,MAAM,aAAa,GAAG,WAAW,CAAC;IAChC,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,UAAU;IAChB,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;AAEH;;;;AAIA,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAChD,MAAM,OAAO,GAAG,SAAS,CAAC;AAC1B,MAAM,aAAa,GAAG,eAAe,CAAC;AAEtC;AACA,MAAM,aAAa,GAAG,gBAAgB,CAAC;MAQ1B,6BAA6B;;;;QAExC,iEAAsB;QAgCtB,kDAAY,CAAC,KAAsB,eAAa,OAAA,MAAA,KAAK,CAAC,KAAK,mCAAI,EAAE,CAAA,EAAA,EAAC;QAElE,4DAAsB;;YACpB,OAAA,CAAC,MAAA,IAAI,CAAC,UA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AEnB,uBAAA,IAAI,sDAAiB,CAAC,MAAM,CAAC,SAAS,CAChC,EACT,cACE,KAAK,EAAC,gBAAgB,EACtB,EAAE,EAAC,gBAAgB,EACnB,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,uBAAA,IAAI,yDAAoB,MAAxB,IAAI,CAAsB,EACpC,OAAO,EAAE,uBAAA,IAAI,kEAA6B,EAC1C,IAAI,EAAC,gBAAgB,IAEpB,uBAAA,IAAI,sDAAiB,CAAC,MAAM,CAAC,UAAU,CACjC,CACL,CACC,CACD,CACL,EACP;KACH;;;;;;;;;","names":[],"sources":["src/components/db-properties-configurator/db-properties-configurator.scss?tag=gx-ide-db-properties-configurator&encapsulation=shadow","src/components/db-properties-configurator/db-properties-configurator.tsx"],"sourcesContent":["@import \"../../global/temporary-mercury-overrides/_button.scss\";\n\n// The component reproduces the Mercury \"Set required properties\" connection\n// dialog. Real Mercury classes (.dialog-header-with-border, .field-group-\n// justified-end, .label, .input, .combo-box, .button-*, typography) come from\n// the loaded bundles; the rules below only add the scaffolding Mercury does\n// not define (hero banner, badge, close button, field help) using DS tokens.\n\n:host {\n display: grid;\n block-size: 100%;\n overflow: hidden;\n grid-template-rows: max-content 1fr max-content;\n background-color: var(--color-accent-surface-elevation-1);\n color: var(--color-text-neutral-default);\n}\n\n.section {\n // section is just for semantics; the host owns the grid.\n display: contents;\n}\n\n// #region Hero\n.hero {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-xl);\n padding-block: var(--spacing-padding-l);\n padding-inline: var(--spacing-padding-l);\n border-block-end: var(--size-1) solid\n var(--color-border-surface-on-elevation-1);\n}\n\n.hero__text {\n flex: 1;\n min-inline-size: 0;\n}\n\n.hero__title {\n margin: 0;\n color: var(--color-text-neutral-default);\n}\n\n.hero__description {\n margin-block: var(--spacing-gap-xs) 0;\n margin-inline: 0;\n color: var(--color-text-neutral-disabled);\n text-wrap: pretty;\n}\n\n.hero__badge {\n flex: none;\n display: grid;\n place-items: center;\n inline-size: 44px;\n block-size: 44px;\n border-radius: var(--border-radius-m);\n background-color: var(--color-accent-item-hover);\n color: var(--color-icon-primary-default);\n}\n// #endregion Hero\n\n// #region Body\n.main {\n overflow: auto;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-xxl);\n padding-block: var(--spacing-padding-l);\n padding-inline: var(--spacing-padding-l);\n}\n\n// Field section: a quiet uppercase header + its field grid. Sections after\n// the first get a divider so the body reads as structured groups.\n.field-section {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-l);\n}\n\n.field-section + .field-section {\n padding-block-start: var(--spacing-padding-xl);\n border-block-start: var(--size-1) solid\n var(--color-border-surface-on-elevation-1);\n}\n\n.field-section__head {\n display: flex;\n align-items: baseline;\n gap: var(--spacing-gap-m);\n}\n\n.field-section__title {\n font-family: var(--font-family-body);\n font-weight: var(--font-style-semi-bold);\n font-size: var(--font-size-caption-m);\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--color-text-neutral-neutral);\n}\n\n// Two-column field grid. Each field occupies one column; checkbox fields\n// (and any other field marked as full-width) span the entire row, forcing\n// the following fields to wrap onto the next row.\n.fields {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--spacing-gap-l);\n}\n\n.field--full {\n grid-column: 1 / -1;\n}\n\n// Inline checkbox field: control + label on the same row, optional help text\n// flows below aligned with the label.\n.field--checkbox {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-xs);\n}\n\n.field--checkbox .field__row {\n display: flex;\n align-items: center;\n gap: var(--spacing-gap-xs);\n}\n\n.field--checkbox .label {\n margin: 0;\n cursor: pointer;\n}\n\n// Help text below a checkbox, indented to align with the label past the box.\n.field--checkbox .field__hint {\n margin: 0;\n margin-inline-start: calc(var(--spacing-gap-m) + var(--spacing-gap-m));\n color: var(--color-text-neutral-disabled);\n text-wrap: pretty;\n}\n// #endregion Body\n\n// #region Footer\n.footer {\n padding-block: var(--spacing-padding-m);\n padding-inline: var(--spacing-padding-l);\n}\n// #endregion Footer\n","import { Component, Host, Prop, Element, h } from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\n\nimport { Locale } from \"../../common/locale\";\nimport { config } from \"../../common/config\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/combo-box\",\n \"components/edit\",\n \"components/icon\",\n \"utils/form\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst DATABASE_ICON = getIconPath({\n category: \"system\",\n name: \"database\",\n colorType: \"primary\"\n});\n\n/**\n * Name of the property that toggles integrated security. Its presence in\n * `properties` is what drives the rendering of the Authentication section.\n */\nconst TRUSTED_CONNECTION = \"TRUSTED_CONNECTION\";\nconst USER_ID = \"USER_ID\";\nconst USER_PASSWORD = \"USER_PASSWORD\";\n\n/** Category that groups the authentication-related fields. */\nconst AUTH_CATEGORY = \"authentication\";\n\n@Component({\n tag: \"gx-ide-db-properties-configurator\",\n styleUrl: \"db-properties-configurator.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/db-properties-configurator\"]\n})\nexport class GxIdeDbPropertiesConfigurator {\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n\n @Element() el: HTMLGxIdeDbPropertiesConfiguratorElement;\n\n /**\n * The list of properties to configure. Acts as the single source of truth:\n * the dialog reads each value from `DSPropertyField.value` and notifies the\n * host of every edit through `propertyChangeCallback`.\n */\n @Prop() readonly properties: DSPropertyField[] = [];\n\n /**\n * Callback invoked when the user cancels the configuration.\n */\n @Prop() readonly cancelCallback!: CancelCallback;\n\n /**\n * Callback invoked when the user confirms the configuration.\n */\n @Prop() readonly confirmCallback!: ConfirmCallback;\n\n /**\n * Callback invoked on every input change. Receives the name of the\n * property that changed and its new value. The host is expected to apply\n * the change and push an updated `properties` array back to the component.\n */\n @Prop() readonly propertyChangeCallback!: PropertyChangeCallback;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n #getValue = (field: DSPropertyField): string => field.value ?? \"\";\n\n #hasPendingRequired = (): boolean =>\n (this.properties ?? []).some(\n field => field.missing && this.#getValue(field).trim() === \"\"\n );\n\n #buildComboModel = (field: DSPropertyField): ComboBoxModel =>\n (field.standardValues ?? []).map(value => ({ value, caption: value }));\n\n #isAuthField = (field: DSPropertyField): boolean =>\n field.name === TRUSTED_CONNECTION ||\n field.name === USER_ID ||\n field.name === USER_PASSWORD ||\n field.category?.toLowerCase() === AUTH_CATEGORY;\n\n /** Whether the host sent the TRUSTED_CONNECTION property. Only then is the\n * Authentication section rendered. */\n #hasTrustedConnection = (): boolean =>\n (this.properties ?? []).some(field => field.name === TRUSTED_CONNECTION);\n\n #valueChangeHandler =\n (name: string) => (event: CustomEvent<string> | InputEvent) => {\n const detail = (event as CustomEvent<string>).detail;\n const value =\n typeof detail === \"string\"\n ? detail\n : ((event.target as HTMLChEditElement)?.value ?? \"\");\n this.propertyChangeCallback(name, value);\n };\n\n #cancelButtonClickedHandler = () => {\n this.cancelCallback?.();\n };\n\n #confirmButtonClickedHandler = () => {\n this.confirmCallback?.();\n };\n\n // #region Renders\n\n #renderControl = (field: DSPropertyField) => {\n const fieldId = `field-${field.name}`;\n const value = this.#getValue(field);\n\n switch (field.control) {\n case \"password\":\n return (\n <ch-edit\n id={fieldId}\n class=\"input\"\n type=\"password\"\n showPasswordButton\n debounce={config.inputDebounce}\n value={value}\n onInput={this.#valueChangeHandler(field.name)}\n ></ch-edit>\n );\n\n case \"combo\":\n return (\n <ch-combo-box-render\n id={fieldId}\n class=\"combo-box\"\n value={value}\n model={this.#buildComboModel(field)}\n onInput={this.#valueChangeHandler(field.name)}\n onChange={this.#valueChangeHandler(field.name)}\n ></ch-combo-box-render>\n );\n\n case \"checkbox\":\n return (\n <ch-checkbox\n id={fieldId}\n class=\"checkbox\"\n value={value}\n checkedValue=\"Yes\"\n unCheckedValue=\"No\"\n onInput={this.#valueChangeHandler(field.name)}\n ></ch-checkbox>\n );\n\n case \"combo-editable\":\n return (\n <ch-combo-box-render\n id={fieldId}\n class=\"combo-box\"\n suggest\n suggestDebounce={config.inputDebounce}\n value={value}\n model={this.#buildComboModel(field)}\n onInput={this.#valueChangeHandler(field.name)}\n onChange={this.#valueChangeHandler(field.name)}\n part={`combo-box combo-box--editable combo-box--${field.name}`}\n ></ch-combo-box-render>\n );\n\n case \"custom\":\n case \"readonly\":\n return (\n <ch-edit\n id={fieldId}\n class=\"input\"\n readonly\n value={value}\n part={`input input--${field.control} input--${field.name}`}\n ></ch-edit>\n );\n\n // \"text\"\n default:\n return (\n <ch-edit\n id={fieldId}\n class=\"input\"\n debounce={config.inputDebounce}\n value={value}\n onInput={this.#valueChangeHandler(field.name)}\n part={`input input--text input--${field.name}`}\n ></ch-edit>\n );\n }\n };\n\n #renderField = (field: DSPropertyField) => {\n const fieldId = `field-${field.name}`;\n const isReadonly =\n field.control === \"readonly\" || field.control === \"custom\";\n const isCheckbox = field.control === \"checkbox\";\n\n if (isCheckbox) {\n return (\n <div class=\"field field--checkbox field--full\" key={field.name}>\n <div class=\"field__row\">\n {this.#renderControl(field)}\n <label class=\"label\" htmlFor={fieldId}>\n {field.label}\n </label>\n </div>\n {field.description && (\n <p class=\"field__hint body-regular-s\">{field.description}</p>\n )}\n </div>\n );\n }\n\n return (\n <div class=\"field field-block\" key={field.name}>\n <label\n class={{ \"label\": true, \"label--disabled\": isReadonly }}\n htmlFor={fieldId}\n >\n {field.label}\n </label>\n\n {this.#renderControl(field)}\n </div>\n );\n };\n\n #renderSection = (title: string, fields: DSPropertyField[]) => (\n <section class=\"field-section\">\n <div class=\"field-section__head\">\n <span class=\"field-section__title\">{title}</span>\n </div>\n <div class=\"fields\">{fields.map(this.#renderField)}</div>\n </section>\n );\n\n // #endregion Renders\n\n render() {\n const title = this.#componentLocale.header.title;\n const description = this.#componentLocale.header.description;\n const sections = this.#componentLocale.sections;\n\n const allFields = this.properties ?? [];\n const hasAuthSection = this.#hasTrustedConnection();\n\n // The Authentication section is only rendered when TRUSTED_CONNECTION is\n // present; otherwise every field stays in the always-present Connection\n // section so nothing is dropped.\n const authFields = hasAuthSection\n ? allFields.filter(this.#isAuthField)\n : [];\n const connectionFields = hasAuthSection\n ? allFields.filter(field => !this.#isAuthField(field))\n : allFields;\n\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <section class=\"section\">\n <div class=\"hero\">\n <div class=\"hero__text\">\n <h1 class=\"hero__title subtitle-semi-bold-l\">{title}</h1>\n {description && (\n <p class=\"hero__description body-regular-s\">{description}</p>\n )}\n </div>\n <div class=\"hero__badge\" aria-hidden=\"true\">\n <ch-image class=\"icon-xl\" src={DATABASE_ICON}></ch-image>\n </div>\n </div>\n\n <div class=\"main scrollable\">\n {connectionFields.length > 0 &&\n this.#renderSection(sections.connection, connectionFields)}\n\n {hasAuthSection &&\n authFields.length > 0 &&\n this.#renderSection(sections.authentication, authFields)}\n </div>\n\n <footer class=\"dialog-footer-with-border footer\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n id=\"button-cancel\"\n type=\"button\"\n onClick={this.#cancelButtonClickedHandler}\n part=\"button-cancel\"\n >\n {this.#componentLocale.footer.btnCancel}\n </button>\n <button\n class=\"button-primary\"\n id=\"button-confirm\"\n type=\"button\"\n disabled={this.#hasPendingRequired()}\n onClick={this.#confirmButtonClickedHandler}\n part=\"button-confirm\"\n >\n {this.#componentLocale.footer.btnConfirm}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type DSControlKind =\n | \"checkbox\"\n | \"text\"\n | \"password\"\n | \"combo\"\n | \"combo-editable\"\n | \"custom\"\n | \"readonly\";\n\nexport interface DSPropertyField {\n /** `PropertyData.name` — key used to set the property value. */\n name: string;\n /** `definition.displayName`. */\n label: string;\n /** `definition.description` (rendered below the control). */\n description?: string;\n /** `definition.category` (optional grouping). */\n category?: string;\n\n /** Control resolved by the host. */\n control: DSControlKind;\n\n /** `PropertyData.value` (masked when password). */\n value: string;\n /** `required && isDefault` (host detection). */\n missing: boolean;\n\n // combos:\n /** `PropertyData.standardValues`. */\n standardValues?: string[];\n /** `PropertyData.isStandardValuesExclusive`. */\n exclusive?: boolean;\n}\n\nexport type CancelCallback = () => void | Promise<void>;\n\nexport type ConfirmCallback = () => void | Promise<void>;\n\nexport type PropertyChangeCallback = (\n name: string,\n value: string\n) => void | Promise<void>;\n"],"version":3}
@@ -0,0 +1,124 @@
1
+ import { g as getAssetPath, r as registerInstance, h, H as Host, a as getElement } from './index-b153bfd0.js';
2
+ import { L as Locale } from './locale-e5107fad.js';
3
+
4
+ const mapItemsToComboBoxItemModel = (items) => {
5
+ return items === null || items === void 0 ? void 0 : items.map(item => {
6
+ return {
7
+ value: item.id,
8
+ caption: item.name
9
+ };
10
+ });
11
+ };
12
+
13
+ const selectTeamOrOrgCss = "button.button-secondary {\n border-color: var(--color-border-neutral-default);\n}\n\n:host {\n display: grid;\n container-type: inline-size;\n container-name: host-container;\n block-size: 100%;\n inline-size: 100%;\n align-items: center;\n justify-content: center;\n}\n\n.slide {\n display: grid;\n grid-template-columns: 1fr 1fr;\n block-size: 100%;\n border-radius: var(--border-radius-m);\n max-block-size: 700px;\n max-inline-size: 1100px;\n background-color: var(--color-accent-surface-elevation-1);\n overflow: hidden;\n}\n.slide__illustration {\n overflow: hidden;\n object-fit: cover;\n object-position: left;\n block-size: 100%;\n inline-size: 100%;\n}\n.slide__main {\n display: grid;\n block-size: 100%;\n inline-size: 100%;\n padding: 48px;\n transform: translateY(4px);\n transition: var(--display-items-transtion-time) all;\n opacity: 0;\n position: relative;\n}\n.slide__main--visible {\n transform: translateY(0);\n opacity: 1;\n}\n.slide__main-container {\n display: grid;\n place-self: center;\n gap: var(--spacing-gap-xxl);\n inline-size: 100%;\n max-inline-size: 480px;\n}\n.slide__main-header {\n display: grid;\n gap: var(--spacing-gap-xxl);\n}\n.slide__main-title {\n display: flex;\n flex-direction: column;\n font-size: var(--font-size-header-h2);\n font-weight: var(--font-style-semi-bold);\n letter-spacing: 0.02em;\n line-height: var(--line-height-tight);\n color: var(--color-text-neutral-strawberry);\n}\n.slide__main-description {\n display: grid;\n gap: 40px;\n font-size: var(--font-size-body-l);\n font-weight: var(--font-style-regular);\n line-height: var(--line-height-spacious);\n color: var(--color-text-neutral-disabled);\n}\n\n.terms-conditions {\n text-decoration: underline;\n}\n\n.items-list {\n inline-size: 100%;\n --ch-combo-box__popover-max-inline-size: 100%;\n}\n\n.buttons-container {\n display: flex;\n inline-size: 100%;\n gap: var(--spacing-gap-xl);\n}\n\n.continue-btn,\n.cancel-btn {\n flex: 1;\n}\n\n@container host-container (max-width: 768px) {\n .slide {\n grid-template-columns: 1fr 2fr;\n }\n}\n@container host-container (max-width: 640px) {\n .slide {\n grid-template-columns: 1fr 5fr;\n }\n}";
14
+
15
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16
+ if (kind === "a" && !f)
17
+ throw new TypeError("Private accessor was defined without a getter");
18
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
19
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
20
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
21
+ };
22
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
23
+ if (kind === "m")
24
+ throw new TypeError("Private method is not writable");
25
+ if (kind === "a" && !f)
26
+ throw new TypeError("Private accessor was defined without a setter");
27
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
28
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
29
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
30
+ };
31
+ var _GxIdeSelectTeamOrOrg_componentLocale, _GxIdeSelectTeamOrOrg_itemsModel, _GxIdeSelectTeamOrOrg_chSelectItemEl, _GxIdeSelectTeamOrOrg_displayItemsTransitionTime, _GxIdeSelectTeamOrOrg_continueHandler, _GxIdeSelectTeamOrOrg_cancelHandler;
32
+ const COPYRIGHTS_ILLUSTRATION = getAssetPath(`./gx-ide-assets/welcome-page/images/copyrights-illustration.png`);
33
+ const ICON_NEXT = getAssetPath(`./gx-ide-assets/welcome-page/images/icon-next.svg`);
34
+ const CSS_BUNDLES = [
35
+ "resets/box-sizing",
36
+ "utils/typography",
37
+ "components/button",
38
+ "components/combo-box"
39
+ ];
40
+ const GxIdeSelectTeamOrOrg = class {
41
+ constructor(hostRef) {
42
+ registerInstance(this, hostRef);
43
+ /**
44
+ * The component hard-coded strings translations.
45
+ */
46
+ // eslint-disable-next-line @stencil-community/own-props-must-be-private
47
+ _GxIdeSelectTeamOrOrg_componentLocale.set(this, void 0);
48
+ _GxIdeSelectTeamOrOrg_itemsModel.set(this, []);
49
+ _GxIdeSelectTeamOrOrg_chSelectItemEl.set(this, void 0);
50
+ _GxIdeSelectTeamOrOrg_displayItemsTransitionTime.set(this, 100);
51
+ _GxIdeSelectTeamOrOrg_continueHandler.set(this, async () => {
52
+ await this.confirmCallback(__classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_chSelectItemEl, "f").value);
53
+ });
54
+ _GxIdeSelectTeamOrOrg_cancelHandler.set(this, async () => {
55
+ await this.cancelCallback();
56
+ });
57
+ this.slideIsVisible = false;
58
+ this.itemsModelReady = false;
59
+ this.cancelCallback = undefined;
60
+ this.confirmCallback = undefined;
61
+ this.selectionType = "team";
62
+ this.items = undefined;
63
+ }
64
+ itemsChanged(newItems) {
65
+ this.slideIsVisible = false;
66
+ if (!(newItems === null || newItems === void 0 ? void 0 : newItems.length)) {
67
+ this.itemsModelReady = false;
68
+ setTimeout(() => {
69
+ this.slideIsVisible = true;
70
+ }, __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_displayItemsTransitionTime, "f"));
71
+ return;
72
+ }
73
+ // switch step
74
+ setTimeout(() => {
75
+ __classPrivateFieldSet(this, _GxIdeSelectTeamOrOrg_itemsModel, mapItemsToComboBoxItemModel(newItems), "f");
76
+ this.itemsModelReady = true;
77
+ }, __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_displayItemsTransitionTime, "f"));
78
+ // show slide
79
+ setTimeout(() => {
80
+ this.slideIsVisible = true;
81
+ }, __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_displayItemsTransitionTime, "f") * 2);
82
+ }
83
+ async componentWillLoad() {
84
+ var _a;
85
+ __classPrivateFieldSet(this, _GxIdeSelectTeamOrOrg_componentLocale, await Locale.getComponentStrings(this.el), "f");
86
+ if ((_a = this.items) === null || _a === void 0 ? void 0 : _a.length) {
87
+ __classPrivateFieldSet(this, _GxIdeSelectTeamOrOrg_itemsModel, mapItemsToComboBoxItemModel(this.items), "f");
88
+ this.itemsModelReady = true;
89
+ }
90
+ this.el.style.setProperty("--display-items-transtion-time", __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_displayItemsTransitionTime, "f").toString() + "ms");
91
+ }
92
+ componentDidLoad() {
93
+ this.slideIsVisible = true;
94
+ }
95
+ render() {
96
+ var _a;
97
+ const kindLocale = __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_componentLocale, "f")[this.selectionType];
98
+ return (h(Host, null, h("ch-theme", { model: CSS_BUNDLES }), h("section", { class: "slide" }, h("img", { src: COPYRIGHTS_ILLUSTRATION, class: "slide__illustration", alt: "" // decorative
99
+ }), h("div", { class: {
100
+ "slide__main": true,
101
+ "slide__main--visible": this.slideIsVisible
102
+ } }, h("div", { class: "slide__main-container" }, this.itemsModelReady ? ([
103
+ h("header", { class: "slide__main-header" }, h("img", { src: ICON_NEXT, alt: "" // decorative
104
+ }), h("h2", {
105
+ // Split the title into two spans for better styling
106
+ class: "slide__main-title"
107
+ }, h("span", null, kindLocale.title))),
108
+ h("div", { class: "slide__select-item-description" }, h("p", { class: "body-semi-bold-l" }, kindLocale.infoMessage)),
109
+ h("div", { class: "field-group" }, h("div", { class: "field field-block" }, h("label", { htmlFor: "items" }, kindLocale.label), h("ch-combo-box-render", { id: "items", accessibleName: kindLocale.label, class: "combo-box items-list", model: __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_itemsModel, "f"), value: __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_itemsModel, "f") && ((_a = __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_itemsModel, "f")[0]) === null || _a === void 0 ? void 0 : _a.value), ref: (el) => (__classPrivateFieldSet(this, _GxIdeSelectTeamOrOrg_chSelectItemEl, el, "f")) }))),
110
+ h("div", { class: "buttons-container" }, h("button", { class: "button-primary continue-btn", onClick: __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_continueHandler, "f") }, __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_componentLocale, "f").confirmButtonCaption), h("button", { class: "button-secondary cancel-btn", onClick: __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_cancelHandler, "f") }, __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_componentLocale, "f").cancelButtonCaption))
111
+ ]) : (h("gx-ide-loader", { show: true, loaderTitle: __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_componentLocale, "f").loader.title, description: __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_componentLocale, "f").loader.description })))))));
112
+ }
113
+ static get assetsDirs() { return ["gx-ide-assets/select-team-or-org"]; }
114
+ get el() { return getElement(this); }
115
+ static get watchers() { return {
116
+ "items": ["itemsChanged"]
117
+ }; }
118
+ };
119
+ _GxIdeSelectTeamOrOrg_componentLocale = new WeakMap(), _GxIdeSelectTeamOrOrg_itemsModel = new WeakMap(), _GxIdeSelectTeamOrOrg_chSelectItemEl = new WeakMap(), _GxIdeSelectTeamOrOrg_displayItemsTransitionTime = new WeakMap(), _GxIdeSelectTeamOrOrg_continueHandler = new WeakMap(), _GxIdeSelectTeamOrOrg_cancelHandler = new WeakMap();
120
+ GxIdeSelectTeamOrOrg.style = selectTeamOrOrgCss;
121
+
122
+ export { GxIdeSelectTeamOrOrg as gx_ide_select_team_or_org };
123
+
124
+ //# sourceMappingURL=gx-ide-select-team-or-org.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"gx-ide-select-team-or-org.entry.js","mappings":";;;AAGO,MAAM,2BAA2B,GAAG,CACzC,KAAuB;IAEvB,OAAO,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,GAAG,CAAC,IAAI;QACpB,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,EAAE;YACd,OAAO,EAAE,IAAI,CAAC,IAAI;SACnB,CAAC;KACH,CAAC,CAAC;AACL,CAAC;;ACZD,MAAM,kBAAkB,GAAG,grEAAgrE;;;;;;;;;;;;;;;;;;;ACkB3sE,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;MAQW,oBAAoB;;;;;;;QAK/B,wDAAsB;QACtB,2CAAmC,EAAE,EAAC;QACtC,uDAA6C;QAC7C,2DAAsC,GAAG,EAAC;QA2E1C,gDAAmB;YACjB,MAAM,IAAI,CAAC,eAAe,CAAC,uBAAA,IAAI,4CAAgB,CAAC,KAAK,CAAC,CAAC;SACxD,EAAC;QAEF,8CAAiB;YACf,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;SAC7B,EAAC;8BA1EiC,KAAK;+BAKJ,KAAK;;;6BAgBO,MAAM;;;IAOtD,YAAY,CAAC,QAA0B;QACrC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAE5B,IAAI,EAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAA,EAAE;YACrB,IAAI,CAAC,eAAe,GAAG,K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AAW,EAAE,uBAAA,IAAI,6CAAiB,CAAC,MAAM,CAAC,WAAW,GACtC,CAClB,CACG,CACF,CACE,CACL,EACP;KACH;;;;;;;;;;;;","names":[],"sources":["src/components/select-team-or-org/helpers.tsx","src/components/select-team-or-org/select-team-or-org.scss?tag=gx-ide-select-team-or-org&encapsulation=shadow","src/components/select-team-or-org/select-team-or-org.tsx"],"sourcesContent":["import { ComboBoxItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\nimport { SelectableItem } from \"./select-team-or-org\";\n\nexport const mapItemsToComboBoxItemModel = (\n items: SelectableItem[]\n): ComboBoxItemModel[] => {\n return items?.map(item => {\n return {\n value: item.id,\n caption: item.name\n };\n });\n};\n","@import \"../../global/temporary-mercury-overrides/_button.scss\";\n\n:host {\n display: grid;\n container-type: inline-size;\n container-name: host-container;\n block-size: 100%;\n inline-size: 100%;\n align-items: center;\n justify-content: center;\n}\n\n.slide {\n display: grid;\n grid-template-columns: 1fr 1fr;\n block-size: 100%;\n border-radius: var(--border-radius-m);\n max-block-size: 700px;\n max-inline-size: 1100px;\n background-color: var(--color-accent-surface-elevation-1);\n overflow: hidden;\n\n &__illustration {\n overflow: hidden;\n object-fit: cover;\n object-position: left;\n block-size: 100%;\n inline-size: 100%;\n }\n\n &__main {\n display: grid;\n block-size: 100%;\n inline-size: 100%;\n padding: 48px;\n transform: translateY(4px);\n transition: var(--display-items-transtion-time) all;\n opacity: 0;\n\n position: relative;\n\n &--visible {\n transform: translateY(0);\n opacity: 1;\n }\n }\n\n &__main-container {\n display: grid;\n place-self: center;\n gap: var(--spacing-gap-xxl);\n inline-size: 100%;\n max-inline-size: 480px;\n }\n\n &__main-header {\n display: grid;\n gap: var(--spacing-gap-xxl);\n }\n\n &__main-title {\n display: flex;\n flex-direction: column;\n font-size: var(--font-size-header-h2);\n font-weight: var(--font-style-semi-bold);\n letter-spacing: 0.02em;\n line-height: var(--line-height-tight);\n color: var(--color-text-neutral-strawberry);\n }\n\n &__main-description {\n display: grid;\n gap: 40px;\n font-size: var(--font-size-body-l);\n font-weight: var(--font-style-regular);\n line-height: var(--line-height-spacious);\n color: var(--color-text-neutral-disabled);\n }\n}\n\n.terms-conditions {\n text-decoration: underline;\n}\n\n.items-list {\n inline-size: 100%;\n --ch-combo-box__popover-max-inline-size: 100%;\n}\n\n.buttons-container {\n display: flex;\n inline-size: 100%;\n gap: var(--spacing-gap-xl);\n}\n\n.continue-btn,\n.cancel-btn {\n flex: 1;\n}\n\n@container host-container (max-width: 768px) {\n .slide {\n grid-template-columns: 1fr 2fr;\n }\n}\n\n@container host-container (max-width: 640px) {\n .slide {\n grid-template-columns: 1fr 5fr;\n }\n}\n","// Stencil\nimport {\n Component,\n Host,\n h,\n Prop,\n State,\n Watch,\n Element,\n getAssetPath\n} from \"@stencil/core\";\n// Other Libraries\nimport { MercuryBundles } from \"@genexus/mercury\";\nimport { ComboBoxItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\n// Custom Imports\nimport { Locale } from \"../../common/locale\";\nimport { mapItemsToComboBoxItemModel } from \"./helpers\";\n\nconst COPYRIGHTS_ILLUSTRATION = getAssetPath(\n `./gx-ide-assets/welcome-page/images/copyrights-illustration.png`\n);\nconst ICON_NEXT = getAssetPath(\n `./gx-ide-assets/welcome-page/images/icon-next.svg`\n);\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/typography\",\n \"components/button\",\n \"components/combo-box\"\n];\n\n@Component({\n tag: \"gx-ide-select-team-or-org\",\n styleUrl: \"select-team-or-org.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/select-team-or-org\"]\n})\nexport class GxIdeSelectTeamOrOrg {\n /**\n * The component hard-coded strings translations.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n #itemsModel: ComboBoxItemModel[] = [];\n #chSelectItemEl: HTMLChComboBoxRenderElement;\n #displayItemsTransitionTime: number = 100;\n\n @Element() el: HTMLGxIdeSelectTeamOrOrgElement;\n\n /**\n * Defines if the main slide is visible or not. Used for smooth transitions between slides.\n */\n @State() slideIsVisible: boolean = false;\n\n /**\n * Defines if the items model is ready to be rendered.\n */\n @State() itemsModelReady: boolean = false;\n\n /**\n * Callback executed when the user clicks the 'Cancel' button\n */\n @Prop() readonly cancelCallback!: () => Promise<void>;\n\n /**\n * Callback executed when the user clicks the 'Confirm' button\n */\n @Prop() readonly confirmCallback!: (itemId: string) => Promise<void>;\n\n /**\n * Whether the picker is selecting a team or an organization.\n * Drives the title, info message and combo label.\n */\n @Prop() readonly selectionType: SelectionType = \"team\";\n\n /**\n * Array that contains the selectable items (teams or organizations).\n */\n @Prop() readonly items!: SelectableItem[];\n @Watch(\"items\")\n itemsChanged(newItems: SelectableItem[]) {\n this.slideIsVisible = false;\n\n if (!newItems?.length) {\n this.itemsModelReady = false;\n setTimeout(() => {\n this.slideIsVisible = true;\n }, this.#displayItemsTransitionTime);\n return;\n }\n\n // switch step\n setTimeout(() => {\n this.#itemsModel = mapItemsToComboBoxItemModel(newItems);\n this.itemsModelReady = true;\n }, this.#displayItemsTransitionTime);\n // show slide\n setTimeout(() => {\n this.slideIsVisible = true;\n }, this.#displayItemsTransitionTime * 2);\n }\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n\n if (this.items?.length) {\n this.#itemsModel = mapItemsToComboBoxItemModel(this.items);\n this.itemsModelReady = true;\n }\n\n this.el.style.setProperty(\n \"--display-items-transtion-time\",\n this.#displayItemsTransitionTime.toString() + \"ms\"\n );\n }\n\n componentDidLoad() {\n this.slideIsVisible = true;\n }\n\n #continueHandler = async () => {\n await this.confirmCallback(this.#chSelectItemEl.value);\n };\n\n #cancelHandler = async () => {\n await this.cancelCallback();\n };\n\n render() {\n const kindLocale = this.#componentLocale[this.selectionType];\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <section class=\"slide\">\n <img\n src={COPYRIGHTS_ILLUSTRATION}\n class=\"slide__illustration\"\n alt=\"\" // decorative\n />\n\n <div\n class={{\n \"slide__main\": true,\n \"slide__main--visible\": this.slideIsVisible\n }}\n >\n <div class=\"slide__main-container\">\n {this.itemsModelReady ? (\n [\n <header class=\"slide__main-header\">\n <img\n src={ICON_NEXT}\n alt=\"\" // decorative\n />\n <h2\n // Split the title into two spans for better styling\n class=\"slide__main-title\"\n >\n <span>{kindLocale.title}</span>\n </h2>\n </header>,\n <div class=\"slide__select-item-description\">\n <p class=\"body-semi-bold-l\">{kindLocale.infoMessage}</p>\n </div>,\n <div class=\"field-group\">\n <div class=\"field field-block\">\n <label htmlFor=\"items\">{kindLocale.label}</label>\n <ch-combo-box-render\n id=\"items\"\n accessibleName={kindLocale.label}\n class=\"combo-box items-list\"\n model={this.#itemsModel}\n value={this.#itemsModel && this.#itemsModel[0]?.value}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#chSelectItemEl =\n el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n </div>\n </div>,\n <div class=\"buttons-container\">\n <button\n class=\"button-primary continue-btn\"\n onClick={this.#continueHandler}\n >\n {this.#componentLocale.confirmButtonCaption}\n </button>\n <button\n class=\"button-secondary cancel-btn\"\n onClick={this.#cancelHandler}\n >\n {this.#componentLocale.cancelButtonCaption}\n </button>\n </div>\n ]\n ) : (\n <gx-ide-loader\n show\n loaderTitle={this.#componentLocale.loader.title}\n description={this.#componentLocale.loader.description}\n ></gx-ide-loader>\n )}\n </div>\n </div>\n </section>\n </Host>\n );\n }\n}\n\nexport type SelectableItem = {\n id: string;\n name: string;\n};\n\nexport type SelectionType = \"team\" | \"organization\";\n"],"version":3}
@@ -0,0 +1,183 @@
1
+ import { g as getAssetPath, r as registerInstance, h, H as Host, a as getElement } from './index-b153bfd0.js';
2
+ import { L as Locale } from './locale-e5107fad.js';
3
+
4
+ const mapOrganizationsToComboBoxItemModel = (organizations) => {
5
+ if (!organizations) {
6
+ return [];
7
+ }
8
+ return organizations.map(organization => ({
9
+ value: organization.id,
10
+ caption: organization.name
11
+ }));
12
+ };
13
+
14
+ const signInOrganizationCss = ":host {\n display: grid;\n container-type: inline-size;\n container-name: host-container;\n block-size: 100%;\n inline-size: 100%;\n align-items: center;\n justify-content: center;\n}\n\n.slide {\n display: grid;\n grid-template-columns: 1fr 1fr;\n block-size: 100%;\n max-block-size: 700px;\n max-inline-size: 1100px;\n background-color: var(--color-accent-surface-elevation-1);\n border-radius: var(--dialog-border-radius, 16px);\n overflow: hidden;\n}\n.slide__illustration {\n overflow: hidden;\n object-fit: cover;\n object-position: left;\n block-size: 100%;\n inline-size: 100%;\n}\n.slide__main {\n display: grid;\n block-size: 100%;\n inline-size: 100%;\n padding: 48px;\n transform: translateY(4px);\n transition: var(--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(--spacing-gap-xxl);\n max-inline-size: 480px;\n}\n.slide__main-header {\n display: grid;\n gap: var(--spacing-gap-xxl);\n}\n.slide__main-title {\n display: flex;\n flex-direction: column;\n letter-spacing: 0.02em;\n}\n.slide__main-description {\n display: grid;\n gap: 40px;\n color: var(--color-text-neutral-disabled);\n max-inline-size: 370px;\n}\n\n.teams-list {\n inline-size: 100%;\n max-inline-size: 400px;\n --ch-combo-box__popover-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
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17
+ if (kind === "a" && !f)
18
+ throw new TypeError("Private accessor was defined without a getter");
19
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
20
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
21
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
22
+ };
23
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
24
+ if (kind === "m")
25
+ throw new TypeError("Private method is not writable");
26
+ if (kind === "a" && !f)
27
+ throw new TypeError("Private accessor was defined without a setter");
28
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
29
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
30
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
31
+ };
32
+ var _GxIdeSignInOrganization_componentLocale, _GxIdeSignInOrganization_organizationsModel, _GxIdeSignInOrganization_chSelectOrganizationEl, _GxIdeSignInOrganization_switchStepTransitionTime, _GxIdeSignInOrganization_termsAndConditionsCheckboxEl, _GxIdeSignInOrganization_privacyPolicyCheckboxEl, _GxIdeSignInOrganization_authStepCallback, _GxIdeSignInOrganization_continueHandler, _GxIdeSignInOrganization_renderStepHeader, _GxIdeSignInOrganization_renderStepFooter, _GxIdeSignInOrganization_evaluateTermsConditionsAndPrivacyAccepted, _GxIdeSignInOrganization_termsAndConditionsClickedHandler, _GxIdeSignInOrganization_privacyPolicyClickedHandler, _GxIdeSignInOrganization_evaluateStepRender;
33
+ const COPYRIGHTS_ILLUSTRATION = getAssetPath(`./gx-ide-assets/welcome-page/images/copyrights-illustration.png`);
34
+ const ICON_NEXT = getAssetPath(`./gx-ide-assets/welcome-page/images/icon-next.svg`);
35
+ const CSS_BUNDLES = [
36
+ "resets/box-sizing",
37
+ "utils/typography",
38
+ "components/button",
39
+ "components/combo-box",
40
+ "components/checkbox",
41
+ "utils/form"
42
+ ];
43
+ const CHECKED_VALUE = "on";
44
+ const GxIdeSignInOrganization = class {
45
+ constructor(hostRef) {
46
+ registerInstance(this, hostRef);
47
+ /**
48
+ * The component hard-coded strings translations.
49
+ */
50
+ // eslint-disable-next-line @stencil-community/own-props-must-be-private
51
+ _GxIdeSignInOrganization_componentLocale.set(this, void 0);
52
+ // Select Organization References :
53
+ _GxIdeSignInOrganization_organizationsModel.set(this, []);
54
+ _GxIdeSignInOrganization_chSelectOrganizationEl.set(this, void 0);
55
+ _GxIdeSignInOrganization_switchStepTransitionTime.set(this, 100);
56
+ _GxIdeSignInOrganization_termsAndConditionsCheckboxEl.set(this, void 0);
57
+ _GxIdeSignInOrganization_privacyPolicyCheckboxEl.set(this, void 0);
58
+ _GxIdeSignInOrganization_authStepCallback.set(this, () => {
59
+ if (this.authStep === "signIn") {
60
+ this.signInCallback();
61
+ }
62
+ else if (this.authStep === "selectOrganization") {
63
+ __classPrivateFieldGet(this, _GxIdeSignInOrganization_continueHandler, "f").call(this);
64
+ }
65
+ });
66
+ _GxIdeSignInOrganization_continueHandler.set(this, async () => {
67
+ await this.continueCallback(__classPrivateFieldGet(this, _GxIdeSignInOrganization_chSelectOrganizationEl, "f").value);
68
+ });
69
+ _GxIdeSignInOrganization_renderStepHeader.set(this, () => {
70
+ return (h("header", { class: "slide__main-header" }, h("img", { src: ICON_NEXT, alt: "" // decorative
71
+ }), h("h2", {
72
+ // Split the title into two spans for better styling
73
+ class: "slide__main-title heading-2"
74
+ }, h("span", null, __classPrivateFieldGet(this, _GxIdeSignInOrganization_componentLocale, "f")[this.authStepInternal].titlePart1), h("span", null, __classPrivateFieldGet(this, _GxIdeSignInOrganization_componentLocale, "f")[this.authStepInternal].titlePart2))));
75
+ });
76
+ _GxIdeSignInOrganization_renderStepFooter.set(this, () => {
77
+ const signInDisabled = this.authStep === "signIn" &&
78
+ this.termsConfirmationRequired &&
79
+ !this.termsAndConditionsAccepted;
80
+ return (h("div", null, h("button", { class: "button-primary main-btn", onClick: __classPrivateFieldGet(this, _GxIdeSignInOrganization_authStepCallback, "f"), disabled: signInDisabled }, __classPrivateFieldGet(this, _GxIdeSignInOrganization_componentLocale, "f")[this.authStepInternal].buttonCaption)));
81
+ });
82
+ _GxIdeSignInOrganization_evaluateTermsConditionsAndPrivacyAccepted.set(this, () => {
83
+ const termsAndConditionsAccepted = __classPrivateFieldGet(this, _GxIdeSignInOrganization_termsAndConditionsCheckboxEl, "f").value === CHECKED_VALUE;
84
+ const privacyPolicyAccepted = __classPrivateFieldGet(this, _GxIdeSignInOrganization_privacyPolicyCheckboxEl, "f").value === CHECKED_VALUE;
85
+ this.termsAndConditionsAccepted =
86
+ termsAndConditionsAccepted && privacyPolicyAccepted;
87
+ });
88
+ _GxIdeSignInOrganization_termsAndConditionsClickedHandler.set(this, (event) => {
89
+ event.preventDefault();
90
+ this.termsCallback();
91
+ });
92
+ _GxIdeSignInOrganization_privacyPolicyClickedHandler.set(this, (event) => {
93
+ event.preventDefault();
94
+ this.privacyCallback();
95
+ });
96
+ _GxIdeSignInOrganization_evaluateStepRender.set(this, () => {
97
+ var _a;
98
+ if (this.authStepInternal === "signIn") {
99
+ return [
100
+ __classPrivateFieldGet(this, _GxIdeSignInOrganization_renderStepHeader, "f").call(this),
101
+ h("p", { class: "body-regular-l" }, __classPrivateFieldGet(this, _GxIdeSignInOrganization_componentLocale, "f").signIn.description),
102
+ this.termsConfirmationRequired && (h("div", { class: "field-group" }, h("div", {
103
+ // terms and conditions
104
+ class: "field field-inline"
105
+ }, h("ch-checkbox", { checkedValue: CHECKED_VALUE, id: "terms-and-conditions", class: "checkbox", ref: (el) => (__classPrivateFieldSet(this, _GxIdeSignInOrganization_termsAndConditionsCheckboxEl, el, "f")), onInput: __classPrivateFieldGet(this, _GxIdeSignInOrganization_evaluateTermsConditionsAndPrivacyAccepted, "f") }), h("span", null, h("label", { htmlFor: "terms-and-conditions", class: "label label-agreement" }, __classPrivateFieldGet(this, _GxIdeSignInOrganization_componentLocale, "f").agreement.termsAndConditionsLabel, h("span", { class: { hyperlink: !!this.termsCallback }, onClick: this.termsCallback &&
106
+ __classPrivateFieldGet(this, _GxIdeSignInOrganization_termsAndConditionsClickedHandler, "f") }, __classPrivateFieldGet(this, _GxIdeSignInOrganization_componentLocale, "f").agreement.termsAndConditionsLink)))), h("div", {
107
+ // privacy policy
108
+ class: "field field-inline"
109
+ }, h("ch-checkbox", { checkedValue: CHECKED_VALUE, id: "privacy-policy", class: "checkbox", ref: (el) => (__classPrivateFieldSet(this, _GxIdeSignInOrganization_privacyPolicyCheckboxEl, el, "f")), onInput: __classPrivateFieldGet(this, _GxIdeSignInOrganization_evaluateTermsConditionsAndPrivacyAccepted, "f") }), h("span", null, h("label", { htmlFor: "privacy-policy", class: "label label-agreement" }, __classPrivateFieldGet(this, _GxIdeSignInOrganization_componentLocale, "f").agreement.privacyAndPolicyLabel, h("span", { class: { hyperlink: !!this.privacyCallback }, onClick: this.privacyCallback && __classPrivateFieldGet(this, _GxIdeSignInOrganization_privacyPolicyClickedHandler, "f") }, __classPrivateFieldGet(this, _GxIdeSignInOrganization_componentLocale, "f").agreement.privacyAndPolicyLink)))))),
110
+ __classPrivateFieldGet(this, _GxIdeSignInOrganization_renderStepFooter, "f").call(this)
111
+ ];
112
+ }
113
+ else if (this.authStepInternal === "fetchOrganizations" ||
114
+ this.authStepInternal === "settingUpSession") {
115
+ const loaderTitle = this.authStepInternal === "fetchOrganizations"
116
+ ? __classPrivateFieldGet(this, _GxIdeSignInOrganization_componentLocale, "f").loader.fetchingOrganizationsTitle
117
+ : __classPrivateFieldGet(this, _GxIdeSignInOrganization_componentLocale, "f").loader.settingUpSessionTitle;
118
+ const loaderDescription = this.authStepInternal === "fetchOrganizations"
119
+ ? __classPrivateFieldGet(this, _GxIdeSignInOrganization_componentLocale, "f").loader.fetchingOrganizationsDescription
120
+ : __classPrivateFieldGet(this, _GxIdeSignInOrganization_componentLocale, "f").loader.settingUpDescription;
121
+ return (h("gx-ide-loader", { show: true, loaderTitle: loaderTitle, description: loaderDescription }));
122
+ }
123
+ else if (this.authStepInternal === "selectOrganization") {
124
+ return [
125
+ __classPrivateFieldGet(this, _GxIdeSignInOrganization_renderStepHeader, "f").call(this),
126
+ h("div", { class: "slide__select-organization-description" }, h("p", { class: "body-semi-bold-l" }, __classPrivateFieldGet(this, _GxIdeSignInOrganization_componentLocale, "f").selectOrganization.infoMessage)),
127
+ h("div", { class: "field-group" }, h("div", { class: "field field-block" }, h("label", { htmlFor: "organizations" }, __classPrivateFieldGet(this, _GxIdeSignInOrganization_componentLocale, "f").selectOrganization.label), h("ch-combo-box-render", { id: "organizations", accessibleName: "Organizations", class: "combo-box organizations-list", model: __classPrivateFieldGet(this, _GxIdeSignInOrganization_organizationsModel, "f"), value: (_a = __classPrivateFieldGet(this, _GxIdeSignInOrganization_organizationsModel, "f")[0]) === null || _a === void 0 ? void 0 : _a.value, ref: (el) => (__classPrivateFieldSet(this, _GxIdeSignInOrganization_chSelectOrganizationEl, el, "f")) }))),
128
+ __classPrivateFieldGet(this, _GxIdeSignInOrganization_renderStepFooter, "f").call(this)
129
+ ];
130
+ }
131
+ });
132
+ this.authStepInternal = undefined;
133
+ this.slideIsVisible = true;
134
+ this.termsAndConditionsAccepted = false;
135
+ this.authStep = "signIn";
136
+ this.continueCallback = undefined;
137
+ this.signInCallback = undefined;
138
+ this.termsConfirmationRequired = false;
139
+ this.organizations = undefined;
140
+ this.termsCallback = undefined;
141
+ this.privacyCallback = undefined;
142
+ }
143
+ authStepChanged(newAuthStep) {
144
+ this.slideIsVisible = false;
145
+ // switch step
146
+ setTimeout(() => {
147
+ this.authStepInternal = newAuthStep;
148
+ }, __classPrivateFieldGet(this, _GxIdeSignInOrganization_switchStepTransitionTime, "f"));
149
+ // show slide
150
+ setTimeout(() => {
151
+ this.slideIsVisible = true;
152
+ }, __classPrivateFieldGet(this, _GxIdeSignInOrganization_switchStepTransitionTime, "f") * 2);
153
+ }
154
+ organizationsChanged(newOrganizations) {
155
+ __classPrivateFieldSet(this, _GxIdeSignInOrganization_organizationsModel, mapOrganizationsToComboBoxItemModel(newOrganizations), "f");
156
+ }
157
+ async componentWillLoad() {
158
+ __classPrivateFieldSet(this, _GxIdeSignInOrganization_componentLocale, await Locale.getComponentStrings(this.el), "f");
159
+ this.el.style.setProperty("--switch-step-transtion-time", __classPrivateFieldGet(this, _GxIdeSignInOrganization_switchStepTransitionTime, "f").toString() + "ms");
160
+ // Initialize values
161
+ this.authStepInternal = this.authStep;
162
+ this.organizationsChanged(this.organizations);
163
+ }
164
+ render() {
165
+ return (h(Host, null, h("ch-theme", { model: CSS_BUNDLES }), h("section", { class: "slide" }, h("img", { src: COPYRIGHTS_ILLUSTRATION, class: "slide__illustration", alt: "" // decorative
166
+ }), h("div", { class: {
167
+ "slide__main": true,
168
+ "slide__main--visible": this.slideIsVisible
169
+ } }, h("div", { class: "slide__main-container" }, __classPrivateFieldGet(this, _GxIdeSignInOrganization_evaluateStepRender, "f").call(this))))));
170
+ }
171
+ static get assetsDirs() { return ["gx-ide-assets/sign-in-organization"]; }
172
+ get el() { return getElement(this); }
173
+ static get watchers() { return {
174
+ "authStep": ["authStepChanged"],
175
+ "organizations": ["organizationsChanged"]
176
+ }; }
177
+ };
178
+ _GxIdeSignInOrganization_componentLocale = new WeakMap(), _GxIdeSignInOrganization_organizationsModel = new WeakMap(), _GxIdeSignInOrganization_chSelectOrganizationEl = new WeakMap(), _GxIdeSignInOrganization_switchStepTransitionTime = new WeakMap(), _GxIdeSignInOrganization_termsAndConditionsCheckboxEl = new WeakMap(), _GxIdeSignInOrganization_privacyPolicyCheckboxEl = new WeakMap(), _GxIdeSignInOrganization_authStepCallback = new WeakMap(), _GxIdeSignInOrganization_continueHandler = new WeakMap(), _GxIdeSignInOrganization_renderStepHeader = new WeakMap(), _GxIdeSignInOrganization_renderStepFooter = new WeakMap(), _GxIdeSignInOrganization_evaluateTermsConditionsAndPrivacyAccepted = new WeakMap(), _GxIdeSignInOrganization_termsAndConditionsClickedHandler = new WeakMap(), _GxIdeSignInOrganization_privacyPolicyClickedHandler = new WeakMap(), _GxIdeSignInOrganization_evaluateStepRender = new WeakMap();
179
+ GxIdeSignInOrganization.style = signInOrganizationCss;
180
+
181
+ export { GxIdeSignInOrganization as gx_ide_sign_in_organization };
182
+
183
+ //# sourceMappingURL=gx-ide-sign-in-organization.entry.js.map