@genexus/designer-web-controls-library-abstract
Advanced tools
Comparing version 0.0.16 to 0.0.17
@@ -26,2 +26,8 @@ 'use strict'; | ||
} | ||
async componentWillLoad() { | ||
await this.setLabelCaption(); | ||
} | ||
async componentWillUpdate() { | ||
await this.setLabelCaption(); | ||
} | ||
async componentDidLoad() { | ||
@@ -123,2 +129,21 @@ await this.getContent(); | ||
} | ||
async setLabelCaption() { | ||
let propertyLabelCaption = this.context.node.getPropertyValue(consts.PropertyNames.LABEL_CAPTION); | ||
if (!propertyLabelCaption) { | ||
this.labelCaption = ''; | ||
return; | ||
} | ||
if (propertyLabelCaption == this.propertyLabelCaption) | ||
return; | ||
this.labelCaption = this.propertyLabelCaption = propertyLabelCaption; | ||
let site = this.element.site; | ||
if (site) { | ||
let dataService = site.getService(index$1.LayoutDesignerServiceIds.SelectData); | ||
if (dataService) { | ||
let newLabelCaption = await dataService.getLabelCaption(this.propertyLabelCaption); | ||
if (newLabelCaption != this.labelCaption) | ||
this.labelCaption = newLabelCaption; | ||
} | ||
} | ||
} | ||
render() { | ||
@@ -129,3 +154,3 @@ const data = this.context.node; | ||
const renderControlTypeFn = this.getRenderControlTypeFn(this.userControlType); | ||
return (index.h(index.Host, null, index.h("gx-form-field", { "label-caption": props[consts.PropertyNames.LABEL_CAPTION], "label-position": labelPositionMap[props[consts.PropertyNames.LABEL_POSITION]] }, renderControlTypeFn(props)))); | ||
return (index.h(index.Host, null, index.h("gx-form-field", { "label-caption": this.labelCaption, "label-position": labelPositionMap[props[consts.PropertyNames.LABEL_POSITION]] }, renderControlTypeFn(props)))); | ||
} | ||
@@ -132,0 +157,0 @@ static get assetsDirs() { return ["assets"]; } |
@@ -18,2 +18,8 @@ import { LayoutDesignerServiceIds } from "@genexus/designer-common-layout"; | ||
} | ||
async componentWillLoad() { | ||
await this.setLabelCaption(); | ||
} | ||
async componentWillUpdate() { | ||
await this.setLabelCaption(); | ||
} | ||
async componentDidLoad() { | ||
@@ -115,2 +121,21 @@ await this.getContent(); | ||
} | ||
async setLabelCaption() { | ||
let propertyLabelCaption = this.context.node.getPropertyValue(PropertyNames.LABEL_CAPTION); | ||
if (!propertyLabelCaption) { | ||
this.labelCaption = ''; | ||
return; | ||
} | ||
if (propertyLabelCaption == this.propertyLabelCaption) | ||
return; | ||
this.labelCaption = this.propertyLabelCaption = propertyLabelCaption; | ||
let site = this.element.site; | ||
if (site) { | ||
let dataService = site.getService(LayoutDesignerServiceIds.SelectData); | ||
if (dataService) { | ||
let newLabelCaption = await dataService.getLabelCaption(this.propertyLabelCaption); | ||
if (newLabelCaption != this.labelCaption) | ||
this.labelCaption = newLabelCaption; | ||
} | ||
} | ||
} | ||
render() { | ||
@@ -122,3 +147,3 @@ const data = this.context.node; | ||
return (h(Host, null, | ||
h("gx-form-field", { "label-caption": props[PropertyNames.LABEL_CAPTION], "label-position": labelPositionMap[props[PropertyNames.LABEL_POSITION]] }, renderControlTypeFn(props)))); | ||
h("gx-form-field", { "label-caption": this.labelCaption, "label-position": labelPositionMap[props[PropertyNames.LABEL_POSITION]] }, renderControlTypeFn(props)))); | ||
} | ||
@@ -125,0 +150,0 @@ static get is() { return "gx-le-data"; } |
@@ -1,1 +0,1 @@ | ||
import{p as e,b as i}from"./p-b775376a.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),e(t)})().then((e=>i([["p-1942a6f5",[[0,"gx-le-data",{context:[16],userControlContent:[32]}]]],["p-1f3ee103",[[0,"gx-le-tab",{context:[16],tabItemSelectedId:[1537,"data-gx-le-control-item-selected-id"]},[[0,"onTabChange","onTabChangeHandler"]]]]],["p-81cb7b68",[[4,"gx-grid-fs",{invisibleMode:[1,"invisible-mode"],loadingState:[1,"loading-state"],recordCount:[2,"record-count"],threshold:[1]}]]],["p-3a70c213",[[0,"gx-le-canvas-table",{context:[16]}]]],["p-2675dd72",[[4,"gx-grid-smart",{columns:[8],currentPage:[1026,"current-page"],invisibleMode:[1,"invisible-mode"],loadingState:[1,"loading-state"],logLevel:[1,"log-level"],itemsPerGroup:[2,"items-per-group"],direction:[1],options:[16],pager:[4],recordCount:[2,"record-count"],rows:[2],scrollbar:[4],snapToGrid:[4,"snap-to-grid"],update:[64],updateAutoHeight:[64],slideTo:[64],slideNext:[64],slidePrev:[64],getActiveIndex:[64],getPreviousIndex:[64],length:[64],isLast:[64],isStart:[64],startAutoplay:[64],stopAutoplay:[64],toggleLockSwipeToNext:[64],toggleLockSwipeToPrev:[64],toggleLockSwipes:[64]}]]],["p-859b5c3f",[[0,"gx-le-action",{context:[16]}]]],["p-001eaba5",[[0,"gx-le-group",{context:[16]}]]],["p-f6426f5a",[[0,"gx-le-image",{context:[16],imageSrc:[32]}]]],["p-9731e928",[[0,"gx-le-textblock",{context:[16]}]]],["p-308c79c2",[[0,"gx-le-user-control",{context:[16],content:[32]}]]],["p-a4a7c531",[[0,"gx-loading",{description:[1],caption:[1],presented:[4],type:[1],value:[2],lottiePath:[32]}]]],["p-2e5db9d5",[[1,"gx-text",{caption:[1],site:[16]}]]],["p-9dac53d0",[[4,"gx-action-sheet",{closeButtonLabel:[1,"close-button-label"],opened:[1028]},[[0,"onClick","handleItemClick"]]]]],["p-782d6ea7",[[4,"gx-action-sheet-item",{actionType:[1,"action-type"],disabled:[4]}]]],["p-e319af27",[[4,"gx-bootstrap"]]],["p-0117c87a",[[4,"gx-card",{invisibleMode:[1,"invisible-mode"],showBorder:[4,"show-border"],showFooter:[4,"show-footer"],showHeader:[4,"show-header"]}]]],["p-407d4f91",[[0,"gx-chronometer",{id:[1],invisibleMode:[1,"invisible-mode"],maxValue:[2,"max-value"],maxValueText:[1,"max-value-text"],unit:[1],interval:[2],state:[1],value:[1026],elapsedTime:[32],getNativeInputId:[64],start:[64],stop:[64],reset:[64]}]]],["p-d2af0ade",[[0,"gx-le-action-group",{context:[16]}]]],["p-8eac573f",[[0,"gx-le-component",{context:[16]}]]],["p-487aea17",[[0,"gx-le-embedded-page",{context:[16]}]]],["p-5e11f682",[[0,"gx-le-error-viewer",{context:[16]}]]],["p-7f71b97f",[[0,"gx-le-flex-table",{context:[16]}]]],["p-b32603b3",[[0,"gx-le-freestyle-grid",{context:[16],selectedLayoutIndex:[32]}]]],["p-a2a8278e",[[0,"gx-le-horizontal-rule",{context:[16]}]]],["p-ea2d45be",[[0,"gx-le-html",{context:[16]}]]],["p-b8bd2281",[[0,"gx-le-hyperlink",{context:[16]}]]],["p-e7af8563",[[0,"gx-le-responsive-table",{context:[16]}]]],["p-b4851081",[[0,"gx-le-section",{context:[16]}]]],["p-4023a7df",[[0,"gx-le-simple-grid",{context:[16]}]]],["p-e7caf0df",[[0,"gx-le-smart-table",{context:[16]}]]],["p-27050def",[[0,"gx-le-tabular-table",{context:[16]}]]],["p-e6e73648",[[1,"gx-list",{context:[16]}]]],["p-7f3758df",[[0,"gx-map",{center:[1025],maxZoom:[2,"max-zoom"],zoom:[1026]},[[0,"gxMapMarkerDidLoad","onMapMarkerDidLoad"]]]]],["p-84ab5692",[[0,"gx-map-marker",{coords:[1025],iconSrc:[1,"icon-src"],tooltipCaption:[1,"tooltip-caption"]}]]],["p-2994dbcb",[[4,"gx-message",{invisibleMode:[1,"invisible-mode"],showCloseButton:[4,"show-close-button"],closeButtonText:[1,"close-button-text"],type:[1],duration:[2]}]]],["p-01ccf333",[[4,"gx-modal",{autoClose:[4,"auto-close"],closeButtonLabel:[1,"close-button-label"],id:[1],opened:[1028]}]]],["p-45b2053a",[[4,"gx-navbar",{caption:[1],id:[1],toggleButtonLabel:[1,"toggle-button-label"],cssClass:[1,"css-class"],invisibleMode:[1,"invisible-mode"]},[[0,"click","handleClick"]]]]],["p-3dff6cf6",[[4,"gx-navbar-link",{active:[4],cssClass:[1,"css-class"],disabled:[4],href:[1],iconSrc:[1,"icon-src"],invisibleMode:[1,"invisible-mode"]}]]],["p-0717a77f",[[0,"gx-password-edit",{cssClass:[1,"css-class"],invisibleMode:[1,"invisible-mode"],disabled:[4],id:[1],placeholder:[1],readonly:[4],revealed:[1028],revealButtonTextOn:[1,"reveal-button-text-on"],revealButtonTextOff:[1,"reveal-button-text-off"],showRevealButton:[4,"show-reveal-button"],value:[1025],getNativeInputId:[64]},[[0,"gxTriggerClick","handleTriggerClick"]]]]],["p-73872059",[[4,"gx-progress-bar",{value:[2]}]]],["p-c2d216a0",[[4,"gx-table",{invisibleMode:[1,"invisible-mode"],disabled:[4],areasTemplate:[1,"areas-template"],columnsTemplate:[1,"columns-template"],rowsTemplate:[1,"rows-template"]}]]],["p-6276215a",[[4,"gx-table-cell",{area:[1],align:[1],overflowMode:[1,"overflow-mode"],maxHeight:[1,"max-height"],minHeight:[1,"min-height"],valign:[1]}]]],["p-b1873e37",[[0,"gx-video",{disabled:[4],invisibleMode:[1,"invisible-mode"],src:[1]}]]],["p-60f8ac13",[[4,"gx-button",{cssClass:[1,"css-class"],invisibleMode:[1,"invisible-mode"],disabled:[4],imagePosition:[1,"image-position"],size:[1]}]]],["p-773d0010",[[0,"gx-grid-infinite-scroll",{infiniteScrollContainer:[1,"infinite-scroll-container"],itemCount:[2,"item-count"],threshold:[1],disabled:[4],position:[1],isLoading:[32],complete:[64]}]]],["p-dbe0e5c0",[[4,"gx-group",{caption:[1],autoGrow:[4,"auto-grow"]}]]],["p-daddc0bc",[[0,"gx-lottie",{animationData:[8,"animation-data"],autoPlay:[4,"auto-play"],invisibleMode:[1,"invisible-mode"],disabled:[4],loop:[4],path:[1],pause:[64],play:[64],setProgress:[64],stop:[64]}]]],["p-9f67928d",[[4,"gx-canvas",{invisibleMode:[1,"invisible-mode"],disabled:[4]}],[4,"gx-canvas-cell",{align:[1],overflowMode:[1,"overflow-mode"],valign:[1]}]]],["p-1ebada1f",[[4,"gx-grid-infinite-scroll-content"]]],["p-a3cec612",[[4,"gx-textblock",{href:[1],invisibleMode:[1,"invisible-mode"],disabled:[4]}]]],["p-eff73615",[[4,"gx-tab",{invisibleMode:[1,"invisible-mode"]},[[0,"onTabSelect","tabClickHandler"]]],[4,"gx-tab-caption",{disabled:[4],selected:[4]}],[4,"gx-tab-page"]]],["p-aa1a42a8",[[0,"gx-image",{alt:[1],cssClass:[1,"css-class"],disabled:[4],height:[1],invisibleMode:[1,"invisible-mode"],lazyLoad:[4,"lazy-load"],lowResolutionSrc:[1,"low-resolution-src"],scaleType:[1025,"scale-type"],src:[1],width:[1]}]]],["p-bf04d293",[[0,"gx-checkbox",{invisibleMode:[1,"invisible-mode"],disabled:[4],caption:[1],checked:[1028],value:[1025],checkedValue:[1,"checked-value"],unCheckedValue:[1,"un-checked-value"],cssClass:[1,"css-class"],id:[1],getNativeInputId:[64]}],[4,"gx-edit",{area:[513],autocapitalize:[1],autocomplete:[1],autocorrect:[1],fontCategory:[1025,"font-category"],invisibleMode:[1,"invisible-mode"],disabled:[4],id:[1],multiline:[4],placeholder:[1],readonly:[4],showTrigger:[4,"show-trigger"],triggerText:[1,"trigger-text"],type:[1],value:[1025],getNativeInputId:[64]}],[4,"gx-form-field",{id:[1],labelCaption:[1,"label-caption"],labelPosition:[1,"label-position"]}],[4,"gx-radio-group",{direction:[1],invisibleMode:[1,"invisible-mode"],disabled:[4],id:[1],name:[1],value:[1025]},[[0,"gxRadioDidLoad","onRadioDidLoad"],[0,"gxRadioDidUnload","onRadioDidUnload"],[0,"gxSelect","onRadioSelect"]]],[0,"gx-radio-option",{caption:[1],checked:[1028],cssClass:[1,"css-class"],invisibleMode:[1,"invisible-mode"],disabled:[4],id:[1],name:[1],value:[1025]}],[0,"gx-rating",{disabled:[4],id:[1],invisibleMode:[1,"invisible-mode"],maxValue:[2,"max-value"],readonly:[4],value:[1026],getNativeInputId:[64]}],[0,"gx-select",{cssClass:[1,"css-class"],invisibleMode:[1,"invisible-mode"],disabled:[4],id:[1],readonly:[4],value:[1025],options:[32],getNativeInputId:[64]},[[0,"gxSelectDidLoad","onSelectOptionDidLoad"],[0,"gxSelectDidUnload","onSelectOptionDidUnload"],[0,"gxDisable","onSelectOptionDisable"],[0,"onChange","onSelectOptionChange"],[0,"gxSelect","onSelectOptionSelect"]]],[4,"gx-select-option",{selected:[1028],cssClass:[1,"css-class"],disabled:[4],value:[1025]}],[0,"gx-switch",{caption:[1],checked:[1028],value:[1025],disabled:[4],id:[1],invisibleMode:[1,"invisible-mode"],getNativeInputId:[64]}]]]],e))); | ||
import{p as e,b as i}from"./p-b775376a.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),e(t)})().then((e=>i([["p-a07b1e6d",[[0,"gx-le-data",{context:[16],userControlContent:[32]}]]],["p-1f3ee103",[[0,"gx-le-tab",{context:[16],tabItemSelectedId:[1537,"data-gx-le-control-item-selected-id"]},[[0,"onTabChange","onTabChangeHandler"]]]]],["p-81cb7b68",[[4,"gx-grid-fs",{invisibleMode:[1,"invisible-mode"],loadingState:[1,"loading-state"],recordCount:[2,"record-count"],threshold:[1]}]]],["p-3a70c213",[[0,"gx-le-canvas-table",{context:[16]}]]],["p-2675dd72",[[4,"gx-grid-smart",{columns:[8],currentPage:[1026,"current-page"],invisibleMode:[1,"invisible-mode"],loadingState:[1,"loading-state"],logLevel:[1,"log-level"],itemsPerGroup:[2,"items-per-group"],direction:[1],options:[16],pager:[4],recordCount:[2,"record-count"],rows:[2],scrollbar:[4],snapToGrid:[4,"snap-to-grid"],update:[64],updateAutoHeight:[64],slideTo:[64],slideNext:[64],slidePrev:[64],getActiveIndex:[64],getPreviousIndex:[64],length:[64],isLast:[64],isStart:[64],startAutoplay:[64],stopAutoplay:[64],toggleLockSwipeToNext:[64],toggleLockSwipeToPrev:[64],toggleLockSwipes:[64]}]]],["p-859b5c3f",[[0,"gx-le-action",{context:[16]}]]],["p-001eaba5",[[0,"gx-le-group",{context:[16]}]]],["p-f6426f5a",[[0,"gx-le-image",{context:[16],imageSrc:[32]}]]],["p-9731e928",[[0,"gx-le-textblock",{context:[16]}]]],["p-308c79c2",[[0,"gx-le-user-control",{context:[16],content:[32]}]]],["p-a4a7c531",[[0,"gx-loading",{description:[1],caption:[1],presented:[4],type:[1],value:[2],lottiePath:[32]}]]],["p-2e5db9d5",[[1,"gx-text",{caption:[1],site:[16]}]]],["p-9dac53d0",[[4,"gx-action-sheet",{closeButtonLabel:[1,"close-button-label"],opened:[1028]},[[0,"onClick","handleItemClick"]]]]],["p-782d6ea7",[[4,"gx-action-sheet-item",{actionType:[1,"action-type"],disabled:[4]}]]],["p-e319af27",[[4,"gx-bootstrap"]]],["p-0117c87a",[[4,"gx-card",{invisibleMode:[1,"invisible-mode"],showBorder:[4,"show-border"],showFooter:[4,"show-footer"],showHeader:[4,"show-header"]}]]],["p-407d4f91",[[0,"gx-chronometer",{id:[1],invisibleMode:[1,"invisible-mode"],maxValue:[2,"max-value"],maxValueText:[1,"max-value-text"],unit:[1],interval:[2],state:[1],value:[1026],elapsedTime:[32],getNativeInputId:[64],start:[64],stop:[64],reset:[64]}]]],["p-d2af0ade",[[0,"gx-le-action-group",{context:[16]}]]],["p-8eac573f",[[0,"gx-le-component",{context:[16]}]]],["p-487aea17",[[0,"gx-le-embedded-page",{context:[16]}]]],["p-5e11f682",[[0,"gx-le-error-viewer",{context:[16]}]]],["p-7f71b97f",[[0,"gx-le-flex-table",{context:[16]}]]],["p-b32603b3",[[0,"gx-le-freestyle-grid",{context:[16],selectedLayoutIndex:[32]}]]],["p-a2a8278e",[[0,"gx-le-horizontal-rule",{context:[16]}]]],["p-ea2d45be",[[0,"gx-le-html",{context:[16]}]]],["p-b8bd2281",[[0,"gx-le-hyperlink",{context:[16]}]]],["p-e7af8563",[[0,"gx-le-responsive-table",{context:[16]}]]],["p-b4851081",[[0,"gx-le-section",{context:[16]}]]],["p-4023a7df",[[0,"gx-le-simple-grid",{context:[16]}]]],["p-e7caf0df",[[0,"gx-le-smart-table",{context:[16]}]]],["p-27050def",[[0,"gx-le-tabular-table",{context:[16]}]]],["p-e6e73648",[[1,"gx-list",{context:[16]}]]],["p-7f3758df",[[0,"gx-map",{center:[1025],maxZoom:[2,"max-zoom"],zoom:[1026]},[[0,"gxMapMarkerDidLoad","onMapMarkerDidLoad"]]]]],["p-84ab5692",[[0,"gx-map-marker",{coords:[1025],iconSrc:[1,"icon-src"],tooltipCaption:[1,"tooltip-caption"]}]]],["p-2994dbcb",[[4,"gx-message",{invisibleMode:[1,"invisible-mode"],showCloseButton:[4,"show-close-button"],closeButtonText:[1,"close-button-text"],type:[1],duration:[2]}]]],["p-01ccf333",[[4,"gx-modal",{autoClose:[4,"auto-close"],closeButtonLabel:[1,"close-button-label"],id:[1],opened:[1028]}]]],["p-45b2053a",[[4,"gx-navbar",{caption:[1],id:[1],toggleButtonLabel:[1,"toggle-button-label"],cssClass:[1,"css-class"],invisibleMode:[1,"invisible-mode"]},[[0,"click","handleClick"]]]]],["p-3dff6cf6",[[4,"gx-navbar-link",{active:[4],cssClass:[1,"css-class"],disabled:[4],href:[1],iconSrc:[1,"icon-src"],invisibleMode:[1,"invisible-mode"]}]]],["p-0717a77f",[[0,"gx-password-edit",{cssClass:[1,"css-class"],invisibleMode:[1,"invisible-mode"],disabled:[4],id:[1],placeholder:[1],readonly:[4],revealed:[1028],revealButtonTextOn:[1,"reveal-button-text-on"],revealButtonTextOff:[1,"reveal-button-text-off"],showRevealButton:[4,"show-reveal-button"],value:[1025],getNativeInputId:[64]},[[0,"gxTriggerClick","handleTriggerClick"]]]]],["p-73872059",[[4,"gx-progress-bar",{value:[2]}]]],["p-c2d216a0",[[4,"gx-table",{invisibleMode:[1,"invisible-mode"],disabled:[4],areasTemplate:[1,"areas-template"],columnsTemplate:[1,"columns-template"],rowsTemplate:[1,"rows-template"]}]]],["p-6276215a",[[4,"gx-table-cell",{area:[1],align:[1],overflowMode:[1,"overflow-mode"],maxHeight:[1,"max-height"],minHeight:[1,"min-height"],valign:[1]}]]],["p-b1873e37",[[0,"gx-video",{disabled:[4],invisibleMode:[1,"invisible-mode"],src:[1]}]]],["p-60f8ac13",[[4,"gx-button",{cssClass:[1,"css-class"],invisibleMode:[1,"invisible-mode"],disabled:[4],imagePosition:[1,"image-position"],size:[1]}]]],["p-773d0010",[[0,"gx-grid-infinite-scroll",{infiniteScrollContainer:[1,"infinite-scroll-container"],itemCount:[2,"item-count"],threshold:[1],disabled:[4],position:[1],isLoading:[32],complete:[64]}]]],["p-dbe0e5c0",[[4,"gx-group",{caption:[1],autoGrow:[4,"auto-grow"]}]]],["p-daddc0bc",[[0,"gx-lottie",{animationData:[8,"animation-data"],autoPlay:[4,"auto-play"],invisibleMode:[1,"invisible-mode"],disabled:[4],loop:[4],path:[1],pause:[64],play:[64],setProgress:[64],stop:[64]}]]],["p-9f67928d",[[4,"gx-canvas",{invisibleMode:[1,"invisible-mode"],disabled:[4]}],[4,"gx-canvas-cell",{align:[1],overflowMode:[1,"overflow-mode"],valign:[1]}]]],["p-1ebada1f",[[4,"gx-grid-infinite-scroll-content"]]],["p-a3cec612",[[4,"gx-textblock",{href:[1],invisibleMode:[1,"invisible-mode"],disabled:[4]}]]],["p-eff73615",[[4,"gx-tab",{invisibleMode:[1,"invisible-mode"]},[[0,"onTabSelect","tabClickHandler"]]],[4,"gx-tab-caption",{disabled:[4],selected:[4]}],[4,"gx-tab-page"]]],["p-aa1a42a8",[[0,"gx-image",{alt:[1],cssClass:[1,"css-class"],disabled:[4],height:[1],invisibleMode:[1,"invisible-mode"],lazyLoad:[4,"lazy-load"],lowResolutionSrc:[1,"low-resolution-src"],scaleType:[1025,"scale-type"],src:[1],width:[1]}]]],["p-bf04d293",[[0,"gx-checkbox",{invisibleMode:[1,"invisible-mode"],disabled:[4],caption:[1],checked:[1028],value:[1025],checkedValue:[1,"checked-value"],unCheckedValue:[1,"un-checked-value"],cssClass:[1,"css-class"],id:[1],getNativeInputId:[64]}],[4,"gx-edit",{area:[513],autocapitalize:[1],autocomplete:[1],autocorrect:[1],fontCategory:[1025,"font-category"],invisibleMode:[1,"invisible-mode"],disabled:[4],id:[1],multiline:[4],placeholder:[1],readonly:[4],showTrigger:[4,"show-trigger"],triggerText:[1,"trigger-text"],type:[1],value:[1025],getNativeInputId:[64]}],[4,"gx-form-field",{id:[1],labelCaption:[1,"label-caption"],labelPosition:[1,"label-position"]}],[4,"gx-radio-group",{direction:[1],invisibleMode:[1,"invisible-mode"],disabled:[4],id:[1],name:[1],value:[1025]},[[0,"gxRadioDidLoad","onRadioDidLoad"],[0,"gxRadioDidUnload","onRadioDidUnload"],[0,"gxSelect","onRadioSelect"]]],[0,"gx-radio-option",{caption:[1],checked:[1028],cssClass:[1,"css-class"],invisibleMode:[1,"invisible-mode"],disabled:[4],id:[1],name:[1],value:[1025]}],[0,"gx-rating",{disabled:[4],id:[1],invisibleMode:[1,"invisible-mode"],maxValue:[2,"max-value"],readonly:[4],value:[1026],getNativeInputId:[64]}],[0,"gx-select",{cssClass:[1,"css-class"],invisibleMode:[1,"invisible-mode"],disabled:[4],id:[1],readonly:[4],value:[1025],options:[32],getNativeInputId:[64]},[[0,"gxSelectDidLoad","onSelectOptionDidLoad"],[0,"gxSelectDidUnload","onSelectOptionDidUnload"],[0,"gxDisable","onSelectOptionDisable"],[0,"onChange","onSelectOptionChange"],[0,"gxSelect","onSelectOptionSelect"]]],[4,"gx-select-option",{selected:[1028],cssClass:[1,"css-class"],disabled:[4],value:[1025]}],[0,"gx-switch",{caption:[1],checked:[1028],value:[1025],disabled:[4],id:[1],invisibleMode:[1,"invisible-mode"],getNativeInputId:[64]}]]]],e))); |
@@ -22,2 +22,8 @@ import { r as registerInstance, h, H as Host, g as getElement } from './index-0d93a347.js'; | ||
} | ||
async componentWillLoad() { | ||
await this.setLabelCaption(); | ||
} | ||
async componentWillUpdate() { | ||
await this.setLabelCaption(); | ||
} | ||
async componentDidLoad() { | ||
@@ -119,2 +125,21 @@ await this.getContent(); | ||
} | ||
async setLabelCaption() { | ||
let propertyLabelCaption = this.context.node.getPropertyValue(PropertyNames.LABEL_CAPTION); | ||
if (!propertyLabelCaption) { | ||
this.labelCaption = ''; | ||
return; | ||
} | ||
if (propertyLabelCaption == this.propertyLabelCaption) | ||
return; | ||
this.labelCaption = this.propertyLabelCaption = propertyLabelCaption; | ||
let site = this.element.site; | ||
if (site) { | ||
let dataService = site.getService(LayoutDesignerServiceIds.SelectData); | ||
if (dataService) { | ||
let newLabelCaption = await dataService.getLabelCaption(this.propertyLabelCaption); | ||
if (newLabelCaption != this.labelCaption) | ||
this.labelCaption = newLabelCaption; | ||
} | ||
} | ||
} | ||
render() { | ||
@@ -125,3 +150,3 @@ const data = this.context.node; | ||
const renderControlTypeFn = this.getRenderControlTypeFn(this.userControlType); | ||
return (h(Host, null, h("gx-form-field", { "label-caption": props[PropertyNames.LABEL_CAPTION], "label-position": labelPositionMap[props[PropertyNames.LABEL_POSITION]] }, renderControlTypeFn(props)))); | ||
return (h(Host, null, h("gx-form-field", { "label-caption": this.labelCaption, "label-position": labelPositionMap[props[PropertyNames.LABEL_POSITION]] }, renderControlTypeFn(props)))); | ||
} | ||
@@ -128,0 +153,0 @@ static get assetsDirs() { return ["assets"]; } |
@@ -7,5 +7,9 @@ import { AnyObject } from "@genexus/designer-common-layout"; | ||
canRenderUserControlContent: boolean; | ||
propertyLabelCaption: string; | ||
labelCaption: string; | ||
userControlContent: string; | ||
element: HTMLElement; | ||
context: Context; | ||
componentWillLoad(): Promise<void>; | ||
componentWillUpdate(): Promise<void>; | ||
componentDidLoad(): Promise<void>; | ||
@@ -26,3 +30,4 @@ componentDidUpdate(): Promise<void>; | ||
getContent(): Promise<void>; | ||
setLabelCaption(): Promise<void>; | ||
render(): any; | ||
} |
{ | ||
"name": "@genexus/designer-web-controls-library-abstract", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "", | ||
@@ -34,3 +34,3 @@ "main": "dist/index.cjs.js", | ||
"devDependencies": { | ||
"@genexus/designer-common-layout": "^0.0.16", | ||
"@genexus/designer-common-layout": "^0.0.17", | ||
"@stencil/core": "^2.13.0", | ||
@@ -45,3 +45,3 @@ "@stencil/sass": "1.5.2", | ||
"license": "MIT", | ||
"gitHead": "661a3c60c85fed319e7303572605af0c150af95e" | ||
"gitHead": "e83538a593dbec895fa5b2017fddbac0995ede54" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4606784
91319