@wavemaker/app-rn-runtime 11.5.0-next.40301 → 11.5.0-rc.151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- app-rn-runtime/actions/login-action.js +4 -0
- app-rn-runtime/actions/login-action.js.map +1 -1
- app-rn-runtime/actions/logout-action.js +4 -0
- app-rn-runtime/actions/logout-action.js.map +1 -1
- app-rn-runtime/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 +41 -31
- 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 +6 -6
- 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 +6 -3
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.styles.js +14 -10
- app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js +10 -5
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.styles.js +8 -2
- app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js +2 -2
- app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.styles.js +6 -1
- app-rn-runtime/components/page/left-panel/left-panel.styles.js.map +1 -1
- app-rn-runtime/components/page/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/constant.service.js +22 -0
- app-rn-runtime/core/constant.service.js.map +1 -0
- app-rn-runtime/core/formatters.js +9 -2
- app-rn-runtime/core/formatters.js.map +1 -1
- app-rn-runtime/core/imageSizeEstimator.js +4 -0
- app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
- app-rn-runtime/core/key.extractor.js +22 -0
- app-rn-runtime/core/key.extractor.js.map +1 -0
- app-rn-runtime/core/tappable.component.js +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 +29 -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
|
@@ -13,6 +13,7 @@ export class Handlers {
|
|
|
13
13
|
_defineProperty(this, "onAnimation", () => {});
|
|
14
14
|
_defineProperty(this, "onLower", () => {});
|
|
15
15
|
_defineProperty(this, "onUpper", () => {});
|
|
16
|
+
_defineProperty(this, "computePhase", null);
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
export class Props {
|
|
@@ -37,6 +38,7 @@ export class View extends React.Component {
|
|
|
37
38
|
super(props);
|
|
38
39
|
_defineProperty(this, "gesture", Gesture.Pan());
|
|
39
40
|
_defineProperty(this, "position", new Animated.Value(0));
|
|
41
|
+
_defineProperty(this, "animationPhase", new Animated.Value(0));
|
|
40
42
|
_defineProperty(this, "i18nService", injector.I18nService.get());
|
|
41
43
|
this.state = {
|
|
42
44
|
isHorizontal: props.direction === 'horizontal',
|
|
@@ -46,7 +48,15 @@ export class View extends React.Component {
|
|
|
46
48
|
this.gesture.maxPointers(1).minDistance(this.state.threshold).enabled(this.props.enableGestures && !isWebPreviewMode()).onChange(e => {
|
|
47
49
|
var _this$props$handlers, _this$props$handlers2;
|
|
48
50
|
const bounds = ((_this$props$handlers = this.props.handlers) === null || _this$props$handlers === void 0 ? void 0 : _this$props$handlers.bounds) && ((_this$props$handlers2 = this.props.handlers) === null || _this$props$handlers2 === void 0 ? void 0 : _this$props$handlers2.bounds(e)) || {};
|
|
49
|
-
|
|
51
|
+
const d = this.state.isHorizontal ? e.translationX : e.translationY;
|
|
52
|
+
let phase = this.computePhase((bounds === null || bounds === void 0 ? void 0 : bounds.center) || 0);
|
|
53
|
+
if (d && d < 0 && !isNil(bounds.center) && !isNil(bounds.lower) && bounds.center !== bounds.lower) {
|
|
54
|
+
phase += d / (bounds.center - bounds.lower) || 0;
|
|
55
|
+
} else if (d && d > 0 && !isNil(bounds.center) && !isNil(bounds.upper) && bounds.center !== bounds.upper) {
|
|
56
|
+
phase += d / (bounds.upper - bounds.center) || 0;
|
|
57
|
+
}
|
|
58
|
+
this.animationPhase.setValue(phase);
|
|
59
|
+
this.position.setValue((this.isRTL() ? -(bounds === null || bounds === void 0 ? void 0 : bounds.center) : (bounds === null || bounds === void 0 ? void 0 : bounds.center) || 0) + d);
|
|
50
60
|
}).onEnd(e => {
|
|
51
61
|
var _this$props$handlers3, _this$props$handlers4;
|
|
52
62
|
((_this$props$handlers3 = this.props.handlers) === null || _this$props$handlers3 === void 0 ? void 0 : _this$props$handlers3.onAnimation) && ((_this$props$handlers4 = this.props.handlers) === null || _this$props$handlers4 === void 0 ? void 0 : _this$props$handlers4.onAnimation(e));
|
|
@@ -57,23 +67,31 @@ export class View extends React.Component {
|
|
|
57
67
|
}
|
|
58
68
|
});
|
|
59
69
|
}
|
|
70
|
+
computePhase(value) {
|
|
71
|
+
var _this$props$handlers5, _this$props$handlers6;
|
|
72
|
+
return ((_this$props$handlers5 = this.props.handlers) === null || _this$props$handlers5 === void 0 ? void 0 : _this$props$handlers5.computePhase) && ((_this$props$handlers6 = this.props.handlers) === null || _this$props$handlers6 === void 0 ? void 0 : _this$props$handlers6.computePhase(value)) || 0;
|
|
73
|
+
}
|
|
60
74
|
isRTL() {
|
|
61
75
|
return this.i18nService.isRTLLocale();
|
|
62
76
|
}
|
|
63
77
|
goToLower(e) {
|
|
64
|
-
var _this$props$
|
|
65
|
-
const bounds = ((_this$props$
|
|
78
|
+
var _this$props$handlers7, _this$props$handlers8;
|
|
79
|
+
const bounds = ((_this$props$handlers7 = this.props.handlers) === null || _this$props$handlers7 === void 0 ? void 0 : _this$props$handlers7.bounds) && ((_this$props$handlers8 = this.props.handlers) === null || _this$props$handlers8 === void 0 ? void 0 : _this$props$handlers8.bounds(e)) || {};
|
|
66
80
|
this.setPosition(bounds.lower).then(() => {
|
|
67
|
-
|
|
68
|
-
|
|
81
|
+
if (!isNil(bounds.lower) && bounds.center !== bounds.lower) {
|
|
82
|
+
var _this$props$handlers9, _this$props$handlers10;
|
|
83
|
+
((_this$props$handlers9 = this.props.handlers) === null || _this$props$handlers9 === void 0 ? void 0 : _this$props$handlers9.onLower) && ((_this$props$handlers10 = this.props.handlers) === null || _this$props$handlers10 === void 0 ? void 0 : _this$props$handlers10.onLower(e));
|
|
84
|
+
}
|
|
69
85
|
});
|
|
70
86
|
}
|
|
71
87
|
goToUpper(e) {
|
|
72
|
-
var _this$props$
|
|
73
|
-
const bounds = ((_this$props$
|
|
88
|
+
var _this$props$handlers11, _this$props$handlers12;
|
|
89
|
+
const bounds = ((_this$props$handlers11 = this.props.handlers) === null || _this$props$handlers11 === void 0 ? void 0 : _this$props$handlers11.bounds) && ((_this$props$handlers12 = this.props.handlers) === null || _this$props$handlers12 === void 0 ? void 0 : _this$props$handlers12.bounds(e)) || {};
|
|
74
90
|
this.setPosition(bounds.upper).then(() => {
|
|
75
|
-
|
|
76
|
-
|
|
91
|
+
if (!isNil(bounds.upper) && bounds.center !== bounds.upper) {
|
|
92
|
+
var _this$props$handlers13, _this$props$handlers14;
|
|
93
|
+
((_this$props$handlers13 = this.props.handlers) === null || _this$props$handlers13 === void 0 ? void 0 : _this$props$handlers13.onUpper) && ((_this$props$handlers14 = this.props.handlers) === null || _this$props$handlers14 === void 0 ? void 0 : _this$props$handlers14.onUpper(e));
|
|
94
|
+
}
|
|
77
95
|
});
|
|
78
96
|
}
|
|
79
97
|
setPosition(value) {
|
|
@@ -81,12 +99,17 @@ export class View extends React.Component {
|
|
|
81
99
|
return Promise.reject();
|
|
82
100
|
}
|
|
83
101
|
return new Promise(resolve => {
|
|
84
|
-
Animated.timing(this.
|
|
102
|
+
Animated.parallel([Animated.timing(this.animationPhase, {
|
|
103
|
+
useNativeDriver: true,
|
|
104
|
+
toValue: this.computePhase(value),
|
|
105
|
+
duration: 200,
|
|
106
|
+
easing: Easing.out(Easing.linear)
|
|
107
|
+
}), Animated.timing(this.position, {
|
|
85
108
|
useNativeDriver: true,
|
|
86
109
|
toValue: this.isRTL() ? -value : value,
|
|
87
110
|
duration: 200,
|
|
88
111
|
easing: Easing.out(Easing.linear)
|
|
89
|
-
}).start(resolve);
|
|
112
|
+
})]).start(resolve);
|
|
90
113
|
});
|
|
91
114
|
}
|
|
92
115
|
render() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isNil","React","Animated","Easing","Gesture","GestureDetector","isWebPreviewMode","injector","Handlers","constructor","_defineProperty","Props","State","View","Component","props","Pan","Value","I18nService","get","state","isHorizontal","direction","threshold","bounds","gesture","maxPointers","minDistance","enabled","enableGestures","onChange","e","_this$props$handlers","_this$props$handlers2","handlers","position","setValue","isRTL","center","translationX","translationY","onEnd","_this$props$handlers3","_this$props$handlers4","onAnimation","goToLower","goToUpper","i18nService","isRTLLocale","_this$props$handlers5","_this$props$handlers6","setPosition","lower","then","_this$props$handlers7","_this$props$handlers8","onLower","_this$props$handlers9","_this$props$handlers10","upper","_this$props$handlers11","_this$props$handlers12","onUpper","value","Promise","reject","resolve","timing","useNativeDriver","toValue","duration","easing","out","linear","start","render","createElement","style","transform","translateX","translateY","children"],"sources":["swipe.animation.tsx"],"sourcesContent":["import { isNil } from 'lodash-es';\nimport React from 'react';\nimport { Animated, Easing, ViewStyle, I18nManager, Platform } from 'react-native';\nimport { Gesture, GestureDetector, GestureUpdateEvent } from 'react-native-gesture-handler';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\n\nexport class Handlers {\n bounds?: (g: GestureUpdateEvent<any>) => Bounds = null as any;\n onAnimation?: (g: GestureUpdateEvent<any>) => any = () => {};\n onLower?: (g: GestureUpdateEvent<any>) => any = () => {};\n onUpper?: (g: GestureUpdateEvent<any>) => any = () => {};\n}\n\nexport interface Bounds {\n upper?: number;\n center?: number;\n lower?: number;\n}\n\nexport class Props {\n threshold?: number = 30;\n direction?: 'horizontal' | 'vertical' = 'horizontal';\n handlers?: Handlers = {} as any;\n style?: ViewStyle = {} as any;\n children: any;\n enableGestures: any;\n}\n\nexport class State {\n threshold = 30;\n isHorizontal = false;\n bounds: Bounds = {} as any;\n}\n\nexport class View extends React.Component<Props, State> {\n\n private gesture = Gesture.Pan();\n private position = new Animated.Value(0);\n private i18nService = injector.I18nService.get();\n\n constructor(props: Props) {\n super(props);\n this.state = {\n isHorizontal: props.direction === 'horizontal',\n threshold: props.threshold || 30,\n bounds: {} as any\n } as State;\n this.gesture\n .maxPointers(1)\n .minDistance(this.state.threshold)\n .enabled(this.props.enableGestures && !isWebPreviewMode())\n .onChange(e => {\n const bounds = (this.props.handlers?.bounds && this.props.handlers?.bounds(e)) || {};\n this.position.setValue(\n (this.isRTL()?-bounds?.center! :bounds?.center || 0) +\n (this.state.isHorizontal ? e.translationX : e.translationY));\n })\n .onEnd(e => {\n this.props.handlers?.onAnimation && \n this.props.handlers?.onAnimation(e);\n if (e.translationX < 0) {\n this.isRTL()?this.goToLower(e):this.goToUpper(e);\n } else if (e.translationX > 0) {\n this.isRTL()?this.goToUpper(e):this.goToLower(e);\n }\n })\n\n }\n\n isRTL(){\n return this.i18nService.isRTLLocale();\n }\n\n goToLower(e?: any) {\n const bounds = (this.props.handlers?.bounds && this.props.handlers?.bounds(e)) || {};\n this.setPosition(bounds.lower)\n .then(() => {\n this.props.handlers?.onLower && \n this.props.handlers?.onLower(e);\n });\n }\n\n goToUpper(e?: any) {\n const bounds = (this.props.handlers?.bounds && this.props.handlers?.bounds(e)) || {};\n this.setPosition(bounds.upper)\n .then(() => {\n this.props.handlers?.onUpper && \n this.props.handlers?.onUpper(e);\n });\n }\n \n setPosition(value: number | undefined) {\n if (isNil(value)) {\n return Promise.reject();\n }\n return new Promise((resolve) => {\n Animated.timing(this.position, {\n useNativeDriver: true,\n toValue: this.isRTL()?-value:value,\n duration: 200,\n easing: Easing.out(Easing.linear)\n }).start(resolve);\n });\n }\n\n public render() {\n return (\n //@ts-ignore\n <GestureDetector gesture={this.gesture}>\n <Animated.View style={[\n this.props.style, \n {\n transform: this.state.isHorizontal ? [{\n translateX: this.position\n }] : [{\n translateY: this.position\n }]\n }]}>\n {this.props.children}\n </Animated.View>\n </GestureDetector>\n );\n }\n\n}"],"mappings":";;;AAAA,SAASA,KAAK,QAAQ,WAAW;AACjC,OAAOC,KAAK,MAAO,OAAO;AAC1B,SAASC,QAAQ,EAAEC,MAAM,QAA0C,cAAc;AACjF,SAASC,OAAO,EAAEC,eAAe,QAA4B,8BAA8B;AAC3F,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,OAAOC,QAAQ,MAAM,yCAA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UACrB,CAAC;QACL,CAAC;MAAE,GACF,IAAI,CAACpB,KAAK,CAACkE,QACD,CACF;IAAC;EAE1B;AAEJ"}
|
|
1
|
+
{"version":3,"names":["isNil","React","Animated","Easing","Gesture","GestureDetector","isWebPreviewMode","injector","Handlers","constructor","_defineProperty","Props","State","View","Component","props","Pan","Value","I18nService","get","state","isHorizontal","direction","threshold","bounds","gesture","maxPointers","minDistance","enabled","enableGestures","onChange","e","_this$props$handlers","_this$props$handlers2","handlers","d","translationX","translationY","phase","computePhase","center","lower","upper","animationPhase","setValue","position","isRTL","onEnd","_this$props$handlers3","_this$props$handlers4","onAnimation","goToLower","goToUpper","value","_this$props$handlers5","_this$props$handlers6","i18nService","isRTLLocale","_this$props$handlers7","_this$props$handlers8","setPosition","then","_this$props$handlers9","_this$props$handlers10","onLower","_this$props$handlers11","_this$props$handlers12","_this$props$handlers13","_this$props$handlers14","onUpper","Promise","reject","resolve","parallel","timing","useNativeDriver","toValue","duration","easing","out","linear","start","render","createElement","style","transform","translateX","translateY","children"],"sources":["swipe.animation.tsx"],"sourcesContent":["import { isNil } from 'lodash-es';\nimport React from 'react';\nimport { Animated, Easing, ViewStyle } from 'react-native';\nimport { Gesture, GestureDetector, GestureUpdateEvent } from 'react-native-gesture-handler';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\n\nexport class Handlers {\n bounds?: (g: GestureUpdateEvent<any>) => Bounds = null as any;\n onAnimation?: (g: GestureUpdateEvent<any>) => any = () => {};\n onLower?: (g: GestureUpdateEvent<any>) => any = () => {};\n onUpper?: (g: GestureUpdateEvent<any>) => any = () => {};\n computePhase?: (value: number) => number = null as any;\n}\n\nexport interface Bounds {\n upper?: number;\n center?: number;\n lower?: number;\n}\n\nexport class Props {\n threshold?: number = 30;\n direction?: 'horizontal' | 'vertical' = 'horizontal';\n handlers?: Handlers = {} as any;\n style?: ViewStyle = {} as any;\n children: any;\n enableGestures: any;\n}\n\nexport class State {\n threshold = 30;\n isHorizontal = false;\n bounds: Bounds = {} as any;\n}\n\nexport class View extends React.Component<Props, State> {\n\n private gesture = Gesture.Pan();\n private position = new Animated.Value(0);\n public animationPhase = new Animated.Value(0);\n private i18nService = injector.I18nService.get();\n\n constructor(props: Props) {\n super(props);\n this.state = {\n isHorizontal: props.direction === 'horizontal',\n threshold: props.threshold || 30,\n bounds: {} as any\n } as State;\n this.gesture\n .maxPointers(1)\n .minDistance(this.state.threshold)\n .enabled(this.props.enableGestures && !isWebPreviewMode())\n .onChange(e => {\n const bounds = (this.props.handlers?.bounds && this.props.handlers?.bounds(e)) || {};\n const d = (this.state.isHorizontal ? e.translationX : e.translationY);\n let phase = this.computePhase(bounds?.center || 0);\n if (d && d < 0 && !isNil(bounds.center) && !isNil(bounds.lower)\n && bounds.center !== bounds.lower) {\n phase += (d / (bounds.center - bounds.lower)) || 0;\n } else if (d && d > 0 && !isNil(bounds.center) && !isNil(bounds.upper)\n && bounds.center !== bounds.upper) {\n phase += (d / (bounds.upper - bounds.center)) || 0;\n }\n this.animationPhase.setValue(phase);\n this.position.setValue(\n (this.isRTL()?-bounds?.center! :bounds?.center || 0) + d);\n })\n .onEnd(e => {\n this.props.handlers?.onAnimation && \n this.props.handlers?.onAnimation(e);\n if (e.translationX < 0) {\n this.isRTL()?this.goToLower(e):this.goToUpper(e);\n } else if (e.translationX > 0) {\n this.isRTL()?this.goToUpper(e):this.goToLower(e);\n }\n })\n\n }\n\n computePhase(value: number) {\n return (this.props.handlers?.computePhase && \n this.props.handlers?.computePhase(value)) || 0;\n }\n\n isRTL(){\n return this.i18nService.isRTLLocale();\n }\n\n goToLower(e?: any) {\n const bounds = (this.props.handlers?.bounds && this.props.handlers?.bounds(e)) || {};\n this.setPosition(bounds.lower)\n .then(() => {\n if (!isNil(bounds.lower) && bounds.center !== bounds.lower) {\n this.props.handlers?.onLower && \n this.props.handlers?.onLower(e);\n }\n });\n }\n\n goToUpper(e?: any) {\n const bounds = (this.props.handlers?.bounds && this.props.handlers?.bounds(e)) || {};\n this.setPosition(bounds.upper)\n .then(() => {\n if (!isNil(bounds.upper) && bounds.center !== bounds.upper) {\n this.props.handlers?.onUpper && \n this.props.handlers?.onUpper(e);\n }\n });\n }\n \n setPosition(value: number | undefined) {\n if (isNil(value)) {\n return Promise.reject();\n }\n return new Promise((resolve) => {\n Animated.parallel([\n Animated.timing(this.animationPhase, {\n useNativeDriver: true,\n toValue: this.computePhase(value),\n duration: 200,\n easing: Easing.out(Easing.linear)\n }),\n Animated.timing(this.position, {\n useNativeDriver: true,\n toValue: this.isRTL()?-value:value,\n duration: 200,\n easing: Easing.out(Easing.linear)\n })\n ]).start(resolve);\n });\n }\n\n public render() {\n return (\n //@ts-ignore\n <GestureDetector gesture={this.gesture}>\n <Animated.View style={[\n this.props.style, \n {\n transform: this.state.isHorizontal ? [{\n translateX: this.position\n }] : [{\n translateY: this.position\n }]\n }]}>\n {this.props.children}\n </Animated.View>\n </GestureDetector>\n );\n }\n\n}"],"mappings":";;;AAAA,SAASA,KAAK,QAAQ,WAAW;AACjC,OAAOC,KAAK,MAAO,OAAO;AAC1B,SAASC,QAAQ,EAAEC,MAAM,QAAmB,cAAc;AAC1D,SAASC,OAAO,EAAEC,eAAe,QAA4B,8BAA8B;AAC3F,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,OAAOC,QAAQ,MAAM,yCAAyC;AAE9D,OAAO,MAAMC,QAAQ,CAAC;EAAAC,YAAA;IAAAC,eAAA,iBACgC,IAAI;IAAAA,eAAA,sBACF,MAAM,CAAC,CAAC;IAAAA,eAAA,kBACX,MAAM,CAAC,CAAC;IAAAA,eAAA,kBACR,MAAM,CAAC,CAAC;IAAAA,eAAA,uBACd,IAAI;EAAA;AACnD;AAQA,OAAO,MAAMC,KAAK,CAAC;EAAAF,YAAA;IAAAC,eAAA,oBACM,EAAE;IAAAA,eAAA,oBACiB,YAAY;IAAAA,eAAA,mBAC9B,CAAC,CAAC;IAAAA,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,KAAK,EAAE,CAClB,IAAI,CAACrE,KAAK,CAACqE,KAAK,EAChB;UACIC,SAAS,EAAE,IAAI,CAACjE,KAAK,CAACC,YAAY,GAAG,CAAC;YAClCiE,UAAU,EAAE,IAAI,CAACzC;UACrB,CAAC,CAAC,GAAG,CAAC;YACF0C,UAAU,EAAE,IAAI,CAAC1C;UACrB,CAAC;QACL,CAAC;MAAE,GACF,IAAI,CAAC9B,KAAK,CAACyE,QACD,CACF;IAAC;EAE1B;AAEJ"}
|
app-rn-runtime/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/app-rn-runtime",
|
|
3
|
-
"version": "11.5.0-
|
|
3
|
+
"version": "11.5.0-rc.151",
|
|
4
4
|
"description": "''",
|
|
5
5
|
"main": "index",
|
|
6
6
|
"module": "index",
|
|
@@ -49,11 +49,12 @@
|
|
|
49
49
|
"@react-navigation/native": "6.1.7",
|
|
50
50
|
"@react-navigation/stack": "^6.3.7",
|
|
51
51
|
"@types/lodash-es": "^4.17.6",
|
|
52
|
-
"@wavemaker/variables": "11.5.0-
|
|
52
|
+
"@wavemaker/variables": "11.5.0-rc.151",
|
|
53
53
|
"axios": "^1.4.0",
|
|
54
54
|
"color": "4.2.3",
|
|
55
55
|
"cross-env": "^5.2.0",
|
|
56
56
|
"css-mediaquery": "^0.1.2",
|
|
57
|
+
"expo-application": "^5.4.0",
|
|
57
58
|
"expo-font": "11.4.0",
|
|
58
59
|
"expo-linear-gradient": "12.3.0",
|
|
59
60
|
"expo-modules-core": "~1.1.0",
|
|
@@ -127,7 +128,7 @@
|
|
|
127
128
|
"typescript": "^5.1.3",
|
|
128
129
|
"victory-native": "36.6.11",
|
|
129
130
|
"yargs": "^16.2.0",
|
|
130
|
-
"@wavemaker/variables": "11.5.0-
|
|
131
|
+
"@wavemaker/variables": "11.5.0-rc.151"
|
|
131
132
|
},
|
|
132
133
|
"jest": {
|
|
133
134
|
"preset": "react-native",
|
app-rn-runtime/runtime/App.js
CHANGED
|
@@ -3,7 +3,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
|
|
|
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
5
|
import axios from 'axios';
|
|
6
|
-
import { Platform, TouchableOpacity, View, StatusBar } from 'react-native';
|
|
6
|
+
import { Platform, TouchableOpacity, View, StatusBar, KeyboardAvoidingView } from 'react-native';
|
|
7
7
|
import ProtoTypes from 'prop-types';
|
|
8
8
|
import { SafeAreaProvider, SafeAreaInsetsContext, SafeAreaView } from 'react-native-safe-area-context';
|
|
9
9
|
import { DefaultTheme, Provider as PaperProvider } from 'react-native-paper';
|
|
@@ -12,8 +12,10 @@ import { NativeModulesProxy } from 'expo-modules-core';
|
|
|
12
12
|
import * as WebBrowser from 'expo-web-browser';
|
|
13
13
|
import { get, last } from 'lodash';
|
|
14
14
|
import { RENDER_LOGGER } from '@wavemaker/app-rn-runtime/core/logger';
|
|
15
|
+
import EventNotifier from '@wavemaker/app-rn-runtime/core/event-notifier';
|
|
15
16
|
import { ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';
|
|
16
17
|
import StorageService from '@wavemaker/app-rn-runtime/core/storage.service';
|
|
18
|
+
import ConstantService from '@wavemaker/app-rn-runtime/core/constant.service';
|
|
17
19
|
import injector from '@wavemaker/app-rn-runtime/core/injector';
|
|
18
20
|
import formatters from '@wavemaker/app-rn-runtime/core/formatters';
|
|
19
21
|
import { deepCopy, isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';
|
|
@@ -73,6 +75,7 @@ class DrawerImpl {
|
|
|
73
75
|
}
|
|
74
76
|
const SUPPORTED_SERVICES = {
|
|
75
77
|
Utils: Utils,
|
|
78
|
+
CONSTANTS: ConstantService,
|
|
76
79
|
StorageService: StorageService,
|
|
77
80
|
AppDisplayManagerService: AppDisplayManagerService
|
|
78
81
|
};
|
|
@@ -86,6 +89,7 @@ export default class BaseApp extends React.Component {
|
|
|
86
89
|
_defineProperty(this, "onAppVariablesReady", () => {});
|
|
87
90
|
_defineProperty(this, "isStarted", false);
|
|
88
91
|
_defineProperty(this, "appConfig", injector.get('APP_CONFIG'));
|
|
92
|
+
_defineProperty(this, "eventNotifier", new EventNotifier());
|
|
89
93
|
_defineProperty(this, "baseUrl", '');
|
|
90
94
|
_defineProperty(this, "targetPlatform", 'NATIVE_MOBILE');
|
|
91
95
|
_defineProperty(this, "cleanup", []);
|
|
@@ -141,6 +145,18 @@ export default class BaseApp extends React.Component {
|
|
|
141
145
|
}
|
|
142
146
|
};
|
|
143
147
|
}
|
|
148
|
+
subscribe(event, fn) {
|
|
149
|
+
return this.eventNotifier.subscribe(event, fn);
|
|
150
|
+
}
|
|
151
|
+
notify(event) {
|
|
152
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
153
|
+
args[_key - 1] = arguments[_key];
|
|
154
|
+
}
|
|
155
|
+
return this.eventNotifier.notify(event, args);
|
|
156
|
+
}
|
|
157
|
+
get activePage() {
|
|
158
|
+
return this.appConfig.currentPage;
|
|
159
|
+
}
|
|
144
160
|
goToPage(pageName, params) {
|
|
145
161
|
var _this$appConfig$curre2;
|
|
146
162
|
return (_this$appConfig$curre2 = this.appConfig.currentPage) === null || _this$appConfig$curre2 === void 0 ? void 0 : _this$appConfig$curre2.goToPage(pageName, params);
|
|
@@ -241,11 +257,14 @@ export default class BaseApp extends React.Component {
|
|
|
241
257
|
}
|
|
242
258
|
}
|
|
243
259
|
}
|
|
260
|
+
triggerStartUpVariables() {
|
|
261
|
+
return Promise.all(this.startUpVariables.map(s => this.Variables[s] && this.Variables[s].invoke())).catch(() => {});
|
|
262
|
+
}
|
|
244
263
|
componentDidMount() {
|
|
245
264
|
AppSpinnerService.show({
|
|
246
265
|
spinner: this.appConfig.spinner
|
|
247
266
|
});
|
|
248
|
-
|
|
267
|
+
this.triggerStartUpVariables().then(() => {
|
|
249
268
|
this.onAppVariablesReady();
|
|
250
269
|
this.isStarted = true;
|
|
251
270
|
this.forceUpdate();
|
|
@@ -298,6 +317,7 @@ export default class BaseApp extends React.Component {
|
|
|
298
317
|
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
299
318
|
onPress: () => o.onClick && o.onClick()
|
|
300
319
|
}, o.content, o.text && /*#__PURE__*/React.createElement(WmMessage, {
|
|
320
|
+
name: "message" + i,
|
|
301
321
|
type: o.type,
|
|
302
322
|
caption: o.text,
|
|
303
323
|
hideclose: true
|
|
@@ -409,7 +429,12 @@ export default class BaseApp extends React.Component {
|
|
|
409
429
|
style: {
|
|
410
430
|
flex: 1
|
|
411
431
|
}
|
|
412
|
-
}, /*#__PURE__*/React.createElement(StatusBar, null), /*#__PURE__*/React.createElement(FixedViewContainer, null, /*#__PURE__*/React.createElement(
|
|
432
|
+
}, /*#__PURE__*/React.createElement(StatusBar, null), /*#__PURE__*/React.createElement(FixedViewContainer, null, /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
|
|
433
|
+
behavior: Platform.OS === "ios" ? "padding" : undefined,
|
|
434
|
+
style: {
|
|
435
|
+
flex: 1
|
|
436
|
+
}
|
|
437
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
413
438
|
style: styles.container
|
|
414
439
|
}, /*#__PURE__*/React.createElement(AppNavigator, {
|
|
415
440
|
app: _this2,
|
|
@@ -418,7 +443,7 @@ export default class BaseApp extends React.Component {
|
|
|
418
443
|
hideDrawer: ((_this2$appConfig$draw = _this2.appConfig.drawer) === null || _this2$appConfig$draw === void 0 ? void 0 : _this2$appConfig$draw.getContent()) === null,
|
|
419
444
|
drawerContent: () => _this2.appConfig.drawer ? _this2.getProviders(_this2.appConfig.drawer.getContent()) : null,
|
|
420
445
|
drawerAnimation: (_this2$appConfig$draw2 = _this2.appConfig.drawer) === null || _this2$appConfig$draw2 === void 0 ? void 0 : _this2$appConfig$draw2.getAnimation()
|
|
421
|
-
}), commonPartial, _this2.renderToasters(), _this2.renderDialogs(), _this2.renderDisplayManager()), /*#__PURE__*/React.createElement(WmNetworkInfoToaster, {
|
|
446
|
+
}), commonPartial, _this2.renderToasters(), _this2.renderDialogs(), _this2.renderDisplayManager())), /*#__PURE__*/React.createElement(WmNetworkInfoToaster, {
|
|
422
447
|
appLocale: _this2.appConfig.appLocale
|
|
423
448
|
}))));
|
|
424
449
|
}))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","axios","Platform","TouchableOpacity","View","StatusBar","ProtoTypes","SafeAreaProvider","SafeAreaInsetsContext","SafeAreaView","DefaultTheme","Provider","PaperProvider","Linking","NativeModulesProxy","WebBrowser","get","last","RENDER_LOGGER","ThemeProvider","StorageService","injector","formatters","deepCopy","isWebPreviewMode","Utils","ModalProvider","FixedViewContainer","ToastProvider","NavigationServiceProvider","PartialProvider","WmNetworkInfoToaster","ThemeVariables","WmMessage","Animatedview","Watcher","preparePatch","AppDisplayManagerService","AppModalService","AppToastService","AppPartialService","AppSpinnerService","AppNavigator","SecurityProvider","CameraProvider","CameraService","ScanProvider","ScanService","AppSecurityService","getValidJSON","parseErrors","MaterialCommunityIconsFont","SplashScreen","WmMemo","style","any","MIN_TIME_BETWEEN_REFRESH_CYCLES","DrawerImpl","constructor","onChange","_defineProperty","setContent","content","getContent","setAnimation","animation","getAnimation","SUPPORTED_SERVICES","BaseApp","Component","props","_this","this","ROOT","refresh","preventAutoHideAsync","setTimeout","hideAsync","appConfig","app","drawer","setDefaultOptions","spinner","refreshAfterWait","baseUrl","url","wait","bindServiceInterceptors","complete","arguments","length","undefined","reload","debug","_this$commonPartial","_this$appConfig$curre","forceUpdate","commonPartial","currentPage","watcher","check","goToPage","pageName","params","_this$appConfig$curre2","goBack","_this$appConfig$curre3","openUrl","_this$appConfig$curre4","onBeforeServiceCall","config","isSkeletonEnabled","loader","onServiceSuccess","data","response","onServiceError","errorMsg","error","invokeNativeApi","key","EmbedCommModule","OS","sendToNative","Promise","reject","onPageReady","activePageName","activePageScope","openBrowser","window","open","startsWith","target","openBrowserAsync","openURL","resolve","axiosInterceptorIds","interceptors","request","use","headers","console","log","_errorDetails","_errorDetails2","_error$response","_error$response2","_error$response3","errorDetails","errMsg","errors","message","status","_this$appConfig$curre5","_this$appConfig$curre6","eval","fn","failOnError","call","e","componentDidMount","show","all","startUpVariables","map","s","Variables","invoke","catch","then","onAppVariablesReady","isStarted","startUpActions","a","Actions","componentWillUnmount","id","eject","cleanup","forEach","getProviders","createElement","value","renderToasters","toastsOpened","render","watch","refreshCount","Fragment","o","i","position","width","bottom","elevation","elevationIndex","zIndex","styles","onPress","onClick","text","type","caption","hideclose","renderDialogs","_last","modalsOpened","animatedRefs","modalOptions","name","onStartShouldSetResponder","onResponderEnd","isModal","hideModal","appModal","centered","centeredModal","modalStyle","entryanimation","ref","animatedRef","appModalContent","contentStyle","evt","stopPropagation","renderDisplayManager","displayOptions","theme","displayViewContainer","renderIconsViewSupportForWeb","getSelectedLocale","selectedLocale","getDependency","serviceName","service","renderApp","_this2","autoUpdateVariables","_this$Variables$value","invokeOnParamChange","colors","primary","INSTANCE","primaryColor","Consumer","_this2$props","_this2$appConfig$draw","_this2$appConfig$draw2","insets","top","left","right","flex","container","landingPage","landingPageParams","hideDrawer","drawerContent","drawerAnimation","appLocale","alignItems","flexDirection","justifyContent","backgroundColor","height"],"sources":["App.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport axios, { AxiosError, InternalAxiosRequestConfig, AxiosResponse } from 'axios';\nimport { Platform, TouchableOpacity, View, ViewStyle, StatusBar } from 'react-native';\nimport ProtoTypes from 'prop-types';\nimport { SafeAreaProvider, SafeAreaInsetsContext, SafeAreaView } from 'react-native-safe-area-context';\nimport { DefaultTheme, Provider as PaperProvider } from 'react-native-paper';\nimport { Linking } from 'react-native';\nimport { NativeModulesProxy } from 'expo-modules-core';\nimport * as WebBrowser from 'expo-web-browser';\nimport { get, last } from 'lodash';\nimport { RENDER_LOGGER } from '@wavemaker/app-rn-runtime/core/logger';\nimport { ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';\nimport AppConfig, { Drawer } from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport StorageService from '@wavemaker/app-rn-runtime/core/storage.service';\nimport NetworkService from '@wavemaker/app-rn-runtime/core/network.service';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport formatters from '@wavemaker/app-rn-runtime/core/formatters';\nimport { deepCopy, isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport * as Utils from '@wavemaker/app-rn-runtime/core/utils';\nimport { ModalProvider } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport { FixedViewContainer } from '@wavemaker/app-rn-runtime/core/fixed-view.component';\nimport { ToastProvider } from '@wavemaker/app-rn-runtime/core/toast.service';\nimport NavigationService, { NavigationServiceProvider } from '@wavemaker/app-rn-runtime/core/navigation.service';\nimport { PartialProvider } from '@wavemaker/app-rn-runtime/core/partial.service';\nimport WmNetworkInfoToaster from '@wavemaker/app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nimport WmMessage from '@wavemaker/app-rn-runtime/components/basic/message/message.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\n\nimport { Watcher } from './watcher';\nimport { preparePatch } from './lib-patch';\nimport AppDisplayManagerService from './services/app-display-manager.service';\nimport AppModalService from './services/app-modal.service';\nimport AppToastService from './services/app-toast.service';\nimport AppPartialService from './services/partial.service';\nimport AppSpinnerService from './services/app-spinner.service';\nimport { AppNavigator } from './App.navigator';\nimport { SecurityProvider } from '../core/security.service';\nimport { CameraProvider } from '../core/device/camera-service';\nimport CameraService from './services/device/camera-service';\nimport { ScanProvider } from '../core/device/scan-service';\nimport ScanService from './services/device/scan-service';\nimport AppSecurityService from './services/app-security.service';\nimport {getValidJSON, parseErrors} from '@wavemaker/app-rn-runtime/variables/utils/variable.utils';\nimport MaterialCommunityIconsFont from '@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf';\n\nimport * as SplashScreen from 'expo-splash-screen';\nimport BasePartial from './base-partial.component';\nimport BasePage from './base-page.component';\nimport { WmMemo } from './memo.component';\n\ndeclare const window: any;\n\n//some old react libraries need this\n((View as any)['propTypes'] = { style: ProtoTypes.any})\n\nconst MIN_TIME_BETWEEN_REFRESH_CYCLES = 200;\n\nclass DrawerImpl implements Drawer {\n content: ReactNode;\n animation: string = 'slide-in';\n\n constructor(private onChange: () => void) {\n\n }\n\n setContent(content: ReactNode) {\n this.content = content;\n this.onChange();\n }\n\n getContent() {\n return this.content;\n }\n\n setAnimation(animation: string) {\n this.animation = animation;\n this.onChange();\n }\n\n getAnimation() {\n return this.animation;\n }\n}\nconst SUPPORTED_SERVICES = {\n Utils: Utils,\n StorageService: StorageService,\n AppDisplayManagerService: AppDisplayManagerService\n};\n\nexport default abstract class BaseApp extends React.Component implements NavigationService {\n\n Actions: any = {};\n Variables: any = {};\n onAppVariablesReady = () => {};\n isStarted = false;\n appConfig = injector.get<AppConfig>('APP_CONFIG');\n public baseUrl = '';\n public targetPlatform = 'NATIVE_MOBILE';\n public cleanup = [] as Function[];\n public commonPartial: BasePartial = null as any;\n private startUpVariables: string[] = [];\n private startUpActions: string[] = [];\n private autoUpdateVariables: string[] = [];\n private axiosInterceptorIds: number[] = [];\n public formatters = formatters;\n public serviceDefinitions = {} as any;\n private animatedRef: any;\n public modalsOpened: number = 0;\n public toastsOpened: number = 0;\n public watcher: Watcher = Watcher.ROOT;\n public lib = preparePatch(() => {\n this.refresh();\n });\n\n constructor(props: any) {\n super(props);\n SplashScreen.preventAutoHideAsync();\n setTimeout(() => SplashScreen.hideAsync(), 10000);\n this.appConfig.app = this;\n this.appConfig.drawer = new DrawerImpl(() => this.refresh());\n AppSpinnerService.setDefaultOptions({\n spinner: this.appConfig.spinner\n });\n let refreshAfterWait = false;\n this.baseUrl = this.appConfig.url;\n let wait = 0;\n this.bindServiceInterceptors();\n this.appConfig.refresh = (complete = false) => {\n if (complete) {\n this.reload();\n return;\n }\n if (!wait) {\n RENDER_LOGGER.debug('refreshing the app...');\n wait = MIN_TIME_BETWEEN_REFRESH_CYCLES;\n refreshAfterWait = false;\n setTimeout(() => {\n this.forceUpdate();\n this.commonPartial?.forceUpdate();\n this.appConfig.currentPage?.forceUpdate();\n this.watcher.check();\n });\n setTimeout(() => {\n wait = 0;\n refreshAfterWait && this.appConfig.refresh();\n }, wait);\n } else {\n RENDER_LOGGER.debug('will refresh the app in the next cycle.');\n refreshAfterWait = true;\n }\n }\n }\n\n goToPage(pageName: string, params: any) {\n return this.appConfig.currentPage?.goToPage(pageName, params);\n }\n\n goBack(pageName: string, params: any) {\n return this.appConfig.currentPage?.goBack(pageName, params);\n }\n\n openUrl(url: string, params?: any) {\n return this.appConfig.currentPage?.openUrl(url, params);\n }\n\n onBeforeServiceCall(config: InternalAxiosRequestConfig) {\n //DO NOT WRITE CODE HERE:\n //This is a placeholder for the WaveMaker developer.\n return config;\n }\n\n isSkeletonEnabled() {\n return this.appConfig.spinner.loader == \"skeleton\";\n }\n\n onServiceSuccess(data: any, response: AxiosResponse) {\n //DO NOT WRITE CODE HERE:\n //This is a placeholder for the WaveMaker developer.\n }\n\n onServiceError(errorMsg: any, error: AxiosError<any>) {\n //DO NOT WRITE CODE HERE:\n //This is a placeholder for the WaveMaker developer.\n }\n\n invokeNativeApi(key: string, data: Object) {\n if (NativeModulesProxy.EmbedCommModule \n && (Platform.OS === 'android' || Platform.OS === 'ios')) {\n return NativeModulesProxy.EmbedCommModule.sendToNative(key, data || {});\n } else {\n return Promise.reject('Not able to invoke Native API in this platform.');\n }\n }\n\n onPageReady(activePageName: string, activePageScope: BasePage) {\n\n }\n\n get spinner() {\n return AppSpinnerService;\n }\n\n openBrowser(url: string, params = {} as any) {\n if (url) {\n if (isWebPreviewMode()) {\n window.open(url, '_blank');\n } else if (url.startsWith('http') && params.target === '_blank') {\n WebBrowser.openBrowserAsync(url);\n } else {\n return Linking.openURL(url);\n }\n }\n return Promise.resolve();\n }\n\n // To support old api\n reload() {}\n\n bindServiceInterceptors() {\n this.axiosInterceptorIds = [\n axios.interceptors.request.use((config: InternalAxiosRequestConfig) => {\n const url = config.url as string;\n if (!(url.startsWith('http://') || url.startsWith(\"https://\"))) {\n config.url = this.appConfig.url + '/' + url;\n }\n config.headers = config.headers || {};\n config.headers['X-Requested-With'] = 'XMLHttpRequest';\n console.log('onBeforeService call invoked on ' + config.url);\n return this.onBeforeServiceCall(config);\n }),\n axios.interceptors.response.use(\n (response: AxiosResponse) => {\n this.onServiceSuccess(response.data, response);\n return response;\n },(error: AxiosError<any>) => {\n let errorDetails: any = error.response, errMsg;\n errorDetails = getValidJSON(errorDetails?.data) || errorDetails?.data;\n if (errorDetails && errorDetails.errors) {\n errMsg = parseErrors(errorDetails.errors) || \"Service Call Failed\";\n } else {\n errMsg = error.message || \"Service Call Failed\";\n }\n error.message = errMsg;\n console.error(`Error ${errMsg} recieved from ${error.response?.config?.url}`);\n this.onServiceError(error.message, error);\n if (error.response?.config.url?.startsWith(this.appConfig.url) && error.response?.status === 401) {\n this.appConfig.currentPage?.pageName !== 'Login' && this.appConfig.currentPage?.goToPage('Login');\n }\n return Promise.reject(error)\n })\n ];\n }\n\n eval(fn: Function, failOnError = false) {\n try {\n return fn.call(this);\n } catch (e) {\n if (failOnError) {\n throw e;\n } else {\n return null;\n }\n }\n }\n\n componentDidMount() {\n AppSpinnerService.show({\n spinner: this.appConfig.spinner\n });\n Promise.all(this.startUpVariables.map(s => this.Variables[s] && this.Variables[s].invoke()))\n .catch(() => {})\n .then(() => {\n this.onAppVariablesReady();\n this.isStarted = true;\n this.forceUpdate();\n }, () => {}).then(() => {\n SplashScreen.hideAsync().then(() => {});\n });\n this.startUpActions.map(a => this.Actions[a] && this.Actions[a].invoke());\n }\n\n componentWillUnmount(): void {\n this.axiosInterceptorIds.map(id => {\n axios.interceptors.request.eject(id);\n });\n this.cleanup.forEach(fn => fn());\n }\n\n refresh() {\n this.appConfig.refresh();\n }\n\n getProviders(content: React.ReactNode) {\n return (\n <NavigationServiceProvider value={this}>\n <ToastProvider value={AppToastService}>\n <PartialProvider value={AppPartialService}>\n <SecurityProvider value={AppSecurityService}>\n <CameraProvider value={CameraService}>\n <ScanProvider value={ScanService}>\n <ModalProvider value={AppModalService}>\n { content }\n </ModalProvider>\n </ScanProvider>\n </CameraProvider>\n </SecurityProvider>\n </PartialProvider>\n </ToastProvider>\n </NavigationServiceProvider>\n );\n }\n\n renderToasters() {\n this.toastsOpened = AppToastService.toastsOpened.length;\n return <WmMemo watcher={this.watcher} render={(watch) => {\n watch(() => AppToastService.refreshCount);\n return (\n <>\n {AppToastService.toastsOpened.map((o, i) =>\n this.getProviders((\n <View key={i} style={[{\n position: 'absolute',\n width: '100%',\n bottom: 0,\n elevation: o.elevationIndex,\n zIndex: o.elevationIndex\n }, o.styles]}>\n <TouchableOpacity onPress={() => o.onClick && o.onClick()}>\n {o.content}\n {o.text && <WmMessage type={o.type} caption={o.text} hideclose={true}></WmMessage>}\n </TouchableOpacity>\n </View>\n )\n ))}\n </>);\n }}/>;\n }\n\n renderDialogs(): ReactNode {\n return <WmMemo watcher={this.watcher} render={(watch) => {\n watch(() => last(AppModalService.modalsOpened)?.content);\n this.modalsOpened = AppModalService.modalsOpened.length;\n AppModalService.animatedRefs.length = 0;\n return(\n <>\n {AppModalService.modalOptions.content &&\n AppModalService.modalsOpened.map((o, i) => {\n return (\n <View key={(o.name || '') + i}\n onStartShouldSetResponder={() => true}\n onResponderEnd={() => o.isModal && AppModalService.hideModal(o)}\n style={deepCopy(styles.appModal,\n o.centered ? styles.centeredModal: null,\n o.modalStyle,\n { elevation: o.elevationIndex,\n zIndex: o.elevationIndex })}>\n <Animatedview entryanimation={o.animation || 'fadeIn'}\n ref={ref => {\n this.animatedRef = ref;\n AppModalService.animatedRefs[i] = ref;\n }}\n style={[styles.appModalContent, o.contentStyle]}>\n <View\n onStartShouldSetResponder={evt => true}\n onResponderEnd={(e) => e.stopPropagation()}\n style={{width: '100%', 'alignItems': 'center'}}>\n {this.getProviders(o.content)}\n </View>\n </Animatedview>\n </View>\n )}\n )\n }\n </>);\n }}/>;\n }\n\n renderDisplayManager(): ReactNode {\n return <WmMemo watcher={this.watcher} render={(watch) => {\n watch(() => AppDisplayManagerService.displayOptions.content);\n return AppDisplayManagerService.displayOptions.content\n ? (\n <ThemeProvider value={this.appConfig.theme}>\n <View style={[styles.displayViewContainer, {\n elevation: this.toastsOpened + this.modalsOpened + 1,\n zIndex: this.toastsOpened + this.modalsOpened + 1\n }]}>\n {AppDisplayManagerService.displayOptions.content}\n </View>\n </ThemeProvider>) : null;\n }}/>\n }\n\n renderIconsViewSupportForWeb() {\n try {\n return (<style type=\"text/css\">{`\n @font-face {\n font-family: 'MaterialCommunityIcons';\n src: url(${MaterialCommunityIconsFont}) format('truetype');\n }\n `}</style>);\n } catch (e) {\n console.log('require react-native-vector-icons could not be loaded.');\n }\n return null;\n }\n\n getSelectedLocale() {\n return this.appConfig.selectedLocale;\n }\n\n getDependency(serviceName: string): any {\n const service = get(SUPPORTED_SERVICES, serviceName);\n if (service) {\n return service;\n }\n }\n\n renderApp(commonPartial:React.ReactNode) {\n this.autoUpdateVariables.forEach(value => this.Variables[value]?.invokeOnParamChange());\n return (\n <SafeAreaProvider>\n <PaperProvider theme={{\n ...DefaultTheme,\n colors: {\n ...DefaultTheme.colors,\n primary: ThemeVariables.INSTANCE.primaryColor\n }}}>\n <React.Fragment>\n {Platform.OS === 'web' ? this.renderIconsViewSupportForWeb() : null}\n <SafeAreaInsetsContext.Consumer>\n {(insets = {top: 0, bottom: 0, left: 0, right: 0}) =>\n (this.getProviders(\n (<SafeAreaView style={{flex: 1}}>\n <StatusBar />\n <FixedViewContainer>\n <View style={styles.container}>\n <AppNavigator\n app={this}\n landingPage={(this.props as any).pageName}\n landingPageParams={(this.props as any)?.pageName && this.props}\n hideDrawer={this.appConfig.drawer?.getContent() === null}\n drawerContent={() => this.appConfig.drawer? this.getProviders(this.appConfig.drawer.getContent()) : null}\n drawerAnimation={this.appConfig.drawer?.getAnimation()}></AppNavigator>\n {commonPartial}\n {this.renderToasters()}\n {this.renderDialogs()}\n {this.renderDisplayManager()}\n </View>\n <WmNetworkInfoToaster appLocale={this.appConfig.appLocale}></WmNetworkInfoToaster>\n </FixedViewContainer>\n </SafeAreaView>))\n )\n }\n </SafeAreaInsetsContext.Consumer>\n </React.Fragment>\n </PaperProvider>\n </SafeAreaProvider>\n );\n }\n}\n\nconst styles = {\n container: {\n flex: 1\n },\n appModal: {\n position: 'absolute',\n width: '100%'\n },\n appModalContent : {\n flex: 1,\n width: '100%',\n alignItems: 'center',\n flexDirection: 'column',\n justifyContent: 'center'\n },\n centeredModal: {\n flex: 1,\n position: 'absolute',\n top: 0,\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: 'rgba(0, 0, 0, 0.4)',\n height: '100%'\n },\n displayViewContainer: {\n position: 'absolute',\n justifyContent: 'center',\n width: '100%',\n left: 0,\n right: 0,\n top: 0,\n bottom:0\n } as ViewStyle\n};\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAsB,OAAO;AACzC,OAAOC,KAAK,MAAiE,OAAO;AACpF,SAASC,QAAQ,EAAEC,gBAAgB,EAAEC,IAAI,EAAaC,SAAS,QAAQ,cAAc;AACrF,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,gBAAgB,EAAEC,qBAAqB,EAAEC,YAAY,QAAQ,gCAAgC;AACtG,SAASC,YAAY,EAAEC,QAAQ,IAAIC,aAAa,QAAQ,oBAAoB;AAC5E,SAASC,OAAO,QAAQ,cAAc;AACtC,SAASC,kBAAkB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,YAAY,CAAC;MAAE,CAAe,CAAC,EACtE+B,aAAa,EACb4I,MAAI,CAACrD,cAAc,CAAC,CAAC,EACrBqD,MAAI,CAAChC,aAAa,CAAC,CAAC,EACpBgC,MAAI,CAACX,oBAAoB,CAAC,CACzB,CAAC,eACPlO,KAAA,CAAAsL,aAAA,CAACvJ,oBAAoB;QAAEqO,SAAS,EAAEvB,MAAI,CAAC/J,SAAS,CAACsL;MAAU,CAAuB,CAChE,CACR,CAAE,CAAC;IAAA,CAGS,CAChB,CACH,CACC,CAAC;EAEvB;AACF;AAEA,MAAM9D,MAAM,GAAG;EACbwD,SAAS,EAAE;IACTD,IAAI,EAAE;EACR,CAAC;EACDtC,QAAQ,EAAE;IACRvB,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE;EACT,CAAC;EACD6B,eAAe,EAAG;IAChB+B,IAAI,EAAE,CAAC;IACP5D,KAAK,EAAE,MAAM;IACboE,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE,QAAQ;IACvBC,cAAc,EAAE;EAClB,CAAC;EACD9C,aAAa,EAAE;IACboC,IAAI,EAAE,CAAC;IACP7D,QAAQ,EAAE,UAAU;IACpB0D,GAAG,EAAE,CAAC;IACNY,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,QAAQ;IACxBF,UAAU,EAAE,QAAQ;IACpBG,eAAe,EAAE,oBAAoB;IACrCC,MAAM,EAAE;EACV,CAAC;EACDpC,oBAAoB,EAAE;IACpBrC,QAAQ,EAAE,UAAU;IACpBuE,cAAc,EAAE,QAAQ;IACxBtE,KAAK,EAAE,MAAM;IACb0D,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRF,GAAG,EAAE,CAAC;IACNxD,MAAM,EAAC;EACT;AACF,CAAC"}
|
|
1
|
+
{"version":3,"names":["React","axios","Platform","TouchableOpacity","View","StatusBar","KeyboardAvoidingView","ProtoTypes","SafeAreaProvider","SafeAreaInsetsContext","SafeAreaView","DefaultTheme","Provider","PaperProvider","Linking","NativeModulesProxy","WebBrowser","get","last","RENDER_LOGGER","EventNotifier","ThemeProvider","StorageService","ConstantService","injector","formatters","deepCopy","isWebPreviewMode","Utils","ModalProvider","FixedViewContainer","ToastProvider","NavigationServiceProvider","PartialProvider","WmNetworkInfoToaster","ThemeVariables","WmMessage","Animatedview","Watcher","preparePatch","AppDisplayManagerService","AppModalService","AppToastService","AppPartialService","AppSpinnerService","AppNavigator","SecurityProvider","CameraProvider","CameraService","ScanProvider","ScanService","AppSecurityService","getValidJSON","parseErrors","MaterialCommunityIconsFont","SplashScreen","WmMemo","style","any","MIN_TIME_BETWEEN_REFRESH_CYCLES","DrawerImpl","constructor","onChange","_defineProperty","setContent","content","getContent","setAnimation","animation","getAnimation","SUPPORTED_SERVICES","CONSTANTS","BaseApp","Component","props","_this","this","ROOT","refresh","preventAutoHideAsync","setTimeout","hideAsync","appConfig","app","drawer","setDefaultOptions","spinner","refreshAfterWait","baseUrl","url","wait","bindServiceInterceptors","complete","arguments","length","undefined","reload","debug","_this$commonPartial","_this$appConfig$curre","forceUpdate","commonPartial","currentPage","watcher","check","subscribe","event","fn","eventNotifier","notify","_len","args","Array","_key","activePage","goToPage","pageName","params","_this$appConfig$curre2","goBack","_this$appConfig$curre3","openUrl","_this$appConfig$curre4","onBeforeServiceCall","config","isSkeletonEnabled","loader","onServiceSuccess","data","response","onServiceError","errorMsg","error","invokeNativeApi","key","EmbedCommModule","OS","sendToNative","Promise","reject","onPageReady","activePageName","activePageScope","openBrowser","window","open","startsWith","target","openBrowserAsync","openURL","resolve","axiosInterceptorIds","interceptors","request","use","headers","console","log","_errorDetails","_errorDetails2","_error$response","_error$response2","_error$response3","errorDetails","errMsg","errors","message","status","_this$appConfig$curre5","_this$appConfig$curre6","eval","failOnError","call","e","triggerStartUpVariables","all","startUpVariables","map","s","Variables","invoke","catch","componentDidMount","show","then","onAppVariablesReady","isStarted","startUpActions","a","Actions","componentWillUnmount","id","eject","cleanup","forEach","getProviders","createElement","value","renderToasters","toastsOpened","render","watch","refreshCount","Fragment","o","i","position","width","bottom","elevation","elevationIndex","zIndex","styles","onPress","onClick","text","name","type","caption","hideclose","renderDialogs","_last","modalsOpened","animatedRefs","modalOptions","onStartShouldSetResponder","onResponderEnd","isModal","hideModal","appModal","centered","centeredModal","modalStyle","entryanimation","ref","animatedRef","appModalContent","contentStyle","evt","stopPropagation","renderDisplayManager","displayOptions","theme","displayViewContainer","renderIconsViewSupportForWeb","getSelectedLocale","selectedLocale","getDependency","serviceName","service","renderApp","_this2","autoUpdateVariables","_this$Variables$value","invokeOnParamChange","colors","primary","INSTANCE","primaryColor","Consumer","_this2$props","_this2$appConfig$draw","_this2$appConfig$draw2","insets","top","left","right","flex","behavior","container","landingPage","landingPageParams","hideDrawer","drawerContent","drawerAnimation","appLocale","alignItems","flexDirection","justifyContent","backgroundColor","height"],"sources":["App.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport axios, { AxiosError, InternalAxiosRequestConfig, AxiosResponse } from 'axios';\nimport { Platform, TouchableOpacity, View, ViewStyle, StatusBar, KeyboardAvoidingView } from 'react-native';\nimport ProtoTypes from 'prop-types';\nimport { SafeAreaProvider, SafeAreaInsetsContext, SafeAreaView } from 'react-native-safe-area-context';\nimport { DefaultTheme, Provider as PaperProvider } from 'react-native-paper';\nimport { Linking } from 'react-native';\nimport { NativeModulesProxy } from 'expo-modules-core';\nimport * as WebBrowser from 'expo-web-browser';\nimport { get, last } from 'lodash';\nimport { RENDER_LOGGER } from '@wavemaker/app-rn-runtime/core/logger';\nimport EventNotifier from '@wavemaker/app-rn-runtime/core/event-notifier';\nimport { ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';\nimport AppConfig, { Drawer } from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport StorageService from '@wavemaker/app-rn-runtime/core/storage.service';\nimport ConstantService from '@wavemaker/app-rn-runtime/core/constant.service';\nimport NetworkService from '@wavemaker/app-rn-runtime/core/network.service';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport formatters from '@wavemaker/app-rn-runtime/core/formatters';\nimport { deepCopy, isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport * as Utils from '@wavemaker/app-rn-runtime/core/utils';\nimport { ModalProvider } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport { FixedViewContainer } from '@wavemaker/app-rn-runtime/core/fixed-view.component';\nimport { ToastProvider } from '@wavemaker/app-rn-runtime/core/toast.service';\nimport NavigationService, { NavigationServiceProvider } from '@wavemaker/app-rn-runtime/core/navigation.service';\nimport { PartialProvider } from '@wavemaker/app-rn-runtime/core/partial.service';\nimport WmNetworkInfoToaster from '@wavemaker/app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nimport WmMessage from '@wavemaker/app-rn-runtime/components/basic/message/message.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\n\nimport { Watcher } from './watcher';\nimport { preparePatch } from './lib-patch';\nimport AppDisplayManagerService from './services/app-display-manager.service';\nimport AppModalService from './services/app-modal.service';\nimport AppToastService from './services/app-toast.service';\nimport AppPartialService from './services/partial.service';\nimport AppSpinnerService from './services/app-spinner.service';\nimport { AppNavigator } from './App.navigator';\nimport { SecurityProvider } from '../core/security.service';\nimport { CameraProvider } from '../core/device/camera-service';\nimport CameraService from './services/device/camera-service';\nimport { ScanProvider } from '../core/device/scan-service';\nimport ScanService from './services/device/scan-service';\nimport AppSecurityService from './services/app-security.service';\nimport {getValidJSON, parseErrors} from '@wavemaker/app-rn-runtime/variables/utils/variable.utils';\nimport MaterialCommunityIconsFont from '@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf';\n\nimport * as SplashScreen from 'expo-splash-screen';\nimport BasePartial from './base-partial.component';\nimport BasePage from './base-page.component';\nimport { WmMemo } from './memo.component';\n\ndeclare const window: any;\n\n//some old react libraries need this\n((View as any)['propTypes'] = { style: ProtoTypes.any})\n\nconst MIN_TIME_BETWEEN_REFRESH_CYCLES = 200;\n\nclass DrawerImpl implements Drawer {\n content: ReactNode;\n animation: string = 'slide-in';\n\n constructor(private onChange: () => void) {\n\n }\n\n setContent(content: ReactNode) {\n this.content = content;\n this.onChange();\n }\n\n getContent() {\n return this.content;\n }\n\n setAnimation(animation: string) {\n this.animation = animation;\n this.onChange();\n }\n\n getAnimation() {\n return this.animation;\n }\n}\nconst SUPPORTED_SERVICES = {\n Utils: Utils,\n CONSTANTS: ConstantService,\n StorageService: StorageService,\n AppDisplayManagerService: AppDisplayManagerService\n};\n\nexport default abstract class BaseApp extends React.Component implements NavigationService {\n\n Actions: any = {};\n Variables: any = {};\n onAppVariablesReady = () => {};\n isStarted = false;\n appConfig = injector.get<AppConfig>('APP_CONFIG');\n private eventNotifier = new EventNotifier();\n public baseUrl = '';\n public targetPlatform = 'NATIVE_MOBILE';\n public cleanup = [] as Function[];\n public commonPartial: BasePartial = null as any;\n private startUpVariables: string[] = [];\n private startUpActions: string[] = [];\n private autoUpdateVariables: string[] = [];\n private axiosInterceptorIds: number[] = [];\n public formatters = formatters;\n public serviceDefinitions = {} as any;\n private animatedRef: any;\n public modalsOpened: number = 0;\n public toastsOpened: number = 0;\n public watcher: Watcher = Watcher.ROOT;\n public lib = preparePatch(() => {\n this.refresh();\n });\n\n constructor(props: any) {\n super(props);\n SplashScreen.preventAutoHideAsync();\n setTimeout(() => SplashScreen.hideAsync(), 10000);\n this.appConfig.app = this;\n this.appConfig.drawer = new DrawerImpl(() => this.refresh());\n AppSpinnerService.setDefaultOptions({\n spinner: this.appConfig.spinner\n });\n let refreshAfterWait = false;\n this.baseUrl = this.appConfig.url;\n let wait = 0;\n this.bindServiceInterceptors();\n this.appConfig.refresh = (complete = false) => {\n if (complete) {\n this.reload();\n return;\n }\n if (!wait) {\n RENDER_LOGGER.debug('refreshing the app...');\n wait = MIN_TIME_BETWEEN_REFRESH_CYCLES;\n refreshAfterWait = false;\n setTimeout(() => {\n this.forceUpdate();\n this.commonPartial?.forceUpdate();\n this.appConfig.currentPage?.forceUpdate();\n this.watcher.check();\n });\n setTimeout(() => {\n wait = 0;\n refreshAfterWait && this.appConfig.refresh();\n }, wait);\n } else {\n RENDER_LOGGER.debug('will refresh the app in the next cycle.');\n refreshAfterWait = true;\n }\n }\n }\n\n subscribe(event: string, fn: Function) {\n return this.eventNotifier.subscribe(event, fn);\n }\n\n notify(event: string, ...args: any) {\n return this.eventNotifier.notify(event, args);\n }\n\n get activePage() {\n return this.appConfig.currentPage;\n }\n\n goToPage(pageName: string, params: any) {\n return this.appConfig.currentPage?.goToPage(pageName, params);\n }\n\n goBack(pageName: string, params: any) {\n return this.appConfig.currentPage?.goBack(pageName, params);\n }\n\n openUrl(url: string, params?: any) {\n return this.appConfig.currentPage?.openUrl(url, params);\n }\n\n onBeforeServiceCall(config: InternalAxiosRequestConfig) {\n //DO NOT WRITE CODE HERE:\n //This is a placeholder for the WaveMaker developer.\n return config;\n }\n\n isSkeletonEnabled() {\n return this.appConfig.spinner.loader == \"skeleton\";\n }\n\n onServiceSuccess(data: any, response: AxiosResponse) {\n //DO NOT WRITE CODE HERE:\n //This is a placeholder for the WaveMaker developer.\n }\n\n onServiceError(errorMsg: any, error: AxiosError<any>) {\n //DO NOT WRITE CODE HERE:\n //This is a placeholder for the WaveMaker developer.\n }\n\n invokeNativeApi(key: string, data: Object) {\n if (NativeModulesProxy.EmbedCommModule\n && (Platform.OS === 'android' || Platform.OS === 'ios')) {\n return NativeModulesProxy.EmbedCommModule.sendToNative(key, data || {});\n } else {\n return Promise.reject('Not able to invoke Native API in this platform.');\n }\n }\n\n onPageReady(activePageName: string, activePageScope: BasePage) {\n\n }\n\n get spinner() {\n return AppSpinnerService;\n }\n\n openBrowser(url: string, params = {} as any) {\n if (url) {\n if (isWebPreviewMode()) {\n window.open(url, '_blank');\n } else if (url.startsWith('http') && params.target === '_blank') {\n WebBrowser.openBrowserAsync(url);\n } else {\n return Linking.openURL(url);\n }\n }\n return Promise.resolve();\n }\n\n // To support old api\n reload() {}\n\n bindServiceInterceptors() {\n this.axiosInterceptorIds = [\n axios.interceptors.request.use((config: InternalAxiosRequestConfig) => {\n const url = config.url as string;\n if (!(url.startsWith('http://') || url.startsWith(\"https://\"))) {\n config.url = this.appConfig.url + '/' + url;\n }\n config.headers = config.headers || {};\n config.headers['X-Requested-With'] = 'XMLHttpRequest';\n console.log('onBeforeService call invoked on ' + config.url);\n return this.onBeforeServiceCall(config);\n }),\n axios.interceptors.response.use(\n (response: AxiosResponse) => {\n this.onServiceSuccess(response.data, response);\n return response;\n },(error: AxiosError<any>) => {\n let errorDetails: any = error.response, errMsg;\n errorDetails = getValidJSON(errorDetails?.data) || errorDetails?.data;\n if (errorDetails && errorDetails.errors) {\n errMsg = parseErrors(errorDetails.errors) || \"Service Call Failed\";\n } else {\n errMsg = error.message || \"Service Call Failed\";\n }\n error.message = errMsg;\n console.error(`Error ${errMsg} recieved from ${error.response?.config?.url}`);\n this.onServiceError(error.message, error);\n if (error.response?.config.url?.startsWith(this.appConfig.url) && error.response?.status === 401) {\n this.appConfig.currentPage?.pageName !== 'Login' && this.appConfig.currentPage?.goToPage('Login');\n }\n return Promise.reject(error)\n })\n ];\n }\n\n eval(fn: Function, failOnError = false) {\n try {\n return fn.call(this);\n } catch (e) {\n if (failOnError) {\n throw e;\n } else {\n return null;\n }\n }\n }\n\n triggerStartUpVariables() {\n return Promise.all(this.startUpVariables.map(s => this.Variables[s] && this.Variables[s].invoke()))\n .catch(() => {});\n }\n\n componentDidMount() {\n AppSpinnerService.show({\n spinner: this.appConfig.spinner\n });\n this.triggerStartUpVariables()\n .then(() => {\n this.onAppVariablesReady();\n this.isStarted = true;\n this.forceUpdate();\n }, () => {}).then(() => {\n SplashScreen.hideAsync().then(() => {});\n });\n this.startUpActions.map(a => this.Actions[a] && this.Actions[a].invoke());\n }\n\n componentWillUnmount(): void {\n this.axiosInterceptorIds.map(id => {\n axios.interceptors.request.eject(id);\n });\n this.cleanup.forEach(fn => fn());\n }\n\n refresh() {\n this.appConfig.refresh();\n }\n\n getProviders(content: React.ReactNode) {\n return (\n <NavigationServiceProvider value={this}>\n <ToastProvider value={AppToastService}>\n <PartialProvider value={AppPartialService}>\n <SecurityProvider value={AppSecurityService}>\n <CameraProvider value={CameraService}>\n <ScanProvider value={ScanService}>\n <ModalProvider value={AppModalService}>\n { content }\n </ModalProvider>\n </ScanProvider>\n </CameraProvider>\n </SecurityProvider>\n </PartialProvider>\n </ToastProvider>\n </NavigationServiceProvider>\n );\n }\n\n renderToasters() {\n this.toastsOpened = AppToastService.toastsOpened.length;\n return <WmMemo watcher={this.watcher} render={(watch) => {\n watch(() => AppToastService.refreshCount);\n return (\n <>\n {AppToastService.toastsOpened.map((o, i) =>\n this.getProviders((\n <View key={i} style={[{\n position: 'absolute',\n width: '100%',\n bottom: 0,\n elevation: o.elevationIndex,\n zIndex: o.elevationIndex\n }, o.styles]}>\n <TouchableOpacity onPress={() => o.onClick && o.onClick()}>\n {o.content}\n {o.text && <WmMessage name={\"message\"+ i} type={o.type} caption={o.text} hideclose={true}></WmMessage>}\n </TouchableOpacity>\n </View>\n )\n ))}\n </>);\n }}/>;\n }\n\n renderDialogs(): ReactNode {\n return <WmMemo watcher={this.watcher} render={(watch) => {\n watch(() => last(AppModalService.modalsOpened)?.content);\n this.modalsOpened = AppModalService.modalsOpened.length;\n AppModalService.animatedRefs.length = 0;\n return(\n <>\n {AppModalService.modalOptions.content &&\n AppModalService.modalsOpened.map((o, i) => {\n return (\n <View key={(o.name || '') + i}\n onStartShouldSetResponder={() => true}\n onResponderEnd={() => o.isModal && AppModalService.hideModal(o)}\n style={deepCopy(styles.appModal,\n o.centered ? styles.centeredModal: null,\n o.modalStyle,\n { elevation: o.elevationIndex,\n zIndex: o.elevationIndex })}>\n <Animatedview entryanimation={o.animation || 'fadeIn'}\n ref={ref => {\n this.animatedRef = ref;\n AppModalService.animatedRefs[i] = ref;\n }}\n style={[styles.appModalContent, o.contentStyle]}>\n <View\n onStartShouldSetResponder={evt => true}\n onResponderEnd={(e) => e.stopPropagation()}\n style={{width: '100%', 'alignItems': 'center'}}>\n {this.getProviders(o.content)}\n </View>\n </Animatedview>\n </View>\n )}\n )\n }\n </>);\n }}/>;\n }\n\n renderDisplayManager(): ReactNode {\n return <WmMemo watcher={this.watcher} render={(watch) => {\n watch(() => AppDisplayManagerService.displayOptions.content);\n return AppDisplayManagerService.displayOptions.content\n ? (\n <ThemeProvider value={this.appConfig.theme}>\n <View style={[styles.displayViewContainer, {\n elevation: this.toastsOpened + this.modalsOpened + 1,\n zIndex: this.toastsOpened + this.modalsOpened + 1\n }]}>\n {AppDisplayManagerService.displayOptions.content}\n </View>\n </ThemeProvider>) : null;\n }}/>\n }\n\n renderIconsViewSupportForWeb() {\n try {\n return (<style type=\"text/css\">{`\n @font-face {\n font-family: 'MaterialCommunityIcons';\n src: url(${MaterialCommunityIconsFont}) format('truetype');\n }\n `}</style>);\n } catch (e) {\n console.log('require react-native-vector-icons could not be loaded.');\n }\n return null;\n }\n\n getSelectedLocale() {\n return this.appConfig.selectedLocale;\n }\n\n getDependency(serviceName: string): any {\n const service = get(SUPPORTED_SERVICES, serviceName);\n if (service) {\n return service;\n }\n }\n\n renderApp(commonPartial:React.ReactNode) {\n this.autoUpdateVariables.forEach(value => this.Variables[value]?.invokeOnParamChange());\n return (\n <SafeAreaProvider>\n <PaperProvider theme={{\n ...DefaultTheme,\n colors: {\n ...DefaultTheme.colors,\n primary: ThemeVariables.INSTANCE.primaryColor\n }}}>\n <React.Fragment>\n {Platform.OS === 'web' ? this.renderIconsViewSupportForWeb() : null}\n <SafeAreaInsetsContext.Consumer>\n {(insets = {top: 0, bottom: 0, left: 0, right: 0}) =>\n (this.getProviders(\n (<SafeAreaView style={{flex: 1}}>\n <StatusBar />\n <FixedViewContainer>\n <KeyboardAvoidingView behavior={Platform.OS === \"ios\" ? \"padding\" : undefined}\n style={{ flex: 1 }}>\n <View style={styles.container}>\n <AppNavigator\n app={this}\n landingPage={(this.props as any).pageName}\n landingPageParams={(this.props as any)?.pageName && this.props}\n hideDrawer={this.appConfig.drawer?.getContent() === null}\n drawerContent={() => this.appConfig.drawer? this.getProviders(this.appConfig.drawer.getContent()) : null}\n drawerAnimation={this.appConfig.drawer?.getAnimation()}></AppNavigator>\n {commonPartial}\n {this.renderToasters()}\n {this.renderDialogs()}\n {this.renderDisplayManager()}\n </View>\n </KeyboardAvoidingView>\n <WmNetworkInfoToaster appLocale={this.appConfig.appLocale}></WmNetworkInfoToaster>\n </FixedViewContainer>\n </SafeAreaView>))\n )\n }\n </SafeAreaInsetsContext.Consumer>\n </React.Fragment>\n </PaperProvider>\n </SafeAreaProvider>\n );\n }\n}\n\nconst styles = {\n container: {\n flex: 1\n },\n appModal: {\n position: 'absolute',\n width: '100%'\n },\n appModalContent : {\n flex: 1,\n width: '100%',\n alignItems: 'center',\n flexDirection: 'column',\n justifyContent: 'center'\n },\n centeredModal: {\n flex: 1,\n position: 'absolute',\n top: 0,\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: 'rgba(0, 0, 0, 0.4)',\n height: '100%'\n },\n displayViewContainer: {\n position: 'absolute',\n justifyContent: 'center',\n width: '100%',\n left: 0,\n right: 0,\n top: 0,\n bottom:0\n } as ViewStyle\n};\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAsB,OAAO;AACzC,OAAOC,KAAK,MAAiE,OAAO;AACpF,SAASC,QAAQ,EAAEC,gBAAgB,EAAEC,IAAI,EAAaC,SAAS,EAAEC,oBAAoB,QAAQ,cAAc;AAC3G,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,gBAAgB,EAAEC,qBAAqB,EAAEC,YAAY,QAAQ,gCAAgC;AACtG,SAASC,YAAY,EAAEC,QAAQ,IAAIC,aAAa,QAAQ,oBAAoB;AAC5E,SAASC,OAAO,QAAQ,cAAc;AACtC,SAASC,kBAAkB,QAAQ,mBAAmB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AAuB,CAChE,CACR,CAAE,CAAC;IAAA,CAGS,CAChB,CACH,CACC,CAAC;EAEvB;AACF;AAEA,MAAM/D,MAAM,GAAG;EACbyD,SAAS,EAAE;IACTF,IAAI,EAAE;EACR,CAAC;EACDtC,QAAQ,EAAE;IACRvB,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE;EACT,CAAC;EACD6B,eAAe,EAAG;IAChB+B,IAAI,EAAE,CAAC;IACP5D,KAAK,EAAE,MAAM;IACbqE,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE,QAAQ;IACvBC,cAAc,EAAE;EAClB,CAAC;EACD/C,aAAa,EAAE;IACboC,IAAI,EAAE,CAAC;IACP7D,QAAQ,EAAE,UAAU;IACpB0D,GAAG,EAAE,CAAC;IACNa,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,QAAQ;IACxBF,UAAU,EAAE,QAAQ;IACpBG,eAAe,EAAE,oBAAoB;IACrCC,MAAM,EAAE;EACV,CAAC;EACDrC,oBAAoB,EAAE;IACpBrC,QAAQ,EAAE,UAAU;IACpBwE,cAAc,EAAE,QAAQ;IACxBvE,KAAK,EAAE,MAAM;IACb0D,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRF,GAAG,EAAE,CAAC;IACNxD,MAAM,EAAC;EACT;AACF,CAAC"}
|
|
@@ -4,6 +4,7 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Text } from 'react-native';
|
|
6
6
|
import { get, filter, isNil } from 'lodash';
|
|
7
|
+
import { TestIdPrefixProvider, TextIdPrefixConsumer } from '@wavemaker/app-rn-runtime/core/testid.provider';
|
|
7
8
|
import injector from '@wavemaker/app-rn-runtime/core/injector';
|
|
8
9
|
import { toBoolean, toNumber, isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';
|
|
9
10
|
import { BaseComponent, BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
@@ -312,6 +313,10 @@ export default class BaseFragment extends BaseComponent {
|
|
|
312
313
|
super.forceUpdate();
|
|
313
314
|
Object.values(this.fragments).forEach(f => f.forceUpdate());
|
|
314
315
|
}
|
|
316
|
+
generateTestIdPrefix() {
|
|
317
|
+
const testId = this.getTestId();
|
|
318
|
+
return testId && testId.split('').reduce((a, v, i) => a + v.charCodeAt(0) * (i + 1), 0) + '';
|
|
319
|
+
}
|
|
315
320
|
render() {
|
|
316
321
|
if (this.startUpVariablesLoaded) {
|
|
317
322
|
this.autoUpdateVariables.forEach(value => {
|
|
@@ -321,9 +326,14 @@ export default class BaseFragment extends BaseComponent {
|
|
|
321
326
|
}
|
|
322
327
|
return this.isVisible() ? /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
323
328
|
value: this.theme
|
|
324
|
-
}, /*#__PURE__*/React.createElement(
|
|
325
|
-
this.
|
|
326
|
-
return
|
|
329
|
+
}, /*#__PURE__*/React.createElement(TextIdPrefixConsumer, null, testIdPrefix => {
|
|
330
|
+
this.testIdPrefix = testIdPrefix || '';
|
|
331
|
+
return /*#__PURE__*/React.createElement(TestIdPrefixProvider, {
|
|
332
|
+
value: this.generateTestIdPrefix() || ''
|
|
333
|
+
}, /*#__PURE__*/React.createElement(ToastConsumer, null, toastService => {
|
|
334
|
+
this.toaster = toastService;
|
|
335
|
+
return this.renderWidget(this.props);
|
|
336
|
+
}));
|
|
327
337
|
})) : null;
|
|
328
338
|
}
|
|
329
339
|
}
|