@wavemaker/angular-codegen 12.0.0-next.45066 → 12.0.0-next.45067
Sign up to get free protection for your applications and to get access to all the features.
- angular-codegen/angular-app/package-lock.json +12 -12
- angular-codegen/angular-app/package.json +4 -4
- angular-codegen/dependencies/custom-widgets-bundle.cjs.js +422 -0
- angular-codegen/package.json +1 -1
- angular-codegen/src/gen-components.js +1 -1
- angular-codegen/src/pages-util.js +1 -1
- angular-codegen/templates/customwidget/customwidget.component.ts.hbs +0 -2
- angular-codegen/templates/page/page.module.ts.hbs +5 -0
- angular-codegen/dependencies/custom-widgets-m3/src/checkbox_set/checkbox_set.d.ts +0 -0
- angular-codegen/dependencies/custom-widgets-m3/src/checkbox_set/checkbox_set.js +0 -38
- angular-codegen/dependencies/custom-widgets-m3/src/checkbox_set/page.min.d.ts +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/checkbox_set/page.min.js +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/discrete_slider/discrete_slider.d.ts +0 -25
- angular-codegen/dependencies/custom-widgets-m3/src/discrete_slider/discrete_slider.js +0 -208
- angular-codegen/dependencies/custom-widgets-m3/src/discrete_slider/page.min.d.ts +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/discrete_slider/page.min.js +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/divider/divider.d.ts +0 -4
- angular-codegen/dependencies/custom-widgets-m3/src/divider/divider.js +0 -42
- angular-codegen/dependencies/custom-widgets-m3/src/divider/page.min.d.ts +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/divider/page.min.js +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/icon_button/icon_button.d.ts +0 -0
- angular-codegen/dependencies/custom-widgets-m3/src/icon_button/icon_button.js +0 -24
- angular-codegen/dependencies/custom-widgets-m3/src/icon_button/page.min.d.ts +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/icon_button/page.min.js +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/input_chip/input_chip.d.ts +0 -0
- angular-codegen/dependencies/custom-widgets-m3/src/input_chip/input_chip.js +0 -34
- angular-codegen/dependencies/custom-widgets-m3/src/input_chip/input_chip.variables.d.ts +0 -0
- angular-codegen/dependencies/custom-widgets-m3/src/input_chip/input_chip.variables.js +0 -1
- angular-codegen/dependencies/custom-widgets-m3/src/input_chip/page.min.d.ts +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/input_chip/page.min.js +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/payee_list/page.min.d.ts +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/payee_list/page.min.js +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/payee_list/payee_list.d.ts +0 -0
- angular-codegen/dependencies/custom-widgets-m3/src/payee_list/payee_list.js +0 -19
- angular-codegen/dependencies/custom-widgets-m3/src/progressbar/page.min.d.ts +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/progressbar/page.min.js +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/progressbar/progressbar.d.ts +0 -0
- angular-codegen/dependencies/custom-widgets-m3/src/progressbar/progressbar.js +0 -52
- angular-codegen/dependencies/custom-widgets-m3/src/radio_set/page.min.d.ts +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/radio_set/page.min.js +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/radio_set/radio_set.d.ts +0 -0
- angular-codegen/dependencies/custom-widgets-m3/src/radio_set/radio_set.js +0 -35
- angular-codegen/dependencies/custom-widgets-m3/src/slider/page.min.d.ts +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/slider/page.min.js +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/slider/slider.d.ts +0 -16
- angular-codegen/dependencies/custom-widgets-m3/src/slider/slider.js +0 -121
- angular-codegen/dependencies/custom-widgets-m3/src/switch_button/page.min.d.ts +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/switch_button/page.min.js +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/switch_button/switch_button.d.ts +0 -6
- angular-codegen/dependencies/custom-widgets-m3/src/switch_button/switch_button.js +0 -103
- angular-codegen/dependencies/custom-widgets-m3/src/textfield/page.min.d.ts +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/textfield/page.min.js +0 -7
- angular-codegen/dependencies/custom-widgets-m3/src/textfield/textfield.d.ts +0 -4
- angular-codegen/dependencies/custom-widgets-m3/src/textfield/textfield.js +0 -65
- angular-codegen/dependencies/custom-widgets-m3/src/widget-registry.d.ts +0 -6
- angular-codegen/dependencies/custom-widgets-m3/src/widget-registry.js +0 -68
@@ -1,7 +0,0 @@
|
|
1
|
-
export var switch_button = {
|
2
|
-
"markup": "%3Cwm-custom-widget-container+name%3D%22partial1%22%3E%0A++++%3Cwm-composite+name%3D%22composite%22+required%3D%22false%22%3E%0A++++++++%3Cwm-label+class%3D%22+control-label%22+notag%3D%22true%22+name%3D%22label1%22+caption%3D%22bind%3Aprops.label_text%22%3E%3C%2Fwm-label%3E%0A++++++++%3Cwm-container+name%3D%22container1%22+class%3D%22switch-wrapper%22+conditionalclass%3D%22bind%3A%7B%27filled-switch-wrapper%27%3A+props.switch_type+%3D%3D%3D+%26quot%3BFilled%26quot%3B%2C%0A%27condensed-switch-wrapper%27%3A+props.switch_type+%3D%3D%3D+%26quot%3BCondensed%26quot%3B%2C++++%0A%27ios-switch-wrapper%27%3Aprops.switch_type++%3D%3D%3D+%26quot%3BIOS%26quot%3B%7D%22%3E%0A++++++++++++%3Cwm-checkbox+caption%3D%22Toggle%22+type%3D%22toggle%22+name%3D%22toggle%22+disabled%3D%22bind%3Aprops.state%3D%3D%26quot%3BDisabled%26quot%3B%3Ftrue%3Afalse%22+datavalue%3D%22bind%3Aprops.selected%22+class%3D%22switch%22+checkedvalue%3D%22true%22+uncheckedvalue%3D%22false%22+required%3D%22bind%3Aprops.required%22+show%3D%22true%22%3E%3C%2Fwm-checkbox%3E%0A++++++++++++%3Cwm-container+name%3D%22container2%22+class%3D%22icon-container%22+show%3D%22true%22%3E%0A++++++++++++++++%3Cwm-icon+name%3D%22icon1%22+iconclass%3D%22bind%3Aprops.unselected_icon%22+show%3D%22bind%3Aprops.unselected_icon%22+class%3D%22start-icon%22%3E%3C%2Fwm-icon%3E%0A++++++++++++++++%3Cwm-icon+name%3D%22icon2%22+iconclass%3D%22bind%3Aprops.selected_icon%22+show%3D%22bind%3Aprops.selected_icon%22+class%3D%22end-icon%22%3E%3C%2Fwm-icon%3E%0A++++++++++++%3C%2Fwm-container%3E%0A++++++++%3C%2Fwm-container%3E%0A++++%3C%2Fwm-composite%3E%0A%3C%2Fwm-custom-widget-container%3E",
|
3
|
-
"script": "%2F*%0A+*+Use+App.getDependency+for+Dependency+Injection%0A+*+Example%3A%0A+*+var+DialogService+%3D+App.getDependency%28%27DialogService%27%29%3B%0A+*%2F%0A%0AWidget.onPropertyChange+%3D+function%28propname%2C+newvalue%2C+oldvalue%29+%7B%0A++++const+widgetMap+%3D+Widget.Widgets%3B%0A++++const+%7B%0A++++++++switch_type%2C%0A++++++++icon%2C%0A++++++++unselected_icon%2C%0A++++++++required%2C%0A++++++++unchecked_value%2C%0A++++++++checked_value%2C%0A++++++++selected%0A++++%7D+%3D+Widget.props%0A++++switch+%28propname%29+%7B%0A++++++++case+%27prop-switch_type%27%3A%0A++++++++++++handleTypeChange%28switch_type%2C+icon%2C+unselected_icon%2C+widgetMap%29%3B%0A%0A++++++++++++break%3B%0A++++++++case+%27prop-required%27%3A%0A++++++++++++handleRequiredChange%28required%2C+widgetMap%29%3B%0A++++++++++++break%3B%0A++++++++case+%27prop-selected%27%3A%0A++++++++++++handleSelectedValueChange%28selected%2C+widgetMap%29%3B%0A++++++++++++break%3B%0A++++++++case+%27prop-checked_value%27%3A%0A++++++++++++handleCheckedValueChange%28checked_value%2C+selected%2C+widgetMap%29%3B%0A++++++++++++break%3B%0A++++++++case+%27prop-unchecked_value%27%3A%0A++++++++++++handleUnCheckedValueChange%28unchecked_value%2C+selected%2C+widgetMap%29%3B%0A++++++++++++break%3B%0A++++++++case+%27prop-icon%27%3A%0A++++++++++++handleIconVisibiltyChange%28icon%2C+widgetMap%29%3B%0A++++++++++++break%3B%0A++++%7D%0A%7D%0A%0A%0A%2F*+Perform+any+action+on+widgets%2Fvariables+within+this+block+*%2F%0AWidget.onReady+%3D+function%28%29+%7B%0A++++const+widgetMap+%3D+Widget.Widgets%3B%0A++++const+%7B%0A++++++++switch_type%2C%0A++++++++icon%2C%0A++++++++unselected_icon%2C%0A++++++++required%2C%0A++++++++unchecked_value%2C%0A++++++++checked_value%2C%0A++++++++selected%0A++++%7D+%3D+Widget.props%0A++++handleTypeChange%28switch_type%2C+icon%2C+unselected_icon%2C+widgetMap%29%3B%0A++++handleRequiredChange%28required%2C+widgetMap%29%3B%0A++++handleCheckedValueChange%28checked_value%2C+selected%2C+widgetMap%29%3B%0A++++handleUnCheckedValueChange%28unchecked_value%2C+selected%2C+widgetMap%29%3B%0A++++handleSelectedValueChange%28selected%2C+widgetMap%29%3B%0A%0A%7D%0A%0Afunction+handleTypeChange%28switch_type%2C+icon%2C+unselected_icon%2C+widgetMap%29+%7B%0A++++widgetMap.toggle.nativeElement.classList.remove%28%27filled-switch%27%2C+%27icon%27%2C+%27unselected-icon%27%2C+%27condensed-switch%27%2C+%27ios-switch%27%29%0A++++%2F%2F+Set+CSS+classes+for+the+toggle+widget+based+on+the+switch+type%0A++++if+%28switch_type+%3D%3D%3D+%22Filled%22%29+%7B%0A++++++++if+%28icon.toString%28%29.toLowerCase%28%29+%3D%3D%3D+%27true%27%29+%7B%0A++++++++++++widgetMap.toggle.nativeElement.classList.add%28%27filled-switch%27%2C+%27icon%27%29%0A++++++++%7D+else+%7B%0A++++++++++++widgetMap.toggle.nativeElement.classList.add%28%27filled-switch%27%29%0A%0A++++++++%7D%0A++++++++%2F%2F+Add+%27unselected-icon%27+class+if+no+unselected_icon+is+specified%0A++++++++if+%28unselected_icon+%3D%3D+null+%7C%7C+unselected_icon+%3D%3D%3D+%22%22+%7C%7C+unselected_icon+%3D%3D%3D+%22+%22%29+%7B%0A++++++++++++widgetMap.toggle.nativeElement.classList.add%28%27filled-switch%27%2C+%27icon%27%2C+%27unselected-icon%27%29%0A%0A++++++++%7D%0A%0A++++%7D+else+if+%28switch_type+%3D%3D%3D+%22Condensed%22%29+%7B%0A++++++++%2F%2F+Add+%27condensed-switch%27+class%0A++++++++widgetMap.toggle.nativeElement.classList.add%28%27condensed-switch%27%29%0A%0A++++%7D+else+if+%28switch_type+%3D%3D%3D+%22IOS%22%29+%7B%0A++++++++%2F%2F+Add+%27iOS-switch%27+class%0A++++++++widgetMap.toggle.nativeElement.classList.add%28%27ios-switch%27%29%0A%0A++++%7D%0A%7D%0A%0Afunction+handleRequiredChange%28required%2C+widgetMap%29+%7B%0A++++%2F%2F+Set+the+%27required%27+property+for+the+composite+widget%0A++++widgetMap.composite.required+%3D+required%3B%0A%7D%0A%0A%0Afunction+handleCheckedValueChange%28checked_value%2C+selected%2C+widgetMap%29+%7B%0A++++%2F%2F+Set+the+%27checkedvalue%27+and+%27uncheckedvalue%27+properties+for+the+toggle+widget%0A++++widgetMap.toggle.checkedvalue+%3D+checked_value%3B%0A++++handleSelectedValueChange%28selected%2C+widgetMap%29%3B%0A%7D%0A%0A%0Afunction+handleIconVisibiltyChange%28icon%2C+widgetMap%29+%7B%0A++++if+%28icon.toString%28%29.toLowerCase%28%29+%3D%3D%3D+%27true%27%29+%7B%0A++++++++widgetMap.toggle.nativeElement.classList.add%28%27icon%27%29%0A%0A++++%7D+else+%7B%0A++++++++widgetMap.toggle.nativeElement.classList.remove%28%27icon%27%29%0A%0A++++%7D%0A%7D%0A%0A%0Afunction+handleUnCheckedValueChange%28unchecked_value%2C+selected%2C+widgetMap%29+%7B%0A++++widgetMap.toggle.uncheckedvalue+%3D+unchecked_value%3B%0A++++handleSelectedValueChange%28selected%2C+widgetMap%29%3B%0A%7D%0A%0Afunction+handleSelectedValueChange%28selected%2C+widgetMap%29+%7B%0A++++%2F%2F+Retrieve+the+selected+value+from+page+parameters%0A++++var+selectedValue+%3D+selected%3B%0A%0A++++%2F%2F+Determine+the+correct+%27datavalue%27+based+on+the+selected+value%0A++++if+%28selectedValue+%3D%3D%3D+widgetMap.toggle.checkedvalue%29+%7B%0A++++++++%2F%2F+If+selected+value+matches+the+checked+value%2C+set+datavalue+to+checked+value%0A++++++++widgetMap.toggle.datavalue+%3D+widgetMap.toggle.checkedvalue%3B%0A++++%7D+else+if+%28selectedValue+%3D%3D%3D+widgetMap.toggle.uncheckedvalue%29+%7B%0A++++++++%2F%2F+If+selected+value+matches+the+unchecked+value%2C+set+datavalue+to+unchecked+value%0A++++++++widgetMap.toggle.datavalue+%3D+widgetMap.toggle.uncheckedvalue%3B%0A++++%7D+else+%7B%0A++++++++%2F%2F+Log+a+warning+if+the+selected+value+does+not+match+known+values%0A++++++++console.warn%28%27Selected+value+does+not+match+any+known+value%27%29%3B%0A++++++++%2F%2F+Optionally+set+to+a+default+value+or+handle+the+error%0A++++++++widgetMap.toggle.datavalue+%3D+widgetMap.toggle.uncheckedvalue%3B+%2F%2F+Default+to+unchecked%0A++++%7D%0A%0A%7D",
|
4
|
-
"styles": ".switch-wrapper+%7B%0A++++--wm-switch-padding%3A+2px+8px%3B%0A++++--wm-switch-active-padding%3A+2px+4px%3B%0A++++--wm-switch-height%3A+32px%3B%0A++++--wm-switch-width%3A+52px%3B%0A++++--wm-switch-background%3A+var%28--wm-color-surface-container-highest%29%3B%0A++++--wm-switch-border-color%3A+var%28--wm-color-outline%29%3B%0A++++--wm-switch-active-background%3A+var%28--wm-color-primary%29%3B%0A++++--wm-switch-active-border-color%3A+var%28--wm-color-surface-tint%29%3B%0A++++--wm-switch-border-style%3A+solid%3B%0A++++--wm-switch-border-width%3A+2px%3B%0A++++--wm-switch-border-radius%3A+100px%3B%0A++++--wm-switch-caption-border-radius%3A+24px%3B%0A++++--wm-switch-caption-width%3A+var%28--wm-space-3%29%3B%0A++++--wm-switch-caption-height%3A+var%28--wm-space-3%29%3B%0A++++--wm-switch-caption-background%3A+var%28--wm-color-outline%29%3B%0A++++--wm-switch-caption-active-background%3A+var%28--wm-color-on-primary%29%3B%0A++++--wm-switch-tranistion%3A+0.25s+ease-in%3B%0A++++--wm-switch-caption-icon-width%3A+calc%28var%28--wm-switch-height%29+-+var%28--wm-space-2%29%29%3B%0A++++--wm-switch-caption-icon-height%3A+calc%28var%28--wm-switch-height%29+-+var%28--wm-space-2%29%29%3B%0A++++--wm-switch-caption-icon-size%3A+16px%3B%0A++++--wm-switch-caption-state-layer-color%3A+var%28--wm-color-on-surface%29%3B%0A++++--wm-condensed-switch-height%3A+14px%3B%0A++++--wm-condensed-switch-width%3A+34px%3B%0A++++--wm-condensed-switch-background%3A+var%28--wm-color-outline%29%3B%0A++++--wm-condensed-switch-caption-background%3A+var%28--wm-color-on-primary%29%3B%0A++++--wm-condensed-switch-active-background%3A+var%28--wm-color-primary-active%29%3B%0A++++--wm-condensed-switch-caption-active-background%3A+var%28--wm-color-primary%29%3B%0A++++--wm-condensed-switch-caption-border-radius%3A+24px%3B%0A++++--wm-condensed-switch-caption-icon-width%3A+var%28--wm-space-5%29%3B%0A++++--wm-condensed-switch-caption-icon-height%3A+var%28--wm-space-5%29%3B%0A++++--wm-ios-switch-padding%3A+2px+2px%3B%0A++++--wm-ios-switch-active-padding%3A+2px+2px%3B%0A++++--wm-ios-switch-height%3A+26px%3B%0A++++--wm-ios-switch-width%3A+42px%3B%0A++++--wm-ios-switch-background%3A+%23E9E9EA%3B%0A++++--wm-ios-switch-border-color%3A+var%28--wm-color-outline%29%3B%0A++++--wm-ios-switch-active-background%3A+%2365C466%3B%0A++++--wm-ios-switch-border-radius%3A+100px%3B%0A++++--wm-ios-switch-caption-border-radius%3A+24px%3B%0A++++--wm-ios-switch-caption-width%3A+22px%3B%0A++++--wm-ios-switch-caption-height%3A+22px%3B%0A++++--wm-ios-switch-caption-background%3A+var%28--wm-color-on-primary%29%3B%0A++++--wm-ios-switch-caption-active-background%3A+var%28--wm-color-on-primary%29%3B%0A++++--wm-ios-switch-tranistion%3A+0.25s+ease-in%3B%0A++++--wm-ios-switch-caption-icon-width%3A+22px%3B%0A++++--wm-ios-switch-caption-icon-height%3A+22px%3B%0A++++--wm-ios-switch-caption-icon-size%3A+16px%3B%0A%7D%0A%0A.switch-wrapper+.app-checkbox%2C%0A.condensed-switch-wrapper+.app-checkbox%2C%0A.ios-switch-wrapper+.app-checkbox+%7B%0A++++margin%3A+0px%3B%0A%7D%0A%0A.switch-wrapper+%7B%0A++++margin%3A+8px%3B%0A%7D%0A%0A.switch-wrapper+.switch+label+input%5Btype%3D%22checkbox%22%5D%2C%0A.switch-wrapper+.switch+label+span.caption%2C%0A.switch-wrapper+.switch+label+span.caption%3A%3Abefore+%7B%0A++++display%3A+none%3B%0A%7D%0A%0A.switch-wrapper+.switch+label+%7B%0A++++cursor%3A+pointer%3B%0A++++border%3A+var%28--wm-switch-border-width%29+var%28--wm-switch-border-style%29+var%28--wm-switch-border-color%29%3B%0A++++background%3A+var%28--wm-switch-background%29%3B%0A++++border-radius%3A+var%28--wm-switch-border-radius%29%3B%0A++++padding%3A+var%28--wm-switch-padding%29%3B%0A++++height%3A+var%28--wm-switch-height%29%3B%0A++++min-height%3A+var%28--wm-switch-height%29%3B%0A++++width%3A+var%28--wm-switch-width%29%3B%0A++++user-select%3A+none%3B%0A++++-webkit-tap-highlight-color%3A+transparent%3B%0A++++display%3A+block%3B%0A++++position%3A+relative%3B%0A++++box-shadow%3A+unset%3B%0A++++overflow%3A+visible%3B%0A++++margin-block%3A+8px%3B%0A%7D%0A%0A.switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.switch+label+%7B%0A++++border%3A+var%28--wm-switch-border-width%29+var%28--wm-switch-border-style%29+var%28--wm-switch-active-background%29%3B%0A++++background%3A+var%28--wm-switch-active-background%29%3B%0A++++padding%3A+var%28--wm-switch-active-padding%29%3B%0A%7D%0A%0A.switch-wrapper%3Ahas%28.app-toggle.checkbox.switch.icon%29+.switch+label+%7B%0A++++padding%3A+0px%3B%0A%7D%0A%0A.switch-wrapper+.icon-container+%7B%0A++++background%3A+transparent%3B%0A++++border-radius%3A+var%28--wm-switch-border-radius%29%3B%0A++++width%3A+var%28--wm-switch-caption-width%29%3B%0A++++height%3A+var%28--wm-switch-caption-height%29%3B%0A++++min-height%3A+var%28--wm-switch-caption-height%29%3B%0A++++position%3A+absolute%3B%0A++++left%3A+4px%3B%0A++++top%3A+18px%3B%0A++++display%3A+flex%3B%0A++++justify-content%3A+space-between%3B%0A++++align-items%3A+center%3B%0A++++z-index%3A+1%3B%0A++++pointer-events%3A+none%3B%0A++++padding%3A+0px%3B%0A++++transition%3A+transform+0.3s+ease%3B%0A%7D%0A%0A.switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.icon-container%2C%0A.switch-wrapper%3Ahas%28.switch.icon%29+.icon-container%2C%0A.switch-wrapper%3Ahas%28.switch.icon%29+.icon-container+%7B%0A++++top%3A+12px%3B%0A++++left%3A+4px%3B%0A++++width%3A+var%28--wm-switch-caption-icon-width%29%3B%0A++++height%3A+var%28--wm-switch-caption-icon-height%29%3B%0A++++font-size%3A+var%28--wm-switch-caption-icon-size%29%3B%0A++++max-width%3A+var%28--wm-switch-caption-icon-width%29%3B%0A%7D%0A%0A.switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.icon-container+%7B%0A++++transform%3A+translateX%28calc%28var%28--wm-switch-width%29+-+var%28--wm-switch-caption-width%29+-+20px%29%29%3B%0A%7D%0A%0A.switch-wrapper+.icon-container+.start-icon%2C%0A.switch-wrapper+.icon-container+.end-icon+%7B%0A++++background%3A+var%28--wm-switch-caption-background%29%3B%0A++++border-radius%3A+var%28--wm-switch-caption-border-radius%29%3B%0A++++display%3A+none%3B%0A%7D%0A%0A.switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.icon-container+.start-icon%2C%0A.switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.icon-container+.end-icon+%7B%0A++++background%3A+var%28--wm-switch-caption-active-background%29%3B%0A%7D%0A%0A.switch-wrapper+.icon-container+.start-icon%2C%0A.switch-wrapper+.icon-container+.end-icon+%7B%0A++++width%3A+100%25%3B%0A++++height%3A+100%25%3B%0A++++min-height%3A+100%25%3B%0A++++min-width%3A+100%25%3B%0A++++color%3A+var%28--wm-switch-background%29%3B%0A++++overflow%3A+visible%3B%0A%7D%0A%0A.switch-wrapper+.icon-container+.start-icon+.app-icon%2C%0A.switch-wrapper+.icon-container+.end-icon+.app-icon+%7B%0A++++font-size%3A+var%28--wm-switch-caption-icon-size%29%3B%0A%7D%0A%0A.switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.icon-container+span.end-icon%5Bhidden%5D+%7B%0A++++display%3A+block+%21important%3B%0A%7D%0A%0A.switch-wrapper+.icon-container+.end-icon+.app-icon+%7B%0A++++color%3A+var%28--wm-switch-active-background%29%3B%0A%7D%0A%0A.switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label.unchecked%29+.icon-container.app-container+.app-icon-wrapper.start-icon%2C%0A.switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.icon-container.app-container+.app-icon-wrapper.end-icon+%7B%0A++++display%3A+block+%21important%3B%0A%7D%0A%0A.switch-wrapper+.icon-container+.start-icon+.switch-wrapper+%7B%0A++++position%3A+relative%3B%0A%7D%0A%0A.switch-wrapper%3Anot%28%3Ahas%28.icon%29%29+.icon-container+.start-icon+.app-icon%3A%3Abefore%2C%0A.switch-wrapper%3Anot%28%3Ahas%28.icon%29%29+.icon-container+.end-icon+.app-icon%3A%3Abefore+%7B%0A++++content%3A+%22%22%3B%0A%7D%0A%0A.switch-wrapper+.icon-container%3A%3Abefore+%7B%0A++++-webkit-appearance%3A+none%3B%0A++++z-index%3A+1%3B%0A++++position%3A+absolute%3B%0A++++content%3A+%22%22%3B%0A++++left%3A+-8px%3B%0A++++top%3A+-8px%3B%0A++++border-radius%3A+50%25%3B%0A++++width%3A+calc%28100%25+%2B+16px%29%3B%0A++++height%3A+calc%28100%25+%2B+16px%29%3B%0A++++background%3A+var%28--wm-switch-caption-state-layer-color%29%3B%0A++++box-shadow%3A+none%3B%0A++++outline%3A+none%3B%0A++++opacity%3A+0%3B%0A++++transform%3A+scale%281%29%3B%0A++++pointer-events%3A+none%3B%0A%7D%0A%0A.switch-wrapper%3Ahover+.icon-container%3A%3Abefore+%7B%0A++++opacity%3A+var%28--wm-opacity-hover%29%3B%0A%7D%0A%0A.switch-wrapper%3Afocus+.icon-container%3A%3Abefore+%7B%0A++++opacity%3A+var%28--wm-opacity-focus%29%3B%0A%7D%0A%0A.switch-wrapper%3Aactive+.icon-container%3A%3Abefore+%7B%0A++++opacity%3A+var%28--wm-opacity-focus%29%3B%0A%7D%0A%0A%0A%2F*+condensed+styles+*%2F%0A%0A.condensed-switch-wrapper+%7B%0A++++--wm-switch-background%3A+var%28--wm-condensed-switch-background%29%3B%0A++++--wm-switch-caption-icon-width%3A+var%28--wm-condensed-switch-caption-icon-width%29%3B%0A++++--wm-switch-caption-icon-height%3A+var%28--wm-condensed-switch-caption-icon-height%29%3B%0A++++--wm-switch-caption-width%3A+var%28--wm-condensed-switch-caption-icon-width%29%3B%0A++++--wm-switch-caption-height%3A+var%28--wm-condensed-switch-caption-icon-height%29%3B%0A++++--wm-switch-caption-icon-size%3A+var%28--wm-condensed-switch-caption-icon-size%29%3B%0A++++--wm-switch-height%3A+var%28--wm-condensed-switch-height%29%3B%0A++++--wm-switch-width%3A+var%28--wm-condensed-switch-width%29%3B%0A++++--wm-switch-active-background%3A+var%28--wm-condensed-switch-active-background%29%3B%0A++++--wm-switch-caption-background%3A+var%28--wm-condensed-switch-caption-background%29%3B%0A++++--wm-switch-caption-border-radius%3A+var%28--wm-condensed-switch-caption-border-radius%29%3B%0A%7D%0A%0A.condensed-switch-wrapper+.condensed-switch+label%2C%0A.condensed-switch-wrapper%3Ahas%28.app-toggle.checkbox.condensed-switch+label%3Einput%3Achecked%29+.condensed-switch+label+%7B%0A++++border%3A+0px%3B%0A%7D%0A%0A.condensed-switch-wrapper+.icon-container+%7B%0A++++left%3A+-4px%3B%0A++++top%3A+5px%3B%0A%7D%0A%0A.switch-wrapper.condensed-switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.icon-container%2C%0A.switch-wrapper.condensed-switch-wrapper%3Ahas%28.switch.icon%29+.icon-container%2C%0A.switch-wrapper.condensed-switch-wrapper%3Ahas%28.switch.icon%29+.icon-container+%7B%0A++++top%3A+5px%3B%0A++++left%3A+-4px%3B%0A%7D%0A%0A.switch-wrapper.condensed-switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.icon-container+%7B%0A++++transform%3A+translateX%28calc%28var%28--wm-condensed-switch-width%29+-+var%28--wm-condensed-switch-caption-icon-width%29+%2B+8px%29%29%3B%0A%7D%0A%0A.condensed-switch-wrapper+.icon-container+.start-icon+.app-icon%3A%3Abefore%2C%0A.condensed-switch-wrapper+.icon-container+.end-icon+.app-icon%3A%3Abefore+%7B%0A++++content%3A+%22%22%3B%0A%7D%0A%0A.condensed-switch-wrapper+.icon-container+.start-icon%2C%0A.condensed-switch-wrapper+.icon-container+.end-icon+%7B%0A++++background%3A+var%28--wm-condensed-switch-caption-background%29%3B%0A++++border-radius%3A+var%28--wm-condensed-switch-caption-border-radius%29%3B%0A++++display%3A+none%3B%0A++++box-shadow%3A+0px+2px+1px+-1px+rgba%280%2C+0%2C+0%2C+0.2%29%2C+0px+1px+1px+0px+rgba%280%2C+0%2C+0%2C+0.14%29%3B%0A%7D%0A%0A.condensed-switch-wrapper%3Ahas%28.app-toggle.checkbox.condensed-switch+label%3Einput%3Achecked%29+.icon-container+.start-icon%2C%0A.condensed-switch-wrapper%3Ahas%28.app-toggle.checkbox.condensed-switch+label%3Einput%3Achecked%29+.icon-container+.end-icon+%7B%0A++++background%3A+var%28--wm-condensed-switch-caption-active-background%29%3B%0A%7D%0A%0A%0A%2F*+ios+styles+*%2F%0A%0A.ios-switch-wrapper+%7B%0A++++--wm-switch-background%3A+var%28--wm-ios-switch-background%29%3B%0A++++--wm-switch-border-radius%3A+var%28--wm-ios-switch-border-radius%29%3B%0A++++--wm-switch-padding%3A+var%28--wm-ios-switch-padding%29%3B%0A++++--wm-switch-height%3A+var%28--wm-ios-switch-height%29%3B%0A++++--wm-switch-width%3A+var%28--wm-ios-switch-width%29%3B%0A++++--wm-switch-active-background%3A+var%28--wm-ios-switch-active-background%29%3B%0A++++--wm-switch-active-padding%3A+var%28--wm-ios-switch-active-padding%29%3B%0A++++--wm-switch-caption-background%3A+var%28--wm-ios-switch-caption-background%29%3B%0A++++--wm-switch-caption-border-radius%3A+var%28--wm-ios-switch-caption-border-radius%29%3B%0A++++--wm-switch-caption-height%3A+var%28--wm-ios-switch-caption-height%29%3B%0A++++--wm-switch-caption-width%3A+var%28--wm-ios-switch-caption-width%29%3B%0A++++--wm-switch-caption-icon-height%3A+var%28--wm-ios-switch-caption-height%29%3B%0A++++--wm-switch-caption-icon-width%3A+var%28--wm-ios-switch-caption-width%29%3B%0A++++--wm-switch-caption-active-background%3A+var%28--wm-ios-switch-caption-active-background%29%3B%0A%7D%0A%0A.ios-switch-wrapper+.ios-switch+label%2C%0A.ios-switch-wrapper%3Ahas%28.app-toggle.checkbox.ios-switch+label%3Einput%3Achecked%29+.ios-switch+label+%7B%0A++++border%3A+0px%3B%0A%7D%0A%0A.ios-switch-wrapper%3Ahas%28.app-toggle.checkbox.ios-switch.icon%29+.ios-switch+label+%7B%0A++++padding%3A+0px%3B%0A%7D%0A%0A.ios-switch-wrapper.switch-wrapper+.icon-container%2C%0A.switch-wrapper.ios-switch-wrapper%3Ahas%28.switch.icon%29+.icon-container%2C%0A.switch-wrapper.ios-switch-wrapper%3Ahas%28.switch.icon%29+.icon-container+%7B%0A++++top%3A+10px%3B%0A++++left%3A+2px%3B%0A%7D%0A%0A.ios-switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.icon-container+%7B%0A++++top%3A+10px%3B%0A++++transform%3A+translateX%28calc%28var%28--wm-switch-width%29+-+var%28--wm-switch-caption-width%29+-+6px%29%29%3B%0A%7D%0A%0A.ios-switch-wrapper+.icon-container+.start-icon+.app-icon%3A%3Abefore%2C%0A.ios-switch-wrapper+.icon-container+.end-icon+.app-icon%3A%3Abefore+%7B%0A++++content%3A+%22%22%3B%0A%7D",
|
5
|
-
"variables": "%7B+%7D",
|
6
|
-
"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%22switch_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%22Switch%20Type%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20style%20of%20the%20switch.%20Options%20include%20%27filled%27%2C%20%27condensed%27%2C%20and%20%27iOS%27.%22%2C%0A%20%20%20%20%20%20%22options%22%20%3A%20%5B%20%22Filled%22%2C%20%22Condensed%22%2C%20%22IOS%22%20%5D%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22Filled%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%20component%20is%20active%20or%20inactive.%20%27enabled%27%20means%20the%20component%20is%20interactive%20and%20functional%2C%20while%20%27disabled%27%20means%20it%20is%20non-interactive%20and%20inactive.%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%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%22Label%20Text%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Sets%20the%20text%20displayed%20on%20the%20label%20of%20the%20switch.%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%22icon%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%22Switch%20Icons%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Enables%20or%20disables%20icon%20options%20for%20the%20switch.%20If%20true%2C%20you%20can%20select%20icons%20for%20the%20switch.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20false%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22selected_icon%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%22Selected%20Icon%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20icon%20to%20use%20when%20the%20switch%20is%20in%20the%20selected%20state.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22wi%20wi-check%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%22unselected_icon%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%22Unselected%20Icon%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20icon%20to%20use%20when%20the%20switch%20is%20in%20the%20unselected%20state.%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%22selected%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%20switch.%20This%20value%20is%20used%20to%20represent%20the%20state%20of%20the%20switch.%20For%20example%2C%20%27true%27%20for%20checked%20and%20%27false%27%20for%20unchecked.%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%22checked_value%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%22Checked%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20value%20to%20represent%20the%20switch%20when%20it%20is%20checked.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22true%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22unchecked_value%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%22Unchecked%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20value%20to%20represent%20the%20switch%20when%20it%20is%20unchecked.%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%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%22Indicates%20whether%20the%20switch%20is%20required.%20Set%20to%20true%20to%20make%20it%20a%20required%20field.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20false%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%22events%22%20%3A%20%7B%20%7D%0A%7D%0A"
|
7
|
-
};
|
@@ -1,6 +0,0 @@
|
|
1
|
-
declare function handleTypeChange(switch_type: any, icon: any, unselected_icon: any, widgetMap: any): void;
|
2
|
-
declare function handleRequiredChange(required: any, widgetMap: any): void;
|
3
|
-
declare function handleCheckedValueChange(checked_value: any, selected: any, widgetMap: any): void;
|
4
|
-
declare function handleIconVisibiltyChange(icon: any, widgetMap: any): void;
|
5
|
-
declare function handleUnCheckedValueChange(unchecked_value: any, selected: any, widgetMap: any): void;
|
6
|
-
declare function handleSelectedValueChange(selected: any, widgetMap: any): void;
|
@@ -1,103 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Use App.getDependency for Dependency Injection
|
3
|
-
* Example:
|
4
|
-
* var DialogService = App.getDependency('DialogService');
|
5
|
-
*/
|
6
|
-
Widget.onPropertyChange = function (propname, newvalue, oldvalue) {
|
7
|
-
var widgetMap = Widget.Widgets;
|
8
|
-
var _a = Widget.props, switch_type = _a.switch_type, icon = _a.icon, unselected_icon = _a.unselected_icon, required = _a.required, unchecked_value = _a.unchecked_value, checked_value = _a.checked_value, selected = _a.selected;
|
9
|
-
switch (propname) {
|
10
|
-
case 'prop-switch_type':
|
11
|
-
handleTypeChange(switch_type, icon, unselected_icon, widgetMap);
|
12
|
-
break;
|
13
|
-
case 'prop-required':
|
14
|
-
handleRequiredChange(required, widgetMap);
|
15
|
-
break;
|
16
|
-
case 'prop-selected':
|
17
|
-
handleSelectedValueChange(selected, widgetMap);
|
18
|
-
break;
|
19
|
-
case 'prop-checked_value':
|
20
|
-
handleCheckedValueChange(checked_value, selected, widgetMap);
|
21
|
-
break;
|
22
|
-
case 'prop-unchecked_value':
|
23
|
-
handleUnCheckedValueChange(unchecked_value, selected, widgetMap);
|
24
|
-
break;
|
25
|
-
case 'prop-icon':
|
26
|
-
handleIconVisibiltyChange(icon, widgetMap);
|
27
|
-
break;
|
28
|
-
}
|
29
|
-
};
|
30
|
-
/* Perform any action on widgets/variables within this block */
|
31
|
-
Widget.onReady = function () {
|
32
|
-
var widgetMap = Widget.Widgets;
|
33
|
-
var _a = Widget.props, switch_type = _a.switch_type, icon = _a.icon, unselected_icon = _a.unselected_icon, required = _a.required, unchecked_value = _a.unchecked_value, checked_value = _a.checked_value, selected = _a.selected;
|
34
|
-
handleTypeChange(switch_type, icon, unselected_icon, widgetMap);
|
35
|
-
handleRequiredChange(required, widgetMap);
|
36
|
-
handleCheckedValueChange(checked_value, selected, widgetMap);
|
37
|
-
handleUnCheckedValueChange(unchecked_value, selected, widgetMap);
|
38
|
-
handleSelectedValueChange(selected, widgetMap);
|
39
|
-
};
|
40
|
-
function handleTypeChange(switch_type, icon, unselected_icon, widgetMap) {
|
41
|
-
widgetMap.toggle.nativeElement.classList.remove('filled-switch', 'icon', 'unselected-icon', 'condensed-switch', 'ios-switch');
|
42
|
-
// Set CSS classes for the toggle widget based on the switch type
|
43
|
-
if (switch_type === "Filled") {
|
44
|
-
if (icon.toString().toLowerCase() === 'true') {
|
45
|
-
widgetMap.toggle.nativeElement.classList.add('filled-switch', 'icon');
|
46
|
-
}
|
47
|
-
else {
|
48
|
-
widgetMap.toggle.nativeElement.classList.add('filled-switch');
|
49
|
-
}
|
50
|
-
// Add 'unselected-icon' class if no unselected_icon is specified
|
51
|
-
if (unselected_icon == null || unselected_icon === "" || unselected_icon === " ") {
|
52
|
-
widgetMap.toggle.nativeElement.classList.add('filled-switch', 'icon', 'unselected-icon');
|
53
|
-
}
|
54
|
-
}
|
55
|
-
else if (switch_type === "Condensed") {
|
56
|
-
// Add 'condensed-switch' class
|
57
|
-
widgetMap.toggle.nativeElement.classList.add('condensed-switch');
|
58
|
-
}
|
59
|
-
else if (switch_type === "IOS") {
|
60
|
-
// Add 'iOS-switch' class
|
61
|
-
widgetMap.toggle.nativeElement.classList.add('ios-switch');
|
62
|
-
}
|
63
|
-
}
|
64
|
-
function handleRequiredChange(required, widgetMap) {
|
65
|
-
// Set the 'required' property for the composite widget
|
66
|
-
widgetMap.composite.required = required;
|
67
|
-
}
|
68
|
-
function handleCheckedValueChange(checked_value, selected, widgetMap) {
|
69
|
-
// Set the 'checkedvalue' and 'uncheckedvalue' properties for the toggle widget
|
70
|
-
widgetMap.toggle.checkedvalue = checked_value;
|
71
|
-
handleSelectedValueChange(selected, widgetMap);
|
72
|
-
}
|
73
|
-
function handleIconVisibiltyChange(icon, widgetMap) {
|
74
|
-
if (icon.toString().toLowerCase() === 'true') {
|
75
|
-
widgetMap.toggle.nativeElement.classList.add('icon');
|
76
|
-
}
|
77
|
-
else {
|
78
|
-
widgetMap.toggle.nativeElement.classList.remove('icon');
|
79
|
-
}
|
80
|
-
}
|
81
|
-
function handleUnCheckedValueChange(unchecked_value, selected, widgetMap) {
|
82
|
-
widgetMap.toggle.uncheckedvalue = unchecked_value;
|
83
|
-
handleSelectedValueChange(selected, widgetMap);
|
84
|
-
}
|
85
|
-
function handleSelectedValueChange(selected, widgetMap) {
|
86
|
-
// Retrieve the selected value from page parameters
|
87
|
-
var selectedValue = selected;
|
88
|
-
// Determine the correct 'datavalue' based on the selected value
|
89
|
-
if (selectedValue === widgetMap.toggle.checkedvalue) {
|
90
|
-
// If selected value matches the checked value, set datavalue to checked value
|
91
|
-
widgetMap.toggle.datavalue = widgetMap.toggle.checkedvalue;
|
92
|
-
}
|
93
|
-
else if (selectedValue === widgetMap.toggle.uncheckedvalue) {
|
94
|
-
// If selected value matches the unchecked value, set datavalue to unchecked value
|
95
|
-
widgetMap.toggle.datavalue = widgetMap.toggle.uncheckedvalue;
|
96
|
-
}
|
97
|
-
else {
|
98
|
-
// Log a warning if the selected value does not match known values
|
99
|
-
console.warn('Selected value does not match any known value');
|
100
|
-
// Optionally set to a default value or handle the error
|
101
|
-
widgetMap.toggle.datavalue = widgetMap.toggle.uncheckedvalue; // Default to unchecked
|
102
|
-
}
|
103
|
-
}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
export var textfield = {
|
2
|
-
"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.toLowerCase%28%29%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-icon+btn-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.toLowerCase%28%29%22+disabled%3D%22bind%3Aprops.state.toLowerCase%28%29+%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-icon+btn-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%22buttonTrailingIconClick%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",
|
3
|
-
"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%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+%27widgetMap%27+property+here%0A+++++*+e.g.+to+get+value+of+text+widget+named+%27username%27+use+following+script%0A+++++*+%27widgetMap.username.datavalue%27%0A+++++*%2F%0A++++const+widgetMap+%3D+Widget.Widgets%3B%0A++++const+%7B%0A++++++++leading_icon%2C%0A++++++++trailing_icon%2C%0A++++++++input_type%2C%0A++++++++required%0A++++%7D+%3D+Widget.props%0A++++handleLeadingIcon%28widgetMap%2C+leading_icon%29%3B%0A++++handleTrailingIcon%28widgetMap%2C+trailing_icon%29%3B%0A++++handleinputType%28widgetMap%2C+input_type%29%3B%0A++++handleRequired%28widgetMap%2C+required%29%3B%0A%7D%3B%0A%0AWidget.onPropertyChange+%3D+function%28propname%2C+newvalue%2C+oldvalue%29+%7B%0A++++const+widgetMap+%3D+Widget.Widgets%3B%0A++++const+%7B%0A++++++++leading_icon%2C%0A++++++++trailing_icon%2C%0A++++++++input_type%2C%0A++++++++required%0A++++%7D+%3D+Widget.props%0A++++switch+%28propname%29+%7B%0A++++++++case+%27prop-leading_icon%27%3A%0A++++++++++++handleLeadingIcon%28widgetMap%2C+leading_icon%29%3B%0A++++++++++++break%0A++++++++case+%27prop-trailing_icon%27%3A%0A++++++++++++handleTrailingIcon%28widgetMap%2C+trailing_icon%29%3B%0A++++++++++++break%0A++++++++case+%27prop-required%27%3A%0A++++++++++++handleRequired%28widgetMap%2C+required%29%3B%0A++++++++++++break%0A++++++++case+%27prop-input_type%27%3A%0A++++++++++++handleinputType%28widgetMap%2C+input_type%29%3B%0A++++++++++++break%0A++++%7D%0A%7D%0A%0Afunction+handleLeadingIcon%28widgetMap%2C+leading_icon%29+%7B%0A++++widgetMap.textField.nativeElement.classList.remove%28%27with-leading-icon%27%29%3B%0A++++widgetMap.labelCaption.nativeElement.classList.remove%28%27with-leading-icon%27%29%3B%0A++++if+%28leading_icon+%3D%3D+true%29+%7B%0A++++++++widgetMap.labelCaption.class+%2B%3D+%27+with-leading-icon%27%3B%0A++++++++widgetMap.textField.class+%2B%3D+%27+with-leading-icon%27%3B%0A++++%7D%0A%7D%0A%0Afunction+handleTrailingIcon%28widgetMap%2C+trailing_icon%29+%7B%0A++++widgetMap.textField.nativeElement.classList.remove%28%27with-trailing-icon%27%29%3B%0A++++widgetMap.labelCaption.nativeElement.classList.remove%28%27with-trailing-icon%27%29%3B%0A++++if+%28trailing_icon+%3D%3D+true%29+%7B%0A++++++++widgetMap.labelCaption.class+%2B%3D+%27+with-trailing-icon%27%3B%0A++++++++widgetMap.textField.class+%2B%3D+%27+with-trailing-icon%27%3B%0A++++%7D%0A%7D%0A%0Afunction+handleRequired%28widgetMap%2C+required%29+%7B%0A++++widgetMap.composite.required+%3D+required%3B%0A%7D%0A%0Afunction+handleinputType%28widgetMap%2C+input_type%29+%7B%0A++++widgetMap.textField.type+%3D+input_type%3B%0A%7D%0A%0AWidget.buttonTrailingIconClick+%3D+function%28%24event%2C+widget%29+%7B%0A++++%2F%2F+Widget.invokeEvent%28%27trailingIconButtonOnClick%27%29%3B%0A%7D%3B",
|
4
|
-
"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-bottom%3A+0%3B%0A%7D%0A%0A.wm-app+.app-composite-widget+.form-field-wrapper+.form-control.filled%3Afocus+%7B%0A++++box-shadow%3A+inset+0+-2px+0+0+var%28--wm-form-control-border-color-focus%29%3B%0A%7D%0A%0A.wm-app+.app-composite-widget+.form-field-wrapper+.form-control.filled.ng-touched.ng-invalid%3Afocus+%7B%0A++++box-shadow%3A+inset+0+-2px+0+0+var%28--wm-form-control-border-color-error%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%28calc%28var%28--wm-form-control-height%29+-+var%28--wm-btn-icon-height%29+-+var%28--wm-btn-icon-margin%29+-+var%28--wm-btn-icon-margin%29%29+%2F+2%29%3B%0A++++left%3A+0%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+0%3B%0A%7D%0A%0A.wm-app+.app-composite-widget+.help-wrapper+%7B%0A++++width%3A+100%25%3B%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-height%29*0.15%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++++max-width%3A+calc%28100%25+-+var%28--wm-form-control-padding%29+-+var%28--wm-form-control-padding%29+-+calc%28calc%28var%28--wm-form-control-padding%29*+2.5%29+%2B+var%28--wm-icon-size-md%29%29%29%3B%0A%7D",
|
5
|
-
"variables": "%7B+%7D",
|
6
|
-
"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%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
|
-
};
|
@@ -1,4 +0,0 @@
|
|
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;
|
@@ -1,65 +0,0 @@
|
|
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
|
-
};
|
23
|
-
Widget.onPropertyChange = function (propname, newvalue, oldvalue) {
|
24
|
-
var widgetMap = Widget.Widgets;
|
25
|
-
var _a = Widget.props, leading_icon = _a.leading_icon, trailing_icon = _a.trailing_icon, input_type = _a.input_type, required = _a.required;
|
26
|
-
switch (propname) {
|
27
|
-
case 'prop-leading_icon':
|
28
|
-
handleLeadingIcon(widgetMap, leading_icon);
|
29
|
-
break;
|
30
|
-
case 'prop-trailing_icon':
|
31
|
-
handleTrailingIcon(widgetMap, trailing_icon);
|
32
|
-
break;
|
33
|
-
case 'prop-required':
|
34
|
-
handleRequired(widgetMap, required);
|
35
|
-
break;
|
36
|
-
case 'prop-input_type':
|
37
|
-
handleinputType(widgetMap, input_type);
|
38
|
-
break;
|
39
|
-
}
|
40
|
-
};
|
41
|
-
function handleLeadingIcon(widgetMap, leading_icon) {
|
42
|
-
widgetMap.textField.nativeElement.classList.remove('with-leading-icon');
|
43
|
-
widgetMap.labelCaption.nativeElement.classList.remove('with-leading-icon');
|
44
|
-
if (leading_icon == true) {
|
45
|
-
widgetMap.labelCaption.class += ' with-leading-icon';
|
46
|
-
widgetMap.textField.class += ' with-leading-icon';
|
47
|
-
}
|
48
|
-
}
|
49
|
-
function handleTrailingIcon(widgetMap, trailing_icon) {
|
50
|
-
widgetMap.textField.nativeElement.classList.remove('with-trailing-icon');
|
51
|
-
widgetMap.labelCaption.nativeElement.classList.remove('with-trailing-icon');
|
52
|
-
if (trailing_icon == true) {
|
53
|
-
widgetMap.labelCaption.class += ' with-trailing-icon';
|
54
|
-
widgetMap.textField.class += ' with-trailing-icon';
|
55
|
-
}
|
56
|
-
}
|
57
|
-
function handleRequired(widgetMap, required) {
|
58
|
-
widgetMap.composite.required = required;
|
59
|
-
}
|
60
|
-
function handleinputType(widgetMap, input_type) {
|
61
|
-
widgetMap.textField.type = input_type;
|
62
|
-
}
|
63
|
-
Widget.buttonTrailingIconClick = function ($event, widget) {
|
64
|
-
// Widget.invokeEvent('trailingIconButtonOnClick');
|
65
|
-
};
|
@@ -1,68 +0,0 @@
|
|
1
|
-
export var widgetRegistry = [
|
2
|
-
{
|
3
|
-
"name": "checkbox_set",
|
4
|
-
"displayName": "Chekboxset",
|
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": "payee_list",
|
28
|
-
"displayName": "Payee List",
|
29
|
-
"iconClass": "checkboxset",
|
30
|
-
"desc": "Payee List"
|
31
|
-
},
|
32
|
-
{
|
33
|
-
"name": "radio_set",
|
34
|
-
"displayName": "Radioset",
|
35
|
-
"iconClass": "radioset",
|
36
|
-
"desc": "Radioset based on Material 3 design system"
|
37
|
-
},
|
38
|
-
{
|
39
|
-
"name": "switch_button",
|
40
|
-
"displayName": "Switch",
|
41
|
-
"iconClass": "switch",
|
42
|
-
"desc": "Switch button based on Material 3 design system"
|
43
|
-
},
|
44
|
-
{
|
45
|
-
"name": "textfield",
|
46
|
-
"displayName": "Textfield",
|
47
|
-
"iconClass": "text",
|
48
|
-
"desc": "Input text control based on Material 3 design system"
|
49
|
-
},
|
50
|
-
{
|
51
|
-
"name": "slider",
|
52
|
-
"displayName": "Slider",
|
53
|
-
"iconClass": "slider",
|
54
|
-
"desc": "Slider control based on Material 3 design system"
|
55
|
-
},
|
56
|
-
{
|
57
|
-
"name": "discrete_slider",
|
58
|
-
"displayName": "Discrete slider",
|
59
|
-
"iconClass": "slider",
|
60
|
-
"desc": "Discrete Slider control based on Material 3 design system"
|
61
|
-
},
|
62
|
-
{
|
63
|
-
"name": "progressbar",
|
64
|
-
"displayName": "Progress bar",
|
65
|
-
"iconClass": "progress",
|
66
|
-
"desc": "Progress bar widget based on Material 3 design system"
|
67
|
-
}
|
68
|
-
];
|