@genexus/genexus-ide-ui 1.1.32 → 1.1.34
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-chat-container_2.cjs.entry.js +9 -2
- package/dist/cjs/gx-ide-chat-container_2.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-new-environment.cjs.entry.js +11 -2
- package/dist/cjs/gx-ide-new-environment.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js +30 -10
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-sc-chat-container.cjs.entry.js +2 -1
- package/dist/cjs/gx-ide-sc-chat-container.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-sign-in-team.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-sign-in-team.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/chat/chat-container/chat-container.js +10 -2
- package/dist/collection/components/chat/chat-container/chat-container.js.map +1 -1
- package/dist/collection/components/chat/chat-container/gx-ide-assets/chat-container/chat-lit.css +376 -0
- package/dist/collection/components/chat/chat-welcome/chat-welcome.js +0 -1
- package/dist/collection/components/chat/chat-welcome/chat-welcome.js.map +1 -1
- package/dist/collection/components/new-environment/new-environment.js +33 -3
- package/dist/collection/components/new-environment/new-environment.js.map +1 -1
- package/dist/collection/components/new-kb/new-kb.js +55 -14
- package/dist/collection/components/new-kb/new-kb.js.map +1 -1
- package/dist/collection/components/new-kb/tests/new-kb.e2e.js +10 -1
- package/dist/collection/components/new-kb/tests/new-kb.e2e.js.map +1 -1
- package/dist/collection/components/sign-in-team/sign-in-team.css +1 -2
- package/dist/collection/showcase/chat-container/chat.showcase.js +2 -1
- package/dist/collection/showcase/chat-container/chat.showcase.js.map +1 -1
- package/dist/components/chat-container.js +10 -2
- package/dist/components/chat-container.js.map +1 -1
- package/dist/components/chat-welcome.js +0 -1
- package/dist/components/chat-welcome.js.map +1 -1
- package/dist/components/gx-ide-new-environment.js +13 -3
- package/dist/components/gx-ide-new-environment.js.map +1 -1
- package/dist/components/gx-ide-new-kb.js +34 -13
- package/dist/components/gx-ide-new-kb.js.map +1 -1
- package/dist/components/gx-ide-sc-chat-container.js +2 -1
- package/dist/components/gx-ide-sc-chat-container.js.map +1 -1
- package/dist/components/gx-ide-sign-in-team.js +1 -1
- package/dist/components/gx-ide-sign-in-team.js.map +1 -1
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-chat-container_2.entry.js +10 -3
- package/dist/esm/gx-ide-chat-container_2.entry.js.map +1 -1
- package/dist/esm/gx-ide-new-environment.entry.js +11 -2
- package/dist/esm/gx-ide-new-environment.entry.js.map +1 -1
- package/dist/esm/gx-ide-new-kb.entry.js +31 -11
- package/dist/esm/gx-ide-new-kb.entry.js.map +1 -1
- package/dist/esm/gx-ide-sc-chat-container.entry.js +2 -1
- package/dist/esm/gx-ide-sc-chat-container.entry.js.map +1 -1
- package/dist/esm/gx-ide-sign-in-team.entry.js +1 -1
- package/dist/esm/gx-ide-sign-in-team.entry.js.map +1 -1
- 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/chat-container/chat-lit.css +376 -0
- package/dist/genexus-ide-ui/{p-61343e93.entry.js → p-203f0417.entry.js} +8 -8
- package/dist/genexus-ide-ui/p-203f0417.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-ec9e0915.entry.js → p-4da77239.entry.js} +228 -209
- package/dist/genexus-ide-ui/p-4da77239.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-137130ad.entry.js → p-8d6f2b4f.entry.js} +4 -2
- package/dist/genexus-ide-ui/{p-137130ad.entry.js.map → p-8d6f2b4f.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-1477d49a.entry.js → p-9270c80f.entry.js} +102 -90
- package/dist/genexus-ide-ui/p-9270c80f.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-8d570fd2.entry.js → p-bf176329.entry.js} +60 -50
- package/dist/genexus-ide-ui/p-bf176329.entry.js.map +1 -0
- package/dist/types/components/new-environment/new-environment.d.ts +6 -1
- package/dist/types/components/new-kb/new-kb.d.ts +7 -2
- package/dist/types/components.d.ts +28 -12
- package/package.json +3 -3
- package/dist/genexus-ide-ui/p-1477d49a.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-61343e93.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-8d570fd2.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-ec9e0915.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gx-ide-new-kb.entry.cjs.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,QAAQ,GAAG,65CAA65C;;;;;;;;;;;;;;;;;;;ACiC96C,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,gBAAgB;IAChB,oBAAoB;IACpB,kBAAkB;IAClB,cAAc;IACd,kBAAkB;IAClB,eAAe;IACf,qBAAqB;CACtB,CAAC;AAEF,MAAM,4BAA4B,GAAW,wBAAwB,CAAC;AACtE,MAAM,oBAAoB,GAAW,MAAM,CAAC;AAC5C,MAAM,4BAA4B,GAAW,OAAO,CAAC;AAErD,MAAM,WAAW,GAAGA,0BAAW,CAAC;IAC9B,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAW,OAAO,CAAC;AAC3C,MAAM,qBAAqB,GAAW,UAAU,CAAC;MAQpC,UAAU;;;QACrB,iDAAuC,KAAK,EAAC;;;;;QAK7C,8CAAsB;;;;;QAKtB,0CAAuB,IAAI,GAAG,EAAoB,EAA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C,qBAAqB,IAEzB,uBAAA,IAAI,kCAAgB,MAApB,IAAI,CAAkB,CACnB,CACP,CACa,KAEhBA,iBAAK,KAAK,EAAE,oBAAoB,IAC9BA,iBAAK,KAAK,EAAE,4BAA4B,IACrC,uBAAA,IAAI,+BAAa,MAAjB,IAAI,CAAe,CAChB,CACF,CACP,EAEDA,oBACE,KAAK,EAAE;gBACL,gBAAgB,EAAE,IAAI,CAAC,UAAU;gBACjC,4BAA4B,EAAE,CAAC,IAAI,CAAC,UAAU;gBAC9C,wBAAwB,EAAE,IAAI;gBAC9B,qBAAqB,EAAE,IAAI;aAC5B,IAEDA,iBAAK,KAAK,EAAC,gBAAgB,IACzBA;;YAEE,KAAK,EAAC,kBAAkB,EACxB,EAAE,EAAC,eAAe,EAClB,OAAO,EAAE,uBAAA,IAAI,mCAAiB,EAC9B,IAAI,EAAC,eAAe;WAEnB,uBAAA,IAAI,mCAAiB,CAAC,MAAM,CAAC,SAAS,CAChC,EACTA;;YAEE,KAAK,EAAC,gBAAgB,EACtB,EAAE,EAAC,eAAe,EAClB,OAAO,EAAE,uBAAA,IAAI,mCAAiB,EAC9B,IAAI,EAAC,eAAe;WAEnB,uBAAA,IAAI,mCAAiB,CAAC,MAAM,CAAC,SAAS,CAChC,CACL,CACC,CACD,CACL,EACP;KACH;;;;;;;;;;;;;;;;;;","names":["getIconPath","getAssetPath","h","renderChCheckboxItems","validateControls","config","removeIndex","mapOptionsToComboBoxItemModel","getSelectedItem","Locale","Host"],"sources":["src/components/new-kb/new-kb.scss?tag=gx-ide-new-kb&encapsulation=shadow","src/components/new-kb/new-kb.tsx"],"sourcesContent":[":host {\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.section {\n display: contents;\n}\n\n.header {\n &-one-col {\n grid-template-columns: 1fr;\n }\n &-two-cols {\n grid-template-columns: 1fr 1fr;\n }\n}\n// location appears if advanced is true\n.location-wrapper {\n display: flex;\n gap: var(--mer-spacing--2xs);\n}\n.location {\n flex-grow: 1;\n grid-area: location;\n}\n\n.basic {\n display: grid;\n grid-template:\n \"basic-top basic-top\" max-content\n \"back-end front-end\" 1fr;\n grid-template-columns: 1fr 1fr;\n}\n.basic__header {\n grid-area: basic-top;\n grid-template-columns: 1fr 1fr;\n}\n.control-header__back-end,\n.control-header__front-end {\n padding-block-start: var(--mer-spacing--md);\n}\n.main__back-end {\n border-inline-end: var(--section-common-border);\n}\n.main__back-end,\n.main__front-end {\n grid-auto-rows: max-content;\n padding-block: var(--content-block-spacing);\n overflow: auto;\n}\n// back end\n.section__back-end {\n grid-area: back-end;\n grid-auto-rows: max-content;\n}\n// front end\n.section__front-end {\n grid-area: front-end;\n}\n.section__back-end,\n.section__front-end {\n display: grid;\n grid-template-rows: max-content 1fr;\n overflow: auto;\n}\n\n// advanced\n.tab-advanced-title {\n grid-area: tab-advanced-title;\n}\n.layout-tab-advanced-left-col {\n grid-area: layout-tab-advanced-left-col;\n}\n.layout-tab-advanced-right-col {\n grid-area: layout-tab-advanced-right-col;\n}\n\n.basic,\n.advanced {\n padding-block-start: var(--content-block-spacing);\n overflow: auto;\n block-size: 100%;\n}\n\n.tab-advanced__field-group {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-auto-rows: auto;\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.tab::part(page) {\n // WA / TODO: Remove this line when the ch-tab renders supports scrollbar\n // custom styling\n scrollbar-width: thin;\n}\n","import {\n Component,\n Host,\n Prop,\n Element,\n State,\n getAssetPath,\n Method,\n h,\n Watch\n} from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\n\nimport { config } from \"../../common/config\";\nimport { Locale } from \"../../common/locale\";\nimport { getSelectedItem } from \"../../common/common\";\nimport {\n mapOptionsToComboBoxItemModel,\n renderChCheckboxItems\n} from \"../../common/helpers\";\nimport { FormSubmitResult, GxOption } from \"../../common/types\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../common/form-validation\";\nimport {\n TabModel,\n ComboBoxModel,\n ChCheckboxCustomEvent\n} from \"@genexus/chameleon-controls-library\";\nimport { removeIndex } from \"../../common/array\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/tab\",\n \"components/tooltip\",\n \"utils/form--full\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst WINDOWS_AUTHENTICATION_VALUE: string = \"windows-authentication\";\nconst MAIN_SECTION_CLASSES: string = \"main\";\nconst BASIC_SECTION_PARENT_CLASSES: string = \"basic\";\n\nconst SYSTEM_ICON = getIconPath({\n category: \"system\",\n name: \"folder\",\n colorType: \"primary\"\n});\n\nconst BASIC_TAB_SELECTOR: string = \"basic\";\nconst ADVANCED_TAB_SELECTOR: string = \"advanced\";\n\n@Component({\n tag: \"gx-ide-new-kb\",\n styleUrl: \"new-kb.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/new-kb\"]\n})\nexport class GxIdeNewKb {\n #advancedTabHasBeenRendered: boolean = false;\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 * frontEndsState saves the id's of the front ends checkboxes that are checked\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #frontEndsCheckedMap = new Map<string, string[]>();\n #selectedPrototypingEnvironmentId: string;\n #shortcutsSrc = getAssetPath(`./gx-ide-assets/new-kb/shortcuts.json`);\n #kbSectionsModel: TabModel = [];\n\n @Element() el: HTMLGxIdeNewKbElement;\n\n /* References needed to collect data con \"Create\" button submit*/\n #authenticationTypeEl!: HTMLChComboBoxRenderElement;\n #collationEl!: HTMLChComboBoxRenderElement;\n #createDataFilesInKBFolderEl!: HTMLChCheckboxElement;\n #databaseNameEl!: HTMLChEditElement;\n #dataSourceEl!: HTMLChComboBoxRenderElement;\n #kbNameEl!: HTMLChEditElement;\n #locationEl!: HTMLChEditElement;\n #passwordEl!: HTMLChEditElement;\n #prototypingEnvironmentEl!: HTMLChComboBoxRenderElement;\n #prototypingTargetEl!: HTMLChComboBoxRenderElement;\n #savePasswordEl!: HTMLChCheckboxElement;\n #serverNameEl!: HTMLChComboBoxRenderElement;\n #userInterfaceLanguageEl!: HTMLChComboBoxRenderElement;\n #userNameEl!: HTMLChEditElement;\n\n #chShortcutsEl: HTMLChShortcutsElement;\n\n @State() advancedTabIsVisible: boolean = false;\n /**\n * Allows selecting multiple generators for the front end\n * TODO: Check if this property can be deleted, since we can call getFrontEndsCallback.\n */\n @State() frontEnds: GxOption[];\n @State() validatableControls = new Map<string, ControlValidation>();\n @State() createDataInKbDisabled = false;\n @State() userNameVisible = true;\n @State() passwordVisible = true;\n @State() savePasswordVisible = true;\n // representations of GxOption[] as ComboBoxModel, and initialValue for each one.\n @State() authenticationTypesComboBoxModel: ComboBoxModel = [];\n @State() authenticationTypesInitialValue: string;\n @State() collationsComboBoxModel: ComboBoxModel = [];\n @State() collationsInitialValue: string;\n @State() defaultDataSourcesComboBoxModel: ComboBoxModel = [];\n @State() defaultDataSourcesInitialValue: string;\n @State() prototypingTargetsComboBoxModel: ComboBoxModel = [];\n @State() prototypingTargetsInitialValue: string;\n @State() prototypingEnvironmentsComboBoxModel: ComboBoxModel = [];\n @State() prototypingEnvironmentsInitialValue: string;\n @State() serverNamesComboBoxModel: ComboBoxModel = [];\n @State() serverNamesInitialValue: string;\n @State() userInterfaceLanguagesComboBoxModel: ComboBoxModel = [];\n @State() userInterfaceLanguagesInitialValue: string;\n\n /**\n * Defines the type of authentication for the connection to the previously defined database\n */\n @Prop() readonly authenticationTypes: GxOption[] = [];\n @Watch(\"authenticationTypes\")\n watchAuthenticationTypes(newValue: GxOption[]) {\n if (newValue?.length) {\n this.authenticationTypesComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.authenticationTypesInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Callback invoked when the user wants to cancel KB creation (‘Cancel’ button)\n */\n @Prop() readonly cancelCallback: CancelCallback;\n\n /**\n * DB Collations\n */\n @Prop() readonly collations!: GxOption[];\n @Watch(\"collations\")\n watchCollations(newValue: GxOption[]) {\n if (newValue?.length) {\n this.collationsComboBoxModel = mapOptionsToComboBoxItemModel(newValue);\n this.collationsInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Callback that will be invoked when the user confirms KB creation (‘Create’ button)\n */\n @Prop() readonly createCallback!: CreateCallback;\n\n /**\n * Disabled if the first item of the 'Server Name' combo is selected\n */\n @Prop() readonly createDataFilesInKBFolder: boolean = false;\n\n /**\n * Name of the database where we are going to persist the information of our KB\n */\n @Prop() readonly databaseName: string;\n\n /**\n * It allows defining the DBMS that will be used in the solution\n */\n @Prop({ mutable: true }) defaultDataSources: GxOption[] = [];\n @Watch(\"defaultDataSources\")\n watchDefaultDataSources(newValue: GxOption[]) {\n if (newValue?.length) {\n this.defaultDataSourcesComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.defaultDataSourcesInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Callback invoked when the user wants to cancel KB creation (‘Cancel’ button)\n */\n @Prop() readonly getDataSourcesCallback: GetDataSourcesCallback;\n\n /**\n * Callback invoked when the user changes the prototyping environment, allowing for the modification of the list of front ends\n */\n @Prop() readonly getFrontEndsCallback!: GetFrontEndsCallback;\n\n /**\n * Specify whether it is feasible to display information related to local configuration parameters\n */\n @Prop() readonly isAdvanced = false;\n\n /**\n * Default suggested path to a directory where the information related to the KB will be stored/generated\n */\n @Prop({ mutable: true }) kbLocation: string;\n\n /**\n * The knowledge base default suggested name\n */\n @Prop() readonly kbName: string;\n\n /**\n * Password for the database connection. Visible if the Authentication Type is different from Windows Authentication (first item of the combo)\n */\n @Prop() readonly password: string;\n\n /**\n * It allows selecting the default environment that the KB will have (additional environments can be created later)\n */\n @Prop() readonly prototypingEnvironments: GxOption[] = [];\n @Watch(\"prototypingEnvironments\")\n watchPrototypingEnvironments(newValue: GxOption[]) {\n if (newValue?.length) {\n this.prototypingEnvironmentsComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.#selectedPrototypingEnvironmentId = getSelectedItem(newValue);\n this.#updateFrontEnds();\n }\n }\n\n /**\n * Path to a directory where the information related to the KB will be stored/generated\n */\n @Prop() readonly prototypingTargets: GxOption[] = [];\n @Watch(\"prototypingTargets\")\n watchPrototypingTargets(newValue: GxOption[]) {\n if (newValue?.length) {\n this.prototypingTargetsComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.prototypingTargetsInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Visible if something other than Windows Authentication is selected\n */\n @Prop() readonly savePassword: boolean = false;\n\n /**\n * This is a function provided by the developer that returns a string, with the location path\n */\n @Prop() readonly selectLocationCallback!: SelectLocationCallback;\n\n /**\n * Name of the DB server where we want to persist the information of our KB\n */\n @Prop() readonly serverNames: GxOption[] = [];\n @Watch(\"serverNames\")\n watchServerNames(newValue: GxOption[]) {\n if (newValue?.length) {\n this.serverNamesComboBoxModel = mapOptionsToComboBoxItemModel(newValue);\n this.serverNamesInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Specify the language in which the application screens will be developed (default language)\n */\n @Prop() readonly userInterfaceLanguages: GxOption[] = [];\n @Watch(\"userInterfaceLanguages\")\n watchUserInterfaceLanguages(newValue: GxOption[]) {\n if (newValue?.length) {\n this.userInterfaceLanguagesComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.userInterfaceLanguagesInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Username for the database connection. Visible if the Authentication Type is different from Windows Authentication (first item of the combo)\n */\n @Prop() readonly userName: string;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.#kbSectionsModel = [\n {\n id: BASIC_TAB_SELECTOR,\n name: this.#componentLocale.tabBasic.tabLabel\n },\n {\n id: ADVANCED_TAB_SELECTOR,\n name: this.#componentLocale.tabAdvanced.tabLabel\n }\n ];\n }\n\n connectedCallback() {\n this.watchDefaultDataSources(this.defaultDataSources);\n this.watchPrototypingEnvironments(this.prototypingEnvironments);\n this.watchPrototypingTargets(this.prototypingTargets);\n this.watchServerNames(this.serverNames);\n this.watchUserInterfaceLanguages(this.userInterfaceLanguages);\n }\n\n componentDidLoad() {\n this.#initializeValidatableControlsBasicTab();\n }\n\n componentDidRender() {\n if (this.advancedTabIsVisible && !this.#advancedTabHasBeenRendered) {\n // just call this once.\n this.#initialSetupAdvancedTab();\n this.#initializeValidatableControlsAdvancedTab();\n this.#advancedTabHasBeenRendered = true;\n }\n }\n\n /**\n * Suspends or reactivates the shortcuts\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n if (suspendShortcuts) {\n this.#chShortcutsEl.suspend = true;\n } else {\n this.#chShortcutsEl.suspend = false;\n }\n }\n\n // Uncomment when \"TODO: define button handler and logic\" is done.\n // #geminiToolsSearchPrimary = getIconPath({\n // category: \"gemini-tools\",\n // name: \"search\",\n // colorType: \"primary\"\n // });\n // #geminiToolsResetPrimary = getIconPath({\n // category: \"gemini-tools\",\n // name: \"reset\",\n // colorType: \"primary\"\n // });\n\n #handlerAuthenticationTypeInput = (e: CustomEvent<string> | InputEvent) => {\n const authenticationTypeValue = e?.detail;\n this.#evaluateUserInputsDisplay(authenticationTypeValue as string);\n };\n\n #handlerServerNameInput = (e: CustomEvent<string> | InputEvent) => {\n this.#evaluateCreateDataCheckboxEnabled(e.detail as string);\n };\n\n #prototypingEnvironmentValueChangedHandler = (\n event: CustomEvent<string> | InputEvent\n ): void => {\n this.#selectedPrototypingEnvironmentId = event.detail as string;\n this.#getDataSources();\n this.#updateFrontEnds();\n };\n\n #prototypingTargetValueChangedHandler = (): void => {\n this.#getDataSources();\n };\n\n #renderAdvanced = (): Element[] => {\n return [\n <h2\n // #knowledge base storage\n class=\"control-header subtitle-regular-xs\t text-align-center\"\n >\n {this.#componentLocale.tabAdvanced.tabTitle}\n </h2>,\n <div class=\"field-group tab-advanced__field-group\">\n <div\n // #server name\n class=\"field field-block server-name-field\"\n >\n <label class=\"label\" htmlFor=\"serverName\">\n {this.#componentLocale.tabAdvanced.serverName.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.serverNames.length === 0}\n placeholder={\n this.serverNames.length === 0\n ? this.#componentLocale.tabAdvanced.serverName\n .disabledPlaceholder\n : \"\"\n }\n value={this.serverNamesInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#serverNameEl = el as HTMLChComboBoxRenderElement)\n }\n model={this.serverNamesComboBoxModel}\n onInput={\n this.serverNames.length > 0 && this.#handlerServerNameInput\n }\n id=\"serverName\"\n part=\"server-name\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#serverNameEl)}\n </div>\n\n {/* <button\n TODO: define button handler and logic\n class=\"button-tertiary button-icon-only server-name-button\"\n aria-label=\"caption\"\n part=\"search-server-name\"\n hidden\n >\n <ch-image\n class=\"icon-sm\"\n src={this.#geminiToolsSearchPrimary}\n ></ch-image>\n </button> */}\n\n <div\n // #authentication type\n class=\"field field-block authentication-type-field\"\n >\n <label class=\"label\" htmlFor=\"authenticationType\">\n {this.#componentLocale.tabAdvanced.authenticationType.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.authenticationTypes.length === 0}\n placeholder={\n this.authenticationTypes.length === 0\n ? this.#componentLocale.tabAdvanced.authenticationType\n .disabledPlaceholder\n : \"\"\n }\n value={this.authenticationTypesInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#authenticationTypeEl = el as HTMLChComboBoxRenderElement)\n }\n model={this.authenticationTypesComboBoxModel}\n id=\"authenticationType\"\n part=\"authentication-type\"\n onInput={\n this.authenticationTypes.length > 0\n ? this.#handlerAuthenticationTypeInput\n : undefined\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#authenticationTypeEl)}\n </div>\n\n <div\n // #database\n class=\"field field-block database-field\"\n >\n <label class=\"label\" htmlFor=\"databaseName\">\n {this.#componentLocale.tabAdvanced.databaseName.label}\n </label>\n <ch-edit\n // TODO add placeholder\n class=\"input\"\n value={this.databaseName}\n id=\"databaseName\"\n part=\"database-name\"\n ref={(el: HTMLChEditElement) =>\n (this.#databaseNameEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#databaseNameEl)}\n </div>\n\n {this.userNameVisible ? (\n <div\n // #username\n class=\"field field-block username-field\"\n >\n <label class=\"label\" htmlFor=\"userName\">\n {this.#componentLocale.tabAdvanced.userName.label}\n </label>\n <ch-edit\n // TODO add placeholder\n class=\"input\"\n value={this.userName}\n id=\"userName\"\n part=\"user-name\"\n ref={(el: HTMLChEditElement) =>\n (this.#userNameEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#userNameEl)}\n </div>\n ) : null}\n\n <div\n // #collation\n class=\"field field-block collation-field\"\n >\n <label class=\"label\" htmlFor=\"collation\">\n {this.#componentLocale.tabAdvanced.collation.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.serverNames.length === 0}\n placeholder={\n this.collations.length === 0\n ? this.#componentLocale.tabAdvanced.collation\n .disabledPlaceholder\n : \"\"\n }\n value={this.collationsInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#collationEl = el as HTMLChComboBoxRenderElement)\n }\n model={this.collationsComboBoxModel}\n id=\"collation\"\n part=\"collation\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#collationEl)}\n </div>\n\n {/* <button\n TODO: define button handler and logic \n class=\"button-tertiary button-icon-only collation-button\"\n aria-label=\"caption\"\n part=\"reset-collation\"\n >\n <ch-image\n class=\"icon-sm\"\n src={this.#geminiToolsResetPrimary}\n ></ch-image>\n </button> */}\n\n {this.passwordVisible ? (\n <div\n // #password\n class=\"field field-block password-field\"\n >\n <label class=\"label\" htmlFor=\"password\">\n {this.#componentLocale.tabAdvanced.password.label}\n </label>\n <ch-edit\n // TODO add placeholder\n class=\"input\"\n type=\"password\"\n value={this.password}\n id=\"password\"\n part=\"password\"\n ref={(el: HTMLChEditElement) =>\n (this.#passwordEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#passwordEl)}\n </div>\n ) : null}\n\n <ch-checkbox\n // #create data in knowledge base folder\n class=\"checkbox create-data-in-kb-checkbox\"\n checkedValue=\"createDataFilesInKBFolder\"\n caption={this.#componentLocale.tabAdvanced.createDataFilesInKbFolder}\n disabled={this.createDataInKbDisabled}\n part=\"create-data-in-kb\"\n id=\"createDataFilesInKBFolder\"\n ref={(el: HTMLChCheckboxElement) =>\n (this.#createDataFilesInKBFolderEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n\n {this.savePasswordVisible ? (\n <ch-checkbox\n // #save password\n class=\"checkbox save-password-checkbox\"\n checkedValue=\"password\"\n caption={this.#componentLocale.tabAdvanced.savePassword}\n part=\"save-password\"\n id=\"savePassword\"\n ref={(el: HTMLChCheckboxElement) =>\n (this.#savePasswordEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n ) : null}\n </div>\n ];\n };\n\n #renderBasic = (): HTMLElement[] => {\n return [\n <section class=\"basic__header field-group control-header-with-border spacing-body-inline\">\n <div\n // #prototyping target\n class=\"field field-block prototyping-target\"\n >\n <label class=\"label\" htmlFor=\"prototypingTarget\">\n {this.#componentLocale.tabBasic.prototypingTarget.label}\n </label>\n\n <ch-combo-box-render\n id=\"prototypingTarget\"\n class=\"combo-box\"\n part=\"prototyping-target\"\n disabled={this.prototypingTargets.length === 0}\n placeholder={\n this.prototypingTargets.length === 0\n ? this.#componentLocale.tabBasic.prototypingTarget\n .disabledPlaceholder\n : \"\"\n }\n value={this.prototypingTargetsInitialValue}\n model={this.prototypingTargetsComboBoxModel}\n onInput={\n this.prototypingTargets.length > 0\n ? this.#prototypingTargetValueChangedHandler\n : undefined\n }\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#prototypingTargetEl = el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#prototypingTargetEl)}\n </div>\n\n <div\n // #user interface\n class=\"field field-block user-interface-language\"\n >\n <label class=\"label\" htmlFor=\"userInterfaceLanguage\">\n {this.#componentLocale.tabBasic.userInterfaceLanguage.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.userInterfaceLanguages.length === 0}\n placeholder={\n this.userInterfaceLanguages.length === 0\n ? this.#componentLocale.tabBasic.userInterfaceLanguage\n .disabledPlaceholder\n : \"\"\n }\n value={this.userInterfaceLanguagesInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#userInterfaceLanguageEl =\n el as HTMLChComboBoxRenderElement)\n }\n model={this.userInterfaceLanguagesComboBoxModel}\n id=\"userInterfaceLanguage\"\n part=\"user-interface-language\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#userInterfaceLanguageEl)}\n </div>\n </section>,\n\n <section\n class=\"section__back-end\"\n // backend\n >\n <h2\n // back end\n class=\"control-header control-header-with-border control-header__back-end subtitle-regular-xs\t text-align-center spacing-body-inline\"\n >\n {this.#componentLocale.tabBasic.backEnd.backEndLabel}\n </h2>\n <div class=\"field-group main__back-end spacing-body-inline scrollable\">\n <div\n // #prototyping environment\n class=\"field field-block\"\n >\n <label class=\"label\" htmlFor=\"prototypingEnvironment\">\n {\n this.#componentLocale.tabBasic.backEnd.prototypingEnvironment\n .label\n }\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.prototypingEnvironments.length === 0}\n placeholder={\n this.prototypingEnvironments.length === 0\n ? this.#componentLocale.tabBasic.backEnd\n .prototypingEnvironment.disabledPlaceholder\n : \"\"\n }\n value={this.#selectedPrototypingEnvironmentId}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#prototypingEnvironmentEl =\n el as HTMLChComboBoxRenderElement)\n }\n model={this.prototypingEnvironmentsComboBoxModel}\n onInput={this.#prototypingEnvironmentValueChangedHandler}\n part=\"prototyping-environment\"\n id=\"prototypingEnvironment\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#prototypingEnvironmentEl)}\n </div>\n\n <div\n // #data source\n class=\"field field-block\"\n >\n <label class=\"label\" htmlFor=\"dataSource\">\n {this.#componentLocale.tabBasic.backEnd.dataSource.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.defaultDataSources.length === 0}\n placeholder={\n this.defaultDataSources.length === 0\n ? this.#componentLocale.tabBasic.backEnd.dataSource\n .disabledPlaceholder\n : \"\"\n }\n value={this.defaultDataSourcesInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#dataSourceEl = el as HTMLChComboBoxRenderElement)\n }\n model={this.defaultDataSourcesComboBoxModel}\n part=\"data-source\"\n id=\"dataSource\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#dataSourceEl)}\n </div>\n </div>\n </section>,\n\n <section\n class=\"section__front-end\"\n // front end\n >\n <h2 class=\"control-header control-header-with-border control-header__front-end subtitle-regular-xs\t text-align-center spacing-body-inline\">\n {this.#componentLocale.tabBasic.frontEnd.frontEndLabel}\n </h2>\n <div class=\"field-group main__front-end spacing-body-inline scrollable\">\n {renderChCheckboxItems(\n this.frontEnds,\n this.#frontEndCheckboxInputHandler,\n this.#frontEndsCheckedMap.get(\n this.#selectedPrototypingEnvironmentId\n )\n )}\n </div>\n </section>\n ];\n };\n\n // - - - - - - - - - -\n\n #cancelKbHandler = (): void => {\n if (this.cancelCallback) {\n this.cancelCallback();\n }\n };\n\n #createKbHandler = (): void => {\n const selectedFrontEndIds =\n this.#frontEndsCheckedMap.get(this.#selectedPrototypingEnvironmentId) ??\n [];\n\n this.createCallback({\n authenticationType: this.#authenticationTypeEl?.value,\n collation: this.#collationEl?.value,\n createDataFilesInKBFolder: !!this.#createDataFilesInKBFolderEl?.value,\n dataSource: this.#dataSourceEl?.value,\n databaseName: this.#databaseNameEl?.value,\n frontEnds: selectedFrontEndIds,\n kbLocation: this.#locationEl?.value,\n kbName: this.#kbNameEl?.value,\n password: this.#passwordEl?.value,\n prototypingEnvironment: this.#prototypingEnvironmentEl?.value,\n prototypingTarget: this.#prototypingTargetEl?.value,\n savePassword: !!this.#savePasswordEl?.value,\n serverName: this.#serverNameEl?.value,\n userInterfaceLanguage: this.#userInterfaceLanguageEl?.value,\n userName: this.#userNameEl?.value\n }).then((formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n });\n };\n\n /**\n * Disable \"Create Data in Knowledge Base Folder\" if the first Server Name\n * option is selected.\n * */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #evaluateCreateDataCheckboxEnabled = (serverNameValue: string) => {\n if (this.serverNames[0]?.id === serverNameValue) {\n this.createDataInKbDisabled = true;\n } else {\n this.createDataInKbDisabled = false;\n }\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on new-kb as well.\n #evaluateTooltipRender = (\n controlReference: HTMLElement\n ): HTMLChTooltipElement =>\n this.validatableControls?.get(controlReference?.id)?.hasError &&\n this.validatableControls.get(controlReference.id)?.message && (\n <ch-tooltip\n class=\"tooltip\"\n actionElement={controlReference as unknown as HTMLButtonElement}\n blockAlign={config.tooltipSettings.blockAlign}\n inlineAlign={config.tooltipSettings.inlineAlign}\n delay={config.tooltipSettings.delay}\n >\n {this.validatableControls.get(controlReference.id).message}\n </ch-tooltip>\n );\n\n /**\n * If \"Authentication Type\" is \"Windows Authentication\", hide User Name,\n * Password, and Save Password fields.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #evaluateUserInputsDisplay = (authenticationTypeValue: string) => {\n if (authenticationTypeValue === WINDOWS_AUTHENTICATION_VALUE) {\n this.userNameVisible = false;\n this.passwordVisible = false;\n this.savePasswordVisible = false;\n } else {\n this.userNameVisible = true;\n this.passwordVisible = true;\n this.savePasswordVisible = true;\n }\n };\n\n #frontEndCheckboxInputHandler = (\n event: ChCheckboxCustomEvent<string> | InputEvent\n ) => {\n const checkedValue = (event.target as HTMLChCheckboxElement).checkedValue;\n const checked = event.detail === checkedValue;\n this.#updateFrontEndsCheckedMap(checkedValue, checked);\n };\n\n /**\n * This function updates frontEndsCheckedMap, that contains the checked\n * checkboxes for each language front ends.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #updateFrontEndsCheckedMap = (checkboxId: string, checked: boolean) => {\n let currentState = this.#frontEndsCheckedMap.get(\n this.#selectedPrototypingEnvironmentId\n );\n if (!currentState) {\n // first time\n currentState = [];\n this.#frontEndsCheckedMap.set(\n this.#selectedPrototypingEnvironmentId,\n currentState\n );\n }\n if (checked) {\n // update by adding\n currentState.push(checkboxId);\n } else {\n // update by removing\n const checkboxIndex = currentState.findIndex(id => id === checkboxId);\n removeIndex(currentState, checkboxIndex);\n }\n };\n\n #getDataSources = (): void => {\n if (this.getDataSourcesCallback) {\n const selectedPrototypingEnvironmentId =\n this.#prototypingEnvironmentEl.value;\n const selectedPrototypingTargetId = this.#prototypingTargetEl.value;\n const updatedDefaultDataSourcesPromise: Promise<GxOption[]> =\n this.getDataSourcesCallback(\n selectedPrototypingEnvironmentId,\n selectedPrototypingTargetId\n );\n updatedDefaultDataSourcesPromise\n .then(result => {\n if (result.length > 0) {\n this.defaultDataSources = result;\n // set first option as selected\n this.#dataSourceEl.value = this.defaultDataSources[0].id;\n }\n })\n .catch(() => {\n // to do\n });\n }\n };\n\n #initialSetupAdvancedTab = () => {\n const selectedServerNameValue = this.#serverNameEl.value;\n this.#evaluateCreateDataCheckboxEnabled(selectedServerNameValue);\n\n const selectedAuthenticationType = this.#authenticationTypeEl.value;\n this.#evaluateUserInputsDisplay(selectedAuthenticationType);\n\n // map all \"Advanced Tab\" GxOption[]'s to ComboBoxModel's\n this.watchAuthenticationTypes(this.authenticationTypes);\n this.watchCollations(this.collations);\n };\n\n #initializeValidatableControlsBasicTab = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#dataSourceEl,\n this.#kbNameEl,\n this.#prototypingEnvironmentEl,\n this.#prototypingTargetEl,\n this.#userInterfaceLanguageEl\n ];\n validatableControls.forEach(validatableControl => {\n if (validatableControl.id) {\n this.validatableControls.set(validatableControl.id, {\n reference: validatableControl,\n hasError: false,\n message: undefined\n });\n }\n });\n };\n\n #initializeValidatableControlsAdvancedTab = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#locationEl,\n this.#authenticationTypeEl,\n this.#createDataFilesInKBFolderEl,\n this.#serverNameEl,\n this.#authenticationTypeEl,\n this.#databaseNameEl,\n this.#userNameEl,\n this.#collationEl,\n this.#passwordEl,\n this.#savePasswordEl\n ];\n validatableControls.forEach(validatableControl => {\n if (validatableControl.id) {\n this.validatableControls.set(validatableControl.id, {\n reference: validatableControl,\n hasError: false,\n message: undefined\n });\n }\n });\n };\n\n /**\n * @description It allows defining the DBMS that will be used in the solution\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #selectLocationHandler = (): void => {\n this.selectLocationCallback().then(kbLocation => {\n if (kbLocation) {\n this.kbLocation = kbLocation;\n } else {\n // to be defined\n }\n });\n };\n\n #tabSelectionChangedHandler = (\n event: CustomEvent<{\n lastSelectedIndex: number;\n newSelectedId: string;\n newSelectedIndex: number;\n }>\n ): void => {\n if (event.detail.newSelectedId === ADVANCED_TAB_SELECTOR) {\n this.advancedTabIsVisible = true;\n // Some logic for advanced tab is done on componentDidRender lifecycle,\n // since the reference to the elements is needed.\n }\n };\n\n /**\n * Evaluates which front-end options need updates on 'getFrontEndsCallback'\n * by comparing the new state (getFrontEndsCallback result) and previous state.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #updateFrontEnds = async () => {\n const updatedFrontEnds = await this.getFrontEndsCallback(\n this.#selectedPrototypingEnvironmentId\n );\n if (updatedFrontEnds?.length > 0) {\n this.frontEnds = updatedFrontEnds;\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\n class={{\n \"field-group\": true,\n \"control-header-with-border\": !this.isAdvanced,\n \"control-header\": this.isAdvanced,\n \"header\": true,\n \"header-two-cols\": this.isAdvanced,\n \"header-one-col\": !this.isAdvanced,\n \"spacing-body-block-start\": true,\n \"spacing-body-inline\": true\n }}\n >\n <div\n // #kb name\n class=\"field field-inline kb-name\"\n >\n <label class=\"label kb-label\" htmlFor=\"kbName\">\n {this.#componentLocale.header.kbName}\n </label>\n <ch-edit\n // TODO add placeholder\n autoFocus\n class=\"input kb-input\"\n placeholder=\"SalesInventory\"\n value={this.kbName}\n ref={(el: HTMLChEditElement) =>\n (this.#kbNameEl = el as HTMLChEditElement)\n }\n id=\"kbName\"\n part=\"kb-name\"\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#kbNameEl)}\n </div>\n\n {this.isAdvanced && (\n <div class=\"location-wrapper\">\n <div\n // #location\n class=\"field field-inline location\"\n >\n <label class=\"label location-label\" htmlFor=\"kbLocation\">\n {this.#componentLocale.header.kbLocation}\n </label>\n <ch-edit\n // TODO add placeholder\n class=\"input location-input\"\n value={this.kbLocation}\n ref={(el: HTMLChEditElement) =>\n (this.#locationEl = el as HTMLChEditElement)\n }\n id=\"kbLocation\"\n part=\"kb-location\"\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#locationEl)}\n </div>\n <button\n class=\"button-tertiary button-icon-only location-icon\"\n aria-label={this.#componentLocale.header.selectLocationButton}\n title={this.#componentLocale.header.selectLocationButton}\n part=\"button-select-location\"\n onClick={this.#selectLocationHandler}\n >\n <ch-image class=\"icon-md\" src={SYSTEM_ICON}></ch-image>\n </button>\n </div>\n )}\n </header>\n\n {this.isAdvanced ? (\n <ch-tab-render\n // #tab\n class={{\n scrollable: true,\n tab: true,\n [MAIN_SECTION_CLASSES]: true\n }}\n tabListPosition=\"block-start\"\n model={this.#kbSectionsModel}\n selectedId={BASIC_TAB_SELECTOR}\n overflow=\"auto\"\n contain=\"size\"\n onSelectedItemChange={\n !this.advancedTabIsVisible && this.#tabSelectionChangedHandler\n }\n >\n <div\n slot={BASIC_TAB_SELECTOR}\n class={BASIC_SECTION_PARENT_CLASSES}\n part=\"tab-button-basic\"\n >\n {this.#renderBasic()}\n </div>\n\n {this.advancedTabIsVisible && (\n <div\n slot={ADVANCED_TAB_SELECTOR}\n class=\"advanced spacing-body-inline\"\n part=\"tab-button-advanced\"\n >\n {this.#renderAdvanced()}\n </div>\n )}\n </ch-tab-render>\n ) : (\n <div class={MAIN_SECTION_CLASSES}>\n <div class={BASIC_SECTION_PARENT_CLASSES}>\n {this.#renderBasic()}\n </div>\n </div>\n )}\n\n <footer\n class={{\n \"control-footer\": this.isAdvanced,\n \"control-footer-with-border\": !this.isAdvanced,\n \"spacing-body-block-end\": true,\n \"spacing-body-inline\": true\n }}\n >\n <div class=\"buttons-spacer\">\n <button\n // #cancel\n class=\"button-secondary\"\n id=\"button-cancel\"\n onClick={this.#cancelKbHandler}\n part=\"button-cancel\"\n >\n {this.#componentLocale.footer.btnCancel}\n </button>\n <button\n // #create\n class=\"button-primary\"\n id=\"button-create\"\n onClick={this.#createKbHandler}\n part=\"button-create\"\n >\n {this.#componentLocale.footer.btnCreate}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\nexport interface NewKBData {\n authenticationType: string;\n collation: string;\n createDataFilesInKBFolder: boolean;\n databaseName: string;\n dataSource: string;\n frontEnds: string[];\n kbLocation: string;\n kbName: string;\n password: string;\n prototypingEnvironment: string;\n prototypingTarget: string;\n savePassword: boolean;\n serverName: string;\n userInterfaceLanguage: string;\n userName: string;\n}\n\nexport type CreateCallback = (data: NewKBData) => Promise<FormSubmitResult>;\n\nexport type CancelCallback = () => Promise<void>;\n\nexport type GetDataSourcesCallback = (\n selectedPrototypingEnvironmentId: string,\n selectedPrototypingTargetId: string\n) => Promise<GxOption[]>;\n\nexport type GetFrontEndsCallback = (\n selectedPrototypingEnvironmentId: string\n) => Promise<GxOption[]>;\n\nexport type SelectLocationCallback = () => Promise<string>;\n"],"version":3}
|
|
1
|
+
{"file":"gx-ide-new-kb.entry.cjs.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,QAAQ,GAAG,65CAA65C;;;;;;;;;;;;;;;;;;;ACiC96C,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,gBAAgB;IAChB,oBAAoB;IACpB,kBAAkB;IAClB,cAAc;IACd,kBAAkB;IAClB,eAAe;IACf,qBAAqB;CACtB,CAAC;AAEF,MAAM,4BAA4B,GAAW,wBAAwB,CAAC;AACtE,MAAM,oBAAoB,GAAW,MAAM,CAAC;AAC5C,MAAM,4BAA4B,GAAW,OAAO,CAAC;AAErD,MAAM,WAAW,GAAGA,0BAAW,CAAC;IAC9B,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAW,OAAO,CAAC;AAC3C,MAAM,qBAAqB,GAAW,UAAU,CAAC;MAQpC,UAAU;;;QACrB,iDAAuC,KAAK,EAAC;;;;;QAK7C,8CAAsB;;;;;QAKtB,0CAAuB,IAAI,GAAG,EAAoB,EAAC;QACnD,+DAA0C;QAC1C,mDAA8B;QAC9B,mCAAgBC,kBAAY,CAAC,uCAAuC,CAAC,EAAC;QACtE,sCAA6B,EAAE,EAAC;;QAKhC,mDAAoD;QACpD,0CAA2C;QAC3C,0DAAqD;QACrD,6CAAoC;QACpC,2CAA4C;QAC5C,uCAA8B;QAC9B,yCAAgC;QAChC,yCAAgC;QAChC,uDAAwD;QACxD,kDAAmD;QACnD,6CAAwC;QACxC,2CAA4C;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AI,mCAAiB,EAC9B,IAAI,EAAC,eAAe;WAEnB,uBAAA,IAAI,mCAAiB,CAAC,MAAM,CAAC,SAAS,CAChC,CACL,CACC,CACD,CACL,EACP;KACH;;;;;;;;;;;;;;;;;;","names":["getIconPath","getAssetPath","h","renderChCheckboxItems","validateControls","config","removeIndex","setSelectedItem","getSelectedItem","mapOptionsToComboBoxItemModel","Locale","Host"],"sources":["src/components/new-kb/new-kb.scss?tag=gx-ide-new-kb&encapsulation=shadow","src/components/new-kb/new-kb.tsx"],"sourcesContent":[":host {\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.section {\n display: contents;\n}\n\n.header {\n &-one-col {\n grid-template-columns: 1fr;\n }\n &-two-cols {\n grid-template-columns: 1fr 1fr;\n }\n}\n// location appears if advanced is true\n.location-wrapper {\n display: flex;\n gap: var(--mer-spacing--2xs);\n}\n.location {\n flex-grow: 1;\n grid-area: location;\n}\n\n.basic {\n display: grid;\n grid-template:\n \"basic-top basic-top\" max-content\n \"back-end front-end\" 1fr;\n grid-template-columns: 1fr 1fr;\n}\n.basic__header {\n grid-area: basic-top;\n grid-template-columns: 1fr 1fr;\n}\n.control-header__back-end,\n.control-header__front-end {\n padding-block-start: var(--mer-spacing--md);\n}\n.main__back-end {\n border-inline-end: var(--section-common-border);\n}\n.main__back-end,\n.main__front-end {\n grid-auto-rows: max-content;\n padding-block: var(--content-block-spacing);\n overflow: auto;\n}\n// back end\n.section__back-end {\n grid-area: back-end;\n grid-auto-rows: max-content;\n}\n// front end\n.section__front-end {\n grid-area: front-end;\n}\n.section__back-end,\n.section__front-end {\n display: grid;\n grid-template-rows: max-content 1fr;\n overflow: auto;\n}\n\n// advanced\n.tab-advanced-title {\n grid-area: tab-advanced-title;\n}\n.layout-tab-advanced-left-col {\n grid-area: layout-tab-advanced-left-col;\n}\n.layout-tab-advanced-right-col {\n grid-area: layout-tab-advanced-right-col;\n}\n\n.basic,\n.advanced {\n padding-block-start: var(--content-block-spacing);\n overflow: auto;\n block-size: 100%;\n}\n\n.tab-advanced__field-group {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-auto-rows: auto;\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.tab::part(page) {\n // WA / TODO: Remove this line when the ch-tab renders supports scrollbar\n // custom styling\n scrollbar-width: thin;\n}\n","import {\n Component,\n Host,\n Prop,\n Element,\n State,\n getAssetPath,\n Method,\n h,\n Watch\n} from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\n\nimport { config } from \"../../common/config\";\nimport { Locale } from \"../../common/locale\";\nimport { getSelectedItem, setSelectedItem } from \"../../common/common\";\nimport {\n mapOptionsToComboBoxItemModel,\n renderChCheckboxItems\n} from \"../../common/helpers\";\nimport { FormSubmitResult, GxOption } from \"../../common/types\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../common/form-validation\";\nimport {\n TabModel,\n ComboBoxModel,\n ChCheckboxCustomEvent\n} from \"@genexus/chameleon-controls-library\";\nimport { removeIndex } from \"../../common/array\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/tab\",\n \"components/tooltip\",\n \"utils/form--full\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst WINDOWS_AUTHENTICATION_VALUE: string = \"windows-authentication\";\nconst MAIN_SECTION_CLASSES: string = \"main\";\nconst BASIC_SECTION_PARENT_CLASSES: string = \"basic\";\n\nconst SYSTEM_ICON = getIconPath({\n category: \"system\",\n name: \"folder\",\n colorType: \"primary\"\n});\n\nconst BASIC_TAB_SELECTOR: string = \"basic\";\nconst ADVANCED_TAB_SELECTOR: string = \"advanced\";\n\n@Component({\n tag: \"gx-ide-new-kb\",\n styleUrl: \"new-kb.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/new-kb\"]\n})\nexport class GxIdeNewKb {\n #advancedTabHasBeenRendered: boolean = false;\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 * frontEndsState saves the id's of the front ends checkboxes that are checked\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #frontEndsCheckedMap = new Map<string, string[]>();\n #selectedPrototypingEnvironmentId: string;\n #selectedDataSourceId: string;\n #shortcutsSrc = getAssetPath(`./gx-ide-assets/new-kb/shortcuts.json`);\n #kbSectionsModel: TabModel = [];\n\n @Element() el: HTMLGxIdeNewKbElement;\n\n /* References needed to collect data con \"Create\" button submit*/\n #authenticationTypeEl!: HTMLChComboBoxRenderElement;\n #collationEl!: HTMLChComboBoxRenderElement;\n #createDataFilesInKBFolderEl!: HTMLChCheckboxElement;\n #databaseNameEl!: HTMLChEditElement;\n #dataSourceEl!: HTMLChComboBoxRenderElement;\n #kbNameEl!: HTMLChEditElement;\n #locationEl!: HTMLChEditElement;\n #passwordEl!: HTMLChEditElement;\n #prototypingEnvironmentEl!: HTMLChComboBoxRenderElement;\n #prototypingTargetEl!: HTMLChComboBoxRenderElement;\n #savePasswordEl!: HTMLChCheckboxElement;\n #serverNameEl!: HTMLChComboBoxRenderElement;\n #userInterfaceLanguageEl!: HTMLChComboBoxRenderElement;\n #userNameEl!: HTMLChEditElement;\n\n #chShortcutsEl: HTMLChShortcutsElement;\n\n @State() advancedTabIsVisible: boolean = false;\n /**\n * Allows selecting multiple generators for the front end\n * TODO: Check if this property can be deleted, since we can call getFrontEndsCallback.\n */\n @State() frontEnds: GxOption[];\n @State() validatableControls = new Map<string, ControlValidation>();\n @State() createDataInKbDisabled = false;\n @State() userNameVisible = true;\n @State() passwordVisible = true;\n @State() savePasswordVisible = true;\n // representations of GxOption[] as ComboBoxModel, and initialValue for each one.\n @State() authenticationTypesComboBoxModel: ComboBoxModel = [];\n @State() authenticationTypesInitialValue: string;\n @State() collationsComboBoxModel: ComboBoxModel = [];\n @State() collationsInitialValue: string;\n @State() defaultDataSourcesComboBoxModel: ComboBoxModel = [];\n @State() defaultDataSourcesInitialValue: string;\n @State() prototypingTargetsComboBoxModel: ComboBoxModel = [];\n @State() prototypingTargetsInitialValue: string;\n @State() prototypingEnvironmentsComboBoxModel: ComboBoxModel = [];\n @State() prototypingEnvironmentsInitialValue: string;\n @State() serverNamesComboBoxModel: ComboBoxModel = [];\n @State() serverNamesInitialValue: string;\n @State() userInterfaceLanguagesComboBoxModel: ComboBoxModel = [];\n @State() userInterfaceLanguagesInitialValue: string;\n\n /**\n * Defines the type of authentication for the connection to the previously defined database\n */\n @Prop() readonly authenticationTypes: GxOption[] = [];\n @Watch(\"authenticationTypes\")\n watchAuthenticationTypes(newValue: GxOption[]) {\n if (newValue?.length) {\n this.authenticationTypesComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.authenticationTypesInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Callback invoked when the user wants to cancel KB creation (‘Cancel’ button)\n */\n @Prop() readonly cancelCallback: CancelCallback;\n\n /**\n * DB Collations\n */\n @Prop() readonly collations!: GxOption[];\n @Watch(\"collations\")\n watchCollations(newValue: GxOption[]) {\n if (newValue?.length) {\n this.collationsComboBoxModel = mapOptionsToComboBoxItemModel(newValue);\n this.collationsInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Callback that will be invoked when the user confirms KB creation (‘Create’ button)\n */\n @Prop() readonly createCallback!: CreateCallback;\n\n /**\n * Disabled if the first item of the 'Server Name' combo is selected\n */\n @Prop() readonly createDataFilesInKBFolder: boolean = false;\n\n /**\n * Name of the database where we are going to persist the information of our KB\n */\n @Prop() readonly databaseName: string;\n\n /**\n * It allows defining the DBMS that will be used in the solution\n */\n @Prop({ mutable: true }) defaultDataSources: GxOption[] = [];\n @Watch(\"defaultDataSources\")\n watchDefaultDataSources(newValue: GxOption[]) {\n if (newValue?.length) {\n this.defaultDataSourcesComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.defaultDataSourcesInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Callback invoked when the user wants to cancel KB creation (‘Cancel’ button)\n */\n @Prop() readonly getDataSourcesCallback: GetDataSourcesCallback;\n\n /**\n * Callback invoked when the user changes the prototyping environment, allowing for the modification of the list of front ends\n */\n @Prop() readonly getFrontEndsCallback!: GetFrontEndsCallback;\n\n /**\n * Callback invoked when the user changes the prototyping target id, allowing for the modification of the list of prototyping environments\n */\n @Prop() readonly getPrototypingEnvironmentsCallback!: GetPrototypingEnvironmentsCallback;\n\n /**\n * Specify whether it is feasible to display information related to local configuration parameters\n */\n @Prop() readonly isAdvanced = false;\n\n /**\n * Default suggested path to a directory where the information related to the KB will be stored/generated\n */\n @Prop({ mutable: true }) kbLocation: string;\n\n /**\n * The knowledge base default suggested name\n */\n @Prop() readonly kbName: string;\n\n /**\n * Password for the database connection. Visible if the Authentication Type is different from Windows Authentication (first item of the combo)\n */\n @Prop() readonly password: string;\n\n /**\n * It allows selecting the default environment that the KB will have (additional environments can be created later)\n */\n @Prop({ mutable: true }) defaultPrototypingEnvironments: GxOption[] = [];\n @Watch(\"defaultPrototypingEnvironments\")\n watchDefaultPrototypingEnvironments(newValue: GxOption[]) {\n if (newValue?.length) {\n this.prototypingEnvironmentsComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.#selectedPrototypingEnvironmentId = getSelectedItem(newValue);\n this.#updateFrontEnds();\n }\n }\n\n /**\n * Path to a directory where the information related to the KB will be stored/generated\n */\n @Prop() readonly prototypingTargets: GxOption[] = [];\n @Watch(\"prototypingTargets\")\n watchPrototypingTargets(newValue: GxOption[]) {\n if (newValue?.length) {\n this.prototypingTargetsComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.prototypingTargetsInitialValue = getSelectedItem(newValue);\n this.#getPrototypingEnvironments();\n }\n }\n\n /**\n * Visible if something other than Windows Authentication is selected\n */\n @Prop() readonly savePassword: boolean = false;\n\n /**\n * This is a function provided by the developer that returns a string, with the location path\n */\n @Prop() readonly selectLocationCallback!: SelectLocationCallback;\n\n /**\n * Name of the DB server where we want to persist the information of our KB\n */\n @Prop() readonly serverNames: GxOption[] = [];\n @Watch(\"serverNames\")\n watchServerNames(newValue: GxOption[]) {\n if (newValue?.length) {\n this.serverNamesComboBoxModel = mapOptionsToComboBoxItemModel(newValue);\n this.serverNamesInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Specify the language in which the application screens will be developed (default language)\n */\n @Prop() readonly userInterfaceLanguages: GxOption[] = [];\n @Watch(\"userInterfaceLanguages\")\n watchUserInterfaceLanguages(newValue: GxOption[]) {\n if (newValue?.length) {\n this.userInterfaceLanguagesComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.userInterfaceLanguagesInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Username for the database connection. Visible if the Authentication Type is different from Windows Authentication (first item of the combo)\n */\n @Prop() readonly userName: string;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.#kbSectionsModel = [\n {\n id: BASIC_TAB_SELECTOR,\n name: this.#componentLocale.tabBasic.tabLabel\n },\n {\n id: ADVANCED_TAB_SELECTOR,\n name: this.#componentLocale.tabAdvanced.tabLabel\n }\n ];\n }\n\n connectedCallback() {\n this.watchDefaultDataSources(this.defaultDataSources);\n this.watchDefaultPrototypingEnvironments(this.defaultPrototypingEnvironments);\n this.watchPrototypingTargets(this.prototypingTargets);\n this.watchServerNames(this.serverNames);\n this.watchUserInterfaceLanguages(this.userInterfaceLanguages);\n }\n\n componentDidLoad() {\n this.#initializeValidatableControlsBasicTab();\n }\n\n componentDidRender() {\n if (this.advancedTabIsVisible && !this.#advancedTabHasBeenRendered) {\n // just call this once.\n this.#initialSetupAdvancedTab();\n this.#initializeValidatableControlsAdvancedTab();\n this.#advancedTabHasBeenRendered = true;\n }\n }\n\n /**\n * Suspends or reactivates the shortcuts\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n if (suspendShortcuts) {\n this.#chShortcutsEl.suspend = true;\n } else {\n this.#chShortcutsEl.suspend = false;\n }\n }\n\n // Uncomment when \"TODO: define button handler and logic\" is done.\n // #geminiToolsSearchPrimary = getIconPath({\n // category: \"gemini-tools\",\n // name: \"search\",\n // colorType: \"primary\"\n // });\n // #geminiToolsResetPrimary = getIconPath({\n // category: \"gemini-tools\",\n // name: \"reset\",\n // colorType: \"primary\"\n // });\n\n #handlerAuthenticationTypeInput = (e: CustomEvent<string> | InputEvent) => {\n const authenticationTypeValue = e?.detail;\n this.#evaluateUserInputsDisplay(authenticationTypeValue as string);\n };\n\n #handlerServerNameInput = (e: CustomEvent<string> | InputEvent) => {\n this.#evaluateCreateDataCheckboxEnabled(e.detail as string);\n };\n\n #prototypingEnvironmentValueChangedHandler = (\n event: CustomEvent<string> | InputEvent\n ): void => {\n this.#selectedPrototypingEnvironmentId = event.detail as string;\n this.#getDataSources();\n this.#updateFrontEnds();\n };\n\n #prototypingTargetValueChangedHandler = async (): Promise<void> => {\n await this.#getPrototypingEnvironments();\n this.#getDataSources();\n };\n\n #dataSourceValueChangedHandler = () => {\n this.#selectedDataSourceId = this.#dataSourceEl.value;\n };\n\n #renderAdvanced = (): Element[] => {\n return [\n <h2\n // #knowledge base storage\n class=\"control-header subtitle-regular-xs\t text-align-center\"\n >\n {this.#componentLocale.tabAdvanced.tabTitle}\n </h2>,\n <div class=\"field-group tab-advanced__field-group\">\n <div\n // #server name\n class=\"field field-block server-name-field\"\n >\n <label class=\"label\" htmlFor=\"serverName\">\n {this.#componentLocale.tabAdvanced.serverName.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.serverNames.length === 0}\n placeholder={\n this.serverNames.length === 0\n ? this.#componentLocale.tabAdvanced.serverName\n .disabledPlaceholder\n : \"\"\n }\n value={this.serverNamesInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#serverNameEl = el as HTMLChComboBoxRenderElement)\n }\n model={this.serverNamesComboBoxModel}\n onInput={\n this.serverNames.length > 0 && this.#handlerServerNameInput\n }\n id=\"serverName\"\n part=\"server-name\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#serverNameEl)}\n </div>\n\n {/* <button\n TODO: define button handler and logic\n class=\"button-tertiary button-icon-only server-name-button\"\n aria-label=\"caption\"\n part=\"search-server-name\"\n hidden\n >\n <ch-image\n class=\"icon-sm\"\n src={this.#geminiToolsSearchPrimary}\n ></ch-image>\n </button> */}\n\n <div\n // #authentication type\n class=\"field field-block authentication-type-field\"\n >\n <label class=\"label\" htmlFor=\"authenticationType\">\n {this.#componentLocale.tabAdvanced.authenticationType.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.authenticationTypes.length === 0}\n placeholder={\n this.authenticationTypes.length === 0\n ? this.#componentLocale.tabAdvanced.authenticationType\n .disabledPlaceholder\n : \"\"\n }\n value={this.authenticationTypesInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#authenticationTypeEl = el as HTMLChComboBoxRenderElement)\n }\n model={this.authenticationTypesComboBoxModel}\n id=\"authenticationType\"\n part=\"authentication-type\"\n onInput={\n this.authenticationTypes.length > 0\n ? this.#handlerAuthenticationTypeInput\n : undefined\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#authenticationTypeEl)}\n </div>\n\n <div\n // #database\n class=\"field field-block database-field\"\n >\n <label class=\"label\" htmlFor=\"databaseName\">\n {this.#componentLocale.tabAdvanced.databaseName.label}\n </label>\n <ch-edit\n // TODO add placeholder\n class=\"input\"\n value={this.databaseName}\n id=\"databaseName\"\n part=\"database-name\"\n ref={(el: HTMLChEditElement) =>\n (this.#databaseNameEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#databaseNameEl)}\n </div>\n\n {this.userNameVisible ? (\n <div\n // #username\n class=\"field field-block username-field\"\n >\n <label class=\"label\" htmlFor=\"userName\">\n {this.#componentLocale.tabAdvanced.userName.label}\n </label>\n <ch-edit\n // TODO add placeholder\n class=\"input\"\n value={this.userName}\n id=\"userName\"\n part=\"user-name\"\n ref={(el: HTMLChEditElement) =>\n (this.#userNameEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#userNameEl)}\n </div>\n ) : null}\n\n <div\n // #collation\n class=\"field field-block collation-field\"\n >\n <label class=\"label\" htmlFor=\"collation\">\n {this.#componentLocale.tabAdvanced.collation.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.serverNames.length === 0}\n placeholder={\n this.collations.length === 0\n ? this.#componentLocale.tabAdvanced.collation\n .disabledPlaceholder\n : \"\"\n }\n value={this.collationsInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#collationEl = el as HTMLChComboBoxRenderElement)\n }\n model={this.collationsComboBoxModel}\n id=\"collation\"\n part=\"collation\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#collationEl)}\n </div>\n\n {/* <button\n TODO: define button handler and logic \n class=\"button-tertiary button-icon-only collation-button\"\n aria-label=\"caption\"\n part=\"reset-collation\"\n >\n <ch-image\n class=\"icon-sm\"\n src={this.#geminiToolsResetPrimary}\n ></ch-image>\n </button> */}\n\n {this.passwordVisible ? (\n <div\n // #password\n class=\"field field-block password-field\"\n >\n <label class=\"label\" htmlFor=\"password\">\n {this.#componentLocale.tabAdvanced.password.label}\n </label>\n <ch-edit\n // TODO add placeholder\n class=\"input\"\n type=\"password\"\n value={this.password}\n id=\"password\"\n part=\"password\"\n ref={(el: HTMLChEditElement) =>\n (this.#passwordEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#passwordEl)}\n </div>\n ) : null}\n\n <ch-checkbox\n // #create data in knowledge base folder\n class=\"checkbox create-data-in-kb-checkbox\"\n checkedValue=\"createDataFilesInKBFolder\"\n caption={this.#componentLocale.tabAdvanced.createDataFilesInKbFolder}\n disabled={this.createDataInKbDisabled}\n part=\"create-data-in-kb\"\n id=\"createDataFilesInKBFolder\"\n ref={(el: HTMLChCheckboxElement) =>\n (this.#createDataFilesInKBFolderEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n\n {this.savePasswordVisible ? (\n <ch-checkbox\n // #save password\n class=\"checkbox save-password-checkbox\"\n checkedValue=\"password\"\n caption={this.#componentLocale.tabAdvanced.savePassword}\n part=\"save-password\"\n id=\"savePassword\"\n ref={(el: HTMLChCheckboxElement) =>\n (this.#savePasswordEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n ) : null}\n </div>\n ];\n };\n\n #renderBasic = (): HTMLElement[] => {\n return [\n <section class=\"basic__header field-group control-header-with-border spacing-body-inline\">\n <div\n // #prototyping target\n class=\"field field-block prototyping-target\"\n >\n <label class=\"label\" htmlFor=\"prototypingTarget\">\n {this.#componentLocale.tabBasic.prototypingTarget.label}\n </label>\n\n <ch-combo-box-render\n id=\"prototypingTarget\"\n class=\"combo-box\"\n part=\"prototyping-target\"\n disabled={this.prototypingTargets.length === 0}\n placeholder={\n this.prototypingTargets.length === 0\n ? this.#componentLocale.tabBasic.prototypingTarget\n .disabledPlaceholder\n : \"\"\n }\n value={this.prototypingTargetsInitialValue}\n model={this.prototypingTargetsComboBoxModel}\n onInput={\n this.prototypingTargets.length > 0\n ? this.#prototypingTargetValueChangedHandler\n : undefined\n }\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#prototypingTargetEl = el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#prototypingTargetEl)}\n </div>\n\n <div\n // #user interface\n class=\"field field-block user-interface-language\"\n >\n <label class=\"label\" htmlFor=\"userInterfaceLanguage\">\n {this.#componentLocale.tabBasic.userInterfaceLanguage.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.userInterfaceLanguages.length === 0}\n placeholder={\n this.userInterfaceLanguages.length === 0\n ? this.#componentLocale.tabBasic.userInterfaceLanguage\n .disabledPlaceholder\n : \"\"\n }\n value={this.userInterfaceLanguagesInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#userInterfaceLanguageEl =\n el as HTMLChComboBoxRenderElement)\n }\n model={this.userInterfaceLanguagesComboBoxModel}\n id=\"userInterfaceLanguage\"\n part=\"user-interface-language\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#userInterfaceLanguageEl)}\n </div>\n </section>,\n\n <section\n class=\"section__back-end\"\n // backend\n >\n <h2\n // back end\n class=\"control-header control-header-with-border control-header__back-end subtitle-regular-xs\t text-align-center spacing-body-inline\"\n >\n {this.#componentLocale.tabBasic.backEnd.backEndLabel}\n </h2>\n <div class=\"field-group main__back-end spacing-body-inline scrollable\">\n <div\n // #prototyping environment\n class=\"field field-block\"\n >\n <label class=\"label\" htmlFor=\"prototypingEnvironment\">\n {\n this.#componentLocale.tabBasic.backEnd.prototypingEnvironment\n .label\n }\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.defaultPrototypingEnvironments.length === 0}\n placeholder={\n this.defaultPrototypingEnvironments.length === 0\n ? this.#componentLocale.tabBasic.backEnd\n .prototypingEnvironment.disabledPlaceholder\n : \"\"\n }\n value={this.#selectedPrototypingEnvironmentId}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#prototypingEnvironmentEl =\n el as HTMLChComboBoxRenderElement)\n }\n model={this.prototypingEnvironmentsComboBoxModel}\n onInput={this.#prototypingEnvironmentValueChangedHandler}\n part=\"prototyping-environment\"\n id=\"prototypingEnvironment\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#prototypingEnvironmentEl)}\n </div>\n\n <div\n // #data source\n class=\"field field-block\"\n >\n <label class=\"label\" htmlFor=\"dataSource\">\n {this.#componentLocale.tabBasic.backEnd.dataSource.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.defaultDataSources.length === 0}\n placeholder={\n this.defaultDataSources.length === 0\n ? this.#componentLocale.tabBasic.backEnd.dataSource\n .disabledPlaceholder\n : \"\"\n }\n value={this.defaultDataSourcesInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#dataSourceEl = el as HTMLChComboBoxRenderElement)\n }\n onInput={this.#dataSourceValueChangedHandler}\n model={this.defaultDataSourcesComboBoxModel}\n part=\"data-source\"\n id=\"dataSource\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#dataSourceEl)}\n </div>\n </div>\n </section>,\n\n <section\n class=\"section__front-end\"\n // front end\n >\n <h2 class=\"control-header control-header-with-border control-header__front-end subtitle-regular-xs\t text-align-center spacing-body-inline\">\n {this.#componentLocale.tabBasic.frontEnd.frontEndLabel}\n </h2>\n <div class=\"field-group main__front-end spacing-body-inline scrollable\">\n {renderChCheckboxItems(\n this.frontEnds,\n this.#frontEndCheckboxInputHandler,\n this.#frontEndsCheckedMap.get(\n this.#selectedPrototypingEnvironmentId\n )\n )}\n </div>\n </section>\n ];\n };\n\n // - - - - - - - - - -\n\n #cancelKbHandler = (): void => {\n if (this.cancelCallback) {\n this.cancelCallback();\n }\n };\n\n #createKbHandler = (): void => {\n const selectedFrontEndIds =\n this.#frontEndsCheckedMap.get(this.#selectedPrototypingEnvironmentId) ??\n [];\n\n this.createCallback({\n authenticationType: this.#authenticationTypeEl?.value,\n collation: this.#collationEl?.value,\n createDataFilesInKBFolder: !!this.#createDataFilesInKBFolderEl?.value,\n dataSource: this.#dataSourceEl?.value,\n databaseName: this.#databaseNameEl?.value,\n frontEnds: selectedFrontEndIds,\n kbLocation: this.#locationEl?.value,\n kbName: this.#kbNameEl?.value,\n password: this.#passwordEl?.value,\n prototypingEnvironment: this.#prototypingEnvironmentEl?.value,\n prototypingTarget: this.#prototypingTargetEl?.value,\n savePassword: !!this.#savePasswordEl?.value,\n serverName: this.#serverNameEl?.value,\n userInterfaceLanguage: this.#userInterfaceLanguageEl?.value,\n userName: this.#userNameEl?.value\n }).then((formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n });\n };\n\n /**\n * Disable \"Create Data in Knowledge Base Folder\" if the first Server Name\n * option is selected.\n * */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #evaluateCreateDataCheckboxEnabled = (serverNameValue: string) => {\n if (this.serverNames[0]?.id === serverNameValue) {\n this.createDataInKbDisabled = true;\n } else {\n this.createDataInKbDisabled = false;\n }\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on new-kb as well.\n #evaluateTooltipRender = (\n controlReference: HTMLElement\n ): HTMLChTooltipElement =>\n this.validatableControls?.get(controlReference?.id)?.hasError &&\n this.validatableControls.get(controlReference.id)?.message && (\n <ch-tooltip\n class=\"tooltip\"\n actionElement={controlReference as unknown as HTMLButtonElement}\n blockAlign={config.tooltipSettings.blockAlign}\n inlineAlign={config.tooltipSettings.inlineAlign}\n delay={config.tooltipSettings.delay}\n >\n {this.validatableControls.get(controlReference.id).message}\n </ch-tooltip>\n );\n\n /**\n * If \"Authentication Type\" is \"Windows Authentication\", hide User Name,\n * Password, and Save Password fields.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #evaluateUserInputsDisplay = (authenticationTypeValue: string) => {\n if (authenticationTypeValue === WINDOWS_AUTHENTICATION_VALUE) {\n this.userNameVisible = false;\n this.passwordVisible = false;\n this.savePasswordVisible = false;\n } else {\n this.userNameVisible = true;\n this.passwordVisible = true;\n this.savePasswordVisible = true;\n }\n };\n\n #frontEndCheckboxInputHandler = (\n event: ChCheckboxCustomEvent<string> | InputEvent\n ) => {\n const checkedValue = (event.target as HTMLChCheckboxElement).checkedValue;\n const checked = event.detail === checkedValue;\n this.#updateFrontEndsCheckedMap(checkedValue, checked);\n };\n\n /**\n * This function updates frontEndsCheckedMap, that contains the checked\n * checkboxes for each language front ends.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #updateFrontEndsCheckedMap = (checkboxId: string, checked: boolean) => {\n let currentState = this.#frontEndsCheckedMap.get(\n this.#selectedPrototypingEnvironmentId\n );\n if (!currentState) {\n // first time\n currentState = [];\n this.#frontEndsCheckedMap.set(\n this.#selectedPrototypingEnvironmentId,\n currentState\n );\n }\n if (checked) {\n // update by adding\n currentState.push(checkboxId);\n } else {\n // update by removing\n const checkboxIndex = currentState.findIndex(id => id === checkboxId);\n removeIndex(currentState, checkboxIndex);\n }\n };\n\n #getPrototypingEnvironments = async (): Promise<void> => {\n if (this.getPrototypingEnvironmentsCallback) {\n const selectedPrototypingTargetId = this.#prototypingTargetEl ? \n this.#prototypingTargetEl.value : this.prototypingTargetsInitialValue;\n const envs = await this.getPrototypingEnvironmentsCallback(selectedPrototypingTargetId);\n if (envs) {\n this.defaultPrototypingEnvironments = envs;\n }\n }\n };\n\n #getDataSources = (): void => {\n if (this.getDataSourcesCallback) {\n const selectedPrototypingEnvironmentId =\n this.#prototypingEnvironmentEl.value;\n const selectedPrototypingTargetId = this.#prototypingTargetEl.value;\n const updatedDefaultDataSourcesPromise: Promise<GxOption[]> =\n this.getDataSourcesCallback(\n selectedPrototypingEnvironmentId,\n selectedPrototypingTargetId\n );\n updatedDefaultDataSourcesPromise\n .then(result => {\n if (result.length > 0) {\n result = setSelectedItem(result, this.#selectedDataSourceId);\n this.#selectedDataSourceId = getSelectedItem(result);\n this.defaultDataSources = result;\n // set first option as selected\n this.#dataSourceEl.value = \n this.#selectedDataSourceId !== undefined ? this.#selectedDataSourceId : this.defaultDataSources[0].id;\n }\n })\n .catch(() => {\n // to do\n });\n }\n };\n\n #initialSetupAdvancedTab = () => {\n const selectedServerNameValue = this.#serverNameEl.value;\n this.#evaluateCreateDataCheckboxEnabled(selectedServerNameValue);\n\n const selectedAuthenticationType = this.#authenticationTypeEl.value;\n this.#evaluateUserInputsDisplay(selectedAuthenticationType);\n\n // map all \"Advanced Tab\" GxOption[]'s to ComboBoxModel's\n this.watchAuthenticationTypes(this.authenticationTypes);\n this.watchCollations(this.collations);\n };\n\n #initializeValidatableControlsBasicTab = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#dataSourceEl,\n this.#kbNameEl,\n this.#prototypingEnvironmentEl,\n this.#prototypingTargetEl,\n this.#userInterfaceLanguageEl\n ];\n validatableControls.forEach(validatableControl => {\n if (validatableControl.id) {\n this.validatableControls.set(validatableControl.id, {\n reference: validatableControl,\n hasError: false,\n message: undefined\n });\n }\n });\n };\n\n #initializeValidatableControlsAdvancedTab = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#locationEl,\n this.#authenticationTypeEl,\n this.#createDataFilesInKBFolderEl,\n this.#serverNameEl,\n this.#authenticationTypeEl,\n this.#databaseNameEl,\n this.#userNameEl,\n this.#collationEl,\n this.#passwordEl,\n this.#savePasswordEl\n ];\n validatableControls.forEach(validatableControl => {\n if (validatableControl.id) {\n this.validatableControls.set(validatableControl.id, {\n reference: validatableControl,\n hasError: false,\n message: undefined\n });\n }\n });\n };\n\n /**\n * @description It allows defining the DBMS that will be used in the solution\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #selectLocationHandler = (): void => {\n this.selectLocationCallback().then(kbLocation => {\n if (kbLocation) {\n this.kbLocation = kbLocation;\n } else {\n // to be defined\n }\n });\n };\n\n #tabSelectionChangedHandler = (\n event: CustomEvent<{\n lastSelectedIndex: number;\n newSelectedId: string;\n newSelectedIndex: number;\n }>\n ): void => {\n if (event.detail.newSelectedId === ADVANCED_TAB_SELECTOR) {\n this.advancedTabIsVisible = true;\n // Some logic for advanced tab is done on componentDidRender lifecycle,\n // since the reference to the elements is needed.\n }\n };\n\n /**\n * Evaluates which front-end options need updates on 'getFrontEndsCallback'\n * by comparing the new state (getFrontEndsCallback result) and previous state.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #updateFrontEnds = async () => {\n const updatedFrontEnds = await this.getFrontEndsCallback(\n this.#selectedPrototypingEnvironmentId\n );\n if (updatedFrontEnds?.length > 0) {\n this.frontEnds = updatedFrontEnds;\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\n class={{\n \"field-group\": true,\n \"control-header-with-border\": !this.isAdvanced,\n \"control-header\": this.isAdvanced,\n \"header\": true,\n \"header-two-cols\": this.isAdvanced,\n \"header-one-col\": !this.isAdvanced,\n \"spacing-body-block-start\": true,\n \"spacing-body-inline\": true\n }}\n >\n <div\n // #kb name\n class=\"field field-inline kb-name\"\n >\n <label class=\"label kb-label\" htmlFor=\"kbName\">\n {this.#componentLocale.header.kbName}\n </label>\n <ch-edit\n // TODO add placeholder\n autoFocus\n class=\"input kb-input\"\n placeholder=\"SalesInventory\"\n value={this.kbName}\n ref={(el: HTMLChEditElement) =>\n (this.#kbNameEl = el as HTMLChEditElement)\n }\n id=\"kbName\"\n part=\"kb-name\"\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#kbNameEl)}\n </div>\n\n {this.isAdvanced && (\n <div class=\"location-wrapper\">\n <div\n // #location\n class=\"field field-inline location\"\n >\n <label class=\"label location-label\" htmlFor=\"kbLocation\">\n {this.#componentLocale.header.kbLocation}\n </label>\n <ch-edit\n // TODO add placeholder\n class=\"input location-input\"\n value={this.kbLocation}\n ref={(el: HTMLChEditElement) =>\n (this.#locationEl = el as HTMLChEditElement)\n }\n id=\"kbLocation\"\n part=\"kb-location\"\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#locationEl)}\n </div>\n <button\n class=\"button-tertiary button-icon-only location-icon\"\n aria-label={this.#componentLocale.header.selectLocationButton}\n title={this.#componentLocale.header.selectLocationButton}\n part=\"button-select-location\"\n onClick={this.#selectLocationHandler}\n >\n <ch-image class=\"icon-md\" src={SYSTEM_ICON}></ch-image>\n </button>\n </div>\n )}\n </header>\n\n {this.isAdvanced ? (\n <ch-tab-render\n // #tab\n class={{\n scrollable: true,\n tab: true,\n [MAIN_SECTION_CLASSES]: true\n }}\n tabListPosition=\"block-start\"\n model={this.#kbSectionsModel}\n selectedId={BASIC_TAB_SELECTOR}\n overflow=\"auto\"\n contain=\"size\"\n onSelectedItemChange={\n !this.advancedTabIsVisible && this.#tabSelectionChangedHandler\n }\n >\n <div\n slot={BASIC_TAB_SELECTOR}\n class={BASIC_SECTION_PARENT_CLASSES}\n part=\"tab-button-basic\"\n >\n {this.#renderBasic()}\n </div>\n\n {this.advancedTabIsVisible && (\n <div\n slot={ADVANCED_TAB_SELECTOR}\n class=\"advanced spacing-body-inline\"\n part=\"tab-button-advanced\"\n >\n {this.#renderAdvanced()}\n </div>\n )}\n </ch-tab-render>\n ) : (\n <div class={MAIN_SECTION_CLASSES}>\n <div class={BASIC_SECTION_PARENT_CLASSES}>\n {this.#renderBasic()}\n </div>\n </div>\n )}\n\n <footer\n class={{\n \"control-footer\": this.isAdvanced,\n \"control-footer-with-border\": !this.isAdvanced,\n \"spacing-body-block-end\": true,\n \"spacing-body-inline\": true\n }}\n >\n <div class=\"buttons-spacer\">\n <button\n // #cancel\n class=\"button-secondary\"\n id=\"button-cancel\"\n onClick={this.#cancelKbHandler}\n part=\"button-cancel\"\n >\n {this.#componentLocale.footer.btnCancel}\n </button>\n <button\n // #create\n class=\"button-primary\"\n id=\"button-create\"\n onClick={this.#createKbHandler}\n part=\"button-create\"\n >\n {this.#componentLocale.footer.btnCreate}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\nexport interface NewKBData {\n authenticationType: string;\n collation: string;\n createDataFilesInKBFolder: boolean;\n databaseName: string;\n dataSource: string;\n frontEnds: string[];\n kbLocation: string;\n kbName: string;\n password: string;\n prototypingEnvironment: string;\n prototypingTarget: string;\n savePassword: boolean;\n serverName: string;\n userInterfaceLanguage: string;\n userName: string;\n}\n\nexport type CreateCallback = (data: NewKBData) => Promise<FormSubmitResult>;\n\nexport type CancelCallback = () => Promise<void>;\n\nexport type GetDataSourcesCallback = (\n selectedPrototypingEnvironmentId: string,\n selectedPrototypingTargetId: string\n) => Promise<GxOption[]>;\n\nexport type GetFrontEndsCallback = (\n selectedPrototypingEnvironmentId: string\n) => Promise<GxOption[]>;\n\nexport type GetPrototypingEnvironmentsCallback = (\n selectedPrototypingTargetId: string\n) => Promise<GxOption[]>;\n\nexport type SelectLocationCallback = () => Promise<string>;\n"],"version":3}
|
|
@@ -295,10 +295,11 @@ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) ||
|
|
|
295
295
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
296
296
|
};
|
|
297
297
|
var _GxIdeScChatContainer_chatContainerRef, _GxIdeScChatContainer_chatWelcomeRef, _GxIdeScChatContainer_chChatRef, _GxIdeScChatContainer_chatCallbacks, _GxIdeScChatContainer_copyConversationCallbackHandler, _GxIdeScChatContainer_deleteConversationCallbackHandler, _GxIdeScChatContainer_suggestedPrompRequestedCallbackHandler;
|
|
298
|
+
// TODO: Add back "components/chat-lit" once chat bundle for lit is ready
|
|
299
|
+
// on a new Mercury version
|
|
298
300
|
const CSS_BUNDLES = [
|
|
299
301
|
"resets/box-sizing",
|
|
300
302
|
"utils/elevation",
|
|
301
|
-
"components/chat-lit",
|
|
302
303
|
"components/markdown-viewer"
|
|
303
304
|
];
|
|
304
305
|
const GxIdeScChatContainer = class {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gx-ide-sc-chat-container.entry.cjs.js","mappings":";;;;;;;AAOO,MAAM,iCAAiC,GAC5C,iPAAiP,CAAC;AAE7O,MAAM,cAAc,GAAG,MAAM,CAAC;AAqKrC;AACA;AACA;AAEO,MAAM,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkD1C,CAAC;AAe2C,KAAK,CAAC,IAAI,CACrD,EAAE,MAAM,EAAE,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EAC7B,wBAAwB,EAAE,uBAAA,IAAI,6DAAiC,EAC/D,0BAA0B,EAAE,uBAAA,IAAI,+DAAmC,EACnE,GAAG,EAAE,EAAE,KACJ,uBAAA,IAAI,0CAAqB,EAAmC,MAAA,CAAC,EAEhE,KAAK,EAAC,aAAa,IAEnBA,qBACE,SAAS,EAAE,uBAAA,IAAI,2CAAe,EAC9B,KAAK,EAAC,UAAU,EAChB,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAC3C,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,UAAU,EAAEE,gCAAiB,EAC7B,KAAK,EAAE,IAAI,CAAC,SAAS,EACrB,qBAAqB,EAAE,IAAI,CAAC,qBAAqB,EACjD,YAAY,EAAE,gBAAgB,EAC9B,GAAG,EAAE,CAAC,EAAqB,MACxB,uBAAA,IAAI,mCAAc,EAAuB,MAAA,CAAC,EAE7C,aAAa,EAAC,4BAA4B,IAE1CF,iCACE,GAAG,EAAE,EAAE,KACJ,uBAAA,IAAI,wCAAmB,EAAiC,MAAA,CAAC,EAE5D,IAAI,EAAC,YAAY,EACjB,+BAA+B,EAC7B,uBAAA,IAAI,oEAAwC,GAEzB,EACvBA,iBAAK,IAAI,EAAC,oBAAoB,oEAExB,CACE,CACY,CACnB,EACP;KACH;;;;;;;","names":["h","Host","renderItemMercury"],"sources":["src/showcase/chat-container/models.ts","src/showcase/chat-container/callbacks.ts","src/showcase/chat-container/chat-showcase.scss?tag=gx-ide-sc-chat-container&encapsulation=shadow","src/showcase/chat-container/chat.showcase.tsx"],"sourcesContent":["import type {\n ChatMessage,\n ChatTranslations\n} from \"@genexus/chameleon-controls-library\";\n\nimport { MercuryChatMessageMetadata } from \"../../components/chat/lit-custom-render/types\";\n\nexport const ASSISTANT_RESPONSE_SHORT_MARKDOWN =\n '\\n### Code block {#code-block}\\nTo create code blocks, you’ll use three backticks (` ``` `) or three tildes (`~~~`) on the lines before and after the code block.\\n\\n```json\\n{\\n \"firstName\": \"John\",\\n \"lastName\": \"Smith\",\\n \"age\": 25\\n}';\n\nexport const ASSISTANT_NAME = \"Nexa\";\n\n// - - - - - - - - - - - - - -\n// Types of messages\n// - - - - - - - - - - - - - -\n\nexport const userMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content:\n \"Generate a web form for customer registration with fields for name, email, phone, and address. Include validation, save the data to the database, and show a confirmation message after submission.\",\n metadata: null\n }\n];\n\nexport const assistantMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"I’ve created the basic structure for the registration form, but I need a bit more info: Should the address include city, state, and ZIP? Do you want a separate confirmation page or just a message on the same screen? Any specific format or validation for the phone number?\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const assistantMessageWarningChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration panel was created with warnings: The “Phone” field uses a generic character format—consider a phone mask. No address validation rules applied.The data is still saved correctly, and the panel works as expected.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n }\n];\n\nexport const assistantMessageSuccessChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration web panel was created successfully. Fields: Name, Email, Phone, Address. Validations applied (required, email format). Data saved to “Customer” transaction. Confirmation message shown after submit. Let me know if you'd like to add styles or link it to another object.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n }\n];\n\nexport const errorMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"error\",\n content:\n \"Sorry, I couldn't generate the requested form. Reason: The “Customer” transaction does not exist in the current Knowledge Base. Please create the “Customer” object or check if it’s named differently.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const assistantWaitingChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"waiting\",\n content: \"Creating CustomerRegistration panel\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const chatTranslations: ChatTranslations = {\n accessibleName: {\n clearChat: \"Clear chat\",\n copyMessageContent: \"Copy assistant content\",\n downloadCodeButton: \"Download code\",\n sendButton: \"Send\",\n sendInput: \"Message\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n },\n placeholder: {\n sendInput: \"Ask me a question...\"\n },\n text: {\n copyCodeButton: \"Copy code\",\n copyMessageContent: \"Copy\",\n downloadCodeButton: \"Download\",\n processing: `Processing...`,\n sourceFiles: \"Source files:\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n }\n};\n\n// All messages\n\nexport const allMessagesModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content:\n \"Generate a web form for customer registration with fields for name, email, phone, and address. Include validation, save the data to the database, and show a confirmation message after submission.\",\n metadata: null\n },\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"I’ve created the basic structure for the registration form, but I need a bit more info: Should the address include city, state, and ZIP? Do you want a separate confirmation page or just a message on the same screen? Any specific format or validation for the phone number?\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration panel was created with warnings: The “Phone” field uses a generic character format—consider a phone mask. No address validation rules applied.The data is still saved correctly, and the panel works as expected.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n },\n {\n id: \"1\",\n role: \"error\",\n content:\n \"Sorry, I couldn't generate the requested form. Reason: The “Customer” transaction does not exist in the current Knowledge Base. Please create the “Customer” object or check if it’s named differently.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"5\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Your information has been saved successfully, and all changes are now reflected in your account. You can continue with the next steps or return to the dashboard at any time.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"15:00\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n }\n];\n\n// - - - - - - - - - - - - - -\n// Other messages\n// - - - - - - - - - - - - - -\n\nexport const ASSISTANT_RESPONSE_MARKDOWN = `\n###### Code block {#code-block}\nTo create code blocks, you’ll use three backticks (\\` \\`\\`\\` \\`) or three tildes (\\`~~~\\`) on the lines before and after the code block.\n\n\\`\\`\\`\n{\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n}\n\\`\\`\\`\n\nAnother way to create code blocks is to indent every line of the block by at least four spaces or one tab.\n\n <html>\n <head>\n </head>\n </html>\n\n\n###### Syntax Highlighting {#syntax-highlighting}\nThis feature allows you to add color highlighting for whatever language your code was written in.\nTo add syntax highlighting, specify a language next to the backticks before the fenced code block.\n\n\\`\\`\\`json\n{\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n}\n\\`\\`\\`\n\n\\`\\`\\`javascript\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport Markdown from 'react-markdown'\nimport rehypeHighlight from 'rehype-highlight'\n\nconst markdown = \\`\n# Your markdown here\n\\`\n\nReactDOM.render(\n <Markdown rehypePlugins={[rehypeHighlight]}>{markdown}</Markdown>,\n document.querySelector('#content')\n)\n\\`\\`\\`\n\n###### Horizontal Rules {#horizontal-rules}\nTo create a horizontal rule, use three or more asterisks (\\`***\\`), dashes (\\`---\\`), or underscores (\\`___\\`) on a line by themselves.\n`;\n\nexport const chatRecord: ChatMessage[] = [\n { id: \"1\", role: \"user\", content: \"Hello world\" },\n { id: \"2\", role: \"assistant\", content: ASSISTANT_RESPONSE_MARKDOWN },\n { id: \"3\", role: \"user\", content: \"Hello world 1\" },\n { id: \"4\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"5\", role: \"user\", content: \"Hello world 2\" },\n { id: \"6\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"7\", role: \"user\", content: \"Hello world 3\" },\n { id: \"8\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"9\", role: \"user\", content: \"Hello world 4\" },\n { id: \"10\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN }\n];\n\nexport const longChatRecord: ChatMessage[] = Array.from(\n { length: 40 },\n (_, index) =>\n index % 2 === 0\n ? {\n id: `index: ${index}`,\n role: \"user\",\n content:\n `index: ${index}` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n : {\n id: `index: ${index}`,\n role: \"assistant\",\n content:\n ASSISTANT_RESPONSE_SHORT_MARKDOWN +\n `\\nindex: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n);\n\nexport const codeFixerRecord: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content: \"Please give me an example about...\",\n metadata: \"14:55\"\n },\n {\n id: \"2\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Action required example. Action required example. Action required example.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"3\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Some fields contain missing or invalid data, which may prevent the process from completing correctly. Review your input carefully and make any necessary corrections before continuing.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n },\n {\n id: \"4\",\n role: \"error\",\n content:\n \"An unexpected error occurred while processing your request, and the operation couldn’t be completed.Please check your internet connection or try again later. If the problem persists, contact support.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"5\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Your information has been saved successfully, and all changes are now reflected in your account. You can continue with the next steps or return to the dashboard at any time.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n },\n {\n id: \"6\",\n role: \"user\",\n content:\n \"Implement the function calculate_average_grade in grades.py that takes a list of grades as input and returns the average grade as a floating-point number\",\n metadata: \"15:00\"\n },\n {\n id: \"7\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"You can provide further details or updates regarding your support ticket and its associated code. Your input here helps us better understand and address your issue effectively.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"8\",\n role: \"assistant\",\n status: \"waiting\",\n content: \"You can provide further details or updates\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"9\",\n role: \"assistant\",\n status: \"complete\",\n content: ASSISTANT_RESPONSE_SHORT_MARKDOWN,\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n","import {\n ChatCallbacks,\n ChatTranslations\n} from \"@genexus/chameleon-controls-library\";\nimport { ChatMessageFile } from \"@genexus/chameleon-controls-library/dist/types/components/chat/types\";\n\nimport { ASSISTANT_RESPONSE_MARKDOWN } from \"./models\";\n\nimport { ASSISTANT_NAME } from \"./models\";\nimport { MercuryChatMessageMetadata } from \"../../components/chat/lit-custom-render/types\";\n\nconst PROCESSING_PLACEHOLDER = \"{{ASSISTANT_NAME}}\";\n\nconst sendChatMessages = (chatRef: HTMLChChatElement) => () => {\n chatRef.generatingResponse = true;\n\n chatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n });\n\n setTimeout(() => {\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Processing with Chat with LLMs\",\n status: \"waiting\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n \"replace\"\n );\n\n setTimeout(() => {\n dummyStreaming(chatRef, 20, ASSISTANT_RESPONSE_MARKDOWN, \"replace\");\n }, 2000);\n }, 2000);\n};\n\nconst stopGeneratingAnswer = (): Promise<void> => {\n console.log(\"stop generating answer\");\n return new Promise<void>(resolve => {\n // Lógica asincrónica aquí si es necesario\n resolve();\n });\n};\n\nexport const chatCallbacksWithChatRef = (\n chChatRef: HTMLChChatElement\n): ChatCallbacks => {\n return {\n sendChatMessages: sendChatMessages(chChatRef),\n uploadFile: (file: File) =>\n new Promise<ChatMessageFile>(() => {\n console.log(\"file\", file);\n\n return Promise.resolve({\n url: \"Error\",\n mimeType: \"application/javascript\"\n } satisfies ChatMessageFile);\n }),\n stopGeneratingAnswer: stopGeneratingAnswer\n };\n};\n\nfunction dummyStreaming(\n chatRef: HTMLChChatElement,\n counter: number,\n stringToDisplay: string,\n mode: \"concat\" | \"replace\"\n) {\n setTimeout(\n () => {\n const streamingCompleted = counter >= stringToDisplay.length;\n\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: stringToDisplay.substring(counter - 20, counter),\n\n // {\n // message: stringToDisplay.substring(counter - 20, counter),\n // files: streamingCompleted\n // ? [\n // {\n // url: \"https://next.genexus.ai\",\n // caption: \"Mars Exploration Contract\"\n // },\n // {\n // url: \"https://gx-chameleon.netlify.app\",\n // caption: \"Venus Exploration Contract\"\n // }\n // ]\n // : undefined\n // },\n status: streamingCompleted ? \"complete\" : \"streaming\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n mode\n );\n\n if (!streamingCompleted) {\n dummyStreaming(chatRef, counter + 20, stringToDisplay, \"concat\");\n } else {\n chatRef.generatingResponse = false;\n }\n },\n counter % 200 === 0 ? 50 : 40\n );\n}\n\nexport const chatTranslations: ChatTranslations = {\n accessibleName: {\n clearChat: \"Clear chat\",\n copyMessageContent: \"Copy message\",\n downloadCodeButton: \"Download code\",\n sendButton: \"Send\",\n sendInput: \"Message\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n },\n placeholder: {\n sendInput: \"Ask me a question...\"\n },\n text: {\n copyCodeButton: \"Copy code\",\n copyMessageContent: \"Copy message content\",\n downloadCodeButton: \"Download code\",\n processing: `Processing with ${PROCESSING_PLACEHOLDER}`,\n sourceFiles: \"Source files:\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n }\n};\n",":host {\n block-size: 100%;\n display: grid;\n}\n","import { Component, Host, h, State, Prop, Method } from \"@stencil/core\";\nimport { MercuryBundles } from \"@genexus/mercury\";\nimport { renderItemMercury } from \"../../components/chat/lit-custom-render/render-item.lit\";\nimport { codeFixerRecord } from \"./models\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/elevation\",\n \"components/chat-lit\",\n \"components/markdown-viewer\"\n];\n\nimport { chatCallbacksWithChatRef, chatTranslations } from \"./callbacks\";\nimport {\n ChatMessage,\n ChatCallbacks\n} from \"@genexus/chameleon-controls-library\";\nimport { ChatMessageUser } from \"@genexus/chameleon-controls-library/dist/types/components/chat/types\";\n\n@Component({\n tag: \"gx-ide-sc-chat-container\",\n styleUrl: \"chat-showcase.scss\",\n shadow: true\n})\nexport class GxIdeScChatContainer {\n #chatContainerRef!: HTMLGxIdeChatContainerElement;\n #chatWelcomeRef!: HTMLGxIdeChatWelcomeElement;\n #chChatRef!: HTMLChChatElement;\n #chatCallbacks: ChatCallbacks;\n\n /**\n * If true, the chat items length will be 0, since this is a requirement for dipslaying the ch-chat\n * \"empty-chat\" slot that welcome screen uses to display.\n */\n @Prop() readonly mode: \"welcome\" | \"messages-sample\" | \"empty\" =\n \"messages-sample\";\n\n @State() generatingResponse: boolean = false;\n @State() loadingState:\n | \"all-records-loaded\"\n | \"initial\"\n | \"loading\"\n | \"more-data-to-fetch\" = \"all-records-loaded\";\n @State() showAdditionalContent: boolean = false;\n @State() conversationCopied: boolean = false;\n @State() assistantStatus: string = \"Getting Data\";\n @State() chatItems: ChatMessage[] = [];\n\n /**\n * It will exit the wellcome screen and remove it from the dom.\n */\n @Method()\n async exitWelcome() {\n // hand exitWelcome to gx-ide-chat-welcome\n this.#chatWelcomeRef.exitWelcome();\n }\n\n #copyConversationCallbackHandler = () => {\n this.#chatContainerRef.showCopyConversationMessage();\n };\n\n #deleteConversationCallbackHandler = () => {};\n\n componentDidLoad() {\n setTimeout(() => {\n this.assistantStatus = \"Creating Data Base..\";\n }, 1000);\n }\n\n componentDidRender() {\n if (!this.#chatCallbacks && this.#chChatRef) {\n this.#chatCallbacks = chatCallbacksWithChatRef(this.#chChatRef);\n }\n }\n\n async componentWillLoad() {\n if (this.mode === \"messages-sample\") {\n this.chatItems = codeFixerRecord;\n } else if (this.mode === \"welcome\") {\n this.chatItems = [];\n } else if (this.mode === \"empty\") {\n this.chatItems = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content: \"Hello! I am your assistant.\",\n metadata: \"14:56\"\n }\n ];\n }\n }\n #suggestedPrompRequestedCallbackHandler = async (\n prompt: string\n ): Promise<void> => {\n let assistantFinalResponse: string;\n if (prompt.toLowerCase().includes(\"transaction\")) {\n assistantFinalResponse =\n 'To create a transaction in GeneXus, start by opening your KB (Knowledge Base) and selecting \"Transaction\" from the \"New Object\" options. Give it a name and define its attributes, starting with a primary key followed by the related data fields. GeneXus will automatically infer the data structure and relationships based on how you define the attributes and their nesting. Once saved, it generates the necessary database tables and forms for inserting, updating, and deleting records. You can then run the application to test the transaction directly in your browser.';\n } else if (prompt.toLowerCase().includes(\"entity\")) {\n assistantFinalResponse =\n 'In GeneXus, creating an entity usually means defining a Transaction object that represents a real-world concept like \"Customer\" or \"Product.\" To do this, create a new Transaction, name it after the entity, and define its attributes—starting with a unique identifier (like CustomerId) and then adding other fields (like CustomerName, CustomerEmail). GeneXus treats this Transaction as an entity and uses it to generate the corresponding table and interface automatically.';\n } else {\n assistantFinalResponse =\n \"Sorry, I didn’t catch that—mind rephrasing it? 😅\";\n }\n\n const userPrompt: ChatMessageUser = {\n id: \"1\",\n role: \"user\",\n content: prompt\n };\n this.#chChatRef.addNewMessage(userPrompt);\n setTimeout(() => {\n this.#chChatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\"\n });\n setTimeout(() => {\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Processing with Chat with LLMs\",\n status: \"waiting\"\n },\n \"replace\"\n );\n setTimeout(() => {\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Getting information\",\n status: \"waiting\"\n },\n \"replace\"\n );\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: assistantFinalResponse,\n status: \"complete\"\n },\n \"replace\"\n );\n }, 1500);\n }, 1500);\n }, 100);\n };\n\n render() {\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <gx-ide-chat-container\n chatTitle=\"GeneXus Assistant\"\n copyConversationCallback={this.#copyConversationCallbackHandler}\n deleteConversationCallback={this.#deleteConversationCallbackHandler}\n ref={el =>\n (this.#chatContainerRef = el as HTMLGxIdeChatContainerElement)\n }\n class=\"elevation-1\"\n >\n <ch-chat\n callbacks={this.#chatCallbacks}\n class=\"chat-lit\"\n generatingResponse={this.generatingResponse}\n loadingState={this.loadingState} // \"all-records-loaded\" to display the welcome screen\n renderItem={renderItemMercury}\n items={this.chatItems} // length 0 to display the welcome screen\n showAdditionalContent={this.showAdditionalContent}\n translations={chatTranslations}\n ref={(el: HTMLChChatElement) =>\n (this.#chChatRef = el as HTMLChChatElement)\n }\n markdownTheme=\"components/markdown-viewer\"\n >\n <gx-ide-chat-welcome\n ref={el =>\n (this.#chatWelcomeRef = el as HTMLGxIdeChatWelcomeElement)\n }\n slot=\"empty-chat\"\n suggestedPrompRequestedCallback={\n this.#suggestedPrompRequestedCallbackHandler\n }\n ></gx-ide-chat-welcome>\n <div slot=\"additional-content\">\n Custom content that is rendered when the chat renders content\n </div>\n </ch-chat>\n </gx-ide-chat-container>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"gx-ide-sc-chat-container.entry.cjs.js","mappings":";;;;;;;AAOO,MAAM,iCAAiC,GAC5C,iPAAiP,CAAC;AAE7O,MAAM,cAAc,GAAG,MAAM,CAAC;AAqKrC;AACA;AACA;AAEO,MAAM,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkD1C,CAAC;AAe2C,KAAK,CAAC,IAAI,CACrD,EAAE,MAAM,EAAE,EAAE,EAAE,EACd,CAAC,CAAC,EAAE,KAAK,KACP,KAAK,GAAG,CAAC,KAAK,CAAC;MACX;QACE,EAAE,EAAE,UAAU,KAAK,EAAE;QACrB,IAAI,EAAE,MAAM;QACZ,OAAO,EACL,UAAU,KAAK,EAAE;YACjB,UAAU,KAAK,IAAI;YACnB,UAAU,KAAK,IAAI;YACnB,UAAU,KAAK,IAAI;YACnB,UAAU,KAAK,IAAI;YACnB,UAAU,KAAK,IAAI;YACnB,UAAU,KAAK,IAAI;KACtB;MACD;QACE,EAAE,EAAE,UAAU,KAAK,EAAE;QACrB,IAAI,EAAE,WAAW;QACjB,OAAO,EACL,iCAAiC;YACjC,YAAY,KAAK,I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,EACjD,YAAY,EAAE,gBAAgB,EAC9B,GAAG,EAAE,CAAC,EAAqB,MACxB,uBAAA,IAAI,mCAAc,EAAuB,MAAA,CAAC,EAE7C,aAAa,EAAC,4BAA4B,IAE1CF,iCACE,GAAG,EAAE,EAAE,KACJ,uBAAA,IAAI,wCAAmB,EAAiC,MAAA,CAAC,EAE5D,IAAI,EAAC,YAAY,EACjB,+BAA+B,EAC7B,uBAAA,IAAI,oEAAwC,GAEzB,EACvBA,iBAAK,IAAI,EAAC,oBAAoB,oEAExB,CACE,CACY,CACnB,EACP;KACH;;;;;;;","names":["h","Host","renderItemMercury"],"sources":["src/showcase/chat-container/models.ts","src/showcase/chat-container/callbacks.ts","src/showcase/chat-container/chat-showcase.scss?tag=gx-ide-sc-chat-container&encapsulation=shadow","src/showcase/chat-container/chat.showcase.tsx"],"sourcesContent":["import type {\n ChatMessage,\n ChatTranslations\n} from \"@genexus/chameleon-controls-library\";\n\nimport { MercuryChatMessageMetadata } from \"../../components/chat/lit-custom-render/types\";\n\nexport const ASSISTANT_RESPONSE_SHORT_MARKDOWN =\n '\\n### Code block {#code-block}\\nTo create code blocks, you’ll use three backticks (` ``` `) or three tildes (`~~~`) on the lines before and after the code block.\\n\\n```json\\n{\\n \"firstName\": \"John\",\\n \"lastName\": \"Smith\",\\n \"age\": 25\\n}';\n\nexport const ASSISTANT_NAME = \"Nexa\";\n\n// - - - - - - - - - - - - - -\n// Types of messages\n// - - - - - - - - - - - - - -\n\nexport const userMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content:\n \"Generate a web form for customer registration with fields for name, email, phone, and address. Include validation, save the data to the database, and show a confirmation message after submission.\",\n metadata: null\n }\n];\n\nexport const assistantMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"I’ve created the basic structure for the registration form, but I need a bit more info: Should the address include city, state, and ZIP? Do you want a separate confirmation page or just a message on the same screen? Any specific format or validation for the phone number?\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const assistantMessageWarningChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration panel was created with warnings: The “Phone” field uses a generic character format—consider a phone mask. No address validation rules applied.The data is still saved correctly, and the panel works as expected.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n }\n];\n\nexport const assistantMessageSuccessChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration web panel was created successfully. Fields: Name, Email, Phone, Address. Validations applied (required, email format). Data saved to “Customer” transaction. Confirmation message shown after submit. Let me know if you'd like to add styles or link it to another object.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n }\n];\n\nexport const errorMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"error\",\n content:\n \"Sorry, I couldn't generate the requested form. Reason: The “Customer” transaction does not exist in the current Knowledge Base. Please create the “Customer” object or check if it’s named differently.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const assistantWaitingChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"waiting\",\n content: \"Creating CustomerRegistration panel\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const chatTranslations: ChatTranslations = {\n accessibleName: {\n clearChat: \"Clear chat\",\n copyMessageContent: \"Copy assistant content\",\n downloadCodeButton: \"Download code\",\n sendButton: \"Send\",\n sendInput: \"Message\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n },\n placeholder: {\n sendInput: \"Ask me a question...\"\n },\n text: {\n copyCodeButton: \"Copy code\",\n copyMessageContent: \"Copy\",\n downloadCodeButton: \"Download\",\n processing: `Processing...`,\n sourceFiles: \"Source files:\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n }\n};\n\n// All messages\n\nexport const allMessagesModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content:\n \"Generate a web form for customer registration with fields for name, email, phone, and address. Include validation, save the data to the database, and show a confirmation message after submission.\",\n metadata: null\n },\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"I’ve created the basic structure for the registration form, but I need a bit more info: Should the address include city, state, and ZIP? Do you want a separate confirmation page or just a message on the same screen? Any specific format or validation for the phone number?\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration panel was created with warnings: The “Phone” field uses a generic character format—consider a phone mask. No address validation rules applied.The data is still saved correctly, and the panel works as expected.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n },\n {\n id: \"1\",\n role: \"error\",\n content:\n \"Sorry, I couldn't generate the requested form. Reason: The “Customer” transaction does not exist in the current Knowledge Base. Please create the “Customer” object or check if it’s named differently.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"5\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Your information has been saved successfully, and all changes are now reflected in your account. You can continue with the next steps or return to the dashboard at any time.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"15:00\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n }\n];\n\n// - - - - - - - - - - - - - -\n// Other messages\n// - - - - - - - - - - - - - -\n\nexport const ASSISTANT_RESPONSE_MARKDOWN = `\n###### Code block {#code-block}\nTo create code blocks, you’ll use three backticks (\\` \\`\\`\\` \\`) or three tildes (\\`~~~\\`) on the lines before and after the code block.\n\n\\`\\`\\`\n{\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n}\n\\`\\`\\`\n\nAnother way to create code blocks is to indent every line of the block by at least four spaces or one tab.\n\n <html>\n <head>\n </head>\n </html>\n\n\n###### Syntax Highlighting {#syntax-highlighting}\nThis feature allows you to add color highlighting for whatever language your code was written in.\nTo add syntax highlighting, specify a language next to the backticks before the fenced code block.\n\n\\`\\`\\`json\n{\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n}\n\\`\\`\\`\n\n\\`\\`\\`javascript\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport Markdown from 'react-markdown'\nimport rehypeHighlight from 'rehype-highlight'\n\nconst markdown = \\`\n# Your markdown here\n\\`\n\nReactDOM.render(\n <Markdown rehypePlugins={[rehypeHighlight]}>{markdown}</Markdown>,\n document.querySelector('#content')\n)\n\\`\\`\\`\n\n###### Horizontal Rules {#horizontal-rules}\nTo create a horizontal rule, use three or more asterisks (\\`***\\`), dashes (\\`---\\`), or underscores (\\`___\\`) on a line by themselves.\n`;\n\nexport const chatRecord: ChatMessage[] = [\n { id: \"1\", role: \"user\", content: \"Hello world\" },\n { id: \"2\", role: \"assistant\", content: ASSISTANT_RESPONSE_MARKDOWN },\n { id: \"3\", role: \"user\", content: \"Hello world 1\" },\n { id: \"4\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"5\", role: \"user\", content: \"Hello world 2\" },\n { id: \"6\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"7\", role: \"user\", content: \"Hello world 3\" },\n { id: \"8\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"9\", role: \"user\", content: \"Hello world 4\" },\n { id: \"10\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN }\n];\n\nexport const longChatRecord: ChatMessage[] = Array.from(\n { length: 40 },\n (_, index) =>\n index % 2 === 0\n ? {\n id: `index: ${index}`,\n role: \"user\",\n content:\n `index: ${index}` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n : {\n id: `index: ${index}`,\n role: \"assistant\",\n content:\n ASSISTANT_RESPONSE_SHORT_MARKDOWN +\n `\\nindex: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n);\n\nexport const codeFixerRecord: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content: \"Please give me an example about...\",\n metadata: \"14:55\"\n },\n {\n id: \"2\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Action required example. Action required example. Action required example.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"3\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Some fields contain missing or invalid data, which may prevent the process from completing correctly. Review your input carefully and make any necessary corrections before continuing.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n },\n {\n id: \"4\",\n role: \"error\",\n content:\n \"An unexpected error occurred while processing your request, and the operation couldn’t be completed.Please check your internet connection or try again later. If the problem persists, contact support.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"5\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Your information has been saved successfully, and all changes are now reflected in your account. You can continue with the next steps or return to the dashboard at any time.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n },\n {\n id: \"6\",\n role: \"user\",\n content:\n \"Implement the function calculate_average_grade in grades.py that takes a list of grades as input and returns the average grade as a floating-point number\",\n metadata: \"15:00\"\n },\n {\n id: \"7\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"You can provide further details or updates regarding your support ticket and its associated code. Your input here helps us better understand and address your issue effectively.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"8\",\n role: \"assistant\",\n status: \"waiting\",\n content: \"You can provide further details or updates\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"9\",\n role: \"assistant\",\n status: \"complete\",\n content: ASSISTANT_RESPONSE_SHORT_MARKDOWN,\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n","import {\n ChatCallbacks,\n ChatTranslations\n} from \"@genexus/chameleon-controls-library\";\nimport { ChatMessageFile } from \"@genexus/chameleon-controls-library/dist/types/components/chat/types\";\n\nimport { ASSISTANT_RESPONSE_MARKDOWN } from \"./models\";\n\nimport { ASSISTANT_NAME } from \"./models\";\nimport { MercuryChatMessageMetadata } from \"../../components/chat/lit-custom-render/types\";\n\nconst PROCESSING_PLACEHOLDER = \"{{ASSISTANT_NAME}}\";\n\nconst sendChatMessages = (chatRef: HTMLChChatElement) => () => {\n chatRef.generatingResponse = true;\n\n chatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n });\n\n setTimeout(() => {\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Processing with Chat with LLMs\",\n status: \"waiting\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n \"replace\"\n );\n\n setTimeout(() => {\n dummyStreaming(chatRef, 20, ASSISTANT_RESPONSE_MARKDOWN, \"replace\");\n }, 2000);\n }, 2000);\n};\n\nconst stopGeneratingAnswer = (): Promise<void> => {\n console.log(\"stop generating answer\");\n return new Promise<void>(resolve => {\n // Lógica asincrónica aquí si es necesario\n resolve();\n });\n};\n\nexport const chatCallbacksWithChatRef = (\n chChatRef: HTMLChChatElement\n): ChatCallbacks => {\n return {\n sendChatMessages: sendChatMessages(chChatRef),\n uploadFile: (file: File) =>\n new Promise<ChatMessageFile>(() => {\n console.log(\"file\", file);\n\n return Promise.resolve({\n url: \"Error\",\n mimeType: \"application/javascript\"\n } satisfies ChatMessageFile);\n }),\n stopGeneratingAnswer: stopGeneratingAnswer\n };\n};\n\nfunction dummyStreaming(\n chatRef: HTMLChChatElement,\n counter: number,\n stringToDisplay: string,\n mode: \"concat\" | \"replace\"\n) {\n setTimeout(\n () => {\n const streamingCompleted = counter >= stringToDisplay.length;\n\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: stringToDisplay.substring(counter - 20, counter),\n\n // {\n // message: stringToDisplay.substring(counter - 20, counter),\n // files: streamingCompleted\n // ? [\n // {\n // url: \"https://next.genexus.ai\",\n // caption: \"Mars Exploration Contract\"\n // },\n // {\n // url: \"https://gx-chameleon.netlify.app\",\n // caption: \"Venus Exploration Contract\"\n // }\n // ]\n // : undefined\n // },\n status: streamingCompleted ? \"complete\" : \"streaming\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n mode\n );\n\n if (!streamingCompleted) {\n dummyStreaming(chatRef, counter + 20, stringToDisplay, \"concat\");\n } else {\n chatRef.generatingResponse = false;\n }\n },\n counter % 200 === 0 ? 50 : 40\n );\n}\n\nexport const chatTranslations: ChatTranslations = {\n accessibleName: {\n clearChat: \"Clear chat\",\n copyMessageContent: \"Copy message\",\n downloadCodeButton: \"Download code\",\n sendButton: \"Send\",\n sendInput: \"Message\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n },\n placeholder: {\n sendInput: \"Ask me a question...\"\n },\n text: {\n copyCodeButton: \"Copy code\",\n copyMessageContent: \"Copy message content\",\n downloadCodeButton: \"Download code\",\n processing: `Processing with ${PROCESSING_PLACEHOLDER}`,\n sourceFiles: \"Source files:\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n }\n};\n",":host {\n block-size: 100%;\n display: grid;\n}\n","import { Component, Host, h, State, Prop, Method } from \"@stencil/core\";\nimport { renderItemMercury } from \"../../components/chat/lit-custom-render/render-item.lit\";\nimport { codeFixerRecord } from \"./models\";\n\n// TODO: Add back \"components/chat-lit\" once chat bundle for lit is ready\n// on a new Mercury version\nconst CSS_BUNDLES = [\n \"resets/box-sizing\",\n \"utils/elevation\",\n \"components/markdown-viewer\"\n];\n\nimport { chatCallbacksWithChatRef, chatTranslations } from \"./callbacks\";\nimport {\n ChatMessage,\n ChatCallbacks\n} from \"@genexus/chameleon-controls-library\";\nimport { ChatMessageUser } from \"@genexus/chameleon-controls-library/dist/types/components/chat/types\";\n\n@Component({\n tag: \"gx-ide-sc-chat-container\",\n styleUrl: \"chat-showcase.scss\",\n shadow: true\n})\nexport class GxIdeScChatContainer {\n #chatContainerRef!: HTMLGxIdeChatContainerElement;\n #chatWelcomeRef!: HTMLGxIdeChatWelcomeElement;\n #chChatRef!: HTMLChChatElement;\n #chatCallbacks: ChatCallbacks;\n\n /**\n * If true, the chat items length will be 0, since this is a requirement for dipslaying the ch-chat\n * \"empty-chat\" slot that welcome screen uses to display.\n */\n @Prop() readonly mode: \"welcome\" | \"messages-sample\" | \"empty\" =\n \"messages-sample\";\n\n @State() generatingResponse: boolean = false;\n @State() loadingState:\n | \"all-records-loaded\"\n | \"initial\"\n | \"loading\"\n | \"more-data-to-fetch\" = \"all-records-loaded\";\n @State() showAdditionalContent: boolean = false;\n @State() conversationCopied: boolean = false;\n @State() assistantStatus: string = \"Getting Data\";\n @State() chatItems: ChatMessage[] = [];\n\n /**\n * It will exit the wellcome screen and remove it from the dom.\n */\n @Method()\n async exitWelcome() {\n // hand exitWelcome to gx-ide-chat-welcome\n this.#chatWelcomeRef.exitWelcome();\n }\n\n #copyConversationCallbackHandler = () => {\n this.#chatContainerRef.showCopyConversationMessage();\n };\n\n #deleteConversationCallbackHandler = () => {};\n\n componentDidLoad() {\n setTimeout(() => {\n this.assistantStatus = \"Creating Data Base..\";\n }, 1000);\n }\n\n componentDidRender() {\n if (!this.#chatCallbacks && this.#chChatRef) {\n this.#chatCallbacks = chatCallbacksWithChatRef(this.#chChatRef);\n }\n }\n\n async componentWillLoad() {\n if (this.mode === \"messages-sample\") {\n this.chatItems = codeFixerRecord;\n } else if (this.mode === \"welcome\") {\n this.chatItems = [];\n } else if (this.mode === \"empty\") {\n this.chatItems = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content: \"Hello! I am your assistant.\",\n metadata: \"14:56\"\n }\n ];\n }\n }\n #suggestedPrompRequestedCallbackHandler = async (\n prompt: string\n ): Promise<void> => {\n let assistantFinalResponse: string;\n if (prompt.toLowerCase().includes(\"transaction\")) {\n assistantFinalResponse =\n 'To create a transaction in GeneXus, start by opening your KB (Knowledge Base) and selecting \"Transaction\" from the \"New Object\" options. Give it a name and define its attributes, starting with a primary key followed by the related data fields. GeneXus will automatically infer the data structure and relationships based on how you define the attributes and their nesting. Once saved, it generates the necessary database tables and forms for inserting, updating, and deleting records. You can then run the application to test the transaction directly in your browser.';\n } else if (prompt.toLowerCase().includes(\"entity\")) {\n assistantFinalResponse =\n 'In GeneXus, creating an entity usually means defining a Transaction object that represents a real-world concept like \"Customer\" or \"Product.\" To do this, create a new Transaction, name it after the entity, and define its attributes—starting with a unique identifier (like CustomerId) and then adding other fields (like CustomerName, CustomerEmail). GeneXus treats this Transaction as an entity and uses it to generate the corresponding table and interface automatically.';\n } else {\n assistantFinalResponse =\n \"Sorry, I didn’t catch that—mind rephrasing it? 😅\";\n }\n\n const userPrompt: ChatMessageUser = {\n id: \"1\",\n role: \"user\",\n content: prompt\n };\n this.#chChatRef.addNewMessage(userPrompt);\n setTimeout(() => {\n this.#chChatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\"\n });\n setTimeout(() => {\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Processing with Chat with LLMs\",\n status: \"waiting\"\n },\n \"replace\"\n );\n setTimeout(() => {\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Getting information\",\n status: \"waiting\"\n },\n \"replace\"\n );\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: assistantFinalResponse,\n status: \"complete\"\n },\n \"replace\"\n );\n }, 1500);\n }, 1500);\n }, 100);\n };\n\n render() {\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <gx-ide-chat-container\n chatTitle=\"GeneXus Assistant\"\n copyConversationCallback={this.#copyConversationCallbackHandler}\n deleteConversationCallback={this.#deleteConversationCallbackHandler}\n ref={el =>\n (this.#chatContainerRef = el as HTMLGxIdeChatContainerElement)\n }\n class=\"elevation-1\"\n >\n <ch-chat\n callbacks={this.#chatCallbacks}\n class=\"chat-lit\"\n generatingResponse={this.generatingResponse}\n loadingState={this.loadingState} // \"all-records-loaded\" to display the welcome screen\n renderItem={renderItemMercury}\n items={this.chatItems} // length 0 to display the welcome screen\n showAdditionalContent={this.showAdditionalContent}\n translations={chatTranslations}\n ref={(el: HTMLChChatElement) =>\n (this.#chChatRef = el as HTMLChChatElement)\n }\n markdownTheme=\"components/markdown-viewer\"\n >\n <gx-ide-chat-welcome\n ref={el =>\n (this.#chatWelcomeRef = el as HTMLGxIdeChatWelcomeElement)\n }\n slot=\"empty-chat\"\n suggestedPrompRequestedCallback={\n this.#suggestedPrompRequestedCallbackHandler\n }\n ></gx-ide-chat-welcome>\n <div slot=\"additional-content\">\n Custom content that is rendered when the chat renders content\n </div>\n </ch-chat>\n </gx-ide-chat-container>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -15,7 +15,7 @@ const mapTeamsToComboBoxItemModel = (teams) => {
|
|
|
15
15
|
}));
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const signInTeamCss = ":host {\n display: grid;\n container-type: inline-size;\n container-name: host-container;\n block-size: 100%;\n inline-size: 100%;\n align-items: center;\n justify-content: center;\n
|
|
18
|
+
const signInTeamCss = ":host {\n display: grid;\n container-type: inline-size;\n container-name: host-container;\n block-size: 100%;\n inline-size: 100%;\n align-items: center;\n justify-content: center;\n}\n\n.slide {\n display: grid;\n grid-template-columns: 1fr 1fr;\n block-size: 100%;\n max-block-size: 700px;\n max-inline-size: 1100px;\n background-color: var(--mer-surface__elevation--01);\n border-radius: var(--dialog-border-radius, var(--mer-spacing--md));\n overflow: hidden;\n}\n.slide__illustration {\n overflow: hidden;\n object-fit: cover;\n object-position: left;\n block-size: 100%;\n inline-size: 100%;\n}\n.slide__main {\n display: grid;\n block-size: 100%;\n inline-size: 100%;\n padding: var(--mer-spacing--3xl);\n transform: translateY(var(--mer-spacing--2xs));\n transition: var(--switch-step-transtion-time) all;\n opacity: 0;\n}\n.slide__main--visible {\n transform: translateY(0);\n opacity: 1;\n}\n.slide__main-container {\n display: grid;\n place-self: center;\n gap: var(--mer-spacing--lg);\n max-inline-size: 480px;\n}\n.slide__main-header {\n display: grid;\n gap: var(--mer-spacing--lg);\n}\n.slide__main-title {\n display: flex;\n flex-direction: column;\n font-size: var(--mer-font__size--xl);\n font-weight: var(--mer-font__weight--semi-bold);\n letter-spacing: 0.02em;\n color: var(--mer-text__on-surface);\n}\n.slide__main-description {\n display: grid;\n gap: var(--mer-spacing--2xl);\n font-size: var(--mer-font__size--sm);\n font-weight: var(--mer-font__weight--light);\n line-height: var(--mer-line-height--spaced);\n color: var(--mer-text__complementary);\n max-inline-size: 370px;\n}\n\n.teams-list {\n inline-size: 100%;\n max-inline-size: 400px;\n}\n\n.main-btn {\n inline-size: 100%;\n max-inline-size: 124px;\n}\n\n@container host-container (max-width: 768px) {\n .slide {\n grid-template-columns: 1fr 2fr;\n }\n}\n@container host-container (max-width: 640px) {\n .slide {\n grid-template-columns: 1fr 5fr;\n }\n}\n.hyperlink {\n text-decoration: underline;\n cursor: pointer;\n}\n\n.field-inline > .label-agreement {\n margin-block-start: 0 !important;\n}";
|
|
19
19
|
|
|
20
20
|
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
21
21
|
if (kind === "a" && !f)
|