@genexus/genexus-ide-ui 0.0.109 → 0.0.110
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-empty-state.cjs.entry.js +70 -0
- package/dist/cjs/gx-ide-empty-state.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js +142 -63
- package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-status-buttons.cjs.entry.js +5 -10
- package/dist/cjs/gx-ide-status-buttons.cjs.entry.js.map +1 -1
- package/dist/cjs/gxg-buttons-container_2.cjs.entry.js +1 -1
- package/dist/cjs/gxg-buttons-container_2.cjs.entry.js.map +1 -1
- package/dist/cjs/{gx-ide-empty-state_2.cjs.entry.js → gxg-card_2.cjs.entry.js} +121 -63
- package/dist/cjs/gxg-card_2.cjs.entry.js.map +1 -0
- package/dist/cjs/gxg-combo-box_2.cjs.entry.js +1 -0
- package/dist/cjs/gxg-combo-box_2.cjs.entry.js.map +1 -1
- package/dist/cjs/gxg-ide-loader.cjs.entry.js +4 -15
- package/dist/cjs/gxg-ide-loader.cjs.entry.js.map +1 -1
- package/dist/cjs/gxg-tab_4.cjs.entry.js +1 -1
- package/dist/cjs/gxg-tab_4.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/_helpers/status-buttons/gx-ide-status-buttons.css +370 -29
- package/dist/collection/components/_helpers/status-buttons/gx-ide-status-buttons.js +4 -99
- package/dist/collection/components/_helpers/status-buttons/gx-ide-status-buttons.js.map +1 -1
- package/dist/collection/components/kb-manager-import/kb-manager-import.js +1 -1
- package/dist/collection/components/kb-manager-import/kb-manager-import.js.map +1 -1
- package/dist/collection/components/modules/manage-module-references/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.en.json +10 -4
- package/dist/collection/components/modules/manage-module-references/manage-module-references.css +43 -22
- package/dist/collection/components/modules/manage-module-references/manage-module-references.js +167 -63
- package/dist/collection/components/modules/manage-module-references/manage-module-references.js.map +1 -1
- package/dist/collection/components/modules/types.js.map +1 -1
- package/dist/components/combo-box.js +2 -1
- package/dist/components/combo-box.js.map +1 -1
- package/dist/components/container.js +2 -2
- package/dist/components/form-checkbox.js +1 -1
- package/dist/components/form-radio-group.js +1 -1
- package/dist/components/form-text.js +1 -1
- package/dist/components/form-textarea.js +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/gx-ide-ai-assistant.js +1 -1
- package/dist/components/gx-ide-bpm-app-declaration.js +2 -2
- package/dist/components/gx-ide-create-kb-from-server.js +2 -2
- package/dist/components/gx-ide-dashboard-home.js +2 -2
- package/dist/components/gx-ide-data-selector.js +2 -2
- package/dist/components/gx-ide-edit-module-servers.js +2 -2
- package/dist/components/gx-ide-empty-state2.js +2 -2
- package/dist/components/gx-ide-import-from-design.js +2 -2
- package/dist/components/gx-ide-kb-manager-export.js +2 -2
- package/dist/components/gx-ide-kb-manager-import.js +3 -3
- package/dist/components/gx-ide-kb-manager-import.js.map +1 -1
- package/dist/components/gx-ide-manage-module-references.js +173 -90
- package/dist/components/gx-ide-manage-module-references.js.map +1 -1
- package/dist/components/gx-ide-new-environment.js +2 -2
- package/dist/components/gx-ide-new-kb.js +2 -2
- package/dist/components/gx-ide-new-object.js +2 -2
- package/dist/components/gx-ide-object-selector.js +2 -2
- package/dist/components/gx-ide-references.js +2 -2
- package/dist/components/gx-ide-share-kb.js +2 -2
- package/dist/components/gx-ide-start-page.js +2 -2
- package/dist/components/gx-ide-status-buttons2.js +6 -16
- package/dist/components/gx-ide-status-buttons2.js.map +1 -1
- package/dist/components/gx-ide-team-dev-commit.js +2 -2
- package/dist/components/gx-ide-team-dev-select-recent-comment.js +2 -2
- package/dist/components/gx-ide-team-dev-update-partial-selection.js +2 -2
- package/dist/components/gx-ide-team-dev-update-to-revision.js +2 -2
- package/dist/components/gx-ide-team-dev-update.js +2 -2
- package/dist/components/gx-ide-template.js +2 -2
- package/dist/components/gx-ide-title.js +1 -1
- package/dist/components/gx-ide-top-bar.js +1 -1
- package/dist/components/gx-ide-ww-images.js +2 -2
- package/dist/components/gxg-container.js +1 -1
- package/dist/components/gxg-form-checkbox-group2.js +1 -1
- package/dist/components/gxg-menu-slim-list.js +1 -1
- package/dist/components/gxg-title.js +1 -1
- package/dist/components/gxg-top-state-bar2.js +1 -1
- package/dist/components/gxg-top-state-bar2.js.map +1 -1
- package/dist/components/ide-loader.js +7 -16
- package/dist/components/ide-loader.js.map +1 -1
- package/dist/components/list-box.js +1 -1
- package/dist/components/list-selector.js +1 -1
- package/dist/components/recent-news.js +2 -2
- package/dist/components/suggest.js +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/title-editable.js +1 -1
- package/dist/components/title.js +31 -32
- package/dist/components/title.js.map +1 -1
- package/dist/components/title2.js +32 -31
- package/dist/components/title2.js.map +1 -1
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-empty-state.entry.js +66 -0
- package/dist/esm/gx-ide-empty-state.entry.js.map +1 -0
- package/dist/esm/gx-ide-kb-manager-import.entry.js +1 -1
- package/dist/esm/gx-ide-kb-manager-import.entry.js.map +1 -1
- package/dist/esm/gx-ide-manage-module-references.entry.js +142 -63
- package/dist/esm/gx-ide-manage-module-references.entry.js.map +1 -1
- package/dist/esm/gx-ide-status-buttons.entry.js +5 -10
- package/dist/esm/gx-ide-status-buttons.entry.js.map +1 -1
- package/dist/esm/gxg-buttons-container_2.entry.js +1 -1
- package/dist/esm/gxg-buttons-container_2.entry.js.map +1 -1
- package/dist/esm/{gx-ide-empty-state_2.entry.js → gxg-card_2.entry.js} +122 -64
- package/dist/{cjs/gx-ide-empty-state_2.cjs.entry.js.map → esm/gxg-card_2.entry.js.map} +1 -1
- package/dist/esm/gxg-combo-box_2.entry.js +1 -0
- package/dist/esm/gxg-combo-box_2.entry.js.map +1 -1
- package/dist/esm/gxg-ide-loader.entry.js +4 -15
- package/dist/esm/gxg-ide-loader.entry.js.map +1 -1
- package/dist/esm/gxg-tab_4.entry.js +1 -1
- package/dist/esm/gxg-tab_4.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.css +4 -3
- 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/manage-module-references/langs/manage-module-references.lang.en.json +10 -4
- package/dist/genexus-ide-ui/{p-b7bc3c0c.entry.js → p-00704c36.entry.js} +6 -6
- package/dist/genexus-ide-ui/{p-b7bc3c0c.entry.js.map → p-00704c36.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/p-5ca7da19.entry.js +94 -0
- package/dist/genexus-ide-ui/p-5ca7da19.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-41ac8e60.entry.js → p-5fe20f47.entry.js} +2 -2
- package/dist/genexus-ide-ui/p-5fe20f47.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-adaf7aff.entry.js → p-713ad05d.entry.js} +185 -109
- package/dist/genexus-ide-ui/p-713ad05d.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-40121554.entry.js → p-9f9fda93.entry.js} +172 -120
- package/dist/genexus-ide-ui/p-9f9fda93.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-ee9f4e20.entry.js → p-bc04fcaa.entry.js} +7 -15
- package/dist/genexus-ide-ui/p-bc04fcaa.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-5a5d3e19.entry.js → p-c9cceb40.entry.js} +1 -4
- package/dist/genexus-ide-ui/p-c9cceb40.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-e9e4482b.entry.js → p-decf86d4.entry.js} +114 -127
- package/dist/genexus-ide-ui/p-decf86d4.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-045a084f.entry.js → p-f37ec5b8.entry.js} +2 -1
- package/dist/genexus-ide-ui/p-f37ec5b8.entry.js.map +1 -0
- package/dist/node_modules/@genexus/gemini/dist/collection/components/ide-loader/ide-loader.css +3 -0
- package/dist/node_modules/@genexus/gemini/dist/collection/components/tabs/tabs.css +1 -0
- package/dist/node_modules/@genexus/gemini/dist/collection/components/top-state-bar/gxg-top-state-bar.css +32 -34
- package/dist/types/components/_helpers/status-buttons/gx-ide-status-buttons.d.ts +0 -20
- package/dist/types/components/modules/manage-module-references/manage-module-references.d.ts +20 -8
- package/dist/types/components/modules/types.d.ts +5 -4
- package/dist/types/components.d.ts +70 -184
- package/package.json +3 -3
- package/dist/cjs/gx-ide-add-module-servers.cjs.entry.js +0 -98
- package/dist/cjs/gx-ide-add-module-servers.cjs.entry.js.map +0 -1
- package/dist/cjs/gxg-title-editable.cjs.entry.js +0 -128
- package/dist/cjs/gxg-title-editable.cjs.entry.js.map +0 -1
- package/dist/collection/components/modules/add-module-servers/add-module-servers.css +0 -560
- package/dist/collection/components/modules/add-module-servers/add-module-servers.js +0 -251
- package/dist/collection/components/modules/add-module-servers/add-module-servers.js.map +0 -1
- package/dist/collection/components/modules/add-module-servers/gx-ide-assets/add-module-servers/langs/add-module-servers.lang.en.json +0 -11
- package/dist/collection/components/modules/add-module-servers/gx-ide-assets/add-module-servers/langs/add-module-servers.lang.ja.json +0 -3
- package/dist/collection/components/modules/add-module-servers/gx-ide-assets/add-module-servers/langs/add-module-servers.lang.zh.json +0 -3
- package/dist/components/gx-ide-add-module-servers.d.ts +0 -11
- package/dist/components/gx-ide-add-module-servers.js +0 -186
- package/dist/components/gx-ide-add-module-servers.js.map +0 -1
- package/dist/esm/gx-ide-add-module-servers.entry.js +0 -94
- package/dist/esm/gx-ide-add-module-servers.entry.js.map +0 -1
- package/dist/esm/gx-ide-empty-state_2.entry.js.map +0 -1
- package/dist/esm/gxg-title-editable.entry.js +0 -124
- package/dist/esm/gxg-title-editable.entry.js.map +0 -1
- package/dist/genexus-ide-ui/gx-ide-assets/add-module-servers/langs/add-module-servers.lang.en.json +0 -11
- package/dist/genexus-ide-ui/gx-ide-assets/add-module-servers/langs/add-module-servers.lang.ja.json +0 -3
- package/dist/genexus-ide-ui/gx-ide-assets/add-module-servers/langs/add-module-servers.lang.zh.json +0 -3
- package/dist/genexus-ide-ui/p-045a084f.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-36544e00.entry.js +0 -138
- package/dist/genexus-ide-ui/p-36544e00.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-40121554.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-41ac8e60.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-5a5d3e19.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-a46794f4.entry.js +0 -138
- package/dist/genexus-ide-ui/p-a46794f4.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-adaf7aff.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-e9e4482b.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-ee9f4e20.entry.js.map +0 -1
- package/dist/types/components/modules/add-module-servers/add-module-servers.d.ts +0 -60
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["buttonsContainerCss","GxgButtonsContainer","constructor","hostRef","this","setSelectedButton","event","tagName","target","clickedButton","disabled","selected","gxgButtonsHtmlCollection","el","children","Array","from","forEach","button","selectedButtonChanged","emit","id","updateSelectedButtonId","selectedButton","find","selectedButtonId","undefined","reduced","fullWidth","componentDidLoad","render","h","Host","class","container","ref","containerEl","onClick","gxgTopStateBarCss","GxgTopStateBar","evaluateInitialProgress","progress","stateType","style","setProperty","evaluateWithAction","withClose","closeButtonHandler","active","closeKeyDownHandler","e","key","closeClickHandler","closedCallback","topStateBarVisible","visible","caption","minimal","autoClose","noBorder","watchActiveHandler","setTimeout","watchStateTypeHandler","watchProgressHandler","componentWillLoad","role","part","onKeyDown","type","color","tabIndex","size"],"sources":["node_modules/@genexus/gemini/dist/collection/components/buttons-container/buttons-container.css?tag=gxg-buttons-container&encapsulation=shadow","node_modules/@genexus/gemini/dist/collection/components/buttons-container/buttons-container.js","node_modules/@genexus/gemini/dist/collection/components/top-state-bar/gxg-top-state-bar.css?tag=gxg-top-state-bar&encapsulation=shadow","node_modules/@genexus/gemini/dist/collection/components/top-state-bar/gxg-top-state-bar.js"],"sourcesContent":["/*--- Elevation ---*/\n:host {\n --ds-background-color-disabled: transparent;\n --ds-border-color-disabled: transparent;\n display: block;\n}\n:host .container {\n background-color: var(--mer-elevation__background-color--01);\n border: var(--mer-elevation__border-01);\n box-shadow: var(--mer-elevation__box-shadow--01);\n box-shadow: none;\n display: inline-flex;\n align-items: center;\n padding: var(--gxg-buttons-group__padding);\n box-sizing: border-box;\n gap: var(--gxg-buttons-group__gap);\n border-radius: var(--gxg-buttons-group__border-radius);\n border: 1px solid var(--mer-color__elevation__03);\n}\n:host .container--reduced {\n height: calc(var(--gxg-form-text-height) + 2px);\n --gxg-button-height: 100%;\n}\n:host .container--reduced ::slotted(gxg-button) {\n height: 100%;\n}\n:host ::slotted(.button--unselected) {\n --gxg-button-primary-border-color: transparent;\n --gxg-button-primary-bg-color: var(\n --gxg-button-unselected-bg-color--enabled\n );\n --gxg-button-primary-color: var(--gxg-button-unselected-color--enabled);\n}\n\n:host([full-width]) {\n width: 100%;\n}\n:host([full-width]) .container {\n width: 100%;\n display: flex;\n}\n:host([full-width]) ::slotted(gxg-button) {\n flex: 1;\n}","import { Host, h } from \"@stencil/core\";\nexport class GxgButtonsContainer {\n constructor() {\n this.selectedButtonId = undefined;\n this.reduced = false;\n this.fullWidth = false;\n }\n el;\n containerEl;\n // 2. REFERENCE TO ELEMENTS //\n // 3.STATE() VARIABLES //\n // 4.PUBLIC PROPERTY API | WATCH'S //\n // 5.EVENTS (EMIT) //\n selectedButtonChanged;\n // 6.COMPONENT LIFECYCLE METHODS //\n componentDidLoad() {\n this.updateSelectedButtonId();\n }\n // 7.LISTENERS //\n // 8.PUBLIC METHODS API //\n // 9.LOCAL METHODS //\n setSelectedButton = (event) => {\n const tagName = event.target.tagName;\n if (tagName !== \"GXG-BUTTON\") {\n //clicked button is disabled\n return;\n }\n else {\n const clickedButton = event.target;\n if (clickedButton.disabled || clickedButton.selected) {\n //button is disabled or is the current selected\n return;\n }\n const gxgButtonsHtmlCollection = this.el.children;\n Array.from(gxgButtonsHtmlCollection).forEach(function (button) {\n if (button.selected) {\n button.selected = false;\n }\n });\n clickedButton.selected = true;\n this.selectedButtonChanged.emit(clickedButton.id);\n this.updateSelectedButtonId();\n }\n };\n updateSelectedButtonId = () => {\n const gxgButtonsHtmlCollection = this.el.children;\n const selectedButton = Array.from(gxgButtonsHtmlCollection).find((button) => {\n return button.selected && !button.disabled;\n });\n if (selectedButton) {\n this.selectedButtonId = selectedButton.id;\n }\n };\n // 10.RENDER() FUNCTION //\n render() {\n return (h(Host, null, h(\"div\", { class: {\n container: true,\n \"container--reduced\": this.reduced\n }, ref: el => (this.containerEl = el), onClick: this.setSelectedButton }, h(\"slot\", null))));\n }\n static get is() { return \"gxg-buttons-container\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"buttons-container.scss\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"buttons-container.css\"]\n };\n }\n static get properties() {\n return {\n \"selectedButtonId\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The id of the currently selected button, or null if all are disabled\"\n },\n \"attribute\": \"selected-button-id\",\n \"reflect\": false\n },\n \"reduced\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Used to reduce the height when the button-container is next to a form-text\"\n },\n \"attribute\": \"reduced\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"fullWidth\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Makes the buttons-container full-width\"\n },\n \"attribute\": \"full-width\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n }\n };\n }\n static get events() {\n return [{\n \"method\": \"selectedButtonChanged\",\n \"name\": \"selectedButtonChanged\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n}\n//# sourceMappingURL=buttons-container.js.map\n",":host {\n --top-bar-progress: 0%;\n display: grid;\n grid-template-rows: 0fr;\n transition: 200ms grid-template-rows;\n overflow: hidden;\n --ds-icon-size-box--small: var(--mer-font__size--xxs);\n --ds-icon-size--small: 100%;\n}\n:host > * {\n overflow: hidden;\n}\n\n:host(.visible) {\n grid-template-rows: 1fr;\n}\n\n.top-state-bar {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: var(--mer-spacing--sm);\n border-radius: var(--mer-border__width--lg);\n list-style: var(--mer-font__size--xxs);\n display: flex;\n /*states*/\n}\n.top-state-bar > * {\n position: relative;\n z-index: 1;\n}\n.top-state-bar__outer-wrapper {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: var(--mer-spacing--sm);\n padding: var(--mer-spacing--sm) var(--mer-spacing--sm);\n border: var(--mer-border__width--sm) solid var(--mer-border-color__dim);\n border-radius: var(--mer-border__width--lg);\n}\n.top-state-bar__inner-wrapper {\n flex: 1;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n gap: var(--mer-spacing--xs);\n}\n.top-state-bar__caption {\n color: var(--mer-text__on-message);\n font-family: var(--ds-base-font-family-primary);\n font-size: var(--mer-font__size--xxs);\n line-height: var(--mer-font__size--xxs);\n font-weight: var(--mer-font__weight--regular);\n display: flex;\n align-items: baseline;\n font-style: italic;\n}\n.top-state-bar__progress-wrapper {\n height: var(--mer-spacing--xxs);\n background-color: var(--mer-color__elevation--04);\n}\n.top-state-bar__close {\n cursor: pointer;\n transition: 200ms background-color;\n}\n.top-state-bar__inner-wrapper, .top-state-bar__progress-wrapper, .top-state-bar__close {\n opacity: 0;\n transition: 150ms opacity;\n}\n.top-state-bar--accent .progress-bar {\n background-color: var(--mer-accent__primary);\n}\n.top-state-bar--accent .top-state-bar__caption {\n color: var(--mer-accent__primary);\n}\n.top-state-bar--success .progress-bar {\n background-color: var(--mer-color__message-green--100);\n}\n.top-state-bar--success .top-state-bar__caption {\n color: var(--mer-color__message-green--100);\n}\n.top-state-bar--warning .progress-bar {\n background-color: var(--mer-color__message-yellow--100);\n}\n.top-state-bar--warning .top-state-bar__caption {\n color: var(--mer-color__message-yellow--100);\n}\n.top-state-bar--error .progress-bar {\n background-color: var(--mer-color__message-red--100);\n}\n.top-state-bar--error .top-state-bar__caption {\n color: var(--mer-color__message-red--100);\n}\n.top-state-bar--in-progress:before {\n height: 0;\n width: 120%;\n padding-top: 60%;\n padding-bottom: 60%;\n background: linear-gradient(90deg, #5ba7ff 0%, #3fa89b 100%);\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n -webkit-animation: inProgressBackgroundColor 1s linear infinite;\n animation: inProgressBackgroundColor 1s linear infinite;\n}\n.top-state-bar--in-progress .top-state-bar__close-wrapper {\n border-inline-start-color: #3fa89b;\n -webkit-animation: inProgressBorderColor 1s linear infinite;\n animation: inProgressBorderColor 1s linear infinite;\n}\n.top-state-bar--in-progress .progress-bar {\n position: relative;\n overflow: hidden;\n z-index: 1;\n}\n.top-state-bar--in-progress .progress-bar:after {\n content: \"\";\n position: absolute;\n z-index: 0;\n width: 300%;\n height: 100%;\n left: 0;\n background: linear-gradient(90deg, #93f5eb 0%, #1aa3ff 33%, #93f5eb 66%, #1aa3ff 100%);\n animation-name: inProgressBar;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n}\n.top-state-bar--in-progress .top-state-bar__caption {\n color: #3fa89b;\n}\n.top-state-bar--visible .top-state-bar__inner-wrapper,\n.top-state-bar--visible .top-state-bar__progress-wrapper,\n.top-state-bar--visible .top-state-bar__close {\n opacity: 1;\n}\n.top-state-bar--visible .top-state-bar__close:hover {\n opacity: 0.75;\n}\n.top-state-bar--visible .top-state-bar__close:active {\n opacity: 0.5;\n}\n\n/*in progress animation*/\n@-webkit-keyframes inProgressBorderColor {\n 0% {\n border-inline-start-color: #3fa89b;\n }\n 100% {\n border-inline-start-color: #5ba7ff;\n }\n}\n@-webkit-keyframes inProgressBackgroundColor {\n 0% {\n transform: translate(-50%, -50%) rotate(0);\n }\n 100% {\n transform: translate(-50%, -50%) rotate(1turn);\n }\n}\n@-webkit-keyframes inProgressBar {\n 0% {\n left: 0%;\n }\n 100% {\n left: -200%;\n }\n}\n@-moz-keyframes inProgressBar {\n 0% {\n left: 0%;\n }\n 100% {\n left: 200%;\n }\n}\n@keyframes inProgressBar {\n 0% {\n left: 0%;\n }\n 100% {\n left: -200%;\n }\n}\n.progress-bar {\n display: block;\n transition: all 200ms;\n width: var(--top-bar-progress);\n border-radius: calc(var(--mer-spacing--xxs) / 2);\n height: 100%;\n}\n\n:host([no-border]) .top-state-bar__outer-wrapper {\n border: 0;\n}","import { Host, h } from \"@stencil/core\";\nexport class GxgTopStateBar {\n constructor() {\n this.topStateBarVisible = false;\n this.visible = false;\n this.caption = undefined;\n this.minimal = false;\n this.active = false;\n this.stateType = \"in-progress\";\n this.progress = undefined;\n this.withClose = undefined;\n this.autoClose = false;\n this.noBorder = false;\n this.closedCallback = () => { };\n }\n // 1.OWN PROPERTIES //\n // 2. REFERENCE TO ELEMENTS //\n el;\n watchActiveHandler(active) {\n if (active) {\n this.visible = true;\n setTimeout(() => {\n this.topStateBarVisible = true;\n }, 300);\n }\n else {\n this.topStateBarVisible = false;\n setTimeout(() => {\n this.visible = false;\n }, 300);\n }\n }\n watchStateTypeHandler() {\n this.evaluateWithAction();\n }\n watchProgressHandler(progress) {\n if (progress => 0 && progress <= 100) {\n this.el.style.setProperty(\"--top-bar-progress\", `${progress}%`);\n }\n if (progress === 100 && this.autoClose) {\n setTimeout(() => {\n this.active = false;\n }, 200);\n }\n }\n // 5.EVENTS (EMIT) //\n // 6.COMPONENT LIFECYCLE EVENTS //\n componentWillLoad() {\n this.evaluateWithAction();\n this.evaluateInitialProgress();\n if (this.active) {\n this.visible = true;\n this.topStateBarVisible = true;\n }\n }\n // 7.LISTENERS //\n // 8.PUBLIC METHODS API //\n // 9.LOCAL METHODS //\n evaluateInitialProgress = () => {\n if (this.progress === undefined &&\n (this.stateType === \"error\" ||\n this.stateType === \"warning\" ||\n this.stateType === \"success\")) {\n this.progress = 100;\n }\n else if (this.progress === undefined &&\n this.stateType === \"in-progress\") {\n this.progress = 0;\n }\n this.el.style.setProperty(\"--top-bar-progress\", `${this.progress}%`);\n };\n evaluateWithAction = () => {\n if (this.withClose === undefined &&\n (this.stateType === \"error\" ||\n this.stateType === \"warning\" ||\n this.stateType === \"success\")) {\n this.withClose = true;\n }\n };\n closeButtonHandler = () => {\n this.active = false;\n };\n closeKeyDownHandler = (e) => {\n if (e.key === \"Enter\") {\n this.active = false;\n }\n };\n closeClickHandler = () => {\n this.closeButtonHandler();\n this.closedCallback();\n };\n // 10.RENDER() FUNCTION //\n render() {\n return (h(Host, { class: { visible: this.visible }, \"aria-hidden\": !this.active }, h(\"div\", { role: \"status\", \"aria-labelledby\": \"label\", \"aria-hidden\": !this.active, class: {\n \"top-state-bar\": true,\n [`top-state-bar--${this.stateType}`]: true,\n \"top-state-bar--with-close\": this.withClose,\n \"top-state-bar--visible\": this.topStateBarVisible\n } }, h(\"div\", { class: \"top-state-bar__outer-wrapper\" }, !this.minimal ? (h(\"div\", { class: \"top-state-bar__inner-wrapper\" }, h(\"label\", { id: \"label\", class: {\n \"top-state-bar__caption\": true\n }, part: \"label\" }, this.caption), this.withClose && !this.minimal ? (h(\"gxg-icon\", { class: {\n \"top-state-bar__close\": true\n }, onClick: this.closeClickHandler, onKeyDown: this.closeKeyDownHandler, role: \"button\", \"aria-label\": \"close\", type: \"gemini-tools/close\", color: \"mercury-on-surface\", tabIndex: this.visible ? 0 : -1, size: \"small\" })) : null)) : null, h(\"div\", { class: {\n \"top-state-bar__progress-wrapper\": true\n }, part: \"progress-wrapper\" }, h(\"span\", { class: \"progress-bar\" }))))));\n }\n static get is() { return \"gxg-top-state-bar\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"gxg-top-state-bar.scss\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"gxg-top-state-bar.css\"]\n };\n }\n static get properties() {\n return {\n \"caption\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The top-bar title\"\n },\n \"attribute\": \"caption\",\n \"reflect\": false\n },\n \"minimal\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"It will only display the bar (no title, no close button)\"\n },\n \"attribute\": \"minimal\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"active\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The top-bar active state. If false it will be hidden\"\n },\n \"attribute\": \"active\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"stateType\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"topStateBarType\",\n \"resolved\": \"\\\"accent\\\" | \\\"error\\\" | \\\"in-progress\\\" | \\\"success\\\" | \\\"warning\\\"\",\n \"references\": {\n \"topStateBarType\": {\n \"location\": \"local\",\n \"path\": \"/home/circleci/repo/src/components/top-state-bar/gxg-top-state-bar.tsx\",\n \"id\": \"src/components/top-state-bar/gxg-top-state-bar.tsx::topStateBarType\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The top-bar title\"\n },\n \"attribute\": \"state-type\",\n \"reflect\": true,\n \"defaultValue\": \"\\\"in-progress\\\"\"\n },\n \"progress\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The progress bar progress\"\n },\n \"attribute\": \"progress\",\n \"reflect\": false,\n \"defaultValue\": \"undefined\"\n },\n \"withClose\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"It will display a close action button\"\n },\n \"attribute\": \"with-close\",\n \"reflect\": false,\n \"defaultValue\": \"undefined\"\n },\n \"autoClose\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"It true, it will auto-close when the progress is 100\"\n },\n \"attribute\": \"auto-close\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"noBorder\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"It removes the border (actually is box shadow)\"\n },\n \"attribute\": \"no-border\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"closedCallback\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"() => void\",\n \"resolved\": \"() => void\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"A callback that gets called when the top-state-bar is closed\"\n },\n \"defaultValue\": \"() => {}\"\n }\n };\n }\n static get states() {\n return {\n \"topStateBarVisible\": {},\n \"visible\": {}\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"active\",\n \"methodName\": \"watchActiveHandler\"\n }, {\n \"propName\": \"stateType\",\n \"methodName\": \"watchStateTypeHandler\"\n }, {\n \"propName\": \"progress\",\n \"methodName\": \"watchProgressHandler\"\n }];\n }\n}\n//# sourceMappingURL=gxg-top-state-bar.js.map\n"],"mappings":";;AAAA,MAAMA,IAAsB;;MCCfC,IAAmB;EAC5B,WAAAC,CAAAC;;;;IAmBAC,KAAAC,oBAAqBC;MACjB,MAAMC,IAAUD,EAAME,OAAOD;MAC7B,IAAIA,MAAY,cAAc;;QAE1B;aAEC;QACD,MAAME,IAAgBH,EAAME;QAC5B,IAAIC,EAAcC,YAAYD,EAAcE,UAAU;;UAElD;;QAEJ,MAAMC,IAA2BR,KAAKS,GAAGC;QACzCC,MAAMC,KAAKJ,GAA0BK,SAAQ,SAAUC;UACnD,IAAIA,EAAOP,UAAU;YACjBO,EAAOP,WAAW;;;QAG1BF,EAAcE,WAAW;QACz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,KAAKqD,UAAW1B,EAAE,OAAO;MAAEE,OAAO;OAAkCF,EAAE,SAAS;MAAEV,IAAI;MAASY,OAAO;QAC3J,0BAA0B;;MAC3BiC,MAAM;OAAW9D,KAAKoD,UAAUpD,KAAK0C,cAAc1C,KAAKqD,UAAW1B,EAAE,YAAY;MAAEE,OAAO;QACzF,wBAAwB;;MACzBI,SAASjC,KAAKgD;MAAmBe,WAAW/D,KAAK6C;MAAqBgB,MAAM;MAAU,cAAc;MAASG,MAAM;MAAsBC,OAAO;MAAsBC,UAAUlE,KAAKmD,UAAU,KAAK;MAAGgB,MAAM;SAAc,QAAS,MAAMxC,EAAE,OAAO;MAAEE,OAAO;QAC3P,mCAAmC;;MACpCiC,MAAM;OAAsBnC,EAAE,QAAQ;MAAEE,OAAO"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["KB_OBJECT","KB_CATEGORY","convertImportItemToTreeItem","importCatIcon","importItems","importTreeItems","forEach","importItem","push","id","caption","name","startImgSrc","expanded","leaf","class","metadata","convertImportCategoryToTreeView","importCategoryData","treeData","importCat","importCategoryTreeItem","items","length","icon","createImportResultDataMessages","importItemId","messagesArray","messages","message","i","updateImportStatusTree","importItemResultFullData","importTreeActualState","objectCategoryIndex","findIndex","objectCategoryItem","categoryId","importTreeItem","categoryName","categoryIcon","status","importItemIndex","_a","createImportResultFullData","importItemResultData","importCategoryFullData","Object","assign","undefined","importCategoryDataFor","categoryNode","j","addImportItemResultDataItem","updatedImportStatusTree","kbManagerImportCss","GxIdeKbManagerImport","this","renderedFirstTime","objectsInFileTotalNodes","selectedObjectsInFileIds","evaluateImportStatusMessage","someStatusVisible","statusInfo","error","display","warning","success","evaluateObjects","noObjects","objectsTreeState","evaluateImport","noImport","importTreeState","selectFileAndLoadHandler","fileInputEl","openFile","loadFileHandler","async","loadCallback","selectedFile","importCategoryTreeData","fileSelectedHandler","fileEvent","detail","importObjectsHandler","importCallback","clearStatusHandler","importingIsInProcess","objectsButtonsGroup","selectedButtonId","checkedObjectsIds","then","objectsTreeCheckedItemsChangedHandler","event","toggleObjectsCheckboxEl","checked","indeterminate","allItemsWithCheckbox","values","firstItemCheckedValue","item","allItemsHaveTheSameCheckedValue","every","treeItem","checkedItems","filter","node","checkedObjects","objectChecked","objectsTreeSelectedItemsChangedHandler","map","objectsTreeContextMenuHandler","objectContextMenuCallback","selection","clientX","contextmenuEvent","screenX","clientY","screenY","cancelImportHandler","cancelCallback","result","topStateBarEl","active","optionsHandler","optionsCallback","number","toggleSelectionClickHandler","e","target","objectsTreeEl","updateAllItemsProperties","statusButtonsSelectionChangedHandler","activeStates","errorIndex","state","itemId","warningIndex","successIndex","evaluateCheckAllValue","allAreChecked","conditionToUncheck","fileClearedHandler","watchObjectsTreeStateHandler","newState","countTreeItems","watchImportTreeStateHandler","importStatusMessage","_componentLocale","main","importStatus","noImportedFiles","importedButHidden","watchImportingIsInProcessHandler","isImporting","topStateBar","watchSelectedFileHandler","file","size","componentWillLoad","Locale","getComponentStrings","el","componentDidLoadEvent","emit","componentDidLoad","focus","componentDidRender","componentDidRenderFirstTime","componentName","addResultItem","render","h","Host","noContentPadding","noFooterPadding","containerTitle","displayTitle","slot","type","label","header","fileNameLabel","placeholder","fileNamePlaceholder","part","acceptFile","clearButton","iconPosition","onFileSelected","onClearButtonClicked","ref","onClick","disabled","selectFileButton","loader","title","objectsInFile","noBorderFooter","slimmerFooter","inactiveTitle","titleType","treeModel","dragDisabled","dropDisabled","toggleCheckboxes","checkbox","onCheckedItemsChange","onSelectedItemsChange","onItemContextmenu","textAlign","config","gxgMessage","common","padding","maxWidth","selectFile","selectUnselect","onChange","reduced","selected","importButton","cancelButton","optionsButton","errors","warnings","successes","hideMessage","compact","noBorderTop","noBorderBottom","noBorderStart","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 { TreeViewItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/renders/tree-view/types\";\n\n/* Kb Manager Import Types*/\nimport { ImportItemData } from \"./kb-manager-import\";\nimport { ImportCategoryData, ImportItemResultData } from \"../../common/types\";\n/* objects in file metadata*/\nexport const KB_OBJECT = \"object\";\nexport const KB_CATEGORY = \"category\";\n\nconst convertImportItemToTreeItem = (\n importCatIcon: string,\n importItems: ImportItemData[]\n) => {\n const importTreeItems: TreeViewItemModel[] = [];\n importItems.forEach(importItem => {\n importTreeItems.push({\n id: importItem.id,\n caption: importItem.name,\n startImgSrc: importCatIcon,\n expanded: true,\n leaf: true,\n class: \"object tree-view-item\",\n metadata: KB_OBJECT\n });\n });\n return importTreeItems;\n};\n\n/**\n * @description This function converts ReferenceData[] data to TreeItemData[]\n */\nexport const convertImportCategoryToTreeView = (\n importCategoryData: ImportCategoryData[]\n): TreeViewItemModel[] => {\n const treeData: TreeViewItemModel[] = [];\n if (!importCategoryData) {\n return treeData;\n }\n importCategoryData.forEach(importCat => {\n const importCategoryTreeItem: TreeViewItemModel = {\n id: importCat.id,\n // caption: importCat.name,\n caption: `${importCat.name} (${importCat.items.length})`,\n startImgSrc: importCat.icon,\n expanded: true,\n leaf: false,\n class: \"category tree-view-item\",\n metadata: KB_CATEGORY,\n items: convertImportItemToTreeItem(importCat.icon, importCat.items)\n };\n treeData.push(importCategoryTreeItem);\n });\n return treeData;\n};\n\nconst createImportResultDataMessages = (\n importItemId: string,\n messagesArray: string[]\n): TreeViewItemModel[] => {\n const messages: TreeViewItemModel[] = [];\n messagesArray.forEach((message, i) => {\n messages.push({\n id: `${importItemId}-message-${i}}]`,\n caption: message,\n startImgSrc: \"gx-test/test-results\",\n leaf: true\n });\n });\n return messages;\n};\n\nconst updateImportStatusTree = (\n importItemResultFullData: ImportItemResultFullData,\n importTreeActualState: TreeViewItemModel[]\n): TreeViewItemModel[] => {\n const objectCategoryIndex = importTreeActualState.findIndex(\n objectCategoryItem => {\n return objectCategoryItem.id === importItemResultFullData.categoryId;\n }\n );\n if (objectCategoryIndex === -1) {\n // object category node does not exists. We have to create it, and insert the import result tree node inside.\n const importTreeItem: TreeViewItemModel = {\n id: importItemResultFullData.categoryId,\n // the count is (1), because this is the first item for this category\n caption: `${importItemResultFullData.categoryName} (1)`,\n startImgSrc: importItemResultFullData.categoryIcon,\n class: `tree-view-item`,\n expanded: true,\n items: [\n {\n id: importItemResultFullData.id,\n caption: importItemResultFullData.name,\n items: createImportResultDataMessages(\n importItemResultFullData.id,\n importItemResultFullData.messages\n ),\n class: `tree-view-item tree-view-item--${importItemResultFullData.status}`,\n expanded: true,\n leaf: importItemResultFullData.messages.length === 0\n }\n ]\n };\n importTreeActualState.push(importTreeItem);\n } else {\n // Object category node already exists. Just create the import result node, and insert into the parent category node (if it doesn't exists already).\n\n // first search for the importItemResult node...\n const importItemIndex = importTreeActualState[\n objectCategoryIndex\n ].items?.findIndex(importItem => {\n return importItem.id === importItemResultFullData.id;\n });\n\n if (importItemIndex === -1) {\n // ImportItem does not exists already\n const importTreeItem: TreeViewItemModel = {\n id: importItemResultFullData.id,\n caption: importItemResultFullData.name,\n expanded: true,\n items: createImportResultDataMessages(\n importItemResultFullData.id,\n importItemResultFullData.messages\n ),\n class: `tree-view-item tree-view-item--${importItemResultFullData.status}`\n };\n // Insert the import node into the category node\n importTreeActualState[objectCategoryIndex].items.push(importTreeItem);\n // Then, update the category node caption (the name is the same, but the (count) should be the actual items.length, because we have just added a new child import node. )\n importTreeActualState[\n objectCategoryIndex\n ].caption = `${importItemResultFullData.categoryName} (${importTreeActualState[objectCategoryIndex].items.length})`;\n }\n }\n return importTreeActualState;\n};\n\n/**\n * This function takes an ImportItemResultData item, and updates it to a ImportCategoryFullData, which has the same information, plus the category parent needed information, that will be used for creating the \"virtual\" parent category node on the \"Import Status\" section.\n */\nconst createImportResultFullData = (\n importItemResultData: ImportItemResultData,\n importCategoryData: ImportCategoryData[]\n): ImportItemResultFullData => {\n const importCategoryFullData: ImportItemResultFullData = {\n categoryId: undefined,\n categoryName: undefined,\n categoryIcon: undefined,\n ...importItemResultData\n };\n importCategoryDataFor: for (let i = 0; i < importCategoryData.length; i++) {\n const categoryNode = importCategoryData[i];\n for (let j = 0; j < categoryNode.items.length; j++) {\n if (categoryNode.items[j].id === importItemResultData.id) {\n importCategoryFullData.categoryId = categoryNode.id;\n importCategoryFullData.categoryName = categoryNode.name;\n importCategoryFullData.categoryIcon = categoryNode.icon;\n break importCategoryDataFor;\n }\n }\n }\n return importCategoryFullData;\n};\n\n/**\n * @description This function adds an ImportItemResultData item to the \"importTreeState\", and returns the updated tree with the new item added.\n */\nexport const addImportItemResultDataItem = (\n importItemResultData: ImportItemResultData,\n importCategoryData: ImportCategoryData[],\n importTreeActualState: TreeViewItemModel[]\n): TreeViewItemModel[] => {\n let updatedImportStatusTree: TreeViewItemModel[] = [...importTreeActualState];\n // first, update importItemResultData with the category data. It will be needed later.\n const importItemResultFullData: ImportItemResultFullData =\n createImportResultFullData(importItemResultData, importCategoryData);\n updatedImportStatusTree = updateImportStatusTree(\n importItemResultFullData,\n updatedImportStatusTree\n );\n return updatedImportStatusTree;\n};\n\ntype ImportItemResultFullData = ImportItemResultData & {\n categoryId: string;\n categoryName: string;\n categoryIcon: string;\n};\n","@import \"../../global/gx-ide-common.scss\";\n@import \"../../global/gx-ide-mixins.scss\";\n\n:host {\n display: block;\n}\n/*Header*/\n.header {\n display: flex;\n flex-direction: row;\n gap: var(--gx-ide-grid-column-gap);\n\n .select-file {\n flex: 1;\n }\n}\n/*Main*/\n.main {\n //min-height: 250px;\n height: 100%;\n overflow: auto;\n .container-wrapper {\n height: 100%;\n display: grid;\n grid-template-rows: auto 1fr;\n grid-template-columns: 1fr 1fr;\n grid-template-areas:\n \"top-state-bar top-state-bar\"\n \"left-container right-container\";\n\n .top-state-bar {\n grid-area: top-state-bar;\n }\n .left-container {\n grid-area: left-container;\n border-right: 1px solid var(--gx-ide-container-border-color);\n }\n .right-container {\n grid-area: right-container;\n }\n\n @include gx-ide-message(\"short\");\n\n .tree-container {\n &--empty {\n align-items: center;\n justify-content: center;\n }\n\n &--import-status {\n .tree-view-item {\n &--success {\n @include tree-item-status(\"success\");\n }\n &--warning {\n @include tree-item-status(\"warning\");\n }\n &--error {\n @include tree-item-status(\"error\");\n }\n }\n }\n /*import status display/hide status (warning, error, success)*/\n &--no-warnings {\n .tree-view-item--warning {\n display: none;\n }\n }\n &--no-errors {\n .tree-view-item--error {\n display: none;\n }\n }\n &--no-successes {\n .tree-view-item--success {\n display: none;\n }\n }\n }\n }\n}\n.ghost-element {\n display: block;\n width: 0;\n height: 24px; /*this is the taller element on the \"objects in file container footer (which is the button group, at the time of writing)\"*/\n}\n","/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Event,\n Element,\n State,\n EventEmitter,\n Watch,\n Method\n} from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\nimport { TreeViewItemContextMenu } from \"@genexus/chameleon-controls-library/dist/types/components/tree-view/tree-view/types\";\nimport { TreeViewItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/renders/tree-view/types\";\nimport { TreeViewItemModelExtended } from \"@genexus/chameleon-controls-library/dist/types/components/renders/tree-view/types\";\n\nimport {\n TextAlign,\n TextPadding,\n TextType\n} from \"@genexus/gemini/dist/types/components/text/text\";\n/* CUSTOM IMPORTS */\nimport { Locale } from \"../../common/locale\";\nimport { config } from \"../../common/config\";\nimport {\n ImportCategoryData,\n ImportItemResultData,\n ContextMenuInfo\n} from \"../../common/types\";\nimport {\n convertImportCategoryToTreeView,\n addImportItemResultDataItem\n} from \"./helpers\";\n// import { CheckboxInfo } from \"@genexus/gemini/dist/types/components/form-checkbox/form-checkbox\";\nimport { countTreeItems } from \"../../common/helpers\";\nimport { CheckedItemsInfo } from \"../_helpers/list-selector/list-selector\";\n\nimport { KB_OBJECT } from \"./helpers\";\nimport { CheckboxInfo } from \"@genexus/gemini\";\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 /*\nINDEX:\n1.OWN PROPERTIES\n2.REFERENCE TO ELEMENTS\n3.STATE() VARIABLES\n4.PUBLIC PROPERTY API | WATCH'S\n5.EVENTS (EMIT)\n6.COMPONENT LIFECYCLE EVENTS\n7.LISTENERS\n8.PUBLIC METHODS API\n9.LOCAL METHODS\n10.RENDER() FUNCTION\n*/\n\n // 1.OWN PROPERTIES //\n\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n private renderedFirstTime = false;\n /* ImportCategoryBasicData Holds the original name of category data, and its id. Used to create parent nodes on the imported tree*/\n private importCategoryData: ImportCategoryData[] = [];\n private objectsInFileTotalNodes = 0;\n private selectedObjectsInFileIds: string[] = [];\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeKbManagerImportElement;\n\n private objectsTreeEl!: HTMLGxgTreeViewElement;\n private fileInputEl!: HTMLGxgFormTextElement;\n private objectsButtonsGroup!: HTMLGxgButtonsContainerElement;\n private toggleObjectsCheckboxEl: HTMLGxgFormCheckboxElement;\n private topStateBarEl!: HTMLGxgTopStateBarElement;\n\n // 3.STATE() VARIABLES //\n\n @State() checkedObjectsIds: string[] = [];\n @State() noObjects: boolean;\n @State() showHiddenImportsMessage = false;\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 @State() objectsTreeState: TreeViewItemModel[] = [];\n @Watch(\"objectsTreeState\")\n watchObjectsTreeStateHandler(newState: TreeViewItemModel[]) {\n this.noObjects = !!(newState.length === 0 || !newState);\n this.objectsInFileTotalNodes = countTreeItems(newState);\n }\n\n // import status\n @State() importStatusMessage: string;\n @State() someStatusVisible: boolean;\n @State() noImport: boolean;\n @State() importTreeState: TreeViewItemModel[] = [];\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\n @State() importingIsInProcess = false;\n @Watch(\"importingIsInProcess\")\n watchImportingIsInProcessHandler(isImporting: boolean) {\n if (isImporting && this.topStateBar) {\n this.topStateBarEl.active = true;\n } else if (!isImporting && this.topStateBar) {\n this.topStateBarEl.active = false;\n }\n }\n\n // 4.PUBLIC PROPERTY API //\n\n /**\n * If true it displays the component title on the header\n */\n @Prop() readonly displayTitle = false;\n\n /**\n * If true, it will display a loader when needed.\n */\n @Prop() readonly topStateBar = true;\n\n /**\n * The name of the imported xml or xps file\n */\n @Prop({ mutable: true }) selectedFile: File;\n @Watch(\"selectedFile\")\n watchSelectedFileHandler(file: File) {\n if (file && file.name && file.size > 0) {\n this.loadFileHandler();\n }\n }\n\n /**\n * Callback invoked when the user wants to access the export options.\n */\n @Prop() readonly optionsCallback: OptionsCallback;\n\n /**\n *Callback invoked when the user wants to initiate the import process.\n */\n @Prop() readonly importCallback: ImportCallback;\n\n /**\n *Callback invoked when the user wants to load the xpz information\n */\n @Prop() readonly loadCallback: LoadCallback;\n\n /**\n * Callback invoked when the user wants to cancel the export process.\n * @returns It returns a boolean indicating whether the process could be canceled or not.\n */\n @Prop() readonly cancelCallback: CancelCallback;\n\n /**\n * It displays the status buttons (errors, warning, succeeded) with the minimal ui (no captions)\n */\n @Prop() readonly statusMinimal = false;\n\n /**\n * It displays the status buttons (errors, warning, succeeded) with the minimal ui (no captions)\n */\n @Prop() readonly objectContextMenuCallback: ObjectContextMenuCallback;\n\n // 5.EVENTS (EMIT) //\n\n /**\n * This event is emitted once just after the component is fully loaded and the first render() occurs\n */\n @Event() componentDidRenderFirstTime: EventEmitter<boolean>;\n\n /**\n * This event is emitted once just after the component is fully loaded and the first render() occurs.\n */\n @Event() componentDidLoadEvent: EventEmitter<boolean>;\n\n // 6.COMPONENT LIFECYCLE EVENTS //\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 componentDidLoad() {\n this.fileInputEl.focus();\n }\n\n componentDidRender() {\n if (!this.renderedFirstTime) {\n this.componentDidRenderFirstTime.emit(\n this._componentLocale.componentName\n );\n this.renderedFirstTime = true;\n }\n }\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\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.importCategoryData,\n this.importTreeState\n );\n this.statusInfo[item.status].number++;\n }\n\n // 9.LOCAL METHODS //\n\n private evaluateImportStatusMessage = () => {\n this.someStatusVisible =\n this.statusInfo.error.display ||\n this.statusInfo.warning.display ||\n this.statusInfo.success.display;\n };\n\n private evaluateObjects = () => {\n this.noObjects = !!(\n this.objectsTreeState?.length === 0 || !this.objectsTreeState\n );\n };\n\n private evaluateImport = () => {\n this.noImport = !!(\n this.importTreeState?.length === 0 || !this.importTreeState\n );\n };\n\n private selectFileAndLoadHandler = () => {\n this.fileInputEl.openFile();\n };\n\n private loadFileHandler = async () => {\n if (this.loadCallback && this.selectedFile) {\n this.importCategoryData = await this.loadCallback(this.selectedFile);\n const importCategoryTreeData = convertImportCategoryToTreeView(\n this.importCategoryData\n );\n this.objectsTreeState = importCategoryTreeData;\n if (this.importCategoryData.length > 0) {\n // clear input\n this.selectedFile = null;\n }\n }\n };\n\n private fileSelectedHandler = (fileEvent: CustomEvent<FileList>) => {\n this.selectedFile = fileEvent.detail[0];\n };\n\n private importObjectsHandler = async () => {\n if (this.importCallback) {\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 this.objectsButtonsGroup.selectedButtonId = \"cancel-import-btn\";\n this.importCallback(this.checkedObjectsIds).then(() => {\n this.importingIsInProcess = false;\n });\n }\n };\n\n private objectsTreeCheckedItemsChangedHandler = (\n event: CustomEvent<Map<string, TreeViewItemModelExtended>>\n ) => {\n /* 1. Begin of evaluate 'select/unselect checkbox' state*/\n if (event.detail == null) {\n this.toggleObjectsCheckboxEl.checked = false;\n this.toggleObjectsCheckboxEl.indeterminate = false;\n return;\n }\n\n const allItemsWithCheckbox = [...event.detail.values()];\n\n if (allItemsWithCheckbox.length === 0) {\n this.toggleObjectsCheckboxEl.checked = false;\n this.toggleObjectsCheckboxEl.indeterminate = false;\n return;\n }\n\n const firstItemCheckedValue = allItemsWithCheckbox[0].item.checked;\n\n const allItemsHaveTheSameCheckedValue = allItemsWithCheckbox.every(\n treeItem => treeItem.item.checked === firstItemCheckedValue\n );\n\n this.toggleObjectsCheckboxEl.checked = firstItemCheckedValue;\n this.toggleObjectsCheckboxEl.indeterminate =\n !allItemsHaveTheSameCheckedValue;\n /* /End of evaluate 'select/unselect checkbox' state*/\n\n /* 2. Begin of checked items evaluation*/\n const checkedItems = allItemsWithCheckbox.filter(node => node.item.checked);\n // objects checked\n const checkedObjects = checkedItems.filter(\n node => node.item.metadata === KB_OBJECT\n );\n\n const checkedObjectsIds: string[] = [];\n if (checkedObjects.length > 0) {\n checkedObjects.forEach(objectChecked => {\n checkedObjectsIds.push(objectChecked.item.id);\n });\n }\n /* /End of checked items evaluation*/\n\n /* 3. Begin of caption update*/\n /* TO DO (when we can differentiate the caption from the number of children)*/\n // const categoryItems = allItemsWithCheckbox.filter(\n // node => node.item.metadata === KB_CATEGORY\n // );\n // categoryItems.forEach(category => {\n // const itemInfo = category.item;\n // // Update the amount of checked values\n // if (itemInfo.leaf !== true) {\n // const totalItems = itemInfo.items.length;\n\n // const totalItemsChecked = itemInfo.items.filter(\n // itemUIModel => itemUIModel.checked\n // ).length;\n\n // const newItemCaption =\n // totalItems !== totalItemsChecked\n // ? `${itemInfo.caption} (${totalItemsChecked}/${totalItems})`\n // : `${itemInfo.caption} (${totalItems})`;\n\n // // Only update the item caption if needed\n // if (newItemCaption !== itemInfo.caption) {\n // this.objectsTreeEl.updateItemsProperties([itemInfo.id], {\n // id: itemInfo.id,\n // caption: newItemCaption\n // });\n // }\n // }\n // });\n\n /* /End of caption update*/\n this.checkedObjectsIds = checkedObjectsIds;\n };\n\n private objectsTreeSelectedItemsChangedHandler = (\n event: CustomEvent<TreeViewItemModelExtended[]>\n ) => {\n this.selectedObjectsInFileIds = event.detail.map(item => item.item.id);\n };\n\n private objectsTreeContextMenuHandler = (\n event: CustomEvent<TreeViewItemContextMenu>\n ) => {\n if (this.objectContextMenuCallback && 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 private cancelImportHandler = () => {\n if (this.cancelCallback) {\n this.cancelCallback().then(result => {\n if (result) {\n this.topStateBarEl.active = false;\n }\n });\n // returns boolean\n }\n };\n\n private optionsHandler = () => {\n if (this.optionsCallback) {\n this.optionsCallback();\n // returns boolean\n }\n };\n\n private 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 private toggleSelectionClickHandler = (e: CustomEvent<CheckboxInfo>) => {\n const checked = (e.target as HTMLGxgFormCheckboxElement).checked;\n this.toggleObjectsCheckboxEl.indeterminate = false;\n this.objectsTreeEl.updateAllItemsProperties({ checked: checked });\n };\n\n private statusButtonsSelectionChangedHandler = (\n e: CustomEvent<CheckedItemsInfo>\n ) => {\n const activeStates = e.detail;\n const errorIndex = activeStates.findIndex(\n state => state.itemId === \"error\"\n );\n const warningIndex = activeStates.findIndex(\n state => state.itemId === \"warning\"\n );\n const successIndex = activeStates.findIndex(\n state => state.itemId === \"success\"\n );\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 this.evaluateImportStatusMessage();\n };\n\n private evaluateCheckAllValue = (): boolean => {\n let checked = true;\n const allAreChecked =\n this.objectsInFileTotalNodes === this.checkedObjectsIds.length;\n const conditionToUncheck =\n this.objectsTreeState.length === 0 || !allAreChecked;\n if (conditionToUncheck) {\n checked = false;\n }\n return checked;\n };\n\n private fileClearedHandler = () => {\n this.selectedFile = null;\n };\n\n // 10.RENDER() FUNCTION //\n\n render(): void {\n return (\n <Host class=\"gx-ide-component\">\n <div class=\"gx-ide-main-wrapper\">\n <gx-ide-container\n noContentPadding\n noFooterPadding\n containerTitle={\n this.displayTitle ? this._componentLocale.componentName : null\n }\n >\n {/* header */}\n <header class=\"header\" slot=\"header\">\n {/* select a file */}\n <gxg-form-text\n type=\"file\"\n class=\"select-file\"\n label={this._componentLocale.header.fileNameLabel}\n placeholder={this._componentLocale.header.fileNamePlaceholder}\n part=\"file-name\"\n acceptFile=\".xpz, .xml\"\n clearButton\n iconPosition=\"start\"\n onFileSelected={this.fileSelectedHandler}\n onClearButtonClicked={this.fileClearedHandler}\n ref={(el: HTMLGxgFormTextElement) =>\n (this.fileInputEl = el as HTMLGxgFormTextElement)\n }\n ></gxg-form-text>\n {/* select file button / load button*/}\n <gxg-button\n type=\"primary-text-icon\"\n icon=\"gemini-tools/file\"\n part=\"select-file-load-button\"\n onClick={this.selectFileAndLoadHandler}\n disabled={this.importingIsInProcess}\n >\n {this._componentLocale.header.selectFileButton}\n </gxg-button>\n </header>\n <main class=\"main\">\n {/* main */}\n {/* objects in file*/}\n <div class=\"container-wrapper\">\n {/* top state bar*/}\n {this.topStateBar ? (\n <gxg-top-state-bar\n class=\"top-state-bar\"\n part=\"top-state-bar\"\n caption={this._componentLocale.loader.title}\n ref={el =>\n (this.topStateBarEl = el as HTMLGxgTopStateBarElement)\n }\n ></gxg-top-state-bar>\n ) : null}\n <gx-ide-container\n containerTitle={\n this._componentLocale.main.objectsInFile.title\n }\n noContentPadding\n noBorderFooter\n class=\"left-container\"\n slimmerFooter\n inactiveTitle={this.noObjects}\n titleType=\"secondary\"\n >\n <div\n class={{\n \"tree-container\": true,\n \"tree-container--objects-in-file\": true,\n \"tree-container--empty\": this.noObjects\n }}\n >\n {!this.noObjects ? (\n <gxg-tree-view\n treeModel={this.objectsTreeState}\n dragDisabled={true}\n dropDisabled={true}\n toggleCheckboxes={true}\n checkbox={true}\n checked={true}\n onCheckedItemsChange={\n this.objectsTreeCheckedItemsChangedHandler\n }\n onSelectedItemsChange={\n this.objectsTreeSelectedItemsChangedHandler\n }\n onItemContextmenu={this.objectsTreeContextMenuHandler}\n ref={el =>\n (this.objectsTreeEl = el as HTMLGxgTreeViewElement)\n }\n ></gxg-tree-view>\n ) : (\n <div class=\"gx-ide-message\">\n <gxg-text\n textAlign={\n config.gxgMessage.common.textAlign as TextAlign\n }\n padding={\n config.gxgMessage.common.textAlign as TextPadding\n }\n type={config.gxgMessage.common.type as TextType}\n maxWidth={config.gxgMessage.common.maxWidth}\n part=\"objects-in-file-empty-status-message\"\n >\n {this._componentLocale.main.objectsInFile.noObjects}\n <gxg-text\n type=\"text-link-no-line\"\n onClick={this.selectFileAndLoadHandler}\n >\n {\n this._componentLocale.main.objectsInFile\n .selectFile\n }\n </gxg-text>\n </gxg-text>\n </div>\n )}\n </div>\n {/* select all / unselect all checkbox*/}\n <gxg-form-checkbox\n label={\n this._componentLocale.main.objectsInFile.selectUnselect\n }\n part=\"select-all-checkbox\"\n slot=\"footer-start\"\n disabled={\n this.importingIsInProcess ||\n this.objectsTreeState.length === 0\n }\n checked={this.evaluateCheckAllValue()}\n onChange={this.toggleSelectionClickHandler}\n ref={(el: HTMLGxgFormCheckboxElement) =>\n (this.toggleObjectsCheckboxEl =\n el as HTMLGxgFormCheckboxElement)\n }\n ></gxg-form-checkbox>\n {/* import button / cancel button*/}\n <gxg-buttons-container\n reduced\n slot=\"footer-end\"\n ref={(el: HTMLGxgButtonsContainerElement) =>\n (this.objectsButtonsGroup =\n el as HTMLGxgButtonsContainerElement)\n }\n >\n {/* import objects button*/}\n <gxg-button\n id=\"import-btn\"\n part=\"import-button\"\n disabled={\n this.objectsTreeState?.length === 0 ||\n this.importingIsInProcess\n }\n onClick={this.importObjectsHandler}\n selected\n >\n {this._componentLocale.main.objectsInFile.importButton}\n </gxg-button>\n\n {/* cancel-import button*/}\n <gxg-button\n id=\"cancel-import-btn\"\n part=\"cancel-import-button\"\n disabled={!this.importingIsInProcess}\n onClick={this.cancelImportHandler}\n >\n {this._componentLocale.main.objectsInFile.cancelButton}\n </gxg-button>\n </gxg-buttons-container>\n {/* settings/options button*/}\n <gxg-button\n type=\"secondary-icon-only\"\n icon=\"gemini-tools/settings\"\n slot=\"footer-end\"\n part=\"select-kb-btn\"\n onClick={this.optionsHandler}\n >\n {this._componentLocale.header.optionsButton}\n </gxg-button>\n </gx-ide-container>\n {/* import status */}\n <gx-ide-container\n class=\"right-container\"\n containerTitle={this._componentLocale.main.importStatus.title}\n noContentPadding\n noBorderFooter\n slimmerFooter\n inactiveTitle={this.noImport}\n titleType=\"secondary\"\n >\n <div\n class={{\n \"tree-container\": true,\n \"tree-container--import-status\": true,\n \"tree-container--empty\":\n this.noImport || !this.someStatusVisible,\n \"tree-container--no-warnings\":\n !this.statusInfo.warning.display,\n \"tree-container--no-errors\":\n !this.statusInfo.error.display,\n \"tree-container--no-succeeded\":\n !this.statusInfo.success.display\n }}\n >\n {!this.noImport && this.someStatusVisible ? (\n <gxg-tree-view\n treeModel={this.importTreeState}\n toggleCheckboxes={true}\n ></gxg-tree-view>\n ) : (\n <gxg-text\n textAlign={\n config.gxgMessage.common.textAlign as TextAlign\n }\n padding={\n config.gxgMessage.common.textAlign as TextPadding\n }\n type={config.gxgMessage.common.type as TextType}\n maxWidth={config.gxgMessage.common.maxWidth}\n part=\"objects-in-file-empty-status-message\"\n class=\"gx-ide-message\"\n >\n {this.importStatusMessage}\n </gxg-text>\n )}\n </div>\n {/* clear status button */}\n <gxg-button\n type=\"secondary-text-only\"\n slot=\"footer-end\"\n part=\"select-kb-btn\"\n onClick={this.clearStatusHandler}\n disabled={this.noImport || this.importingIsInProcess}\n >\n {this._componentLocale.main.importStatus.clearButton}\n </gxg-button>\n {/* ghost element (used to force the container footer heights the same as the \"objects in file\" container tree)*/}\n <span class=\"ghost-element\" slot=\"footer-start\"></span>\n </gx-ide-container>\n </div>\n </main>\n {/* footer */}\n <footer slot=\"footer-start\">\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 noBorderTop\n noBorderBottom\n noBorderStart\n minimal={this.statusMinimal}\n onSelectionChanged={this.statusButtonsSelectionChangedHandler}\n ></gx-ide-status-buttons>\n </footer>\n </gx-ide-container>\n </div>\n </Host>\n );\n }\n}\n\nexport type LoadCallback = (file: File) => Promise<ImportCategoryData[]>;\n\nexport type ImportCallback = (itemIds: string[]) => Promise<boolean>;\n\nexport type CancelCallback = () => Promise<boolean>;\n\nexport type OptionsCallback = () => Promise<void>;\nexport interface SelectedObject {\n itemId: string;\n subItemsIds: string[];\n}\n\nexport type ImportItemData = {\n id: string;\n name: 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 ObjectContextMenuCallback = (\n tree: ObjectsSourceType,\n contextMenuInfo: ContextMenuInfo\n) => Promise<void>;\n\nexport type ObjectsSourceType = \"in-file\" | \"imported\";\n"],"mappings":";;;;;;;;6BAOO,OAAMA,IAAY;;AAClB,MAAMC,IAAc;;AAE3B,MAAMC,8BAA8B,CAClCC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C,aAAa8C;MACxDtB,kBAAgB;MAChBwB,gBAAc;MACdC,eAAa;MACbC,eAAehJ,KAAKe;MACpBkI,WAAU;OAEV7B,EAAA;MACE9J,OAAO;QACL,kBAAkB;QAClB,iCAAiC;QACjC,yBACE0C,KAAKe,aAAaf,KAAKK;QACzB,gCACGL,KAAKM,WAAWG,QAAQD;QAC3B,8BACGR,KAAKM,WAAWC,MAAMC;QACzB,iCACGR,KAAKM,WAAWI,QAAQF;;QAG3BR,KAAKe,YAAYf,KAAKK,oBACtB+G,EAAA;MACE8B,WAAWlJ,KAAKgB;MAChBqI,kBAAkB;SAGpBjC,EAAA;MACEsC,WACEC,EAAOC,WAAWC,OAAOH;MAE3BI,SACEH,EAAOC,WAAWC,OAAOH;MAE3B/B,MAAMgC,EAAOC,WAAWC,OAAOlC;MAC/BoC,UAAUJ,EAAOC,WAAWC,OAAOE;MACnC9B,MAAK;MACL3K,OAAM;OAEL0C,KAAK2F,uBAKZyB,EAAA;MACEO,MAAK;MACLD,MAAK;MACLO,MAAK;MACLO,SAASxI,KAAK8B;MACd2G,UAAUzI,KAAKe,YAAYf,KAAK+B;OAE/B/B,KAAK4F,iBAAiBC,KAAKC,aAAaqC,cAG3Cf,EAAA;MAAM9J,OAAM;MAAgBoK,MAAK;WAKvCN,EAAA;MAAQM,MAAK;OACXN,EAAA;MACEoD,QAAQxK,KAAKM,WAAWC,MAAM+D;MAC9BmG,UAAUzK,KAAKM,WAAWG,QAAQ6D;MAClCoG,WAAW1K,KAAKM,WAAWI,QAAQ4D;MACnCqG,aAAW;MACXC,SAAO;MACPC,aAAW;MACXC,gBAAc;MACdC,eAAa;MACbC,SAAShL,KAAKiL;MACdC,oBAAoBlL,KAAK4E"}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { r as e, c as r, h as t, H as o, g as a } from "./p-48217969.js";
|
|
2
|
-
|
|
3
|
-
import { L as i } from "./p-74d59062.js";
|
|
4
|
-
|
|
5
|
-
const s = ":root{--ui-animaton-speed:0.2s}.gxg-title-01{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-01--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-02{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-02--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--color-on-primary)}.gxg-title-03{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-03--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-04{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-04--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-05{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-05--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable)}.gxg-text--negative{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text--gray{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--dimmed)}.gxg-quote{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);font-style:italic}.gxg-quote--negative{color:var(--ds-base-font-color--negative)}.gxg-link{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block}.gxg-link:hover{color:var(--ds-base-font-color--link-hover)}.gxg-link:active{color:var(--ds-base-font-color--link-active)}.gxg-link-gray{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed)}.gxg-link-gray:hover{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed);filter:brightness(1.4)}.gxg-alert-error{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--error);display:inline-block}.gxg-alert-warning{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--warning);display:inline-block}.gxg-alert-success{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--success);display:inline-block}.gxg-tab--disabled{color:var(--color-primary-disabled);pointer-events:none}.gxg-tab--disabled[disabled]{color:var(--color-primary-disabled);pointer-events:none}.gxg-label{font-family:var(--ds-base-font-family-primary);font-weight:var(--gxg-label-font-weight);font-size:var(--gxg-label-font-size);color:var(--gxg-label-color);text-align:center;line-height:1.455em;display:flex;align-items:center}.gxg-label:hover{color:var(--color-primary-hover)}.gxg-label:focus{color:var(--color-primary-active)}.gxg-label:active{color:var(--color-primary-active)}.gxg-label[disabled]{color:var(--color-primary-disabled)}.gxg-label--negative{color:var(--color-on-primary)}.gxg-label--negative[disabled]{color:var(--color-on-disabled)}.gxg-scrollbar{}.gxg-scrollbar::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gxg-scrollbar::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gxg-scrollbar::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.overflow-auto{overflow:auto}.justify-start{display:flex;justify-content:start}.justify-center{display:flex;justify-content:center}.justify-end{display:flex;justify-content:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--mer-color__neutral-gray--800)}ch-grid-column:first-child{padding-inline-start:var(--gx-ide-container__padding) !important}ch-grid-column:last-child{padding-inline-end:var(--gx-ide-container__padding) !important}ch-grid-cell{--mer-spacing--xs:var(--gx-ide-container__padding)}.layout{display:grid;gap:var(--mer-spacing--lg);box-sizing:border-box}.layout--two-cols{grid-template-columns:1fr 1fr}.layout--space-above{padding-block-start:var(--mer-spacing--lg)}gxg-tabs{box-shadow:none}:host(.gx-ide-component){height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--mer-font__weight--regular);font-size:var(--mer-font__size--xs);font-family:var(--mer-font-family--primary);height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1;box-sizing:border-box}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-main::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-main::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-main::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-overflow::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.tree-container{display:flex;height:100%;width:100%;box-sizing:border-box}:host{display:block}.module-servers-grid-local{gap:var(--spacing-comp-03);display:grid;grid-template-columns:auto 1fr auto}.module-servers-grid-local *:nth-child(3){align-self:end}.module-servers-grid-server{gap:var(--spacing-comp-03);display:grid;grid-template-columns:auto 1fr}.module-servers-grid-server *:nth-child(3){align-self:end}.module-servers-grid-column-1{gap:var(--spacing-comp-03);display:grid;grid-template-rows:repeat(3, 1fr)}.module-servers-grid-column-2{gap:var(--spacing-comp-03);display:grid;grid-template-rows:repeat(2, 1fr)}.grid-server-auth-column-1{gap:var(--spacing-comp-03);display:grid;grid-template-rows:repeat(2, 1fr)}.grid-server-auth-column-2{gap:var(--spacing-comp-03);display:grid;grid-template-rows:repeat(2, 1fr)}";
|
|
6
|
-
|
|
7
|
-
const l = class {
|
|
8
|
-
constructor(o) {
|
|
9
|
-
e(this, o);
|
|
10
|
-
this.componentDidRenderFirstTime = r(this, "componentDidRenderFirstTime", 7);
|
|
11
|
-
this.renderedFirstTime = false;
|
|
12
|
-
// 7.LISTENERS //
|
|
13
|
-
// 8.PUBLIC METHODS API //
|
|
14
|
-
// 9.LOCAL METHODS //
|
|
15
|
-
/**
|
|
16
|
-
* Executed when user click on confirm button
|
|
17
|
-
*/ this.confirmCallbackHandler = async () => {
|
|
18
|
-
if (this.confirmCallback) {
|
|
19
|
-
const e = this.types.find((({type: e}) => e === this.selectedType));
|
|
20
|
-
let r = {};
|
|
21
|
-
if (e.type === "remote") {
|
|
22
|
-
r = {
|
|
23
|
-
id: e.id,
|
|
24
|
-
name: this.nameEl.value,
|
|
25
|
-
type: this.serverTypeEl.value,
|
|
26
|
-
authenticated: e.authenticated,
|
|
27
|
-
source: this.sourceEl.value,
|
|
28
|
-
user: this.userEl.value,
|
|
29
|
-
password: this.passwordEl.value
|
|
30
|
-
};
|
|
31
|
-
} else {
|
|
32
|
-
r = {
|
|
33
|
-
id: e.id,
|
|
34
|
-
name: this.nameEl.value,
|
|
35
|
-
type: this.serverTypeEl.value,
|
|
36
|
-
authenticated: e.authenticated,
|
|
37
|
-
source: this.sourceEl.value
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
await this.confirmCallback(r);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Executed when user click on cancel button
|
|
45
|
-
*/ this.cancelCallbackHandler = async () => {
|
|
46
|
-
await this.cancelCallback();
|
|
47
|
-
};
|
|
48
|
-
this.selectSourceCallbackHandle = async () => {
|
|
49
|
-
const e = await this.selectSourceCallback();
|
|
50
|
-
if (e) {
|
|
51
|
-
this.sourceEl.value = e;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
// 10.LOCAL METHODS //
|
|
55
|
-
this.renderServerOptions = () => [ t("div", {
|
|
56
|
-
class: "grid-server-auth-column-1"
|
|
57
|
-
}, t("gxg-label", null, this._componentLocale.user), t("gxg-label", null, this._componentLocale.password)), t("div", {
|
|
58
|
-
class: "grid-server-auth-column-2"
|
|
59
|
-
}, t("gxg-form-text", {
|
|
60
|
-
placeholder: this._componentLocale.user,
|
|
61
|
-
ref: e => this.userEl = e,
|
|
62
|
-
part: "user"
|
|
63
|
-
}), t("gxg-form-text", {
|
|
64
|
-
password: true,
|
|
65
|
-
placeholder: this._componentLocale.password,
|
|
66
|
-
ref: e => this.passwordEl = e,
|
|
67
|
-
part: "password"
|
|
68
|
-
})) ];
|
|
69
|
-
this.selectedType = "local";
|
|
70
|
-
this.types = undefined;
|
|
71
|
-
this.name = undefined;
|
|
72
|
-
this.source = undefined;
|
|
73
|
-
this.confirmCallback = undefined;
|
|
74
|
-
this.selectSourceCallback = undefined;
|
|
75
|
-
this.cancelCallback = undefined;
|
|
76
|
-
}
|
|
77
|
-
// 6.COMPONENT LIFECYCLE EVENTS //
|
|
78
|
-
async componentWillLoad() {
|
|
79
|
-
this._componentLocale = await i.getComponentStrings(this.el);
|
|
80
|
-
}
|
|
81
|
-
componentDidRender() {
|
|
82
|
-
if (!this.renderedFirstTime) {
|
|
83
|
-
this.componentDidRenderFirstTime.emit(this._componentLocale.componentName);
|
|
84
|
-
this.renderedFirstTime = true;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
render() {
|
|
88
|
-
var e;
|
|
89
|
-
return t(o, {
|
|
90
|
-
class: "gx-ide-component"
|
|
91
|
-
}, t("div", {
|
|
92
|
-
class: "gx-ide-main-wrapper gx-ide-overflow"
|
|
93
|
-
}, t("gx-ide-container", {
|
|
94
|
-
slimmerFooter: true
|
|
95
|
-
}, t("div", {
|
|
96
|
-
class: this.selectedType === "local" ? "grid module-servers-grid-local" : "grid module-servers-grid-server"
|
|
97
|
-
}, t("div", {
|
|
98
|
-
class: "module-servers-grid-column-1"
|
|
99
|
-
}, t("gxg-label", null, " ", this._componentLocale.type), t("gxg-label", null, " ", this._componentLocale.name), t("gxg-label", null, " ", this._componentLocale.source)), t("div", {
|
|
100
|
-
class: "module-servers-grid-column-2"
|
|
101
|
-
}, t("gxg-combo-box", {
|
|
102
|
-
value: this.selectedType,
|
|
103
|
-
ref: e => this.serverTypeEl = e
|
|
104
|
-
}, (e = this.types) === null || e === void 0 ? void 0 : e.map((e => t("gxg-combo-box-item", {
|
|
105
|
-
value: e.type,
|
|
106
|
-
onItemSelected: e => this.selectedType = e.detail.value
|
|
107
|
-
}, e.type)))), t("gxg-form-text", {
|
|
108
|
-
placeholder: this._componentLocale.name,
|
|
109
|
-
ref: e => this.nameEl = e,
|
|
110
|
-
part: "name"
|
|
111
|
-
}), t("gxg-form-text", {
|
|
112
|
-
placeholder: this._componentLocale.source,
|
|
113
|
-
ref: e => this.sourceEl = e,
|
|
114
|
-
part: "source"
|
|
115
|
-
})), this.selectedType === "local" && t("gxg-button", {
|
|
116
|
-
onClick: this.selectSourceCallbackHandle
|
|
117
|
-
}, "..."), this.selectedType === "remote" && this.renderServerOptions()), t("gxg-button", {
|
|
118
|
-
slot: "footer-end",
|
|
119
|
-
type: "outlined",
|
|
120
|
-
onClick: this.cancelCallbackHandler
|
|
121
|
-
}, this._componentLocale.footer.btnCancel), t("gxg-button", {
|
|
122
|
-
slot: "footer-end",
|
|
123
|
-
type: "primary-text-only",
|
|
124
|
-
onClick: this.confirmCallbackHandler
|
|
125
|
-
}, this._componentLocale.footer.btnConfirm))));
|
|
126
|
-
}
|
|
127
|
-
static get assetsDirs() {
|
|
128
|
-
return [ "gx-ide-assets/add-module-servers" ];
|
|
129
|
-
}
|
|
130
|
-
get el() {
|
|
131
|
-
return a(this);
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
l.style = s;
|
|
136
|
-
|
|
137
|
-
export { l as gx_ide_add_module_servers };
|
|
138
|
-
//# sourceMappingURL=p-a46794f4.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["addModuleServersCss","GxIdeAddModuleServers","this","renderedFirstTime","confirmCallbackHandler","async","confirmCallback","selectedTypeId","types","find","type","selectedType","data","id","name","nameEl","value","serverTypeEl","authenticated","source","sourceEl","user","userEl","password","passwordEl","cancelCallbackHandler","cancelCallback","selectSourceCallbackHandle","path","selectSourceCallback","renderServerOptions","h","class","_componentLocale","placeholder","ref","el","part","componentWillLoad","Locale","getComponentStrings","componentDidRender","componentDidRenderFirstTime","emit","componentName","render","Host","slimmerFooter","_a","map","onItemSelected","item","detail","onClick","slot","footer","btnCancel","btnConfirm"],"sources":["src/components/modules/add-module-servers/add-module-servers.scss?tag=gx-ide-add-module-servers&encapsulation=shadow","src/components/modules/add-module-servers/add-module-servers.tsx"],"sourcesContent":["@import \"../../../global/gx-ide-common.scss\";\n@import \"../../../global/gx-ide-mixins.scss\";\n\n:host {\n display: block;\n}\n.module-servers-grid-local {\n gap: var(--spacing-comp-03);\n display: grid;\n grid-template-columns: auto 1fr auto;\n\n *:nth-child(3) {\n align-self: end;\n }\n}\n.module-servers-grid-server {\n gap: var(--spacing-comp-03);\n display: grid;\n grid-template-columns: auto 1fr;\n\n *:nth-child(3) {\n align-self: end;\n }\n}\n.module-servers-grid-column-1 {\n gap: var(--spacing-comp-03);\n display: grid;\n grid-template-rows: repeat(3, 1fr);\n}\n\n.module-servers-grid-column-2 {\n gap: var(--spacing-comp-03);\n display: grid;\n grid-template-rows: repeat(2, 1fr);\n}\n.grid-server-auth-column-1 {\n gap: var(--spacing-comp-03);\n display: grid;\n grid-template-rows: repeat(2, 1fr);\n}\n\n.grid-server-auth-column-2 {\n gap: var(--spacing-comp-03);\n display: grid;\n grid-template-rows: repeat(2, 1fr);\n}\n","/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n State,\n EventEmitter\n} from \"@stencil/core\";\n\n/* OTHER LIBRARIES IMPORTS */\n/* CUSTOM IMPORTS */\nimport { Locale } from \"../../../common/locale\";\nimport {\n ModuleServerType,\n ModuleServerFullData,\n EditServerModuleResult\n} from \"../types\";\n@Component({\n tag: \"gx-ide-add-module-servers\",\n styleUrl: \"add-module-servers.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/add-module-servers\"]\n})\nexport class GxIdeAddModuleServers {\n // 1.OWN PROPERTIES | WATCH'S //\n\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n private renderedFirstTime = false;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeAddModuleServersElement;\n private serverTypeEl: HTMLGxgComboBoxElement;\n private nameEl: HTMLGxgFormTextElement;\n private sourceEl: HTMLGxgFormTextElement;\n private userEl: HTMLGxgFormTextElement;\n private passwordEl: HTMLGxgFormTextElement;\n\n // 3.STATE() VARIABLES //\n\n @State() selectedType: \"local\" | \"remote\" = \"local\";\n\n // 4.PUBLIC PROPERTY API //\n\n /**\n * The type of the server\n */\n @Prop() readonly types: ModuleServerType[];\n\n /**\n * The name of the server\n */\n @Prop() readonly name: string;\n\n /**\n * Disk path or server url\n */\n @Prop() readonly source: string;\n\n /**\n * Confirm callback\n */\n @Prop() readonly confirmCallback: ConfirmCallback;\n\n /**\n * Callback invoked when wants to select a local folder that have modules inside\n */\n @Prop() readonly selectSourceCallback: SelectSourceCallback;\n\n /**\n * Cancel callback\n */\n @Prop() readonly cancelCallback: CancelCallback;\n\n // 5.EVENTS (EMIT) //\n\n /**\n * This event is emitted once just after the component is fully loaded and the first render() occurs\n */\n @Event() componentDidRenderFirstTime: EventEmitter<boolean>;\n\n // 6.COMPONENT LIFECYCLE EVENTS //\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n componentDidRender() {\n if (!this.renderedFirstTime) {\n this.componentDidRenderFirstTime.emit(\n this._componentLocale.componentName\n );\n this.renderedFirstTime = true;\n }\n }\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n /**\n * Executed when user click on confirm button\n */\n\n private confirmCallbackHandler = async () => {\n if (this.confirmCallback) {\n const selectedTypeId = this.types.find(\n ({ type }) => type === this.selectedType\n );\n let data = {} as ModuleServerFullData;\n if (selectedTypeId.type === \"remote\") {\n data = {\n id: selectedTypeId.id,\n name: this.nameEl.value,\n type: this.serverTypeEl.value,\n authenticated: selectedTypeId.authenticated,\n source: this.sourceEl.value,\n user: this.userEl.value,\n password: this.passwordEl.value\n };\n } else {\n data = {\n id: selectedTypeId.id,\n name: this.nameEl.value,\n type: this.serverTypeEl.value,\n authenticated: selectedTypeId.authenticated,\n source: this.sourceEl.value\n };\n }\n const result = await this.confirmCallback(data);\n if (result.success) {\n // display success message\n } else {\n // display error message\n }\n }\n };\n\n /**\n * Executed when user click on cancel button\n */\n private cancelCallbackHandler = async () => {\n await this.cancelCallback();\n };\n private selectSourceCallbackHandle = async () => {\n const path = await this.selectSourceCallback();\n\n if (path) {\n this.sourceEl.value = path;\n }\n };\n\n // 10.LOCAL METHODS //\n\n private renderServerOptions = (): Element[] => {\n return [\n <div class=\"grid-server-auth-column-1\">\n <gxg-label>{this._componentLocale.user}</gxg-label>\n <gxg-label>{this._componentLocale.password}</gxg-label>\n </div>,\n <div class=\"grid-server-auth-column-2\">\n <gxg-form-text\n placeholder={this._componentLocale.user}\n ref={(el: HTMLGxgFormTextElement) =>\n (this.userEl = el as HTMLGxgFormTextElement)\n }\n part=\"user\"\n ></gxg-form-text>\n <gxg-form-text\n password\n placeholder={this._componentLocale.password}\n ref={(el: HTMLGxgFormTextElement) =>\n (this.passwordEl = el as HTMLGxgFormTextElement)\n }\n part=\"password\"\n ></gxg-form-text>\n </div>\n ];\n };\n\n render() {\n return (\n <Host class=\"gx-ide-component\">\n <div class=\"gx-ide-main-wrapper gx-ide-overflow\">\n <gx-ide-container slimmerFooter>\n <div\n class={\n this.selectedType === \"local\"\n ? \"grid module-servers-grid-local\"\n : \"grid module-servers-grid-server\"\n }\n >\n <div class=\"module-servers-grid-column-1\">\n <gxg-label> {this._componentLocale.type}</gxg-label>\n <gxg-label> {this._componentLocale.name}</gxg-label>\n <gxg-label> {this._componentLocale.source}</gxg-label>\n </div>\n <div class=\"module-servers-grid-column-2\">\n <gxg-combo-box\n value={this.selectedType}\n ref={(el: HTMLGxgComboBoxElement) =>\n (this.serverTypeEl = el as HTMLGxgComboBoxElement)\n }\n >\n {this.types?.map(type => (\n <gxg-combo-box-item\n value={type.type}\n onItemSelected={item =>\n (this.selectedType = item.detail.value)\n }\n >\n {type.type}\n </gxg-combo-box-item>\n ))}\n </gxg-combo-box>\n <gxg-form-text\n placeholder={this._componentLocale.name}\n ref={(el: HTMLGxgFormTextElement) =>\n (this.nameEl = el as HTMLGxgFormTextElement)\n }\n part=\"name\"\n ></gxg-form-text>\n <gxg-form-text\n placeholder={this._componentLocale.source}\n ref={(el: HTMLGxgFormTextElement) =>\n (this.sourceEl = el as HTMLGxgFormTextElement)\n }\n part=\"source\"\n ></gxg-form-text>\n </div>\n {this.selectedType === \"local\" && (\n <gxg-button onClick={this.selectSourceCallbackHandle}>\n ...\n </gxg-button>\n )}\n {this.selectedType === \"remote\" && this.renderServerOptions()}\n </div>\n\n <gxg-button\n slot=\"footer-end\"\n type=\"outlined\"\n onClick={this.cancelCallbackHandler}\n >\n {this._componentLocale.footer.btnCancel}\n </gxg-button>\n <gxg-button\n slot=\"footer-end\"\n type=\"primary-text-only\"\n onClick={this.confirmCallbackHandler}\n >\n {this._componentLocale.footer.btnConfirm}\n </gxg-button>\n </gx-ide-container>\n </div>\n </Host>\n );\n }\n}\nexport type ConfirmCallback = (\n data: ModuleServerFullData\n) => Promise<EditServerModuleResult>;\nexport type CancelCallback = () => Promise<void>;\nexport type SelectSourceCallback = () => Promise<string | undefined>;\n"],"mappings":";;;;AAAA,MAAMA,IAAsB;;MC0BfC,IAAqB;;;;IAOxBC,KAAAC,oBAAoB;;;;;;eA+EpBD,KAAAE,yBAAyBC;MAC/B,IAAIH,KAAKI,iBAAiB;QACxB,MAAMC,IAAiBL,KAAKM,MAAMC,MAChC,EAAGC,aAAWA,MAASR,KAAKS;QAE9B,IAAIC,IAAO;QACX,IAAIL,EAAeG,SAAS,UAAU;UACpCE,IAAO;YACLC,IAAIN,EAAeM;YACnBC,MAAMZ,KAAKa,OAAOC;YAClBN,MAAMR,KAAKe,aAAaD;YACxBE,eAAeX,EAAeW;YAC9BC,QAAQjB,KAAKkB,SAASJ;YACtBK,MAAMnB,KAAKoB,OAAON;YAClBO,UAAUrB,KAAKsB,WAAWR;;eAEvB;UACLJ,IAAO;YACLC,IAAIN,EAAeM;YACnBC,MAAMZ,KAAKa,OAAOC;YAClBN,MAAMR,KAAKe,aAAaD;YACxBE,eAAeX,EAAeW;YAC9BC,QAAQjB,KAAKkB,SAASJ;;;cAGLd,KAAKI,gBAAgBM;;;;;eAYtCV,KAAAuB,wBAAwBpB;YACxBH,KAAKwB;AAAgB;IAErBxB,KAAAyB,6BAA6BtB;MACnC,MAAMuB,UAAa1B,KAAK2B;MAExB,IAAID,GAAM;QACR1B,KAAKkB,SAASJ,QAAQY;;;;QAMlB1B,KAAA4B,sBAAsB,MACrB,EACLC,EAAA;MAAKC,OAAM;OACTD,EAAA,mBAAY7B,KAAK+B,iBAAiBZ,OAClCU,EAAA,mBAAY7B,KAAK+B,iBAAiBV,YAEpCQ,EAAA;MAAKC,OAAM;OACTD,EAAA;MACEG,aAAahC,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;OAA0B,QAIrDzB,KAAKS,iBAAiB,YAAYT,KAAK4B,wBAG1CC,EAAA;MACEuB,MAAK;MACL5C,MAAK;MACL2C,SAASnD,KAAKuB;OAEbvB,KAAK+B,iBAAiBsB,OAAOC,YAEhCzB,EAAA;MACEuB,MAAK;MACL5C,MAAK;MACL2C,SAASnD,KAAKE;OAEbF,KAAK+B,iBAAiBsB,OAAOE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["manageModuleReferencesCss","GxManageModuleReferences","this","renderedFirstTime","getActionFromCurrentModuleVersion","selected","selectedModule","versions","find","id","currentVersion","action","onProgress","message","progress","state","data","selectedModuleAction","Object","assign","progressValue","progressState","handleModuleChange","row","foundModule","modulesAll","item","rowsId","serverSelectedCallbackHandler","async","resolvedObjects","serverSelectedCallback","selectedServerId","filterModulesByType","filteredModules","handleFilterChange","value","trimmedValue","trim","lowerCaseValue","toLowerCase","filter","module","name","includes","executeActionCallbackHandler","actionCompleted","executeActionCallback","type","versionData","version","moduleMenuSelectionChangedHandler","e","itemId","detail","addServerCallback","console","log","modulesList","renderMenu","h","onSelectionChanged","class","listName","ellipsis","style","left","moduleMenuLeftPosition","top","moduleMenuTopPosition","itemValue","icon","showModuleMenu","serverContextMenuCallback","buttonBoundingClientRect","target","getBoundingClientRect","selection","clientX","x","clientY","y","renderModulesGrid","noBorder","fullHeight","rowSelectionMode","part","settingable","size","map","rowid","key","color","description","disabled","fit","onClick","closeProgressBar","moduleIconColor","renderModuleName","renderModuleAction","_componentLocale","modulesInformation","moduleProperties","notInstalled","installedVersion","moduleVersionsValueChangedHandler","moduleId","renderModuleVersions","label","availableVersions","labelPosition","centerLabel","ref","el","onValueChanged","onItemSelected","selectedButtonChangedHandler","replace","serverItemSelectedHandler","serverId","serverValueChangedHandler","progressBarCloseHandler","setTimeout","componentDidLoad","componentDidRender","componentDidRenderFirstTime","emit","componentName","componentWillLoad","Locale","getComponentStrings","servers","onPropValueChange","newModulesData","validate","render","Host","noAboveFooterPadding","noBorderAboveFooter","noContentPadding","containerTitle","modules","selectServer","disableFilter","searchModules","event","reduced","fullWidth","onSelectedButtonChanged","tabs","browse","installed","updates","renderModuleDataProperties","properties","slot","stateType","caption","progressDefaultCaption","active","autoClose","withClose","closedCallback"],"sources":["src/components/modules/manage-module-references/manage-module-references.scss?tag=gx-ide-manage-module-references&encapsulation=shadow","src/components/modules/manage-module-references/manage-module-references.tsx"],"sourcesContent":["@import \"../../../global/gx-ide-common.scss\";\n@import \"../../../global/gx-ide-mixins.scss\";\n\n/*--- General ---*/\np,\nul {\n font-size: var(--font-size-lg);\n margin: 0;\n}\np {\n line-height: 1.6em;\n}\n/*--- Header ---*/\n.header {\n align-items: center;\n grid-template-columns: 1fr auto;\n grid-template-rows: 1fr;\n}\n.main {\n display: grid;\n //grid-template-columns: 1fr 2fr 1fr;\n grid-template-columns: 1.5fr 2fr;\n grid-template-rows: 1fr;\n height: 100%;\n overflow: auto;\n}\nch-grid-columnset {\n display: none;\n}\n.grid-cell-module {\n &__info {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--mer-spacing--xxs);\n }\n &__name {\n font-weight: var(--mer-font__weight--bold);\n }\n}\n\n/*--- Servers Container ---*/\n.servers-container {\n display: none;\n height: 100%;\n &__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--gxg-list-box-main__padding) var(--gxg-list-box-main__padding)\n 0 var(--gxg-list-box-main__padding);\n\n gxg-button {\n width: 100%;\n }\n }\n}\n\n/*--- Modules (Header) ---*/\n.modules {\n &__combo-container {\n display: flex;\n flex-direction: column;\n gap: var(--mer-spacing--xs);\n }\n &__combo {\n gxg-combo-box {\n flex: 1;\n }\n display: flex;\n flex-direction: row;\n gap: var(--mer-spacing--xs);\n }\n &__menu-container {\n position: relative;\n }\n &__menu {\n display: none;\n width: 200px;\n position: fixed;\n z-index: 10;\n right: 0;\n transform: translateX(-100%);\n\n &--visible {\n display: block;\n }\n }\n &__header {\n padding: var(--gxg-list-box-main__padding);\n display: flex;\n flex-direction: column;\n gap: var(--mer-spacing--xs);\n }\n &__container {\n border-inline-end: var(--mer-border__width--sm) solid\n var(--gx-ide-container-border-color);\n display: grid;\n grid-template-rows: auto 1fr;\n height: 100%;\n overflow: auto;\n }\n}\n\n/*--- Module Info ---*/\n.module-info {\n display: grid;\n grid-template-rows: auto 1fr;\n height: 100%;\n overflow: auto;\n\n &__name {\n display: flex;\n align-items: center;\n gap: var(--mer-spacing--sm);\n --ds-icon-size-box--regular: 24px;\n --ds-icon-size--regular: 24px;\n font-weight: var(--mer-font__weight--bold);\n }\n\n &__header {\n padding: var(--gx-ide-container__padding);\n display: flex;\n flex-direction: column;\n gap: var(--mer-spacing--xs);\n border-block-end: var(--mer-border__width--sm) solid\n var(--gx-ide-container-border-color);\n }\n\n &__action-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--mer-spacing--xs);\n &:before {\n content: \"\";\n width: var(--mer-spacing--xs);\n height: var(--mer-spacing--xs);\n border-radius: 50%;\n display: block;\n background-color: var(--mer-icon__primary--disabled);\n }\n &--installed:before {\n background-color: var(--mer-icon__primary);\n }\n }\n\n &__divider {\n width: calc(100% - var(--gx-ide-container__padding) * 4);\n padding: 0 var(--gx-ide-container__padding);\n margin: 0 auto;\n border: 0;\n border-block-end: var(--mer-border__width--sm) solid\n var(--gx-ide-container-border-color);\n }\n &__properties {\n display: flex;\n flex-direction: column;\n padding: var(--gx-ide-container__padding);\n gap: var(--mer-spacing--xs);\n overflow: auto;\n }\n}\n\n.md-property {\n display: grid;\n gap: var(--mer-spacing--xs);\n\n &--inline {\n grid-template-columns: auto 1fr;\n }\n &--block {\n }\n &__key {\n font-weight: var(--font-weight-bold);\n max-width: 150px;\n }\n &__value {\n font-size: var(--mer-font__size--xxs);\n }\n &__key,\n &__value {\n > * {\n display: inline-block;\n }\n }\n &__list {\n display: flex;\n flex-direction: column;\n gap: var(--mer-spacing--xs);\n > ul {\n margin: 0;\n padding: 0;\n list-style-type: none;\n display: flex;\n flex-direction: column;\n gap: var(--mer-spacing--xxs);\n margin-inline-start: var(--mer-spacing--xs);\n\n li {\n position: relative;\n padding-inline-start: 12px;\n line-height: var(--ds-base-font-line-height--comfortable);\n &::before {\n content: \"\";\n position: absolute;\n left: 0;\n top: 7px;\n display: inline-block;\n width: var(--mer-spacing--xxs);\n height: var(--mer-spacing--xxs);\n background-color: var(--mer-text__on-surface);\n }\n }\n }\n }\n}\n\n.md-property,\n.md-property__list {\n border-block-end: var(--mer-border__width--sm) solid\n var(--gx-ide-container-border-color);\n padding-block-end: var(--mer-spacing--xs);\n\n &:last-child {\n border-block-end: 0;\n padding-block-end: 0;\n }\n}\n","/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Event,\n Element,\n EventEmitter,\n Method,\n State,\n Watch\n} from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\nimport { Color } from \"@genexus/gemini\";\nimport { topStateBarType } from \"@genexus/gemini\";\n/* CUSTOM IMPORTS */\nimport {\n ModuleServerData,\n ModuleData,\n ModuleActionType,\n ModuleFilterType,\n ModuleVersionData\n} from \"../types\";\nimport { renderModuleDataProperties } from \"../../../common/common\";\nimport { Locale } from \"../../../common/locale\";\nimport { ItemData } from \"../../../components/_helpers/list-selector/list-selector-item/list-selector-item\";\nimport { ContextMenuInfo } from \"../../../common/types\";\n\n@Component({\n tag: \"gx-ide-manage-module-references\",\n styleUrl: \"manage-module-references.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/manage-module-references\"]\n})\nexport class GxManageModuleReferences {\n // 1.OWN PROPERTIES | WATCH'S //\n\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n private renderedFirstTime = false;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeManageModuleReferencesElement;\n private modulesList!: HTMLGxgComboBoxElement;\n private moduleMenuLeftPosition: string;\n private moduleMenuTopPosition: string;\n\n // 3.STATE() VARIABLES //\n\n @State() modulesAll: ModuleData[] = [];\n @State() filteredModules: ModuleData[] = [];\n @State() selectedModule: ModuleData;\n @State() selectedServerId: string;\n @State() selectedModuleAction: ActionInfo = {\n message: \"\",\n progress: 0,\n state: \"in-progress\"\n };\n @State() actionCompleted = true;\n @State() closeProgressBar = true;\n @State() progressValue: number = 0;\n @State() progressState: topStateBarType = \"in-progress\";\n\n // 4.PUBLIC PROPERTY API //\n\n /**\n * List of module servers currently cataloged\n */\n @Prop() readonly servers: ModuleServerData[] = [];\n\n /**\n * Callback invoked when a server is selected. Returns the set of modules available on that server.\n */\n @Prop() readonly serverSelectedCallback: ServerSelectedCallback;\n\n /**\n * Callback invoked when the user wants to execute the action corresponding to a selected module. When the action begins to be executed, the component must be able to show the progress of the action. For this, the onProgress parameter is available, which is in turn a callback used by the host to notify the progress by text message and percentage.\n */\n @Prop() readonly executeActionCallback: ExecuteActionCallback;\n\n /**\n * Callback invoked when Add button is clicked\n */\n @Prop() readonly addServerCallback: AddServerCallback;\n\n /**\n * Callback invoked when an element is right clicked on servers list\n */\n @Prop() readonly serverContextMenuCallback: ServerContextMenuCallback;\n\n // 5.EVENTS (EMIT) //\n\n /**\n * This event is emitted once just after the component is fully loaded and the first render() occurs\n */\n @Event() componentDidRenderFirstTime: EventEmitter<boolean>;\n\n // 6.COMPONENT LIFECYCLE EVENTS //\n\n async componentDidLoad() {}\n\n componentDidRender() {\n if (!this.renderedFirstTime) {\n this.componentDidRenderFirstTime.emit(\n this._componentLocale.componentName\n );\n this.renderedFirstTime = true;\n }\n }\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n await this.serverSelectedCallbackHandler(this.servers[0].id);\n }\n\n // 7.LISTENERS //\n\n @Watch(\"modulesAll\")\n onPropValueChange(newModulesData: ModuleData[]) {\n this.filteredModules = [...newModulesData];\n }\n\n // 8.PUBLIC METHODS API //\n\n /**\n * validate\n */\n @Method()\n async validate(): Promise<boolean> {\n return true;\n }\n\n // 9.LOCAL METHODS //\n\n private getActionFromCurrentModuleVersion = (): ModuleActionType => {\n const selected = this.selectedModule.versions.find(\n ({ id }) => id === this.selectedModule.currentVersion\n );\n return selected.action;\n };\n\n /**\n * Callback invoked to get the progress when module is performing an action\n */\n private onProgress = (\n message: string,\n progress: number,\n state: topStateBarType\n ): void => {\n const data = { message, progress, state };\n this.selectedModuleAction = { ...data };\n this.progressValue = this.selectedModuleAction.progress;\n this.progressState = this.selectedModuleAction.state;\n };\n\n // 10.LOCAL METHODS //\n\n /**\n * Used for changing the selected module\n */\n private handleModuleChange = (row: any) => {\n const foundModule = this.modulesAll.find(item => item.id === row.rowsId[0]);\n this.selectedModule = foundModule;\n };\n\n /**\n * Change the server selected value in response to callbackServerSelected callback\n */\n private serverSelectedCallbackHandler = async (id: any) => {\n const resolvedObjects = await this.serverSelectedCallback(id);\n\n this.selectedServerId = id;\n\n this.modulesAll = [...resolvedObjects];\n this.filterModulesByType(\"browse\");\n this.selectedModule = this.filteredModules[0];\n };\n private handleFilterChange = (value: string) => {\n const trimmedValue = value.trim();\n\n if (trimmedValue) {\n const lowerCaseValue = trimmedValue.toLowerCase();\n this.filteredModules = this.modulesAll.filter(module =>\n module.name.toLowerCase().includes(lowerCaseValue)\n );\n } else {\n this.filteredModules = this.modulesAll;\n }\n };\n\n /**\n * Perform an action relative to a module using callbackExecuteAction callback and receive the state of that action with onProgress callback\n */\n private executeActionCallbackHandler = async (module: ModuleData) => {\n const actionCompleted = await this.executeActionCallback(\n this.selectedServerId,\n module.id,\n this.getActionFromCurrentModuleVersion(),\n this.onProgress\n );\n this.actionCompleted = actionCompleted;\n };\n\n private filterModulesByType = (type: ModuleFilterType) => {\n // browse\n if (type === \"browse\") {\n this.filteredModules = this.modulesAll;\n }\n // installed\n else if (type === \"installed\") {\n this.filteredModules = this.modulesAll.filter((module: ModuleData) => {\n const versionData: ModuleVersionData = module.versions.find(version => {\n return version.id === module.currentVersion;\n });\n return (\n versionData &&\n (versionData.action === \"restore\" || versionData.action === \"update\")\n );\n });\n } else if (type === \"updates\") {\n this.filteredModules = this.modulesAll.filter((module: ModuleData) => {\n const versionData: ModuleVersionData = module.versions.find(version => {\n return version.id === module.currentVersion;\n });\n return versionData && versionData.action === \"update\";\n });\n }\n };\n\n private moduleMenuSelectionChangedHandler = async (\n e: CustomEvent<ItemData[]>\n ) => {\n const itemId = e.detail[0].itemId;\n if (itemId === \"add\") {\n if (this.addServerCallback) {\n await this.addServerCallback();\n }\n } else if (itemId === \"edit\") {\n console.log(this.modulesList.value);\n } else if (itemId === \"upload\") {\n console.log(\"upload\");\n }\n };\n\n private renderMenu = () => {\n return (\n <gx-ide-list-selector\n onSelectionChanged={this.moduleMenuSelectionChangedHandler}\n class=\"modules__menu\"\n type=\"single-selection\"\n listName=\"module-menu\"\n ellipsis\n style={{\n left: this.moduleMenuLeftPosition,\n top: this.moduleMenuTopPosition\n }}\n >\n <gx-ide-list-selector-item\n itemId=\"add\"\n itemValue=\"Add\"\n icon=\"gemini-tools/add\"\n ></gx-ide-list-selector-item>\n <gx-ide-list-selector-item\n itemId=\"edit\"\n itemValue=\"Edit\"\n icon=\"gemini-tools/edit\"\n ></gx-ide-list-selector-item>\n <gx-ide-list-selector-item\n itemId=\"upload\"\n itemValue=\"Upload from file\"\n icon=\"gemini-tools/file\"\n ></gx-ide-list-selector-item>\n </gx-ide-list-selector>\n );\n };\n\n private showModuleMenu = async (e: MouseEvent) => {\n if (this.serverContextMenuCallback) {\n const buttonBoundingClientRect = (\n e.target as HTMLElement\n ).getBoundingClientRect();\n await this.serverContextMenuCallback({\n selection: [this.selectedServerId],\n clientX: buttonBoundingClientRect.x,\n clientY: buttonBoundingClientRect.y\n });\n }\n };\n\n private renderModulesGrid = (): Element => {\n return (\n <gxg-grid noBorder fullHeight>\n <ch-grid\n rowSelectionMode=\"single\"\n part=\"ch-grid-pending-commits\"\n class=\"no-border\"\n /* TODO: El error es aqui ya que se esta enviando el valor del row Id correspondiente a la primera carga del grid con el primer server */\n onSelectionChanged={(row: any) => this.handleModuleChange(row.detail)}\n >\n <ch-grid-columnset>\n <ch-grid-column\n settingable={false}\n size=\"min-content\"\n ></ch-grid-column>\n\n <ch-grid-column settingable={false}></ch-grid-column>\n <ch-grid-column\n settingable={false}\n size=\"min-content\"\n ></ch-grid-column>\n </ch-grid-columnset>\n\n {this.filteredModules.map((item: ModuleData) => (\n <ch-grid-row\n rowid={item.id}\n key={item.id}\n selected={\n this.selectedModule && this.selectedModule.id === item.id\n }\n >\n <ch-grid-cell>\n <gxg-icon\n type=\"objects/module\"\n color=\"auto\"\n size=\"small\"\n ></gxg-icon>\n </ch-grid-cell>\n <ch-grid-cell class=\"grid-cell-module__info\">\n <span class=\"grid-cell-module__name\">{item.name}</span>\n <span class=\"grid-cell-module__description\">\n {item.description}\n </span>\n </ch-grid-cell>\n\n <ch-grid-cell>\n {this.selectedModule && this.selectedModule.id === item.id ? (\n <gxg-button\n disabled={!this.actionCompleted}\n fit\n part=\"module-action\"\n onClick={() => {\n this.actionCompleted = false;\n this.closeProgressBar = false;\n this.executeActionCallbackHandler(item);\n }}\n >\n {this.getActionFromCurrentModuleVersion()}\n </gxg-button>\n ) : null}\n </ch-grid-cell>\n </ch-grid-row>\n ))}\n </ch-grid>\n </gxg-grid>\n );\n };\n\n private moduleIconColor = (): Color => {\n return this.getActionFromCurrentModuleVersion() === \"install\"\n ? \"mercury-primary-disabled\"\n : \"mercury-primary\";\n };\n\n /* module details/information renders*/\n private renderModuleName = () => {\n return (\n <gxg-title part=\"module-info__name\" type=\"title-05\">\n <div class=\"module-info__name\">\n <gxg-icon\n type=\"objects/module\"\n color={this.moduleIconColor()}\n ></gxg-icon>\n {this.selectedModule.name}\n </div>\n </gxg-title>\n );\n };\n private renderModuleAction = () => {\n return this.getActionFromCurrentModuleVersion() === \"install\" ? (\n <div class=\"module-info__action-container\">\n <gxg-text part=\"not-installed\">\n {\n this._componentLocale.modulesInformation.moduleProperties\n .notInstalled\n }\n </gxg-text>\n </div>\n ) : (\n <div class=\"module-info__action-container module-info__action-container--installed\">\n <gxg-text part=\"installed\">\n {` ${this._componentLocale.modulesInformation.moduleProperties.installedVersion} : ${this.selectedModule.currentVersion}`}\n </gxg-text>\n </div>\n );\n };\n\n private moduleVersionsValueChangedHandler = (e: CustomEvent<any>) => {\n const moduleId = e.detail;\n this.selectedModule = {\n ...this.selectedModule,\n currentVersion: moduleId\n };\n };\n\n private renderModuleVersions = () => {\n return (\n <div part=\"available-versions\">\n <gxg-combo-box\n id=\"versions-combo-box\"\n disable-filter\n value={this.selectedModule.versions[0][\"id\"]}\n part=\"module-versions\"\n display-validation-styles\n display-validation-message\n label={\n this._componentLocale.modulesInformation.moduleProperties\n .availableVersions\n }\n labelPosition=\"start\"\n centerLabel\n ref={el => (this.modulesList = el as HTMLGxgComboBoxElement)}\n onValueChanged={this.moduleVersionsValueChangedHandler}\n >\n {this.selectedModule.versions.map(item => (\n <gxg-combo-box-item\n value={item.id}\n onItemSelected={() =>\n (this.selectedModule = {\n ...this.selectedModule,\n currentVersion: item.id\n })\n }\n >\n {item.id}\n </gxg-combo-box-item>\n ))}\n </gxg-combo-box>\n </div>\n );\n };\n\n private selectedButtonChangedHandler = (e: CustomEvent<string>) => {\n const type = e.detail.replace(\"btn-\", \"\") as ModuleFilterType;\n this.filterModulesByType(type);\n };\n\n private serverItemSelectedHandler = (\n e: CustomEvent<{\n el: HTMLGxgComboBoxItemElement;\n index: number;\n value: any;\n icon?: string;\n }>\n ) => {\n const serverId = e.detail.value;\n this.serverSelectedCallbackHandler(serverId);\n };\n\n private serverValueChangedHandler = (e: CustomEvent<any>) => {\n const serverId = e.detail;\n this.serverSelectedCallbackHandler(serverId);\n };\n\n private progressBarCloseHandler = () => {\n setTimeout(() => {\n this.actionCompleted = true;\n this.closeProgressBar = true;\n // reset\n this.progressValue = 0;\n this.progressState = \"in-progress\";\n }, 400);\n // delay to force the footer line disappear after the top-state-bar has been closed.\n };\n\n // 11.RENDER() FUNCTION //\n\n render(): void {\n return (\n <Host\n class={{\n \"gx-ide-component\": true\n }}\n >\n <div class=\"gx-ide-main-wrapper\">\n <gx-ide-container\n noAboveFooterPadding\n noBorderAboveFooter={this.closeProgressBar}\n noContentPadding\n part=\"servers\"\n containerTitle={this._componentLocale.componentName}\n >\n {/* Servers*/}\n <main class=\"main\">\n <div class=\"modules__container\">\n <header class=\"modules__header\">\n <div class=\"modules__combo-container\">\n <gxg-label>\n {this._componentLocale.modules.selectServer}\n </gxg-label>\n <div class=\"modules__combo\">\n <gxg-combo-box\n disableFilter\n onValueChanged={this.serverValueChangedHandler}\n >\n {this.servers.map(item => (\n <gxg-combo-box-item\n value={item.id}\n onItemSelected={this.serverItemSelectedHandler}\n >\n {item.name}\n </gxg-combo-box-item>\n ))}\n </gxg-combo-box>\n <span class=\"modules__menu-container\">\n <gxg-button\n type=\"secondary-icon-only\"\n icon=\"gemini-tools/show-more-horizontal\"\n onClick={this.showModuleMenu}\n ></gxg-button>\n {this.renderMenu()}\n </span>\n </div>\n </div>\n <gxg-form-text\n label={this._componentLocale.modules.searchModules}\n labelPosition=\"above\"\n centerLabel={false}\n onValueChanged={(event: any) => {\n this.handleFilterChange(event.detail);\n }}\n ></gxg-form-text>\n <gxg-buttons-container\n reduced\n fullWidth\n class=\"modules__browser\"\n onSelectedButtonChanged={this.selectedButtonChangedHandler}\n >\n <gxg-button id=\"btn-browse\" selected>\n {this._componentLocale.modules.tabs.browse}\n </gxg-button>\n <gxg-button id=\"btn-installed\">\n {this._componentLocale.modules.tabs.installed}\n </gxg-button>\n <gxg-button id=\"btn-updates\">\n {this._componentLocale.modules.tabs.updates}\n </gxg-button>\n </gxg-buttons-container>\n </header>\n\n {/* modules grid*/}\n {this.renderModulesGrid()}\n </div>\n\n {/* Module Information*/}\n {this.selectedModule ? (\n <div class=\"module-info\">\n <header class=\"module-info__header\">\n {this.renderModuleName()}\n {this.renderModuleAction()}\n {this.renderModuleVersions()}\n </header>\n <div class=\"module-info__properties gxg-scrollbar\">\n {renderModuleDataProperties(this.selectedModule.properties)}\n </div>\n </div>\n ) : null}\n </main>\n\n {/* Top State Bar*/}\n <gxg-top-state-bar\n slot=\"footer-above\"\n part=\"progress-bar\"\n stateType={this.progressState}\n noBorder\n caption={\n this.selectedModuleAction.message ||\n this._componentLocale.progressDefaultCaption\n }\n progress={this.progressValue}\n active={!this.actionCompleted || !this.closeProgressBar}\n autoClose={false}\n withClose\n closedCallback={this.progressBarCloseHandler}\n ></gxg-top-state-bar>\n </gx-ide-container>\n </div>\n </Host>\n );\n }\n}\n\nexport type ExecuteActionCallback = (\n serverId: string,\n moduleId: string,\n action: ModuleActionType,\n onProgress: (\n message: string,\n progress: number,\n state: topStateBarType\n ) => void\n) => Promise<boolean>;\n\nexport type ServerSelectedCallback = (id: string) => Promise<ModuleData[]>;\n\nexport type AddServerCallback = () => Promise<void>;\n\nexport type ServerContextMenuCallback = (\n contextMenuInfo: ContextMenuInfo\n) => Promise<void>;\nexport interface ActionInfo {\n message: string;\n progress: number;\n state: topStateBarType;\n}\n"],"mappings":";;;;;;AAAA,MAAMA,IAA4B;;MCmCrBC,IAAwB;;;;IAO3BC,KAAAC,oBAAoB;;QAgGpBD,KAAAE,oCAAoC;MAC1C,MAAMC,IAAWH,KAAKI,eAAeC,SAASC,MAC5C,EAAGC,WAASA,MAAOP,KAAKI,eAAeI;MAEzC,OAAOL,EAASM;AAAM;;;eAMhBT,KAAAU,aAAa,CACnBC,GACAC,GACAC;MAEA,MAAMC,IAAO;QAAEH;QAASC;QAAUC;;MAClCb,KAAKe,uBAAoBC,OAAAC,OAAA,IAAQH;MACjCd,KAAKkB,gBAAgBlB,KAAKe,qBAAqBH;MAC/CZ,KAAKmB,gBAAgBnB,KAAKe,qBAAqBF;AAAK;;;;eAQ9Cb,KAAAoB,qBAAsBC;MAC5B,MAAMC,IAActB,KAAKuB,WAAWjB,MAAKkB,KAAQA,EAAKjB,OAAOc,EAAII,OAAO;MACxEzB,KAAKI,iBAAiBkB;AAAW;;;eAM3BtB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5D,KAAKiG,oBACLjG,KAAKkG,sBACLlG,KAAK0G,yBAERhD,EAAA;MAAKE,OAAM;OACR4F,EAA2BxJ,KAAKI,eAAeqJ,gBAGlD,OAIN/F,EAAA;MACEgG,MAAK;MACLtE,MAAK;MACLuE,WAAW3J,KAAKmB;MAChB8D,UAAQ;MACR2E,SACE5J,KAAKe,qBAAqBJ,WAC1BX,KAAKmG,iBAAiB0D;MAExBjJ,UAAUZ,KAAKkB;MACf4I,SAAS9J,KAAK4C,oBAAoB5C,KAAK+F;MACvCgE,WAAW;MACXC,WAAS;MACTC,gBAAgBjK,KAAKwH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["titleEditableCss","GxgTitleEditable","constructor","hostRef","this","edit","editing","positionCursorAtTheEnd","wrapperClickedHandler","textInput","selectionStart","selectionEnd","value","length","focus","inputKeyDownHandler","e","key","preventDefault","editButtonEl","fluid","setInputWidth","detectClickOutsideFunc","clickedOutside","detectClickOutside","wrapperEl","style","width","inputInputHandler","ghostDiv","innerText","updateInputWidth","ghostDivWidth","getBoundingClientRect","undefined","titleType","disableEdition","debounce","debounceDelay","disabled","clickToEdit","focusType","validationStatus","validationMessage","hideTooltip","watchValueHandler","newValue","clearTimeout","timeoutReference","setTimeout","valueChanged","emit","watchEditingHandler","document","addEventListener","removeEventListener","componentDidLoad","render","h","Host","class","formClasses","commonClassesNames","onMouseUp","wrapper","ref","el","type","readOnly","onKeyDown","onInput","tabIndex","icon","onClick","formTooltipLogic"],"sources":["node_modules/@genexus/gemini/dist/collection/components/title-editable/title-editable.css?tag=gxg-title-editable&encapsulation=shadow","node_modules/@genexus/gemini/dist/collection/components/title-editable/title-editable.js"],"sourcesContent":[":root {\n --ui-animaton-speed: 0.2s;\n}\n\n/*ALIGNMENT*/\n/*Ellipsis*/\n/*****************************************************\nTYPOGRAPHY\n*****************************************************/\n/*Title 01 (Positive)*/\n.gxg-title-01 {\n font-family: var(--ds-base-font-family-primary);\n font-weight: var(--ds-title-01-font-weight);\n font-size: var(--ds-title-01-font-size);\n letter-spacing: var(--ds-base-font-letter-spacing--comfortable);\n color: var(--ds-base-font-color);\n text-align: start;\n line-height: var(--ds-base-font-line-height--comfortable);\n}\n\n/*Title 01 (Negative)*/\n.gxg-title-01--negative {\n font-family: var(--ds-base-font-family-primary);\n font-weight: var(--ds-title-01-font-weight);\n font-size: var(--ds-title-01-font-size);\n letter-spacing: var(--ds-base-font-letter-spacing--comfortable);\n color: var(--ds-base-font-color);\n text-align: start;\n line-height: var(--ds-base-font-line-height--comfortable);\n color: var(--ds-base-font-color--negative);\n}\n\n/*Title 02 (Positive)*/\n.gxg-title-02 {\n font-family: var(--ds-base-font-family-primary);\n font-weight: var(--ds-title-02-font-weight);\n font-size: var(--ds-title-02-font-size);\n letter-spacing: var(--ds-base-font-letter-spacing--regular);\n color: var(--ds-base-font-color);\n text-align: start;\n text-transform: uppercase;\n line-height: var(--ds-base-font-line-height--comfortable);\n}\n\n.gxg-title-02--negative {\n font-family: var(--ds-base-font-family-primary);\n font-weight: var(--ds-title-02-font-weight);\n font-size: var(--ds-title-02-font-size);\n letter-spacing: var(--ds-base-font-letter-spacing--regular);\n color: var(--ds-base-font-color);\n text-align: start;\n text-transform: uppercase;\n line-height: var(--ds-base-font-line-height--comfortable);\n color: var(--color-on-primary);\n}\n\n/*Title 03*/\n.gxg-title-03 {\n font-family: var(--ds-base-font-family-primary);\n font-weight: var(--ds-title-03-font-weight);\n font-size: var(--ds-title-03-font-size);\n letter-spacing: var(--ds-base-font-letter-spacing--regular);\n color: var(--ds-base-font-color);\n text-align: start;\n text-transform: uppercase;\n line-height: var(--ds-base-font-line-height--comfortable);\n}\n\n.gxg-title-03--negative {\n font-family: var(--ds-base-font-family-primary);\n font-weight: var(--ds-title-03-font-weight);\n font-size: var(--ds-title-03-font-size);\n letter-spacing: var(--ds-base-font-letter-spacing--regular);\n color: var(--ds-base-font-color);\n text-align: start;\n text-transform: uppercase;\n line-height: var(--ds-base-font-line-height--comfortable);\n color: var(--ds-base-font-color--negative);\n}\n\n/*Title 04*/\n.gxg-title-04 {\n font-family: var(--ds-base-font-family-primary);\n font-weight: var(--ds-title-04-font-weight);\n font-size: var(--ds-title-04-font-size);\n letter-spacing: var(--ds-base-font-letter-spacing--comfortable);\n color: var(--ds-base-font-color);\n text-align: start;\n line-height: var(--ds-base-font-line-height--comfortable);\n}\n\n.gxg-title-04--negative {\n font-family: var(--ds-base-font-family-primary);\n font-weight: var(--ds-title-04-font-weight);\n font-size: var(--ds-title-04-font-size);\n letter-spacing: var(--ds-base-font-letter-spacing--comfortable);\n color: var(--ds-base-font-color);\n text-align: start;\n line-height: var(--ds-base-font-line-height--comfortable);\n color: var(--ds-base-font-color--negative);\n}\n\n/*Title 05*/\n.gxg-title-05 {\n font-family: var(--ds-base-font-family-primary);\n font-weight: var(--ds-title-05-font-weight);\n font-size: var(--ds-title-05-font-size);\n letter-spacing: var(--ds-base-font-letter-spacing--regular);\n color: var(--ds-base-font-color);\n text-align: start;\n line-height: var(--ds-base-font-line-height--comfortable);\n}\n\n.gxg-title-05--negative {\n font-family: var(--ds-base-font-family-primary);\n font-weight: var(--ds-title-05-font-weight);\n font-size: var(--ds-title-05-font-size);\n letter-spacing: var(--ds-base-font-letter-spacing--regular);\n color: var(--ds-base-font-color);\n text-align: start;\n line-height: var(--ds-base-font-line-height--comfortable);\n color: var(--ds-base-font-color--negative);\n}\n\n/*Text*/\n.gxg-text {\n font-family: var(--ds-base-font-family-primary);\n font-size: var(--ds-base-font-size);\n color: var(--ds-base-font-size-color);\n font-weight: var(--ds-base-font-size-weight);\n line-height: var(--ds-base-font-line-height--comfortable);\n}\n\n.gxg-text--negative {\n font-family: var(--ds-base-font-family-primary);\n font-size: var(--ds-base-font-size);\n color: var(--ds-base-font-size-color);\n font-weight: var(--ds-base-font-size-weight);\n line-height: var(--ds-base-font-line-height--comfortable);\n color: var(--ds-base-font-color--negative);\n}\n\n.gxg-text--gray {\n font-family: var(--ds-base-font-family-primary);\n font-size: var(--ds-base-font-size);\n color: var(--ds-base-font-size-color);\n font-weight: var(--ds-base-font-size-weight);\n line-height: var(--ds-base-font-line-height--comfortable);\n color: var(--ds-base-font-color--dimmed);\n}\n\n/*Quote*/\n.gxg-quote {\n font-family: var(--ds-base-font-family-primary);\n font-size: var(--ds-base-font-size);\n color: var(--ds-base-font-size-color);\n font-weight: var(--ds-base-font-size-weight);\n line-height: var(--ds-base-font-line-height--comfortable);\n font-style: italic;\n}\n\n.gxg-quote--negative {\n color: var(--ds-base-font-color--negative);\n}\n\n/*Link*/\n.gxg-link {\n line-height: unset;\n font-family: var(--ds-base-font-family-primary);\n font-size: var(--ds-base-font-size);\n color: var(--ds-base-font-size-color);\n font-weight: var(--ds-base-font-size-weight);\n line-height: var(--ds-base-font-line-height--comfortable);\n color: var(--ds-base-font-color--link);\n text-decoration: underline;\n cursor: pointer;\n display: inline-block;\n}\n.gxg-link:hover {\n color: var(--ds-base-font-color--link-hover);\n}\n.gxg-link:active {\n color: var(--ds-base-font-color--link-active);\n}\n\n.gxg-link-gray {\n line-height: unset;\n font-family: var(--ds-base-font-family-primary);\n font-size: var(--ds-base-font-size);\n color: var(--ds-base-font-size-color);\n font-weight: var(--ds-base-font-size-weight);\n line-height: var(--ds-base-font-line-height--comfortable);\n color: var(--ds-base-font-color--link);\n text-decoration: underline;\n cursor: pointer;\n display: inline-block;\n color: var(--ds-base-font-color--dimmed);\n}\n.gxg-link-gray:hover {\n line-height: unset;\n font-family: var(--ds-base-font-family-primary);\n font-size: var(--ds-base-font-size);\n color: var(--ds-base-font-size-color);\n font-weight: var(--ds-base-font-size-weight);\n line-height: var(--ds-base-font-line-height--comfortable);\n color: var(--ds-base-font-color--link);\n text-decoration: underline;\n cursor: pointer;\n display: inline-block;\n color: var(--ds-base-font-color--dimmed);\n filter: brightness(1.4);\n}\n\n/*Alerts*/\n.gxg-alert-error {\n font-family: var(--ds-base-font-family-primary);\n font-size: var(--ds-base-font-size);\n color: var(--ds-base-font-size-color);\n font-weight: var(--ds-base-font-size-weight);\n line-height: var(--ds-base-font-line-height--comfortable);\n color: var(--ds-base-font-color--error);\n display: inline-block;\n}\n\n.gxg-alert-warning {\n font-family: var(--ds-base-font-family-primary);\n font-size: var(--ds-base-font-size);\n color: var(--ds-base-font-size-color);\n font-weight: var(--ds-base-font-size-weight);\n line-height: var(--ds-base-font-line-height--comfortable);\n color: var(--ds-base-font-color--warning);\n display: inline-block;\n}\n\n.gxg-alert-success {\n font-family: var(--ds-base-font-family-primary);\n font-size: var(--ds-base-font-size);\n color: var(--ds-base-font-size-color);\n font-weight: var(--ds-base-font-size-weight);\n line-height: var(--ds-base-font-line-height--comfortable);\n color: var(--ds-base-font-color--success);\n display: inline-block;\n}\n\n/*Tab*/\n.gxg-tab--disabled {\n color: var(--color-primary-disabled);\n pointer-events: none;\n}\n.gxg-tab--disabled[disabled] {\n color: var(--color-primary-disabled);\n pointer-events: none;\n}\n\n/*Label*/\n.gxg-label {\n font-family: var(--ds-base-font-family-primary);\n font-weight: var(--gxg-label-font-weight);\n font-size: var(--gxg-label-font-size);\n color: var(--gxg-label-color);\n text-align: center;\n line-height: 1.455em;\n display: flex;\n align-items: center;\n}\n.gxg-label:hover {\n color: var(--color-primary-hover);\n}\n.gxg-label:focus {\n color: var(--color-primary-active);\n}\n.gxg-label:active {\n color: var(--color-primary-active);\n}\n.gxg-label[disabled] {\n color: var(--color-primary-disabled);\n}\n\n.gxg-label--negative {\n color: var(--color-on-primary);\n}\n.gxg-label--negative[disabled] {\n color: var(--color-on-disabled);\n}\n\n/*****************************************************\nGXG-BUTTON and GXG-BUTTON-GROUP COMMON STYLES\n*****************************************************/\n/*****************************************************\nFORM ELEMENTS\n*****************************************************/\n.gxg-scrollbar {\n /* Track */\n /* Handle */\n /* Handle on hover */\n}\n.gxg-scrollbar::-webkit-scrollbar {\n width: var(--gxg-scrollbar-width);\n height: var(--gxg-scrollbar-width);\n}\n.gxg-scrollbar::-webkit-scrollbar-track {\n background-color: var(--gxg-scrollbar-track-background);\n border-radius: var(--gxg-scrollbar-track-border-radius);\n}\n.gxg-scrollbar::-webkit-scrollbar-thumb {\n background-color: var(--gxg-scrollbar-track-thumb-background);\n border-radius: var(--gxg-scrollbar-track-thumb-radius);\n}\n.gxg-scrollbar::-webkit-scrollbar-thumb:hover {\n background-color: var(--gxg-scrollbar-track-thumb-hover-background);\n}\n.gxg-scrollbar::-webkit-scrollbar-corner {\n background: rgba(0, 0, 0, 0);\n}\n\n/*Warning*/\n:host(.gxg-validation--warning) .form-element {\n border-color: var(--ds-border-color--warning);\n}\n:host(.gxg-validation--warning) .form-element:focus {\n outline-color: var(--ds-border-color--warning);\n border-color: var(--ds-border-color--warning);\n}\n:host(.gxg-validation--warning) .form-element:focus + .checkmark {\n --checkmark-border-color: var(--ds-border-color--warning);\n}\n\n/*Error*/\n:host(.gxg-validation--error) .form-element {\n border-color: var(--ds-border-color--error);\n}\n:host(.gxg-validation--error) .form-element:focus {\n outline-color: var(--ds-border-color--error);\n border-color: var(--ds-border-color--error);\n}\n:host(.gxg-validation--error) .form-element:focus + .checkmark {\n --checkmark-border-color: var(--ds-border-color--error);\n}\n\n/*Success*/\n:host(.gxg-validation--success) .form-element {\n border-color: var(--ds-border-color--success);\n}\n:host(.gxg-validation--success) .form-element:focus {\n outline-color: var(--ds-border-color--success);\n border-color: var(--ds-border-color--success);\n}\n:host(.gxg-validation--success) .form-element:focus + .checkmark {\n --checkmark-border-color: var(--ds-border-color--success);\n}\n\n/*Tooltip*/\n.tooltip-outer-wrapper {\n display: grid;\n grid-template-columns: 0fr;\n transition: grid-template-columns var(--timing-02);\n}\n\n:host(.tooltip--visible) .tooltip-outer-wrapper {\n grid-template-columns: 1fr;\n}\n\n.tooltip-inner-wrapper {\n --margin-inline-start: 6px;\n overflow: hidden;\n transition: 150ms width;\n width: 0;\n}\n.tooltip-inner-wrapper gxg-icon {\n display: flex;\n position: relative !important;\n top: 0 !important;\n transform: none !important;\n margin-inline-start: var(--margin-inline-start);\n box-sizing: border-box;\n}\n.tooltip-inner-wrapper--visible {\n width: calc(var(--ds-icon-size-box--small) + var(--margin-inline-start));\n}\n.tooltip-inner-wrapper--hidden {\n display: none;\n}\n\n:host(.gxg--disabled) .form-element,\n:host(.gxg--disabled.form-element) {\n pointer-events: none;\n background-color: var(--ds-background-color-disabled) !important;\n color: var(--ds-color--disabled) !important;\n border-color: var(--ds-border-color-disabled) !important;\n cursor: default !important;\n}\n\n:host {\n display: block;\n color: var(--gxg-title-editable__color);\n}\n:host .wrapper {\n font-family: var(--ds-base-font-family-primary);\n position: relative;\n max-width: 100%;\n}\n:host input {\n font-family: inherit;\n font-size: inherit;\n font-weight: inherit;\n text-transform: inherit;\n color: inherit;\n background-color: transparent;\n border: none;\n padding: 0;\n box-sizing: border-box;\n flex-grow: 1;\n cursor: auto;\n border-bottom: 2px solid transparent;\n}\n:host input:focus {\n outline: none;\n}\n\n/*wrapper*/\n.wrapper {\n display: flex;\n align-items: center;\n gap: var(--gxg-title-editable-wrapper__gap);\n font-weight: var(--gxg-title-editable__font-weight);\n}\n\n/*editing*/\n:host(:not([editing])) input {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n/*click-to-edit*/\n:host([click-to-edit]:not([disable-edition])) .wrapper,\n:host([click-to-edit]:not([disable-edition])) input {\n cursor: pointer;\n}\n\n/*title types*/\n:host([title-type=h1]) .wrapper {\n font-size: var(--gxg-title-editable-h1__font-size);\n text-transform: capitalize;\n}\n\n:host([title-type=h2]) .wrapper {\n font-size: var(--gxg-title-editable-h2__font-size);\n}\n\n/*fluid*/\n:host([fluid]) .wrapper {\n display: inline-flex;\n}\n\n/*focus (optional)*/\n:host(.focus--text.editing) input {\n color: var(--gxg-title-editable__color--editing);\n}\n\n/*focus (optional)*/\n:host(.focus--line.editing) input {\n border-bottom-color: var(--gxg-title-editable__color--editing);\n}\n\n/*ghost div: it helps measuring the text width, to make the input as wide as needed (fluid)*/\n.ghost {\n font-family: inherit;\n font-size: inherit;\n position: fixed;\n visibility: hidden;\n height: auto;\n width: auto;\n white-space: nowrap;\n /*remove from viewport*/\n bottom: 0;\n left: 0;\n transform: translate(-100%, -100%);\n}\n\n.right-wrapper {\n display: flex;\n align-items: center;\n}","import { Host, h } from \"@stencil/core\";\nimport { formTooltipLogic } from \"../../common/form\";\nimport { formClasses } from \"../../common/classesNames\";\nimport { commonClassesNames } from \"../../common/classesNames\";\nimport { detectClickOutside } from \"../../common/detect-click-outside\";\nexport class GxgTitleEditable {\n constructor() {\n this.value = undefined;\n this.titleType = \"h1\";\n this.disableEdition = false;\n this.debounce = false;\n this.debounceDelay = 800;\n this.disabled = false;\n this.clickToEdit = false;\n this.fluid = false;\n this.focusType = undefined;\n this.validationStatus = \"indeterminate\";\n this.validationMessage = undefined;\n this.hideTooltip = false;\n this.editing = false;\n }\n textInput;\n wrapperEl;\n editButtonEl;\n ghostDiv;\n el;\n timeoutReference;\n watchValueHandler(newValue) {\n if (this.debounce) {\n clearTimeout(this.timeoutReference);\n this.timeoutReference = setTimeout(() => {\n this.valueChanged.emit(newValue);\n }, this.debounceDelay);\n }\n else {\n this.valueChanged.emit(newValue);\n }\n }\n watchEditingHandler(editing) {\n if (editing) {\n document.addEventListener(\"click\", this.detectClickOutsideFunc);\n }\n else {\n document.removeEventListener(\"click\", this.detectClickOutsideFunc);\n }\n }\n /* EVENTS */\n /**\n * Emitted when the value changes\n */\n valueChanged;\n /*COMPONENT LIFECYCLE METHODS*/\n componentDidLoad() {\n if (this.fluid) {\n this.inputInputHandler();\n }\n }\n /*PRIVATE METHODS*/\n edit = () => {\n this.editing = true;\n this.positionCursorAtTheEnd();\n };\n wrapperClickedHandler = () => {\n this.editing = true;\n };\n positionCursorAtTheEnd = () => {\n this.textInput.selectionStart = this.textInput.selectionEnd =\n this.textInput.value.length;\n this.textInput.focus();\n };\n inputKeyDownHandler = (e) => {\n if (e.key === \"Enter\" || e.key === \"Escape\") {\n e.preventDefault();\n this.editing = false;\n this.editButtonEl.focus();\n }\n else if (this.fluid) {\n this.setInputWidth();\n }\n };\n detectClickOutsideFunc = (e) => {\n const clickedOutside = detectClickOutside(e, this.wrapperEl);\n if (clickedOutside) {\n this.editing = false;\n }\n };\n setInputWidth = () => {\n this.textInput.style.width = this.value.length + 1 + \"ch\";\n };\n inputInputHandler = () => {\n this.value = this.textInput.value;\n if (this.fluid) {\n this.ghostDiv.innerText = this.value;\n this.updateInputWidth();\n }\n };\n updateInputWidth = () => {\n if (this.fluid) {\n const ghostDivWidth = this.ghostDiv.getBoundingClientRect().width;\n this.textInput.style.width = `${ghostDivWidth}px`;\n }\n };\n /*RENDER*/\n render() {\n return (h(Host, { class: {\n editing: this.editing,\n \"focus--text\": this.focusType === \"text\",\n \"focus--line\": this.focusType === \"line\",\n [formClasses[\"VALIDATION_INDETERMINATE_CLASS\"]]: this.validationStatus === \"indeterminate\",\n [formClasses[\"VALIDATION_WARNING_CLASS\"]]: this.validationStatus === \"warning\",\n [formClasses[\"VALIDATION_ERROR_CLASS\"]]: this.validationStatus === \"error\",\n [formClasses[\"VALIDATION_SUCCESS_CLASS\"]]: this.validationStatus === \"success\",\n [commonClassesNames[\"DISABLED_CLASS\"]]: this.disabled\n } }, h(\"div\", { onMouseUp: this.clickToEdit &&\n !this.editing &&\n !this.disableEdition &&\n this.wrapperClickedHandler, class: {\n wrapper: true\n }, ref: el => (this.wrapperEl = el) }, this.fluid ? (h(\"div\", { class: \"ghost\", ref: el => (this.ghostDiv = el) })) : null, h(\"input\", { type: \"text\", value: this.value, readOnly: !this.editing, ref: el => (this.textInput = el), onKeyDown: this.inputKeyDownHandler, onInput: this.inputInputHandler, tabIndex: this.editing ? 0 : -1 }), h(\"div\", { class: \"right-wrapper\" }, !this.disableEdition ? (h(\"gxg-button\", { type: \"secondary-icon-only\", icon: \"gemini-tools/edit\", onClick: this.edit, ref: el => (this.editButtonEl = el) })) : null, formTooltipLogic(this, this.hideTooltip)))));\n }\n static get is() { return \"gxg-title-editable\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"title-editable.scss\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"title-editable.css\"]\n };\n }\n static get properties() {\n return {\n \"value\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The title value\"\n },\n \"attribute\": \"value\",\n \"reflect\": false,\n \"defaultValue\": \"undefined\"\n },\n \"titleType\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"EditableTitleType\",\n \"resolved\": \"\\\"h1\\\" | \\\"h2\\\" | \\\"h3\\\" | \\\"h4\\\"\",\n \"references\": {\n \"EditableTitleType\": {\n \"location\": \"local\",\n \"path\": \"/home/circleci/repo/src/components/title-editable/title-editable.tsx\",\n \"id\": \"src/components/title-editable/title-editable.tsx::EditableTitleType\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The title type\"\n },\n \"attribute\": \"title-type\",\n \"reflect\": true,\n \"defaultValue\": \"\\\"h1\\\"\"\n },\n \"disableEdition\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If true, the title will not be editable\"\n },\n \"attribute\": \"disable-edition\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"debounce\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The presence of this attribute activates a debounce for the valueChanged event. This will cause the event to be emitted after 'debounceDelay' time.\"\n },\n \"attribute\": \"debounce\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"debounceDelay\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The debounce delay value. Only applies if 'debounce' is true.\"\n },\n \"attribute\": \"debounce-delay\",\n \"reflect\": false,\n \"defaultValue\": \"800\"\n },\n \"disabled\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The presence of this attribute makes the input disabled\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"clickToEdit\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If true, it will allow the title to be edited\"\n },\n \"attribute\": \"click-to-edit\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"fluid\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If true, the width of the title will take only the minimum needed space\"\n },\n \"attribute\": \"fluid\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"focusType\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"EditableTitleFocusType\",\n \"resolved\": \"\\\"line\\\" | \\\"text\\\"\",\n \"references\": {\n \"EditableTitleFocusType\": {\n \"location\": \"local\",\n \"path\": \"/home/circleci/repo/src/components/title-editable/title-editable.tsx\",\n \"id\": \"src/components/title-editable/title-editable.tsx::EditableTitleFocusType\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If true, the width of the title will take only the minimum needed space\"\n },\n \"attribute\": \"focus-type\",\n \"reflect\": true\n },\n \"validationStatus\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"ValidationStatus\",\n \"resolved\": \"\\\"error\\\" | \\\"indeterminate\\\" | \\\"success\\\" | \\\"warning\\\"\",\n \"references\": {\n \"ValidationStatus\": {\n \"location\": \"import\",\n \"path\": \"../../common/types\",\n \"id\": \"src/common/types.ts::ValidationStatus\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The validation status\"\n },\n \"attribute\": \"validation-status\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"indeterminate\\\"\"\n },\n \"validationMessage\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The message to display when validation fails (error)\"\n },\n \"attribute\": \"validation-message\",\n \"reflect\": false\n },\n \"hideTooltip\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Shows or hides the tooltip\"\n },\n \"attribute\": \"hide-tooltip\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n }\n };\n }\n static get states() {\n return {\n \"editing\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"valueChanged\",\n \"name\": \"valueChanged\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the value changes\"\n },\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"value\",\n \"methodName\": \"watchValueHandler\"\n }, {\n \"propName\": \"editing\",\n \"methodName\": \"watchEditingHandler\"\n }];\n }\n}\n//# sourceMappingURL=title-editable.js.map\n"],"mappings":";;;;;;;;AAAA,MAAMA,IAAmB;;MCKZC,IAAgB;EACzB,WAAAC,CAAAC;;IAoDAC,KAAAC,OAAO;MACHD,KAAKE,UAAU;MACfF,KAAKG;AAAwB;IAEjCH,KAAAI,wBAAwB;MACpBJ,KAAKE,UAAU;AAAI;IAEvBF,KAAAG,yBAAyB;MACrBH,KAAKK,UAAUC,iBAAiBN,KAAKK,UAAUE,eAC3CP,KAAKK,UAAUG,MAAMC;MACzBT,KAAKK,UAAUK;AAAO;IAE1BV,KAAAW,sBAAuBC;MACnB,IAAIA,EAAEC,QAAQ,WAAWD,EAAEC,QAAQ,UAAU;QACzCD,EAAEE;QACFd,KAAKE,UAAU;QACfF,KAAKe,aAAaL;aAEjB,IAAIV,KAAKgB,OAAO;QACjBhB,KAAKiB;;;IAGbjB,KAAAkB,yBAA0BN;MACtB,MAAMO,IAAiBC,EAAmBR,GAAGZ,KAAKqB;MAClD,IAAIF,GAAgB;QAChBnB,KAAKE,UAAU;;;IAGvBF,KAAAiB,gBAAgB;MACZjB,KAAKK,UAAUiB,MAAMC,QAAQvB,KAAKQ,MAAMC,SAAS,IAAI;AAAI;IAE7DT,KAAAwB,oBAAoB;MAChBxB,KAAKQ,QAAQR,KAAKK,UAAUG;MAC5B,IAAIR,KAAKgB,OAAO;QACZhB,KAAKyB,SAASC,YAAY1B,KAAKQ;QAC/BR,KAAK2B;;;IAGb3B,KAAA2B,mBAAmB;MACf,IAAI3B,KAAKgB,OAAO;QACZ,MAAMY,IAAgB5B,KAAKyB,SAASI,wBAAwBN;QAC5DvB,KAAKK,UAAUiB,MAAMC,QAAQ,GAAGK;;;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