@wavemaker/app-rn-runtime 11.4.0-next.28152 → 11.4.0-next.28701
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.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.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.map +1 -1
- 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 +1 -1
- 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.map +1 -1
- app-rn-runtime/components/chart/theme/chart.theme.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +63 -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 +42 -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.map +1 -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 +2 -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.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 +1 -2
- 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.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/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 +3 -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 +30 -30
- 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 +4 -4
- 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 +53 -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/model-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +8 -3
- 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","BaseComponent","BaseComponentState","WmCompositeProps","DEFAULT_CLASS","WmCompositeState","WmComposite","constructor","props","renderWidget","styles","root","_background","children"],"sources":["composite.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCompositeProps from './composite.props';\nimport { DEFAULT_CLASS, WmCompositeStyles } from './composite.styles';\n\nexport class WmCompositeState extends BaseComponentState<WmCompositeProps> {}\n\nexport default class WmComposite extends BaseComponent<WmCompositeProps, WmCompositeState, WmCompositeStyles> {\n\n constructor(props: WmCompositeProps) {\n super(props, DEFAULT_CLASS, new WmCompositeProps());\n }\n\n renderWidget(props: WmCompositeProps) {\n return (<View style={this.styles.root}>{this._background}{props.children}</View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AAErE,OAAO,MAAMC,gBAAgB,SAASH,kBAAkB,CAAmB;AAE3E,eAAe,MAAMI,WAAW,SAASL,aAAa,CAAwD;EAE5GM,
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmCompositeProps","DEFAULT_CLASS","WmCompositeState","WmComposite","constructor","props","renderWidget","createElement","style","styles","root","_background","children"],"sources":["composite.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCompositeProps from './composite.props';\nimport { DEFAULT_CLASS, WmCompositeStyles } from './composite.styles';\n\nexport class WmCompositeState extends BaseComponentState<WmCompositeProps> {}\n\nexport default class WmComposite extends BaseComponent<WmCompositeProps, WmCompositeState, WmCompositeStyles> {\n\n constructor(props: WmCompositeProps) {\n super(props, DEFAULT_CLASS, new WmCompositeProps());\n }\n\n renderWidget(props: WmCompositeProps) {\n return (<View style={this.styles.root}>{this._background}{props.children}</View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AAErE,OAAO,MAAMC,gBAAgB,SAASH,kBAAkB,CAAmB;AAE3E,eAAe,MAAMI,WAAW,SAASL,aAAa,CAAwD;EAE5GM,WAAWA,CAACC,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,gBAAgB,CAAC,CAAC,CAAC;EACrD;EAEAM,YAAYA,CAACD,KAAuB,EAAE;IACpC,oBAAQT,KAAA,CAAAW,aAAA,CAACV,IAAI;MAACW,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAEN,KAAK,CAACO,QAAe,CAAC;EAClF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseProps","WmCompositeProps"],"sources":["composite.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmCompositeProps extends BaseProps {\n children: any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,gBAAgB,SAASD,SAAS,CAAC;
|
|
1
|
+
{"version":3,"names":["BaseProps","WmCompositeProps","constructor","arguments","_defineProperty"],"sources":["composite.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmCompositeProps extends BaseProps {\n children: any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,gBAAgB,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;EAAA;AAExD"}
|
|
@@ -3,9 +3,10 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
3
3
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
4
4
|
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); }
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { View, Text,
|
|
6
|
+
import { View, Text, Platform } from 'react-native';
|
|
7
7
|
import WmCurrencyProps from './currency.props';
|
|
8
8
|
import { CURRENCY_INFO } from '@wavemaker/app-rn-runtime/core/currency-constants';
|
|
9
|
+
import { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';
|
|
9
10
|
import { DEFAULT_CLASS } from './currency.styles';
|
|
10
11
|
import { BaseNumberComponent, BaseNumberState } from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.component';
|
|
11
12
|
import { isNull } from "lodash";
|
|
@@ -42,7 +43,7 @@ export default class WmCurrency extends BaseNumberComponent {
|
|
|
42
43
|
style: this.styles.labelWrapper
|
|
43
44
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
44
45
|
style: this.styles.label
|
|
45
|
-
}, this.state.currencySymbol)), /*#__PURE__*/React.createElement(
|
|
46
|
+
}, this.state.currencySymbol)), /*#__PURE__*/React.createElement(WMTextInput, _extends({
|
|
46
47
|
ref: ref => {
|
|
47
48
|
this.widgetRef = ref;
|
|
48
49
|
// @ts-ignore
|
|
@@ -56,12 +57,13 @@ export default class WmCurrency extends BaseNumberComponent {
|
|
|
56
57
|
style: [this.styles.input, this.styles.text, this.state.isValid ? {} : this.styles.invalid]
|
|
57
58
|
}, opts, {
|
|
58
59
|
editable: props.disabled || props.readonly ? false : true,
|
|
59
|
-
placeholder: props.placeholder
|
|
60
|
+
placeholder: props.placeholder,
|
|
60
61
|
onBlur: this.onBlur.bind(this),
|
|
61
62
|
onFocus: this.onFocus.bind(this),
|
|
62
63
|
onKeyPress: this.validateInputEntry.bind(this),
|
|
63
64
|
onChangeText: this.onChangeText.bind(this),
|
|
64
|
-
onChange: this.invokeChange.bind(this)
|
|
65
|
+
onChange: this.invokeChange.bind(this),
|
|
66
|
+
allowContentSelection: this.styles.text.userSelect === 'text'
|
|
65
67
|
})));
|
|
66
68
|
}
|
|
67
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","
|
|
1
|
+
{"version":3,"names":["React","View","Text","Platform","WmCurrencyProps","CURRENCY_INFO","WMTextInput","DEFAULT_CLASS","BaseNumberComponent","BaseNumberState","isNull","WmCurrencyState","constructor","arguments","_defineProperty","WmCurrency","props","onPropertyChange","name","$new","$old","updateState","currencySymbol","symbol","renderWidget","_this$state$textValue","opts","valueExpr","OS","state","textValue","toString","createElement","style","styles","root","labelWrapper","label","_extends","ref","widgetRef","selectionStart","selectionEnd","cursor","keyboardType","placeholderTextColor","placeholderText","color","input","text","isValid","invalid","editable","disabled","readonly","placeholder","onBlur","bind","onFocus","onKeyPress","validateInputEntry","onChangeText","onChange","invokeChange","allowContentSelection","userSelect"],"sources":["currency.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, Platform } from 'react-native';\n\nimport WmCurrencyProps from './currency.props';\nimport { CURRENCY_INFO } from '@wavemaker/app-rn-runtime/core/currency-constants';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { DEFAULT_CLASS, WmCurrencyStyles } from './currency.styles';\nimport {\n BaseNumberComponent,\n BaseNumberState\n} from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.component';\nimport { isNull } from \"lodash\";\nexport class WmCurrencyState extends BaseNumberState<WmCurrencyProps> {\n currencySymbol: any;\n}\n\nexport default class WmCurrency extends BaseNumberComponent<WmCurrencyProps, WmCurrencyState, WmCurrencyStyles> {\n\n constructor(props: WmCurrencyProps) {\n super(props, DEFAULT_CLASS, new WmCurrencyProps(), new WmCurrencyState());\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'currency':\n if ($new) {\n this.updateState({\n currencySymbol: CURRENCY_INFO[$new].symbol,\n } as WmCurrencyState);\n }\n break;\n\n }\n }\n\n renderWidget(props: WmCurrencyProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return (<View style={this.styles.root}>\n <View style={this.styles.labelWrapper}>\n <Text style={this.styles.label}>{this.state.currencySymbol}</Text></View>\n <WMTextInput\n ref={(ref: any) => {\n 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 }}\n keyboardType=\"numeric\"\n placeholderTextColor={this.styles.placeholderText.color as any}\n style={[this.styles.input, this.styles.text, this.state.isValid ? {} : this.styles.invalid]}\n {...opts}\n editable={props.disabled || props.readonly ? false : true}\n placeholder={props.placeholder}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.validateInputEntry.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n />\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AAEnD,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAAQ,mDAAmD;AACjF,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,mBAAmB,EACnBC,eAAe,QACV,4EAA4E;AACnF,SAASC,MAAM,QAAQ,QAAQ;AAC/B,OAAO,MAAMC,eAAe,SAASF,eAAe,CAAkB;EAAAG,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;EAAA;AAEtE;AAEA,eAAe,MAAMC,UAAU,SAASP,mBAAmB,CAAqD;EAE9GI,WAAWA,CAACI,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAET,aAAa,EAAE,IAAIH,eAAe,CAAC,CAAC,EAAE,IAAIO,eAAe,CAAC,CAAC,CAAC;EAC3E;EAEAM,gBAAgBA,CAACC,IAAY,EAAEC,IAAS,EAAEC,IAAS,EAAE;IACnD,KAAK,CAACH,gBAAgB,CAACC,IAAI,EAAEC,IAAI,EAAEC,IAAI,CAAC;IACxC,QAAQF,IAAI;MACV,KAAK,UAAU;QACb,IAAIC,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AAe,CAACC,KAAa;MAC/Dd,KAAK,EAAE,CAAC,IAAI,CAACC,MAAM,CAACc,KAAK,EAAE,IAAI,CAACd,MAAM,CAACe,IAAI,EAAE,IAAI,CAACpB,KAAK,CAACqB,OAAO,GAAG,CAAC,CAAC,GAAG,IAAI,CAAChB,MAAM,CAACiB,OAAO;IAAE,GACxFzB,IAAI;MACR0B,QAAQ,EAAEpC,KAAK,CAACqC,QAAQ,IAAIrC,KAAK,CAACsC,QAAQ,GAAG,KAAK,GAAG,IAAK;MAC1DC,WAAW,EAAEvC,KAAK,CAACuC,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,CAACC,kBAAkB,CAACH,IAAI,CAAC,IAAI,CAAE;MAC/CI,YAAY,EAAE,IAAI,CAACA,YAAY,CAACJ,IAAI,CAAC,IAAI,CAAE;MAC3CK,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACN,IAAI,CAAC,IAAI,CAAE;MACvCO,qBAAqB,EAAE,IAAI,CAAC9B,MAAM,CAACe,IAAI,CAACgB,UAAU,KAAK;IAAO,EAC/D,CACG,CAAC;EACT;AACF"}
|
|
@@ -6,7 +6,7 @@ export default class WmCurrencyProps extends BaseNumberProps {
|
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
8
8
|
_defineProperty(this, "currency", void 0);
|
|
9
|
-
_defineProperty(this, "placeholder", '
|
|
9
|
+
_defineProperty(this, "placeholder", '');
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=currency.props.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseNumberProps","WmCurrencyProps"],"sources":["currency.props.ts"],"sourcesContent":["import BaseNumberProps from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.props';\n\nexport default class WmCurrencyProps extends BaseNumberProps {\n currency: any;\n placeholder: string = '
|
|
1
|
+
{"version":3,"names":["BaseNumberProps","WmCurrencyProps","constructor","arguments","_defineProperty"],"sources":["currency.props.ts"],"sourcesContent":["import BaseNumberProps from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.props';\n\nexport default class WmCurrencyProps extends BaseNumberProps {\n currency: any;\n placeholder: string = '';\n}\n"],"mappings":";;;AAAA,OAAOA,eAAe,MAAM,wEAAwE;AAEpG,eAAe,MAAMC,eAAe,SAASD,eAAe,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;IAAAA,eAAA,sBAErC,EAAE;EAAA;AAC1B"}
|
|
@@ -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-currency';
|
|
4
5
|
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
5
6
|
const defaultStyles = defineStyles({
|
|
@@ -46,6 +47,14 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
46
47
|
}
|
|
47
48
|
});
|
|
48
49
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
|
50
|
+
addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS == "web" ? {
|
|
51
|
+
labelWrapper: {
|
|
52
|
+
borderTopLeftRadius: 0,
|
|
53
|
+
borderBottomLeftRadius: 0,
|
|
54
|
+
borderTopRightRadius: 6,
|
|
55
|
+
borderBottomRightRadius: 6
|
|
56
|
+
}
|
|
57
|
+
} : {});
|
|
49
58
|
addStyle(DEFAULT_CLASS + '-disabled', '', {
|
|
50
59
|
root: {
|
|
51
60
|
backgroundColor: themeVariables.inputDisabledBgColor
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","flexDirection","text","fontSize","input","height","padding","flex","transparent","labelWrapper","primaryColor","borderTopLeftRadius","borderBottomLeftRadius","width","label","color","primaryContrastColor","textAlignVertical","textAlign","fontWeight","fontFamily","baseFont","invalid","borderBottomColor","inputInvalidBorderColor","placeholderText","inputPlaceholderColor","inputDisabledBgColor"],"sources":["currency.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';\n\nexport type WmCurrencyStyles = BaseStyles & {\n label: AllStyle;\n invalid: AllStyle;\n placeholderText: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-currency';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCurrencyStyles = defineStyles({\n root: {\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n flexDirection: 'row'\n },\n text: {\n fontSize: 16\n },\n input : {\n height: '100%',\n padding: 12,\n flex: 1,\n borderWidth: 1,\n borderColor: themeVariables.transparent,\n borderStyle: 'solid'\n },\n labelWrapper: {\n height: '100%',\n backgroundColor: themeVariables.primaryColor,\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n width: 48,\n padding: 12,\n },\n label: {\n color: themeVariables.primaryContrastColor,\n textAlignVertical: 'center',\n textAlign: 'center',\n fontWeight: 'bold',\n fontFamily: themeVariables.baseFont,\n fontSize: 16\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n }\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,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","flexDirection","text","fontSize","input","height","padding","flex","transparent","labelWrapper","primaryColor","borderTopLeftRadius","borderBottomLeftRadius","width","label","color","primaryContrastColor","textAlignVertical","textAlign","fontWeight","fontFamily","baseFont","invalid","borderBottomColor","inputInvalidBorderColor","placeholderText","inputPlaceholderColor","OS","borderTopRightRadius","borderBottomRightRadius","inputDisabledBgColor"],"sources":["currency.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 { Platform } from 'react-native';\n\nexport type WmCurrencyStyles = BaseStyles & {\n label: AllStyle;\n invalid: AllStyle;\n placeholderText: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-currency';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCurrencyStyles = defineStyles({\n root: {\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n flexDirection: 'row'\n },\n text: {\n fontSize: 16\n },\n input : {\n height: '100%',\n padding: 12,\n flex: 1,\n borderWidth: 1,\n borderColor: themeVariables.transparent,\n borderStyle: 'solid'\n },\n labelWrapper: {\n height: '100%',\n backgroundColor: themeVariables.primaryColor,\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n width: 48,\n padding: 12,\n },\n label: {\n color: themeVariables.primaryContrastColor,\n textAlignVertical: 'center',\n textAlign: 'center',\n fontWeight: 'bold',\n fontFamily: themeVariables.baseFont,\n fontSize: 16\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n labelWrapper:{\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n }\n }:{});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AACxF,SAASC,QAAQ,QAAQ,cAAc;AAQvC,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA+B,GAAGN,YAAY,CAAC;IACjDO,IAAI,EAAE;MACJC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEN,cAAc,CAACO,gBAAgB;MAC5CC,eAAe,EAAER,cAAc,CAACS,oBAAoB;MACpDC,YAAY,EAAE,CAAC;MACfC,aAAa,EAAE;IACjB,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE;IACZ,CAAC;IACDC,KAAK,EAAG;MACNC,MAAM,EAAE,MAAM;MACdC,OAAO,EAAE,EAAE;MACXC,IAAI,EAAE,CAAC;MACPb,WAAW,EAAE,CAAC;MACdE,WAAW,EAAEN,cAAc,CAACkB,WAAW;MACvCb,WAAW,EAAE;IACf,CAAC;IACDc,YAAY,EAAE;MACZJ,MAAM,EAAE,MAAM;MACdP,eAAe,EAAER,cAAc,CAACoB,YAAY;MAC5CC,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzBC,KAAK,EAAE,EAAE;MACTP,OAAO,EAAE;IACX,CAAC;IACDQ,KAAK,EAAE;MACLC,KAAK,EAAEzB,cAAc,CAAC0B,oBAAoB;MAC1CC,iBAAiB,EAAE,QAAQ;MAC3BC,SAAS,EAAE,QAAQ;MACnBC,UAAU,EAAE,MAAM;MAClBC,UAAU,EAAE9B,cAAc,CAAC+B,QAAQ;MACnClB,QAAQ,EAAE;IACZ,CAAC;IACDmB,OAAO,EAAE;MACPC,iBAAiB,EAAEjC,cAAc,CAACkC;IACpC,CAAC;IACDC,eAAe,EAAE;MACfV,KAAK,EAAEzB,cAAc,CAACoC;IACxB;EACJ,CAAC,CAAC;EAEFnC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAED,QAAQ,CAACwC,EAAE,IAAE,KAAK,GAAC;IACtDlB,YAAY,EAAC;MACXE,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzBgB,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;EACLtC,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLK,eAAe,EAAER,cAAc,CAACwC;IAClC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -245,9 +245,12 @@ export default class BaseDatetime extends BaseComponent {
|
|
|
245
245
|
style: this.styles.container
|
|
246
246
|
}, this.addTouchableOpacity(props, /*#__PURE__*/React.createElement(Text, {
|
|
247
247
|
style: [this.styles.text, this.state.displayValue ? {} : this.styles.placeholderText]
|
|
248
|
-
}, this.state.displayValue || this.state.props.placeholder), {
|
|
248
|
+
}, this.state.displayValue || this.state.props.placeholder), [{
|
|
249
249
|
flex: 1
|
|
250
|
-
}
|
|
250
|
+
}, this.isRTL ? {
|
|
251
|
+
flexDirection: 'row',
|
|
252
|
+
textAlign: 'right'
|
|
253
|
+
} : {}]), !props.readonly && props.datavalue && /*#__PURE__*/React.createElement(WmIcon, {
|
|
251
254
|
iconclass: "wi wi-clear",
|
|
252
255
|
styles: {
|
|
253
256
|
color: this.styles.text.color,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","Platform","TouchableOpacity","moment","DateTimePicker","BaseComponent","BaseComponentState","WmIcon","WmDatetimeProps","DEFAULT_CLASS","WebDatePicker","isNumber","isString","ModalConsumer","validateField","BaseDatetimeState","CURRENT_DATE","CURRENT_TIME","BaseDatetime","constructor","props","defaultClass","defaultProps","defaultState","format","date","Date","getTime","parse","parseInt","toDate","monitorAndUpdateCurrentTime","stopCurrentTimeMonitor","timerId","setInterval","updateState","readonly","datavalue","now","state","clearInterval","onPropertyChange","name","$new","$old","invokeEventCallback","prevDatavalue","outputformat","datepattern","dateValue","displayValue","onFieldChange","minDateVal","mindate","maxDateVal","maxdate","disabled","onDateChange","$event","validate","modes","shift","isFocused","showDatePicker","length","timestamp","onBlur","OS","setTimeout","triggerValidation","onFocus","mode","value","validationObj","setState","isValid","errorType","componentWillUnmount","renderWebWidget","locale","renderNativeWidget","onDismiss","event","dateSelected","set","getMonth","getFullYear","getDate","renderNativeWidgetWithModal","modalService","nativeModalOptions","content","hideModal","centered","onClose","showModal","addTouchableOpacity","children","styles","getIcon","renderWidget","root","invalid","focused","_background","container","text","placeholderText","placeholder","flex","color","clearIcon","clearBtnClicked","calendarIcon"],"sources":["base-datetime.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, Platform, TouchableOpacity } from 'react-native';\nimport moment from 'moment';\nimport DateTimePicker, { DateTimePickerEvent } from '@react-native-community/datetimepicker';\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 WmDatetimeProps from './datetime/datetime.props';\nimport { DEFAULT_CLASS, WmDatetimeStyles } from './datetime/datetime.styles';\nimport WebDatePicker from './date-picker.component';\nimport { isNumber, isString } from 'lodash-es';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport { validateField } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class BaseDatetimeState extends BaseComponentState<WmDatetimeProps> {\n showDatePicker = false;\n dateValue: Date = null as any;\n displayValue: string = null as any;\n isFocused = false;\n timerId: NodeJS.Timer = null as any;\n isValid: boolean = true;\n errorType = '';\n}\n\nconst CURRENT_DATE = 'CURRENT_DATE';\nconst CURRENT_TIME = 'CURRENT_TIME';\n\nexport default abstract class BaseDatetime extends BaseComponent<WmDatetimeProps, BaseDatetimeState, WmDatetimeStyles> {\n clearBtnClicked = false;\n modes = [] as string[];\n nativeModalOptions: ModalOptions = {} as any;\n prevDatavalue: any;\n\n constructor(props: WmDatetimeProps, defaultClass = DEFAULT_CLASS, defaultProps = new WmDatetimeProps(), defaultState= new BaseDatetimeState()) {\n super(props, defaultClass, defaultProps, defaultState);\n }\n\n format(date: Date | number | undefined, format: string) {\n if (format === 'timestamp') {\n return date instanceof Date ? '' + date.getTime() : date;\n }\n return date && moment(date).format(format);\n }\n\n parse(date: string | number, format: string) {\n if (format === 'timestamp') {\n if (isString(date)) {\n return new Date(parseInt(date));\n }\n if (isNumber(date)) {\n return new Date(date);\n }\n }\n return date && moment(date, format).toDate();\n }\n\n private monitorAndUpdateCurrentTime() {\n this.stopCurrentTimeMonitor();\n const timerId = setInterval(() => {\n this.updateState({\n props: {\n readonly: true,\n datavalue: Date.now()\n },\n timerId: timerId\n } as BaseDatetimeState);\n }, 1000);\n }\n\n private stopCurrentTimeMonitor() {\n if (this.state.timerId) {\n clearInterval(this.state.timerId);\n }\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n const props = this.state.props;\n switch(name) {\n //@ts-ignore\n case 'datavalue':\n this.invokeEventCallback('onChange', [null, this, $new, $old]);\n this.prevDatavalue = $old;\n if (props.datavalue === CURRENT_TIME) {\n this.monitorAndUpdateCurrentTime();\n }\n case 'datepattern':\n case 'outputformat':\n if (props.datavalue && props.outputformat && props.datepattern) {\n if (props.datavalue === CURRENT_DATE || props.datavalue === CURRENT_TIME) {\n props.datavalue = this.format(new Date(), props.outputformat);\n }\n const date = isString(props.datavalue) ? this.parse(props.datavalue as string, props.outputformat) : props.datavalue;\n this.updateState({\n dateValue : date,\n displayValue: this.format(date as any, props.datepattern)\n } as BaseDatetimeState);\n } else {\n this.updateState({\n dateValue : null as any,\n displayValue: null as any\n } as BaseDatetimeState);\n }\n this.props.onFieldChange && this.props.onFieldChange('datavalue', props.datavalue, this.prevDatavalue);\n break;\n case 'mindate':\n if (isString($new)) {\n const minDateVal = ($new === CURRENT_DATE || $new === CURRENT_TIME) ? new Date() : props.mindate;\n this.updateState({\n props: {\n mindate: moment(minDateVal, props.datepattern).toDate()\n }\n } as BaseDatetimeState);\n }\n break;\n case 'maxdate':\n if (isString($new)) {\n const maxDateVal = ($new === CURRENT_DATE || $new === CURRENT_TIME) ? new Date() : props.maxdate;\n this.updateState({\n props: {\n maxdate: moment(maxDateVal, props.datepattern).toDate()\n }\n } as BaseDatetimeState);\n }\n break;\n case 'readonly':\n this.updateState({\n props: {\n disabled: $new\n }\n } as BaseDatetimeState)\n break;\n }\n }\n\n onDateChange($event: DateTimePickerEvent, date?: Date) {\n this.validate(date);\n this.modes.shift();\n this.updateState({\n isFocused: false,\n showDatePicker: !!this.modes.length,\n props: {\n datavalue: this.format(date, this.state.props.outputformat as string),\n timestamp: this.format(date, 'timestamp')\n }\n } as BaseDatetimeState);\n }\n\n onBlur() {\n if (Platform.OS === 'web') {\n this.validate(this.state.props.datavalue);\n setTimeout(() => this.props.triggerValidation && this.props.triggerValidation());\n }\n this.invokeEventCallback('onBlur', [null, this]);\n }\n\n onFocus() {\n if (!this.state.props.readonly) {\n if (Platform.OS !== 'web' && this.state.props.mode === 'datetime') {\n this.modes = ['date', 'time'];\n } else {\n this.modes = [this.state.props.mode];\n }\n this.updateState({showDatePicker: true, isFocused: true} as BaseDatetimeState);\n this.invokeEventCallback('onFocus', [null, this]);\n }\n }\n\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.setState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as BaseDatetimeState)\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n this.stopCurrentTimeMonitor();\n }\n\n renderWebWidget(props: WmDatetimeProps) {\n return (<WebDatePicker\n mode={this.state.props.mode}\n locale={props.locale}\n value={this.state.dateValue || new Date()}\n onDateChange={(date: Date) => this.onDateChange(null as any, date)}\n onDismiss={() =>\n this.updateState({\n isFocused: false,\n showDatePicker: false\n } as BaseDatetimeState, () => this.onBlur())}\n minimumDate={props.mindate as Date}\n maximumDate={props.maxdate as Date}/>);\n }\n\n renderNativeWidget(props: WmDatetimeProps, onDismiss?: Function) {\n return (<DateTimePicker\n mode={this.modes[0] as any}\n value={this.state.dateValue || new Date()}\n is24Hour={true}\n display={Platform.OS === 'ios' ? 'spinner': 'default'}\n onChange={(event: DateTimePickerEvent, date?: Date) => {\n if (date && this.state.props.mode === 'datetime' && this.modes[0] === 'time') {\n const dateSelected = this.state.dateValue;\n date = moment(date)\n .set('month', dateSelected.getMonth())\n .set('year', dateSelected.getFullYear())\n .set('date', dateSelected.getDate())\n .toDate();\n }\n this.onDateChange(event, date || this.state.dateValue);\n if (this.modes.length <= 1) {\n this.onBlur();\n onDismiss && onDismiss();\n }\n }}\n minimumDate={props.mindate as Date}\n maximumDate={props.maxdate as Date}\n />\n );\n }\n\n renderNativeWidgetWithModal(props: WmDatetimeProps) {\n return (<ModalConsumer>{(modalService: ModalService) => {\n this.nativeModalOptions.content = (<>\n {this.renderNativeWidget(props, () => modalService.hideModal(this.nativeModalOptions))}\n </>);\n this.nativeModalOptions.centered = true;\n this.nativeModalOptions.onClose = () => {\n this.onBlur();\n };\n modalService.showModal(this.nativeModalOptions);\n return null;\n }}</ModalConsumer>);\n }\n\n addTouchableOpacity(props: WmDatetimeProps, children: React.ReactNode, styles?: any) : React.ReactNode{\n return (\n <TouchableOpacity style={styles} onPress={() => {\n if (!props.readonly) {\n this.onFocus();\n }\n this.invokeEventCallback('onTap', [null, this]);\n }}>\n {children}\n </TouchableOpacity>\n );\n }\n\n getIcon() {\n if (this.state.props.mode === 'time') {\n return 'wm-sl-l sl-time'\n }\n return 'wm-sl-l sl-calendar';\n }\n\n renderWidget(props: WmDatetimeProps) {\n return ( \n this.addTouchableOpacity(props, (\n <View style={[this.styles.root, this.state.isValid ? {} : this.styles.invalid, this.state.isFocused ? this.styles.focused : null]}>\n {this._background}\n <View style={this.styles.container}>\n {this.addTouchableOpacity(props, (\n <Text style={[\n this.styles.text,\n this.state.displayValue ? {} : this.styles.placeholderText\n ]}>{this.state.displayValue || this.state.props.placeholder}</Text>\n ), { flex: 1 })}\n {(!props.readonly && props.datavalue &&\n (<WmIcon iconclass=\"wi wi-clear\"\n styles={{color: this.styles.text.color, ...this.styles.clearIcon}}\n onTap={() => {\n this.onDateChange(null as any, null as any);\n this.clearBtnClicked = true;\n }}/>)) || null}\n {this.addTouchableOpacity(props, (\n <WmIcon iconclass={this.getIcon()} styles={{color: this.styles.text.color, ...this.styles.calendarIcon}}/>\n ))}\n </View>\n {\n this.state.showDatePicker\n && ((Platform.OS === 'web' && this.renderWebWidget(props))\n || (Platform.OS === 'android' && this.renderNativeWidget(props))\n || (Platform.OS === 'ios' && this.renderNativeWidget(props)))\n }\n </View>\n ))\n );\n }\n}\n\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,gBAAgB,QAAQ,cAAc;AACrE,OAAOC,MAAM,MAAM,QAAQ;AAC3B,OAAOC,cAAc,MAA+B,wCAAwC;AAC5F,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MA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B;IAAE,EAAG,IAAK,IAAI,EACf,IAAI,CAAChB,mBAAmB,CAAC5E,KAAK,eAC7B,oBAAC,MAAM;MAAC,SAAS,EAAE,IAAI,CAAC+E,OAAO,EAAG;MAAC,MAAM,EAAE;QAACW,KAAK,EAAE,IAAI,CAACZ,MAAM,CAACQ,IAAI,CAACI,KAAK;QAAE,GAAG,IAAI,CAACZ,MAAM,CAACe;MAAY;IAAE,EAAE,CAC1G,CACG,EAEP,IAAI,CAAC1E,KAAK,CAACwB,cAAc,KACpB9D,QAAQ,CAACkE,EAAE,KAAK,KAAK,IAAI,IAAI,CAACW,eAAe,CAAC1D,KAAK,CAAC,IACnDnB,QAAQ,CAACkE,EAAE,KAAK,SAAS,IAAI,IAAI,CAACa,kBAAkB,CAAC5D,KAAK,CAAE,IAC5DnB,QAAQ,CAACkE,EAAE,KAAK,KAAK,IAAI,IAAI,CAACa,kBAAkB,CAAC5D,KAAK,CAAE,CAAC,CAE5D,CACL;EAER;AACF"}
|
|
1
|
+
{"version":3,"names":["React","View","Text","Platform","TouchableOpacity","moment","DateTimePicker","BaseComponent","BaseComponentState","WmIcon","WmDatetimeProps","DEFAULT_CLASS","WebDatePicker","isNumber","isString","ModalConsumer","validateField","BaseDatetimeState","constructor","arguments","_defineProperty","CURRENT_DATE","CURRENT_TIME","BaseDatetime","props","defaultClass","length","undefined","defaultProps","defaultState","format","date","Date","getTime","parse","parseInt","toDate","monitorAndUpdateCurrentTime","stopCurrentTimeMonitor","timerId","setInterval","updateState","readonly","datavalue","now","state","clearInterval","onPropertyChange","name","$new","$old","invokeEventCallback","prevDatavalue","outputformat","datepattern","dateValue","displayValue","onFieldChange","minDateVal","mindate","maxDateVal","maxdate","disabled","onDateChange","$event","validate","modes","shift","isFocused","showDatePicker","timestamp","onBlur","OS","setTimeout","triggerValidation","onFocus","mode","value","validationObj","setState","isValid","errorType","componentWillUnmount","renderWebWidget","createElement","locale","onDismiss","minimumDate","maximumDate","renderNativeWidget","is24Hour","display","onChange","event","dateSelected","set","getMonth","getFullYear","getDate","renderNativeWidgetWithModal","modalService","nativeModalOptions","content","Fragment","hideModal","centered","onClose","showModal","addTouchableOpacity","children","styles","style","onPress","getIcon","renderWidget","root","invalid","focused","_background","container","text","placeholderText","placeholder","flex","isRTL","flexDirection","textAlign","iconclass","color","clearIcon","onTap","clearBtnClicked","calendarIcon"],"sources":["base-datetime.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, Platform, TouchableOpacity } from 'react-native';\nimport moment from 'moment';\nimport DateTimePicker, { DateTimePickerEvent } from '@react-native-community/datetimepicker';\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 WmDatetimeProps from './datetime/datetime.props';\nimport { DEFAULT_CLASS, WmDatetimeStyles } from './datetime/datetime.styles';\nimport WebDatePicker from './date-picker.component';\nimport { isNumber, isString } from 'lodash-es';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport { validateField } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class BaseDatetimeState extends BaseComponentState<WmDatetimeProps> {\n showDatePicker = false;\n dateValue: Date = null as any;\n displayValue: string = null as any;\n isFocused = false;\n timerId: NodeJS.Timer = null as any;\n isValid: boolean = true;\n errorType = '';\n}\n\nconst CURRENT_DATE = 'CURRENT_DATE';\nconst CURRENT_TIME = 'CURRENT_TIME';\n\nexport default abstract class BaseDatetime extends BaseComponent<WmDatetimeProps, BaseDatetimeState, WmDatetimeStyles> {\n clearBtnClicked = false;\n modes = [] as string[];\n nativeModalOptions: ModalOptions = {} as any;\n prevDatavalue: any;\n\n constructor(props: WmDatetimeProps, defaultClass = DEFAULT_CLASS, defaultProps = new WmDatetimeProps(), defaultState= new BaseDatetimeState()) {\n super(props, defaultClass, defaultProps, defaultState);\n }\n\n format(date: Date | number | undefined, format: string) {\n if (format === 'timestamp') {\n return date instanceof Date ? '' + date.getTime() : date;\n }\n return date && moment(date).format(format);\n }\n\n parse(date: string | number, format: string) {\n if (format === 'timestamp') {\n if (isString(date)) {\n return new Date(parseInt(date));\n }\n if (isNumber(date)) {\n return new Date(date);\n }\n }\n return date && moment(date, format).toDate();\n }\n\n private monitorAndUpdateCurrentTime() {\n this.stopCurrentTimeMonitor();\n const timerId = setInterval(() => {\n this.updateState({\n props: {\n readonly: true,\n datavalue: Date.now()\n },\n timerId: timerId\n } as BaseDatetimeState);\n }, 1000);\n }\n\n private stopCurrentTimeMonitor() {\n if (this.state.timerId) {\n clearInterval(this.state.timerId);\n }\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n const props = this.state.props;\n switch(name) {\n //@ts-ignore\n case 'datavalue':\n this.invokeEventCallback('onChange', [null, this, $new, $old]);\n this.prevDatavalue = $old;\n if (props.datavalue === CURRENT_TIME) {\n this.monitorAndUpdateCurrentTime();\n }\n case 'datepattern':\n case 'outputformat':\n if (props.datavalue && props.outputformat && props.datepattern) {\n if (props.datavalue === CURRENT_DATE || props.datavalue === CURRENT_TIME) {\n props.datavalue = this.format(new Date(), props.outputformat);\n }\n const date = isString(props.datavalue) ? this.parse(props.datavalue as string, props.outputformat) : props.datavalue;\n this.updateState({\n dateValue : date,\n displayValue: this.format(date as any, props.datepattern)\n } as BaseDatetimeState);\n } else {\n this.updateState({\n dateValue : null as any,\n displayValue: null as any\n } as BaseDatetimeState);\n }\n this.props.onFieldChange && this.props.onFieldChange('datavalue', props.datavalue, this.prevDatavalue);\n break;\n case 'mindate':\n if (isString($new)) {\n const minDateVal = ($new === CURRENT_DATE || $new === CURRENT_TIME) ? new Date() : props.mindate;\n this.updateState({\n props: {\n mindate: moment(minDateVal, props.datepattern).toDate()\n }\n } as BaseDatetimeState);\n }\n break;\n case 'maxdate':\n if (isString($new)) {\n const maxDateVal = ($new === CURRENT_DATE || $new === CURRENT_TIME) ? new Date() : props.maxdate;\n this.updateState({\n props: {\n maxdate: moment(maxDateVal, props.datepattern).toDate()\n }\n } as BaseDatetimeState);\n }\n break;\n case 'readonly':\n this.updateState({\n props: {\n disabled: $new\n }\n } as BaseDatetimeState)\n break;\n }\n }\n\n onDateChange($event: DateTimePickerEvent, date?: Date) {\n this.validate(date);\n this.modes.shift();\n this.updateState({\n isFocused: false,\n showDatePicker: !!this.modes.length,\n props: {\n datavalue: this.format(date, this.state.props.outputformat as string),\n timestamp: this.format(date, 'timestamp')\n }\n } as BaseDatetimeState);\n }\n\n onBlur() {\n if (Platform.OS === 'web') {\n this.validate(this.state.props.datavalue);\n setTimeout(() => this.props.triggerValidation && this.props.triggerValidation());\n }\n this.invokeEventCallback('onBlur', [null, this]);\n }\n\n onFocus() {\n if (!this.state.props.readonly) {\n if (Platform.OS !== 'web' && this.state.props.mode === 'datetime') {\n this.modes = ['date', 'time'];\n } else {\n this.modes = [this.state.props.mode];\n }\n this.updateState({showDatePicker: true, isFocused: true} as BaseDatetimeState);\n this.invokeEventCallback('onFocus', [null, this]);\n }\n }\n\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.setState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as BaseDatetimeState)\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n this.stopCurrentTimeMonitor();\n }\n\n renderWebWidget(props: WmDatetimeProps) {\n return (<WebDatePicker\n mode={this.state.props.mode}\n locale={props.locale}\n value={this.state.dateValue || new Date()}\n onDateChange={(date: Date) => this.onDateChange(null as any, date)}\n onDismiss={() =>\n this.updateState({\n isFocused: false,\n showDatePicker: false\n } as BaseDatetimeState, () => this.onBlur())}\n minimumDate={props.mindate as Date}\n maximumDate={props.maxdate as Date}/>);\n }\n\n renderNativeWidget(props: WmDatetimeProps, onDismiss?: Function) {\n return (<DateTimePicker\n mode={this.modes[0] as any}\n value={this.state.dateValue || new Date()}\n is24Hour={true}\n display={Platform.OS === 'ios' ? 'spinner': 'default'}\n onChange={(event: DateTimePickerEvent, date?: Date) => {\n if (date && this.state.props.mode === 'datetime' && this.modes[0] === 'time') {\n const dateSelected = this.state.dateValue;\n date = moment(date)\n .set('month', dateSelected.getMonth())\n .set('year', dateSelected.getFullYear())\n .set('date', dateSelected.getDate())\n .toDate();\n }\n this.onDateChange(event, date || this.state.dateValue);\n if (this.modes.length <= 1) {\n this.onBlur();\n onDismiss && onDismiss();\n }\n }}\n minimumDate={props.mindate as Date}\n maximumDate={props.maxdate as Date}\n />\n );\n }\n\n renderNativeWidgetWithModal(props: WmDatetimeProps) {\n return (<ModalConsumer>{(modalService: ModalService) => {\n this.nativeModalOptions.content = (<>\n {this.renderNativeWidget(props, () => modalService.hideModal(this.nativeModalOptions))}\n </>);\n this.nativeModalOptions.centered = true;\n this.nativeModalOptions.onClose = () => {\n this.onBlur();\n };\n modalService.showModal(this.nativeModalOptions);\n return null;\n }}</ModalConsumer>);\n }\n\n addTouchableOpacity(props: WmDatetimeProps, children: React.ReactNode, styles?: any) : React.ReactNode{\n return (\n <TouchableOpacity style={styles} onPress={() => {\n if (!props.readonly) {\n this.onFocus();\n }\n this.invokeEventCallback('onTap', [null, this]);\n }}>\n {children}\n </TouchableOpacity>\n );\n }\n\n getIcon() {\n if (this.state.props.mode === 'time') {\n return 'wm-sl-l sl-time'\n }\n return 'wm-sl-l sl-calendar';\n }\n\n renderWidget(props: WmDatetimeProps) {\n return ( \n this.addTouchableOpacity(props, (\n <View style={[this.styles.root, this.state.isValid ? {} : this.styles.invalid, this.state.isFocused ? this.styles.focused : null]}>\n {this._background}\n <View style={this.styles.container}>\n {this.addTouchableOpacity(props, (\n <Text style={[\n this.styles.text,\n this.state.displayValue ? {} : this.styles.placeholderText\n ]}>{this.state.displayValue || this.state.props.placeholder}</Text>\n ), [{ flex: 1}, this.isRTL?{flexDirection:'row', textAlign:'right'}:{}] )}\n {(!props.readonly && props.datavalue &&\n (<WmIcon iconclass=\"wi wi-clear\"\n styles={{color: this.styles.text.color, ...this.styles.clearIcon}}\n onTap={() => {\n this.onDateChange(null as any, null as any);\n this.clearBtnClicked = true;\n }}/>)) || null}\n {this.addTouchableOpacity(props, (\n <WmIcon iconclass={this.getIcon()} styles={{color: this.styles.text.color, ...this.styles.calendarIcon}}/>\n ))}\n </View>\n {\n this.state.showDatePicker\n && ((Platform.OS === 'web' && this.renderWebWidget(props))\n || (Platform.OS === 'android' && this.renderNativeWidget(props))\n || (Platform.OS === 'ios' && this.renderNativeWidget(props)))\n }\n </View>\n ))\n );\n }\n}\n\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,gBAAgB,QAAQ,cAAc;AACrE,OAAOC,MAAM,MAAM,QAAQ;AAC3B,OAAOC,cAAc,MAA+B,wCAAwC;AAC5F,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,eAAe,MAAM,2BAA2B;AACvD,SAASC,aAAa,QAA0B,4BAA4B;AAC5E,OAAOC,aAAa,MAAM,yBAAyB;AACnD,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,WAAW;AAC9C,SAASC,aAAa,QAAoC,8CAA8C;AACxG,SAASC,aAAa,QAAQ,sCAAsC;AAEpE,OAAO,MAAMC,iBAAiB,SAAST,kBAAkB,CAAkB;EAAAU,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,yBACxD,KAAK;IAAAA,eAAA,oBACH,IAAI;IAAAA,eAAA,uBACA,IAAI;IAAAA,eAAA,oBACf,KAAK;IAAAA,eAAA,kBACO,IAAI;IAAAA,eAAA,kBACT,IAAI;IAAAA,eAAA,oBACX,EAAE;EAAA;AAChB;AAEA,MAAMC,YAAY,GAAG,cAAc;AACnC,MAAMC,YAAY,GAAG,cAAc;AAEnC,eAAe,MAAeC,YAAY,SAAShB,aAAa,CAAuD;EAMrHW,WAAWA,CAACM,KAAsB,EAA6G;IAAA,IAA3GC,YA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EAAC,aAAa;MAChCjB,MAAM,EAAE;QAACkB,KAAK,EAAE,IAAI,CAAClB,MAAM,CAACU,IAAI,CAACQ,KAAK;QAAE,GAAG,IAAI,CAAClB,MAAM,CAACmB;MAAS,CAAE;MAClEC,KAAK,EAAEA,CAAA,KAAM;QACX,IAAI,CAACnE,YAAY,CAAC,IAAI,EAAS,IAAW,CAAC;QAC3C,IAAI,CAACoE,eAAe,GAAG,IAAI;MAC7B;IAAE,CAAC,CAAE,IAAK,IAAI,EACf,IAAI,CAACvB,mBAAmB,CAACpF,KAAK,eAC7BxB,KAAA,CAAAoF,aAAA,CAAC3E,MAAM;MAACsH,SAAS,EAAE,IAAI,CAACd,OAAO,CAAC,CAAE;MAACH,MAAM,EAAE;QAACkB,KAAK,EAAE,IAAI,CAAClB,MAAM,CAACU,IAAI,CAACQ,KAAK;QAAE,GAAG,IAAI,CAAClB,MAAM,CAACsB;MAAY;IAAE,CAAC,CAC1G,CACG,CAAC,EAEP,IAAI,CAACvF,KAAK,CAACwB,cAAc,KACpBlE,QAAQ,CAACqE,EAAE,KAAK,KAAK,IAAI,IAAI,CAACW,eAAe,CAAC3D,KAAK,CAAC,IACnDrB,QAAQ,CAACqE,EAAE,KAAK,SAAS,IAAI,IAAI,CAACiB,kBAAkB,CAACjE,KAAK,CAAE,IAC5DrB,QAAQ,CAACqE,EAAE,KAAK,KAAK,IAAI,IAAI,CAACiB,kBAAkB,CAACjE,KAAK,CAAE,CAE5D,CACL,CAAC;EAER;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["WmDateProps","DEFAULT_CLASS","BaseDatetime","WmDate","constructor","props","renderWidget"],"sources":["date.component.tsx"],"sourcesContent":["import WmDateProps from './date.props';\nimport { DEFAULT_CLASS } from './date.styles';\nimport BaseDatetime from '../base-datetime.component';\n\nexport default class WmDate extends BaseDatetime {\n\n constructor(props: WmDateProps) {\n super(props, DEFAULT_CLASS, new WmDateProps());\n }\n\n renderWidget(props: WmDateProps) {\n return super.renderWidget(props);\n }\n}\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAQ,eAAe;AAC7C,OAAOC,YAAY,MAAM,4BAA4B;AAErD,eAAe,MAAMC,MAAM,SAASD,YAAY,CAAC;EAE/CE,
|
|
1
|
+
{"version":3,"names":["WmDateProps","DEFAULT_CLASS","BaseDatetime","WmDate","constructor","props","renderWidget"],"sources":["date.component.tsx"],"sourcesContent":["import WmDateProps from './date.props';\nimport { DEFAULT_CLASS } from './date.styles';\nimport BaseDatetime from '../base-datetime.component';\n\nexport default class WmDate extends BaseDatetime {\n\n constructor(props: WmDateProps) {\n super(props, DEFAULT_CLASS, new WmDateProps());\n }\n\n renderWidget(props: WmDateProps) {\n return super.renderWidget(props);\n }\n}\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAQ,eAAe;AAC7C,OAAOC,YAAY,MAAM,4BAA4B;AAErD,eAAe,MAAMC,MAAM,SAASD,YAAY,CAAC;EAE/CE,WAAWA,CAACC,KAAkB,EAAE;IAC9B,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,WAAW,CAAC,CAAC,CAAC;EAChD;EAEAM,YAAYA,CAACD,KAAkB,EAAE;IAC/B,OAAO,KAAK,CAACC,YAAY,CAACD,KAAK,CAAC;EAClC;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["WmDatetimeProps","WmDateProps","constructor","mode","placeholder","datepattern","outputformat"],"sources":["date.props.ts"],"sourcesContent":["import WmDatetimeProps from '../datetime/datetime.props';\n\nexport default class WmDateProps extends WmDatetimeProps {\n constructor() {\n super();\n this.mode = 'date';\n this.placeholder = 'Select date';\n this.datepattern = '';\n this.outputformat = 'YYYY-MM-DD';\n }\n}"],"mappings":"AAAA,OAAOA,eAAe,MAAM,4BAA4B;AAExD,eAAe,MAAMC,WAAW,SAASD,eAAe,CAAC;EACvDE,
|
|
1
|
+
{"version":3,"names":["WmDatetimeProps","WmDateProps","constructor","mode","placeholder","datepattern","outputformat"],"sources":["date.props.ts"],"sourcesContent":["import WmDatetimeProps from '../datetime/datetime.props';\n\nexport default class WmDateProps extends WmDatetimeProps {\n constructor() {\n super();\n this.mode = 'date';\n this.placeholder = 'Select date';\n this.datepattern = '';\n this.outputformat = 'YYYY-MM-DD';\n }\n}"],"mappings":"AAAA,OAAOA,eAAe,MAAM,4BAA4B;AAExD,eAAe,MAAMC,WAAW,SAASD,eAAe,CAAC;EACvDE,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IACP,IAAI,CAACC,IAAI,GAAG,MAAM;IAClB,IAAI,CAACC,WAAW,GAAG,aAAa;IAChC,IAAI,CAACC,WAAW,GAAG,EAAE;IACrB,IAAI,CAACC,YAAY,GAAG,YAAY;EAClC;AACF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';
|
|
2
2
|
import { DEFAULT_CLASS as DATE_TIME_DEFAUlT_CLASS } from '../datetime/datetime.styles';
|
|
3
|
+
import { Platform } from 'react-native';
|
|
3
4
|
export const DEFAULT_CLASS = 'app-date';
|
|
4
5
|
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
5
6
|
addStyle(DEFAULT_CLASS, DATE_TIME_DEFAUlT_CLASS, {});
|
|
@@ -8,5 +9,13 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
8
9
|
backgroundColor: themeVariables.inputDisabledBgColor
|
|
9
10
|
}
|
|
10
11
|
});
|
|
12
|
+
addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS == "web" ? {
|
|
13
|
+
clearIcon: {
|
|
14
|
+
root: {
|
|
15
|
+
marginLeft: 4,
|
|
16
|
+
marginRight: 0
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
} : {});
|
|
11
20
|
});
|
|
12
21
|
//# sourceMappingURL=date.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_THEME","DEFAULT_CLASS","DATE_TIME_DEFAUlT_CLASS","registerStyle","themeVariables","addStyle","root","backgroundColor","inputDisabledBgColor"],"sources":["date.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { WmDatetimeStyles, DEFAULT_CLASS as DATE_TIME_DEFAUlT_CLASS } from '../datetime/datetime.styles';\n\nexport type WmDateStyles = WmDatetimeStyles;\n\nexport const DEFAULT_CLASS = 'app-date';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n addStyle(DEFAULT_CLASS, DATE_TIME_DEFAUlT_CLASS, {});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAA2BC,aAAa,IAAIC,uBAAuB,QAAQ,6BAA6B;
|
|
1
|
+
{"version":3,"names":["BASE_THEME","DEFAULT_CLASS","DATE_TIME_DEFAUlT_CLASS","Platform","registerStyle","themeVariables","addStyle","root","backgroundColor","inputDisabledBgColor","OS","clearIcon","marginLeft","marginRight"],"sources":["date.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { WmDatetimeStyles, DEFAULT_CLASS as DATE_TIME_DEFAUlT_CLASS } from '../datetime/datetime.styles';\nimport { Platform } from 'react-native';\n\nexport type WmDateStyles = WmDatetimeStyles;\n\nexport const DEFAULT_CLASS = 'app-date';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n addStyle(DEFAULT_CLASS, DATE_TIME_DEFAUlT_CLASS, {});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n clearIcon: {\n root: {\n marginLeft: 4,\n marginRight: 0\n }\n }\n }:{});\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAA2BC,aAAa,IAAIC,uBAAuB,QAAQ,6BAA6B;AACxG,SAASC,QAAQ,QAAQ,cAAc;AAIvC,OAAO,MAAMF,aAAa,GAAG,UAAU;AACvCD,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrDA,QAAQ,CAACL,aAAa,EAAEC,uBAAuB,EAAE,CAAC,CAAC,CAAC;EACpDI,QAAQ,CAACL,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCM,IAAI,EAAG;MACLC,eAAe,EAAEH,cAAc,CAACI;IAClC;EACJ,CAAC,CAAC;EACFH,QAAQ,CAACL,aAAa,GAAG,MAAM,EAAE,EAAE,EAAEE,QAAQ,CAACO,EAAE,IAAE,KAAK,GAAC;IACtDC,SAAS,EAAE;MACPJ,IAAI,EAAE;QACFK,UAAU,EAAE,CAAC;QACbC,WAAW,EAAE;MACjB;IACJ;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","DatePickerModalContent","TimePickerModal","ModalConsumer","ThemeVariables","DatePickerProps","Date","DatePickerState","styles","root","text","modal","content","backgroundColor","INSTANCE","datepickerBgColor","DatePickerComponnent","Component","constructor","props","state","showDatePicker","mode","showTimePicker","value","modalOptions","prepareModalOptions","o","modalStyle","centered","onDateChange","date","modalService","old","setHours","getHours","setMinutes","getMinutes","setState","close","refresh","onTimeChange","hours","minutes","timemodal","prepareTimeModal","height","marginTop","createElement","visible","onDismiss","onConfirm","params","hideModal","render","showModal","validRange","startDate","minimumDate","endDate","maximumDate","locale"],"sources":["date-picker.component.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { View } from 'react-native';\nimport { DatePickerModalContent, TimePickerModal } from 'react-native-paper-dates';\nimport { BaseStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { ModalConsumer, ModalService, ModalOptions } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\n\nexport class DatePickerProps {\n mode?: 'date' | 'time' | 'datetime' | string = 'datetime';\n value?: Date = new Date();\n minimumDate?: Date = null as any;\n maximumDate?: Date = null as any;\n onDateChange?: Function = null as any;\n onDismiss?: Function = null as any;\n locale: string = '';\n}\n\nexport class DatePickerState {\n public value?: Date = null as any;\n public modalOptions: ModalOptions = {} as any;\n public showDatePicker = false;\n public showTimePicker = false;\n}\n\ntype DatePickerStyles = BaseStyles & {\n modal: AllStyle,\n content: AllStyle\n};\n\nconst styles: DatePickerStyles = {\n root: {},\n text: {},\n modal: {},\n content: {\n backgroundColor: ThemeVariables.INSTANCE.datepickerBgColor\n }\n};\n\nexport default class DatePickerComponnent extends React.Component<DatePickerProps, DatePickerState, any> {\n timemodal = null as any;\n constructor(props: DatePickerProps) {\n super(props);\n this.state = {\n showDatePicker: this.props.mode !== 'time',\n showTimePicker: this.props.mode === 'time',\n value: props.value,\n modalOptions: {}\n } as DatePickerState;\n }\n\n prepareModalOptions(content: ReactNode) {\n const o = this.state.modalOptions;\n o.content = content;\n o.modalStyle = styles.modal;\n o.centered = true;\n return o;\n }\n\n public onDateChange(date: Date | undefined, modalService: ModalService) {\n const old = this.state.value;\n if (old && date) {\n date.setHours(old.getHours());\n date.setMinutes(old.getMinutes());\n }\n if (this.props.mode === 'date') {\n this.setState({\n value : date,\n showDatePicker: false,\n showTimePicker: false\n }, () => {\n this.props.onDateChange && this.props.onDateChange(this.state.value);\n this.close(modalService);\n });\n } else if (date) {\n this.setState({\n value : date,\n showDatePicker: false,\n showTimePicker: true\n }, () => {\n modalService.refresh();\n });\n }\n }\n\n public onTimeChange(hours: number, minutes: number, modalService: ModalService) {\n const date = this.state.value || new Date();\n date.setHours(hours);\n date.setMinutes(minutes);\n this.setState({\n value : date,\n showDatePicker: false,\n showTimePicker: false\n }, () => {\n this.props.onDateChange && this.props.onDateChange(this.state.value);\n this.timemodal = null;\n this.close(modalService);\n });\n }\n\n prepareTimeModal(modalService: ModalService) {\n if (!this.timemodal) {\n this.timemodal = (\n <View style={{height: 600, marginTop: 600}}>\n {\n React.createElement(TimePickerModal, {\n hours : this.props.value?.getHours() || 0,\n minutes : this.props.value?.getMinutes() || 0,\n visible : true,\n onDismiss : () => this.close(modalService),\n onConfirm: (params) => {\n this.onTimeChange(params.hours, params.minutes, modalService);\n }\n })\n }\n </View>);\n }\n return this.timemodal;\n }\n\n close(modalService: ModalService) {\n modalService.hideModal(this.state.modalOptions);\n this.props.onDismiss && this.props.onDismiss();\n }\n\n render() {\n return (this.state.showDatePicker || this.state.showTimePicker) ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions(\n (<View style={this.state.showDatePicker ? styles.content: {}}>\n {this.state.showDatePicker && \n React.createElement(DatePickerModalContent, {\n mode: \"single\",\n date: this.props.value,\n onDismiss: () => this.close(modalService),\n onConfirm: (params) => this.onDateChange(params.date, modalService),\n validRange: {\n startDate: this.props.minimumDate,\n endDate: this.props.maximumDate\n },\n locale: this.props.locale})}\n {this.state.showTimePicker && this.prepareTimeModal(modalService)}\n </View>)\n ));\n return null;\n }}\n </ModalConsumer>): null;\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAqB,OAAO;AACxC,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,sBAAsB,EAAEC,eAAe,QAAQ,0BAA0B;AAGlF,SAASC,aAAa,QAAoC,8CAA8C;AACxG,OAAOC,cAAc,MAAM,kDAAkD;AAE7E,OAAO,MAAMC,eAAe,CAAC;EAAA;IAAA,8BACsB,UAAU;IAAA,+BAC1C,IAAIC,IAAI,EAAE;IAAA,qCACJ,IAAI;IAAA,qCACJ,IAAI;IAAA,sCACC,IAAI;IAAA,mCACP,IAAI;IAAA,g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D,aAAa,CAAC/C,sBAAsB,EAAE;QACxCqB,IAAI,EAAE,QAAQ;QACdS,IAAI,EAAE,IAAI,CAACZ,KAAK,CAACK,KAAK;QACtB0B,SAAS,EAAE,MAAM,IAAI,CAACX,KAAK,CAACP,YAAY,CAAC;QACzCmB,SAAS,EAAGC,MAAM,IAAK,IAAI,CAACtB,YAAY,CAACsB,MAAM,CAACrB,IAAI,EAAEC,YAAY,CAAC;QACnEwB,UAAU,EAAE;UACRC,SAAS,EAAE,IAAI,CAACtC,KAAK,CAACuC,WAAW;UACjCC,OAAO,EAAE,IAAI,CAACxC,KAAK,CAACyC;QACxB,CAAC;QACDC,MAAM,EAAE,IAAI,CAAC1C,KAAK,CAAC0C;MAAM,CAAC,CAAC,EAClC,IAAI,CAACzC,KAAK,CAACG,cAAc,IAAI,IAAI,CAACsB,gBAAgB,CAACb,YAAY,CAAC,CAC9D,CACV,CAAC;MACF,OAAO,IAAI;IACf,CAAC,CACW,GAAG,IAAI;EAC3B;AACJ"}
|
|
1
|
+
{"version":3,"names":["React","View","DatePickerModalContent","TimePickerModal","ModalConsumer","ThemeVariables","DatePickerProps","constructor","_defineProperty","Date","DatePickerState","styles","root","text","modal","content","backgroundColor","INSTANCE","datepickerBgColor","DatePickerComponnent","Component","props","state","showDatePicker","mode","showTimePicker","value","modalOptions","prepareModalOptions","o","modalStyle","centered","onDateChange","date","modalService","old","setHours","getHours","setMinutes","getMinutes","setState","close","refresh","onTimeChange","hours","minutes","timemodal","prepareTimeModal","_this$props$value","_this$props$value2","createElement","style","height","marginTop","visible","onDismiss","onConfirm","params","hideModal","render","showModal","validRange","startDate","minimumDate","endDate","maximumDate","locale"],"sources":["date-picker.component.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { View } from 'react-native';\nimport { DatePickerModalContent, TimePickerModal } from 'react-native-paper-dates';\nimport { BaseStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { ModalConsumer, ModalService, ModalOptions } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\n\nexport class DatePickerProps {\n mode?: 'date' | 'time' | 'datetime' | string = 'datetime';\n value?: Date = new Date();\n minimumDate?: Date = null as any;\n maximumDate?: Date = null as any;\n onDateChange?: Function = null as any;\n onDismiss?: Function = null as any;\n locale: string = '';\n}\n\nexport class DatePickerState {\n public value?: Date = null as any;\n public modalOptions: ModalOptions = {} as any;\n public showDatePicker = false;\n public showTimePicker = false;\n}\n\ntype DatePickerStyles = BaseStyles & {\n modal: AllStyle,\n content: AllStyle\n};\n\nconst styles: DatePickerStyles = {\n root: {},\n text: {},\n modal: {},\n content: {\n backgroundColor: ThemeVariables.INSTANCE.datepickerBgColor\n }\n};\n\nexport default class DatePickerComponnent extends React.Component<DatePickerProps, DatePickerState, any> {\n timemodal = null as any;\n constructor(props: DatePickerProps) {\n super(props);\n this.state = {\n showDatePicker: this.props.mode !== 'time',\n showTimePicker: this.props.mode === 'time',\n value: props.value,\n modalOptions: {}\n } as DatePickerState;\n }\n\n prepareModalOptions(content: ReactNode) {\n const o = this.state.modalOptions;\n o.content = content;\n o.modalStyle = styles.modal;\n o.centered = true;\n return o;\n }\n\n public onDateChange(date: Date | undefined, modalService: ModalService) {\n const old = this.state.value;\n if (old && date) {\n date.setHours(old.getHours());\n date.setMinutes(old.getMinutes());\n }\n if (this.props.mode === 'date') {\n this.setState({\n value : date,\n showDatePicker: false,\n showTimePicker: false\n }, () => {\n this.props.onDateChange && this.props.onDateChange(this.state.value);\n this.close(modalService);\n });\n } else if (date) {\n this.setState({\n value : date,\n showDatePicker: false,\n showTimePicker: true\n }, () => {\n modalService.refresh();\n });\n }\n }\n\n public onTimeChange(hours: number, minutes: number, modalService: ModalService) {\n const date = this.state.value || new Date();\n date.setHours(hours);\n date.setMinutes(minutes);\n this.setState({\n value : date,\n showDatePicker: false,\n showTimePicker: false\n }, () => {\n this.props.onDateChange && this.props.onDateChange(this.state.value);\n this.timemodal = null;\n this.close(modalService);\n });\n }\n\n prepareTimeModal(modalService: ModalService) {\n if (!this.timemodal) {\n this.timemodal = (\n <View style={{height: 600, marginTop: 600}}>\n {\n React.createElement(TimePickerModal, {\n hours : this.props.value?.getHours() || 0,\n minutes : this.props.value?.getMinutes() || 0,\n visible : true,\n onDismiss : () => this.close(modalService),\n onConfirm: (params) => {\n this.onTimeChange(params.hours, params.minutes, modalService);\n }\n })\n }\n </View>);\n }\n return this.timemodal;\n }\n\n close(modalService: ModalService) {\n modalService.hideModal(this.state.modalOptions);\n this.props.onDismiss && this.props.onDismiss();\n }\n\n render() {\n return (this.state.showDatePicker || this.state.showTimePicker) ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions(\n (<View style={this.state.showDatePicker ? styles.content: {}}>\n {this.state.showDatePicker && \n React.createElement(DatePickerModalContent, {\n mode: \"single\",\n date: this.props.value,\n onDismiss: () => this.close(modalService),\n onConfirm: (params) => this.onDateChange(params.date, modalService),\n validRange: {\n startDate: this.props.minimumDate,\n endDate: this.props.maximumDate\n },\n locale: this.props.locale})}\n {this.state.showTimePicker && this.prepareTimeModal(modalService)}\n </View>)\n ));\n return null;\n }}\n </ModalConsumer>): null;\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAqB,OAAO;AACxC,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,sBAAsB,EAAEC,eAAe,QAAQ,0BAA0B;AAGlF,SAASC,aAAa,QAAoC,8CAA8C;AACxG,OAAOC,cAAc,MAAM,kDAAkD;AAE7E,OAAO,MAAMC,eAAe,CAAC;EAAAC,YAAA;IAAAC,eAAA,eACsB,UAAU;IAAAA,eAAA,gBAC1C,IAAIC,IAAI,CAAC,CAAC;IAAAD,eAAA,sBACJ,IAAI;IAAAA,eAAA,sBACJ,IAAI;IAAAA,eAAA,uBACC,IAAI;IAAAA,eAAA,oBACP,IAAI;IAAAA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AAA,CAAC9C,aAAa,QACR8B,YAA0B,IAAK;MAC7BA,YAAY,CAAC0B,SAAS,CAAC,IAAI,CAAChC,mBAAmB,eAC1C5B,KAAA,CAAAkD,aAAA,CAACjD,IAAI;QAACkD,KAAK,EAAE,IAAI,CAAC7B,KAAK,CAACC,cAAc,GAAGZ,MAAM,CAACI,OAAO,GAAE,CAAC;MAAE,GACxD,IAAI,CAACO,KAAK,CAACC,cAAc,iBACtBvB,KAAK,CAACkD,aAAa,CAAChD,sBAAsB,EAAE;QACxCsB,IAAI,EAAE,QAAQ;QACdS,IAAI,EAAE,IAAI,CAACZ,KAAK,CAACK,KAAK;QACtB6B,SAAS,EAAEA,CAAA,KAAM,IAAI,CAACd,KAAK,CAACP,YAAY,CAAC;QACzCsB,SAAS,EAAGC,MAAM,IAAK,IAAI,CAACzB,YAAY,CAACyB,MAAM,CAACxB,IAAI,EAAEC,YAAY,CAAC;QACnE2B,UAAU,EAAE;UACRC,SAAS,EAAE,IAAI,CAACzC,KAAK,CAAC0C,WAAW;UACjCC,OAAO,EAAE,IAAI,CAAC3C,KAAK,CAAC4C;QACxB,CAAC;QACDC,MAAM,EAAE,IAAI,CAAC7C,KAAK,CAAC6C;MAAM,CAAC,CAAC,EAClC,IAAI,CAAC5C,KAAK,CAACG,cAAc,IAAI,IAAI,CAACsB,gBAAgB,CAACb,YAAY,CAC9D,CACV,CAAC,CAAC;MACF,OAAO,IAAI;IACf,CACW,CAAC,GAAG,IAAI;EAC3B;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["WmDatetimeProps","DEFAULT_CLASS","BaseDatetime","WmDatetime","constructor","props","renderWidget"],"sources":["datetime.component.tsx"],"sourcesContent":["import WmDatetimeProps from './datetime.props';\nimport { DEFAULT_CLASS, } from './datetime.styles';\nimport BaseDatetime from '../base-datetime.component';\n\nexport default class WmDatetime extends BaseDatetime {\n\n constructor(props: WmDatetimeProps) {\n super(props, DEFAULT_CLASS, new WmDatetimeProps());\n }\n\n renderWidget(props: WmDatetimeProps) {\n return super.renderWidget(props);\n }\n}"],"mappings":"AAAA,OAAOA,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAAS,mBAAmB;AAClD,OAAOC,YAAY,MAAM,4BAA4B;AAErD,eAAe,MAAMC,UAAU,SAASD,YAAY,CAAC;EAEnDE,
|
|
1
|
+
{"version":3,"names":["WmDatetimeProps","DEFAULT_CLASS","BaseDatetime","WmDatetime","constructor","props","renderWidget"],"sources":["datetime.component.tsx"],"sourcesContent":["import WmDatetimeProps from './datetime.props';\nimport { DEFAULT_CLASS, } from './datetime.styles';\nimport BaseDatetime from '../base-datetime.component';\n\nexport default class WmDatetime extends BaseDatetime {\n\n constructor(props: WmDatetimeProps) {\n super(props, DEFAULT_CLASS, new WmDatetimeProps());\n }\n\n renderWidget(props: WmDatetimeProps) {\n return super.renderWidget(props);\n }\n}"],"mappings":"AAAA,OAAOA,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAAS,mBAAmB;AAClD,OAAOC,YAAY,MAAM,4BAA4B;AAErD,eAAe,MAAMC,UAAU,SAASD,YAAY,CAAC;EAEnDE,WAAWA,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,CAAC;EACpD;EAEAM,YAAYA,CAACD,KAAsB,EAAE;IACnC,OAAO,KAAK,CAACC,YAAY,CAACD,KAAK,CAAC;EAClC;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseProps","WmDatetimeProps","undefined"],"sources":["datetime.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmDatetimeProps extends BaseProps {\n mode = 'datetime';\n datavalue?: string | Date | number = undefined as any;\n datepattern?: string = '';\n outputformat?: string = 'timestamp';\n mindate?: string | Date = undefined as any;\n maxdate?: string | Date = undefined as any;\n placeholder? = 'Select date time';\n readonly? = false;\n onFieldChange?: any;\n locale: string = '';\n timestamp?: any;\n triggerValidation?: any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,eAAe,SAASD,SAAS,CAAC;
|
|
1
|
+
{"version":3,"names":["BaseProps","WmDatetimeProps","constructor","arguments","_defineProperty","undefined"],"sources":["datetime.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmDatetimeProps extends BaseProps {\n mode = 'datetime';\n datavalue?: string | Date | number = undefined as any;\n datepattern?: string = '';\n outputformat?: string = 'timestamp';\n mindate?: string | Date = undefined as any;\n maxdate?: string | Date = undefined as any;\n placeholder? = 'Select date time';\n readonly? = false;\n onFieldChange?: any;\n locale: string = '';\n timestamp?: any;\n triggerValidation?: any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,eAAe,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,eAC9C,UAAU;IAAAA,eAAA,oBACoBC,SAAS;IAAAD,eAAA,sBACvB,EAAE;IAAAA,eAAA,uBACD,WAAW;IAAAA,eAAA,kBACTC,SAAS;IAAAD,eAAA,kBACTC,SAAS;IAAAD,eAAA,sBACpB,kBAAkB;IAAAA,eAAA,mBACrB,KAAK;IAAAA,eAAA;IAAAA,eAAA,iBAEA,EAAE;IAAAA,eAAA;IAAAA,eAAA;EAAA;AAGrB"}
|
|
@@ -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-datetime';
|
|
4
5
|
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
5
6
|
const defaultStyles = defineStyles({
|
|
@@ -58,5 +59,13 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
58
59
|
backgroundColor: themeVariables.inputDisabledBgColor
|
|
59
60
|
}
|
|
60
61
|
});
|
|
62
|
+
addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS == "web" ? {
|
|
63
|
+
clearIcon: {
|
|
64
|
+
root: {
|
|
65
|
+
marginLeft: 4,
|
|
66
|
+
marginRight: 0
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
} : {});
|
|
61
70
|
});
|
|
62
71
|
//# sourceMappingURL=datetime.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","padding","borderWidth","borderStyle","borderRadius","backgroundColor","inputBackgroundColor","borderColor","inputBorderColor","justifyContent","width","focused","invalid","borderBottomColor","inputInvalidBorderColor","placeholderText","color","inputPlaceholderColor","container","flexDirection","alignItems","text","fontSize","inputTextColor","calendarIcon","alignSelf","icon","clearIcon","marginRight","height","inputDisabledBgColor","fontWeight"],"sources":["datetime.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 { TextStyle } from 'react-native';\n\nexport type WmDatetimeStyles = BaseStyles & {\n focused: AllStyle,\n container: AllStyle,\n placeholderText: TextStyle,\n invalid: AllStyle,\n clearIcon: WmIconStyles,\n calendarIcon: WmIconStyles\n};\n\nexport const DEFAULT_CLASS = 'app-datetime';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmDatetimeStyles = defineStyles({\n root: {\n padding: 12,\n borderWidth: 1,\n borderStyle: 'solid',\n borderRadius: 6,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderColor: themeVariables.inputBorderColor,\n justifyContent: 'center',\n width: '100%'\n },\n focused: {\n\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n container: {\n flexDirection: 'row',\n alignItems: 'center'\n },\n text: {\n fontSize: 16,\n color: themeVariables.inputTextColor\n },\n calendarIcon: {\n root: {\n alignSelf: 'center'\n },\n icon: {\n fontSize: 24\n }\n },\n clearIcon: {\n root : {\n alignSelf: 'center',\n justifyContent: 'center',\n marginRight: 4,\n height: 24,\n width: 24,\n borderRadius: 16,\n backgroundColor: themeVariables.inputDisabledBgColor\n },\n icon: {\n fontSize: 16,\n fontWeight: 'bold'\n }\n } as WmIconStyles\n }) as WmDatetimeStyles;\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","padding","borderWidth","borderStyle","borderRadius","backgroundColor","inputBackgroundColor","borderColor","inputBorderColor","justifyContent","width","focused","invalid","borderBottomColor","inputInvalidBorderColor","placeholderText","color","inputPlaceholderColor","container","flexDirection","alignItems","text","fontSize","inputTextColor","calendarIcon","alignSelf","icon","clearIcon","marginRight","height","inputDisabledBgColor","fontWeight","OS","marginLeft"],"sources":["datetime.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 { TextStyle, Platform } from 'react-native';\n\nexport type WmDatetimeStyles = BaseStyles & {\n focused: AllStyle,\n container: AllStyle,\n placeholderText: TextStyle,\n invalid: AllStyle,\n clearIcon: WmIconStyles,\n calendarIcon: WmIconStyles\n};\n\nexport const DEFAULT_CLASS = 'app-datetime';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmDatetimeStyles = defineStyles({\n root: {\n padding: 12,\n borderWidth: 1,\n borderStyle: 'solid',\n borderRadius: 6,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderColor: themeVariables.inputBorderColor,\n justifyContent: 'center',\n width: '100%'\n },\n focused: {\n\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n container: {\n flexDirection: 'row',\n alignItems: 'center'\n },\n text: {\n fontSize: 16,\n color: themeVariables.inputTextColor\n },\n calendarIcon: {\n root: {\n alignSelf: 'center'\n },\n icon: {\n fontSize: 24\n }\n },\n clearIcon: {\n root : {\n alignSelf: 'center',\n justifyContent: 'center',\n marginRight: 4,\n height: 24,\n width: 24,\n borderRadius: 16,\n backgroundColor: themeVariables.inputDisabledBgColor\n },\n icon: {\n fontSize: 16,\n fontWeight: 'bold'\n }\n } as WmIconStyles\n }) as WmDatetimeStyles;\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n clearIcon: {\n root: {\n marginLeft: 4,\n marginRight: 0\n }\n }\n }:{});\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,SAAoBC,QAAQ,QAAQ,cAAc;AAWlD,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA+B,GAAGN,YAAY,CAAC;IACjD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,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAED,QAAQ,CAACsC,EAAE,IAAE,KAAK,GAAC;IACpDL,SAAS,EAAE;MACX3B,IAAI,EAAE;QACFiC,UAAU,EAAE,CAAC;QACbL,WAAW,EAAE;MACjB;IACJ;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["WmTimeProps","DEFAULT_CLASS","BaseDatetime","WmTime","constructor","props","onDateChange","$event","date","timestamp","state","dateValue","renderWidget"],"sources":["time.component.tsx"],"sourcesContent":["import WmTimeProps from './time.props';\nimport { DEFAULT_CLASS, } from './time.styles';\nimport BaseDatetime from '../base-datetime.component';\nimport { DateTimePickerEvent } from '@react-native-community/datetimepicker';\n\nexport default class WmTime extends BaseDatetime {\n\n constructor(props: WmTimeProps) {\n super(props, DEFAULT_CLASS, new WmTimeProps());\n }\n\n onDateChange($event: DateTimePickerEvent, date?: Date): void {\n super.onDateChange($event, date);\n }\n\n get timestamp() {\n return this.state.dateValue;\n }\n\n renderWidget(props: WmTimeProps) {\n return super.renderWidget(props);\n }\n}"],"mappings":"AAAA,OAAOA,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAS,eAAe;AAC9C,OAAOC,YAAY,MAAM,4BAA4B;AAGrD,eAAe,MAAMC,MAAM,SAASD,YAAY,CAAC;EAE/CE,
|
|
1
|
+
{"version":3,"names":["WmTimeProps","DEFAULT_CLASS","BaseDatetime","WmTime","constructor","props","onDateChange","$event","date","timestamp","state","dateValue","renderWidget"],"sources":["time.component.tsx"],"sourcesContent":["import WmTimeProps from './time.props';\nimport { DEFAULT_CLASS, } from './time.styles';\nimport BaseDatetime from '../base-datetime.component';\nimport { DateTimePickerEvent } from '@react-native-community/datetimepicker';\n\nexport default class WmTime extends BaseDatetime {\n\n constructor(props: WmTimeProps) {\n super(props, DEFAULT_CLASS, new WmTimeProps());\n }\n\n onDateChange($event: DateTimePickerEvent, date?: Date): void {\n super.onDateChange($event, date);\n }\n\n get timestamp() {\n return this.state.dateValue;\n }\n\n renderWidget(props: WmTimeProps) {\n return super.renderWidget(props);\n }\n}"],"mappings":"AAAA,OAAOA,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAS,eAAe;AAC9C,OAAOC,YAAY,MAAM,4BAA4B;AAGrD,eAAe,MAAMC,MAAM,SAASD,YAAY,CAAC;EAE/CE,WAAWA,CAACC,KAAkB,EAAE;IAC9B,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,WAAW,CAAC,CAAC,CAAC;EAChD;EAEAM,YAAYA,CAACC,MAA2B,EAAEC,IAAW,EAAQ;IAC3D,KAAK,CAACF,YAAY,CAACC,MAAM,EAAEC,IAAI,CAAC;EAClC;EAEA,IAAIC,SAASA,CAAA,EAAG;IACd,OAAO,IAAI,CAACC,KAAK,CAACC,SAAS;EAC7B;EAEAC,YAAYA,CAACP,KAAkB,EAAE;IAC/B,OAAO,KAAK,CAACO,YAAY,CAACP,KAAK,CAAC;EAClC;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["WmDatetimeProps","WmDateProps","constructor","mode","placeholder","datepattern","timepattern","outputformat"],"sources":["time.props.ts"],"sourcesContent":["import WmDatetimeProps from '../datetime/datetime.props';\n\nexport default class WmDateProps extends WmDatetimeProps {\n public timepattern = '';\n constructor() {\n super();\n this.mode = 'time';\n this.placeholder = 'Select time';\n this.datepattern = this.timepattern;\n this.outputformat = 'HH:mm:ss';\n }\n}"],"mappings":";;;AAAA,OAAOA,eAAe,MAAM,4BAA4B;AAExD,eAAe,MAAMC,WAAW,SAASD,eAAe,CAAC;EAEvDE,
|
|
1
|
+
{"version":3,"names":["WmDatetimeProps","WmDateProps","constructor","_defineProperty","mode","placeholder","datepattern","timepattern","outputformat"],"sources":["time.props.ts"],"sourcesContent":["import WmDatetimeProps from '../datetime/datetime.props';\n\nexport default class WmDateProps extends WmDatetimeProps {\n public timepattern = '';\n constructor() {\n super();\n this.mode = 'time';\n this.placeholder = 'Select time';\n this.datepattern = this.timepattern;\n this.outputformat = 'HH:mm:ss';\n }\n}"],"mappings":";;;AAAA,OAAOA,eAAe,MAAM,4BAA4B;AAExD,eAAe,MAAMC,WAAW,SAASD,eAAe,CAAC;EAEvDE,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IAACC,eAAA,sBAFW,EAAE;IAGrB,IAAI,CAACC,IAAI,GAAG,MAAM;IAClB,IAAI,CAACC,WAAW,GAAG,aAAa;IAChC,IAAI,CAACC,WAAW,GAAG,IAAI,CAACC,WAAW;IACnC,IAAI,CAACC,YAAY,GAAG,UAAU;EAChC;AACF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';
|
|
2
2
|
import { DEFAULT_CLASS as DATE_TIME_DEFAUlT_CLASS } from '../datetime/datetime.styles';
|
|
3
|
+
import { Platform } from 'react-native';
|
|
3
4
|
export const DEFAULT_CLASS = 'app-time';
|
|
4
5
|
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
5
6
|
addStyle(DEFAULT_CLASS, DATE_TIME_DEFAUlT_CLASS, {});
|
|
@@ -8,5 +9,13 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
8
9
|
backgroundColor: themeVariables.inputDisabledBgColor
|
|
9
10
|
}
|
|
10
11
|
});
|
|
12
|
+
addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS == "web" ? {
|
|
13
|
+
clearIcon: {
|
|
14
|
+
root: {
|
|
15
|
+
marginLeft: 4,
|
|
16
|
+
marginRight: 0
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
} : {});
|
|
11
20
|
});
|
|
12
21
|
//# sourceMappingURL=time.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_THEME","DEFAULT_CLASS","DATE_TIME_DEFAUlT_CLASS","registerStyle","themeVariables","addStyle","root","backgroundColor","inputDisabledBgColor"],"sources":["time.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { WmDatetimeStyles, DEFAULT_CLASS as DATE_TIME_DEFAUlT_CLASS } from '../datetime/datetime.styles';\n\nexport type WmTimeStyles = WmDatetimeStyles;\n\nexport const DEFAULT_CLASS = 'app-time';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n addStyle(DEFAULT_CLASS, DATE_TIME_DEFAUlT_CLASS, {});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAA2BC,aAAa,IAAIC,uBAAuB,QAAQ,6BAA6B;
|
|
1
|
+
{"version":3,"names":["BASE_THEME","DEFAULT_CLASS","DATE_TIME_DEFAUlT_CLASS","Platform","registerStyle","themeVariables","addStyle","root","backgroundColor","inputDisabledBgColor","OS","clearIcon","marginLeft","marginRight"],"sources":["time.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { WmDatetimeStyles, DEFAULT_CLASS as DATE_TIME_DEFAUlT_CLASS } from '../datetime/datetime.styles';\nimport { Platform } from 'react-native';\n\nexport type WmTimeStyles = WmDatetimeStyles;\n\nexport const DEFAULT_CLASS = 'app-time';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n addStyle(DEFAULT_CLASS, DATE_TIME_DEFAUlT_CLASS, {});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n clearIcon: {\n root: {\n marginLeft: 4,\n marginRight: 0\n }\n }\n }:{});\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAA2BC,aAAa,IAAIC,uBAAuB,QAAQ,6BAA6B;AACxG,SAASC,QAAQ,QAAQ,cAAc;AAIvC,OAAO,MAAMF,aAAa,GAAG,UAAU;AACvCD,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrDA,QAAQ,CAACL,aAAa,EAAEC,uBAAuB,EAAE,CAAC,CAAC,CAAC;EACpDI,QAAQ,CAACL,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCM,IAAI,EAAG;MACLC,eAAe,EAAEH,cAAc,CAACI;IAClC;EACJ,CAAC,CAAC;EACFH,QAAQ,CAACL,aAAa,GAAG,MAAM,EAAE,EAAE,EAAEE,QAAQ,CAACO,EAAE,IAAE,KAAK,GAAC;IACtDC,SAAS,EAAE;MACPJ,IAAI,EAAE;QACFK,UAAU,EAAE,CAAC;QACbC,WAAW,EAAE;MACjB;IACJ;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","View","DocumentPicker","BaseComponent","BaseComponentState","WmFileuploadProps","DEFAULT_CLASS","WmButton","WmFileuploadState","namedParameters","copyToCacheDirectory","multiple","type","WmFileupload","
|
|
1
|
+
{"version":3,"names":["React","Platform","View","DocumentPicker","BaseComponent","BaseComponentState","WmFileuploadProps","DEFAULT_CLASS","WmButton","WmFileuploadState","constructor","arguments","_defineProperty","namedParameters","copyToCacheDirectory","multiple","type","WmFileupload","props","onTap","getDocumentAsync","then","response","selectedFile","OS","mimeType","file","invokeEventCallback","proxy","updateState","selectedFiles","bind","renderWidget","createElement","style","styles","root","_background","iconclass","caption","button","iconsize"],"sources":["fileupload.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, View } from 'react-native';\nimport * as DocumentPicker from 'expo-document-picker';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmFileuploadProps from './fileupload.props';\nimport { DEFAULT_CLASS, WmFileuploadStyles } from './fileupload.styles';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\n\n\nexport interface SelectFileOutput {\n mimeType: string;\n name: string;\n size: number;\n type: 'cancel' | 'success';\n uri: string;\n}\n\nexport class WmFileuploadState extends BaseComponentState<WmFileuploadProps> {\n selectedFiles: any;\n}\n\nconst namedParameters = {\n copyToCacheDirectory: false,\n multiple: false,\n type: '*/*'\n};\n\nexport default class WmFileupload extends BaseComponent<WmFileuploadProps, WmFileuploadState, WmFileuploadStyles> {\n\n constructor(props: WmFileuploadProps) {\n super(props, DEFAULT_CLASS, new WmFileuploadProps());\n }\n\n onTap() {\n DocumentPicker.getDocumentAsync(namedParameters).then((response: any) => {\n let selectedFile;\n if (Platform.OS !== 'web') {\n selectedFile = response;\n selectedFile.type = selectedFile.mimeType;\n } else {\n selectedFile = response.file;\n }\n this.invokeEventCallback('onBeforeselect', [null, this.proxy, selectedFile]);\n\n this.updateState({\n props: {\n selectedFiles: selectedFile\n }\n } as WmFileuploadState, this.invokeEventCallback.bind(this, 'onSelect', [null, this.proxy, selectedFile]));\n });\n }\n\n renderWidget(props: WmFileuploadProps) {\n return <View style={this.styles.root}>\n {this._background}\n <WmButton iconclass={props.iconclass} caption={props.caption} styles={this.styles.button} iconsize={props.iconsize} onTap={this.onTap.bind(this)}></WmButton>\n </View>\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AAC7C,OAAO,KAAKC,cAAc,MAAM,sBAAsB;AAEtD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,iBAAiB,MAAM,oBAAoB;AAClD,SAASC,aAAa,QAA4B,qBAAqB;AACvE,OAAOC,QAAQ,MAAM,oEAAoE;AAWzF,OAAO,MAAMC,iBAAiB,SAASJ,kBAAkB,CAAoB;EAAAK,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;EA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,OAAQ;MAACJ,MAAM,EAAE,IAAI,CAACA,MAAM,CAACK,MAAO;MAACC,QAAQ,EAAEvB,KAAK,CAACuB,QAAS;MAACtB,KAAK,EAAE,IAAI,CAACA,KAAK,CAACY,IAAI,CAAC,IAAI;IAAE,CAAW,CACxJ,CAAC;EACT;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseProps","WmFileuploadProps"],"sources":["fileupload.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmFileuploadProps extends BaseProps {\n iconclass: string = 'wm-sl-l sl-cloud-upload';\n iconsize: number = 16;\n caption: string = 'Upload';\n selectedFiles?: any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,iBAAiB,SAASD,SAAS,CAAC;
|
|
1
|
+
{"version":3,"names":["BaseProps","WmFileuploadProps","constructor","arguments","_defineProperty"],"sources":["fileupload.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmFileuploadProps extends BaseProps {\n iconclass: string = 'wm-sl-l sl-cloud-upload';\n iconsize: number = 16;\n caption: string = 'Upload';\n selectedFiles?: any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,iBAAiB,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBACnC,yBAAyB;IAAAA,eAAA,mBAC1B,EAAE;IAAAA,eAAA,kBACH,QAAQ;IAAAA,eAAA;EAAA;AAE5B"}
|
|
@@ -3,10 +3,11 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
3
3
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
4
4
|
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); }
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { Platform
|
|
6
|
+
import { Platform } from 'react-native';
|
|
7
7
|
import { isNull } from 'lodash';
|
|
8
8
|
import WmNumberProps from './number.props';
|
|
9
9
|
import { DEFAULT_CLASS } from './number.styles';
|
|
10
|
+
import { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';
|
|
10
11
|
import { BaseNumberComponent, BaseNumberState } from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.component';
|
|
11
12
|
export class WmNumberState extends BaseNumberState {
|
|
12
13
|
constructor() {
|
|
@@ -23,7 +24,7 @@ export default class WmNumber extends BaseNumberComponent {
|
|
|
23
24
|
let opts = {};
|
|
24
25
|
const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';
|
|
25
26
|
opts[valueExpr] = ((_this$state$textValue = this.state.textValue) === null || _this$state$textValue === void 0 ? void 0 : _this$state$textValue.toString()) || '';
|
|
26
|
-
return /*#__PURE__*/React.createElement(
|
|
27
|
+
return /*#__PURE__*/React.createElement(WMTextInput, _extends({
|
|
27
28
|
ref: ref => {
|
|
28
29
|
this.widgetRef = ref;
|
|
29
30
|
// @ts-ignore
|
|
@@ -38,12 +39,13 @@ export default class WmNumber extends BaseNumberComponent {
|
|
|
38
39
|
placeholderTextColor: this.styles.placeholderText.color,
|
|
39
40
|
autoFocus: props.autofocus,
|
|
40
41
|
editable: props.disabled || props.readonly ? false : true,
|
|
41
|
-
placeholder: props.placeholder
|
|
42
|
+
placeholder: props.placeholder,
|
|
42
43
|
onBlur: this.onBlur.bind(this),
|
|
43
44
|
onFocus: this.onFocus.bind(this),
|
|
44
45
|
onKeyPress: this.validateInputEntry.bind(this),
|
|
45
46
|
onChangeText: this.onChangeText.bind(this),
|
|
46
|
-
onChange: this.invokeChange.bind(this)
|
|
47
|
+
onChange: this.invokeChange.bind(this),
|
|
48
|
+
allowContentSelection: this.styles.text.userSelect === 'text'
|
|
47
49
|
}));
|
|
48
50
|
}
|
|
49
51
|
}
|