@wavemaker/app-rn-runtime 12.0.0-next.141209 → 12.0.0-next.1417124

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +1 -0
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/basic/audio/audio.component.js +9 -2
  4. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  5. app-rn-runtime/components/basic/audio/audio.styles.js +7 -0
  6. app-rn-runtime/components/basic/audio/audio.styles.js.map +1 -1
  7. app-rn-runtime/components/basic/custom/custom.component.js +1 -1
  8. app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
  9. app-rn-runtime/components/basic/lottie/lottie.component.js +3 -1
  10. app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
  11. app-rn-runtime/components/basic/search/search.component.js +1 -1
  12. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  13. app-rn-runtime/components/basic/search/search.props.js +1 -0
  14. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  15. app-rn-runtime/components/basic/skeleton/skeleton.component.js +2 -0
  16. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  17. app-rn-runtime/components/basic/video/video.component.js +6 -0
  18. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  19. app-rn-runtime/components/basic/video/video.styles.js +7 -1
  20. app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
  21. app-rn-runtime/components/container/container.component.js +8 -1
  22. app-rn-runtime/components/container/container.component.js.map +1 -1
  23. app-rn-runtime/components/container/container.props.js +1 -0
  24. app-rn-runtime/components/container/container.props.js.map +1 -1
  25. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +1 -0
  26. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
  27. app-rn-runtime/components/container/tabs/tabs.component.js +3 -1
  28. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  29. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +4 -0
  30. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  31. app-rn-runtime/components/data/form/form-field/form-field.component.js +2 -1
  32. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  33. app-rn-runtime/components/input/baseinput/baseinput.component.js +46 -10
  34. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  35. app-rn-runtime/components/input/basenumber/basenumber.component.js +19 -6
  36. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  37. app-rn-runtime/components/input/calendar/calendar.component.js +25 -0
  38. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  39. app-rn-runtime/components/input/calendar/calendar.styles.js +19 -0
  40. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  41. app-rn-runtime/components/input/checkbox/checkbox.component.js +23 -3
  42. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  43. app-rn-runtime/components/input/checkbox/checkbox.styles.js +19 -2
  44. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  45. app-rn-runtime/components/input/chips/chips.component.js +16 -2
  46. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  47. app-rn-runtime/components/input/chips/chips.styles.js +8 -0
  48. app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
  49. app-rn-runtime/components/input/currency/currency.component.js +14 -4
  50. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  51. app-rn-runtime/components/input/currency/currency.styles.js +43 -1
  52. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  53. app-rn-runtime/components/input/epoch/base-datetime.component.js +26 -5
  54. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  55. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +6 -0
  56. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  57. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +13 -0
  58. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  59. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +7 -4
  60. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
  61. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +3 -0
  62. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
  63. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +7 -4
  64. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js.map +1 -1
  65. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js +3 -0
  66. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js.map +1 -1
  67. app-rn-runtime/components/input/number/number.component.js +17 -3
  68. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  69. app-rn-runtime/components/input/number/number.styles.js +24 -1
  70. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  71. app-rn-runtime/components/input/radioset/radioset.component.js +12 -7
  72. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  73. app-rn-runtime/components/input/radioset/radioset.props.js +1 -0
  74. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  75. app-rn-runtime/components/input/radioset/radioset.styles.js +6 -0
  76. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  77. app-rn-runtime/components/input/select/select.component.js +11 -3
  78. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  79. app-rn-runtime/components/input/select/select.styles.js +24 -0
  80. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  81. app-rn-runtime/components/input/switch/switch.component.js +13 -3
  82. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  83. app-rn-runtime/components/input/switch/switch.styles.js +15 -0
  84. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  85. app-rn-runtime/components/input/text/text.component.js +5 -2
  86. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  87. app-rn-runtime/components/input/text/text.props.js +1 -0
  88. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  89. app-rn-runtime/components/input/text/text.styles.js +3 -0
  90. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  91. app-rn-runtime/components/input/textarea/textarea.component.js +3 -1
  92. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  93. app-rn-runtime/components/input/textarea/textarea.styles.js +3 -0
  94. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  95. app-rn-runtime/components/input/toggle/toggle.component.js +6 -0
  96. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  97. app-rn-runtime/components/input/toggle/toggle.props.js +2 -0
  98. app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
  99. app-rn-runtime/components/input/toggle/toggle.styles.js +7 -0
  100. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  101. app-rn-runtime/components/page/content/content.component.js +4 -19
  102. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  103. app-rn-runtime/components/page/left-panel/left-panel.component.js +4 -1
  104. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  105. app-rn-runtime/components/page/page-content/page-content.component.js +43 -12
  106. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  107. app-rn-runtime/core/AppConfig.js.map +1 -1
  108. app-rn-runtime/core/base.component.js +31 -5
  109. app-rn-runtime/core/base.component.js.map +1 -1
  110. app-rn-runtime/core/components/textinput.component.js +9 -7
  111. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  112. app-rn-runtime/core/storage.service.js +15 -0
  113. app-rn-runtime/core/storage.service.js.map +1 -1
  114. app-rn-runtime/core/wm-component-tree.js +58 -0
  115. app-rn-runtime/core/wm-component-tree.js.map +1 -0
  116. app-rn-runtime/package.json +13 -6
  117. app-rn-runtime/runtime/App.js +21 -2
  118. app-rn-runtime/runtime/App.js.map +1 -1
  119. app-rn-runtime/runtime/App.navigator.js +1 -0
  120. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  121. app-rn-runtime/runtime/base-fragment.component.js +18 -0
  122. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  123. app-rn-runtime/runtime/base-page.component.js +38 -2
  124. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  125. app-rn-runtime/runtime/base-partial.component.js +3 -0
  126. app-rn-runtime/runtime/base-partial.component.js.map +1 -1
  127. app-rn-runtime/runtime/navigator/drawer.navigator.js +19 -10
  128. app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
  129. app-rn-runtime/runtime/services/app-modal.service.js +4 -4
  130. app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
  131. app-rn-runtime/styles/theme.js +5 -0
  132. app-rn-runtime/styles/theme.js.map +1 -1
  133. app-rn-runtime/styles/theme.variables.js +1 -1
  134. app-rn-runtime/styles/theme.variables.js.map +1 -1
  135. app-rn-runtime/variables/http.service.js +5 -1
  136. app-rn-runtime/variables/http.service.js.map +1 -1
  137. app-rn-runtime/variables/live-variable.js +14 -0
  138. app-rn-runtime/variables/live-variable.js.map +1 -1
