@wavemaker/app-rn-runtime 12.0.0-next.140535 → 12.0.0-next.141130
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 +5 -32
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js +0 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +0 -15
- 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 +5 -15
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js +0 -3
- app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
- app-rn-runtime/components/basic/animatedview.component.js +2 -6
- 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 +6 -20
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +6 -14
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +3 -13
- 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/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +2 -1
- 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 +0 -12
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +0 -2
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +0 -6
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js +3 -4
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.props.js +1 -9
- app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js +3 -2
- app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.styles.js +2 -3
- 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 +1 -4
- app-rn-runtime/components/basic/video/video.styles.js.map +1 -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 +1 -7
- 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 +1 -7
- app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +2 -54
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +2 -3
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js +0 -4
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +3 -15
- 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 +1 -7
- 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 +1 -7
- 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 +1 -7
- 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 +0 -2
- 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 +1 -7
- 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 +1 -4
- 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 +1 -7
- 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 +11 -37
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +5 -47
- 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 +0 -5
- app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +1 -4
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +2 -36
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.styles.js +0 -7
- 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 +1 -5
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js +1 -6
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +2 -27
- 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 +1 -4
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js +5 -31
- 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 +1 -4
- app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +6 -46
- 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 +0 -3
- 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 +4 -3
- 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 +1 -4
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +3 -31
- 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 +1 -4
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +1 -23
- 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 +1 -6
- app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +13 -54
- 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 +0 -3
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +1 -4
- 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 +2 -6
- 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 +1 -4
- app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +0 -18
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.styles.js +0 -3
- 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 +0 -1
- app-rn-runtime/components/data/form/form.props.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js +1 -15
- 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 +0 -1
- app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js +1 -11
- app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +33 -54
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +0 -1
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js +0 -9
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +3 -5
- 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 +4 -11
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.props.js +0 -1
- app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +12 -25
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js +0 -2
- app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +6 -5
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +2 -23
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js +0 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +2 -3
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +1 -16
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +5 -22
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheel-date-picker.component.js +12 -123
- 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 +0 -4
- 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 +0 -2
- 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 +2 -4
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.props.js +0 -1
- app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +3 -6
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +6 -26
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js +0 -1
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +9 -23
- 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 +0 -21
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +0 -2
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +0 -21
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js +0 -2
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +4 -2
- 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 +3 -2
- 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/page-content/page-content.component.js +2 -27
- 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 +1 -6
- 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 +1 -7
- app-rn-runtime/components/page/page.styles.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.component.js +0 -21
- 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 +1 -6
- 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 +0 -1
- app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js +0 -22
- 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 +1 -6
- app-rn-runtime/components/prefab/prefab-container.styles.js.map +1 -1
- app-rn-runtime/core/base.component.js +3 -5
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/textinput.component.js +3 -4
- 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 +0 -4
- app-rn-runtime/core/props.provider.js.map +1 -1
- app-rn-runtime/core/storage.service.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +25 -26
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/utils.js +4 -87
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/package.json +7 -30
- app-rn-runtime/runtime/App.js +1 -2
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/App.navigator.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +13 -43
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/base-partial.component.js.map +1 -1
- app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
- app-rn-runtime/runtime/services/app-i18n.service.js +0 -10
- app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +1 -25
- 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 +0 -1
- 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.map +1 -1
- app-rn-runtime/styles/theme.variables.js +0 -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/service-variable.js.map +1 -1
- app-rn-runtime/core/ui-preferences.context.js +0 -7
- app-rn-runtime/core/ui-preferences.context.js.map +0 -1
@@ -1,11 +1,3 @@
|
|
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); }
|
4
1
|
import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
|
5
|
-
export default class WmSkeletonProps extends BaseProps {
|
6
|
-
constructor(...args) {
|
7
|
-
super(...args);
|
8
|
-
_defineProperty(this, "children", null);
|
9
|
-
}
|
10
|
-
}
|
2
|
+
export default class WmSkeletonProps extends BaseProps {}
|
11
3
|
//# sourceMappingURL=skeleton.props.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseProps","WmSkeletonProps"
|
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":[]}
|
@@ -71,13 +71,14 @@ 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,
|
74
|
+
}) : /*#__PURE__*/React.createElement(LottieView, {
|
75
|
+
testID: this.getTestId('lottie'),
|
75
76
|
source: this.addClasstoLottie(props.lottie),
|
76
77
|
resizeMode: "contain",
|
77
78
|
autoPlay: true,
|
78
79
|
loop: true,
|
79
80
|
style: this.styles.lottie
|
80
|
-
})
|
81
|
+
});
|
81
82
|
}
|
82
83
|
renderWidget(props) {
|
83
84
|
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","testID","source","resizeMode","autoPlay","renderWidget","root","_background","caption","_extends","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 testID={this.getTestId('lottie')}\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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AACC,IAAI,EAAE,IAAK;MAACC,KAAK,EAAE,IAAI,CAAC7B,MAAM,CAAC0B;IAAO,CAAE,CAAC,gBAAGhE,KAAA,CAAAmC,aAAA,CAACxB,UAAU;MACpJyD,MAAM,EAAE,IAAI,CAAC/B,SAAS,CAAC,QAAQ,CAAE;MACjCgC,MAAM,EAAE,IAAI,CAACnB,gBAAgB,CAAClC,KAAK,CAACgD,MAAM,CAAE;MAC5CM,UAAU,EAAC,SAAS;MACpBC,QAAQ,EAAE,IAAK;MACfN,IAAI,EAAE,IAAK;MACXE,KAAK,EAAE,IAAI,CAAC7B,MAAM,CAAC0B;IAAO,CAC3B,CAAC;EAEN;EAEAQ,YAAYA,CAACxD,KAAqB,EAAE;IAClC,oBACEhB,KAAA,CAAAmC,aAAA,CAACjC,IAAI;MAACiE,KAAK,EAAE,IAAI,CAAC7B,MAAM,CAACmC;IAAK,GAC3B,IAAI,CAACC,WAAW,EAChB1D,KAAK,CAACgD,MAAM,GAAG,IAAI,CAACP,aAAa,CAACzC,KAAK,CAAC,GAAGA,KAAK,CAAC2B,KAAK,GAAG,IAAI,CAACD,YAAY,CAAC1B,KAAK,CAAC,GAAG,IAAI,CAACkB,WAAW,CAAClB,KAAK,CAAC,EAC3GA,KAAK,CAAC2D,OAAO,gBAAG3E,KAAA,CAAAmC,aAAA,CAAClC,IAAI,EAAA2E,QAAA,KAAK,IAAI,CAACC,oBAAoB,CAAC,CAAC;MAAEV,KAAK,EAAE,IAAI,CAAC7B,MAAM,CAACwC;IAAK,IAAE9D,KAAK,CAAC2D,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","
|
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: 100,\n height: 100,\n alignSelf: 'center',\n justifyContent: 'center'\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root : {\n textAlign: 'right'\n },\n text: {\n paddingRight: 8\n }\n });\n});\n"],"mappings":"AAAA,SAAqBA,YAAY,QAAQ,+CAA+C;AACxF,OAAOC,UAAU,MAAiC,wCAAwC;AAU1F,OAAO,MAAMC,aAAa,GAAG,aAAa;AAC1CD,UAAU,CAACE,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA8B,GAAGN,YAAY,CAAC;IAClDO,IAAI,EAAE;MACJC,aAAa,EAAE,KAAK;MACpBC,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE;IACd,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,WAAW,EAAE;IACf,CAAC;IACDC,IAAI,EAAE;MACJH,IAAI,EAAE;QACJC,QAAQ,EAAE,EAAE;QACZG,KAAK,EAAE,CAAC;QACRC,KAAK,EAAEZ,cAAc,CAACa;MACxB;IACF,CAAiB;IACjBC,KAAK,EAAE,CAAC,CAAoB;IAC5BC,MAAM,EAAE;MACNJ,KAAK,EAAE,GAAG;MACVK,MAAM,EAAE,GAAG;MACXC,SAAS,EAAE,QAAQ;MACnBZ,cAAc,EAAE;IAClB;EACF,CAAC,CAAC;EAEFJ,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACnCK,IAAI,EAAG;MACLe,SAAS,EAAE;IACb,CAAC;IACDX,IAAI,EAAE;MACJY,YAAY,EAAE;IAChB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","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,QAAQ,8CAA8C;AAC7G,SAASC,aAAa,QAAQ,sCAAsC;A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AAE;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,10 +3,7 @@ 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: {
|
7
|
-
height: 300,
|
8
|
-
width: "100%"
|
9
|
-
},
|
6
|
+
root: {},
|
10
7
|
text: {}
|
11
8
|
});
|
12
9
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text"],"sources":["video.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type WmVideoStyles = BaseStyles & {};\n\nexport const DEFAULT_CLASS = 'app-video';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = defineStyles<WmVideoStyles>({\n root: {},\n text: {}\n });\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAIxF,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAa,GAAGL,YAAY,CAAgB;IAC9CM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC;EACX,CAAC,CAAC;EACFH,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC","ignoreList":[]}
|
@@ -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;A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W,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","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>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AAI,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":[]}
|
@@ -2,12 +2,6 @@ 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, {
|
6
|
-
skeleton: {
|
7
|
-
root: {
|
8
|
-
height: 200
|
9
|
-
}
|
10
|
-
}
|
11
|
-
});
|
5
|
+
addStyle(DEFAULT_CLASS, BASE_CHART_DEFAULT_CLASS, {});
|
12
6
|
});
|
13
7
|
//# sourceMappingURL=area-chart.styles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","DEFAULT_CLASS","BASE_CHART_DEFAULT_CLASS","registerStyle","themeVariables","addStyle"
|
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;AAIxG,OAAO,MAAMD,aAAa,GAAG,gBAAgB;AAC7CD,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnDA,QAAQ,CAACJ,aAAa,EAAEC,wBAAwB,EAAE,CAAC,CAAC,CAAC;AACzD,CAAC,CAAC","ignoreList":[]}
|
@@ -2,12 +2,6 @@ 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, {
|
6
|
-
style: {
|
7
|
-
root: {
|
8
|
-
height: 200
|
9
|
-
}
|
10
|
-
}
|
11
|
-
});
|
5
|
+
addStyle(DEFAULT_CLASS, BASE_CHART_DEFAULT_CLASS, {});
|
12
6
|
});
|
13
7
|
//# sourceMappingURL=bar-chart.styles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","DEFAULT_CLASS","BASE_CHART_DEFAULT_CLASS","registerStyle","themeVariables","addStyle"
|
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;AAIvG,OAAO,MAAMD,aAAa,GAAG,eAAe;AAC5CD,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnDA,QAAQ,CAACJ,aAAa,EAAEC,wBAAwB,EAAE,CAAC,CAAC,CAAC;AACzD,CAAC,CAAC","ignoreList":[]}
|
@@ -12,7 +12,6 @@ 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";
|
16
15
|
export class BaseChartComponentState extends BaseComponentState {
|
17
16
|
constructor(...args) {
|
18
17
|
super(...args);
|
@@ -79,7 +78,7 @@ export class BaseChartComponent extends BaseComponent {
|
|
79
78
|
onViewLayoutChange(e) {
|
80
79
|
let viewWidth = e.nativeEvent.layout.width;
|
81
80
|
let viewHeight = e.nativeEvent.layout.height;
|
82
|
-
if (
|
81
|
+
if (viewWidth !== this.state.chartWidth) {
|
83
82
|
this.updateState({
|
84
83
|
chartWidth: Number(viewWidth),
|
85
84
|
totalHeight: Number(viewHeight)
|
@@ -137,28 +136,6 @@ export class BaseChartComponent extends BaseComponent {
|
|
137
136
|
const _min = Math.floor(value);
|
138
137
|
return Math.abs(value) - _min > 0 ? value - .1 : _min - 1;
|
139
138
|
}
|
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
|
-
|
162
139
|
// x axis with vertical lines having grid stroke colors
|
163
140
|
getXaxis() {
|
164
141
|
const minIndex = 0;
|
@@ -213,7 +190,6 @@ export class BaseChartComponent extends BaseComponent {
|
|
213
190
|
return null;
|
214
191
|
}
|
215
192
|
const getTickValueLabel = props.ytickexpr;
|
216
|
-
const ynumberformat = props.ynumberformat;
|
217
193
|
let xaxislabeldistance = props.xaxislabeldistance ? props.xaxislabeldistance : 20;
|
218
194
|
return /*#__PURE__*/React.createElement(VictoryAxis, {
|
219
195
|
crossAxis: false,
|
@@ -241,9 +217,6 @@ export class BaseChartComponent extends BaseComponent {
|
|
241
217
|
if (getTickValueLabel) {
|
242
218
|
return getTickValueLabel(d, i, (ticks || []).length);
|
243
219
|
}
|
244
|
-
if (ynumberformat) {
|
245
|
-
return this.setYAxisFormat(d, ynumberformat);
|
246
|
-
}
|
247
220
|
return this.abbreviateNumber(d);
|
248
221
|
},
|
249
222
|
orientation: this.isRTL ? "right" : "left",
|
@@ -282,8 +255,6 @@ export class BaseChartComponent extends BaseComponent {
|
|
282
255
|
});
|
283
256
|
}
|
284
257
|
getTooltip() {
|
285
|
-
const ynumberformat = this.state.props.ynumberformat;
|
286
|
-
let yAxisData = ynumberformat ? this.setYAxisFormat(this.state.tooltipYaxis, ynumberformat) : this.state.tooltipYaxis;
|
287
258
|
return this.state.isTooltipOpen ? !isEmpty(this.state.template) && this.props.renderitempartial ? /*#__PURE__*/React.createElement(View, {
|
288
259
|
onLayout: this.setTooltipPartialLayout.bind(this),
|
289
260
|
style: {
|
@@ -305,7 +276,7 @@ export class BaseChartComponent extends BaseComponent {
|
|
305
276
|
}, this.styles.tooltipXText]
|
306
277
|
}, this.state.tooltipXaxis), /*#__PURE__*/React.createElement(Text, {
|
307
278
|
style: this.styles.tooltipXText
|
308
|
-
},
|
279
|
+
}, this.state.tooltipYaxis), this.renderPointer()) : null;
|
309
280
|
}
|
310
281
|
|
311
282
|
// X/Y Domain properties are supported only for Column and Area charts
|
@@ -583,7 +554,6 @@ export class BaseChartComponent extends BaseComponent {
|
|
583
554
|
renderLoadingIcon() {
|
584
555
|
const props = this.state.props;
|
585
556
|
return /*#__PURE__*/React.createElement(WmIcon, {
|
586
|
-
id: this.getTestId('loadericon'),
|
587
557
|
styles: this.styles.loadingIcon,
|
588
558
|
iconclass: props.loadingicon,
|
589
559
|
caption: props.loadingdatamsg
|
@@ -664,28 +634,6 @@ export class BaseChartComponent extends BaseComponent {
|
|
664
634
|
break;
|
665
635
|
}
|
666
636
|
}
|
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
|
-
}
|
689
637
|
}
|
690
638
|
function getDataType(widgetContext) {
|
691
639
|
throw new Error("Function not implemented.");
|