@genexus/genexus-ide-ui 1.0.24 → 1.0.25

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 (123) hide show
  1. package/dist/cjs/{form-validation-0019e158.js → form-validation-178cf461.js} +1 -19
  2. package/dist/cjs/form-validation-178cf461.js.map +1 -0
  3. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  4. package/dist/cjs/gx-ide-connect-gx-server.cjs.entry.js +197 -61
  5. package/dist/cjs/gx-ide-connect-gx-server.cjs.entry.js.map +1 -1
  6. package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js +190 -122
  7. package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js.map +1 -1
  8. package/dist/cjs/gx-ide-new-environment.cjs.entry.js +1 -1
  9. package/dist/cjs/gx-ide-new-kb.cjs.entry.js +1 -1
  10. package/dist/cjs/gx-ide-share-kb.cjs.entry.js +149 -43
  11. package/dist/cjs/gx-ide-share-kb.cjs.entry.js.map +1 -1
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/collection/collection-manifest.json +3 -3
  14. package/dist/collection/components/team-dev/connect-gx-server/connect-gx-server.css +33 -0
  15. package/dist/collection/components/team-dev/connect-gx-server/connect-gx-server.js +350 -0
  16. package/dist/collection/components/team-dev/connect-gx-server/connect-gx-server.js.map +1 -0
  17. package/dist/collection/components/team-dev/connect-gx-server/gx-ide-assets/connect-gx-server/langs/connect-gx-server.lang.en.json +13 -0
  18. package/dist/collection/components/team-dev/connect-gx-server/gx-ide-assets/connect-gx-server/langs/connect-gx-server.lang.ja.json +3 -0
  19. package/dist/collection/components/team-dev/connect-gx-server/helpers.js +17 -0
  20. package/dist/collection/components/team-dev/connect-gx-server/helpers.js.map +1 -0
  21. package/dist/collection/components/team-dev/create-kb-from-server/create-kb-from-server.css +39 -0
  22. package/dist/collection/components/team-dev/create-kb-from-server/create-kb-from-server.js +381 -0
  23. package/dist/collection/components/team-dev/create-kb-from-server/create-kb-from-server.js.map +1 -0
  24. package/dist/collection/components/team-dev/create-kb-from-server/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.en.json +27 -0
  25. package/dist/collection/components/team-dev/create-kb-from-server/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.ja.json +27 -0
  26. package/dist/collection/components/team-dev/create-kb-from-server/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.zh.json +27 -0
  27. package/dist/collection/components/team-dev/create-kb-from-server/gx-ide-assets/create-kb-from-server/shortcuts.json +10 -0
  28. package/dist/collection/components/team-dev/create-kb-from-server/helpers.js +12 -0
  29. package/dist/collection/components/team-dev/create-kb-from-server/helpers.js.map +1 -0
  30. package/dist/collection/components/team-dev/share-kb/gx-ide-assets/share-kb/langs/share-kb.lang.en.json +27 -0
  31. package/dist/collection/components/team-dev/share-kb/gx-ide-assets/share-kb/langs/share-kb.lang.ja.json +27 -0
  32. package/dist/collection/components/team-dev/share-kb/gx-ide-assets/share-kb/langs/share-kb.lang.zh.json +27 -0
  33. package/dist/collection/components/team-dev/share-kb/gx-ide-assets/share-kb/shortcuts.json +10 -0
  34. package/dist/collection/components/team-dev/share-kb/helpers.js +12 -0
  35. package/dist/collection/components/team-dev/share-kb/helpers.js.map +1 -0
  36. package/dist/collection/components/team-dev/share-kb/share-kb.css +39 -0
  37. package/dist/collection/components/team-dev/share-kb/share-kb.js +349 -0
  38. package/dist/collection/components/team-dev/share-kb/share-kb.js.map +1 -0
  39. package/dist/components/form-validation.js +1 -18
  40. package/dist/components/form-validation.js.map +1 -1
  41. package/dist/components/gx-ide-connect-gx-server.js +211 -82
  42. package/dist/components/gx-ide-connect-gx-server.js.map +1 -1
  43. package/dist/components/gx-ide-create-kb-from-server.js +204 -148
  44. package/dist/components/gx-ide-create-kb-from-server.js.map +1 -1
  45. package/dist/components/gx-ide-share-kb.js +160 -61
  46. package/dist/components/gx-ide-share-kb.js.map +1 -1
  47. package/dist/esm/{form-validation-44b2c2a8.js → form-validation-cd0215c6.js} +2 -19
  48. package/dist/esm/form-validation-cd0215c6.js.map +1 -0
  49. package/dist/esm/genexus-ide-ui.js +1 -1
  50. package/dist/esm/gx-ide-connect-gx-server.entry.js +198 -62
  51. package/dist/esm/gx-ide-connect-gx-server.entry.js.map +1 -1
  52. package/dist/esm/gx-ide-create-kb-from-server.entry.js +191 -123
  53. package/dist/esm/gx-ide-create-kb-from-server.entry.js.map +1 -1
  54. package/dist/esm/gx-ide-new-environment.entry.js +1 -1
  55. package/dist/esm/gx-ide-new-kb.entry.js +1 -1
  56. package/dist/esm/gx-ide-share-kb.entry.js +149 -43
  57. package/dist/esm/gx-ide-share-kb.entry.js.map +1 -1
  58. package/dist/esm/loader.js +1 -1
  59. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  60. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  61. package/dist/genexus-ide-ui/gx-ide-assets/connect-gx-server/langs/connect-gx-server.lang.en.json +8 -12
  62. package/dist/genexus-ide-ui/gx-ide-assets/connect-gx-server/langs/connect-gx-server.lang.ja.json +2 -16
  63. package/dist/genexus-ide-ui/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.en.json +20 -12
  64. package/dist/genexus-ide-ui/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.ja.json +20 -12
  65. package/dist/genexus-ide-ui/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.zh.json +25 -1
  66. package/dist/genexus-ide-ui/gx-ide-assets/create-kb-from-server/shortcuts.json +5 -2
  67. package/dist/genexus-ide-ui/gx-ide-assets/share-kb/langs/share-kb.lang.en.json +22 -8
  68. package/dist/genexus-ide-ui/gx-ide-assets/share-kb/langs/share-kb.lang.ja.json +23 -9
  69. package/dist/genexus-ide-ui/gx-ide-assets/share-kb/langs/share-kb.lang.zh.json +25 -1
  70. package/dist/genexus-ide-ui/gx-ide-assets/share-kb/shortcuts.json +5 -2
  71. package/dist/genexus-ide-ui/p-289c3290.js +39 -0
  72. package/dist/genexus-ide-ui/p-289c3290.js.map +1 -0
  73. package/dist/genexus-ide-ui/p-2c6dd837.entry.js +305 -0
  74. package/dist/genexus-ide-ui/p-2c6dd837.entry.js.map +1 -0
  75. package/dist/genexus-ide-ui/p-407c31c6.entry.js +264 -0
  76. package/dist/genexus-ide-ui/p-407c31c6.entry.js.map +1 -0
  77. package/dist/genexus-ide-ui/{p-3adbc04c.entry.js → p-4cbaa118.entry.js} +11 -11
  78. package/dist/genexus-ide-ui/p-e31b4df0.entry.js +249 -0
  79. package/dist/genexus-ide-ui/p-e31b4df0.entry.js.map +1 -0
  80. package/dist/genexus-ide-ui/{p-3d5fea0a.entry.js → p-ed7eada1.entry.js} +2 -2
  81. package/dist/types/components/team-dev/connect-gx-server/connect-gx-server.d.ts +50 -0
  82. package/dist/types/components/team-dev/connect-gx-server/helpers.d.ts +4 -0
  83. package/dist/types/components/team-dev/create-kb-from-server/create-kb-from-server.d.ts +82 -0
  84. package/dist/types/components/team-dev/create-kb-from-server/helpers.d.ts +3 -0
  85. package/dist/types/components/team-dev/share-kb/helpers.d.ts +3 -0
  86. package/dist/types/components/team-dev/share-kb/share-kb.d.ts +73 -0
  87. package/dist/types/components.d.ts +119 -151
  88. package/package.json +1 -1
  89. package/dist/cjs/form-validation-0019e158.js.map +0 -1
  90. package/dist/collection/components/connect-gx-server/connect-gx-server.css +0 -609
  91. package/dist/collection/components/connect-gx-server/connect-gx-server.js +0 -258
  92. package/dist/collection/components/connect-gx-server/connect-gx-server.js.map +0 -1
  93. package/dist/collection/components/connect-gx-server/gx-ide-assets/connect-gx-server/langs/connect-gx-server.lang.en.json +0 -17
  94. package/dist/collection/components/connect-gx-server/gx-ide-assets/connect-gx-server/langs/connect-gx-server.lang.ja.json +0 -17
  95. package/dist/collection/components/create-kb-from-server/create-kb-from-server.css +0 -638
  96. package/dist/collection/components/create-kb-from-server/create-kb-from-server.js +0 -349
  97. package/dist/collection/components/create-kb-from-server/create-kb-from-server.js.map +0 -1
  98. package/dist/collection/components/create-kb-from-server/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.en.json +0 -19
  99. package/dist/collection/components/create-kb-from-server/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.ja.json +0 -19
  100. package/dist/collection/components/create-kb-from-server/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.zh.json +0 -3
  101. package/dist/collection/components/create-kb-from-server/gx-ide-assets/create-kb-from-server/shortcuts.json +0 -7
  102. package/dist/collection/components/share-kb/gx-ide-assets/share-kb/langs/share-kb.lang.en.json +0 -13
  103. package/dist/collection/components/share-kb/gx-ide-assets/share-kb/langs/share-kb.lang.ja.json +0 -13
  104. package/dist/collection/components/share-kb/gx-ide-assets/share-kb/langs/share-kb.lang.zh.json +0 -3
  105. package/dist/collection/components/share-kb/gx-ide-assets/share-kb/shortcuts.json +0 -7
  106. package/dist/collection/components/share-kb/share-kb.css +0 -636
  107. package/dist/collection/components/share-kb/share-kb.js +0 -189
  108. package/dist/collection/components/share-kb/share-kb.js.map +0 -1
  109. package/dist/esm/form-validation-44b2c2a8.js.map +0 -1
  110. package/dist/genexus-ide-ui/p-02bc66c1.entry.js +0 -129
  111. package/dist/genexus-ide-ui/p-02bc66c1.entry.js.map +0 -1
  112. package/dist/genexus-ide-ui/p-58e13823.entry.js +0 -158
  113. package/dist/genexus-ide-ui/p-58e13823.entry.js.map +0 -1
  114. package/dist/genexus-ide-ui/p-b8624c0b.js +0 -56
  115. package/dist/genexus-ide-ui/p-b8624c0b.js.map +0 -1
  116. package/dist/genexus-ide-ui/p-cf2c8b3c.entry.js +0 -241
  117. package/dist/genexus-ide-ui/p-cf2c8b3c.entry.js.map +0 -1
  118. package/dist/types/components/connect-gx-server/connect-gx-server.d.ts +0 -62
  119. package/dist/types/components/create-kb-from-server/create-kb-from-server.d.ts +0 -97
  120. package/dist/types/components/share-kb/share-kb.d.ts +0 -53
  121. /package/dist/collection/components/{connect-gx-server → team-dev/connect-gx-server}/gx-ide-assets/connect-gx-server/langs/connect-gx-server.lang.zh.json +0 -0
  122. /package/dist/genexus-ide-ui/{p-3adbc04c.entry.js.map → p-4cbaa118.entry.js.map} +0 -0
  123. /package/dist/genexus-ide-ui/{p-3d5fea0a.entry.js.map → p-ed7eada1.entry.js.map} +0 -0
