@wavemaker/app-rn-runtime 11.4.0-next.24565 → 11.4.0-next.24569
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.
- app-rn-runtime/actions/base-action.js.map +1 -1
- app-rn-runtime/actions/login-action.js.map +1 -1
- app-rn-runtime/actions/logout-action.js.map +1 -1
- app-rn-runtime/actions/navigation-action.js +14 -2
- app-rn-runtime/actions/navigation-action.js.map +1 -1
- app-rn-runtime/actions/notification-action.js.map +1 -1
- app-rn-runtime/actions/timer-action.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +16 -0
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
- app-rn-runtime/components/advanced/login/login.props.js.map +1 -1
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.props.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +1 -0
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js +5 -0
- app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
- app-rn-runtime/components/basic/animatedview.component.js +1 -3
- app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.component.js +232 -0
- app-rn-runtime/components/basic/audio/audio.component.js.map +1 -0
- app-rn-runtime/components/basic/audio/audio.props.js +15 -0
- app-rn-runtime/components/basic/audio/audio.props.js.map +1 -0
- app-rn-runtime/components/basic/audio/audio.styles.js +61 -0
- app-rn-runtime/components/basic/audio/audio.styles.js.map +1 -0
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.props.js.map +1 -1
- app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.component.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.props.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
- app-rn-runtime/components/basic/custom/custom.props.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.styles.js +5 -0
- app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +2 -1
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.props.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js +8 -0
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
- app-rn-runtime/components/basic/lottie/lottie.props.js.map +1 -1
- app-rn-runtime/components/basic/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/message/message.props.js.map +1 -1
- app-rn-runtime/components/basic/message/message.styles.js +22 -0
- app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
- app-rn-runtime/components/basic/modal/modal.component.js.map +1 -1
- app-rn-runtime/components/basic/modal/modal.props.js.map +1 -1
- app-rn-runtime/components/basic/modal/modal.styles.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +3 -3
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.props.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.styles.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.props.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.props.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.styles.js.map +1 -1
- app-rn-runtime/components/basic/search/local-data-provider.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +1 -1
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +1 -0
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +47 -0
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js +3 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.props.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.styles.js +8 -0
- app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js +2 -2
- app-rn-runtime/components/basic/video/video.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.props.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +1 -0
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js +17 -0
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/column-chart/column-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.props.js +0 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/legend/legend.component.js +36 -0
- app-rn-runtime/components/chart/legend/legend.component.js.map +1 -0
- app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +119 -40
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +1 -2
- app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/theme/chart.theme.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +75 -119
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.props.js +1 -0
- app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.styles.js +14 -4
- app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +48 -7
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.props.js.map +1 -1
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.props.js.map +1 -1
- app-rn-runtime/components/container/container.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.props.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.props.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.styles.js +9 -0
- app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
- app-rn-runtime/components/container/partial-host.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +30 -5
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +10 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +5 -2
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js +39 -0
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +15 -6
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +53 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.props.js.map +1 -1
- app-rn-runtime/components/data/card/card-footer/card-footer.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-footer/card-footer.props.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.component.js +1 -0
- app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.props.js +3 -1
- app-rn-runtime/components/data/form/form-action/form-action.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +9 -2
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.props.js +1 -0
- app-rn-runtime/components/data/form/form-field/form-field.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.props.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +51 -4
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.props.js.map +1 -1
- app-rn-runtime/components/data/form/form.styles.js +6 -0
- app-rn-runtime/components/data/form/form.styles.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +77 -16
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +2 -0
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/data/liveform/liveform.component.js +1 -1
- app-rn-runtime/components/data/liveform/liveform.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js +9 -0
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +5 -2
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.props.js.map +1 -1
- app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
- app-rn-runtime/components/input/basedataset/basedataset.props.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +2 -2
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.props.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.styles.js +22 -0
- app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
- app-rn-runtime/components/input/calendar/views/month-view.js +1 -0
- app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.props.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +1 -0
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.props.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +6 -4
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.props.js +1 -1
- app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +9 -0
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +5 -2
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.styles.js +9 -0
- app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/date-picker.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +9 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.styles.js +9 -0
- app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +6 -4
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.props.js +1 -1
- app-rn-runtime/components/input/number/number.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +5 -0
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/rating/rating.component.js +1 -1
- app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
- app-rn-runtime/components/input/rating/rating.props.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +1 -1
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.props.js.map +1 -1
- app-rn-runtime/components/input/select/select.styles.js +10 -0
- app-rn-runtime/components/input/select/select.styles.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.component.js +2 -1
- app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.props.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.props.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +36 -0
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +5 -3
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js +5 -0
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +5 -3
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.styles.js +5 -0
- app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +17 -11
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.styles.js +28 -3
- app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.props.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.props.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.styles.js +6 -0
- app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.props.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.styles.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
- app-rn-runtime/components/page/content/content.component.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.props.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
- app-rn-runtime/components/page/page.component.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.component.js.map +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.props.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
- app-rn-runtime/core/asset.provider.js.map +1 -1
- app-rn-runtime/core/base.component.js +19 -14
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/textinput.component.js +37 -0
- app-rn-runtime/core/components/textinput.component.js.map +1 -0
- app-rn-runtime/core/device/camera-service.js.map +1 -1
- app-rn-runtime/core/device/scan-service.js.map +1 -1
- app-rn-runtime/core/display.manager.js.map +1 -1
- app-rn-runtime/core/event-notifier.js.map +1 -1
- app-rn-runtime/core/fixed-view.component.js.map +1 -1
- app-rn-runtime/core/formatters.js.map +1 -1
- app-rn-runtime/core/i18n.service.js +2 -0
- app-rn-runtime/core/i18n.service.js.map +1 -0
- app-rn-runtime/core/if.component.js +3 -3
- app-rn-runtime/core/if.component.js.map +1 -1
- app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
- app-rn-runtime/core/injector.js +2 -1
- app-rn-runtime/core/injector.js.map +1 -1
- app-rn-runtime/core/logger.js +4 -1
- app-rn-runtime/core/logger.js.map +1 -1
- app-rn-runtime/core/modal.service.js.map +1 -1
- app-rn-runtime/core/navigation.service.js.map +1 -1
- app-rn-runtime/core/network.service.js +17 -15
- app-rn-runtime/core/network.service.js.map +1 -1
- app-rn-runtime/core/partial.service.js.map +1 -1
- app-rn-runtime/core/props.provider.js.map +1 -1
- app-rn-runtime/core/scroll-view.component.js.map +1 -1
- app-rn-runtime/core/security.service.js.map +1 -1
- app-rn-runtime/core/spinner.service.js.map +1 -1
- app-rn-runtime/core/storage.service.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +11 -2
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/toast.service.js.map +1 -1
- app-rn-runtime/core/utils.js +18 -0
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/core/viewport.js.map +1 -1
- app-rn-runtime/gestures/swipe.animation.js +9 -4
- app-rn-runtime/gestures/swipe.animation.js.map +1 -1
- app-rn-runtime/package.json +3 -3
- app-rn-runtime/runtime/App.js +14 -6
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/App.navigator.js +11 -2
- app-rn-runtime/runtime/App.navigator.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +19 -6
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +2 -0
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/base-partial.component.js.map +1 -1
- app-rn-runtime/runtime/base-prefab.component.js +1 -5
- app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
- app-rn-runtime/runtime/lib-patch.js.map +1 -1
- app-rn-runtime/runtime/memo.component.js.map +1 -1
- app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
- app-rn-runtime/runtime/services/app-display-manager.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-i18n.service.js +20 -0
- app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +7 -7
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-spinner.service.js +3 -2
- app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-toast.service.js.map +1 -1
- app-rn-runtime/runtime/services/device/calendar-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/camera-service.js +2 -3
- app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/contacts-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/location-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/permissions.js.map +1 -1
- app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
- app-rn-runtime/runtime/services/partial.service.js.map +1 -1
- app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
- app-rn-runtime/runtime/watcher.js.map +1 -1
- app-rn-runtime/styles/MediaQueryList.js.map +1 -1
- app-rn-runtime/styles/background.component.js +51 -12
- app-rn-runtime/styles/background.component.js.map +1 -1
- app-rn-runtime/styles/style-prop.validator.js +4 -0
- app-rn-runtime/styles/style-prop.validator.js.map +1 -1
- app-rn-runtime/styles/style-props.js.map +1 -1
- app-rn-runtime/styles/theme.js +8 -3
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +55 -1
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/base-variable.js +3 -3
- app-rn-runtime/variables/base-variable.js.map +1 -1
- app-rn-runtime/variables/device/calendar/create-event.operation.js.map +1 -1
- app-rn-runtime/variables/device/calendar/delete-event.operation.js.map +1 -1
- app-rn-runtime/variables/device/calendar/get-events.operation.js.map +1 -1
- app-rn-runtime/variables/device/camera/capture-image.operation.js.map +1 -1
- app-rn-runtime/variables/device/camera/capture-video.operation.js.map +1 -1
- app-rn-runtime/variables/device/contacts/get-contacts.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/app-info.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/current-geo-position.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/device-info.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/network-info.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/vibrate.operation.js.map +1 -1
- app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
- app-rn-runtime/variables/device/operation.provider.js.map +1 -1
- app-rn-runtime/variables/device/scan/scan.operation.js.map +1 -1
- app-rn-runtime/variables/device-variable.js.map +1 -1
- app-rn-runtime/variables/http.service.js +1 -1
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/live-variable.js +8 -6
- app-rn-runtime/variables/live-variable.js.map +1 -1
- app-rn-runtime/variables/model-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +14 -4
- app-rn-runtime/variables/service-variable.js.map +1 -1
- app-rn-runtime/variables/utils/dataset-util.js.map +1 -1
- app-rn-runtime/variables/utils/inflight-queue.js.map +1 -1
- app-rn-runtime/variables/utils/variable.utils.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","BaseComponent","BaseComponentState","WmIcon","WmRatingProps","DEFAULT_CLASS","cloneDeep","isArray","isNumber","isString","WmRatingState","WmRating","constructor","props","caption","state","prepareItems","items","dataset","maxvalue","Array","from","keys","map","v","split","Object","i","key","value","selectedIndex","datavalue","undefined","findIndex","item","k","datafield","showcaptions","selectedItem","getDisplayExpression","displayfield","updateState","onPropertyChange","name","$new","$old","isDefault","onFieldChange","bind","disabled","changeValue","oldValue","readonly","invokeEventCallback","proxy","renderWidget","maxValue","arr","selectedIconStyles","styles","selectedIcon","iconcolor","text","color","root","_background","iconsize","icon"],"sources":["rating.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmRatingProps from './rating.props';\nimport { DEFAULT_CLASS, WmRatingStyles } from './rating.styles';\nimport { cloneDeep, isArray, isEmpty, isNumber, isString } from 'lodash-es';\n\nexport class WmRatingState extends BaseComponentState<WmRatingProps> {\n items: any[] = null as any;\n caption: any = null as any;\n selectedIndex = -1;\n isDefault = false;\n}\n\nexport default class WmRating extends BaseComponent<WmRatingProps, WmRatingState, WmRatingStyles> {\n\n constructor(props: WmRatingProps) {\n super(props, DEFAULT_CLASS, new WmRatingProps());\n }\n\n get caption() {\n return this.state.caption;\n }\n\n prepareItems(props: WmRatingProps) {\n let items: any[] = [];\n if (!props.dataset && props.maxvalue) {\n items = Array.from(Array(+props.maxvalue).keys());\n items = items.map(v => v + 1);\n } else if (isString(props.dataset)) {\n items = props.dataset.split(',');\n } else {\n items = props.dataset as any[] || [];\n }\n if (isArray(items) && items[0] !== Object(items[0])) {\n items = items.map((v, i) => ({\n key: i + 1,\n value: v\n }));\n }\n let selectedIndex = -1;\n if (props.datavalue !== undefined && props.datavalue !== null) {\n selectedIndex = items.findIndex((item: any, k) => item[props.datafield as string] == props.datavalue);\n if (selectedIndex === -1 && isNumber(props.datavalue)) {\n selectedIndex = props.datavalue;\n }\n }\n let caption: any = '';\n if (selectedIndex > -1 && props.showcaptions) {\n const selectedItem = items[selectedIndex];\n if (selectedItem) {\n if (props.getDisplayExpression) {\n caption = props.getDisplayExpression(selectedItem);\n } else {\n caption = selectedItem[props.displayfield as string];\n }\n } else {\n caption = selectedIndex + 1;\n }\n }\n this.updateState({\n items: items,\n selectedIndex: selectedIndex,\n caption: caption\n } as WmRatingState);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'dataset' :\n case 'datafield' :\n case 'displayfield' :\n case 'maxvalue':\n case 'datavalue' :\n this.prepareItems(this.state.props);\n if (name === 'datavalue') {\n const isDefault = this.state.isDefault;\n if (isDefault) {\n this.updateState({ isDefault: false } as WmRatingState, this.props.onFieldChange && this.props.onFieldChange.bind(this, 'datavalue', $new, $old, isDefault));\n } else {\n this.props.onFieldChange && this.props.onFieldChange('datavalue', $new, $old, isDefault);\n }\n }\n break;\n case 'readonly' :\n this.updateState({\n props: {\n disabled: $new\n }\n } as WmRatingState);\n break;\n }\n }\n\n changeValue(i: number) {\n const props = this.state.props;\n const oldValue = props.datavalue;\n if (!props.readonly) {\n let value = this.state.items[i] ? this.state.items[i][props.datafield??'']: i;\n this.updateState({\n props: {\n datavalue: value\n }\n } as WmRatingState, () => {\n !this.props.onFieldChange && value !== oldValue && this.invokeEventCallback('onChange', [undefined, this.proxy, value, oldValue]);\n });\n }\n }\n\n renderWidget(props: WmRatingProps) {\n const maxValue = props.maxvalue ? +props.maxvalue : 5;\n const arr = Array.from(Array(maxValue).keys());\n\n let selectedIconStyles = this.styles.selectedIcon;\n if (props.iconcolor) {\n selectedIconStyles = cloneDeep(this.styles.selectedIcon);\n selectedIconStyles.text.color = props.iconcolor;\n }\n return (\n <View style={this.styles.root}>\n {this._background}\n {arr.map((v, i) => (\n (this.state.selectedIndex > -1 && i <= this.state.selectedIndex) ? <WmIcon\n key={i}\n iconclass=\"wi wi-star\"\n iconsize={props.iconsize}\n styles={selectedIconStyles}\n onTap={() => { this.changeValue(i)}}\n ></WmIcon> : null\n ))}\n {arr.map((v, i) => (\n (this.state.selectedIndex === -1 || i > this.state.selectedIndex) ? <WmIcon\n key={i}\n iconclass=\"wi wi-star-border\"\n iconsize={props.iconsize}\n styles={this.styles.icon}\n onTap={() => { this.changeValue(i)}}\n ></WmIcon> : null\n ))}\n { !!props.showcaptions ? (<Text style={this.styles.text}>{this.state.caption}</Text>) : null }\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SAASC,SAAS,EAAEC,OAAO,EAAWC,QAAQ,EAAEC,QAAQ,QAAQ,WAAW;AAE3E,OAAO,MAAMC,aAAa,SAASR,kBAAkB,CAAgB;EAAA;IAAA;IAAA,+BACpD,IAAI;IAAA,iCACJ,IAAI;IAAA,uCACH,CAAC,CAAC;IAAA,mCACN,KAAK;EAAA;AACnB;AAEA,eAAe,MAAMS,QAAQ,SAASV,aAAa,CAA+C;EAEhGW,WAAW,CAACC,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,aAAa,EAAE,CAAC;EAClD;EAEA,IAAIU,OAAO,GAAG;IACZ,OAAO,IAAI,CAACC,KAAK,CAACD,OAAO;EAC3B;EAEAE,YAAY,CAACH,KAAoB,EAAE;IACjC,IAAII,KAAY,GAAG,EAAE;IACrB,IAAI,CAACJ,KAAK,CAACK,OAAO,IAAIL,KAAK,CAACM,QAAQ,EAAE;MACpCF,KAAK,GAAGG,KAAK,CAACC,IAAI,CAACD,K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D;IACA,oBACA,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACF,MAAM,CAACK;IAAK,GAC3B,IAAI,CAACC,WAAW,EAChBR,GAAG,CAAClC,GAAG,CAAC,CAACC,CAAC,EAAEG,CAAC,KACX,IAAI,CAACZ,KAAK,CAACe,aAAa,GAAG,CAAC,CAAC,IAAIH,CAAC,IAAI,IAAI,CAACZ,KAAK,CAACe,aAAa,gBAAI,oBAAC,MAAM;MACxE,GAAG,EAAEH,CAAE;MACP,SAAS,EAAC,YAAY;MACtB,QAAQ,EAAEd,KAAK,CAACqD,QAAS;MACzB,MAAM,EAAER,kBAAmB;MAC3B,KAAK,EAAE,MAAM;QAAE,IAAI,CAACR,WAAW,CAACvB,CAAC,CAAC;MAAA;IAAE,EAC5B,GAAG,IACd,CAAC,EACD8B,GAAG,CAAClC,GAAG,CAAC,CAACC,CAAC,EAAEG,CAAC,KACX,IAAI,CAACZ,KAAK,CAACe,aAAa,KAAK,CAAC,CAAC,IAAIH,CAAC,GAAG,IAAI,CAACZ,KAAK,CAACe,aAAa,gBAAI,oBAAC,MAAM;MACzE,GAAG,EAAEH,CAAE;MACP,SAAS,EAAC,mBAAmB;MAC7B,QAAQ,EAAEd,KAAK,CAACqD,QAAS;MACzB,MAAM,EAAE,IAAI,CAACP,MAAM,CAACQ,IAAK;MACzB,KAAK,EAAE,MAAM;QAAE,IAAI,CAACjB,WAAW,CAACvB,CAAC,CAAC;MAAA;IAAE,EAC5B,GAAG,IACd,CAAC,EACA,CAAC,CAACd,KAAK,CAACwB,YAAY,gBAAI,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACsB,MAAM,CAACG;IAAK,GAAE,IAAI,CAAC/C,KAAK,CAACD,OAAO,CAAQ,GAAI,IAAI,CACvF;EACT;AACF"}
|
|
1
|
+
{"version":3,"names":["React","View","Text","BaseComponent","BaseComponentState","WmIcon","WmRatingProps","DEFAULT_CLASS","cloneDeep","isArray","isNumber","isString","WmRatingState","constructor","arguments","_defineProperty","WmRating","props","caption","state","prepareItems","items","dataset","maxvalue","Array","from","keys","map","v","split","Object","i","key","value","selectedIndex","datavalue","undefined","findIndex","item","k","datafield","showcaptions","selectedItem","getDisplayExpression","displayfield","updateState","onPropertyChange","name","$new","$old","isDefault","onFieldChange","bind","disabled","changeValue","oldValue","readonly","invokeEventCallback","proxy","renderWidget","maxValue","arr","selectedIconStyles","styles","selectedIcon","iconcolor","text","color","createElement","style","root","_background","iconclass","iconsize","onTap","icon"],"sources":["rating.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmRatingProps from './rating.props';\nimport { DEFAULT_CLASS, WmRatingStyles } from './rating.styles';\nimport { cloneDeep, isArray, isEmpty, isNumber, isString } from 'lodash-es';\n\nexport class WmRatingState extends BaseComponentState<WmRatingProps> {\n items: any[] = null as any;\n caption: any = null as any;\n selectedIndex = -1;\n isDefault = false;\n}\n\nexport default class WmRating extends BaseComponent<WmRatingProps, WmRatingState, WmRatingStyles> {\n\n constructor(props: WmRatingProps) {\n super(props, DEFAULT_CLASS, new WmRatingProps());\n }\n\n get caption() {\n return this.state.caption;\n }\n\n prepareItems(props: WmRatingProps) {\n let items: any[] = [];\n if (!props.dataset && props.maxvalue) {\n items = Array.from(Array(+props.maxvalue).keys());\n items = items.map(v => v + 1);\n } else if (isString(props.dataset)) {\n items = props.dataset.split(',');\n } else {\n items = props.dataset as any[] || [];\n }\n if (isArray(items) && items[0] !== Object(items[0])) {\n items = items.map((v, i) => ({\n key: i + 1,\n value: v\n }));\n }\n let selectedIndex = -1;\n if (props.datavalue !== undefined && props.datavalue !== null) {\n selectedIndex = items.findIndex((item: any, k) => item[props.datafield as string] == props.datavalue);\n if (selectedIndex === -1 && isNumber(props.datavalue)) {\n selectedIndex = props.datavalue;\n }\n }\n let caption: any = '';\n if (selectedIndex > -1 && props.showcaptions) {\n const selectedItem = items[selectedIndex];\n if (selectedItem) {\n if (props.getDisplayExpression) {\n caption = props.getDisplayExpression(selectedItem);\n } else {\n caption = selectedItem[props.displayfield as string];\n }\n } else {\n caption = selectedIndex + 1;\n }\n }\n this.updateState({\n items: items,\n selectedIndex: selectedIndex,\n caption: caption\n } as WmRatingState);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'dataset' :\n case 'datafield' :\n case 'displayfield' :\n case 'maxvalue':\n case 'datavalue' :\n this.prepareItems(this.state.props);\n if (name === 'datavalue') {\n const isDefault = this.state.isDefault;\n if (isDefault) {\n this.updateState({ isDefault: false } as WmRatingState, this.props.onFieldChange && this.props.onFieldChange.bind(this, 'datavalue', $new, $old, isDefault));\n } else {\n this.props.onFieldChange && this.props.onFieldChange('datavalue', $new, $old, isDefault);\n }\n }\n break;\n case 'readonly' :\n this.updateState({\n props: {\n disabled: $new\n }\n } as WmRatingState);\n break;\n }\n }\n\n changeValue(i: number) {\n const props = this.state.props;\n const oldValue = props.datavalue;\n if (!props.readonly) {\n let value = this.state.items[i] ? this.state.items[i][props.datafield || '']: i;\n this.updateState({\n props: {\n datavalue: value\n }\n } as WmRatingState, () => {\n !this.props.onFieldChange && value !== oldValue && this.invokeEventCallback('onChange', [undefined, this.proxy, value, oldValue]);\n });\n }\n }\n\n renderWidget(props: WmRatingProps) {\n const maxValue = props.maxvalue ? +props.maxvalue : 5;\n const arr = Array.from(Array(maxValue).keys());\n\n let selectedIconStyles = this.styles.selectedIcon;\n if (props.iconcolor) {\n selectedIconStyles = cloneDeep(this.styles.selectedIcon);\n selectedIconStyles.text.color = props.iconcolor;\n }\n return (\n <View style={this.styles.root}>\n {this._background}\n {arr.map((v, i) => (\n (this.state.selectedIndex > -1 && i <= this.state.selectedIndex) ? <WmIcon\n key={i}\n iconclass=\"wi wi-star\"\n iconsize={props.iconsize}\n styles={selectedIconStyles}\n onTap={() => { this.changeValue(i)}}\n ></WmIcon> : null\n ))}\n {arr.map((v, i) => (\n (this.state.selectedIndex === -1 || i > this.state.selectedIndex) ? <WmIcon\n key={i}\n iconclass=\"wi wi-star-border\"\n iconsize={props.iconsize}\n styles={this.styles.icon}\n onTap={() => { this.changeValue(i)}}\n ></WmIcon> : null\n ))}\n { !!props.showcaptions ? (<Text style={this.styles.text}>{this.state.caption}</Text>) : null }\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SAASC,SAAS,EAAEC,OAAO,EAAWC,QAAQ,EAAEC,QAAQ,QAAQ,WAAW;AAE3E,OAAO,MAAMC,aAAa,SAASR,kBAAkB,CAAgB;EAAAS,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,gBACpD,IAAI;IAAAA,eAAA,kBACJ,IAAI;IAAAA,eAAA,wBACH,CAAC,CAAC;IAAAA,eAAA,oBACN,KAAK;EAAA;AACnB;AAEA,eAAe,MAAMC,QAAQ,SAASb,aAAa,CAA+C;EAEhGU,WAAWA,CAACI,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEV,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,CAAC;EAClD;EAEA,IAAIY,OAAOA,CAAA,EAAG;IACZ,OAAO,IAAI,CAACC,KAAK,CAACD,OAAO;EAC3B;EAEAE,YAAYA,CAACH,KAAoB,EAAE;IACjC,IAAII,KAAY,GAAG,EAAE;IACrB,IAAI,CAACJ,KAAK,CAACK,OAAO,IAAIL,KAAK,CAACM,QAAQ,EAAE;MACpCF,KAAK,GAAGG,KAAK,CAACC,IAAI,CAACD,KAAK,CAAC,CAACP,KAAK,CAACM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}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseProps","WmRatingProps"],"sources":["rating.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmRatingProps extends BaseProps {\n dataset?: any[] = null as any;\n datafield?: string = 'key';\n displayfield?: string = 'value';\n getDisplayExpression: Function = null as any;\n datavalue?: number = null as any;\n maxvalue: number = 5;\n readonly? = false;\n iconcolor?: string = null as any;\n iconsize?: number = null as any;\n showcaptions? = true;\n onFieldChange: any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,aAAa,SAASD,SAAS,CAAC;
|
|
1
|
+
{"version":3,"names":["BaseProps","WmRatingProps","constructor","arguments","_defineProperty"],"sources":["rating.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmRatingProps extends BaseProps {\n dataset?: any[] = null as any;\n datafield?: string = 'key';\n displayfield?: string = 'value';\n getDisplayExpression: Function = null as any;\n datavalue?: number = null as any;\n maxvalue: number = 5;\n readonly? = false;\n iconcolor?: string = null as any;\n iconsize?: number = null as any;\n showcaptions? = true;\n onFieldChange: any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,aAAa,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,kBAC/B,IAAI;IAAAA,eAAA,oBACD,KAAK;IAAAA,eAAA,uBACF,OAAO;IAAAA,eAAA,+BACE,IAAI;IAAAA,eAAA,oBAChB,IAAI;IAAAA,eAAA,mBACN,CAAC;IAAAA,eAAA,mBACR,KAAK;IAAAA,eAAA,oBACI,IAAI;IAAAA,eAAA,mBACL,IAAI;IAAAA,eAAA,uBACR,IAAI;IAAAA,eAAA;EAAA;AAExB"}
|
|
@@ -80,7 +80,7 @@ export default class WmSelect extends BaseDatasetComponent {
|
|
|
80
80
|
}
|
|
81
81
|
focus() {
|
|
82
82
|
var _this$widgetRef;
|
|
83
|
-
this === null || this === void 0
|
|
83
|
+
this === null || this === void 0 || (_this$widgetRef = this.widgetRef) === null || _this$widgetRef === void 0 ? void 0 : _this$widgetRef.focus();
|
|
84
84
|
}
|
|
85
85
|
renderSelect() {
|
|
86
86
|
const props = this.state.props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ScrollView","Text","View","find","isEmpty","WmSelectProps","DEFAULT_CLASS","BaseDatasetComponent","BaseDatasetState","ModalConsumer","WmButton","Tappable","ThemeVariables","WmSelectState","WmSelect","constructor","props","updateState","isOpened","onPress","event","state","disabled","showPopover","invokeEventCallback","proxy","onPropertyChange","name","$new","$old","isNaN","displayValue","placeholder","prepareModalOptions","content","styles","modalService","o","modalOptions","modalStyle","modal","contentStyle","modalContent","isModal","centered","onClose","hide","isDefaultValue","validate","triggerValidation","setState","hideModal","focus","widgetRef","renderSelect","root","isValid","invalid","backgroundColor","disabledText","ref","view","text","color","placeholderText","bind","arrowButton","onItemSelect","item","isPlaceholder","onChange","datafield","dataObject","renderSelectItem","isLast","selectItem","lastSelectItem","selectItemText","displayexp","displayfield","updateDefaultQueryModel","dataItems","length","selectedItem","selected","componentDidMount","onDataItemsUpdate","renderWidget","items","showModal","width","maxHeight","INSTANCE","maxModalHeight","dropDownContent","map","index","key"],"sources":["select.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ScrollView, Text, View } from 'react-native';\nimport { find, isEmpty } from 'lodash';\n\nimport WmSelectProps from './select.props';\nimport { DEFAULT_CLASS, WmSelectStyles } from './select.styles';\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\n\nexport class WmSelectState extends BaseDatasetState<WmSelectProps> {\n modalOptions = {} as ModalOptions;\n isOpened: boolean = false;\n selectedValue: any = '';\n}\n\nexport default class WmSelect extends BaseDatasetComponent<WmSelectProps, WmSelectState, WmSelectStyles> {\n constructor(props: WmSelectProps) {\n super(props, DEFAULT_CLASS, new WmSelectProps(), new WmSelectState());\n }\n view: View = null as any;\n public widgetRef: Text | null = null;\n private isDefaultValue: boolean = true;\n\n onPress(event: any) {\n if (this.state.props.disabled) {\n return;\n }\n if (!this.state.isOpened) {\n this.showPopover();\n }\n this.invokeEventCallback('onFocus', [event, this.proxy]);\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'datavalue':\n if (isNaN($new) && isEmpty($new)) {\n this.updateState({\n props: {\n displayValue: this.state.props.placeholder || ''\n }\n } as WmSelectState);\n }\n }\n }\n\n prepareModalOptions(content: React.ReactNode, styles: WmSelectStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n o.modalStyle = styles.modal;\n o.contentStyle = {...styles.modalContent};\n o.content = content;\n o.isModal = true;\n o.centered = true;\n o.onClose = () => {\n this.hide = () => {};\n if (this.isDefaultValue && this.state.props.displayValue === '') {\n this.validate(this.state.props.displayValue);\n this.props.triggerValidation && this.props.triggerValidation();\n }\n this.invokeEventCallback('onBlur', [{}, this.proxy]);\n this.setState({ isOpened: false, modalOptions: {} as ModalOptions } as WmSelectState);\n };\n this.hide = () => modalService.hideModal(this.state.modalOptions);\n return o;\n }\n\n public showPopover = () => {\n this.updateState({ isOpened: true } as WmSelectState);\n };\n\n public hide = () => {};\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n renderSelect() {\n const props = this.state.props;\n return (\n /*\n * onLayout function is required.\n * https://github.com/naoufal/react-native-accordion/pull/19/files\n */\n <View\n style={[this.styles.root, this.state.isValid ? {} : this.styles.invalid, { backgroundColor: props.disabled ? this.styles.disabledText.backgroundColor : this.styles.root.backgroundColor}]}\n ref={(ref) => {\n this.view = ref as View;\n }}\n onLayout={() => {}}>\n <Text\n style={[this.styles.text,\n this.state.props.displayValue ? {} : {color: this.styles.placeholderText.color}]}\n ref={(ref) => {\n this.widgetRef = ref;\n }}\n onPress={this.onPress.bind(this)}>\n {this.state.props.displayValue || props.placeholder || ' '}\n </Text>\n <WmButton\n styles={this.styles.arrowButton}\n iconclass={'wi wi-keyboard-arrow-down'}\n onTap={this.onPress.bind(this)}\n />\n </View>\n );\n }\n\n onItemSelect(item: any, isPlaceholder?: boolean) {\n this.isDefaultValue = false;\n this.onChange(isPlaceholder ? '' : this.state.props.datafield === 'All Fields' ? item.dataObject : item.datafield);\n this.hide();\n }\n\n renderSelectItem(item: any, isPlaceholder: boolean, isLast: boolean) {\n return (\n <Tappable onTap={this.onItemSelect.bind(this, item, isPlaceholder)}>\n <View style={[this.styles.selectItem, isLast ? this.styles.lastSelectItem : null ]}>\n <Text style={[this.styles.selectItemText, {color: isPlaceholder ? this.styles.placeholderText.color : this.styles.selectItemText.color}]}>\n {isPlaceholder ? this.state.props.placeholder : (item.displayexp || item.displayfield)}\n </Text>\n </View>\n </Tappable>\n );\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultValue) {\n const selectedItem = find(this.state.dataItems, (item) => item.selected);\n selectedItem && this.updateState({\n props: {\n displayValue: selectedItem.displayexp || selectedItem.displayfield || ''\n }\n } as WmSelectState);\n }\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.updateDefaultQueryModel();\n }\n\n renderWidget(props: WmSelectProps) {\n return (\n <View>\n {this.renderSelect()}\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n const items = this.state.dataItems;\n modalService.showModal(\n this.prepareModalOptions(\n <ScrollView style={{width: '100%', maxHeight: ThemeVariables.INSTANCE.maxModalHeight}} contentContainerStyle={this.styles.dropDownContent}>\n {props.placeholder ?\n <View key={props.name + '_placeholder'} style={this.styles.placeholderText}>\n {this.renderSelectItem({}, true, false)}\n </View>\n : null}\n {items && items.map((item: any, index: number) => (\n <View key={item.key}>\n {this.renderSelectItem(item, false, index === items.length - 1)}\n </View>\n ))}\n </ScrollView>,\n this.styles,\n modalService\n )\n );\n return null;\n }}\n </ModalConsumer>\n ) : null}\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACrD,SAASC,IAAI,EAAEC,OAAO,QAAQ,QAAQ;AAEtC,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,SAASC,aAAa,QAAoC,8CAA8C;AACxG,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,OAAOC,cAAc,MAAM,kDAAkD;AAE7E,OAAO,MAAMC,aAAa,SAASL,gBAAgB,CAAgB;EAAA;IAAA;IAAA,sCAClD,CAAC,CAAC;IAAA,kCACG,KAAK;IAAA,uCACJ,EAAE;EAAA;AACzB;AAEA,eAAe,MAAMM,QAAQ,SAASP,oBAAoB,CAA+C;EACvGQ,WAAW,CAACC,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEV,aAAa,EAAE,IAAID,aAAa,EAAE,EAAE,IAAIQ,aAAa,EAAE,CAAC;IAAC,8BAE3D,IAAI;IAAA,mCACe,IAAI;IAAA,wCACF,IAAI;IAAA,qCA8CjB,MAAM;MACvB,IAAI,CAACI,WAAW,CAAC;QAAEC,QAAQ,EAAE;MAAK,CAAC,CAAkB;IACzD,CAAC;IAAA,8BAEa,MAAM,CAAC,CAAC;EArDtB;EA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7C,YAAY,CAACqD,SAAS,CACpB,IAAI,CAACxD,mBAAmB,eACtB,oBAAC,UAAU;QAAC,KAAK,EAAE;UAACyD,KAAK,EAAE,MAAM;UAAEC,SAAS,EAAE/E,cAAc,CAACgF,QAAQ,CAACC;QAAc,CAAE;QAAC,qBAAqB,EAAE,IAAI,CAAC1D,MAAM,CAAC2D;MAAgB,GACvI9E,KAAK,CAACgB,WAAW,gBAChB,oBAAC,IAAI;QAAC,GAAG,EAAEhB,KAAK,CAACW,IAAI,GAAG,cAAe;QAAC,KAAK,EAAE,IAAI,CAACQ,MAAM,CAAC6B;MAAgB,GACxE,IAAI,CAACS,gBAAgB,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAClC,GACL,IAAI,EACLe,KAAK,IAAIA,KAAK,CAACO,GAAG,CAAC,CAAC3B,IAAS,EAAE4B,KAAa,kBAC3C,oBAAC,IAAI;QAAC,GAAG,EAAE5B,IAAI,CAAC6B;MAAI,GACjB,IAAI,CAACxB,gBAAgB,CAACL,IAAI,EAAE,KAAK,EAAE4B,KAAK,KAAKR,KAAK,CAACN,MAAM,GAAG,CAAC,CAAC,CAElE,CAAC,CACO,EACb,IAAI,CAAC/C,MAAM,EACXC,YAAY,CACb,CACF;MACD,OAAO,IAAI;IACb,CAAC,CACa,GACd,IAAI,CACH;EAEX;AACF"}
|
|
1
|
+
{"version":3,"names":["React","ScrollView","Text","View","find","isEmpty","WmSelectProps","DEFAULT_CLASS","BaseDatasetComponent","BaseDatasetState","ModalConsumer","WmButton","Tappable","ThemeVariables","WmSelectState","constructor","arguments","_defineProperty","WmSelect","props","updateState","isOpened","onPress","event","state","disabled","showPopover","invokeEventCallback","proxy","onPropertyChange","name","$new","$old","isNaN","displayValue","placeholder","prepareModalOptions","content","styles","modalService","o","modalOptions","modalStyle","modal","contentStyle","modalContent","isModal","centered","onClose","hide","isDefaultValue","validate","triggerValidation","setState","hideModal","focus","_this$widgetRef","widgetRef","renderSelect","createElement","style","root","isValid","invalid","backgroundColor","disabledText","ref","view","onLayout","text","color","placeholderText","bind","arrowButton","iconclass","onTap","onItemSelect","item","isPlaceholder","onChange","datafield","dataObject","renderSelectItem","isLast","selectItem","lastSelectItem","selectItemText","displayexp","displayfield","updateDefaultQueryModel","dataItems","length","selectedItem","selected","componentDidMount","onDataItemsUpdate","renderWidget","items","showModal","width","maxHeight","INSTANCE","maxModalHeight","contentContainerStyle","dropDownContent","key","map","index"],"sources":["select.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ScrollView, Text, View } from 'react-native';\nimport { find, isEmpty } from 'lodash';\n\nimport WmSelectProps from './select.props';\nimport { DEFAULT_CLASS, WmSelectStyles } from './select.styles';\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\n\nexport class WmSelectState extends BaseDatasetState<WmSelectProps> {\n modalOptions = {} as ModalOptions;\n isOpened: boolean = false;\n selectedValue: any = '';\n}\n\nexport default class WmSelect extends BaseDatasetComponent<WmSelectProps, WmSelectState, WmSelectStyles> {\n constructor(props: WmSelectProps) {\n super(props, DEFAULT_CLASS, new WmSelectProps(), new WmSelectState());\n }\n view: View = null as any;\n public widgetRef: Text | null = null;\n private isDefaultValue: boolean = true;\n\n onPress(event: any) {\n if (this.state.props.disabled) {\n return;\n }\n if (!this.state.isOpened) {\n this.showPopover();\n }\n this.invokeEventCallback('onFocus', [event, this.proxy]);\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'datavalue':\n if (isNaN($new) && isEmpty($new)) {\n this.updateState({\n props: {\n displayValue: this.state.props.placeholder || ''\n }\n } as WmSelectState);\n }\n }\n }\n\n prepareModalOptions(content: React.ReactNode, styles: WmSelectStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n o.modalStyle = styles.modal;\n o.contentStyle = {...styles.modalContent};\n o.content = content;\n o.isModal = true;\n o.centered = true;\n o.onClose = () => {\n this.hide = () => {};\n if (this.isDefaultValue && this.state.props.displayValue === '') {\n this.validate(this.state.props.displayValue);\n this.props.triggerValidation && this.props.triggerValidation();\n }\n this.invokeEventCallback('onBlur', [{}, this.proxy]);\n this.setState({ isOpened: false, modalOptions: {} as ModalOptions } as WmSelectState);\n };\n this.hide = () => modalService.hideModal(this.state.modalOptions);\n return o;\n }\n\n public showPopover = () => {\n this.updateState({ isOpened: true } as WmSelectState);\n };\n\n public hide = () => {};\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n renderSelect() {\n const props = this.state.props;\n return (\n /*\n * onLayout function is required.\n * https://github.com/naoufal/react-native-accordion/pull/19/files\n */\n <View\n style={[this.styles.root, this.state.isValid ? {} : this.styles.invalid, { backgroundColor: props.disabled ? this.styles.disabledText.backgroundColor : this.styles.root.backgroundColor}]}\n ref={(ref) => {\n this.view = ref as View;\n }}\n onLayout={() => {}}>\n <Text\n style={[this.styles.text,\n this.state.props.displayValue ? {} : {color: this.styles.placeholderText.color}]}\n ref={(ref) => {\n this.widgetRef = ref;\n }}\n onPress={this.onPress.bind(this)}>\n {this.state.props.displayValue || props.placeholder || ' '}\n </Text>\n <WmButton\n styles={this.styles.arrowButton}\n iconclass={'wi wi-keyboard-arrow-down'}\n onTap={this.onPress.bind(this)}\n />\n </View>\n );\n }\n\n onItemSelect(item: any, isPlaceholder?: boolean) {\n this.isDefaultValue = false;\n this.onChange(isPlaceholder ? '' : this.state.props.datafield === 'All Fields' ? item.dataObject : item.datafield);\n this.hide();\n }\n\n renderSelectItem(item: any, isPlaceholder: boolean, isLast: boolean) {\n return (\n <Tappable onTap={this.onItemSelect.bind(this, item, isPlaceholder)}>\n <View style={[this.styles.selectItem, isLast ? this.styles.lastSelectItem : null ]}>\n <Text style={[this.styles.selectItemText, {color: isPlaceholder ? this.styles.placeholderText.color : this.styles.selectItemText.color}]}>\n {isPlaceholder ? this.state.props.placeholder : (item.displayexp || item.displayfield)}\n </Text>\n </View>\n </Tappable>\n );\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultValue) {\n const selectedItem = find(this.state.dataItems, (item) => item.selected);\n selectedItem && this.updateState({\n props: {\n displayValue: selectedItem.displayexp || selectedItem.displayfield || ''\n }\n } as WmSelectState);\n }\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.updateDefaultQueryModel();\n }\n\n renderWidget(props: WmSelectProps) {\n return (\n <View>\n {this.renderSelect()}\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n const items = this.state.dataItems;\n modalService.showModal(\n this.prepareModalOptions(\n <ScrollView style={{width: '100%', maxHeight: ThemeVariables.INSTANCE.maxModalHeight}} contentContainerStyle={this.styles.dropDownContent}>\n {props.placeholder ?\n <View key={props.name + '_placeholder'} style={this.styles.placeholderText}>\n {this.renderSelectItem({}, true, false)}\n </View>\n : null}\n {items && items.map((item: any, index: number) => (\n <View key={item.key}>\n {this.renderSelectItem(item, false, index === items.length - 1)}\n </View>\n ))}\n </ScrollView>,\n this.styles,\n modalService\n )\n );\n return null;\n }}\n </ModalConsumer>\n ) : null}\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACrD,SAASC,IAAI,EAAEC,OAAO,QAAQ,QAAQ;AAEtC,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;A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AE,MAAM;UAAEC,SAAS,EAAEvF,cAAc,CAACwF,QAAQ,CAACC;QAAc,CAAE;QAACC,qBAAqB,EAAE,IAAI,CAACjE,MAAM,CAACkE;MAAgB,GACvIrF,KAAK,CAACgB,WAAW,gBAChBnC,KAAA,CAAA2D,aAAA,CAACxD,IAAI;QAACsG,GAAG,EAAEtF,KAAK,CAACW,IAAI,GAAG,cAAe;QAAC8B,KAAK,EAAE,IAAI,CAACtB,MAAM,CAACiC;MAAgB,GACxE,IAAI,CAACW,gBAAgB,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAClC,CAAC,GACL,IAAI,EACLe,KAAK,IAAIA,KAAK,CAACS,GAAG,CAAC,CAAC7B,IAAS,EAAE8B,KAAa,kBAC3C3G,KAAA,CAAA2D,aAAA,CAACxD,IAAI;QAACsG,GAAG,EAAE5B,IAAI,CAAC4B;MAAI,GACjB,IAAI,CAACvB,gBAAgB,CAACL,IAAI,EAAE,KAAK,EAAE8B,KAAK,KAAKV,KAAK,CAACN,MAAM,GAAG,CAAC,CAC1D,CACP,CACO,CAAC,EACb,IAAI,CAACrD,MAAM,EACXC,YACF,CACF,CAAC;MACD,OAAO,IAAI;IACb,CACa,CAAC,GACd,IACA,CAAC;EAEX;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseDatasetProps","WmSelectProps"],"sources":["select.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\n\nexport default class WmSelectProps extends BaseDatasetProps {\n placeholder: string = null as any;\n displayValue = null as any;\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAEvG,eAAe,MAAMC,aAAa,SAASD,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"names":["BaseDatasetProps","WmSelectProps","constructor","arguments","_defineProperty"],"sources":["select.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\n\nexport default class WmSelectProps extends BaseDatasetProps {\n placeholder: string = null as any;\n displayValue = null as any;\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAEvG,eAAe,MAAMC,aAAa,SAASD,gBAAgB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,sBACpC,IAAI;IAAAA,eAAA,uBACX,IAAI;EAAA;AACrB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';
|
|
2
2
|
import { defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
3
|
+
import { Platform } from 'react-native';
|
|
3
4
|
export const DEFAULT_CLASS = 'app-select';
|
|
4
5
|
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
5
6
|
const defaultStyles = defineStyles({
|
|
@@ -76,5 +77,14 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
76
77
|
backgroundColor: themeVariables.inputDisabledBgColor
|
|
77
78
|
}
|
|
78
79
|
});
|
|
80
|
+
addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS == "web" ? {
|
|
81
|
+
text: {
|
|
82
|
+
textAlign: 'right'
|
|
83
|
+
}
|
|
84
|
+
} : {
|
|
85
|
+
text: {
|
|
86
|
+
textAlign: 'left'
|
|
87
|
+
}
|
|
88
|
+
});
|
|
79
89
|
});
|
|
80
90
|
//# sourceMappingURL=select.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","padding","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","minWidth","invalid","borderBottomColor","inputInvalidBorderColor","text","fontSize","fontFamily","baseFont","flex","color","inputTextColor","disabledText","inputDisabledBgColor","modal","height","modalContent","selectDropdownBackgroundColor","position","selectBorderColor","width","selectItem","paddingHorizontal","paddingVertical","borderBottomWidth","borderBottomStyle","selecttemBorderColor","alignItems","lastSelectItem","selectItemText","selectItemTextColor","placeholderText","inputPlaceholderColor","dropDownContent","arrowButton","alignSelf","justifyContent"],"sources":["select.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\n\nexport type WmSelectStyles = BaseStyles & {\n arrowButton: WmButtonStyles;\n modal: AllStyle;\n modalContent: AllStyle;\n selectItem: AllStyle;\n lastSelectItem: AllStyle,\n selectItemText: AllStyle;\n dropDownContent: AllStyle;\n disabledText: AllStyle;\n placeholderText: AllStyle;\n invalid: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-select';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSelectStyles = defineStyles({\n root: {\n flexDirection: 'row',\n padding: 12,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n minWidth: 160\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n text: {\n fontSize: 16,\n fontFamily: themeVariables.baseFont,\n flex: 1,\n color: themeVariables.inputTextColor\n },\n disabledText: {\n backgroundColor : themeVariables.inputDisabledBgColor\n },\n modal: {\n backgroundColor: 'rgba(0, 0, 0, 0.3)',\n height: '100%'\n },\n modalContent: {\n backgroundColor: themeVariables.selectDropdownBackgroundColor,\n borderRadius: 6,\n position: 'absolute',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.selectBorderColor,\n width: '90%'\n },\n selectItem: {\n width: '100%',\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderBottomWidth: 1,\n borderBottomStyle: 'solid',\n borderBottomColor: themeVariables.selecttemBorderColor,\n flexDirection: 'row',\n alignItems: 'center'\n },\n lastSelectItem: {\n borderBottomWidth: 0\n },\n selectItemText: {\n fontSize: 16,\n fontFamily: themeVariables.baseFont,\n color: themeVariables.selectItemTextColor\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n dropDownContent: {},\n arrowButton: {\n root: {\n padding: 0,\n alignItems: 'center',\n alignSelf: 'center',\n justifyContent: 'center',\n backgroundColor: 'transparent'\n }\n } as WmButtonStyles,\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAkB,wCAAwC;AAC3E,SAAqBC,YAAY,QAAQ,+CAA+C;
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","padding","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","minWidth","invalid","borderBottomColor","inputInvalidBorderColor","text","fontSize","fontFamily","baseFont","flex","color","inputTextColor","disabledText","inputDisabledBgColor","modal","height","modalContent","selectDropdownBackgroundColor","position","selectBorderColor","width","selectItem","paddingHorizontal","paddingVertical","borderBottomWidth","borderBottomStyle","selecttemBorderColor","alignItems","lastSelectItem","selectItemText","selectItemTextColor","placeholderText","inputPlaceholderColor","dropDownContent","arrowButton","alignSelf","justifyContent","OS","textAlign"],"sources":["select.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\nimport { Platform } from 'react-native';\n\nexport type WmSelectStyles = BaseStyles & {\n arrowButton: WmButtonStyles;\n modal: AllStyle;\n modalContent: AllStyle;\n selectItem: AllStyle;\n lastSelectItem: AllStyle,\n selectItemText: AllStyle;\n dropDownContent: AllStyle;\n disabledText: AllStyle;\n placeholderText: AllStyle;\n invalid: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-select';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSelectStyles = defineStyles({\n root: {\n flexDirection: 'row',\n padding: 12,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n minWidth: 160\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n text: {\n fontSize: 16,\n fontFamily: themeVariables.baseFont,\n flex: 1,\n color: themeVariables.inputTextColor\n },\n disabledText: {\n backgroundColor : themeVariables.inputDisabledBgColor\n },\n modal: {\n backgroundColor: 'rgba(0, 0, 0, 0.3)',\n height: '100%'\n },\n modalContent: {\n backgroundColor: themeVariables.selectDropdownBackgroundColor,\n borderRadius: 6,\n position: 'absolute',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.selectBorderColor,\n width: '90%'\n },\n selectItem: {\n width: '100%',\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderBottomWidth: 1,\n borderBottomStyle: 'solid',\n borderBottomColor: themeVariables.selecttemBorderColor,\n flexDirection: 'row',\n alignItems: 'center'\n },\n lastSelectItem: {\n borderBottomWidth: 0\n },\n selectItemText: {\n fontSize: 16,\n fontFamily: themeVariables.baseFont,\n color: themeVariables.selectItemTextColor\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n dropDownContent: {},\n arrowButton: {\n root: {\n padding: 0,\n alignItems: 'center',\n alignSelf: 'center',\n justifyContent: 'center',\n backgroundColor: 'transparent'\n }\n } as WmButtonStyles,\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n add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g) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
3
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { View, Text } from 'react-native';
|
|
5
|
+
import { View, Text, Platform } from 'react-native';
|
|
6
6
|
import { debounce, isNumber, isNil } from 'lodash';
|
|
7
7
|
import Slider from '@react-native-community/slider';
|
|
8
8
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
@@ -63,6 +63,7 @@ export default class WmSlider extends BaseComponent {
|
|
|
63
63
|
value: this.valueBeforeSlide || props.datavalue || 0,
|
|
64
64
|
disabled: props.readonly,
|
|
65
65
|
minimumValue: props.minvalue,
|
|
66
|
+
inverted: this.isRTL && (Platform.OS == "android" || Platform.OS == "web"),
|
|
66
67
|
maximumValue: props.maxvalue,
|
|
67
68
|
onValueChange: this.onChange,
|
|
68
69
|
thumbTintColor: this.styles.thumb.backgroundColor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","debounce","isNumber","isNil","Slider","BaseComponent","BaseComponentState","WmSliderProps","DEFAULT_CLASS","WmSliderState","WmSlider","constructor","props","value","state","datavalue","updateState","onFieldChange","valueBeforeSlide","getDataValue","minvalue","maxvalue","Math","min","max","onPropertyChange","name","$new","$old","invokeEventCallback","setProp","renderWidget","styles","root","_background","flexDirection","justifyContent","text","minimumValue","maximumValue","readonly","disabled","step","onChange","thumb","backgroundColor","onBeforeSlide","onAfterSlide","minimumTrack","maximumTrack"],"sources":["slider.component.tsx"],"sourcesContent":["import React from 'react';\nimport {View, Text } from 'react-native';\nimport { debounce, isNumber, isNil } from 'lodash';\nimport Slider from '@react-native-community/slider';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmSliderProps from './slider.props';\nimport { DEFAULT_CLASS, WmSliderStyles } from './slider.styles';\n\nexport class WmSliderState extends BaseComponentState<WmSliderProps> {}\n\nexport default class WmSlider extends BaseComponent<WmSliderProps, WmSliderState, WmSliderStyles> {\n valueBeforeSlide: number = 0;\n\n constructor(props: WmSliderProps) {\n super(props, DEFAULT_CLASS, new WmSliderProps());\n }\n\n getDataValue() {\n if (isNil(this.props.datavalue)) {\n return this.state.props.minvalue + (this.state.props.maxvalue - this.state.props.minvalue)/2;\n }\n return Math.min(Math.max(this.props.datavalue, this.state.props.minvalue), this.state.props.maxvalue);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'datavalue':\n if (isNumber($new) && isNumber($old)) {\n this.invokeEventCallback('onChange', [null, this, $new, $old]);\n }\n case 'maxvalue':\n case 'minvalue': \n this.setProp('datavalue', this.getDataValue() || 0)\n }\n }\n\n onChange = debounce((value: number) => {\n if (this.state.props.datavalue !== value) {\n this.updateState({\n props : {\n datavalue: value\n }\n } as WmSliderState);\n this.props.onFieldChange &&\n this.props.onFieldChange(\n 'datavalue',\n value,\n this.state.props.datavalue\n );\n }\n }, 200);\n\n onBeforeSlide = () => this.valueBeforeSlide = this.props.datavalue;\n\n onAfterSlide = () => this.valueBeforeSlide = 0;\n\n renderWidget(props: WmSliderProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n <View style={{flexDirection:'row', justifyContent:'space-between'}}>\n <Text style={[this.styles.text, this.styles.minimumValue]}>{props.minvalue}</Text>\n <Text style={[this.styles.text, this.styles.value]}>{props.datavalue}</Text>\n <Text style={[this.styles.text, this.styles.maximumValue]}>{props.maxvalue}</Text>\n </View>\n <Slider\n style={props.readonly || props.disabled ? this.styles.disabled : {}}\n step={props.step}\n value={this.valueBeforeSlide || props.datavalue || 0}\n disabled={props.readonly}\n minimumValue={props.minvalue}\n maximumValue={props.maxvalue}\n onValueChange={this.onChange}\n thumbTintColor={this.styles.thumb.backgroundColor as string}\n onTouchStart={this.onBeforeSlide}\n onTouchEnd={this.onAfterSlide}\n minimumTrackTintColor={this.styles.minimumTrack.backgroundColor as string}\n maximumTrackTintColor={this.styles.maximumTrack.backgroundColor as string}\n />\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,EAAEC,IAAI,QAAQ,cAAc;
|
|
1
|
+
{"version":3,"names":["React","View","Text","Platform","debounce","isNumber","isNil","Slider","BaseComponent","BaseComponentState","WmSliderProps","DEFAULT_CLASS","WmSliderState","WmSlider","constructor","props","_defineProperty","value","state","datavalue","updateState","onFieldChange","valueBeforeSlide","getDataValue","minvalue","maxvalue","Math","min","max","onPropertyChange","name","$new","$old","invokeEventCallback","setProp","renderWidget","createElement","style","styles","root","_background","flexDirection","justifyContent","text","minimumValue","maximumValue","readonly","disabled","step","inverted","isRTL","OS","onValueChange","onChange","thumbTintColor","thumb","backgroundColor","onTouchStart","onBeforeSlide","onTouchEnd","onAfterSlide","minimumTrackTintColor","minimumTrack","maximumTrackTintColor","maximumTrack"],"sources":["slider.component.tsx"],"sourcesContent":["import React from 'react';\nimport {View, Text, Platform } from 'react-native';\nimport { debounce, isNumber, isNil } from 'lodash';\nimport Slider from '@react-native-community/slider';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmSliderProps from './slider.props';\nimport { DEFAULT_CLASS, WmSliderStyles } from './slider.styles';\n\nexport class WmSliderState extends BaseComponentState<WmSliderProps> {}\n\nexport default class WmSlider extends BaseComponent<WmSliderProps, WmSliderState, WmSliderStyles> {\n valueBeforeSlide: number = 0;\n\n constructor(props: WmSliderProps) {\n super(props, DEFAULT_CLASS, new WmSliderProps());\n }\n\n getDataValue() {\n if (isNil(this.props.datavalue)) {\n return this.state.props.minvalue + (this.state.props.maxvalue - this.state.props.minvalue)/2;\n }\n return Math.min(Math.max(this.props.datavalue, this.state.props.minvalue), this.state.props.maxvalue);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'datavalue':\n if (isNumber($new) && isNumber($old)) {\n this.invokeEventCallback('onChange', [null, this, $new, $old]);\n }\n case 'maxvalue':\n case 'minvalue': \n this.setProp('datavalue', this.getDataValue() || 0)\n }\n }\n\n onChange = debounce((value: number) => {\n if (this.state.props.datavalue !== value) {\n this.updateState({\n props : {\n datavalue: value\n }\n } as WmSliderState);\n this.props.onFieldChange &&\n this.props.onFieldChange(\n 'datavalue',\n value,\n this.state.props.datavalue\n );\n }\n }, 200);\n\n onBeforeSlide = () => this.valueBeforeSlide = this.props.datavalue;\n\n onAfterSlide = () => this.valueBeforeSlide = 0;\n\n renderWidget(props: WmSliderProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n <View style={{flexDirection:'row', justifyContent:'space-between'}}>\n <Text style={[this.styles.text, this.styles.minimumValue]}>{props.minvalue}</Text>\n <Text style={[this.styles.text, this.styles.value]}>{props.datavalue}</Text>\n <Text style={[this.styles.text, this.styles.maximumValue]}>{props.maxvalue}</Text>\n </View>\n <Slider\n style={props.readonly || props.disabled ? this.styles.disabled : {}}\n step={props.step}\n value={this.valueBeforeSlide || props.datavalue || 0}\n disabled={props.readonly}\n minimumValue={props.minvalue}\n inverted={this.isRTL && (Platform.OS==\"android\"||Platform.OS==\"web\")}\n maximumValue={props.maxvalue}\n onValueChange={this.onChange}\n thumbTintColor={this.styles.thumb.backgroundColor as string}\n onTouchStart={this.onBeforeSlide}\n onTouchEnd={this.onAfterSlide}\n minimumTrackTintColor={this.styles.minimumTrack.backgroundColor as string}\n maximumTrackTintColor={this.styles.maximumTrack.backgroundColor as string}\n />\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AAClD,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,KAAK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SAAgB,CAAC,eAC5EnB,KAAA,CAAAoC,aAAA,CAAClC,IAAI;MAACmC,KAAK,EAAE,CAAC,IAAI,CAACC,MAAM,CAACK,IAAI,EAAE,IAAI,CAACL,MAAM,CAACO,YAAY;IAAE,GAAE9B,KAAK,CAACU,QAAe,CAC7E,CAAC,eACPzB,KAAA,CAAAoC,aAAA,CAAC7B,MAAM;MACL8B,KAAK,EAAEtB,KAAK,CAAC+B,QAAQ,IAAI/B,KAAK,CAACgC,QAAQ,GAAG,IAAI,CAACT,MAAM,CAACS,QAAQ,GAAG,CAAC,CAAE;MACpEC,IAAI,EAAEjC,KAAK,CAACiC,IAAK;MACjB/B,KAAK,EAAE,IAAI,CAACK,gBAAgB,IAAIP,KAAK,CAACI,SAAS,IAAI,CAAE;MACrD4B,QAAQ,EAAEhC,KAAK,CAAC+B,QAAS;MACzBF,YAAY,EAAE7B,KAAK,CAACS,QAAS;MAC7ByB,QAAQ,EAAE,IAAI,CAACC,KAAK,KAAK/C,QAAQ,CAACgD,EAAE,IAAE,SAAS,IAAEhD,QAAQ,CAACgD,EAAE,IAAE,KAAK,CAAE;MACrEN,YAAY,EAAE9B,KAAK,CAACU,QAAS;MAC7B2B,aAAa,EAAE,IAAI,CAACC,QAAS;MAC7BC,cAAc,EAAE,IAAI,CAAChB,MAAM,CAACiB,KAAK,CAACC,eAA0B;MAC5DC,YAAY,EAAE,IAAI,CAACC,aAAc;MACjCC,UAAU,EAAE,IAAI,CAACC,YAAa;MAC9BC,qBAAqB,EAAE,IAAI,CAACvB,MAAM,CAACwB,YAAY,CAACN,eAA0B;MAC1EO,qBAAqB,EAAE,IAAI,CAACzB,MAAM,CAAC0B,YAAY,CAACR;IAA0B,CAC3E,CACG,CAAC;EACT;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseProps","WmSliderProps"],"sources":["slider.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmSliderProps extends BaseProps {\n datavalue: any;\n minvalue: number = 0;\n maxvalue: number = 100;\n step
|
|
1
|
+
{"version":3,"names":["BaseProps","WmSliderProps","constructor","arguments","_defineProperty"],"sources":["slider.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmSliderProps extends BaseProps {\n datavalue: any;\n minvalue: number = 0;\n maxvalue: number = 100;\n step?: number = 1;\n readonly? = false;\n onFieldChange?: any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,aAAa,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;IAAAA,eAAA,mBAE9B,CAAC;IAAAA,eAAA,mBACD,GAAG;IAAAA,eAAA,eACN,CAAC;IAAAA,eAAA,mBACL,KAAK;IAAAA,eAAA;EAAA;AAErB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","isEqual","find","WmSwitchProps","DEFAULT_CLASS","WmIcon","BaseDatasetComponent","BaseDatasetState","Tappable","WmSwitchState","WmSwitch","constructor","props","onChange","value","validate","state","datafield","selectedItem","dataItems","item","key","dataObject","updateState","datavalue","isDefault","invokeEvent","invokeEventCallback","undefined","proxy","onTap","event","getItemKey","renderChild","index","btnClass","length","displayText","displayexp","displayfield","isSelected","disabled","bind","styles","button","selectedButton","iconclass","loadingIcon","icon","text","color","renderWidget","items","root","map"],"sources":["switch.component.tsx"],"sourcesContent":["import React from 'react';\nimport {Text, View} from \"react-native\";\nimport { isEqual, find } from 'lodash';\n\nimport WmSwitchProps from './switch.props';\nimport { DEFAULT_CLASS, WmSwitchStyles } from './switch.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { BaseDatasetComponent, BaseDatasetState } from '../basedataset/basedataset.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\n\nexport class WmSwitchState extends BaseDatasetState<WmSwitchProps> {}\n\nexport default class WmSwitch extends BaseDatasetComponent<WmSwitchProps, WmSwitchState, WmSwitchStyles> {\n constructor(props: WmSwitchProps) {\n super(props, DEFAULT_CLASS, new WmSwitchProps());\n }\n\n onChange(value: any) {\n if (!value) {\n return;\n }\n this.validate(value);\n if (this.state.props.datafield === 'All Fields') {\n const selectedItem = find(this.state.dataItems, (item) => isEqual(item.key, value));\n value = selectedItem && selectedItem.dataObject;\n }\n // @ts-ignore\n this.updateState({props: {datavalue: value}, isDefault: false},\n () => {\n if (!this.props.invokeEvent) {\n this.invokeEventCallback('onChange', [undefined, this.proxy, value, this.state.props.datavalue])\n }\n });\n }\n\n onTap(event: any, item: any) {\n const value = this.state.props.datafield === 'All Fields' ? this.getItemKey(item.datafield) : item.datafield;\n this.onChange(value);\n this.invokeEventCallback('onTap', [ event, this.proxy ]);\n }\n\n renderChild(item: any, index: any) {\n let btnClass = 'button';\n const props = this.state.props;\n if(index === 0) {\n btnClass = 'firstButton';\n } else if (index+1 === this.state.dataItems.length) {\n btnClass = 'lastButton';\n }\n const displayText = item.displayexp || item.displayfield;\n const isSelected = this.state.props.datafield === 'All Fields' ? isEqual(props.datavalue, item.datafield) : this.state.props.datavalue === item.datafield;\n return (\n <Tappable \n onTap={this.state.props.disabled ? undefined : this.onTap.bind(this, null, item)}\n styles={[\n this.styles.button,\n this.styles[btnClass],\n isSelected ? this.styles.selectedButton : null]}\n key={item.key}>\n {this.state.props.iconclass ?\n (<WmIcon styles={this.styles.loadingIcon}\n iconclass={item.icon}\n caption={displayText}></WmIcon>)\n : (<View>\n <Text \n style={[this.styles.text, \n {color: isSelected ? this.styles.selectedButton.color : this.styles.button.color }]}>\n {displayText}\n </Text>\n </View>)}\n </Tappable>\n );\n };\n\n renderWidget(props: WmSwitchProps) {\n const items = this.state.dataItems;\n return (<View style={this.styles.root}>\n {items && items.length ?\n items.map((item: any, index: any) => this.renderChild(item, index)): null}\n </View>);\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,EAAEC,IAAI,QAAO,cAAc;AACvC,SAASC,OAAO,EAAEC,IAAI,QAAQ,QAAQ;AAEtC,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,oBAAoB,EAAEC,gBAAgB,QAAQ,sCAAsC;AAC7F,SAASC,QAAQ,QAAQ,mDAAmD;AAE5E,OAAO,MAAMC,aAAa,SAASF,gBAAgB,CAAgB;AAEnE,eAAe,MAAMG,QAAQ,SAASJ,oBAAoB,CAA+C;EACvGK,
|
|
1
|
+
{"version":3,"names":["React","Text","View","isEqual","find","WmSwitchProps","DEFAULT_CLASS","WmIcon","BaseDatasetComponent","BaseDatasetState","Tappable","WmSwitchState","WmSwitch","constructor","props","onChange","value","validate","state","datafield","selectedItem","dataItems","item","key","dataObject","updateState","datavalue","isDefault","invokeEvent","invokeEventCallback","undefined","proxy","onTap","event","getItemKey","renderChild","index","btnClass","length","displayText","displayexp","displayfield","isSelected","createElement","disabled","bind","styles","button","selectedButton","iconclass","loadingIcon","icon","caption","style","text","color","renderWidget","items","root","map"],"sources":["switch.component.tsx"],"sourcesContent":["import React from 'react';\nimport {Text, View} from \"react-native\";\nimport { isEqual, find } from 'lodash';\n\nimport WmSwitchProps from './switch.props';\nimport { DEFAULT_CLASS, WmSwitchStyles } from './switch.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { BaseDatasetComponent, BaseDatasetState } from '../basedataset/basedataset.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\n\nexport class WmSwitchState extends BaseDatasetState<WmSwitchProps> {}\n\nexport default class WmSwitch extends BaseDatasetComponent<WmSwitchProps, WmSwitchState, WmSwitchStyles> {\n constructor(props: WmSwitchProps) {\n super(props, DEFAULT_CLASS, new WmSwitchProps());\n }\n\n onChange(value: any) {\n if (!value) {\n return;\n }\n this.validate(value);\n if (this.state.props.datafield === 'All Fields') {\n const selectedItem = find(this.state.dataItems, (item) => isEqual(item.key, value));\n value = selectedItem && selectedItem.dataObject;\n }\n // @ts-ignore\n this.updateState({props: {datavalue: value}, isDefault: false},\n () => {\n if (!this.props.invokeEvent) {\n this.invokeEventCallback('onChange', [undefined, this.proxy, value, this.state.props.datavalue])\n }\n });\n }\n\n onTap(event: any, item: any) {\n const value = this.state.props.datafield === 'All Fields' ? this.getItemKey(item.datafield) : item.datafield;\n this.onChange(value);\n this.invokeEventCallback('onTap', [ event, this.proxy ]);\n }\n\n renderChild(item: any, index: any) {\n let btnClass = 'button';\n const props = this.state.props;\n if(index === 0) {\n btnClass = 'firstButton';\n } else if (index+1 === this.state.dataItems.length) {\n btnClass = 'lastButton';\n }\n const displayText = item.displayexp || item.displayfield;\n const isSelected = this.state.props.datafield === 'All Fields' ? isEqual(props.datavalue, item.datafield) : this.state.props.datavalue === item.datafield;\n return (\n <Tappable \n onTap={this.state.props.disabled ? undefined : this.onTap.bind(this, null, item)}\n styles={[\n this.styles.button,\n this.styles[btnClass],\n isSelected ? this.styles.selectedButton : null]}\n key={item.key}>\n {this.state.props.iconclass ?\n (<WmIcon styles={this.styles.loadingIcon}\n iconclass={item.icon}\n caption={displayText}></WmIcon>)\n : (<View>\n <Text \n style={[this.styles.text, \n {color: isSelected ? this.styles.selectedButton.color : this.styles.button.color }]}>\n {displayText}\n </Text>\n </View>)}\n </Tappable>\n );\n };\n\n renderWidget(props: WmSwitchProps) {\n const items = this.state.dataItems;\n return (<View style={this.styles.root}>\n {items && items.length ?\n items.map((item: any, index: any) => this.renderChild(item, index)): null}\n </View>);\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,EAAEC,IAAI,QAAO,cAAc;AACvC,SAASC,OAAO,EAAEC,IAAI,QAAQ,QAAQ;AAEtC,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aA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G,IAAI,CAAE;MAChDzB,GAAG,EAAED,IAAI,CAACC;IAAI,GACf,IAAI,CAACL,KAAK,CAACJ,KAAK,CAACmC,SAAS,gBACtBjD,KAAA,CAAA2C,aAAA,CAACpC,MAAM;MAACuC,MAAM,EAAE,IAAI,CAACA,MAAM,CAACI,WAAY;MACjCD,SAAS,EAAE3B,IAAI,CAAC6B,IAAK;MACrBC,OAAO,EAAEb;IAAY,CAAS,CAAC,gBACpCvC,KAAA,CAAA2C,aAAA,CAACzC,IAAI,qBACJF,KAAA,CAAA2C,aAAA,CAAC1C,IAAI;MACHoD,KAAK,EAAE,CAAC,IAAI,CAACP,MAAM,CAACQ,IAAI,EACtB;QAACC,KAAK,EAAEb,UAAU,GAAG,IAAI,CAACI,MAAM,CAACE,cAAc,CAACO,KAAK,GAAG,IAAI,CAACT,MAAM,CAACC,MAAM,CAACQ;MAAM,CAAC;IAAE,GACrFhB,WACG,CACF,CACJ,CAAC;EAEf;EAEAiB,YAAYA,CAAC1C,KAAoB,EAAE;IACjC,MAAM2C,KAAK,GAAG,IAAI,CAACvC,KAAK,CAACG,SAAS;IAClC,oBAAQrB,KAAA,CAAA2C,aAAA,CAACzC,IAAI;MAACmD,KAAK,EAAE,IAAI,CAACP,MAAM,CAACY;IAAK,GACnCD,KAAK,IAAIA,KAAK,CAACnB,MAAM,GACpBmB,KAAK,CAACE,GAAG,CAAC,CAACrC,IAAS,EAAEc,KAAU,KAAK,IAAI,CAACD,WAAW,CAACb,IAAI,EAAEc,KAAK,CAAC,CAAC,GAAE,IACnE,CAAC;EACT;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseDatasetProps","WmSwitchProps"],"sources":["switch.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport BaseDatasetProps from '../basedataset/basedataset.props';\n\nexport default class WmSwitchProps extends BaseDatasetProps {\n dataset: any = 'yes, no, maybe';\n dataItems: any;\n invokeEvent?: Function;\n}\n"],"mappings":";;;AACA,OAAOA,gBAAgB,MAAM,kCAAkC;AAE/D,eAAe,MAAMC,aAAa,SAASD,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"names":["BaseDatasetProps","WmSwitchProps","constructor","arguments","_defineProperty"],"sources":["switch.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport BaseDatasetProps from '../basedataset/basedataset.props';\n\nexport default class WmSwitchProps extends BaseDatasetProps {\n dataset: any = 'yes, no, maybe';\n dataItems: any;\n invokeEvent?: Function;\n}\n"],"mappings":";;;AACA,OAAOA,gBAAgB,MAAM,kCAAkC;AAE/D,eAAe,MAAMC,aAAa,SAASD,gBAAgB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,kBAC3C,gBAAgB;IAAAA,eAAA;IAAAA,eAAA;EAAA;AAGjC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';
|
|
2
2
|
import { defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
3
|
+
import { Platform } from 'react-native';
|
|
3
4
|
export const DEFAULT_CLASS = 'app-switch';
|
|
4
5
|
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
5
6
|
const defaultStyles = defineStyles({
|
|
@@ -59,6 +60,41 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
59
60
|
addStyle(DEFAULT_CLASS + '-disabled', '', {
|
|
60
61
|
root: {}
|
|
61
62
|
});
|
|
63
|
+
addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS == "web" ? {
|
|
64
|
+
firstButton: {
|
|
65
|
+
borderTopLeftRadius: 0,
|
|
66
|
+
borderBottomLeftRadius: 0,
|
|
67
|
+
borderTopRightRadius: 6,
|
|
68
|
+
borderBottomRightRadius: 6,
|
|
69
|
+
borderRightWidth: 1,
|
|
70
|
+
borderLeftWidth: 0
|
|
71
|
+
},
|
|
72
|
+
lastButton: {
|
|
73
|
+
borderTopLeftRadius: 6,
|
|
74
|
+
borderBottomLeftRadius: 6,
|
|
75
|
+
borderTopRightRadius: 0,
|
|
76
|
+
borderBottomRightRadius: 0,
|
|
77
|
+
borderRightWidth: 0
|
|
78
|
+
}
|
|
79
|
+
} : {});
|
|
80
|
+
addStyle(DEFAULT_CLASS + '1-rtl', '', Platform.OS == "web" ? {
|
|
81
|
+
firstButton: {
|
|
82
|
+
borderTopLeftRadius: 0,
|
|
83
|
+
borderBottomLeftRadius: 0,
|
|
84
|
+
borderTopRightRadius: 500,
|
|
85
|
+
borderBottomRightRadius: 500,
|
|
86
|
+
borderRightWidth: 0,
|
|
87
|
+
borderLeftWidth: 1
|
|
88
|
+
},
|
|
89
|
+
lastButton: {
|
|
90
|
+
flex: 1,
|
|
91
|
+
borderTopLeftRadius: 500,
|
|
92
|
+
borderBottomLeftRadius: 500,
|
|
93
|
+
borderTopRightRadius: 0,
|
|
94
|
+
borderBottomRightRadius: 0,
|
|
95
|
+
borderRightWidth: 1
|
|
96
|
+
}
|
|
97
|
+
} : {});
|
|
62
98
|
addStyle(DEFAULT_CLASS + '1', '', {
|
|
63
99
|
firstButton: {
|
|
64
100
|
borderTopLeftRadius: 500,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","height","flexDirection","text","fontWeight","fontSize","textTransform","loadingIcon","flex","alignSelf","justifyContent","color","listSubTitleColor","button","backgroundColor","switchBgColor","switchTextColor","minWidth","borderRadius","borderColor","switchBorderColor","borderWidth","borderRightWidth","alignItems","selectedButton","switchActiveTextColor","switchActiveBgColor","firstButton","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius","lastButton"],"sources":["switch.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {WmIconStyles} from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.styles\";\n\nexport type WmSwitchStyles = BaseStyles & {\n loadingIcon: WmIconStyles,\n button: AllStyle,\n selectedButton: AllStyle,\n firstButton: AllStyle,\n lastButton: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-switch';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSwitchStyles = defineStyles<WmSwitchStyles>({\n root: {\n height: 38,\n flexDirection: 'row'\n },\n text: {\n fontWeight: '500',\n fontSize: 16,\n textTransform: 'capitalize'\n },\n loadingIcon: {\n root: {\n flex: 1,\n alignSelf: 'center',\n justifyContent: 'center',\n fontSize: 16\n },\n text: {\n color: themeVariables.listSubTitleColor\n }\n } as WmIconStyles,\n button: {\n backgroundColor: themeVariables.switchBgColor,\n color: themeVariables.switchTextColor,\n fontSize: 16,\n minWidth: 64,\n borderRadius: 0,\n borderColor: themeVariables.switchBorderColor,\n borderWidth: 1,\n borderRightWidth: 0,\n fontWeight: 'bold',\n justifyContent: 'center',\n alignItems: 'center'\n } as AllStyle,\n selectedButton: {\n color: themeVariables.switchActiveTextColor,\n backgroundColor: themeVariables.switchActiveBgColor,\n borderColor: themeVariables.switchActiveBgColor\n } as AllStyle,\n firstButton: {\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n } as AllStyle,\n lastButton: {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n borderRightWidth: 1\n } as AllStyle\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root: {}\n });\n addStyle(DEFAULT_CLASS + '1', '', {\n firstButton: {\n borderTopLeftRadius: 500,\n borderBottomLeftRadius: 500,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n } as AllStyle,\n lastButton: {\n flex: 1,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 500,\n borderBottomRightRadius: 500\n } as AllStyle\n } as WmSwitchStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAkB,wCAAwC;AAC3E,SAAqBC,YAAY,QAAQ,+CAA+C;
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","height","flexDirection","text","fontWeight","fontSize","textTransform","loadingIcon","flex","alignSelf","justifyContent","color","listSubTitleColor","button","backgroundColor","switchBgColor","switchTextColor","minWidth","borderRadius","borderColor","switchBorderColor","borderWidth","borderRightWidth","alignItems","selectedButton","switchActiveTextColor","switchActiveBgColor","firstButton","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius","lastButton","OS","borderLeftWidth"],"sources":["switch.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {WmIconStyles} from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.styles\";\nimport { Platform } from 'react-native';\n\nexport type WmSwitchStyles = BaseStyles & {\n loadingIcon: WmIconStyles,\n button: AllStyle,\n selectedButton: AllStyle,\n firstButton: AllStyle,\n lastButton: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-switch';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSwitchStyles = defineStyles<WmSwitchStyles>({\n root: {\n height: 38,\n flexDirection: 'row'\n },\n text: {\n fontWeight: '500',\n fontSize: 16,\n textTransform: 'capitalize'\n },\n loadingIcon: {\n root: {\n flex: 1,\n alignSelf: 'center',\n justifyContent: 'center',\n fontSize: 16\n },\n text: {\n color: themeVariables.listSubTitleColor\n }\n } as WmIconStyles,\n button: {\n backgroundColor: themeVariables.switchBgColor,\n color: themeVariables.switchTextColor,\n fontSize: 16,\n minWidth: 64,\n borderRadius: 0,\n borderColor: themeVariables.switchBorderColor,\n borderWidth: 1,\n borderRightWidth: 0,\n fontWeight: 'bold',\n justifyContent: 'center',\n alignItems: 'center'\n } as AllStyle,\n selectedButton: {\n color: themeVariables.switchActiveTextColor,\n backgroundColor: themeVariables.switchActiveBgColor,\n borderColor: themeVariables.switchActiveBgColor\n } as AllStyle,\n firstButton: {\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n } as AllStyle,\n lastButton: {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n borderRightWidth: 1\n } as AllStyle\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root: {}\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n firstButton:{\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n borderRightWidth: 1,\n borderLeftWidth: 0\n } ,\n lastButton:{\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderRightWidth: 0\n }\n }:{});\n addStyle(DEFAULT_CLASS + '1-rtl', '', Platform.OS==\"web\"?{\n firstButton:{\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 500,\n borderBottomRightRadius: 500,\n borderRightWidth: 0,\n borderLeftWidth: 1\n } ,\n lastButton:{\n flex: 1,\n borderTopLeftRadius: 500,\n borderBottomLeftRadius: 500,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderRightWidth: 1\n }\n }:{});\n addStyle(DEFAULT_CLASS + '1', '', {\n firstButton: {\n borderTopLeftRadius: 500,\n borderBottomLeftRadius: 500,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n } as AllStyle,\n lastButton: {\n flex: 1,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 500,\n borderBottomRightRadius: 500\n } as AllStyle\n } as WmSwitchStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAkB,wCAAwC;AAC3E,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,SAASC,QAAQ,QAAQ,cAAc;AAUvC,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGN,YAAY,CAAiB;IAC/DO,IAAI,EAAE;MACJC,MAAM,EAAE,EAAE;MACVC,aAAa,EAAE;IACjB,CAAC;IACDC,IAAI,EAAE;MACJC,UAAU,EAAE,KAAK;MACjBC,QAAQ,EAAE,EAAE;MACZC,aAAa,EAAE;IACjB,CAAC;IACHC,WAAW,EAAE;MACXP,IAAI,EAAE;QACJQ,IAAI,EAAE,CAAC;QACPC,SAAS,EAAE,QAAQ;QACnBC,cAAc,EAAE,QAAQ;QACxBL,QAAQ,EAAE;MACZ,CAAC;MACDF,IAAI,EAAE;QACJQ,KAAK,EAAEd,cAAc,CAACe;MACxB;IACF,CAAiB;IACjBC,MAAM,EAAE;MACNC,eAAe,EAAEjB,cAAc,CAACkB,aAAa;MAC7CJ,KAAK,EAAEd,cAAc,CAACmB,eAAe;MACrCX,QAAQ,EAAE,EAAE;MACZY,QAAQ,EAAE,EAAE;MACZC,YAAY,EAAE,CAAC;MACfC,WAAW,EAAEtB,cAAc,CAACuB,iBAAiB;MAC7CC,WAAW,EAAE,CAAC;MACdC,gBAAgB,EAAE,CAAC;MACnBlB,UAAU,EAAE,MAAM;MAClBM,cAAc,EAAE,QAAQ;MACxBa,UAAU,EAAE;IACd,CAAa;IACbC,cAAc,EAAE;MACdb,KAAK,EAAEd,cAAc,CAAC4B,qBAAqB;MAC3CX,eAA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AAuB,EAAE,GAAG;MAC5BT,gBAAgB,EAAE,CAAC;MACnBY,eAAe,EAAE;IACnB,CAAC;IACDF,UAAU,EAAC;MACTxB,IAAI,EAAE,CAAC;MACPoB,mBAAmB,EAAE,GAAG;MACxBC,sBAAsB,EAAE,GAAG;MAC3BC,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE,CAAC;MAC1BT,gBAAgB,EAAE;IACpB;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;EACLxB,QAAQ,CAACH,aAAa,GAAG,GAAG,EAAE,EAAE,EAAE;IAChCgC,WAAW,EAAE;MACXC,mBAAmB,EAAE,GAAG;MACxBC,sBAAsB,EAAE,GAAG;MAC3BC,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B,CAAa;IACbC,UAAU,EAAE;MACVxB,IAAI,EAAE,CAAC;MACPoB,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzBC,oBAAoB,EAAE,GAAG;MACzBC,uBAAuB,EAAE;IAC3B;EACF,CAAmB,CAAC;AACtB,CAAC,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { Platform
|
|
3
|
+
import { Platform } from 'react-native';
|
|
4
4
|
import WmTextProps from './text.props';
|
|
5
5
|
import { DEFAULT_CLASS } from './text.styles';
|
|
6
|
+
import { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';
|
|
6
7
|
import { BaseInputComponent, BaseInputState } from "@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component";
|
|
7
8
|
import { isNull } from 'lodash';
|
|
8
9
|
export class WmTextState extends BaseInputState {}
|
|
@@ -15,7 +16,7 @@ export default class WmText extends BaseInputComponent {
|
|
|
15
16
|
let opts = {};
|
|
16
17
|
const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';
|
|
17
18
|
opts[valueExpr] = ((_this$state$textValue = this.state.textValue) === null || _this$state$textValue === void 0 ? void 0 : _this$state$textValue.toString()) || '';
|
|
18
|
-
return /*#__PURE__*/React.createElement(
|
|
19
|
+
return /*#__PURE__*/React.createElement(WMTextInput, _extends({
|
|
19
20
|
ref: ref => {
|
|
20
21
|
this.widgetRef = ref;
|
|
21
22
|
// @ts-ignore
|
|
@@ -38,7 +39,8 @@ export default class WmText extends BaseInputComponent {
|
|
|
38
39
|
onFocus: this.onFocus.bind(this),
|
|
39
40
|
onKeyPress: this.onKeyPress.bind(this),
|
|
40
41
|
onChangeText: this.onChangeText.bind(this),
|
|
41
|
-
onChange: this.invokeChange.bind(this)
|
|
42
|
+
onChange: this.invokeChange.bind(this),
|
|
43
|
+
allowContentSelection: this.styles.text.userSelect === 'text'
|
|
42
44
|
}));
|
|
43
45
|
}
|
|
44
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","
|
|
1
|
+
{"version":3,"names":["React","Platform","WmTextProps","DEFAULT_CLASS","WMTextInput","BaseInputComponent","BaseInputState","isNull","WmTextState","WmText","constructor","props","renderWidget","_this$state$textValue","opts","valueExpr","OS","state","textValue","toString","createElement","_extends","ref","widgetRef","selectionStart","selectionEnd","cursor","placeholderTextColor","styles","placeholderText","color","style","root","isValid","invalid","keyboardType","autoComplete","autocomplete","autoFocus","autofocus","editable","disabled","readonly","secureTextEntry","type","maxLength","maxchars","placeholder","onBlur","bind","onFocus","onKeyPress","onChangeText","onChange","invokeChange","allowContentSelection","text","userSelect"],"sources":["text.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\n\nimport WmTextProps from './text.props';\nimport { DEFAULT_CLASS, WmTextStyles } from './text.styles';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { BaseInputComponent, BaseInputState } from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component\";\nimport { isNull } from 'lodash';\n\nexport class WmTextState extends BaseInputState<WmTextProps> {\n}\n\nexport default class WmText extends BaseInputComponent<WmTextProps, WmTextState, WmTextStyles> {\n\n constructor(props: WmTextProps) {\n super(props, DEFAULT_CLASS, new WmTextProps(), new WmTextState());\n }\n\n renderWidget(props: WmTextProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return (\n <WMTextInput\n ref={(ref: any) => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...opts}\n placeholderTextColor={this.styles.placeholderText.color as any}\n style={[this.styles.root, this.state.isValid ? {} : this.styles.invalid]}\n keyboardType={this.state.keyboardType}\n autoComplete={props.autocomplete ? 'username' : 'off'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n secureTextEntry={props.type === 'password' ? true : false}\n maxLength={props.maxchars}\n placeholder={props.placeholder}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n />\n );\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,cAAc;AAEvC,OAAOC,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAsB,eAAe;AAC3D,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SAASC,kBAAkB,EAAEC,cAAc,QAAQ,0EAA0E;AAC7H,SAASC,MAAM,QAAQ,QAAQ;AAE/B,OAAO,MAAMC,WAAW,SAASF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KAAM;MACtDC,SAAS,EAAE3B,KAAK,CAAC4B,SAAU;MAC3BC,QAAQ,EAAE7B,KAAK,CAAC8B,QAAQ,IAAI9B,KAAK,CAAC+B,QAAQ,GAAG,KAAK,GAAG,IAAK;MAC1DC,eAAe,EAAEhC,KAAK,CAACiC,IAAI,KAAK,UAAU,GAAG,IAAI,GAAG,KAAM;MAC1DC,SAAS,EAAElC,KAAK,CAACmC,QAAS;MAC1BC,WAAW,EAAEpC,KAAK,CAACoC,WAAY;MAC/BC,MAAM,EAAE,IAAI,CAACA,MAAM,CAACC,IAAI,CAAC,IAAI,CAAE;MAC/BC,OAAO,EAAE,IAAI,CAACA,OAAO,CAACD,IAAI,CAAC,IAAI,CAAE;MACjCE,UAAU,EAAE,IAAI,CAACA,UAAU,CAACF,IAAI,CAAC,IAAI,CAAE;MACvCG,YAAY,EAAE,IAAI,CAACA,YAAY,CAACH,IAAI,CAAC,IAAI,CAAE;MAC3CI,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACL,IAAI,CAAC,IAAI,CAAE;MACvCM,qBAAqB,EAAE,IAAI,CAAC3B,MAAM,CAAC4B,IAAI,CAACC,UAAU,KAAK;IAAO,EAC/D,CAAC;EAER;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseInputProps","WmTextProps"],"sources":["text.props.ts"],"sourcesContent":["import BaseInputProps from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.props\";\n\nexport default class WmTextProps extends BaseInputProps {\n placeholder: string = 'Enter text';\n}\n"],"mappings":";;;AAAA,OAAOA,cAAc,MAAM,sEAAsE;AAEjG,eAAe,MAAMC,WAAW,SAASD,cAAc,CAAC;
|
|
1
|
+
{"version":3,"names":["BaseInputProps","WmTextProps","constructor","arguments","_defineProperty"],"sources":["text.props.ts"],"sourcesContent":["import BaseInputProps from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.props\";\n\nexport default class WmTextProps extends BaseInputProps {\n placeholder: string = 'Enter text';\n}\n"],"mappings":";;;AAAA,OAAOA,cAAc,MAAM,sEAAsE;AAEjG,eAAe,MAAMC,WAAW,SAASD,cAAc,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,sBAChC,YAAY;EAAA;AACpC"}
|
|
@@ -35,5 +35,10 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
35
35
|
backgroundColor: themeVariables.inputDisabledBgColor
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
+
addStyle(DEFAULT_CLASS + '-rtl', '', {
|
|
39
|
+
root: {
|
|
40
|
+
textAlign: 'right'
|
|
41
|
+
}
|
|
42
|
+
});
|
|
38
43
|
});
|
|
39
44
|
//# sourceMappingURL=text.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","padding","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","text","fontSize","invalid","borderBottomColor","inputInvalidBorderColor","placeholderText","color","inputPlaceholderColor","skeleton","width","height","inputDisabledBgColor"],"sources":["text.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle, Theme} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {ColorValue} from \"react-native\";\nimport { WmSkeletonStyles } from '../../basic/skeleton/skeleton.styles';\n\nexport type WmTextStyles = BaseStyles & {\n invalid: AllStyle;\n placeholderText: AllStyle;\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-text';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTextStyles = defineStyles({\n root: {\n padding: 12,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n fontFamily: themeVariables.baseFont\n },\n text: {\n fontSize: 16\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n skeleton: {\n root: {\n width: '100%',\n height: 16,\n borderRadius: 4\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAyB,wCAAwC;AAClF,SAAqBC,YAAY,QAAQ,+CAA+C;AAUxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC7CM,IAAI,EAAE;MACJC,OAAO,EAAE,EAAE;MACXC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEP,cAAc,CAACQ,gBAAgB;MAC5CC,eAAe,EAAET,cAAc,CAACU,oBAAoB;MACpDC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAEZ,cAAc,CAACa;IAC7B,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE;IACZ,CAAC;IACDC,OAAO,EAAE;MACPC,iBAAiB,EAAEjB,cAAc,CAACkB;IACpC,CAAC;IACDC,eAAe,EAAE;MACjBC,KAAK,EAAEpB,cAAc,CAACqB;IACtB,CAAC;IACDC,QAAQ,EAAE;MACRnB,IAAI,EAAE;QACJoB,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,EAAE;QACVb,YAAY,EAAE;MAChB;IACF;EACJ,CAAC,CAAC;EAEFV,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLM,eAAe,EAAET,cAAc,CAACyB;IAClC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","padding","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","text","fontSize","invalid","borderBottomColor","inputInvalidBorderColor","placeholderText","color","inputPlaceholderColor","skeleton","width","height","inputDisabledBgColor","textAlign"],"sources":["text.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle, Theme} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {ColorValue} from \"react-native\";\nimport { WmSkeletonStyles } from '../../basic/skeleton/skeleton.styles';\n\nexport type WmTextStyles = BaseStyles & {\n invalid: AllStyle;\n placeholderText: AllStyle;\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-text';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTextStyles = defineStyles({\n root: {\n padding: 12,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n fontFamily: themeVariables.baseFont\n },\n text: {\n fontSize: 16\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n skeleton: {\n root: {\n width: '100%',\n height: 16,\n borderRadius: 4\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root:{\n textAlign: 'right'\n }\n })\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAyB,wCAAwC;AAClF,SAAqBC,YAAY,QAAQ,+CAA+C;AAUxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC7CM,IAAI,EAAE;MACJC,OAAO,EAAE,EAAE;MACXC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEP,cAAc,CAACQ,gBAAgB;MAC5CC,eAAe,EAAET,cAAc,CAACU,oBAAoB;MACpDC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAEZ,cAAc,CAACa;IAC7B,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE;IACZ,CAAC;IACDC,OAAO,EAAE;MACPC,iBAAiB,EAAEjB,cAAc,CAACkB;IACpC,CAAC;IACDC,eAAe,EAAE;MACjBC,KAAK,EAAEpB,cAAc,CAACqB;IACtB,CAAC;IACDC,QAAQ,EAAE;MACRnB,IAAI,EAAE;QACJoB,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,EAAE;QACVb,YAAY,EAAE;MAChB;IACF;EACJ,CAAC,CAAC;EAEFV,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLM,eAAe,EAAET,cAAc,CAACyB;IAClC;EACJ,CAAC,CAAC;EACFxB,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACjCK,IAAI,EAAC;MACHuB,SAAS,EAAE;IACb;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { Platform
|
|
3
|
+
import { Platform } from 'react-native';
|
|
4
4
|
import WmTextareaProps from './textarea.props';
|
|
5
5
|
import { DEFAULT_CLASS } from './textarea.styles';
|
|
6
6
|
import { BaseInputComponent, BaseInputState } from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component';
|
|
7
|
+
import { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';
|
|
7
8
|
import { isNull } from 'lodash';
|
|
8
9
|
export class WmTextareaState extends BaseInputState {}
|
|
9
10
|
export default class WmTextarea extends BaseInputComponent {
|
|
@@ -15,7 +16,7 @@ export default class WmTextarea extends BaseInputComponent {
|
|
|
15
16
|
let opts = {};
|
|
16
17
|
const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';
|
|
17
18
|
opts[valueExpr] = ((_this$state$textValue = this.state.textValue) === null || _this$state$textValue === void 0 ? void 0 : _this$state$textValue.toString()) || '';
|
|
18
|
-
return /*#__PURE__*/React.createElement(
|
|
19
|
+
return /*#__PURE__*/React.createElement(WMTextInput, _extends({
|
|
19
20
|
ref: ref => {
|
|
20
21
|
this.widgetRef = ref;
|
|
21
22
|
// @ts-ignore
|
|
@@ -39,7 +40,8 @@ export default class WmTextarea extends BaseInputComponent {
|
|
|
39
40
|
onFocus: this.onFocus.bind(this),
|
|
40
41
|
onKeyPress: this.onKeyPress.bind(this),
|
|
41
42
|
onChangeText: this.onChangeText.bind(this),
|
|
42
|
-
onChange: this.invokeChange.bind(this)
|
|
43
|
+
onChange: this.invokeChange.bind(this),
|
|
44
|
+
allowContentSelection: this.styles.text.userSelect === 'text'
|
|
43
45
|
}));
|
|
44
46
|
}
|
|
45
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","
|
|
1
|
+
{"version":3,"names":["React","Platform","WmTextareaProps","DEFAULT_CLASS","BaseInputComponent","BaseInputState","WMTextInput","isNull","WmTextareaState","WmTextarea","constructor","props","renderWidget","_this$state$textValue","opts","valueExpr","OS","state","textValue","toString","createElement","_extends","ref","widgetRef","selectionStart","selectionEnd","cursor","placeholderTextColor","styles","placeholderText","color","style","root","text","isValid","invalid","multiline","numberOfLines","keyboardType","autoComplete","autocomplete","autoFocus","autofocus","editable","disabled","readonly","maxLength","maxchars","placeholder","onBlur","bind","onFocus","onKeyPress","onChangeText","onChange","invokeChange","allowContentSelection","userSelect"],"sources":["textarea.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, TextInput, View } from 'react-native';\nimport WmTextareaProps from './textarea.props';\nimport { DEFAULT_CLASS, WmTextareaStyles } from './textarea.styles';\nimport {\n BaseInputComponent,\n BaseInputState\n} from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { isNull } from 'lodash';\n\nexport class WmTextareaState extends BaseInputState<WmTextareaProps> {}\n\nexport default class WmTextarea extends BaseInputComponent<WmTextareaProps, WmTextareaState, WmTextareaStyles> {\n\n constructor(props: WmTextareaProps) {\n super(props, DEFAULT_CLASS, new WmTextareaProps(), new WmTextareaState());\n }\n\n renderWidget(props: WmTextareaProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return ( <WMTextInput\n ref={(ref: any) => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n placeholderTextColor={this.styles.placeholderText.color as any}\n style={[this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid]}\n multiline={true}\n numberOfLines={4}\n keyboardType={this.state.keyboardType}\n {...opts}\n autoComplete={props.autocomplete ? 'username' : 'off'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n maxLength={props.maxchars}\n placeholder={props.placeholder || 'Place your text'}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n />);\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAyB,cAAc;AACxD,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,kBAAkB,EAClBC,cAAc,QACT,0EAA0E;AACjF,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SAASC,MAAM,QAAQ,QAAQ;AAE/B,OAAO,MAAMC,eAAe,SAASH,cAAc,CAAkB;AAErE,eAAe,MAAMI,UAAU,SAASL,kBAAkB,CAAqD;EAE7GM,WAAWA,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,EAAE,IAAIM,eAAe,CAAC,CAAC,CAAC;EAC3E;EAEAI,YAAYA,CAACD,KAAsB,EAAE;IAAA,IAAAE,qBAAA;IACnC,IAAIC,IAAS,GAAG,CAAC,CAAC;IAClB,MAAMC,SAAS,GAAGd,QAAQ,CAACe,EAAE,KAAK,KAAK,GAAG,OAAO,GAAG,cAAc;IAClEF,IAAI,CAACC,SAAS,CAAC,GAAG,EAAAF,qBAAA,OAAI,CAACI,KAAK,CAACC,SAAS,cAAAL,qBAAA,uBAApBA,qBAAA,CAAsBM,QAAQ,CAAC,CAAC,KAAI,EAAE;IACxD,oBAASnB,KAAA,CAAAoB,aAAA,CAACd,WAAW,EAAAe,QAAA;MACnBC,GAAG,EAAGA,GAAQ,IAAK;QAAC,IAAI,CAACC,SAAS,GAAGD,GAAG;QACtC;QACA,IAAIA,GAAG,IAAI,CAACf,MAAM,CAACe,GAAG,CAACE,cAAc,CAAC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UAAU,KAAK;IAAO,EAC/D,CAAC;EACJ;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseInputProps","WmTextareaProps"],"sources":["textarea.props.ts"],"sourcesContent":["import BaseInputProps from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.props';\n\nexport default class WmTextareaProps extends BaseInputProps {\n placeholder: string = 'Place your text';\n}\n"],"mappings":";;;AAAA,OAAOA,cAAc,MAAM,sEAAsE;AAEjG,eAAe,MAAMC,eAAe,SAASD,cAAc,CAAC;
|
|
1
|
+
{"version":3,"names":["BaseInputProps","WmTextareaProps","constructor","arguments","_defineProperty"],"sources":["textarea.props.ts"],"sourcesContent":["import BaseInputProps from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.props';\n\nexport default class WmTextareaProps extends BaseInputProps {\n placeholder: string = 'Place your text';\n}\n"],"mappings":";;;AAAA,OAAOA,cAAc,MAAM,sEAAsE;AAEjG,eAAe,MAAMC,eAAe,SAASD,cAAc,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,sBACpC,iBAAiB;EAAA;AACzC"}
|