@wavemaker-ai/custom-widgets-m3 1.0.0-rc.647469
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/custom-widgets-bundle.cjs.js +421 -0
- package/index.d.ts +12 -0
- package/index.js +12 -0
- package/npm-shrinkwrap.json +2301 -0
- package/package-lock.json +2301 -0
- package/package.json +37 -0
- package/scripts/build.d.ts +1 -0
- package/scripts/build.js +172 -0
- package/scripts/generate-pagemin.d.ts +1 -0
- package/scripts/generate-pagemin.js +111 -0
- package/scripts/update-version.d.ts +1 -0
- package/scripts/update-version.js +20 -0
- package/src/checkbox_set/checkbox_set.d.ts +10 -0
- package/src/checkbox_set/checkbox_set.js +53 -0
- package/src/checkbox_set/page.min.d.ts +7 -0
- package/src/checkbox_set/page.min.js +7 -0
- package/src/discrete_slider/discrete_slider.d.ts +25 -0
- package/src/discrete_slider/discrete_slider.js +219 -0
- package/src/discrete_slider/page.min.d.ts +7 -0
- package/src/discrete_slider/page.min.js +7 -0
- package/src/divider/divider.d.ts +4 -0
- package/src/divider/divider.js +42 -0
- package/src/divider/page.min.d.ts +7 -0
- package/src/divider/page.min.js +7 -0
- package/src/icon_button/icon_button.d.ts +0 -0
- package/src/icon_button/icon_button.js +16 -0
- package/src/icon_button/page.min.d.ts +7 -0
- package/src/icon_button/page.min.js +7 -0
- package/src/icon_button_toggleable/icon_button_toggleable.d.ts +0 -0
- package/src/icon_button_toggleable/icon_button_toggleable.js +17 -0
- package/src/icon_button_toggleable/page.min.d.ts +7 -0
- package/src/icon_button_toggleable/page.min.js +7 -0
- package/src/input_chip/input_chip.d.ts +1 -0
- package/src/input_chip/input_chip.js +29 -0
- package/src/input_chip/page.min.d.ts +7 -0
- package/src/input_chip/page.min.js +7 -0
- package/src/progressbar/page.min.d.ts +7 -0
- package/src/progressbar/page.min.js +7 -0
- package/src/progressbar/progressbar.d.ts +2 -0
- package/src/progressbar/progressbar.js +48 -0
- package/src/radio_set/page.min.d.ts +7 -0
- package/src/radio_set/page.min.js +7 -0
- package/src/radio_set/radio_set.d.ts +9 -0
- package/src/radio_set/radio_set.js +46 -0
- package/src/slider/page.min.d.ts +7 -0
- package/src/slider/page.min.js +7 -0
- package/src/slider/slider.d.ts +16 -0
- package/src/slider/slider.js +128 -0
- package/src/switch_button/page.min.d.ts +7 -0
- package/src/switch_button/page.min.js +7 -0
- package/src/switch_button/switch_button.d.ts +8 -0
- package/src/switch_button/switch_button.js +109 -0
- package/src/textfield/page.min.d.ts +7 -0
- package/src/textfield/page.min.js +7 -0
- package/src/textfield/textfield.d.ts +4 -0
- package/src/textfield/textfield.js +66 -0
- package/src/widget-registry.d.ts +6 -0
- package/src/widget-registry.js +68 -0
- package/src/wm-namespace.d.ts +11 -0
- package/src/wm-namespace.js +12 -0
- package/webpack.config.cjs.d.ts +31 -0
- package/webpack.config.cjs.js +40 -0
- package/webpack.config.d.ts +32 -0
- package/webpack.config.js +41 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var textfield = {
|
|
2
|
+
"markup": "%3Cwm-custom-widget-container%3E%0A%20%20%20%20%3Cwm-composite%20name%3D%22composite%22%20captionposition%3D%22floating%22%20required%3D%22false%22%3E%0A%20%20%20%20%20%20%20%20%3Cwm-label%20class%3D%22control-label%22%20notag%3D%22true%22%20name%3D%22labelCaption%22%20caption%3D%22bind%3Aprops.label_text%22%20conditionalclass%3D%22bind%3Aprops.style.toLowerCase()%22%3E%3C%2Fwm-label%3E%0A%20%20%20%20%20%20%20%20%3Cwm-container%20class%3D%22form-field-wrapper%22%20name%3D%22container2%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cwm-button%20class%3D%22btn-icon%20btn-leading-icon%22%20caption%3D%22%22%20type%3D%22button%22%20margin%3D%22unset%22%20name%3D%22buttonLeadingIcon%22%20iconclass%3D%22bind%3Aprops.leading_icon_class%22%20show%3D%22bind%3Aprops.leading_icon%22%20deferload%3D%22false%22%3E%3C%2Fwm-button%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cwm-text%20name%3D%22textField%22%20updateon%3D%22default%22%20placeholder%3D%22bind%3Aprops.placeholder_text%22%20conditionalclass%3D%22bind%3Aprops.style.toLowerCase()%22%20disabled%3D%22bind%3Aprops.state.toLowerCase()%20%3D%3D%20%26quot%3Bdisabled%26quot%3B%22%20datavalue%3D%22bind%3Aprops.input_text%22%3E%3C%2Fwm-text%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cwm-button%20class%3D%22btn-icon%20btn-trailing-icon%22%20caption%3D%22%22%20type%3D%22button%22%20margin%3D%22unset%22%20name%3D%22buttonTrailingIcon%22%20iconclass%3D%22bind%3Aprops.trailing_icon_class%22%20on-click%3D%22buttonTrailingIconClick(%24event%2C%20widget)%22%20show%3D%22bind%3Aprops.trailing_icon%22%20deferload%3D%22false%22%3E%3C%2Fwm-button%3E%0A%20%20%20%20%20%20%20%20%3C%2Fwm-container%3E%0A%20%20%20%20%20%20%20%20%3Cwm-container%20class%3D%22help-wrapper%22%20name%3D%22containerSupportingWrapper%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cwm-label%20padding%3D%22unset%22%20class%3D%22p%20help-block%22%20type%3D%22p%22%20name%3D%22labelSupportingText%22%20caption%3D%22bind%3Aprops.supporting_text%22%20show%3D%22bind%3Aprops.show_supporting_text%22%3E%3C%2Fwm-label%3E%0A%20%20%20%20%20%20%20%20%3C%2Fwm-container%3E%0A%20%20%20%20%3C%2Fwm-composite%3E%0A%3C%2Fwm-custom-widget-container%3E%0A",
|
|
3
|
+
"script": "%2F*%0A%20*%20Use%20App.getDependency%20for%20Dependency%20Injection%0A%20*%20eg%3A%20var%20DialogService%20%3D%20App.getDependency('DialogService')%3B%0A%20*%2F%0A%2F*%20perform%20any%20action%20on%20widgets%2Fvariables%20within%20this%20block%20*%2F%0AWidget.onReady%20%3D%20function()%20%7B%0A%20%20%20%20%2F*%0A%20%20%20%20%20*%20variables%20can%20be%20accessed%20through%20'Widget.Variables'%20property%20here%0A%20%20%20%20%20*%20e.g.%20to%20get%20dataSet%20in%20a%20staticVariable%20named%20'loggedInUser'%20use%20following%20script%0A%20%20%20%20%20*%20Widget.Variables.loggedInUser.getData()%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20widgets%20can%20be%20accessed%20through%20'widgetMap'%20property%20here%0A%20%20%20%20%20*%20e.g.%20to%20get%20value%20of%20text%20widget%20named%20'username'%20use%20following%20script%0A%20%20%20%20%20*%20'widgetMap.username.datavalue'%0A%20%20%20%20%20*%2F%0A%20%20%20%20const%20widgetMap%20%3D%20Widget.Widgets%3B%0A%20%20%20%20const%20%7B%0A%20%20%20%20%20%20%20%20leading_icon%2C%0A%20%20%20%20%20%20%20%20trailing_icon%2C%0A%20%20%20%20%20%20%20%20input_type%2C%0A%20%20%20%20%20%20%20%20required%2C%0A%20%20%20%20%7D%20%3D%20Widget.props%0A%20%20%20%20handleLeadingIcon(widgetMap%2C%20leading_icon)%3B%0A%20%20%20%20handleTrailingIcon(widgetMap%2C%20trailing_icon)%3B%0A%20%20%20%20handleinputType(widgetMap%2C%20input_type)%3B%0A%20%20%20%20handleRequired(widgetMap%2C%20required)%3B%0A%20%20%20%20Widget.getDatavalue%20%3D%20()%20%3D%3E%20Widget.props.input_text%3B%0A%7D%3B%0A%0AWidget.onPropertyChange%20%3D%20function(propname%2C%20newvalue%2C%20oldvalue)%20%7B%0A%20%20%20%20const%20widgetMap%20%3D%20Widget.Widgets%3B%0A%20%20%20%20const%20%7B%0A%20%20%20%20%20%20%20%20leading_icon%2C%0A%20%20%20%20%20%20%20%20trailing_icon%2C%0A%20%20%20%20%20%20%20%20input_type%2C%0A%20%20%20%20%20%20%20%20required%0A%20%20%20%20%7D%20%3D%20Widget.props%0A%20%20%20%20switch%20(propname)%20%7B%0A%20%20%20%20%20%20%20%20case%20'prop-leading_icon'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20handleLeadingIcon(widgetMap%2C%20leading_icon)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20break%0A%20%20%20%20%20%20%20%20case%20'prop-trailing_icon'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20handleTrailingIcon(widgetMap%2C%20trailing_icon)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20break%0A%20%20%20%20%20%20%20%20case%20'prop-required'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20handleRequired(widgetMap%2C%20required)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20break%0A%20%20%20%20%20%20%20%20case%20'prop-input_type'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20handleinputType(widgetMap%2C%20input_type)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20break%0A%20%20%20%20%7D%0A%7D%0A%0Afunction%20handleLeadingIcon(widgetMap%2C%20leading_icon)%20%7B%0A%20%20%20%20widgetMap.textField.nativeElement.classList.remove('with-leading-icon')%3B%0A%20%20%20%20widgetMap.labelCaption.nativeElement.classList.remove('with-leading-icon')%3B%0A%20%20%20%20if%20(leading_icon%20%3D%3D%20true)%20%7B%0A%20%20%20%20%20%20%20%20widgetMap.labelCaption.class%20%2B%3D%20'%20with-leading-icon'%3B%0A%20%20%20%20%20%20%20%20widgetMap.textField.class%20%2B%3D%20'%20with-leading-icon'%3B%0A%20%20%20%20%7D%0A%7D%0A%0Afunction%20handleTrailingIcon(widgetMap%2C%20trailing_icon)%20%7B%0A%20%20%20%20widgetMap.textField.nativeElement.classList.remove('with-trailing-icon')%3B%0A%20%20%20%20widgetMap.labelCaption.nativeElement.classList.remove('with-trailing-icon')%3B%0A%20%20%20%20if%20(trailing_icon%20%3D%3D%20true)%20%7B%0A%20%20%20%20%20%20%20%20widgetMap.labelCaption.class%20%2B%3D%20'%20with-trailing-icon'%3B%0A%20%20%20%20%20%20%20%20widgetMap.textField.class%20%2B%3D%20'%20with-trailing-icon'%3B%0A%20%20%20%20%7D%0A%7D%0A%0Afunction%20handleRequired(widgetMap%2C%20required)%20%7B%0A%20%20%20%20widgetMap.composite.required%20%3D%20required%3B%0A%7D%0A%0Afunction%20handleinputType(widgetMap%2C%20input_type)%20%7B%0A%20%20%20%20widgetMap.textField.type%20%3D%20input_type%3B%0A%7D%0A%0AWidget.buttonTrailingIconClick%20%3D%20function(%24event%2C%20widget)%20%7B%0A%20%20%20%20%2F%2F%20Widget.invokeEvent('trailingIconButtonOnClick')%3B%0A%7D%3B%0A",
|
|
4
|
+
"styles": ".wm-app%20.app-composite-widget%20.form-field-wrapper%20.form-control.with-leading-icon%20%7B%0A%20%20%20%20padding-left%3A%20calc(calc(var(--wm-form-control-padding)*1.5)%20%2B%20var(--wm-icon-size-md))%3B%0A%7D%0A%0A.wm-app%20.app-composite-widget%20.form-field-wrapper%20.form-control.with-trailing-icon%20%7B%0A%20%20%20%20padding-right%3A%20calc(calc(var(--wm-form-control-padding)*1.5)%20%2B%20var(--wm-icon-size-md))%3B%0A%7D%0A%0A.wm-app%20.app-composite-widget%20.form-field-wrapper%20.form-control.filled%20%7B%0A%20%20%20%20--wm-form-control-background%3A%20var(--wm-color-surface-container-highest)%3B%0A%20%20%20%20border-width%3A%200%200%201px%200%3B%0A%20%20%20%20border-radius%3A%20var(--wm-form-control-radius)%20var(--wm-form-control-radius)%200%200%3B%0A%20%20%20%20padding-bottom%3A%200%3B%0A%7D%0A%0A.wm-app%20.app-composite-widget%20.form-field-wrapper%20.form-control.filled%3Afocus%20%7B%0A%20%20%20%20box-shadow%3A%20inset%200%20-2px%200%200%20var(--wm-form-control-border-color-focus)%3B%0A%7D%0A%0A.wm-app%20.app-composite-widget%20.form-field-wrapper%20.form-control.filled.ng-touched.ng-invalid%3Afocus%20%7B%0A%20%20%20%20box-shadow%3A%20inset%200%20-2px%200%200%20var(--wm-form-control-border-color-error)%3B%0A%7D%0A%0A.wm-app%20.app-composite-widget%20.form-field-wrapper%20.btn%20%7B%0A%20%20%20%20padding%3A%200%3B%0A%20%20%20%20background%3A%20none%3B%0A%20%20%20%20border%3A%20none%3B%0A%20%20%20%20min-height%3A%20auto%3B%0A%7D%0A%0A.wm-app%20.app-composite-widget%20.form-field-wrapper%20.btn%20.app-icon%20%7B%0A%20%20%20%20font-size%3A%20var(--wm-icon-size-md)%3B%0A%7D%0A%0A.wm-app%20.app-composite-widget%20.form-field-wrapper%20.btn-leading-icon%2C%0A.wm-app%20.app-composite-widget%20.form-field-wrapper%20.btn-trailing-icon%20%7B%0A%20%20%20%20position%3A%20absolute%3B%0A%20%20%20%20z-index%3A%201%3B%0A%20%20%20%20top%3A%20calc(var(--wm-form-control-height)%20%2F%203)%3B%0A%20%20%20%20left%3A%200%3B%0A%7D%0A%0A.wm-app%20.app-composite-widget%20.form-field-wrapper%20.btn-trailing-icon%20%7B%0A%20%20%20%20left%3A%20auto%3B%0A%20%20%20%20right%3A%200%3B%0A%7D%0A%0A.wm-app%20.app-composite-widget%20.help-wrapper%20%7B%0A%20%20%20%20width%3A%20100%25%3B%0A%20%20%20%20margin-top%3A%204px%3B%0A%20%20%20%20padding%3A%200%20var(--wm-form-control-padding)%3B%0A%7D%0A%0A.wm-app%20.app-composite-widget%20.help-wrapper%20.help-block%20%7B%0A%20%20%20%20margin%3A%200%3B%0A%20%20%20%20padding%3A%200%3B%0A%7D%0A%0A.wm-app%20.app-composite-widget%20.help-wrapper%20.help-block.required%3Aafter%20%7B%0A%20%20%20%20display%3A%20none%3B%0A%7D%0A%0A.wm-app%20.app-composite-widget%3Ahas(.form-control.ng-touched.ng-invalid)%20.help-wrapper%20.help-block%20%7B%0A%20%20%20%20--wm-help-block-color%3A%20var(--wm-color-error)%3B%0A%7D%0A%0A.wm-app%20.app-composite-widget.caption-floating%3Anot(.float-active)%20.control-label.with-leading-icon%20%7B%0A%20%20%20%20max-width%3A%20calc(100%25%20-%20calc(calc(var(--wm-form-control-padding)*1.5)%20%2B%20var(--wm-icon-size-md))%20-%20var(--wm-form-control-padding))%3B%0A%20%20%20%20left%3A%20calc(calc(var(--wm-form-control-padding)*%201.5)%20%2B%20var(--wm-icon-size-md))%3B%0A%7D%0A%0A.wm-app%20.app-composite-widget.caption-floating%3Anot(.float-active)%20.control-label.with-trailing-icon%20%7B%0A%20%20%20%20max-width%3A%20calc(100%25%20-%20var(--wm-form-control-padding)%20-%20calc(calc(var(--wm-form-control-padding)*1.5)%20%2B%20var(--wm-icon-size-md)))%3B%0A%7D%0A%0A.wm-app%20.app-composite-widget.caption-floating%3Anot(.float-active)%20.control-label.with-leading-icon.with-trailing-icon%20%7B%0A%20%20%20%20max-width%3A%20calc(100%25%20-%20calc(calc(var(--wm-form-control-padding)*1.5)%20%2B%20var(--wm-icon-size-md))%20-%20calc(calc(var(--wm-form-control-padding)*1.5)%20%2B%20var(--wm-icon-size-md)))%3B%0A%7D%0A%0A.wm-app%20.app-composite-widget.caption-floating.float-active%20.control-label.filled%20%7B%0A%20%20%20%20left%3A%20var(--wm-form-control-padding)%3B%0A%20%20%20%20top%3A%20calc(var(--wm-form-control-height)*0.15)%3B%0A%20%20%20%20padding%3A%200%3B%0A%7D%0A%0A.wm-app%20.app-composite-widget.caption-floating.float-active%20.control-label.filled%3Abefore%20%7B%0A%20%20%20%20background%3A%20none%3B%0A%7D%0A%0A.wm-app%20.app-composite-widget.caption-floating.float-active%20.control-label.filled.with-leading-icon%20%7B%0A%20%20%20%20left%3A%20calc(calc(var(--wm-form-control-padding)*%201.5)%20%2B%20var(--wm-icon-size-md))%3B%0A%20%20%20%20max-width%3A%20calc(100%25%20-%20var(--wm-form-control-padding)%20-%20var(--wm-form-control-padding)%20-%20calc(calc(var(--wm-form-control-padding)*%202.5)%20%2B%20var(--wm-icon-size-md)))%3B%0A%7D%0A",
|
|
5
|
+
"variables": "%7B%20%7D%0A",
|
|
6
|
+
"config": "%7B%0A%20%20%22widgetType%22%20%3A%20%22wm-input-text%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%22Allows%20you%20to%20specify%20different%20text%20types%20for%20the%20TextField%2C%20including%20input%20text%2C%20label%20text%2C%20and%20placeholder%20text.%22%2C%0A%20%20%20%20%20%20%22options%22%20%3A%20%5B%20%22Input%20text%22%2C%20%22Label%20text%22%2C%20%22Placeholder%20text%22%20%5D%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22Input%20text%22%2C%0A%20%20%20%20%20%20%22show%22%20%3A%20false%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%22Enter%20Text%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%22Supporting%20Text%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%22input_type%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%22trailingIconButtonOnClick%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22event%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Trailing%20Icon%20Button%20onClick%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Function%20to%20be%20called%20when%20the%20value%20of%20the%20slider%20changes.%20This%20function%20receives%20parameters%20such%20as%20the%20event%2C%20widget%2C%20new%20value%2C%20and%20old%20value.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22buttonTrailingIconClick(%24event%2C%20widget)%22%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A"
|
|
7
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare function handleLeadingIcon(widgetMap: any, leading_icon: any): void;
|
|
2
|
+
declare function handleTrailingIcon(widgetMap: any, trailing_icon: any): void;
|
|
3
|
+
declare function handleRequired(widgetMap: any, required: any): void;
|
|
4
|
+
declare function handleinputType(widgetMap: any, input_type: any): void;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Use App.getDependency for Dependency Injection
|
|
3
|
+
* eg: var DialogService = App.getDependency('DialogService');
|
|
4
|
+
*/
|
|
5
|
+
/* perform any action on widgets/variables within this block */
|
|
6
|
+
Widget.onReady = function () {
|
|
7
|
+
/*
|
|
8
|
+
* variables can be accessed through 'Widget.Variables' property here
|
|
9
|
+
* e.g. to get dataSet in a staticVariable named 'loggedInUser' use following script
|
|
10
|
+
* Widget.Variables.loggedInUser.getData()
|
|
11
|
+
*
|
|
12
|
+
* widgets can be accessed through 'widgetMap' property here
|
|
13
|
+
* e.g. to get value of text widget named 'username' use following script
|
|
14
|
+
* 'widgetMap.username.datavalue'
|
|
15
|
+
*/
|
|
16
|
+
var widgetMap = Widget.Widgets;
|
|
17
|
+
var _a = Widget.props, leading_icon = _a.leading_icon, trailing_icon = _a.trailing_icon, input_type = _a.input_type, required = _a.required;
|
|
18
|
+
handleLeadingIcon(widgetMap, leading_icon);
|
|
19
|
+
handleTrailingIcon(widgetMap, trailing_icon);
|
|
20
|
+
handleinputType(widgetMap, input_type);
|
|
21
|
+
handleRequired(widgetMap, required);
|
|
22
|
+
Widget.getDatavalue = function () { return Widget.props.input_text; };
|
|
23
|
+
};
|
|
24
|
+
Widget.onPropertyChange = function (propname, newvalue, oldvalue) {
|
|
25
|
+
var widgetMap = Widget.Widgets;
|
|
26
|
+
var _a = Widget.props, leading_icon = _a.leading_icon, trailing_icon = _a.trailing_icon, input_type = _a.input_type, required = _a.required;
|
|
27
|
+
switch (propname) {
|
|
28
|
+
case 'prop-leading_icon':
|
|
29
|
+
handleLeadingIcon(widgetMap, leading_icon);
|
|
30
|
+
break;
|
|
31
|
+
case 'prop-trailing_icon':
|
|
32
|
+
handleTrailingIcon(widgetMap, trailing_icon);
|
|
33
|
+
break;
|
|
34
|
+
case 'prop-required':
|
|
35
|
+
handleRequired(widgetMap, required);
|
|
36
|
+
break;
|
|
37
|
+
case 'prop-input_type':
|
|
38
|
+
handleinputType(widgetMap, input_type);
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
function handleLeadingIcon(widgetMap, leading_icon) {
|
|
43
|
+
widgetMap.textField.nativeElement.classList.remove('with-leading-icon');
|
|
44
|
+
widgetMap.labelCaption.nativeElement.classList.remove('with-leading-icon');
|
|
45
|
+
if (leading_icon == true) {
|
|
46
|
+
widgetMap.labelCaption.class += ' with-leading-icon';
|
|
47
|
+
widgetMap.textField.class += ' with-leading-icon';
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function handleTrailingIcon(widgetMap, trailing_icon) {
|
|
51
|
+
widgetMap.textField.nativeElement.classList.remove('with-trailing-icon');
|
|
52
|
+
widgetMap.labelCaption.nativeElement.classList.remove('with-trailing-icon');
|
|
53
|
+
if (trailing_icon == true) {
|
|
54
|
+
widgetMap.labelCaption.class += ' with-trailing-icon';
|
|
55
|
+
widgetMap.textField.class += ' with-trailing-icon';
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function handleRequired(widgetMap, required) {
|
|
59
|
+
widgetMap.composite.required = required;
|
|
60
|
+
}
|
|
61
|
+
function handleinputType(widgetMap, input_type) {
|
|
62
|
+
widgetMap.textField.type = input_type;
|
|
63
|
+
}
|
|
64
|
+
Widget.buttonTrailingIconClick = function ($event, widget) {
|
|
65
|
+
// Widget.invokeEvent('trailingIconButtonOnClick');
|
|
66
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export var widgetRegistry = [
|
|
2
|
+
{
|
|
3
|
+
"name": "checkbox_set",
|
|
4
|
+
"displayName": "Checkboxset",
|
|
5
|
+
"iconClass": "checkboxset",
|
|
6
|
+
"desc": "Checkbox set control supporting Material 3 design system"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"name": "divider",
|
|
10
|
+
"displayName": "Divider",
|
|
11
|
+
"iconClass": "design-dialog",
|
|
12
|
+
"desc": "Divider based on Material 3 design system"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "icon_button",
|
|
16
|
+
"displayName": "Icon button",
|
|
17
|
+
"iconClass": "button",
|
|
18
|
+
"desc": "Icon button based on Material 3 design system"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "input_chip",
|
|
22
|
+
"displayName": "Input Chip",
|
|
23
|
+
"iconClass": "chips",
|
|
24
|
+
"desc": "Input chips based on Material 3 design system"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "radio_set",
|
|
28
|
+
"displayName": "Radioset",
|
|
29
|
+
"iconClass": "radioset",
|
|
30
|
+
"desc": "Radioset based on Material 3 design system"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "switch_button",
|
|
34
|
+
"displayName": "Switch",
|
|
35
|
+
"iconClass": "switch",
|
|
36
|
+
"desc": "Switch button based on Material 3 design system"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "textfield",
|
|
40
|
+
"displayName": "Textfield",
|
|
41
|
+
"iconClass": "text",
|
|
42
|
+
"desc": "Input text control based on Material 3 design system"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "slider",
|
|
46
|
+
"displayName": "Slider",
|
|
47
|
+
"iconClass": "slider",
|
|
48
|
+
"desc": "Slider control based on Material 3 design system"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "discrete_slider",
|
|
52
|
+
"displayName": "Discrete slider",
|
|
53
|
+
"iconClass": "slider",
|
|
54
|
+
"desc": "Discrete Slider control based on Material 3 design system"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "progressbar",
|
|
58
|
+
"displayName": "Progress bar",
|
|
59
|
+
"iconClass": "progress",
|
|
60
|
+
"desc": "Progress bar widget based on Material 3 design system"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "icon_button_toggleable",
|
|
64
|
+
"displayName": "Icon Button Toggleable",
|
|
65
|
+
"iconClass": "button",
|
|
66
|
+
"desc": "Icon Button Toggleable based on Material 3 design system"
|
|
67
|
+
},
|
|
68
|
+
];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Central WaveMaker npm namespace configuration.
|
|
3
|
+
*
|
|
4
|
+
* All source files import WM_NPM_SCOPE from here instead of hardcoding
|
|
5
|
+
* '@wavemaker'. Override via the WM_NPM_SCOPE environment variable to
|
|
6
|
+
* switch namespaces at build or runtime.
|
|
7
|
+
*
|
|
8
|
+
* Default: '@wavemaker-ai'
|
|
9
|
+
* Override: WM_NPM_SCOPE=@wavemaker node scripts/build.js post-build
|
|
10
|
+
*/
|
|
11
|
+
export const WM_NPM_SCOPE: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Central WaveMaker npm namespace configuration.
|
|
3
|
+
*
|
|
4
|
+
* All source files import WM_NPM_SCOPE from here instead of hardcoding
|
|
5
|
+
* '@wavemaker'. Override via the WM_NPM_SCOPE environment variable to
|
|
6
|
+
* switch namespaces at build or runtime.
|
|
7
|
+
*
|
|
8
|
+
* Default: '@wavemaker-ai'
|
|
9
|
+
* Override: WM_NPM_SCOPE=@wavemaker node scripts/build.js post-build
|
|
10
|
+
*/
|
|
11
|
+
var WM_NPM_SCOPE = process.env.WM_NPM_SCOPE || '@wavemaker-ai';
|
|
12
|
+
module.exports = { WM_NPM_SCOPE: WM_NPM_SCOPE };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export let entry: string;
|
|
2
|
+
export namespace module {
|
|
3
|
+
let rules: ({
|
|
4
|
+
test: RegExp;
|
|
5
|
+
use: string;
|
|
6
|
+
exclude: RegExp;
|
|
7
|
+
type?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
test: RegExp;
|
|
10
|
+
use: string[];
|
|
11
|
+
exclude: RegExp;
|
|
12
|
+
type?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
test: RegExp;
|
|
15
|
+
type: string;
|
|
16
|
+
exclude: RegExp;
|
|
17
|
+
use?: undefined;
|
|
18
|
+
})[];
|
|
19
|
+
}
|
|
20
|
+
export namespace resolve {
|
|
21
|
+
let extensions: string[];
|
|
22
|
+
}
|
|
23
|
+
export let devtool: string;
|
|
24
|
+
export namespace output {
|
|
25
|
+
let filename: string;
|
|
26
|
+
let path: string;
|
|
27
|
+
namespace library {
|
|
28
|
+
let type: string;
|
|
29
|
+
}
|
|
30
|
+
let globalObject: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var path = require('path');
|
|
2
|
+
module.exports = {
|
|
3
|
+
entry: './index.ts',
|
|
4
|
+
module: {
|
|
5
|
+
rules: [
|
|
6
|
+
{
|
|
7
|
+
test: /\.ts?$/,
|
|
8
|
+
use: 'ts-loader',
|
|
9
|
+
exclude: /node_modules/,
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
test: /\.css$/,
|
|
13
|
+
use: ['style-loader', 'css-loader'],
|
|
14
|
+
exclude: /node_modules/,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
test: /\.html$/,
|
|
18
|
+
use: 'html-loader',
|
|
19
|
+
exclude: /node_modules/,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
test: /\.json$/,
|
|
23
|
+
type: 'json',
|
|
24
|
+
exclude: /node_modules/,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
resolve: {
|
|
29
|
+
extensions: ['.ts', '.js', '.json', '.html', '.css'],
|
|
30
|
+
},
|
|
31
|
+
devtool: 'inline-source-map',
|
|
32
|
+
output: {
|
|
33
|
+
filename: 'custom-widgets-bundle.cjs.js',
|
|
34
|
+
path: path.resolve(__dirname, 'dist/es2015'),
|
|
35
|
+
library: {
|
|
36
|
+
type: 'commonjs'
|
|
37
|
+
},
|
|
38
|
+
globalObject: 'window',
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export let entry: string;
|
|
2
|
+
export namespace module {
|
|
3
|
+
let rules: ({
|
|
4
|
+
test: RegExp;
|
|
5
|
+
use: string;
|
|
6
|
+
exclude: RegExp;
|
|
7
|
+
type?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
test: RegExp;
|
|
10
|
+
use: string[];
|
|
11
|
+
exclude: RegExp;
|
|
12
|
+
type?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
test: RegExp;
|
|
15
|
+
type: string;
|
|
16
|
+
exclude: RegExp;
|
|
17
|
+
use?: undefined;
|
|
18
|
+
})[];
|
|
19
|
+
}
|
|
20
|
+
export namespace resolve {
|
|
21
|
+
let extensions: string[];
|
|
22
|
+
}
|
|
23
|
+
export let devtool: string;
|
|
24
|
+
export namespace output {
|
|
25
|
+
let filename: string;
|
|
26
|
+
let path: string;
|
|
27
|
+
namespace library {
|
|
28
|
+
let type: string;
|
|
29
|
+
let name: string;
|
|
30
|
+
}
|
|
31
|
+
let globalObject: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var path = require('path');
|
|
2
|
+
module.exports = {
|
|
3
|
+
entry: './index.ts',
|
|
4
|
+
module: {
|
|
5
|
+
rules: [
|
|
6
|
+
{
|
|
7
|
+
test: /\.ts?$/,
|
|
8
|
+
use: 'ts-loader',
|
|
9
|
+
exclude: /node_modules/,
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
test: /\.css$/,
|
|
13
|
+
use: ['style-loader', 'css-loader'],
|
|
14
|
+
exclude: /node_modules/,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
test: /\.html$/,
|
|
18
|
+
use: 'html-loader',
|
|
19
|
+
exclude: /node_modules/,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
test: /\.json$/,
|
|
23
|
+
type: 'json',
|
|
24
|
+
exclude: /node_modules/,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
resolve: {
|
|
29
|
+
extensions: ['.ts', '.js', '.json', '.html', '.css'],
|
|
30
|
+
},
|
|
31
|
+
devtool: 'inline-source-map',
|
|
32
|
+
output: {
|
|
33
|
+
filename: 'index.js',
|
|
34
|
+
path: path.resolve(__dirname, 'dist/umd'),
|
|
35
|
+
library: {
|
|
36
|
+
type: 'umd',
|
|
37
|
+
name: 'wm_custom_widgets',
|
|
38
|
+
},
|
|
39
|
+
globalObject: 'window',
|
|
40
|
+
},
|
|
41
|
+
};
|