@genexus/genexus-ide-ui 1.0.75 → 1.1.1

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 (57) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-deployment-tool.cjs.entry.js +347 -0
  3. package/dist/cjs/gx-ide-deployment-tool.cjs.entry.js.map +1 -0
  4. package/dist/cjs/gx-ide-open-api-import.cjs.entry.js +199 -0
  5. package/dist/cjs/gx-ide-open-api-import.cjs.entry.js.map +1 -0
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/collection-manifest.json +2 -0
  8. package/dist/collection/common/types.js.map +1 -1
  9. package/dist/collection/components/deployment-tool/deployment-tool.css +646 -0
  10. package/dist/collection/components/deployment-tool/deployment-tool.js +542 -0
  11. package/dist/collection/components/deployment-tool/deployment-tool.js.map +1 -0
  12. package/dist/collection/components/deployment-tool/gx-ide-assets/deployment-tool/langs/deployment-tool.lang.en.json +17 -0
  13. package/dist/collection/components/deployment-tool/gx-ide-assets/deployment-tool/langs/deployment-tool.lang.ja.json +17 -0
  14. package/dist/collection/components/deployment-tool/gx-ide-assets/deployment-tool/langs/deployment-tool.lang.zh.json +17 -0
  15. package/dist/collection/components/deployment-tool/helpers.js +44 -0
  16. package/dist/collection/components/deployment-tool/helpers.js.map +1 -0
  17. package/dist/collection/components/open-api-import/gx-ide-assets/open-api-import/langs/open-api-import.lang.en.json +24 -0
  18. package/dist/collection/components/open-api-import/gx-ide-assets/open-api-import/langs/open-api-import.lang.ja.json +24 -0
  19. package/dist/collection/components/open-api-import/gx-ide-assets/open-api-import/langs/open-api-import.lang.zh.json +24 -0
  20. package/dist/collection/components/open-api-import/helpers.js +18 -0
  21. package/dist/collection/components/open-api-import/helpers.js.map +1 -0
  22. package/dist/collection/components/open-api-import/open-api-import.css +87 -0
  23. package/dist/collection/components/open-api-import/open-api-import.js +368 -0
  24. package/dist/collection/components/open-api-import/open-api-import.js.map +1 -0
  25. package/dist/collection/testing/locale.e2e.js +2 -0
  26. package/dist/collection/testing/locale.e2e.js.map +1 -1
  27. package/dist/components/gx-ide-deployment-tool.d.ts +11 -0
  28. package/dist/components/gx-ide-deployment-tool.js +387 -0
  29. package/dist/components/gx-ide-deployment-tool.js.map +1 -0
  30. package/dist/components/gx-ide-open-api-import.d.ts +11 -0
  31. package/dist/components/gx-ide-open-api-import.js +235 -0
  32. package/dist/components/gx-ide-open-api-import.js.map +1 -0
  33. package/dist/esm/genexus-ide-ui.js +1 -1
  34. package/dist/esm/gx-ide-deployment-tool.entry.js +343 -0
  35. package/dist/esm/gx-ide-deployment-tool.entry.js.map +1 -0
  36. package/dist/esm/gx-ide-open-api-import.entry.js +195 -0
  37. package/dist/esm/gx-ide-open-api-import.entry.js.map +1 -0
  38. package/dist/esm/loader.js +1 -1
  39. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  40. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  41. package/dist/genexus-ide-ui/gx-ide-assets/deployment-tool/langs/deployment-tool.lang.en.json +17 -0
  42. package/dist/genexus-ide-ui/gx-ide-assets/deployment-tool/langs/deployment-tool.lang.ja.json +17 -0
  43. package/dist/genexus-ide-ui/gx-ide-assets/deployment-tool/langs/deployment-tool.lang.zh.json +17 -0
  44. package/dist/genexus-ide-ui/gx-ide-assets/open-api-import/langs/open-api-import.lang.en.json +24 -0
  45. package/dist/genexus-ide-ui/gx-ide-assets/open-api-import/langs/open-api-import.lang.ja.json +24 -0
  46. package/dist/genexus-ide-ui/gx-ide-assets/open-api-import/langs/open-api-import.lang.zh.json +24 -0
  47. package/dist/genexus-ide-ui/p-48826a6f.entry.js +393 -0
  48. package/dist/genexus-ide-ui/p-48826a6f.entry.js.map +1 -0
  49. package/dist/genexus-ide-ui/p-fecc50e4.entry.js +321 -0
  50. package/dist/genexus-ide-ui/p-fecc50e4.entry.js.map +1 -0
  51. package/dist/types/common/types.d.ts +4 -0
  52. package/dist/types/components/deployment-tool/deployment-tool.d.ts +89 -0
  53. package/dist/types/components/deployment-tool/helpers.d.ts +11 -0
  54. package/dist/types/components/open-api-import/helpers.d.ts +3 -0
  55. package/dist/types/components/open-api-import/open-api-import.d.ts +63 -0
  56. package/dist/types/components.d.ts +233 -36
  57. package/package.json +1 -1