@@ -1,119 +1,248 @@
1
- import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { c as config } from './config.js';
3
3
  import { L as Locale } from './locale.js';
4
- import { f as formSubmitValidation } from './form-validation.js';
5
- import { d as defineCustomElement$3 } from './container.js';
6
- import { d as defineCustomElement$2 } from './title.js';
4
+ import { v as validateControls } from './form-validation.js';
7
5
 
8
- const connectGxServerCss = ":root{--ui-animaton-speed:0.2s}.gxg-title-01{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-01--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-02{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-02--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--color-on-primary)}.gxg-title-03{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-03--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-04{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-04--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-05{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-05--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable)}.gxg-text--negative{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text--gray{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--dimmed)}.gxg-quote{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);font-style:italic}.gxg-quote--negative{color:var(--ds-base-font-color--negative)}.gxg-link{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block}.gxg-link:hover{color:var(--ds-base-font-color--link-hover)}.gxg-link:active{color:var(--ds-base-font-color--link-active)}.gxg-link-gray{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed)}.gxg-link-gray:hover{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed);filter:brightness(1.4)}.gxg-alert-error{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--error);display:inline-block}.gxg-alert-warning{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--warning);display:inline-block}.gxg-alert-success{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--success);display:inline-block}.gxg-tab--disabled{color:var(--color-primary-disabled);pointer-events:none}.gxg-tab--disabled[disabled]{color:var(--color-primary-disabled);pointer-events:none}.gxg-label{font-family:var(--ds-base-font-family-primary);font-weight:var(--gxg-label-font-weight);font-size:var(--gxg-label-font-size);color:var(--gxg-label-color);text-align:center;line-height:1.455em;display:flex;align-items:center}.gxg-label:hover{color:var(--color-primary-hover)}.gxg-label:focus{color:var(--color-primary-active)}.gxg-label:active{color:var(--color-primary-active)}.gxg-label[disabled]{color:var(--color-primary-disabled)}.gxg-label--negative{color:var(--color-on-primary)}.gxg-label--negative[disabled]{color:var(--color-on-disabled)}.gxg-scrollbar{}.gxg-scrollbar::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gxg-scrollbar::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gxg-scrollbar::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host{display:grid;block-size:100%}.card-regular{background-color:var(--mer-surface__elevation--01);border:var(--mer-border__width--sm) solid var(--mer-border-color__on-elevation--01);border-radius:var(--mer-border__radius--md);padding:var(--mer-spacing--md) var(--mer-spacing--md);display:grid}.card-small{background-color:var(--mer-surface__elevation--02);border-radius:var(--mer-border__radius--sm);padding:var(--mer-spacing--sm) var(--mer-spacing--sm)}.card-small--actionable:hover{background-color:var(--mer-color__neutral-gray--600)}.card-small--actionable:active{background-color:var(--mer-color__neutral-gray--650)}.card-small:focus-visible{outline:var(--focus__outline-width) var(--focus__outline-style) var(--focus__outline-color);outline-offset:var(--focus__outline-offset)}.empty-state{block-size:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:var(--mer-spacing--sm);text-align:center}.empty-state__title,.empty-state__button,.empty-state__link{max-inline-size:300px}.opacity-0{opacity:0}.opacity-1{opacity:1}.display-contents{display:contents}.gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.overflow-auto{overflow:auto}.justify-start{display:flex;justify-content:start}.justify-center{display:flex;justify-content:center}.justify-end{display:flex;justify-content:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--mer-color__neutral-gray--800)}ch-grid-column:first-child{padding-inline-start:var(--gx-ide-container__padding) !important}ch-grid-column:last-child{padding-inline-end:var(--gx-ide-container__padding) !important}ch-grid-cell{--mer-spacing--xs:var(--gx-ide-container__padding)}.layout{display:grid;gap:var(--mer-spacing--lg);box-sizing:border-box}.layout--two-cols{grid-template-columns:1fr 1fr}.layout--space-above{padding-block-start:var(--mer-spacing--lg)}gxg-tabs{box-shadow:none}:host(.gx-ide-component){height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--mer-font__weight--regular);font-size:var(--mer-font__size--xs);font-family:var(--mer-font-family--primary);height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1;box-sizing:border-box}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-main::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-main::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-main::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-overflow::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.tree-view-primary{font-size:var(--mer-font__size--2xs)}p{margin:0;font-size:var(--mer-font__size--xxs)}.buttons-container{display:flex;gap:var(--mer-spacing--xs)}:host{display:block}.user-details-container{display:flex;gap:var(--gx-ide-form-items-gap)}.wrapper{display:flex;flex-direction:column;gap:var(--mer-spacing--md)}";
6
+ const mapAuthenticationTypeToComboBoxModel = (authenticationTypes) => {
7
+ return authenticationTypes.map(authenticationType => {
8
+ return {
9
+ value: authenticationType.id,
10
+ caption: authenticationType.name
11
+ };
12
+ });
13
+ };
14
+ const mapServerUrlsToComboBoxModel = (serverUrls) => {
15
+ return serverUrls.map(serverUrl => {
16
+ return {
17
+ value: serverUrl,
18
+ caption: serverUrl
19
+ };
20
+ });
21
+ };
22
+
23
+ const connectGxServerCss = ":host{display:grid;block-size:100%;overflow:auto;grid-template-rows:1fr max-content}.main{display:grid;grid-template-areas:\"server-url server-url\" \"authentication-type .\" \"user-name user-password\";grid-auto-rows:max-content;grid-template-columns:1fr 1fr}.section{display:contents}.authentication-type{grid-area:authentication-type}.server-url{grid-area:server-url}.user-name{grid-area:user-name}.user-password{grid-area:user-password}";
9
24
 
