@genexus/genexus-ide-ui 0.0.139 → 0.0.140

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 (44) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-bpm-import-files.cjs.entry.js +103 -0
  3. package/dist/cjs/gx-ide-bpm-import-files.cjs.entry.js.map +1 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/collection/collection-manifest.json +3 -3
  6. package/dist/collection/components/bpm/import-files/gx-ide-assets/bpm-import-files/langs/bpm-import-files.lang.en.json +18 -0
  7. package/dist/collection/components/bpm/import-files/helpers.js.map +1 -0
  8. package/dist/collection/components/bpm/{files-selector/files-selector.css → import-files/import-files.css} +27 -0
  9. package/dist/collection/components/bpm/{files-selector/files-selector.js → import-files/import-files.js} +32 -33
  10. package/dist/collection/components/bpm/import-files/import-files.js.map +1 -0
  11. package/dist/components/gx-ide-bpm-import-files.d.ts +11 -0
  12. package/dist/components/gx-ide-bpm-import-files.js +172 -0
  13. package/dist/components/gx-ide-bpm-import-files.js.map +1 -0
  14. package/dist/esm/genexus-ide-ui.js +1 -1
  15. package/dist/esm/gx-ide-bpm-import-files.entry.js +99 -0
  16. package/dist/esm/gx-ide-bpm-import-files.entry.js.map +1 -0
  17. package/dist/esm/loader.js +1 -1
  18. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  19. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  20. package/dist/genexus-ide-ui/gx-ide-assets/bpm-import-files/langs/bpm-import-files.lang.en.json +18 -0
  21. package/dist/genexus-ide-ui/{p-82291acd.entry.js → p-03b2a741.entry.js} +43 -19
  22. package/dist/genexus-ide-ui/p-03b2a741.entry.js.map +1 -0
  23. package/dist/types/components/bpm/{files-selector/files-selector.d.ts → import-files/import-files.d.ts} +11 -5
  24. package/dist/types/components.d.ts +34 -32
  25. package/package.json +1 -1
  26. package/dist/cjs/gx-ide-bpm-files-selector.cjs.entry.js +0 -101
  27. package/dist/cjs/gx-ide-bpm-files-selector.cjs.entry.js.map +0 -1
  28. package/dist/collection/components/bpm/files-selector/files-selector.js.map +0 -1
  29. package/dist/collection/components/bpm/files-selector/gx-ide-assets/bpm-files-selector/langs/bpm-files-selector.lang.en.json +0 -14
  30. package/dist/collection/components/bpm/files-selector/helpers.js.map +0 -1
  31. package/dist/components/gx-ide-bpm-files-selector.d.ts +0 -11
  32. package/dist/components/gx-ide-bpm-files-selector.js +0 -164
  33. package/dist/components/gx-ide-bpm-files-selector.js.map +0 -1
  34. package/dist/esm/gx-ide-bpm-files-selector.entry.js +0 -97
  35. package/dist/esm/gx-ide-bpm-files-selector.entry.js.map +0 -1
  36. package/dist/genexus-ide-ui/gx-ide-assets/bpm-files-selector/langs/bpm-files-selector.lang.en.json +0 -14
  37. package/dist/genexus-ide-ui/p-82291acd.entry.js.map +0 -1
  38. package/dist/types/components/bpm/import-gxpm/import-gxpm.d.ts +0 -21
  39. /package/dist/collection/components/bpm/{files-selector/gx-ide-assets/bpm-files-selector/langs/bpm-files-selector.lang.ja.json → import-files/gx-ide-assets/bpm-import-files/langs/bpm-import-files.lang.ja.json} +0 -0
  40. /package/dist/collection/components/bpm/{files-selector/gx-ide-assets/bpm-files-selector/langs/bpm-files-selector.lang.zh.json → import-files/gx-ide-assets/bpm-import-files/langs/bpm-import-files.lang.zh.json} +0 -0
  41. /package/dist/collection/components/bpm/{files-selector → import-files}/helpers.js +0 -0
  42. /package/dist/genexus-ide-ui/gx-ide-assets/{bpm-files-selector/langs/bpm-files-selector.lang.ja.json → bpm-import-files/langs/bpm-import-files.lang.ja.json} +0 -0
  43. /package/dist/genexus-ide-ui/gx-ide-assets/{bpm-files-selector/langs/bpm-files-selector.lang.zh.json → bpm-import-files/langs/bpm-import-files.lang.zh.json} +0 -0
  44. /package/dist/types/components/bpm/{files-selector → import-files}/helpers.d.ts +0 -0
@@ -23,7 +23,7 @@ const filesToListItemsData = t => {
23
23
  return e;
24
24
  };
25
25
 
26
- const n = ":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)}.control-wrapper{display:flex;gap:var(--mer-spacing--xs);align-items:center}.control-wrapper--vertical{flex-direction:column;align-items:start}.controls-wrapper{display:flex;gap:var(--mer-spacing--xs)}.controls-wrapper--vertical{flex-direction:column;align-items:start}.input-text{box-sizing:border-box;background-color:transparent;border:var(--mer-border__width--sm) solid var(--mer-border-color__dim);border-radius:var(--mer-border__width--lg);height:26px;color:var(--mer-text__bright);font-size:var(--mer-font__size--xxs)}.input-text--full-width{align-self:stretch}:host{display:block}.hidden-input{display:none}";
26
+ const n = ":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)}.control-wrapper{display:flex;gap:var(--mer-spacing--xs);align-items:center}.control-wrapper--vertical{flex-direction:column;align-items:start}.controls-wrapper{display:flex;gap:var(--mer-spacing--xs)}.controls-wrapper--vertical{flex-direction:column;align-items:start}.input-text{box-sizing:border-box;background-color:transparent;border:var(--mer-border__width--sm) solid var(--mer-border-color__dim);border-radius:var(--mer-border__width--lg);height:26px;color:var(--mer-text__bright);font-size:var(--mer-font__size--xxs)}.input-text--full-width{align-self:stretch}:host{display:block}.main{display:grid;grid-template-rows:1fr auto;height:100%;gap:var(--gx-ide-form-items-gap)}.path-list{width:100%;height:100%}gx-ide-list-selector::part(list){height:100%}.hidden-input{display:none}.checkbox-container{display:flex;gap:0.5rem}.footer{display:flex;flex-direction:column;gap:var(--gx-ide-form-items-gap)}";
27
27
 
