import { FormSubmitResult, GxOption } from "../../common/types"; import { ControlValidation } from "../../common/form-validation"; import { ComboBoxModel } from "@genexus/chameleon-controls-library"; export declare class GxIdeNewKb { #private; el: HTMLGxIdeNewKbElement; advancedTabIsVisible: boolean; loadingAdvancedTab: boolean; browseForMoreDialogOpen: boolean; databaseNameValue: string; /** * Allows selecting multiple generators for the front end * TODO: Check if this property can be deleted, since we can call getFrontEndsCallback. */ frontEnds: GxOption[]; /** * True when front ends are available but none is selected, meaning the KB * will be generated as backend only. Drives the backend-only callout. */ noFrontEndSelected: boolean; validatableControls: Map; connectionStatus: "connecting" | "success" | "failed" | undefined; userNameValue: string; passwordValue: string; authenticationTypes: GxOption[]; watchAuthenticationTypes(newValue: GxOption[]): void; authenticationTypesComboBoxModel: ComboBoxModel; authenticationTypeValue: string; collations: GxOption[]; watchCollations(newValue: GxOption[]): void; collationsComboBoxModel: ComboBoxModel; defaultCollation: string; defaultDataSourcesComboBoxModel: ComboBoxModel; prototypingTargetsComboBoxModel: ComboBoxModel; prototypingTargetsInitialValue: string; prototypingEnvironmentsComboBoxModel: ComboBoxModel; prototypingEnvironmentsInitialValue: string; serverInstances: GxOption[]; watchServerInstances(newValue: GxOption[]): void; serverInstancesComboBoxModel: ComboBoxModel; serverNameValue: string; userInterfaceLanguagesComboBoxModel: ComboBoxModel; userInterfaceLanguagesInitialValue: string; selectedTab: string; /** * Callback invoked when the user wants to cancel KB creation (‘Cancel’ button) */ readonly cancelCallback: CancelCallback; /** * Specifies whether the location field (and its folder-picker button) is * shown in the header, allowing the user to override the default `kbLocation` * path. Independent from `isAdvanced`. */ readonly canSetLocation: boolean; /** * Callback invoked when the advanced tab is selected for the first time. * Returns the data needed to populate the advanced tab fields lazily, * avoiding unnecessary loading at component initialization. */ readonly getAdvancedTabDataCallback: GetAdvancedTabDataCallback; /** * Callback that will be invoked when the user confirms KB creation (‘Create’ button) */ readonly createCallback: CreateCallback; /** * It allows defining whether the option to create the data files in the KB folder will be shown in the advanced tab */ createDataFilesInKBFolder: boolean; /** * Name of the database where we are going to persist the information of our KB */ readonly databaseName: string; /** * It allows defining the DBMS that will be used in the solution */ defaultDataSources: GxOption[]; watchDefaultDataSources(newValue: GxOption[]): void; /** * Callback invoked when the user wants to cancel KB creation (‘Cancel’ button) */ readonly getDataSourcesCallback: GetDataSourcesCallback; /** * Callback invoked when the user changes the prototyping environment, allowing for the modification of the list of front ends */ readonly getFrontEndsCallback: GetFrontEndsCallback; /** * Callback invoked when the user changes the prototyping target id, allowing for the modification of the list of prototyping environments */ readonly getPrototypingEnvironmentsCallback: GetPrototypingEnvironmentsCallback; /** * Specify whether it is feasible to display information related to local configuration parameters */ readonly isAdvanced = false; /** * Default suggested path to a directory where the information related to the KB will be stored/generated */ kbLocation: string; /** * The knowledge base default suggested name */ readonly kbName: string; /** * Password for the database connection. Visible if the Authentication Type is different from Windows Authentication (first item of the combo) */ readonly password: string; /** * It allows selecting the default environment that the KB will have (additional environments can be created later) */ defaultPrototypingEnvironments: GxOption[]; watchDefaultPrototypingEnvironments(newValue: GxOption[]): void; /** * Path to a directory where the information related to the KB will be stored/generated */ readonly prototypingTargets: GxOption[]; watchPrototypingTargets(newValue: GxOption[]): void; /** * Visible if something other than Windows Authentication is selected */ readonly savePassword: boolean; /** * This is a function provided by the developer that returns a string, with the location path */ readonly selectLocationCallback: SelectLocationCallback; /** * Callback invoked when the user clicks the "Browse for more..." button next * to the Server Name combo. The host is expected to display its own server * picker UI and resolve with the name of the selected server instance, which * will be set as the value of the Server Name combo. */ readonly browseForMoreCallback: BrowseForMoreCallback; /** * Callback invoked when the user selects a different server instance, * allowing the host to fetch the collations available on that instance. */ readonly getCollationsForInstanceCallback: GetCollationsForInstanceCallback; /** * Specify the language in which the application screens will be developed (default language) */ readonly userInterfaceLanguages: GxOption[]; watchUserInterfaceLanguages(newValue: GxOption[]): void; /** * Username for the database connection. Visible if the Authentication Type is different from Windows Authentication */ userName: string; componentWillLoad(): Promise; connectedCallback(): void; componentDidLoad(): void; componentDidRender(): void; /** * Suspends or reactivates the shortcuts */ suspendShortcuts(suspendShortcuts: boolean): Promise; render(): any; } export interface NewKBData { authenticationType: string; collation: string; createDataFilesInKBFolder: boolean; databaseName: string; dataSource: string; frontEnds: string[]; kbLocation: string; kbName: string; password: string; prototypingEnvironment: string; prototypingTarget: string; savePassword: boolean; serverName: string; userInterfaceLanguage: string; userName: string; creationMode: CreationMode; } export type CreationMode = "basic" | "advanced"; export type CreateCallback = (data: NewKBData) => Promise; export type CancelCallback = () => Promise; export type GetDataSourcesCallback = (selectedPrototypingEnvironmentId: string, selectedPrototypingTargetId: string) => Promise; export type GetFrontEndsCallback = (selectedPrototypingEnvironmentId: string) => Promise; export type GetPrototypingEnvironmentsCallback = (selectedPrototypingTargetId: string) => Promise; export type SelectLocationCallback = () => Promise; export type BrowseForMoreCallback = () => Promise; export type CollationsForInstanceResult = { collations: GxOption[]; defaultCollation: string; }; export type GetCollationsForInstanceCallback = (serverInstance: string, authType?: string, userName?: string, password?: string) => Promise; export interface AdvancedTabData { serverName?: string; serverInstances?: GxOption[]; collations?: GxOption[]; authenticationTypes?: GxOption[]; defaultCollation?: string; } export type GetAdvancedTabDataCallback = () => Promise;