@wavemaker/app-rn-runtime 11.4.0-next.26251 → 11.4.0-next.28151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/login/login.component.js +1 -1
- 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 +5 -5
- 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 -1
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +1 -1
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.component.js +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.component.js.map +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js +25 -0
- app-rn-runtime/components/basic/custom/custom.component.js.map +1 -0
- app-rn-runtime/components/basic/custom/custom.props.js +16 -0
- app-rn-runtime/components/basic/custom/custom.props.js.map +1 -0
- app-rn-runtime/components/basic/custom/custom.styles.js +18 -0
- app-rn-runtime/components/basic/custom/custom.styles.js.map +1 -0
- app-rn-runtime/components/basic/icon/icon.component.js +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +1 -1
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js +137 -0
- app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -0
- app-rn-runtime/components/basic/lottie/lottie.props.js +14 -0
- app-rn-runtime/components/basic/lottie/lottie.props.js.map +1 -0
- app-rn-runtime/components/basic/lottie/lottie.styles.js +11 -0
- app-rn-runtime/components/basic/lottie/lottie.styles.js.map +1 -0
- app-rn-runtime/components/basic/message/message.component.js +1 -1
- app-rn-runtime/components/basic/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +37 -26
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +3 -2
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +4 -1
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js +10 -10
- app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js +56 -0
- app-rn-runtime/components/basic/video/video.component.js.map +1 -0
- app-rn-runtime/components/basic/video/video.props.js +22 -0
- app-rn-runtime/components/basic/video/video.props.js.map +1 -0
- app-rn-runtime/components/basic/video/video.styles.js +11 -0
- app-rn-runtime/components/basic/video/video.styles.js.map +1 -0
- app-rn-runtime/components/container/accordion/accordion.component.js +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +1 -1
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.component.js +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +1 -1
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +12 -4
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +2 -1
- 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 +68 -67
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.props.js +1 -0
- app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +1 -1
- app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.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/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-footer/card-footer.component.js +1 -1
- app-rn-runtime/components/data/card/card-footer/card-footer.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +1 -1
- 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 -6
- app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.component.js +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.component.js +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +1 -30
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +1 -4
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.component.js +3 -0
- app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +1 -16
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +0 -38
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.component.js +1 -1
- app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +0 -9
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +0 -40
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/rating/rating.component.js +1 -1
- app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.component.js +1 -1
- app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +19 -22
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +7 -7
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +1 -10
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +0 -10
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.props.js +1 -0
- app-rn-runtime/components/navigation/basenav/basenav.props.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.component.js +2 -1
- app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.component.js +2 -0
- app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +4 -3
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.props.js +1 -0
- app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/page/content/content.component.js +1 -1
- app-rn-runtime/components/page/content/content.component.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/page-content/page-content.component.js +2 -2
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/page.component.js +1 -1
- app-rn-runtime/components/page/page.component.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.component.js +1 -1
- app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.component.js +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js +2 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
- app-rn-runtime/core/asset.provider.js +5 -0
- app-rn-runtime/core/asset.provider.js.map +1 -0
- app-rn-runtime/core/base.component.js +113 -41
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/imageSizeEstimator.js +1 -0
- app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
- app-rn-runtime/gestures/swipe.animation.js +105 -0
- app-rn-runtime/gestures/swipe.animation.js.map +1 -0
- app-rn-runtime/package.json +4 -3
- app-rn-runtime/runtime/App.js +11 -2
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +6 -4
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/navigator/drawer.navigator.js +4 -0
- app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js +5 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
- app-rn-runtime/runtime/services/app-spinner.service.js +5 -1
- app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-toast.service.js +1 -1
- app-rn-runtime/runtime/services/app-toast.service.js.map +1 -1
- app-rn-runtime/styles/background.component.js +259 -0
- app-rn-runtime/styles/background.component.js.map +1 -0
- app-rn-runtime/styles/style-prop.validator.js +38 -8
- app-rn-runtime/styles/style-prop.validator.js.map +1 -1
- app-rn-runtime/styles/style-props.js +93 -0
- app-rn-runtime/styles/style-props.js.map +1 -0
- app-rn-runtime/styles/theme.js +6 -37
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/variables/http.service.js +3 -12
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +13 -7
- app-rn-runtime/variables/service-variable.js.map +1 -1
|
@@ -11,7 +11,7 @@ export default class WmCarouselContent extends BaseComponent {
|
|
|
11
11
|
renderWidget(props) {
|
|
12
12
|
return /*#__PURE__*/React.createElement(View, {
|
|
13
13
|
style: this.styles.root
|
|
14
|
-
}, props.children);
|
|
14
|
+
}, this._background, props.children);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=carousel-content.component.js.map
|
app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmCarouselContentProps","DEFAULT_CLASS","WmCarouselContentState","WmCarouselContent","constructor","props","renderWidget","styles","root","children"],"sources":["carousel-content.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCarouselContentProps from './carousel-content.props';\nimport { DEFAULT_CLASS, WmCarouselContentStyles } from './carousel-content.styles';\n\nexport class WmCarouselContentState extends BaseComponentState<WmCarouselContentProps> {}\n\nexport default class WmCarouselContent extends BaseComponent<WmCarouselContentProps, WmCarouselContentState, WmCarouselContentStyles> {\n\n constructor(props: WmCarouselContentProps) {\n super(props, DEFAULT_CLASS, new WmCarouselContentProps());\n }\n\n renderWidget(props: WmCarouselContentProps) {\n return (<View style={this.styles.root}>{props.children}</View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,SAASC,aAAa,QAAiC,2BAA2B;AAElF,OAAO,MAAMC,sBAAsB,SAASH,kBAAkB,CAAyB;AAEvF,eAAe,MAAMI,iBAAiB,SAASL,aAAa,CAA0E;EAEpIM,WAAW,CAACC,KAA6B,EAAE;IACzC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,sBAAsB,EAAE,CAAC;EAC3D;EAEAM,YAAY,CAACD,KAA6B,EAAE;IAC1C,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmCarouselContentProps","DEFAULT_CLASS","WmCarouselContentState","WmCarouselContent","constructor","props","renderWidget","styles","root","_background","children"],"sources":["carousel-content.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCarouselContentProps from './carousel-content.props';\nimport { DEFAULT_CLASS, WmCarouselContentStyles } from './carousel-content.styles';\n\nexport class WmCarouselContentState extends BaseComponentState<WmCarouselContentProps> {}\n\nexport default class WmCarouselContent extends BaseComponent<WmCarouselContentProps, WmCarouselContentState, WmCarouselContentStyles> {\n\n constructor(props: WmCarouselContentProps) {\n super(props, DEFAULT_CLASS, new WmCarouselContentProps());\n }\n\n renderWidget(props: WmCarouselContentProps) {\n return (<View style={this.styles.root}>{this._background}{props.children}</View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,SAASC,aAAa,QAAiC,2BAA2B;AAElF,OAAO,MAAMC,sBAAsB,SAASH,kBAAkB,CAAyB;AAEvF,eAAe,MAAMI,iBAAiB,SAASL,aAAa,CAA0E;EAEpIM,WAAW,CAACC,KAA6B,EAAE;IACzC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,sBAAsB,EAAE,CAAC;EAC3D;EAEAM,YAAY,CAACD,KAA6B,EAAE;IAC1C,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAEJ,KAAK,CAACK,QAAQ,CAAQ;EAClF;AACF"}
|
app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js
CHANGED
|
@@ -11,7 +11,7 @@ export default class WmCarouselTemplate extends BaseComponent {
|
|
|
11
11
|
renderWidget(props) {
|
|
12
12
|
return /*#__PURE__*/React.createElement(View, {
|
|
13
13
|
style: this.styles.root
|
|
14
|
-
}, props.children);
|
|
14
|
+
}, this._background, props.children);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=carousel-template.component.js.map
|
app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmCarouselTemplateProps","DEFAULT_CLASS","WmCarouselTemplateState","WmCarouselTemplate","constructor","props","renderWidget","styles","root","children"],"sources":["carousel-template.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCarouselTemplateProps from './carousel-template.props';\nimport { DEFAULT_CLASS, WmCarouselTemplateStyles } from './carousel-template.styles';\n\nexport class WmCarouselTemplateState extends BaseComponentState<WmCarouselTemplateProps> {}\n\nexport default class WmCarouselTemplate extends BaseComponent<WmCarouselTemplateProps, WmCarouselTemplateState, WmCarouselTemplateStyles> {\n\n constructor(props: WmCarouselTemplateProps) {\n super(props, DEFAULT_CLASS, new WmCarouselTemplateProps());\n }\n\n renderWidget(props: WmCarouselTemplateProps) {\n return (<View style={this.styles.root}>{props.children}</View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,uBAAuB,MAAM,2BAA2B;AAC/D,SAASC,aAAa,QAAkC,4BAA4B;AAEpF,OAAO,MAAMC,uBAAuB,SAASH,kBAAkB,CAA0B;AAEzF,eAAe,MAAMI,kBAAkB,SAASL,aAAa,CAA6E;EAExIM,WAAW,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,uBAAuB,EAAE,CAAC;EAC5D;EAEAM,YAAY,CAACD,KAA8B,EAAE;IAC3C,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmCarouselTemplateProps","DEFAULT_CLASS","WmCarouselTemplateState","WmCarouselTemplate","constructor","props","renderWidget","styles","root","_background","children"],"sources":["carousel-template.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCarouselTemplateProps from './carousel-template.props';\nimport { DEFAULT_CLASS, WmCarouselTemplateStyles } from './carousel-template.styles';\n\nexport class WmCarouselTemplateState extends BaseComponentState<WmCarouselTemplateProps> {}\n\nexport default class WmCarouselTemplate extends BaseComponent<WmCarouselTemplateProps, WmCarouselTemplateState, WmCarouselTemplateStyles> {\n\n constructor(props: WmCarouselTemplateProps) {\n super(props, DEFAULT_CLASS, new WmCarouselTemplateProps());\n }\n\n renderWidget(props: WmCarouselTemplateProps) {\n return (<View style={this.styles.root}>{this._background}{props.children}</View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,uBAAuB,MAAM,2BAA2B;AAC/D,SAASC,aAAa,QAAkC,4BAA4B;AAEpF,OAAO,MAAMC,uBAAuB,SAASH,kBAAkB,CAA0B;AAEzF,eAAe,MAAMI,kBAAkB,SAASL,aAAa,CAA6E;EAExIM,WAAW,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,uBAAuB,EAAE,CAAC;EAC5D;EAEAM,YAAY,CAACD,KAA8B,EAAE;IAC3C,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAEJ,KAAK,CAACK,QAAQ,CAAQ;EAClF;AACF"}
|
|
@@ -113,7 +113,7 @@ export default class WmCarousel extends BaseComponent {
|
|
|
113
113
|
return /*#__PURE__*/React.createElement(View, {
|
|
114
114
|
style: styles.root,
|
|
115
115
|
onLayout: this.onLayoutChange
|
|
116
|
-
}, this.state.sliderWidth > 0 ? /*#__PURE__*/React.createElement(Carousel, {
|
|
116
|
+
}, this._background, this.state.sliderWidth > 0 ? /*#__PURE__*/React.createElement(Carousel, {
|
|
117
117
|
ref: ref => this.carouselRef = ref,
|
|
118
118
|
data: data ?? [],
|
|
119
119
|
firstItem: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","Carousel","Pagination","WmIcon","BaseComponent","BaseComponentState","WmCarouselProps","DEFAULT_CLASS","WmCarouselState","WmCarousel","constructor","props","index","prevIndex","state","activeIndex","updateState","invokeEventCallback","data","type","renderSlide","item","children","e","sliderWidth","nativeEvent","layout","width","active","styles","activeDotStyle","dotStyle","carouselRef","currentIndex","noOfSlides","snapToNext","snapToItem","snapToPrev","cleanup","push","stopPlay","autoPlay","animation","animationinterval","intervalId","setInterval","next","clearInterval","onPropertyChange","name","$new","$old","renderPagination","dotsWrapperStyle","renderWidget","hasNavs","controls","hasDots","dataset","length","root","onLayoutChange","ref","height","renderItem","onSlideChange","btnPanel","prevBtn","prev","nextBtn"],"sources":["carousel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, LayoutChangeEvent } from 'react-native';\nimport Carousel, { Pagination } from 'react-native-snap-carousel';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCarouselProps from './carousel.props';\nimport { DEFAULT_CLASS, WmCarouselStyles } from './carousel.styles';\n\nexport class WmCarouselState extends BaseComponentState<WmCarouselProps> {\n activeIndex = 0;\n sliderWidth = 0;\n}\n\nexport default class WmCarousel extends BaseComponent<WmCarouselProps, WmCarouselState, WmCarouselStyles> {\n\n carouselRef: Carousel<unknown> | null = null as any;\n noOfSlides: number = 0;\n stopPlay: Function = null as any;\n\n constructor(props: WmCarouselProps) {\n super(props, DEFAULT_CLASS, new WmCarouselProps(), new WmCarouselState());\n this.cleanup.push(() => {\n this.stopPlay && this.stopPlay();\n })\n }\n\n autoPlay() {\n const props = this.state.props;\n this.stopPlay && this.stopPlay();\n if (props.animation && props.animationinterval) {\n const intervalId = setInterval(() => {\n this.next();\n }, props.animationinterval * 1000);\n this.stopPlay = () => clearInterval(intervalId);\n }\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'animation':\n case 'animationinterval' : {\n this.autoPlay();\n }\n }\n }\n\n onSlideChange = (index: number) => {\n const prevIndex = this.state.activeIndex;\n this.updateState({\n activeIndex: index\n } as WmCarouselState,\n () => this.invokeEventCallback('onChange', [this, index, prevIndex]));\n }\n\n renderItem = (data: any) => {\n const props = this.state.props;\n if (props.type === 'dynamic') {\n return props.renderSlide ? props.renderSlide(data.item, data.index) : null;\n }\n return props.children[data.index];\n }\n\n onLayoutChange = (e: LayoutChangeEvent) => {\n this.updateState({\n sliderWidth: e.nativeEvent.layout.width\n } as WmCarouselState);\n }\n\n getDotElement = ({active, index}: {active: boolean, index: number}) => {\n return (<Text style={active ? this.styles.activeDotStyle: this.styles.dotStyle}>{index}</Text>);\n }\n\n renderPagination(props: WmCarouselProps, styles: WmCarouselStyles) {\n return (\n <Pagination\n carouselRef={this.carouselRef as any}\n dotsLength={this.noOfSlides}\n activeDotIndex={this.state.activeIndex}\n containerStyle={styles.dotsWrapperStyle}\n dotStyle={styles.activeDotStyle}\n inactiveDotStyle={styles.dotStyle}\n inactiveDotScale={0.8}\n tappableDots={true}\n />\n );\n }\n\n next = () => {\n if (this.carouselRef && this.carouselRef.currentIndex < this.noOfSlides - 1) {\n this.carouselRef?.snapToNext();\n } else {\n this.carouselRef?.snapToItem(0);\n }\n }\n\n prev = () => {\n if (this.carouselRef && this.carouselRef.currentIndex > 0) {\n this.carouselRef?.snapToPrev();\n } else {\n this.carouselRef?.snapToItem(this.noOfSlides - 1);\n }\n }\n\n renderWidget(props: WmCarouselProps) {\n const hasNavs = props.controls === 'both' || props.controls ==='navs';\n const hasDots = props.controls === 'both' || props.controls ==='indicators';\n let styles = this.styles;\n const data = props.type === 'dynamic' ? props.dataset : props.children;\n this.noOfSlides = data?.length || 0;\n const autoPlay = props.animation === 'auto';\n // TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608\n return (\n <View style={styles.root} onLayout={this.onLayoutChange}>\n {this.state.sliderWidth > 0 ?\n (<Carousel\n ref={ref => this.carouselRef = ref}\n data={data ?? []}\n firstItem={0}\n style={{width: '100%', height: '100%'}}\n enableSnap={true}\n loopClonesPerSide={1}\n autoplay={false}\n activeSlideAlignment='start'\n renderItem={this.renderItem}\n sliderWidth={this.state.sliderWidth}\n itemWidth={this.state.sliderWidth}\n lockScrollWhileSnapping={false}\n scrollEnabled={false}\n onSnapToItem={this.onSlideChange}\n ></Carousel>) : null}\n {hasNavs ? (\n <View style={styles.btnPanel}>\n <WmIcon\n iconclass=\"wi wi-chevron-left fa-2x\"\n styles={styles.prevBtn}\n onTap={this.prev}/>\n <WmIcon\n iconclass=\"wi wi-chevron-right fa-2x\"\n styles={styles.nextBtn}\n onTap={this.next}/>\n </View>): null}\n {this.state.sliderWidth > 0 && hasDots && data ? this.renderPagination(props, styles) : null}\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MA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AAE,IAAI,CAACvB;IAAK,EAAE,CAChB,GAAG,IAAI,EACf,IAAI,CAAChC,KAAK,CAACU,WAAW,GAAG,CAAC,IAAIiC,OAAO,IAAIvC,IAAI,GAAG,IAAI,CAACkC,gBAAgB,CAACzC,KAAK,EAAEkB,MAAM,CAAC,GAAG,IAAI,CACvF;EACX;AACF"}
|
|
1
|
+
{"version":3,"names":["React","View","Text","Carousel","Pagination","WmIcon","BaseComponent","BaseComponentState","WmCarouselProps","DEFAULT_CLASS","WmCarouselState","WmCarousel","constructor","props","index","prevIndex","state","activeIndex","updateState","invokeEventCallback","data","type","renderSlide","item","children","e","sliderWidth","nativeEvent","layout","width","active","styles","activeDotStyle","dotStyle","carouselRef","currentIndex","noOfSlides","snapToNext","snapToItem","snapToPrev","cleanup","push","stopPlay","autoPlay","animation","animationinterval","intervalId","setInterval","next","clearInterval","onPropertyChange","name","$new","$old","renderPagination","dotsWrapperStyle","renderWidget","hasNavs","controls","hasDots","dataset","length","root","onLayoutChange","_background","ref","height","renderItem","onSlideChange","btnPanel","prevBtn","prev","nextBtn"],"sources":["carousel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, LayoutChangeEvent } from 'react-native';\nimport Carousel, { Pagination } from 'react-native-snap-carousel';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCarouselProps from './carousel.props';\nimport { DEFAULT_CLASS, WmCarouselStyles } from './carousel.styles';\n\nexport class WmCarouselState extends BaseComponentState<WmCarouselProps> {\n activeIndex = 0;\n sliderWidth = 0;\n}\n\nexport default class WmCarousel extends BaseComponent<WmCarouselProps, WmCarouselState, WmCarouselStyles> {\n\n carouselRef: Carousel<unknown> | null = null as any;\n noOfSlides: number = 0;\n stopPlay: Function = null as any;\n\n constructor(props: WmCarouselProps) {\n super(props, DEFAULT_CLASS, new WmCarouselProps(), new WmCarouselState());\n this.cleanup.push(() => {\n this.stopPlay && this.stopPlay();\n })\n }\n\n autoPlay() {\n const props = this.state.props;\n this.stopPlay && this.stopPlay();\n if (props.animation && props.animationinterval) {\n const intervalId = setInterval(() => {\n this.next();\n }, props.animationinterval * 1000);\n this.stopPlay = () => clearInterval(intervalId);\n }\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'animation':\n case 'animationinterval' : {\n this.autoPlay();\n }\n }\n }\n\n onSlideChange = (index: number) => {\n const prevIndex = this.state.activeIndex;\n this.updateState({\n activeIndex: index\n } as WmCarouselState,\n () => this.invokeEventCallback('onChange', [this, index, prevIndex]));\n }\n\n renderItem = (data: any) => {\n const props = this.state.props;\n if (props.type === 'dynamic') {\n return props.renderSlide ? props.renderSlide(data.item, data.index) : null;\n }\n return props.children[data.index];\n }\n\n onLayoutChange = (e: LayoutChangeEvent) => {\n this.updateState({\n sliderWidth: e.nativeEvent.layout.width\n } as WmCarouselState);\n }\n\n getDotElement = ({active, index}: {active: boolean, index: number}) => {\n return (<Text style={active ? this.styles.activeDotStyle: this.styles.dotStyle}>{index}</Text>);\n }\n\n renderPagination(props: WmCarouselProps, styles: WmCarouselStyles) {\n return (\n <Pagination\n carouselRef={this.carouselRef as any}\n dotsLength={this.noOfSlides}\n activeDotIndex={this.state.activeIndex}\n containerStyle={styles.dotsWrapperStyle}\n dotStyle={styles.activeDotStyle}\n inactiveDotStyle={styles.dotStyle}\n inactiveDotScale={0.8}\n tappableDots={true}\n />\n );\n }\n\n next = () => {\n if (this.carouselRef && this.carouselRef.currentIndex < this.noOfSlides - 1) {\n this.carouselRef?.snapToNext();\n } else {\n this.carouselRef?.snapToItem(0);\n }\n }\n\n prev = () => {\n if (this.carouselRef && this.carouselRef.currentIndex > 0) {\n this.carouselRef?.snapToPrev();\n } else {\n this.carouselRef?.snapToItem(this.noOfSlides - 1);\n }\n }\n\n renderWidget(props: WmCarouselProps) {\n const hasNavs = props.controls === 'both' || props.controls ==='navs';\n const hasDots = props.controls === 'both' || props.controls ==='indicators';\n let styles = this.styles;\n const data = props.type === 'dynamic' ? props.dataset : props.children;\n this.noOfSlides = data?.length || 0;\n const autoPlay = props.animation === 'auto';\n // TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608\n return (\n <View style={styles.root} onLayout={this.onLayoutChange}>\n {this._background}\n {this.state.sliderWidth > 0 ?\n (<Carousel\n ref={ref => this.carouselRef = ref}\n data={data ?? []}\n firstItem={0}\n style={{width: '100%', height: '100%'}}\n enableSnap={true}\n loopClonesPerSide={1}\n autoplay={false}\n activeSlideAlignment='start'\n renderItem={this.renderItem}\n sliderWidth={this.state.sliderWidth}\n itemWidth={this.state.sliderWidth}\n lockScrollWhileSnapping={false}\n scrollEnabled={false}\n onSnapToItem={this.onSlideChange}\n ></Carousel>) : null}\n {hasNavs ? (\n <View style={styles.btnPanel}>\n <WmIcon\n iconclass=\"wi wi-chevron-left fa-2x\"\n styles={styles.prevBtn}\n onTap={this.prev}/>\n <WmIcon\n iconclass=\"wi wi-chevron-right fa-2x\"\n styles={styles.nextBtn}\n onTap={this.next}/>\n </View>): null}\n {this.state.sliderWidth > 0 && hasDots && data ? this.renderPagination(props, styles) : null}\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAA2B,cAAc;AAC5D,OAAOC,QAAQ,IAAIC,UAAU,QAAQ,4BAA4B;AACjE,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AAEnE,OAAO,MAAMC,eAAe,SAASH,kBAAkB,CAAkB;EAAA;IAAA;IAAA,qCACzD,CAAC;IAAA,qCACD,CAAC;EAAA;AACjB;AAEA,eAAe,MAAMI,UAAU,SAASL,aAAa,CA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;MACR,GAAG,EAAEuC,GAAG,IAAI,IAAI,CAAC/B,WAAW,GAAG+B,GAAI;MACnC,IAAI,EAAE7C,IAAI,IAAI,EAAG;MACjB,SAAS,EAAE,CAAE;MACb,KAAK,EAAE;QAACS,KAAK,EAAE,MAAM;QAAEqC,MAAM,EAAE;MAAM,CAAE;MACvC,UAAU,EAAE,IAAK;MACjB,iBAAiB,EAAE,CAAE;MACrB,QAAQ,EAAE,KAAM;MAChB,oBAAoB,EAAC,OAAO;MAC5B,UAAU,EAAE,IAAI,CAACC,UAAW;MAC5B,WAAW,EAAE,IAAI,CAACnD,KAAK,CAACU,WAAY;MACpC,SAAS,EAAE,IAAI,CAACV,KAAK,CAACU,WAAY;MAClC,uBAAuB,EAAE,KAAM;MAC/B,aAAa,EAAE,KAAM;MACrB,YAAY,EAAE,IAAI,CAAC0C;IAAc,EACvB,GAAI,IAAI,EACrBX,OAAO,gBACN,oBAAC,IAAI;MAAC,KAAK,EAAE1B,MAAM,CAACsC;IAAS,gBAC3B,oBAAC,MAAM;MACL,SAAS,EAAC,0BAA0B;MACpC,MAAM,EAAEtC,MAAM,CAACuC,OAAQ;MACvB,KAAK,EAAE,IAAI,CAACC;IAAK,EAAE,eACrB,oBAAC,MAAM;MACL,SAAS,EAAC,2BAA2B;MACrC,MAAM,EAAExC,MAAM,CAACyC,OAAQ;MACvB,KAAK,EAAE,IAAI,CAACxB;IAAK,EAAE,CAChB,GAAG,IAAI,EACf,IAAI,CAAChC,KAAK,CAACU,WAAW,GAAG,CAAC,IAAIiC,OAAO,IAAIvC,IAAI,GAAG,IAAI,CAACkC,gBAAgB,CAACzC,KAAK,EAAEkB,MAAM,CAAC,GAAG,IAAI,CACvF;EACX;AACF"}
|
|
@@ -28,7 +28,7 @@ export default class WmLogin extends BaseComponent {
|
|
|
28
28
|
renderWidget(props) {
|
|
29
29
|
return /*#__PURE__*/React.createElement(View, {
|
|
30
30
|
style: this.styles.root
|
|
31
|
-
}, this.state.errorMsg && /*#__PURE__*/React.createElement(Text, {
|
|
31
|
+
}, this._background, this.state.errorMsg && /*#__PURE__*/React.createElement(Text, {
|
|
32
32
|
style: this.styles.errorMsgStyles
|
|
33
33
|
}, this.state.errorMsg), /*#__PURE__*/React.createElement(View, {
|
|
34
34
|
style: this.styles.formStyles
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","WmLoginProps","DEFAULT_CLASS","WmLoginState","WmLogin","constructor","props","onLoginSuccess","response","onLoginError","error","updateState","errorMsg","message","doLogin","formData","onLogin","bind","renderWidget","styles","root","state","errorMsgStyles","formStyles","children"],"sources":["login.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLoginProps from './login.props';\nimport { DEFAULT_CLASS, WmLoginStyles } from './login.styles';\nimport { AxiosError, AxiosResponse } from 'axios';\n\nexport class WmLoginState extends BaseComponentState<WmLoginProps> {\n errorMsg = '';\n}\n\nexport default class WmLogin extends BaseComponent<WmLoginProps, WmLoginState, WmLoginStyles> {\n constructor(props: WmLoginProps) {\n super(props, DEFAULT_CLASS, new WmLoginProps());\n }\n\n onLoginSuccess(response: AxiosResponse) {\n }\n\n onLoginError(error: AxiosError) {\n this.updateState({errorMsg: error?.message} as WmLoginState);\n }\n\n doLogin(formData: any) {\n this.props.onLogin(formData, this.onLoginSuccess.bind(this), this.onLoginError.bind(this));\n }\n\n renderWidget(props: WmLoginProps) {\n return (<View style={this.styles.root}>\n {this.state.errorMsg && <Text style={this.styles.errorMsgStyles}>{this.state.errorMsg}</Text>}\n <View style={this.styles.formStyles}>{props.children}</View>\n </View>); \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAG7D,OAAO,MAAMC,YAAY,SAASH,kBAAkB,CAAe;EAAA;IAAA;IAAA,kCACtD,EAAE;EAAA;AACf;AAEA,eAAe,MAAMI,OAAO,SAASL,aAAa,CAA4C;EAC5FM,WAAW,CAACC,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,YAAY,EAAE,CAAC;EACjD;EAEAM,cAAc,CAACC,QAAuB,EAAE,CACxC;EAEAC,YAAY,CAACC,KAAiB,EAAE;IAC9B,IAAI,CAACC,WAAW,CAAC;MAACC,QAAQ,EAAEF,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEG;IAAO,CAAC,CAAiB;EAC9D;EAEAC,OAAO,CAACC,QAAa,EAAE;IACrB,IAAI,CAACT,KAAK,CAACU,OAAO,CAACD,QAAQ,EAAE,IAAI,CAACR,cAAc,CAACU,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAACR,YAAY,CAACQ,IAAI,CAAC,IAAI,CAAC,CAAC;EAC5F;EAEAC,YAAY,CAACZ,KAAmB,EAAE;IAChC,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACa,MAAM,CAACC;IAAK,GACnC,IAAI,CAACC,KAAK,
|
|
1
|
+
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","WmLoginProps","DEFAULT_CLASS","WmLoginState","WmLogin","constructor","props","onLoginSuccess","response","onLoginError","error","updateState","errorMsg","message","doLogin","formData","onLogin","bind","renderWidget","styles","root","_background","state","errorMsgStyles","formStyles","children"],"sources":["login.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLoginProps from './login.props';\nimport { DEFAULT_CLASS, WmLoginStyles } from './login.styles';\nimport { AxiosError, AxiosResponse } from 'axios';\n\nexport class WmLoginState extends BaseComponentState<WmLoginProps> {\n errorMsg = '';\n}\n\nexport default class WmLogin extends BaseComponent<WmLoginProps, WmLoginState, WmLoginStyles> {\n constructor(props: WmLoginProps) {\n super(props, DEFAULT_CLASS, new WmLoginProps());\n }\n\n onLoginSuccess(response: AxiosResponse) {\n }\n\n onLoginError(error: AxiosError) {\n this.updateState({errorMsg: error?.message} as WmLoginState);\n }\n\n doLogin(formData: any) {\n this.props.onLogin(formData, this.onLoginSuccess.bind(this), this.onLoginError.bind(this));\n }\n\n renderWidget(props: WmLoginProps) {\n return (<View style={this.styles.root}>\n {this._background}\n {this.state.errorMsg && <Text style={this.styles.errorMsgStyles}>{this.state.errorMsg}</Text>}\n <View style={this.styles.formStyles}>{props.children}</View>\n </View>); \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAG7D,OAAO,MAAMC,YAAY,SAASH,kBAAkB,CAAe;EAAA;IAAA;IAAA,kCACtD,EAAE;EAAA;AACf;AAEA,eAAe,MAAMI,OAAO,SAASL,aAAa,CAA4C;EAC5FM,WAAW,CAACC,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,YAAY,EAAE,CAAC;EACjD;EAEAM,cAAc,CAACC,QAAuB,EAAE,CACxC;EAEAC,YAAY,CAACC,KAAiB,EAAE;IAC9B,IAAI,CAACC,WAAW,CAAC;MAACC,QAAQ,EAAEF,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEG;IAAO,CAAC,CAAiB;EAC9D;EAEAC,OAAO,CAACC,QAAa,EAAE;IACrB,IAAI,CAACT,KAAK,CAACU,OAAO,CAACD,QAAQ,EAAE,IAAI,CAACR,cAAc,CAACU,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAACR,YAAY,CAACQ,IAAI,CAAC,IAAI,CAAC,CAAC;EAC5F;EAEAC,YAAY,CAACZ,KAAmB,EAAE;IAChC,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACa,MAAM,CAACC;IAAK,GACnC,IAAI,CAACC,WAAW,EAChB,IAAI,CAACC,KAAK,CAACV,QAAQ,iBAAI,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACO,MAAM,CAACI;IAAe,GAAE,IAAI,CAACD,KAAK,CAACV,QAAQ,CAAQ,eAC7F,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACO,MAAM,CAACK;IAAW,GAAElB,KAAK,CAACmB,QAAQ,CAAQ,CACvD;EACT;AACF"}
|
|
@@ -38,7 +38,7 @@ export default class WmNetworkInfoToaster extends BaseComponent {
|
|
|
38
38
|
if (this.state.newtworkState.isConnected) {
|
|
39
39
|
return /*#__PURE__*/React.createElement(View, {
|
|
40
40
|
style: this.styles.root
|
|
41
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
41
|
+
}, this._background, /*#__PURE__*/React.createElement(Text, {
|
|
42
42
|
style: this.styles.text
|
|
43
43
|
}, this.props.appLocale.messages.MESSAGE_SERVICE_CONNECTED), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
44
44
|
style: this.styles.action,
|
|
@@ -50,14 +50,14 @@ export default class WmNetworkInfoToaster extends BaseComponent {
|
|
|
50
50
|
if (this.state.newtworkState.isConnecting) {
|
|
51
51
|
return /*#__PURE__*/React.createElement(View, {
|
|
52
52
|
style: this.styles.root
|
|
53
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
53
|
+
}, this._background, /*#__PURE__*/React.createElement(Text, {
|
|
54
54
|
style: this.styles.text
|
|
55
55
|
}, this.props.appLocale.messages.MESSAGE_SERVICE_CONNECTING));
|
|
56
56
|
}
|
|
57
57
|
if (this.state.newtworkState.isServiceAvailable) {
|
|
58
58
|
return /*#__PURE__*/React.createElement(View, {
|
|
59
59
|
style: this.styles.root
|
|
60
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
60
|
+
}, this._background, /*#__PURE__*/React.createElement(Text, {
|
|
61
61
|
style: this.styles.text
|
|
62
62
|
}, this.props.appLocale.messages.MESSAGE_SERVICE_AVAILABLE), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
63
63
|
style: this.styles.action,
|
|
@@ -75,7 +75,7 @@ export default class WmNetworkInfoToaster extends BaseComponent {
|
|
|
75
75
|
if (!this.state.newtworkState.isNetworkAvailable) {
|
|
76
76
|
return /*#__PURE__*/React.createElement(View, {
|
|
77
77
|
style: this.styles.root
|
|
78
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
78
|
+
}, this._background, /*#__PURE__*/React.createElement(Text, {
|
|
79
79
|
style: this.styles.text
|
|
80
80
|
}, this.props.appLocale.messages.MESSAGE_NETWORK_NOT_AVAILABLE), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
81
81
|
style: this.styles.action,
|
|
@@ -86,7 +86,7 @@ export default class WmNetworkInfoToaster extends BaseComponent {
|
|
|
86
86
|
}
|
|
87
87
|
return /*#__PURE__*/React.createElement(View, {
|
|
88
88
|
style: this.styles.root
|
|
89
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
89
|
+
}, this._background, /*#__PURE__*/React.createElement(Text, {
|
|
90
90
|
style: this.styles.text
|
|
91
91
|
}, this.props.appLocale.messages.MESSAGE_SERVICE_NOT_AVAILABLE), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
92
92
|
style: this.styles.action,
|
app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","TouchableOpacity","View","NetworkService","BaseComponent","BaseComponentState","ToastConsumer","WmNetworkInfoToasterProps","DEFAULT_CLASS","isEqual","WmNetworkInfoToasterState","WmNetworkInfoToaster","constructor","props","updateState","newtworkState","getState","showToast","isConnected","cleanup","push","notifier","subscribe","networkState","state","getToastContent","styles","root","text","appLocale","messages","MESSAGE_SERVICE_CONNECTED","action","_close","actionText","LABEL_HIDE_NETWORK_INFO","isConnecting","MESSAGE_SERVICE_CONNECTING","isServiceAvailable","MESSAGE_SERVICE_AVAILABLE","actionSeparator","LABEL_CONNECT_TO_SERVICE","isNetworkAvailable","MESSAGE_NETWORK_NOT_AVAILABLE","MESSAGE_SERVICE_NOT_AVAILABLE","renderWidget","options","content","onClose","toastService","hideToast"],"sources":["network-info-toaster.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, TouchableOpacity, View } from 'react-native';\nimport NetworkService, { NetworkState } from '@wavemaker/app-rn-runtime/core/network.service';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { ToastConsumer, ToastOptions, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\n\nimport WmNetworkInfoToasterProps from './network-info-toaster.props';\nimport { DEFAULT_CLASS, WmNetworkInfoToasterStyles } from './network-info-toaster.styles';\nimport { isEqual } from 'lodash-es';\n\nexport class WmNetworkInfoToasterState extends BaseComponentState<WmNetworkInfoToasterProps> {\n newtworkState = {} as NetworkState;\n showToast = false;\n}\n\nexport default class WmNetworkInfoToaster extends BaseComponent<WmNetworkInfoToasterProps, WmNetworkInfoToasterState, WmNetworkInfoToasterStyles> {\n options = {} as ToastOptions;\n private _close: Function = null as any;\n\n constructor(props: WmNetworkInfoToasterProps) {\n super(props, DEFAULT_CLASS, new WmNetworkInfoToasterProps(), new WmNetworkInfoToasterState());\n this.updateState({\n newtworkState: NetworkService.getState(),\n showToast: !NetworkService.isConnected()\n } as WmNetworkInfoToasterState);\n this.cleanup.push(\n NetworkService.notifier.subscribe('onNetworkStateChange', (networkState: NetworkState) => {\n if (!isEqual(networkState, this.state.newtworkState)) {\n this.updateState({\n newtworkState: networkState,\n showToast: true\n } as WmNetworkInfoToasterState);\n }\n }\n ));\n }\n\n getToastContent() {\n if (this.state.newtworkState.isConnected) { \n return (\n <View style={this.styles.root}>\n <Text style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_SERVICE_CONNECTED}</Text>\n <TouchableOpacity style={this.styles.action} onPress={() => this._close()}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO}</Text>\n </TouchableOpacity>\n </View>);\n }\n if (this.state.newtworkState.isConnecting) { \n return (\n <View style={this.styles.root}>\n <Text style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_SERVICE_CONNECTING}</Text>\n </View>);\n }\n if (this.state.newtworkState.isServiceAvailable) { \n return (\n <View style={this.styles.root}>\n <Text style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_SERVICE_AVAILABLE}</Text>\n <TouchableOpacity style={this.styles.action} onPress={() => this._close()}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO}</Text>\n </TouchableOpacity>\n <Text style={this.styles.actionSeparator}>|</Text>\n <TouchableOpacity style={this.styles.action}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_CONNECT_TO_SERVICE}</Text>\n </TouchableOpacity>\n </View>);\n }\n if (!this.state.newtworkState.isNetworkAvailable) { \n return (\n <View style={this.styles.root}>\n <Text style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_NETWORK_NOT_AVAILABLE}</Text>\n <TouchableOpacity style={this.styles.action} onPress={() => this._close()}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO}</Text>\n </TouchableOpacity>\n </View>);\n }\n return (\n <View style={this.styles.root}>\n <Text style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_SERVICE_NOT_AVAILABLE}</Text>\n <TouchableOpacity style={this.styles.action} onPress={() => this._close()}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO}</Text>\n </TouchableOpacity>\n </View>);\n }\n\n renderWidget(props: WmNetworkInfoToasterProps) {\n this.options.content = this.getToastContent();\n this.options.onClose = () => {\n this._close = null as any;\n this.updateState({\n showToast : false\n } as WmNetworkInfoToasterState);\n };\n return this.options.content && this.state.showToast ? (\n <ToastConsumer>\n {(toastService: ToastService) => {\n this._close = () => toastService.hideToast(this.options);\n toastService.showToast(this.options)\n return null;\n }}\n </ToastConsumer>\n ) : null; \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAC3D,OAAOC,cAAc,MAAwB,gDAAgD;AAC7F,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,aAAa,QAAoC,8CAA8C;AAExG,OAAOC,yBAAyB,MAAM,8BAA8B;AACpE,SAASC,aAAa,QAAoC,+BAA+B;AACzF,SAASC,OAAO,QAAQ,WAAW;AAEnC,OAAO,MAAMC,yBAAyB,SAASL,kBAAkB,CAA4B;EAAA;IAAA;IAAA,uCAC3E,CAAC,CAAC;IAAA,mCACN,KAAK;EAAA;AACnB;AAEA,eAAe,MAAMM,oBAAoB,SAASP,aAAa,CAAmF;EAIhJQ,WAAW,CAACC,KAAgC,EAAE;IAC5C,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,yBAAyB,EAAE,EAAE,IAAIG,yBAAyB,EAAE,CAAC;IAAC,iCAJtF,CAAC,CAAC;IAAA,gCACe,IAAI;IAI7B,IAAI,CAACI,WAAW,CAAC;MACfC,aAAa,EAAEZ,cAAc,CAACa,QAAQ,EAAE;MACxCC,SAAS,EAAE,CAACd,cAAc,CAACe,WAAW;IACxC,CAAC,CAA8B;IAC/B,IAAI,CAACC,OAAO,CAACC,IAAI,CACfjB,cAAc,CAACkB,QAAQ,CAACC,SAAS,CAAC,sBAAsB,EAAGC,YAA0B,IAAK;MACxF,IAAI,CAACd,OAAO,CAACc,YAAY,EAAE,IAAI,CAACC,KAAK,CAACT,aAAa,CAAC,EAAE;QACpD,IAAI,CAACD,WAAW,CAAC;UACfC,aAAa,EAAEQ,YAAY;UAC3BN,SAAS,EAAE;QACb,CAAC,CAA8B;MACjC;IACF,CAAC,CACF,CAAC;EACJ;EAEAQ,eAAe,GAAG;IAChB,IAAI,IAAI,CAACD,KAAK,CAACT,aAAa,CAACG,WAAW,EAAE;MACxC,oBACA,oBAAC,IAAI;QAAC,KAAK,EAAE,IAAI,CAACQ,MAAM,CAACC;MAAK,
|
|
1
|
+
{"version":3,"names":["React","Text","TouchableOpacity","View","NetworkService","BaseComponent","BaseComponentState","ToastConsumer","WmNetworkInfoToasterProps","DEFAULT_CLASS","isEqual","WmNetworkInfoToasterState","WmNetworkInfoToaster","constructor","props","updateState","newtworkState","getState","showToast","isConnected","cleanup","push","notifier","subscribe","networkState","state","getToastContent","styles","root","_background","text","appLocale","messages","MESSAGE_SERVICE_CONNECTED","action","_close","actionText","LABEL_HIDE_NETWORK_INFO","isConnecting","MESSAGE_SERVICE_CONNECTING","isServiceAvailable","MESSAGE_SERVICE_AVAILABLE","actionSeparator","LABEL_CONNECT_TO_SERVICE","isNetworkAvailable","MESSAGE_NETWORK_NOT_AVAILABLE","MESSAGE_SERVICE_NOT_AVAILABLE","renderWidget","options","content","onClose","toastService","hideToast"],"sources":["network-info-toaster.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, TouchableOpacity, View } from 'react-native';\nimport NetworkService, { NetworkState } from '@wavemaker/app-rn-runtime/core/network.service';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { ToastConsumer, ToastOptions, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\n\nimport WmNetworkInfoToasterProps from './network-info-toaster.props';\nimport { DEFAULT_CLASS, WmNetworkInfoToasterStyles } from './network-info-toaster.styles';\nimport { isEqual } from 'lodash-es';\n\nexport class WmNetworkInfoToasterState extends BaseComponentState<WmNetworkInfoToasterProps> {\n newtworkState = {} as NetworkState;\n showToast = false;\n}\n\nexport default class WmNetworkInfoToaster extends BaseComponent<WmNetworkInfoToasterProps, WmNetworkInfoToasterState, WmNetworkInfoToasterStyles> {\n options = {} as ToastOptions;\n private _close: Function = null as any;\n\n constructor(props: WmNetworkInfoToasterProps) {\n super(props, DEFAULT_CLASS, new WmNetworkInfoToasterProps(), new WmNetworkInfoToasterState());\n this.updateState({\n newtworkState: NetworkService.getState(),\n showToast: !NetworkService.isConnected()\n } as WmNetworkInfoToasterState);\n this.cleanup.push(\n NetworkService.notifier.subscribe('onNetworkStateChange', (networkState: NetworkState) => {\n if (!isEqual(networkState, this.state.newtworkState)) {\n this.updateState({\n newtworkState: networkState,\n showToast: true\n } as WmNetworkInfoToasterState);\n }\n }\n ));\n }\n\n getToastContent() {\n if (this.state.newtworkState.isConnected) { \n return (\n <View style={this.styles.root}>\n {this._background}\n <Text style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_SERVICE_CONNECTED}</Text>\n <TouchableOpacity style={this.styles.action} onPress={() => this._close()}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO}</Text>\n </TouchableOpacity>\n </View>);\n }\n if (this.state.newtworkState.isConnecting) { \n return (\n <View style={this.styles.root}>\n {this._background}\n <Text style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_SERVICE_CONNECTING}</Text>\n </View>);\n }\n if (this.state.newtworkState.isServiceAvailable) { \n return (\n <View style={this.styles.root}>\n {this._background}\n <Text style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_SERVICE_AVAILABLE}</Text>\n <TouchableOpacity style={this.styles.action} onPress={() => this._close()}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO}</Text>\n </TouchableOpacity>\n <Text style={this.styles.actionSeparator}>|</Text>\n <TouchableOpacity style={this.styles.action}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_CONNECT_TO_SERVICE}</Text>\n </TouchableOpacity>\n </View>);\n }\n if (!this.state.newtworkState.isNetworkAvailable) { \n return (\n <View style={this.styles.root}>\n {this._background}\n <Text style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_NETWORK_NOT_AVAILABLE}</Text>\n <TouchableOpacity style={this.styles.action} onPress={() => this._close()}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO}</Text>\n </TouchableOpacity>\n </View>);\n }\n return (\n <View style={this.styles.root}>\n {this._background}\n <Text style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_SERVICE_NOT_AVAILABLE}</Text>\n <TouchableOpacity style={this.styles.action} onPress={() => this._close()}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO}</Text>\n </TouchableOpacity>\n </View>);\n }\n\n renderWidget(props: WmNetworkInfoToasterProps) {\n this.options.content = this.getToastContent();\n this.options.onClose = () => {\n this._close = null as any;\n this.updateState({\n showToast : false\n } as WmNetworkInfoToasterState);\n };\n return this.options.content && this.state.showToast ? (\n <ToastConsumer>\n {(toastService: ToastService) => {\n this._close = () => toastService.hideToast(this.options);\n toastService.showToast(this.options)\n return null;\n }}\n </ToastConsumer>\n ) : null; \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAC3D,OAAOC,cAAc,MAAwB,gDAAgD;AAC7F,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,aAAa,QAAoC,8CAA8C;AAExG,OAAOC,yBAAyB,MAAM,8BAA8B;AACpE,SAASC,aAAa,QAAoC,+BAA+B;AACzF,SAASC,OAAO,QAAQ,WAAW;AAEnC,OAAO,MAAMC,yBAAyB,SAASL,kBAAkB,CAA4B;EAAA;IAAA;IAAA,uCAC3E,CAAC,CAAC;IAAA,mCACN,KAAK;EAAA;AACnB;AAEA,eAAe,MAAMM,oBAAoB,SAASP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O,GAAG,MAAM;MAC3B,IAAI,CAACf,MAAM,GAAG,IAAW;MACzB,IAAI,CAACpB,WAAW,CAAC;QACfG,SAAS,EAAG;MACd,CAAC,CAA8B;IACjC,CAAC;IACD,OAAO,IAAI,CAAC8B,OAAO,CAACC,OAAO,IAAI,IAAI,CAACxB,KAAK,CAACP,SAAS,gBACjD,oBAAC,aAAa,QACViC,YAA0B,IAAK;MAC/B,IAAI,CAAChB,MAAM,GAAG,MAAMgB,YAAY,CAACC,SAAS,CAAC,IAAI,CAACJ,OAAO,CAAC;MACxDG,YAAY,CAACjC,SAAS,CAAC,IAAI,CAAC8B,OAAO,CAAC;MACpC,OAAO,IAAI;IACb,CAAC,CACa,GACd,IAAI;EACV;AACF"}
|
|
@@ -103,7 +103,7 @@ export default class WmWebview extends BaseComponent {
|
|
|
103
103
|
renderWidget(props) {
|
|
104
104
|
return /*#__PURE__*/React.createElement(View, {
|
|
105
105
|
style: this.styles.root
|
|
106
|
-
}, Platform.OS === 'web' ? /*#__PURE__*/React.createElement("iframe", {
|
|
106
|
+
}, this._background, Platform.OS === 'web' ? /*#__PURE__*/React.createElement("iframe", {
|
|
107
107
|
src: props.src,
|
|
108
108
|
width: '100%',
|
|
109
109
|
height: '100%',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","BackHandler","Platform","View","WebView","HideMode","BaseComponent","BaseComponentState","WmWebviewProps","DEFAULT_CLASS","WmWebViewState","WmWebview","constructor","props","webview","webViewState","canGoBack","goBack","event","data","nativeEvent","startsWith","id","match","callback","invokeJSCallbacks","result","substring","indexOf","parseResult","invokeEventCallback","e","title","url","updateState","src","hideMode","DONOT_ADD_TO_DOM","addEventListener","handleBackButtonPress","componentWillUnmount","removeEventListener","executeScript","fn","Promise","resolve","reject","Date","now","injectJavaScript","insertCSS","style","replace","JSON","parse","getTitle","iframe","currentTarget","contentWindow","document","renderWidget","styles","root","OS","onLoad","ref","uri","incognito","onMessage","state"],"sources":["webview.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BackHandler, Platform, View } from 'react-native';\nimport { WebView, WebViewNavigation, WebViewMessageEvent } from 'react-native-webview';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmWebviewProps from './webview.props';\nimport { DEFAULT_CLASS, WebviewStyles } from './webview.styles';\n\nclass WmWebViewState extends BaseComponentState<WmWebviewProps> {\n\n}\n\nexport default class WmWebview extends BaseComponent<WmWebviewProps, WmWebViewState, WebviewStyles> {\n\n private webview: WebView | null = null as any;\n private webViewState: WebViewNavigation = null as any;\n private invokeJSCallbacks = {} as any;\n\n constructor(props: WmWebviewProps) {\n super(props, DEFAULT_CLASS, new WmWebviewProps());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n BackHandler.removeEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n\n handleBackButtonPress = (): boolean => {\n if (this.webview && this.webViewState && this.webViewState.canGoBack) {\n this.webview.goBack();\n return true;\n }\n return false;\n }\n\n executeScript(fn: string) {\n return new Promise((resolve, reject) => {\n if (this.webview) {\n const id = '' + Date.now();\n this.invokeJSCallbacks[id] = resolve;\n fn = `\n (function(){\n try{\n return (${fn});\n } catch(e) {\n return e.getMessage();\n }\n }())\n `;\n this.webview.injectJavaScript(\n `window.ReactNativeWebView.postMessage('afterInjectJavaScript:' + ${id} + ':' + JSON.stringify(${fn}))`\n );\n } else {\n reject();\n }\n });\n }\n\n insertCSS(style = '') {\n style = style.replace(/[\\n\\t\\r]/g, '');\n return this.executeScript(`\n function() {\n const style = document.createElement('style');\n style.innerHTML = '${style}';\n document.head.appendChild(style);\n return 'SUCCESS';\n }()\n `);\n }\n\n parseResult(result: string) {\n try {\n return JSON.parse(result);\n } catch(e) {\n if (result === 'undefined' || result === 'null') {\n return null;\n }\n return result;\n }\n }\n\n onMessage = (event: WebViewMessageEvent) => {\n const data: string = event.nativeEvent?.data;\n if (data && data.startsWith('afterInjectJavaScript')) {\n const id = data?.match(/\\:([0-9]+)\\:/);\n const callback = id && this.invokeJSCallbacks[id[1]];\n const result = data.substring(data.indexOf(':', data.indexOf(':') + 1) + 1);\n callback && callback(this.parseResult(result));\n } else {\n this.invokeEventCallback('onMessage', [event, this]);\n }\n }\n\n getTitle(iframe: any) {\n try {\n return iframe.currentTarget.contentWindow.document.title;\n } catch(e) {\n // browser blocks cross origin access to iframe content.\n }\n }\n\n public onLoad = (e: any, title: string, url: string) => {\n this.updateState({\n props: {\n title: title,\n src: url\n }\n } as WmWebViewState, () => {\n this.invokeEventCallback('onLoad', [e, this]);\n });\n }\n\n protected renderWidget(props: WmWebviewProps) {\n return (\n <View style={this.styles.root}>\n {Platform.OS === 'web' ?\n (<iframe src={props.src} width={'100%'} height={'100%'}\n onLoad={(e) => this.onLoad(e, this.getTitle(e.currentTarget), (e.currentTarget as any).src)}></iframe>) :\n (<WebView\n ref={(ref) => this.webview = ref}\n nestedScrollEnabled={true}\n style={this.styles.webview}\n source={{\n uri: props.src\n }}\n incognito={props.incognito}\n onMessage={this.onMessage}\n sharedCookiesEnabled={true}\n onNavigationStateChange={(state) => {\n this.webViewState = state;\n }}\n scrollEnabled={true}\n onLoadEnd={(e) => this.onLoad(e, e.nativeEvent.title, e.nativeEvent.url)}>\n </WebView>)}\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,WAAW,EAAEC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AAC1D,SAASC,OAAO,QAAgD,sBAAsB;AACtF,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAuB,kBAAkB;AAE/D,MAAMC,cAAc,S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,WAAW,CAACH,MAAc,EAAE;IAC1B,IAAI;MACF,OAAO2B,IAAI,CAACC,KAAK,CAAC5B,MAAM,CAAC;IAC3B,CAAC,CAAC,OAAMK,CAAC,EAAE;MACT,IAAIL,MAAM,KAAK,WAAW,IAAIA,MAAM,KAAK,MAAM,EAAE;QAC/C,OAAO,IAAI;MACb;MACA,OAAOA,MAAM;IACf;EACF;EAcA6B,QAAQ,CAACC,MAAW,EAAE;IACpB,IAAI;MACF,OAAOA,MAAM,CAACC,aAAa,CAACC,aAAa,CAACC,QAAQ,CAAC3B,KAAK;IAC1D,CAAC,CAAC,OAAMD,CAAC,EAAE;MACT;IAAA;EAEJ;EAaU6B,YAAY,CAAC/C,KAAqB,EAAE;IAC5C,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACgD,MAAM,CAACC;IAAK,
|
|
1
|
+
{"version":3,"names":["React","BackHandler","Platform","View","WebView","HideMode","BaseComponent","BaseComponentState","WmWebviewProps","DEFAULT_CLASS","WmWebViewState","WmWebview","constructor","props","webview","webViewState","canGoBack","goBack","event","data","nativeEvent","startsWith","id","match","callback","invokeJSCallbacks","result","substring","indexOf","parseResult","invokeEventCallback","e","title","url","updateState","src","hideMode","DONOT_ADD_TO_DOM","addEventListener","handleBackButtonPress","componentWillUnmount","removeEventListener","executeScript","fn","Promise","resolve","reject","Date","now","injectJavaScript","insertCSS","style","replace","JSON","parse","getTitle","iframe","currentTarget","contentWindow","document","renderWidget","styles","root","_background","OS","onLoad","ref","uri","incognito","onMessage","state"],"sources":["webview.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BackHandler, Platform, View } from 'react-native';\nimport { WebView, WebViewNavigation, WebViewMessageEvent } from 'react-native-webview';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmWebviewProps from './webview.props';\nimport { DEFAULT_CLASS, WebviewStyles } from './webview.styles';\n\nclass WmWebViewState extends BaseComponentState<WmWebviewProps> {\n\n}\n\nexport default class WmWebview extends BaseComponent<WmWebviewProps, WmWebViewState, WebviewStyles> {\n\n private webview: WebView | null = null as any;\n private webViewState: WebViewNavigation = null as any;\n private invokeJSCallbacks = {} as any;\n\n constructor(props: WmWebviewProps) {\n super(props, DEFAULT_CLASS, new WmWebviewProps());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n BackHandler.removeEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n\n handleBackButtonPress = (): boolean => {\n if (this.webview && this.webViewState && this.webViewState.canGoBack) {\n this.webview.goBack();\n return true;\n }\n return false;\n }\n\n executeScript(fn: string) {\n return new Promise((resolve, reject) => {\n if (this.webview) {\n const id = '' + Date.now();\n this.invokeJSCallbacks[id] = resolve;\n fn = `\n (function(){\n try{\n return (${fn});\n } catch(e) {\n return e.getMessage();\n }\n }())\n `;\n this.webview.injectJavaScript(\n `window.ReactNativeWebView.postMessage('afterInjectJavaScript:' + ${id} + ':' + JSON.stringify(${fn}))`\n );\n } else {\n reject();\n }\n });\n }\n\n insertCSS(style = '') {\n style = style.replace(/[\\n\\t\\r]/g, '');\n return this.executeScript(`\n function() {\n const style = document.createElement('style');\n style.innerHTML = '${style}';\n document.head.appendChild(style);\n return 'SUCCESS';\n }()\n `);\n }\n\n parseResult(result: string) {\n try {\n return JSON.parse(result);\n } catch(e) {\n if (result === 'undefined' || result === 'null') {\n return null;\n }\n return result;\n }\n }\n\n onMessage = (event: WebViewMessageEvent) => {\n const data: string = event.nativeEvent?.data;\n if (data && data.startsWith('afterInjectJavaScript')) {\n const id = data?.match(/\\:([0-9]+)\\:/);\n const callback = id && this.invokeJSCallbacks[id[1]];\n const result = data.substring(data.indexOf(':', data.indexOf(':') + 1) + 1);\n callback && callback(this.parseResult(result));\n } else {\n this.invokeEventCallback('onMessage', [event, this]);\n }\n }\n\n getTitle(iframe: any) {\n try {\n return iframe.currentTarget.contentWindow.document.title;\n } catch(e) {\n // browser blocks cross origin access to iframe content.\n }\n }\n\n public onLoad = (e: any, title: string, url: string) => {\n this.updateState({\n props: {\n title: title,\n src: url\n }\n } as WmWebViewState, () => {\n this.invokeEventCallback('onLoad', [e, this]);\n });\n }\n\n protected renderWidget(props: WmWebviewProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n {Platform.OS === 'web' ?\n (<iframe src={props.src} width={'100%'} height={'100%'}\n onLoad={(e) => this.onLoad(e, this.getTitle(e.currentTarget), (e.currentTarget as any).src)}></iframe>) :\n (<WebView\n ref={(ref) => this.webview = ref}\n nestedScrollEnabled={true}\n style={this.styles.webview}\n source={{\n uri: props.src\n }}\n incognito={props.incognito}\n onMessage={this.onMessage}\n sharedCookiesEnabled={true}\n onNavigationStateChange={(state) => {\n this.webViewState = state;\n }}\n scrollEnabled={true}\n onLoadEnd={(e) => this.onLoad(e, e.nativeEvent.title, e.nativeEvent.url)}>\n </WebView>)}\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,WAAW,EAAEC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AAC1D,SAASC,OAAO,QAAgD,sBAAsB;AACtF,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAuB,kBAAkB;AAE/D,MAAMC,cAAc,SAASH,kBAAkB,CAAiB;AAIhE,eAAe,MAAMI,SAAS,SAASL,aAAa,CAAgD;EAMlGM,WAAW,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,cAAc,EAAE,CAAC;IAAC,iCALlB,IAAI;IAAA,sCACI,IAAI;IAAA,2CAClB,CAAC,CAAC;IAAA,+CAaN,MAAe;M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|
@@ -60,7 +60,7 @@ export default class WmAnchor extends BaseComponent {
|
|
|
60
60
|
flexDirection: props.iconposition === 'top' ? 'column' : 'row'
|
|
61
61
|
}],
|
|
62
62
|
onTap: props.hyperlink || props.onTap ? e => this.onTap(navigationService, e) : undefined
|
|
63
|
-
}, props.iconposition === 'top' && icon, props.iconposition === 'left' && icon, props.caption ? /*#__PURE__*/React.createElement(Text, {
|
|
63
|
+
}, this._background, props.iconposition === 'top' && icon, props.iconposition === 'left' && icon, props.caption ? /*#__PURE__*/React.createElement(Text, {
|
|
64
64
|
style: this.styles.text
|
|
65
65
|
}, props.caption) : null, props.iconposition === 'right' && icon, badge)));
|
|
66
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","Badge","BaseComponent","BaseComponentState","Tappable","WmIcon","encodeUrl","NavigationServiceConsumer","WmAnchorProps","DEFAULT_CLASS","Animatedview","createSkeleton","WmAnchorState","WmAnchor","constructor","props","onTap","navigationService","e","state","hyperlink","link","encodeurl","openUrl","target","invokeEventCallback","proxy","renderSkeleton","theme","styles","skeleton","root","width","skeletonwidth","height","skeletonheight","renderWidget","icon","text","color","name","iconclass","badge","badgevalue","undefined","animation","justifyContent","flexDirection","iconposition","caption"],"sources":["anchor.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport { Badge } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { TapEvent, Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { encodeUrl } from '@wavemaker/app-rn-runtime/core/utils';\nimport NavigationService, { NavigationServiceConsumer } from '@wavemaker/app-rn-runtime/core/navigation.service';\n\nimport WmAnchorProps from './anchor.props';\nimport { DEFAULT_CLASS, WmAnchorStyles } from './anchor.styles';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmAnchorState extends BaseComponentState<WmAnchorProps> {\n\n}\n\nexport default class WmAnchor extends BaseComponent<WmAnchorProps, WmAnchorState, WmAnchorStyles> {\n\n constructor(props: WmAnchorProps) {\n super(props, DEFAULT_CLASS, new WmAnchorProps());\n }\n\n onTap(navigationService: NavigationService, e: TapEvent) {\n const props = this.state.props;\n if (props.hyperlink) {\n const link = props.encodeurl ? encodeUrl(props.hyperlink) : props.hyperlink;\n navigationService.openUrl(link, {\n target: this.state.props.target\n });\n }\n this.invokeEventCallback('onTap', [e, this.proxy]);\n }\n\n public renderSkeleton(props: WmAnchorProps){\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: this.props.skeletonwidth || this.styles.root.width,\n height: this.props.skeletonheight || this.styles.root.height\n });\n }\n\n renderWidget(props: WmAnchorProps) {\n if (this.styles.icon && this.styles.icon.text) {\n this.styles.icon.text.color = this.styles.text.color;\n }\n const icon = (<WmIcon\n styles={this.styles.icon} name={props.name + '_icon'} iconclass={props.iconclass}></WmIcon>);\n //@ts-ignore\n const badge = props.badgevalue != undefined ? (<Badge style={this.styles.badge}>{props.badgevalue}</Badge>): null;\n return (\n <NavigationServiceConsumer>\n {(navigationService: NavigationService) =>\n (<Animatedview entryanimation={props.animation} style={{width: this.styles.root.width, height: this.styles.root.height, justifyContent: 'center'}}>\n <Tappable styles={[this.styles.root, this.styles.root.width && this.styles.root.height ? { width: '100%', height: '100%'} : null, {flexDirection: props.iconposition === 'top' ? 'column': 'row'}]}\n onTap={props.hyperlink || props.onTap ? (e: TapEvent) => this.onTap(navigationService, e) : undefined}>\n {props.iconposition === 'top' && icon}\n {props.iconposition === 'left' && icon}\n {props.caption ? (<Text style={this.styles.text}>{props.caption}</Text>) : null}\n {props.iconposition === 'right' && icon}\n {badge}\n </Tappable>\n </Animatedview>)\n }\n </NavigationServiceConsumer>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,O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F,MAAM,CAACE,IAAI,CAACC,KAAK,IAAI,IAAI,CAACH,MAAM,CAACE,IAAI,CAACG,MAAM,GAAG;QAAEF,KAAK,EAAE,MAAM;QAAEE,MAAM,EAAE;MAAM,CAAC,GAAG,IAAI,EAAE;QAACa,aAAa,EAAEhC,KAAK,CAACiC,YAAY,KAAK,KAAK,GAAG,QAAQ,GAAE;MAAK,CAAC,CAAE;MACjM,KAAK,EAAEjC,KAAK,CAACK,SAAS,IAAIL,KAAK,CAACC,KAAK,GAAIE,CAAW,IAAK,IAAI,CAACF,KAAK,CAACC,iBAAiB,EAAEC,CAAC,CAAC,GAAG0B;IAAU,
|
|
1
|
+
{"version":3,"names":["React","Text","Badge","BaseComponent","BaseComponentState","Tappable","WmIcon","encodeUrl","NavigationServiceConsumer","WmAnchorProps","DEFAULT_CLASS","Animatedview","createSkeleton","WmAnchorState","WmAnchor","constructor","props","onTap","navigationService","e","state","hyperlink","link","encodeurl","openUrl","target","invokeEventCallback","proxy","renderSkeleton","theme","styles","skeleton","root","width","skeletonwidth","height","skeletonheight","renderWidget","icon","text","color","name","iconclass","badge","badgevalue","undefined","animation","justifyContent","flexDirection","iconposition","_background","caption"],"sources":["anchor.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport { Badge } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { TapEvent, Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { encodeUrl } from '@wavemaker/app-rn-runtime/core/utils';\nimport NavigationService, { NavigationServiceConsumer } from '@wavemaker/app-rn-runtime/core/navigation.service';\n\nimport WmAnchorProps from './anchor.props';\nimport { DEFAULT_CLASS, WmAnchorStyles } from './anchor.styles';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmAnchorState extends BaseComponentState<WmAnchorProps> {\n\n}\n\nexport default class WmAnchor extends BaseComponent<WmAnchorProps, WmAnchorState, WmAnchorStyles> {\n\n constructor(props: WmAnchorProps) {\n super(props, DEFAULT_CLASS, new WmAnchorProps());\n }\n\n onTap(navigationService: NavigationService, e: TapEvent) {\n const props = this.state.props;\n if (props.hyperlink) {\n const link = props.encodeurl ? encodeUrl(props.hyperlink) : props.hyperlink;\n navigationService.openUrl(link, {\n target: this.state.props.target\n });\n }\n this.invokeEventCallback('onTap', [e, this.proxy]);\n }\n\n public renderSkeleton(props: WmAnchorProps){\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: this.props.skeletonwidth || this.styles.root.width,\n height: this.props.skeletonheight || this.styles.root.height\n });\n }\n\n renderWidget(props: WmAnchorProps) {\n if (this.styles.icon && this.styles.icon.text) {\n this.styles.icon.text.color = this.styles.text.color;\n }\n const icon = (<WmIcon\n styles={this.styles.icon} name={props.name + '_icon'} iconclass={props.iconclass}></WmIcon>);\n //@ts-ignore\n const badge = props.badgevalue != undefined ? (<Badge style={this.styles.badge}>{props.badgevalue}</Badge>): null;\n return (\n <NavigationServiceConsumer>\n {(navigationService: NavigationService) =>\n (<Animatedview entryanimation={props.animation} style={{width: this.styles.root.width, height: this.styles.root.height, justifyContent: 'center'}}>\n <Tappable styles={[this.styles.root, this.styles.root.width && this.styles.root.height ? { width: '100%', height: '100%'} : null, {flexDirection: props.iconposition === 'top' ? 'column': 'row'}]}\n onTap={props.hyperlink || props.onTap ? (e: TapEvent) => this.onTap(navigationService, e) : undefined}>\n {this._background}\n {props.iconposition === 'top' && icon}\n {props.iconposition === 'left' && icon}\n {props.caption ? (<Text style={this.styles.text}>{props.caption}</Text>) : null}\n {props.iconposition === 'right' && icon}\n {badge}\n </Tappable>\n </Animatedview>)\n }\n </NavigationServiceConsumer>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAA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AAI,IAAI,CAACH,MAAM,CAACE,IAAI,CAACG,MAAM,GAAG;QAAEF,KAAK,EAAE,MAAM;QAAEE,MAAM,EAAE;MAAM,CAAC,GAAG,IAAI,EAAE;QAACa,aAAa,EAAEhC,KAAK,CAACiC,YAAY,KAAK,KAAK,GAAG,QAAQ,GAAE;MAAK,CAAC,CAAE;MACjM,KAAK,EAAEjC,KAAK,CAACK,SAAS,IAAIL,KAAK,CAACC,KAAK,GAAIE,CAAW,IAAK,IAAI,CAACF,KAAK,CAACC,iBAAiB,EAAEC,CAAC,CAAC,GAAG0B;IAAU,GACrG,IAAI,CAACK,WAAW,EAChBlC,KAAK,CAACiC,YAAY,KAAK,KAAK,IAAIX,IAAI,EACpCtB,KAAK,CAACiC,YAAY,KAAK,MAAM,IAAIX,IAAI,EACrCtB,KAAK,CAACmC,OAAO,gBAAI,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACrB,MAAM,CAACS;IAAK,GAAEvB,KAAK,CAACmC,OAAO,CAAQ,GAAI,IAAI,EAC9EnC,KAAK,CAACiC,YAAY,KAAK,OAAO,IAAIX,IAAI,EACtCK,KAAK,CACG,CACG,CAEQ;EAEhC;AACF"}
|
|
@@ -38,7 +38,7 @@ export default class WmButton extends BaseComponent {
|
|
|
38
38
|
return /*#__PURE__*/React.createElement(Animatedview, {
|
|
39
39
|
entryanimation: props.animation,
|
|
40
40
|
style: this.styles.root
|
|
41
|
-
}, /*#__PURE__*/React.createElement(Tappable, {
|
|
41
|
+
}, this._background, /*#__PURE__*/React.createElement(Tappable, {
|
|
42
42
|
target: this
|
|
43
43
|
}, /*#__PURE__*/React.createElement(View, {
|
|
44
44
|
style: [this.styles.content, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","Badge","WmButtonProps","DEFAULT_CLASS","WmIcon","Animatedview","createSkeleton","WmButtonState","WmButton","constructor","props","prepareIcon","styles","icon","name","iconclass","iconsize","prepareBadge","badge","badgevalue","renderSkeleton","prop","theme","skeleton","root","width","skeletonwidth","height","skeletonheight","renderWidget","animation","content","flexDirection","iconposition","text","caption"],"sources":["button.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Badge } from 'react-native-paper';\n\nimport WmButtonProps from './button.props';\nimport { DEFAULT_CLASS, WmButtonStyles } from './button.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmButtonState extends BaseComponentState<WmButtonProps> {\n\n}\n\nexport default class WmButton extends BaseComponent<WmButtonProps, WmButtonState, WmButtonStyles> {\n\n constructor(props: WmButtonProps) {\n super(props, DEFAULT_CLASS, new WmButtonProps());\n }\n\n private prepareIcon(props: any) {\n return (<WmIcon\n styles={this.styles.icon} name={props.name + '_icon'} iconclass={props.iconclass} iconsize={props.iconsize}></WmIcon>);\n }\n\n private prepareBadge(props: any) {\n //@ts-ignore\n return (<Badge style={this.styles.badge}>{props.badgevalue}</Badge>);\n }\n\n public renderSkeleton(prop: WmButtonProps) {\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: this.props.skeletonwidth || this.styles.root.width,\n height: this.props.skeletonheight || this.styles.root.height\n });\n }\n\n renderWidget(props: WmButtonProps) {\n return (\n <Animatedview entryanimation={props.animation} style={this.styles.root}>\n <Tappable target={this}>\n <View style={[this.styles.content, {flexDirection: props.iconposition === 'top' ? 'column': 'row'}]}>\n {props.iconposition === 'top' && this.prepareIcon(props)}\n {props.iconposition === 'left' && this.prepareIcon(props)}\n <Text style={this.styles.text}>{props.caption}</Text>\n {props.iconposition === 'right' && this.prepareIcon(props)}\n {props.badgevalue && this.prepareBadge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IAAI,IAAI,CAACd,MAAM,CAACY,IAAI,CAACC,KAAK;MACzDE,MAAM,EAAE,IAAI,CAACjB,KAAK,CAACkB,cAAc,IAAI,IAAI,CAAChB,MAAM,CAACY,IAAI,CAACG;IACxD,CAAC,CAAC;EACJ;EAEAE,YAAY,CAACnB,KAAoB,EAAE;IACjC,oBACE,oBAAC,YAAY;MAAC,cAAc,EAAEA,KAAK,CAACoB,SAAU;MAAC,KAAK,EAAE,IAAI,CAAClB,MAAM,CAACY;IAAK,
|
|
1
|
+
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","Badge","WmButtonProps","DEFAULT_CLASS","WmIcon","Animatedview","createSkeleton","WmButtonState","WmButton","constructor","props","prepareIcon","styles","icon","name","iconclass","iconsize","prepareBadge","badge","badgevalue","renderSkeleton","prop","theme","skeleton","root","width","skeletonwidth","height","skeletonheight","renderWidget","animation","_background","content","flexDirection","iconposition","text","caption"],"sources":["button.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Badge } from 'react-native-paper';\n\nimport WmButtonProps from './button.props';\nimport { DEFAULT_CLASS, WmButtonStyles } from './button.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmButtonState extends BaseComponentState<WmButtonProps> {\n\n}\n\nexport default class WmButton extends BaseComponent<WmButtonProps, WmButtonState, WmButtonStyles> {\n\n constructor(props: WmButtonProps) {\n super(props, DEFAULT_CLASS, new WmButtonProps());\n }\n\n private prepareIcon(props: any) {\n return (<WmIcon\n styles={this.styles.icon} name={props.name + '_icon'} iconclass={props.iconclass} iconsize={props.iconsize}></WmIcon>);\n }\n\n private prepareBadge(props: any) {\n //@ts-ignore\n return (<Badge style={this.styles.badge}>{props.badgevalue}</Badge>);\n }\n\n public renderSkeleton(prop: WmButtonProps) {\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: this.props.skeletonwidth || this.styles.root.width,\n height: this.props.skeletonheight || this.styles.root.height\n });\n }\n\n renderWidget(props: WmButtonProps) {\n return (\n <Animatedview entryanimation={props.animation} style={this.styles.root}>\n {this._background}\n <Tappable target={this}>\n <View style={[this.styles.content, {flexDirection: props.iconposition === 'top' ? 'column': 'row'}]}>\n {props.iconposition === 'top' && this.prepareIcon(props)}\n {props.iconposition === 'left' && this.prepareIcon(props)}\n <Text style={this.styles.text}>{props.caption}</Text>\n {props.iconposition === 'right' && this.prepareIcon(props)}\n {props.badgevalue && this.prepareBadge(props)}\n </View>\n </Tappable>\n </Animatedview>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,KAAK,QAAQ,oBAAoB;AAE1C,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAASC,cAAc,QAAQ,gCAAgC;AAE/D,OAAO,MAAMC,aAAa,SAASR,kBAAkB,CAAgB;AAIrE,eAAe,MAAMS,QAAQ,SAASV,aAAa,CAA+C;EAEhGW,WAAW,CAACC,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEP,aAAa,EAAE,IAAID,aAAa,EAAE,CAAC;EAClD;EAEQS,WAAW,CAACD,KAAU,EAAE;IAC9B,oBAAQ,oBAAC,MAAM;MACb,MAAM,EAAE,IAAI,CAACE,MAAM,CAACC,IAAK;MAAC,IAAI,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C,KAAK,EAAE,IAAI,CAACE,MAAM,CAACuB;IAAK,GAAEzB,KAAK,CAAC0B,OAAO,CAAQ,EACpD1B,KAAK,CAACwB,YAAY,KAAK,OAAO,IAAI,IAAI,CAACvB,WAAW,CAACD,KAAK,CAAC,EACzDA,KAAK,CAACS,UAAU,IAAI,IAAI,CAACF,YAAY,CAACP,KAAK,CAAC,CACxC,CACE,CACE;EAEnB;AACF"}
|
|
@@ -21,7 +21,7 @@ export default class WmButtongroup extends BaseComponent {
|
|
|
21
21
|
style: [this.styles.root, {
|
|
22
22
|
flexDirection: props.vertical ? 'column' : 'row'
|
|
23
23
|
}]
|
|
24
|
-
}, props.children);
|
|
24
|
+
}, this._background, props.children);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
//# sourceMappingURL=buttongroup.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmButtongroupProps","DEFAULT_CLASS","createSkeleton","WmButtongroupState","WmButtongroup","constructor","props","renderSkeleton","theme","styles","skeleton","root","width","skeletonwidth","height","skeletonheight","renderWidget","flexDirection","vertical","children"],"sources":["buttongroup.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmButtongroupProps from './buttongroup.props';\nimport { DEFAULT_CLASS, WmButtongroupStyles } from './buttongroup.styles';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmButtongroupState extends BaseComponentState<WmButtongroupProps> {}\n\nexport default class WmButtongroup extends BaseComponent<WmButtongroupProps, WmButtongroupState, WmButtongroupStyles> {\n\n constructor(props: WmButtongroupProps) {\n super(props, DEFAULT_CLASS, new WmButtongroupProps());\n }\n\n public renderSkeleton(props: WmButtongroupProps){\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: this.props.skeletonwidth || this.styles.root.width,\n height: this.props.skeletonheight || this.styles.root.height\n });\n }\n\n renderWidget(props: WmButtongroupProps) {\n return (\n <View style={[this.styles.root, {flexDirection: props.vertical ? 'column': 'row'}]}>\n {props.children}\n </View>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,kBAAkB,MAAM,qBAAqB;AACpD,SAASC,aAAa,QAA6B,sBAAsB;AACzE,SAAqBC,cAAc,QAAQ,gCAAgC;AAE3E,OAAO,MAAMC,kBAAkB,SAASJ,kBAAkB,CAAqB;AAE/E,eAAe,MAAMK,aAAa,SAASN,aAAa,CAA8D;EAEpHO,WAAW,CAACC,KAAyB,EAAE;IACrC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,kBAAkB,EAAE,CAAC;EACvD;EAEOO,cAAc,CAACD,KAAyB,EAAC;IAC9C,OAAOJ,cAAc,CAAC,IAAI,CAACM,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC,QAAQ,EAAE;MACtD,GAAG,IAAI,CAACD,MAAM,CAACE,IAAI;MACnBC,KAAK,EAAE,IAAI,CAACN,KAAK,CAACO,aAAa,IAAI,IAAI,CAACJ,MAAM,CAACE,IAAI,CAACC,KAAK;MACzDE,MAAM,EAAE,IAAI,CAACR,KAAK,CAACS,cAAc,IAAI,IAAI,CAACN,MAAM,CAACE,IAAI,CAACG;IACxD,CAAC,CAAC;EACJ;EAEAE,YAAY,CAACV,KAAyB,EAAE;IACtC,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,CAAC,IAAI,CAACG,MAAM,CAACE,IAAI,EAAE;QAACM,aAAa,EAAEX,KAAK,CAACY,QAAQ,GAAG,QAAQ,GAAE;MAAK,CAAC;IAAE,
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmButtongroupProps","DEFAULT_CLASS","createSkeleton","WmButtongroupState","WmButtongroup","constructor","props","renderSkeleton","theme","styles","skeleton","root","width","skeletonwidth","height","skeletonheight","renderWidget","flexDirection","vertical","_background","children"],"sources":["buttongroup.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmButtongroupProps from './buttongroup.props';\nimport { DEFAULT_CLASS, WmButtongroupStyles } from './buttongroup.styles';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmButtongroupState extends BaseComponentState<WmButtongroupProps> {}\n\nexport default class WmButtongroup extends BaseComponent<WmButtongroupProps, WmButtongroupState, WmButtongroupStyles> {\n\n constructor(props: WmButtongroupProps) {\n super(props, DEFAULT_CLASS, new WmButtongroupProps());\n }\n\n public renderSkeleton(props: WmButtongroupProps){\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: this.props.skeletonwidth || this.styles.root.width,\n height: this.props.skeletonheight || this.styles.root.height\n });\n }\n\n renderWidget(props: WmButtongroupProps) {\n return (\n <View style={[this.styles.root, {flexDirection: props.vertical ? 'column': 'row'}]}>\n {this._background}\n {props.children}\n </View>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,kBAAkB,MAAM,qBAAqB;AACpD,SAASC,aAAa,QAA6B,sBAAsB;AACzE,SAAqBC,cAAc,QAAQ,gCAAgC;AAE3E,OAAO,MAAMC,kBAAkB,SAASJ,kBAAkB,CAAqB;AAE/E,eAAe,MAAMK,aAAa,SAASN,aAAa,CAA8D;EAEpHO,WAAW,CAACC,KAAyB,EAAE;IACrC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,kBAAkB,EAAE,CAAC;EACvD;EAEOO,cAAc,CAACD,KAAyB,EAAC;IAC9C,OAAOJ,cAAc,CAAC,IAAI,CAACM,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC,QAAQ,EAAE;MACtD,GAAG,IAAI,CAACD,MAAM,CAACE,IAAI;MACnBC,KAAK,EAAE,IAAI,CAACN,KAAK,CAACO,aAAa,IAAI,IAAI,CAACJ,MAAM,CAACE,IAAI,CAACC,KAAK;MACzDE,MAAM,EAAE,IAAI,CAACR,KAAK,CAACS,cAAc,IAAI,IAAI,CAACN,MAAM,CAACE,IAAI,CAACG;IACxD,CAAC,CAAC;EACJ;EAEAE,YAAY,CAACV,KAAyB,EAAE;IACtC,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,CAAC,IAAI,CAACG,MAAM,CAACE,IAAI,EAAE;QAACM,aAAa,EAAEX,KAAK,CAACY,QAAQ,GAAG,QAAQ,GAAE;MAAK,CAAC;IAAE,GAChF,IAAI,CAACC,WAAW,EAChBb,KAAK,CAACc,QAAQ,CACV;EAEX;AACF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
3
|
+
import WmCustomProps from './custom.props';
|
|
4
|
+
import { DEFAULT_CLASS } from './custom.styles';
|
|
5
|
+
import { View } from 'react-native';
|
|
6
|
+
import { createSkeleton } from '../skeleton/skeleton.component';
|
|
7
|
+
export class WmCustomState extends BaseComponentState {}
|
|
8
|
+
export default class WmCustom extends BaseComponent {
|
|
9
|
+
constructor(props) {
|
|
10
|
+
super(props, DEFAULT_CLASS, new WmCustomProps(), new WmCustomState());
|
|
11
|
+
}
|
|
12
|
+
renderSkeleton(prop) {
|
|
13
|
+
return createSkeleton(this.theme, this.styles.skeleton, {
|
|
14
|
+
...this.styles.root,
|
|
15
|
+
width: this.props.skeletonwidth || this.styles.root.width,
|
|
16
|
+
height: this.props.skeletonheight || this.styles.root.height
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
renderWidget(props) {
|
|
20
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
21
|
+
style: this.styles.root
|
|
22
|
+
}, props.renderview(props));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=custom.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","BaseComponent","BaseComponentState","WmCustomProps","DEFAULT_CLASS","View","createSkeleton","WmCustomState","WmCustom","constructor","props","renderSkeleton","prop","theme","styles","skeleton","root","width","skeletonwidth","height","skeletonheight","renderWidget","renderview"],"sources":["custom.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCustomProps from './custom.props';\nimport { DEFAULT_CLASS, WmCustomStyles } from './custom.styles';\nimport { Text, View } from 'react-native';\nimport { createSkeleton } from '../skeleton/skeleton.component';\n\n\nexport class WmCustomState extends BaseComponentState<WmCustomProps> { }\n\nexport default class WmCustom extends BaseComponent<WmCustomProps, WmCustomState, WmCustomStyles> {\n\n constructor(props: WmCustomProps) {\n super(props, DEFAULT_CLASS, new WmCustomProps(), new WmCustomState());\n }\n\n public renderSkeleton(prop: WmCustomProps) {\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: this.props.skeletonwidth || this.styles.root.width,\n height: this.props.skeletonheight || this.styles.root.height\n });\n }\n\n renderWidget(props: WmCustomProps) {\n return (\n <View style={this.styles.root}>\n {props.renderview(props)}\n </View>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SAAeC,IAAI,QAAQ,cAAc;AACzC,SAASC,cAAc,QAAQ,gCAAgC;AAG/D,OAAO,MAAMC,aAAa,SAASL,kBAAkB,CAAgB;AAErE,eAAe,MAAMM,QAAQ,SAASP,aAAa,CAA+C;EAEhGQ,WAAW,CAACC,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,aAAa,EAAE,EAAE,IAAII,aAAa,EAAE,CAAC;EACvE;EAEOI,cAAc,CAACC,IAAmB,EAAE;IACzC,OAAON,cAAc,CAAC,IAAI,CAACO,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC,QAAQ,EAAE;MACtD,GAAG,IAAI,CAACD,MAAM,CAACE,IAAI;MACnBC,KAAK,EAAE,IAAI,CAACP,KAAK,CAACQ,aAAa,IAAI,IAAI,CAACJ,MAAM,CAACE,IAAI,CAACC,KAAK;MACzDE,MAAM,EAAE,IAAI,CAACT,KAAK,CAACU,cAAc,IAAI,IAAI,CAACN,MAAM,CAACE,IAAI,CAACG;IACxD,CAAC,CAAC;EACJ;EAEAE,YAAY,CAACX,KAAoB,EAAE;IACjC,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACI,MAAM,CAACE;IAAK,GAC3BN,KAAK,CAACY,UAAU,CAACZ,KAAK,CAAC,CACnB;EAEX;AACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
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
|
+
import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
5
|
+
export default class WmCustomProps extends BaseProps {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
_defineProperty(this, "renderview", () => {
|
|
9
|
+
return null;
|
|
10
|
+
});
|
|
11
|
+
_defineProperty(this, "children", null);
|
|
12
|
+
_defineProperty(this, "skeletonheight", null);
|
|
13
|
+
_defineProperty(this, "skeletonwidth", null);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=custom.props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BaseProps","WmCustomProps"],"sources":["custom.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmCustomProps extends BaseProps {\n renderview:Function = () => {return null};\n children? = null as any;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,aAAa,SAASD,SAAS,CAAC;EAAA;IAAA;IAAA,oCAC3B,MAAM;MAAC,OAAO,IAAI;IAAA,CAAC;IAAA,kCAC7B,IAAI;IAAA,wCACU,IAAI;IAAA,uCACL,IAAI;EAAA;AACjC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';
|
|
2
|
+
import { defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
3
|
+
export const DEFAULT_CLASS = 'app-custom';
|
|
4
|
+
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
5
|
+
const defaultStyles = defineStyles({
|
|
6
|
+
root: {},
|
|
7
|
+
text: {},
|
|
8
|
+
skeleton: {
|
|
9
|
+
root: {
|
|
10
|
+
width: 96,
|
|
11
|
+
height: 48,
|
|
12
|
+
borderRadius: 4
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=custom.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","skeleton","width","height","borderRadius"],"sources":["custom.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\n\nexport type WmCustomStyles = BaseStyles & {\n skeleton: WmSkeletonStyles;\n}\n\nexport const DEFAULT_CLASS = 'app-custom';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = defineStyles<WmCustomStyles>({\n root: {},\n text: {},\n skeleton: {\n root: {\n width: 96,\n height: 48,\n borderRadius: 4\n }\n } as WmSkeletonStyles\n });\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAQxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAa,GAAGL,YAAY,CAAiB;IAC/CM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACNF,IAAI,EAAE;QACJG,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVC,YAAY,EAAE;MAChB;IACF;EACN,CAAC,CAAC;EACFP,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
|
|
@@ -184,7 +184,7 @@ export default class WmIcon extends BaseComponent {
|
|
|
184
184
|
}, /*#__PURE__*/React.createElement(Animatedview, {
|
|
185
185
|
entryanimation: props.animation,
|
|
186
186
|
style: this.styles.root
|
|
187
|
-
}, props.iconposition === 'left' && icon || null, props.caption && /*#__PURE__*/React.createElement(Text, {
|
|
187
|
+
}, this._background, props.iconposition === 'left' && icon || null, props.caption && /*#__PURE__*/React.createElement(Text, {
|
|
188
188
|
style: this.styles.text
|
|
189
189
|
}, props.caption) || null, props.iconposition === 'right' && icon || null));
|
|
190
190
|
}
|