@wavemaker/app-rn-runtime 11.5.2-next.141021 → 11.5.2-next.141025
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/components/advanced/carousel/carousel.component.js +9 -14
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +3 -6
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js +14 -33
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.props.js +1 -3
- app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +8 -22
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.props.js +0 -7
- app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js +0 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
- app-rn-runtime/components/basic/animatedview.component.js +3 -5
- app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +7 -40
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.props.js +0 -7
- app-rn-runtime/components/basic/button/button.props.js.map +1 -1
- app-rn-runtime/components/basic/button/button.styles.js +6 -6
- app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +5 -13
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +12 -64
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.props.js +0 -7
- app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.styles.js +1 -2
- app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +25 -34
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.props.js +0 -3
- app-rn-runtime/components/basic/label/label.props.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js +5 -4
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/message/message.component.js +2 -3
- app-rn-runtime/components/basic/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/message/message.props.js +0 -3
- app-rn-runtime/components/basic/message/message.props.js.map +1 -1
- app-rn-runtime/components/basic/message/message.styles.js +1 -3
- app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +2 -4
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.props.js +0 -3
- app-rn-runtime/components/basic/picture/picture.props.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.styles.js +1 -2
- app-rn-runtime/components/basic/picture/picture.styles.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +3 -3
- 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 +0 -2
- app-rn-runtime/components/basic/progress-bar/progress-bar.props.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +2 -3
- 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 +0 -2
- app-rn-runtime/components/basic/progress-circle/progress-circle.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +1 -2
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +0 -3
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +5 -6
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js +2 -4
- app-rn-runtime/components/basic/video/video.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.props.js +0 -3
- app-rn-runtime/components/basic/video/video.props.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +16 -23
- 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 +16 -29
- 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 +2 -0
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +7 -33
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +2 -7
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js +2 -9
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +2 -4
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.component.js +18 -23
- 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 +4 -7
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +10 -33
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +0 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +2 -11
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.props.js +0 -1
- app-rn-runtime/components/container/container.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +2 -6
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.props.js +0 -4
- app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +14 -17
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +3 -19
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +2 -27
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +0 -6
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +3 -7
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.props.js +0 -4
- app-rn-runtime/components/data/card/card.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.styles.js +1 -2
- app-rn-runtime/components/data/form/form-action/form-action.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +1 -5
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +6 -58
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -4
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js +0 -3
- app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +6 -13
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.component.js +1 -4
- app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.props.js +0 -3
- app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.styles.js +4 -12
- app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +0 -4
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js +0 -4
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +1 -2
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +0 -4
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js +0 -4
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +3 -7
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.props.js +0 -4
- app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js +2 -11
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
- app-rn-runtime/components/input/basedataset/basedataset.props.js +0 -4
- app-rn-runtime/components/input/basedataset/basedataset.props.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +2 -2
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.props.js +0 -4
- app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +10 -16
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js +0 -4
- app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +5 -12
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js +5 -35
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +6 -13
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +10 -39
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +1 -5
- app-rn-runtime/components/input/chips/chips.component.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 +1 -1
- app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +2 -18
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.props.js +0 -1
- app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +1 -19
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +10 -76
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.component.js +0 -8
- app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.styles.js +0 -16
- app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.component.js +0 -8
- app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js +0 -5
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +1 -49
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.component.js +0 -8
- app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.styles.js +0 -16
- app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js +0 -2
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.props.js +0 -2
- app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.styles.js +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.styles.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +1 -13
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.props.js +0 -1
- app-rn-runtime/components/input/number/number.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +0 -17
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +2 -7
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +3 -7
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.styles.js +1 -5
- app-rn-runtime/components/input/select/select.styles.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.styles.js +3 -3
- app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +1 -8
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +5 -10
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +1 -13
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +0 -1
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js +0 -17
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +1 -13
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js +0 -1
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.styles.js +0 -17
- app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +5 -48
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.props.js +0 -4
- app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.styles.js +12 -5
- app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +1 -6
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js +0 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +1 -9
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js +2 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.styles.js +5 -8
- app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +5 -8
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.props.js +0 -3
- app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js +3 -10
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.props.js +0 -7
- app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.styles.js +2 -8
- app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js +8 -42
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.styles.js +16 -82
- app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
- app-rn-runtime/core/base.component.js +2 -15
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/textinput.component.js +2 -25
- app-rn-runtime/core/components/textinput.component.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +10 -37
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/utils.js +0 -11
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/gestures/swipe.animation.js +1 -34
- app-rn-runtime/gestures/swipe.animation.js.map +1 -1
- app-rn-runtime/package.json +3 -5
- app-rn-runtime/runtime/App.js +0 -4
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +1 -1
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +1 -2
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/runtime/services/webprocess.service.js +1 -0
- app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
- app-rn-runtime/styles/theme.js +0 -36
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +3 -26
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/model-variable.js +1 -2
- app-rn-runtime/variables/model-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +0 -1
- app-rn-runtime/variables/service-variable.js.map +1 -1
- app-rn-runtime/components/chart/staticdata.js +0 -215
- app-rn-runtime/components/chart/staticdata.js.map +0 -1
- app-rn-runtime/components/page/tabbar/curve.js +0 -84
- app-rn-runtime/components/page/tabbar/curve.js.map +0 -1
- app-rn-runtime/core/accessibility.js +0 -149
- app-rn-runtime/core/accessibility.js.map +0 -1
- app-rn-runtime/core/components/floatinglabel.component.js +0 -45
- app-rn-runtime/core/components/floatinglabel.component.js.map +0 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
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; }
|
|
3
2
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
4
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); }
|
|
@@ -8,7 +7,6 @@ import { ResizeMode, Video } from 'expo-av';
|
|
|
8
7
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
9
8
|
import WmVideoProps from './video.props';
|
|
10
9
|
import { DEFAULT_CLASS } from './video.styles';
|
|
11
|
-
import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
|
|
12
10
|
import { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';
|
|
13
11
|
export class WmVideoState extends BaseComponentState {}
|
|
14
12
|
export default class WmVideo extends BaseComponent {
|
|
@@ -37,7 +35,7 @@ export default class WmVideo extends BaseComponent {
|
|
|
37
35
|
renderWidget(props) {
|
|
38
36
|
return /*#__PURE__*/React.createElement(View, {
|
|
39
37
|
style: this.styles.root
|
|
40
|
-
}, this._background, /*#__PURE__*/React.createElement(Video,
|
|
38
|
+
}, this._background, /*#__PURE__*/React.createElement(Video, {
|
|
41
39
|
ref: video => {
|
|
42
40
|
this.video = video;
|
|
43
41
|
},
|
|
@@ -53,7 +51,7 @@ export default class WmVideo extends BaseComponent {
|
|
|
53
51
|
isLooping: props.loop,
|
|
54
52
|
isMuted: props.muted,
|
|
55
53
|
testID: this.getTestId('video')
|
|
56
|
-
}))
|
|
54
|
+
}));
|
|
57
55
|
}
|
|
58
56
|
}
|
|
59
57
|
//# sourceMappingURL=video.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","ResizeMode","Video","BaseComponent","BaseComponentState","WmVideoProps","DEFAULT_CLASS","
|
|
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","testID","getTestId"],"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 testID={this.getTestId('video')}\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,QAAQ,+CAA+C;AAEjG,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAE7D,SAASC,aAAa,QAAQ,sCAAsC;AAEpE,OAAO,MAAMC,YAAY,SAASJ,kBAAkB,CAAe;AAEnE,eAAe,MAAMK,OAAO,SAASN,aAAa,CAA4C;EAI5FO,WAAWA,CAACC,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,EAAE,IAAIG,YAAY,CAAC,CAAC,CAAC;IAACI,eAAA,gBAHxC,IAAI;EAIlC;EAEAC,SAASA,CAACC,IAA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,CACG,CAAC;EACX;AACF"}
|
|
@@ -17,9 +17,6 @@ export default class WmVideoProps extends BaseProps {
|
|
|
17
17
|
_defineProperty(this, "videopreload", 'none');
|
|
18
18
|
_defineProperty(this, "videosupportmessage", 'Your browser does not support the video tag.');
|
|
19
19
|
_defineProperty(this, "webmformat", null);
|
|
20
|
-
_defineProperty(this, "accessibilitylabel", undefined);
|
|
21
|
-
_defineProperty(this, "hint", undefined);
|
|
22
|
-
_defineProperty(this, "accessibilityrole", 'none');
|
|
23
20
|
}
|
|
24
21
|
}
|
|
25
22
|
//# sourceMappingURL=video.props.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseProps","WmVideoProps","constructor","arguments","_defineProperty"
|
|
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"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
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; }
|
|
3
2
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
4
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); }
|
|
5
4
|
import React from 'react';
|
|
6
5
|
import Color from "color";
|
|
7
|
-
import { View,
|
|
8
|
-
import { Defs, LinearGradient, Stop } from 'react-native-svg';
|
|
9
|
-
import { VictoryArea, VictoryChart, VictoryStack, VictoryScatter, VictoryGroup } from "victory-native";
|
|
6
|
+
import { View, Platform } from 'react-native';
|
|
7
|
+
import { Defs, LinearGradient, Stop, Svg } from 'react-native-svg';
|
|
8
|
+
import { VictoryArea, VictoryChart, VictoryLegend, VictoryStack, VictoryScatter, VictoryGroup } from "victory-native";
|
|
10
9
|
import WmAreaChartProps from './area-chart.props';
|
|
11
10
|
import { DEFAULT_CLASS } from './area-chart.styles';
|
|
12
11
|
import { BaseChartComponent, BaseChartComponentState } from "@wavemaker/app-rn-runtime/components/chart/basechart.component";
|
|
13
|
-
import WmIcon from "@wavemaker/app-rn-runtime/components/basic/icon/icon.component";
|
|
14
12
|
import { isNumber } from 'lodash-es';
|
|
15
|
-
import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
|
|
16
13
|
export class WmAreaChartState extends BaseChartComponentState {
|
|
17
14
|
constructor() {
|
|
18
15
|
super(...arguments);
|
|
@@ -56,22 +53,10 @@ export default class WmAreaChart extends BaseChartComponent {
|
|
|
56
53
|
if (isNumber(this.state.chartMaxY) && isNumber(this.state.chartMinY) && this.state.chartMaxY > 0) {
|
|
57
54
|
gradientStop = (this.state.chartMaxY - this.state.chartMinY) * 100 / this.state.chartMaxY + '%';
|
|
58
55
|
}
|
|
59
|
-
return /*#__PURE__*/React.createElement(View,
|
|
56
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
60
57
|
style: this.styles.root,
|
|
61
58
|
onLayout: this.onViewLayoutChange.bind(this)
|
|
62
|
-
}
|
|
63
|
-
style: {
|
|
64
|
-
flexDirection: 'row',
|
|
65
|
-
alignItems: 'center'
|
|
66
|
-
}
|
|
67
|
-
}, props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
|
|
68
|
-
iconclass: props.iconclass,
|
|
69
|
-
styles: this.styles.icon
|
|
70
|
-
}) : null, /*#__PURE__*/React.createElement(Text, {
|
|
71
|
-
style: this.styles.title
|
|
72
|
-
}, props.title)), /*#__PURE__*/React.createElement(Text, {
|
|
73
|
-
style: this.styles.subHeading
|
|
74
|
-
}, props.subheading)), this.state.chartWidth ? /*#__PURE__*/React.createElement(VictoryChart, {
|
|
59
|
+
}, this.state.chartWidth ? /*#__PURE__*/React.createElement(VictoryChart, {
|
|
75
60
|
theme: this.state.theme,
|
|
76
61
|
height: this.styles.root.height,
|
|
77
62
|
width: this.state.chartWidth || 120,
|
|
@@ -83,7 +68,15 @@ export default class WmAreaChart extends BaseChartComponent {
|
|
|
83
68
|
},
|
|
84
69
|
minDomain: mindomain,
|
|
85
70
|
containerComponent: this.getTooltip(props)
|
|
86
|
-
},
|
|
71
|
+
}, /*#__PURE__*/React.createElement(VictoryLegend, {
|
|
72
|
+
name: 'legend',
|
|
73
|
+
containerComponent: /*#__PURE__*/React.createElement(Svg, null),
|
|
74
|
+
title: [props.title, props.subheading],
|
|
75
|
+
orientation: "horizontal",
|
|
76
|
+
gutter: 20,
|
|
77
|
+
data: [],
|
|
78
|
+
theme: this.state.theme
|
|
79
|
+
}), this.getLegendView(), this.getXaxis(), this.getYAxis(), /*#__PURE__*/React.createElement(VictoryStack, null, this.state.data.map((d, i) => {
|
|
87
80
|
return /*#__PURE__*/React.createElement(VictoryGroup, {
|
|
88
81
|
key: props.name + '_area_group_' + i
|
|
89
82
|
}, /*#__PURE__*/React.createElement(Defs, null, /*#__PURE__*/React.createElement(LinearGradient, {
|
|
@@ -109,7 +102,7 @@ export default class WmAreaChart extends BaseChartComponent {
|
|
|
109
102
|
strokeWidth: props.linethickness
|
|
110
103
|
}
|
|
111
104
|
},
|
|
112
|
-
data:
|
|
105
|
+
data: d
|
|
113
106
|
}), props.highlightpoints ? /*#__PURE__*/React.createElement(VictoryScatter, {
|
|
114
107
|
size: 5,
|
|
115
108
|
key: props.name + '_scatter' + i,
|
|
@@ -118,7 +111,7 @@ export default class WmAreaChart extends BaseChartComponent {
|
|
|
118
111
|
fill: Color(this.state.colors[i]).darken(0.2).rgb().toString()
|
|
119
112
|
}
|
|
120
113
|
},
|
|
121
|
-
data:
|
|
114
|
+
data: d,
|
|
122
115
|
events: [{
|
|
123
116
|
target: 'data',
|
|
124
117
|
eventHandlers: Platform.OS == "web" ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Color","View","Text","Platform","Defs","LinearGradient","Stop","VictoryArea","VictoryChart","VictoryStack","VictoryScatter","VictoryGroup","WmAreaChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","WmIcon","isNumber","AccessibilityWidgetType","getAccessibilityProps","WmAreaChartState","constructor","arguments","_defineProperty","WmAreaChart","props","e","viewWidth","nativeEvent","layout","width","updateState","chartWidth","onSelect","event","data","value","index","y","label","state","xaxisDatakeyArr","datum","x","selectedItem","dataset","selectedChartItem","series","_dataObj","invokeEventCallback","proxy","renderWidget","_this$state$data","length","mindomain","xdomain","chartMinX","undefined","ydomain","chartMinY","chartName","name","gradientStop","chartMaxY","createElement","_extends","LINECHART","style","styles","root","onLayout","onViewLayoutChange","bind","flexDirection","alignItems","iconclass","icon","title","subHeading","subheading","theme","height","padding","top","bottom","left","right","minDomain","containerComponent","getTooltip","getLegendView","getXaxis","getYAxis","map","d","i","key","id","x1","y1","x2","y2","offset","stopColor","colors","lighten","rgb","toString","interpolation","fill","stroke","strokeWidth","linethickness","isRTL","toReversed","highlightpoints","size","darken","events","target","eventHandlers","OS","onClick","onPress"],"sources":["area-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport Color from \"color\";\nimport { LayoutChangeEvent, View, Text, Platform } from 'react-native';\nimport { Defs, LinearGradient, Stop, Svg } from 'react-native-svg';\nimport { VictoryArea, VictoryLine, 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\";\nimport WmIcon from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.component\";\n\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nimport { isNil, isNumber } from 'lodash-es';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \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 onSelect(event: any, data: any){\n let value = data.data[data.index].y;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n }\n\n renderWidget(props: WmAreaChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data?.length) {\n return null;\n }\n let mindomain={\n x: props.xdomain === 'Min' ? this.state.chartMinX: undefined,\n y: props.ydomain === 'Min' ? this.state.chartMinY: undefined\n };\n const chartName = this.props.name ?? 'nonameAreachart';\n let gradientStop = '100%';\n if (isNumber(this.state.chartMaxY) && isNumber(this.state.chartMinY) && this.state.chartMaxY > 0) {\n gradientStop = (this.state.chartMaxY - this.state.chartMinY) * 100 / this.state.chartMaxY + '%';\n }\n return (\n <View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={this.styles.root}\n onLayout={this.onViewLayoutChange.bind(this)}\n >\n <View>\n <View style={{flexDirection: 'row', alignItems: 'center'}}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>) : null }\n <Text style={this.styles.title}>{props.title}</Text>\n </View>\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n </View>\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: 30 }}\n minDomain={mindomain}\n containerComponent={\n this.getTooltip(props)\n }\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={Color(this.state.colors[i]).lighten(0.2).rgb().toString()}/>\n <Stop offset={gradientStop} stopColor={Color(this.state.colors[i]).lighten(0.6).rgb().toString()}/>\n </LinearGradient>\n </Defs>\n <VictoryArea\n interpolation={props.interpolation as InterpolationPropType}\n key={props.name + '_' + i}\n name={props.name + '_' + i}\n style={{\n data: {\n fill: `url(#${chartName}Gradient${i})`,\n stroke: this.state.colors[i],\n strokeWidth: props.linethickness,\n }\n }}\n data={this.isRTL?d.toReversed():d}\n />\n {props.highlightpoints ?\n <VictoryScatter\n size={5}\n key={props.name + '_scatter' + i}\n style={{\n data: { \n fill: Color(this.state.colors[i]).darken(0.2).rgb().toString()}\n }} \n data={this.isRTL?d.toReversed():d}\n events={[{\n target: 'data',\n eventHandlers: Platform.OS == \"web\" ? {\n onClick: this.onSelect.bind(this)\n }:{\n onPress: this.onSelect.bind(this)\n }\n }]}\n />\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,OAAOC,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AACtE,SAASC,IAAI,EAAEC,cAAc,EAAEC,IAAI,QAAa,kBAAkB;AAClE,SAASC,WAAW,EAAeC,YAAY,EAAiBC,YAAY,EAAEC,cAAc,EAAEC,YAAY,QAAQ,gBAAgB;AAElI,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,gEAAgE;AACvE,OAAOC,MAAM,MAAM,gEAAgE;AAGnF,SAAgBC,QAAQ,QAAQ,WAAW;AAC3C,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAO,MAAMC,gBAAgB,SAASL,uBAAu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AC5BgB,WAAW,EAAEtF,KAAK,CAACuF;UACrB;QACF,CAAE;QACF7E,IAAI,EAAE,IAAI,CAAC8E,KAAK,GAACnB,CAAC,CAACoB,UAAU,CAAC,CAAC,GAACpB;MAAE,CACnC,CAAC,EACDrE,KAAK,CAAC0F,eAAe,gBACpBpH,KAAA,CAAAiE,aAAA,CAACtD,cAAc;QACb0G,IAAI,EAAE,CAAE;QACRpB,GAAG,EAAEvE,KAAK,CAACoC,IAAI,GAAG,UAAU,GAAGkC,CAAE;QACjC5B,KAAK,EAAE;UACLhC,IAAI,EAAE;YACJ0E,IAAI,EAAE7G,KAAK,CAAC,IAAI,CAACwC,KAAK,CAACgE,MAAM,CAACT,CAAC,CAAC,CAAC,CAACsB,MAAM,CAAC,GAAG,CAAC,CAACX,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC;UAAC;QAClE,CAAE;QACFxE,IAAI,EAAE,IAAI,CAAC8E,KAAK,GAACnB,CAAC,CAACoB,UAAU,CAAC,CAAC,GAACpB,CAAE;QAClCwB,MAAM,EAAE,CAAC;UACPC,MAAM,EAAE,MAAM;UACdC,aAAa,EAAErH,QAAQ,CAACsH,EAAE,IAAI,KAAK,GAAG;YACpCC,OAAO,EAAE,IAAI,CAACzF,QAAQ,CAACuC,IAAI,CAAC,IAAI;UAClC,CAAC,GAAC;YACAmD,OAAO,EAAE,IAAI,CAAC1F,QAAQ,CAACuC,IAAI,CAAC,IAAI;UAClC;QACF,CAAC;MAAE,CACF,CAAC,GACJ,IACU,CAAC;IACjB,CAAC,CAEW,CACF,CAAC,GAEjB,IACE,CAAC;EACT;AACF"}
|
|
1
|
+
{"version":3,"names":["React","Color","View","Platform","Defs","LinearGradient","Stop","Svg","VictoryArea","VictoryChart","VictoryLegend","VictoryStack","VictoryScatter","VictoryGroup","WmAreaChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","isNumber","WmAreaChartState","constructor","arguments","_defineProperty","WmAreaChart","props","e","viewWidth","nativeEvent","layout","width","updateState","chartWidth","onSelect","event","data","value","index","y","label","state","xaxisDatakeyArr","datum","x","selectedItem","dataset","selectedChartItem","series","_dataObj","invokeEventCallback","proxy","renderWidget","_this$state$data","length","mindomain","xdomain","chartMinX","undefined","ydomain","chartMinY","chartName","name","gradientStop","chartMaxY","createElement","style","styles","root","onLayout","onViewLayoutChange","bind","theme","height","padding","top","bottom","left","right","minDomain","containerComponent","getTooltip","title","subheading","orientation","gutter","getLegendView","getXaxis","getYAxis","map","d","i","key","id","x1","y1","x2","y2","offset","stopColor","colors","lighten","rgb","toString","interpolation","fill","stroke","strokeWidth","linethickness","highlightpoints","size","darken","events","target","eventHandlers","OS","onClick","onPress"],"sources":["area-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport Color from \"color\";\nimport { LayoutChangeEvent, View, Text, Platform } from 'react-native';\nimport { Defs, LinearGradient, Stop, Svg } from 'react-native-svg';\nimport { VictoryArea, VictoryLine, 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\";\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nimport { isNil, isNumber } from 'lodash-es';\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 onSelect(event: any, data: any){\n let value = data.data[data.index].y;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n }\n\n renderWidget(props: WmAreaChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data?.length) {\n return null;\n }\n let mindomain={\n x: props.xdomain === 'Min' ? this.state.chartMinX: undefined,\n y: props.ydomain === 'Min' ? this.state.chartMinY: undefined\n };\n const chartName = this.props.name ?? 'nonameAreachart';\n let gradientStop = '100%';\n if (isNumber(this.state.chartMaxY) && isNumber(this.state.chartMinY) && this.state.chartMaxY > 0) {\n gradientStop = (this.state.chartMaxY - this.state.chartMinY) * 100 / this.state.chartMaxY + '%';\n }\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: 30 }}\n minDomain={mindomain}\n containerComponent={\n this.getTooltip(props)\n }\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={Color(this.state.colors[i]).lighten(0.2).rgb().toString()}/>\n <Stop offset={gradientStop} stopColor={Color(this.state.colors[i]).lighten(0.6).rgb().toString()}/>\n </LinearGradient>\n </Defs>\n <VictoryArea\n interpolation={props.interpolation as InterpolationPropType}\n key={props.name + '_' + i}\n name={props.name + '_' + i}\n style={{\n data: {\n fill: `url(#${chartName}Gradient${i})`,\n stroke: this.state.colors[i],\n strokeWidth: props.linethickness,\n }\n }}\n data={d}\n />\n {props.highlightpoints ?\n <VictoryScatter\n size={5}\n key={props.name + '_scatter' + i}\n style={{\n data: { \n fill: Color(this.state.colors[i]).darken(0.2).rgb().toString()}\n }} \n data={d}\n events={[{\n target: 'data',\n eventHandlers: Platform.OS == \"web\" ? {\n onClick: this.onSelect.bind(this)\n }:{\n onPress: this.onSelect.bind(this)\n }\n }]}\n />\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,OAAOC,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAQC,QAAQ,QAAQ,cAAc;AACtE,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;AAElI,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,gEAAgE;AAEvE,SAAgBC,QAAQ,QAAQ,WAAW;AAE3C,OAAO,MAAMC,gBAAgB,SAASF,uBAAuB,CAAmB;EAAAG,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,qBACjE,CAAC;EAAA;AAChB;AAEA,eAAe,MAAMC,WAAW,SAASP,kBAAkB,CAAwD;EAEjHI,WAAWA,CAACI,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAET,aAAa,EAAE,IAAID,gBAAgB,CAAC,CAAC,EAAE,IAAIK,gBAAgB,CAAC,CAAC,CAAC;IAACG,eAAA,6BA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C,OAAO,EAAE,IAAI,CAAClF,QAAQ,CAACqC,IAAI,CAAC,IAAI;UAClC,CAAC,GAAC;YACA8C,OAAO,EAAE,IAAI,CAACnF,QAAQ,CAACqC,IAAI,CAAC,IAAI;UAClC;QACF,CAAC;MAAE,CACF,CAAC,GACJ,IACU,CAAC;IACjB,CAAC,CAEW,CACF,CAAC,GAEjB,IACE,CAAC;EACT;AACF"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import { View,
|
|
4
|
-
import {
|
|
5
|
-
import { VictoryChart, VictoryBar, VictoryStack, VictoryGroup } from "victory-native";
|
|
2
|
+
import { View, Platform } from 'react-native';
|
|
3
|
+
import { VictoryChart, VictoryBar, VictoryLegend, VictoryStack, VictoryGroup } from "victory-native";
|
|
6
4
|
import { BaseChartComponent, BaseChartComponentState } from "@wavemaker/app-rn-runtime/components/chart/basechart.component";
|
|
7
5
|
import WmBarChartProps from './bar-chart.props';
|
|
8
6
|
import { DEFAULT_CLASS } from './bar-chart.styles';
|
|
9
|
-
import
|
|
7
|
+
import { Svg } from "react-native-svg";
|
|
10
8
|
export class WmBarChartState extends BaseChartComponentState {}
|
|
11
9
|
export default class WmBarChart extends BaseChartComponent {
|
|
12
10
|
constructor(props) {
|
|
@@ -21,9 +19,8 @@ export default class WmBarChart extends BaseChartComponent {
|
|
|
21
19
|
key: props.name + '_' + i,
|
|
22
20
|
horizontal: props.horizontal,
|
|
23
21
|
labels: props.showvalues ? this.labelFn.bind(this) : undefined,
|
|
24
|
-
data:
|
|
22
|
+
data: d,
|
|
25
23
|
height: 100,
|
|
26
|
-
alignment: "start",
|
|
27
24
|
style: props.customcolors ? {
|
|
28
25
|
data: {
|
|
29
26
|
fill: _ref => {
|
|
@@ -34,12 +31,6 @@ export default class WmBarChart extends BaseChartComponent {
|
|
|
34
31
|
}
|
|
35
32
|
}
|
|
36
33
|
} : {},
|
|
37
|
-
cornerRadius: {
|
|
38
|
-
topLeft: this.styles.bar.borderTopLeftRadius,
|
|
39
|
-
topRight: this.styles.bar.borderTopRightRadius,
|
|
40
|
-
bottomLeft: this.styles.bar.borderBottomLeftRadius,
|
|
41
|
-
bottomRight: this.styles.bar.borderBottomRightRadius
|
|
42
|
-
},
|
|
43
34
|
events: [{
|
|
44
35
|
target: 'data',
|
|
45
36
|
eventHandlers: Platform.OS == "web" ? {
|
|
@@ -72,21 +63,9 @@ export default class WmBarChart extends BaseChartComponent {
|
|
|
72
63
|
x: this.props.xdomain === 'Min' ? this.state.chartMinX : undefined,
|
|
73
64
|
y: this.props.ydomain === 'Min' ? this.state.chartMinY : undefined
|
|
74
65
|
};
|
|
75
|
-
return /*#__PURE__*/React.createElement(View,
|
|
66
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
76
67
|
style: this.styles.root
|
|
77
|
-
}
|
|
78
|
-
style: {
|
|
79
|
-
flexDirection: 'row',
|
|
80
|
-
alignItems: 'center'
|
|
81
|
-
}
|
|
82
|
-
}, props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
|
|
83
|
-
iconclass: props.iconclass,
|
|
84
|
-
styles: this.styles.icon
|
|
85
|
-
}) : null, /*#__PURE__*/React.createElement(Text, {
|
|
86
|
-
style: this.styles.title
|
|
87
|
-
}, props.title)), /*#__PURE__*/React.createElement(Text, {
|
|
88
|
-
style: this.styles.subHeading
|
|
89
|
-
}, props.subheading)), /*#__PURE__*/React.createElement(VictoryChart, {
|
|
68
|
+
}, /*#__PURE__*/React.createElement(VictoryChart, {
|
|
90
69
|
theme: this.state.theme,
|
|
91
70
|
height: this.styles.root.height,
|
|
92
71
|
width: this.styles.root.width || this.screenWidth,
|
|
@@ -98,11 +77,19 @@ export default class WmBarChart extends BaseChartComponent {
|
|
|
98
77
|
right: props.offsetright
|
|
99
78
|
},
|
|
100
79
|
containerComponent: this.getTooltip(props)
|
|
101
|
-
},
|
|
80
|
+
}, /*#__PURE__*/React.createElement(VictoryLegend, {
|
|
81
|
+
name: 'legend',
|
|
82
|
+
containerComponent: /*#__PURE__*/React.createElement(Svg, null),
|
|
83
|
+
title: [props.title, props.subheading],
|
|
84
|
+
orientation: "horizontal",
|
|
85
|
+
gutter: 20,
|
|
86
|
+
data: [],
|
|
87
|
+
theme: this.state.theme
|
|
88
|
+
}), this.getLegendView(), this.getXaxis(), this.getYAxis(), props.viewtype === 'Stacked' ? /*#__PURE__*/React.createElement(VictoryStack, {
|
|
102
89
|
colorScale: this.state.colors
|
|
103
90
|
}, this.getBarChart(props)) : /*#__PURE__*/React.createElement(VictoryGroup, {
|
|
104
91
|
colorScale: this.state.colors,
|
|
105
|
-
offset:
|
|
92
|
+
offset: 5
|
|
106
93
|
}, this.getBarChart(props))));
|
|
107
94
|
}
|
|
108
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","Platform","AccessibilityWidgetType","getAccessibilityProps","VictoryChart","VictoryBar","VictoryStack","VictoryGroup","BaseChartComponent","BaseChartComponentState","WmBarChartProps","DEFAULT_CLASS","WmIcon","WmBarChartState","WmBarChart","constructor","props","labelFn","data","abbreviateNumber","datum","y","getBarChart","state","map","d","i","createElement","key","name","horizontal","labels","showvalues","bind","undefined","isRTL","toReversed","height","alignment","style","customcolors","fill","_ref","colors","x","length","cornerRadius","topLeft","styles","bar","borderTopLeftRadius","topRight","borderTopRightRadius","bottomLeft","borderBottomLeftRadius","bottomRight","borderBottomRightRadius","events","target","eventHandlers","OS","onClick","onSelect","onPress","event","value","index","label","xaxisDatakeyArr","selectedItem","dataset","selectedChartItem","series","_dataObj","invokeEventCallback","nativeEvent","proxy","renderWidget","mindomain","xdomain","chartMinX","ydomain","chartMinY","_extends","LINECHART","root","flexDirection","alignItems","iconclass","icon","title","subHeading","subheading","theme","width","screenWidth","minDomain","padding","top","offsettop","bottom","offsetbottom","left","offsetleft","right","offsetright","containerComponent","getTooltip","getLegendView","getXaxis","getYAxis","viewtype","colorScale","offset"],"sources":["bar-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, Platform } from 'react-native';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \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 WmIcon from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.component\";\nimport { min } from 'moment';\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={this.isRTL?d.toReversed():d}\n height={100}\n alignment='start'\n style={props.customcolors?{\n data: {\n fill: ({ datum }) => this.state.colors[datum.x] ?? this.state.colors[datum.x % this.state.colors.length]\n }\n }:{}}\n cornerRadius={{topLeft: this.styles.bar.borderTopLeftRadius, topRight: this.styles.bar.borderTopRightRadius, bottomLeft: this.styles.bar.borderBottomLeftRadius, bottomRight: this.styles.bar.borderBottomRightRadius}}\n events={[{\n target: 'data',\n eventHandlers: Platform.OS == \"web\" ? {\n onClick: this.onSelect.bind(this)\n }:{\n onPress: this.onSelect.bind(this)\n }\n }]}/>\n });\n}\n\nonSelect(event: any, data: any){\n let value = data.data[data.index].y;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n}\n\n renderWidget(props: WmBarChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\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 {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={this.styles.root}\n >\n <View>\n <View style={{flexDirection: 'row', alignItems: 'center'}}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>) : null }\n <Text style={this.styles.title}>{props.title}</Text>\n </View>\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n </View>\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 containerComponent={\n this.getTooltip(props)\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={10} >\n {\n this.getBarChart(props) \n }\n </VictoryGroup>\n }\n </VictoryChart></View>);\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AACnD,SAASC,uBAAuB,EAAEC,qBA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A6B,aAAA,CAACpB,YAAY;MAACyG,UAAU,EAAE,IAAI,CAACzF,KAAK,CAACoB,MAAO;MAAEsE,MAAM,EAAE;IAAG,GAEvE,IAAI,CAAC3F,WAAW,CAACN,KAAK,CAEZ,CAEJ,CAAO,CAAC;EACxB;AACF"}
|
|
1
|
+
{"version":3,"names":["React","View","Platform","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","style","customcolors","fill","_ref","colors","x","length","events","target","eventHandlers","OS","onClick","onSelect","onPress","event","value","index","label","xaxisDatakeyArr","selectedItem","dataset","selectedChartItem","series","_dataObj","invokeEventCallback","nativeEvent","proxy","renderWidget","mindomain","xdomain","chartMinX","ydomain","chartMinY","styles","root","theme","width","screenWidth","minDomain","padding","top","offsettop","bottom","offsetbottom","left","offsetleft","right","offsetright","containerComponent","getTooltip","title","subheading","orientation","gutter","getLegendView","getXaxis","getYAxis","viewtype","colorScale","offset"],"sources":["bar-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Platform } 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 style={props.customcolors?{\n data: {\n fill: ({ datum }) => this.state.colors[datum.x] ?? this.state.colors[datum.x % this.state.colors.length]\n }\n }:{}}\n events={[{\n target: 'data',\n eventHandlers: Platform.OS == \"web\" ? {\n onClick: this.onSelect.bind(this)\n }:{\n onPress: this.onSelect.bind(this)\n }\n }]}/>\n });\n}\n\nonSelect(event: any, data: any){\n let value = data.data[data.index].y;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n}\n\n renderWidget(props: WmBarChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\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 containerComponent={\n this.getTooltip(props)\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 {\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,EAAEC,QAAQ,QAAQ,cAAc;AAE7C,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,MAAMK,UAAU,SAASN,kBAAkB,CAAqD;EAE7GO,WAAWA,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,EAAE,IAAIG,eAAe,CAAC,CAAC,CAAC;EAC3E;EAEAI,OAAOA,CAACC,IAAS,EAAgD;IAC/D,OAAO,IAAI,CAACC,gBAAgB,CAACD,IAAI,CAACE,KAAK,CAACC,CAAC,CAAC;EAC5C;EAEAC,WAAWA,CAACN,KAAsB,EAAE;IACpC,OAAO,IAAI,CAACO,KAAK,CAACL,IAAI,CAACM,GAAG,CAAC,CAACC,CAAM,EAAEC,CAAS,KAAK;MAChD,oBAAO1B,KAAA,CAAA2B,aAAA,CAACvB,UAAU;QAACwB,GAAG,EAAEZ,KAAK,CAACa,IAAI,GAAG,GAAG,GAAGH,CAAE;QACzCI,UAAU,EAAEd,KAAK,CAACc,UAAW;QAACC,MAAM,EAAEf,KAAK,CAACgB,UAAU,GAAG,IAAI,CAACf,OAAO,CAACgB,IAAI,CAAC,IAAI,CAAC,GAAGC,SAAU;QAC7FhB,IAAI,EAAEO,CAAE;QACRU,MAAM,EAAE,GAAI;QACZC,KAAK,EAAEpB,KA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BACrBhB,KAAA,CAAA2B,aAAA,CAACtB,aAAa;MACZwB,IAAI,EAAE,QAAS;MACfuD,kBAAkB,eAAEpF,KAAA,CAAA2B,aAAA,CAACf,GAAG,MAAE,CAAE;MAC5B0E,KAAK,EAAE,CAACtE,KAAK,CAACsE,KAAK,EAAEtE,KAAK,CAACuE,UAAU,CAAE;MACvCC,WAAW,EAAC,YAAY;MACxBC,MAAM,EAAE,EAAG;MACXvE,IAAI,EAAE,EAAG;MACTqD,KAAK,EAAE,IAAI,CAAChD,KAAK,CAACgD;IAAM,CACzB,CAAC,EACD,IAAI,CAACmB,aAAa,CAAC,CAAC,EACpB,IAAI,CAACC,QAAQ,CAAC,CAAC,EACf,IAAI,CAACC,QAAQ,CAAC,CAAC,EAEd5E,KAAK,CAAC6E,QAAQ,KAAK,SAAS,gBAAG7F,KAAA,CAAA2B,aAAA,CAACrB,YAAY;MAACwF,UAAU,EAAE,IAAI,CAACvE,KAAK,CAACiB;IAAO,GAEvE,IAAI,CAAClB,WAAW,CAACN,KAAK,CAEZ,CAAC,gBAAGhB,KAAA,CAAA2B,aAAA,CAACpB,YAAY;MAACuF,UAAU,EAAE,IAAI,CAACvE,KAAK,CAACiB,MAAO;MAACuD,MAAM,EAAE;IAAE,GAErE,IAAI,CAACzE,WAAW,CAACN,KAAK,CAEZ,CAEJ,CAAO,CAAC;EACxB;AACF"}
|
|
@@ -7,6 +7,8 @@ export default class WmBarChartProps extends BaseChartComponentProps {
|
|
|
7
7
|
super(...arguments);
|
|
8
8
|
_defineProperty(this, "horizontal", true);
|
|
9
9
|
_defineProperty(this, "viewtype", 'Grouped');
|
|
10
|
+
_defineProperty(this, "yaxislabeldistance", 30);
|
|
11
|
+
_defineProperty(this, "xaxislabeldistance", 50);
|
|
10
12
|
_defineProperty(this, "onSelect", void 0);
|
|
11
13
|
}
|
|
12
14
|
}
|
|
@@ -1 +1 @@
|
|
|
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 onSelect?: any;\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;EAAA;
|
|
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 onSelect?: any;\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;IAAAA,eAAA;EAAA;AAEjC"}
|
|
@@ -10,7 +10,6 @@ import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/cor
|
|
|
10
10
|
import WmIcon from "@wavemaker/app-rn-runtime/components/basic/icon/icon.component";
|
|
11
11
|
import ThemeFactory from "@wavemaker/app-rn-runtime/components/chart/theme/chart.theme";
|
|
12
12
|
import { DEFAULT_CLASS } from "./basechart.styles";
|
|
13
|
-
import { constructSampleData, getChartType } from "./staticdata";
|
|
14
13
|
export class BaseChartComponentState extends BaseComponentState {
|
|
15
14
|
constructor() {
|
|
16
15
|
super(...arguments);
|
|
@@ -120,16 +119,13 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
120
119
|
const maxIndex = this.state.xaxisDatakeyArr.length - 1;
|
|
121
120
|
const props = this.state.props;
|
|
122
121
|
const getTickValueLabel = props.xtickexpr;
|
|
123
|
-
let height = this.styles.root.height || 250;
|
|
124
|
-
let yaxislabeldistance = props.yaxislabeldistance ? props.yaxislabeldistance : height - 20;
|
|
125
|
-
if (height && typeof height === 'string') {
|
|
126
|
-
height = parseInt(height);
|
|
127
|
-
}
|
|
128
122
|
return /*#__PURE__*/React.createElement(VictoryAxis, {
|
|
129
123
|
crossAxis: false,
|
|
130
124
|
label: (props.xaxislabel || props.xaxisdatakey || "name") + (props.xunits ? `(${props.xunits})` : ''),
|
|
131
125
|
style: {
|
|
132
|
-
axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel
|
|
126
|
+
axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel, {
|
|
127
|
+
padding: props.yaxislabeldistance
|
|
128
|
+
}),
|
|
133
129
|
grid: props.hidegridxaxis ? {
|
|
134
130
|
stroke: null
|
|
135
131
|
} : this.theme.mergeStyle(this.styles.grid, this.styles.xGrid),
|
|
@@ -140,11 +136,7 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
140
136
|
tickLabels: this.theme.mergeStyle(this.styles.tickLabels, this.styles.xTickLabels)
|
|
141
137
|
},
|
|
142
138
|
fixLabelOverlap: props.autoadjustlabels ? true : false,
|
|
143
|
-
axisLabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, {
|
|
144
|
-
y: yaxislabeldistance
|
|
145
|
-
}),
|
|
146
139
|
tickLabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, {
|
|
147
|
-
y: props.offsetyaxis ? props.offsetyaxis : height - 30,
|
|
148
140
|
angle: props.labelangle || 0
|
|
149
141
|
}),
|
|
150
142
|
theme: this.state.theme,
|
|
@@ -168,12 +160,13 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
168
160
|
return null;
|
|
169
161
|
}
|
|
170
162
|
const getTickValueLabel = props.ytickexpr;
|
|
171
|
-
let xaxislabeldistance = props.xaxislabeldistance ? props.xaxislabeldistance : 20;
|
|
172
163
|
return /*#__PURE__*/React.createElement(VictoryAxis, {
|
|
173
164
|
crossAxis: false,
|
|
174
165
|
label: (props.yaxislabel || props.yaxisdatakey) + (props.yunits ? `(${props.yunits})` : ''),
|
|
175
166
|
style: {
|
|
176
|
-
axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel
|
|
167
|
+
axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel, {
|
|
168
|
+
padding: props.yaxislabeldistance
|
|
169
|
+
}),
|
|
177
170
|
grid: props.hidegridyaxis ? {
|
|
178
171
|
stroke: null
|
|
179
172
|
} : this.theme.mergeStyle(this.styles.grid, this.styles.yGrid),
|
|
@@ -184,12 +177,6 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
184
177
|
tickLabels: this.theme.mergeStyle(this.styles.tickLabels, this.styles.yTickLabels)
|
|
185
178
|
},
|
|
186
179
|
fixLabelOverlap: props.autoadjustlabels ? true : false,
|
|
187
|
-
axisLabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, {
|
|
188
|
-
x: xaxislabeldistance
|
|
189
|
-
}),
|
|
190
|
-
tickLabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, {
|
|
191
|
-
x: props.offsetxaxis ? props.offsetxaxis : 50
|
|
192
|
-
}),
|
|
193
180
|
theme: this.state.theme,
|
|
194
181
|
tickFormat: (d, i, ticks) => {
|
|
195
182
|
if (getTickValueLabel) {
|
|
@@ -197,7 +184,6 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
197
184
|
}
|
|
198
185
|
return this.abbreviateNumber(d);
|
|
199
186
|
},
|
|
200
|
-
orientation: this.isRTL ? "right" : "left",
|
|
201
187
|
dependentAxis: true
|
|
202
188
|
});
|
|
203
189
|
}
|
|
@@ -395,9 +381,6 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
395
381
|
let themeToUse;
|
|
396
382
|
if (typeof themeName === 'string') {
|
|
397
383
|
if (!colorsToUse.length) {
|
|
398
|
-
colorsToUse = props.customcolors;
|
|
399
|
-
}
|
|
400
|
-
if (props.customcolors === undefined) {
|
|
401
384
|
colorsToUse = ThemeFactory.getColorsObj(themeName);
|
|
402
385
|
}
|
|
403
386
|
themeToUse = ThemeFactory.getTheme(themeName, props.styles, colorsToUse);
|
|
@@ -460,7 +443,7 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
460
443
|
// If date string is bound to xaxis then we are pushing the x values as indexes.
|
|
461
444
|
getxAxisVal(dataObj, xKey, index, xaxisDatakeyArr) {
|
|
462
445
|
const value = get(dataObj, xKey);
|
|
463
|
-
if (moment(value).isValid() || isNaN(value)
|
|
446
|
+
if (moment(value, true).isValid() || isNaN(value)) {
|
|
464
447
|
xaxisDatakeyArr.push(value);
|
|
465
448
|
return index;
|
|
466
449
|
}
|
|
@@ -472,12 +455,6 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
472
455
|
let yaxis = props.yaxisdatakey;
|
|
473
456
|
let xaxisDatakeyArr = [];
|
|
474
457
|
let datasets = [];
|
|
475
|
-
if (dataset.length === 0) {
|
|
476
|
-
var _yaxis;
|
|
477
|
-
dataset = constructSampleData(getChartType(this.props), (_yaxis = yaxis) === null || _yaxis === void 0 ? void 0 : _yaxis.split(','), this.props.shape);
|
|
478
|
-
xaxis = "x";
|
|
479
|
-
yaxis = "y";
|
|
480
|
-
}
|
|
481
458
|
if (xaxis && yaxis) {
|
|
482
459
|
let yPts = yaxis.split(',');
|
|
483
460
|
yPts.forEach(y => {
|
|
@@ -599,7 +576,4 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
599
576
|
}
|
|
600
577
|
}
|
|
601
578
|
}
|
|
602
|
-
function getDataType(widgetContext) {
|
|
603
|
-
throw new Error("Function not implemented.");
|
|
604
|
-
}
|
|
605
579
|
//# sourceMappingURL=basechart.component.js.map
|