@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.
- package/dist/cjs/{form-validation-0019e158.js → form-validation-178cf461.js} +1 -19
- package/dist/cjs/form-validation-178cf461.js.map +1 -0
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-connect-gx-server.cjs.entry.js +197 -61
- package/dist/cjs/gx-ide-connect-gx-server.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js +190 -122
- package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-new-environment.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-share-kb.cjs.entry.js +149 -43
- package/dist/cjs/gx-ide-share-kb.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/team-dev/connect-gx-server/connect-gx-server.css +33 -0
- package/dist/collection/components/team-dev/connect-gx-server/connect-gx-server.js +350 -0
- package/dist/collection/components/team-dev/connect-gx-server/connect-gx-server.js.map +1 -0
- package/dist/collection/components/team-dev/connect-gx-server/gx-ide-assets/connect-gx-server/langs/connect-gx-server.lang.en.json +13 -0
- package/dist/collection/components/team-dev/connect-gx-server/gx-ide-assets/connect-gx-server/langs/connect-gx-server.lang.ja.json +3 -0
- package/dist/collection/components/team-dev/connect-gx-server/helpers.js +17 -0
- package/dist/collection/components/team-dev/connect-gx-server/helpers.js.map +1 -0
- package/dist/collection/components/team-dev/create-kb-from-server/create-kb-from-server.css +39 -0
- package/dist/collection/components/team-dev/create-kb-from-server/create-kb-from-server.js +381 -0
- package/dist/collection/components/team-dev/create-kb-from-server/create-kb-from-server.js.map +1 -0
- 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
- 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
- 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
- package/dist/collection/components/team-dev/create-kb-from-server/gx-ide-assets/create-kb-from-server/shortcuts.json +10 -0
- package/dist/collection/components/team-dev/create-kb-from-server/helpers.js +12 -0
- package/dist/collection/components/team-dev/create-kb-from-server/helpers.js.map +1 -0
- package/dist/collection/components/team-dev/share-kb/gx-ide-assets/share-kb/langs/share-kb.lang.en.json +27 -0
- package/dist/collection/components/team-dev/share-kb/gx-ide-assets/share-kb/langs/share-kb.lang.ja.json +27 -0
- package/dist/collection/components/team-dev/share-kb/gx-ide-assets/share-kb/langs/share-kb.lang.zh.json +27 -0
- package/dist/collection/components/team-dev/share-kb/gx-ide-assets/share-kb/shortcuts.json +10 -0
- package/dist/collection/components/team-dev/share-kb/helpers.js +12 -0
- package/dist/collection/components/team-dev/share-kb/helpers.js.map +1 -0
- package/dist/collection/components/team-dev/share-kb/share-kb.css +39 -0
- package/dist/collection/components/team-dev/share-kb/share-kb.js +349 -0
- package/dist/collection/components/team-dev/share-kb/share-kb.js.map +1 -0
- package/dist/components/form-validation.js +1 -18
- package/dist/components/form-validation.js.map +1 -1
- package/dist/components/gx-ide-connect-gx-server.js +211 -82
- package/dist/components/gx-ide-connect-gx-server.js.map +1 -1
- package/dist/components/gx-ide-create-kb-from-server.js +204 -148
- package/dist/components/gx-ide-create-kb-from-server.js.map +1 -1
- package/dist/components/gx-ide-share-kb.js +160 -61
- package/dist/components/gx-ide-share-kb.js.map +1 -1
- package/dist/esm/{form-validation-44b2c2a8.js → form-validation-cd0215c6.js} +2 -19
- package/dist/esm/form-validation-cd0215c6.js.map +1 -0
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-connect-gx-server.entry.js +198 -62
- package/dist/esm/gx-ide-connect-gx-server.entry.js.map +1 -1
- package/dist/esm/gx-ide-create-kb-from-server.entry.js +191 -123
- package/dist/esm/gx-ide-create-kb-from-server.entry.js.map +1 -1
- package/dist/esm/gx-ide-new-environment.entry.js +1 -1
- package/dist/esm/gx-ide-new-kb.entry.js +1 -1
- package/dist/esm/gx-ide-share-kb.entry.js +149 -43
- package/dist/esm/gx-ide-share-kb.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/connect-gx-server/langs/connect-gx-server.lang.en.json +8 -12
- package/dist/genexus-ide-ui/gx-ide-assets/connect-gx-server/langs/connect-gx-server.lang.ja.json +2 -16
- package/dist/genexus-ide-ui/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.en.json +20 -12
- package/dist/genexus-ide-ui/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.ja.json +20 -12
- package/dist/genexus-ide-ui/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.zh.json +25 -1
- package/dist/genexus-ide-ui/gx-ide-assets/create-kb-from-server/shortcuts.json +5 -2
- package/dist/genexus-ide-ui/gx-ide-assets/share-kb/langs/share-kb.lang.en.json +22 -8
- package/dist/genexus-ide-ui/gx-ide-assets/share-kb/langs/share-kb.lang.ja.json +23 -9
- package/dist/genexus-ide-ui/gx-ide-assets/share-kb/langs/share-kb.lang.zh.json +25 -1
- package/dist/genexus-ide-ui/gx-ide-assets/share-kb/shortcuts.json +5 -2
- package/dist/genexus-ide-ui/p-289c3290.js +39 -0
- package/dist/genexus-ide-ui/p-289c3290.js.map +1 -0
- package/dist/genexus-ide-ui/p-2c6dd837.entry.js +305 -0
- package/dist/genexus-ide-ui/p-2c6dd837.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-407c31c6.entry.js +264 -0
- package/dist/genexus-ide-ui/p-407c31c6.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-3adbc04c.entry.js → p-4cbaa118.entry.js} +11 -11
- package/dist/genexus-ide-ui/p-e31b4df0.entry.js +249 -0
- package/dist/genexus-ide-ui/p-e31b4df0.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-3d5fea0a.entry.js → p-ed7eada1.entry.js} +2 -2
- package/dist/types/components/team-dev/connect-gx-server/connect-gx-server.d.ts +50 -0
- package/dist/types/components/team-dev/connect-gx-server/helpers.d.ts +4 -0
- package/dist/types/components/team-dev/create-kb-from-server/create-kb-from-server.d.ts +82 -0
- package/dist/types/components/team-dev/create-kb-from-server/helpers.d.ts +3 -0
- package/dist/types/components/team-dev/share-kb/helpers.d.ts +3 -0
- package/dist/types/components/team-dev/share-kb/share-kb.d.ts +73 -0
- package/dist/types/components.d.ts +119 -151
- package/package.json +1 -1
- package/dist/cjs/form-validation-0019e158.js.map +0 -1
- package/dist/collection/components/connect-gx-server/connect-gx-server.css +0 -609
- package/dist/collection/components/connect-gx-server/connect-gx-server.js +0 -258
- package/dist/collection/components/connect-gx-server/connect-gx-server.js.map +0 -1
- package/dist/collection/components/connect-gx-server/gx-ide-assets/connect-gx-server/langs/connect-gx-server.lang.en.json +0 -17
- package/dist/collection/components/connect-gx-server/gx-ide-assets/connect-gx-server/langs/connect-gx-server.lang.ja.json +0 -17
- package/dist/collection/components/create-kb-from-server/create-kb-from-server.css +0 -638
- package/dist/collection/components/create-kb-from-server/create-kb-from-server.js +0 -349
- package/dist/collection/components/create-kb-from-server/create-kb-from-server.js.map +0 -1
- 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
- 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
- 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
- package/dist/collection/components/create-kb-from-server/gx-ide-assets/create-kb-from-server/shortcuts.json +0 -7
- package/dist/collection/components/share-kb/gx-ide-assets/share-kb/langs/share-kb.lang.en.json +0 -13
- package/dist/collection/components/share-kb/gx-ide-assets/share-kb/langs/share-kb.lang.ja.json +0 -13
- package/dist/collection/components/share-kb/gx-ide-assets/share-kb/langs/share-kb.lang.zh.json +0 -3
- package/dist/collection/components/share-kb/gx-ide-assets/share-kb/shortcuts.json +0 -7
- package/dist/collection/components/share-kb/share-kb.css +0 -636
- package/dist/collection/components/share-kb/share-kb.js +0 -189
- package/dist/collection/components/share-kb/share-kb.js.map +0 -1
- package/dist/esm/form-validation-44b2c2a8.js.map +0 -1
- package/dist/genexus-ide-ui/p-02bc66c1.entry.js +0 -129
- package/dist/genexus-ide-ui/p-02bc66c1.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-58e13823.entry.js +0 -158
- package/dist/genexus-ide-ui/p-58e13823.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-b8624c0b.js +0 -56
- package/dist/genexus-ide-ui/p-b8624c0b.js.map +0 -1
- package/dist/genexus-ide-ui/p-cf2c8b3c.entry.js +0 -241
- package/dist/genexus-ide-ui/p-cf2c8b3c.entry.js.map +0 -1
- package/dist/types/components/connect-gx-server/connect-gx-server.d.ts +0 -62
- package/dist/types/components/create-kb-from-server/create-kb-from-server.d.ts +0 -97
- package/dist/types/components/share-kb/share-kb.d.ts +0 -53
- /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
- /package/dist/genexus-ide-ui/{p-3adbc04c.entry.js.map → p-4cbaa118.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-3d5fea0a.entry.js.map → p-ed7eada1.entry.js.map} +0 -0
|
@@ -1,82 +1,218 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-27c691bc.js';
|
|
2
2
|
import { c as config } from './config-ed1f26d7.js';
|
|
3
3
|
import { L as Locale } from './locale-3c32f251.js';
|
|
4
|
-
import {
|
|
4
|
+
import { v as validateControls } from './form-validation-cd0215c6.js';
|
|
5
5
|
|
|
6
|
-
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}";
|
|
7
24
|
|
|
8
|
-
|
|
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 = class {
|
|
9
53
|
constructor(hostRef) {
|
|
10
54
|
registerInstance(this, hostRef);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
//
|
|
15
|
-
|
|
16
|
-
this
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
55
|
+
/**
|
|
56
|
+
* The component hard-coded strings translations.
|
|
57
|
+
*/
|
|
58
|
+
// eslint-disable-next-line @stencil-community/own-props-must-be-private
|
|
59
|
+
_HTMLGxIdeConnectGxServer_componentLocale.set(this, void 0);
|
|
60
|
+
_HTMLGxIdeConnectGxServer_usernameRef.set(this, void 0);
|
|
61
|
+
_HTMLGxIdeConnectGxServer_passwordRef.set(this, void 0);
|
|
62
|
+
_HTMLGxIdeConnectGxServer_serverUrlRef.set(this, void 0);
|
|
63
|
+
_HTMLGxIdeConnectGxServer_cancelClickHandler.set(this, () => {
|
|
64
|
+
this.cancelCallback();
|
|
65
|
+
});
|
|
66
|
+
_HTMLGxIdeConnectGxServer_connectClickHandler.set(this, async () => {
|
|
67
|
+
this.connectCallback(this.gxServerConnectionData).then((formSubmitResult) => {
|
|
68
|
+
this.validatableControls = validateControls(formSubmitResult, this.validatableControls);
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
// TODO: evaluate if this should be a global helper function.
|
|
72
|
+
// It is used on other dialogs as well.
|
|
73
|
+
_HTMLGxIdeConnectGxServer_evaluateTooltipRender.set(this, (controlReference) => {
|
|
74
|
+
var _a, _b, _c;
|
|
75
|
+
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) &&
|
|
76
|
+
((_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));
|
|
77
|
+
});
|
|
78
|
+
_HTMLGxIdeConnectGxServer_init.set(this, () => {
|
|
79
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
80
|
+
this.authenticationTypesChanged(this.authenticationTypes);
|
|
81
|
+
this.serverUrlsChanged(this.serverUrls);
|
|
82
|
+
// set initial values:
|
|
83
|
+
// server url
|
|
84
|
+
this.gxServerConnectionData.serverUrl =
|
|
85
|
+
((_a = this.defaultConnectionData) === null || _a === void 0 ? void 0 : _a.serverUrl) ||
|
|
86
|
+
((_b = this.serverUrlsComboBoxModel[0]) === null || _b === void 0 ? void 0 : _b.value);
|
|
87
|
+
// authentication type
|
|
88
|
+
this.gxServerConnectionData.authenticationType = {
|
|
89
|
+
id: ((_c = this.defaultConnectionData) === null || _c === void 0 ? void 0 : _c.authenticationType.id) ||
|
|
90
|
+
((_d = this.authenticationTypesComboBoxModel[0]) === null || _d === void 0 ? void 0 : _d.value),
|
|
91
|
+
name: ((_e = this.defaultConnectionData) === null || _e === void 0 ? void 0 : _e.authenticationType.name) ||
|
|
92
|
+
((_f = this.authenticationTypesComboBoxModel[0]) === null || _f === void 0 ? void 0 : _f.caption)
|
|
93
|
+
};
|
|
94
|
+
// user name
|
|
95
|
+
this.gxServerConnectionData.userName = (_g = this.defaultConnectionData) === null || _g === void 0 ? void 0 : _g.userName;
|
|
96
|
+
this.gxServerConnectionData.userPassword =
|
|
97
|
+
(_h = this.defaultConnectionData) === null || _h === void 0 ? void 0 : _h.userPassword;
|
|
98
|
+
});
|
|
99
|
+
_HTMLGxIdeConnectGxServer_initializeValidatableControls.set(this, () => {
|
|
100
|
+
// populate #controlsValidation with the controls that could have errors.
|
|
101
|
+
const validatableControls = [
|
|
102
|
+
__classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_usernameRef, "f"),
|
|
103
|
+
__classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_passwordRef, "f"),
|
|
104
|
+
__classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_serverUrlRef, "f")
|
|
105
|
+
];
|
|
106
|
+
validatableControls.forEach(validatableControl => {
|
|
107
|
+
if (validatableControl.id) {
|
|
108
|
+
this.validatableControls.set(validatableControl.id, {
|
|
109
|
+
reference: validatableControl,
|
|
110
|
+
hasError: false,
|
|
111
|
+
message: undefined
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
// handlers that update this.gxServerConnectionData:
|
|
117
|
+
_HTMLGxIdeConnectGxServer_serverUrlInputEventHandler.set(this, (event) => {
|
|
118
|
+
this.gxServerConnectionData.serverUrl = event.detail;
|
|
119
|
+
});
|
|
120
|
+
_HTMLGxIdeConnectGxServer_authenticationInputEventHandler.set(this, (event) => {
|
|
121
|
+
const authenticationTypeId = event.detail;
|
|
122
|
+
const authenticationTypeIndex = this.authenticationTypes.findIndex(authType => {
|
|
123
|
+
return authType.id === authenticationTypeId;
|
|
124
|
+
});
|
|
125
|
+
const authenticationTypeName = this.authenticationTypes[authenticationTypeIndex].name;
|
|
126
|
+
this.gxServerConnectionData.authenticationType = {
|
|
127
|
+
id: authenticationTypeId,
|
|
128
|
+
name: authenticationTypeName
|
|
129
|
+
};
|
|
130
|
+
});
|
|
131
|
+
_HTMLGxIdeConnectGxServer_usernameInputEventHandler.set(this, (event) => {
|
|
132
|
+
this.gxServerConnectionData.userName = event.detail;
|
|
133
|
+
});
|
|
134
|
+
_HTMLGxIdeConnectGxServer_passwordInputEventHandler.set(this, (event) => {
|
|
135
|
+
this.gxServerConnectionData.userPassword = event.detail;
|
|
136
|
+
});
|
|
137
|
+
this.authenticationTypesComboBoxModel = undefined;
|
|
138
|
+
this.gxServerConnectionData = {
|
|
139
|
+
authenticationType: {
|
|
140
|
+
id: null,
|
|
141
|
+
name: null
|
|
142
|
+
},
|
|
143
|
+
serverUrl: null,
|
|
144
|
+
userName: null,
|
|
145
|
+
userPassword: null
|
|
35
146
|
};
|
|
36
|
-
this.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
serverUrl: this.serverURLEl.value,
|
|
40
|
-
continueWithGeneXusAccount: this.continueWithGeneXusAccountEl.checked,
|
|
41
|
-
user: this.userNameEl.value,
|
|
42
|
-
password: this.passwordEl.value
|
|
43
|
-
}).then((formSubmitResult) => {
|
|
44
|
-
console.log(formSubmitResult);
|
|
45
|
-
formSubmitValidation(formSubmitResult, this);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
this.displayLoginControls = false;
|
|
50
|
-
this.displayTitle = false;
|
|
51
|
-
this.serverUrls = undefined;
|
|
52
|
-
this.enableCustomServer = false;
|
|
53
|
-
this.defaultConnectionData = undefined;
|
|
54
|
-
this.enableUserLogged = false;
|
|
55
|
-
this.connectCallback = undefined;
|
|
147
|
+
this.serverUrlsComboBoxModel = undefined;
|
|
148
|
+
this.validatableControls = new Map();
|
|
149
|
+
this.authenticationTypes = undefined;
|
|
56
150
|
this.cancelCallback = undefined;
|
|
151
|
+
this.connectCallback = undefined;
|
|
152
|
+
this.defaultConnectionData = undefined;
|
|
153
|
+
this.enableCustomServer = false;
|
|
154
|
+
this.serverUrls = undefined;
|
|
57
155
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
156
|
+
authenticationTypesChanged(newAuthenticationTypes) {
|
|
157
|
+
if (newAuthenticationTypes === null || newAuthenticationTypes === void 0 ? void 0 : newAuthenticationTypes.length) {
|
|
158
|
+
this.authenticationTypesComboBoxModel =
|
|
159
|
+
mapAuthenticationTypeToComboBoxModel(newAuthenticationTypes);
|
|
160
|
+
}
|
|
62
161
|
}
|
|
63
|
-
|
|
64
|
-
if (
|
|
65
|
-
this.
|
|
66
|
-
|
|
162
|
+
serverUrlsChanged(newServerUrls) {
|
|
163
|
+
if (newServerUrls === null || newServerUrls === void 0 ? void 0 : newServerUrls.length) {
|
|
164
|
+
this.serverUrlsComboBoxModel =
|
|
165
|
+
mapServerUrlsToComboBoxModel(newServerUrls);
|
|
67
166
|
}
|
|
68
167
|
}
|
|
69
|
-
|
|
168
|
+
async componentWillLoad() {
|
|
169
|
+
__classPrivateFieldSet(this, _HTMLGxIdeConnectGxServer_componentLocale, await Locale.getComponentStrings(this.el), "f");
|
|
170
|
+
__classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_init, "f").call(this);
|
|
171
|
+
}
|
|
172
|
+
async componentDidLoad() {
|
|
173
|
+
__classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_initializeValidatableControls, "f").call(this);
|
|
174
|
+
}
|
|
70
175
|
render() {
|
|
71
|
-
var _a, _b, _c;
|
|
72
|
-
return (h(Host, { class: "
|
|
73
|
-
|
|
176
|
+
var _a, _b, _c, _d;
|
|
177
|
+
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", {
|
|
178
|
+
// server urls
|
|
179
|
+
class: "field field-block server-url"
|
|
180
|
+
}, 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: {
|
|
181
|
+
alreadyProcessed: true,
|
|
182
|
+
autoExpand: false,
|
|
183
|
+
hideMatchesAndShowNonMatches: false,
|
|
184
|
+
highlightMatchedItems: false,
|
|
185
|
+
matchCase: false,
|
|
186
|
+
regularExpression: false,
|
|
187
|
+
renderActiveItemIconOnExpand: true,
|
|
188
|
+
strict: false
|
|
189
|
+
}, ref: (el) => (__classPrivateFieldSet(this, _HTMLGxIdeConnectGxServer_serverUrlRef, el, "f")) }), __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_evaluateTooltipRender, "f").call(this, __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_serverUrlRef, "f"))), h("div", {
|
|
190
|
+
// authentication types
|
|
191
|
+
class: "field field-block authentication-type"
|
|
192
|
+
}, 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", {
|
|
193
|
+
// username
|
|
194
|
+
class: "field field-block user-name"
|
|
195
|
+
}, 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", {
|
|
196
|
+
// user password
|
|
197
|
+
class: "field field-block user-password"
|
|
198
|
+
}, 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", {
|
|
199
|
+
// cancel button
|
|
200
|
+
class: "button-secondary", onClick: __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_cancelClickHandler, "f")
|
|
201
|
+
}, __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_componentLocale, "f").footer.cancelButtonCaption), h("button", {
|
|
202
|
+
// connect button
|
|
203
|
+
class: "button-primary", onClick: __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_connectClickHandler, "f")
|
|
204
|
+
}, __classPrivateFieldGet(this, _HTMLGxIdeConnectGxServer_componentLocale, "f").footer.connectButtonCaption))))));
|
|
74
205
|
}
|
|
75
206
|
static get assetsDirs() { return ["gx-ide-assets/connect-gx-server"]; }
|
|
76
207
|
get el() { return getElement(this); }
|
|
208
|
+
static get watchers() { return {
|
|
209
|
+
"authenticationTypes": ["authenticationTypesChanged"],
|
|
210
|
+
"serverUrls": ["serverUrlsChanged"]
|
|
211
|
+
}; }
|
|
77
212
|
};
|
|
78
|
-
|
|
213
|
+
_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();
|
|
214
|
+
HTMLGxIdeConnectGxServer.style = connectGxServerCss;
|
|
79
215
|
|
|
80
|
-
export {
|
|
216
|
+
export { HTMLGxIdeConnectGxServer as gx_ide_connect_gx_server };
|
|
81
217
|
|
|
82
218
|
//# sourceMappingURL=gx-ide-connect-gx-server.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gx-ide-connect-gx-server.entry.js","mappings":";;;;;AAAA,MAAM,kBAAkB,GAAG,wuYAAwuY;;MCwBtvY,oBAAoB;;;;QAOvB,sBAAiB,GAAG,KAAK,CAAC;;;;QAoF1B,qBAAgB,GAAG;;YACzB,IAAI,MAAA,IAAI,CAAC,UAAU,0CAAE,MAAM,EAAE;gBAC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C,qBAAqB,0CAAE,IAAI,EACvC,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,UAAU,GAAG,EAA4B,CAAC,EAC3D,OAAO,EAAE,MAAM,CAAC,OAAO,GACR,EAEjB,qBACE,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAC1C,aAAa,EAAC,OAAO,EACrB,QAAQ,EAAE,CAAC,IAAI,CAAC,oBAAoB,EACpC,KAAK,EAAE,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":[],"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.entry.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,IAA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uBAAA,IAAI,6CAAa,CAAC,CAC3C,EAEN;;YAEE,KAAK,EAAC,iCAAiC;WAEvC,aAAO,KAAK,EAAC,OAAO,EAAC,OAAO,EAAC,UAAU,IACpC,uBAAA,IAAI,iDAAiB,CAAC,IAAI,CAAC,aAAa,CACnC,EACR,eACE,IAAI,EAAC,UAAU,EACf,EAAE,EAAC,UAAU,EACb,KAAK,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}
|