10
- const GxIdeConnectGxServer$1 = /*@__PURE__*/ proxyCustomElement(class GxIdeConnectGxServer extends HTMLElement {
25
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
26
+ if (kind === "a" && !f)
27
+ throw new TypeError("Private accessor was defined without a getter");
28
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
29
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
30
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
31
+ };
32
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
33
+ if (kind === "m")
34
+ throw new TypeError("Private method is not writable");
35
+ if (kind === "a" && !f)
36
+ throw new TypeError("Private accessor was defined without a setter");
37
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
38
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
39
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
40
+ };
41
+ var _HTMLGxIdeConnectGxServer_componentLocale, _HTMLGxIdeConnectGxServer_usernameRef, _HTMLGxIdeConnectGxServer_passwordRef, _HTMLGxIdeConnectGxServer_serverUrlRef, _HTMLGxIdeConnectGxServer_cancelClickHandler, _HTMLGxIdeConnectGxServer_connectClickHandler, _HTMLGxIdeConnectGxServer_evaluateTooltipRender, _HTMLGxIdeConnectGxServer_init, _HTMLGxIdeConnectGxServer_initializeValidatableControls, _HTMLGxIdeConnectGxServer_serverUrlInputEventHandler, _HTMLGxIdeConnectGxServer_authenticationInputEventHandler, _HTMLGxIdeConnectGxServer_usernameInputEventHandler, _HTMLGxIdeConnectGxServer_passwordInputEventHandler;
42
+ const CSS_BUNDLES = [
43
+ "resets/box-sizing",
44
+ "components/tab",
45
+ "components/tooltip",
46
+ "utils/form--full",
47
+ "utils/layout",
48
+ "utils/typography",
49
+ "utils/spacing",
50
+ "chameleon/scrollbar"
51
+ ];
52
+ const HTMLGxIdeConnectGxServer = /*@__PURE__*/ proxyCustomElement(class HTMLGxIdeConnectGxServer extends HTMLElement {
11
53
  constructor() {
12
54
  super();
13
55
  this.__registerHost();
14
56
  this.__attachShadow();
15
- this.componentDidRenderFirstTime = createEvent(this, "componentDidRenderFirstTime", 7);
16
- this.renderedFirstTime = false;
17
- // 7.LISTENERS //
18
- // 8.PUBLIC METHODS API //
19
- // 9.LOCAL METHODS //
20
- this.renderServerUrls = () => {
21
- var _a;
22
- if ((_a = this.serverUrls) === null || _a === void 0 ? void 0 : _a.length) {
23
- return this.serverUrls.map(serverUrl => {
24
- return h("gxg-combo-box-item", null, serverUrl);
25
- });
26
- }
27
- return [];
28
- };
29
- this.continueWithGxServerHandler = (event) => {
30
- this.displayLoginControls = !event.detail.value;
31
- };
32
- this.evaluateDisplayLoginControls = () => {
33
- if (this.enableUserLogged) {
34
- this.displayLoginControls = false;
35
- }
36
- else {
37
- this.displayLoginControls = true;
38
- }
39
- };
40
- this.connectHandler = () => {
41
- if (this.connectCallback) {
42
- this.connectCallback({
43
- serverUrl: this.serverURLEl.value,
44
- continueWithGeneXusAccount: this.continueWithGeneXusAccountEl.checked,
45
- user: this.userNameEl.value,
46
- password: this.passwordEl.value
47
- }).then((formSubmitResult) => {
48
- console.log(formSubmitResult);
49
- formSubmitValidation(formSubmitResult, this);
50
- });
51
- }
57
+ /**
58
+ * The component hard-coded strings translations.
59
+ */
60
+ // eslint-disable-next-line @stencil-community/own-props-must-be-private
61
+ _HTMLGxIdeConnectGxServer_componentLocale.set(this, void 0);
62
+ _HTMLGxIdeConnectGxServer_usernameRef.set(this, void 0);
63
+ _HTMLGxIdeConnectGxServer_passwordRef.set(this, void 0);
64
+ _HTMLGxIdeConnectGxServer_serverUrlRef.set(this, void 0);
65
+ _HTMLGxIdeConnectGxServer_cancelClickHandler.set(this, () => {
66
+ this.cancelCallback();
67
+ });
68
+ _HTMLGxIdeConnectGxServer_connectClickHandler.set(this, async () => {
69
+ this.connectCallback(this.gxServerConnectionData).then((formSubmitResult) => {
70
+ this.validatableControls = validateControls(formSubmitResult, this.validatableControls);
71
+ });
72
+ });
73
+ // TODO: evaluate if this should be a global helper function.
74
+ // It is used on other dialogs as well.
75
+ _HTMLGxIdeConnectGxServer_evaluateTooltipRender.set(this, (controlReference) => {
76
+ var _a, _b, _c;
77
+ return ((_b = (_a = this.validatableControls) === null || _a === void 0 ? void 0 : _a.get(controlReference === null || controlReference === void 0 ? void 0 : controlReference.id)) === null || _b === void 0 ? void 0 : _b.hasError) &&
78
+ ((_c = this.validatableControls.get(controlReference.id)) === null || _c === void 0 ? void 0 : _c.message) && (h("ch-tooltip", { class: "tooltip", actionElement: controlReference, blockAlign: config.tooltipSettings.blockAlign, inlineAlign: config.tooltipSettings.inlineAlign, delay: config.tooltipSettings.delay }, this.validatableControls.get(controlReference.id).message));
79
+ });
80
+ _HTMLGxIdeConnectGxServer_init.set(this, () => {
81
+ var _a, _b, _c, _d, _e, _f, _g, _h;
82
+ this.authenticationTypesChanged(this.authenticationTypes);
83
+ this.serverUrlsChanged(this.serverUrls);
84
+ // set initial values:
85
+ // server url
86
+ this.gxServerConnectionData.serverUrl =
87
+ ((_a = this.defaultConnectionData) === null || _a === void 0 ? void 0 : _a.serverUrl) ||
88
+ ((_b = this.serverUrlsComboBoxModel[0]) === null || _b === void 0 ? void 0 : _b.value);
89
+ // authentication type
90
+ this.gxServerConnectionData.authenticationType = {
91
+ id: ((_c = this.defaultConnectionData) === null || _c === void 0 ? void 0 : _c.authenticationType.id) ||
92
+ ((_d = this.authenticationTypesComboBoxModel[0]) === null || _d === void 0 ? void 0 : _d.value),
93
+ name: ((_e = this.defaultConnectionData) === null || _e === void 0 ? void 0 : _e.authenticationType.name) ||
94
+ ((_f = this.authenticationTypesComboBoxModel[0]) === null || _f === void 0 ? void 0 : _f.caption)
95
+ };
96
+ // user name
97
+ this.gxServerConnectionData.userName = (_g = this.defaultConnectionData) === null || _g === void 0 ? void 0 : _g.userName;
98
+ this.gxServerConnectionData.userPassword =
99
+ (_h = this.defaultConnectionData) === null || _h === void 0 ? void 0 : _h.userPassword;
100
+ });
101
+ _HTMLGxIdeConnectGxServer_initializeValidatableControls.set(this, () => {
102
+ // populate #controlsValidation with the controls that could have errors.
103
+ const validatableControls = [
104
+ __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_usernameRef, "f"),
105
+ __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_passwordRef, "f"),
106
+ __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_serverUrlRef, "f")
107
+ ];
108
+ validatableControls.forEach(validatableControl => {
109
+ if (validatableControl.id) {
110
+ this.validatableControls.set(validatableControl.id, {
111
+ reference: validatableControl,
112
+ hasError: false,
113
+ message: undefined
114
+ });
115
+ }
116
+ });
117
+ });
118
+ // handlers that update this.gxServerConnectionData:
119
+ _HTMLGxIdeConnectGxServer_serverUrlInputEventHandler.set(this, (event) => {
120
+ this.gxServerConnectionData.serverUrl = event.detail;
121
+ });
122
+ _HTMLGxIdeConnectGxServer_authenticationInputEventHandler.set(this, (event) => {
123
+ const authenticationTypeId = event.detail;
124
+ const authenticationTypeIndex = this.authenticationTypes.findIndex(authType => {
125
+ return authType.id === authenticationTypeId;
126
+ });
127
+ const authenticationTypeName = this.authenticationTypes[authenticationTypeIndex].name;
128
+ this.gxServerConnectionData.authenticationType = {
129
+ id: authenticationTypeId,
130
+ name: authenticationTypeName
131
+ };
132
+ });
133
+ _HTMLGxIdeConnectGxServer_usernameInputEventHandler.set(this, (event) => {
134
+ this.gxServerConnectionData.userName = event.detail;
135
+ });
136
+ _HTMLGxIdeConnectGxServer_passwordInputEventHandler.set(this, (event) => {
137
+ this.gxServerConnectionData.userPassword = event.detail;
138
+ });
139
+ this.authenticationTypesComboBoxModel = undefined;
140
+ this.gxServerConnectionData = {
141
+ authenticationType: {
142
+ id: null,
143
+ name: null
144
+ },
145
+ serverUrl: null,
146
+ userName: null,
147
+ userPassword: null
52
148
  };
53
- this.displayLoginControls = false;
54
- this.displayTitle = false;
55
- this.serverUrls = undefined;
56
- this.enableCustomServer = false;
57
- this.defaultConnectionData = undefined;
58
- this.enableUserLogged = false;
59
- this.connectCallback = undefined;
149
+ this.serverUrlsComboBoxModel = undefined;
150
+ this.validatableControls = new Map();
151
+ this.authenticationTypes = undefined;
60
152
  this.cancelCallback = undefined;
153
+ this.connectCallback = undefined;
154
+ this.defaultConnectionData = undefined;
155
+ this.enableCustomServer = false;
156
+ this.serverUrls = undefined;
61
157
  }
