@genexus/genexus-ide-ui 1.1.19 → 1.1.20
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/gx-ide-connect-gx-server.cjs.entry.js +8 -10
- package/dist/cjs/gx-ide-connect-gx-server.cjs.entry.js.map +1 -1
- package/dist/collection/components/team-dev/connect-gx-server/connect-gx-server.js +8 -10
- package/dist/collection/components/team-dev/connect-gx-server/connect-gx-server.js.map +1 -1
- package/dist/components/gx-ide-connect-gx-server.js +8 -10
- package/dist/components/gx-ide-connect-gx-server.js.map +1 -1
- package/dist/esm/gx-ide-connect-gx-server.entry.js +8 -10
- package/dist/esm/gx-ide-connect-gx-server.entry.js.map +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/{p-e502c2fd.entry.js → p-b822181c.entry.js} +21 -21
- package/dist/genexus-ide-ui/p-b822181c.entry.js.map +1 -0
- package/package.json +1 -1
- package/dist/genexus-ide-ui/p-e502c2fd.entry.js.map +0 -1
|
@@ -80,25 +80,23 @@ const HTMLGxIdeConnectGxServer = class {
|
|
|
80
80
|
((_c = this.validatableControls.get(controlReference.id)) === null || _c === void 0 ? void 0 : _c.message) && (index.h("ch-tooltip", { class: "tooltip", actionElement: controlReference, blockAlign: config.config.tooltipSettings.blockAlign, inlineAlign: config.config.tooltipSettings.inlineAlign, delay: config.config.tooltipSettings.delay }, this.validatableControls.get(controlReference.id).message));
|
|
81
81
|
});
|
|
82
82
|
_HTMLGxIdeConnectGxServer_init.set(this, () => {
|
|
83
|
-
var _a, _b, _c, _d, _e, _f
|
|
83
|
+
var _a, _b, _c, _d, _e, _f;
|
|
84
84
|
this.authenticationTypesChanged(this.authenticationTypes);
|
|
85
85
|
this.serverUrlsChanged(this.serverUrls);
|
|
86
86
|
// set initial values:
|
|
87
87
|
// server url
|
|
88
|
-
this.gxServerConnectionData.serverUrl =
|
|
89
|
-
((_a = this.defaultConnectionData) === null || _a === void 0 ? void 0 : _a.serverUrl) ||
|
|
90
|
-
((_b = this.serverUrlsComboBoxModel[0]) === null || _b === void 0 ? void 0 : _b.value);
|
|
88
|
+
this.gxServerConnectionData.serverUrl = "";
|
|
91
89
|
// authentication type
|
|
92
90
|
this.gxServerConnectionData.authenticationType = {
|
|
93
|
-
id: ((
|
|
94
|
-
((
|
|
95
|
-
name: ((
|
|
96
|
-
((
|
|
91
|
+
id: ((_a = this.defaultConnectionData) === null || _a === void 0 ? void 0 : _a.authenticationType.id) ||
|
|
92
|
+
((_b = this.authenticationTypesComboBoxModel[0]) === null || _b === void 0 ? void 0 : _b.value),
|
|
93
|
+
name: ((_c = this.defaultConnectionData) === null || _c === void 0 ? void 0 : _c.authenticationType.name) ||
|
|
94
|
+
((_d = this.authenticationTypesComboBoxModel[0]) === null || _d === void 0 ? void 0 : _d.caption)
|
|
97
95
|
};
|
|
98
96
|
// user name
|
|
99
|
-
this.gxServerConnectionData.userName = (
|
|
97
|
+
this.gxServerConnectionData.userName = (_e = this.defaultConnectionData) === null || _e === void 0 ? void 0 : _e.userName;
|
|
100
98
|
this.gxServerConnectionData.userPassword =
|
|
101
|
-
(
|
|
99
|
+
(_f = this.defaultConnectionData) === null || _f === void 0 ? void 0 : _f.userPassword;
|
|
102
100
|
});
|
|
103
101
|
_HTMLGxIdeConnectGxServer_initializeValidatableControls.set(this, () => {
|
|
104
102
|
// populate #controlsValidation with the controls that could have errors.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gx-ide-connect-gx-server.entry.cjs.js","mappings":";;;;;;;;;AAGO,MAAM,oCAAoC,GAAG,CAClD,mBAAyC;IAEzC,OAAO,mBAAmB,CAAC,GAAG,CAAC,kBAAkB;QAC/C,OAAO;YACL,KAAK,EAAE,kBAAkB,CAAC,EAAE;YAC5B,OAAO,EAAE,kBAAkB,CAAC,IAAI;SACjC,CAAC;KACH,CAAC,CAAC;AACL,CAAC,CAAC;AAEK,MAAM,4BAA4B,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;;YAEE,KAAK,EAAC,iCAAiC;WAEvCA,mBAAO,KAAK,EAAC,OAAO,EAAC,OAAO,EAAC,UAAU,IACpC,uBAAA,IAAI,iDAAiB,CAAC,IAAI,CAAC,aAAa,CACnC,EACRA,qBACE,IAAI,EAAC,UAAU,EACf,EAAE,EAAC,UAAU,EACb,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,MAAA,IAAI,CAAC,sBAAsB,0CAAE,YAAY,EAChD,OAAO,EAAE,uBAAA,IAAI,2DAA2B,EACxC,GAAG,EAAE,CAAC,EAAqB,MACxB,uBAAA,IAAI,yCAAgB,EAAuB,MAAA,CAAC,GAEtC,EACV,uBAAA,IAAI,uDAAuB,MAA3B,IAAI,EAAwB,uBAAA,IAAI,6CAAa,CAAC,CAC3C,CACF,EAENA,oBAAQ,KAAK,EAAC,yCAAyC,IACrDA,iBAAK,KAAK,EAAC,gBAAgB,IACzBA;;YAEE,KAAK,EAAC,kBAAkB,EACxB,OAAO,EAAE,uBAAA,IAAI,oDAAoB;WAEhC,uBAAA,IAAI,iDAAiB,CAAC,MAAM,CAAC,mBAAmB,CAC1C,EAETA;;YAEE,KAAK,EAAC,gBAAgB,EACtB,OAAO,EAAE,uBAAA,IAAI,qDAAqB;WAEjC,uBAAA,IAAI,iDAAiB,CAAC,MAAM,CAAC,oBAAoB,CAC3C,CACL,CACC,CACD,CACL,EACP;KACH;;;;;;;;;;;;;","names":["validateControls","h","config","Locale","Host"],"sources":["src/components/team-dev/connect-gx-server/helpers.ts","src/components/team-dev/connect-gx-server/connect-gx-server.scss?tag=gx-ide-connect-gx-server&encapsulation=shadow","src/components/team-dev/connect-gx-server/connect-gx-server.tsx"],"sourcesContent":["import { AuthenticationType } from \"./connect-gx-server\";\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\n\nexport const mapAuthenticationTypeToComboBoxModel = (\n authenticationTypes: AuthenticationType[]\n): ComboBoxModel => {\n return authenticationTypes.map(authenticationType => {\n return {\n value: authenticationType.id,\n caption: authenticationType.name\n };\n });\n};\n\nexport const mapServerUrlsToComboBoxModel = (\n serverUrls: string[]\n): ComboBoxModel => {\n return serverUrls.map(serverUrl => {\n return {\n value: serverUrl,\n caption: serverUrl\n };\n });\n};\n",":host {\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr max-content;\n}\n\n.main {\n display: grid;\n grid-template-areas:\n \"server-url server-url\"\n \"authentication-type .\"\n \"user-name user-password\";\n grid-auto-rows: max-content;\n grid-template-columns: 1fr 1fr;\n}\n\n.section {\n display: contents;\n}\n\n.authentication-type {\n grid-area: authentication-type;\n}\n.server-url {\n grid-area: server-url;\n}\n.user-name {\n grid-area: user-name;\n}\n.user-password {\n grid-area: user-password;\n}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n\n// Other Libraries\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\n// Custom Imports\nimport { config } from \"../../../common/config\";\nimport {\n mapAuthenticationTypeToComboBoxModel,\n mapServerUrlsToComboBoxModel\n} from \"./helpers\";\nimport { Locale } from \"../../../common/locale\";\nimport { FormSubmitResult } from \"../../../common/types\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../../common/form-validation\";\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\n@Component({\n tag: \"gx-ide-connect-gx-server\",\n styleUrl: \"connect-gx-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/connect-gx-server\"]\n})\nexport class HTMLGxIdeConnectGxServer {\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 @Element() el: HTMLGxIdeConnectGxServerElement;\n #usernameRef!: HTMLChEditElement;\n #passwordRef!: HTMLChEditElement;\n #serverUrlRef!: HTMLChComboBoxRenderElement;\n\n @State() authenticationTypesComboBoxModel: ComboBoxModel;\n @State() gxServerConnectionData: GXServerConnectionData = {\n authenticationType: {\n id: null,\n name: null\n },\n serverUrl: null,\n userName: null,\n userPassword: null\n };\n @State() serverUrlsComboBoxModel: ComboBoxModel;\n @State() validatableControls = new Map<string, ControlValidation>();\n\n /**\n * List of authentication types.\n */\n @Prop() readonly authenticationTypes!: AuthenticationType[];\n @Watch(\"authenticationTypes\")\n authenticationTypesChanged(newAuthenticationTypes: AuthenticationType[]) {\n if (newAuthenticationTypes?.length) {\n this.authenticationTypesComboBoxModel =\n mapAuthenticationTypeToComboBoxModel(newAuthenticationTypes);\n }\n }\n\n /**\n * Callback that must be invoked when the 'Cancel' button is pressed.\n */\n @Prop() readonly cancelCallback!: () => Promise<void>;\n\n /**\n * Callback that must be invoked when the 'Connect' button is pressed.\n */\n @Prop() readonly connectCallback!: (\n data: GXServerConnectionData\n ) => Promise<FormSubmitResult>;\n\n /**\n * Initial user values for the case in which the user returns to the login modal after successful authentication.\n */\n @Prop() readonly defaultConnectionData?: GXServerConnectionData;\n\n /**\n * true if the user should be allowed to manually enter a server URL.\n */\n @Prop() readonly enableCustomServer: boolean = false;\n\n /**\n * Array of cataloged server URLs to be displayed in the combo.\n */\n @Prop() readonly serverUrls: string[];\n @Watch(\"serverUrls\")\n serverUrlsChanged(newServerUrls: string[]) {\n if (newServerUrls?.length) {\n this.serverUrlsComboBoxModel =\n mapServerUrlsToComboBoxModel(newServerUrls);\n }\n }\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n\n this.#init();\n }\n\n async componentDidLoad() {\n this.#initializeValidatableControls();\n }\n\n #cancelClickHandler = () => {\n this.cancelCallback();\n };\n\n #connectClickHandler = async () => {\n this.connectCallback(this.gxServerConnectionData).then(\n (formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n }\n );\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on other dialogs 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 #init = () => {\n this.authenticationTypesChanged(this.authenticationTypes);\n this.serverUrlsChanged(this.serverUrls);\n // set initial values:\n // server url\n this.gxServerConnectionData.serverUrl =\n this.defaultConnectionData?.serverUrl ||\n this.serverUrlsComboBoxModel[0]?.value;\n // authentication type\n this.gxServerConnectionData.authenticationType = {\n id:\n (this.defaultConnectionData?.authenticationType.id as string) ||\n this.authenticationTypesComboBoxModel[0]?.value,\n name:\n (this.defaultConnectionData?.authenticationType.name as string) ||\n this.authenticationTypesComboBoxModel[0]?.caption\n };\n\n // user name\n this.gxServerConnectionData.userName = this.defaultConnectionData?.userName;\n this.gxServerConnectionData.userPassword =\n this.defaultConnectionData?.userPassword;\n };\n\n #initializeValidatableControls = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#usernameRef,\n this.#passwordRef,\n this.#serverUrlRef\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 // handlers that update this.gxServerConnectionData:\n #serverUrlInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.serverUrl = event.detail as string;\n };\n #authenticationInputEventHandler = (\n event: CustomEvent<string> | InputEvent\n ) => {\n const authenticationTypeId = event.detail as string;\n const authenticationTypeIndex = this.authenticationTypes.findIndex(\n authType => {\n return authType.id === authenticationTypeId;\n }\n );\n const authenticationTypeName =\n this.authenticationTypes[authenticationTypeIndex].name;\n\n this.gxServerConnectionData.authenticationType = {\n id: authenticationTypeId,\n name: authenticationTypeName\n };\n };\n #usernameInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userName = event.detail as string;\n };\n #passwordInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userPassword = event.detail as string;\n };\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <section class=\"section\">\n <div class=\"main field-group spacing-body\">\n <div\n // server urls\n class=\"field field-block server-url\"\n >\n <label class=\"label\" htmlFor=\"server-url\">\n {this.#componentLocale.main.serverURLLabel}\n </label>\n <ch-combo-box-render\n id=\"server-url\"\n class=\"combo-box\"\n accessibleName=\"Server Url\"\n model={this.serverUrlsComboBoxModel}\n placeholder=\"Select a server URL\"\n value={this.gxServerConnectionData?.serverUrl}\n onChange={this.#serverUrlInputEventHandler}\n suggest={this.enableCustomServer}\n suggestOptions={{\n alreadyProcessed: false,\n autoExpand: false,\n hideMatchesAndShowNonMatches: false,\n highlightMatchedItems: false,\n matchCase: false,\n regularExpression: false,\n renderActiveItemIconOnExpand: true,\n strict: false\n }}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#serverUrlRef = el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#serverUrlRef)}\n </div>\n\n <div\n // authentication types\n class=\"field field-block authentication-type\"\n >\n <label class=\"label\" htmlFor=\"authentication-type\">\n {this.#componentLocale.main.authenticationTypeLabel}\n </label>\n <ch-combo-box-render\n id=\"authentication-type\"\n class=\"combo-box\"\n accessibleName=\"Authentication Types\"\n model={this.authenticationTypesComboBoxModel}\n placeholder=\"Select an authentication type\"\n value={this.gxServerConnectionData?.authenticationType.id}\n onInput={this.#authenticationInputEventHandler}\n ></ch-combo-box-render>\n </div>\n\n <div\n // username\n class=\"field field-block user-name\"\n >\n <label class=\"label\" htmlFor=\"username\">\n {this.#componentLocale.main.usernameLabel}\n </label>\n <ch-edit\n type=\"text\"\n id=\"username\"\n class=\"input\"\n value={this.gxServerConnectionData?.userName}\n onInput={this.#usernameInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#usernameRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#usernameRef)}\n </div>\n\n <div\n // user password\n class=\"field field-block user-password\"\n >\n <label class=\"label\" htmlFor=\"password\">\n {this.#componentLocale.main.passwordLabel}\n </label>\n <ch-edit\n type=\"password\"\n id=\"password\"\n class=\"input\"\n value={this.gxServerConnectionData?.userPassword}\n onInput={this.#passwordInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#passwordRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#passwordRef)}\n </div>\n </div>\n\n <footer class=\"control-footer-with-border spacing-body\">\n <div class=\"buttons-spacer\">\n <button\n // cancel button\n class=\"button-secondary\"\n onClick={this.#cancelClickHandler}\n >\n {this.#componentLocale.footer.cancelButtonCaption}\n </button>\n\n <button\n // connect button\n class=\"button-primary\"\n onClick={this.#connectClickHandler}\n >\n {this.#componentLocale.footer.connectButtonCaption}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type GXServerConnectionData = {\n authenticationType: AuthenticationType;\n serverUrl: string;\n userName: string;\n userPassword: string;\n};\n\nexport type AuthenticationType = {\n id: string;\n name: string;\n};\n"],"version":3}
|
|
1
|
+
{"file":"gx-ide-connect-gx-server.entry.cjs.js","mappings":";;;;;;;;;AAGO,MAAM,oCAAoC,GAAG,CAClD,mBAAyC;IAEzC,OAAO,mBAAmB,CAAC,GAAG,CAAC,kBAAkB;QAC/C,OAAO;YACL,KAAK,EAAE,kBAAkB,CAAC,EAAE;YAC5B,OAAO,EAAE,kBAAkB,CAAC,IAAI;SACjC,CAA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,OAAO,EAAC,OAAO,EAAC,UAAU,IACpC,uBAAA,IAAI,iDAAiB,CAAC,IAAI,CAAC,aAAa,CACnC,EACRA,qBACE,IAAI,EAAC,UAAU,EACf,EAAE,EAAC,UAAU,EACb,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,MAAA,IAAI,CAAC,sBAAsB,0CAAE,YAAY,EAChD,OAAO,EAAE,uBAAA,IAAI,2DAA2B,EACxC,GAAG,EAAE,CAAC,EAAqB,MACxB,uBAAA,IAAI,yCAAgB,EAAuB,MAAA,CAAC,GAEtC,EACV,uBAAA,IAAI,uDAAuB,MAA3B,IAAI,EAAwB,uBAAA,IAAI,6CAAa,CAAC,CAC3C,CACF,EAENA,oBAAQ,KAAK,EAAC,yCAAyC,IACrDA,iBAAK,KAAK,EAAC,gBAAgB,IACzBA;;YAEE,KAAK,EAAC,kBAAkB,EACxB,OAAO,EAAE,uBAAA,IAAI,oDAAoB;WAEhC,uBAAA,IAAI,iDAAiB,CAAC,MAAM,CAAC,mBAAmB,CAC1C,EAETA;;YAEE,KAAK,EAAC,gBAAgB,EACtB,OAAO,EAAE,uBAAA,IAAI,qDAAqB;WAEjC,uBAAA,IAAI,iDAAiB,CAAC,MAAM,CAAC,oBAAoB,CAC3C,CACL,CACC,CACD,CACL,EACP;KACH;;;;;;;;;;;;;","names":["validateControls","h","config","Locale","Host"],"sources":["src/components/team-dev/connect-gx-server/helpers.ts","src/components/team-dev/connect-gx-server/connect-gx-server.scss?tag=gx-ide-connect-gx-server&encapsulation=shadow","src/components/team-dev/connect-gx-server/connect-gx-server.tsx"],"sourcesContent":["import { AuthenticationType } from \"./connect-gx-server\";\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\n\nexport const mapAuthenticationTypeToComboBoxModel = (\n authenticationTypes: AuthenticationType[]\n): ComboBoxModel => {\n return authenticationTypes.map(authenticationType => {\n return {\n value: authenticationType.id,\n caption: authenticationType.name\n };\n });\n};\n\nexport const mapServerUrlsToComboBoxModel = (\n serverUrls: string[]\n): ComboBoxModel => {\n return serverUrls.map(serverUrl => {\n return {\n value: serverUrl,\n caption: serverUrl\n };\n });\n};\n",":host {\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr max-content;\n}\n\n.main {\n display: grid;\n grid-template-areas:\n \"server-url server-url\"\n \"authentication-type .\"\n \"user-name user-password\";\n grid-auto-rows: max-content;\n grid-template-columns: 1fr 1fr;\n}\n\n.section {\n display: contents;\n}\n\n.authentication-type {\n grid-area: authentication-type;\n}\n.server-url {\n grid-area: server-url;\n}\n.user-name {\n grid-area: user-name;\n}\n.user-password {\n grid-area: user-password;\n}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n\n// Other Libraries\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\n// Custom Imports\nimport { config } from \"../../../common/config\";\nimport {\n mapAuthenticationTypeToComboBoxModel,\n mapServerUrlsToComboBoxModel\n} from \"./helpers\";\nimport { Locale } from \"../../../common/locale\";\nimport { FormSubmitResult } from \"../../../common/types\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../../common/form-validation\";\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\n@Component({\n tag: \"gx-ide-connect-gx-server\",\n styleUrl: \"connect-gx-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/connect-gx-server\"]\n})\nexport class HTMLGxIdeConnectGxServer {\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 @Element() el: HTMLGxIdeConnectGxServerElement;\n #usernameRef!: HTMLChEditElement;\n #passwordRef!: HTMLChEditElement;\n #serverUrlRef!: HTMLChComboBoxRenderElement;\n\n @State() authenticationTypesComboBoxModel: ComboBoxModel;\n @State() gxServerConnectionData: GXServerConnectionData = {\n authenticationType: {\n id: null,\n name: null\n },\n serverUrl: null,\n userName: null,\n userPassword: null\n };\n @State() serverUrlsComboBoxModel: ComboBoxModel;\n @State() validatableControls = new Map<string, ControlValidation>();\n\n /**\n * List of authentication types.\n */\n @Prop() readonly authenticationTypes!: AuthenticationType[];\n @Watch(\"authenticationTypes\")\n authenticationTypesChanged(newAuthenticationTypes: AuthenticationType[]) {\n if (newAuthenticationTypes?.length) {\n this.authenticationTypesComboBoxModel =\n mapAuthenticationTypeToComboBoxModel(newAuthenticationTypes);\n }\n }\n\n /**\n * Callback that must be invoked when the 'Cancel' button is pressed.\n */\n @Prop() readonly cancelCallback!: () => Promise<void>;\n\n /**\n * Callback that must be invoked when the 'Connect' button is pressed.\n */\n @Prop() readonly connectCallback!: (\n data: GXServerConnectionData\n ) => Promise<FormSubmitResult>;\n\n /**\n * Initial user values for the case in which the user returns to the login modal after successful authentication.\n */\n @Prop() readonly defaultConnectionData?: GXServerConnectionData;\n\n /**\n * true if the user should be allowed to manually enter a server URL.\n */\n @Prop() readonly enableCustomServer: boolean = false;\n\n /**\n * Array of cataloged server URLs to be displayed in the combo.\n */\n @Prop() readonly serverUrls: string[];\n @Watch(\"serverUrls\")\n serverUrlsChanged(newServerUrls: string[]) {\n if (newServerUrls?.length) {\n this.serverUrlsComboBoxModel =\n mapServerUrlsToComboBoxModel(newServerUrls);\n }\n }\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n\n this.#init();\n }\n\n async componentDidLoad() {\n this.#initializeValidatableControls();\n }\n\n #cancelClickHandler = () => {\n this.cancelCallback();\n };\n\n #connectClickHandler = async () => {\n this.connectCallback(this.gxServerConnectionData).then(\n (formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n }\n );\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on other dialogs 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 #init = () => {\n this.authenticationTypesChanged(this.authenticationTypes);\n this.serverUrlsChanged(this.serverUrls);\n // set initial values:\n // server url\n this.gxServerConnectionData.serverUrl = \"\";\n // authentication type\n this.gxServerConnectionData.authenticationType = {\n id:\n (this.defaultConnectionData?.authenticationType.id as string) ||\n this.authenticationTypesComboBoxModel[0]?.value,\n name:\n (this.defaultConnectionData?.authenticationType.name as string) ||\n this.authenticationTypesComboBoxModel[0]?.caption\n };\n\n // user name\n this.gxServerConnectionData.userName = this.defaultConnectionData?.userName;\n this.gxServerConnectionData.userPassword =\n this.defaultConnectionData?.userPassword;\n };\n\n #initializeValidatableControls = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#usernameRef,\n this.#passwordRef,\n this.#serverUrlRef\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 // handlers that update this.gxServerConnectionData:\n #serverUrlInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.serverUrl = event.detail as string;\n };\n #authenticationInputEventHandler = (\n event: CustomEvent<string> | InputEvent\n ) => {\n const authenticationTypeId = event.detail as string;\n const authenticationTypeIndex = this.authenticationTypes.findIndex(\n authType => {\n return authType.id === authenticationTypeId;\n }\n );\n const authenticationTypeName =\n this.authenticationTypes[authenticationTypeIndex].name;\n\n this.gxServerConnectionData.authenticationType = {\n id: authenticationTypeId,\n name: authenticationTypeName\n };\n };\n #usernameInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userName = event.detail as string;\n };\n #passwordInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userPassword = event.detail as string;\n };\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <section class=\"section\">\n <div class=\"main field-group spacing-body\">\n <div\n // server urls\n class=\"field field-block server-url\"\n >\n <label class=\"label\" htmlFor=\"server-url\">\n {this.#componentLocale.main.serverURLLabel}\n </label>\n <ch-combo-box-render\n id=\"server-url\"\n class=\"combo-box\"\n accessibleName=\"Server Url\"\n model={this.serverUrlsComboBoxModel}\n placeholder=\"Select a server URL\"\n value={this.gxServerConnectionData?.serverUrl}\n onChange={this.#serverUrlInputEventHandler}\n suggest={this.enableCustomServer}\n suggestOptions={{\n alreadyProcessed: false,\n autoExpand: false,\n hideMatchesAndShowNonMatches: false,\n highlightMatchedItems: false,\n matchCase: false,\n regularExpression: false,\n renderActiveItemIconOnExpand: true,\n strict: false\n }}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#serverUrlRef = el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#serverUrlRef)}\n </div>\n\n <div\n // authentication types\n class=\"field field-block authentication-type\"\n >\n <label class=\"label\" htmlFor=\"authentication-type\">\n {this.#componentLocale.main.authenticationTypeLabel}\n </label>\n <ch-combo-box-render\n id=\"authentication-type\"\n class=\"combo-box\"\n accessibleName=\"Authentication Types\"\n model={this.authenticationTypesComboBoxModel}\n placeholder=\"Select an authentication type\"\n value={this.gxServerConnectionData?.authenticationType.id}\n onInput={this.#authenticationInputEventHandler}\n ></ch-combo-box-render>\n </div>\n\n <div\n // username\n class=\"field field-block user-name\"\n >\n <label class=\"label\" htmlFor=\"username\">\n {this.#componentLocale.main.usernameLabel}\n </label>\n <ch-edit\n type=\"text\"\n id=\"username\"\n class=\"input\"\n value={this.gxServerConnectionData?.userName}\n onInput={this.#usernameInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#usernameRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#usernameRef)}\n </div>\n\n <div\n // user password\n class=\"field field-block user-password\"\n >\n <label class=\"label\" htmlFor=\"password\">\n {this.#componentLocale.main.passwordLabel}\n </label>\n <ch-edit\n type=\"password\"\n id=\"password\"\n class=\"input\"\n value={this.gxServerConnectionData?.userPassword}\n onInput={this.#passwordInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#passwordRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#passwordRef)}\n </div>\n </div>\n\n <footer class=\"control-footer-with-border spacing-body\">\n <div class=\"buttons-spacer\">\n <button\n // cancel button\n class=\"button-secondary\"\n onClick={this.#cancelClickHandler}\n >\n {this.#componentLocale.footer.cancelButtonCaption}\n </button>\n\n <button\n // connect button\n class=\"button-primary\"\n onClick={this.#connectClickHandler}\n >\n {this.#componentLocale.footer.connectButtonCaption}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type GXServerConnectionData = {\n authenticationType: AuthenticationType;\n serverUrl: string;\n userName: string;\n userPassword: string;\n};\n\nexport type AuthenticationType = {\n id: string;\n name: string;\n};\n"],"version":3}
|
|
@@ -58,25 +58,23 @@ export class HTMLGxIdeConnectGxServer {
|
|
|
58
58
|
((_c = this.validatableControls.get(controlReference.id)) === null || _c === void 0 ? void 0 : _c.message) && (h("ch-tooltip", { class: "tooltip", actionElement: controlReference, blockAlign: config.tooltipSettings.blockAlign, inlineAlign: config.tooltipSettings.inlineAlign, delay: config.tooltipSettings.delay }, this.validatableControls.get(controlReference.id).message));
|
|
59
59
|
});
|
|
60
60
|
_HTMLGxIdeConnectGxServer_init.set(this, () => {
|
|
61
|
-
var _a, _b, _c, _d, _e, _f
|
|
61
|
+
var _a, _b, _c, _d, _e, _f;
|
|
62
62
|
this.authenticationTypesChanged(this.authenticationTypes);
|
|
63
63
|
this.serverUrlsChanged(this.serverUrls);
|
|
64
64
|
// set initial values:
|
|
65
65
|
// server url
|
|
66
|
-
this.gxServerConnectionData.serverUrl =
|
|
67
|
-
((_a = this.defaultConnectionData) === null || _a === void 0 ? void 0 : _a.serverUrl) ||
|
|
68
|
-
((_b = this.serverUrlsComboBoxModel[0]) === null || _b === void 0 ? void 0 : _b.value);
|
|
66
|
+
this.gxServerConnectionData.serverUrl = "";
|
|
69
67
|
// authentication type
|
|
70
68
|
this.gxServerConnectionData.authenticationType = {
|
|
71
|
-
id: ((
|
|
72
|
-
((
|
|
73
|
-
name: ((
|
|
74
|
-
((
|
|
69
|
+
id: ((_a = this.defaultConnectionData) === null || _a === void 0 ? void 0 : _a.authenticationType.id) ||
|
|
70
|
+
((_b = this.authenticationTypesComboBoxModel[0]) === null || _b === void 0 ? void 0 : _b.value),
|
|
71
|
+
name: ((_c = this.defaultConnectionData) === null || _c === void 0 ? void 0 : _c.authenticationType.name) ||
|
|
72
|
+
((_d = this.authenticationTypesComboBoxModel[0]) === null || _d === void 0 ? void 0 : _d.caption)
|
|
75
73
|
};
|
|
76
74
|
// user name
|
|
77
|
-
this.gxServerConnectionData.userName = (
|
|
75
|
+
this.gxServerConnectionData.userName = (_e = this.defaultConnectionData) === null || _e === void 0 ? void 0 : _e.userName;
|
|
78
76
|
this.gxServerConnectionData.userPassword =
|
|
79
|
-
(
|
|
77
|
+
(_f = this.defaultConnectionData) === null || _f === void 0 ? void 0 : _f.userPassword;
|
|
80
78
|
});
|
|
81
79
|
_HTMLGxIdeConnectGxServer_initializeValidatableControls.set(this, () => {
|
|
82
80
|
// populate #controlsValidation with the controls that could have errors.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect-gx-server.js","sourceRoot":"","sources":["../../../../src/components/team-dev/connect-gx-server/connect-gx-server.tsx"],"names":[],"mappings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AK,EAAC,kBAAkB,EACxB,OAAO,EAAE,uBAAA,IAAI,oDAAoB,IAEhC,uBAAA,IAAI,iDAAiB,CAAC,MAAM,CAAC,mBAAmB,CAC1C;wBAET;4BACE,iBAAiB;4BACjB,KAAK,EAAC,gBAAgB,EACtB,OAAO,EAAE,uBAAA,IAAI,qDAAqB,IAEjC,uBAAA,IAAI,iDAAiB,CAAC,MAAM,CAAC,oBAAoB,CAC3C,CACL,CACC,CACD,CACL,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n\n// Other Libraries\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\n// Custom Imports\nimport { config } from \"../../../common/config\";\nimport {\n mapAuthenticationTypeToComboBoxModel,\n mapServerUrlsToComboBoxModel\n} from \"./helpers\";\nimport { Locale } from \"../../../common/locale\";\nimport { FormSubmitResult } from \"../../../common/types\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../../common/form-validation\";\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\n@Component({\n tag: \"gx-ide-connect-gx-server\",\n styleUrl: \"connect-gx-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/connect-gx-server\"]\n})\nexport class HTMLGxIdeConnectGxServer {\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 @Element() el: HTMLGxIdeConnectGxServerElement;\n #usernameRef!: HTMLChEditElement;\n #passwordRef!: HTMLChEditElement;\n #serverUrlRef!: HTMLChComboBoxRenderElement;\n\n @State() authenticationTypesComboBoxModel: ComboBoxModel;\n @State() gxServerConnectionData: GXServerConnectionData = {\n authenticationType: {\n id: null,\n name: null\n },\n serverUrl: null,\n userName: null,\n userPassword: null\n };\n @State() serverUrlsComboBoxModel: ComboBoxModel;\n @State() validatableControls = new Map<string, ControlValidation>();\n\n /**\n * List of authentication types.\n */\n @Prop() readonly authenticationTypes!: AuthenticationType[];\n @Watch(\"authenticationTypes\")\n authenticationTypesChanged(newAuthenticationTypes: AuthenticationType[]) {\n if (newAuthenticationTypes?.length) {\n this.authenticationTypesComboBoxModel =\n mapAuthenticationTypeToComboBoxModel(newAuthenticationTypes);\n }\n }\n\n /**\n * Callback that must be invoked when the 'Cancel' button is pressed.\n */\n @Prop() readonly cancelCallback!: () => Promise<void>;\n\n /**\n * Callback that must be invoked when the 'Connect' button is pressed.\n */\n @Prop() readonly connectCallback!: (\n data: GXServerConnectionData\n ) => Promise<FormSubmitResult>;\n\n /**\n * Initial user values for the case in which the user returns to the login modal after successful authentication.\n */\n @Prop() readonly defaultConnectionData?: GXServerConnectionData;\n\n /**\n * true if the user should be allowed to manually enter a server URL.\n */\n @Prop() readonly enableCustomServer: boolean = false;\n\n /**\n * Array of cataloged server URLs to be displayed in the combo.\n */\n @Prop() readonly serverUrls: string[];\n @Watch(\"serverUrls\")\n serverUrlsChanged(newServerUrls: string[]) {\n if (newServerUrls?.length) {\n this.serverUrlsComboBoxModel =\n mapServerUrlsToComboBoxModel(newServerUrls);\n }\n }\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n\n this.#init();\n }\n\n async componentDidLoad() {\n this.#initializeValidatableControls();\n }\n\n #cancelClickHandler = () => {\n this.cancelCallback();\n };\n\n #connectClickHandler = async () => {\n this.connectCallback(this.gxServerConnectionData).then(\n (formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n }\n );\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on other dialogs 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 #init = () => {\n this.authenticationTypesChanged(this.authenticationTypes);\n this.serverUrlsChanged(this.serverUrls);\n // set initial values:\n // server url\n this.gxServerConnectionData.serverUrl =\n this.defaultConnectionData?.serverUrl ||\n this.serverUrlsComboBoxModel[0]?.value;\n // authentication type\n this.gxServerConnectionData.authenticationType = {\n id:\n (this.defaultConnectionData?.authenticationType.id as string) ||\n this.authenticationTypesComboBoxModel[0]?.value,\n name:\n (this.defaultConnectionData?.authenticationType.name as string) ||\n this.authenticationTypesComboBoxModel[0]?.caption\n };\n\n // user name\n this.gxServerConnectionData.userName = this.defaultConnectionData?.userName;\n this.gxServerConnectionData.userPassword =\n this.defaultConnectionData?.userPassword;\n };\n\n #initializeValidatableControls = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#usernameRef,\n this.#passwordRef,\n this.#serverUrlRef\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 // handlers that update this.gxServerConnectionData:\n #serverUrlInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.serverUrl = event.detail as string;\n };\n #authenticationInputEventHandler = (\n event: CustomEvent<string> | InputEvent\n ) => {\n const authenticationTypeId = event.detail as string;\n const authenticationTypeIndex = this.authenticationTypes.findIndex(\n authType => {\n return authType.id === authenticationTypeId;\n }\n );\n const authenticationTypeName =\n this.authenticationTypes[authenticationTypeIndex].name;\n\n this.gxServerConnectionData.authenticationType = {\n id: authenticationTypeId,\n name: authenticationTypeName\n };\n };\n #usernameInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userName = event.detail as string;\n };\n #passwordInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userPassword = event.detail as string;\n };\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <section class=\"section\">\n <div class=\"main field-group spacing-body\">\n <div\n // server urls\n class=\"field field-block server-url\"\n >\n <label class=\"label\" htmlFor=\"server-url\">\n {this.#componentLocale.main.serverURLLabel}\n </label>\n <ch-combo-box-render\n id=\"server-url\"\n class=\"combo-box\"\n accessibleName=\"Server Url\"\n model={this.serverUrlsComboBoxModel}\n placeholder=\"Select a server URL\"\n value={this.gxServerConnectionData?.serverUrl}\n onChange={this.#serverUrlInputEventHandler}\n suggest={this.enableCustomServer}\n suggestOptions={{\n alreadyProcessed: false,\n autoExpand: false,\n hideMatchesAndShowNonMatches: false,\n highlightMatchedItems: false,\n matchCase: false,\n regularExpression: false,\n renderActiveItemIconOnExpand: true,\n strict: false\n }}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#serverUrlRef = el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#serverUrlRef)}\n </div>\n\n <div\n // authentication types\n class=\"field field-block authentication-type\"\n >\n <label class=\"label\" htmlFor=\"authentication-type\">\n {this.#componentLocale.main.authenticationTypeLabel}\n </label>\n <ch-combo-box-render\n id=\"authentication-type\"\n class=\"combo-box\"\n accessibleName=\"Authentication Types\"\n model={this.authenticationTypesComboBoxModel}\n placeholder=\"Select an authentication type\"\n value={this.gxServerConnectionData?.authenticationType.id}\n onInput={this.#authenticationInputEventHandler}\n ></ch-combo-box-render>\n </div>\n\n <div\n // username\n class=\"field field-block user-name\"\n >\n <label class=\"label\" htmlFor=\"username\">\n {this.#componentLocale.main.usernameLabel}\n </label>\n <ch-edit\n type=\"text\"\n id=\"username\"\n class=\"input\"\n value={this.gxServerConnectionData?.userName}\n onInput={this.#usernameInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#usernameRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#usernameRef)}\n </div>\n\n <div\n // user password\n class=\"field field-block user-password\"\n >\n <label class=\"label\" htmlFor=\"password\">\n {this.#componentLocale.main.passwordLabel}\n </label>\n <ch-edit\n type=\"password\"\n id=\"password\"\n class=\"input\"\n value={this.gxServerConnectionData?.userPassword}\n onInput={this.#passwordInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#passwordRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#passwordRef)}\n </div>\n </div>\n\n <footer class=\"control-footer-with-border spacing-body\">\n <div class=\"buttons-spacer\">\n <button\n // cancel button\n class=\"button-secondary\"\n onClick={this.#cancelClickHandler}\n >\n {this.#componentLocale.footer.cancelButtonCaption}\n </button>\n\n <button\n // connect button\n class=\"button-primary\"\n onClick={this.#connectClickHandler}\n >\n {this.#componentLocale.footer.connectButtonCaption}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type GXServerConnectionData = {\n authenticationType: AuthenticationType;\n serverUrl: string;\n userName: string;\n userPassword: string;\n};\n\nexport type AuthenticationType = {\n id: string;\n name: string;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"connect-gx-server.js","sourceRoot":"","sources":["../../../../src/components/team-dev/connect-gx-server/connect-gx-server.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,UAAU;AACV,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,E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EjC,uBAAA,IAAI,iDAAiB,CAAC,MAAM,CAAC,oBAAoB,CAC3C,CACL,CACC,CACD,CACL,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n\n// Other Libraries\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\n// Custom Imports\nimport { config } from \"../../../common/config\";\nimport {\n mapAuthenticationTypeToComboBoxModel,\n mapServerUrlsToComboBoxModel\n} from \"./helpers\";\nimport { Locale } from \"../../../common/locale\";\nimport { FormSubmitResult } from \"../../../common/types\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../../common/form-validation\";\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\n@Component({\n tag: \"gx-ide-connect-gx-server\",\n styleUrl: \"connect-gx-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/connect-gx-server\"]\n})\nexport class HTMLGxIdeConnectGxServer {\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 @Element() el: HTMLGxIdeConnectGxServerElement;\n #usernameRef!: HTMLChEditElement;\n #passwordRef!: HTMLChEditElement;\n #serverUrlRef!: HTMLChComboBoxRenderElement;\n\n @State() authenticationTypesComboBoxModel: ComboBoxModel;\n @State() gxServerConnectionData: GXServerConnectionData = {\n authenticationType: {\n id: null,\n name: null\n },\n serverUrl: null,\n userName: null,\n userPassword: null\n };\n @State() serverUrlsComboBoxModel: ComboBoxModel;\n @State() validatableControls = new Map<string, ControlValidation>();\n\n /**\n * List of authentication types.\n */\n @Prop() readonly authenticationTypes!: AuthenticationType[];\n @Watch(\"authenticationTypes\")\n authenticationTypesChanged(newAuthenticationTypes: AuthenticationType[]) {\n if (newAuthenticationTypes?.length) {\n this.authenticationTypesComboBoxModel =\n mapAuthenticationTypeToComboBoxModel(newAuthenticationTypes);\n }\n }\n\n /**\n * Callback that must be invoked when the 'Cancel' button is pressed.\n */\n @Prop() readonly cancelCallback!: () => Promise<void>;\n\n /**\n * Callback that must be invoked when the 'Connect' button is pressed.\n */\n @Prop() readonly connectCallback!: (\n data: GXServerConnectionData\n ) => Promise<FormSubmitResult>;\n\n /**\n * Initial user values for the case in which the user returns to the login modal after successful authentication.\n */\n @Prop() readonly defaultConnectionData?: GXServerConnectionData;\n\n /**\n * true if the user should be allowed to manually enter a server URL.\n */\n @Prop() readonly enableCustomServer: boolean = false;\n\n /**\n * Array of cataloged server URLs to be displayed in the combo.\n */\n @Prop() readonly serverUrls: string[];\n @Watch(\"serverUrls\")\n serverUrlsChanged(newServerUrls: string[]) {\n if (newServerUrls?.length) {\n this.serverUrlsComboBoxModel =\n mapServerUrlsToComboBoxModel(newServerUrls);\n }\n }\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n\n this.#init();\n }\n\n async componentDidLoad() {\n this.#initializeValidatableControls();\n }\n\n #cancelClickHandler = () => {\n this.cancelCallback();\n };\n\n #connectClickHandler = async () => {\n this.connectCallback(this.gxServerConnectionData).then(\n (formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n }\n );\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on other dialogs 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 #init = () => {\n this.authenticationTypesChanged(this.authenticationTypes);\n this.serverUrlsChanged(this.serverUrls);\n // set initial values:\n // server url\n this.gxServerConnectionData.serverUrl = \"\";\n // authentication type\n this.gxServerConnectionData.authenticationType = {\n id:\n (this.defaultConnectionData?.authenticationType.id as string) ||\n this.authenticationTypesComboBoxModel[0]?.value,\n name:\n (this.defaultConnectionData?.authenticationType.name as string) ||\n this.authenticationTypesComboBoxModel[0]?.caption\n };\n\n // user name\n this.gxServerConnectionData.userName = this.defaultConnectionData?.userName;\n this.gxServerConnectionData.userPassword =\n this.defaultConnectionData?.userPassword;\n };\n\n #initializeValidatableControls = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#usernameRef,\n this.#passwordRef,\n this.#serverUrlRef\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 // handlers that update this.gxServerConnectionData:\n #serverUrlInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.serverUrl = event.detail as string;\n };\n #authenticationInputEventHandler = (\n event: CustomEvent<string> | InputEvent\n ) => {\n const authenticationTypeId = event.detail as string;\n const authenticationTypeIndex = this.authenticationTypes.findIndex(\n authType => {\n return authType.id === authenticationTypeId;\n }\n );\n const authenticationTypeName =\n this.authenticationTypes[authenticationTypeIndex].name;\n\n this.gxServerConnectionData.authenticationType = {\n id: authenticationTypeId,\n name: authenticationTypeName\n };\n };\n #usernameInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userName = event.detail as string;\n };\n #passwordInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userPassword = event.detail as string;\n };\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <section class=\"section\">\n <div class=\"main field-group spacing-body\">\n <div\n // server urls\n class=\"field field-block server-url\"\n >\n <label class=\"label\" htmlFor=\"server-url\">\n {this.#componentLocale.main.serverURLLabel}\n </label>\n <ch-combo-box-render\n id=\"server-url\"\n class=\"combo-box\"\n accessibleName=\"Server Url\"\n model={this.serverUrlsComboBoxModel}\n placeholder=\"Select a server URL\"\n value={this.gxServerConnectionData?.serverUrl}\n onChange={this.#serverUrlInputEventHandler}\n suggest={this.enableCustomServer}\n suggestOptions={{\n alreadyProcessed: false,\n autoExpand: false,\n hideMatchesAndShowNonMatches: false,\n highlightMatchedItems: false,\n matchCase: false,\n regularExpression: false,\n renderActiveItemIconOnExpand: true,\n strict: false\n }}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#serverUrlRef = el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#serverUrlRef)}\n </div>\n\n <div\n // authentication types\n class=\"field field-block authentication-type\"\n >\n <label class=\"label\" htmlFor=\"authentication-type\">\n {this.#componentLocale.main.authenticationTypeLabel}\n </label>\n <ch-combo-box-render\n id=\"authentication-type\"\n class=\"combo-box\"\n accessibleName=\"Authentication Types\"\n model={this.authenticationTypesComboBoxModel}\n placeholder=\"Select an authentication type\"\n value={this.gxServerConnectionData?.authenticationType.id}\n onInput={this.#authenticationInputEventHandler}\n ></ch-combo-box-render>\n </div>\n\n <div\n // username\n class=\"field field-block user-name\"\n >\n <label class=\"label\" htmlFor=\"username\">\n {this.#componentLocale.main.usernameLabel}\n </label>\n <ch-edit\n type=\"text\"\n id=\"username\"\n class=\"input\"\n value={this.gxServerConnectionData?.userName}\n onInput={this.#usernameInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#usernameRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#usernameRef)}\n </div>\n\n <div\n // user password\n class=\"field field-block user-password\"\n >\n <label class=\"label\" htmlFor=\"password\">\n {this.#componentLocale.main.passwordLabel}\n </label>\n <ch-edit\n type=\"password\"\n id=\"password\"\n class=\"input\"\n value={this.gxServerConnectionData?.userPassword}\n onInput={this.#passwordInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#passwordRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#passwordRef)}\n </div>\n </div>\n\n <footer class=\"control-footer-with-border spacing-body\">\n <div class=\"buttons-spacer\">\n <button\n // cancel button\n class=\"button-secondary\"\n onClick={this.#cancelClickHandler}\n >\n {this.#componentLocale.footer.cancelButtonCaption}\n </button>\n\n <button\n // connect button\n class=\"button-primary\"\n onClick={this.#connectClickHandler}\n >\n {this.#componentLocale.footer.connectButtonCaption}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type GXServerConnectionData = {\n authenticationType: AuthenticationType;\n serverUrl: string;\n userName: string;\n userPassword: string;\n};\n\nexport type AuthenticationType = {\n id: string;\n name: string;\n};\n"]}
|
|
@@ -78,25 +78,23 @@ const HTMLGxIdeConnectGxServer = /*@__PURE__*/ proxyCustomElement(class HTMLGxId
|
|
|
78
78
|
((_c = this.validatableControls.get(controlReference.id)) === null || _c === void 0 ? void 0 : _c.message) && (h("ch-tooltip", { class: "tooltip", actionElement: controlReference, blockAlign: config.tooltipSettings.blockAlign, inlineAlign: config.tooltipSettings.inlineAlign, delay: config.tooltipSettings.delay }, this.validatableControls.get(controlReference.id).message));
|
|
79
79
|
});
|
|
80
80
|
_HTMLGxIdeConnectGxServer_init.set(this, () => {
|
|
81
|
-
var _a, _b, _c, _d, _e, _f
|
|
81
|
+
var _a, _b, _c, _d, _e, _f;
|
|
82
82
|
this.authenticationTypesChanged(this.authenticationTypes);
|
|
83
83
|
this.serverUrlsChanged(this.serverUrls);
|
|
84
84
|
// set initial values:
|
|
85
85
|
// server url
|
|
86
|
-
this.gxServerConnectionData.serverUrl =
|
|
87
|
-
((_a = this.defaultConnectionData) === null || _a === void 0 ? void 0 : _a.serverUrl) ||
|
|
88
|
-
((_b = this.serverUrlsComboBoxModel[0]) === null || _b === void 0 ? void 0 : _b.value);
|
|
86
|
+
this.gxServerConnectionData.serverUrl = "";
|
|
89
87
|
// authentication type
|
|
90
88
|
this.gxServerConnectionData.authenticationType = {
|
|
91
|
-
id: ((
|
|
92
|
-
((
|
|
93
|
-
name: ((
|
|
94
|
-
((
|
|
89
|
+
id: ((_a = this.defaultConnectionData) === null || _a === void 0 ? void 0 : _a.authenticationType.id) ||
|
|
90
|
+
((_b = this.authenticationTypesComboBoxModel[0]) === null || _b === void 0 ? void 0 : _b.value),
|
|
91
|
+
name: ((_c = this.defaultConnectionData) === null || _c === void 0 ? void 0 : _c.authenticationType.name) ||
|
|
92
|
+
((_d = this.authenticationTypesComboBoxModel[0]) === null || _d === void 0 ? void 0 : _d.caption)
|
|
95
93
|
};
|
|
96
94
|
// user name
|
|
97
|
-
this.gxServerConnectionData.userName = (
|
|
95
|
+
this.gxServerConnectionData.userName = (_e = this.defaultConnectionData) === null || _e === void 0 ? void 0 : _e.userName;
|
|
98
96
|
this.gxServerConnectionData.userPassword =
|
|
99
|
-
(
|
|
97
|
+
(_f = this.defaultConnectionData) === null || _f === void 0 ? void 0 : _f.userPassword;
|
|
100
98
|
});
|
|
101
99
|
_HTMLGxIdeConnectGxServer_initializeValidatableControls.set(this, () => {
|
|
102
100
|
// populate #controlsValidation with the controls that could have errors.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gx-ide-connect-gx-server.js","mappings":";;;;;AAGO,MAAM,oCAAoC,GAAG,CAClD,mBAAyC;IAEzC,OAAO,mBAAmB,CAAC,GAAG,CAAC,kBAAkB;QAC/C,OAAO;YACL,KAAK,EAAE,kBAAkB,CAA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tC,EACV,uBAAA,IAAI,uDAAuB,MAA3B,IAAI,EAAwB,uBAAA,IAAI,6CAAa,CAAC,CAC3C,EAEN;;YAEE,KAAK,EAAC,iCAAiC;WAEvC,aAAO,KAAK,EAAC,OAAO,EAAC,OAAO,EAAC,UAAU,IACpC,uBAAA,IAAI,iDAAiB,CAAC,IAAI,CAAC,aAAa,CACnC,EACR,eACE,IAAI,EAAC,UAAU,EACf,EAAE,EAAC,UAAU,EACb,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,MAAA,IAAI,CAAC,sBAAsB,0CAAE,YAAY,EAChD,OAAO,EAAE,uBAAA,IAAI,2DAA2B,EACxC,GAAG,EAAE,CAAC,EAAqB,MACxB,uBAAA,IAAI,yCAAgB,EAAuB,MAAA,CAAC,GAEtC,EACV,uBAAA,IAAI,uDAAuB,MAA3B,IAAI,EAAwB,uBAAA,IAAI,6CAAa,CAAC,CAC3C,CACF,EAEN,cAAQ,KAAK,EAAC,yCAAyC,IACrD,WAAK,KAAK,EAAC,gBAAgB,IACzB;;YAEE,KAAK,EAAC,kBAAkB,EACxB,OAAO,EAAE,uBAAA,IAAI,oDAAoB;WAEhC,uBAAA,IAAI,iDAAiB,CAAC,MAAM,CAAC,mBAAmB,CAC1C,EAET;;YAEE,KAAK,EAAC,gBAAgB,EACtB,OAAO,EAAE,uBAAA,IAAI,qDAAqB;WAEjC,uBAAA,IAAI,iDAAiB,CAAC,MAAM,CAAC,oBAAoB,CAC3C,CACL,CACC,CACD,CACL,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/team-dev/connect-gx-server/helpers.ts","src/components/team-dev/connect-gx-server/connect-gx-server.scss?tag=gx-ide-connect-gx-server&encapsulation=shadow","src/components/team-dev/connect-gx-server/connect-gx-server.tsx"],"sourcesContent":["import { AuthenticationType } from \"./connect-gx-server\";\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\n\nexport const mapAuthenticationTypeToComboBoxModel = (\n authenticationTypes: AuthenticationType[]\n): ComboBoxModel => {\n return authenticationTypes.map(authenticationType => {\n return {\n value: authenticationType.id,\n caption: authenticationType.name\n };\n });\n};\n\nexport const mapServerUrlsToComboBoxModel = (\n serverUrls: string[]\n): ComboBoxModel => {\n return serverUrls.map(serverUrl => {\n return {\n value: serverUrl,\n caption: serverUrl\n };\n });\n};\n",":host {\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr max-content;\n}\n\n.main {\n display: grid;\n grid-template-areas:\n \"server-url server-url\"\n \"authentication-type .\"\n \"user-name user-password\";\n grid-auto-rows: max-content;\n grid-template-columns: 1fr 1fr;\n}\n\n.section {\n display: contents;\n}\n\n.authentication-type {\n grid-area: authentication-type;\n}\n.server-url {\n grid-area: server-url;\n}\n.user-name {\n grid-area: user-name;\n}\n.user-password {\n grid-area: user-password;\n}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n\n// Other Libraries\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\n// Custom Imports\nimport { config } from \"../../../common/config\";\nimport {\n mapAuthenticationTypeToComboBoxModel,\n mapServerUrlsToComboBoxModel\n} from \"./helpers\";\nimport { Locale } from \"../../../common/locale\";\nimport { FormSubmitResult } from \"../../../common/types\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../../common/form-validation\";\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\n@Component({\n tag: \"gx-ide-connect-gx-server\",\n styleUrl: \"connect-gx-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/connect-gx-server\"]\n})\nexport class HTMLGxIdeConnectGxServer {\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 @Element() el: HTMLGxIdeConnectGxServerElement;\n #usernameRef!: HTMLChEditElement;\n #passwordRef!: HTMLChEditElement;\n #serverUrlRef!: HTMLChComboBoxRenderElement;\n\n @State() authenticationTypesComboBoxModel: ComboBoxModel;\n @State() gxServerConnectionData: GXServerConnectionData = {\n authenticationType: {\n id: null,\n name: null\n },\n serverUrl: null,\n userName: null,\n userPassword: null\n };\n @State() serverUrlsComboBoxModel: ComboBoxModel;\n @State() validatableControls = new Map<string, ControlValidation>();\n\n /**\n * List of authentication types.\n */\n @Prop() readonly authenticationTypes!: AuthenticationType[];\n @Watch(\"authenticationTypes\")\n authenticationTypesChanged(newAuthenticationTypes: AuthenticationType[]) {\n if (newAuthenticationTypes?.length) {\n this.authenticationTypesComboBoxModel =\n mapAuthenticationTypeToComboBoxModel(newAuthenticationTypes);\n }\n }\n\n /**\n * Callback that must be invoked when the 'Cancel' button is pressed.\n */\n @Prop() readonly cancelCallback!: () => Promise<void>;\n\n /**\n * Callback that must be invoked when the 'Connect' button is pressed.\n */\n @Prop() readonly connectCallback!: (\n data: GXServerConnectionData\n ) => Promise<FormSubmitResult>;\n\n /**\n * Initial user values for the case in which the user returns to the login modal after successful authentication.\n */\n @Prop() readonly defaultConnectionData?: GXServerConnectionData;\n\n /**\n * true if the user should be allowed to manually enter a server URL.\n */\n @Prop() readonly enableCustomServer: boolean = false;\n\n /**\n * Array of cataloged server URLs to be displayed in the combo.\n */\n @Prop() readonly serverUrls: string[];\n @Watch(\"serverUrls\")\n serverUrlsChanged(newServerUrls: string[]) {\n if (newServerUrls?.length) {\n this.serverUrlsComboBoxModel =\n mapServerUrlsToComboBoxModel(newServerUrls);\n }\n }\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n\n this.#init();\n }\n\n async componentDidLoad() {\n this.#initializeValidatableControls();\n }\n\n #cancelClickHandler = () => {\n this.cancelCallback();\n };\n\n #connectClickHandler = async () => {\n this.connectCallback(this.gxServerConnectionData).then(\n (formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n }\n );\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on other dialogs 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 #init = () => {\n this.authenticationTypesChanged(this.authenticationTypes);\n this.serverUrlsChanged(this.serverUrls);\n // set initial values:\n // server url\n this.gxServerConnectionData.serverUrl =\n this.defaultConnectionData?.serverUrl ||\n this.serverUrlsComboBoxModel[0]?.value;\n // authentication type\n this.gxServerConnectionData.authenticationType = {\n id:\n (this.defaultConnectionData?.authenticationType.id as string) ||\n this.authenticationTypesComboBoxModel[0]?.value,\n name:\n (this.defaultConnectionData?.authenticationType.name as string) ||\n this.authenticationTypesComboBoxModel[0]?.caption\n };\n\n // user name\n this.gxServerConnectionData.userName = this.defaultConnectionData?.userName;\n this.gxServerConnectionData.userPassword =\n this.defaultConnectionData?.userPassword;\n };\n\n #initializeValidatableControls = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#usernameRef,\n this.#passwordRef,\n this.#serverUrlRef\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 // handlers that update this.gxServerConnectionData:\n #serverUrlInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.serverUrl = event.detail as string;\n };\n #authenticationInputEventHandler = (\n event: CustomEvent<string> | InputEvent\n ) => {\n const authenticationTypeId = event.detail as string;\n const authenticationTypeIndex = this.authenticationTypes.findIndex(\n authType => {\n return authType.id === authenticationTypeId;\n }\n );\n const authenticationTypeName =\n this.authenticationTypes[authenticationTypeIndex].name;\n\n this.gxServerConnectionData.authenticationType = {\n id: authenticationTypeId,\n name: authenticationTypeName\n };\n };\n #usernameInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userName = event.detail as string;\n };\n #passwordInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userPassword = event.detail as string;\n };\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <section class=\"section\">\n <div class=\"main field-group spacing-body\">\n <div\n // server urls\n class=\"field field-block server-url\"\n >\n <label class=\"label\" htmlFor=\"server-url\">\n {this.#componentLocale.main.serverURLLabel}\n </label>\n <ch-combo-box-render\n id=\"server-url\"\n class=\"combo-box\"\n accessibleName=\"Server Url\"\n model={this.serverUrlsComboBoxModel}\n placeholder=\"Select a server URL\"\n value={this.gxServerConnectionData?.serverUrl}\n onChange={this.#serverUrlInputEventHandler}\n suggest={this.enableCustomServer}\n suggestOptions={{\n alreadyProcessed: false,\n autoExpand: false,\n hideMatchesAndShowNonMatches: false,\n highlightMatchedItems: false,\n matchCase: false,\n regularExpression: false,\n renderActiveItemIconOnExpand: true,\n strict: false\n }}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#serverUrlRef = el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#serverUrlRef)}\n </div>\n\n <div\n // authentication types\n class=\"field field-block authentication-type\"\n >\n <label class=\"label\" htmlFor=\"authentication-type\">\n {this.#componentLocale.main.authenticationTypeLabel}\n </label>\n <ch-combo-box-render\n id=\"authentication-type\"\n class=\"combo-box\"\n accessibleName=\"Authentication Types\"\n model={this.authenticationTypesComboBoxModel}\n placeholder=\"Select an authentication type\"\n value={this.gxServerConnectionData?.authenticationType.id}\n onInput={this.#authenticationInputEventHandler}\n ></ch-combo-box-render>\n </div>\n\n <div\n // username\n class=\"field field-block user-name\"\n >\n <label class=\"label\" htmlFor=\"username\">\n {this.#componentLocale.main.usernameLabel}\n </label>\n <ch-edit\n type=\"text\"\n id=\"username\"\n class=\"input\"\n value={this.gxServerConnectionData?.userName}\n onInput={this.#usernameInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#usernameRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#usernameRef)}\n </div>\n\n <div\n // user password\n class=\"field field-block user-password\"\n >\n <label class=\"label\" htmlFor=\"password\">\n {this.#componentLocale.main.passwordLabel}\n </label>\n <ch-edit\n type=\"password\"\n id=\"password\"\n class=\"input\"\n value={this.gxServerConnectionData?.userPassword}\n onInput={this.#passwordInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#passwordRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#passwordRef)}\n </div>\n </div>\n\n <footer class=\"control-footer-with-border spacing-body\">\n <div class=\"buttons-spacer\">\n <button\n // cancel button\n class=\"button-secondary\"\n onClick={this.#cancelClickHandler}\n >\n {this.#componentLocale.footer.cancelButtonCaption}\n </button>\n\n <button\n // connect button\n class=\"button-primary\"\n onClick={this.#connectClickHandler}\n >\n {this.#componentLocale.footer.connectButtonCaption}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type GXServerConnectionData = {\n authenticationType: AuthenticationType;\n serverUrl: string;\n userName: string;\n userPassword: string;\n};\n\nexport type AuthenticationType = {\n id: string;\n name: string;\n};\n"],"version":3}
|
|
1
|
+
{"file":"gx-ide-connect-gx-server.js","mappings":";;;;;AAGO,MAAM,oCAAoC,GAAG,CAClD,mBAAyC;IAEzC,OAAO,mBAAmB,CAAC,GAAG,CAAC,kBAAkB;QAC/C,OAAO;YACL,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N;;YAEE,KAAK,EAAC,iCAAiC;WAEvC,aAAO,KAAK,EAAC,OAAO,EAAC,OAAO,EAAC,UAAU,IACpC,uBAAA,IAAI,iDAAiB,CAAC,IAAI,CAAC,aAAa,CACnC,EACR,eACE,IAAI,EAAC,UAAU,EACf,EAAE,EAAC,UAAU,EACb,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,MAAA,IAAI,CAAC,sBAAsB,0CAAE,YAAY,EAChD,OAAO,EAAE,uBAAA,IAAI,2DAA2B,EACxC,GAAG,EAAE,CAAC,EAAqB,MACxB,uBAAA,IAAI,yCAAgB,EAAuB,MAAA,CAAC,GAEtC,EACV,uBAAA,IAAI,uDAAuB,MAA3B,IAAI,EAAwB,uBAAA,IAAI,6CAAa,CAAC,CAC3C,CACF,EAEN,cAAQ,KAAK,EAAC,yCAAyC,IACrD,WAAK,KAAK,EAAC,gBAAgB,IACzB;;YAEE,KAAK,EAAC,kBAAkB,EACxB,OAAO,EAAE,uBAAA,IAAI,oDAAoB;WAEhC,uBAAA,IAAI,iDAAiB,CAAC,MAAM,CAAC,mBAAmB,CAC1C,EAET;;YAEE,KAAK,EAAC,gBAAgB,EACtB,OAAO,EAAE,uBAAA,IAAI,qDAAqB;WAEjC,uBAAA,IAAI,iDAAiB,CAAC,MAAM,CAAC,oBAAoB,CAC3C,CACL,CACC,CACD,CACL,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/team-dev/connect-gx-server/helpers.ts","src/components/team-dev/connect-gx-server/connect-gx-server.scss?tag=gx-ide-connect-gx-server&encapsulation=shadow","src/components/team-dev/connect-gx-server/connect-gx-server.tsx"],"sourcesContent":["import { AuthenticationType } from \"./connect-gx-server\";\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\n\nexport const mapAuthenticationTypeToComboBoxModel = (\n authenticationTypes: AuthenticationType[]\n): ComboBoxModel => {\n return authenticationTypes.map(authenticationType => {\n return {\n value: authenticationType.id,\n caption: authenticationType.name\n };\n });\n};\n\nexport const mapServerUrlsToComboBoxModel = (\n serverUrls: string[]\n): ComboBoxModel => {\n return serverUrls.map(serverUrl => {\n return {\n value: serverUrl,\n caption: serverUrl\n };\n });\n};\n",":host {\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr max-content;\n}\n\n.main {\n display: grid;\n grid-template-areas:\n \"server-url server-url\"\n \"authentication-type .\"\n \"user-name user-password\";\n grid-auto-rows: max-content;\n grid-template-columns: 1fr 1fr;\n}\n\n.section {\n display: contents;\n}\n\n.authentication-type {\n grid-area: authentication-type;\n}\n.server-url {\n grid-area: server-url;\n}\n.user-name {\n grid-area: user-name;\n}\n.user-password {\n grid-area: user-password;\n}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n\n// Other Libraries\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\n// Custom Imports\nimport { config } from \"../../../common/config\";\nimport {\n mapAuthenticationTypeToComboBoxModel,\n mapServerUrlsToComboBoxModel\n} from \"./helpers\";\nimport { Locale } from \"../../../common/locale\";\nimport { FormSubmitResult } from \"../../../common/types\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../../common/form-validation\";\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\n@Component({\n tag: \"gx-ide-connect-gx-server\",\n styleUrl: \"connect-gx-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/connect-gx-server\"]\n})\nexport class HTMLGxIdeConnectGxServer {\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 @Element() el: HTMLGxIdeConnectGxServerElement;\n #usernameRef!: HTMLChEditElement;\n #passwordRef!: HTMLChEditElement;\n #serverUrlRef!: HTMLChComboBoxRenderElement;\n\n @State() authenticationTypesComboBoxModel: ComboBoxModel;\n @State() gxServerConnectionData: GXServerConnectionData = {\n authenticationType: {\n id: null,\n name: null\n },\n serverUrl: null,\n userName: null,\n userPassword: null\n };\n @State() serverUrlsComboBoxModel: ComboBoxModel;\n @State() validatableControls = new Map<string, ControlValidation>();\n\n /**\n * List of authentication types.\n */\n @Prop() readonly authenticationTypes!: AuthenticationType[];\n @Watch(\"authenticationTypes\")\n authenticationTypesChanged(newAuthenticationTypes: AuthenticationType[]) {\n if (newAuthenticationTypes?.length) {\n this.authenticationTypesComboBoxModel =\n mapAuthenticationTypeToComboBoxModel(newAuthenticationTypes);\n }\n }\n\n /**\n * Callback that must be invoked when the 'Cancel' button is pressed.\n */\n @Prop() readonly cancelCallback!: () => Promise<void>;\n\n /**\n * Callback that must be invoked when the 'Connect' button is pressed.\n */\n @Prop() readonly connectCallback!: (\n data: GXServerConnectionData\n ) => Promise<FormSubmitResult>;\n\n /**\n * Initial user values for the case in which the user returns to the login modal after successful authentication.\n */\n @Prop() readonly defaultConnectionData?: GXServerConnectionData;\n\n /**\n * true if the user should be allowed to manually enter a server URL.\n */\n @Prop() readonly enableCustomServer: boolean = false;\n\n /**\n * Array of cataloged server URLs to be displayed in the combo.\n */\n @Prop() readonly serverUrls: string[];\n @Watch(\"serverUrls\")\n serverUrlsChanged(newServerUrls: string[]) {\n if (newServerUrls?.length) {\n this.serverUrlsComboBoxModel =\n mapServerUrlsToComboBoxModel(newServerUrls);\n }\n }\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n\n this.#init();\n }\n\n async componentDidLoad() {\n this.#initializeValidatableControls();\n }\n\n #cancelClickHandler = () => {\n this.cancelCallback();\n };\n\n #connectClickHandler = async () => {\n this.connectCallback(this.gxServerConnectionData).then(\n (formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n }\n );\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on other dialogs 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 #init = () => {\n this.authenticationTypesChanged(this.authenticationTypes);\n this.serverUrlsChanged(this.serverUrls);\n // set initial values:\n // server url\n this.gxServerConnectionData.serverUrl = \"\";\n // authentication type\n this.gxServerConnectionData.authenticationType = {\n id:\n (this.defaultConnectionData?.authenticationType.id as string) ||\n this.authenticationTypesComboBoxModel[0]?.value,\n name:\n (this.defaultConnectionData?.authenticationType.name as string) ||\n this.authenticationTypesComboBoxModel[0]?.caption\n };\n\n // user name\n this.gxServerConnectionData.userName = this.defaultConnectionData?.userName;\n this.gxServerConnectionData.userPassword =\n this.defaultConnectionData?.userPassword;\n };\n\n #initializeValidatableControls = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#usernameRef,\n this.#passwordRef,\n this.#serverUrlRef\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 // handlers that update this.gxServerConnectionData:\n #serverUrlInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.serverUrl = event.detail as string;\n };\n #authenticationInputEventHandler = (\n event: CustomEvent<string> | InputEvent\n ) => {\n const authenticationTypeId = event.detail as string;\n const authenticationTypeIndex = this.authenticationTypes.findIndex(\n authType => {\n return authType.id === authenticationTypeId;\n }\n );\n const authenticationTypeName =\n this.authenticationTypes[authenticationTypeIndex].name;\n\n this.gxServerConnectionData.authenticationType = {\n id: authenticationTypeId,\n name: authenticationTypeName\n };\n };\n #usernameInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userName = event.detail as string;\n };\n #passwordInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userPassword = event.detail as string;\n };\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <section class=\"section\">\n <div class=\"main field-group spacing-body\">\n <div\n // server urls\n class=\"field field-block server-url\"\n >\n <label class=\"label\" htmlFor=\"server-url\">\n {this.#componentLocale.main.serverURLLabel}\n </label>\n <ch-combo-box-render\n id=\"server-url\"\n class=\"combo-box\"\n accessibleName=\"Server Url\"\n model={this.serverUrlsComboBoxModel}\n placeholder=\"Select a server URL\"\n value={this.gxServerConnectionData?.serverUrl}\n onChange={this.#serverUrlInputEventHandler}\n suggest={this.enableCustomServer}\n suggestOptions={{\n alreadyProcessed: false,\n autoExpand: false,\n hideMatchesAndShowNonMatches: false,\n highlightMatchedItems: false,\n matchCase: false,\n regularExpression: false,\n renderActiveItemIconOnExpand: true,\n strict: false\n }}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#serverUrlRef = el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#serverUrlRef)}\n </div>\n\n <div\n // authentication types\n class=\"field field-block authentication-type\"\n >\n <label class=\"label\" htmlFor=\"authentication-type\">\n {this.#componentLocale.main.authenticationTypeLabel}\n </label>\n <ch-combo-box-render\n id=\"authentication-type\"\n class=\"combo-box\"\n accessibleName=\"Authentication Types\"\n model={this.authenticationTypesComboBoxModel}\n placeholder=\"Select an authentication type\"\n value={this.gxServerConnectionData?.authenticationType.id}\n onInput={this.#authenticationInputEventHandler}\n ></ch-combo-box-render>\n </div>\n\n <div\n // username\n class=\"field field-block user-name\"\n >\n <label class=\"label\" htmlFor=\"username\">\n {this.#componentLocale.main.usernameLabel}\n </label>\n <ch-edit\n type=\"text\"\n id=\"username\"\n class=\"input\"\n value={this.gxServerConnectionData?.userName}\n onInput={this.#usernameInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#usernameRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#usernameRef)}\n </div>\n\n <div\n // user password\n class=\"field field-block user-password\"\n >\n <label class=\"label\" htmlFor=\"password\">\n {this.#componentLocale.main.passwordLabel}\n </label>\n <ch-edit\n type=\"password\"\n id=\"password\"\n class=\"input\"\n value={this.gxServerConnectionData?.userPassword}\n onInput={this.#passwordInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#passwordRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#passwordRef)}\n </div>\n </div>\n\n <footer class=\"control-footer-with-border spacing-body\">\n <div class=\"buttons-spacer\">\n <button\n // cancel button\n class=\"button-secondary\"\n onClick={this.#cancelClickHandler}\n >\n {this.#componentLocale.footer.cancelButtonCaption}\n </button>\n\n <button\n // connect button\n class=\"button-primary\"\n onClick={this.#connectClickHandler}\n >\n {this.#componentLocale.footer.connectButtonCaption}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type GXServerConnectionData = {\n authenticationType: AuthenticationType;\n serverUrl: string;\n userName: string;\n userPassword: string;\n};\n\nexport type AuthenticationType = {\n id: string;\n name: string;\n};\n"],"version":3}
|
|
@@ -76,25 +76,23 @@ const HTMLGxIdeConnectGxServer = class {
|
|
|
76
76
|
((_c = this.validatableControls.get(controlReference.id)) === null || _c === void 0 ? void 0 : _c.message) && (h("ch-tooltip", { class: "tooltip", actionElement: controlReference, blockAlign: config.tooltipSettings.blockAlign, inlineAlign: config.tooltipSettings.inlineAlign, delay: config.tooltipSettings.delay }, this.validatableControls.get(controlReference.id).message));
|
|
77
77
|
});
|
|
78
78
|
_HTMLGxIdeConnectGxServer_init.set(this, () => {
|
|
79
|
-
var _a, _b, _c, _d, _e, _f
|
|
79
|
+
var _a, _b, _c, _d, _e, _f;
|
|
80
80
|
this.authenticationTypesChanged(this.authenticationTypes);
|
|
81
81
|
this.serverUrlsChanged(this.serverUrls);
|
|
82
82
|
// set initial values:
|
|
83
83
|
// server url
|
|
84
|
-
this.gxServerConnectionData.serverUrl =
|
|
85
|
-
((_a = this.defaultConnectionData) === null || _a === void 0 ? void 0 : _a.serverUrl) ||
|
|
86
|
-
((_b = this.serverUrlsComboBoxModel[0]) === null || _b === void 0 ? void 0 : _b.value);
|
|
84
|
+
this.gxServerConnectionData.serverUrl = "";
|
|
87
85
|
// authentication type
|
|
88
86
|
this.gxServerConnectionData.authenticationType = {
|
|
89
|
-
id: ((
|
|
90
|
-
((
|
|
91
|
-
name: ((
|
|
92
|
-
((
|
|
87
|
+
id: ((_a = this.defaultConnectionData) === null || _a === void 0 ? void 0 : _a.authenticationType.id) ||
|
|
88
|
+
((_b = this.authenticationTypesComboBoxModel[0]) === null || _b === void 0 ? void 0 : _b.value),
|
|
89
|
+
name: ((_c = this.defaultConnectionData) === null || _c === void 0 ? void 0 : _c.authenticationType.name) ||
|
|
90
|
+
((_d = this.authenticationTypesComboBoxModel[0]) === null || _d === void 0 ? void 0 : _d.caption)
|
|
93
91
|
};
|
|
94
92
|
// user name
|
|
95
|
-
this.gxServerConnectionData.userName = (
|
|
93
|
+
this.gxServerConnectionData.userName = (_e = this.defaultConnectionData) === null || _e === void 0 ? void 0 : _e.userName;
|
|
96
94
|
this.gxServerConnectionData.userPassword =
|
|
97
|
-
(
|
|
95
|
+
(_f = this.defaultConnectionData) === null || _f === void 0 ? void 0 : _f.userPassword;
|
|
98
96
|
});
|
|
99
97
|
_HTMLGxIdeConnectGxServer_initializeValidatableControls.set(this, () => {
|
|
100
98
|
// populate #controlsValidation with the controls that could have errors.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gx-ide-connect-gx-server.entry.js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sB,0CAAE,QAAQ,EAC5C,OAAO,EAAE,uBAAA,IAAI,2DAA2B,EACxC,GAAG,EAAE,CAAC,EAAqB,MACxB,uBAAA,IAAI,yCAAgB,EAAuB,MAAA,CAAC,GAEtC,EACV,uBAAA,IAAI,uDAAuB,MAA3B,IAAI,EAAwB,uBAAA,IAAI,6CAAa,CAAC,CAC3C,EAEN;;YAEE,KAAK,EAAC,iCAAiC;WAEvC,aAAO,KAAK,EAAC,OAAO,EAAC,OAAO,EAAC,UAAU,IACpC,uBAAA,IAAI,iDAAiB,CAAC,IAAI,CAAC,aAAa,CACnC,EACR,eACE,IAAI,EAAC,UAAU,EACf,EAAE,EAAC,UAAU,EACb,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,MAAA,IAAI,CAAC,sBAAsB,0CAAE,YAAY,EAChD,OAAO,EAAE,uBAAA,IAAI,2DAA2B,EACxC,GAAG,EAAE,CAAC,EAAqB,MACxB,uBAAA,IAAI,yCAAgB,EAAuB,MAAA,CAAC,GAEtC,EACV,uBAAA,IAAI,uDAAuB,MAA3B,IAAI,EAAwB,uBAAA,IAAI,6CAAa,CAAC,CAC3C,CACF,EAEN,cAAQ,KAAK,EAAC,yCAAyC,IACrD,WAAK,KAAK,EAAC,gBAAgB,IACzB;;YAEE,KAAK,EAAC,kBAAkB,EACxB,OAAO,EAAE,uBAAA,IAAI,oDAAoB;WAEhC,uBAAA,IAAI,iDAAiB,CAAC,MAAM,CAAC,mBAAmB,CAC1C,EAET;;YAEE,KAAK,EAAC,gBAAgB,EACtB,OAAO,EAAE,uBAAA,IAAI,qDAAqB;WAEjC,uBAAA,IAAI,iDAAiB,CAAC,MAAM,CAAC,oBAAoB,CAC3C,CACL,CACC,CACD,CACL,EACP;KACH;;;;;;;;;;;;;","names":[],"sources":["src/components/team-dev/connect-gx-server/helpers.ts","src/components/team-dev/connect-gx-server/connect-gx-server.scss?tag=gx-ide-connect-gx-server&encapsulation=shadow","src/components/team-dev/connect-gx-server/connect-gx-server.tsx"],"sourcesContent":["import { AuthenticationType } from \"./connect-gx-server\";\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\n\nexport const mapAuthenticationTypeToComboBoxModel = (\n authenticationTypes: AuthenticationType[]\n): ComboBoxModel => {\n return authenticationTypes.map(authenticationType => {\n return {\n value: authenticationType.id,\n caption: authenticationType.name\n };\n });\n};\n\nexport const mapServerUrlsToComboBoxModel = (\n serverUrls: string[]\n): ComboBoxModel => {\n return serverUrls.map(serverUrl => {\n return {\n value: serverUrl,\n caption: serverUrl\n };\n });\n};\n",":host {\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr max-content;\n}\n\n.main {\n display: grid;\n grid-template-areas:\n \"server-url server-url\"\n \"authentication-type .\"\n \"user-name user-password\";\n grid-auto-rows: max-content;\n grid-template-columns: 1fr 1fr;\n}\n\n.section {\n display: contents;\n}\n\n.authentication-type {\n grid-area: authentication-type;\n}\n.server-url {\n grid-area: server-url;\n}\n.user-name {\n grid-area: user-name;\n}\n.user-password {\n grid-area: user-password;\n}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n\n// Other Libraries\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\n// Custom Imports\nimport { config } from \"../../../common/config\";\nimport {\n mapAuthenticationTypeToComboBoxModel,\n mapServerUrlsToComboBoxModel\n} from \"./helpers\";\nimport { Locale } from \"../../../common/locale\";\nimport { FormSubmitResult } from \"../../../common/types\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../../common/form-validation\";\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\n@Component({\n tag: \"gx-ide-connect-gx-server\",\n styleUrl: \"connect-gx-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/connect-gx-server\"]\n})\nexport class HTMLGxIdeConnectGxServer {\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 @Element() el: HTMLGxIdeConnectGxServerElement;\n #usernameRef!: HTMLChEditElement;\n #passwordRef!: HTMLChEditElement;\n #serverUrlRef!: HTMLChComboBoxRenderElement;\n\n @State() authenticationTypesComboBoxModel: ComboBoxModel;\n @State() gxServerConnectionData: GXServerConnectionData = {\n authenticationType: {\n id: null,\n name: null\n },\n serverUrl: null,\n userName: null,\n userPassword: null\n };\n @State() serverUrlsComboBoxModel: ComboBoxModel;\n @State() validatableControls = new Map<string, ControlValidation>();\n\n /**\n * List of authentication types.\n */\n @Prop() readonly authenticationTypes!: AuthenticationType[];\n @Watch(\"authenticationTypes\")\n authenticationTypesChanged(newAuthenticationTypes: AuthenticationType[]) {\n if (newAuthenticationTypes?.length) {\n this.authenticationTypesComboBoxModel =\n mapAuthenticationTypeToComboBoxModel(newAuthenticationTypes);\n }\n }\n\n /**\n * Callback that must be invoked when the 'Cancel' button is pressed.\n */\n @Prop() readonly cancelCallback!: () => Promise<void>;\n\n /**\n * Callback that must be invoked when the 'Connect' button is pressed.\n */\n @Prop() readonly connectCallback!: (\n data: GXServerConnectionData\n ) => Promise<FormSubmitResult>;\n\n /**\n * Initial user values for the case in which the user returns to the login modal after successful authentication.\n */\n @Prop() readonly defaultConnectionData?: GXServerConnectionData;\n\n /**\n * true if the user should be allowed to manually enter a server URL.\n */\n @Prop() readonly enableCustomServer: boolean = false;\n\n /**\n * Array of cataloged server URLs to be displayed in the combo.\n */\n @Prop() readonly serverUrls: string[];\n @Watch(\"serverUrls\")\n serverUrlsChanged(newServerUrls: string[]) {\n if (newServerUrls?.length) {\n this.serverUrlsComboBoxModel =\n mapServerUrlsToComboBoxModel(newServerUrls);\n }\n }\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n\n this.#init();\n }\n\n async componentDidLoad() {\n this.#initializeValidatableControls();\n }\n\n #cancelClickHandler = () => {\n this.cancelCallback();\n };\n\n #connectClickHandler = async () => {\n this.connectCallback(this.gxServerConnectionData).then(\n (formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n }\n );\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on other dialogs 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 #init = () => {\n this.authenticationTypesChanged(this.authenticationTypes);\n this.serverUrlsChanged(this.serverUrls);\n // set initial values:\n // server url\n this.gxServerConnectionData.serverUrl =\n this.defaultConnectionData?.serverUrl ||\n this.serverUrlsComboBoxModel[0]?.value;\n // authentication type\n this.gxServerConnectionData.authenticationType = {\n id:\n (this.defaultConnectionData?.authenticationType.id as string) ||\n this.authenticationTypesComboBoxModel[0]?.value,\n name:\n (this.defaultConnectionData?.authenticationType.name as string) ||\n this.authenticationTypesComboBoxModel[0]?.caption\n };\n\n // user name\n this.gxServerConnectionData.userName = this.defaultConnectionData?.userName;\n this.gxServerConnectionData.userPassword =\n this.defaultConnectionData?.userPassword;\n };\n\n #initializeValidatableControls = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#usernameRef,\n this.#passwordRef,\n this.#serverUrlRef\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 // handlers that update this.gxServerConnectionData:\n #serverUrlInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.serverUrl = event.detail as string;\n };\n #authenticationInputEventHandler = (\n event: CustomEvent<string> | InputEvent\n ) => {\n const authenticationTypeId = event.detail as string;\n const authenticationTypeIndex = this.authenticationTypes.findIndex(\n authType => {\n return authType.id === authenticationTypeId;\n }\n );\n const authenticationTypeName =\n this.authenticationTypes[authenticationTypeIndex].name;\n\n this.gxServerConnectionData.authenticationType = {\n id: authenticationTypeId,\n name: authenticationTypeName\n };\n };\n #usernameInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userName = event.detail as string;\n };\n #passwordInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userPassword = event.detail as string;\n };\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <section class=\"section\">\n <div class=\"main field-group spacing-body\">\n <div\n // server urls\n class=\"field field-block server-url\"\n >\n <label class=\"label\" htmlFor=\"server-url\">\n {this.#componentLocale.main.serverURLLabel}\n </label>\n <ch-combo-box-render\n id=\"server-url\"\n class=\"combo-box\"\n accessibleName=\"Server Url\"\n model={this.serverUrlsComboBoxModel}\n placeholder=\"Select a server URL\"\n value={this.gxServerConnectionData?.serverUrl}\n onChange={this.#serverUrlInputEventHandler}\n suggest={this.enableCustomServer}\n suggestOptions={{\n alreadyProcessed: false,\n autoExpand: false,\n hideMatchesAndShowNonMatches: false,\n highlightMatchedItems: false,\n matchCase: false,\n regularExpression: false,\n renderActiveItemIconOnExpand: true,\n strict: false\n }}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#serverUrlRef = el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#serverUrlRef)}\n </div>\n\n <div\n // authentication types\n class=\"field field-block authentication-type\"\n >\n <label class=\"label\" htmlFor=\"authentication-type\">\n {this.#componentLocale.main.authenticationTypeLabel}\n </label>\n <ch-combo-box-render\n id=\"authentication-type\"\n class=\"combo-box\"\n accessibleName=\"Authentication Types\"\n model={this.authenticationTypesComboBoxModel}\n placeholder=\"Select an authentication type\"\n value={this.gxServerConnectionData?.authenticationType.id}\n onInput={this.#authenticationInputEventHandler}\n ></ch-combo-box-render>\n </div>\n\n <div\n // username\n class=\"field field-block user-name\"\n >\n <label class=\"label\" htmlFor=\"username\">\n {this.#componentLocale.main.usernameLabel}\n </label>\n <ch-edit\n type=\"text\"\n id=\"username\"\n class=\"input\"\n value={this.gxServerConnectionData?.userName}\n onInput={this.#usernameInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#usernameRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#usernameRef)}\n </div>\n\n <div\n // user password\n class=\"field field-block user-password\"\n >\n <label class=\"label\" htmlFor=\"password\">\n {this.#componentLocale.main.passwordLabel}\n </label>\n <ch-edit\n type=\"password\"\n id=\"password\"\n class=\"input\"\n value={this.gxServerConnectionData?.userPassword}\n onInput={this.#passwordInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#passwordRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#passwordRef)}\n </div>\n </div>\n\n <footer class=\"control-footer-with-border spacing-body\">\n <div class=\"buttons-spacer\">\n <button\n // cancel button\n class=\"button-secondary\"\n onClick={this.#cancelClickHandler}\n >\n {this.#componentLocale.footer.cancelButtonCaption}\n </button>\n\n <button\n // connect button\n class=\"button-primary\"\n onClick={this.#connectClickHandler}\n >\n {this.#componentLocale.footer.connectButtonCaption}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type GXServerConnectionData = {\n authenticationType: AuthenticationType;\n serverUrl: string;\n userName: string;\n userPassword: string;\n};\n\nexport type AuthenticationType = {\n id: string;\n name: string;\n};\n"],"version":3}
|
|
1
|
+
{"file":"gx-ide-connect-gx-server.entry.js","mappings":";;;;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B,MAAA,CAAC,GAEtC,EACV,uBAAA,IAAI,uDAAuB,MAA3B,IAAI,EAAwB,uBAAA,IAAI,6CAAa,CAAC,CAC3C,EAEN;;YAEE,KAAK,EAAC,iCAAiC;WAEvC,aAAO,KAAK,EAAC,OAAO,EAAC,OAAO,EAAC,UAAU,IACpC,uBAAA,IAAI,iDAAiB,CAAC,IAAI,CAAC,aAAa,CACnC,EACR,eACE,IAAI,EAAC,UAAU,EACf,EAAE,EAAC,UAAU,EACb,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,MAAA,IAAI,CAAC,sBAAsB,0CAAE,YAAY,EAChD,OAAO,EAAE,uBAAA,IAAI,2DAA2B,EACxC,GAAG,EAAE,CAAC,EAAqB,MACxB,uBAAA,IAAI,yCAAgB,EAAuB,MAAA,CAAC,GAEtC,EACV,uBAAA,IAAI,uDAAuB,MAA3B,IAAI,EAAwB,uBAAA,IAAI,6CAAa,CAAC,CAC3C,CACF,EAEN,cAAQ,KAAK,EAAC,yCAAyC,IACrD,WAAK,KAAK,EAAC,gBAAgB,IACzB;;YAEE,KAAK,EAAC,kBAAkB,EACxB,OAAO,EAAE,uBAAA,IAAI,oDAAoB;WAEhC,uBAAA,IAAI,iDAAiB,CAAC,MAAM,CAAC,mBAAmB,CAC1C,EAET;;YAEE,KAAK,EAAC,gBAAgB,EACtB,OAAO,EAAE,uBAAA,IAAI,qDAAqB;WAEjC,uBAAA,IAAI,iDAAiB,CAAC,MAAM,CAAC,oBAAoB,CAC3C,CACL,CACC,CACD,CACL,EACP;KACH;;;;;;;;;;;;;","names":[],"sources":["src/components/team-dev/connect-gx-server/helpers.ts","src/components/team-dev/connect-gx-server/connect-gx-server.scss?tag=gx-ide-connect-gx-server&encapsulation=shadow","src/components/team-dev/connect-gx-server/connect-gx-server.tsx"],"sourcesContent":["import { AuthenticationType } from \"./connect-gx-server\";\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\n\nexport const mapAuthenticationTypeToComboBoxModel = (\n authenticationTypes: AuthenticationType[]\n): ComboBoxModel => {\n return authenticationTypes.map(authenticationType => {\n return {\n value: authenticationType.id,\n caption: authenticationType.name\n };\n });\n};\n\nexport const mapServerUrlsToComboBoxModel = (\n serverUrls: string[]\n): ComboBoxModel => {\n return serverUrls.map(serverUrl => {\n return {\n value: serverUrl,\n caption: serverUrl\n };\n });\n};\n",":host {\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr max-content;\n}\n\n.main {\n display: grid;\n grid-template-areas:\n \"server-url server-url\"\n \"authentication-type .\"\n \"user-name user-password\";\n grid-auto-rows: max-content;\n grid-template-columns: 1fr 1fr;\n}\n\n.section {\n display: contents;\n}\n\n.authentication-type {\n grid-area: authentication-type;\n}\n.server-url {\n grid-area: server-url;\n}\n.user-name {\n grid-area: user-name;\n}\n.user-password {\n grid-area: user-password;\n}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n\n// Other Libraries\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\n// Custom Imports\nimport { config } from \"../../../common/config\";\nimport {\n mapAuthenticationTypeToComboBoxModel,\n mapServerUrlsToComboBoxModel\n} from \"./helpers\";\nimport { Locale } from \"../../../common/locale\";\nimport { FormSubmitResult } from \"../../../common/types\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../../common/form-validation\";\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\n@Component({\n tag: \"gx-ide-connect-gx-server\",\n styleUrl: \"connect-gx-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/connect-gx-server\"]\n})\nexport class HTMLGxIdeConnectGxServer {\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 @Element() el: HTMLGxIdeConnectGxServerElement;\n #usernameRef!: HTMLChEditElement;\n #passwordRef!: HTMLChEditElement;\n #serverUrlRef!: HTMLChComboBoxRenderElement;\n\n @State() authenticationTypesComboBoxModel: ComboBoxModel;\n @State() gxServerConnectionData: GXServerConnectionData = {\n authenticationType: {\n id: null,\n name: null\n },\n serverUrl: null,\n userName: null,\n userPassword: null\n };\n @State() serverUrlsComboBoxModel: ComboBoxModel;\n @State() validatableControls = new Map<string, ControlValidation>();\n\n /**\n * List of authentication types.\n */\n @Prop() readonly authenticationTypes!: AuthenticationType[];\n @Watch(\"authenticationTypes\")\n authenticationTypesChanged(newAuthenticationTypes: AuthenticationType[]) {\n if (newAuthenticationTypes?.length) {\n this.authenticationTypesComboBoxModel =\n mapAuthenticationTypeToComboBoxModel(newAuthenticationTypes);\n }\n }\n\n /**\n * Callback that must be invoked when the 'Cancel' button is pressed.\n */\n @Prop() readonly cancelCallback!: () => Promise<void>;\n\n /**\n * Callback that must be invoked when the 'Connect' button is pressed.\n */\n @Prop() readonly connectCallback!: (\n data: GXServerConnectionData\n ) => Promise<FormSubmitResult>;\n\n /**\n * Initial user values for the case in which the user returns to the login modal after successful authentication.\n */\n @Prop() readonly defaultConnectionData?: GXServerConnectionData;\n\n /**\n * true if the user should be allowed to manually enter a server URL.\n */\n @Prop() readonly enableCustomServer: boolean = false;\n\n /**\n * Array of cataloged server URLs to be displayed in the combo.\n */\n @Prop() readonly serverUrls: string[];\n @Watch(\"serverUrls\")\n serverUrlsChanged(newServerUrls: string[]) {\n if (newServerUrls?.length) {\n this.serverUrlsComboBoxModel =\n mapServerUrlsToComboBoxModel(newServerUrls);\n }\n }\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n\n this.#init();\n }\n\n async componentDidLoad() {\n this.#initializeValidatableControls();\n }\n\n #cancelClickHandler = () => {\n this.cancelCallback();\n };\n\n #connectClickHandler = async () => {\n this.connectCallback(this.gxServerConnectionData).then(\n (formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n }\n );\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on other dialogs 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 #init = () => {\n this.authenticationTypesChanged(this.authenticationTypes);\n this.serverUrlsChanged(this.serverUrls);\n // set initial values:\n // server url\n this.gxServerConnectionData.serverUrl = \"\";\n // authentication type\n this.gxServerConnectionData.authenticationType = {\n id:\n (this.defaultConnectionData?.authenticationType.id as string) ||\n this.authenticationTypesComboBoxModel[0]?.value,\n name:\n (this.defaultConnectionData?.authenticationType.name as string) ||\n this.authenticationTypesComboBoxModel[0]?.caption\n };\n\n // user name\n this.gxServerConnectionData.userName = this.defaultConnectionData?.userName;\n this.gxServerConnectionData.userPassword =\n this.defaultConnectionData?.userPassword;\n };\n\n #initializeValidatableControls = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#usernameRef,\n this.#passwordRef,\n this.#serverUrlRef\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 // handlers that update this.gxServerConnectionData:\n #serverUrlInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.serverUrl = event.detail as string;\n };\n #authenticationInputEventHandler = (\n event: CustomEvent<string> | InputEvent\n ) => {\n const authenticationTypeId = event.detail as string;\n const authenticationTypeIndex = this.authenticationTypes.findIndex(\n authType => {\n return authType.id === authenticationTypeId;\n }\n );\n const authenticationTypeName =\n this.authenticationTypes[authenticationTypeIndex].name;\n\n this.gxServerConnectionData.authenticationType = {\n id: authenticationTypeId,\n name: authenticationTypeName\n };\n };\n #usernameInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userName = event.detail as string;\n };\n #passwordInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userPassword = event.detail as string;\n };\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <section class=\"section\">\n <div class=\"main field-group spacing-body\">\n <div\n // server urls\n class=\"field field-block server-url\"\n >\n <label class=\"label\" htmlFor=\"server-url\">\n {this.#componentLocale.main.serverURLLabel}\n </label>\n <ch-combo-box-render\n id=\"server-url\"\n class=\"combo-box\"\n accessibleName=\"Server Url\"\n model={this.serverUrlsComboBoxModel}\n placeholder=\"Select a server URL\"\n value={this.gxServerConnectionData?.serverUrl}\n onChange={this.#serverUrlInputEventHandler}\n suggest={this.enableCustomServer}\n suggestOptions={{\n alreadyProcessed: false,\n autoExpand: false,\n hideMatchesAndShowNonMatches: false,\n highlightMatchedItems: false,\n matchCase: false,\n regularExpression: false,\n renderActiveItemIconOnExpand: true,\n strict: false\n }}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#serverUrlRef = el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#serverUrlRef)}\n </div>\n\n <div\n // authentication types\n class=\"field field-block authentication-type\"\n >\n <label class=\"label\" htmlFor=\"authentication-type\">\n {this.#componentLocale.main.authenticationTypeLabel}\n </label>\n <ch-combo-box-render\n id=\"authentication-type\"\n class=\"combo-box\"\n accessibleName=\"Authentication Types\"\n model={this.authenticationTypesComboBoxModel}\n placeholder=\"Select an authentication type\"\n value={this.gxServerConnectionData?.authenticationType.id}\n onInput={this.#authenticationInputEventHandler}\n ></ch-combo-box-render>\n </div>\n\n <div\n // username\n class=\"field field-block user-name\"\n >\n <label class=\"label\" htmlFor=\"username\">\n {this.#componentLocale.main.usernameLabel}\n </label>\n <ch-edit\n type=\"text\"\n id=\"username\"\n class=\"input\"\n value={this.gxServerConnectionData?.userName}\n onInput={this.#usernameInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#usernameRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#usernameRef)}\n </div>\n\n <div\n // user password\n class=\"field field-block user-password\"\n >\n <label class=\"label\" htmlFor=\"password\">\n {this.#componentLocale.main.passwordLabel}\n </label>\n <ch-edit\n type=\"password\"\n id=\"password\"\n class=\"input\"\n value={this.gxServerConnectionData?.userPassword}\n onInput={this.#passwordInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#passwordRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#passwordRef)}\n </div>\n </div>\n\n <footer class=\"control-footer-with-border spacing-body\">\n <div class=\"buttons-spacer\">\n <button\n // cancel button\n class=\"button-secondary\"\n onClick={this.#cancelClickHandler}\n >\n {this.#componentLocale.footer.cancelButtonCaption}\n </button>\n\n <button\n // connect button\n class=\"button-primary\"\n onClick={this.#connectClickHandler}\n >\n {this.#componentLocale.footer.connectButtonCaption}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type GXServerConnectionData = {\n authenticationType: AuthenticationType;\n serverUrl: string;\n userName: string;\n userPassword: string;\n};\n\nexport type AuthenticationType = {\n id: string;\n name: string;\n};\n"],"version":3}
|
|
@@ -13,5 +13,5 @@ export { s as setNonce } from "./p-25a9f1d7.js";
|
|
|
13
13
|
return e(t);
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
patchBrowser().then((e => a(JSON.parse('[["p-4328be14",[[1,"gx-ide-bpm-export-xpdl",{"displayTitle":[4,"display-title"],"exportCallback":[16],"cancelCallback":[16],"addCallback":[16],"referencesCallback":[16],"emptyInput":[32],"emptyObjects":[32],"notExporting":[32]}]]],["p-04c6bd23",[[1,"gx-ide-bpm-import-files",{"displayTitle":[4,"display-title"],"allowedExtensions":[16],"confirmCallback":[16],"cancelCallback":[16],"files":[32],"selectedFiles":[32]}]]],["p-45539ad0",[[1,"gx-ide-kb-manager-import",{"cancelCallback":[16],"importCallback":[16],"loadCallback":[16],"objectContextMenuCallback":[16],"optionsCallback":[16],"selectedFile":[1040],"statusMinimal":[4,"status-minimal"],"checkedObjectsIds":[32],"selectAllCheckboxValue":[32],"selectAllCheckboxIndeterminate":[32],"importStatusMessage":[32],"importTreeState":[32],"importedTreeFilterRegExp":[32],"importingIsInProcess":[32],"importTreeFilterList":[32],"noImport":[32],"noObjects":[32],"objectsTreeModel":[32],"showHiddenImportsMessage":[32],"someStatusVisible":[32],"statusInfo":[32],"addResultItem":[64]},null,{"importTreeState":["importTreeStateChanged","watchImportTreeStateHandler"],"objectsTreeModel":["watchObjectsTreeModelHandler"],"selectedFile":["selectedFileChanged"]}]]],["p-14165308",[[1,"gx-ide-team-dev-select-recent-comment",{"displayTitle":[4,"display-title"],"comments":[16],"confirmCallback":[16],"cancelCallback":[16]}]]],["p-75a5c51f",[[1,"gx-ide-team-dev-update",{"displayTitle":[4,"display-title"],"confirmCallback":[16],"gridContextMenuCallback":[16],"loadCallback":[16],"objectsScopeCallback":[16],"openServerCallback":[16],"pendingItemsCheckedCallback":[16],"revisionScopeCallback":[16],"objectsContextMenuCallback":[16],"selectCallback":[16],"types":[16],"updateCallback":[16],"updateFrom":[16],"isLoading":[32],"objectScopeText":[32],"openTab":[32],"revisionScopeText":[32],"showFilter":[32],"updateData":[32],"updateResultData":[32],"reload":[64]}]]],["p-ca9978e1",[[17,"gx-ide-data-selector",{"cancelCallback":[16],"confirmCallback":[16],"defaultModule":[16],"displayTitle":[4,"display-title"],"editCallback":[16],"loadItemsCallback":[16],"loader":[4],"newVariableCallback":[16],"selectObjectCallback":[16],"selectionType":[1,"selection-type"],"loading":[32],"objects":[32],"selectedObjectsIds":[32],"suspendShortcuts":[64],"validate":[64]}]]],["p-c92332af",[[1,"gx-ide-manage-module-references",{"displayTitle":[4,"display-title"],"servers":[16],"serverSelectedCallback":[16],"executeActionCallback":[16],"addServerCallback":[16],"serverContextMenuCallback":[16],"showServerCommands":[4,"show-server-commands"],"modulesAll":[32],"filteredModules":[32],"selectedModule":[32],"selectedServerId":[32],"selectedModuleAction":[32],"modulesSelectedVersion":[32],"actionCompleted":[32],"closeProgressBar":[32],"progressValue":[32],"progressState":[32],"loadingServer":[32],"reRenderCounter":[32],"validate":[64]},null,{"modulesAll":["modulesAllWatcher","onPropValueChange"],"loadingServer":["loadingServerHandler"]}]]],["p-7ae2a57f",[[1,"gx-ide-manage-module-references-v2",{"displayTitle":[4,"display-title"],"servers":[16],"serverSelectedCallback":[16],"executeActionCallback":[16],"serverContextMenuCallback":[16],"showServerCommands":[4,"show-server-commands"],"searchModulesFilterValue":[32],"selectedButtonFilter":[32],"serverModules":[32],"serverModulesExtended":[32],"filteredServerModules":[32],"modulesMap":[32],"selectedModule":[32],"selectedServerId":[32],"selectedModuleAction":[32],"modulesSelectedVersionMap":[32],"actionCompleted":[32],"closeProgressBar":[32],"progressValue":[32],"progressState":[32],"loadingServer":[32]},null,{"loadingServer":["loadingServerHandler"]}]]],["p-de7f0c1f",[[1,"gx-ide-navigation-report",{"headerData":[16],"confirmCallback":[16],"cancelCallback":[16],"closeCallback":[16],"itemSelectedCallback":[16],"reportTreeItems":[32],"navigationItemsStatusRegExpString":[32],"navigationItemsCaptionRegExpString":[32],"navigationItemsRegExp":[32],"confirmed":[32],"headerState":[32],"statusInfo":[32],"someStatusVisible":[32],"addItem":[64],"clearItems":[64]},null,{"navigationItemsStatusRegExpString":["navigationItemsStatusRegExpStringChanged"],"navigationItemsCaptionRegExpString":["navigationItemsCaptionRegExpStringChanged"]}]]],["p-ac131847",[[17,"gx-ide-object-selector",{"cancelCallback":[16],"categories":[16],"defaultCategory":[1,"default-category"],"defaultModule":[16],"defaultType":[1,"default-type"],"loader":[4],"loadCallback":[16],"multiSelection":[4,"multi-selection"],"newObjectCallback":[16],"openSelectionCallback":[16],"patternValue":[1,"pattern-value"],"selectModuleCallback":[16],"types":[16],"filterModified":[32],"loading":[32],"modifiedAfterValue":[32],"objects":[32],"selectedObjectsIdsArray":[32],"suspendShortcuts":[64],"validate":[64]}]]],["p-60e39b2f",[[1,"gx-ide-team-dev-history",{"types":[16],"itemContextMenuCallback":[16],"gridContextMenuCallback":[16],"selectedVersionId":[1025,"selected-version-id"],"versions":[1040],"loadCallback":[16],"loadDetailCallback":[16],"selectedVersionChangeCallback":[16],"historyDetail":[32],"objects":[32],"isFirstLoad":[32],"sidebarExpanded":[32],"filtersHidden":[32],"loading":[32],"selectedRevisionId":[32],"hasActiveVersion":[32]},null,{"selectedVersionId":["selectedVersionIdChanged"],"versions":["versionsListChanged"]}]]],["p-d77582b8",[[1,"gx-ide-ww-attributes",{"contextMenuCallback":[16],"deleteSelectionCallback":[16],"loadCallback":[16],"objectActionCallback":[16],"objects":[16],"openSelectionCallback":[16],"selectionChangeCallback":[16],"types":[16],"attributes":[32],"selectedAttributesIds":[32],"filterMore":[32],"name":[32],"loading":[32],"object":[32],"type":[32],"reload":[64],"validate":[64]},[[1,"keydown","keyDownHandler"]]]]],["p-3b5a4e2e",[[1,"gx-ide-ww-images",{"displayTitle":[4,"display-title"],"secondaryFilter":[4,"secondary-filter"],"categories":[16],"densities":[16],"defaultCategory":[1,"default-category"],"defaultModule":[16],"defaultType":[1,"default-type"],"filterModules":[16],"languages":[16],"layers":[16],"contextMenuCallback":[16],"deleteSelectionCallback":[16],"loadCallback":[16],"loadImageItemsCallback":[16],"newObjectCallback":[16],"openSelectionCallback":[16],"selectModuleCallback":[16],"selectionObjectChangedCallback":[16],"shadow":[4],"styles":[16],"types":[16],"filtersHidden":[32],"filterAfterType":[32],"filterModified":[32],"images":[32],"filteredImages":[32],"imagesSelectedItems":[32],"selectedObjectsIds":[32],"filterImagesInputValue":[32],"validate":[64],"reload":[64]},[[1,"keydown","keyDownHandler"]],{"filtersHidden":["filtersHiddenHandler"]}]]],["p-4b38fffc",[[1,"gx-ide-bpm-assign-roles",{"displayTitle":[4,"display-title"],"roles":[16],"assignedRoles":[16],"confirmCallback":[16],"cancelCallback":[16],"unassignedRolesState":[32],"assignedRolesState":[32],"filterUnassignedInput":[32],"filterAssignedInput":[32],"unassignedSelected":[32],"assignedSelected":[32]}]]],["p-e24902a0",[[1,"gx-ide-bpm-import-gxpm",{"displayTitle":[4,"display-title"],"confirmCallback":[16],"cancelCallback":[16],"selectedFile":[32],"pathValue":[32]}]]],["p-767e0f6d",[[1,"gx-ide-bpm-timer-duration",{"displayTitle":[4,"display-title"],"duration":[16],"confirmCallback":[16],"cancelCallback":[16]}]]],["p-a869ec48",[[1,"gx-ide-design-import",{"reactiveSettings":[16],"extensions":[16],"defaultModule":[16],"path":[1025],"accessToken":[1025,"access-token"],"importAsWebPanels":[4,"import-as-web-panels"],"selectModuleCallback":[16],"cancelCallback":[16],"confirmCallback":[16],"loadCallback":[16],"loadDesignSystemCallback":[16],"loadFontCallback":[16],"loadImageCallback":[16],"loadPanelDataCallback":[16],"requiresAccessTokenCallback":[16],"styles":[16],"textEditorFactoryCallback":[16],"reRenderCounter":[32],"stylesAsComboBoxModel":[32],"styleValue":[32],"accessTokenHasError":[32],"pathIsValid":[32],"tabsModel":[32],"activeTabs":[32],"renderedTabs":[32],"designData":[32],"detailTreeModel":[32],"isLoading":[32],"isLoaded":[32],"messages":[32],"selectedFile":[32],"selectedDesignType":[32],"selectedDesignItem":[32],"requiresAccessToken":[32],"designDataTreeDataModel":[32],"updateTabsActiveTab":[32],"fitImages":[32],"lastLoadCallbackSettingValues":[32]},null,{"pathIsValid":["pathIsValidChanged"],"designData":["designDataChanged"],"path":["pathChanged"],"accessToken":["accessTokenChanged"],"styles":["stylesChanged"],"messages":["watchMessagesHandler"]}]]],["p-45996535",[[1,"gx-ide-edit-module-server",{"types":[16],"name":[1],"source":[1],"type":[1],"confirmCallback":[16],"selectSourceCallback":[16],"cancelCallback":[16],"selectedType":[32]}]]],["p-fd440291",[[1,"gx-ide-kb-manager-export",{"addKBPropertiesCallback":[16],"addObjectsCallback":[16],"addReferencesCallback":[16],"cancelCallback":[16],"exportCallback":[16],"exportFileDirectoryCallback":[16],"fileName":[1,"file-name"],"kbPropertiesTypes":[16],"loader":[4],"objectTypes":[16],"optionsCallback":[16],"addKbPropertiesIsChecked":[32],"atLeastOnePropertyItemIsChecked":[32],"atLeastOneObjectItemIsChecked":[32],"checkedObjectsIds":[32],"checkedPropertiesIds":[32],"exportAllIsChecked":[32],"exportingIsInProcess":[32],"hasObjects":[32],"objectsTreeViewModel":[32]},null,{"objectsTreeViewModel":["objectsTreeViewModelChanged"],"objectTypes":["objectTypesChanged"]}]]],["p-641c79a9",[[1,"gx-ide-plugin-explorer",{"plugins":[1040],"filterCallback":[16],"showDetailsCallback":[16],"executeActionCallback":[16],"loading":[32],"pluginsActionListModel":[32]},null,{"plugins":["pluginsChangedHandler"]}]]],["p-4e6425f3",[[1,"gx-ide-sc-chat-container",{"mode":[1],"generatingResponse":[32],"loadingState":[32],"showAdditionalContent":[32],"conversationCopied":[32],"assistantStatus":[32],"chatItems":[32],"exitWelcome":[64]}]]],["p-54fb1287",[[1,"gx-ide-start-page",{"createKBCallback":[16],"openKbCallback":[16],"secondarySection":[16],"kbs":[16],"kbsFilterThreshold":[2,"kbs-filter-threshold"],"kbFilterValue":[32],"filteredKbs":[32],"loading":[32]},null,{"kbFilterValue":["kbFilterValueChanged"],"kbs":["kbsChanged"]}]]],["p-3fbc5a02",[[1,"gx-ide-team-dev-bring-changes",{"commitDetail":[16],"commitInformation":[16],"commitObjects":[16],"enableRowOptions":[4,"enable-row-options"],"hideFilters":[4,"hide-filters"],"operationType":[1,"operation-type"],"mergeObjectsCallback":[16],"mergePillAsButton":[4,"merge-pill-as-button"],"alreadyMergedObjectsIdsArray":[32],"atLeastOneObjectIsChecked":[32],"loading":[32],"menuContextAction":[32],"objectsFiltered":[32],"searchValue":[32],"stateFilterValue":[32],"markedObjectsSet":[32],"objectsStatesMap":[32],"commitObjectsMessagesMap":[32],"merging":[32],"updateObjectState":[64]},null,{"objectsStatesMap":["objectsStatesMapChanged"],"commitObjects":["commitObjectsChanged"]}]]],["p-34fd4875",[[1,"gx-ide-team-dev-commit",{"displayTitle":[4,"display-title"],"changeSet":[16],"types":[16],"folders":[16],"categories":[16],"getRecentCommentCallback":[16],"loadCallback":[16],"commitCallback":[16],"selectCallback":[16],"pendingItemsCheckedCallback":[16],"objectsContextMenuCallback":[16],"filtersHidden":[32],"comment":[32],"pendingCommits":[32],"ignoredObjects":[32],"commitButtonEnabled":[32],"filterHasConditions":[32],"reload":[64]}]]],["p-b1851e6b",[[1,"gx-ide-team-dev-update-partial-selection",{"displayTitle":[4,"display-title"],"addCallback":[16],"cancelCallback":[16],"confirmCallback":[16],"selection":[1040],"selectedObjectsIds":[32],"validate":[64]}]]],["p-f722955f",[[1,"gx-ide-team-dev-update-to-revision",{"displayTitle":[4,"display-title"],"cancelCallback":[16],"confirmCallback":[16],"currentRevision":[1,"current-revision"],"validate":[64]}]]],["p-b58fb87b",[[1,"gx-ide-template",{"displayTitle":[4,"display-title"]}]]],["p-b2928645",[[1,"gx-ide-wf-settings",{"displayTitle":[4,"display-title"],"configurationType":[1,"configuration-type"],"defaultConfiguration":[16],"saveCallback":[16],"cancelCallback":[16]}]]],["p-f49bb305",[[1,"gx-ide-ai-assistant",{"messages":[1040],"promptMaxHeight":[1,"prompt-max-height"],"assistantStatus":[1025,"assistant-status"],"focusShortcuts":[16],"userMessageCallback":[16],"clearCallback":[16],"promptValue":[1,"prompt-value"],"filter":[4],"userHasTyped":[32],"aIInProgress":[32],"showFilter":[32],"promptHasFocus":[32],"filterValue":[32],"clear":[64],"addMessage":[64]},[[2,"focus","handleFocus"]],{"aIInProgress":["watchAIInProgressHandler"],"messages":["watchMessagesHandler"]}]]],["p-7f65f9e3",[[1,"gx-ide-bpm-app-declaration",{"application":[1040],"cancelCallback":[16],"confirmCallback":[16],"getDataMappingCallback":[16],"selectApplicationCallback":[16],"selectMappingCallback":[16],"suggestApplicationsCallback":[16],"applicationComboBoxModel":[32]}]]],["p-1be1db4e",[[1,"gx-ide-bpm-task-documents",{"documents":[1040],"cancelCallback":[16],"confirmCallback":[16],"selectDocumentCallback":[16],"suggestDocumentsCallback":[16],"documentsActionListState":[32],"documentName":[32],"selectedDocument":[32],"suggestedDocuments":[32],"suspendShortcuts":[64]}]]],["p-667965d3",[[1,"gx-ide-dashboard-home",{"kb":[16],"enableEditKBName":[4,"enable-edit-k-b-name"],"environment":[16],"enableEditEnvironmentName":[4,"enable-edit-environment-name"],"projectDescription":[1,"project-description"],"enableEditDescription":[4,"enable-edit-description"],"recentObjects":[16],"renameKBCallback":[16],"renameEnvironmentCallback":[16],"editDescriptionCallback":[16],"openObjectCallback":[16],"editingEnvName":[32],"editingProjectDescription":[32]},null,{"recentObjects":["recentObjectsHandler"]}]]],["p-7cece7a8",[[1,"gx-ide-data-type-selector",{"categories":[16],"dataTypeSelectedCallback":[16],"arrowUpOnFirstElement":[16],"focusType":[1,"focus-type"],"recentlyUsed":[16],"categoriesListBoxModel":[32],"selectedCategory":[32],"recentlyUsedActionListModel":[32],"loading":[32],"categoriesJustChanged":[32],"actionListDidRender":[32]},null,{"categories":["categoriesChanged"],"recentlyUsed":["recentlyUsedChanged"]}]]],["p-03dbccde",[[1,"gx-ide-deployment-tool",{"deploymentUnits":[16],"targetTypes":[16],"defaultTargetTypeId":[1,"default-target-type-id"],"newDeploymentUnitId":[1,"new-deployment-unit-id"],"objectTypes":[16],"getDeploymentUnitObjectsCallback":[16],"optionsCallback":[16],"deployCallback":[16],"addObjectsCallback":[16],"createDeploymentUnitCallback":[16],"checkedObjectsIds":[32],"noObjects":[32],"selectedDeployTargetData":[32],"addedObjects":[32],"allObjectTypes":[32],"treeModel":[32],"allowDeploy":[32]},null,{"treeModel":["watchTreeModelHandler"],"objectTypes":["watchObjectTypesHandler"]}]]],["p-7d7cf30d",[[1,"gx-ide-file-uploader",{"types":[16],"multiple":[4],"canEditName":[4,"can-edit-name"],"label":[1],"uploadFunction":[16],"cancelUploadFunction":[16],"fileUploadedCallback":[16],"dialogCanceledCallback":[16],"dialogConfirmedCallback":[16],"uploadCancelledCallback":[16],"fileRenamedCallback":[16],"fileValidationErrorCallback":[16],"fileDeletionErrorCallback":[16],"fileDeletedCallback":[16],"onBeforeDelete":[16],"fileStates":[32],"isDragging":[32],"clear":[64]}]]],["p-8bb9242a",[[1,"gx-ide-json-import",{"cancelCallback":[16],"confirmCallback":[16],"defaultParent":[16],"defaultRadioValue":[1,"default-radio-value"],"parent":[16],"selectModuleCallback":[16],"modeChangeCallback":[16],"fileChangeCallback":[16],"validateNameCallback":[16],"validateJSONCallback":[16],"onJsonContentChange":[16],"fileName":[32],"radioGroupValue":[32],"isFormValid":[32],"jsonContent":[32],"validatableControls":[32],"suspendShortcuts":[64]}]]],["p-1bc2613e",[[17,"gx-ide-new-object",{"defaultTypeId":[1,"default-type-id"],"defaultParent":[16],"displayTitle":[4,"display-title"],"cancelCallback":[16],"createCallback":[16],"shadow":[4],"typeCategories":[1040],"parent":[16],"selectModuleCallback":[16],"validateNameCallback":[16],"suggestNameCallback":[16],"suggestDescriptionCallback":[16],"description":[32],"name":[32],"nameValidationErrorMessage":[32],"selectedCategory":[32],"selectedType":[32],"typeCategoriesActionListModel":[32],"typesActionListModel":[32],"selectedTypeMap":[32],"suspendShortcuts":[64]},null,{"typeCategories":["typeCategoriesChanged"]}]]],["p-1292a6b9",[[1,"gx-ide-open-api-import",{"defaultParent":[16],"displayTitle":[4,"display-title"],"cancelCallback":[16],"importCallback":[16],"loadCallback":[16],"selectParentCallback":[16],"actionListItems":[32],"importingIsInProcess":[32],"operations":[32],"selectedFile":[32],"selectedOperationForDescription":[32],"selectedOperations":[32],"selectAllCheckboxValue":[32],"selectAllCheckboxIndeterminate":[32],"suspendShortcuts":[64]}]]],["p-c50b9883",[[1,"gx-ide-references",{"loadReferencesCallback":[16],"openObjectCallback":[16],"openSelectorDialogCallback":[16],"selectReferenceCallback":[16],"selectorSourceCallback":[16],"selectedObject":[1040],"barHidden":[32],"objectsSuggestions":[32],"referencedByTreeData":[32],"referencesToTreeData":[32]},null,{"selectedObject":["selectedObjectChanged"]}]]],["p-d095a37c",[[1,"gx-ide-select-user-team",{"cancelCallback":[16],"continueCallback":[16],"teams":[16],"slideIsVisible":[32],"teamsModelReady":[32]},null,{"teams":["teamsChanged"]}]]],["p-68969051",[[1,"gx-ide-sign-in-team",{"authStep":[1,"auth-step"],"continueCallback":[16],"signInCallback":[16],"termsConfirmationRequired":[4,"terms-confirmation-required"],"teams":[16],"termsCallback":[16],"privacyCallback":[16],"authStepInternal":[32],"slideIsVisible":[32],"termsAndConditionsAccepted":[32]},null,{"authStep":["authStepChanged"],"teams":["teamsChanged"]}]]],["p-476b74a1",[[1,"gx-ide-about",{"versions":[16],"detailsCallback":[16],"privacyPolicyCallback":[16],"termsAndConditionsCallback":[16],"copying":[32]}]]],["p-ded7444c",[[1,"gx-ide-bpm-sync-gam-roles",{"cancelCallback":[16],"saveCallback":[16],"suspendShortcuts":[64]}]]],["p-35f9ebbc",[[1,"gx-ide-card",{"cardTitle":[1,"card-title"],"cardSubTitle":[1,"card-sub-title"],"icon":[1]}]]],["p-e502c2fd",[[1,"gx-ide-connect-gx-server",{"authenticationTypes":[16],"cancelCallback":[16],"connectCallback":[16],"defaultConnectionData":[16],"enableCustomServer":[4,"enable-custom-server"],"serverUrls":[16],"authenticationTypesComboBoxModel":[32],"gxServerConnectionData":[32],"serverUrlsComboBoxModel":[32],"validatableControls":[32]},null,{"authenticationTypes":["authenticationTypesChanged"],"serverUrls":["serverUrlsChanged"]}]]],["p-760d8f2a",[[1,"gx-ide-create-kb-from-server",{"connectionData":[16],"cancelCallback":[16],"changeConnectionCallback":[16],"createKBCallback":[16],"getGXserverKBsCallback":[16],"selectKBVersionsCallback":[16],"enableSelectVersionsButton":[32],"localKbNameInputValue":[32],"filterValue":[32],"kbsFilteredActionListModel":[32],"validatableControls":[32],"versionSelectedType":[32],"versionsValueInput":[32]}]]],["p-7d107d2f",[[1,"gx-ide-current-user-info",{"userInfo":[16],"myAccountCallback":[16],"changeTeamCallback":[16],"changeLanguageCallback":[16],"changeModeCallback":[16],"menuAlign":[16],"signOutCallback":[16],"termsCallback":[16],"privacyCallback":[16],"showMenu":[32]}]]],["p-31beae9e",[[1,"gx-ide-directory-selector",{"accessibilityLabels":[16],"label":[1],"labelPosition":[513,"label-position"],"centerLabel":[1028,"center-label"],"labelWidth":[1,"label-width"],"selectDirectoryCallback":[16],"value":[1025],"icon":[32]}]]],["p-f7421997",[[1,"gx-ide-gam-installation-settings",{"cancelCallback":[16],"canSelectPanels":[4,"can-select-panels"],"configurationType":[1,"configuration-type"],"defaultConfiguration":[16],"repairCallback":[16],"saveCallback":[16]}]]],["p-82878950",[[1,"gx-ide-new-environment",{"cancelCallback":[16],"createCallback":[16],"dataStores":[1040],"environmentName":[1025,"environment-name"],"getDataSourcesCallback":[16],"getEnvironmentNameCallback":[16],"getFrontEndsCallback":[16],"isAdvanced":[4,"is-advanced"],"languages":[16],"runtimes":[16],"setAsTarget":[4,"set-as-target"],"advancedTabIsVisible":[32],"frontEnds":[32],"validatableControls":[32],"dataStoresComboBoxModel":[32],"languageComboBoxModel":[32],"runtimesRadioGroupModel":[32],"suspendShortcuts":[64]},null,{"dataStores":["dataStoresChanged"],"languages":["languagesChanged"],"runtimes":["runtimesChanged"]}]]],["p-b465f29d",[[1,"gx-ide-new-kb",{"authenticationTypes":[16],"cancelCallback":[16],"collations":[16],"createCallback":[16],"createDataFilesInKBFolder":[4,"create-data-files-in-k-b-folder"],"databaseName":[1,"database-name"],"defaultDataSources":[1040],"getDataSourcesCallback":[16],"getFrontEndsCallback":[16],"isAdvanced":[4,"is-advanced"],"kbLocation":[1025,"kb-location"],"kbName":[1,"kb-name"],"password":[1],"prototypingEnvironments":[16],"prototypingTargets":[16],"savePassword":[4,"save-password"],"selectLocationCallback":[16],"serverNames":[16],"userInterfaceLanguages":[16],"userName":[1,"user-name"],"advancedTabIsVisible":[32],"frontEnds":[32],"validatableControls":[32],"createDataInKbDisabled":[32],"userNameVisible":[32],"passwordVisible":[32],"savePasswordVisible":[32],"authenticationTypesComboBoxModel":[32],"authenticationTypesInitialValue":[32],"collationsComboBoxModel":[32],"collationsInitialValue":[32],"defaultDataSourcesComboBoxModel":[32],"defaultDataSourcesInitialValue":[32],"prototypingTargetsComboBoxModel":[32],"prototypingTargetsInitialValue":[32],"prototypingEnvironmentsComboBoxModel":[32],"prototypingEnvironmentsInitialValue":[32],"serverNamesComboBoxModel":[32],"serverNamesInitialValue":[32],"userInterfaceLanguagesComboBoxModel":[32],"userInterfaceLanguagesInitialValue":[32],"suspendShortcuts":[64]},null,{"authenticationTypes":["watchAuthenticationTypes"],"collations":["watchCollations"],"defaultDataSources":["watchDefaultDataSources"],"prototypingEnvironments":["watchPrototypingEnvironments"],"prototypingTargets":["watchPrototypingTargets"],"serverNames":["watchServerNames"],"userInterfaceLanguages":["watchUserInterfaceLanguages"]}]]],["p-80c1ddc3",[[1,"gx-ide-new-version",{"isRemoteOperation":[4,"is-remote-operation"],"isFreezeOperation":[4,"is-freeze-operation"],"showLinkedLocalVersionCheckbox":[4,"show-linked-local-version-checkbox"],"cancelCallback":[16],"createCallback":[16],"defaultInputValues":[16],"versionName":[32],"versionDescription":[32],"setNewVersionAsActive":[32],"createLinkedLocalVersion":[32],"createAsProtectedVersion":[32],"validatableControls":[32]},null,{"defaultInputValues":["defaultInputValuesChanged"]}]]],["p-84c1c1bb",[[1,"gx-ide-plugin-details",{"data":[16],"installCallback":[16],"openLinkCallback":[16],"uninstallCallback":[16],"docsTabModel":[32],"selectedTabId":[32]}]]],["p-c9bca7c0",[[1,"gx-ide-entity-selector",{"defaultValue":[16],"disabled":[516],"labelCaption":[1,"label-caption"],"labelPosition":[513,"label-position"],"name":[513],"selectEntityCallback":[16],"value":[1040],"buttonHasFocus":[32],"iconSrc":[32]},null,{"value":["valueChangedHandler"]}]]],["p-385c9544",[[1,"gx-ide-ww-files",{"categories":[16],"defaultCategory":[1,"default-category"],"defaultModule":[16],"filterModules":[16],"types":[16],"contextMenuCallback":[16],"deleteSelectionCallback":[16],"loadCallback":[16],"newFileCallback":[16],"openSelectionCallback":[16],"selectModuleCallback":[16],"selectionChangeCallback":[16],"showSearchContents":[4,"show-search-contents"],"showDescription":[4,"show-description"],"showModifiedDate":[4,"show-modified-date"],"showLastUser":[4,"show-last-user"],"showImportDate":[4,"show-import-date"],"showType":[4,"show-type"],"showLastBuildDate":[4,"show-last-build-date"],"categoriesComboBoxModel":[32],"afterCurrentValue":[32],"filterAfterOptions":[32],"enabledModifiedControls":[32],"filterModified":[32],"filterMore":[32],"objects":[32],"filterFilesInputValue":[32],"filteredFiles":[32],"selectedObjectsIds":[32],"advancedFilterAccordionExpanded":[32],"validate":[64],"reload":[64]},[[1,"keydown","keyDownHandler"]],{"categories":["categoriesChanged"]}]]],["p-72e346b9",[[1,"gx-ide-share-kb",{"connectionData":[16],"cancelCallback":[16],"changeConnectionCallback":[16],"kbName":[1025,"kb-name"],"shareKBCallback":[16],"selectKBVersionsCallback":[16],"enableSelectVersionsButton":[32],"validatableControls":[32],"versionSelectedType":[32],"versionsValueInput":[32]}]]],["p-6b957e82",[[1,"gx-ide-sign-in",{"termsCallback":[16],"signInCallback":[16]}]]],["p-bbb5b0fb",[[1,"gx-ide-splash",{"downloadDockerCallback":[16],"quitCallback":[16],"messages":[16],"openLogCallback":[16],"showQuitButton":[4,"show-quit-button"],"showOpenLogLink":[4,"show-open-log-link"],"showDockerMissingError":[4,"show-docker-missing-error"],"ariaBusy":[32]}]]],["p-304d5629",[[1,"gx-ide-switch-panel"]]],["p-c58e0a92",[[1,"gx-ide-switcher"]]],["p-46ffec64",[[1,"gx-ide-test",{"name":[1],"filterOn":[32]}]]],["p-cbe2dd13",[[1,"gx-ide-top-bar",{"topBarTitle":[1,"top-bar-title"]}]]],["p-93cdb6f8",[[1,"gx-ide-welcome-page",{"transitionType":[1,"transition-type"],"wordsPerMinute":[2,"words-per-minute"],"closeCallback":[16],"slides":[16],"activeSlideIndex":[32],"displaySlider":[32],"copyrightsVisible":[32],"lastSlideReached":[32],"sliderVisible":[32],"slideTransitioning":[32],"userHasChangedSlide":[32]}]]],["p-86365635",[[1,"gx-ide-empty-state",{"isAnimated":[4,"is-animated"],"stateDescription":[1,"state-description"],"stateIconSrc":[1,"state-icon-src"],"stateTitle":[1,"state-title"]}]]],["p-1dd7be84",[[1,"gx-ide-container",{"inactiveTitle":[4,"inactive-title"],"containerTitle":[1,"container-title"],"titleType":[1,"title-type"],"displayBorder":[4,"display-border"],"displayBorderTop":[4,"display-border-top"],"displayBorderEnd":[4,"display-border-end"],"displayBorderBottom":[4,"display-border-bottom"],"displayBorderStart":[4,"display-border-start"],"sectionsPadding":[1,"sections-padding"],"titleAlignment":[1,"title-alignment"],"noHeadingBorder":[4,"no-heading-border"],"noHeadingGap":[4,"no-heading-gap"],"noHeadingPadding":[4,"no-heading-padding"],"noHeadingPaddingBlockEnd":[4,"no-heading-padding-block-end"],"headingPaddingTop":[4,"heading-padding-top"],"headingJustify":[1,"heading-justify"],"titleHeightAsInput":[4,"title-height-as-input"],"flexRow":[4,"flex-row"],"flexContent":[4,"flex-content"],"noContentBorderTop":[4,"no-content-border-top"],"noContentPadding":[4,"no-content-padding"],"noContentGap":[4,"no-content-gap"],"alignItems":[1,"align-items"],"justifyContent":[1,"justify-content"],"contentBorderEnd":[4,"content-border-end"],"slimmerAboveFooter":[4,"slimmer-above-footer"],"noAboveFooterPadding":[4,"no-above-footer-padding"],"noBorderAboveFooter":[4,"no-border-above-footer"],"slimmerFooter":[4,"slimmer-footer"],"noFooterPadding":[4,"no-footer-padding"],"footerJustify":[1,"footer-justify"],"noBorderFooter":[4,"no-border-footer"],"hasHeaderSlot":[32],"hasSlottedContent":[32],"hasFooterSlot":[32],"hasAboveFooterSlot":[32],"hasOnlyHeading":[32],"hasOnlyContent":[32],"hasOnlyFooter":[32]}],[1,"gx-ide-title",{"titleCaption":[1,"title-caption"],"type":[1],"alignment":[1],"padding":[516],"noPaddingBottom":[516,"no-padding-bottom"],"border":[516]}]]],["p-d8379699",[[1,"gx-ide-bpm-objects-selector",{"displayTitle":[4,"display-title"],"selection":[1040],"addCallback":[16],"referencesCallback":[16],"objects":[32],"selectedObjects":[32]}]]],["p-52f37ec7",[[1,"gx-ide-select-kb-items",{"activeItemCallback":[16],"cancelCallback":[16],"checkboxType":[1,"checkbox-type"],"expandOnClick":[4,"expand-on-click"],"checkedChanged":[16],"confirmCallback":[16],"dialogActions":[16],"itemContextMenuCallback":[16],"itemsList":[16],"multiSelection":[4,"multi-selection"],"showActiveItemLink":[4,"show-active-item-link"],"selectionChanged":[16],"activeItemNode":[32],"renderFooter":[32],"nodeListFlattenedTreeModel":[32],"loading":[32],"nodesVersionsViewType":[32],"nodeVersionsListTreeModel":[32],"searchPatternValue":[32],"toggleCheckboxes":[32],"suspendShortcuts":[64],"updateSelection":[64]},null,{"itemsList":["watchNodeListHandler"]}]]],["p-74a0cb25",[[0,"gx-ide-ai-message",{"aiAssistantHostRef":[16],"message":[1],"messageType":[1,"message-type"],"filterValue":[1,"filter-value"],"hidden":[4],"translations":[16],"visible":[32],"showCopiedMessage":[32]}]]],["p-7053c38e",[[1,"gx-ide-file-item",{"file":[16],"editable":[4],"fileDeletedCallback":[16],"fileDeletionErrorCallback":[16],"isEditing":[32],"currentName":[32]},null,{"file":["handleFileChange"]}]]],["p-05b04291",[[1,"gx-ide-list-selector",{"ordered":[4],"readonly":[4],"type":[1],"required":[4],"ellipsis":[4],"value":[1025],"listName":[1,"list-name"],"noItemsBorder":[4,"no-items-border"],"noListBorder":[516,"no-list-border"]},[[2,"itemSelectionChanged","itemSelectionChangedHandler"]]],[4,"gx-ide-list-selector-item",{"itemId":[513,"item-id"],"itemValue":[1,"item-value"],"itemChecked":[1028,"item-checked"],"readonly":[1540],"ellipsis":[1540],"icon":[1],"noBorder":[1540,"no-border"],"universalSlotEnd":[516,"universal-slot-end"]}]]],["p-e7fb3ee3",[[1,"gx-ide-status-buttons",{"active":[4],"errors":[2],"hideError":[4,"hide-error"],"warnings":[2],"hideWarning":[4,"hide-warning"],"successes":[2],"hideSuccess":[4,"hide-success"],"messages":[2],"hideMessage":[4,"hide-message"],"minimal":[4],"compact":[516],"noInnerBorders":[516,"no-inner-borders"],"iconsSize":[32]}]]],["p-0cd3ab87",[[4,"gx-ide-chat-container",{"chatTitle":[1,"chat-title"],"copyConversationCallback":[16],"deleteConversationCallback":[16],"displayWelcomeScreen":[4,"display-welcome-screen"],"displayConversationCopiedMessage":[32],"menuIsExpanded":[32],"showCopyConversationMessage":[64]}],[1,"gx-ide-chat-welcome",{"welcomeTitle":[1025,"welcome-title"],"welcomeGreeting":[1025,"welcome-greeting"],"suggestedPrompts":[1040],"suggestedPrompRequestedCallback":[16],"showHeader":[32],"showSuggestedPrompts":[32],"hideWelcome":[32],"exitWelcome":[64]}]]],["p-94904819",[[1,"gx-ide-loader",{"abortTime":[2,"abort-time"],"cancelCallback":[16],"cancelLabel":[1,"cancel-label"],"description":[1],"displayBorder":[516,"display-border"],"loaderTitle":[1,"loader-title"],"show":[1028],"showWrapper":[32]}]]]]'), e)));
|
|
16
|
+
patchBrowser().then((e => a(JSON.parse('[["p-4328be14",[[1,"gx-ide-bpm-export-xpdl",{"displayTitle":[4,"display-title"],"exportCallback":[16],"cancelCallback":[16],"addCallback":[16],"referencesCallback":[16],"emptyInput":[32],"emptyObjects":[32],"notExporting":[32]}]]],["p-04c6bd23",[[1,"gx-ide-bpm-import-files",{"displayTitle":[4,"display-title"],"allowedExtensions":[16],"confirmCallback":[16],"cancelCallback":[16],"files":[32],"selectedFiles":[32]}]]],["p-45539ad0",[[1,"gx-ide-kb-manager-import",{"cancelCallback":[16],"importCallback":[16],"loadCallback":[16],"objectContextMenuCallback":[16],"optionsCallback":[16],"selectedFile":[1040],"statusMinimal":[4,"status-minimal"],"checkedObjectsIds":[32],"selectAllCheckboxValue":[32],"selectAllCheckboxIndeterminate":[32],"importStatusMessage":[32],"importTreeState":[32],"importedTreeFilterRegExp":[32],"importingIsInProcess":[32],"importTreeFilterList":[32],"noImport":[32],"noObjects":[32],"objectsTreeModel":[32],"showHiddenImportsMessage":[32],"someStatusVisible":[32],"statusInfo":[32],"addResultItem":[64]},null,{"importTreeState":["importTreeStateChanged","watchImportTreeStateHandler"],"objectsTreeModel":["watchObjectsTreeModelHandler"],"selectedFile":["selectedFileChanged"]}]]],["p-14165308",[[1,"gx-ide-team-dev-select-recent-comment",{"displayTitle":[4,"display-title"],"comments":[16],"confirmCallback":[16],"cancelCallback":[16]}]]],["p-75a5c51f",[[1,"gx-ide-team-dev-update",{"displayTitle":[4,"display-title"],"confirmCallback":[16],"gridContextMenuCallback":[16],"loadCallback":[16],"objectsScopeCallback":[16],"openServerCallback":[16],"pendingItemsCheckedCallback":[16],"revisionScopeCallback":[16],"objectsContextMenuCallback":[16],"selectCallback":[16],"types":[16],"updateCallback":[16],"updateFrom":[16],"isLoading":[32],"objectScopeText":[32],"openTab":[32],"revisionScopeText":[32],"showFilter":[32],"updateData":[32],"updateResultData":[32],"reload":[64]}]]],["p-ca9978e1",[[17,"gx-ide-data-selector",{"cancelCallback":[16],"confirmCallback":[16],"defaultModule":[16],"displayTitle":[4,"display-title"],"editCallback":[16],"loadItemsCallback":[16],"loader":[4],"newVariableCallback":[16],"selectObjectCallback":[16],"selectionType":[1,"selection-type"],"loading":[32],"objects":[32],"selectedObjectsIds":[32],"suspendShortcuts":[64],"validate":[64]}]]],["p-c92332af",[[1,"gx-ide-manage-module-references",{"displayTitle":[4,"display-title"],"servers":[16],"serverSelectedCallback":[16],"executeActionCallback":[16],"addServerCallback":[16],"serverContextMenuCallback":[16],"showServerCommands":[4,"show-server-commands"],"modulesAll":[32],"filteredModules":[32],"selectedModule":[32],"selectedServerId":[32],"selectedModuleAction":[32],"modulesSelectedVersion":[32],"actionCompleted":[32],"closeProgressBar":[32],"progressValue":[32],"progressState":[32],"loadingServer":[32],"reRenderCounter":[32],"validate":[64]},null,{"modulesAll":["modulesAllWatcher","onPropValueChange"],"loadingServer":["loadingServerHandler"]}]]],["p-7ae2a57f",[[1,"gx-ide-manage-module-references-v2",{"displayTitle":[4,"display-title"],"servers":[16],"serverSelectedCallback":[16],"executeActionCallback":[16],"serverContextMenuCallback":[16],"showServerCommands":[4,"show-server-commands"],"searchModulesFilterValue":[32],"selectedButtonFilter":[32],"serverModules":[32],"serverModulesExtended":[32],"filteredServerModules":[32],"modulesMap":[32],"selectedModule":[32],"selectedServerId":[32],"selectedModuleAction":[32],"modulesSelectedVersionMap":[32],"actionCompleted":[32],"closeProgressBar":[32],"progressValue":[32],"progressState":[32],"loadingServer":[32]},null,{"loadingServer":["loadingServerHandler"]}]]],["p-de7f0c1f",[[1,"gx-ide-navigation-report",{"headerData":[16],"confirmCallback":[16],"cancelCallback":[16],"closeCallback":[16],"itemSelectedCallback":[16],"reportTreeItems":[32],"navigationItemsStatusRegExpString":[32],"navigationItemsCaptionRegExpString":[32],"navigationItemsRegExp":[32],"confirmed":[32],"headerState":[32],"statusInfo":[32],"someStatusVisible":[32],"addItem":[64],"clearItems":[64]},null,{"navigationItemsStatusRegExpString":["navigationItemsStatusRegExpStringChanged"],"navigationItemsCaptionRegExpString":["navigationItemsCaptionRegExpStringChanged"]}]]],["p-ac131847",[[17,"gx-ide-object-selector",{"cancelCallback":[16],"categories":[16],"defaultCategory":[1,"default-category"],"defaultModule":[16],"defaultType":[1,"default-type"],"loader":[4],"loadCallback":[16],"multiSelection":[4,"multi-selection"],"newObjectCallback":[16],"openSelectionCallback":[16],"patternValue":[1,"pattern-value"],"selectModuleCallback":[16],"types":[16],"filterModified":[32],"loading":[32],"modifiedAfterValue":[32],"objects":[32],"selectedObjectsIdsArray":[32],"suspendShortcuts":[64],"validate":[64]}]]],["p-60e39b2f",[[1,"gx-ide-team-dev-history",{"types":[16],"itemContextMenuCallback":[16],"gridContextMenuCallback":[16],"selectedVersionId":[1025,"selected-version-id"],"versions":[1040],"loadCallback":[16],"loadDetailCallback":[16],"selectedVersionChangeCallback":[16],"historyDetail":[32],"objects":[32],"isFirstLoad":[32],"sidebarExpanded":[32],"filtersHidden":[32],"loading":[32],"selectedRevisionId":[32],"hasActiveVersion":[32]},null,{"selectedVersionId":["selectedVersionIdChanged"],"versions":["versionsListChanged"]}]]],["p-d77582b8",[[1,"gx-ide-ww-attributes",{"contextMenuCallback":[16],"deleteSelectionCallback":[16],"loadCallback":[16],"objectActionCallback":[16],"objects":[16],"openSelectionCallback":[16],"selectionChangeCallback":[16],"types":[16],"attributes":[32],"selectedAttributesIds":[32],"filterMore":[32],"name":[32],"loading":[32],"object":[32],"type":[32],"reload":[64],"validate":[64]},[[1,"keydown","keyDownHandler"]]]]],["p-3b5a4e2e",[[1,"gx-ide-ww-images",{"displayTitle":[4,"display-title"],"secondaryFilter":[4,"secondary-filter"],"categories":[16],"densities":[16],"defaultCategory":[1,"default-category"],"defaultModule":[16],"defaultType":[1,"default-type"],"filterModules":[16],"languages":[16],"layers":[16],"contextMenuCallback":[16],"deleteSelectionCallback":[16],"loadCallback":[16],"loadImageItemsCallback":[16],"newObjectCallback":[16],"openSelectionCallback":[16],"selectModuleCallback":[16],"selectionObjectChangedCallback":[16],"shadow":[4],"styles":[16],"types":[16],"filtersHidden":[32],"filterAfterType":[32],"filterModified":[32],"images":[32],"filteredImages":[32],"imagesSelectedItems":[32],"selectedObjectsIds":[32],"filterImagesInputValue":[32],"validate":[64],"reload":[64]},[[1,"keydown","keyDownHandler"]],{"filtersHidden":["filtersHiddenHandler"]}]]],["p-4b38fffc",[[1,"gx-ide-bpm-assign-roles",{"displayTitle":[4,"display-title"],"roles":[16],"assignedRoles":[16],"confirmCallback":[16],"cancelCallback":[16],"unassignedRolesState":[32],"assignedRolesState":[32],"filterUnassignedInput":[32],"filterAssignedInput":[32],"unassignedSelected":[32],"assignedSelected":[32]}]]],["p-e24902a0",[[1,"gx-ide-bpm-import-gxpm",{"displayTitle":[4,"display-title"],"confirmCallback":[16],"cancelCallback":[16],"selectedFile":[32],"pathValue":[32]}]]],["p-767e0f6d",[[1,"gx-ide-bpm-timer-duration",{"displayTitle":[4,"display-title"],"duration":[16],"confirmCallback":[16],"cancelCallback":[16]}]]],["p-a869ec48",[[1,"gx-ide-design-import",{"reactiveSettings":[16],"extensions":[16],"defaultModule":[16],"path":[1025],"accessToken":[1025,"access-token"],"importAsWebPanels":[4,"import-as-web-panels"],"selectModuleCallback":[16],"cancelCallback":[16],"confirmCallback":[16],"loadCallback":[16],"loadDesignSystemCallback":[16],"loadFontCallback":[16],"loadImageCallback":[16],"loadPanelDataCallback":[16],"requiresAccessTokenCallback":[16],"styles":[16],"textEditorFactoryCallback":[16],"reRenderCounter":[32],"stylesAsComboBoxModel":[32],"styleValue":[32],"accessTokenHasError":[32],"pathIsValid":[32],"tabsModel":[32],"activeTabs":[32],"renderedTabs":[32],"designData":[32],"detailTreeModel":[32],"isLoading":[32],"isLoaded":[32],"messages":[32],"selectedFile":[32],"selectedDesignType":[32],"selectedDesignItem":[32],"requiresAccessToken":[32],"designDataTreeDataModel":[32],"updateTabsActiveTab":[32],"fitImages":[32],"lastLoadCallbackSettingValues":[32]},null,{"pathIsValid":["pathIsValidChanged"],"designData":["designDataChanged"],"path":["pathChanged"],"accessToken":["accessTokenChanged"],"styles":["stylesChanged"],"messages":["watchMessagesHandler"]}]]],["p-45996535",[[1,"gx-ide-edit-module-server",{"types":[16],"name":[1],"source":[1],"type":[1],"confirmCallback":[16],"selectSourceCallback":[16],"cancelCallback":[16],"selectedType":[32]}]]],["p-fd440291",[[1,"gx-ide-kb-manager-export",{"addKBPropertiesCallback":[16],"addObjectsCallback":[16],"addReferencesCallback":[16],"cancelCallback":[16],"exportCallback":[16],"exportFileDirectoryCallback":[16],"fileName":[1,"file-name"],"kbPropertiesTypes":[16],"loader":[4],"objectTypes":[16],"optionsCallback":[16],"addKbPropertiesIsChecked":[32],"atLeastOnePropertyItemIsChecked":[32],"atLeastOneObjectItemIsChecked":[32],"checkedObjectsIds":[32],"checkedPropertiesIds":[32],"exportAllIsChecked":[32],"exportingIsInProcess":[32],"hasObjects":[32],"objectsTreeViewModel":[32]},null,{"objectsTreeViewModel":["objectsTreeViewModelChanged"],"objectTypes":["objectTypesChanged"]}]]],["p-641c79a9",[[1,"gx-ide-plugin-explorer",{"plugins":[1040],"filterCallback":[16],"showDetailsCallback":[16],"executeActionCallback":[16],"loading":[32],"pluginsActionListModel":[32]},null,{"plugins":["pluginsChangedHandler"]}]]],["p-4e6425f3",[[1,"gx-ide-sc-chat-container",{"mode":[1],"generatingResponse":[32],"loadingState":[32],"showAdditionalContent":[32],"conversationCopied":[32],"assistantStatus":[32],"chatItems":[32],"exitWelcome":[64]}]]],["p-54fb1287",[[1,"gx-ide-start-page",{"createKBCallback":[16],"openKbCallback":[16],"secondarySection":[16],"kbs":[16],"kbsFilterThreshold":[2,"kbs-filter-threshold"],"kbFilterValue":[32],"filteredKbs":[32],"loading":[32]},null,{"kbFilterValue":["kbFilterValueChanged"],"kbs":["kbsChanged"]}]]],["p-3fbc5a02",[[1,"gx-ide-team-dev-bring-changes",{"commitDetail":[16],"commitInformation":[16],"commitObjects":[16],"enableRowOptions":[4,"enable-row-options"],"hideFilters":[4,"hide-filters"],"operationType":[1,"operation-type"],"mergeObjectsCallback":[16],"mergePillAsButton":[4,"merge-pill-as-button"],"alreadyMergedObjectsIdsArray":[32],"atLeastOneObjectIsChecked":[32],"loading":[32],"menuContextAction":[32],"objectsFiltered":[32],"searchValue":[32],"stateFilterValue":[32],"markedObjectsSet":[32],"objectsStatesMap":[32],"commitObjectsMessagesMap":[32],"merging":[32],"updateObjectState":[64]},null,{"objectsStatesMap":["objectsStatesMapChanged"],"commitObjects":["commitObjectsChanged"]}]]],["p-34fd4875",[[1,"gx-ide-team-dev-commit",{"displayTitle":[4,"display-title"],"changeSet":[16],"types":[16],"folders":[16],"categories":[16],"getRecentCommentCallback":[16],"loadCallback":[16],"commitCallback":[16],"selectCallback":[16],"pendingItemsCheckedCallback":[16],"objectsContextMenuCallback":[16],"filtersHidden":[32],"comment":[32],"pendingCommits":[32],"ignoredObjects":[32],"commitButtonEnabled":[32],"filterHasConditions":[32],"reload":[64]}]]],["p-b1851e6b",[[1,"gx-ide-team-dev-update-partial-selection",{"displayTitle":[4,"display-title"],"addCallback":[16],"cancelCallback":[16],"confirmCallback":[16],"selection":[1040],"selectedObjectsIds":[32],"validate":[64]}]]],["p-f722955f",[[1,"gx-ide-team-dev-update-to-revision",{"displayTitle":[4,"display-title"],"cancelCallback":[16],"confirmCallback":[16],"currentRevision":[1,"current-revision"],"validate":[64]}]]],["p-b58fb87b",[[1,"gx-ide-template",{"displayTitle":[4,"display-title"]}]]],["p-b2928645",[[1,"gx-ide-wf-settings",{"displayTitle":[4,"display-title"],"configurationType":[1,"configuration-type"],"defaultConfiguration":[16],"saveCallback":[16],"cancelCallback":[16]}]]],["p-f49bb305",[[1,"gx-ide-ai-assistant",{"messages":[1040],"promptMaxHeight":[1,"prompt-max-height"],"assistantStatus":[1025,"assistant-status"],"focusShortcuts":[16],"userMessageCallback":[16],"clearCallback":[16],"promptValue":[1,"prompt-value"],"filter":[4],"userHasTyped":[32],"aIInProgress":[32],"showFilter":[32],"promptHasFocus":[32],"filterValue":[32],"clear":[64],"addMessage":[64]},[[2,"focus","handleFocus"]],{"aIInProgress":["watchAIInProgressHandler"],"messages":["watchMessagesHandler"]}]]],["p-7f65f9e3",[[1,"gx-ide-bpm-app-declaration",{"application":[1040],"cancelCallback":[16],"confirmCallback":[16],"getDataMappingCallback":[16],"selectApplicationCallback":[16],"selectMappingCallback":[16],"suggestApplicationsCallback":[16],"applicationComboBoxModel":[32]}]]],["p-1be1db4e",[[1,"gx-ide-bpm-task-documents",{"documents":[1040],"cancelCallback":[16],"confirmCallback":[16],"selectDocumentCallback":[16],"suggestDocumentsCallback":[16],"documentsActionListState":[32],"documentName":[32],"selectedDocument":[32],"suggestedDocuments":[32],"suspendShortcuts":[64]}]]],["p-667965d3",[[1,"gx-ide-dashboard-home",{"kb":[16],"enableEditKBName":[4,"enable-edit-k-b-name"],"environment":[16],"enableEditEnvironmentName":[4,"enable-edit-environment-name"],"projectDescription":[1,"project-description"],"enableEditDescription":[4,"enable-edit-description"],"recentObjects":[16],"renameKBCallback":[16],"renameEnvironmentCallback":[16],"editDescriptionCallback":[16],"openObjectCallback":[16],"editingEnvName":[32],"editingProjectDescription":[32]},null,{"recentObjects":["recentObjectsHandler"]}]]],["p-7cece7a8",[[1,"gx-ide-data-type-selector",{"categories":[16],"dataTypeSelectedCallback":[16],"arrowUpOnFirstElement":[16],"focusType":[1,"focus-type"],"recentlyUsed":[16],"categoriesListBoxModel":[32],"selectedCategory":[32],"recentlyUsedActionListModel":[32],"loading":[32],"categoriesJustChanged":[32],"actionListDidRender":[32]},null,{"categories":["categoriesChanged"],"recentlyUsed":["recentlyUsedChanged"]}]]],["p-03dbccde",[[1,"gx-ide-deployment-tool",{"deploymentUnits":[16],"targetTypes":[16],"defaultTargetTypeId":[1,"default-target-type-id"],"newDeploymentUnitId":[1,"new-deployment-unit-id"],"objectTypes":[16],"getDeploymentUnitObjectsCallback":[16],"optionsCallback":[16],"deployCallback":[16],"addObjectsCallback":[16],"createDeploymentUnitCallback":[16],"checkedObjectsIds":[32],"noObjects":[32],"selectedDeployTargetData":[32],"addedObjects":[32],"allObjectTypes":[32],"treeModel":[32],"allowDeploy":[32]},null,{"treeModel":["watchTreeModelHandler"],"objectTypes":["watchObjectTypesHandler"]}]]],["p-7d7cf30d",[[1,"gx-ide-file-uploader",{"types":[16],"multiple":[4],"canEditName":[4,"can-edit-name"],"label":[1],"uploadFunction":[16],"cancelUploadFunction":[16],"fileUploadedCallback":[16],"dialogCanceledCallback":[16],"dialogConfirmedCallback":[16],"uploadCancelledCallback":[16],"fileRenamedCallback":[16],"fileValidationErrorCallback":[16],"fileDeletionErrorCallback":[16],"fileDeletedCallback":[16],"onBeforeDelete":[16],"fileStates":[32],"isDragging":[32],"clear":[64]}]]],["p-8bb9242a",[[1,"gx-ide-json-import",{"cancelCallback":[16],"confirmCallback":[16],"defaultParent":[16],"defaultRadioValue":[1,"default-radio-value"],"parent":[16],"selectModuleCallback":[16],"modeChangeCallback":[16],"fileChangeCallback":[16],"validateNameCallback":[16],"validateJSONCallback":[16],"onJsonContentChange":[16],"fileName":[32],"radioGroupValue":[32],"isFormValid":[32],"jsonContent":[32],"validatableControls":[32],"suspendShortcuts":[64]}]]],["p-1bc2613e",[[17,"gx-ide-new-object",{"defaultTypeId":[1,"default-type-id"],"defaultParent":[16],"displayTitle":[4,"display-title"],"cancelCallback":[16],"createCallback":[16],"shadow":[4],"typeCategories":[1040],"parent":[16],"selectModuleCallback":[16],"validateNameCallback":[16],"suggestNameCallback":[16],"suggestDescriptionCallback":[16],"description":[32],"name":[32],"nameValidationErrorMessage":[32],"selectedCategory":[32],"selectedType":[32],"typeCategoriesActionListModel":[32],"typesActionListModel":[32],"selectedTypeMap":[32],"suspendShortcuts":[64]},null,{"typeCategories":["typeCategoriesChanged"]}]]],["p-1292a6b9",[[1,"gx-ide-open-api-import",{"defaultParent":[16],"displayTitle":[4,"display-title"],"cancelCallback":[16],"importCallback":[16],"loadCallback":[16],"selectParentCallback":[16],"actionListItems":[32],"importingIsInProcess":[32],"operations":[32],"selectedFile":[32],"selectedOperationForDescription":[32],"selectedOperations":[32],"selectAllCheckboxValue":[32],"selectAllCheckboxIndeterminate":[32],"suspendShortcuts":[64]}]]],["p-c50b9883",[[1,"gx-ide-references",{"loadReferencesCallback":[16],"openObjectCallback":[16],"openSelectorDialogCallback":[16],"selectReferenceCallback":[16],"selectorSourceCallback":[16],"selectedObject":[1040],"barHidden":[32],"objectsSuggestions":[32],"referencedByTreeData":[32],"referencesToTreeData":[32]},null,{"selectedObject":["selectedObjectChanged"]}]]],["p-d095a37c",[[1,"gx-ide-select-user-team",{"cancelCallback":[16],"continueCallback":[16],"teams":[16],"slideIsVisible":[32],"teamsModelReady":[32]},null,{"teams":["teamsChanged"]}]]],["p-68969051",[[1,"gx-ide-sign-in-team",{"authStep":[1,"auth-step"],"continueCallback":[16],"signInCallback":[16],"termsConfirmationRequired":[4,"terms-confirmation-required"],"teams":[16],"termsCallback":[16],"privacyCallback":[16],"authStepInternal":[32],"slideIsVisible":[32],"termsAndConditionsAccepted":[32]},null,{"authStep":["authStepChanged"],"teams":["teamsChanged"]}]]],["p-476b74a1",[[1,"gx-ide-about",{"versions":[16],"detailsCallback":[16],"privacyPolicyCallback":[16],"termsAndConditionsCallback":[16],"copying":[32]}]]],["p-ded7444c",[[1,"gx-ide-bpm-sync-gam-roles",{"cancelCallback":[16],"saveCallback":[16],"suspendShortcuts":[64]}]]],["p-35f9ebbc",[[1,"gx-ide-card",{"cardTitle":[1,"card-title"],"cardSubTitle":[1,"card-sub-title"],"icon":[1]}]]],["p-b822181c",[[1,"gx-ide-connect-gx-server",{"authenticationTypes":[16],"cancelCallback":[16],"connectCallback":[16],"defaultConnectionData":[16],"enableCustomServer":[4,"enable-custom-server"],"serverUrls":[16],"authenticationTypesComboBoxModel":[32],"gxServerConnectionData":[32],"serverUrlsComboBoxModel":[32],"validatableControls":[32]},null,{"authenticationTypes":["authenticationTypesChanged"],"serverUrls":["serverUrlsChanged"]}]]],["p-760d8f2a",[[1,"gx-ide-create-kb-from-server",{"connectionData":[16],"cancelCallback":[16],"changeConnectionCallback":[16],"createKBCallback":[16],"getGXserverKBsCallback":[16],"selectKBVersionsCallback":[16],"enableSelectVersionsButton":[32],"localKbNameInputValue":[32],"filterValue":[32],"kbsFilteredActionListModel":[32],"validatableControls":[32],"versionSelectedType":[32],"versionsValueInput":[32]}]]],["p-7d107d2f",[[1,"gx-ide-current-user-info",{"userInfo":[16],"myAccountCallback":[16],"changeTeamCallback":[16],"changeLanguageCallback":[16],"changeModeCallback":[16],"menuAlign":[16],"signOutCallback":[16],"termsCallback":[16],"privacyCallback":[16],"showMenu":[32]}]]],["p-31beae9e",[[1,"gx-ide-directory-selector",{"accessibilityLabels":[16],"label":[1],"labelPosition":[513,"label-position"],"centerLabel":[1028,"center-label"],"labelWidth":[1,"label-width"],"selectDirectoryCallback":[16],"value":[1025],"icon":[32]}]]],["p-f7421997",[[1,"gx-ide-gam-installation-settings",{"cancelCallback":[16],"canSelectPanels":[4,"can-select-panels"],"configurationType":[1,"configuration-type"],"defaultConfiguration":[16],"repairCallback":[16],"saveCallback":[16]}]]],["p-82878950",[[1,"gx-ide-new-environment",{"cancelCallback":[16],"createCallback":[16],"dataStores":[1040],"environmentName":[1025,"environment-name"],"getDataSourcesCallback":[16],"getEnvironmentNameCallback":[16],"getFrontEndsCallback":[16],"isAdvanced":[4,"is-advanced"],"languages":[16],"runtimes":[16],"setAsTarget":[4,"set-as-target"],"advancedTabIsVisible":[32],"frontEnds":[32],"validatableControls":[32],"dataStoresComboBoxModel":[32],"languageComboBoxModel":[32],"runtimesRadioGroupModel":[32],"suspendShortcuts":[64]},null,{"dataStores":["dataStoresChanged"],"languages":["languagesChanged"],"runtimes":["runtimesChanged"]}]]],["p-b465f29d",[[1,"gx-ide-new-kb",{"authenticationTypes":[16],"cancelCallback":[16],"collations":[16],"createCallback":[16],"createDataFilesInKBFolder":[4,"create-data-files-in-k-b-folder"],"databaseName":[1,"database-name"],"defaultDataSources":[1040],"getDataSourcesCallback":[16],"getFrontEndsCallback":[16],"isAdvanced":[4,"is-advanced"],"kbLocation":[1025,"kb-location"],"kbName":[1,"kb-name"],"password":[1],"prototypingEnvironments":[16],"prototypingTargets":[16],"savePassword":[4,"save-password"],"selectLocationCallback":[16],"serverNames":[16],"userInterfaceLanguages":[16],"userName":[1,"user-name"],"advancedTabIsVisible":[32],"frontEnds":[32],"validatableControls":[32],"createDataInKbDisabled":[32],"userNameVisible":[32],"passwordVisible":[32],"savePasswordVisible":[32],"authenticationTypesComboBoxModel":[32],"authenticationTypesInitialValue":[32],"collationsComboBoxModel":[32],"collationsInitialValue":[32],"defaultDataSourcesComboBoxModel":[32],"defaultDataSourcesInitialValue":[32],"prototypingTargetsComboBoxModel":[32],"prototypingTargetsInitialValue":[32],"prototypingEnvironmentsComboBoxModel":[32],"prototypingEnvironmentsInitialValue":[32],"serverNamesComboBoxModel":[32],"serverNamesInitialValue":[32],"userInterfaceLanguagesComboBoxModel":[32],"userInterfaceLanguagesInitialValue":[32],"suspendShortcuts":[64]},null,{"authenticationTypes":["watchAuthenticationTypes"],"collations":["watchCollations"],"defaultDataSources":["watchDefaultDataSources"],"prototypingEnvironments":["watchPrototypingEnvironments"],"prototypingTargets":["watchPrototypingTargets"],"serverNames":["watchServerNames"],"userInterfaceLanguages":["watchUserInterfaceLanguages"]}]]],["p-80c1ddc3",[[1,"gx-ide-new-version",{"isRemoteOperation":[4,"is-remote-operation"],"isFreezeOperation":[4,"is-freeze-operation"],"showLinkedLocalVersionCheckbox":[4,"show-linked-local-version-checkbox"],"cancelCallback":[16],"createCallback":[16],"defaultInputValues":[16],"versionName":[32],"versionDescription":[32],"setNewVersionAsActive":[32],"createLinkedLocalVersion":[32],"createAsProtectedVersion":[32],"validatableControls":[32]},null,{"defaultInputValues":["defaultInputValuesChanged"]}]]],["p-84c1c1bb",[[1,"gx-ide-plugin-details",{"data":[16],"installCallback":[16],"openLinkCallback":[16],"uninstallCallback":[16],"docsTabModel":[32],"selectedTabId":[32]}]]],["p-c9bca7c0",[[1,"gx-ide-entity-selector",{"defaultValue":[16],"disabled":[516],"labelCaption":[1,"label-caption"],"labelPosition":[513,"label-position"],"name":[513],"selectEntityCallback":[16],"value":[1040],"buttonHasFocus":[32],"iconSrc":[32]},null,{"value":["valueChangedHandler"]}]]],["p-385c9544",[[1,"gx-ide-ww-files",{"categories":[16],"defaultCategory":[1,"default-category"],"defaultModule":[16],"filterModules":[16],"types":[16],"contextMenuCallback":[16],"deleteSelectionCallback":[16],"loadCallback":[16],"newFileCallback":[16],"openSelectionCallback":[16],"selectModuleCallback":[16],"selectionChangeCallback":[16],"showSearchContents":[4,"show-search-contents"],"showDescription":[4,"show-description"],"showModifiedDate":[4,"show-modified-date"],"showLastUser":[4,"show-last-user"],"showImportDate":[4,"show-import-date"],"showType":[4,"show-type"],"showLastBuildDate":[4,"show-last-build-date"],"categoriesComboBoxModel":[32],"afterCurrentValue":[32],"filterAfterOptions":[32],"enabledModifiedControls":[32],"filterModified":[32],"filterMore":[32],"objects":[32],"filterFilesInputValue":[32],"filteredFiles":[32],"selectedObjectsIds":[32],"advancedFilterAccordionExpanded":[32],"validate":[64],"reload":[64]},[[1,"keydown","keyDownHandler"]],{"categories":["categoriesChanged"]}]]],["p-72e346b9",[[1,"gx-ide-share-kb",{"connectionData":[16],"cancelCallback":[16],"changeConnectionCallback":[16],"kbName":[1025,"kb-name"],"shareKBCallback":[16],"selectKBVersionsCallback":[16],"enableSelectVersionsButton":[32],"validatableControls":[32],"versionSelectedType":[32],"versionsValueInput":[32]}]]],["p-6b957e82",[[1,"gx-ide-sign-in",{"termsCallback":[16],"signInCallback":[16]}]]],["p-bbb5b0fb",[[1,"gx-ide-splash",{"downloadDockerCallback":[16],"quitCallback":[16],"messages":[16],"openLogCallback":[16],"showQuitButton":[4,"show-quit-button"],"showOpenLogLink":[4,"show-open-log-link"],"showDockerMissingError":[4,"show-docker-missing-error"],"ariaBusy":[32]}]]],["p-304d5629",[[1,"gx-ide-switch-panel"]]],["p-c58e0a92",[[1,"gx-ide-switcher"]]],["p-46ffec64",[[1,"gx-ide-test",{"name":[1],"filterOn":[32]}]]],["p-cbe2dd13",[[1,"gx-ide-top-bar",{"topBarTitle":[1,"top-bar-title"]}]]],["p-93cdb6f8",[[1,"gx-ide-welcome-page",{"transitionType":[1,"transition-type"],"wordsPerMinute":[2,"words-per-minute"],"closeCallback":[16],"slides":[16],"activeSlideIndex":[32],"displaySlider":[32],"copyrightsVisible":[32],"lastSlideReached":[32],"sliderVisible":[32],"slideTransitioning":[32],"userHasChangedSlide":[32]}]]],["p-86365635",[[1,"gx-ide-empty-state",{"isAnimated":[4,"is-animated"],"stateDescription":[1,"state-description"],"stateIconSrc":[1,"state-icon-src"],"stateTitle":[1,"state-title"]}]]],["p-1dd7be84",[[1,"gx-ide-container",{"inactiveTitle":[4,"inactive-title"],"containerTitle":[1,"container-title"],"titleType":[1,"title-type"],"displayBorder":[4,"display-border"],"displayBorderTop":[4,"display-border-top"],"displayBorderEnd":[4,"display-border-end"],"displayBorderBottom":[4,"display-border-bottom"],"displayBorderStart":[4,"display-border-start"],"sectionsPadding":[1,"sections-padding"],"titleAlignment":[1,"title-alignment"],"noHeadingBorder":[4,"no-heading-border"],"noHeadingGap":[4,"no-heading-gap"],"noHeadingPadding":[4,"no-heading-padding"],"noHeadingPaddingBlockEnd":[4,"no-heading-padding-block-end"],"headingPaddingTop":[4,"heading-padding-top"],"headingJustify":[1,"heading-justify"],"titleHeightAsInput":[4,"title-height-as-input"],"flexRow":[4,"flex-row"],"flexContent":[4,"flex-content"],"noContentBorderTop":[4,"no-content-border-top"],"noContentPadding":[4,"no-content-padding"],"noContentGap":[4,"no-content-gap"],"alignItems":[1,"align-items"],"justifyContent":[1,"justify-content"],"contentBorderEnd":[4,"content-border-end"],"slimmerAboveFooter":[4,"slimmer-above-footer"],"noAboveFooterPadding":[4,"no-above-footer-padding"],"noBorderAboveFooter":[4,"no-border-above-footer"],"slimmerFooter":[4,"slimmer-footer"],"noFooterPadding":[4,"no-footer-padding"],"footerJustify":[1,"footer-justify"],"noBorderFooter":[4,"no-border-footer"],"hasHeaderSlot":[32],"hasSlottedContent":[32],"hasFooterSlot":[32],"hasAboveFooterSlot":[32],"hasOnlyHeading":[32],"hasOnlyContent":[32],"hasOnlyFooter":[32]}],[1,"gx-ide-title",{"titleCaption":[1,"title-caption"],"type":[1],"alignment":[1],"padding":[516],"noPaddingBottom":[516,"no-padding-bottom"],"border":[516]}]]],["p-d8379699",[[1,"gx-ide-bpm-objects-selector",{"displayTitle":[4,"display-title"],"selection":[1040],"addCallback":[16],"referencesCallback":[16],"objects":[32],"selectedObjects":[32]}]]],["p-52f37ec7",[[1,"gx-ide-select-kb-items",{"activeItemCallback":[16],"cancelCallback":[16],"checkboxType":[1,"checkbox-type"],"expandOnClick":[4,"expand-on-click"],"checkedChanged":[16],"confirmCallback":[16],"dialogActions":[16],"itemContextMenuCallback":[16],"itemsList":[16],"multiSelection":[4,"multi-selection"],"showActiveItemLink":[4,"show-active-item-link"],"selectionChanged":[16],"activeItemNode":[32],"renderFooter":[32],"nodeListFlattenedTreeModel":[32],"loading":[32],"nodesVersionsViewType":[32],"nodeVersionsListTreeModel":[32],"searchPatternValue":[32],"toggleCheckboxes":[32],"suspendShortcuts":[64],"updateSelection":[64]},null,{"itemsList":["watchNodeListHandler"]}]]],["p-74a0cb25",[[0,"gx-ide-ai-message",{"aiAssistantHostRef":[16],"message":[1],"messageType":[1,"message-type"],"filterValue":[1,"filter-value"],"hidden":[4],"translations":[16],"visible":[32],"showCopiedMessage":[32]}]]],["p-7053c38e",[[1,"gx-ide-file-item",{"file":[16],"editable":[4],"fileDeletedCallback":[16],"fileDeletionErrorCallback":[16],"isEditing":[32],"currentName":[32]},null,{"file":["handleFileChange"]}]]],["p-05b04291",[[1,"gx-ide-list-selector",{"ordered":[4],"readonly":[4],"type":[1],"required":[4],"ellipsis":[4],"value":[1025],"listName":[1,"list-name"],"noItemsBorder":[4,"no-items-border"],"noListBorder":[516,"no-list-border"]},[[2,"itemSelectionChanged","itemSelectionChangedHandler"]]],[4,"gx-ide-list-selector-item",{"itemId":[513,"item-id"],"itemValue":[1,"item-value"],"itemChecked":[1028,"item-checked"],"readonly":[1540],"ellipsis":[1540],"icon":[1],"noBorder":[1540,"no-border"],"universalSlotEnd":[516,"universal-slot-end"]}]]],["p-e7fb3ee3",[[1,"gx-ide-status-buttons",{"active":[4],"errors":[2],"hideError":[4,"hide-error"],"warnings":[2],"hideWarning":[4,"hide-warning"],"successes":[2],"hideSuccess":[4,"hide-success"],"messages":[2],"hideMessage":[4,"hide-message"],"minimal":[4],"compact":[516],"noInnerBorders":[516,"no-inner-borders"],"iconsSize":[32]}]]],["p-0cd3ab87",[[4,"gx-ide-chat-container",{"chatTitle":[1,"chat-title"],"copyConversationCallback":[16],"deleteConversationCallback":[16],"displayWelcomeScreen":[4,"display-welcome-screen"],"displayConversationCopiedMessage":[32],"menuIsExpanded":[32],"showCopyConversationMessage":[64]}],[1,"gx-ide-chat-welcome",{"welcomeTitle":[1025,"welcome-title"],"welcomeGreeting":[1025,"welcome-greeting"],"suggestedPrompts":[1040],"suggestedPrompRequestedCallback":[16],"showHeader":[32],"showSuggestedPrompts":[32],"hideWelcome":[32],"exitWelcome":[64]}]]],["p-94904819",[[1,"gx-ide-loader",{"abortTime":[2,"abort-time"],"cancelCallback":[16],"cancelLabel":[1,"cancel-label"],"description":[1],"displayBorder":[516,"display-border"],"loaderTitle":[1,"loader-title"],"show":[1028],"showWrapper":[32]}]]]]'), e)));
|
|
17
17
|
//# sourceMappingURL=genexus-ide-ui.esm.js.map
|
|
@@ -24,14 +24,14 @@ var l = undefined && undefined.__classPrivateFieldGet || function(e, t, s, i) {
|
|
|
24
24
|
return s === "m" ? i : s === "a" ? i.call(e) : i ? i.value : t.get(e);
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var h = undefined && undefined.__classPrivateFieldSet || function(e, t, s, i, a) {
|
|
28
28
|
if (i === "m") throw new TypeError("Private method is not writable");
|
|
29
29
|
if (i === "a" && !a) throw new TypeError("Private accessor was defined without a setter");
|
|
30
30
|
if (typeof t === "function" ? e !== t || !a : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
31
31
|
return i === "a" ? a.call(e, s) : a ? a.value = s : t.set(e, s), s;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var d, c, u, f, p, v, m, w, b, g, y, k, M;
|
|
35
35
|
|
|
36
36
|
const x = [ "resets/box-sizing", "components/tab", "components/tooltip", "utils/form--full", "utils/layout", "utils/typography", "utils/spacing", "chameleon/scrollbar" ];
|
|
37
37
|
|
|
@@ -42,7 +42,7 @@ const W = class {
|
|
|
42
42
|
* The component hard-coded strings translations.
|
|
43
43
|
*/
|
|
44
44
|
// eslint-disable-next-line @stencil-community/own-props-must-be-private
|
|
45
|
-
|
|
45
|
+
d.set(this, void 0);
|
|
46
46
|
c.set(this, void 0);
|
|
47
47
|
u.set(this, void 0);
|
|
48
48
|
f.set(this, void 0);
|
|
@@ -67,20 +67,20 @@ const W = class {
|
|
|
67
67
|
}, this.validatableControls.get(e.id).message);
|
|
68
68
|
}));
|
|
69
69
|
w.set(this, (() => {
|
|
70
|
-
var e, t, s, i, a, n
|
|
70
|
+
var e, t, s, i, a, n;
|
|
71
71
|
this.authenticationTypesChanged(this.authenticationTypes);
|
|
72
72
|
this.serverUrlsChanged(this.serverUrls);
|
|
73
73
|
// set initial values:
|
|
74
74
|
// server url
|
|
75
|
-
this.gxServerConnectionData.serverUrl =
|
|
75
|
+
this.gxServerConnectionData.serverUrl = "";
|
|
76
76
|
// authentication type
|
|
77
77
|
this.gxServerConnectionData.authenticationType = {
|
|
78
|
-
id: ((
|
|
79
|
-
name: ((
|
|
78
|
+
id: ((e = this.defaultConnectionData) === null || e === void 0 ? void 0 : e.authenticationType.id) || ((t = this.authenticationTypesComboBoxModel[0]) === null || t === void 0 ? void 0 : t.value),
|
|
79
|
+
name: ((s = this.defaultConnectionData) === null || s === void 0 ? void 0 : s.authenticationType.name) || ((i = this.authenticationTypesComboBoxModel[0]) === null || i === void 0 ? void 0 : i.caption)
|
|
80
80
|
};
|
|
81
81
|
// user name
|
|
82
|
-
this.gxServerConnectionData.userName = (
|
|
83
|
-
this.gxServerConnectionData.userPassword = (
|
|
82
|
+
this.gxServerConnectionData.userName = (a = this.defaultConnectionData) === null || a === void 0 ? void 0 : a.userName;
|
|
83
|
+
this.gxServerConnectionData.userPassword = (n = this.defaultConnectionData) === null || n === void 0 ? void 0 : n.userPassword;
|
|
84
84
|
}));
|
|
85
85
|
b.set(this, (() => {
|
|
86
86
|
// populate #controlsValidation with the controls that could have errors.
|
|
@@ -144,7 +144,7 @@ const W = class {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
async componentWillLoad() {
|
|
147
|
-
|
|
147
|
+
h(this, d, await n.getComponentStrings(this.el), "f");
|
|
148
148
|
l(this, w, "f").call(this);
|
|
149
149
|
}
|
|
150
150
|
async componentDidLoad() {
|
|
@@ -166,7 +166,7 @@ const W = class {
|
|
|
166
166
|
}, t("label", {
|
|
167
167
|
class: "label",
|
|
168
168
|
htmlFor: "server-url"
|
|
169
|
-
}, l(this,
|
|
169
|
+
}, l(this, d, "f").main.serverURLLabel), t("ch-combo-box-render", {
|
|
170
170
|
id: "server-url",
|
|
171
171
|
class: "combo-box",
|
|
172
172
|
accessibleName: "Server Url",
|
|
@@ -185,14 +185,14 @@ const W = class {
|
|
|
185
185
|
renderActiveItemIconOnExpand: true,
|
|
186
186
|
strict: false
|
|
187
187
|
},
|
|
188
|
-
ref: e =>
|
|
188
|
+
ref: e => h(this, f, e, "f")
|
|
189
189
|
}), l(this, m, "f").call(this, l(this, f, "f"))), t("div", {
|
|
190
190
|
// authentication types
|
|
191
191
|
class: "field field-block authentication-type"
|
|
192
192
|
}, t("label", {
|
|
193
193
|
class: "label",
|
|
194
194
|
htmlFor: "authentication-type"
|
|
195
|
-
}, l(this,
|
|
195
|
+
}, l(this, d, "f").main.authenticationTypeLabel), t("ch-combo-box-render", {
|
|
196
196
|
id: "authentication-type",
|
|
197
197
|
class: "combo-box",
|
|
198
198
|
accessibleName: "Authentication Types",
|
|
@@ -206,26 +206,26 @@ const W = class {
|
|
|
206
206
|
}, t("label", {
|
|
207
207
|
class: "label",
|
|
208
208
|
htmlFor: "username"
|
|
209
|
-
}, l(this,
|
|
209
|
+
}, l(this, d, "f").main.usernameLabel), t("ch-edit", {
|
|
210
210
|
type: "text",
|
|
211
211
|
id: "username",
|
|
212
212
|
class: "input",
|
|
213
213
|
value: (a = this.gxServerConnectionData) === null || a === void 0 ? void 0 : a.userName,
|
|
214
214
|
onInput: l(this, k, "f"),
|
|
215
|
-
ref: e =>
|
|
215
|
+
ref: e => h(this, c, e, "f")
|
|
216
216
|
}), l(this, m, "f").call(this, l(this, c, "f"))), t("div", {
|
|
217
217
|
// user password
|
|
218
218
|
class: "field field-block user-password"
|
|
219
219
|
}, t("label", {
|
|
220
220
|
class: "label",
|
|
221
221
|
htmlFor: "password"
|
|
222
|
-
}, l(this,
|
|
222
|
+
}, l(this, d, "f").main.passwordLabel), t("ch-edit", {
|
|
223
223
|
type: "password",
|
|
224
224
|
id: "password",
|
|
225
225
|
class: "input",
|
|
226
226
|
value: (n = this.gxServerConnectionData) === null || n === void 0 ? void 0 : n.userPassword,
|
|
227
227
|
onInput: l(this, M, "f"),
|
|
228
|
-
ref: e =>
|
|
228
|
+
ref: e => h(this, u, e, "f")
|
|
229
229
|
}), l(this, m, "f").call(this, l(this, u, "f")))), t("footer", {
|
|
230
230
|
class: "control-footer-with-border spacing-body"
|
|
231
231
|
}, t("div", {
|
|
@@ -234,11 +234,11 @@ const W = class {
|
|
|
234
234
|
// cancel button
|
|
235
235
|
class: "button-secondary",
|
|
236
236
|
onClick: l(this, p, "f")
|
|
237
|
-
}, l(this,
|
|
237
|
+
}, l(this, d, "f").footer.cancelButtonCaption), t("button", {
|
|
238
238
|
// connect button
|
|
239
239
|
class: "button-primary",
|
|
240
240
|
onClick: l(this, v, "f")
|
|
241
|
-
}, l(this,
|
|
241
|
+
}, l(this, d, "f").footer.connectButtonCaption)))));
|
|
242
242
|
}
|
|
243
243
|
static get assetsDirs() {
|
|
244
244
|
return [ "gx-ide-assets/connect-gx-server" ];
|
|
@@ -254,11 +254,11 @@ const W = class {
|
|
|
254
254
|
}
|
|
255
255
|
};
|
|
256
256
|
|
|
257
|
-
|
|
257
|
+
d = new WeakMap, c = new WeakMap, u = new WeakMap, f = new WeakMap, p = new WeakMap,
|
|
258
258
|
v = new WeakMap, m = new WeakMap, w = new WeakMap, b = new WeakMap, g = new WeakMap,
|
|
259
259
|
y = new WeakMap, k = new WeakMap, M = new WeakMap;
|
|
260
260
|
|
|
261
261
|
W.style = r;
|
|
262
262
|
|
|
263
263
|
export { W as gx_ide_connect_gx_server };
|
|
264
|
-
//# sourceMappingURL=p-
|
|
264
|
+
//# sourceMappingURL=p-b822181c.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["mapAuthenticationTypeToComboBoxModel","authenticationTypes","map","authenticationType","value","id","caption","name","mapServerUrlsToComboBoxModel","serverUrls","serverUrl","connectGxServerCss","CSS_BUNDLES","HTMLGxIdeConnectGxServer","_HTMLGxIdeConnectGxServer_componentLocale","set","this","_HTMLGxIdeConnectGxServer_usernameRef","_HTMLGxIdeConnectGxServer_passwordRef","_HTMLGxIdeConnectGxServer_serverUrlRef","_HTMLGxIdeConnectGxServer_cancelClickHandler","cancelCallback","_HTMLGxIdeConnectGxServer_connectClickHandler","async","connectCallback","gxServerConnectionData","then","formSubmitResult","validatableControls","validateControls","_HTMLGxIdeConnectGxServer_evaluateTooltipRender","controlReference","_b","_a","get","hasError","_c","message","h","class","actionElement","blockAlign","config","tooltipSettings","inlineAlign","delay","_HTMLGxIdeConnectGxServer_init","authenticationTypesChanged","serverUrlsChanged","defaultConnectionData","authenticationTypesComboBoxModel","_d","userName","_e","userPassword","_f","_HTMLGxIdeConnectGxServer_initializeValidatableControls","__classPrivateFieldGet","forEach","validatableControl","reference","undefined","_HTMLGxIdeConnectGxServer_serverUrlInputEventHandler","event","detail","_HTMLGxIdeConnectGxServer_authenticationInputEventHandler","authenticationTypeId","authenticationTypeIndex","findIndex","authType","authenticationTypeName","_HTMLGxIdeConnectGxServer_usernameInputEventHandler","_HTMLGxIdeConnectGxServer_passwordInputEventHandler","Map","newAuthenticationTypes","length","newServerUrls","serverUrlsComboBoxModel","componentWillLoad","__classPrivateFieldSet","Locale","getComponentStrings","el","call","componentDidLoad","render","Host","model","htmlFor","main","serverURLLabel","accessibleName","placeholder","onChange","suggest","enableCustomServer","suggestOptions","alreadyProcessed","autoExpand","hideMatchesAndShowNonMatches","highlightMatchedItems","matchCase","regularExpression","renderActiveItemIconOnExpand","strict","ref","authenticationTypeLabel","onInput","usernameLabel","type","passwordLabel","onClick","footer","cancelButtonCaption","connectButtonCaption"],"sources":["src/components/team-dev/connect-gx-server/helpers.ts","src/components/team-dev/connect-gx-server/connect-gx-server.scss?tag=gx-ide-connect-gx-server&encapsulation=shadow","src/components/team-dev/connect-gx-server/connect-gx-server.tsx"],"sourcesContent":["import { AuthenticationType } from \"./connect-gx-server\";\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\n\nexport const mapAuthenticationTypeToComboBoxModel = (\n authenticationTypes: AuthenticationType[]\n): ComboBoxModel => {\n return authenticationTypes.map(authenticationType => {\n return {\n value: authenticationType.id,\n caption: authenticationType.name\n };\n });\n};\n\nexport const mapServerUrlsToComboBoxModel = (\n serverUrls: string[]\n): ComboBoxModel => {\n return serverUrls.map(serverUrl => {\n return {\n value: serverUrl,\n caption: serverUrl\n };\n });\n};\n",":host {\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr max-content;\n}\n\n.main {\n display: grid;\n grid-template-areas:\n \"server-url server-url\"\n \"authentication-type .\"\n \"user-name user-password\";\n grid-auto-rows: max-content;\n grid-template-columns: 1fr 1fr;\n}\n\n.section {\n display: contents;\n}\n\n.authentication-type {\n grid-area: authentication-type;\n}\n.server-url {\n grid-area: server-url;\n}\n.user-name {\n grid-area: user-name;\n}\n.user-password {\n grid-area: user-password;\n}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n\n// Other Libraries\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\n// Custom Imports\nimport { config } from \"../../../common/config\";\nimport {\n mapAuthenticationTypeToComboBoxModel,\n mapServerUrlsToComboBoxModel\n} from \"./helpers\";\nimport { Locale } from \"../../../common/locale\";\nimport { FormSubmitResult } from \"../../../common/types\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../../common/form-validation\";\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\n@Component({\n tag: \"gx-ide-connect-gx-server\",\n styleUrl: \"connect-gx-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/connect-gx-server\"]\n})\nexport class HTMLGxIdeConnectGxServer {\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 @Element() el: HTMLGxIdeConnectGxServerElement;\n #usernameRef!: HTMLChEditElement;\n #passwordRef!: HTMLChEditElement;\n #serverUrlRef!: HTMLChComboBoxRenderElement;\n\n @State() authenticationTypesComboBoxModel: ComboBoxModel;\n @State() gxServerConnectionData: GXServerConnectionData = {\n authenticationType: {\n id: null,\n name: null\n },\n serverUrl: null,\n userName: null,\n userPassword: null\n };\n @State() serverUrlsComboBoxModel: ComboBoxModel;\n @State() validatableControls = new Map<string, ControlValidation>();\n\n /**\n * List of authentication types.\n */\n @Prop() readonly authenticationTypes!: AuthenticationType[];\n @Watch(\"authenticationTypes\")\n authenticationTypesChanged(newAuthenticationTypes: AuthenticationType[]) {\n if (newAuthenticationTypes?.length) {\n this.authenticationTypesComboBoxModel =\n mapAuthenticationTypeToComboBoxModel(newAuthenticationTypes);\n }\n }\n\n /**\n * Callback that must be invoked when the 'Cancel' button is pressed.\n */\n @Prop() readonly cancelCallback!: () => Promise<void>;\n\n /**\n * Callback that must be invoked when the 'Connect' button is pressed.\n */\n @Prop() readonly connectCallback!: (\n data: GXServerConnectionData\n ) => Promise<FormSubmitResult>;\n\n /**\n * Initial user values for the case in which the user returns to the login modal after successful authentication.\n */\n @Prop() readonly defaultConnectionData?: GXServerConnectionData;\n\n /**\n * true if the user should be allowed to manually enter a server URL.\n */\n @Prop() readonly enableCustomServer: boolean = false;\n\n /**\n * Array of cataloged server URLs to be displayed in the combo.\n */\n @Prop() readonly serverUrls: string[];\n @Watch(\"serverUrls\")\n serverUrlsChanged(newServerUrls: string[]) {\n if (newServerUrls?.length) {\n this.serverUrlsComboBoxModel =\n mapServerUrlsToComboBoxModel(newServerUrls);\n }\n }\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n\n this.#init();\n }\n\n async componentDidLoad() {\n this.#initializeValidatableControls();\n }\n\n #cancelClickHandler = () => {\n this.cancelCallback();\n };\n\n #connectClickHandler = async () => {\n this.connectCallback(this.gxServerConnectionData).then(\n (formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n }\n );\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on other dialogs 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 #init = () => {\n this.authenticationTypesChanged(this.authenticationTypes);\n this.serverUrlsChanged(this.serverUrls);\n // set initial values:\n // server url\n this.gxServerConnectionData.serverUrl = \"\";\n // authentication type\n this.gxServerConnectionData.authenticationType = {\n id:\n (this.defaultConnectionData?.authenticationType.id as string) ||\n this.authenticationTypesComboBoxModel[0]?.value,\n name:\n (this.defaultConnectionData?.authenticationType.name as string) ||\n this.authenticationTypesComboBoxModel[0]?.caption\n };\n\n // user name\n this.gxServerConnectionData.userName = this.defaultConnectionData?.userName;\n this.gxServerConnectionData.userPassword =\n this.defaultConnectionData?.userPassword;\n };\n\n #initializeValidatableControls = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#usernameRef,\n this.#passwordRef,\n this.#serverUrlRef\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 // handlers that update this.gxServerConnectionData:\n #serverUrlInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.serverUrl = event.detail as string;\n };\n #authenticationInputEventHandler = (\n event: CustomEvent<string> | InputEvent\n ) => {\n const authenticationTypeId = event.detail as string;\n const authenticationTypeIndex = this.authenticationTypes.findIndex(\n authType => {\n return authType.id === authenticationTypeId;\n }\n );\n const authenticationTypeName =\n this.authenticationTypes[authenticationTypeIndex].name;\n\n this.gxServerConnectionData.authenticationType = {\n id: authenticationTypeId,\n name: authenticationTypeName\n };\n };\n #usernameInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userName = event.detail as string;\n };\n #passwordInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userPassword = event.detail as string;\n };\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <section class=\"section\">\n <div class=\"main field-group spacing-body\">\n <div\n // server urls\n class=\"field field-block server-url\"\n >\n <label class=\"label\" htmlFor=\"server-url\">\n {this.#componentLocale.main.serverURLLabel}\n </label>\n <ch-combo-box-render\n id=\"server-url\"\n class=\"combo-box\"\n accessibleName=\"Server Url\"\n model={this.serverUrlsComboBoxModel}\n placeholder=\"Select a server URL\"\n value={this.gxServerConnectionData?.serverUrl}\n onChange={this.#serverUrlInputEventHandler}\n suggest={this.enableCustomServer}\n suggestOptions={{\n alreadyProcessed: false,\n autoExpand: false,\n hideMatchesAndShowNonMatches: false,\n highlightMatchedItems: false,\n matchCase: false,\n regularExpression: false,\n renderActiveItemIconOnExpand: true,\n strict: false\n }}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#serverUrlRef = el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#serverUrlRef)}\n </div>\n\n <div\n // authentication types\n class=\"field field-block authentication-type\"\n >\n <label class=\"label\" htmlFor=\"authentication-type\">\n {this.#componentLocale.main.authenticationTypeLabel}\n </label>\n <ch-combo-box-render\n id=\"authentication-type\"\n class=\"combo-box\"\n accessibleName=\"Authentication Types\"\n model={this.authenticationTypesComboBoxModel}\n placeholder=\"Select an authentication type\"\n value={this.gxServerConnectionData?.authenticationType.id}\n onInput={this.#authenticationInputEventHandler}\n ></ch-combo-box-render>\n </div>\n\n <div\n // username\n class=\"field field-block user-name\"\n >\n <label class=\"label\" htmlFor=\"username\">\n {this.#componentLocale.main.usernameLabel}\n </label>\n <ch-edit\n type=\"text\"\n id=\"username\"\n class=\"input\"\n value={this.gxServerConnectionData?.userName}\n onInput={this.#usernameInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#usernameRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#usernameRef)}\n </div>\n\n <div\n // user password\n class=\"field field-block user-password\"\n >\n <label class=\"label\" htmlFor=\"password\">\n {this.#componentLocale.main.passwordLabel}\n </label>\n <ch-edit\n type=\"password\"\n id=\"password\"\n class=\"input\"\n value={this.gxServerConnectionData?.userPassword}\n onInput={this.#passwordInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#passwordRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#passwordRef)}\n </div>\n </div>\n\n <footer class=\"control-footer-with-border spacing-body\">\n <div class=\"buttons-spacer\">\n <button\n // cancel button\n class=\"button-secondary\"\n onClick={this.#cancelClickHandler}\n >\n {this.#componentLocale.footer.cancelButtonCaption}\n </button>\n\n <button\n // connect button\n class=\"button-primary\"\n onClick={this.#connectClickHandler}\n >\n {this.#componentLocale.footer.connectButtonCaption}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type GXServerConnectionData = {\n authenticationType: AuthenticationType;\n serverUrl: string;\n userName: string;\n userPassword: string;\n};\n\nexport type AuthenticationType = {\n id: string;\n name: string;\n};\n"],"mappings":";;;;;;;;AAGO,MAAMA,uCACXC,KAEOA,EAAoBC,KAAIC,MACtB;EACLC,OAAOD,EAAmBE;EAC1BC,SAASH,EAAmBI;;;AAK3B,MAAMC,+BACXC,KAEOA,EAAWP,KAAIQ,MACb;EACLN,OAAOM;EACPJ,SAASI;;;ACpBf,MAAMC,IAAqB;;;;;;;;;;;;;;;;;ACoB3B,MAAMC,IAA8B,EAClC,qBACA,kBACA,sBACA,oBACA,gBACA,oBACA,iBACA;;MASWC,IAAwB;;;;;;;QAKnCC,EAAAC,IAAAC,WAAA;IAGAC,EAAAF,IAAAC,WAAA;IACAE,EAAAH,IAAAC,WAAA;IACAG,EAAAJ,IAAAC,WAAA;IAuEAI,EAAAL,IAAAC,OAAsB;MACpBA,KAAKK;AAAgB;IAGvBC,EAAAP,IAAAC,OAAuBO;MACrBP,KAAKQ,gBAAgBR,KAAKS,wBAAwBC,MAC/CC;QACCX,KAAKY,sBAAsBC,EACzBF,GACAX,KAAKY;AACN;AAEJ;;;QAKHE,EAAAf,IAAAC,OACEe;;MAEA,SAAAC,KAAAC,IAAAjB,KAAKY,yBAAmB,QAAAK,WAAA,aAAAA,EAAEC,IAAIH,MAAgB,QAAhBA,WAAgB,aAAhBA,EAAkB1B,SAAG,QAAA2B,WAAA,aAAAA,EAAEG,eACrDC,IAAApB,KAAKY,oBAAoBM,I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A,KAAuBqD,KAA3BnE,MAA4ByC,EAAAzC,MAAIC,GAAA,QAGnCqB,EAAA;;MAEEC,OAAM;OAEND,EAAA;MAAOC,OAAM;MAAQiD,SAAQ;OAC1B/B,EAAAzC,MAAIF,GAAA,KAAkB2E,KAAKqB,gBAE9BxE,EAAA;MACEuE,MAAK;MACLxG,IAAG;MACHkC,OAAM;MACNnC,QAAO+C,IAAAnC,KAAKS,4BAAsB,QAAA0B,WAAA,aAAAA,EAAEG;MACpCqD,SAASlD,EAAAzC,MAAIwD,GAAA;MACbiC,KAAMvB,KACHH,EAAA/D,MAAIE,GAAgBgE,GAAuB;QAG/CzB,EAAAzC,MAAIc,GAAA,KAAuBqD,KAA3BnE,MAA4ByC,EAAAzC,MAAIE,GAAA,SAIrCoB,EAAA;MAAQC,OAAM;OACZD,EAAA;MAAKC,OAAM;OACTD,EAAA;;MAEEC,OAAM;MACNwE,SAAStD,EAAAzC,MAAII,GAAA;OAEZqC,EAAAzC,MAAIF,GAAA,KAAkBkG,OAAOC,sBAGhC3E,EAAA;;MAEEC,OAAM;MACNwE,SAAStD,EAAAzC,MAAIM,GAAA;OAEZmC,EAAAzC,MAAIF,GAAA,KAAkBkG,OAAOE"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["mapAuthenticationTypeToComboBoxModel","authenticationTypes","map","authenticationType","value","id","caption","name","mapServerUrlsToComboBoxModel","serverUrls","serverUrl","connectGxServerCss","CSS_BUNDLES","HTMLGxIdeConnectGxServer","_HTMLGxIdeConnectGxServer_componentLocale","set","this","_HTMLGxIdeConnectGxServer_usernameRef","_HTMLGxIdeConnectGxServer_passwordRef","_HTMLGxIdeConnectGxServer_serverUrlRef","_HTMLGxIdeConnectGxServer_cancelClickHandler","cancelCallback","_HTMLGxIdeConnectGxServer_connectClickHandler","async","connectCallback","gxServerConnectionData","then","formSubmitResult","validatableControls","validateControls","_HTMLGxIdeConnectGxServer_evaluateTooltipRender","controlReference","_b","_a","get","hasError","_c","message","h","class","actionElement","blockAlign","config","tooltipSettings","inlineAlign","delay","_HTMLGxIdeConnectGxServer_init","authenticationTypesChanged","serverUrlsChanged","defaultConnectionData","serverUrlsComboBoxModel","_d","authenticationTypesComboBoxModel","_e","_f","userName","_g","userPassword","_h","_HTMLGxIdeConnectGxServer_initializeValidatableControls","__classPrivateFieldGet","forEach","validatableControl","reference","undefined","_HTMLGxIdeConnectGxServer_serverUrlInputEventHandler","event","detail","_HTMLGxIdeConnectGxServer_authenticationInputEventHandler","authenticationTypeId","authenticationTypeIndex","findIndex","authType","authenticationTypeName","_HTMLGxIdeConnectGxServer_usernameInputEventHandler","_HTMLGxIdeConnectGxServer_passwordInputEventHandler","Map","newAuthenticationTypes","length","newServerUrls","componentWillLoad","__classPrivateFieldSet","Locale","getComponentStrings","el","call","componentDidLoad","render","Host","model","htmlFor","main","serverURLLabel","accessibleName","placeholder","onChange","suggest","enableCustomServer","suggestOptions","alreadyProcessed","autoExpand","hideMatchesAndShowNonMatches","highlightMatchedItems","matchCase","regularExpression","renderActiveItemIconOnExpand","strict","ref","authenticationTypeLabel","onInput","usernameLabel","type","passwordLabel","onClick","footer","cancelButtonCaption","connectButtonCaption"],"sources":["src/components/team-dev/connect-gx-server/helpers.ts","src/components/team-dev/connect-gx-server/connect-gx-server.scss?tag=gx-ide-connect-gx-server&encapsulation=shadow","src/components/team-dev/connect-gx-server/connect-gx-server.tsx"],"sourcesContent":["import { AuthenticationType } from \"./connect-gx-server\";\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\n\nexport const mapAuthenticationTypeToComboBoxModel = (\n authenticationTypes: AuthenticationType[]\n): ComboBoxModel => {\n return authenticationTypes.map(authenticationType => {\n return {\n value: authenticationType.id,\n caption: authenticationType.name\n };\n });\n};\n\nexport const mapServerUrlsToComboBoxModel = (\n serverUrls: string[]\n): ComboBoxModel => {\n return serverUrls.map(serverUrl => {\n return {\n value: serverUrl,\n caption: serverUrl\n };\n });\n};\n",":host {\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr max-content;\n}\n\n.main {\n display: grid;\n grid-template-areas:\n \"server-url server-url\"\n \"authentication-type .\"\n \"user-name user-password\";\n grid-auto-rows: max-content;\n grid-template-columns: 1fr 1fr;\n}\n\n.section {\n display: contents;\n}\n\n.authentication-type {\n grid-area: authentication-type;\n}\n.server-url {\n grid-area: server-url;\n}\n.user-name {\n grid-area: user-name;\n}\n.user-password {\n grid-area: user-password;\n}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n\n// Other Libraries\nimport { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\n// Custom Imports\nimport { config } from \"../../../common/config\";\nimport {\n mapAuthenticationTypeToComboBoxModel,\n mapServerUrlsToComboBoxModel\n} from \"./helpers\";\nimport { Locale } from \"../../../common/locale\";\nimport { FormSubmitResult } from \"../../../common/types\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../../common/form-validation\";\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\n@Component({\n tag: \"gx-ide-connect-gx-server\",\n styleUrl: \"connect-gx-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/connect-gx-server\"]\n})\nexport class HTMLGxIdeConnectGxServer {\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 @Element() el: HTMLGxIdeConnectGxServerElement;\n #usernameRef!: HTMLChEditElement;\n #passwordRef!: HTMLChEditElement;\n #serverUrlRef!: HTMLChComboBoxRenderElement;\n\n @State() authenticationTypesComboBoxModel: ComboBoxModel;\n @State() gxServerConnectionData: GXServerConnectionData = {\n authenticationType: {\n id: null,\n name: null\n },\n serverUrl: null,\n userName: null,\n userPassword: null\n };\n @State() serverUrlsComboBoxModel: ComboBoxModel;\n @State() validatableControls = new Map<string, ControlValidation>();\n\n /**\n * List of authentication types.\n */\n @Prop() readonly authenticationTypes!: AuthenticationType[];\n @Watch(\"authenticationTypes\")\n authenticationTypesChanged(newAuthenticationTypes: AuthenticationType[]) {\n if (newAuthenticationTypes?.length) {\n this.authenticationTypesComboBoxModel =\n mapAuthenticationTypeToComboBoxModel(newAuthenticationTypes);\n }\n }\n\n /**\n * Callback that must be invoked when the 'Cancel' button is pressed.\n */\n @Prop() readonly cancelCallback!: () => Promise<void>;\n\n /**\n * Callback that must be invoked when the 'Connect' button is pressed.\n */\n @Prop() readonly connectCallback!: (\n data: GXServerConnectionData\n ) => Promise<FormSubmitResult>;\n\n /**\n * Initial user values for the case in which the user returns to the login modal after successful authentication.\n */\n @Prop() readonly defaultConnectionData?: GXServerConnectionData;\n\n /**\n * true if the user should be allowed to manually enter a server URL.\n */\n @Prop() readonly enableCustomServer: boolean = false;\n\n /**\n * Array of cataloged server URLs to be displayed in the combo.\n */\n @Prop() readonly serverUrls: string[];\n @Watch(\"serverUrls\")\n serverUrlsChanged(newServerUrls: string[]) {\n if (newServerUrls?.length) {\n this.serverUrlsComboBoxModel =\n mapServerUrlsToComboBoxModel(newServerUrls);\n }\n }\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n\n this.#init();\n }\n\n async componentDidLoad() {\n this.#initializeValidatableControls();\n }\n\n #cancelClickHandler = () => {\n this.cancelCallback();\n };\n\n #connectClickHandler = async () => {\n this.connectCallback(this.gxServerConnectionData).then(\n (formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n }\n );\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on other dialogs 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 #init = () => {\n this.authenticationTypesChanged(this.authenticationTypes);\n this.serverUrlsChanged(this.serverUrls);\n // set initial values:\n // server url\n this.gxServerConnectionData.serverUrl =\n this.defaultConnectionData?.serverUrl ||\n this.serverUrlsComboBoxModel[0]?.value;\n // authentication type\n this.gxServerConnectionData.authenticationType = {\n id:\n (this.defaultConnectionData?.authenticationType.id as string) ||\n this.authenticationTypesComboBoxModel[0]?.value,\n name:\n (this.defaultConnectionData?.authenticationType.name as string) ||\n this.authenticationTypesComboBoxModel[0]?.caption\n };\n\n // user name\n this.gxServerConnectionData.userName = this.defaultConnectionData?.userName;\n this.gxServerConnectionData.userPassword =\n this.defaultConnectionData?.userPassword;\n };\n\n #initializeValidatableControls = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#usernameRef,\n this.#passwordRef,\n this.#serverUrlRef\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 // handlers that update this.gxServerConnectionData:\n #serverUrlInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.serverUrl = event.detail as string;\n };\n #authenticationInputEventHandler = (\n event: CustomEvent<string> | InputEvent\n ) => {\n const authenticationTypeId = event.detail as string;\n const authenticationTypeIndex = this.authenticationTypes.findIndex(\n authType => {\n return authType.id === authenticationTypeId;\n }\n );\n const authenticationTypeName =\n this.authenticationTypes[authenticationTypeIndex].name;\n\n this.gxServerConnectionData.authenticationType = {\n id: authenticationTypeId,\n name: authenticationTypeName\n };\n };\n #usernameInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userName = event.detail as string;\n };\n #passwordInputEventHandler = (event: CustomEvent<string> | InputEvent) => {\n this.gxServerConnectionData.userPassword = event.detail as string;\n };\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <section class=\"section\">\n <div class=\"main field-group spacing-body\">\n <div\n // server urls\n class=\"field field-block server-url\"\n >\n <label class=\"label\" htmlFor=\"server-url\">\n {this.#componentLocale.main.serverURLLabel}\n </label>\n <ch-combo-box-render\n id=\"server-url\"\n class=\"combo-box\"\n accessibleName=\"Server Url\"\n model={this.serverUrlsComboBoxModel}\n placeholder=\"Select a server URL\"\n value={this.gxServerConnectionData?.serverUrl}\n onChange={this.#serverUrlInputEventHandler}\n suggest={this.enableCustomServer}\n suggestOptions={{\n alreadyProcessed: false,\n autoExpand: false,\n hideMatchesAndShowNonMatches: false,\n highlightMatchedItems: false,\n matchCase: false,\n regularExpression: false,\n renderActiveItemIconOnExpand: true,\n strict: false\n }}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#serverUrlRef = el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#serverUrlRef)}\n </div>\n\n <div\n // authentication types\n class=\"field field-block authentication-type\"\n >\n <label class=\"label\" htmlFor=\"authentication-type\">\n {this.#componentLocale.main.authenticationTypeLabel}\n </label>\n <ch-combo-box-render\n id=\"authentication-type\"\n class=\"combo-box\"\n accessibleName=\"Authentication Types\"\n model={this.authenticationTypesComboBoxModel}\n placeholder=\"Select an authentication type\"\n value={this.gxServerConnectionData?.authenticationType.id}\n onInput={this.#authenticationInputEventHandler}\n ></ch-combo-box-render>\n </div>\n\n <div\n // username\n class=\"field field-block user-name\"\n >\n <label class=\"label\" htmlFor=\"username\">\n {this.#componentLocale.main.usernameLabel}\n </label>\n <ch-edit\n type=\"text\"\n id=\"username\"\n class=\"input\"\n value={this.gxServerConnectionData?.userName}\n onInput={this.#usernameInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#usernameRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#usernameRef)}\n </div>\n\n <div\n // user password\n class=\"field field-block user-password\"\n >\n <label class=\"label\" htmlFor=\"password\">\n {this.#componentLocale.main.passwordLabel}\n </label>\n <ch-edit\n type=\"password\"\n id=\"password\"\n class=\"input\"\n value={this.gxServerConnectionData?.userPassword}\n onInput={this.#passwordInputEventHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#passwordRef = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#passwordRef)}\n </div>\n </div>\n\n <footer class=\"control-footer-with-border spacing-body\">\n <div class=\"buttons-spacer\">\n <button\n // cancel button\n class=\"button-secondary\"\n onClick={this.#cancelClickHandler}\n >\n {this.#componentLocale.footer.cancelButtonCaption}\n </button>\n\n <button\n // connect button\n class=\"button-primary\"\n onClick={this.#connectClickHandler}\n >\n {this.#componentLocale.footer.connectButtonCaption}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type GXServerConnectionData = {\n authenticationType: AuthenticationType;\n serverUrl: string;\n userName: string;\n userPassword: string;\n};\n\nexport type AuthenticationType = {\n id: string;\n name: string;\n};\n"],"mappings":";;;;;;;;AAGO,MAAMA,uCACXC,KAEOA,EAAoBC,KAAIC,MACtB;EACLC,OAAOD,EAAmBE;EAC1BC,SAASH,EAAmBI;;;AAK3B,MAAMC,+BACXC,KAEOA,EAAWP,KAAIQ,MACb;EACLN,OAAOM;EACPJ,SAASI;;;ACpBf,MAAMC,IAAqB;;;;;;;;;;;;;;;;;ACoB3B,MAAMC,IAA8B,EAClC,qBACA,kBACA,sBACA,oBACA,gBACA,oBACA,iBACA;;MASWC,IAAwB;;;;;;;QAKnCC,EAAAC,IAAAC,WAAA;IAGAC,EAAAF,IAAAC,WAAA;IACAE,EAAAH,IAAAC,WA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