@wavemaker/app-rn-runtime 11.5.0-next.40301 → 11.5.0-next.NULL
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/login-action.js +4 -0
- app-rn-runtime/actions/login-action.js.map +1 -1
- app-rn-runtime/actions/logout-action.js +4 -0
- app-rn-runtime/actions/logout-action.js.map +1 -1
- app-rn-runtime/actions/notification-action.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +4 -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.styles.js +1 -2
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js +214 -69
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js +3 -0
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +22 -10
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/advanced/login/login.component.js +3 -2
- app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +17 -16
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js +28 -11
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.props.js +0 -1
- app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +7 -5
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/animatedview.component.js +50 -0
- app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.component.js +5 -0
- app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +20 -7
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.styles.js +15 -5
- app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +11 -5
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +11 -5
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.props.js +1 -0
- app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.styles.js +2 -1
- app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +79 -11
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.props.js +1 -0
- app-rn-runtime/components/basic/label/label.props.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js +5 -0
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/message/message.component.js +6 -3
- app-rn-runtime/components/basic/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +7 -5
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +4 -3
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js +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 +3 -2
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +12 -6
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +11 -10
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js +6 -2
- app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
- app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js +2 -1
- app-rn-runtime/components/basic/video/video.component.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +42 -14
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.props.js +10 -1
- app-rn-runtime/components/chart/area-chart/area-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +42 -4
- 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 +1 -2
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +158 -46
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +18 -4
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js +44 -2
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +25 -3
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js +9 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.component.js +28 -6
- 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 +1 -0
- 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 +25 -3
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +1 -0
- app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +275 -0
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -0
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +17 -0
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -0
- app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js +7 -0
- app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js.map +1 -0
- app-rn-runtime/components/container/accordion/accordion.component.js +22 -15
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +6 -24
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +14 -4
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.props.js +1 -0
- app-rn-runtime/components/container/container.props.js.map +1 -1
- app-rn-runtime/components/container/panel/collapsible-pane.component.js +26 -0
- app-rn-runtime/components/container/panel/collapsible-pane.component.js.map +1 -0
- app-rn-runtime/components/container/panel/panel.component.js +44 -62
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.styles.js +9 -2
- app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
- app-rn-runtime/components/container/partial-host.component.js +1 -1
- app-rn-runtime/components/container/partial-host.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +29 -15
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +15 -10
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +18 -10
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js +1 -0
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +3 -2
- app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +139 -22
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.props.js +4 -0
- app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +117 -6
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +22 -3
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +4 -0
- 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 +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +3 -2
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.component.js +1 -0
- app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +9 -7
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +12 -6
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -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.styles.js +9 -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 +93 -31
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +7 -0
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js +12 -5
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -0
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +2 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.component.js +1 -0
- app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.styles.js +2 -1
- app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +4 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +9 -3
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +6 -2
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js +10 -10
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +2 -0
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js +25 -8
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +4 -2
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js +2 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +6 -2
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +45 -6
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js +1 -0
- app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js +4 -0
- app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.styles.js +22 -11
- app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
- app-rn-runtime/components/input/calendar/views/month-view.js +4 -0
- app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +6 -6
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +14 -7
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +2 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +15 -4
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.styles.js +20 -12
- app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.component.js +8 -1
- app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.props.js +1 -0
- app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.styles.js +16 -1
- app-rn-runtime/components/input/composite/composite.styles.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +21 -3
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.props.js +1 -0
- app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +31 -5
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +32 -9
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.component.js +8 -0
- app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.styles.js +16 -0
- app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.component.js +8 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js +1 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +21 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.component.js +8 -0
- app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.styles.js +16 -0
- app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -0
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +16 -2
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.props.js +1 -0
- app-rn-runtime/components/input/number/number.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +23 -2
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +13 -6
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js +6 -0
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js +6 -9
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/rating/rating.component.js +2 -0
- app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +17 -13
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.styles.js +8 -4
- app-rn-runtime/components/input/select/select.styles.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.component.js +99 -23
- app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.styles.js +30 -3
- app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +11 -5
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +15 -9
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +12 -1
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +1 -0
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js +22 -1
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +12 -1
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js +1 -0
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.styles.js +17 -0
- app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +44 -5
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.styles.js +16 -11
- app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +16 -3
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js +2 -0
- app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.component.js +5 -3
- app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.styles.js +10 -6
- app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.component.js +7 -4
- app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +6 -3
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.styles.js +14 -10
- app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js +10 -5
- 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 +8 -2
- app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js +2 -2
- app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.styles.js +6 -1
- app-rn-runtime/components/page/left-panel/left-panel.styles.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +11 -3
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/curve.js +84 -0
- app-rn-runtime/components/page/tabbar/curve.js.map +1 -0
- app-rn-runtime/components/page/tabbar/tabbar.component.js +47 -12
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -0
- app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.styles.js +76 -1
- app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
- app-rn-runtime/core/base.component.js +84 -37
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/floatinglabel.component.js +45 -0
- app-rn-runtime/core/components/floatinglabel.component.js.map +1 -0
- app-rn-runtime/core/components/textinput.component.js +25 -2
- app-rn-runtime/core/components/textinput.component.js.map +1 -1
- app-rn-runtime/core/constant.service.js +22 -0
- app-rn-runtime/core/constant.service.js.map +1 -0
- app-rn-runtime/core/formatters.js +9 -2
- app-rn-runtime/core/formatters.js.map +1 -1
- app-rn-runtime/core/imageSizeEstimator.js +4 -0
- app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
- app-rn-runtime/core/key.extractor.js +22 -0
- app-rn-runtime/core/key.extractor.js.map +1 -0
- app-rn-runtime/core/tappable.component.js +49 -12
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/testid.provider.js +5 -0
- app-rn-runtime/core/testid.provider.js.map +1 -0
- app-rn-runtime/core/utils.js +16 -0
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/gestures/swipe.animation.js +90 -16
- app-rn-runtime/gestures/swipe.animation.js.map +1 -1
- app-rn-runtime/package.json +6 -3
- app-rn-runtime/runtime/App.js +55 -22
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +27 -6
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +25 -2
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/services/app-i18n.service.js +7 -0
- app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-modal.service.js +1 -1
- app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +14 -3
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/runtime/services/device/camera-service.js +26 -9
- app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/scan-service.js +16 -2
- app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
- app-rn-runtime/runtime/services/webprocess.service.js +0 -1
- app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
- app-rn-runtime/styles/theme.js +66 -1
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +24 -3
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/http.service.js +1 -1
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/live-variable.js +1 -0
- app-rn-runtime/variables/live-variable.js.map +1 -1
- app-rn-runtime/variables/model-variable.js +13 -1
- app-rn-runtime/variables/model-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +1 -0
- app-rn-runtime/variables/service-variable.js.map +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
2
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
3
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
|
-
import { includes, intersection, isNaN, isFinite, toArray } from 'lodash';
|
|
4
|
+
import { includes, intersection, isNaN, isFinite, toArray, isNil } from 'lodash';
|
|
5
5
|
import { BaseComponent, BaseComponentState } from "@wavemaker/app-rn-runtime/core/base.component";
|
|
6
6
|
import { DEFAULT_CLASS } from "@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.styles";
|
|
7
7
|
import { Platform } from 'react-native';
|
|
8
|
-
import { validateField } from '@wavemaker/app-rn-runtime/core/utils';
|
|
8
|
+
import { countDecimalDigits, validateField } from '@wavemaker/app-rn-runtime/core/utils';
|
|
9
9
|
export class BaseNumberState extends BaseComponentState {
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
@@ -38,7 +38,46 @@ export class BaseNumberComponent extends BaseComponent {
|
|
|
38
38
|
var _this$widgetRef;
|
|
39
39
|
this === null || this === void 0 || (_this$widgetRef = this.widgetRef) === null || _this$widgetRef === void 0 ? void 0 : _this$widgetRef.focus();
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
validateOnDevice(value, type) {
|
|
42
|
+
var _value$match;
|
|
43
|
+
const isCurrencyField = type === 'currency';
|
|
44
|
+
let isValidText = true;
|
|
45
|
+
|
|
46
|
+
// * no alphabets except E, may contain E only once
|
|
47
|
+
if (/[a-df-zA-DF-Z]/.test(value) || !/^[^eE]*[eE]?[^eE]*$/.test(value)) {
|
|
48
|
+
isValidText = false;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// * currency only: check for negative number
|
|
52
|
+
if (isCurrencyField && (Number(value) < 0 || /-/g.test(value))) {
|
|
53
|
+
isValidText = false;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// * number only: not more than one minus and doesn't end with minus (-)
|
|
57
|
+
if (!isCurrencyField && Number((_value$match = value.match(/-/g)) === null || _value$match === void 0 ? void 0 : _value$match.length) > 1 || /\w-/.test(value)) {
|
|
58
|
+
isValidText = false;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// * check for more than one decimal point
|
|
62
|
+
if (/^\d*\.\d*\..*$/.test(value)) {
|
|
63
|
+
isValidText = false;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// * check for spaces and comma
|
|
67
|
+
if (/[\s,]/.test(value)) {
|
|
68
|
+
isValidText = false;
|
|
69
|
+
}
|
|
70
|
+
return isValidText;
|
|
71
|
+
}
|
|
72
|
+
onChangeText(value, type) {
|
|
73
|
+
const isValidTextOnDevice = this.validateOnDevice(value, type);
|
|
74
|
+
if (!isValidTextOnDevice) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const decimalPlacesInNumber = countDecimalDigits(value);
|
|
78
|
+
if (this.props.decimalPlaces < decimalPlacesInNumber) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
42
81
|
this.updateState({
|
|
43
82
|
textValue: value
|
|
44
83
|
}, () => {
|
|
@@ -124,7 +163,7 @@ export class BaseNumberComponent extends BaseComponent {
|
|
|
124
163
|
datavalue: model
|
|
125
164
|
}
|
|
126
165
|
}, () => {
|
|
127
|
-
!this.props.onFieldChange && value !== oldValue && this.invokeEventCallback('onChange', [event, this.proxy,
|
|
166
|
+
!this.props.onFieldChange && value !== oldValue && this.invokeEventCallback('onChange', [event, this.proxy, model, oldValue]);
|
|
128
167
|
if (source === 'blur') {
|
|
129
168
|
this.invokeEventCallback('onBlur', [event, this.proxy]);
|
|
130
169
|
}
|
|
@@ -201,13 +240,13 @@ export class BaseNumberComponent extends BaseComponent {
|
|
|
201
240
|
*/
|
|
202
241
|
getValueInRange(value) {
|
|
203
242
|
const props = this.state.props;
|
|
204
|
-
if (!isNaN(props.minvalue) && value < props.minvalue) {
|
|
243
|
+
if (!isNil(null) && !isNaN(props.minvalue) && value < props.minvalue) {
|
|
205
244
|
this.updateState({
|
|
206
245
|
errorType: 'minvalue'
|
|
207
246
|
});
|
|
208
247
|
return props.minvalue;
|
|
209
248
|
}
|
|
210
|
-
if (!isNaN(props.maxvalue) && value > props.maxvalue) {
|
|
249
|
+
if (!isNil(null) && !isNaN(props.maxvalue) && value > props.maxvalue) {
|
|
211
250
|
this.updateState({
|
|
212
251
|
errorType: 'maxvalue'
|
|
213
252
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["includes","intersection","isNaN","isFinite","toArray","BaseComponent","BaseComponentState","DEFAULT_CLASS","Platform","validateField","BaseNumberState","constructor","arguments","_defineProperty","BaseNumberComponent","props","defaultClass","length","undefined","defaultProps","defaultState","DECIMAL","GROUP","onChange","event","state","updateon","updateDatavalue","target","value","focus","_this$widgetRef","widgetRef","onChangeText","updateState","textValue","validate","invokeChange","e","OS","cursor","selectionStart","setState","validationObj","isValid","errorType","handleValidation","regexp","condition","RegExp","test","parseNumber","val","parts","split","NaN","number","Number","join","decimal","sum","parseFloat","toFixed","Object","is","source","model","toString","oldValue","datavalue","validNumber","isValidNumber","invokeEventCallback","proxy","onFieldChange","onBlur","newVal","setTimeout","triggerValidation","oldVal","onFocus","countDecimals","decimalValue","validateInputEntry","$event","ctrlKey","key","validity","inputValue","step","preventDefault","getValueInRange","minvalue","maxvalue","required","isInteger","resetValidations","onPropertyChange","name","$new","$old","isDefault","bind"],"sources":["basenumber.component.ts"],"sourcesContent":["import { includes, intersection, isNaN, isFinite, toArray } from 'lodash';\nimport BaseNumberProps from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.props';\nimport { BaseComponent, BaseComponentState } from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport { BaseNumberStyles } from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.styles';\nimport { DEFAULT_CLASS } from \"@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.styles\";\nimport { Platform, TextInput } from 'react-native';\nimport { validateField } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class BaseNumberState <T extends BaseNumberProps> extends BaseComponentState<T> {\n isValid: boolean = true;\n textValue: string = '';\n isDefault = false;\n errorType = '';\n}\n\nexport abstract class BaseNumberComponent< T extends BaseNumberProps, S extends BaseNumberState<T>, L extends BaseNumberStyles> extends BaseComponent<T, S, L> {\n private DECIMAL;\n private GROUP;\n public widgetRef: TextInput | null = null;\n private cursor: any = 0;\n constructor(props: T, public defaultClass: string = DEFAULT_CLASS, defaultProps?: T, defaultState?: S) {\n super(props, defaultClass, defaultProps, defaultState);\n this.DECIMAL = '.';\n this.GROUP = ',';\n }\n\n onChange(event: any) {\n if (this.state.props.updateon === 'default') {\n this.updateDatavalue(event.target.value, event);\n }\n }\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n onChangeText(value: any) {\n this.updateState({\n textValue: value\n } as S, () => {\n if (this.state.props.updateon === 'default') {\n this.validate(value);\n this.updateDatavalue(value, null);\n }\n }\n );\n }\n\n invokeChange(e: any) {\n if (Platform.OS === 'web') {\n this.cursor = e.target.selectionStart;\n this.setState({ textValue: e.target.value });\n }\n }\n\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.updateState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as S);\n\n }\n\n handleValidation(value: any) {\n const props = this.state.props;\n if (props.regexp) {\n const condition = new RegExp(props.regexp, 'g');\n return condition.test(value);\n }\n return true;\n }\n\n /**\n * Method parses the Localized number(string) to a valid number.\n * if the string dose not result to a valid number then returns NaN.\n * @param {string} val Localized number.\n * @returns {number}\n */\n private parseNumber(val: string): any {\n // splits string into two parts. decimal and number.\n const parts = val.split(this.DECIMAL);\n if (!parts.length) {\n return;\n }\n if (parts.length > 2) {\n return NaN;\n }\n // If number have decimal point and not have a decimal value then return.\n if (parts[1] === '') {\n return NaN;\n }\n // replaces all group separators form the number.\n const number = Number(parts[0].split(this.GROUP).join(''));\n const decimal = Number(`0.${parts[1] || 0}`);\n if (Number.isNaN(number) || Number.isNaN(decimal)) {\n return NaN;\n }\n const sum = parts.length > 1 ? parseFloat((number + decimal).toFixed(parts[1].length)) : number + decimal;\n // if the number is negative then calculate the number as number - decimal\n // Ex: number = -123 and decimal = 0.45 then number - decimal = -123-045 = -123.45\n // If entered number is -0.1 to -0.9 then the number is -0 and decimal is 0.1 to 0.9. Now calaculate the number as number-decimal\n // Ex: number = -0 and decimal = 0.1 then number-decimal = -0-0.1 = -0.1\n if (number === 0) {\n return Object.is(0, number) ? sum : number - decimal;\n }\n return number > 0 ? sum : number - decimal;\n }\n\n updateDatavalue(value: any, event?: any, source?: any) {\n const model = value && this.parseNumber(value.toString());\n const props = this.state.props;\n const oldValue = props.datavalue;\n if (value === oldValue) {\n return;\n }\n const validNumber = this.isValidNumber(model);\n if (!validNumber) {\n this.invokeEventCallback('onError', [ event, this.proxy, value, oldValue ]);\n return;\n }\n\n this.updateState({\n props: {\n datavalue: model\n }\n } as S, () => {\n !this.props.onFieldChange && value !== oldValue && this.invokeEventCallback('onChange', [event, this.proxy, value, oldValue]);\n if (source === 'blur') {\n this.invokeEventCallback('onBlur', [event, this.proxy]);\n }\n });\n }\n\n onBlur(event: any) {\n let newVal = event.target.value || this.state.textValue;\n this.validate(newVal);\n if (newVal === '') {\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n })\n }\n if (this.state.props.updateon === 'blur') {\n let oldVal = this.state.props.datavalue || '';\n if (oldVal !== newVal) {\n this.updateDatavalue(newVal, event, 'blur');\n } else {\n this.invokeEventCallback('onBlur', [event, this.proxy]);\n }\n }\n }\n\n onFocus(event: any) {\n this.invokeEventCallback('onFocus', [ event, this.proxy]);\n }\n\n /**\n * returns the number of decimal places a number have.\n * @param value: number\n * @returns {number}\n */\n private countDecimals(value: any) {\n if (value && ((value % 1) !== 0)) {\n const decimalValue = value.toString().split('.')[1];\n return decimalValue && decimalValue.length;\n }\n return 0;\n }\n\n public validateInputEntry($event: any) {\n const props = this.state.props;\n\n // allow actions if control key is pressed or if backspace is pressed. (for Mozilla).\n if ($event.ctrlKey || includes(['Backspace', 'ArrowRight', 'ArrowLeft', 'Tab', 'Enter', 'Delete'], $event.key)) {\n return;\n }\n\n const validity = new RegExp(`^[\\\\d\\\\s-,.e+${this.GROUP}${this.DECIMAL}]$`, 'i');\n const inputValue = $event.target.value;\n // validates entering of decimal values only when user provides decimal limit(i.e step contains decimal values).\n if (inputValue && this.countDecimals(props.step) && (this.countDecimals(inputValue) >= this.countDecimals(props.step))) {\n $event.preventDefault();\n }\n // validates if user entered an invalid character.\n if (!validity.test($event.key)) {\n $event.preventDefault();\n }\n // a decimal value can be entered only once in the input.\n if (includes(inputValue, this.DECIMAL) && $event.key === this.DECIMAL) {\n $event.preventDefault();\n }\n // 'e' can be entered only once in the input.\n if (intersection(toArray(inputValue), ['e', 'E']).length && includes('eE', $event.key)) {\n $event.preventDefault();\n }\n if ((includes(inputValue, '+') || includes(inputValue, '-')) && ($event.key === '+' || $event.key === '-')) {\n $event.preventDefault();\n }\n this.invokeEventCallback('onKeypress', [ $event, this.proxy]);\n }\n\n /**\n * returns a valid number by validating the minimum and maximum values.\n * @param {number} value\n * @returns {number}\n */\n private getValueInRange(value: number): number {\n const props = this.state.props;\n if (!isNaN(props.minvalue) && value < props.minvalue) {\n this.updateState({ errorType: 'minvalue'} as S);\n return props.minvalue;\n\n }\n if (!isNaN(props.maxvalue) && value > props.maxvalue) {\n this.updateState({ errorType: 'maxvalue'} as S);\n return props.maxvalue;\n }\n return value;\n }\n\n /**\n * Adds validations for the number before updating the widget model. like validating min and max value for the widget.\n * @param {number} val number to be validated\n * @returns {number}\n */\n private isValidNumber(val: number): boolean {\n const props = this.state.props;\n\n //empty number widget should not show validation error when required is false\n // @ts-ignore\n if (this.state.props.required === false && val === '') {\n return true;\n }\n // id number is infinite then consider it as invalid value\n if (isNaN(val) || !isFinite(val) || (!Number.isInteger(props.step) &&\n this.countDecimals(val) > this.countDecimals(props.step))) {\n this.updateState({\n isValid: false,\n } as S);\n return false;\n }\n if (val !== this.getValueInRange(val)) {\n this.updateState({\n isValid: false,\n } as S);\n return true;\n }\n this.resetValidations();\n return true;\n }\n\n // resets all the flags related to the widget's validation.\n protected resetValidations() {\n this.updateState({\n isValid: true,\n } as S);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'minvalue':\n case 'maxvalue':\n if ($new|| $old) {\n this.isValidNumber($new);\n }\n break;\n case 'datavalue':\n this.updateState({\n textValue: $new\n } as S\n );\n const isDefault = this.state.isDefault;\n if (isDefault) {\n this.updateState({ isDefault: false } as S, this.props.onFieldChange && this.props.onFieldChange.bind(this, 'datavalue', $new, $old, isDefault));\n } else {\n this.props.onFieldChange && this.props.onFieldChange('datavalue', $new, $old, isDefault);\n }\n }\n }\n}\n"],"mappings":";;;AAAA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,OAAO,QAAQ,QAAQ;AAEzE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,aAAa,QAAQ,wEAAwE;AACtG,SAASC,QAAQ,QAAmB,cAAc;AAClD,SAASC,aAAa,QAAQ,sCAAsC;AAEpE,OAAO,MAAMC,eAAe,SAAqCJ,kBAAkB,CAAI;EAAAK,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,kBAClE,IAAI;IAAAA,eAAA,oBACH,EAAE;IAAAA,eAAA,oBACV,KAAK;IAAAA,eAAA,oBACL,EAAE;EAAA;AAChB;AAEA,OAAO,MAAeC,mBAAmB,SAA+FT,aAAa,CAAU;EAK7JM,WAAWA,CAACI,KAAQ,EAAmF;IAAA,IAA1EC,YAAoB,GAAAJ,SAAA,CAAAK,MAAA,QAAAL,SAAA,QAAAM,SAAA,GAAAN,SAAA,MAAGL,aAAa;IAAA,IAAEY,YAAgB,GAAAP,SAAA,CAAAK,MAAA,OAAAL,SAAA,MAAAM,SAAA;IAAA,IAAEE,YAAgB,GAAAR,SAAA,CAAAK,MAAA,OAAAL,SAAA,MAAAM,SAAA;IACnG,KAAK,CAACH,KAAK,EAAEC,YAAY,EAAEG,YAAY,EAAEC,YAAY,CAAC;IAAC,KAD5BJ,YAAoB,GAApBA,YAAoB;IAAAH,eAAA;IAAAA,eAAA;IAAAA,eAAA,oBAFZ,IAAI;IAAAA,eAAA,iBACnB,CAAC;IAGrB,IAAI,CAACQ,OAAO,GAAG,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IAAI,CAACtF,KAAK,CAAC2D,aAAa,IAAI,IAAI,CAAC3D,KAAK,CAAC2D,aAAa,CAAC,WAAW,EAAEyB,IAAI,EAAEC,IAAI,EAAEC,SAAS,CAAC;QAC1F;IACJ;EACF;AACF"}
|
|
1
|
+
{"version":3,"names":["includes","intersection","isNaN","isFinite","toArray","isNil","BaseComponent","BaseComponentState","DEFAULT_CLASS","Platform","countDecimalDigits","validateField","BaseNumberState","constructor","arguments","_defineProperty","BaseNumberComponent","props","defaultClass","length","undefined","defaultProps","defaultState","DECIMAL","GROUP","onChange","event","state","updateon","updateDatavalue","target","value","focus","_this$widgetRef","widgetRef","validateOnDevice","type","_value$match","isCurrencyField","isValidText","test","Number","match","onChangeText","isValidTextOnDevice","decimalPlacesInNumber","decimalPlaces","updateState","textValue","validate","invokeChange","e","OS","cursor","selectionStart","setState","validationObj","isValid","errorType","handleValidation","regexp","condition","RegExp","parseNumber","val","parts","split","NaN","number","join","decimal","sum","parseFloat","toFixed","Object","is","source","model","toString","oldValue","datavalue","validNumber","isValidNumber","invokeEventCallback","proxy","onFieldChange","onBlur","newVal","setTimeout","triggerValidation","oldVal","onFocus","countDecimals","decimalValue","validateInputEntry","$event","ctrlKey","key","validity","inputValue","step","preventDefault","getValueInRange","minvalue","maxvalue","required","isInteger","resetValidations","onPropertyChange","name","$new","$old","isDefault","bind"],"sources":["basenumber.component.ts"],"sourcesContent":["import { includes, intersection, isNaN, isFinite, toArray, isNil } from 'lodash';\nimport BaseNumberProps from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.props';\nimport { BaseComponent, BaseComponentState } from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport { BaseNumberStyles } from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.styles';\nimport { DEFAULT_CLASS } from \"@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.styles\";\nimport { Platform, TextInput } from 'react-native';\nimport { countDecimalDigits, validateField } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class BaseNumberState <T extends BaseNumberProps> extends BaseComponentState<T> {\n isValid: boolean = true;\n textValue: string = '';\n isDefault = false;\n errorType = '';\n}\n\nexport abstract class BaseNumberComponent< T extends BaseNumberProps, S extends BaseNumberState<T>, L extends BaseNumberStyles> extends BaseComponent<T, S, L> {\n private DECIMAL;\n private GROUP;\n public widgetRef: TextInput | null = null;\n private cursor: any = 0;\n constructor(props: T, public defaultClass: string = DEFAULT_CLASS, defaultProps?: T, defaultState?: S) {\n super(props, defaultClass, defaultProps, defaultState);\n this.DECIMAL = '.';\n this.GROUP = ',';\n }\n\n onChange(event: any) {\n if (this.state.props.updateon === 'default') {\n this.updateDatavalue(event.target.value, event);\n }\n }\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n validateOnDevice(value: string, type: 'number' | 'currency') {\n const isCurrencyField = type === 'currency';\n let isValidText = true;\n\n // * no alphabets except E, may contain E only once\n if (/[a-df-zA-DF-Z]/.test(value) || !/^[^eE]*[eE]?[^eE]*$/.test(value)) {\n isValidText = false;\n }\n\n // * currency only: check for negative number\n if (isCurrencyField && (Number(value) < 0 || /-/g.test(value))) {\n isValidText = false;\n }\n\n // * number only: not more than one minus and doesn't end with minus (-)\n if (!isCurrencyField && (Number(value.match(/-/g)?.length) > 1) || /\\w-/.test(value)) {\n isValidText = false;\n }\n\n // * check for more than one decimal point\n if (/^\\d*\\.\\d*\\..*$/.test(value)) {\n isValidText = false;\n }\n\n // * check for spaces and comma\n if (/[\\s,]/.test(value)) {\n isValidText = false;\n }\n\n return isValidText;\n }\n\n onChangeText(value: string, type: 'number' | 'currency') {\n const isValidTextOnDevice = this.validateOnDevice(value, type);\n if (!isValidTextOnDevice) {\n return;\n }\n\n const decimalPlacesInNumber = countDecimalDigits(value);\n\n if (this.props.decimalPlaces < decimalPlacesInNumber) {\n return;\n }\n\n this.updateState({\n textValue: value\n } as S, () => {\n if (this.state.props.updateon === 'default') {\n this.validate(value);\n this.updateDatavalue(value, null);\n }\n }\n );\n }\n\n invokeChange(e: any) {\n if (Platform.OS === 'web') {\n this.cursor = e.target.selectionStart;\n this.setState({ textValue: e.target.value });\n }\n }\n\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.updateState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as S);\n\n }\n\n handleValidation(value: any) {\n const props = this.state.props;\n if (props.regexp) {\n const condition = new RegExp(props.regexp, 'g');\n return condition.test(value);\n }\n return true;\n }\n\n /**\n * Method parses the Localized number(string) to a valid number.\n * if the string dose not result to a valid number then returns NaN.\n * @param {string} val Localized number.\n * @returns {number}\n */\n private parseNumber(val: string): any {\n // splits string into two parts. decimal and number.\n const parts = val.split(this.DECIMAL);\n if (!parts.length) {\n return;\n }\n if (parts.length > 2) {\n return NaN;\n }\n // If number have decimal point and not have a decimal value then return.\n if (parts[1] === '') {\n return NaN;\n }\n // replaces all group separators form the number.\n const number = Number(parts[0].split(this.GROUP).join(''));\n const decimal = Number(`0.${parts[1] || 0}`);\n if (Number.isNaN(number) || Number.isNaN(decimal)) {\n return NaN;\n }\n const sum = parts.length > 1 ? parseFloat((number + decimal).toFixed(parts[1].length)) : number + decimal;\n // if the number is negative then calculate the number as number - decimal\n // Ex: number = -123 and decimal = 0.45 then number - decimal = -123-045 = -123.45\n // If entered number is -0.1 to -0.9 then the number is -0 and decimal is 0.1 to 0.9. Now calaculate the number as number-decimal\n // Ex: number = -0 and decimal = 0.1 then number-decimal = -0-0.1 = -0.1\n if (number === 0) {\n return Object.is(0, number) ? sum : number - decimal;\n }\n return number > 0 ? sum : number - decimal;\n }\n\n updateDatavalue(value: any, event?: any, source?: any) {\n const model = value && this.parseNumber(value.toString());\n const props = this.state.props;\n const oldValue = props.datavalue;\n if (value === oldValue) {\n return;\n }\n const validNumber = this.isValidNumber(model);\n if (!validNumber) {\n this.invokeEventCallback('onError', [ event, this.proxy, value, oldValue ]);\n return;\n }\n\n this.updateState({\n props: {\n datavalue: model\n }\n } as S, () => {\n !this.props.onFieldChange && value !== oldValue && this.invokeEventCallback('onChange', [event, this.proxy, model, oldValue]);\n if (source === 'blur') {\n this.invokeEventCallback('onBlur', [event, this.proxy]);\n }\n });\n }\n\n onBlur(event: any) {\n let newVal = event.target.value || this.state.textValue;\n this.validate(newVal);\n if (newVal === '') {\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n })\n }\n if (this.state.props.updateon === 'blur') {\n let oldVal = this.state.props.datavalue || '';\n if (oldVal !== newVal) {\n this.updateDatavalue(newVal, event, 'blur');\n } else {\n this.invokeEventCallback('onBlur', [event, this.proxy]);\n }\n }\n }\n\n onFocus(event: any) {\n this.invokeEventCallback('onFocus', [ event, this.proxy]);\n }\n\n /**\n * returns the number of decimal places a number have.\n * @param value: number\n * @returns {number}\n */\n private countDecimals(value: any) {\n if (value && ((value % 1) !== 0)) {\n const decimalValue = value.toString().split('.')[1];\n return decimalValue && decimalValue.length;\n }\n return 0;\n }\n\n public validateInputEntry($event: any) {\n const props = this.state.props;\n\n // allow actions if control key is pressed or if backspace is pressed. (for Mozilla).\n if ($event.ctrlKey || includes(['Backspace', 'ArrowRight', 'ArrowLeft', 'Tab', 'Enter', 'Delete'], $event.key)) {\n return;\n }\n\n const validity = new RegExp(`^[\\\\d\\\\s-,.e+${this.GROUP}${this.DECIMAL}]$`, 'i');\n const inputValue = $event.target.value;\n // validates entering of decimal values only when user provides decimal limit(i.e step contains decimal values).\n if (inputValue && this.countDecimals(props.step) && (this.countDecimals(inputValue) >= this.countDecimals(props.step))) {\n $event.preventDefault();\n }\n // validates if user entered an invalid character.\n if (!validity.test($event.key)) {\n $event.preventDefault();\n }\n // a decimal value can be entered only once in the input.\n if (includes(inputValue, this.DECIMAL) && $event.key === this.DECIMAL) {\n $event.preventDefault();\n }\n // 'e' can be entered only once in the input.\n if (intersection(toArray(inputValue), ['e', 'E']).length && includes('eE', $event.key)) {\n $event.preventDefault();\n }\n if ((includes(inputValue, '+') || includes(inputValue, '-')) && ($event.key === '+' || $event.key === '-')) {\n $event.preventDefault();\n }\n this.invokeEventCallback('onKeypress', [ $event, this.proxy]);\n }\n\n /**\n * returns a valid number by validating the minimum and maximum values.\n * @param {number} value\n * @returns {number}\n */\n private getValueInRange(value: number): number {\n const props = this.state.props;\n if (!isNil(null) && !isNaN(props.minvalue) && value < props.minvalue) {\n this.updateState({ errorType: 'minvalue'} as S);\n return props.minvalue;\n\n }\n if (!isNil(null) && !isNaN(props.maxvalue) && value > props.maxvalue) {\n this.updateState({ errorType: 'maxvalue'} as S);\n return props.maxvalue;\n }\n return value;\n }\n\n /**\n * Adds validations for the number before updating the widget model. like validating min and max value for the widget.\n * @param {number} val number to be validated\n * @returns {number}\n */\n private isValidNumber(val: number): boolean {\n const props = this.state.props;\n\n //empty number widget should not show validation error when required is false\n // @ts-ignore\n if (this.state.props.required === false && val === '') {\n return true;\n }\n // id number is infinite then consider it as invalid value\n if (isNaN(val) || !isFinite(val) || (!Number.isInteger(props.step) &&\n this.countDecimals(val) > this.countDecimals(props.step))) {\n this.updateState({\n isValid: false,\n } as S);\n return false;\n }\n if (val !== this.getValueInRange(val)) {\n this.updateState({\n isValid: false,\n } as S);\n return true;\n }\n this.resetValidations();\n return true;\n }\n\n // resets all the flags related to the widget's validation.\n protected resetValidations() {\n this.updateState({\n isValid: true,\n } as S);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'minvalue':\n case 'maxvalue':\n if ($new|| $old) {\n this.isValidNumber($new);\n }\n break;\n case 'datavalue':\n this.updateState({\n textValue: $new,\n } as S);\n const isDefault = this.state.isDefault;\n if (isDefault) {\n this.updateState({ isDefault: false } as S, this.props.onFieldChange && this.props.onFieldChange.bind(this, 'datavalue', $new, $old, isDefault));\n } else {\n this.props.onFieldChange && this.props.onFieldChange('datavalue', $new, $old, isDefault);\n }\n }\n }\n}\n"],"mappings":";;;AAAA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,KAAK,QAAQ,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;MACP,OAAO,KAAK;IACd;IACA,IAAIO,GAAG,KAAK,IAAI,CAACsC,eAAe,CAACtC,GAAG,CAAC,EAAE;MACrC,IAAI,CAACjB,WAAW,CAAC;QACfU,OAAO,EAAE;MACX,CAAM,CAAC;MACP,OAAO,IAAI;IACb;IACA,IAAI,CAACkD,gBAAgB,CAAC,CAAC;IACvB,OAAO,IAAI;EACb;;EAEA;EACUA,gBAAgBA,CAAA,EAAG;IAC3B,IAAI,CAAC5D,WAAW,CAAC;MACfU,OAAO,EAAE;IACX,CAAM,CAAC;EACT;EAEAmD,gBAAgBA,CAACC,IAAY,EAAEC,IAAS,EAAEC,IAAS,EAAE;IACnD,QAAQF,IAAI;MACV,KAAK,UAAU;MACf,KAAK,UAAU;QACb,IAAIC,IAAI,IAAGC,IAAI,EAAE;UACf,IAAI,CAAC7B,aAAa,CAAC4B,IAAI,CAAC;QAC1B;QACA;MACF,KAAK,WAAW;QACd,IAAI,CAAC/D,WAAW,CAAC;UACfC,SAAS,EAAE8D;QACb,CAAM,CAAC;QACP,MAAME,SAAS,GAAG,IAAI,CAACrF,KAAK,CAACqF,SAAS;QACtC,IAAIA,SAAS,EAAE;UACb,IAAI,CAACjE,WAAW,CAAC;YAAEiE,SAAS,EAAE;UAAM,CAAC,EAAO,IAAI,CAAC/F,KAAK,CAACoE,aAAa,IAAI,IAAI,CAACpE,KAAK,CAACoE,aAAa,CAAC4B,IAAI,CAAC,IAAI,EAAE,WAAW,EAAEH,IAAI,EAAEC,IAAI,EAAEC,SAAS,CAAC,CAAC;QAClJ,CAAC,MAAM;UACL,IAAI,CAAC/F,KAAK,CAACoE,aAAa,IAAI,IAAI,CAACpE,KAAK,CAACoE,aAAa,CAAC,WAAW,EAAEyB,IAAI,EAAEC,IAAI,EAAEC,SAAS,CAAC;QAC1F;IACJ;EACF;AACF"}
|
|
@@ -15,6 +15,7 @@ export default class BaseNumberProps extends BaseProps {
|
|
|
15
15
|
_defineProperty(this, "onFieldChange", void 0);
|
|
16
16
|
_defineProperty(this, "required", false);
|
|
17
17
|
_defineProperty(this, "triggerValidation", void 0);
|
|
18
|
+
_defineProperty(this, "decimalPlaces", 2);
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
//# sourceMappingURL=basenumber.props.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseProps","BaseNumberProps","constructor","arguments","_defineProperty"],"sources":["basenumber.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class BaseNumberProps extends BaseProps {\n datavalue: any;\n minvalue: number = null as any;\n maxvalue: number = null as any;\n step: number = 1;\n updateon: string = 'blur' as any;\n readonly: boolean = null as any;\n regexp: string = null as any;\n onFieldChange: any;\n required: boolean = false;\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;IAAAA,eAAA,mBAElC,IAAI;IAAAA,eAAA,mBACJ,IAAI;IAAAA,eAAA,eACR,CAAC;IAAAA,eAAA,mBACG,MAAM;IAAAA,eAAA,mBACL,IAAI;IAAAA,eAAA,iBACP,IAAI;IAAAA,eAAA;IAAAA,eAAA,mBAED,KAAK;IAAAA,eAAA;EAAA;
|
|
1
|
+
{"version":3,"names":["BaseProps","BaseNumberProps","constructor","arguments","_defineProperty"],"sources":["basenumber.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class BaseNumberProps extends BaseProps {\n datavalue: any;\n minvalue: number = null as any;\n maxvalue: number = null as any;\n step: number = 1;\n updateon: string = 'blur' as any;\n readonly: boolean = null as any;\n regexp: string = null as any;\n onFieldChange: any;\n required: boolean = false;\n triggerValidation: any;\n decimalPlaces: number = 2;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,eAAe,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;IAAAA,eAAA,mBAElC,IAAI;IAAAA,eAAA,mBACJ,IAAI;IAAAA,eAAA,eACR,CAAC;IAAAA,eAAA,mBACG,MAAM;IAAAA,eAAA,mBACL,IAAI;IAAAA,eAAA,iBACP,IAAI;IAAAA,eAAA;IAAAA,eAAA,mBAED,KAAK;IAAAA,eAAA;IAAAA,eAAA,wBAED,CAAC;EAAA;AAC3B"}
|
|
@@ -114,18 +114,22 @@ export default class WmCalendar extends BaseComponent {
|
|
|
114
114
|
currentDayTextStyle: this.styles.todayText,
|
|
115
115
|
notDayOfCurrentMonthStyle: this.styles.notDayOfCurrentMonth,
|
|
116
116
|
renderPrevYearButton: () => /*#__PURE__*/React.createElement(WmIcon, {
|
|
117
|
+
id: this.getTestId('prevyearicon'),
|
|
117
118
|
iconclass: "wi wi-angle-double-left",
|
|
118
119
|
styles: this.styles.prevYearBtn
|
|
119
120
|
}),
|
|
120
121
|
renderPrevMonthButton: () => /*#__PURE__*/React.createElement(WmIcon, {
|
|
122
|
+
id: this.getTestId('prevmonthicon'),
|
|
121
123
|
iconclass: "wi wi-chevron-left fa-2x",
|
|
122
124
|
styles: this.styles.prevMonthBtn
|
|
123
125
|
}),
|
|
124
126
|
renderNextMonthButton: () => /*#__PURE__*/React.createElement(WmIcon, {
|
|
127
|
+
id: this.getTestId('nextmonthicon'),
|
|
125
128
|
iconclass: "wi wi-chevron-right fa-2x",
|
|
126
129
|
styles: this.styles.nextMonthBtn
|
|
127
130
|
}),
|
|
128
131
|
renderNextYearButton: () => /*#__PURE__*/React.createElement(WmIcon, {
|
|
132
|
+
id: this.getTestId('nextyearicon'),
|
|
129
133
|
iconclass: "wi wi-angle-double-right",
|
|
130
134
|
styles: this.styles.nextYearBtn
|
|
131
135
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","isString","moment","BaseComponent","BaseComponentState","MonthView","WmCalendarProps","DEFAULT_CLASS","WmIcon","WmCalendarState","constructor","arguments","_defineProperty","Map","DEFAULT_DATE_FORMAT","WmCalendar","props","date","d","format","dateWindow","state","calendar","get","updateState","datavalue","selectedDate","invokeEventCallback","events","createElement","iconclass","iconsize","styles","root","marginTop","alignSelf","icon","Math","min","length","Fragment","prepareDataset","dataset","eventStartKey","eventstart","forEach","startDate","has","set","push","onPropertyChange","name","$new","$old","componentDidUpdate","prevProps","prevState","snapshot","renderWidget","style","_background","selectDate","onDateChange","renderChildDay","renderDay","containerStyle","dateSelectedWarpDayStyle","selectedDay","selectedDayTextStyle","selectedDayText","warpRowWeekdays","weekDay","warpRowControlMonthYear","calendarHeader","weekdayStyle","weekDayText","warpDayStyle","dayWrapper","textDayStyle","day","yearTextStyle","yearText","monthTextStyle","monthText","currentDayStyle","today","currentDayTextStyle","todayText","notDayOfCurrentMonthStyle","notDayOfCurrentMonth","renderPrevYearButton","prevYearBtn","renderPrevMonthButton","prevMonthBtn","renderNextMonthButton","nextMonthBtn","renderNextYearButton","nextYearBtn"],"sources":["calendar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { isString } from 'lodash';\nimport moment, { Moment } from 'moment';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport { MonthView } from './views/month-view';\nimport WmCalendarProps from './calendar.props';\nimport { DEFAULT_CLASS, WmCalendarStyles } from './calendar.styles';\nimport WmIcon from '../../basic/icon/icon.component';\n\nexport class WmCalendarState extends BaseComponentState<WmCalendarProps> {\n selectedDate: Moment = moment();\n calendar: Map<String, { date: number, events: any []}> = new Map();\n}\n\nconst DEFAULT_DATE_FORMAT = 'DD-MM-YYYY';\n\nexport default class WmCalendar extends BaseComponent<WmCalendarProps, WmCalendarState, WmCalendarStyles> {\n\n constructor(props: WmCalendarProps) {\n super(props, DEFAULT_CLASS, new WmCalendarProps(), new WmCalendarState());\n }\n\n onDateChange = (date: Moment) => {\n const d = moment(date).format(DEFAULT_DATE_FORMAT);\n const dateWindow = this.state.calendar.get(d);\n this.updateState({\n props: {datavalue: d},\n selectedDate: date\n } as WmCalendarState);\n this.invokeEventCallback('onSelect', [d, d, this, dateWindow?.events]);\n }\n\n prepareDataset(dataset: any[]) {\n if (!dataset) {\n return;\n }\n const state = {\n calendar: new Map()\n } as WmCalendarState;\n const eventStartKey = this.state.props.eventstart;\n dataset.forEach(d => {\n let startDate = d[eventStartKey];\n if (!isString(startDate)) {\n startDate = moment(startDate).format(DEFAULT_DATE_FORMAT);\n }\n if (!state.calendar.has(startDate)) {\n state.calendar.set(startDate, {\n date: moment(startDate, DEFAULT_DATE_FORMAT).get('milliseconds'),\n events: []\n });\n }\n const dateWindow = state.calendar.get(startDate);\n dateWindow?.events.push(d);\n });\n this.updateState(state);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'dataset':\n this.prepareDataset($new);\n break;\n case 'datavalue':\n if ($new) {\n this.updateState({\n selectedDate: isString($new) ? moment($new, DEFAULT_DATE_FORMAT) : moment($new)\n } as WmCalendarState)\n }\n }\n }\n\n renderDay = (date: Moment) => {\n const dateWindow = this.state.calendar.get(moment(date).format(DEFAULT_DATE_FORMAT));\n if (dateWindow) {\n return (\n <WmIcon\n iconclass=\"fa fa-circle\"\n iconsize={8}\n styles={{\n root: {marginTop: -8, alignSelf: 'flexStart'},\n icon: this.styles['eventDay' + Math.min(3, dateWindow.events.length)]}}></WmIcon>\n );\n }\n return (<></>);\n }\n\n componentDidUpdate(prevProps: WmCalendarProps, prevState: WmCalendarState, snapshot: any) {\n super.componentDidUpdate && super.componentDidUpdate(prevProps, prevState, snapshot);\n this.invokeEventCallback('onViewrender', [this, null]);\n }\n\n renderWidget(props: WmCalendarProps) {\n this.invokeEventCallback('onBeforerender', [null, this]);\n return (\n <View style={this.styles.root}>\n {this._background}\n <MonthView\n date={this.state.selectedDate}\n selectDate={this.onDateChange}\n format={DEFAULT_DATE_FORMAT}\n renderChildDay={this.renderDay}\n containerStyle={this.styles.calendar}\n dateSelectedWarpDayStyle={this.styles.selectedDay}\n selectedDayTextStyle={this.styles.selectedDayText}\n warpRowWeekdays={this.styles.weekDay}\n warpRowControlMonthYear={this.styles.calendarHeader}\n weekdayStyle={this.styles.weekDayText}\n warpDayStyle={this.styles.dayWrapper}\n textDayStyle={this.styles.day}\n yearTextStyle={this.styles.yearText}\n monthTextStyle={this.styles.monthText}\n currentDayStyle={this.styles.today}\n currentDayTextStyle={this.styles.todayText}\n notDayOfCurrentMonthStyle={this.styles.notDayOfCurrentMonth}\n renderPrevYearButton={() =>\n (<WmIcon iconclass=\"wi wi-angle-double-left\" styles={this.styles.prevYearBtn}/>)}\n renderPrevMonthButton={() =>\n (<WmIcon iconclass=\"wi wi-chevron-left fa-2x\" styles={this.styles.prevMonthBtn}/>)}\n renderNextMonthButton={() =>\n (<WmIcon iconclass=\"wi wi-chevron-right fa-2x\" styles={this.styles.nextMonthBtn}/>)}\n renderNextYearButton={() =>\n (<WmIcon iconclass=\"wi wi-angle-double-right\" styles={this.styles.nextYearBtn}/>)}\n />\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,QAAQ,QAAQ,QAAQ;AACjC,OAAOC,MAAM,MAAkB,QAAQ;AACvC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,OAAOC,MAAM,MAAM,iCAAiC;AAEpD,OAAO,MAAMC,eAAe,SAASL,kBAAkB,CAAkB;EAAAM,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,uBAChDV,MAAM,CAAC,CAAC;IAAAU,eAAA,mBAC0B,IAAIC,GAAG,CAAC,CAAC;EAAA;AACpE;AAEA,MAAMC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AAC1C,MAAM,CAAC2C,WAAY;MACtCC,YAAY,EAAE,IAAI,CAAC5C,MAAM,CAAC6C,UAAW;MACrCC,YAAY,EAAE,IAAI,CAAC9C,MAAM,CAAC+C,GAAI;MAC9BC,aAAa,EAAE,IAAI,CAAChD,MAAM,CAACiD,QAAS;MACpCC,cAAc,EAAE,IAAI,CAAClD,MAAM,CAACmD,SAAU;MACtCC,eAAe,EAAE,IAAI,CAACpD,MAAM,CAACqD,KAAM;MACnCC,mBAAmB,EAAE,IAAI,CAACtD,MAAM,CAACuD,SAAU;MAC3CC,yBAAyB,EAAE,IAAI,CAACxD,MAAM,CAACyD,oBAAqB;MAC5DC,oBAAoB,EAAEA,CAAA,kBACnB3F,KAAA,CAAA8B,aAAA,CAACrB,MAAM;QAACsB,SAAS,EAAC,yBAAyB;QAACE,MAAM,EAAE,IAAI,CAACA,MAAM,CAAC2D;MAAY,CAAC,CAAG;MACnFC,qBAAqB,EAAEA,CAAA,kBACpB7F,KAAA,CAAA8B,aAAA,CAACrB,MAAM;QAACsB,SAAS,EAAC,0BAA0B;QAACE,MAAM,EAAE,IAAI,CAACA,MAAM,CAAC6D;MAAa,CAAC,CAAG;MACrFC,qBAAqB,EAAEA,CAAA,kBAClB/F,KAAA,CAAA8B,aAAA,CAACrB,MAAM;QAACsB,SAAS,EAAC,2BAA2B;QAACE,MAAM,EAAE,IAAI,CAACA,MAAM,CAAC+D;MAAa,CAAC,CAAG;MACxFC,oBAAoB,EAAEA,CAAA,kBACjBjG,KAAA,CAAA8B,aAAA,CAACrB,MAAM;QAACsB,SAAS,EAAC,0BAA0B;QAACE,MAAM,EAAE,IAAI,CAACA,MAAM,CAACiE;MAAY,CAAC;IAAG,CACvF,CACC,CAAC;EAEX;AACF"}
|
|
1
|
+
{"version":3,"names":["React","View","isString","moment","BaseComponent","BaseComponentState","MonthView","WmCalendarProps","DEFAULT_CLASS","WmIcon","WmCalendarState","constructor","arguments","_defineProperty","Map","DEFAULT_DATE_FORMAT","WmCalendar","props","date","d","format","dateWindow","state","calendar","get","updateState","datavalue","selectedDate","invokeEventCallback","events","createElement","iconclass","iconsize","styles","root","marginTop","alignSelf","icon","Math","min","length","Fragment","prepareDataset","dataset","eventStartKey","eventstart","forEach","startDate","has","set","push","onPropertyChange","name","$new","$old","componentDidUpdate","prevProps","prevState","snapshot","renderWidget","style","_background","selectDate","onDateChange","renderChildDay","renderDay","containerStyle","dateSelectedWarpDayStyle","selectedDay","selectedDayTextStyle","selectedDayText","warpRowWeekdays","weekDay","warpRowControlMonthYear","calendarHeader","weekdayStyle","weekDayText","warpDayStyle","dayWrapper","textDayStyle","day","yearTextStyle","yearText","monthTextStyle","monthText","currentDayStyle","today","currentDayTextStyle","todayText","notDayOfCurrentMonthStyle","notDayOfCurrentMonth","renderPrevYearButton","id","getTestId","prevYearBtn","renderPrevMonthButton","prevMonthBtn","renderNextMonthButton","nextMonthBtn","renderNextYearButton","nextYearBtn"],"sources":["calendar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { isString } from 'lodash';\nimport moment, { Moment } from 'moment';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport { MonthView } from './views/month-view';\nimport WmCalendarProps from './calendar.props';\nimport { DEFAULT_CLASS, WmCalendarStyles } from './calendar.styles';\nimport WmIcon from '../../basic/icon/icon.component';\n\nexport class WmCalendarState extends BaseComponentState<WmCalendarProps> {\n selectedDate: Moment = moment();\n calendar: Map<String, { date: number, events: any []}> = new Map();\n}\n\nconst DEFAULT_DATE_FORMAT = 'DD-MM-YYYY';\n\nexport default class WmCalendar extends BaseComponent<WmCalendarProps, WmCalendarState, WmCalendarStyles> {\n\n constructor(props: WmCalendarProps) {\n super(props, DEFAULT_CLASS, new WmCalendarProps(), new WmCalendarState());\n }\n\n onDateChange = (date: Moment) => {\n const d = moment(date).format(DEFAULT_DATE_FORMAT);\n const dateWindow = this.state.calendar.get(d);\n this.updateState({\n props: {datavalue: d},\n selectedDate: date\n } as WmCalendarState);\n this.invokeEventCallback('onSelect', [d, d, this, dateWindow?.events]);\n }\n\n prepareDataset(dataset: any[]) {\n if (!dataset) {\n return;\n }\n const state = {\n calendar: new Map()\n } as WmCalendarState;\n const eventStartKey = this.state.props.eventstart;\n dataset.forEach(d => {\n let startDate = d[eventStartKey];\n if (!isString(startDate)) {\n startDate = moment(startDate).format(DEFAULT_DATE_FORMAT);\n }\n if (!state.calendar.has(startDate)) {\n state.calendar.set(startDate, {\n date: moment(startDate, DEFAULT_DATE_FORMAT).get('milliseconds'),\n events: []\n });\n }\n const dateWindow = state.calendar.get(startDate);\n dateWindow?.events.push(d);\n });\n this.updateState(state);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'dataset':\n this.prepareDataset($new);\n break;\n case 'datavalue':\n if ($new) {\n this.updateState({\n selectedDate: isString($new) ? moment($new, DEFAULT_DATE_FORMAT) : moment($new)\n } as WmCalendarState)\n }\n }\n }\n\n renderDay = (date: Moment) => {\n const dateWindow = this.state.calendar.get(moment(date).format(DEFAULT_DATE_FORMAT));\n if (dateWindow) {\n return (\n <WmIcon\n iconclass=\"fa fa-circle\"\n iconsize={8}\n styles={{\n root: {marginTop: -8, alignSelf: 'flexStart'},\n icon: this.styles['eventDay' + Math.min(3, dateWindow.events.length)]}}></WmIcon>\n );\n }\n return (<></>);\n }\n\n componentDidUpdate(prevProps: WmCalendarProps, prevState: WmCalendarState, snapshot: any) {\n super.componentDidUpdate && super.componentDidUpdate(prevProps, prevState, snapshot);\n this.invokeEventCallback('onViewrender', [this, null]);\n }\n\n renderWidget(props: WmCalendarProps) {\n this.invokeEventCallback('onBeforerender', [null, this]);\n return (\n <View style={this.styles.root}>\n {this._background}\n <MonthView\n date={this.state.selectedDate}\n selectDate={this.onDateChange}\n format={DEFAULT_DATE_FORMAT}\n renderChildDay={this.renderDay}\n containerStyle={this.styles.calendar}\n dateSelectedWarpDayStyle={this.styles.selectedDay}\n selectedDayTextStyle={this.styles.selectedDayText}\n warpRowWeekdays={this.styles.weekDay}\n warpRowControlMonthYear={this.styles.calendarHeader}\n weekdayStyle={this.styles.weekDayText}\n warpDayStyle={this.styles.dayWrapper}\n textDayStyle={this.styles.day}\n yearTextStyle={this.styles.yearText}\n monthTextStyle={this.styles.monthText}\n currentDayStyle={this.styles.today}\n currentDayTextStyle={this.styles.todayText}\n notDayOfCurrentMonthStyle={this.styles.notDayOfCurrentMonth}\n renderPrevYearButton={() =>\n (<WmIcon id={this.getTestId('prevyearicon')} iconclass=\"wi wi-angle-double-left\" styles={this.styles.prevYearBtn}/>)}\n renderPrevMonthButton={() =>\n (<WmIcon id={this.getTestId('prevmonthicon')} iconclass=\"wi wi-chevron-left fa-2x\" styles={this.styles.prevMonthBtn}/>)}\n renderNextMonthButton={() =>\n (<WmIcon id={this.getTestId('nextmonthicon')} iconclass=\"wi wi-chevron-right fa-2x\" styles={this.styles.nextMonthBtn}/>)}\n renderNextYearButton={() =>\n (<WmIcon id={this.getTestId('nextyearicon')} iconclass=\"wi wi-angle-double-right\" styles={this.styles.nextYearBtn}/>)}\n />\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,QAAQ,QAAQ,QAAQ;AACjC,OAAOC,MAAM,MAAkB,QAAQ;AACvC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,OAAOC,MAAM,MAAM,iCAAiC;AAEpD,OAAO,MAAMC,eAAe,SAASL,kBAAkB,CAAkB;EAAAM,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,uBAChDV,MAAM,CAAC,CAAC;IAAAU,eAAA,mBAC0B,IAAIC,GAAG,CAAC,CAAC;EAAA;AACpE;AAEA,MAAMC,m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AAE,IAAI,CAACA,MAAM,CAACmE;MAAY,CAAC;IAAG,CAC5H,CACC,CAAC;EAEX;AACF"}
|
|
@@ -4,7 +4,9 @@ export const DEFAULT_CLASS = 'app-calendar';
|
|
|
4
4
|
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
5
5
|
const defaultStyles = defineStyles({
|
|
6
6
|
root: {
|
|
7
|
-
width: '100%'
|
|
7
|
+
width: '100%',
|
|
8
|
+
minHeight: 456,
|
|
9
|
+
minWidth: 360
|
|
8
10
|
},
|
|
9
11
|
text: {
|
|
10
12
|
color: themeVariables.calendarDateColor
|
|
@@ -16,7 +18,8 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
16
18
|
borderStyle: 'solid',
|
|
17
19
|
marginTop: 0,
|
|
18
20
|
paddingTop: 0,
|
|
19
|
-
paddingBottom: 0
|
|
21
|
+
paddingBottom: 0,
|
|
22
|
+
elevation: 6
|
|
20
23
|
},
|
|
21
24
|
calendarHeader: {
|
|
22
25
|
backgroundColor: themeVariables.calendarHeaderBgColor,
|
|
@@ -35,18 +38,23 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
35
38
|
},
|
|
36
39
|
weekDayText: {
|
|
37
40
|
color: themeVariables.calendarWeekDayTextColor,
|
|
38
|
-
fontWeight: '
|
|
41
|
+
fontWeight: '400',
|
|
42
|
+
fontFamily: themeVariables.baseFont,
|
|
43
|
+
fontSize: 16
|
|
39
44
|
},
|
|
40
45
|
day: {
|
|
41
46
|
borderColor: 'transparent',
|
|
42
|
-
color: themeVariables.calendarDateColor
|
|
47
|
+
color: themeVariables.calendarDateColor,
|
|
48
|
+
fontSize: 16,
|
|
49
|
+
fontFamily: themeVariables.baseFont,
|
|
50
|
+
fontWeight: '400'
|
|
43
51
|
},
|
|
44
52
|
dayWrapper: {
|
|
45
53
|
backgroundColor: themeVariables.calendarBgColor,
|
|
46
54
|
borderColor: 'transparent',
|
|
47
|
-
width:
|
|
48
|
-
height:
|
|
49
|
-
borderRadius:
|
|
55
|
+
width: 38,
|
|
56
|
+
height: 38,
|
|
57
|
+
borderRadius: 26
|
|
50
58
|
},
|
|
51
59
|
notDayOfCurrentMonth: {
|
|
52
60
|
color: themeVariables.calendarNotCurrentMonthDateColor,
|
|
@@ -54,18 +62,21 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
54
62
|
opacity: 0
|
|
55
63
|
},
|
|
56
64
|
monthText: {
|
|
57
|
-
fontWeight: '
|
|
65
|
+
fontWeight: '500',
|
|
66
|
+
fontFamily: themeVariables.baseFont,
|
|
58
67
|
color: themeVariables.calendarHeaderTextColor
|
|
59
68
|
},
|
|
60
69
|
yearText: {
|
|
61
|
-
fontWeight: '
|
|
70
|
+
fontWeight: '500',
|
|
71
|
+
fontFamily: themeVariables.baseFont,
|
|
62
72
|
color: themeVariables.calendarHeaderTextColor
|
|
63
73
|
},
|
|
64
74
|
today: {
|
|
65
|
-
backgroundColor: themeVariables.
|
|
75
|
+
backgroundColor: themeVariables.calendarBgColor,
|
|
76
|
+
borderColor: themeVariables.primaryColor
|
|
66
77
|
},
|
|
67
78
|
todayText: {
|
|
68
|
-
backgroundColor: themeVariables.
|
|
79
|
+
backgroundColor: themeVariables.calendarSelectedDayBgColor
|
|
69
80
|
},
|
|
70
81
|
eventDay1: {
|
|
71
82
|
color: themeVariables.calendarEventDay1Color
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","text","color","calendarDateColor","calendar","backgroundColor","calendarBgColor","borderColor","calendarHeaderBgColor","borderWidth","borderStyle","marginTop","paddingTop","paddingBottom","calendarHeader","borderBottomWidth","weekDay","padding","weekDayText","calendarWeekDayTextColor","fontWeight","day","dayWrapper","height","borderRadius","notDayOfCurrentMonth","calendarNotCurrentMonthDateColor","opacity","monthText","calendarHeaderTextColor","yearText","today","
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","minHeight","minWidth","text","color","calendarDateColor","calendar","backgroundColor","calendarBgColor","borderColor","calendarHeaderBgColor","borderWidth","borderStyle","marginTop","paddingTop","paddingBottom","elevation","calendarHeader","borderBottomWidth","weekDay","padding","weekDayText","calendarWeekDayTextColor","fontWeight","fontFamily","baseFont","fontSize","day","dayWrapper","height","borderRadius","notDayOfCurrentMonth","calendarNotCurrentMonthDateColor","opacity","monthText","calendarHeaderTextColor","yearText","today","primaryColor","todayText","calendarSelectedDayBgColor","eventDay1","calendarEventDay1Color","eventDay2","calendarEventDay2Color","eventDay3","calendarEventDay3Color","selectedDay","selectedDayText","calendarSelectedDayTextColor","prevMonthBtn","calendarPrevMonthIconColor","nextMonthBtn","calendarNextMonthIconColor","prevYearBtn","calendarPrevYearIconColor","nextYearBtn","calendarNextYearIconColor","transform","rotateY"],"sources":["calendar.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 WmCalendarStyles = BaseStyles & {\n calendar: AllStyle,\n calendarHeader: AllStyle,\n day: AllStyle,\n dayWrapper: AllStyle,\n notDayOfCurrentMonth: AllStyle,\n monthText: TextStyle,\n yearText: TextStyle,\n weekDay: AllStyle,\n today: AllStyle,\n todayText: AllStyle,\n prevMonthBtn: WmIconStyles,\n nextMonthBtn: WmIconStyles,\n prevYearBtn: WmIconStyles,\n nextYearBtn: WmIconStyles,\n selectedDay: AllStyle,\n selectedDayText: AllStyle\n eventDay1: AllStyle,\n eventDay2: AllStyle,\n eventDay3: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-calendar';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCalendarStyles = defineStyles<WmCalendarStyles>({\n root: {\n width: '100%',\n minHeight: 456,\n minWidth: 360\n },\n text: {\n color: themeVariables.calendarDateColor\n },\n calendar : {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderWidth: 1,\n borderStyle: 'solid',\n marginTop: 0, \n paddingTop: 0,\n paddingBottom: 0,\n elevation: 6\n },\n calendarHeader : {\n backgroundColor: themeVariables.calendarHeaderBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderBottomWidth: 1,\n borderStyle: 'solid',\n paddingTop: 8,\n paddingBottom: 8\n },\n weekDay: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderBottomWidth: 1,\n borderStyle: 'solid',\n padding: 2,\n },\n weekDayText: {\n color: themeVariables.calendarWeekDayTextColor,\n fontWeight: '400',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n },\n day: {\n borderColor: 'transparent',\n color: themeVariables.calendarDateColor,\n fontSize: 16,\n fontFamily: themeVariables.baseFont,\n fontWeight: '400'\n },\n dayWrapper: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: 'transparent',\n width: 38,\n height: 38,\n borderRadius: 26\n },\n notDayOfCurrentMonth: {\n color: themeVariables.calendarNotCurrentMonthDateColor,\n fontWeight: 'normal',\n opacity: 0\n },\n monthText: {\n fontWeight: '500',\n fontFamily: themeVariables.baseFont,\n color: themeVariables.calendarHeaderTextColor\n },\n yearText: {\n fontWeight: '500',\n fontFamily: themeVariables.baseFont,\n color: themeVariables.calendarHeaderTextColor\n },\n today: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.primaryColor\n },\n todayText: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor\n },\n eventDay1 : {\n color: themeVariables.calendarEventDay1Color\n },\n eventDay2 : {\n color: themeVariables.calendarEventDay2Color\n },\n eventDay3 : {\n color: themeVariables.calendarEventDay3Color\n },\n selectedDay: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor\n },\n selectedDayText: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor,\n color: themeVariables.calendarSelectedDayTextColor,\n fontWeight: 'bold'\n },\n prevMonthBtn: {\n root: {\n color: themeVariables.calendarPrevMonthIconColor\n }\n } as WmIconStyles,\n nextMonthBtn: {\n root: {\n color: themeVariables.calendarNextMonthIconColor\n }\n } as WmIconStyles,\n prevYearBtn: {\n root: {\n color: themeVariables.calendarPrevYearIconColor\n }\n } as WmIconStyles,\n nextYearBtn: {\n root: {\n color: themeVariables.calendarNextYearIconColor\n }\n } as WmIconStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n prevMonthBtn: {\n root: {\n transform: [ {rotateY: '180deg'}]\n }\n } as WmIconStyles,\n nextMonthBtn: {\n root: {\n transform: [ {rotateY: '180deg'}] \n }\n } as WmIconStyles,\n monthText: {\n padding: 2\n },\n yearText: {\n padding: 2\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AA0BxF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA+B,GAAGL,YAAY,CAAmB;IACnEM,IAAI,EAAE;MACFC,KAAK,EAAE,MAAM;MACbC,SAAS,EAAE,GAAG;MACdC,QAAQ,EAAE;IACd,CAAC;IACDC,IAAI,EAAE;MACFC,KAAK,EAAER,cAAc,CAACS;IAC1B,CAAC;IACDC,QAAQ,EAAG;MACPC,eAAe,EAAEX,cAAc,CAACY,eAAe;MAC/CC,WAAW,EAAEb,cAAc,CAACc,qBAAqB;MACjDC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,OAAO;MACpBC,SAAS,EAAE,CAAC;MACZC,UAAU,EAAE,CAAC;MACbC,aAAa,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EAAE;QAAQ,CAAC;MACpC;IACJ,CAAiB;IACjBP,YAAY,EAAE;MACVrD,IAAI,EAAE;QACF2D,SAAS,EAAE,CAAE;UAACC,OAAO,EAAE;QAAQ,CAAC;MACpC;IACJ,CAAiB;IACjBzB,SAAS,EAAE;MACPd,OAAO,EAAE;IACb,CAAC;IACDgB,QAAQ,EAAE;MACNhB,OAAO,EAAE;IACb;EACJ,CAAC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -13,6 +13,8 @@ import styles from './month-view.styles';
|
|
|
13
13
|
import _ from 'lodash';
|
|
14
14
|
export class MonthViewProps {
|
|
15
15
|
constructor() {
|
|
16
|
+
_defineProperty(this, "testID", null);
|
|
17
|
+
_defineProperty(this, "accessibilityLabel", null);
|
|
16
18
|
_defineProperty(this, "date", null);
|
|
17
19
|
_defineProperty(this, "minDate", moment('1990-01-01', 'YYYY-MM-DD'));
|
|
18
20
|
_defineProperty(this, "maxDate", moment('2100-01-01', 'YYYY-MM-DD'));
|
|
@@ -81,6 +83,8 @@ export class MonthView extends Component {
|
|
|
81
83
|
const notCurrentMonth = !((_this$props$date2 = this.props.date) !== null && _this$props$date2 !== void 0 && _this$props$date2.isSame(day, 'month'));
|
|
82
84
|
const dateStyle = (this.props.getDayStyle ? this.props.getDayStyle(day) : null) || {};
|
|
83
85
|
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
86
|
+
testID: this.props.testID + '_' + day.format('yyyy_mm_dd'),
|
|
87
|
+
accessibilityLabel: this.props.testID + '_' + day.format('yyyy_mm_dd'),
|
|
84
88
|
onPress: () => this.selectDate(day),
|
|
85
89
|
style: [styles.warpDay, warpDayStyle, isCurrent ? currentDayStyle : {}, dateSelected ? {
|
|
86
90
|
backgroundColor: '#2C1F23',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Component","Text","View","FlatList","TouchableOpacity","moment","styles","_","MonthViewProps","constructor","_defineProperty","day","createElement","Fragment","date","MonthViewState","selectedDate","arguments","length","undefined","MonthView","props","state","calendarArray","dates","currDate","clone","startOf","i","add","renderDay","_this$props$date","_this$props$date2","warpDayStyle","dateSelectedWarpDayStyle","renderChildDay","textDayStyle","currentDayStyle","currentDayTextStyle","notDayOfCurrentMonthStyle","selectedDayTextStyle","dateSelected","isSame","isCurrent","notCurrentMonth","dateStyle","getDayStyle","onPress","selectDate","style","warpDay","backgroundColor","containerStyle","flexDirection","justifyContent","alignItems","color","textStyle","get","isDateEnable","yearMonthChange","unit","type","minDate","maxDate","isSameOrBefore","isSameOrAfter","render","_this$props$date3","_this$props$date4","renderPrevYearButton","renderPrevMonthButton","renderNextYearButton","renderNextMonthButton","weekdayStyle","customWeekdays","warpRowWeekdays","warpRowControlMonthYear","monthTextStyle","yearTextStyle","weekdays","data","dayOfWeek","month","customMonth","year","forEach","element","push","key","container","txtHeaderDate","keyExtractor","item","toDate","getTime","renderItem","_ref","extraData","columnWrapperStyle","numColumns","padding"],"sources":["month-view.tsx"],"sourcesContent":["/****\n * Copied code from a repo with no active maintenance.\n * https://github.com/hungdev/react-native-customize-selected-date\n * That js lib was converted to ts and fixed bugs. \n */\nimport React, { Component } from 'react';\nimport {\n Text,\n View,\n FlatList,\n TouchableOpacity,\n ViewStyle,\n TextStyle\n} from 'react-native';\nimport moment, { Moment } from 'moment';\nimport styles from './month-view.styles'\nimport _ from 'lodash';\n\nexport class MonthViewProps {\n date?: Moment = null as any;\n minDate? = moment('1990-01-01', 'YYYY-MM-DD');\n maxDate? = moment('2100-01-01', 'YYYY-MM-DD');\n customMonth?: string[] = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n customWeekdays?: string[] = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n renderPrevYearButton?: () => React.ReactNode = null as any;\n format?='YYYY-MM-DD';\n renderPrevMonthButton?: () => React.ReactNode = null as any;\n renderNextYearButton?: () => React.ReactNode = null as any;\n renderNextMonthButton?: () => React.ReactNode = null as any;\n renderChildDay? = (day: Moment) => (<></>);\n selectDate? = (day: Moment) => {}; \n //style\n getDayStyle? = (date: Moment) => ({});\n containerStyle?: ViewStyle = null as any;\n warpRowControlMonthYear?: ViewStyle = null as any;\n warpRowWeekdays?: ViewStyle = null as any;\n weekdayStyle?: ViewStyle = null as any;\n textDayStyle?: TextStyle = null as any;\n currentDayStyle?: ViewStyle = null as any;\n currentDayTextStyle?: TextStyle = null as any;\n notDayOfCurrentMonthStyle?: ViewStyle = null as any;\n warpDayStyle?: ViewStyle = null as any;\n dateSelectedWarpDayStyle?: ViewStyle = null as any;\n selectedDayTextStyle?: TextStyle = null as any;\n monthTextStyle?: TextStyle = null as any;\n yearTextStyle?: TextStyle = null as any;\n}\n\nexport class MonthViewState {\n viewMode = 'day';\n currentYear: string = null as any;\n constructor(public selectedDate: Moment = moment()) {\n\n }\n}\n\nexport class MonthView extends Component<MonthViewProps, MonthViewState> {\n\n static defaultProps = new MonthViewProps();\n\n constructor(props: MonthViewProps) {\n super(props);\n this.state = new MonthViewState(this.props.date);\n }\n\n calendarArray (date: Moment): Moment[] {\n const dates: Moment[] = [];\n const currDate = date.clone().startOf('month').startOf('week');\n for (let i = 0; i < 42; i += 1) {\n dates[i] = currDate.clone();\n currDate.add(1, 'day');\n }\n return dates;\n }\n\n renderDay(day: Moment) {\n const { warpDayStyle, dateSelectedWarpDayStyle,\n renderChildDay, textDayStyle, currentDayStyle, currentDayTextStyle, notDayOfCurrentMonthStyle, selectedDayTextStyle } = this.props;\n const dateSelected = this.props.date?.isSame(day);\n const isCurrent = moment().isSame(day, 'date');\n const notCurrentMonth = !this.props.date?.isSame(day, 'month');\n const dateStyle = ((this.props.getDayStyle ? this.props.getDayStyle(day) : null) || {}) as any;\n return (\n <TouchableOpacity onPress={() => this.selectDate(day)}\n style={[styles.warpDay, warpDayStyle,\n isCurrent ? currentDayStyle : {},\n dateSelected ? { backgroundColor: '#2C1F23', ...dateSelectedWarpDayStyle } : {},\n dateStyle.containerStyle]}\n >\n <View style={{flexDirection: 'column', justifyContent: 'center', alignItems: 'center'}}>\n <Text style={[styles.day, textDayStyle,\n isCurrent ? currentDayTextStyle : {},\n notCurrentMonth ? { color: '#493D40', ...notDayOfCurrentMonthStyle } : {},\n dateSelected ? { color: '#000', ...selectedDayTextStyle } : {},\n dateStyle.textStyle]}>\n {day.get('date')}\n </Text>\n {renderChildDay && renderChildDay(day)}\n </View>\n </TouchableOpacity>\n )\n }\n\n selectDate(date: Moment) {\n if (this.isDateEnable(date)) {\n this.props.selectDate && this.props.selectDate(date)\n }\n }\n\n yearMonthChange(unit: number, type: string) {\n this.selectDate((this.props.date || moment()).clone().add(unit, type as any).startOf('month'));\n }\n\n isDateEnable(date: Moment) {\n const { minDate, maxDate } = this.props;\n return minDate?.isSameOrBefore(date) && maxDate?.isSameOrAfter(date);\n }\n\n render() {\n const {\n renderPrevYearButton, renderPrevMonthButton,\n renderNextYearButton, renderNextMonthButton,\n weekdayStyle, customWeekdays, warpRowWeekdays,\n warpRowControlMonthYear, monthTextStyle, yearTextStyle\n } = this.props\n const weekdays = customWeekdays || ['Sun', 'Mon', 'Tus', 'Wes', 'Thu', 'Fri', 'Sat']\n const data = this.calendarArray(this.props.date || moment())\n const dayOfWeek: React.ReactNode[] = [];\n const month = this.props.customMonth ? this.props.customMonth[this.props.date?.get('month') || 0]: 'Jan';\n const year = this.props.date?.get('year') || 1;\n _.forEach(weekdays, element => {\n dayOfWeek.push(<Text key={element} style={[styles.weekdays, weekdayStyle]}>{element}</Text>)\n })\n\n return (\n <View style={[styles.container, this.props.containerStyle]}>\n <View style={[{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }, warpRowControlMonthYear]}>\n {/*<TouchableOpacity onPress={() => this.yearMonthChange(-1, 'year')}>\n {renderPrevYearButton ? renderPrevYearButton() : <Text>{'<<'}</Text>}\n </TouchableOpacity>*/}\n <TouchableOpacity onPress={() => this.yearMonthChange(-1, 'month')}>\n {renderPrevMonthButton ? renderPrevMonthButton() : <Text>{'<'}</Text>}\n </TouchableOpacity>\n <View style={{flexDirection: 'row'}}>\n <Text style={[styles.txtHeaderDate, monthTextStyle]} >{month + ' '}</Text>\n <Text style={[styles.txtHeaderDate, yearTextStyle]} >{year}</Text>\n </View>\n <TouchableOpacity onPress={() => this.yearMonthChange(1, 'month')}>\n {renderNextMonthButton ? renderNextMonthButton() : <Text>{'>'}</Text>}\n </TouchableOpacity>\n {/*<TouchableOpacity onPress={() => this.yearMonthChange(1, 'year')}>\n {renderNextYearButton ? renderNextYearButton() : <Text>{'>>'}</Text>}\n </TouchableOpacity>*/}\n </View>\n <View style={[{ flexDirection: 'row', justifyContent: 'space-around' }, warpRowWeekdays]}>\n {dayOfWeek}\n </View>\n <FlatList\n data={data}\n keyExtractor={(item) => '' + item.toDate().getTime()}\n renderItem={({ item }) => this.renderDay(item)}\n extraData={this.state}\n columnWrapperStyle={{justifyContent: 'space-between'}}\n numColumns={7}\n style={{\n padding: 4\n }}\n />\n </View>\n )\n }\n}"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SACEC,IAAI,EACJC,IAAI,EACJC,QAAQ,EACRC,gBAAgB,QAGX,cAAc;AACrB,OAAOC,MAAM,MAAkB,QAAQ;AACvC,OAAOC,MAAM,MAAM,qBAAqB;AACxC,OAAOC,CAAC,MAAM,QAAQ;AAEtB,OAAO,MAAMC,cAAc,CAAC;EAAAC,YAAA;IAAAC,eAAA,eACV,IAAI;IAAAA,eAAA,kBACTL,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC;IAAAK,eAAA,kBAClCL,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC;IAAAK,eAAA,sBACpB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,E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GK,KAAK,GAAG,IAAW,CAAC,eAC3EpF,KAAA,CAAAa,aAAA,CAACX,IAAI;MAACgD,KAAK,EAAE,CAAC3C,MAAM,CAACqF,aAAa,EAAEZ,aAAa;IAAE,GAAGM,IAAW,CAC7D,CAAC,eACPtF,KAAA,CAAAa,aAAA,CAACR,gBAAgB;MAAC2C,OAAO,EAAEA,CAAA,KAAM,IAAI,CAACa,eAAe,CAAC,CAAC,EAAE,OAAO;IAAE,GAC/Da,qBAAqB,GAAGA,qBAAqB,CAAC,CAAC,gBAAG1E,KAAA,CAAAa,aAAA,CAACX,IAAI,QAAE,GAAU,CACpD,CAId,CAAC,eACPF,KAAA,CAAAa,aAAA,CAACV,IAAI;MAAC+C,KAAK,EAAE,CAAC;QAAEI,aAAa,EAAE,KAAK;QAAEC,cAAc,EAAE;MAAe,CAAC,EAAEsB,eAAe;IAAE,GACtFM,SACG,CAAC,eACPnF,KAAA,CAAAa,aAAA,CAACT,QAAQ;MACP8E,IAAI,EAAEA,IAAK;MACXW,YAAY,EAAGC,IAAI,IAAK,EAAE,GAAGA,IAAI,CAACC,MAAM,CAAC,CAAC,CAACC,OAAO,CAAC,CAAE;MACrDC,UAAU,EAAEC,IAAA;QAAA,IAAC;UAAEJ;QAAK,CAAC,GAAAI,IAAA;QAAA,OAAK,IAAI,CAACnE,SAAS,CAAC+D,IAAI,CAAC;MAAA,CAAC;MAC/CK,SAAS,EAAE,IAAI,CAAC5E,KAAM;MACtB6E,kBAAkB,EAAE;QAAC7C,cAAc,EAAE;MAAe,CAAE;MACtD8C,UAAU,EAAE,CAAE;MACdnD,KAAK,EAAE;QACLoD,OAAO,EAAE;MACX;IAAE,CACH,CACG,CAAC;EAEX;AACF;AAAC3F,eAAA,CAnHYU,SAAS,kBAEE,IAAIZ,cAAc,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"names":["React","Component","Text","View","FlatList","TouchableOpacity","moment","styles","_","MonthViewProps","constructor","_defineProperty","day","createElement","Fragment","date","MonthViewState","selectedDate","arguments","length","undefined","MonthView","props","state","calendarArray","dates","currDate","clone","startOf","i","add","renderDay","_this$props$date","_this$props$date2","warpDayStyle","dateSelectedWarpDayStyle","renderChildDay","textDayStyle","currentDayStyle","currentDayTextStyle","notDayOfCurrentMonthStyle","selectedDayTextStyle","dateSelected","isSame","isCurrent","notCurrentMonth","dateStyle","getDayStyle","testID","format","accessibilityLabel","onPress","selectDate","style","warpDay","backgroundColor","containerStyle","flexDirection","justifyContent","alignItems","color","textStyle","get","isDateEnable","yearMonthChange","unit","type","minDate","maxDate","isSameOrBefore","isSameOrAfter","render","_this$props$date3","_this$props$date4","renderPrevYearButton","renderPrevMonthButton","renderNextYearButton","renderNextMonthButton","weekdayStyle","customWeekdays","warpRowWeekdays","warpRowControlMonthYear","monthTextStyle","yearTextStyle","weekdays","data","dayOfWeek","month","customMonth","year","forEach","element","push","key","container","txtHeaderDate","keyExtractor","item","toDate","getTime","renderItem","_ref","extraData","columnWrapperStyle","numColumns","padding"],"sources":["month-view.tsx"],"sourcesContent":["/****\n * Copied code from a repo with no active maintenance.\n * https://github.com/hungdev/react-native-customize-selected-date\n * That js lib was converted to ts and fixed bugs. \n */\nimport React, { Component } from 'react';\nimport {\n Text,\n View,\n FlatList,\n TouchableOpacity,\n ViewStyle,\n TextStyle\n} from 'react-native';\nimport moment, { Moment } from 'moment';\nimport styles from './month-view.styles'\nimport _ from 'lodash';\n\nexport class MonthViewProps {\n testID?: string = null as any;\n accessibilityLabel?: string = null as any;\n date?: Moment = null as any;\n minDate? = moment('1990-01-01', 'YYYY-MM-DD');\n maxDate? = moment('2100-01-01', 'YYYY-MM-DD');\n customMonth?: string[] = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n customWeekdays?: string[] = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n renderPrevYearButton?: () => React.ReactNode = null as any;\n format?='YYYY-MM-DD';\n renderPrevMonthButton?: () => React.ReactNode = null as any;\n renderNextYearButton?: () => React.ReactNode = null as any;\n renderNextMonthButton?: () => React.ReactNode = null as any;\n renderChildDay? = (day: Moment) => (<></>);\n selectDate? = (day: Moment) => {}; \n //style\n getDayStyle? = (date: Moment) => ({});\n containerStyle?: ViewStyle = null as any;\n warpRowControlMonthYear?: ViewStyle = null as any;\n warpRowWeekdays?: ViewStyle = null as any;\n weekdayStyle?: ViewStyle = null as any;\n textDayStyle?: TextStyle = null as any;\n currentDayStyle?: ViewStyle = null as any;\n currentDayTextStyle?: TextStyle = null as any;\n notDayOfCurrentMonthStyle?: ViewStyle = null as any;\n warpDayStyle?: ViewStyle = null as any;\n dateSelectedWarpDayStyle?: ViewStyle = null as any;\n selectedDayTextStyle?: TextStyle = null as any;\n monthTextStyle?: TextStyle = null as any;\n yearTextStyle?: TextStyle = null as any;\n}\n\nexport class MonthViewState {\n viewMode = 'day';\n currentYear: string = null as any;\n constructor(public selectedDate: Moment = moment()) {\n\n }\n}\n\nexport class MonthView extends Component<MonthViewProps, MonthViewState> {\n\n static defaultProps = new MonthViewProps();\n\n constructor(props: MonthViewProps) {\n super(props);\n this.state = new MonthViewState(this.props.date);\n }\n\n calendarArray (date: Moment): Moment[] {\n const dates: Moment[] = [];\n const currDate = date.clone().startOf('month').startOf('week');\n for (let i = 0; i < 42; i += 1) {\n dates[i] = currDate.clone();\n currDate.add(1, 'day');\n }\n return dates;\n }\n\n renderDay(day: Moment) {\n const { warpDayStyle, dateSelectedWarpDayStyle,\n renderChildDay, textDayStyle, currentDayStyle, currentDayTextStyle, notDayOfCurrentMonthStyle, selectedDayTextStyle } = this.props;\n const dateSelected = this.props.date?.isSame(day);\n const isCurrent = moment().isSame(day, 'date');\n const notCurrentMonth = !this.props.date?.isSame(day, 'month');\n const dateStyle = ((this.props.getDayStyle ? this.props.getDayStyle(day) : null) || {}) as any;\n return (\n <TouchableOpacity \n testID={this.props.testID + '_' + day.format('yyyy_mm_dd')}\n accessibilityLabel={this.props.testID + '_' + day.format('yyyy_mm_dd')}\n onPress={() => this.selectDate(day)}\n style={[styles.warpDay, warpDayStyle,\n isCurrent ? currentDayStyle : {},\n dateSelected ? { backgroundColor: '#2C1F23', ...dateSelectedWarpDayStyle } : {},\n dateStyle.containerStyle]}\n >\n <View style={{flexDirection: 'column', justifyContent: 'center', alignItems: 'center'}}>\n <Text style={[styles.day, textDayStyle,\n isCurrent ? currentDayTextStyle : {},\n notCurrentMonth ? { color: '#493D40', ...notDayOfCurrentMonthStyle } : {},\n dateSelected ? { color: '#000', ...selectedDayTextStyle } : {},\n dateStyle.textStyle]}>\n {day.get('date')}\n </Text>\n {renderChildDay && renderChildDay(day)}\n </View>\n </TouchableOpacity>\n )\n }\n\n selectDate(date: Moment) {\n if (this.isDateEnable(date)) {\n this.props.selectDate && this.props.selectDate(date)\n }\n }\n\n yearMonthChange(unit: number, type: string) {\n this.selectDate((this.props.date || moment()).clone().add(unit, type as any).startOf('month'));\n }\n\n isDateEnable(date: Moment) {\n const { minDate, maxDate } = this.props;\n return minDate?.isSameOrBefore(date) && maxDate?.isSameOrAfter(date);\n }\n\n render() {\n const {\n renderPrevYearButton, renderPrevMonthButton,\n renderNextYearButton, renderNextMonthButton,\n weekdayStyle, customWeekdays, warpRowWeekdays,\n warpRowControlMonthYear, monthTextStyle, yearTextStyle\n } = this.props\n const weekdays = customWeekdays || ['Sun', 'Mon', 'Tus', 'Wes', 'Thu', 'Fri', 'Sat']\n const data = this.calendarArray(this.props.date || moment())\n const dayOfWeek: React.ReactNode[] = [];\n const month = this.props.customMonth ? this.props.customMonth[this.props.date?.get('month') || 0]: 'Jan';\n const year = this.props.date?.get('year') || 1;\n _.forEach(weekdays, element => {\n dayOfWeek.push(<Text key={element} style={[styles.weekdays, weekdayStyle]}>{element}</Text>)\n })\n\n return (\n <View style={[styles.container, this.props.containerStyle]}>\n <View style={[{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }, warpRowControlMonthYear]}>\n {/*<TouchableOpacity onPress={() => this.yearMonthChange(-1, 'year')}>\n {renderPrevYearButton ? renderPrevYearButton() : <Text>{'<<'}</Text>}\n </TouchableOpacity>*/}\n <TouchableOpacity onPress={() => this.yearMonthChange(-1, 'month')}>\n {renderPrevMonthButton ? renderPrevMonthButton() : <Text>{'<'}</Text>}\n </TouchableOpacity>\n <View style={{flexDirection: 'row'}}>\n <Text style={[styles.txtHeaderDate, monthTextStyle]} >{month + ' '}</Text>\n <Text style={[styles.txtHeaderDate, yearTextStyle]} >{year}</Text>\n </View>\n <TouchableOpacity onPress={() => this.yearMonthChange(1, 'month')}>\n {renderNextMonthButton ? renderNextMonthButton() : <Text>{'>'}</Text>}\n </TouchableOpacity>\n {/*<TouchableOpacity onPress={() => this.yearMonthChange(1, 'year')}>\n {renderNextYearButton ? renderNextYearButton() : <Text>{'>>'}</Text>}\n </TouchableOpacity>*/}\n </View>\n <View style={[{ flexDirection: 'row', justifyContent: 'space-around' }, warpRowWeekdays]}>\n {dayOfWeek}\n </View>\n <FlatList\n data={data}\n keyExtractor={(item) => '' + item.toDate().getTime()}\n renderItem={({ item }) => this.renderDay(item)}\n extraData={this.state}\n columnWrapperStyle={{justifyContent: 'space-between'}}\n numColumns={7}\n style={{\n padding: 4\n }}\n />\n </View>\n )\n }\n}"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SACEC,IAAI,EACJC,IAAI,EACJC,QAAQ,EACRC,gBAAgB,QAGX,cAAc;AACrB,OAAOC,MAAM,MAAkB,QAAQ;AACvC,OAAOC,MAAM,MAAM,qBAAqB;AACxC,OAAOC,CAAC,MAAM,QAAQ;AAEtB,OAAO,MAAMC,cAAc,CAAC;EAAAC,YAAA;IAAAC,eAAA,iBACR,IAAI;IAAAA,eAAA,6BACQ,IAAI;IAAAA,eAAA,eAClB,IAAI;IAAAA,eAAA,kBACTL,MAAM,CAAC,YAAY,EAAE,YAAY,C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ACtE,SAAS,CAACkE,IAAI,CAAC;MAAA,CAAC;MAC/CK,SAAS,EAAE,IAAI,CAAC/E,KAAM;MACtBgF,kBAAkB,EAAE;QAAC7C,cAAc,EAAE;MAAe,CAAE;MACtD8C,UAAU,EAAE,CAAE;MACdnD,KAAK,EAAE;QACLoD,OAAO,EAAE;MACX;IAAE,CACH,CACG,CAAC;EAEX;AACF;AAAC9F,eAAA,CAtHYU,SAAS,kBAEE,IAAIZ,cAAc,CAAC,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1
2
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
3
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
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); }
|
|
4
5
|
import React from 'react';
|
|
5
|
-
import { Text } from 'react-native';
|
|
6
|
+
import { Text, TouchableOpacity } from 'react-native';
|
|
6
7
|
import { Checkbox } from 'react-native-paper';
|
|
7
|
-
import { TouchableOpacity } from 'react-native-gesture-handler';
|
|
8
8
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
9
9
|
import { unStringify, validateField } from '@wavemaker/app-rn-runtime/core/utils';
|
|
10
10
|
import WmCheckboxProps from './checkbox.props';
|
|
@@ -80,16 +80,16 @@ export default class WmCheckbox extends BaseComponent {
|
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
renderWidget(props) {
|
|
83
|
-
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
83
|
+
return /*#__PURE__*/React.createElement(TouchableOpacity, _extends({}, this.getTestPropsForAction(), {
|
|
84
84
|
style: this.styles.root,
|
|
85
85
|
onPress: this.onPress.bind(this)
|
|
86
|
-
}, this._background, /*#__PURE__*/React.createElement(Checkbox.Android, {
|
|
86
|
+
}), this._background, /*#__PURE__*/React.createElement(Checkbox.Android, {
|
|
87
87
|
status: this.state.isChecked ? 'checked' : 'unchecked',
|
|
88
88
|
color: this.styles.text.color,
|
|
89
89
|
disabled: props.readonly || props.disabled
|
|
90
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
90
|
+
}), /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel(), {
|
|
91
91
|
style: this.styles.checkboxLabel
|
|
92
|
-
}, props.caption));
|
|
92
|
+
}), props.caption));
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
//# sourceMappingURL=checkbox.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","
|
|
1
|
+
{"version":3,"names":["React","Text","TouchableOpacity","Checkbox","BaseComponent","BaseComponentState","unStringify","validateField","WmCheckboxProps","DEFAULT_CLASS","WmCheckboxState","constructor","arguments","_defineProperty","WmCheckbox","props","setChecked","dataValue","checkedvalue","value","updateState","isChecked","onPropertyChange","name","$new","$old","state","datavalue","updateDatavalue","validate","validationObj","isValid","errorType","onPress","readonly","invokeEventCallback","proxy","disabled","oldValue","uncheckedvalue","onFieldChange","renderWidget","createElement","_extends","getTestPropsForAction","style","styles","root","bind","_background","Android","status","color","text","getTestPropsForLabel","checkboxLabel","caption"],"sources":["checkbox.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, TouchableOpacity } from 'react-native';\nimport { Checkbox } from 'react-native-paper';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {unStringify, validateField} from '@wavemaker/app-rn-runtime/core/utils';\n\nimport WmCheckboxProps from './checkbox.props';\nimport { DEFAULT_CLASS, WmCheckboxStyles } from './checkbox.styles';\nimport WmSkeleton, { createSkeleton } from '../../basic/skeleton/skeleton.component';\n\nexport class WmCheckboxState extends BaseComponentState<WmCheckboxProps> {\n isChecked: boolean = false;\n isValid: boolean = true;\n errorType = '';\n}\n\nexport default class WmCheckbox extends BaseComponent<WmCheckboxProps, WmCheckboxState, WmCheckboxStyles> {\n\n constructor(props: WmCheckboxProps) {\n super(props, DEFAULT_CLASS, new WmCheckboxProps(), new WmCheckboxState());\n }\n\n setChecked(dataValue: any, checkedvalue: any) {\n const value = unStringify(dataValue) === unStringify(checkedvalue, true);\n this.updateState({ isChecked: value } as WmCheckboxState);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'checkedvalue':\n this.setChecked(this.state.props.datavalue, $new);\n break;\n case 'datavalue':\n this.setChecked($new, this.state.props.checkedvalue);\n break;\n }\n }\n\n updateDatavalue(value: any) {\n this.updateState({ props: { datavalue: value }} as WmCheckboxState);\n }\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.updateState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as WmCheckboxState);\n }\n\n onPress() {\n if (!this.state.props.readonly) {\n this.invokeEventCallback('onFocus', [null, this.proxy]);\n }\n this.invokeEventCallback('onTap', [null, this.proxy]);\n if (this.state.props.disabled) {\n return;\n }\n const oldValue = this.state.props.datavalue;\n const value = !this.state.isChecked;\n this.validate(value);\n this.updateState({ isChecked: value } as WmCheckboxState);\n const dataValue = value === true ? this.state.props.checkedvalue : this.state.props.uncheckedvalue;\n this.updateState({ props: { datavalue: dataValue } } as WmCheckboxState,\n () => {\n if (!this.props.onFieldChange) {\n this.invokeEventCallback('onChange', [null, this.proxy, dataValue, oldValue]);\n } else {\n this.props.onFieldChange && this.props.onFieldChange('datavalue', dataValue, oldValue);\n }\n this.invokeEventCallback('onBlur', [ null, this.proxy ]);\n });\n }\n\n renderWidget(props: WmCheckboxProps) {\n return (\n <TouchableOpacity {...this.getTestPropsForAction()} style={this.styles.root} onPress={this.onPress.bind(this)}>\n {this._background}\n <Checkbox.Android status={this.state.isChecked ? 'checked' : 'unchecked'} color={this.styles.text.color as string} disabled={props.readonly || props.disabled}/>\n <Text {...this.getTestPropsForLabel()} style={this.styles.checkboxLabel}>{props.caption}</Text>\n </TouchableOpacity>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AACrD,SAASC,QAAQ,QAAQ,oBAAoB;AAE7C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAAQC,WAAW,EAAEC,aAAa,QAAO,sCAAsC;AAE/E,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AAGnE,OAAO,MAAMC,eAAe,SAASL,kBAAkB,CAAkB;EAAAM,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBAClD,KAAK;IAAAA,eAAA,kBACP,IAAI;IAAAA,eAAA,oBACX,EAAE;EAAA;AAChB;AAEA,eAAe,MAAMC,UAAU,SAASV,aAAa,CAAqD;EAExGO,WAAWA,CAACI,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,EAAE,IAAIE,eAAe,CAAC,CAAC,CAAC;EAC3E;EAEAM,UAAUA,CAACC,SAAc,EAAEC,YAAiB,EAAE;IAC5C,MAAMC,KAAK,GAAGb,WAAW,CAACW,SAAS,CAAC,KAAKX,WAAW,CAACY,YAAY,EAAE,IAAI,CAAC;IACxE,IAAI,CAACE,WAAW,CAAC;MAAEC,SAAS,EAAEF;IAAM,CAAoB,CAAC;EAC3D;EAEAG,gBAAgBA,CA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