@@ -289,6 +289,7 @@ export default class WmCarousel extends BaseComponent {
289
289
  return /*#__PURE__*/React.createElement(Animated.View, {
290
290
  key: this.generateItemKey(item, index, props),
291
291
  onLayout: this.addSlideLayout.bind(this, index),
292
+ testID: `carousel_item_${index}`,
292
293
  style: [{
293
294
  height: props.type === 'dynamic' ? undefined : '100%'
294
295
  }, this.styles.slide, index === 0 ? this.styles.firstSlide : null, index === data.length - 1 ? this.styles.lastSlide : null, isActive ? this.styles.activeSlide : null, translateX && scale ? {
@@ -1 +1 @@
1
- {"version":3,"names":["React","isArray","isUndefined","Animated","Easing","View","DefaultKeyExtractor","WmIcon","BaseComponent","BaseComponentState","SwipeAnimation","Tappable","WmCarouselProps","DEFAULT_CLASS","WmCarouselState","constructor","args","_defineProperty","WmCarousel","props","Value","bounds","e","_this$slidesLayout","_this$slidesLayout$ac","activeTabIndex","state","activeIndex","lower","slidesLayout","filter","l","i","reduce","s","width","center","upper","computePhase","value","_this$slidesLayout$ac2","w","Math","abs","onLower","onSlideChange","onUpper","noOfSlides","_this$animationView","animationView","setPosition","index","prevIndex","updateState","invokeEventCallback","animatePagination","item","type","renderSlide","children","data","dataset","length","_this$animationView2","_this$animationView3","goToUpper","_this$animationView4","goToLower","cleanup","push","stopPlay","addSlideLayout","nativeEvent","layout","forceUpdate","generateItemKey","itemkey","_showSkeleton","keyExtractor","getKey","autoPlay","initialized","animation","animationinterval","intervalId","setInterval","next","clearInterval","setTimeout","_this$animationView5","stopAnimation","startAnimation","onPropertyChange","name","$new","$old","_this$keyExtractor","clear","min","_this$styles$dotStyle","_this$styles$dotStyle2","_this$styles$dotStyle3","margin","styles","dotStyle","marginLeft","marginRight","size","position","max","scale","options","useNativeDriver","duration","easing","out","linear","sequence","timing","dotScale","toValue","parallel","dotPosition","isRTL","start","renderPagination","maxNoOfDots","maxnoofdots","minIndex","maxIndex","dotSkeleton","root","createElement","style","dotsWrapperStyle","flexDirection","map","_extends","key","getTestPropsForAction","activeDotStyle","undefined","height","transform","translateX","right","left","renderSkeleton","skeleton","renderItem","componentDidMount","renderWidget","_data","_this$styles$slide","hasNavs","controls","hasDots","slideScale","slideTranslateX","slide","_this$styles$slide2","_this$styles$slide3","find","o","_background","enableGestures","enablegestures","flex","direction","ref","r","handlers","animationHandlers","slideMinWidth","_this$animationView6","_this$animationView7","isActive","animationPhase","interpolate","inputRange","outputRange","onLayout","bind","firstSlide","lastSlide","activeSlide","onTap","_this$animationView8","rippleColor","btnPanel","id","getTestId","iconclass","prevBtn","prev","accessibilitylabel","nextBtn"],"sources":["carousel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { isArray, isUndefined } from 'lodash-es';\nimport { Animated, Easing, View, LayoutChangeEvent, LayoutRectangle } from 'react-native';\nimport { DefaultKeyExtractor } from '@wavemaker/app-rn-runtime/core/key.extractor';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport * as SwipeAnimation from '@wavemaker/app-rn-runtime/gestures/swipe.animation';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\n\nimport WmCarouselProps from './carousel.props';\nimport { DEFAULT_CLASS, WmCarouselStyles } from './carousel.styles';\nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmCarouselState extends BaseComponentState<WmCarouselProps> {\n activeIndex = 1;\n}\n\nexport default class WmCarousel extends BaseComponent<WmCarouselProps, WmCarouselState, WmCarouselStyles> {\n\n noOfSlides: number = 0;\n private slidesLayout: LayoutRectangle[] = [];\n private keyExtractor = new DefaultKeyExtractor();\n stopPlay: Function = null as any;\n private dotScale = new Animated.Value(0);\n private dotPosition = new Animated.Value(0);\n private animationView: SwipeAnimation.View | null = null as any;\n private animationHandlers = {\n bounds: (e) => {\n const activeTabIndex = this.state.activeIndex - 1;\n let lower = 0;\n if (activeTabIndex > 0) {\n lower = this.slidesLayout\n .filter((l , i) => i < activeTabIndex - 1)\n .reduce((s, l) => s + l.width, 0);\n }\n let center = lower + (this.slidesLayout[activeTabIndex - 1]?.width || 0);\n let upper = center + (this.slidesLayout[activeTabIndex]?.width || 0);\n return {\n lower: -1 * lower,\n center: -1 * center,\n upper: -1 * upper\n };\n },\n computePhase: (value) => {\n const activeTabIndex = this.state.activeIndex - 1;\n const w = this.slidesLayout[activeTabIndex]?.width || 0;\n return w && Math.abs(value / w);\n },\n onLower: (e) => {\n this.onSlideChange(this.state.activeIndex - 1);\n },\n onUpper: (e) => {\n if(this.noOfSlides < this.state.activeIndex + 1){\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n }\n else{\n this.onSlideChange(this.state.activeIndex + 1);\n }\n }\n } as SwipeAnimation.Handlers;\n\n constructor(props: WmCarouselProps) {\n super(props, DEFAULT_CLASS, new WmCarouselProps(), new WmCarouselState());\n this.cleanup.push(() => {\n this.stopPlay && this.stopPlay();\n })\n }\n\n addSlideLayout(index: number, nativeEvent: LayoutChangeEvent) {\n this.slidesLayout[index] = nativeEvent.nativeEvent.layout;\n if (index === this.state.activeIndex) {\n this.forceUpdate();\n }\n }\n\n private generateItemKey(item: any, index: number, props: WmCarouselProps) {\n if (props.itemkey && item && !this._showSkeleton) {\n return props.itemkey(item, index);\n }\n return 'list_item_' + this.keyExtractor.getKey(item, true);\n }\n\n autoPlay() {\n if(!this.initialized){\n return;\n }\n const props = this.state.props;\n this.stopPlay && this.stopPlay();\n if (props.animation === 'auto' && props.animationinterval) {\n const intervalId = setInterval(() => {\n this.next();\n }, props.animationinterval * 1000);\n this.stopPlay = () => clearInterval(intervalId);\n } else {\n setTimeout(() => {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n }, 1000);\n }\n }\n\n stopAnimation(){ \n this.stopPlay();\n }\n startAnimation() {\n this.autoPlay();\n }\n \n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'dataset': {\n this.keyExtractor?.clear();\n this.updateState({\n activeIndex: Math.min(this.state.activeIndex, $new?.length || 1)\n } as WmCarouselState);\n break;\n }\n case 'animation':\n case 'animationinterval' : {\n this.autoPlay();\n }\n }\n }\n\n animatePagination(index: number) {\n const prevIndex = this.state.activeIndex;\n const margin = ((this.styles.dotStyle?.marginLeft as number)|| 0) + \n ((this.styles.dotStyle?.marginRight as number)|| 0)\n const width = (this.styles.dotStyle?.width as number)|| 2;\n const size = margin + width;\n const position = Math.max(index - 1, 0) * size;\n const scale = Math.abs(index - prevIndex) * size;\n const options = {\n useNativeDriver: true,\n duration: 200,\n easing: Easing.out(Easing.linear)\n };\n if (prevIndex < index) {\n Animated.sequence([\n Animated.timing(this.dotScale, {\n toValue: scale,\n ...options\n }),\n Animated.parallel([\n Animated.timing(this.dotScale, {\n toValue: 0,\n ...options\n }),\n Animated.timing(this.dotPosition, {\n toValue: (this.isRTL ? -1: 1) * position,\n ...options\n })\n ])\n ]).start();\n } else if (prevIndex > index) {\n Animated.sequence([\n Animated.parallel([\n Animated.timing(this.dotScale, {\n toValue: scale,\n ...options\n }),\n Animated.timing(this.dotPosition, {\n toValue: (this.isRTL ? -1: 1) * position,\n ...options\n })\n ]),\n Animated.timing(this.dotScale, {\n toValue: 0,\n ...options\n }),\n ]).start();\n } \n }\n\n onSlideChange = (index: number) => {\n const prevIndex = this.state.activeIndex;\n this.updateState({\n activeIndex: index\n } as WmCarouselState,\n () => this.invokeEventCallback('onChange', [this, index, prevIndex]));\n this.animatePagination(index);\n }\n\n renderItem = (item: any, index: number) => {\n const props = this.state.props;\n if (props.type === 'dynamic') {\n return props.renderSlide ? props.renderSlide(item, index, this) : null;\n }\n return props.children[index];\n }\n\n next = () => {\n const props = this.state.props;\n const data = props.type === 'dynamic' ? props.dataset : props.children;\n if (this.state.activeIndex >= data?.length || 0) {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n } else {\n this.animationView?.goToUpper();\n }\n }\n\n prev = () => {\n this.animationView?.goToLower();\n }\n\n renderPagination(data: any) {\n const maxNoOfDots = this.state.props.maxnoofdots;\n let minIndex = Math.max(this.state.activeIndex - maxNoOfDots + 1, 0);\n let maxIndex = Math.min(minIndex + maxNoOfDots - 1, data.length);\n if (maxIndex === data.length) {\n minIndex = maxIndex - maxNoOfDots;\n }\n const dotStyle = this._showSkeleton ? {\n ...this.styles.dotStyle,\n ...this.styles.dotSkeleton.root\n } : this.styles.dotStyle\n return (<View style={this.styles.dotsWrapperStyle}>\n <View style={{flexDirection: this.isRTL ? 'row-reverse' : 'row'}}>\n {\n data.map((item: any, index: number) => {\n return index >= minIndex && index <= maxIndex ? (\n <View key={'dots_' + this.generateItemKey(item, index, this.state.props)} {...this.getTestPropsForAction('indicator'+index)}\n style={[dotStyle]}>\n </View>) : null;\n })\n }\n {\n this._showSkeleton ? null : <Animated.View style={[\n this.styles.dotStyle,\n this.styles.activeDotStyle, {\n width: undefined,\n height: undefined,\n transform: [{\n translateX: this.dotPosition\n }]\n }, this.isRTL ? { right: 0 } : { left: 0}]}>\n <Animated.View style={[{\n width: 1,\n height: 1\n }, {\n // This is failing in Android\n // minWidth: this.dotScale\n }]}>\n </Animated.View>\n </Animated.View>\n }\n </View>\n </View>);\n }\n\n public renderSkeleton(props: WmCarouselProps): React.ReactNode | null {\n return <View style={[this.styles.root, {...this.styles.skeleton.root}]}>\n {this.renderItem({}, 0)}\n {this.renderPagination([{}, {}, {}])}\n </View>\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.autoPlay();\n }\n\n renderWidget(props: WmCarouselProps) {\n const hasNavs = props.controls === 'both' || props.controls ==='navs';\n const hasDots = props.controls === 'both' || props.controls ==='indicators';\n let styles = this.styles;\n let data = props.type === 'dynamic' ? props.dataset : props.children;\n data = isArray(data) ? data : [];\n this.noOfSlides = data?.length || 0;\n let slideScale = undefined as any;\n let slideTranslateX = undefined as any;\n if (isArray(this.styles.slide?.transform)) {\n slideScale = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).scale)) as any)?.scale;\n slideTranslateX = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).translateX)) as any)?.translateX;\n }\n // TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608\n return (\n <View style={styles.root}>\n {this._background}\n <SwipeAnimation.View \n enableGestures={props.enablegestures && this.noOfSlides > 1}\n style={{\n flex: 1\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\n slideMinWidth={this.styles.slide.width}\n >\n {data.map((item: any, index: number) => {\n const isActive = index === this.state.activeIndex - 1;\n let scale = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [slideScale, slideScale, 1, slideScale, slideScale]\n });\n let translateX = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [-56, -56, 0, 56, 56]\n });\n return (\n <Animated.View key={this.generateItemKey(item, index, props)}\n onLayout={this.addSlideLayout.bind(this, index)}\n style={[\n {height: props.type === 'dynamic' ? undefined : '100%'},\n this.styles.slide,\n index === 0 ? this.styles.firstSlide : null,\n index === data.length - 1 ? this.styles.lastSlide: null,\n isActive ? this.styles.activeSlide: null,\n translateX && scale ? {\n transform: [\n {\n translateX: !isUndefined(slideTranslateX) ? slideTranslateX : translateX\n }, {\n scale: scale\n }\n ]\n } : null]}>\n <Tappable onTap={() => {\n this.onSlideChange(index + 1);\n const position = this.slidesLayout\n .filter((l , i) => i < index)\n .reduce((s, l) => s + l.width, 0);\n this.animationView?.setPosition(-1 * position);\n }} rippleColor={this.styles.root.rippleColor} styles={{height: \"100%\"}}>\n {this.renderItem(item, index)}\n </Tappable>\n </Animated.View>\n );\n })}\n </SwipeAnimation.View>\n {hasNavs ? (\n <View style={styles.btnPanel}>\n <WmIcon\n id={this.getTestId('prev_icon')}\n iconclass=\"wi wi-chevron-left fa-2x\"\n styles={styles.prevBtn}\n onTap={this.prev}\n accessibilitylabel='back'/>\n <WmIcon\n id={this.getTestId('next_icon')}\n iconclass=\"wi wi-chevron-right fa-2x\"\n styles={styles.nextBtn}\n onTap={this.next}\n accessibilitylabel='next'/>\n </View>): null}\n {hasDots && data ? this.renderPagination(data) : null}\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,EAAEC,WAAW,QAAQ,WAAW;AAChD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,QAA4C,cAAc;AACzF,SAASC,mBAAmB,QAAQ,8CAA8C;AAClF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAO,KAAKC,cAAc,MAAM,oDAAoD;AACpF,SAASC,QAAQ,QAAQ,mDAAmD;AAE5E,OAAOC,eAAe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","BaseComponent","BaseComponentState","SwipeAnimation","Tappable","WmCarouselProps","DEFAULT_CLASS","WmCarouselState","constructor","args","_defineProperty","WmCarousel","props","Value","bounds","e","_this$slidesLayout","_this$slidesLayout$ac","activeTabIndex","state","activeIndex","lower","slidesLayout","filter","l","i","reduce","s","width","center","upper","computePhase","value","_this$slidesLayout$ac2","w","Math","abs","onLower","onSlideChange","onUpper","noOfSlides","_this$animationView","animationView","setPosition","index","prevIndex","updateState","invokeEventCallback","animatePagination","item","type","renderSlide","children","data","dataset","length","_this$animationView2","_this$animationView3","goToUpper","_this$animationView4","goToLower","cleanup","push","stopPlay","addSlideLayout","nativeEvent","layout","forceUpdate","generateItemKey","itemkey","_showSkeleton","keyExtractor","getKey","autoPlay","initialized","animation","animationinterval","intervalId","setInterval","next","clearInterval","setTimeout","_this$animationView5","stopAnimation","startAnimation","onPropertyChange","name","$new","$old","_this$keyExtractor","clear","min","_this$styles$dotStyle","_this$styles$dotStyle2","_this$styles$dotStyle3","margin","styles","dotStyle","marginLeft","marginRight","size","position","max","scale","options","useNativeDriver","duration","easing","out","linear","sequence","timing","dotScale","toValue","parallel","dotPosition","isRTL","start","renderPagination","maxNoOfDots","maxnoofdots","minIndex","maxIndex","dotSkeleton","root","createElement","style","dotsWrapperStyle","flexDirection","map","_extends","key","getTestPropsForAction","activeDotStyle","undefined","height","transform","translateX","right","left","renderSkeleton","skeleton","renderItem","componentDidMount","renderWidget","_data","_this$styles$slide","hasNavs","controls","hasDots","slideScale","slideTranslateX","slide","_this$styles$slide2","_this$styles$slide3","find","o","_background","enableGestures","enablegestures","flex","direction","ref","r","handlers","animationHandlers","slideMinWidth","_this$animationView6","_this$animationView7","isActive","animationPhase","interpolate","inputRange","outputRange","onLayout","bind","testID","firstSlide","lastSlide","activeSlide","onTap","_this$animationView8","rippleColor","btnPanel","id","getTestId","iconclass","prevBtn","prev","accessibilitylabel","nextBtn"],"sources":["carousel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { isArray, isUndefined } from 'lodash-es';\nimport { Animated, Easing, View, LayoutChangeEvent, LayoutRectangle } from 'react-native';\nimport { DefaultKeyExtractor } from '@wavemaker/app-rn-runtime/core/key.extractor';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport * as SwipeAnimation from '@wavemaker/app-rn-runtime/gestures/swipe.animation';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\n\nimport WmCarouselProps from './carousel.props';\nimport { DEFAULT_CLASS, WmCarouselStyles } from './carousel.styles';\nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmCarouselState extends BaseComponentState<WmCarouselProps> {\n activeIndex = 1;\n}\n\nexport default class WmCarousel extends BaseComponent<WmCarouselProps, WmCarouselState, WmCarouselStyles> {\n\n noOfSlides: number = 0;\n private slidesLayout: LayoutRectangle[] = [];\n private keyExtractor = new DefaultKeyExtractor();\n stopPlay: Function = null as any;\n private dotScale = new Animated.Value(0);\n private dotPosition = new Animated.Value(0);\n private animationView: SwipeAnimation.View | null = null as any;\n private animationHandlers = {\n bounds: (e) => {\n const activeTabIndex = this.state.activeIndex - 1;\n let lower = 0;\n if (activeTabIndex > 0) {\n lower = this.slidesLayout\n .filter((l , i) => i < activeTabIndex - 1)\n .reduce((s, l) => s + l.width, 0);\n }\n let center = lower + (this.slidesLayout[activeTabIndex - 1]?.width || 0);\n let upper = center + (this.slidesLayout[activeTabIndex]?.width || 0);\n return {\n lower: -1 * lower,\n center: -1 * center,\n upper: -1 * upper\n };\n },\n computePhase: (value) => {\n const activeTabIndex = this.state.activeIndex - 1;\n const w = this.slidesLayout[activeTabIndex]?.width || 0;\n return w && Math.abs(value / w);\n },\n onLower: (e) => {\n this.onSlideChange(this.state.activeIndex - 1);\n },\n onUpper: (e) => {\n if(this.noOfSlides < this.state.activeIndex + 1){\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n }\n else{\n this.onSlideChange(this.state.activeIndex + 1);\n }\n }\n } as SwipeAnimation.Handlers;\n\n constructor(props: WmCarouselProps) {\n super(props, DEFAULT_CLASS, new WmCarouselProps(), new WmCarouselState());\n this.cleanup.push(() => {\n this.stopPlay && this.stopPlay();\n })\n }\n\n addSlideLayout(index: number, nativeEvent: LayoutChangeEvent) {\n this.slidesLayout[index] = nativeEvent.nativeEvent.layout;\n if (index === this.state.activeIndex) {\n this.forceUpdate();\n }\n }\n\n private generateItemKey(item: any, index: number, props: WmCarouselProps) {\n if (props.itemkey && item && !this._showSkeleton) {\n return props.itemkey(item, index);\n }\n return 'list_item_' + this.keyExtractor.getKey(item, true);\n }\n\n autoPlay() {\n if(!this.initialized){\n return;\n }\n const props = this.state.props;\n this.stopPlay && this.stopPlay();\n if (props.animation === 'auto' && props.animationinterval) {\n const intervalId = setInterval(() => {\n this.next();\n }, props.animationinterval * 1000);\n this.stopPlay = () => clearInterval(intervalId);\n } else {\n setTimeout(() => {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n }, 1000);\n }\n }\n\n stopAnimation(){ \n this.stopPlay();\n }\n startAnimation() {\n this.autoPlay();\n }\n \n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'dataset': {\n this.keyExtractor?.clear();\n this.updateState({\n activeIndex: Math.min(this.state.activeIndex, $new?.length || 1)\n } as WmCarouselState);\n break;\n }\n case 'animation':\n case 'animationinterval' : {\n this.autoPlay();\n }\n }\n }\n\n animatePagination(index: number) {\n const prevIndex = this.state.activeIndex;\n const margin = ((this.styles.dotStyle?.marginLeft as number)|| 0) + \n ((this.styles.dotStyle?.marginRight as number)|| 0)\n const width = (this.styles.dotStyle?.width as number)|| 2;\n const size = margin + width;\n const position = Math.max(index - 1, 0) * size;\n const scale = Math.abs(index - prevIndex) * size;\n const options = {\n useNativeDriver: true,\n duration: 200,\n easing: Easing.out(Easing.linear)\n };\n if (prevIndex < index) {\n Animated.sequence([\n Animated.timing(this.dotScale, {\n toValue: scale,\n ...options\n }),\n Animated.parallel([\n Animated.timing(this.dotScale, {\n toValue: 0,\n ...options\n }),\n Animated.timing(this.dotPosition, {\n toValue: (this.isRTL ? -1: 1) * position,\n ...options\n })\n ])\n ]).start();\n } else if (prevIndex > index) {\n Animated.sequence([\n Animated.parallel([\n Animated.timing(this.dotScale, {\n toValue: scale,\n ...options\n }),\n Animated.timing(this.dotPosition, {\n toValue: (this.isRTL ? -1: 1) * position,\n ...options\n })\n ]),\n Animated.timing(this.dotScale, {\n toValue: 0,\n ...options\n }),\n ]).start();\n } \n }\n\n onSlideChange = (index: number) => {\n const prevIndex = this.state.activeIndex;\n this.updateState({\n activeIndex: index\n } as WmCarouselState,\n () => this.invokeEventCallback('onChange', [this, index, prevIndex]));\n this.animatePagination(index);\n }\n\n renderItem = (item: any, index: number) => {\n const props = this.state.props;\n if (props.type === 'dynamic') {\n return props.renderSlide ? props.renderSlide(item, index, this) : null;\n }\n return props.children[index];\n }\n\n next = () => {\n const props = this.state.props;\n const data = props.type === 'dynamic' ? props.dataset : props.children;\n if (this.state.activeIndex >= data?.length || 0) {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n } else {\n this.animationView?.goToUpper();\n }\n }\n\n prev = () => {\n this.animationView?.goToLower();\n }\n\n renderPagination(data: any) {\n const maxNoOfDots = this.state.props.maxnoofdots;\n let minIndex = Math.max(this.state.activeIndex - maxNoOfDots + 1, 0);\n let maxIndex = Math.min(minIndex + maxNoOfDots - 1, data.length);\n if (maxIndex === data.length) {\n minIndex = maxIndex - maxNoOfDots;\n }\n const dotStyle = this._showSkeleton ? {\n ...this.styles.dotStyle,\n ...this.styles.dotSkeleton.root\n } : this.styles.dotStyle\n return (<View style={this.styles.dotsWrapperStyle}>\n <View style={{flexDirection: this.isRTL ? 'row-reverse' : 'row'}}>\n {\n data.map((item: any, index: number) => {\n return index >= minIndex && index <= maxIndex ? (\n <View key={'dots_' + this.generateItemKey(item, index, this.state.props)} {...this.getTestPropsForAction('indicator'+index)}\n style={[dotStyle]}>\n </View>) : null;\n })\n }\n {\n this._showSkeleton ? null : <Animated.View style={[\n this.styles.dotStyle,\n this.styles.activeDotStyle, {\n width: undefined,\n height: undefined,\n transform: [{\n translateX: this.dotPosition\n }]\n }, this.isRTL ? { right: 0 } : { left: 0}]}>\n <Animated.View style={[{\n width: 1,\n height: 1\n }, {\n // This is failing in Android\n // minWidth: this.dotScale\n }]}>\n </Animated.View>\n </Animated.View>\n }\n </View>\n </View>);\n }\n\n public renderSkeleton(props: WmCarouselProps): React.ReactNode | null {\n return <View style={[this.styles.root, {...this.styles.skeleton.root}]}>\n {this.renderItem({}, 0)}\n {this.renderPagination([{}, {}, {}])}\n </View>\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.autoPlay();\n }\n\n renderWidget(props: WmCarouselProps) {\n const hasNavs = props.controls === 'both' || props.controls ==='navs';\n const hasDots = props.controls === 'both' || props.controls ==='indicators';\n let styles = this.styles;\n let data = props.type === 'dynamic' ? props.dataset : props.children;\n data = isArray(data) ? data : [];\n this.noOfSlides = data?.length || 0;\n let slideScale = undefined as any;\n let slideTranslateX = undefined as any;\n if (isArray(this.styles.slide?.transform)) {\n slideScale = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).scale)) as any)?.scale;\n slideTranslateX = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).translateX)) as any)?.translateX;\n }\n // TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608\n return (\n <View style={styles.root}>\n {this._background}\n <SwipeAnimation.View \n enableGestures={props.enablegestures && this.noOfSlides > 1}\n style={{\n flex: 1\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\n slideMinWidth={this.styles.slide.width}\n >\n {data.map((item: any, index: number) => {\n const isActive = index === this.state.activeIndex - 1;\n let scale = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [slideScale, slideScale, 1, slideScale, slideScale]\n });\n let translateX = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [-56, -56, 0, 56, 56]\n });\n return (\n <Animated.View key={this.generateItemKey(item, index, props)}\n onLayout={this.addSlideLayout.bind(this, index)}\n testID={`carousel_item_${index}`}\n style={[\n {height: props.type === 'dynamic' ? undefined : '100%'},\n this.styles.slide,\n index === 0 ? this.styles.firstSlide : null,\n index === data.length - 1 ? this.styles.lastSlide: null,\n isActive ? this.styles.activeSlide: null,\n translateX && scale ? {\n transform: [\n {\n translateX: !isUndefined(slideTranslateX) ? slideTranslateX : translateX\n }, {\n scale: scale\n }\n ]\n } : null]}>\n <Tappable onTap={() => {\n this.onSlideChange(index + 1);\n const position = this.slidesLayout\n .filter((l , i) => i < index)\n .reduce((s, l) => s + l.width, 0);\n this.animationView?.setPosition(-1 * position);\n }} rippleColor={this.styles.root.rippleColor} styles={{height: \"100%\"}}>\n {this.renderItem(item, index)}\n </Tappable>\n </Animated.View>\n );\n })}\n </SwipeAnimation.View>\n {hasNavs ? (\n <View style={styles.btnPanel}>\n <WmIcon\n id={this.getTestId('prev_icon')}\n iconclass=\"wi wi-chevron-left fa-2x\"\n styles={styles.prevBtn}\n onTap={this.prev}\n accessibilitylabel='back'/>\n <WmIcon\n id={this.getTestId('next_icon')}\n iconclass=\"wi wi-chevron-right fa-2x\"\n styles={styles.nextBtn}\n onTap={this.next}\n accessibilitylabel='next'/>\n </View>): null}\n {hasDots && data ? this.renderPagination(data) : null}\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,EAAEC,WAAW,QAAQ,WAAW;AAChD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,QAA4C,cAAc;AACzF,SAASC,mBAAmB,QAAQ,8CAA8C;AAClF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,S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EACbxC,OAAO,IAAIhG,IAAI,GAAG,IAAI,CAACiE,gBAAgB,CAACjE,IAAI,CAAC,GAAG,IAC/C,CAAC;EACX;AACF","ignoreList":[]}
@@ -11,6 +11,7 @@ import WmAudioProps from './audio.props';
11
11
  import { DEFAULT_CLASS } from './audio.styles';
12
12
  import WmIcon from '../icon/icon.component';
13
13
  import { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';
14
+ import { createSkeleton } from '../skeleton/skeleton.component';
14
15
  export class WmAudioState extends BaseComponentState {
15
16
  constructor(...args) {
16
17
  super(...args);
@@ -194,6 +195,12 @@ export default class WmAudio extends BaseComponent {
194
195
  super.componentWillUnmount();
195
196
  this.stop();
196
197
  }
198
+ renderTextSkeleton() {
199
+ return createSkeleton(this.theme, {}, {
200
+ ...this.styles.text,
201
+ ...this.styles.textSkeleton.root
202
+ });
203
+ }
197
204
  renderWidget(props) {
198
205
  return props.controls ? /*#__PURE__*/React.createElement(View, {
199
206
  style: this.styles.root
@@ -209,7 +216,7 @@ export default class WmAudio extends BaseComponent {
209
216
  iconclass: "wi wi-pause fa-2x",
210
217
  styles: this.styles.pauseIcon,
211
218
  onTap: () => this.pause()
212
- }), /*#__PURE__*/React.createElement(Text, {
219
+ }), this._showSkeleton ? this.renderTextSkeleton() : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
213
220
  style: this.styles.text
214
221
  }, `${this.formatTime(this.state.currentTime)} / ${this.formatTime(this.state.totalTime)}`), /*#__PURE__*/React.createElement(Slider, {
215
222
  testID: this.getTestId('slider'),
@@ -226,7 +233,7 @@ export default class WmAudio extends BaseComponent {
226
233
  thumbTintColor: this.styles.slider.thumb.backgroundColor,
227
234
  minimumTrackTintColor: this.styles.slider.minimumTrack.backgroundColor,
228
235
  maximumTrackTintColor: this.styles.slider.maximumTrack.backgroundColor
229
- }), !props.muted ? /*#__PURE__*/React.createElement(WmIcon, {
236
+ })), !props.muted ? /*#__PURE__*/React.createElement(WmIcon, {
230
237
  name: props.name + "_mute",
231
238
  id: this.getTestId('mute'),
232
239
  iconclass: "wi wi-volume-up fa-2x",
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","Text","View","Slider","isString","Audio","BaseComponent","BaseComponentState","WmAudioProps","DEFAULT_CLASS","WmIcon","isWebPreviewMode","WmAudioState","constructor","args","_defineProperty","WmAudio","props","onPropertyChange","name","$new","$old","initialized","Promise","resolve","then","_this$sound","sound","unloadAsync","onSeekChange","state","playing","autoplay","play","getSource","source","loadAsset","mp3format","uri","addPadding","str","maxLen","pad","length","formatTime","v","t","mins","Math","floor","seconds","round","setTimer","cancelTimer","timer","setInterval","currentTime","totalTime","loop","replay","stop","setState","max","offsetTime","clearInterval","_this$sound2","pause","updateState","replayAsync","loading","playAsync","Sound","createAsync","isMuted","muted","res","getStatusAsync","status","catch","_this$sound3","pauseAsync","mute","setStatusAsync","unmute","time","_this$sound4","setPositionAsync","componentDidMount","setTimeout","componentWillUnmount","renderWidget","controls","createElement","style","styles","root","_background","id","getTestId","playIcon","iconclass","onTap","pauseIcon","text","testID","step","flex","value","disabled","onValueChange","bind","minimumValue","inverted","isRTL","OS","maximumValue","thumbTintColor","slider","thumb","backgroundColor","minimumTrackTintColor","minimumTrack","maximumTrackTintColor","maximumTrack","muteIcon","unmuteIcon"],"sources":["audio.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, Text, View } from 'react-native';\nimport Slider from '@react-native-community/slider';\nimport { isString } from 'lodash-es';\nimport { Audio } from 'expo-av';\nimport { Sound } from 'expo-av/build/Audio';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmAudioProps from './audio.props';\nimport { DEFAULT_CLASS, WmAudioStyles } from './audio.styles';\nimport WmIcon from '../icon/icon.component';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmAudioState extends BaseComponentState<WmAudioProps> {\n playing = false;\n currentTime = 0;\n totalTime = 0;\n}\n\nexport default class WmAudio extends BaseComponent<WmAudioProps, WmAudioState, WmAudioStyles> {\n\n private loading = false;\n private sound: Sound = null as any;\n private timer: any;\n private offsetTime = 0;\n\n constructor(props: WmAudioProps) {\n super(props, DEFAULT_CLASS, new WmAudioProps(), new WmAudioState());\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'mp3format': {\n if (this.initialized) {\n Promise.resolve()\n .then(() => this.sound?.unloadAsync())\n .then(() => {\n this.sound = null as any;\n this.onSeekChange(0);\n if (this.state.playing \n || this.state.props.autoplay) {\n this.play();\n }\n });\n }\n }\n break;\n case 'autoplay':\n if (this.initialized && $new) {\n this.play();\n }\n }\n }\n\n getSource() {\n const source = this.loadAsset \n && this.state.props.mp3format\n && this.loadAsset(this.state.props.mp3format as string);\n if (isString(source)) {\n return {\n uri: source\n };\n }\n return source;\n }\n\n addPadding(str: string, maxLen: number, pad = '0'): string {\n if (str.length < maxLen) {\n return this.addPadding(pad + str, maxLen, pad);\n }\n return str;\n }\n\n formatTime(v: number) {\n const t = v/60;\n const mins = Math.floor(t);\n const seconds = Math.round((t - mins) * 60);\n return this.addPadding(mins+ '', 2) + ':' + this.addPadding(seconds+ '', 2);\n }\n\n setTimer() {\n this.cancelTimer();\n this.timer = setInterval(() => {\n if (this.state.currentTime >= this.state.totalTime) {\n if (this.state.props.loop) {\n this.replay();\n } else {\n this.stop();\n }\n return;\n }\n this.setState({\n currentTime: Math.max(this.offsetTime + this.state.currentTime + 1, 0)\n } as WmAudioState);\n this.offsetTime = 0;\n }, 1000);\n }\n\n cancelTimer() {\n clearInterval(this.timer);\n }\n\n stop() {\n this.pause();\n this.sound?.unloadAsync();\n this.sound = null as any;\n this.cancelTimer();\n this.offsetTime = 0;\n this.updateState({\n currentTime: 0\n } as WmAudioState);\n }\n\n replay() {\n this.updateState({\n currentTime: 0\n } as WmAudioState, () => {\n this.sound.replayAsync();\n });\n }\n\n play() {\n if (isWebPreviewMode() \n || this.loading\n || (this.state.playing && this.sound)) {\n return;\n }\n if (this.sound) {\n this.sound.playAsync();\n this.setTimer();\n this.updateState({\n playing: true\n } as WmAudioState);\n } else {\n this.loading = true;\n const source = this.getSource();\n source && Audio.Sound.createAsync(source, {\n isMuted: this.state.props.muted\n })\n .then((res) => {\n this.sound = res.sound;\n this.sound.playAsync();\n this.sound.getStatusAsync().then((status: any) => {\n this.updateState({\n currentTime: 0,\n totalTime: Math.round(status['durationMillis']/1000)\n } as WmAudioState, () => this.setTimer());\n });\n this.updateState({\n playing: true\n } as WmAudioState);\n }).catch(() => {}).then(() => {\n this.loading = false;\n });\n }\n }\n\n pause() {\n this.cancelTimer();\n this.sound?.pauseAsync().then(() => {\n this.updateState({\n playing: false\n } as WmAudioState);\n })\n }\n\n mute() {\n this.sound.setStatusAsync({\n isMuted: true\n }).then(() => {\n this.updateState({\n props: {\n muted: true\n }\n } as WmAudioState);\n });\n }\n\n unmute() {\n this.sound.setStatusAsync({\n isMuted: false\n }).then(() => {\n this.updateState({\n props: {\n muted: false\n }\n } as WmAudioState);\n });\n }\n\n onSeekChange(time: number) {\n if (time !== this.state.currentTime) {\n this.offsetTime = time - this.state.currentTime;\n this.sound?.setPositionAsync(time * 1000);\n }\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n //without settimeout, app is crashing with errors\n setTimeout(() => {\n if (this.state.props.autoplay) {\n this.play();\n }\n }, 1000);\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.stop();\n }\n\n renderWidget(props: WmAudioProps) {\n return props.controls ? (\n <View style={this.styles.root}>\n {this._background}\n {!this.state.playing ? (<WmIcon \n id={this.getTestId('play')}\n name={props.name + \"_play\"}\n styles={this.styles.playIcon}\n iconclass=\"wi wi-play-arrow fa-2x\"\n onTap={() => this.play()}></WmIcon>) : (\n <WmIcon name={props.name + \"_pause\"}\n id={this.getTestId('pause')}\n iconclass=\"wi wi-pause fa-2x\"\n styles={this.styles.pauseIcon}\n onTap={() => this.pause()}></WmIcon>)}\n <Text style={this.styles.text}>\n {`${this.formatTime(this.state.currentTime)} / ${this.formatTime(this.state.totalTime)}`}\n </Text>\n <Slider\n testID={this.getTestId('slider')}\n step={1}\n style={{flex: 1}}\n value={this.state.currentTime}\n disabled={isWebPreviewMode()}\n onValueChange={this.onSeekChange.bind(this)}\n minimumValue={0}\n inverted={this.isRTL && (Platform.OS==\"android\" || Platform.OS==\"web\")}\n maximumValue={this.state.totalTime || 1}\n thumbTintColor={this.styles.slider.thumb.backgroundColor as string}\n minimumTrackTintColor={this.styles.slider.minimumTrack.backgroundColor as string}\n maximumTrackTintColor={this.styles.slider.maximumTrack.backgroundColor as string}\n />\n {!props.muted ? (<WmIcon name={props.name + \"_mute\"}\n id={this.getTestId('mute')}\n iconclass=\"wi wi-volume-up fa-2x\"\n styles={this.styles.muteIcon}\n onTap={() => this.mute()}></WmIcon>) :\n (<WmIcon name={props.name + \"_unmute\"}\n id={this.getTestId('unmute')}\n iconclass=\"wi wi-volume-off fa-2x\"\n styles={this.styles.unmuteIcon}\n onTap={() => this.unmute()}></WmIcon>)}\n </View>) : null; \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACnD,OAAOC,MAAM,MAAM,gCAAgC;AACnD,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAASC,KAAK,QAAQ,SAAS;AAE/B,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,OAAOC,MAAM,MAAM,wBAAwB;AAC3C,SAASC,gBAAgB,QAAQ,sCAAsC;AAEvE,OAAO,MAAMC,YAAY,SAASL,kBAAkB,CAAe;EAAAM,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBACvD,KAAK;IAAAA,eAAA,sBAC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B;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Platform","Text","View","Slider","isString","Audio","BaseComponent","BaseComponentState","WmAudioProps","DEFAULT_CLASS","WmIcon","isWebPreviewMode","createSkeleton","WmAudioState","constructor","args","_defineProperty","WmAudio","props","onPropertyChange","name","$new","$old","initialized","Promise","resolve","then","_this$sound","sound","unloadAsync","onSeekChange","state","playing","autoplay","play","getSource","source","loadAsset","mp3format","uri","addPadding","str","maxLen","pad","length","formatTime","v","t","mins","Math","floor","seconds","round","setTimer","cancelTimer","timer","setInterval","currentTime","totalTime","loop","replay","stop","setState","max","offsetTime","clearInterval","_this$sound2","pause","updateState","replayAsync","loading","playAsync","Sound","createAsync","isMuted","muted","res","getStatusAsync","status","catch","_this$sound3","pauseAsync","mute","setStatusAsync","unmute","time","_this$sound4","setPositionAsync","componentDidMount","setTimeout","componentWillUnmount","renderTextSkeleton","theme","styles","text","textSkeleton","root","renderWidget","controls","createElement","style","_background","id","getTestId","playIcon","iconclass","onTap","pauseIcon","_showSkeleton","Fragment","testID","step","flex","value","disabled","onValueChange","bind","minimumValue","inverted","isRTL","OS","maximumValue","thumbTintColor","slider","thumb","backgroundColor","minimumTrackTintColor","minimumTrack","maximumTrackTintColor","maximumTrack","muteIcon","unmuteIcon"],"sources":["audio.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Platform, Text, View } from 'react-native';\nimport Slider from '@react-native-community/slider';\nimport { isString } from 'lodash-es';\nimport { Audio } from 'expo-av';\nimport { Sound } from 'expo-av/build/Audio';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmAudioProps from './audio.props';\nimport { DEFAULT_CLASS, WmAudioStyles } from './audio.styles';\nimport WmIcon from '../icon/icon.component';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { createSkeleton } from '../skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport class WmAudioState extends BaseComponentState<WmAudioProps> {\n playing = false;\n currentTime = 0;\n totalTime = 0;\n}\n\nexport default class WmAudio extends BaseComponent<WmAudioProps, WmAudioState, WmAudioStyles> {\n\n private loading = false;\n private sound: Sound = null as any;\n private timer: any;\n private offsetTime = 0;\n\n constructor(props: WmAudioProps) {\n super(props, DEFAULT_CLASS, new WmAudioProps(), new WmAudioState());\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'mp3format': {\n if (this.initialized) {\n Promise.resolve()\n .then(() => this.sound?.unloadAsync())\n .then(() => {\n this.sound = null as any;\n this.onSeekChange(0);\n if (this.state.playing \n || this.state.props.autoplay) {\n this.play();\n }\n });\n }\n }\n break;\n case 'autoplay':\n if (this.initialized && $new) {\n this.play();\n }\n }\n }\n\n getSource() {\n const source = this.loadAsset \n && this.state.props.mp3format\n && this.loadAsset(this.state.props.mp3format as string);\n if (isString(source)) {\n return {\n uri: source\n };\n }\n return source;\n }\n\n addPadding(str: string, maxLen: number, pad = '0'): string {\n if (str.length < maxLen) {\n return this.addPadding(pad + str, maxLen, pad);\n }\n return str;\n }\n\n formatTime(v: number) {\n const t = v/60;\n const mins = Math.floor(t);\n const seconds = Math.round((t - mins) * 60);\n return this.addPadding(mins+ '', 2) + ':' + this.addPadding(seconds+ '', 2);\n }\n\n setTimer() {\n this.cancelTimer();\n this.timer = setInterval(() => {\n if (this.state.currentTime >= this.state.totalTime) {\n if (this.state.props.loop) {\n this.replay();\n } else {\n this.stop();\n }\n return;\n }\n this.setState({\n currentTime: Math.max(this.offsetTime + this.state.currentTime + 1, 0)\n } as WmAudioState);\n this.offsetTime = 0;\n }, 1000);\n }\n\n cancelTimer() {\n clearInterval(this.timer);\n }\n\n stop() {\n this.pause();\n this.sound?.unloadAsync();\n this.sound = null as any;\n this.cancelTimer();\n this.offsetTime = 0;\n this.updateState({\n currentTime: 0\n } as WmAudioState);\n }\n\n replay() {\n this.updateState({\n currentTime: 0\n } as WmAudioState, () => {\n this.sound.replayAsync();\n });\n }\n\n play() {\n if (isWebPreviewMode() \n || this.loading\n || (this.state.playing && this.sound)) {\n return;\n }\n if (this.sound) {\n this.sound.playAsync();\n this.setTimer();\n this.updateState({\n playing: true\n } as WmAudioState);\n } else {\n this.loading = true;\n const source = this.getSource();\n source && Audio.Sound.createAsync(source, {\n isMuted: this.state.props.muted\n })\n .then((res) => {\n this.sound = res.sound;\n this.sound.playAsync();\n this.sound.getStatusAsync().then((status: any) => {\n this.updateState({\n currentTime: 0,\n totalTime: Math.round(status['durationMillis']/1000)\n } as WmAudioState, () => this.setTimer());\n });\n this.updateState({\n playing: true\n } as WmAudioState);\n }).catch(() => {}).then(() => {\n this.loading = false;\n });\n }\n }\n\n pause() {\n this.cancelTimer();\n this.sound?.pauseAsync().then(() => {\n this.updateState({\n playing: false\n } as WmAudioState);\n })\n }\n\n mute() {\n this.sound.setStatusAsync({\n isMuted: true\n }).then(() => {\n this.updateState({\n props: {\n muted: true\n }\n } as WmAudioState);\n });\n }\n\n unmute() {\n this.sound.setStatusAsync({\n isMuted: false\n }).then(() => {\n this.updateState({\n props: {\n muted: false\n }\n } as WmAudioState);\n });\n }\n\n onSeekChange(time: number) {\n if (time !== this.state.currentTime) {\n this.offsetTime = time - this.state.currentTime;\n this.sound?.setPositionAsync(time * 1000);\n }\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n //without settimeout, app is crashing with errors\n setTimeout(() => {\n if (this.state.props.autoplay) {\n this.play();\n }\n }, 1000);\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.stop();\n }\n\n public renderTextSkeleton(): React.ReactNode {\n return (\n createSkeleton(this.theme, {} as WmSkeletonStyles, {\n ...this.styles.text,\n ...this.styles.textSkeleton.root\n }\n )\n )\n } \n renderWidget(props: WmAudioProps) {\n return props.controls ? (\n <View style={this.styles.root}>\n {this._background}\n {!this.state.playing ? (<WmIcon \n id={this.getTestId('play')}\n name={props.name + \"_play\"}\n styles={this.styles.playIcon}\n iconclass=\"wi wi-play-arrow fa-2x\"\n onTap={() => this.play()}></WmIcon>) : (\n <WmIcon name={props.name + \"_pause\"}\n id={this.getTestId('pause')}\n iconclass=\"wi wi-pause fa-2x\"\n styles={this.styles.pauseIcon}\n onTap={() => this.pause()}></WmIcon>)}\n {\n this._showSkeleton ? this.renderTextSkeleton() : \n <>\n <Text style={this.styles.text}>\n {`${this.formatTime(this.state.currentTime)} / ${this.formatTime(this.state.totalTime)}`}\n </Text>\n <Slider\n testID={this.getTestId('slider')}\n step={1}\n style={{flex: 1}}\n value={this.state.currentTime}\n disabled={isWebPreviewMode()}\n onValueChange={this.onSeekChange.bind(this)}\n minimumValue={0}\n inverted={this.isRTL && (Platform.OS==\"android\" || Platform.OS==\"web\")}\n maximumValue={this.state.totalTime || 1}\n thumbTintColor={this.styles.slider.thumb.backgroundColor as string}\n minimumTrackTintColor={this.styles.slider.minimumTrack.backgroundColor as string}\n maximumTrackTintColor={this.styles.slider.maximumTrack.backgroundColor as string}\n />\n </>\n }\n {!props.muted ? (<WmIcon name={props.name + \"_mute\"}\n id={this.getTestId('mute')}\n iconclass=\"wi wi-volume-up fa-2x\"\n styles={this.styles.muteIcon}\n onTap={() => this.mute()}></WmIcon>) :\n (<WmIcon name={props.name + \"_unmute\"}\n id={this.getTestId('unmute')}\n iconclass=\"wi wi-volume-off fa-2x\"\n styles={this.styles.unmuteIcon}\n onTap={() => this.unmute()}></WmIcon>)}\n </View>) : null; \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,QAAQ,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACnE,OAAOC,MAAM,MAAM,gCAAgC;AACnD,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAASC,KAAK,QAAQ,SAAS;AAE/B,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB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AAI,EAAEF,KAAK,CAACE,IAAI,GAAG,OAAQ;MAClDkF,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,MAAM,CAAE;MAC3BE,SAAS,EAAC,uBAAuB;MACjCZ,MAAM,EAAE,IAAI,CAACA,MAAM,CAACqC,QAAS;MAC7BxB,KAAK,EAAEA,CAAA,KAAM,IAAI,CAACxB,IAAI,CAAC;IAAE,CAAS,CAAC,gBACpCnF,KAAA,CAAAoG,aAAA,CAACzF,MAAM;MAACU,IAAI,EAAEF,KAAK,CAACE,IAAI,GAAG,SAAU;MACpCkF,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,QAAQ,CAAE;MAC7BE,SAAS,EAAC,wBAAwB;MAClCZ,MAAM,EAAE,IAAI,CAACA,MAAM,CAACsC,UAAW;MAC/BzB,KAAK,EAAEA,CAAA,KAAM,IAAI,CAACtB,MAAM,CAAC;IAAE,CAAS,CAClC,CAAC,GAAI,IAAI;EACnB;AACF","ignoreList":[]}
@@ -54,6 +54,13 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
54
54
  thumb: {
55
55
  backgroundColor: themeVariables.defaultColor3
56
56
  }
57
+ },
58
+ textSkeleton: {
59
+ root: {
60
+ width: 200,
61
+ height: 16,
62
+ borderRadius: 4
63
+ }
57
64
  }
58
65
  });
59
66
  addStyle(DEFAULT_CLASS, '', defaultStyles);
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","Color","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","backgroundColor","defaultColorF","flexDirection","justifyContent","alignItems","paddingHorizontal","paddingVertical","borderRadius","minWidth","text","color","defaultColor3","playIcon","icon","pauseIcon","muteIcon","unmuteIcon","slider","flex","display","minimumTrack","maximumTrack","lighten","rgb","toString","thumb"],"sources":["audio.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 { WmSliderStyles } from '../../input/slider/slider.styles';\nimport { WmIconStyles } from '../icon/icon.styles';\nimport Color from 'color';\n\nexport type WmAudioStyles = BaseStyles & {\n playIcon: WmIconStyles\n pauseIcon: WmIconStyles\n muteIcon: WmIconStyles\n unmuteIcon: WmIconStyles\n slider: WmSliderStyles\n};\n\nexport const DEFAULT_CLASS = 'app-audio';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = defineStyles<WmAudioStyles>({\n root: {\n backgroundColor: themeVariables.defaultColorF,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderRadius: 64,\n minWidth: 300\n },\n text: {\n color: themeVariables.defaultColor3,\n paddingHorizontal: 8\n },\n playIcon: {\n icon: {\n color: themeVariables.defaultColor3\n }\n },\n pauseIcon: {\n icon: {\n color: themeVariables.defaultColor3\n }\n },\n muteIcon: {\n icon: {\n color: themeVariables.defaultColor3\n }\n },\n unmuteIcon: {\n icon: {\n color: themeVariables.defaultColor3\n }\n },\n slider: {\n root: {\n flex: 1\n },\n text: {\n display: 'none'\n },\n minimumTrack: {\n backgroundColor: themeVariables.defaultColor3\n },\n maximumTrack: {\n backgroundColor: Color(themeVariables.defaultColor3).lighten(0.8).rgb().toString()\n },\n thumb: {\n backgroundColor: themeVariables.defaultColor3\n }\n } as WmSliderStyles\n } as WmAudioStyles);\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAGxF,OAAOC,KAAK,MAAM,OAAO;AAUzB,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAa,GAAGN,YAAY,CAAgB;IAC9CO,IAAI,EAAE;MACFC,eAAe,EAAEJ,cAAc,CAACK,aAAa;MAC7CC,aAAa,EAAE,KAAK;MACpBC,cAAc,EAAE,eAAe;MAC/BC,UAAU,EAAE,QAAQ;MACpBC,iBAAiB,EAAE,EAAE;MACrBC,eAAe,EAAE,CAAC;MAClBC,YAAY,EAAE,EAAE;MAChBC,QAAQ,EAAE;IACd,CAAC;IACDC,IAAI,EAAE;MACFC,KAAK,EAAEd,cAAc,CAACe,aAAa;MACnCN,iBAAiB,EAAE;IACvB,CAAC;IACDO,QAAQ,EAAE;MACNC,IAAI,EAAE;QACFH,KAAK,EAAEd,cAAc,CAACe;MAC1B;IACJ,CAAC;IACDG,SAAS,EAAE;MACPD,IAAI,EAAE;QACFH,KAAK,EAAEd,cAAc,CAACe;MAC1B;IACJ,CAAC;IACDI,QAAQ,EAAE;MACNF,IAAI,EAAE;QACFH,KAAK,EAAEd,cAAc,CAACe;MAC1B;IACJ,CAAC;IACDK,UAAU,EAAE;MACRH,IAAI,EAAE;QACFH,KAAK,EAAEd,cAAc,CAACe;MAC1B;IACJ,CAAC;IACDM,MAAM,EAAE;MACJlB,IAAI,EAAE;QACFmB,IAAI,EAAE;MACV,CAAC;MACDT,IAAI,EAAE;QACFU,OAAO,EAAE;MACb,CAAC;MACDC,YAAY,EAAE;QACVpB,eAAe,EAAEJ,cAAc,CAACe;MACpC,CAAC;MACDU,YAAY,EAAE;QACVrB,eAAe,EAAEP,KAAK,CAACG,cAAc,CAACe,aAAa,CAAC,CAACW,OAAO,CAAC,GAAG,CAAC,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC;MACrF,CAAC;MACDC,KAAK,EAAE;QACHzB,eAAe,EAAEJ,cAAc,CAACe;MACpC;IACJ;EACJ,CAAkB,CAAC;EACnBd,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","Color","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","backgroundColor","defaultColorF","flexDirection","justifyContent","alignItems","paddingHorizontal","paddingVertical","borderRadius","minWidth","text","color","defaultColor3","playIcon","icon","pauseIcon","muteIcon","unmuteIcon","slider","flex","display","minimumTrack","maximumTrack","lighten","rgb","toString","thumb","textSkeleton","width","height"],"sources":["audio.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 { WmSliderStyles } from '../../input/slider/slider.styles';\nimport { WmIconStyles } from '../icon/icon.styles';\nimport Color from 'color';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmAudioStyles = BaseStyles & {\n playIcon: WmIconStyles\n pauseIcon: WmIconStyles\n muteIcon: WmIconStyles\n unmuteIcon: WmIconStyles\n slider: WmSliderStyles\n textSkeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-audio';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = defineStyles<WmAudioStyles>({\n root: {\n backgroundColor: themeVariables.defaultColorF,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderRadius: 64,\n minWidth: 300\n },\n text: {\n color: themeVariables.defaultColor3,\n paddingHorizontal: 8\n },\n playIcon: {\n icon: {\n color: themeVariables.defaultColor3\n }\n },\n pauseIcon: {\n icon: {\n color: themeVariables.defaultColor3\n }\n },\n muteIcon: {\n icon: {\n color: themeVariables.defaultColor3\n }\n },\n unmuteIcon: {\n icon: {\n color: themeVariables.defaultColor3\n }\n },\n slider: {\n root: {\n flex: 1\n },\n text: {\n display: 'none'\n },\n minimumTrack: {\n backgroundColor: themeVariables.defaultColor3\n },\n maximumTrack: {\n backgroundColor: Color(themeVariables.defaultColor3).lighten(0.8).rgb().toString()\n },\n thumb: {\n backgroundColor: themeVariables.defaultColor3\n }\n } as WmSliderStyles,\n textSkeleton: {\n root: {\n width: 200,\n height: 16,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eAAe,EAAEP,KAAK,CAACG,cAAc,CAACe,aAAa,CAAC,CAACW,OAAO,CAAC,GAAG,CAAC,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC;MACrF,CAAC;MACDC,KAAK,EAAE;QACHzB,eAAe,EAAEJ,cAAc,CAACe;MACpC;IACJ,CAAmB;IACnBe,YAAY,EAAE;MACV3B,IAAI,EAAE;QACF4B,KAAK,EAAE,GAAG;QACVC,MAAM,EAAE,EAAE;QACVrB,YAAY,EAAE;MAClB;IACF;EACN,CAAkB,CAAC;EACnBV,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC","ignoreList":[]}
@@ -19,7 +19,7 @@ export default class WmCustom extends BaseComponent {
19
19
  renderWidget(props) {
20
20
  return /*#__PURE__*/React.createElement(View, {
21
21
  style: this.styles.root
22
- }, props.renderview(props));
22
+ }, this._background, props.renderview(props));
23
23
  }
24
24
  }
25
25
  //# sourceMappingURL=custom.component.js.map
@@ -1 +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","createElement","style","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 { DimensionValue, 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) as DimensionValue,\n height: (this.props.skeletonheight || this.styles.root.height) as DimensionValue\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,SAA+BC,IAAI,QAAQ,cAAc;AACzD,SAASC,cAAc,QAAQ,gCAAgC;AAG/D,OAAO,MAAMC,aAAa,SAASL,kBAAkB,CAAgB;AAErE,eAAe,MAAMM,QAAQ,SAASP,aAAa,CAA+C;EAEhGQ,WAAWA,CAACC,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,EAAE,IAAII,aAAa,CAAC,CAAC,CAAC;EACvE;EAEOI,cAAcA,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,EAAG,IAAI,CAACP,KAAK,CAACQ,aAAa,IAAI,IAAI,CAACJ,MAAM,CAACE,IAAI,CAACC,KAAwB;MAC7EE,MAAM,EAAG,IAAI,CAACT,KAAK,CAACU,cAAc,IAAI,IAAI,CAACN,MAAM,CAACE,IAAI,CAACG;IACzD,CAAC,CAAC;EACJ;EAEAE,YAAYA,CAACX,KAAoB,EAAE;IACjC,oBACEV,KAAA,CAAAsB,aAAA,CAACjB,IAAI;MAACkB,KAAK,EAAE,IAAI,CAACT,MAAM,CAACE;IAAK,GAC3BN,KAAK,CAACc,UAAU,CAACd,KAAK,CACnB,CAAC;EAEX;AACF","ignoreList":[]}
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","createElement","style","_background","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 { DimensionValue, 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) as DimensionValue,\n height: (this.props.skeletonheight || this.styles.root.height) as DimensionValue\n });\n }\n\n renderWidget(props: WmCustomProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\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,SAA+BC,IAAI,QAAQ,cAAc;AACzD,SAASC,cAAc,QAAQ,gCAAgC;AAG/D,OAAO,MAAMC,aAAa,SAASL,kBAAkB,CAAgB;AAErE,eAAe,MAAMM,QAAQ,SAASP,aAAa,CAA+C;EAEhGQ,WAAWA,CAACC,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,EAAE,IAAII,aAAa,CAAC,CAAC,CAAC;EACvE;EAEOI,cAAcA,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,EAAG,IAAI,CAACP,KAAK,CAACQ,aAAa,IAAI,IAAI,CAACJ,MAAM,CAACE,IAAI,CAACC,KAAwB;MAC7EE,MAAM,EAAG,IAAI,CAACT,KAAK,CAACU,cAAc,IAAI,IAAI,CAACN,MAAM,CAACE,IAAI,CAACG;IACzD,CAAC,CAAC;EACJ;EAEAE,YAAYA,CAACX,KAAoB,EAAE;IACjC,oBACEV,KAAA,CAAAsB,aAAA,CAACjB,IAAI;MAACkB,KAAK,EAAE,IAAI,CAACT,MAAM,CAACE;IAAK,GAC3B,IAAI,CAACQ,WAAW,EAChBd,KAAK,CAACe,UAAU,CAACf,KAAK,CACnB,CAAC;EAEX;AACF","ignoreList":[]}
@@ -95,7 +95,9 @@ export default class WmLottie extends BaseComponent {
95
95
  this.loadAnimationData();
96
96
  }
97
97
  renderWebLottie(props) {
98
- const Lottie = require('react-lottie-player');
98
+ var _Lottie;
99
+ let Lottie = Platform.OS == 'web' ? require('react-lottie-player') : null;
100
+ Lottie = ((_Lottie = Lottie) === null || _Lottie === void 0 ? void 0 : _Lottie.default) || Lottie;
99
101
  return /*#__PURE__*/React.createElement(Lottie, {
100
102
  animationData: this.state.animationData,
101
103
  ref: this.lottie,
@@ -1 +1 @@
1
- {"version":3,"names":["React","axios","Platform","View","LottieView","BaseComponent","BaseComponentState","WmLottieProps","DEFAULT_CLASS","WmLottieState","constructor","args","_defineProperty","WmLottie","props","createRef","play","lottie","current","state","isCompleted","reset","invokeEventCallback","proxy","pause","goToAndPlay","updateState","onReady","autoplay","loadAnimationData","animationData","loadAsset","OS","url","source","get","then","data","onPropertyChange","name","$new","$old","initialized","setTimeout","componentDidMount","renderWebLottie","Lottie","require","createElement","ref","loop","speed","style","styles","content","onComplete","renderNativeLottie","autoPlay","onAnimationFinish","renderWidget","root","_background"],"sources":["lottie.component.tsx"],"sourcesContent":["import React from 'react';\nimport axios from 'axios';\nimport { Platform, View } from 'react-native';\nimport LottieView from 'lottie-react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLottieProps from './lottie.props';\nimport { DEFAULT_CLASS, WmLottieStyles } from './lottie.styles';\n\nexport class WmLottieState extends BaseComponentState<WmLottieProps> {\n animationData: any;\n isCompleted = false;\n}\n\nexport default class WmLottie extends BaseComponent<WmLottieProps, WmLottieState, WmLottieStyles> {\n\n private lottie = React.createRef<LottieView>();\n\n constructor(props: WmLottieProps) {\n super(props, DEFAULT_CLASS, new WmLottieProps(), new WmLottieState());\n }\n \n play() {\n if (this.lottie.current) {\n if (this.state.isCompleted) {\n this.reset();\n } else {\n this.lottie.current.play();\n this.invokeEventCallback('onPlay', [null, this.proxy]);\n }\n }\n }\n\n pause() {\n if (this.lottie.current) {\n this.lottie.current.pause();\n this.invokeEventCallback('onPause', [null, this.proxy]);\n }\n }\n\n reset() {\n if (this.lottie.current) {\n if (this.lottie.current.reset) {\n this.lottie.current.reset();\n this.lottie.current.play();\n } else if((this.lottie.current as any).goToAndPlay) {\n (this.lottie.current as any).goToAndPlay(0);\n } else {\n return;\n }\n this.invokeEventCallback('onPlay', [null, this.proxy]);\n this.updateState({\n isCompleted: false\n } as WmLottieState);\n }\n \n }\n\n private onReady() {\n this.invokeEventCallback('onReady', [null, this.proxy]);\n if (this.state.props.autoplay) {\n this.invokeEventCallback('onPlay', [null, this.proxy]);\n }\n }\n\n private loadAnimationData() {\n if (this.state.animationData || ! this.loadAsset) {\n return;\n }\n if (Platform.OS == 'web') {\n const url = this.loadAsset(this.state.props.source) as string;\n axios.get(url).then(({data}) => {\n this.updateState({\n animationData: data\n } as WmLottieState, () => this.onReady());\n });\n } else {\n this.updateState({\n animationData: this.loadAsset(this.state.props.source)\n } as WmLottieState, () => this.onReady());\n }\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'src':\n this.loadAnimationData();\n break;\n case 'loop':\n if (this.initialized && \n !this.state.isCompleted && \n ($new || this.state.props.autoplay)) {\n setTimeout(() => this.reset(), 200);\n }\n break;\n }\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.loadAnimationData();\n }\n\n private renderWebLottie(props: WmLottieProps) {\n const Lottie = require('react-lottie-player');\n return (<Lottie \n animationData={this.state.animationData}\n ref= {this.lottie}\n loop={props.loop}\n play={props.autoplay}\n speed={props.speed}\n style={this.styles.content}\n onComplete={() => {\n this.updateState({\n isCompleted: true\n } as WmLottieState);\n this.invokeEventCallback('onComplete', [null, this.proxy]);\n }}/>);\n }\n\n private renderNativeLottie(props: WmLottieProps) {\n return (\n <LottieView\n source={this.state.animationData}\n ref= {this.lottie}\n autoPlay={props.autoplay}\n speed={props.speed}\n loop={props.loop}\n style={this.styles.content}\n onAnimationFinish={() => {\n this.updateState({\n isCompleted: true\n } as WmLottieState);\n this.invokeEventCallback('onComplete', [null, this.proxy]);\n }}\n />\n );\n }\n\n renderWidget(props: WmLottieProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n {this.state.animationData ? \n (Platform.OS == 'web' ? this.renderWebLottie(props) : this.renderNativeLottie(props)) \n : null \n }\n </View>); \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AAC7C,OAAOC,UAAU,MAAM,qBAAqB;AAC5C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAE/D,OAAO,MAAMC,aAAa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EAAE,IAAI,CAACC,KAAK,CAAC,CAAC;MAC5D;IAAE,CAAC,CAAC;EACR;EAEQiC,kBAAkBA,CAAC1C,KAAoB,EAAE;IAC/C,oBACEd,KAAA,CAAAgD,aAAA,CAAC5C,UAAU;MACP8B,MAAM,EAAE,IAAI,CAACf,KAAK,CAACW,aAAc;MACjCmB,GAAG,EAAG,IAAI,CAAChC,MAAO;MAClBwC,QAAQ,EAAE3C,KAAK,CAACc,QAAS;MACzBuB,KAAK,EAAErC,KAAK,CAACqC,KAAM;MACnBD,IAAI,EAAEpC,KAAK,CAACoC,IAAK;MACjBE,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC,OAAQ;MAC3BI,iBAAiB,EAAEA,CAAA,KAAM;QACvB,IAAI,CAAChC,WAAW,CAAC;UACfN,WAAW,EAAE;QACf,CAAkB,CAAC;QACnB,IAAI,CAACE,mBAAmB,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,CAACC,KAAK,CAAC,CAAC;MAC5D;IAAE,CACH,CAAC;EAER;EAEAoC,YAAYA,CAAC7C,KAAoB,EAAE;IACjC,oBACEd,KAAA,CAAAgD,aAAA,CAAC7C,IAAI;MAACiD,KAAK,EAAE,IAAI,CAACC,MAAM,CAACO;IAAK,GAC3B,IAAI,CAACC,WAAW,EAChB,IAAI,CAAC1C,KAAK,CAACW,aAAa,GACtB5B,QAAQ,CAAC8B,EAAE,IAAI,KAAK,GAAI,IAAI,CAACa,eAAe,CAAC/B,KAAK,CAAC,GAAG,IAAI,CAAC0C,kBAAkB,CAAC1C,KAAK,CAAC,GACnF,IAEA,CAAC;EACX;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","axios","Platform","View","LottieView","BaseComponent","BaseComponentState","WmLottieProps","DEFAULT_CLASS","WmLottieState","constructor","args","_defineProperty","WmLottie","props","createRef","play","lottie","current","state","isCompleted","reset","invokeEventCallback","proxy","pause","goToAndPlay","updateState","onReady","autoplay","loadAnimationData","animationData","loadAsset","OS","url","source","get","then","data","onPropertyChange","name","$new","$old","initialized","setTimeout","componentDidMount","renderWebLottie","_Lottie","Lottie","require","default","createElement","ref","loop","speed","style","styles","content","onComplete","renderNativeLottie","autoPlay","onAnimationFinish","renderWidget","root","_background"],"sources":["lottie.component.tsx"],"sourcesContent":["import React from 'react';\nimport axios from 'axios';\nimport { Platform, View } from 'react-native';\nimport LottieView from 'lottie-react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLottieProps from './lottie.props';\nimport { DEFAULT_CLASS, WmLottieStyles } from './lottie.styles';\n\nexport class WmLottieState extends BaseComponentState<WmLottieProps> {\n animationData: any;\n isCompleted = false;\n}\n\nexport default class WmLottie extends BaseComponent<WmLottieProps, WmLottieState, WmLottieStyles> {\n\n private lottie = React.createRef<LottieView>();\n\n constructor(props: WmLottieProps) {\n super(props, DEFAULT_CLASS, new WmLottieProps(), new WmLottieState());\n }\n \n play() {\n if (this.lottie.current) {\n if (this.state.isCompleted) {\n this.reset();\n } else {\n this.lottie.current.play();\n this.invokeEventCallback('onPlay', [null, this.proxy]);\n }\n }\n }\n\n pause() {\n if (this.lottie.current) {\n this.lottie.current.pause();\n this.invokeEventCallback('onPause', [null, this.proxy]);\n }\n }\n\n reset() {\n if (this.lottie.current) {\n if (this.lottie.current.reset) {\n this.lottie.current.reset();\n this.lottie.current.play();\n } else if((this.lottie.current as any).goToAndPlay) {\n (this.lottie.current as any).goToAndPlay(0);\n } else {\n return;\n }\n this.invokeEventCallback('onPlay', [null, this.proxy]);\n this.updateState({\n isCompleted: false\n } as WmLottieState);\n }\n \n }\n\n private onReady() {\n this.invokeEventCallback('onReady', [null, this.proxy]);\n if (this.state.props.autoplay) {\n this.invokeEventCallback('onPlay', [null, this.proxy]);\n }\n }\n\n private loadAnimationData() {\n if (this.state.animationData || ! this.loadAsset) {\n return;\n }\n if (Platform.OS == 'web') {\n const url = this.loadAsset(this.state.props.source) as string;\n axios.get(url).then(({data}) => {\n this.updateState({\n animationData: data\n } as WmLottieState, () => this.onReady());\n });\n } else {\n this.updateState({\n animationData: this.loadAsset(this.state.props.source)\n } as WmLottieState, () => this.onReady());\n }\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'src':\n this.loadAnimationData();\n break;\n case 'loop':\n if (this.initialized && \n !this.state.isCompleted && \n ($new || this.state.props.autoplay)) {\n setTimeout(() => this.reset(), 200);\n }\n break;\n }\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.loadAnimationData();\n }\n\n private renderWebLottie(props: WmLottieProps) {\n let Lottie = Platform.OS == 'web' ? require('react-lottie-player') : null;\n Lottie = Lottie?.default || Lottie;\n return (<Lottie \n animationData={this.state.animationData}\n ref= {this.lottie}\n loop={props.loop}\n play={props.autoplay}\n speed={props.speed}\n style={this.styles.content}\n onComplete={() => {\n this.updateState({\n isCompleted: true\n } as WmLottieState);\n this.invokeEventCallback('onComplete', [null, this.proxy]);\n }}/>);\n }\n\n private renderNativeLottie(props: WmLottieProps) {\n return (\n <LottieView\n source={this.state.animationData}\n ref= {this.lottie}\n autoPlay={props.autoplay}\n speed={props.speed}\n loop={props.loop}\n style={this.styles.content}\n onAnimationFinish={() => {\n this.updateState({\n isCompleted: true\n } as WmLottieState);\n this.invokeEventCallback('onComplete', [null, this.proxy]);\n }}\n />\n );\n }\n\n renderWidget(props: WmLottieProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n {this.state.animationData ? \n (Platform.OS == 'web' ? this.renderWebLottie(props) : this.renderNativeLottie(props)) \n : null \n }\n </View>); \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AAC7C,OAAOC,UAAU,MAAM,qBAAqB;AAC5C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,aAAa,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EA,CAAC;EACX;AACF","ignoreList":[]}
@@ -329,7 +329,7 @@ export default class WmSearch extends BaseDatasetComponent {
329
329
  }) : null), props.showSearchIcon && props.type === 'search' ? /*#__PURE__*/React.createElement(WmButton, {
330
330
  styles: this.styles.searchButton,
331
331
  id: this.getTestId('search'),
332
- iconclass: 'wm-sl-l sl-search',
332
+ iconclass: props.iconclass,
333
333
  onTap: this.searchIconPress.bind(this)
334
334
  }) : null)
335
335
  );