@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,17 @@
1
+ {
2
+ "componentName": "Deployment Tool",
3
+ "header": {
4
+ "objectsToDeploy": "Select Objects to Deploy"
5
+ },
6
+ "main": {
7
+ "noObjectsToDisplay": "There are no Objects to display.",
8
+ "targetTypes": "Target Types",
9
+ "applicationServer": "Application Server",
10
+ "generator": "Generator",
11
+ "newDeploymentUnit": "New Deployment Unit",
12
+ "onlyPackageLabel": "Only Package",
13
+ "addButton": "Add",
14
+ "deployButton": "Deploy",
15
+ "displayName": "Display Name"
16
+ }
17
+ }
@@ -0,0 +1,44 @@
1
+ const KB_OBJECT_TYPE = "type";
2
+ export const KB_OBJECT = "object";
3
+ const convertObjectDataToTreeItem = (objectTypeIcon, objectItems) => {
4
+ return objectItems.map(objectItem => ({
5
+ id: objectItem.id,
6
+ caption: objectItem.name,
7
+ startImgSrc: objectTypeIcon,
8
+ expanded: true,
9
+ leaf: true,
10
+ metadata: KB_OBJECT
11
+ }));
12
+ };
13
+ export const convertObjectTypeDataToTreeView = (objectTypeData) => {
14
+ const treeData = [];
15
+ if (!objectTypeData) {
16
+ return treeData;
17
+ }
18
+ for (const objectType of objectTypeData) {
19
+ if (objectType.items.length > 0) {
20
+ treeData.push({
21
+ id: objectType.id,
22
+ caption: objectType.name,
23
+ startImgSrc: objectType.icon,
24
+ expanded: true,
25
+ leaf: false,
26
+ metadata: KB_OBJECT_TYPE,
27
+ items: convertObjectDataToTreeItem(objectType.icon, objectType.items)
28
+ });
29
+ }
30
+ }
31
+ return treeData;
32
+ };
33
+ export const createArrayOfItems = (objectItems, objectTypes) => {
34
+ // The resulting array with 'items' property added to each type
35
+ const objectTypesWithItems = objectTypes.map(type => {
36
+ // Filter objects that match the current type id
37
+ const items = objectItems.filter(object => object.type === type.id);
38
+ // Return a new object type with the 'items' property
39
+ return Object.assign(Object.assign({}, type), { items: items });
40
+ });
41
+ const treeView = convertObjectTypeDataToTreeView(objectTypesWithItems);
42
+ return treeView;
43
+ };
44
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/components/deployment-tool/helpers.ts"],"names":[],"mappings":"AAGA,MAAM,cAAc,GAAG,MAAM,CAAC;AAC9B,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC;AAElC,MAAM,2BAA2B,GAAG,CAClC,cAAsB,EACtB,WAA8B,EAC9B,EAAE;IACF,OAAO,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;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;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAC7C,cAAyC,EACpB,EAAE;IACvB,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;gBACxB,WAAW,EAAE,UAAU,CAAC,IAAI;gBAC5B,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,KAAK;gBACX,QAAQ,EAAE,cAAc;gBACxB,KAAK,EAAE,2BAA2B,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC;aACtE,CAAC,CAAC;SACJ;KACF;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,WAA8B,EAC9B,WAA6B,EAC7B,EAAE;IACF,+DAA+D;IAC/D,MAAM,oBAAoB,GAA8B,WAAW,CAAC,GAAG,CACrE,IAAI,CAAC,EAAE;QACL,gDAAgD;QAChD,MAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC,CAAC;QAEpE,qDAAqD;QAErD,uCACK,IAAI,KACP,KAAK,EAAE,KAAK,IACZ;IACJ,CAAC,CACF,CAAC;IACF,MAAM,QAAQ,GAAG,+BAA+B,CAAC,oBAAoB,CAAC,CAAC;IACvE,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC","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"]}
@@ -0,0 +1,24 @@
1
+ {
2
+ "componentName": "OpenAPI Import",
3
+ "header": {
4
+ "fileNameLabel": "Select a file:",
5
+ "fileNamePlaceholder": "Suggested files extensions: .json, .yaml and *.",
6
+ "removeFileSelection": "Remove file selection",
7
+ "selectFileButton": "Select File",
8
+ "loadButton": "Load",
9
+ "moduleFolderLabel": "Module/Folder"
10
+ },
11
+ "main": {
12
+ "operations": "Operations",
13
+ "procedureDescription": "Procedure description",
14
+ "selectAll": "Select all"
15
+ },
16
+ "footer": {
17
+ "import": "Import",
18
+ "cancel": "Cancel"
19
+ },
20
+ "loader": {
21
+ "title": "Loading...",
22
+ "cancelLabel": "Cancel"
23
+ }
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "componentName": "",
3
+ "header": {
4
+ "fileNameLabel": "",
5
+ "fileNamePlaceholder": "",
6
+ "removeFileSelection": "",
7
+ "selectFileButton": "",
8
+ "loadButton": "",
9
+ "moduleFolderLabel": ""
10
+ },
11
+ "main": {
12
+ "operations": "",
13
+ "procedureDescription": "",
14
+ "selectAll": ""
15
+ },
16
+ "footer": {
17
+ "import": "",
18
+ "cancel": ""
19
+ },
20
+ "loader": {
21
+ "title": "",
22
+ "cancelLabel": ""
23
+ }
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "componentName": "",
3
+ "header": {
4
+ "fileNameLabel": "",
5
+ "fileNamePlaceholder": "",
6
+ "removeFileSelection": "",
7
+ "selectFileButton": "",
8
+ "loadButton": "",
9
+ "moduleFolderLabel": ""
10
+ },
11
+ "main": {
12
+ "operations": "",
13
+ "procedureDescription": "",
14
+ "selectAll": ""
15
+ },
16
+ "footer": {
17
+ "import": "",
18
+ "cancel": ""
19
+ },
20
+ "loader": {
21
+ "title": "",
22
+ "cancelLabel": ""
23
+ }
24
+ }
@@ -0,0 +1,18 @@
1
+ export const convertActionToTreeViewItem = (operations) => {
2
+ const treeData = [];
3
+ if (!operations) {
4
+ return treeData;
5
+ }
6
+ operations.forEach(operation => {
7
+ const importCategoryTreeItem = {
8
+ id: operation.id,
9
+ caption: `${operation.name}`,
10
+ expanded: true,
11
+ leaf: true,
12
+ checkbox: true
13
+ };
14
+ treeData.push(importCategoryTreeItem);
15
+ });
16
+ return treeData;
17
+ };
18
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/components/open-api-import/helpers.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,UAA8B,EACT,EAAE;IACvB,MAAM,QAAQ,GAAwB,EAAE,CAAC;IACzC,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,QAAQ,CAAC;KACjB;IACD,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;QAC7B,MAAM,sBAAsB,GAAsB;YAChD,EAAE,EAAE,SAAS,CAAC,EAAE;YAChB,OAAO,EAAE,GAAG,SAAS,CAAC,IAAI,EAAE;YAC5B,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC","sourcesContent":["import { ApiOperationData } from \"./open-api-import\";\nimport { TreeViewItemModel } from \"@genexus/chameleon-controls-library\";\n\nexport const convertActionToTreeViewItem = (\n operations: ApiOperationData[]\n): TreeViewItemModel[] => {\n const treeData: TreeViewItemModel[] = [];\n if (!operations) {\n return treeData;\n }\n operations.forEach(operation => {\n const importCategoryTreeItem: TreeViewItemModel = {\n id: operation.id,\n caption: `${operation.name}`,\n expanded: true,\n leaf: true,\n checkbox: true\n };\n treeData.push(importCategoryTreeItem);\n });\n return treeData;\n};\n"]}
@@ -0,0 +1,87 @@
1
+ section {
2
+ display: grid;
3
+ block-size: 100%;
4
+ grid-template-rows: max-content 1fr max-content;
5
+ }
6
+
7
+ .main {
8
+ position: relative;
9
+ display: contents;
10
+ }
11
+
12
+ .input-file {
13
+ display: flex;
14
+ }
15
+
16
+ .field {
17
+ width: 100%;
18
+ }
19
+
20
+ .control-header__operations,
21
+ .control-header__description {
22
+ padding-block-start: var(--mer-spacing--md);
23
+ }
24
+
25
+ .header__field-group {
26
+ grid-template: "import-file-label import-file-name buttons-container" max-content "module-folder-label module-folder module-folder" max-content/max-content 1fr max-content;
27
+ }
28
+
29
+ .module-folder-name {
30
+ grid-area: module-folder;
31
+ }
32
+
33
+ .module-folder-label {
34
+ grid-area: module-folder-label;
35
+ }
36
+
37
+ .import-file-label {
38
+ grid-area: import-file-label;
39
+ }
40
+
41
+ .header__buttons-container {
42
+ grid-area: buttons-container;
43
+ }
44
+
45
+ .section-grid {
46
+ display: grid;
47
+ grid-template: "top-content-operations top-content-description" max-content "operations-area operations-description" 1fr/1fr 1fr;
48
+ background-color: var(--items-container__bg-color);
49
+ border-style: var(--items-container__border-style);
50
+ border-width: var(--items-container__border-width);
51
+ border-color: var(--items-container__border-color);
52
+ border-block-start: 0;
53
+ overflow-y: auto;
54
+ }
55
+
56
+ .list-wrapper {
57
+ grid-area: operations-area;
58
+ border-inline-end: var(--section-common-border);
59
+ }
60
+
61
+ .label {
62
+ margin-top: 6px !important;
63
+ }
64
+
65
+ .tree-operations::part(item__header) {
66
+ padding-inline-start: 0;
67
+ }
68
+
69
+ .procedure-description {
70
+ grid-area: operations-description;
71
+ overflow: auto;
72
+ text-align: justify;
73
+ }
74
+
75
+ .control-header__operations {
76
+ grid-area: top-content-operations;
77
+ background-color: var(--items-container__bg-color);
78
+ }
79
+
80
+ .control-header__description {
81
+ grid-area: top-content-description;
82
+ background-color: var(--items-container__bg-color);
83
+ }
84
+
85
+ .text-align-center {
86
+ text-align: center;
87
+ }
@@ -0,0 +1,368 @@
1
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
+ if (kind === "a" && !f)
3
+ throw new TypeError("Private accessor was defined without a getter");
4
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
5
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
6
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
7
+ };
8
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
9
+ if (kind === "m")
10
+ throw new TypeError("Private method is not writable");
11
+ if (kind === "a" && !f)
12
+ throw new TypeError("Private accessor was defined without a setter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
14
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
15
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16
+ };
17
+ var _GxIdeOpenAPIImport__componentLocale, _GxIdeOpenAPIImport_renderedFirstTime, _GxIdeOpenAPIImport_shortcutsSrc, _GxIdeOpenAPIImport_chShortcutsEl, _GxIdeOpenAPIImport_fileInputHiddenEl, _GxIdeOpenAPIImport_parentEl, _GxIdeOpenAPIImport_objectsTreeEl, _GxIdeOpenAPIImport_cancelImportHandler, _GxIdeOpenAPIImport_handleImport, _GxIdeOpenAPIImport_objectsTreeCheckedItemsChangedHandler, _GxIdeOpenAPIImport_handleSelectAll, _GxIdeOpenAPIImport_objectTreeClickedHandler, _GxIdeOpenAPIImport_removeFileSelection, _GxIdeOpenAPIImport_selectFileInputChangedHandler, _GxIdeOpenAPIImport_selectFileInputHandler, _GxIdeOpenAPIImport_renderFooter;
18
+ /* STENCIL IMPORTS */
19
+ import { Host, h, getAssetPath } from "@stencil/core";
20
+ /* OTHER LIBRARIES IMPORTS */
21
+ /* CUSTOM IMPORTS */
22
+ import { Locale } from "../../common/locale";
23
+ import { getIconPath } from "@genexus/mercury";
24
+ import { convertActionToTreeViewItem } from "./helpers";
25
+ const CSS_BUNDLES = [
26
+ "resets/box-sizing",
27
+ "components/button",
28
+ "components/checkbox",
29
+ "components/edit",
30
+ "components/icon",
31
+ "components/tree-view",
32
+ "components/list-box",
33
+ "utils/form",
34
+ "utils/layout",
35
+ "utils/spacing",
36
+ "utils/typography"
37
+ ];
38
+ const FILE_ICON = getIconPath({
39
+ category: "gemini-tools",
40
+ name: "file",
41
+ colorType: "on-elevation"
42
+ });
43
+ const MENU_DELETE = getIconPath({
44
+ category: "menus",
45
+ name: "delete",
46
+ colorType: "primary"
47
+ });
48
+ const CHECKBOX_ALL_CHECKED_VALUE = "allChecked";
49
+ const CHECKBOX_ALL_UNCHECKED_VALUE = "allUnchecked";
50
+ export class GxIdeOpenAPIImport {
51
+ constructor() {
52
+ _GxIdeOpenAPIImport__componentLocale.set(this, void 0);
53
+ _GxIdeOpenAPIImport_renderedFirstTime.set(this, false);
54
+ _GxIdeOpenAPIImport_shortcutsSrc.set(this, getAssetPath(`./gx-ide-assets/new-object/shortcuts.json`));
55
+ _GxIdeOpenAPIImport_chShortcutsEl.set(this, void 0);
56
+ _GxIdeOpenAPIImport_fileInputHiddenEl.set(this, void 0);
57
+ _GxIdeOpenAPIImport_parentEl.set(this, void 0);
58
+ _GxIdeOpenAPIImport_objectsTreeEl.set(this, void 0);
59
+ // 9.LOCAL METHODS //
60
+ _GxIdeOpenAPIImport_cancelImportHandler.set(this, () => {
61
+ if (this.cancelCallback) {
62
+ this.cancelCallback();
63
+ }
64
+ });
65
+ _GxIdeOpenAPIImport_handleImport.set(this, async () => {
66
+ await this.importCallback(this.selectedOperations);
67
+ });
68
+ _GxIdeOpenAPIImport_objectsTreeCheckedItemsChangedHandler.set(this, (event) => {
69
+ if (event.detail.size === 0) {
70
+ return;
71
+ }
72
+ const allItems = event.detail;
73
+ const checkedItems = [...allItems.values()].filter(node => node.item.checked);
74
+ this.selectedOperations = checkedItems.map(item => item.item.id);
75
+ // Evaluate "Select All" checkbox state (siguiendo el patrón de kb-manager-import)
76
+ if (allItems.size === checkedItems.length) {
77
+ this.selectAllCheckboxValue = CHECKBOX_ALL_CHECKED_VALUE;
78
+ this.selectAllCheckboxIndeterminate = false;
79
+ }
80
+ else if (checkedItems.length === 0) {
81
+ this.selectAllCheckboxValue = CHECKBOX_ALL_UNCHECKED_VALUE;
82
+ this.selectAllCheckboxIndeterminate = false;
83
+ }
84
+ else {
85
+ this.selectAllCheckboxIndeterminate = true;
86
+ }
87
+ });
88
+ _GxIdeOpenAPIImport_handleSelectAll.set(this, (event) => {
89
+ if ("detail" in event && __classPrivateFieldGet(this, _GxIdeOpenAPIImport_objectsTreeEl, "f")) {
90
+ const checked = event.detail ===
91
+ CHECKBOX_ALL_CHECKED_VALUE;
92
+ // Usar updateAllItemsProperties como en kb-manager-import
93
+ __classPrivateFieldGet(this, _GxIdeOpenAPIImport_objectsTreeEl, "f").updateAllItemsProperties({ checked: checked });
94
+ this.selectedOperations = checked ? this.operations.map(op => op.id) : [];
95
+ this.selectAllCheckboxValue = checked
96
+ ? CHECKBOX_ALL_CHECKED_VALUE
97
+ : CHECKBOX_ALL_UNCHECKED_VALUE;
98
+ this.selectAllCheckboxIndeterminate = false;
99
+ }
100
+ });
101
+ _GxIdeOpenAPIImport_objectTreeClickedHandler.set(this, (event) => {
102
+ var _a;
103
+ this.selectedOperationForDescription = (_a = this.operations.filter(op => { var _a; return op.id === ((_a = event.detail[0]) === null || _a === void 0 ? void 0 : _a.item.id); })[0]) === null || _a === void 0 ? void 0 : _a.description;
104
+ });
105
+ _GxIdeOpenAPIImport_removeFileSelection.set(this, () => {
106
+ this.selectedFile = null;
107
+ __classPrivateFieldGet(this, _GxIdeOpenAPIImport_fileInputHiddenEl, "f").value = null;
108
+ this.operations = [];
109
+ this.actionListItems = [];
110
+ this.selectedOperationForDescription = null;
111
+ });
112
+ _GxIdeOpenAPIImport_selectFileInputChangedHandler.set(this, async (event) => {
113
+ var _a;
114
+ const target = event.target;
115
+ if (((_a = target.files) === null || _a === void 0 ? void 0 : _a.length) > 0) {
116
+ this.selectedFile = target.files[0];
117
+ this.operations = await this.loadCallback(this.selectedFile, __classPrivateFieldGet(this, _GxIdeOpenAPIImport_parentEl, "f").value.id);
118
+ this.actionListItems = convertActionToTreeViewItem(this.operations);
119
+ }
120
+ });
121
+ _GxIdeOpenAPIImport_selectFileInputHandler.set(this, () => {
122
+ __classPrivateFieldGet(this, _GxIdeOpenAPIImport_fileInputHiddenEl, "f").click();
123
+ });
124
+ _GxIdeOpenAPIImport_renderFooter.set(this, () => {
125
+ var _a;
126
+ return (h("footer", { class: "control-footer control-footer-space-between spacing-body-block-end spacing-body-inline" }, h("div", { class: "buttons-spacer" }, h("ch-checkbox", { id: "select-all-checkbox", class: "checkbox", checkedValue: CHECKBOX_ALL_CHECKED_VALUE, unCheckedValue: CHECKBOX_ALL_UNCHECKED_VALUE, caption: __classPrivateFieldGet(this, _GxIdeOpenAPIImport__componentLocale, "f").main.selectAll, value: this.selectAllCheckboxValue, indeterminate: this.selectAllCheckboxIndeterminate, onInput: __classPrivateFieldGet(this, _GxIdeOpenAPIImport_handleSelectAll, "f"), disabled: this.importingIsInProcess || !((_a = this.operations) === null || _a === void 0 ? void 0 : _a.length), part: "select-all-checkbox" })), h("div", { class: "buttons-spacer" }, h("button", { class: "button-secondary", slot: "footer-end", part: "button-cancel", onClick: __classPrivateFieldGet(this, _GxIdeOpenAPIImport_cancelImportHandler, "f") }, __classPrivateFieldGet(this, _GxIdeOpenAPIImport__componentLocale, "f").footer.cancel), h("button", { class: "button-primary", slot: "footer-end", part: "button-confirm", onClick: __classPrivateFieldGet(this, _GxIdeOpenAPIImport_handleImport, "f") }, __classPrivateFieldGet(this, _GxIdeOpenAPIImport__componentLocale, "f").footer.import))));
127
+ });
128
+ this.actionListItems = [];
129
+ this.importingIsInProcess = false;
130
+ this.operations = [];
131
+ this.selectedFile = undefined;
132
+ this.selectedOperationForDescription = undefined;
133
+ this.selectedOperations = [];
134
+ this.selectAllCheckboxValue = undefined;
135
+ this.selectAllCheckboxIndeterminate = false;
136
+ this.defaultParent = undefined;
137
+ this.displayTitle = false;
138
+ this.cancelCallback = undefined;
139
+ this.importCallback = undefined;
140
+ this.loadCallback = undefined;
141
+ this.selectParentCallback = undefined;
142
+ }
143
+ componentDidRender() {
144
+ if (!__classPrivateFieldGet(this, _GxIdeOpenAPIImport_renderedFirstTime, "f")) {
145
+ this.componentDidRenderFirstTime.emit(__classPrivateFieldGet(this, _GxIdeOpenAPIImport__componentLocale, "f").componentName);
146
+ __classPrivateFieldSet(this, _GxIdeOpenAPIImport_renderedFirstTime, true, "f");
147
+ }
148
+ }
149
+ async componentWillLoad() {
150
+ __classPrivateFieldSet(this, _GxIdeOpenAPIImport__componentLocale, await Locale.getComponentStrings(this.el), "f");
151
+ }
152
+ /**
153
+ * Suspends or reactivates the shortcuts
154
+ */
155
+ async suspendShortcuts(suspendShortcuts) {
156
+ if (suspendShortcuts) {
157
+ __classPrivateFieldGet(this, _GxIdeOpenAPIImport_chShortcutsEl, "f").suspend = true;
158
+ }
159
+ else {
160
+ __classPrivateFieldGet(this, _GxIdeOpenAPIImport_chShortcutsEl, "f").suspend = false;
161
+ }
162
+ }
163
+ render() {
164
+ var _a;
165
+ return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("ch-shortcuts", { src: __classPrivateFieldGet(this, _GxIdeOpenAPIImport_shortcutsSrc, "f"), ref: (el) => (__classPrivateFieldSet(this, _GxIdeOpenAPIImport_chShortcutsEl, el, "f")) }), h("section", null, h("header", { class: "header control-header-with-border space-body spacing-body-inline spacing-body-block-start", role: "banner" }, h("div", { class: "field-group header__field-group" }, h("div", { class: "import-file-label" }, h("div", { class: "field field-block" }, h("label", { class: "label", htmlFor: "file-name" }, __classPrivateFieldGet(this, _GxIdeOpenAPIImport__componentLocale, "f").header.fileNameLabel))), h("div", { class: "input-file" }, h("div", { class: "field input-file" }, h("ch-edit", { autoFocus: true, id: "file-name", class: "input file", part: "file-name", type: "text", readonly: true, value: (_a = this.selectedFile) === null || _a === void 0 ? void 0 : _a.name, placeholder: __classPrivateFieldGet(this, _GxIdeOpenAPIImport__componentLocale, "f").header.fileNamePlaceholder, startImgSrc: FILE_ICON }), h("input", { hidden: true, type: "file", accept: ".json, .yaml", onChange: __classPrivateFieldGet(this, _GxIdeOpenAPIImport_selectFileInputChangedHandler, "f"), ref: (el) => (__classPrivateFieldSet(this, _GxIdeOpenAPIImport_fileInputHiddenEl, el, "f")) })), h("div", { class: "cancel-btn " }, h("button", { "aria-label": __classPrivateFieldGet(this, _GxIdeOpenAPIImport__componentLocale, "f").header.removeFileSelection, title: __classPrivateFieldGet(this, _GxIdeOpenAPIImport__componentLocale, "f").header.removeFileSelection, id: "reset-all-button", class: "button-tertiary button-icon-only", part: "reset-all-button", onClick: __classPrivateFieldGet(this, _GxIdeOpenAPIImport_removeFileSelection, "f") }, h("ch-image", { class: "icon-md", src: MENU_DELETE })))), h("div", { class: "header__buttons-container" }, h("button", { id: "select-file-load-button", class: "button-primary", part: "select-file-load-button", onClick: __classPrivateFieldGet(this, _GxIdeOpenAPIImport_selectFileInputHandler, "f"), disabled: this.importingIsInProcess }, __classPrivateFieldGet(this, _GxIdeOpenAPIImport__componentLocale, "f").header.selectFileButton)), h("div", { class: "module-folder-label" }, h("div", { class: "field field-block" }, h("label", { class: "label" }, __classPrivateFieldGet(this, _GxIdeOpenAPIImport__componentLocale, "f").header.moduleFolderLabel))), h("div", { class: "field module-folder-name " }, h("gx-ide-entity-selector", { value: this.defaultParent, defaultValue: this.defaultParent, selectEntityCallback: this.selectParentCallback, labelPosition: "none", ref: (el) => (__classPrivateFieldSet(this, _GxIdeOpenAPIImport_parentEl, el, "f")), class: "module-folder" })))), h("main", { class: "main" }, h("div", { class: "section-grid" }, h("h2", { id: "operations-title", class: "control-header control-header-with-border control-header__operations subtitle-regular-xs text-align-center spacing-body-inline" }, __classPrivateFieldGet(this, _GxIdeOpenAPIImport__componentLocale, "f").main.operations), h("div", { class: "list-wrapper field-group spacing-body-block-start spacing-body-inline scrollable", role: "region", "aria-labelledby": "operations-title" }, h("ch-tree-view-render", { class: "tree-view tree-operations", model: this.actionListItems, "show-lines": "last", onCheckedItemsChange: __classPrivateFieldGet(this, _GxIdeOpenAPIImport_objectsTreeCheckedItemsChangedHandler, "f"), onSelectedItemsChange: __classPrivateFieldGet(this, _GxIdeOpenAPIImport_objectTreeClickedHandler, "f"), ref: el => (__classPrivateFieldSet(this, _GxIdeOpenAPIImport_objectsTreeEl, el, "f")) })), h("h2", { id: "description-title", class: "control-header control-header-with-border control-header__description subtitle-regular-xs text-align-center spacing-body-inline" }, __classPrivateFieldGet(this, _GxIdeOpenAPIImport__componentLocale, "f").main.procedureDescription), h("div", { class: "procedure-description field-group spacing-body-block-start spacing-body-inline scrollable", role: "region", "aria-labelledby": "description-title" }, this.selectedOperationForDescription))), __classPrivateFieldGet(this, _GxIdeOpenAPIImport_renderFooter, "f").call(this))));
166
+ }
167
+ static get is() { return "gx-ide-open-api-import"; }
168
+ static get encapsulation() { return "shadow"; }
169
+ static get originalStyleUrls() {
170
+ return {
171
+ "$": ["open-api-import.scss"]
172
+ };
173
+ }
174
+ static get styleUrls() {
175
+ return {
176
+ "$": ["open-api-import.css"]
177
+ };
178
+ }
179
+ static get assetsDirs() { return ["gx-ide-assets/open-api-import"]; }
180
+ static get properties() {
181
+ return {
182
+ "defaultParent": {
183
+ "type": "unknown",
184
+ "mutable": false,
185
+ "complexType": {
186
+ "original": "EntityData",
187
+ "resolved": "{ id: string; name: string; iconSrc?: string; }",
188
+ "references": {
189
+ "EntityData": {
190
+ "location": "import",
191
+ "path": "../../common/types",
192
+ "id": "src/common/types.ts::EntityData"
193
+ }
194
+ }
195
+ },
196
+ "required": false,
197
+ "optional": false,
198
+ "docs": {
199
+ "tags": [],
200
+ "text": "Default value for the Module/Folder field."
201
+ }
202
+ },
203
+ "displayTitle": {
204
+ "type": "boolean",
205
+ "mutable": false,
206
+ "complexType": {
207
+ "original": "false",
208
+ "resolved": "boolean",
209
+ "references": {}
210
+ },
211
+ "required": false,
212
+ "optional": false,
213
+ "docs": {
214
+ "tags": [],
215
+ "text": "If true it displays the component title on the header"
216
+ },
217
+ "attribute": "display-title",
218
+ "reflect": false,
219
+ "defaultValue": "false"
220
+ },
221
+ "cancelCallback": {
222
+ "type": "unknown",
223
+ "mutable": false,
224
+ "complexType": {
225
+ "original": "CancelCallback",
226
+ "resolved": "() => Promise<void>",
227
+ "references": {
228
+ "CancelCallback": {
229
+ "location": "local",
230
+ "path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/open-api-import/open-api-import.tsx",
231
+ "id": "src/components/open-api-import/open-api-import.tsx::CancelCallback"
232
+ }
233
+ }
234
+ },
235
+ "required": false,
236
+ "optional": false,
237
+ "docs": {
238
+ "tags": [],
239
+ "text": "Callback invoked when the user wants to cancel the export process."
240
+ }
241
+ },
242
+ "importCallback": {
243
+ "type": "unknown",
244
+ "mutable": false,
245
+ "complexType": {
246
+ "original": "ImportCallback",
247
+ "resolved": "(operationIds: string[]) => Promise<boolean>",
248
+ "references": {
249
+ "ImportCallback": {
250
+ "location": "local",
251
+ "path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/open-api-import/open-api-import.tsx",
252
+ "id": "src/components/open-api-import/open-api-import.tsx::ImportCallback"
253
+ }
254
+ }
255
+ },
256
+ "required": false,
257
+ "optional": false,
258
+ "docs": {
259
+ "tags": [],
260
+ "text": "Callback invoked when the user wants to initiate the import process."
261
+ }
262
+ },
263
+ "loadCallback": {
264
+ "type": "unknown",
265
+ "mutable": false,
266
+ "complexType": {
267
+ "original": "LoadCallback",
268
+ "resolved": "(source: string | File, parentId: string) => Promise<ApiOperationData[]>",
269
+ "references": {
270
+ "LoadCallback": {
271
+ "location": "local",
272
+ "path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/open-api-import/open-api-import.tsx",
273
+ "id": "src/components/open-api-import/open-api-import.tsx::LoadCallback"
274
+ }
275
+ }
276
+ },
277
+ "required": false,
278
+ "optional": false,
279
+ "docs": {
280
+ "tags": [],
281
+ "text": "Callback invoked must be loaded the content for an specification API"
282
+ }
283
+ },
284
+ "selectParentCallback": {
285
+ "type": "unknown",
286
+ "mutable": false,
287
+ "complexType": {
288
+ "original": "SelectParentCallback",
289
+ "resolved": "() => Promise<EntityData>",
290
+ "references": {
291
+ "SelectParentCallback": {
292
+ "location": "local",
293
+ "path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/open-api-import/open-api-import.tsx",
294
+ "id": "src/components/open-api-import/open-api-import.tsx::SelectParentCallback"
295
+ }
296
+ }
297
+ },
298
+ "required": false,
299
+ "optional": false,
300
+ "docs": {
301
+ "tags": [],
302
+ "text": "Callback invoked when action is executed on Module/Folder filter (button '...')."
303
+ }
304
+ }
305
+ };
306
+ }
307
+ static get states() {
308
+ return {
309
+ "actionListItems": {},
310
+ "importingIsInProcess": {},
311
+ "operations": {},
312
+ "selectedFile": {},
313
+ "selectedOperationForDescription": {},
314
+ "selectedOperations": {},
315
+ "selectAllCheckboxValue": {},
316
+ "selectAllCheckboxIndeterminate": {}
317
+ };
318
+ }
319
+ static get events() {
320
+ return [{
321
+ "method": "componentDidRenderFirstTime",
322
+ "name": "componentDidRenderFirstTime",
323
+ "bubbles": true,
324
+ "cancelable": true,
325
+ "composed": true,
326
+ "docs": {
327
+ "tags": [{
328
+ "name": "description",
329
+ "text": "Gets fired when the component has rendered for the first time."
330
+ }],
331
+ "text": ""
332
+ },
333
+ "complexType": {
334
+ "original": "string",
335
+ "resolved": "string",
336
+ "references": {}
337
+ }
338
+ }];
339
+ }
340
+ static get methods() {
341
+ return {
342
+ "suspendShortcuts": {
343
+ "complexType": {
344
+ "signature": "(suspendShortcuts: boolean) => Promise<void>",
345
+ "parameters": [{
346
+ "name": "suspendShortcuts",
347
+ "type": "boolean",
348
+ "docs": ""
349
+ }],
350
+ "references": {
351
+ "Promise": {
352
+ "location": "global",
353
+ "id": "global::Promise"
354
+ }
355
+ },
356
+ "return": "Promise<void>"
357
+ },
358
+ "docs": {
359
+ "text": "Suspends or reactivates the shortcuts",
360
+ "tags": []
361
+ }
362
+ }
363
+ };
364
+ }
365
+ static get elementRef() { return "el"; }
366
+ }
367
+ _GxIdeOpenAPIImport__componentLocale = new WeakMap(), _GxIdeOpenAPIImport_renderedFirstTime = new WeakMap(), _GxIdeOpenAPIImport_shortcutsSrc = new WeakMap(), _GxIdeOpenAPIImport_chShortcutsEl = new WeakMap(), _GxIdeOpenAPIImport_fileInputHiddenEl = new WeakMap(), _GxIdeOpenAPIImport_parentEl = new WeakMap(), _GxIdeOpenAPIImport_objectsTreeEl = new WeakMap(), _GxIdeOpenAPIImport_cancelImportHandler = new WeakMap(), _GxIdeOpenAPIImport_handleImport = new WeakMap(), _GxIdeOpenAPIImport_objectsTreeCheckedItemsChangedHandler = new WeakMap(), _GxIdeOpenAPIImport_handleSelectAll = new WeakMap(), _GxIdeOpenAPIImport_objectTreeClickedHandler = new WeakMap(), _GxIdeOpenAPIImport_removeFileSelection = new WeakMap(), _GxIdeOpenAPIImport_selectFileInputChangedHandler = new WeakMap(), _GxIdeOpenAPIImport_selectFileInputHandler = new WeakMap(), _GxIdeOpenAPIImport_renderFooter = new WeakMap();
368
+ //# sourceMappingURL=open-api-import.js.map