@wavemaker/app-rn-runtime 12.0.0-next.141131 → 12.0.0-next.141138
Sign up to get free protection for your applications and to get access to all the features.
- app-rn-runtime/components/advanced/carousel/carousel.component.js +32 -5
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js +1 -0
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +15 -0
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +15 -5
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -0
- app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
- app-rn-runtime/components/basic/animatedview.component.js +6 -2
- app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +20 -6
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +14 -6
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +13 -3
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js +3 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
- app-rn-runtime/components/basic/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +1 -2
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +2 -2
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +5 -5
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +10 -1
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +3 -0
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +5 -0
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js +6 -3
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.props.js +9 -1
- app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js +2 -3
- 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.map +1 -1
- app-rn-runtime/components/basic/video/video.styles.js +4 -1
- app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.styles.js +7 -1
- app-rn-runtime/components/chart/area-chart/area-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js +7 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +54 -2
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +3 -2
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js +4 -0
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +15 -3
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js +7 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/column-chart/column-chart.styles.js +7 -1
- app-rn-runtime/components/chart/column-chart/column-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js +7 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.props.js +2 -0
- app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.styles.js +7 -1
- app-rn-runtime/components/chart/line-chart/line-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +6 -2
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js +7 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +37 -11
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +61 -12
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.styles.js +5 -0
- app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +11 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +44 -3
- 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/container.styles.js +7 -0
- app-rn-runtime/components/container/container.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +5 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js +6 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +28 -2
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js +4 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js +31 -5
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.styles.js +4 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +47 -6
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.styles.js +3 -0
- app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
- app-rn-runtime/components/container/partial-host.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +3 -4
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +11 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +1 -0
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +44 -6
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js +4 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +28 -2
- app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.styles.js +6 -1
- app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +62 -13
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +3 -0
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +4 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js +6 -2
- app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.styles.js +4 -1
- app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +18 -0
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.styles.js +3 -0
- app-rn-runtime/components/data/card/card.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +1 -1
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.props.js +1 -0
- app-rn-runtime/components/data/form/form.props.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.props.js +1 -0
- app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js +11 -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 +54 -33
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +1 -0
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js +9 -0
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +5 -3
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
- app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +57 -14
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.props.js +1 -0
- app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +40 -14
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js +2 -0
- app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +7 -8
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js +3 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +24 -3
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -0
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +1 -0
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +3 -2
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +19 -2
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +6 -1
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +26 -8
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheel-date-picker.component.js +123 -12
- app-rn-runtime/components/input/epoch/wheel-date-picker.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +4 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +2 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js +4 -2
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.props.js +1 -0
- app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +9 -4
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +3 -0
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +39 -14
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js +2 -0
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js +7 -0
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +23 -9
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +2 -2
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +26 -2
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +3 -0
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js +3 -0
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +24 -1
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js +2 -0
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.styles.js +3 -0
- app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +2 -4
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +2 -2
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +2 -3
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/page/content/content.component.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js +4 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +70 -14
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.props.js +2 -2
- app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.styles.js +6 -1
- app-rn-runtime/components/page/page-content/page-content.styles.js.map +1 -1
- app-rn-runtime/components/page/page.component.js.map +1 -1
- app-rn-runtime/components/page/page.props.js.map +1 -1
- app-rn-runtime/components/page/page.styles.js +7 -1
- app-rn-runtime/components/page/page.styles.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.component.js +27 -1
- app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.props.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.styles.js +6 -1
- app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
- app-rn-runtime/components/page/tabbar/curve.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -0
- app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js +27 -1
- app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.props.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.styles.js +6 -1
- app-rn-runtime/components/prefab/prefab-container.styles.js.map +1 -1
- app-rn-runtime/core/AppConfig.js.map +1 -1
- app-rn-runtime/core/base.component.js +35 -7
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/textinput.component.js +13 -10
- app-rn-runtime/core/components/textinput.component.js.map +1 -1
- app-rn-runtime/core/formatters.js.map +1 -1
- app-rn-runtime/core/key.extractor.js.map +1 -1
- app-rn-runtime/core/props.provider.js +4 -1
- app-rn-runtime/core/props.provider.js.map +1 -1
- app-rn-runtime/core/storage.service.js +15 -0
- app-rn-runtime/core/storage.service.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +34 -27
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/ui-preferences.context.js +7 -0
- app-rn-runtime/core/ui-preferences.context.js.map +1 -0
- app-rn-runtime/core/utils.js +87 -4
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/core/wm-component-tree.js +58 -0
- app-rn-runtime/core/wm-component-tree.js.map +1 -0
- app-rn-runtime/package.json +39 -9
- app-rn-runtime/runtime/App.js +21 -10
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/App.navigator.js +1 -0
- app-rn-runtime/runtime/App.navigator.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +61 -13
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +10 -0
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/base-partial.component.js +3 -0
- app-rn-runtime/runtime/base-partial.component.js.map +1 -1
- app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
- app-rn-runtime/runtime/navigator/drawer.navigator.js +19 -10
- app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
- app-rn-runtime/runtime/services/app-i18n.service.js +10 -0
- app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +42 -2
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-spinner.service.js +1 -1
- app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
- app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
- app-rn-runtime/runtime/watcher.js.map +1 -1
- app-rn-runtime/styles/background.component.js +1 -0
- app-rn-runtime/styles/background.component.js.map +1 -1
- app-rn-runtime/styles/style-prop.validator.js.map +1 -1
- app-rn-runtime/styles/theme.js +10 -0
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +2 -1
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/base-variable.js.map +1 -1
- app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
- app-rn-runtime/variables/device-variable.js.map +1 -1
- app-rn-runtime/variables/http.service.js +5 -1
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/live-variable.js +14 -0
- app-rn-runtime/variables/live-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","flexDirection","text","fontSize","input","paddingTop","paddingBottom","paddingLeft","paddingRight","flex","transparent","labelWrapper","primaryColor","borderTopLeftRadius","borderBottomLeftRadius","width","label","marginVertical","color","primaryContrastColor","textAlignVertical","textAlign","fontWeight","fontFamily","baseFont","invalid","borderBottomColor","inputInvalidBorderColor","placeholderText","inputPlaceholderColor","floatingLabel","activeFloatingLabel","OS","borderTopRightRadius","borderBottomRightRadius","inputDisabledBgColor","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["currency.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Platform } from 'react-native';\n\nexport type WmCurrencyStyles = BaseStyles & {\n label: AllStyle;\n invalid: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n placeholderText: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-currency';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCurrencyStyles = defineStyles({\n root: {\n minHeight: 42,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n flexDirection: 'row'\n },\n text: {\n fontSize: 16\n },\n input : {\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 16,\n paddingRight: 16,\n flex: 1,\n borderWidth: 1,\n borderColor: themeVariables.transparent,\n borderStyle: 'solid'\n },\n labelWrapper: {\n minHeight: 42,\n backgroundColor: themeVariables.primaryColor,\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n width: 48,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 16,\n paddingRight: 16\n },\n label: {\n marginVertical: 0.7,\n color: themeVariables.primaryContrastColor,\n textAlignVertical: 'center',\n textAlign: 'center',\n fontWeight: 'bold',\n fontFamily: themeVariables.baseFont,\n fontSize: 16\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n floatingLabel: {},\n activeFloatingLabel: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n labelWrapper:{\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n }\n }:{});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n root: {\n minHeight: 48\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n textAlign: 'left',\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AACxF,SAASC,QAAQ,QAAQ,cAAc;
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","flexDirection","text","fontSize","input","paddingTop","paddingBottom","paddingLeft","paddingRight","flex","transparent","labelWrapper","primaryColor","borderTopLeftRadius","borderBottomLeftRadius","width","display","justifyContent","label","marginVertical","color","primaryContrastColor","textAlignVertical","textAlign","fontWeight","fontFamily","baseFont","invalid","borderBottomColor","inputInvalidBorderColor","focused","inputFocusBorderColor","placeholderText","inputPlaceholderColor","floatingLabel","activeFloatingLabel","OS","borderTopRightRadius","borderBottomRightRadius","inputDisabledBgColor","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["currency.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Platform } from 'react-native';\n\nexport type WmCurrencyStyles = BaseStyles & {\n label: AllStyle;\n invalid: AllStyle;\n focused: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n placeholderText: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-currency';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCurrencyStyles = defineStyles({\n root: {\n minHeight: 42,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n flexDirection: 'row'\n },\n text: {\n fontSize: 16\n },\n input : {\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 16,\n paddingRight: 16,\n flex: 1,\n borderWidth: 1,\n borderColor: themeVariables.transparent,\n borderStyle: 'solid'\n },\n labelWrapper: {\n minHeight: 42,\n backgroundColor: themeVariables.primaryColor,\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n width: 48,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 16,\n paddingRight: 16,\n display: 'flex',\n justifyContent: 'center'\n },\n label: {\n marginVertical: 0.7,\n color: themeVariables.primaryContrastColor,\n textAlignVertical: 'center',\n textAlign: 'center',\n fontWeight: 'bold',\n fontFamily: themeVariables.baseFont,\n fontSize: 16\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n focused : {\n borderColor: themeVariables.inputFocusBorderColor,\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n floatingLabel: {},\n activeFloatingLabel: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n labelWrapper:{\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n }\n }:{});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n root: {\n minHeight: 48\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n textAlign: 'left',\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AACxF,SAASC,QAAQ,QAAQ,cAAc;AAWvC,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA+B,GAAGN,YAAY,CAAC;IACjDO,IAAI,EAAE;MACJC,SAAS,EAAE,EAAE;MACbC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEP,cAAc,CAACQ,gBAAgB;MAC5CC,eAAe,EAAET,cAAc,CAACU,oBAAoB;MACpDC,YAAY,EAAE,CAAC;MACfC,aAAa,EAAE;IACjB,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ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,QAAQ,CAACkD,EAAE,IAAE,KAAK,GAAC;IACtDzB,YAAY,EAAC;MACXE,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzBuB,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;EACLhD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLM,eAAe,EAAET,cAAc,CAACkD;IAClC;EACJ,CAAC,CAAC;EACFjD,QAAQ,CAACH,aAAa,GAAG,aAAa,EAAE,EAAE,EAAE;IAC1CK,IAAI,EAAE;MACJC,SAAS,EAAE;IACb,CAAC;IACDyC,aAAa,EAAE;MACbM,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,EAAE;MACPC,IAAI,EAAE,EAAE;MACRvC,QAAQ,EAAE,EAAE;MACZoB,SAAS,EAAE,MAAM;MACjBH,KAAK,EAAE/B,cAAc,CAACsD;IACxB,CAAC;IACDR,mBAAmB,EAAE;MACnBf,KAAK,EAAE/B,cAAc,CAACuD;IACxB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
@@ -13,7 +13,7 @@ import { DEFAULT_CLASS } from './datetime/datetime.styles';
|
|
13
13
|
import WebDatePicker from './date-picker.component';
|
14
14
|
import { isNumber, isString } from 'lodash-es';
|
15
15
|
import { ModalConsumer } from '@wavemaker/app-rn-runtime/core/modal.service';
|
16
|
-
import { validateField } from '@wavemaker/app-rn-runtime/core/utils';
|
16
|
+
import { isDateFormatAsPerPattern, validateField } from '@wavemaker/app-rn-runtime/core/utils';
|
17
17
|
import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
|
18
18
|
import { FloatingLabel } from '@wavemaker/app-rn-runtime/core/components/floatinglabel.component';
|
19
19
|
import AppI18nService from '@wavemaker/app-rn-runtime/runtime/services/app-i18n.service';
|
@@ -98,7 +98,6 @@ export default class BaseDatetime extends BaseComponent {
|
|
98
98
|
switch (name) {
|
99
99
|
//@ts-ignore
|
100
100
|
case 'datavalue':
|
101
|
-
this.invokeEventCallback('onChange', [null, this, $new, $old]);
|
102
101
|
this.prevDatavalue = $old;
|
103
102
|
if (props.datavalue === CURRENT_TIME) {
|
104
103
|
this.monitorAndUpdateCurrentTime();
|
@@ -127,9 +126,15 @@ export default class BaseDatetime extends BaseComponent {
|
|
127
126
|
case 'mindate':
|
128
127
|
if (isString($new)) {
|
129
128
|
const minDateVal = $new === CURRENT_DATE || $new === CURRENT_TIME ? new Date() : props.mindate;
|
129
|
+
// * check if supplied mindate is as per datepattern
|
130
|
+
const isMinMatchingPattern = minDateVal ? isDateFormatAsPerPattern(this.momentPattern(props.datepattern), minDateVal) : false;
|
131
|
+
// * min date formatted as per datepattern
|
132
|
+
const minDatePatternFormatted = minDateVal && isMinMatchingPattern ? moment(moment(minDateVal, this.momentPattern(props.datepattern)).format('YYYY-MM-DD')) : null;
|
133
|
+
// * min date formatted as per ISO, if mindate supplied is not as per datepattern
|
134
|
+
const formattedMinDate = minDatePatternFormatted && isMinMatchingPattern ? minDatePatternFormatted.toDate() : moment(minDateVal).toDate();
|
130
135
|
this.updateState({
|
131
136
|
props: {
|
132
|
-
mindate:
|
137
|
+
mindate: formattedMinDate
|
133
138
|
}
|
134
139
|
});
|
135
140
|
}
|
@@ -137,9 +142,15 @@ export default class BaseDatetime extends BaseComponent {
|
|
137
142
|
case 'maxdate':
|
138
143
|
if (isString($new)) {
|
139
144
|
const maxDateVal = $new === CURRENT_DATE || $new === CURRENT_TIME ? new Date() : props.maxdate;
|
145
|
+
// * check if supplied maxdate is as per datepattern
|
146
|
+
const isMaxMatchingPattern = maxDateVal ? isDateFormatAsPerPattern(this.momentPattern(props.datepattern), maxDateVal) : false;
|
147
|
+
// * max date formatted as per datepattern
|
148
|
+
const maxDatePatternFormatted = maxDateVal && isMaxMatchingPattern ? moment(moment(maxDateVal, this.momentPattern(props.datepattern)).format('YYYY-MM-DD')) : null;
|
149
|
+
// * max date formatted as per ISO, if maxdate supplied is not as per datepattern
|
150
|
+
const formattedMaxDate = maxDatePatternFormatted && isMaxMatchingPattern ? maxDatePatternFormatted.toDate() : moment(maxDateVal).toDate();
|
140
151
|
this.updateState({
|
141
152
|
props: {
|
142
|
-
maxdate:
|
153
|
+
maxdate: formattedMaxDate
|
143
154
|
}
|
144
155
|
});
|
145
156
|
}
|
@@ -154,16 +165,18 @@ export default class BaseDatetime extends BaseComponent {
|
|
154
165
|
}
|
155
166
|
}
|
156
167
|
onDateChange($event, date) {
|
168
|
+
const prevDate = this.format(this.state.dateValue, this.momentPattern(this.state.props.outputformat)) || undefined;
|
157
169
|
this.validate(date);
|
158
170
|
this.modes.shift();
|
171
|
+
const newDate = this.format(date, this.momentPattern(this.state.props.outputformat));
|
159
172
|
this.updateState({
|
160
173
|
isFocused: false,
|
161
174
|
showDatePicker: !!this.modes.length,
|
162
175
|
props: {
|
163
|
-
datavalue:
|
176
|
+
datavalue: newDate,
|
164
177
|
timestamp: this.format(date, 'timestamp')
|
165
178
|
}
|
166
|
-
});
|
179
|
+
}, () => this.invokeEventCallback('onChange', [null, this, newDate, prevDate]));
|
167
180
|
}
|
168
181
|
onBlur() {
|
169
182
|
if (Platform.OS === 'web') {
|
@@ -338,6 +351,8 @@ export default class BaseDatetime extends BaseComponent {
|
|
338
351
|
}
|
339
352
|
renderWidget(props) {
|
340
353
|
var _props$floatinglabel;
|
354
|
+
const is12HourFormat = (props === null || props === void 0 ? void 0 : props.datepattern) && /hh:mm(:ss|:sss)? a/.test(props.datepattern);
|
355
|
+
const is24Hour = is12HourFormat ? false : props.is24hour;
|
341
356
|
return this.addTouchableOpacity(props, /*#__PURE__*/React.createElement(View, {
|
342
357
|
style: [this.styles.root, this.state.isValid ? {} : this.styles.invalid, this.state.isFocused ? this.styles.focused : null]
|
343
358
|
}, this._background, props.floatinglabel ? /*#__PURE__*/React.createElement(FloatingLabel, {
|
@@ -374,12 +389,15 @@ export default class BaseDatetime extends BaseComponent {
|
|
374
389
|
color: this.styles.text.color,
|
375
390
|
...this.styles.calendarIcon
|
376
391
|
},
|
377
|
-
hint: props === null || props === void 0 ? void 0 : props.hint
|
392
|
+
hint: props === null || props === void 0 ? void 0 : props.hint,
|
393
|
+
id: this.getTestId('calendericon')
|
378
394
|
}))), this.state.showDatePicker && (Platform.OS === 'web' && this.renderWebWidget(props) || !props.iswheelpicker && Platform.OS === 'android' && this.renderNativeWidget(props) || !props.iswheelpicker && Platform.OS === 'ios' && this.renderNativeIOSWidgetWithModal(props)), Platform.OS !== 'web' && props.iswheelpicker && this.state.showDatePickerModal && /*#__PURE__*/React.createElement(WmDatePickerModal, {
|
379
395
|
isVisible: this.state.showDatePickerModal,
|
380
396
|
onClose: () => this.updateState({
|
381
397
|
showDatePickerModal: false
|
382
398
|
}),
|
399
|
+
minDate: props.mindate,
|
400
|
+
maxDate: props.maxdate,
|
383
401
|
selectedDate: this.state.dateValue,
|
384
402
|
onSelect: date => {
|
385
403
|
this.onDateChange(null, date);
|
@@ -406,7 +424,7 @@ export default class BaseDatetime extends BaseComponent {
|
|
406
424
|
}
|
407
425
|
}), Platform.OS !== 'web' && props.iswheelpicker && this.state.showTimePickerModal && /*#__PURE__*/React.createElement(WmTimePickerModal, {
|
408
426
|
selectedDateTime: this.state.dateValue,
|
409
|
-
is24Hour:
|
427
|
+
is24Hour: is24Hour,
|
410
428
|
isVisible: this.state.showTimePickerModal,
|
411
429
|
onClose: () => this.updateState({
|
412
430
|
isFocused: false,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","Text","Platform","TouchableOpacity","moment","DateTimePicker","BaseComponent","BaseComponentState","WmIcon","WmDatetimeProps","DEFAULT_CLASS","WebDatePicker","isNumber","isString","ModalConsumer","validateField","AccessibilityWidgetType","getAccessibilityProps","FloatingLabel","AppI18nService","WmButton","WmDatePickerModal","WmTimePickerModal","BaseDatetimeState","constructor","args","_defineProperty","CURRENT_DATE","CURRENT_TIME","BaseDatetime","props","defaultClass","defaultProps","defaultState","format","date","Date","getTime","parse","parseInt","toDate","monitorAndUpdateCurrentTime","stopCurrentTimeMonitor","timerId","setInterval","updateState","readonly","datavalue","now","state","clearInterval","convertTimezone","timezone","getTimezone","parsedDateString","toLocaleString","locale","timeZone","momentPattern","pattern","replaceAll","onPropertyChange","name","$new","$old","invokeEventCallback","prevDatavalue","outputformat","datepattern","dateValue","displayValue","onFieldChange","minDateVal","mindate","maxDateVal","maxdate","disabled","onDateChange","$event","validate","modes","shift","isFocused","showDatePicker","length","timestamp","onBlur","OS","setTimeout","triggerValidation","onFocus","mode","showDatePickerModal","showTimePickerModal","value","validationObj","setState","isValid","errorType","componentWillUnmount","renderWebWidget","createElement","onDismiss","minimumDate","maximumDate","renderNativeWidget","_extends","DATE","is24Hour","display","onChange","event","dateSelected","set","getMonth","getFullYear","getDate","renderNativeIOSWidget","date_change","undefined","style","styles","dialog","actionWrapper","selectBtn","caption","onTap","cancelBtn","renderNativeIOSWidgetWithModal","modalService","nativeModalOptions","content","Fragment","hideModal","centered","onClose","showModal","renderNativeWidgetWithModal","addTouchableOpacity","children","_children$props","hint","accessibilityProps","accessible","accessibilityHint","getTestPropsForAction","onPress","getIcon","renderWidget","_props$floatinglabel","root","invalid","focused","_background","floatinglabel","moveUp","label","placeholder","floatingLabel","activeFloatingLabel","container","text","placeholderText","getTestPropsForLabel","flex","isRTL","flexDirection","textAlign","iconclass","color","clearIcon","id","getTestId","accessibilitylabel","clearBtnClicked","calendarIcon","iswheelpicker","isVisible","selectedDate","onSelect","onCancel","selectedDateTime","is24hour","time"],"sources":["base-datetime.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, Platform, TouchableOpacity, ViewStyle } from 'react-native';\nimport moment from 'moment';\nimport DateTimePicker, { DateTimePickerEvent } from '@react-native-community/datetimepicker';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmDatetimeProps from './datetime/datetime.props';\nimport { DEFAULT_CLASS, WmDatetimeStyles } from './datetime/datetime.styles';\nimport WebDatePicker from './date-picker.component';\nimport { isNumber, isString } from 'lodash-es';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport { validateField } from '@wavemaker/app-rn-runtime/core/utils';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { FloatingLabel } from '@wavemaker/app-rn-runtime/core/components/floatinglabel.component';\nimport AppI18nService from '@wavemaker/app-rn-runtime/runtime/services/app-i18n.service';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport WmDatePickerModal from './wheelpickermodal/date/date-picker-modal.component';\nimport WmTimePickerModal from './wheelpickermodal/time/time-picker-modal.component';\n\nexport class BaseDatetimeState extends BaseComponentState<WmDatetimeProps> {\n showDatePicker = false;\n showDatePickerModal = false;\n showTimePickerModal = false;\n dateValue: Date = null as any;\n displayValue: string = null as any;\n isFocused = false;\n timerId: NodeJS.Timer = null as any;\n isValid: boolean = true;\n errorType = '';\n}\n\nconst CURRENT_DATE = 'CURRENT_DATE';\nconst CURRENT_TIME = 'CURRENT_TIME';\n\nexport default abstract class BaseDatetime extends BaseComponent<WmDatetimeProps, BaseDatetimeState, WmDatetimeStyles> {\n clearBtnClicked = false;\n modes = [] as string[];\n nativeModalOptions: ModalOptions = {} as any;\n prevDatavalue: any;\n\n constructor(props: WmDatetimeProps, defaultClass = DEFAULT_CLASS, defaultProps = new WmDatetimeProps(), defaultState= new BaseDatetimeState()) {\n super(props, defaultClass, defaultProps, defaultState);\n }\n\n format(date: Date | number | undefined, format: string) {\n if (format === 'timestamp') {\n return date instanceof Date ? '' + date.getTime() : date;\n }\n return date && moment(date).format(format);\n }\n\n parse(date: string | number, format: string) {\n if (format === 'timestamp') {\n if (isString(date)) {\n return new Date(parseInt(date));\n }\n if (isNumber(date)) {\n return new Date(date);\n }\n }\n return date && moment(date, format).toDate();\n }\n\n private monitorAndUpdateCurrentTime() {\n this.stopCurrentTimeMonitor();\n const timerId = setInterval(() => {\n this.updateState({\n props: {\n readonly: true,\n datavalue: Date.now()\n },\n timerId: timerId\n } as any as BaseDatetimeState);\n }, 1000);\n }\n\n private stopCurrentTimeMonitor() {\n if (this.state.timerId) {\n clearInterval(this.state.timerId as any);\n }\n }\n\n convertTimezone(date: any){ \n const timezone = AppI18nService.getTimezone();\n if (timezone) {\n const parsedDateString = new Date(date).toLocaleString(this.props.locale ? this.props.locale : 'en-us', { timeZone: timezone });\n return moment(parsedDateString, 'M/D/YYYY, h:mm:ss A');\n }\n else {\n return null;\n }\n }\n \n momentPattern(pattern : String) {\n return pattern?.replaceAll('y', 'Y').replaceAll('d', 'D');\n}\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n const props = this.state.props;\n switch(name) {\n //@ts-ignore\n case 'datavalue':\n this.invokeEventCallback('onChange', [null, this, $new, $old]);\n this.prevDatavalue = $old;\n if (props.datavalue === CURRENT_TIME) {\n this.monitorAndUpdateCurrentTime();\n }\n case 'datepattern':\n case 'outputformat':\n if (props.datavalue && this.momentPattern(props.outputformat as String) && this.momentPattern(props.datepattern as String)) {\n let datavalue: any = props.datavalue;\n if (datavalue === CURRENT_DATE || datavalue === CURRENT_TIME) {\n datavalue = new Date() as any;\n }\n const date = isString(datavalue) ? this.parse(datavalue as string, this.momentPattern(props.outputformat as String)) : datavalue;\n datavalue = this.convertTimezone(datavalue);\n this.updateState({\n dateValue : date,\n displayValue: this.format(datavalue?datavalue:date as any, this.momentPattern(props.datepattern as String))\n } as BaseDatetimeState);\n } else {\n this.updateState({\n dateValue : null as any,\n displayValue: null as any\n } as BaseDatetimeState);\n }\n this.props.onFieldChange && this.props.onFieldChange('datavalue', props.datavalue, this.prevDatavalue);\n break;\n case 'mindate':\n if (isString($new)) {\n const minDateVal = ($new === CURRENT_DATE || $new === CURRENT_TIME) ? new Date() : props.mindate;\n this.updateState({\n props: {\n mindate: moment(minDateVal, this.momentPattern(props.datepattern as String)).toDate()\n }\n } as BaseDatetimeState);\n }\n break;\n case 'maxdate':\n if (isString($new)) {\n const maxDateVal = ($new === CURRENT_DATE || $new === CURRENT_TIME) ? new Date() : props.maxdate;\n this.updateState({\n props: {\n maxdate: moment(maxDateVal, this.momentPattern(props.datepattern as String)).toDate()\n }\n } as BaseDatetimeState);\n }\n break;\n case 'readonly':\n this.updateState({\n props: {\n disabled: $new\n }\n } as BaseDatetimeState)\n break;\n }\n }\n\n onDateChange($event: DateTimePickerEvent, date?: Date) {\n this.validate(date);\n this.modes.shift();\n this.updateState({\n isFocused: false,\n showDatePicker: !!this.modes.length,\n props: {\n datavalue: this.format(date, this.momentPattern(this.state.props.outputformat as String) as string),\n timestamp: this.format(date, 'timestamp')\n }\n } as BaseDatetimeState);\n }\n\n onBlur() {\n if (Platform.OS === 'web') {\n this.validate(this.state.props.datavalue);\n setTimeout(() => this.props.triggerValidation && this.props.triggerValidation());\n }\n this.invokeEventCallback('onBlur', [null, this]);\n }\n\n onFocus() {\n if (!this.state.props.readonly) {\n if (Platform.OS !== 'web' && this.state.props.mode === 'datetime') {\n this.modes = ['date', 'time'];\n } else {\n this.modes = [this.state.props.mode];\n }\n this.updateState({showDatePicker: true, isFocused: true} as BaseDatetimeState);\n if (this.state.props.mode === 'date') {\n this.updateState({showDatePickerModal: true} as BaseDatetimeState);\n }\n if (this.state.props.mode === 'time') {\n this.updateState({showTimePickerModal: true} as BaseDatetimeState);\n }\n if (this.state.props.mode === 'datetime') {\n this.updateState({showDatePickerModal: true} as BaseDatetimeState);\n }\n this.invokeEventCallback('onFocus', [null, this]);\n }\n }\n\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.setState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as BaseDatetimeState)\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n this.stopCurrentTimeMonitor();\n }\n\n renderWebWidget(props: WmDatetimeProps) {\n return (<WebDatePicker\n mode={this.state.props.mode}\n locale={props.locale}\n value={this.state.dateValue || new Date()}\n onDateChange={(date: Date) => this.onDateChange(null as any, date)}\n onDismiss={() =>\n this.updateState({\n isFocused: false,\n showDatePicker: false\n } as BaseDatetimeState, () => this.onBlur())}\n minimumDate={props.mindate as Date}\n maximumDate={props.maxdate as Date}/>);\n }\n\n renderNativeWidget(props: WmDatetimeProps, onDismiss?: Function) {\n return (<DateTimePicker\n mode={this.modes[0] as any}\n {...getAccessibilityProps(AccessibilityWidgetType.DATE, {...this.state.props})}\n value={this.state.dateValue || new Date()}\n is24Hour={true}\n display='default'\n onChange={(event: DateTimePickerEvent, date?: Date) => {\n if (date && this.state.props.mode === 'datetime' && this.modes[0] === 'time') {\n const dateSelected = this.state.dateValue;\n date = moment(date)\n .set('month', dateSelected.getMonth())\n .set('year', dateSelected.getFullYear())\n .set('date', dateSelected.getDate())\n .toDate();\n }\n this.onDateChange(event, date || this.state.dateValue);\n if (this.modes.length <= 1) {\n this.onBlur();\n onDismiss && onDismiss();\n }\n }}\n minimumDate={props.mindate as Date}\n maximumDate={props.maxdate as Date}\n />\n );\n }\n\n renderNativeIOSWidget(props: WmDatetimeProps, onDismiss?: Function) {\n let date_change : any = undefined;\n return (<View style={this.styles.dialog}>\n <DateTimePicker\n mode={this.modes[0] as any}\n value={this.state.dateValue || new Date()}\n is24Hour={true}\n display='spinner'\n onChange={(event: DateTimePickerEvent, date?: Date) => {\n if (date && this.state.props.mode === 'datetime' && this.modes[0] === 'time') {\n const dateSelected = this.state.dateValue;\n date = moment(date)\n .set('month', dateSelected.getMonth())\n .set('year', dateSelected.getFullYear())\n .set('date', dateSelected.getDate())\n .toDate();\n }\n date_change = date;\n }}\n minimumDate={props.mindate as Date}\n maximumDate={props.maxdate as Date}\n />\n <View style={this.styles.actionWrapper}>\n <WmButton styles={this.styles.selectBtn} caption='Select' onTap={() => {\n this.onDateChange(null as any, date_change || this.state.dateValue || new Date());\n if (this.modes.length <= 1) {\n this.onBlur();\n onDismiss && onDismiss();\n }\n }} />\n <WmButton styles={this.styles.cancelBtn} caption='Cancel' onTap={() => {\n this.modes.shift();\n this.onDateChange(null as any, this.state.dateValue || undefined);\n this.onBlur();\n onDismiss && onDismiss();\n }} />\n </View>\n </View>\n );\n }\n\n renderNativeIOSWidgetWithModal(props: WmDatetimeProps) {\n return (<ModalConsumer>{(modalService: ModalService) => {\n this.nativeModalOptions.content = (<>\n {this.renderNativeIOSWidget(props, () => modalService.hideModal(this.nativeModalOptions))}\n </>);\n this.nativeModalOptions.centered = true;\n this.nativeModalOptions.onClose = () => {\n this.onBlur();\n };\n modalService.showModal(this.nativeModalOptions);\n return null;\n }}</ModalConsumer>);\n }\n\n renderNativeWidgetWithModal(props: WmDatetimeProps) {\n return (<ModalConsumer>{(modalService: ModalService) => {\n this.nativeModalOptions.content = (<>\n {this.renderNativeWidget(props, () => modalService.hideModal(this.nativeModalOptions))}\n </>);\n this.nativeModalOptions.centered = true;\n this.nativeModalOptions.onClose = () => {\n this.onBlur();\n };\n modalService.showModal(this.nativeModalOptions);\n return null;\n }}</ModalConsumer>);\n }\n\n addTouchableOpacity(props: WmDatetimeProps, children: React.JSX.Element, styles?: any) : React.ReactNode{\n const hint = children?.props?.hint;\n const accessibilityProps = hint ? {accessible: true, accessibilityHint: hint} : {};\n\n return (\n <TouchableOpacity \n {...this.getTestPropsForAction()} \n {...accessibilityProps}\n style={styles} onPress={() => {\n if (!props.readonly) {\n this.onFocus();\n }\n this.invokeEventCallback('onTap', [null, this]);\n }}>\n {children}\n </TouchableOpacity>\n );\n }\n\n getIcon() {\n if (this.state.props.mode === 'time') {\n return 'wm-sl-l sl-time'\n }\n return 'wm-sl-l sl-calendar';\n }\n\n renderWidget(props: WmDatetimeProps) {\n return ( \n this.addTouchableOpacity(props, (\n <View style={[this.styles.root, this.state.isValid ? {} : this.styles.invalid, this.state.isFocused ? this.styles.focused : null]}>\n {this._background}\n {props.floatinglabel ? (\n <FloatingLabel\n moveUp={!!(props.datavalue || this.state.isFocused)}\n label={props.floatinglabel ?? props.placeholder} \n style={{\n ...(this.styles.floatingLabel || []),\n ...(this.state.isFocused ? (this.styles.activeFloatingLabel || {}) : {})\n }}\n />\n ) : null}\n <View style={this.styles.container}>\n {this.addTouchableOpacity(props, (\n <Text style={[\n this.styles.text,\n this.state.displayValue ? {} : this.styles.placeholderText\n ]}\n {...this.getTestPropsForLabel()}>\n {this.state.displayValue \n || (props.floatinglabel ? '' : this.state.props.placeholder)}\n </Text>\n ), [{ flex: 1}, this.isRTL?{flexDirection:'row', textAlign:'right'}:{}] )}\n {(!props.readonly && props.datavalue &&\n (<WmIcon iconclass=\"wi wi-clear\"\n styles={{color: this.styles.text.color, ...this.styles.clearIcon}}\n id={this.getTestId('clearicon')}\n accessibilitylabel={`clear ${props?.mode}`}\n onTap={() => {\n this.onDateChange(null as any, null as any);\n this.clearBtnClicked = true;\n }}/>)) || null}\n {this.addTouchableOpacity(props, (\n <WmIcon iconclass={this.getIcon()} styles={{color: this.styles.text.color, ...this.styles.calendarIcon}} hint={props?.hint}/>\n ))}\n </View>\n {\n this.state.showDatePicker\n && ((Platform.OS === 'web' && this.renderWebWidget(props))\n || (!props.iswheelpicker && Platform.OS === 'android' && this.renderNativeWidget(props))\n || (!props.iswheelpicker && Platform.OS === 'ios' && this.renderNativeIOSWidgetWithModal(props)))\n }\n {(Platform.OS !== 'web' && props.iswheelpicker && this.state.showDatePickerModal) && (\n <WmDatePickerModal\n isVisible={this.state.showDatePickerModal}\n onClose={() => this.updateState({showDatePickerModal: false} as BaseDatetimeState)}\n selectedDate={this.state.dateValue}\n onSelect={(date: Date) => {\n this.onDateChange(null as any, date);\n this.updateState({\n isFocused: false,\n showDatePickerModal: false\n } as BaseDatetimeState, () => {\n this.onBlur();\n\n // * showing time picker after selecting date in datetime mode\n if (this.state.props.mode === \"datetime\") {\n this.setState({\n showTimePickerModal: true,\n })\n }\n });\n }}\n onCancel={() => {\n // this.onDateChange(null as any, this.state.dateValue || undefined);\n this.updateState({\n isFocused: false,\n showDatePickerModal: false\n } as BaseDatetimeState, () => this.onBlur());\n }}\n />\n )}\n {(Platform.OS !== 'web' && props.iswheelpicker && this.state.showTimePickerModal) && (\n <WmTimePickerModal\n selectedDateTime={this.state.dateValue}\n is24Hour={props.is24hour}\n isVisible={this.state.showTimePickerModal}\n onClose={() => this.updateState({isFocused: false, showTimePickerModal: false} as BaseDatetimeState)}\n onSelect={(time: Date) => {\n this.onDateChange(null as any, time);\n this.updateState({\n isFocused: false,\n showTimePickerModal: false\n } as BaseDatetimeState, () => this.onBlur());\n }}\n onCancel={() => {\n // this.onDateChange(null as any, this.state.dateValue || undefined);\n this.updateState({\n isFocused: false,\n showTimePickerModal: false\n } as BaseDatetimeState, () => {\n this.onBlur();\n this.modes.shift();\n });\n }}\n />\n )}\n </View>\n ))\n );\n }\n}\n\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,gBAAgB,QAAmB,cAAc;AAChF,OAAOC,MAAM,MAAM,QAAQ;AAC3B,OAAOC,cAAc,MAA+B,wCAAwC;AAC5F,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,eAAe,MAAM,2BAA2B;AACvD,SAASC,aAAa,QAA0B,4BAA4B;AAC5E,OAAOC,aAAa,MAAM,yBAAyB;AACnD,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,WAAW;AAC9C,SAASC,aAAa,QAAoC,8CAA8C;AACxG,SAASC,aAAa,QAAQ,sCAAsC;AACpE,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,aAAa,QAAQ,mEAAmE;AACjG,OAAOC,cAAc,MAAM,6DAA6D;AACxF,OAAOC,QA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ity","moment","DateTimePicker","BaseComponent","BaseComponentState","WmIcon","WmDatetimeProps","DEFAULT_CLASS","WebDatePicker","isNumber","isString","ModalConsumer","isDateFormatAsPerPattern","validateField","AccessibilityWidgetType","getAccessibilityProps","FloatingLabel","AppI18nService","WmButton","WmDatePickerModal","WmTimePickerModal","BaseDatetimeState","constructor","args","_defineProperty","CURRENT_DATE","CURRENT_TIME","BaseDatetime","props","defaultClass","defaultProps","defaultState","format","date","Date","getTime","parse","parseInt","toDate","monitorAndUpdateCurrentTime","stopCurrentTimeMonitor","timerId","setInterval","updateState","readonly","datavalue","now","state","clearInterval","convertTimezone","timezone","getTimezone","parsedDateString","toLocaleString","locale","timeZone","momentPattern","pattern","replaceAll","onPropertyChange","name","$new","$old","prevDatavalue","outputformat","datepattern","dateValue","displayValue","onFieldChange","minDateVal","mindate","isMinMatchingPattern","minDatePatternFormatted","formattedMinDate","maxDateVal","maxdate","isMaxMatchingPattern","maxDatePatternFormatted","formattedMaxDate","disabled","onDateChange","$event","prevDate","undefined","validate","modes","shift","newDate","isFocused","showDatePicker","length","timestamp","invokeEventCallback","onBlur","OS","setTimeout","triggerValidation","onFocus","mode","showDatePickerModal","showTimePickerModal","value","validationObj","setState","isValid","errorType","componentWillUnmount","renderWebWidget","createElement","onDismiss","minimumDate","maximumDate","renderNativeWidget","_extends","DATE","is24Hour","display","onChange","event","dateSelected","set","getMonth","getFullYear","getDate","renderNativeIOSWidget","date_change","style","styles","dialog","actionWrapper","selectBtn","caption","onTap","cancelBtn","renderNativeIOSWidgetWithModal","modalService","nativeModalOptions","content","Fragment","hideModal","centered","onClose","showModal","renderNativeWidgetWithModal","addTouchableOpacity","children","_children$props","hint","accessibilityProps","accessible","accessibilityHint","getTestPropsForAction","onPress","getIcon","renderWidget","_props$floatinglabel","is12HourFormat","test","is24hour","root","invalid","focused","_background","floatinglabel","moveUp","label","placeholder","floatingLabel","activeFloatingLabel","container","text","placeholderText","getTestPropsForLabel","flex","isRTL","flexDirection","textAlign","iconclass","color","clearIcon","id","getTestId","accessibilitylabel","clearBtnClicked","calendarIcon","iswheelpicker","isVisible","minDate","maxDate","selectedDate","onSelect","onCancel","selectedDateTime","time"],"sources":["base-datetime.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, Platform, TouchableOpacity, ViewStyle } from 'react-native';\nimport moment from 'moment';\nimport DateTimePicker, { DateTimePickerEvent } from '@react-native-community/datetimepicker';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmDatetimeProps from './datetime/datetime.props';\nimport { DEFAULT_CLASS, WmDatetimeStyles } from './datetime/datetime.styles';\nimport WebDatePicker from './date-picker.component';\nimport { isEqual, isNumber, isString } from 'lodash-es';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport { isDateFormatAsPerPattern, validateField } from '@wavemaker/app-rn-runtime/core/utils';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { FloatingLabel } from '@wavemaker/app-rn-runtime/core/components/floatinglabel.component';\nimport AppI18nService from '@wavemaker/app-rn-runtime/runtime/services/app-i18n.service';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport WmDatePickerModal from './wheelpickermodal/date/date-picker-modal.component';\nimport WmTimePickerModal from './wheelpickermodal/time/time-picker-modal.component';\n\nexport class BaseDatetimeState extends BaseComponentState<WmDatetimeProps> {\n showDatePicker = false;\n showDatePickerModal = false;\n showTimePickerModal = false;\n dateValue: Date = null as any;\n displayValue: string = null as any;\n isFocused = false;\n timerId: NodeJS.Timer = null as any;\n isValid: boolean = true;\n errorType = '';\n}\n\nconst CURRENT_DATE = 'CURRENT_DATE';\nconst CURRENT_TIME = 'CURRENT_TIME';\n\nexport default abstract class BaseDatetime extends BaseComponent<WmDatetimeProps, BaseDatetimeState, WmDatetimeStyles> {\n clearBtnClicked = false;\n modes = [] as string[];\n nativeModalOptions: ModalOptions = {} as any;\n prevDatavalue: any;\n\n constructor(props: WmDatetimeProps, defaultClass = DEFAULT_CLASS, defaultProps = new WmDatetimeProps(), defaultState= new BaseDatetimeState()) {\n super(props, defaultClass, defaultProps, defaultState);\n }\n\n format(date: Date | number | undefined, format: string) {\n if (format === 'timestamp') {\n return date instanceof Date ? '' + date.getTime() : date;\n }\n return date && moment(date).format(format);\n }\n\n parse(date: string | number, format: string) {\n if (format === 'timestamp') {\n if (isString(date)) {\n return new Date(parseInt(date));\n }\n if (isNumber(date)) {\n return new Date(date);\n }\n }\n return date && moment(date, format).toDate();\n }\n\n private monitorAndUpdateCurrentTime() {\n this.stopCurrentTimeMonitor();\n const timerId = setInterval(() => {\n this.updateState({\n props: {\n readonly: true,\n datavalue: Date.now()\n },\n timerId: timerId\n } as any as BaseDatetimeState);\n }, 1000);\n }\n\n private stopCurrentTimeMonitor() {\n if (this.state.timerId) {\n clearInterval(this.state.timerId as any);\n }\n }\n\n convertTimezone(date: any){ \n const timezone = AppI18nService.getTimezone();\n if (timezone) {\n const parsedDateString = new Date(date).toLocaleString(this.props.locale ? this.props.locale : 'en-us', { timeZone: timezone });\n return moment(parsedDateString, 'M/D/YYYY, h:mm:ss A');\n }\n else {\n return null;\n }\n }\n \n momentPattern(pattern : String) {\n return pattern?.replaceAll('y', 'Y').replaceAll('d', 'D');\n}\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n const props = this.state.props;\n switch(name) {\n //@ts-ignore\n case 'datavalue':\n this.prevDatavalue = $old;\n if (props.datavalue === CURRENT_TIME) {\n this.monitorAndUpdateCurrentTime();\n }\n case 'datepattern':\n case 'outputformat':\n if (props.datavalue && this.momentPattern(props.outputformat as String) && this.momentPattern(props.datepattern as String)) {\n let datavalue: any = props.datavalue;\n if (datavalue === CURRENT_DATE || datavalue === CURRENT_TIME) {\n datavalue = new Date() as any;\n }\n const date = isString(datavalue) ? this.parse(datavalue as string, this.momentPattern(props.outputformat as String)) : datavalue;\n datavalue = this.convertTimezone(datavalue);\n this.updateState({\n dateValue : date,\n displayValue: this.format(datavalue?datavalue:date as any, this.momentPattern(props.datepattern as String))\n } as BaseDatetimeState);\n } else {\n this.updateState({\n dateValue : null as any,\n displayValue: null as any\n } as BaseDatetimeState);\n }\n this.props.onFieldChange && this.props.onFieldChange('datavalue', props.datavalue, this.prevDatavalue);\n break;\n case 'mindate':\n if (isString($new)) {\n const minDateVal = ($new === CURRENT_DATE || $new === CURRENT_TIME) ? new Date() : props.mindate;\n // * check if supplied mindate is as per datepattern\n const isMinMatchingPattern = minDateVal\n ? isDateFormatAsPerPattern(this.momentPattern(props.datepattern as String), minDateVal)\n : false;\n // * min date formatted as per datepattern\n const minDatePatternFormatted = minDateVal && isMinMatchingPattern ? moment(\n moment(\n minDateVal,\n this.momentPattern(props.datepattern as String)\n ).format('YYYY-MM-DD')\n ) : null;\n // * min date formatted as per ISO, if mindate supplied is not as per datepattern\n const formattedMinDate = minDatePatternFormatted && isMinMatchingPattern\n ? minDatePatternFormatted.toDate()\n : moment(minDateVal).toDate();\n this.updateState({\n props: {\n mindate: formattedMinDate\n }\n } as BaseDatetimeState);\n }\n break;\n case 'maxdate':\n if (isString($new)) {\n const maxDateVal = ($new === CURRENT_DATE || $new === CURRENT_TIME) ? new Date() : props.maxdate;\n // * check if supplied maxdate is as per datepattern\n const isMaxMatchingPattern = maxDateVal\n ? isDateFormatAsPerPattern(this.momentPattern(props.datepattern as String), maxDateVal)\n : false;\n // * max date formatted as per datepattern\n const maxDatePatternFormatted = maxDateVal && isMaxMatchingPattern ? moment(\n moment(\n maxDateVal,\n this.momentPattern(props.datepattern as String)\n ).format('YYYY-MM-DD')\n ) : null;\n // * max date formatted as per ISO, if maxdate supplied is not as per datepattern\n const formattedMaxDate = maxDatePatternFormatted && isMaxMatchingPattern\n ? maxDatePatternFormatted.toDate()\n : moment(maxDateVal).toDate();\n\n this.updateState({\n props: {\n maxdate: formattedMaxDate,\n },\n } as BaseDatetimeState);\n }\n break;\n case 'readonly':\n this.updateState({\n props: {\n disabled: $new\n }\n } as BaseDatetimeState)\n break;\n }\n }\n\n onDateChange($event: DateTimePickerEvent, date?: Date) {\n const prevDate = this.format(this.state.dateValue, this.momentPattern(this.state.props.outputformat as String) as string) || undefined;\n this.validate(date);\n this.modes.shift();\n const newDate = this.format(date, this.momentPattern(this.state.props.outputformat as String) as string)\n this.updateState({\n isFocused: false,\n showDatePicker: !!this.modes.length,\n props: {\n datavalue: newDate,\n timestamp: this.format(date, 'timestamp')\n }\n } as BaseDatetimeState, () => this.invokeEventCallback('onChange', [null, this, newDate, prevDate]));\n }\n\n onBlur() {\n if (Platform.OS === 'web') {\n this.validate(this.state.props.datavalue);\n setTimeout(() => this.props.triggerValidation && this.props.triggerValidation());\n }\n this.invokeEventCallback('onBlur', [null, this]);\n }\n\n onFocus() {\n if (!this.state.props.readonly) {\n if (Platform.OS !== 'web' && this.state.props.mode === 'datetime') {\n this.modes = ['date', 'time'];\n } else {\n this.modes = [this.state.props.mode];\n }\n this.updateState({showDatePicker: true, isFocused: true} as BaseDatetimeState);\n if (this.state.props.mode === 'date') {\n this.updateState({showDatePickerModal: true} as BaseDatetimeState);\n }\n if (this.state.props.mode === 'time') {\n this.updateState({showTimePickerModal: true} as BaseDatetimeState);\n }\n if (this.state.props.mode === 'datetime') {\n this.updateState({showDatePickerModal: true} as BaseDatetimeState);\n }\n this.invokeEventCallback('onFocus', [null, this]);\n }\n }\n\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.setState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as BaseDatetimeState)\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n this.stopCurrentTimeMonitor();\n }\n\n renderWebWidget(props: WmDatetimeProps) {\n return (<WebDatePicker\n mode={this.state.props.mode}\n locale={props.locale}\n value={this.state.dateValue || new Date()}\n onDateChange={(date: Date) => this.onDateChange(null as any, date)}\n onDismiss={() =>\n this.updateState({\n isFocused: false,\n showDatePicker: false\n } as BaseDatetimeState, () => this.onBlur())}\n minimumDate={props.mindate as Date}\n maximumDate={props.maxdate as Date}/>);\n }\n\n renderNativeWidget(props: WmDatetimeProps, onDismiss?: Function) {\n return (<DateTimePicker\n mode={this.modes[0] as any}\n {...getAccessibilityProps(AccessibilityWidgetType.DATE, {...this.state.props})}\n value={this.state.dateValue || new Date()}\n is24Hour={true}\n display='default'\n onChange={(event: DateTimePickerEvent, date?: Date) => {\n if (date && this.state.props.mode === 'datetime' && this.modes[0] === 'time') {\n const dateSelected = this.state.dateValue;\n date = moment(date)\n .set('month', dateSelected.getMonth())\n .set('year', dateSelected.getFullYear())\n .set('date', dateSelected.getDate())\n .toDate();\n }\n this.onDateChange(event, date || this.state.dateValue);\n if (this.modes.length <= 1) {\n this.onBlur();\n onDismiss && onDismiss();\n }\n }}\n minimumDate={props.mindate as Date}\n maximumDate={props.maxdate as Date}\n />\n );\n }\n\n renderNativeIOSWidget(props: WmDatetimeProps, onDismiss?: Function) {\n let date_change : any = undefined;\n return (<View style={this.styles.dialog}>\n <DateTimePicker\n mode={this.modes[0] as any}\n value={this.state.dateValue || new Date()}\n is24Hour={true}\n display='spinner'\n onChange={(event: DateTimePickerEvent, date?: Date) => {\n if (date && this.state.props.mode === 'datetime' && this.modes[0] === 'time') {\n const dateSelected = this.state.dateValue;\n date = moment(date)\n .set('month', dateSelected.getMonth())\n .set('year', dateSelected.getFullYear())\n .set('date', dateSelected.getDate())\n .toDate();\n }\n date_change = date;\n }}\n minimumDate={props.mindate as Date}\n maximumDate={props.maxdate as Date}\n />\n <View style={this.styles.actionWrapper}>\n <WmButton styles={this.styles.selectBtn} caption='Select' onTap={() => {\n this.onDateChange(null as any, date_change || this.state.dateValue || new Date());\n if (this.modes.length <= 1) {\n this.onBlur();\n onDismiss && onDismiss();\n }\n }} />\n <WmButton styles={this.styles.cancelBtn} caption='Cancel' onTap={() => {\n this.modes.shift();\n this.onDateChange(null as any, this.state.dateValue || undefined);\n this.onBlur();\n onDismiss && onDismiss();\n }} />\n </View>\n </View>\n );\n }\n\n renderNativeIOSWidgetWithModal(props: WmDatetimeProps) {\n return (<ModalConsumer>{(modalService: ModalService) => {\n this.nativeModalOptions.content = (<>\n {this.renderNativeIOSWidget(props, () => modalService.hideModal(this.nativeModalOptions))}\n </>);\n this.nativeModalOptions.centered = true;\n this.nativeModalOptions.onClose = () => {\n this.onBlur();\n };\n modalService.showModal(this.nativeModalOptions);\n return null;\n }}</ModalConsumer>);\n }\n\n renderNativeWidgetWithModal(props: WmDatetimeProps) {\n return (<ModalConsumer>{(modalService: ModalService) => {\n this.nativeModalOptions.content = (<>\n {this.renderNativeWidget(props, () => modalService.hideModal(this.nativeModalOptions))}\n </>);\n this.nativeModalOptions.centered = true;\n this.nativeModalOptions.onClose = () => {\n this.onBlur();\n };\n modalService.showModal(this.nativeModalOptions);\n return null;\n }}</ModalConsumer>);\n }\n\n addTouchableOpacity(props: WmDatetimeProps, children: React.JSX.Element, styles?: any) : React.ReactNode{\n const hint = children?.props?.hint;\n const accessibilityProps = hint ? {accessible: true, accessibilityHint: hint} : {};\n\n return (\n <TouchableOpacity \n {...this.getTestPropsForAction()} \n {...accessibilityProps}\n style={styles} onPress={() => {\n if (!props.readonly) {\n this.onFocus();\n }\n this.invokeEventCallback('onTap', [null, this]);\n }}>\n {children}\n </TouchableOpacity>\n );\n }\n\n getIcon() {\n if (this.state.props.mode === 'time') {\n return 'wm-sl-l sl-time'\n }\n return 'wm-sl-l sl-calendar';\n }\n\n renderWidget(props: WmDatetimeProps) {\n const is12HourFormat = props?.datepattern && /hh:mm(:ss|:sss)? a/.test(props.datepattern);\n const is24Hour = is12HourFormat ? false : props.is24hour;\n return ( \n this.addTouchableOpacity(props, (\n <View style={[this.styles.root, this.state.isValid ? {} : this.styles.invalid, this.state.isFocused ? this.styles.focused : null]}>\n {this._background}\n {props.floatinglabel ? (\n <FloatingLabel\n moveUp={!!(props.datavalue || this.state.isFocused)}\n label={props.floatinglabel ?? props.placeholder} \n style={{\n ...(this.styles.floatingLabel || []),\n ...(this.state.isFocused ? (this.styles.activeFloatingLabel || {}) : {})\n }}\n />\n ) : null}\n <View style={this.styles.container}>\n {this.addTouchableOpacity(props, (\n <Text style={[\n this.styles.text,\n this.state.displayValue ? {} : this.styles.placeholderText\n ]}\n {...this.getTestPropsForLabel()}>\n {this.state.displayValue \n || (props.floatinglabel ? '' : this.state.props.placeholder)}\n </Text>\n ), [{ flex: 1}, this.isRTL?{flexDirection:'row', textAlign:'right'}:{}] )}\n {(!props.readonly && props.datavalue &&\n (<WmIcon iconclass=\"wi wi-clear\"\n styles={{color: this.styles.text.color, ...this.styles.clearIcon}}\n id={this.getTestId('clearicon')}\n accessibilitylabel={`clear ${props?.mode}`}\n onTap={() => {\n this.onDateChange(null as any, null as any);\n this.clearBtnClicked = true;\n }}/>)) || null}\n {this.addTouchableOpacity(props, (\n <WmIcon iconclass={this.getIcon()} styles={{color: this.styles.text.color, ...this.styles.calendarIcon}} hint={props?.hint} id={this.getTestId('calendericon')}/>\n ))}\n </View>\n {\n this.state.showDatePicker\n && ((Platform.OS === 'web' && this.renderWebWidget(props))\n || (!props.iswheelpicker && Platform.OS === 'android' && this.renderNativeWidget(props))\n || (!props.iswheelpicker && Platform.OS === 'ios' && this.renderNativeIOSWidgetWithModal(props)))\n }\n {(Platform.OS !== 'web' && props.iswheelpicker && this.state.showDatePickerModal) && (\n <WmDatePickerModal\n isVisible={this.state.showDatePickerModal}\n onClose={() => this.updateState({showDatePickerModal: false} as BaseDatetimeState)}\n minDate={props.mindate}\n maxDate={props.maxdate}\n selectedDate={this.state.dateValue}\n onSelect={(date: Date) => {\n this.onDateChange(null as any, date);\n this.updateState({\n isFocused: false,\n showDatePickerModal: false\n } as BaseDatetimeState, () => {\n this.onBlur();\n\n // * showing time picker after selecting date in datetime mode\n if (this.state.props.mode === \"datetime\") {\n this.setState({\n showTimePickerModal: true,\n })\n }\n });\n }}\n onCancel={() => {\n // this.onDateChange(null as any, this.state.dateValue || undefined);\n this.updateState({\n isFocused: false,\n showDatePickerModal: false\n } as BaseDatetimeState, () => this.onBlur());\n }}\n />\n )}\n {(Platform.OS !== 'web' && props.iswheelpicker && this.state.showTimePickerModal) && (\n <WmTimePickerModal\n selectedDateTime={this.state.dateValue}\n is24Hour={is24Hour}\n isVisible={this.state.showTimePickerModal}\n onClose={() => this.updateState({isFocused: false, showTimePickerModal: false} as BaseDatetimeState)}\n onSelect={(time: Date) => {\n this.onDateChange(null as any, time);\n this.updateState({\n isFocused: false,\n showTimePickerModal: false\n } as BaseDatetimeState, () => this.onBlur());\n }}\n onCancel={() => {\n // this.onDateChange(null as any, this.state.dateValue || undefined);\n this.updateState({\n isFocused: false,\n showTimePickerModal: false\n } as BaseDatetimeState, () => {\n this.onBlur();\n this.modes.shift();\n });\n }}\n />\n )}\n </View>\n ))\n );\n }\n}\n\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,gBAAgB,QAAmB,cAAc;AAChF,OAAOC,MAAM,MAAM,QAAQ;AAC3B,OAAOC,cAAc,MAA+B,wCAAwC;AAC5F,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,eAAe,MAAM,2BAA2B;AACvD,SAASC,aAAa,QAA0B,4BAA4B;AAC5E,OAAOC,aAAa,MAAM,yBAAyB;AACnD,SAAkBC,QAAQ,EAAEC,QAAQ,QAAQ,WAAW;AACvD,SAASC,aAAa,QAAoC,8CAA8C;AACxG,SAASC,wBAAwB,EAAEC,aAAa,QAAQ,sCAAsC;AAC9F,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,aAAa,QAAQ,mEAAmE;AACjG,OAAOC,cAAc,MAAM,6DAA6D;AACxF,OAAO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CAAC;QACpB,CAAC,CAAC;MACJ;IAAE,CACH,CAEC,CACL,CAAC;EAER;AACF","ignoreList":[]}
|
@@ -4,24 +4,81 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
4
4
|
import React, { Component } from 'react';
|
5
5
|
import { PixelRatio, StyleSheet, View } from 'react-native';
|
6
6
|
import WmWheelScrollPicker from './wheelpicker/wheelpicker.component';
|
7
|
-
import { getDateObject, getDates, getMonths, getYearRange } from '@wavemaker/app-rn-runtime/core/utils';
|
7
|
+
import { getDateObject, getDates, getMonthIndex, getMonths, getYearRange } from '@wavemaker/app-rn-runtime/core/utils';
|
8
|
+
import moment from 'moment';
|
8
9
|
export class WmWheelDatePickerProps {
|
9
10
|
constructor() {
|
11
|
+
_defineProperty(this, "minDate", void 0);
|
12
|
+
_defineProperty(this, "maxDate", void 0);
|
10
13
|
_defineProperty(this, "selectedDate", new Date());
|
11
14
|
_defineProperty(this, "onDateChange", void 0);
|
12
15
|
_defineProperty(this, "itemHeight", PixelRatio.roundToNearestPixel(50));
|
13
16
|
_defineProperty(this, "wrapperHeight", PixelRatio.roundToNearestPixel(150));
|
14
17
|
}
|
15
18
|
}
|
19
|
+
export const START_DATE = {
|
20
|
+
'date': 1,
|
21
|
+
'month': 0,
|
22
|
+
'year': 1950
|
23
|
+
};
|
24
|
+
export const END_DATE = {
|
25
|
+
'date': 31,
|
26
|
+
'month': 11,
|
27
|
+
'year': 2060
|
28
|
+
};
|
16
29
|
export class WmWheelDatePickerState {}
|
17
30
|
export class WmWheelDatePicker extends Component {
|
18
|
-
constructor(
|
19
|
-
|
31
|
+
constructor(_props) {
|
32
|
+
var _selectedDate$getFull;
|
33
|
+
super(_props);
|
20
34
|
_defineProperty(this, "itemHeight", void 0);
|
21
35
|
_defineProperty(this, "wrapperHeight", void 0);
|
22
36
|
_defineProperty(this, "selectedDateIndex", 0);
|
23
37
|
_defineProperty(this, "selectedMonthIndex", 0);
|
24
38
|
_defineProperty(this, "selectedYearIndex", 0);
|
39
|
+
_defineProperty(this, "dateData", []);
|
40
|
+
_defineProperty(this, "monthData", []);
|
41
|
+
_defineProperty(this, "yearData", []);
|
42
|
+
_defineProperty(this, "defaultSelectedDate", void 0);
|
43
|
+
_defineProperty(this, "localSelectedDate", '');
|
44
|
+
_defineProperty(this, "monthValue", 0);
|
45
|
+
_defineProperty(this, "yearValue", '');
|
46
|
+
_defineProperty(this, "getMinValue", (minValue, type) => {
|
47
|
+
const currentMonth = moment(minValue).format('M');
|
48
|
+
const currentYear = moment(minValue).format('YYYY');
|
49
|
+
const selectedMonth = moment(this.localSelectedDate).format('M');
|
50
|
+
const selectedYear = moment(this.localSelectedDate).format('YYYY');
|
51
|
+
const isFutureMonth = Number(selectedMonth) > Number(currentMonth);
|
52
|
+
const isFutureYear = Number(selectedYear) > Number(currentYear);
|
53
|
+
if (!(minValue instanceof Date)) return START_DATE[type];
|
54
|
+
switch (type) {
|
55
|
+
case 'date':
|
56
|
+
const dateValue = isFutureYear ? 1 : isFutureMonth ? 1 : new Date(minValue).getDate();
|
57
|
+
// this.selectedDateIndex = dateIndex;
|
58
|
+
return dateValue;
|
59
|
+
case 'month':
|
60
|
+
const monthValue = isFutureYear ? 0 : new Date(minValue).getMonth();
|
61
|
+
// this.selectedMonthIndex = 11;
|
62
|
+
return monthValue;
|
63
|
+
case 'year':
|
64
|
+
return new Date(minValue).getFullYear();
|
65
|
+
default:
|
66
|
+
return 0;
|
67
|
+
}
|
68
|
+
});
|
69
|
+
_defineProperty(this, "getMaxValue", (maxValue, type) => {
|
70
|
+
if (!(maxValue instanceof Date)) return END_DATE[type];
|
71
|
+
switch (type) {
|
72
|
+
case 'date':
|
73
|
+
return new Date(maxValue).getDate();
|
74
|
+
case 'month':
|
75
|
+
return new Date(maxValue).getMonth();
|
76
|
+
case 'year':
|
77
|
+
return new Date(maxValue).getFullYear();
|
78
|
+
default:
|
79
|
+
return 0;
|
80
|
+
}
|
81
|
+
});
|
25
82
|
_defineProperty(this, "handleValueChange", (valueType, value, index) => {
|
26
83
|
var _this$props, _this$props$onDateCha;
|
27
84
|
switch (valueType) {
|
@@ -29,31 +86,85 @@ export class WmWheelDatePicker extends Component {
|
|
29
86
|
this.selectedDateIndex = index;
|
30
87
|
break;
|
31
88
|
case 'month':
|
89
|
+
this.monthValue = getMonthIndex(value === null || value === void 0 ? void 0 : value.toString());
|
32
90
|
this.selectedMonthIndex = index;
|
33
91
|
break;
|
34
92
|
case 'year':
|
93
|
+
this.yearValue = value;
|
35
94
|
this.selectedYearIndex = index;
|
36
95
|
break;
|
37
96
|
default:
|
38
97
|
break;
|
39
98
|
}
|
40
|
-
const
|
41
|
-
|
42
|
-
|
99
|
+
const {
|
100
|
+
props
|
101
|
+
} = this;
|
102
|
+
const minDate = props.minDate;
|
103
|
+
const maxDate = props.maxDate;
|
104
|
+
// * date range
|
105
|
+
const minDateNum = minDate ? this.getMinValue(minDate, 'date') : 1;
|
106
|
+
const maxDateNum = maxDate ? this.getMaxValue(maxDate, 'date') : 31;
|
107
|
+
const minYear = minDate ? this.getMinValue(minDate, 'year') : 1950;
|
108
|
+
const maxYear = maxDate ? this.getMaxValue(maxDate, 'year') : 2060;
|
109
|
+
const selectedDate = getDates(minDateNum, maxDateNum)[this.selectedDateIndex];
|
110
|
+
const selectedMonthIndex = this.monthValue;
|
111
|
+
const selectedYear = getYearRange(minYear, maxYear)[this.selectedYearIndex];
|
112
|
+
const dateObj = getDateObject(selectedDate, selectedMonthIndex, selectedYear);
|
113
|
+
this.localSelectedDate = dateObj;
|
43
114
|
(_this$props = this.props) === null || _this$props === void 0 || (_this$props$onDateCha = _this$props.onDateChange) === null || _this$props$onDateCha === void 0 || _this$props$onDateCha.call(_this$props, dateObj);
|
44
115
|
});
|
45
116
|
const _selectedDate = this.props.selectedDate || new Date();
|
46
117
|
this.itemHeight = PixelRatio.roundToNearestPixel(this.props.itemHeight || 50) || PixelRatio.roundToNearestPixel(50);
|
47
118
|
this.wrapperHeight = PixelRatio.roundToNearestPixel(this.props.wrapperHeight || 150) || PixelRatio.roundToNearestPixel(150);
|
48
|
-
|
49
|
-
|
50
|
-
this.
|
119
|
+
|
120
|
+
// * Initial values
|
121
|
+
this.defaultSelectedDate = _selectedDate;
|
122
|
+
this.localSelectedDate = _selectedDate;
|
123
|
+
this.monthValue = _selectedDate.getMonth();
|
124
|
+
this.yearValue = (_selectedDate$getFull = _selectedDate.getFullYear()) === null || _selectedDate$getFull === void 0 ? void 0 : _selectedDate$getFull.toString();
|
125
|
+
|
126
|
+
// TODO: selected date handling for range of dates
|
127
|
+
if (!(this.props.minDate || this.props.maxDate)) {
|
128
|
+
this.selectedDateIndex = _selectedDate.getDate() - 1;
|
129
|
+
this.selectedMonthIndex = _selectedDate.getMonth();
|
130
|
+
this.selectedYearIndex = getYearRange().indexOf(_selectedDate.getFullYear());
|
131
|
+
}
|
132
|
+
}
|
133
|
+
// TODO: cache this func for performance improvement
|
134
|
+
getPickerData(type) {
|
135
|
+
const {
|
136
|
+
props
|
137
|
+
} = this;
|
138
|
+
const minDate = props.minDate;
|
139
|
+
const maxDate = props.maxDate;
|
140
|
+
const minDateNum = minDate ? this.getMinValue(minDate, 'date') : 1;
|
141
|
+
const maxDateNum = maxDate ? this.getMaxValue(maxDate, 'date') : 31;
|
142
|
+
const minMonth = minDate ? this.getMinValue(minDate, 'month') : 0;
|
143
|
+
const maxMonth = maxDate ? this.getMaxValue(maxDate, 'month') : 11;
|
144
|
+
const minYear = minDate ? this.getMinValue(minDate, 'year') : 1950;
|
145
|
+
const maxYear = maxDate ? this.getMaxValue(maxDate, 'year') : 2060;
|
146
|
+
switch (type) {
|
147
|
+
case "date":
|
148
|
+
const dateData = getDates(minDateNum, maxDateNum);
|
149
|
+
this.dateData = dateData;
|
150
|
+
return dateData;
|
151
|
+
case "month":
|
152
|
+
const monthData = getMonths(minMonth, maxMonth);
|
153
|
+
this.monthData = monthData;
|
154
|
+
return monthData;
|
155
|
+
case "year":
|
156
|
+
const yearData = getYearRange(minYear, maxYear);
|
157
|
+
this.yearData = yearData;
|
158
|
+
return yearData;
|
159
|
+
default:
|
160
|
+
return [];
|
161
|
+
}
|
51
162
|
}
|
52
163
|
render() {
|
53
164
|
return /*#__PURE__*/React.createElement(View, {
|
54
165
|
style: styles.root
|
55
166
|
}, /*#__PURE__*/React.createElement(WmWheelScrollPicker, {
|
56
|
-
data:
|
167
|
+
data: this.getPickerData('date'),
|
57
168
|
wrapperHeight: this.wrapperHeight,
|
58
169
|
itemHeight: this.itemHeight,
|
59
170
|
selectedIndex: this.selectedDateIndex,
|
@@ -61,13 +172,13 @@ export class WmWheelDatePicker extends Component {
|
|
61
172
|
}), /*#__PURE__*/React.createElement(View, {
|
62
173
|
style: styles.middle
|
63
174
|
}, /*#__PURE__*/React.createElement(WmWheelScrollPicker, {
|
64
|
-
data:
|
175
|
+
data: this.getPickerData('month'),
|
65
176
|
wrapperHeight: this.wrapperHeight,
|
66
177
|
itemHeight: this.itemHeight,
|
67
178
|
selectedIndex: this.selectedMonthIndex,
|
68
179
|
onValueChange: (value, index) => this.handleValueChange('month', value, index)
|
69
180
|
})), /*#__PURE__*/React.createElement(WmWheelScrollPicker, {
|
70
|
-
data:
|
181
|
+
data: this.getPickerData('year'),
|
71
182
|
wrapperHeight: this.wrapperHeight,
|
72
183
|
itemHeight: this.itemHeight,
|
73
184
|
selectedIndex: this.selectedYearIndex,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Component","PixelRatio","StyleSheet","View","WmWheelScrollPicker","getDateObject","getDates","getMonths","getYearRange","WmWheelDatePickerProps","constructor","_defineProperty","Date","roundToNearestPixel","WmWheelDatePickerState","WmWheelDatePicker","props","valueType","value","index","_this$props","_this$props$onDateCha","selectedDateIndex","selectedMonthIndex","selectedYearIndex","selectedDate","selectedYear","dateObj","onDateChange","call","itemHeight","wrapperHeight","getDate","getMonth","indexOf","getFullYear","render","createElement","style","styles","root","data","selectedIndex","onValueChange","handleValueChange","middle","create","flexDirection","marginHorizontal"],"sources":["wheel-date-picker.component.tsx"],"sourcesContent":["import React, { Component } from 'react';\nimport { PixelRatio, StyleSheet, View } from 'react-native';\nimport WmWheelScrollPicker from './wheelpicker/wheelpicker.component'\nimport { getDateObject, getDates, getMonths, getYearRange } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmWheelDatePickerProps {\n selectedDate?: Date = new Date();\n onDateChange?: (date: Date) => void;\n itemHeight?: number = PixelRatio.roundToNearestPixel(50);\n wrapperHeight?: number = PixelRatio.roundToNearestPixel(150);\n}\n\nexport class WmWheelDatePickerState {}\n\nexport class WmWheelDatePicker extends Component<\n WmWheelDatePickerProps,\n WmWheelDatePickerState,\n any\n> {\n itemHeight: number;\n wrapperHeight: number;\n selectedDateIndex: number = 0;\n selectedMonthIndex: number = 0;\n selectedYearIndex: number = 0;\n\n constructor(props: WmWheelDatePickerProps) {\n super(props);\n const selectedDate = this.props.selectedDate || new Date();\n\n this.itemHeight =\n PixelRatio.roundToNearestPixel(this.props.itemHeight || 50) || PixelRatio.roundToNearestPixel(50);\n this.wrapperHeight =\n PixelRatio.roundToNearestPixel(this.props.wrapperHeight || 150) || PixelRatio.roundToNearestPixel(150);\n this.selectedDateIndex = selectedDate.getDate() - 1;\n this.selectedMonthIndex = selectedDate.getMonth();\n this.selectedYearIndex = getYearRange().indexOf(selectedDate.getFullYear());\n }\n\n handleValueChange = (\n valueType: 'date' | 'month' | 'year',\n value: string | number,\n index: number,\n ) => {\n switch (valueType) {\n case 'date':\n this.selectedDateIndex = index;\n break;\n case 'month':\n this.selectedMonthIndex = index;\n break;\n case 'year':\n this.selectedYearIndex = index;\n break;\n default:\n break;\n }\n\n const selectedDate = getDates()[this.selectedDateIndex];\n const selectedYear = getYearRange()[this.selectedYearIndex];\n const dateObj = getDateObject(\n selectedDate,\n this.selectedMonthIndex,\n selectedYear,\n );\n\n this.props?.onDateChange?.(dateObj);\n };\n\n render() {\n return (\n <View style={styles.root}>\n <WmWheelScrollPicker\n data={getDates()}\n wrapperHeight={this.wrapperHeight}\n itemHeight={this.itemHeight}\n selectedIndex={this.selectedDateIndex}\n onValueChange={(value: string | number, index: number) =>\n this.handleValueChange('date', value, index)\n }\n />\n <View style={styles.middle}>\n <WmWheelScrollPicker\n data={getMonths()}\n wrapperHeight={this.wrapperHeight}\n itemHeight={this.itemHeight}\n selectedIndex={this.selectedMonthIndex}\n onValueChange={(value: string | number, index: number) =>\n this.handleValueChange('month', value, index)\n }\n />\n </View>\n <WmWheelScrollPicker\n data={getYearRange()}\n wrapperHeight={this.wrapperHeight}\n itemHeight={this.itemHeight}\n selectedIndex={this.selectedYearIndex}\n onValueChange={(value: string | number, index: number) =>\n this.handleValueChange('year', value, index)\n }\n />\n </View>\n );\n }\n}\n\nexport default WmWheelDatePicker;\n\nconst styles = StyleSheet.create({\n root: {\n flexDirection: 'row',\n },\n middle: {\n marginHorizontal: 15,\n },\n});\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,UAAU,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC3D,OAAOC,mBAAmB,MAAM,qCAAqC;AACrE,SAASC,aAAa,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,YAAY,QAAQ,sCAAsC;AAEvG,OAAO,MAAMC,sBAAsB,CAAC;EAAAC,YAAA;IAAAC,eAAA,uBACZ,IAAIC,IAAI,CAAC,CAAC;IAAAD,eAAA;IAAAA,eAAA,qBAEVV,UAAU,CAACY,mBAAmB,CAAC,EAAE,CAAC;IAAAF,eAAA,wBAC/BV,UAAU,CAACY,mBAAmB,CAAC,GAAG,CAAC;EAAA;AAC9D;AAEA,OAAO,MAAMC,sBAAsB,CAAC;AAEpC,OAAO,MAAMC,iBAAiB,SAASf,SAAS,CAI9C;EAOAU,WAAWA,CAACM,KAA6B,EAAE;IACzC,KAAK,CAACA,KAAK,CAAC;IAACL,eAAA;IAAAA,eAAA;IAAAA,eAAA,4BALa,CAAC;IAAA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AClCD,UAAU,EAAE,IAAI,CAACA,UAAW;MAC5BY,aAAa,EAAE,IAAI,CAAClB,iBAAkB;MACtCmB,aAAa,EAAEA,CAACzB,KAAsB,EAAEC,KAAa,KACnD,IAAI,CAACyB,iBAAiB,CAAC,MAAM,EAAE1B,KAAK,EAAEC,KAAK;IAC5C,CACF,CACG,CAAC;EAEX;AACF;AAEA,eAAeJ,iBAAiB;AAEhC,MAAMwB,MAAM,GAAGrC,UAAU,CAAC4C,MAAM,CAAC;EAC/BN,IAAI,EAAE;IACJO,aAAa,EAAE;EACjB,CAAC;EACDF,MAAM,EAAE;IACNG,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","Component","PixelRatio","StyleSheet","View","WmWheelScrollPicker","getDateObject","getDates","getMonthIndex","getMonths","getYearRange","moment","WmWheelDatePickerProps","constructor","_defineProperty","Date","roundToNearestPixel","START_DATE","END_DATE","WmWheelDatePickerState","WmWheelDatePicker","props","_selectedDate$getFull","minValue","type","currentMonth","format","currentYear","selectedMonth","localSelectedDate","selectedYear","isFutureMonth","Number","isFutureYear","dateValue","getDate","monthValue","getMonth","getFullYear","maxValue","valueType","value","index","_this$props","_this$props$onDateCha","selectedDateIndex","toString","selectedMonthIndex","yearValue","selectedYearIndex","minDate","maxDate","minDateNum","getMinValue","maxDateNum","getMaxValue","minYear","maxYear","selectedDate","dateObj","onDateChange","call","itemHeight","wrapperHeight","defaultSelectedDate","indexOf","getPickerData","minMonth","maxMonth","dateData","monthData","yearData","render","createElement","style","styles","root","data","selectedIndex","onValueChange","handleValueChange","middle","create","flexDirection","marginHorizontal"],"sources":["wheel-date-picker.component.tsx"],"sourcesContent":["import React, { Component } from 'react';\nimport { PixelRatio, StyleSheet, View } from 'react-native';\nimport WmWheelScrollPicker from './wheelpicker/wheelpicker.component'\nimport { getDateObject, getDates, getMonthIndex, getMonths, getYearRange } from '@wavemaker/app-rn-runtime/core/utils';\nimport moment from 'moment';\n\nexport class WmWheelDatePickerProps {\n minDate?: Date | string;\n maxDate?: Date | string;\n selectedDate?: Date = new Date();\n onDateChange?: (date: Date) => void;\n itemHeight?: number = PixelRatio.roundToNearestPixel(50);\n wrapperHeight?: number = PixelRatio.roundToNearestPixel(150);\n}\n\nexport const START_DATE = {\n 'date': 1,\n 'month': 0,\n 'year': 1950,\n};\n\nexport const END_DATE = {\n 'date': 31,\n 'month': 11,\n 'year': 2060,\n};\n\nexport class WmWheelDatePickerState {}\n\nexport class WmWheelDatePicker extends Component<\n WmWheelDatePickerProps,\n WmWheelDatePickerState,\n any\n> {\n itemHeight: number;\n wrapperHeight: number;\n selectedDateIndex: number = 0;\n selectedMonthIndex: number = 0;\n selectedYearIndex: number = 0;\n dateData: number[] = [];\n monthData: string[] = [];\n yearData: number[] = [];\n defaultSelectedDate: Date;\n localSelectedDate: Date | string = '';\n monthValue: number = 0;\n yearValue: string = '';\n\n constructor(props: WmWheelDatePickerProps) {\n super(props);\n const selectedDate = this.props.selectedDate || new Date();\n\n this.itemHeight =\n PixelRatio.roundToNearestPixel(this.props.itemHeight || 50) || PixelRatio.roundToNearestPixel(50);\n this.wrapperHeight =\n PixelRatio.roundToNearestPixel(this.props.wrapperHeight || 150) || PixelRatio.roundToNearestPixel(150);\n\n // * Initial values\n this.defaultSelectedDate = selectedDate;\n this.localSelectedDate = selectedDate;\n this.monthValue = selectedDate.getMonth();\n this.yearValue = selectedDate.getFullYear()?.toString();\n\n // TODO: selected date handling for range of dates\n if (!(this.props.minDate || this.props.maxDate)) {\n this.selectedDateIndex = selectedDate.getDate() - 1;\n this.selectedMonthIndex = selectedDate.getMonth();\n this.selectedYearIndex = getYearRange().indexOf(selectedDate.getFullYear());\n }\n }\n\n getMinValue = (minValue: string | Date, type: 'date' | 'month' | 'year') => {\n const currentMonth = moment(minValue).format('M');\n const currentYear = moment(minValue).format('YYYY');\n const selectedMonth = moment(this.localSelectedDate).format('M');\n const selectedYear = moment(this.localSelectedDate).format('YYYY');\n const isFutureMonth = Number(selectedMonth) > Number(currentMonth);\n const isFutureYear = Number(selectedYear) > Number(currentYear);\n\n if (!(minValue instanceof Date)) return START_DATE[type];\n\n switch(type) {\n case 'date':\n const dateValue =\n isFutureYear\n ? 1\n : isFutureMonth\n ? 1\n : new Date(minValue).getDate();\n // this.selectedDateIndex = dateIndex;\n return dateValue;\n case 'month':\n const monthValue = isFutureYear ? 0 : new Date(minValue).getMonth();\n // this.selectedMonthIndex = 11;\n return monthValue;\n case 'year':\n return new Date(minValue).getFullYear();\n default:\n return 0;\n }\n }\n\n getMaxValue = (maxValue: string | Date | undefined, type: 'date' | 'month' | 'year') => {\n if (!(maxValue instanceof Date)) return END_DATE[type];\n\n switch(type) {\n case 'date':\n return new Date(maxValue).getDate();\n case 'month':\n return new Date(maxValue).getMonth();\n case 'year':\n return new Date(maxValue).getFullYear();\n default:\n return 0;\n }\n }\n\n handleValueChange = (\n valueType: 'date' | 'month' | 'year',\n value: string | number,\n index: number,\n ) => {\n switch (valueType) {\n case 'date':\n this.selectedDateIndex = index;\n break;\n case 'month':\n this.monthValue = getMonthIndex(value?.toString());\n this.selectedMonthIndex = index;\n break;\n case 'year':\n this.yearValue = value as string;\n this.selectedYearIndex = index;\n break;\n default:\n break;\n }\n\n const {props} = this;\n const minDate = props.minDate;\n const maxDate = props.maxDate;\n // * date range\n const minDateNum = minDate ? this.getMinValue(minDate, 'date') : 1;\n const maxDateNum = maxDate ? this.getMaxValue(maxDate, 'date') : 31;\n const minYear = minDate ? this.getMinValue(minDate, 'year') : 1950;\n const maxYear = maxDate ? this.getMaxValue(maxDate, 'year') : 2060;\n\n const selectedDate = getDates(minDateNum, maxDateNum)[this.selectedDateIndex];\n const selectedMonthIndex = this.monthValue;\n const selectedYear = getYearRange(minYear, maxYear)[this.selectedYearIndex];\n\n const dateObj = getDateObject(\n selectedDate,\n selectedMonthIndex,\n selectedYear,\n );\n this.localSelectedDate = dateObj;\n\n this.props?.onDateChange?.(dateObj);\n };\n\n // TODO: cache this func for performance improvement\n getPickerData(type: 'date' | 'month' | 'year') {\n const {props} = this;\n const minDate = props.minDate;\n const maxDate = props.maxDate;\n const minDateNum = minDate ? this.getMinValue(minDate, 'date') : 1;\n const maxDateNum = maxDate ? this.getMaxValue(maxDate, 'date') : 31;\n const minMonth = minDate ? this.getMinValue(minDate, 'month') : 0;\n const maxMonth = maxDate ? this.getMaxValue(maxDate, 'month') : 11;\n const minYear = minDate ? this.getMinValue(minDate, 'year') : 1950;\n const maxYear = maxDate ? this.getMaxValue(maxDate, 'year') : 2060;\n\n switch (type) {\n case \"date\":\n const dateData = getDates(minDateNum, maxDateNum);\n this.dateData = dateData;\n return dateData;\n case \"month\":\n const monthData = getMonths(minMonth, maxMonth);\n this.monthData = monthData;\n return monthData;\n case \"year\":\n const yearData = getYearRange(minYear, maxYear);\n this.yearData = yearData;\n return yearData;\n default:\n return [];\n }\n }\n\n render() {\n return (\n <View style={styles.root}>\n <WmWheelScrollPicker\n data={this.getPickerData('date')}\n wrapperHeight={this.wrapperHeight}\n itemHeight={this.itemHeight}\n selectedIndex={this.selectedDateIndex}\n onValueChange={(value: string | number, index: number) =>\n this.handleValueChange('date', value, index)\n }\n />\n <View style={styles.middle}>\n <WmWheelScrollPicker\n data={this.getPickerData('month')}\n wrapperHeight={this.wrapperHeight}\n itemHeight={this.itemHeight}\n selectedIndex={this.selectedMonthIndex}\n onValueChange={(value: string | number, index: number) =>\n this.handleValueChange('month', value, index)\n }\n />\n </View>\n <WmWheelScrollPicker\n data={this.getPickerData('year')}\n wrapperHeight={this.wrapperHeight}\n itemHeight={this.itemHeight}\n selectedIndex={this.selectedYearIndex}\n onValueChange={(value: string | number, index: number) =>\n this.handleValueChange('year', value, index)\n }\n />\n </View>\n );\n }\n}\n\nexport default WmWheelDatePicker;\n\nconst styles = StyleSheet.create({\n root: {\n flexDirection: 'row',\n },\n middle: {\n marginHorizontal: 15,\n },\n});\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SA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