62
- // 6.COMPONENT LIFECYCLE METHODS //
63
- async componentWillLoad() {
64
- this._componentLocale = await Locale.getComponentStrings(this.el);
65
- this.evaluateDisplayLoginControls();
158
+ authenticationTypesChanged(newAuthenticationTypes) {
159
+ if (newAuthenticationTypes === null || newAuthenticationTypes === void 0 ? void 0 : newAuthenticationTypes.length) {
160
+ this.authenticationTypesComboBoxModel =
161
+ mapAuthenticationTypeToComboBoxModel(newAuthenticationTypes);
162
+ }
66
163
  }
67
- componentDidRender() {
68
- if (!this.renderedFirstTime) {
69
- this.componentDidRenderFirstTime.emit(this._componentLocale.componentName);
70
- this.renderedFirstTime = true;
164
+ serverUrlsChanged(newServerUrls) {
165
+ if (newServerUrls === null || newServerUrls === void 0 ? void 0 : newServerUrls.length) {
166
+ this.serverUrlsComboBoxModel =
167
+ mapServerUrlsToComboBoxModel(newServerUrls);
71
168
  }
72
169
  }
73
- // 10.RENDER() FUNCTION //
170
+ async componentWillLoad() {
171
+ __classPrivateFieldSet(this, _HTMLGxIdeConnectGxServer_componentLocale, await Locale.getComponentStrings(this.el), "f");
172
+ __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_init, "f").call(this);
173
+ }
174
+ async componentDidLoad() {
175
+ __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_initializeValidatableControls, "f").call(this);
176
+ }
74
177
  render() {
75
- var _a, _b, _c;
76
- return (h(Host, { class: "gx-ide-component" }, h("div", { class: "gx-ide-main-wrapper" }, h("gx-ide-container", { containerTitle: this.displayTitle ? this._componentLocale.componentName : null, slimmerFooter: config.gxIdeContainer.slimmerFooter }, h("div", { class: "wrapper" }, h("gxg-combo-box", { label: this._componentLocale.main.serverUrl, disableFilter: !this.enableCustomServer, value: (_a = this.defaultConnectionData) === null || _a === void 0 ? void 0 : _a.serverUrl, ref: el => (this.serverURLEl = el), toolTip: config.tooltip }, this.renderServerUrls()), h("gxg-form-checkbox", { label: this._componentLocale.main.continueWithGxAccount, onChange: this.continueWithGxServerHandler, checked: this.enableUserLogged, disabled: !this.enableUserLogged, ref: el => (this.continueWithGeneXusAccountEl =
77
- el) }), this.displayLoginControls ? (h("div", { class: "user-details-container" }, h("gxg-form-text", { label: this._componentLocale.main.userName, labelPosition: "above", disabled: !this.displayLoginControls, value: (_b = this.defaultConnectionData) === null || _b === void 0 ? void 0 : _b.user, ref: el => (this.userNameEl = el), toolTip: config.tooltip }), h("gxg-form-text", { label: this._componentLocale.main.password, labelPosition: "above", disabled: !this.displayLoginControls, value: (_c = this.defaultConnectionData) === null || _c === void 0 ? void 0 : _c.password, ref: el => (this.passwordEl = el), password: true, toolTip: config.tooltip }))) : null), h("gxg-button", { slot: "footer-end", type: "outlined" }, this._componentLocale.main.cancel), h("gxg-button", { slot: "footer-end", onClick: this.connectHandler }, this._componentLocale.main.connect)))));
178
+ var _a, _b, _c, _d;
179
+ return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("section", { class: "section" }, h("div", { class: "main field-group spacing-body" }, h("div", {
180
+ // server urls
181
+ class: "field field-block server-url"
182
+ }, h("label", { class: "label", htmlFor: "server-url" }, __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_componentLocale, "f").main.serverURLLabel), h("ch-combo-box-render", { id: "server-url", class: "combo-box", accessibleName: "Server Url", model: this.serverUrlsComboBoxModel, placeholder: "Select a server URL", value: (_a = this.gxServerConnectionData) === null || _a === void 0 ? void 0 : _a.serverUrl, onInput: __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_serverUrlInputEventHandler, "f"), suggest: this.enableCustomServer, suggestOptions: {
183
+ alreadyProcessed: true,
184
+ autoExpand: false,
185
+ hideMatchesAndShowNonMatches: false,
186
+ highlightMatchedItems: false,
187
+ matchCase: false,
188
+ regularExpression: false,
189
+ renderActiveItemIconOnExpand: true,
190
+ strict: false
191
+ }, ref: (el) => (__classPrivateFieldSet(this, _HTMLGxIdeConnectGxServer_serverUrlRef, el, "f")) }), __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_evaluateTooltipRender, "f").call(this, __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_serverUrlRef, "f"))), h("div", {
192
+ // authentication types
193
+ class: "field field-block authentication-type"
194
+ }, h("label", { class: "label", htmlFor: "authentication-type" }, __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_componentLocale, "f").main.authenticationTypeLabel), h("ch-combo-box-render", { id: "authentication-type", class: "combo-box", accessibleName: "Authentication Types", model: this.authenticationTypesComboBoxModel, placeholder: "Select an authentication type", value: (_b = this.gxServerConnectionData) === null || _b === void 0 ? void 0 : _b.authenticationType.id, onInput: __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_authenticationInputEventHandler, "f") })), h("div", {
195
+ // username
196
+ class: "field field-block user-name"
197
+ }, h("label", { class: "label", htmlFor: "username" }, __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_componentLocale, "f").main.usernameLabel), h("ch-edit", { type: "text", id: "username", class: "input", value: (_c = this.gxServerConnectionData) === null || _c === void 0 ? void 0 : _c.userName, onInput: __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_usernameInputEventHandler, "f"), ref: (el) => (__classPrivateFieldSet(this, _HTMLGxIdeConnectGxServer_usernameRef, el, "f")) }), __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_evaluateTooltipRender, "f").call(this, __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_usernameRef, "f"))), h("div", {
198
+ // user password
199
+ class: "field field-block user-password"
200
+ }, h("label", { class: "label", htmlFor: "password" }, __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_componentLocale, "f").main.passwordLabel), h("ch-edit", { type: "password", id: "password", class: "input", value: (_d = this.gxServerConnectionData) === null || _d === void 0 ? void 0 : _d.userPassword, onInput: __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_passwordInputEventHandler, "f"), ref: (el) => (__classPrivateFieldSet(this, _HTMLGxIdeConnectGxServer_passwordRef, el, "f")) }), __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_evaluateTooltipRender, "f").call(this, __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_passwordRef, "f")))), h("footer", { class: "control-footer-with-border spacing-body" }, h("div", { class: "buttons-spacer" }, h("button", {
201
+ // cancel button
202
+ class: "button-secondary", onClick: __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_cancelClickHandler, "f")
203
+ }, __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_componentLocale, "f").footer.cancelButtonCaption), h("button", {
204
+ // connect button
205
+ class: "button-primary", onClick: __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_connectClickHandler, "f")
206
+ }, __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_componentLocale, "f").footer.connectButtonCaption))))));
78
207
  }
