@genexus/genexus-ide-ui 1.0.10 → 1.0.12
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-data-selector.cjs.entry.js +2 -3
- package/dist/cjs/gx-ide-data-selector.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js +3 -3
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-object-selector.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-object-selector.cjs.entry.js.map +1 -1
- package/dist/collection/components/data-selector/data-selector.css +1 -0
- package/dist/collection/components/data-selector/data-selector.js +1 -2
- package/dist/collection/components/data-selector/data-selector.js.map +1 -1
- package/dist/collection/components/new-kb/helpers.js +2 -2
- package/dist/collection/components/new-kb/helpers.js.map +1 -1
- package/dist/collection/components/new-kb/new-kb.css +1 -0
- package/dist/collection/components/object-selector/object-selector.js +1 -1
- package/dist/collection/components/object-selector/object-selector.js.map +1 -1
- package/dist/components/gx-ide-data-selector.js +2 -3
- package/dist/components/gx-ide-data-selector.js.map +1 -1
- package/dist/components/gx-ide-new-kb.js +3 -3
- package/dist/components/gx-ide-new-kb.js.map +1 -1
- package/dist/components/gx-ide-object-selector.js +1 -1
- package/dist/components/gx-ide-object-selector.js.map +1 -1
- package/dist/esm/gx-ide-data-selector.entry.js +2 -3
- package/dist/esm/gx-ide-data-selector.entry.js.map +1 -1
- package/dist/esm/gx-ide-new-kb.entry.js +3 -3
- package/dist/esm/gx-ide-new-kb.entry.js.map +1 -1
- package/dist/esm/gx-ide-object-selector.entry.js +1 -1
- package/dist/esm/gx-ide-object-selector.entry.js.map +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/{p-3714339e.entry.js → p-6d0037f1.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-3714339e.entry.js.map → p-6d0037f1.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-3e5e2766.entry.js → p-ab29274c.entry.js} +14 -15
- package/dist/genexus-ide-ui/p-ab29274c.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-2ac9e22b.entry.js → p-e54bdad1.entry.js} +6 -8
- package/dist/genexus-ide-ui/p-e54bdad1.entry.js.map +1 -0
- package/package.json +1 -1
- package/dist/genexus-ide-ui/p-2ac9e22b.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-3e5e2766.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gx-ide-data-selector.entry.js","mappings":";;;;;AAAA,MAAM,eAAe,GAAG,6kBAA6kB;;;;;;;;;;;;;;;;;;;ACmBrmB;AACA,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,mBAAmB;IACnB,iBAAiB;IACjB,yBAAyB;IACzB,iBAAiB;IACjB,YAAY;IACZ,cAAc;IACd,qBAAqB;CACtB,CAAC;AAEF,MAAM,WAAW,GAAG,WAAW,CAAC;IAC9B,QAAQ,EAAE,cAAc;IACxB,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,cAAc;CAC1B,CAAC,CAAC;MAQU,iBAAiB;;;QAC5B,uDAA2B;QAC3B,yDAAwC,KAAK,EAAC;QAE9C,qDAAsB;QACtB,+CAA8B,KAAK,EAAC;QACpC,0CAAgB,YAAY,CAAC,8CAA8C,CAAC,EAAC;;QAE7E,qDAAqC;QACrC,oDAAiD;QACjD,mDAAuC;QACvC,4DAAkD;;;;QAgHlD,uDAA6B;YAC3B,IAAI,uBAAA,IAAI,sDAA6B,EAAE;gBACrC,uBAAA,IAAI,iDAAwB,CAAC,SAAS,CAAC,uBAAA,IAAI,4CAAmB,CAAC,CAAC;aACjE;YACD,uBAAA,IAAI,kDAAgC,KAAK,MAAA,CAAC;SAC3C,EAAC;QAEF,kDAAwB,CAAC,CAAgB;YACvC,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE;gBACrB,uBAA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,uBAAA,IAAI,0CAAiB,CAAC,MAAM,CAAC,SAAS,CAChC,EACT;;YAEE,KAAK,EAAC,gBAAgB,EACtB,IAAI,EAAC,kBAAkB,EACvB,QAAQ,EAAE,CAAC,eAAe,EAC1B,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,eAAe,IAAI,uBAAA,IAAI,iDAAwB;WAEvD,uBAAA,IAAI,0CAAiB,CAAC,MAAM,CAAC,UAAU,CACjC,CACL,CACC,CACD,CACL,EACP;KACH;;;;;;;;;;","names":[],"sources":["src/components/data-selector/data-selector.scss?tag=gx-ide-data-selector&encapsulation=shadow","src/components/data-selector/data-selector.tsx"],"sourcesContent":["@import \"../../../node_modules/@genexus/mercury/dist/mercury.scss\"; // for the tabular-grid-cell-layout mixin\n\n:host {\n display: grid;\n grid-template-rows: max-content 1fr max-content;\n overflow: auto;\n}\n\n.section {\n display: contents;\n}\n\n.header__field-group {\n display: grid;\n grid-template-columns: 1fr 1fr;\n}\n\n.tabular-grid {\n contain: size;\n}\n@include tabular-grid-cell-layout(\n $tabular-grid-selector: \".data\",\n $tabular-grid-cell-node-type: \"text\",\n $tabular-grid-cell-apply-ellipsis: true,\n $tabular-grid-affected-columns-nth-list: (\n 2,\n 3,\n 4\n )\n);\n\nch-tabular-grid.empty-result::part(main) {\n // WA to avoid scrollbar flickering when displaying the empty-state message\n overflow: hidden;\n}\nch-tabular-grid-rowset-empty {\n // to make the loader be positioned relative to 'ch-tabular-grid-rowset-empty'\n position: relative;\n}\n","/* eslint-disable @stencil-community/own-props-must-be-private */\nimport {\n Component,\n Host,\n h,\n Prop,\n Element,\n State,\n Method,\n getAssetPath\n} from \"@stencil/core\";\n\nimport { Locale } from \"../../common/locale\";\n\nimport { config } from \"../../common/config\";\nimport { EntityData } from \"../../common/types\";\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport { TabularGridSelectionChangedEvent } from \"@genexus/chameleon-controls-library\";\n\n// Best performance bundle\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/edit\",\n \"components/tabular-grid\",\n \"components/icon\",\n \"utils/form\",\n \"utils/layout\",\n \"chameleon/scrollbar\"\n];\n\nconst FILTER_ICON = getIconPath({\n category: \"window-tools\",\n name: \"filter\",\n colorType: \"on-elevation\"\n});\n\n@Component({\n tag: \"gx-ide-data-selector\",\n styleUrl: \"data-selector.scss\",\n shadow: { delegatesFocus: true },\n assetsDirs: [\"gx-ide-assets/data-selector\"]\n})\nexport class GxIdeDataSelector {\n #firstGridObjectId: string; // used to select the first item after \"loadItemsCallback\"\n #loadItemsCallbackJustCalled: boolean = false; // used to select the first item after \"loadItemsCallback\"\n\n #componentLocale: any;\n #animateEmptyState: boolean = false;\n #shortcutsSrc = getAssetPath(`./gx-ide-assets/data-selector/shortcuts.json`);\n /* References needed to collect data */\n #filterPatternEl!: HTMLChEditElement;\n #filterObjectEl!: HTMLGxIdeEntitySelectorElement;\n #chShortcutsEl: HTMLChShortcutsElement;\n #chTabularGridObjectsEl: HTMLChTabularGridElement;\n\n @Element() el: HTMLGxIdeDataSelectorElement;\n\n /**\n * True if loadItemsCallback has been called and has not been resolved yet.\n */\n @State() loading: boolean = true;\n\n /**\n * The objects rendered in the table\n */\n @State() objects: ItemData[] = [];\n\n /**\n * The selected objects in the table of objects\n */\n @State() selectedObjectsIds: string[] = [];\n\n /**\n * Callback invoked when the user wishes to cancel the selection of objects.\n */\n @Prop() readonly cancelCallback!: CancelCallback;\n\n /**\n * Callback invoked when the user presses the 'OK' button\n */\n @Prop() readonly confirmCallback!: ConfirmCallback;\n\n /**\n * The default value for the module/folder filter\n */\n @Prop() readonly defaultModule: EntityData;\n\n /**\n * If true it displays the component title on the header\n */\n @Prop() readonly displayTitle = false;\n\n /**\n * Callback invoked when user presses the edit button. Receives the first\n * selected element id as a parameter.\n */\n @Prop() readonly editCallback!: EditCallback;\n\n /**\n * Callback invoked when the component needs to reload the list of attributes.\n */\n @Prop() readonly loadItemsCallback!: LoadItemsCallback;\n\n /**\n * If true, it will display a loader when needed.\n */\n @Prop() readonly loader = false;\n\n /**\n * Callback invoked when the user presses the 'New' button.\n */\n @Prop() readonly newVariableCallback!: NewVariableCallback;\n\n /**\n * Callback invoked when the action is executed in the Object filter. It returns\n * the information of the selected object (id and name) or 'undefined' if it was\n * canceled.\n */\n @Prop() readonly selectObjectCallback: SelectObjectCallback;\n\n /**\n * Single if multiple object selection is not allowed. Default is multiple\n */\n @Prop() readonly selectionType: \"single\" | \"multiple\" = \"multiple\";\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n connectedCallback() {\n this.#refreshUIWithNewConfiguration();\n }\n\n componentDidLoad() {\n this.#filterPatternEl.focus();\n }\n\n componentDidRender() {\n this.#evaluateFirstRowSelection();\n }\n\n /**\n * Suspends or reactivates the shortcuts\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n if (suspendShortcuts) {\n this.#chShortcutsEl.suspend = true;\n } else {\n this.#chShortcutsEl.suspend = false;\n }\n }\n\n /**\n * Validate necessary data input\n */\n @Method()\n async validate(): Promise<boolean> {\n const isValid = true;\n return isValid;\n }\n\n /**\n * After items have been loaded and rendered, the first row should be selected.\n */\n #evaluateFirstRowSelection = () => {\n if (this.#loadItemsCallbackJustCalled) {\n this.#chTabularGridObjectsEl.selectRow(this.#firstGridObjectId);\n }\n this.#loadItemsCallbackJustCalled = false;\n };\n\n #chGridKeyDownHandler = (e: KeyboardEvent) => {\n if (e.key === \"Enter\") {\n this.#confirmCallbackHandler(e);\n }\n };\n\n #confirmCallbackHandler = (e: MouseEvent | KeyboardEvent): void => {\n e.stopPropagation();\n this.confirmCallback(this.selectedObjectsIds);\n };\n\n #editCallbackHandler = async (e: MouseEvent): Promise<void> => {\n e.stopPropagation();\n if (this.selectedObjectsIds[0]) {\n const result = await this.editCallback(this.selectedObjectsIds[0]);\n if (result) {\n this.#refreshUIWithNewConfiguration();\n }\n }\n };\n\n #hostKeyPressHandler = (e: KeyboardEvent) => {\n // TODO : revise why this is necessary\n // just prevent keypress propagation\n if (e.key === \"Enter\") {\n e.stopPropagation();\n }\n };\n\n #objectsSelectionChangedHandler = (\n event: CustomEvent<TabularGridSelectionChangedEvent>\n ) => {\n this.selectedObjectsIds = event.detail.rowsId;\n };\n\n #newVariableCallbackHandler = async () => {\n const response = await this.newVariableCallback();\n if (response) {\n this.#refreshUIWithNewConfiguration();\n }\n };\n #refreshUIWithNewConfiguration = (): void => {\n this.objects = [];\n const filters: FiltersData = {\n pattern: this.#filterPatternEl?.value,\n object: this.#filterObjectEl?.value?.id\n };\n this.loading = true;\n this.loadItemsCallback(filters).then((items: ItemData[]) => {\n if (items.length) {\n this.objects = this.#sortObjectsByName(items);\n this.#firstGridObjectId = this.objects[0].id;\n this.#loadItemsCallbackJustCalled = true;\n }\n this.selectedObjectsIds = [];\n this.loading = false;\n });\n };\n\n #renderFilter = (): Element[] => {\n return [\n <div class=\"header__field-group field-group\">\n <div class=\"field field-block pattern-field\">\n <label class=\"label\" htmlFor=\"filter-pattern\">\n {this.#componentLocale.filter.pattern}\n </label>\n <ch-edit\n autoFocus\n id=\"filter-pattern\"\n name=\"filter-pattern\"\n class=\"form-input pattern-input\"\n part=\"filter-pattern\"\n debounce={config.inputDebounce}\n onInput={this.#refreshUIWithNewConfiguration}\n ref={(el: HTMLChEditElement) =>\n (this.#filterPatternEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n </div>\n <gx-ide-entity-selector\n id=\"object-selector\"\n value={this.defaultModule}\n defaultValue={this.defaultModule}\n selectEntityCallback={this.selectObjectCallback}\n ref={(el: HTMLGxIdeEntitySelectorElement) =>\n (this.#filterObjectEl = el as HTMLGxIdeEntitySelectorElement)\n }\n class=\"entity\"\n onValueChanged={this.#refreshUIWithNewConfiguration}\n ></gx-ide-entity-selector>\n </div>\n ];\n };\n\n #renderObjects = (): Element => {\n const gridIsEmpty = !this.objects.length;\n const displayLoader = this.loader && this.loading;\n if (!gridIsEmpty || displayLoader) {\n this.#animateEmptyState = true; // improve performance if is first render\n }\n return (\n <ch-tabular-grid\n class={{\n \"tabular-grid\": true,\n \"empty-result\": this.objects.length === 0,\n \"data\": true\n }}\n rowSelectionMode={this.selectionType}\n onKeyDown={this.#chGridKeyDownHandler}\n part=\"ch-grid-objects\"\n onSelectionChanged={\n this.objects.length ? this.#objectsSelectionChangedHandler : undefined\n }\n ref={(el: HTMLChTabularGridElement) =>\n (this.#chTabularGridObjectsEl = el as HTMLChTabularGridElement)\n }\n >\n <ch-tabular-grid-columnset class=\"tabular-grid-column-set\">\n <ch-tabular-grid-column\n column-name-position=\"text\"\n settingable={false}\n size={config.tabularGrid.colSize.maxContent}\n class=\"tabular-grid-column\"\n ></ch-tabular-grid-column>\n <ch-tabular-grid-column\n column-name={this.#componentLocale.tableHead.name}\n column-name-position=\"text\"\n settingable={false}\n size={config.tabularGrid.colSize.common}\n class=\"tabular-grid-column\"\n ></ch-tabular-grid-column>\n <ch-tabular-grid-column\n column-name={this.#componentLocale.tableHead.dataType}\n column-name-position=\"text\"\n settingable={false}\n size={config.tabularGrid.colSize.common}\n class=\"tabular-grid-column\"\n ></ch-tabular-grid-column>\n <ch-tabular-grid-column\n column-name={this.#componentLocale.tableHead.description}\n column-name-position=\"text\"\n settingable={false}\n size={config.tabularGrid.colSize.common}\n class=\"tabular-grid-column\"\n ></ch-tabular-grid-column>\n </ch-tabular-grid-columnset>\n\n {!gridIsEmpty ? (\n <ch-tabular-grid-rowset class=\"tabular-grid-rowset\">\n {this.objects.map((obj: ItemData) => (\n <ch-tabular-grid-row\n rowid={obj.id}\n onDblClick={this.#confirmCallbackHandler}\n class=\"tabular-grid-row\"\n >\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n <ch-image\n src={\n obj.type === \"attribute\"\n ? \"objects/attribute\"\n : \"objects-parts/variables\"\n }\n class=\"icon-md\"\n ></ch-image>\n </ch-tabular-grid-cell>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {obj.name}\n </ch-tabular-grid-cell>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {obj.dataType}\n </ch-tabular-grid-cell>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {obj.description}\n </ch-tabular-grid-cell>\n </ch-tabular-grid-row>\n ))}\n </ch-tabular-grid-rowset>\n ) : (\n <ch-tabular-grid-rowset class=\"tabular-grid-rowset\">\n <ch-tabular-grid-rowset-empty>\n {displayLoader ? (\n <gx-ide-loader\n loaderTitle={this.#componentLocale.loader.title}\n show\n ></gx-ide-loader>\n ) : (\n <gx-ide-empty-state\n isAnimated={this.#animateEmptyState}\n stateIconSrc={FILTER_ICON}\n stateTitle={this.#componentLocale.emptyState.title}\n ></gx-ide-empty-state>\n )}\n </ch-tabular-grid-rowset-empty>\n </ch-tabular-grid-rowset>\n )}\n </ch-tabular-grid>\n );\n };\n\n #sortObjectsByName = (objects: ItemData[]): ItemData[] =>\n // TODO (make this a common helper function\n // and use it in other dialog grids that\n // require filter by name).\n objects.sort((a, b) => {\n const nameA = a.name.toLowerCase(),\n nameB = b.name.toLowerCase();\n if (nameA < nameB) {\n return -1;\n }\n if (nameA > nameB) {\n return 1;\n }\n return 0;\n });\n\n render() {\n const newVariableButtonEnabled = !this.loading;\n const editButtonEnabled = !this.loading && this.selectedObjectsIds.length;\n const cancelButtonEnabled = this.loading;\n const okButtonEnabled = !this.loading;\n\n return (\n <Host onKeyPress={this.#hostKeyPressHandler} class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n\n <section class=\"section\">\n <header class=\"header control-header-with-border spacing-body-block-start spacing-body-inline\">\n {this.#renderFilter()}\n </header>\n {this.#renderObjects()}\n <footer class=\"footer control-footer-with-border control-footer-space-between spacing-body-inline spacing-body-block-end\">\n <div class=\"buttons-spacer\">\n <button\n // New Variable Button\n class=\"button-secondary\"\n disabled={!newVariableButtonEnabled}\n part=\"button button-new\"\n type=\"button\"\n onClick={this.#newVariableCallbackHandler}\n >\n {this.#componentLocale.footer.btnNew}\n </button>\n <button\n // Edit Button\n class=\"button-secondary\"\n disabled={!editButtonEnabled}\n part=\"button button-edit\"\n type=\"button\"\n onClick={editButtonEnabled && this.#editCallbackHandler}\n >\n {this.#componentLocale.footer.btnEdit}\n </button>\n </div>\n\n <div class=\"buttons-spacer\">\n <button\n // Cancel Button\n class=\"button-secondary\"\n part=\"button button-cancel\"\n disabled={!cancelButtonEnabled}\n type=\"button\"\n onClick={cancelButtonEnabled && this.cancelCallback}\n >\n {this.#componentLocale.footer.btnCancel}\n </button>\n <button\n // Confirm Button\n class=\"button-primary\"\n part=\"button button-ok\"\n disabled={!okButtonEnabled}\n type=\"button\"\n onClick={okButtonEnabled && this.#confirmCallbackHandler}\n >\n {this.#componentLocale.footer.btnConfirm}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type NewVariableCallback = () => Promise<boolean>;\n\nexport type CancelCallback = () => Promise<void>;\n\nexport type SelectObjectCallback = () => Promise<EntityData | undefined>;\n\nexport type EditCallback = (id: string) => Promise<boolean>;\n\nexport type ConfirmCallback = (ids: string[]) => Promise<void>;\n\nexport type LoadItemsCallback = (filters: FiltersData) => Promise<ItemData[]>;\n\nexport type FiltersData = {\n pattern?: string;\n object?: string;\n};\n\nexport type ItemData = {\n type: ItemType;\n id: string;\n name: string;\n dataType: string;\n description: string;\n};\n\nexport type ItemType = \"variable\" | \"attribute\";\n"],"version":3}
|
|
1
|
+
{"file":"gx-ide-data-selector.entry.js","mappings":";;;;;AAAA,MAAM,eAAe,GAAG,6lBAA6lB;;;;;;;;;;;;;;;;;;;ACmBrnB;AACA,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,mBAAmB;IACnB,iBAAiB;IACjB,yBAAyB;IACzB,iBAAiB;IACjB,YAAY;I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Q,EAAE,CAAC,wBAAwB,EACnC,IAAI,EAAC,mBAAmB,EACxB,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,uBAAA,IAAI,qDAA4B;WAExC,uBAAA,IAAI,0CAAiB,CAAC,MAAM,CAAC,MAAM,CAC7B,EACT;;YAEE,KAAK,EAAC,kBAAkB,EACxB,QAAQ,EAAE,CAAC,iBAAiB,EAC5B,IAAI,EAAC,oBAAoB,EACzB,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,iBAAiB,IAAI,uBAAA,IAAI,8CAAqB;WAEtD,uBAAA,IAAI,0CAAiB,CAAC,MAAM,CAAC,OAAO,CAC9B,CACL,EAEN,WAAK,KAAK,EAAC,gBAAgB,IACzB;;YAEE,KAAK,EAAC,kBAAkB,EACxB,IAAI,EAAC,sBAAsB,EAC3B,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,IAAI,CAAC,cAAc;WAE3B,uBAAA,IAAI,0CAAiB,CAAC,MAAM,CAAC,SAAS,CAChC,EACT;;YAEE,KAAK,EAAC,gBAAgB,EACtB,IAAI,EAAC,kBAAkB,EACvB,QAAQ,EAAE,CAAC,eAAe,EAC1B,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,eAAe,IAAI,uBAAA,IAAI,iDAAwB;WAEvD,uBAAA,IAAI,0CAAiB,CAAC,MAAM,CAAC,UAAU,CACjC,CACL,CACC,CACD,CACL,EACP;KACH;;;;;;;;;;","names":[],"sources":["src/components/data-selector/data-selector.scss?tag=gx-ide-data-selector&encapsulation=shadow","src/components/data-selector/data-selector.tsx"],"sourcesContent":["@import \"../../../node_modules/@genexus/mercury/dist/mercury.scss\"; // for the tabular-grid-cell-layout mixin\n\n:host {\n display: grid;\n grid-template-rows: max-content 1fr max-content;\n overflow: auto;\n block-size: 100%;\n}\n\n.section {\n display: contents;\n}\n\n.header__field-group {\n display: grid;\n grid-template-columns: 1fr 1fr;\n}\n\n.tabular-grid {\n contain: size;\n}\n@include tabular-grid-cell-layout(\n $tabular-grid-selector: \".data\",\n $tabular-grid-cell-node-type: \"text\",\n $tabular-grid-cell-apply-ellipsis: true,\n $tabular-grid-affected-columns-nth-list: (\n 2,\n 3,\n 4\n )\n);\n\nch-tabular-grid.empty-result::part(main) {\n // WA to avoid scrollbar flickering when displaying the empty-state message\n overflow: hidden;\n}\nch-tabular-grid-rowset-empty {\n // to make the loader be positioned relative to 'ch-tabular-grid-rowset-empty'\n position: relative;\n}\n","/* eslint-disable @stencil-community/own-props-must-be-private */\nimport {\n Component,\n Host,\n h,\n Prop,\n Element,\n State,\n Method,\n getAssetPath\n} from \"@stencil/core\";\n\nimport { Locale } from \"../../common/locale\";\n\nimport { config } from \"../../common/config\";\nimport { EntityData } from \"../../common/types\";\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport { TabularGridSelectionChangedEvent } from \"@genexus/chameleon-controls-library\";\n\n// Best performance bundle\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/edit\",\n \"components/tabular-grid\",\n \"components/icon\",\n \"utils/form\",\n \"utils/layout\",\n \"chameleon/scrollbar\"\n];\n\nconst FILTER_ICON = getIconPath({\n category: \"window-tools\",\n name: \"filter\",\n colorType: \"on-elevation\"\n});\n\n@Component({\n tag: \"gx-ide-data-selector\",\n styleUrl: \"data-selector.scss\",\n shadow: { delegatesFocus: true },\n assetsDirs: [\"gx-ide-assets/data-selector\"]\n})\nexport class GxIdeDataSelector {\n #firstGridObjectId: string; // used to select the first item after \"loadItemsCallback\"\n #loadItemsCallbackJustCalled: boolean = false; // used to select the first item after \"loadItemsCallback\"\n\n #componentLocale: any;\n #animateEmptyState: boolean = false;\n #shortcutsSrc = getAssetPath(`./gx-ide-assets/data-selector/shortcuts.json`);\n /* References needed to collect data */\n #filterPatternEl!: HTMLChEditElement;\n #filterObjectEl!: HTMLGxIdeEntitySelectorElement;\n #chShortcutsEl: HTMLChShortcutsElement;\n #chTabularGridObjectsEl: HTMLChTabularGridElement;\n\n @Element() el: HTMLGxIdeDataSelectorElement;\n\n /**\n * True if loadItemsCallback has been called and has not been resolved yet.\n */\n @State() loading: boolean = true;\n\n /**\n * The objects rendered in the table\n */\n @State() objects: ItemData[] = [];\n\n /**\n * The selected objects in the table of objects\n */\n @State() selectedObjectsIds: string[] = [];\n\n /**\n * Callback invoked when the user wishes to cancel the selection of objects.\n */\n @Prop() readonly cancelCallback!: CancelCallback;\n\n /**\n * Callback invoked when the user presses the 'OK' button\n */\n @Prop() readonly confirmCallback!: ConfirmCallback;\n\n /**\n * The default value for the module/folder filter\n */\n @Prop() readonly defaultModule: EntityData;\n\n /**\n * If true it displays the component title on the header\n */\n @Prop() readonly displayTitle = false;\n\n /**\n * Callback invoked when user presses the edit button. Receives the first\n * selected element id as a parameter.\n */\n @Prop() readonly editCallback!: EditCallback;\n\n /**\n * Callback invoked when the component needs to reload the list of attributes.\n */\n @Prop() readonly loadItemsCallback!: LoadItemsCallback;\n\n /**\n * If true, it will display a loader when needed.\n */\n @Prop() readonly loader = false;\n\n /**\n * Callback invoked when the user presses the 'New' button.\n */\n @Prop() readonly newVariableCallback!: NewVariableCallback;\n\n /**\n * Callback invoked when the action is executed in the Object filter. It returns\n * the information of the selected object (id and name) or 'undefined' if it was\n * canceled.\n */\n @Prop() readonly selectObjectCallback: SelectObjectCallback;\n\n /**\n * Single if multiple object selection is not allowed. Default is multiple\n */\n @Prop() readonly selectionType: \"single\" | \"multiple\" = \"multiple\";\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n connectedCallback() {\n this.#refreshUIWithNewConfiguration();\n }\n\n componentDidLoad() {\n this.#filterPatternEl.focus();\n }\n\n componentDidRender() {\n this.#evaluateFirstRowSelection();\n }\n\n /**\n * Suspends or reactivates the shortcuts\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n if (suspendShortcuts) {\n this.#chShortcutsEl.suspend = true;\n } else {\n this.#chShortcutsEl.suspend = false;\n }\n }\n\n /**\n * Validate necessary data input\n */\n @Method()\n async validate(): Promise<boolean> {\n const isValid = true;\n return isValid;\n }\n\n /**\n * After items have been loaded and rendered, the first row should be selected.\n */\n #evaluateFirstRowSelection = () => {\n if (this.#loadItemsCallbackJustCalled) {\n this.#chTabularGridObjectsEl.selectRow(this.#firstGridObjectId);\n }\n this.#loadItemsCallbackJustCalled = false;\n };\n\n #chGridKeyDownHandler = (e: KeyboardEvent) => {\n if (e.key === \"Enter\") {\n this.#confirmCallbackHandler(e);\n }\n };\n\n #confirmCallbackHandler = (e: MouseEvent | KeyboardEvent): void => {\n e.stopPropagation();\n this.confirmCallback(this.selectedObjectsIds);\n };\n\n #editCallbackHandler = async (e: MouseEvent): Promise<void> => {\n e.stopPropagation();\n if (this.selectedObjectsIds[0]) {\n const result = await this.editCallback(this.selectedObjectsIds[0]);\n if (result) {\n this.#refreshUIWithNewConfiguration();\n }\n }\n };\n\n #hostKeyPressHandler = (e: KeyboardEvent) => {\n // TODO : revise why this is necessary\n // just prevent keypress propagation\n if (e.key === \"Enter\") {\n e.stopPropagation();\n }\n };\n\n #objectsSelectionChangedHandler = (\n event: CustomEvent<TabularGridSelectionChangedEvent>\n ) => {\n this.selectedObjectsIds = event.detail.rowsId;\n };\n\n #newVariableCallbackHandler = async () => {\n const response = await this.newVariableCallback();\n if (response) {\n this.#refreshUIWithNewConfiguration();\n }\n };\n #refreshUIWithNewConfiguration = (): void => {\n this.objects = [];\n const filters: FiltersData = {\n pattern: this.#filterPatternEl?.value,\n object: this.#filterObjectEl?.value?.id\n };\n this.loading = true;\n this.loadItemsCallback(filters).then((items: ItemData[]) => {\n if (items.length) {\n this.objects = this.#sortObjectsByName(items);\n this.#firstGridObjectId = this.objects[0].id;\n this.#loadItemsCallbackJustCalled = true;\n }\n this.selectedObjectsIds = [];\n this.loading = false;\n });\n };\n\n #renderFilter = (): Element[] => {\n return [\n <div class=\"header__field-group field-group\">\n <div class=\"field field-block pattern-field\">\n <label class=\"label\" htmlFor=\"filter-pattern\">\n {this.#componentLocale.filter.pattern}\n </label>\n <ch-edit\n autoFocus\n id=\"filter-pattern\"\n name=\"filter-pattern\"\n class=\"form-input pattern-input\"\n part=\"filter-pattern\"\n debounce={config.inputDebounce}\n onInput={this.#refreshUIWithNewConfiguration}\n ref={(el: HTMLChEditElement) =>\n (this.#filterPatternEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n </div>\n <gx-ide-entity-selector\n id=\"object-selector\"\n value={this.defaultModule}\n defaultValue={this.defaultModule}\n selectEntityCallback={this.selectObjectCallback}\n ref={(el: HTMLGxIdeEntitySelectorElement) =>\n (this.#filterObjectEl = el as HTMLGxIdeEntitySelectorElement)\n }\n class=\"entity\"\n onValueChanged={this.#refreshUIWithNewConfiguration}\n ></gx-ide-entity-selector>\n </div>\n ];\n };\n\n #renderObjects = (): Element => {\n const gridIsEmpty = !this.objects.length;\n const displayLoader = this.loader && this.loading;\n if (!gridIsEmpty || displayLoader) {\n this.#animateEmptyState = true; // improve performance if is first render\n }\n return (\n <ch-tabular-grid\n class={{\n \"tabular-grid\": true,\n \"empty-result\": this.objects.length === 0,\n \"data\": true\n }}\n rowSelectionMode={this.selectionType}\n onKeyDown={this.#chGridKeyDownHandler}\n part=\"ch-grid-objects\"\n onSelectionChanged={\n this.objects.length ? this.#objectsSelectionChangedHandler : undefined\n }\n ref={(el: HTMLChTabularGridElement) =>\n (this.#chTabularGridObjectsEl = el as HTMLChTabularGridElement)\n }\n >\n <ch-tabular-grid-columnset class=\"tabular-grid-column-set\">\n <ch-tabular-grid-column\n column-name-position=\"text\"\n settingable={false}\n size={config.tabularGrid.colSize.maxContent}\n class=\"tabular-grid-column\"\n ></ch-tabular-grid-column>\n <ch-tabular-grid-column\n column-name={this.#componentLocale.tableHead.name}\n column-name-position=\"text\"\n settingable={false}\n size={config.tabularGrid.colSize.common}\n class=\"tabular-grid-column\"\n ></ch-tabular-grid-column>\n <ch-tabular-grid-column\n column-name={this.#componentLocale.tableHead.dataType}\n column-name-position=\"text\"\n settingable={false}\n size={config.tabularGrid.colSize.common}\n class=\"tabular-grid-column\"\n ></ch-tabular-grid-column>\n <ch-tabular-grid-column\n column-name={this.#componentLocale.tableHead.description}\n column-name-position=\"text\"\n settingable={false}\n size={config.tabularGrid.colSize.common}\n class=\"tabular-grid-column\"\n ></ch-tabular-grid-column>\n </ch-tabular-grid-columnset>\n\n {!gridIsEmpty ? (\n <ch-tabular-grid-rowset class=\"tabular-grid-rowset\">\n {this.objects.map((obj: ItemData) => (\n <ch-tabular-grid-row\n rowid={obj.id}\n onDblClick={this.#confirmCallbackHandler}\n class=\"tabular-grid-row\"\n >\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n <ch-image\n src={\n obj.type === \"attribute\"\n ? \"objects/attribute\"\n : \"objects-parts/variables\"\n }\n class=\"icon-md\"\n ></ch-image>\n </ch-tabular-grid-cell>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {obj.name}\n </ch-tabular-grid-cell>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {obj.dataType}\n </ch-tabular-grid-cell>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {obj.description}\n </ch-tabular-grid-cell>\n </ch-tabular-grid-row>\n ))}\n </ch-tabular-grid-rowset>\n ) : (\n <ch-tabular-grid-rowset class=\"tabular-grid-rowset\">\n <ch-tabular-grid-rowset-empty>\n {displayLoader ? (\n <gx-ide-loader\n loaderTitle={this.#componentLocale.loader.title}\n show\n ></gx-ide-loader>\n ) : (\n <gx-ide-empty-state\n isAnimated={this.#animateEmptyState}\n stateIconSrc={FILTER_ICON}\n stateTitle={this.#componentLocale.emptyState.title}\n ></gx-ide-empty-state>\n )}\n </ch-tabular-grid-rowset-empty>\n </ch-tabular-grid-rowset>\n )}\n </ch-tabular-grid>\n );\n };\n\n #sortObjectsByName = (objects: ItemData[]): ItemData[] =>\n // TODO (make this a common helper function\n // and use it in other dialog grids that\n // require filter by name).\n objects.sort((a, b) => {\n const nameA = a.name.toLowerCase(),\n nameB = b.name.toLowerCase();\n if (nameA < nameB) {\n return -1;\n }\n if (nameA > nameB) {\n return 1;\n }\n return 0;\n });\n\n render() {\n const newVariableButtonEnabled = !this.loading;\n const editButtonEnabled = !this.loading && this.selectedObjectsIds.length;\n const okButtonEnabled = !this.loading;\n\n return (\n <Host onKeyPress={this.#hostKeyPressHandler} class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n\n <section class=\"section\">\n <header class=\"header control-header-with-border spacing-body-block-start spacing-body-inline\">\n {this.#renderFilter()}\n </header>\n {this.#renderObjects()}\n <footer class=\"footer control-footer-with-border control-footer-space-between spacing-body-inline spacing-body-block-end\">\n <div class=\"buttons-spacer\">\n <button\n // New Variable Button\n class=\"button-secondary\"\n disabled={!newVariableButtonEnabled}\n part=\"button button-new\"\n type=\"button\"\n onClick={this.#newVariableCallbackHandler}\n >\n {this.#componentLocale.footer.btnNew}\n </button>\n <button\n // Edit Button\n class=\"button-secondary\"\n disabled={!editButtonEnabled}\n part=\"button button-edit\"\n type=\"button\"\n onClick={editButtonEnabled && this.#editCallbackHandler}\n >\n {this.#componentLocale.footer.btnEdit}\n </button>\n </div>\n\n <div class=\"buttons-spacer\">\n <button\n // Cancel Button\n class=\"button-secondary\"\n part=\"button button-cancel\"\n type=\"button\"\n onClick={this.cancelCallback}\n >\n {this.#componentLocale.footer.btnCancel}\n </button>\n <button\n // Confirm Button\n class=\"button-primary\"\n part=\"button button-ok\"\n disabled={!okButtonEnabled}\n type=\"button\"\n onClick={okButtonEnabled && this.#confirmCallbackHandler}\n >\n {this.#componentLocale.footer.btnConfirm}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type NewVariableCallback = () => Promise<boolean>;\n\nexport type CancelCallback = () => Promise<void>;\n\nexport type SelectObjectCallback = () => Promise<EntityData | undefined>;\n\nexport type EditCallback = (id: string) => Promise<boolean>;\n\nexport type ConfirmCallback = (ids: string[]) => Promise<void>;\n\nexport type LoadItemsCallback = (filters: FiltersData) => Promise<ItemData[]>;\n\nexport type FiltersData = {\n pattern?: string;\n object?: string;\n};\n\nexport type ItemData = {\n type: ItemType;\n id: string;\n name: string;\n dataType: string;\n description: string;\n};\n\nexport type ItemType = \"variable\" | \"attribute\";\n"],"version":3}
|
|
@@ -41,11 +41,11 @@ const renderChCheckboxItems = (options, group = "undefined-group", callback) =>
|
|
|
41
41
|
options.map(option => (h("ch-checkbox", { name: option.name, class: "checkbox", part: `${group}-${option.id}`, checkedValue: option.value || option.id, caption: option.label, disabled: option.disabled, value: option.value, onInput: callback !== null && callback !== void 0 ? callback : null, startImgSrc: option.iconName })));
|
|
42
42
|
const mapOptionsToComboBoxItemModel = (options) => options.map(option => ({
|
|
43
43
|
value: option.id,
|
|
44
|
-
caption: option.label
|
|
45
|
-
startImgSrc: option.iconName
|
|
44
|
+
caption: option.label
|
|
45
|
+
// startImgSrc: option.iconName
|
|
46
46
|
}));
|
|
47
47
|
|
|
48
|
-
const newKbCss = ":host{display:grid;overflow:auto;grid-template-rows:max-content 1fr max-content}.section{display:contents}.header-one-col{grid-template-columns:1fr}.header-two-cols{grid-template-columns:1fr 1fr}.location-wrapper{display:flex;gap:var(--mer-spacing--2xs)}.location{flex-grow:1;grid-area:location}.tab::part(page){scrollbar-width:thin}.basic{grid-template:\"prototyping-target user-interface-language\" max-content \"back-end front-end\" max-content;grid-template-columns:1fr 1fr}.prototyping-target{grid-area:prototyping-target}.user-interface-language{grid-area:user-interface-language}.back-end{grid-area:back-end;grid-auto-rows:max-content}.front-end{grid-area:front-end}.tab-advanced-title{grid-area:tab-advanced-title}.layout-tab-advanced-left-col{grid-area:layout-tab-advanced-left-col}.layout-tab-advanced-right-col{grid-area:layout-tab-advanced-right-col}.basic,.advanced{padding-block:var(--content-block-spacing)}.tab-advanced__field-group{display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:auto}.text-align-center{text-align:center}";
|
|
48
|
+
const newKbCss = ":host{display:grid;block-size:100%;overflow:auto;grid-template-rows:max-content 1fr max-content}.section{display:contents}.header-one-col{grid-template-columns:1fr}.header-two-cols{grid-template-columns:1fr 1fr}.location-wrapper{display:flex;gap:var(--mer-spacing--2xs)}.location{flex-grow:1;grid-area:location}.tab::part(page){scrollbar-width:thin}.basic{grid-template:\"prototyping-target user-interface-language\" max-content \"back-end front-end\" max-content;grid-template-columns:1fr 1fr}.prototyping-target{grid-area:prototyping-target}.user-interface-language{grid-area:user-interface-language}.back-end{grid-area:back-end;grid-auto-rows:max-content}.front-end{grid-area:front-end}.tab-advanced-title{grid-area:tab-advanced-title}.layout-tab-advanced-left-col{grid-area:layout-tab-advanced-left-col}.layout-tab-advanced-right-col{grid-area:layout-tab-advanced-right-col}.basic,.advanced{padding-block:var(--content-block-spacing)}.tab-advanced__field-group{display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:auto}.text-align-center{text-align:center}";
|
|
49
49
|
|
|
50
50
|
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
51
51
|
if (kind === "a" && !f)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gx-ide-new-kb.entry.js","mappings":";;;;;;AAGA;AAqBA;AACA,MAAM,kCAAkC,GAAG;IACzC,aAAa,EAAE,gBAAgB;IAC/B,qBAAqB,EAAE,iBAAiB;IACxC,SAAS,EAAE,kBAAkB;CACrB,CAAC;AAEX,MAAM,gBAAgB,GAAG,CAAC,QAAiB,EAAE,OAAoB;IAC/D,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;IACrD,MAAM,UAAU,GACd,kCAAkC,CAChC,cAAiE,CAClE,CAAC;IACJ,IAAI,QAAQ,EAAE;QACZ,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,UA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AAe;WAEnB,uBAAA,IAAI,mCAAiB,CAAC,MAAM,CAAC,SAAS,CAChC,EACT;;YAEE,KAAK,EAAC,gBAAgB,EACtB,EAAE,EAAC,eAAe,EAClB,OAAO,EAAE,uBAAA,IAAI,mCAAiB,EAC9B,IAAI,EAAC,eAAe;WAEnB,uBAAA,IAAI,mCAAiB,CAAC,MAAM,CAAC,SAAS,CAChC,CACL,CACC,CACD,CACL,EACP;KACH;;;;;;;;;;;;;;;IA9xBC,MAAM,UAAU,GAAG,uBAAA,IAAI,+BAAa,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;IACrE,MAAM,MAAM,GAAkB,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC;SACjD,GAAG,CAAC,CAAC,QAAa,KAAK,QAAQ,CAAC,KAAK,CAAC;SACtC,MAAM,CAAC,OAAO,CAAC,CAAC;IACnB,OAAO,MAAM,CAAC;AAChB,CAAC;;;;;","names":[],"sources":["src/common/form-validation.ts","src/components/new-kb/helpers.tsx","src/components/new-kb/new-kb.scss?tag=gx-ide-new-kb&encapsulation=shadow","src/components/new-kb/new-kb.tsx"],"sourcesContent":["import { FormSubmitResult, ConnectionResultData } from \"../common/types\";\nimport { FormComponent } from \"@genexus/gemini/dist/types/common/interfaces\";\n\n// formSubmitValidation will be deprecated. use \"validateControls\" instead.\nexport const formSubmitValidation = (\n result: FormSubmitResult | ConnectionResultData,\n ref: any\n) => {\n result.fieldErrors?.forEach(element => {\n const key = element.key;\n const message = element.message;\n const hasError = element.hasError;\n\n const reference: FormComponent = ref[`${key}El`];\n if (reference && hasError && message.trim()) {\n reference.validationStatus = \"error\";\n reference.validationMessage = message;\n } else if (reference && !hasError) {\n reference.validationStatus = \"indeterminate\";\n reference.validationMessage = null;\n }\n });\n};\n\n// TODO: Improve the way we mark components with error. We must not use error classes.\nconst formElementsErrorClassesDictionary = {\n \"ch-checkbox\": \"checkbox-error\",\n \"ch-combo-box-render\": \"combo-box-error\",\n \"ch-edit\": \"form-input-error\"\n} as const;\n\nconst toggleErrorClass = (hasError: boolean, element: HTMLElement) => {\n const elementTagName = element.tagName.toLowerCase();\n const errorClass =\n formElementsErrorClassesDictionary[\n elementTagName as keyof typeof formElementsErrorClassesDictionary\n ];\n if (hasError) {\n element.classList.add(errorClass);\n } else {\n element.classList.remove(errorClass);\n }\n};\n\nexport const validateControls = (\n formSubmitResult: FormSubmitResult,\n validatableControls: Map<string, ControlValidation>\n): Map<string, ControlValidation> => {\n const validatableControlsUpdated = new Map(validatableControls);\n formSubmitResult.fieldErrors.forEach(fieldResult => {\n const fieldKey = fieldResult.key;\n const fieldHasError = fieldResult.hasError;\n const controlMapRecord = validatableControlsUpdated.get(fieldKey);\n if (controlMapRecord?.reference) {\n // toggle class to add or remove error style\n toggleErrorClass(fieldHasError, controlMapRecord.reference);\n validatableControlsUpdated.set(fieldKey, {\n ...controlMapRecord,\n hasError: fieldHasError,\n message: fieldResult.message\n });\n }\n });\n // return validatableControls updated.\n return validatableControlsUpdated;\n};\n\nexport type ControlValidation = {\n reference: HTMLElement;\n hasError: boolean;\n message: string;\n};\n","import { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\nimport { GxOption } from \"../..\";\nimport { h } from \"@stencil/core\";\nexport type ChCheckboxArray = HTMLChCheckboxElement[] | null;\n\nexport const renderChCheckboxItems = (\n options: Array<GxOption>,\n group = \"undefined-group\",\n callback?: any\n): any =>\n options?.length > 0 &&\n options.map(option => (\n <ch-checkbox\n name={option.name}\n class=\"checkbox\"\n part={`${group}-${option.id}`}\n checkedValue={option.value || option.id}\n caption={option.label}\n disabled={option.disabled}\n value={option.value}\n onInput={callback ?? null}\n startImgSrc={option.iconName}\n ></ch-checkbox>\n ));\n\nexport const mapOptionsToComboBoxItemModel = (\n options: GxOption[]\n): ComboBoxModel =>\n options.map(option => ({\n value: option.id,\n caption: option.label,\n startImgSrc: option.iconName\n }));\n",":host {\n display: grid;\n overflow: auto;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.section {\n display: contents;\n}\n\n.header {\n &-one-col {\n grid-template-columns: 1fr;\n }\n &-two-cols {\n grid-template-columns: 1fr 1fr;\n }\n}\n// location appears if advanced is true\n.location-wrapper {\n display: flex;\n gap: var(--mer-spacing--2xs);\n}\n.location {\n flex-grow: 1;\n grid-area: location;\n}\n\n.tab::part(page) {\n // TODO: Remove this line when the ch-tab renders supports scrollbar\n // custom styling\n scrollbar-width: thin;\n}\n\n.basic {\n grid-template:\n \"prototyping-target user-interface-language\" max-content\n \"back-end front-end\" max-content;\n grid-template-columns: 1fr 1fr;\n}\n.prototyping-target {\n grid-area: prototyping-target;\n}\n.user-interface-language {\n grid-area: user-interface-language;\n}\n.back-end {\n grid-area: back-end;\n grid-auto-rows: max-content;\n}\n.front-end {\n grid-area: front-end;\n}\n\n.tab-advanced-title {\n grid-area: tab-advanced-title;\n}\n.layout-tab-advanced-left-col {\n grid-area: layout-tab-advanced-left-col;\n}\n.layout-tab-advanced-right-col {\n grid-area: layout-tab-advanced-right-col;\n}\n\n.basic,\n.advanced {\n padding-block: var(--content-block-spacing);\n}\n\n.tab-advanced__field-group {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-auto-rows: auto;\n}\n\n// WA / TODO: Add a helper class in Mercury to justify text.\n.text-align-center {\n text-align: center; // should be resolved on mercury\n}\n","import {\n Component,\n Host,\n Prop,\n Element,\n State,\n getAssetPath,\n Method,\n h,\n Watch\n} from \"@stencil/core\";\n\nimport { MercuryBundles } from \"@genexus/mercury\";\n\nimport { config } from \"../../common/config\";\nimport { Locale } from \"../../common/locale\";\nimport { GxOption } from \"../../common/types\";\nimport { getSelectedItem } from \"../../common/common\";\nimport { FormSubmitResult } from \"../../common/types\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../common/form-validation\";\nimport { getIconPath } from \"@genexus/mercury\";\nimport {\n mapOptionsToComboBoxItemModel,\n renderChCheckboxItems\n} from \"./helpers\";\nimport { TabModel, ComboBoxModel } from \"@genexus/chameleon-controls-library\";\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 \"chameleon/scrollbar\"\n];\n\nconst WINDOWS_AUTHENTICATION_VALUE: string = \"windows-authentication\";\nconst MAIN_SECTION_CLASSES: string = \"main\";\nconst BASIC_SECTION_PARENT_CLASSES: string =\n \"basic field-group spacing-body-inline\";\n\nconst SYSTEM_ICON = getIconPath({\n category: \"system\",\n name: \"folder\",\n colorType: \"primary\"\n});\n\nconst BASIC_TAB_SELECTOR: string = \"basic\";\nconst ADVANCED_TAB_SELECTOR: string = \"advanced\";\n\n@Component({\n tag: \"gx-ide-new-kb\",\n styleUrl: \"new-kb.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/new-kb\"]\n})\nexport class GxIdeNewKb {\n [key: string]: any;\n\n #advancedTabHasBeenRendered: boolean = false;\n /**\n * The component hard-coded strings translations.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n #selectedFrontEndsIds: string[] = [];\n #shortcutsSrc = getAssetPath(`./gx-ide-assets/new-kb/shortcuts.json`);\n #kbSectionsModel: TabModel = [];\n\n @Element() el: HTMLGxIdeNewKbElement;\n\n /* References needed to collect data con \"Create\" button submit*/\n #authenticationTypeEl!: HTMLChComboBoxRenderElement;\n #collationEl!: HTMLChComboBoxRenderElement;\n #createDataFilesInKBFolderEl!: HTMLChCheckboxElement;\n #databaseNameEl!: HTMLChEditElement;\n #dataSourceEl!: HTMLChComboBoxRenderElement;\n #frontEndsEl!: HTMLDivElement;\n #kbNameEl!: HTMLChEditElement;\n #locationEl!: HTMLChEditElement;\n #passwordEl!: HTMLChEditElement;\n #prototypingEnvironmentEl!: HTMLChComboBoxRenderElement;\n #prototypingTargetEl!: HTMLChComboBoxRenderElement;\n #savePasswordEl!: HTMLChCheckboxElement;\n #serverNameEl!: HTMLChComboBoxRenderElement;\n #userInterfaceLanguageEl!: HTMLChComboBoxRenderElement;\n #userNameEl!: HTMLChEditElement;\n\n #chShortcutsEl: HTMLChShortcutsElement;\n\n @State() advancedTabIsVisible: boolean = false;\n @State() validatableControls = new Map<string, ControlValidation>();\n @State() createDataInKbDisabled = false;\n @State() userNameVisible = true;\n @State() passwordVisible = true;\n @State() savePasswordVisible = true;\n // representations of GxOption[] as ComboBoxModel, and initialValue for each one.\n @State() authenticationTypesComboBoxModel: ComboBoxModel = [];\n @State() authenticationTypesInitialValue: string;\n @State() collationsComboBoxModel: ComboBoxModel = [];\n @State() collationsInitialValue: string;\n @State() defaultDataSourcesComboBoxModel: ComboBoxModel = [];\n @State() defaultDataSourcesInitialValue: string;\n @State() prototypingTargetsComboBoxModel: ComboBoxModel = [];\n @State() prototypingTargetsInitialValue: string;\n @State() prototypingEnvironmentsComboBoxModel: ComboBoxModel = [];\n @State() prototypingEnvironmentsInitialValue: string;\n @State() serverNamesComboBoxModel: ComboBoxModel = [];\n @State() serverNamesInitialValue: string;\n @State() userInterfaceLanguagesComboBoxModel: ComboBoxModel = [];\n @State() userInterfaceLanguagesInitialValue: string;\n\n /**\n * Defines the type of authentication for the connection to the previously defined database\n */\n @Prop() readonly authenticationTypes!: GxOption[];\n @Watch(\"authenticationTypes\")\n watchAuthenticationTypes(newValue: GxOption[]) {\n if (newValue?.length) {\n this.authenticationTypesComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.authenticationTypesInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Callback invoked when the user wants to cancel KB creation (‘Cancel’ button)\n */\n @Prop() readonly cancelCallback: CancelCallback;\n\n /**\n * DB Collations\n */\n @Prop() readonly collations!: GxOption[];\n @Watch(\"collations\")\n watchCollations(newValue: GxOption[]) {\n if (newValue?.length) {\n this.collationsComboBoxModel = mapOptionsToComboBoxItemModel(newValue);\n this.collationsInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Callback that will be invoked when the user confirms KB creation (‘Create’ button)\n */\n @Prop() readonly createCallback: CreateCallback;\n\n /**\n * Disabled if the first item of the 'Server Name' combo is selected\n */\n @Prop() readonly createDataFilesInKBFolder: boolean = false;\n\n /**\n * Name of the database where we are going to persist the information of our KB\n */\n @Prop() readonly databaseName: string;\n\n /**\n * It allows defining the DBMS that will be used in the solution\n */\n @Prop({ mutable: true }) defaultDataSources!: GxOption[];\n @Watch(\"defaultDataSources\")\n watchDefaultDataSources(newValue: GxOption[]) {\n if (newValue?.length) {\n this.defaultDataSourcesComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.defaultDataSourcesInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * If true it displays the component title on the header\n */\n @Prop() readonly displayTitle = false;\n\n /**\n * It allows selecting multiple generators for the front end\n */\n @Prop({ mutable: true }) frontEnds!: GxOption[];\n\n /**\n * Callback invoked when the user wants to cancel KB creation (‘Cancel’ button)\n */\n @Prop() readonly getDataSourcesCallback: GetDataSourcesCallback;\n\n /**\n * Callback invoked when the user changes the prototyping environment, allowing for the modification of the list of front ends\n */\n @Prop() readonly getFrontEndsCallback: GetFrontEndsCallback;\n\n /**\n * Specify whether it is feasible to display information related to local configuration parameters\n */\n @Prop() readonly isAdvanced = false;\n\n /**\n * Default suggested path to a directory where the information related to the KB will be stored/generated\n */\n @Prop({ mutable: true }) kbLocation: string;\n\n /**\n * The knowledge base default suggested name\n */\n @Prop() readonly kbName: string;\n\n /**\n * Password for the database connection. Visible if the Authentication Type is different from Windows Authentication (first item of the combo)\n */\n @Prop() readonly password: string;\n\n /**\n * It allows selecting the default environment that the KB will have (additional environments can be created later)\n */\n @Prop() readonly prototypingEnvironments!: GxOption[];\n @Watch(\"prototypingEnvironments\")\n watchPrototypingEnvironments(newValue: GxOption[]) {\n if (newValue?.length) {\n this.prototypingEnvironmentsComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.prototypingEnvironmentsInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Path to a directory where the information related to the KB will be stored/generated\n */\n @Prop() readonly prototypingTargets!: GxOption[];\n @Watch(\"prototypingTargets\")\n watchPrototypingTargets(newValue: GxOption[]) {\n if (newValue?.length) {\n this.prototypingTargetsComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.prototypingTargetsInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Visible if something other than Windows Authentication is selected\n */\n @Prop() readonly savePassword: boolean = false;\n\n /**\n * This is a function provided by the developer that returns a string, with the location path\n */\n @Prop() readonly selectLocationCallback!: SelectLocationCallback;\n\n /**\n * Name of the DB server where we want to persist the information of our KB\n */\n @Prop() readonly serverNames!: GxOption[];\n @Watch(\"serverNames\")\n watchServerNames(newValue: GxOption[]) {\n if (newValue?.length) {\n this.serverNamesComboBoxModel = mapOptionsToComboBoxItemModel(newValue);\n this.serverNamesInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Specify the language in which the application screens will be developed (default language)\n */\n @Prop() readonly userInterfaceLanguages!: GxOption[];\n @Watch(\"userInterfaceLanguages\")\n watchUserInterfaceLanguages(newValue: GxOption[]) {\n if (newValue?.length) {\n this.userInterfaceLanguagesComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.userInterfaceLanguagesInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Username for the database connection. Visible if the Authentication Type is different from Windows Authentication (first item of the combo)\n */\n @Prop() readonly userName: string;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.previousFrontEndsState = this.frontEnds;\n this.#kbSectionsModel = [\n {\n id: BASIC_TAB_SELECTOR,\n name: this.#componentLocale.tabBasic.tabLabel\n },\n {\n id: ADVANCED_TAB_SELECTOR,\n name: this.#componentLocale.tabAdvanced.tabLabel\n }\n ];\n }\n\n componentDidLoad() {\n this.#initialSetup();\n this.#initializeValidatableControlsBasicTab();\n }\n\n componentDidRender() {\n if (this.advancedTabIsVisible && !this.#advancedTabHasBeenRendered) {\n // just call this once.\n this.#initialSetupAdvancedTab();\n this.#initializeValidatableControlsAdvancedTab();\n this.#advancedTabHasBeenRendered = true;\n }\n }\n\n /**\n * Suspends or reactivates the shortcuts\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n if (suspendShortcuts) {\n this.#chShortcutsEl.suspend = true;\n } else {\n this.#chShortcutsEl.suspend = false;\n }\n }\n\n // Uncomment when \"TODO: define button handler and logic\" is done.\n // #geminiToolsSearchPrimary = getIconPath({\n // category: \"gemini-tools\",\n // name: \"search\",\n // colorType: \"primary\"\n // });\n // #geminiToolsResetPrimary = getIconPath({\n // category: \"gemini-tools\",\n // name: \"reset\",\n // colorType: \"primary\"\n // });\n\n #getCheckboxValues() {\n // TODO (We shouldn't be using querySelector)\n const checkboxes = this.#frontEndsEl.querySelectorAll(\"ch-checkbox\");\n const values: Array<string> = Array.from(checkboxes)\n .map((checkbox: any) => checkbox.value)\n .filter(Boolean);\n return values;\n }\n\n #handleCheckboxStatusChange = () => {\n this.#updateSelectedFrontEndsIds();\n };\n\n #handlerAuthenticationTypeInput = (e: CustomEvent<string> | InputEvent) => {\n const authenticationTypeValue = e?.detail;\n this.#evaluateUserInputsDisplay(authenticationTypeValue as string);\n };\n\n #handlerServerNameInput = (e: CustomEvent<string> | InputEvent) => {\n this.#evaluateCreateDataCheckboxEnabled(e.detail as string);\n };\n\n #prototypingEnvironmentValueChangedHandler = (): void => {\n this.#getDataSources();\n this.#updateFrontEnds();\n };\n\n #prototypingTargetValueChangedHandler = (): void => {\n this.#getDataSources();\n };\n\n #renderAdvanced = (): Element[] => {\n return [\n <h2\n // #knowledge base storage\n class=\"control-header heading-5 text-align-center\"\n >\n {this.#componentLocale.tabAdvanced.tabTitle}\n </h2>,\n <div class=\"field-group tab-advanced__field-group\">\n <div\n // #server name\n class=\"field field-block server-name-field\"\n >\n <label class=\"label\" htmlFor=\"serverName\">\n {this.#componentLocale.tabAdvanced.serverName.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.serverNames.length === 0}\n placeholder={\n this.serverNames.length === 0\n ? this.#componentLocale.tabAdvanced.serverName\n .disabledPlaceholder\n : \"\"\n }\n value={this.serverNamesInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#serverNameEl = el as HTMLChComboBoxRenderElement)\n }\n model={this.serverNamesComboBoxModel}\n onInput={\n this.serverNames.length > 0\n ? this.#handlerServerNameInput\n : undefined\n }\n id=\"serverName\"\n part=\"server-name\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#serverNameEl)}\n </div>\n\n {/* <button\n TODO: define button handler and logic\n class=\"button-tertiary button-icon-only server-name-button\"\n aria-label=\"caption\"\n part=\"search-server-name\"\n hidden\n >\n <ch-image\n class=\"icon-sm\"\n src={this.#geminiToolsSearchPrimary}\n ></ch-image>\n </button> */}\n\n <div\n // #authentication type\n class=\"field field-block authentication-type-field\"\n >\n <label class=\"label\" htmlFor=\"authenticationType\">\n {this.#componentLocale.tabAdvanced.authenticationType.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.authenticationTypes.length === 0}\n placeholder={\n this.authenticationTypes.length === 0\n ? this.#componentLocale.tabAdvanced.authenticationType\n .disabledPlaceholder\n : \"\"\n }\n value={this.authenticationTypesInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#authenticationTypeEl = el as HTMLChComboBoxRenderElement)\n }\n model={this.authenticationTypesComboBoxModel}\n id=\"authenticationType\"\n part=\"authentication-type\"\n onInput={\n this.authenticationTypes.length > 0\n ? this.#handlerAuthenticationTypeInput\n : undefined\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#authenticationTypeEl)}\n </div>\n\n <div\n // #database\n class=\"field field-block database-field\"\n >\n <label class=\"label\" htmlFor=\"databaseName\">\n {this.#componentLocale.tabAdvanced.databaseName.label}\n </label>\n <ch-edit\n // TODO add placeholder\n class=\"form-input\"\n value={this.databaseName}\n id=\"databaseName\"\n part=\"database-name\"\n ref={(el: HTMLChEditElement) =>\n (this.#databaseNameEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#databaseNameEl)}\n </div>\n\n {this.userNameVisible ? (\n <div\n // #username\n class=\"field field-block username-field\"\n >\n <label class=\"label\" htmlFor=\"userName\">\n {this.#componentLocale.tabAdvanced.userName.label}\n </label>\n <ch-edit\n // TODO add placeholder\n class=\"form-input\"\n value={this.userName}\n id=\"userName\"\n part=\"user-name\"\n ref={(el: HTMLChEditElement) =>\n (this.#userNameEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#userNameEl)}\n </div>\n ) : null}\n\n <div\n // #collation\n class=\"field field-block collation-field\"\n >\n <label class=\"label\" htmlFor=\"collation\">\n {this.#componentLocale.tabAdvanced.collation.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.serverNames.length === 0}\n placeholder={\n this.collations.length === 0\n ? this.#componentLocale.tabAdvanced.collation\n .disabledPlaceholder\n : \"\"\n }\n value={this.collationsInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#collationEl = el as HTMLChComboBoxRenderElement)\n }\n model={this.collationsComboBoxModel}\n id=\"collation\"\n part=\"collation\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#collationEl)}\n </div>\n\n {/* <button\n TODO: define button handler and logic \n class=\"button-tertiary button-icon-only collation-button\"\n aria-label=\"caption\"\n part=\"reset-collation\"\n >\n <ch-image\n class=\"icon-sm\"\n src={this.#geminiToolsResetPrimary}\n ></ch-image>\n </button> */}\n\n {this.passwordVisible ? (\n <div\n // #password\n class=\"field field-block password-field\"\n >\n <label class=\"label\" htmlFor=\"password\">\n {this.#componentLocale.tabAdvanced.password.label}\n </label>\n <ch-edit\n // TODO add placeholder\n class=\"form-input\"\n type=\"password\"\n value={this.password}\n id=\"password\"\n part=\"password\"\n ref={(el: HTMLChEditElement) =>\n (this.#passwordEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#passwordEl)}\n </div>\n ) : null}\n\n <ch-checkbox\n // #create data in knowledge base folder\n class=\"checkbox create-data-in-kb-checkbox\"\n checkedValue=\"createDataFilesInKBFolder\"\n caption={this.#componentLocale.tabAdvanced.createDataFilesInKbFolder}\n disabled={this.createDataInKbDisabled}\n part=\"create-data-in-kb\"\n id=\"createDataFilesInKBFolder\"\n ref={(el: HTMLChCheckboxElement) =>\n (this.#createDataFilesInKBFolderEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n\n {this.savePasswordVisible ? (\n <ch-checkbox\n // #save password\n class=\"checkbox save-password-checkbox\"\n checkedValue=\"password\"\n caption={this.#componentLocale.tabAdvanced.savePassword}\n part=\"save-password\"\n id=\"savePassword\"\n ref={(el: HTMLChCheckboxElement) =>\n (this.#savePasswordEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n ) : null}\n </div>\n ];\n };\n\n #renderBasic = (): HTMLElement[] => {\n return [\n <div\n // #prototyping target\n class=\"field field-block prototyping-target\"\n >\n <label class=\"label\" htmlFor=\"prototypingTarget\">\n {this.#componentLocale.tabBasic.prototypingTarget.label}\n </label>\n\n <ch-combo-box-render\n id=\"prototypingTarget\"\n class=\"combo-box\"\n part=\"prototyping-target\"\n disabled={this.prototypingTargets.length === 0}\n placeholder={\n this.prototypingTargets.length === 0\n ? this.#componentLocale.tabBasic.prototypingTarget\n .disabledPlaceholder\n : \"\"\n }\n value={this.prototypingTargetsInitialValue}\n model={this.prototypingTargetsComboBoxModel}\n onInput={\n this.prototypingTargets.length > 0\n ? this.#prototypingTargetValueChangedHandler\n : undefined\n }\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#prototypingTargetEl = el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#prototypingTargetEl)}\n </div>,\n\n <div\n // #user interface\n class=\"field field-block user-interface-language\"\n >\n <label class=\"label\" htmlFor=\"userInterfaceLanguage\">\n {this.#componentLocale.tabBasic.userInterfaceLanguage.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.userInterfaceLanguages.length === 0}\n placeholder={\n this.userInterfaceLanguages.length === 0\n ? this.#componentLocale.tabBasic.userInterfaceLanguage\n .disabledPlaceholder\n : \"\"\n }\n value={this.userInterfaceLanguagesInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#userInterfaceLanguageEl = el as HTMLChComboBoxRenderElement)\n }\n model={this.userInterfaceLanguagesComboBoxModel}\n id=\"userInterfaceLanguage\"\n part=\"user-interface-language\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#userInterfaceLanguageEl)}\n </div>,\n\n <div>\n <h2\n // back end\n class=\"control-header heading-5 text-align-center\"\n >\n {this.#componentLocale.tabBasic.backEnd.backEndLabel}\n </h2>\n <div class=\"field-group back-end\">\n <div\n // #prototyping environment\n class=\"field field-block\"\n >\n <label class=\"label\" htmlFor=\"prototypingEnvironment\">\n {\n this.#componentLocale.tabBasic.backEnd.prototypingEnvironment\n .label\n }\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.prototypingEnvironments.length === 0}\n placeholder={\n this.prototypingEnvironments.length === 0\n ? this.#componentLocale.tabBasic.backEnd\n .prototypingEnvironment.disabledPlaceholder\n : \"\"\n }\n value={this.prototypingEnvironmentsInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#prototypingEnvironmentEl =\n el as HTMLChComboBoxRenderElement)\n }\n model={this.prototypingEnvironmentsComboBoxModel}\n onInput={\n this.prototypingEnvironments.length > 0\n ? this.#prototypingEnvironmentValueChangedHandler\n : undefined\n }\n part=\"prototyping-environment\"\n id=\"prototypingEnvironment\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#prototypingEnvironmentEl)}\n </div>\n\n <div\n // #data source\n class=\"field field-block\"\n >\n <label class=\"label\" htmlFor=\"dataSource\">\n {this.#componentLocale.tabBasic.backEnd.dataSource.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.defaultDataSources.length === 0}\n placeholder={\n this.defaultDataSources.length === 0\n ? this.#componentLocale.tabBasic.backEnd.dataSource\n .disabledPlaceholder\n : \"\"\n }\n value={this.defaultDataSourcesInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#dataSourceEl = el as HTMLChComboBoxRenderElement)\n }\n model={this.defaultDataSourcesComboBoxModel}\n part=\"data-source\"\n id=\"dataSource\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#dataSourceEl)}\n </div>\n </div>\n </div>,\n\n <div>\n <h2\n // front end\n class=\"control-header heading-5 text-align-center\"\n >\n {this.#componentLocale.tabBasic.frontEnd.frontEndLabel}\n </h2>\n <div\n class=\"field-group front-end\"\n ref={(el: HTMLDivElement) =>\n (this.#frontEndsEl = el as HTMLDivElement)\n }\n >\n {renderChCheckboxItems(\n this.frontEnds,\n \"front-end\",\n this.#handleCheckboxStatusChange\n )}\n </div>\n </div>\n ];\n };\n\n // - - - - - - - - - -\n\n #cancelKbHandler = (): void => {\n if (this.cancelCallback) {\n this.cancelCallback();\n }\n };\n\n #createKbHandler = (): void => {\n if (this.createCallback) {\n const createCallbackPromise = this.createCallback({\n authenticationType: this.#authenticationTypeEl?.value,\n collation: this.#collationEl?.value,\n createDataFilesInKBFolder: !!this.#createDataFilesInKBFolderEl?.value,\n dataSource: this.#dataSourceEl?.value,\n databaseName: this.#databaseNameEl?.value,\n frontEnds: this.#selectedFrontEndsIds,\n kbLocation: this.#locationEl?.value,\n kbName: this.#kbNameEl?.value,\n password: this.#passwordEl?.value,\n prototypingEnvironment: this.#prototypingEnvironmentEl?.value,\n prototypingTarget: this.#prototypingTargetEl?.value,\n savePassword: !!this.#savePasswordEl?.value,\n serverName: this.#serverNameEl?.value,\n userInterfaceLanguage: this.#userInterfaceLanguageEl?.value,\n userName: this.#userNameEl?.value\n });\n\n createCallbackPromise.then((formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n });\n }\n };\n\n /**\n * Disable \"Create Data in Knowledge Base Folder\" if the first Server Name\n * option is selected.\n * */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #evaluateCreateDataCheckboxEnabled = (serverNameValue: string) => {\n if (this.serverNames[0]?.id === serverNameValue) {\n this.createDataInKbDisabled = true;\n } else {\n this.createDataInKbDisabled = false;\n }\n };\n\n #evaluateTooltipRender = (\n controlReference: HTMLElement\n ): HTMLChTooltipElement =>\n this.validatableControls?.get(controlReference?.id)?.hasError &&\n this.validatableControls.get(controlReference.id)?.message && (\n <ch-tooltip\n class=\"tooltip\"\n actionElement={controlReference as unknown as HTMLButtonElement}\n blockAlign={config.tooltipSettings.blockAlign}\n inlineAlign={config.tooltipSettings.inlineAlign}\n delay={config.tooltipSettings.delay}\n >\n {this.validatableControls.get(controlReference.id).message}\n </ch-tooltip>\n );\n\n /**\n * If \"Authentication Type\" is \"Windows Authentication\", hide User Name,\n * Password, and Save Password fields.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #evaluateUserInputsDisplay = (authenticationTypeValue: string) => {\n if (authenticationTypeValue === WINDOWS_AUTHENTICATION_VALUE) {\n this.userNameVisible = false;\n this.passwordVisible = false;\n this.savePasswordVisible = false;\n } else {\n this.userNameVisible = true;\n this.passwordVisible = true;\n this.savePasswordVisible = true;\n }\n };\n\n #getDataSources = (): void => {\n if (this.getDataSourcesCallback) {\n const selectedPrototypingEnvironmentId =\n this.#prototypingEnvironmentEl.value;\n const selectedPrototypingTargetId = this.#prototypingTargetEl.value;\n const updatedDefaultDataSourcesPromise: Promise<GxOption[]> =\n this.getDataSourcesCallback(\n selectedPrototypingEnvironmentId,\n selectedPrototypingTargetId\n );\n updatedDefaultDataSourcesPromise\n .then(result => {\n if (result.length > 0) {\n this.defaultDataSources = result;\n // set first option as selected\n this.#dataSourceEl.value = this.defaultDataSources[0].id;\n }\n })\n .catch(() => {\n // to do\n });\n }\n };\n\n #initialSetup = () => {\n this.#updateSelectedFrontEndsIds();\n // map all \"Basic Tab\" GxOption[]'s to ComboBoxModel's\n this.watchDefaultDataSources(this.defaultDataSources);\n this.watchPrototypingEnvironments(this.prototypingEnvironments);\n this.watchPrototypingTargets(this.prototypingTargets);\n this.watchServerNames(this.serverNames);\n this.watchUserInterfaceLanguages(this.userInterfaceLanguages);\n };\n\n #initialSetupAdvancedTab = () => {\n const selectedServerNameValue = this.#serverNameEl.value;\n this.#evaluateCreateDataCheckboxEnabled(selectedServerNameValue);\n\n const selectedAuthenticationType = this.#authenticationTypeEl.value;\n this.#evaluateUserInputsDisplay(selectedAuthenticationType);\n\n // map all \"Advanced Tab\" GxOption[]'s to ComboBoxModel's\n this.watchAuthenticationTypes(this.authenticationTypes);\n this.watchCollations(this.collations);\n };\n\n #initializeValidatableControlsBasicTab = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#dataSourceEl,\n this.#kbNameEl,\n this.#prototypingEnvironmentEl,\n this.#prototypingTargetEl,\n this.#userInterfaceLanguageEl\n ];\n validatableControls.forEach(validatableControl => {\n if (validatableControl.id) {\n this.validatableControls.set(validatableControl.id, {\n reference: validatableControl,\n hasError: false,\n message: undefined\n });\n }\n });\n };\n\n #initializeValidatableControlsAdvancedTab = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#locationEl,\n this.#authenticationTypeEl,\n this.#createDataFilesInKBFolderEl,\n this.#serverNameEl,\n this.#authenticationTypeEl,\n this.#databaseNameEl,\n this.#userNameEl,\n this.#collationEl,\n this.#passwordEl,\n this.#savePasswordEl\n ];\n validatableControls.forEach(validatableControl => {\n if (validatableControl.id) {\n this.validatableControls.set(validatableControl.id, {\n reference: validatableControl,\n hasError: false,\n message: undefined\n });\n }\n });\n };\n\n /**\n * @description It allows defining the DBMS that will be used in the solution\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #selectLocationHandler = (): void => {\n this.selectLocationCallback().then(kbLocation => {\n if (kbLocation) {\n this.kbLocation = kbLocation;\n } else {\n // to be defined\n }\n });\n };\n\n #tabSelectionChangedHandler = (\n event: CustomEvent<{\n lastSelectedIndex: number;\n newSelectedId: string;\n newSelectedIndex: number;\n }>\n ): void => {\n if (event.detail.newSelectedId === ADVANCED_TAB_SELECTOR) {\n this.advancedTabIsVisible = true;\n // Some logic for advanced tab is done on componentDidRender lifecycle,\n // since the reference to the elements is needed.\n }\n };\n\n /**\n * Evaluates which front-end options need updates on 'getFrontEndsCallback'\n * by comparing the new state (getFrontEndsCallback result) and previous state.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #updateFrontEnds = () => {\n if (this.getFrontEndsCallback) {\n const selectedPrototypingEnvironmentId =\n this.#prototypingEnvironmentEl.value;\n const updatedFrontEndsPromise: Promise<GxOption[]> =\n this.getFrontEndsCallback(selectedPrototypingEnvironmentId);\n updatedFrontEndsPromise\n .then(newFrontEndsOptions => {\n const updatedFrontEnds: GxOption[] = [];\n newFrontEndsOptions.forEach(newFrontEnd => {\n const foundActualFrontEnd = this.frontEnds.find(actualFrontEnd => {\n return newFrontEnd.id === actualFrontEnd.id;\n });\n if (foundActualFrontEnd) {\n // update newFrontEnd checked status with actual frontEnd checked status\n newFrontEnd.checked = foundActualFrontEnd.checked;\n }\n updatedFrontEnds.push(newFrontEnd);\n });\n this.frontEnds = updatedFrontEnds;\n })\n .catch(() => {\n // to do\n });\n }\n };\n\n #updateSelectedFrontEndsIds = () => {\n this.#selectedFrontEndsIds = this.#getCheckboxValues();\n };\n\n render(): void {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n <section class=\"section\">\n <header\n class={{\n \"field-group\": true,\n \"control-header-with-border\": !this.isAdvanced,\n \"control-header\": this.isAdvanced,\n \"header\": true,\n \"header-two-cols\": this.isAdvanced,\n \"header-one-col\": !this.isAdvanced,\n \"spacing-body-block-start\": true,\n \"spacing-body-inline\": true\n }}\n >\n <div\n // #kb name\n class=\"field field-inline kb-name\"\n >\n <label class=\"label kb-label\" htmlFor=\"kbName\">\n {this.#componentLocale.header.kbName}\n </label>\n <ch-edit\n // TODO add placeholder\n autoFocus\n class=\"form-input kb-input\"\n placeholder=\"SalesInventory\"\n value={this.kbName}\n ref={(el: HTMLChEditElement) =>\n (this.#kbNameEl = el as HTMLChEditElement)\n }\n id=\"kbName\"\n part=\"kb-name\"\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#kbNameEl)}\n </div>\n\n {this.isAdvanced && (\n <div class=\"location-wrapper\">\n <div\n // #location\n class=\"field field-inline location\"\n >\n <label class=\"label location-label\" htmlFor=\"kbLocation\">\n {this.#componentLocale.header.kbLocation}\n </label>\n <ch-edit\n // TODO add placeholder\n class=\"form-input location-input\"\n value={this.kbLocation}\n ref={(el: HTMLChEditElement) =>\n (this.#locationEl = el as HTMLChEditElement)\n }\n id=\"kbLocation\"\n part=\"kb-location\"\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#locationEl)}\n </div>\n <button\n class=\"button-tertiary button-icon-only location-icon\"\n aria-label={this.#componentLocale.header.selectLocationButton}\n title={this.#componentLocale.header.selectLocationButton}\n part=\"button-select-location\"\n onClick={this.#selectLocationHandler}\n >\n <ch-image class=\"icon-md\" src={SYSTEM_ICON}></ch-image>\n </button>\n </div>\n )}\n </header>\n {this.isAdvanced ? (\n <ch-tab-render\n // #tab\n class={{\n scrollable: true,\n tab: true,\n [MAIN_SECTION_CLASSES]: true\n }}\n direction=\"block\"\n model={this.#kbSectionsModel}\n selectedId={BASIC_TAB_SELECTOR}\n overflow=\"auto scroll\"\n contain=\"size\"\n onSelectedItemChange={\n !this.advancedTabIsVisible && this.#tabSelectionChangedHandler\n }\n >\n <div\n slot={BASIC_TAB_SELECTOR}\n class={BASIC_SECTION_PARENT_CLASSES}\n part=\"tab-button-basic\"\n >\n {this.#renderBasic()}\n </div>\n\n {this.advancedTabIsVisible && (\n <div\n slot={ADVANCED_TAB_SELECTOR}\n class=\"advanced spacing-body-inline\"\n part=\"tab-button-advanced\"\n >\n {this.#renderAdvanced()}\n </div>\n )}\n </ch-tab-render>\n ) : (\n <div class={MAIN_SECTION_CLASSES}>\n <div class={BASIC_SECTION_PARENT_CLASSES}>\n {this.#renderBasic()}\n </div>\n </div>\n )}\n\n <footer\n class={{\n \"control-footer\": this.isAdvanced,\n \"control-footer-with-border\": !this.isAdvanced,\n \"spacing-body-block-end\": true,\n \"spacing-body-inline\": true\n }}\n >\n <div class=\"buttons-spacer\">\n <button\n // #cancel\n class=\"button-secondary\"\n id=\"button-cancel\"\n onClick={this.#cancelKbHandler}\n part=\"button-cancel\"\n >\n {this.#componentLocale.footer.btnCancel}\n </button>\n <button\n // #create\n class=\"button-primary\"\n id=\"button-create\"\n onClick={this.#createKbHandler}\n part=\"button-create\"\n >\n {this.#componentLocale.footer.btnCreate}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\nexport interface NewKBData {\n authenticationType: string;\n collation: string;\n createDataFilesInKBFolder: boolean;\n databaseName: string;\n dataSource: string;\n frontEnds: string[];\n kbLocation: string;\n kbName: string;\n password: string;\n prototypingEnvironment: string;\n prototypingTarget: string;\n savePassword: boolean;\n serverName: string;\n userInterfaceLanguage: string;\n userName: string;\n}\n\nexport type CreateCallback = (data: NewKBData) => Promise<FormSubmitResult>;\n\nexport type CancelCallback = () => Promise<void>;\n\nexport type GetDataSourcesCallback = (\n selectedPrototypingEnvironmentId: string,\n selectedPrototypingTargetId: string\n) => Promise<GxOption[]>;\n\nexport type GetFrontEndsCallback = (\n selectedPrototypingEnvironmentId: string\n) => Promise<GxOption[]>;\n\nexport type SelectLocationCallback = () => Promise<string>;\n"],"version":3}
|
|
1
|
+
{"file":"gx-ide-new-kb.entry.js","mappings":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jB,IAAI,CAAe,CAChB,CACF,CACP,EAED,cACE,KAAK,EAAE;gBACL,gBAAgB,EAAE,IAAI,CAAC,UAAU;gBACjC,4BAA4B,EAAE,CAAC,IAAI,CAAC,UAAU;gBAC9C,wBAAwB,EAAE,IAAI;gBAC9B,qBAAqB,EAAE,IAAI;aAC5B,IAED,WAAK,KAAK,EAAC,gBAAgB,IACzB;;YAEE,KAAK,EAAC,kBAAkB,EACxB,EAAE,EAAC,eAAe,EAClB,OAAO,EAAE,uBAAA,IAAI,mCAAiB,EAC9B,IAAI,EAAC,eAAe;WAEnB,uBAAA,IAAI,mCAAiB,CAAC,MAAM,CAAC,SAAS,CAChC,EACT;;YAEE,KAAK,EAAC,gBAAgB,EACtB,EAAE,EAAC,eAAe,EAClB,OAAO,EAAE,uBAAA,IAAI,mCAAiB,EAC9B,IAAI,EAAC,eAAe;WAEnB,uBAAA,IAAI,mCAAiB,CAAC,MAAM,CAAC,SAAS,CAChC,CACL,CACC,CACD,CACL,EACP;KACH;;;;;;;;;;;;;;;IA9xBC,MAAM,UAAU,GAAG,uBAAA,IAAI,+BAAa,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;IACrE,MAAM,MAAM,GAAkB,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC;SACjD,GAAG,CAAC,CAAC,QAAa,KAAK,QAAQ,CAAC,KAAK,CAAC;SACtC,MAAM,CAAC,OAAO,CAAC,CAAC;IACnB,OAAO,MAAM,CAAC;AAChB,CAAC;;;;;","names":[],"sources":["src/common/form-validation.ts","src/components/new-kb/helpers.tsx","src/components/new-kb/new-kb.scss?tag=gx-ide-new-kb&encapsulation=shadow","src/components/new-kb/new-kb.tsx"],"sourcesContent":["import { FormSubmitResult, ConnectionResultData } from \"../common/types\";\nimport { FormComponent } from \"@genexus/gemini/dist/types/common/interfaces\";\n\n// formSubmitValidation will be deprecated. use \"validateControls\" instead.\nexport const formSubmitValidation = (\n result: FormSubmitResult | ConnectionResultData,\n ref: any\n) => {\n result.fieldErrors?.forEach(element => {\n const key = element.key;\n const message = element.message;\n const hasError = element.hasError;\n\n const reference: FormComponent = ref[`${key}El`];\n if (reference && hasError && message.trim()) {\n reference.validationStatus = \"error\";\n reference.validationMessage = message;\n } else if (reference && !hasError) {\n reference.validationStatus = \"indeterminate\";\n reference.validationMessage = null;\n }\n });\n};\n\n// TODO: Improve the way we mark components with error. We must not use error classes.\nconst formElementsErrorClassesDictionary = {\n \"ch-checkbox\": \"checkbox-error\",\n \"ch-combo-box-render\": \"combo-box-error\",\n \"ch-edit\": \"form-input-error\"\n} as const;\n\nconst toggleErrorClass = (hasError: boolean, element: HTMLElement) => {\n const elementTagName = element.tagName.toLowerCase();\n const errorClass =\n formElementsErrorClassesDictionary[\n elementTagName as keyof typeof formElementsErrorClassesDictionary\n ];\n if (hasError) {\n element.classList.add(errorClass);\n } else {\n element.classList.remove(errorClass);\n }\n};\n\nexport const validateControls = (\n formSubmitResult: FormSubmitResult,\n validatableControls: Map<string, ControlValidation>\n): Map<string, ControlValidation> => {\n const validatableControlsUpdated = new Map(validatableControls);\n formSubmitResult.fieldErrors.forEach(fieldResult => {\n const fieldKey = fieldResult.key;\n const fieldHasError = fieldResult.hasError;\n const controlMapRecord = validatableControlsUpdated.get(fieldKey);\n if (controlMapRecord?.reference) {\n // toggle class to add or remove error style\n toggleErrorClass(fieldHasError, controlMapRecord.reference);\n validatableControlsUpdated.set(fieldKey, {\n ...controlMapRecord,\n hasError: fieldHasError,\n message: fieldResult.message\n });\n }\n });\n // return validatableControls updated.\n return validatableControlsUpdated;\n};\n\nexport type ControlValidation = {\n reference: HTMLElement;\n hasError: boolean;\n message: string;\n};\n","import { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\nimport { GxOption } from \"../..\";\nimport { h } from \"@stencil/core\";\nexport type ChCheckboxArray = HTMLChCheckboxElement[] | null;\n\nexport const renderChCheckboxItems = (\n options: Array<GxOption>,\n group = \"undefined-group\",\n callback?: any\n): any =>\n options?.length > 0 &&\n options.map(option => (\n <ch-checkbox\n name={option.name}\n class=\"checkbox\"\n part={`${group}-${option.id}`}\n checkedValue={option.value || option.id}\n caption={option.label}\n disabled={option.disabled}\n value={option.value}\n onInput={callback ?? null}\n startImgSrc={option.iconName}\n ></ch-checkbox>\n ));\n\nexport const mapOptionsToComboBoxItemModel = (\n options: GxOption[]\n): ComboBoxModel =>\n options.map(option => ({\n value: option.id,\n caption: option.label\n // startImgSrc: option.iconName\n }));\n",":host {\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.section {\n display: contents;\n}\n\n.header {\n &-one-col {\n grid-template-columns: 1fr;\n }\n &-two-cols {\n grid-template-columns: 1fr 1fr;\n }\n}\n// location appears if advanced is true\n.location-wrapper {\n display: flex;\n gap: var(--mer-spacing--2xs);\n}\n.location {\n flex-grow: 1;\n grid-area: location;\n}\n\n.tab::part(page) {\n // TODO: Remove this line when the ch-tab renders supports scrollbar\n // custom styling\n scrollbar-width: thin;\n}\n\n.basic {\n grid-template:\n \"prototyping-target user-interface-language\" max-content\n \"back-end front-end\" max-content;\n grid-template-columns: 1fr 1fr;\n}\n.prototyping-target {\n grid-area: prototyping-target;\n}\n.user-interface-language {\n grid-area: user-interface-language;\n}\n.back-end {\n grid-area: back-end;\n grid-auto-rows: max-content;\n}\n.front-end {\n grid-area: front-end;\n}\n\n.tab-advanced-title {\n grid-area: tab-advanced-title;\n}\n.layout-tab-advanced-left-col {\n grid-area: layout-tab-advanced-left-col;\n}\n.layout-tab-advanced-right-col {\n grid-area: layout-tab-advanced-right-col;\n}\n\n.basic,\n.advanced {\n padding-block: var(--content-block-spacing);\n}\n\n.tab-advanced__field-group {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-auto-rows: auto;\n}\n\n// WA / TODO: Add a helper class in Mercury to justify text.\n.text-align-center {\n text-align: center; // should be resolved on mercury\n}\n","import {\n Component,\n Host,\n Prop,\n Element,\n State,\n getAssetPath,\n Method,\n h,\n Watch\n} from \"@stencil/core\";\n\nimport { MercuryBundles } from \"@genexus/mercury\";\n\nimport { config } from \"../../common/config\";\nimport { Locale } from \"../../common/locale\";\nimport { GxOption } from \"../../common/types\";\nimport { getSelectedItem } from \"../../common/common\";\nimport { FormSubmitResult } from \"../../common/types\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../common/form-validation\";\nimport { getIconPath } from \"@genexus/mercury\";\nimport {\n mapOptionsToComboBoxItemModel,\n renderChCheckboxItems\n} from \"./helpers\";\nimport { TabModel, ComboBoxModel } from \"@genexus/chameleon-controls-library\";\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 \"chameleon/scrollbar\"\n];\n\nconst WINDOWS_AUTHENTICATION_VALUE: string = \"windows-authentication\";\nconst MAIN_SECTION_CLASSES: string = \"main\";\nconst BASIC_SECTION_PARENT_CLASSES: string =\n \"basic field-group spacing-body-inline\";\n\nconst SYSTEM_ICON = getIconPath({\n category: \"system\",\n name: \"folder\",\n colorType: \"primary\"\n});\n\nconst BASIC_TAB_SELECTOR: string = \"basic\";\nconst ADVANCED_TAB_SELECTOR: string = \"advanced\";\n\n@Component({\n tag: \"gx-ide-new-kb\",\n styleUrl: \"new-kb.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/new-kb\"]\n})\nexport class GxIdeNewKb {\n [key: string]: any;\n\n #advancedTabHasBeenRendered: boolean = false;\n /**\n * The component hard-coded strings translations.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n #selectedFrontEndsIds: string[] = [];\n #shortcutsSrc = getAssetPath(`./gx-ide-assets/new-kb/shortcuts.json`);\n #kbSectionsModel: TabModel = [];\n\n @Element() el: HTMLGxIdeNewKbElement;\n\n /* References needed to collect data con \"Create\" button submit*/\n #authenticationTypeEl!: HTMLChComboBoxRenderElement;\n #collationEl!: HTMLChComboBoxRenderElement;\n #createDataFilesInKBFolderEl!: HTMLChCheckboxElement;\n #databaseNameEl!: HTMLChEditElement;\n #dataSourceEl!: HTMLChComboBoxRenderElement;\n #frontEndsEl!: HTMLDivElement;\n #kbNameEl!: HTMLChEditElement;\n #locationEl!: HTMLChEditElement;\n #passwordEl!: HTMLChEditElement;\n #prototypingEnvironmentEl!: HTMLChComboBoxRenderElement;\n #prototypingTargetEl!: HTMLChComboBoxRenderElement;\n #savePasswordEl!: HTMLChCheckboxElement;\n #serverNameEl!: HTMLChComboBoxRenderElement;\n #userInterfaceLanguageEl!: HTMLChComboBoxRenderElement;\n #userNameEl!: HTMLChEditElement;\n\n #chShortcutsEl: HTMLChShortcutsElement;\n\n @State() advancedTabIsVisible: boolean = false;\n @State() validatableControls = new Map<string, ControlValidation>();\n @State() createDataInKbDisabled = false;\n @State() userNameVisible = true;\n @State() passwordVisible = true;\n @State() savePasswordVisible = true;\n // representations of GxOption[] as ComboBoxModel, and initialValue for each one.\n @State() authenticationTypesComboBoxModel: ComboBoxModel = [];\n @State() authenticationTypesInitialValue: string;\n @State() collationsComboBoxModel: ComboBoxModel = [];\n @State() collationsInitialValue: string;\n @State() defaultDataSourcesComboBoxModel: ComboBoxModel = [];\n @State() defaultDataSourcesInitialValue: string;\n @State() prototypingTargetsComboBoxModel: ComboBoxModel = [];\n @State() prototypingTargetsInitialValue: string;\n @State() prototypingEnvironmentsComboBoxModel: ComboBoxModel = [];\n @State() prototypingEnvironmentsInitialValue: string;\n @State() serverNamesComboBoxModel: ComboBoxModel = [];\n @State() serverNamesInitialValue: string;\n @State() userInterfaceLanguagesComboBoxModel: ComboBoxModel = [];\n @State() userInterfaceLanguagesInitialValue: string;\n\n /**\n * Defines the type of authentication for the connection to the previously defined database\n */\n @Prop() readonly authenticationTypes!: GxOption[];\n @Watch(\"authenticationTypes\")\n watchAuthenticationTypes(newValue: GxOption[]) {\n if (newValue?.length) {\n this.authenticationTypesComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.authenticationTypesInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Callback invoked when the user wants to cancel KB creation (‘Cancel’ button)\n */\n @Prop() readonly cancelCallback: CancelCallback;\n\n /**\n * DB Collations\n */\n @Prop() readonly collations!: GxOption[];\n @Watch(\"collations\")\n watchCollations(newValue: GxOption[]) {\n if (newValue?.length) {\n this.collationsComboBoxModel = mapOptionsToComboBoxItemModel(newValue);\n this.collationsInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Callback that will be invoked when the user confirms KB creation (‘Create’ button)\n */\n @Prop() readonly createCallback: CreateCallback;\n\n /**\n * Disabled if the first item of the 'Server Name' combo is selected\n */\n @Prop() readonly createDataFilesInKBFolder: boolean = false;\n\n /**\n * Name of the database where we are going to persist the information of our KB\n */\n @Prop() readonly databaseName: string;\n\n /**\n * It allows defining the DBMS that will be used in the solution\n */\n @Prop({ mutable: true }) defaultDataSources!: GxOption[];\n @Watch(\"defaultDataSources\")\n watchDefaultDataSources(newValue: GxOption[]) {\n if (newValue?.length) {\n this.defaultDataSourcesComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.defaultDataSourcesInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * If true it displays the component title on the header\n */\n @Prop() readonly displayTitle = false;\n\n /**\n * It allows selecting multiple generators for the front end\n */\n @Prop({ mutable: true }) frontEnds!: GxOption[];\n\n /**\n * Callback invoked when the user wants to cancel KB creation (‘Cancel’ button)\n */\n @Prop() readonly getDataSourcesCallback: GetDataSourcesCallback;\n\n /**\n * Callback invoked when the user changes the prototyping environment, allowing for the modification of the list of front ends\n */\n @Prop() readonly getFrontEndsCallback: GetFrontEndsCallback;\n\n /**\n * Specify whether it is feasible to display information related to local configuration parameters\n */\n @Prop() readonly isAdvanced = false;\n\n /**\n * Default suggested path to a directory where the information related to the KB will be stored/generated\n */\n @Prop({ mutable: true }) kbLocation: string;\n\n /**\n * The knowledge base default suggested name\n */\n @Prop() readonly kbName: string;\n\n /**\n * Password for the database connection. Visible if the Authentication Type is different from Windows Authentication (first item of the combo)\n */\n @Prop() readonly password: string;\n\n /**\n * It allows selecting the default environment that the KB will have (additional environments can be created later)\n */\n @Prop() readonly prototypingEnvironments!: GxOption[];\n @Watch(\"prototypingEnvironments\")\n watchPrototypingEnvironments(newValue: GxOption[]) {\n if (newValue?.length) {\n this.prototypingEnvironmentsComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.prototypingEnvironmentsInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Path to a directory where the information related to the KB will be stored/generated\n */\n @Prop() readonly prototypingTargets!: GxOption[];\n @Watch(\"prototypingTargets\")\n watchPrototypingTargets(newValue: GxOption[]) {\n if (newValue?.length) {\n this.prototypingTargetsComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.prototypingTargetsInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Visible if something other than Windows Authentication is selected\n */\n @Prop() readonly savePassword: boolean = false;\n\n /**\n * This is a function provided by the developer that returns a string, with the location path\n */\n @Prop() readonly selectLocationCallback!: SelectLocationCallback;\n\n /**\n * Name of the DB server where we want to persist the information of our KB\n */\n @Prop() readonly serverNames!: GxOption[];\n @Watch(\"serverNames\")\n watchServerNames(newValue: GxOption[]) {\n if (newValue?.length) {\n this.serverNamesComboBoxModel = mapOptionsToComboBoxItemModel(newValue);\n this.serverNamesInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Specify the language in which the application screens will be developed (default language)\n */\n @Prop() readonly userInterfaceLanguages!: GxOption[];\n @Watch(\"userInterfaceLanguages\")\n watchUserInterfaceLanguages(newValue: GxOption[]) {\n if (newValue?.length) {\n this.userInterfaceLanguagesComboBoxModel =\n mapOptionsToComboBoxItemModel(newValue);\n this.userInterfaceLanguagesInitialValue = getSelectedItem(newValue);\n }\n }\n\n /**\n * Username for the database connection. Visible if the Authentication Type is different from Windows Authentication (first item of the combo)\n */\n @Prop() readonly userName: string;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.previousFrontEndsState = this.frontEnds;\n this.#kbSectionsModel = [\n {\n id: BASIC_TAB_SELECTOR,\n name: this.#componentLocale.tabBasic.tabLabel\n },\n {\n id: ADVANCED_TAB_SELECTOR,\n name: this.#componentLocale.tabAdvanced.tabLabel\n }\n ];\n }\n\n componentDidLoad() {\n this.#initialSetup();\n this.#initializeValidatableControlsBasicTab();\n }\n\n componentDidRender() {\n if (this.advancedTabIsVisible && !this.#advancedTabHasBeenRendered) {\n // just call this once.\n this.#initialSetupAdvancedTab();\n this.#initializeValidatableControlsAdvancedTab();\n this.#advancedTabHasBeenRendered = true;\n }\n }\n\n /**\n * Suspends or reactivates the shortcuts\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n if (suspendShortcuts) {\n this.#chShortcutsEl.suspend = true;\n } else {\n this.#chShortcutsEl.suspend = false;\n }\n }\n\n // Uncomment when \"TODO: define button handler and logic\" is done.\n // #geminiToolsSearchPrimary = getIconPath({\n // category: \"gemini-tools\",\n // name: \"search\",\n // colorType: \"primary\"\n // });\n // #geminiToolsResetPrimary = getIconPath({\n // category: \"gemini-tools\",\n // name: \"reset\",\n // colorType: \"primary\"\n // });\n\n #getCheckboxValues() {\n // TODO (We shouldn't be using querySelector)\n const checkboxes = this.#frontEndsEl.querySelectorAll(\"ch-checkbox\");\n const values: Array<string> = Array.from(checkboxes)\n .map((checkbox: any) => checkbox.value)\n .filter(Boolean);\n return values;\n }\n\n #handleCheckboxStatusChange = () => {\n this.#updateSelectedFrontEndsIds();\n };\n\n #handlerAuthenticationTypeInput = (e: CustomEvent<string> | InputEvent) => {\n const authenticationTypeValue = e?.detail;\n this.#evaluateUserInputsDisplay(authenticationTypeValue as string);\n };\n\n #handlerServerNameInput = (e: CustomEvent<string> | InputEvent) => {\n this.#evaluateCreateDataCheckboxEnabled(e.detail as string);\n };\n\n #prototypingEnvironmentValueChangedHandler = (): void => {\n this.#getDataSources();\n this.#updateFrontEnds();\n };\n\n #prototypingTargetValueChangedHandler = (): void => {\n this.#getDataSources();\n };\n\n #renderAdvanced = (): Element[] => {\n return [\n <h2\n // #knowledge base storage\n class=\"control-header heading-5 text-align-center\"\n >\n {this.#componentLocale.tabAdvanced.tabTitle}\n </h2>,\n <div class=\"field-group tab-advanced__field-group\">\n <div\n // #server name\n class=\"field field-block server-name-field\"\n >\n <label class=\"label\" htmlFor=\"serverName\">\n {this.#componentLocale.tabAdvanced.serverName.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.serverNames.length === 0}\n placeholder={\n this.serverNames.length === 0\n ? this.#componentLocale.tabAdvanced.serverName\n .disabledPlaceholder\n : \"\"\n }\n value={this.serverNamesInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#serverNameEl = el as HTMLChComboBoxRenderElement)\n }\n model={this.serverNamesComboBoxModel}\n onInput={\n this.serverNames.length > 0\n ? this.#handlerServerNameInput\n : undefined\n }\n id=\"serverName\"\n part=\"server-name\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#serverNameEl)}\n </div>\n\n {/* <button\n TODO: define button handler and logic\n class=\"button-tertiary button-icon-only server-name-button\"\n aria-label=\"caption\"\n part=\"search-server-name\"\n hidden\n >\n <ch-image\n class=\"icon-sm\"\n src={this.#geminiToolsSearchPrimary}\n ></ch-image>\n </button> */}\n\n <div\n // #authentication type\n class=\"field field-block authentication-type-field\"\n >\n <label class=\"label\" htmlFor=\"authenticationType\">\n {this.#componentLocale.tabAdvanced.authenticationType.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.authenticationTypes.length === 0}\n placeholder={\n this.authenticationTypes.length === 0\n ? this.#componentLocale.tabAdvanced.authenticationType\n .disabledPlaceholder\n : \"\"\n }\n value={this.authenticationTypesInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#authenticationTypeEl = el as HTMLChComboBoxRenderElement)\n }\n model={this.authenticationTypesComboBoxModel}\n id=\"authenticationType\"\n part=\"authentication-type\"\n onInput={\n this.authenticationTypes.length > 0\n ? this.#handlerAuthenticationTypeInput\n : undefined\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#authenticationTypeEl)}\n </div>\n\n <div\n // #database\n class=\"field field-block database-field\"\n >\n <label class=\"label\" htmlFor=\"databaseName\">\n {this.#componentLocale.tabAdvanced.databaseName.label}\n </label>\n <ch-edit\n // TODO add placeholder\n class=\"form-input\"\n value={this.databaseName}\n id=\"databaseName\"\n part=\"database-name\"\n ref={(el: HTMLChEditElement) =>\n (this.#databaseNameEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#databaseNameEl)}\n </div>\n\n {this.userNameVisible ? (\n <div\n // #username\n class=\"field field-block username-field\"\n >\n <label class=\"label\" htmlFor=\"userName\">\n {this.#componentLocale.tabAdvanced.userName.label}\n </label>\n <ch-edit\n // TODO add placeholder\n class=\"form-input\"\n value={this.userName}\n id=\"userName\"\n part=\"user-name\"\n ref={(el: HTMLChEditElement) =>\n (this.#userNameEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#userNameEl)}\n </div>\n ) : null}\n\n <div\n // #collation\n class=\"field field-block collation-field\"\n >\n <label class=\"label\" htmlFor=\"collation\">\n {this.#componentLocale.tabAdvanced.collation.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.serverNames.length === 0}\n placeholder={\n this.collations.length === 0\n ? this.#componentLocale.tabAdvanced.collation\n .disabledPlaceholder\n : \"\"\n }\n value={this.collationsInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#collationEl = el as HTMLChComboBoxRenderElement)\n }\n model={this.collationsComboBoxModel}\n id=\"collation\"\n part=\"collation\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#collationEl)}\n </div>\n\n {/* <button\n TODO: define button handler and logic \n class=\"button-tertiary button-icon-only collation-button\"\n aria-label=\"caption\"\n part=\"reset-collation\"\n >\n <ch-image\n class=\"icon-sm\"\n src={this.#geminiToolsResetPrimary}\n ></ch-image>\n </button> */}\n\n {this.passwordVisible ? (\n <div\n // #password\n class=\"field field-block password-field\"\n >\n <label class=\"label\" htmlFor=\"password\">\n {this.#componentLocale.tabAdvanced.password.label}\n </label>\n <ch-edit\n // TODO add placeholder\n class=\"form-input\"\n type=\"password\"\n value={this.password}\n id=\"password\"\n part=\"password\"\n ref={(el: HTMLChEditElement) =>\n (this.#passwordEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#passwordEl)}\n </div>\n ) : null}\n\n <ch-checkbox\n // #create data in knowledge base folder\n class=\"checkbox create-data-in-kb-checkbox\"\n checkedValue=\"createDataFilesInKBFolder\"\n caption={this.#componentLocale.tabAdvanced.createDataFilesInKbFolder}\n disabled={this.createDataInKbDisabled}\n part=\"create-data-in-kb\"\n id=\"createDataFilesInKBFolder\"\n ref={(el: HTMLChCheckboxElement) =>\n (this.#createDataFilesInKBFolderEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n\n {this.savePasswordVisible ? (\n <ch-checkbox\n // #save password\n class=\"checkbox save-password-checkbox\"\n checkedValue=\"password\"\n caption={this.#componentLocale.tabAdvanced.savePassword}\n part=\"save-password\"\n id=\"savePassword\"\n ref={(el: HTMLChCheckboxElement) =>\n (this.#savePasswordEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n ) : null}\n </div>\n ];\n };\n\n #renderBasic = (): HTMLElement[] => {\n return [\n <div\n // #prototyping target\n class=\"field field-block prototyping-target\"\n >\n <label class=\"label\" htmlFor=\"prototypingTarget\">\n {this.#componentLocale.tabBasic.prototypingTarget.label}\n </label>\n\n <ch-combo-box-render\n id=\"prototypingTarget\"\n class=\"combo-box\"\n part=\"prototyping-target\"\n disabled={this.prototypingTargets.length === 0}\n placeholder={\n this.prototypingTargets.length === 0\n ? this.#componentLocale.tabBasic.prototypingTarget\n .disabledPlaceholder\n : \"\"\n }\n value={this.prototypingTargetsInitialValue}\n model={this.prototypingTargetsComboBoxModel}\n onInput={\n this.prototypingTargets.length > 0\n ? this.#prototypingTargetValueChangedHandler\n : undefined\n }\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#prototypingTargetEl = el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#prototypingTargetEl)}\n </div>,\n\n <div\n // #user interface\n class=\"field field-block user-interface-language\"\n >\n <label class=\"label\" htmlFor=\"userInterfaceLanguage\">\n {this.#componentLocale.tabBasic.userInterfaceLanguage.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.userInterfaceLanguages.length === 0}\n placeholder={\n this.userInterfaceLanguages.length === 0\n ? this.#componentLocale.tabBasic.userInterfaceLanguage\n .disabledPlaceholder\n : \"\"\n }\n value={this.userInterfaceLanguagesInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#userInterfaceLanguageEl = el as HTMLChComboBoxRenderElement)\n }\n model={this.userInterfaceLanguagesComboBoxModel}\n id=\"userInterfaceLanguage\"\n part=\"user-interface-language\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#userInterfaceLanguageEl)}\n </div>,\n\n <div>\n <h2\n // back end\n class=\"control-header heading-5 text-align-center\"\n >\n {this.#componentLocale.tabBasic.backEnd.backEndLabel}\n </h2>\n <div class=\"field-group back-end\">\n <div\n // #prototyping environment\n class=\"field field-block\"\n >\n <label class=\"label\" htmlFor=\"prototypingEnvironment\">\n {\n this.#componentLocale.tabBasic.backEnd.prototypingEnvironment\n .label\n }\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.prototypingEnvironments.length === 0}\n placeholder={\n this.prototypingEnvironments.length === 0\n ? this.#componentLocale.tabBasic.backEnd\n .prototypingEnvironment.disabledPlaceholder\n : \"\"\n }\n value={this.prototypingEnvironmentsInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#prototypingEnvironmentEl =\n el as HTMLChComboBoxRenderElement)\n }\n model={this.prototypingEnvironmentsComboBoxModel}\n onInput={\n this.prototypingEnvironments.length > 0\n ? this.#prototypingEnvironmentValueChangedHandler\n : undefined\n }\n part=\"prototyping-environment\"\n id=\"prototypingEnvironment\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#prototypingEnvironmentEl)}\n </div>\n\n <div\n // #data source\n class=\"field field-block\"\n >\n <label class=\"label\" htmlFor=\"dataSource\">\n {this.#componentLocale.tabBasic.backEnd.dataSource.label}\n </label>\n <ch-combo-box-render\n class=\"combo-box\"\n disabled={this.defaultDataSources.length === 0}\n placeholder={\n this.defaultDataSources.length === 0\n ? this.#componentLocale.tabBasic.backEnd.dataSource\n .disabledPlaceholder\n : \"\"\n }\n value={this.defaultDataSourcesInitialValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#dataSourceEl = el as HTMLChComboBoxRenderElement)\n }\n model={this.defaultDataSourcesComboBoxModel}\n part=\"data-source\"\n id=\"dataSource\"\n ></ch-combo-box-render>\n {this.#evaluateTooltipRender(this.#dataSourceEl)}\n </div>\n </div>\n </div>,\n\n <div>\n <h2\n // front end\n class=\"control-header heading-5 text-align-center\"\n >\n {this.#componentLocale.tabBasic.frontEnd.frontEndLabel}\n </h2>\n <div\n class=\"field-group front-end\"\n ref={(el: HTMLDivElement) =>\n (this.#frontEndsEl = el as HTMLDivElement)\n }\n >\n {renderChCheckboxItems(\n this.frontEnds,\n \"front-end\",\n this.#handleCheckboxStatusChange\n )}\n </div>\n </div>\n ];\n };\n\n // - - - - - - - - - -\n\n #cancelKbHandler = (): void => {\n if (this.cancelCallback) {\n this.cancelCallback();\n }\n };\n\n #createKbHandler = (): void => {\n if (this.createCallback) {\n const createCallbackPromise = this.createCallback({\n authenticationType: this.#authenticationTypeEl?.value,\n collation: this.#collationEl?.value,\n createDataFilesInKBFolder: !!this.#createDataFilesInKBFolderEl?.value,\n dataSource: this.#dataSourceEl?.value,\n databaseName: this.#databaseNameEl?.value,\n frontEnds: this.#selectedFrontEndsIds,\n kbLocation: this.#locationEl?.value,\n kbName: this.#kbNameEl?.value,\n password: this.#passwordEl?.value,\n prototypingEnvironment: this.#prototypingEnvironmentEl?.value,\n prototypingTarget: this.#prototypingTargetEl?.value,\n savePassword: !!this.#savePasswordEl?.value,\n serverName: this.#serverNameEl?.value,\n userInterfaceLanguage: this.#userInterfaceLanguageEl?.value,\n userName: this.#userNameEl?.value\n });\n\n createCallbackPromise.then((formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n });\n }\n };\n\n /**\n * Disable \"Create Data in Knowledge Base Folder\" if the first Server Name\n * option is selected.\n * */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #evaluateCreateDataCheckboxEnabled = (serverNameValue: string) => {\n if (this.serverNames[0]?.id === serverNameValue) {\n this.createDataInKbDisabled = true;\n } else {\n this.createDataInKbDisabled = false;\n }\n };\n\n #evaluateTooltipRender = (\n controlReference: HTMLElement\n ): HTMLChTooltipElement =>\n this.validatableControls?.get(controlReference?.id)?.hasError &&\n this.validatableControls.get(controlReference.id)?.message && (\n <ch-tooltip\n class=\"tooltip\"\n actionElement={controlReference as unknown as HTMLButtonElement}\n blockAlign={config.tooltipSettings.blockAlign}\n inlineAlign={config.tooltipSettings.inlineAlign}\n delay={config.tooltipSettings.delay}\n >\n {this.validatableControls.get(controlReference.id).message}\n </ch-tooltip>\n );\n\n /**\n * If \"Authentication Type\" is \"Windows Authentication\", hide User Name,\n * Password, and Save Password fields.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #evaluateUserInputsDisplay = (authenticationTypeValue: string) => {\n if (authenticationTypeValue === WINDOWS_AUTHENTICATION_VALUE) {\n this.userNameVisible = false;\n this.passwordVisible = false;\n this.savePasswordVisible = false;\n } else {\n this.userNameVisible = true;\n this.passwordVisible = true;\n this.savePasswordVisible = true;\n }\n };\n\n #getDataSources = (): void => {\n if (this.getDataSourcesCallback) {\n const selectedPrototypingEnvironmentId =\n this.#prototypingEnvironmentEl.value;\n const selectedPrototypingTargetId = this.#prototypingTargetEl.value;\n const updatedDefaultDataSourcesPromise: Promise<GxOption[]> =\n this.getDataSourcesCallback(\n selectedPrototypingEnvironmentId,\n selectedPrototypingTargetId\n );\n updatedDefaultDataSourcesPromise\n .then(result => {\n if (result.length > 0) {\n this.defaultDataSources = result;\n // set first option as selected\n this.#dataSourceEl.value = this.defaultDataSources[0].id;\n }\n })\n .catch(() => {\n // to do\n });\n }\n };\n\n #initialSetup = () => {\n this.#updateSelectedFrontEndsIds();\n // map all \"Basic Tab\" GxOption[]'s to ComboBoxModel's\n this.watchDefaultDataSources(this.defaultDataSources);\n this.watchPrototypingEnvironments(this.prototypingEnvironments);\n this.watchPrototypingTargets(this.prototypingTargets);\n this.watchServerNames(this.serverNames);\n this.watchUserInterfaceLanguages(this.userInterfaceLanguages);\n };\n\n #initialSetupAdvancedTab = () => {\n const selectedServerNameValue = this.#serverNameEl.value;\n this.#evaluateCreateDataCheckboxEnabled(selectedServerNameValue);\n\n const selectedAuthenticationType = this.#authenticationTypeEl.value;\n this.#evaluateUserInputsDisplay(selectedAuthenticationType);\n\n // map all \"Advanced Tab\" GxOption[]'s to ComboBoxModel's\n this.watchAuthenticationTypes(this.authenticationTypes);\n this.watchCollations(this.collations);\n };\n\n #initializeValidatableControlsBasicTab = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#dataSourceEl,\n this.#kbNameEl,\n this.#prototypingEnvironmentEl,\n this.#prototypingTargetEl,\n this.#userInterfaceLanguageEl\n ];\n validatableControls.forEach(validatableControl => {\n if (validatableControl.id) {\n this.validatableControls.set(validatableControl.id, {\n reference: validatableControl,\n hasError: false,\n message: undefined\n });\n }\n });\n };\n\n #initializeValidatableControlsAdvancedTab = () => {\n // populate #controlsValidation with the controls that could have errors.\n const validatableControls: HTMLElement[] = [\n this.#locationEl,\n this.#authenticationTypeEl,\n this.#createDataFilesInKBFolderEl,\n this.#serverNameEl,\n this.#authenticationTypeEl,\n this.#databaseNameEl,\n this.#userNameEl,\n this.#collationEl,\n this.#passwordEl,\n this.#savePasswordEl\n ];\n validatableControls.forEach(validatableControl => {\n if (validatableControl.id) {\n this.validatableControls.set(validatableControl.id, {\n reference: validatableControl,\n hasError: false,\n message: undefined\n });\n }\n });\n };\n\n /**\n * @description It allows defining the DBMS that will be used in the solution\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #selectLocationHandler = (): void => {\n this.selectLocationCallback().then(kbLocation => {\n if (kbLocation) {\n this.kbLocation = kbLocation;\n } else {\n // to be defined\n }\n });\n };\n\n #tabSelectionChangedHandler = (\n event: CustomEvent<{\n lastSelectedIndex: number;\n newSelectedId: string;\n newSelectedIndex: number;\n }>\n ): void => {\n if (event.detail.newSelectedId === ADVANCED_TAB_SELECTOR) {\n this.advancedTabIsVisible = true;\n // Some logic for advanced tab is done on componentDidRender lifecycle,\n // since the reference to the elements is needed.\n }\n };\n\n /**\n * Evaluates which front-end options need updates on 'getFrontEndsCallback'\n * by comparing the new state (getFrontEndsCallback result) and previous state.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #updateFrontEnds = () => {\n if (this.getFrontEndsCallback) {\n const selectedPrototypingEnvironmentId =\n this.#prototypingEnvironmentEl.value;\n const updatedFrontEndsPromise: Promise<GxOption[]> =\n this.getFrontEndsCallback(selectedPrototypingEnvironmentId);\n updatedFrontEndsPromise\n .then(newFrontEndsOptions => {\n const updatedFrontEnds: GxOption[] = [];\n newFrontEndsOptions.forEach(newFrontEnd => {\n const foundActualFrontEnd = this.frontEnds.find(actualFrontEnd => {\n return newFrontEnd.id === actualFrontEnd.id;\n });\n if (foundActualFrontEnd) {\n // update newFrontEnd checked status with actual frontEnd checked status\n newFrontEnd.checked = foundActualFrontEnd.checked;\n }\n updatedFrontEnds.push(newFrontEnd);\n });\n this.frontEnds = updatedFrontEnds;\n })\n .catch(() => {\n // to do\n });\n }\n };\n\n #updateSelectedFrontEndsIds = () => {\n this.#selectedFrontEndsIds = this.#getCheckboxValues();\n };\n\n render(): void {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n <section class=\"section\">\n <header\n class={{\n \"field-group\": true,\n \"control-header-with-border\": !this.isAdvanced,\n \"control-header\": this.isAdvanced,\n \"header\": true,\n \"header-two-cols\": this.isAdvanced,\n \"header-one-col\": !this.isAdvanced,\n \"spacing-body-block-start\": true,\n \"spacing-body-inline\": true\n }}\n >\n <div\n // #kb name\n class=\"field field-inline kb-name\"\n >\n <label class=\"label kb-label\" htmlFor=\"kbName\">\n {this.#componentLocale.header.kbName}\n </label>\n <ch-edit\n // TODO add placeholder\n autoFocus\n class=\"form-input kb-input\"\n placeholder=\"SalesInventory\"\n value={this.kbName}\n ref={(el: HTMLChEditElement) =>\n (this.#kbNameEl = el as HTMLChEditElement)\n }\n id=\"kbName\"\n part=\"kb-name\"\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#kbNameEl)}\n </div>\n\n {this.isAdvanced && (\n <div class=\"location-wrapper\">\n <div\n // #location\n class=\"field field-inline location\"\n >\n <label class=\"label location-label\" htmlFor=\"kbLocation\">\n {this.#componentLocale.header.kbLocation}\n </label>\n <ch-edit\n // TODO add placeholder\n class=\"form-input location-input\"\n value={this.kbLocation}\n ref={(el: HTMLChEditElement) =>\n (this.#locationEl = el as HTMLChEditElement)\n }\n id=\"kbLocation\"\n part=\"kb-location\"\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#locationEl)}\n </div>\n <button\n class=\"button-tertiary button-icon-only location-icon\"\n aria-label={this.#componentLocale.header.selectLocationButton}\n title={this.#componentLocale.header.selectLocationButton}\n part=\"button-select-location\"\n onClick={this.#selectLocationHandler}\n >\n <ch-image class=\"icon-md\" src={SYSTEM_ICON}></ch-image>\n </button>\n </div>\n )}\n </header>\n {this.isAdvanced ? (\n <ch-tab-render\n // #tab\n class={{\n scrollable: true,\n tab: true,\n [MAIN_SECTION_CLASSES]: true\n }}\n direction=\"block\"\n model={this.#kbSectionsModel}\n selectedId={BASIC_TAB_SELECTOR}\n overflow=\"auto scroll\"\n contain=\"size\"\n onSelectedItemChange={\n !this.advancedTabIsVisible && this.#tabSelectionChangedHandler\n }\n >\n <div\n slot={BASIC_TAB_SELECTOR}\n class={BASIC_SECTION_PARENT_CLASSES}\n part=\"tab-button-basic\"\n >\n {this.#renderBasic()}\n </div>\n\n {this.advancedTabIsVisible && (\n <div\n slot={ADVANCED_TAB_SELECTOR}\n class=\"advanced spacing-body-inline\"\n part=\"tab-button-advanced\"\n >\n {this.#renderAdvanced()}\n </div>\n )}\n </ch-tab-render>\n ) : (\n <div class={MAIN_SECTION_CLASSES}>\n <div class={BASIC_SECTION_PARENT_CLASSES}>\n {this.#renderBasic()}\n </div>\n </div>\n )}\n\n <footer\n class={{\n \"control-footer\": this.isAdvanced,\n \"control-footer-with-border\": !this.isAdvanced,\n \"spacing-body-block-end\": true,\n \"spacing-body-inline\": true\n }}\n >\n <div class=\"buttons-spacer\">\n <button\n // #cancel\n class=\"button-secondary\"\n id=\"button-cancel\"\n onClick={this.#cancelKbHandler}\n part=\"button-cancel\"\n >\n {this.#componentLocale.footer.btnCancel}\n </button>\n <button\n // #create\n class=\"button-primary\"\n id=\"button-create\"\n onClick={this.#createKbHandler}\n part=\"button-create\"\n >\n {this.#componentLocale.footer.btnCreate}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\nexport interface NewKBData {\n authenticationType: string;\n collation: string;\n createDataFilesInKBFolder: boolean;\n databaseName: string;\n dataSource: string;\n frontEnds: string[];\n kbLocation: string;\n kbName: string;\n password: string;\n prototypingEnvironment: string;\n prototypingTarget: string;\n savePassword: boolean;\n serverName: string;\n userInterfaceLanguage: string;\n userName: string;\n}\n\nexport type CreateCallback = (data: NewKBData) => Promise<FormSubmitResult>;\n\nexport type CancelCallback = () => Promise<void>;\n\nexport type GetDataSourcesCallback = (\n selectedPrototypingEnvironmentId: string,\n selectedPrototypingTargetId: string\n) => Promise<GxOption[]>;\n\nexport type GetFrontEndsCallback = (\n selectedPrototypingEnvironmentId: string\n) => Promise<GxOption[]>;\n\nexport type SelectLocationCallback = () => Promise<string>;\n"],"version":3}
|
|
@@ -199,7 +199,7 @@ const GxIdeObjectSelector = class {
|
|
|
199
199
|
}, __classPrivateFieldGet(this, _GxIdeObjectSelector_componentLocale, "f").filter.dateTime), h("input", { type: "datetime-local", class: "form-input input-date-time", id: "modified-date", name: "modifiedDate", part: "filter-pattern", value: this.patternValue, max: TODAY, ref: (el) => (__classPrivateFieldSet(this, _GxIdeObjectSelector_modifiedDateInput, el, "f")), disabled: this.modifiedAfterValue !== "afterDateTime", onInput: __classPrivateFieldGet(this, _GxIdeObjectSelector_refreshUIWithNewConfiguration, "f") }))))))));
|
|
200
200
|
});
|
|
201
201
|
_GxIdeObjectSelector_renderFooter.set(this, () => {
|
|
202
|
-
return (h("footer", { class: "footer control-footer" }, h("div", { class: "control-footer control-footer-space-between objects-count spacing-body-inline", slot: "footer-above" }, h("p", { class: "text-body-regular-s objects-selected", part: "objects-selected" }, __classPrivateFieldGet(this, _GxIdeObjectSelector_evaluateObjectsCount, "f").call(this, "selected")), h("p", { class: "text-body-regular-s objects-matching", part: "objects-matching" }, __classPrivateFieldGet(this, _GxIdeObjectSelector_evaluateObjectsCount, "f").call(this, "matching"))), h("div", { class: "control-footer-with-border control-footer-space-between spacing-body-inline spacing-body-block-end" }, h("button", {
|
|
202
|
+
return (h("footer", { class: "footer control-footer-space-between" }, h("div", { class: "control-footer control-footer-space-between objects-count spacing-body-inline", slot: "footer-above" }, h("p", { class: "text-body-regular-s objects-selected", part: "objects-selected" }, __classPrivateFieldGet(this, _GxIdeObjectSelector_evaluateObjectsCount, "f").call(this, "selected")), h("p", { class: "text-body-regular-s objects-matching", part: "objects-matching" }, __classPrivateFieldGet(this, _GxIdeObjectSelector_evaluateObjectsCount, "f").call(this, "matching"))), h("div", { class: "control-footer-with-border control-footer-space-between spacing-body-inline spacing-body-block-end" }, h("button", {
|
|
203
203
|
// button new object
|
|
204
204
|
class: "button-secondary", part: "button button-new", onClick: !this.loading ? __classPrivateFieldGet(this, _GxIdeObjectSelector_newObjectCallbackHandler, "f") : undefined, disabled: this.loading
|
|
205
205
|
}, __classPrivateFieldGet(this, _GxIdeObjectSelector_componentLocale, "f").footer.btnNew), h("div", { class: "end buttons-spacer" }, h("button", {
|