28
28
  const g = class {
29
29
  constructor(r) {
@@ -42,26 +42,28 @@ const g = class {
42
42
  this.loadFileHandle = async () => {
43
43
  this.fileInput.click();
44
44
  };
45
- this.handleFileInputChange = async t => {
45
+ this.handleFileInputChange = t => {
46
46
  const e = t.target;
47
47
  if (e.files && e.files.length > 0) {
48
48
  const t = Array.from(e.files);
49
49
  const r = t.filter((t => !this.files.some((e => e.name === t.name))));
50
50
  this.files = [ ...this.files, ...r ];
51
51
  }
52
- if (this.addCallback) {
53
- await this.addCallback(this.files);
54
- }
55
52
  this.fileInput.value = null;
56
53
  };
54
+ this.confirmCallbackHandle = async () => {
55
+ if (this.confirmCallback && this.files.length > 0) {
56
+ const t = {
57
+ automaticBackup: this.automaticBackupEl.checked,
58
+ files: this.files
59
+ };
60
+ await this.confirmCallback(t);
61
+ }
62
+ };
57
63
  this.removeFiles = t => {
58
- const e = this.files.filter((e => t.includes(e.name)));
59
64
  this.files = this.files.filter((e => !t.includes(e.name)));
60
- if (this.removeCallback) {
61
- this.removeCallback(e);
62
- this.selectedFiles = [];
63
- this.fileInput.value = null;
64
- }
65
+ this.selectedFiles = [];
66
+ this.fileInput.value = null;
65
67
  };
66
68
  this.handleRemoveButtonClick = () => {
67
69
  this.removeFiles(this.selectedFiles);
@@ -70,8 +72,8 @@ const g = class {
70
72
  this.selectedFiles = [];
71
73
  this.displayTitle = false;
72
74
  this.allowedExtensions = undefined;
73
- this.addCallback = undefined;
74
- this.removeCallback = undefined;
75
+ this.confirmCallback = undefined;
76
+ this.cancelCallback = undefined;
75
77
  }
76
78
  // 6.COMPONENT LIFECYCLE METHODS //
77
79
  async componentWillLoad() {
@@ -93,17 +95,33 @@ const g = class {
93
95
  }, r("gx-ide-container", {
94
96
  containerTitle: this.displayTitle ? this._componentLocale.componentName : null,
95
97
  slimmerFooter: i.gxIdeContainer.slimmerFooter
98
+ }, r("div", {
99
+ class: "main"
100
+ }, r("div", {
101
+ class: "controls-wrapper controls-wrapper--vertical"
96
102
  }, r("label", {
97
103
  htmlFor: "path-list"
98
104
  }, this._componentLocale.main.listLabel), r("gx-ide-list-selector", {
99
105
  id: "path-list",
100
106
  type: "multi-selection",
101
107
  listName: "path-list",
102
- noListBorder: true,
103
108
  ordered: true,
104
109
  onSelectionChanged: this.fileSelectionChangedHandler,
105
110
  class: "path-list"
106
- }, l(filesToListItemsData(this.files))), r("div", {
111
+ }, l(filesToListItemsData(this.files)))), r("div", {
112
+ class: "footer"
113
+ }, r("div", {
114
+ class: "checkbox-container"
115
+ }, r("ch-checkbox", {
116
+ id: "automatic-backup",
117
+ accessibleName: this._componentLocale.main.automaticBackupLabel,
118
+ checkedValue: "true",
119
+ unCheckedValue: "false",
120
+ value: "checked",
121
+ ref: t => this.automaticBackupEl = t
122
+ }), r("label", {
123
+ htmlFor: "automatic-backup"
124
+ }, this._componentLocale.main.automaticBackupLabel)), r("div", {
107
125
  class: "controls-wrapper"
108
126
  }, r("input", {
109
127
  type: "file",
@@ -118,10 +136,16 @@ const g = class {
118
136
  }, this._componentLocale.main.addFilesButton), r("button", {
119
137
  onClick: this.handleRemoveButtonClick,
120
138
  disabled: this.selectedFiles.length === 0
121
- }, this._componentLocale.main.removeFilesButton, " (", this.selectedFiles.length, ")")))));
139
+ }, this._componentLocale.main.removeFilesButton, " (", this.selectedFiles.length, ")")))), r("button", {
140
+ slot: "footer-end",
141
+ onClick: this.confirmCallbackHandle
142
+ }, this._componentLocale.footer.confirmButton), r("button", {
143
+ slot: "footer-end",
144
+ onClick: this.cancelCallback
145
+ }, this._componentLocale.footer.cancelButton))));
122
146
  }
123
147
  static get assetsDirs() {
124
- return [ "gx-ide-assets/bpm-files-selector" ];
148
+ return [ "gx-ide-assets/bpm-import-files" ];
125
149
  }
