@wavemaker/app-rn-runtime 11.6.0-rc.5488 → 11.7.0-next.42251
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 +14 -9
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +6 -3
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js +33 -14
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.props.js +3 -1
- app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +22 -8
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.props.js +7 -0
- app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
- app-rn-runtime/components/basic/animatedview.component.js +5 -3
- app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +41 -8
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.props.js +7 -0
- app-rn-runtime/components/basic/button/button.props.js.map +1 -1
- app-rn-runtime/components/basic/button/button.styles.js +9 -10
- app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +13 -5
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +64 -12
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.props.js +7 -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 +34 -25
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.props.js +4 -0
- app-rn-runtime/components/basic/label/label.props.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js +4 -5
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/message/message.component.js +3 -2
- app-rn-runtime/components/basic/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/message/message.props.js +3 -0
- app-rn-runtime/components/basic/message/message.props.js.map +1 -1
- app-rn-runtime/components/basic/message/message.styles.js +3 -1
- app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +4 -2
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.props.js +3 -0
- app-rn-runtime/components/basic/picture/picture.props.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.styles.js +3 -1
- app-rn-runtime/components/basic/picture/picture.styles.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +3 -3
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.props.js +2 -0
- app-rn-runtime/components/basic/progress-bar/progress-bar.props.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +3 -2
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.props.js +2 -0
- app-rn-runtime/components/basic/progress-circle/progress-circle.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +2 -1
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +3 -0
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +6 -5
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js +0 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js +4 -2
- app-rn-runtime/components/basic/video/video.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.props.js +3 -0
- app-rn-runtime/components/basic/video/video.props.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +34 -24
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +29 -16
- 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 +0 -2
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +33 -7
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +7 -2
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js +9 -2
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +4 -2
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.component.js +27 -20
- app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +7 -4
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +33 -10
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +1 -0
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/staticdata.js +215 -0
- app-rn-runtime/components/chart/staticdata.js.map +1 -0
- app-rn-runtime/components/container/container.component.js +11 -2
- 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/panel.component.js +6 -2
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.props.js +4 -0
- app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +17 -14
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +19 -3
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +27 -2
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +6 -0
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +7 -3
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.props.js +4 -0
- app-rn-runtime/components/data/card/card.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.styles.js +2 -1
- app-rn-runtime/components/data/form/form-action/form-action.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +5 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +136 -25
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +4 -1
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js +9 -0
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +4 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js +3 -0
- app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +13 -6
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.component.js +4 -1
- app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.props.js +3 -0
- app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.styles.js +12 -4
- app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +4 -0
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js +4 -0
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +2 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +4 -0
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js +4 -0
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +7 -3
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.props.js +4 -0
- app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js +11 -2
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
- app-rn-runtime/components/input/basedataset/basedataset.props.js +4 -0
- app-rn-runtime/components/input/basedataset/basedataset.props.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +2 -2
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.props.js +4 -0
- app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +16 -10
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js +4 -0
- app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +12 -5
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js +35 -5
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +13 -6
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +39 -10
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +5 -1
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.component.js +1 -1
- app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.props.js +1 -1
- app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +18 -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 +19 -1
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +76 -10
- 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 +5 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +49 -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 +2 -0
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.props.js +2 -0
- app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.styles.js +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.styles.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +13 -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 +17 -0
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +7 -2
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +7 -3
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.styles.js +5 -1
- app-rn-runtime/components/input/select/select.styles.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.styles.js +3 -3
- app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +8 -1
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +10 -5
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +13 -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 +17 -0
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +13 -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 +48 -5
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.props.js +4 -0
- app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.styles.js +5 -12
- app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +6 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js +1 -0
- app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +11 -2
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js +1 -2
- app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.styles.js +8 -5
- app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +8 -5
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.props.js +3 -0
- app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js +10 -3
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.props.js +7 -0
- 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/page-content/page-content.component.js +7 -1
- 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 +44 -10
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.styles.js +82 -15
- app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
- app-rn-runtime/core/accessibility.js +149 -0
- app-rn-runtime/core/accessibility.js.map +1 -0
- app-rn-runtime/core/base.component.js +21 -3
- 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/event-notifier.js +22 -1
- app-rn-runtime/core/event-notifier.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +37 -10
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/utils.js +11 -0
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/gestures/swipe.animation.js +34 -1
- app-rn-runtime/gestures/swipe.animation.js.map +1 -1
- app-rn-runtime/package.json +8 -3
- app-rn-runtime/runtime/App.js +12 -7
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +1 -1
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +2 -1
- app-rn-runtime/runtime/services/app-security.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/background.component.js +1 -1
- app-rn-runtime/styles/background.component.js.map +1 -1
- app-rn-runtime/styles/theme.js +43 -0
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +30 -6
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/model-variable.js +2 -1
- app-rn-runtime/variables/model-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +14 -6
- app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Image","View","isNumber","Tappable","BaseComponent","BaseComponentState","ImageSizeEstimator","isFullPathUrl","WmPictureProps","DEFAULT_CLASS","Animatedview","createSkeleton","WmPictureState","constructor","arguments","_defineProperty","WmPicture","props","e","imageWidth","nativeEvent","layout","width","imageHeight","height","styles","root","includes","state","naturalImageHeight","naturalImageWidth","updateState","loadImage","image","loadAsset","imageSrc","default","resolveAssetSource","cancel","getSize","cleanup","splice","indexOf","push","onPropertyChange","name","$new","$old","_pictureSource","_picturePlaceHolder","createShape","shape","picture","borderRadius","theme","getStyle","getElementToShow","imgSrc","shapeStyles","elementToshow","source","imgStyle","resizemode","createElement","uri","testID","getTestId","style","resizeMode","renderSkeleton","_this$styles$root","_shapeStyles$root","_shapeStyles$picture","_this$styles$root2","_shapeStyles$root2","_shapeStyles$picture2","_this$styles$root3","_shapeStyles$picture3","_shapeStyles$root3","_this$styles$root4","skeletonWidth","skeletonwidth","skeletonHeight","skeletonheight","skeleton","renderWidget","_shapeStyles$picture4","picturesource","pictureplaceholder","isSvg","_background","overflow","onLayout","onViewLayoutChange","_extends","getTestPropsForAction","target","entryanimation","animation"],"sources":["picture.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Image, LayoutChangeEvent, View } from 'react-native';\n// import { NumberProp, SvgUri } from 'react-native-svg';\nimport { isNumber, isString } from 'lodash-es';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport ImageSizeEstimator from '@wavemaker/app-rn-runtime/core/imageSizeEstimator';\nimport { isFullPathUrl, isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\nimport WmPictureProps from './picture.props';\nimport { DEFAULT_CLASS, WmPictureStyles } from './picture.styles';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmPictureState extends BaseComponentState<WmPictureProps> {\n naturalImageWidth: number = 0;\n naturalImageHeight: number = 0;\n imageWidth: number = 0;\n imageHeight: number = 0;\n}\n\nexport default class WmPicture extends BaseComponent<WmPictureProps, WmPictureState, WmPictureStyles> {\n\n private _pictureSource = null as any;\n private _picturePlaceHolder = null as any;\n\n constructor(props: WmPictureProps) {\n super(props, DEFAULT_CLASS, new WmPictureProps());\n }\n\n loadImage(image: string | undefined) {\n if (!image || !this.loadAsset) {\n return null;\n }\n const imageSrc = this.loadAsset(image) as any;\n if (imageSrc && typeof imageSrc === 'object' && typeof imageSrc.default === 'function') {\n return null;\n }\n if (isNumber(imageSrc)) {\n const {width, height} = Image.resolveAssetSource(imageSrc);\n this.updateState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as WmPictureState);\n } else if (imageSrc !== null) {\n const cancel = ImageSizeEstimator.getSize(imageSrc, (width: number, height: number) => {\n this.updateState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as WmPictureState);\n this.cleanup.splice(this.cleanup.indexOf(cancel), 1);\n });\n this.cleanup.push(cancel);\n }\n return imageSrc;\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'picturesource':\n this._pictureSource = null;\n case 'pictureplaceholder':\n this._picturePlaceHolder = null;\n break;\n }\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let imageWidth = e.nativeEvent.layout.width;\n let imageHeight = e.nativeEvent.layout.height;\n if (!imageWidth && !imageHeight) {\n return;\n }\n if (!this.styles.root.height\n || (typeof this.styles.root.height === 'string'\n && !this.styles.root.height.includes('%'))) {\n imageHeight = 0;\n }\n if (imageWidth && !imageHeight) {\n imageHeight = imageWidth * this.state.naturalImageHeight / this.state.naturalImageWidth;\n } else if (imageHeight && !imageWidth) {\n imageWidth = imageHeight * this.state.naturalImageWidth / this.state.naturalImageHeight;\n }\n this.updateState({\n imageWidth: imageWidth,\n imageHeight: imageHeight\n } as WmPictureState);\n };\n\n createShape(shape: string | undefined, imageWidth?: number | string): WmPictureStyles {\n if (shape) {\n switch(shape) {\n case 'circle':\n return {\n picture: {\n borderRadius: isNumber(imageWidth) ? imageWidth / 2 : 4\n }\n } as WmPictureStyles;\n case 'rounded' :\n return (this.theme.getStyle('rounded-image') as WmPictureStyles);\n case 'thumbnail' :\n return (this.theme.getStyle('thumbnail-image') as WmPictureStyles);\n }\n }\n return {} as WmPictureStyles;\n }\n\n getElementToShow(props: WmPictureProps, imgSrc: any, shapeStyles: WmPictureStyles) {\n let elementToshow, source;\n if (imgSrc && typeof imgSrc === 'object' && typeof imgSrc?.default === 'function') {\n let imgStyle : any = {};\n if (props.resizemode === 'contain') {\n imgStyle['width'] = '100%';\n imgStyle['height'] = '100%';\n }\n elementToshow = React.createElement(imgSrc?.default, imgStyle);\n //} else if (!isWebPreviewMode() && props.isSvg) {\n // svg from uri\n // elementToshow = <SvgUri testID={this.getTestId('picture')} width={this.styles.root.width as NumberProp} height={this.styles.root.height as NumberProp} uri={imgSrc}/>;\n } else if (isFullPathUrl(imgSrc)) {\n source = {\n uri: imgSrc\n };\n } else {\n source = imgSrc;\n }\n if (this.state.naturalImageWidth) {\n elementToshow = <Image testID={this.getTestId('picture')} style={[this.styles.picture, shapeStyles.picture]} resizeMode={props.resizemode} source={source}/>;\n }\n return elementToshow;\n }\n \n public renderSkeleton(props: WmPictureProps){\n const imageWidth = this.state.imageWidth;\n const imageHeight = this.state.imageHeight;\n const shapeStyles = this.createShape(this.props.shape, imageWidth);\n const skeletonWidth = this.props.skeletonwidth || this.styles.root?.width || shapeStyles.root?.width || shapeStyles.picture?.width || imageWidth; \n const skeletonHeight = this.props.skeletonheight || this.styles.root?.height || shapeStyles.root?.height || shapeStyles.picture?.height || imageHeight;\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n borderRadius: this.props.shape == 'circle' && this.styles.root?.width ? 25 : shapeStyles.picture?.borderRadius || shapeStyles.root?.borderRadius || this.styles.root?.borderRadius || 4,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n });\n }\n\n renderWidget(props: WmPictureProps) {\n const imageWidth = this.state.imageWidth;\n const imageHeight = this.state.imageHeight;\n const shapeStyles = this.createShape(props.shape, imageWidth);\n this._pictureSource = this._pictureSource || this.loadImage(props.picturesource);\n this._picturePlaceHolder = this._picturePlaceHolder || this.loadImage(props.pictureplaceholder);\n const imgSrc: any = this._pictureSource || this._picturePlaceHolder;\n let elementToshow;\n if (imgSrc) {\n elementToshow = this.getElementToShow(props, imgSrc, shapeStyles);\n }\n return imgSrc && (this.state.naturalImageWidth || props.isSvg) ? (\n <View style={[{\n width: imageWidth,\n height: imageHeight\n }, this.styles.root, shapeStyles.root, shapeStyles.picture]}>\n {this._background}\n <View style={[{overflow: 'hidden', width: '100%',\n height: '100%'}]} onLayout={this.onViewLayoutChange}>\n <Tappable \n {...this.getTestPropsForAction()}\n target={this} styles={{width: imageWidth ? null : '100%', height: imageHeight ? null : '100%'}}>\n <Animatedview entryanimation={props.animation} style={[{\n height: imageHeight,\n width: imageWidth,\n borderRadius: shapeStyles.picture?.borderRadius\n }]}>\n {this.state.imageWidth ? elementToshow : null}\n </Animatedview>\n </Tappable>\n </View>\n </View>\n ): null;\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,KAAK,EAAqBC,IAAI,QAAQ,cAAc;AAC7E;AACA,SAASC,QAAQ,QAAkB,WAAW;AAC9C,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,kBAAkB,MAAM,mDAAmD;AAClF,SAASC,aAAa,QAA0B,sCAAsC;AAEtF,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AACjE,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAAqBC,cAAc,QAAQ,gCAAgC;AAE3E,OAAO,MAAMC,cAAc,SAASP,kBAAkB,CAAiB;EAAAQ,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,4BACzC,CAAC;IAAAA,eAAA,6BACA,CAAC;IAAAA,eAAA,qBACT,CAAC;IAAAA,eAAA,sBACA,CAAC;EAAA;AACzB;AAEA,eAAe,MAAMC,SAAS,SAASZ,aAAa,CAAkD;EAKpGS,WAAWA,CAACI,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,cAAc,CAAC,CAAC,CAAC;IAACO,eAAA,yBAJ3B,IAAI;IAAAA,eAAA,8BACC,IAAI;IAAAA,eAAA,6BA2CZG,CAAoB,IAAK;MAC7C,IAAIC,UAAU,GAAGD,CAAC,CAACE,WAAW,CAACC,MAAM,CAACC,KAAK;MAC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AAC9D,IAAI;MAACkE,KAAK,EAAE,CAAC;QACZ7C,KAAK,EAAEH,UAAU;QACjBK,MAAM,EAAED;MACV,CAAC,EAAE,IAAI,CAACE,MAAM,CAACC,IAAI,EAAEgC,WAAW,CAAChC,IAAI,EAAEgC,WAAW,CAACN,OAAO;IAAE,GACzD,IAAI,CAACsC,WAAW,eACnB3F,KAAA,CAAAgE,aAAA,CAAC9D,IAAI;MAACkE,KAAK,EAAE,CAAC;QAACwB,QAAQ,EAAE,QAAQ;QAAErE,KAAK,EAAE,MAAM;QAC9CE,MAAM,EAAE;MAAM,CAAC,CAAE;MAACoE,QAAQ,EAAE,IAAI,CAACC;IAAmB,gBACpD9F,KAAA,CAAAgE,aAAA,CAAC5D,QAAQ,EAAA2F,QAAA,KACH,IAAI,CAACC,qBAAqB,CAAC,CAAC;MAChCC,MAAM,EAAE,IAAK;MAACvE,MAAM,EAAE;QAACH,KAAK,EAAEH,UAAU,GAAG,IAAI,GAAG,MAAM;QAAEK,MAAM,EAAED,WAAW,GAAG,IAAI,GAAG;MAAM;IAAE,iBAC/FxB,KAAA,CAAAgE,aAAA,CAACrD,YAAY;MAACuF,cAAc,EAAEhF,KAAK,CAACiF,SAAU;MAAC/B,KAAK,EAAE,CAAC;QACjD3C,MAAM,EAAED,WAAW;QACnBD,KAAK,EAAEH,UAAU;QACjBkC,YAAY,GAAAiC,qBAAA,GAAE5B,WAAW,CAACN,OAAO,cAAAkC,qBAAA,uBAAnBA,qBAAA,CAAqBjC;MACrC,CAAC;IAAE,GACF,IAAI,CAACzB,KAAK,CAACT,UAAU,GAAGwC,aAAa,GAAG,IAC7B,CACN,CACN,CACF,CAAC,GACN,IAAI;EACT;AACF"}
|
1
|
+
{"version":3,"names":["React","Image","View","isNumber","Tappable","BaseComponent","BaseComponentState","ImageSizeEstimator","isFullPathUrl","AccessibilityWidgetType","getAccessibilityProps","WmPictureProps","DEFAULT_CLASS","Animatedview","createSkeleton","WmPictureState","constructor","arguments","_defineProperty","WmPicture","props","e","imageWidth","nativeEvent","layout","width","imageHeight","height","styles","root","includes","state","naturalImageHeight","naturalImageWidth","updateState","loadImage","image","loadAsset","imageSrc","default","resolveAssetSource","cancel","getSize","cleanup","splice","indexOf","push","onPropertyChange","name","$new","$old","_pictureSource","_picturePlaceHolder","createShape","shape","picture","borderRadius","theme","getStyle","getElementToShow","imgSrc","shapeStyles","elementToshow","source","imgStyle","resizemode","createElement","uri","_extends","testID","getTestId","style","resizeMode","PICTURE","renderSkeleton","_this$styles$root","_shapeStyles$root","_shapeStyles$picture","_this$styles$root2","_shapeStyles$root2","_shapeStyles$picture2","_this$styles$root3","_shapeStyles$picture3","_shapeStyles$root3","_this$styles$root4","skeletonWidth","skeletonwidth","skeletonHeight","skeletonheight","skeleton","renderWidget","_shapeStyles$picture4","picturesource","pictureplaceholder","isSvg","_background","overflow","onLayout","onViewLayoutChange","getTestPropsForAction","rippleColor","target","entryanimation","animation"],"sources":["picture.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Image, LayoutChangeEvent, View } from 'react-native';\n// import { NumberProp, SvgUri } from 'react-native-svg';\nimport { isNumber, isString } from 'lodash-es';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport ImageSizeEstimator from '@wavemaker/app-rn-runtime/core/imageSizeEstimator';\nimport { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nimport WmPictureProps from './picture.props';\nimport { DEFAULT_CLASS, WmPictureStyles } from './picture.styles';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmPictureState extends BaseComponentState<WmPictureProps> {\n naturalImageWidth: number = 0;\n naturalImageHeight: number = 0;\n imageWidth: number = 0;\n imageHeight: number = 0;\n}\n\nexport default class WmPicture extends BaseComponent<WmPictureProps, WmPictureState, WmPictureStyles> {\n\n private _pictureSource = null as any;\n private _picturePlaceHolder = null as any;\n\n constructor(props: WmPictureProps) {\n super(props, DEFAULT_CLASS, new WmPictureProps());\n }\n\n loadImage(image: string | undefined) {\n if (!image || !this.loadAsset) {\n return null;\n }\n const imageSrc = this.loadAsset(image) as any;\n if (imageSrc && typeof imageSrc === 'object' && typeof imageSrc.default === 'function') {\n return null;\n }\n if (isNumber(imageSrc)) {\n const {width, height} = Image.resolveAssetSource(imageSrc);\n this.updateState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as WmPictureState);\n } else if (imageSrc !== null) {\n const cancel = ImageSizeEstimator.getSize(imageSrc, (width: number, height: number) => {\n this.updateState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as WmPictureState);\n this.cleanup.splice(this.cleanup.indexOf(cancel), 1);\n });\n this.cleanup.push(cancel);\n }\n return imageSrc;\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'picturesource':\n this._pictureSource = null;\n case 'pictureplaceholder':\n this._picturePlaceHolder = null;\n break;\n }\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let imageWidth = e.nativeEvent.layout.width;\n let imageHeight = e.nativeEvent.layout.height;\n if (!imageWidth && !imageHeight) {\n return;\n }\n if (!this.styles.root.height\n || (typeof this.styles.root.height === 'string'\n && !this.styles.root.height.includes('%'))) {\n imageHeight = 0;\n }\n if (imageWidth && !imageHeight) {\n imageHeight = imageWidth * this.state.naturalImageHeight / this.state.naturalImageWidth;\n } else if (imageHeight && !imageWidth) {\n imageWidth = imageHeight * this.state.naturalImageWidth / this.state.naturalImageHeight;\n }\n this.updateState({\n imageWidth: imageWidth,\n imageHeight: imageHeight\n } as WmPictureState);\n };\n\n createShape(shape: string | undefined, imageWidth?: number | string): WmPictureStyles {\n if (shape) {\n switch(shape) {\n case 'circle':\n return {\n picture: {\n borderRadius: isNumber(imageWidth) ? imageWidth / 2 : 4\n }\n } as WmPictureStyles;\n case 'rounded' :\n return (this.theme.getStyle('rounded-image') as WmPictureStyles);\n case 'thumbnail' :\n return (this.theme.getStyle('thumbnail-image') as WmPictureStyles);\n }\n }\n return {} as WmPictureStyles;\n }\n\n getElementToShow(props: WmPictureProps, imgSrc: any, shapeStyles: WmPictureStyles) {\n let elementToshow, source;\n if (imgSrc && typeof imgSrc === 'object' && typeof imgSrc?.default === 'function') {\n let imgStyle : any = {};\n if (props.resizemode === 'contain') {\n imgStyle['width'] = '100%';\n imgStyle['height'] = '100%';\n }\n elementToshow = React.createElement(imgSrc?.default, imgStyle);\n //} else if (!isWebPreviewMode() && props.isSvg) {\n // svg from uri\n // elementToshow = <SvgUri testID={this.getTestId('picture')} width={this.styles.root.width as NumberProp} height={this.styles.root.height as NumberProp} uri={imgSrc}/>;\n } else if (isFullPathUrl(imgSrc)) {\n source = {\n uri: imgSrc\n };\n } else {\n source = imgSrc;\n }\n if (this.state.naturalImageWidth) {\n elementToshow = (\n <Image\n testID={this.getTestId('picture')}\n style={[this.styles.picture, shapeStyles.picture]}\n resizeMode={props.resizemode}\n source={source}\n {...getAccessibilityProps(AccessibilityWidgetType.PICTURE, props)}\n />\n );\n }\n return elementToshow;\n }\n \n public renderSkeleton(props: WmPictureProps){\n const imageWidth = this.state.imageWidth;\n const imageHeight = this.state.imageHeight;\n const shapeStyles = this.createShape(this.props.shape, imageWidth);\n const skeletonWidth = this.props.skeletonwidth || this.styles.root?.width || shapeStyles.root?.width || shapeStyles.picture?.width || imageWidth; \n const skeletonHeight = this.props.skeletonheight || this.styles.root?.height || shapeStyles.root?.height || shapeStyles.picture?.height || imageHeight;\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n borderRadius: this.props.shape == 'circle' && this.styles.root?.width ? 25 : shapeStyles.picture?.borderRadius || shapeStyles.root?.borderRadius || this.styles.root?.borderRadius || 4,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n });\n }\n\n renderWidget(props: WmPictureProps) {\n const imageWidth = this.state.imageWidth;\n const imageHeight = this.state.imageHeight;\n const shapeStyles = this.createShape(props.shape, imageWidth);\n this._pictureSource = this._pictureSource || this.loadImage(props.picturesource);\n this._picturePlaceHolder = this._picturePlaceHolder || this.loadImage(props.pictureplaceholder);\n const imgSrc: any = this._pictureSource || this._picturePlaceHolder;\n let elementToshow;\n if (imgSrc) {\n elementToshow = this.getElementToShow(props, imgSrc, shapeStyles);\n }\n return imgSrc && (this.state.naturalImageWidth || props.isSvg) ? (\n <View style={[{\n width: imageWidth,\n height: imageHeight\n }, this.styles.root, shapeStyles.root, shapeStyles.picture]}>\n {this._background}\n <View style={[{overflow: 'hidden', width: '100%',\n height: '100%'}]} onLayout={this.onViewLayoutChange}>\n <Tappable \n {...this.getTestPropsForAction()}\n rippleColor={this.styles.root.rippleColor}\n target={this} styles={{width: imageWidth ? null : '100%', height: imageHeight ? null : '100%'}}>\n <Animatedview entryanimation={props.animation} style={[{\n height: imageHeight,\n width: imageWidth,\n borderRadius: shapeStyles.picture?.borderRadius\n }]}>\n {this.state.imageWidth ? elementToshow : null}\n </Animatedview>\n </Tappable>\n </View>\n </View>\n ): null;\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,KAAK,EAAqBC,IAAI,QAAQ,cAAc;AAC7E;AACA,SAASC,QAAQ,QAAkB,WAAW;AAC9C,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,kBAAkB,MAAM,mDAAmD;AAClF,SAASC,aAAa,QAAQ,sCAAsC;AACpE,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AACjE,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAAqBC,cAAc,Q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AK,EAAEH,UAAU,GAAG,IAAI,GAAG,MAAM;QAAEK,MAAM,EAAED,WAAW,GAAG,IAAI,GAAG;MAAM;IAAE,iBAC/F1B,KAAA,CAAAkE,aAAA,CAACrD,YAAY;MAACyF,cAAc,EAAElF,KAAK,CAACmF,SAAU;MAAChC,KAAK,EAAE,CAAC;QACjD5C,MAAM,EAAED,WAAW;QACnBD,KAAK,EAAEH,UAAU;QACjBkC,YAAY,GAAAmC,qBAAA,GAAE9B,WAAW,CAACN,OAAO,cAAAoC,qBAAA,uBAAnBA,qBAAA,CAAqBnC;MACrC,CAAC;IAAE,GACF,IAAI,CAACzB,KAAK,CAACT,UAAU,GAAGwC,aAAa,GAAG,IAC7B,CACN,CACN,CACF,CAAC,GACN,IAAI;EACT;AACF"}
|
@@ -13,6 +13,9 @@ export default class WmPictureProps extends BaseProps {
|
|
13
13
|
_defineProperty(this, "resizemode", 'stretch');
|
14
14
|
_defineProperty(this, "skeletonheight", null);
|
15
15
|
_defineProperty(this, "skeletonwidth", null);
|
16
|
+
_defineProperty(this, "accessibilitylabel", undefined);
|
17
|
+
_defineProperty(this, "hint", undefined);
|
18
|
+
_defineProperty(this, "accessibilityrole", 'image');
|
16
19
|
}
|
17
20
|
}
|
18
21
|
//# sourceMappingURL=picture.props.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseProps","WmPictureProps","constructor","arguments","_defineProperty"],"sources":["picture.props.ts"],"sourcesContent":["import { ImageResizeMode } from 'react-native';\nimport { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmPictureProps extends BaseProps {\n animation?: string = null as any;\n picturesource?: string = null as any;\n pictureplaceholder?: string = null as any;\n shape?: string = null as any;\n isSvg?: string = null as any;\n resizemode?: ImageResizeMode = 'stretch' as any;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n}\n"],"mappings":";;;AACA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,cAAc,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBAC/B,IAAI;IAAAA,eAAA,wBACA,IAAI;IAAAA,eAAA,6BACC,IAAI;IAAAA,eAAA,gBACjB,IAAI;IAAAA,eAAA,gBACJ,IAAI;IAAAA,eAAA,qBACU,SAAS;IAAAA,eAAA,yBACd,IAAI;IAAAA,eAAA,wBACL,IAAI;EAAA;
|
1
|
+
{"version":3,"names":["BaseProps","WmPictureProps","constructor","arguments","_defineProperty","undefined"],"sources":["picture.props.ts"],"sourcesContent":["import { AccessibilityRole, ImageResizeMode } from 'react-native';\nimport { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmPictureProps extends BaseProps {\n animation?: string = null as any;\n picturesource?: string = null as any;\n pictureplaceholder?: string = null as any;\n shape?: string = null as any;\n isSvg?: string = null as any;\n resizemode?: ImageResizeMode = 'stretch' as any;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'image';\n}\n"],"mappings":";;;AACA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,cAAc,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBAC/B,IAAI;IAAAA,eAAA,wBACA,IAAI;IAAAA,eAAA,6BACC,IAAI;IAAAA,eAAA,gBACjB,IAAI;IAAAA,eAAA,gBACJ,IAAI;IAAAA,eAAA,qBACU,SAAS;IAAAA,eAAA,yBACd,IAAI;IAAAA,eAAA,wBACL,IAAI;IAAAA,eAAA,6BACCC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,OAAO;EAAA;AACjD"}
|
@@ -4,7 +4,9 @@ export const DEFAULT_CLASS = 'app-picture';
|
|
4
4
|
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
5
5
|
const defaultStyles = defineStyles({
|
6
6
|
root: {
|
7
|
-
overflow: 'hidden'
|
7
|
+
overflow: 'hidden',
|
8
|
+
width: 270,
|
9
|
+
rippleColor: themeVariables.transparent
|
8
10
|
},
|
9
11
|
text: {},
|
10
12
|
picture: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","overflow","
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","overflow","width","rippleColor","transparent","text","picture","height","skeleton","borderRadius","backgroundColor","pictureThumbBgColor","borderWidth","borderStyle","borderColor","pictureThumbBorderColor","paddingTop","paddingBottom","paddingLeft","paddingRight"],"sources":["picture.styles.ts"],"sourcesContent":["import { ImageStyle } from 'react-native';\nimport BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmPictureStyles = BaseStyles & {\n picture: ImageStyle,\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-picture';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmPictureStyles = defineStyles({\n root: {\n overflow: 'hidden',\n width: 270,\n rippleColor: themeVariables.transparent\n },\n text: {},\n picture: {\n width: '100%',\n height: '100%'\n },\n skeleton: {\n root: {\n width: '100%',\n height: 128\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('rounded-image', '', {\n picture: {\n borderRadius: 6\n }\n } as WmPictureStyles);\n addStyle('thumbnail-image', '', {\n root: {\n backgroundColor: themeVariables.pictureThumbBgColor,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.pictureThumbBorderColor,\n borderRadius: 6,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 8,\n paddingRight: 8\n }\n } as WmPictureStyles);\n});\n"],"mappings":"AACA,OAAOA,UAAU,MAAO,wCAAwC;AAChE,SAAqBC,YAAY,QAAQ,+CAA+C;AAQxF,OAAO,MAAMC,aAAa,GAAG,aAAa;AAC1CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA8B,GAAGL,YAAY,CAAC;IAClDM,IAAI,EAAE;MACJC,QAAQ,EAAE,QAAQ;MAClBC,KAAK,EAAE,GAAG;MACVC,WAAW,EAAEN,cAAc,CAACO;IAC9B,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,OAAO,EAAE;MACPJ,KAAK,EAAE,MAAM;MACbK,MAAM,EAAE;IACV,CAAC;IACDC,QAAQ,EAAE;MACRR,IAAI,EAAE;QACJE,KAAK,EAAE,MAAM;QACbK,MAAM,EAAE;MACV;IACF;EACF,CAAC,CAAC;EAEFT,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAAC,eAAe,EAAE,EAAE,EAAE;IAC5BQ,OAAO,EAAE;MACPG,YAAY,EAAE;IAChB;EACF,CAAoB,CAAC;EACrBX,QAAQ,CAAC,iBAAiB,EAAE,EAAE,EAAE;IAC9BE,IAAI,EAAE;MACJU,eAAe,EAAEb,cAAc,CAACc,mBAAmB;MACnDC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEjB,cAAc,CAACkB,uBAAuB;MACnDN,YAAY,EAAE,CAAC;MACfO,UAAU,EAAE,CAAC;MACbC,aAAa,EAAE,CAAC;MAChBC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE;IAChB;EACF,CAAoB,CAAC;AACvB,CAAC,CAAC"}
|
@@ -4,6 +4,7 @@ import { View } from 'react-native';
|
|
4
4
|
import { ProgressBar } from 'react-native-paper';
|
5
5
|
import { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';
|
6
6
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
7
|
+
import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
|
7
8
|
import WmProgressBarProps from './progress-bar.props';
|
8
9
|
import { DEFAULT_CLASS } from './progress-bar.styles';
|
9
10
|
export class WmProgressBarState extends BaseComponentState {}
|
@@ -24,14 +25,13 @@ export default class WmProgressBar extends BaseComponent {
|
|
24
25
|
height: '100%'
|
25
26
|
}
|
26
27
|
}
|
27
|
-
}), /*#__PURE__*/React.createElement(ProgressBar, {
|
28
|
-
testID: this.getTestId('progressbar'),
|
28
|
+
}), /*#__PURE__*/React.createElement(ProgressBar, _extends({}, getAccessibilityProps(AccessibilityWidgetType.PROGRESSBAR, props), {
|
29
29
|
progress: value,
|
30
30
|
color: styles.progressValue.color,
|
31
31
|
style: [styles.progressBar, {
|
32
32
|
height: styles.root.height || styles.progressBar.height
|
33
33
|
}]
|
34
|
-
})));
|
34
|
+
}))));
|
35
35
|
}
|
36
36
|
}
|
37
37
|
//# sourceMappingURL=progress-bar.component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","ProgressBar","Tappable","BaseComponent","BaseComponentState","WmProgressBarProps","DEFAULT_CLASS","WmProgressBarState","WmProgressBar","constructor","props","renderWidget","value","datavalue","minvalue","maxvalue","styles","theme","mergeStyle","getStyle","type","createElement","style","root","_background","_extends","getTestPropsForAction","target","width","height","
|
1
|
+
{"version":3,"names":["React","View","ProgressBar","Tappable","BaseComponent","BaseComponentState","AccessibilityWidgetType","getAccessibilityProps","WmProgressBarProps","DEFAULT_CLASS","WmProgressBarState","WmProgressBar","constructor","props","renderWidget","value","datavalue","minvalue","maxvalue","styles","theme","mergeStyle","getStyle","type","createElement","style","root","_background","_extends","getTestPropsForAction","target","width","height","PROGRESSBAR","progress","color","progressValue","progressBar"],"sources":["progress-bar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { ProgressBar } from 'react-native-paper';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nimport WmProgressBarProps from './progress-bar.props';\nimport { DEFAULT_CLASS, WmProgressBarStyles } from './progress-bar.styles';\n\nexport class WmProgressBarState extends BaseComponentState<WmProgressBarProps> {}\n\nexport default class WmProgressBar extends BaseComponent<WmProgressBarProps, WmProgressBarState, WmProgressBarStyles> {\n\n constructor(props: WmProgressBarProps) {\n super(props, DEFAULT_CLASS, new WmProgressBarProps());\n }\n\n renderWidget(props: WmProgressBarProps) {\n let value = (props.datavalue - props.minvalue) / (props.maxvalue - props.minvalue);\n const styles = this.theme.mergeStyle(this.theme.getStyle(`app-${props.type}-progress-bar`), this.styles);\n return (\n <View style={styles.root}>\n {this._background}\n <Tappable {...this.getTestPropsForAction()} target={this} styles={{root:{width: '100%', height: '100%'}}}>\n <ProgressBar\n {...getAccessibilityProps(AccessibilityWidgetType.PROGRESSBAR, props)}\n progress={value}\n color={styles.progressValue.color}\n style={[styles.progressBar, {height: styles.root.height || styles.progressBar.height}]}></ProgressBar>\n </Tappable>\n </View>); \n }\n\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,aAAa,QAA6B,uBAAuB;AAE1E,OAAO,MAAMC,kBAAkB,SAASL,kBAAkB,CAAqB;AAE/E,eAAe,MAAMM,aAAa,SAASP,aAAa,CAA8D;EAEpH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_defineProperty(this, "datavalue", 30);
|
10
10
|
_defineProperty(this, "minvalue", 0);
|
11
11
|
_defineProperty(this, "maxvalue", 100);
|
12
|
+
_defineProperty(this, "accessibilitylabel", undefined);
|
13
|
+
_defineProperty(this, "accessibilityrole", 'progressbar');
|
12
14
|
}
|
13
15
|
}
|
14
16
|
//# sourceMappingURL=progress-bar.props.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseProps","WmProgressBarProps","constructor","arguments","_defineProperty"],"sources":["progress-bar.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\
|
1
|
+
{"version":3,"names":["BaseProps","WmProgressBarProps","constructor","arguments","_defineProperty","undefined"],"sources":["progress-bar.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { AccessibilityRole } from 'react-native';\nexport default class WmProgressBarProps extends BaseProps {\n type: 'default' | 'success' | 'info' | 'warning' | 'error' = 'default';\n datavalue: number = 30;\n minvalue: number = 0;\n maxvalue: number = 100;\n accessibilitylabel?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'progressbar';\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,kBAAkB,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,eACK,SAAS;IAAAA,eAAA,oBAClD,EAAE;IAAAA,eAAA,mBACH,CAAC;IAAAA,eAAA,mBACD,GAAG;IAAAA,eAAA,6BACQC,SAAS;IAAAD,eAAA,4BACC,aAAa;EAAA;AACvD"}
|
@@ -8,6 +8,7 @@ import { isNumber } from 'lodash';
|
|
8
8
|
import { AnimatedCircularProgress } from 'react-native-circular-progress';
|
9
9
|
import { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';
|
10
10
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
11
|
+
import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
|
11
12
|
import WmProgressCircleProps from './progress-circle.props';
|
12
13
|
import { DEFAULT_CLASS } from './progress-circle.styles';
|
13
14
|
export class WmProgressCircleState extends BaseComponentState {
|
@@ -42,10 +43,10 @@ export default class WmProgressCircle extends BaseComponent {
|
|
42
43
|
}
|
43
44
|
const styles = this.theme.mergeStyle(this.theme.getStyle(`app-${props.type}-progress-circle`), this.styles);
|
44
45
|
const showText = props.captionplacement !== 'hidden';
|
45
|
-
return /*#__PURE__*/React.createElement(View, {
|
46
|
+
return /*#__PURE__*/React.createElement(View, _extends({
|
46
47
|
style: styles.root,
|
47
48
|
onLayout: this.onLayout.bind(this)
|
48
|
-
}, this._background, /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(), {
|
49
|
+
}, getAccessibilityProps(AccessibilityWidgetType.PROGRESSCIRCLE, props)), this._background, /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(), {
|
49
50
|
target: this,
|
50
51
|
styles: {
|
51
52
|
root: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","Text","isNumber","AnimatedCircularProgress","Tappable","BaseComponent","BaseComponentState","WmProgressCircleProps","DEFAULT_CLASS","WmProgressCircleState","constructor","arguments","_defineProperty","WmProgressCircle","props","onLayout","e","width","nativeEvent","layout","height","radius","state","Math","min","updateState","renderWidget","value","datavalue","minvalue","maxvalue","styles","theme","mergeStyle","getStyle","type","showText","captionplacement","createElement","style","root","bind","
|
1
|
+
{"version":3,"names":["React","View","Text","isNumber","AnimatedCircularProgress","Tappable","BaseComponent","BaseComponentState","AccessibilityWidgetType","getAccessibilityProps","WmProgressCircleProps","DEFAULT_CLASS","WmProgressCircleState","constructor","arguments","_defineProperty","WmProgressCircle","props","onLayout","e","width","nativeEvent","layout","height","radius","state","Math","min","updateState","renderWidget","value","datavalue","minvalue","maxvalue","styles","theme","mergeStyle","getStyle","type","showText","captionplacement","createElement","_extends","style","root","bind","PROGRESSCIRCLE","_background","getTestPropsForAction","target","fill","progressValue","backgroundWidth","rotation","tintColor","backgroundColor","lineCap","buttStyle","progressCircle","size","alignItems","text","title","subtitle","subTitle"],"sources":["progress-circle.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Text } from 'react-native';\nimport { isNumber } from 'lodash';\nimport { AnimatedCircularProgress } from 'react-native-circular-progress';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nimport WmProgressCircleProps from './progress-circle.props';\nimport { DEFAULT_CLASS, WmProgressCircleStyles } from './progress-circle.styles';\n\n\nexport class WmProgressCircleState extends BaseComponentState<WmProgressCircleProps> {\n radius = 10;\n}\n\nexport default class WmProgressCircle extends BaseComponent<WmProgressCircleProps, WmProgressCircleState, WmProgressCircleStyles> {\n\n constructor(props: WmProgressCircleProps) {\n super(props, DEFAULT_CLASS, new WmProgressCircleProps(), new WmProgressCircleState());\n }\n\n onLayout(e: LayoutChangeEvent) {\n const width = e.nativeEvent.layout.width;\n const height = e.nativeEvent.layout.height;\n let radius = this.state.radius;\n if (!width) {\n radius = height;\n } else if (!height) {\n radius = width;\n } else {\n radius = Math.min(width, height);\n }\n this.updateState({\n radius: radius\n } as WmProgressCircleState);\n }\n\n renderWidget(props: WmProgressCircleProps) {\n let value = 0;\n if (isNumber(props.datavalue) && isNumber(props.minvalue) && isNumber(props.maxvalue)) {\n value = (+props.datavalue - (+props.minvalue)) / (+props.maxvalue - (+props.minvalue)) * 100;\n }\n const styles = this.theme.mergeStyle(this.theme.getStyle(`app-${props.type}-progress-circle`), this.styles);\n const showText = props.captionplacement !== 'hidden';\n return (\n <View style={styles.root} onLayout={this.onLayout.bind(this)} {...getAccessibilityProps(AccessibilityWidgetType.PROGRESSCIRCLE, props)}>\n {this._background}\n <Tappable {...this.getTestPropsForAction()} target={this} styles={{root:{width: '100%', height: '100%'}}}>\n <AnimatedCircularProgress\n fill={value}\n width={styles.progressValue.height}\n backgroundWidth={styles.progressValue.height}\n rotation={0}\n tintColor={styles.progressValue.backgroundColor}\n lineCap={styles.progressValue.buttStyle || \"butt\"}\n backgroundColor={styles.progressCircle.backgroundColor}\n size={this.state.radius}>\n {(fill) => (<View style={{alignItems: 'center'}}>\n <Text style={styles.text}>{ showText ? props.title || value : '' }</Text>\n {showText && props.subtitle ? (<Text style={styles.subTitle}>{ props.subtitle }</Text>) : null}\n </View>)} \n </AnimatedCircularProgress>\n </Tappable>\n </View>); \n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC5D,SAASC,QAAQ,QAAQ,QAAQ;AACjC,SAASC,wBAAwB,QAAQ,gCAAgC;AACzE,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,SAASC,aAAa,QAAgC,0BAA0B;AAGhF,OAAO,MAAMC,qBAAqB,SAASL,kBAAkB,CAAwB;EAAAM,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,iBAC1E,EAAE;EAAA;AACb;AAEA,eAAe,MAAMC,gBAAgB,SAASV,aAAa,CAAuE;EAEhIO,WAAWA,CAACI,KAA4B,EAAE;IACxC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,qBAAqB,CAAC,CAAC,EAAE,IAAIE,qBAAqB,CAAC,CAAC,CAAC;EACvF;EAEAM,QAAQA,CAACC,CAAoB,EAAE;IAC7B,MAAMC,KAAK,GAAGD,CAAC,CAACE,WAAW,CAACC,MAAM,CAACF,KAAK;IACxC,MAA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extends BaseProps {
|
|
12
12
|
_defineProperty(this, "captionplacement", 'inside');
|
13
13
|
_defineProperty(this, "title", '');
|
14
14
|
_defineProperty(this, "subtitle", '');
|
15
|
+
_defineProperty(this, "accessibilitylabel", undefined);
|
16
|
+
_defineProperty(this, "accessibilityrole", 'progressbar');
|
15
17
|
}
|
16
18
|
}
|
17
19
|
//# sourceMappingURL=progress-circle.props.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseProps","WmProgressCircleProps","constructor","arguments","_defineProperty"],"sources":["progress-circle.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\
|
1
|
+
{"version":3,"names":["BaseProps","WmProgressCircleProps","constructor","arguments","_defineProperty","undefined"],"sources":["progress-circle.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { AccessibilityRole } from 'react-native';\nexport default class WmProgressCircleProps extends BaseProps {\n type: 'default' | 'success' | 'info' | 'warning' | 'error' = 'default';\n datavalue: number = 30;\n minvalue: number = 0;\n maxvalue: number = 100;\n captionplacement: string = 'inside';\n title: string = '';\n subtitle: string = '';\n accessibilitylabel?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'progressbar';\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,qBAAqB,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,eACE,SAAS;IAAAA,eAAA,oBAClD,EAAE;IAAAA,eAAA,mBACH,CAAC;IAAAA,eAAA,mBACD,GAAG;IAAAA,eAAA,2BACK,QAAQ;IAAAA,eAAA,gBACnB,EAAE;IAAAA,eAAA,mBACC,EAAE;IAAAA,eAAA,6BACSC,SAAS;IAAAD,eAAA,4BACC,aAAa;EAAA;AACvD"}
|
@@ -9,6 +9,7 @@ import WmSearchProps from './search.props';
|
|
9
9
|
import { DEFAULT_CLASS } from './search.styles';
|
10
10
|
import { ModalConsumer } from "@wavemaker/app-rn-runtime/core/modal.service";
|
11
11
|
import { DataProvider } from '@wavemaker/app-rn-runtime/components/basic/search/local-data-provider';
|
12
|
+
import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
|
12
13
|
import { BaseDatasetComponent, BaseDatasetState } from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';
|
13
14
|
import WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';
|
14
15
|
import WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';
|
@@ -304,7 +305,7 @@ export default class WmSearch extends BaseDatasetComponent {
|
|
304
305
|
ref.selectionStart = ref.selectionEnd = this.cursor;
|
305
306
|
}
|
306
307
|
}
|
307
|
-
}, this.getTestPropsForInput(), {
|
308
|
+
}, this.getTestPropsForInput(), getAccessibilityProps(AccessibilityWidgetType.SEARCH, props), {
|
308
309
|
placeholderTextColor: this.styles.placeholderText.color,
|
309
310
|
placeholder: props.placeholder || 'Search',
|
310
311
|
autoFocus: props.autofocus,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Keyboard","Platform","ScrollView","Text","TextInput","View","find","isNull","WmSearchProps","DEFAULT_CLASS","ModalConsumer","DataProvider","BaseDatasetComponent","BaseDatasetState","WmAnchor","WmPicture","Tappable","WmButton","get","isArray","isEmpty","isObject","AssetProvider","WmSearchState","constructor","arguments","_defineProperty","top","left","WmSearch","props","_this","this","Promise","resolve","position","view","measure","x","length","undefined","y","width","height","px","py","updateState","computePosition","then","isOpened","dataProvider","datavalue","query","clearSearch","invokeEventCallback","hide","dataItems","state","map","item","selected","type","updateFilteredData","_filteredData","queryText","filterOptions","entries","filteredData","minchars","_this$dataProvider","searchkey","updateRequired","init","invokeVariable","response","dataSet","setDataItems","filter","result","dataObject","data","isFocused","showPopover","focus","_this$widgetRef","widgetRef","onChange","value","isDefaultQuery","prevQuery","searchon","validate","invokeEvent","proxy","invokeChange","e","OS","cursor","target","selectionStart","onFocus","disabled","_this$state$props$que","onBlur","setTimeout","triggerValidation","prepareModalOptions","content","styles","modalService","o","modalOptions","modalContentSTyles","searchInputWidth","modalContent","borderWidth","modalStyle","modal","contentStyle","isModal","onClose","dismiss","setState","hideModal","searchIconPress","onItemSelect","displayexp","displayfield","datafield","updateDatavalue","prevDatavalue","queryModel","renderSearchBar","_this$state$dataItems","opts","valueExpr","createElement","style","root","ref","onLayout","searchInputWrapper","_extends","text","isValid","invalid","focusedText","selectionEnd","getTestPropsForInput","placeholderTextColor","placeholderText","color","placeholder","autoFocus","autofocus","editable","readonly","onChangeText","bind","nativeEvent","layout","showclear","onTap","id","getTestId","clearButton","iconclass","showSearchIcon","searchButton","reset","renderSearchItem","index","imageStyles","imagewidth","getTestProps","searchItem","name","picturesource","imgSrc","getTestPropsForLabel","searchItemText","updateDefaultQueryModel","selectedItem","onDataItemsUpdate","componentDidMount","onPropertyChange","$new","$old","dataset","renderWidget","showModal","maxHeight","contentContainerStyle","dropDownContent","loadAsset","key","limit","caption","datacompletemsg","dataCompleteItem"],"sources":["search.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Keyboard, Platform, ScrollView, Text, TextInput, View } from 'react-native';\nimport { find, isNull } from 'lodash';\n\nimport WmSearchProps from './search.props';\nimport { DEFAULT_CLASS, WmSearchStyles } from './search.styles';\nimport { ModalConsumer, ModalOptions, ModalService} from \"@wavemaker/app-rn-runtime/core/modal.service\";\nimport { DataProvider } from '@wavemaker/app-rn-runtime/components/basic/search/local-data-provider';\n\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { get, isArray, isEmpty, isObject } from \"lodash-es\";\nimport { AssetProvider } from '@wavemaker/app-rn-runtime/core/asset.provider';\n\nexport class WmSearchState extends BaseDatasetState<WmSearchProps> {\n isOpened: boolean = false;\n modalOptions = {} as ModalOptions;\n position = {\n top: 0,\n left: 0\n } as DropdownPosition;\n data: any = [];\n}\n\nexport interface DropdownPosition {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n}\n\nexport default class WmSearch extends BaseDatasetComponent<WmSearchProps, WmSearchState, WmSearchStyles> {\n view: View = null as any;\n private prevDatavalue: any;\n private queryModel: any;\n private searchInputWidth: any;\n private isDefaultQuery: boolean = true;\n private dataProvider: DataProvider;\n public widgetRef: TextInput | null = null;\n private cursor: any = 0;\n private isFocused: boolean = false;\n private updateRequired: any;\n\n constructor(props: WmSearchProps) {\n super(props, DEFAULT_CLASS, new WmSearchProps(), new WmSearchState());\n this.dataProvider = new DataProvider();\n if (this.props.datavalue) {\n this.updateState({\n props: {\n query: this.props.datavalue\n }\n } as WmSearchState);\n }\n }\n\n computePosition = () => {\n return new Promise<void>((resolve) => {\n const position = {} as DropdownPosition;\n this.view.measure((x = 0, y = 0, width = 0, height = 0, px = 0, py = 0) => {\n position.left = px;\n position.top = py + height;\n this.updateState({ position: position } as WmSearchState, resolve);\n });\n });\n }\n\n clearSearch() {\n this.invokeEventCallback('onClear', [null, this]);\n this.hide();\n this.updateState({\n props: {\n query: ''\n },\n dataItems: this.state.dataItems ? this.state.dataItems.map((item: any) => {\n item.selected = false;\n return item;\n }) : []\n } as WmSearchState, () => {\n if (this.state.props.type === 'autocomplete') {\n this.updateFilteredData('');\n }\n });\n }\n\n updateFilteredData(queryText: string = '') {\n const props = this.state.props;\n const filterOptions = {\n query: queryText,\n props: props,\n entries: this.state.dataItems\n };\n let filteredData: Array<any> = [];\n if (props.minchars && queryText.length < props.minchars) {\n filteredData = [];\n } else if (props.type === 'search' && !queryText) {\n filteredData = [];\n } else {\n if (this.props.searchkey && this.updateRequired === undefined) {\n this.updateRequired = this.dataProvider.init(this);\n }\n // for service variables invoke the variable with params.\n if (this.props.searchkey && this.updateRequired && this.state.props.query !== queryText) {\n this.dataProvider.invokeVariable(this, queryText).then((response: any) => {\n if (response) {\n response = response.dataSet;\n if (isEmpty(response)) {\n filteredData = [];\n } else {\n if (isObject(response) && !isArray(response)) {\n response = [response];\n }\n this.setDataItems(response);\n }\n }\n }, () => {});\n return;\n }\n filteredData = this.dataProvider?.filter(filterOptions);\n }\n this.updateState({\n props: { result: filteredData?.map( (item: any) => item.dataObject), query: queryText },\n data: filteredData,\n } as WmSearchState);\n if (!this.state.isOpened && this.isFocused) {\n this.showPopover && this.showPopover();\n }\n }\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n onChange(value: any) {\n this.isDefaultQuery = false;\n const prevQuery = this.state.props.query;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateState({\n props: {result: [], query: value},\n data: []\n } as WmSearchState);\n } else {\n this.updateFilteredData(value);\n }\n if (value === '') {\n this.validate(value);\n this.updateState({\n props: {\n datavalue: '',\n },\n } as WmSearchState);\n if (value === prevQuery) {\n return;\n }\n }\n if (this.props.invokeEvent) {\n this.props.invokeEvent('onChange', [undefined, this.proxy, value, prevQuery]);\n }\n this.invokeEventCallback('onChange', [ undefined, this.proxy, value, prevQuery ]);\n }\n\n invokeChange(e: any) {\n if (Platform.OS === 'web') {\n this.cursor = e.target.selectionStart;\n this.updateState({ props: { query: e.target.value } } as WmSearchState);\n }\n }\n\n onFocus() {\n this.isFocused = true;\n if (!this.state.props.disabled && this.state.props.type === 'autocomplete') {\n this.cursor = this.state.props.query?.length || 0;\n this.updateFilteredData(this.state.props.query || '');\n }\n this.invokeEventCallback('onFocus', [null, this]);\n }\n\n onBlur() {\n this.isFocused = false;\n this.validate(this.state.props.datavalue);\n if (!this.state.props.datavalue) {\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n })\n }\n this.invokeEventCallback('onBlur', [null, this]);\n }\n\n public showPopover = () => {\n this.computePosition().then(() => {\n this.updateState({ isOpened: true } as WmSearchState);\n });\n };\n\n public hide = () => {};\n\n prepareModalOptions(content: React.ReactNode, styles: WmSearchStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n const modalContentSTyles = {\n width: this.searchInputWidth - 2 * (styles.modalContent.borderWidth || 0),\n left: (this.state.position.left || 0) + 2 * (styles.modalContent.borderWidth || 0) };\n o.modalStyle = {...styles.modal};\n o.contentStyle = {...styles.modalContent, ...this.state.position, ...modalContentSTyles};\n o.content = content;\n o.isModal = true;\n o.onClose = () => {\n this.hide = () => {};\n Keyboard.dismiss();\n if (this.state.isOpened) {\n this.setState({isOpened: false, modalOptions: {} as ModalOptions} as WmSearchState);\n }\n };\n this.hide = () => {\n modalService.hideModal(this.state.modalOptions);\n if (this.state.isOpened) {\n this.setState({ isOpened: false, modalOptions: {} as ModalOptions } as WmSearchState);\n }\n }\n return o;\n }\n\n searchIconPress() {\n this.isFocused = false;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateFilteredData(this.state.props.query);\n } else {\n this.onItemSelect(this.state.data[0]);\n }\n }\n\n onItemSelect(item: any) {\n this.isFocused = false;\n this.updateState({ props: {\n query: item.displayexp || item.displayfield\n }\n } as WmSearchState);\n this.validate(item.datafield);\n this.updateDatavalue(item.datafield);\n this.prevDatavalue = item.datafield;\n this.queryModel = item;\n if (get(this.props, 'formfield')) {\n // @ts-ignore\n this.props.invokeEvent('onSelect', [null, this, item.datafield]);\n // @ts-ignore\n this.props.invokeEvent('onSubmit', [null, this]);\n } else {\n this.invokeEventCallback('onSelect', [null, this, item.datafield]);\n this.invokeEventCallback('onSubmit', [null, this]);\n }\n this.hide();\n }\n\n renderSearchBar() {\n const props = this.state.props;\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.props.query || '';\n return(\n /*\n * onLayout function is required.\n * https://github.com/naoufal/react-native-accordion/pull/19/files\n */\n <View style={this.styles.root} ref={ref => {this.view = ref as View}} onLayout={() => {}}>\n <View style={this.styles.searchInputWrapper}>\n <TextInput style={[this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isOpened && this.state.dataItems?.length > 0? this.styles.focusedText : null]}\n ref={ref => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...this.getTestPropsForInput()}\n placeholderTextColor={this.styles.placeholderText.color as any}\n placeholder={props.placeholder || 'Search'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n onChangeText={this.onChange.bind(this)}\n onChange={this.invokeChange.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onLayout={e => {this.searchInputWidth = e.nativeEvent.layout.width}}\n onBlur={this.onBlur.bind(this)}\n {...opts}>\n </TextInput>\n {props.showclear && this.state.props.query ? <WmButton onTap={this.clearSearch.bind(this)}\n id={this.getTestId('clear')}\n styles={this.styles.clearButton} iconclass={'wi wi-clear'}></WmButton> : null}\n </View>\n {props.showSearchIcon && props.type === 'search' ? <WmButton styles={this.styles.searchButton}\n id={this.getTestId('search')}\n iconclass={'wm-sl-l sl-search'} onTap={this.searchIconPress.bind(this)}></WmButton> : null}\n </View>\n );\n }\n\n reset() {\n if (this.state.props.query) {\n this.updateState({\n props: {\n query: ''\n }\n } as WmSearchState);\n }\n }\n\n renderSearchItem(item: any, index: number) {\n const props = this.state.props;\n const imageStyles = { root: {height:props.imagewidth, width:props.imagewidth}}\n return (\n <Tappable onTap={this.onItemSelect.bind(this, item)} {...this.getTestProps(`action${index}`)}>\n <View style={this.styles.searchItem}>\n <WmPicture id={this.getTestId(`picture${index}`)} styles={imageStyles} name={props.name + '_image'} picturesource={item.imgSrc}></WmPicture>\n <Text {...this.getTestPropsForLabel(index + '')} style={this.styles.searchItemText}>{item.displayexp || item.displayfield}</Text>\n </View>\n </Tappable>\n );\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultQuery) {\n const selectedItem = find(this.state.dataItems, (item) => item.selected);\n this.updateState({ props: {\n query: selectedItem ? (selectedItem.displayexp || selectedItem.displayfield) : ''\n }\n } as WmSearchState);\n }\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.isFocused && this.state.dataItems.length && this.updateFilteredData(this.state.props.query);\n this.updateDefaultQueryModel();\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'dataset':\n if (!isEmpty($new) && isObject($new) && !isArray($new)) {\n $new = [$new];\n this.updateState({\n props: {\n dataset: $new\n }\n } as WmSearchState);\n }\n break;\n }\n super.onPropertyChange(name, $new, $old);\n }\n\n renderWidget(props: WmSearchProps) {\n const result = this.state.data;\n return (\n <View>\n {this.renderSearchBar()}\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions((\n <ScrollView style={{width: '100%', maxHeight: 200}} contentContainerStyle={this.styles.dropDownContent}>\n <AssetProvider value={this.loadAsset}>\n {result && result.map((item: any, index: any) => (\n <View key={item.key}>\n {\n (!props.limit) || (props.limit && index+1 <= props.limit) ?\n this.renderSearchItem(item, index)\n : null\n }\n {\n index === result.length - 1 ?\n <WmAnchor caption={props.datacompletemsg} styles={this.styles.dataCompleteItem}></WmAnchor> : null\n }\n </View>\n ))}\n </AssetProvider>\n </ScrollView>\n ), this.styles, modalService));\n return null;\n }}\n </ModalConsumer>) : null}\n </View>\n\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,EAAEC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AACpF,SAASC,IAAI,EAAEC,MAAM,QAAQ,QAAQ;AAErC,OAAOC,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I,aAAA,CAACtI,UAAU;QAACuI,KAAK,EAAE;UAAC/F,KAAK,EAAE,MAAM;UAAEqJ,SAAS,EAAE;QAAG,CAAE;QAACC,qBAAqB,EAAE,IAAI,CAACpF,MAAM,CAACqF;MAAgB,gBACnGlM,KAAA,CAAAyI,aAAA,CAAClH,aAAa;QAACiE,KAAK,EAAE,IAAI,CAAC2G;MAAU,GACpCpH,MAAM,IAAIA,MAAM,CAACpB,GAAG,CAAC,CAACC,IAAS,EAAEgH,KAAU,kBAC1C5K,KAAA,CAAAyI,aAAA,CAACnI,IAAI;QAAC8L,GAAG,EAAExI,IAAI,CAACwI;MAAI,GAEf,CAACrK,KAAK,CAACsK,KAAK,IAAMtK,KAAK,CAACsK,KAAK,IAAIzB,KAAK,GAAC,CAAC,IAAI7I,KAAK,CAACsK,KAAM,GACvD,IAAI,CAAC1B,gBAAgB,CAAC/G,IAAI,EAAEgH,KAAK,CAAC,GAChC,IAAI,EAGRA,KAAK,KAAK7F,MAAM,CAACvC,MAAM,GAAG,CAAC,gBAC3BxC,KAAA,CAAAyI,aAAA,CAAC1H,QAAQ;QAACuL,OAAO,EAAEvK,KAAK,CAACwK,eAAgB;QAAC1F,MAAM,EAAE,IAAI,CAACA,MAAM,CAAC2F;MAAiB,CAAW,CAAC,GAAG,IAE5F,CACP,CACc,CACP,CAAC,EACZ,IAAI,CAAC3F,MAAM,EAAEC,YAAY,CAAC,CAAC;MAC9B,OAAO,IAAI;IACb,CACa,CAAC,GAAI,IAClB,CAAC;EAGX;AACF"}
|
1
|
+
{"version":3,"names":["React","Keyboard","Platform","ScrollView","Text","TextInput","View","find","isNull","WmSearchProps","DEFAULT_CLASS","ModalConsumer","DataProvider","AccessibilityWidgetType","getAccessibilityProps","BaseDatasetComponent","BaseDatasetState","WmAnchor","WmPicture","Tappable","WmButton","get","isArray","isEmpty","isObject","AssetProvider","WmSearchState","constructor","arguments","_defineProperty","top","left","WmSearch","props","_this","this","Promise","resolve","position","view","measure","x","length","undefined","y","width","height","px","py","updateState","computePosition","then","isOpened","dataProvider","datavalue","query","clearSearch","invokeEventCallback","hide","dataItems","state","map","item","selected","type","updateFilteredData","_filteredData","queryText","filterOptions","entries","filteredData","minchars","_this$dataProvider","searchkey","updateRequired","init","invokeVariable","response","dataSet","setDataItems","filter","result","dataObject","data","isFocused","showPopover","focus","_this$widgetRef","widgetRef","onChange","value","isDefaultQuery","prevQuery","searchon","validate","invokeEvent","proxy","invokeChange","e","OS","cursor","target","selectionStart","onFocus","disabled","_this$state$props$que","onBlur","setTimeout","triggerValidation","prepareModalOptions","content","styles","modalService","o","modalOptions","modalContentSTyles","searchInputWidth","modalContent","borderWidth","modalStyle","modal","contentStyle","isModal","onClose","dismiss","setState","hideModal","searchIconPress","onItemSelect","displayexp","displayfield","datafield","updateDatavalue","prevDatavalue","queryModel","renderSearchBar","_this$state$dataItems","opts","valueExpr","createElement","style","root","ref","onLayout","searchInputWrapper","_extends","text","isValid","invalid","focusedText","selectionEnd","getTestPropsForInput","SEARCH","placeholderTextColor","placeholderText","color","placeholder","autoFocus","autofocus","editable","readonly","onChangeText","bind","nativeEvent","layout","showclear","onTap","id","getTestId","clearButton","iconclass","showSearchIcon","searchButton","reset","renderSearchItem","index","imageStyles","imagewidth","getTestProps","searchItem","name","picturesource","imgSrc","getTestPropsForLabel","searchItemText","updateDefaultQueryModel","selectedItem","onDataItemsUpdate","componentDidMount","onPropertyChange","$new","$old","dataset","renderWidget","showModal","maxHeight","contentContainerStyle","dropDownContent","loadAsset","key","limit","caption","datacompletemsg","dataCompleteItem"],"sources":["search.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Keyboard, Platform, ScrollView, Text, TextInput, View } from 'react-native';\nimport { find, isNull } from 'lodash';\n\nimport WmSearchProps from './search.props';\nimport { DEFAULT_CLASS, WmSearchStyles } from './search.styles';\nimport { ModalConsumer, ModalOptions, ModalService} from \"@wavemaker/app-rn-runtime/core/modal.service\";\nimport { DataProvider } from '@wavemaker/app-rn-runtime/components/basic/search/local-data-provider';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { get, isArray, isEmpty, isObject } from \"lodash-es\";\nimport { AssetProvider } from '@wavemaker/app-rn-runtime/core/asset.provider';\n\nexport class WmSearchState extends BaseDatasetState<WmSearchProps> {\n isOpened: boolean = false;\n modalOptions = {} as ModalOptions;\n position = {\n top: 0,\n left: 0\n } as DropdownPosition;\n data: any = [];\n}\n\nexport interface DropdownPosition {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n}\n\nexport default class WmSearch extends BaseDatasetComponent<WmSearchProps, WmSearchState, WmSearchStyles> {\n view: View = null as any;\n private prevDatavalue: any;\n private queryModel: any;\n private searchInputWidth: any;\n private isDefaultQuery: boolean = true;\n private dataProvider: DataProvider;\n public widgetRef: TextInput | null = null;\n private cursor: any = 0;\n private isFocused: boolean = false;\n private updateRequired: any;\n\n constructor(props: WmSearchProps) {\n super(props, DEFAULT_CLASS, new WmSearchProps(), new WmSearchState());\n this.dataProvider = new DataProvider();\n if (this.props.datavalue) {\n this.updateState({\n props: {\n query: this.props.datavalue\n }\n } as WmSearchState);\n }\n }\n\n computePosition = () => {\n return new Promise<void>((resolve) => {\n const position = {} as DropdownPosition;\n this.view.measure((x = 0, y = 0, width = 0, height = 0, px = 0, py = 0) => {\n position.left = px;\n position.top = py + height;\n this.updateState({ position: position } as WmSearchState, resolve);\n });\n });\n }\n\n clearSearch() {\n this.invokeEventCallback('onClear', [null, this]);\n this.hide();\n this.updateState({\n props: {\n query: ''\n },\n dataItems: this.state.dataItems ? this.state.dataItems.map((item: any) => {\n item.selected = false;\n return item;\n }) : []\n } as WmSearchState, () => {\n if (this.state.props.type === 'autocomplete') {\n this.updateFilteredData('');\n }\n });\n }\n\n updateFilteredData(queryText: string = '') {\n const props = this.state.props;\n const filterOptions = {\n query: queryText,\n props: props,\n entries: this.state.dataItems\n };\n let filteredData: Array<any> = [];\n if (props.minchars && queryText.length < props.minchars) {\n filteredData = [];\n } else if (props.type === 'search' && !queryText) {\n filteredData = [];\n } else {\n if (this.props.searchkey && this.updateRequired === undefined) {\n this.updateRequired = this.dataProvider.init(this);\n }\n // for service variables invoke the variable with params.\n if (this.props.searchkey && this.updateRequired && this.state.props.query !== queryText) {\n this.dataProvider.invokeVariable(this, queryText).then((response: any) => {\n if (response) {\n response = response.dataSet;\n if (isEmpty(response)) {\n filteredData = [];\n } else {\n if (isObject(response) && !isArray(response)) {\n response = [response];\n }\n this.setDataItems(response);\n }\n }\n }, () => {});\n return;\n }\n filteredData = this.dataProvider?.filter(filterOptions);\n }\n this.updateState({\n props: { result: filteredData?.map( (item: any) => item.dataObject), query: queryText },\n data: filteredData,\n } as WmSearchState);\n if (!this.state.isOpened && this.isFocused) {\n this.showPopover && this.showPopover();\n }\n }\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n onChange(value: any) {\n this.isDefaultQuery = false;\n const prevQuery = this.state.props.query;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateState({\n props: {result: [], query: value},\n data: []\n } as WmSearchState);\n } else {\n this.updateFilteredData(value);\n }\n if (value === '') {\n this.validate(value);\n this.updateState({\n props: {\n datavalue: '',\n },\n } as WmSearchState);\n if (value === prevQuery) {\n return;\n }\n }\n if (this.props.invokeEvent) {\n this.props.invokeEvent('onChange', [undefined, this.proxy, value, prevQuery]);\n }\n this.invokeEventCallback('onChange', [ undefined, this.proxy, value, prevQuery ]);\n }\n\n invokeChange(e: any) {\n if (Platform.OS === 'web') {\n this.cursor = e.target.selectionStart;\n this.updateState({ props: { query: e.target.value } } as WmSearchState);\n }\n }\n\n onFocus() {\n this.isFocused = true;\n if (!this.state.props.disabled && this.state.props.type === 'autocomplete') {\n this.cursor = this.state.props.query?.length || 0;\n this.updateFilteredData(this.state.props.query || '');\n }\n this.invokeEventCallback('onFocus', [null, this]);\n }\n\n onBlur() {\n this.isFocused = false;\n this.validate(this.state.props.datavalue);\n if (!this.state.props.datavalue) {\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n })\n }\n this.invokeEventCallback('onBlur', [null, this]);\n }\n\n public showPopover = () => {\n this.computePosition().then(() => {\n this.updateState({ isOpened: true } as WmSearchState);\n });\n };\n\n public hide = () => {};\n\n prepareModalOptions(content: React.ReactNode, styles: WmSearchStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n const modalContentSTyles = {\n width: this.searchInputWidth - 2 * (styles.modalContent.borderWidth || 0),\n left: (this.state.position.left || 0) + 2 * (styles.modalContent.borderWidth || 0) };\n o.modalStyle = {...styles.modal};\n o.contentStyle = {...styles.modalContent, ...this.state.position, ...modalContentSTyles};\n o.content = content;\n o.isModal = true;\n o.onClose = () => {\n this.hide = () => {};\n Keyboard.dismiss();\n if (this.state.isOpened) {\n this.setState({isOpened: false, modalOptions: {} as ModalOptions} as WmSearchState);\n }\n };\n this.hide = () => {\n modalService.hideModal(this.state.modalOptions);\n if (this.state.isOpened) {\n this.setState({ isOpened: false, modalOptions: {} as ModalOptions } as WmSearchState);\n }\n }\n return o;\n }\n\n searchIconPress() {\n this.isFocused = false;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateFilteredData(this.state.props.query);\n } else {\n this.onItemSelect(this.state.data[0]);\n }\n }\n\n onItemSelect(item: any) {\n this.isFocused = false;\n this.updateState({ props: {\n query: item.displayexp || item.displayfield\n }\n } as WmSearchState);\n this.validate(item.datafield);\n this.updateDatavalue(item.datafield);\n this.prevDatavalue = item.datafield;\n this.queryModel = item;\n if (get(this.props, 'formfield')) {\n // @ts-ignore\n this.props.invokeEvent('onSelect', [null, this, item.datafield]);\n // @ts-ignore\n this.props.invokeEvent('onSubmit', [null, this]);\n } else {\n this.invokeEventCallback('onSelect', [null, this, item.datafield]);\n this.invokeEventCallback('onSubmit', [null, this]);\n }\n this.hide();\n }\n\n renderSearchBar() {\n const props = this.state.props;\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.props.query || '';\n return(\n /*\n * onLayout function is required.\n * https://github.com/naoufal/react-native-accordion/pull/19/files\n */\n <View style={this.styles.root} ref={ref => {this.view = ref as View}} onLayout={() => {}}>\n <View style={this.styles.searchInputWrapper}>\n <TextInput style={[this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isOpened && this.state.dataItems?.length > 0? this.styles.focusedText : null]}\n ref={ref => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(AccessibilityWidgetType.SEARCH, props)}\n placeholderTextColor={this.styles.placeholderText.color as any}\n placeholder={props.placeholder || 'Search'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n onChangeText={this.onChange.bind(this)}\n onChange={this.invokeChange.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onLayout={e => {this.searchInputWidth = e.nativeEvent.layout.width}}\n onBlur={this.onBlur.bind(this)}\n {...opts}>\n </TextInput>\n {props.showclear && this.state.props.query ? <WmButton onTap={this.clearSearch.bind(this)}\n id={this.getTestId('clear')}\n styles={this.styles.clearButton} iconclass={'wi wi-clear'}></WmButton> : null}\n </View>\n {props.showSearchIcon && props.type === 'search' ? <WmButton styles={this.styles.searchButton}\n id={this.getTestId('search')}\n iconclass={'wm-sl-l sl-search'} onTap={this.searchIconPress.bind(this)}></WmButton> : null}\n </View>\n );\n }\n\n reset() {\n if (this.state.props.query) {\n this.updateState({\n props: {\n query: ''\n }\n } as WmSearchState);\n }\n }\n\n renderSearchItem(item: any, index: number) {\n const props = this.state.props;\n const imageStyles = { root: {height:props.imagewidth, width:props.imagewidth}}\n return (\n <Tappable onTap={this.onItemSelect.bind(this, item)} {...this.getTestProps(`action${index}`)}>\n <View style={this.styles.searchItem}>\n <WmPicture id={this.getTestId(`picture${index}`)} styles={imageStyles} name={props.name + '_image'} picturesource={item.imgSrc}></WmPicture>\n <Text {...this.getTestPropsForLabel(index + '')} style={this.styles.searchItemText}>{item.displayexp || item.displayfield}</Text>\n </View>\n </Tappable>\n );\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultQuery) {\n const selectedItem = find(this.state.dataItems, (item) => item.selected);\n this.updateState({ props: {\n query: selectedItem ? (selectedItem.displayexp || selectedItem.displayfield) : ''\n }\n } as WmSearchState);\n }\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.isFocused && this.state.dataItems.length && this.updateFilteredData(this.state.props.query);\n this.updateDefaultQueryModel();\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'dataset':\n if (!isEmpty($new) && isObject($new) && !isArray($new)) {\n $new = [$new];\n this.updateState({\n props: {\n dataset: $new\n }\n } as WmSearchState);\n }\n break;\n }\n super.onPropertyChange(name, $new, $old);\n }\n\n renderWidget(props: WmSearchProps) {\n const result = this.state.data;\n return (\n <View>\n {this.renderSearchBar()}\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions((\n <ScrollView style={{width: '100%', maxHeight: 200}} contentContainerStyle={this.styles.dropDownContent}>\n <AssetProvider value={this.loadAsset}>\n {result && result.map((item: any, index: any) => (\n <View key={item.key}>\n {\n (!props.limit) || (props.limit && index+1 <= props.limit) ?\n this.renderSearchItem(item, index)\n : null\n }\n {\n index === result.length - 1 ?\n <WmAnchor caption={props.datacompletemsg} styles={this.styles.dataCompleteItem}></WmAnchor> : null\n }\n </View>\n ))}\n </AssetProvider>\n </ScrollView>\n ), this.styles, modalService));\n return null;\n }}\n </ModalConsumer>) : null}\n </View>\n\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,EAAEC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AACpF,SAASC,IAAI,EAAEC,MAAM,QAAQ,QAAQ;AAErC,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SAASC,aAAa,QAAmC,8CAA8C;AACvG,SAASC,YAAY,QAAQ,uEAAuE;AACpG,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,OAAOC,SAAS,MAAM,sEAAsE;AAC5F,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,SAASC,GAAG,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,WAAW;AAC3D,SAASC,aAAa,QAAQ,+CAA+C;AAE7E,OAAO,MAAMC,aAAa,SAASV,gBAAgB,CAAgB;EAAAW,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,mBAC7C,KAAK;IAAAA,eAAA,uBACV,CAAC,CAAC;IAAAA,eAAA,mBACN;MACTC,GAAG,EAAE,CAAC;MACNC,IAAI,EAAE;IACR,CAAC;IAAAF,eAAA,eACW,EAAE;EAAA;AAChB;AASA,eAAe,MAAMG,QAAQ,SAASjB,oBAAoB,CAA+C;EAYvGY,WAAWA,CAACM,KAAoB,EAAE;IAAA,IAAAC,KAAA;IAChC,KAAK,CA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CAACyK,eAAgB;QAAC3F,MAAM,EAAE,IAAI,CAACA,MAAM,CAAC4F;MAAiB,CAAW,CAAC,GAAG,IAE5F,CACP,CACc,CACP,CAAC,EACZ,IAAI,CAAC5F,MAAM,EAAEC,YAAY,CAAC,CAAC;MAC9B,OAAO,IAAI;IACb,CACa,CAAC,GAAI,IAClB,CAAC;EAGX;AACF"}
|
@@ -24,6 +24,9 @@ export default class WmSearchProps extends BaseDatasetProps {
|
|
24
24
|
// internal property
|
25
25
|
_defineProperty(this, "invokeEvent", void 0);
|
26
26
|
_defineProperty(this, "formFieldInstance", void 0);
|
27
|
+
_defineProperty(this, "accessibilitylabel", undefined);
|
28
|
+
_defineProperty(this, "hint", undefined);
|
29
|
+
_defineProperty(this, "accessibilityrole", 'search');
|
27
30
|
}
|
28
31
|
}
|
29
32
|
//# sourceMappingURL=search.props.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseDatasetProps","WmSearchProps","constructor","arguments","_defineProperty"],"sources":["search.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\nimport {BaseComponent} from \"@wavemaker/app-rn-runtime/core/base.component\";\n\nexport default class WmSearchProps extends BaseDatasetProps {\n autofocus: boolean = false;\n query?: string = '';\n searchkey?: any;\n type: 'search' | 'autocomplete' = 'search';\n datacompletemsg?: string = 'No more data to load';\n placeholder?: string = 'Search';\n limit?: number = null as any;\n minchars?: number = null as any;\n imagewidth?: any = 32;\n imageheight?: any = 32;\n searchon?: string = 'typing';\n onSubmit?: any;\n onChange?: Function = null as any;\n result?: any;\n showclear: boolean = false;\n showSearchIcon: boolean = true; // internal property\n invokeEvent?: Function;\n formFieldInstance?: BaseComponent<any, any, any>;\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;
|
1
|
+
{"version":3,"names":["BaseDatasetProps","WmSearchProps","constructor","arguments","_defineProperty","undefined"],"sources":["search.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\nimport {BaseComponent} from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport { AccessibilityRole } from 'react-native';\n\nexport default class WmSearchProps extends BaseDatasetProps {\n autofocus: boolean = false;\n query?: string = '';\n searchkey?: any;\n type: 'search' | 'autocomplete' = 'search';\n datacompletemsg?: string = 'No more data to load';\n placeholder?: string = 'Search';\n limit?: number = null as any;\n minchars?: number = null as any;\n imagewidth?: any = 32;\n imageheight?: any = 32;\n searchon?: string = 'typing';\n onSubmit?: any;\n onChange?: Function = null as any;\n result?: any;\n showclear: boolean = false;\n showSearchIcon: boolean = true; // internal property\n invokeEvent?: Function;\n formFieldInstance?: BaseComponent<any, any, any>;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'search';\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAIvG,eAAe,MAAMC,aAAa,SAASD,gBAAgB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBACrC,KAAK;IAAAA,eAAA,gBACT,EAAE;IAAAA,eAAA;IAAAA,eAAA,eAEe,QAAQ;IAAAA,eAAA,0BACf,sBAAsB;IAAAA,eAAA,sBAC1B,QAAQ;IAAAA,eAAA,gBACd,IAAI;IAAAA,eAAA,mBACD,IAAI;IAAAA,eAAA,qBACL,EAAE;IAAAA,eAAA,sBACD,EAAE;IAAAA,eAAA,mBACF,QAAQ;IAAAA,eAAA;IAAAA,eAAA,mBAEN,IAAI;IAAAA,eAAA;IAAAA,eAAA,oBAEL,KAAK;IAAAA,eAAA,yBACA,IAAI;IAAE;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,6BAGFC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,QAAQ;EAAA;AAClD"}
|
@@ -5,7 +5,8 @@ export const DEFAULT_CLASS = 'app-search';
|
|
5
5
|
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
6
6
|
const defaultStyles = defineStyles({
|
7
7
|
root: {
|
8
|
-
flexDirection: 'row'
|
8
|
+
flexDirection: 'row',
|
9
|
+
borderRadius: 28
|
9
10
|
},
|
10
11
|
text: {
|
11
12
|
minHeight: 56,
|
@@ -19,7 +20,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
19
20
|
borderTopLeftRadius: 28,
|
20
21
|
borderBottomLeftRadius: 28,
|
21
22
|
borderColor: themeVariables.searchBorderColor,
|
22
|
-
backgroundColor: themeVariables.
|
23
|
+
backgroundColor: themeVariables.searchBgContainerColor
|
23
24
|
},
|
24
25
|
invalid: {
|
25
26
|
borderBottomColor: themeVariables.inputInvalidBorderColor
|
@@ -32,10 +33,9 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
32
33
|
height: '100%'
|
33
34
|
},
|
34
35
|
modalContent: {
|
35
|
-
backgroundColor: themeVariables.
|
36
|
+
backgroundColor: themeVariables.searchBgContainerColor,
|
36
37
|
borderRadius: 6,
|
37
38
|
position: 'absolute',
|
38
|
-
borderWidth: 1,
|
39
39
|
borderStyle: 'solid',
|
40
40
|
borderColor: themeVariables.searchBorderColor,
|
41
41
|
width: '90%'
|
@@ -68,7 +68,8 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
68
68
|
borderTopRightRadius: 28,
|
69
69
|
borderBottomRightRadius: 28,
|
70
70
|
backgroundColor: themeVariables.searchButtonColor,
|
71
|
-
height: 56
|
71
|
+
height: 56,
|
72
|
+
rippleColor: themeVariables.rippleColor
|
72
73
|
},
|
73
74
|
icon: {
|
74
75
|
icon: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Platform","BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","text","minHeight","paddingTop","paddingBottom","paddingLeft","paddingRight","width","borderWidth","borderRightWidth","borderTopLeftRadius","borderBottomLeftRadius","borderColor","searchBorderColor","backgroundColor","searchDropdownBackgroundColor","invalid","borderBottomColor","inputInvalidBorderColor","focusedText","modal","transparent","height","modalContent","borderRadius","position","borderStyle","dropDownContent","searchInputWrapper","alignItems","justifyContent","flex","clearButton","marginLeft","padding","alignSelf","searchButton","borderTopRightRadius","borderBottomRightRadius","searchButtonColor","icon","fontSize","color","searchButtonTextColor","marginRight","searchItem","marginBottom","paddingHorizontal","paddingVertical","searchItemBorderColor","searchItemTextColor","searchItemText","fontFamily","baseFont","dataCompleteItem","searchDataCompleteItemBgColor","textDecorationLine","placeholderText","inputPlaceholderColor","inputDisabledBgColor","OS","textAlign","borderLeftWidth","left"],"sources":["search.styles.ts"],"sourcesContent":["import { Platform, TextStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\n\nexport type WmSearchStyles = BaseStyles & {\n focusedText: TextStyle,\n modal: AllStyle;\n modalContent: AllStyle;\n searchItem: AllStyle;\n dropDownContent: AllStyle;\n searchItemText: AllStyle;\n clearButton: WmButtonStyles;\n searchButton: WmButtonStyles;\n searchInputWrapper: AllStyle;\n placeholderText: AllStyle;\n invalid: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-search';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSearchStyles = defineStyles({\n root: {\n flexDirection: 'row'\n },\n text: {\n minHeight: 56,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 24,\n paddingRight: 14,\n width: '100%',\n borderWidth: 1,\n borderRightWidth: 0,\n borderTopLeftRadius: 28,\n borderBottomLeftRadius: 28,\n borderColor: themeVariables.searchBorderColor,\n backgroundColor: themeVariables.searchDropdownBackgroundColor,\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n focusedText : {\n borderBottomLeftRadius: 28,\n },\n modal: {\n backgroundColor: themeVariables.transparent,\n height: '100%'\n },\n modalContent: {\n backgroundColor: themeVariables.searchDropdownBackgroundColor,\n borderRadius: 6,\n position: 'absolute',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.searchBorderColor,\n width: '90%'\n },\n dropDownContent: {\n width: '100%'\n },\n searchInputWrapper: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n flex: 1\n },\n clearButton: {\n root: {\n marginLeft: -40,\n padding: 0,\n width: 36,\n alignItems: 'center',\n alignSelf: 'center',\n justifyContent: 'center',\n backgroundColor: 'transparent'\n }\n } as WmButtonStyles,\n searchButton: {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 0,\n borderTopRightRadius: 28,\n borderBottomRightRadius: 28,\n backgroundColor: themeVariables.searchButtonColor,\n height: 56\n },\n icon: {\n icon: {\n fontSize: 24,\n color: themeVariables.searchButtonTextColor,\n marginRight: 4\n }\n }\n } as WmButtonStyles,\n searchItem: {\n width: '100%',\n marginBottom: 4,\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderBottomColor: themeVariables.searchItemBorderColor,\n flexDirection: 'row',\n alignItems: 'center',\n color: themeVariables.searchItemTextColor\n },\n searchItemText: {\n fontSize: 16,\n paddingLeft: 8,\n fontFamily: themeVariables.baseFont\n },\n dataCompleteItem: {\n root: {\n backgroundColor: themeVariables.searchDataCompleteItemBgColor,\n justifyContent: 'center',\n padding: 8\n },\n text: {\n fontSize: 12,\n textDecorationLine: 'none',\n color: themeVariables.searchItemTextColor\n }\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n text : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS=='android'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderLeftWidth: 0,\n borderRightWidth: 1,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n },\n }\n }:Platform.OS=='web'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderRightWidth: 1,\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderTopLeftRadius: 4,\n borderBottomLeftRadius: 4,\n },\n },\n clearButton: {\n root: {\n left: 0,\n position: 'absolute',\n marginLeft: 0\n }\n } as WmButtonStyles,\n }:{\n text : {\n textAlign: 'right',\n }\n });\n\n addStyle('app-autocomplete', '', {\n text: {\n borderRightWidth: 1,\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n }\n } as WmSearchStyles);\n});\n"],"mappings":"AAAA,SAASA,QAAQ,QAAmB,cAAc;AAClD,OAAOC,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAiBxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGL,YAAY,CAAC;IAC/CM,IAAI,EAAE;MACJC,aAAa,EAAE;IACjB,CAAC;IACDC,IAAI,EAAE;MACJC,SAAS,EAAE,EAAE;MACbC,UAAU,EAAE,CAAC;MACbC,aAAa,EAAE,CAAC;MAChBC,WAAW,EAAE,EAAE;MACfC,YAAY,EAAE,EAAE;MAChBC,KAAK,EAAE,MAAM;MACbC,WAAW,EAAE,CAAC;MACdC,gBAAgB,EAAE,CAAC;MACnBC,mBAAmB,EAAE,EAAE;MACvBC,sBAAsB,EAAE,EAAE;MAC1BC,WAAW,EAAEhB,cAAc,CAACiB,iBAA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BAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B,CAAC;IACDF,YAAY,EAAE;MACZrC,IAAI,EAAE;QACJsC,oBAAoB,EAAE,CAAC;QACvBC,uBAAuB,EAAE;MAC3B;IACF;EACF,CAAC,GAAC/C,QAAQ,CAACqE,EAAE,IAAE,KAAK,GAAC;IACnB3D,IAAI,EAAG;MACL4D,SAAS,EAAE,OAAO;MAClBrD,WAAW,EAAE,CAAC;MACdC,gBAAgB,EAAE,CAAC;MACnBqD,eAAe,EAAE,CAAC;MAClBpD,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzB0B,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B,CAAC;IACDF,YAAY,EAAE;MACZrC,IAAI,EAAE;QACJsC,oBAAoB,EAAE,CAAC;QACvBC,uBAAuB,EAAE,CAAC;QAC1B5B,mBAAmB,EAAE,CAAC;QACtBC,sBAAsB,EAAE;MAC1B;IACF,CAAC;IACDqB,WAAW,EAAE;MACXjC,IAAI,EAAE;QACJgE,IAAI,EAAE,CAAC;QACPtC,QAAQ,EAAE,UAAU;QACpBQ,UAAU,EAAE;MACd;IACF;EACF,CAAC,GAAC;IACAhC,IAAI,EAAG;MACL4D,SAAS,EAAE;IACb;EACF,CAAC,CAAC;EAEFhE,QAAQ,CAAC,kBAAkB,EAAE,EAAE,EAAE;IAC/BI,IAAI,EAAE;MACJQ,gBAAgB,EAAE,CAAC;MACnB4B,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B;EACF,CAAmB,CAAC;AACtB,CAAC,CAAC"}
|
1
|
+
{"version":3,"names":["Platform","BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","borderRadius","text","minHeight","paddingTop","paddingBottom","paddingLeft","paddingRight","width","borderWidth","borderRightWidth","borderTopLeftRadius","borderBottomLeftRadius","borderColor","searchBorderColor","backgroundColor","searchBgContainerColor","invalid","borderBottomColor","inputInvalidBorderColor","focusedText","modal","transparent","height","modalContent","position","borderStyle","dropDownContent","searchInputWrapper","alignItems","justifyContent","flex","clearButton","marginLeft","padding","alignSelf","searchButton","borderTopRightRadius","borderBottomRightRadius","searchButtonColor","rippleColor","icon","fontSize","color","searchButtonTextColor","marginRight","searchItem","marginBottom","paddingHorizontal","paddingVertical","searchItemBorderColor","searchItemTextColor","searchItemText","fontFamily","baseFont","dataCompleteItem","searchDataCompleteItemBgColor","textDecorationLine","placeholderText","inputPlaceholderColor","inputDisabledBgColor","OS","textAlign","borderLeftWidth","left"],"sources":["search.styles.ts"],"sourcesContent":["import { Platform, TextStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\n\nexport type WmSearchStyles = BaseStyles & {\n focusedText: TextStyle,\n modal: AllStyle;\n modalContent: AllStyle;\n searchItem: AllStyle;\n dropDownContent: AllStyle;\n searchItemText: AllStyle;\n clearButton: WmButtonStyles;\n searchButton: WmButtonStyles;\n searchInputWrapper: AllStyle;\n placeholderText: AllStyle;\n invalid: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-search';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSearchStyles = defineStyles({\n root: {\n flexDirection: 'row',\n borderRadius: 28,\n },\n text: {\n minHeight: 56,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 24,\n paddingRight: 14,\n width: '100%',\n borderWidth: 1,\n borderRightWidth: 0,\n borderTopLeftRadius: 28,\n borderBottomLeftRadius: 28,\n borderColor: themeVariables.searchBorderColor,\n backgroundColor: themeVariables.searchBgContainerColor,\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor,\n },\n focusedText : {\n borderBottomLeftRadius: 28,\n },\n modal: {\n backgroundColor: themeVariables.transparent,\n height: '100%'\n },\n modalContent: {\n backgroundColor: themeVariables.searchBgContainerColor,\n borderRadius: 6,\n position: 'absolute',\n borderStyle: 'solid',\n borderColor: themeVariables.searchBorderColor,\n width: '90%'\n },\n dropDownContent: {\n width: '100%'\n },\n searchInputWrapper: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n flex: 1\n },\n clearButton: {\n root: {\n marginLeft: -40,\n padding: 0,\n width: 36,\n alignItems: 'center',\n alignSelf: 'center',\n justifyContent: 'center',\n backgroundColor: 'transparent'\n }\n } as WmButtonStyles,\n searchButton: {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 0,\n borderTopRightRadius: 28,\n borderBottomRightRadius: 28,\n backgroundColor: themeVariables.searchButtonColor,\n height: 56,\n rippleColor: themeVariables.rippleColor\n },\n icon: {\n icon: {\n fontSize: 24,\n color: themeVariables.searchButtonTextColor,\n marginRight: 4\n }\n }\n } as WmButtonStyles,\n searchItem: {\n width: '100%',\n marginBottom: 4,\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderBottomColor: themeVariables.searchItemBorderColor,\n flexDirection: 'row',\n alignItems: 'center',\n color: themeVariables.searchItemTextColor\n },\n searchItemText: {\n fontSize: 16,\n paddingLeft: 8,\n fontFamily: themeVariables.baseFont\n },\n dataCompleteItem: {\n root: {\n backgroundColor: themeVariables.searchDataCompleteItemBgColor,\n justifyContent: 'center',\n padding: 8\n },\n text: {\n fontSize: 12,\n textDecorationLine: 'none',\n color: themeVariables.searchItemTextColor\n }\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n text : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS=='android'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderLeftWidth: 0,\n borderRightWidth: 1,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n },\n }\n }:Platform.OS=='web'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderRightWidth: 1,\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderTopLeftRadius: 4,\n borderBottomLeftRadius: 4,\n },\n },\n clearButton: {\n root: {\n left: 0,\n position: 'absolute',\n marginLeft: 0\n }\n } as WmButtonStyles,\n }:{\n text : {\n textAlign: 'right',\n }\n });\n\n addStyle('app-autocomplete', '', {\n text: {\n borderRightWidth: 1,\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n }\n } as WmSearchStyles);\n});\n"],"mappings":"AAAA,SAASA,QAAQ,QAAmB,cAAc;AAClD,OAAOC,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAiBxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGL,YAAY,CAAC;IAC/CM,IAAI,EAAE;MACJC,aAAa,EAAE,KAAK;MACpBC,YAAY,EAAE;IAChB,CAAC;IACDC,IAAI,EAAE;MACJC,SAAS,EAAE,EAAE;MACbC,UAAU,EAAE,CAAC;MACbC,aAAa,EAAE,CAAC;MAChBC,WAAW,EAAE,EAAE;MACfC,YAAY,EAAE,EAAE;MAChBC,KAAK,EAAE,MAAM;MACbC,WAAW,EAAE,CAAC;MACdC,gBAAgB,EAAE,CAAC;MACnBC,mBAAmB,EAAE,EAAE;MACvBC,sBAAsB,EAAE,EAAE;MAC1BC,WAAW,EAAEjB,cAAc,CAACkB,iBAAiB;MAC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