@wavemaker/app-rn-runtime 11.5.0-next.40301 → 11.5.0-rc.5392
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +4 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js +1 -2
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js +130 -68
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js +3 -0
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +17 -9
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/advanced/login/login.component.js +3 -2
- app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +17 -16
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js +1 -0
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +7 -5
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/animatedview.component.js +50 -0
- app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.component.js +5 -0
- app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +7 -6
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.styles.js +14 -4
- app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +2 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +11 -5
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.props.js +1 -0
- app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +60 -3
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js +2 -1
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/message/message.component.js +6 -3
- app-rn-runtime/components/basic/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +7 -5
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +4 -2
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +3 -2
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +12 -6
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +11 -10
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js +6 -2
- app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
- app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js +2 -1
- app-rn-runtime/components/basic/video/video.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +19 -8
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +23 -2
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +1 -0
- app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +213 -0
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -0
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +15 -0
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -0
- app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js +7 -0
- app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js.map +1 -0
- app-rn-runtime/components/container/accordion/accordion.component.js +22 -15
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +6 -24
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +3 -2
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/panel/collapsible-pane.component.js +26 -0
- app-rn-runtime/components/container/panel/collapsible-pane.component.js.map +1 -0
- app-rn-runtime/components/container/panel/panel.component.js +44 -62
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.styles.js +9 -2
- app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
- app-rn-runtime/components/container/partial-host.component.js +1 -1
- app-rn-runtime/components/container/partial-host.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +7 -5
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +9 -5
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +1 -0
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +3 -2
- app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +9 -4
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +18 -5
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +3 -2
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.component.js +1 -0
- app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +3 -2
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +3 -0
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js +9 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +38 -27
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +6 -0
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js +12 -5
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -0
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +2 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.component.js +1 -0
- app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.styles.js +2 -1
- app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +4 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +9 -3
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +6 -2
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js +10 -10
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +2 -0
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js +17 -8
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +4 -2
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js +2 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js +4 -0
- app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.styles.js +22 -11
- app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
- app-rn-runtime/components/input/calendar/views/month-view.js +4 -0
- app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +6 -6
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +5 -4
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +8 -4
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.styles.js +20 -12
- app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.component.js +8 -1
- app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.props.js +1 -0
- app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.styles.js +16 -1
- app-rn-runtime/components/input/composite/composite.styles.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +1 -1
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +12 -4
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +6 -4
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -0
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +1 -1
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +6 -2
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +10 -5
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js +6 -0
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js +4 -8
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/rating/rating.component.js +2 -0
- app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +17 -13
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.styles.js +8 -4
- app-rn-runtime/components/input/select/select.styles.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.component.js +94 -23
- app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.styles.js +27 -2
- app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +6 -4
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +7 -4
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +1 -1
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js +5 -1
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +3 -2
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.styles.js +21 -9
- app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +7 -2
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js +2 -0
- app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.component.js +5 -3
- app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.styles.js +10 -6
- app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.component.js +7 -4
- app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +5 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.styles.js +14 -10
- app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js +10 -5
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.styles.js +8 -2
- app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.styles.js +6 -1
- app-rn-runtime/components/page/left-panel/left-panel.styles.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js +7 -6
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.styles.js +22 -0
- app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
- app-rn-runtime/core/base.component.js +80 -37
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/formatters.js +9 -2
- app-rn-runtime/core/formatters.js.map +1 -1
- app-rn-runtime/core/imageSizeEstimator.js +4 -0
- app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
- app-rn-runtime/core/key.extractor.js +22 -0
- app-rn-runtime/core/key.extractor.js.map +1 -0
- app-rn-runtime/core/tappable.component.js +15 -5
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/testid.provider.js +5 -0
- app-rn-runtime/core/testid.provider.js.map +1 -0
- app-rn-runtime/gestures/swipe.animation.js +34 -11
- app-rn-runtime/gestures/swipe.animation.js.map +1 -1
- app-rn-runtime/package.json +4 -3
- app-rn-runtime/runtime/App.js +27 -4
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +13 -3
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +17 -0
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +14 -3
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/runtime/services/device/camera-service.js +26 -9
- app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/scan-service.js +16 -2
- app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
- app-rn-runtime/styles/theme.js +30 -1
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +14 -3
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/http.service.js +1 -1
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/live-variable.js +1 -0
- app-rn-runtime/variables/live-variable.js.map +1 -1
- app-rn-runtime/variables/model-variable.js +11 -0
- app-rn-runtime/variables/model-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +1 -0
- app-rn-runtime/variables/service-variable.js.map +1 -1
app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js
CHANGED
|
@@ -9,8 +9,11 @@ export default class WmCarouselTemplate extends BaseComponent {
|
|
|
9
9
|
super(props, DEFAULT_CLASS, new WmCarouselTemplateProps());
|
|
10
10
|
}
|
|
11
11
|
renderWidget(props) {
|
|
12
|
+
var _this$parent;
|
|
12
13
|
return /*#__PURE__*/React.createElement(View, {
|
|
13
|
-
style: this.styles.root
|
|
14
|
+
style: [this.styles.root, {
|
|
15
|
+
height: this.styles.root.height || ((_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : _this$parent.styles.root.height) && '100%'
|
|
16
|
+
}]
|
|
14
17
|
}, this._background, props.children);
|
|
15
18
|
}
|
|
16
19
|
}
|
app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmCarouselTemplateProps","DEFAULT_CLASS","WmCarouselTemplateState","WmCarouselTemplate","constructor","props","renderWidget","createElement","style","styles","root","_background","children"],"sources":["carousel-template.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCarouselTemplateProps from './carousel-template.props';\nimport { DEFAULT_CLASS, WmCarouselTemplateStyles } from './carousel-template.styles';\n\nexport class WmCarouselTemplateState extends BaseComponentState<WmCarouselTemplateProps> {}\n\nexport default class WmCarouselTemplate extends BaseComponent<WmCarouselTemplateProps, WmCarouselTemplateState, WmCarouselTemplateStyles> {\n\n constructor(props: WmCarouselTemplateProps) {\n super(props, DEFAULT_CLASS, new WmCarouselTemplateProps());\n }\n\n renderWidget(props: WmCarouselTemplateProps) {\n return (<View style={this.styles.root}>{this._background}{props.children}</View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,uBAAuB,MAAM,2BAA2B;AAC/D,SAASC,aAAa,QAAkC,4BAA4B;AAEpF,OAAO,MAAMC,uBAAuB,SAASH,kBAAkB,CAA0B;AAEzF,eAAe,MAAMI,kBAAkB,SAASL,aAAa,CAA6E;EAExIM,WAAWA,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,uBAAuB,CAAC,CAAC,CAAC;EAC5D;EAEAM,YAAYA,CAACD,KAA8B,EAAE;IAC3C,
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmCarouselTemplateProps","DEFAULT_CLASS","WmCarouselTemplateState","WmCarouselTemplate","constructor","props","renderWidget","_this$parent","createElement","style","styles","root","height","parent","_background","children"],"sources":["carousel-template.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCarouselTemplateProps from './carousel-template.props';\nimport { DEFAULT_CLASS, WmCarouselTemplateStyles } from './carousel-template.styles';\n\nexport class WmCarouselTemplateState extends BaseComponentState<WmCarouselTemplateProps> {}\n\nexport default class WmCarouselTemplate extends BaseComponent<WmCarouselTemplateProps, WmCarouselTemplateState, WmCarouselTemplateStyles> {\n\n constructor(props: WmCarouselTemplateProps) {\n super(props, DEFAULT_CLASS, new WmCarouselTemplateProps());\n }\n\n renderWidget(props: WmCarouselTemplateProps) {\n return (<View style={[this.styles.root, {\n height: this.styles.root.height || (this.parent?.styles.root.height && '100%')\n }]}>{this._background}{props.children}</View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,uBAAuB,MAAM,2BAA2B;AAC/D,SAASC,aAAa,QAAkC,4BAA4B;AAEpF,OAAO,MAAMC,uBAAuB,SAASH,kBAAkB,CAA0B;AAEzF,eAAe,MAAMI,kBAAkB,SAASL,aAAa,CAA6E;EAExIM,WAAWA,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,uBAAuB,CAAC,CAAC,CAAC;EAC5D;EAEAM,YAAYA,CAACD,KAA8B,EAAE;IAAA,IAAAE,YAAA;IAC3C,oBAAQX,KAAA,CAAAY,aAAA,CAACX,IAAI;MAACY,KAAK,EAAE,CAAC,IAAI,CAACC,MAAM,CAACC,IAAI,EAAE;QACtCC,MAAM,EAAE,IAAI,CAACF,MAAM,CAACC,IAAI,CAACC,MAAM,IAAK,EAAAL,YAAA,OAAI,CAACM,MAAM,cAAAN,YAAA,uBAAXA,YAAA,CAAaG,MAAM,CAACC,IAAI,CAACC,MAAM,KAAI;MACzE,CAAC;IAAE,GAAE,IAAI,CAACE,WAAW,EAAET,KAAK,CAACU,QAAe,CAAC;EAC/C;AACF"}
|
app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","justifyContent","alignItems","width","
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","justifyContent","alignItems","width","text"],"sources":["carousel-template.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type WmCarouselTemplateStyles = BaseStyles & {};\n\nexport const DEFAULT_CLASS = 'app-carousel-template';\n\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCarouselTemplateStyles = defineStyles({\n root: {\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n width: '100%'\n },\n text: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAIxF,OAAO,MAAMC,aAAa,GAAG,uBAAuB;AAEpDF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAuC,GAAGL,YAAY,CAAC;IACzDM,IAAI,EAAE;MACFC,aAAa,EAAE,QAAQ;MACvBC,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE,QAAQ;MACpBC,KAAK,EAAE;IACX,CAAC;IACDC,IAAI,EAAE,CAAC;EACX,CAAC,CAAC;EAEFP,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
|
|
@@ -2,87 +2,124 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
2
2
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
3
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
5
|
+
import { isArray } from 'lodash-es';
|
|
6
|
+
import { Animated, View } from 'react-native';
|
|
7
|
+
import { DefaultKeyExtractor } from '@wavemaker/app-rn-runtime/core/key.extractor';
|
|
7
8
|
import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';
|
|
8
9
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
10
|
+
import * as SwipeAnimation from '@wavemaker/app-rn-runtime/gestures/swipe.animation';
|
|
9
11
|
import WmCarouselProps from './carousel.props';
|
|
10
12
|
import { DEFAULT_CLASS } from './carousel.styles';
|
|
11
13
|
export class WmCarouselState extends BaseComponentState {
|
|
12
14
|
constructor() {
|
|
13
15
|
super(...arguments);
|
|
14
|
-
_defineProperty(this, "activeIndex",
|
|
15
|
-
_defineProperty(this, "sliderWidth", 0);
|
|
16
|
+
_defineProperty(this, "activeIndex", 1);
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
export default class WmCarousel extends BaseComponent {
|
|
19
20
|
constructor(_props) {
|
|
20
21
|
super(_props, DEFAULT_CLASS, new WmCarouselProps(), new WmCarouselState());
|
|
21
|
-
_defineProperty(this, "carouselRef", null);
|
|
22
22
|
_defineProperty(this, "noOfSlides", 0);
|
|
23
|
+
_defineProperty(this, "slideLayout", null);
|
|
24
|
+
_defineProperty(this, "keyExtractor", new DefaultKeyExtractor());
|
|
23
25
|
_defineProperty(this, "stopPlay", null);
|
|
26
|
+
_defineProperty(this, "animationView", null);
|
|
27
|
+
_defineProperty(this, "animationHandlers", {
|
|
28
|
+
bounds: e => {
|
|
29
|
+
var _this$slideLayout;
|
|
30
|
+
const activeTabIndex = this.state.activeIndex - 1,
|
|
31
|
+
w = ((_this$slideLayout = this.slideLayout) === null || _this$slideLayout === void 0 ? void 0 : _this$slideLayout.width) || 0,
|
|
32
|
+
props = this.state.props,
|
|
33
|
+
noOfTabs = props.type === 'dynamic' ? props.dataset : props.children;
|
|
34
|
+
return {
|
|
35
|
+
lower: -1 * (activeTabIndex - (activeTabIndex === 0 ? 0 : 1)) * w,
|
|
36
|
+
center: -1 * activeTabIndex * w,
|
|
37
|
+
upper: -1 * (activeTabIndex + (activeTabIndex === noOfTabs - 1 ? 0 : 1)) * w
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
computePhase: value => {
|
|
41
|
+
var _this$slideLayout2;
|
|
42
|
+
const w = ((_this$slideLayout2 = this.slideLayout) === null || _this$slideLayout2 === void 0 ? void 0 : _this$slideLayout2.width) || 0;
|
|
43
|
+
return w && Math.abs(value / w);
|
|
44
|
+
},
|
|
45
|
+
onLower: e => {
|
|
46
|
+
this.onSlideChange(this.state.activeIndex - 1);
|
|
47
|
+
},
|
|
48
|
+
onUpper: e => {
|
|
49
|
+
this.onSlideChange(this.state.activeIndex + 1);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
24
52
|
_defineProperty(this, "onSlideChange", index => {
|
|
25
53
|
const prevIndex = this.state.activeIndex;
|
|
26
54
|
this.updateState({
|
|
27
55
|
activeIndex: index
|
|
28
56
|
}, () => this.invokeEventCallback('onChange', [this, index, prevIndex]));
|
|
29
57
|
});
|
|
30
|
-
_defineProperty(this, "renderItem",
|
|
58
|
+
_defineProperty(this, "renderItem", (item, index) => {
|
|
31
59
|
const props = this.state.props;
|
|
32
60
|
if (props.type === 'dynamic') {
|
|
33
|
-
return props.renderSlide ? props.renderSlide(
|
|
61
|
+
return props.renderSlide ? props.renderSlide(item, index) : null;
|
|
34
62
|
}
|
|
35
|
-
return props.children[
|
|
36
|
-
});
|
|
37
|
-
_defineProperty(this, "onLayoutChange", e => {
|
|
38
|
-
this.updateState({
|
|
39
|
-
sliderWidth: e.nativeEvent.layout.width
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
_defineProperty(this, "getDotElement", _ref => {
|
|
43
|
-
let {
|
|
44
|
-
active,
|
|
45
|
-
index
|
|
46
|
-
} = _ref;
|
|
47
|
-
return /*#__PURE__*/React.createElement(Text, {
|
|
48
|
-
style: active ? this.styles.activeDotStyle : this.styles.dotStyle
|
|
49
|
-
}, index);
|
|
63
|
+
return props.children[index];
|
|
50
64
|
});
|
|
51
65
|
_defineProperty(this, "next", () => {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
66
|
+
const props = this.state.props;
|
|
67
|
+
const data = props.type === 'dynamic' ? props.dataset : props.children;
|
|
68
|
+
if (this.state.activeIndex >= (data === null || data === void 0 ? void 0 : data.length) || 0) {
|
|
69
|
+
var _this$animationView;
|
|
70
|
+
this.onSlideChange(1);
|
|
71
|
+
(_this$animationView = this.animationView) === null || _this$animationView === void 0 ? void 0 : _this$animationView.setPosition(0);
|
|
55
72
|
} else {
|
|
56
|
-
var _this$
|
|
57
|
-
(_this$
|
|
73
|
+
var _this$animationView2;
|
|
74
|
+
(_this$animationView2 = this.animationView) === null || _this$animationView2 === void 0 ? void 0 : _this$animationView2.goToUpper();
|
|
58
75
|
}
|
|
59
76
|
});
|
|
60
77
|
_defineProperty(this, "prev", () => {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
(_this$carouselRef3 = this.carouselRef) === null || _this$carouselRef3 === void 0 ? void 0 : _this$carouselRef3.snapToPrev();
|
|
64
|
-
} else {
|
|
65
|
-
var _this$carouselRef4;
|
|
66
|
-
(_this$carouselRef4 = this.carouselRef) === null || _this$carouselRef4 === void 0 ? void 0 : _this$carouselRef4.snapToItem(this.noOfSlides - 1);
|
|
67
|
-
}
|
|
78
|
+
var _this$animationView3;
|
|
79
|
+
(_this$animationView3 = this.animationView) === null || _this$animationView3 === void 0 ? void 0 : _this$animationView3.goToLower();
|
|
68
80
|
});
|
|
69
81
|
this.cleanup.push(() => {
|
|
70
82
|
this.stopPlay && this.stopPlay();
|
|
71
83
|
});
|
|
72
84
|
}
|
|
85
|
+
generateItemKey(item, index, props) {
|
|
86
|
+
if (props.itemkey && item && !this._showSkeleton) {
|
|
87
|
+
return props.itemkey(item, index);
|
|
88
|
+
}
|
|
89
|
+
return 'list_item_' + this.keyExtractor.getKey(item, true);
|
|
90
|
+
}
|
|
91
|
+
setSlideLayout(event) {
|
|
92
|
+
this.slideLayout = event.nativeEvent.layout;
|
|
93
|
+
this.forceUpdate();
|
|
94
|
+
}
|
|
73
95
|
autoPlay() {
|
|
74
96
|
const props = this.state.props;
|
|
75
97
|
this.stopPlay && this.stopPlay();
|
|
76
|
-
if (props.animation && props.animationinterval) {
|
|
98
|
+
if (props.animation === 'auto' && props.animationinterval) {
|
|
77
99
|
const intervalId = setInterval(() => {
|
|
78
100
|
this.next();
|
|
79
101
|
}, props.animationinterval * 1000);
|
|
80
102
|
this.stopPlay = () => clearInterval(intervalId);
|
|
103
|
+
} else {
|
|
104
|
+
setTimeout(() => {
|
|
105
|
+
var _this$animationView4;
|
|
106
|
+
this.onSlideChange(1);
|
|
107
|
+
(_this$animationView4 = this.animationView) === null || _this$animationView4 === void 0 ? void 0 : _this$animationView4.setPosition(0);
|
|
108
|
+
}, 1000);
|
|
81
109
|
}
|
|
82
110
|
}
|
|
83
111
|
onPropertyChange(name, $new, $old) {
|
|
84
112
|
super.onPropertyChange(name, $new, $old);
|
|
85
113
|
switch (name) {
|
|
114
|
+
case 'dataset':
|
|
115
|
+
{
|
|
116
|
+
var _this$keyExtractor;
|
|
117
|
+
(_this$keyExtractor = this.keyExtractor) === null || _this$keyExtractor === void 0 ? void 0 : _this$keyExtractor.clear();
|
|
118
|
+
this.updateState({
|
|
119
|
+
activeIndex: Math.min(this.state.activeIndex, ($new === null || $new === void 0 ? void 0 : $new.length) || 0)
|
|
120
|
+
});
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
86
123
|
case 'animation':
|
|
87
124
|
case 'animationinterval':
|
|
88
125
|
{
|
|
@@ -90,58 +127,83 @@ export default class WmCarousel extends BaseComponent {
|
|
|
90
127
|
}
|
|
91
128
|
}
|
|
92
129
|
}
|
|
93
|
-
renderPagination(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
130
|
+
renderPagination(data) {
|
|
131
|
+
const maxNoOfDots = this.state.props.maxnoofdots;
|
|
132
|
+
let minIndex = Math.max(this.state.activeIndex - maxNoOfDots + 1, 0);
|
|
133
|
+
let maxIndex = Math.min(minIndex + maxNoOfDots - 1, data.length);
|
|
134
|
+
if (maxIndex === data.length) {
|
|
135
|
+
minIndex = maxIndex - maxNoOfDots;
|
|
136
|
+
}
|
|
137
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
138
|
+
style: this.styles.dotsWrapperStyle
|
|
139
|
+
}, data.map((item, index) => {
|
|
140
|
+
return index >= minIndex && index <= maxIndex ? /*#__PURE__*/React.createElement(View, {
|
|
141
|
+
key: 'dots_' + this.generateItemKey(item, index, this.state.props),
|
|
142
|
+
style: [this.styles.dotStyle, index === this.state.activeIndex - 1 ? this.styles.activeDotStyle : null]
|
|
143
|
+
}) : null;
|
|
144
|
+
}));
|
|
104
145
|
}
|
|
105
146
|
renderWidget(props) {
|
|
147
|
+
var _data;
|
|
106
148
|
const hasNavs = props.controls === 'both' || props.controls === 'navs';
|
|
107
149
|
const hasDots = props.controls === 'both' || props.controls === 'indicators';
|
|
108
150
|
let styles = this.styles;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
151
|
+
let data = props.type === 'dynamic' ? props.dataset : props.children;
|
|
152
|
+
data = isArray(data) ? data : [];
|
|
153
|
+
this.noOfSlides = ((_data = data) === null || _data === void 0 ? void 0 : _data.length) || 0;
|
|
112
154
|
// TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608
|
|
113
155
|
return /*#__PURE__*/React.createElement(View, {
|
|
114
156
|
style: styles.root,
|
|
115
|
-
onLayout: this.
|
|
116
|
-
}, this._background,
|
|
117
|
-
|
|
118
|
-
data: data || [],
|
|
119
|
-
firstItem: 0,
|
|
157
|
+
onLayout: this.setSlideLayout.bind(this)
|
|
158
|
+
}, this._background, /*#__PURE__*/React.createElement(SwipeAnimation.View, {
|
|
159
|
+
enableGestures: props.enablegestures,
|
|
120
160
|
style: {
|
|
121
|
-
|
|
122
|
-
|
|
161
|
+
flexDirection: 'row',
|
|
162
|
+
flexWrap: 'nowrap',
|
|
163
|
+
alignItems: 'center',
|
|
164
|
+
height: props.type === 'dynamic' ? undefined : '100%'
|
|
165
|
+
},
|
|
166
|
+
direction: "horizontal",
|
|
167
|
+
ref: r => {
|
|
168
|
+
this.animationView = r;
|
|
123
169
|
},
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
170
|
+
handlers: this.animationHandlers
|
|
171
|
+
}, data.map((item, index) => {
|
|
172
|
+
var _this$animationView5, _this$animationView6;
|
|
173
|
+
const isActive = index === this.state.activeIndex - 1;
|
|
174
|
+
let scale = (_this$animationView5 = this.animationView) === null || _this$animationView5 === void 0 ? void 0 : _this$animationView5.animationPhase.interpolate({
|
|
175
|
+
inputRange: [-2000, index - 1, index, index + 1, 2000],
|
|
176
|
+
outputRange: [0.8, 0.8, 1, 0.8, 0.8]
|
|
177
|
+
});
|
|
178
|
+
let translateX = (_this$animationView6 = this.animationView) === null || _this$animationView6 === void 0 ? void 0 : _this$animationView6.animationPhase.interpolate({
|
|
179
|
+
inputRange: [-2000, index - 1, index, index + 1, 2000],
|
|
180
|
+
outputRange: [-56, -56, 0, 56, 56]
|
|
181
|
+
});
|
|
182
|
+
return /*#__PURE__*/React.createElement(Animated.View, {
|
|
183
|
+
key: this.generateItemKey(item, index, props),
|
|
184
|
+
style: [{
|
|
185
|
+
height: props.type === 'dynamic' ? undefined : '100%'
|
|
186
|
+
}, this.styles.slide, index === 0 ? this.styles.firstSlide : null, index === data.length - 1 ? this.styles.lastSlide : null, isActive ? this.styles.activeSlide : null, translateX && scale ? {
|
|
187
|
+
transform: [{
|
|
188
|
+
translateX: translateX
|
|
189
|
+
}, {
|
|
190
|
+
scale: scale
|
|
191
|
+
}]
|
|
192
|
+
} : null]
|
|
193
|
+
}, this.renderItem(item, index));
|
|
194
|
+
})), hasNavs ? /*#__PURE__*/React.createElement(View, {
|
|
135
195
|
style: styles.btnPanel
|
|
136
196
|
}, /*#__PURE__*/React.createElement(WmIcon, {
|
|
197
|
+
id: this.getTestId('prev_icon'),
|
|
137
198
|
iconclass: "wi wi-chevron-left fa-2x",
|
|
138
199
|
styles: styles.prevBtn,
|
|
139
200
|
onTap: this.prev
|
|
140
201
|
}), /*#__PURE__*/React.createElement(WmIcon, {
|
|
202
|
+
id: this.getTestId('next_icon'),
|
|
141
203
|
iconclass: "wi wi-chevron-right fa-2x",
|
|
142
204
|
styles: styles.nextBtn,
|
|
143
205
|
onTap: this.next
|
|
144
|
-
})) : null,
|
|
206
|
+
})) : null, hasDots && data ? this.renderPagination(data) : null);
|
|
145
207
|
}
|
|
146
208
|
}
|
|
147
209
|
//# sourceMappingURL=carousel.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","Carousel","Pagination","WmIcon","BaseComponent","BaseComponentState","WmCarouselProps","DEFAULT_CLASS","WmCarouselState","constructor","arguments","_defineProperty","WmCarousel","props","index","prevIndex","state","activeIndex","updateState","invokeEventCallback","data","type","renderSlide","item","children","e","sliderWidth","nativeEvent","layout","width","_ref","active","createElement","style","styles","activeDotStyle","dotStyle","carouselRef","currentIndex","noOfSlides","_this$carouselRef","snapToNext","_this$carouselRef2","snapToItem","_this$carouselRef3","snapToPrev","_this$carouselRef4","cleanup","push","stopPlay","autoPlay","animation","animationinterval","intervalId","setInterval","next","clearInterval","onPropertyChange","name","$new","$old","renderPagination","dotsLength","activeDotIndex","containerStyle","dotsWrapperStyle","inactiveDotStyle","inactiveDotScale","tappableDots","renderWidget","hasNavs","controls","hasDots","dataset","length","root","onLayout","onLayoutChange","_background","ref","firstItem","height","enableSnap","loopClonesPerSide","autoplay","activeSlideAlignment","renderItem","itemWidth","lockScrollWhileSnapping","scrollEnabled","onSnapToItem","onSlideChange","btnPanel","iconclass","prevBtn","onTap","prev","nextBtn"],"sources":["carousel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, LayoutChangeEvent } from 'react-native';\nimport Carousel, { Pagination } from 'react-native-snap-carousel';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCarouselProps from './carousel.props';\nimport { DEFAULT_CLASS, WmCarouselStyles } from './carousel.styles';\n\nexport class WmCarouselState extends BaseComponentState<WmCarouselProps> {\n activeIndex = 0;\n sliderWidth = 0;\n}\n\nexport default class WmCarousel extends BaseComponent<WmCarouselProps, WmCarouselState, WmCarouselStyles> {\n\n carouselRef: Carousel<unknown> | null = null as any;\n noOfSlides: number = 0;\n stopPlay: Function = null as any;\n\n constructor(props: WmCarouselProps) {\n super(props, DEFAULT_CLASS, new WmCarouselProps(), new WmCarouselState());\n this.cleanup.push(() => {\n this.stopPlay && this.stopPlay();\n })\n }\n\n autoPlay() {\n const props = this.state.props;\n this.stopPlay && this.stopPlay();\n if (props.animation && props.animationinterval) {\n const intervalId = setInterval(() => {\n this.next();\n }, props.animationinterval * 1000);\n this.stopPlay = () => clearInterval(intervalId);\n }\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'animation':\n case 'animationinterval' : {\n this.autoPlay();\n }\n }\n }\n\n onSlideChange = (index: number) => {\n const prevIndex = this.state.activeIndex;\n this.updateState({\n activeIndex: index\n } as WmCarouselState,\n () => this.invokeEventCallback('onChange', [this, index, prevIndex]));\n }\n\n renderItem = (data: any) => {\n const props = this.state.props;\n if (props.type === 'dynamic') {\n return props.renderSlide ? props.renderSlide(data.item, data.index) : null;\n }\n return props.children[data.index];\n }\n\n onLayoutChange = (e: LayoutChangeEvent) => {\n this.updateState({\n sliderWidth: e.nativeEvent.layout.width\n } as WmCarouselState);\n }\n\n getDotElement = ({active, index}: {active: boolean, index: number}) => {\n return (<Text style={active ? this.styles.activeDotStyle: this.styles.dotStyle}>{index}</Text>);\n }\n\n renderPagination(props: WmCarouselProps, styles: WmCarouselStyles) {\n return (\n <Pagination\n carouselRef={this.carouselRef as any}\n dotsLength={this.noOfSlides}\n activeDotIndex={this.state.activeIndex}\n containerStyle={styles.dotsWrapperStyle}\n dotStyle={styles.activeDotStyle}\n inactiveDotStyle={styles.dotStyle}\n inactiveDotScale={0.8}\n tappableDots={true}\n />\n );\n }\n\n next = () => {\n if (this.carouselRef && this.carouselRef.currentIndex < this.noOfSlides - 1) {\n this.carouselRef?.snapToNext();\n } else {\n this.carouselRef?.snapToItem(0);\n }\n }\n\n prev = () => {\n if (this.carouselRef && this.carouselRef.currentIndex > 0) {\n this.carouselRef?.snapToPrev();\n } else {\n this.carouselRef?.snapToItem(this.noOfSlides - 1);\n }\n }\n\n renderWidget(props: WmCarouselProps) {\n const hasNavs = props.controls === 'both' || props.controls ==='navs';\n const hasDots = props.controls === 'both' || props.controls ==='indicators';\n let styles = this.styles;\n const data = props.type === 'dynamic' ? props.dataset : props.children;\n this.noOfSlides = data?.length || 0;\n const autoPlay = props.animation === 'auto';\n // TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608\n return (\n <View style={styles.root} onLayout={this.onLayoutChange}>\n {this._background}\n {this.state.sliderWidth > 0 ?\n (<Carousel\n ref={ref => this.carouselRef = ref}\n data={data || []}\n firstItem={0}\n style={{width: '100%', height: '100%'}}\n enableSnap={true}\n loopClonesPerSide={1}\n autoplay={false}\n activeSlideAlignment='start'\n renderItem={this.renderItem}\n sliderWidth={this.state.sliderWidth}\n itemWidth={this.state.sliderWidth}\n lockScrollWhileSnapping={false}\n scrollEnabled={false}\n onSnapToItem={this.onSlideChange}\n ></Carousel>) : null}\n {hasNavs ? (\n <View style={styles.btnPanel}>\n <WmIcon\n iconclass=\"wi wi-chevron-left fa-2x\"\n styles={styles.prevBtn}\n onTap={this.prev}/>\n <WmIcon\n iconclass=\"wi wi-chevron-right fa-2x\"\n styles={styles.nextBtn}\n onTap={this.next}/>\n </View>): null}\n {this.state.sliderWidth > 0 && hasDots && data ? this.renderPagination(props, styles) : null}\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAA2B,cAAc;AAC5D,OAAOC,QAAQ,IAAIC,UAAU,QAAQ,4BAA4B;AACjE,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AAEnE,OAAO,MAAMC,eAAe,SAASH,kBAAkB,CAAkB;EAAAI,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,sBACzD,CAAC;IAAAA,eAAA,sBACD,CAAC;EAAA;AACjB;AAEA,eAAe,MAAMC,UAAU,SAASR,aAAa,CAAqD;EAMxGK,WA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AQ;MACvBC,KAAK,EAAE,IAAI,CAACC;IAAK,CAAC,CAAC,eACrBlG,KAAA,CAAAkC,aAAA,CAAC7B,MAAM;MACL0F,SAAS,EAAC,2BAA2B;MACrC3D,MAAM,EAAEA,MAAM,CAAC+D,OAAQ;MACvBF,KAAK,EAAE,IAAI,CAACxC;IAAK,CAAC,CAChB,CAAC,GAAG,IAAI,EACf,IAAI,CAACvC,KAAK,CAACU,WAAW,GAAG,CAAC,IAAI8C,OAAO,IAAIpD,IAAI,GAAG,IAAI,CAACyC,gBAAgB,CAAChD,KAAK,EAAEqB,MAAM,CAAC,GAAG,IACpF,CAAC;EACX;AACF"}
|
|
1
|
+
{"version":3,"names":["React","isArray","Animated","View","DefaultKeyExtractor","WmIcon","BaseComponent","BaseComponentState","SwipeAnimation","WmCarouselProps","DEFAULT_CLASS","WmCarouselState","constructor","arguments","_defineProperty","WmCarousel","props","bounds","e","_this$slideLayout","activeTabIndex","state","activeIndex","w","slideLayout","width","noOfTabs","type","dataset","children","lower","center","upper","computePhase","value","_this$slideLayout2","Math","abs","onLower","onSlideChange","onUpper","index","prevIndex","updateState","invokeEventCallback","item","renderSlide","data","length","_this$animationView","animationView","setPosition","_this$animationView2","goToUpper","_this$animationView3","goToLower","cleanup","push","stopPlay","generateItemKey","itemkey","_showSkeleton","keyExtractor","getKey","setSlideLayout","event","nativeEvent","layout","forceUpdate","autoPlay","animation","animationinterval","intervalId","setInterval","next","clearInterval","setTimeout","_this$animationView4","onPropertyChange","name","$new","$old","_this$keyExtractor","clear","min","renderPagination","maxNoOfDots","maxnoofdots","minIndex","max","maxIndex","createElement","style","styles","dotsWrapperStyle","map","key","dotStyle","activeDotStyle","renderWidget","_data","hasNavs","controls","hasDots","noOfSlides","root","onLayout","bind","_background","enableGestures","enablegestures","flexDirection","flexWrap","alignItems","height","undefined","direction","ref","r","handlers","animationHandlers","_this$animationView5","_this$animationView6","isActive","scale","animationPhase","interpolate","inputRange","outputRange","translateX","slide","firstSlide","lastSlide","activeSlide","transform","renderItem","btnPanel","id","getTestId","iconclass","prevBtn","onTap","prev","nextBtn"],"sources":["carousel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { isArray } from 'lodash-es';\nimport { Animated, View, Text, LayoutChangeEvent, LayoutRectangle } from 'react-native';\nimport { DefaultKeyExtractor } from '@wavemaker/app-rn-runtime/core/key.extractor';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport * as SwipeAnimation from '@wavemaker/app-rn-runtime/gestures/swipe.animation';\n\nimport WmCarouselProps from './carousel.props';\nimport { DEFAULT_CLASS, WmCarouselStyles } from './carousel.styles';\n\nexport class WmCarouselState extends BaseComponentState<WmCarouselProps> {\n activeIndex = 1;\n}\n\nexport default class WmCarousel extends BaseComponent<WmCarouselProps, WmCarouselState, WmCarouselStyles> {\n\n noOfSlides: number = 0;\n private slideLayout: LayoutRectangle = null as any;\n private keyExtractor = new DefaultKeyExtractor();\n stopPlay: Function = null as any;\n private animationView: SwipeAnimation.View | null = null as any;\n private animationHandlers = {\n bounds: (e) => {\n const activeTabIndex = this.state.activeIndex - 1,\n w = this.slideLayout?.width || 0,\n props = this.state.props,\n noOfTabs = props.type === 'dynamic' ? props.dataset : props.children;\n return {\n lower: -1 * (activeTabIndex - (activeTabIndex === 0 ? 0 : 1)) * w,\n center: -1 * activeTabIndex * w,\n upper: -1 * (activeTabIndex + (activeTabIndex === noOfTabs - 1 ? 0 : 1)) * w\n };\n },\n computePhase: (value) => {\n const w = this.slideLayout?.width || 0;\n return w && Math.abs(value / w);\n },\n onLower: (e) => {\n this.onSlideChange(this.state.activeIndex - 1);\n },\n onUpper: (e) => {\n this.onSlideChange(this.state.activeIndex + 1);\n }\n } as SwipeAnimation.Handlers;\n\n constructor(props: WmCarouselProps) {\n super(props, DEFAULT_CLASS, new WmCarouselProps(), new WmCarouselState());\n this.cleanup.push(() => {\n this.stopPlay && this.stopPlay();\n })\n }\n\n private generateItemKey(item: any, index: number, props: WmCarouselProps) {\n if (props.itemkey && item && !this._showSkeleton) {\n return props.itemkey(item, index);\n }\n return 'list_item_' + this.keyExtractor.getKey(item, true);\n }\n\n setSlideLayout(event: LayoutChangeEvent) {\n this.slideLayout = event.nativeEvent.layout;\n this.forceUpdate();\n }\n\n autoPlay() {\n const props = this.state.props;\n this.stopPlay && this.stopPlay();\n if (props.animation === 'auto' && props.animationinterval) {\n const intervalId = setInterval(() => {\n this.next();\n }, props.animationinterval * 1000);\n this.stopPlay = () => clearInterval(intervalId);\n } else {\n setTimeout(() => {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n }, 1000);\n }\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'dataset': {\n this.keyExtractor?.clear();\n this.updateState({\n activeIndex: Math.min(this.state.activeIndex, $new?.length || 0)\n } as WmCarouselState);\n break;\n }\n case 'animation':\n case 'animationinterval' : {\n this.autoPlay();\n }\n }\n }\n\n onSlideChange = (index: number) => {\n const prevIndex = this.state.activeIndex;\n this.updateState({\n activeIndex: index\n } as WmCarouselState,\n () => this.invokeEventCallback('onChange', [this, index, prevIndex]));\n }\n\n renderItem = (item: any, index: number) => {\n const props = this.state.props;\n if (props.type === 'dynamic') {\n return props.renderSlide ? props.renderSlide(item, index) : null;\n }\n return props.children[index];\n }\n\n next = () => {\n const props = this.state.props;\n const data = props.type === 'dynamic' ? props.dataset : props.children;\n if (this.state.activeIndex >= data?.length || 0) {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n } else {\n this.animationView?.goToUpper();\n }\n }\n\n prev = () => {\n this.animationView?.goToLower();\n }\n\n renderPagination(data: any) {\n const maxNoOfDots = this.state.props.maxnoofdots;\n let minIndex = Math.max(this.state.activeIndex - maxNoOfDots + 1, 0);\n let maxIndex = Math.min(minIndex + maxNoOfDots - 1, data.length);\n if (maxIndex === data.length) {\n minIndex = maxIndex - maxNoOfDots;\n }\n return (<View style={this.styles.dotsWrapperStyle}>\n {\n data.map((item: any, index: number) => {\n return index >= minIndex && index <= maxIndex ? (\n <View key={'dots_' + this.generateItemKey(item, index, this.state.props)} \n style={[\n this.styles.dotStyle,\n index === this.state.activeIndex - 1 ? this.styles.activeDotStyle: null]}>\n </View>) : null;\n })\n }\n </View>);\n }\n\n renderWidget(props: WmCarouselProps) {\n const hasNavs = props.controls === 'both' || props.controls ==='navs';\n const hasDots = props.controls === 'both' || props.controls ==='indicators';\n let styles = this.styles;\n let data = props.type === 'dynamic' ? props.dataset : props.children;\n data = isArray(data) ? data : [];\n this.noOfSlides = data?.length || 0;\n // TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608\n return (\n <View style={styles.root} onLayout={this.setSlideLayout.bind(this)}>\n {this._background}\n <SwipeAnimation.View \n enableGestures={props.enablegestures}\n style={{\n flexDirection: 'row',\n flexWrap: 'nowrap',\n alignItems: 'center',\n height: props.type === 'dynamic' ? undefined : '100%',\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\n >\n {data.map((item: any, index: number) => {\n const isActive = index === this.state.activeIndex - 1;\n let scale = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [0.8, 0.8, 1, 0.8, 0.8]\n });\n let translateX = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [-56, -56, 0, 56, 56]\n });\n return (\n <Animated.View key={this.generateItemKey(item, index, props)}\n style={[\n {height: props.type === 'dynamic' ? undefined : '100%'},\n this.styles.slide,\n index === 0 ? this.styles.firstSlide : null,\n index === data.length - 1 ? this.styles.lastSlide: null,\n isActive ? this.styles.activeSlide: null,\n translateX && scale ? {\n transform: [\n {\n translateX: translateX\n },\n {\n scale: scale\n }\n ]\n } : null]}>\n {this.renderItem(item, index)}\n </Animated.View>\n );\n })}\n </SwipeAnimation.View>\n {hasNavs ? (\n <View style={styles.btnPanel}>\n <WmIcon\n id={this.getTestId('prev_icon')}\n iconclass=\"wi wi-chevron-left fa-2x\"\n styles={styles.prevBtn}\n onTap={this.prev}/>\n <WmIcon\n id={this.getTestId('next_icon')}\n iconclass=\"wi wi-chevron-right fa-2x\"\n styles={styles.nextBtn}\n onTap={this.next}/>\n </View>): null}\n {hasDots && data ? this.renderPagination(data) : null}\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,QAAQ,EAAEC,IAAI,QAAkD,cAAc;AACvF,SAASC,mBAAmB,QAAQ,8CAA8C;AAClF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAO,KAAKC,cAAc,MAAM,oDAAoD;AAEpF,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AAEnE,OAAO,MAAMC,eAAe,SAASJ,kBAAkB,CAAkB;EAAAK,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,sBACzD,CAAC;EAAA;AACjB;AAEA,eAAe,MAAMC,UAAU,SAAST,aAAa,CAAqD;EA+BxGM,WAAWA,CAACI,MAAsB,EAAE;IAClC,KAAK,CAACA,MAAK,EAAEN,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,EAAE,IAAIE,eAAe,CAAC,CAAC,CAAC;IAACG,eAAA,qBA9BvD,CAAC;IAAAA,eAAA,sBACiB,IAAI;IAAAA,eAAA,uBACpB,IAAIV,mBAAmB,CAAC,CAAC;IAAAU,eAAA,mBAC3B,IAAI;IAAAA,eAAA,wBAC2B,IAAI;IAAAA,eAAA,4BAC5B;MAC1BG,MAAM,EAAGC,CAAC,IAAK;QAAA,IAAAC,iBAAA;QACb,MAAMC,cAAc,GAAG,IAAI,CAACC,KAAK,CAACC,WAAW,GA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AAM,EAAEA,MAAM,CAAC+C,OAAQ;MACvBC,KAAK,EAAE,IAAI,CAACC;IAAK,CAAC,CAAC,eACrB9I,KAAA,CAAA2F,aAAA,CAACtF,MAAM;MACLoI,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,WAAW,CAAE;MAChCC,SAAS,EAAC,2BAA2B;MACrC9C,MAAM,EAAEA,MAAM,CAACkD,OAAQ;MACvBF,KAAK,EAAE,IAAI,CAACnE;IAAK,CAAC,CAChB,CAAC,GAAG,IAAI,EACb6B,OAAO,IAAIxD,IAAI,GAAG,IAAI,CAACsC,gBAAgB,CAACtC,IAAI,CAAC,GAAG,IAC/C,CAAC;EACX;AACF"}
|
|
@@ -11,7 +11,10 @@ export default class WmCarouselProps extends BaseProps {
|
|
|
11
11
|
_defineProperty(this, "animationinterval", 3);
|
|
12
12
|
_defineProperty(this, "controls", 'both');
|
|
13
13
|
_defineProperty(this, "children", null);
|
|
14
|
+
_defineProperty(this, "itemkey", null);
|
|
14
15
|
_defineProperty(this, "renderSlide", void 0);
|
|
16
|
+
_defineProperty(this, "enablegestures", true);
|
|
17
|
+
_defineProperty(this, "maxnoofdots", 20);
|
|
15
18
|
}
|
|
16
19
|
}
|
|
17
20
|
//# sourceMappingURL=carousel.props.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseProps","WmCarouselProps","constructor","arguments","_defineProperty"],"sources":["carousel.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport React from 'react';\n\nexport default class WmCarouselProps extends BaseProps {\n dataset: any = null;\n type?: 'static' | 'dynamic' = 'static';\n animation?:
|
|
1
|
+
{"version":3,"names":["BaseProps","WmCarouselProps","constructor","arguments","_defineProperty"],"sources":["carousel.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport React from 'react';\n\nexport default class WmCarouselProps extends BaseProps {\n dataset: any = null;\n type?: 'static' | 'dynamic' = 'static';\n animation?: 'auto' | 'none' = 'auto';\n animationinterval?: number = 3;\n controls?: 'both' | 'none' | 'navs' | 'indicators' = 'both';\n children? = null as any;\n itemkey?: ($item: any, $index: any) => any = null as any;\n renderSlide?: ($item: any, $index: number) => React.ReactNode;\n enablegestures = true;\n maxnoofdots = 20;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAGzE,eAAe,MAAMC,eAAe,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,kBACtC,IAAI;IAAAA,eAAA,eACW,QAAQ;IAAAA,eAAA,oBACR,MAAM;IAAAA,eAAA,4BACP,CAAC;IAAAA,eAAA,mBACuB,MAAM;IAAAA,eAAA,mBAC/C,IAAI;IAAAA,eAAA,kBAC6B,IAAI;IAAAA,eAAA;IAAAA,eAAA,yBAE/B,IAAI;IAAAA,eAAA,sBACR,EAAE;EAAA;AAClB"}
|
|
@@ -15,6 +15,16 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
15
15
|
position: 'relative'
|
|
16
16
|
},
|
|
17
17
|
text: {},
|
|
18
|
+
slide: {
|
|
19
|
+
width: '100%',
|
|
20
|
+
paddingHorizontal: 16,
|
|
21
|
+
transform: [{
|
|
22
|
+
translateX: 0
|
|
23
|
+
}]
|
|
24
|
+
},
|
|
25
|
+
firstSlide: {},
|
|
26
|
+
lastSlide: {},
|
|
27
|
+
activeSlide: {},
|
|
18
28
|
btnPanel: {
|
|
19
29
|
position: 'absolute',
|
|
20
30
|
top: '50%',
|
|
@@ -53,25 +63,23 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
53
63
|
},
|
|
54
64
|
dotsWrapperStyle: {
|
|
55
65
|
opacity: 1,
|
|
56
|
-
height: 64,
|
|
57
|
-
marginTop: -64,
|
|
58
|
-
position: 'absolute',
|
|
59
|
-
top: '100%',
|
|
60
66
|
backgroundColor: themeVariables.carouselDotWrapperBgColor,
|
|
61
|
-
|
|
67
|
+
flexDirection: 'row',
|
|
68
|
+
justifyContent: 'center',
|
|
69
|
+
alignItems: 'center',
|
|
62
70
|
paddingTop: 4,
|
|
63
71
|
paddingBottom: 4
|
|
64
72
|
},
|
|
65
73
|
activeDotStyle: {
|
|
66
|
-
width: 12,
|
|
67
|
-
height: 12,
|
|
68
|
-
borderRadius: 10,
|
|
69
74
|
backgroundColor: themeVariables.carouselActiveDotColor,
|
|
70
75
|
opacity: 1
|
|
71
76
|
},
|
|
72
77
|
dotStyle: {
|
|
78
|
+
width: 8,
|
|
79
|
+
height: 8,
|
|
80
|
+
borderRadius: 10,
|
|
73
81
|
opacity: 0.2,
|
|
74
|
-
marginHorizontal:
|
|
82
|
+
marginHorizontal: 2,
|
|
75
83
|
backgroundColor: themeVariables.carouselDotColor
|
|
76
84
|
}
|
|
77
85
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","btn","height","width","borderRadius","borderColor","transparent","borderWidth","justifyContent","defaultStyles","root","position","text","btnPanel","top","marginTop","flexDirection","alignItems","prevBtn","marginLeft","backgroundColor","carouselPrevBgColor","fontSize","icon","color","carouselPrevBtnColor","nextBtn","marginRight","carouselNextBtnColor","dotsWrapperStyle","opacity","carouselDotWrapperBgColor","
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","btn","height","width","borderRadius","borderColor","transparent","borderWidth","justifyContent","defaultStyles","root","position","text","slide","paddingHorizontal","transform","translateX","firstSlide","lastSlide","activeSlide","btnPanel","top","marginTop","flexDirection","alignItems","prevBtn","marginLeft","backgroundColor","carouselPrevBgColor","fontSize","icon","color","carouselPrevBtnColor","nextBtn","marginRight","carouselNextBtnColor","dotsWrapperStyle","opacity","carouselDotWrapperBgColor","paddingTop","paddingBottom","activeDotStyle","carouselActiveDotColor","dotStyle","marginHorizontal","carouselDotColor","rotateY","defaultColorF","right","padding","alignSelf","primaryColor"],"sources":["carousel.styles.ts"],"sourcesContent":["import { ViewStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\nexport type WmCarouselStyles = BaseStyles & {\n btnPanel: AllStyle,\n prevBtn: WmIconStyles,\n slide: AllStyle,\n firstSlide: AllStyle,\n lastSlide: AllStyle,\n activeSlide: AllStyle,\n nextBtn: WmIconStyles,\n dotsWrapperStyle: AllStyle,\n dotStyle: AllStyle,\n activeDotStyle: AllStyle\n};\nexport const DEFAULT_CLASS = 'app-carousel';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const btn: ViewStyle = {\n height: 48,\n width: 48,\n borderRadius: 48,\n borderColor: themeVariables.transparent,\n borderWidth: 1,\n justifyContent: 'center'\n };\n const defaultStyles: WmCarouselStyles = defineStyles({\n root: {\n position: 'relative'\n },\n text: {},\n slide: {\n width: '100%',\n paddingHorizontal: 16,\n transform: [\n {\n translateX: 0\n }\n ]\n },\n firstSlide: {},\n lastSlide: {},\n activeSlide: {},\n btnPanel: {\n position: 'absolute',\n top: '50%',\n marginTop: -64,\n height: 64,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%'\n },\n prevBtn : {\n root: {\n marginLeft: 12,\n ...btn,\n backgroundColor: themeVariables.carouselPrevBgColor\n },\n text: {\n fontSize: 32\n },\n icon : {\n color: themeVariables.carouselPrevBtnColor\n }\n } as WmIconStyles,\n nextBtn : {\n root: {\n marginRight: 12,\n ...btn,\n backgroundColor: themeVariables.carouselPrevBgColor\n },\n text: {\n fontSize: 32\n },\n icon : {\n color: themeVariables.carouselNextBtnColor\n }\n } as WmIconStyles,\n dotsWrapperStyle:{\n opacity: 1,\n backgroundColor: themeVariables.carouselDotWrapperBgColor,\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n paddingTop: 4,\n paddingBottom: 4\n },\n activeDotStyle: {\n backgroundColor: themeVariables.carouselActiveDotColor,\n opacity: 1\n },\n dotStyle: {\n width: 8,\n height: 8,\n borderRadius: 10,\n opacity: 0.2,\n marginHorizontal: 2,\n backgroundColor: themeVariables.carouselDotColor\n }\n } as WmCarouselStyles);\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n prevBtn : {\n root:{\n transform: [{rotateY: '180deg'}]\n }\n },\n nextBtn : {\n root:{\n transform: [{rotateY: '180deg'}]\n }\n }\n });\n\n addStyle('app-carousel-1', '', {\n btnPanel: {\n top: '100%'\n },\n prevBtn: {\n root: {\n borderRadius: 6\n }\n },\n nextBtn: {\n root: {\n borderRadius: 6\n }\n }\n } as any as WmCarouselStyles);\n\n addStyle('app-carousel-2', '', {\n btnPanel: {\n backgroundColor: themeVariables.defaultColorF,\n width: '100%',\n top: '100%',\n right: 0,\n padding: 8,\n justifyContent: 'flex-end'\n },\n dotsWrapperStyle:{\n alignSelf: 'flex-start',\n justifyContent: 'flex-start'\n },\n activeDotStyle: {\n backgroundColor: themeVariables.primaryColor,\n },\n dotStyle: {\n backgroundColor: themeVariables.primaryColor,\n },\n prevBtn: {\n root: {\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderColor: themeVariables.primaryColor,\n },\n icon : {\n color: themeVariables.primaryColor\n }\n },\n nextBtn: {\n root: {\n marginLeft: 8,\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderColor: themeVariables.primaryColor,\n },\n icon : {\n color: themeVariables.primaryColor\n }\n }\n } as any as WmCarouselStyles);\n});"],"mappings":"AACA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAexF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAE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AE,EAAE,EAAE;IAC3BoB,QAAQ,EAAE;MACNO,eAAe,EAAE5B,cAAc,CAACgD,aAAa;MAC7C5C,KAAK,EAAE,MAAM;MACbkB,GAAG,EAAE,MAAM;MACX2B,KAAK,EAAE,CAAC;MACRC,OAAO,EAAE,CAAC;MACVzC,cAAc,EAAE;IACpB,CAAC;IACD4B,gBAAgB,EAAC;MACbc,SAAS,EAAE,YAAY;MACvB1C,cAAc,EAAE;IACpB,CAAC;IACDiC,cAAc,EAAE;MACZd,eAAe,EAAE5B,cAAc,CAACoD;IACpC,CAAC;IACDR,QAAQ,EAAE;MACNhB,eAAe,EAAE5B,cAAc,CAACoD;IACpC,CAAC;IACD1B,OAAO,EAAE;MACLf,IAAI,EAAE;QACFiB,eAAe,EAAE,0BAA0B;QAC3CtB,WAAW,EAAEN,cAAc,CAACoD;MAChC,CAAC;MACDrB,IAAI,EAAG;QACHC,KAAK,EAAEhC,cAAc,CAACoD;MAC1B;IACJ,CAAC;IACDlB,OAAO,EAAE;MACLvB,IAAI,EAAE;QACFgB,UAAU,EAAE,CAAC;QACbC,eAAe,EAAE,0BAA0B;QAC3CtB,WAAW,EAAEN,cAAc,CAACoD;MAChC,CAAC;MACDrB,IAAI,EAAG;QACHC,KAAK,EAAEhC,cAAc,CAACoD;MAC1B;IACJ;EACJ,CAA4B,CAAC;AACjC,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); }
|
|
@@ -28,9 +29,9 @@ export default class WmLogin extends BaseComponent {
|
|
|
28
29
|
renderWidget(props) {
|
|
29
30
|
return /*#__PURE__*/React.createElement(View, {
|
|
30
31
|
style: this.styles.root
|
|
31
|
-
}, this._background, this.state.errorMsg && /*#__PURE__*/React.createElement(Text, {
|
|
32
|
+
}, this._background, this.state.errorMsg && /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel('error'), {
|
|
32
33
|
style: this.styles.errorMsgStyles
|
|
33
|
-
}, this.state.errorMsg), /*#__PURE__*/React.createElement(View, {
|
|
34
|
+
}), this.state.errorMsg), /*#__PURE__*/React.createElement(View, {
|
|
34
35
|
style: this.styles.formStyles
|
|
35
36
|
}, props.children));
|
|
36
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","WmLoginProps","DEFAULT_CLASS","WmLoginState","constructor","arguments","_defineProperty","WmLogin","props","onLoginSuccess","response","onLoginError","error","updateState","errorMsg","message","doLogin","formData","onLogin","bind","renderWidget","createElement","style","styles","root","_background","state","errorMsgStyles","formStyles","children"],"sources":["login.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLoginProps from './login.props';\nimport { DEFAULT_CLASS, WmLoginStyles } from './login.styles';\nimport { AxiosError, AxiosResponse } from 'axios';\n\nexport class WmLoginState extends BaseComponentState<WmLoginProps> {\n errorMsg = '';\n}\n\nexport default class WmLogin extends BaseComponent<WmLoginProps, WmLoginState, WmLoginStyles> {\n constructor(props: WmLoginProps) {\n super(props, DEFAULT_CLASS, new WmLoginProps());\n }\n\n onLoginSuccess(response: AxiosResponse) {\n }\n\n onLoginError(error: AxiosError) {\n this.updateState({errorMsg: error?.message} as WmLoginState);\n }\n\n doLogin(formData: any) {\n this.props.onLogin(formData, this.onLoginSuccess.bind(this), this.onLoginError.bind(this));\n }\n\n renderWidget(props: WmLoginProps) {\n return (<View style={this.styles.root}>\n {this._background}\n {this.state.errorMsg && <Text style={this.styles.errorMsgStyles}>{this.state.errorMsg}</Text>}\n <View style={this.styles.formStyles}>{props.children}</View>\n </View>); \n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","WmLoginProps","DEFAULT_CLASS","WmLoginState","constructor","arguments","_defineProperty","WmLogin","props","onLoginSuccess","response","onLoginError","error","updateState","errorMsg","message","doLogin","formData","onLogin","bind","renderWidget","createElement","style","styles","root","_background","state","_extends","getTestPropsForLabel","errorMsgStyles","formStyles","children"],"sources":["login.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLoginProps from './login.props';\nimport { DEFAULT_CLASS, WmLoginStyles } from './login.styles';\nimport { AxiosError, AxiosResponse } from 'axios';\n\nexport class WmLoginState extends BaseComponentState<WmLoginProps> {\n errorMsg = '';\n}\n\nexport default class WmLogin extends BaseComponent<WmLoginProps, WmLoginState, WmLoginStyles> {\n constructor(props: WmLoginProps) {\n super(props, DEFAULT_CLASS, new WmLoginProps());\n }\n\n onLoginSuccess(response: AxiosResponse) {\n }\n\n onLoginError(error: AxiosError) {\n this.updateState({errorMsg: error?.message} as WmLoginState);\n }\n\n doLogin(formData: any) {\n this.props.onLogin(formData, this.onLoginSuccess.bind(this), this.onLoginError.bind(this));\n }\n\n renderWidget(props: WmLoginProps) {\n return (<View style={this.styles.root}>\n {this._background}\n {this.state.errorMsg && <Text {...this.getTestPropsForLabel('error')} style={this.styles.errorMsgStyles}>{this.state.errorMsg}</Text>}\n <View style={this.styles.formStyles}>{props.children}</View>\n </View>); \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,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAG7D,OAAO,MAAMC,YAAY,SAASH,kBAAkB,CAAe;EAAAI,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,mBACtD,EAAE;EAAA;AACf;AAEA,eAAe,MAAMC,OAAO,SAASR,aAAa,CAA4C;EAC5FK,WAAWA,CAACI,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,CAAC;EACjD;EAEAQ,cAAcA,CAACC,QAAuB,EAAE,CACxC;EAEAC,YAAYA,CAACC,KAAiB,EAAE;IAC9B,IAAI,CAACC,WAAW,CAAC;MAACC,QAAQ,EAAEF,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEG;IAAO,CAAiB,CAAC;EAC9D;EAEAC,OAAOA,CAACC,QAAa,EAAE;IACrB,IAAI,CAACT,KAAK,CAACU,OAAO,CAACD,QAAQ,EAAE,IAAI,CAACR,cAAc,CAACU,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAACR,YAAY,CAACQ,IAAI,CAAC,IAAI,CAAC,CAAC;EAC5F;EAEAC,YAAYA,CAACZ,KAAmB,EAAE;IAChC,oBAAQZ,KAAA,CAAAyB,aAAA,CAACvB,IAAI;MAACwB,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GACnC,IAAI,CAACC,WAAW,EAChB,IAAI,CAACC,KAAK,CAACZ,QAAQ,iBAAIlB,KAAA,CAAAyB,aAAA,CAACxB,IAAI,EAAA8B,QAAA,KAAK,IAAI,CAACC,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