79
208
  static get assetsDirs() { return ["gx-ide-assets/connect-gx-server"]; }
80
209
  get el() { return this; }
210
+ static get watchers() { return {
211
+ "authenticationTypes": ["authenticationTypesChanged"],
212
+ "serverUrls": ["serverUrlsChanged"]
213
+ }; }
81
214
  static get style() { return connectGxServerCss; }
82
215
  }, [1, "gx-ide-connect-gx-server", {
83
- "displayTitle": [4, "display-title"],
84
- "serverUrls": [16],
85
- "enableCustomServer": [4, "enable-custom-server"],
86
- "defaultConnectionData": [16],
87
- "enableUserLogged": [4, "enable-user-logged"],
88
- "connectCallback": [16],
216
+ "authenticationTypes": [16],
89
217
  "cancelCallback": [16],
90
- "displayLoginControls": [32]
218
+ "connectCallback": [16],
219
+ "defaultConnectionData": [16],
220
+ "enableCustomServer": [4, "enable-custom-server"],
221
+ "serverUrls": [16],
222
+ "authenticationTypesComboBoxModel": [32],
223
+ "gxServerConnectionData": [32],
224
+ "serverUrlsComboBoxModel": [32],
225
+ "validatableControls": [32]
226
+ }, undefined, {
227
+ "authenticationTypes": ["authenticationTypesChanged"],
228
+ "serverUrls": ["serverUrlsChanged"]
91
229
  }]);
230
+ _HTMLGxIdeConnectGxServer_componentLocale = new WeakMap(), _HTMLGxIdeConnectGxServer_usernameRef = new WeakMap(), _HTMLGxIdeConnectGxServer_passwordRef = new WeakMap(), _HTMLGxIdeConnectGxServer_serverUrlRef = new WeakMap(), _HTMLGxIdeConnectGxServer_cancelClickHandler = new WeakMap(), _HTMLGxIdeConnectGxServer_connectClickHandler = new WeakMap(), _HTMLGxIdeConnectGxServer_evaluateTooltipRender = new WeakMap(), _HTMLGxIdeConnectGxServer_init = new WeakMap(), _HTMLGxIdeConnectGxServer_initializeValidatableControls = new WeakMap(), _HTMLGxIdeConnectGxServer_serverUrlInputEventHandler = new WeakMap(), _HTMLGxIdeConnectGxServer_authenticationInputEventHandler = new WeakMap(), _HTMLGxIdeConnectGxServer_usernameInputEventHandler = new WeakMap(), _HTMLGxIdeConnectGxServer_passwordInputEventHandler = new WeakMap();
92
231
  function defineCustomElement$1() {
93
232
  if (typeof customElements === "undefined") {
94
233
  return;
95
234
  }
96
- const components = ["gx-ide-connect-gx-server", "gx-ide-container", "gx-ide-title"];
235
+ const components = ["gx-ide-connect-gx-server"];
97
236
  components.forEach(tagName => { switch (tagName) {
98
237
  case "gx-ide-connect-gx-server":
99
238
  if (!customElements.get(tagName)) {
100
- customElements.define(tagName, GxIdeConnectGxServer$1);
101
- }
102
- break;
103
- case "gx-ide-container":
104
- if (!customElements.get(tagName)) {
105
- defineCustomElement$3();
106
- }
107
- break;
108
- case "gx-ide-title":
109
- if (!customElements.get(tagName)) {
110
- defineCustomElement$2();
239
+ customElements.define(tagName, HTMLGxIdeConnectGxServer);
111
240
  }
112
241
  break;
113
242
  } });
114
243
  }