@@ -0,0 +1,343 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-10af18cf.js';
2
+ import { L as Locale } from './locale-e5107fad.js';
3
+
4
+ const KB_OBJECT_TYPE = "type";
5
+ const KB_OBJECT = "object";
6
+ const convertObjectDataToTreeItem = (objectTypeIcon, objectItems) => {
7
+ return objectItems.map(objectItem => ({
8
+ id: objectItem.id,
9
+ caption: objectItem.name,
10
+ startImgSrc: objectTypeIcon,
11
+ expanded: true,
12
+ leaf: true,
13
+ metadata: KB_OBJECT
14
+ }));
15
+ };
16
+ const convertObjectTypeDataToTreeView = (objectTypeData) => {
17
+ const treeData = [];
18
+ if (!objectTypeData) {
19
+ return treeData;
20
+ }
21
+ for (const objectType of objectTypeData) {
22
+ if (objectType.items.length > 0) {
23
+ treeData.push({
24
+ id: objectType.id,
25
+ caption: objectType.name,
26
+ startImgSrc: objectType.icon,
27
+ expanded: true,
28
+ leaf: false,
29
+ metadata: KB_OBJECT_TYPE,
30
+ items: convertObjectDataToTreeItem(objectType.icon, objectType.items)
31
+ });
32
+ }
33
+ }
34
+ return treeData;
35
+ };
36
+ const createArrayOfItems = (objectItems, objectTypes) => {
37
+ // The resulting array with 'items' property added to each type
38
+ const objectTypesWithItems = objectTypes.map(type => {
39
+ // Filter objects that match the current type id
40
+ const items = objectItems.filter(object => object.type === type.id);
41
+ // Return a new object type with the 'items' property
42
+ return Object.assign(Object.assign({}, type), { items: items });
43
+ });
44
+ const treeView = convertObjectTypeDataToTreeView(objectTypesWithItems);
45
+ return treeView;
46
+ };
47
+
48
+ const deploymentToolCss = ":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)}:host{display:grid;block-size:100%}.card-regular{background-color:var(--mer-surface__elevation--01);border:var(--mer-border__width--sm) solid var(--mer-border-color__on-elevation--01);border-radius:var(--mer-border__radius--md);padding:var(--mer-spacing--md) var(--mer-spacing--md);display:grid}.card-small{background-color:var(--mer-surface__elevation--02);border-radius:var(--mer-border__radius--sm);padding:var(--mer-spacing--sm) var(--mer-spacing--sm)}.card-small--actionable:hover{background-color:var(--mer-color__neutral-gray--600)}.card-small--actionable:active{background-color:var(--mer-color__neutral-gray--650)}.card-small:focus-visible{outline:var(--focus__outline-width) var(--focus__outline-style) var(--focus__outline-color);outline-offset:var(--focus__outline-offset)}.empty-state{block-size:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:var(--mer-spacing--sm);text-align:center}.empty-state__title,.empty-state__button,.empty-state__link{max-inline-size:300px}.opacity-0{opacity:0}.opacity-1{opacity:1}.display-contents{display:contents}.gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.overflow-auto{overflow:auto}.justify-start{display:flex;justify-content:start}.justify-center{display:flex;justify-content:center}.justify-end{display:flex;justify-content:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--mer-color__neutral-gray--800)}ch-grid-column:first-child{padding-inline-start:var(--gx-ide-container__padding) !important}ch-grid-column:last-child{padding-inline-end:var(--gx-ide-container__padding) !important}ch-grid-cell{--mer-spacing--xs:var(--gx-ide-container__padding)}.layout{display:grid;gap:var(--mer-spacing--lg);box-sizing:border-box}.layout--two-cols{grid-template-columns:1fr 1fr}.layout--space-above{padding-block-start:var(--mer-spacing--lg)}gxg-tabs{box-shadow:none}:host(.gx-ide-component){height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--mer-font__weight--regular);font-size:var(--mer-font__size--xs);font-family:var(--mer-font-family--primary);height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1;box-sizing:border-box}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-main::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-main::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-main::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-overflow::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.tree-view-primary{font-size:var(--mer-font__size--2xs)}p{margin:0;font-size:var(--mer-font__size--xxs)}.buttons-container{display:flex;gap:var(--mer-spacing--xs)}:host{display:grid;block-size:100%;grid-template-rows:max-content 1fr max-content}.header{display:grid;padding:var(--gxg-container--padding);gap:var(--gx-ide-grid-column-gap);grid-template-columns:1fr auto;margin-block-end:var(--gx-ide-grid-row-gap)}.header :nth-child(2){align-self:self-end}.deploy-properties{display:grid;grid-auto-rows:max-content;grid-template-columns:max-content 1fr max-content;grid-template-areas:\"target-types__label target-types__combo-box target-types__button-checkbox-container\" \"application-server__label application-server__combo-box .\" \". target-type__description .\" \"display-name__label display-name__combo-box .\";align-items:center;column-gap:var(--field__column-gap);row-gap:var(--field-group__row-gap);border-block-start:var(--section-common-border);padding-block-start:var(--mer-spacing--md)}.label.target-types{grid-area:target-types__label}#target-types{grid-area:target-types__combo-box}.target-types-button-checkbox-wrapper{grid-area:target-types__button-checkbox-container}.label.application-server{grid-area:application-server__label}#application-server{grid-area:application-server__combo-box}.target-type__description{grid-area:target-type__description}.label.display-name{grid-area:display-name__label}#display-name{grid-area:display-name__combo-box}.footer{margin-block-start:var(--gx-ide-grid-row-gap)}";
49
+
50
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
51
+ if (kind === "a" && !f)
52
+ throw new TypeError("Private accessor was defined without a getter");
53
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
54
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
55
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
56
+ };
57
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
58
+ if (kind === "m")
59
+ throw new TypeError("Private method is not writable");
60
+ if (kind === "a" && !f)
61
+ throw new TypeError("Private accessor was defined without a setter");
62
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
63
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
64
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
65
+ };
66
+ var _GxIdeDeploymentTool_instances, _GxIdeDeploymentTool_componentLocale, _GxIdeDeploymentTool_renderedFirstTime, _GxIdeDeploymentTool_flattenedObjectTypeData, _GxIdeDeploymentTool_currentDeploymentUnitId, _GxIdeDeploymentTool_onlyPackageCheckboxEl, _GxIdeDeploymentTool_targetTypesEl, _GxIdeDeploymentTool_applicationServerEl, _GxIdeDeploymentTool_generatorEl, _GxIdeDeploymentTool_deploymentUnitsEl, _GxIdeDeploymentTool_displayNameEl, _GxIdeDeploymentTool_evaluateObjects, _GxIdeDeploymentTool_handleGetDeploymentUnitObjectsCallback, _GxIdeDeploymentTool_loadDeploymentUnits, _GxIdeDeploymentTool_handleCreateDeploymentUnit, _GxIdeDeploymentTool_optionsCallbackHandler, _GxIdeDeploymentTool_addNewTypesToModel, _GxIdeDeploymentTool_addObjectsCallbackHandler, _GxIdeDeploymentTool_deployCallbackHandler, _GxIdeDeploymentTool_handleTargetTypesChange, _GxIdeDeploymentTool_flattenObjectTypes, _GxIdeDeploymentTool_objectsTreeCheckedItemsChangedHandler, _GxIdeDeploymentTool_evaluateContentToDisplay, _GxIdeDeploymentTool_getComboModel, _GxIdeDeploymentTool_renderComboSelector, _GxIdeDeploymentTool_renderHeader, _GxIdeDeploymentTool_renderApplicationServerSelector, _GxIdeDeploymentTool_renderGeneratorSelector, _GxIdeDeploymentTool_renderTargetSelector, _GxIdeDeploymentTool_renderDisplayNameInput, _GxIdeDeploymentTool_renderFooter;
67
+ const CSS_BUNDLES = [
68
+ "resets/box-sizing",
69
+ "utils/form",
70
+ "utils/layout",
71
+ "utils/typography",
72
+ "components/button",
73
+ "components/checkbox",
74
+ "components/edit",
75
+ "components/tree-view",
76
+ "components/combo-box",
77
+ "components/icon",
78
+ "utils/spacing"
79
+ ];
80
+ const GxIdeDeploymentTool = class {
81
+ constructor(hostRef) {
82
+ registerInstance(this, hostRef);
83
+ this.componentDidLoadEvent = createEvent(this, "componentDidLoadEvent", 7);
84
+ this.componentDidRenderFirstTime = createEvent(this, "componentDidRenderFirstTime", 7);
85
+ _GxIdeDeploymentTool_instances.add(this);
86
+ /**
87
+ * The component hard-coded strings translations.
88
+ */
89
+ // eslint-disable-next-line @stencil-community/own-props-must-be-private
90
+ _GxIdeDeploymentTool_componentLocale.set(this, void 0);
91
+ _GxIdeDeploymentTool_renderedFirstTime.set(this, false);
92
+ _GxIdeDeploymentTool_flattenedObjectTypeData.set(this, new Map());
93
+ _GxIdeDeploymentTool_currentDeploymentUnitId.set(this, void 0);
94
+ _GxIdeDeploymentTool_onlyPackageCheckboxEl.set(this, void 0);
95
+ _GxIdeDeploymentTool_targetTypesEl.set(this, void 0);
96
+ _GxIdeDeploymentTool_applicationServerEl.set(this, void 0);
97
+ _GxIdeDeploymentTool_generatorEl.set(this, void 0);
98
+ _GxIdeDeploymentTool_deploymentUnitsEl.set(this, void 0);
99
+ _GxIdeDeploymentTool_displayNameEl.set(this, void 0);
100
+ _GxIdeDeploymentTool_evaluateObjects.set(this, () => {
101
+ var _a;
102
+ this.noObjects = !!(((_a = this.treeModel) === null || _a === void 0 ? void 0 : _a.length) === 0 || !this.treeModel);
103
+ });
104
+ _GxIdeDeploymentTool_handleGetDeploymentUnitObjectsCallback.set(this, async (ev) => {
105
+ await __classPrivateFieldGet(this, _GxIdeDeploymentTool_loadDeploymentUnits, "f").call(this, ev.detail);
106
+ __classPrivateFieldGet(this, _GxIdeDeploymentTool_optionsCallbackHandler, "f").call(this);
107
+ });
108
+ _GxIdeDeploymentTool_loadDeploymentUnits.set(this, async (id) => {
109
+ if (id === this.newDeploymentUnitId) {
110
+ await __classPrivateFieldGet(this, _GxIdeDeploymentTool_handleCreateDeploymentUnit, "f").call(this);
111
+ return;
112
+ }
113
+ __classPrivateFieldSet(this, _GxIdeDeploymentTool_currentDeploymentUnitId, id, "f");
114
+ const objectData = await this.getDeploymentUnitObjectsCallback(id);
115
+ this.addedObjects = [...objectData];
116
+ this.treeModel = createArrayOfItems(this.addedObjects, this.allObjectTypes);
117
+ });
118
+ _GxIdeDeploymentTool_handleCreateDeploymentUnit.set(this, async () => {
119
+ if (this.createDeploymentUnitCallback) {
120
+ const deploymentUnitData = await this.createDeploymentUnitCallback();
121
+ if (!deploymentUnitData) {
122
+ return;
123
+ }
124
+ // Update deployment units:
125
+ this.deploymentUnits.unshift(deploymentUnitData);
126
+ // Update combo:
127
+ const comboModelItem = __classPrivateFieldGet(this, _GxIdeDeploymentTool_getComboModel, "f").call(this, [deploymentUnitData]);
128
+ __classPrivateFieldGet(this, _GxIdeDeploymentTool_deploymentUnitsEl, "f").model = comboModelItem.concat(__classPrivateFieldGet(this, _GxIdeDeploymentTool_deploymentUnitsEl, "f").model);
129
+ __classPrivateFieldGet(this, _GxIdeDeploymentTool_deploymentUnitsEl, "f").value = deploymentUnitData.id;
130
+ // Trigger selection callback:
131
+ await __classPrivateFieldGet(this, _GxIdeDeploymentTool_loadDeploymentUnits, "f").call(this, deploymentUnitData.id);
132
+ }
133
+ });
134
+ _GxIdeDeploymentTool_optionsCallbackHandler.set(this, () => {
135
+ if (this.optionsCallback) {
136
+ this.optionsCallback(__classPrivateFieldGet(this, _GxIdeDeploymentTool_deploymentUnitsEl, "f").value, __classPrivateFieldGet(this, _GxIdeDeploymentTool_targetTypesEl, "f").value);
137
+ }
138
+ });
139
+ _GxIdeDeploymentTool_addNewTypesToModel.set(this, () => {
140
+ const allTypes = [...this.allObjectTypes];
141
+ this.addedObjects.forEach(addedObject => {
142
+ const matchingType = this.allObjectTypes.find(objectType => objectType.id === addedObject.type);
143
+ if (!matchingType) {
144
+ allTypes.push({
145
+ id: addedObject.type,
146
+ name: addedObject.type,
147
+ icon: ""
148
+ });
149
+ }
150
+ });
151
+ this.allObjectTypes = [...allTypes];
152
+ });
153
+ _GxIdeDeploymentTool_addObjectsCallbackHandler.set(this, async () => {
154
+ if (this.addObjectsCallback) {
155
+ const objects = await this.addObjectsCallback();
156
+ this.addedObjects = [...objects, ...this.addedObjects];
157
+ __classPrivateFieldGet(this, _GxIdeDeploymentTool_addNewTypesToModel, "f").call(this);
158
+ this.treeModel = createArrayOfItems(this.addedObjects, this.allObjectTypes);
159
+ }
160
+ });
161
+ _GxIdeDeploymentTool_deployCallbackHandler.set(this, async () => {
162
+ var _a, _b, _c;
163
+ const data = {
164
+ targetId: __classPrivateFieldGet(this, _GxIdeDeploymentTool_targetTypesEl, "f").value,
165
+ applicationServerId: (_a = __classPrivateFieldGet(this, _GxIdeDeploymentTool_applicationServerEl, "f")) === null || _a === void 0 ? void 0 : _a.value,
166
+ displayName: (_b = __classPrivateFieldGet(this, _GxIdeDeploymentTool_displayNameEl, "f")) === null || _b === void 0 ? void 0 : _b.value,
167
+ generatorId: (_c = __classPrivateFieldGet(this, _GxIdeDeploymentTool_generatorEl, "f")) === null || _c === void 0 ? void 0 : _c.value,
168
+ onlyPackage: __classPrivateFieldGet(this, _GxIdeDeploymentTool_onlyPackageCheckboxEl, "f")
169
+ ? __classPrivateFieldGet(this, _GxIdeDeploymentTool_onlyPackageCheckboxEl, "f").value === "true"
170
+ : undefined,
171
+ objects: this.checkedObjectsIds
172
+ };
173
+ if (this.deployCallback) {
174
+ this.allowDeploy = false;
175
+ await this.deployCallback(data);
176
+ this.allowDeploy = true;
177
+ }
178
+ });
179
+ _GxIdeDeploymentTool_handleTargetTypesChange.set(this, (ev) => {
180
+ const selectedId = ev.detail;
181
+ this.selectedDeployTargetData =
182
+ this.targetTypes.find(targetType => targetType.id === selectedId) || null;
183
+ __classPrivateFieldGet(this, _GxIdeDeploymentTool_optionsCallbackHandler, "f").call(this);
184
+ });
185
+ _GxIdeDeploymentTool_objectsTreeCheckedItemsChangedHandler.set(this, (event) => {
186
+ const allItemsWithCheckbox = [...event.detail.values()];
187
+ this.checkedObjectsIds = allItemsWithCheckbox
188
+ .filter(checkedItem => checkedItem.item.checked && checkedItem.item.metadata === KB_OBJECT)
189
+ .map(checkedItem => checkedItem.item.id);
190
+ });
191
+ _GxIdeDeploymentTool_evaluateContentToDisplay.set(this, () => {
192
+ if (this.noObjects) {
193
+ return (h("gx-ide-empty-state", { isAnimated: false, stateTitle: __classPrivateFieldGet(this, _GxIdeDeploymentTool_componentLocale, "f").main.noObjectsToDisplay, key: "no-objects-empty-state", stateIconSrc: "objects/object" }));
194
+ }
195
+ return (h("ch-tree-view-render", { class: "tree-view", model: this.treeModel, dragDisabled: true, dropDisabled: true, toggleCheckboxes: true, showLines: "last", checked: true, checkbox: true, onCheckedItemsChange: __classPrivateFieldGet(this, _GxIdeDeploymentTool_objectsTreeCheckedItemsChangedHandler, "f") }));
196
+ });
197
+ _GxIdeDeploymentTool_getComboModel.set(this, (baseCollection) => {
198
+ return baseCollection.map(obj => ({
199
+ caption: obj.name,
200
+ value: obj.id
201
+ }));
202
+ });
203
+ _GxIdeDeploymentTool_renderComboSelector.set(this, (properties, withField = false) => {
204
+ var _a;
205
+ const controlId = properties.label.replace(/ /g, "-").toLowerCase();
206
+ const labelClasses = `label ${controlId}`;
207
+ const labelAndComboBox = [
208
+ h("label", { class: labelClasses, htmlFor: controlId }, properties.label),
209
+ h("ch-combo-box-render", { class: "combo-box", value: properties.value ? properties.value : (_a = properties.baseModel[0]) === null || _a === void 0 ? void 0 : _a.id, model: __classPrivateFieldGet(this, _GxIdeDeploymentTool_getComboModel, "f").call(this, properties.baseModel), id: controlId, ref: properties.refCallback, onInput: properties.onInputCallback })
210
+ ];
211
+ return withField ? (h("div", { class: "field field-inline" }, labelAndComboBox)) : (labelAndComboBox);
212
+ });
213
+ _GxIdeDeploymentTool_renderHeader.set(this, () => {
214
+ return (h("div", { slot: "header", class: "header control-header-with-border" }, __classPrivateFieldGet(this, _GxIdeDeploymentTool_renderComboSelector, "f").call(this, {
215
+ id: "deploymentUnits",
216
+ baseModel: this.deploymentUnits,
217
+ label: __classPrivateFieldGet(this, _GxIdeDeploymentTool_componentLocale, "f").header.objectsToDeploy,
218
+ value: __classPrivateFieldGet(this, _GxIdeDeploymentTool_currentDeploymentUnitId, "f"),
219
+ refCallback: (el) => {
220
+ __classPrivateFieldSet(this, _GxIdeDeploymentTool_deploymentUnitsEl, el, "f");
221
+ },
222
+ onInputCallback: __classPrivateFieldGet(this, _GxIdeDeploymentTool_handleGetDeploymentUnitObjectsCallback, "f")
223
+ }, true), h("button", { class: "button-primary", onClick: __classPrivateFieldGet(this, _GxIdeDeploymentTool_addObjectsCallbackHandler, "f") }, __classPrivateFieldGet(this, _GxIdeDeploymentTool_componentLocale, "f").main.addButton)));
224
+ });
225
+ _GxIdeDeploymentTool_renderApplicationServerSelector.set(this, () => {
226
+ var _a;
227
+ return __classPrivateFieldGet(this, _GxIdeDeploymentTool_renderComboSelector, "f").call(this, {
228
+ id: "application-servers",
229
+ baseModel: (_a = this.selectedDeployTargetData) === null || _a === void 0 ? void 0 : _a.applicationServers,
230
+ label: __classPrivateFieldGet(this, _GxIdeDeploymentTool_componentLocale, "f").main.applicationServer,
231
+ refCallback: (el) => {
232
+ __classPrivateFieldSet(this, _GxIdeDeploymentTool_applicationServerEl, el, "f");
233
+ }
234
+ });
235
+ });
236
+ _GxIdeDeploymentTool_renderGeneratorSelector.set(this, () => {
237
+ var _a;
238
+ return __classPrivateFieldGet(this, _GxIdeDeploymentTool_renderComboSelector, "f").call(this, {
239
+ id: "generator",
240
+ baseModel: (_a = this.selectedDeployTargetData) === null || _a === void 0 ? void 0 : _a.generators,
241
+ label: __classPrivateFieldGet(this, _GxIdeDeploymentTool_componentLocale, "f").main.generator,
242
+ refCallback: (el) => {
243
+ __classPrivateFieldSet(this, _GxIdeDeploymentTool_generatorEl, el, "f");
244
+ }
245
+ });
246
+ });
247
+ _GxIdeDeploymentTool_renderTargetSelector.set(this, () => {
248
+ var _a;
249
+ return [
250
+ __classPrivateFieldGet(this, _GxIdeDeploymentTool_renderComboSelector, "f").call(this, {
251
+ id: "targetTypes",
252
+ baseModel: this.targetTypes,
253
+ label: __classPrivateFieldGet(this, _GxIdeDeploymentTool_componentLocale, "f").main.targetTypes,
254
+ refCallback: (el) => {
255
+ __classPrivateFieldSet(this, _GxIdeDeploymentTool_targetTypesEl, el, "f");
256
+ },
257
+ onInputCallback: __classPrivateFieldGet(this, _GxIdeDeploymentTool_handleTargetTypesChange, "f")
258
+ }),
259
+ h("div", { class: "target-types-button-checkbox-wrapper buttons-spacer" }, h("button", { class: "button-tertiary button-icon-only", onClick: __classPrivateFieldGet(this, _GxIdeDeploymentTool_optionsCallbackHandler, "f") }, h("ch-image", { class: "icon-md", src: "system/settings/primary" })), h("ch-checkbox", { disabled: !((_a = this.selectedDeployTargetData) === null || _a === void 0 ? void 0 : _a.canCreatePackage), class: "checkbox", caption: __classPrivateFieldGet(this, _GxIdeDeploymentTool_componentLocale, "f").main.onlyPackageLabel, part: "only-package-checkbox", checkedValue: "true", value: "false", ref: (el) => (__classPrivateFieldSet(this, _GxIdeDeploymentTool_onlyPackageCheckboxEl, el, "f")) }))
260
+ ];
261
+ });
262
+ _GxIdeDeploymentTool_renderDisplayNameInput.set(this, () => {
263
+ return [
264
+ h("label", { class: "label display-name", htmlFor: "display-name" }, __classPrivateFieldGet(this, _GxIdeDeploymentTool_componentLocale, "f").main.displayName),
265
+ h("ch-edit", { class: "input", id: "display-name", ref: (el) => {
266
+ if (el) {
267
+ __classPrivateFieldSet(this, _GxIdeDeploymentTool_displayNameEl, el, "f");
268
+ }
269
+ } })
270
+ ];
271
+ });
272
+ _GxIdeDeploymentTool_renderFooter.set(this, () => {
273
+ return (h("div", { slot: "footer-end", class: "footer control-footer-with-border" }, h("button", { class: "button-primary", onClick: __classPrivateFieldGet(this, _GxIdeDeploymentTool_deployCallbackHandler, "f"), disabled: !this.allowDeploy }, __classPrivateFieldGet(this, _GxIdeDeploymentTool_componentLocale, "f").main.deployButton)));
274
+ });
275
+ this.checkedObjectsIds = [];
276
+ this.noObjects = undefined;
277
+ this.selectedDeployTargetData = null;
278
+ this.addedObjects = [];
279
+ this.allObjectTypes = undefined;
280
+ this.treeModel = [];
281
+ this.allowDeploy = true;
282
+ this.deploymentUnits = undefined;
283
+ this.targetTypes = undefined;
284
+ this.newDeploymentUnitId = undefined;
285
+ this.objectTypes = undefined;
286
+ this.getDeploymentUnitObjectsCallback = undefined;
287
+ this.optionsCallback = undefined;
288
+ this.deployCallback = undefined;
289
+ this.addObjectsCallback = undefined;
290
+ this.createDeploymentUnitCallback = undefined;
291
+ }
292
+ watchTreeModelHandler(newState) {
293
+ this.noObjects = !!(newState.length === 0 || !newState);
294
+ }
295
+ watchObjectTypesHandler(newState) {
296
+ __classPrivateFieldGet(this, _GxIdeDeploymentTool_instances, "m", _GxIdeDeploymentTool_flattenObjectTypes).call(this, newState);
297
+ }
298
+ async componentWillLoad() {
299
+ __classPrivateFieldSet(this, _GxIdeDeploymentTool_componentLocale, await Locale.getComponentStrings(this.el), "f");
300
+ this.selectedDeployTargetData = this.targetTypes[0];
301
+ this.allObjectTypes = [...this.objectTypes];
302
+ __classPrivateFieldGet(this, _GxIdeDeploymentTool_evaluateObjects, "f").call(this);
303
+ __classPrivateFieldGet(this, _GxIdeDeploymentTool_instances, "m", _GxIdeDeploymentTool_flattenObjectTypes).call(this, this.allObjectTypes);
304
+ if (this.deploymentUnits.length > 0) {
305
+ __classPrivateFieldGet(this, _GxIdeDeploymentTool_loadDeploymentUnits, "f").call(this, this.deploymentUnits[0].id);
306
+ if (this.targetTypes.length > 0 && this.optionsCallback) {
307
+ this.optionsCallback(this.deploymentUnits[0].id, this.targetTypes[0].id);
308
+ }
309
+ }
310
+ }
311
+ componentDidRender() {
312
+ if (!__classPrivateFieldGet(this, _GxIdeDeploymentTool_renderedFirstTime, "f")) {
313
+ this.componentDidRenderFirstTime.emit(__classPrivateFieldGet(this, _GxIdeDeploymentTool_componentLocale, "f").componentName);
314
+ __classPrivateFieldSet(this, _GxIdeDeploymentTool_renderedFirstTime, true, "f");
315
+ }
316
+ }
317
+ render() {
318
+ var _a, _b, _c, _d, _e, _f;
319
+ return (h(Host, { class: "widget spacing-body" }, h("ch-theme", { model: CSS_BUNDLES }), __classPrivateFieldGet(this, _GxIdeDeploymentTool_renderHeader, "f").call(this), h("div", { class: "container-wrapper" }, __classPrivateFieldGet(this, _GxIdeDeploymentTool_evaluateContentToDisplay, "f").call(this)), h("div", { class: "deploy-properties" }, __classPrivateFieldGet(this, _GxIdeDeploymentTool_renderTargetSelector, "f").call(this), ((_b = (_a = this.selectedDeployTargetData) === null || _a === void 0 ? void 0 : _a.applicationServers) === null || _b === void 0 ? void 0 : _b.length) > 0
320
+ ? __classPrivateFieldGet(this, _GxIdeDeploymentTool_renderApplicationServerSelector, "f").call(this)
321
+ : [], ((_d = (_c = this.selectedDeployTargetData) === null || _c === void 0 ? void 0 : _c.generators) === null || _d === void 0 ? void 0 : _d.length) > 0
322
+ ? __classPrivateFieldGet(this, _GxIdeDeploymentTool_renderGeneratorSelector, "f").call(this)
323
+ : [], h("p", { class: "body-italic-s target-type__description" }, (_e = this.selectedDeployTargetData) === null || _e === void 0 ? void 0 : _e.description), ((_f = this.selectedDeployTargetData) === null || _f === void 0 ? void 0 : _f.canDefineDisplayName)
324
+ ? __classPrivateFieldGet(this, _GxIdeDeploymentTool_renderDisplayNameInput, "f").call(this)
325
+ : []), __classPrivateFieldGet(this, _GxIdeDeploymentTool_renderFooter, "f").call(this)));
326
+ }
327
+ static get assetsDirs() { return ["gx-ide-assets/deployment-tool"]; }
328
+ get el() { return getElement(this); }
329
+ static get watchers() { return {
330
+ "treeModel": ["watchTreeModelHandler"],
331
+ "objectTypes": ["watchObjectTypesHandler"]
332
+ }; }
333
+ };
334
+ _GxIdeDeploymentTool_componentLocale = new WeakMap(), _GxIdeDeploymentTool_renderedFirstTime = new WeakMap(), _GxIdeDeploymentTool_flattenedObjectTypeData = new WeakMap(), _GxIdeDeploymentTool_currentDeploymentUnitId = new WeakMap(), _GxIdeDeploymentTool_onlyPackageCheckboxEl = new WeakMap(), _GxIdeDeploymentTool_targetTypesEl = new WeakMap(), _GxIdeDeploymentTool_applicationServerEl = new WeakMap(), _GxIdeDeploymentTool_generatorEl = new WeakMap(), _GxIdeDeploymentTool_deploymentUnitsEl = new WeakMap(), _GxIdeDeploymentTool_displayNameEl = new WeakMap(), _GxIdeDeploymentTool_evaluateObjects = new WeakMap(), _GxIdeDeploymentTool_handleGetDeploymentUnitObjectsCallback = new WeakMap(), _GxIdeDeploymentTool_loadDeploymentUnits = new WeakMap(), _GxIdeDeploymentTool_handleCreateDeploymentUnit = new WeakMap(), _GxIdeDeploymentTool_optionsCallbackHandler = new WeakMap(), _GxIdeDeploymentTool_addNewTypesToModel = new WeakMap(), _GxIdeDeploymentTool_addObjectsCallbackHandler = new WeakMap(), _GxIdeDeploymentTool_deployCallbackHandler = new WeakMap(), _GxIdeDeploymentTool_handleTargetTypesChange = new WeakMap(), _GxIdeDeploymentTool_objectsTreeCheckedItemsChangedHandler = new WeakMap(), _GxIdeDeploymentTool_evaluateContentToDisplay = new WeakMap(), _GxIdeDeploymentTool_getComboModel = new WeakMap(), _GxIdeDeploymentTool_renderComboSelector = new WeakMap(), _GxIdeDeploymentTool_renderHeader = new WeakMap(), _GxIdeDeploymentTool_renderApplicationServerSelector = new WeakMap(), _GxIdeDeploymentTool_renderGeneratorSelector = new WeakMap(), _GxIdeDeploymentTool_renderTargetSelector = new WeakMap(), _GxIdeDeploymentTool_renderDisplayNameInput = new WeakMap(), _GxIdeDeploymentTool_renderFooter = new WeakMap(), _GxIdeDeploymentTool_instances = new WeakSet(), _GxIdeDeploymentTool_flattenObjectTypes = function _GxIdeDeploymentTool_flattenObjectTypes(newState) {
335
+ newState.forEach(objectType => {
336
+ __classPrivateFieldGet(this, _GxIdeDeploymentTool_flattenedObjectTypeData, "f").set(objectType.id, objectType);
337
+ });
338
+ };
339
+ GxIdeDeploymentTool.style = deploymentToolCss;
340
+
341
+ export { GxIdeDeploymentTool as gx_ide_deployment_tool };
342
+
343
+ //# sourceMappingURL=gx-ide-deployment-tool.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"gx-ide-deployment-tool.entry.js","mappings":";;;AAGA,MAAM,cAAc,GAAG,MAAM,CAAC;AACvB,MAAM,SAAS,GAAG,QAAQ,CAAC;AAElC,MAAM,2BAA2B,GAAG,CAClC,cAAsB,EACtB,WAA8B;IAE9B,OAAO,WAAW,CAAC,GAAG,CAAC,UAAU,KAAK;QACpC,EAAE,EAAE,UAAU,CAAC,EAAE;QACjB,OAAO,EAAE,UAAU,CAAC,IAAI;QACxB,WAAW,EAAE,cAAc;QAC3B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,SAAS;KACpB,CAAC,CAAC,CAAC;AACN,CAAC,CAAC;AAEK,MAAM,+BAA+B,GAAG,CAC7C,cAAyC;IAEzC,MAAM,QAAQ,GAAwB,EAAE,CAAC;IACzC,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,QAAQ,CAAC;KACjB;IAED,KAAK,MAAM,UAAU,IAAI,cAAc,EAAE;QACvC,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAC/B,QAAQ,CAAC,IAAI,CAAC;gBACZ,EAAE,EAAE,UAAU,CAAC,EAAE;gBACjB,OAAO,EAAE,UAAU,CAAC,IAAI;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B;cAC/B,EAAE,EAEN,SAAG,KAAK,EAAC,wCAAwC,IAC9C,MAAA,IAAI,CAAC,wBAAwB,0CAAE,WAAW,CACzC,EAEH,CAAA,MAAA,IAAI,CAAC,wBAAwB,0CAAE,oBAAoB;cAChD,uBAAA,IAAI,mDAAwB,MAA5B,IAAI,CAA0B;cAC9B,EAAE,CACF,EAEL,uBAAA,IAAI,yCAAc,MAAlB,IAAI,CAAgB,CAChB,EACP;KACH;;;;;;;;s0DApOmB,QAA0B;IAC5C,QAAQ,CAAC,OAAO,CAAC,UAAU;QACzB,uBAAA,IAAI,oDAAyB,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;KAC9D,CAAC,CAAC;AACL,CAAC;;;;;","names":[],"sources":["src/components/deployment-tool/helpers.ts","src/components/deployment-tool/deployment-tool.scss?tag=gx-ide-deployment-tool&encapsulation=shadow","src/components/deployment-tool/deployment-tool.tsx"],"sourcesContent":["import { TreeViewItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/tree-view/types\";\nimport { TypedObjectData, ObjectTypeData } from \"./deployment-tool\";\n\nconst KB_OBJECT_TYPE = \"type\";\nexport const KB_OBJECT = \"object\";\n\nconst convertObjectDataToTreeItem = (\n objectTypeIcon: string,\n objectItems: TypedObjectData[]\n) => {\n return objectItems.map(objectItem => ({\n id: objectItem.id,\n caption: objectItem.name,\n startImgSrc: objectTypeIcon,\n expanded: true,\n leaf: true,\n metadata: KB_OBJECT\n }));\n};\n\nexport const convertObjectTypeDataToTreeView = (\n objectTypeData: ObjectTypeDataWithItems[]\n): TreeViewItemModel[] => {\n const treeData: TreeViewItemModel[] = [];\n if (!objectTypeData) {\n return treeData;\n }\n\n for (const objectType of objectTypeData) {\n if (objectType.items.length > 0) {\n treeData.push({\n id: objectType.id,\n caption: objectType.name,\n startImgSrc: objectType.icon,\n expanded: true,\n leaf: false,\n metadata: KB_OBJECT_TYPE,\n items: convertObjectDataToTreeItem(objectType.icon, objectType.items)\n });\n }\n }\n\n return treeData;\n};\n\nexport const createArrayOfItems = (\n objectItems: TypedObjectData[],\n objectTypes: ObjectTypeData[]\n) => {\n // The resulting array with 'items' property added to each type\n const objectTypesWithItems: ObjectTypeDataWithItems[] = objectTypes.map(\n type => {\n // Filter objects that match the current type id\n const items = objectItems.filter(object => object.type === type.id);\n\n // Return a new object type with the 'items' property\n\n return {\n ...type,\n items: items\n };\n }\n );\n const treeView = convertObjectTypeDataToTreeView(objectTypesWithItems);\n return treeView;\n};\n\nexport type ObjectTypeDataWithItems = {\n id: string;\n name: string;\n icon: string;\n items: TypedObjectData[];\n};\n","@import \"../../global/gx-ide-common.scss\";\n@import \"../../global/gx-ide-mixins.scss\";\n\n:host {\n display: grid;\n block-size: 100%;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.header {\n display: grid;\n padding: var(--gxg-container--padding);\n gap: var(--gx-ide-grid-column-gap);\n grid-template-columns: 1fr auto;\n :nth-child(2) {\n align-self: self-end;\n }\n margin-block-end: var(--gx-ide-grid-row-gap);\n}\n\n// deploy properties\n.deploy-properties {\n display: grid;\n grid-auto-rows: max-content;\n grid-template-columns: max-content 1fr max-content;\n grid-template-areas:\n \"target-types__label target-types__combo-box target-types__button-checkbox-container\"\n \"application-server__label application-server__combo-box .\"\n \". target-type__description .\"\n \"display-name__label display-name__combo-box .\";\n align-items: center;\n column-gap: var(--field__column-gap);\n row-gap: var(--field-group__row-gap);\n border-block-start: var(--section-common-border);\n padding-block-start: var(--mer-spacing--md);\n}\n\n.label.target-types {\n grid-area: target-types__label;\n}\n#target-types {\n grid-area: target-types__combo-box;\n}\n.target-types-button-checkbox-wrapper {\n grid-area: target-types__button-checkbox-container;\n}\n\n.label.application-server {\n grid-area: application-server__label;\n}\n#application-server {\n grid-area: application-server__combo-box;\n}\n\n.target-type__description {\n grid-area: target-type__description;\n}\n\n.label.display-name {\n grid-area: display-name__label;\n}\n#display-name {\n grid-area: display-name__combo-box;\n}\n\n.footer {\n margin-block-start: var(--gx-ide-grid-row-gap);\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n Element,\n State,\n EventEmitter,\n Watch\n} from \"@stencil/core\";\n\n// Other Libraries\nimport {\n TreeViewItemModel,\n TreeViewItemModelExtended\n} from \"@genexus/chameleon-controls-library/dist/types/components/tree-view/types\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\nimport { createArrayOfItems } from \"./helpers\";\n\n// Custom Imports\nimport { Locale } from \"../../common/locale\";\nimport { KB_OBJECT } from \"./helpers\";\nimport {\n ComboBoxItemModel,\n ComboBoxModel\n} from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\nimport { ChComboBoxRenderCustomEvent } from \"@genexus/chameleon-controls-library\";\nimport { ObjectBaseData } from \"../../common/types\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/form\",\n \"utils/layout\",\n \"utils/typography\",\n \"components/button\",\n \"components/checkbox\",\n \"components/edit\",\n \"components/tree-view\",\n \"components/combo-box\",\n \"components/icon\",\n \"utils/spacing\"\n];\n\n@Component({\n tag: \"gx-ide-deployment-tool\",\n styleUrl: \"deployment-tool.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/deployment-tool\"]\n})\nexport class GxIdeDeploymentTool {\n /**\n * The component hard-coded strings translations.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n #renderedFirstTime = false;\n #flattenedObjectTypeData: Map<string, ObjectTypeData> = new Map();\n #currentDeploymentUnitId: string | undefined;\n\n @Element() el: HTMLGxIdeDeploymentToolElement;\n #onlyPackageCheckboxEl!: HTMLChCheckboxElement;\n #targetTypesEl!: HTMLChComboBoxRenderElement;\n #applicationServerEl!: HTMLChComboBoxRenderElement;\n #generatorEl!: HTMLChComboBoxRenderElement;\n #deploymentUnitsEl!: HTMLChComboBoxRenderElement;\n #displayNameEl!: HTMLChEditElement;\n\n @State() checkedObjectsIds: string[] = [];\n @State() noObjects: boolean;\n @State() selectedDeployTargetData: DeployTargetData = null;\n @State() addedObjects: TypedObjectData[] = [];\n @State() allObjectTypes: ObjectTypeData[];\n @State() treeModel: TreeViewItemModel[] = [];\n @State() allowDeploy: boolean = true;\n @Watch(\"treeModel\")\n watchTreeModelHandler(newState: TreeViewItemModel[]) {\n this.noObjects = !!(newState.length === 0 || !newState);\n }\n\n /**\n * Available deployment units list\n */\n @Prop() readonly deploymentUnits: ObjectBaseData[];\n\n /**\n * Available target types list\n */\n @Prop() readonly targetTypes: DeployTargetData[];\n\n /**\n * Defines id for new deployment unit option\n */\n @Prop() readonly newDeploymentUnitId: string;\n\n /**\n * Array of possible object types\n */\n @Prop() readonly objectTypes: ObjectTypeData[];\n @Watch(\"objectTypes\")\n watchObjectTypesHandler(newState: ObjectTypeData[]) {\n this.#flattenObjectTypes(newState);\n }\n\n /**\n * Callback invoked when the user wants to access the export options.\n */\n // eslint-disable-next-line @stencil-community/decorators-style\n @Prop()\n readonly getDeploymentUnitObjectsCallback: GetDeploymentUnitObjectsCallback;\n\n /**\n * Callback invoked when the user wants to access the export options.\n */\n @Prop() readonly optionsCallback: OptionsCallback;\n\n /**\n * Callback invoked when user wants to start deploy process\n */\n @Prop() readonly deployCallback: DeployCallback;\n\n /**\n * Callback invoked when the user wants to add objects.\n */\n @Prop() readonly addObjectsCallback: AddObjectsCallback;\n\n /**\n * Callback invoked when the user wants to create a deployment unit.\n */\n @Prop() readonly createDeploymentUnitCallback: CreateDeploymentUnitCallback;\n\n /**\n * This event is emitted once just after the component is fully loaded and the first render() occurs.\n */\n @Event() componentDidLoadEvent: EventEmitter<boolean>;\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 async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.selectedDeployTargetData = this.targetTypes[0];\n this.allObjectTypes = [...this.objectTypes];\n this.#evaluateObjects();\n this.#flattenObjectTypes(this.allObjectTypes);\n if (this.deploymentUnits.length > 0) {\n this.#loadDeploymentUnits(this.deploymentUnits[0].id);\n\n if (this.targetTypes.length > 0 && this.optionsCallback) {\n this.optionsCallback(\n this.deploymentUnits[0].id,\n this.targetTypes[0].id\n );\n }\n }\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 #evaluateObjects = () => {\n this.noObjects = !!(this.treeModel?.length === 0 || !this.treeModel);\n };\n\n #handleGetDeploymentUnitObjectsCallback = async (ev: any) => {\n await this.#loadDeploymentUnits(ev.detail);\n this.#optionsCallbackHandler();\n };\n\n #loadDeploymentUnits = async (id: string) => {\n if (id === this.newDeploymentUnitId) {\n await this.#handleCreateDeploymentUnit();\n return;\n }\n\n this.#currentDeploymentUnitId = id;\n\n const objectData = await this.getDeploymentUnitObjectsCallback(id);\n this.addedObjects = [...objectData];\n this.treeModel = createArrayOfItems(this.addedObjects, this.allObjectTypes);\n };\n\n #handleCreateDeploymentUnit = async () => {\n if (this.createDeploymentUnitCallback) {\n const deploymentUnitData = await this.createDeploymentUnitCallback();\n if (!deploymentUnitData) {\n return;\n }\n\n // Update deployment units:\n this.deploymentUnits.unshift(deploymentUnitData);\n\n // Update combo:\n const comboModelItem = this.#getComboModel([deploymentUnitData]);\n this.#deploymentUnitsEl.model = comboModelItem.concat(\n this.#deploymentUnitsEl.model\n );\n this.#deploymentUnitsEl.value = deploymentUnitData.id;\n\n // Trigger selection callback:\n await this.#loadDeploymentUnits(deploymentUnitData.id);\n }\n };\n\n #optionsCallbackHandler = () => {\n if (this.optionsCallback) {\n this.optionsCallback(\n this.#deploymentUnitsEl.value,\n this.#targetTypesEl.value\n );\n }\n };\n\n #addNewTypesToModel = () => {\n const allTypes: ObjectTypeData[] = [...this.allObjectTypes];\n\n this.addedObjects.forEach(addedObject => {\n const matchingType = this.allObjectTypes.find(\n objectType => objectType.id === addedObject.type\n );\n\n if (!matchingType) {\n allTypes.push({\n id: addedObject.type,\n name: addedObject.type,\n icon: \"\"\n });\n }\n });\n this.allObjectTypes = [...allTypes];\n };\n\n #addObjectsCallbackHandler = async () => {\n if (this.addObjectsCallback) {\n const objects: TypedObjectData[] = await this.addObjectsCallback();\n this.addedObjects = [...objects, ...this.addedObjects];\n\n this.#addNewTypesToModel();\n this.treeModel = createArrayOfItems(\n this.addedObjects,\n this.allObjectTypes\n );\n }\n };\n\n #deployCallbackHandler = async () => {\n const data: DeployData = {\n targetId: this.#targetTypesEl.value,\n applicationServerId: this.#applicationServerEl?.value,\n displayName: this.#displayNameEl?.value,\n generatorId: this.#generatorEl?.value,\n onlyPackage: this.#onlyPackageCheckboxEl\n ? this.#onlyPackageCheckboxEl.value === \"true\"\n : undefined,\n objects: this.checkedObjectsIds\n };\n\n if (this.deployCallback) {\n this.allowDeploy = false;\n await this.deployCallback(data);\n this.allowDeploy = true;\n }\n };\n\n #handleTargetTypesChange = (ev: any) => {\n const selectedId = ev.detail;\n\n this.selectedDeployTargetData =\n this.targetTypes.find(targetType => targetType.id === selectedId) || null;\n\n this.#optionsCallbackHandler();\n };\n\n #flattenObjectTypes(newState: ObjectTypeData[]) {\n newState.forEach(objectType => {\n this.#flattenedObjectTypeData.set(objectType.id, objectType);\n });\n }\n\n #objectsTreeCheckedItemsChangedHandler = (\n event: CustomEvent<Map<string, TreeViewItemModelExtended>>\n ) => {\n const allItemsWithCheckbox = [...event.detail.values()];\n\n this.checkedObjectsIds = allItemsWithCheckbox\n .filter(\n checkedItem =>\n checkedItem.item.checked && checkedItem.item.metadata === KB_OBJECT\n )\n .map(checkedItem => checkedItem.item.id);\n };\n\n #evaluateContentToDisplay = () => {\n if (this.noObjects) {\n return (\n <gx-ide-empty-state\n isAnimated={false}\n stateTitle={this.#componentLocale.main.noObjectsToDisplay}\n key=\"no-objects-empty-state\"\n stateIconSrc=\"objects/object\"\n ></gx-ide-empty-state>\n );\n }\n\n return (\n <ch-tree-view-render\n class=\"tree-view\"\n model={this.treeModel}\n dragDisabled={true}\n dropDisabled={true}\n toggleCheckboxes={true}\n showLines=\"last\"\n checked={true}\n checkbox={true}\n onCheckedItemsChange={this.#objectsTreeCheckedItemsChangedHandler}\n />\n );\n };\n\n #getComboModel = (baseCollection: ObjectBaseData[]): ComboBoxModel => {\n return baseCollection.map(\n obj =>\n ({\n caption: obj.name,\n value: obj.id\n } as ComboBoxItemModel)\n );\n };\n\n #renderComboSelector = (\n properties: ComboSelectorProperties,\n withField: boolean = false\n ) => {\n const controlId = properties.label.replace(/ /g, \"-\").toLowerCase();\n const labelClasses = `label ${controlId}`;\n const labelAndComboBox = [\n <label class={labelClasses} htmlFor={controlId}>\n {properties.label}\n </label>,\n <ch-combo-box-render\n class=\"combo-box\"\n value={\n properties.value ? properties.value : properties.baseModel[0]?.id\n }\n model={this.#getComboModel(properties.baseModel)}\n id={controlId}\n ref={properties.refCallback}\n onInput={properties.onInputCallback}\n />\n ];\n return withField ? (\n <div class=\"field field-inline\">{labelAndComboBox}</div>\n ) : (\n labelAndComboBox\n );\n };\n\n #renderHeader = () => {\n return (\n <div slot=\"header\" class=\"header control-header-with-border\">\n {this.#renderComboSelector(\n {\n id: \"deploymentUnits\",\n baseModel: this.deploymentUnits,\n label: this.#componentLocale.header.objectsToDeploy,\n value: this.#currentDeploymentUnitId,\n refCallback: (el: HTMLChComboBoxRenderElement) => {\n this.#deploymentUnitsEl = el as HTMLChComboBoxRenderElement;\n },\n onInputCallback: this.#handleGetDeploymentUnitObjectsCallback\n },\n true\n )}\n\n <button\n class=\"button-primary\"\n onClick={this.#addObjectsCallbackHandler}\n >\n {this.#componentLocale.main.addButton}\n </button>\n </div>\n );\n };\n\n #renderApplicationServerSelector = () => {\n return this.#renderComboSelector({\n id: \"application-servers\",\n baseModel: this.selectedDeployTargetData?.applicationServers,\n label: this.#componentLocale.main.applicationServer,\n refCallback: (el: HTMLChComboBoxRenderElement) => {\n this.#applicationServerEl = el as HTMLChComboBoxRenderElement;\n }\n });\n };\n\n #renderGeneratorSelector = () => {\n return this.#renderComboSelector({\n id: \"generator\",\n baseModel: this.selectedDeployTargetData?.generators,\n label: this.#componentLocale.main.generator,\n refCallback: (el: HTMLChComboBoxRenderElement) => {\n this.#generatorEl = el as HTMLChComboBoxRenderElement;\n }\n });\n };\n\n #renderTargetSelector = () => {\n return [\n this.#renderComboSelector({\n id: \"targetTypes\",\n baseModel: this.targetTypes,\n label: this.#componentLocale.main.targetTypes,\n refCallback: (el: HTMLChComboBoxRenderElement) => {\n this.#targetTypesEl = el as HTMLChComboBoxRenderElement;\n },\n onInputCallback: this.#handleTargetTypesChange\n }),\n <div class=\"target-types-button-checkbox-wrapper buttons-spacer\">\n <button\n class=\"button-tertiary button-icon-only\"\n onClick={this.#optionsCallbackHandler}\n >\n <ch-image class=\"icon-md\" src=\"system/settings/primary\" />\n </button>\n <ch-checkbox\n disabled={!this.selectedDeployTargetData?.canCreatePackage}\n class=\"checkbox\"\n caption={this.#componentLocale.main.onlyPackageLabel}\n part=\"only-package-checkbox\"\n checkedValue=\"true\"\n value=\"false\"\n ref={(el: HTMLChCheckboxElement) =>\n (this.#onlyPackageCheckboxEl = el as HTMLChCheckboxElement)\n }\n />\n </div>\n ];\n };\n\n #renderDisplayNameInput = () => {\n return [\n <label class=\"label display-name\" htmlFor=\"display-name\">\n {this.#componentLocale.main.displayName}\n </label>,\n <ch-edit\n class=\"input\"\n id=\"display-name\"\n ref={(el: HTMLChEditElement) => {\n if (el) {\n this.#displayNameEl = el;\n }\n }}\n />\n ];\n };\n\n #renderFooter = () => {\n return (\n <div slot=\"footer-end\" class=\"footer control-footer-with-border\">\n <button\n class=\"button-primary\"\n onClick={this.#deployCallbackHandler}\n disabled={!this.allowDeploy}\n >\n {this.#componentLocale.main.deployButton}\n </button>\n </div>\n );\n };\n\n render(): void {\n return (\n <Host class=\"widget spacing-body\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n {this.#renderHeader()}\n\n <div class=\"container-wrapper\">{this.#evaluateContentToDisplay()}</div>\n <div class=\"deploy-properties\">\n {this.#renderTargetSelector()}\n\n {this.selectedDeployTargetData?.applicationServers?.length > 0\n ? this.#renderApplicationServerSelector()\n : []}\n\n {this.selectedDeployTargetData?.generators?.length > 0\n ? this.#renderGeneratorSelector()\n : []}\n\n <p class=\"body-italic-s target-type__description\">\n {this.selectedDeployTargetData?.description}\n </p>\n\n {this.selectedDeployTargetData?.canDefineDisplayName\n ? this.#renderDisplayNameInput()\n : []}\n </div>\n\n {this.#renderFooter()}\n </Host>\n );\n }\n}\n\ntype ComboSelectorProperties = {\n class?: string;\n id: string;\n baseModel: ObjectBaseData[];\n value?: string;\n label: string;\n refCallback: (el: HTMLChComboBoxRenderElement) => void;\n onInputCallback?: ((event: ChComboBoxRenderCustomEvent<string>) => void) &\n ((event: InputEvent) => void);\n};\n\nexport type AddObjectsCallback = () => Promise<TypedObjectData[]>;\nexport type OptionsCallback = (\n delpoymentUnitId: string,\n targetId: string\n) => Promise<void>;\nexport type GetDeploymentUnitObjectsCallback = (\n id: string\n) => Promise<TypedObjectData[]>;\n\nexport type DeployCallback = (data: DeployData) => Promise<boolean>;\n\nexport type CreateDeploymentUnitCallback = () => Promise<\n ObjectBaseData | undefined\n>;\n\nexport type ObjectTypeData = ObjectBaseData & {\n icon: string;\n};\n\nexport type DeployTargetData = ObjectBaseData & {\n canCreatePackage: boolean;\n canDefineDisplayName: boolean;\n applicationServers: ObjectBaseData[];\n generators: ObjectBaseData[];\n description: string;\n};\n\nexport type TypedObjectData = ObjectBaseData & {\n type: string;\n};\n\nexport type DeployData = {\n targetId: string;\n applicationServerId?: string;\n displayName?: string;\n generatorId?: string;\n onlyPackage: boolean;\n objects: string[];\n};\n"],"version":3}