@wavemaker/app-rn-runtime 11.5.2-rc.5436 → 11.5.3-next.141100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- app-rn-runtime/actions/login-action.js +0 -4
- app-rn-runtime/actions/login-action.js.map +1 -1
- app-rn-runtime/actions/logout-action.js +0 -4
- app-rn-runtime/actions/logout-action.js.map +1 -1
- app-rn-runtime/actions/notification-action.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js +31 -120
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +3 -7
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/advanced/login/login.component.js +2 -3
- 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 +16 -17
- 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 +0 -1
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +5 -7
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/animatedview.component.js +0 -50
- app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.component.js +0 -5
- app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +6 -7
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.styles.js +4 -14
- app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +1 -2
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +6 -9
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.props.js +0 -1
- app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +4 -65
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.props.js +0 -1
- app-rn-runtime/components/basic/label/label.props.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js +0 -8
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/message/message.component.js +3 -6
- app-rn-runtime/components/basic/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +5 -7
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +3 -4
- 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 +2 -3
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +5 -9
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +10 -11
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js +2 -6
- app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.styles.js +2 -3
- app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js +1 -2
- app-rn-runtime/components/basic/video/video.component.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +13 -41
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.props.js +1 -10
- app-rn-runtime/components/chart/area-chart/area-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +3 -35
- 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 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +40 -128
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +3 -15
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js +2 -38
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +3 -25
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js +1 -9
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.component.js +4 -26
- 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 +0 -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 +2 -24
- 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 +0 -1
- 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 +13 -54
- 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 +0 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +13 -16
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +22 -3
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +2 -3
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +61 -43
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.styles.js +2 -9
- app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +15 -29
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +10 -15
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +10 -18
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js +0 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +2 -3
- app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +18 -132
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.props.js +0 -4
- app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +5 -114
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +0 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +2 -3
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.component.js +0 -1
- 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 +2 -3
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +6 -12
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js +1 -5
- app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +8 -13
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +0 -1
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js +5 -12
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +0 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +1 -2
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.component.js +0 -1
- app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.styles.js +1 -2
- app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +1 -4
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +3 -9
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +2 -6
- 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 +0 -2
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js +8 -17
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +2 -6
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +2 -35
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js +0 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js +0 -4
- app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.styles.js +11 -22
- app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
- app-rn-runtime/components/input/calendar/views/month-view.js +0 -4
- 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 +7 -14
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +1 -2
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +4 -15
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.styles.js +12 -20
- app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +2 -5
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +4 -12
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +8 -23
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js +0 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +2 -5
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +2 -6
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +4 -7
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js +1 -2
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/rating/rating.component.js +0 -2
- app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +13 -17
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.styles.js +3 -6
- app-rn-runtime/components/input/select/select.styles.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.component.js +23 -99
- app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.styles.js +3 -30
- app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +5 -8
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +3 -5
- 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 +1 -5
- 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 +2 -3
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.styles.js +9 -21
- app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +3 -16
- 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/menu/menu.component.js +3 -5
- app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.styles.js +6 -10
- app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.component.js +4 -7
- app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +2 -5
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.styles.js +10 -14
- app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js +4 -7
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.styles.js +2 -8
- 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 +1 -6
- app-rn-runtime/components/page/left-panel/left-panel.styles.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +3 -11
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js +6 -7
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.props.js +0 -1
- app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
- app-rn-runtime/core/base.component.js +37 -80
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/formatters.js +2 -9
- app-rn-runtime/core/formatters.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +5 -15
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/utils.js +0 -16
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/gestures/swipe.animation.js +5 -56
- app-rn-runtime/gestures/swipe.animation.js.map +1 -1
- app-rn-runtime/package.json +3 -4
- app-rn-runtime/runtime/App.js +21 -51
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +6 -27
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +2 -8
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/services/app-i18n.service.js +0 -7
- app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-modal.service.js +1 -1
- app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
- app-rn-runtime/runtime/services/device/camera-service.js +9 -26
- app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/scan-service.js +2 -16
- app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +3 -17
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/components/container/panel/collapsible-pane.component.js +0 -26
- app-rn-runtime/components/container/panel/collapsible-pane.component.js.map +0 -1
- app-rn-runtime/core/constant.service.js +0 -22
- app-rn-runtime/core/constant.service.js.map +0 -1
- app-rn-runtime/core/testid.provider.js +0 -5
- app-rn-runtime/core/testid.provider.js.map +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BaseAction } from "./base-action";
|
|
2
|
-
import { VariableEvents } from '../variables/base-variable';
|
|
3
2
|
import { get } from 'lodash';
|
|
4
3
|
export class LoginAction extends BaseAction {
|
|
5
4
|
constructor(config) {
|
|
@@ -10,7 +9,6 @@ export class LoginAction extends BaseAction {
|
|
|
10
9
|
if (!get(options, 'formData')) {
|
|
11
10
|
params = this.config.paramProvider();
|
|
12
11
|
}
|
|
13
|
-
this.notify(VariableEvents.BEFORE_INVOKE, [this, params]);
|
|
14
12
|
return this.config.securityService().appLogin({
|
|
15
13
|
baseURL: this.config.baseURL,
|
|
16
14
|
formData: get(options, 'formData') || params,
|
|
@@ -18,14 +16,12 @@ export class LoginAction extends BaseAction {
|
|
|
18
16
|
}).then(data => {
|
|
19
17
|
this.config.onSuccess && this.config.onSuccess(this, get(data, 'userInfo'));
|
|
20
18
|
successcb && successcb(data);
|
|
21
|
-
this.notify(VariableEvents.AFTER_INVOKE, [this, data]);
|
|
22
19
|
if (this.config.useDefaultSuccessHandler) {
|
|
23
20
|
this.config.securityService().navigateToLandingPage(data);
|
|
24
21
|
}
|
|
25
22
|
}).catch(error => {
|
|
26
23
|
this.config.onError && this.config.onError(this, error);
|
|
27
24
|
errorcb && errorcb(error);
|
|
28
|
-
this.notify(VariableEvents.AFTER_INVOKE, [this, error]);
|
|
29
25
|
});
|
|
30
26
|
}
|
|
31
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseAction","
|
|
1
|
+
{"version":3,"names":["BaseAction","get","LoginAction","constructor","config","invoke","options","successcb","errorcb","params","paramProvider","securityService","appLogin","baseURL","formData","useDefaultSuccessHandler","then","data","onSuccess","navigateToLandingPage","catch","error","onError"],"sources":["login-action.ts"],"sourcesContent":["import { ActionConfig, BaseAction } from \"./base-action\";\nimport { SecurityService } from \"@wavemaker/app-rn-runtime/core/security.service\";\nimport { get } from 'lodash';\nexport interface LoginActionConfig extends ActionConfig {\n securityService: () => SecurityService;\n baseURL: String;\n useDefaultSuccessHandler: boolean;\n}\nexport class LoginAction extends BaseAction<LoginActionConfig> {\n constructor(config: LoginActionConfig) {\n super(config);\n }\n\n invoke(options: any, successcb?: Function, errorcb?: Function) {\n let params;\n if (!get(options, 'formData')) {\n params = this.config.paramProvider();\n }\n return this.config.securityService().appLogin(\n {\n baseURL: this.config.baseURL,\n formData: get(options, 'formData') || params,\n useDefaultSuccessHandler: this.config.useDefaultSuccessHandler\n })\n .then((data: any) => {\n this.config.onSuccess && this.config.onSuccess(this, get(data, 'userInfo'));\n successcb && successcb(data);\n if (this.config.useDefaultSuccessHandler) {\n this.config.securityService().navigateToLandingPage(data);\n }\n })\n .catch((error: any) => {\n this.config.onError && this.config.onError(this, error);\n errorcb && errorcb(error);\n });\n }\n}\n"],"mappings":"AAAA,SAAuBA,UAAU,QAAQ,eAAe;AAExD,SAASC,GAAG,QAAQ,QAAQ;AAM5B,OAAO,MAAMC,WAAW,SAASF,UAAU,CAAoB;EAC3DG,WAAWA,CAACC,MAAyB,EAAE;IACnC,KAAK,CAACA,MAAM,CAAC;EACjB;EAEAC,MAAMA,CAACC,OAAY,EAAEC,SAAoB,EAAEC,OAAkB,EAAE;IAC7D,IAAIC,MAAM;IACV,IAAI,CAACR,GAAG,CAACK,OAAO,EAAE,UAAU,CAAC,EAAE;MAC7BG,MAAM,GAAG,IAAI,CAACL,MAAM,CAACM,aAAa,CAAC,CAAC;IACtC;IACA,OAAO,IAAI,CAACN,MAAM,CAACO,eAAe,CAAC,CAAC,CAACC,QAAQ,CAC3C;MACEC,OAAO,EAAE,IAAI,CAACT,MAAM,CAACS,OAAO;MAC5BC,QAAQ,EAAEb,GAAG,CAACK,OAAO,EAAE,UAAU,CAAC,IAAIG,MAAM;MAC5CM,wBAAwB,EAAE,IAAI,CAACX,MAAM,CAACW;IAC1C,CAAC,CAAC,CACCC,IAAI,CAAEC,IAAS,IAAK;MACjB,IAAI,CAACb,MAAM,CAACc,SAAS,IAAI,IAAI,CAACd,MAAM,CAACc,SAAS,CAAC,IAAI,EAAEjB,GAAG,CAACgB,IAAI,EAAE,UAAU,CAAC,CAAC;MAC3EV,SAAS,IAAIA,SAAS,CAACU,IAAI,CAAC;MAC5B,IAAI,IAAI,CAACb,MAAM,CAACW,wBAAwB,EAAE;QACxC,IAAI,CAACX,MAAM,CAACO,eAAe,CAAC,CAAC,CAACQ,qBAAqB,CAACF,IAAI,CAAC;MAC3D;IACJ,CAAC,CAAC,CACDG,KAAK,CAAEC,KAAU,IAAK;MACnB,IAAI,CAACjB,MAAM,CAACkB,OAAO,IAAI,IAAI,CAAClB,MAAM,CAACkB,OAAO,CAAC,IAAI,EAAED,KAAK,CAAC;MACvDb,OAAO,IAAIA,OAAO,CAACa,KAAK,CAAC;IAC7B,CAAC,CAAC;EACN;AACJ"}
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
import { BaseAction } from "./base-action";
|
|
2
|
-
import { VariableEvents } from '../variables/base-variable';
|
|
3
2
|
export class LogoutAction extends BaseAction {
|
|
4
3
|
constructor(config) {
|
|
5
4
|
super(config);
|
|
6
5
|
}
|
|
7
6
|
invoke(options, successcb, errorcb) {
|
|
8
|
-
this.notify(VariableEvents.BEFORE_INVOKE, [this]);
|
|
9
7
|
return this.config.securityService().appLogout({
|
|
10
8
|
baseURL: this.config.baseURL
|
|
11
9
|
}).then(data => {
|
|
12
|
-
this.notify(VariableEvents.AFTER_INVOKE, [this, data]);
|
|
13
10
|
this.config.onSuccess && this.config.onSuccess(this, data);
|
|
14
11
|
successcb && successcb(data);
|
|
15
12
|
}).catch(error => {
|
|
16
13
|
this.config.onError && this.config.onError(this, error);
|
|
17
14
|
errorcb && errorcb(error);
|
|
18
|
-
this.notify(VariableEvents.AFTER_INVOKE, [this, error]);
|
|
19
15
|
});
|
|
20
16
|
}
|
|
21
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseAction","
|
|
1
|
+
{"version":3,"names":["BaseAction","LogoutAction","constructor","config","invoke","options","successcb","errorcb","securityService","appLogout","baseURL","then","data","onSuccess","catch","error","onError"],"sources":["logout-action.ts"],"sourcesContent":["import { ActionConfig, BaseAction } from \"./base-action\";\nimport { SecurityService } from \"@wavemaker/app-rn-runtime/core/security.service\";\nexport interface LogoutActionConfig extends ActionConfig {\n securityService: () => SecurityService;\n baseURL: String;\n}\nexport class LogoutAction extends BaseAction<LogoutActionConfig> {\n constructor(config: LogoutActionConfig) {\n super(config);\n }\n\n invoke(options: any, successcb?: Function, errorcb?: Function) {\n return this.config.securityService().appLogout({baseURL: this.config.baseURL})\n .then((data: any) => {\n this.config.onSuccess && this.config.onSuccess(this, data);\n successcb && successcb(data);\n })\n .catch((error: any) => {\n this.config.onError && this.config.onError(this, error);\n errorcb && errorcb(error);\n });\n }\n}"],"mappings":"AAAA,SAAuBA,UAAU,QAAQ,eAAe;AAMxD,OAAO,MAAMC,YAAY,SAASD,UAAU,CAAqB;EAC7DE,WAAWA,CAACC,MAA0B,EAAE;IACpC,KAAK,CAACA,MAAM,CAAC;EACjB;EAEAC,MAAMA,CAACC,OAAY,EAAEC,SAAoB,EAAEC,OAAkB,EAAE;IAC3D,OAAO,IAAI,CAACJ,MAAM,CAACK,eAAe,CAAC,CAAC,CAACC,SAAS,CAAC;MAACC,OAAO,EAAE,IAAI,CAACP,MAAM,CAACO;IAAO,CAAC,CAAC,CAC7EC,IAAI,CAAEC,IAAS,IAAK;MACjB,IAAI,CAACT,MAAM,CAACU,SAAS,IAAI,IAAI,CAACV,MAAM,CAACU,SAAS,CAAC,IAAI,EAAED,IAAI,CAAC;MAC1DN,SAAS,IAAIA,SAAS,CAACM,IAAI,CAAC;IAChC,CAAC,CAAC,CACDE,KAAK,CAAEC,KAAU,IAAK;MACnB,IAAI,CAACZ,MAAM,CAACa,OAAO,IAAI,IAAI,CAACb,MAAM,CAACa,OAAO,CAAC,IAAI,EAAED,KAAK,CAAC;MACvDR,OAAO,IAAIA,OAAO,CAACQ,KAAK,CAAC;IAC7B,CAAC,CAAC;EACN;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseAction","DEFAULT_DURATION","NotificationAction","constructor","config","_defineProperty","showDialog","prepareToastOptions","_options$class","_params$class","options","arguments","length","undefined","params","paramProvider","o","text","message","type","class","toLowerCase","onClose","onClick","onOk","content","partialContent","hideOnClick","toasterPosition","position","placement","split","styles","top","bottom","duration","parseInt","name","getMessage","invoke","success","error","operation","toasterService","showToast","onCancel"],"sources":["notification-action.ts"],"sourcesContent":["import { ActionConfig, BaseAction } from \"./base-action\";\nimport { ToastOptions, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\nimport React from 'react';\nexport interface NotificationActionConfig extends ActionConfig {\n showDialog: Function;\n onOk: any;\n onCancel: any;\n onClose: any;\n operation: string;\n partialContent: React.ReactNode;\n toasterService: () => ToastService;\n}\nconst DEFAULT_DURATION = 3000;\nexport class NotificationAction extends BaseAction<NotificationActionConfig> {\n showDialog: Function;\n constructor(config: NotificationActionConfig) {\n super(config);\n this.showDialog = config.showDialog;\n }\n\n prepareToastOptions(options: any = {}) {\n const params = this.config.paramProvider();\n const o = {} as ToastOptions;\n o.text = options.message || params.text;\n o.type = options.class?.toLowerCase() || params.class?.toLowerCase();\n o.onClose = () => {\n this.config.onClose && this.config.onClose(this);\n },\n o.onClick = () => {\n this.config.onOk && this.config.onOk(this);\n },\n o.content = this.config.partialContent;\n o.hideOnClick = options.hideOnClick || true;\n const toasterPosition = options.position || params.toasterPosition || 'bottom right';\n const placement = toasterPosition.split(' ')[0];\n switch(placement) {\n case 'top':\n o.styles = {top: 0};\n break;\n case 'bottom':\n o.styles = {bottom: 0};\n break;\n case 'center':\n o.styles = {top: '50%'};\n break;\n }\n if (this.config.partialContent) {\n if (!o.styles) {\n o.styles = {};\n }\n }\n if (!params.duration) {\n params.duration = (params.duration !== 0 && o.type === 'success') ? DEFAULT_DURATION : 0;\n }\n o.duration = parseInt(options.duration || params.duration);\n o.name = this.name;\n return o;\n }\n\n
|
|
1
|
+
{"version":3,"names":["BaseAction","DEFAULT_DURATION","NotificationAction","constructor","config","_defineProperty","showDialog","prepareToastOptions","_options$class","_params$class","options","arguments","length","undefined","params","paramProvider","o","text","message","type","class","toLowerCase","onClose","onClick","onOk","content","partialContent","hideOnClick","toasterPosition","position","placement","split","styles","top","bottom","duration","parseInt","name","getMessage","invoke","success","error","operation","toasterService","showToast","onCancel"],"sources":["notification-action.ts"],"sourcesContent":["import { ActionConfig, BaseAction } from \"./base-action\";\nimport { ToastOptions, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\nimport React from 'react';\nexport interface NotificationActionConfig extends ActionConfig {\n showDialog: Function;\n onOk: any;\n onCancel: any;\n onClose: any;\n operation: string;\n partialContent: React.ReactNode;\n toasterService: () => ToastService;\n}\nconst DEFAULT_DURATION = 3000;\nexport class NotificationAction extends BaseAction<NotificationActionConfig> {\n showDialog: Function;\n constructor(config: NotificationActionConfig) {\n super(config);\n this.showDialog = config.showDialog;\n }\n\n prepareToastOptions(options: any = {}) {\n const params = this.config.paramProvider();\n const o = {} as ToastOptions;\n o.text = options.message || params.text;\n o.type = options.class?.toLowerCase() || params.class?.toLowerCase();\n o.onClose = () => {\n this.config.onClose && this.config.onClose(this);\n },\n o.onClick = () => {\n this.config.onOk && this.config.onOk(this);\n },\n o.content = this.config.partialContent;\n o.hideOnClick = options.hideOnClick || true;\n const toasterPosition = options.position || params.toasterPosition || 'bottom right';\n const placement = toasterPosition.split(' ')[0];\n switch(placement) {\n case 'top':\n o.styles = {top: 0};\n break;\n case 'bottom':\n o.styles = {bottom: 0};\n break;\n case 'center':\n o.styles = {top: '50%'};\n break;\n }\n if (this.config.partialContent) {\n if (!o.styles) {\n o.styles = {};\n }\n }\n if (!params.duration) {\n params.duration = (params.duration !== 0 && o.type === 'success') ? DEFAULT_DURATION : 0;\n }\n o.duration = parseInt(options.duration || params.duration);\n o.name = this.name;\n return o;\n }\n\n getMessage() {\n return this.config.paramProvider().text;\n }\n\n invoke(options: any, success: any, error: any) {\n super.invoke(options, success, error);\n if (this.config.operation === 'toast') {\n const toasterService = this.config.toasterService();\n return toasterService.showToast(this.prepareToastOptions(options));\n } else {\n return this.showDialog && this.showDialog({...this.params, onOk: this.config.onOk, onCancel: this.config.onCancel, onClose: this.config.onClose});\n }\n }\n}\n"],"mappings":";;;AAAA,SAAuBA,UAAU,QAAQ,eAAe;AAYxD,MAAMC,gBAAgB,GAAG,IAAI;AAC7B,OAAO,MAAMC,kBAAkB,SAASF,UAAU,CAA2B;EAEzEG,WAAWA,CAACC,MAAgC,EAAE;IAC1C,KAAK,CAACA,MAAM,CAAC;IAACC,eAAA;IACd,IAAI,CAACC,UAAU,GAAGF,MAAM,CAACE,UAAU;EACvC;EAEAC,mBAAmBA,CAAA,EAAoB;IAAA,IAAAC,cAAA,EAAAC,aAAA;IAAA,IAAnBC,OAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;IACjC,MAAMG,MAAM,GAAG,IAAI,CAACV,MAAM,CAACW,aAAa,CAAC,CAAC;IAC1C,MAAMC,CAAC,GAAG,CAAC,CAAiB;IAC5BA,CAAC,CAACC,IAAI,GAAGP,OAAO,CAACQ,OAAO,IAAIJ,MAAM,CAACG,IAAI;IACvCD,CAAC,CAACG,IAAI,GAAG,EAAAX,cAAA,GAAAE,OAAO,CAACU,KAAK,cAAAZ,cAAA,uBAAbA,cAAA,CAAea,WAAW,CAAC,CAAC,OAAAZ,aAAA,GAAIK,MAAM,CAACM,KAAK,cAAAX,aAAA,uBAAZA,aAAA,CAAcY,WAAW,CAAC,CAAC;IACpEL,CAAC,CAACM,OAAO,GAAG,MAAM;MACd,IAAI,CAAClB,MAAM,CAACkB,OAAO,IAAI,IAAI,CAAClB,MAAM,CAACkB,OAAO,CAAC,IAAI,CAAC;IACpD,CAAC,EACDN,CAAC,CAACO,OAAO,GAAG,MAAM;MACd,IAAI,CAACnB,MAAM,CAACoB,IAAI,IAAI,IAAI,CAACpB,MAAM,CAACoB,IAAI,CAAC,IAAI,CAAC;IAC9C,CAAC,EACDR,CAAC,CAACS,OAAO,GAAG,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AE;IAC3C,KAAK,CAACF,MAAM,CAAC7B,OAAO,EAAE8B,OAAO,EAAEC,KAAK,CAAC;IACrC,IAAI,IAAI,CAACrC,MAAM,CAACsC,SAAS,KAAK,OAAO,EAAE;MACnC,MAAMC,cAAc,GAAG,IAAI,CAACvC,MAAM,CAACuC,cAAc,CAAC,CAAC;MACnD,OAAOA,cAAc,CAACC,SAAS,CAAC,IAAI,CAACrC,mBAAmB,CAACG,OAAO,CAAC,CAAC;IACtE,CAAC,MAAM;MACH,OAAO,IAAI,CAACJ,UAAU,IAAI,IAAI,CAACA,UAAU,CAAC;QAAC,GAAG,IAAI,CAACQ,MAAM;QAAEU,IAAI,EAAE,IAAI,CAACpB,MAAM,CAACoB,IAAI;QAAEqB,QAAQ,EAAE,IAAI,CAACzC,MAAM,CAACyC,QAAQ;QAAEvB,OAAO,EAAE,IAAI,CAAClB,MAAM,CAACkB;MAAO,CAAC,CAAC;IACrJ;EACJ;AACJ"}
|
|
@@ -2,8 +2,8 @@ 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 { isArray
|
|
6
|
-
import { Animated,
|
|
5
|
+
import { isArray } from 'lodash-es';
|
|
6
|
+
import { Animated, View } from 'react-native';
|
|
7
7
|
import { DefaultKeyExtractor } from '@wavemaker/app-rn-runtime/core/key.extractor';
|
|
8
8
|
import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';
|
|
9
9
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
@@ -20,32 +20,25 @@ export default class WmCarousel extends BaseComponent {
|
|
|
20
20
|
constructor(_props) {
|
|
21
21
|
super(_props, DEFAULT_CLASS, new WmCarouselProps(), new WmCarouselState());
|
|
22
22
|
_defineProperty(this, "noOfSlides", 0);
|
|
23
|
-
_defineProperty(this, "
|
|
23
|
+
_defineProperty(this, "slideLayout", null);
|
|
24
24
|
_defineProperty(this, "keyExtractor", new DefaultKeyExtractor());
|
|
25
25
|
_defineProperty(this, "stopPlay", null);
|
|
26
|
-
_defineProperty(this, "dotScale", new Animated.Value(0));
|
|
27
|
-
_defineProperty(this, "dotPosition", new Animated.Value(0));
|
|
28
26
|
_defineProperty(this, "animationView", null);
|
|
29
27
|
_defineProperty(this, "animationHandlers", {
|
|
30
28
|
bounds: e => {
|
|
31
|
-
var _this$
|
|
32
|
-
const activeTabIndex = this.state.activeIndex - 1
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
lower = this.slidesLayout.filter((l, i) => i < activeTabIndex - 1).reduce((s, l) => s + l.width, 0);
|
|
36
|
-
}
|
|
37
|
-
let center = lower + (((_this$slidesLayout = this.slidesLayout[activeTabIndex - 1]) === null || _this$slidesLayout === void 0 ? void 0 : _this$slidesLayout.width) || 0);
|
|
38
|
-
let upper = center + (((_this$slidesLayout$ac = this.slidesLayout[activeTabIndex]) === null || _this$slidesLayout$ac === void 0 ? void 0 : _this$slidesLayout$ac.width) || 0);
|
|
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
|
+
noOfTabs = this.state.props.dataset.length;
|
|
39
33
|
return {
|
|
40
|
-
lower: -1 *
|
|
41
|
-
center: -1 *
|
|
42
|
-
upper: -1 *
|
|
34
|
+
lower: -1 * (activeTabIndex - (activeTabIndex === 0 ? 0 : 1)) * w,
|
|
35
|
+
center: -1 * activeTabIndex * w,
|
|
36
|
+
upper: -1 * (activeTabIndex + (activeTabIndex === noOfTabs - 1 ? 0 : 1)) * w
|
|
43
37
|
};
|
|
44
38
|
},
|
|
45
39
|
computePhase: value => {
|
|
46
|
-
var _this$
|
|
47
|
-
const
|
|
48
|
-
const w = ((_this$slidesLayout$ac2 = this.slidesLayout[activeTabIndex]) === null || _this$slidesLayout$ac2 === void 0 ? void 0 : _this$slidesLayout$ac2.width) || 0;
|
|
40
|
+
var _this$slideLayout2;
|
|
41
|
+
const w = ((_this$slideLayout2 = this.slideLayout) === null || _this$slideLayout2 === void 0 ? void 0 : _this$slideLayout2.width) || 0;
|
|
49
42
|
return w && Math.abs(value / w);
|
|
50
43
|
},
|
|
51
44
|
onLower: e => {
|
|
@@ -60,19 +53,16 @@ export default class WmCarousel extends BaseComponent {
|
|
|
60
53
|
this.updateState({
|
|
61
54
|
activeIndex: index
|
|
62
55
|
}, () => this.invokeEventCallback('onChange', [this, index, prevIndex]));
|
|
63
|
-
this.animatePagination(index);
|
|
64
56
|
});
|
|
65
57
|
_defineProperty(this, "renderItem", (item, index) => {
|
|
66
58
|
const props = this.state.props;
|
|
67
59
|
if (props.type === 'dynamic') {
|
|
68
|
-
return props.renderSlide ? props.renderSlide(item, index
|
|
60
|
+
return props.renderSlide ? props.renderSlide(item, index) : null;
|
|
69
61
|
}
|
|
70
62
|
return props.children[index];
|
|
71
63
|
});
|
|
72
64
|
_defineProperty(this, "next", () => {
|
|
73
|
-
|
|
74
|
-
const data = props.type === 'dynamic' ? props.dataset : props.children;
|
|
75
|
-
if (this.state.activeIndex >= (data === null || data === void 0 ? void 0 : data.length) || 0) {
|
|
65
|
+
if (this.state.activeIndex >= this.state.props.dataset.length) {
|
|
76
66
|
var _this$animationView;
|
|
77
67
|
this.onSlideChange(1);
|
|
78
68
|
(_this$animationView = this.animationView) === null || _this$animationView === void 0 ? void 0 : _this$animationView.setPosition(0);
|
|
@@ -89,18 +79,16 @@ export default class WmCarousel extends BaseComponent {
|
|
|
89
79
|
this.stopPlay && this.stopPlay();
|
|
90
80
|
});
|
|
91
81
|
}
|
|
92
|
-
addSlideLayout(index, nativeEvent) {
|
|
93
|
-
this.slidesLayout[index] = nativeEvent.nativeEvent.layout;
|
|
94
|
-
if (index === this.state.activeIndex) {
|
|
95
|
-
this.forceUpdate();
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
82
|
generateItemKey(item, index, props) {
|
|
99
83
|
if (props.itemkey && item && !this._showSkeleton) {
|
|
100
84
|
return props.itemkey(item, index);
|
|
101
85
|
}
|
|
102
86
|
return 'list_item_' + this.keyExtractor.getKey(item, true);
|
|
103
87
|
}
|
|
88
|
+
setSlideLayout(event) {
|
|
89
|
+
this.slideLayout = event.nativeEvent.layout;
|
|
90
|
+
this.forceUpdate();
|
|
91
|
+
}
|
|
104
92
|
autoPlay() {
|
|
105
93
|
const props = this.state.props;
|
|
106
94
|
this.stopPlay && this.stopPlay();
|
|
@@ -125,7 +113,7 @@ export default class WmCarousel extends BaseComponent {
|
|
|
125
113
|
var _this$keyExtractor;
|
|
126
114
|
(_this$keyExtractor = this.keyExtractor) === null || _this$keyExtractor === void 0 ? void 0 : _this$keyExtractor.clear();
|
|
127
115
|
this.updateState({
|
|
128
|
-
activeIndex: Math.min(this.state.activeIndex, ($new === null || $new === void 0 ? void 0 : $new.length) ||
|
|
116
|
+
activeIndex: Math.min(this.state.activeIndex, ($new === null || $new === void 0 ? void 0 : $new.length) || 0)
|
|
129
117
|
});
|
|
130
118
|
break;
|
|
131
119
|
}
|
|
@@ -136,43 +124,6 @@ export default class WmCarousel extends BaseComponent {
|
|
|
136
124
|
}
|
|
137
125
|
}
|
|
138
126
|
}
|
|
139
|
-
animatePagination(index) {
|
|
140
|
-
var _this$styles$dotStyle, _this$styles$dotStyle2, _this$styles$dotStyle3;
|
|
141
|
-
const prevIndex = this.state.activeIndex;
|
|
142
|
-
const margin = (((_this$styles$dotStyle = this.styles.dotStyle) === null || _this$styles$dotStyle === void 0 ? void 0 : _this$styles$dotStyle.marginLeft) || 0) + (((_this$styles$dotStyle2 = this.styles.dotStyle) === null || _this$styles$dotStyle2 === void 0 ? void 0 : _this$styles$dotStyle2.marginRight) || 0);
|
|
143
|
-
const width = ((_this$styles$dotStyle3 = this.styles.dotStyle) === null || _this$styles$dotStyle3 === void 0 ? void 0 : _this$styles$dotStyle3.width) || 2;
|
|
144
|
-
const size = margin + width;
|
|
145
|
-
const position = Math.max(index - 1, 0) * size;
|
|
146
|
-
const scale = Math.abs(index - prevIndex) * size;
|
|
147
|
-
const options = {
|
|
148
|
-
useNativeDriver: true,
|
|
149
|
-
duration: 200,
|
|
150
|
-
easing: Easing.out(Easing.linear)
|
|
151
|
-
};
|
|
152
|
-
if (prevIndex < index) {
|
|
153
|
-
Animated.sequence([Animated.timing(this.dotScale, {
|
|
154
|
-
toValue: scale,
|
|
155
|
-
...options
|
|
156
|
-
}), Animated.parallel([Animated.timing(this.dotScale, {
|
|
157
|
-
toValue: 0,
|
|
158
|
-
...options
|
|
159
|
-
}), Animated.timing(this.dotPosition, {
|
|
160
|
-
toValue: (this.isRTL ? -1 : 1) * position,
|
|
161
|
-
...options
|
|
162
|
-
})])]).start();
|
|
163
|
-
} else if (prevIndex > index) {
|
|
164
|
-
Animated.sequence([Animated.parallel([Animated.timing(this.dotScale, {
|
|
165
|
-
toValue: scale,
|
|
166
|
-
...options
|
|
167
|
-
}), Animated.timing(this.dotPosition, {
|
|
168
|
-
toValue: (this.isRTL ? -1 : 1) * position,
|
|
169
|
-
...options
|
|
170
|
-
})]), Animated.timing(this.dotScale, {
|
|
171
|
-
toValue: 0,
|
|
172
|
-
...options
|
|
173
|
-
})]).start();
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
127
|
renderPagination(data) {
|
|
177
128
|
const maxNoOfDots = this.state.props.maxnoofdots;
|
|
178
129
|
let minIndex = Math.max(this.state.activeIndex - maxNoOfDots + 1, 0);
|
|
@@ -182,72 +133,43 @@ export default class WmCarousel extends BaseComponent {
|
|
|
182
133
|
}
|
|
183
134
|
return /*#__PURE__*/React.createElement(View, {
|
|
184
135
|
style: this.styles.dotsWrapperStyle
|
|
185
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
186
|
-
style: {
|
|
187
|
-
flexDirection: this.isRTL ? 'row-reverse' : 'row'
|
|
188
|
-
}
|
|
189
136
|
}, data.map((item, index) => {
|
|
190
137
|
return index >= minIndex && index <= maxIndex ? /*#__PURE__*/React.createElement(View, {
|
|
191
138
|
key: 'dots_' + this.generateItemKey(item, index, this.state.props),
|
|
192
|
-
style: [this.styles.dotStyle]
|
|
139
|
+
style: [this.styles.dotStyle, index === this.state.activeIndex - 1 ? this.styles.activeDotStyle : null]
|
|
193
140
|
}) : null;
|
|
194
|
-
})
|
|
195
|
-
style: [this.styles.dotStyle, this.styles.activeDotStyle, {
|
|
196
|
-
width: undefined,
|
|
197
|
-
height: undefined,
|
|
198
|
-
transform: [{
|
|
199
|
-
translateX: this.dotPosition
|
|
200
|
-
}]
|
|
201
|
-
}, this.isRTL ? {
|
|
202
|
-
right: 0
|
|
203
|
-
} : {
|
|
204
|
-
left: 0
|
|
205
|
-
}]
|
|
206
|
-
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
207
|
-
style: [{
|
|
208
|
-
width: 1,
|
|
209
|
-
height: 1
|
|
210
|
-
}, {
|
|
211
|
-
// This is failing in Android
|
|
212
|
-
// minWidth: this.dotScale
|
|
213
|
-
}]
|
|
214
|
-
}))));
|
|
141
|
+
}));
|
|
215
142
|
}
|
|
216
143
|
renderWidget(props) {
|
|
217
|
-
var _data
|
|
144
|
+
var _data;
|
|
218
145
|
const hasNavs = props.controls === 'both' || props.controls === 'navs';
|
|
219
146
|
const hasDots = props.controls === 'both' || props.controls === 'indicators';
|
|
220
147
|
let styles = this.styles;
|
|
221
148
|
let data = props.type === 'dynamic' ? props.dataset : props.children;
|
|
222
149
|
data = isArray(data) ? data : [];
|
|
223
150
|
this.noOfSlides = ((_data = data) === null || _data === void 0 ? void 0 : _data.length) || 0;
|
|
224
|
-
let slideScale = undefined;
|
|
225
|
-
let slideTranslateX = undefined;
|
|
226
|
-
if (isArray((_this$styles$slide = this.styles.slide) === null || _this$styles$slide === void 0 ? void 0 : _this$styles$slide.transform)) {
|
|
227
|
-
var _this$styles$slide2, _this$styles$slide3;
|
|
228
|
-
slideScale = (_this$styles$slide2 = this.styles.slide) === null || _this$styles$slide2 === void 0 || (_this$styles$slide2 = _this$styles$slide2.transform) === null || _this$styles$slide2 === void 0 || (_this$styles$slide2 = _this$styles$slide2.find(o => !isUndefined(o.scale))) === null || _this$styles$slide2 === void 0 ? void 0 : _this$styles$slide2.scale;
|
|
229
|
-
slideTranslateX = (_this$styles$slide3 = this.styles.slide) === null || _this$styles$slide3 === void 0 || (_this$styles$slide3 = _this$styles$slide3.transform) === null || _this$styles$slide3 === void 0 || (_this$styles$slide3 = _this$styles$slide3.find(o => !isUndefined(o.translateX))) === null || _this$styles$slide3 === void 0 ? void 0 : _this$styles$slide3.translateX;
|
|
230
|
-
}
|
|
231
151
|
// TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608
|
|
232
152
|
return /*#__PURE__*/React.createElement(View, {
|
|
233
|
-
style: styles.root
|
|
153
|
+
style: styles.root,
|
|
154
|
+
onLayout: this.setSlideLayout.bind(this)
|
|
234
155
|
}, this._background, /*#__PURE__*/React.createElement(SwipeAnimation.View, {
|
|
235
156
|
enableGestures: props.enablegestures,
|
|
236
157
|
style: {
|
|
237
|
-
|
|
158
|
+
flexDirection: 'row',
|
|
159
|
+
flexWrap: 'nowrap',
|
|
160
|
+
alignItems: 'center'
|
|
238
161
|
},
|
|
239
162
|
direction: "horizontal",
|
|
240
163
|
ref: r => {
|
|
241
164
|
this.animationView = r;
|
|
242
165
|
},
|
|
243
|
-
handlers: this.animationHandlers
|
|
244
|
-
slideMinWidth: this.styles.slide.width
|
|
166
|
+
handlers: this.animationHandlers
|
|
245
167
|
}, data.map((item, index) => {
|
|
246
168
|
var _this$animationView5, _this$animationView6;
|
|
247
169
|
const isActive = index === this.state.activeIndex - 1;
|
|
248
170
|
let scale = (_this$animationView5 = this.animationView) === null || _this$animationView5 === void 0 ? void 0 : _this$animationView5.animationPhase.interpolate({
|
|
249
171
|
inputRange: [-2000, index - 1, index, index + 1, 2000],
|
|
250
|
-
outputRange: [
|
|
172
|
+
outputRange: [0.8, 0.8, 1, 0.8, 0.8]
|
|
251
173
|
});
|
|
252
174
|
let translateX = (_this$animationView6 = this.animationView) === null || _this$animationView6 === void 0 ? void 0 : _this$animationView6.animationPhase.interpolate({
|
|
253
175
|
inputRange: [-2000, index - 1, index, index + 1, 2000],
|
|
@@ -255,18 +177,9 @@ export default class WmCarousel extends BaseComponent {
|
|
|
255
177
|
});
|
|
256
178
|
return /*#__PURE__*/React.createElement(Animated.View, {
|
|
257
179
|
key: this.generateItemKey(item, index, props),
|
|
258
|
-
|
|
259
|
-
onTouchEnd: () => {
|
|
260
|
-
var _this$animationView7;
|
|
261
|
-
this.onSlideChange(index + 1);
|
|
262
|
-
const position = this.slidesLayout.filter((l, i) => i < index).reduce((s, l) => s + l.width, 0);
|
|
263
|
-
(_this$animationView7 = this.animationView) === null || _this$animationView7 === void 0 ? void 0 : _this$animationView7.setPosition(-1 * position);
|
|
264
|
-
},
|
|
265
|
-
style: [{
|
|
266
|
-
height: props.type === 'dynamic' ? undefined : '100%'
|
|
267
|
-
}, this.styles.slide, index === 0 ? this.styles.firstSlide : null, index === data.length - 1 ? this.styles.lastSlide : null, isActive ? this.styles.activeSlide : null, translateX && scale ? {
|
|
180
|
+
style: [this.styles.slide, index === 0 ? this.styles.firstSlide : null, index === data.length - 1 ? this.styles.lastSlide : null, isActive ? this.styles.activeSlide : null, translateX && scale ? {
|
|
268
181
|
transform: [{
|
|
269
|
-
translateX:
|
|
182
|
+
translateX: translateX
|
|
270
183
|
}, {
|
|
271
184
|
scale: scale
|
|
272
185
|
}]
|
|
@@ -275,12 +188,10 @@ export default class WmCarousel extends BaseComponent {
|
|
|
275
188
|
})), hasNavs ? /*#__PURE__*/React.createElement(View, {
|
|
276
189
|
style: styles.btnPanel
|
|
277
190
|
}, /*#__PURE__*/React.createElement(WmIcon, {
|
|
278
|
-
id: this.getTestId('prev_icon'),
|
|
279
191
|
iconclass: "wi wi-chevron-left fa-2x",
|
|
280
192
|
styles: styles.prevBtn,
|
|
281
193
|
onTap: this.prev
|
|
282
194
|
}), /*#__PURE__*/React.createElement(WmIcon, {
|
|
283
|
-
id: this.getTestId('next_icon'),
|
|
284
195
|
iconclass: "wi wi-chevron-right fa-2x",
|
|
285
196
|
styles: styles.nextBtn,
|
|
286
197
|
onTap: this.next
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","isArray","isUndefined","Animated","Easing","View","DefaultKeyExtractor","WmIcon","BaseComponent","BaseComponentState","SwipeAnimation","WmCarouselProps","DEFAULT_CLASS","WmCarouselState","constructor","arguments","_defineProperty","WmCarousel","props","Value","bounds","e","_this$slidesLayout","_this$slidesLayout$ac","activeTabIndex","state","activeIndex","lower","slidesLayout","filter","l","i","reduce","s","width","center","upper","computePhase","value","_this$slidesLayout$ac2","w","Math","abs","onLower","onSlideChange","onUpper","index","prevIndex","updateState","invokeEventCallback","animatePagination","item","type","renderSlide","children","data","dataset","length","_this$animationView","animationView","setPosition","_this$animationView2","goToUpper","_this$animationView3","goToLower","cleanup","push","stopPlay","addSlideLayout","nativeEvent","layout","forceUpdate","generateItemKey","itemkey","_showSkeleton","keyExtractor","getKey","autoPlay","animation","animationinterval","intervalId","setInterval","next","clearInterval","setTimeout","_this$animationView4","onPropertyChange","name","$new","$old","_this$keyExtractor","clear","min","_this$styles$dotStyle","_this$styles$dotStyle2","_this$styles$dotStyle3","margin","styles","dotStyle","marginLeft","marginRight","size","position","max","scale","options","useNativeDriver","duration","easing","out","linear","sequence","timing","dotScale","toValue","parallel","dotPosition","isRTL","start","renderPagination","maxNoOfDots","maxnoofdots","minIndex","maxIndex","createElement","style","dotsWrapperStyle","flexDirection","map","key","activeDotStyle","undefined","height","transform","translateX","right","left","renderWidget","_data","_this$styles$slide","hasNavs","controls","hasDots","noOfSlides","slideScale","slideTranslateX","slide","_this$styles$slide2","_this$styles$slide3","find","o","root","_background","enableGestures","enablegestures","direction","ref","r","handlers","animationHandlers","slideMinWidth","_this$animationView5","_this$animationView6","isActive","animationPhase","interpolate","inputRange","outputRange","onLayout","bind","onTouchEnd","_this$animationView7","firstSlide","lastSlide","activeSlide","renderItem","btnPanel","id","getTestId","iconclass","prevBtn","onTap","prev","nextBtn"],"sources":["carousel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { isArray, isUndefined } from 'lodash-es';\nimport { Animated, Easing, View, 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 slidesLayout: LayoutRectangle[] = [];\n private keyExtractor = new DefaultKeyExtractor();\n stopPlay: Function = null as any;\n private dotScale = new Animated.Value(0);\n private dotPosition = new Animated.Value(0);\n private animationView: SwipeAnimation.View | null = null as any;\n private animationHandlers = {\n bounds: (e) => {\n const activeTabIndex = this.state.activeIndex - 1;\n let lower = 0;\n if (activeTabIndex > 0) {\n lower = this.slidesLayout\n .filter((l , i) => i < activeTabIndex - 1)\n .reduce((s, l) => s + l.width, 0);\n }\n let center = lower + (this.slidesLayout[activeTabIndex - 1]?.width || 0);\n let upper = center + (this.slidesLayout[activeTabIndex]?.width || 0);\n return {\n lower: -1 * lower,\n center: -1 * center,\n upper: -1 * upper\n };\n },\n computePhase: (value) => {\n const activeTabIndex = this.state.activeIndex - 1;\n const w = this.slidesLayout[activeTabIndex]?.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 addSlideLayout(index: number, nativeEvent: LayoutChangeEvent) {\n this.slidesLayout[index] = nativeEvent.nativeEvent.layout;\n if (index === this.state.activeIndex) {\n this.forceUpdate();\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 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 || 1)\n } as WmCarouselState);\n break;\n }\n case 'animation':\n case 'animationinterval' : {\n this.autoPlay();\n }\n }\n }\n\n animatePagination(index: number) {\n const prevIndex = this.state.activeIndex;\n const margin = ((this.styles.dotStyle?.marginLeft as number)|| 0) + \n ((this.styles.dotStyle?.marginRight as number)|| 0)\n const width = (this.styles.dotStyle?.width as number)|| 2;\n const size = margin + width;\n const position = Math.max(index - 1, 0) * size;\n const scale = Math.abs(index - prevIndex) * size;\n const options = {\n useNativeDriver: true,\n duration: 200,\n easing: Easing.out(Easing.linear)\n };\n if (prevIndex < index) {\n Animated.sequence([\n Animated.timing(this.dotScale, {\n toValue: scale,\n ...options\n }),\n Animated.parallel([\n Animated.timing(this.dotScale, {\n toValue: 0,\n ...options\n }),\n Animated.timing(this.dotPosition, {\n toValue: (this.isRTL ? -1: 1) * position,\n ...options\n })\n ])\n ]).start();\n } else if (prevIndex > index) {\n Animated.sequence([\n Animated.parallel([\n Animated.timing(this.dotScale, {\n toValue: scale,\n ...options\n }),\n Animated.timing(this.dotPosition, {\n toValue: (this.isRTL ? -1: 1) * position,\n ...options\n })\n ]),\n Animated.timing(this.dotScale, {\n toValue: 0,\n ...options\n }),\n ]).start();\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 this.animatePagination(index);\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, this) : 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 <View style={{flexDirection: this.isRTL ? 'row-reverse' : 'row'}}>\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={[this.styles.dotStyle]}>\n </View>) : null;\n })\n }\n <Animated.View style={[\n this.styles.dotStyle,\n this.styles.activeDotStyle, {\n width: undefined,\n height: undefined,\n transform: [{\n translateX: this.dotPosition\n }]\n }, this.isRTL ? { right: 0 } : { left: 0}]}>\n <Animated.View style={[{\n width: 1,\n height: 1\n }, {\n // This is failing in Android\n // minWidth: this.dotScale\n }]}>\n </Animated.View>\n </Animated.View>\n </View>\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 let slideScale = undefined as any;\n let slideTranslateX = undefined as any;\n if (isArray(this.styles.slide?.transform)) {\n slideScale = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).scale)) as any)?.scale;\n slideTranslateX = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).translateX)) as any)?.translateX;\n }\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}>\n {this._background}\n <SwipeAnimation.View \n enableGestures={props.enablegestures}\n style={{\n height: props.type === 'dynamic' ? undefined : '100%',\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\n slideMinWidth={this.styles.slide.width}\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: [slideScale, slideScale, 1, slideScale, slideScale]\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 onLayout={this.addSlideLayout.bind(this, index)}\n onTouchEnd={() => {\n this.onSlideChange(index + 1);\n const position = this.slidesLayout\n .filter((l , i) => i < index)\n .reduce((s, l) => s + l.width, 0);\n this.animationView?.setPosition(-1 * position);\n }}\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: !isUndefined(slideTranslateX) ? slideTranslateX : translateX\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,EAAEC,WAAW,QAAQ,WAAW;AAChD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,QAA4C,cAAc;AACzF,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;IAAA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,GACX,IAAI,CAACuE,UAAU,CAAC5H,IAAI,EAAEL,KAAK,CACf,CAAC;IAEpB,CAAC,CACkB,CAAC,EACrB8F,OAAO,gBACN5I,KAAA,CAAA4H,aAAA,CAACvH,IAAI;MAACwH,KAAK,EAAE5B,MAAM,CAAC+E;IAAS,gBAC3BhL,KAAA,CAAA4H,aAAA,CAACrH,MAAM;MACL0K,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,WAAW,CAAE;MAChCC,SAAS,EAAC,0BAA0B;MACpClF,MAAM,EAAEA,MAAM,CAACmF,OAAQ;MACvBC,KAAK,EAAE,IAAI,CAACC;IAAK,CAAC,CAAC,eACrBtL,KAAA,CAAA4H,aAAA,CAACrH,MAAM;MACL0K,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,WAAW,CAAE;MAChCC,SAAS,EAAC,2BAA2B;MACrClF,MAAM,EAAEA,MAAM,CAACsF,OAAQ;MACvBF,KAAK,EAAE,IAAI,CAACnG;IAAK,CAAC,CAChB,CAAC,GAAG,IAAI,EACb4D,OAAO,IAAIvF,IAAI,GAAG,IAAI,CAACgE,gBAAgB,CAAChE,IAAI,CAAC,GAAG,IAC/C,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","dataset","length","lower","center","upper","computePhase","value","_this$slideLayout2","Math","abs","onLower","onSlideChange","onUpper","index","prevIndex","updateState","invokeEventCallback","item","type","renderSlide","children","_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","data","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","direction","ref","r","handlers","animationHandlers","_this$animationView5","_this$animationView6","isActive","scale","animationPhase","interpolate","inputRange","outputRange","translateX","slide","firstSlide","lastSlide","activeSlide","transform","renderItem","btnPanel","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 noOfTabs = this.state.props.dataset.length;\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 if (this.state.activeIndex >= this.state.props.dataset.length) {\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 }}\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={[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 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 {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;EA8BxGM,WAAWA,CAACI,MAAsB,EAAE;IAClC,KAAK,CAACA,MAAK,EAAEN,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,EAAE,IAAIE,eAAe,CAAC,CAAC,CAAC;IAACG,eAAA,qBA7BvD,CAAC;IAAAA,eAAA,sBACiB,IAAI;IAAAA,eAAA,uBACpB,IAAIV,mBAAmB,CAAC,CAAC;IAAAU,eAAA,mBAC3B,IAAI;IAAAA,eA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,GAAG,IAC/C,CAAC;EACX;AACF"}
|
|
@@ -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?: '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
|
|
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"}
|
|
@@ -17,10 +17,9 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
17
17
|
text: {},
|
|
18
18
|
slide: {
|
|
19
19
|
width: '100%',
|
|
20
|
-
overflow: 'hidden',
|
|
21
20
|
paddingHorizontal: 16,
|
|
22
21
|
transform: [{
|
|
23
|
-
|
|
22
|
+
translateX: 0
|
|
24
23
|
}]
|
|
25
24
|
},
|
|
26
25
|
firstSlide: {},
|
|
@@ -72,18 +71,15 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
72
71
|
paddingBottom: 4
|
|
73
72
|
},
|
|
74
73
|
activeDotStyle: {
|
|
75
|
-
position: 'absolute',
|
|
76
74
|
backgroundColor: themeVariables.carouselActiveDotColor,
|
|
77
|
-
opacity: 1
|
|
78
|
-
padding: 4
|
|
75
|
+
opacity: 1
|
|
79
76
|
},
|
|
80
77
|
dotStyle: {
|
|
81
78
|
width: 8,
|
|
82
79
|
height: 8,
|
|
83
80
|
borderRadius: 10,
|
|
84
81
|
opacity: 0.2,
|
|
85
|
-
|
|
86
|
-
marginRight: 2,
|
|
82
|
+
marginHorizontal: 2,
|
|
87
83
|
backgroundColor: themeVariables.carouselDotColor
|
|
88
84
|
}
|
|
89
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","slide","
|
|
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,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E;MAClB;IACJ;EACJ,CAA4B,CAAC;EAE7BJ,QAAQ,CAAC,gBAAgB,EAAE,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,4 +1,3 @@
|
|
|
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); }
|
|
2
1
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
2
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
4
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); }
|
|
@@ -29,9 +28,9 @@ export default class WmLogin extends BaseComponent {
|
|
|
29
28
|
renderWidget(props) {
|
|
30
29
|
return /*#__PURE__*/React.createElement(View, {
|
|
31
30
|
style: this.styles.root
|
|
32
|
-
}, this._background, this.state.errorMsg && /*#__PURE__*/React.createElement(Text,
|
|
31
|
+
}, this._background, this.state.errorMsg && /*#__PURE__*/React.createElement(Text, {
|
|
33
32
|
style: this.styles.errorMsgStyles
|
|
34
|
-
}
|
|
33
|
+
}, this.state.errorMsg), /*#__PURE__*/React.createElement(View, {
|
|
35
34
|
style: this.styles.formStyles
|
|
36
35
|
}, props.children));
|
|
37
36
|
}
|