@wavemaker/app-rn-runtime 12.0.0-next.45002 → 12.0.0-next.45006
Sign up to get free protection for your applications and to get access to all the features.
- app-rn-runtime/actions/base-action.js.map +1 -1
- app-rn-runtime/actions/index.js.map +1 -1
- app-rn-runtime/actions/login-action.js.map +1 -1
- app-rn-runtime/actions/logout-action.js.map +1 -1
- app-rn-runtime/actions/navigation-action.js +4 -4
- app-rn-runtime/actions/navigation-action.js.map +1 -1
- app-rn-runtime/actions/notification-action.js +3 -4
- app-rn-runtime/actions/notification-action.js.map +1 -1
- app-rn-runtime/actions/timer-action.js +2 -2
- app-rn-runtime/actions/timer-action.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.props.js +4 -4
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.styles.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.props.js +4 -4
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js +31 -22
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js +4 -4
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/advanced/login/login.component.js +4 -4
- app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
- app-rn-runtime/components/advanced/login/login.props.js +4 -4
- app-rn-runtime/components/advanced/login/login.props.js.map +1 -1
- app-rn-runtime/components/advanced/login/login.styles.js.map +1 -1
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +4 -4
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.props.js +4 -4
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.props.js.map +1 -1
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.styles.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js +12 -8
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.props.js +4 -4
- app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.styles.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +1 -0
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.props.js +5 -4
- app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
- app-rn-runtime/components/basic/animatedview.component.js +4 -2
- app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.component.js +8 -9
- app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.props.js +4 -4
- app-rn-runtime/components/basic/audio/audio.props.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.styles.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +18 -14
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.props.js +5 -4
- app-rn-runtime/components/basic/button/button.props.js.map +1 -1
- app-rn-runtime/components/basic/button/button.styles.js +2 -4
- app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.component.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.props.js +4 -4
- app-rn-runtime/components/basic/buttongroup/buttongroup.props.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
- app-rn-runtime/components/basic/custom/custom.props.js +4 -4
- app-rn-runtime/components/basic/custom/custom.props.js.map +1 -1
- app-rn-runtime/components/basic/custom/custom.styles.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +6 -5
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.props.js +5 -4
- app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
- app-rn-runtime/components/basic/icon/streamline-light-icon/streamline-light-icon.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/streamline-regular-icon/streamline-regular-icon.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/wavicon/wavicon.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +11 -9
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.props.js +5 -4
- app-rn-runtime/components/basic/label/label.props.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 +9 -10
- app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
- app-rn-runtime/components/basic/lottie/lottie.props.js +4 -4
- app-rn-runtime/components/basic/lottie/lottie.props.js.map +1 -1
- app-rn-runtime/components/basic/lottie/lottie.styles.js +5 -1
- app-rn-runtime/components/basic/lottie/lottie.styles.js.map +1 -1
- app-rn-runtime/components/basic/message/message.component.js +3 -2
- app-rn-runtime/components/basic/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/message/message.props.js +5 -4
- app-rn-runtime/components/basic/message/message.props.js.map +1 -1
- app-rn-runtime/components/basic/message/message.styles.js +1 -2
- app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
- app-rn-runtime/components/basic/modal/modal.component.js.map +1 -1
- app-rn-runtime/components/basic/modal/modal.props.js +4 -4
- app-rn-runtime/components/basic/modal/modal.props.js.map +1 -1
- app-rn-runtime/components/basic/modal/modal.styles.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +5 -4
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.props.js +5 -4
- app-rn-runtime/components/basic/picture/picture.props.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.styles.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +23 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.props.js +4 -4
- app-rn-runtime/components/basic/progress-bar/progress-bar.props.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +4 -4
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.props.js +4 -4
- app-rn-runtime/components/basic/progress-circle/progress-circle.props.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.styles.js.map +1 -1
- app-rn-runtime/components/basic/search/local-data-provider.js +2 -2
- app-rn-runtime/components/basic/search/local-data-provider.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +16 -22
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +4 -4
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js +5 -5
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.styles.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js +2 -2
- app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.props.js +4 -4
- app-rn-runtime/components/basic/spinner/spinner.props.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
- app-rn-runtime/components/basic/tooltip/tooltip.component.js +79 -0
- app-rn-runtime/components/basic/tooltip/tooltip.component.js.map +1 -0
- app-rn-runtime/components/basic/tooltip/tooltip.props.js +18 -0
- app-rn-runtime/components/basic/tooltip/tooltip.props.js.map +1 -0
- app-rn-runtime/components/basic/tooltip/tooltip.styles.js +49 -0
- app-rn-runtime/components/basic/tooltip/tooltip.styles.js.map +1 -0
- app-rn-runtime/components/basic/video/video.component.js +11 -8
- app-rn-runtime/components/basic/video/video.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.props.js +4 -4
- app-rn-runtime/components/basic/video/video.props.js.map +1 -1
- app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +19 -9
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.props.js +4 -4
- app-rn-runtime/components/chart/area-chart/area-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +21 -10
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +4 -4
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +90 -55
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +4 -11
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js +27 -10
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +19 -11
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js +4 -4
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/column-chart/column-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/column-chart/column-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/column-chart/column-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.props.js +4 -4
- app-rn-runtime/components/chart/donut-chart/donut-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/legend/legend.component.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.component.js +16 -4
- app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.props.js +4 -4
- 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.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +19 -11
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +4 -4
- app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -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 +79 -41
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +5 -5
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/staticdata.js.map +1 -1
- app-rn-runtime/components/chart/theme/chart.theme.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +11 -17
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.props.js +4 -4
- app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +4 -4
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.props.js +4 -4
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.props.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.styles.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +5 -4
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.props.js +5 -4
- app-rn-runtime/components/container/container.props.js.map +1 -1
- app-rn-runtime/components/container/container.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.props.js +4 -4
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.props.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.props.js +4 -4
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.props.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js +4 -4
- app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.props.js +4 -4
- app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js +4 -4
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.styles.js.map +1 -1
- app-rn-runtime/components/container/panel/collapsible-pane.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.props.js +4 -4
- app-rn-runtime/components/container/panel/panel-content/panel-content.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.styles.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.props.js +4 -4
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.styles.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +5 -5
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.props.js +4 -4
- app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
- app-rn-runtime/components/container/partial-host.component.js +6 -6
- app-rn-runtime/components/container/partial-host.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +10 -9
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js +4 -4
- app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +10 -7
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +4 -4
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.styles.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +20 -17
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.props.js +4 -4
- app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +1 -0
- app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.props.js +5 -4
- app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +12 -12
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.props.js +5 -4
- app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +3 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +5 -5
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +4 -4
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.styles.js +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.styles.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js +4 -4
- app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.props.js +4 -4
- app-rn-runtime/components/data/card/card-content/card-content.props.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
- app-rn-runtime/components/data/card/card-footer/card-footer.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-footer/card-footer.props.js +4 -4
- app-rn-runtime/components/data/card/card-footer/card-footer.props.js.map +1 -1
- app-rn-runtime/components/data/card/card-footer/card-footer.styles.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.props.js +4 -4
- app-rn-runtime/components/data/card/card.props.js.map +1 -1
- app-rn-runtime/components/data/card/card.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.component.js +2 -2
- app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.props.js +4 -4
- app-rn-runtime/components/data/form/form-action/form-action.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.props.js +4 -4
- app-rn-runtime/components/data/form/form-body/form-body.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +12 -9
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.props.js +5 -4
- app-rn-runtime/components/data/form/form-field/form-field.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.props.js +4 -4
- app-rn-runtime/components/data/form/form-footer/form-footer.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +11 -11
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.props.js +4 -4
- app-rn-runtime/components/data/form/form.props.js.map +1 -1
- app-rn-runtime/components/data/form/form.styles.js.map +1 -1
- app-rn-runtime/components/data/list/list-action-template/list-action-template.component.js +28 -0
- app-rn-runtime/components/data/list/list-action-template/list-action-template.component.js.map +1 -0
- app-rn-runtime/components/data/list/list-action-template/list-action-template.props.js +12 -0
- app-rn-runtime/components/data/list/list-action-template/list-action-template.props.js.map +1 -0
- app-rn-runtime/components/data/list/list-action-template/list-action-template.styles.js +36 -0
- app-rn-runtime/components/data/list/list-action-template/list-action-template.styles.js.map +1 -0
- 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 +4 -4
- 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 +0 -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 +63 -38
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +5 -4
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js +2 -2
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/data/liveform/liveform.component.js +5 -5
- app-rn-runtime/components/data/liveform/liveform.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +2 -2
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js +4 -4
- app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.component.js +2 -2
- app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.props.js +4 -4
- app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +3 -2
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js +5 -4
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +3 -2
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js +5 -4
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +5 -4
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.props.js +5 -4
- app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js +2 -2
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.props.js +4 -4
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.props.js +4 -4
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js.map +1 -1
- app-rn-runtime/components/input/basedataset/basedataset.component.js +9 -14
- app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
- app-rn-runtime/components/input/basedataset/basedataset.props.js +4 -4
- app-rn-runtime/components/input/basedataset/basedataset.props.js.map +1 -1
- app-rn-runtime/components/input/basedataset/basedataset.styles.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +8 -9
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.props.js +4 -4
- app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.styles.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +6 -9
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js +4 -4
- app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.styles.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js +5 -5
- app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.props.js +4 -4
- app-rn-runtime/components/input/calendar/calendar.props.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
- app-rn-runtime/components/input/calendar/views/month-view.js +6 -10
- app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
- app-rn-runtime/components/input/calendar/views/month-view.styles.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +4 -4
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.props.js +4 -4
- app-rn-runtime/components/input/checkbox/checkbox.props.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +17 -8
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js +10 -4
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +2 -0
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +5 -5
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.props.js +4 -4
- app-rn-runtime/components/input/chips/chips.props.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.props.js +4 -4
- app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.styles.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +4 -4
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.props.js +4 -4
- app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +90 -16
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/date-picker.component.js +2 -2
- app-rn-runtime/components/input/epoch/date-picker.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js +6 -4
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.props.js +2 -2
- app-rn-runtime/components/input/epoch/time/time.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheel-date-picker.component.js +87 -0
- app-rn-runtime/components/input/epoch/wheel-date-picker.component.js.map +1 -0
- app-rn-runtime/components/input/epoch/wheel-time-picker.component.js +107 -0
- app-rn-runtime/components/input/epoch/wheel-time-picker.component.js.map +1 -0
- app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.component.js +91 -0
- app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.component.js.map +1 -0
- app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.props.js +17 -0
- app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.props.js.map +1 -0
- app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.styles.js +55 -0
- app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.styles.js.map +1 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +72 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +15 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/styles/datetime-picker-modal.styles.js +66 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/styles/datetime-picker-modal.styles.js.map +1 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +74 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js.map +1 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js +16 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js.map +1 -0
- app-rn-runtime/components/input/fileupload/fileupload.component.js +4 -4
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.props.js +4 -4
- app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.styles.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +4 -4
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.props.js +4 -4
- app-rn-runtime/components/input/number/number.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +10 -7
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js +4 -4
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js +1 -0
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/rating/rating.component.js +4 -4
- app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
- app-rn-runtime/components/input/rating/rating.props.js +4 -4
- app-rn-runtime/components/input/rating/rating.props.js.map +1 -1
- app-rn-runtime/components/input/rating/rating.styles.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +10 -7
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.props.js +4 -4
- app-rn-runtime/components/input/select/select.props.js.map +1 -1
- app-rn-runtime/components/input/select/select.styles.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.component.js +357 -70
- app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.props.js +13 -9
- app-rn-runtime/components/input/slider/slider.props.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.styles.js +25 -2
- app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +1 -1
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.props.js +4 -4
- app-rn-runtime/components/input/switch/switch.props.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +6 -1
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +4 -4
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js +4 -4
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +13 -6
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.props.js +4 -4
- app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +4 -4
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js +4 -4
- app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js +6 -10
- app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.props.js +4 -4
- app-rn-runtime/components/navigation/basenav/basenav.props.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.styles.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.component.js +2 -2
- app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.props.js +4 -4
- app-rn-runtime/components/navigation/menu/menu.props.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.props.js +4 -4
- app-rn-runtime/components/navigation/navbar/navbar.props.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.styles.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +4 -4
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.props.js +4 -4
- app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js +84 -31
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.props.js +5 -4
- app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.styles.js +6 -1
- app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
- app-rn-runtime/components/page/content/content.component.js.map +1 -1
- app-rn-runtime/components/page/content/content.props.js.map +1 -1
- app-rn-runtime/components/page/content/content.styles.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js +5 -5
- app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.props.js +4 -4
- app-rn-runtime/components/page/left-panel/left-panel.props.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.styles.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +2 -1
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.props.js +4 -4
- 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.map +1 -1
- app-rn-runtime/components/page/page.component.js +13 -3
- 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.map +1 -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.map +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.component.js.map +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.props.js +4 -4
- app-rn-runtime/components/page/partial-container/partial-container.props.js.map +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.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 +26 -14
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.props.js +4 -4
- app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -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.map +1 -1
- app-rn-runtime/core/AppConfig.js.map +1 -1
- app-rn-runtime/core/accessibility.js +1 -1
- app-rn-runtime/core/accessibility.js.map +1 -1
- app-rn-runtime/core/asset.provider.js.map +1 -1
- app-rn-runtime/core/base.component.js +27 -22
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/floatinglabel.component.js.map +1 -1
- app-rn-runtime/core/components/textinput.component.js +6 -5
- app-rn-runtime/core/components/textinput.component.js.map +1 -1
- app-rn-runtime/core/constant.service.js +2 -2
- app-rn-runtime/core/constant.service.js.map +1 -1
- app-rn-runtime/core/constants/currency-constants.js.map +1 -1
- app-rn-runtime/core/currency-constants.js.map +1 -1
- app-rn-runtime/core/device/calendar-service.js.map +1 -1
- app-rn-runtime/core/device/camera-service.js.map +1 -1
- app-rn-runtime/core/device/contacts-service.js.map +1 -1
- app-rn-runtime/core/device/location-service.js.map +1 -1
- app-rn-runtime/core/device/scan-service.js.map +1 -1
- app-rn-runtime/core/display.manager.js.map +1 -1
- app-rn-runtime/core/event-notifier.js +15 -7
- app-rn-runtime/core/event-notifier.js.map +1 -1
- app-rn-runtime/core/file-extension-types.js.map +1 -1
- app-rn-runtime/core/fixed-view.component.js +4 -4
- app-rn-runtime/core/fixed-view.component.js.map +1 -1
- app-rn-runtime/core/formatters.js +6 -12
- app-rn-runtime/core/formatters.js.map +1 -1
- app-rn-runtime/core/i18n.service.js.map +1 -1
- app-rn-runtime/core/if.component.js +6 -7
- app-rn-runtime/core/if.component.js.map +1 -1
- app-rn-runtime/core/imageSizeEstimator.js +3 -3
- app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
- app-rn-runtime/core/injector.js.map +1 -1
- app-rn-runtime/core/key.extractor.js +3 -4
- app-rn-runtime/core/key.extractor.js.map +1 -1
- app-rn-runtime/core/logger.js +3 -3
- app-rn-runtime/core/logger.js.map +1 -1
- app-rn-runtime/core/modal.service.js.map +1 -1
- app-rn-runtime/core/navigation.service.js.map +1 -1
- app-rn-runtime/core/network.service.js +7 -11
- app-rn-runtime/core/network.service.js.map +1 -1
- app-rn-runtime/core/partial.service.js.map +1 -1
- app-rn-runtime/core/props.provider.js +4 -5
- app-rn-runtime/core/props.provider.js.map +1 -1
- app-rn-runtime/core/scroll-view.component.js +2 -2
- app-rn-runtime/core/scroll-view.component.js.map +1 -1
- app-rn-runtime/core/security.service.js.map +1 -1
- app-rn-runtime/core/spinner.service.js.map +1 -1
- app-rn-runtime/core/storage.service.js +2 -2
- app-rn-runtime/core/storage.service.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +77 -42
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/testid.provider.js.map +1 -1
- app-rn-runtime/core/toast.service.js.map +1 -1
- app-rn-runtime/core/utils.js +123 -20
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/core/viewport.js +2 -2
- app-rn-runtime/core/viewport.js.map +1 -1
- app-rn-runtime/gestures/swipe.animation.js +2 -2
- app-rn-runtime/gestures/swipe.animation.js.map +1 -1
- app-rn-runtime/index.js.map +1 -1
- app-rn-runtime/package.json +85 -85
- app-rn-runtime/runtime/App.js +55 -47
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/App.navigator.js +1 -1
- app-rn-runtime/runtime/App.navigator.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +6 -8
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +29 -22
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/base-partial.component.js +12 -7
- app-rn-runtime/runtime/base-partial.component.js.map +1 -1
- app-rn-runtime/runtime/base-prefab.component.js +6 -6
- app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
- app-rn-runtime/runtime/lib-patch.js +1 -1
- app-rn-runtime/runtime/lib-patch.js.map +1 -1
- app-rn-runtime/runtime/memo.component.js +2 -2
- app-rn-runtime/runtime/memo.component.js.map +1 -1
- app-rn-runtime/runtime/navigator/drawer.navigator.js +1 -0
- app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js +5 -8
- app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
- app-rn-runtime/runtime/platform.api.js.map +1 -1
- app-rn-runtime/runtime/services/app-display-manager.service.js +7 -4
- app-rn-runtime/runtime/services/app-display-manager.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-i18n.service.js +3 -4
- app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-modal.service.js +7 -4
- app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +26 -11
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-spinner.service.js +3 -4
- app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-toast.service.js +2 -2
- app-rn-runtime/runtime/services/app-toast.service.js.map +1 -1
- app-rn-runtime/runtime/services/device/calendar-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/camera-service.js +2 -2
- app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/contacts-service.js +1 -1
- app-rn-runtime/runtime/services/device/contacts-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/location-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/permissions.js.map +1 -1
- app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
- app-rn-runtime/runtime/services/partial.service.js +1 -2
- app-rn-runtime/runtime/services/partial.service.js.map +1 -1
- app-rn-runtime/runtime/services/webprocess.service.js +3 -5
- app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
- app-rn-runtime/runtime/watcher.js +5 -5
- app-rn-runtime/runtime/watcher.js.map +1 -1
- app-rn-runtime/styles/MediaQueryList.js.map +1 -1
- app-rn-runtime/styles/background.component.js +7 -6
- app-rn-runtime/styles/background.component.js.map +1 -1
- app-rn-runtime/styles/style-prop.validator.js +1 -4
- app-rn-runtime/styles/style-prop.validator.js.map +1 -1
- app-rn-runtime/styles/style-props.js +2 -2
- app-rn-runtime/styles/style-props.js.map +1 -1
- app-rn-runtime/styles/theme.js +25 -17
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +13 -7
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/base-variable.js +2 -2
- app-rn-runtime/variables/base-variable.js.map +1 -1
- app-rn-runtime/variables/device/calendar/create-event.operation.js.map +1 -1
- app-rn-runtime/variables/device/calendar/delete-event.operation.js.map +1 -1
- app-rn-runtime/variables/device/calendar/get-events.operation.js.map +1 -1
- app-rn-runtime/variables/device/camera/capture-image.operation.js.map +1 -1
- app-rn-runtime/variables/device/camera/capture-video.operation.js.map +1 -1
- app-rn-runtime/variables/device/contacts/get-contacts.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/app-info.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/current-geo-position.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/device-info.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/network-info.operation.js +23 -3
- app-rn-runtime/variables/device/device/network-info.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/vibrate.operation.js.map +1 -1
- app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
- app-rn-runtime/variables/device/operation.provider.js.map +1 -1
- app-rn-runtime/variables/device/scan/scan.operation.js.map +1 -1
- app-rn-runtime/variables/device-variable.js +1 -1
- app-rn-runtime/variables/device-variable.js.map +1 -1
- app-rn-runtime/variables/http.service.js +4 -0
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/live-variable.js +3 -3
- app-rn-runtime/variables/live-variable.js.map +1 -1
- app-rn-runtime/variables/model-variable.js +2 -2
- app-rn-runtime/variables/model-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +2 -2
- app-rn-runtime/variables/service-variable.js.map +1 -1
- app-rn-runtime/variables/utils/dataset-util.js.map +1 -1
- app-rn-runtime/variables/utils/inflight-queue.js +2 -2
- app-rn-runtime/variables/utils/inflight-queue.js.map +1 -1
- app-rn-runtime/variables/utils/variable.constants.js.map +1 -1
- app-rn-runtime/variables/utils/variable.utils.js +0 -1
- app-rn-runtime/variables/utils/variable.utils.js.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["axios","StorageService","isWebPreviewMode","I18nManager","APP_LOCALE_ROOT_PATH","STORAGE_KEY","RTL_LANGUAGE_CODES","map","forEach","v","AppI18nService","constructor","_defineProperty","init","selectedLocale","getItem","isRTLLocale","newLocale","
|
1
|
+
{"version":3,"names":["axios","StorageService","isWebPreviewMode","I18nManager","APP_LOCALE_ROOT_PATH","STORAGE_KEY","RTL_LANGUAGE_CODES","map","forEach","v","AppI18nService","constructor","_defineProperty","init","selectedLocale","getItem","isRTLLocale","newLocale","setRTL","locale","flag","needsRestart","isRTL","forceRTL","loadAppLocaleBundle","url","Promise","resolve","then","path","get","bundle","dateFormat","data","formats","date","timeFormat","time","currencyCode","currency","dateTimeFormat","catch","console","warn","setTimezone","timezone","getTimezone","setSelectedLocale","setItem","getSelectedLocale","i18nService"],"sources":["app-i18n.service.tsx"],"sourcesContent":["import axios, { AxiosResponse } from 'axios';\nimport StorageService from '@wavemaker/app-rn-runtime/core/storage.service';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { I18nManager, Platform } from 'react-native';\nimport { I18nService } from '@wavemaker/app-rn-runtime/core/i18n.service';\n\nconst APP_LOCALE_ROOT_PATH = '/resources/i18n';\nconst STORAGE_KEY = 'selectedLocale';\nconst RTL_LANGUAGE_CODES = (()=>{\n const map = {} as any;\n [\"ar\", \"ar-001\", \"ar-ae\", \"ar-bh\", \"ar-dz\", \"ar-eg\", \"ar-iq\", \"ar-jo\", \"ar-kw\", \"ar-lb\",\n \"ar-ly\", \"ar-ma\", \"ar-om\", \"ar-qa\", \"ar-sa\", \"ar-sd\", \"ar-sy\", \"ar-tn\", \"ar-ye\", \"arc\",\n \"bcc\", \"bqi\", \"ckb\", \"dv\", \"fa\", \"glk\", \"he\", \"ku\", \"mzn\", \"pnb\", \"ps\", \"sd\", \"ug\", \"ur\", \"yi\"].forEach(v=>{\n map[v] = true;\n });\n return map;\n })();\n\nclass AppI18nService implements I18nService{\n appLocale: any;\n defaultSupportedLocale = 'en';\n selectedLocale: any;\n dateFormat: string = '';\n timeFormat: string = '';\n dateTimeFormat: string = '';\n currencyCode: string = '';\n timezone: string = '';\n\n constructor() {}\n\n async init() {\n this.selectedLocale = await StorageService.getItem(STORAGE_KEY);\n }\n\n isRTLLocale(newLocale: string = this.selectedLocale){\n return !!(newLocale && RTL_LANGUAGE_CODES[newLocale]);\n }\n\n setRTL(locale?: string){\n const flag = this.isRTLLocale(locale);\n const needsRestart = !isWebPreviewMode() && I18nManager.isRTL !== flag;\n I18nManager.forceRTL(flag);\n return needsRestart; \n }\n\n loadAppLocaleBundle(url: string) {\n return Promise.resolve().then(() => {\n const path = `${url + APP_LOCALE_ROOT_PATH}/${this.selectedLocale}.json`;\n return axios.get(path)\n .then((bundle) => {\n this.dateFormat = bundle.data.formats.date;\n this.timeFormat = bundle.data.formats.time;\n this.currencyCode = bundle.data.formats.currency;\n this.dateTimeFormat = this.dateFormat + ' ' + this.timeFormat;\n return bundle;\n })\n .catch(() => {\n console.warn(`error loading locale resource from ${path}`);\n });\n\n });\n }\n\n setTimezone(timezone: string){\n this.timezone = timezone;\n }\n\n getTimezone(){\n return this.timezone;\n }\n\n setSelectedLocale(locale: string) {\n this.selectedLocale = locale;\n StorageService.setItem(STORAGE_KEY, locale);\n return this.setRTL(locale);\n }\n\n getSelectedLocale() {\n return this.selectedLocale;\n }\n}\n\nconst i18nService = new AppI18nService();\n\nexport default i18nService;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAyB,OAAO;AAC5C,OAAOC,cAAc,MAAM,gDAAgD;AAC3E,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,SAASC,WAAW,QAAkB,cAAc;AAGpD,MAAMC,oBAAoB,GAAG,iBAAiB;AAC9C,MAAMC,WAAW,GAAG,gBAAgB;AACpC,MAAMC,kBAAkB,GAAG,CAAC,MAAI;EAC9B,MAAMC,GAAG,GAAG,CAAC,CAAQ;EACrB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EACtF,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO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AEJ,GAAG,GAAGrB,oBAAqB,IAAG,IAAI,CAACU,cAAe,OAAM;MACxE,OAAOd,KAAK,CAAC8B,GAAG,CAACD,IAAI,CAAC,CACnBD,IAAI,CAAEG,MAAM,IAAK;QAChB,IAAI,CAACC,UAAU,GAAGD,MAAM,CAACE,IAAI,CAACC,OAAO,CAACC,IAAI;QAC1C,IAAI,CAACC,UAAU,GAAGL,MAAM,CAACE,IAAI,CAACC,OAAO,CAACG,IAAI;QAC1C,IAAI,CAACC,YAAY,GAAGP,MAAM,CAACE,IAAI,CAACC,OAAO,CAACK,QAAQ;QAChD,IAAI,CAACC,cAAc,GAAG,IAAI,CAACR,UAAU,GAAG,GAAG,GAAG,IAAI,CAACI,UAAU;QAC7D,OAAOL,MAAM;MACf,CAAC,CAAC,CACDU,KAAK,CAAC,MAAM;QACXC,OAAO,CAACC,IAAI,CAAE,sCAAqCd,IAAK,EAAC,CAAC;MAC5D,CAAC,CAAC;IAEN,CAAC,CAAC;EACN;EAEAe,WAAWA,CAACC,QAAgB,EAAC;IAC3B,IAAI,CAACA,QAAQ,GAAGA,QAAQ;EAC1B;EAEAC,WAAWA,CAAA,EAAE;IACX,OAAO,IAAI,CAACD,QAAQ;EACtB;EAEAE,iBAAiBA,CAAC5B,MAAc,EAAE;IAC9B,IAAI,CAACL,cAAc,GAAGK,MAAM;IAC5BlB,cAAc,CAAC+C,OAAO,CAAC3C,WAAW,EAAEc,MAAM,CAAC;IAC3C,OAAO,IAAI,CAACD,MAAM,CAACC,MAAM,CAAC;EAC9B;EAEA8B,iBAAiBA,CAAA,EAAG;IAClB,OAAO,IAAI,CAACnC,cAAc;EAC5B;AACJ;AAEA,MAAMoC,WAAW,GAAG,IAAIxC,cAAc,CAAC,CAAC;AAExC,eAAewC,WAAW","ignoreList":[]}
|
@@ -1,8 +1,9 @@
|
|
1
1
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
2
|
-
function _toPropertyKey(
|
3
|
-
function _toPrimitive(
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
4
4
|
import { BackHandler } from "react-native";
|
5
5
|
import injector from '@wavemaker/app-rn-runtime/core/injector';
|
6
|
+
import { isAndroid, isWebPreviewMode } from "@wavemaker/app-rn-runtime/core/utils";
|
6
7
|
class AppModalService {
|
7
8
|
constructor() {
|
8
9
|
_defineProperty(this, "modalOptions", {});
|
@@ -18,11 +19,13 @@ class AppModalService {
|
|
18
19
|
});
|
19
20
|
}
|
20
21
|
clearBackButtonPress() {
|
21
|
-
|
22
|
+
if (isAndroid() && !isWebPreviewMode()) {
|
23
|
+
BackHandler.removeEventListener('hardwareBackPress', this.handleBackButtonPress);
|
24
|
+
}
|
22
25
|
}
|
23
26
|
setBackButtonPress() {
|
24
27
|
this.clearBackButtonPress();
|
25
|
-
if (this.modalsOpened.length > 0) {
|
28
|
+
if (isAndroid() && !isWebPreviewMode() && this.modalsOpened.length > 0) {
|
26
29
|
BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonPress);
|
27
30
|
}
|
28
31
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BackHandler","injector","AppModalService","constructor","_defineProperty","modalsOpened","length","hideModal","clearBackButtonPress","removeEventListener","handleBackButtonPress","setBackButtonPress","addEventListener","getAppConfig","appConfig","get","showLastModal","modalOptions","refresh","setTimeout","onOpen","showModal","options","i","findIndex","o","elevationIndex","parseInt","app","toastsOpened","push","Promise","resolve","then","animatedRefs","triggerExit","onClose","splice","appModalService"],"sources":["app-modal.service.tsx"],"sourcesContent":["import { BackHandler } from \"react-native\";\n\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\n\nclass AppModalService implements ModalService {\n public modalOptions = {} as ModalOptions;\n\n public modalsOpened = [] as ModalOptions[];\n public appConfig: any;\n\n animatedRefs: any = [];\n\n private clearBackButtonPress() {\n BackHandler.removeEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n\n private setBackButtonPress() {\n this.clearBackButtonPress();\n if (this.modalsOpened.length > 0) {\n BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n }\n\n private handleBackButtonPress = () => {\n if (this.modalsOpened.length) {\n this.hideModal();\n return true;\n }\n return false;\n }\n\n private getAppConfig() {\n if (!this.appConfig) {\n this.appConfig = injector.get<AppConfig>('APP_CONFIG');\n }\n return this.appConfig;\n }\n\n private showLastModal() {\n this.modalOptions = this.modalsOpened.length ? this.modalsOpened[this.modalsOpened.length - 1] : {} as ModalOptions;\n this.refresh();\n // widgets in dialog are not accessible. Hence adding setTimeout\n setTimeout(() => {\n this.modalOptions.onOpen && this.modalOptions.onOpen();\n },500);\n this.setBackButtonPress();\n }\n\n public refresh() {\n this.getAppConfig().refresh();\n }\n\n public showModal(options: ModalOptions) {\n const i = this.modalsOpened.findIndex(o => o === options);\n if (i < 0) {\n options.elevationIndex = parseInt(this.getAppConfig().app.toastsOpened + this.modalsOpened.length + 1);\n this.modalsOpened.push(options);\n this.showLastModal();\n }\n }\n\n public hideModal(options?: ModalOptions) {\n const i = options ? this.modalsOpened.findIndex(o => o === options) : (this.modalsOpened.length - 1);\n if (i >= 0) {\n Promise.resolve()\n .then(() => this.modalsOpened.length > 1 && this.animatedRefs && this.animatedRefs[i].triggerExit())\n .then(() => {\n const o = this.modalsOpened[i];\n return o && o.onClose && o.onClose();\n })\n .then(() => this.modalsOpened.splice(i, 1))\n .then(() => this.showLastModal());\n }\n this.clearBackButtonPress();\n }\n}\n\nconst appModalService = new AppModalService();\n\nexport default appModalService;\n"],"mappings":";;;AAAA,SAASA,WAAW,QAAQ,cAAc;AAE1C,OAAOC,QAAQ,MAAM,yCAAyC;
|
1
|
+
{"version":3,"names":["BackHandler","injector","isAndroid","isWebPreviewMode","AppModalService","constructor","_defineProperty","modalsOpened","length","hideModal","clearBackButtonPress","removeEventListener","handleBackButtonPress","setBackButtonPress","addEventListener","getAppConfig","appConfig","get","showLastModal","modalOptions","refresh","setTimeout","onOpen","showModal","options","i","findIndex","o","elevationIndex","parseInt","app","toastsOpened","push","Promise","resolve","then","animatedRefs","triggerExit","onClose","splice","appModalService"],"sources":["app-modal.service.tsx"],"sourcesContent":["import { BackHandler } from \"react-native\";\n\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport { isAndroid, isWebPreviewMode } from \"@wavemaker/app-rn-runtime/core/utils\";\n\nclass AppModalService implements ModalService {\n public modalOptions = {} as ModalOptions;\n\n public modalsOpened = [] as ModalOptions[];\n public appConfig: any;\n\n animatedRefs: any = [];\n\n private clearBackButtonPress() {\n if (isAndroid() && !isWebPreviewMode()) {\n BackHandler.removeEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n }\n\n private setBackButtonPress() {\n this.clearBackButtonPress();\n if (isAndroid() && !isWebPreviewMode() && this.modalsOpened.length > 0) {\n BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n }\n\n private handleBackButtonPress = () => {\n if (this.modalsOpened.length) {\n this.hideModal();\n return true;\n }\n return false;\n }\n\n private getAppConfig() {\n if (!this.appConfig) {\n this.appConfig = injector.get<AppConfig>('APP_CONFIG');\n }\n return this.appConfig;\n }\n\n private showLastModal() {\n this.modalOptions = this.modalsOpened.length ? this.modalsOpened[this.modalsOpened.length - 1] : {} as ModalOptions;\n this.refresh();\n // widgets in dialog are not accessible. Hence adding setTimeout\n setTimeout(() => {\n this.modalOptions.onOpen && this.modalOptions.onOpen();\n },500);\n this.setBackButtonPress();\n }\n\n public refresh() {\n this.getAppConfig().refresh();\n }\n\n public showModal(options: ModalOptions) {\n const i = this.modalsOpened.findIndex(o => o === options);\n if (i < 0) {\n options.elevationIndex = parseInt(this.getAppConfig().app.toastsOpened + this.modalsOpened.length + 1);\n this.modalsOpened.push(options);\n this.showLastModal();\n }\n }\n\n public hideModal(options?: ModalOptions) {\n const i = options ? this.modalsOpened.findIndex(o => o === options) : (this.modalsOpened.length - 1);\n if (i >= 0) {\n Promise.resolve()\n .then(() => this.modalsOpened.length > 1 && this.animatedRefs && this.animatedRefs[i].triggerExit())\n .then(() => {\n const o = this.modalsOpened[i];\n return o && o.onClose && o.onClose();\n })\n .then(() => this.modalsOpened.splice(i, 1))\n .then(() => this.showLastModal());\n }\n this.clearBackButtonPress();\n }\n}\n\nconst appModalService = new AppModalService();\n\nexport default appModalService;\n"],"mappings":";;;AAAA,SAASA,WAAW,QAAQ,cAAc;AAE1C,OAAOC,QAAQ,MAAM,yCAAyC;AAG9D,SAASC,SAAS,EAAEC,gBAAgB,QAAQ,sCAAsC;AAElF,MAAMC,eAAe,CAAyB;EAAAC,YAAA;IAAAC,eAAA,uBACpB,CAAC,CAAC;IAAAA,eAAA,uBAEF,EAAE;IAAAA,eAAA;IAAAA,eAAA,uBAGJ,EAAE;IAAAA,eAAA,gCAeU,MAAM;MACpC,IAAI,IAAI,CAACC,YAAY,CAACC,MAAM,EAAE;QAC5B,IAAI,CAACC,SAAS,CAAC,CAAC;QAChB,OAAO,IAAI;MACb;MACA,OAAO,KAAK;IACd,CAAC;EAAA;EAnBOC,oBAAoBA,CAAA,EAAG;IAC7B,IAAIR,SAAS,CAAC,CAAC,IAAI,CAACC,gBAAgB,CAAC,CAAC,EAAE;MACtCH,WAAW,CAACW,mBAAmB,CAAC,mBAAmB,EAAE,IAAI,CAACC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GAAG,CAACC,YAAY,GAAG,IAAI,CAACxB,YAAY,CAACC,MAAM,GAAG,CAAC,CAAC;MACtG,IAAI,CAACD,YAAY,CAACyB,IAAI,CAACR,OAAO,CAAC;MAC7B,IAAI,CAACN,aAAa,CAAC,CAAC;IACxB;EACJ;EAEOT,SAASA,CAACe,OAAsB,EAAE;IACrC,MAAMC,CAAC,GAAGD,OAAO,GAAG,IAAI,CAACjB,YAAY,CAACmB,SAAS,CAACC,CAAC,IAAIA,CAAC,KAAKH,OAAO,CAAC,GAAI,IAAI,CAACjB,YAAY,CAACC,MAAM,GAAG,CAAE;IACpG,IAAIiB,CAAC,IAAI,CAAC,EAAE;MACVQ,OAAO,CAACC,OAAO,CAAC,CAAC,CACdC,IAAI,CAAC,MAAM,IAAI,CAAC5B,YAAY,CAACC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC4B,YAAY,IAAI,IAAI,CAACA,YAAY,CAACX,CAAC,CAAC,CAACY,WAAW,CAAC,CAAC,CAAC,CACnGF,IAAI,CAAC,MAAM;QACV,MAAMR,CAAC,GAAG,IAAI,CAACpB,YAAY,CAACkB,CAAC,CAAC;QAC9B,OAAOE,CAAC,IAAIA,CAAC,CAACW,OAAO,IAAIX,CAAC,CAACW,OAAO,CAAC,CAAC;MACtC,CAAC,CAAC,CACDH,IAAI,CAAC,MAAM,IAAI,CAAC5B,YAAY,CAACgC,MAAM,CAACd,CAAC,EAAE,CAAC,CAAC,CAAC,CAC1CU,IAAI,CAAC,MAAM,IAAI,CAACjB,aAAa,CAAC,CAAC,CAAC;IACrC;IACA,IAAI,CAACR,oBAAoB,CAAC,CAAC;EAC/B;AACJ;AAEA,MAAM8B,eAAe,GAAG,IAAIpC,eAAe,CAAC,CAAC;AAE7C,eAAeoC,eAAe","ignoreList":[]}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
2
|
-
function _toPropertyKey(
|
3
|
-
function _toPrimitive(
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
4
4
|
import { Platform } from 'react-native';
|
5
5
|
import axios from 'axios';
|
6
6
|
import { each, includes } from 'lodash';
|
@@ -26,6 +26,7 @@ class AppSecurityService {
|
|
26
26
|
_defineProperty(this, "appConfig", void 0);
|
27
27
|
_defineProperty(this, "baseUrl", '');
|
28
28
|
_defineProperty(this, "defaultSecurityConfig", void 0);
|
29
|
+
_defineProperty(this, "landingPage", '');
|
29
30
|
axios.interceptors.request.use(config => this.onBeforeServiceCall(config));
|
30
31
|
}
|
31
32
|
onBeforeServiceCall(config) {
|
@@ -53,9 +54,17 @@ class AppSecurityService {
|
|
53
54
|
getAppConfig() {
|
54
55
|
return injector.get('APP_CONFIG');
|
55
56
|
}
|
56
|
-
navigateToLandingPage(
|
57
|
-
var _this$appConfig$curre,
|
58
|
-
(_this$appConfig$curre = this.appConfig.currentPage) === null || _this$appConfig$curre === void 0
|
57
|
+
navigateToLandingPage() {
|
58
|
+
var _this$appConfig$curre, _this$appConfig$logge;
|
59
|
+
(_this$appConfig$curre = this.appConfig.currentPage) === null || _this$appConfig$curre === void 0 || _this$appConfig$curre.goToPage(((_this$appConfig$logge = this.appConfig.loggedInUser) === null || _this$appConfig$logge === void 0 ? void 0 : _this$appConfig$logge.landingPage) || this.appConfig.landingPage || 'Main', null, true);
|
60
|
+
if (this.landingPage) {
|
61
|
+
const landingPage = this.landingPage;
|
62
|
+
this.landingPage = '';
|
63
|
+
setTimeout(() => {
|
64
|
+
var _this$appConfig$curre2;
|
65
|
+
(_this$appConfig$curre2 = this.appConfig.currentPage) === null || _this$appConfig$curre2 === void 0 || _this$appConfig$curre2.openUrl(landingPage);
|
66
|
+
}, 100);
|
67
|
+
}
|
59
68
|
}
|
60
69
|
appLogin(options) {
|
61
70
|
// encode all parameters
|
@@ -88,10 +97,12 @@ class AppSecurityService {
|
|
88
97
|
return this.appConfig.getServiceDefinitions(this.appConfig.url).then(() => Promise.resolve(this.defaultSecurityConfig));
|
89
98
|
}).then(details => {
|
90
99
|
const loggedInUser = {};
|
91
|
-
this.securityConfig = details;
|
100
|
+
this.securityConfig = details || {};
|
101
|
+
this.securityConfig.isSecurityEnabled = !!(details !== null && details !== void 0 && details.securityEnabled);
|
92
102
|
const appConfig = this.appConfig;
|
93
103
|
if (typeof details !== 'string' && (!details.securityEnabled || details.authenticated)) {
|
94
104
|
if (details.authenticated) {
|
105
|
+
var _appConfig$appPropert;
|
95
106
|
loggedInUser.isAuthenticated = details.authenticated;
|
96
107
|
loggedInUser.isSecurityEnabled = details.authenticated;
|
97
108
|
loggedInUser.roles = details.userInfo.userRoles;
|
@@ -99,8 +110,10 @@ class AppSecurityService {
|
|
99
110
|
loggedInUser.id = details.userInfo.userId;
|
100
111
|
loggedInUser.tenantId = details.userInfo.tenantId;
|
101
112
|
loggedInUser.userAttributes = details.userInfo.userAttributes;
|
113
|
+
loggedInUser.landingPage = details.userInfo.landingPage;
|
102
114
|
appConfig.loggedInUser = loggedInUser;
|
103
115
|
this.loggedInUser.dataSet = loggedInUser;
|
116
|
+
appConfig.landingPage = (_appConfig$appPropert = appConfig.appProperties) === null || _appConfig$appPropert === void 0 ? void 0 : _appConfig$appPropert.homePage;
|
104
117
|
}
|
105
118
|
return appConfig.getServiceDefinitions(appConfig.url).then(() => {
|
106
119
|
return details;
|
@@ -112,15 +125,14 @@ class AppSecurityService {
|
|
112
125
|
}
|
113
126
|
});
|
114
127
|
}
|
115
|
-
getLoggedInUserDetails(baseURL) {
|
116
|
-
let useDefaultSuccessHandler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
128
|
+
getLoggedInUserDetails(baseURL, useDefaultSuccessHandler = true) {
|
117
129
|
if (!baseURL) {
|
118
130
|
this.loggedInUser = {};
|
119
131
|
return Promise.resolve({});
|
120
132
|
}
|
121
133
|
return this.load(baseURL);
|
122
134
|
}
|
123
|
-
redirectToLogin() {
|
135
|
+
redirectToLogin(redirectTo) {
|
124
136
|
var _this$securityConfig;
|
125
137
|
if (((_this$securityConfig = this.securityConfig) === null || _this$securityConfig === void 0 || (_this$securityConfig = _this$securityConfig.loginConfig) === null || _this$securityConfig === void 0 ? void 0 : _this$securityConfig.type) === 'SSO') {
|
126
138
|
const authUrl = this.appConfig.url + '/services/security/ssologin';
|
@@ -146,10 +158,13 @@ class AppSecurityService {
|
|
146
158
|
}, 1000);
|
147
159
|
}
|
148
160
|
} else {
|
149
|
-
var _this$securityConfig$, _this$appConfig$
|
161
|
+
var _this$securityConfig$, _this$appConfig$curre3;
|
150
162
|
const loginPage = ((_this$securityConfig$ = this.securityConfig.loginConfig) === null || _this$securityConfig$ === void 0 ? void 0 : _this$securityConfig$.pageName) || 'Login';
|
163
|
+
if (redirectTo && !redirectTo.startsWith('#/' + loginPage)) {
|
164
|
+
this.landingPage = redirectTo;
|
165
|
+
}
|
151
166
|
injector.get('APP_CONFIG').landingPage = loginPage;
|
152
|
-
(_this$appConfig$
|
167
|
+
(_this$appConfig$curre3 = this.appConfig.currentPage) === null || _this$appConfig$curre3 === void 0 || _this$appConfig$curre3.goToPage(loginPage, null, true);
|
153
168
|
}
|
154
169
|
this.appConfig.refresh();
|
155
170
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Platform","axios","each","includes","networkService","injector","StorageService","WebProcessService","USER_ROLE","authCookieStr","XSRF_COOKIE_NAME","xsrf_header_name","AppSecurityService","constructor","_defineProperty","interceptors","request","use","config","onBeforeServiceCall","appConfig","getAppConfig","baseUrl","url","getXsrfToken","then","token","_config$url","startsWith","headers","Promise","resolve","getItem","xsrf_token","get","navigateToLandingPage","details","_this$appConfig$curre","_details$userInfo","currentPage","goToPage","userInfo","landingPage","appLogin","options","payload","formData","value","name","encodeURIComponent","defaults","withCredentials","post","baseURL","response","xsrfCookieValue","data","setItem","isLoggedIn","load","userData","getLoggedInUserDetails","useDefaultSuccessHandler","app","triggerStartUpVariables","isConnected","getServiceDefinitions","defaultSecurityConfig","loggedInUser","securityConfig","securityEnabled","authenticated","isAuthenticated","isSecurityEnabled","roles","userRoles","userName","id","userId","tenantId","userAttributes","dataSet","redirectToLogin","arguments","length","undefined","_this$securityConfig","loginConfig","type","authUrl","OS","window","parent","location","href","setTimeout","execute","output","JSON","parse","replace","reject","refresh","_this$securityConfig$","_this$appConfig$curre2","loginPage","pageName","appLogout","catch","canUserAccessPage","_this$securityConfig2","res","status","matchRoles","widgetRoles","some","item","hasAccessToWidget","_this$loggedInUser$da","_this$loggedInUser$da2","_this$loggedInUser$da3","_this$loggedInUser$da4","widgetRolesArr","split","EVERYONE","ANONYMOUS","AUTHENTICATED","appSecurityService"],"sources":["app-security.service.tsx"],"sourcesContent":["import { Platform } from 'react-native';\nimport axios, { InternalAxiosRequestConfig, AxiosResponse } from 'axios';\nimport { each, includes } from 'lodash';\n\nimport networkService from '@wavemaker/app-rn-runtime/core/network.service';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport StorageService from '@wavemaker/app-rn-runtime/core/storage.service';\nimport { SecurityService } from '@wavemaker/app-rn-runtime/core/security.service';\n\nimport WebProcessService from './webprocess.service';\n\ndeclare const window: any;\n\ninterface LoggedInUserConfig {\n isAuthenticated: Boolean;\n isSecurityEnabled: Boolean;\n roles: Array<string>;\n name: String;\n id: String;\n tenantId: String;\n userAttributes: any;\n}\n\nenum USER_ROLE {\n EVERYONE = 'Everyone',\n ANONYMOUS = 'Anonymous',\n AUTHENTICATED = 'Authenticated'\n}\n\nconst authCookieStr = 'AUTH_COOKIE';\nconst XSRF_COOKIE_NAME = 'wm_xsrf_token';\nconst xsrf_header_name = 'X-WM-XSRF-TOKEN';\n\nclass AppSecurityService implements SecurityService {\n\n securityConfig: any;\n isLoggedIn = false;\n loggedInUser: any = {};\n token: any;\n appConfig: any;\n baseUrl: string = '';\n defaultSecurityConfig: any;\n\n constructor() {\n axios.interceptors.request.use((config: InternalAxiosRequestConfig) => this.onBeforeServiceCall(config));\n }\n\n onBeforeServiceCall(config: InternalAxiosRequestConfig) {\n if (!this.appConfig) {\n this.appConfig = this.getAppConfig();\n this.baseUrl = this.appConfig.url;\n }\n return this.getXsrfToken().then((token: string) => {\n if (config.url?.startsWith(this.baseUrl) && token) {\n if(config.headers) config.headers[xsrf_header_name] = token;\n }\n return config\n });\n }\n\n private getXsrfToken(): Promise<string> {\n if (this.token) {\n return Promise.resolve(this.token);\n }\n return StorageService.getItem(XSRF_COOKIE_NAME).then(xsrf_token => {\n this.token = xsrf_token;\n return this.token;\n });\n }\n\n private getAppConfig() {\n return injector.get<AppConfig>('APP_CONFIG');\n }\n\n public navigateToLandingPage(details: any) {\n this.appConfig.currentPage?.goToPage(details.userInfo?.landingPage || 'Main', null, true);\n }\n\n public appLogin(options: any) {\n // encode all parameters\n let payload = '';\n each(options.formData, function (value, name) {\n payload += (payload ? '&' : '') + encodeURIComponent(name) + '=' + encodeURIComponent(value);\n });\n axios.defaults.withCredentials = true;\n return axios.post(options.baseURL + '/j_spring_security_check', payload, {\n withCredentials: true,\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n }}).then((response: AxiosResponse) => {\n const xsrfCookieValue = response.data ? response.data[XSRF_COOKIE_NAME] : '';\n this.token = xsrfCookieValue;\n StorageService.setItem(XSRF_COOKIE_NAME, xsrfCookieValue);\n this.isLoggedIn = true;\n }).then(() => this.load(options.baseURL))\n .then(async () => {\n const userData = await this.getLoggedInUserDetails(options.baseURL, options.useDefaultSuccessHandler);\n await this.appConfig.app.triggerStartUpVariables();\n return userData;\n });\n }\n\n public load(baseURL: string) {\n return Promise.resolve().then(() => {\n if (networkService.isConnected()) {\n return axios.get(baseURL + '/services/security/info')\n .then((response: AxiosResponse) => response.data);\n }\n return this.appConfig.getServiceDefinitions(this.appConfig.url)\n .then(() => Promise.resolve(this.defaultSecurityConfig));\n }).then((details: any) => {\n const loggedInUser = {} as LoggedInUserConfig;\n this.securityConfig = details;\n const appConfig = this.appConfig;\n if (typeof details !== 'string' && (!details.securityEnabled || details.authenticated)) {\n if (details.authenticated) {\n loggedInUser.isAuthenticated = details.authenticated;\n loggedInUser.isSecurityEnabled = details.authenticated;\n loggedInUser.roles = details.userInfo.userRoles;\n loggedInUser.name = details.userInfo.userName;\n loggedInUser.id = details.userInfo.userId;\n loggedInUser.tenantId = details.userInfo.tenantId;\n loggedInUser.userAttributes = details.userInfo.userAttributes;\n appConfig.loggedInUser = loggedInUser;\n this.loggedInUser.dataSet = loggedInUser;\n }\n return appConfig.getServiceDefinitions(appConfig.url)\n .then(() => {\n return details;\n });\n } else {\n return appConfig.getServiceDefinitions(appConfig.url)\n .then(() => {\n this.redirectToLogin();\n });\n }\n });\n }\n\n private getLoggedInUserDetails(baseURL: string, useDefaultSuccessHandler: boolean = true) {\n if (!baseURL) {\n this.loggedInUser = {};\n return Promise.resolve({});\n }\n return this.load(baseURL);\n }\n\n \n public redirectToLogin() {\n if (this.securityConfig?.loginConfig?.type === 'SSO') {\n const authUrl = this.appConfig.url + '/services/security/ssologin';\n if (Platform.OS === 'web') {\n (window.parent || window).location.href = authUrl;\n } else {\n setTimeout(() => {\n WebProcessService.execute('LOGIN', '/services/security/ssologin', false, true)\n .then((output: any) => {\n if (output) {\n return JSON.parse(output.data && output.data.replace(/"/g, \"\\\"\"));\n }\n return Promise.reject();\n }).then((output: any) => {\n if (output[XSRF_COOKIE_NAME]) {\n this.token = output[XSRF_COOKIE_NAME];\n StorageService.setItem(XSRF_COOKIE_NAME, output[XSRF_COOKIE_NAME]);\n }\n }).then(() => {\n this.appConfig.refresh(true);\n }).then(() => this.load(this.baseUrl)).then(() => {\n return this.getLoggedInUserDetails(this.baseUrl);\n });\n }, 1000);\n }\n } else {\n const loginPage = this.securityConfig.loginConfig?.pageName || 'Login';\n injector.get<AppConfig>('APP_CONFIG').landingPage = loginPage;\n this.appConfig.currentPage?.goToPage(loginPage, null, true);\n }\n this.appConfig.refresh();\n }\n\n public appLogout(options: any) {\n return axios.post(options.baseURL + '/j_spring_security_logout', null, {\n withCredentials: true\n }).catch(() => {}).then(() => {\n this.isLoggedIn = false;\n this.redirectToLogin();\n });\n }\n\n public canUserAccessPage(pageName: string) {\n if (this.baseUrl && this.securityConfig?.isSecurityEnabled) {\n return axios.get(this.baseUrl + `/pages/${pageName}/${pageName}.html`)\n .catch((res) => res)\n .then((res) => res.status === 200 || res.status === 304); \n } else {\n return Promise.resolve(true);\n }\n }\n\n private matchRoles(widgetRoles: Array<String>, userRoles: Array<String>) {\n return widgetRoles.some(function (item) {\n return includes(userRoles, item);\n });\n }\n\n public hasAccessToWidget(widgetRoles: String) {\n const widgetRolesArr = widgetRoles.split(',');\n // access the widget when 'Everyone' is chosen\n if (includes(widgetRolesArr, USER_ROLE.EVERYONE)) {\n return true;\n }\n\n // access the widget when 'Anonymous' is chosen and user is not authenticated\n if (includes(widgetRolesArr, USER_ROLE.ANONYMOUS) && !this.loggedInUser.dataSet?.isAuthenticated) {\n return true;\n }\n\n // access the widget when 'Only Authenticated Users' is chosen and user is authenticated\n if (includes(widgetRolesArr, USER_ROLE.AUTHENTICATED) && this.loggedInUser.dataSet?.isAuthenticated) {\n return true;\n }\n\n // access the widget when widget role and logged in user role matches\n return this.loggedInUser.dataSet?.isAuthenticated && this.matchRoles(widgetRolesArr, this.loggedInUser.dataSet?.roles);\n }\n}\n\nconst appSecurityService = new AppSecurityService();\n\nexport default appSecurityService;\n"],"mappings":";;;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,OAAOC,KAAK,MAAqD,OAAO;AACxE,SAASC,IAAI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AI,CAACnD,YAAY,CAACa,OAAO,cAAAsC,sBAAA,eAAzBA,sBAAA,CAA2B/C,eAAe,EAAE;MACjG,OAAO,IAAI;IACf;;IAEA;IACA,OAAO,EAAAgD,sBAAA,OAAI,CAACpD,YAAY,CAACa,OAAO,cAAAuC,sBAAA,uBAAzBA,sBAAA,CAA2BhD,eAAe,KAAI,IAAI,CAACyC,UAAU,CAACS,cAAc,GAAAD,sBAAA,GAAE,IAAI,CAACrD,YAAY,CAACa,OAAO,cAAAwC,sBAAA,uBAAzBA,sBAAA,CAA2B/C,KAAK,CAAC;EAC1H;AACJ;AAEA,MAAMqD,kBAAkB,GAAG,IAAInH,kBAAkB,CAAC,CAAC;AAEnD,eAAemH,kBAAkB"}
|
1
|
+
{"version":3,"names":["Platform","axios","each","includes","networkService","injector","StorageService","WebProcessService","USER_ROLE","authCookieStr","XSRF_COOKIE_NAME","xsrf_header_name","AppSecurityService","constructor","_defineProperty","interceptors","request","use","config","onBeforeServiceCall","appConfig","getAppConfig","baseUrl","url","getXsrfToken","then","token","_config$url","startsWith","headers","Promise","resolve","getItem","xsrf_token","get","navigateToLandingPage","_this$appConfig$curre","_this$appConfig$logge","currentPage","goToPage","loggedInUser","landingPage","setTimeout","_this$appConfig$curre2","openUrl","appLogin","options","payload","formData","value","name","encodeURIComponent","defaults","withCredentials","post","baseURL","response","xsrfCookieValue","data","setItem","isLoggedIn","load","userData","getLoggedInUserDetails","useDefaultSuccessHandler","app","triggerStartUpVariables","isConnected","getServiceDefinitions","defaultSecurityConfig","details","securityConfig","isSecurityEnabled","securityEnabled","authenticated","_appConfig$appPropert","isAuthenticated","roles","userInfo","userRoles","userName","id","userId","tenantId","userAttributes","dataSet","appProperties","homePage","redirectToLogin","redirectTo","_this$securityConfig","loginConfig","type","authUrl","OS","window","parent","location","href","execute","output","JSON","parse","replace","reject","refresh","_this$securityConfig$","_this$appConfig$curre3","loginPage","pageName","appLogout","catch","canUserAccessPage","_this$securityConfig2","res","status","matchRoles","widgetRoles","some","item","hasAccessToWidget","_this$loggedInUser$da","_this$loggedInUser$da2","_this$loggedInUser$da3","_this$loggedInUser$da4","widgetRolesArr","split","EVERYONE","ANONYMOUS","AUTHENTICATED","appSecurityService"],"sources":["app-security.service.tsx"],"sourcesContent":["import { Platform } from 'react-native';\nimport axios, { InternalAxiosRequestConfig, AxiosResponse } from 'axios';\nimport { each, includes } from 'lodash';\n\nimport networkService from '@wavemaker/app-rn-runtime/core/network.service';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport StorageService from '@wavemaker/app-rn-runtime/core/storage.service';\nimport { SecurityService } from '@wavemaker/app-rn-runtime/core/security.service';\n\nimport WebProcessService from './webprocess.service';\n\ndeclare const window: any;\n\ninterface LoggedInUserConfig {\n isAuthenticated: Boolean;\n isSecurityEnabled: Boolean;\n roles: Array<string>;\n name: String;\n id: String;\n tenantId: String;\n userAttributes: any;\n landingPage: string;\n}\n\nenum USER_ROLE {\n EVERYONE = 'Everyone',\n ANONYMOUS = 'Anonymous',\n AUTHENTICATED = 'Authenticated'\n}\n\nconst authCookieStr = 'AUTH_COOKIE';\nconst XSRF_COOKIE_NAME = 'wm_xsrf_token';\nconst xsrf_header_name = 'X-WM-XSRF-TOKEN';\n\nclass AppSecurityService implements SecurityService {\n\n securityConfig: any;\n isLoggedIn = false;\n loggedInUser: any = {};\n token: any;\n appConfig: any;\n baseUrl: string = '';\n defaultSecurityConfig: any;\n landingPage = '';\n\n constructor() {\n axios.interceptors.request.use((config: InternalAxiosRequestConfig) => this.onBeforeServiceCall(config));\n }\n\n onBeforeServiceCall(config: InternalAxiosRequestConfig) {\n if (!this.appConfig) {\n this.appConfig = this.getAppConfig();\n this.baseUrl = this.appConfig.url;\n }\n return this.getXsrfToken().then((token: string) => {\n if (config.url?.startsWith(this.baseUrl) && token) {\n if(config.headers) config.headers[xsrf_header_name] = token;\n }\n return config\n });\n }\n\n private getXsrfToken(): Promise<string> {\n if (this.token) {\n return Promise.resolve(this.token);\n }\n return StorageService.getItem(XSRF_COOKIE_NAME).then(xsrf_token => {\n this.token = xsrf_token;\n return this.token;\n });\n }\n\n private getAppConfig() {\n return injector.get<AppConfig>('APP_CONFIG');\n }\n\n public navigateToLandingPage() {\n this.appConfig.currentPage?.goToPage(\n this.appConfig.loggedInUser?.landingPage \n || this.appConfig.landingPage \n || 'Main', null, true);\n if (this.landingPage) {\n const landingPage = this.landingPage;\n this.landingPage = '';\n setTimeout(() => {\n this.appConfig.currentPage?.openUrl(landingPage);\n }, 100);\n }\n }\n\n public appLogin(options: any) {\n // encode all parameters\n let payload = '';\n each(options.formData, function (value, name) {\n payload += (payload ? '&' : '') + encodeURIComponent(name) + '=' + encodeURIComponent(value);\n });\n axios.defaults.withCredentials = true;\n return axios.post(options.baseURL + '/j_spring_security_check', payload, {\n withCredentials: true,\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n }}).then((response: AxiosResponse) => {\n const xsrfCookieValue = response.data ? response.data[XSRF_COOKIE_NAME] : '';\n this.token = xsrfCookieValue;\n StorageService.setItem(XSRF_COOKIE_NAME, xsrfCookieValue);\n this.isLoggedIn = true;\n }).then(() => this.load(options.baseURL))\n .then(async () => {\n const userData = await this.getLoggedInUserDetails(options.baseURL, options.useDefaultSuccessHandler);\n await this.appConfig.app.triggerStartUpVariables();\n return userData;\n });\n }\n\n public load(baseURL: string) {\n return Promise.resolve().then(() => {\n if (networkService.isConnected()) {\n return axios.get(baseURL + '/services/security/info')\n .then((response: AxiosResponse) => response.data);\n }\n return this.appConfig.getServiceDefinitions(this.appConfig.url)\n .then(() => Promise.resolve(this.defaultSecurityConfig));\n }).then((details: any) => {\n const loggedInUser = {} as LoggedInUserConfig;\n this.securityConfig = details || {};\n this.securityConfig.isSecurityEnabled = !!details?.securityEnabled;\n const appConfig = this.appConfig;\n if (typeof details !== 'string' && (!details.securityEnabled || details.authenticated)) {\n if (details.authenticated) {\n loggedInUser.isAuthenticated = details.authenticated;\n loggedInUser.isSecurityEnabled = details.authenticated;\n loggedInUser.roles = details.userInfo.userRoles;\n loggedInUser.name = details.userInfo.userName;\n loggedInUser.id = details.userInfo.userId;\n loggedInUser.tenantId = details.userInfo.tenantId;\n loggedInUser.userAttributes = details.userInfo.userAttributes;\n loggedInUser.landingPage = details.userInfo.landingPage;\n appConfig.loggedInUser = loggedInUser;\n this.loggedInUser.dataSet = loggedInUser;\n appConfig.landingPage = appConfig.appProperties?.homePage;\n }\n return appConfig.getServiceDefinitions(appConfig.url)\n .then(() => {\n return details;\n });\n } else {\n return appConfig.getServiceDefinitions(appConfig.url)\n .then(() => {\n this.redirectToLogin();\n });\n }\n });\n }\n\n private getLoggedInUserDetails(baseURL: string, useDefaultSuccessHandler: boolean = true) {\n if (!baseURL) {\n this.loggedInUser = {};\n return Promise.resolve({});\n }\n return this.load(baseURL);\n }\n\n \n public redirectToLogin(redirectTo?: string) {\n if (this.securityConfig?.loginConfig?.type === 'SSO') {\n const authUrl = this.appConfig.url + '/services/security/ssologin';\n if (Platform.OS === 'web') {\n (window.parent || window).location.href = authUrl;\n } else {\n setTimeout(() => {\n WebProcessService.execute('LOGIN', '/services/security/ssologin', false, true)\n .then((output: any) => {\n if (output) {\n return JSON.parse(output.data && output.data.replace(/"/g, \"\\\"\"));\n }\n return Promise.reject();\n }).then((output: any) => {\n if (output[XSRF_COOKIE_NAME]) {\n this.token = output[XSRF_COOKIE_NAME];\n StorageService.setItem(XSRF_COOKIE_NAME, output[XSRF_COOKIE_NAME]);\n }\n }).then(() => {\n this.appConfig.refresh(true);\n }).then(() => this.load(this.baseUrl)).then(() => {\n return this.getLoggedInUserDetails(this.baseUrl);\n });\n }, 1000);\n }\n } else {\n const loginPage = this.securityConfig.loginConfig?.pageName || 'Login';\n if (redirectTo && !redirectTo.startsWith('#/'+ loginPage)) {\n this.landingPage = redirectTo;\n }\n injector.get<AppConfig>('APP_CONFIG').landingPage = loginPage;\n this.appConfig.currentPage?.goToPage(loginPage, null, true);\n }\n this.appConfig.refresh();\n }\n\n public appLogout(options: any) {\n return axios.post(options.baseURL + '/j_spring_security_logout', null, {\n withCredentials: true\n }).catch(() => {}).then(() => {\n this.isLoggedIn = false;\n this.redirectToLogin();\n });\n }\n\n public canUserAccessPage(pageName: string) {\n if (this.baseUrl && this.securityConfig?.isSecurityEnabled) {\n return axios.get(this.baseUrl + `/pages/${pageName}/${pageName}.html`)\n .catch((res) => res)\n .then((res) => res.status === 200 || res.status === 304); \n } else {\n return Promise.resolve(true);\n }\n }\n\n private matchRoles(widgetRoles: Array<String>, userRoles: Array<String>) {\n return widgetRoles.some(function (item) {\n return includes(userRoles, item);\n });\n }\n\n public hasAccessToWidget(widgetRoles: String) {\n const widgetRolesArr = widgetRoles.split(',');\n // access the widget when 'Everyone' is chosen\n if (includes(widgetRolesArr, USER_ROLE.EVERYONE)) {\n return true;\n }\n\n // access the widget when 'Anonymous' is chosen and user is not authenticated\n if (includes(widgetRolesArr, USER_ROLE.ANONYMOUS) && !this.loggedInUser.dataSet?.isAuthenticated) {\n return true;\n }\n\n // access the widget when 'Only Authenticated Users' is chosen and user is authenticated\n if (includes(widgetRolesArr, USER_ROLE.AUTHENTICATED) && this.loggedInUser.dataSet?.isAuthenticated) {\n return true;\n }\n\n // access the widget when widget role and logged in user role matches\n return this.loggedInUser.dataSet?.isAuthenticated && this.matchRoles(widgetRolesArr, this.loggedInUser.dataSet?.roles);\n }\n}\n\nconst appSecurityService = new AppSecurityService();\n\nexport default appSecurityService;\n"],"mappings":";;;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,OAAOC,KAAK,MAAqD,OAAO;AACxE,SAASC,IAAI,EAAEC,QAAQ,QAAQ,QAAQ;AAEvC,OAAOC,cAAc,MAAM,gDAAgD;AAC3E,OAAOC,QAAQ,MAAM,yCAAyC;AAE9D,OAAOC,cAAc,MAAM,gDAAgD;AAG3E,OAAOC,iBAAiB,MAAM,sBAAsB;AAAC,IAehDC,SAAS,0BAAT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ACN;EAEOC,iBAAiBA,CAACH,WAAmB,EAAE;IAAA,IAAAI,qBAAA,EAAAC,sBAAA,EAAAC,sBAAA,EAAAC,sBAAA;IAC1C,MAAMC,cAAc,GAAGR,WAAW,CAACS,KAAK,CAAC,GAAG,CAAC;IAC7C;IACA,IAAI3H,QAAQ,CAAC0H,cAAc,EAAErH,SAAS,CAACuH,QAAQ,CAAC,EAAE;MAC9C,OAAO,IAAI;IACf;;IAEA;IACA,IAAI5H,QAAQ,CAAC0H,cAAc,EAAErH,SAAS,CAACwH,SAAS,CAAC,IAAI,GAAAP,qBAAA,GAAC,IAAI,CAACjF,YAAY,CAAC6C,OAAO,cAAAoC,qBAAA,eAAzBA,qBAAA,CAA2B7C,eAAe,GAAE;MAC9F,OAAO,IAAI;IACf;;IAEA;IACA,IAAIzE,QAAQ,CAAC0H,cAAc,EAAErH,SAAS,CAACyH,aAAa,CAAC,KAAAP,sBAAA,GAAI,IAAI,CAAClF,YAAY,CAAC6C,OAAO,cAAAqC,sBAAA,eAAzBA,sBAAA,CAA2B9C,eAAe,EAAE;MACjG,OAAO,IAAI;IACf;;IAEA;IACA,OAAO,EAAA+C,sBAAA,OAAI,CAACnF,YAAY,CAAC6C,OAAO,cAAAsC,sBAAA,uBAAzBA,sBAAA,CAA2B/C,eAAe,KAAI,IAAI,CAACwC,UAAU,CAACS,cAAc,GAAAD,sBAAA,GAAE,IAAI,CAACpF,YAAY,CAAC6C,OAAO,cAAAuC,sBAAA,uBAAzBA,sBAAA,CAA2B/C,KAAK,CAAC;EAC1H;AACJ;AAEA,MAAMqD,kBAAkB,GAAG,IAAItH,kBAAkB,CAAC,CAAC;AAEnD,eAAesH,kBAAkB","ignoreList":[]}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
2
|
-
function _toPropertyKey(
|
3
|
-
function _toPrimitive(
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
4
4
|
import React from 'react';
|
5
5
|
import { View } from 'react-native';
|
6
6
|
import appDisplayManagerService from '@wavemaker/app-rn-runtime/runtime/services/app-display-manager.service';
|
@@ -23,8 +23,7 @@ export class AppSpinnerService {
|
|
23
23
|
setDefaultOptions(options) {
|
24
24
|
this.defaultDisplayOptions = options;
|
25
25
|
}
|
26
|
-
show() {
|
27
|
-
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.defaultDisplayOptions;
|
26
|
+
show(options = this.defaultDisplayOptions) {
|
28
27
|
this.skeleton = options.spinner.loader == 'skeleton';
|
29
28
|
if (this.count === 0 && !this.destroy) {
|
30
29
|
setTimeout(() => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","appDisplayManagerService","WmSpinner","ThemeVariables","AppSpinnerService","constructor","displayManager","_defineProperty","setImage","path","image","setDefaultOptions","options","defaultDisplayOptions","show","
|
1
|
+
{"version":3,"names":["React","View","appDisplayManagerService","WmSpinner","ThemeVariables","AppSpinnerService","constructor","displayManager","_defineProperty","setImage","path","image","setDefaultOptions","options","defaultDisplayOptions","show","skeleton","spinner","loader","count","destroy","setTimeout","content","createElement","Fragment","style","styles","appSpinnerContainer","backgroundColor","INSTANCE","pageContentBgColor","caption","message","classname","lottie","delay","hide","call","justifyContent","alignItems","width","height","opacity","spinnerService"],"sources":["app-spinner.service.tsx"],"sourcesContent":["import React from 'react';\n\nimport { View, ViewStyle } from 'react-native';\n\nimport { SpinnerService, DisplayOptions } from '@wavemaker/app-rn-runtime/core/spinner.service';\nimport { DisplayManager } from '@wavemaker/app-rn-runtime/core/display.manager';\nimport appDisplayManagerService from '@wavemaker/app-rn-runtime/runtime/services/app-display-manager.service';\nimport WmSpinner from '@wavemaker/app-rn-runtime/components/basic/spinner/spinner.component';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\n\nexport class AppSpinnerService implements SpinnerService {\n public displayOptions = {} as DisplayOptions;\n public destroy: any;\n public delay = 0;\n private count = 0;\n private image: string = '';\n public skeleton: boolean = false;\n private defaultDisplayOptions: DisplayOptions = {} as any;\n constructor(private displayManager: DisplayManager) {}\n\n setImage(path: string) {\n this.image = path;\n }\n\n setDefaultOptions(options: DisplayOptions) {\n this.defaultDisplayOptions = options;\n }\n\n show(options: DisplayOptions = this.defaultDisplayOptions) {\n this.skeleton = options.spinner.loader == 'skeleton';\n if (this.count === 0 && !this.destroy) { \n setTimeout(() => {\n const content = (<>\n {!this.skeleton? \n <View style={[styles.appSpinnerContainer, { backgroundColor: ThemeVariables.INSTANCE.pageContentBgColor }]}>\n <WmSpinner\n caption={options.message || ''}\n classname=\"global-spinner\"\n lottie={options.spinner}></WmSpinner>\n </View> : null}\n </>);\n this.destroy = this.displayManager.show({ content: content });\n }, this.delay);\n }\n this.count++;\n }\n\n hide() {\n this.skeleton = false;\n if (this.count > 0) {\n this.count--;\n } else {\n this.count = 0;\n }\n if (this.count === 0) {\n setTimeout(() => {\n if (!this.count && this.destroy) {\n this.destroy.call(this.displayManager);\n this.destroy = null;\n }\n }, 300);\n }\n }\n}\n\nconst styles = {\n appSpinnerContainer:{ \n justifyContent: 'center', \n alignItems: 'center', \n width:'100%', \n height:'100%', \n opacity: 0.8 \n } as ViewStyle\n}\n\nconst spinnerService = new AppSpinnerService(appDisplayManagerService);\nexport default spinnerService;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,IAAI,QAAmB,cAAc;AAI9C,OAAOC,wBAAwB,MAAM,wEAAwE;AAC7G,OAAOC,SAAS,MAAM,sEAAsE;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cAAc,CAACQ,IAAI,CAAC;UAAEO,OAAO,EAAEA;QAAQ,CAAC,CAAC;MAC/D,CAAC,EAAE,IAAI,CAACa,KAAK,CAAC;IAChB;IACA,IAAI,CAAChB,KAAK,EAAE;EACd;EAEAiB,IAAIA,CAAA,EAAG;IACL,IAAI,CAACpB,QAAQ,GAAG,KAAK;IACrB,IAAI,IAAI,CAACG,KAAK,GAAG,CAAC,EAAE;MAClB,IAAI,CAACA,KAAK,EAAE;IACd,CAAC,MAAM;MACL,IAAI,CAACA,KAAK,GAAG,CAAC;IAChB;IACA,IAAI,IAAI,CAACA,KAAK,KAAK,CAAC,EAAE;MACpBE,UAAU,CAAC,MAAM;QACf,IAAI,CAAC,IAAI,CAACF,KAAK,IAAI,IAAI,CAACC,OAAO,EAAE;UAC/B,IAAI,CAACA,OAAO,CAACiB,IAAI,CAAC,IAAI,CAAC9B,cAAc,CAAC;UACtC,IAAI,CAACa,OAAO,GAAG,IAAI;QACrB;MACF,CAAC,EAAE,GAAG,CAAC;IACT;EACF;AACF;AAEA,MAAMM,MAAM,GAAG;EACbC,mBAAmB,EAAC;IAClBW,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,KAAK,EAAC,MAAM;IACZC,MAAM,EAAC,MAAM;IACbC,OAAO,EAAE;EACX;AACF,CAAC;AAED,MAAMC,cAAc,GAAG,IAAItC,iBAAiB,CAACH,wBAAwB,CAAC;AACtE,eAAeyC,cAAc","ignoreList":[]}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
2
|
-
function _toPropertyKey(
|
3
|
-
function _toPrimitive(
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
4
4
|
import injector from '@wavemaker/app-rn-runtime/core/injector';
|
5
5
|
class AppToastService {
|
6
6
|
constructor() {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["injector","AppToastService","constructor","_defineProperty","getAppConfig","appConfig","get","refresh","refreshCount","showToast","options","i","toastsOpened","findIndex","o","name","timeout","elevationIndex","length","app","modalsOpened","push","hideOnClick","cb","onClick","hideToast","clearTimeout","duration","setTimeout","splice","onClose","appToastService"],"sources":["app-toast.service.tsx"],"sourcesContent":["import injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { ToastOptions, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\n\nclass AppToastService implements ToastService {\n\n public toastsOpened = [] as ToastOptions[];\n public appConfig: any;\n public refreshCount = 0;\n\n private getAppConfig() {\n if (!this.appConfig) {\n this.appConfig = injector.get<AppConfig>('APP_CONFIG');\n }\n return this.appConfig;\n }\n \n refresh() {\n this.refreshCount++;\n this.appConfig.refresh();\n }\n\n public showToast(options: ToastOptions) {\n const i = this.toastsOpened.findIndex(o => o.name === options.name);\n let timeout: any;\n this.refreshCount++;\n if (i < 0) {\n options.elevationIndex = this.toastsOpened.length + this.getAppConfig().app.modalsOpened + 1;\n this.toastsOpened.push(options);\n // hide the toast when toaster is clicked\n if (options.hideOnClick) {\n let cb = options.onClick;\n options.onClick = () => {\n cb && cb();\n this.hideToast(options);\n clearTimeout(timeout);\n }\n }\n if (options.duration) {\n timeout = setTimeout(() => {\n this.hideToast(options);\n }, options.duration);\n }\n }\n this.refresh();\n }\n\n public hideToast(options?: ToastOptions) {\n const i = options ? this.toastsOpened.findIndex(o => o.name === options.name) : (this.toastsOpened.length - 1);\n if (i >= 0) {\n const o = this.toastsOpened.splice(i, 1)[0];\n this.refresh();\n options?.onClose && options.onClose();\n }\n }\n}\n\nconst appToastService = new AppToastService();\n\nexport default appToastService;\n"],"mappings":";;;AAAA,OAAOA,QAAQ,MAAM,yCAAyC;AAI9D,MAAMC,eAAe,CAAyB;EAAAC,YAAA;IAAAC,eAAA,uBAEpB,EAAE;IAAAA,eAAA;IAAAA,eAAA,uBAEF,CAAC;EAAA;EAEfC,YAAYA,CAAA,EAAG;IACrB,IAAI,CAAC,IAAI,CAACC,SAAS,EAAE;MACnB,IAAI,CAACA,SAAS,GAAGL,QAAQ,CAACM,GAAG,CAAY,YAAY,CAAC;IACxD;IACA,OAAO,IAAI,CAACD,SAAS;EACvB;EAEAE,OAAOA,CAAA,EAAG;IACR,IAAI,CAACC,YAAY,EAAE;IACnB,IAAI,CAACH,SAAS,CAACE,OAAO,CAAC,CAAC;EAC1B;EAEOE,SAASA,CAACC,OAAqB,EAAE;IACpC,MAAMC,CAAC,GAAG,IAAI,CAACC,YAAY,CAACC,SAAS,CAACC,CAAC,IAAIA,CAAC,CAACC,IAAI,KAAKL,OAAO,CAACK,IAAI,CAAC;IACnE,IAAIC,OAAY;IAChB,IAAI,CAACR,YAAY,EAAE;IACnB,IAAIG,CAAC,GAAG,CAAC,EAAE;MACTD,OAAO,CAACO,cAAc,GAAG,IAAI,CAACL,YAAY,CAACM,MAAM,GAAG,IAAI,CAACd,YAAY,CAAC,CAAC,CAACe,GAAG,CAACC,YAAY,GAAG,CAAC;MAC5F,IAAI,CAACR,YAAY,CAACS,IAAI,CAACX,OAAO,CAAC;MAC7B;MACA,IAAIA,OAAO,CAACY,WAAW,EAAE;QACvB,IAAIC,EAAE,GAAGb,OAAO,CAACc,OAAO;QACxBd,OAAO,CAACc,OAAO,GAAG,MAAM;UACtBD,EAAE,IAAIA,EAAE,CAAC,CAAC;UACV,IAAI,CAACE,SAAS,CAACf,OAAO,CAAC;UACvBgB,YAAY,CAACV,OAAO,CAAC;QACvB,CAAC;MACH;MACA,IAAIN,OAAO,CAACiB,QAAQ,EAAE;QACpBX,OAAO,GAAGY,UAAU,CAAC,MAAM;UACrB,IAAI,CAACH,SAAS,CAACf,OAAO,CAAC;QAC3B,CAAC,EAAEA,OAAO,CAACiB,QAAQ,CAAC;MACxB;IACJ;IACA,IAAI,CAACpB,OAAO,CAAC,CAAC;EAClB;EAEOkB,SAASA,CAACf,OAAsB,EAAE;IACrC,MAAMC,CAAC,GAAGD,OAAO,GAAG,IAAI,CAACE,YAAY,CAACC,SAAS,CAACC,CAAC,IAAIA,CAAC,CAACC,IAAI,KAAKL,OAAO,CAACK,IAAI,CAAC,GAAI,IAAI,CAACH,YAAY,CAACM,MAAM,GAAG,CAAE;IAC9G,IAAIP,CAAC,IAAI,CAAC,EAAE;MACR,MAAMG,CAAC,GAAG,IAAI,CAACF,YAAY,CAACiB,MAAM,CAAClB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;MAC3C,IAAI,CAACJ,OAAO,CAAC,CAAC;MACd,CAAAG,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEoB,OAAO,KAAIpB,OAAO,CAACoB,OAAO,CAAC,CAAC;IACzC;EACJ;AACJ;AAEA,MAAMC,eAAe,GAAG,IAAI9B,eAAe,CAAC,CAAC;AAE7C,eAAe8B,eAAe"}
|
1
|
+
{"version":3,"names":["injector","AppToastService","constructor","_defineProperty","getAppConfig","appConfig","get","refresh","refreshCount","showToast","options","i","toastsOpened","findIndex","o","name","timeout","elevationIndex","length","app","modalsOpened","push","hideOnClick","cb","onClick","hideToast","clearTimeout","duration","setTimeout","splice","onClose","appToastService"],"sources":["app-toast.service.tsx"],"sourcesContent":["import injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { ToastOptions, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\n\nclass AppToastService implements ToastService {\n\n public toastsOpened = [] as ToastOptions[];\n public appConfig: any;\n public refreshCount = 0;\n\n private getAppConfig() {\n if (!this.appConfig) {\n this.appConfig = injector.get<AppConfig>('APP_CONFIG');\n }\n return this.appConfig;\n }\n \n refresh() {\n this.refreshCount++;\n this.appConfig.refresh();\n }\n\n public showToast(options: ToastOptions) {\n const i = this.toastsOpened.findIndex(o => o.name === options.name);\n let timeout: any;\n this.refreshCount++;\n if (i < 0) {\n options.elevationIndex = this.toastsOpened.length + this.getAppConfig().app.modalsOpened + 1;\n this.toastsOpened.push(options);\n // hide the toast when toaster is clicked\n if (options.hideOnClick) {\n let cb = options.onClick;\n options.onClick = () => {\n cb && cb();\n this.hideToast(options);\n clearTimeout(timeout);\n }\n }\n if (options.duration) {\n timeout = setTimeout(() => {\n this.hideToast(options);\n }, options.duration);\n }\n }\n this.refresh();\n }\n\n public hideToast(options?: ToastOptions) {\n const i = options ? this.toastsOpened.findIndex(o => o.name === options.name) : (this.toastsOpened.length - 1);\n if (i >= 0) {\n const o = this.toastsOpened.splice(i, 1)[0];\n this.refresh();\n options?.onClose && options.onClose();\n }\n }\n}\n\nconst appToastService = new AppToastService();\n\nexport default appToastService;\n"],"mappings":";;;AAAA,OAAOA,QAAQ,MAAM,yCAAyC;AAI9D,MAAMC,eAAe,CAAyB;EAAAC,YAAA;IAAAC,eAAA,uBAEpB,EAAE;IAAAA,eAAA;IAAAA,eAAA,uBAEF,CAAC;EAAA;EAEfC,YAAYA,CAAA,EAAG;IACrB,IAAI,CAAC,IAAI,CAACC,SAAS,EAAE;MACnB,IAAI,CAACA,SAAS,GAAGL,QAAQ,CAACM,GAAG,CAAY,YAAY,CAAC;IACxD;IACA,OAAO,IAAI,CAACD,SAAS;EACvB;EAEAE,OAAOA,CAAA,EAAG;IACR,IAAI,CAACC,YAAY,EAAE;IACnB,IAAI,CAACH,SAAS,CAACE,OAAO,CAAC,CAAC;EAC1B;EAEOE,SAASA,CAACC,OAAqB,EAAE;IACpC,MAAMC,CAAC,GAAG,IAAI,CAACC,YAAY,CAACC,SAAS,CAACC,CAAC,IAAIA,C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APA,OAAO,CAAEoB,OAAO,KAAIpB,OAAO,CAACoB,OAAO,CAAC,CAAC;IACzC;EACJ;AACJ;AAEA,MAAMC,eAAe,GAAG,IAAI9B,eAAe,CAAC,CAAC;AAE7C,eAAe8B,eAAe","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Calendar","permissionManager","getDateObj","DEFAULT_TIME","Date","getTime","DELTA_VALUE_DATE","DEFAULT_START_DATE","DEFAULT_END_DATE","CalendarService","constructor","getEvents","params","Promise","resolve","reject","requestPermissions","then","getCalendarsAsync","result","calendarIds","forEach","c","push","id","getEventsAsync","eventStart","eventEnd","res","filteredResult","eventTitle","eventLocation","eventNotes","filter","event","title","location","notes","events","e","message","startDate","endDate","createEvent","eventMetadata","allowsModifications","createEventAsync","dataValue","deleteEvent","all","map","deleteEventAsync"],"sources":["calendar-service.ts"],"sourcesContent":["import * as Calendar from 'expo-calendar';\nimport permissionManager from '@wavemaker/app-rn-runtime/runtime/services/device/permissions';\nimport { CalendarInput } from '@wavemaker/app-rn-runtime/core/device/calendar-service';\nimport { CalendarEvent } from '@wavemaker/app-rn-runtime/variables/device/calendar/get-events.operation';\nimport {\n CreateEventOutput,\n getDateObj\n} from '@wavemaker/app-rn-runtime/variables/device/calendar/create-event.operation';\nimport { DeleteEventOutput } from '@wavemaker/app-rn-runtime/variables/device/calendar/delete-event.operation';\n\nconst DEFAULT_TIME = new Date().getTime();\nconst DELTA_VALUE_DATE = 3 * 30 * 24 * 60 * 60 * 1000;\nconst DEFAULT_START_DATE = new Date(DEFAULT_TIME - DELTA_VALUE_DATE);\nconst DEFAULT_END_DATE = new Date(DEFAULT_TIME + DELTA_VALUE_DATE);\n\nexport class CalendarService {\n\n constructor() {}\n\n public getEvents(params: CalendarInput): Promise<Array<CalendarEvent>> {\n return new Promise((resolve, reject) => {\n permissionManager.requestPermissions('calendar').then(() => {\n return Calendar.getCalendarsAsync().then(result => {\n let calendarIds: Array<string> = [];\n result.forEach(c => calendarIds.push(c.id));\n Calendar.getEventsAsync(calendarIds, params.eventStart || DEFAULT_START_DATE, params.eventEnd || DEFAULT_END_DATE)\n .then(res => {\n let filteredResult = res;\n if (params.eventTitle || params.eventLocation || params.eventNotes) {\n filteredResult = res.filter(event => event.title === params.eventTitle || event.location === params.eventLocation || event.notes === params.eventNotes);\n }\n let events: Array<CalendarEvent> = [];\n filteredResult.forEach(e => {\n events.push({\n title: e.title,\n message: e.notes,\n location: e.location,\n startDate: e.startDate,\n endDate: e.endDate\n })\n });\n return resolve(events);\n })\n })\n }, reject);\n });\n }\n\n\n public createEvent(params: CalendarInput): Promise<CreateEventOutput> {\n const eventMetadata = {\n title: params.eventTitle,\n location: params.eventLocation,\n notes: params.eventNotes,\n startDate: getDateObj(params.eventStart) || DEFAULT_START_DATE,\n endDate: getDateObj(params.eventEnd) || DEFAULT_END_DATE\n };\n\n return new Promise((resolve, reject) => {\n permissionManager.requestPermissions('calendar').then(() => {\n return Calendar.getCalendarsAsync().then(result => {\n let calendarIds: Array<string> = [];\n result.forEach(c => {\n if (c.allowsModifications) {\n calendarIds.push(c.id);\n }\n });\n // createEventAsync has calendarId as required parameter. Need to expose ownerAccount as filter field in studio. Right now passing calendar index as zero.\n return Calendar.createEventAsync(calendarIds[0], eventMetadata).then(res => {\n const event = {\n dataValue: res\n };\n return resolve(event);\n })\n }, reject);\n });\n });\n }\n\n\n public deleteEvent(params: CalendarInput): Promise<DeleteEventOutput> {\n\n return new Promise((resolve, reject) => {\n permissionManager.requestPermissions('calendar').then(() => {\n return Calendar.getCalendarsAsync().then(result => {\n let calendarIds: Array<string> = [];\n result.forEach(c => {\n if (c.allowsModifications) {\n calendarIds.push(c.id);\n }\n });\n Calendar.getEventsAsync(calendarIds, params.eventStart || DEFAULT_START_DATE, params.eventEnd || DEFAULT_END_DATE)\n .then((res) => {\n const filteredResult = res.filter(event => event.title === params.eventTitle || event.location === params.eventLocation\n || event.notes === params.eventNotes);\n Promise.all(\n filteredResult.map((event) => { Calendar.deleteEventAsync(event.id)}))\n .then(res => {\n const event = {\n dataValue: true\n }\n return resolve(event);\n })\n })\n }, reject);\n });\n });\n }\n}\n"],"mappings":"AAAA,OAAO,KAAKA,QAAQ,MAAM,eAAe;AACzC,OAAOC,iBAAiB,MAAM,+DAA+D;AAG7F,SAEEC,UAAU,QACL,4EAA4E;AAGnF,MAAMC,YAAY,GAAG,IAAIC,IAAI,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;AACzC,MAAMC,gBAAgB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;AACrD,MAAMC,kBAAkB,GAAG,IAAIH,IAAI,CAACD,YAAY,GAAGG,gBAAgB,CAAC;AACpE,MAAME,gBAAgB,GAAG,IAAIJ,IAAI,CAACD,YAAY,GAAGG,gBAAgB,CAAC;AAElE,OAAO,MAAMG,eAAe,CAAC;EAE3BC,WAAWA,CAAA,EAAG,CAAC;EAERC,SAASA,CAACC,MAAqB,EAAiC;IACrE,OAAO,IAAIC,OAAO,CAAC,CAACC,OAAO,EAAEC,MAAM,KAAK;MACtCd,iBAAiB,CAACe,kBAAkB,CAAC,UAAU,CAAC,CAACC,IAAI,CAAC,MAAM;QACxD,OAAOjB,QAAQ,CAACkB,iBAAiB,CAAC,CAAC,CAACD,IAAI,CAACE,MAAM,IAAI;UACjD,IAAIC,WAA0B,GAAG,EAAE;UACnCD,MAAM,CAACE,OAAO,CAACC,CAAC,IAAIF,WAAW,CAACG,IAAI,CAACD,CAAC,CAACE,EAAE,CAAC,CAAC;UAC3CxB,QAAQ,CAACyB,cAAc,CAACL,WAAW,EAAER,MAAM,CAACc,UAAU,IAAInB,kBAAkB,EAAEK,MAAM,CAACe,QAAQ,IAAInB,gBAAgB,CAAC,CAC/GS,IAAI,CAACW,GAAG,IAAI;YACX,IAAIC,cAAc,GAAGD,GAAG;YACxB,IAAIhB,MAAM,CAACkB,UAAU,IAAIlB,MAAM,CAACmB,aAAa,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CAACC,KAAK,KAAKvB,MAAM,CAACkB,UAAU,IAAII,KAAK,CAACE,QAAQ,KAAKxB,MAAM,CAACmB,aAAa,IAClHG,KAAK,CAACG,KAAK,KAAKzB,MAAM,CAACoB,UAAU,CAAC;YACvCnB,OAAO,CAACoC,GAAG,CACTpB,cAAc,CAACqB,GAAG,CAAEhB,KAAK,IAAK;cAAElC,QAAQ,CAACmD,gBAAgB,CAACjB,KAAK,CAACV,EAAE,CAAC;YAAA,CAAC,CAAC,CAAC,CACrEP,IAAI,CAACW,GAAG,IAAI;cACX,MAAMM,KAAK,GAAG;gBACZa,SAAS,EAAE;cACb,CAAC;cACD,OAAOjC,OAAO,CAACoB,KAAK,CAAC;YACvB,CAAC,CAAC;UACN,CAAC,CAAC;QACN,CAAC,EAAEnB,MAAM,CAAC;MACd,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ;AACF"}
|
1
|
+
{"version":3,"names":["Calendar","permissionManager","getDateObj","DEFAULT_TIME","Date","getTime","DELTA_VALUE_DATE","DEFAULT_START_DATE","DEFAULT_END_DATE","CalendarService","constructor","getEvents","params","Promise","resolve","reject","requestPermissions","then","getCalendarsAsync","result","calendarIds","forEach","c","push","id","getEventsAsync","eventStart","eventEnd","res","filteredResult","eventTitle","eventLocation","eventNotes","filter","event","title","location","notes","events","e","message","startDate","endDate","createEvent","eventMetadata","allowsModifications","createEventAsync","dataValue","deleteEvent","all","map","deleteEventAsync"],"sources":["calendar-service.ts"],"sourcesContent":["import * as Calendar from 'expo-calendar';\nimport permissionManager from '@wavemaker/app-rn-runtime/runtime/services/device/permissions';\nimport { CalendarInput } from '@wavemaker/app-rn-runtime/core/device/calendar-service';\nimport { CalendarEvent } from '@wavemaker/app-rn-runtime/variables/device/calendar/get-events.operation';\nimport {\n CreateEventOutput,\n getDateObj\n} from '@wavemaker/app-rn-runtime/variables/device/calendar/create-event.operation';\nimport { DeleteEventOutput } from '@wavemaker/app-rn-runtime/variables/device/calendar/delete-event.operation';\n\nconst DEFAULT_TIME = new Date().getTime();\nconst DELTA_VALUE_DATE = 3 * 30 * 24 * 60 * 60 * 1000;\nconst DEFAULT_START_DATE = new Date(DEFAULT_TIME - DELTA_VALUE_DATE);\nconst DEFAULT_END_DATE = new Date(DEFAULT_TIME + DELTA_VALUE_DATE);\n\nexport class CalendarService {\n\n constructor() {}\n\n public getEvents(params: CalendarInput): Promise<Array<CalendarEvent>> {\n return new Promise((resolve, reject) => {\n permissionManager.requestPermissions('calendar').then(() => {\n return Calendar.getCalendarsAsync().then(result => {\n let calendarIds: Array<string> = [];\n result.forEach(c => calendarIds.push(c.id));\n Calendar.getEventsAsync(calendarIds, params.eventStart || DEFAULT_START_DATE, params.eventEnd || DEFAULT_END_DATE)\n .then(res => {\n let filteredResult = res;\n if (params.eventTitle || params.eventLocation || params.eventNotes) {\n filteredResult = res.filter(event => event.title === params.eventTitle || event.location === params.eventLocation || event.notes === params.eventNotes);\n }\n let events: Array<CalendarEvent> = [];\n filteredResult.forEach(e => {\n events.push({\n title: e.title,\n message: e.notes,\n location: e.location,\n startDate: e.startDate,\n endDate: e.endDate\n })\n });\n return resolve(events);\n })\n })\n }, reject);\n });\n }\n\n\n public createEvent(params: CalendarInput): Promise<CreateEventOutput> {\n const eventMetadata = {\n title: params.eventTitle,\n location: params.eventLocation,\n notes: params.eventNotes,\n startDate: getDateObj(params.eventStart) || DEFAULT_START_DATE,\n endDate: getDateObj(params.eventEnd) || DEFAULT_END_DATE\n };\n\n return new Promise((resolve, reject) => {\n permissionManager.requestPermissions('calendar').then(() => {\n return Calendar.getCalendarsAsync().then(result => {\n let calendarIds: Array<string> = [];\n result.forEach(c => {\n if (c.allowsModifications) {\n calendarIds.push(c.id);\n }\n });\n // createEventAsync has calendarId as required parameter. Need to expose ownerAccount as filter field in studio. Right now passing calendar index as zero.\n return Calendar.createEventAsync(calendarIds[0], eventMetadata).then(res => {\n const event = {\n dataValue: res\n };\n return resolve(event);\n })\n }, reject);\n });\n });\n }\n\n\n public deleteEvent(params: CalendarInput): Promise<DeleteEventOutput> {\n\n return new Promise((resolve, reject) => {\n permissionManager.requestPermissions('calendar').then(() => {\n return Calendar.getCalendarsAsync().then(result => {\n let calendarIds: Array<string> = [];\n result.forEach(c => {\n if (c.allowsModifications) {\n calendarIds.push(c.id);\n }\n });\n Calendar.getEventsAsync(calendarIds, params.eventStart || DEFAULT_START_DATE, params.eventEnd || DEFAULT_END_DATE)\n .then((res) => {\n const filteredResult = res.filter(event => event.title === params.eventTitle || event.location === params.eventLocation\n || event.notes === params.eventNotes);\n Promise.all(\n filteredResult.map((event) => { Calendar.deleteEventAsync(event.id)}))\n .then(res => {\n const event = {\n dataValue: true\n }\n return resolve(event);\n })\n })\n }, reject);\n });\n });\n }\n}\n"],"mappings":"AAAA,OAAO,KAAKA,QAAQ,MAAM,eAAe;AACzC,OAAOC,iBAAiB,MAAM,+DAA+D;AAG7F,SAEEC,UAAU,QACL,4EAA4E;AAGnF,MAAMC,YAAY,GAAG,IAAIC,IAAI,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;AACzC,MAAMC,gBAAgB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;AACrD,MAAMC,kBAAkB,GAAG,IAAIH,IAAI,CAACD,YAAY,GAAGG,gBAAgB,CAAC;AACpE,MAAME,gBAAgB,GAAG,IAAIJ,IAAI,CAACD,YAAY,GAAGG,gBAAgB,CAAC;AAElE,OAAO,MAAMG,eAAe,CAAC;EAE3BC,WAAWA,CAAA,EAAG,CAAC;EAERC,SAASA,CAACC,MAAqB,EAAiC;IACrE,OAAO,IAAIC,OAAO,CAAC,CAACC,OAAO,EAAEC,MAAM,KAAK;MACtCd,iBAAiB,CAACe,kBAAkB,CAAC,UAAU,CAAC,CAACC,IAAI,CAAC,MAAM;QACxD,OAAOjB,QAAQ,CAACkB,iBAAiB,CAAC,CAAC,CAACD,IAAI,CAACE,MAAM,IAAI;UACjD,IAAIC,WAA0B,GAA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CAAC,IAAI;YAClB,IAAIA,CAAC,CAACuB,mBAAmB,EAAE;cACzBzB,WAAW,CAACG,IAAI,CAACD,CAAC,CAACE,EAAE,CAAC;YACxB;UACF,CAAC,CAAC;UACFxB,QAAQ,CAACyB,cAAc,CAACL,WAAW,EAAER,MAAM,CAACc,UAAU,IAAInB,kBAAkB,EAAEK,MAAM,CAACe,QAAQ,IAAInB,gBAAgB,CAAC,CAC/GS,IAAI,CAAEW,GAAG,IAAK;YACb,MAAMC,cAAc,GAAGD,GAAG,CAACK,MAAM,CAACC,KAAK,IAAIA,KAAK,CAACC,KAAK,KAAKvB,MAAM,CAACkB,UAAU,IAAII,KAAK,CAACE,QAAQ,KAAKxB,MAAM,CAACmB,aAAa,IAClHG,KAAK,CAACG,KAAK,KAAKzB,MAAM,CAACoB,UAAU,CAAC;YACvCnB,OAAO,CAACoC,GAAG,CACTpB,cAAc,CAACqB,GAAG,CAAEhB,KAAK,IAAK;cAAElC,QAAQ,CAACmD,gBAAgB,CAACjB,KAAK,CAACV,EAAE,CAAC;YAAA,CAAC,CAAC,CAAC,CACrEP,IAAI,CAACW,GAAG,IAAI;cACX,MAAMM,KAAK,GAAG;gBACZa,SAAS,EAAE;cACb,CAAC;cACD,OAAOjC,OAAO,CAACoB,KAAK,CAAC;YACvB,CAAC,CAAC;UACN,CAAC,CAAC;QACN,CAAC,EAAEnB,MAAM,CAAC;MACd,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
2
2
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
3
|
-
function _toPropertyKey(
|
4
|
-
function _toPrimitive(
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
4
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
5
5
|
import React from "react";
|
6
6
|
import { ImageBackground, Platform, TouchableOpacity, View } from "react-native";
|
7
7
|
import { Ionicons } from "@expo/vector-icons";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","ImageBackground","Platform","TouchableOpacity","View","Ionicons","ResizeMode","Video","Camera","CameraType","FileSystem","permissionManager","appDisplayManagerService","styles","preview","top","left","right","flexGrow","backgroundColor","actionBtn","flex","padding","paddingHorizontal","alignSelf","margin","actionBar","flexDirection","justifyContent","position","bottom","leftWrapper","alignItems","midWrapper","rightWrapper","circle","display","outerCircle","borderWidth","height","width","borderRadius","borderColor","innerCircle","CameraService","constructor","displayManager","_defineProperty","back","captureVideo","options","Promise","resolve","reject","requestPermissions","then","destroy","show","content","createElement","CameraView","testID","type","captureType","onSuccess","o","call","videoPath","uri","onCancel","captureImage","params","catch","base64","imagePath","CameraViewProps","CameraViewState","Component","props","camera","recordAsync","response","readAsStringAsync","encoding","setState","cameraContent","isCaptured","state","showActionBtns","recording","stopRecording","toggleCapture","takePicture","startRecord","stopRecord","getTestProps","suffix","id","OS","accessibilityLabel","accessible","quality","skipProcessing","onPictureSaved","takePictureAsync","getActionsTemplate","style","_extends","onPress","closeView","name","size","color","bind","cameraType","getPreviewTemplate","actions","source","resizeMode","CONTAIN","shouldPlay","useNativeControls","isLooping","render","ref","onCameraReady","cameraService"],"sources":["camera-service.tsx"],"sourcesContent":["import React from \"react\";\nimport { ImageBackground, Platform, TouchableOpacity, View, ViewStyle } from \"react-native\";\nimport { Ionicons } from \"@expo/vector-icons\";\nimport { ResizeMode, Video } from \"expo-av\";\nimport { Camera, CameraType } from \"expo-camera\";\nimport * as FileSystem from \"expo-file-system\";\nimport * as Application from 'expo-application';\n\nimport { DisplayManager } from \"@wavemaker/app-rn-runtime/core/display.manager\";\nimport { CaptureVideoOutput } from \"@wavemaker/app-rn-runtime/variables/device/camera/capture-video.operation\";\nimport { CaptureImageOutput } from \"@wavemaker/app-rn-runtime/variables/device/camera/capture-image.operation\";\nimport permissionManager from '@wavemaker/app-rn-runtime/runtime/services/device/permissions';\nimport { CameraInput } from \"@wavemaker/app-rn-runtime/core/device/camera-service\";\nimport { Input } from \"@wavemaker/app-rn-runtime/variables/device/operation.provider\";\nimport appDisplayManagerService from \"@wavemaker/app-rn-runtime/runtime/services/app-display-manager.service\";\nconst styles = {\n preview: {\n top: 0,\n left: 0,\n right: 0,\n flexGrow: 1,\n backgroundColor: 'black'\n },\n actionBtn: {\n flex: 0,\n padding: 15,\n paddingHorizontal: 20,\n alignSelf: 'center',\n margin: 20,\n } as ViewStyle,\n actionBar: {\n flex: 0,\n flexDirection: 'row',\n justifyContent: 'center',\n backgroundColor: 'rgba(0,0,0,0.6)',\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n padding: 20\n } as ViewStyle,\n leftWrapper: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'flex-start',\n } as ViewStyle,\n midWrapper: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n } as ViewStyle,\n rightWrapper: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'flex-end',\n } as ViewStyle,\n circle: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n } as ViewStyle,\n outerCircle: {\n borderWidth: 3,\n height: 50,\n width: 50,\n borderRadius: 25,\n borderColor: 'white'\n },\n innerCircle: {\n borderRadius:2,\n height: 20,\n width:20,\n backgroundColor: 'red'\n }\n};\n\nexport interface CameraVideoInput extends Input {}\n\nexport class CameraService {\n private type= CameraType.back;\n\n constructor(private displayManager: DisplayManager) {\n }\n\n public captureVideo(options?: CameraVideoInput): Promise<CaptureVideoOutput> {\n return new Promise((resolve, reject) => {\n permissionManager.requestPermissions('video').then(() => {\n const destroy = this.displayManager.show({\n content: (<CameraView testID={\"camera_view\"} type={this.type} captureType={'video'} onSuccess={(o) => {\n destroy.call(this.displayManager);\n /*o.content().catch(() => {}).then(base64 => {\n resolve({videoPath: o.uri, content: base64 || ''});\n });*/\n resolve({videoPath: o.uri, content: ''});\n }}\n onCancel={() => {\n destroy.call(this.displayManager);\n }}\n ></CameraView>)\n });\n }, reject);\n });\n }\n\n public captureImage(params: CameraInput): Promise<CaptureImageOutput> {\n return new Promise((resolve, reject) => {\n permissionManager.requestPermissions('image').then(() => {\n const destroy = this.displayManager.show({\n content: (<CameraView testID={\"camera_view\"} type={this.type} captureType={'image'} onSuccess={(o) => {\n destroy.call(this.displayManager);\n o.content().catch(() => {}).then(base64 => {\n resolve({imagePath: o.uri, content: base64 || ''});\n });\n }} onCancel={() => {destroy.call(this.displayManager);}}\n ></CameraView>)\n });\n }, reject);\n });\n }\n}\n\ninterface CameraOutput {\n uri: string;\n content: () => Promise<string>;\n}\n\nclass CameraViewProps {\n testID: string = 'camera_view';\n type: 'front' | 'back' = 'back' as CameraType;\n captureType: 'image' | 'video' = 'image';\n onSuccess: (o: CameraOutput) => any = () => {};\n onCancel: () => any = () => {};\n}\n\nclass CameraViewState {\n recording: boolean = false;\n showActionBtns: boolean = false;\n cameraType: CameraType = CameraType.back;\n isCaptured: boolean = false;\n closeView: boolean = false;\n cameraContent: CameraOutput = {} as CameraOutput;\n}\n\nexport class CameraView extends React.Component<CameraViewProps, CameraViewState> {\n private camera: Camera = {} as Camera;\n\n constructor(props: CameraViewProps) {\n super(props);\n this.state = new CameraViewState();\n }\n\n toggleCapture() {\n if (this.props.captureType === 'image') {\n this.takePicture();\n } else {\n if (!this.state.recording) {\n this.startRecord();\n } else {\n this.stopRecord();\n this.setState({showActionBtns: true} as CameraViewState);\n }\n }\n }\n\n getTestProps(suffix: string) {\n const id = this.props.testID + (suffix ? '_' + suffix : '');\n if (Platform.OS === 'android' || Platform.OS === 'web') {\n return {\n accessibilityLabel: id,\n testID: id\n };\n }\n return {\n accessible: false,\n testID: id\n };\n }\n\n async takePicture() {\n const options = {\n quality: 0.5,\n base64: false,\n skipProcessing: true,\n onPictureSaved: (response: any) => {\n response.content = async () => {\n return await FileSystem.readAsStringAsync(response.uri, { encoding: 'base64' });\n };\n this.setState({ \n cameraContent: response,\n isCaptured: true,\n showActionBtns: true } as CameraViewState);\n }\n }\n await this.camera.takePictureAsync(options);\n\n if (this.state.showActionBtns) {\n this.setState({showActionBtns: false} as CameraViewState);\n }\n this.setState({showActionBtns: true} as CameraViewState);\n }\n\n // start recording\n startRecord = async () => {\n this.camera.recordAsync().then((response: any) => {\n response.content = async () => {\n return await FileSystem.readAsStringAsync(response.uri, { encoding: 'base64' });\n };\n this.setState({ cameraContent: response, isCaptured: true } as CameraViewState);\n });\n if (this.state.showActionBtns) {\n this.setState({showActionBtns: false} as CameraViewState);\n }\n\n this.setState({recording: true} as CameraViewState);\n };\n\n // stop recording\n stopRecord = async () => {\n this.camera.stopRecording();\n this.setState({recording: false} as CameraViewState);\n this.setState({showActionBtns: true} as CameraViewState);\n };\n\n getActionsTemplate() {\n return <View style={styles.actionBar}>\n <View style={styles.leftWrapper}>\n <TouchableOpacity\n {...this.getTestProps('close')}\n onPress={() => {\n this.setState({ cameraContent: {uri: ''}, isCaptured: false, closeView: true } as CameraViewState);\n this.props.onCancel();\n }}>\n <Ionicons name='close-circle' size={32} color='white' />\n </TouchableOpacity>\n </View>\n <View style={styles.midWrapper}>\n {!this.state.isCaptured ? <TouchableOpacity style={[styles.circle, styles.outerCircle, this.props.captureType === 'video' && !this.state.recording ? { backgroundColor: \"red\" } : {},\n this.props.captureType === 'image' ? { backgroundColor: \"white\" } : {}]}\n onPress={this.toggleCapture.bind(this)}\n {...this.getTestProps('capture')}>\n <View style={[styles.circle as ViewStyle, this.props.captureType === 'image' ? {} : styles.innerCircle, this.props.captureType === 'image' ? { backgroundColor: \"white\" } : {}]}></View>\n </TouchableOpacity> : null}\n </View>\n <View style={styles.rightWrapper}>\n {this.state.showActionBtns ? (<TouchableOpacity\n onPress={() => {\n this.setState({ isCaptured: false, closeView: true } as CameraViewState);\n this.props.onSuccess(this.state.cameraContent);\n this.setState({ cameraContent: {uri: ''} } as CameraViewState);\n }}\n {...this.getTestProps('ok')}>\n <Ionicons name='checkmark-circle' size={32} color='white'/>\n </TouchableOpacity>) : (<TouchableOpacity\n {...this.getTestProps('toggle')}\n onPress={() => {\n this.setState({cameraType: this.state.cameraType === 'back' ? 'front' : 'back'} as CameraViewState);\n }}>\n <Ionicons name='camera-reverse' size={32} color='white' />\n </TouchableOpacity>)}\n </View>\n </View>\n }\n\n getPreviewTemplate(actions: any) {\n return this.props.captureType === 'image' ?\n <ImageBackground source={{uri : this.state.cameraContent.uri}} resizeMode={ResizeMode.CONTAIN} style={{flex: 1}} />\n : <Video\n style={{ flex: 1 }}\n source={{\n uri: this.state.cameraContent.uri,\n }}\n shouldPlay={true}\n useNativeControls\n isLooping\n resizeMode={ResizeMode.CONTAIN}\n ></Video>\n }\n\n render() {\n if (this.state.closeView) {\n return null;\n }\n const actions = this.getActionsTemplate();\n return (\n <View style={styles.preview}>\n {this.state.isCaptured ? (\n this.getPreviewTemplate(actions)\n ) : (\n <Camera type={CameraType[this.state.cameraType]} ref={(ref: Camera) => { this.camera = ref; }}\n style={{flex: 1}}\n onCameraReady={() => {}}>\n\n </Camera>)}\n {actions}\n </View>)\n }\n}\nconst cameraService = new CameraService(appDisplayManagerService);\nexport default cameraService;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,eAAe,EAAEC,QAAQ,EAAEC,gBAAgB,EAAEC,IAAI,QAAmB,cAAc;AAC3F,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,UAAU,EA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AAI;MAACsG,KAAK,EAAE7F,MAAM,CAACC;IAAQ,GACzB,IAAI,CAACyE,KAAK,CAACD,UAAU,GACpB,IAAI,CAAC6B,kBAAkB,CAACC,OAAO,CAAC,gBAEhCpH,KAAA,CAAA2D,aAAA,CAACnD,MAAM;MAACsD,IAAI,EAAErD,UAAU,CAAC,IAAI,CAAC8E,KAAK,CAAC2B,UAAU,CAAE;MAACU,GAAG,EAAGA,GAAW,IAAK;QAAE,IAAI,CAAC7C,MAAM,GAAG6C,GAAG;MAAE,CAAE;MAC1FlB,KAAK,EAAE;QAACrF,IAAI,EAAE;MAAC,CAAE;MACjBwG,aAAa,EAAEA,CAAA,KAAM,CAAC;IAAE,CAEpB,CAAE,EACXT,OACG,CAAC;EACX;AACF;AACA,MAAMU,aAAa,GAAG,IAAIlF,aAAa,CAAChC,wBAAwB,CAAC;AACjE,eAAekH,aAAa"}
|
1
|
+
{"version":3,"names":["React","ImageBackground","Platform","TouchableOpacity","View","Ionicons","ResizeMode","Video","Camera","CameraType","FileSystem","permissionManager","appDisplayManagerService","styles","preview","top","left","right","flexGrow","backgroundColor","actionBtn","flex","padding","paddingHorizontal","alignSelf","margin","actionBar","flexDirection","justifyContent","position","bottom","leftWrapper","alignItems","midWrapper","rightWrapper","circle","display","outerCircle","borderWidth","height","width","borderRadius","borderColor","innerCircle","CameraService","constructor","displayManager","_defineProperty","back","captureVideo","options","Promise","resolve","reject","requestPermissions","then","destroy","show","content","createElement","CameraView","testID","type","captureType","onSuccess","o","call","videoPath","uri","onCancel","captureImage","params","catch","base64","imagePath","CameraViewProps","CameraViewState","Component","props","camera","recordAsync","response","readAsStringAsync","encoding","setState","cameraContent","isCaptured","state","showActionBtns","recording","stopRecording","toggleCapture","takePicture","startRecord","stopRecord","getTestProps","suffix","id","OS","accessibilityLabel","accessible","quality","skipProcessing","onPictureSaved","takePictureAsync","getActionsTemplate","style","_extends","onPress","closeView","name","size","color","bind","cameraType","getPreviewTemplate","actions","source","resizeMode","CONTAIN","shouldPlay","useNativeControls","isLooping","render","ref","onCameraReady","cameraService"],"sources":["camera-service.tsx"],"sourcesContent":["import React from \"react\";\nimport { ImageBackground, Platform, TouchableOpacity, View, ViewStyle } from \"react-native\";\nimport { Ionicons } from \"@expo/vector-icons\";\nimport { ResizeMode, Video } from \"expo-av\";\nimport { Camera, CameraType } from \"expo-camera\";\nimport * as FileSystem from \"expo-file-system\";\nimport * as Application from 'expo-application';\n\nimport { DisplayManager } from \"@wavemaker/app-rn-runtime/core/display.manager\";\nimport { CaptureVideoOutput } from \"@wavemaker/app-rn-runtime/variables/device/camera/capture-video.operation\";\nimport { CaptureImageOutput } from \"@wavemaker/app-rn-runtime/variables/device/camera/capture-image.operation\";\nimport permissionManager from '@wavemaker/app-rn-runtime/runtime/services/device/permissions';\nimport { CameraInput } from \"@wavemaker/app-rn-runtime/core/device/camera-service\";\nimport { Input } from \"@wavemaker/app-rn-runtime/variables/device/operation.provider\";\nimport appDisplayManagerService from \"@wavemaker/app-rn-runtime/runtime/services/app-display-manager.service\";\nconst styles = {\n preview: {\n top: 0,\n left: 0,\n right: 0,\n flexGrow: 1,\n backgroundColor: 'black'\n },\n actionBtn: {\n flex: 0,\n padding: 15,\n paddingHorizontal: 20,\n alignSelf: 'center',\n margin: 20,\n } as ViewStyle,\n actionBar: {\n flex: 0,\n flexDirection: 'row',\n justifyContent: 'center',\n backgroundColor: 'rgba(0,0,0,0.6)',\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n padding: 20\n } as ViewStyle,\n leftWrapper: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'flex-start',\n } as ViewStyle,\n midWrapper: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n } as ViewStyle,\n rightWrapper: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'flex-end',\n } as ViewStyle,\n circle: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n } as ViewStyle,\n outerCircle: {\n borderWidth: 3,\n height: 50,\n width: 50,\n borderRadius: 25,\n borderColor: 'white'\n },\n innerCircle: {\n borderRadius:2,\n height: 20,\n width:20,\n backgroundColor: 'red'\n }\n};\n\nexport interface CameraVideoInput extends Input {}\n\nexport class CameraService {\n private type= CameraType.back;\n\n constructor(private displayManager: DisplayManager) {\n }\n\n public captureVideo(options?: CameraVideoInput): Promise<CaptureVideoOutput> {\n return new Promise((resolve, reject) => {\n permissionManager.requestPermissions('video').then(() => {\n const destroy = this.displayManager.show({\n content: (<CameraView testID={\"camera_view\"} type={this.type} captureType={'video'} onSuccess={(o) => {\n destroy.call(this.displayManager);\n /*o.content().catch(() => {}).then(base64 => {\n resolve({videoPath: o.uri, content: base64 || ''});\n });*/\n resolve({videoPath: o.uri, content: ''});\n }}\n onCancel={() => {\n destroy.call(this.displayManager);\n }}\n ></CameraView>)\n });\n }, reject);\n });\n }\n\n public captureImage(params: CameraInput): Promise<CaptureImageOutput> {\n return new Promise((resolve, reject) => {\n permissionManager.requestPermissions('image').then(() => {\n const destroy = this.displayManager.show({\n content: (<CameraView testID={\"camera_view\"} type={this.type} captureType={'image'} onSuccess={(o) => {\n destroy.call(this.displayManager);\n o.content().catch(() => {}).then(base64 => {\n resolve({imagePath: o.uri, content: base64 || ''});\n });\n }} onCancel={() => {destroy.call(this.displayManager);}}\n ></CameraView>)\n });\n }, reject);\n });\n }\n}\n\ninterface CameraOutput {\n uri: string;\n content: () => Promise<string>;\n}\n\nclass CameraViewProps {\n testID: string = 'camera_view';\n type: 'front' | 'back' = 'back' as CameraType;\n captureType: 'image' | 'video' = 'image';\n onSuccess: (o: CameraOutput) => any = () => {};\n onCancel: () => any = () => {};\n}\n\nclass CameraViewState {\n recording: boolean = false;\n showActionBtns: boolean = false;\n cameraType: CameraType = CameraType.back;\n isCaptured: boolean = false;\n closeView: boolean = false;\n cameraContent: CameraOutput = {} as CameraOutput;\n}\n\nexport class CameraView extends React.Component<CameraViewProps, CameraViewState> {\n private camera: Camera = {} as Camera;\n\n constructor(props: CameraViewProps) {\n super(props);\n this.state = new CameraViewState();\n }\n\n toggleCapture() {\n if (this.props.captureType === 'image') {\n this.takePicture();\n } else {\n if (!this.state.recording) {\n this.startRecord();\n } else {\n this.stopRecord();\n this.setState({showActionBtns: true} as CameraViewState);\n }\n }\n }\n\n getTestProps(suffix: string) {\n const id = this.props.testID + (suffix ? '_' + suffix : '');\n if (Platform.OS === 'android' || Platform.OS === 'web') {\n return {\n accessibilityLabel: id,\n testID: id\n };\n }\n return {\n accessible: false,\n testID: id\n };\n }\n\n async takePicture() {\n const options = {\n quality: 0.5,\n base64: false,\n skipProcessing: true,\n onPictureSaved: (response: any) => {\n response.content = async () => {\n return await FileSystem.readAsStringAsync(response.uri, { encoding: 'base64' });\n };\n this.setState({ \n cameraContent: response,\n isCaptured: true,\n showActionBtns: true } as CameraViewState);\n }\n }\n await this.camera.takePictureAsync(options);\n\n if (this.state.showActionBtns) {\n this.setState({showActionBtns: false} as CameraViewState);\n }\n this.setState({showActionBtns: true} as CameraViewState);\n }\n\n // start recording\n startRecord = async () => {\n this.camera.recordAsync().then((response: any) => {\n response.content = async () => {\n return await FileSystem.readAsStringAsync(response.uri, { encoding: 'base64' });\n };\n this.setState({ cameraContent: response, isCaptured: true } as CameraViewState);\n });\n if (this.state.showActionBtns) {\n this.setState({showActionBtns: false} as CameraViewState);\n }\n\n this.setState({recording: true} as CameraViewState);\n };\n\n // stop recording\n stopRecord = async () => {\n this.camera.stopRecording();\n this.setState({recording: false} as CameraViewState);\n this.setState({showActionBtns: true} as CameraViewState);\n };\n\n getActionsTemplate() {\n return <View style={styles.actionBar}>\n <View style={styles.leftWrapper}>\n <TouchableOpacity\n {...this.getTestProps('close')}\n onPress={() => {\n this.setState({ cameraContent: {uri: ''}, isCaptured: false, closeView: true } as CameraViewState);\n this.props.onCancel();\n }}>\n <Ionicons name='close-circle' size={32} color='white' />\n </TouchableOpacity>\n </View>\n <View style={styles.midWrapper}>\n {!this.state.isCaptured ? <TouchableOpacity style={[styles.circle, styles.outerCircle, this.props.captureType === 'video' && !this.state.recording ? { backgroundColor: \"red\" } : {},\n this.props.captureType === 'image' ? { backgroundColor: \"white\" } : {}]}\n onPress={this.toggleCapture.bind(this)}\n {...this.getTestProps('capture')}>\n <View style={[styles.circle as ViewStyle, this.props.captureType === 'image' ? {} : styles.innerCircle, this.props.captureType === 'image' ? { backgroundColor: \"white\" } : {}]}></View>\n </TouchableOpacity> : null}\n </View>\n <View style={styles.rightWrapper}>\n {this.state.showActionBtns ? (<TouchableOpacity\n onPress={() => {\n this.setState({ isCaptured: false, closeView: true } as CameraViewState);\n this.props.onSuccess(this.state.cameraContent);\n this.setState({ cameraContent: {uri: ''} } as CameraViewState);\n }}\n {...this.getTestProps('ok')}>\n <Ionicons name='checkmark-circle' size={32} color='white'/>\n </TouchableOpacity>) : (<TouchableOpacity\n {...this.getTestProps('toggle')}\n onPress={() => {\n this.setState({cameraType: this.state.cameraType === 'back' ? 'front' : 'back'} as CameraViewState);\n }}>\n <Ionicons name='camera-reverse' size={32} color='white' />\n </TouchableOpacity>)}\n </View>\n </View>\n }\n\n getPreviewTemplate(actions: any) {\n return this.props.captureType === 'image' ?\n <ImageBackground source={{uri : this.state.cameraContent.uri}} resizeMode={ResizeMode.CONTAIN} style={{flex: 1}} />\n : <Video\n style={{ flex: 1 }}\n source={{\n uri: this.state.cameraContent.uri,\n }}\n shouldPlay={true}\n useNativeControls\n isLooping\n resizeMode={ResizeMode.CONTAIN}\n ></Video>\n }\n\n render() {\n if (this.state.closeView) {\n return null;\n }\n const actions = this.getActionsTemplate();\n return (\n <View style={styles.preview}>\n {this.state.isCaptured ? (\n this.getPreviewTemplate(actions)\n ) : (\n <Camera type={CameraType[this.state.cameraType]} ref={(ref: Camera) => { this.camera = ref; }}\n style={{flex: 1}}\n onCameraReady={() => {}}>\n\n </Camera>)}\n {actions}\n </View>)\n }\n}\nconst cameraService = new CameraService(appDisplayManagerService);\nexport default cameraService;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,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K,CAACsB,SAAS,EAAE;MACxB,OAAO,IAAI;IACb;IACA,MAAMO,OAAO,GAAG,IAAI,CAACX,kBAAkB,CAAC,CAAC;IACzC,oBACEzG,KAAA,CAAA2D,aAAA,CAACvD,IAAI;MAACsG,KAAK,EAAE7F,MAAM,CAACC;IAAQ,GACzB,IAAI,CAACyE,KAAK,CAACD,UAAU,GACpB,IAAI,CAAC6B,kBAAkB,CAACC,OAAO,CAAC,gBAEhCpH,KAAA,CAAA2D,aAAA,CAACnD,MAAM;MAACsD,IAAI,EAAErD,UAAU,CAAC,IAAI,CAAC8E,KAAK,CAAC2B,UAAU,CAAE;MAACU,GAAG,EAAGA,GAAW,IAAK;QAAE,IAAI,CAAC7C,MAAM,GAAG6C,GAAG;MAAE,CAAE;MAC1FlB,KAAK,EAAE;QAACrF,IAAI,EAAE;MAAC,CAAE;MACjBwG,aAAa,EAAEA,CAAA,KAAM,CAAC;IAAE,CAEpB,CAAE,EACXT,OACG,CAAC;EACX;AACF;AACA,MAAMU,aAAa,GAAG,IAAIlF,aAAa,CAAChC,wBAAwB,CAAC;AACjE,eAAekH,aAAa","ignoreList":[]}
|
@@ -13,7 +13,7 @@ export class ContactsService {
|
|
13
13
|
value.data.forEach(c => {
|
14
14
|
var _c$phoneNumbers;
|
15
15
|
const numbers = [];
|
16
|
-
(_c$phoneNumbers = c.phoneNumbers) === null || _c$phoneNumbers === void 0
|
16
|
+
(_c$phoneNumbers = c.phoneNumbers) === null || _c$phoneNumbers === void 0 || _c$phoneNumbers.forEach(num => {
|
17
17
|
numbers.push({
|
18
18
|
value: num.number
|
19
19
|
});
|