126
150
  get el() {
127
151
  return a(this);
@@ -130,5 +154,5 @@ const g = class {
130
154
 
131
155
  g.style = n;
132
156
 
133
- export { g as gx_ide_bpm_files_selector };
134
- //# sourceMappingURL=p-82291acd.entry.js.map
157
+ export { g as gx_ide_bpm_import_files };
158
+ //# sourceMappingURL=p-03b2a741.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["filesToListItemsData","files","itemsData","forEach","file","itemId","name","itemValue","itemIcon","undefined","itemChecked","push","importFilesCss","GxIdeTemplate","this","renderedFirstTime","fileSelectionChangedHandler","selectedItem","selectionChanged","emit","selectedFiles","Array","isArray","detail","map","item","loadFileHandle","async","fileInput","click","handleFileInputChange","event","target","length","newFiles","from","uniqueFiles","filter","newFile","some","existingFile","value","confirmCallbackHandle","confirmCallback","data","automaticBackup","automaticBackupEl","checked","removeFiles","filesToRemove","includes","handleRemoveButtonClick","componentWillLoad","_componentLocale","Locale","getComponentStrings","el","componentDidRender","componentDidRenderFirstTime","componentName","render","h","Host","class","containerTitle","displayTitle","slimmerFooter","config","gxIdeContainer","htmlFor","main","listLabel","id","type","listName","ordered","onSelectionChanged","renderListItems","accessibleName","automaticBackupLabel","checkedValue","unCheckedValue","ref","accept","_a","allowedExtensions","join","onChange","multiple","onClick","addFilesButton","disabled","removeFilesButton","slot","footer","confirmButton","cancelCallback","cancelButton"],"sources":["src/components/bpm/import-files/helpers.ts","src/components/bpm/import-files/import-files.scss?tag=gx-ide-bpm-import-files&encapsulation=shadow","src/components/bpm/import-files/import-files.tsx"],"sourcesContent":["import { ItemData } from \"../../_helpers/list-selector/list-selector-item/list-selector-item\";\n\nexport const filesToListItemsData = (files: string[] | File[]): ItemData[] => {\n const itemsData: ItemData[] = [];\n files.forEach(file => {\n const itemId = typeof file === \"string\" ? file : file.name;\n const itemValue = typeof file === \"string\" ? file : file.name;\n const itemIcon: string = undefined;\n const itemChecked: boolean = false;\n itemsData.push({\n itemId: itemId,\n itemValue: itemValue,\n itemIcon: itemIcon,\n itemChecked: itemChecked\n });\n });\n return itemsData;\n};\n","@import \"../../../global/gx-ide-common.scss\";\n@import \"../../../global/gx-ide-mixins.scss\";\n@import \"../../../global/temporary-tokens-chameleon.scss\";\n\n:host {\n display: block;\n}\n\n.main {\n display: grid;\n grid-template-rows: 1fr auto;\n height: 100%;\n gap: var(--gx-ide-form-items-gap);\n}\n.path-list {\n width: 100%;\n height: 100%;\n}\ngx-ide-list-selector::part(list) {\n height: 100%;\n}\n.hidden-input {\n display: none;\n}\n.checkbox-container {\n display: flex;\n gap: 0.5rem;\n}\n.footer {\n display: flex;\n flex-direction: column;\n gap: var(--gx-ide-form-items-gap);\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 */\nimport { CheckedItemsInfo } from \"../../_helpers/list-selector/list-selector\";\n/* CUSTOM IMPORTS */\nimport { config } from \"../../../common/config\";\nimport { Locale } from \"../../../common/locale\";\nimport { renderListItems } from \"../../../common/render-list-item\";\nimport { filesToListItemsData } from \"./helpers\";\n\n@Component({\n tag: \"gx-ide-bpm-import-files\",\n styleUrl: \"import-files.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/bpm-import-files\"]\n})\nexport class GxIdeTemplate {\n // 1.OWN PROPERTIES //\n\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n\n private renderedFirstTime = false;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeBpmImportFilesElement;\n\n private fileInput: HTMLInputElement;\n private automaticBackupEl: HTMLChCheckboxElement;\n\n // 3.STATE() VARIABLES //\n /**\n * Contains the list of files\n */\n @State() files: File[] = [];\n\n /**\n * Contains the list of selected files\n */\n @State() selectedFiles: string[] = [];\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 * Allowed extensions when 'Add files' button is pressed\n */\n @Prop() readonly allowedExtensions: string[];\n\n /**\n * Callback invoked when user press 'OK' button\n */\n @Prop() readonly confirmCallback: (data: ImportData) => Promise<boolean>;\n\n /**\n * Callback invoked when user press 'Cancel' button.\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 /**\n * @description Gets fired when something changes on items section.\n */\n @Event() selectionChanged: EventEmitter<void>;\n\n // 6.COMPONENT LIFECYCLE METHODS //\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\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 fileSelectionChangedHandler = (\n selectedItem: CustomEvent<CheckedItemsInfo>\n ) => {\n this.selectionChanged.emit();\n\n const selectedFiles = Array.isArray(selectedItem.detail)\n ? selectedItem.detail\n : [selectedItem.detail];\n\n this.selectedFiles = selectedFiles.map(item => item.itemValue);\n };\n\n private loadFileHandle = async () => {\n this.fileInput.click();\n };\n\n private handleFileInputChange = (event: Event) => {\n const fileInput = event.target as HTMLInputElement;\n\n if (fileInput.files && fileInput.files.length > 0) {\n const newFiles: File[] = Array.from(fileInput.files);\n const uniqueFiles = newFiles.filter(\n newFile =>\n !this.files.some(existingFile => existingFile.name === newFile.name)\n );\n this.files = [...this.files, ...uniqueFiles];\n }\n\n this.fileInput.value = null;\n };\n\n private confirmCallbackHandle = async () => {\n if (this.confirmCallback && this.files.length > 0) {\n const data: ImportData = {\n automaticBackup: this.automaticBackupEl.checked,\n files: this.files\n };\n\n await this.confirmCallback(data);\n }\n };\n\n private removeFiles = (filesToRemove: string[]) => {\n this.files = this.files.filter(file => !filesToRemove.includes(file.name));\n\n this.selectedFiles = [];\n this.fileInput.value = null;\n };\n\n private handleRemoveButtonClick = () => {\n this.removeFiles(this.selectedFiles);\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=\"main\">\n {/* path list*/}\n <div class=\"controls-wrapper controls-wrapper--vertical\">\n <label htmlFor=\"path-list\">\n {this._componentLocale.main.listLabel}\n </label>\n <gx-ide-list-selector\n id=\"path-list\"\n type=\"multi-selection\"\n listName=\"path-list\"\n ordered\n onSelectionChanged={this.fileSelectionChangedHandler}\n class=\"path-list\"\n >\n {renderListItems(filesToListItemsData(this.files))}\n </gx-ide-list-selector>\n </div>\n\n <div class=\"footer\">\n <div class=\"checkbox-container\">\n <ch-checkbox\n id=\"automatic-backup\"\n accessibleName={\n this._componentLocale.main.automaticBackupLabel\n }\n checkedValue=\"true\"\n unCheckedValue=\"false\"\n value=\"checked\"\n ref={el =>\n (this.automaticBackupEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n <label htmlFor=\"automatic-backup\">\n {this._componentLocale.main.automaticBackupLabel}\n </label>\n </div>\n <div class=\"controls-wrapper\">\n <input\n type=\"file\"\n id=\"input_file\"\n accept={this.allowedExtensions?.join(\", \")}\n ref={el => (this.fileInput = el as HTMLInputElement)}\n onChange={this.handleFileInputChange}\n class=\"hidden-input\"\n multiple\n />\n <button onClick={this.loadFileHandle}>\n {this._componentLocale.main.addFilesButton}\n </button>\n <button\n onClick={this.handleRemoveButtonClick}\n disabled={this.selectedFiles.length === 0}\n >\n {this._componentLocale.main.removeFilesButton} (\n {this.selectedFiles.length})\n </button>\n </div>\n </div>\n </div>\n\n <button slot=\"footer-end\" onClick={this.confirmCallbackHandle}>\n {this._componentLocale.footer.confirmButton}\n </button>\n <button slot=\"footer-end\" onClick={this.cancelCallback}>\n {this._componentLocale.footer.cancelButton}\n </button>\n </gx-ide-container>\n </div>\n </Host>\n );\n }\n}\n\nexport type ImportData = {\n files: File[];\n automaticBackup: boolean;\n};\n"],"mappings":";;;;;;;;AAEO,MAAMA,uBAAwBC;EACnC,MAAMC,IAAwB;EAC9BD,EAAME,SAAQC;IACZ,MAAMC,WAAgBD,MAAS,WAAWA,IAAOA,EAAKE;IACtD,MAAMC,WAAmBH,MAAS,WAAWA,IAAOA,EAAKE;IACzD,MAAME,IAAmBC;IACzB,MAAMC,IAAuB;IAC7BR,EAAUS,KAAK;MACbN,QAAQA;MACRE,WAAWA;MACXC,UAAUA;MACVE,aAAaA;;AACb;EAEJ,OAAOR;AAAS;;AChBlB,MAAMU,IAAiB;;MCyBVC,IAAa;;;;;IAQhBC,KAAAC,oBAAoB;;;;QA2EpBD,KAAAE,8BACNC;MAEAH,KAAKI,iBAAiBC;MAEtB,MAAMC,IAAgBC,MAAMC,QAAQL,E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OAAOG"}
@@ -5,8 +5,9 @@ export declare class GxIdeTemplate {
5
5
  */
6
6
  private _componentLocale;
7
7
  private renderedFirstTime;
8
- el: HTMLGxIdeBpmFilesSelectorElement;
8
+ el: HTMLGxIdeBpmImportFilesElement;
9
9
  private fileInput;
10
+ private automaticBackupEl;
10
11
  /**
11
12
  * Contains the list of files
12
13
  */
@@ -24,13 +25,13 @@ export declare class GxIdeTemplate {
24
25
  */
25
26
  readonly allowedExtensions: string[];
26
27
  /**
27
- * Callback invoked when user press 'Add files' button. Returns a list with selected files.
28
+ * Callback invoked when user press 'OK' button
28
29
  */
29
- readonly addCallback: (files: File[]) => Promise<void>;
30
+ readonly confirmCallback: (data: ImportData) => Promise<boolean>;
30
31
  /**
31
- * Callback invoked when remove button is pressed.
32
+ * Callback invoked when user press 'Cancel' button.
32
33
  */
33
- readonly removeCallback: (files: File[] | string[]) => Promise<void>;
34
+ readonly cancelCallback: () => Promise<void>;
34
35
  /**
35
36
  * @description Gets fired when the component has rendered for the first time.
36
37
  */
@@ -44,7 +45,12 @@ export declare class GxIdeTemplate {
44
45
  private fileSelectionChangedHandler;
45
46
  private loadFileHandle;
46
47
  private handleFileInputChange;
48
+ private confirmCallbackHandle;
47
49
  private removeFiles;
48
50
  private handleRemoveButtonClick;
49
51
  render(): any;
50
52
  }
53
+ export type ImportData = {
54
+ files: File[];
55
+ automaticBackup: boolean;
56
+ };
@@ -10,6 +10,7 @@ import { MessageType } from "./components/ai-assistant/ai-assistant";
10
10
  import { Translations } from "./components/ai-assistant/ai-message";
11
11
  import { ApplicationDeclarationData, CancelCallback, ConfirmCallback, GetDataMappingCallback, SelectApplicationCallback, SelectMappingCallback, SuggestApplicationsCallback } from "./components/bpm/application-declaration/bpm-app-declaration";
12
12
  import { CancelCallback as CancelCallback1, ConfirmCallback as ConfirmCallback1 } from "./components/bpm/assign-roles/assign-roles";
13
+ import { ImportData } from "./components/bpm/import-files/import-files";
13
14
  import { TimerDuration } from "./components/bpm/timer-duration/timer-duration";
14
15
  import { GXServerConnectionData, GXServerConnectionDefault } from "./components/connect-gx-server/connect-gx-server";
15
16
  import { ConnectionResultData, EntityData, GxOption, ImportItemResultData, ObjectType as ObjectType2 } from "./common/types";
@@ -56,6 +57,7 @@ export { MessageType } from "./components/ai-assistant/ai-assistant";
56
57
  export { Translations } from "./components/ai-assistant/ai-message";
57
58
  export { ApplicationDeclarationData, CancelCallback, ConfirmCallback, GetDataMappingCallback, SelectApplicationCallback, SelectMappingCallback, SuggestApplicationsCallback } from "./components/bpm/application-declaration/bpm-app-declaration";
58
59
  export { CancelCallback as CancelCallback1, ConfirmCallback as ConfirmCallback1 } from "./components/bpm/assign-roles/assign-roles";
60
+ export { ImportData } from "./components/bpm/import-files/import-files";
59
61
  export { TimerDuration } from "./components/bpm/timer-duration/timer-duration";
60
62
  export { GXServerConnectionData, GXServerConnectionDefault } from "./components/connect-gx-server/connect-gx-server";
61
63
  export { ConnectionResultData, EntityData, GxOption, ImportItemResultData, ObjectType as ObjectType2 } from "./common/types";
@@ -214,23 +216,23 @@ export namespace Components {
214
216
  */
215
217
  "roles": string[];
216
218
  }
217
- interface GxIdeBpmFilesSelector {
218
- /**
219
- * Callback invoked when user press 'Add files' button. Returns a list with selected files.
220
- */
221
- "addCallback": (files: File[]) => Promise<void>;
219
+ interface GxIdeBpmImportFiles {
222
220
  /**
223
221
  * Allowed extensions when 'Add files' button is pressed
224
222
  */
225
223
  "allowedExtensions": string[];
226
224
  /**
227
- * If true it displays the component title on the header
225
+ * Callback invoked when user press 'Cancel' button.
228
226
  */
229
- "displayTitle": false;
227
+ "cancelCallback": () => Promise<void>;
230
228
  /**
231
- * Callback invoked when remove button is pressed.
229
+ * Callback invoked when user press 'OK' button
232
230
  */
233
- "removeCallback": (files: File[] | string[]) => Promise<void>;
231
+ "confirmCallback": (data: ImportData) => Promise<boolean>;
232
+ /**
233
+ * If true it displays the component title on the header
234
+ */
235
+ "displayTitle": false;
234
236
  }
235
237
  interface GxIdeBpmImportGxpm {
236
238
  /**
@@ -1788,9 +1790,9 @@ export interface GxIdeBpmAssignRolesCustomEvent<T> extends CustomEvent<T> {
1788
1790
  detail: T;
1789
1791
  target: HTMLGxIdeBpmAssignRolesElement;
1790
1792
  }
1791
- export interface GxIdeBpmFilesSelectorCustomEvent<T> extends CustomEvent<T> {
1793
+ export interface GxIdeBpmImportFilesCustomEvent<T> extends CustomEvent<T> {
1792
1794
  detail: T;
1793
- target: HTMLGxIdeBpmFilesSelectorElement;
1795
+ target: HTMLGxIdeBpmImportFilesElement;
1794
1796
  }
1795
1797
  export interface GxIdeBpmImportGxpmCustomEvent<T> extends CustomEvent<T> {
1796
1798
  detail: T;
@@ -1982,23 +1984,23 @@ declare global {
1982
1984
  prototype: HTMLGxIdeBpmAssignRolesElement;
1983
1985
  new (): HTMLGxIdeBpmAssignRolesElement;
1984
1986
  };
1985
- interface HTMLGxIdeBpmFilesSelectorElementEventMap {
1987
+ interface HTMLGxIdeBpmImportFilesElementEventMap {
1986
1988
  "componentDidRenderFirstTime": string;
1987
1989
  "selectionChanged": void;
1988
1990
  }
1989
- interface HTMLGxIdeBpmFilesSelectorElement extends Components.GxIdeBpmFilesSelector, HTMLStencilElement {
1990
- addEventListener<K extends keyof HTMLGxIdeBpmFilesSelectorElementEventMap>(type: K, listener: (this: HTMLGxIdeBpmFilesSelectorElement, ev: GxIdeBpmFilesSelectorCustomEvent<HTMLGxIdeBpmFilesSelectorElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
1991
+ interface HTMLGxIdeBpmImportFilesElement extends Components.GxIdeBpmImportFiles, HTMLStencilElement {
1992
+ addEventListener<K extends keyof HTMLGxIdeBpmImportFilesElementEventMap>(type: K, listener: (this: HTMLGxIdeBpmImportFilesElement, ev: GxIdeBpmImportFilesCustomEvent<HTMLGxIdeBpmImportFilesElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
1991
1993
  addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1992
1994
  addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1993
1995
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1994
- removeEventListener<K extends keyof HTMLGxIdeBpmFilesSelectorElementEventMap>(type: K, listener: (this: HTMLGxIdeBpmFilesSelectorElement, ev: GxIdeBpmFilesSelectorCustomEvent<HTMLGxIdeBpmFilesSelectorElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
1996
+ removeEventListener<K extends keyof HTMLGxIdeBpmImportFilesElementEventMap>(type: K, listener: (this: HTMLGxIdeBpmImportFilesElement, ev: GxIdeBpmImportFilesCustomEvent<HTMLGxIdeBpmImportFilesElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
1995
1997
  removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1996
1998
  removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1997
1999
  removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1998
2000
  }
1999
- var HTMLGxIdeBpmFilesSelectorElement: {
2000
- prototype: HTMLGxIdeBpmFilesSelectorElement;
2001
- new (): HTMLGxIdeBpmFilesSelectorElement;
2001
+ var HTMLGxIdeBpmImportFilesElement: {
2002
+ prototype: HTMLGxIdeBpmImportFilesElement;
2003
+ new (): HTMLGxIdeBpmImportFilesElement;
2002
2004
  };
2003
2005
  interface HTMLGxIdeBpmImportGxpmElementEventMap {
2004
2006
  "componentDidRenderFirstTime": string;
@@ -2634,7 +2636,7 @@ declare global {
2634
2636
  "gx-ide-ai-message": HTMLGxIdeAiMessageElement;
2635
2637
  "gx-ide-bpm-app-declaration": HTMLGxIdeBpmAppDeclarationElement;
2636
2638
  "gx-ide-bpm-assign-roles": HTMLGxIdeBpmAssignRolesElement;
2637
- "gx-ide-bpm-files-selector": HTMLGxIdeBpmFilesSelectorElement;
2639
+ "gx-ide-bpm-import-files": HTMLGxIdeBpmImportFilesElement;
2638
2640
  "gx-ide-bpm-import-gxpm": HTMLGxIdeBpmImportGxpmElement;
2639
2641
  "gx-ide-bpm-timer-duration": HTMLGxIdeBpmTimerDurationElement;
2640
2642
  "gx-ide-card": HTMLGxIdeCardElement;
@@ -2800,15 +2802,19 @@ declare namespace LocalJSX {
2800
2802
  */
2801
2803
  "roles"?: string[];
2802
2804
  }
2803
- interface GxIdeBpmFilesSelector {
2804
- /**
2805
- * Callback invoked when user press 'Add files' button. Returns a list with selected files.
2806
- */
2807
- "addCallback"?: (files: File[]) => Promise<void>;
2805
+ interface GxIdeBpmImportFiles {
2808
2806
  /**
2809
2807
  * Allowed extensions when 'Add files' button is pressed
2810
2808
  */
2811
2809
  "allowedExtensions"?: string[];
2810
+ /**
2811
+ * Callback invoked when user press 'Cancel' button.
2812
+ */
2813
+ "cancelCallback"?: () => Promise<void>;
2814
+ /**
2815
+ * Callback invoked when user press 'OK' button
2816
+ */
2817
+ "confirmCallback"?: (data: ImportData) => Promise<boolean>;
2812
2818
  /**
2813
2819
  * If true it displays the component title on the header
2814
2820
  */
@@ -2816,15 +2822,11 @@ declare namespace LocalJSX {
2816
2822
  /**
2817
2823
  * @description Gets fired when the component has rendered for the first time.
2818
2824
  */
2819
- "onComponentDidRenderFirstTime"?: (event: GxIdeBpmFilesSelectorCustomEvent<string>) => void;
2825
+ "onComponentDidRenderFirstTime"?: (event: GxIdeBpmImportFilesCustomEvent<string>) => void;
2820
2826
  /**
2821
2827
  * @description Gets fired when something changes on items section.
2822
2828
  */
2823
- "onSelectionChanged"?: (event: GxIdeBpmFilesSelectorCustomEvent<void>) => void;
2824
- /**
2825
- * Callback invoked when remove button is pressed.
2826
- */
2827
- "removeCallback"?: (files: File[] | string[]) => Promise<void>;
2829
+ "onSelectionChanged"?: (event: GxIdeBpmImportFilesCustomEvent<void>) => void;
2828
2830
  }
2829
2831
  interface GxIdeBpmImportGxpm {
2830
2832
  /**
@@ -4498,7 +4500,7 @@ declare namespace LocalJSX {
4498
4500
  "gx-ide-ai-message": GxIdeAiMessage;
4499
4501
  "gx-ide-bpm-app-declaration": GxIdeBpmAppDeclaration;
4500
4502
  "gx-ide-bpm-assign-roles": GxIdeBpmAssignRoles;
4501
- "gx-ide-bpm-files-selector": GxIdeBpmFilesSelector;
4503
+ "gx-ide-bpm-import-files": GxIdeBpmImportFiles;
4502
4504
  "gx-ide-bpm-import-gxpm": GxIdeBpmImportGxpm;
4503
4505
  "gx-ide-bpm-timer-duration": GxIdeBpmTimerDuration;
4504
4506
  "gx-ide-card": GxIdeCard;
@@ -4551,7 +4553,7 @@ declare module "@stencil/core" {
4551
4553
  "gx-ide-ai-message": LocalJSX.GxIdeAiMessage & JSXBase.HTMLAttributes<HTMLGxIdeAiMessageElement>;
4552
4554
  "gx-ide-bpm-app-declaration": LocalJSX.GxIdeBpmAppDeclaration & JSXBase.HTMLAttributes<HTMLGxIdeBpmAppDeclarationElement>;
4553
4555
  "gx-ide-bpm-assign-roles": LocalJSX.GxIdeBpmAssignRoles & JSXBase.HTMLAttributes<HTMLGxIdeBpmAssignRolesElement>;
4554
- "gx-ide-bpm-files-selector": LocalJSX.GxIdeBpmFilesSelector & JSXBase.HTMLAttributes<HTMLGxIdeBpmFilesSelectorElement>;
4556
+ "gx-ide-bpm-import-files": LocalJSX.GxIdeBpmImportFiles & JSXBase.HTMLAttributes<HTMLGxIdeBpmImportFilesElement>;
4555
4557
  "gx-ide-bpm-import-gxpm": LocalJSX.GxIdeBpmImportGxpm & JSXBase.HTMLAttributes<HTMLGxIdeBpmImportGxpmElement>;
4556
4558
  "gx-ide-bpm-timer-duration": LocalJSX.GxIdeBpmTimerDuration & JSXBase.HTMLAttributes<HTMLGxIdeBpmTimerDurationElement>;
4557
4559
  "gx-ide-card": LocalJSX.GxIdeCard & JSXBase.HTMLAttributes<HTMLGxIdeCardElement>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genexus/genexus-ide-ui",
3
3
  "license": "Apache-2.0",
4
- "version": "0.0.139",
4
+ "version": "0.0.140",
5
5
  "description": "GeneXus IDE UI components",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.js",
@@ -1,101 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-5ab4492a.js');
6
- const config = require('./config-8246d533.js');
7
- const locale = require('./locale-bf43b87c.js');
8
- const renderListItem = require('./render-list-item-c7e24eb8.js');
9
-
10
- const filesToListItemsData = (files) => {
11
- const itemsData = [];
12
- files.forEach(file => {
13
- const itemId = typeof file === "string" ? file : file.name;
14
- const itemValue = typeof file === "string" ? file : file.name;
15
- const itemIcon = undefined;
16
- const itemChecked = false;
17
- itemsData.push({
18
- itemId: itemId,
19
- itemValue: itemValue,
20
- itemIcon: itemIcon,
21
- itemChecked: itemChecked
22
- });
23
- });
24
- return itemsData;
25
- };
26
-
27
- const filesSelectorCss = ":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)}.control-wrapper{display:flex;gap:var(--mer-spacing--xs);align-items:center}.control-wrapper--vertical{flex-direction:column;align-items:start}.controls-wrapper{display:flex;gap:var(--mer-spacing--xs)}.controls-wrapper--vertical{flex-direction:column;align-items:start}.input-text{box-sizing:border-box;background-color:transparent;border:var(--mer-border__width--sm) solid var(--mer-border-color__dim);border-radius:var(--mer-border__width--lg);height:26px;color:var(--mer-text__bright);font-size:var(--mer-font__size--xxs)}.input-text--full-width{align-self:stretch}:host{display:block}.hidden-input{display:none}";
28
-
29
- const GxIdeTemplate = class {
30
- constructor(hostRef) {
31
- index.registerInstance(this, hostRef);
32
- this.componentDidRenderFirstTime = index.createEvent(this, "componentDidRenderFirstTime", 7);
33
- this.selectionChanged = index.createEvent(this, "selectionChanged", 7);
34
- this.renderedFirstTime = false;
35
- // 7.LISTENERS //
36
- // 8.PUBLIC METHODS API //
37
- // 9.LOCAL METHODS //
38
- this.fileSelectionChangedHandler = (selectedItem) => {
39
- this.selectionChanged.emit();
40
- const selectedFiles = Array.isArray(selectedItem.detail)
41
- ? selectedItem.detail
42
- : [selectedItem.detail];
43
- this.selectedFiles = selectedFiles.map(item => item.itemValue);
44
- };
45
- this.loadFileHandle = async () => {
46
- this.fileInput.click();
47
- };
48
- this.handleFileInputChange = async (event) => {
49
- const fileInput = event.target;
50
- if (fileInput.files && fileInput.files.length > 0) {
51
- const newFiles = Array.from(fileInput.files);
52
- const uniqueFiles = newFiles.filter(newFile => !this.files.some(existingFile => existingFile.name === newFile.name));
53
- this.files = [...this.files, ...uniqueFiles];
54
- }
55
- if (this.addCallback) {
56
- await this.addCallback(this.files);
57
- }
58
- this.fileInput.value = null;
59
- };
60
- this.removeFiles = (filesToRemove) => {
61
- const removedFiles = this.files.filter(file => filesToRemove.includes(file.name));
62
- this.files = this.files.filter(file => !filesToRemove.includes(file.name));
63
- if (this.removeCallback) {
64
- this.removeCallback(removedFiles);
65
- this.selectedFiles = [];
66
- this.fileInput.value = null;
67
- }
68
- };
69
- this.handleRemoveButtonClick = () => {
70
- this.removeFiles(this.selectedFiles);
71
- };
72
- this.files = [];
73
- this.selectedFiles = [];
74
- this.displayTitle = false;
75
- this.allowedExtensions = undefined;
76
- this.addCallback = undefined;
77
- this.removeCallback = undefined;
78
- }
79
- // 6.COMPONENT LIFECYCLE METHODS //
80
- async componentWillLoad() {
81
- this._componentLocale = await locale.Locale.getComponentStrings(this.el);
82
- }
83
- componentDidRender() {
84
- if (!this.renderedFirstTime) {
85
- this.componentDidRenderFirstTime.emit(this._componentLocale.componentName);
86
- this.renderedFirstTime = true;
87
- }
88
- }
89
- // 10.RENDER() FUNCTION //
90
- render() {
91
- var _a;
92
- return (index.h(index.Host, { class: "gx-ide-component" }, index.h("div", { class: "gx-ide-main-wrapper" }, index.h("gx-ide-container", { containerTitle: this.displayTitle ? this._componentLocale.componentName : null, slimmerFooter: config.config.gxIdeContainer.slimmerFooter }, index.h("label", { htmlFor: "path-list" }, this._componentLocale.main.listLabel), index.h("gx-ide-list-selector", { id: "path-list", type: "multi-selection", listName: "path-list", noListBorder: true, ordered: true, onSelectionChanged: this.fileSelectionChangedHandler, class: "path-list" }, renderListItem.renderListItems(filesToListItemsData(this.files))), index.h("div", { class: "controls-wrapper" }, index.h("input", { type: "file", id: "input_file", accept: (_a = this.allowedExtensions) === null || _a === void 0 ? void 0 : _a.join(", "), ref: el => (this.fileInput = el), onChange: this.handleFileInputChange, class: "hidden-input", multiple: true }), index.h("button", { onClick: this.loadFileHandle }, this._componentLocale.main.addFilesButton), index.h("button", { onClick: this.handleRemoveButtonClick, disabled: this.selectedFiles.length === 0 }, this._componentLocale.main.removeFilesButton, " (", this.selectedFiles.length, ")"))))));
93
- }
94
- static get assetsDirs() { return ["gx-ide-assets/bpm-files-selector"]; }
95
- get el() { return index.getElement(this); }
96
- };
97
- GxIdeTemplate.style = filesSelectorCss;
98
-
99
- exports.gx_ide_bpm_files_selector = GxIdeTemplate;
100
-
101
- //# sourceMappingURL=gx-ide-bpm-files-selector.cjs.entry.js.map
@@ -1 +0,0 @@
1
- {"file":"gx-ide-bpm-files-selector.entry.cjs.js","mappings":";;;;;;;;;AAEO,MAAM,oBAAoB,GAAG,CAAC,KAAwB;IAC3D,MAAM,SAAS,GAAe,EAAE,CAAC;IACjC,KAAK,CAAC,OAAO,CAAC,IAAI;QAChB,MAAM,MAAM,GAAG,OAAO,IAAI,KAAK,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAC3D,MAAM,SAAS,GAAG,OAAO,IAAI,KAAK,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAC9D,MAAM,QAAQ,GAAW,SAAS,CAAC;QACnC,MAAM,WAAW,GAAY,KAAK,CAAC;QACnC,SAAS,CAAC,IAAI,CAAC;YACb,MAAM,EAAE,MAAM;YACd,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Z,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,aAAa,GAAG,IAAI,EAEhE,aAAa,EAAEE,aAAM,CAAC,cAAc,CAAC,aAAa,IAGlDF,mBAAO,OAAO,EAAC,WAAW,IACvB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAC/B,EACRA,kCACE,EAAE,EAAC,WAAW,EACd,IAAI,EAAC,iBAAiB,EACtB,QAAQ,EAAC,WAAW,EACpB,YAAY,QACZ,OAAO,QACP,kBAAkB,EAAE,IAAI,CAAC,2BAA2B,EACpD,KAAK,EAAC,WAAW,IAEhBG,8BAAe,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAC7B,EAEvBH,iBAAK,KAAK,EAAC,kBAAkB,IAC3BA,mBACE,IAAI,EAAC,MAAM,EACX,EAAE,EAAC,YAAY,EACf,MAAM,EAAE,MAAA,IAAI,CAAC,iBAAiB,0CAAE,IAAI,CAAC,IAAI,CAAC,EAC1C,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,SAAS,GAAG,EAAsB,CAAC,EACpD,QAAQ,EAAE,IAAI,CAAC,qBAAqB,EACpC,KAAK,EAAC,cAAc,EACpB,QAAQ,SACR,EACFA,oBAAQ,OAAO,EAAE,IAAI,CAAC,cAAc,IACjC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,cAAc,CACnC,EACTA,oBACE,OAAO,EAAE,IAAI,CAAC,uBAAuB,EACrC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM,KAAK,CAAC,IAExC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,iBAAiB,QAC5C,IAAI,CAAC,aAAa,CAAC,MAAM,MACnB,CACL,CACW,CACf,CACD,EACP;KACH;;;;;;;;","names":["Locale","h","Host","config","renderListItems"],"sources":["src/components/bpm/files-selector/helpers.ts","src/components/bpm/files-selector/files-selector.scss?tag=gx-ide-bpm-files-selector&encapsulation=shadow","src/components/bpm/files-selector/files-selector.tsx"],"sourcesContent":["import { ItemData } from \"../../_helpers/list-selector/list-selector-item/list-selector-item\";\n\nexport const filesToListItemsData = (files: string[] | File[]): ItemData[] => {\n const itemsData: ItemData[] = [];\n files.forEach(file => {\n const itemId = typeof file === \"string\" ? file : file.name;\n const itemValue = typeof file === \"string\" ? file : file.name;\n const itemIcon: string = undefined;\n const itemChecked: boolean = false;\n itemsData.push({\n itemId: itemId,\n itemValue: itemValue,\n itemIcon: itemIcon,\n itemChecked: itemChecked\n });\n });\n return itemsData;\n};\n","@import \"../../../global/gx-ide-common.scss\";\n@import \"../../../global/gx-ide-mixins.scss\";\n@import \"../../../global/temporary-tokens-chameleon.scss\";\n\n:host {\n display: block;\n}\n.hidden-input {\n display: none;\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 */\nimport { CheckedItemsInfo } from \"../../_helpers/list-selector/list-selector\";\n/* CUSTOM IMPORTS */\nimport { config } from \"../../../common/config\";\nimport { Locale } from \"../../../common/locale\";\nimport { renderListItems } from \"../../../common/render-list-item\";\nimport { filesToListItemsData } from \"./helpers\";\n\n@Component({\n tag: \"gx-ide-bpm-files-selector\",\n styleUrl: \"files-selector.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/bpm-files-selector\"]\n})\nexport class GxIdeTemplate {\n // 1.OWN PROPERTIES //\n\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n\n private renderedFirstTime = false;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeBpmFilesSelectorElement;\n\n private fileInput: HTMLInputElement;\n\n // 3.STATE() VARIABLES //\n /**\n * Contains the list of files\n */\n @State() files: File[] = [];\n\n /**\n * Contains the list of selected files\n */\n @State() selectedFiles: string[] = [];\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 * Allowed extensions when 'Add files' button is pressed\n */\n @Prop() readonly allowedExtensions: string[];\n\n /**\n * Callback invoked when user press 'Add files' button. Returns a list with selected files.\n */\n @Prop() readonly addCallback: (files: File[]) => Promise<void>;\n\n /**\n * Callback invoked when remove button is pressed.\n */\n @Prop() readonly removeCallback: (files: File[] | string[]) => 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 /**\n * @description Gets fired when something changes on items section.\n */\n @Event() selectionChanged: EventEmitter<void>;\n\n // 6.COMPONENT LIFECYCLE METHODS //\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\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 fileSelectionChangedHandler = (\n selectedItem: CustomEvent<CheckedItemsInfo>\n ) => {\n this.selectionChanged.emit();\n\n const selectedFiles = Array.isArray(selectedItem.detail)\n ? selectedItem.detail\n : [selectedItem.detail];\n\n this.selectedFiles = selectedFiles.map(item => item.itemValue);\n };\n\n private loadFileHandle = async () => {\n this.fileInput.click();\n };\n\n private handleFileInputChange = async (event: Event) => {\n const fileInput = event.target as HTMLInputElement;\n\n if (fileInput.files && fileInput.files.length > 0) {\n const newFiles: File[] = Array.from(fileInput.files);\n const uniqueFiles = newFiles.filter(\n newFile =>\n !this.files.some(existingFile => existingFile.name === newFile.name)\n );\n this.files = [...this.files, ...uniqueFiles];\n }\n if (this.addCallback) {\n await this.addCallback(this.files);\n }\n\n this.fileInput.value = null;\n };\n\n private removeFiles = (filesToRemove: string[]) => {\n const removedFiles = this.files.filter(file =>\n filesToRemove.includes(file.name)\n );\n\n this.files = this.files.filter(file => !filesToRemove.includes(file.name));\n\n if (this.removeCallback) {\n this.removeCallback(removedFiles);\n this.selectedFiles = [];\n this.fileInput.value = null;\n }\n };\n\n private handleRemoveButtonClick = () => {\n this.removeFiles(this.selectedFiles);\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 {/* path list*/}\n <label htmlFor=\"path-list\">\n {this._componentLocale.main.listLabel}\n </label>\n <gx-ide-list-selector\n id=\"path-list\"\n type=\"multi-selection\"\n listName=\"path-list\"\n noListBorder\n ordered\n onSelectionChanged={this.fileSelectionChangedHandler}\n class=\"path-list\"\n >\n {renderListItems(filesToListItemsData(this.files))}\n </gx-ide-list-selector>\n\n <div class=\"controls-wrapper\">\n <input\n type=\"file\"\n id=\"input_file\"\n accept={this.allowedExtensions?.join(\", \")}\n ref={el => (this.fileInput = el as HTMLInputElement)}\n onChange={this.handleFileInputChange}\n class=\"hidden-input\"\n multiple\n />\n <button onClick={this.loadFileHandle}>\n {this._componentLocale.main.addFilesButton}\n </button>\n <button\n onClick={this.handleRemoveButtonClick}\n disabled={this.selectedFiles.length === 0}\n >\n {this._componentLocale.main.removeFilesButton} (\n {this.selectedFiles.length})\n </button>\n </div>\n </gx-ide-container>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"version":3,"file":"files-selector.js","sourceRoot":"","sources":["../../../../src/components/bpm/files-selector/files-selector.tsx"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,OAAO,EACP,KAAK,EAEL,KAAK,EACN,MAAM,eAAe,CAAC;AAGvB,oBAAoB;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD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a,CAAC,MAAM,KAAK,CAAC;4BAExC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,iBAAiB;;4BAC5C,IAAI,CAAC,aAAa,CAAC,MAAM;gCACnB,CACL,CACW,CACf,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["/* 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 */\nimport { CheckedItemsInfo } from \"../../_helpers/list-selector/list-selector\";\n/* CUSTOM IMPORTS */\nimport { config } from \"../../../common/config\";\nimport { Locale } from \"../../../common/locale\";\nimport { renderListItems } from \"../../../common/render-list-item\";\nimport { filesToListItemsData } from \"./helpers\";\n\n@Component({\n tag: \"gx-ide-bpm-files-selector\",\n styleUrl: \"files-selector.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/bpm-files-selector\"]\n})\nexport class GxIdeTemplate {\n // 1.OWN PROPERTIES //\n\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n\n private renderedFirstTime = false;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeBpmFilesSelectorElement;\n\n private fileInput: HTMLInputElement;\n\n // 3.STATE() VARIABLES //\n /**\n * Contains the list of files\n */\n @State() files: File[] = [];\n\n /**\n * Contains the list of selected files\n */\n @State() selectedFiles: string[] = [];\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 * Allowed extensions when 'Add files' button is pressed\n */\n @Prop() readonly allowedExtensions: string[];\n\n /**\n * Callback invoked when user press 'Add files' button. Returns a list with selected files.\n */\n @Prop() readonly addCallback: (files: File[]) => Promise<void>;\n\n /**\n * Callback invoked when remove button is pressed.\n */\n @Prop() readonly removeCallback: (files: File[] | string[]) => 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 /**\n * @description Gets fired when something changes on items section.\n */\n @Event() selectionChanged: EventEmitter<void>;\n\n // 6.COMPONENT LIFECYCLE METHODS //\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\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 fileSelectionChangedHandler = (\n selectedItem: CustomEvent<CheckedItemsInfo>\n ) => {\n this.selectionChanged.emit();\n\n const selectedFiles = Array.isArray(selectedItem.detail)\n ? selectedItem.detail\n : [selectedItem.detail];\n\n this.selectedFiles = selectedFiles.map(item => item.itemValue);\n };\n\n private loadFileHandle = async () => {\n this.fileInput.click();\n };\n\n private handleFileInputChange = async (event: Event) => {\n const fileInput = event.target as HTMLInputElement;\n\n if (fileInput.files && fileInput.files.length > 0) {\n const newFiles: File[] = Array.from(fileInput.files);\n const uniqueFiles = newFiles.filter(\n newFile =>\n !this.files.some(existingFile => existingFile.name === newFile.name)\n );\n this.files = [...this.files, ...uniqueFiles];\n }\n if (this.addCallback) {\n await this.addCallback(this.files);\n }\n\n this.fileInput.value = null;\n };\n\n private removeFiles = (filesToRemove: string[]) => {\n const removedFiles = this.files.filter(file =>\n filesToRemove.includes(file.name)\n );\n\n this.files = this.files.filter(file => !filesToRemove.includes(file.name));\n\n if (this.removeCallback) {\n this.removeCallback(removedFiles);\n this.selectedFiles = [];\n this.fileInput.value = null;\n }\n };\n\n private handleRemoveButtonClick = () => {\n this.removeFiles(this.selectedFiles);\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 {/* path list*/}\n <label htmlFor=\"path-list\">\n {this._componentLocale.main.listLabel}\n </label>\n <gx-ide-list-selector\n id=\"path-list\"\n type=\"multi-selection\"\n listName=\"path-list\"\n noListBorder\n ordered\n onSelectionChanged={this.fileSelectionChangedHandler}\n class=\"path-list\"\n >\n {renderListItems(filesToListItemsData(this.files))}\n </gx-ide-list-selector>\n\n <div class=\"controls-wrapper\">\n <input\n type=\"file\"\n id=\"input_file\"\n accept={this.allowedExtensions?.join(\", \")}\n ref={el => (this.fileInput = el as HTMLInputElement)}\n onChange={this.handleFileInputChange}\n class=\"hidden-input\"\n multiple\n />\n <button onClick={this.loadFileHandle}>\n {this._componentLocale.main.addFilesButton}\n </button>\n <button\n onClick={this.handleRemoveButtonClick}\n disabled={this.selectedFiles.length === 0}\n >\n {this._componentLocale.main.removeFilesButton} (\n {this.selectedFiles.length})\n </button>\n </div>\n </gx-ide-container>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -1,14 +0,0 @@
1
- {
2
- "componentName": "BPM Files Selector",
3
- "header": {},
4
- "main": {
5
- "listLabel": "Path List",
6
- "addFilesButton": "Add Files",
7
- "removeFilesButton": "Remove"
8
- },
9
- "footer": {},
10
- "loader": {
11
- "title": "Loading...",
12
- "cancelLabel": "Cancel"
13
- }
14
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../src/components/bpm/files-selector/helpers.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAwB,EAAc,EAAE;IAC3E,MAAM,SAAS,GAAe,EAAE,CAAC;IACjC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACnB,MAAM,MAAM,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAC3D,MAAM,SAAS,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAC9D,MAAM,QAAQ,GAAW,SAAS,CAAC;QACnC,MAAM,WAAW,GAAY,KAAK,CAAC;QACnC,SAAS,CAAC,IAAI,CAAC;YACb,MAAM,EAAE,MAAM;YACd,SAAS,EAAE,SAAS;YACpB,QAAQ,EAAE,QAAQ;YAClB,WAAW,EAAE,WAAW;SACzB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["import { ItemData } from \"../../_helpers/list-selector/list-selector-item/list-selector-item\";\n\nexport const filesToListItemsData = (files: string[] | File[]): ItemData[] => {\n const itemsData: ItemData[] = [];\n files.forEach(file => {\n const itemId = typeof file === \"string\" ? file : file.name;\n const itemValue = typeof file === \"string\" ? file : file.name;\n const itemIcon: string = undefined;\n const itemChecked: boolean = false;\n itemsData.push({\n itemId: itemId,\n itemValue: itemValue,\n itemIcon: itemIcon,\n itemChecked: itemChecked\n });\n });\n return itemsData;\n};\n"]}