@genexus/genexus-ide-ui 0.0.108 → 0.0.109
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/ch-dropdown_2.cjs.entry.js +1 -1
- package/dist/cjs/ch-dropdown_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ch-grid_8.cjs.entry.js +339 -321
- package/dist/cjs/ch-grid_8.cjs.entry.js.map +1 -1
- package/dist/cjs/ch-icon_5.cjs.entry.js +3 -1
- package/dist/cjs/ch-icon_5.cjs.entry.js.map +1 -1
- package/dist/cjs/ch-suggest_4.cjs.entry.js +1 -1
- package/dist/cjs/ch-suggest_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ch-tree-view_5.cjs.entry.js +41 -20
- package/dist/cjs/ch-tree-view_5.cjs.entry.js.map +1 -1
- package/dist/cjs/{common-103f62f6.js → common-2e355c7d.js} +31 -1
- package/dist/cjs/common-2e355c7d.js.map +1 -0
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-add-module-servers.cjs.entry.js +98 -0
- package/dist/cjs/gx-ide-add-module-servers.cjs.entry.js.map +1 -0
- package/dist/cjs/{gx-ide-container_2.cjs.entry.js → gx-ide-container_3.cjs.entry.js} +47 -4
- package/dist/cjs/gx-ide-container_3.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js +2 -2
- package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-edit-module-servers.cjs.entry.js +98 -0
- package/dist/cjs/gx-ide-edit-module-servers.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-empty-state_2.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-import-from-design.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js +232 -0
- package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-new-environment.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-share-kb.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-status-buttons.cjs.entry.js +81 -0
- package/dist/cjs/gx-ide-status-buttons.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-ww-images.cjs.entry.js +1 -1
- package/dist/cjs/gxg-buttons-container_2.cjs.entry.js +184 -0
- package/dist/cjs/gxg-buttons-container_2.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/common/common.js +21 -0
- package/dist/collection/common/common.js.map +1 -1
- package/dist/collection/components/_helpers/container/container.css +6 -0
- package/dist/collection/components/_helpers/container/container.js +40 -0
- package/dist/collection/components/_helpers/container/container.js.map +1 -1
- package/dist/collection/components/_helpers/list-selector/list-selector-item/list-selector-item.js +1 -1
- package/dist/collection/components/_helpers/list-selector/list-selector.js +1 -1
- package/dist/collection/components/create-kb-from-server/create-kb-from-server.js +1 -1
- package/dist/collection/components/create-kb-from-server/create-kb-from-server.js.map +1 -1
- package/dist/collection/components/modules/add-module-servers/add-module-servers.css +560 -0
- package/dist/collection/components/modules/add-module-servers/add-module-servers.js +251 -0
- package/dist/collection/components/modules/add-module-servers/add-module-servers.js.map +1 -0
- package/dist/collection/components/modules/add-module-servers/gx-ide-assets/add-module-servers/langs/add-module-servers.lang.en.json +11 -0
- package/dist/collection/components/modules/add-module-servers/gx-ide-assets/add-module-servers/langs/add-module-servers.lang.ja.json +3 -0
- package/dist/collection/components/modules/add-module-servers/gx-ide-assets/add-module-servers/langs/add-module-servers.lang.zh.json +3 -0
- package/dist/collection/components/modules/edit-module-servers/edit-module-servers.css +560 -0
- package/dist/collection/components/modules/edit-module-servers/edit-module-servers.js +251 -0
- package/dist/collection/components/modules/edit-module-servers/edit-module-servers.js.map +1 -0
- package/dist/collection/components/modules/edit-module-servers/gx-ide-assets/edit-module-servers/langs/edit-module-servers.lang.en.json +11 -0
- package/dist/collection/components/modules/edit-module-servers/gx-ide-assets/edit-module-servers/langs/edit-module-servers.lang.ja.json +3 -0
- package/dist/collection/components/modules/edit-module-servers/gx-ide-assets/edit-module-servers/langs/edit-module-servers.lang.zh.json +3 -0
- package/dist/collection/components/modules/manage-module-references/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.en.json +29 -0
- package/dist/collection/components/modules/manage-module-references/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.ja.json +3 -0
- package/dist/collection/components/modules/manage-module-references/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.zh.json +3 -0
- package/dist/collection/components/modules/manage-module-references/manage-module-references.css +723 -0
- package/dist/collection/components/modules/manage-module-references/manage-module-references.js +397 -0
- package/dist/collection/components/modules/manage-module-references/manage-module-references.js.map +1 -0
- package/dist/collection/components/modules/types.js +2 -0
- package/dist/collection/components/modules/types.js.map +1 -0
- package/dist/collection/pages/assets/common.js +7 -0
- package/dist/components/buttons-container.js +8 -3
- package/dist/components/buttons-container.js.map +1 -1
- package/dist/components/card.js.map +1 -1
- package/dist/components/ch-grid-column2.js +4 -1
- package/dist/components/ch-grid-column2.js.map +1 -1
- package/dist/components/ch-grid2.js +342 -322
- package/dist/components/ch-grid2.js.map +1 -1
- package/dist/components/combo-box.js +1 -1
- package/dist/components/common.js +30 -1
- package/dist/components/common.js.map +1 -1
- package/dist/components/container.js +9 -3
- package/dist/components/container.js.map +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/dropdown.js.map +1 -1
- 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-add-module-servers.d.ts +11 -0
- package/dist/components/gx-ide-add-module-servers.js +186 -0
- package/dist/components/gx-ide-add-module-servers.js.map +1 -0
- 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 +3 -3
- package/dist/components/gx-ide-create-kb-from-server.js.map +1 -1
- 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.d.ts +11 -0
- package/dist/components/gx-ide-edit-module-servers.js +186 -0
- package/dist/components/gx-ide-edit-module-servers.js.map +1 -0
- 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 +2 -2
- package/dist/components/gx-ide-manage-module-references.d.ts +11 -0
- package/dist/components/gx-ide-manage-module-references.js +432 -0
- package/dist/components/gx-ide-manage-module-references.js.map +1 -0
- 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 +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 +17 -8
- package/dist/components/gxg-top-state-bar2.js.map +1 -1
- package/dist/components/icon2.js +3 -1
- package/dist/components/icon2.js.map +1 -1
- package/dist/components/ide-loader.js +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 +2 -2
- package/dist/components/suggest.js.map +1 -1
- package/dist/components/title-editable.js +1 -1
- package/dist/components/title.js +32 -31
- package/dist/components/title.js.map +1 -1
- package/dist/components/title2.js +31 -32
- package/dist/components/title2.js.map +1 -1
- package/dist/components/tree-view-item.js +8 -2
- package/dist/components/tree-view-item.js.map +1 -1
- package/dist/components/tree-view2.js +32 -15
- package/dist/components/tree-view2.js.map +1 -1
- package/dist/esm/ch-dropdown_2.entry.js +1 -1
- package/dist/esm/ch-dropdown_2.entry.js.map +1 -1
- package/dist/esm/ch-grid_8.entry.js +339 -321
- package/dist/esm/ch-grid_8.entry.js.map +1 -1
- package/dist/esm/ch-icon_5.entry.js +3 -1
- package/dist/esm/ch-icon_5.entry.js.map +1 -1
- package/dist/esm/ch-suggest_4.entry.js +1 -1
- package/dist/esm/ch-suggest_4.entry.js.map +1 -1
- package/dist/esm/ch-tree-view_5.entry.js +41 -20
- package/dist/esm/ch-tree-view_5.entry.js.map +1 -1
- package/dist/esm/{common-f2983db2.js → common-aaad5759.js} +31 -2
- package/dist/esm/common-aaad5759.js.map +1 -0
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-add-module-servers.entry.js +94 -0
- package/dist/esm/gx-ide-add-module-servers.entry.js.map +1 -0
- package/dist/esm/{gx-ide-container_2.entry.js → gx-ide-container_3.entry.js} +47 -5
- package/dist/esm/gx-ide-container_3.entry.js.map +1 -0
- package/dist/esm/gx-ide-create-kb-from-server.entry.js +2 -2
- package/dist/esm/gx-ide-create-kb-from-server.entry.js.map +1 -1
- package/dist/esm/gx-ide-edit-module-servers.entry.js +94 -0
- package/dist/esm/gx-ide-edit-module-servers.entry.js.map +1 -0
- package/dist/esm/gx-ide-empty-state_2.entry.js.map +1 -1
- package/dist/esm/gx-ide-import-from-design.entry.js +1 -1
- package/dist/esm/gx-ide-manage-module-references.entry.js +228 -0
- package/dist/esm/gx-ide-manage-module-references.entry.js.map +1 -0
- package/dist/esm/gx-ide-new-environment.entry.js +1 -1
- package/dist/esm/gx-ide-new-kb.entry.js +1 -1
- package/dist/esm/gx-ide-share-kb.entry.js +1 -1
- package/dist/esm/gx-ide-status-buttons.entry.js +77 -0
- package/dist/esm/gx-ide-status-buttons.entry.js.map +1 -0
- package/dist/esm/gx-ide-ww-images.entry.js +1 -1
- package/dist/esm/gxg-buttons-container_2.entry.js +179 -0
- package/dist/esm/gxg-buttons-container_2.entry.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.css +5 -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/add-module-servers/langs/add-module-servers.lang.en.json +11 -0
- package/dist/genexus-ide-ui/gx-ide-assets/add-module-servers/langs/add-module-servers.lang.ja.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/add-module-servers/langs/add-module-servers.lang.zh.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/edit-module-servers/langs/edit-module-servers.lang.en.json +11 -0
- package/dist/genexus-ide-ui/gx-ide-assets/edit-module-servers/langs/edit-module-servers.lang.ja.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/edit-module-servers/langs/edit-module-servers.lang.zh.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.en.json +29 -0
- package/dist/genexus-ide-ui/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.ja.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.zh.json +3 -0
- package/dist/genexus-ide-ui/{p-2c1f414f.entry.js → p-0c0c3f1d.entry.js} +53 -53
- package/dist/genexus-ide-ui/{p-2c1f414f.entry.js.map → p-0c0c3f1d.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-b571e9c0.entry.js → p-0df39b62.entry.js} +5 -2
- package/dist/genexus-ide-ui/{p-b571e9c0.entry.js.map → p-0df39b62.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-419b2877.entry.js → p-1cb2d0df.entry.js} +80 -47
- package/dist/genexus-ide-ui/p-1cb2d0df.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-350f49ac.js +101 -0
- package/dist/genexus-ide-ui/p-350f49ac.js.map +1 -0
- package/dist/genexus-ide-ui/p-36544e00.entry.js +138 -0
- package/dist/genexus-ide-ui/p-36544e00.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-ca7233a5.entry.js → p-39337325.entry.js} +81 -10
- package/dist/genexus-ide-ui/p-39337325.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-40121554.entry.js.map +1 -1
- package/dist/genexus-ide-ui/p-41ac8e60.entry.js +211 -0
- package/dist/genexus-ide-ui/p-41ac8e60.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-001e085a.entry.js → p-51e86542.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-d14b5546.entry.js → p-6f5b13a7.entry.js} +4 -2
- package/dist/genexus-ide-ui/{p-d14b5546.entry.js.map → p-6f5b13a7.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-94015503.entry.js → p-786e5448.entry.js} +374 -380
- package/dist/genexus-ide-ui/p-786e5448.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-a46794f4.entry.js +138 -0
- package/dist/genexus-ide-ui/p-a46794f4.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-adaf7aff.entry.js +365 -0
- package/dist/genexus-ide-ui/p-adaf7aff.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-afce38d4.entry.js → p-b2099890.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-513ec2ad.entry.js → p-b4e526d6.entry.js} +2 -2
- package/dist/genexus-ide-ui/p-b7d0697f.entry.js +138 -0
- package/dist/genexus-ide-ui/p-b7d0697f.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-8e8bb528.entry.js → p-c14b6b77.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-8e8bb528.entry.js.map → p-c14b6b77.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-2c733995.entry.js → p-d5903356.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-05102700.entry.js → p-df72101e.entry.js} +2 -2
- package/dist/node_modules/@genexus/chameleon-controls-library/dist/collection/components/dropdown/dropdown.css +28 -28
- package/dist/node_modules/@genexus/chameleon-controls-library/dist/collection/components/tree-view/tree-view-item/tree-view-item.css +0 -2
- package/dist/node_modules/@genexus/gemini/dist/collection/components/buttons-container/buttons-container.css +11 -0
- package/dist/node_modules/@genexus/gemini/dist/collection/components/suggest/styles.css +1 -0
- package/dist/node_modules/@genexus/gemini/dist/collection/components/top-state-bar/gxg-top-state-bar.css +32 -41
- package/dist/node_modules/@genexus/gemini/dist/collection/components/tree-view/tree-view.css +37 -54
- package/dist/types/common/common.d.ts +2 -0
- package/dist/types/components/_helpers/container/container.d.ts +8 -0
- package/dist/types/components/modules/add-module-servers/add-module-servers.d.ts +60 -0
- package/dist/types/components/modules/edit-module-servers/edit-module-servers.d.ts +60 -0
- package/dist/types/components/modules/manage-module-references/manage-module-references.d.ts +98 -0
- package/dist/types/components/modules/types.d.ts +40 -0
- package/dist/types/components.d.ts +312 -52
- package/package.json +3 -3
- package/dist/cjs/common-103f62f6.js.map +0 -1
- package/dist/cjs/gx-ide-container_2.cjs.entry.js.map +0 -1
- package/dist/cjs/gx-ide-status-buttons_2.cjs.entry.js +0 -187
- package/dist/cjs/gx-ide-status-buttons_2.cjs.entry.js.map +0 -1
- package/dist/cjs/gxg-buttons-container.cjs.entry.js +0 -65
- package/dist/cjs/gxg-buttons-container.cjs.entry.js.map +0 -1
- package/dist/cjs/gxg-title.cjs.entry.js +0 -47
- package/dist/cjs/gxg-title.cjs.entry.js.map +0 -1
- package/dist/esm/common-f2983db2.js.map +0 -1
- package/dist/esm/gx-ide-container_2.entry.js.map +0 -1
- package/dist/esm/gx-ide-status-buttons_2.entry.js +0 -182
- package/dist/esm/gx-ide-status-buttons_2.entry.js.map +0 -1
- package/dist/esm/gxg-buttons-container.entry.js +0 -61
- package/dist/esm/gxg-buttons-container.entry.js.map +0 -1
- package/dist/esm/gxg-title.entry.js +0 -43
- package/dist/esm/gxg-title.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-419b2877.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-67406b36.entry.js +0 -71
- package/dist/genexus-ide-ui/p-67406b36.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-67ea84e8.js +0 -74
- package/dist/genexus-ide-ui/p-67ea84e8.js.map +0 -1
- package/dist/genexus-ide-ui/p-94015503.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-ca7233a5.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-cf5c3c10.entry.js +0 -270
- package/dist/genexus-ide-ui/p-cf5c3c10.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-d50b5b9a.entry.js +0 -67
- package/dist/genexus-ide-ui/p-d50b5b9a.entry.js.map +0 -1
- /package/dist/genexus-ide-ui/{p-001e085a.entry.js.map → p-51e86542.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-afce38d4.entry.js.map → p-b2099890.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-513ec2ad.entry.js.map → p-b4e526d6.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-2c733995.entry.js.map → p-d5903356.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-05102700.entry.js.map → p-df72101e.entry.js.map} +0 -0
|
@@ -10,6 +10,8 @@ export class GxIdeContainer {
|
|
|
10
10
|
"heading--no-border": this.noHeadingBorder || this.hasOnlyHeading,
|
|
11
11
|
[`heading--justify-${this.headingJustify}`]: true,
|
|
12
12
|
"heading--no-padding": this.noHeadingPadding,
|
|
13
|
+
"heading--no-padding-block-end": this.noHeadingPaddingBlockEnd,
|
|
14
|
+
"heading--no-gap": this.noHeadingGap,
|
|
13
15
|
"heading--padding-top": this.headingPaddingTop && ((_a = this.containerTitle) === null || _a === void 0 ? void 0 : _a.length) > 0,
|
|
14
16
|
"heading--form-text-height": this.titleHeightAsInput,
|
|
15
17
|
"heading--flex-row": this.flexRow
|
|
@@ -58,7 +60,9 @@ export class GxIdeContainer {
|
|
|
58
60
|
this.sectionsPadding = "m";
|
|
59
61
|
this.titleAlignment = "center";
|
|
60
62
|
this.noHeadingBorder = false;
|
|
63
|
+
this.noHeadingGap = false;
|
|
61
64
|
this.noHeadingPadding = false;
|
|
65
|
+
this.noHeadingPaddingBlockEnd = false;
|
|
62
66
|
this.headingPaddingTop = false;
|
|
63
67
|
this.headingJustify = "center";
|
|
64
68
|
this.titleHeightAsInput = false;
|
|
@@ -389,6 +393,24 @@ export class GxIdeContainer {
|
|
|
389
393
|
"reflect": false,
|
|
390
394
|
"defaultValue": "false"
|
|
391
395
|
},
|
|
396
|
+
"noHeadingGap": {
|
|
397
|
+
"type": "boolean",
|
|
398
|
+
"mutable": false,
|
|
399
|
+
"complexType": {
|
|
400
|
+
"original": "boolean",
|
|
401
|
+
"resolved": "boolean",
|
|
402
|
+
"references": {}
|
|
403
|
+
},
|
|
404
|
+
"required": false,
|
|
405
|
+
"optional": false,
|
|
406
|
+
"docs": {
|
|
407
|
+
"tags": [],
|
|
408
|
+
"text": "Removes the heading gap"
|
|
409
|
+
},
|
|
410
|
+
"attribute": "no-heading-gap",
|
|
411
|
+
"reflect": false,
|
|
412
|
+
"defaultValue": "false"
|
|
413
|
+
},
|
|
392
414
|
"noHeadingPadding": {
|
|
393
415
|
"type": "boolean",
|
|
394
416
|
"mutable": false,
|
|
@@ -407,6 +429,24 @@ export class GxIdeContainer {
|
|
|
407
429
|
"reflect": false,
|
|
408
430
|
"defaultValue": "false"
|
|
409
431
|
},
|
|
432
|
+
"noHeadingPaddingBlockEnd": {
|
|
433
|
+
"type": "boolean",
|
|
434
|
+
"mutable": false,
|
|
435
|
+
"complexType": {
|
|
436
|
+
"original": "boolean",
|
|
437
|
+
"resolved": "boolean",
|
|
438
|
+
"references": {}
|
|
439
|
+
},
|
|
440
|
+
"required": false,
|
|
441
|
+
"optional": false,
|
|
442
|
+
"docs": {
|
|
443
|
+
"tags": [],
|
|
444
|
+
"text": "Removes the padding block end from the heading"
|
|
445
|
+
},
|
|
446
|
+
"attribute": "no-heading-padding-block-end",
|
|
447
|
+
"reflect": false,
|
|
448
|
+
"defaultValue": "false"
|
|
449
|
+
},
|
|
410
450
|
"headingPaddingTop": {
|
|
411
451
|
"type": "boolean",
|
|
412
452
|
"mutable": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../../src/components/_helpers/container/container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQzE,MAAM,OAAO,cAAc;;QAoSjB,mBAAc,GAAG,GAA8C,EAAE;;YACvE,OAAO;gBACL,SAAS,EAAE,IAAI;gBACf,mBAAmB,EAAE,IAAI,CAAC,aAAa;gBACvC,kBAAkB,EAAE,IAAI,CAAC,SAAS,KAAK,WAAW;gBAClD,oBAAoB,EAAE,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,cAAc;gBACjE,CAAC,oBAAoB,IAAI,CAAC,cAAc,EAAE,CAAC,EAAE,IAAI;gBACjD,qBAAqB,EAAE,IAAI,CAAC,gBAAgB;gBAC5C,sBAAsB,EACpB,IAAI,CAAC,iBAAiB,IAAI,CAAA,MAAA,IAAI,CAAC,cA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BAAsB,EAAE,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,cAAc;oBACnE,sBAAsB,EAAE,CAAC,IAAI,CAAC,aAAa;iBAC5C,IAEA,MAAM,CACH,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Element, State } from \"@stencil/core\";\nimport { TitleAlignment } from \"@genexus/gemini/dist/types/common/types\";\nimport { TitleType } from \"../title/title\";\n@Component({\n tag: \"gx-ide-container\",\n styleUrl: \"container.scss\",\n shadow: true\n})\nexport class GxIdeContainer {\n /*\nINDEX:\n1.OWN PROPERTIES\n2.REFERENCE TO ELEMENTS\n3.STATE() VARIABLES\n4.PUBLIC PROPERTY API\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 /* GENERAL */\n\n /**\n * By setting the title to inactive, the color will be gray instead of black.\n */\n @Prop() readonly inactiveTitle: boolean = false;\n\n /**\n * The title of the container\n */\n @Prop() readonly containerTitle: string;\n\n /**\n * The title of the container\n */\n @Prop() readonly titleType: TitleType = \"primary\";\n\n /**\n * Displays a border all around the container\n */\n @Prop() readonly displayBorder: boolean = false;\n\n /**\n * Displays a border on the top\n */\n @Prop() readonly displayBorderTop: boolean = false;\n\n /**\n * Displays a border at the end\n */\n @Prop() readonly displayBorderEnd: boolean = false;\n\n /**\n * Displays a border at on the bottom\n */\n @Prop() readonly displayBorderBottom: boolean = false;\n\n /**\n * Displays a border at the start\n */\n @Prop() readonly displayBorderStart: boolean = false;\n\n /**\n * The container general padding (applies to .heading, .content, and .footer)\n */\n @Prop() readonly sectionsPadding: SectionsPadding = \"m\";\n\n /* HEADING*/\n\n /**\n * Title alignment\n */\n @Prop() readonly titleAlignment: TitleAlignment = \"center\";\n\n /**\n * Removes the border bottom from the heading\n */\n @Prop() readonly noHeadingBorder: boolean = false;\n\n /**\n * Removes the padding from the heading\n */\n @Prop() readonly noHeadingPadding: boolean = false;\n\n /**\n * Adds padding to the top of the heading\n */\n @Prop() readonly headingPaddingTop: boolean = false;\n\n /**\n * The heading justification\n */\n @Prop() readonly headingJustify: HeadingJustify = \"center\";\n\n /**\n * It forces the .heading__title min-height to be as tall as the gxg-form-text height. This is useful when you are displaying two gx-ide-container's on the same row, both of them display a title, and one of them displays a gxg-form-text in the header (usually used to filter content). Without this property set to true, the .heading without a gxg-from-text would be shorter. At the time of writing, this is used on ww-images.\n */\n @Prop() readonly titleHeightAsInput: boolean = false;\n\n /**\n * Makes the header (.heading) display flex:row, instad of the default flex:column.\n */\n @Prop() readonly flexRow: boolean = false;\n\n /* CONTENT */\n\n /**\n * Makes the content a flex container\n */\n @Prop() readonly flexContent: boolean = false;\n\n /**\n * Removes the border-top from the content\n */\n @Prop() readonly noContentBorderTop: boolean = false;\n\n /**\n * Removes the padding from the content\n */\n @Prop() readonly noContentPadding: boolean = false;\n\n /**\n * Removes the gap from the content\n */\n @Prop() readonly noContentGap: boolean = false;\n\n /**\n * Align items\n */\n @Prop() readonly alignItems: AlignItems = undefined;\n\n /**\n * Justify content\n */\n @Prop() readonly justifyContent: JustifyContent = undefined;\n\n /**\n * Display border end on the content\n */\n @Prop() readonly contentBorderEnd: boolean = false;\n\n /* FOOTER ABOVE */\n\n /**\n * Makes the above footer vertical padding slimmer\n */\n @Prop() readonly slimmerAboveFooter: boolean = false;\n\n /**\n * Removes the above padding from the footer\n */\n @Prop() readonly noAboveFooterPadding: boolean = false;\n\n /**\n * Removes the above border top\n */\n @Prop() readonly noBorderAboveFooter: boolean = false;\n\n /* FOOTER > START and FOOTER > END*/\n\n /**\n * Makes the footer vertical padding slimmer\n */\n @Prop() readonly slimmerFooter: boolean = false;\n\n /**\n * Removes the padding from the footer\n */\n @Prop() readonly noFooterPadding: boolean = false;\n\n /**\n * The footer justification\n */\n @Prop() readonly footerJustify: FooterJustify = \"end\";\n\n /**\n * Removes the border top from the footer\n */\n @Prop() readonly noBorderFooter: boolean = false;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeContainerElement;\n\n // 3.STATE() VARIABLES //\n\n /**\n * A boolean variable indicating if the component has or not any content for the 'header' slot\n */\n @State() hasHeaderSlot = false;\n\n /**\n * A boolean variable indicating if the component has or not any content slotted content (regular slotted content, without 'slot' attribute)\n */\n @State() hasSlottedContent = false;\n\n /**\n * A boolean variable indicating if the component has or not any content for the 'footer' slot\n */\n @State() hasFooterSlot = false;\n\n /**\n * A boolean variable indicating if the component has or not any content for the 'footer' slot\n */\n @State() hasAboveFooterSlot = false;\n\n /**\n * A boolean variable indicating that the container only has the heading section\n */\n @State() hasOnlyHeading = false;\n\n /**\n * A boolean variable indicating that the container only has the content section\n */\n @State() hasOnlyContent = false;\n\n /**\n * A boolean variable indicating that the container only has the footer section\n */\n @State() hasOnlyFooter = false;\n\n // 4.PUBLIC PROPERTY API //\n\n // 5.EVENTS (EMIT) //\n\n // 6.COMPONENT LIFECYCLE EVENTS //\n\n componentWillLoad() {\n this.evaluateSlots();\n }\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n private evaluateSlots() {\n // header\n const headerSlot = this.el.querySelectorAll(':scope > [slot=\"header\"]');\n if (headerSlot.length) {\n this.hasHeaderSlot = true;\n }\n // content\n const slottedContent = this.el.querySelectorAll(\":scope > :not([slot])\");\n if (slottedContent.length) {\n this.hasSlottedContent = true;\n }\n // footer\n const footerAboveSlot = this.el.querySelectorAll(\n ':scope > [slot=\"footer-above\"]'\n );\n const footerStartSlot = this.el.querySelectorAll(\n ':scope > [slot=\"footer-start\"]'\n );\n const footerEndSlot = this.el.querySelectorAll(\n ':scope > [slot=\"footer-end\"]'\n );\n if (footerStartSlot.length || footerEndSlot.length) {\n this.hasFooterSlot = true;\n }\n if (footerAboveSlot.length) {\n this.hasAboveFooterSlot = true;\n }\n }\n\n private evaluateSections() {\n // has only heading\n if (\n !this.hasSlottedContent &&\n !this.hasFooterSlot &&\n !this.hasAboveFooterSlot\n ) {\n this.hasOnlyHeading = true;\n }\n // has only content\n if (\n this.hasSlottedContent &&\n !this.containerTitle &&\n !this.hasHeaderSlot &&\n !this.hasAboveFooterSlot &&\n !this.hasFooterSlot\n ) {\n this.hasOnlyContent = true;\n }\n // has only footer\n if (\n !this.hasSlottedContent &&\n !this.containerTitle &&\n !this.hasAboveFooterSlot\n ) {\n this.hasOnlyFooter = true;\n }\n }\n\n private headingClasses = (): string | { [className: string]: boolean } => {\n return {\n \"heading\": true,\n \"heading--inactive\": this.inactiveTitle,\n \"heading--slimmer\": this.titleType === \"secondary\",\n \"heading--no-border\": this.noHeadingBorder || this.hasOnlyHeading,\n [`heading--justify-${this.headingJustify}`]: true,\n \"heading--no-padding\": this.noHeadingPadding,\n \"heading--padding-top\":\n this.headingPaddingTop && this.containerTitle?.length > 0,\n \"heading--form-text-height\": this.titleHeightAsInput,\n \"heading--flex-row\": this.flexRow\n };\n };\n\n private contentClasses = (): string | { [className: string]: boolean } => {\n return {\n \"content\": true,\n \"content--flex\": this.flexContent,\n \"content--no-padding\": this.noContentPadding,\n \"content--no-gap\": this.noContentGap,\n \"content--no-border-top\": this.noContentBorderTop,\n \"content--border-end\": this.contentBorderEnd,\n [`content--align-items-${this.alignItems}`]:\n this.alignItems !== undefined,\n [`content--justify-content-${this.justifyContent}`]:\n this.justifyContent !== undefined\n };\n };\n\n private aboveFooter = (): JSX.Element | null => {\n return this.hasAboveFooterSlot ? (\n <footer\n class={{\n \"footer-above\": true,\n \"footer-above--no-border-top\": this.noBorderAboveFooter,\n \"footer-above--no-padding\": this.noAboveFooterPadding,\n \"footer-above--slimmer\": this.slimmerFooter\n }}\n >\n <slot name=\"footer-above\"></slot>\n </footer>\n ) : null;\n };\n\n private footer = (): JSX.Element | null => {\n return this.hasFooterSlot ? (\n <footer\n class={{\n \"footer\": true,\n \"footer--no-border\":\n this.hasOnlyFooter ||\n !this.hasSlottedContent ||\n this.noBorderFooter,\n [`footer--justify-${this.footerJustify}`]: true,\n [`footer--justify-${this.footerJustify}`]: true,\n \"footer--no-padding\": this.noFooterPadding,\n \"footer--slimmer\": this.slimmerFooter\n }}\n >\n <div class=\"footer__start\">\n <slot name=\"footer-start\"></slot>\n </div>\n <div class=\"footer__end\">\n <slot name=\"footer-end\"></slot>\n </div>\n </footer>\n ) : null;\n };\n\n // 10.RENDER() FUNCTION //\n\n render() {\n this.evaluateSections();\n const result = [\n this.containerTitle || this.hasHeaderSlot ? (\n <header class={this.headingClasses()}>\n {this.containerTitle ? (\n <gx-ide-title\n class=\"heading__title\"\n type={this.titleType}\n alignment={this.titleAlignment as any}\n >\n {this.containerTitle}\n </gx-ide-title>\n ) : null}\n {this.hasHeaderSlot ? (\n <div class=\"heading__inner-wrapper\">\n <slot name=\"header\"></slot>\n </div>\n ) : null}\n </header>\n ) : null,\n this.hasSlottedContent ? (\n <div class={this.contentClasses()} part=\"content\">\n <slot></slot>\n </div>\n ) : null,\n this.aboveFooter(),\n this.footer()\n ];\n\n return (\n <Host>\n <div\n class={{\n \"container\": true,\n [`container--padding-${this.sectionsPadding}`]: true,\n \"container--display-border\": this.displayBorder,\n \"container--display-border-top\": this.displayBorderTop,\n \"container--display-border-end\": this.displayBorderEnd,\n \"container--display-border-bottom\": this.displayBorderBottom,\n \"container--display-border-start\": this.displayBorderStart,\n \"container--only-content\": this.hasOnlyContent,\n \"container--no-header\": !this.hasHeaderSlot && !this.containerTitle,\n \"container--no-footer\": !this.hasFooterSlot\n }}\n >\n {result}\n </div>\n </Host>\n );\n }\n}\n\nexport type HeadingJustify = \"start\" | \"center\" | \"end\";\nexport type FooterJustify = \"start\" | \"center\" | \"end\";\nexport type SectionsPadding = \"s\" | \"m\" | \"l\";\nexport type AlignItems = \"start\" | \"center\" | \"end\";\nexport type JustifyContent = \"start\" | \"center\" | \"end\";\n"]}
|
|
1
|
+
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../../src/components/_helpers/container/container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQzE,MAAM,OAAO,cAAc;;QAgSjB,mBAAc,GAAG,GAA8C,EAAE;;YACvE,OAAO;gBACL,SAAS,EAAE,IAAI;gBACf,mBAAmB,EAAE,IAAI,CAAC,aAAa;gBACvC,kBAAkB,EAAE,IAAI,CAAC,SAAS,KAAK,WAAW;gBAClD,oBAAoB,EAAE,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,cAAc;gBACjE,CAAC,oBAAoB,IAAI,CAAC,cAAc,EAAE,CAAC,EAAE,IAAI;gBACjD,qBAAqB,EAAE,IAAI,CAAC,g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CAAC,gBAAgB;oBACtD,+BAA+B,EAAE,IAAI,CAAC,gBAAgB;oBACtD,kCAAkC,EAAE,IAAI,CAAC,mBAAmB;oBAC5D,iCAAiC,EAAE,IAAI,CAAC,kBAAkB;oBAC1D,yBAAyB,EAAE,IAAI,CAAC,cAAc;oBAC9C,sBAAsB,EAAE,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,cAAc;oBACnE,sBAAsB,EAAE,CAAC,IAAI,CAAC,aAAa;iBAC5C,IAEA,MAAM,CACH,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Element, State } from \"@stencil/core\";\nimport { TitleAlignment } from \"@genexus/gemini/dist/types/common/types\";\nimport { TitleType } from \"../title/title\";\n@Component({\n tag: \"gx-ide-container\",\n styleUrl: \"container.scss\",\n shadow: true\n})\nexport class GxIdeContainer {\n // 1.OWN PROPERTIES //\n\n /* GENERAL */\n\n /**\n * By setting the title to inactive, the color will be gray instead of black.\n */\n @Prop() readonly inactiveTitle: boolean = false;\n\n /**\n * The title of the container\n */\n @Prop() readonly containerTitle: string;\n\n /**\n * The title of the container\n */\n @Prop() readonly titleType: TitleType = \"primary\";\n\n /**\n * Displays a border all around the container\n */\n @Prop() readonly displayBorder: boolean = false;\n\n /**\n * Displays a border on the top\n */\n @Prop() readonly displayBorderTop: boolean = false;\n\n /**\n * Displays a border at the end\n */\n @Prop() readonly displayBorderEnd: boolean = false;\n\n /**\n * Displays a border at on the bottom\n */\n @Prop() readonly displayBorderBottom: boolean = false;\n\n /**\n * Displays a border at the start\n */\n @Prop() readonly displayBorderStart: boolean = false;\n\n /**\n * The container general padding (applies to .heading, .content, and .footer)\n */\n @Prop() readonly sectionsPadding: SectionsPadding = \"m\";\n\n /* HEADING*/\n\n /**\n * Title alignment\n */\n @Prop() readonly titleAlignment: TitleAlignment = \"center\";\n\n /**\n * Removes the border bottom from the heading\n */\n @Prop() readonly noHeadingBorder: boolean = false;\n\n /**\n * Removes the heading gap\n */\n @Prop() readonly noHeadingGap: boolean = false;\n\n /**\n * Removes the padding from the heading\n */\n @Prop() readonly noHeadingPadding: boolean = false;\n\n /**\n * Removes the padding block end from the heading\n */\n @Prop() readonly noHeadingPaddingBlockEnd: boolean = false;\n\n /**\n * Adds padding to the top of the heading\n */\n @Prop() readonly headingPaddingTop: boolean = false;\n\n /**\n * The heading justification\n */\n @Prop() readonly headingJustify: HeadingJustify = \"center\";\n\n /**\n * It forces the .heading__title min-height to be as tall as the gxg-form-text height. This is useful when you are displaying two gx-ide-container's on the same row, both of them display a title, and one of them displays a gxg-form-text in the header (usually used to filter content). Without this property set to true, the .heading without a gxg-from-text would be shorter. At the time of writing, this is used on ww-images.\n */\n @Prop() readonly titleHeightAsInput: boolean = false;\n\n /**\n * Makes the header (.heading) display flex:row, instad of the default flex:column.\n */\n @Prop() readonly flexRow: boolean = false;\n\n /* CONTENT */\n\n /**\n * Makes the content a flex container\n */\n @Prop() readonly flexContent: boolean = false;\n\n /**\n * Removes the border-top from the content\n */\n @Prop() readonly noContentBorderTop: boolean = false;\n\n /**\n * Removes the padding from the content\n */\n @Prop() readonly noContentPadding: boolean = false;\n\n /**\n * Removes the gap from the content\n */\n @Prop() readonly noContentGap: boolean = false;\n\n /**\n * Align items\n */\n @Prop() readonly alignItems: AlignItems = undefined;\n\n /**\n * Justify content\n */\n @Prop() readonly justifyContent: JustifyContent = undefined;\n\n /**\n * Display border end on the content\n */\n @Prop() readonly contentBorderEnd: boolean = false;\n\n /* FOOTER ABOVE */\n\n /**\n * Makes the above footer vertical padding slimmer\n */\n @Prop() readonly slimmerAboveFooter: boolean = false;\n\n /**\n * Removes the above padding from the footer\n */\n @Prop() readonly noAboveFooterPadding: boolean = false;\n\n /**\n * Removes the above border top\n */\n @Prop() readonly noBorderAboveFooter: boolean = false;\n\n /* FOOTER > START and FOOTER > END*/\n\n /**\n * Makes the footer vertical padding slimmer\n */\n @Prop() readonly slimmerFooter: boolean = false;\n\n /**\n * Removes the padding from the footer\n */\n @Prop() readonly noFooterPadding: boolean = false;\n\n /**\n * The footer justification\n */\n @Prop() readonly footerJustify: FooterJustify = \"end\";\n\n /**\n * Removes the border top from the footer\n */\n @Prop() readonly noBorderFooter: boolean = false;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeContainerElement;\n\n // 3.STATE() VARIABLES //\n\n /**\n * A boolean variable indicating if the component has or not any content for the 'header' slot\n */\n @State() hasHeaderSlot = false;\n\n /**\n * A boolean variable indicating if the component has or not any content slotted content (regular slotted content, without 'slot' attribute)\n */\n @State() hasSlottedContent = false;\n\n /**\n * A boolean variable indicating if the component has or not any content for the 'footer' slot\n */\n @State() hasFooterSlot = false;\n\n /**\n * A boolean variable indicating if the component has or not any content for the 'footer' slot\n */\n @State() hasAboveFooterSlot = false;\n\n /**\n * A boolean variable indicating that the container only has the heading section\n */\n @State() hasOnlyHeading = false;\n\n /**\n * A boolean variable indicating that the container only has the content section\n */\n @State() hasOnlyContent = false;\n\n /**\n * A boolean variable indicating that the container only has the footer section\n */\n @State() hasOnlyFooter = false;\n\n // 4.PUBLIC PROPERTY API //\n\n // 5.EVENTS (EMIT) //\n\n // 6.COMPONENT LIFECYCLE EVENTS //\n\n componentWillLoad() {\n this.evaluateSlots();\n }\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n private evaluateSlots() {\n // header\n const headerSlot = this.el.querySelectorAll(':scope > [slot=\"header\"]');\n if (headerSlot.length) {\n this.hasHeaderSlot = true;\n }\n // content\n const slottedContent = this.el.querySelectorAll(\":scope > :not([slot])\");\n if (slottedContent.length) {\n this.hasSlottedContent = true;\n }\n // footer\n const footerAboveSlot = this.el.querySelectorAll(\n ':scope > [slot=\"footer-above\"]'\n );\n const footerStartSlot = this.el.querySelectorAll(\n ':scope > [slot=\"footer-start\"]'\n );\n const footerEndSlot = this.el.querySelectorAll(\n ':scope > [slot=\"footer-end\"]'\n );\n if (footerStartSlot.length || footerEndSlot.length) {\n this.hasFooterSlot = true;\n }\n if (footerAboveSlot.length) {\n this.hasAboveFooterSlot = true;\n }\n }\n\n private evaluateSections() {\n // has only heading\n if (\n !this.hasSlottedContent &&\n !this.hasFooterSlot &&\n !this.hasAboveFooterSlot\n ) {\n this.hasOnlyHeading = true;\n }\n // has only content\n if (\n this.hasSlottedContent &&\n !this.containerTitle &&\n !this.hasHeaderSlot &&\n !this.hasAboveFooterSlot &&\n !this.hasFooterSlot\n ) {\n this.hasOnlyContent = true;\n }\n // has only footer\n if (\n !this.hasSlottedContent &&\n !this.containerTitle &&\n !this.hasAboveFooterSlot\n ) {\n this.hasOnlyFooter = true;\n }\n }\n\n private headingClasses = (): string | { [className: string]: boolean } => {\n return {\n \"heading\": true,\n \"heading--inactive\": this.inactiveTitle,\n \"heading--slimmer\": this.titleType === \"secondary\",\n \"heading--no-border\": this.noHeadingBorder || this.hasOnlyHeading,\n [`heading--justify-${this.headingJustify}`]: true,\n \"heading--no-padding\": this.noHeadingPadding,\n \"heading--no-padding-block-end\": this.noHeadingPaddingBlockEnd,\n \"heading--no-gap\": this.noHeadingGap,\n \"heading--padding-top\":\n this.headingPaddingTop && this.containerTitle?.length > 0,\n \"heading--form-text-height\": this.titleHeightAsInput,\n \"heading--flex-row\": this.flexRow\n };\n };\n\n private contentClasses = (): string | { [className: string]: boolean } => {\n return {\n \"content\": true,\n \"content--flex\": this.flexContent,\n \"content--no-padding\": this.noContentPadding,\n \"content--no-gap\": this.noContentGap,\n \"content--no-border-top\": this.noContentBorderTop,\n \"content--border-end\": this.contentBorderEnd,\n [`content--align-items-${this.alignItems}`]:\n this.alignItems !== undefined,\n [`content--justify-content-${this.justifyContent}`]:\n this.justifyContent !== undefined\n };\n };\n\n private aboveFooter = (): JSX.Element | null => {\n return this.hasAboveFooterSlot ? (\n <footer\n class={{\n \"footer-above\": true,\n \"footer-above--no-border-top\": this.noBorderAboveFooter,\n \"footer-above--no-padding\": this.noAboveFooterPadding,\n \"footer-above--slimmer\": this.slimmerFooter\n }}\n >\n <slot name=\"footer-above\"></slot>\n </footer>\n ) : null;\n };\n\n private footer = (): JSX.Element | null => {\n return this.hasFooterSlot ? (\n <footer\n class={{\n \"footer\": true,\n \"footer--no-border\":\n this.hasOnlyFooter ||\n !this.hasSlottedContent ||\n this.noBorderFooter,\n [`footer--justify-${this.footerJustify}`]: true,\n [`footer--justify-${this.footerJustify}`]: true,\n \"footer--no-padding\": this.noFooterPadding,\n \"footer--slimmer\": this.slimmerFooter\n }}\n >\n <div class=\"footer__start\">\n <slot name=\"footer-start\"></slot>\n </div>\n <div class=\"footer__end\">\n <slot name=\"footer-end\"></slot>\n </div>\n </footer>\n ) : null;\n };\n\n // 10.RENDER() FUNCTION //\n\n render() {\n this.evaluateSections();\n const result = [\n this.containerTitle || this.hasHeaderSlot ? (\n <header class={this.headingClasses()}>\n {this.containerTitle ? (\n <gx-ide-title\n class=\"heading__title\"\n type={this.titleType}\n alignment={this.titleAlignment as any}\n >\n {this.containerTitle}\n </gx-ide-title>\n ) : null}\n {this.hasHeaderSlot ? (\n <div class=\"heading__inner-wrapper\">\n <slot name=\"header\"></slot>\n </div>\n ) : null}\n </header>\n ) : null,\n this.hasSlottedContent ? (\n <div class={this.contentClasses()} part=\"content\">\n <slot></slot>\n </div>\n ) : null,\n this.aboveFooter(),\n this.footer()\n ];\n\n return (\n <Host>\n <div\n class={{\n \"container\": true,\n [`container--padding-${this.sectionsPadding}`]: true,\n \"container--display-border\": this.displayBorder,\n \"container--display-border-top\": this.displayBorderTop,\n \"container--display-border-end\": this.displayBorderEnd,\n \"container--display-border-bottom\": this.displayBorderBottom,\n \"container--display-border-start\": this.displayBorderStart,\n \"container--only-content\": this.hasOnlyContent,\n \"container--no-header\": !this.hasHeaderSlot && !this.containerTitle,\n \"container--no-footer\": !this.hasFooterSlot\n }}\n >\n {result}\n </div>\n </Host>\n );\n }\n}\n\nexport type HeadingJustify = \"start\" | \"center\" | \"end\";\nexport type FooterJustify = \"start\" | \"center\" | \"end\";\nexport type SectionsPadding = \"s\" | \"m\" | \"l\";\nexport type AlignItems = \"start\" | \"center\" | \"end\";\nexport type JustifyContent = \"start\" | \"center\" | \"end\";\n"]}
|
package/dist/collection/components/_helpers/list-selector/list-selector-item/list-selector-item.js
CHANGED
|
@@ -249,7 +249,7 @@ export class GxIdeListSelectorItem {
|
|
|
249
249
|
"mutable": true,
|
|
250
250
|
"complexType": {
|
|
251
251
|
"original": "Color",
|
|
252
|
-
"resolved": "\"alwaysblack\" | \"auto\" | \"disabled\" | \"error\" | \"indeterminate\" | \"mercury\" | \"mercury-neutral\" | \"mercury-on-primary\" | \"mercury-primary\" | \"mercury-text-on-message\" | \"negative\" | \"onbackground\" | \"ondisabled\" | \"primary-active\" | \"primary-enabled\" | \"primary-hover\" | \"success\" | \"warning\"",
|
|
252
|
+
"resolved": "\"alwaysblack\" | \"auto\" | \"disabled\" | \"error\" | \"indeterminate\" | \"mercury\" | \"mercury-neutral\" | \"mercury-on-primary\" | \"mercury-on-surface\" | \"mercury-primary\" | \"mercury-primary-disabled\" | \"mercury-text-on-message\" | \"negative\" | \"onbackground\" | \"ondisabled\" | \"primary-active\" | \"primary-enabled\" | \"primary-hover\" | \"success\" | \"warning\"",
|
|
253
253
|
"references": {
|
|
254
254
|
"Color": {
|
|
255
255
|
"location": "import",
|
|
@@ -244,7 +244,7 @@ export class GxIdeListSelector {
|
|
|
244
244
|
"mutable": false,
|
|
245
245
|
"complexType": {
|
|
246
246
|
"original": "Color",
|
|
247
|
-
"resolved": "\"alwaysblack\" | \"auto\" | \"disabled\" | \"error\" | \"indeterminate\" | \"mercury\" | \"mercury-neutral\" | \"mercury-on-primary\" | \"mercury-primary\" | \"mercury-text-on-message\" | \"negative\" | \"onbackground\" | \"ondisabled\" | \"primary-active\" | \"primary-enabled\" | \"primary-hover\" | \"success\" | \"warning\"",
|
|
247
|
+
"resolved": "\"alwaysblack\" | \"auto\" | \"disabled\" | \"error\" | \"indeterminate\" | \"mercury\" | \"mercury-neutral\" | \"mercury-on-primary\" | \"mercury-on-surface\" | \"mercury-primary\" | \"mercury-primary-disabled\" | \"mercury-text-on-message\" | \"negative\" | \"onbackground\" | \"ondisabled\" | \"primary-active\" | \"primary-enabled\" | \"primary-hover\" | \"success\" | \"warning\"",
|
|
248
248
|
"references": {
|
|
249
249
|
"Color": {
|
|
250
250
|
"location": "import",
|
|
@@ -128,7 +128,7 @@ export class GxIdeCreateKbFromServer {
|
|
|
128
128
|
label: sUrl,
|
|
129
129
|
value: sUrl
|
|
130
130
|
})), "server-urls")
|
|
131
|
-
: null)), h("div", { class: "grid grid-data" }, h("div", null, h("div", { class: "grid grid-data-account" }, h("gxg-combo-box", { disableFilter: true, value: this.authenticationTypes[0].id, ref: (el) => (this.authenticationTypeEl = el), class: "authentication-type", part: "authentication-type", onValueChanged: this.evaluateAuthenticationType }, renderFormItems("gxg-combo-box-item", this.authenticationTypes, "authentication-type")), h("gxg-label", { labelPosition: "start", class: "kb-label" }, `${this._componentLocale.label.userName}:`), h("gxg-form-text", { ref: (el) => (this.userNameEl = el), value: this.userName, class: "user-name", part: "user-name" }), h("gxg-label", { labelPosition: "start", class: "kb-label" }, `${this._componentLocale.label.password}:`), h("gxg-form-text", { password: true, ref: (el) => (this.passwordEl = el), value: this.password, class: "password", part: "password" }), h("div", null, h("gxg-button", { id: "button-connect", type: "primary-text-only", onClick: this.connectCallbackHandler, part: "button-connect" }, this._componentLocale.buttons.connect)))), h("div", { class: "grid" }, h("div", { class: "grid-data-kbs" }, h("div", { class: "search-kbs" }, h("gxg-form-text", { ref: (el) => (this.searchKBEl = el), class: "search-kb-input", part: "search-kb", disabled: this.selectionKbDisabled, placeholder: this._componentLocale.label.searchKbs })), h("div", { class: "box-kbs" }, h("gxg-list-box", { singleSelection: true, disabled: this.selectionKbDisabled, ref: (el) => (this.listBoxEl = el), part: "kbs" }, this.kbs
|
|
131
|
+
: null)), h("div", { class: "grid grid-data" }, h("div", null, h("div", { class: "grid grid-data-account" }, h("gxg-combo-box", { "tool-tip": true, disableFilter: true, value: this.authenticationTypes[0].id, ref: (el) => (this.authenticationTypeEl = el), class: "authentication-type", part: "authentication-type", onValueChanged: this.evaluateAuthenticationType }, renderFormItems("gxg-combo-box-item", this.authenticationTypes, "authentication-type")), h("gxg-label", { labelPosition: "start", class: "kb-label" }, `${this._componentLocale.label.userName}:`), h("gxg-form-text", { ref: (el) => (this.userNameEl = el), "tool-tip": true, value: this.userName, class: "user-name", part: "user-name" }), h("gxg-label", { labelPosition: "start", class: "kb-label" }, `${this._componentLocale.label.password}:`), h("gxg-form-text", { "tool-tip": true, password: true, ref: (el) => (this.passwordEl = el), value: this.password, class: "password", part: "password" }), h("div", null, h("gxg-button", { id: "button-connect", type: "primary-text-only", onClick: this.connectCallbackHandler, part: "button-connect" }, this._componentLocale.buttons.connect)))), h("div", { class: "grid" }, h("div", { class: "grid-data-kbs" }, h("div", { class: "search-kbs" }, h("gxg-form-text", { ref: (el) => (this.searchKBEl = el), class: "search-kb-input", part: "search-kb", disabled: this.selectionKbDisabled, placeholder: this._componentLocale.label.searchKbs })), h("div", { class: "box-kbs" }, h("gxg-list-box", { singleSelection: true, disabled: this.selectionKbDisabled, ref: (el) => (this.listBoxEl = el), part: "kbs" }, this.kbs
|
|
132
132
|
.filter(kb => kb.name
|
|
133
133
|
.toLowerCase()
|
|
134
134
|
.includes(this.kbSearchText.toLowerCase()))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-kb-from-server.js","sourceRoot":"","sources":["../../../src/components/create-kb-from-server/create-kb-from-server.tsx"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,OAAO,EACP,KAAK,EACL,YAAY,EACZ,KAAK,EACN,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAKtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAQpE,MAAM,OAAO,uBAAuB;;QAuB1B,sBAAiB,GAAG,KAAK,CAAC;QAC1B,iBAAY,GAAG,YAAY,CACjC,sDAAsD,CACvD,CAAC;QAUM,iBAAY,GAAW,IAAI,CAAC;QAC5B,wBAAmB,GAAe,EAAE,CAAC;QAyG7C,iBAAiB;QAEjB,0BAA0B;QAE1B,qBAAqB;QAEb,2BAAsB,GAAG,GAAG,EAAE;YACpC,IAAI,CAAC,mBAAmB,GAAG;gBACzB;oBACE,EAAE,EAAE,SAAS;oBACb,KAAK,EAAE,SAAS;oBAChB,KAAK,EAAE,IAAI,C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;;;;;;;;;CACF","sourcesContent":["/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n State,\n getAssetPath,\n Watch\n} from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\nimport { SelectionChangedEvent } from \"@genexus/gemini/dist/types/components/list-box/list-box\";\n/* CUSTOM IMPORTS */\nimport { GxOption } from \"../../common/types\";\nimport { Locale } from \"../../common/locale\";\nimport { renderFormItems } from \"../../common/common\";\nimport {\n FormSubmitResult,\n GxServerAuthenticationType\n} from \"../../common/types\";\nimport { formSubmitValidation } from \"../../common/form-validation\";\n\n@Component({\n tag: \"gx-ide-create-kb-from-server\",\n styleUrl: \"create-kb-from-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/create-kb-from-server\"]\n})\nexport class GxIdeCreateKbFromServer {\n [key: string]: any;\n\n /*\nINDEX:\n1.OWN PROPERTIES\n2.REFERENCE TO ELEMENTS\n3.STATE() VARIABLES\n4.PUBLIC PROPERTY API | WATCH'S\n5.EVENTS (EMIT)\n6.METHODS\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 private shortcutsSrc = getAssetPath(\n `./gx-ide-assets/create-kb-from-server/shortcuts.json`\n );\n\n /* References needed to collect data with \"Connect\" and \"Create\" buttons submit*/\n private authenticationTypeEl!: HTMLGxgComboBoxElement;\n private serverUrlsEl!: HTMLGxgComboBoxElement;\n private kbNameEl!: HTMLGxgFormTextElement;\n private passwordEl!: HTMLGxgFormTextElement;\n private userNameEl!: HTMLGxgFormTextElement;\n private searchKBEl!: HTMLGxgFormTextElement;\n private listBoxEl!: HTMLElement;\n private kbIdSelected: string = null;\n private authenticationTypes: GxOption[] = [];\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeCreateKbFromServerElement;\n\n // 3.STATE() VARIABLES //\n\n /**\n * Disabled or not the part for select and create the KB\n */\n @State() selectionKbDisabled = true;\n\n /**\n * KBs that return from connect to the server\n */\n\n @State() kbs: KBData[] = [];\n @Watch(\"kbs\")\n watchPropHandler(newKbs: KBData[]) {\n /* When the list of servers are updated, the first server is selected by default */\n this.kbIdSelected = newKbs[0].id;\n this.kbName = newKbs[0].name;\n }\n\n /**\n * KBs search text\n */\n @State() kbSearchText = \"\";\n\n // 4.PUBLIC PROPERTY API | WATCH'S //\n\n /**\n * If true it displays the component title on the header\n */\n @Prop() readonly displayTitle = false;\n\n /**\n * Callback that will be invoked when the user connect to the kb server (‘Connect’ button)\n */\n @Prop() readonly connectCallback: (\n data: GXServerConnectionData\n ) => Promise<ConnectionResultData>;\n\n /**\n * Callback that will be invoked when the user confirms KB creation (‘Create’ button)\n */\n @Prop() readonly createKBCallback: (\n data: CreateKBData\n ) => Promise<FormSubmitResult>;\n\n /**\n * If is true then the user can specify a server url that don't be in the combo box of server urls.\n */\n @Prop() readonly enableCustomServer: boolean = false;\n\n /**\n * The knowledge base default suggested name\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ mutable: true }) kbName: string;\n\n /**\n * Password for the database connection.\n */\n @Prop() readonly password: string;\n\n /**\n * Array of URLs of cataloged servers to be displayed in the combo\n */\n @Prop() readonly serverUrls!: string[];\n\n /**\n * Username for the database connection.\n */\n @Prop() readonly userName: string;\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.METHODS //\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n this.setAuthenticationTypes();\n }\n\n componentDidLoad() {\n (this.serverUrlsEl as HTMLElement).focus();\n this.addEventListeners();\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 private setAuthenticationTypes = () => {\n this.authenticationTypes = [\n {\n id: \"genexus\",\n value: \"genexus\",\n label: this._componentLocale.authenticationTypes.genexusAccount\n },\n {\n id: \"local\",\n value: \"local\",\n label: this._componentLocale.authenticationTypes.local\n }\n ];\n };\n\n private addEventListeners = () => {\n this.serverUrlsEl.addEventListener(\"valueChanged\", () => {\n this.reset();\n });\n\n this.searchKBEl.addEventListener(\n \"valueChanged\",\n (e: CustomEvent<string>) => {\n this.kbNameEl.value = \"\";\n this.kbIdSelected = null;\n this.kbSearchText = e.detail;\n }\n );\n\n this.listBoxEl.addEventListener(\n \"selectionChanged\",\n (ev: CustomEvent<SelectionChangedEvent>): void => {\n const selectedItems = ev.detail.items;\n let selectedItem;\n if (selectedItems.length > 0) {\n selectedItem = ev.detail.items[0];\n }\n if (selectedItem) {\n this.kbIdSelected = selectedItem.value;\n const kbSelected = this.kbs.find(kb => kb.id === this.kbIdSelected);\n if (kbSelected) {\n this.kbNameEl.value = kbSelected.name;\n }\n }\n }\n );\n };\n\n private reset() {\n this.kbs = [];\n this.kbIdSelected = null;\n this.selectionKbDisabled = true;\n this.searchKBEl.value = \"\";\n this.kbSearchText = \"\";\n }\n\n private createKbHandler = (): void => {\n if (this.createKBCallback) {\n const createKBCallbackPromise = this.createKBCallback({\n id: this.kbIdSelected,\n name: this.kbNameEl.value\n });\n createKBCallbackPromise.then((formSubmitResult: FormSubmitResult) => {\n formSubmitValidation(formSubmitResult, this);\n });\n }\n };\n\n private connectCallbackHandler = (): void => {\n if (this.connectCallback) {\n const connectCallbackPromise = this.connectCallback({\n serverUrl: this.serverUrlsEl.value,\n authenticationType: this.authenticationTypeEl.value,\n user: this.userNameEl?.value,\n password: this.passwordEl?.value\n });\n connectCallbackPromise.then(\n (connectionResultData: ConnectionResultData) => {\n formSubmitValidation(connectionResultData.formResult, this);\n if (\n connectionResultData.formResult.success &&\n connectionResultData.kbs\n ) {\n this.kbs = connectionResultData.kbs;\n this.selectionKbDisabled = false;\n }\n }\n );\n }\n };\n\n // 10.RENDER() FUNCTION //\n\n // 11.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 containerTitle={\n this.displayTitle ? this._componentLocale.componentName : null\n }\n >\n <div class=\"flex\">\n {/* #kb name */}\n <gxg-label labelPosition=\"start\" class=\"kb-label\">\n {this._componentLocale.label.serverUrl}\n </gxg-label>\n <gxg-combo-box\n disableFilter={!this.enableCustomServer}\n ref={(el: HTMLGxgComboBoxElement) =>\n (this.serverUrlsEl = el as HTMLGxgComboBoxElement)\n }\n class=\"server-urls-combo-box\"\n part=\"server-urls\"\n >\n {this.serverUrls\n ? renderFormItems(\n \"gxg-combo-box-item\",\n this.serverUrls.map(sUrl => ({\n id: sUrl,\n label: sUrl,\n value: sUrl\n })),\n \"server-urls\"\n )\n : null}\n </gxg-combo-box>\n </div>\n <div class=\"grid grid-data\">\n <div>\n <div class=\"grid grid-data-account\">\n {/* #authentication type */}\n <gxg-combo-box\n disableFilter\n value={this.authenticationTypes[0].id}\n ref={(el: HTMLGxgComboBoxElement) =>\n (this.authenticationTypeEl = el as HTMLGxgComboBoxElement)\n }\n class=\"authentication-type\"\n part=\"authentication-type\"\n onValueChanged={this.evaluateAuthenticationType}\n >\n {renderFormItems(\n \"gxg-combo-box-item\",\n this.authenticationTypes,\n \"authentication-type\"\n )}\n </gxg-combo-box>\n\n {/* #user name */}\n <gxg-label labelPosition=\"start\" class=\"kb-label\">\n {`${this._componentLocale.label.userName}:`}\n </gxg-label>\n <gxg-form-text\n ref={(el: HTMLGxgFormTextElement) =>\n (this.userNameEl = el as HTMLGxgFormTextElement)\n }\n value={this.userName}\n class=\"user-name\"\n part=\"user-name\"\n ></gxg-form-text>\n\n {/* #password */}\n <gxg-label labelPosition=\"start\" class=\"kb-label\">\n {`${this._componentLocale.label.password}:`}\n </gxg-label>\n <gxg-form-text\n password\n ref={(el: HTMLGxgFormTextElement) =>\n (this.passwordEl = el as HTMLGxgFormTextElement)\n }\n value={this.password}\n class=\"password\"\n part=\"password\"\n ></gxg-form-text>\n\n {/* #connect */}\n <div>\n <gxg-button\n id=\"button-connect\"\n type=\"primary-text-only\"\n onClick={this.connectCallbackHandler}\n part=\"button-connect\"\n >\n {this._componentLocale.buttons.connect}\n </gxg-button>\n </div>\n </div>\n </div>\n\n <div class=\"grid\">\n <div class=\"grid-data-kbs\">\n <div class=\"search-kbs\">\n <gxg-form-text\n ref={(el: HTMLGxgFormTextElement) =>\n (this.searchKBEl = el as HTMLGxgFormTextElement)\n }\n class=\"search-kb-input\"\n part=\"search-kb\"\n disabled={this.selectionKbDisabled}\n placeholder={this._componentLocale.label.searchKbs}\n ></gxg-form-text>\n </div>\n <div class=\"box-kbs\">\n <gxg-list-box\n singleSelection\n disabled={this.selectionKbDisabled}\n ref={(el: HTMLElement) => (this.listBoxEl = el)}\n part=\"kbs\"\n >\n {this.kbs\n .filter(kb =>\n kb.name\n .toLowerCase()\n .includes(this.kbSearchText.toLowerCase())\n )\n .map(kb => (\n <gxg-list-box-item value={kb.id} key={kb.id}>\n {kb.name}\n </gxg-list-box-item>\n ))}\n </gxg-list-box>\n </div>\n </div>\n <div class=\"grid grid-data-kbs-footer\">\n {/* #kbName */}\n <gxg-form-text\n ref={(el: HTMLGxgFormTextElement) =>\n (this.kbNameEl = el as HTMLGxgFormTextElement)\n }\n label={this._componentLocale.localKb}\n value={this.kbName}\n class=\"kb-name\"\n part=\"kb-name\"\n disabled={this.selectionKbDisabled}\n ></gxg-form-text>\n\n {/* #create button */}\n <div>\n <gxg-button\n id=\"button-create\"\n type=\"primary-text-only\"\n onClick={this.createKbHandler}\n part=\"button-create\"\n disabled={this.selectionKbDisabled}\n >\n {this._componentLocale.buttons.create}\n </gxg-button>\n </div>\n </div>\n </div>\n </div>\n </gx-ide-container>\n </div>\n <gxg-shortcuts src={this.shortcutsSrc}></gxg-shortcuts>\n </Host>\n );\n }\n}\n\nexport interface GXServerConnectionData {\n serverUrl: string;\n authenticationType: GxServerAuthenticationType;\n user: string;\n password: string;\n}\nexport type ConnectionResultData = {\n formResult: FormSubmitResult;\n kbs: KBData[];\n};\nexport interface KBData {\n id: string;\n name: string;\n}\nexport interface CreateKBData {\n id: string;\n name: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"create-kb-from-server.js","sourceRoot":"","sources":["../../../src/components/create-kb-from-server/create-kb-from-server.tsx"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,OAAO,EACP,KAAK,EACL,YAAY,EACZ,KAAK,EACN,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAKtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAQpE,MAAM,OAAO,uBAAuB;;QAuB1B,sBAAiB,GAAG,KAAK,CAAC;QAC1B,iBAAY,GAAG,YAAY,CACjC,sDAAsD,CACvD,CAAC;QAUM,iBAAY,GAAW,IAAI,CAAC;QAC5B,wBAAmB,GAAe,EAAE,CAAC;QAyG7C,iBAAiB;QAEjB,0BAA0B;QAE1B,qBAAqB;QAEb,2BAAsB,GAAG,GAAG,EAAE;YACpC,IAAI,CAAC,mBAAmB,GAAG;gBACzB;oBACE,EAAE,EAAE,SAAS;oBACb,KAAK,EAAE,SAAS;oBAChB,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,cAAc;iBAChE;gBACD;oBACE,EAAE,EAAE,OAAO;oBACX,KAAK,EAAE,OAAO;oBACd,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,KAA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W,EAAE,CAAC,CAC7C;yCACA,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CACT,yBAAmB,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,IACxC,EAAE,CAAC,IAAI,CACU,CACrB,CAAC,CACS,CACX,CACF;4BACN,WAAK,KAAK,EAAC,2BAA2B;gCAEpC,qBACE,GAAG,EAAE,CAAC,EAA0B,EAAE,EAAE,CAClC,CAAC,IAAI,CAAC,QAAQ,GAAG,EAA4B,CAAC,EAEhD,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,OAAO,EACpC,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,KAAK,EAAC,SAAS,EACf,IAAI,EAAC,SAAS,EACd,QAAQ,EAAE,IAAI,CAAC,mBAAmB,GACnB;gCAGjB;oCACE,kBACE,EAAE,EAAC,eAAe,EAClB,IAAI,EAAC,mBAAmB,EACxB,OAAO,EAAE,IAAI,CAAC,eAAe,EAC7B,IAAI,EAAC,eAAe,EACpB,QAAQ,EAAE,IAAI,CAAC,mBAAmB,IAEjC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,MAAM,CAC1B,CACT,CACF,CACF,CACF,CACW,CACf;YACN,qBAAe,GAAG,EAAE,IAAI,CAAC,YAAY,GAAkB,CAClD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n State,\n getAssetPath,\n Watch\n} from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\nimport { SelectionChangedEvent } from \"@genexus/gemini/dist/types/components/list-box/list-box\";\n/* CUSTOM IMPORTS */\nimport { GxOption } from \"../../common/types\";\nimport { Locale } from \"../../common/locale\";\nimport { renderFormItems } from \"../../common/common\";\nimport {\n FormSubmitResult,\n GxServerAuthenticationType\n} from \"../../common/types\";\nimport { formSubmitValidation } from \"../../common/form-validation\";\n\n@Component({\n tag: \"gx-ide-create-kb-from-server\",\n styleUrl: \"create-kb-from-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/create-kb-from-server\"]\n})\nexport class GxIdeCreateKbFromServer {\n [key: string]: any;\n\n /*\nINDEX:\n1.OWN PROPERTIES\n2.REFERENCE TO ELEMENTS\n3.STATE() VARIABLES\n4.PUBLIC PROPERTY API | WATCH'S\n5.EVENTS (EMIT)\n6.METHODS\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 private shortcutsSrc = getAssetPath(\n `./gx-ide-assets/create-kb-from-server/shortcuts.json`\n );\n\n /* References needed to collect data with \"Connect\" and \"Create\" buttons submit*/\n private authenticationTypeEl!: HTMLGxgComboBoxElement;\n private serverUrlsEl!: HTMLGxgComboBoxElement;\n private kbNameEl!: HTMLGxgFormTextElement;\n private passwordEl!: HTMLGxgFormTextElement;\n private userNameEl!: HTMLGxgFormTextElement;\n private searchKBEl!: HTMLGxgFormTextElement;\n private listBoxEl!: HTMLElement;\n private kbIdSelected: string = null;\n private authenticationTypes: GxOption[] = [];\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeCreateKbFromServerElement;\n\n // 3.STATE() VARIABLES //\n\n /**\n * Disabled or not the part for select and create the KB\n */\n @State() selectionKbDisabled = true;\n\n /**\n * KBs that return from connect to the server\n */\n\n @State() kbs: KBData[] = [];\n @Watch(\"kbs\")\n watchPropHandler(newKbs: KBData[]) {\n /* When the list of servers are updated, the first server is selected by default */\n this.kbIdSelected = newKbs[0].id;\n this.kbName = newKbs[0].name;\n }\n\n /**\n * KBs search text\n */\n @State() kbSearchText = \"\";\n\n // 4.PUBLIC PROPERTY API | WATCH'S //\n\n /**\n * If true it displays the component title on the header\n */\n @Prop() readonly displayTitle = false;\n\n /**\n * Callback that will be invoked when the user connect to the kb server (‘Connect’ button)\n */\n @Prop() readonly connectCallback: (\n data: GXServerConnectionData\n ) => Promise<ConnectionResultData>;\n\n /**\n * Callback that will be invoked when the user confirms KB creation (‘Create’ button)\n */\n @Prop() readonly createKBCallback: (\n data: CreateKBData\n ) => Promise<FormSubmitResult>;\n\n /**\n * If is true then the user can specify a server url that don't be in the combo box of server urls.\n */\n @Prop() readonly enableCustomServer: boolean = false;\n\n /**\n * The knowledge base default suggested name\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ mutable: true }) kbName: string;\n\n /**\n * Password for the database connection.\n */\n @Prop() readonly password: string;\n\n /**\n * Array of URLs of cataloged servers to be displayed in the combo\n */\n @Prop() readonly serverUrls!: string[];\n\n /**\n * Username for the database connection.\n */\n @Prop() readonly userName: string;\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.METHODS //\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n this.setAuthenticationTypes();\n }\n\n componentDidLoad() {\n (this.serverUrlsEl as HTMLElement).focus();\n this.addEventListeners();\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 private setAuthenticationTypes = () => {\n this.authenticationTypes = [\n {\n id: \"genexus\",\n value: \"genexus\",\n label: this._componentLocale.authenticationTypes.genexusAccount\n },\n {\n id: \"local\",\n value: \"local\",\n label: this._componentLocale.authenticationTypes.local\n }\n ];\n };\n\n private addEventListeners = () => {\n this.serverUrlsEl.addEventListener(\"valueChanged\", () => {\n this.reset();\n });\n\n this.searchKBEl.addEventListener(\n \"valueChanged\",\n (e: CustomEvent<string>) => {\n this.kbNameEl.value = \"\";\n this.kbIdSelected = null;\n this.kbSearchText = e.detail;\n }\n );\n\n this.listBoxEl.addEventListener(\n \"selectionChanged\",\n (ev: CustomEvent<SelectionChangedEvent>): void => {\n const selectedItems = ev.detail.items;\n let selectedItem;\n if (selectedItems.length > 0) {\n selectedItem = ev.detail.items[0];\n }\n if (selectedItem) {\n this.kbIdSelected = selectedItem.value;\n const kbSelected = this.kbs.find(kb => kb.id === this.kbIdSelected);\n if (kbSelected) {\n this.kbNameEl.value = kbSelected.name;\n }\n }\n }\n );\n };\n\n private reset() {\n this.kbs = [];\n this.kbIdSelected = null;\n this.selectionKbDisabled = true;\n this.searchKBEl.value = \"\";\n this.kbSearchText = \"\";\n }\n\n private createKbHandler = (): void => {\n if (this.createKBCallback) {\n const createKBCallbackPromise = this.createKBCallback({\n id: this.kbIdSelected,\n name: this.kbNameEl.value\n });\n createKBCallbackPromise.then((formSubmitResult: FormSubmitResult) => {\n formSubmitValidation(formSubmitResult, this);\n });\n }\n };\n\n private connectCallbackHandler = (): void => {\n if (this.connectCallback) {\n const connectCallbackPromise = this.connectCallback({\n serverUrl: this.serverUrlsEl.value,\n authenticationType: this.authenticationTypeEl.value,\n user: this.userNameEl?.value,\n password: this.passwordEl?.value\n });\n connectCallbackPromise.then(\n (connectionResultData: ConnectionResultData) => {\n formSubmitValidation(connectionResultData.formResult, this);\n if (\n connectionResultData.formResult.success &&\n connectionResultData.kbs\n ) {\n this.kbs = connectionResultData.kbs;\n this.selectionKbDisabled = false;\n }\n }\n );\n }\n };\n\n // 10.RENDER() FUNCTION //\n\n // 11.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 containerTitle={\n this.displayTitle ? this._componentLocale.componentName : null\n }\n >\n <div class=\"flex\">\n {/* #kb name */}\n <gxg-label labelPosition=\"start\" class=\"kb-label\">\n {this._componentLocale.label.serverUrl}\n </gxg-label>\n <gxg-combo-box\n disableFilter={!this.enableCustomServer}\n ref={(el: HTMLGxgComboBoxElement) =>\n (this.serverUrlsEl = el as HTMLGxgComboBoxElement)\n }\n class=\"server-urls-combo-box\"\n part=\"server-urls\"\n >\n {this.serverUrls\n ? renderFormItems(\n \"gxg-combo-box-item\",\n this.serverUrls.map(sUrl => ({\n id: sUrl,\n label: sUrl,\n value: sUrl\n })),\n \"server-urls\"\n )\n : null}\n </gxg-combo-box>\n </div>\n <div class=\"grid grid-data\">\n <div>\n <div class=\"grid grid-data-account\">\n {/* #authentication type */}\n <gxg-combo-box\n tool-tip\n disableFilter\n value={this.authenticationTypes[0].id}\n ref={(el: HTMLGxgComboBoxElement) =>\n (this.authenticationTypeEl = el as HTMLGxgComboBoxElement)\n }\n class=\"authentication-type\"\n part=\"authentication-type\"\n onValueChanged={this.evaluateAuthenticationType}\n >\n {renderFormItems(\n \"gxg-combo-box-item\",\n this.authenticationTypes,\n \"authentication-type\"\n )}\n </gxg-combo-box>\n\n {/* #user name */}\n <gxg-label labelPosition=\"start\" class=\"kb-label\">\n {`${this._componentLocale.label.userName}:`}\n </gxg-label>\n <gxg-form-text\n ref={(el: HTMLGxgFormTextElement) =>\n (this.userNameEl = el as HTMLGxgFormTextElement)\n }\n tool-tip\n value={this.userName}\n class=\"user-name\"\n part=\"user-name\"\n ></gxg-form-text>\n\n {/* #password */}\n <gxg-label labelPosition=\"start\" class=\"kb-label\">\n {`${this._componentLocale.label.password}:`}\n </gxg-label>\n <gxg-form-text\n tool-tip\n password\n ref={(el: HTMLGxgFormTextElement) =>\n (this.passwordEl = el as HTMLGxgFormTextElement)\n }\n value={this.password}\n class=\"password\"\n part=\"password\"\n ></gxg-form-text>\n\n {/* #connect */}\n <div>\n <gxg-button\n id=\"button-connect\"\n type=\"primary-text-only\"\n onClick={this.connectCallbackHandler}\n part=\"button-connect\"\n >\n {this._componentLocale.buttons.connect}\n </gxg-button>\n </div>\n </div>\n </div>\n\n <div class=\"grid\">\n <div class=\"grid-data-kbs\">\n <div class=\"search-kbs\">\n <gxg-form-text\n ref={(el: HTMLGxgFormTextElement) =>\n (this.searchKBEl = el as HTMLGxgFormTextElement)\n }\n class=\"search-kb-input\"\n part=\"search-kb\"\n disabled={this.selectionKbDisabled}\n placeholder={this._componentLocale.label.searchKbs}\n ></gxg-form-text>\n </div>\n <div class=\"box-kbs\">\n <gxg-list-box\n singleSelection\n disabled={this.selectionKbDisabled}\n ref={(el: HTMLElement) => (this.listBoxEl = el)}\n part=\"kbs\"\n >\n {this.kbs\n .filter(kb =>\n kb.name\n .toLowerCase()\n .includes(this.kbSearchText.toLowerCase())\n )\n .map(kb => (\n <gxg-list-box-item value={kb.id} key={kb.id}>\n {kb.name}\n </gxg-list-box-item>\n ))}\n </gxg-list-box>\n </div>\n </div>\n <div class=\"grid grid-data-kbs-footer\">\n {/* #kbName */}\n <gxg-form-text\n ref={(el: HTMLGxgFormTextElement) =>\n (this.kbNameEl = el as HTMLGxgFormTextElement)\n }\n label={this._componentLocale.localKb}\n value={this.kbName}\n class=\"kb-name\"\n part=\"kb-name\"\n disabled={this.selectionKbDisabled}\n ></gxg-form-text>\n\n {/* #create button */}\n <div>\n <gxg-button\n id=\"button-create\"\n type=\"primary-text-only\"\n onClick={this.createKbHandler}\n part=\"button-create\"\n disabled={this.selectionKbDisabled}\n >\n {this._componentLocale.buttons.create}\n </gxg-button>\n </div>\n </div>\n </div>\n </div>\n </gx-ide-container>\n </div>\n <gxg-shortcuts src={this.shortcutsSrc}></gxg-shortcuts>\n </Host>\n );\n }\n}\n\nexport interface GXServerConnectionData {\n serverUrl: string;\n authenticationType: GxServerAuthenticationType;\n user: string;\n password: string;\n}\nexport type ConnectionResultData = {\n formResult: FormSubmitResult;\n kbs: KBData[];\n};\nexport interface KBData {\n id: string;\n name: string;\n}\nexport interface CreateKBData {\n id: string;\n name: string;\n}\n"]}
|