@genexus/genexus-ide-ui 3.2.6 → 3.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js +7 -4
- package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-mcp-server.cjs.entry.js +181 -0
- package/dist/cjs/gx-ide-mcp-server.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/common/types.js.map +1 -1
- package/dist/collection/components/kb-manager-import/helpers.js +7 -4
- package/dist/collection/components/kb-manager-import/helpers.js.map +1 -1
- package/dist/collection/components/kb-manager-import/kb-manager-import.js.map +1 -1
- package/dist/collection/components/mcp-server/gx-ide-assets/mcp-server/langs/mcp-server.lang.en.json +36 -0
- package/dist/collection/components/mcp-server/gx-ide-assets/mcp-server/langs/mcp-server.lang.ja.json +36 -0
- package/dist/collection/components/mcp-server/gx-ide-assets/mcp-server/langs/mcp-server.lang.zh.json +36 -0
- package/dist/collection/components/mcp-server/gx-ide-assets/mcp-server/shortcuts.json +15 -0
- package/dist/collection/components/mcp-server/mcp-server.css +128 -0
- package/dist/collection/components/mcp-server/mcp-server.js +372 -0
- package/dist/collection/components/mcp-server/mcp-server.js.map +1 -0
- package/dist/collection/components/mcp-server/tests/mcp-server.e2e.js +83 -0
- package/dist/collection/components/mcp-server/tests/mcp-server.e2e.js.map +1 -0
- package/dist/collection/components/mcp-server/types.js +2 -0
- package/dist/collection/components/mcp-server/types.js.map +1 -0
- package/dist/collection/testing/locale.e2e.js +1 -0
- package/dist/collection/testing/locale.e2e.js.map +1 -1
- package/dist/components/gx-ide-kb-manager-import.js +7 -4
- package/dist/components/gx-ide-kb-manager-import.js.map +1 -1
- package/dist/components/gx-ide-mcp-server.d.ts +11 -0
- package/dist/components/gx-ide-mcp-server.js +213 -0
- package/dist/components/gx-ide-mcp-server.js.map +1 -0
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-kb-manager-import.entry.js +7 -4
- package/dist/esm/gx-ide-kb-manager-import.entry.js.map +1 -1
- package/dist/esm/gx-ide-mcp-server.entry.js +177 -0
- package/dist/esm/gx-ide-mcp-server.entry.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/mcp-server/langs/mcp-server.lang.en.json +36 -0
- package/dist/genexus-ide-ui/gx-ide-assets/mcp-server/langs/mcp-server.lang.ja.json +36 -0
- package/dist/genexus-ide-ui/gx-ide-assets/mcp-server/langs/mcp-server.lang.zh.json +36 -0
- package/dist/genexus-ide-ui/gx-ide-assets/mcp-server/shortcuts.json +15 -0
- package/dist/genexus-ide-ui/p-45b6dc45.entry.js +251 -0
- package/dist/genexus-ide-ui/p-45b6dc45.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-52a0b585.entry.js → p-7cd24b82.entry.js} +3 -2
- package/dist/genexus-ide-ui/p-7cd24b82.entry.js.map +1 -0
- package/dist/types/common/types.d.ts +1 -0
- package/dist/types/components/kb-manager-import/helpers.d.ts +2 -2
- package/dist/types/components/kb-manager-import/kb-manager-import.d.ts +0 -4
- package/dist/types/components/mcp-server/mcp-server.d.ts +55 -0
- package/dist/types/components/mcp-server/types.d.ts +11 -0
- package/dist/types/components.d.ts +93 -8
- package/package.json +1 -1
- package/dist/genexus-ide-ui/p-52a0b585.entry.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["mcpServerCss","CSS_BUNDLES","COPY_ICON","getIconPath","category","name","colorType","GxIdeMcpServer","_GxIdeMcpServer_componentLocale","set","this","_GxIdeMcpServer_chShortcutsEl","_GxIdeMcpServer_shortcutsSrc","getAssetPath","_GxIdeMcpServer_startHandler","async","errorMessage","undefined","actionInProgress","status","result","startCallback","success","serverPort","port","serverEndpoint","endpoint","_a","__classPrivateFieldGet","errors","startFailed","_b","_GxIdeMcpServer_stopHandler","stopCallback","stopFailed","_GxIdeMcpServer_closeHandler","closeCallback","call","_GxIdeMcpServer_copyEndpointHandler","copyCallback","copying","setTimeout","componentWillLoad","__classPrivateFieldSet","Locale","getComponentStrings","el","suspendShortcuts","suspend","render","h","Host","class","model","src","ref","header","title","initialLoading","_GxIdeMcpServer_instances","_GxIdeMcpServer_renderStatusBadge","loaderTitle","loader","show","info","description","details","_GxIdeMcpServer_renderStatusCard","_GxIdeMcpServer_renderError","type","onClick","part","buttons","close","_GxIdeMcpServer_renderPrimaryButton","statusText","badgeClass","isAnimated","isDimmed","statusCard","statusLabel","portLabel","endpointLabel","disabled","copyEndpoint","copiedEndpoint","isRunning","stop","start"],"sources":["src/components/mcp-server/mcp-server.scss?tag=gx-ide-mcp-server&encapsulation=shadow","src/components/mcp-server/mcp-server.tsx"],"sourcesContent":["@import \"../../global/temporary-mercury-overrides/_button.scss\";\n\n:host {\n display: grid;\n inline-size: 100%;\n block-size: 100%;\n min-inline-size: 480px;\n min-block-size: 320px;\n overflow: auto;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.section {\n display: contents;\n}\n\n.header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.title {\n margin: 0;\n}\n\n.main {\n overflow: auto;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-xl);\n padding-block: var(--spacing-padding-l);\n}\n\n\n.info-section {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-m);\n color: var(--color-text-neutral-default);\n}\n\n.status-badge {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-gap-xs);\n}\n\n.status-dot {\n $dot-size: 8px;\n\n display: inline-block;\n inline-size: $dot-size;\n block-size: $dot-size;\n border-radius: 50%;\n background-color: var(--color-text-neutral-disabled);\n flex-shrink: 0;\n\n .status-badge--running & {\n background-color: var(--color-text-success-default, #22c55e);\n }\n\n .status-badge--error & {\n background-color: var(--color-text-error-default, #ef4444);\n }\n\n .status-badge--starting &,\n .status-badge--stopping & {\n background-color: var(--color-text-warning-default, #f59e0b);\n }\n\n &--animated {\n animation: pulse 1.2s ease-in-out infinite;\n }\n}\n\n@keyframes pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.3;\n }\n}\n\n.status-card {\n border: 1px solid var(--color-border-surface-on-elevation-1);\n border-radius: 4px;\n padding: var(--spacing-gap-l);\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-m);\n\n &--dimmed {\n opacity: 0.5;\n }\n\n &__row {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-l);\n\n > :first-child {\n min-inline-size: 80px;\n flex-shrink: 0;\n }\n }\n\n &__endpoint {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-m);\n flex-wrap: wrap;\n\n > .button-icon-only {\n padding: 0;\n block-size: auto;\n }\n }\n}\n\n.endpoint-value {\n word-break: break-all;\n color: var(--color-text-neutral-default);\n}\n\n.loader {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n}\n\n.error-message {\n color: var(--color-text-error-default, #ef4444);\n padding: var(--spacing-gap-m);\n border: 1px solid var(--color-border-error-default, #ef4444);\n border-radius: 4px;\n background-color: var(--color-surface-error-default, rgba(239, 68, 68, 0.08));\n}\n\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n getAssetPath,\n Method\n} from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\nimport {\n McpServerStatus,\n McpStartResult,\n McpStopResult\n} from \"./types\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/elevation\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst COPY_ICON = getIconPath({\n category: \"system\",\n name: \"copy\",\n colorType: \"primary\"\n});\n\n\n@Component({\n tag: \"gx-ide-mcp-server\",\n styleUrl: \"mcp-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/mcp-server\"]\n})\nexport class GxIdeMcpServer {\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n #chShortcutsEl: HTMLChShortcutsElement;\n #shortcutsSrc = getAssetPath(\n `./gx-ide-assets/mcp-server/shortcuts.json`\n );\n\n @Element() el: HTMLGxIdeMcpServerElement;\n\n @State() actionInProgress: boolean = false;\n @State() errorMessage: string | undefined;\n @State() copying: boolean = false;\n\n /**\n * When `true` the component shows a loader instead of content.\n * The host sets this to `false` once the initial status is known.\n */\n @Prop({ mutable: true }) initialLoading: boolean = true;\n\n /**\n * Current MCP server status. The host is responsible for keeping\n * this prop up to date (e.g. via polling or event-driven updates).\n * The component only mutates it internally during start/stop\n * transitions (`starting`, `stopping`, result states).\n */\n @Prop({ mutable: true }) status!: McpServerStatus;\n\n /**\n * Port the MCP server is listening on (shown when running).\n */\n @Prop({ mutable: true }) serverPort: number | undefined;\n\n /**\n * Full endpoint URL (shown when running).\n */\n @Prop({ mutable: true }) serverEndpoint: string | undefined;\n\n /**\n * Callback to start the MCP server. Returns result with connection info.\n */\n @Prop() readonly startCallback!: StartCallback;\n\n /**\n * Callback to stop the MCP server.\n */\n @Prop() readonly stopCallback!: StopCallback;\n\n /**\n * Callback to copy text to the clipboard. Delegated to the IDE clipboard\n * service so the host environment controls the copy behavior.\n */\n @Prop() readonly copyCallback!: CopyCallback;\n\n /**\n * Callback to close/dismiss the dialog.\n */\n @Prop() readonly closeCallback!: CloseCallback;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n /**\n * Suspends or reactivates the shortcuts.\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n this.#chShortcutsEl.suspend = suspendShortcuts;\n }\n\n #startHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n this.status = \"starting\";\n\n try {\n const result = await this.startCallback();\n\n if (result.success) {\n this.status = \"running\";\n this.serverPort = result.port;\n this.serverEndpoint = result.endpoint;\n } else {\n this.status = \"error\";\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.startFailed;\n }\n } catch {\n this.status = \"error\";\n this.errorMessage = this.#componentLocale.errors.startFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #stopHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n this.status = \"stopping\";\n\n try {\n const result = await this.stopCallback();\n\n if (result.success) {\n this.status = \"stopped\";\n this.serverPort = undefined;\n this.serverEndpoint = undefined;\n } else {\n this.status = \"error\";\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.stopFailed;\n }\n } catch {\n this.status = \"error\";\n this.errorMessage = this.#componentLocale.errors.stopFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #closeHandler = () => {\n this.closeCallback?.();\n };\n\n #copyEndpointHandler = () => {\n if (this.serverEndpoint && this.copyCallback) {\n this.copying = true;\n this.copyCallback(this.serverEndpoint);\n setTimeout(() => {\n this.copying = false;\n }, 1000);\n }\n };\n\n #renderStatusBadge() {\n const statusText =\n this.#componentLocale.status[this.status] ?? this.status;\n\n const badgeClass = `status-badge status-badge--${this.status}`;\n const isAnimated =\n this.status === \"starting\" || this.status === \"stopping\";\n\n return (\n <span class={badgeClass}>\n <span\n class={`status-dot ${isAnimated ? \"status-dot--animated\" : \"\"}`}\n ></span>\n <span class=\"body-regular-s\">{statusText}</span>\n </span>\n );\n }\n\n #renderStatusCard() {\n if (this.status !== \"running\" && this.status !== \"stopping\") {\n return null;\n }\n\n const isDimmed = this.status === \"stopping\";\n\n return (\n <div\n class={`status-card elevation-1 ${isDimmed ? \"status-card--dimmed\" : \"\"}`}\n >\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.statusLabel}\n </span>\n <span class=\"body-regular-s\">\n {this.#componentLocale.status[this.status]}\n </span>\n </div>\n\n {this.serverPort !== undefined && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.portLabel}\n </span>\n <span class=\"body-regular-s\">{this.serverPort}</span>\n </div>\n )}\n\n {this.serverEndpoint && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.endpointLabel}\n </span>\n <span class=\"status-card__endpoint\">\n <span class=\"body-regular-s endpoint-value\">\n {this.serverEndpoint}\n </span>\n <button\n class=\"button-tertiary button-icon-only\"\n type=\"button\"\n onClick={this.#copyEndpointHandler}\n disabled={this.copying}\n aria-label={this.#componentLocale.statusCard.copyEndpoint}\n title={\n this.copying\n ? this.#componentLocale.statusCard.copiedEndpoint\n : this.#componentLocale.statusCard.copyEndpoint\n }\n >\n <ch-image class=\"icon-m\" src={COPY_ICON}></ch-image>\n </button>\n </span>\n </div>\n )}\n </div>\n );\n }\n\n #renderError() {\n if (!this.errorMessage) {\n return null;\n }\n\n return <div class=\"error-message body-regular-s\">{this.errorMessage}</div>;\n }\n\n #renderPrimaryButton() {\n const isRunning =\n this.status === \"running\" || this.status === \"stopping\";\n\n if (isRunning) {\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#stopHandler}\n disabled={this.actionInProgress}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.stop}\n </button>\n );\n }\n\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#startHandler}\n disabled={this.actionInProgress}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.start}\n </button>\n );\n }\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n <section class=\"section\">\n <header class=\"header dialog-header-with-border spacing-body-inline spacing-body-block-start\">\n <h1 class=\"heading-s title\">\n {this.#componentLocale.header.title}\n </h1>\n {!this.initialLoading && this.#renderStatusBadge()}\n </header>\n\n <div class=\"main spacing-body-inline\">\n {this.initialLoading ? (\n <gx-ide-loader\n loaderTitle={this.#componentLocale.loader.title}\n show\n class=\"loader\"\n ></gx-ide-loader>\n ) : ([\n <div class=\"info-section\">\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.description}\n </p>\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.details}\n </p>\n </div>,\n\n this.#renderStatusCard(),\n this.#renderError()\n ])}\n </div>\n\n <footer class=\"footer dialog-footer-with-border spacing-body-inline spacing-body-block-end\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n type=\"button\"\n onClick={this.#closeHandler}\n part=\"button-cancel\"\n >\n {this.#componentLocale.buttons.close}\n </button>\n {!this.initialLoading && this.#renderPrimaryButton()}\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type StartCallback = () => Promise<McpStartResult>;\nexport type StopCallback = () => Promise<McpStopResult>;\nexport type CopyCallback = (text: string) => void;\nexport type CloseCallback = () => void;\n"],"mappings":";;;;;;;;;;;;;;AAAA,MAAMA,IAAe;;;;;;;;;;;;;;;;;ACoBrB,MAAMC,IAA8B,EAClC,qBACA,qBACA,mBACA,gBACA,oBACA,mBACA,iBACA;;AAGF,MAAMC,IAAYC,EAAY;EAC5BC,UAAU;EACVC,MAAM;EACNC,WAAW;;;MAUAC,IAAc;;;;;QAEzBC,EAAAC,IAAAC,WAAA;IACAC,EAAAF,IAAAC,WAAA;IACAE,EAAAH,IAAAC,MAAgBG,EACd;IAkEFC,EAAAL,IAAAC,OAAgBK;;MACdL,KAAKM,eAAeC;MACpBP,KAAKQ,mBAAmB;MACxBR,KAAKS,SAAS;MAEd;QACE,MAAMC,UAAeV,KA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ACjCzD,EAAAlB,MAAIF,GAAA,KAAkBuE,WAAWK;KAGvClC,EAAA;IAAUE,OAAM;IAASE,KAAKpD;;AAO5C,GAACkE,IAAA,SAAAA;EAGC,KAAK1D,KAAKM,cAAc;IACtB,OAAO;;EAGT,OAAOkC,EAAA;IAAKE,OAAM;KAAgC1C,KAAKM;AACzD,GAAC0D,IAAA,SAAAA;EAGC,MAAMY,IACJ5E,KAAKS,WAAW,aAAaT,KAAKS,WAAW;EAE/C,IAAImE,GAAW;IACb,OACEpC,EAAA;MACEE,OAAM;MACNiB,MAAK;MACLC,SAAS1C,EAAAlB,MAAIsB,GAAA;MACbmD,UAAUzE,KAAKQ;MACfqD,MAAK;OAEJ3C,EAAAlB,MAAIF,GAAA,KAAkBgE,QAAQe;;EAKrC,OACErC,EAAA;IACEE,OAAM;IACNiB,MAAK;IACLC,SAAS1C,EAAAlB,MAAII,GAAA;IACbqE,UAAUzE,KAAKQ;IACfqD,MAAK;KAEJ3C,EAAAlB,MAAIF,GAAA,KAAkBgE,QAAQgB;AAGrC"}
|
|
@@ -26,12 +26,13 @@ const d = "status";
|
|
|
26
26
|
const convertImportCategoryItemToTreeItem = (t, e) => {
|
|
27
27
|
const i = [];
|
|
28
28
|
e.forEach((e => {
|
|
29
|
+
var s;
|
|
29
30
|
i.push({
|
|
30
31
|
id: e.id,
|
|
31
32
|
caption: e.name,
|
|
32
33
|
expanded: true,
|
|
33
34
|
leaf: true,
|
|
34
|
-
startImgSrc: t,
|
|
35
|
+
startImgSrc: (s = e.icon) !== null && s !== void 0 ? s : t,
|
|
35
36
|
metadata: c
|
|
36
37
|
});
|
|
37
38
|
}));
|
|
@@ -706,4 +707,4 @@ R = new WeakMap, A = new WeakMap, N = new WeakMap, P = new WeakMap;
|
|
|
706
707
|
G.style = h;
|
|
707
708
|
|
|
708
709
|
export { G as gx_ide_kb_manager_import };
|
|
709
|
-
//# sourceMappingURL=p-
|
|
710
|
+
//# sourceMappingURL=p-7cd24b82.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MAX_CATEGORY_ITEMS_FIRST_RENDER","KB_OBJECT","KB_CATEGORY","STATUS_REGEXP_KEY","convertImportCategoryItemToTreeItem","importCatIcon","importItems","importTreeItems","forEach","importItem","push","id","caption","name","expanded","leaf","startImgSrc","_a","icon","metadata","convertImportCategoryDataToTreeView","importCategoryData","treeData","importCategory","importCategoryTreeItem","items","length","lazy","createImportResultDataMessages","importItemId","messagesArray","status","messages","message","i","JSON","stringify","createImportResultItem","categoryData","importItemResultData","resultItemId","importResultItem","parts","addImportItemResultDataItem","categoryItemMap","objectCategoryItemMap","importTreeActualState","updatedImportTreeModel","objectCategoryId","get","categoryIndex","findIndex","treeItem","category","resultItem","newItemsLength","kbManagerImportCss","CSS_BUNDLES","NOTICE_ICON","getIconPath","colorType","FILE_ICON","GEMINI_TOOLS_SETTINGS","MENU_DELETE","CHECKBOX_ALL_CHECKED_VALUE","CHECKBOX_ALL_UNCHECKED_VALUE","GxIdeKbManagerImport","_GxIdeKbManagerImport_componentLocale","set","this","_GxIdeKbManagerImport_selectedObjectsInFileIds","_GxIdeKbManagerImport_fileInputEl","_GxIdeKbManagerImport_fileInputHiddenEl","_GxIdeKbManagerImport_objectsTreeEl","_GxIdeKbManagerImport_successItemsIds","Set","_GxIdeKbManagerImport_warningItemsIds","_GxIdeKbManagerImport_errorItemsIds","_GxIdeKbManagerImport_categoryItemMap","Map","_GxIdeKbManagerImport_objectCategoryItemMap","_GxIdeKbManagerImport_importedCategoryData","_GxIdeKbManagerImport_cancelImportHandler","cancelCallback","_GxIdeKbManagerImport_clearStatusHandler","importTreeState","statusInfo","error","number","warning","success","_GxIdeKbManagerImport_evaluateImport","noImport","_GxIdeKbManagerImport_evaluateImportStatusMessage","someStatusVisible","display","_GxIdeKbManagerImport_importObjectsHandler","async","__classPrivateFieldGet","call","importingIsInProcess","selection","_GxIdeKbManagerImport_buildImportSelection","importCallback","groups","everyGroupFullySelected","model","find","cat","totalItems","childrenLoaded","checked","groupId","mode","checkedIds","uncheckedIds","child","_b","ids","_GxIdeKbManagerImport_loadFileHandler","file","__classPrivateFieldSet","loadCallback","clear","object","importCategoryTreeData","objectsTreeModel","hasSelection","_GxIdeKbManagerImport_lazyLoadTreeItems","treeItemId","_GxIdeKbManagerImport_objectsTreeCheckedItemsChangedHandler","event","allItems","detail","checkedItemIds","pendingCheckedItemIds","item","pendingCheckedItemId","size","selectAllCheckboxValue","selectAllCheckboxIndeterminate","_GxIdeKbManagerImport_objectsTreeContextMenuHandler","objectContextMenuCallback","clientX","contextmenuEvent","screenX","clientY","screenY","_GxIdeKbManagerImport_objectsTreeSelectedItemsChangedHandler","map","_GxIdeKbManagerImport_optionsHandler","optionsCallback","_GxIdeKbManagerImport_removeFileSelection","selectedFile","value","_GxIdeKbManagerImport_selectFileInputHandler","click","_GxIdeKbManagerImport_selectFileInputChangedHandler","target","files","_GxIdeKbManagerImport_statusButtonsSelectionChangedHandler","activeStates","statuses","errorIndex","state","itemId","warningIndex","successIndex","pattern","statusOptions","join","importedTreeFilterRegExp","RegExp","_GxIdeKbManagerImport_toggleSelectionClickHandler","updateAllItemsProperties","_GxIdeKbManagerImport_updateStatusItemsState","add","importTreeStateChanged","watchImportTreeStateHandler","importStatusMessage","main","importStatus","noImportedFiles","importedButHidden","watchObjectsTreeModelHandler","newState","noObjects","selectedFileChanged","newFile","componentDidLoad","focus","componentDidRender","componentWillLoad","Locale","getComponentStrings","el","componentDidLoadEvent","emit","addResultItem","render","h","Host","class","slot","htmlFor","header","fileNameLabel","autoFocus","part","type","readonly","placeholder","fileNamePlaceholder","ref","hidden","accept","onChange","removeFileSelection","title","onClick","src","disabled","selectFileButton","objectsInFile","showLines","dragDisabled","dropDisabled","toggleCheckboxes","checkbox","lazyLoadTreeItemsCallback","onCheckedItemsChange","onSelectedItemsChange","onItemContextmenu","isAnimated","stateTitle","key","selectFile","checkedValue","unCheckedValue","selectUnselect","onInput","importButton","cancelButton","filter","filterType","filterOptions","autoExpand","hideMatchesAndShowNonMatches","stateIconSrc","clearButton","errors","warnings","successes","hideMessage","compact","minimal","statusMinimal","onSelectionChanged"],"sources":["src/components/kb-manager-import/helpers.ts","src/components/kb-manager-import/kb-manager-import.scss?tag=gx-ide-kb-manager-import&encapsulation=shadow","src/components/kb-manager-import/kb-manager-import.tsx"],"sourcesContent":["/* Tree View */\nimport {\n TreeViewItemModel,\n TreeViewModel\n} from \"@genexus/chameleon-controls-library\";\n\n/* Kb Manager Import Types*/\nimport {\n CategoryItemMap,\n CategoryItemMapValue,\n ObjectCategoryItemMap,\n Status\n} from \"./kb-manager-import\";\nimport {\n ImportCategoryData,\n ImportItemResultData,\n ImportItemData\n} from \"../../common/types\";\n\nconst MAX_CATEGORY_ITEMS_FIRST_RENDER = 30;\n\n/* objects in file metadata*/\nexport const KB_OBJECT = \"object\";\nexport const KB_CATEGORY = \"category\";\n\nexport const STATUS_REGEXP_KEY = \"status\";\n\n// - - - - - - - - - - - - - - - - -\n// Objects In File Tree Model\n// - - - - - - - - - - - - - - - - -\n\nexport const convertImportCategoryItemToTreeItem = (\n importCatIcon: string,\n importItems: ImportItemData[]\n) => {\n const importTreeItems: TreeViewItemModel[] = [];\n importItems.forEach(importItem => {\n importTreeItems.push({\n id: importItem.id,\n caption: importItem.name,\n expanded: true,\n leaf: true,\n startImgSrc: importItem.icon ?? importCatIcon,\n metadata: KB_OBJECT\n });\n });\n return importTreeItems;\n};\n\nexport const convertImportCategoryDataToTreeView = (\n importCategoryData: ImportCategoryData[]\n): TreeViewModel => {\n const treeData: TreeViewModel = [];\n if (!importCategoryData) {\n return treeData;\n }\n importCategoryData.forEach(importCategory => {\n const importCategoryTreeItem: TreeViewItemModel = {\n id: importCategory.id,\n caption: `${importCategory.name} (${importCategory.items.length})`,\n expanded: importCategory.items.length <= MAX_CATEGORY_ITEMS_FIRST_RENDER,\n lazy: importCategory.items.length > MAX_CATEGORY_ITEMS_FIRST_RENDER,\n leaf: false,\n startImgSrc: importCategory.icon,\n metadata: KB_CATEGORY,\n items:\n importCategory.items.length <= MAX_CATEGORY_ITEMS_FIRST_RENDER\n ? convertImportCategoryItemToTreeItem(\n importCategory.icon,\n importCategory.items\n )\n : []\n };\n treeData.push(importCategoryTreeItem);\n });\n return treeData;\n};\n\n// - - - - - - - - - - - - - - - - -\n// Import Status Tree Model\n// - - - - - - - - - - - - - - - - -\n\nconst createImportResultDataMessages = (\n importItemId: string,\n messagesArray: string[],\n status: Status\n): TreeViewItemModel[] => {\n const messages: TreeViewItemModel[] = [];\n messagesArray.forEach((message, i) => {\n messages.push({\n id: `${importItemId}-message-${i}`,\n caption: message,\n startImgSrc: \"gemini-tools/list-view/on-surface\",\n leaf: true,\n metadata: JSON.stringify({\n [STATUS_REGEXP_KEY]: status\n })\n });\n });\n return messages;\n};\n\nconst createImportResultItem = (\n categoryData: CategoryItemMapValue,\n importItemResultData: ImportItemResultData\n): TreeViewItemModel => {\n const resultItemId = `${importItemResultData.id}-${importItemResultData.name}`;\n const importResultItem: TreeViewItemModel = {\n id: resultItemId,\n startImgSrc: categoryData.icon,\n caption: importItemResultData.name,\n parts: `tree-view-item tree-view-item--status tree-view-item--${importItemResultData.status}`,\n expanded: true,\n leaf: importItemResultData.messages.length === 0,\n metadata: JSON.stringify({\n [STATUS_REGEXP_KEY]: importItemResultData.status\n }),\n items: createImportResultDataMessages(\n resultItemId,\n importItemResultData.messages,\n importItemResultData.status\n )\n };\n return importResultItem;\n};\n\n// This functions updates the \"Import Status\" model, by adding a new result item.\nexport const addImportItemResultDataItem = (\n importItemResultData: ImportItemResultData,\n categoryItemMap: CategoryItemMap,\n objectCategoryItemMap: ObjectCategoryItemMap,\n importTreeActualState: TreeViewItemModel[]\n) => {\n const updatedImportTreeModel: TreeViewModel = [...importTreeActualState];\n\n // Use the resultItem.id to find the corresponding category in the categoryMap\n const objectCategoryId = objectCategoryItemMap.get(importItemResultData.id);\n const categoryData = categoryItemMap.get(objectCategoryId);\n\n const categoryIndex: number = updatedImportTreeModel.findIndex(\n treeItem => treeItem.id === objectCategoryId\n );\n\n if (categoryIndex === -1) {\n // category does not exists yet.\n const category: TreeViewItemModel = {\n id: objectCategoryId,\n caption: `${categoryData.name} (1)`,\n startImgSrc: `${categoryData.icon}`,\n expanded: true,\n items: [createImportResultItem(categoryData, importItemResultData)]\n };\n\n updatedImportTreeModel.push(category);\n return updatedImportTreeModel;\n }\n\n // else category already exists. Just insert the result item in the category.\n const resultItem: TreeViewItemModel = createImportResultItem(\n categoryData,\n importItemResultData\n );\n updatedImportTreeModel[categoryIndex].items = [\n ...updatedImportTreeModel[categoryIndex].items,\n resultItem\n ];\n\n // update category caption length\n const newItemsLength = updatedImportTreeModel[categoryIndex].items.length;\n updatedImportTreeModel[categoryIndex].caption =\n `${categoryData.name} (${newItemsLength})`;\n\n return updatedImportTreeModel;\n};\n","@import \"../../global/gx-ide-mixins.scss\";\n@import \"../../global/temporary-mercury-overrides/_button.scss\";\n\n:host {\n display: grid;\n block-size: 100%;\n grid-template:\n \"header header\" max-content\n \"objects-in-file import-status\" 1fr\n \"footer footer\" max-content;\n grid-template-columns: 1fr 1fr;\n}\n\n.section {\n display: contents;\n}\n\n// header\n.header {\n grid-template-columns: 1fr max-content;\n grid-area: header;\n}\n\n// objects in file\n.objects-in-file__section {\n grid-area: objects-in-file;\n}\n.objects-in-file__main {\n border-inline-end: var(--section-common-border);\n grid-template-rows: 1fr max-content;\n}\n.objects-in-file__footer {\n display: grid;\n}\n\n// import status\n.import-status__section {\n grid-area: import-status;\n}\n.import-status__main {\n grid-template-rows: 1fr max-content;\n}\n.import-status__footer {\n display: flex;\n}\n.import-clear-status-btn {\n margin-inline-start: auto;\n}\n\n// objects in file & import status\n.objects-in-file__section,\n.import-status__section {\n display: grid;\n grid-template-rows: max-content 1fr;\n}\n.dialog-header__objects-in-file,\n.dialog-header__import-status {\n padding-block-start: 16px;\n}\n.objects-in-file__main,\n.import-status__main {\n grid-auto-rows: max-content;\n padding-block: 12px;\n overflow: auto;\n}\n\n// footer\n.footer {\n display: flex;\n grid-area: footer;\n border-block-start: var(--section-common-border);\n}\n\n// WA / TODO: Add a helper class in Mercury to justify text.\n.text-align-center {\n text-align: center; // should be resolved on mercury\n}\n\n.tree-view::part(item__action tree-view-item--status) {\n grid-template: \"first-img left-img text right-img\" / max-content max-content 1fr max-content;\n &::before {\n grid-area: first-img;\n content: \"\";\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background-color: var(--gray-03);\n margin-inline-end: 2px;\n }\n}\n\n.tree-view::part(item__action tree-view-item--success) {\n @include tree-item-status(\"success\");\n}\n.tree-view::part(item__action tree-view-item--warning) {\n @include tree-item-status(\"warning\");\n}\n.tree-view::part(item__action tree-view-item--error) {\n @include tree-item-status(\"error\");\n}\n\n// WA: prevent crashes when the items collection contains too many elements\n.tree-view-import::part(item) {\n content-visibility: auto;\n contain-intrinsic-size: auto 22px;\n // TODO: Check if 22px can be calculated. Not \"secure\" since font-size\n // (body-regular-s) defines the total height. If the typographic style\n // changes, this calculation will break. Ideally, tree item font-size\n // should use a variable like \"--tree-item-font-size\".\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n h,\n Method,\n Prop,\n State,\n Watch\n} from \"@stencil/core\";\n\nimport {\n ChCheckboxCustomEvent,\n // ChEditCustomEvent,\n TreeViewItemContextMenu\n} from \"@genexus/chameleon-controls-library\";\nimport { TreeViewItemModel } from \"@genexus/chameleon-controls-library\";\nimport { TreeViewItemModelExtended } from \"@genexus/chameleon-controls-library\";\nimport { getIconPath, MercuryBundles } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\n\nimport {\n ImportCategoryData,\n ImportItemResultData,\n ContextMenuInfo\n} from \"../../common/types\";\nimport {\n convertImportCategoryDataToTreeView,\n addImportItemResultDataItem,\n convertImportCategoryItemToTreeItem\n} from \"./helpers\";\nimport { CheckedItemsInfo } from \"../_helpers/list-selector/list-selector\";\n\nimport { KB_OBJECT, STATUS_REGEXP_KEY } from \"./helpers\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/checkbox\",\n \"components/edit\",\n \"components/icon\",\n \"components/tree-view\",\n \"utils/form\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\"\n];\n\nconst NOTICE_ICON = getIconPath({\n category: \"gemini-tools\",\n name: \"notice\",\n colorType: \"on-surface\"\n});\n\nconst FILE_ICON = getIconPath({\n category: \"gemini-tools\",\n name: \"file\",\n colorType: \"primary\"\n});\n\nconst GEMINI_TOOLS_SETTINGS = getIconPath({\n category: \"gemini-tools\",\n name: \"settings\",\n colorType: \"primary\"\n});\n\nconst MENU_DELETE = getIconPath({\n category: \"menus\",\n name: \"delete\",\n colorType: \"primary\"\n});\n\nconst CHECKBOX_ALL_CHECKED_VALUE = \"allChecked\";\nconst CHECKBOX_ALL_UNCHECKED_VALUE = \"allUnchecked\";\n\n@Component({\n tag: \"gx-ide-kb-manager-import\",\n styleUrl: \"kb-manager-import.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/kb-manager-import\"]\n})\nexport class GxIdeKbManagerImport {\n /**\n * The component hard-coded strings translations.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n\n #selectedObjectsInFileIds: string[] = [];\n\n @Element() el: HTMLGxIdeKbManagerImportElement;\n\n #fileInputEl!: HTMLChEditElement;\n #fileInputHiddenEl!: HTMLInputElement;\n #objectsTreeEl!: HTMLChTreeViewRenderElement;\n #successItemsIds: Set<string> = new Set();\n #warningItemsIds: Set<string> = new Set();\n #errorItemsIds: Set<string> = new Set();\n // #categoryItemMap maps a category id, with the name and icon.\n // required for the \"import status\" tree.\n #categoryItemMap: CategoryItemMap = new Map();\n #objectCategoryItemMap: ObjectCategoryItemMap = new Map();\n #importedCategoryData: ImportCategoryData[];\n\n @State() selectAllCheckboxValue: string;\n @State() selectAllCheckboxIndeterminate: boolean = false;\n @State() hasSelection: boolean = false;\n @State() importStatusMessage: string;\n @State() importTreeState: TreeViewItemModel[] = [];\n @State() importedTreeFilterRegExp: RegExp;\n @Watch(\"importTreeState\")\n importTreeStateChanged() {\n // this.#filterImportedHandler();\n }\n @State() importingIsInProcess = false;\n @State() importTreeFilterList: string[] = [];\n @State() noImport: boolean;\n @State() noObjects: boolean = true;\n @State() objectsTreeModel: TreeViewItemModel[] = [];\n @State() showHiddenImportsMessage = false;\n @State() someStatusVisible: boolean;\n @State() statusInfo: StatusInfo = {\n error: {\n display: true,\n number: 0\n },\n warning: {\n display: true,\n number: 0\n },\n success: {\n display: true,\n number: 0\n }\n };\n\n @Watch(\"importTreeState\")\n watchImportTreeStateHandler() {\n this.#evaluateImport();\n if (this.noImport) {\n this.importStatusMessage =\n this.#componentLocale.main.importStatus.noImportedFiles;\n } else {\n this.importStatusMessage =\n this.#componentLocale.main.importStatus.importedButHidden;\n }\n }\n @Watch(\"objectsTreeModel\")\n watchObjectsTreeModelHandler(newState: TreeViewItemModel[]) {\n this.noObjects = !newState || newState.length === 0;\n }\n\n /**\n * Callback invoked when user wants to cancel the export process.\n */\n @Prop() readonly cancelCallback!: CancelCallback;\n\n /**\n * Callback invoked when user wants to initiate the import process.\n */\n @Prop() readonly importCallback!: ImportCallback;\n\n /**\n * Callback invoked when user wants to load the xpz information\n */\n @Prop() readonly loadCallback!: LoadCallback;\n\n /**\n * Displays status buttons (errors, warning, succeeded) with minimal UI (no captions)\n */\n @Prop() readonly objectContextMenuCallback!: ObjectContextMenuCallback;\n\n /**\n * Callback invoked when user wants to access the export options.\n */\n @Prop() readonly optionsCallback!: OptionsCallback;\n\n /**\n * Imported xml or xps file name\n */\n @Prop({ mutable: true }) selectedFile: File;\n @Watch(\"selectedFile\")\n selectedFileChanged(newFile: File) {\n if (newFile) {\n this.#loadFileHandler(newFile);\n }\n }\n\n /**\n * Displays status buttons (error, warning, success) with minimal UI (no captions).\n */\n @Prop() readonly statusMinimal = false;\n\n /**\n * Emitted once just after the component is fully loaded.\n */\n @Event() componentDidLoadEvent: EventEmitter<boolean>;\n\n /**\n * Emitted once just after the component is fully loaded and the first render() occurs\n */\n @Event() componentDidRenderFirstTime: EventEmitter<boolean>;\n\n componentDidLoad() {\n this.#fileInputEl.focus();\n }\n\n componentDidRender() {}\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.componentDidLoadEvent.emit(true);\n // this.#evaluateObjects();\n this.#evaluateImport();\n this.importStatusMessage =\n this.#componentLocale.main.importStatus.noImportedFiles;\n this.#evaluateImportStatusMessage();\n }\n\n /**\n * Add the result of importing an item\n */\n @Method()\n async addResultItem(item: ImportItemResultData) {\n this.importTreeState = addImportItemResultDataItem(\n item,\n this.#categoryItemMap,\n this.#objectCategoryItemMap,\n this.importTreeState\n );\n this.statusInfo[item.status].number++;\n this.#updateStatusItemsState();\n }\n\n #cancelImportHandler = () => {\n this.cancelCallback();\n };\n\n #clearStatusHandler = () => {\n this.importTreeState = [];\n this.statusInfo.error.number = 0;\n this.statusInfo.warning.number = 0;\n this.statusInfo.success.number = 0;\n };\n\n #evaluateImport = () => {\n this.noImport = !!(\n this.importTreeState?.length === 0 || !this.importTreeState\n );\n };\n\n #evaluateImportStatusMessage = () => {\n this.someStatusVisible =\n this.statusInfo.error.display ||\n this.statusInfo.warning.display ||\n this.statusInfo.success.display;\n };\n\n #importObjectsHandler = async () => {\n /* first clear imported objects (this clears errors/warnings/success counts as well)*/\n this.#clearStatusHandler();\n /* then do the import*/\n this.importingIsInProcess = true;\n\n const selection = this.#buildImportSelection();\n\n await this.importCallback(selection);\n this.importingIsInProcess = false;\n };\n\n /*\n Build the structured ImportSelection from the current tree state.\n\n Lazy categories may not have their items loaded yet; in that case the\n category's own `checked` flag represents the user's intent for the whole\n group. Large categories are not expanded by default to keep imports of\n 1000+ objects responsive.\n\n For each category, the most compact group representation is picked:\n - every item checked → mode: \"all\"\n - no item checked → group omitted from the partial selection\n - mixed → \"include\" or \"exclude\", whichever has fewer ids\n */\n #buildImportSelection = (): ImportSelection => {\n const groups: GroupSelection[] = [];\n let everyGroupFullySelected = true;\n\n for (const category of this.#objectsTreeEl.model) {\n const categoryData = this.#importedCategoryData.find(\n cat => cat.id === category.id\n );\n const totalItems = categoryData?.items.length ?? 0;\n const childrenLoaded = !!(category.items && category.items.length > 0);\n\n if (!childrenLoaded && category.lazy) {\n if (category.checked) {\n groups.push({ groupId: category.id, mode: \"all\" });\n } else {\n everyGroupFullySelected = false;\n }\n continue;\n }\n\n const checkedIds: string[] = [];\n const uncheckedIds: string[] = [];\n for (const child of category.items ?? []) {\n if (child.checked) {\n checkedIds.push(child.id);\n } else {\n uncheckedIds.push(child.id);\n }\n }\n\n if (uncheckedIds.length === 0 && checkedIds.length === totalItems) {\n groups.push({ groupId: category.id, mode: \"all\" });\n } else if (checkedIds.length === 0) {\n everyGroupFullySelected = false;\n } else {\n everyGroupFullySelected = false;\n if (checkedIds.length <= uncheckedIds.length) {\n groups.push({\n groupId: category.id,\n mode: \"include\",\n ids: checkedIds\n });\n } else {\n groups.push({\n groupId: category.id,\n mode: \"exclude\",\n ids: uncheckedIds\n });\n }\n }\n }\n\n if (\n everyGroupFullySelected &&\n groups.length === this.#importedCategoryData.length\n ) {\n return { mode: \"all\" };\n }\n\n return { mode: \"partial\", groups };\n };\n\n #loadFileHandler = async (file: File) => {\n this.#importedCategoryData = await this.loadCallback(file);\n this.#categoryItemMap.clear();\n this.#objectCategoryItemMap.clear();\n\n this.#importedCategoryData.forEach(category => {\n this.#categoryItemMap.set(category.id, {\n name: category.name,\n icon: category.icon\n });\n category.items.forEach(object => {\n this.#objectCategoryItemMap.set(object.id, category.id);\n });\n });\n\n const importCategoryTreeData = convertImportCategoryDataToTreeView(\n this.#importedCategoryData\n );\n this.objectsTreeModel = importCategoryTreeData;\n // Tree-view renders with `checked={true}` by default, so a freshly\n // loaded file starts with everything selected.\n this.hasSelection = importCategoryTreeData.length > 0;\n };\n\n #lazyLoadTreeItems = async (treeItemId: string) => {\n const category = this.#importedCategoryData.find(\n cat => cat.id === treeItemId\n );\n return category && category.items.length > 0\n ? convertImportCategoryItemToTreeItem(category.icon, category.items)\n : [];\n };\n\n #objectsTreeCheckedItemsChangedHandler = (\n event: CustomEvent<Map<string, TreeViewItemModelExtended>>\n ) => {\n const allItems = event.detail;\n const checkedItemIds: string[] = [];\n const pendingCheckedItemIds: string[] = [];\n const checkedObjectsIds: string[] = [];\n allItems.forEach(item => {\n if (item.item.checked) {\n checkedItemIds.push(item.item.id);\n if (item.item.lazy && !item.item.items)\n pendingCheckedItemIds.push(item.item.id);\n }\n if (item.item.checked && item.item.metadata === KB_OBJECT) {\n checkedObjectsIds.push(item.item.id);\n }\n });\n\n for (let pendingCheckedItemId of pendingCheckedItemIds) {\n const category = this.#importedCategoryData.find(\n cat => cat.id === pendingCheckedItemId\n );\n if (category) {\n for (let item of category.items) {\n if (checkedObjectsIds.indexOf(item.id) < 0)\n checkedObjectsIds.push(item.id);\n }\n }\n }\n\n // Evaluate \"Select All / Unselect All\" checkbox state\n if (allItems.size === checkedItemIds.length) {\n this.selectAllCheckboxValue = CHECKBOX_ALL_CHECKED_VALUE;\n this.selectAllCheckboxIndeterminate = false;\n } else if (checkedItemIds.length === 0) {\n this.selectAllCheckboxValue = CHECKBOX_ALL_UNCHECKED_VALUE;\n this.selectAllCheckboxIndeterminate = false;\n } else {\n this.selectAllCheckboxIndeterminate = true;\n }\n\n this.hasSelection = checkedItemIds.length > 0;\n };\n\n #objectsTreeContextMenuHandler = (\n event: CustomEvent<TreeViewItemContextMenu>\n ) => {\n if (event.detail.metadata === KB_OBJECT) {\n this.objectContextMenuCallback(\"imported\", {\n selection: this.#selectedObjectsInFileIds,\n clientX: event.detail.contextmenuEvent.screenX,\n clientY: event.detail.contextmenuEvent.screenY\n });\n }\n };\n\n #objectsTreeSelectedItemsChangedHandler = (\n event: CustomEvent<TreeViewItemModelExtended[]>\n ) => {\n this.#selectedObjectsInFileIds = event.detail.map(item => item.item.id);\n };\n\n #optionsHandler = () => {\n if (this.optionsCallback) {\n this.optionsCallback();\n // returns boolean\n }\n };\n\n #removeFileSelection = () => {\n this.selectedFile = null;\n this.#fileInputHiddenEl.value = null;\n };\n\n #selectFileInputHandler = () => {\n this.#fileInputHiddenEl.click();\n };\n\n #selectFileInputChangedHandler = (event: InputEvent) => {\n const target = event.target as HTMLInputElement;\n if (target.files?.length > 0) {\n this.selectedFile = target.files[0];\n }\n };\n\n #statusButtonsSelectionChangedHandler = (\n event: CustomEvent<CheckedItemsInfo>\n ) => {\n const activeStates = event.detail;\n const statuses: Status[] = [];\n\n const errorIndex = activeStates.findIndex(\n state => state.itemId === \"errors\"\n );\n const warningIndex = activeStates.findIndex(\n state => state.itemId === \"warnings\"\n );\n const successIndex = activeStates.findIndex(\n state => state.itemId === \"successes\"\n );\n\n if (errorIndex !== -1) {\n statuses.push(\"error\");\n }\n if (warningIndex !== -1) {\n statuses.push(\"warning\");\n }\n if (successIndex !== -1) {\n statuses.push(\"success\");\n }\n\n let pattern = `\"${STATUS_REGEXP_KEY}\":\"\"`;\n if (statuses.length) {\n const statusOptions = statuses.join(\"|\");\n pattern = `\"${STATUS_REGEXP_KEY}\":\"(${statusOptions})\"`;\n }\n this.importedTreeFilterRegExp = new RegExp(pattern, \"i\");\n\n // Update statusInfo for the status-buttons\n this.statusInfo = {\n error: {\n display: errorIndex !== -1,\n number: this.statusInfo.error.number\n },\n warning: {\n display: warningIndex !== -1,\n number: this.statusInfo.warning.number\n },\n success: {\n display: successIndex !== -1,\n number: this.statusInfo.success.number\n }\n };\n\n this.#evaluateImportStatusMessage();\n };\n\n #toggleSelectionClickHandler = (\n event: ChCheckboxCustomEvent<any> | InputEvent\n ) => {\n if (this.#objectsTreeEl) {\n const checked = event.detail === CHECKBOX_ALL_CHECKED_VALUE;\n this.#objectsTreeEl.updateAllItemsProperties({ checked: checked });\n // updateAllItemsProperties does not fire onCheckedItemsChange, so we\n // mirror the new selection state explicitly to keep the Import button\n // disabled when the user unchecks everything via this toggle.\n this.hasSelection = checked && this.objectsTreeModel.length > 0;\n }\n };\n\n #updateStatusItemsState = () => {\n this.#errorItemsIds.clear();\n this.#warningItemsIds.clear();\n this.#successItemsIds.clear();\n this.importTreeState.forEach(item => {\n const items = item.items;\n items.forEach(child => {\n if (child.metadata === \"error\") {\n this.#errorItemsIds.add(child.id);\n }\n if (child.metadata === \"warning\") {\n this.#warningItemsIds.add(child.id);\n }\n if (child.metadata === \"success\") {\n this.#successItemsIds.add(child.id);\n }\n });\n });\n };\n\n render(): void {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <section class=\"section\">\n <header\n // header\n class=\"field-group dialog-header-with-border header header-two-cols spacing-body-block-start spacing-body-inline\"\n slot=\"header\"\n >\n <div\n // select a file\n class=\"field field-inline\"\n >\n <label class=\"label\" htmlFor=\"file-name\">\n {this.#componentLocale.header.fileNameLabel}\n </label>\n <ch-edit\n autoFocus\n id=\"file-name\"\n class=\"input\"\n part=\"file-name\"\n type=\"text\"\n readonly\n value={this.selectedFile?.name}\n placeholder={this.#componentLocale.header.fileNamePlaceholder}\n startImgSrc={FILE_ICON}\n ref={(el: HTMLChEditElement) =>\n (this.#fileInputEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n <input\n hidden\n type=\"file\"\n accept=\".xpz, .xml\"\n onChange={this.#selectFileInputChangedHandler}\n ref={(el: HTMLInputElement) =>\n (this.#fileInputHiddenEl = el as HTMLInputElement)\n }\n />\n </div>\n\n <div class=\"buttons-spacer\">\n <button\n // remove file selection\n aria-label={this.#componentLocale.header.removeFileSelection}\n title={this.#componentLocale.header.removeFileSelection}\n id=\"reset-all-button\"\n class=\"button-tertiary button-icon-only\"\n part=\"reset-all-button\"\n onClick={this.#removeFileSelection}\n >\n <ch-image class=\"icon-m\" src={MENU_DELETE}></ch-image>\n </button>\n\n <button\n // select file\n id=\"select-file-load-button\"\n class=\"button-primary\"\n part=\"select-file-load-button\"\n onClick={this.#selectFileInputHandler}\n disabled={this.importingIsInProcess}\n >\n {this.#componentLocale.header.selectFileButton}\n </button>\n </div>\n </header>\n\n <section\n // objects in file\n class=\"objects-in-file__section\"\n >\n <h2 class=\"dialog-header dialog-header-with-border dialog-header__objects-in-file subtitle-regular-xs\t text-align-center spacing-body-inline\">\n {this.#componentLocale.main.objectsInFile.title}\n </h2>\n\n <div class=\"field-group objects-in-file__main\">\n {!this.noObjects ? (\n <ch-tree-view-render\n // objects in file tree\n showLines=\"last\"\n class=\"tree-view tree-view-import\"\n model={this.objectsTreeModel}\n dragDisabled={true}\n dropDisabled={true}\n toggleCheckboxes={true}\n checkbox={true}\n checked={true}\n lazyLoadTreeItemsCallback={this.#lazyLoadTreeItems}\n onCheckedItemsChange={\n this.#objectsTreeCheckedItemsChangedHandler\n }\n onSelectedItemsChange={\n this.#objectsTreeSelectedItemsChangedHandler\n }\n onItemContextmenu={this.#objectsTreeContextMenuHandler}\n ref={(el: HTMLChTreeViewRenderElement) =>\n (this.#objectsTreeEl = el as HTMLChTreeViewRenderElement)\n }\n ></ch-tree-view-render>\n ) : (\n <gx-ide-empty-state\n isAnimated={false}\n stateTitle={\n this.#componentLocale.main.objectsInFile.noObjects\n }\n key=\"no-objects-empty-state\"\n >\n <button\n // begin by selecting a file\n class=\"button-secondary\"\n onClick={this.#selectFileInputHandler}\n >\n {this.#componentLocale.main.objectsInFile.selectFile}\n </button>\n </gx-ide-empty-state>\n )}\n\n <footer class=\"field-group objects-in-file__footer spacing-body-inline\">\n <ch-checkbox\n // select all / unselect all checkbox\n id=\"select-all-checkbox\"\n class=\"checkbox create-data-in-kb\"\n checkedValue={CHECKBOX_ALL_CHECKED_VALUE}\n unCheckedValue={CHECKBOX_ALL_UNCHECKED_VALUE}\n caption={\n this.#componentLocale.main.objectsInFile.selectUnselect\n }\n value={this.selectAllCheckboxValue}\n onInput={this.#toggleSelectionClickHandler}\n disabled={\n this.importingIsInProcess ||\n this.objectsTreeModel.length === 0\n }\n part=\"select-all-checkbox\"\n ></ch-checkbox>\n\n <div class=\"buttons-spacer\">\n <button\n // import objects button\n id=\"import-btn\"\n class=\"button-primary \"\n onClick={this.#importObjectsHandler}\n disabled={\n this.objectsTreeModel?.length === 0 ||\n this.importingIsInProcess ||\n !this.hasSelection\n }\n >\n {this.#componentLocale.main.objectsInFile.importButton}\n </button>\n\n <button\n // cancel-import button\n id=\"cancel-import-btn\"\n class=\"button-secondary \"\n onClick={this.#cancelImportHandler}\n disabled={!this.importingIsInProcess}\n part=\"cancel-import-button\"\n >\n {this.#componentLocale.main.objectsInFile.cancelButton}\n </button>\n\n <button\n // settings/options button\n id=\"select-kb-btn\"\n class=\"button-tertiary button-icon-only\"\n part=\"select-kb-btn\"\n onClick={this.#optionsHandler}\n >\n <ch-image\n class=\"icon-m\"\n src={GEMINI_TOOLS_SETTINGS}\n ></ch-image>\n </button>\n </div>\n </footer>\n </div>\n </section>\n\n <section\n // import status\n class=\"import-status__section\"\n >\n <h2 class=\"dialog-header dialog-header-with-border dialog-header__import-status subtitle-regular-xs\t text-align-center spacing-body-inline\">\n {this.#componentLocale.main.importStatus.title}\n </h2>\n\n <div class=\"field-group import-status__main\">\n {!this.noImport && this.someStatusVisible ? (\n <ch-tree-view-render\n // import status tree\n model={this.importTreeState}\n toggleCheckboxes={true}\n showLines=\"last\"\n class=\"tree-view tree-view-import\"\n filter={this.importedTreeFilterRegExp}\n filterType=\"metadata\"\n filterOptions={{\n autoExpand: true,\n hideMatchesAndShowNonMatches: false\n }}\n ></ch-tree-view-render>\n ) : (\n <gx-ide-empty-state\n isAnimated={false}\n stateIconSrc={NOTICE_ICON}\n stateTitle={this.importStatusMessage}\n key=\"no-objects-empty-state\"\n ></gx-ide-empty-state>\n )}\n\n <footer class=\"import-status__footer spacing-body-inline\">\n <button\n // clear status button\n class=\"button-secondary import-clear-status-btn\"\n onClick={this.#clearStatusHandler}\n disabled={this.noImport || this.importingIsInProcess}\n part=\"clear-status-btn\"\n >\n {this.#componentLocale.main.importStatus.clearButton}\n </button>\n </footer>\n </div>\n </section>\n\n <footer\n // footer\n class=\"footer\"\n >\n <gx-ide-status-buttons\n errors={this.statusInfo.error.number}\n warnings={this.statusInfo.warning.number}\n successes={this.statusInfo.success.number}\n hideMessage\n compact\n minimal={this.statusMinimal}\n onSelectionChanged={this.#statusButtonsSelectionChangedHandler}\n ></gx-ide-status-buttons>\n </footer>\n </section>\n </Host>\n );\n }\n}\nexport type CancelCallback = () => Promise<boolean>;\n\n/**\n * Payload passed to `importCallback` describing the user's selection.\n *\n * - `mode: \"all\"` imports every available item across every group.\n * - `mode: \"partial\"` imports only what is declared in `groups`. Groups not\n * present in the list are excluded from the import.\n *\n * Per group the most compact representation is used: `\"all\"` for an entire\n * group, `\"include\"` / `\"exclude\"` for explicit lists (whichever side has\n * fewer ids).\n */\nexport type ImportSelection = {\n mode: \"all\" | \"partial\";\n groups?: GroupSelection[];\n};\n\nexport type GroupSelection = {\n groupId: string;\n mode: \"all\" | \"include\" | \"exclude\";\n ids?: string[];\n};\n\nexport type ImportCallback = (selection: ImportSelection) => Promise<boolean>;\n\nexport type LoadCallback = (file: File) => Promise<ImportCategoryData[]>;\n\nexport type ObjectContextMenuCallback = (\n tree: ObjectsSourceType,\n contextMenuInfo: ContextMenuInfo\n) => Promise<void>;\n\nexport type ObjectsSourceType = \"in-file\" | \"imported\";\n\nexport type OptionsCallback = () => Promise<void>;\n\nexport interface SelectedObject {\n itemId: string;\n subItemsIds: string[];\n}\n\nexport type StatusItemsState = {\n error: string[];\n warning: string[];\n success: string[];\n};\n\ntype StatusInfo = {\n error: {\n display: boolean;\n number: number;\n };\n warning: {\n display: boolean;\n number: number;\n };\n success: {\n display: boolean;\n number: number;\n };\n};\n\nexport type CategoryItemMap = Map<string, CategoryItemMapValue>;\nexport type CategoryItemMapValue = { name: string; icon: string };\nexport type ObjectCategoryItemMap = Map<string, string>;\nexport type Status = \"success\" | \"error\" | \"warning\";\n"],"mappings":";;;;;;;;;;;;;;AAmBA,MAAMA,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AA7B,MAAIe,GAAA;MACbyI,UAAUxJ,KAAKuB,YAAYvB,KAAK+B;MAChC4G,MAAK;OAEJ9G,EAAA7B,MAAIF,GAAA,KAAkBiH,KAAKC,aAAaoE,iBAMjDjD,EAAA;;MAEEE,OAAM;OAENF,EAAA;MACEkD,QAAQrL,KAAKiB,WAAWC,MAAMC;MAC9BmK,UAAUtL,KAAKiB,WAAWG,QAAQD;MAClCoK,WAAWvL,KAAKiB,WAAWI,QAAQF;MACnCqK,aAAW;MACXC,SAAO;MACPC,SAAS1L,KAAK2L;MACdC,oBAAoB/J,EAAA7B,MAAI2F,GAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TreeViewItemModel, TreeViewModel } from "@genexus/chameleon-controls-library";
|
|
2
|
-
import {
|
|
3
|
-
import { ImportCategoryData, ImportItemResultData } from "../../common/types";
|
|
2
|
+
import { CategoryItemMap, ObjectCategoryItemMap } from "./kb-manager-import";
|
|
3
|
+
import { ImportCategoryData, ImportItemResultData, ImportItemData } from "../../common/types";
|
|
4
4
|
export declare const KB_OBJECT = "object";
|
|
5
5
|
export declare const KB_CATEGORY = "category";
|
|
6
6
|
export declare const STATUS_REGEXP_KEY = "status";
|
|
@@ -89,10 +89,6 @@ export type GroupSelection = {
|
|
|
89
89
|
ids?: string[];
|
|
90
90
|
};
|
|
91
91
|
export type ImportCallback = (selection: ImportSelection) => Promise<boolean>;
|
|
92
|
-
export type ImportItemData = {
|
|
93
|
-
id: string;
|
|
94
|
-
name: string;
|
|
95
|
-
};
|
|
96
92
|
export type LoadCallback = (file: File) => Promise<ImportCategoryData[]>;
|
|
97
93
|
export type ObjectContextMenuCallback = (tree: ObjectsSourceType, contextMenuInfo: ContextMenuInfo) => Promise<void>;
|
|
98
94
|
export type ObjectsSourceType = "in-file" | "imported";
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { McpServerStatus, McpStartResult, McpStopResult } from "./types";
|
|
2
|
+
export declare class GxIdeMcpServer {
|
|
3
|
+
#private;
|
|
4
|
+
el: HTMLGxIdeMcpServerElement;
|
|
5
|
+
actionInProgress: boolean;
|
|
6
|
+
errorMessage: string | undefined;
|
|
7
|
+
copying: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* When `true` the component shows a loader instead of content.
|
|
10
|
+
* The host sets this to `false` once the initial status is known.
|
|
11
|
+
*/
|
|
12
|
+
initialLoading: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Current MCP server status. The host is responsible for keeping
|
|
15
|
+
* this prop up to date (e.g. via polling or event-driven updates).
|
|
16
|
+
* The component only mutates it internally during start/stop
|
|
17
|
+
* transitions (`starting`, `stopping`, result states).
|
|
18
|
+
*/
|
|
19
|
+
status: McpServerStatus;
|
|
20
|
+
/**
|
|
21
|
+
* Port the MCP server is listening on (shown when running).
|
|
22
|
+
*/
|
|
23
|
+
serverPort: number | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Full endpoint URL (shown when running).
|
|
26
|
+
*/
|
|
27
|
+
serverEndpoint: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Callback to start the MCP server. Returns result with connection info.
|
|
30
|
+
*/
|
|
31
|
+
readonly startCallback: StartCallback;
|
|
32
|
+
/**
|
|
33
|
+
* Callback to stop the MCP server.
|
|
34
|
+
*/
|
|
35
|
+
readonly stopCallback: StopCallback;
|
|
36
|
+
/**
|
|
37
|
+
* Callback to copy text to the clipboard. Delegated to the IDE clipboard
|
|
38
|
+
* service so the host environment controls the copy behavior.
|
|
39
|
+
*/
|
|
40
|
+
readonly copyCallback: CopyCallback;
|
|
41
|
+
/**
|
|
42
|
+
* Callback to close/dismiss the dialog.
|
|
43
|
+
*/
|
|
44
|
+
readonly closeCallback: CloseCallback;
|
|
45
|
+
componentWillLoad(): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Suspends or reactivates the shortcuts.
|
|
48
|
+
*/
|
|
49
|
+
suspendShortcuts(suspendShortcuts: boolean): Promise<void>;
|
|
50
|
+
render(): any;
|
|
51
|
+
}
|
|
52
|
+
export type StartCallback = () => Promise<McpStartResult>;
|
|
53
|
+
export type StopCallback = () => Promise<McpStopResult>;
|
|
54
|
+
export type CopyCallback = (text: string) => void;
|
|
55
|
+
export type CloseCallback = () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type McpServerStatus = "running" | "stopped" | "starting" | "stopping" | "error";
|
|
2
|
+
export type McpStartResult = {
|
|
3
|
+
success: boolean;
|
|
4
|
+
port?: number;
|
|
5
|
+
endpoint?: string;
|
|
6
|
+
errorMessage?: string;
|
|
7
|
+
};
|
|
8
|
+
export type McpStopResult = {
|
|
9
|
+
success: boolean;
|
|
10
|
+
errorMessage?: string;
|
|
11
|
+
};
|
|
@@ -43,9 +43,11 @@ import { CheckedItemsInfo } from "./components/_helpers/list-selector/list-selec
|
|
|
43
43
|
import { ItemData } from "./components/_helpers/list-selector/list-selector-item/list-selector-item";
|
|
44
44
|
import { IdeLoaderCancelCallback } from "./components/_helpers/ide-loader/ide-loader";
|
|
45
45
|
import { ExecuteActionCallback, ServerContextMenuCallback, ServerSelectedCallback } from "./components/modules/manage-module-references/manage-module-references";
|
|
46
|
+
import { McpServerStatus } from "./components/mcp-server/types";
|
|
47
|
+
import { CloseCallback, CopyCallback, StartCallback, StopCallback } from "./components/mcp-server/mcp-server";
|
|
46
48
|
import { ComboBoxModel } from "@genexus/chameleon-controls-library";
|
|
47
49
|
import { ContextMenuCallback, ContextMenuInfo as ContextMenuInfo1, FormSubmitResult as FormSubmitResult1 } from "./components";
|
|
48
|
-
import { CancelCallback as CancelCallback10, CloseCallback, ConfirmCallback as ConfirmCallback6, HeaderData, ItemSelectedCallback, NavigationData } from "./components/navigation-report/navigation-report";
|
|
50
|
+
import { CancelCallback as CancelCallback10, CloseCallback as CloseCallback1, ConfirmCallback as ConfirmCallback6, HeaderData, ItemSelectedCallback, NavigationData } from "./components/navigation-report/navigation-report";
|
|
49
51
|
import { CancelCallback as CancelCallback11, CreateCallback, GetDataSourcesCallback, GetEnvironmentNameCallback, GetFrontEndsCallback, GetLanguagesCallback } from "./components/new-environment/new-environment";
|
|
50
52
|
import { CancelCallback as CancelCallback12, CreateCallback as CreateCallback1, GetDataSourcesCallback as GetDataSourcesCallback1, GetFrontEndsCallback as GetFrontEndsCallback1, GetPrototypingEnvironmentsCallback, SelectLocationCallback as SelectLocationCallback1 } from "./components/new-kb/new-kb";
|
|
51
53
|
import { CancelCallback as CancelCallback13, CreateCallback as CreateCallback2, NewObjectData, SelectModuleCallback as SelectModuleCallback3, SuggestCallback, TypeCategoryData, ValidateNameCallback } from "./components/new-object/new-object";
|
|
@@ -76,7 +78,7 @@ import { cancelCallback, confirmCallback } from "./components/team-dev/select-re
|
|
|
76
78
|
import { ContextMenuCallback as ContextMenuCallback2, PendingItemsCheckedCallback as PendingItemsCheckedCallback1, UpdateFromData } from "./components/team-dev/update/update";
|
|
77
79
|
import { AddCallback, CancelCallback as CancelCallback17, ConfirmCallback as ConfirmCallback7, ObjectData as ObjectData2 } from "./components/team-dev/update-partial-selection/update-partial-selection";
|
|
78
80
|
import { cancelCallbackFn, confirmCallbackFn } from "./components/team-dev/update-to-revision/update-to-revision";
|
|
79
|
-
import { CloseCallback as
|
|
81
|
+
import { CloseCallback as CloseCallback2, SlideInfo, TransitionType } from "./components/welcome-page/welcome-page";
|
|
80
82
|
import { WFConfigData } from "./components/wf-settings/wf-settings";
|
|
81
83
|
import { ContextMenuCallback as ContextMenuCallback3, DeleteSelectionCallback, LoadCallback as LoadCallback5, ObjectActionCallback, OpenSelectionCallback as OpenSelectionCallback1, SelectionChangeCallback } from "./components/ww-attributes/ww-attributes";
|
|
82
84
|
import { ContextMenuCallback as ContextMenuCallback4, DeleteSelectionCallback as DeleteSelectionCallback1, GridColumnsVisibility, LoadCallback as LoadCallback6, NewFileCallback, OpenSelectionCallback as OpenSelectionCallback2, SelectionChangeCallback as SelectionChangeCallback1, SelectModuleCallback as SelectModuleCallback5 } from "./components/ww-files/ww-files";
|
|
@@ -119,9 +121,11 @@ export { CheckedItemsInfo } from "./components/_helpers/list-selector/list-selec
|
|
|
119
121
|
export { ItemData } from "./components/_helpers/list-selector/list-selector-item/list-selector-item";
|
|
120
122
|
export { IdeLoaderCancelCallback } from "./components/_helpers/ide-loader/ide-loader";
|
|
121
123
|
export { ExecuteActionCallback, ServerContextMenuCallback, ServerSelectedCallback } from "./components/modules/manage-module-references/manage-module-references";
|
|
124
|
+
export { McpServerStatus } from "./components/mcp-server/types";
|
|
125
|
+
export { CloseCallback, CopyCallback, StartCallback, StopCallback } from "./components/mcp-server/mcp-server";
|
|
122
126
|
export { ComboBoxModel } from "@genexus/chameleon-controls-library";
|
|
123
127
|
export { ContextMenuCallback, ContextMenuInfo as ContextMenuInfo1, FormSubmitResult as FormSubmitResult1 } from "./components";
|
|
124
|
-
export { CancelCallback as CancelCallback10, CloseCallback, ConfirmCallback as ConfirmCallback6, HeaderData, ItemSelectedCallback, NavigationData } from "./components/navigation-report/navigation-report";
|
|
128
|
+
export { CancelCallback as CancelCallback10, CloseCallback as CloseCallback1, ConfirmCallback as ConfirmCallback6, HeaderData, ItemSelectedCallback, NavigationData } from "./components/navigation-report/navigation-report";
|
|
125
129
|
export { CancelCallback as CancelCallback11, CreateCallback, GetDataSourcesCallback, GetEnvironmentNameCallback, GetFrontEndsCallback, GetLanguagesCallback } from "./components/new-environment/new-environment";
|
|
126
130
|
export { CancelCallback as CancelCallback12, CreateCallback as CreateCallback1, GetDataSourcesCallback as GetDataSourcesCallback1, GetFrontEndsCallback as GetFrontEndsCallback1, GetPrototypingEnvironmentsCallback, SelectLocationCallback as SelectLocationCallback1 } from "./components/new-kb/new-kb";
|
|
127
131
|
export { CancelCallback as CancelCallback13, CreateCallback as CreateCallback2, NewObjectData, SelectModuleCallback as SelectModuleCallback3, SuggestCallback, TypeCategoryData, ValidateNameCallback } from "./components/new-object/new-object";
|
|
@@ -152,7 +156,7 @@ export { cancelCallback, confirmCallback } from "./components/team-dev/select-re
|
|
|
152
156
|
export { ContextMenuCallback as ContextMenuCallback2, PendingItemsCheckedCallback as PendingItemsCheckedCallback1, UpdateFromData } from "./components/team-dev/update/update";
|
|
153
157
|
export { AddCallback, CancelCallback as CancelCallback17, ConfirmCallback as ConfirmCallback7, ObjectData as ObjectData2 } from "./components/team-dev/update-partial-selection/update-partial-selection";
|
|
154
158
|
export { cancelCallbackFn, confirmCallbackFn } from "./components/team-dev/update-to-revision/update-to-revision";
|
|
155
|
-
export { CloseCallback as
|
|
159
|
+
export { CloseCallback as CloseCallback2, SlideInfo, TransitionType } from "./components/welcome-page/welcome-page";
|
|
156
160
|
export { WFConfigData } from "./components/wf-settings/wf-settings";
|
|
157
161
|
export { ContextMenuCallback as ContextMenuCallback3, DeleteSelectionCallback, LoadCallback as LoadCallback5, ObjectActionCallback, OpenSelectionCallback as OpenSelectionCallback1, SelectionChangeCallback } from "./components/ww-attributes/ww-attributes";
|
|
158
162
|
export { ContextMenuCallback as ContextMenuCallback4, DeleteSelectionCallback as DeleteSelectionCallback1, GridColumnsVisibility, LoadCallback as LoadCallback6, NewFileCallback, OpenSelectionCallback as OpenSelectionCallback2, SelectionChangeCallback as SelectionChangeCallback1, SelectModuleCallback as SelectModuleCallback5 } from "./components/ww-files/ww-files";
|
|
@@ -1497,6 +1501,44 @@ export namespace Components {
|
|
|
1497
1501
|
*/
|
|
1498
1502
|
"showServerCommands": boolean;
|
|
1499
1503
|
}
|
|
1504
|
+
interface GxIdeMcpServer {
|
|
1505
|
+
/**
|
|
1506
|
+
* Callback to close/dismiss the dialog.
|
|
1507
|
+
*/
|
|
1508
|
+
"closeCallback": CloseCallback;
|
|
1509
|
+
/**
|
|
1510
|
+
* Callback to copy text to the clipboard. Delegated to the IDE clipboard service so the host environment controls the copy behavior.
|
|
1511
|
+
*/
|
|
1512
|
+
"copyCallback": CopyCallback;
|
|
1513
|
+
/**
|
|
1514
|
+
* When `true` the component shows a loader instead of content. The host sets this to `false` once the initial status is known.
|
|
1515
|
+
*/
|
|
1516
|
+
"initialLoading": boolean;
|
|
1517
|
+
/**
|
|
1518
|
+
* Full endpoint URL (shown when running).
|
|
1519
|
+
*/
|
|
1520
|
+
"serverEndpoint": string | undefined;
|
|
1521
|
+
/**
|
|
1522
|
+
* Port the MCP server is listening on (shown when running).
|
|
1523
|
+
*/
|
|
1524
|
+
"serverPort": number | undefined;
|
|
1525
|
+
/**
|
|
1526
|
+
* Callback to start the MCP server. Returns result with connection info.
|
|
1527
|
+
*/
|
|
1528
|
+
"startCallback": StartCallback;
|
|
1529
|
+
/**
|
|
1530
|
+
* Current MCP server status. The host is responsible for keeping this prop up to date (e.g. via polling or event-driven updates). The component only mutates it internally during start/stop transitions (`starting`, `stopping`, result states).
|
|
1531
|
+
*/
|
|
1532
|
+
"status": McpServerStatus;
|
|
1533
|
+
/**
|
|
1534
|
+
* Callback to stop the MCP server.
|
|
1535
|
+
*/
|
|
1536
|
+
"stopCallback": StopCallback;
|
|
1537
|
+
/**
|
|
1538
|
+
* Suspends or reactivates the shortcuts.
|
|
1539
|
+
*/
|
|
1540
|
+
"suspendShortcuts": (suspendShortcuts: boolean) => Promise<void>;
|
|
1541
|
+
}
|
|
1500
1542
|
interface GxIdeMultiSelect {
|
|
1501
1543
|
/**
|
|
1502
1544
|
* Disabled state
|
|
@@ -1547,7 +1589,7 @@ export namespace Components {
|
|
|
1547
1589
|
/**
|
|
1548
1590
|
* Callback to be invoked when the user closes the dialog
|
|
1549
1591
|
*/
|
|
1550
|
-
"closeCallback":
|
|
1592
|
+
"closeCallback": CloseCallback1;
|
|
1551
1593
|
/**
|
|
1552
1594
|
* Callback invoked when user confirms data base reorganization
|
|
1553
1595
|
*/
|
|
@@ -2686,7 +2728,7 @@ export namespace Components {
|
|
|
2686
2728
|
/**
|
|
2687
2729
|
* Callback invoked when the user closes the slider by pressing the close button.
|
|
2688
2730
|
*/
|
|
2689
|
-
"closeCallback":
|
|
2731
|
+
"closeCallback": CloseCallback2;
|
|
2690
2732
|
/**
|
|
2691
2733
|
* An array of slides, with the information that each slide requires. This slides appear after the first slide (Copyrights) that is defined inside the component.
|
|
2692
2734
|
*/
|
|
@@ -3527,6 +3569,12 @@ declare global {
|
|
|
3527
3569
|
prototype: HTMLGxIdeManageModuleReferencesElement;
|
|
3528
3570
|
new (): HTMLGxIdeManageModuleReferencesElement;
|
|
3529
3571
|
};
|
|
3572
|
+
interface HTMLGxIdeMcpServerElement extends Components.GxIdeMcpServer, HTMLStencilElement {
|
|
3573
|
+
}
|
|
3574
|
+
var HTMLGxIdeMcpServerElement: {
|
|
3575
|
+
prototype: HTMLGxIdeMcpServerElement;
|
|
3576
|
+
new (): HTMLGxIdeMcpServerElement;
|
|
3577
|
+
};
|
|
3530
3578
|
interface HTMLGxIdeMultiSelectElementEventMap {
|
|
3531
3579
|
"gxSelectionChange": string[];
|
|
3532
3580
|
}
|
|
@@ -3948,6 +3996,7 @@ declare global {
|
|
|
3948
3996
|
"gx-ide-list-selector-item": HTMLGxIdeListSelectorItemElement;
|
|
3949
3997
|
"gx-ide-loader": HTMLGxIdeLoaderElement;
|
|
3950
3998
|
"gx-ide-manage-module-references": HTMLGxIdeManageModuleReferencesElement;
|
|
3999
|
+
"gx-ide-mcp-server": HTMLGxIdeMcpServerElement;
|
|
3951
4000
|
"gx-ide-multi-select": HTMLGxIdeMultiSelectElement;
|
|
3952
4001
|
"gx-ide-name-picker": HTMLGxIdeNamePickerElement;
|
|
3953
4002
|
"gx-ide-navigation-report": HTMLGxIdeNavigationReportElement;
|
|
@@ -5414,6 +5463,40 @@ declare namespace LocalJSX {
|
|
|
5414
5463
|
*/
|
|
5415
5464
|
"showServerCommands"?: boolean;
|
|
5416
5465
|
}
|
|
5466
|
+
interface GxIdeMcpServer {
|
|
5467
|
+
/**
|
|
5468
|
+
* Callback to close/dismiss the dialog.
|
|
5469
|
+
*/
|
|
5470
|
+
"closeCallback": CloseCallback;
|
|
5471
|
+
/**
|
|
5472
|
+
* Callback to copy text to the clipboard. Delegated to the IDE clipboard service so the host environment controls the copy behavior.
|
|
5473
|
+
*/
|
|
5474
|
+
"copyCallback": CopyCallback;
|
|
5475
|
+
/**
|
|
5476
|
+
* When `true` the component shows a loader instead of content. The host sets this to `false` once the initial status is known.
|
|
5477
|
+
*/
|
|
5478
|
+
"initialLoading"?: boolean;
|
|
5479
|
+
/**
|
|
5480
|
+
* Full endpoint URL (shown when running).
|
|
5481
|
+
*/
|
|
5482
|
+
"serverEndpoint"?: string | undefined;
|
|
5483
|
+
/**
|
|
5484
|
+
* Port the MCP server is listening on (shown when running).
|
|
5485
|
+
*/
|
|
5486
|
+
"serverPort"?: number | undefined;
|
|
5487
|
+
/**
|
|
5488
|
+
* Callback to start the MCP server. Returns result with connection info.
|
|
5489
|
+
*/
|
|
5490
|
+
"startCallback": StartCallback;
|
|
5491
|
+
/**
|
|
5492
|
+
* Current MCP server status. The host is responsible for keeping this prop up to date (e.g. via polling or event-driven updates). The component only mutates it internally during start/stop transitions (`starting`, `stopping`, result states).
|
|
5493
|
+
*/
|
|
5494
|
+
"status": McpServerStatus;
|
|
5495
|
+
/**
|
|
5496
|
+
* Callback to stop the MCP server.
|
|
5497
|
+
*/
|
|
5498
|
+
"stopCallback": StopCallback;
|
|
5499
|
+
}
|
|
5417
5500
|
interface GxIdeMultiSelect {
|
|
5418
5501
|
/**
|
|
5419
5502
|
* Disabled state
|
|
@@ -5460,7 +5543,7 @@ declare namespace LocalJSX {
|
|
|
5460
5543
|
/**
|
|
5461
5544
|
* Callback to be invoked when the user closes the dialog
|
|
5462
5545
|
*/
|
|
5463
|
-
"closeCallback"?:
|
|
5546
|
+
"closeCallback"?: CloseCallback1;
|
|
5464
5547
|
/**
|
|
5465
5548
|
* Callback invoked when user confirms data base reorganization
|
|
5466
5549
|
*/
|
|
@@ -6545,7 +6628,7 @@ declare namespace LocalJSX {
|
|
|
6545
6628
|
/**
|
|
6546
6629
|
* Callback invoked when the user closes the slider by pressing the close button.
|
|
6547
6630
|
*/
|
|
6548
|
-
"closeCallback":
|
|
6631
|
+
"closeCallback": CloseCallback2;
|
|
6549
6632
|
/**
|
|
6550
6633
|
* An array of slides, with the information that each slide requires. This slides appear after the first slide (Copyrights) that is defined inside the component.
|
|
6551
6634
|
*/
|
|
@@ -6772,6 +6855,7 @@ declare namespace LocalJSX {
|
|
|
6772
6855
|
"gx-ide-list-selector-item": GxIdeListSelectorItem;
|
|
6773
6856
|
"gx-ide-loader": GxIdeLoader;
|
|
6774
6857
|
"gx-ide-manage-module-references": GxIdeManageModuleReferences;
|
|
6858
|
+
"gx-ide-mcp-server": GxIdeMcpServer;
|
|
6775
6859
|
"gx-ide-multi-select": GxIdeMultiSelect;
|
|
6776
6860
|
"gx-ide-name-picker": GxIdeNamePicker;
|
|
6777
6861
|
"gx-ide-navigation-report": GxIdeNavigationReport;
|
|
@@ -6863,6 +6947,7 @@ declare module "@stencil/core" {
|
|
|
6863
6947
|
"gx-ide-list-selector-item": LocalJSX.GxIdeListSelectorItem & JSXBase.HTMLAttributes<HTMLGxIdeListSelectorItemElement>;
|
|
6864
6948
|
"gx-ide-loader": LocalJSX.GxIdeLoader & JSXBase.HTMLAttributes<HTMLGxIdeLoaderElement>;
|
|
6865
6949
|
"gx-ide-manage-module-references": LocalJSX.GxIdeManageModuleReferences & JSXBase.HTMLAttributes<HTMLGxIdeManageModuleReferencesElement>;
|
|
6950
|
+
"gx-ide-mcp-server": LocalJSX.GxIdeMcpServer & JSXBase.HTMLAttributes<HTMLGxIdeMcpServerElement>;
|
|
6866
6951
|
"gx-ide-multi-select": LocalJSX.GxIdeMultiSelect & JSXBase.HTMLAttributes<HTMLGxIdeMultiSelectElement>;
|
|
6867
6952
|
"gx-ide-name-picker": LocalJSX.GxIdeNamePicker & JSXBase.HTMLAttributes<HTMLGxIdeNamePickerElement>;
|
|
6868
6953
|
"gx-ide-navigation-report": LocalJSX.GxIdeNavigationReport & JSXBase.HTMLAttributes<HTMLGxIdeNavigationReportElement>;
|