@wavemaker/app-rn-runtime 12.0.0-next.141131 → 12.0.0-next.141138
Sign up to get free protection for your applications and to get access to all the features.
- app-rn-runtime/components/advanced/carousel/carousel.component.js +32 -5
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js +1 -0
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +15 -0
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +15 -5
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -0
- app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
- app-rn-runtime/components/basic/animatedview.component.js +6 -2
- app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +20 -6
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +14 -6
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +13 -3
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js +3 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
- app-rn-runtime/components/basic/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +1 -2
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +2 -2
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +5 -5
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +10 -1
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +3 -0
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +5 -0
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js +6 -3
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.props.js +9 -1
- app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js +2 -3
- app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
- app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.styles.js +4 -1
- app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.styles.js +7 -1
- app-rn-runtime/components/chart/area-chart/area-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js +7 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +54 -2
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +3 -2
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js +4 -0
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +15 -3
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js +7 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/column-chart/column-chart.styles.js +7 -1
- app-rn-runtime/components/chart/column-chart/column-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js +7 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.props.js +2 -0
- app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.styles.js +7 -1
- app-rn-runtime/components/chart/line-chart/line-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +6 -2
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js +7 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +37 -11
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +61 -12
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.styles.js +5 -0
- app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +11 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +44 -3
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.props.js +1 -0
- app-rn-runtime/components/container/container.props.js.map +1 -1
- app-rn-runtime/components/container/container.styles.js +7 -0
- app-rn-runtime/components/container/container.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +5 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js +6 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +28 -2
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js +4 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js +31 -5
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.styles.js +4 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +47 -6
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.styles.js +3 -0
- app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
- app-rn-runtime/components/container/partial-host.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +3 -4
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +11 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +1 -0
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +44 -6
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js +4 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +28 -2
- app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.styles.js +6 -1
- app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +62 -13
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +3 -0
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +4 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js +6 -2
- app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.styles.js +4 -1
- app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +18 -0
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.styles.js +3 -0
- app-rn-runtime/components/data/card/card.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +1 -1
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.props.js +1 -0
- app-rn-runtime/components/data/form/form.props.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.props.js +1 -0
- app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js +11 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +54 -33
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +1 -0
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js +9 -0
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +5 -3
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
- app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +57 -14
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.props.js +1 -0
- app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +40 -14
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js +2 -0
- app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +7 -8
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js +3 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +24 -3
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -0
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +1 -0
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +3 -2
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +19 -2
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +6 -1
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +26 -8
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheel-date-picker.component.js +123 -12
- app-rn-runtime/components/input/epoch/wheel-date-picker.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +4 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +2 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js +4 -2
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.props.js +1 -0
- app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +9 -4
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +3 -0
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +39 -14
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js +2 -0
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js +7 -0
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +23 -9
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +2 -2
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +26 -2
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +3 -0
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js +3 -0
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +24 -1
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js +2 -0
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.styles.js +3 -0
- app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +2 -4
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +2 -2
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +2 -3
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/page/content/content.component.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js +4 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +70 -14
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.props.js +2 -2
- app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.styles.js +6 -1
- app-rn-runtime/components/page/page-content/page-content.styles.js.map +1 -1
- app-rn-runtime/components/page/page.component.js.map +1 -1
- app-rn-runtime/components/page/page.props.js.map +1 -1
- app-rn-runtime/components/page/page.styles.js +7 -1
- app-rn-runtime/components/page/page.styles.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.component.js +27 -1
- app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.props.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.styles.js +6 -1
- app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
- app-rn-runtime/components/page/tabbar/curve.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -0
- app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js +27 -1
- app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.props.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.styles.js +6 -1
- app-rn-runtime/components/prefab/prefab-container.styles.js.map +1 -1
- app-rn-runtime/core/AppConfig.js.map +1 -1
- app-rn-runtime/core/base.component.js +35 -7
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/textinput.component.js +13 -10
- app-rn-runtime/core/components/textinput.component.js.map +1 -1
- app-rn-runtime/core/formatters.js.map +1 -1
- app-rn-runtime/core/key.extractor.js.map +1 -1
- app-rn-runtime/core/props.provider.js +4 -1
- app-rn-runtime/core/props.provider.js.map +1 -1
- app-rn-runtime/core/storage.service.js +15 -0
- app-rn-runtime/core/storage.service.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +34 -27
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/ui-preferences.context.js +7 -0
- app-rn-runtime/core/ui-preferences.context.js.map +1 -0
- app-rn-runtime/core/utils.js +87 -4
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/core/wm-component-tree.js +58 -0
- app-rn-runtime/core/wm-component-tree.js.map +1 -0
- app-rn-runtime/package.json +39 -9
- app-rn-runtime/runtime/App.js +21 -10
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/App.navigator.js +1 -0
- app-rn-runtime/runtime/App.navigator.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +61 -13
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +10 -0
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/base-partial.component.js +3 -0
- app-rn-runtime/runtime/base-partial.component.js.map +1 -1
- app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
- app-rn-runtime/runtime/navigator/drawer.navigator.js +19 -10
- app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
- app-rn-runtime/runtime/services/app-i18n.service.js +10 -0
- app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +42 -2
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-spinner.service.js +1 -1
- app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
- app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
- app-rn-runtime/runtime/watcher.js.map +1 -1
- app-rn-runtime/styles/background.component.js +1 -0
- app-rn-runtime/styles/background.component.js.map +1 -1
- app-rn-runtime/styles/style-prop.validator.js.map +1 -1
- app-rn-runtime/styles/theme.js +10 -0
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +2 -1
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/base-variable.js.map +1 -1
- app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
- app-rn-runtime/variables/device-variable.js.map +1 -1
- app-rn-runtime/variables/http.service.js +5 -1
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/live-variable.js +14 -0
- app-rn-runtime/variables/live-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Platform","BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","borderRadius","text","minHeight","paddingTop","paddingBottom","paddingLeft","paddingRight","width","borderWidth","borderRightWidth","borderTopLeftRadius","borderBottomLeftRadius","borderColor","searchBorderColor","backgroundColor","searchBgContainerColor","invalid","borderBottomColor","inputInvalidBorderColor","focusedText","modal","transparent","height","modalContent","position","borderStyle","dropDownContent","searchInputWrapper","alignItems","justifyContent","flex","clearButton","marginLeft","padding","alignSelf","searchButton","borderTopRightRadius","borderBottomRightRadius","searchButtonColor","rippleColor","icon","fontSize","color","searchButtonTextColor","marginRight","searchItem","marginBottom","paddingHorizontal","paddingVertical","searchItemBorderColor","searchItemTextColor","searchItemText","fontFamily","baseFont","dataCompleteItem","searchDataCompleteItemBgColor","textDecorationLine","placeholderText","inputPlaceholderColor","inputDisabledBgColor","OS","textAlign","borderLeftWidth","left"],"sources":["search.styles.ts"],"sourcesContent":["import { Platform, TextStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\n\nexport type WmSearchStyles = BaseStyles & {\n focusedText: TextStyle,\n modal: AllStyle;\n modalContent: AllStyle;\n searchItem: AllStyle;\n dropDownContent: AllStyle;\n searchItemText: AllStyle;\n clearButton: WmButtonStyles;\n searchButton: WmButtonStyles;\n searchInputWrapper: AllStyle;\n placeholderText: AllStyle;\n invalid: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-search';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSearchStyles = defineStyles({\n root: {\n flexDirection: 'row',\n borderRadius: 28,\n },\n text: {\n minHeight: 56,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 24,\n paddingRight: 14,\n width: '100%',\n borderWidth: 1,\n borderRightWidth: 0,\n borderTopLeftRadius: 28,\n borderBottomLeftRadius: 28,\n borderColor: themeVariables.searchBorderColor,\n backgroundColor: themeVariables.searchBgContainerColor,\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor,\n },\n focusedText : {\n borderBottomLeftRadius: 28,\n },\n modal: {\n backgroundColor: themeVariables.transparent,\n height: '100%'\n },\n modalContent: {\n backgroundColor: themeVariables.searchBgContainerColor,\n borderRadius: 6,\n position: 'absolute',\n borderStyle: 'solid',\n borderColor: themeVariables.searchBorderColor,\n width: '90%'\n },\n dropDownContent: {\n width: '100%'\n },\n searchInputWrapper: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n flex: 1\n },\n clearButton: {\n root: {\n marginLeft: -40,\n padding: 0,\n width: 36,\n alignItems: 'center',\n alignSelf: 'center',\n justifyContent: 'center',\n backgroundColor: 'transparent'\n }\n } as WmButtonStyles,\n searchButton: {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 0,\n borderTopRightRadius: 28,\n borderBottomRightRadius: 28,\n backgroundColor: themeVariables.searchButtonColor,\n height: 56,\n rippleColor: themeVariables.rippleColor\n },\n icon: {\n icon: {\n fontSize: 24,\n color: themeVariables.searchButtonTextColor,\n marginRight: 4\n }\n }\n } as WmButtonStyles,\n searchItem: {\n width: '100%',\n marginBottom: 4,\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderBottomColor: themeVariables.searchItemBorderColor,\n flexDirection: 'row',\n alignItems: 'center',\n color: themeVariables.searchItemTextColor\n },\n searchItemText: {\n fontSize: 16,\n paddingLeft: 8,\n fontFamily: themeVariables.baseFont\n },\n dataCompleteItem: {\n root: {\n backgroundColor: themeVariables.searchDataCompleteItemBgColor,\n justifyContent: 'center',\n padding: 8\n },\n text: {\n fontSize: 12,\n textDecorationLine: 'none',\n color: themeVariables.searchItemTextColor\n }\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n text : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS=='android'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderLeftWidth: 0,\n borderRightWidth: 1,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n },\n }\n }:Platform.OS=='web'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderRightWidth: 1,\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderTopLeftRadius: 4,\n borderBottomLeftRadius: 4,\n },\n },\n clearButton: {\n root: {\n left: 0,\n position: 'absolute',\n marginLeft: 0\n }\n } as WmButtonStyles,\n }:{\n text : {\n textAlign: 'right',\n }\n });\n\n addStyle('app-autocomplete', '', {\n text: {\n borderRightWidth: 1,\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n }\n } as WmSearchStyles);\n});\n"],"mappings":"AAAA,SAASA,QAAQ,QAAmB,cAAc;AAClD,OAAOC,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAiBxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC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,CAAC,GAAC;IACA/B,IAAI,EAAG;MACL4D,SAAS,EAAE;IACb;EACF,CAAC,CAAC;EAEFjE,QAAQ,CAAC,kBAAkB,EAAE,EAAE,EAAE;IAC/BK,IAAI,EAAE;MACJQ,gBAAgB,EAAE,CAAC;MACnB2B,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B;EACF,CAAmB,CAAC;AACtB,CAAC,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"names":["Platform","BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","borderRadius","text","minHeight","paddingTop","paddingBottom","paddingLeft","paddingRight","width","borderWidth","borderRightWidth","borderTopLeftRadius","borderBottomLeftRadius","borderColor","searchBorderColor","backgroundColor","searchBgContainerColor","invalid","borderBottomColor","inputInvalidBorderColor","focusedText","modal","transparent","height","modalContent","position","borderStyle","dropDownContent","searchInputWrapper","alignItems","justifyContent","flex","clearButton","marginLeft","padding","alignSelf","searchButton","borderTopRightRadius","borderBottomRightRadius","searchButtonColor","rippleColor","icon","fontSize","color","searchButtonTextColor","marginRight","searchItem","marginBottom","paddingHorizontal","paddingVertical","searchItemBorderColor","searchItemTextColor","searchItemText","fontFamily","baseFont","dataCompleteItem","searchDataCompleteItemBgColor","textDecorationLine","placeholderText","inputPlaceholderColor","skeleton","inputDisabledBgColor","OS","textAlign","borderLeftWidth","left"],"sources":["search.styles.ts"],"sourcesContent":["import { Platform, TextStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmSearchStyles = BaseStyles & {\n focusedText: TextStyle,\n modal: AllStyle;\n modalContent: AllStyle;\n searchItem: AllStyle;\n dropDownContent: AllStyle;\n searchItemText: AllStyle;\n clearButton: WmButtonStyles;\n searchButton: WmButtonStyles;\n searchInputWrapper: AllStyle;\n placeholderText: AllStyle;\n invalid: AllStyle;\n skeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-search';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSearchStyles = defineStyles({\n root: {\n flexDirection: 'row',\n borderRadius: 28,\n },\n text: {\n minHeight: 56,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 24,\n paddingRight: 14,\n width: '100%',\n borderWidth: 1,\n borderRightWidth: 0,\n borderTopLeftRadius: 28,\n borderBottomLeftRadius: 28,\n borderColor: themeVariables.searchBorderColor,\n backgroundColor: themeVariables.searchBgContainerColor,\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor,\n },\n focusedText : {\n borderBottomLeftRadius: 28,\n },\n modal: {\n backgroundColor: themeVariables.transparent,\n height: '100%'\n },\n modalContent: {\n backgroundColor: themeVariables.searchBgContainerColor,\n borderRadius: 6,\n position: 'absolute',\n borderStyle: 'solid',\n borderColor: themeVariables.searchBorderColor,\n width: '90%'\n },\n dropDownContent: {\n width: '100%'\n },\n searchInputWrapper: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n flex: 1\n },\n clearButton: {\n root: {\n marginLeft: -40,\n padding: 0,\n width: 36,\n alignItems: 'center',\n alignSelf: 'center',\n justifyContent: 'center',\n backgroundColor: 'transparent'\n }\n } as WmButtonStyles,\n searchButton: {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 0,\n borderTopRightRadius: 28,\n borderBottomRightRadius: 28,\n backgroundColor: themeVariables.searchButtonColor,\n height: 56,\n rippleColor: themeVariables.rippleColor\n },\n icon: {\n icon: {\n fontSize: 24,\n color: themeVariables.searchButtonTextColor,\n marginRight: 4\n }\n }\n } as WmButtonStyles,\n searchItem: {\n width: '100%',\n marginBottom: 4,\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderBottomColor: themeVariables.searchItemBorderColor,\n flexDirection: 'row',\n alignItems: 'center',\n color: themeVariables.searchItemTextColor\n },\n searchItemText: {\n fontSize: 16,\n paddingLeft: 8,\n fontFamily: themeVariables.baseFont\n },\n dataCompleteItem: {\n root: {\n backgroundColor: themeVariables.searchDataCompleteItemBgColor,\n justifyContent: 'center',\n padding: 8\n },\n text: {\n fontSize: 12,\n textDecorationLine: 'none',\n color: themeVariables.searchItemTextColor\n }\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n skeleton: {\n root: {\n height: 56\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n text : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS=='android'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderLeftWidth: 0,\n borderRightWidth: 1,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n },\n }\n }:Platform.OS=='web'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderRightWidth: 1,\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderTopLeftRadius: 4,\n borderBottomLeftRadius: 4,\n },\n },\n clearButton: {\n root: {\n left: 0,\n position: 'absolute',\n marginLeft: 0\n }\n } as WmButtonStyles,\n }:{\n text : {\n textAlign: 'right',\n }\n });\n\n addStyle('app-autocomplete', '', {\n text: {\n borderRightWidth: 1,\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n }\n } as WmSearchStyles);\n});\n"],"mappings":"AAAA,SAASA,QAAQ,QAAmB,cAAc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,uBAAuB,EAAE,CAAC;QAC1B3B,mBAAmB,EAAE,CAAC;QACtBC,sBAAsB,EAAE;MAC1B;IACF,CAAC;IACDoB,WAAW,EAAE;MACXjC,IAAI,EAAE;QACJkE,IAAI,EAAE,CAAC;QACPxC,QAAQ,EAAE,UAAU;QACpBQ,UAAU,EAAE;MACd;IACF;EACF,CAAC,GAAC;IACA/B,IAAI,EAAG;MACL6D,SAAS,EAAE;IACb;EACF,CAAC,CAAC;EAEFlE,QAAQ,CAAC,kBAAkB,EAAE,EAAE,EAAE;IAC/BK,IAAI,EAAE;MACJQ,gBAAgB,EAAE,CAAC;MACnB2B,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B;EACF,CAAmB,CAAC;AACtB,CAAC,CAAC","ignoreList":[]}
|
@@ -80,9 +80,11 @@ export default class WmSkeleton extends BaseComponent {
|
|
80
80
|
});
|
81
81
|
}
|
82
82
|
componentDidMount() {
|
83
|
+
super.componentDidMount();
|
83
84
|
this.animationRunner.start();
|
84
85
|
}
|
85
86
|
componentWillUnmount() {
|
87
|
+
super.componentWillUnmount();
|
86
88
|
this.animationRunner.stop();
|
87
89
|
}
|
88
90
|
renderWidget(props) {
|
@@ -99,7 +101,7 @@ export default class WmSkeleton extends BaseComponent {
|
|
99
101
|
},
|
100
102
|
onLayout: this.onLayoutChange,
|
101
103
|
style: this.styles.root
|
102
|
-
}, this.state.animate ? /*#__PURE__*/React.createElement(Animated.View, {
|
104
|
+
}, props.children, this.state.animate ? /*#__PURE__*/React.createElement(Animated.View, {
|
103
105
|
style: [StyleSheet.absoluteFill, this.styles.animatedView, {
|
104
106
|
transform: [{
|
105
107
|
translateX
|
@@ -124,7 +126,7 @@ export default class WmSkeleton extends BaseComponent {
|
|
124
126
|
})) : null);
|
125
127
|
}
|
126
128
|
}
|
127
|
-
export const createSkeleton = (theme, skeletonStyles, wrapper) => {
|
129
|
+
export const createSkeleton = (theme, skeletonStyles, wrapper, children) => {
|
128
130
|
const style = {};
|
129
131
|
const addStyleProp = propName => {
|
130
132
|
if (!isUndefined(wrapper[propName])) {
|
@@ -142,7 +144,8 @@ export const createSkeleton = (theme, skeletonStyles, wrapper) => {
|
|
142
144
|
return /*#__PURE__*/React.createElement(WmSkeleton, {
|
143
145
|
styles: theme.mergeStyle(skeletonStyles, {
|
144
146
|
root: style
|
145
|
-
})
|
147
|
+
}),
|
148
|
+
children: children
|
146
149
|
});
|
147
150
|
};
|
148
151
|
//# sourceMappingURL=skeleton.component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","Animated","Easing","StyleSheet","LinearGradient","BaseComponent","BaseComponentState","WmSkeletonProps","DEFAULT_CLASS","isUndefined","WmSkeletonState","constructor","args","_defineProperty","left","top","width","height","AnimationRunner","Value","run","counter","timing","animationValue","duration","time","speed","toValue","useNativeDriver","easing","linear","start","event","finished","setValue","stop","Math","max","getValue","WmSkeleton","props","_this$skeletonloaderR","skeletonloaderRef","measure","x","y","px","py","layout","setState","animate","componentDidMount","animationRunner","componentWillUnmount","renderWidget","_this$styles$gradient","_this$styles$gradient2","_this$styles$gradient3","outpuRange","state","deg","translateX","interpolate","inputRange","outputRange","createElement","ref","onLayout","onLayoutChange","style","styles","root","absoluteFill","animatedView","transform","rotate","end","colors","gradientForeground","backgroundColor","toString","gradient","locations","createSkeleton","theme","skeletonStyles","wrapper","addStyleProp","propName","mergeStyle"],"sources":["skeleton.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Animated, Easing, StyleSheet, LayoutChangeEvent, ColorValue, ViewStyle } from 'react-native';\nimport { LinearGradient } from 'expo-linear-gradient';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Theme } from '@wavemaker/app-rn-runtime/styles/theme';\n\nimport WmSkeletonProps from './skeleton.props';\nimport { DEFAULT_CLASS, WmSkeletonStyles } from './skeleton.styles';\nimport { isUndefined } from 'lodash-es';\n\nexport class WmSkeletonState extends BaseComponentState<WmSkeletonProps> {\n layout = {\n left: 0,\n top: 0,\n width: 0,\n height: 0,\n };\n animate = false;\n}\n\nclass AnimationRunner {\n private time: number = 1000;\n public speed = 1;\n private counter = 0;\n private animationValue = new Animated.Value(0.2);\n\n public run() {\n if (this.counter == 0) {\n return;\n }\n Animated.timing(this.animationValue, {\n duration: this.time * this.speed,\n toValue: 1,\n useNativeDriver: true,\n easing: Easing.linear,\n }).start((event) => {\n if (event.finished) {\n this.animationValue.setValue(0)\n this.run();\n }\n });\n }\n\n public start() {\n this.counter++;\n if (this.counter == 1) {\n this.run();\n }\n }\n\n public stop() {\n this.counter = Math.max(--this.counter, 0);\n }\n\n public getValue() {\n return this.animationValue;\n }\n}\n\nexport default class WmSkeleton extends BaseComponent<WmSkeletonProps, WmSkeletonState, WmSkeletonStyles> {\n\n private skeletonloaderRef: any = null;\n private animationRunner = new AnimationRunner();\n\n constructor(props: WmSkeletonProps) {\n super(props, DEFAULT_CLASS, new WmSkeletonProps(), new WmSkeletonState());\n }\n\n componentDidMount(): void {\n this.animationRunner.start();\n }\n\n componentWillUnmount(): void {\n this.animationRunner.stop();\n }\n\n onLayoutChange = (event: LayoutChangeEvent) => {\n this.skeletonloaderRef?.measure((x: number, y: number, width: number, height: number, px: number, py: number) => {\n let layout = {\n left: px,\n top: py,\n width: width,\n height: height,\n };\n this.setState({\n layout: {\n ...layout as any\n }, animate: true\n });\n });\n }\n\n renderWidget(props: WmSkeletonProps) {\n let outpuRange = [-this.state.layout.width-this.state.layout.left, this.state.layout.width + this.state.layout.height];\n let deg = -20;\n let translateX = this.animationRunner.getValue().interpolate({\n inputRange: [0, 1],\n outputRange: [-50, 400]\n });\n return (\n <View ref={(ref) => { this.skeletonloaderRef = ref; }} onLayout={this.onLayoutChange}\n style={this.styles.root} >\n {this.state.animate ?\n <Animated.View\n style={[\n StyleSheet.absoluteFill,\n this.styles.animatedView,\n { \n transform: [\n { translateX },\n { rotate: deg + 'deg' }\n ]\n }]}>\n <LinearGradient\n start={{ x: 0, y: 0 }}\n end={{ x: 1, y: 0 }}\n colors={[this.styles.gradientForeground.backgroundColor?.toString() as string,\n this.styles.gradient.backgroundColor?.toString() as string,\n this.styles.gradientForeground.backgroundColor?.toString() as string]}\n locations={[0, 0.5, 1]}\n style={[this.styles.gradient, {backgroundColor: this.styles.animatedView.backgroundColor}]} />\n </Animated.View> : null}\n </View>);\n }\n}\n\nexport const createSkeleton = (theme: Theme, skeletonStyles: WmSkeletonStyles, wrapper: ViewStyle) => {\n const style = {} as ViewStyle;\n const addStyleProp = (propName: any) => {\n if (!isUndefined((wrapper as any)[propName])) {\n (style as any)[propName] = (wrapper as any)[propName];\n }\n };\n addStyleProp('width');\n addStyleProp('height');\n addStyleProp('borderRadius');\n addStyleProp('borderRadius');\n addStyleProp('marginTop');\n addStyleProp('marginBottom');\n addStyleProp('marginLeft');\n addStyleProp('marginRight');\n return(<WmSkeleton styles={theme.mergeStyle(skeletonStyles, {root: style})}/>);\n};\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,UAAU,QAAkD,cAAc;AAC3G,SAASC,cAAc,QAAQ,sBAAsB;AAErD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SAASC,WAAW,QAAQ,WAAW;AAEvC,OAAO,MAAMC,eAAe,SAASJ,kBAAkB,CAAkB;EAAAK,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,iBAC9D;MACPC,IAAI,EAAE,CAAC;MACPC,GAAG,EAAE,CAAC;MACNC,KAAK,EAAE,CAAC;MACRC,MAAM,EAAE;IACV,CAAC;IAAAJ,eAAA,kBACS,KAAK;EAAA;AACjB;AAEA,MAAMK,eAAe,CAAC;EAAAP,YAAA;IAAAE,eAAA,eACG,IAAI;IAAAA,eAAA,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AAI,CAACC,MAAM,CAACW,QAAQ,EAAE;QAACF,eAAe,EAAE,IAAI,CAACT,MAAM,CAACG,YAAY,CAACM;MAAe,CAAC;IAAE,CAAE,CAClF,CAAC,GAAG,IACjB,CAAC;EACX;AACF;AAEA,OAAO,MAAMI,cAAc,GAAGA,CAACC,KAAY,EAAEC,cAAgC,EAAEC,OAAkB,KAAK;EACpG,MAAMjB,KAAK,GAAG,CAAC,CAAc;EAC7B,MAAMkB,YAAY,GAAIC,QAAa,IAAK;IACtC,IAAI,CAAC/E,WAAW,CAAE6E,OAAO,CAASE,QAAQ,CAAC,CAAC,EAAE;MAC3CnB,KAAK,CAASmB,QAAQ,CAAC,GAAIF,OAAO,CAASE,QAAQ,CAAC;IACvD;EACF,CAAC;EACDD,YAAY,CAAC,OAAO,CAAC;EACrBA,YAAY,CAAC,QAAQ,CAAC;EACtBA,YAAY,CAAC,cAAc,CAAC;EAC5BA,YAAY,CAAC,cAAc,CAAC;EAC5BA,YAAY,CAAC,WAAW,CAAC;EACzBA,YAAY,CAAC,cAAc,CAAC;EAC5BA,YAAY,CAAC,YAAY,CAAC;EAC1BA,YAAY,CAAC,aAAa,CAAC;EAC3B,oBAAOxF,KAAA,CAAAkE,aAAA,CAAC1B,UAAU;IAAC+B,MAAM,EAAEc,KAAK,CAACK,UAAU,CAACJ,cAAc,EAAE;MAACd,IAAI,EAAEF;IAAK,CAAC;EAAE,CAAC,CAAC;AAC/E,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","View","Animated","Easing","StyleSheet","LinearGradient","BaseComponent","BaseComponentState","WmSkeletonProps","DEFAULT_CLASS","isUndefined","WmSkeletonState","constructor","args","_defineProperty","left","top","width","height","AnimationRunner","Value","run","counter","timing","animationValue","duration","time","speed","toValue","useNativeDriver","easing","linear","start","event","finished","setValue","stop","Math","max","getValue","WmSkeleton","props","_this$skeletonloaderR","skeletonloaderRef","measure","x","y","px","py","layout","setState","animate","componentDidMount","animationRunner","componentWillUnmount","renderWidget","_this$styles$gradient","_this$styles$gradient2","_this$styles$gradient3","outpuRange","state","deg","translateX","interpolate","inputRange","outputRange","createElement","ref","onLayout","onLayoutChange","style","styles","root","children","absoluteFill","animatedView","transform","rotate","end","colors","gradientForeground","backgroundColor","toString","gradient","locations","createSkeleton","theme","skeletonStyles","wrapper","addStyleProp","propName","mergeStyle"],"sources":["skeleton.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Animated, Easing, StyleSheet, LayoutChangeEvent, ColorValue, ViewStyle } from 'react-native';\nimport { LinearGradient } from 'expo-linear-gradient';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Theme } from '@wavemaker/app-rn-runtime/styles/theme';\n\nimport WmSkeletonProps from './skeleton.props';\nimport { DEFAULT_CLASS, WmSkeletonStyles } from './skeleton.styles';\nimport { isUndefined } from 'lodash-es';\n\nexport class WmSkeletonState extends BaseComponentState<WmSkeletonProps> {\n layout = {\n left: 0,\n top: 0,\n width: 0,\n height: 0,\n };\n animate = false;\n}\n\nclass AnimationRunner {\n private time: number = 1000;\n public speed = 1;\n private counter = 0;\n private animationValue = new Animated.Value(0.2);\n\n public run() {\n if (this.counter == 0) {\n return;\n }\n Animated.timing(this.animationValue, {\n duration: this.time * this.speed,\n toValue: 1,\n useNativeDriver: true,\n easing: Easing.linear,\n }).start((event) => {\n if (event.finished) {\n this.animationValue.setValue(0)\n this.run();\n }\n });\n }\n\n public start() {\n this.counter++;\n if (this.counter == 1) {\n this.run();\n }\n }\n\n public stop() {\n this.counter = Math.max(--this.counter, 0);\n }\n\n public getValue() {\n return this.animationValue;\n }\n}\n\nexport default class WmSkeleton extends BaseComponent<WmSkeletonProps, WmSkeletonState, WmSkeletonStyles> {\n\n private skeletonloaderRef: any = null;\n private animationRunner = new AnimationRunner();\n\n constructor(props: WmSkeletonProps) {\n super(props, DEFAULT_CLASS, new WmSkeletonProps(), new WmSkeletonState());\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.animationRunner.start();\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.animationRunner.stop();\n }\n\n onLayoutChange = (event: LayoutChangeEvent) => {\n this.skeletonloaderRef?.measure((x: number, y: number, width: number, height: number, px: number, py: number) => {\n let layout = {\n left: px,\n top: py,\n width: width,\n height: height,\n };\n this.setState({\n layout: {\n ...layout as any\n }, animate: true\n });\n });\n }\n\n renderWidget(props: WmSkeletonProps) {\n let outpuRange = [-this.state.layout.width-this.state.layout.left, this.state.layout.width + this.state.layout.height];\n let deg = -20;\n let translateX = this.animationRunner.getValue().interpolate({\n inputRange: [0, 1],\n outputRange: [-50, 400]\n });\n return (\n <View ref={(ref) => { this.skeletonloaderRef = ref; }} onLayout={this.onLayoutChange}\n style={this.styles.root} >\n {props.children}\n {this.state.animate ?\n <Animated.View\n style={[\n StyleSheet.absoluteFill,\n this.styles.animatedView,\n { \n transform: [\n { translateX },\n { rotate: deg + 'deg' }\n ]\n }]}>\n <LinearGradient\n start={{ x: 0, y: 0 }}\n end={{ x: 1, y: 0 }}\n colors={[this.styles.gradientForeground.backgroundColor?.toString() as string,\n this.styles.gradient.backgroundColor?.toString() as string,\n this.styles.gradientForeground.backgroundColor?.toString() as string]}\n locations={[0, 0.5, 1]}\n style={[this.styles.gradient, {backgroundColor: this.styles.animatedView.backgroundColor}]} />\n </Animated.View> : null}\n </View>);\n }\n}\n\nexport const createSkeleton = (theme: Theme, skeletonStyles: WmSkeletonStyles, wrapper: ViewStyle, children?: React.ReactNode) => {\n const style = {} as ViewStyle;\n const addStyleProp = (propName: any) => {\n if (!isUndefined((wrapper as any)[propName])) {\n (style as any)[propName] = (wrapper as any)[propName];\n }\n };\n addStyleProp('width');\n addStyleProp('height');\n addStyleProp('borderRadius');\n addStyleProp('borderRadius');\n addStyleProp('marginTop');\n addStyleProp('marginBottom');\n addStyleProp('marginLeft');\n addStyleProp('marginRight');\n return(<WmSkeleton styles={theme.mergeStyle(skeletonStyles, {root: style})} children={children}/>);\n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AY,CAAC,OAAO,CAAC;EACrBA,YAAY,CAAC,QAAQ,CAAC;EACtBA,YAAY,CAAC,cAAc,CAAC;EAC5BA,YAAY,CAAC,cAAc,CAAC;EAC5BA,YAAY,CAAC,WAAW,CAAC;EACzBA,YAAY,CAAC,cAAc,CAAC;EAC5BA,YAAY,CAAC,YAAY,CAAC;EAC1BA,YAAY,CAAC,aAAa,CAAC;EAC3B,oBAAOzF,KAAA,CAAAkE,aAAA,CAAC1B,UAAU;IAAC+B,MAAM,EAAEe,KAAK,CAACK,UAAU,CAACJ,cAAc,EAAE;MAACf,IAAI,EAAEF;IAAK,CAAC,CAAE;IAACG,QAAQ,EAAEA;EAAS,CAAC,CAAC;AACnG,CAAC","ignoreList":[]}
|
@@ -1,3 +1,11 @@
|
|
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(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
1
4
|
import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
|
2
|
-
export default class WmSkeletonProps extends BaseProps {
|
5
|
+
export default class WmSkeletonProps extends BaseProps {
|
6
|
+
constructor(...args) {
|
7
|
+
super(...args);
|
8
|
+
_defineProperty(this, "children", null);
|
9
|
+
}
|
10
|
+
}
|
3
11
|
//# sourceMappingURL=skeleton.props.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseProps","WmSkeletonProps"],"sources":["skeleton.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nexport default class WmSkeletonProps extends BaseProps {\n}"],"mappings":"AAAA,SAASA,SAAS,QAAQ,+CAA+C;AACzE,eAAe,MAAMC,eAAe,SAASD,SAAS,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"names":["BaseProps","WmSkeletonProps","constructor","args","_defineProperty"],"sources":["skeleton.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nexport default class WmSkeletonProps extends BaseProps {\n children?: React.ReactNode | null = null;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AACzE,eAAe,MAAMC,eAAe,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,mBACf,IAAI;EAAA;AAC5C","ignoreList":[]}
|
@@ -71,14 +71,13 @@ export default class WmSpinner extends BaseComponent {
|
|
71
71
|
loop: true,
|
72
72
|
play: true,
|
73
73
|
style: this.styles.lottie
|
74
|
-
}) : /*#__PURE__*/React.createElement(LottieView, {
|
75
|
-
testID: this.getTestId('lottie'),
|
74
|
+
}) : /*#__PURE__*/React.createElement(LottieView, _extends({}, this.getTestProps('loader'), {
|
76
75
|
source: this.addClasstoLottie(props.lottie),
|
77
76
|
resizeMode: "contain",
|
78
77
|
autoPlay: true,
|
79
78
|
loop: true,
|
80
79
|
style: this.styles.lottie
|
81
|
-
});
|
80
|
+
}));
|
82
81
|
}
|
83
82
|
renderWidget(props) {
|
84
83
|
return /*#__PURE__*/React.createElement(View, {
|
@@ -1 +1 @@
|
|
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","id","getTestId","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","
|
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","id","getTestId","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","_extends","getTestProps","source","resizeMode","autoPlay","renderWidget","root","_background","caption","getTestPropsForLabel","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 id={this.getTestId('icon')}\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 id={this.getTestId('picture')}\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 {...this.getTestProps('loader')}\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 {...this.getTestPropsForLabel()} 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,KAAK,EAAER,aAAa,EAAE,IAAID,cAAc,CAAC,CAAC,CAAC;IAACU,eAAA,0BAiB1B,CAACC,GAAQ,EAAEC,MAAW,KAAK;MACnDD,GAAG,IAAIE,MAAM,CAACC,IAAI,CAACH,GAAG,CAAC,CAACI,OAAO,CAACC,GAAG,IAAI;QACnC,IAAIC,KAAK,GAAGN,GAAG,CAACK,GAAG,CAAC;QACpB,IAAIE,GAAG,GAAGC,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,MAAM,CAAC,CAAC,IAAI,CAAC,GAAGT,MAAM,CAACU,MAAM,CAAE,GAAGV,MAAM,CAACU,MAAM,CAAC;QAC1E,IAAIN,GAAG,IAAI,IAAI,KAAKC,KAAK,CAACM,WAAW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CAACzC,KAAK,CAAC,GAAGA,KAAK,CAAC2B,KAAK,GAAG,IAAI,CAACD,YAAY,CAAC1B,KAAK,CAAC,GAAG,IAAI,CAACkB,WAAW,CAAClB,KAAK,CAAC,EAC3GA,KAAK,CAAC4D,OAAO,gBAAG5E,KAAA,CAAAmC,aAAA,CAAClC,IAAI,EAAAmE,QAAA,KAAK,IAAI,CAACS,oBAAoB,CAAC,CAAC;MAAEV,KAAK,EAAE,IAAI,CAAC7B,MAAM,CAACwC;IAAK,IAAE9D,KAAK,CAAC4D,OAAc,CAAC,GAAG,IACtG,CAAC;EAEX;AACF","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["defineStyles","BASE_THEME","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","justifyContent","alignItems","text","fontSize","paddingLeft","icon","width","color","spinnerIconColor","image","lottie","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: 16,\n paddingLeft: 8\n },\n icon: {\n text: {\n fontSize: 48,\n width: 4,\n color: themeVariables.spinnerIconColor\n }\n } as WmIconStyles,\n image: {} as WmPictureStyles,\n lottie: {\n width:
|
1
|
+
{"version":3,"names":["defineStyles","BASE_THEME","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","justifyContent","alignItems","text","fontSize","paddingLeft","icon","width","color","spinnerIconColor","image","lottie","position","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: 16,\n paddingLeft: 8\n },\n icon: {\n text: {\n fontSize: 48,\n width: 4,\n color: themeVariables.spinnerIconColor\n }\n } as WmIconStyles,\n image: {} as WmPictureStyles,\n lottie: {\n position: 'absolute',\n width: 150,\n height: 150,\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,EAAE,CAAC;QACRC,KAAK,EAAEZ,cAAc,CAACa;MACxB;IACF,CAAiB;IACjBC,KAAK,EAAE,CAAC,CAAoB;IAC5BC,MAAM,EAAE;MACNC,QAAQ,EAAE,UAAU;MACpBL,KAAK,EAAE,GAAG;MACVM,MAAM,EAAE,GAAG;MACXC,SAAS,EAAE,QAAQ;MACnBb,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;MACLgB,SAAS,EAAE;IACb,CAAC;IACDZ,IAAI,EAAE;MACJa,YAAY,EAAE;IAChB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","ResizeMode","Video","BaseComponent","BaseComponentState","WmVideoProps","DEFAULT_CLASS","AccessibilityWidgetType","getAccessibilityProps","isFullPathUrl","WmVideoState","WmVideo","constructor","props","_defineProperty","status","console","log","isPlaying","error","getSource","path","resource","loadAsset","uri","renderWidget","createElement","style","styles","root","_background","_extends","VIDEO","ref","video","width","height","flex","shouldPlay","autoplay","onPlaybackStatusUpdate","handlePlaybackStatus","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, AVPlaybackStatus } 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 { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \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 handlePlaybackStatus = (status: AVPlaybackStatus) => {\n if ('isPlaying' in status && typeof status === 'object') {\n console.log(status.isPlaying? 'Playing' : 'Paused');\n } else if ('error' in status) {\n console.error(`Encountered a fatal error during playback: ${status.error}`);\n }\n };\n\n renderWidget(props: WmVideoProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n <Video\n {...getAccessibilityProps(AccessibilityWidgetType.VIDEO, props)}\n ref={(video) => { this.video = video; }}\n style={{ width: '100%', height: '100%', flex: 1 }}\n shouldPlay={props.autoplay}\n onPlaybackStatusUpdate={this.handlePlaybackStatus}\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,QAA0B,SAAS;AAC7D,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAE7D,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,aAAa,QAAQ,sCAAsC;AAEpE,OAAO,MAAMC,YAAY,SAASN,kBAAkB,CAAe;AAEnE,eAAe,MAAMO,OAAO,SAASR,aAAa,CAA4C;EAI5FS,WAAWA,CAACC,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAEP,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,EAAE,IAAIK,YAAY,CAAC,CAAC,CAAC;IAACI,eAAA,gBAHxC,IAAI;IAAAA,eAAA,+BAmBTC,MAAwB,IAAK;MACpD,IAAI,WAAW,IAAIA,MAAM,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;QACvDC,OAAO,CAACC,GAAG,CAACF,MAAM,CAACG,SAAS,GAAE,SAAS,GAAG,QAAQ,CAAC;MACrD,CAAC,MAAM,IAAI,OAAO,IAAIH,MAAM,EAAE;QAC5BC,OAAO,CAACG,KAAK,
|
1
|
+
{"version":3,"names":["React","View","ResizeMode","Video","BaseComponent","BaseComponentState","WmVideoProps","DEFAULT_CLASS","AccessibilityWidgetType","getAccessibilityProps","isFullPathUrl","WmVideoState","WmVideo","constructor","props","_defineProperty","status","console","log","isPlaying","error","getSource","path","resource","loadAsset","uri","renderWidget","createElement","style","styles","root","_background","_extends","VIDEO","ref","video","width","height","flex","shouldPlay","autoplay","onPlaybackStatusUpdate","handlePlaybackStatus","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, AVPlaybackStatus } 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 { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \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 handlePlaybackStatus = (status: AVPlaybackStatus) => {\n if ('isPlaying' in status && typeof status === 'object') {\n console.log(status.isPlaying? 'Playing' : 'Paused');\n } else if ('error' in status) {\n console.error(`Encountered a fatal error during playback: ${status.error}`);\n }\n };\n\n renderWidget(props: WmVideoProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n <Video\n {...getAccessibilityProps(AccessibilityWidgetType.VIDEO, props)}\n ref={(video) => { this.video = video; }}\n style={{ width: '100%', height: '100%', flex: 1 }}\n shouldPlay={props.autoplay}\n onPlaybackStatusUpdate={this.handlePlaybackStatus}\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,QAA0B,SAAS;AAC7D,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAE7D,SAASC,uBAAuB,EAAEC,qBAAqB,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CAACA,KAAK,GAAGA,KAAK;MAAE,CAAE;MACxCP,KAAK,EAAE;QAAEQ,KAAK,EAAE,MAAM;QAAEC,MAAM,EAAE,MAAM;QAAEC,IAAI,EAAE;MAAE,CAAE;MAClDC,UAAU,EAAEzB,KAAK,CAAC0B,QAAS;MAC3BC,sBAAsB,EAAE,IAAI,CAACC,oBAAqB;MAClDC,MAAM,EAAE,IAAI,CAACtB,SAAS,CACpBP,KAAK,CAAC8B,SAAS,IACZ9B,KAAK,CAAC+B,UAAU,CAAS;MAC9BC,YAAY,EAAG,IAAI,CAACzB,SAAS,CAACP,KAAK,CAACiC,WAAW,CAAU;MACzDC,iBAAiB,EAAElC,KAAK,CAACmC,QAAS;MAClCC,UAAU,EAAEhD,UAAU,CAACiD,OAAQ;MAC/BC,SAAS,EAAEtC,KAAK,CAACuC,IAAK;MACtBC,OAAO,EAAExC,KAAK,CAACyC,KAAM;MACrBC,MAAM,EAAE,IAAI,CAACC,SAAS,CAAC,OAAO;IAAE,EACjC,CACG,CAAC;EACX;AACF","ignoreList":[]}
|
@@ -3,7 +3,10 @@ import { defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
3
3
|
export const DEFAULT_CLASS = 'app-video';
|
4
4
|
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
5
5
|
const defaultStyles = defineStyles({
|
6
|
-
root: {
|
6
|
+
root: {
|
7
|
+
height: 300,
|
8
|
+
width: "100%"
|
9
|
+
},
|
7
10
|
text: {}
|
8
11
|
});
|
9
12
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
@@ -1 +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,
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","height","width","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 height: 300,\n width : \"100%\"\n },\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;MACFC,MAAM,EAAE,GAAG;MACXC,KAAK,EAAG;IACZ,CAAC;IACDC,IAAI,EAAE,CAAC;EACX,CAAC,CAAC;EACFL,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC","ignoreList":[]}
|
@@ -69,7 +69,8 @@ export default class WmAreaChart extends BaseChartComponent {
|
|
69
69
|
}
|
70
70
|
return /*#__PURE__*/React.createElement(View, _extends({}, getAccessibilityProps(AccessibilityWidgetType.LINECHART, props), {
|
71
71
|
style: this.styles.root,
|
72
|
-
onLayout: this.onViewLayoutChange.bind(this)
|
72
|
+
onLayout: this.onViewLayoutChange.bind(this),
|
73
|
+
key: `${props.title}_area_chart`
|
73
74
|
}), this.getTooltip(), /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
|
74
75
|
style: {
|
75
76
|
flexDirection: 'row',
|
@@ -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","args","_defineProperty","WmAreaChart","props","e","viewWidth","nativeEvent","layout","width","updateState","chartWidth","onSelect","event","data","value","index","y","label","state","xaxisDatakeyArr","datum","x","selectedItem","dataset","setTooltipPosition","selectedChartItem","series","_dataObj","tooltipXaxis","tooltipYaxis","isTooltipOpen","invokeEventCallback","proxy","renderWidget","_this$state$data","_this$props$name","length","mindomain","xdomain","chartMinX","undefined","ydomain","chartMinY","chartName","name","gradientStop","chartMaxY","createElement","_extends","LINECHART","style","styles","root","onLayout","onViewLayoutChange","bind","getTooltip","flexDirection","alignItems","iconclass","icon","title","subHeading","subheading","theme","height","padding","top","offsettop","bottom","offsetbottom","left","offsetleft","right","offsetright","minDomain","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","size","highlightpoints","opacity","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 const nativeEvent = event.nativeEvent;\n this.setTooltipPosition(nativeEvent);\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\n this.updateState({\n tooltipXaxis: label,\n tooltipYaxis: value,\n isTooltipOpen: true,\n selectedItem: {...selectedItem, index: data.index},\n } as WmAreaChartState)\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 {this.getTooltip()}\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: props.offsettop, bottom: props.offsetbottom, left: props.offsetleft, right: props.offsetright }}\n minDomain={mindomain}\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 <VictoryScatter\n size={5}\n key={props.name + '_scatter' + i}\n style={{\n data: props.highlightpoints ? {fill: this.state.colors[i], opacity: 0.8}:{opacity: 0}\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 </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,uBAAuB,CAAmB;EAAAM,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,qBACjE,CAAC;EAAA;AAChB;AAEA,eAAe,MAAMC,WAAW,SAASV,kBAAkB,CAAwD;EAEjHO,WAAWA,CAACI,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEZ,aAAa,EAAE,IAAID,gBAAgB,CAAC,CAAC,EAAE,IAAIQ,gBAAgB,CAAC,CAAC,CAAC;I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AE;YACJkF,IAAI,EAAG,QAAOpD,SAAU,WAAUsC,CAAE,GAAE;YACtCe,MAAM,EAAE,IAAI,CAAC9E,KAAK,CAACwE,MAAM,CAACT,CAAC,CAAC;YAC5BgB,WAAW,EAAE9F,KAAK,CAAC+F;UACrB;QACF,CAAE;QACFrF,IAAI,EAAE,IAAI,CAACsF,KAAK,GAACnB,CAAC,CAACoB,UAAU,CAAC,CAAC,GAACpB;MAAE,CACnC,CAAC,eACAvG,KAAA,CAAAsE,aAAA,CAAC3D,cAAc;QACbiH,IAAI,EAAE,CAAE;QACRnB,GAAG,EAAE/E,KAAK,CAACyC,IAAI,GAAG,UAAU,GAAGqC,CAAE;QACjC/B,KAAK,EAAE;UACLrC,IAAI,EAAEV,KAAK,CAACmG,eAAe,GAAG;YAACP,IAAI,EAAE,IAAI,CAAC7E,KAAK,CAACwE,MAAM,CAACT,CAAC,CAAC;YAAEsB,OAAO,EAAE;UAAG,CAAC,GAAC;YAACA,OAAO,EAAE;UAAC;QACtF,CAAE;QACF1F,IAAI,EAAE,IAAI,CAACsF,KAAK,GAACnB,CAAC,CAACoB,UAAU,CAAC,CAAC,GAACpB,CAAE;QAClCwB,MAAM,EAAE,CAAC;UACPC,MAAM,EAAE,MAAM;UACdC,aAAa,EAAE7H,QAAQ,CAAC8H,EAAE,IAAI,KAAK,GAAG;YACpCC,OAAO,EAAE,IAAI,CAACjG,QAAQ,CAAC4C,IAAI,CAAC,IAAI;UAClC,CAAC,GAAC;YACAsD,OAAO,EAAE,IAAI,CAAClG,QAAQ,CAAC4C,IAAI,CAAC,IAAI;UAClC;QACF,CAAC;MAAE,CACF,CACO,CAAC;IACjB,CAAC,CAEW,CACF,CAAC,GAEjB,IACE,CAAC;EACT;AACF","ignoreList":[]}
|
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","args","_defineProperty","WmAreaChart","props","e","viewWidth","nativeEvent","layout","width","updateState","chartWidth","onSelect","event","data","value","index","y","label","state","xaxisDatakeyArr","datum","x","selectedItem","dataset","setTooltipPosition","selectedChartItem","series","_dataObj","tooltipXaxis","tooltipYaxis","isTooltipOpen","invokeEventCallback","proxy","renderWidget","_this$state$data","_this$props$name","length","mindomain","xdomain","chartMinX","undefined","ydomain","chartMinY","chartName","name","gradientStop","chartMaxY","createElement","_extends","LINECHART","style","styles","root","onLayout","onViewLayoutChange","bind","key","title","getTooltip","flexDirection","alignItems","iconclass","icon","subHeading","subheading","theme","height","padding","top","offsettop","bottom","offsetbottom","left","offsetleft","right","offsetright","minDomain","getLegendView","getXaxis","getYAxis","map","d","i","id","x1","y1","x2","y2","offset","stopColor","colors","lighten","rgb","toString","interpolation","fill","stroke","strokeWidth","linethickness","isRTL","toReversed","size","highlightpoints","opacity","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 const nativeEvent = event.nativeEvent;\n this.setTooltipPosition(nativeEvent);\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\n this.updateState({\n tooltipXaxis: label,\n tooltipYaxis: value,\n isTooltipOpen: true,\n selectedItem: {...selectedItem, index: data.index},\n } as WmAreaChartState)\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 key={`${props.title}_area_chart`}\n >\n {this.getTooltip()}\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: props.offsettop, bottom: props.offsetbottom, left: props.offsetleft, right: props.offsetright }}\n minDomain={mindomain}\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 <VictoryScatter\n size={5}\n key={props.name + '_scatter' + i}\n style={{\n data: props.highlightpoints ? {fill: this.state.colors[i], opacity: 0.8}:{opacity: 0}\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 </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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,KAAK,CAACmG,eAAe,GAAG;YAACP,IAAI,EAAE,IAAI,CAAC7E,KAAK,CAACwE,MAAM,CAACR,CAAC,CAAC;YAAEqB,OAAO,EAAE;UAAG,CAAC,GAAC;YAACA,OAAO,EAAE;UAAC;QACtF,CAAE;QACF1F,IAAI,EAAE,IAAI,CAACsF,KAAK,GAAClB,CAAC,CAACmB,UAAU,CAAC,CAAC,GAACnB,CAAE;QAClCuB,MAAM,EAAE,CAAC;UACPC,MAAM,EAAE,MAAM;UACdC,aAAa,EAAE7H,QAAQ,CAAC8H,EAAE,IAAI,KAAK,GAAG;YACpCC,OAAO,EAAE,IAAI,CAACjG,QAAQ,CAAC4C,IAAI,CAAC,IAAI;UAClC,CAAC,GAAC;YACAsD,OAAO,EAAE,IAAI,CAAClG,QAAQ,CAAC4C,IAAI,CAAC,IAAI;UAClC;QACF,CAAC;MAAE,CACF,CACO,CAAC;IACjB,CAAC,CAEW,CACF,CAAC,GAEjB,IACE,CAAC;EACT;AACF","ignoreList":[]}
|
@@ -2,6 +2,12 @@ import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';
|
|
2
2
|
import { DEFAULT_CLASS as BASE_CHART_DEFAULT_CLASS } from '../basechart.styles';
|
3
3
|
export const DEFAULT_CLASS = 'app-area-chart';
|
4
4
|
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
5
|
-
addStyle(DEFAULT_CLASS, BASE_CHART_DEFAULT_CLASS, {
|
5
|
+
addStyle(DEFAULT_CLASS, BASE_CHART_DEFAULT_CLASS, {
|
6
|
+
skeleton: {
|
7
|
+
root: {
|
8
|
+
height: 200
|
9
|
+
}
|
10
|
+
}
|
11
|
+
});
|
6
12
|
});
|
7
13
|
//# sourceMappingURL=area-chart.styles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","DEFAULT_CLASS","BASE_CHART_DEFAULT_CLASS","registerStyle","themeVariables","addStyle"],"sources":["area-chart.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {BaseChartComponentStyles, DEFAULT_CLASS as BASE_CHART_DEFAULT_CLASS } from '../basechart.styles';\n\nexport type WmAreaChartStyles = BaseStyles & BaseChartComponentStyles;\n\nexport const DEFAULT_CLASS = 'app-area-chart';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n addStyle(DEFAULT_CLASS, BASE_CHART_DEFAULT_CLASS, {});\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAE/D,SAAkCC,aAAa,IAAIC,wBAAwB,QAAQ,qBAAqB;
|
1
|
+
{"version":3,"names":["BASE_THEME","DEFAULT_CLASS","BASE_CHART_DEFAULT_CLASS","registerStyle","themeVariables","addStyle","skeleton","root","height"],"sources":["area-chart.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {BaseChartComponentStyles, DEFAULT_CLASS as BASE_CHART_DEFAULT_CLASS } from '../basechart.styles';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmAreaChartStyles = BaseStyles & BaseChartComponentStyles;\n\nexport const DEFAULT_CLASS = 'app-area-chart';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n addStyle(DEFAULT_CLASS, BASE_CHART_DEFAULT_CLASS, {\n skeleton: {\n root: {\n height: 200\n }\n } as WmSkeletonStyles\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAE/D,SAAkCC,aAAa,IAAIC,wBAAwB,QAAQ,qBAAqB;AAKxG,OAAO,MAAMD,aAAa,GAAG,gBAAgB;AAC7CD,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnDA,QAAQ,CAACJ,aAAa,EAAEC,wBAAwB,EAAE;IAC9CI,QAAQ,EAAE;MACNC,IAAI,EAAE;QACFC,MAAM,EAAE;MACZ;IACJ;EACJ,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
|
@@ -2,6 +2,12 @@ import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';
|
|
2
2
|
import { DEFAULT_CLASS as BASE_CHART_DEFAULT_CLASS } from '../basechart.styles';
|
3
3
|
export const DEFAULT_CLASS = 'app-bar-chart';
|
4
4
|
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
5
|
-
addStyle(DEFAULT_CLASS, BASE_CHART_DEFAULT_CLASS, {
|
5
|
+
addStyle(DEFAULT_CLASS, BASE_CHART_DEFAULT_CLASS, {
|
6
|
+
style: {
|
7
|
+
root: {
|
8
|
+
height: 200
|
9
|
+
}
|
10
|
+
}
|
11
|
+
});
|
6
12
|
});
|
7
13
|
//# sourceMappingURL=bar-chart.styles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","DEFAULT_CLASS","BASE_CHART_DEFAULT_CLASS","registerStyle","themeVariables","addStyle"],"sources":["bar-chart.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {BaseChartComponentStyles, DEFAULT_CLASS as BASE_CHART_DEFAULT_CLASS} from '../basechart.styles';\n\nexport type WmBarChartStyles = BaseStyles & BaseChartComponentStyles;\n\nexport const DEFAULT_CLASS = 'app-bar-chart';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n addStyle(DEFAULT_CLASS, BASE_CHART_DEFAULT_CLASS, {});\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAE/D,SAAkCC,aAAa,IAAIC,wBAAwB,QAAO,qBAAqB;
|
1
|
+
{"version":3,"names":["BASE_THEME","DEFAULT_CLASS","BASE_CHART_DEFAULT_CLASS","registerStyle","themeVariables","addStyle","style","root","height"],"sources":["bar-chart.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {BaseChartComponentStyles, DEFAULT_CLASS as BASE_CHART_DEFAULT_CLASS} from '../basechart.styles';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmBarChartStyles = BaseStyles & BaseChartComponentStyles;\n\nexport const DEFAULT_CLASS = 'app-bar-chart';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n addStyle(DEFAULT_CLASS, BASE_CHART_DEFAULT_CLASS, {\n style: {\n root: {\n height: 200\n }\n } as WmSkeletonStyles\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAE/D,SAAkCC,aAAa,IAAIC,wBAAwB,QAAO,qBAAqB;AAKvG,OAAO,MAAMD,aAAa,GAAG,eAAe;AAC5CD,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnDA,QAAQ,CAACJ,aAAa,EAAEC,wBAAwB,EAAE;IAC9CI,KAAK,EAAE;MACHC,IAAI,EAAE;QACFC,MAAM,EAAE;MACZ;IACJ;EACJ,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
|
@@ -12,6 +12,7 @@ import ThemeFactory from "@wavemaker/app-rn-runtime/components/chart/theme/chart
|
|
12
12
|
import { DEFAULT_CLASS } from "./basechart.styles";
|
13
13
|
import { constructSampleData, getChartType } from "./staticdata";
|
14
14
|
import { isWebPreviewMode } from "@wavemaker/app-rn-runtime/core/utils";
|
15
|
+
import WmLottie from "../basic/lottie/lottie.component";
|
15
16
|
export class BaseChartComponentState extends BaseComponentState {
|
16
17
|
constructor(...args) {
|
17
18
|
super(...args);
|
@@ -78,7 +79,7 @@ export class BaseChartComponent extends BaseComponent {
|
|
78
79
|
onViewLayoutChange(e) {
|
79
80
|
let viewWidth = e.nativeEvent.layout.width;
|
80
81
|
let viewHeight = e.nativeEvent.layout.height;
|
81
|
-
if (viewWidth !== this.state.chartWidth) {
|
82
|
+
if (this !== null && this !== void 0 && this.state && viewWidth !== this.state.chartWidth) {
|
82
83
|
this.updateState({
|
83
84
|
chartWidth: Number(viewWidth),
|
84
85
|
totalHeight: Number(viewHeight)
|
@@ -136,6 +137,28 @@ export class BaseChartComponent extends BaseComponent {
|
|
136
137
|
const _min = Math.floor(value);
|
137
138
|
return Math.abs(value) - _min > 0 ? value - .1 : _min - 1;
|
138
139
|
}
|
140
|
+
setYAxisFormat(yVal, ynumberformat) {
|
141
|
+
const matchFixed = ynumberformat.match(/\.([0-9])f/);
|
142
|
+
const matchExponential = ynumberformat.match(/\.([0-9])g/);
|
143
|
+
if (matchFixed) {
|
144
|
+
return yVal.toFixed(parseInt(matchFixed[1], 10));
|
145
|
+
} else if (matchExponential) {
|
146
|
+
return yVal.toExponential(parseInt(matchExponential[1], 10));
|
147
|
+
}
|
148
|
+
switch (ynumberformat) {
|
149
|
+
case '%':
|
150
|
+
return (yVal * 100).toFixed(0) + '%';
|
151
|
+
case 'Billion':
|
152
|
+
return (yVal / 1e9).toFixed(1) + 'B';
|
153
|
+
case 'Million':
|
154
|
+
return (yVal / 1e6).toFixed(1) + 'M';
|
155
|
+
case 'Thousand':
|
156
|
+
return (yVal / 1e3).toFixed(1) + 'K';
|
157
|
+
case ',r':
|
158
|
+
return yVal.toLocaleString();
|
159
|
+
}
|
160
|
+
}
|
161
|
+
|
139
162
|
// x axis with vertical lines having grid stroke colors
|
140
163
|
getXaxis() {
|
141
164
|
const minIndex = 0;
|
@@ -190,6 +213,7 @@ export class BaseChartComponent extends BaseComponent {
|
|
190
213
|
return null;
|
191
214
|
}
|
192
215
|
const getTickValueLabel = props.ytickexpr;
|
216
|
+
const ynumberformat = props.ynumberformat;
|
193
217
|
let xaxislabeldistance = props.xaxislabeldistance ? props.xaxislabeldistance : 20;
|
194
218
|
return /*#__PURE__*/React.createElement(VictoryAxis, {
|
195
219
|
crossAxis: false,
|
@@ -217,6 +241,9 @@ export class BaseChartComponent extends BaseComponent {
|
|
217
241
|
if (getTickValueLabel) {
|
218
242
|
return getTickValueLabel(d, i, (ticks || []).length);
|
219
243
|
}
|
244
|
+
if (ynumberformat) {
|
245
|
+
return this.setYAxisFormat(d, ynumberformat);
|
246
|
+
}
|
220
247
|
return this.abbreviateNumber(d);
|
221
248
|
},
|
222
249
|
orientation: this.isRTL ? "right" : "left",
|
@@ -255,6 +282,8 @@ export class BaseChartComponent extends BaseComponent {
|
|
255
282
|
});
|
256
283
|
}
|
257
284
|
getTooltip() {
|
285
|
+
const ynumberformat = this.state.props.ynumberformat;
|
286
|
+
let yAxisData = ynumberformat ? this.setYAxisFormat(this.state.tooltipYaxis, ynumberformat) : this.state.tooltipYaxis;
|
258
287
|
return this.state.isTooltipOpen ? !isEmpty(this.state.template) && this.props.renderitempartial ? /*#__PURE__*/React.createElement(View, {
|
259
288
|
onLayout: this.setTooltipPartialLayout.bind(this),
|
260
289
|
style: {
|
@@ -276,7 +305,7 @@ export class BaseChartComponent extends BaseComponent {
|
|
276
305
|
}, this.styles.tooltipXText]
|
277
306
|
}, this.state.tooltipXaxis), /*#__PURE__*/React.createElement(Text, {
|
278
307
|
style: this.styles.tooltipXText
|
279
|
-
},
|
308
|
+
}, yAxisData), this.renderPointer()) : null;
|
280
309
|
}
|
281
310
|
|
282
311
|
// X/Y Domain properties are supported only for Column and Area charts
|
@@ -554,6 +583,7 @@ export class BaseChartComponent extends BaseComponent {
|
|
554
583
|
renderLoadingIcon() {
|
555
584
|
const props = this.state.props;
|
556
585
|
return /*#__PURE__*/React.createElement(WmIcon, {
|
586
|
+
id: this.getTestId('loadericon'),
|
557
587
|
styles: this.styles.loadingIcon,
|
558
588
|
iconclass: props.loadingicon,
|
559
589
|
caption: props.loadingdatamsg
|
@@ -634,6 +664,28 @@ export class BaseChartComponent extends BaseComponent {
|
|
634
664
|
break;
|
635
665
|
}
|
636
666
|
}
|
667
|
+
renderSkeleton(props) {
|
668
|
+
if (props.skeletonanimationresource) {
|
669
|
+
var _this$styles, _this$styles2, _this$styles3;
|
670
|
+
return /*#__PURE__*/React.createElement(View, {
|
671
|
+
style: [{
|
672
|
+
width: '100%'
|
673
|
+
}, (_this$styles = this.styles) === null || _this$styles === void 0 ? void 0 : _this$styles.root]
|
674
|
+
}, /*#__PURE__*/React.createElement(WmLottie, {
|
675
|
+
styles: {
|
676
|
+
content: {
|
677
|
+
...((_this$styles2 = this.styles) === null || _this$styles2 === void 0 ? void 0 : _this$styles2.root),
|
678
|
+
...((_this$styles3 = this.styles) === null || _this$styles3 === void 0 || (_this$styles3 = _this$styles3.skeleton) === null || _this$styles3 === void 0 ? void 0 : _this$styles3.root)
|
679
|
+
}
|
680
|
+
},
|
681
|
+
source: props.skeletonanimationresource,
|
682
|
+
loop: true,
|
683
|
+
autoplay: true,
|
684
|
+
speed: this.props.skeletonanimationspeed
|
685
|
+
}));
|
686
|
+
}
|
687
|
+
return null;
|
688
|
+
}
|
637
689
|
}
|
638
690
|
function getDataType(widgetContext) {
|
639
691
|
throw new Error("Function not implemented.");
|