@genexus/genexus-ide-ui 0.0.144 → 0.0.145

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 (23) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js +102 -60
  3. package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js.map +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/collection/components/create-kb-from-server/create-kb-from-server.css +25 -22
  6. package/dist/collection/components/create-kb-from-server/create-kb-from-server.js +189 -177
  7. package/dist/collection/components/create-kb-from-server/create-kb-from-server.js.map +1 -1
  8. package/dist/collection/components/create-kb-from-server/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.en.json +13 -14
  9. package/dist/components/gx-ide-create-kb-from-server.js +153 -99
  10. package/dist/components/gx-ide-create-kb-from-server.js.map +1 -1
  11. package/dist/esm/genexus-ide-ui.js +1 -1
  12. package/dist/esm/gx-ide-create-kb-from-server.entry.js +102 -60
  13. package/dist/esm/gx-ide-create-kb-from-server.entry.js.map +1 -1
  14. package/dist/esm/loader.js +1 -1
  15. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  16. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  17. package/dist/genexus-ide-ui/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.en.json +13 -14
  18. package/dist/genexus-ide-ui/{p-2191d598.entry.js → p-3051fa72.entry.js} +185 -135
  19. package/dist/genexus-ide-ui/p-3051fa72.entry.js.map +1 -0
  20. package/dist/types/components/create-kb-from-server/create-kb-from-server.d.ts +51 -49
  21. package/dist/types/components.d.ts +43 -67
  22. package/package.json +1 -1
  23. package/dist/genexus-ide-ui/p-2191d598.entry.js.map +0 -1
@@ -1,91 +1,113 @@
1
- import { r as e, c as t, a as r, h as o, H as a, g as i } from "./p-48217969.js";
1
+ import { r as t, c as e, a as r, h as a, H as o, g as i } from "./p-48217969.js";
2
2
 
3
3
  import { L as s } from "./p-74d59062.js";
4
4
 
5
- const l = ":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)}.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-container{display:flex;height:100%;width:100%;box-sizing:border-box}p{margin:0;font-size:var(--mer-font__size--xxs)}:host{display:block;border:1px solid var(--gxg-border-color--regular);background-color:var(--mer-color__surface)}.header{display:grid;gap:var(--mer-spacing--md);grid-template-rows:auto;grid-template-columns:1fr 1fr min-content;align-items:center;padding:var(--mer-spacing--sm);border-block-end:1px solid var(--mer-border-color__on-elevation--01)}.header__item{display:flex;flex-direction:column;gap:var(--mer-spacing--xxxs)}.main{display:flex;flex-direction:column;gap:var(--mer-spacing--sm);padding:var(--mer-spacing--sm)}.kbs-list{max-height:200px}.versions-container{display:flex;flex-direction:column}.versions-container__input{display:flex;gap:8px}";
5
+ import { r as l } from "./p-350f49ac.js";
6
6
 
