UNPKG

@wavemaker/m3-custom-widgets

Version:

A collection of custom widgets

8 lines (7 loc) 13.9 kB
export var textfield = { "markup": "%3Cwm-custom-widget-container%3E%0A++++%3Cwm-composite+name%3D%22composite%22+captionposition%3D%22floating%22+required%3D%22false%22%3E%0A++++++++%3Cwm-label+class%3D%22control-label%22+notag%3D%22true%22+name%3D%22labelCaption%22+caption%3D%22bind%3Aprops.label_text%22+conditionalclass%3D%22bind%3Aprops.style%22%3E%3C%2Fwm-label%3E%0A++++++++%3Cwm-container+class%3D%22form-field-wrapper%22+name%3D%22container2%22%3E%0A++++++++++++%3Cwm-button+class%3D%22btn-leading-icon%22+caption%3D%22%22+type%3D%22button%22+margin%3D%22unset%22+name%3D%22buttonLeadingIcon%22+iconclass%3D%22bind%3Aprops.leading_icon_class%22+show%3D%22bind%3Aprops.leading_icon%22+deferload%3D%22false%22%3E%3C%2Fwm-button%3E%0A++++++++++++%3Cwm-text+name%3D%22textField%22+updateon%3D%22default%22+placeholder%3D%22bind%3Aprops.placeholder_text%22+conditionalclass%3D%22bind%3Aprops.style%22+disabled%3D%22bind%3Aprops.state+%3D%3D+%26quot%3Bdisabled%26quot%3B%22+datavalue%3D%22bind%3Aprops.input_text%22%3E%3C%2Fwm-text%3E%0A++++++++++++%3Cwm-button+class%3D%22btn-trailing-icon%22+caption%3D%22%22+type%3D%22button%22+margin%3D%22unset%22+name%3D%22buttonTrailingIcon%22+iconclass%3D%22bind%3Aprops.trailing_icon_class%22+on-click%3D%22button1Click%28%24event%2C+widget%29%22+show%3D%22bind%3Aprops.trailing_icon%22+deferload%3D%22false%22%3E%3C%2Fwm-button%3E%0A++++++++%3C%2Fwm-container%3E%0A++++++++%3Cwm-container+class%3D%22help-wrapper%22+name%3D%22containerSupportingWrapper%22%3E%0A++++++++++++%3Cwm-label+padding%3D%22unset%22+class%3D%22p+help-block%22+type%3D%22p%22+name%3D%22labelSupportingText%22+caption%3D%22bind%3Aprops.supporting_text%22+show%3D%22bind%3Aprops.show_supporting_text%22%3E%3C%2Fwm-label%3E%0A++++++++%3C%2Fwm-container%3E%0A++++%3C%2Fwm-composite%3E%0A%3C%2Fwm-custom-widget-container%3E", "script": "%2F*%0A+*+Use+App.getDependency+for+Dependency+Injection%0A+*+eg%3A+var+DialogService+%3D+App.getDependency%28%27DialogService%27%29%3B%0A+*%2F%0A%0A%2F*+perform+any+action+on+widgets%2Fvariables+within+this+block+*%2F%0AWidget.onReady+%3D+function%28%29+%7B%0A++++%2F*%0A+++++*+variables+can+be+accessed+through+%27Widget.Variables%27+property+here%0A+++++*+e.g.+to+get+dataSet+in+a+staticVariable+named+%27loggedInUser%27+use+following+script%0A+++++*+Widget.Variables.loggedInUser.getData%28%29%0A+++++*%0A+++++*+widgets+can+be+accessed+through+%27Widget.Widgets%27+property+here%0A+++++*+e.g.+to+get+value+of+text+widget+named+%27username%27+use+following+script%0A+++++*+%27Widget.Widgets.username.datavalue%27%0A+++++*%2F%0A++++%2F%2F+debugger%0A++++%2F%2F+var+test+%3D+props.input_text%3B%0A++++if+%28Widget.props.leading_icon+%3D%3D+true%29+%7B%0A++++++++Widget.Widgets.labelCaption.class+%2B%3D+%27+with-leading-icon%27%3B%0A++++++++Widget.Widgets.textField.class+%2B%3D+%27+with-leading-icon%27%3B%0A++++%7D%0A++++if+%28Widget.props.trailing_icon+%3D%3D+true%29+%7B%0A++++++++Widget.Widgets.labelCaption.class+%2B%3D+%27+with-trailing-icon%27%3B%0A++++++++Widget.Widgets.textField.class+%2B%3D+%27+with-trailing-icon%27%3B%0A++++%7D%0A++++Widget.Widgets.textField.type+%3D+Widget.props.inputType%3B%0A++++Widget.Widgets.composite.required+%3D+Widget.props.required%3B%0A%7D%3B", "styles": ".wm-app+.app-composite-widget+.form-field-wrapper+.form-control.with-leading-icon+%7B%0A++++padding-left%3A+calc%28calc%28var%28--wm-form-control-padding%29*1.5%29+%2B+var%28--wm-icon-size-md%29%29%3B%0A%7D%0A%0A.wm-app+.app-composite-widget+.form-field-wrapper+.form-control.with-trailing-icon+%7B%0A++++padding-right%3A+calc%28calc%28var%28--wm-form-control-padding%29*1.5%29+%2B+var%28--wm-icon-size-md%29%29%3B%0A%7D%0A%0A.wm-app+.app-composite-widget+.form-field-wrapper+.form-control.filled+%7B%0A++++--wm-form-control-background%3A+var%28--wm-color-surface-container-highest%29%3B%0A++++border-width%3A+0+0+1px+0%3B%0A++++border-radius%3A+var%28--wm-form-control-radius%29+var%28--wm-form-control-radius%29+0+0%3B%0A++++padding-top%3A+14px%3B%0A%7D%0A%0A.wm-app+.app-composite-widget+.form-field-wrapper+.form-control.filled.ng-touched.ng-invalid+%7B%0A++++border%3A+1px+solid+var%28--wm-color-error%29%3B%0A++++border-width%3A+0+0+1px+0%3B%0A%7D%0A%0A.wm-app+.app-composite-widget+.form-field-wrapper+.form-control.filled.ng-touched.ng-invalid%3Afocus+%7B%0A++++border%3A+1px+solid+var%28--wm-color-error%29%3B%0A++++border-width%3A+0+0+1px+0%3B%0A++++box-shadow%3A+inset+0+-1px+0+0+var%28--wm-color-error%29%3B%0A%7D%0A%0A.wm-app+.app-composite-widget+.form-field-wrapper+.form-control.filled%3Afocus+%7B%0A++++border%3A+1px+solid+var%28--wm-color-primary%29%3B%0A++++border-width%3A+0+0+1px+0%3B%0A++++box-shadow%3A+inset+0+-1px+0+0+var%28--wm-color-primary%29%3B%0A%7D%0A%0A.wm-app+.app-composite-widget+.form-field-wrapper+.btn+%7B%0A++++padding%3A+0%3B%0A++++background%3A+none%3B%0A++++border%3A+none%3B%0A++++min-height%3A+auto%3B%0A%7D%0A%0A.wm-app+.app-composite-widget+.form-field-wrapper+.btn+.app-icon+%7B%0A++++font-size%3A+var%28--wm-icon-size-md%29%3B%0A%7D%0A%0A.wm-app+.app-composite-widget+.form-field-wrapper+.btn-leading-icon%2C%0A.wm-app+.app-composite-widget+.form-field-wrapper+.btn-trailing-icon+%7B%0A++++position%3A+absolute%3B%0A++++z-index%3A+1%3B%0A++++top%3A+calc%2850%25+-+calc%28var%28--wm-icon-size-md%29%2F2%29%29%3B%0A++++left%3A+calc%28var%28--wm-form-control-padding%29+*+0.75%29%3B%0A%7D%0A%0A.wm-app+.app-composite-widget+.form-field-wrapper+.btn-trailing-icon+%7B%0A++++left%3A+auto%3B%0A++++right%3A+calc%28var%28--wm-form-control-padding%29+*+0.75%29%3B%0A%7D%0A%0A.wm-app+.app-composite-widget+.help-wrapper+%7B%0A++++margin-top%3A+4px%3B%0A++++padding%3A+0+var%28--wm-form-control-padding%29%3B%0A%7D%0A%0A.wm-app+.app-composite-widget+.help-wrapper+.help-block+%7B%0A++++margin%3A+0%3B%0A++++padding%3A+0%3B%0A%7D%0A%0A.wm-app+.app-composite-widget+.help-wrapper+.help-block.required%3Aafter+%7B%0A++++display%3A+none%3B%0A%7D%0A%0A.wm-app+.app-composite-widget%3Ahas%28.form-control.ng-touched.ng-invalid%29+.help-wrapper+.help-block+%7B%0A++++--wm-help-block-color%3A+var%28--wm-color-error%29%3B%0A%7D%0A%0A.wm-app+.app-composite-widget.caption-floating%3Anot%28.float-active%29+.control-label.with-leading-icon+%7B%0A++++max-width%3A+calc%28100%25+-+calc%28calc%28var%28--wm-form-control-padding%29*1.5%29+%2B+var%28--wm-icon-size-md%29%29+-+var%28--wm-form-control-padding%29%29%3B%0A++++left%3A+calc%28calc%28var%28--wm-form-control-padding%29*+1.5%29+%2B+var%28--wm-icon-size-md%29%29%3B%0A%7D%0A%0A.wm-app+.app-composite-widget.caption-floating%3Anot%28.float-active%29+.control-label.with-trailing-icon+%7B%0A++++max-width%3A+calc%28100%25+-+var%28--wm-form-control-padding%29+-+calc%28calc%28var%28--wm-form-control-padding%29*1.5%29+%2B+var%28--wm-icon-size-md%29%29%29%3B%0A%7D%0A%0A.wm-app+.app-composite-widget.caption-floating%3Anot%28.float-active%29+.control-label.with-leading-icon.with-trailing-icon+%7B%0A++++max-width%3A+calc%28100%25+-+calc%28calc%28var%28--wm-form-control-padding%29*1.5%29+%2B+var%28--wm-icon-size-md%29%29+-+calc%28calc%28var%28--wm-form-control-padding%29*1.5%29+%2B+var%28--wm-icon-size-md%29%29%29%3B%0A%7D%0A%0A.wm-app+.app-composite-widget.caption-floating.float-active+.control-label.filled+%7B%0A++++left%3A+var%28--wm-form-control-padding%29%3B%0A++++top%3A+calc%28var%28--wm-form-control-padding%29%2F2%29%3B%0A++++padding%3A+0%3B%0A%7D%0A%0A.wm-app+.app-composite-widget.caption-floating.float-active+.control-label.filled%3Abefore+%7B%0A++++background%3A+none%3B%0A%7D%0A%0A.wm-app+.app-composite-widget.caption-floating.float-active+.control-label.filled.with-leading-icon+%7B%0A++++left%3A+calc%28calc%28var%28--wm-form-control-padding%29*+1.5%29+%2B+var%28--wm-icon-size-md%29%29%3B%0A%7D", "variables": "%7B+%7D", "config": "%7B%0A%20%20%22widgetType%22%20%3A%20%22wm-custom-widget%22%2C%0A%20%20%22properties%22%20%3A%20%7B%0A%20%20%20%20%22style%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22list%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Style%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20style%20variant%20between%20outlined%20and%20filled.%22%2C%0A%20%20%20%20%20%20%22options%22%20%3A%20%5B%20%22outlined%22%2C%20%22filled%22%20%5D%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22outlined%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22state%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22list%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22State%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20whether%20the%20TextField%20is%20interactive(enabled)%20or%20non-interactive(disabled)%20state.%22%2C%0A%20%20%20%20%20%20%22options%22%20%3A%20%5B%20%22enabled%22%2C%20%22disabled%22%20%5D%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22enabled%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22text_configurations%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Text%20configurations%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22leading_icon%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22boolean%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Leading%20icon%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20to%20show%2Fhide%20the%20Leading%20Icon%2FButton.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22false%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22trailing_icon%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22boolean%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Trailing%20icon%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20to%20show%2Fhide%20the%20Trailing%20Icon%2FButton.%20%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22false%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22show_supporting_text%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22boolean%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Show%20supporting%20text%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20to%20show%2Fhide%20the%20Supporting%20text(help%20text).%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22false%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22label_text%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Caption%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20caption%20value%20of%20the%20TextField.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22Label%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22placeholder_text%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Placeholder%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20caption%20text%20of%20the%20TextField.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22input_text%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Default%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20default%20value%20of%20the%20TextField.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22supporting_text%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Supporting%20Text%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20supporting%20text(helper%20text)%20value%20of%20the%20TextField.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22leading_icon_class%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Leading%20Icon%20Class%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Allows%20to%20specify%20the%20icon%20for%20the%20Leading%20Icon%2FButton%20from%20wm%20icon%20library.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22wi%20wi-search%22%2C%0A%20%20%20%20%20%20%22widget%22%20%3A%20%22select-icon%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22trailing_icon_class%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Trailing%20Icon%20Class%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Allows%20to%20specify%20the%20icon%20for%20the%20Trailing%20Icon%2FButton%20from%20wm%20icon%20library.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22wi%20wi-clear%22%2C%0A%20%20%20%20%20%20%22widget%22%20%3A%20%22select-icon%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22inputType%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22list%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Input%20Type%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20input%20type%20between%20text%2C%20password%20and%20tel.%22%2C%0A%20%20%20%20%20%20%22options%22%20%3A%20%5B%20%22text%22%2C%20%22password%22%2C%20%22tel%22%20%5D%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22text%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22required%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22boolean%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Required%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20textfiled%20to%20be%20mandatory%20while%20submittion.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22false%22%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%22events%22%20%3A%20%7B%0A%20%20%20%20%22onRender%22%20%3A%20%7B%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Callback%20action%20to%20test%20event%20in%20the%20properties%20panel%22%2C%0A%20%20%20%20%20%20%22eventData%22%20%3A%20%22%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Render%22%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A" };