@wavemaker/app-rn-runtime 11.12.0-next.28188 → 11.12.1-next.28204

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.
Files changed (71) hide show
  1. package/components/basic/audio/audio.component.js +47 -52
  2. package/components/basic/audio/audio.component.js.map +1 -1
  3. package/components/basic/video/video.component.js +62 -65
  4. package/components/basic/video/video.component.js.map +1 -1
  5. package/components/container/container.component.js +2 -5
  6. package/components/container/container.component.js.map +1 -1
  7. package/components/device/barcodescanner/barcodescanner.component.js +18 -26
  8. package/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  9. package/components/device/camera/camera.component.js +19 -28
  10. package/components/device/camera/camera.component.js.map +1 -1
  11. package/components/input/fileupload/fileupload.component.js +13 -17
  12. package/components/input/fileupload/fileupload.component.js.map +1 -1
  13. package/components/navigation/appnavbar/appnavbar.component.js +2 -5
  14. package/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  15. package/components/page/left-panel/left-panel.component.js +2 -3
  16. package/components/page/left-panel/left-panel.component.js.map +1 -1
  17. package/components/page/page-content/page-content.component.js +18 -23
  18. package/components/page/page-content/page-content.component.js.map +1 -1
  19. package/components/page/tabbar/tabbar.component.js +2 -5
  20. package/components/page/tabbar/tabbar.component.js.map +1 -1
  21. package/core/device/calendar-service.js +1 -7
  22. package/core/device/calendar-service.js.map +1 -1
  23. package/core/device/camera-service.js +0 -6
  24. package/core/device/camera-service.js.map +1 -1
  25. package/core/device/contacts-service.js +1 -7
  26. package/core/device/contacts-service.js.map +1 -1
  27. package/core/device/location-service.js +1 -7
  28. package/core/device/location-service.js.map +1 -1
  29. package/core/device/scan-service.js +0 -6
  30. package/core/device/scan-service.js.map +1 -1
  31. package/core/utils.js +6 -0
  32. package/core/utils.js.map +1 -1
  33. package/npm-shrinkwrap.json +94 -94
  34. package/package-lock.json +94 -94
  35. package/package.json +2 -2
  36. package/runtime/services/device/calendar-service.js +5 -9
  37. package/runtime/services/device/calendar-service.js.map +1 -1
  38. package/runtime/services/device/camera-service.js +22 -39
  39. package/runtime/services/device/camera-service.js.map +1 -1
  40. package/runtime/services/device/contacts-service.js +5 -6
  41. package/runtime/services/device/contacts-service.js.map +1 -1
  42. package/runtime/services/device/location-service.js +4 -4
  43. package/runtime/services/device/location-service.js.map +1 -1
  44. package/runtime/services/device/permissions.js +39 -34
  45. package/runtime/services/device/permissions.js.map +1 -1
  46. package/runtime/services/device/scan-service.js +3 -4
  47. package/runtime/services/device/scan-service.js.map +1 -1
  48. package/variables/device/calendar/create-event.operation.js +1 -12
  49. package/variables/device/calendar/create-event.operation.js.map +1 -1
  50. package/variables/device/calendar/delete-event.operation.js +1 -12
  51. package/variables/device/calendar/delete-event.operation.js.map +1 -1
  52. package/variables/device/calendar/get-events.operation.js +1 -12
  53. package/variables/device/calendar/get-events.operation.js.map +1 -1
  54. package/variables/device/camera/capture-image.operation.js +1 -8
  55. package/variables/device/camera/capture-image.operation.js.map +1 -1
  56. package/variables/device/camera/capture-video.operation.js +1 -7
  57. package/variables/device/camera/capture-video.operation.js.map +1 -1
  58. package/variables/device/contacts/get-contacts.operation.js +1 -12
  59. package/variables/device/contacts/get-contacts.operation.js.map +1 -1
  60. package/variables/device/device/current-geo-position.operation.js +1 -12
  61. package/variables/device/device/current-geo-position.operation.js.map +1 -1
  62. package/variables/device/file/upload-file.operation.js +3 -17
  63. package/variables/device/file/upload-file.operation.js.map +1 -1
  64. package/variables/device/scan/scan.operation.js +1 -12
  65. package/variables/device/scan/scan.operation.js.map +1 -1
  66. package/core/device/av-service.js +0 -8
  67. package/core/device/av-service.js.map +0 -1
  68. package/core/device/fileupload-service.js +0 -8
  69. package/core/device/fileupload-service.js.map +0 -1
  70. package/runtime/services/device/permission-service.js +0 -5
  71. package/runtime/services/device/permission-service.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["React","createRef","KeyboardAvoidingView","Platform","View","isWebPreviewMode","HideMode","BaseComponent","BaseComponentState","WmPageContentProps","DEFAULT_CLASS","WmLottie","SafeAreaInsetsContext","Animated","StickyWrapperContext","isNumber","WmPageContentState","constructor","args","_defineProperty","WmPageContent","props","event","_event$nativeEvent","onScrollEndDrag","scrollDirection","context","scrollPosition","nativeEvent","contentOffset","y","value","invokeEventCallback","proxy","scrollRef","requestAnimationFrame","notify","hideMode","DONOT_ADD_TO_DOM","state","navHeightForRender","subscribe","scrollTo","_this$scrollRef","current","scrollToEnd","componentDidMount","navHeight","_unsubscribeNavHeight","navHeightValue","setState","componentWillUnmount","position","_this$scrollRef2","x","animated","renderSkeleton","skeletonanimationresource","createElement","style","width","styles","root","content","skeleton","source","loop","autoplay","speed","skeletonanimationspeed","renderWidget","showScrollbar","scrollbarColor","bottomTabHeight","onScroll","borderRadiusStyles","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","scrollable","height","backgroundColor","_showSkeleton","_background","Consumer","insets","top","bottom","left","right","_this$styles","_this$styles2","_this$styles3","_this$styles4","keyboardOffset","consumenotch","verticalOffset","OS","keyboardverticaloffset","paddingTop","padding","paddingBottom","paddingTopVal","paddingBottomVal","navHeightVal","onscroll","behavior","undefined","keyboardVerticalOffset","flex","ScrollView","keyboardShouldPersistTaps","keyboardpersisttaps","testID","getTestId","ref","contentContainerStyle","onLayout","handleScrollViewLayout","showsVerticalScrollIndicator","alwaysBounceVertical","alwaysBounceHorizontal","bounces","overScrollMode","removeClippedSubviews","handleOnScrollEndDrag","children"],"sources":["page-content.component.tsx"],"sourcesContent":["import React, { createRef, RefObject, useEffect, useState } from 'react';\nimport { KeyboardAvoidingView, Platform, View } from 'react-native';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPageContentProps from './page-content.props';\nimport { DEFAULT_CLASS, WmPageContentStyles } from './page-content.styles';\nimport WmLottie from '@wavemaker/app-rn-runtime/components/basic/lottie/lottie.component';\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context';\nimport Animated from 'react-native-reanimated';\nimport { StickyWrapperContextType, StickyWrapperContext } from '@wavemaker/app-rn-runtime/core/sticky-wrapper';\nimport { isNumber } from 'lodash-es';\n\nexport class WmPageContentState extends BaseComponentState<WmPageContentProps> {\n navHeightForRender = 0;\n}\nexport default class WmPageContent extends BaseComponent<WmPageContentProps, WmPageContentState, WmPageContentStyles> {\n private scrollRef: RefObject<any>;\n static contextType = StickyWrapperContext;\n private _unsubscribeNavHeight : any;\n\n constructor(props: WmPageContentProps) {\n super(props, DEFAULT_CLASS, new WmPageContentProps());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n this.scrollRef = createRef();\n \n this.state = {\n ...this.state,\n navHeightForRender: 0,\n };\n\n this.subscribe('scrollToPosition', (args: any) => {\n this.scrollTo(args);\n });\n\n this.subscribe('scrollToEnd', () => {\n this.scrollRef?.current?.scrollToEnd();\n });\n }\n\n componentDidMount() {\n super.componentDidMount();\n const { navHeight } = this.context as StickyWrapperContextType;\n this._unsubscribeNavHeight = this.subscribe('updateNavHeight', (navHeightValue: number) => {\n if (this.state.navHeightForRender !== navHeightValue) {\n this.setState({ navHeightForRender: navHeightValue });\n }\n return null;\n });\n if (navHeight) {\n this.setState({ navHeightForRender: navHeight.value });\n }\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n if (this._unsubscribeNavHeight) this._unsubscribeNavHeight();\n }\n\n public scrollTo(position: {x: number, y: number}){\n this.scrollRef?.current?.scrollTo({\n x: position.x,\n y: position.y,\n animated: true\n });\n }\n\n private handleOnScrollEndDrag = (event: any) => {\n const { onScrollEndDrag, scrollDirection } = this.context as StickyWrapperContextType;\n const scrollPosition = event?.nativeEvent?.contentOffset?.y;\n if (scrollPosition >= 0) {\n if(scrollDirection.value > 0) {\n this.invokeEventCallback('onSwipeup', [null, this.proxy]);\n }else {\n this.invokeEventCallback('onSwipedown', [null, this.proxy]);\n }\n onScrollEndDrag(this.scrollRef);\n }\n }\n\n public renderSkeleton(props: WmPageContentProps): React.ReactNode {\n if(this.props.skeletonanimationresource) {\n return <View style={[{width: '100%'}, this.styles.root]}>\n <WmLottie styles={{ content: {...this.styles.root, ...this.styles.skeleton.root} }} source={this.props.skeletonanimationresource} loop={true} autoplay={true} speed={this.props.skeletonanimationspeed}/>\n </View>\n } \n return null;\n }\n\n private handleScrollViewLayout = () => {\n requestAnimationFrame(() => {\n this.notify('updateStickyHeaders', []);\n });\n }\n\n renderWidget(props: WmPageContentProps) {\n const showScrollbar = (this.styles.root as any).scrollbarColor != 'transparent';\n const { bottomTabHeight, onScroll } = this.context as StickyWrapperContextType;\n const borderRadiusStyles = {\n borderRadius: this.styles.root.borderRadius,\n borderTopLeftRadius: this.styles.root.borderTopLeftRadius,\n borderTopRightRadius: this.styles.root.borderTopRightRadius,\n borderBottomLeftRadius: this.styles.root.borderBottomLeftRadius,\n borderBottomRightRadius: this.styles.root.borderBottomRightRadius,\n };\n return (props.scrollable || isWebPreviewMode()) ? (\n <View style={{height: '100%', width: '100%',\n ...borderRadiusStyles,\n backgroundColor: this._showSkeleton && this.styles.skeleton.root.backgroundColor ? this.styles.skeleton.root.backgroundColor : this.styles.root.backgroundColor\n \n }}>\n {this._background}\n <SafeAreaInsetsContext.Consumer>\n {(insets = { top: 0, bottom: 0, left: 0, right: 0 }) => {\n const keyboardOffset = props.consumenotch ? (insets?.bottom || 0) : 0;\n const verticalOffset = Platform.OS === 'ios' ? keyboardOffset + props.keyboardverticaloffset : keyboardOffset;\n const paddingTop = this.styles?.root?.paddingTop || this.styles?.root?.padding;\n const paddingBottom = this.styles?.root?.paddingBottom || this.styles?.root?.padding;\n const paddingTopVal = isNumber(paddingTop) ? paddingTop : 0;\n const paddingBottomVal = isNumber(paddingBottom) ? paddingBottom : 0;\n const navHeightVal = (this.props.onscroll == 'topnav' || this.props.onscroll == 'topnav-bottomnav') ? this.state.navHeightForRender : 0;\n return (\n <KeyboardAvoidingView\n behavior={Platform.OS === 'ios' ? 'padding' : undefined}\n keyboardVerticalOffset={verticalOffset}\n style={{ flex: 1 }}>\n <Animated.ScrollView\n keyboardShouldPersistTaps={props.keyboardpersisttaps}\n testID={this.getTestId(\"page_content_scrollview\")}\n ref={this.scrollRef}\n contentContainerStyle={[\n this.styles.root, {backgroundColor: 'transparent', \n paddingTop: navHeightVal + paddingTopVal, \n paddingBottom: bottomTabHeight.value + paddingBottomVal\n }\n ]}\n onLayout={this.handleScrollViewLayout}\n showsVerticalScrollIndicator={showScrollbar}\n onScroll={onScroll}\n alwaysBounceVertical={false}\n alwaysBounceHorizontal={false}\n bounces={false}\n overScrollMode=\"never\"\n removeClippedSubviews={Platform.OS == 'android'}\n onScrollEndDrag={this.handleOnScrollEndDrag}\n >\n {props.children}\n </Animated.ScrollView>\n </KeyboardAvoidingView>\n )\n }}\n </SafeAreaInsetsContext.Consumer>\n </View> \n ) : (\n <View style={[this.styles.root,\n {backgroundColor: this._showSkeleton ?\n this.styles.skeleton.root.backgroundColor : \n this.styles.root.backgroundColor}]}>\n <SafeAreaInsetsContext.Consumer>\n {(insets = { top: 0, bottom: 0, left: 0, right: 0 }) => {\n const keyboardOffset = props.consumenotch ? (insets?.bottom || 0) : 0;\n const verticalOffset = Platform.OS === 'ios' ? keyboardOffset + props.keyboardverticaloffset : keyboardOffset;\n return (\n <KeyboardAvoidingView\n behavior={Platform.OS === 'ios' ? 'padding' : undefined}\n keyboardVerticalOffset={verticalOffset}\n style={{ flex: 1 }}>\n {this._background}\n {props.children}\n </KeyboardAvoidingView>\n )}}\n </SafeAreaInsetsContext.Consumer>\n </View>\n );\n }\n}"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAwC,OAAO;AACxE,SAASC,oBAAoB,EAAEC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AACnE,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,SAASC,QAAQ,QAAQ,6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E,QAAQ,QAC5B,CAACC,MAAM,GAAG;MAAEC,GAAG,EAAE,CAAC;MAAEC,MAAM,EAAE,CAAC;MAAEC,IAAI,EAAE,CAAC;MAAEC,KAAK,EAAE;IAAE,CAAC,KAAK;MACtD,MAAMK,cAAc,GAAG3E,KAAK,CAAC4E,YAAY,GAAI,CAAAV,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEE,MAAM,KAAI,CAAC,GAAI,CAAC;MACrE,MAAMS,cAAc,GAAG/F,QAAQ,CAACgG,EAAE,KAAK,KAAK,GAAGH,cAAc,GAAG3E,KAAK,CAAC+E,sBAAsB,GAAGJ,cAAc;MAC7G,oBACEhG,KAAA,CAAA0D,aAAA,CAACxD,oBAAoB;QACnB0G,QAAQ,EAAEzG,QAAQ,CAACgG,EAAE,KAAK,KAAK,GAAG,SAAS,GAAGU,SAAU;QACxDC,sBAAsB,EAAEZ,cAAe;QACvCvC,KAAK,EAAE;UAAEoD,IAAI,EAAE;QAAE;MAAE,GAClB,IAAI,CAAC1B,WAAW,EAChBhE,KAAK,CAAC2G,QACa,CAAC;IACxB,CAC2B,CAC5B,CACP;EACH;AACF;AAAC7G,eAAA,CA/JoBC,aAAa,iBAEXN,oBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["React","createRef","KeyboardAvoidingView","Platform","View","isWebPreviewMode","HideMode","BaseComponent","BaseComponentState","WmPageContentProps","DEFAULT_CLASS","WmLottie","SafeAreaInsetsContext","Animated","StickyWrapperContext","isNumber","WmPageContentState","constructor","args","_defineProperty","WmPageContent","props","event","context","_event$nativeEvent","onScrollEndDrag","scrollDirection","scrollPosition","nativeEvent","contentOffset","y","value","invokeEventCallback","proxy","scrollRef","requestAnimationFrame","notify","hideMode","DONOT_ADD_TO_DOM","state","navHeightForRender","subscribe","scrollTo","_this$scrollRef","current","scrollToEnd","componentDidMount","_unsubscribeNavHeight","navHeightValue","setState","navHeight","componentWillUnmount","position","_this$scrollRef2","x","animated","renderSkeleton","skeletonanimationresource","createElement","style","width","styles","root","content","skeleton","source","loop","autoplay","speed","skeletonanimationspeed","renderWidget","showScrollbar","scrollbarColor","borderRadiusStyles","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","scrollable","height","backgroundColor","_showSkeleton","_background","Consumer","insets","top","bottom","left","right","_this$styles","_this$styles2","_this$styles3","_this$styles4","keyboardOffset","consumenotch","verticalOffset","OS","keyboardverticaloffset","paddingTop","padding","paddingBottom","paddingTopVal","paddingBottomVal","navHeightVal","onscroll","behavior","undefined","keyboardVerticalOffset","flex","ScrollView","keyboardShouldPersistTaps","keyboardpersisttaps","testID","getTestId","ref","contentContainerStyle","bottomTabHeight","onLayout","handleScrollViewLayout","showsVerticalScrollIndicator","onScroll","alwaysBounceVertical","alwaysBounceHorizontal","bounces","overScrollMode","removeClippedSubviews","handleOnScrollEndDrag","children"],"sources":["page-content.component.tsx"],"sourcesContent":["import React, { createRef, RefObject, useEffect, useState } from 'react';\nimport { KeyboardAvoidingView, Platform, View } from 'react-native';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPageContentProps from './page-content.props';\nimport { DEFAULT_CLASS, WmPageContentStyles } from './page-content.styles';\nimport WmLottie from '@wavemaker/app-rn-runtime/components/basic/lottie/lottie.component';\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context';\nimport Animated from 'react-native-reanimated';\nimport { StickyWrapperContextType, StickyWrapperContext } from '@wavemaker/app-rn-runtime/core/sticky-wrapper';\nimport { isNumber } from 'lodash-es';\n\nexport class WmPageContentState extends BaseComponentState<WmPageContentProps> {\n navHeightForRender = 0;\n}\nexport default class WmPageContent extends BaseComponent<WmPageContentProps, WmPageContentState, WmPageContentStyles> {\n private scrollRef: RefObject<any>;\n static contextType = StickyWrapperContext;\n private _unsubscribeNavHeight : any;\n\n constructor(props: WmPageContentProps) {\n super(props, DEFAULT_CLASS, new WmPageContentProps());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n this.scrollRef = createRef();\n \n this.state = {\n ...this.state,\n navHeightForRender: 0,\n };\n\n this.subscribe('scrollToPosition', (args: any) => {\n this.scrollTo(args);\n });\n\n this.subscribe('scrollToEnd', () => {\n this.scrollRef?.current?.scrollToEnd();\n });\n }\n\n componentDidMount() {\n super.componentDidMount();\n this._unsubscribeNavHeight = this.subscribe('updateNavHeight', (navHeightValue: number) => {\n if (this.state.navHeightForRender !== navHeightValue) {\n this.setState({ navHeightForRender: navHeightValue });\n }\n return null;\n });\n if (this.context && (this.context as StickyWrapperContextType).navHeight) {\n this.setState({ navHeightForRender: (this.context as StickyWrapperContextType).navHeight.value });\n }\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n if (this._unsubscribeNavHeight) this._unsubscribeNavHeight();\n }\n\n public scrollTo(position: {x: number, y: number}){\n this.scrollRef?.current?.scrollTo({\n x: position.x,\n y: position.y,\n animated: true\n });\n }\n\n private handleOnScrollEndDrag = (event: any) => {\n if(this.context) {\n const { onScrollEndDrag, scrollDirection } = this.context as StickyWrapperContextType;\n const scrollPosition = event?.nativeEvent?.contentOffset?.y;\n if (scrollPosition >= 0) {\n if(scrollDirection.value > 0) {\n this.invokeEventCallback('onSwipeup', [null, this.proxy]);\n }else {\n this.invokeEventCallback('onSwipedown', [null, this.proxy]);\n }\n onScrollEndDrag(this.scrollRef);\n }\n }\n }\n\n public renderSkeleton(props: WmPageContentProps): React.ReactNode {\n if(this.props.skeletonanimationresource) {\n return <View style={[{width: '100%'}, this.styles.root]}>\n <WmLottie styles={{ content: {...this.styles.root, ...this.styles.skeleton.root} }} source={this.props.skeletonanimationresource} loop={true} autoplay={true} speed={this.props.skeletonanimationspeed}/>\n </View>\n } \n return null;\n }\n\n private handleScrollViewLayout = () => {\n requestAnimationFrame(() => {\n this.notify('updateStickyHeaders', []);\n });\n }\n\n renderWidget(props: WmPageContentProps) {\n const showScrollbar = (this.styles.root as any).scrollbarColor != 'transparent';\n const borderRadiusStyles = {\n borderRadius: this.styles.root.borderRadius,\n borderTopLeftRadius: this.styles.root.borderTopLeftRadius,\n borderTopRightRadius: this.styles.root.borderTopRightRadius,\n borderBottomLeftRadius: this.styles.root.borderBottomLeftRadius,\n borderBottomRightRadius: this.styles.root.borderBottomRightRadius,\n };\n return (props.scrollable || isWebPreviewMode()) ? (\n <View style={{height: '100%', width: '100%',\n ...borderRadiusStyles,\n backgroundColor: this._showSkeleton && this.styles.skeleton.root.backgroundColor ? this.styles.skeleton.root.backgroundColor : this.styles.root.backgroundColor\n \n }}>\n {this._background}\n <SafeAreaInsetsContext.Consumer>\n {(insets = { top: 0, bottom: 0, left: 0, right: 0 }) => {\n const keyboardOffset = props.consumenotch ? (insets?.bottom || 0) : 0;\n const verticalOffset = Platform.OS === 'ios' ? keyboardOffset + props.keyboardverticaloffset : keyboardOffset;\n const paddingTop = this.styles?.root?.paddingTop || this.styles?.root?.padding;\n const paddingBottom = this.styles?.root?.paddingBottom || this.styles?.root?.padding;\n const paddingTopVal = isNumber(paddingTop) ? paddingTop : 0;\n const paddingBottomVal = isNumber(paddingBottom) ? paddingBottom : 0;\n const navHeightVal = (this.props.onscroll == 'topnav' || this.props.onscroll == 'topnav-bottomnav') ? this.state.navHeightForRender : 0;\n return (\n <KeyboardAvoidingView\n behavior={Platform.OS === 'ios' ? 'padding' : undefined}\n keyboardVerticalOffset={verticalOffset}\n style={{ flex: 1 }}>\n <Animated.ScrollView\n keyboardShouldPersistTaps={props.keyboardpersisttaps}\n testID={this.getTestId(\"page_content_scrollview\")}\n ref={this.scrollRef}\n contentContainerStyle={[\n this.styles.root, {backgroundColor: 'transparent', \n paddingTop: navHeightVal + paddingTopVal, \n paddingBottom: this.context && (this.context as StickyWrapperContextType).bottomTabHeight ? \n (this.context as StickyWrapperContextType).bottomTabHeight.value + paddingBottomVal\n : paddingBottomVal\n }\n ]}\n onLayout={this.handleScrollViewLayout}\n showsVerticalScrollIndicator={showScrollbar}\n onScroll={this.context && (this.context as StickyWrapperContextType).onScroll ? \n (this.context as StickyWrapperContextType).onScroll \n : ()=>{}\n }\n alwaysBounceVertical={false}\n alwaysBounceHorizontal={false}\n bounces={false}\n overScrollMode=\"never\"\n removeClippedSubviews={Platform.OS == 'android'}\n onScrollEndDrag={this.handleOnScrollEndDrag}\n >\n {props.children}\n </Animated.ScrollView>\n </KeyboardAvoidingView>\n )\n }}\n </SafeAreaInsetsContext.Consumer>\n </View> \n ) : (\n <View style={[this.styles.root,\n {backgroundColor: this._showSkeleton ?\n this.styles.skeleton.root.backgroundColor : \n this.styles.root.backgroundColor}]}>\n <SafeAreaInsetsContext.Consumer>\n {(insets = { top: 0, bottom: 0, left: 0, right: 0 }) => {\n const keyboardOffset = props.consumenotch ? (insets?.bottom || 0) : 0;\n const verticalOffset = Platform.OS === 'ios' ? keyboardOffset + props.keyboardverticaloffset : keyboardOffset;\n return (\n <KeyboardAvoidingView\n behavior={Platform.OS === 'ios' ? 'padding' : undefined}\n keyboardVerticalOffset={verticalOffset}\n style={{ flex: 1 }}>\n {this._background}\n {props.children}\n </KeyboardAvoidingView>\n )}}\n </SafeAreaInsetsContext.Consumer>\n </View>\n );\n }\n}"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAwC,OAAO;AACxE,SAASC,oBAAoB,EAAEC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AACnE,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,aAAa,QAA6B,uBAAuB;AAC1E,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,SAASC,qBAAqB,QAAQ,gCAAgC;AACtE,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAAmCC,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G;MAAEC,GAAG,EAAE,CAAC;MAAEC,MAAM,EAAE,CAAC;MAAEC,IAAI,EAAE,CAAC;MAAEC,KAAK,EAAE;IAAE,CAAC,KAAK;MACtD,MAAMK,cAAc,GAAGzE,KAAK,CAAC0E,YAAY,GAAI,CAAAV,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEE,MAAM,KAAI,CAAC,GAAI,CAAC;MACrE,MAAMS,cAAc,GAAG7F,QAAQ,CAAC8F,EAAE,KAAK,KAAK,GAAGH,cAAc,GAAGzE,KAAK,CAAC6E,sBAAsB,GAAGJ,cAAc;MAC7G,oBACE9F,KAAA,CAAA0D,aAAA,CAACxD,oBAAoB;QACnBwG,QAAQ,EAAEvG,QAAQ,CAAC8F,EAAE,KAAK,KAAK,GAAG,SAAS,GAAGU,SAAU;QACxDC,sBAAsB,EAAEZ,cAAe;QACvCrC,KAAK,EAAE;UAAEkD,IAAI,EAAE;QAAE;MAAE,GAClB,IAAI,CAAC1B,WAAW,EAChB9D,KAAK,CAAC2G,QACa,CAAC;IACxB,CAC2B,CAC5B,CACP;EACH;AACF;AAAC7G,eAAA,CApKoBC,aAAa,iBAEXN,oBAAoB","ignoreList":[]}
@@ -163,9 +163,6 @@ export default class WmTabbar extends BaseNavComponent {
163
163
  }
164
164
  max = max - 1;
165
165
  }
166
- const {
167
- bottomTabHeight
168
- } = this.context;
169
166
  return /*#__PURE__*/React.createElement(SafeAreaInsetsContext.Consumer, null, (insets = {
170
167
  top: 0,
171
168
  bottom: 0,
@@ -187,9 +184,9 @@ export default class WmTabbar extends BaseNavComponent {
187
184
  this.baseView = ref;
188
185
  },
189
186
  onLayout: event => {
190
- if (bottomTabHeight && this.props.hideonscroll) {
187
+ if (this.context && this.context.bottomTabHeight) {
191
188
  bottomTabHeightValue = event.nativeEvent.layout.height || 0;
192
- bottomTabHeight.value = bottomTabHeightValue;
189
+ this.context.bottomTabHeight.value = bottomTabHeightValue;
193
190
  }
194
191
  this.handleLayout(event);
195
192
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","TouchableOpacity","Dimensions","Keyboard","Animated","Easing","ThemeProvider","ModalConsumer","WmIcon","NavigationServiceConsumer","BaseNavComponent","BaseNavState","WmTabbarProps","DEFAULT_CLASS","Svg","Path","getPathDown","ThemeVariables","FixedView","SafeAreaInsetsContext","injector","StickyWrapperContext","scale","n","WmTabbarState","constructor","args","_defineProperty","WmTabbar","props","Value","get","width","cleanup","push","addListener","keyBoardShown","forceUpdate","remove","onPropertyChange","name","$new","$old","destroyScrollListner","subscribeToPageScroll","renderTabItem","item","testId","onSelect","floating","isActive","getDisplayLabel","getDisplayExpression","label","increasedGap","Number","indexBeforeMid","state","dataItems","length","classname","indexOf","styles","tabItem","paddingRight","createElement","_extends","getTestPropsForAction","style","centerHubItem","key","onPress","activeTabItem","theme","mergeStyle","tabIcon","centerHubIcon","activeTabIcon","iconclass","icon","tabLabel","centerHubLabel","activeTabLabel","numberOfLines","onItemSelect","navigationService","link","openUrl","invokeEventCallback","proxy","prepareModalOptions","content","o","modalOptions","modalStyle","bottom","tabbarHeight","contentStyle","modalContent","isVisible","animateWithTiming","value","duratiion","timing","translateY","toValue","easing","linear","duration","useNativeDriver","start","tabbarHeightWithInsets","subscribe","event","_this$getLayout","_this$insets","contentOffset","layoutMeasurement","contentSize","nativeEvent","scrollPosition","y","getLayout","height","visibleContentHeight","endReached","bottomInsets","insets","e","Math","abs","scrollDelta","scrollDirection","componentWillUnmount","renderContent","max","tabItems","tabItemsLength","bottomTabHeightValue","isClippedTabbar","middleIndex","floor","returnpathDown","maxWidth","root","moreItems","moreItemsCount","ceil","j","i","row","bottomTabHeight","context","Consumer","top","left","right","_this$appConfig","paddingBottomVal","paddingBottom","padding","isEdgeToEdgeApp","appConfig","edgeToEdgeConfig","stylesWithFs","backgroundColor","menu","ref","baseView","onLayout","hideonscroll","layout","handleLayout","zIndex","position","INSTANCE","transparent","fill","tabbarBackgroundColor","d","Fragment","modalService","showMore","showModal","moreMenu","map","a","moreMenuRow","index","hideModal","testID","filter","morebuttonlabel","morebuttoniconclass","updateState","renderWidget","isFixed","animateStyle","transform","animated","_background"],"sources":["tabbar.component.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Text, View, TouchableOpacity, Dimensions, Keyboard, Animated, Easing, LayoutChangeEvent, \n NativeSyntheticEvent, NativeScrollEvent\n} from 'react-native';\nimport { ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport NavigationService, { NavigationServiceConsumer } from '@wavemaker/app-rn-runtime/core/navigation.service';\nimport { BaseNavProps } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.props';\nimport { BaseNavComponent, BaseNavState, NavigationDataItem } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.component';\n\nimport WmTabbarProps from './tabbar.props';\nimport { DEFAULT_CLASS, WmTabbarStyles } from './tabbar.styles';\nimport Svg, { Path } from 'react-native-svg';\nimport { getPathDown } from './curve';\n// import { scale } from 'react-native-size-scaling';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nimport { FixedView } from '@wavemaker/app-rn-runtime/core/fixed-view.component';\nimport { EdgeInsets, SafeAreaInsetsContext } from 'react-native-safe-area-context';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { StickyWrapperContext, StickyWrapperContextType } from '@wavemaker/app-rn-runtime/core/sticky-wrapper';\n\ninterface TabDataItem extends NavigationDataItem {\n floating: boolean;\n indexBeforeMid: number;\n}\n\ninterface CustomScrollEvent {\n scrollDirection: number;\n scrollDelta: number;\n}\n\nconst scale = (n: number) => n;\n\nclass WmTabbarState<T extends BaseNavProps> extends BaseNavState<T> {\n showMore = false;\n modalOptions = {} as ModalOptions;\n dataItems: TabDataItem[] = [];\n}\n\nexport default class WmTabbar extends BaseNavComponent<WmTabbarProps, WmTabbarState<WmTabbarProps>, WmTabbarStyles> {\n\n private tabbarHeight = 0;\n private keyBoardShown = false;\n private destroyScrollListner: Function = null as any;\n private translateY = new Animated.Value(0);\n private insets: EdgeInsets | null = null;\n private appConfig = injector.get<AppConfig>('APP_CONFIG');\n private tabbarHeightWithInsets: number = 0;\n static contextType = StickyWrapperContext;\n\n constructor(props: WmTabbarProps) {\n super(props, DEFAULT_CLASS, new WmTabbarProps(), new WmTabbarState());\n this.cleanup.push(Keyboard.addListener('keyboardWillShow', () => {\n this.keyBoardShown = true;\n this.forceUpdate();\n }).remove);\n this.cleanup.push(Keyboard.addListener('keyboardWillHide', () => {\n this.keyBoardShown = false;\n this.forceUpdate();\n }).remove);\n }\n\n private maxWidth = Dimensions.get(\"window\").width; \n private returnpathDown: any;\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name){\n case 'hideonscroll':\n this.destroyScrollListner && this.destroyScrollListner();\n if($new) {\n this.subscribeToPageScroll();\n }\n break;\n }\n }\n\n renderTabItem(item: TabDataItem, testId: string, props: WmTabbarProps, onSelect: Function, floating = false) {\n\n const isActive = props.isActive && props.isActive(item);\n const getDisplayLabel = this.props.getDisplayExpression || ((label: string) => label);\n let increasedGap = Number(testId) === item?.indexBeforeMid && (this.state.dataItems.length % 2!=0) && ((props.classname || '').indexOf('clipped-tabbar') >= 0)\n ? [this.styles.tabItem, { paddingRight: 70 }]\n : [this.styles.tabItem];\n \n return (\n <TouchableOpacity \n {...this.getTestPropsForAction('item' + testId)}\n style={[increasedGap, floating? this.styles.centerHubItem: {}]}\n key={`${item.label}_${testId}`}\n onPress={() => onSelect && onSelect()}>\n <View key={item.key}>\n <View style={[isActive && !floating ? this.styles.activeTabItem : {}]}>\n <WmIcon\n styles={this.theme.mergeStyle({}, this.styles.tabIcon, floating? this.styles.centerHubIcon: {}, isActive ? this.styles.activeTabIcon : {})}\n iconclass={item.icon}\n ></WmIcon>\n </View>\n </View>\n <Text style={[this.styles.tabLabel, floating? this.styles.centerHubLabel: {}, isActive ? this.styles.activeTabLabel : {}]} numberOfLines={1}>\n {getDisplayLabel(item.label)}\n </Text>\n </TouchableOpacity>\n );\n }\n \n onItemSelect(item: NavigationDataItem, navigationService: NavigationService) {\n item.link && navigationService.openUrl(item.link);\n this.invokeEventCallback('onSelect', [null, this.proxy, item]);\n }\n\n prepareModalOptions(content: ReactNode) {\n const o = this.state.modalOptions;\n o.content = content;\n o.modalStyle = {\n bottom: this.tabbarHeight\n };\n o.contentStyle = this.styles.modalContent; \n return o;\n }\n\n isVisible(): boolean {\n return super.isVisible() && !this.keyBoardShown;\n }\n\n animateWithTiming(value: number, duratiion: number): void {\n Animated.timing(this.translateY, {\n toValue: value, \n easing: Easing.linear,\n duration: duratiion, \n useNativeDriver: false\n }).start()\n }\n\n subscribeToPageScroll(){\n this.tabbarHeightWithInsets = 0;\n this.destroyScrollListner = this.subscribe('scroll', (event: NativeSyntheticEvent<NativeScrollEvent>)=>{\n const { contentOffset, layoutMeasurement, contentSize } = event.nativeEvent ;\n const scrollPosition = contentOffset.y ;\n this.tabbarHeightWithInsets = this.tabbarHeightWithInsets ? this.tabbarHeightWithInsets : this.getLayout()?.height ;\n const visibleContentHeight = layoutMeasurement.height ;\n const endReached = (scrollPosition + visibleContentHeight + this.tabbarHeightWithInsets) + 8 >= contentSize.height ;\n const bottomInsets = this.insets?.bottom || 0\n const e = event.nativeEvent as any as CustomScrollEvent;\n if(Math.abs(e?.scrollDelta) >= 2){\n if(e?.scrollDirection > 0){\n this.animateWithTiming(0, 100)\n }else if(e?.scrollDirection < 0) {\n this.animateWithTiming(this.tabbarHeightWithInsets + bottomInsets, 100)\n }\n }\n if(endReached){\n this.animateWithTiming(0, 0)\n }\n })\n }\n\n componentWillUnmount(): void {\n this.destroyScrollListner && this.destroyScrollListner();\n }\n\n renderContent(props: WmTabbarProps){\n let max = 5;\n const tabItems = this.state.dataItems;\n const tabItemsLength = tabItems.length;\n let bottomTabHeightValue;\n const isClippedTabbar = ((props.classname || '').indexOf('clipped-tabbar') >= 0) && (tabItemsLength % 2 !== 0);\n if (isClippedTabbar && tabItemsLength % 2 !== 0) {\n const middleIndex = Math.floor(tabItemsLength / 2);\n tabItems[middleIndex]['floating'] = true;\n tabItems[middleIndex - 1]['indexBeforeMid'] = middleIndex-1;\n }\n this.returnpathDown = getPathDown(this.maxWidth, 65 ,60,this.styles.root.height as number);\n const moreItems = [] as any[][];\n if (tabItems.length > max) {\n const moreItemsCount = Math.ceil((tabItems.length + 1 - max)/ max) * max;\n let j = 0;\n for (let i = max-1; i < moreItemsCount;) {\n const row = [];\n for (let j = 0; j < max; j++) {\n row[j] = tabItems[i++] || {key: 'tabItem' + i} as TabDataItem;\n }\n moreItems.push(row);\n }\n max = max - 1;\n }\n const { bottomTabHeight } = this.context as StickyWrapperContextType;\n return (\n <SafeAreaInsetsContext.Consumer>\n {(insets = { top: 0, bottom: 0, left: 0, right: 0 }) => {\n this.insets = insets;\n const paddingBottomVal = this.styles.root.paddingBottom || this.styles.root.padding;\n const isEdgeToEdgeApp = !!this.appConfig?.edgeToEdgeConfig?.isEdgeToEdgeApp;\n const stylesWithFs = isEdgeToEdgeApp ? {height: this.styles.root.height as number + (insets?.bottom || 0) as number, \n paddingBottom: (paddingBottomVal || 0) as number + (insets?.bottom || 0) as number , backgroundColor: this.styles.root.backgroundColor || this.styles.menu.backgroundColor} : {}\n return (\n <NavigationServiceConsumer>\n {(navigationService) =>(\n <View style={[this.styles.root, stylesWithFs]} \n ref={(ref)=> {this.baseView = ref as any}}\n onLayout={(event: LayoutChangeEvent) => {\n if(bottomTabHeight && this.props.hideonscroll) {\n bottomTabHeightValue = event.nativeEvent.layout.height || 0;\n bottomTabHeight.value = bottomTabHeightValue;\n }\n this.handleLayout(event);\n }}\n >\n {isClippedTabbar ? (\n <Svg width={this.maxWidth} height={scale(this.styles.root.height as number)} style={{zIndex: -1,position: 'absolute',backgroundColor: ThemeVariables.INSTANCE.transparent}}>\n <Path fill={ThemeVariables.INSTANCE.tabbarBackgroundColor} {...{ d: this.returnpathDown }}/>\n </Svg>\n ): <></>} \n <ModalConsumer>\n {(modalService: ModalService) => {\n if (this.state.showMore) {\n modalService.showModal(this.prepareModalOptions((\n <ThemeProvider value={this.theme} >\n <View style={this.styles.moreMenu}>\n {moreItems.map((a, i) =>\n (<View key={i} style={this.styles.moreMenuRow}>\n {a.map((item, index) => this.renderTabItem(item, i + '', props, () => this.onItemSelect(item, navigationService)))}\n </View>)\n )}\n </View>\n </ThemeProvider>)));\n } else {\n modalService.hideModal(this.state.modalOptions);\n }\n return null;\n }}\n </ModalConsumer>\n <View \n testID=\"test_tabbar-menu\"\n style={this.styles.menu}\n onLayout={e => { this.tabbarHeight = e.nativeEvent.layout.height}}> \n {tabItems.filter((item, i) => i < max)\n .map((item, i) => this.renderTabItem(item, i + '', props, () => this.onItemSelect(item, navigationService), item.floating))}\n {tabItems.length > max && (\n this.renderTabItem({\n label: props.morebuttonlabel,\n icon: props.morebuttoniconclass\n } as TabDataItem, 6666 +'', props, () => {\n this.updateState({showMore: !this.state.showMore} as WmTabbarState<WmTabbarProps>);\n })\n )}\n </View>\n </View>)}\n </NavigationServiceConsumer>\n )}}\n </SafeAreaInsetsContext.Consumer>\n )\n }\n\n renderWidget(props: WmTabbarProps) {\n this.isFixed = true;\n const animateStyle = props.hideonscroll ? {transform: [{translateY: this.translateY}]} : {};\n return (\n <FixedView \n name={this.props.name}\n style={{...{bottom: 0, width:'100%', zIndex: 11}, ...animateStyle}} \n theme={this.theme}\n animated={props.hideonscroll || false}>\n {this._background}\n {this.renderContent(props)}\n </FixedView>\n ) \n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAqB,OAAO;AACxC,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,MAAM,QAEtE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AK,EAAE;QAAC,GAAG;UAAC2B,MAAM,EAAE,CAAC;UAAE/D,KAAK,EAAC,MAAM;UAAE6I,MAAM,EAAE;QAAE,CAAC;QAAE,GAAGwB;MAAY,CAAE;MACnE5H,KAAK,EAAE,IAAI,CAACA,KAAM;MAClB8H,QAAQ,EAAE1K,KAAK,CAAC6I,YAAY,IAAI;IAAM,GACrC,IAAI,CAAC8B,WAAW,EAChB,IAAI,CAAClE,aAAa,CAACzG,KAAK,CAChB,CAAC;EAElB;AACF;AAACF,eAAA,CArOoBC,QAAQ,iBASNP,oBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["React","Text","View","TouchableOpacity","Dimensions","Keyboard","Animated","Easing","ThemeProvider","ModalConsumer","WmIcon","NavigationServiceConsumer","BaseNavComponent","BaseNavState","WmTabbarProps","DEFAULT_CLASS","Svg","Path","getPathDown","ThemeVariables","FixedView","SafeAreaInsetsContext","injector","StickyWrapperContext","scale","n","WmTabbarState","constructor","args","_defineProperty","WmTabbar","props","Value","get","width","cleanup","push","addListener","keyBoardShown","forceUpdate","remove","onPropertyChange","name","$new","$old","destroyScrollListner","subscribeToPageScroll","renderTabItem","item","testId","onSelect","floating","isActive","getDisplayLabel","getDisplayExpression","label","increasedGap","Number","indexBeforeMid","state","dataItems","length","classname","indexOf","styles","tabItem","paddingRight","createElement","_extends","getTestPropsForAction","style","centerHubItem","key","onPress","activeTabItem","theme","mergeStyle","tabIcon","centerHubIcon","activeTabIcon","iconclass","icon","tabLabel","centerHubLabel","activeTabLabel","numberOfLines","onItemSelect","navigationService","link","openUrl","invokeEventCallback","proxy","prepareModalOptions","content","o","modalOptions","modalStyle","bottom","tabbarHeight","contentStyle","modalContent","isVisible","animateWithTiming","value","duratiion","timing","translateY","toValue","easing","linear","duration","useNativeDriver","start","tabbarHeightWithInsets","subscribe","event","_this$getLayout","_this$insets","contentOffset","layoutMeasurement","contentSize","nativeEvent","scrollPosition","y","getLayout","height","visibleContentHeight","endReached","bottomInsets","insets","e","Math","abs","scrollDelta","scrollDirection","componentWillUnmount","renderContent","max","tabItems","tabItemsLength","bottomTabHeightValue","isClippedTabbar","middleIndex","floor","returnpathDown","maxWidth","root","moreItems","moreItemsCount","ceil","j","i","row","Consumer","top","left","right","_this$appConfig","paddingBottomVal","paddingBottom","padding","isEdgeToEdgeApp","appConfig","edgeToEdgeConfig","stylesWithFs","backgroundColor","menu","ref","baseView","onLayout","context","bottomTabHeight","layout","handleLayout","zIndex","position","INSTANCE","transparent","fill","tabbarBackgroundColor","d","Fragment","modalService","showMore","showModal","moreMenu","map","a","moreMenuRow","index","hideModal","testID","filter","morebuttonlabel","morebuttoniconclass","updateState","renderWidget","isFixed","animateStyle","hideonscroll","transform","animated","_background"],"sources":["tabbar.component.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Text, View, TouchableOpacity, Dimensions, Keyboard, Animated, Easing, LayoutChangeEvent, \n NativeSyntheticEvent, NativeScrollEvent\n} from 'react-native';\nimport { ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport NavigationService, { NavigationServiceConsumer } from '@wavemaker/app-rn-runtime/core/navigation.service';\nimport { BaseNavProps } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.props';\nimport { BaseNavComponent, BaseNavState, NavigationDataItem } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.component';\n\nimport WmTabbarProps from './tabbar.props';\nimport { DEFAULT_CLASS, WmTabbarStyles } from './tabbar.styles';\nimport Svg, { Path } from 'react-native-svg';\nimport { getPathDown } from './curve';\n// import { scale } from 'react-native-size-scaling';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nimport { FixedView } from '@wavemaker/app-rn-runtime/core/fixed-view.component';\nimport { EdgeInsets, SafeAreaInsetsContext } from 'react-native-safe-area-context';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { StickyWrapperContext, StickyWrapperContextType } from '@wavemaker/app-rn-runtime/core/sticky-wrapper';\n\ninterface TabDataItem extends NavigationDataItem {\n floating: boolean;\n indexBeforeMid: number;\n}\n\ninterface CustomScrollEvent {\n scrollDirection: number;\n scrollDelta: number;\n}\n\nconst scale = (n: number) => n;\n\nclass WmTabbarState<T extends BaseNavProps> extends BaseNavState<T> {\n showMore = false;\n modalOptions = {} as ModalOptions;\n dataItems: TabDataItem[] = [];\n}\n\nexport default class WmTabbar extends BaseNavComponent<WmTabbarProps, WmTabbarState<WmTabbarProps>, WmTabbarStyles> {\n\n private tabbarHeight = 0;\n private keyBoardShown = false;\n private destroyScrollListner: Function = null as any;\n private translateY = new Animated.Value(0);\n private insets: EdgeInsets | null = null;\n private appConfig = injector.get<AppConfig>('APP_CONFIG');\n private tabbarHeightWithInsets: number = 0;\n static contextType = StickyWrapperContext;\n\n constructor(props: WmTabbarProps) {\n super(props, DEFAULT_CLASS, new WmTabbarProps(), new WmTabbarState());\n this.cleanup.push(Keyboard.addListener('keyboardWillShow', () => {\n this.keyBoardShown = true;\n this.forceUpdate();\n }).remove);\n this.cleanup.push(Keyboard.addListener('keyboardWillHide', () => {\n this.keyBoardShown = false;\n this.forceUpdate();\n }).remove);\n }\n\n private maxWidth = Dimensions.get(\"window\").width; \n private returnpathDown: any;\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name){\n case 'hideonscroll':\n this.destroyScrollListner && this.destroyScrollListner();\n if($new) {\n this.subscribeToPageScroll();\n }\n break;\n }\n }\n\n renderTabItem(item: TabDataItem, testId: string, props: WmTabbarProps, onSelect: Function, floating = false) {\n\n const isActive = props.isActive && props.isActive(item);\n const getDisplayLabel = this.props.getDisplayExpression || ((label: string) => label);\n let increasedGap = Number(testId) === item?.indexBeforeMid && (this.state.dataItems.length % 2!=0) && ((props.classname || '').indexOf('clipped-tabbar') >= 0)\n ? [this.styles.tabItem, { paddingRight: 70 }]\n : [this.styles.tabItem];\n \n return (\n <TouchableOpacity \n {...this.getTestPropsForAction('item' + testId)}\n style={[increasedGap, floating? this.styles.centerHubItem: {}]}\n key={`${item.label}_${testId}`}\n onPress={() => onSelect && onSelect()}>\n <View key={item.key}>\n <View style={[isActive && !floating ? this.styles.activeTabItem : {}]}>\n <WmIcon\n styles={this.theme.mergeStyle({}, this.styles.tabIcon, floating? this.styles.centerHubIcon: {}, isActive ? this.styles.activeTabIcon : {})}\n iconclass={item.icon}\n ></WmIcon>\n </View>\n </View>\n <Text style={[this.styles.tabLabel, floating? this.styles.centerHubLabel: {}, isActive ? this.styles.activeTabLabel : {}]} numberOfLines={1}>\n {getDisplayLabel(item.label)}\n </Text>\n </TouchableOpacity>\n );\n }\n \n onItemSelect(item: NavigationDataItem, navigationService: NavigationService) {\n item.link && navigationService.openUrl(item.link);\n this.invokeEventCallback('onSelect', [null, this.proxy, item]);\n }\n\n prepareModalOptions(content: ReactNode) {\n const o = this.state.modalOptions;\n o.content = content;\n o.modalStyle = {\n bottom: this.tabbarHeight\n };\n o.contentStyle = this.styles.modalContent; \n return o;\n }\n\n isVisible(): boolean {\n return super.isVisible() && !this.keyBoardShown;\n }\n\n animateWithTiming(value: number, duratiion: number): void {\n Animated.timing(this.translateY, {\n toValue: value, \n easing: Easing.linear,\n duration: duratiion, \n useNativeDriver: false\n }).start()\n }\n\n subscribeToPageScroll(){\n this.tabbarHeightWithInsets = 0;\n this.destroyScrollListner = this.subscribe('scroll', (event: NativeSyntheticEvent<NativeScrollEvent>)=>{\n const { contentOffset, layoutMeasurement, contentSize } = event.nativeEvent ;\n const scrollPosition = contentOffset.y ;\n this.tabbarHeightWithInsets = this.tabbarHeightWithInsets ? this.tabbarHeightWithInsets : this.getLayout()?.height ;\n const visibleContentHeight = layoutMeasurement.height ;\n const endReached = (scrollPosition + visibleContentHeight + this.tabbarHeightWithInsets) + 8 >= contentSize.height ;\n const bottomInsets = this.insets?.bottom || 0\n const e = event.nativeEvent as any as CustomScrollEvent;\n if(Math.abs(e?.scrollDelta) >= 2){\n if(e?.scrollDirection > 0){\n this.animateWithTiming(0, 100)\n }else if(e?.scrollDirection < 0) {\n this.animateWithTiming(this.tabbarHeightWithInsets + bottomInsets, 100)\n }\n }\n if(endReached){\n this.animateWithTiming(0, 0)\n }\n })\n }\n\n componentWillUnmount(): void {\n this.destroyScrollListner && this.destroyScrollListner();\n }\n\n renderContent(props: WmTabbarProps){\n let max = 5;\n const tabItems = this.state.dataItems;\n const tabItemsLength = tabItems.length;\n let bottomTabHeightValue;\n const isClippedTabbar = ((props.classname || '').indexOf('clipped-tabbar') >= 0) && (tabItemsLength % 2 !== 0);\n if (isClippedTabbar && tabItemsLength % 2 !== 0) {\n const middleIndex = Math.floor(tabItemsLength / 2);\n tabItems[middleIndex]['floating'] = true;\n tabItems[middleIndex - 1]['indexBeforeMid'] = middleIndex-1;\n }\n this.returnpathDown = getPathDown(this.maxWidth, 65 ,60,this.styles.root.height as number);\n const moreItems = [] as any[][];\n if (tabItems.length > max) {\n const moreItemsCount = Math.ceil((tabItems.length + 1 - max)/ max) * max;\n let j = 0;\n for (let i = max-1; i < moreItemsCount;) {\n const row = [];\n for (let j = 0; j < max; j++) {\n row[j] = tabItems[i++] || {key: 'tabItem' + i} as TabDataItem;\n }\n moreItems.push(row);\n }\n max = max - 1;\n }\n return (\n <SafeAreaInsetsContext.Consumer>\n {(insets = { top: 0, bottom: 0, left: 0, right: 0 }) => {\n this.insets = insets;\n const paddingBottomVal = this.styles.root.paddingBottom || this.styles.root.padding;\n const isEdgeToEdgeApp = !!this.appConfig?.edgeToEdgeConfig?.isEdgeToEdgeApp;\n const stylesWithFs = isEdgeToEdgeApp ? {height: this.styles.root.height as number + (insets?.bottom || 0) as number, \n paddingBottom: (paddingBottomVal || 0) as number + (insets?.bottom || 0) as number , backgroundColor: this.styles.root.backgroundColor || this.styles.menu.backgroundColor} : {}\n return (\n <NavigationServiceConsumer>\n {(navigationService) =>(\n <View style={[this.styles.root, stylesWithFs]} \n ref={(ref)=> {this.baseView = ref as any}}\n onLayout={(event: LayoutChangeEvent) => {\n if(this.context && (this.context as StickyWrapperContextType).bottomTabHeight) {\n bottomTabHeightValue = event.nativeEvent.layout.height || 0;\n (this.context as StickyWrapperContextType).bottomTabHeight.value = bottomTabHeightValue;\n }\n this.handleLayout(event);\n }}\n >\n {isClippedTabbar ? (\n <Svg width={this.maxWidth} height={scale(this.styles.root.height as number)} style={{zIndex: -1,position: 'absolute',backgroundColor: ThemeVariables.INSTANCE.transparent}}>\n <Path fill={ThemeVariables.INSTANCE.tabbarBackgroundColor} {...{ d: this.returnpathDown }}/>\n </Svg>\n ): <></>} \n <ModalConsumer>\n {(modalService: ModalService) => {\n if (this.state.showMore) {\n modalService.showModal(this.prepareModalOptions((\n <ThemeProvider value={this.theme} >\n <View style={this.styles.moreMenu}>\n {moreItems.map((a, i) =>\n (<View key={i} style={this.styles.moreMenuRow}>\n {a.map((item, index) => this.renderTabItem(item, i + '', props, () => this.onItemSelect(item, navigationService)))}\n </View>)\n )}\n </View>\n </ThemeProvider>)));\n } else {\n modalService.hideModal(this.state.modalOptions);\n }\n return null;\n }}\n </ModalConsumer>\n <View \n testID=\"test_tabbar-menu\"\n style={this.styles.menu}\n onLayout={e => { this.tabbarHeight = e.nativeEvent.layout.height}}> \n {tabItems.filter((item, i) => i < max)\n .map((item, i) => this.renderTabItem(item, i + '', props, () => this.onItemSelect(item, navigationService), item.floating))}\n {tabItems.length > max && (\n this.renderTabItem({\n label: props.morebuttonlabel,\n icon: props.morebuttoniconclass\n } as TabDataItem, 6666 +'', props, () => {\n this.updateState({showMore: !this.state.showMore} as WmTabbarState<WmTabbarProps>);\n })\n )}\n </View>\n </View>)}\n </NavigationServiceConsumer>\n )}}\n </SafeAreaInsetsContext.Consumer>\n )\n }\n\n renderWidget(props: WmTabbarProps) {\n this.isFixed = true;\n const animateStyle = props.hideonscroll ? {transform: [{translateY: this.translateY}]} : {};\n return (\n <FixedView \n name={this.props.name}\n style={{...{bottom: 0, width:'100%', zIndex: 11}, ...animateStyle}} \n theme={this.theme}\n animated={props.hideonscroll || false}>\n {this._background}\n {this.renderContent(props)}\n </FixedView>\n ) \n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAqB,OAAO;AACxC,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,MAAM,QAEtE,cAAc;AACrB,SAASC,aAAa,QAAQ,wCAAwC;AACtE,SAASC,aAAa,QAAoC,8CAA8C;AACxG,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAA4BC,yBAAyB,QAAQ,mDAAmD;AAEhH,SAASC,gBAAgB,EAAEC,YAAY,QAA4B,2EAA2E;AAE9I,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,OAAOC,GAAG,IAAIC,IAAI,QAAQ,kBAAkB;AAC5C,SAASC,WAAW,QAAQ,SAAS;AACrC;AACA,OAAOC,cAAc,MAAM,kDAAkD;AAC7E,SAASC,SAAS,QAAQ,qDAAqD;AAC/E,SAAqBC,qBAAqB,QAAQ,gCAAgC;AAClF,OAAOC,QAAQ,MAAM,yCAAyC;AAE9D,SAASC,oBAAoB,QAAkC,+CAA+C;AAY9G,MAAMC,KAAK,GAAIC,CAAS,IAAKA,CAAC;AAE9B,MAAMC,aAAa,SAAiCb,YAAY,CAAI;EAAAc,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,mBACvD,KAAK;IAAAA,eAAA,uBACD,CAAC,CAAC;IAAAA,eAAA,oBACU,EAAE;EAAA;AAC/B;AAEA,eAAe,MAAMC,QAAQ,SAASlB,gBAAgB,CAA8D;EAWlHe,WAAWA,CAACI,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAA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YAAYA,CAACrK,KAAoB,EAAE;IACjC,IAAI,CAACsK,OAAO,GAAG,IAAI;IACnB,MAAMC,YAAY,GAAGvK,KAAK,CAACwK,YAAY,GAAG;MAACC,SAAS,EAAE,CAAC;QAAC9F,UAAU,EAAE,IAAI,CAACA;MAAU,CAAC;IAAC,CAAC,GAAG,CAAC,CAAC;IAC3F,oBACI1G,KAAA,CAAAmE,aAAA,CAAC/C,SAAS;MACRsB,IAAI,EAAE,IAAI,CAACX,KAAK,CAACW,IAAK;MACtB4B,KAAK,EAAE;QAAC,GAAG;UAAC2B,MAAM,EAAE,CAAC;UAAE/D,KAAK,EAAC,MAAM;UAAE4I,MAAM,EAAE;QAAE,CAAC;QAAE,GAAGwB;MAAY,CAAE;MACnE3H,KAAK,EAAE,IAAI,CAACA,KAAM;MAClB8H,QAAQ,EAAE1K,KAAK,CAACwK,YAAY,IAAI;IAAM,GACrC,IAAI,CAACG,WAAW,EAChB,IAAI,CAAClE,aAAa,CAACzG,KAAK,CAChB,CAAC;EAElB;AACF;AAACF,eAAA,CApOoBC,QAAQ,iBASNP,oBAAoB","ignoreList":[]}
@@ -1,8 +1,2 @@
1
- import React from 'react';
2
-
3
- // * expo-calendar plugin
4
-
5
- const CalendarPluginContext = /*#__PURE__*/React.createContext(null);
6
- export const CalendarPluginProvider = CalendarPluginContext.Provider;
7
- export const CalendarPluginConsumer = CalendarPluginContext.Consumer;
1
+ export {};
8
2
  //# sourceMappingURL=calendar-service.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","CalendarPluginContext","createContext","CalendarPluginProvider","Provider","CalendarPluginConsumer","Consumer"],"sources":["calendar-service.ts"],"sourcesContent":["import { Input } from '@wavemaker/app-rn-runtime/variables/device/operation.provider';\nimport React from 'react';\n\nexport interface CalendarInput extends Input {\n eventTitle: string;\n eventLocation: string;\n eventNotes: string;\n eventStart: Date;\n eventEnd: Date;\n calendarPluginService: any;\n permissionService: any;\n}\n\nexport interface CalendarService {\n getEvents: (params: CalendarInput) => any;\n createEvent: (params: CalendarInput) => any;\n deleteEvent: (params: CalendarInput) => any;\n}\n\n// * expo-calendar plugin\nexport interface CalendarPluginService {\n getCalendarsAsync: any;\n getEventsAsync: any;\n createEventAsync: any;\n deleteEventAsync: any;\n}\nconst CalendarPluginContext = React.createContext<CalendarPluginService>(null as any);\n\nexport const CalendarPluginProvider = CalendarPluginContext.Provider;\nexport const CalendarPluginConsumer = CalendarPluginContext.Consumer;\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;;AAkBzB;;AAOA,MAAMC,qBAAqB,gBAAGD,KAAK,CAACE,aAAa,CAAwB,IAAW,CAAC;AAErF,OAAO,MAAMC,sBAAsB,GAAGF,qBAAqB,CAACG,QAAQ;AACpE,OAAO,MAAMC,sBAAsB,GAAGJ,qBAAqB,CAACK,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["calendar-service.ts"],"sourcesContent":["import { Input } from '@wavemaker/app-rn-runtime/variables/device/operation.provider';\n\nexport interface CalendarInput extends Input {\n eventTitle: string;\n eventLocation: string;\n eventNotes: string;\n eventStart: Date;\n eventEnd: Date;\n}\n\nexport interface CalendarService {\n getEvents: (params: CalendarInput) => any;\n createEvent: (params: CalendarInput) => any;\n deleteEvent: (params: CalendarInput) => any;\n}\n"],"mappings":"","ignoreList":[]}
@@ -2,10 +2,4 @@ import React from 'react';
2
2
  const CameraContext = /*#__PURE__*/React.createContext(null);
3
3
  export const CameraProvider = CameraContext.Provider;
4
4
  export const CameraConsumer = CameraContext.Consumer;
5
-
6
- // * expo-camera plugin
7
-
8
- const CameraPluginContext = /*#__PURE__*/React.createContext(null);
9
- export const CameraPluginProvider = CameraPluginContext.Provider;
10
- export const CameraPluginConsumer = CameraPluginContext.Consumer;
11
5
  //# sourceMappingURL=camera-service.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","CameraContext","createContext","CameraProvider","Provider","CameraConsumer","Consumer","CameraPluginContext","CameraPluginProvider","CameraPluginConsumer"],"sources":["camera-service.ts"],"sourcesContent":["import { Input } from '@wavemaker/app-rn-runtime/variables/device/operation.provider';\nimport React from 'react';\n\nexport interface CameraInput extends Input {\n allowImageEdit: boolean;\n imageQuality: number;\n imageEncodingType: string;\n imageTargetWidth: number;\n imageTargetHeight: number;\n permissionService: any;\n}\n\nexport interface CameraVideoInput {\n permissionService: any;\n}\n\nexport interface CameraService {\n captureImage: (params: CameraInput) => any\n captureVideo: (params: CameraVideoInput) => any;\n}\nconst CameraContext = React.createContext<CameraService>(null as any);\n\nexport const CameraProvider = CameraContext.Provider;\nexport const CameraConsumer = CameraContext.Consumer;\n\n// * expo-camera plugin\nexport interface CameraPluginService {\n CameraView: any;\n Video: any;\n fsReadAsString: (uri: any, params: any) => any;\n}\nconst CameraPluginContext = React.createContext<CameraPluginService>(null as any);\n\nexport const CameraPluginProvider = CameraPluginContext.Provider;\nexport const CameraPluginConsumer = CameraPluginContext.Consumer;\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AAmBzB,MAAMC,aAAa,gBAAGD,KAAK,CAACE,aAAa,CAAgB,IAAW,CAAC;AAErE,OAAO,MAAMC,cAAc,GAAGF,aAAa,CAACG,QAAQ;AACpD,OAAO,MAAMC,cAAc,GAAGJ,aAAa,CAACK,QAAQ;;AAEpD;;AAMA,MAAMC,mBAAmB,gBAAGP,KAAK,CAACE,aAAa,CAAsB,IAAW,CAAC;AAEjF,OAAO,MAAMM,oBAAoB,GAAGD,mBAAmB,CAACH,QAAQ;AAChE,OAAO,MAAMK,oBAAoB,GAAGF,mBAAmB,CAACD,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["React","CameraContext","createContext","CameraProvider","Provider","CameraConsumer","Consumer"],"sources":["camera-service.ts"],"sourcesContent":["import { Input } from '@wavemaker/app-rn-runtime/variables/device/operation.provider';\nimport React from 'react';\n\nexport interface CameraInput extends Input {\n allowImageEdit: boolean;\n imageQuality: number;\n imageEncodingType: string;\n imageTargetWidth: number;\n imageTargetHeight: number;\n}\n\nexport interface CameraService {\n captureImage: (params: CameraInput) => any\n captureVideo: () => any;\n}\nconst CameraContext = React.createContext<CameraService>(null as any);\n\nexport const CameraProvider = CameraContext.Provider;\nexport const CameraConsumer = CameraContext.Consumer;\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AAczB,MAAMC,aAAa,gBAAGD,KAAK,CAACE,aAAa,CAAgB,IAAW,CAAC;AAErE,OAAO,MAAMC,cAAc,GAAGF,aAAa,CAACG,QAAQ;AACpD,OAAO,MAAMC,cAAc,GAAGJ,aAAa,CAACK,QAAQ","ignoreList":[]}
@@ -1,8 +1,2 @@
1
- import React from 'react';
2
-
3
- // * expo-contacts plugin
4
-
5
- const ContactsPluginContext = /*#__PURE__*/React.createContext(null);
6
- export const ContactsPluginProvider = ContactsPluginContext.Provider;
7
- export const ContactsPluginConsumer = ContactsPluginContext.Consumer;
1
+ export {};
8
2
  //# sourceMappingURL=contacts-service.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","ContactsPluginContext","createContext","ContactsPluginProvider","Provider","ContactsPluginConsumer","Consumer"],"sources":["contacts-service.ts"],"sourcesContent":["import { Input } from '@wavemaker/app-rn-runtime/variables/device/operation.provider';\nimport React from 'react';\n\nexport interface ContactsInput extends Input {\n contactFilter: string;\n contactsPluginService: any;\n permissionService: any;\n}\n\nexport interface ContactsService {\n getContacts: (params: ContactsInput) => any;\n}\n\n// * expo-contacts plugin\nexport interface ContactsPluginService {\n Fields: any;\n getContactsAsync: any;\n}\nconst ContactsPluginContext = React.createContext<ContactsPluginService>(null as any);\n\nexport const ContactsPluginProvider = ContactsPluginContext.Provider;\nexport const ContactsPluginConsumer = ContactsPluginContext.Consumer;\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;;AAYzB;;AAKA,MAAMC,qBAAqB,gBAAGD,KAAK,CAACE,aAAa,CAAwB,IAAW,CAAC;AAErF,OAAO,MAAMC,sBAAsB,GAAGF,qBAAqB,CAACG,QAAQ;AACpE,OAAO,MAAMC,sBAAsB,GAAGJ,qBAAqB,CAACK,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["contacts-service.ts"],"sourcesContent":["import { Input } from '@wavemaker/app-rn-runtime/variables/device/operation.provider';\n\nexport interface ContactsInput extends Input {\n contactFilter: string;\n}\n\nexport interface ContactsService {\n getContacts: (params: ContactsInput) => any;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,8 +1,2 @@
1
- import React from "react";
2
-
3
- // * expo-location plugin
4
-
5
- const LocationPluginContext = /*#__PURE__*/React.createContext(null);
6
- export const LocationPluginProvider = LocationPluginContext.Provider;
7
- export const LocationPluginConsumer = LocationPluginContext.Consumer;
1
+ export {};
8
2
  //# sourceMappingURL=location-service.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","LocationPluginContext","createContext","LocationPluginProvider","Provider","LocationPluginConsumer","Consumer"],"sources":["location-service.ts"],"sourcesContent":["import {Input} from \"@wavemaker/app-rn-runtime/variables/device/operation.provider\";\nimport React from \"react\";\n\nexport interface GeoPositionInput extends Input {\n maximumAge: number;\n timeout: number;\n enableHighAccuracy: boolean;\n permissionService: any;\n locationPluginService: any;\n}\n\nexport interface LocationService {\n getCurrentGeoPosition: (params: GeoPositionInput) => any;\n}\n\n// * expo-location plugin\nexport interface LocationPluginService {}\nconst LocationPluginContext = React.createContext<LocationPluginService>(null as any);\n\nexport const LocationPluginProvider = LocationPluginContext.Provider;\nexport const LocationPluginConsumer = LocationPluginContext.Consumer;\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;;AAczB;;AAEA,MAAMC,qBAAqB,gBAAGD,KAAK,CAACE,aAAa,CAAwB,IAAW,CAAC;AAErF,OAAO,MAAMC,sBAAsB,GAAGF,qBAAqB,CAACG,QAAQ;AACpE,OAAO,MAAMC,sBAAsB,GAAGJ,qBAAqB,CAACK,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["location-service.ts"],"sourcesContent":["import {Input} from \"@wavemaker/app-rn-runtime/variables/device/operation.provider\";\n\nexport interface GeoPositionInput extends Input {\n maximumAge: number;\n timeout: number;\n enableHighAccuracy: boolean;\n}\n\nexport interface LocationService {\n getCurrentGeoPosition: (params: GeoPositionInput) => any;\n}\n"],"mappings":"","ignoreList":[]}
@@ -2,10 +2,4 @@ import React from 'react';
2
2
  const ScanContext = /*#__PURE__*/React.createContext(null);
3
3
  export const ScanProvider = ScanContext.Provider;
4
4
  export const ScanConsumer = ScanContext.Consumer;
5
-
6
- // * scan service plugin
7
-
8
- const ScanPluginContext = /*#__PURE__*/React.createContext(null);
9
- export const ScanPluginProvider = ScanPluginContext.Provider;
10
- export const ScanPluginConsumer = ScanPluginContext.Consumer;
11
5
  //# sourceMappingURL=scan-service.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","ScanContext","createContext","ScanProvider","Provider","ScanConsumer","Consumer","ScanPluginContext","ScanPluginProvider","ScanPluginConsumer"],"sources":["scan-service.ts"],"sourcesContent":["import {ScanInput} from \"@wavemaker/app-rn-runtime/variables/device/scan/scan.operation\";\nimport React from 'react';\n\nexport interface ScanService {\n scanBarcode: (params: ScanInput) => any;\n}\nconst ScanContext = React.createContext<ScanService>(null as any);\n\nexport const ScanProvider = ScanContext.Provider;\nexport const ScanConsumer = ScanContext.Consumer;\n\n// * scan service plugin\nexport interface ScanPluginService {\n CameraView: any;\n}\nconst ScanPluginContext = React.createContext<ScanPluginService>(null as any);\n\nexport const ScanPluginProvider = ScanPluginContext.Provider;\nexport const ScanPluginConsumer = ScanPluginContext.Consumer;\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AAKzB,MAAMC,WAAW,gBAAGD,KAAK,CAACE,aAAa,CAAc,IAAW,CAAC;AAEjE,OAAO,MAAMC,YAAY,GAAGF,WAAW,CAACG,QAAQ;AAChD,OAAO,MAAMC,YAAY,GAAGJ,WAAW,CAACK,QAAQ;;AAEhD;;AAIA,MAAMC,iBAAiB,gBAAGP,KAAK,CAACE,aAAa,CAAoB,IAAW,CAAC;AAE7E,OAAO,MAAMM,kBAAkB,GAAGD,iBAAiB,CAACH,QAAQ;AAC5D,OAAO,MAAMK,kBAAkB,GAAGF,iBAAiB,CAACD,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["React","ScanContext","createContext","ScanProvider","Provider","ScanConsumer","Consumer"],"sources":["scan-service.ts"],"sourcesContent":["import {ScanInput} from \"@wavemaker/app-rn-runtime/variables/device/scan/scan.operation\";\nimport React from 'react';\n\nexport interface ScanService {\n scanBarcode: (params: ScanInput) => any;\n}\nconst ScanContext = React.createContext<ScanService>(null as any);\n\nexport const ScanProvider = ScanContext.Provider;\nexport const ScanConsumer = ScanContext.Consumer;\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AAKzB,MAAMC,WAAW,gBAAGD,KAAK,CAACE,aAAa,CAAc,IAAW,CAAC;AAEjE,OAAO,MAAMC,YAAY,GAAGF,WAAW,CAACG,QAAQ;AAChD,OAAO,MAAMC,YAAY,GAAGJ,WAAW,CAACK,QAAQ","ignoreList":[]}
package/core/utils.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Platform } from 'react-native';
2
2
  import moment from "moment";
3
+ import * as FileSystem from "expo-file-system";
3
4
  import { isFunction, includes, isUndefined, isNull, orderBy, groupBy, toLower, get, forEach, sortBy, cloneDeep, keys, values, isArray, isString, isNumber } from 'lodash';
4
5
  import * as mime from 'react-native-mime-types';
5
6
  import ThemeVariables from '../styles/theme.variables';
@@ -328,6 +329,11 @@ export const formatCompactNumber = number => {
328
329
  }
329
330
  return (isNegative ? '-' : '') + formattedNumber;
330
331
  };
332
+ export const toBase64 = function (path) {
333
+ return FileSystem.readAsStringAsync(path, {
334
+ encoding: 'base64'
335
+ });
336
+ };
331
337
  const DATASET_WIDGETS = new Set(['select', 'checkboxset', 'radioset', 'switch', 'autocomplete', 'chips', 'typeahead', 'rating']);
332
338
  export const isDataSetWidget = widget => {
333
339
  return DATASET_WIDGETS.has(widget);