7
- const n = class {
7
+ import { f as n } from "./p-00095d68.js";
8
+
9
+ const g = ":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)}.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-container{display:flex;height:100%;width:100%;box-sizing:border-box}p{margin:0;font-size:var(--mer-font__size--xxs)}:host{display:block;border:1px solid var(--gxg-border-color--regular);background-color:var(--mer-color__surface)}.grid-data{grid-template-columns:repeat(2, 1fr)}.grid-data-account{grid-template-columns:auto 1fr}.grid-data-account>:nth-child(1){grid-area:1/1/2/3}.grid-data-account>:nth-child(6){grid-area:4/2/5/3}.grid-data-kbs{display:flex;flex-direction:column;gap:var(--gx-ide-grid-row-gap)}.grid-data-kbs .search-kbs{width:100%;display:flex}.grid-data-kbs .box-kbs{height:150px}.grid-data-kbs-footer{display:flex}.flex{display:flex}.flex>:nth-child(2){flex:1}";
10
+
11
+ const d = class {
8
12
  constructor(a) {
9
- e(this, a);
10
- this.componentDidRenderFirstTime = t(this, "componentDidRenderFirstTime", 7);
13
+ t(this, a);
14
+ this.componentDidRenderFirstTime = e(this, "componentDidRenderFirstTime", 7);
11
15
  this.renderedFirstTime = false;
12
16
  this.shortcutsSrc = r(`./gx-ide-assets/create-kb-from-server/shortcuts.json`);
17
+ this.kbIdSelected = null;
18
+ this.authenticationTypes = [];
13
19
  // 7.LISTENERS //
14
20
  // 8.PUBLIC METHODS API //
15
21
  // 9.LOCAL METHODS //
16
- this.init = async () => {
17
- if (this.getGXserverKBsCallback) {
18
- await this.getGXserverKBsCallback({
19
- serverUrl: this.serverUrl,
20
- user: this.userName,
21
- password: this.userPassword
22
- }).then((e => {
23
- this.kbsData = e;
24
- }));
25
- }
26
- // get version option
27
- this.versionSelectedType = this.versionSelectedTypeEl.value;
22
+ this.setAuthenticationTypes = () => {
23
+ this.authenticationTypes = [ {
24
+ id: "genexus",
25
+ value: "genexus",
26
+ label: this._componentLocale.authenticationTypes.genexusAccount
27
+ }, {
28
+ id: "local",
29
+ value: "local",
30
+ label: this._componentLocale.authenticationTypes.local
31
+ } ];
28
32
  };
29
- this.cancelHandler = () => {
30
- if (this.cancelCallback) {
31
- this.cancelCallback();
32
- }
33
+ this.addEventListeners = () => {
34
+ this.serverUrlsEl.addEventListener("valueChanged", (() => {
35
+ this.reset();
36
+ }));
37
+ this.searchKBEl.addEventListener("valueChanged", (t => {
38
+ this.kbNameEl.value = "";
39
+ this.kbIdSelected = null;
40
+ this.kbSearchText = t.detail;
41
+ }));
42
+ this.listBoxEl.addEventListener("selectionChanged", (t => {
43
+ const e = t.detail.items;
44
+ let r;
45
+ if (e.length > 0) {
46
+ r = t.detail.items[0];
47
+ }
48
+ if (r) {
49
+ this.kbIdSelected = r.value;
50
+ const t = this.kbs.find((t => t.id === this.kbIdSelected));
51
+ if (t) {
52
+ this.kbNameEl.value = t.name;
53
+ }
54
+ }
55
+ }));
33
56
  };
34
- this.createHandler = async () => {
57
+ this.createKbHandler = () => {
35
58
  if (this.createKBCallback) {
36
- this.createKBCallback(this.selectedKbId, this.versionSelectedType, this.localKBNameEl.value, this.kbVersionsIds);
37
- }
38
- };
39
- this.changeConnectionHandler = async () => {
40
- if (this.changeConnectionCallback) {
41
- this.changeConnectionCallback({
42
- serverUrl: this.serverUrl,
43
- user: this.userName,
44
- password: this.userPassword
59
+ const t = this.createKBCallback({
60
+ id: this.kbIdSelected,
61
+ name: this.kbNameEl.value
45
62
  });
63
+ t.then((t => {
64
+ n(t, this);
65
+ }));
46
66
  }
47
67
  };
48
- this.renderKbs = () => this.kbsData.map((e => o("gx-ide-list-selector-item", {
49
- itemId: e.id,
50
- itemValue: e.name
51
- })));
52
- this.selectionChangedHandler = e => {
53
- this.selectedKbId = e.detail[0].itemId;
54
- };
55
- this.selectedVersionHandler = async () => {
56
- if (this.selectKBVersionsCallback) {
57
- await this.selectKBVersionsCallback(this.selectedKbId).then((e => {
58
- if (e === null || e === void 0 ? void 0 : e.length) {
59
- this.kbVersions = e;
60
- this.kbVersionsIds = e.map((e => e.id.toString()));
68
+ this.connectCallbackHandler = () => {
69
+ var t, e;
70
+ if (this.connectCallback) {
71
+ const r = this.connectCallback({
72
+ serverUrl: this.serverUrlsEl.value,
73
+ authenticationType: this.authenticationTypeEl.value,
74
+ user: (t = this.userNameEl) === null || t === void 0 ? void 0 : t.value,
75
+ password: (e = this.passwordEl) === null || e === void 0 ? void 0 : e.value
76
+ });
77
+ r.then((t => {
78
+ n(t.formResult, this);
79
+ if (t.formResult.success && t.kbs) {
80
+ this.kbs = t.kbs;
81
+ this.selectionKbDisabled = false;
61
82
  }
62
83
  }));
63
84
  }
64
85
  };
65
- this.versionsChangedHandler = e => {
66
- this.versionSelectedType = e.detail.value;
67
- };
68
- this.kbsData = [];
69
- this.kbVersions = [];
70
- this.kbVersionsIds = [];
71
- this.versionSelectedType = undefined;
86
+ this.selectionKbDisabled = true;
87
+ this.kbs = [];
88
+ this.kbSearchText = "";
72
89
  this.displayTitle = false;
73
- this.serverUrl = undefined;
74
- this.userName = undefined;
75
- this.userPassword = undefined;
76
- this.getGXserverKBsCallback = undefined;
77
- this.changeConnectionCallback = undefined;
90
+ this.connectCallback = undefined;
78
91
  this.createKBCallback = undefined;
79
- this.selectKBVersionsCallback = undefined;
80
- this.cancelCallback = undefined;
92
+ this.enableCustomServer = true;
93
+ this.kbName = undefined;
94
+ this.password = undefined;
95
+ this.serverUrls = undefined;
96
+ this.userName = undefined;
97
+ }
98
+ watchPropHandler(t) {
99
+ /* When the list of servers are updated, the first server is selected by default */
100
+ this.kbIdSelected = t[0].id;
101
+ this.kbName = t[0].name;
81
102
  }
82
103
  // 6.METHODS //
83
104
  async componentWillLoad() {
84
105
  this._componentLocale = await s.getComponentStrings(this.el);
106
+ this.setAuthenticationTypes();
85
107
  }
86
108
  componentDidLoad() {
87
- this.searchKbsEl.focus();
88
- this.init();
109
+ this.serverUrlsEl.focus();
110
+ this.addEventListeners();
89
111
  }
90
112
  componentDidRender() {
91
113
  if (!this.renderedFirstTime) {
@@ -93,87 +115,110 @@ const n = class {
93
115
  this.renderedFirstTime = true;
94
116
  }
95
117
  }
118
+ reset() {
119
+ this.kbs = [];
120
+ this.kbIdSelected = null;
121
+ this.selectionKbDisabled = true;
122
+ this.searchKBEl.value = "";
123
+ this.kbSearchText = "";
124
+ }
125
+ // 10.RENDER() FUNCTION //
96
126
  // 11.RENDER() FUNCTION //
97
127
  render() {
98
- return o(a, {
128
+ return a(o, {
99
129
  class: "gx-ide-component"
100
- }, o("div", {
130
+ }, a("div", {
101
131
  class: "gx-ide-main-wrapper"
102
- }, o("gx-ide-container", {
103
- slimmerFooter: true,
104
- noContentPadding: true,
105
- noContentGap: true,
132
+ }, a("gx-ide-container", {
106
133
  containerTitle: this.displayTitle ? this._componentLocale.componentName : null
107
- }, o("div", {
108
- class: "header"
109
- }, o("div", {
110
- class: "header__item"
111
- }, o("gxg-label", {
134
+ }, a("div", {
135
+ class: "flex"
136
+ }, a("gxg-label", {
137
+ labelPosition: "start",
138
+ class: "kb-label"
139
+ }, this._componentLocale.label.serverUrl), a("gxg-combo-box", {
140
+ disableFilter: !this.enableCustomServer,
141
+ ref: t => this.serverUrlsEl = t,
142
+ class: "server-urls-combo-box",
143
+ part: "server-urls"
144
+ }, this.serverUrls ? l("gxg-combo-box-item", this.serverUrls.map((t => ({
145
+ id: t,
146
+ label: t,
147
+ value: t
148
+ }))), "server-urls") : null)), a("div", {
149
+ class: "grid grid-data"
150
+ }, a("div", null, a("div", {
151
+ class: "grid grid-data-account"
152
+ }, a("gxg-combo-box", {
153
+ "tool-tip": true,
154
+ disableFilter: true,
155
+ value: this.authenticationTypes[0].id,
156
+ ref: t => this.authenticationTypeEl = t,
157
+ class: "authentication-type",
158
+ part: "authentication-type",
159
+ onValueChanged: this.evaluateAuthenticationType
160
+ }, l("gxg-combo-box-item", this.authenticationTypes, "authentication-type")), a("gxg-label", {
112
161
  labelPosition: "start",
113
162
  class: "kb-label"
114
- }, this._componentLocale.header.serverUrl), o("p", null, this.serverUrl)), o("div", {
115
- class: "header__item"
116
- }, o("gxg-label", {
163
+ }, `${this._componentLocale.label.userName}:`), a("gxg-form-text", {
164
+ ref: t => this.userNameEl = t,
165
+ "tool-tip": true,
166
+ value: this.userName,
167
+ class: "user-name",
168
+ part: "user-name"
169
+ }), a("gxg-label", {
117
170
  labelPosition: "start",
118
171
  class: "kb-label"
119
- }, this._componentLocale.header.user), o("p", null, this.userName)), o("gxg-button", {
120
- type: "secondary-text-only",
121
- class: "header__button",
122
- onClick: this.changeConnectionHandler
123
- }, this._componentLocale.header.change)), o("main", {
124
- class: "main"
125
- }, o("gxg-form-text", {
126
- icon: "gemini-tools/search",
127
- iconPosition: "start",
128
- placeholder: this._componentLocale.main.searchKB,
129
- maxWidth: "300px",
130
- ref: e => this.searchKbsEl = e
131
- }), o("gx-ide-list-selector", {
132
- listName: "kbs-list",
133
- ellipsis: true,
134
- onSelectionChanged: this.selectionChangedHandler,
135
- class: "kbs-list"
136
- }, this.renderKbs()), o("gxg-form-radio-group", {
137
- row: true,
138
- onChange: this.versionsChangedHandler,
139
- ref: e => this.versionSelectedTypeEl = e
140
- }, o("gxg-form-radio", {
141
- label: this._componentLocale.main.trunkVersion,
142
- id: "Trunk",
143
- value: "Trunk"
144
- }), o("gxg-form-radio", {
145
- label: this._componentLocale.main.allVersions,
146
- id: "All",
147
- value: "All"
148
- }), o("gxg-form-radio", {
149
- label: this._componentLocale.main.selectVersion,
150
- id: "Select",
151
- value: "Select"
152
- })), o("div", {
153
- class: "versions-container"
154
- }, o("gxg-label", {
155
- labelPosition: "above"
156
- }, this._componentLocale.main.selectVersion), o("div", {
157
- class: "versions-container__input"
158
- }, o("gxg-form-text", {
159
- readonly: true,
160
- value: `${this.kbVersions.length.toString()} versions selected`
161
- }), o("gxg-button", {
162
- type: "secondary-icon-only",
163
- icon: "gemini-tools/show-more-horizontal",
164
- onClick: this.selectedVersionHandler
165
- }))), o("gxg-form-text", {
166
- label: "Local KB Name",
167
- labelPosition: "above",
168
- ref: e => this.localKBNameEl = e
169
- })), o("gxg-button", {
170
- type: "outlined",
171
- slot: "footer-end",
172
- onClick: this.cancelHandler
173
- }, this._componentLocale.footer.cancel), o("gxg-button", {
174
- onClick: this.createHandler,
175
- slot: "footer-end"
176
- }, this._componentLocale.footer.create))), o("gxg-shortcuts", {
172
+ }, `${this._componentLocale.label.password}:`), a("gxg-form-text", {
173
+ "tool-tip": true,
174
+ password: true,
175
+ ref: t => this.passwordEl = t,
176
+ value: this.password,
177
+ class: "password",
178
+ part: "password"
179
+ }), a("div", null, a("gxg-button", {
180
+ id: "button-connect",
181
+ type: "primary-text-only",
182
+ onClick: this.connectCallbackHandler,
183
+ part: "button-connect"
184
+ }, this._componentLocale.buttons.connect)))), a("div", {
185
+ class: "grid"
186
+ }, a("div", {
187
+ class: "grid-data-kbs"
188
+ }, a("div", {
189
+ class: "search-kbs"
190
+ }, a("gxg-form-text", {
191
+ ref: t => this.searchKBEl = t,
192
+ class: "search-kb-input",
193
+ part: "search-kb",
194
+ disabled: this.selectionKbDisabled,
195
+ placeholder: this._componentLocale.label.searchKbs
196
+ })), a("div", {
197
+ class: "box-kbs"
198
+ }, a("gxg-list-box", {
199
+ singleSelection: true,
200
+ disabled: this.selectionKbDisabled,
201
+ ref: t => this.listBoxEl = t,
202
+ part: "kbs"
203
+ }, this.kbs.filter((t => t.name.toLowerCase().includes(this.kbSearchText.toLowerCase()))).map((t => a("gxg-list-box-item", {
204
+ value: t.id,
205
+ key: t.id
206
+ }, t.name)))))), a("div", {
207
+ class: "grid grid-data-kbs-footer"
208
+ }, a("gxg-form-text", {
209
+ ref: t => this.kbNameEl = t,
210
+ label: this._componentLocale.localKb,
211
+ value: this.kbName,
212
+ class: "kb-name",
213
+ part: "kb-name",
214
+ disabled: this.selectionKbDisabled
215
+ }), a("div", null, a("gxg-button", {
216
+ id: "button-create",
217
+ type: "primary-text-only",
218
+ onClick: this.createKbHandler,
219
+ part: "button-create",
220
+ disabled: this.selectionKbDisabled
221
+ }, this._componentLocale.buttons.create))))))), a("gxg-shortcuts", {
177
222
  src: this.shortcutsSrc
178
223
  }));
179
224
  }
@@ -183,9 +228,14 @@ const n = class {
183
228
  get el() {
184
229
  return i(this);
185
230
  }
231
+ static get watchers() {
232
+ return {
233
+ kbs: [ "watchPropHandler" ]
234
+ };
235
+ }
186
236
  };
187
237
 
188
- n.style = l;
238
+ d.style = g;
189
239
 
190
- export { n as gx_ide_create_kb_from_server };
191
- //# sourceMappingURL=p-2191d598.entry.js.map
240
+ export { d as gx_ide_create_kb_from_server };
241
+ //# sourceMappingURL=p-3051fa72.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createKbFromServerCss","GxIdeCreateKbFromServer","this","renderedFirstTime","shortcutsSrc","getAssetPath","kbIdSelected","authenticationTypes","setAuthenticationTypes","id","value","label","_componentLocale","genexusAccount","local","addEventListeners","serverUrlsEl","addEventListener","reset","searchKBEl","e","kbNameEl","kbSearchText","detail","listBoxEl","ev","selectedItems","items","selectedItem","length","kbSelected","kbs","find","kb","name","createKbHandler","createKBCallback","createKBCallbackPromise","then","formSubmitResult","formSubmitValidation","connectCallbackHandler","connectCallback","connectCallbackPromise","serverUrl","authenticationType","authenticationTypeEl","user","_a","userNameEl","password","_b","passwordEl","connectionResultData","formResult","success","selectionKbDisabled","watchPropHandler","newKbs","kbName","componentWillLoad","Locale","getComponentStrings","el","componentDidLoad","focus","componentDidRender","componentDidRenderFirstTime","emit","componentName","render","h","Host","class","containerTitle","displayTitle","labelPosition","disableFilter","enableCustomServer","ref","part","serverUrls","renderFormItems","map","sUrl","onValueChanged","evaluateAuthenticationType","userName","type","onClick","buttons","connect","disabled","placeholder","searchKbs","singleSelection","filter","toLowerCase","includes","key","localKb","create","src"],"sources":["src/components/create-kb-from-server/create-kb-from-server.scss?tag=gx-ide-create-kb-from-server&encapsulation=shadow","src/components/create-kb-from-server/create-kb-from-server.tsx"],"sourcesContent":["@import \"../../global/gx-ide-common.scss\";\n@import \"../../global/gx-ide-mixins.scss\";\n\n:host {\n display: block;\n border: 1px solid var(--gxg-border-color--regular);\n background-color: var(--mer-color__surface);\n}\n:host(.gxi-create-kb-from-server--shadow) {\n}\n\n.grid-data {\n grid-template-columns: repeat(2, 1fr);\n}\n.grid-data-account {\n grid-template-columns: auto 1fr;\n > :nth-child(1) {\n grid-area: 1 / 1 / 2 / 3;\n }\n > :nth-child(6) {\n grid-area: 4 / 2 / 5 / 3;\n }\n}\n.grid-data-kbs {\n display: flex;\n flex-direction: column;\n gap: var(--gx-ide-grid-row-gap);\n .search-kbs {\n width: 100%;\n display: flex;\n }\n .box-kbs {\n height: 150px;\n }\n}\n.grid-data-kbs-footer {\n display: flex;\n}\n.flex {\n display: flex;\n > :nth-child(2) {\n flex: 1;\n }\n}\n","/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n State,\n getAssetPath,\n Watch\n} from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\nimport { SelectionChangedEvent } from \"@genexus/gemini/dist/types/components/list-box/list-box\";\n/* CUSTOM IMPORTS */\nimport { GxOption } from \"../../common/types\";\nimport { Locale } from \"../../common/locale\";\nimport { renderFormItems } from \"../../common/common\";\nimport {\n FormSubmitResult,\n GxServerAuthenticationType\n} from \"../../common/types\";\nimport { formSubmitValidation } from \"../../common/form-validation\";\n\n@Component({\n tag: \"gx-ide-create-kb-from-server\",\n styleUrl: \"create-kb-from-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/create-kb-from-server\"]\n})\nexport class GxIdeCreateKbFromServer {\n [key: string]: any;\n\n /*\nINDEX:\n1.OWN PROPERTIES\n2.REFERENCE TO ELEMENTS\n3.STATE() VARIABLES\n4.PUBLIC PROPERTY API | WATCH'S\n5.EVENTS (EMIT)\n6.METHODS\n7.LISTENERS\n8.PUBLIC METHODS API\n9.LOCAL METHODS\n10.RENDER() FUNCTION\n*/\n\n // 1.OWN PROPERTIES //\n\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n private renderedFirstTime = false;\n private shortcutsSrc = getAssetPath(\n `./gx-ide-assets/create-kb-from-server/shortcuts.json`\n );\n\n /* References needed to collect data with \"Connect\" and \"Create\" buttons submit*/\n private authenticationTypeEl!: HTMLGxgComboBoxElement;\n private serverUrlsEl!: HTMLGxgComboBoxElement;\n private kbNameEl!: HTMLGxgFormTextElement;\n private passwordEl!: HTMLGxgFormTextElement;\n private userNameEl!: HTMLGxgFormTextElement;\n private searchKBEl!: HTMLGxgFormTextElement;\n private listBoxEl!: HTMLElement;\n private kbIdSelected: string = null;\n private authenticationTypes: GxOption[] = [];\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeCreateKbFromServerElement;\n\n // 3.STATE() VARIABLES //\n\n /**\n * Disabled or not the part for select and create the KB\n */\n @State() selectionKbDisabled = true;\n\n /**\n * KBs that return from connect to the server\n */\n\n @State() kbs: KBData[] = [];\n @Watch(\"kbs\")\n watchPropHandler(newKbs: KBData[]) {\n /* When the list of servers are updated, the first server is selected by default */\n this.kbIdSelected = newKbs[0].id;\n this.kbName = newKbs[0].name;\n }\n\n /**\n * KBs search text\n */\n @State() kbSearchText = \"\";\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 * Callback that will be invoked when the user connect to the kb server (‘Connect’ button)\n */\n @Prop() readonly connectCallback: (\n data: GXServerConnectionData\n ) => Promise<ConnectionResultData>;\n\n /**\n * Callback that will be invoked when the user confirms KB creation (‘Create’ button)\n */\n @Prop() readonly createKBCallback: (\n data: CreateKBData\n ) => Promise<FormSubmitResult>;\n\n /**\n * If is true then the user can specify a server url that don't be in the combo box of server urls.\n */\n @Prop() readonly enableCustomServer: boolean = true;\n\n /**\n * The knowledge base default suggested name\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ mutable: true }) kbName: string;\n\n /**\n * Password for the database connection.\n */\n @Prop() readonly password: string;\n\n /**\n * Array of URLs of cataloged servers to be displayed in the combo\n */\n @Prop() readonly serverUrls!: string[];\n\n /**\n * Username for the database connection.\n */\n @Prop() readonly userName: string;\n\n // 5.EVENTS (EMIT) //\n\n /**\n * This event is emitted once just after the component is fully loaded and the first render() occurs\n */\n @Event() componentDidRenderFirstTime: EventEmitter<boolean>;\n\n // 6.METHODS //\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n this.setAuthenticationTypes();\n }\n\n componentDidLoad() {\n (this.serverUrlsEl as HTMLElement).focus();\n this.addEventListeners();\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 setAuthenticationTypes = () => {\n this.authenticationTypes = [\n {\n id: \"genexus\",\n value: \"genexus\",\n label: this._componentLocale.authenticationTypes.genexusAccount\n },\n {\n id: \"local\",\n value: \"local\",\n label: this._componentLocale.authenticationTypes.local\n }\n ];\n };\n\n private addEventListeners = () => {\n this.serverUrlsEl.addEventListener(\"valueChanged\", () => {\n this.reset();\n });\n\n this.searchKBEl.addEventListener(\n \"valueChanged\",\n (e: CustomEvent<string>) => {\n this.kbNameEl.value = \"\";\n this.kbIdSelected = null;\n this.kbSearchText = e.detail;\n }\n );\n\n this.listBoxEl.addEventListener(\n \"selectionChanged\",\n (ev: CustomEvent<SelectionChangedEvent>): void => {\n const selectedItems = ev.detail.items;\n let selectedItem;\n if (selectedItems.length > 0) {\n selectedItem = ev.detail.items[0];\n }\n if (selectedItem) {\n this.kbIdSelected = selectedItem.value;\n const kbSelected = this.kbs.find(kb => kb.id === this.kbIdSelected);\n if (kbSelected) {\n this.kbNameEl.value = kbSelected.name;\n }\n }\n }\n );\n };\n\n private reset() {\n this.kbs = [];\n this.kbIdSelected = null;\n this.selectionKbDisabled = true;\n this.searchKBEl.value = \"\";\n this.kbSearchText = \"\";\n }\n\n private createKbHandler = (): void => {\n if (this.createKBCallback) {\n const createKBCallbackPromise = this.createKBCallback({\n id: this.kbIdSelected,\n name: this.kbNameEl.value\n });\n createKBCallbackPromise.then((formSubmitResult: FormSubmitResult) => {\n formSubmitValidation(formSubmitResult, this);\n });\n }\n };\n\n private connectCallbackHandler = (): void => {\n if (this.connectCallback) {\n const connectCallbackPromise = this.connectCallback({\n serverUrl: this.serverUrlsEl.value,\n authenticationType: this.authenticationTypeEl.value,\n user: this.userNameEl?.value,\n password: this.passwordEl?.value\n });\n connectCallbackPromise.then(\n (connectionResultData: ConnectionResultData) => {\n formSubmitValidation(connectionResultData.formResult, this);\n if (\n connectionResultData.formResult.success &&\n connectionResultData.kbs\n ) {\n this.kbs = connectionResultData.kbs;\n this.selectionKbDisabled = false;\n }\n }\n );\n }\n };\n\n // 10.RENDER() FUNCTION //\n\n // 11.RENDER() FUNCTION //\n\n render(): void {\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 >\n <div class=\"flex\">\n {/* #kb name */}\n <gxg-label labelPosition=\"start\" class=\"kb-label\">\n {this._componentLocale.label.serverUrl}\n </gxg-label>\n <gxg-combo-box\n disableFilter={!this.enableCustomServer}\n ref={(el: HTMLGxgComboBoxElement) =>\n (this.serverUrlsEl = el as HTMLGxgComboBoxElement)\n }\n class=\"server-urls-combo-box\"\n part=\"server-urls\"\n >\n {this.serverUrls\n ? renderFormItems(\n \"gxg-combo-box-item\",\n this.serverUrls.map(sUrl => ({\n id: sUrl,\n label: sUrl,\n value: sUrl\n })),\n \"server-urls\"\n )\n : null}\n </gxg-combo-box>\n </div>\n <div class=\"grid grid-data\">\n <div>\n <div class=\"grid grid-data-account\">\n {/* #authentication type */}\n <gxg-combo-box\n tool-tip\n disableFilter\n value={this.authenticationTypes[0].id}\n ref={(el: HTMLGxgComboBoxElement) =>\n (this.authenticationTypeEl = el as HTMLGxgComboBoxElement)\n }\n class=\"authentication-type\"\n part=\"authentication-type\"\n onValueChanged={this.evaluateAuthenticationType}\n >\n {renderFormItems(\n \"gxg-combo-box-item\",\n this.authenticationTypes,\n \"authentication-type\"\n )}\n </gxg-combo-box>\n\n {/* #user name */}\n <gxg-label labelPosition=\"start\" class=\"kb-label\">\n {`${this._componentLocale.label.userName}:`}\n </gxg-label>\n <gxg-form-text\n ref={(el: HTMLGxgFormTextElement) =>\n (this.userNameEl = el as HTMLGxgFormTextElement)\n }\n tool-tip\n value={this.userName}\n class=\"user-name\"\n part=\"user-name\"\n ></gxg-form-text>\n\n {/* #password */}\n <gxg-label labelPosition=\"start\" class=\"kb-label\">\n {`${this._componentLocale.label.password}:`}\n </gxg-label>\n <gxg-form-text\n tool-tip\n password\n ref={(el: HTMLGxgFormTextElement) =>\n (this.passwordEl = el as HTMLGxgFormTextElement)\n }\n value={this.password}\n class=\"password\"\n part=\"password\"\n ></gxg-form-text>\n\n {/* #connect */}\n <div>\n <gxg-button\n id=\"button-connect\"\n type=\"primary-text-only\"\n onClick={this.connectCallbackHandler}\n part=\"button-connect\"\n >\n {this._componentLocale.buttons.connect}\n </gxg-button>\n </div>\n </div>\n </div>\n\n <div class=\"grid\">\n <div class=\"grid-data-kbs\">\n <div class=\"search-kbs\">\n <gxg-form-text\n ref={(el: HTMLGxgFormTextElement) =>\n (this.searchKBEl = el as HTMLGxgFormTextElement)\n }\n class=\"search-kb-input\"\n part=\"search-kb\"\n disabled={this.selectionKbDisabled}\n placeholder={this._componentLocale.label.searchKbs}\n ></gxg-form-text>\n </div>\n <div class=\"box-kbs\">\n <gxg-list-box\n singleSelection\n disabled={this.selectionKbDisabled}\n ref={(el: HTMLElement) => (this.listBoxEl = el)}\n part=\"kbs\"\n >\n {this.kbs\n .filter(kb =>\n kb.name\n .toLowerCase()\n .includes(this.kbSearchText.toLowerCase())\n )\n .map(kb => (\n <gxg-list-box-item value={kb.id} key={kb.id}>\n {kb.name}\n </gxg-list-box-item>\n ))}\n </gxg-list-box>\n </div>\n </div>\n <div class=\"grid grid-data-kbs-footer\">\n {/* #kbName */}\n <gxg-form-text\n ref={(el: HTMLGxgFormTextElement) =>\n (this.kbNameEl = el as HTMLGxgFormTextElement)\n }\n label={this._componentLocale.localKb}\n value={this.kbName}\n class=\"kb-name\"\n part=\"kb-name\"\n disabled={this.selectionKbDisabled}\n ></gxg-form-text>\n\n {/* #create button */}\n <div>\n <gxg-button\n id=\"button-create\"\n type=\"primary-text-only\"\n onClick={this.createKbHandler}\n part=\"button-create\"\n disabled={this.selectionKbDisabled}\n >\n {this._componentLocale.buttons.create}\n </gxg-button>\n </div>\n </div>\n </div>\n </div>\n </gx-ide-container>\n </div>\n <gxg-shortcuts src={this.shortcutsSrc}></gxg-shortcuts>\n </Host>\n );\n }\n}\n\nexport interface GXServerConnectionData {\n serverUrl: string;\n authenticationType: GxServerAuthenticationType;\n user: string;\n password: string;\n}\nexport type ConnectionResultData = {\n formResult: FormSubmitResult;\n kbs: KBData[];\n};\nexport interface KBData {\n id: string;\n name: string;\n}\nexport interface CreateKBData {\n id: string;\n name: string;\n}\n"],"mappings":";;;;;;;;AAAA,MAAMA,IAAwB;;MC+BjBC,IAAuB;;;;IAuB1BC,KAAAC,oBAAoB;IACpBD,KAAAE,eAAeC,EACrB;IAWMH,KAAAI,eAAuB;IACvBJ,KAAAK,sBAAkC;;;;QA+GlCL,KAAAM,yBAAyB;MAC/BN,KAAKK,sBAAsB,EACzB;QACEE,IAAI;QACJC,OAAO;QACPC,OAAOT,KAAKU,iB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AAGC,YAMhBqC,EAAA;MAAKE,OAAM;OAETF,EAAA;MACEQ,KAAMhB,KACH7D,KAAKmB,WAAW0C;MAEnBpD,OAAOT,KAAKU,iBAAiBwF;MAC7B1F,OAAOR,KAAKyD;MACZc,OAAM;MACNO,MAAK;MACLY,UAAU1F,KAAKsD;QAIjBe,EAAA,aACEA,EAAA;MACE9D,IAAG;MACH+E,MAAK;MACLC,SAASvF,KAAKiC;MACd6C,MAAK;MACLY,UAAU1F,KAAKsD;OAEdtD,KAAKU,iBAAiB8E,QAAQW,eAQ7C9B,EAAA;MAAe+B,KAAKpG,KAAKE"}
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from "../../stencil-public-runtime";
2
- import { GXServerConnectionDefault } from "../connect-gx-server/connect-gx-server";
2
+ import { FormSubmitResult, GxServerAuthenticationType } from "../../common/types";
3
3
  export declare class GxIdeCreateKbFromServer {
4
4
  [key: string]: any;
5
5
  /**
@@ -8,63 +8,61 @@ export declare class GxIdeCreateKbFromServer {
8
8
  private _componentLocale;
9
9
  private renderedFirstTime;
10
10
  private shortcutsSrc;
11
- private selectedKbId;
12
- private localKBNameEl;
13
- private versionSelectedTypeEl;
14
- private searchKbsEl;
11
+ private authenticationTypeEl;
12
+ private serverUrlsEl;
13
+ private kbNameEl;
14
+ private passwordEl;
15
+ private userNameEl;
16
+ private searchKBEl;
17
+ private listBoxEl;
18
+ private kbIdSelected;
19
+ private authenticationTypes;
15
20
  el: HTMLGxIdeCreateKbFromServerElement;
16
21
  /**
17
- * KBs that return from connect to the server
18
- */
19
- kbsData: KBData[];
20
- /**
21
- * The kb versions returned from selectKBVersionsCallback
22
+ * Disabled or not the part for select and create the KB
22
23
  */
23
- kbVersions: KBVersion[];
24
+ selectionKbDisabled: boolean;
24
25
  /**
25
- * The kb versions ids returned from selectKBVersionsCallback
26
+ * KBs that return from connect to the server
26
27
  */
27
- kbVersionsIds: string[];
28
+ kbs: KBData[];
29
+ watchPropHandler(newKbs: KBData[]): void;
28
30
  /**
29
- * The version selected type
31
+ * KBs search text
30
32
  */
31
- versionSelectedType: VersionOption;
33
+ kbSearchText: string;
32
34
  /**
33
35
  * If true it displays the component title on the header
34
36
  */
35
37
  readonly displayTitle = false;
36
38
  /**
37
- * URL of the GXserver to use, not editable by the user in this instance
39
+ * Callback that will be invoked when the user connect to the kb server (‘Connect’ button)
38
40
  */
39
- readonly serverUrl: string;
41
+ readonly connectCallback: (data: GXServerConnectionData) => Promise<ConnectionResultData>;
40
42
  /**
41
- * Name of the user with whom you connected to the GXserver, it is also not editable
43
+ * Callback that will be invoked when the user confirms KB creation (‘Create’ button)
42
44
  */
43
- readonly userName: string;
44
- /**
45
- * Name of the user with whom you connected to the GXserver. It is necessary to know this information when trying to obtain the KBs using the “getGXserverKBsCallback” callback.
46
- */
47
- readonly userPassword: string;
45
+ readonly createKBCallback: (data: CreateKBData) => Promise<FormSubmitResult>;
48
46
  /**
49
- * Callback that must be invoked when invoking the dialog
47
+ * If is true then the user can specify a server url that don't be in the combo box of server urls.
50
48
  */
51
- readonly getGXserverKBsCallback: (data: GXServerConnectionDefault) => Promise<KBData[]>;
49
+ readonly enableCustomServer: boolean;
52
50
  /**
53
- * The host reopens the gx-ide-connect-server login modal with the previous data, and closes the current modal
51
+ * The knowledge base default suggested name
54
52
  */
55
- readonly changeConnectionCallback: (data: GXServerConnectionDefault) => Promise<void>;
53
+ kbName: string;
56
54
  /**
57
- * Callback that must be invoked when the 'Create KB' button is pressed. Receives the user's parameter selection to create the remote KB locally and ends the dialog.
55
+ * Password for the database connection.
58
56
  */
59
- readonly createKBCallback: (selectedKB: string, versionSelected: VersionOption, localKBName: string, versionList?: string[]) => Promise<void>;
57
+ readonly password: string;
60
58
  /**
61
- * Callback invoked by pressing the ellipsis in the version selector. Receives the KB selected by the user, and displays the version selector dialog. Returns a list of versions chosen by the user.
59
+ * Array of URLs of cataloged servers to be displayed in the combo
62
60
  */
63
- readonly selectKBVersionsCallback: (selectedKB: string) => Promise<KBVersion[]>;
61
+ readonly serverUrls: string[];
64
62
  /**
65
- * Callback that is invoked when the dialog is closed
63
+ * Username for the database connection.
66
64
  */
67
- readonly cancelCallback: () => Promise<void>;
65
+ readonly userName: string;
68
66
  /**
69
67
  * This event is emitted once just after the component is fully loaded and the first render() occurs
70
68
  */
@@ -72,24 +70,28 @@ export declare class GxIdeCreateKbFromServer {
72
70
  componentWillLoad(): Promise<void>;
73
71
  componentDidLoad(): void;
74
72
  componentDidRender(): void;
75
- private init;
76
- private cancelHandler;
77
- private createHandler;
78
- private changeConnectionHandler;
79
- private renderKbs;
80
- private selectionChangedHandler;
81
- private selectedVersionHandler;
82
- private versionsChangedHandler;
73
+ private setAuthenticationTypes;
74
+ private addEventListeners;
75
+ private reset;
76
+ private createKbHandler;
77
+ private connectCallbackHandler;
83
78
  render(): void;
84
79
  }
85
- export type KBData = {
80
+ export interface GXServerConnectionData {
81
+ serverUrl: string;
82
+ authenticationType: GxServerAuthenticationType;
83
+ user: string;
84
+ password: string;
85
+ }
86
+ export type ConnectionResultData = {
87
+ formResult: FormSubmitResult;
88
+ kbs: KBData[];
89
+ };
90
+ export interface KBData {
86
91
  id: string;
87
92
  name: string;
88
- };
89
- export type KBVersion = {
90
- id: number;
93
+ }
94
+ export interface CreateKBData {
95
+ id: string;
91
96
  name: string;
92
- type: VersionType;
93
- };
94
- export type VersionOption = "Trunk" | "All" | "Select";
95
- export type VersionType = "Branch" | "Frozen";
97
+ }