@wavemaker/app-rn-runtime 11.4.0-next.25501 → 11.4.0-next.25701
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 +240 -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 +6 -2
- 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 +2 -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 +3 -3
- 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/card/card.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.component.js +1 -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 +3 -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 +24 -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 +8 -0
- 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 +95 -34
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.props.js +2 -0
- app-rn-runtime/components/data/form/form.props.js.map +1 -1
- app-rn-runtime/components/data/form/form.styles.js +6 -0
- 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/data/liveform/liveform.component.js +102 -0
- app-rn-runtime/components/data/liveform/liveform.component.js.map +1 -0
- 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/alertdialog/alertdialog.styles.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 +10 -3
- 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 +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.props.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +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/checkboxset/checkboxset.styles.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 +3 -41
- 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/radioset/radioset.styles.js +8 -0
- app-rn-runtime/components/input/radioset/radioset.styles.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 +14 -2
- 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 +18 -1
- 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 +141 -57
- 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 +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 +28 -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 +42 -41
- 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 +26 -11
- 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 +5 -7
- 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 +26 -3
- 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 +3 -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 +18 -42
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +58 -2
- 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 +10 -15
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/live-variable.js +115 -0
- app-rn-runtime/variables/live-variable.js.map +1 -0
- app-rn-runtime/variables/model-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +33 -12
- 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
|
@@ -3,6 +3,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
|
|
|
3
3
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Text, View, Platform } from 'react-native';
|
|
6
|
+
import Color from "color";
|
|
6
7
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
7
8
|
import WmSpinnerProps from './spinner.props';
|
|
8
9
|
import { DEFAULT_CLASS } from './spinner.styles';
|
|
@@ -10,20 +11,19 @@ import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.compone
|
|
|
10
11
|
import WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';
|
|
11
12
|
import LottieView from 'lottie-react-native';
|
|
12
13
|
import ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';
|
|
13
|
-
import Color from "color";
|
|
14
14
|
export class WmSpinnerState extends BaseComponentState {}
|
|
15
15
|
export default class WmSpinner extends BaseComponent {
|
|
16
16
|
constructor(props) {
|
|
17
17
|
super(props, DEFAULT_CLASS, new WmSpinnerProps());
|
|
18
18
|
_defineProperty(this, "recursiveSearch", (obj, colors) => {
|
|
19
|
-
Object.keys(obj).forEach(key => {
|
|
19
|
+
obj && Object.keys(obj).forEach(key => {
|
|
20
20
|
let value = obj[key];
|
|
21
21
|
let ind = Math.floor(Math.random() * (0 - colors.length) + colors.length);
|
|
22
22
|
if (key == "nm" && (value.toLowerCase().includes('fill ') || value.toLowerCase().includes('stroke '))) {
|
|
23
|
-
if (obj["c"]["k"].length == 4 || obj["c"]["k"].length == 3 && typeof obj["c"]["k"][0] == 'number') {
|
|
23
|
+
if (obj["c"] && obj["c"]["k"] && (obj["c"]["k"].length == 4 || obj["c"]["k"].length == 3 && typeof obj["c"]["k"][0] == 'number')) {
|
|
24
24
|
obj["c"]["k"] = colors[ind];
|
|
25
25
|
} else {
|
|
26
|
-
if (obj["c"]["k"]) {
|
|
26
|
+
if (obj["c"] && obj["c"]["k"]) {
|
|
27
27
|
for (let shape in obj["c"]["k"]) {
|
|
28
28
|
if (obj["c"]["k"][shape] && obj["c"]["k"][shape]["s"]) {
|
|
29
29
|
obj["c"]["k"][shape]["s"] = colors[ind];
|
|
@@ -51,17 +51,18 @@ export default class WmSpinner extends BaseComponent {
|
|
|
51
51
|
picturesource: props.image
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return result ? [parseInt(result[1], 16) / 255, parseInt(result[2], 16) / 255, parseInt(result[3], 16) / 255, 1] : null;
|
|
54
|
+
toRgbArray(color) {
|
|
55
|
+
return [color.red() / 255, color.green() / 255, color.blue() / 255, 1];
|
|
57
56
|
}
|
|
58
57
|
addClasstoLottie(lottiePath) {
|
|
59
|
-
let primaryColor = ThemeVariables.INSTANCE.primaryColor;
|
|
60
|
-
let colors = [this.
|
|
58
|
+
let primaryColor = Color(ThemeVariables.INSTANCE.primaryColor);
|
|
59
|
+
let colors = [this.toRgbArray(primaryColor), this.toRgbArray(primaryColor.darken(0.2)), this.toRgbArray(primaryColor.darken(0.4)), this.toRgbArray(primaryColor.darken(0.6)), this.toRgbArray(primaryColor.darken(0.8))];
|
|
61
60
|
return this.recursiveSearch(lottiePath.json, lottiePath.loader == 'circleSpinner' ? [colors[0]] : colors);
|
|
62
61
|
}
|
|
63
62
|
prepareLottie(props) {
|
|
64
|
-
|
|
63
|
+
var _Lottie;
|
|
64
|
+
let Lottie = Platform.OS == 'web' ? require('react-lottie-player') : null;
|
|
65
|
+
Lottie = ((_Lottie = Lottie) === null || _Lottie === void 0 ? void 0 : _Lottie.default) || Lottie;
|
|
65
66
|
return Platform.OS == 'web' ? /*#__PURE__*/React.createElement(Lottie, {
|
|
66
67
|
animationData: this.addClasstoLottie(props.lottie),
|
|
67
68
|
loop: true,
|
|
@@ -69,6 +70,7 @@ export default class WmSpinner extends BaseComponent {
|
|
|
69
70
|
style: this.styles.lottie
|
|
70
71
|
}) : /*#__PURE__*/React.createElement(LottieView, {
|
|
71
72
|
source: this.addClasstoLottie(props.lottie),
|
|
73
|
+
resizeMode: "contain",
|
|
72
74
|
autoPlay: true,
|
|
73
75
|
loop: true,
|
|
74
76
|
style: this.styles.lottie
|
|
@@ -77,7 +79,7 @@ export default class WmSpinner extends BaseComponent {
|
|
|
77
79
|
renderWidget(props) {
|
|
78
80
|
return /*#__PURE__*/React.createElement(View, {
|
|
79
81
|
style: this.styles.root
|
|
80
|
-
}, props.lottie ? this.prepareLottie(props) : props.image ? this.prepareImage(props) : this.prepareIcon(props), props.caption ? /*#__PURE__*/React.createElement(Text, {
|
|
82
|
+
}, this._background, props.lottie ? this.prepareLottie(props) : props.image ? this.prepareImage(props) : this.prepareIcon(props), props.caption ? /*#__PURE__*/React.createElement(Text, {
|
|
81
83
|
style: this.styles.text
|
|
82
84
|
}, props.caption) : null);
|
|
83
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","Platform","BaseComponent","BaseComponentState","WmSpinnerProps","DEFAULT_CLASS","WmIcon","WmPicture","LottieView","ThemeVariables","
|
|
1
|
+
{"version":3,"names":["React","Text","View","Platform","Color","BaseComponent","BaseComponentState","WmSpinnerProps","DEFAULT_CLASS","WmIcon","WmPicture","LottieView","ThemeVariables","WmSpinnerState","WmSpinner","constructor","props","_defineProperty","obj","colors","Object","keys","forEach","key","value","ind","Math","floor","random","length","toLowerCase","includes","shape","recursiveSearch","prepareIcon","createElement","styles","icon","iconclass","iconsize","prepareImage","image","picturesource","toRgbArray","color","red","green","blue","addClasstoLottie","lottiePath","primaryColor","INSTANCE","darken","json","loader","prepareLottie","_Lottie","Lottie","OS","require","default","animationData","lottie","loop","play","style","source","resizeMode","autoPlay","renderWidget","root","_background","caption","text"],"sources":["spinner.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, Platform } from 'react-native';\nimport Color from \"color\";\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmSpinnerProps from './spinner.props';\nimport { DEFAULT_CLASS, WmSpinnerStyles } from './spinner.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\nimport LottieView from 'lottie-react-native';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\n\nexport class WmSpinnerState extends BaseComponentState<WmSpinnerProps> {\n\n}\n\nexport default class WmSpinner extends BaseComponent<WmSpinnerProps, WmSpinnerState, WmSpinnerStyles> {\n\n constructor(props: WmSpinnerProps) {\n super(props, DEFAULT_CLASS, new WmSpinnerProps());\n }\n\n private prepareIcon(props: any) {\n return (<WmIcon\n styles={this.styles.icon}\n iconclass={props.iconclass + ' fa-spin'} iconsize={props.iconsize}></WmIcon>);\n }\n\n private prepareImage(props: any) {\n return (<WmPicture\n styles={this.styles.image}\n picturesource={props.image}></WmPicture>);\n }\n\n private recursiveSearch = (obj: any, colors: any) => {\n obj && Object.keys(obj).forEach(key => {\n let value = obj[key];\n let ind = Math.floor(Math.random() * (0 - colors.length ) + colors.length);\n if (key == \"nm\" && (value.toLowerCase().includes('fill ') || value.toLowerCase().includes('stroke '))) {\n if (obj[\"c\"] && obj[\"c\"][\"k\"] \n && (obj[\"c\"][\"k\"].length == 4\n || (obj[\"c\"][\"k\"].length ==3 \n && typeof obj[\"c\"][\"k\"][0] == 'number'))) {\n obj[\"c\"][\"k\"] = colors[ind];\n }\n else {\n if (obj[\"c\"] && obj[\"c\"][\"k\"]){\n for (let shape in obj[\"c\"][\"k\"]) {\n if(obj[\"c\"][\"k\"][shape] && obj[\"c\"][\"k\"][shape][\"s\"]){\n obj[\"c\"][\"k\"][shape][\"s\"] = colors[ind];\n }\n }\n }\n }\n } else if (typeof value === 'object') {\n this.recursiveSearch(value, colors);\n }\n });\n return obj;\n };\n\n private toRgbArray(color: Color) {\n return [\n color.red()/255,\n color.green()/255,\n color.blue()/255,\n 1\n ]\n }\n\n private addClasstoLottie(lottiePath: any) {\n let primaryColor = Color(ThemeVariables.INSTANCE.primaryColor);\n let colors = [this.toRgbArray(primaryColor), \n this.toRgbArray(primaryColor.darken(0.2)), \n this.toRgbArray(primaryColor.darken(0.4)), \n this.toRgbArray(primaryColor.darken(0.6)), \n this.toRgbArray(primaryColor.darken(0.8))];\n return this.recursiveSearch(lottiePath.json, lottiePath.loader == 'circleSpinner' ? [colors[0]] : colors);\n }\n\n private prepareLottie(props: any) {\n let Lottie = Platform.OS == 'web' ? require('react-lottie-player') : null;\n Lottie = Lottie?.default || Lottie;\n return (\n Platform.OS == 'web' ? <Lottie animationData={this.addClasstoLottie(props.lottie)} loop={true} play={true} style={this.styles.lottie} /> : <LottieView\n source={this.addClasstoLottie(props.lottie)}\n resizeMode='contain'\n autoPlay={true}\n loop={true}\n style={this.styles.lottie}\n />\n )\n }\n\n renderWidget(props: WmSpinnerProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n {props.lottie ? this.prepareLottie(props) : props.image ? this.prepareImage(props) : this.prepareIcon(props)}\n {props.caption ? <Text style={this.styles.text}>{props.caption}</Text> : null}\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AACnD,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AACjE,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,SAAS,MAAM,sEAAsE;AAC5F,OAAOC,UAAU,MAAM,qBAAqB;AAC5C,OAAOC,cAAc,MAAM,kDAAkD;AAE7E,OAAO,MAAMC,cAAc,SAASP,kBAAkB,CAAiB;AAIvE,eAAe,MAAMQ,SAAS,SAAST,aAAa,CAAkD;EAEpGU,WAAWA,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,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MACXE,KAAK,EAAE,IAAI,CAAC7B,MAAM,CAAC0B;IAAO,CAC3B,CAAC;EAEN;EAEAO,YAAYA,CAACrD,KAAqB,EAAE;IAClC,oBACEhB,KAAA,CAAAmC,aAAA,CAACjC,IAAI;MAAC+D,KAAK,EAAE,IAAI,CAAC7B,MAAM,CAACkC;IAAK,GAC3B,IAAI,CAACC,WAAW,EAChBvD,KAAK,CAAC8C,MAAM,GAAG,IAAI,CAACP,aAAa,CAACvC,KAAK,CAAC,GAAGA,KAAK,CAACyB,KAAK,GAAG,IAAI,CAACD,YAAY,CAACxB,KAAK,CAAC,GAAG,IAAI,CAACkB,WAAW,CAAClB,KAAK,CAAC,EAC3GA,KAAK,CAACwD,OAAO,gBAAGxE,KAAA,CAAAmC,aAAA,CAAClC,IAAI;MAACgE,KAAK,EAAE,IAAI,CAAC7B,MAAM,CAACqC;IAAK,GAAEzD,KAAK,CAACwD,OAAc,CAAC,GAAG,IACrE,CAAC;EAEX;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseProps","WmSpinnerProps"],"sources":["spinner.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmSpinnerProps extends BaseProps {\n caption: string = 'Loading...';\n iconclass?: string = 'fa fa-circle-o-notch fa-spin';\n iconsize? = 0;\n image?: string = null as any;\n imageheight?: string = null as any;\n imagewidth?: number = 20;\n lottie?: string = null as any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,cAAc,SAASD,SAAS,CAAC;
|
|
1
|
+
{"version":3,"names":["BaseProps","WmSpinnerProps","constructor","arguments","_defineProperty"],"sources":["spinner.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmSpinnerProps extends BaseProps {\n caption: string = 'Loading...';\n iconclass?: string = 'fa fa-circle-o-notch fa-spin';\n iconsize? = 0;\n image?: string = null as any;\n imageheight?: string = null as any;\n imagewidth?: number = 20;\n lottie?: string = null as any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,cAAc,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,kBAClC,YAAY;IAAAA,eAAA,oBACT,8BAA8B;IAAAA,eAAA,mBACvC,CAAC;IAAAA,eAAA,gBACI,IAAI;IAAAA,eAAA,sBACE,IAAI;IAAAA,eAAA,qBACL,EAAE;IAAAA,eAAA,iBACN,IAAI;EAAA;AACxB"}
|
|
@@ -27,5 +27,13 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
|
30
|
+
addStyle(DEFAULT_CLASS + '-rtl', '', {
|
|
31
|
+
root: {
|
|
32
|
+
textAlign: 'right'
|
|
33
|
+
},
|
|
34
|
+
text: {
|
|
35
|
+
paddingRight: 8
|
|
36
|
+
}
|
|
37
|
+
});
|
|
30
38
|
});
|
|
31
39
|
//# sourceMappingURL=spinner.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["defineStyles","BASE_THEME","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","justifyContent","alignItems","text","fontSize","paddingLeft","icon","color","spinnerIconColor","image","lottie","width","height","alignSelf"],"sources":["spinner.styles.ts"],"sourcesContent":["import { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport BASE_THEME, { NamedStyles, AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmPictureStyles } from '@wavemaker/app-rn-runtime/components/basic/picture/picture.styles';\n\nexport type WmSpinnerStyles = BaseStyles & {\n icon: WmIconStyles\n image: WmPictureStyles\n lottie: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-spinner';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSpinnerStyles = defineStyles({\n root: {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center'\n },\n text: {\n fontSize: 14,\n paddingLeft: 8\n },\n icon: {\n text: {\n fontSize: 24,\n color: themeVariables.spinnerIconColor\n }\n } as WmIconStyles,\n image: {} as WmPictureStyles,\n lottie: {\n width: 100,\n height: 100,\n alignSelf: 'center',\n justifyContent: 'center'\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});\n"],"mappings":"AAAA,SAAqBA,YAAY,QAAQ,+CAA+C;AACxF,OAAOC,UAAU,MAAiC,wCAAwC;AAU1F,OAAO,MAAMC,aAAa,GAAG,aAAa;AAC1CD,UAAU,CAACE,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA8B,GAAGN,YAAY,CAAC;IAClDO,IAAI,EAAE;MACJC,aAAa,EAAE,KAAK;MACpBC,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE;IACd,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,WAAW,EAAE;IACf,CAAC;IACDC,IAAI,EAAE;MACJH,IAAI,EAAE;QACJC,QAAQ,EAAE,EAAE;QACZG,KAAK,EAAEX,cAAc,CAACY;MACxB;IACF,CAAiB;IACjBC,KAAK,EAAE,CAAC,CAAoB;IAC5BC,MAAM,EAAE;MACNC,KAAK,EAAE,GAAG;MACVC,MAAM,EAAE,GAAG;MACXC,SAAS,EAAE,QAAQ;MACnBZ,cAAc,EAAE;IAClB;EACF,CAAC,CAAC;EAEFJ,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;
|
|
1
|
+
{"version":3,"names":["defineStyles","BASE_THEME","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","justifyContent","alignItems","text","fontSize","paddingLeft","icon","color","spinnerIconColor","image","lottie","width","height","alignSelf","textAlign","paddingRight"],"sources":["spinner.styles.ts"],"sourcesContent":["import { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport BASE_THEME, { NamedStyles, AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmPictureStyles } from '@wavemaker/app-rn-runtime/components/basic/picture/picture.styles';\n\nexport type WmSpinnerStyles = BaseStyles & {\n icon: WmIconStyles\n image: WmPictureStyles\n lottie: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-spinner';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSpinnerStyles = defineStyles({\n root: {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center'\n },\n text: {\n fontSize: 14,\n paddingLeft: 8\n },\n icon: {\n text: {\n fontSize: 24,\n color: themeVariables.spinnerIconColor\n }\n } as WmIconStyles,\n image: {} as WmPictureStyles,\n lottie: {\n width: 100,\n height: 100,\n alignSelf: 'center',\n justifyContent: 'center'\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root : {\n textAlign: 'right'\n },\n text: {\n paddingRight: 8\n }\n });\n});\n"],"mappings":"AAAA,SAAqBA,YAAY,QAAQ,+CAA+C;AACxF,OAAOC,UAAU,MAAiC,wCAAwC;AAU1F,OAAO,MAAMC,aAAa,GAAG,aAAa;AAC1CD,UAAU,CAACE,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA8B,GAAGN,YAAY,CAAC;IAClDO,IAAI,EAAE;MACJC,aAAa,EAAE,KAAK;MACpBC,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE;IACd,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,WAAW,EAAE;IACf,CAAC;IACDC,IAAI,EAAE;MACJH,IAAI,EAAE;QACJC,QAAQ,EAAE,EAAE;QACZG,KAAK,EAAEX,cAAc,CAACY;MACxB;IACF,CAAiB;IACjBC,KAAK,EAAE,CAAC,CAAoB;IAC5BC,MAAM,EAAE;MACNC,KAAK,EAAE,GAAG;MACVC,MAAM,EAAE,GAAG;MACXC,SAAS,EAAE,QAAQ;MACnBZ,cAAc,EAAE;IAClB;EACF,CAAC,CAAC;EAEFJ,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACnCK,IAAI,EAAG;MACLe,SAAS,EAAE;IACb,CAAC;IACDX,IAAI,EAAE;MACJY,YAAY,EAAE;IAChB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { View } from 'react-native';
|
|
6
|
+
import { ResizeMode, Video } from 'expo-av';
|
|
7
|
+
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
8
|
+
import WmVideoProps from './video.props';
|
|
9
|
+
import { DEFAULT_CLASS } from './video.styles';
|
|
10
|
+
import { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';
|
|
11
|
+
export class WmVideoState extends BaseComponentState {}
|
|
12
|
+
export default class WmVideo extends BaseComponent {
|
|
13
|
+
constructor(props) {
|
|
14
|
+
super(props, DEFAULT_CLASS, new WmVideoProps(), new WmVideoState());
|
|
15
|
+
_defineProperty(this, "video", null);
|
|
16
|
+
}
|
|
17
|
+
getSource(path) {
|
|
18
|
+
if (!path) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
const resource = this.loadAsset(path);
|
|
22
|
+
if (isFullPathUrl(resource)) {
|
|
23
|
+
return {
|
|
24
|
+
uri: resource
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
return resource;
|
|
28
|
+
}
|
|
29
|
+
componentDidMount() {
|
|
30
|
+
if (this.state.props.autoplay) {
|
|
31
|
+
var _this$video;
|
|
32
|
+
(_this$video = this.video) === null || _this$video === void 0 ? void 0 : _this$video.playAsync();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
renderWidget(props) {
|
|
36
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
37
|
+
style: this.styles.root
|
|
38
|
+
}, this._background, /*#__PURE__*/React.createElement(Video, {
|
|
39
|
+
ref: video => {
|
|
40
|
+
this.video = video;
|
|
41
|
+
},
|
|
42
|
+
style: {
|
|
43
|
+
width: '100%',
|
|
44
|
+
height: '100%',
|
|
45
|
+
flex: 1
|
|
46
|
+
},
|
|
47
|
+
source: this.getSource(props.mp4format || props.webmformat),
|
|
48
|
+
posterSource: this.getSource(props.videoposter),
|
|
49
|
+
useNativeControls: props.controls,
|
|
50
|
+
resizeMode: ResizeMode.CONTAIN,
|
|
51
|
+
isLooping: props.loop,
|
|
52
|
+
isMuted: props.muted
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=video.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","ResizeMode","Video","BaseComponent","BaseComponentState","WmVideoProps","DEFAULT_CLASS","isFullPathUrl","WmVideoState","WmVideo","constructor","props","_defineProperty","getSource","path","resource","loadAsset","uri","componentDidMount","state","autoplay","_this$video","video","playAsync","renderWidget","createElement","style","styles","root","_background","ref","width","height","flex","source","mp4format","webmformat","posterSource","videoposter","useNativeControls","controls","resizeMode","CONTAIN","isLooping","loop","isMuted","muted"],"sources":["video.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { ResizeMode, Video } from 'expo-av';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmVideoProps from './video.props';\nimport { DEFAULT_CLASS, WmVideoStyles } from './video.styles';\nimport { isString } from 'lodash-es';\nimport { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmVideoState extends BaseComponentState<WmVideoProps> {}\n\nexport default class WmVideo extends BaseComponent<WmVideoProps, WmVideoState, WmVideoStyles> {\n\n private video: Video | null = null as any;\n\n constructor(props: WmVideoProps) {\n super(props, DEFAULT_CLASS, new WmVideoProps(), new WmVideoState());\n }\n\n getSource(path: string) {\n if (!path) {\n return null;\n }\n const resource = this.loadAsset(path);\n if (isFullPathUrl(resource as string)) {\n return {\n uri: resource\n };\n }\n return resource;\n }\n\n componentDidMount(): void {\n if (this.state.props.autoplay) {\n this.video?.playAsync();\n }\n }\n\n renderWidget(props: WmVideoProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n <Video\n ref={(video) => { this.video = video; }}\n style={{ width: '100%', height: '100%', flex: 1 }}\n source={this.getSource(\n props.mp4format\n || props.webmformat) as any}\n posterSource={ this.getSource(props.videoposter) as any }\n useNativeControls={props.controls}\n resizeMode={ResizeMode.CONTAIN}\n isLooping={props.loop}\n isMuted={props.muted}\n />\n </View>); \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAeC,IAAI,QAAQ,cAAc;AACzC,SAASC,UAAU,EAAEC,KAAK,QAAQ,SAAS;AAC3C,SAASC,aAAa,EAAEC,kBAAkB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MAAE,CAAE;MAClDC,MAAM,EAAE,IAAI,CAACrB,SAAS,CACpBF,KAAK,CAACwB,SAAS,IACZxB,KAAK,CAACyB,UAAU,CAAS;MAC9BC,YAAY,EAAG,IAAI,CAACxB,SAAS,CAACF,KAAK,CAAC2B,WAAW,CAAU;MACzDC,iBAAiB,EAAE5B,KAAK,CAAC6B,QAAS;MAClCC,UAAU,EAAExC,UAAU,CAACyC,OAAQ;MAC/BC,SAAS,EAAEhC,KAAK,CAACiC,IAAK;MACtBC,OAAO,EAAElC,KAAK,CAACmC;IAAM,CACtB,CACG,CAAC;EACX;AACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
|
+
import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
5
|
+
export default class WmVideoProps extends BaseProps {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
_defineProperty(this, "autoplay", false);
|
|
9
|
+
_defineProperty(this, "controls", false);
|
|
10
|
+
_defineProperty(this, "loop", false);
|
|
11
|
+
_defineProperty(this, "mp4format", null);
|
|
12
|
+
_defineProperty(this, "muted", false);
|
|
13
|
+
_defineProperty(this, "oggformat", null);
|
|
14
|
+
_defineProperty(this, "subtitlelang", 'en');
|
|
15
|
+
_defineProperty(this, "subtitlesource", null);
|
|
16
|
+
_defineProperty(this, "videoposter", 'resources/images/imagelists/default-image.png');
|
|
17
|
+
_defineProperty(this, "videopreload", 'none');
|
|
18
|
+
_defineProperty(this, "videosupportmessage", 'Your browser does not support the video tag.');
|
|
19
|
+
_defineProperty(this, "webmformat", null);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=video.props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BaseProps","WmVideoProps","constructor","arguments","_defineProperty"],"sources":["video.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmVideoProps extends BaseProps {\n autoplay = false;\n controls = false;\n loop = false;\n mp4format: string = null as any;\n muted = false;\n oggformat: string = null as any;\n subtitlelang = 'en';\n subtitlesource: string = null as any;\n videoposter = 'resources/images/imagelists/default-image.png';\n videopreload = 'none';\n videosupportmessage = 'Your browser does not support the video tag.';\n webmformat: string = null as any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,YAAY,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,mBACrC,KAAK;IAAAA,eAAA,mBACL,KAAK;IAAAA,eAAA,eACT,KAAK;IAAAA,eAAA,oBACQ,IAAI;IAAAA,eAAA,gBAChB,KAAK;IAAAA,eAAA,oBACO,IAAI;IAAAA,eAAA,uBACT,IAAI;IAAAA,eAAA,yBACM,IAAI;IAAAA,eAAA,sBACf,+CAA+C;IAAAA,eAAA,uBAC9C,MAAM;IAAAA,eAAA,8BACC,8CAA8C;IAAAA,eAAA,qBAC/C,IAAI;EAAA;AAC7B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';
|
|
2
|
+
import { defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
3
|
+
export const DEFAULT_CLASS = 'app-video';
|
|
4
|
+
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
5
|
+
const defaultStyles = defineStyles({
|
|
6
|
+
root: {},
|
|
7
|
+
text: {}
|
|
8
|
+
});
|
|
9
|
+
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=video.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text"],"sources":["video.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type WmVideoStyles = BaseStyles & {};\n\nexport const DEFAULT_CLASS = 'app-video';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = defineStyles<WmVideoStyles>({\n root: {},\n text: {}\n });\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAIxF,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAa,GAAGL,YAAY,CAAgB;IAC9CM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC;EACX,CAAC,CAAC;EACFH,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Defs","LinearGradient","Stop","Svg","VictoryArea","VictoryChart","VictoryLegend","VictoryStack","VictoryScatter","VictoryGroup","WmAreaChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","WmAreaChartState","
|
|
1
|
+
{"version":3,"names":["React","View","Defs","LinearGradient","Stop","Svg","VictoryArea","VictoryChart","VictoryLegend","VictoryStack","VictoryScatter","VictoryGroup","WmAreaChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","WmAreaChartState","constructor","arguments","_defineProperty","WmAreaChart","props","e","viewWidth","nativeEvent","layout","width","updateState","chartWidth","renderWidget","_this$state$data","state","data","length","mindomain","x","xdomain","chartMinX","undefined","y","ydomain","chartMinY","chartName","name","createElement","style","styles","root","onLayout","onViewLayoutChange","bind","theme","height","padding","top","bottom","left","right","minDomain","containerComponent","title","subheading","orientation","gutter","getLegendView","getXaxis","getYAxis","map","d","i","key","id","x1","y1","x2","y2","offset","stopColor","colors","stopOpacity","interpolation","fill","stroke","highlightpoints","size","opacity"],"sources":["area-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View } from 'react-native';\nimport { Defs, LinearGradient, Stop, Svg } from 'react-native-svg';\nimport { VictoryArea, VictoryChart, VictoryLegend, VictoryStack, VictoryScatter, VictoryGroup } from \"victory-native\";\nimport { InterpolationPropType } from 'victory-core';\nimport WmAreaChartProps from './area-chart.props';\nimport { DEFAULT_CLASS, WmAreaChartStyles } from './area-chart.styles';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker/app-rn-runtime/components/chart/basechart.component\";\n\nexport class WmAreaChartState extends BaseChartComponentState<WmAreaChartProps> {\n chartWidth = 0;\n}\n\nexport default class WmAreaChart extends BaseChartComponent<WmAreaChartProps, WmAreaChartState, WmAreaChartStyles> {\n\n constructor(props: WmAreaChartProps) {\n super(props, DEFAULT_CLASS, new WmAreaChartProps(), new WmAreaChartState());\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let viewWidth = e.nativeEvent.layout.width;\n this.updateState({\n chartWidth: viewWidth\n } as WmAreaChartState)\n }\n\n renderWidget(props: WmAreaChartProps) {\n if (!this.state.data?.length) {\n return null;\n }\n let mindomain={\n x: this.props.xdomain === 'Min' ? this.state.chartMinX: undefined,\n y: this.props.ydomain === 'Min' ? this.state.chartMinY: undefined\n };\n const chartName = this.props.name ?? 'nonameAreachart';\n return (\n <View\n style={this.styles.root}\n onLayout={this.onViewLayoutChange.bind(this)}\n >\n {this.state.chartWidth ? \n (\n <VictoryChart\n theme={this.state.theme}\n height={this.styles.root.height as number}\n width={this.state.chartWidth || 120}\n padding={{ top: 70, bottom: 50, left: 50, right: 50 }}\n minDomain={mindomain}\n > \n <VictoryLegend\n name={'legend'}\n containerComponent={<Svg />}\n title={[props.title, props.subheading]}\n orientation=\"horizontal\"\n gutter={20}\n data={[]}\n theme={this.state.theme}\n />\n {this.getLegendView()}\n {this.getXaxis()}\n {this.getYAxis()}\n <VictoryStack>\n {\n this.state.data.map((d: any, i: number) => {\n return <VictoryGroup key={props.name + '_area_group_' + i}>\n <Defs>\n <LinearGradient id={`${chartName}Gradient${i}`} x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\">\n <Stop offset=\"0%\" stopColor={this.state.colors[i]}/>\n <Stop offset=\"100%\" stopColor={'#ffffff00'} stopOpacity=\"0\"/>\n </LinearGradient>\n </Defs>\n <VictoryArea\n interpolation={props.interpolation as InterpolationPropType}\n key={props.name + '_' + i}\n style={{\n data: {\n fill: `url(#${chartName}Gradient${i})`,\n stroke: this.state.colors[i]\n }\n }}\n data={d}\n />\n {props.highlightpoints ?\n <VictoryScatter\n size={5}\n key={props.name + '_scatter' + i}\n style={{\n data: { fill: this.state.colors[i], opacity: 0.8}\n }}\n data={d}/>\n : null}\n </VictoryGroup>\n })\n }\n </VictoryStack>\n </VictoryChart>\n )\n : null}\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,QAAQ,cAAc;AACtD,SAASC,IAAI,EAAEC,cAAc,EAAEC,IAAI,EAAEC,GAAG,QAAQ,kBAAkB;AAClE,SAASC,WAAW,EAAEC,YAAY,EAAEC,aAAa,EAAEC,YAAY,EAAEC,cAAc,EAAEC,YAAY,QAAQ,gBAAgB;AAErH,OAAOC,gBAAgB,M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,CACF,CAAC,GAEjB,IACE,CAAC;EACT;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","VictoryChart","VictoryBar","VictoryLegend","VictoryStack","VictoryGroup","BaseChartComponent","BaseChartComponentState","WmBarChartProps","DEFAULT_CLASS","Svg","WmBarChartState","WmBarChart","constructor","props","labelFn","data","abbreviateNumber","datum","y","getBarChart","state","map","d","i","name","horizontal","showvalues","bind","undefined","renderWidget","length","mindomain","x","xdomain","chartMinX","ydomain","chartMinY","styles","root","theme","
|
|
1
|
+
{"version":3,"names":["React","View","VictoryChart","VictoryBar","VictoryLegend","VictoryStack","VictoryGroup","BaseChartComponent","BaseChartComponentState","WmBarChartProps","DEFAULT_CLASS","Svg","WmBarChartState","WmBarChart","constructor","props","labelFn","data","abbreviateNumber","datum","y","getBarChart","state","map","d","i","createElement","key","name","horizontal","labels","showvalues","bind","undefined","height","renderWidget","length","mindomain","x","xdomain","chartMinX","ydomain","chartMinY","style","styles","root","theme","width","screenWidth","minDomain","padding","top","offsettop","bottom","offsetbottom","left","offsetleft","right","offsetright","containerComponent","title","subheading","orientation","gutter","getLegendView","getXaxis","getYAxis","viewtype","colorScale","colors","offset"],"sources":["bar-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport {\n VictoryChart,\n VictoryBar,\n VictoryLegend,\n VictoryStack,\n VictoryGroup\n} from \"victory-native\";\n\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker/app-rn-runtime/components/chart/basechart.component\";\nimport WmBarChartProps from './bar-chart.props';\nimport { DEFAULT_CLASS, WmBarChartStyles } from './bar-chart.styles';\nimport { Svg } from \"react-native-svg\";\n\nexport class WmBarChartState extends BaseChartComponentState<WmBarChartProps> {}\n\nexport default class WmBarChart extends BaseChartComponent<WmBarChartProps, WmBarChartState, WmBarChartStyles> {\n\n constructor(props: WmBarChartProps) {\n super(props, DEFAULT_CLASS, new WmBarChartProps(), new WmBarChartState());\n }\n\n labelFn(data: any): string | number | string[] | number[] | null {\n return this.abbreviateNumber(data.datum.y);\n }\n\n getBarChart(props: WmBarChartProps) {\n return this.state.data.map((d: any, i: number) => {\n return <VictoryBar key={props.name + '_' + i}\n horizontal={props.horizontal} labels={props.showvalues ? this.labelFn.bind(this) : undefined}\n data={d}\n height={100}\n />\n });\n}\n\n renderWidget(props: WmBarChartProps) {\n if (!this.state.data.length) {\n return null;\n }\n let mindomain={x: this.props.xdomain === 'Min' ? this.state.chartMinX: undefined, y: this.props.ydomain === 'Min' ? this.state.chartMinY: undefined};\n return (<View\n style={this.styles.root}\n ><VictoryChart theme={this.state.theme}\n height={this.styles.root.height as number}\n width={this.styles.root.width as number || this.screenWidth}\n minDomain={mindomain}\n padding={{ top: props.offsettop, bottom: props.offsetbottom, left: props.offsetleft, right: props.offsetright }}>\n <VictoryLegend\n name={'legend'}\n containerComponent={<Svg />}\n title={[props.title, props.subheading]}\n orientation=\"horizontal\"\n gutter={20}\n data={[]}\n theme={this.state.theme}\n />\n {this.getLegendView()}\n {this.getXaxis()}\n {this.getYAxis()}\n {\n props.viewtype === 'Stacked' ? <VictoryStack colorScale={this.state.colors}>\n {\n this.getBarChart(props)\n }\n </VictoryStack> : <VictoryGroup colorScale={this.state.colors} offset={5}>\n {\n this.getBarChart(props)\n }\n </VictoryGroup>\n }\n </VictoryChart></View>);\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AAEnC,SACEC,YAAY,EACZC,UAAU,EACVC,aAAa,EACbC,YAAY,EACZC,YAAY,QACP,gBAAgB;AAEvB,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,gEAAgE;AACvE,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,SAASC,aAAa,QAA0B,oBAAoB;AACpE,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,OAAO,MAAMC,eAAe,SAASJ,uBAAuB,CAAkB;AAE9E,eAAe,MAA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AC+C,MAAO;MAACC,MAAM,EAAE;IAAE,GAErE,IAAI,CAACjD,WAAW,CAACN,KAAK,CAEZ,CAEJ,CAAO,CAAC;EACxB;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseChartComponentProps","WmBarChartProps"],"sources":["bar-chart.props.ts"],"sourcesContent":["import BaseChartComponentProps from \"@wavemaker/app-rn-runtime/components/chart/basechart.props\";\n\nexport default class WmBarChartProps extends BaseChartComponentProps {\n horizontal?: boolean = true;\n viewtype: string = 'Grouped';\n yaxislabeldistance: number = 30;\n xaxislabeldistance: number = 50;\n}\n"],"mappings":";;;AAAA,OAAOA,uBAAuB,MAAM,4DAA4D;AAEhG,eAAe,MAAMC,eAAe,SAASD,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"names":["BaseChartComponentProps","WmBarChartProps","constructor","arguments","_defineProperty"],"sources":["bar-chart.props.ts"],"sourcesContent":["import BaseChartComponentProps from \"@wavemaker/app-rn-runtime/components/chart/basechart.props\";\n\nexport default class WmBarChartProps extends BaseChartComponentProps {\n horizontal?: boolean = true;\n viewtype: string = 'Grouped';\n yaxislabeldistance: number = 30;\n xaxislabeldistance: number = 50;\n}\n"],"mappings":";;;AAAA,OAAOA,uBAAuB,MAAM,4DAA4D;AAEhG,eAAe,MAAMC,eAAe,SAASD,uBAAuB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,qBAC5C,IAAI;IAAAA,eAAA,mBACR,SAAS;IAAAA,eAAA,6BACC,EAAE;IAAAA,eAAA,6BACF,EAAE;EAAA;AACjC"}
|
|
@@ -449,8 +449,12 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
449
449
|
this.applyTheme(this.props);
|
|
450
450
|
break;
|
|
451
451
|
case 'dataset':
|
|
452
|
-
if (!
|
|
453
|
-
$new
|
|
452
|
+
if (!isArray($new)) {
|
|
453
|
+
if (isObject($new) && !isEmpty($new)) {
|
|
454
|
+
$new = [$new];
|
|
455
|
+
} else {
|
|
456
|
+
$new = [];
|
|
457
|
+
}
|
|
454
458
|
}
|
|
455
459
|
$new && this.prepareDataItems($new);
|
|
456
460
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Dimensions","moment","forEach","get","isArray","isEmpty","isObject","maxBy","minBy","set","trim","VictoryAxis","VictoryLegend","VictoryLabel","BaseComponent","BaseComponentState","WmIcon","ThemeFactory","DEFAULT_CLASS","BaseChartComponentState","undefined","screenWidth","width","shapes","SI_SYMBOL","BaseChartComponent","constructor","props","defaultClass","defaultProps","defaultState","theme","applyTheme","componentDidMount","abbreviateNumber","number","tier","Math","log10","abs","suffix","scale","pow","scaled","toFixed","getLegendView","showlegend","top","parseInt","styles","root","height","orientation","state","legendData","border","stroke","left","getYScaleMinValue","value","_min","floor","getXaxis","showxaxis","xaxislabel","xaxisdatakey","xunits","grid","labelangle","d","xaxisDatakeyArr","length","getYAxis","showyaxis","yaxislabel","yaxisdatakey","yunits","axisLabel","padding","yaxislabeldistance","t","isAxisDomainSupported","type","isAxisDomainValid","axis","areMinMaxValuesValid","values","isFinite","min","max","setDomainValues","xDomainValues","yDomainValues","data","x","getXMinMaxValues","getYMinMaxValues","updateState","chartMinX","chartMaxX","yMin","y","chartMinY","chartMaxY","datum","xValues","dataObject","yValues","minValues","maxValues","push","setHeightWidthOnChart","cb","chartHeight","chartWidth","themeName","colorsToUse","customcolors","split","map","themeToUse","getColorsObj","getTheme","colors","prepareLegendData","yAxis","ldata","name","prepareEvents","_","idx","childName","target","eventKey","String","eventHandlers","onClick","mutation","onMouseOver","onMouseOut","getxAxisVal","dataObj","xKey","index","isValid","isNaN","prepareDataItems","dataset","xaxis","yaxis","datasets","yPts","o","xindex","xVal","yVal","parseFloat","bubblesize","shape","invokeEventCallback","proxy","setTimeout","endAngle","updateData","renderLoadingIcon","loadingIcon","loadingicon","loadingdatamsg","labeltype","setTotal","ydomain","xdomain","loading","total","onPropertyChange","$new","$old","units","xLabel","yLabel"],"sources":["basechart.component.tsx"],"sourcesContent":["import React from \"react\";\nimport { Dimensions } from 'react-native';\nimport moment from \"moment\";\nimport {forEach, get, isArray, isEmpty, isObject, maxBy, minBy, set, trim} from \"lodash-es\";\nimport { ScatterSymbolType } from \"victory-core\";\nimport {VictoryAxis, VictoryLegend, VictoryLabel} from \"victory-native\";\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.component\";\nimport ThemeFactory from \"@wavemaker/app-rn-runtime/components/chart/theme/chart.theme\";\n\nimport BaseChartComponentProps from \"./basechart.props\";\nimport { DEFAULT_CLASS, BaseChartComponentStyles} from \"./basechart.styles\";\n\nexport class BaseChartComponentState <T extends BaseChartComponentProps> extends BaseComponentState<T> {\n data: any = [];\n content: any = null;\n yAxis: Array<string> = [];\n xaxisDatakeyArr: Array<any> = [];\n legendData: any = [];\n theme: any;\n colors: any;\n xLabel: string = '';\n yLabel: string = '';\n total: number = 0;\n endAngle: number = 0;\n loading: boolean = true;\n chartHeight: number = 0;\n chartWidth: number = 0;\n chartMinY: number | undefined = undefined;\n chartMinX: number | undefined = undefined;\n chartMaxY: number | undefined = undefined;\n chartMaxX: number | undefined = undefined;\n}\n\nconst screenWidth = Dimensions.get(\"window\").width;\n\nconst shapes: {[key: string]: ScatterSymbolType} = {\n 'circle': 'circle',\n 'cross': 'cross',\n 'diamond': 'diamond',\n 'plus': 'plus',\n 'minus': 'minus',\n 'square': 'square',\n 'star': 'star',\n 'triangle-down': 'triangleDown',\n 'triangle-up': 'triangleUp'\n};\n\nconst SI_SYMBOL = [\"\", \"k\", \"M\", \"G\", \"T\", \"P\", \"E\"];\n\nexport abstract class BaseChartComponent<T extends BaseChartComponentProps, S extends BaseChartComponentState<T>, L extends BaseChartComponentStyles> extends BaseComponent<T, S, L> {\n protected screenWidth: number = screenWidth;\n constructor(props: T, public defaultClass: string = DEFAULT_CLASS, defaultProps?: T, defaultState?: S) {\n super(props, defaultClass, defaultProps, defaultState);\n if (!props.theme) {\n this.applyTheme(props);\n }\n }\n\n componentDidMount() {\n super.componentDidMount();\n }\n\n abbreviateNumber(number: any) {\n if (typeof number !== 'number') {\n return number;\n }\n const tier = Math.log10(Math.abs(number)) / 3 | 0;\n\n if (tier == 0) {\n return number;\n }\n\n // get suffix and determine scale\n const suffix = SI_SYMBOL[tier];\n const scale = Math.pow(10, tier * 3);\n\n // scale the number\n var scaled = number / scale;\n\n // format number and add suffix\n return scaled.toFixed(1) + suffix;\n }\n\n getLegendView() {\n if (this.props.showlegend === 'hide') {\n return null;\n }\n let top = this.props.showlegend === 'bottom' ? parseInt(this.styles.root.height as string) : 0;\n if (top) {\n top = top - (50); // remove legendHeight\n }\n const orientation = (this.props.showlegend === 'right' || this.props.showlegend === 'left') ? 'vertical' : 'horizontal';\n return <VictoryLegend\n name={'legendData'}\n orientation={orientation}\n gutter={20}\n data={this.state.legendData}\n style={{ border: { stroke: 'none' } }}\n borderPadding={{top: 30, left: 50}}\n y={top}\n />\n }\n\n getYScaleMinValue(value: number) {\n const _min = Math.floor(value);\n return Math.abs(value) - _min > 0 ? value - .1 : _min - 1;\n };\n\n // x axis with vertical lines having grid stroke colors\n getXaxis() {\n if (this.props.showxaxis === false) {\n return null;\n }\n return <VictoryAxis crossAxis label={(this.props.xaxislabel || this.props.xaxisdatakey) + (this.props.xunits ? `(${this.props.xunits})` : '')}\n style={{\n grid: this.styles.grid\n }}\n fixLabelOverlap={true}\n tickLabelComponent={<VictoryLabel angle={this.props.labelangle || 0} />} theme={this.state.theme}\n tickFormat={(d) => `${this.state.xaxisDatakeyArr.length ? this.state.xaxisDatakeyArr[d] : d}`}/>;\n }\n /* y axis with horizontal lines having grid stroke colors*/\n getYAxis() {\n if (this.props.showyaxis === false) {\n return null;\n }\n return <VictoryAxis crossAxis label={(this.props.yaxislabel || this.props.yaxisdatakey) + (this.props.yunits ? `(${this.props.yunits})` : '')}\n style={{\n axisLabel: {padding: this.props.yaxislabeldistance},\n grid: this.styles.grid\n }}\n theme={this.state.theme}\n tickFormat={(t) => `${this.abbreviateNumber(t)}`} dependentAxis />;\n }\n\n // X/Y Domain properties are supported only for Column and Area charts\n isAxisDomainSupported(type: string) {\n return type === 'Column'|| type === 'Area';\n }\n\n // Check whether X/Y Domain was set to Min and is supported for the present chart\n isAxisDomainValid(axis: string) {\n if (get(this.props, axis + 'domain') === 'Min' && (this.isAxisDomainSupported(this.props.type))) {\n return true;\n }\n return false;\n };\n\n// Check whether min and max values are finite or not\n areMinMaxValuesValid(values: any) {\n if (isFinite(values.min) && isFinite(values.max)) {\n return true;\n }\n return false;\n };\n\n setDomainValues() {\n let xDomainValues, yDomainValues;\n if (this.state.data.length > 0) {\n if (this.isAxisDomainValid('x') && typeof this.state.data[0].x === 'number') {\n xDomainValues = this.getXMinMaxValues(this.state.data[0]);\n }\n if (this.isAxisDomainValid('y')) {\n yDomainValues = this.getYMinMaxValues(this.state.data);\n }\n if (xDomainValues) {\n this.updateState({\n chartMinX: yDomainValues.min.x,\n chartMaxX: yDomainValues.max.x\n } as S)\n }\n let yMin;\n if (yDomainValues) {\n if (this.areMinMaxValuesValid({max: yDomainValues.max.y, min: yDomainValues.min.y})) {\n yMin = this.getYScaleMinValue(yDomainValues.min.y);\n }\n this.updateState({\n chartMinY: yMin ? yMin : yDomainValues.min.y,\n chartMaxY: yDomainValues.max.y\n } as S);\n }\n }\n }\n\n // Getting the min and max values among all the x values\n getXMinMaxValues(datum: Array<{x: number, y: any}>) {\n if (!datum) {\n return;\n }\n const xValues: any = {};\n /*\n compute the min x value\n eg: When data has objects\n input: [{x:1, y:2}, {x:2, y:3}, {x:3, y:4}]\n min x: 1\n eg: When data has arrays\n input: [[10, 20], [20, 30], [30, 40]];\n min x: 10\n */\n xValues.min = minBy(datum, (dataObject: {x: any, y: any}) => dataObject.x) || {x: undefined};\n /*\n compute the max x value\n eg: When data has objects\n input: [{x:1, y:2}, {x:2, y:3}, {x:3, y:4}]\n max x: 3\n eg: When data has arrays\n input: [[10, 20], [20, 30], [30, 40]];\n max x: 30\n */\n xValues.max = maxBy(datum, (dataObject: {x: any, y: any}) => dataObject.x)|| {x: undefined};\n return xValues;\n }\n\n // Getting the min and max values among all the y values\n getYMinMaxValues(datum: Array<Array<{x: any, y: number}>>) {\n const yValues: any = {},\n minValues: any = [],\n maxValues: any = [];\n if (!datum) {\n return;\n }\n\n /*\n Getting the min and max y values among all the series of data\n compute the min y value\n eg: When data has objects\n input: [[{x:1, y:2}, {x:2, y:3}, {x:3, y:4}], [{x:2, y:3}, {x:3, y:4}, {x:4, y:5}]]\n min y values : '2'(among first set) & '3'(among second set)\n max y values : '4'(among first set) & '5'(among second set)\n\n eg: When data has arrays\n input: [[[10, 20], [20, 30], [30, 40]], [[20, 30], [30, 40], [40, 50]]]\n min y values : '20'(among first set) & '30'(among second set)\n max y values : '40'(among first set) & '50'(among second set)\n */\n\n forEach(datum, data => {\n if (data && !isEmpty(data)) {\n minValues.push(minBy(data, (dataObject: {x: any, y: any}) => { return dataObject.y }));\n maxValues.push(maxBy(data, (dataObject: {x: any, y: any}) => { return dataObject.y }));\n }\n });\n // Gets the least and highest values among all the min and max values of respective series of data\n yValues.min = minBy(minValues, (dataObject: {x: any, y: any}) => dataObject.y) || {y: undefined};\n yValues.max = maxBy(maxValues, (dataObject: {x: any, y: any}) => dataObject.y) || {y: undefined};\n return yValues;\n }\n\n setHeightWidthOnChart(cb?: () => void) {\n let height = this.styles.root.height || 250;\n let width = this.styles.root.width || screenWidth;\n if (height && typeof height === 'string') {\n height = parseInt(height);\n }\n if (width && typeof width === 'string') {\n width = parseInt(width);\n }\n this.updateState({\n chartHeight: height,\n chartWidth: width\n } as S, cb);\n }\n\n applyTheme(props: BaseChartComponentProps) {\n let themeName = props.theme ? props.theme : (props.type === 'Pie' ? 'Azure' : 'Terrestrial');\n let colorsToUse = [];\n if (typeof props.customcolors === 'string' && !isEmpty(props.customcolors)) {\n colorsToUse = props.customcolors.split(',').map(trim);\n }\n let themeToUse;\n if (typeof themeName === 'string') {\n if (!colorsToUse.length) {\n colorsToUse = ThemeFactory.getColorsObj(themeName);\n }\n themeToUse = ThemeFactory.getTheme(themeName, this.props.styles, colorsToUse);\n } else if (typeof themeName === 'object') {\n // if theme is passed as an object then use that custom theme.\n themeToUse = props.theme;\n }\n this.updateState({\n colors: colorsToUse,\n theme: themeToUse\n } as S);\n }\n\n prepareLegendData() {\n if (this.state.yAxis) {\n let ldata = this.state.yAxis.map((d: string) => {\n return {\n name: d\n }\n });\n this.updateState({\n legendData: ldata\n } as S);\n }\n }\n\n prepareEvents(name: string) {\n return this.state.legendData.map((_: any, idx: number) => {\n return {\n childName: ['legend'],\n target: 'data',\n eventKey: String(idx),\n eventHandlers: {\n onClick: () => {\n return [\n {\n childName: [name + '_' + idx],\n target: 'data',\n eventKey: 'all',\n mutation: (props: any) => {\n return null;\n }\n }\n ];\n },\n onMouseOver: () => {\n },\n onMouseOut: () => {\n }\n }\n };\n });\n }\n\n // If date string is bound to xaxis then we are pushing the x values as indexes.\n getxAxisVal(dataObj: {[key: string] : any}, xKey: string, index: number, xaxisDatakeyArr: Array<any>) {\n const value: any = get(dataObj, xKey);\n if (moment(value, true).isValid() || isNaN(value)) {\n xaxisDatakeyArr.push(value);\n return index;\n }\n return value;\n }\n\n prepareDataItems(dataset: any) {\n let xaxis = this.props.xaxisdatakey;\n let yaxis = this.props.yaxisdatakey;\n let xaxisDatakeyArr: Array<any> = [];\n let datasets: any = [];\n\n if (xaxis && yaxis) {\n let yPts = yaxis.split(',');\n yPts.forEach((y: any) => {\n if (xaxis !== y) {\n datasets.push(dataset.map((o: {[key: string] : any}, xindex: number) => {\n const xVal = this.getxAxisVal(o, xaxis, xindex, xaxisDatakeyArr);\n let yVal: string | number = get(o, y);\n if (typeof yVal === 'string') {\n yVal = parseFloat(yVal) || yVal;\n }\n let dataObj = {\n x: xVal,\n y: yVal,\n };\n if (this.props.bubblesize) {\n set(dataObj, 'size', get(o, this.props.bubblesize, 5));\n }\n if (this.props.shape) {\n set(dataObj, 'symbol', shapes[this.props.shape]);\n }\n return dataObj;\n }));\n }\n });\n // chartTransform\n this.invokeEventCallback('onTransform', [undefined, this.proxy]);\n if (this.props.type == 'Pie' || this.props.type === 'Donut') {\n // for animation effect\n setTimeout(() => {\n this.updateState({\n endAngle: 360,\n } as S);\n }, 500);\n }\n this.updateData(datasets, yPts, xaxisDatakeyArr);\n }\n }\n\n\n protected renderLoadingIcon() {\n return (<WmIcon styles={this.styles.loadingIcon}\n iconclass={this.props.loadingicon}\n caption={this.props.loadingdatamsg}></WmIcon>);\n }\n\n updateData(datasets: any, yPts: any, xaxisDatakeyArr: Array<any>) {\n this.updateState({\n data: datasets as any,\n yAxis: yPts,\n xaxisDatakeyArr: xaxisDatakeyArr\n } as S, () => {\n this.prepareLegendData();\n if (!this.props.labeltype || this.props.labeltype === 'percent') {\n this.setTotal(this.state.data[0]);\n }\n if (this.isAxisDomainSupported(this.props.type) && (this.props.ydomain || this.props.xdomain)) {\n this.setDomainValues();\n }\n this.updateState({\n loading: false\n } as S);\n });\n }\n\n setTotal(data: Array<{x: any, y: number}>) {\n let total = 0;\n data.forEach((d: {x: any, y: any}) => {\n total += d.y as number;\n });\n this.updateState({\n total: total\n } as S);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n let units = '';\n switch(name) {\n case 'customcolors':\n if (isEmpty($new)) {\n return;\n }\n if (typeof $new === 'string') {\n $new = $new.split(',');\n }\n this.updateState({\n colors: $new\n } as S);\n break;\n case 'theme':\n this.applyTheme(this.props);\n break;\n case 'dataset':\n if (!isEmpty($new) && isObject($new) && !isArray($new)) {\n $new = [$new];\n }\n $new && this.prepareDataItems($new);\n break;\n case 'xaxislabel':\n if (this.props.xunits) {\n units = ' (' + this.props.xunits + ')';\n }\n this.updateState({\n xLabel: $new + units\n } as S);\n break;\n case 'yaxislabel':\n if (this.props.yunits) {\n units = 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AE;UACrBqG,KAAK,GAAG,IAAI,GAAG,IAAI,CAACtJ,KAAK,CAACiD,MAAM,GAAG,GAAG;QACxC;QACA,IAAI,CAACqB,WAAW,CAAC;UACfkF,MAAM,EAAEJ,IAAI,GAAGE;QACjB,CAAC,CAAM;QACP;IAAM;EAEZ;AACF"}
|
|
1
|
+
{"version":3,"names":["React","Dimensions","moment","forEach","get","isArray","isEmpty","isObject","maxBy","minBy","set","trim","VictoryAxis","VictoryLegend","VictoryLabel","BaseComponent","BaseComponentState","WmIcon","ThemeFactory","DEFAULT_CLASS","BaseChartComponentState","constructor","arguments","_defineProperty","undefined","screenWidth","width","shapes","SI_SYMBOL","BaseChartComponent","props","defaultClass","length","defaultProps","defaultState","theme","applyTheme","componentDidMount","abbreviateNumber","number","tier","Math","log10","abs","suffix","scale","pow","scaled","toFixed","getLegendView","showlegend","top","parseInt","styles","root","height","orientation","createElement","name","gutter","data","state","legendData","style","border","stroke","borderPadding","left","y","getYScaleMinValue","value","_min","floor","getXaxis","showxaxis","crossAxis","label","xaxislabel","xaxisdatakey","xunits","grid","fixLabelOverlap","tickLabelComponent","angle","labelangle","tickFormat","d","xaxisDatakeyArr","getYAxis","showyaxis","yaxislabel","yaxisdatakey","yunits","axisLabel","padding","yaxislabeldistance","t","dependentAxis","isAxisDomainSupported","type","isAxisDomainValid","axis","areMinMaxValuesValid","values","isFinite","min","max","setDomainValues","xDomainValues","yDomainValues","x","getXMinMaxValues","getYMinMaxValues","updateState","chartMinX","chartMaxX","yMin","chartMinY","chartMaxY","datum","xValues","dataObject","yValues","minValues","maxValues","push","setHeightWidthOnChart","cb","chartHeight","chartWidth","themeName","colorsToUse","customcolors","split","map","themeToUse","getColorsObj","getTheme","colors","prepareLegendData","yAxis","ldata","prepareEvents","_","idx","childName","target","eventKey","String","eventHandlers","onClick","mutation","onMouseOver","onMouseOut","getxAxisVal","dataObj","xKey","index","isValid","isNaN","prepareDataItems","dataset","xaxis","yaxis","datasets","yPts","o","xindex","xVal","yVal","parseFloat","bubblesize","shape","invokeEventCallback","proxy","setTimeout","endAngle","updateData","renderLoadingIcon","loadingIcon","iconclass","loadingicon","caption","loadingdatamsg","labeltype","setTotal","ydomain","xdomain","loading","total","onPropertyChange","$new","$old","units","xLabel","yLabel"],"sources":["basechart.component.tsx"],"sourcesContent":["import React from \"react\";\nimport { Dimensions } from 'react-native';\nimport moment from \"moment\";\nimport {forEach, get, isArray, isEmpty, isObject, maxBy, minBy, set, trim} from \"lodash-es\";\nimport { ScatterSymbolType } from \"victory-core\";\nimport {VictoryAxis, VictoryLegend, VictoryLabel} from \"victory-native\";\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.component\";\nimport ThemeFactory from \"@wavemaker/app-rn-runtime/components/chart/theme/chart.theme\";\n\nimport BaseChartComponentProps from \"./basechart.props\";\nimport { DEFAULT_CLASS, BaseChartComponentStyles} from \"./basechart.styles\";\n\nexport class BaseChartComponentState <T extends BaseChartComponentProps> extends BaseComponentState<T> {\n data: any = [];\n content: any = null;\n yAxis: Array<string> = [];\n xaxisDatakeyArr: Array<any> = [];\n legendData: any = [];\n theme: any;\n colors: any;\n xLabel: string = '';\n yLabel: string = '';\n total: number = 0;\n endAngle: number = 0;\n loading: boolean = true;\n chartHeight: number = 0;\n chartWidth: number = 0;\n chartMinY: number | undefined = undefined;\n chartMinX: number | undefined = undefined;\n chartMaxY: number | undefined = undefined;\n chartMaxX: number | undefined = undefined;\n}\n\nconst screenWidth = Dimensions.get(\"window\").width;\n\nconst shapes: {[key: string]: ScatterSymbolType} = {\n 'circle': 'circle',\n 'cross': 'cross',\n 'diamond': 'diamond',\n 'plus': 'plus',\n 'minus': 'minus',\n 'square': 'square',\n 'star': 'star',\n 'triangle-down': 'triangleDown',\n 'triangle-up': 'triangleUp'\n};\n\nconst SI_SYMBOL = [\"\", \"k\", \"M\", \"G\", \"T\", \"P\", \"E\"];\n\nexport abstract class BaseChartComponent<T extends BaseChartComponentProps, S extends BaseChartComponentState<T>, L extends BaseChartComponentStyles> extends BaseComponent<T, S, L> {\n protected screenWidth: number = screenWidth;\n constructor(props: T, public defaultClass: string = DEFAULT_CLASS, defaultProps?: T, defaultState?: S) {\n super(props, defaultClass, defaultProps, defaultState);\n if (!props.theme) {\n this.applyTheme(props);\n }\n }\n\n componentDidMount() {\n super.componentDidMount();\n }\n\n abbreviateNumber(number: any) {\n if (typeof number !== 'number') {\n return number;\n }\n const tier = Math.log10(Math.abs(number)) / 3 | 0;\n\n if (tier == 0) {\n return number;\n }\n\n // get suffix and determine scale\n const suffix = SI_SYMBOL[tier];\n const scale = Math.pow(10, tier * 3);\n\n // scale the number\n var scaled = number / scale;\n\n // format number and add suffix\n return scaled.toFixed(1) + suffix;\n }\n\n getLegendView() {\n if (this.props.showlegend === 'hide') {\n return null;\n }\n let top = this.props.showlegend === 'bottom' ? parseInt(this.styles.root.height as string) : 0;\n if (top) {\n top = top - (50); // remove legendHeight\n }\n const orientation = (this.props.showlegend === 'right' || this.props.showlegend === 'left') ? 'vertical' : 'horizontal';\n return <VictoryLegend\n name={'legendData'}\n orientation={orientation}\n gutter={20}\n data={this.state.legendData}\n style={{ border: { stroke: 'none' } }}\n borderPadding={{top: 30, left: 50}}\n y={top}\n />\n }\n\n getYScaleMinValue(value: number) {\n const _min = Math.floor(value);\n return Math.abs(value) - _min > 0 ? value - .1 : _min - 1;\n };\n\n // x axis with vertical lines having grid stroke colors\n getXaxis() {\n if (this.props.showxaxis === false) {\n return null;\n }\n return <VictoryAxis crossAxis label={(this.props.xaxislabel || this.props.xaxisdatakey) + (this.props.xunits ? `(${this.props.xunits})` : '')}\n style={{\n grid: this.styles.grid\n }}\n fixLabelOverlap={true}\n tickLabelComponent={<VictoryLabel angle={this.props.labelangle || 0} />} theme={this.state.theme}\n tickFormat={(d) => `${this.state.xaxisDatakeyArr.length ? this.state.xaxisDatakeyArr[d] : d}`}/>;\n }\n /* y axis with horizontal lines having grid stroke colors*/\n getYAxis() {\n if (this.props.showyaxis === false) {\n return null;\n }\n return <VictoryAxis crossAxis label={(this.props.yaxislabel || this.props.yaxisdatakey) + (this.props.yunits ? `(${this.props.yunits})` : '')}\n style={{\n axisLabel: {padding: this.props.yaxislabeldistance},\n grid: this.styles.grid\n }}\n theme={this.state.theme}\n tickFormat={(t) => `${this.abbreviateNumber(t)}`} dependentAxis />;\n }\n\n // X/Y Domain properties are supported only for Column and Area charts\n isAxisDomainSupported(type: string) {\n return type === 'Column'|| type === 'Area';\n }\n\n // Check whether X/Y Domain was set to Min and is supported for the present chart\n isAxisDomainValid(axis: string) {\n if (get(this.props, axis + 'domain') === 'Min' && (this.isAxisDomainSupported(this.props.type))) {\n return true;\n }\n return false;\n };\n\n// Check whether min and max values are finite or not\n areMinMaxValuesValid(values: any) {\n if (isFinite(values.min) && isFinite(values.max)) {\n return true;\n }\n return false;\n };\n\n setDomainValues() {\n let xDomainValues, yDomainValues;\n if (this.state.data.length > 0) {\n if (this.isAxisDomainValid('x') && typeof this.state.data[0].x === 'number') {\n xDomainValues = this.getXMinMaxValues(this.state.data[0]);\n }\n if (this.isAxisDomainValid('y')) {\n yDomainValues = this.getYMinMaxValues(this.state.data);\n }\n if (xDomainValues) {\n this.updateState({\n chartMinX: yDomainValues.min.x,\n chartMaxX: yDomainValues.max.x\n } as S)\n }\n let yMin;\n if (yDomainValues) {\n if (this.areMinMaxValuesValid({max: yDomainValues.max.y, min: yDomainValues.min.y})) {\n yMin = this.getYScaleMinValue(yDomainValues.min.y);\n }\n this.updateState({\n chartMinY: yMin ? yMin : yDomainValues.min.y,\n chartMaxY: yDomainValues.max.y\n } as S);\n }\n }\n }\n\n // Getting the min and max values among all the x values\n getXMinMaxValues(datum: Array<{x: number, y: any}>) {\n if (!datum) {\n return;\n }\n const xValues: any = {};\n /*\n compute the min x value\n eg: When data has objects\n input: [{x:1, y:2}, {x:2, y:3}, {x:3, y:4}]\n min x: 1\n eg: When data has arrays\n input: [[10, 20], [20, 30], [30, 40]];\n min x: 10\n */\n xValues.min = minBy(datum, (dataObject: {x: any, y: any}) => dataObject.x) || {x: undefined};\n /*\n compute the max x value\n eg: When data has objects\n input: [{x:1, y:2}, {x:2, y:3}, {x:3, y:4}]\n max x: 3\n eg: When data has arrays\n input: [[10, 20], [20, 30], [30, 40]];\n max x: 30\n */\n xValues.max = maxBy(datum, (dataObject: {x: any, y: any}) => dataObject.x)|| {x: undefined};\n return xValues;\n }\n\n // Getting the min and max values among all the y values\n getYMinMaxValues(datum: Array<Array<{x: any, y: number}>>) {\n const yValues: any = {},\n minValues: any = [],\n maxValues: any = [];\n if (!datum) {\n return;\n }\n\n /*\n Getting the min and max y values among all the series of data\n compute the min y value\n eg: When data has objects\n input: [[{x:1, y:2}, {x:2, y:3}, {x:3, y:4}], [{x:2, y:3}, {x:3, y:4}, {x:4, y:5}]]\n min y values : '2'(among first set) & '3'(among second set)\n max y values : '4'(among first set) & '5'(among second set)\n\n eg: When data has arrays\n input: [[[10, 20], [20, 30], [30, 40]], [[20, 30], [30, 40], [40, 50]]]\n min y values : '20'(among first set) & '30'(among second set)\n max y values : '40'(among first set) & '50'(among second set)\n */\n\n forEach(datum, data => {\n if (data && !isEmpty(data)) {\n minValues.push(minBy(data, (dataObject: {x: any, y: any}) => { return dataObject.y }));\n maxValues.push(maxBy(data, (dataObject: {x: any, y: any}) => { return dataObject.y }));\n }\n });\n // Gets the least and highest values among all the min and max values of respective series of data\n yValues.min = minBy(minValues, (dataObject: {x: any, y: any}) => dataObject.y) || {y: undefined};\n yValues.max = maxBy(maxValues, (dataObject: {x: any, y: any}) => dataObject.y) || {y: undefined};\n return yValues;\n }\n\n setHeightWidthOnChart(cb?: () => void) {\n let height = this.styles.root.height || 250;\n let width = this.styles.root.width || screenWidth;\n if (height && typeof height === 'string') {\n height = parseInt(height);\n }\n if (width && typeof width === 'string') {\n width = parseInt(width);\n }\n this.updateState({\n chartHeight: height,\n chartWidth: width\n } as S, cb);\n }\n\n applyTheme(props: BaseChartComponentProps) {\n let themeName = props.theme ? props.theme : (props.type === 'Pie' ? 'Azure' : 'Terrestrial');\n let colorsToUse = [];\n if (typeof props.customcolors === 'string' && !isEmpty(props.customcolors)) {\n colorsToUse = props.customcolors.split(',').map(trim);\n }\n let themeToUse;\n if (typeof themeName === 'string') {\n if (!colorsToUse.length) {\n colorsToUse = ThemeFactory.getColorsObj(themeName);\n }\n themeToUse = ThemeFactory.getTheme(themeName, this.props.styles, colorsToUse);\n } else if (typeof themeName === 'object') {\n // if theme is passed as an object then use that custom theme.\n themeToUse = props.theme;\n }\n this.updateState({\n colors: colorsToUse,\n theme: themeToUse\n } as S);\n }\n\n prepareLegendData() {\n if (this.state.yAxis) {\n let ldata = this.state.yAxis.map((d: string) => {\n return {\n name: d\n }\n });\n this.updateState({\n legendData: ldata\n } as S);\n }\n }\n\n prepareEvents(name: string) {\n return this.state.legendData.map((_: any, idx: number) => {\n return {\n childName: ['legend'],\n target: 'data',\n eventKey: String(idx),\n eventHandlers: {\n onClick: () => {\n return [\n {\n childName: [name + '_' + idx],\n target: 'data',\n eventKey: 'all',\n mutation: (props: any) => {\n return null;\n }\n }\n ];\n },\n onMouseOver: () => {\n },\n onMouseOut: () => {\n }\n }\n };\n });\n }\n\n // If date string is bound to xaxis then we are pushing the x values as indexes.\n getxAxisVal(dataObj: {[key: string] : any}, xKey: string, index: number, xaxisDatakeyArr: Array<any>) {\n const value: any = get(dataObj, xKey);\n if (moment(value, true).isValid() || isNaN(value)) {\n xaxisDatakeyArr.push(value);\n return index;\n }\n return value;\n }\n\n prepareDataItems(dataset: any) {\n let xaxis = this.props.xaxisdatakey;\n let yaxis = this.props.yaxisdatakey;\n let xaxisDatakeyArr: Array<any> = [];\n let datasets: any = [];\n\n if (xaxis && yaxis) {\n let yPts = yaxis.split(',');\n yPts.forEach((y: any) => {\n if (xaxis !== y) {\n datasets.push(dataset.map((o: {[key: string] : any}, xindex: number) => {\n const xVal = this.getxAxisVal(o, xaxis, xindex, xaxisDatakeyArr);\n let yVal: string | number = get(o, y);\n if (typeof yVal === 'string') {\n yVal = parseFloat(yVal) || yVal;\n }\n let dataObj = {\n x: xVal,\n y: yVal,\n };\n if (this.props.bubblesize) {\n set(dataObj, 'size', get(o, this.props.bubblesize, 5));\n }\n if (this.props.shape) {\n set(dataObj, 'symbol', shapes[this.props.shape]);\n }\n return dataObj;\n }));\n }\n });\n // chartTransform\n this.invokeEventCallback('onTransform', [undefined, this.proxy]);\n if (this.props.type == 'Pie' || this.props.type === 'Donut') {\n // for animation effect\n setTimeout(() => {\n this.updateState({\n endAngle: 360,\n } as S);\n }, 500);\n }\n this.updateData(datasets, yPts, xaxisDatakeyArr);\n }\n }\n\n\n protected renderLoadingIcon() {\n return (<WmIcon styles={this.styles.loadingIcon}\n iconclass={this.props.loadingicon}\n caption={this.props.loadingdatamsg}></WmIcon>);\n }\n\n updateData(datasets: any, yPts: any, xaxisDatakeyArr: Array<any>) {\n this.updateState({\n data: datasets as any,\n yAxis: yPts,\n xaxisDatakeyArr: xaxisDatakeyArr\n } as S, () => {\n this.prepareLegendData();\n if (!this.props.labeltype || this.props.labeltype === 'percent') {\n this.setTotal(this.state.data[0]);\n }\n if (this.isAxisDomainSupported(this.props.type) && (this.props.ydomain || this.props.xdomain)) {\n this.setDomainValues();\n }\n this.updateState({\n loading: false\n } as S);\n });\n }\n\n setTotal(data: Array<{x: any, y: number}>) {\n let total = 0;\n data.forEach((d: {x: any, y: any}) => {\n total += d.y as number;\n });\n this.updateState({\n total: total\n } as S);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n let units = '';\n switch(name) {\n case 'customcolors':\n if (isEmpty($new)) {\n return;\n }\n if (typeof $new === 'string') {\n $new = $new.split(',');\n }\n this.updateState({\n colors: $new\n } as S);\n break;\n case 'theme':\n this.applyTheme(this.props);\n break;\n case 'dataset':\n if (!isArray($new)) {\n if (isObject($new) && !isEmpty($new)) {\n $new = [$new];\n } else {\n $new = [];\n }\n }\n $new && this.prepareDataItems($new);\n break;\n case 'xaxislabel':\n if (this.props.xunits) {\n units = ' (' + this.props.xunits + ')';\n }\n this.updateState({\n xLabel: $new + units\n } as S);\n break;\n case 'yaxislabel':\n if (this.props.yunits) {\n units = ' (' + this.props.yunits + ')';\n }\n this.updateState({\n yLabel: $new + units\n } as S);\n break;\n }\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,MAAM,MAAM,QAAQ;AAC3B,SAAQC,OAAO,EAAEC,GAAG,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,KAAK,EAAEC,GAAG,EAAEC,IAAI,QAAO,WAAW;AAE3F,SAAQC,WAAW,EAAEC,aAAa,EAAEC,YAAY,QAAO,gBAAgB;AAEvE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,YAAY,MAAO,8DAA8D;AAGxF,SAASC,aAAa,QAAiC,oBAAoB;AAE3E,OAAO,MAAMC,uBAAuB,SAA6CJ,kBAAkB,CAAI;EAAAK,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,eACzF,EAAE;IAAAA,eAAA,kBACC,IAAI;IAAAA,eAAA,gBACI,EAAE;IAAAA,eAAA,0BACK,EAAE;IAAAA,eAAA,qBACd,EAAE;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,iBAGH,EAAE;IAAAA,eAAA,iBACF,EAAE;IAAAA,eAAA,gBACH,CAAC;IAAAA,eAAA,mBACE,CAAC;IAAAA,eAAA,kBACD,IAAI;IAAAA,eAAA,sBACD,CAAC;IAAAA,eAAA,qBACF,CAAC;IAAAA,eAAA,oBACUC,SAAS;IAAAD,eAAA,oBACTC,SAAS;IAAAD,eAAA,oBACTC,SAAS;IAAAD,eAAA,oBACTC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D,OAAO,CAACyL,IAAI,CAAC,EAAE;UACjB;QACF;QACA,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;UAC5BA,IAAI,GAAGA,IAAI,CAAC1D,KAAK,CAAC,GAAG,CAAC;QACxB;QACA,IAAI,CAACpB,WAAW,CAAC;UACfyB,MAAM,EAAEqD;QACV,CAAM,CAAC;QACP;MACF,KAAK,OAAO;QACV,IAAI,CAAC3J,UAAU,CAAC,IAAI,CAACN,KAAK,CAAC;QAC3B;MACF,KAAK,SAAS;QACZ,IAAI,CAACzB,OAAO,CAAC0L,IAAI,CAAC,EAAE;UAClB,IAAIxL,QAAQ,CAACwL,IAAI,CAAC,IAAI,CAACzL,OAAO,CAACyL,IAAI,CAAC,EAAE;YACpCA,IAAI,GAAG,CAACA,IAAI,CAAC;UACf,CAAC,MAAM;YACLA,IAAI,GAAG,EAAE;UACX;QACF;QACAA,IAAI,IAAI,IAAI,CAAC/B,gBAAgB,CAAC+B,IAAI,CAAC;QACnC;MACF,KAAK,YAAY;QACf,IAAI,IAAI,CAACjK,KAAK,CAACiD,MAAM,EAAE;UACrBkH,KAAK,GAAG,IAAI,GAAG,IAAI,CAACnK,KAAK,CAACiD,MAAM,GAAG,GAAG;QACxC;QACA,IAAI,CAACkC,WAAW,CAAC;UACfiF,MAAM,EAAEH,IAAI,GAAGE;QACjB,CAAM,CAAC;QACP;MACF,KAAK,YAAY;QACf,IAAI,IAAI,CAACnK,KAAK,CAAC8D,MAAM,EAAE;UACrBqG,KAAK,GAAG,IAAI,GAAG,IAAI,CAACnK,KAAK,CAAC8D,MAAM,GAAG,GAAG;QACxC;QACA,IAAI,CAACqB,WAAW,CAAC;UACfkF,MAAM,EAAEJ,IAAI,GAAGE;QACjB,CAAM,CAAC;QACP;IACJ;EACF;AACF"}
|
|
@@ -7,6 +7,7 @@ export default class BaseChartComponentProps extends BaseProps {
|
|
|
7
7
|
super(...arguments);
|
|
8
8
|
_defineProperty(this, "xaxisdatakey", '');
|
|
9
9
|
_defineProperty(this, "yaxisdatakey", '');
|
|
10
|
+
_defineProperty(this, "iconclass", '');
|
|
10
11
|
_defineProperty(this, "dataset", void 0);
|
|
11
12
|
_defineProperty(this, "type", '');
|
|
12
13
|
_defineProperty(this, "title", '');
|