@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","Animated","Easing","Text","FontAwesome","BaseComponent","BaseComponentState","WmIconProps","DEFAULT_CLASS","WavIcon","StreamlineLightIcon","StreamlineRegularIcon","Tappable","Animatedview","createSkeleton","ICON_SIZES","Map","ICON_ROTATTION","WmIconState","constructor","arguments","_defineProperty","WmIcon","props","Value","getIconDef","iconClass","iconDef","rotate","splits","split","isFontAwesome","find","v","isStreamlineLightIcon","isStreamlineRegularIcon","_splits$find","type","startsWith","substring","_splits$find2","_splits$find3","_splits$find4","isWavIcon","indexOf","animation","size","map","get","spin","stopAnimation","spinValue","setValue","timing","toValue","duration","easing","linear","useNativeDriver","start","componentDidMount","componentWillUnmount","onPropertyChange","name","$new","$old","updateState","getCustomIcon","style","_this$theme$getStyle","customIcon","theme","mergeStyle","getStyle","iconclass","icon","styles","customIconContent","content","createElement","fontFamily","decodeURIComponent","renderSkeleton","skeleton","root","width","skeletonwidth","iconsize","height","skeletonheight","renderIcon","state","color","text","transform","iconSize","fontSize","show","_this$styles$icon","WMCustomIcon","interpolate","inputRange","outputRange","View","opacity","renderWidget","iterationCount","iterationcount","parseInt","undefined","_extends","target","getTestPropsForAction","entryanimation","_background","iconposition","caption","getTestPropsForLabel"],"sources":["icon.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Animated, DimensionValue, Easing, Text } from 'react-native';\nimport { FontAwesome } from '@expo/vector-icons';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmIconProps from './icon.props';\nimport { DEFAULT_CLASS, WmIconStyles } from './icon.styles';\nimport WavIcon from './wavicon/wavicon.component';\nimport StreamlineLightIcon from './streamline-light-icon/streamline-light-icon.component';\nimport StreamlineRegularIcon from './streamline-regular-icon/streamline-regular-icon.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\n\ninterface IconDef {\n isFontAwesome: boolean;\n isWavIcon: boolean;\n isStreamlineLightIcon: boolean;\n isStreamlineRegularIcon: boolean;\n type: string;\n rotate: string;\n size: number;\n animation: string;\n}\n\nconst ICON_SIZES = new Map([\n ['fa-lg', 24],\n ['fa-2x', 36],\n ['fa-3x', 48],\n ['fa-4x', 60],\n ['fa-5x', 72]\n]);\n\nconst ICON_ROTATTION = new Map([\n ['fa-rotate-90', '90deg'],\n ['fa-rotate-180', '180deg'],\n ['fa-rotate-270', '270deg']\n]);\n\nexport class WmIconState extends BaseComponentState<WmIconProps> {\n public iconDef = {} as IconDef;\n}\n\nexport default class WmIcon extends BaseComponent<WmIconProps, WmIconState, WmIconStyles> {\n spinValue = new Animated.Value(0);\n pulseValue = new Animated.Value(0);\n public stopAnimation = true; \n\n constructor(props: WmIconProps) {\n super(props, DEFAULT_CLASS, new WmIconProps());\n }\n\n getIconDef(iconClass: string): IconDef {\n const iconDef = {\n rotate: '0'\n } as IconDef;\n const splits = iconClass.split(' ');\n iconDef.isFontAwesome = !!splits.find(v => v === 'fa');\n iconDef.isStreamlineLightIcon = !!splits.find(v => v === 'wm-sl-l');\n iconDef.isStreamlineRegularIcon = !!splits.find(v => v === 'wm-sl-r');\n if (iconDef.isFontAwesome) {\n iconDef.type = splits.find(v => v.startsWith('fa-'))?.substring(3) || '';\n } else if (iconDef.isStreamlineLightIcon) {\n iconDef.type = splits.find(v => v.startsWith('sl-'))?.substring(3) || '';\n } else if (iconDef.isStreamlineRegularIcon) {\n iconDef.type = splits.find(v => v.startsWith('sl-'))?.substring(3) || '';\n } else {\n iconDef.isWavIcon = !iconDef.isFontAwesome && !!splits.find(v => v === 'wi');\n iconDef.type = (iconDef.isWavIcon && splits.find(v => v.startsWith('wi-'))?.substring(3)) || '';\n }\n if (iconClass.indexOf('fa-spin') >= 0) {\n iconDef.animation = 'spin';\n } else if (iconClass.indexOf('fa-pulse') >= 0) {\n iconDef.animation = 'pulse';\n }\n iconDef.size = splits.map(v => ICON_SIZES.get(v)).find(v => !!v) || 12;\n iconDef.rotate = splits.map(v => ICON_ROTATTION.get(v)).find(v => !!v) || '0deg';\n return iconDef;\n }\n\n private spin () {\n if (this.stopAnimation) {\n return;\n }\n this.spinValue.setValue(0);\n Animated.timing(\n this.spinValue,\n {\n toValue: 1,\n duration: 1000,\n easing: Easing.linear,\n useNativeDriver: true\n }\n ).start(() => this.spin());\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.spin();\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.stopAnimation = true;\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'iconclass':\n $new && this.updateState({iconDef: this.getIconDef($new)} as WmIconState);\n break;\n }\n }\n\n private getCustomIcon(props: WmIconProps, style: any) {\n const customIcon = this.theme.mergeStyle({}, this.theme.getStyle(props?.iconclass || '')?.icon || this.styles.icon);\n const customIconContent = customIcon?.content;\n if (customIconContent) {\n delete customIcon.content;\n return (<Text\n style={[style, customIcon.fontFamily ? {fontFamily: customIcon.fontFamily}: null]}>\n {decodeURIComponent(customIconContent)}\n </Text>);\n }\n return null;\n }\n\n public renderSkeleton(props: WmIconProps) {\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: (this.props.skeletonwidth || this.props.iconsize || this.styles.root.width) as DimensionValue,\n height: (this.props.skeletonheight || this.props.iconsize || this.styles.root.height) as DimensionValue\n });\n }\n\n renderIcon(props: WmIconProps) {\n const iconDef = this.state.iconDef;\n if (!iconDef) {\n return null;\n }\n let icon = null;\n const style = [{\n color: this.styles.root.color || this.styles.text.color\n }, this.styles.icon, {transform: [{rotate: iconDef.rotate}]}];\n const customIcon = this.getCustomIcon(props, style);\n const iconSize = props.iconsize || this.styles.root.fontSize || this.styles.text.fontSize || iconDef.size;\n if (props.show && iconDef && iconDef.isFontAwesome) {\n //@ts-ignore type information is not matching\n icon = (<FontAwesome name={customIcon ? '' : iconDef.type}\n style={style}\n size={iconSize}>\n {customIcon}\n </FontAwesome>);\n } else if (props.show && iconDef) {\n let WMCustomIcon = WavIcon as unknown;\n if (iconDef.isStreamlineLightIcon) {\n WMCustomIcon = StreamlineLightIcon;\n } else if (iconDef.isStreamlineRegularIcon) {\n WMCustomIcon = StreamlineRegularIcon;\n } else if (!iconDef.isWavIcon && !customIcon && !this.styles.icon?.fontFamily) {\n return null;\n }\n //@ts-ignore type information is not matching\n icon = WMCustomIcon ? (<WMCustomIcon name={customIcon ? '' : iconDef.type}\n style={style}\n size={iconSize}>\n {customIcon}\n </WMCustomIcon>) : null;\n }\n if (icon && iconDef.animation === 'spin') {\n const rotate = this.spinValue.interpolate({ inputRange: [0, 1], outputRange: ['0deg', '360deg']});\n const animation = { transform: [{ rotate }] };\n this.stopAnimation = false;\n return (<Animated.View style={animation}>{icon}</Animated.View>);\n } else if (icon && iconDef.animation === 'pulse') {\n const opacity = this.spinValue.interpolate({ inputRange: [0, 1], outputRange: [0, 1]});\n const animation = { opacity: opacity };\n this.stopAnimation = false;\n return (<Animated.View style={animation}>{icon}</Animated.View>);\n } else {\n this.stopAnimation = true;\n }\n return icon;\n }\n\n renderWidget(props: WmIconProps) {\n let icon = this.renderIcon(props);\n let iterationCount: any = props.iterationcount ? (props.iterationcount != 'infinite' ? parseInt(props.iterationcount): 'infinite') : undefined;\n return (\n <Tappable target={this} {...this.getTestPropsForAction()}>\n <Animatedview entryanimation={props.animation} style={this.styles.root} iterationCount={iterationCount}>\n {this._background}\n {(props.iconposition === 'left' && icon) || null}\n {(props.caption && (<Text {...this.getTestPropsForLabel('caption')}style={this.styles.text}>{props.caption}</Text>)) || null}\n {(props.iconposition === 'right' && icon) || null}\n </Animatedview>\n </Tappable>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAkBC,MAAM,EAAEC,IAAI,QAAQ,cAAc;AACrE,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAsB,eAAe;AAC3D,OAAOC,OAAO,MAAM,6BAA6B;AACjD,OAAOC,mBAAmB,MAAM,yDAAyD;AACzF,OAAOC,qBAAqB,MAAM,6DAA6D;AAC/F,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAAqBC,cAAc,QAAQ,gCAAgC;AAa3E,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAAC,CACzB,CAAC,OAAO,EAAE,EAAE,CAAC,EACb,CAAC,OAAO,EAAE,EAAE,CAAC,EACb,CAAC,OAAO,EAAE,EAAE,CAAC,EAC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AACO,oBAAoB,CAAC,SAAS,CAAC;MAACjD,KAAK,EAAE,IAAI,CAACQ,MAAM,CAACiB;IAAK,IAAEtE,KAAK,CAAC6F,OAAc,CAAE,IAAK,IAAI,EAC1H7F,KAAK,CAAC4F,YAAY,KAAK,OAAO,IAAIxC,IAAI,IAAK,IACjC,CACN,CAAC;EAEf;AACF"}
|
1
|
+
{"version":3,"names":["React","Animated","Easing","Text","Image","View","FontAwesome","BaseComponent","BaseComponentState","isFullPathUrl","AccessibilityWidgetType","getAccessibilityProps","WmIconProps","DEFAULT_CLASS","WavIcon","StreamlineLightIcon","StreamlineRegularIcon","Tappable","Animatedview","createSkeleton","ICON_SIZES","Map","ICON_ROTATTION","WmIconState","constructor","arguments","_defineProperty","WmIcon","props","Value","getIconDef","iconClass","iconDef","rotate","splits","split","isFontAwesome","find","v","isStreamlineLightIcon","isStreamlineRegularIcon","_splits$find","type","startsWith","substring","_splits$find2","_splits$find3","_splits$find4","isWavIcon","indexOf","animation","size","map","get","spin","stopAnimation","spinValue","setValue","timing","toValue","duration","easing","linear","useNativeDriver","start","componentDidMount","componentWillUnmount","onPropertyChange","name","$new","$old","updateState","getCustomIcon","style","_this$theme$getStyle","customIcon","theme","mergeStyle","getStyle","iconclass","icon","styles","customIconContent","content","createElement","fontFamily","decodeURIComponent","renderSkeleton","skeleton","root","width","skeletonwidth","iconsize","height","skeletonheight","getElementToShow","iconSrc","iconmargin","iconheight","iconwidth","elementToshow","source","uri","testID","getTestId","margin","loadIcon","iconImage","loadAsset","iconImageSrc","renderIcon","iconJsx","_iconSource","iconurl","state","text","color","transform","iconSize","fontSize","show","_this$styles$icon","WMCustomIcon","interpolate","inputRange","outputRange","opacity","ICON","renderWidget","iterationCount","iterationcount","parseInt","undefined","_extends","target","rippleColor","getTestPropsForAction","entryanimation","_background","iconposition","caption","getTestPropsForLabel"],"sources":["icon.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Animated, DimensionValue, Easing, Text, Image, View } from 'react-native';\nimport { FontAwesome } from '@expo/vector-icons';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils'; \nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nimport WmIconProps from './icon.props';\nimport { DEFAULT_CLASS, WmIconStyles } from './icon.styles';\nimport WavIcon from './wavicon/wavicon.component';\nimport StreamlineLightIcon from './streamline-light-icon/streamline-light-icon.component';\nimport StreamlineRegularIcon from './streamline-regular-icon/streamline-regular-icon.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\n\ninterface IconDef {\n isFontAwesome: boolean;\n isWavIcon: boolean;\n isStreamlineLightIcon: boolean;\n isStreamlineRegularIcon: boolean;\n type: string;\n rotate: string;\n size: number;\n animation: string;\n}\n\nconst ICON_SIZES = new Map([\n ['fa-lg', 24],\n ['fa-2x', 36],\n ['fa-3x', 48],\n ['fa-4x', 60],\n ['fa-5x', 72]\n]);\n\nconst ICON_ROTATTION = new Map([\n ['fa-rotate-90', '90deg'],\n ['fa-rotate-180', '180deg'],\n ['fa-rotate-270', '270deg']\n]);\n\nexport class WmIconState extends BaseComponentState<WmIconProps> {\n public iconDef = {} as IconDef;\n}\n\nexport default class WmIcon extends BaseComponent<WmIconProps, WmIconState, WmIconStyles> {\n spinValue = new Animated.Value(0);\n pulseValue = new Animated.Value(0);\n public stopAnimation = true; \n private _iconSource = null as any;\n\n constructor(props: WmIconProps) {\n super(props, DEFAULT_CLASS, new WmIconProps());\n }\n\n getIconDef(iconClass: string): IconDef {\n const iconDef = {\n rotate: '0'\n } as IconDef;\n const splits = iconClass.split(' ');\n iconDef.isFontAwesome = !!splits.find(v => v === 'fa');\n iconDef.isStreamlineLightIcon = !!splits.find(v => v === 'wm-sl-l');\n iconDef.isStreamlineRegularIcon = !!splits.find(v => v === 'wm-sl-r');\n if (iconDef.isFontAwesome) {\n iconDef.type = splits.find(v => v.startsWith('fa-'))?.substring(3) || '';\n } else if (iconDef.isStreamlineLightIcon) {\n iconDef.type = splits.find(v => v.startsWith('sl-'))?.substring(3) || '';\n } else if (iconDef.isStreamlineRegularIcon) {\n iconDef.type = splits.find(v => v.startsWith('sl-'))?.substring(3) || '';\n } else {\n iconDef.isWavIcon = !iconDef.isFontAwesome && !!splits.find(v => v === 'wi');\n iconDef.type = (iconDef.isWavIcon && splits.find(v => v.startsWith('wi-'))?.substring(3)) || '';\n }\n if (iconClass.indexOf('fa-spin') >= 0) {\n iconDef.animation = 'spin';\n } else if (iconClass.indexOf('fa-pulse') >= 0) {\n iconDef.animation = 'pulse';\n }\n iconDef.size = splits.map(v => ICON_SIZES.get(v)).find(v => !!v) || 12;\n iconDef.rotate = splits.map(v => ICON_ROTATTION.get(v)).find(v => !!v) || '0deg';\n return iconDef;\n }\n\n private spin () {\n if (this.stopAnimation) {\n return;\n }\n this.spinValue.setValue(0);\n Animated.timing(\n this.spinValue,\n {\n toValue: 1,\n duration: 1000,\n easing: Easing.linear,\n useNativeDriver: true\n }\n ).start(() => this.spin());\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.spin();\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.stopAnimation = true;\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'iconclass':\n $new && this.updateState({iconDef: this.getIconDef($new)} as WmIconState);\n break;\n }\n }\n\n private getCustomIcon(props: WmIconProps, style: any) {\n const customIcon = this.theme.mergeStyle({}, this.theme.getStyle(props?.iconclass || '')?.icon || this.styles.icon);\n const customIconContent = customIcon?.content;\n if (customIconContent) {\n delete customIcon.content;\n return (<Text\n style={[style, customIcon.fontFamily ? {fontFamily: customIcon.fontFamily}: null]}>\n {decodeURIComponent(customIconContent)}\n </Text>);\n }\n return null;\n }\n\n public renderSkeleton(props: WmIconProps) {\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: (this.props.skeletonwidth || this.props.iconsize || this.styles.root.width) as DimensionValue,\n height: (this.props.skeletonheight || this.props.iconsize || this.styles.root.height) as DimensionValue\n });\n }\n\n getElementToShow(props: WmIconProps, iconSrc: any) {\n\n const { iconmargin, iconheight, iconwidth } = props;\n let width, height;\n let elementToshow, source;\n\n if (iconwidth) width = iconwidth;\n else if (iconheight) width = iconheight;\n else width = 12;\n if (iconheight) height = iconheight;\n else if (iconwidth) height = iconwidth;\n else height = 12;\n\n if (isFullPathUrl(iconSrc)) {\n source = {\n uri: iconSrc\n };\n } else {\n source = iconSrc;\n }\n elementToshow = <Image testID={this.getTestId('icon')}\n style={{\n margin: iconmargin ?? 0,\n height: height,\n width: width\n }}\n source={source}/>;\n return elementToshow;\n }\n\n loadIcon(iconImage: string | undefined) {\n if (!iconImage || !this.loadAsset) {\n return null;\n }\n const iconImageSrc = this.loadAsset(iconImage);\n if (iconImageSrc && typeof iconImageSrc !== 'function') {\n return iconImageSrc;\n }\n return null;\n }\n\n renderIcon(props: WmIconProps) {\n let iconJsx = null;\n this._iconSource = this._iconSource || this.loadIcon(props.iconurl);\n const iconSrc: any = this._iconSource \n if (iconSrc) {\n return this.getElementToShow(props, iconSrc);\n }\n const iconDef = this.state.iconDef;\n if (!iconDef) {\n return null;\n }\n const { root, text, icon } = this.styles;\n const style = [{ color: root.color || text.color },\n icon,\n { transform: [{ rotate: iconDef.rotate }] }];\n\n const customIcon = this.getCustomIcon(props, style);\n const iconSize = props.iconsize || this.styles.root.fontSize || this.styles.text.fontSize || iconDef.size;\n if (props.show && iconDef && iconDef.isFontAwesome) {\n //@ts-ignore type information is not matching\n iconJsx = (<FontAwesome name={customIcon ? '' : iconDef.type}\n style={style}\n size={iconSize}>\n {customIcon}\n </FontAwesome>);\n } else if (props.show && iconDef) {\n let WMCustomIcon = WavIcon as unknown;\n if (iconDef.isStreamlineLightIcon) {\n WMCustomIcon = StreamlineLightIcon;\n } else if (iconDef.isStreamlineRegularIcon) {\n WMCustomIcon = StreamlineRegularIcon;\n } else if (!iconDef.isWavIcon && !customIcon && !this.styles.icon?.fontFamily) {\n return null;\n }\n //@ts-ignore type information is not matching\n iconJsx = WMCustomIcon ? (<WMCustomIcon name={customIcon ? '' : iconDef.type}\n style={style}\n size={iconSize}>\n {customIcon}\n </WMCustomIcon>) : null;\n }\n if (iconJsx && iconDef.animation === 'spin') {\n const rotate = this.spinValue.interpolate({ inputRange: [0, 1], outputRange: ['0deg', '360deg']});\n const animation = { transform: [{ rotate }] };\n this.stopAnimation = false;\n return (<Animated.View style={animation}>{iconJsx}</Animated.View>);\n } else if (iconJsx && iconDef.animation === 'pulse') {\n const opacity = this.spinValue.interpolate({ inputRange: [0, 1], outputRange: [0, 1]});\n const animation = { opacity: opacity };\n this.stopAnimation = false;\n return (<Animated.View style={animation}>{iconJsx}</Animated.View>);\n } else {\n this.stopAnimation = true;\n }\n return (\n <View\n {...getAccessibilityProps(AccessibilityWidgetType.ICON, this.props)}\n >\n {iconJsx}\n </View>\n );\n }\n\n renderWidget(props: WmIconProps) {\n let icon = this.renderIcon(props);\n let iterationCount: any = props.iterationcount ? (props.iterationcount != 'infinite' ? parseInt(props.iterationcount): 'infinite') : undefined;\n return (\n <Tappable target={this} rippleColor = {this.styles.root.rippleColor} {...this.getTestPropsForAction()}> \n <Animatedview entryanimation={props.animation} style={this.styles.root} iterationCount={iterationCount}>\n {this._background}\n {(props.iconposition === 'left' && icon) || null}\n {(props.caption && (<Text {...this.getTestPropsForLabel('caption')}style={this.styles.text}>{props.caption}</Text>)) || null}\n {(props.iconposition === 'right' && icon) || null}\n </Animatedview>\n </Tappable>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAkBC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAEC,IAAI,Q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jC,CACN,CAAC;EAEf;AACF"}
|
@@ -14,6 +14,13 @@ export default class WmIconProps extends BaseProps {
|
|
14
14
|
_defineProperty(this, "onTap", void 0);
|
15
15
|
_defineProperty(this, "skeletonheight", null);
|
16
16
|
_defineProperty(this, "skeletonwidth", null);
|
17
|
+
_defineProperty(this, "iconurl", null);
|
18
|
+
_defineProperty(this, "iconheight", null);
|
19
|
+
_defineProperty(this, "iconwidth", null);
|
20
|
+
_defineProperty(this, "iconmargin", null);
|
21
|
+
_defineProperty(this, "accessibilitylabel", undefined);
|
22
|
+
_defineProperty(this, "hint", undefined);
|
23
|
+
_defineProperty(this, "accessibilityrole", 'none');
|
17
24
|
}
|
18
25
|
}
|
19
26
|
//# sourceMappingURL=icon.props.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseProps","WmIconProps","constructor","arguments","_defineProperty"],"sources":["icon.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\
|
1
|
+
{"version":3,"names":["BaseProps","WmIconProps","constructor","arguments","_defineProperty","undefined"],"sources":["icon.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { AccessibilityRole } from 'react-native';\nexport default class WmIconProps extends BaseProps {\n animation?: string = null as any;\n iterationcount?: any;\n iconclass?: string = 'wm-sl-l sl-user';\n iconposition? = 'left';\n caption? = '';\n iconsize? = 0;\n onTap?: Function;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n iconurl?: string = null as any;\n iconheight?: number = null as any;\n iconwidth?: number = null as any;\n iconmargin?: number = null as any;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'none';\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,WAAW,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBAC5B,IAAI;IAAAA,eAAA;IAAAA,eAAA,oBAEJ,iBAAiB;IAAAA,eAAA,uBACtB,MAAM;IAAAA,eAAA,kBACX,EAAE;IAAAA,eAAA,mBACD,CAAC;IAAAA,eAAA;IAAAA,eAAA,yBAEa,IAAI;IAAAA,eAAA,wBACL,IAAI;IAAAA,eAAA,kBACV,IAAI;IAAAA,eAAA,qBACD,IAAI;IAAAA,eAAA,oBACL,IAAI;IAAAA,eAAA,qBACH,IAAI;IAAAA,eAAA,6BACIC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,MAAM;EAAA;AAChD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","alignSelf","alignItems","icon","paddingLeft","text","skeleton","width","height","borderRadius"
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","alignSelf","alignItems","icon","paddingLeft","paddingRight","text","skeleton","width","height","borderRadius"],"sources":["icon.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } 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 WmIconStyles = BaseStyles & {\n icon?: AllStyle,\n skeleton: WmSkeletonStyles\n};\nexport const DEFAULT_CLASS = 'app-icon';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmIconStyles = defineStyles({\n root: {\n flexDirection: 'row',\n alignSelf: 'flex-start',\n alignItems: 'center'\n },\n icon: {\n paddingLeft: 0,\n paddingRight: 8\n },\n text: {\n paddingLeft: 8\n },\n skeleton:{\n root: {\n width: 32,\n height: 32,\n borderRadius: 4\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n text: {\n paddingRight: 8 \n }\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAqB,wCAAwC;AAC9E,SAAqBC,YAAY,QAAQ,+CAA+C;AAOxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC7CM,IAAI,EAAE;MACFC,aAAa,EAAE,KAAK;MACpBC,SAAS,EAAE,YAAY;MACvBC,UAAU,EAAE;IAChB,CAAC;IACDC,IAAI,EAAE;MACFC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE;IAClB,CAAC;IACDC,IAAI,EAAE;MACFF,WAAW,EAAE;IACjB,CAAC;IACDG,QAAQ,EAAC;MACLR,IAAI,EAAE;QACFS,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVC,YAAY,EAAE;MAClB;IACJ;EACJ,CAAC,CAAC;EAEFb,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACjCY,IAAI,EAAE;MACFD,YAAY,EAAE;IAClB;EACJ,CAAC,CAAC;AACN,CAAC,CAAC"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
1
2
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
2
3
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
3
4
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
@@ -5,12 +6,13 @@ import React from 'react';
|
|
5
6
|
import { Text, View } from 'react-native';
|
6
7
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
7
8
|
import { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';
|
9
|
+
import { NavigationServiceConsumer } from '@wavemaker/app-rn-runtime/core/navigation.service';
|
10
|
+
import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
|
8
11
|
import WmLabelProps from './label.props';
|
9
12
|
import { DEFAULT_CLASS } from './label.styles';
|
10
13
|
import { isNil, toString } from 'lodash-es';
|
11
14
|
import { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';
|
12
15
|
import { createSkeleton } from '../skeleton/skeleton.component';
|
13
|
-
import WmAnchor from '../anchor/anchor.component';
|
14
16
|
export class WmLabelState extends BaseComponentState {
|
15
17
|
constructor() {
|
16
18
|
super(...arguments);
|
@@ -53,6 +55,7 @@ export default class WmLabel extends BaseComponent {
|
|
53
55
|
return [];
|
54
56
|
}
|
55
57
|
caption += '';
|
58
|
+
caption = caption.replace(/\(\s*\)/, '(#/__EMPTY__)');
|
56
59
|
const pattern = /\[([^\]]+)\]\(([^)]*)\)/g;
|
57
60
|
const linkRegex = /^(((http|https):\/\/)|#)[^ "]+$/;
|
58
61
|
const captionSplit = caption.split(pattern);
|
@@ -60,10 +63,10 @@ export default class WmLabel extends BaseComponent {
|
|
60
63
|
for (let i = 0; i < captionSplit.length; i++) {
|
61
64
|
const isLink = captionSplit[i] === "" || linkRegex.test(captionSplit[i]);
|
62
65
|
let part = {};
|
63
|
-
const isNextTextALink =
|
66
|
+
const isNextTextALink = linkRegex.test(captionSplit[i + 1]);
|
64
67
|
if (isLink) {
|
65
68
|
part.text = captionSplit[i - 1] ?? '';
|
66
|
-
part.link = captionSplit[i];
|
69
|
+
part.link = captionSplit[i] === '#/__EMPTY__' ? '' : captionSplit[i];
|
67
70
|
} else {
|
68
71
|
part.text = isNextTextALink ? "" : captionSplit[i];
|
69
72
|
}
|
@@ -93,34 +96,40 @@ export default class WmLabel extends BaseComponent {
|
|
93
96
|
}
|
94
97
|
}
|
95
98
|
renderWidget(props) {
|
96
|
-
var _this$state$parts;
|
97
99
|
const linkStyles = this.theme.mergeStyle({
|
98
100
|
text: this.styles.text
|
99
101
|
}, this.styles.link);
|
100
102
|
return !isNil(props.caption) ? /*#__PURE__*/React.createElement(Animatedview, {
|
101
103
|
entryanimation: props.animation,
|
102
104
|
style: this.styles.root
|
103
|
-
}, this._background, /*#__PURE__*/React.createElement(
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
105
|
+
}, this._background, /*#__PURE__*/React.createElement(NavigationServiceConsumer, null, navigationService => {
|
106
|
+
var _this$state$parts;
|
107
|
+
return /*#__PURE__*/React.createElement(Tappable, {
|
108
|
+
target: this
|
109
|
+
}, /*#__PURE__*/React.createElement(Text, _extends({
|
110
|
+
style: {
|
111
|
+
flexWrap: "wrap",
|
112
|
+
textAlign: this.styles.text.textAlign
|
113
|
+
}
|
114
|
+
}, this.state.parts.length <= 1 ? this.getTestPropsForLabel('caption') : {}, {
|
115
|
+
numberOfLines: props.nooflines,
|
116
|
+
ellipsizeMode: "tail"
|
117
|
+
}), (_this$state$parts = this.state.parts) === null || _this$state$parts === void 0 ? void 0 : _this$state$parts.map((part, index) => {
|
118
|
+
const isLink = !isNil(part.link);
|
119
|
+
return /*#__PURE__*/React.createElement(Text, _extends({
|
120
|
+
key: `part_${index}`,
|
121
|
+
style: [this.styles.text, isLink ? this.styles.link.text : null, props.isValid ? null : {
|
122
|
+
color: 'red'
|
123
|
+
}]
|
124
|
+
}, this.getTestPropsForLabel(isLink ? `link_${index}` : `caption_${index}`), {
|
125
|
+
selectable: this.styles.text.userSelect === 'text'
|
126
|
+
}, part.link ? {
|
127
|
+
onPress: () => {
|
128
|
+
part.link && navigationService.openUrl(part.link, '_blank');
|
129
|
+
}
|
130
|
+
} : {}, getAccessibilityProps(AccessibilityWidgetType.LABEL, props)), toString(part.text), props.required && this.getAsterisk());
|
131
|
+
})));
|
132
|
+
})) : null;
|
124
133
|
}
|
125
134
|
}
|
126
135
|
//# sourceMappingURL=label.component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","WmLabelProps","DEFAULT_CLASS","isNil","toString","Animatedview","createSkeleton","WmAnchor","WmLabelState","constructor","arguments","_defineProperty","WmLabel","props","getAsterisk","createElement","style","styles","asterisk","onPropertyChange","name","$new","$old","updateState","parts","parseCaption","getMultilineSkeleton","width","height","borderRadius","marginBottom","theme","skeleton","caption","pattern","linkRegex","captionSplit","split","i","length","isLink","test","part","isNextTextALink","text","link","push","renderSkeleton","_this$styles$root","_this$styles$root2","skeletonWidth","skeletonwidth","root","skeletonHeight","skeletonheight","fontSize","multilineskeleton","renderWidget","_this$state$parts","linkStyles","mergeStyle","entryanimation","animation","_background","target","flexWrap","textAlign","numberOfLines","nooflines","ellipsizeMode","state","map","index","Fragment","key","hyperlink","color","isValid","selectable","userSelect","required"],"sources":["label.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\n\nimport WmLabelProps from './label.props';\nimport { DEFAULT_CLASS, WmLabelStyles } from './label.styles';\nimport { isNil, toString } from 'lodash-es';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\nimport WmAnchor from '../anchor/anchor.component';\n\ntype PartType = {\n text?: string,\n link?: string,\n};\n\nexport class WmLabelState extends BaseComponentState<WmLabelProps> {\n parts: PartType[] = []\n}\n\nexport default class WmLabel extends BaseComponent<WmLabelProps, WmLabelState, WmLabelStyles> {\n\n constructor(props: WmLabelProps) {\n super(props, DEFAULT_CLASS, new WmLabelProps(), new WmLabelState());\n }\n\n private getAsterisk () {\n return <Text style={this.styles.asterisk}>*</Text>;\n }\n\n public onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n\n switch(name) {\n case \"caption\":\n this.updateState({\n parts: this.parseCaption($new)\n } as WmLabelState);\n break;\n }\n }\n private getMultilineSkeleton(width: any, height: any) {\n const styles = {\n borderRadius:4,\n marginBottom: 10,\n height: height\n };\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...styles,\n width: width,\n height: height\n });\n }\n\n parseCaption(caption: string) {\n if (!caption) {\n return [];\n }\n caption += '';\n const pattern = /\\[([^\\]]+)\\]\\(([^)]*)\\)/g;\n const linkRegex = /^(((http|https):\\/\\/)|#)[^ \"]+$/;\n const captionSplit = caption.split(pattern);\n\n let parts = [];\n\n for (let i = 0; i < captionSplit.length; i++) {\n const isLink = captionSplit[i] === \"\" || linkRegex.test(captionSplit[i]);\n let part: PartType = {};\n \n const isNextTextALink = captionSplit[i + 1] === \"\" || linkRegex.test(captionSplit[i + 1]) || false;\n if (isLink) {\n part.text = captionSplit[i - 1] ?? '';\n part.link = captionSplit[i];\n } else {\n part.text = isNextTextALink ? \"\" : captionSplit[i];\n };\n\n if (part.text) {\n parts.push(part);\n }\n }\n\n return parts;\n }\n\n public renderSkeleton(props: WmLabelProps){\n const skeletonWidth = this.props.skeletonwidth || this.styles.root?.width;\n const skeletonHeight = this.props.skeletonheight || this.styles.root?.height || this.styles.text.fontSize;\n if(this.props.multilineskeleton) {\n return (<View style={{\n width: skeletonWidth as DimensionValue\n }}>\n {this.getMultilineSkeleton('100%', skeletonHeight)}\n {this.getMultilineSkeleton('70%', skeletonHeight)}\n {this.getMultilineSkeleton('40%', skeletonHeight)}\n </View>)\n }\n else{\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n }); \n }\n }\n\n renderWidget(props: WmLabelProps) {\n const linkStyles = this.theme.mergeStyle({text: this.styles.text}, this.styles.link);\n return !isNil(props.caption) ? (\n <Animatedview entryanimation={props.animation} style={this.styles.root}>\n {this._background}\n <Tappable target={this}>\n <Text style={{flexWrap: \"wrap\", textAlign: this.styles.text.textAlign}} numberOfLines={props.nooflines} ellipsizeMode=\"tail\">\n {this.state.parts?.map((part, index) => (\n <React.Fragment key={`part_${index}`}>\n {!isNil(part.link) ? (\n <WmAnchor styles={linkStyles} caption={part.text} hyperlink={part.link} />\n ) : (\n <Text\n style={[\n this.styles.text,\n {\n color:\n props.isValid === false\n ? 'red'\n : this.styles.text.color,\n },\n ]}\n selectable={this.styles.text.userSelect === 'text'}\n >\n {toString(part.text)}\n {props.required && this.getAsterisk()}\n </Text>\n )}\n </React.Fragment>\n ))}\n </Text>\n </Tappable>\n </Animatedview>\n ) : null;\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,QAAQ,QAAQ,mDAAmD;AAE5E,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,SAASC,KAAK,EAAEC,QAAQ,QAAQ,WAAW;AAC3C,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAAqBC,cAAc,QAAQ,gCAAgC;AAC3E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;MAACgE,MAAM,EAAE;IAAK,gBACrBrE,KAAA,CAAAoB,aAAA,CAACnB,IAAI;MAACoB,KAAK,EAAE;QAACiD,QAAQ,EAAE,MAAM;QAAEC,SAAS,EAAE,IAAI,CAACjD,MAAM,CAAC2B,IAAI,CAACsB;MAAS,CAAE;MAACC,aAAa,EAAEtD,KAAK,CAACuD,SAAU;MAACC,aAAa,EAAC;IAAM,IAAAX,iBAAA,GACzH,IAAI,CAACY,KAAK,CAAC9C,KAAK,cAAAkC,iBAAA,uBAAhBA,iBAAA,CAAkBa,GAAG,CAAC,CAAC7B,IAAI,EAAE8B,KAAK,kBACjC7E,KAAA,CAAAoB,aAAA,CAACpB,KAAK,CAAC8E,QAAQ;MAACC,GAAG,EAAG,QAAOF,KAAM;IAAE,GAClC,CAACrE,KAAK,CAACuC,IAAI,CAACG,IAAI,CAAC,gBAChBlD,KAAA,CAAAoB,aAAA,CAACR,QAAQ;MAACU,MAAM,EAAE0C,UAAW;MAAC1B,OAAO,EAAES,IAAI,CAACE,IAAK;MAAC+B,SAAS,EAAEjC,IAAI,CAACG;IAAK,CAAE,CAAC,gBAE1ElD,KAAA,CAAAoB,aAAA,CAACnB,IAAI;MACHoB,KAAK,EAAE,CACL,IAAI,CAACC,MAAM,CAAC2B,IAAI,EAChB;QACEgC,KAAK,EACH/D,KAAK,CAACgE,OAAO,KAAK,KAAK,GACnB,KAAK,GACL,IAAI,CAAC5D,MAAM,CAAC2B,IAAI,CAACgC;MACzB,CAAC,CACD;MACFE,UAAU,EAAE,IAAI,CAAC7D,MAAM,CAAC2B,IAAI,CAACmC,UAAU,KAAK;IAAO,GAElD3E,QAAQ,CAACsC,IAAI,CAACE,IAAI,CAAC,EACnB/B,KAAK,CAACmE,QAAQ,IAAI,IAAI,CAAClE,WAAW,CAAC,CAChC,CAEM,CACjB,CACG,CACE,CACE,CAAC,GACb,IAAI;EACV;AACF"}
|
1
|
+
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","NavigationServiceConsumer","AccessibilityWidgetType","getAccessibilityProps","WmLabelProps","DEFAULT_CLASS","isNil","toString","Animatedview","createSkeleton","WmLabelState","constructor","arguments","_defineProperty","WmLabel","props","getAsterisk","createElement","style","styles","asterisk","onPropertyChange","name","$new","$old","updateState","parts","parseCaption","getMultilineSkeleton","width","height","borderRadius","marginBottom","theme","skeleton","caption","replace","pattern","linkRegex","captionSplit","split","i","length","isLink","test","part","isNextTextALink","text","link","push","renderSkeleton","_this$styles$root","_this$styles$root2","skeletonWidth","skeletonwidth","root","skeletonHeight","skeletonheight","fontSize","multilineskeleton","renderWidget","linkStyles","mergeStyle","entryanimation","animation","_background","navigationService","_this$state$parts","target","_extends","flexWrap","textAlign","state","getTestPropsForLabel","numberOfLines","nooflines","ellipsizeMode","map","index","key","isValid","color","selectable","userSelect","onPress","openUrl","LABEL","required"],"sources":["label.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport NavigationService, { NavigationServiceConsumer } from '@wavemaker/app-rn-runtime/core/navigation.service';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nimport WmLabelProps from './label.props';\nimport { DEFAULT_CLASS, WmLabelStyles } from './label.styles';\nimport { isNil, toString } from 'lodash-es';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\n\ntype PartType = {\n text?: string,\n link?: string,\n};\n\nexport class WmLabelState extends BaseComponentState<WmLabelProps> {\n parts: PartType[] = []\n}\n\nexport default class WmLabel extends BaseComponent<WmLabelProps, WmLabelState, WmLabelStyles> {\n\n constructor(props: WmLabelProps) {\n super(props, DEFAULT_CLASS, new WmLabelProps(), new WmLabelState());\n }\n\n private getAsterisk () {\n return <Text style={this.styles.asterisk}>*</Text>;\n }\n\n public onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n\n switch(name) {\n case \"caption\":\n this.updateState({\n parts: this.parseCaption($new)\n } as WmLabelState);\n break;\n }\n }\n private getMultilineSkeleton(width: any, height: any) {\n const styles = {\n borderRadius:4,\n marginBottom: 10,\n height: height\n };\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...styles,\n width: width,\n height: height\n });\n }\n\n parseCaption(caption: string) {\n if (!caption) {\n return [];\n }\n caption += '';\n caption = caption.replace(/\\(\\s*\\)/, '(#/__EMPTY__)');\n const pattern = /\\[([^\\]]+)\\]\\(([^)]*)\\)/g;\n const linkRegex = /^(((http|https):\\/\\/)|#)[^ \"]+$/;\n const captionSplit = caption.split(pattern);\n\n let parts = [];\n\n for (let i = 0; i < captionSplit.length; i++) {\n const isLink = captionSplit[i] === \"\" || linkRegex.test(captionSplit[i]);\n let part: PartType = {};\n \n const isNextTextALink = linkRegex.test(captionSplit[i + 1]);\n if (isLink) {\n part.text = captionSplit[i - 1] ?? '';\n part.link = captionSplit[i] === '#/__EMPTY__' ? '' : captionSplit[i];\n } else {\n part.text = isNextTextALink ? \"\" : captionSplit[i];\n };\n\n if (part.text) {\n parts.push(part);\n }\n }\n\n return parts;\n }\n\n public renderSkeleton(props: WmLabelProps){\n const skeletonWidth = this.props.skeletonwidth || this.styles.root?.width;\n const skeletonHeight = this.props.skeletonheight || this.styles.root?.height || this.styles.text.fontSize;\n if(this.props.multilineskeleton) {\n return (<View style={{\n width: skeletonWidth as DimensionValue\n }}>\n {this.getMultilineSkeleton('100%', skeletonHeight)}\n {this.getMultilineSkeleton('70%', skeletonHeight)}\n {this.getMultilineSkeleton('40%', skeletonHeight)}\n </View>)\n }\n else{\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n }); \n }\n }\n\n renderWidget(props: WmLabelProps) {\n const linkStyles = this.theme.mergeStyle({text: this.styles.text}, this.styles.link);\n return !isNil(props.caption) ? (\n <Animatedview entryanimation={props.animation} style={this.styles.root}>\n {this._background}\n <NavigationServiceConsumer>\n {(navigationService: NavigationService) => {\n return (<Tappable target={this}>\n <Text style={{flexWrap: \"wrap\", textAlign: this.styles.text.textAlign}}\n {...this.state.parts.length <= 1 ? this.getTestPropsForLabel('caption') : {}}\n numberOfLines={props.nooflines} ellipsizeMode=\"tail\">\n {this.state.parts?.map((part, index) => {\n const isLink = !isNil(part.link);\n return (\n <Text\n key={`part_${index}`}\n style={[\n this.styles.text,\n isLink ? this.styles.link.text : null,\n props.isValid ? null : { color: 'red'}\n ]}\n {...this.getTestPropsForLabel(isLink ? `link_${index}` : `caption_${index}`)}\n selectable={this.styles.text.userSelect === 'text'}\n {...part.link ? {\n onPress: () => {\n part.link && navigationService.openUrl(part.link, '_blank');\n }\n }: {}}\n {...getAccessibilityProps(AccessibilityWidgetType.LABEL, props)}\n >\n {toString(part.text)}\n {props.required && this.getAsterisk()}\n </Text>\n );\n })}\n </Text>\n </Tappable>)}}\n </NavigationServiceConsumer>\n </Animatedview>\n ) : null;\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAA4BC,yBAAyB,QAAQ,mDAAmD;AAChH,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,SAASC,KAAK,EAAEC,QAAQ,QAAQ,WAAW;AAC3C,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAAqBC,cAAc,QAAQ,gCAAgC;AAO3E,OAAO,MAAMC,YAAY,SAASX,kBAAkB,CAAe;EA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IAAI,CAACG,IAAI,IAAIkB,iBAAiB,CAACmB,OAAO,CAACxC,IAAI,CAACG,IAAI,EAAE,QAAQ,CAAC;UAC7D;QACF,CAAC,GAAE,CAAC,CAAC,EACD7C,qBAAqB,CAACD,uBAAuB,CAACoF,KAAK,EAAEvE,KAAK,CAAC,GAE9DR,QAAQ,CAACsC,IAAI,CAACE,IAAI,CAAC,EACnBhC,KAAK,CAACwE,QAAQ,IAAI,IAAI,CAACvE,WAAW,CAAC,CAChC,CAAC;MAEX,CAAC,CACG,CACE,CAAC;IAAC,CACa,CACf,CAAC,GACb,IAAI;EACV;AACF"}
|
@@ -14,6 +14,10 @@ export default class WmLabelProps extends BaseProps {
|
|
14
14
|
_defineProperty(this, "skeletonheight", null);
|
15
15
|
_defineProperty(this, "skeletonwidth", null);
|
16
16
|
_defineProperty(this, "multilineskeleton", false);
|
17
|
+
_defineProperty(this, "accessibilitylabel", undefined);
|
18
|
+
_defineProperty(this, "hint", undefined);
|
19
|
+
_defineProperty(this, "accessibilityrole", 'text');
|
20
|
+
_defineProperty(this, "onTap", null);
|
17
21
|
}
|
18
22
|
}
|
19
23
|
//# sourceMappingURL=label.props.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseProps","WmLabelProps","constructor","arguments","_defineProperty","undefined"],"sources":["label.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\
|
1
|
+
{"version":3,"names":["BaseProps","WmLabelProps","constructor","arguments","_defineProperty","undefined"],"sources":["label.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { AccessibilityRole } from 'react-native';\nexport default class WmLabelProps extends BaseProps {\n animation?: string = null as any;\n caption?: string = 'Label';\n required?: boolean = null as any;\n isValid?: boolean = true;\n wrap?: boolean = true;\n nooflines?: any = undefined;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n multilineskeleton?: boolean = false;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'text';\n onTap?: Function = null as any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,YAAY,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBAC3B,IAAI;IAAAA,eAAA,kBACN,OAAO;IAAAA,eAAA,mBACL,IAAI;IAAAA,eAAA,kBACL,IAAI;IAAAA,eAAA,eACP,IAAI;IAAAA,eAAA,oBACHC,SAAS;IAAAD,eAAA,yBACD,IAAI;IAAAA,eAAA,wBACL,IAAI;IAAAA,eAAA,4BACC,KAAK;IAAAA,eAAA,6BACLC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,MAAM;IAAAA,eAAA,gBAC3B,IAAI;EAAA;AAC3B"}
|
@@ -4,7 +4,9 @@ import { defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
4
4
|
export const DEFAULT_CLASS = 'app-label';
|
5
5
|
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
6
6
|
const defaultStyles = defineStyles({
|
7
|
-
root: {
|
7
|
+
root: {
|
8
|
+
alignSelf: 'flex-start'
|
9
|
+
},
|
8
10
|
text: {
|
9
11
|
fontSize: 16,
|
10
12
|
color: themeVariables.labelDefaultColor
|
@@ -21,11 +23,8 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
21
23
|
}
|
22
24
|
},
|
23
25
|
link: {
|
24
|
-
root: {
|
25
|
-
marginBottom: -4
|
26
|
-
},
|
27
26
|
text: {
|
28
|
-
|
27
|
+
textDecorationLine: 'underline'
|
29
28
|
}
|
30
29
|
}
|
31
30
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","deepCopy","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","fontSize","color","labelDefaultColor","asterisk","labelAsteriskColor","marginLeft","skeleton","width","height","borderRadius","link","
|
1
|
+
{"version":3,"names":["BASE_THEME","deepCopy","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","alignSelf","text","fontSize","color","labelDefaultColor","asterisk","labelAsteriskColor","marginLeft","skeleton","width","height","borderRadius","link","textDecorationLine","flexDirection","textAlign","getLabelStyles","textColor","backgroundColor","paddingLeft","paddingTop","paddingRight","paddingBottom","fontWeight","labelDangerColor","labelDangerContrastColor","labelDefaultContrastColor","labelInfoColor","labelInfoContrastColor","labelPrimaryColor","labelPrimaryContrastColor","labelSuccessColor","labelSuccessContrastColor","labelWarningColor","labelWarningContrastColor","getTextStyles","labelTextDangerColor","labelTextInfoColor","labelTextPrimaryColor","labelTextSuccessColor","labelTextWarningColor","getHeadingStyles","overrides","margin","labelHeaderColor","heading1FontSize","heading2FontSize","heading3FontSize","heading4FontSize","heading5FontSize","heading6FontSize","labelTextMutedColor"],"sources":["label.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\nimport { WmAnchorStyles } from '../anchor/anchor.styles';\n\nexport type WmLabelStyles = BaseStyles & {\n asterisk: AllStyle,\n skeleton: WmSkeletonStyles \n link: WmAnchorStyles\n};\n\nexport const DEFAULT_CLASS = 'app-label';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmLabelStyles = defineStyles({\n root: {\n alignSelf: 'flex-start'\n },\n text: {\n fontSize: 16,\n color: themeVariables.labelDefaultColor\n },\n asterisk: {\n color: themeVariables.labelAsteriskColor,\n marginLeft: 2\n },\n skeleton: {\n root:{\n width: '100%',\n height: 16,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles,\n link: {\n text: {\n textDecorationLine: 'underline'\n }\n } as WmAnchorStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root : {\n flexDirection: 'row',\n textAlign: 'right'\n }\n });\n const getLabelStyles = (color: string, textColor: string): WmLabelStyles => {\n return {\n root: {\n backgroundColor: color,\n paddingLeft: 32,\n paddingTop: 16,\n paddingRight: 32,\n paddingBottom: 16,\n borderRadius: 6\n },\n text: {\n color: textColor,\n fontWeight: 'bold'\n }\n } as WmLabelStyles;\n };\n\n addStyle('label-danger', '', getLabelStyles(themeVariables.labelDangerColor, themeVariables.labelDangerContrastColor));\n addStyle('label-default', '', getLabelStyles(themeVariables.labelDefaultColor, themeVariables.labelDefaultContrastColor));\n addStyle('label-info', '', getLabelStyles(themeVariables.labelInfoColor, themeVariables.labelInfoContrastColor));\n addStyle('label-primary', '', getLabelStyles(themeVariables.labelPrimaryColor, themeVariables.labelPrimaryContrastColor));\n addStyle('label-success', '', getLabelStyles(themeVariables.labelSuccessColor, themeVariables.labelSuccessContrastColor));\n addStyle('label-warning', '', getLabelStyles(themeVariables.labelWarningColor, themeVariables.labelWarningContrastColor));\n addStyle('label-test', '', getLabelStyles('yellow', 'red'));\n addStyle('label-test1', '', getLabelStyles('blue', 'orange'));\n\n const getTextStyles = (color: string) => {\n return {\n text: {\n color: color\n }\n } as WmLabelStyles;\n };\n\n addStyle('text-danger', '', getTextStyles(themeVariables.labelTextDangerColor));\n addStyle('text-info', '', getTextStyles(themeVariables.labelTextInfoColor));\n addStyle('text-primary', '', getTextStyles(themeVariables.labelTextPrimaryColor));\n addStyle('text-success', '', getTextStyles(themeVariables.labelTextSuccessColor));\n addStyle('text-warning', '', getTextStyles(themeVariables.labelTextWarningColor));\n addStyle('text-center', '', {\n root: {\n textAlign: 'center'\n }\n } as WmLabelStyles);\n addStyle('text-left', '', {\n root: {\n textAlign: 'left'\n }\n } as WmLabelStyles);\n addStyle('text-right', '', {\n root: {\n textAlign: 'right'\n }\n } as WmLabelStyles);\n\n\n const getHeadingStyles = (fontSize: number, overrides?: WmLabelStyles) => {\n return deepCopy({\n text: {\n fontWeight: '400',\n fontSize: fontSize,\n margin: 4,\n color: themeVariables.labelHeaderColor\n }\n } as WmLabelStyles, overrides);\n };\n addStyle('h1', '', getHeadingStyles(themeVariables.heading1FontSize, {text: {fontWeight: 'bold'}} as WmLabelStyles));\n addStyle('h2', '', getHeadingStyles(themeVariables.heading2FontSize, {text: {fontWeight: '500'}} as WmLabelStyles));\n addStyle('h3', '', getHeadingStyles(themeVariables.heading3FontSize));\n addStyle('h4', '', getHeadingStyles(themeVariables.heading4FontSize));\n addStyle('h5', '', getHeadingStyles(themeVariables.heading5FontSize));\n addStyle('h6', '', getHeadingStyles(themeVariables.heading6FontSize));\n addStyle('media-heading', '', {\n text : {\n fontSize: 16\n }\n } as WmLabelStyles);\n addStyle('text-muted', '', {\n text : {\n color: themeVariables.labelTextMutedColor\n }\n } as WmLabelStyles);\n addStyle('p', '', {\n text : {\n fontSize: 12\n }\n } as WmLabelStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAqB,wCAAwC;AAC9E,SAASC,QAAQ,QAAQ,sCAAsC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAUxF,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA4B,GAAGL,YAAY,CAAC;IAC9CM,IAAI,EAAE;MACJC,SAAS,EAAE;IACb,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,KAAK,EAAEP,cAAc,CAACQ;IACxB,CAAC;IACDC,QAAQ,EAAE;MACRF,KAAK,EAAEP,cAAc,CAACU,kBAAkB;MACxCC,UAAU,EAAE;IACd,CAAC;IACDC,QAAQ,EAAE;MACRT,IAAI,EAAC;QACHU,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,EAAE;QACVC,YAAY,EAAE;MAChB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xB;EACF,CAAkB,CAAC;EACnBtD,QAAQ,CAAC,GAAG,EAAE,EAAE,EAAE;IAChBI,IAAI,EAAG;MACLC,QAAQ,EAAE;IACZ;EACF,CAAkB,CAAC;AACrB,CAAC,CAAC"}
|
@@ -10,6 +10,7 @@ import { DEFAULT_CLASS } from './message.styles';
|
|
10
10
|
import WmIcon from '../icon/icon.component';
|
11
11
|
import WmButton from '../button/button.component';
|
12
12
|
import { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';
|
13
|
+
import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
|
13
14
|
export class WmMessageState extends BaseComponentState {}
|
14
15
|
const MESSAGE_ICONS = {
|
15
16
|
'success': 'wm-sl-l sl-check',
|
@@ -63,9 +64,9 @@ export default class WmMessage extends BaseComponent {
|
|
63
64
|
style: styles.message
|
64
65
|
}, /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel('title'), {
|
65
66
|
style: styles.title
|
66
|
-
}), props.title || DEFAULT_TITLE[props.type || '']), /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel('caption'), {
|
67
|
+
}, getAccessibilityProps(AccessibilityWidgetType.MESSAGE, props)), props.title || DEFAULT_TITLE[props.type || '']), /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel('caption'), {
|
67
68
|
style: styles.text
|
68
|
-
}), props.caption)), props.hideclose ? null : /*#__PURE__*/React.createElement(WmButton, {
|
69
|
+
}, getAccessibilityProps(AccessibilityWidgetType.MESSAGE, props)), props.caption)), props.hideclose ? null : /*#__PURE__*/React.createElement(WmButton, {
|
69
70
|
id: this.getTestId('close'),
|
70
71
|
iconclass: "wi wi-close",
|
71
72
|
styles: styles.closeBtn,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","Text","BaseComponent","BaseComponentState","WmMessageProps","DEFAULT_CLASS","WmIcon","WmButton","Animatedview","WmMessageState","MESSAGE_ICONS","DEFAULT_TITLE","WmMessage","constructor","props","_defineProperty","updateState","show","invokeEventCallback","showMessage","hideMessage","renderWidget","styles","theme","mergeStyle","getStyle","type","variant","createElement","entryanimation","animation","style","root","_background","id","getTestId","iconclass","icon","message","_extends","getTestPropsForLabel","title","text","caption","hideclose","closeBtn","onTap","close"],"sources":["message.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmMessageProps from './message.props';\nimport { DEFAULT_CLASS, WmMessageStyles } from './message.styles';\nimport WmIcon from '../icon/icon.component';\nimport WmButton from '../button/button.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\n\nexport class WmMessageState extends BaseComponentState<WmMessageProps> {}\n\nconst MESSAGE_ICONS = {\n 'success': 'wm-sl-l sl-check',\n 'warning': 'wm-sl-l sl-alarm-bell',\n 'error': 'fa fa-times-circle',\n 'info': 'wi wi-info',\n 'loading': 'fa fa-spinner fa-spin'\n};\n\nconst DEFAULT_TITLE = {\n 'success': 'Success',\n 'warning': 'Warning',\n 'error': 'Error',\n 'info': 'Info',\n 'loading': 'Processing'\n} as any;\n\nexport default class WmMessage extends BaseComponent<WmMessageProps, WmMessageState, WmMessageStyles> {\n\n constructor(props: WmMessageProps) {\n super(props, DEFAULT_CLASS, new WmMessageProps());\n }\n\n showMessage() {\n this.updateState({\n props: {\n show: true\n }\n } as WmMessageState);\n }\n\n hideMessage() {\n this.updateState({\n props: {\n show: false\n }\n } as WmMessageState);\n }\n\n close = () => {\n this.updateState({props: {\n show : false\n }}, () => this.invokeEventCallback('onClose', [null, this]));\n }\n\n renderWidget(props: WmMessageProps) {\n const styles = this.theme.mergeStyle(this.theme.getStyle(`${props.type}-${props.variant}-message`), this.styles);\n return (<Animatedview entryanimation={props.animation} style={styles.root}>\n {this._background}\n <WmIcon\n id={this.getTestId('icon')}\n iconclass={props.type && MESSAGE_ICONS[props.type]}\n styles={styles.icon}></WmIcon>\n <View style={styles.message}>\n <Text {...this.getTestPropsForLabel('title')} style={styles.title}>{props.title || DEFAULT_TITLE[props.type || '']}</Text>\n <Text {...this.getTestPropsForLabel('caption')} style={styles.text}>{props.caption}</Text>\n </View>\n {props.hideclose ? null : (\n <WmButton\n id={this.getTestId('close')}\n iconclass=\"wi wi-close\"\n styles={styles.closeBtn}\n onTap={this.close}></WmButton>\n )}\n </Animatedview>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AACjE,OAAOC,MAAM,MAAM,wBAAwB;AAC3C,OAAOC,QAAQ,MAAM,4BAA4B;AACjD,SAASC,YAAY,QAAQ,mEAAmE;
|
1
|
+
{"version":3,"names":["React","View","Text","BaseComponent","BaseComponentState","WmMessageProps","DEFAULT_CLASS","WmIcon","WmButton","Animatedview","AccessibilityWidgetType","getAccessibilityProps","WmMessageState","MESSAGE_ICONS","DEFAULT_TITLE","WmMessage","constructor","props","_defineProperty","updateState","show","invokeEventCallback","showMessage","hideMessage","renderWidget","styles","theme","mergeStyle","getStyle","type","variant","createElement","entryanimation","animation","style","root","_background","id","getTestId","iconclass","icon","message","_extends","getTestPropsForLabel","title","MESSAGE","text","caption","hideclose","closeBtn","onTap","close"],"sources":["message.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmMessageProps from './message.props';\nimport { DEFAULT_CLASS, WmMessageStyles } from './message.styles';\nimport WmIcon from '../icon/icon.component';\nimport WmButton from '../button/button.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nexport class WmMessageState extends BaseComponentState<WmMessageProps> {}\n\nconst MESSAGE_ICONS = {\n 'success': 'wm-sl-l sl-check',\n 'warning': 'wm-sl-l sl-alarm-bell',\n 'error': 'fa fa-times-circle',\n 'info': 'wi wi-info',\n 'loading': 'fa fa-spinner fa-spin'\n};\n\nconst DEFAULT_TITLE = {\n 'success': 'Success',\n 'warning': 'Warning',\n 'error': 'Error',\n 'info': 'Info',\n 'loading': 'Processing'\n} as any;\n\nexport default class WmMessage extends BaseComponent<WmMessageProps, WmMessageState, WmMessageStyles> {\n\n constructor(props: WmMessageProps) {\n super(props, DEFAULT_CLASS, new WmMessageProps());\n }\n\n showMessage() {\n this.updateState({\n props: {\n show: true\n }\n } as WmMessageState);\n }\n\n hideMessage() {\n this.updateState({\n props: {\n show: false\n }\n } as WmMessageState);\n }\n\n close = () => {\n this.updateState({props: {\n show : false\n }}, () => this.invokeEventCallback('onClose', [null, this]));\n }\n\n renderWidget(props: WmMessageProps) {\n const styles = this.theme.mergeStyle(this.theme.getStyle(`${props.type}-${props.variant}-message`), this.styles);\n return (<Animatedview entryanimation={props.animation} style={styles.root}>\n {this._background}\n <WmIcon\n id={this.getTestId('icon')}\n iconclass={props.type && MESSAGE_ICONS[props.type]}\n styles={styles.icon}></WmIcon>\n <View style={styles.message}>\n <Text {...this.getTestPropsForLabel('title')} style={styles.title} {...getAccessibilityProps(AccessibilityWidgetType.MESSAGE, props)}>{props.title || DEFAULT_TITLE[props.type || '']}</Text>\n <Text {...this.getTestPropsForLabel('caption')} style={styles.text} {...getAccessibilityProps(AccessibilityWidgetType.MESSAGE, props)}>{props.caption}</Text>\n </View>\n {props.hideclose ? null : (\n <WmButton\n id={this.getTestId('close')}\n iconclass=\"wi wi-close\"\n styles={styles.closeBtn}\n onTap={this.close}></WmButton>\n )}\n </Animatedview>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,O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AAuB,CAACmC,OAAO,EAAE5B,KAAK,CAAC,GAAGA,KAAK,CAAC8B,OAAc,CACxJ,CAAC,EACN9B,KAAK,CAAC+B,SAAS,GAAG,IAAI,gBACrBhD,KAAA,CAAA+B,aAAA,CAACvB,QAAQ;MACP6B,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,OAAO,CAAE;MAC5BC,SAAS,EAAC,aAAa;MACvBd,MAAM,EAAEA,MAAM,CAACwB,QAAS;MACxBC,KAAK,EAAE,IAAI,CAACC;IAAM,CAAW,CAErB,CAAC;EACjB;AACF"}
|
@@ -11,6 +11,9 @@ export default class WmMessageProps extends BaseProps {
|
|
11
11
|
_defineProperty(this, "caption", 'Message');
|
12
12
|
_defineProperty(this, "type", 'success');
|
13
13
|
_defineProperty(this, "hideclose", false);
|
14
|
+
_defineProperty(this, "accessibilitylabel", undefined);
|
15
|
+
_defineProperty(this, "hint", undefined);
|
16
|
+
_defineProperty(this, "accessibilityrole", 'alert');
|
14
17
|
_defineProperty(this, "onClose", void 0);
|
15
18
|
}
|
16
19
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseProps","WmMessageProps","constructor","arguments","_defineProperty"],"sources":["message.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\
|
1
|
+
{"version":3,"names":["BaseProps","WmMessageProps","constructor","arguments","_defineProperty","undefined"],"sources":["message.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { AccessibilityRole } from 'react-native';\nexport default class WmMessageProps extends BaseProps {\n animation?: string = 'fadeIn';\n title?: string = '';\n variant?: string = 'dark'\n caption? = 'Message';\n type?: 'success' | 'warning' | 'error' | 'info' | 'loading' = 'success';\n hideclose? = false;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'alert';\n onClose?: () => void;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,cAAc,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBAC/B,QAAQ;IAAAA,eAAA,gBACZ,EAAE;IAAAA,eAAA,kBACA,MAAM;IAAAA,eAAA,kBACd,SAAS;IAAAA,eAAA,eAC0C,SAAS;IAAAA,eAAA,oBAC1D,KAAK;IAAAA,eAAA,6BACYC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,OAAO;IAAAA,eAAA;EAAA;AAEjD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","paddingTop","paddingBottom","paddingLeft","paddingRight","borderRadius","alignItems","borderWidth","borderStyle","message","flex","justifyContent","alignContent","title","fontWeight","fontSize","text","icon","closeBtn","paddingHorizontal","alignSelf","getStyle","bgColor","closeBtnColor","iconcolor","textcolor","titleColor","borderColor","arguments","length","undefined","transparent","backgroundColor","color","OS","textAlign","messageSuccessColor","defaultColorF","messageErrorColor","messageWarningColor","messageInfoColor","messageLoadingColor","defaultColor6","defaultColor1","defaultColorD"],"sources":["message.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\nimport { Platform } from 'react-native';\n\nexport type WmMessageStyles = BaseStyles & {\n message: AllStyle,\n icon: WmIconStyles\n closeBtn: WmButtonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-message';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmMessageStyles = defineStyles({\n root: {\n flexDirection: 'row',\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 8,\n paddingRight: 8,\n borderRadius: 6,\n alignItems: 'center',\n borderWidth: 1,\n borderStyle: 'solid'\n },\n message: {\n flex: 1,\n flexDirection: 'column',\n justifyContent: 'flex-start',\n alignContent: 'center',\n paddingLeft: 16\n },\n title: {\n fontWeight: 'bold',\n fontSize: 14,\n paddingBottom: 4\n },\n text: {\n fontSize: 12\n },\n icon: {\n root: {\n alignItems: 'flex-start',\n fontSize: 20\n }\n } as WmIconStyles,\n closeBtn: {\n root: {\n paddingHorizontal: 0,\n paddingRight: 8,\n alignSelf: 'center'\n },\n icon: {\n text: {\n fontSize: 16\n }\n }\n } as WmButtonStyles\n }) as WmMessageStyles;\n\n const getStyle = (bgColor: string, \n closeBtnColor: string,\n iconcolor: string,\n textcolor: string,\n titleColor: string,\n borderColor = themeVariables.transparent) => {\n return {\n root: {\n backgroundColor: bgColor,\n borderColor: borderColor\n },\n message: {\n color: textcolor\n },\n title: {\n color: titleColor\n },\n text: {\n color: textcolor\n },\n icon: {\n root: {\n color: iconcolor\n }\n } as WmIconStyles,\n closeBtn: {\n icon: {\n root : {\n color: closeBtnColor,\n }\n }\n } as WmButtonStyles\n } as WmMessageStyles;\n };\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n title:{\n textAlign:'right',\n },\n text:{\n textAlign:'right',\n },\n message:{\n paddingRight: 16\n }\n }:{\n title:{\n textAlign:'left',\n },\n text:{\n textAlign:'left',\n },\n message:{\n paddingRight: 16\n }\n });\n addStyle('success-dark-message', '', getStyle(\n themeVariables.messageSuccessColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n ));\n addStyle('error-dark-message', '', getStyle(\n themeVariables.messageErrorColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n ));\n addStyle('warning-dark-message', '', getStyle(\n themeVariables.messageWarningColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF\n ));\n addStyle('info-dark-message', '', getStyle(\n themeVariables.messageInfoColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n ));\n addStyle('loading-dark-message', '', getStyle(\n themeVariables.messageLoadingColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n ));\n\n\n addStyle('success-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageSuccessColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n addStyle('error-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageErrorColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n addStyle('warning-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageWarningColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n addStyle('info-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageInfoColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n addStyle('loading-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageLoadingColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAGxF,SAASC,QAAQ,QAAQ,cAAc;AAQvC,OAAO,MAAMC,aAAa,GAAG,aAAa;AAC1CH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc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a,EAC5BzC,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC2C,mBAAmB,EAClC3C,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC+C,aAAa,EAC5B/C,cAAc,CAACgD,aACnB,CAAC,CAAC;EACF/C,QAAQ,CAAC,oBAAoB,EAAE,EAAE,EAAEwB,QAAQ,CACvCzB,cAAc,CAACyC,aAAa,EAC5BzC,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC4C,gBAAgB,EAC/B5C,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC+C,aAAa,EAC5B/C,cAAc,CAACgD,aACnB,CAAC,CAAC;EACF/C,QAAQ,CAAC,uBAAuB,EAAE,EAAE,EAAEwB,QAAQ,CAC1CzB,cAAc,CAACyC,aAAa,EAC5BzC,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC6C,mBAAmB,EAClC7C,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC+C,aAAa,EAC5B/C,cAAc,CAACgD,aACnB,CAAC,CAAC;AACN,CAAC,CAAC"}
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","paddingTop","paddingBottom","paddingLeft","paddingRight","borderRadius","alignItems","borderWidth","borderStyle","message","flex","justifyContent","alignContent","title","fontWeight","fontSize","text","icon","closeBtn","paddingHorizontal","alignSelf","getStyle","bgColor","closeBtnColor","iconcolor","textcolor","titleColor","borderColor","arguments","length","undefined","transparent","backgroundColor","color","OS","textAlign","messageSuccessColor","defaultColorF","messageErrorColor","messageWarningColor","messageInfoColor","messageLoadingColor","defaultColor6","defaultColor1","defaultColorD"],"sources":["message.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\nimport { Platform } from 'react-native';\n\nexport type WmMessageStyles = BaseStyles & {\n message: AllStyle,\n icon: WmIconStyles\n closeBtn: WmButtonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-message';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmMessageStyles = defineStyles({\n root: {\n flexDirection: 'row',\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 8,\n paddingRight: 8,\n borderRadius: 6,\n alignItems: 'center',\n borderWidth: 1,\n borderStyle: 'solid'\n },\n message: {\n flex: 1,\n flexDirection: 'column',\n justifyContent: 'flex-start',\n alignContent: 'center',\n paddingLeft: 16\n },\n title: {\n fontWeight: 'bold',\n fontSize: 14,\n paddingBottom: 4\n },\n text: {\n fontSize: 12\n },\n icon: {\n root: {\n alignItems: 'flex-start',\n fontSize: 20\n }\n } as WmIconStyles,\n closeBtn: {\n root: {\n borderRadius: 0,\n paddingLeft: 8,\n paddingHorizontal: 0,\n paddingRight: 0,\n alignSelf: 'center'\n },\n icon: {\n text: {\n fontSize: 16\n }\n }\n } as WmButtonStyles\n }) as WmMessageStyles;\n\n const getStyle = (bgColor: string, \n closeBtnColor: string,\n iconcolor: string,\n textcolor: string,\n titleColor: string,\n borderColor = themeVariables.transparent) => {\n return {\n root: {\n backgroundColor: bgColor,\n borderColor: borderColor\n },\n message: {\n color: textcolor\n },\n title: {\n color: titleColor\n },\n text: {\n color: textcolor\n },\n icon: {\n root: {\n color: iconcolor\n }\n } as WmIconStyles,\n closeBtn: {\n icon: {\n root : {\n color: closeBtnColor,\n }\n }\n } as WmButtonStyles\n } as WmMessageStyles;\n };\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n title:{\n textAlign:'right',\n },\n text:{\n textAlign:'right',\n },\n message:{\n paddingRight: 16\n }\n }:{\n title:{\n textAlign:'left',\n },\n text:{\n textAlign:'left',\n },\n message:{\n paddingRight: 16\n }\n });\n addStyle('success-dark-message', '', getStyle(\n themeVariables.messageSuccessColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n ));\n addStyle('error-dark-message', '', getStyle(\n themeVariables.messageErrorColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n ));\n addStyle('warning-dark-message', '', getStyle(\n themeVariables.messageWarningColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF\n ));\n addStyle('info-dark-message', '', getStyle(\n themeVariables.messageInfoColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n ));\n addStyle('loading-dark-message', '', getStyle(\n themeVariables.messageLoadingColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n ));\n\n\n addStyle('success-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageSuccessColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n addStyle('error-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageErrorColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n addStyle('warning-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageWarningColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n addStyle('info-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageInfoColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n addStyle('loading-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageLoadingColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAGxF,SAASC,QAAQ,QAAQ,cAAc;AAQvC,OAAO,MAAMC,aAAa,GAAG,aAAa;AAC1CH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA8B,GAAGN,YAAY,CAAC;IAChDO,IAAI,EAAE;MACFC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,CAAC;MACbC,aAAa,EAAE,CAAC;MAChBC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE,CAAC;MACfC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAE,QAAQ;MACpBC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE;IACjB,CAAC;IACDC,OAAO,EAAE;MACLC,IAAI,EAAE,CAAC;MACPV,aAAa,EAAE,QAAQ;MACvBW,cAAc,EAAE,YAAY;MAC5BC,YAAY,EAAE,QAAQ;MACtBT,WAAW,EAAE;IACjB,CAAC;IACDU,KAAK,EAAE;MACHC,UAAU,EAAE,MAAM;MAClBC,QAAQ,EAAE,EAAE;MACZb,aAAa,EAAE;IACnB,CAAC;IACDc,IAAI,EAAE;MACFD,QAAQ,EAAE;IACd,CAAC;IACDE,IAAI,EAAE;MACFlB,IAAI,EAAE;QACFO,UAAU,EAAE,YAAY;QACxBS,QAAQ,EAAE;MACd;IACJ,CAAiB;IACjBG,QAAQ,EAAE;MACNnB,IAAI,EAAE;QACFM,YAAY,EAAE,CAAC;QACfF,WAAW,EAAE,CAAC;QACdgB,iBAAiB,EAAE,CAAC;QACpBf,YAAY,EAAE,CAAC;QACfgB,SAAS,EAAE;MACf,CAAC;MACDH,I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B9C,cAAc,CAAC+C,aAAa,EAC5B/C,cAAc,CAACgD,aACnB,CAAC,CAAC;EACF/C,QAAQ,CAAC,qBAAqB,EAAE,EAAE,EAAEwB,QAAQ,CACxCzB,cAAc,CAACyC,aAAa,EAC5BzC,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC0C,iBAAiB,EAChC1C,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC+C,aAAa,EAC5B/C,cAAc,CAACgD,aACnB,CAAC,CAAC;EACF/C,QAAQ,CAAC,uBAAuB,EAAE,EAAE,EAAEwB,QAAQ,CAC1CzB,cAAc,CAACyC,aAAa,EAC5BzC,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC2C,mBAAmB,EAClC3C,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC+C,aAAa,EAC5B/C,cAAc,CAACgD,aACnB,CAAC,CAAC;EACF/C,QAAQ,CAAC,oBAAoB,EAAE,EAAE,EAAEwB,QAAQ,CACvCzB,cAAc,CAACyC,aAAa,EAC5BzC,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC4C,gBAAgB,EAC/B5C,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC+C,aAAa,EAC5B/C,cAAc,CAACgD,aACnB,CAAC,CAAC;EACF/C,QAAQ,CAAC,uBAAuB,EAAE,EAAE,EAAEwB,QAAQ,CAC1CzB,cAAc,CAACyC,aAAa,EAC5BzC,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC6C,mBAAmB,EAClC7C,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC+C,aAAa,EAC5B/C,cAAc,CAACgD,aACnB,CAAC,CAAC;AACN,CAAC,CAAC"}
|
@@ -10,6 +10,7 @@ import { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';
|
|
10
10
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
11
11
|
import ImageSizeEstimator from '@wavemaker/app-rn-runtime/core/imageSizeEstimator';
|
12
12
|
import { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';
|
13
|
+
import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
|
13
14
|
import WmPictureProps from './picture.props';
|
14
15
|
import { DEFAULT_CLASS } from './picture.styles';
|
15
16
|
import { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';
|
@@ -123,12 +124,12 @@ export default class WmPicture extends BaseComponent {
|
|
123
124
|
source = imgSrc;
|
124
125
|
}
|
125
126
|
if (this.state.naturalImageWidth) {
|
126
|
-
elementToshow = /*#__PURE__*/React.createElement(Image, {
|
127
|
+
elementToshow = /*#__PURE__*/React.createElement(Image, _extends({
|
127
128
|
testID: this.getTestId('picture'),
|
128
129
|
style: [this.styles.picture, shapeStyles.picture],
|
129
130
|
resizeMode: props.resizemode,
|
130
131
|
source: source
|
131
|
-
});
|
132
|
+
}, getAccessibilityProps(AccessibilityWidgetType.PICTURE, props)));
|
132
133
|
}
|
133
134
|
return elementToshow;
|
134
135
|
}
|
@@ -171,6 +172,7 @@ export default class WmPicture extends BaseComponent {
|
|
171
172
|
}],
|
172
173
|
onLayout: this.onViewLayoutChange
|
173
174
|
}, /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(), {
|
175
|
+
rippleColor: this.styles.root.rippleColor,
|
174
176
|
target: this,
|
175
177
|
styles: {
|
176
178
|
width: imageWidth ? null : '100%',
|