115
244
 
116
- const GxIdeConnectGxServer = GxIdeConnectGxServer$1;
245
+ const GxIdeConnectGxServer = HTMLGxIdeConnectGxServer;
117
246
  const defineCustomElement = defineCustomElement$1;
118
247
 
119
248
  export { GxIdeConnectGxServer, defineCustomElement };
@@ -1 +1 @@
1
- {"file":"gx-ide-connect-gx-server.js","mappings":";;;;;;;AAAA,MAAM,kBAAkB,GAAG,wuYAAwuY;;MCwBtvYA,sBAAoB;;;;;;QAOvB,sBAAiB,GAAG,KAAK,CAAC;;;;QAoF1B,qBAAgB,GAAG;;YACzB,IAAI,MAAA,IAAI,CAAC,UAAU,0CAAE,MAAM,EAAE;gBAC3B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS;oBAClC,OAAO,8BAAqB,SAAS,CAAsB,CAAC;iBAC7D,CAAC,CAAC;aACJ;YACD,OAAO,EAAE,CAAC;SACX,CAAC;QAEM,gCAA2B,GAAG,CACpC,KAAsE;YAEtE,IAAI,CAAC,oBAAoB,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;SACjD,CAAC;QAEM,iCAA4B,GA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E,MAAA,IAAI,CAAC,qBAAqB,0CAAE,QAAQ,EAC3C,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,UAAU,GAAG,EAA4B,CAAC,EAC3D,QAAQ,QACR,OAAO,EAAE,MAAM,CAAC,OAAO,GACR,CACb,IACJ,IAAI,CACJ,EAGN,kBAAY,IAAI,EAAC,YAAY,EAAC,IAAI,EAAC,UAAU,IAC1C,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CACvB,EACb,kBAAY,IAAI,EAAC,YAAY,EAAC,OAAO,EAAE,IAAI,CAAC,cAAc,IACvD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CACxB,CACI,CACf,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GxIdeConnectGxServer"],"sources":["src/components/connect-gx-server/connect-gx-server.scss?tag=gx-ide-connect-gx-server&encapsulation=shadow","src/components/connect-gx-server/connect-gx-server.tsx"],"sourcesContent":["@import \"../../global/gx-ide-common.scss\";\n@import \"../../global/gx-ide-mixins.scss\";\n\n:host {\n display: block;\n}\n\n.user-details-container {\n display: flex;\n gap: var(--gx-ide-form-items-gap);\n}\n\n.wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--mer-spacing--md);\n}\n","/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n State\n} from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\n/* CUSTOM IMPORTS */\nimport { config } from \"../../common/config\";\nimport { Locale } from \"../../common/locale\";\nimport { formSubmitValidation } from \"../../common/form-validation\";\nimport { ConnectionResultData } from \"../../common/types\";\n\n@Component({\n tag: \"gx-ide-connect-gx-server\",\n styleUrl: \"connect-gx-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/connect-gx-server\"]\n})\nexport class GxIdeConnectGxServer {\n // 1.OWN PROPERTIES //\n\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n private renderedFirstTime = false;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeConnectGxServerElement;\n\n private serverURLEl!: HTMLGxgComboBoxElement;\n private userNameEl!: HTMLGxgFormTextElement;\n private passwordEl!: HTMLGxgFormTextElement;\n private continueWithGeneXusAccountEl!: HTMLGxgFormCheckboxElement;\n\n // 3.STATE() VARIABLES //\n\n //\n @State() displayLoginControls: boolean = false;\n\n // 4.PUBLIC PROPERTY API | WATCH'S //\n\n /**\n * If true it displays the component title on the header\n */\n @Prop() readonly displayTitle = false;\n\n /**\n * Array of cataloged server URLs\n */\n @Prop() readonly serverUrls: string[];\n\n /**\n * 'true' if the user should be allowed to manually enter a server URL in serverUrls.\n */\n @Prop() readonly enableCustomServer: boolean = false;\n\n /**\n * Initial user values for the case in which the user returns to the login modal after a successful authentication.\n */\n @Prop() readonly defaultConnectionData?: GXServerConnectionDefault;\n\n /**\n * If 'true', shows the enabled and checked 'Continue with GX Account' checkbox. If 'false', shows the checkbox unchecked and disabled, and displays the options to enter username and password directly. Even if 'true', allow the user to deselect the checkbox and enter username and password.\n */\n @Prop() readonly enableUserLogged: boolean = false;\n\n /**\n * If 'true', shows the enabled and checked 'Continue with GX Account' checkbox. If 'false', shows the checkbox unchecked and disabled, and displays the options to enter username and password directly. Even if 'true', allow the user to deselect the checkbox and enter username and password.\n */\n @Prop() readonly connectCallback: (\n data: GXServerConnectionData\n ) => Promise<ConnectionResultData>;\n\n /**\n * Callback that allows canceling the server connection process.\n */\n @Prop() readonly cancelCallback: () => Promise<void>;\n\n // 5.EVENTS (EMIT) //\n\n /**\n * @description Gets fired when the component has rendered for the first time.\n */\n @Event() componentDidRenderFirstTime: EventEmitter<string>;\n\n // 6.COMPONENT LIFECYCLE METHODS //\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n this.evaluateDisplayLoginControls();\n }\n\n componentDidRender() {\n if (!this.renderedFirstTime) {\n this.componentDidRenderFirstTime.emit(\n this._componentLocale.componentName\n );\n this.renderedFirstTime = true;\n }\n }\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n private renderServerUrls = (): HTMLGxgComboBoxItemElement[] => {\n if (this.serverUrls?.length) {\n return this.serverUrls.map(serverUrl => {\n return <gxg-combo-box-item>{serverUrl}</gxg-combo-box-item>;\n });\n }\n return [];\n };\n\n private continueWithGxServerHandler = (\n event: CustomEvent<{ id: string; value: boolean; disabled?: boolean }>\n ) => {\n this.displayLoginControls = !event.detail.value;\n };\n\n private evaluateDisplayLoginControls = () => {\n if (this.enableUserLogged) {\n this.displayLoginControls = false;\n } else {\n this.displayLoginControls = true;\n }\n };\n\n private connectHandler = () => {\n if (this.connectCallback) {\n this.connectCallback({\n serverUrl: this.serverURLEl.value,\n continueWithGeneXusAccount: this.continueWithGeneXusAccountEl.checked,\n user: this.userNameEl.value,\n password: this.passwordEl.value\n }).then((formSubmitResult: ConnectionResultData) => {\n console.log(formSubmitResult);\n formSubmitValidation(formSubmitResult, this);\n });\n }\n };\n\n // 10.RENDER() FUNCTION //\n\n render() {\n return (\n <Host class=\"gx-ide-component\">\n <div class=\"gx-ide-main-wrapper\">\n <gx-ide-container\n containerTitle={\n this.displayTitle ? this._componentLocale.componentName : null\n }\n slimmerFooter={config.gxIdeContainer.slimmerFooter}\n >\n <div class=\"wrapper\">\n {/* server url */}\n <gxg-combo-box\n label={this._componentLocale.main.serverUrl}\n disableFilter={!this.enableCustomServer}\n value={this.defaultConnectionData?.serverUrl}\n ref={el => (this.serverURLEl = el as HTMLGxgComboBoxElement)}\n toolTip={config.tooltip}\n >\n {this.renderServerUrls()}\n </gxg-combo-box>\n\n {/* continue with GeneXus account */}\n <gxg-form-checkbox\n label={this._componentLocale.main.continueWithGxAccount}\n onChange={this.continueWithGxServerHandler}\n checked={this.enableUserLogged}\n disabled={!this.enableUserLogged}\n ref={el =>\n (this.continueWithGeneXusAccountEl =\n el as HTMLGxgFormCheckboxElement)\n }\n ></gxg-form-checkbox>\n\n {this.displayLoginControls ? (\n <div class=\"user-details-container\">\n {/* username */}\n <gxg-form-text\n label={this._componentLocale.main.userName}\n labelPosition=\"above\"\n disabled={!this.displayLoginControls}\n value={this.defaultConnectionData?.user}\n ref={el => (this.userNameEl = el as HTMLGxgFormTextElement)}\n toolTip={config.tooltip}\n ></gxg-form-text>\n {/* password */}\n <gxg-form-text\n label={this._componentLocale.main.password}\n labelPosition=\"above\"\n disabled={!this.displayLoginControls}\n value={this.defaultConnectionData?.password}\n ref={el => (this.passwordEl = el as HTMLGxgFormTextElement)}\n password\n toolTip={config.tooltip}\n ></gxg-form-text>\n </div>\n ) : null}\n </div>\n\n {/* cancel and connect buttons */}\n <gxg-button slot=\"footer-end\" type=\"outlined\">\n {this._componentLocale.main.cancel}\n </gxg-button>\n <gxg-button slot=\"footer-end\" onClick={this.connectHandler}>\n {this._componentLocale.main.connect}\n </gxg-button>\n </gx-ide-container>\n </div>\n </Host>\n );\n }\n}\n\nexport type GXServerConnectionDefault = {\n serverUrl: string;\n user: string;\n password: string;\n};\n\nexport type GXServerConnectionData = GXServerConnectionDefault & {\n continueWithGeneXusAccount: boolean;\n};\n"],"version":3}
1
+ {"file":"gx-ide-connect-gx-server.js","mappings":";;;;;AAGO,MAAM,oCAAoC,GAAG,CAClD,mBAAyC;IAEzC,OAAO,mBAAmB,CAAC,GAAG,CAAC,kBAAkB;QAC/C,OAAO;YACL,KAAK,EAAE,kBAAkB,CAAC,EAAE;YAC5B,OAAO,EAAE,kBAAkB,CAAC,IAAI;SACjC,CAAC;KACH,CAAC,CAAC;AACL,CAAC,CAAC;AAEK,MAAM,4BAA4B,GAAG,CAC1C,UAAoB;IAEpB,OAAO,UAAU,CAAC,GAAG,CAAC,SAAS;QAC7B,OAAO;YACL,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,SAAS;SACnB,CAAC;KACH,CAAC,CAAC;AACL,CAAC;;ACvBD,MAA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EAAC,OAAO,EACb,KAAK,EAAE,MAAA,IAAI,CAAC,sBAAsB,0CAAE,YAAY,EAChD,OAAO,EAAE,uBAAA,IAAI,2DAA2B,EACxC,GAAG,EAAE,CAAC,EAAqB,MACxB,uBAAA,IAAI,yCAAgB,EAAuB,MAAA,CAAC,GAEtC,EACV,uBAAA,IAAI,uDAAuB,MAA3B,IAAI,EAAwB,uBAAA,IAAI,6CAAa,CAAC,CAC3C,CACF,EAEN,cAAQ,KAAK,EAAC,yCAAyC,IACrD,WAAK,KAAK,EAAC,gBAAgB,IACzB;;YAEE,KAAK,EAAC,kBAAkB,EACxB,OAAO,EAAE,uBAAA,IAAI,oDAAoB;WAEhC,uBAAA,IAAI,iDAAiB,CAAC,MAAM,CAAC,mBAAmB,CAC1C,EAET;;YAEE,KAAK,EAAC,gBAAgB,EACtB,OAAO,EAAE,uBAAA,IAAI,qDAAqB;WAEjC,uBAAA,IAAI,iDAAiB,CAAC,MAAM,CAAC,oBAAoB,CAC3C,CACL,CACC,CACD,CACL,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/team-dev/connect-gx-server/helpers.ts","src/components/team-dev/connect-gx-server/connect-gx-server.scss?tag=gx-ide-connect-gx-server&encapsulation=shadow","src/components/team-dev/connect-gx-server/connect-gx-server.tsx"],"sourcesContent":["import { AuthenticationType } from \"./connect-gx-server\";\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\n\nexport const mapAuthenticationTypeToComboBoxModel = (\n authenticationTypes: AuthenticationType[]\n): ComboBoxModel => {\n return authenticationTypes.map(authenticationType => {\n return {\n value: authenticationType.id,\n caption: authenticationType.name\n };\n });\n};\n\nexport const mapServerUrlsToComboBoxModel = (\n serverUrls: string[]\n): ComboBoxModel => {\n return serverUrls.map(serverUrl => {\n return {\n value: serverUrl,\n caption: serverUrl\n };\n });\n};\n",":host {\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr max-content;\n}\n\n.main {\n display: grid;\n grid-template-areas:\n \"server-url server-url\"\n \"authentication-type .\"\n \"user-name user-password\";\n grid-auto-rows: max-content;\n grid-template-columns: 1fr 1fr;\n}\n\n.section {\n display: contents;\n}\n\n.authentication-type {\n grid-area: authentication-type;\n}\n.server-url {\n grid-area: server-url;\n}\n.user-name {\n grid-area: user-name;\n}\n.user-password {\n grid-area: user-password;\n}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n\n// Other Libraries\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\n// Custom Imports\nimport { config } from \"../../../common/config\";\nimport {\n mapAuthenticationTypeToComboBoxModel,\n mapServerUrlsToComboBoxModel\n} from \"./helpers\";\nimport { Locale } from \"../../../common/locale\";\nimport { FormSubmitResult } from \"../../../common/types\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../../common/form-validation\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/tab\",\n \"components/tooltip\",\n \"utils/form--full\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\n@Component({\n tag: \"gx-ide-connect-gx-server\",\n styleUrl: \"connect-gx-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/connect-gx-server\"]\n})\nexport class HTMLGxIdeConnectGxServer {\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\n @Element() el: HTMLGxIdeConnectGxServerElement;\n #usernameRef!: HTMLChEditElement;\n #passwordRef!: HTMLChEditElement;\n #serverUrlRef!: HTMLChComboBoxRenderElement;\n\n @State() authenticationTypesComboBoxModel: ComboBoxModel;\n @State() gxServerConnectionData: GXServerConnectionData = {\n authenticationType: {\n id: null,\n name: null\n },\n serverUrl: null,\n userName: null,\n userPassword: null\n };\n @State() serverUrlsComboBoxModel: ComboBoxModel;\n @State() validatableControls = new Map<string, ControlValidation>();\n\n /**\n * List of authentication types.\n */\n @Prop() readonly authenticationTypes!: AuthenticationType[];\n @Watch(\"authenticationTypes\")\n authenticationTypesChanged(newAuthenticationTypes: AuthenticationType[]) {\n if (newAuthenticationTypes?.length) {\n this.authenticationTypesComboBoxModel =\n mapAuthenticationTypeToComboBoxModel(newAuthenticationTypes);\n }\n }\n\n /**\n * Callback that must be invoked when the 'Cancel' button is pressed.\n */\n @Prop() readonly cancelCallback!: () => Promise<void>;\n\n /**\n * Callback that must be invoked when the 'Connect' button is pressed.\n */\n @Prop() readonly connectCallback!: (\n data: GXServerConnectionData\n ) => Promise<FormSubmitResult>;\n\n /**\n * Initial user values ​​for the case in which the user returns to the login modal after successful authentication.\n */\n @Prop() readonly defaultConnectionData?: GXServerConnectionData;\n\n /**\n * true if the user should be allowed to manually enter a server URL.\n */\n @Prop() readonly enableCustomServer: boolean = false;\n\n /**\n * Array of cataloged server URLs to be displayed in the combo.\n */\n @Prop() readonly serverUrls: string[];\n @Watch(\"serverUrls\")\n serverUrlsChanged(newServerUrls: string[]) {\n if (newServerUrls?.length) {\n this.serverUrlsComboBoxModel =\n mapServerUrlsToComboBoxModel(newServerUrls);\n }\n }\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n\n this.#init();\n }\n\n async componentDidLoad() {\n this.#initializeValidatableControls();\n }\n\n #cancelClickHandler = () => {\n this.cancelCallback();\n };\n\n #connectClickHandler = async () => {\n this.connectCallback(this.gxServerConnectionData).then(\n (formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n }\n );\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on other dialogs as well.\n #evaluateTooltipRender = (\n controlReference: HTMLElement\n ): HTMLChTooltipElement =>\n this.validatableControls?.get(controlReference?.id)?.hasError &&\n this.validatableControls.get(controlReference.id)?.message && (\n <ch-tooltip\n class=\"tooltip\"\n actionElement={controlReference as unknown as HTMLButtonElement}\n blockAlign={config.tooltipSettings.blockAlign}\n inlineAlign={config.tooltipSettings.inlineAlign}\n delay={config.tooltipSettings.delay}\n >\n {this.validatableControls.get(controlReference.id).message}\n </ch-tooltip>\n );\n\n #init = () => {\n this.authenticationTypesChanged(this.authenticationTypes);\n this.serverUrlsChanged(this.serverUrls);\n // set initial values:\n // server url\n this.gxServerConnectionData.serverUrl =\n this.defaultConnectionData?.serverUrl ||\n this.serverUrlsComboBoxModel[0]?.value;\n // authentication type\n this.gxServerConnectionData.authenticationType = {\n id:\n (this.defaultConnectionData?.authenticationType.id as string) ||\n this.authenticationTypesComboBoxModel[0]?.value,\n name:\n (this.defaultConnectionData?.authenticationType.name as string) ||\n this.authenticationTypesComboBoxModel[0]?.caption\n };\n\n // user name\n this.gxServerConnectionData.userName = this.defaultConnectionData?.userName;\n this.gxServerConnectionData.userPassword =\n this.defaultConnectionData?.userPassword;\n };\n\n #initializeValidatableControls = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#usernameRef,\n this.#passwordRef,\n this.#serverUrlRef\n ];\n validatableControls.forEach(validatableControl => {\n if (validatableControl.id) {\n this.validatableControls.set(validatableControl.id, {\n reference: validatableControl,\n hasError: false,\n message: undefined\n });\n }\n });\n };\n\n // handlers that update this.gxServerConnectionData:\n #serverUrlInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.serverUrl = event.detail as string;\n };\n #authenticationInputEventHandler = (\n event: CustomEvent<string> | InputEvent\n ) => {\n const authenticationTypeId = event.detail as string;\n const authenticationTypeIndex = this.authenticationTypes.findIndex(\n authType => {\n return authType.id === authenticationTypeId;\n }\n );\n const authenticationTypeName =\n this.authenticationTypes[authenticationTypeIndex].name;\n\n this.gxServerConnectionData.authenticationType = {\n id: authenticationTypeId,\n name: authenticationTypeName\n };\n };\n #usernameInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userName = event.detail as string;\n };\n #passwordInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userPassword = event.detail as string;\n };\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <section class=\"section\">\n <div class=\"main field-group spacing-body\">\n <div\n // server urls\n class=\"field field-block server-url\"\n >\n <label class=\"label\" htmlFor=\"server-url\">\n {this.#componentLocale.main.serverURLLabel}\n </label>\n <ch-combo-box-render\n id=\"server-url\"\n class=\"combo-box\"\n accessibleName=\"Server Url\"\n model={this.serverUrlsComboBoxModel}\n placeholder=\"Select a server URL\"\n value={this.gxServerConnectionData?.serverUrl}\n onInput={this.#serverUrlInputEventHandler}\n suggest={this.enableCustomServer}\n suggestOptions={{\n alreadyProcessed: true,\n autoExpand: false,\n hideMatchesAndShowNonMatches: false,\n highlightMatchedItems: false,\n matchCase: false,\n regularExpression: false,\n renderActiveItemIconOnExpand: true,\n strict: false\n }}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#serverUrlRef = el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#serverUrlRef)}\n </div>\n\n <div\n // authentication types\n class=\"field field-block authentication-type\"\n >\n <label class=\"label\" htmlFor=\"authentication-type\">\n {this.#componentLocale.main.authenticationTypeLabel}\n </label>\n <ch-combo-box-render\n id=\"authentication-type\"\n class=\"combo-box\"\n accessibleName=\"Authentication Types\"\n model={this.authenticationTypesComboBoxModel}\n placeholder=\"Select an authentication type\"\n value={this.gxServerConnectionData?.authenticationType.id}\n onInput={this.#authenticationInputEventHandler}\n ></ch-combo-box-render>\n </div>\n\n <div\n // username\n class=\"field field-block user-name\"\n >\n <label class=\"label\" htmlFor=\"username\">\n {this.#componentLocale.main.usernameLabel}\n </label>\n <ch-edit\n type=\"text\"\n id=\"username\"\n class=\"input\"\n value={this.gxServerConnectionData?.userName}\n onInput={this.#usernameInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#usernameRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#usernameRef)}\n </div>\n\n <div\n // user password\n class=\"field field-block user-password\"\n >\n <label class=\"label\" htmlFor=\"password\">\n {this.#componentLocale.main.passwordLabel}\n </label>\n <ch-edit\n type=\"password\"\n id=\"password\"\n class=\"input\"\n value={this.gxServerConnectionData?.userPassword}\n onInput={this.#passwordInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#passwordRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#passwordRef)}\n </div>\n </div>\n\n <footer class=\"control-footer-with-border spacing-body\">\n <div class=\"buttons-spacer\">\n <button\n // cancel button\n class=\"button-secondary\"\n onClick={this.#cancelClickHandler}\n >\n {this.#componentLocale.footer.cancelButtonCaption}\n </button>\n\n <button\n // connect button\n class=\"button-primary\"\n onClick={this.#connectClickHandler}\n >\n {this.#componentLocale.footer.connectButtonCaption}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type GXServerConnectionData = {\n authenticationType: AuthenticationType;\n serverUrl: string;\n userName: string;\n userPassword: string;\n};\n\nexport type AuthenticationType = {\n id: string;\n name: string;\n};\n"],"version":3}