@wavemaker/app-rn-runtime 11.5.0-next.40301 → 11.5.0-next.NULL
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- app-rn-runtime/actions/login-action.js +4 -0
- app-rn-runtime/actions/login-action.js.map +1 -1
- app-rn-runtime/actions/logout-action.js +4 -0
- app-rn-runtime/actions/logout-action.js.map +1 -1
- app-rn-runtime/actions/notification-action.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +4 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js +1 -2
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js +214 -69
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js +3 -0
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +22 -10
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/advanced/login/login.component.js +3 -2
- app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +17 -16
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js +28 -11
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.props.js +0 -1
- app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +7 -5
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/animatedview.component.js +50 -0
- app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.component.js +5 -0
- app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +20 -7
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.styles.js +15 -5
- app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +11 -5
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +11 -5
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.props.js +1 -0
- app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.styles.js +2 -1
- app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +79 -11
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.props.js +1 -0
- app-rn-runtime/components/basic/label/label.props.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js +5 -0
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/message/message.component.js +6 -3
- app-rn-runtime/components/basic/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +7 -5
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +4 -3
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +3 -2
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +12 -6
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +11 -10
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js +6 -2
- 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 +2 -1
- app-rn-runtime/components/basic/video/video.component.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +42 -14
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.props.js +10 -1
- app-rn-runtime/components/chart/area-chart/area-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +42 -4
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +1 -2
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +158 -46
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +18 -4
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js +44 -2
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +25 -3
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js +9 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.component.js +28 -6
- app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.props.js +1 -0
- app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +25 -3
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +1 -0
- app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +275 -0
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -0
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +17 -0
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -0
- app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js +7 -0
- app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js.map +1 -0
- app-rn-runtime/components/container/accordion/accordion.component.js +22 -15
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +6 -24
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +14 -4
- 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/panel/collapsible-pane.component.js +26 -0
- app-rn-runtime/components/container/panel/collapsible-pane.component.js.map +1 -0
- app-rn-runtime/components/container/panel/panel.component.js +44 -62
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.styles.js +9 -2
- app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
- app-rn-runtime/components/container/partial-host.component.js +1 -1
- app-rn-runtime/components/container/partial-host.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +29 -15
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +15 -10
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +18 -10
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js +1 -0
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +3 -2
- app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +139 -22
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.props.js +4 -0
- app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +117 -6
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +22 -3
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +4 -0
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +3 -2
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.component.js +1 -0
- app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +9 -7
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +12 -6
- app-rn-runtime/components/data/form/form.component.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.styles.js +9 -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 +93 -31
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +7 -0
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js +12 -5
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -0
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +2 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.component.js +1 -0
- app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.styles.js +2 -1
- app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +4 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +9 -3
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +6 -2
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js +10 -10
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +2 -0
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js +25 -8
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +4 -2
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js +2 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +6 -2
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +45 -6
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js +1 -0
- app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js +4 -0
- app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.styles.js +22 -11
- app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
- app-rn-runtime/components/input/calendar/views/month-view.js +4 -0
- app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +6 -6
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +14 -7
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +2 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +15 -4
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.styles.js +20 -12
- app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.component.js +8 -1
- app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.props.js +1 -0
- app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.styles.js +16 -1
- app-rn-runtime/components/input/composite/composite.styles.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +21 -3
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.props.js +1 -0
- app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +31 -5
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +32 -9
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.component.js +8 -0
- app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.styles.js +16 -0
- app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.component.js +8 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js +1 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +21 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.component.js +8 -0
- app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.styles.js +16 -0
- app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -0
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +16 -2
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.props.js +1 -0
- app-rn-runtime/components/input/number/number.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +23 -2
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +13 -6
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js +6 -0
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js +6 -9
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/rating/rating.component.js +2 -0
- app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +17 -13
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.styles.js +8 -4
- app-rn-runtime/components/input/select/select.styles.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.component.js +99 -23
- app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.styles.js +30 -3
- app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +11 -5
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +15 -9
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +12 -1
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +1 -0
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js +22 -1
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +12 -1
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js +1 -0
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.styles.js +17 -0
- app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +44 -5
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.styles.js +16 -11
- app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +16 -3
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js +2 -0
- app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.component.js +5 -3
- app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.styles.js +10 -6
- app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.component.js +7 -4
- app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +6 -3
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.styles.js +14 -10
- app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js +10 -5
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.styles.js +8 -2
- app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js +2 -2
- app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.styles.js +6 -1
- app-rn-runtime/components/page/left-panel/left-panel.styles.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +11 -3
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/curve.js +84 -0
- app-rn-runtime/components/page/tabbar/curve.js.map +1 -0
- app-rn-runtime/components/page/tabbar/tabbar.component.js +47 -12
- 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/page/tabbar/tabbar.styles.js +76 -1
- app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
- app-rn-runtime/core/base.component.js +84 -37
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/floatinglabel.component.js +45 -0
- app-rn-runtime/core/components/floatinglabel.component.js.map +1 -0
- app-rn-runtime/core/components/textinput.component.js +25 -2
- app-rn-runtime/core/components/textinput.component.js.map +1 -1
- app-rn-runtime/core/constant.service.js +22 -0
- app-rn-runtime/core/constant.service.js.map +1 -0
- app-rn-runtime/core/formatters.js +9 -2
- app-rn-runtime/core/formatters.js.map +1 -1
- app-rn-runtime/core/imageSizeEstimator.js +4 -0
- app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
- app-rn-runtime/core/key.extractor.js +22 -0
- app-rn-runtime/core/key.extractor.js.map +1 -0
- app-rn-runtime/core/tappable.component.js +49 -12
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/testid.provider.js +5 -0
- app-rn-runtime/core/testid.provider.js.map +1 -0
- app-rn-runtime/core/utils.js +16 -0
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/gestures/swipe.animation.js +90 -16
- app-rn-runtime/gestures/swipe.animation.js.map +1 -1
- app-rn-runtime/package.json +6 -3
- app-rn-runtime/runtime/App.js +55 -22
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +27 -6
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +25 -2
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/services/app-i18n.service.js +7 -0
- app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-modal.service.js +1 -1
- app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +14 -3
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/runtime/services/device/camera-service.js +26 -9
- app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/scan-service.js +16 -2
- app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
- app-rn-runtime/runtime/services/webprocess.service.js +0 -1
- app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
- app-rn-runtime/styles/theme.js +66 -1
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +24 -3
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/http.service.js +1 -1
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/live-variable.js +1 -0
- app-rn-runtime/variables/live-variable.js.map +1 -1
- app-rn-runtime/variables/model-variable.js +13 -1
- app-rn-runtime/variables/model-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +1 -0
- app-rn-runtime/variables/service-variable.js.map +1 -1
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { View, Platform } from 'react-native';
|
|
6
|
+
import { Svg } from 'react-native-svg';
|
|
7
|
+
import { VictoryStack, VictoryBar, VictoryChart, VictoryPie, VictoryLegend, VictoryAxis } from 'victory-native';
|
|
8
|
+
import { Axis, Scale } from 'victory-core';
|
|
9
|
+
import { orderBy, cloneDeep, findIndex, isString } from 'lodash';
|
|
10
|
+
import WmStackChartProps from './stack-chart.props';
|
|
11
|
+
import { DEFAULT_CLASS } from './stack-chart.styles';
|
|
12
|
+
import { BaseChartComponent, BaseChartComponentState } from '@wavemaker/app-rn-runtime/components/chart/basechart.component';
|
|
13
|
+
export class WmStackChartState extends BaseChartComponentState {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
_defineProperty(this, "chartWidth", 0);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export default class WmStackChart extends BaseChartComponent {
|
|
20
|
+
constructor(props) {
|
|
21
|
+
super(props, DEFAULT_CLASS, new WmStackChartProps(), new WmStackChartState());
|
|
22
|
+
_defineProperty(this, "onViewLayoutChange", e => {
|
|
23
|
+
let viewWidth = e.nativeEvent.layout.width;
|
|
24
|
+
this.updateState({
|
|
25
|
+
chartWidth: viewWidth
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
componentDidMount() {
|
|
30
|
+
super.componentDidMount();
|
|
31
|
+
this.setHeightWidthOnChart();
|
|
32
|
+
}
|
|
33
|
+
getNegativeValuesArray() {
|
|
34
|
+
let negativeValuesArray = cloneDeep(this.state.data[0]).filter(d => d.y < 0);
|
|
35
|
+
negativeValuesArray = orderBy(negativeValuesArray, 'y', 'desc');
|
|
36
|
+
return negativeValuesArray;
|
|
37
|
+
}
|
|
38
|
+
getPositiveValuesArray() {
|
|
39
|
+
let positiveValuesArray = cloneDeep(this.state.data[0]).filter(d => d.y > 0);
|
|
40
|
+
positiveValuesArray = orderBy(positiveValuesArray, 'y', 'asc');
|
|
41
|
+
return positiveValuesArray;
|
|
42
|
+
}
|
|
43
|
+
getData() {
|
|
44
|
+
const negativeValues = cloneDeep(this.getNegativeValuesArray());
|
|
45
|
+
return negativeValues.concat(cloneDeep(this.getPositiveValuesArray()));
|
|
46
|
+
}
|
|
47
|
+
updateColors() {
|
|
48
|
+
if (this.state.colors.length === 1) {
|
|
49
|
+
return this.state.colors[0];
|
|
50
|
+
} else {
|
|
51
|
+
let colorCodes = cloneDeep(this.state.colors);
|
|
52
|
+
;
|
|
53
|
+
if (this.state.data.length > 0) {
|
|
54
|
+
const orderedData = this.getData();
|
|
55
|
+
this.state.data[0].map((d, i) => {
|
|
56
|
+
let index = findIndex(orderedData, d);
|
|
57
|
+
colorCodes[index] = this.state.colors[i];
|
|
58
|
+
});
|
|
59
|
+
return colorCodes;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
getBarChart(props) {
|
|
64
|
+
if (this.state.data.length > 0) {
|
|
65
|
+
const negativeValues = cloneDeep(this.getNegativeValuesArray());
|
|
66
|
+
const data = this.getData();
|
|
67
|
+
let currentValue = 0;
|
|
68
|
+
return data.map((d, i) => {
|
|
69
|
+
let d1 = [];
|
|
70
|
+
d.x = 0;
|
|
71
|
+
d.y = d.y - currentValue;
|
|
72
|
+
d1.push(d);
|
|
73
|
+
currentValue = d.y < 0 && i === negativeValues.length - 1 ? 0 : d.y + currentValue;
|
|
74
|
+
return /*#__PURE__*/React.createElement(VictoryBar, {
|
|
75
|
+
key: props.name + '_' + i,
|
|
76
|
+
cornerRadius: {
|
|
77
|
+
bottomLeft: 1,
|
|
78
|
+
bottomRight: 1,
|
|
79
|
+
topLeft: 1,
|
|
80
|
+
topRight: 1
|
|
81
|
+
},
|
|
82
|
+
data: d1
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
getColorCodes() {
|
|
88
|
+
const colors = cloneDeep(this.updateColors());
|
|
89
|
+
return isString(colors) ? [colors] : colors.reverse();
|
|
90
|
+
}
|
|
91
|
+
getArcChart(props) {
|
|
92
|
+
if (this.state.data.length > 0) {
|
|
93
|
+
let data = cloneDeep(this.state.data[0]);
|
|
94
|
+
const colorScaleArray = this.getColorCodes();
|
|
95
|
+
const maxValue = Math.max(...data.map(o => o.y));
|
|
96
|
+
data = orderBy(data, 'y', 'desc');
|
|
97
|
+
const radius = Math.min(this.state.chartWidth / 2, this.state.chartHeight - 50);
|
|
98
|
+
return data.map((d, i) => {
|
|
99
|
+
let d1 = [];
|
|
100
|
+
d1.push(d);
|
|
101
|
+
d1.push({
|
|
102
|
+
x: d.x,
|
|
103
|
+
y: maxValue - d.y
|
|
104
|
+
});
|
|
105
|
+
return /*#__PURE__*/React.createElement(VictoryPie, {
|
|
106
|
+
key: props.name + '_' + i,
|
|
107
|
+
radius: radius,
|
|
108
|
+
colorScale: [colorScaleArray[i], '#fff0'],
|
|
109
|
+
startAngle: -80,
|
|
110
|
+
endAngle: 80,
|
|
111
|
+
cornerRadius: 100,
|
|
112
|
+
standalone: false,
|
|
113
|
+
origin: {
|
|
114
|
+
x: this.state.chartWidth / 2,
|
|
115
|
+
y: this.state.chartHeight - 50
|
|
116
|
+
},
|
|
117
|
+
innerRadius: radius - this.state.props.thickness,
|
|
118
|
+
labels: [],
|
|
119
|
+
data: d1
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
getArcAxis() {
|
|
125
|
+
const ticks = this.getTickValues();
|
|
126
|
+
const radius = Math.min(this.state.chartWidth / 2, this.state.chartHeight - 50);
|
|
127
|
+
const axisData = [];
|
|
128
|
+
ticks.forEach((d, i) => {
|
|
129
|
+
axisData.push({
|
|
130
|
+
x: `${this.state.props.yunits}${d}`,
|
|
131
|
+
y: 1
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
return /*#__PURE__*/React.createElement(VictoryPie, {
|
|
135
|
+
style: {
|
|
136
|
+
labels: {
|
|
137
|
+
fontSize: 12,
|
|
138
|
+
paddingLeft: 50,
|
|
139
|
+
paddingRight: 80
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
startAngle: -90,
|
|
143
|
+
endAngle: 90,
|
|
144
|
+
standalone: false,
|
|
145
|
+
colorScale: ['#fff0'],
|
|
146
|
+
origin: {
|
|
147
|
+
x: this.state.chartWidth / 2 - 5,
|
|
148
|
+
y: this.state.chartHeight - 50
|
|
149
|
+
},
|
|
150
|
+
labelRadius: radius - this.state.props.thickness - 20,
|
|
151
|
+
data: axisData
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
getTickValues() {
|
|
155
|
+
let ticks = [];
|
|
156
|
+
if (this.state.data[0].length) {
|
|
157
|
+
let data = cloneDeep(this.state.data[0]);
|
|
158
|
+
const maxValue = Math.max(...data.map(o => o.y));
|
|
159
|
+
const minValue = Math.min(...data.map(o => o.y));
|
|
160
|
+
const scale = Scale.getBaseScale({}, 'x');
|
|
161
|
+
scale.domain([minValue > 0 ? 0 : minValue, maxValue]);
|
|
162
|
+
ticks = Axis.getTicks({}, scale);
|
|
163
|
+
ticks[ticks.length - 1] = maxValue;
|
|
164
|
+
if (minValue < 0) {
|
|
165
|
+
if (ticks[0] === 0) {
|
|
166
|
+
ticks.unshift(minValue);
|
|
167
|
+
} else {
|
|
168
|
+
ticks[0] = minValue;
|
|
169
|
+
}
|
|
170
|
+
} else {
|
|
171
|
+
ticks[0] = this.state.props.minvalue;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return ticks;
|
|
175
|
+
}
|
|
176
|
+
onSelect(event, data) {
|
|
177
|
+
let value = data.data[data.index].y;
|
|
178
|
+
let label = this.state.xaxisDatakeyArr[data.datum.x];
|
|
179
|
+
let selectedItem = this.props.dataset[data.index];
|
|
180
|
+
let selectedChartItem = [{
|
|
181
|
+
series: 0,
|
|
182
|
+
x: data.index,
|
|
183
|
+
y: value,
|
|
184
|
+
_dataObj: selectedItem
|
|
185
|
+
}, data.index];
|
|
186
|
+
this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem]);
|
|
187
|
+
}
|
|
188
|
+
renderWidget(props) {
|
|
189
|
+
this.invokeEventCallback('onBeforerender', [this.proxy, null]);
|
|
190
|
+
if (!this.state.data.length) {
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
let mindomain = {
|
|
194
|
+
x: this.props.xdomain === 'Min' ? this.state.chartMinX : undefined,
|
|
195
|
+
y: this.props.ydomain === 'Min' ? this.state.chartMinY : undefined
|
|
196
|
+
};
|
|
197
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
198
|
+
style: this.styles.root,
|
|
199
|
+
onLayout: this.onViewLayoutChange
|
|
200
|
+
}, props.viewtype === 'Bar' ? /*#__PURE__*/React.createElement(VictoryChart, {
|
|
201
|
+
theme: this.state.theme,
|
|
202
|
+
minDomain: mindomain,
|
|
203
|
+
height: this.styles.root.height,
|
|
204
|
+
width: this.styles.root.width || this.screenWidth,
|
|
205
|
+
padding: {
|
|
206
|
+
top: props.offsettop,
|
|
207
|
+
bottom: props.offsetbottom,
|
|
208
|
+
left: props.offsetleft,
|
|
209
|
+
right: props.offsetright
|
|
210
|
+
},
|
|
211
|
+
containerComponent: this.getTooltip(props)
|
|
212
|
+
}, /*#__PURE__*/React.createElement(VictoryLegend, {
|
|
213
|
+
name: 'legend',
|
|
214
|
+
containerComponent: /*#__PURE__*/React.createElement(Svg, null),
|
|
215
|
+
style: {
|
|
216
|
+
title: {
|
|
217
|
+
fontFamily: "'Helvetica Neue', 'Helvetica', sans-serif",
|
|
218
|
+
fontSize: 18
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
title: [props.title, props.subheading],
|
|
222
|
+
orientation: "horizontal",
|
|
223
|
+
gutter: 20,
|
|
224
|
+
data: [],
|
|
225
|
+
theme: this.state.theme
|
|
226
|
+
}), this.getLegendView(this.updateColors()), /*#__PURE__*/React.createElement(VictoryAxis, {
|
|
227
|
+
crossAxis: true,
|
|
228
|
+
style: {
|
|
229
|
+
tickLabels: {
|
|
230
|
+
fill: this.state.props.showyaxis === false ? 'transparent' : '#000000',
|
|
231
|
+
fontSize: 12,
|
|
232
|
+
padding: this.state.props.thickness / 2 + 5
|
|
233
|
+
},
|
|
234
|
+
axisLabel: {
|
|
235
|
+
padding: 15 + this.state.props.thickness / 2
|
|
236
|
+
},
|
|
237
|
+
grid: {
|
|
238
|
+
stroke: 'none'
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
theme: this.state.theme,
|
|
242
|
+
tickValues: this.getTickValues(),
|
|
243
|
+
tickFormat: t => this.state.props.yunits ? `${this.abbreviateNumber(t)}${this.state.props.yunits}` : `${this.abbreviateNumber(t)}`,
|
|
244
|
+
dependentAxis: true
|
|
245
|
+
}), /*#__PURE__*/React.createElement(VictoryStack, {
|
|
246
|
+
colorScale: this.updateColors(),
|
|
247
|
+
horizontal: true,
|
|
248
|
+
style: {
|
|
249
|
+
data: {
|
|
250
|
+
strokeWidth: this.state.props.thickness
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
events: [{
|
|
254
|
+
target: 'data',
|
|
255
|
+
eventHandlers: Platform.OS == "web" ? {
|
|
256
|
+
onClick: this.onSelect.bind(this)
|
|
257
|
+
} : {
|
|
258
|
+
onPress: this.onSelect.bind(this)
|
|
259
|
+
}
|
|
260
|
+
}]
|
|
261
|
+
}, this.getBarChart(props))) : /*#__PURE__*/React.createElement(Svg, {
|
|
262
|
+
width: this.state.chartWidth,
|
|
263
|
+
height: this.state.chartHeight
|
|
264
|
+
}, /*#__PURE__*/React.createElement(VictoryLegend, {
|
|
265
|
+
name: 'legend',
|
|
266
|
+
containerComponent: /*#__PURE__*/React.createElement(Svg, null),
|
|
267
|
+
title: [props.title, props.subheading],
|
|
268
|
+
orientation: "horizontal",
|
|
269
|
+
gutter: 20,
|
|
270
|
+
data: [],
|
|
271
|
+
theme: this.state.theme
|
|
272
|
+
}), this.getArcChart(props), this.getArcAxis()));
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
//# sourceMappingURL=stack-chart.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","Platform","Svg","VictoryStack","VictoryBar","VictoryChart","VictoryPie","VictoryLegend","VictoryAxis","Axis","Scale","orderBy","cloneDeep","findIndex","isString","WmStackChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","WmStackChartState","constructor","arguments","_defineProperty","WmStackChart","props","e","viewWidth","nativeEvent","layout","width","updateState","chartWidth","componentDidMount","setHeightWidthOnChart","getNegativeValuesArray","negativeValuesArray","state","data","filter","d","y","getPositiveValuesArray","positiveValuesArray","getData","negativeValues","concat","updateColors","colors","length","colorCodes","orderedData","map","i","index","getBarChart","currentValue","d1","x","push","createElement","key","name","cornerRadius","bottomLeft","bottomRight","topLeft","topRight","getColorCodes","reverse","getArcChart","colorScaleArray","maxValue","Math","max","o","radius","min","chartHeight","colorScale","startAngle","endAngle","standalone","origin","innerRadius","thickness","labels","getArcAxis","ticks","getTickValues","axisData","forEach","yunits","style","fontSize","paddingLeft","paddingRight","labelRadius","minValue","scale","getBaseScale","domain","getTicks","unshift","minvalue","onSelect","event","value","label","xaxisDatakeyArr","datum","selectedItem","dataset","selectedChartItem","series","_dataObj","invokeEventCallback","proxy","renderWidget","mindomain","xdomain","chartMinX","undefined","ydomain","chartMinY","styles","root","onLayout","onViewLayoutChange","viewtype","theme","minDomain","height","screenWidth","padding","top","offsettop","bottom","offsetbottom","left","offsetleft","right","offsetright","containerComponent","getTooltip","title","fontFamily","subheading","orientation","gutter","getLegendView","crossAxis","tickLabels","fill","showyaxis","axisLabel","grid","stroke","tickValues","tickFormat","t","abbreviateNumber","dependentAxis","horizontal","strokeWidth","events","target","eventHandlers","OS","onClick","bind","onPress"],"sources":["stack-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Platform } from 'react-native';\nimport { Svg } from 'react-native-svg';\nimport { VictoryStack, VictoryBar, VictoryChart, VictoryPie, VictoryLegend, VictoryAxis } from 'victory-native';\nimport { Axis, Scale } from 'victory-core';\nimport { orderBy, cloneDeep, findIndex, isString} from 'lodash';\n\nimport WmStackChartProps from './stack-chart.props';\nimport { DEFAULT_CLASS, WmStackChartStyles } from './stack-chart.styles';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from '@wavemaker/app-rn-runtime/components/chart/basechart.component';\n\nexport class WmStackChartState extends BaseChartComponentState<WmStackChartProps> {\n chartWidth = 0;\n}\n\nexport default class WmStackChart extends BaseChartComponent<WmStackChartProps, WmStackChartState, WmStackChartStyles> {\n constructor(props: WmStackChartProps) {\n super(props, DEFAULT_CLASS, new WmStackChartProps(), new WmStackChartState());\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.setHeightWidthOnChart();\n }\n\n getNegativeValuesArray() {\n let negativeValuesArray = cloneDeep(this.state.data[0]).filter((d: any) => d.y < 0);\n negativeValuesArray = orderBy(negativeValuesArray, 'y', 'desc');\n return negativeValuesArray;\n }\n\n getPositiveValuesArray() {\n let positiveValuesArray = cloneDeep(this.state.data[0]).filter((d: any) => d.y > 0);\n positiveValuesArray = orderBy(positiveValuesArray, 'y', 'asc');\n return positiveValuesArray;\n }\n\n getData() {\n const negativeValues = cloneDeep(this.getNegativeValuesArray());\n return negativeValues.concat(cloneDeep(this.getPositiveValuesArray()));\n }\n\n updateColors() {\n if (this.state.colors.length === 1 ) {\n return this.state.colors[0];\n } else {\n let colorCodes = cloneDeep(this.state.colors);;\n if ( this.state.data.length > 0 ) {\n const orderedData = this.getData();\n this.state.data[0].map((d: any, i: number) => {\n let index = findIndex(orderedData, d);\n colorCodes[index] = this.state.colors[i];\n })\n return colorCodes;\n }\n }\n }\n\n getBarChart(props: WmStackChartProps) {\n if ( this.state.data.length > 0 ) {\n const negativeValues = cloneDeep(this.getNegativeValuesArray());\n const data = this.getData();\n let currentValue = 0;\n\n return data.map((d: any, i: number) => {\n let d1: any = [];\n d.x = 0;\n d.y = d.y - currentValue;\n d1.push(d);\n currentValue = d.y < 0 && i === negativeValues.length -1 ? 0 : d.y + currentValue;\n return <VictoryBar key={props.name + '_' + i}\n cornerRadius={{bottomLeft:(1), bottomRight:(1), topLeft:(1), topRight:(1)}}\n data={d1}/>\n });\n }\n }\n\n private getColorCodes() {\n const colors = cloneDeep(this.updateColors());\n return isString(colors) ? [colors] : colors.reverse();\n }\n\n getArcChart(props: WmStackChartProps) {\n if ( this.state.data.length > 0 ) {\n let data = cloneDeep(this.state.data[0]);\n const colorScaleArray = this.getColorCodes();\n const maxValue = Math.max(...data.map((o: any) => o.y));\n data = orderBy(data, 'y', 'desc');\n const radius = Math.min(this.state.chartWidth/2, this.state.chartHeight - 50);\n return data.map((d: any, i: number) => {\n let d1: any = [];\n d1.push(d);\n d1.push({x: d.x, y: maxValue - d.y})\n return <VictoryPie key={props.name + '_' + i}\n radius={radius}\n colorScale={[colorScaleArray[i], '#fff0']}\n startAngle={-80}\n endAngle={80}\n cornerRadius={100}\n standalone={false}\n origin={{x: (this.state.chartWidth/2), y: (this.state.chartHeight - 50)}}\n innerRadius={radius - this.state.props.thickness}\n labels={[]}\n data={d1}/>\n });\n }\n }\n\n getArcAxis() {\n const ticks = this.getTickValues();\n const radius = Math.min(this.state.chartWidth/2, this.state.chartHeight-50);\n const axisData: any = [];\n ticks.forEach((d: any, i: any) => {\n axisData.push({x: `${this.state.props.yunits}${d}`, y: 1})\n });\n return <VictoryPie\n style={{\n labels: {\n fontSize: 12, paddingLeft: 50, paddingRight: 80\n }}\n }\n startAngle={-90}\n endAngle={90}\n standalone={false}\n colorScale={['#fff0']}\n origin={{x: (this.state.chartWidth/2 - 5), y: (this.state.chartHeight - 50)}}\n labelRadius={radius - this.state.props.thickness - 20}\n data={axisData}\n />\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let viewWidth = e.nativeEvent.layout.width;\n this.updateState({\n chartWidth: viewWidth\n } as WmStackChartState);\n }\n\n getTickValues() {\n let ticks: any = [];\n if (this.state.data[0].length) {\n let data = cloneDeep(this.state.data[0]);\n const maxValue = Math.max(...data.map((o: any) => o.y));\n const minValue = Math.min(...data.map((o: any) => o.y));\n const scale = Scale.getBaseScale({}, 'x');\n scale.domain([minValue > 0 ? 0 : minValue, maxValue]);\n ticks = Axis.getTicks({}, scale);\n ticks[ticks.length -1] = maxValue;\n if ( minValue < 0 ) {\n if (ticks[0] === 0) {\n ticks.unshift(minValue);\n } else {\n ticks[0] = minValue;\n }\n } else {\n ticks[0] = this.state.props.minvalue;\n }\n }\n return ticks;\n }\n\n onSelect(event: any, data: any){\n let value = data.data[data.index].y;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n }\n\n renderWidget(props: WmStackChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data.length) {\n return null;\n }\n let mindomain={x: this.props.xdomain === 'Min' ? this.state.chartMinX: undefined, y: this.props.ydomain === 'Min' ? this.state.chartMinY: undefined};\n return (\n <View\n style={this.styles.root} onLayout={this.onViewLayoutChange}\n >{\n props.viewtype === 'Bar' ?\n <VictoryChart\n theme={this.state.theme}\n minDomain={mindomain}\n height={this.styles.root.height as number}\n width={this.styles.root.width as number || this.screenWidth}\n padding={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: props.offsetleft,\n right: props.offsetright\n }}\n containerComponent={\n this.getTooltip(props)\n }\n >\n <VictoryLegend\n name={'legend'}\n containerComponent={<Svg />}\n style={{title: {\n fontFamily: \"'Helvetica Neue', 'Helvetica', sans-serif\",\n fontSize: 18\n }\n }}\n title={[props.title, props.subheading]}\n orientation=\"horizontal\"\n gutter={20}\n data={[]}\n theme={this.state.theme}\n />\n {this.getLegendView(this.updateColors())}\n <VictoryAxis crossAxis\n style={{\n tickLabels: { fill: this.state.props.showyaxis === false ? 'transparent' : '#000000', fontSize: 12, padding: this.state.props.thickness/2 + 5},\n axisLabel: { padding: (15 + this.state.props.thickness/2) },\n grid: {stroke: 'none'}\n }}\n theme={this.state.theme}\n tickValues={this.getTickValues()}\n tickFormat={(t) => this.state.props.yunits ? `${this.abbreviateNumber(t)}${this.state.props.yunits}` : `${this.abbreviateNumber(t)}`} dependentAxis />\n <VictoryStack\n colorScale={this.updateColors()}\n horizontal={true}\n style={{\n data: { strokeWidth: this.state.props.thickness }\n }}\n events={[{\n target: 'data',\n eventHandlers: Platform.OS == \"web\" ? {\n onClick: this.onSelect.bind(this)\n }:{\n onPress: this.onSelect.bind(this)\n }\n }]}\n >\n {\n this.getBarChart(props)\n }\n </VictoryStack>\n </VictoryChart> :\n <Svg width={this.state.chartWidth} height={this.state.chartHeight}>\n <VictoryLegend\n name={'legend'}\n containerComponent={<Svg />}\n title={[props.title, props.subheading]}\n orientation=\"horizontal\"\n gutter={20}\n data={[]}\n theme={this.state.theme}\n />\n {this.getArcChart(props)}\n {this.getArcAxis()}\n </Svg>\n }\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AAChE,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SAASC,YAAY,EAAEC,UAAU,EAAEC,YAAY,EAAEC,UAAU,EAAEC,aAAa,EAAEC,WAAW,QAAQ,gBAAgB;AAC/G,SAASC,IAAI,EAAEC,KAAK,QAAQ,cAAc;AAC1C,SAASC,OAAO,EAAEC,SAAS,EAAEC,SAAS,EAAEC,QAAQ,QAAO,QAAQ;AAE/D,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,SAASC,aAAa,QAA4B,sBAAsB;AACxE,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,gEAAgE;AAEvE,OAAO,MAAMC,iBAAiB,SAASD,uBAAuB,CAAoB;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,qBACnE,CAAC;EAAA;AAChB;AAEA,eAAe,MAAMC,YAAY,SAASN,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AAI,EAAE,QAAS;MACfiF,kBAAkB,eAAE/I,KAAA,CAAA4D,aAAA,CAACzD,GAAG,MAAE,CAAE;MAC5B8I,KAAK,EAAE,CAACxH,KAAK,CAACwH,KAAK,EAAExH,KAAK,CAAC0H,UAAU,CAAE;MACvCC,WAAW,EAAC,YAAY;MACxBC,MAAM,EAAE,EAAG;MACX/G,IAAI,EAAE,EAAG;MACT4F,KAAK,EAAE,IAAI,CAAC7F,KAAK,CAAC6F;IAAM,CACzB,CAAC,EACD,IAAI,CAAC5D,WAAW,CAAC7C,KAAK,CAAC,EACvB,IAAI,CAAC8D,UAAU,CAAC,CACd,CAEH,CAAC;EAEX;AACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
|
+
import BaseChartComponentProps from '@wavemaker/app-rn-runtime/components/chart/basechart.props';
|
|
5
|
+
export default class WmStackChartProps extends BaseChartComponentProps {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
_defineProperty(this, "viewtype", 'Bar');
|
|
9
|
+
_defineProperty(this, "showlegend", 'left');
|
|
10
|
+
_defineProperty(this, "thickness", 20);
|
|
11
|
+
_defineProperty(this, "offsetleft", 25);
|
|
12
|
+
_defineProperty(this, "offsetright", 35);
|
|
13
|
+
_defineProperty(this, "onSelect", void 0);
|
|
14
|
+
_defineProperty(this, "minvalue", 0);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=stack-chart.props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BaseChartComponentProps","WmStackChartProps","constructor","arguments","_defineProperty"],"sources":["stack-chart.props.ts"],"sourcesContent":["import BaseChartComponentProps from '@wavemaker/app-rn-runtime/components/chart/basechart.props';\n\nexport default class WmStackChartProps extends BaseChartComponentProps {\n viewtype: string = 'Bar';\n showlegend: string = 'left';\n thickness: number = 20;\n offsetleft: number = 25;\n offsetright: number = 35;\n onSelect?: any;\n minvalue: number = 0;\n}\n"],"mappings":";;;AAAA,OAAOA,uBAAuB,MAAM,4DAA4D;AAEhG,eAAe,MAAMC,iBAAiB,SAASD,uBAAuB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,mBAClD,KAAK;IAAAA,eAAA,qBACH,MAAM;IAAAA,eAAA,oBACP,EAAE;IAAAA,eAAA,qBACD,EAAE;IAAAA,eAAA,sBACD,EAAE;IAAAA,eAAA;IAAAA,eAAA,mBAEL,CAAC;EAAA;AACtB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';
|
|
2
|
+
import { DEFAULT_CLASS as BASE_CHART_DEFAULT_CLASS } from '../basechart.styles';
|
|
3
|
+
export const DEFAULT_CLASS = 'app-stack-chart';
|
|
4
|
+
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
5
|
+
addStyle(DEFAULT_CLASS, BASE_CHART_DEFAULT_CLASS, {});
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=stack-chart.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BASE_THEME","DEFAULT_CLASS","BASE_CHART_DEFAULT_CLASS","registerStyle","themeVariables","addStyle"],"sources":["stack-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 WmStackChartStyles = BaseStyles & BaseChartComponentStyles;\n\nexport const DEFAULT_CLASS = 'app-stack-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,iBAAiB;AAC9CD,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrDA,QAAQ,CAACJ,aAAa,EAAEC,wBAAwB,EAAE,CAAC,CAAC,CAAC;AACvD,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1
2
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
3
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
4
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
@@ -24,12 +25,16 @@ export default class WmAccordion extends BaseComponent {
|
|
|
24
25
|
_defineProperty(this, "newIndex", 0);
|
|
25
26
|
}
|
|
26
27
|
addAccordionPane(accordionPane) {
|
|
27
|
-
|
|
28
|
+
var _this$state$isExpande;
|
|
29
|
+
const i = this.accordionPanes.findIndex(t => t.props.title === accordionPane.props.title);
|
|
28
30
|
if (i >= 0) {
|
|
29
31
|
this.accordionPanes[i] = accordionPane;
|
|
30
32
|
} else {
|
|
31
33
|
this.accordionPanes[this.newIndex++] = accordionPane;
|
|
32
34
|
}
|
|
35
|
+
if (!((_this$state$isExpande = this.state.isExpanded) !== null && _this$state$isExpande !== void 0 && _this$state$isExpande.find(v => v))) {
|
|
36
|
+
this.toggle(this.state.props.defaultpaneindex + 1);
|
|
37
|
+
}
|
|
33
38
|
}
|
|
34
39
|
expand(accordionName) {
|
|
35
40
|
const i = this.accordionPanes.findIndex(t => t.props.name === accordionName);
|
|
@@ -39,16 +44,16 @@ export default class WmAccordion extends BaseComponent {
|
|
|
39
44
|
const i = this.accordionPanes.findIndex(t => t.props.name === accordionName);
|
|
40
45
|
this.toggle(i + 1, false);
|
|
41
46
|
}
|
|
42
|
-
expandCollapseIcon(item) {
|
|
43
|
-
let showBadge = arguments.length >
|
|
44
|
-
let showIcon = arguments.length >
|
|
45
|
-
let useChevron = arguments.length >
|
|
46
|
-
let isExpanded = arguments.length >
|
|
47
|
+
expandCollapseIcon(item, index) {
|
|
48
|
+
let showBadge = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
49
|
+
let showIcon = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
50
|
+
let useChevron = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
51
|
+
let isExpanded = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
|
|
47
52
|
const widgetProps = item.props;
|
|
48
53
|
//@ts-ignore
|
|
49
|
-
const badge = showBadge && widgetProps.badgevalue != undefined ? /*#__PURE__*/React.createElement(Badge, {
|
|
54
|
+
const badge = showBadge && widgetProps.badgevalue != undefined ? /*#__PURE__*/React.createElement(Badge, _extends({
|
|
50
55
|
style: [this.styles.badge, isExpanded ? this.styles.activeBadge : null, this.styles[widgetProps.badgetype || 'default']]
|
|
51
|
-
}, widgetProps.badgevalue) : null;
|
|
56
|
+
}, this.getTestProps('badge' + index)), widgetProps.badgevalue) : null;
|
|
52
57
|
let iconclass = null;
|
|
53
58
|
if (useChevron) {
|
|
54
59
|
iconclass = isExpanded ? 'wi wi-chevron-down' : 'wi wi-chevron-up';
|
|
@@ -60,6 +65,7 @@ export default class WmAccordion extends BaseComponent {
|
|
|
60
65
|
flexDirection: 'row'
|
|
61
66
|
}
|
|
62
67
|
}, badge, showIcon ? /*#__PURE__*/React.createElement(WmIcon, {
|
|
68
|
+
id: this.getTestId('icon' + index),
|
|
63
69
|
styles: this.theme.mergeStyle({}, this.styles.icon, isExpanded ? this.styles.activeIcon : null),
|
|
64
70
|
name: 'expand_collapse_icon',
|
|
65
71
|
iconclass: iconclass
|
|
@@ -71,12 +77,13 @@ export default class WmAccordion extends BaseComponent {
|
|
|
71
77
|
const isExpanded = this.state.isExpanded[index];
|
|
72
78
|
return /*#__PURE__*/React.createElement(View, {
|
|
73
79
|
style: this.styles.pane,
|
|
74
|
-
key: item.props.
|
|
75
|
-
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
76
|
-
key: 'accordionpane_' + (index + 1)
|
|
80
|
+
key: item.props.title
|
|
81
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, _extends({
|
|
82
|
+
key: 'accordionpane_' + (index + 1)
|
|
83
|
+
}, this.getTestPropsForAction(`header${index}`), {
|
|
77
84
|
style: [this.styles.header, index === 0 ? this.styles.firstHeader : null, index === accordionpanes.length - 1 && !isExpanded ? this.styles.lastHeader : null, isExpanded ? this.styles.activeHeader : {}],
|
|
78
85
|
onPress: this.toggle.bind(this, index + 1, !isExpanded)
|
|
79
|
-
}, this.expandCollapseIcon(item, false, showIconOnLeft, true, isExpanded), item.props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
|
|
86
|
+
}), this.expandCollapseIcon(item, index, false, showIconOnLeft, true, isExpanded), item.props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
|
|
80
87
|
styles: this.styles.icon,
|
|
81
88
|
name: item.props.name + '_icon',
|
|
82
89
|
iconclass: item.props.iconclass
|
|
@@ -86,11 +93,11 @@ export default class WmAccordion extends BaseComponent {
|
|
|
86
93
|
flex: 1,
|
|
87
94
|
justifyContent: 'center'
|
|
88
95
|
}
|
|
89
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
96
|
+
}, /*#__PURE__*/React.createElement(Text, _extends({
|
|
90
97
|
style: [this.styles.text, this.styles.heading, isExpanded ? this.styles.activeHeaderTitle : {}]
|
|
91
|
-
}, isDefined(item.props.title) ? item.props.title : 'Title'), item.props.description ? /*#__PURE__*/React.createElement(Text, {
|
|
98
|
+
}, this.getTestPropsForAction(`header${index}_title`)), isDefined(item.props.title) ? item.props.title : 'Title'), item.props.description ? /*#__PURE__*/React.createElement(Text, _extends({
|
|
92
99
|
style: this.styles.subheading
|
|
93
|
-
}, item.props.description) : null), this.expandCollapseIcon(item, true, !showIconOnLeft, true, isExpanded)), item);
|
|
100
|
+
}, this.getTestPropsForAction(`header${index}_description`)), item.props.description) : null), this.expandCollapseIcon(item, index, true, !showIconOnLeft, true, isExpanded)), item);
|
|
94
101
|
}
|
|
95
102
|
toggle(index) {
|
|
96
103
|
let expand = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","TouchableOpacity","View","Badge","isArray","BaseComponent","BaseComponentState","WmAccordionProps","DEFAULT_CLASS","WmIcon","isDefined","WmAccordionState","constructor","arguments","_defineProperty","WmAccordion","props","addAccordionPane","accordionPane","i","accordionPanes","findIndex","t","name","newIndex","expand","accordionName","toggle","collapse","expandCollapseIcon","item","showBadge","length","undefined","showIcon","useChevron","isExpanded","widgetProps","badge","badgevalue","createElement","style","styles","activeBadge","badgetype","iconclass","flexDirection","theme","mergeStyle","icon","activeIcon","renderAccordionpane","index","accordionpanes","showIconOnLeft","leftToggleIcon","root","width","state","pane","key","header","firstHeader","lastHeader","activeHeader","onPress","bind","flex","justifyContent","text","heading","activeHeaderTitle","title","description","subheading","expandedId","collapseId","closeothers","lastExpandedIndex","collapsedPane","hide","Promise","resolve","then","expandedPane","show","setState","invokeEventCallback","proxy","componentDidMount","defaultpaneindex","renderWidget","children","_background","map"],"sources":["accordion.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, TouchableOpacity, View } from 'react-native';\nimport { Badge } from 'react-native-paper';\nimport { isArray } from 'lodash';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmAccordionProps from './accordion.props';\nimport { DEFAULT_CLASS, WmAccordionStyles } from './accordion.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmAccordionpane from './accordionpane/accordionpane.component';\nimport { isDefined } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmAccordionState extends BaseComponentState<WmAccordionProps> {\n lastExpandedIndex = -1;\n isExpanded = [] as boolean[];\n}\n\nexport default class WmAccordion extends BaseComponent<WmAccordionProps, WmAccordionState, WmAccordionStyles> {\n public accordionPanes = [] as WmAccordionpane[];\n private newIndex = 0;\n\n constructor(props: WmAccordionProps) {\n super(props, DEFAULT_CLASS, new WmAccordionProps(), new WmAccordionState());\n }\n\n addAccordionPane(accordionPane: WmAccordionpane) {\n const i = this.accordionPanes.findIndex(t => t.props.name === accordionPane.props.name);\n if (i >= 0) {\n this.accordionPanes[i] = accordionPane;\n } else {\n this.accordionPanes[this.newIndex++] = accordionPane;\n }\n }\n\n expand(accordionName: string) {\n const i = this.accordionPanes.findIndex(t => t.props.name === accordionName);\n this.toggle(i + 1, true);\n }\n\n collapse(accordionName: string) {\n const i = this.accordionPanes.findIndex(t => t.props.name === accordionName);\n this.toggle(i + 1, false);\n }\n\n expandCollapseIcon(item: any, showBadge = true, showIcon = true, useChevron = true, isExpanded = false) {\n const widgetProps = item.props;\n //@ts-ignore\n const badge = showBadge && widgetProps.badgevalue != undefined ? (\n <Badge style={[\n this.styles.badge,\n isExpanded ? this.styles.activeBadge: null,\n this.styles[widgetProps.badgetype || 'default']]}>\n {widgetProps.badgevalue}\n </Badge>): null;\n let iconclass = null;\n if (useChevron) {\n iconclass = isExpanded ? 'wi wi-chevron-down' : 'wi wi-chevron-up';\n } else {\n iconclass = isExpanded ? 'wi wi-minus' : 'wi wi-plus';\n }\n return (<View style={{flexDirection: 'row'}}>\n {badge}\n {showIcon ? (\n <WmIcon\n styles={this.theme.mergeStyle({}, this.styles.icon, isExpanded ? this.styles.activeIcon : null)}\n name={'expand_collapse_icon'}\n iconclass={iconclass}></WmIcon>): null}\n </View>);\n }\n\n renderAccordionpane(item: any, index: any, accordionpanes: any[] = []) {\n const showIconOnLeft = this.styles.leftToggleIcon.root.width !== undefined;\n const isExpanded = this.state.isExpanded[index];\n return (\n <View style={this.styles.pane} key={item.props.name}>\n <TouchableOpacity key={'accordionpane_' + (index + 1)}\n style={[this.styles.header,\n index === 0 ? this.styles.firstHeader: null,\n index === accordionpanes.length - 1 && !isExpanded ? this.styles.lastHeader: null,\n isExpanded ? this.styles.activeHeader : {}]}\n onPress={this.toggle.bind(this, index + 1, !isExpanded)}>\n {this.expandCollapseIcon(item, false, showIconOnLeft, true, isExpanded)}\n {item.props.iconclass ? <WmIcon styles={this.styles.icon} name={item.props.name + '_icon'} iconclass={item.props.iconclass}></WmIcon>: null}\n <View style={{flexDirection: 'column', flex: 1, justifyContent: 'center'}}>\n <Text style={[\n this.styles.text,\n this.styles.heading,\n isExpanded ? this.styles.activeHeaderTitle : {}]}>\n {isDefined(item.props.title) ? item.props.title : 'Title'}\n </Text>\n {item.props.description ? \n (<Text style={this.styles.subheading}>{item.props.description}</Text>) : null }\n </View>\n {this.expandCollapseIcon(item, true, !showIconOnLeft, true, isExpanded)}\n </TouchableOpacity>\n {item}\n </View>\n );\n }\n\n toggle(index: number, expand = true) {\n let expandedId = expand ? index : -1;\n let collapseId = expand ? -1 : index;\n if (expand && this.state.isExpanded[expandedId - 1]\n || !expand && this.state.isExpanded[collapseId - 1] === false) {\n return;\n }\n if (collapseId < 0 && this.state.props.closeothers) {\n collapseId = this.state.lastExpandedIndex;\n }\n const collapsedPane = this.accordionPanes[collapseId -1];\n collapsedPane?.hide();\n Promise.resolve().then(() => {\n const expandedPane = expandedId ? this.accordionPanes[expandedId - 1]: null;\n expandedPane?.show();\n this.setState((state) => {\n if (collapseId > 0 && collapsedPane) {\n state.isExpanded[collapseId - 1] = false;\n }\n if (expandedId > 0 && expandedPane) {\n state.isExpanded[expandedId - 1] = true;\n }\n return {\n lastExpandedIndex: expandedId,\n isExpanded: [...state.isExpanded]\n };\n }, () => {\n this.invokeEventCallback('onChange', [{},\n this.proxy,\n expandedId - 1,\n collapseId ? collapseId - 1 : null,\n expandedPane && expandedPane.props.name,\n collapsedPane && collapsedPane.props.name]);\n });\n }, () => {});\n }\n\n public componentDidMount(): void {\n super.componentDidMount();\n this.toggle(this.state.props.defaultpaneindex + 1);\n }\n\n renderWidget(props: WmAccordionProps) {\n const accordionpanes = props.children;\n const expandedId = this.state.lastExpandedIndex || 0;\n return (\n <View style={this.styles.root}>\n {this._background}\n {accordionpanes\n ? isArray(accordionpanes) && accordionpanes.length\n ? accordionpanes.map((item: any, index: any) => this.renderAccordionpane(item, index, accordionpanes))\n : this.renderAccordionpane(accordionpanes, 0)\n : null}\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAC3D,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,OAAO,QAAQ,QAAQ;AAEhC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD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EAAEsB,KAAU,KAAK,IAAI,CAACD,mBAAmB,CAACrB,IAAI,EAAEsB,KAAK,EAAEC,cAAc,CAAC,CAAC,GACpG,IAAI,CAACF,mBAAmB,CAACE,cAAc,EAAE,CAAC,CAAC,GAC7C,IACF,CAAC;EAEb;AACF"}
|
|
1
|
+
{"version":3,"names":["React","Text","TouchableOpacity","View","Badge","isArray","BaseComponent","BaseComponentState","WmAccordionProps","DEFAULT_CLASS","WmIcon","isDefined","WmAccordionState","constructor","arguments","_defineProperty","WmAccordion","props","addAccordionPane","accordionPane","_this$state$isExpande","i","accordionPanes","findIndex","t","title","newIndex","state","isExpanded","find","v","toggle","defaultpaneindex","expand","accordionName","name","collapse","expandCollapseIcon","item","index","showBadge","length","undefined","showIcon","useChevron","widgetProps","badge","badgevalue","createElement","_extends","style","styles","activeBadge","badgetype","getTestProps","iconclass","flexDirection","id","getTestId","theme","mergeStyle","icon","activeIcon","renderAccordionpane","accordionpanes","showIconOnLeft","leftToggleIcon","root","width","pane","key","getTestPropsForAction","header","firstHeader","lastHeader","activeHeader","onPress","bind","flex","justifyContent","text","heading","activeHeaderTitle","description","subheading","expandedId","collapseId","closeothers","lastExpandedIndex","collapsedPane","hide","Promise","resolve","then","expandedPane","show","setState","invokeEventCallback","proxy","componentDidMount","renderWidget","children","_background","map"],"sources":["accordion.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, TouchableOpacity, View } from 'react-native';\nimport { Badge } from 'react-native-paper';\nimport { isArray } from 'lodash';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmAccordionProps from './accordion.props';\nimport { DEFAULT_CLASS, WmAccordionStyles } from './accordion.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmAccordionpane from './accordionpane/accordionpane.component';\nimport { isDefined } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmAccordionState extends BaseComponentState<WmAccordionProps> {\n lastExpandedIndex = -1;\n isExpanded = [] as boolean[];\n}\n\nexport default class WmAccordion extends BaseComponent<WmAccordionProps, WmAccordionState, WmAccordionStyles> {\n public accordionPanes = [] as WmAccordionpane[];\n private newIndex = 0;\n\n constructor(props: WmAccordionProps) {\n super(props, DEFAULT_CLASS, new WmAccordionProps(), new WmAccordionState());\n }\n\n addAccordionPane(accordionPane: WmAccordionpane) {\n const i = this.accordionPanes.findIndex(t => t.props.title === accordionPane.props.title);\n if (i >= 0) {\n this.accordionPanes[i] = accordionPane;\n } else {\n this.accordionPanes[this.newIndex++] = accordionPane;\n }\n if (!(this.state.isExpanded?.find((v) => v))) {\n this.toggle(this.state.props.defaultpaneindex + 1);\n }\n }\n\n expand(accordionName: string) {\n const i = this.accordionPanes.findIndex(t => t.props.name === accordionName);\n this.toggle(i + 1, true);\n }\n\n collapse(accordionName: string) {\n const i = this.accordionPanes.findIndex(t => t.props.name === accordionName);\n this.toggle(i + 1, false);\n }\n\n expandCollapseIcon(item: any, index: number, showBadge = true, showIcon = true, useChevron = true, isExpanded = false) {\n const widgetProps = item.props;\n //@ts-ignore\n const badge = showBadge && widgetProps.badgevalue != undefined ? (\n <Badge style={[\n this.styles.badge,\n isExpanded ? this.styles.activeBadge: null,\n this.styles[widgetProps.badgetype || 'default']]}\n {...this.getTestProps('badge'+index)}>\n {widgetProps.badgevalue}\n </Badge>): null;\n let iconclass = null;\n if (useChevron) {\n iconclass = isExpanded ? 'wi wi-chevron-down' : 'wi wi-chevron-up';\n } else {\n iconclass = isExpanded ? 'wi wi-minus' : 'wi wi-plus';\n }\n return (<View style={{flexDirection: 'row'}}>\n {badge}\n {showIcon ? (\n <WmIcon\n id={this.getTestId('icon' + index)}\n styles={this.theme.mergeStyle({}, this.styles.icon, isExpanded ? this.styles.activeIcon : null)}\n name={'expand_collapse_icon'}\n iconclass={iconclass}></WmIcon>): null}\n </View>);\n }\n\n renderAccordionpane(item: any, index: any, accordionpanes: any[] = []) {\n const showIconOnLeft = this.styles.leftToggleIcon.root.width !== undefined;\n const isExpanded = this.state.isExpanded[index];\n return (\n <View style={this.styles.pane} key={item.props.title}>\n <TouchableOpacity key={'accordionpane_' + (index + 1)}\n {...this.getTestPropsForAction(`header${index}`)}\n style={[this.styles.header,\n index === 0 ? this.styles.firstHeader: null,\n index === accordionpanes.length - 1 && !isExpanded ? this.styles.lastHeader: null,\n isExpanded ? this.styles.activeHeader : {}]}\n onPress={this.toggle.bind(this, index + 1, !isExpanded)}>\n {this.expandCollapseIcon(item, index, false, showIconOnLeft, true, isExpanded)}\n {item.props.iconclass ? <WmIcon styles={this.styles.icon} name={item.props.name + '_icon'} iconclass={item.props.iconclass}></WmIcon>: null}\n <View style={{flexDirection: 'column', flex: 1, justifyContent: 'center'}}>\n <Text style={[\n this.styles.text,\n this.styles.heading,\n isExpanded ? this.styles.activeHeaderTitle : {}]}\n {...this.getTestPropsForAction(`header${index}_title`)}>\n {isDefined(item.props.title) ? item.props.title : 'Title'}\n </Text>\n {item.props.description ? \n (<Text style={this.styles.subheading}\n {...this.getTestPropsForAction(`header${index}_description`)}>{item.props.description}</Text>) : null }\n </View>\n {this.expandCollapseIcon(item, index, true, !showIconOnLeft, true, isExpanded)}\n </TouchableOpacity>\n {item}\n </View>\n );\n }\n\n toggle(index: number, expand = true) {\n let expandedId = expand ? index : -1;\n let collapseId = expand ? -1 : index;\n if (expand && this.state.isExpanded[expandedId - 1]\n || !expand && this.state.isExpanded[collapseId - 1] === false) {\n return;\n }\n if (collapseId < 0 && this.state.props.closeothers) {\n collapseId = this.state.lastExpandedIndex;\n }\n const collapsedPane = this.accordionPanes[collapseId -1];\n collapsedPane?.hide();\n Promise.resolve().then(() => {\n const expandedPane = expandedId ? this.accordionPanes[expandedId - 1]: null;\n expandedPane?.show();\n this.setState((state) => {\n if (collapseId > 0 && collapsedPane) {\n state.isExpanded[collapseId - 1] = false;\n }\n if (expandedId > 0 && expandedPane) {\n state.isExpanded[expandedId - 1] = true;\n }\n return {\n lastExpandedIndex: expandedId,\n isExpanded: [...state.isExpanded]\n };\n }, () => {\n this.invokeEventCallback('onChange', [{},\n this.proxy,\n expandedId - 1,\n collapseId ? collapseId - 1 : null,\n expandedPane && expandedPane.props.name,\n collapsedPane && collapsedPane.props.name]);\n });\n }, () => {});\n }\n\n public componentDidMount(): void {\n super.componentDidMount();\n this.toggle(this.state.props.defaultpaneindex + 1);\n }\n\n renderWidget(props: WmAccordionProps) {\n const accordionpanes = props.children;\n const expandedId = this.state.lastExpandedIndex || 0;\n return (\n <View style={this.styles.root}>\n {this._background}\n {accordionpanes\n ? isArray(accordionpanes) && accordionpanes.length\n ? accordionpanes.map((item: any, index: any) => this.renderAccordionpane(item, index, accordionpanes))\n : this.renderAccordionpane(accordionpanes, 0)\n : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAC3D,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,OAAO,QAAQ,QAAQ;AAEhC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AACrE,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,SAASC,SAAS,QAAQ,sCAAsC;AAEhE,OAAO,MAAMC,gBAAgB,SAASL,kBAAkB,CAAmB;EAAAM,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,4BACrD,CAAC,CAAC;IAAAA,eAAA,qBACT,EAAE;EAAA;AACjB;AAEA,eAAe,MAAMC,WAAW,SAASV,aAAa,CAAwD;EAI5GO,WAAWA,CAACI,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,gBAAgB,CAAC,CAAC,EAAE,IAAII,gBAAgB,CAAC,CAAC,CAAC;IAACG,eAAA,yBAJtD,EAAE;IAAAA,eAAA,mBACP,CAAC;EAI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aAAA,CAAC7C,IAAI;MAAC+C,KAAK,EAAE,IAAI,CAACC,MAAM,CAACgB;IAAK,GAC3B,IAAI,CAACmC,WAAW,EACdtC,cAAc,GACX3D,OAAO,CAAC2D,cAAc,CAAC,IAAIA,cAAc,CAACvB,MAAM,GAC9CuB,cAAc,CAACuC,GAAG,CAAC,CAACjE,IAAS,EAAEC,KAAU,KAAK,IAAI,CAACwB,mBAAmB,CAACzB,IAAI,EAAEC,KAAK,EAAEyB,cAAc,CAAC,CAAC,GACpG,IAAI,CAACD,mBAAmB,CAACC,cAAc,EAAE,CAAC,CAAC,GAC7C,IACF,CAAC;EAEb;AACF"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
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
2
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
3
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
|
-
import React
|
|
4
|
+
import React from 'react';
|
|
5
5
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
6
6
|
import WmAccordionpaneProps from './accordionpane.props';
|
|
7
7
|
import { DEFAULT_CLASS } from './accordionpane.styles';
|
|
8
8
|
import { View } from 'react-native';
|
|
9
9
|
import { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';
|
|
10
|
-
|
|
10
|
+
import { CollapsiblePane } from '../../panel/collapsible-pane.component';
|
|
11
11
|
export class WmAccordionpaneState extends BaseComponentState {
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments);
|
|
@@ -15,25 +15,6 @@ export class WmAccordionpaneState extends BaseComponentState {
|
|
|
15
15
|
_defineProperty(this, "collapsed", true);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
const AnimatedView = props => {
|
|
19
|
-
const [height, setHeight] = useState(0);
|
|
20
|
-
const offset = Animated.useSharedValue(0);
|
|
21
|
-
offset.value = props.close ? 0 : 1;
|
|
22
|
-
const onLayoutChange = e => {
|
|
23
|
-
var _e$nativeEvent;
|
|
24
|
-
setHeight((((_e$nativeEvent = e.nativeEvent) === null || _e$nativeEvent === void 0 || (_e$nativeEvent = _e$nativeEvent.layout) === null || _e$nativeEvent === void 0 ? void 0 : _e$nativeEvent.height) || height || 100000000) + 1000);
|
|
25
|
-
};
|
|
26
|
-
const animatedStyles = Animated.useAnimatedStyle(() => {
|
|
27
|
-
return {
|
|
28
|
-
maxHeight: Animated.withTiming(offset.value * height)
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
return /*#__PURE__*/React.createElement(Animated.default.View, {
|
|
32
|
-
style: [animatedStyles]
|
|
33
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
34
|
-
onLayout: onLayoutChange
|
|
35
|
-
}, props.children));
|
|
36
|
-
};
|
|
37
18
|
export default class WmAccordionpane extends BaseComponent {
|
|
38
19
|
constructor(props) {
|
|
39
20
|
super(props, DEFAULT_CLASS, new WmAccordionpaneProps(), new WmAccordionpaneState());
|
|
@@ -76,16 +57,17 @@ export default class WmAccordionpane extends BaseComponent {
|
|
|
76
57
|
});
|
|
77
58
|
});
|
|
78
59
|
}
|
|
79
|
-
return props.renderPartial(this.onPartialLoad.bind(this));
|
|
60
|
+
return props.renderPartial(props, this.onPartialLoad.bind(this));
|
|
80
61
|
}
|
|
81
62
|
return props.children;
|
|
82
63
|
}
|
|
83
64
|
renderWidget(props) {
|
|
84
65
|
return isWebPreviewMode() ? /*#__PURE__*/React.createElement(View, {
|
|
85
66
|
style: this.state.collapsed ? {
|
|
86
|
-
maxHeight: 0
|
|
67
|
+
maxHeight: 0,
|
|
68
|
+
overflow: 'hidden'
|
|
87
69
|
} : {}
|
|
88
|
-
}, this._background, this.renderContent(props)) : /*#__PURE__*/React.createElement(
|
|
70
|
+
}, this._background, this.renderContent(props)) : /*#__PURE__*/React.createElement(CollapsiblePane, {
|
|
89
71
|
close: this.state.collapsed
|
|
90
72
|
}, this._background, this.renderContent(props));
|
|
91
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","BaseComponent","BaseComponentState","WmAccordionpaneProps","DEFAULT_CLASS","View","isWebPreviewMode","CollapsiblePane","WmAccordionpaneState","constructor","arguments","_defineProperty","WmAccordionpane","props","isCollapsed","state","collapsed","show","updateState","invokeEventCallback","proxy","hide","expand","parent","name","collapse","componentDidMount","accordion","addAccordionPane","onPartialLoad","renderContent","renderPartial","isPartialLoaded","setTimeout","bind","children","renderWidget","createElement","style","maxHeight","overflow","_background","close"],"sources":["accordionpane.component.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmAccordionpaneProps from './accordionpane.props';\nimport { DEFAULT_CLASS, WmAccordionpaneStyles } from './accordionpane.styles';\nimport WmAccordion from '../accordion.component';\nimport { View } from 'react-native';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { CollapsiblePane } from '../../panel/collapsible-pane.component';\n\nexport class WmAccordionpaneState extends BaseComponentState<WmAccordionpaneProps> {\n isPartialLoaded = false;\n collapsed = true;\n}\n\nexport default class WmAccordionpane extends BaseComponent<WmAccordionpaneProps, WmAccordionpaneState, WmAccordionpaneStyles> {\n\n constructor(props: WmAccordionpaneProps) {\n super(props, DEFAULT_CLASS, new WmAccordionpaneProps(), new WmAccordionpaneState());\n }\n\n isCollapsed() {\n return this.state.collapsed;\n }\n \n show() {\n this.updateState({\n collapsed: false\n } as WmAccordionpaneState);\n this.invokeEventCallback('onExpand', [null, this.proxy]);\n }\n\n hide() {\n this.updateState({\n collapsed: true\n } as WmAccordionpaneState);\n this.invokeEventCallback('onCollapse', [null, this.proxy]);\n }\n\n expand() {\n (this.parent as WmAccordion).expand(this.props.name || '');\n }\n\n collapse() {\n (this.parent as WmAccordion).expand(this.props.name || '');\n }\n\n componentDidMount() {\n const accordion = (this.parent) as WmAccordion;\n accordion.addAccordionPane(this);\n super.componentDidMount();\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: WmAccordionpaneProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmAccordionpaneState);\n });\n }\n return props.renderPartial(props, this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n renderWidget(props: WmAccordionpaneProps) {\n return isWebPreviewMode() ? \n (<View style={this.state.collapsed ? {maxHeight: 0, overflow: 'hidden'} : {}}>\n {this._background}\n {this.renderContent(props)}\n </View>) :\n (<CollapsiblePane close={this.state.collapsed}>\n {this._background}\n {this.renderContent(props)}\n </CollapsiblePane>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAA0C,OAAO;AAC7D,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,oBAAoB,MAAM,uBAAuB;AACxD,SAASC,aAAa,QAA+B,wBAAwB;AAE7E,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,SAASC,eAAe,QAAQ,wCAAwC;AAExE,OAAO,MAAMC,oBAAoB,SAASN,kBAAkB,CAAuB;EAAAO,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,0BAC/D,KAAK;IAAAA,eAAA,oBACX,IAAI;EAAA;AAClB;AAEA,eAAe,MAAMC,eAAe,SAASX,aAAa,CAAoE;EAE5HQ,WAAWA,CAACI,KAA2B,EAAE;IACvC,KAAK,C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