@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,183 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { g as getIconPath } from './mer-animated-dots.js';
3
+ import 'lit';
4
+ import 'lit/directives/when.js';
5
+ import 'lit/directives/if-defined.js';
6
+ import { L as Locale } from './locale.js';
7
+ import { c as config } from './config.js';
8
+
9
+ 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)}";
10
+
11
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
+ if (kind === "a" && !f)
13
+ throw new TypeError("Private accessor was defined without a getter");
14
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
15
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
16
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
17
+ };
18
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
19
+ if (kind === "m")
20
+ throw new TypeError("Private method is not writable");
21
+ if (kind === "a" && !f)
22
+ throw new TypeError("Private accessor was defined without a setter");
23
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
24
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
25
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
26
+ };
27
+ 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;
28
+ const CSS_BUNDLES = [
29
+ "resets/box-sizing",
30
+ "components/button",
31
+ "components/combo-box",
32
+ "components/edit",
33
+ "components/icon",
34
+ "utils/form",
35
+ "utils/layout",
36
+ "utils/typography",
37
+ "utils/spacing",
38
+ "chameleon/scrollbar"
39
+ ];
40
+ const DATABASE_ICON = getIconPath({
41
+ category: "system",
42
+ name: "database",
43
+ colorType: "primary"
44
+ });
45
+ /**
46
+ * Name of the property that toggles integrated security. Its presence in
47
+ * `properties` is what drives the rendering of the Authentication section.
48
+ */
49
+ const TRUSTED_CONNECTION = "TRUSTED_CONNECTION";
50
+ const USER_ID = "USER_ID";
51
+ const USER_PASSWORD = "USER_PASSWORD";
52
+ /** Category that groups the authentication-related fields. */
53
+ const AUTH_CATEGORY = "authentication";
54
+ const GxIdeDbPropertiesConfigurator$1 = /*@__PURE__*/ proxyCustomElement(class GxIdeDbPropertiesConfigurator extends HTMLElement {
55
+ constructor() {
56
+ super();
57
+ this.__registerHost();
58
+ this.__attachShadow();
59
+ // eslint-disable-next-line @stencil-community/own-props-must-be-private
60
+ _GxIdeDbPropertiesConfigurator_componentLocale.set(this, void 0);
61
+ _GxIdeDbPropertiesConfigurator_getValue.set(this, (field) => { var _a; return (_a = field.value) !== null && _a !== void 0 ? _a : ""; });
62
+ _GxIdeDbPropertiesConfigurator_hasPendingRequired.set(this, () => {
63
+ var _a;
64
+ return ((_a = this.properties) !== null && _a !== void 0 ? _a : []).some(field => field.missing && __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_getValue, "f").call(this, field).trim() === "");
65
+ });
66
+ _GxIdeDbPropertiesConfigurator_buildComboModel.set(this, (field) => { var _a; return ((_a = field.standardValues) !== null && _a !== void 0 ? _a : []).map(value => ({ value, caption: value })); });
67
+ _GxIdeDbPropertiesConfigurator_isAuthField.set(this, (field) => {
68
+ var _a;
69
+ return field.name === TRUSTED_CONNECTION ||
70
+ field.name === USER_ID ||
71
+ field.name === USER_PASSWORD ||
72
+ ((_a = field.category) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === AUTH_CATEGORY;
73
+ });
74
+ /** Whether the host sent the TRUSTED_CONNECTION property. Only then is the
75
+ * Authentication section rendered. */
76
+ _GxIdeDbPropertiesConfigurator_hasTrustedConnection.set(this, () => { var _a; return ((_a = this.properties) !== null && _a !== void 0 ? _a : []).some(field => field.name === TRUSTED_CONNECTION); });
77
+ _GxIdeDbPropertiesConfigurator_valueChangeHandler.set(this, (name) => (event) => {
78
+ var _a, _b;
79
+ const detail = event.detail;
80
+ const value = typeof detail === "string"
81
+ ? detail
82
+ : ((_b = (_a = event.target) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "");
83
+ this.propertyChangeCallback(name, value);
84
+ });
85
+ _GxIdeDbPropertiesConfigurator_cancelButtonClickedHandler.set(this, () => {
86
+ var _a;
87
+ (_a = this.cancelCallback) === null || _a === void 0 ? void 0 : _a.call(this);
88
+ });
89
+ _GxIdeDbPropertiesConfigurator_confirmButtonClickedHandler.set(this, () => {
90
+ var _a;
91
+ (_a = this.confirmCallback) === null || _a === void 0 ? void 0 : _a.call(this);
92
+ });
93
+ // #region Renders
94
+ _GxIdeDbPropertiesConfigurator_renderControl.set(this, (field) => {
95
+ const fieldId = `field-${field.name}`;
96
+ const value = __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_getValue, "f").call(this, field);
97
+ switch (field.control) {
98
+ case "password":
99
+ 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) }));
100
+ case "combo":
101
+ 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) }));
102
+ case "checkbox":
103
+ return (h("ch-checkbox", { id: fieldId, class: "checkbox", value: value, checkedValue: "Yes", unCheckedValue: "No", onInput: __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_valueChangeHandler, "f").call(this, field.name) }));
104
+ case "combo-editable":
105
+ 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}` }));
106
+ case "custom":
107
+ case "readonly":
108
+ return (h("ch-edit", { id: fieldId, class: "input", readonly: true, value: value, part: `input input--${field.control} input--${field.name}` }));
109
+ // "text"
110
+ default:
111
+ 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}` }));
112
+ }
113
+ });
114
+ _GxIdeDbPropertiesConfigurator_renderField.set(this, (field) => {
115
+ const fieldId = `field-${field.name}`;
116
+ const isReadonly = field.control === "readonly" || field.control === "custom";
117
+ const isCheckbox = field.control === "checkbox";
118
+ if (isCheckbox) {
119
+ 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))));
120
+ }
121
+ 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)));
122
+ });
123
+ _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"))))));
124
+ this.properties = [];
125
+ this.cancelCallback = undefined;
126
+ this.confirmCallback = undefined;
127
+ this.propertyChangeCallback = undefined;
128
+ }
129
+ async componentWillLoad() {
130
+ __classPrivateFieldSet(this, _GxIdeDbPropertiesConfigurator_componentLocale, await Locale.getComponentStrings(this.el), "f");
131
+ }
132
+ // #endregion Renders
133
+ render() {
134
+ var _a;
135
+ const title = __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_componentLocale, "f").header.title;
136
+ const description = __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_componentLocale, "f").header.description;
137
+ const sections = __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_componentLocale, "f").sections;
138
+ const allFields = (_a = this.properties) !== null && _a !== void 0 ? _a : [];
139
+ const hasAuthSection = __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_hasTrustedConnection, "f").call(this);
140
+ // The Authentication section is only rendered when TRUSTED_CONNECTION is
141
+ // present; otherwise every field stays in the always-present Connection
142
+ // section so nothing is dropped.
143
+ const authFields = hasAuthSection
144
+ ? allFields.filter(__classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_isAuthField, "f"))
145
+ : [];
146
+ const connectionFields = hasAuthSection
147
+ ? allFields.filter(field => !__classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_isAuthField, "f").call(this, field))
148
+ : allFields;
149
+ 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 &&
150
+ __classPrivateFieldGet(this, _GxIdeDbPropertiesConfigurator_renderSection, "f").call(this, sections.connection, connectionFields), hasAuthSection &&
151
+ authFields.length > 0 &&
152
+ __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))))));
153
+ }
154
+ static get assetsDirs() { return ["gx-ide-assets/db-properties-configurator"]; }
155
+ get el() { return this; }
156
+ static get style() { return dbPropertiesConfiguratorCss; }
157
+ }, [1, "gx-ide-db-properties-configurator", {
158
+ "properties": [16],
159
+ "cancelCallback": [16],
160
+ "confirmCallback": [16],
161
+ "propertyChangeCallback": [16]
162
+ }]);
163
+ _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();
164
+ function defineCustomElement$1() {
165
+ if (typeof customElements === "undefined") {
166
+ return;
167
+ }
168
+ const components = ["gx-ide-db-properties-configurator"];
169
+ components.forEach(tagName => { switch (tagName) {
170
+ case "gx-ide-db-properties-configurator":
171
+ if (!customElements.get(tagName)) {
172
+ customElements.define(tagName, GxIdeDbPropertiesConfigurator$1);
173
+ }
174
+ break;
175
+ } });
176
+ }
177
+
178
+ const GxIdeDbPropertiesConfigurator = GxIdeDbPropertiesConfigurator$1;
179
+ const defineCustomElement = defineCustomElement$1;
180
+
181
+ export { GxIdeDbPropertiesConfigurator, defineCustomElement };
182
+
183
+ //# sourceMappingURL=gx-ide-db-properties-configurator.js.map
@@ -0,0 +1 @@
1
+ {"file":"gx-ide-db-properties-configurator.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,QAA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AA,IAAI,oDAAe,MAAnB,IAAI,EAAgB,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC,EAE3D,cAAc;YACb,UAAU,CAAC,MAAM,GAAG,CAAC;YACrB,uBAAA,IAAI,oDAAe,MAAnB,IAAI,EAAgB,QAAQ,CAAC,cAAc,EAAE,UAAU,CAAC,CACtD,EAEN,cAAQ,KAAK,EAAC,kCAAkC,IAC9C,WAAK,KAAK,EAAC,gBAAgB,IACzB,cACE,KAAK,EAAC,kBAAkB,EACxB,EAAE,EAAC,eAAe,EAClB,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,uBAAA,IAAI,iEAA4B,EACzC,IAAI,EAAC,eAAe,IAEnB,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":["GxIdeDbPropertiesConfigurator"],"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,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GxIdeSelectTeamOrOrg extends Components.GxIdeSelectTeamOrOrg, HTMLElement {}
4
+ export const GxIdeSelectTeamOrOrg: {
5
+ prototype: GxIdeSelectTeamOrOrg;
6
+ new (): GxIdeSelectTeamOrOrg;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,157 @@
1
+ import { getAssetPath, proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { L as Locale } from './locale.js';
3
+ import { d as defineCustomElement$2 } from './ide-loader.js';
4
+
5
+ const mapItemsToComboBoxItemModel = (items) => {
6
+ return items === null || items === void 0 ? void 0 : items.map(item => {
7
+ return {
8
+ value: item.id,
9
+ caption: item.name
10
+ };
11
+ });
12
+ };
13
+
14
+ 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}";
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 _GxIdeSelectTeamOrOrg_componentLocale, _GxIdeSelectTeamOrOrg_itemsModel, _GxIdeSelectTeamOrOrg_chSelectItemEl, _GxIdeSelectTeamOrOrg_displayItemsTransitionTime, _GxIdeSelectTeamOrOrg_continueHandler, _GxIdeSelectTeamOrOrg_cancelHandler;
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
+ ];
41
+ const GxIdeSelectTeamOrOrg$1 = /*@__PURE__*/ proxyCustomElement(class GxIdeSelectTeamOrOrg extends HTMLElement {
42
+ constructor() {
43
+ super();
44
+ this.__registerHost();
45
+ this.__attachShadow();
46
+ /**
47
+ * The component hard-coded strings translations.
48
+ */
49
+ // eslint-disable-next-line @stencil-community/own-props-must-be-private
50
+ _GxIdeSelectTeamOrOrg_componentLocale.set(this, void 0);
51
+ _GxIdeSelectTeamOrOrg_itemsModel.set(this, []);
52
+ _GxIdeSelectTeamOrOrg_chSelectItemEl.set(this, void 0);
53
+ _GxIdeSelectTeamOrOrg_displayItemsTransitionTime.set(this, 100);
54
+ _GxIdeSelectTeamOrOrg_continueHandler.set(this, async () => {
55
+ await this.confirmCallback(__classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_chSelectItemEl, "f").value);
56
+ });
57
+ _GxIdeSelectTeamOrOrg_cancelHandler.set(this, async () => {
58
+ await this.cancelCallback();
59
+ });
60
+ this.slideIsVisible = false;
61
+ this.itemsModelReady = false;
62
+ this.cancelCallback = undefined;
63
+ this.confirmCallback = undefined;
64
+ this.selectionType = "team";
65
+ this.items = undefined;
66
+ }
67
+ itemsChanged(newItems) {
68
+ this.slideIsVisible = false;
69
+ if (!(newItems === null || newItems === void 0 ? void 0 : newItems.length)) {
70
+ this.itemsModelReady = false;
71
+ setTimeout(() => {
72
+ this.slideIsVisible = true;
73
+ }, __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_displayItemsTransitionTime, "f"));
74
+ return;
75
+ }
76
+ // switch step
77
+ setTimeout(() => {
78
+ __classPrivateFieldSet(this, _GxIdeSelectTeamOrOrg_itemsModel, mapItemsToComboBoxItemModel(newItems), "f");
79
+ this.itemsModelReady = true;
80
+ }, __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_displayItemsTransitionTime, "f"));
81
+ // show slide
82
+ setTimeout(() => {
83
+ this.slideIsVisible = true;
84
+ }, __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_displayItemsTransitionTime, "f") * 2);
85
+ }
86
+ async componentWillLoad() {
87
+ var _a;
88
+ __classPrivateFieldSet(this, _GxIdeSelectTeamOrOrg_componentLocale, await Locale.getComponentStrings(this.el), "f");
89
+ if ((_a = this.items) === null || _a === void 0 ? void 0 : _a.length) {
90
+ __classPrivateFieldSet(this, _GxIdeSelectTeamOrOrg_itemsModel, mapItemsToComboBoxItemModel(this.items), "f");
91
+ this.itemsModelReady = true;
92
+ }
93
+ this.el.style.setProperty("--display-items-transtion-time", __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_displayItemsTransitionTime, "f").toString() + "ms");
94
+ }
95
+ componentDidLoad() {
96
+ this.slideIsVisible = true;
97
+ }
98
+ render() {
99
+ var _a;
100
+ const kindLocale = __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_componentLocale, "f")[this.selectionType];
101
+ return (h(Host, null, h("ch-theme", { model: CSS_BUNDLES }), h("section", { class: "slide" }, h("img", { src: COPYRIGHTS_ILLUSTRATION, class: "slide__illustration", alt: "" // decorative
102
+ }), h("div", { class: {
103
+ "slide__main": true,
104
+ "slide__main--visible": this.slideIsVisible
105
+ } }, h("div", { class: "slide__main-container" }, this.itemsModelReady ? ([
106
+ h("header", { class: "slide__main-header" }, h("img", { src: ICON_NEXT, alt: "" // decorative
107
+ }), h("h2", {
108
+ // Split the title into two spans for better styling
109
+ class: "slide__main-title"
110
+ }, h("span", null, kindLocale.title))),
111
+ h("div", { class: "slide__select-item-description" }, h("p", { class: "body-semi-bold-l" }, kindLocale.infoMessage)),
112
+ 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")) }))),
113
+ 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))
114
+ ]) : (h("gx-ide-loader", { show: true, loaderTitle: __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_componentLocale, "f").loader.title, description: __classPrivateFieldGet(this, _GxIdeSelectTeamOrOrg_componentLocale, "f").loader.description })))))));
115
+ }
116
+ static get assetsDirs() { return ["gx-ide-assets/select-team-or-org"]; }
117
+ get el() { return this; }
118
+ static get watchers() { return {
119
+ "items": ["itemsChanged"]
120
+ }; }
121
+ static get style() { return selectTeamOrOrgCss; }
122
+ }, [1, "gx-ide-select-team-or-org", {
123
+ "cancelCallback": [16],
124
+ "confirmCallback": [16],
125
+ "selectionType": [1, "selection-type"],
126
+ "items": [16],
127
+ "slideIsVisible": [32],
128
+ "itemsModelReady": [32]
129
+ }, undefined, {
130
+ "items": ["itemsChanged"]
131
+ }]);
132
+ _GxIdeSelectTeamOrOrg_componentLocale = new WeakMap(), _GxIdeSelectTeamOrOrg_itemsModel = new WeakMap(), _GxIdeSelectTeamOrOrg_chSelectItemEl = new WeakMap(), _GxIdeSelectTeamOrOrg_displayItemsTransitionTime = new WeakMap(), _GxIdeSelectTeamOrOrg_continueHandler = new WeakMap(), _GxIdeSelectTeamOrOrg_cancelHandler = new WeakMap();
133
+ function defineCustomElement$1() {
134
+ if (typeof customElements === "undefined") {
135
+ return;
136
+ }
137
+ const components = ["gx-ide-select-team-or-org", "gx-ide-loader"];
138
+ components.forEach(tagName => { switch (tagName) {
139
+ case "gx-ide-select-team-or-org":
140
+ if (!customElements.get(tagName)) {
141
+ customElements.define(tagName, GxIdeSelectTeamOrOrg$1);
142
+ }
143
+ break;
144
+ case "gx-ide-loader":
145
+ if (!customElements.get(tagName)) {
146
+ defineCustomElement$2();
147
+ }
148
+ break;
149
+ } });
150
+ }
151
+
152
+ const GxIdeSelectTeamOrOrg = GxIdeSelectTeamOrOrg$1;
153
+ const defineCustomElement = defineCustomElement$1;
154
+
155
+ export { GxIdeSelectTeamOrOrg, defineCustomElement };
156
+
157
+ //# sourceMappingURL=gx-ide-select-team-or-org.js.map
@@ -0,0 +1 @@
1
+ {"file":"gx-ide-select-team-or-org.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;MAQWA,sBAAoB;;;;;;;;;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;;;6BAgB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B,EACnC,OAAO,EAAE,uBAAA,IAAI,2CAAe,IAE3B,uBAAA,IAAI,6CAAiB,CAAC,mBAAmB,CACnC,CACL;SACP,KAED,qBACE,IAAI,QACJ,WAAW,EAAE,uBAAA,IAAI,6CAAiB,CAAC,MAAM,CAAC,KAAK,EAC/C,WAAW,EAAE,uBAAA,IAAI,6CAAiB,CAAC,MAAM,CAAC,WAAW,GACtC,CAClB,CACG,CACF,CACE,CACL,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GxIdeSelectTeamOrOrg"],"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,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GxIdeSignInOrganization extends Components.GxIdeSignInOrganization, HTMLElement {}
4
+ export const GxIdeSignInOrganization: {
5
+ prototype: GxIdeSignInOrganization;
6
+ new (): GxIdeSignInOrganization;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;