@wavemaker/app-rn-runtime 11.4.0-next.141708 → 11.4.0-next.1417080
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- app-rn-runtime/actions/base-action.js.map +1 -1
- app-rn-runtime/actions/login-action.js.map +1 -1
- app-rn-runtime/actions/logout-action.js.map +1 -1
- app-rn-runtime/actions/navigation-action.js +14 -2
- app-rn-runtime/actions/navigation-action.js.map +1 -1
- app-rn-runtime/actions/notification-action.js +5 -4
- app-rn-runtime/actions/notification-action.js.map +1 -1
- app-rn-runtime/actions/timer-action.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js +2 -2
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +16 -0
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/advanced/login/login.component.js +1 -1
- app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
- app-rn-runtime/components/advanced/login/login.props.js.map +1 -1
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +5 -5
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.props.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +2 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js +5 -0
- app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
- app-rn-runtime/components/basic/animatedview.component.js +1 -3
- app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.component.js +232 -0
- app-rn-runtime/components/basic/audio/audio.component.js.map +1 -0
- app-rn-runtime/components/basic/audio/audio.props.js +15 -0
- app-rn-runtime/components/basic/audio/audio.props.js.map +1 -0
- app-rn-runtime/components/basic/audio/audio.styles.js +61 -0
- app-rn-runtime/components/basic/audio/audio.styles.js.map +1 -0
- app-rn-runtime/components/basic/button/button.component.js +1 -1
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.props.js.map +1 -1
- app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.component.js +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.component.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.props.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js +25 -0
- app-rn-runtime/components/basic/custom/custom.component.js.map +1 -0
- app-rn-runtime/components/basic/custom/custom.props.js +16 -0
- app-rn-runtime/components/basic/custom/custom.props.js.map +1 -0
- app-rn-runtime/components/basic/custom/custom.styles.js +18 -0
- app-rn-runtime/components/basic/custom/custom.styles.js.map +1 -0
- app-rn-runtime/components/basic/icon/icon.component.js +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.styles.js +5 -0
- app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +3 -2
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.props.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js +8 -0
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js +137 -0
- app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -0
- app-rn-runtime/components/basic/lottie/lottie.props.js +14 -0
- app-rn-runtime/components/basic/lottie/lottie.props.js.map +1 -0
- app-rn-runtime/components/basic/lottie/lottie.styles.js +11 -0
- app-rn-runtime/components/basic/lottie/lottie.styles.js.map +1 -0
- app-rn-runtime/components/basic/message/message.component.js +1 -1
- app-rn-runtime/components/basic/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/message/message.props.js.map +1 -1
- app-rn-runtime/components/basic/message/message.styles.js +22 -0
- app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
- app-rn-runtime/components/basic/modal/modal.component.js.map +1 -1
- app-rn-runtime/components/basic/modal/modal.props.js.map +1 -1
- app-rn-runtime/components/basic/modal/modal.styles.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +40 -29
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.props.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.styles.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +3 -2
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.props.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.props.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.styles.js.map +1 -1
- app-rn-runtime/components/basic/search/local-data-provider.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +5 -2
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +1 -0
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +47 -0
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js +13 -11
- app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.props.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.styles.js +8 -0
- app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js +56 -0
- app-rn-runtime/components/basic/video/video.component.js.map +1 -0
- app-rn-runtime/components/basic/video/video.props.js +22 -0
- app-rn-runtime/components/basic/video/video.props.js.map +1 -0
- app-rn-runtime/components/basic/video/video.styles.js +11 -0
- app-rn-runtime/components/basic/video/video.styles.js.map +1 -0
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +1 -0
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js +17 -0
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/column-chart/column-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.props.js +0 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/legend/legend.component.js +36 -0
- app-rn-runtime/components/chart/legend/legend.component.js.map +1 -0
- app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +119 -40
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +1 -2
- app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/theme/chart.theme.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +75 -119
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.props.js +1 -0
- app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.styles.js +14 -4
- app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +49 -8
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.props.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +1 -1
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.props.js.map +1 -1
- app-rn-runtime/components/container/container.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.props.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.props.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.component.js +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +1 -1
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.styles.js +9 -0
- app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
- app-rn-runtime/components/container/partial-host.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +42 -9
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +12 -2
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +5 -2
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +84 -65
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.props.js +1 -0
- app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js +40 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +1 -1
- app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +16 -7
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +53 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.props.js.map +1 -1
- app-rn-runtime/components/data/card/card-footer/card-footer.component.js +1 -1
- app-rn-runtime/components/data/card/card-footer/card-footer.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-footer/card-footer.props.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +1 -1
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.component.js +0 -6
- app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.component.js +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +3 -3
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.component.js +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.props.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +3 -33
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.props.js.map +1 -1
- app-rn-runtime/components/data/form/form.styles.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +94 -24
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +2 -0
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +3 -2
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.component.js +9 -4
- app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.props.js +0 -1
- app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js +9 -0
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +6 -3
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.props.js.map +1 -1
- app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
- app-rn-runtime/components/input/basedataset/basedataset.props.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +8 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.props.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.styles.js +22 -0
- app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
- app-rn-runtime/components/input/calendar/views/month-view.js +1 -0
- app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +1 -16
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.props.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +0 -38
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +1 -0
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.props.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.component.js +1 -1
- app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +6 -4
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.props.js +1 -1
- app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +9 -0
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +6 -3
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.styles.js +9 -0
- app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/date-picker.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +9 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.styles.js +9 -0
- app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +6 -13
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.props.js +1 -1
- app-rn-runtime/components/input/number/number.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +5 -0
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +0 -40
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/rating/rating.component.js +2 -2
- app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
- app-rn-runtime/components/input/rating/rating.props.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +1 -1
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.props.js.map +1 -1
- app-rn-runtime/components/input/select/select.styles.js +10 -0
- app-rn-runtime/components/input/select/select.styles.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.component.js +3 -2
- app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.props.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +19 -22
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.props.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +43 -7
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +6 -13
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js +5 -0
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +5 -13
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.styles.js +5 -0
- app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +17 -11
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.styles.js +28 -3
- app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.props.js +1 -0
- app-rn-runtime/components/navigation/basenav/basenav.props.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.component.js +2 -1
- app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.props.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.styles.js +6 -0
- app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.component.js +2 -0
- app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.props.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.styles.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +4 -3
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.props.js +1 -0
- 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 +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
- app-rn-runtime/components/page/content/content.component.js +1 -1
- app-rn-runtime/components/page/content/content.component.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.props.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +2 -2
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
- app-rn-runtime/components/page/page.component.js +1 -1
- app-rn-runtime/components/page/page.component.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.component.js +1 -1
- app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.component.js +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.component.js.map +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.props.js.map +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.styles.js +2 -1
- app-rn-runtime/components/page/partial-container/partial-container.styles.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js +2 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
- app-rn-runtime/core/asset.provider.js +5 -0
- app-rn-runtime/core/asset.provider.js.map +1 -0
- app-rn-runtime/core/base.component.js +131 -54
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/textinput.component.js +37 -0
- app-rn-runtime/core/components/textinput.component.js.map +1 -0
- app-rn-runtime/core/device/camera-service.js.map +1 -1
- app-rn-runtime/core/device/scan-service.js.map +1 -1
- app-rn-runtime/core/display.manager.js.map +1 -1
- app-rn-runtime/core/event-notifier.js.map +1 -1
- app-rn-runtime/core/fixed-view.component.js.map +1 -1
- app-rn-runtime/core/formatters.js.map +1 -1
- app-rn-runtime/core/i18n.service.js +2 -0
- app-rn-runtime/core/i18n.service.js.map +1 -0
- app-rn-runtime/core/if.component.js +3 -3
- app-rn-runtime/core/if.component.js.map +1 -1
- app-rn-runtime/core/imageSizeEstimator.js +1 -0
- app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
- app-rn-runtime/core/injector.js +16 -1
- app-rn-runtime/core/injector.js.map +1 -1
- app-rn-runtime/core/logger.js +4 -1
- app-rn-runtime/core/logger.js.map +1 -1
- app-rn-runtime/core/modal.service.js.map +1 -1
- app-rn-runtime/core/navigation.service.js.map +1 -1
- app-rn-runtime/core/network.service.js +17 -15
- app-rn-runtime/core/network.service.js.map +1 -1
- app-rn-runtime/core/partial.service.js.map +1 -1
- app-rn-runtime/core/props.provider.js.map +1 -1
- app-rn-runtime/core/scroll-view.component.js.map +1 -1
- app-rn-runtime/core/security.service.js.map +1 -1
- app-rn-runtime/core/spinner.service.js.map +1 -1
- app-rn-runtime/core/storage.service.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +20 -4
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/toast.service.js.map +1 -1
- app-rn-runtime/core/utils.js +24 -0
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/core/viewport.js.map +1 -1
- app-rn-runtime/gestures/swipe.animation.js +110 -0
- app-rn-runtime/gestures/swipe.animation.js.map +1 -0
- app-rn-runtime/package.json +33 -32
- app-rn-runtime/runtime/App.js +38 -22
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/App.navigator.js +13 -14
- app-rn-runtime/runtime/App.navigator.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +12 -10
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +2 -0
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/base-partial.component.js.map +1 -1
- app-rn-runtime/runtime/base-prefab.component.js +1 -5
- app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
- app-rn-runtime/runtime/lib-patch.js.map +1 -1
- app-rn-runtime/runtime/memo.component.js.map +1 -1
- app-rn-runtime/runtime/navigator/drawer.navigator.js +4 -0
- app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js +5 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
- app-rn-runtime/runtime/services/app-display-manager.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-i18n.service.js +20 -0
- app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +7 -7
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-spinner.service.js +8 -3
- app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-toast.service.js +1 -1
- app-rn-runtime/runtime/services/app-toast.service.js.map +1 -1
- app-rn-runtime/runtime/services/device/calendar-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/camera-service.js +30 -9
- app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/contacts-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/location-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/permissions.js.map +1 -1
- app-rn-runtime/runtime/services/device/scan-service.js +15 -14
- app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
- app-rn-runtime/runtime/services/partial.service.js.map +1 -1
- app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
- app-rn-runtime/runtime/watcher.js.map +1 -1
- app-rn-runtime/styles/MediaQueryList.js.map +1 -1
- app-rn-runtime/styles/background.component.js +298 -0
- app-rn-runtime/styles/background.component.js.map +1 -0
- app-rn-runtime/styles/style-prop.validator.js +42 -8
- app-rn-runtime/styles/style-prop.validator.js.map +1 -1
- app-rn-runtime/styles/style-props.js +93 -0
- app-rn-runtime/styles/style-props.js.map +1 -0
- app-rn-runtime/styles/theme.js +14 -40
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +55 -1
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/base-variable.js +3 -3
- app-rn-runtime/variables/base-variable.js.map +1 -1
- app-rn-runtime/variables/device/calendar/create-event.operation.js.map +1 -1
- app-rn-runtime/variables/device/calendar/delete-event.operation.js.map +1 -1
- app-rn-runtime/variables/device/calendar/get-events.operation.js.map +1 -1
- app-rn-runtime/variables/device/camera/capture-image.operation.js.map +1 -1
- app-rn-runtime/variables/device/camera/capture-video.operation.js.map +1 -1
- app-rn-runtime/variables/device/contacts/get-contacts.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/app-info.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/current-geo-position.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/device-info.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/network-info.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/vibrate.operation.js.map +1 -1
- app-rn-runtime/variables/device/file/upload-file.operation.js +43 -21
- app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
- app-rn-runtime/variables/device/operation.provider.js.map +1 -1
- app-rn-runtime/variables/device/scan/scan.operation.js.map +1 -1
- app-rn-runtime/variables/device-variable.js.map +1 -1
- app-rn-runtime/variables/http.service.js +4 -13
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/model-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +27 -11
- app-rn-runtime/variables/service-variable.js.map +1 -1
- app-rn-runtime/variables/utils/dataset-util.js.map +1 -1
- app-rn-runtime/variables/utils/inflight-queue.js.map +1 -1
- app-rn-runtime/variables/utils/variable.utils.js.map +1 -1
|
@@ -1,20 +1,29 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1
2
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
3
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
4
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
5
|
import { assign, isUndefined } from 'lodash';
|
|
5
6
|
import React from 'react';
|
|
7
|
+
import * as Animatable from 'react-native-animatable';
|
|
6
8
|
import ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';
|
|
9
|
+
import { StyleProps, getStyleName } from '@wavemaker/app-rn-runtime/styles/style-props';
|
|
10
|
+
import { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';
|
|
11
|
+
import injector from '@wavemaker/app-rn-runtime/core/injector';
|
|
7
12
|
import { ROOT_LOGGER } from '@wavemaker/app-rn-runtime/core/logger';
|
|
8
13
|
import { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';
|
|
9
|
-
import BASE_THEME, { ThemeConsumer,
|
|
14
|
+
import BASE_THEME, { ThemeConsumer, ThemeEvent } from '../styles/theme';
|
|
15
|
+
import EventNotifier from './event-notifier';
|
|
10
16
|
import { PropsProvider } from './props.provider';
|
|
11
17
|
import { assignIn } from 'lodash-es';
|
|
12
18
|
import { HideMode } from './if.component';
|
|
19
|
+
import { AssetConsumer } from './asset.provider';
|
|
13
20
|
import { FixedView } from './fixed-view.component';
|
|
14
21
|
export const WIDGET_LOGGER = ROOT_LOGGER.extend('widget');
|
|
15
22
|
export const ParentContext = /*#__PURE__*/React.createContext(null);
|
|
16
23
|
export class BaseComponentState {
|
|
17
24
|
constructor() {
|
|
25
|
+
_defineProperty(this, "animationId", 0);
|
|
26
|
+
_defineProperty(this, "animatableProps", undefined);
|
|
18
27
|
_defineProperty(this, "props", {});
|
|
19
28
|
_defineProperty(this, "hide", false);
|
|
20
29
|
}
|
|
@@ -22,12 +31,14 @@ export class BaseComponentState {
|
|
|
22
31
|
export function defineStyles(styles) {
|
|
23
32
|
return deepCopy({
|
|
24
33
|
text: {
|
|
25
|
-
fontFamily: ThemeVariables.INSTANCE.baseFont
|
|
34
|
+
fontFamily: ThemeVariables.INSTANCE.baseFont,
|
|
35
|
+
userSelect: 'text'
|
|
26
36
|
}
|
|
27
37
|
}, styles);
|
|
28
38
|
}
|
|
29
|
-
export class BaseProps {
|
|
39
|
+
export class BaseProps extends StyleProps {
|
|
30
40
|
constructor() {
|
|
41
|
+
super(...arguments);
|
|
31
42
|
_defineProperty(this, "id", null);
|
|
32
43
|
_defineProperty(this, "name", null);
|
|
33
44
|
_defineProperty(this, "key", null);
|
|
@@ -56,9 +67,28 @@ export class BaseComponent extends React.Component {
|
|
|
56
67
|
_defineProperty(this, "destroyed", false);
|
|
57
68
|
_defineProperty(this, "_showSkeleton", false);
|
|
58
69
|
_defineProperty(this, "isFixed", false);
|
|
70
|
+
_defineProperty(this, "notifier", new EventNotifier());
|
|
71
|
+
_defineProperty(this, "parentListenerDestroyers", []);
|
|
72
|
+
_defineProperty(this, "_background", /*#__PURE__*/React.createElement(React.Fragment, null));
|
|
73
|
+
_defineProperty(this, "styleOverrides", {});
|
|
74
|
+
_defineProperty(this, "loadAsset", null);
|
|
75
|
+
_defineProperty(this, "i18nService", injector.I18nService.get());
|
|
59
76
|
this.state = defaultState || {};
|
|
60
77
|
this.propertyProvider = new PropsProvider(assign({}, defaultProps), assign({}, markupProps), (name, $new, $old) => {
|
|
61
|
-
WIDGET_LOGGER.debug(() => `${this.props.name
|
|
78
|
+
WIDGET_LOGGER.debug(() => `${this.props.name || this.constructor.name}: ${name} changed from ${$old} to ${$new}`);
|
|
79
|
+
if (this.initialized) {
|
|
80
|
+
const styleName = getStyleName(name);
|
|
81
|
+
if (styleName) {
|
|
82
|
+
if ($new === undefined) {
|
|
83
|
+
delete this.styleOverrides[styleName];
|
|
84
|
+
} else {
|
|
85
|
+
this.styleOverrides[styleName] = $new;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (name === 'showskeleton' && this.initialized) {
|
|
90
|
+
this.cleanRefresh();
|
|
91
|
+
}
|
|
62
92
|
this.onPropertyChange(name, $new, $old);
|
|
63
93
|
});
|
|
64
94
|
//@ts-ignore
|
|
@@ -95,6 +125,21 @@ export class BaseComponent extends React.Component {
|
|
|
95
125
|
this.cleanup.push(this.theme.subscribe(ThemeEvent.CHANGE, () => {
|
|
96
126
|
this.forceUpdate();
|
|
97
127
|
}));
|
|
128
|
+
this.cleanup.push(() => {
|
|
129
|
+
this.destroyParentListeners();
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
subscribe(event, fn) {
|
|
133
|
+
return this.notifier.subscribe(event, fn);
|
|
134
|
+
}
|
|
135
|
+
get isRTL() {
|
|
136
|
+
return this.i18nService.isRTLLocale();
|
|
137
|
+
}
|
|
138
|
+
animate(props) {
|
|
139
|
+
this.setState({
|
|
140
|
+
animationId: Date.now(),
|
|
141
|
+
animatableProps: props
|
|
142
|
+
});
|
|
98
143
|
}
|
|
99
144
|
setProp(propName, value) {
|
|
100
145
|
this.propertyProvider.set(propName, value);
|
|
@@ -105,16 +150,7 @@ export class BaseComponent extends React.Component {
|
|
|
105
150
|
setPropDefault(propName, value) {
|
|
106
151
|
this.propertyProvider.setDefault(propName, value);
|
|
107
152
|
}
|
|
108
|
-
onPropertyChange(name, $new, $old) {
|
|
109
|
-
switch (name) {
|
|
110
|
-
case 'showskeleton':
|
|
111
|
-
{
|
|
112
|
-
if (this.initialized) {
|
|
113
|
-
this.cleanRefresh();
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
153
|
+
onPropertyChange(name, $new, $old) {}
|
|
118
154
|
getDefaultStyles() {
|
|
119
155
|
return this.theme.getStyle(this.defaultClass);
|
|
120
156
|
}
|
|
@@ -193,6 +229,12 @@ export class BaseComponent extends React.Component {
|
|
|
193
229
|
this.props.listener.onComponentDestroy(this.proxy);
|
|
194
230
|
}
|
|
195
231
|
this.cleanup.forEach(f => f && f());
|
|
232
|
+
this.notifier.notify('destroy', []);
|
|
233
|
+
}
|
|
234
|
+
componentDidUpdate(prevProps, prevState, snapshot) {
|
|
235
|
+
if (this.propertyProvider.check(this.props)) {
|
|
236
|
+
this.forceUpdate();
|
|
237
|
+
}
|
|
196
238
|
}
|
|
197
239
|
invokeEventCallback(eventName, args) {
|
|
198
240
|
//@ts-ignore
|
|
@@ -214,19 +256,24 @@ export class BaseComponent extends React.Component {
|
|
|
214
256
|
this.forceUpdate();
|
|
215
257
|
}
|
|
216
258
|
cleanRefresh() {
|
|
217
|
-
this.
|
|
218
|
-
hide: true
|
|
219
|
-
}, () => {
|
|
220
|
-
setTimeout(() => {
|
|
221
|
-
this.setState({
|
|
222
|
-
hide: false
|
|
223
|
-
});
|
|
224
|
-
}, 100);
|
|
225
|
-
});
|
|
259
|
+
this.forceUpdate(() => this.notifier.notify('forceUpdate', []));
|
|
226
260
|
}
|
|
227
261
|
renderSkeleton(props) {
|
|
228
262
|
return null;
|
|
229
263
|
}
|
|
264
|
+
destroyParentListeners() {
|
|
265
|
+
this.parentListenerDestroyers.map(fn => fn());
|
|
266
|
+
}
|
|
267
|
+
setParent(parent) {
|
|
268
|
+
if (parent && this.parent !== parent) {
|
|
269
|
+
this.parent = parent;
|
|
270
|
+
this.parentListenerDestroyers = [this.parent.subscribe('forceUpdate', () => {
|
|
271
|
+
this.cleanRefresh();
|
|
272
|
+
}), this.parent.subscribe('destroy', () => {
|
|
273
|
+
this.destroyParentListeners();
|
|
274
|
+
})];
|
|
275
|
+
}
|
|
276
|
+
}
|
|
230
277
|
copyStyles(property, from, to) {
|
|
231
278
|
if (!isUndefined(from[property])) {
|
|
232
279
|
to[property] = from[property];
|
|
@@ -254,44 +301,74 @@ export class BaseComponent extends React.Component {
|
|
|
254
301
|
return /*#__PURE__*/React.createElement(FixedView, {
|
|
255
302
|
style: style,
|
|
256
303
|
theme: this.theme
|
|
257
|
-
}, this.renderWidget(props));
|
|
304
|
+
}, this.addAnimation(this.renderWidget(props)));
|
|
305
|
+
}
|
|
306
|
+
addAnimation(n) {
|
|
307
|
+
if (!this.state.animatableProps) {
|
|
308
|
+
return n;
|
|
309
|
+
}
|
|
310
|
+
return /*#__PURE__*/React.createElement(Animatable.View, _extends({
|
|
311
|
+
key: this.state.animationId
|
|
312
|
+
}, this.state.animatableProps), n);
|
|
313
|
+
}
|
|
314
|
+
setBackground() {
|
|
315
|
+
const bgStyle = this.styles.root;
|
|
316
|
+
this._background = /*#__PURE__*/React.createElement(BackgroundComponent, {
|
|
317
|
+
image: bgStyle.backgroundImage,
|
|
318
|
+
position: bgStyle.backgroundPosition,
|
|
319
|
+
size: bgStyle.backgroundSize,
|
|
320
|
+
repeat: bgStyle.backgroundRepeat,
|
|
321
|
+
resizeMode: bgStyle.backgroundResizeMode,
|
|
322
|
+
style: {
|
|
323
|
+
borderRadius: this.styles.root.borderRadius
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
delete this.styles.root['backgroundImage'];
|
|
327
|
+
delete this.styles.root['backgroundPosition'];
|
|
328
|
+
delete this.styles.root['backgroundResizeMode'];
|
|
329
|
+
delete this.styles.root['backgroundSize'];
|
|
330
|
+
delete this.styles.root['backgroundRepeat'];
|
|
258
331
|
}
|
|
259
332
|
render() {
|
|
260
|
-
WIDGET_LOGGER.info(() => `${this.props.name ?? this.constructor.name} is rendering.`);
|
|
261
333
|
const props = this.state.props;
|
|
262
334
|
if (this.state.hide || !this.isVisible() && this.hideMode === HideMode.DONOT_ADD_TO_DOM) {
|
|
263
335
|
return null;
|
|
264
336
|
}
|
|
265
337
|
this.isFixed = false;
|
|
266
|
-
return /*#__PURE__*/React.createElement(
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
338
|
+
return /*#__PURE__*/React.createElement(AssetConsumer, null, loadAsset => {
|
|
339
|
+
this.loadAsset = loadAsset;
|
|
340
|
+
return /*#__PURE__*/React.createElement(ParentContext.Consumer, null, parent => {
|
|
341
|
+
var _this$parent;
|
|
342
|
+
this.setParent(parent);
|
|
343
|
+
this._showSkeleton = ((_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : _this$parent._showSkeleton) || !!this.state.props.showskeleton;
|
|
344
|
+
return /*#__PURE__*/React.createElement(ParentContext.Provider, {
|
|
345
|
+
value: this
|
|
346
|
+
}, /*#__PURE__*/React.createElement(ThemeConsumer, null, theme => {
|
|
347
|
+
WIDGET_LOGGER.info(() => `${this.props.name || this.constructor.name} is rendering.`);
|
|
348
|
+
this.theme = theme || BASE_THEME;
|
|
349
|
+
this.styles = this.theme.mergeStyle(this.getDefaultStyles(), props.disabled ? this.theme.getStyle(this.defaultClass + '-disabled') : null, this.isRTL ? this.theme.getStyle(this.defaultClass + '-rtl') : null, props.classname && this.theme.getStyle(props.classname), props.showindevice && this.theme.getStyle('d-all-none ' + props.showindevice.map(d => `d-${d}-flex`).join(' ')), this.props.styles, {
|
|
350
|
+
root: this.styleOverrides,
|
|
351
|
+
text: this.styleOverrides
|
|
352
|
+
});
|
|
353
|
+
if (this.styles.root.hasOwnProperty('_background')) {
|
|
354
|
+
delete this.styles.root.backgroundColor;
|
|
355
|
+
}
|
|
356
|
+
if (!this.isVisible()) {
|
|
357
|
+
assign(this.styles, this.theme.getStyle('hidden'));
|
|
358
|
+
}
|
|
359
|
+
let eleToRender = this._showSkeleton && this.renderSkeleton(props);
|
|
360
|
+
if (eleToRender) {
|
|
361
|
+
return eleToRender;
|
|
362
|
+
}
|
|
363
|
+
this.setBackground();
|
|
364
|
+
this.isFixed = this.styles.root.position === 'fixed';
|
|
365
|
+
if (this.isFixed) {
|
|
366
|
+
this.styles.root.position = undefined;
|
|
367
|
+
return this.renderFixedContainer(props);
|
|
368
|
+
}
|
|
369
|
+
return this.addAnimation(this.renderWidget(this.state.props));
|
|
370
|
+
}));
|
|
371
|
+
});
|
|
295
372
|
});
|
|
296
373
|
}
|
|
297
374
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["assign","isUndefined","React","ThemeVariables","ROOT_LOGGER","deepCopy","BASE_THEME","ThemeConsumer","attachBackground","ThemeEvent","PropsProvider","assignIn","HideMode","FixedView","WIDGET_LOGGER","extend","ParentContext","createContext","BaseComponentState","defineStyles","styles","text","fontFamily","INSTANCE","baseFont","BaseProps","BaseComponent","Component","constructor","markupProps","defaultClass","defaultProps","defaultState","ADD_TO_DOM","state","propertyProvider","name","$new","$old","debug","props","onPropertyChange","get","check","proxy","Proxy","target","prop","receiver","propName","toString","has","Reflect","set","value","updateState","cleanup","push","updateStateTimeouts","forEach","v","clearTimeout","theme","subscribe","CHANGE","forceUpdate","setProp","setPropDefault","setDefault","initialized","cleanRefresh","getDefaultStyles","getStyle","reset","newPartialState","callback","destroyed","stateFn","oldState","oldProps","newState","Object","keys","k","onUpdateState","listener","onComponentChange","timeoutId","setTimeout","setState","splice","indexOf","shouldComponentUpdate","nextProps","nextState","nextContext","key","componentDidMount","onComponentInit","componentWillAttach","isFixed","hide","componentWillDetach","componentWillUnmount","onComponentDestroy","f","invokeEventCallback","eventName","args","callBack","map","a","apply","e","console","error","isVisible","show","refresh","renderSkeleton","copyStyles","property","from","to","renderFixedContainer","style","rootStyle","left","top","bottom","right","width","height","root","mergeStyle","renderWidget","render","info","hideMode","DONOT_ADD_TO_DOM","parent","_showSkeleton","showskeleton","disabled","classname","showindevice","d","join","hasOwnProperty","backgroundColor","eleToRender","widgetElement","position","undefined"],"sources":["base.component.tsx"],"sourcesContent":["import { assign, isEqual, isUndefined } from 'lodash';\nimport React, { ReactNode } from 'react';\nimport { TextStyle, ViewStyle } from 'react-native';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nimport { ROOT_LOGGER } from '@wavemaker/app-rn-runtime/core/logger';\nimport { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';\nimport BASE_THEME, { NamedStyles, AllStyle, ThemeConsumer, attachBackground, ThemeEvent } from '../styles/theme';\nimport { PropsProvider } from './props.provider';\nimport { assignIn } from 'lodash-es';\nimport { HideMode } from './if.component';\nimport { FixedView } from './fixed-view.component';\n\nexport const WIDGET_LOGGER = ROOT_LOGGER.extend('widget');\n\nexport const ParentContext = React.createContext(null as any);\n\nexport class BaseComponentState<T extends BaseProps> {\n public props = {} as T;\n public hide? = false;\n}\n\nexport type BaseStyles = NamedStyles<any> & {\n root: AllStyle,\n text: TextStyle\n}\n\nexport function defineStyles<T>(styles: T): T {\n return deepCopy({\n text: {\n fontFamily: ThemeVariables.INSTANCE.baseFont\n }\n }, styles);\n}\n\nexport interface LifecycleListener {\n onComponentChange?: (c: BaseComponent<any, any, any>) => void;\n onComponentInit?: (c: BaseComponent<any, any, any>) => void;\n onComponentDestroy?: (c: BaseComponent<any, any, any>) => void;\n}\n\nexport class BaseProps {\n id?: string = null as any;\n name?: string = null as any;\n key?: any = null as any;\n disabled? = false;\n show? = true as Boolean | String | Number;\n styles?: any = null;\n classname?: string = null as any;\n listener?: LifecycleListener = null as any;\n showindevice?: ('xs'|'sm'|'md'|'lg'|'xl'|'xxl')[] = null as any;\n showskeleton?: boolean = false;\n}\n\nexport abstract class BaseComponent<T extends BaseProps, S extends BaseComponentState<T>, L extends BaseStyles> extends React.Component<T, S> {\n public styles: L = null as any;\n public hideMode = HideMode.ADD_TO_DOM;\n private propertyProvider: PropsProvider<T>;\n public proxy: BaseComponent<T, S, L>;\n public initialized = false;\n public cleanup = [] as Function[];\n public theme = BASE_THEME;\n public updateStateTimeouts= [] as NodeJS.Timeout[];\n public parent: BaseComponent<any, any, any> = null as any;\n public destroyed = false;\n public _showSkeleton = false;\n public isFixed = false;\n\n constructor(markupProps: T, public defaultClass: string, defaultProps?: T, defaultState?: S) {\n super(markupProps);\n this.state = (defaultState || {} as S);\n this.propertyProvider = new PropsProvider<T>(\n assign({}, defaultProps),\n assign({}, markupProps),\n (name: string, $new: any, $old: any) => {\n WIDGET_LOGGER.debug(() => `${this.props.name ?? this.constructor.name}: ${name} changed from ${$old} to ${$new}`);\n this.onPropertyChange(name, $new, $old);\n });\n //@ts-ignore\n this.state.props =this.propertyProvider.get();\n this.propertyProvider.check();\n //@ts-ignore\n this.proxy = (new Proxy(this, {\n get: (target, prop, receiver): any => {\n const propName = prop.toString();\n if (this.propertyProvider.has(propName)) {\n //@ts-ignore\n return this.state.props[propName];\n }\n return Reflect.get(target, prop, receiver);\n },\n set: (target: any, prop, value: any): any => {\n const propName = prop.toString();\n if (this.propertyProvider.has(propName)) {\n // @ts-ignore\n const props = {} as any;\n props[propName] = value;\n this.updateState({\n props: props\n } as S);\n return true;\n } else {\n return Reflect.set(target, prop, value);\n }\n }\n }));\n this.cleanup.push(() => {\n this.updateStateTimeouts.forEach(v => clearTimeout(v));\n });\n this.cleanup.push(this.theme.subscribe(ThemeEvent.CHANGE, () => {\n this.forceUpdate();\n }));\n }\n\n setProp(propName: string, value: any) {\n this.propertyProvider.set(propName, value);\n this.updateState({props:{}} as S);\n }\n\n setPropDefault(propName: string, value: any) {\n this.propertyProvider.setDefault(propName, value);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'showskeleton': {\n if (this.initialized) {\n this.cleanRefresh();\n }\n }\n }\n }\n\n getDefaultStyles() {\n return this.theme.getStyle(this.defaultClass);\n }\n\n reset() {\n\n }\n\n updateState(newPartialState: S, callback?: ()=>void) {\n if (this.destroyed) {\n return;\n }\n const stateFn = (oldState: S) => {\n const oldProps = oldState.props;\n const newState = this.initialized ? assignIn({}, oldState, newPartialState) : assignIn(oldState, newPartialState);\n if (newPartialState.props) {\n Object.keys(newPartialState.props).forEach((k) => {\n //@ts-ignore\n oldProps[k] = newState.props[k];\n });\n newState.props = oldProps;\n }\n return newState;\n };\n const onUpdateState = () => {\n callback && callback();\n this.props.listener?.onComponentChange\n && this.props.listener?.onComponentChange(this);\n }\n if (!this.initialized) {\n this.state = stateFn(this.state);\n onUpdateState();\n } else {\n const timeoutId = setTimeout(() => {\n this.setState(stateFn, onUpdateState);\n this.updateStateTimeouts.splice(this.updateStateTimeouts.indexOf(timeoutId), 1);\n });\n this.updateStateTimeouts.push(timeoutId);\n }\n }\n\n shouldComponentUpdate(nextProps: T, nextState: S, nextContext: any) {\n if (this.propertyProvider.check(nextProps)) {\n return true;\n }\n for(let key in nextState) {\n if(key !== 'props' && (!(key in this.state) || nextState[key] !== this.state[key])) {\n return true;\n }\n }\n\n for(let key in this.state) {\n if(key !== 'props' && (!(key in nextState) || this.state[key] !== nextState[key])) {\n return true;\n }\n }\n return false;\n }\n\n componentDidMount() {\n if (this.props.listener && this.props.listener.onComponentInit) {\n this.props.listener.onComponentInit(this.proxy);\n }\n this.initialized = true;\n }\n\n componentWillAttach() {\n if (this.isFixed) {\n this.setState({hide: false});\n }\n }\n\n componentWillDetach() {\n if (this.isFixed) {\n this.setState({hide: true});\n }\n }\n\n componentWillUnmount() {\n this.destroyed = true;\n if (this.props.listener && this.props.listener.onComponentDestroy) {\n this.props.listener.onComponentDestroy(this.proxy);\n }\n this.cleanup.forEach(f => f && f());\n }\n\n invokeEventCallback(eventName: string, args: any[]) {\n //@ts-ignore\n const callBack: Function = this.props[eventName];\n args = args && args.map(a => (a === this) ? this.proxy : a)\n if (callBack) {\n try {\n return callBack.apply(this.proxy, args);\n } catch(e) {\n console.error(e);\n }\n }\n }\n\n isVisible() {\n const show = this.state.props.show;\n return show !== false && show !== 'false' && show !== '0' && show !== null;\n }\n\n protected abstract renderWidget(props: T): ReactNode;\n\n public refresh() {\n this.forceUpdate();\n }\n\n public cleanRefresh() {\n this.setState({\n hide: true\n }, () => {\n setTimeout(() => {\n this.setState({\n hide: false\n });\n }, 100);\n })\n }\n \n public renderSkeleton (props: T): ReactNode {\n return null;\n }\n\n\n\n copyStyles(property: string, from: any, to: any) {\n if (!isUndefined(from[property])) {\n to[property] = from[property];\n }\n }\n\n renderFixedContainer(props: T) {\n const style = {} as ViewStyle;\n const rootStyle = {\n left: 0,\n top: 0,\n bottom: 0,\n right: 0,\n width: \"100%\",\n height: \"100%\"\n } as ViewStyle;\n this.copyStyles('left', this.styles.root, style);\n this.copyStyles('top', this.styles.root, style);\n this.copyStyles('right', this.styles.root, style);\n this.copyStyles('bottom', this.styles.root, style);\n this.copyStyles('width', this.styles.root, style);\n this.copyStyles('height', this.styles.root, style);\n this.styles = this.theme.mergeStyle(this.styles, {root: rootStyle});\n return (<FixedView style={style} theme={this.theme}>{this.renderWidget(props)}</FixedView>);\n }\n \n public render(): ReactNode {\n WIDGET_LOGGER.info(() => `${this.props.name ?? this.constructor.name} is rendering.`);\n const props = this.state.props;\n if (this.state.hide || (!this.isVisible() && this.hideMode === HideMode.DONOT_ADD_TO_DOM)) {\n return null;\n }\n this.isFixed = false;\n return (<ParentContext.Consumer>\n {(parent) => {\n this.parent = parent;\n this._showSkeleton = this.parent?._showSkeleton || !!this.state.props.showskeleton;\n return (\n <ParentContext.Provider value={this}>\n <ThemeConsumer>\n {(theme) => {\n this.theme = theme || BASE_THEME;\n this.styles = this.theme.mergeStyle(\n this.getDefaultStyles(),\n props.disabled ? this.theme.getStyle(this.defaultClass + '-disabled') : null,\n props.classname && this.theme.getStyle(props.classname),\n props.showindevice && this.theme.getStyle('d-all-none ' + props.showindevice.map(d => `d-${d}-flex`).join(' ')),\n this.props.styles);\n if (this.styles.root.hasOwnProperty('_background')) {\n delete this.styles.root.backgroundColor;\n }\n if (!this.isVisible()) {\n assign(this.styles, this.theme.getStyle('hidden'))\n }\n let eleToRender = (this._showSkeleton && this.renderSkeleton(props));\n if (eleToRender) {\n return eleToRender;\n }\n let widgetElement = null;\n this.isFixed = (this.styles.root.position as any) === 'fixed';\n if (this.isFixed) {\n this.styles.root.position = undefined;\n widgetElement = this.renderFixedContainer(props);\n } else {\n widgetElement = this.renderWidget(this.state.props);\n }\n return attachBackground(widgetElement, this.styles.root);\n }}\n </ThemeConsumer>\n </ParentContext.Provider>);\n }}\n </ParentContext.Consumer>);\n }\n}\n"],"mappings":";;;AAAA,SAASA,MAAM,EAAWC,WAAW,QAAQ,QAAQ;AACrD,OAAOC,KAAK,MAAqB,OAAO;AAExC,OAAOC,cAAc,MAAM,kDAAkD;AAC7E,SAASC,WAAW,QAAQ,uCAAuC;AACnE,SAASC,QAAQ,QAAQ,sCAAsC;AAC/D,OAAOC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AQ,GAAIC,SAAS;UACtCF,aAAa,GAAG,IAAI,CAAC3B,oBAAoB,CAACpF,KAAK,CAAC;QACpD,CAAC,MAAM;UACH+G,aAAa,GAAG,IAAI,CAAChB,YAAY,CAAC,IAAI,CAACrG,KAAK,CAACM,KAAK,CAAC;QACvD;QACA,OAAOhC,gBAAgB,CAAC+I,aAAa,EAAE,IAAI,CAACnI,MAAM,CAACiH,IAAI,CAAC;MAC5D,CAAC,CACW,CACK;IAC7B,CAAC,CACoB;EACjC;AACJ"}
|
|
1
|
+
{"version":3,"names":["assign","isUndefined","React","Animatable","ThemeVariables","StyleProps","getStyleName","BackgroundComponent","injector","ROOT_LOGGER","deepCopy","BASE_THEME","ThemeConsumer","ThemeEvent","EventNotifier","PropsProvider","assignIn","HideMode","AssetConsumer","FixedView","WIDGET_LOGGER","extend","ParentContext","createContext","BaseComponentState","constructor","_defineProperty","undefined","defineStyles","styles","text","fontFamily","INSTANCE","baseFont","userSelect","BaseProps","arguments","BaseComponent","Component","markupProps","defaultClass","defaultProps","defaultState","ADD_TO_DOM","createElement","Fragment","I18nService","get","state","propertyProvider","name","$new","$old","debug","props","initialized","styleName","styleOverrides","cleanRefresh","onPropertyChange","check","proxy","Proxy","target","prop","receiver","propName","toString","has","Reflect","set","value","updateState","cleanup","push","updateStateTimeouts","forEach","v","clearTimeout","theme","subscribe","CHANGE","forceUpdate","destroyParentListeners","event","fn","notifier","isRTL","i18nService","isRTLLocale","animate","setState","animationId","Date","now","animatableProps","setProp","setPropDefault","setDefault","getDefaultStyles","getStyle","reset","newPartialState","callback","destroyed","stateFn","oldState","oldProps","newState","Object","keys","k","onUpdateState","_this$props$listener","_this$props$listener2","listener","onComponentChange","timeoutId","setTimeout","splice","indexOf","shouldComponentUpdate","nextProps","nextState","nextContext","key","componentDidMount","onComponentInit","componentWillAttach","isFixed","hide","componentWillDetach","componentWillUnmount","onComponentDestroy","f","notify","componentDidUpdate","prevProps","prevState","snapshot","invokeEventCallback","eventName","args","callBack","map","a","apply","e","console","error","isVisible","show","refresh","renderSkeleton","parentListenerDestroyers","setParent","parent","copyStyles","property","from","to","renderFixedContainer","style","rootStyle","left","top","bottom","right","width","height","root","mergeStyle","addAnimation","renderWidget","n","View","_extends","setBackground","bgStyle","_background","image","backgroundImage","position","backgroundPosition","size","backgroundSize","repeat","backgroundRepeat","resizeMode","backgroundResizeMode","borderRadius","render","hideMode","DONOT_ADD_TO_DOM","loadAsset","Consumer","_this$parent","_showSkeleton","showskeleton","Provider","info","disabled","classname","showindevice","d","join","hasOwnProperty","backgroundColor","eleToRender"],"sources":["base.component.tsx"],"sourcesContent":["import { assign, isEqual, isUndefined } from 'lodash';\nimport React, { ReactNode } from 'react';\nimport { I18nManager, Platform, TextStyle, ViewStyle } from 'react-native';\nimport { AnimatableProperties } from 'react-native-animatable';\nimport * as Animatable from 'react-native-animatable';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nimport { StyleProps, getStyleName } from '@wavemaker/app-rn-runtime/styles/style-props';\nimport { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport { ROOT_LOGGER } from '@wavemaker/app-rn-runtime/core/logger';\nimport { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';\nimport BASE_THEME, { NamedStyles, AllStyle, ThemeConsumer, ThemeEvent } from '../styles/theme';\nimport EventNotifier from './event-notifier';\nimport { PropsProvider } from './props.provider';\nimport { assignIn } from 'lodash-es';\nimport { HideMode } from './if.component';\nimport { AssetConsumer } from './asset.provider';\nimport { FixedView } from './fixed-view.component';\n\nexport const WIDGET_LOGGER = ROOT_LOGGER.extend('widget');\n\nexport const ParentContext = React.createContext(null as any);\n\nexport class BaseComponentState<T extends BaseProps> {\n public animationId?: number = 0;\n public animatableProps?: AnimatableProperties<ViewStyle> = undefined;\n public props = {} as T;\n public hide? = false;\n}\n\nexport type BaseStyles = NamedStyles<any> & {\n root: AllStyle,\n text: TextStyle & {userSelect?: 'none'| 'text'}\n}\n\nexport function defineStyles<T>(styles: T): T {\n return deepCopy({\n text: {\n fontFamily: ThemeVariables.INSTANCE.baseFont,\n userSelect: 'text'\n }\n }, styles);\n}\n\nexport interface LifecycleListener {\n onComponentChange?: (c: BaseComponent<any, any, any>) => void;\n onComponentInit?: (c: BaseComponent<any, any, any>) => void;\n onComponentDestroy?: (c: BaseComponent<any, any, any>) => void;\n}\n\nexport class BaseProps extends StyleProps {\n id?: string = null as any;\n name?: string = null as any;\n key?: any = null as any;\n disabled? = false;\n show? = true as Boolean | String | Number;\n styles?: any = null;\n classname?: string = null as any;\n listener?: LifecycleListener = null as any;\n showindevice?: ('xs'|'sm'|'md'|'lg'|'xl'|'xxl')[] = null as any;\n showskeleton?: boolean = false;\n}\n\nexport abstract class BaseComponent<T extends BaseProps, S extends BaseComponentState<T>, L extends BaseStyles> extends React.Component<T, S> {\n public styles: L = null as any;\n public hideMode = HideMode.ADD_TO_DOM;\n private propertyProvider: PropsProvider<T>;\n public proxy: BaseComponent<T, S, L>;\n public initialized = false;\n public cleanup = [] as Function[];\n public theme = BASE_THEME;\n public updateStateTimeouts= [] as NodeJS.Timeout[];\n public parent: BaseComponent<any, any, any> = null as any;\n public destroyed = false;\n public _showSkeleton = false;\n public isFixed = false;\n private notifier = new EventNotifier();\n private parentListenerDestroyers = [] as Function[];\n public _background = <></>;\n private styleOverrides = {} as any;\n public loadAsset: (path: string) => number | string = null as any;\n private i18nService = injector.I18nService.get();\n\n constructor(markupProps: T, public defaultClass: string, defaultProps?: T, defaultState?: S) {\n super(markupProps);\n this.state = (defaultState || {} as S);\n this.propertyProvider = new PropsProvider<T>(\n assign({}, defaultProps),\n assign({}, markupProps),\n (name: string, $new: any, $old: any) => {\n WIDGET_LOGGER.debug(() => `${this.props.name || this.constructor.name}: ${name} changed from ${$old} to ${$new}`);\n if (this.initialized) {\n const styleName = getStyleName(name);\n if (styleName) {\n if ($new === undefined) {\n delete this.styleOverrides[styleName];\n } else {\n this.styleOverrides[styleName] = $new;\n }\n }\n }\n if (name === 'showskeleton' && this.initialized) {\n this.cleanRefresh();\n }\n this.onPropertyChange(name, $new, $old);\n });\n //@ts-ignore\n this.state.props =this.propertyProvider.get();\n this.propertyProvider.check();\n //@ts-ignore\n this.proxy = (new Proxy(this, {\n get: (target, prop, receiver): any => {\n const propName = prop.toString();\n if (this.propertyProvider.has(propName)) {\n //@ts-ignore\n return this.state.props[propName];\n }\n return Reflect.get(target, prop, receiver);\n },\n set: (target: any, prop, value: any): any => {\n const propName = prop.toString();\n if (this.propertyProvider.has(propName)) {\n // @ts-ignore\n const props = {} as any;\n props[propName] = value;\n this.updateState({\n props: props\n } as S);\n return true;\n } else {\n return Reflect.set(target, prop, value);\n }\n }\n }));\n this.cleanup.push(() => {\n this.updateStateTimeouts.forEach(v => clearTimeout(v));\n });\n this.cleanup.push(this.theme.subscribe(ThemeEvent.CHANGE, () => {\n this.forceUpdate();\n }));\n this.cleanup.push(() => {\n this.destroyParentListeners();\n });\n }\n\n public subscribe(event: string, fn: Function) {\n return this.notifier.subscribe(event, fn);\n }\n\n public get isRTL(){\n return this.i18nService.isRTLLocale();\n }\n\n public animate(props: AnimatableProperties<ViewStyle>) {\n this.setState({\n animationId: Date.now(),\n animatableProps: props\n });\n }\n\n setProp(propName: string, value: any) {\n this.propertyProvider.set(propName, value);\n this.updateState({props:{}} as S);\n }\n\n setPropDefault(propName: string, value: any) {\n this.propertyProvider.setDefault(propName, value);\n }\n \n onPropertyChange(name: string, $new: any, $old: any) { \n }\n \n getDefaultStyles() {\n return this.theme.getStyle(this.defaultClass);\n }\n\n reset() {\n\n }\n\n updateState(newPartialState: S, callback?: ()=>void) {\n if (this.destroyed) {\n return;\n }\n const stateFn = (oldState: S) => {\n const oldProps = oldState.props;\n const newState = this.initialized ? assignIn({}, oldState, newPartialState) : assignIn(oldState, newPartialState);\n if (newPartialState.props) {\n Object.keys(newPartialState.props).forEach((k) => {\n //@ts-ignore\n oldProps[k] = newState.props[k];\n });\n newState.props = oldProps;\n }\n return newState;\n };\n const onUpdateState = () => {\n callback && callback();\n this.props.listener?.onComponentChange\n && this.props.listener?.onComponentChange(this);\n }\n if (!this.initialized) {\n this.state = stateFn(this.state);\n onUpdateState();\n } else {\n const timeoutId = setTimeout(() => {\n this.setState(stateFn, onUpdateState);\n this.updateStateTimeouts.splice(this.updateStateTimeouts.indexOf(timeoutId), 1);\n });\n this.updateStateTimeouts.push(timeoutId);\n }\n }\n\n shouldComponentUpdate(nextProps: T, nextState: S, nextContext: any) {\n if (this.propertyProvider.check(nextProps)) {\n return true;\n }\n for(let key in nextState) {\n if(key !== 'props' && (!(key in this.state) || nextState[key] !== this.state[key])) {\n return true;\n }\n }\n\n for(let key in this.state) {\n if(key !== 'props' && (!(key in nextState) || this.state[key] !== nextState[key])) {\n return true;\n }\n }\n return false;\n }\n\n componentDidMount() {\n if (this.props.listener && this.props.listener.onComponentInit) {\n this.props.listener.onComponentInit(this.proxy);\n }\n this.initialized = true;\n }\n\n componentWillAttach() {\n if (this.isFixed) {\n this.setState({hide: false});\n }\n }\n\n componentWillDetach() {\n if (this.isFixed) {\n this.setState({hide: true});\n }\n }\n\n componentWillUnmount() {\n this.destroyed = true;\n if (this.props.listener && this.props.listener.onComponentDestroy) {\n this.props.listener.onComponentDestroy(this.proxy);\n }\n this.cleanup.forEach(f => f && f());\n this.notifier.notify('destroy', []);\n }\n \n componentDidUpdate(prevProps: Readonly<T>, prevState: Readonly<S>, snapshot?: any): void {\n if (this.propertyProvider.check(this.props)) {\n this.forceUpdate();\n }\n }\n\n invokeEventCallback(eventName: string, args: any[]) {\n //@ts-ignore\n const callBack: Function = this.props[eventName];\n args = args && args.map(a => (a === this) ? this.proxy : a)\n if (callBack) {\n try {\n return callBack.apply(this.proxy, args);\n } catch(e) {\n console.error(e);\n }\n }\n }\n\n isVisible() {\n const show = this.state.props.show;\n return show !== false && show !== 'false' && show !== '0' && show !== null;\n }\n\n protected abstract renderWidget(props: T): ReactNode;\n\n public refresh() {\n this.forceUpdate();\n }\n\n public cleanRefresh() {\n this.forceUpdate(() => this.notifier.notify('forceUpdate', []));\n }\n \n public renderSkeleton (props: T): ReactNode {\n return null;\n }\n\n public destroyParentListeners() {\n this.parentListenerDestroyers.map(fn => fn());\n }\n\n private setParent(parent: BaseComponent<any, any, any>) {\n if (parent && this.parent !== parent) {\n this.parent = parent;\n this.parentListenerDestroyers = [\n this.parent.subscribe('forceUpdate', () => {\n this.cleanRefresh();\n }),\n this.parent.subscribe('destroy', () => {\n this.destroyParentListeners();\n })\n ];\n }\n }\n\n copyStyles(property: string, from: any, to: any) {\n if (!isUndefined(from[property])) {\n to[property] = from[property];\n }\n }\n\n renderFixedContainer(props: T) {\n const style = {} as ViewStyle;\n const rootStyle = {\n left: 0,\n top: 0,\n bottom: 0,\n right: 0,\n width: \"100%\",\n height: \"100%\"\n } as ViewStyle;\n this.copyStyles('left', this.styles.root, style);\n this.copyStyles('top', this.styles.root, style);\n this.copyStyles('right', this.styles.root, style);\n this.copyStyles('bottom', this.styles.root, style);\n this.copyStyles('width', this.styles.root, style);\n this.copyStyles('height', this.styles.root, style);\n this.styles = this.theme.mergeStyle(this.styles, {root: rootStyle});\n return (<FixedView style={style} theme={this.theme}>{this.addAnimation(this.renderWidget(props))}</FixedView>);\n }\n\n private addAnimation(n: ReactNode) {\n if (!this.state.animatableProps) {\n return n;\n }\n return (<Animatable.View key={this.state.animationId} {...this.state.animatableProps}>{n}</Animatable.View>);\n }\n \n private setBackground() {\n const bgStyle = this.styles.root as any;\n this._background = (\n <BackgroundComponent \n image={bgStyle.backgroundImage}\n position={bgStyle.backgroundPosition}\n size={bgStyle.backgroundSize}\n repeat={bgStyle.backgroundRepeat}\n resizeMode={bgStyle.backgroundResizeMode}\n style={{borderRadius: this.styles.root.borderRadius}}>\n </BackgroundComponent>\n );\n delete (this.styles.root as any)['backgroundImage'];\n delete (this.styles.root as any)['backgroundPosition'];\n delete (this.styles.root as any)['backgroundResizeMode'];\n delete (this.styles.root as any)['backgroundSize'];\n delete (this.styles.root as any)['backgroundRepeat'];\n }\n \n public render(): ReactNode {\n const props = this.state.props;\n if (this.state.hide || (!this.isVisible() && this.hideMode === HideMode.DONOT_ADD_TO_DOM)) {\n return null;\n }\n this.isFixed = false;\n return (<AssetConsumer>\n {(loadAsset) => {\n this.loadAsset = loadAsset;\n return (<ParentContext.Consumer>\n {(parent) => {\n this.setParent(parent);\n this._showSkeleton = this.parent?._showSkeleton || !!this.state.props.showskeleton;\n return (\n <ParentContext.Provider value={this}>\n <ThemeConsumer>\n {(theme) => {\n WIDGET_LOGGER.info(() => `${this.props.name || this.constructor.name} is rendering.`);\n this.theme = theme || BASE_THEME;\n this.styles = this.theme.mergeStyle(\n this.getDefaultStyles(),\n props.disabled ? this.theme.getStyle(this.defaultClass + '-disabled') : null,\n this.isRTL ? this.theme.getStyle(this.defaultClass + '-rtl') : null,\n props.classname && this.theme.getStyle(props.classname),\n props.showindevice && this.theme.getStyle('d-all-none ' + props.showindevice.map(d => `d-${d}-flex`).join(' ')),\n this.props.styles,\n {\n root: this.styleOverrides,\n text: this.styleOverrides\n });\n if (this.styles.root.hasOwnProperty('_background')) {\n delete this.styles.root.backgroundColor;\n }\n if (!this.isVisible()) {\n assign(this.styles, this.theme.getStyle('hidden'))\n }\n let eleToRender = (this._showSkeleton && this.renderSkeleton(props));\n if (eleToRender) {\n return eleToRender;\n }\n this.setBackground();\n this.isFixed = (this.styles.root.position as any) === 'fixed';\n if (this.isFixed) {\n this.styles.root.position = undefined;\n return this.renderFixedContainer(props);\n }\n return this.addAnimation(this.renderWidget(this.state.props));\n }}\n </ThemeConsumer>\n </ParentContext.Provider>);\n }}\n </ParentContext.Consumer>);\n }}\n </AssetConsumer>);\n }\n}\n"],"mappings":";;;;AAAA,SAASA,MAAM,EAAWC,WAAW,QAAQ,QAAQ;AACrD,OAAOC,KAAK,MAAqB,OAAO;AAGxC,OAAO,KAAKC,UAAU,MAAM,yBAAyB;AACrD,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AACoC,cAAc,CAAC,aAAa,CAAC,EAAE;YAClD,OAAO,IAAI,CAACjL,MAAM,CAAC6I,IAAI,CAACqC,eAAe;UACzC;UACA,IAAI,CAAC,IAAI,CAACzD,SAAS,CAAC,CAAC,EAAE;YACnBtJ,MAAM,CAAC,IAAI,CAAC6B,MAAM,EAAE,IAAI,CAACkD,KAAK,CAACqB,QAAQ,CAAC,QAAQ,CAAC,CAAC;UACtD;UACA,IAAI4G,WAAW,GAAI,IAAI,CAACX,aAAa,IAAI,IAAI,CAAC5C,cAAc,CAACnG,KAAK,CAAE;UACpE,IAAI0J,WAAW,EAAE;YACb,OAAOA,WAAW;UACtB;UACA,IAAI,CAAC/B,aAAa,CAAC,CAAC;UACpB,IAAI,CAAChD,OAAO,GAAI,IAAI,CAACpG,MAAM,CAAC6I,IAAI,CAACY,QAAQ,KAAa,OAAO;UAC7D,IAAI,IAAI,CAACrD,OAAO,EAAE;YACd,IAAI,CAACpG,MAAM,CAAC6I,IAAI,CAACY,QAAQ,GAAI3J,SAAS;YACtC,OAAO,IAAI,CAACsI,oBAAoB,CAAC3G,KAAK,CAAC;UAC3C;UACA,OAAO,IAAI,CAACsH,YAAY,CAAC,IAAI,CAACC,YAAY,CAAC,IAAI,CAAC7H,KAAK,CAACM,KAAK,CAAC,CAAC;QACjE,CACW,CACK,CAAC;MAC7B,CACoB,CAAC;IAC7B,CACe,CAAC;EACpB;AACJ"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
import React, { useCallback, useRef, useState } from 'react';
|
|
3
|
+
import { Platform, TextInput } from 'react-native';
|
|
4
|
+
export const WMTextInput = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
5
|
+
const [selectRange, setSelectRange] = useState(null);
|
|
6
|
+
const value = useRef(props.value || '');
|
|
7
|
+
const onSelectionChange = useCallback(e => {
|
|
8
|
+
var _e$nativeEvent;
|
|
9
|
+
if (Platform.OS !== 'android') {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const selection = e === null || e === void 0 || (_e$nativeEvent = e.nativeEvent) === null || _e$nativeEvent === void 0 ? void 0 : _e$nativeEvent.selection;
|
|
13
|
+
if (!props.allowContentSelection && selection && selection.end - selection.start > 0) {
|
|
14
|
+
setSelectRange({
|
|
15
|
+
start: value.current.length + 2,
|
|
16
|
+
end: value.current.length + 2
|
|
17
|
+
});
|
|
18
|
+
} else if (selectRange && selectRange.end > 0) {
|
|
19
|
+
setSelectRange(null);
|
|
20
|
+
}
|
|
21
|
+
}, [props.allowContentSelection, value.current]);
|
|
22
|
+
const onChangeText = useCallback(text => {
|
|
23
|
+
value.current = text;
|
|
24
|
+
}, []);
|
|
25
|
+
return /*#__PURE__*/React.createElement(TextInput, _extends({}, props, {
|
|
26
|
+
ref: ref,
|
|
27
|
+
selection: selectRange,
|
|
28
|
+
onSelectionChange: onSelectionChange,
|
|
29
|
+
caretHidden: !!(selectRange !== null && selectRange !== void 0 && selectRange.end),
|
|
30
|
+
onChangeText: text => {
|
|
31
|
+
props.onChangeText && props.onChangeText(text);
|
|
32
|
+
onChangeText(text);
|
|
33
|
+
},
|
|
34
|
+
contextMenuHidden: !props.allowContentSelection
|
|
35
|
+
}));
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=textinput.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useCallback","useRef","useState","Platform","TextInput","WMTextInput","forwardRef","props","ref","selectRange","setSelectRange","value","onSelectionChange","e","_e$nativeEvent","OS","selection","nativeEvent","allowContentSelection","end","start","current","length","onChangeText","text","createElement","_extends","caretHidden","contextMenuHidden"],"sources":["textinput.component.tsx"],"sourcesContent":["import React, { ForwardedRef, useCallback, useRef, useState } from 'react';\nimport { Platform, TextInput, TextInputProps } from 'react-native';\n\ninterface SelectRange {\n start: number,\n end: number\n}\n\nexport const WMTextInput = React.forwardRef((props: (TextInputProps & {allowContentSelection: boolean}), ref: ForwardedRef<TextInput>) => {\n const [selectRange, setSelectRange] = useState<SelectRange>(null as any);\n const value = useRef(props.value || '');\n const onSelectionChange = useCallback((e: any) => {\n if (Platform.OS !== 'android') {\n return;\n }\n const selection = e?.nativeEvent?.selection;\n if (!props.allowContentSelection\n && selection\n && selection.end - selection.start > 0) {\n setSelectRange({\n start: value.current.length + 2,\n end: value.current.length + 2\n });\n } else if (selectRange && selectRange.end > 0){\n setSelectRange(null as any);\n }\n }, [props.allowContentSelection, value.current]);\n const onChangeText = useCallback((text: string) => {\n value.current = text;\n }, []);\n return (\n <TextInput \n {...props}\n ref={ref}\n selection={selectRange}\n onSelectionChange={onSelectionChange}\n caretHidden={!!selectRange?.end}\n onChangeText={(text) => {\n props.onChangeText && props.onChangeText(text);\n onChangeText(text);\n }}\n contextMenuHidden={!props.allowContentSelection}> \n </TextInput>\n );\n});"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,WAAW,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC1E,SAASC,QAAQ,EAAEC,SAAS,QAAwB,cAAc;AAOlE,OAAO,MAAMC,WAAW,gBAAGN,KAAK,CAACO,UAAU,CAAC,CAACC,KAA0D,EAAEC,GAA4B,KAAK;EACtI,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGR,QAAQ,CAAc,IAAW,CAAC;EACxE,MAAMS,KAAK,GAAGV,MAAM,CAACM,KAAK,CAACI,KAAK,IAAI,EAAE,CAAC;EACvC,MAAMC,iBAAiB,GAAGZ,WAAW,CAAEa,CAAM,IAAK;IAAA,IAAAC,cAAA;IAC9C,IAAIX,QAAQ,CAACY,EAAE,KAAK,SAAS,EAAE;MAC3B;IACJ;IACA,MAAMC,SAAS,GAAGH,CAAC,aAADA,CAAC,gBAAAC,cAAA,GAADD,CAAC,CAAEI,WAAW,cAAAH,cAAA,uBAAdA,cAAA,CAAgBE,SAAS;IAC3C,IAAI,CAACT,KAAK,CAACW,qBAAqB,IACzBF,SAAS,IACTA,SAAS,CAACG,GAAG,GAAGH,SAAS,CAACI,KAAK,GAAG,CAAC,EAAE;MACxCV,cAAc,CAAC;QACXU,KAAK,EAAET,KAAK,CAACU,OAAO,CAACC,MAAM,GAAG,CAAC;QAC/BH,GAAG,EAAER,KAAK,CAACU,OAAO,CAACC,MAAM,GAAG;MAChC,CAAC,CAAC;IACN,CAAC,MAAM,IAAIb,WAAW,IAAIA,WAAW,CAACU,GAAG,GAAG,CAAC,EAAC;MAC1CT,cAAc,CAAC,IAAW,CAAC;IAC/B;EACJ,CAAC,EAAE,CAACH,KAAK,CAACW,qBAAqB,EAAEP,KAAK,CAACU,OAAO,CAAC,CAAC;EAChD,MAAME,YAAY,GAAGvB,WAAW,CAAEwB,IAAY,IAAK;IAC/Cb,KAAK,CAACU,OAAO,GAAGG,IAAI;EACxB,CAAC,EAAE,EAAE,CAAC;EACN,oBACIzB,KAAA,CAAA0B,aAAA,CAACrB,SAAS,EAAAsB,QAAA,KACFnB,KAAK;IACTC,GAAG,EAAEA,GAAI;IACTQ,SAAS,EAAEP,WAAY;IACvBG,iBAAiB,EAAEA,iBAAkB;IACrCe,WAAW,EAAE,CAAC,EAAClB,WAAW,aAAXA,WAAW,eAAXA,WAAW,CAAEU,GAAG,CAAC;IAChCI,YAAY,EAAGC,IAAI,IAAK;MACpBjB,KAAK,CAACgB,YAAY,IAAIhB,KAAK,CAACgB,YAAY,CAACC,IAAI,CAAC;MAC9CD,YAAY,CAACC,IAAI,CAAC;IACtB,CAAE;IACFI,iBAAiB,EAAE,CAACrB,KAAK,CAACW;EAAsB,EACzC,CAAC;AAEpB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","CameraContext","createContext","CameraProvider","Provider","CameraConsumer","Consumer"],"sources":["camera-service.ts"],"sourcesContent":["import { Input } from '@wavemaker/app-rn-runtime/variables/device/operation.provider';\nimport React from 'react';\n\nexport interface CameraInput extends Input {\n allowImageEdit: boolean;\n imageQuality: number;\n imageEncodingType: string;\n imageTargetWidth: number;\n imageTargetHeight: number;\n}\n\nexport interface CameraService {\n captureImage: (params: CameraInput) => any\n captureVideo: () => any;\n}\nconst CameraContext = React.createContext<CameraService>(null as any);\n\nexport const CameraProvider = CameraContext.Provider;\nexport const CameraConsumer = CameraContext.Consumer;\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AAczB,MAAMC,aAAa,gBAAGD,KAAK,CAACE,aAAa,CAAgB,
|
|
1
|
+
{"version":3,"names":["React","CameraContext","createContext","CameraProvider","Provider","CameraConsumer","Consumer"],"sources":["camera-service.ts"],"sourcesContent":["import { Input } from '@wavemaker/app-rn-runtime/variables/device/operation.provider';\nimport React from 'react';\n\nexport interface CameraInput extends Input {\n allowImageEdit: boolean;\n imageQuality: number;\n imageEncodingType: string;\n imageTargetWidth: number;\n imageTargetHeight: number;\n}\n\nexport interface CameraService {\n captureImage: (params: CameraInput) => any\n captureVideo: () => any;\n}\nconst CameraContext = React.createContext<CameraService>(null as any);\n\nexport const CameraProvider = CameraContext.Provider;\nexport const CameraConsumer = CameraContext.Consumer;\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AAczB,MAAMC,aAAa,gBAAGD,KAAK,CAACE,aAAa,CAAgB,IAAW,CAAC;AAErE,OAAO,MAAMC,cAAc,GAAGF,aAAa,CAACG,QAAQ;AACpD,OAAO,MAAMC,cAAc,GAAGJ,aAAa,CAACK,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ScanContext","createContext","ScanProvider","Provider","ScanConsumer","Consumer"],"sources":["scan-service.ts"],"sourcesContent":["import {ScanInput} from \"@wavemaker/app-rn-runtime/variables/device/scan/scan.operation\";\nimport React from 'react';\n\nexport interface ScanService {\n scanBarcode: (params: ScanInput) => any;\n}\nconst ScanContext = React.createContext<ScanService>(null as any);\n\nexport const ScanProvider = ScanContext.Provider;\nexport const ScanConsumer = ScanContext.Consumer;\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AAKzB,MAAMC,WAAW,gBAAGD,KAAK,CAACE,aAAa,CAAc,
|
|
1
|
+
{"version":3,"names":["React","ScanContext","createContext","ScanProvider","Provider","ScanConsumer","Consumer"],"sources":["scan-service.ts"],"sourcesContent":["import {ScanInput} from \"@wavemaker/app-rn-runtime/variables/device/scan/scan.operation\";\nimport React from 'react';\n\nexport interface ScanService {\n scanBarcode: (params: ScanInput) => any;\n}\nconst ScanContext = React.createContext<ScanService>(null as any);\n\nexport const ScanProvider = ScanContext.Provider;\nexport const ScanConsumer = ScanContext.Consumer;\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AAKzB,MAAMC,WAAW,gBAAGD,KAAK,CAACE,aAAa,CAAc,IAAW,CAAC;AAEjE,OAAO,MAAMC,YAAY,GAAGF,WAAW,CAACG,QAAQ;AAChD,OAAO,MAAMC,YAAY,GAAGJ,WAAW,CAACK,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","DisplayContext","createContext","DisplayProvider","Provider","DisplayConsumer","Consumer"],"sources":["display.manager.ts"],"sourcesContent":["import React from 'react';\n\nexport interface DisplayOptions {\n content: React.ReactNode;\n onDestroy?: () => any;\n}\n\nexport interface DisplayManager {\n show: (options: DisplayOptions) => any;\n destroy: () => any;\n}\n\nconst DisplayContext = React.createContext<DisplayManager>(null as any);\n\nexport const DisplayProvider = DisplayContext.Provider;\nexport const DisplayConsumer = DisplayContext.Consumer;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAYzB,MAAMC,cAAc,gBAAGD,KAAK,CAACE,aAAa,CAAiB,
|
|
1
|
+
{"version":3,"names":["React","DisplayContext","createContext","DisplayProvider","Provider","DisplayConsumer","Consumer"],"sources":["display.manager.ts"],"sourcesContent":["import React from 'react';\n\nexport interface DisplayOptions {\n content: React.ReactNode;\n onDestroy?: () => any;\n}\n\nexport interface DisplayManager {\n show: (options: DisplayOptions) => any;\n destroy: () => any;\n}\n\nconst DisplayContext = React.createContext<DisplayManager>(null as any);\n\nexport const DisplayProvider = DisplayContext.Provider;\nexport const DisplayConsumer = DisplayContext.Consumer;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAYzB,MAAMC,cAAc,gBAAGD,KAAK,CAACE,aAAa,CAAiB,IAAW,CAAC;AAEvE,OAAO,MAAMC,eAAe,GAAGF,cAAc,CAACG,QAAQ;AACtD,OAAO,MAAMC,eAAe,GAAGJ,cAAc,CAACK,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["EventNotifier","notify","event","args","listeners","forEach","l","apply","subscribe","fn","push","eventListeners","i","findIndex","fni","splice"],"sources":["event-notifier.ts"],"sourcesContent":["export default class EventNotifier {\n private listeners = {} as any;\n\n public notify(event: string, args: any[]) {\n if (this.listeners[event]) {\n this.listeners[event].forEach((l: Function) => {\n l && l.apply(null, args);\n });\n }\n }\n\n public subscribe(event: string, fn: Function) {\n this.listeners[event] = this.listeners[event] || [];\n this.listeners[event].push(fn);\n return () => {\n const eventListeners = this.listeners[event];\n const i = eventListeners.findIndex((fni: Function) => fni === fn);\n eventListeners.splice(i, 1);\n };\n }\n}"],"mappings":";;;AAAA,eAAe,MAAMA,aAAa,CAAC;
|
|
1
|
+
{"version":3,"names":["EventNotifier","constructor","_defineProperty","notify","event","args","listeners","forEach","l","apply","subscribe","fn","push","eventListeners","i","findIndex","fni","splice"],"sources":["event-notifier.ts"],"sourcesContent":["export default class EventNotifier {\n private listeners = {} as any;\n\n public notify(event: string, args: any[]) {\n if (this.listeners[event]) {\n this.listeners[event].forEach((l: Function) => {\n l && l.apply(null, args);\n });\n }\n }\n\n public subscribe(event: string, fn: Function) {\n this.listeners[event] = this.listeners[event] || [];\n this.listeners[event].push(fn);\n return () => {\n const eventListeners = this.listeners[event];\n const i = eventListeners.findIndex((fni: Function) => fni === fn);\n eventListeners.splice(i, 1);\n };\n }\n}"],"mappings":";;;AAAA,eAAe,MAAMA,aAAa,CAAC;EAAAC,YAAA;IAAAC,eAAA,oBACX,CAAC,CAAC;EAAA;EAEfC,MAAMA,CAACC,KAAa,EAAEC,IAAW,EAAE;IACtC,IAAI,IAAI,CAACC,SAAS,CAACF,KAAK,CAAC,EAAE;MACvB,IAAI,CAACE,SAAS,CAACF,KAAK,CAAC,CAACG,OAAO,CAAEC,CAAW,IAAK;QAC3CA,CAAC,IAAIA,CAAC,CAACC,KAAK,CAAC,IAAI,EAAEJ,IAAI,CAAC;MAC5B,CAAC,CAAC;IACN;EACJ;EAEOK,SAASA,CAACN,KAAa,EAAEO,EAAY,EAAE;IAC1C,IAAI,CAACL,SAAS,CAACF,KAAK,CAAC,GAAG,IAAI,CAACE,SAAS,CAACF,KAAK,CAAC,IAAI,EAAE;IACnD,IAAI,CAACE,SAAS,CAACF,KAAK,CAAC,CAACQ,IAAI,CAACD,EAAE,CAAC;IAC9B,OAAO,MAAM;MACT,MAAME,cAAc,GAAG,IAAI,CAACP,SAAS,CAACF,KAAK,CAAC;MAC5C,MAAMU,CAAC,GAAGD,cAAc,CAACE,SAAS,CAAEC,GAAa,IAAKA,GAAG,KAAKL,EAAE,CAAC;MACjEE,cAAc,CAACI,MAAM,CAACH,CAAC,EAAE,CAAC,CAAC;IAC/B,CAAC;EACL;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","ThemeProvider","FixedViewContext","createContext","FixedView","Component","constructor","props","counter","componentWillUnmount","container","remove","render","cachedComponent","usememo","show","add","theme","
|
|
1
|
+
{"version":3,"names":["React","View","ThemeProvider","FixedViewContext","createContext","FixedView","Component","constructor","props","_defineProperty","counter","componentWillUnmount","container","remove","render","cachedComponent","usememo","createElement","Consumer","show","add","value","theme","key","id","style","position","children","Fragment","Date","now","FixedViewContainer","arguments","Map","c","n","set","setTimeout","setState","delete","Provider","Array","from","values"],"sources":["fixed-view.component.tsx"],"sourcesContent":["\nimport React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { Theme, ThemeProvider } from \"../styles/theme\";\n\nconst FixedViewContext = React.createContext<FixedViewContainer>(null as any);\n\nexport interface FixedViewProps {\n style?: ViewStyle,\n show?: boolean;\n theme: Theme;\n usememo?: boolean;\n children?: any;\n}\n\nexport class FixedView extends React.Component<FixedViewProps> {\n static defaultProps = {\n show: true\n };\n static counter = Date.now();\n container: FixedViewContainer = null as any;\n cachedComponent: React.ReactNode;\n id = FixedView.counter++;\n\n constructor(props: FixedViewProps) {\n super(props);\n }\n\n componentWillUnmount() {\n this.container.remove(this);\n }\n\n render() {\n this.cachedComponent = (this.props.usememo === true && this.cachedComponent ) || (<FixedViewContext.Consumer>\n {(container) => {\n this.container = container;\n if (this.props.show) {\n container.add(this, (\n <ThemeProvider value={this.props.theme} key={this.id}>\n <View style={[\n {position: 'absolute'},\n this.props.style]}>\n {this.props.children}\n </View>\n </ThemeProvider>\n ));\n } else {\n container.remove(this);\n }\n return <></>;\n }}\n </FixedViewContext.Consumer>);\n return this.cachedComponent;\n }\n}\n\nexport class FixedViewContainer extends React.Component {\n children: Map<FixedView, React.ReactNode> = new Map();\n id = 0;\n\n add(c: FixedView, n : React.ReactNode) {\n this.children.set(c, n);\n setTimeout(() => this.setState({id: ++this.id}));\n }\n\n remove(c: FixedView) {\n this.children.delete(c);\n setTimeout(() => this.setState({id: ++this.id}));\n }\n\n render() {\n return (\n <FixedViewContext.Provider value={this}>\n {(this.props as any).children}\n {Array.from(this.children.values())}\n </FixedViewContext.Provider>\n ) ;\n }\n};"],"mappings":";;;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAmB,cAAc;AAC9C,SAAgBC,aAAa,QAAQ,iBAAiB;AAEtD,MAAMC,gBAAgB,gBAAGH,KAAK,CAACI,aAAa,CAAq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C;AAAAV,eAAA,CAHQJ,SAAS,aAIDwB,IAAI,CAACC,GAAG,CAAC,CAAC;AAqC/B,OAAO,MAAMC,kBAAkB,SAAS/B,KAAK,CAACM,SAAS,CAAC;EAAAC,YAAA;IAAA,SAAAyB,SAAA;IAAAvB,eAAA,mBACR,IAAIwB,GAAG,CAAC,CAAC;IAAAxB,eAAA,aAChD,CAAC;EAAA;EAENW,GAAGA,CAACc,CAAY,EAAEC,CAAmB,EAAE;IACnC,IAAI,CAACR,QAAQ,CAACS,GAAG,CAACF,CAAC,EAAEC,CAAC,CAAC;IACvBE,UAAU,CAAC,MAAM,IAAI,CAACC,QAAQ,CAAC;MAACd,EAAE,EAAE,EAAE,IAAI,CAACA;IAAE,CAAC,CAAC,CAAC;EACpD;EAEAX,MAAMA,CAACqB,CAAY,EAAE;IACjB,IAAI,CAACP,QAAQ,CAACY,MAAM,CAACL,CAAC,CAAC;IACvBG,UAAU,CAAC,MAAM,IAAI,CAACC,QAAQ,CAAC;MAACd,EAAE,EAAE,EAAE,IAAI,CAACA;IAAE,CAAC,CAAC,CAAC;EACpD;EAEAV,MAAMA,CAAA,EAAG;IACL,oBACId,KAAA,CAAAiB,aAAA,CAACd,gBAAgB,CAACqC,QAAQ;MAACnB,KAAK,EAAE;IAAK,GACjC,IAAI,CAACb,KAAK,CAASmB,QAAQ,EAC5Bc,KAAK,CAACC,IAAI,CAAC,IAAI,CAACf,QAAQ,CAACgB,MAAM,CAAC,CAAC,CACX,CAAC;EAEpC;AACJ;AAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["parseInt","moment","CURRENCY_INFO","DateToStringFormatter","format","input","getTime","replace","_moment","isValid","toString","PrependFormatter","prefix","undefined","AppendFormatter","suffix","NumberToStringFormatter","fractionSize","isNaN","toFixed","toLocaleLowerCase","CurrencyFormatter","data","currencySymbol","fracSize","_currencySymbol","symbol","_val","isNegativeNumber","startsWith","TimeFromNowFormatter","timestamp","fromNow","StringToNumberFormatter","Map"],"sources":["formatters.ts"],"sourcesContent":["import { parseInt } from 'lodash';\nimport moment from 'moment';\nimport { CURRENCY_INFO, Currency } from './constants/currency-constants';\n\nexport interface Formatter {\n format: (input: any, ...params: any) => any;\n}\n\nexport class DateToStringFormatter implements Formatter {\n \n public format(input: Date, format: string): string {\n if (!input) {\n return '';\n }\n if (format === 'timestamp') {\n return input.getTime() + '';\n }\n format = format.replace(/d/g, 'D');\n const _moment = moment(input, true);\n return _moment.isValid() ? _moment.format(format) : input.toString();\n }\n}\n\nexport class PrependFormatter implements Formatter {\n \n public format(input: any, prefix: string): string {\n return (prefix || '') + (input !== null || input != undefined ? input : '');\n }\n}\n\nexport class AppendFormatter implements Formatter {\n \n public format(input: any, suffix: string): string {\n return (input !== null || input != undefined ? input : '') + (suffix || '');\n }\n}\n\nexport class NumberToStringFormatter implements Formatter {\n \n public format(input: number, fractionSize: number): string {\n return isNaN(input) ? '': input.toFixed(fractionSize).toLocaleLowerCase();\n }\n}\n\nexport class CurrencyFormatter implements Formatter {\n \n public format(data: number, currencySymbol: string, fracSize: number) {\n const _currencySymbol = ((((CURRENCY_INFO as any)[currencySymbol]) || {}) as Currency).symbol || currencySymbol || '';\n let _val = new NumberToStringFormatter().format(data, fracSize);\n const isNegativeNumber = _val.startsWith('-');\n if (isNegativeNumber) {\n _val = _val.replace('-','');\n }\n return _val ? isNegativeNumber ? '-'+ _currencySymbol +_val :_currencySymbol + _val : '';\n }\n}\n\nexport class TimeFromNowFormatter implements Formatter {\n public format(timestamp: Date) {\n return timestamp ? moment(timestamp).fromNow() : undefined;\n }\n}\n\nexport class StringToNumberFormatter implements Formatter {\n public format(input: string) {\n return parseInt(input);\n }\n}\n\nexport default new Map<string, Formatter>([\n ['numberToString', new NumberToStringFormatter()],\n ['prefix', new PrependFormatter()],\n ['suffix', new AppendFormatter()],\n ['stringToNumber', new StringToNumberFormatter()],\n ['timeFromNow', new TimeFromNowFormatter()],\n ['toDate', new DateToStringFormatter()],\n ['toCurrency', new CurrencyFormatter()]\n]);"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,QAAQ;AACjC,OAAOC,MAAM,MAAM,QAAQ;AAC3B,SAASC,aAAa,QAAkB,gCAAgC;AAMxE,OAAO,MAAMC,qBAAqB,CAAsB;EAE7CC,
|
|
1
|
+
{"version":3,"names":["parseInt","moment","CURRENCY_INFO","DateToStringFormatter","format","input","getTime","replace","_moment","isValid","toString","PrependFormatter","prefix","undefined","AppendFormatter","suffix","NumberToStringFormatter","fractionSize","isNaN","toFixed","toLocaleLowerCase","CurrencyFormatter","data","currencySymbol","fracSize","_currencySymbol","symbol","_val","isNegativeNumber","startsWith","TimeFromNowFormatter","timestamp","fromNow","StringToNumberFormatter","Map"],"sources":["formatters.ts"],"sourcesContent":["import { parseInt } from 'lodash';\nimport moment from 'moment';\nimport { CURRENCY_INFO, Currency } from './constants/currency-constants';\n\nexport interface Formatter {\n format: (input: any, ...params: any) => any;\n}\n\nexport class DateToStringFormatter implements Formatter {\n \n public format(input: Date, format: string): string {\n if (!input) {\n return '';\n }\n if (format === 'timestamp') {\n return input.getTime() + '';\n }\n format = format.replace(/d/g, 'D');\n const _moment = moment(input, true);\n return _moment.isValid() ? _moment.format(format) : input.toString();\n }\n}\n\nexport class PrependFormatter implements Formatter {\n \n public format(input: any, prefix: string): string {\n return (prefix || '') + (input !== null || input != undefined ? input : '');\n }\n}\n\nexport class AppendFormatter implements Formatter {\n \n public format(input: any, suffix: string): string {\n return (input !== null || input != undefined ? input : '') + (suffix || '');\n }\n}\n\nexport class NumberToStringFormatter implements Formatter {\n \n public format(input: number, fractionSize: number): string {\n return isNaN(input) ? '': input.toFixed(fractionSize).toLocaleLowerCase();\n }\n}\n\nexport class CurrencyFormatter implements Formatter {\n \n public format(data: number, currencySymbol: string, fracSize: number) {\n const _currencySymbol = ((((CURRENCY_INFO as any)[currencySymbol]) || {}) as Currency).symbol || currencySymbol || '';\n let _val = new NumberToStringFormatter().format(data, fracSize);\n const isNegativeNumber = _val.startsWith('-');\n if (isNegativeNumber) {\n _val = _val.replace('-','');\n }\n return _val ? isNegativeNumber ? '-'+ _currencySymbol +_val :_currencySymbol + _val : '';\n }\n}\n\nexport class TimeFromNowFormatter implements Formatter {\n public format(timestamp: Date) {\n return timestamp ? moment(timestamp).fromNow() : undefined;\n }\n}\n\nexport class StringToNumberFormatter implements Formatter {\n public format(input: string) {\n return parseInt(input);\n }\n}\n\nexport default new Map<string, Formatter>([\n ['numberToString', new NumberToStringFormatter()],\n ['prefix', new PrependFormatter()],\n ['suffix', new AppendFormatter()],\n ['stringToNumber', new StringToNumberFormatter()],\n ['timeFromNow', new TimeFromNowFormatter()],\n ['toDate', new DateToStringFormatter()],\n ['toCurrency', new CurrencyFormatter()]\n]);"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,QAAQ;AACjC,OAAOC,MAAM,MAAM,QAAQ;AAC3B,SAASC,aAAa,QAAkB,gCAAgC;AAMxE,OAAO,MAAMC,qBAAqB,CAAsB;EAE7CC,MAAMA,CAACC,KAAW,EAAED,MAAc,EAAU;IAC/C,IAAI,CAACC,KAAK,EAAE;MACR,OAAO,EAAE;IACb;IACA,IAAID,MAAM,KAAK,WAAW,EAAE;MACxB,OAAOC,KAAK,CAACC,OAAO,CAAC,CAAC,GAAG,EAAE;IAC/B;IACAF,MAAM,GAAGA,MAAM,CAACG,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;IAClC,MAAMC,OAAO,GAAGP,MAAM,CAACI,KAAK,EAAE,IAAI,CAAC;IACnC,OAAOG,OAAO,CAACC,OAAO,CAAC,CAAC,GAAGD,OAAO,CAACJ,MAAM,CAACA,MAAM,CAAC,GAAGC,KAAK,CAACK,QAAQ,CAAC,CAAC;EACxE;AACJ;AAEA,OAAO,MAAMC,gBAAgB,CAAsB;EAExCP,MAAMA,CAACC,KAAU,EAAEO,MAAc,EAAU;IAC9C,OAAO,CAACA,MAAM,IAAI,EAAE,KAAKP,KAAK,KAAK,IAAI,IAAIA,KAAK,I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,OAAO,CAAC,CAAC,GAAGnB,SAAS;EAC9D;AACJ;AAEA,OAAO,MAAMoB,uBAAuB,CAAsB;EAC/C7B,MAAMA,CAACC,KAAa,EAAE;IACzB,OAAOL,QAAQ,CAACK,KAAK,CAAC;EAC1B;AACJ;AAEA,eAAe,IAAI6B,GAAG,CAAoB,CACtC,CAAC,gBAAgB,EAAE,IAAIlB,uBAAuB,CAAC,CAAC,CAAC,EACjD,CAAC,QAAQ,EAAE,IAAIL,gBAAgB,CAAC,CAAC,CAAC,EAClC,CAAC,QAAQ,EAAE,IAAIG,eAAe,CAAC,CAAC,CAAC,EACjC,CAAC,gBAAgB,EAAE,IAAImB,uBAAuB,CAAC,CAAC,CAAC,EACjD,CAAC,aAAa,EAAE,IAAIH,oBAAoB,CAAC,CAAC,CAAC,EAC3C,CAAC,QAAQ,EAAE,IAAI3B,qBAAqB,CAAC,CAAC,CAAC,EACvC,CAAC,YAAY,EAAE,IAAIkB,iBAAiB,CAAC,CAAC,CAAC,CAC1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["i18n.service.ts"],"sourcesContent":["export interface I18nService {\n isRTLLocale: (newLocale?: string) => any;\n setRTL: (locale?: string) => any;\n}\n\n"],"mappings":""}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
|
-
export let HideMode
|
|
4
|
-
(function (HideMode) {
|
|
3
|
+
export let HideMode = /*#__PURE__*/function (HideMode) {
|
|
5
4
|
HideMode[HideMode["DONOT_ADD_TO_DOM"] = 0] = "DONOT_ADD_TO_DOM";
|
|
6
5
|
HideMode[HideMode["ADD_TO_DOM"] = 1] = "ADD_TO_DOM";
|
|
7
|
-
|
|
6
|
+
return HideMode;
|
|
7
|
+
}({});
|
|
8
8
|
const styles = StyleSheet.create({
|
|
9
9
|
hidden: {
|
|
10
10
|
width: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","HideMode","styles","create","hidden","width","height","transform","scale","visible","WmIf","condition","hideMode","style","children","ADD_TO_DOM","Children","map"],"sources":["if.component.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, View, ViewStyle } from 'react-native';\n\nexport enum HideMode {\n DONOT_ADD_TO_DOM = 0,\n ADD_TO_DOM = 1\n}\n\nconst styles = StyleSheet.create({\n hidden: {\n width: 0,\n height: 0,\n transform: [{ scale: 0 }] \n },\n visible: {}\n});\n\nexport const WmIf = ({condition = true, hideMode = 0, style, children} : {\n condition: boolean,\n hideMode: HideMode,\n style: ViewStyle,\n children: any}) => {\n if (hideMode === HideMode.ADD_TO_DOM) {\n React.Children.map\n return (<View style={[condition? styles.visible: styles.hidden, style]}>{children}</View>);\n } else if (condition) {\n return children;\n } else {\n return null;\n }\n};"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAE1D,WAAYC,QAAQ
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","HideMode","styles","create","hidden","width","height","transform","scale","visible","WmIf","_ref","condition","hideMode","style","children","ADD_TO_DOM","Children","map","createElement"],"sources":["if.component.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, View, ViewStyle } from 'react-native';\n\nexport enum HideMode {\n DONOT_ADD_TO_DOM = 0,\n ADD_TO_DOM = 1\n}\n\nconst styles = StyleSheet.create({\n hidden: {\n width: 0,\n height: 0,\n transform: [{ scale: 0 }] \n },\n visible: {}\n});\n\nexport const WmIf = ({condition = true, hideMode = 0, style, children} : {\n condition: boolean,\n hideMode: HideMode,\n style: ViewStyle,\n children: any}) => {\n if (hideMode === HideMode.ADD_TO_DOM) {\n React.Children.map\n return (<View style={[condition? styles.visible: styles.hidden, style]}>{children}</View>);\n } else if (condition) {\n return children;\n } else {\n return null;\n }\n};"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAE1D,WAAYC,QAAQ,0BAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAKpB,MAAMC,MAAM,GAAGH,UAAU,CAACI,MAAM,CAAC;EAC7BC,MAAM,EAAE;IACJC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,SAAS,EAAE,CAAC;MAAEC,KAAK,EAAE;IAAE,CAAC;EAC5B,CAAC;EACDC,OAAO,EAAE,CAAC;AACd,CAAC,CAAC;AAEF,OAAO,MAAMC,IAAI,GAAGC,IAAA,IAIG;EAAA,IAJF;IAACC,SAAS,GAAG,IAAI;IAAEC,QAAQ,GAAG,CAAC;IAAEC,KAAK;IAAEC;EAI5C,CAAC,GAAAJ,IAAA;EACd,IAAIE,QAAQ,KAAKZ,QAAQ,CAACe,UAAU,EAAE;IAClClB,KAAK,CAACmB,QAAQ,CAACC,GAAG;IAClB,oBAAQpB,KAAA,CAAAqB,aAAA,CAACnB,IAAI;MAACc,KAAK,EAAE,CAACF,SAAS,GAAEV,MAAM,CAACO,OAAO,GAAEP,MAAM,CAACE,MAAM,EAAEU,KAAK;IAAE,GAAEC,QAAe,CAAC;EAC7F,CAAC,MAAM,IAAIH,SAAS,EAAE;IAClB,OAAOG,QAAQ;EACnB,CAAC,MAAM;IACH,OAAO,IAAI;EACf;AACJ,CAAC"}
|