@genexus/genexus-ide-ui 3.2.12 → 3.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js +24 -34
- package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js +12 -12
- package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-new-environment.cjs.entry.js +26 -3
- package/dist/cjs/gx-ide-new-environment.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js +77 -44
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/kb-manager-import/helpers.js +2 -9
- package/dist/collection/components/kb-manager-import/helpers.js.map +1 -1
- package/dist/collection/components/kb-manager-import/kb-manager-import.js +10 -3
- package/dist/collection/components/kb-manager-import/kb-manager-import.js.map +1 -1
- package/dist/collection/components/new-environment/gx-ide-assets/new-environment/langs/new-environment.lang.en.json +3 -1
- package/dist/collection/components/new-environment/gx-ide-assets/new-environment/langs/new-environment.lang.ja.json +3 -1
- package/dist/collection/components/new-environment/gx-ide-assets/new-environment/langs/new-environment.lang.zh.json +3 -1
- package/dist/collection/components/new-environment/new-environment.css +29 -0
- package/dist/collection/components/new-environment/new-environment.js +54 -17
- package/dist/collection/components/new-environment/new-environment.js.map +1 -1
- package/dist/collection/components/new-kb/gx-ide-assets/new-kb/langs/new-kb.lang.en.json +9 -5
- package/dist/collection/components/new-kb/gx-ide-assets/new-kb/langs/new-kb.lang.ja.json +7 -3
- package/dist/collection/components/new-kb/gx-ide-assets/new-kb/langs/new-kb.lang.zh.json +9 -5
- package/dist/collection/components/new-kb/new-kb.css +42 -1
- package/dist/collection/components/new-kb/new-kb.js +77 -47
- package/dist/collection/components/new-kb/new-kb.js.map +1 -1
- package/dist/collection/components/team-dev/create-kb-from-server/create-kb-from-server.js +25 -36
- package/dist/collection/components/team-dev/create-kb-from-server/create-kb-from-server.js.map +1 -1
- package/dist/collection/components/team-dev/create-kb-from-server/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.en.json +0 -2
- package/dist/collection/components/team-dev/create-kb-from-server/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.ja.json +0 -2
- package/dist/collection/components/team-dev/create-kb-from-server/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.zh.json +0 -2
- package/dist/components/gx-ide-create-kb-from-server.js +24 -35
- package/dist/components/gx-ide-create-kb-from-server.js.map +1 -1
- package/dist/components/gx-ide-kb-manager-import.js +12 -12
- package/dist/components/gx-ide-kb-manager-import.js.map +1 -1
- package/dist/components/gx-ide-new-environment.js +27 -4
- package/dist/components/gx-ide-new-environment.js.map +1 -1
- package/dist/components/gx-ide-new-kb.js +85 -46
- package/dist/components/gx-ide-new-kb.js.map +1 -1
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-create-kb-from-server.entry.js +24 -34
- package/dist/esm/gx-ide-create-kb-from-server.entry.js.map +1 -1
- package/dist/esm/gx-ide-kb-manager-import.entry.js +12 -12
- package/dist/esm/gx-ide-kb-manager-import.entry.js.map +1 -1
- package/dist/esm/gx-ide-new-environment.entry.js +26 -3
- package/dist/esm/gx-ide-new-environment.entry.js.map +1 -1
- package/dist/esm/gx-ide-new-kb.entry.js +77 -44
- package/dist/esm/gx-ide-new-kb.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.en.json +0 -2
- package/dist/genexus-ide-ui/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.ja.json +0 -2
- package/dist/genexus-ide-ui/gx-ide-assets/create-kb-from-server/langs/create-kb-from-server.lang.zh.json +0 -2
- package/dist/genexus-ide-ui/gx-ide-assets/new-environment/langs/new-environment.lang.en.json +3 -1
- package/dist/genexus-ide-ui/gx-ide-assets/new-environment/langs/new-environment.lang.ja.json +3 -1
- package/dist/genexus-ide-ui/gx-ide-assets/new-environment/langs/new-environment.lang.zh.json +3 -1
- package/dist/genexus-ide-ui/gx-ide-assets/new-kb/langs/new-kb.lang.en.json +9 -5
- package/dist/genexus-ide-ui/gx-ide-assets/new-kb/langs/new-kb.lang.ja.json +7 -3
- package/dist/genexus-ide-ui/gx-ide-assets/new-kb/langs/new-kb.lang.zh.json +9 -5
- package/dist/genexus-ide-ui/{p-cf61384e.entry.js → p-2164c3a8.entry.js} +154 -167
- package/dist/genexus-ide-ui/p-2164c3a8.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-7cd24b82.entry.js → p-806c5dcb.entry.js} +58 -47
- package/dist/genexus-ide-ui/p-806c5dcb.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-5727fce7.entry.js → p-8f4af976.entry.js} +222 -184
- package/dist/genexus-ide-ui/p-8f4af976.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-eeae9dd5.entry.js → p-95cf766b.entry.js} +401 -345
- package/dist/genexus-ide-ui/p-95cf766b.entry.js.map +1 -0
- package/dist/types/components/kb-manager-import/helpers.d.ts +1 -1
- package/dist/types/components/new-environment/new-environment.d.ts +8 -3
- package/dist/types/components/new-kb/new-kb.d.ts +5 -1
- package/dist/types/components/team-dev/create-kb-from-server/create-kb-from-server.d.ts +0 -1
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/genexus-ide-ui/p-5727fce7.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-7cd24b82.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-cf61384e.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-eeae9dd5.entry.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["mapKbsModelToActionListModel","kbsData","listBoxItems","forEach","kb","push","id","type","caption","name","createKbFromServerCss","CSS_BUNDLES","INFO_ICON","getIconPath","category","colorType","FOLDER_ICON","GxIdeCreateKbFromServer","_GxIdeCreateKbFromServer_chSearchIcon","set","this","_GxIdeCreateKbFromServer_showMoreIcon","_GxIdeCreateKbFromServer_versionsSelect","value","_GxIdeCreateKbFromServer__componentLocale","_GxIdeCreateKbFromServer_kbsActionListModel","_GxIdeCreateKbFromServer_kbVersions","_GxIdeCreateKbFromServer_chShortcutsEl","_GxIdeCreateKbFromServer_shortcutsSrc","getAssetPath","_GxIdeCreateKbFromServer_selectedKbId","_GxIdeCreateKbFromServer_kbNameAlreadyEditedByUser","_GxIdeCreateKbFromServer_versionSelectedTypeEl","_GxIdeCreateKbFromServer_localKBNameEl","_GxIdeCreateKbFromServer_locationEl","_GxIdeCreateKbFromServer_cancelHandler","cancelCallback","_GxIdeCreateKbFromServer_changeConnectionHandler","async","changeConnectionCallback","authenticationType","connectionData","serverUrl","userName","userPassword","_GxIdeCreateKbFromServer_selectLocationHandler","event","button","currentTarget","location","selectLocationCallback","kbLocation","_a","__classPrivateFieldGet","focus","blur","_GxIdeCreateKbFromServer_inputKbLocationHandler","detail","_GxIdeCreateKbFromServer_createHandler","versionSelectedType","__classPrivateFieldSet","createKBCallback","selectedKB","versionSelected","localKBName","localKbNameInputValue","undefined","versionList","then","formSubmitResult","validatableControls","validateControls","_GxIdeCreateKbFromServer_evaluateTooltipRender","controlReference","_b","get","hasError","_c","message","h","class","actionElement","blockAlign","config","tooltipSettings","inlineAlign","delay","_GxIdeCreateKbFromServer_filterValueChangedHandler","filterValue","toLowerCase","kbsFilteredActionListModel","filter","item","includes","_GxIdeCreateKbFromServer_init","getGXserverKBsCallback","result","_GxIdeCreateKbFromServer_initializeValidatableControls","validatableControl","reference","_GxIdeCreateKbFromServer_inputLocalKbNameHandler","_GxIdeCreateKbFromServer_selectedVersionHandler","selectKBVersionsCallback","length","map","kbVersion","versionsValueInput","versionsPlaceholder","toString","versionSelectedFieldValue","oneVersionSelectedFieldValue","_GxIdeCreateKbFromServer_selectKbChangeHandler","enableSelectVersionsButton","_GxIdeCreateKbFromServer_versionsChangedHandler","_GxIdeCreateKbFromServer_sortItems","model","sort","a","b","toLocaleLowerCase","localeCompare","_GxIdeCreateKbFromServer_renderFooter","onClick","part","footer","cancel","disabled","createKb","Map","componentDidLoad","call","loading","componentWillLoad","Locale","getComponentStrings","el","suspendShortcuts","suspend","render","Host","src","ref","header","user","change","loaderTitle","loader","title","description","show","Fragment","startImgSrc","onInput","placeholder","searchKbsPlaceholder","stateIconSrc","stateTitle","emptyKBsText","isAnimated","selection","onSelectedItemsChange","sortItemsCallback","onChange","htmlFor","versionsLabel","readonly","versionsPlaceholderDisabled","localKbNameLabel","localKbNamePlaceholder","canSetLocation","selectLocationButton"],"sources":["src/components/team-dev/create-kb-from-server/helpers.ts","src/components/team-dev/create-kb-from-server/create-kb-from-server.scss?tag=gx-ide-create-kb-from-server&encapsulation=shadow","src/components/team-dev/create-kb-from-server/create-kb-from-server.tsx"],"sourcesContent":["import { ActionListItemModel } from \"@genexus/chameleon-controls-library\";\nimport { KBData } from \"./create-kb-from-server\";\n\nexport const mapKbsModelToActionListModel = (\n kbsData: KBData[]\n): ActionListItemModel[] => {\n const listBoxItems: ActionListItemModel[] = [];\n kbsData.forEach(kb => {\n listBoxItems.push({\n id: kb.id,\n type: \"actionable\",\n caption: kb.name\n });\n });\n return listBoxItems;\n};\n","@import \"../../../global/temporary-mercury-overrides/_button.scss\";\n\n:host {\n display: grid;\n block-size: 100%;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.section {\n display: contents;\n}\n\n// - - - - - - - - - - -\n// Header\n// - - - - - - - - - - -\n\nheader {\n display: grid;\n grid-template-rows: max-content;\n grid-template-columns: 1fr 1fr max-content;\n}\n\n.button-change {\n align-self: center;\n justify-self: end;\n}\n\n// - - - - - - - - - - -\n// Main\n// - - - - - - - - - - -\n\n.main {\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: max-content 1fr max-content max-content;\n position: relative;\n}\n\n.search-kbs {\n inline-size: 50%;\n}\n\n.versions-container {\n grid-auto-rows: max-content;\n\n &__input {\n display: grid;\n grid-template-columns: 1fr max-content;\n gap: var(--spacing-gap-m);\n }\n}\n\n.location-custom-wrapper {\n display: flex;\n align-items: center;\n gap: var(--spacing-gap-xs);\n flex-grow: 1;\n min-inline-size: 0;\n}\n\n.location-field {\n flex-grow: 1;\n min-inline-size: 0;\n\n > .input {\n inline-size: 100%;\n }\n}\n","// Stencil\nimport {\n Component,\n Element,\n Fragment,\n getAssetPath,\n h,\n Host,\n Method,\n Prop,\n State\n} from \"@stencil/core\";\n\n// Other Libraries\nimport { getIconPath, MercuryBundles } from \"@genexus/mercury\";\n\n// Custom Imports\nimport {\n ActionListItemActionable,\n ActionListItemModel,\n ActionListItemModelExtended,\n ChActionListRenderCustomEvent,\n ChEditCustomEvent\n} from \"@genexus/chameleon-controls-library\";\nimport { RadioGroupItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/radio-group/types\";\nimport { config } from \"../../../common/config\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../../common/form-validation\";\nimport { Locale } from \"../../../common/locale\";\nimport { FormSubmitResult } from \"../../../common/types\";\nimport { GXServerConnectionData } from \"../connect-gx-server/connect-gx-server\";\nimport { KBVersion } from \"../version-control/common/types\";\nimport { mapKbsModelToActionListModel } from \"./helpers\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/form--full\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"components/list-box\",\n \"components/tooltip\",\n \"chameleon/scrollbar\"\n];\n\nconst INFO_ICON = getIconPath({\n category: \"system\",\n name: \"information\",\n colorType: \"on-surface\"\n});\n\nconst FOLDER_ICON = getIconPath({\n category: \"system\",\n name: \"folder\",\n colorType: \"primary\"\n});\n\n@Component({\n tag: \"gx-ide-create-kb-from-server\",\n styleUrl: \"create-kb-from-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/create-kb-from-server\"]\n})\nexport class GxIdeCreateKbFromServer {\n #chSearchIcon = getIconPath({\n category: \"system\",\n name: \"search\",\n colorType: \"interactive\"\n });\n\n #showMoreIcon = getIconPath({\n category: \"system\",\n name: \"more-horizontal\",\n colorType: \"interactive\"\n });\n\n #versionsSelect: RadioGroupItemModel[] = [\n { value: \"Trunk\", caption: \"Trunk Version\" },\n { value: \"All\", caption: \"All Versions\" },\n { value: \"Select\", caption: \"Select Version\" }\n ];\n\n [key: string]: any;\n\n #_componentLocale: any;\n #kbsActionListModel: ActionListItemModel[] = [];\n #kbVersions: KBVersion[] = [];\n #chShortcutsEl: HTMLChShortcutsElement;\n #shortcutsSrc = getAssetPath(\n `./gx-ide-assets/create-kb-from-server/shortcuts.json`\n );\n #selectedKbId: string;\n #kbNameAlreadyEditedByUser: boolean = false;\n\n #versionSelectedTypeEl: HTMLChRadioGroupRenderElement;\n\n @Element() el: HTMLGxIdeCreateKbFromServerElement;\n\n #localKBNameEl!: HTMLChEditElement;\n #locationEl!: HTMLChEditElement;\n\n /**\n * State to enable/disable the select versions button\n */\n @State() enableSelectVersionsButton: boolean = false;\n\n /**\n * The current kbn name value.\n */\n @State() localKbNameInputValue: string = \"\";\n\n /**\n * State to store the loading state of the component\n */\n @State() loading = true;\n\n /**\n * State to store the filter input value to filter the list-box\n */\n @State() filterValue: string = \"\";\n\n /**\n * KBs filtered\n */\n @State() kbsFilteredActionListModel: ActionListItemModel[] = [];\n\n @State() validatableControls = new Map<string, ControlValidation>();\n\n /**\n * The version selected type\n */\n @State() versionSelectedType: VersionOption;\n\n /**\n * String value to show the number of versions selected (\"N versions selected\")\n */\n @State() versionsValueInput: string = \"\";\n\n /**\n * Default suggested path to a directory where the KB will be stored/generated.\n */\n @Prop({ mutable: true }) kbLocation: string;\n\n /**\n * Specifies whether the location field (and its folder-picker button) is\n * shown in the header, allowing the user to override the default `kbLocation`\n * path. Independent from `isAdvanced`.\n */\n @Prop() readonly canSetLocation: boolean = false;\n\n /**\n * Set of data required when executing any of the callbacks that require a connection to the server.\n */\n @Prop() readonly connectionData: GXServerConnectionData;\n\n /**\n * Callback that is invoked when the dialog is closed\n */\n @Prop() readonly cancelCallback!: () => Promise<void>;\n\n /**\n * The host reopens the gx-ide-connect-server login modal with the previous data, and closes the current modal\n */\n @Prop() readonly changeConnectionCallback: (\n data: GXServerConnectionData\n ) => Promise<void>;\n\n /**\n * Callback that must be invoked when the 'Create KB' button is pressed. Receives the user's parameter selection to create the remote KB locally and ends the dialog.\n */\n @Prop() readonly createKBCallback!: (\n kbInfo: KnowledgeBaseInfo\n ) => Promise<FormSubmitResult>;\n\n /**\n * Callback that must be invoked when invoking the dialog\n */\n @Prop() readonly getGXserverKBsCallback!: (\n data: GXServerConnectionData\n ) => Promise<KBData[]>;\n\n /**\n * Callback that returns a folder path selected by the user.\n */\n @Prop() readonly selectLocationCallback: SelectLocationCallback;\n\n /**\n * Callback invoked by pressing the ellipsis in the version selector. Receives the KB selected by the user, and displays the version selector dialog. Returns a list of versions chosen by the user.\n */\n @Prop() readonly selectKBVersionsCallback: (\n selectedKB: string\n ) => Promise<KBVersion[]>;\n\n async componentDidLoad() {\n await this.#init();\n this.loading = false;\n }\n\n async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n /**\n * Suspends or reactivates the shortcuts\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n if (suspendShortcuts) {\n this.#chShortcutsEl.suspend = true;\n } else {\n this.#chShortcutsEl.suspend = false;\n }\n }\n\n #cancelHandler = (): void => {\n this.cancelCallback();\n };\n\n #changeConnectionHandler = async (): Promise<void> => {\n this.changeConnectionCallback({\n authenticationType: this.connectionData.authenticationType,\n serverUrl: this.connectionData.serverUrl,\n userName: this.connectionData.userName,\n userPassword: this.connectionData.userPassword\n });\n };\n\n #selectLocationHandler = async (event: MouseEvent): Promise<void> => {\n // Capture the button before awaiting. Opening/closing the location picker\n // restores focus to it programmatically, leaving the :focus-visible outline\n // lingering as if it were still active. On a successful selection move focus\n // to the location input (natural next step, keyboard-friendly); otherwise\n // just blur the button so the outline doesn't stay pinned.\n const button = event.currentTarget as HTMLButtonElement;\n const location = await this.selectLocationCallback();\n if (location) {\n this.kbLocation = location;\n this.#locationEl?.focus();\n } else {\n button?.blur();\n }\n };\n\n #inputKbLocationHandler = (event: ChEditCustomEvent<string> | InputEvent) => {\n this.kbLocation = event.detail as string;\n };\n\n #createHandler = async (): Promise<void> => {\n if (this.versionSelectedType !== \"Select\") {\n this.#kbVersions = [];\n }\n this.createKBCallback({\n selectedKB: this.#selectedKbId,\n versionSelected: this.versionSelectedType,\n localKBName: this.localKbNameInputValue,\n kbLocation: this.kbLocation || undefined,\n versionList: this.#kbVersions\n }).then((formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n });\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on other dialogs as well.\n #evaluateTooltipRender = (\n controlReference: HTMLElement\n ): HTMLChTooltipElement =>\n this.validatableControls?.get(controlReference?.id)?.hasError &&\n this.validatableControls.get(controlReference.id)?.message && (\n <ch-tooltip\n class=\"tooltip\"\n actionElement={controlReference as unknown as HTMLButtonElement}\n blockAlign={config.tooltipSettings.blockAlign}\n inlineAlign={config.tooltipSettings.inlineAlign}\n delay={config.tooltipSettings.delay}\n >\n {this.validatableControls.get(controlReference.id).message}\n </ch-tooltip>\n );\n\n #filterValueChangedHandler = (\n event: ChEditCustomEvent<string> | InputEvent\n ) => {\n this.filterValue = (event.detail as string).toLowerCase();\n this.kbsFilteredActionListModel = this.#kbsActionListModel.filter(\n (item: ActionListItemActionable) =>\n item.caption.toLowerCase().includes(this.filterValue)\n );\n };\n\n #init = async () => {\n await this.getGXserverKBsCallback({\n authenticationType: this.connectionData.authenticationType,\n serverUrl: this.connectionData.serverUrl,\n userName: this.connectionData.userName,\n userPassword: this.connectionData.userPassword\n }).then(result => {\n this.#kbsActionListModel = mapKbsModelToActionListModel(result);\n this.kbsFilteredActionListModel = this.#kbsActionListModel;\n this.filterValue = \"\";\n });\n };\n\n #initializeValidatableControls = () => {\n // populate validatableControls with the controls that could have errors.\n const validatableControls: HTMLElement[] = [this.#localKBNameEl];\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 #inputLocalKbNameHandler = (\n event: ChEditCustomEvent<string> | InputEvent\n ) => {\n this.localKbNameInputValue = event.detail as string;\n this.#kbNameAlreadyEditedByUser = true;\n };\n\n #selectedVersionHandler = async () => {\n if (this.selectKBVersionsCallback) {\n await this.selectKBVersionsCallback(this.#selectedKbId).then(result => {\n if (result?.length) {\n this.#kbVersions = result.map(kbVersion => ({\n id: kbVersion.id,\n name: kbVersion.name\n }));\n\n if (result.length === 1 && this.#kbVersions[0].id === 0) {\n this.localKbNameInputValue = this.#selectedKbId;\n this.versionsValueInput =\n this.#_componentLocale.kb.versionsPlaceholder;\n } else if (result.length > 1) {\n this.localKbNameInputValue = this.#selectedKbId;\n this.versionsValueInput = `${result.length.toString()} ${\n this.#_componentLocale.kb.versionSelectedFieldValue\n }`;\n } else {\n this.localKbNameInputValue = `${this.#selectedKbId}_${\n this.#kbVersions[0].name\n }`;\n this.versionsValueInput = `${result[0].name} ${\n this.#_componentLocale.kb.oneVersionSelectedFieldValue\n }`;\n }\n }\n });\n }\n };\n\n #selectKbChangeHandler = (\n event: ChActionListRenderCustomEvent<ActionListItemModelExtended[]>\n ): void => {\n const item = event.detail[0]?.item as ActionListItemActionable;\n if (item === undefined) {\n this.enableSelectVersionsButton = false;\n this.#selectedKbId = undefined;\n return;\n }\n this.enableSelectVersionsButton = true;\n this.#selectedKbId = item.id;\n if (this.#kbNameAlreadyEditedByUser) {\n return;\n }\n this.localKbNameInputValue = item.caption;\n if (this.versionSelectedType === \"Select\") {\n this.versionsValueInput = \"\";\n this.#kbVersions = [];\n }\n };\n\n #versionsChangedHandler = (event: CustomEvent<string>) => {\n this.versionSelectedType = event.detail as VersionOption;\n };\n\n #sortItems = (model: ActionListItemActionable[]): void => {\n model.sort((a, b) =>\n a.caption\n ?.toLocaleLowerCase()\n .localeCompare(b.caption?.toLocaleLowerCase())\n );\n };\n\n #renderFooter = () => {\n return (\n <footer class=\"footer dialog-footer-with-border spacing-body-inline spacing-body-block-end\">\n <div class=\"buttons-spacer\">\n <button\n // cancel button\n class=\"button-secondary\"\n onClick={this.#cancelHandler}\n part=\"button button-cancel\"\n >\n {this.#_componentLocale.footer.cancel}\n </button>\n\n <button\n // create kb button\n class=\"button-primary\"\n onClick={this.enableSelectVersionsButton && this.#createHandler}\n disabled={!this.enableSelectVersionsButton}\n part=\"button button-create-kb\"\n >\n {this.#_componentLocale.footer.createKb}\n </button>\n </div>\n </footer>\n );\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\n <section class=\"section\">\n <header class=\"header dialog-header-with-border space-body spacing-body-inline spacing-body-block-start\">\n <div class=\"field field-block\">\n <label class=\"label\">\n {this.#_componentLocale.header.serverUrl}\n </label>\n <p>{this.connectionData.serverUrl}</p>\n </div>\n\n <div class=\"field field-block\">\n <label class=\"label\">{this.#_componentLocale.header.user}</label>\n <p>{this.connectionData.userName}</p>\n </div>\n\n <button\n id=\"change-connection-button\"\n class=\"button-tertiary button-change\"\n onClick={this.#changeConnectionHandler}\n >\n {this.#_componentLocale.header.change}\n </button>\n </header>\n <section class=\"main field-group spacing-body\">\n {this.loading ? (\n <gx-ide-loader\n loaderTitle={this.#_componentLocale.loader.title}\n description={this.#_componentLocale.loader.description}\n show\n ></gx-ide-loader>\n ) : (\n <Fragment>\n <ch-edit\n class=\"input search-kbs\"\n id=\"local-kb-name\"\n startImgSrc={this.#chSearchIcon}\n type=\"search\"\n onInput={this.#filterValueChangedHandler}\n placeholder={this.#_componentLocale.kb.searchKbsPlaceholder}\n ></ch-edit>\n {this.#kbsActionListModel.length === 0 ||\n this.kbsFilteredActionListModel.length === 0 ? (\n <div class=\"list-box\">\n <gx-ide-empty-state\n stateIconSrc={INFO_ICON}\n stateTitle={this.#_componentLocale.emptyKBsText}\n isAnimated={true}\n ></gx-ide-empty-state>\n </div>\n ) : (\n <ch-action-list-render\n selection=\"single\"\n class=\"list-box\"\n onSelectedItemsChange={this.#selectKbChangeHandler}\n model={this.kbsFilteredActionListModel}\n sortItemsCallback={this.#sortItems}\n ></ch-action-list-render>\n )}\n <div class=\"versions-container field-group\">\n <ch-radio-group-render\n class=\"radio-group\"\n model={this.#versionsSelect}\n onChange={this.#versionsChangedHandler}\n value={this.#versionsSelect[0].value}\n ref={(el: HTMLChRadioGroupRenderElement) => {\n this.#versionSelectedTypeEl =\n el as HTMLChRadioGroupRenderElement;\n if (this.#versionSelectedTypeEl) {\n this.versionSelectedType = this.#versionSelectedTypeEl\n .value as VersionOption;\n }\n }}\n ></ch-radio-group-render>\n\n {this.versionSelectedType === \"Select\" && (\n <div class=\"versions-container__item field-group\">\n <div class=\"field field-block\">\n <label class=\"label\" htmlFor=\"control-id-1\">\n {this.#_componentLocale.kb.versionsLabel}\n </label>\n <div class=\"versions-container__input\">\n <ch-edit\n class=\"input\"\n readonly\n placeholder={\n this.enableSelectVersionsButton\n ? this.#_componentLocale.kb.versionsPlaceholder\n : this.#_componentLocale.kb\n .versionsPlaceholderDisabled\n }\n value={this.versionsValueInput}\n ></ch-edit>\n <button\n id=\"select-version-button\"\n class=\"button-tertiary button-icon-only\"\n onClick={this.#selectedVersionHandler}\n disabled={!this.enableSelectVersionsButton}\n >\n <ch-image\n src={this.#showMoreIcon}\n class=\"icon-m\"\n disabled={!this.enableSelectVersionsButton}\n ></ch-image>\n </button>\n </div>\n </div>\n </div>\n )}\n </div>\n\n <div class=\"field field-block\">\n <label class=\"label\" htmlFor=\"localKbName\">\n {this.#_componentLocale.kb.localKbNameLabel}\n </label>\n <ch-edit\n // local kb name\n class=\"input\"\n id=\"localKbName\"\n value={this.localKbNameInputValue}\n onInput={this.#inputLocalKbNameHandler}\n placeholder={\n this.#_componentLocale.kb.localKbNamePlaceholder\n }\n ref={(el: HTMLChEditElement) => {\n this.#localKBNameEl = el as HTMLChEditElement;\n if (this.#localKBNameEl) {\n this.#initializeValidatableControls();\n }\n }}\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#localKBNameEl)}\n </div>\n\n {this.canSetLocation && (\n <div class=\"field field-block\">\n <label class=\"label\" htmlFor=\"kbLocation\">\n {this.#_componentLocale.kb.kbLocation}\n </label>\n <div class=\"location-custom-wrapper\">\n <div class=\"location-field\">\n <ch-edit\n class=\"input\"\n value={this.kbLocation}\n id=\"kbLocation\"\n onInput={this.#inputKbLocationHandler}\n ref={(el: HTMLChEditElement) =>\n (this.#locationEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n </div>\n <button\n class=\"button-tertiary button-icon-only\"\n aria-label={\n this.#_componentLocale.kb.selectLocationButton\n }\n title={this.#_componentLocale.kb.selectLocationButton}\n onClick={this.#selectLocationHandler}\n >\n <ch-image\n class=\"icon-m\"\n type=\"mask\"\n src={FOLDER_ICON}\n ></ch-image>\n </button>\n </div>\n </div>\n )}\n </Fragment>\n )}\n </section>\n\n {this.#renderFooter()}\n </section>\n </Host>\n );\n }\n}\n\nexport type KBData = {\n id: string;\n name: string;\n};\n\nexport type ConnectionResultData = {\n formResult: FormSubmitResult;\n kbs: KBData[];\n};\n\nexport type KnowledgeBaseInfo = {\n selectedKB: string;\n versionSelected: VersionOption;\n localKBName: string;\n kbLocation?: string;\n versionList: KBVersion[];\n};\n\nexport type VersionOption = \"Trunk\" | \"All\" | \"Select\";\n\nexport type SelectLocationCallback = () => Promise<string>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAGO,MAAMA,+BACXC;EAEA,MAAMC,IAAsC;EAC5CD,EAAQE,SAAQC;IACdF,EAAaG,KAAK;MAChBC,IAAIF,EAAGE;MACPC,MAAM;MACNC,SAASJ,EAAGK;;AACZ;EAEJ,OAAOP;AAAY;;ACdrB,MAAMQ,IAAwB;;;;;;;;;;;;;;;;;ACoC9B,MAAMC,IAA8B,EAClC,qBACA,oBACA,gBACA,oBACA,iBACA,uBACA,sBACA;;AAGF,MAAMC,IAAYC,EAAY;EAC5BC,UAAU;EACVL,MAAM;EACNM,WAAW;;;AAGb,MAAMC,IAAcH,EAAY;EAC9BC,UAAU;EACVL,MAAM;EACNM,WAAW;;;MASAE,IAAuB;;;IAClCC,EAAAC,IAAAC,MAAgBP,EAAY;MAC1BC,UAAU;MACVL,MAAM;MACNM,WAAW;;IAGbM,EAAAF,IAAAC,MAAgBP,EAAY;MAC1BC,UAAU;MACVL,MAAM;MACNM,WAAW;;IAGbO,EAAAH,IAAAC,MAAyC,EACvC;MAAEG,OAAO;MAASf,SAAS;OAC3B;MAAEe,OAAO;MAAOf,SAAS;OACzB;MAAEe,OAAO;MAAUf,SAAS;;IAK9BgB,EAAAL,IAAAC,WAAA;IACAK,EAAAN,IAAAC,MAA6C;IAC7CM,EAAAP,IAAAC,MAA2B;IAC3BO,EAAAR,IAAAC,WAAA;IACAQ,EAAAT,IAAAC,MAAgBS,EACd;IAEFC,EAAAX,IAAAC,WAAA;IACAW,EAAAZ,IAAAC,MAAsC;IAEtCY,EAAAb,IAAAC,WAAA;IAIAa,EAAAd,IAAAC,WAAA;IACAc,EAAAf,IAAAC,WAAA;IAmHAe,EAAAhB,IAAAC,OAAiB;MACfA,KAAKgB;AAAgB;IAGvBC,EAAAlB,IAAAC,OAA2BkB;MACzBlB,KAAKmB,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Cb,KAAKqJ,kBACJ1F,EAAA;MAAKC,OAAM;OACTD,EAAA;MAAOC,OAAM;MAAQmF,SAAQ;OAC1B9G,EAAAjC,MAAII,GAAA,KAAmBpB,GAAG+C,aAE7B4B,EAAA;MAAKC,OAAM;OACTD,EAAA;MAAKC,OAAM;OACTD,EAAA;MACEC,OAAM;MACNzD,OAAOH,KAAK+B;MACZ7C,IAAG;MACHkJ,SAASnG,EAAAjC,MAAIoC,GAAA;MACbqF,KAAMN,KACH3E,EAAAxC,MAAIc,GAAeqG,GAAuB;SAIjDxD,EAAA;MACEC,OAAM;MAAkC,cAEtC3B,EAAAjC,MAAII,GAAA,KAAmBpB,GAAGsK;MAE5BvB,OAAO9F,EAAAjC,MAAII,GAAA,KAAmBpB,GAAGsK;MACjChD,SAASrE,EAAAjC,MAAIyB,GAAA;OAEbkC,EAAA;MACEC,OAAM;MACNzE,MAAK;MACLqI,KAAK5H;aAUpBqC,EAAAjC,MAAIqG,GAAA,KAAcS,KAAlB9G"}
|
|
@@ -23,20 +23,22 @@ const d = "status";
|
|
|
23
23
|
// - - - - - - - - - - - - - - - - -
|
|
24
24
|
// Objects In File Tree Model
|
|
25
25
|
// - - - - - - - - - - - - - - - - -
|
|
26
|
-
const convertImportCategoryItemToTreeItem = (t, e) => {
|
|
27
|
-
const
|
|
26
|
+
const convertImportCategoryItemToTreeItem = (t, e, i) => {
|
|
27
|
+
const s = [];
|
|
28
28
|
e.forEach((e => {
|
|
29
|
-
var
|
|
30
|
-
|
|
29
|
+
var a;
|
|
30
|
+
s.push(Object.assign({
|
|
31
31
|
id: e.id,
|
|
32
32
|
caption: e.name,
|
|
33
33
|
expanded: true,
|
|
34
34
|
leaf: true,
|
|
35
|
-
startImgSrc: (
|
|
35
|
+
startImgSrc: (a = e.icon) !== null && a !== void 0 ? a : t,
|
|
36
36
|
metadata: c
|
|
37
|
-
}
|
|
37
|
+
}, i !== undefined && {
|
|
38
|
+
checked: i
|
|
39
|
+
}));
|
|
38
40
|
}));
|
|
39
|
-
return
|
|
41
|
+
return s;
|
|
40
42
|
};
|
|
41
43
|
|
|
42
44
|
const convertImportCategoryDataToTreeView = t => {
|
|
@@ -132,14 +134,14 @@ var f = undefined && undefined.__classPrivateFieldGet || function(t, e, i, s) {
|
|
|
132
134
|
return i === "m" ? s : i === "a" ? s.call(t) : s ? s.value : e.get(t);
|
|
133
135
|
};
|
|
134
136
|
|
|
135
|
-
var
|
|
137
|
+
var u = undefined && undefined.__classPrivateFieldSet || function(t, e, i, s, a) {
|
|
136
138
|
if (s === "m") throw new TypeError("Private method is not writable");
|
|
137
139
|
if (s === "a" && !a) throw new TypeError("Private accessor was defined without a setter");
|
|
138
140
|
if (typeof e === "function" ? t !== e || !a : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
139
141
|
return s === "a" ? a.call(t, i) : a ? a.value = i : e.set(t, i), i;
|
|
140
142
|
};
|
|
141
143
|
|
|
142
|
-
var
|
|
144
|
+
var p, m, b, g, w, v, k, y, _, x, M, W, j, C, T, S, I, $, E, D, L, z, F, O, H, R, A, N, P;
|
|
143
145
|
|
|
144
146
|
const J = [ "resets/box-sizing", "components/button", "components/checkbox", "components/edit", "components/icon", "components/tree-view", "utils/form", "utils/layout", "utils/typography", "utils/spacing" ];
|
|
145
147
|
|
|
@@ -180,13 +182,13 @@ const G = class {
|
|
|
180
182
|
* The component hard-coded strings translations.
|
|
181
183
|
*/
|
|
182
184
|
// eslint-disable-next-line @stencil-community/own-props-must-be-private
|
|
183
|
-
|
|
185
|
+
p.set(this, void 0);
|
|
184
186
|
m.set(this, []);
|
|
185
187
|
b.set(this, void 0);
|
|
186
188
|
g.set(this, void 0);
|
|
187
189
|
w.set(this, void 0);
|
|
188
|
-
k.set(this, new Set);
|
|
189
190
|
v.set(this, new Set);
|
|
191
|
+
k.set(this, new Set);
|
|
190
192
|
y.set(this, new Set);
|
|
191
193
|
// #categoryItemMap maps a category id, with the name and icon.
|
|
192
194
|
// required for the "import status" tree.
|
|
@@ -292,7 +294,7 @@ const G = class {
|
|
|
292
294
|
};
|
|
293
295
|
}));
|
|
294
296
|
$.set(this, (async t => {
|
|
295
|
-
|
|
297
|
+
u(this, M, await this.loadCallback(t), "f");
|
|
296
298
|
f(this, _, "f").clear();
|
|
297
299
|
f(this, x, "f").clear();
|
|
298
300
|
f(this, M, "f").forEach((t => {
|
|
@@ -311,8 +313,17 @@ const G = class {
|
|
|
311
313
|
this.hasSelection = e.length > 0;
|
|
312
314
|
}));
|
|
313
315
|
E.set(this, (async t => {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
+
var e, i;
|
|
317
|
+
const s = f(this, M, "f").find((e => e.id === t));
|
|
318
|
+
if (!s || s.items.length === 0) {
|
|
319
|
+
return [];
|
|
320
|
+
}
|
|
321
|
+
// Lazy children are created fresh and would otherwise take the tree-view's
|
|
322
|
+
// default `checked={true}`, ignoring any "Unselect All" / partial selection
|
|
323
|
+
// applied while the node was collapsed. Inherit the parent category's
|
|
324
|
+
// current checked state so the loaded items match the user's selection.
|
|
325
|
+
const a = (i = (e = f(this, w, "f")) === null || e === void 0 ? void 0 : e.model) === null || i === void 0 ? void 0 : i.find((e => e.id === t));
|
|
326
|
+
return convertImportCategoryItemToTreeItem(s.icon, s.items, a === null || a === void 0 ? void 0 : a.checked);
|
|
316
327
|
}));
|
|
317
328
|
D.set(this, (t => {
|
|
318
329
|
const e = t.detail;
|
|
@@ -352,7 +363,7 @@ const G = class {
|
|
|
352
363
|
}
|
|
353
364
|
}));
|
|
354
365
|
z.set(this, (t => {
|
|
355
|
-
|
|
366
|
+
u(this, m, t.detail.map((t => t.item.id)), "f");
|
|
356
367
|
}));
|
|
357
368
|
F.set(this, (() => {
|
|
358
369
|
if (this.optionsCallback) {
|
|
@@ -360,11 +371,11 @@ const G = class {
|
|
|
360
371
|
// returns boolean
|
|
361
372
|
}
|
|
362
373
|
}));
|
|
363
|
-
|
|
374
|
+
O.set(this, (() => {
|
|
364
375
|
this.selectedFile = null;
|
|
365
376
|
f(this, g, "f").value = null;
|
|
366
377
|
}));
|
|
367
|
-
|
|
378
|
+
H.set(this, (() => {
|
|
368
379
|
f(this, g, "f").click();
|
|
369
380
|
}));
|
|
370
381
|
R.set(this, (t => {
|
|
@@ -426,8 +437,8 @@ const G = class {
|
|
|
426
437
|
}));
|
|
427
438
|
P.set(this, (() => {
|
|
428
439
|
f(this, y, "f").clear();
|
|
429
|
-
f(this, v, "f").clear();
|
|
430
440
|
f(this, k, "f").clear();
|
|
441
|
+
f(this, v, "f").clear();
|
|
431
442
|
this.importTreeState.forEach((t => {
|
|
432
443
|
const e = t.items;
|
|
433
444
|
e.forEach((t => {
|
|
@@ -435,10 +446,10 @@ const G = class {
|
|
|
435
446
|
f(this, y, "f").add(t.id);
|
|
436
447
|
}
|
|
437
448
|
if (t.metadata === "warning") {
|
|
438
|
-
f(this,
|
|
449
|
+
f(this, k, "f").add(t.id);
|
|
439
450
|
}
|
|
440
451
|
if (t.metadata === "success") {
|
|
441
|
-
f(this,
|
|
452
|
+
f(this, v, "f").add(t.id);
|
|
442
453
|
}
|
|
443
454
|
}));
|
|
444
455
|
}));
|
|
@@ -484,9 +495,9 @@ const G = class {
|
|
|
484
495
|
watchImportTreeStateHandler() {
|
|
485
496
|
f(this, C, "f").call(this);
|
|
486
497
|
if (this.noImport) {
|
|
487
|
-
this.importStatusMessage = f(this,
|
|
498
|
+
this.importStatusMessage = f(this, p, "f").main.importStatus.noImportedFiles;
|
|
488
499
|
} else {
|
|
489
|
-
this.importStatusMessage = f(this,
|
|
500
|
+
this.importStatusMessage = f(this, p, "f").main.importStatus.importedButHidden;
|
|
490
501
|
}
|
|
491
502
|
}
|
|
492
503
|
watchObjectsTreeModelHandler(t) {
|
|
@@ -502,11 +513,11 @@ const G = class {
|
|
|
502
513
|
}
|
|
503
514
|
componentDidRender() {}
|
|
504
515
|
async componentWillLoad() {
|
|
505
|
-
|
|
516
|
+
u(this, p, await o.getComponentStrings(this.el), "f");
|
|
506
517
|
this.componentDidLoadEvent.emit(true);
|
|
507
518
|
// this.#evaluateObjects();
|
|
508
519
|
f(this, C, "f").call(this);
|
|
509
|
-
this.importStatusMessage = f(this,
|
|
520
|
+
this.importStatusMessage = f(this, p, "f").main.importStatus.noImportedFiles;
|
|
510
521
|
f(this, T, "f").call(this);
|
|
511
522
|
}
|
|
512
523
|
/**
|
|
@@ -534,7 +545,7 @@ const G = class {
|
|
|
534
545
|
}, i("label", {
|
|
535
546
|
class: "label",
|
|
536
547
|
htmlFor: "file-name"
|
|
537
|
-
}, f(this,
|
|
548
|
+
}, f(this, p, "f").header.fileNameLabel), i("ch-edit", {
|
|
538
549
|
autoFocus: true,
|
|
539
550
|
id: "file-name",
|
|
540
551
|
class: "input",
|
|
@@ -542,24 +553,24 @@ const G = class {
|
|
|
542
553
|
type: "text",
|
|
543
554
|
readonly: true,
|
|
544
555
|
value: (t = this.selectedFile) === null || t === void 0 ? void 0 : t.name,
|
|
545
|
-
placeholder: f(this,
|
|
556
|
+
placeholder: f(this, p, "f").header.fileNamePlaceholder,
|
|
546
557
|
startImgSrc: U,
|
|
547
|
-
ref: t =>
|
|
558
|
+
ref: t => u(this, b, t, "f")
|
|
548
559
|
}), i("input", {
|
|
549
560
|
hidden: true,
|
|
550
561
|
type: "file",
|
|
551
562
|
accept: ".xpz, .xml",
|
|
552
563
|
onChange: f(this, R, "f"),
|
|
553
|
-
ref: t =>
|
|
564
|
+
ref: t => u(this, g, t, "f")
|
|
554
565
|
})), i("div", {
|
|
555
566
|
class: "buttons-spacer"
|
|
556
567
|
}, i("button", {
|
|
557
|
-
"aria-label": f(this,
|
|
558
|
-
title: f(this,
|
|
568
|
+
"aria-label": f(this, p, "f").header.removeFileSelection,
|
|
569
|
+
title: f(this, p, "f").header.removeFileSelection,
|
|
559
570
|
id: "reset-all-button",
|
|
560
571
|
class: "button-tertiary button-icon-only",
|
|
561
572
|
part: "reset-all-button",
|
|
562
|
-
onClick: f(this,
|
|
573
|
+
onClick: f(this, O, "f")
|
|
563
574
|
}, i("ch-image", {
|
|
564
575
|
class: "icon-m",
|
|
565
576
|
src: Y
|
|
@@ -568,14 +579,14 @@ const G = class {
|
|
|
568
579
|
id: "select-file-load-button",
|
|
569
580
|
class: "button-primary",
|
|
570
581
|
part: "select-file-load-button",
|
|
571
|
-
onClick: f(this,
|
|
582
|
+
onClick: f(this, H, "f"),
|
|
572
583
|
disabled: this.importingIsInProcess
|
|
573
|
-
}, f(this,
|
|
584
|
+
}, f(this, p, "f").header.selectFileButton))), i("section", {
|
|
574
585
|
// objects in file
|
|
575
586
|
class: "objects-in-file__section"
|
|
576
587
|
}, i("h2", {
|
|
577
588
|
class: "dialog-header dialog-header-with-border dialog-header__objects-in-file subtitle-regular-xs\t text-align-center spacing-body-inline"
|
|
578
|
-
}, f(this,
|
|
589
|
+
}, f(this, p, "f").main.objectsInFile.title), i("div", {
|
|
579
590
|
class: "field-group objects-in-file__main"
|
|
580
591
|
}, !this.noObjects ? i("ch-tree-view-render", {
|
|
581
592
|
// objects in file tree
|
|
@@ -591,16 +602,16 @@ const G = class {
|
|
|
591
602
|
onCheckedItemsChange: f(this, D, "f"),
|
|
592
603
|
onSelectedItemsChange: f(this, z, "f"),
|
|
593
604
|
onItemContextmenu: f(this, L, "f"),
|
|
594
|
-
ref: t =>
|
|
605
|
+
ref: t => u(this, w, t, "f")
|
|
595
606
|
}) : i("gx-ide-empty-state", {
|
|
596
607
|
isAnimated: false,
|
|
597
|
-
stateTitle: f(this,
|
|
608
|
+
stateTitle: f(this, p, "f").main.objectsInFile.noObjects,
|
|
598
609
|
key: "no-objects-empty-state"
|
|
599
610
|
}, i("button", {
|
|
600
611
|
// begin by selecting a file
|
|
601
612
|
class: "button-secondary",
|
|
602
|
-
onClick: f(this,
|
|
603
|
-
}, f(this,
|
|
613
|
+
onClick: f(this, H, "f")
|
|
614
|
+
}, f(this, p, "f").main.objectsInFile.selectFile)), i("footer", {
|
|
604
615
|
class: "field-group objects-in-file__footer spacing-body-inline"
|
|
605
616
|
}, i("ch-checkbox", {
|
|
606
617
|
// select all / unselect all checkbox
|
|
@@ -608,7 +619,7 @@ const G = class {
|
|
|
608
619
|
class: "checkbox create-data-in-kb",
|
|
609
620
|
checkedValue: q,
|
|
610
621
|
unCheckedValue: B,
|
|
611
|
-
caption: f(this,
|
|
622
|
+
caption: f(this, p, "f").main.objectsInFile.selectUnselect,
|
|
612
623
|
value: this.selectAllCheckboxValue,
|
|
613
624
|
onInput: f(this, N, "f"),
|
|
614
625
|
disabled: this.importingIsInProcess || this.objectsTreeModel.length === 0,
|
|
@@ -621,14 +632,14 @@ const G = class {
|
|
|
621
632
|
class: "button-primary ",
|
|
622
633
|
onClick: f(this, S, "f"),
|
|
623
634
|
disabled: ((e = this.objectsTreeModel) === null || e === void 0 ? void 0 : e.length) === 0 || this.importingIsInProcess || !this.hasSelection
|
|
624
|
-
}, f(this,
|
|
635
|
+
}, f(this, p, "f").main.objectsInFile.importButton), i("button", {
|
|
625
636
|
// cancel-import button
|
|
626
637
|
id: "cancel-import-btn",
|
|
627
638
|
class: "button-secondary ",
|
|
628
639
|
onClick: f(this, W, "f"),
|
|
629
640
|
disabled: !this.importingIsInProcess,
|
|
630
641
|
part: "cancel-import-button"
|
|
631
|
-
}, f(this,
|
|
642
|
+
}, f(this, p, "f").main.objectsInFile.cancelButton), i("button", {
|
|
632
643
|
// settings/options button
|
|
633
644
|
id: "select-kb-btn",
|
|
634
645
|
class: "button-tertiary button-icon-only",
|
|
@@ -642,7 +653,7 @@ const G = class {
|
|
|
642
653
|
class: "import-status__section"
|
|
643
654
|
}, i("h2", {
|
|
644
655
|
class: "dialog-header dialog-header-with-border dialog-header__import-status subtitle-regular-xs\t text-align-center spacing-body-inline"
|
|
645
|
-
}, f(this,
|
|
656
|
+
}, f(this, p, "f").main.importStatus.title), i("div", {
|
|
646
657
|
class: "field-group import-status__main"
|
|
647
658
|
}, !this.noImport && this.someStatusVisible ? i("ch-tree-view-render", {
|
|
648
659
|
// import status tree
|
|
@@ -669,7 +680,7 @@ const G = class {
|
|
|
669
680
|
onClick: f(this, j, "f"),
|
|
670
681
|
disabled: this.noImport || this.importingIsInProcess,
|
|
671
682
|
part: "clear-status-btn"
|
|
672
|
-
}, f(this,
|
|
683
|
+
}, f(this, p, "f").main.importStatus.clearButton)))), i("footer", {
|
|
673
684
|
// footer
|
|
674
685
|
class: "footer"
|
|
675
686
|
}, i("gx-ide-status-buttons", {
|
|
@@ -697,14 +708,14 @@ const G = class {
|
|
|
697
708
|
}
|
|
698
709
|
};
|
|
699
710
|
|
|
700
|
-
|
|
701
|
-
|
|
711
|
+
p = new WeakMap, m = new WeakMap, b = new WeakMap, g = new WeakMap, w = new WeakMap,
|
|
712
|
+
v = new WeakMap, k = new WeakMap, y = new WeakMap, _ = new WeakMap, x = new WeakMap,
|
|
702
713
|
M = new WeakMap, W = new WeakMap, j = new WeakMap, C = new WeakMap, T = new WeakMap,
|
|
703
714
|
S = new WeakMap, I = new WeakMap, $ = new WeakMap, E = new WeakMap, D = new WeakMap,
|
|
704
|
-
L = new WeakMap, z = new WeakMap, F = new WeakMap,
|
|
715
|
+
L = new WeakMap, z = new WeakMap, F = new WeakMap, O = new WeakMap, H = new WeakMap,
|
|
705
716
|
R = new WeakMap, A = new WeakMap, N = new WeakMap, P = new WeakMap;
|
|
706
717
|
|
|
707
718
|
G.style = h;
|
|
708
719
|
|
|
709
720
|
export { G as gx_ide_kb_manager_import };
|
|
710
|
-
//# sourceMappingURL=p-
|
|
721
|
+
//# sourceMappingURL=p-806c5dcb.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MAX_CATEGORY_ITEMS_FIRST_RENDER","KB_OBJECT","KB_CATEGORY","STATUS_REGEXP_KEY","convertImportCategoryItemToTreeItem","importCatIcon","importItems","checked","importTreeItems","forEach","importItem","push","Object","assign","id","caption","name","expanded","leaf","startImgSrc","_a","icon","metadata","undefined","convertImportCategoryDataToTreeView","importCategoryData","treeData","importCategory","importCategoryTreeItem","items","length","lazy","createImportResultDataMessages","importItemId","messagesArray","status","messages","message","i","JSON","stringify","createImportResultItem","categoryData","importItemResultData","resultItemId","importResultItem","parts","addImportItemResultDataItem","categoryItemMap","objectCategoryItemMap","importTreeActualState","updatedImportTreeModel","objectCategoryId","get","categoryIndex","findIndex","treeItem","category","resultItem","newItemsLength","kbManagerImportCss","CSS_BUNDLES","NOTICE_ICON","getIconPath","colorType","FILE_ICON","GEMINI_TOOLS_SETTINGS","MENU_DELETE","CHECKBOX_ALL_CHECKED_VALUE","CHECKBOX_ALL_UNCHECKED_VALUE","GxIdeKbManagerImport","_GxIdeKbManagerImport_componentLocale","set","this","_GxIdeKbManagerImport_selectedObjectsInFileIds","_GxIdeKbManagerImport_fileInputEl","_GxIdeKbManagerImport_fileInputHiddenEl","_GxIdeKbManagerImport_objectsTreeEl","_GxIdeKbManagerImport_successItemsIds","Set","_GxIdeKbManagerImport_warningItemsIds","_GxIdeKbManagerImport_errorItemsIds","_GxIdeKbManagerImport_categoryItemMap","Map","_GxIdeKbManagerImport_objectCategoryItemMap","_GxIdeKbManagerImport_importedCategoryData","_GxIdeKbManagerImport_cancelImportHandler","cancelCallback","_GxIdeKbManagerImport_clearStatusHandler","importTreeState","statusInfo","error","number","warning","success","_GxIdeKbManagerImport_evaluateImport","noImport","_GxIdeKbManagerImport_evaluateImportStatusMessage","someStatusVisible","display","_GxIdeKbManagerImport_importObjectsHandler","async","__classPrivateFieldGet","call","importingIsInProcess","selection","_GxIdeKbManagerImport_buildImportSelection","importCallback","groups","everyGroupFullySelected","model","find","cat","totalItems","childrenLoaded","groupId","mode","checkedIds","uncheckedIds","child","_b","ids","_GxIdeKbManagerImport_loadFileHandler","file","__classPrivateFieldSet","loadCallback","clear","object","importCategoryTreeData","objectsTreeModel","hasSelection","_GxIdeKbManagerImport_lazyLoadTreeItems","treeItemId","categoryNode","item","_GxIdeKbManagerImport_objectsTreeCheckedItemsChangedHandler","event","allItems","detail","checkedItemIds","pendingCheckedItemIds","pendingCheckedItemId","size","selectAllCheckboxValue","selectAllCheckboxIndeterminate","_GxIdeKbManagerImport_objectsTreeContextMenuHandler","objectContextMenuCallback","clientX","contextmenuEvent","screenX","clientY","screenY","_GxIdeKbManagerImport_objectsTreeSelectedItemsChangedHandler","map","_GxIdeKbManagerImport_optionsHandler","optionsCallback","_GxIdeKbManagerImport_removeFileSelection","selectedFile","value","_GxIdeKbManagerImport_selectFileInputHandler","click","_GxIdeKbManagerImport_selectFileInputChangedHandler","target","files","_GxIdeKbManagerImport_statusButtonsSelectionChangedHandler","activeStates","statuses","errorIndex","state","itemId","warningIndex","successIndex","pattern","statusOptions","join","importedTreeFilterRegExp","RegExp","_GxIdeKbManagerImport_toggleSelectionClickHandler","updateAllItemsProperties","_GxIdeKbManagerImport_updateStatusItemsState","add","importTreeStateChanged","watchImportTreeStateHandler","importStatusMessage","main","importStatus","noImportedFiles","importedButHidden","watchObjectsTreeModelHandler","newState","noObjects","selectedFileChanged","newFile","componentDidLoad","focus","componentDidRender","componentWillLoad","Locale","getComponentStrings","el","componentDidLoadEvent","emit","addResultItem","render","h","Host","class","slot","htmlFor","header","fileNameLabel","autoFocus","part","type","readonly","placeholder","fileNamePlaceholder","ref","hidden","accept","onChange","removeFileSelection","title","onClick","src","disabled","selectFileButton","objectsInFile","showLines","dragDisabled","dropDisabled","toggleCheckboxes","checkbox","lazyLoadTreeItemsCallback","onCheckedItemsChange","onSelectedItemsChange","onItemContextmenu","isAnimated","stateTitle","key","selectFile","checkedValue","unCheckedValue","selectUnselect","onInput","importButton","cancelButton","filter","filterType","filterOptions","autoExpand","hideMatchesAndShowNonMatches","stateIconSrc","clearButton","errors","warnings","successes","hideMessage","compact","minimal","statusMinimal","onSelectionChanged"],"sources":["src/components/kb-manager-import/helpers.ts","src/components/kb-manager-import/kb-manager-import.scss?tag=gx-ide-kb-manager-import&encapsulation=shadow","src/components/kb-manager-import/kb-manager-import.tsx"],"sourcesContent":["/* Tree View */\nimport {\n TreeViewItemModel,\n TreeViewModel\n} from \"@genexus/chameleon-controls-library\";\n\n/* Kb Manager Import Types*/\nimport {\n CategoryItemMap,\n CategoryItemMapValue,\n ObjectCategoryItemMap,\n Status\n} from \"./kb-manager-import\";\nimport {\n ImportCategoryData,\n ImportItemResultData,\n ImportItemData\n} from \"../../common/types\";\n\nconst MAX_CATEGORY_ITEMS_FIRST_RENDER = 30;\n\n/* objects in file metadata*/\nexport const KB_OBJECT = \"object\";\nexport const KB_CATEGORY = \"category\";\n\nexport const STATUS_REGEXP_KEY = \"status\";\n\n// - - - - - - - - - - - - - - - - -\n// Objects In File Tree Model\n// - - - - - - - - - - - - - - - - -\n\nexport const convertImportCategoryItemToTreeItem = (\n importCatIcon: string,\n importItems: ImportItemData[],\n checked?: boolean\n) => {\n const importTreeItems: TreeViewItemModel[] = [];\n importItems.forEach(importItem => {\n importTreeItems.push({\n id: importItem.id,\n caption: importItem.name,\n expanded: true,\n leaf: true,\n startImgSrc: importItem.icon ?? importCatIcon,\n metadata: KB_OBJECT,\n ...(checked !== undefined && { checked })\n });\n });\n return importTreeItems;\n};\n\nexport const convertImportCategoryDataToTreeView = (\n importCategoryData: ImportCategoryData[]\n): TreeViewModel => {\n const treeData: TreeViewModel = [];\n if (!importCategoryData) {\n return treeData;\n }\n importCategoryData.forEach(importCategory => {\n const importCategoryTreeItem: TreeViewItemModel = {\n id: importCategory.id,\n caption: `${importCategory.name} (${importCategory.items.length})`,\n expanded: importCategory.items.length <= MAX_CATEGORY_ITEMS_FIRST_RENDER,\n lazy: importCategory.items.length > MAX_CATEGORY_ITEMS_FIRST_RENDER,\n leaf: false,\n startImgSrc: importCategory.icon,\n metadata: KB_CATEGORY,\n items:\n importCategory.items.length <= MAX_CATEGORY_ITEMS_FIRST_RENDER\n ? convertImportCategoryItemToTreeItem(\n importCategory.icon,\n importCategory.items\n )\n : []\n };\n treeData.push(importCategoryTreeItem);\n });\n return treeData;\n};\n\n// - - - - - - - - - - - - - - - - -\n// Import Status Tree Model\n// - - - - - - - - - - - - - - - - -\n\nconst createImportResultDataMessages = (\n importItemId: string,\n messagesArray: string[],\n status: Status\n): TreeViewItemModel[] => {\n const messages: TreeViewItemModel[] = [];\n messagesArray.forEach((message, i) => {\n messages.push({\n id: `${importItemId}-message-${i}`,\n caption: message,\n startImgSrc: \"gemini-tools/list-view/on-surface\",\n leaf: true,\n metadata: JSON.stringify({\n [STATUS_REGEXP_KEY]: status\n })\n });\n });\n return messages;\n};\n\nconst createImportResultItem = (\n categoryData: CategoryItemMapValue,\n importItemResultData: ImportItemResultData\n): TreeViewItemModel => {\n const resultItemId = `${importItemResultData.id}-${importItemResultData.name}`;\n const importResultItem: TreeViewItemModel = {\n id: resultItemId,\n startImgSrc: categoryData.icon,\n caption: importItemResultData.name,\n parts: `tree-view-item tree-view-item--status tree-view-item--${importItemResultData.status}`,\n expanded: true,\n leaf: importItemResultData.messages.length === 0,\n metadata: JSON.stringify({\n [STATUS_REGEXP_KEY]: importItemResultData.status\n }),\n items: createImportResultDataMessages(\n resultItemId,\n importItemResultData.messages,\n importItemResultData.status\n )\n };\n return importResultItem;\n};\n\n// This functions updates the \"Import Status\" model, by adding a new result item.\nexport const addImportItemResultDataItem = (\n importItemResultData: ImportItemResultData,\n categoryItemMap: CategoryItemMap,\n objectCategoryItemMap: ObjectCategoryItemMap,\n importTreeActualState: TreeViewItemModel[]\n) => {\n const updatedImportTreeModel: TreeViewModel = [...importTreeActualState];\n\n // Use the resultItem.id to find the corresponding category in the categoryMap\n const objectCategoryId = objectCategoryItemMap.get(importItemResultData.id);\n const categoryData = categoryItemMap.get(objectCategoryId);\n\n const categoryIndex: number = updatedImportTreeModel.findIndex(\n treeItem => treeItem.id === objectCategoryId\n );\n\n if (categoryIndex === -1) {\n // category does not exists yet.\n const category: TreeViewItemModel = {\n id: objectCategoryId,\n caption: `${categoryData.name} (1)`,\n startImgSrc: `${categoryData.icon}`,\n expanded: true,\n items: [createImportResultItem(categoryData, importItemResultData)]\n };\n\n updatedImportTreeModel.push(category);\n return updatedImportTreeModel;\n }\n\n // else category already exists. Just insert the result item in the category.\n const resultItem: TreeViewItemModel = createImportResultItem(\n categoryData,\n importItemResultData\n );\n updatedImportTreeModel[categoryIndex].items = [\n ...updatedImportTreeModel[categoryIndex].items,\n resultItem\n ];\n\n // update category caption length\n const newItemsLength = updatedImportTreeModel[categoryIndex].items.length;\n updatedImportTreeModel[categoryIndex].caption =\n `${categoryData.name} (${newItemsLength})`;\n\n return updatedImportTreeModel;\n};\n","@import \"../../global/gx-ide-mixins.scss\";\n@import \"../../global/temporary-mercury-overrides/_button.scss\";\n\n:host {\n display: grid;\n block-size: 100%;\n grid-template:\n \"header header\" max-content\n \"objects-in-file import-status\" 1fr\n \"footer footer\" max-content;\n grid-template-columns: 1fr 1fr;\n}\n\n.section {\n display: contents;\n}\n\n// header\n.header {\n grid-template-columns: 1fr max-content;\n grid-area: header;\n}\n\n// objects in file\n.objects-in-file__section {\n grid-area: objects-in-file;\n}\n.objects-in-file__main {\n border-inline-end: var(--section-common-border);\n grid-template-rows: 1fr max-content;\n}\n.objects-in-file__footer {\n display: grid;\n}\n\n// import status\n.import-status__section {\n grid-area: import-status;\n}\n.import-status__main {\n grid-template-rows: 1fr max-content;\n}\n.import-status__footer {\n display: flex;\n}\n.import-clear-status-btn {\n margin-inline-start: auto;\n}\n\n// objects in file & import status\n.objects-in-file__section,\n.import-status__section {\n display: grid;\n grid-template-rows: max-content 1fr;\n}\n.dialog-header__objects-in-file,\n.dialog-header__import-status {\n padding-block-start: 16px;\n}\n.objects-in-file__main,\n.import-status__main {\n grid-auto-rows: max-content;\n padding-block: 12px;\n overflow: auto;\n}\n\n// footer\n.footer {\n display: flex;\n grid-area: footer;\n border-block-start: var(--section-common-border);\n}\n\n// WA / TODO: Add a helper class in Mercury to justify text.\n.text-align-center {\n text-align: center; // should be resolved on mercury\n}\n\n.tree-view::part(item__action tree-view-item--status) {\n grid-template: \"first-img left-img text right-img\" / max-content max-content 1fr max-content;\n &::before {\n grid-area: first-img;\n content: \"\";\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background-color: var(--gray-03);\n margin-inline-end: 2px;\n }\n}\n\n.tree-view::part(item__action tree-view-item--success) {\n @include tree-item-status(\"success\");\n}\n.tree-view::part(item__action tree-view-item--warning) {\n @include tree-item-status(\"warning\");\n}\n.tree-view::part(item__action tree-view-item--error) {\n @include tree-item-status(\"error\");\n}\n\n// WA: prevent crashes when the items collection contains too many elements\n.tree-view-import::part(item) {\n content-visibility: auto;\n contain-intrinsic-size: auto 22px;\n // TODO: Check if 22px can be calculated. Not \"secure\" since font-size\n // (body-regular-s) defines the total height. If the typographic style\n // changes, this calculation will break. Ideally, tree item font-size\n // should use a variable like \"--tree-item-font-size\".\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n h,\n Method,\n Prop,\n State,\n Watch\n} from \"@stencil/core\";\n\nimport {\n ChCheckboxCustomEvent,\n // ChEditCustomEvent,\n TreeViewItemContextMenu\n} from \"@genexus/chameleon-controls-library\";\nimport { TreeViewItemModel } from \"@genexus/chameleon-controls-library\";\nimport { TreeViewItemModelExtended } from \"@genexus/chameleon-controls-library\";\nimport { getIconPath, MercuryBundles } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\n\nimport {\n ImportCategoryData,\n ImportItemResultData,\n ContextMenuInfo\n} from \"../../common/types\";\nimport {\n convertImportCategoryDataToTreeView,\n addImportItemResultDataItem,\n convertImportCategoryItemToTreeItem\n} from \"./helpers\";\nimport { CheckedItemsInfo } from \"../_helpers/list-selector/list-selector\";\n\nimport { KB_OBJECT, STATUS_REGEXP_KEY } from \"./helpers\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/checkbox\",\n \"components/edit\",\n \"components/icon\",\n \"components/tree-view\",\n \"utils/form\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\"\n];\n\nconst NOTICE_ICON = getIconPath({\n category: \"gemini-tools\",\n name: \"notice\",\n colorType: \"on-surface\"\n});\n\nconst FILE_ICON = getIconPath({\n category: \"gemini-tools\",\n name: \"file\",\n colorType: \"primary\"\n});\n\nconst GEMINI_TOOLS_SETTINGS = getIconPath({\n category: \"gemini-tools\",\n name: \"settings\",\n colorType: \"primary\"\n});\n\nconst MENU_DELETE = getIconPath({\n category: \"menus\",\n name: \"delete\",\n colorType: \"primary\"\n});\n\nconst CHECKBOX_ALL_CHECKED_VALUE = \"allChecked\";\nconst CHECKBOX_ALL_UNCHECKED_VALUE = \"allUnchecked\";\n\n@Component({\n tag: \"gx-ide-kb-manager-import\",\n styleUrl: \"kb-manager-import.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/kb-manager-import\"]\n})\nexport class GxIdeKbManagerImport {\n /**\n * The component hard-coded strings translations.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n\n #selectedObjectsInFileIds: string[] = [];\n\n @Element() el: HTMLGxIdeKbManagerImportElement;\n\n #fileInputEl!: HTMLChEditElement;\n #fileInputHiddenEl!: HTMLInputElement;\n #objectsTreeEl!: HTMLChTreeViewRenderElement;\n #successItemsIds: Set<string> = new Set();\n #warningItemsIds: Set<string> = new Set();\n #errorItemsIds: Set<string> = new Set();\n // #categoryItemMap maps a category id, with the name and icon.\n // required for the \"import status\" tree.\n #categoryItemMap: CategoryItemMap = new Map();\n #objectCategoryItemMap: ObjectCategoryItemMap = new Map();\n #importedCategoryData: ImportCategoryData[];\n\n @State() selectAllCheckboxValue: string;\n @State() selectAllCheckboxIndeterminate: boolean = false;\n @State() hasSelection: boolean = false;\n @State() importStatusMessage: string;\n @State() importTreeState: TreeViewItemModel[] = [];\n @State() importedTreeFilterRegExp: RegExp;\n @Watch(\"importTreeState\")\n importTreeStateChanged() {\n // this.#filterImportedHandler();\n }\n @State() importingIsInProcess = false;\n @State() importTreeFilterList: string[] = [];\n @State() noImport: boolean;\n @State() noObjects: boolean = true;\n @State() objectsTreeModel: TreeViewItemModel[] = [];\n @State() showHiddenImportsMessage = false;\n @State() someStatusVisible: boolean;\n @State() statusInfo: StatusInfo = {\n error: {\n display: true,\n number: 0\n },\n warning: {\n display: true,\n number: 0\n },\n success: {\n display: true,\n number: 0\n }\n };\n\n @Watch(\"importTreeState\")\n watchImportTreeStateHandler() {\n this.#evaluateImport();\n if (this.noImport) {\n this.importStatusMessage =\n this.#componentLocale.main.importStatus.noImportedFiles;\n } else {\n this.importStatusMessage =\n this.#componentLocale.main.importStatus.importedButHidden;\n }\n }\n @Watch(\"objectsTreeModel\")\n watchObjectsTreeModelHandler(newState: TreeViewItemModel[]) {\n this.noObjects = !newState || newState.length === 0;\n }\n\n /**\n * Callback invoked when user wants to cancel the export process.\n */\n @Prop() readonly cancelCallback!: CancelCallback;\n\n /**\n * Callback invoked when user wants to initiate the import process.\n */\n @Prop() readonly importCallback!: ImportCallback;\n\n /**\n * Callback invoked when user wants to load the xpz information\n */\n @Prop() readonly loadCallback!: LoadCallback;\n\n /**\n * Displays status buttons (errors, warning, succeeded) with minimal UI (no captions)\n */\n @Prop() readonly objectContextMenuCallback!: ObjectContextMenuCallback;\n\n /**\n * Callback invoked when user wants to access the export options.\n */\n @Prop() readonly optionsCallback!: OptionsCallback;\n\n /**\n * Imported xml or xps file name\n */\n @Prop({ mutable: true }) selectedFile: File;\n @Watch(\"selectedFile\")\n selectedFileChanged(newFile: File) {\n if (newFile) {\n this.#loadFileHandler(newFile);\n }\n }\n\n /**\n * Displays status buttons (error, warning, success) with minimal UI (no captions).\n */\n @Prop() readonly statusMinimal = false;\n\n /**\n * Emitted once just after the component is fully loaded.\n */\n @Event() componentDidLoadEvent: EventEmitter<boolean>;\n\n /**\n * Emitted once just after the component is fully loaded and the first render() occurs\n */\n @Event() componentDidRenderFirstTime: EventEmitter<boolean>;\n\n componentDidLoad() {\n this.#fileInputEl.focus();\n }\n\n componentDidRender() {}\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.componentDidLoadEvent.emit(true);\n // this.#evaluateObjects();\n this.#evaluateImport();\n this.importStatusMessage =\n this.#componentLocale.main.importStatus.noImportedFiles;\n this.#evaluateImportStatusMessage();\n }\n\n /**\n * Add the result of importing an item\n */\n @Method()\n async addResultItem(item: ImportItemResultData) {\n this.importTreeState = addImportItemResultDataItem(\n item,\n this.#categoryItemMap,\n this.#objectCategoryItemMap,\n this.importTreeState\n );\n this.statusInfo[item.status].number++;\n this.#updateStatusItemsState();\n }\n\n #cancelImportHandler = () => {\n this.cancelCallback();\n };\n\n #clearStatusHandler = () => {\n this.importTreeState = [];\n this.statusInfo.error.number = 0;\n this.statusInfo.warning.number = 0;\n this.statusInfo.success.number = 0;\n };\n\n #evaluateImport = () => {\n this.noImport = !!(\n this.importTreeState?.length === 0 || !this.importTreeState\n );\n };\n\n #evaluateImportStatusMessage = () => {\n this.someStatusVisible =\n this.statusInfo.error.display ||\n this.statusInfo.warning.display ||\n this.statusInfo.success.display;\n };\n\n #importObjectsHandler = async () => {\n /* first clear imported objects (this clears errors/warnings/success counts as well)*/\n this.#clearStatusHandler();\n /* then do the import*/\n this.importingIsInProcess = true;\n\n const selection = this.#buildImportSelection();\n\n await this.importCallback(selection);\n this.importingIsInProcess = false;\n };\n\n /*\n Build the structured ImportSelection from the current tree state.\n\n Lazy categories may not have their items loaded yet; in that case the\n category's own `checked` flag represents the user's intent for the whole\n group. Large categories are not expanded by default to keep imports of\n 1000+ objects responsive.\n\n For each category, the most compact group representation is picked:\n - every item checked → mode: \"all\"\n - no item checked → group omitted from the partial selection\n - mixed → \"include\" or \"exclude\", whichever has fewer ids\n */\n #buildImportSelection = (): ImportSelection => {\n const groups: GroupSelection[] = [];\n let everyGroupFullySelected = true;\n\n for (const category of this.#objectsTreeEl.model) {\n const categoryData = this.#importedCategoryData.find(\n cat => cat.id === category.id\n );\n const totalItems = categoryData?.items.length ?? 0;\n const childrenLoaded = !!(category.items && category.items.length > 0);\n\n if (!childrenLoaded && category.lazy) {\n if (category.checked) {\n groups.push({ groupId: category.id, mode: \"all\" });\n } else {\n everyGroupFullySelected = false;\n }\n continue;\n }\n\n const checkedIds: string[] = [];\n const uncheckedIds: string[] = [];\n for (const child of category.items ?? []) {\n if (child.checked) {\n checkedIds.push(child.id);\n } else {\n uncheckedIds.push(child.id);\n }\n }\n\n if (uncheckedIds.length === 0 && checkedIds.length === totalItems) {\n groups.push({ groupId: category.id, mode: \"all\" });\n } else if (checkedIds.length === 0) {\n everyGroupFullySelected = false;\n } else {\n everyGroupFullySelected = false;\n if (checkedIds.length <= uncheckedIds.length) {\n groups.push({\n groupId: category.id,\n mode: \"include\",\n ids: checkedIds\n });\n } else {\n groups.push({\n groupId: category.id,\n mode: \"exclude\",\n ids: uncheckedIds\n });\n }\n }\n }\n\n if (\n everyGroupFullySelected &&\n groups.length === this.#importedCategoryData.length\n ) {\n return { mode: \"all\" };\n }\n\n return { mode: \"partial\", groups };\n };\n\n #loadFileHandler = async (file: File) => {\n this.#importedCategoryData = await this.loadCallback(file);\n this.#categoryItemMap.clear();\n this.#objectCategoryItemMap.clear();\n\n this.#importedCategoryData.forEach(category => {\n this.#categoryItemMap.set(category.id, {\n name: category.name,\n icon: category.icon\n });\n category.items.forEach(object => {\n this.#objectCategoryItemMap.set(object.id, category.id);\n });\n });\n\n const importCategoryTreeData = convertImportCategoryDataToTreeView(\n this.#importedCategoryData\n );\n this.objectsTreeModel = importCategoryTreeData;\n // Tree-view renders with `checked={true}` by default, so a freshly\n // loaded file starts with everything selected.\n this.hasSelection = importCategoryTreeData.length > 0;\n };\n\n #lazyLoadTreeItems = async (treeItemId: string) => {\n const category = this.#importedCategoryData.find(\n cat => cat.id === treeItemId\n );\n if (!category || category.items.length === 0) {\n return [];\n }\n // Lazy children are created fresh and would otherwise take the tree-view's\n // default `checked={true}`, ignoring any \"Unselect All\" / partial selection\n // applied while the node was collapsed. Inherit the parent category's\n // current checked state so the loaded items match the user's selection.\n const categoryNode = this.#objectsTreeEl?.model?.find(\n item => item.id === treeItemId\n );\n return convertImportCategoryItemToTreeItem(\n category.icon,\n category.items,\n categoryNode?.checked\n );\n };\n\n #objectsTreeCheckedItemsChangedHandler = (\n event: CustomEvent<Map<string, TreeViewItemModelExtended>>\n ) => {\n const allItems = event.detail;\n const checkedItemIds: string[] = [];\n const pendingCheckedItemIds: string[] = [];\n const checkedObjectsIds: string[] = [];\n allItems.forEach(item => {\n if (item.item.checked) {\n checkedItemIds.push(item.item.id);\n if (item.item.lazy && !item.item.items)\n pendingCheckedItemIds.push(item.item.id);\n }\n if (item.item.checked && item.item.metadata === KB_OBJECT) {\n checkedObjectsIds.push(item.item.id);\n }\n });\n\n for (let pendingCheckedItemId of pendingCheckedItemIds) {\n const category = this.#importedCategoryData.find(\n cat => cat.id === pendingCheckedItemId\n );\n if (category) {\n for (let item of category.items) {\n if (checkedObjectsIds.indexOf(item.id) < 0)\n checkedObjectsIds.push(item.id);\n }\n }\n }\n\n // Evaluate \"Select All / Unselect All\" checkbox state\n if (allItems.size === checkedItemIds.length) {\n this.selectAllCheckboxValue = CHECKBOX_ALL_CHECKED_VALUE;\n this.selectAllCheckboxIndeterminate = false;\n } else if (checkedItemIds.length === 0) {\n this.selectAllCheckboxValue = CHECKBOX_ALL_UNCHECKED_VALUE;\n this.selectAllCheckboxIndeterminate = false;\n } else {\n this.selectAllCheckboxIndeterminate = true;\n }\n\n this.hasSelection = checkedItemIds.length > 0;\n };\n\n #objectsTreeContextMenuHandler = (\n event: CustomEvent<TreeViewItemContextMenu>\n ) => {\n if (event.detail.metadata === KB_OBJECT) {\n this.objectContextMenuCallback(\"imported\", {\n selection: this.#selectedObjectsInFileIds,\n clientX: event.detail.contextmenuEvent.screenX,\n clientY: event.detail.contextmenuEvent.screenY\n });\n }\n };\n\n #objectsTreeSelectedItemsChangedHandler = (\n event: CustomEvent<TreeViewItemModelExtended[]>\n ) => {\n this.#selectedObjectsInFileIds = event.detail.map(item => item.item.id);\n };\n\n #optionsHandler = () => {\n if (this.optionsCallback) {\n this.optionsCallback();\n // returns boolean\n }\n };\n\n #removeFileSelection = () => {\n this.selectedFile = null;\n this.#fileInputHiddenEl.value = null;\n };\n\n #selectFileInputHandler = () => {\n this.#fileInputHiddenEl.click();\n };\n\n #selectFileInputChangedHandler = (event: InputEvent) => {\n const target = event.target as HTMLInputElement;\n if (target.files?.length > 0) {\n this.selectedFile = target.files[0];\n }\n };\n\n #statusButtonsSelectionChangedHandler = (\n event: CustomEvent<CheckedItemsInfo>\n ) => {\n const activeStates = event.detail;\n const statuses: Status[] = [];\n\n const errorIndex = activeStates.findIndex(\n state => state.itemId === \"errors\"\n );\n const warningIndex = activeStates.findIndex(\n state => state.itemId === \"warnings\"\n );\n const successIndex = activeStates.findIndex(\n state => state.itemId === \"successes\"\n );\n\n if (errorIndex !== -1) {\n statuses.push(\"error\");\n }\n if (warningIndex !== -1) {\n statuses.push(\"warning\");\n }\n if (successIndex !== -1) {\n statuses.push(\"success\");\n }\n\n let pattern = `\"${STATUS_REGEXP_KEY}\":\"\"`;\n if (statuses.length) {\n const statusOptions = statuses.join(\"|\");\n pattern = `\"${STATUS_REGEXP_KEY}\":\"(${statusOptions})\"`;\n }\n this.importedTreeFilterRegExp = new RegExp(pattern, \"i\");\n\n // Update statusInfo for the status-buttons\n this.statusInfo = {\n error: {\n display: errorIndex !== -1,\n number: this.statusInfo.error.number\n },\n warning: {\n display: warningIndex !== -1,\n number: this.statusInfo.warning.number\n },\n success: {\n display: successIndex !== -1,\n number: this.statusInfo.success.number\n }\n };\n\n this.#evaluateImportStatusMessage();\n };\n\n #toggleSelectionClickHandler = (\n event: ChCheckboxCustomEvent<any> | InputEvent\n ) => {\n if (this.#objectsTreeEl) {\n const checked = event.detail === CHECKBOX_ALL_CHECKED_VALUE;\n this.#objectsTreeEl.updateAllItemsProperties({ checked: checked });\n // updateAllItemsProperties does not fire onCheckedItemsChange, so we\n // mirror the new selection state explicitly to keep the Import button\n // disabled when the user unchecks everything via this toggle.\n this.hasSelection = checked && this.objectsTreeModel.length > 0;\n }\n };\n\n #updateStatusItemsState = () => {\n this.#errorItemsIds.clear();\n this.#warningItemsIds.clear();\n this.#successItemsIds.clear();\n this.importTreeState.forEach(item => {\n const items = item.items;\n items.forEach(child => {\n if (child.metadata === \"error\") {\n this.#errorItemsIds.add(child.id);\n }\n if (child.metadata === \"warning\") {\n this.#warningItemsIds.add(child.id);\n }\n if (child.metadata === \"success\") {\n this.#successItemsIds.add(child.id);\n }\n });\n });\n };\n\n render(): void {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <section class=\"section\">\n <header\n // header\n class=\"field-group dialog-header-with-border header header-two-cols spacing-body-block-start spacing-body-inline\"\n slot=\"header\"\n >\n <div\n // select a file\n class=\"field field-inline\"\n >\n <label class=\"label\" htmlFor=\"file-name\">\n {this.#componentLocale.header.fileNameLabel}\n </label>\n <ch-edit\n autoFocus\n id=\"file-name\"\n class=\"input\"\n part=\"file-name\"\n type=\"text\"\n readonly\n value={this.selectedFile?.name}\n placeholder={this.#componentLocale.header.fileNamePlaceholder}\n startImgSrc={FILE_ICON}\n ref={(el: HTMLChEditElement) =>\n (this.#fileInputEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n <input\n hidden\n type=\"file\"\n accept=\".xpz, .xml\"\n onChange={this.#selectFileInputChangedHandler}\n ref={(el: HTMLInputElement) =>\n (this.#fileInputHiddenEl = el as HTMLInputElement)\n }\n />\n </div>\n\n <div class=\"buttons-spacer\">\n <button\n // remove file selection\n aria-label={this.#componentLocale.header.removeFileSelection}\n title={this.#componentLocale.header.removeFileSelection}\n id=\"reset-all-button\"\n class=\"button-tertiary button-icon-only\"\n part=\"reset-all-button\"\n onClick={this.#removeFileSelection}\n >\n <ch-image class=\"icon-m\" src={MENU_DELETE}></ch-image>\n </button>\n\n <button\n // select file\n id=\"select-file-load-button\"\n class=\"button-primary\"\n part=\"select-file-load-button\"\n onClick={this.#selectFileInputHandler}\n disabled={this.importingIsInProcess}\n >\n {this.#componentLocale.header.selectFileButton}\n </button>\n </div>\n </header>\n\n <section\n // objects in file\n class=\"objects-in-file__section\"\n >\n <h2 class=\"dialog-header dialog-header-with-border dialog-header__objects-in-file subtitle-regular-xs\t text-align-center spacing-body-inline\">\n {this.#componentLocale.main.objectsInFile.title}\n </h2>\n\n <div class=\"field-group objects-in-file__main\">\n {!this.noObjects ? (\n <ch-tree-view-render\n // objects in file tree\n showLines=\"last\"\n class=\"tree-view tree-view-import\"\n model={this.objectsTreeModel}\n dragDisabled={true}\n dropDisabled={true}\n toggleCheckboxes={true}\n checkbox={true}\n checked={true}\n lazyLoadTreeItemsCallback={this.#lazyLoadTreeItems}\n onCheckedItemsChange={\n this.#objectsTreeCheckedItemsChangedHandler\n }\n onSelectedItemsChange={\n this.#objectsTreeSelectedItemsChangedHandler\n }\n onItemContextmenu={this.#objectsTreeContextMenuHandler}\n ref={(el: HTMLChTreeViewRenderElement) =>\n (this.#objectsTreeEl = el as HTMLChTreeViewRenderElement)\n }\n ></ch-tree-view-render>\n ) : (\n <gx-ide-empty-state\n isAnimated={false}\n stateTitle={\n this.#componentLocale.main.objectsInFile.noObjects\n }\n key=\"no-objects-empty-state\"\n >\n <button\n // begin by selecting a file\n class=\"button-secondary\"\n onClick={this.#selectFileInputHandler}\n >\n {this.#componentLocale.main.objectsInFile.selectFile}\n </button>\n </gx-ide-empty-state>\n )}\n\n <footer class=\"field-group objects-in-file__footer spacing-body-inline\">\n <ch-checkbox\n // select all / unselect all checkbox\n id=\"select-all-checkbox\"\n class=\"checkbox create-data-in-kb\"\n checkedValue={CHECKBOX_ALL_CHECKED_VALUE}\n unCheckedValue={CHECKBOX_ALL_UNCHECKED_VALUE}\n caption={\n this.#componentLocale.main.objectsInFile.selectUnselect\n }\n value={this.selectAllCheckboxValue}\n onInput={this.#toggleSelectionClickHandler}\n disabled={\n this.importingIsInProcess ||\n this.objectsTreeModel.length === 0\n }\n part=\"select-all-checkbox\"\n ></ch-checkbox>\n\n <div class=\"buttons-spacer\">\n <button\n // import objects button\n id=\"import-btn\"\n class=\"button-primary \"\n onClick={this.#importObjectsHandler}\n disabled={\n this.objectsTreeModel?.length === 0 ||\n this.importingIsInProcess ||\n !this.hasSelection\n }\n >\n {this.#componentLocale.main.objectsInFile.importButton}\n </button>\n\n <button\n // cancel-import button\n id=\"cancel-import-btn\"\n class=\"button-secondary \"\n onClick={this.#cancelImportHandler}\n disabled={!this.importingIsInProcess}\n part=\"cancel-import-button\"\n >\n {this.#componentLocale.main.objectsInFile.cancelButton}\n </button>\n\n <button\n // settings/options button\n id=\"select-kb-btn\"\n class=\"button-tertiary button-icon-only\"\n part=\"select-kb-btn\"\n onClick={this.#optionsHandler}\n >\n <ch-image\n class=\"icon-m\"\n src={GEMINI_TOOLS_SETTINGS}\n ></ch-image>\n </button>\n </div>\n </footer>\n </div>\n </section>\n\n <section\n // import status\n class=\"import-status__section\"\n >\n <h2 class=\"dialog-header dialog-header-with-border dialog-header__import-status subtitle-regular-xs\t text-align-center spacing-body-inline\">\n {this.#componentLocale.main.importStatus.title}\n </h2>\n\n <div class=\"field-group import-status__main\">\n {!this.noImport && this.someStatusVisible ? (\n <ch-tree-view-render\n // import status tree\n model={this.importTreeState}\n toggleCheckboxes={true}\n showLines=\"last\"\n class=\"tree-view tree-view-import\"\n filter={this.importedTreeFilterRegExp}\n filterType=\"metadata\"\n filterOptions={{\n autoExpand: true,\n hideMatchesAndShowNonMatches: false\n }}\n ></ch-tree-view-render>\n ) : (\n <gx-ide-empty-state\n isAnimated={false}\n stateIconSrc={NOTICE_ICON}\n stateTitle={this.importStatusMessage}\n key=\"no-objects-empty-state\"\n ></gx-ide-empty-state>\n )}\n\n <footer class=\"import-status__footer spacing-body-inline\">\n <button\n // clear status button\n class=\"button-secondary import-clear-status-btn\"\n onClick={this.#clearStatusHandler}\n disabled={this.noImport || this.importingIsInProcess}\n part=\"clear-status-btn\"\n >\n {this.#componentLocale.main.importStatus.clearButton}\n </button>\n </footer>\n </div>\n </section>\n\n <footer\n // footer\n class=\"footer\"\n >\n <gx-ide-status-buttons\n errors={this.statusInfo.error.number}\n warnings={this.statusInfo.warning.number}\n successes={this.statusInfo.success.number}\n hideMessage\n compact\n minimal={this.statusMinimal}\n onSelectionChanged={this.#statusButtonsSelectionChangedHandler}\n ></gx-ide-status-buttons>\n </footer>\n </section>\n </Host>\n );\n }\n}\nexport type CancelCallback = () => Promise<boolean>;\n\n/**\n * Payload passed to `importCallback` describing the user's selection.\n *\n * - `mode: \"all\"` imports every available item across every group.\n * - `mode: \"partial\"` imports only what is declared in `groups`. Groups not\n * present in the list are excluded from the import.\n *\n * Per group the most compact representation is used: `\"all\"` for an entire\n * group, `\"include\"` / `\"exclude\"` for explicit lists (whichever side has\n * fewer ids).\n */\nexport type ImportSelection = {\n mode: \"all\" | \"partial\";\n groups?: GroupSelection[];\n};\n\nexport type GroupSelection = {\n groupId: string;\n mode: \"all\" | \"include\" | \"exclude\";\n ids?: string[];\n};\n\nexport type ImportCallback = (selection: ImportSelection) => Promise<boolean>;\n\nexport type LoadCallback = (file: File) => Promise<ImportCategoryData[]>;\n\nexport type ObjectContextMenuCallback = (\n tree: ObjectsSourceType,\n contextMenuInfo: ContextMenuInfo\n) => Promise<void>;\n\nexport type ObjectsSourceType = \"in-file\" | \"imported\";\n\nexport type OptionsCallback = () => Promise<void>;\n\nexport interface SelectedObject {\n itemId: string;\n subItemsIds: string[];\n}\n\nexport type StatusItemsState = {\n error: string[];\n warning: string[];\n success: string[];\n};\n\ntype StatusInfo = {\n error: {\n display: boolean;\n number: number;\n };\n warning: {\n display: boolean;\n number: number;\n };\n success: {\n display: boolean;\n number: number;\n };\n};\n\nexport type CategoryItemMap = Map<string, CategoryItemMapValue>;\nexport type CategoryItemMapValue = { name: string; icon: string };\nexport type ObjectCategoryItemMap = Map<string, string>;\nexport type Status = \"success\" | \"error\" | \"warning\";\n"],"mappings":";;;;;;;;;;;;;;AAmBA,MAAMA,IAAkC;;6BA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