@wavemaker/app-rn-runtime 12.0.0-next.141195 → 12.0.0-next.141937
Sign up to get free protection for your applications and to get access to all the features.
- app-rn-runtime/components/advanced/carousel/carousel.component.js +1 -0
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js +3 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +1 -1
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +1 -0
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js +2 -0
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +8 -1
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.props.js +1 -0
- app-rn-runtime/components/container/container.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +1 -0
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +3 -1
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +46 -10
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +16 -3
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +2 -2
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js +3 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +3 -1
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +6 -1
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +4 -3
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +3 -1
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +3 -0
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +12 -7
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js +1 -0
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js +6 -0
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +5 -2
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +1 -0
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js +3 -0
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +3 -1
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.styles.js +3 -0
- app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
- app-rn-runtime/components/page/content/content.component.js +4 -19
- app-rn-runtime/components/page/content/content.component.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js +4 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +43 -12
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/core/AppConfig.js.map +1 -1
- app-rn-runtime/core/base.component.js +31 -5
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/textinput.component.js +9 -7
- app-rn-runtime/core/components/textinput.component.js.map +1 -1
- app-rn-runtime/core/storage.service.js +15 -0
- app-rn-runtime/core/storage.service.js.map +1 -1
- app-rn-runtime/core/wm-component-tree.js +58 -0
- app-rn-runtime/core/wm-component-tree.js.map +1 -0
- app-rn-runtime/package.json +13 -6
- app-rn-runtime/runtime/App.js +17 -2
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/App.navigator.js +1 -0
- app-rn-runtime/runtime/App.navigator.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +18 -0
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +10 -0
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/base-partial.component.js +3 -0
- app-rn-runtime/runtime/base-partial.component.js.map +1 -1
- app-rn-runtime/runtime/navigator/drawer.navigator.js +19 -10
- app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
- app-rn-runtime/styles/theme.js +5 -0
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +1 -1
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/http.service.js +5 -1
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/live-variable.js +14 -0
- 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,M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IhG,IAAI,GAAG,IAAI,CAACiE,gBAAgB,CAACjE,IAAI,CAAC,GAAG,IAC/C,CAAC;EACX;AACF","ignoreList":[]}
|
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","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,O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AChCC,SAAS,EAAC,2BAA2B;MACrC1F,MAAM,EAAEA,MAAM,CAAC8F,OAAQ;MACvBV,KAAK,EAAE,IAAI,CAACrG,IAAK;MACjB8G,kBAAkB,EAAC;IAAM,CAAC,CACxB,CAAC,GAAG,IAAI,EACbxC,OAAO,IAAIhG,IAAI,GAAG,IAAI,CAACiE,gBAAgB,CAACjE,IAAI,CAAC,GAAG,IAC/C,CAAC;EACX;AACF","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,
|
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
|
-
|
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
|
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,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAE/D,OAAO,MAAMC,aAAa,SAASH,kBAAkB,CAAgB;EAAAI,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;IAAAA,eAAA,sBAErD,KAAK;EAAA;AACrB;AAEA,eAAe,MAAMC,QAAQ,SAASR,aAAa,CAA+C;EAIhGK,WAAWA,CAACI,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,EAAE,IAAIE,aAAa,CAAC,CAAC,CAAC;IAACG,eAAA,8BAHvDZ,KAAK,CAACe,SAAS,CAAa,CAAC;EAI9C;EAEAC,IAAIA,CAAA,EAAG;IACL,IAAI,IAAI,CAACC,MAAM,CAACC,OAAO,EAAE;MACvB,IAAI,IAAI,CAACC,KAAK,CAACC,WAAW,EAAE;QAC1B,IAAI,CAACC,KAAK,CAAC,CAAC;MACd,CAAC,MAAM;QACL,IAAI,CAACJ,MAAM,CAACC,OAAO,CAACF,IAAI,CAAC,CAAC;QAC1B,IAAI,CAACM,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,CAACC,KAAK,CAAC,CAAC;MACxD;IACF;EACF;E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AAmB,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,CAACC,KAAK,CAAC,CAAC;MAC5D;IAAE,CACH,CAAC;EAER;EAEAsC,YAAYA,CAAC/C,KAAoB,EAAE;IACjC,oBACEd,KAAA,CAAAkD,aAAA,CAAC/C,IAAI;MAACmD,KAAK,EAAE,IAAI,CAACC,MAAM,CAACO;IAAK,GAC3B,IAAI,CAACC,WAAW,EAChB,IAAI,CAAC5C,KAAK,CAACW,aAAa,GACtB5B,QAAQ,CAAC8B,EAAE,IAAI,KAAK,GAAI,IAAI,CAACa,eAAe,CAAC/B,KAAK,CAAC,GAAG,IAAI,CAAC4C,kBAAkB,CAAC5C,KAAK,CAAC,GACnF,IAEA,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:
|
332
|
+
iconclass: props.iconclass,
|
333
333
|
onTap: this.searchIconPress.bind(this)
|
334
334
|
}) : null)
|
335
335
|
);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Keyboard","Platform","Text","TextInput","View","ScrollView","find","isNull","WmSearchProps","DEFAULT_CLASS","ModalConsumer","DataProvider","AccessibilityWidgetType","getAccessibilityProps","BaseDatasetComponent","BaseDatasetState","WmAnchor","WmPicture","Tappable","WmButton","get","isArray","isEmpty","isObject","AssetProvider","createSkeleton","WmSearchState","constructor","args","_defineProperty","top","left","WmSearch","props","Promise","resolve","position","view","measure","x","y","width","height","px","py","updateState","computePosition","then","isOpened","dataProvider","datavalue","query","clearSearch","invokeEventCallback","hide","dataItems","state","map","item","selected","type","updateFilteredData","queryText","_filteredData","filterOptions","entries","filteredData","minchars","length","_this$dataProvider","searchkey","updateRequired","undefined","init","invokeVariable","response","dataSet","setDataItems","filter","result","dataObject","data","isFocused","showPopover","focus","_this$widgetRef","widgetRef","onChange","value","isDefaultQuery","prevQuery","searchon","validate","setTimeout","invokeEvent","proxy","invokeChange","e","OS","cursor","target","selectionStart","onFocus","disabled","_this$state$props$que","onBlur","triggerValidation","prepareModalOptions","content","styles","modalService","o","modalOptions","modalContentSTyles","searchInputWidth","modalContent","borderWidth","modalStyle","modal","contentStyle","isModal","onClose","dismiss","setState","hideModal","searchIconPress","onItemSelect","displayexp","displayfield","datafield","updateDatavalue","prevDatavalue","queryModel","renderSkeleton","rootStyle","searchInputWrapper","root","text","theme","skeleton","renderSearchBar","_this$state$dataItems","opts","valueExpr","createElement","style","ref","onLayout","_extends","isValid","invalid","focusedText","selectionEnd","getTestPropsForInput","SEARCH","placeholderTextColor","placeholderText","color","placeholder","autoFocus","autofocus","editable","readonly","onChangeText","bind","nativeEvent","layout","showclear","onTap","id","getTestId","clearButton","iconclass","showSearchIcon","searchButton","reset","renderSearchItem","index","imageStyles","imagewidth","getTestProps","searchItem","template","renderitempartial","Fragment","name","picturesource","imgSrc","getTestPropsForLabel","searchItemText","updateDefaultQueryModel","selectedItem","onDataItemsUpdate","componentDidMount","onPropertyChange","$new","$old","dataset","setTemplate","partialName","renderWidget","showModal","maxHeight","contentContainerStyle","dropDownContent","loadAsset","key","limit","caption","datacompletemsg","dataCompleteItem"],"sources":["search.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Keyboard, Platform, Text, TextInput, View } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport { find, isNull } from 'lodash';\n\nimport WmSearchProps from './search.props';\nimport { DEFAULT_CLASS, WmSearchStyles } from './search.styles';\nimport { ModalConsumer, ModalOptions, ModalService} from \"@wavemaker/app-rn-runtime/core/modal.service\";\nimport { DataProvider } from '@wavemaker/app-rn-runtime/components/basic/search/local-data-provider';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { get, isArray, isEmpty, isObject } from \"lodash-es\";\nimport { AssetProvider } from '@wavemaker/app-rn-runtime/core/asset.provider';\nimport { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmSearchState extends BaseDatasetState<WmSearchProps> {\n isOpened: boolean = false;\n modalOptions = {} as ModalOptions;\n template: string = \"\";\n position = {\n top: 0,\n left: 0\n } as DropdownPosition;\n data: any = [];\n}\n\nexport interface DropdownPosition {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n}\n\nexport default class WmSearch extends BaseDatasetComponent<WmSearchProps, WmSearchState, WmSearchStyles> {\n view: View = null as any;\n private prevDatavalue: any;\n private queryModel: any;\n private searchInputWidth: any;\n private isDefaultQuery: boolean = true;\n private dataProvider: DataProvider;\n public widgetRef: TextInput | null = null;\n private cursor: any = 0;\n private isFocused: boolean = false;\n private updateRequired: any;\n\n constructor(props: WmSearchProps) {\n super(props, DEFAULT_CLASS, new WmSearchProps(), new WmSearchState());\n this.dataProvider = new DataProvider();\n if (this.props.datavalue) {\n this.updateState({\n props: {\n query: this.props.datavalue\n }\n } as WmSearchState);\n }\n }\n\n computePosition = () => {\n return new Promise<void>((resolve) => {\n const position = {} as DropdownPosition;\n this.view.measure((x = 0, y = 0, width = 0, height = 0, px = 0, py = 0) => {\n position.left = px;\n position.top = py + height;\n this.updateState({ position: position } as WmSearchState, resolve);\n });\n });\n }\n\n clearSearch() {\n this.invokeEventCallback('onClear', [null, this]);\n this.hide();\n this.updateState({\n props: {\n query: ''\n },\n dataItems: this.state.dataItems ? this.state.dataItems.map((item: any) => {\n item.selected = false;\n return item;\n }) : []\n } as WmSearchState, () => {\n if (this.state.props.type === 'autocomplete') {\n this.updateFilteredData('');\n }\n });\n }\n\n updateFilteredData(queryText: string = '') {\n const props = this.state.props;\n const filterOptions = {\n query: queryText,\n props: props,\n entries: this.state.dataItems\n };\n let filteredData: Array<any> = [];\n if (props.minchars && queryText.length < props.minchars) {\n filteredData = [];\n } else if (props.type === 'search' && !queryText) {\n filteredData = [];\n } else {\n if (this.props.searchkey && this.updateRequired === undefined) {\n this.updateRequired = this.dataProvider.init(this);\n }\n // for service variables invoke the variable with params.\n if (this.props.searchkey && this.updateRequired && this.state.props.query !== queryText) {\n this.dataProvider.invokeVariable(this, queryText).then((response: any) => {\n if (response) {\n response = response.dataSet;\n if (isEmpty(response)) {\n filteredData = [];\n } else {\n if (isObject(response) && !isArray(response)) {\n response = [response];\n }\n this.setDataItems(response);\n }\n }\n }, () => {});\n return;\n }\n filteredData = this.dataProvider?.filter(filterOptions);\n }\n this.updateState({\n props: { result: filteredData?.map( (item: any) => item.dataObject), query: queryText },\n data: filteredData,\n } as WmSearchState);\n if (!this.state.isOpened && this.isFocused) {\n this.showPopover && this.showPopover();\n }\n }\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n onChange(value: any) {\n this.isDefaultQuery = false;\n const prevQuery = this.state.props.query;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateState({\n props: {result: [], query: value},\n data: []\n } as WmSearchState);\n } else {\n this.updateFilteredData(value);\n }\n if (value === '') {\n this.validate(value);\n this.updateState({\n props: {\n datavalue: '',\n },\n } as WmSearchState);\n if (value === prevQuery) {\n return;\n }\n }\n setTimeout(() => {\n if (this.props.invokeEvent) {\n this.props.invokeEvent('onChange', [undefined, this.proxy, value, prevQuery]);\n }\n this.invokeEventCallback('onChange', [ undefined, this.proxy, value, prevQuery ]);\n }, 300);\n }\n\n invokeChange(e: any) {\n if (Platform.OS === 'web') {\n this.cursor = e.target.selectionStart;\n this.updateState({ props: { query: e.target.value } } as WmSearchState);\n }\n }\n\n onFocus() {\n this.isFocused = true;\n if (!this.state.props.disabled && this.state.props.type === 'autocomplete') {\n this.cursor = this.state.props.query?.length || 0;\n this.updateFilteredData(this.state.props.query || '');\n }\n this.invokeEventCallback('onFocus', [null, this]);\n }\n\n onBlur() {\n this.isFocused = false;\n this.validate(this.state.props.datavalue);\n if (!this.state.props.datavalue) {\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n })\n }\n this.invokeEventCallback('onBlur', [null, this]);\n }\n\n public showPopover = () => {\n this.computePosition().then(() => {\n this.updateState({ isOpened: true } as WmSearchState);\n });\n };\n\n public hide = () => {};\n\n prepareModalOptions(content: React.ReactNode, styles: WmSearchStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n const modalContentSTyles = {\n width: this.searchInputWidth - 2 * (styles.modalContent.borderWidth || 0),\n left: (this.state.position.left || 0) + 2 * (styles.modalContent.borderWidth || 0) };\n o.modalStyle = {...styles.modal};\n o.contentStyle = {...styles.modalContent, ...this.state.position, ...modalContentSTyles};\n o.content = content;\n o.isModal = true;\n o.onClose = () => {\n this.hide = () => {};\n Keyboard.dismiss();\n if (this.state.isOpened) {\n this.setState({isOpened: false, modalOptions: {} as ModalOptions} as WmSearchState);\n }\n };\n this.hide = () => {\n modalService.hideModal(this.state.modalOptions);\n if (this.state.isOpened) {\n this.setState({ isOpened: false, modalOptions: {} as ModalOptions } as WmSearchState);\n }\n }\n return o;\n }\n\n searchIconPress() {\n this.isFocused = false;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateFilteredData(this.state.props.query);\n } else {\n this.onItemSelect(this.state.data[0]);\n }\n }\n\n onItemSelect(item: any) {\n this.isFocused = false;\n this.updateState({ props: {\n query: item.displayexp || item.displayfield\n }\n } as WmSearchState);\n this.validate(item.datafield);\n this.updateDatavalue(item.datafield);\n this.prevDatavalue = item.datafield;\n this.queryModel = item;\n if (get(this.props, 'formfield')) {\n // @ts-ignore\n this.props.invokeEvent('onSelect', [null, this, item.datafield]);\n // @ts-ignore\n this.props.invokeEvent('onSubmit', [null, this]);\n } else {\n this.invokeEventCallback('onSelect', [null, this, item.datafield]);\n this.invokeEventCallback('onSubmit', [null, this]);\n }\n this.hide();\n }\n\n public renderSkeleton(props: WmSearchProps): React.ReactNode {\n \n const rootStyle = {\n ...this.styles.searchInputWrapper, \n ...this.styles.root, \n ...this.styles.text\n }\n\n return createSkeleton(this.theme, this.styles.skeleton, rootStyle)\n }\n\n renderSearchBar() {\n const props = this.state.props;\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.props.query || '';\n return(\n /*\n * onLayout function is required.\n * https://github.com/naoufal/react-native-accordion/pull/19/files\n */\n <View style={this.styles.root} ref={ref => {this.view = ref as View}} onLayout={() => {}}>\n <View style={this.styles.searchInputWrapper}>\n <TextInput style={[this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isOpened && this.state.dataItems?.length > 0? this.styles.focusedText : null]}\n ref={ref => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(AccessibilityWidgetType.SEARCH, props)}\n placeholderTextColor={this.styles.placeholderText.color as any}\n placeholder={props.placeholder || 'Search'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n onChangeText={this.onChange.bind(this)}\n onChange={this.invokeChange.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onLayout={e => {this.searchInputWidth = e.nativeEvent.layout.width}}\n onBlur={this.onBlur.bind(this)}\n {...opts}>\n </TextInput>\n {props.showclear && this.state.props.query ? <WmButton onTap={this.clearSearch.bind(this)}\n id={this.getTestId('clear')}\n styles={this.styles.clearButton} iconclass={'wi wi-clear'}></WmButton> : null}\n </View>\n {props.showSearchIcon && props.type === 'search' ? <WmButton styles={this.styles.searchButton}\n id={this.getTestId('search')}\n iconclass={'wm-sl-l sl-search'} onTap={this.searchIconPress.bind(this)}></WmButton> : null}\n </View>\n );\n }\n\n reset() {\n if (this.state.props.query) {\n this.updateState({\n props: {\n query: ''\n }\n } as WmSearchState);\n }\n }\n\n renderSearchItem(item: any, index: number) {\n const props = this.state.props;\n const imageStyles = { root: {height:props.imagewidth, width:props.imagewidth}}\n return (\n <Tappable onTap={this.onItemSelect.bind(this, item)} {...this.getTestProps(`action${index}`)}>\n <View style={this.styles.searchItem}>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) : (<>\n <WmPicture id={this.getTestId(`picture${index}`)} styles={imageStyles} name={props.name + '_image'} picturesource={item.imgSrc}></WmPicture>\n <Text {...this.getTestPropsForLabel(index + '')} style={this.styles.searchItemText}>{item.displayexp || item.displayfield}</Text>\n </>)}\n </View>\n </Tappable>\n );\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultQuery) {\n const selectedItem = find(this.state.dataItems, (item) => item.selected);\n this.updateState({ props: {\n query: selectedItem ? (selectedItem.displayexp || selectedItem.displayfield) : ''\n }\n } as WmSearchState);\n }\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.isFocused && this.state.dataItems.length && this.updateFilteredData(this.state.props.query);\n this.updateDefaultQueryModel();\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'dataset':\n if (!isEmpty($new) && isObject($new) && !isArray($new)) {\n $new = [$new];\n this.updateState({\n props: {\n dataset: $new\n }\n } as WmSearchState);\n }\n break;\n }\n super.onPropertyChange(name, $new, $old);\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName} as WmSearchState);\n }\n\n renderWidget(props: WmSearchProps) {\n const result = this.state.data;\n return (\n <View>\n {this.renderSearchBar()}\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions((\n <ScrollView style={{width: '100%', maxHeight: 200}} contentContainerStyle={this.styles.dropDownContent}>\n <AssetProvider value={this.loadAsset}>\n {result && result.map((item: any, index: any) => (\n <View key={item.key}>\n {\n (!props.limit) || (props.limit && index+1 <= props.limit) ?\n this.renderSearchItem(item, index)\n : null\n }\n {\n index === result.length - 1 ?\n <WmAnchor caption={props.datacompletemsg} styles={this.styles.dataCompleteItem}></WmAnchor> : null\n }\n </View>\n ))}\n </AssetProvider>\n </ScrollView>\n ), this.styles, modalService));\n return null;\n }}\n </ModalConsumer>) : null}\n </View>\n\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,QAAQ,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AACxF,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,IAAI,EAAEC,MAAM,QAAQ,QAAQ;AAErC,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SAASC,aAAa,QAAmC,8CAA8C;AACvG,SAASC,YAAY,QAAQ,uEAAuE;AACpG,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,OAAOC,SAAS,MAAM,sEAAsE;AAC5F,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,SAASC,GAAG,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,WAAW;AAC3D,SAASC,aAAa,QAAQ,+CAA+C;AAC7E,SAASC,cAAc,QAAQ,gCAAgC;AAE/D,OAAO,MAAMC,aAAa,SAASX,gBAAgB,CAAgB;EAAAY,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C9F,MAAM,CAAC+F;MAAgB,gBACnG7M,KAAA,CAAAiJ,aAAA,CAACxH,aAAa;QAACgE,KAAK,EAAE,IAAI,CAACqH;MAAU,GACpC9H,MAAM,IAAIA,MAAM,CAACtB,GAAG,CAAC,CAACC,IAAS,EAAEuH,KAAU,kBAC1ClL,KAAA,CAAAiJ,aAAA,CAAC5I,IAAI;QAAC0M,GAAG,EAAEpJ,IAAI,CAACoJ;MAAI,GAEf,CAAC7K,KAAK,CAAC8K,KAAK,IAAM9K,KAAK,CAAC8K,KAAK,IAAI9B,KAAK,GAAC,CAAC,IAAIhJ,KAAK,CAAC8K,KAAM,GACvD,IAAI,CAAC/B,gBAAgB,CAACtH,IAAI,EAAEuH,KAAK,CAAC,GAChC,IAAI,EAGRA,KAAK,KAAKlG,MAAM,CAACX,MAAM,GAAG,CAAC,gBAC3BrE,KAAA,CAAAiJ,aAAA,CAAChI,QAAQ;QAACgM,OAAO,EAAE/K,KAAK,CAACgL,eAAgB;QAACpG,MAAM,EAAE,IAAI,CAACA,MAAM,CAACqG;MAAiB,CAAW,CAAC,GAAG,IAE5F,CACP,CACc,CACP,CAAC,EACZ,IAAI,CAACrG,MAAM,EAAEC,YAAY,CAAC,CAAC;MAC9B,OAAO,IAAI;IACb,CACa,CAAC,GAAI,IAClB,CAAC;EAGX;AACF","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","Keyboard","Platform","Text","TextInput","View","ScrollView","find","isNull","WmSearchProps","DEFAULT_CLASS","ModalConsumer","DataProvider","AccessibilityWidgetType","getAccessibilityProps","BaseDatasetComponent","BaseDatasetState","WmAnchor","WmPicture","Tappable","WmButton","get","isArray","isEmpty","isObject","AssetProvider","createSkeleton","WmSearchState","constructor","args","_defineProperty","top","left","WmSearch","props","Promise","resolve","position","view","measure","x","y","width","height","px","py","updateState","computePosition","then","isOpened","dataProvider","datavalue","query","clearSearch","invokeEventCallback","hide","dataItems","state","map","item","selected","type","updateFilteredData","queryText","_filteredData","filterOptions","entries","filteredData","minchars","length","_this$dataProvider","searchkey","updateRequired","undefined","init","invokeVariable","response","dataSet","setDataItems","filter","result","dataObject","data","isFocused","showPopover","focus","_this$widgetRef","widgetRef","onChange","value","isDefaultQuery","prevQuery","searchon","validate","setTimeout","invokeEvent","proxy","invokeChange","e","OS","cursor","target","selectionStart","onFocus","disabled","_this$state$props$que","onBlur","triggerValidation","prepareModalOptions","content","styles","modalService","o","modalOptions","modalContentSTyles","searchInputWidth","modalContent","borderWidth","modalStyle","modal","contentStyle","isModal","onClose","dismiss","setState","hideModal","searchIconPress","onItemSelect","displayexp","displayfield","datafield","updateDatavalue","prevDatavalue","queryModel","renderSkeleton","rootStyle","searchInputWrapper","root","text","theme","skeleton","renderSearchBar","_this$state$dataItems","opts","valueExpr","createElement","style","ref","onLayout","_extends","isValid","invalid","focusedText","selectionEnd","getTestPropsForInput","SEARCH","placeholderTextColor","placeholderText","color","placeholder","autoFocus","autofocus","editable","readonly","onChangeText","bind","nativeEvent","layout","showclear","onTap","id","getTestId","clearButton","iconclass","showSearchIcon","searchButton","reset","renderSearchItem","index","imageStyles","imagewidth","getTestProps","searchItem","template","renderitempartial","Fragment","name","picturesource","imgSrc","getTestPropsForLabel","searchItemText","updateDefaultQueryModel","selectedItem","onDataItemsUpdate","componentDidMount","onPropertyChange","$new","$old","dataset","setTemplate","partialName","renderWidget","showModal","maxHeight","contentContainerStyle","dropDownContent","loadAsset","key","limit","caption","datacompletemsg","dataCompleteItem"],"sources":["search.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Keyboard, Platform, Text, TextInput, View } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport { find, isNull } from 'lodash';\n\nimport WmSearchProps from './search.props';\nimport { DEFAULT_CLASS, WmSearchStyles } from './search.styles';\nimport { ModalConsumer, ModalOptions, ModalService} from \"@wavemaker/app-rn-runtime/core/modal.service\";\nimport { DataProvider } from '@wavemaker/app-rn-runtime/components/basic/search/local-data-provider';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { get, isArray, isEmpty, isObject } from \"lodash-es\";\nimport { AssetProvider } from '@wavemaker/app-rn-runtime/core/asset.provider';\nimport { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmSearchState extends BaseDatasetState<WmSearchProps> {\n isOpened: boolean = false;\n modalOptions = {} as ModalOptions;\n template: string = \"\";\n position = {\n top: 0,\n left: 0\n } as DropdownPosition;\n data: any = [];\n}\n\nexport interface DropdownPosition {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n}\n\nexport default class WmSearch extends BaseDatasetComponent<WmSearchProps, WmSearchState, WmSearchStyles> {\n view: View = null as any;\n private prevDatavalue: any;\n private queryModel: any;\n private searchInputWidth: any;\n private isDefaultQuery: boolean = true;\n private dataProvider: DataProvider;\n public widgetRef: TextInput | null = null;\n private cursor: any = 0;\n private isFocused: boolean = false;\n private updateRequired: any;\n\n constructor(props: WmSearchProps) {\n super(props, DEFAULT_CLASS, new WmSearchProps(), new WmSearchState());\n this.dataProvider = new DataProvider();\n if (this.props.datavalue) {\n this.updateState({\n props: {\n query: this.props.datavalue\n }\n } as WmSearchState);\n }\n }\n\n computePosition = () => {\n return new Promise<void>((resolve) => {\n const position = {} as DropdownPosition;\n this.view.measure((x = 0, y = 0, width = 0, height = 0, px = 0, py = 0) => {\n position.left = px;\n position.top = py + height;\n this.updateState({ position: position } as WmSearchState, resolve);\n });\n });\n }\n\n clearSearch() {\n this.invokeEventCallback('onClear', [null, this]);\n this.hide();\n this.updateState({\n props: {\n query: ''\n },\n dataItems: this.state.dataItems ? this.state.dataItems.map((item: any) => {\n item.selected = false;\n return item;\n }) : []\n } as WmSearchState, () => {\n if (this.state.props.type === 'autocomplete') {\n this.updateFilteredData('');\n }\n });\n }\n\n updateFilteredData(queryText: string = '') {\n const props = this.state.props;\n const filterOptions = {\n query: queryText,\n props: props,\n entries: this.state.dataItems\n };\n let filteredData: Array<any> = [];\n if (props.minchars && queryText.length < props.minchars) {\n filteredData = [];\n } else if (props.type === 'search' && !queryText) {\n filteredData = [];\n } else {\n if (this.props.searchkey && this.updateRequired === undefined) {\n this.updateRequired = this.dataProvider.init(this);\n }\n // for service variables invoke the variable with params.\n if (this.props.searchkey && this.updateRequired && this.state.props.query !== queryText) {\n this.dataProvider.invokeVariable(this, queryText).then((response: any) => {\n if (response) {\n response = response.dataSet;\n if (isEmpty(response)) {\n filteredData = [];\n } else {\n if (isObject(response) && !isArray(response)) {\n response = [response];\n }\n this.setDataItems(response);\n }\n }\n }, () => {});\n return;\n }\n filteredData = this.dataProvider?.filter(filterOptions);\n }\n this.updateState({\n props: { result: filteredData?.map( (item: any) => item.dataObject), query: queryText },\n data: filteredData,\n } as WmSearchState);\n if (!this.state.isOpened && this.isFocused) {\n this.showPopover && this.showPopover();\n }\n }\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n onChange(value: any) {\n this.isDefaultQuery = false;\n const prevQuery = this.state.props.query;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateState({\n props: {result: [], query: value},\n data: []\n } as WmSearchState);\n } else {\n this.updateFilteredData(value);\n }\n if (value === '') {\n this.validate(value);\n this.updateState({\n props: {\n datavalue: '',\n },\n } as WmSearchState);\n if (value === prevQuery) {\n return;\n }\n }\n setTimeout(() => {\n if (this.props.invokeEvent) {\n this.props.invokeEvent('onChange', [undefined, this.proxy, value, prevQuery]);\n }\n this.invokeEventCallback('onChange', [ undefined, this.proxy, value, prevQuery ]);\n }, 300);\n }\n\n invokeChange(e: any) {\n if (Platform.OS === 'web') {\n this.cursor = e.target.selectionStart;\n this.updateState({ props: { query: e.target.value } } as WmSearchState);\n }\n }\n\n onFocus() {\n this.isFocused = true;\n if (!this.state.props.disabled && this.state.props.type === 'autocomplete') {\n this.cursor = this.state.props.query?.length || 0;\n this.updateFilteredData(this.state.props.query || '');\n }\n this.invokeEventCallback('onFocus', [null, this]);\n }\n\n onBlur() {\n this.isFocused = false;\n this.validate(this.state.props.datavalue);\n if (!this.state.props.datavalue) {\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n })\n }\n this.invokeEventCallback('onBlur', [null, this]);\n }\n\n public showPopover = () => {\n this.computePosition().then(() => {\n this.updateState({ isOpened: true } as WmSearchState);\n });\n };\n\n public hide = () => {};\n\n prepareModalOptions(content: React.ReactNode, styles: WmSearchStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n const modalContentSTyles = {\n width: this.searchInputWidth - 2 * (styles.modalContent.borderWidth || 0),\n left: (this.state.position.left || 0) + 2 * (styles.modalContent.borderWidth || 0) };\n o.modalStyle = {...styles.modal};\n o.contentStyle = {...styles.modalContent, ...this.state.position, ...modalContentSTyles};\n o.content = content;\n o.isModal = true;\n o.onClose = () => {\n this.hide = () => {};\n Keyboard.dismiss();\n if (this.state.isOpened) {\n this.setState({isOpened: false, modalOptions: {} as ModalOptions} as WmSearchState);\n }\n };\n this.hide = () => {\n modalService.hideModal(this.state.modalOptions);\n if (this.state.isOpened) {\n this.setState({ isOpened: false, modalOptions: {} as ModalOptions } as WmSearchState);\n }\n }\n return o;\n }\n\n searchIconPress() {\n this.isFocused = false;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateFilteredData(this.state.props.query);\n } else {\n this.onItemSelect(this.state.data[0]);\n }\n }\n\n onItemSelect(item: any) {\n this.isFocused = false;\n this.updateState({ props: {\n query: item.displayexp || item.displayfield\n }\n } as WmSearchState);\n this.validate(item.datafield);\n this.updateDatavalue(item.datafield);\n this.prevDatavalue = item.datafield;\n this.queryModel = item;\n if (get(this.props, 'formfield')) {\n // @ts-ignore\n this.props.invokeEvent('onSelect', [null, this, item.datafield]);\n // @ts-ignore\n this.props.invokeEvent('onSubmit', [null, this]);\n } else {\n this.invokeEventCallback('onSelect', [null, this, item.datafield]);\n this.invokeEventCallback('onSubmit', [null, this]);\n }\n this.hide();\n }\n\n public renderSkeleton(props: WmSearchProps): React.ReactNode {\n \n const rootStyle = {\n ...this.styles.searchInputWrapper, \n ...this.styles.root, \n ...this.styles.text\n }\n\n return createSkeleton(this.theme, this.styles.skeleton, rootStyle)\n }\n\n renderSearchBar() {\n const props = this.state.props;\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.props.query || '';\n return(\n /*\n * onLayout function is required.\n * https://github.com/naoufal/react-native-accordion/pull/19/files\n */\n <View style={this.styles.root} ref={ref => {this.view = ref as View}} onLayout={() => {}}>\n <View style={this.styles.searchInputWrapper}>\n <TextInput style={[this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isOpened && this.state.dataItems?.length > 0? this.styles.focusedText : null]}\n ref={ref => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(AccessibilityWidgetType.SEARCH, props)}\n placeholderTextColor={this.styles.placeholderText.color as any}\n placeholder={props.placeholder || 'Search'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n onChangeText={this.onChange.bind(this)}\n onChange={this.invokeChange.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onLayout={e => {this.searchInputWidth = e.nativeEvent.layout.width}}\n onBlur={this.onBlur.bind(this)}\n {...opts}>\n </TextInput>\n {props.showclear && this.state.props.query ? <WmButton onTap={this.clearSearch.bind(this)}\n id={this.getTestId('clear')}\n styles={this.styles.clearButton} iconclass={'wi wi-clear'}></WmButton> : null}\n </View>\n {props.showSearchIcon && props.type === 'search' ? <WmButton styles={this.styles.searchButton}\n id={this.getTestId('search')}\n iconclass={props.iconclass} onTap={this.searchIconPress.bind(this)}></WmButton> : null}\n </View>\n );\n }\n\n reset() {\n if (this.state.props.query) {\n this.updateState({\n props: {\n query: ''\n }\n } as WmSearchState);\n }\n }\n\n renderSearchItem(item: any, index: number) {\n const props = this.state.props;\n const imageStyles = { root: {height:props.imagewidth, width:props.imagewidth}}\n return (\n <Tappable onTap={this.onItemSelect.bind(this, item)} {...this.getTestProps(`action${index}`)}>\n <View style={this.styles.searchItem}>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) : (<>\n <WmPicture id={this.getTestId(`picture${index}`)} styles={imageStyles} name={props.name + '_image'} picturesource={item.imgSrc}></WmPicture>\n <Text {...this.getTestPropsForLabel(index + '')} style={this.styles.searchItemText}>{item.displayexp || item.displayfield}</Text>\n </>)}\n </View>\n </Tappable>\n );\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultQuery) {\n const selectedItem = find(this.state.dataItems, (item) => item.selected);\n this.updateState({ props: {\n query: selectedItem ? (selectedItem.displayexp || selectedItem.displayfield) : ''\n }\n } as WmSearchState);\n }\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.isFocused && this.state.dataItems.length && this.updateFilteredData(this.state.props.query);\n this.updateDefaultQueryModel();\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'dataset':\n if (!isEmpty($new) && isObject($new) && !isArray($new)) {\n $new = [$new];\n this.updateState({\n props: {\n dataset: $new\n }\n } as WmSearchState);\n }\n break;\n }\n super.onPropertyChange(name, $new, $old);\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName} as WmSearchState);\n }\n\n renderWidget(props: WmSearchProps) {\n const result = this.state.data;\n return (\n <View>\n {this.renderSearchBar()}\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions((\n <ScrollView style={{width: '100%', maxHeight: 200}} contentContainerStyle={this.styles.dropDownContent}>\n <AssetProvider value={this.loadAsset}>\n {result && result.map((item: any, index: any) => (\n <View key={item.key}>\n {\n (!props.limit) || (props.limit && index+1 <= props.limit) ?\n this.renderSearchItem(item, index)\n : null\n }\n {\n index === result.length - 1 ?\n <WmAnchor caption={props.datacompletemsg} styles={this.styles.dataCompleteItem}></WmAnchor> : null\n }\n </View>\n ))}\n </AssetProvider>\n </ScrollView>\n ), this.styles, modalService));\n return null;\n }}\n </ModalConsumer>) : null}\n </View>\n\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,QAAQ,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AACxF,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,IAAI,EAAEC,MAAM,QAAQ,QAAQ;AAErC,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SAASC,aAAa,QAAmC,8CAA8C;AACvG,SAASC,YAAY,QAAQ,uEAAuE;AACpG,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,OAAOC,SAAS,MAAM,sEAAsE;AAC5F,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,SAASC,GAAG,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,WAAW;AAC3D,SAASC,aAAa,QAAQ,+CAA+C;AAC7E,SAASC,cAAc,QAAQ,gCAAg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E,MAAM;UAAEiK,SAAS,EAAE;QAAG,CAAE;QAACC,qBAAqB,EAAE,IAAI,CAAC9F,MAAM,CAAC+F;MAAgB,gBACnG7M,KAAA,CAAAiJ,aAAA,CAACxH,aAAa;QAACgE,KAAK,EAAE,IAAI,CAACqH;MAAU,GACpC9H,MAAM,IAAIA,MAAM,CAACtB,GAAG,CAAC,CAACC,IAAS,EAAEuH,KAAU,kBAC1ClL,KAAA,CAAAiJ,aAAA,CAAC5I,IAAI;QAAC0M,GAAG,EAAEpJ,IAAI,CAACoJ;MAAI,GAEf,CAAC7K,KAAK,CAAC8K,KAAK,IAAM9K,KAAK,CAAC8K,KAAK,IAAI9B,KAAK,GAAC,CAAC,IAAIhJ,KAAK,CAAC8K,KAAM,GACvD,IAAI,CAAC/B,gBAAgB,CAACtH,IAAI,EAAEuH,KAAK,CAAC,GAChC,IAAI,EAGRA,KAAK,KAAKlG,MAAM,CAACX,MAAM,GAAG,CAAC,gBAC3BrE,KAAA,CAAAiJ,aAAA,CAAChI,QAAQ;QAACgM,OAAO,EAAE/K,KAAK,CAACgL,eAAgB;QAACpG,MAAM,EAAE,IAAI,CAACA,MAAM,CAACqG;MAAiB,CAAW,CAAC,GAAG,IAE5F,CACP,CACc,CACP,CAAC,EACZ,IAAI,CAACrG,MAAM,EAAEC,YAAY,CAAC,CAAC;MAC9B,OAAO,IAAI;IACb,CACa,CAAC,GAAI,IAClB,CAAC;EAGX;AACF","ignoreList":[]}
|
@@ -30,6 +30,7 @@ export default class WmSearchProps extends BaseDatasetProps {
|
|
30
30
|
_defineProperty(this, "renderitempartial", void 0);
|
31
31
|
_defineProperty(this, "skeletonheight", null);
|
32
32
|
_defineProperty(this, "skeletonwidth", null);
|
33
|
+
_defineProperty(this, "iconclass", 'wm-sl-l sl-search');
|
33
34
|
}
|
34
35
|
}
|
35
36
|
//# sourceMappingURL=search.props.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseDatasetProps","WmSearchProps","constructor","args","_defineProperty","undefined"],"sources":["search.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\nimport {BaseComponent} from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport { AccessibilityRole } from 'react-native';\n\nexport default class WmSearchProps extends BaseDatasetProps {\n autofocus: boolean = false;\n query?: string = '';\n searchkey?: any;\n type: 'search' | 'autocomplete' = 'search';\n datacompletemsg?: string = 'No more data to load';\n placeholder?: string = 'Search';\n limit?: number = null as any;\n minchars?: number = null as any;\n imagewidth?: any = 32;\n imageheight?: any = 32;\n searchon?: string = 'typing';\n onSubmit?: any;\n onChange?: Function = null as any;\n result?: any;\n showclear: boolean = false;\n showSearchIcon: boolean = true; // internal property\n invokeEvent?: Function;\n formFieldInstance?: BaseComponent<any, any, any>;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'search';\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAIvG,eAAe,MAAMC,aAAa,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACrC,KAAK;IAAAA,eAAA,gBACT,EAAE;IAAAA,eAAA;IAAAA,eAAA,eAEe,QAAQ;IAAAA,eAAA,0BACf,sBAAsB;IAAAA,eAAA,sBAC1B,QAAQ;IAAAA,eAAA,gBACd,IAAI;IAAAA,eAAA,mBACD,IAAI;IAAAA,eAAA,qBACL,EAAE;IAAAA,eAAA,sBACD,EAAE;IAAAA,eAAA,mBACF,QAAQ;IAAAA,eAAA;IAAAA,eAAA,mBAEN,IAAI;IAAAA,eAAA;IAAAA,eAAA,oBAEL,KAAK;IAAAA,eAAA,yBACA,IAAI;IAAE;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,6BAGFC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,QAAQ;IAAAA,eAAA;IAAAA,eAAA,yBAEtB,IAAI;IAAAA,eAAA,wBACL,IAAI;EAAA;
|
1
|
+
{"version":3,"names":["BaseDatasetProps","WmSearchProps","constructor","args","_defineProperty","undefined"],"sources":["search.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\nimport {BaseComponent} from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport { AccessibilityRole } from 'react-native';\n\nexport default class WmSearchProps extends BaseDatasetProps {\n autofocus: boolean = false;\n query?: string = '';\n searchkey?: any;\n type: 'search' | 'autocomplete' = 'search';\n datacompletemsg?: string = 'No more data to load';\n placeholder?: string = 'Search';\n limit?: number = null as any;\n minchars?: number = null as any;\n imagewidth?: any = 32;\n imageheight?: any = 32;\n searchon?: string = 'typing';\n onSubmit?: any;\n onChange?: Function = null as any;\n result?: any;\n showclear: boolean = false;\n showSearchIcon: boolean = true; // internal property\n invokeEvent?: Function;\n formFieldInstance?: BaseComponent<any, any, any>;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'search';\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n iconclass?: string = 'wm-sl-l sl-search';\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAIvG,eAAe,MAAMC,aAAa,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACrC,KAAK;IAAAA,eAAA,gBACT,EAAE;IAAAA,eAAA;IAAAA,eAAA,eAEe,QAAQ;IAAAA,eAAA,0BACf,sBAAsB;IAAAA,eAAA,sBAC1B,QAAQ;IAAAA,eAAA,gBACd,IAAI;IAAAA,eAAA,mBACD,IAAI;IAAAA,eAAA,qBACL,EAAE;IAAAA,eAAA,sBACD,EAAE;IAAAA,eAAA,mBACF,QAAQ;IAAAA,eAAA;IAAAA,eAAA,mBAEN,IAAI;IAAAA,eAAA;IAAAA,eAAA,oBAEL,KAAK;IAAAA,eAAA,yBACA,IAAI;IAAE;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,6BAGFC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,QAAQ;IAAAA,eAAA;IAAAA,eAAA,yBAEtB,IAAI;IAAAA,eAAA,wBACL,IAAI;IAAAA,eAAA,oBACR,mBAAmB;EAAA;AAC1C","ignoreList":[]}
|
@@ -80,9 +80,11 @@ export default class WmSkeleton extends BaseComponent {
|
|
80
80
|
});
|
81
81
|
}
|
82
82
|
componentDidMount() {
|
83
|
+
super.componentDidMount();
|
83
84
|
this.animationRunner.start();
|
84
85
|
}
|
85
86
|
componentWillUnmount() {
|
87
|
+
super.componentWillUnmount();
|
86
88
|
this.animationRunner.stop();
|
87
89
|
}
|
88
90
|
renderWidget(props) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","Animated","Easing","StyleSheet","LinearGradient","BaseComponent","BaseComponentState","WmSkeletonProps","DEFAULT_CLASS","isUndefined","WmSkeletonState","constructor","args","_defineProperty","left","top","width","height","AnimationRunner","Value","run","counter","timing","animationValue","duration","time","speed","toValue","useNativeDriver","easing","linear","start","event","finished","setValue","stop","Math","max","getValue","WmSkeleton","props","_this$skeletonloaderR","skeletonloaderRef","measure","x","y","px","py","layout","setState","animate","componentDidMount","animationRunner","componentWillUnmount","renderWidget","_this$styles$gradient","_this$styles$gradient2","_this$styles$gradient3","outpuRange","state","deg","translateX","interpolate","inputRange","outputRange","createElement","ref","onLayout","onLayoutChange","style","styles","root","children","absoluteFill","animatedView","transform","rotate","end","colors","gradientForeground","backgroundColor","toString","gradient","locations","createSkeleton","theme","skeletonStyles","wrapper","addStyleProp","propName","mergeStyle"],"sources":["skeleton.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Animated, Easing, StyleSheet, LayoutChangeEvent, ColorValue, ViewStyle } from 'react-native';\nimport { LinearGradient } from 'expo-linear-gradient';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Theme } from '@wavemaker/app-rn-runtime/styles/theme';\n\nimport WmSkeletonProps from './skeleton.props';\nimport { DEFAULT_CLASS, WmSkeletonStyles } from './skeleton.styles';\nimport { isUndefined } from 'lodash-es';\n\nexport class WmSkeletonState extends BaseComponentState<WmSkeletonProps> {\n layout = {\n left: 0,\n top: 0,\n width: 0,\n height: 0,\n };\n animate = false;\n}\n\nclass AnimationRunner {\n private time: number = 1000;\n public speed = 1;\n private counter = 0;\n private animationValue = new Animated.Value(0.2);\n\n public run() {\n if (this.counter == 0) {\n return;\n }\n Animated.timing(this.animationValue, {\n duration: this.time * this.speed,\n toValue: 1,\n useNativeDriver: true,\n easing: Easing.linear,\n }).start((event) => {\n if (event.finished) {\n this.animationValue.setValue(0)\n this.run();\n }\n });\n }\n\n public start() {\n this.counter++;\n if (this.counter == 1) {\n this.run();\n }\n }\n\n public stop() {\n this.counter = Math.max(--this.counter, 0);\n }\n\n public getValue() {\n return this.animationValue;\n }\n}\n\nexport default class WmSkeleton extends BaseComponent<WmSkeletonProps, WmSkeletonState, WmSkeletonStyles> {\n\n private skeletonloaderRef: any = null;\n private animationRunner = new AnimationRunner();\n\n constructor(props: WmSkeletonProps) {\n super(props, DEFAULT_CLASS, new WmSkeletonProps(), new WmSkeletonState());\n }\n\n componentDidMount(): void {\n this.animationRunner.start();\n }\n\n componentWillUnmount(): void {\n this.animationRunner.stop();\n }\n\n onLayoutChange = (event: LayoutChangeEvent) => {\n this.skeletonloaderRef?.measure((x: number, y: number, width: number, height: number, px: number, py: number) => {\n let layout = {\n left: px,\n top: py,\n width: width,\n height: height,\n };\n this.setState({\n layout: {\n ...layout as any\n }, animate: true\n });\n });\n }\n\n renderWidget(props: WmSkeletonProps) {\n let outpuRange = [-this.state.layout.width-this.state.layout.left, this.state.layout.width + this.state.layout.height];\n let deg = -20;\n let translateX = this.animationRunner.getValue().interpolate({\n inputRange: [0, 1],\n outputRange: [-50, 400]\n });\n return (\n <View ref={(ref) => { this.skeletonloaderRef = ref; }} onLayout={this.onLayoutChange}\n style={this.styles.root} >\n {props.children}\n {this.state.animate ?\n <Animated.View\n style={[\n StyleSheet.absoluteFill,\n this.styles.animatedView,\n { \n transform: [\n { translateX },\n { rotate: deg + 'deg' }\n ]\n }]}>\n <LinearGradient\n start={{ x: 0, y: 0 }}\n end={{ x: 1, y: 0 }}\n colors={[this.styles.gradientForeground.backgroundColor?.toString() as string,\n this.styles.gradient.backgroundColor?.toString() as string,\n this.styles.gradientForeground.backgroundColor?.toString() as string]}\n locations={[0, 0.5, 1]}\n style={[this.styles.gradient, {backgroundColor: this.styles.animatedView.backgroundColor}]} />\n </Animated.View> : null}\n </View>);\n }\n}\n\nexport const createSkeleton = (theme: Theme, skeletonStyles: WmSkeletonStyles, wrapper: ViewStyle, children?: React.ReactNode) => {\n const style = {} as ViewStyle;\n const addStyleProp = (propName: any) => {\n if (!isUndefined((wrapper as any)[propName])) {\n (style as any)[propName] = (wrapper as any)[propName];\n }\n };\n addStyleProp('width');\n addStyleProp('height');\n addStyleProp('borderRadius');\n addStyleProp('borderRadius');\n addStyleProp('marginTop');\n addStyleProp('marginBottom');\n addStyleProp('marginLeft');\n addStyleProp('marginRight');\n return(<WmSkeleton styles={theme.mergeStyle(skeletonStyles, {root: style})} children={children}/>);\n};\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,UAAU,QAAkD,cAAc;AAC3G,SAASC,cAAc,QAAQ,sBAAsB;AAErD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBA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Ac,EAAE;MAACf,IAAI,EAAEF;IAAK,CAAC,CAAE;IAACG,QAAQ,EAAEA;EAAS,CAAC,CAAC;AACnG,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","View","Animated","Easing","StyleSheet","LinearGradient","BaseComponent","BaseComponentState","WmSkeletonProps","DEFAULT_CLASS","isUndefined","WmSkeletonState","constructor","args","_defineProperty","left","top","width","height","AnimationRunner","Value","run","counter","timing","animationValue","duration","time","speed","toValue","useNativeDriver","easing","linear","start","event","finished","setValue","stop","Math","max","getValue","WmSkeleton","props","_this$skeletonloaderR","skeletonloaderRef","measure","x","y","px","py","layout","setState","animate","componentDidMount","animationRunner","componentWillUnmount","renderWidget","_this$styles$gradient","_this$styles$gradient2","_this$styles$gradient3","outpuRange","state","deg","translateX","interpolate","inputRange","outputRange","createElement","ref","onLayout","onLayoutChange","style","styles","root","children","absoluteFill","animatedView","transform","rotate","end","colors","gradientForeground","backgroundColor","toString","gradient","locations","createSkeleton","theme","skeletonStyles","wrapper","addStyleProp","propName","mergeStyle"],"sources":["skeleton.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Animated, Easing, StyleSheet, LayoutChangeEvent, ColorValue, ViewStyle } from 'react-native';\nimport { LinearGradient } from 'expo-linear-gradient';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Theme } from '@wavemaker/app-rn-runtime/styles/theme';\n\nimport WmSkeletonProps from './skeleton.props';\nimport { DEFAULT_CLASS, WmSkeletonStyles } from './skeleton.styles';\nimport { isUndefined } from 'lodash-es';\n\nexport class WmSkeletonState extends BaseComponentState<WmSkeletonProps> {\n layout = {\n left: 0,\n top: 0,\n width: 0,\n height: 0,\n };\n animate = false;\n}\n\nclass AnimationRunner {\n private time: number = 1000;\n public speed = 1;\n private counter = 0;\n private animationValue = new Animated.Value(0.2);\n\n public run() {\n if (this.counter == 0) {\n return;\n }\n Animated.timing(this.animationValue, {\n duration: this.time * this.speed,\n toValue: 1,\n useNativeDriver: true,\n easing: Easing.linear,\n }).start((event) => {\n if (event.finished) {\n this.animationValue.setValue(0)\n this.run();\n }\n });\n }\n\n public start() {\n this.counter++;\n if (this.counter == 1) {\n this.run();\n }\n }\n\n public stop() {\n this.counter = Math.max(--this.counter, 0);\n }\n\n public getValue() {\n return this.animationValue;\n }\n}\n\nexport default class WmSkeleton extends BaseComponent<WmSkeletonProps, WmSkeletonState, WmSkeletonStyles> {\n\n private skeletonloaderRef: any = null;\n private animationRunner = new AnimationRunner();\n\n constructor(props: WmSkeletonProps) {\n super(props, DEFAULT_CLASS, new WmSkeletonProps(), new WmSkeletonState());\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.animationRunner.start();\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.animationRunner.stop();\n }\n\n onLayoutChange = (event: LayoutChangeEvent) => {\n this.skeletonloaderRef?.measure((x: number, y: number, width: number, height: number, px: number, py: number) => {\n let layout = {\n left: px,\n top: py,\n width: width,\n height: height,\n };\n this.setState({\n layout: {\n ...layout as any\n }, animate: true\n });\n });\n }\n\n renderWidget(props: WmSkeletonProps) {\n let outpuRange = [-this.state.layout.width-this.state.layout.left, this.state.layout.width + this.state.layout.height];\n let deg = -20;\n let translateX = this.animationRunner.getValue().interpolate({\n inputRange: [0, 1],\n outputRange: [-50, 400]\n });\n return (\n <View ref={(ref) => { this.skeletonloaderRef = ref; }} onLayout={this.onLayoutChange}\n style={this.styles.root} >\n {props.children}\n {this.state.animate ?\n <Animated.View\n style={[\n StyleSheet.absoluteFill,\n this.styles.animatedView,\n { \n transform: [\n { translateX },\n { rotate: deg + 'deg' }\n ]\n }]}>\n <LinearGradient\n start={{ x: 0, y: 0 }}\n end={{ x: 1, y: 0 }}\n colors={[this.styles.gradientForeground.backgroundColor?.toString() as string,\n this.styles.gradient.backgroundColor?.toString() as string,\n this.styles.gradientForeground.backgroundColor?.toString() as string]}\n locations={[0, 0.5, 1]}\n style={[this.styles.gradient, {backgroundColor: this.styles.animatedView.backgroundColor}]} />\n </Animated.View> : null}\n </View>);\n }\n}\n\nexport const createSkeleton = (theme: Theme, skeletonStyles: WmSkeletonStyles, wrapper: ViewStyle, children?: React.ReactNode) => {\n const style = {} as ViewStyle;\n const addStyleProp = (propName: any) => {\n if (!isUndefined((wrapper as any)[propName])) {\n (style as any)[propName] = (wrapper as any)[propName];\n }\n };\n addStyleProp('width');\n addStyleProp('height');\n addStyleProp('borderRadius');\n addStyleProp('borderRadius');\n addStyleProp('marginTop');\n addStyleProp('marginBottom');\n addStyleProp('marginLeft');\n addStyleProp('marginRight');\n return(<WmSkeleton styles={theme.mergeStyle(skeletonStyles, {root: style})} children={children}/>);\n};\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,UAAU,QAAkD,cAAc;AAC3G,SAASC,cAAc,QAAQ,sBAAsB;AAErD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SAASC,WAAW,QAAQ,WAAW;AAEvC,OAAO,MAAMC,eAAe,SAASJ,kBAAkB,CAAkB;EAAAK,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,iBAC9D;MACPC,IAAI,EAAE,CAAC;MACPC,GAAG,EAAE,CAAC;MACNC,KAAK,EAAE,CAAC;MACRC,MAAM,EAAE;IACV,CAAC;IAAAJ,eAAA,kBACS,KAAK;EAAA;AACjB;AAEA,MAAMK,eAAe,CAAC;EAAAP,YAAA;IAAAE,eAAA,eACG,IAAI;IAAAA,eAAA,gBACZ,CAAC;IAAAA,eAAA,kBACE,CAAC;IAAAA,eAAA,yBACM,IAAIZ,QAAQ,CAACkB,KAAK,CAAC,GAAG,CAAC;EAAA;EAEzCC,GAAGA,CAAA,EAAG;IACX,IAAI,IAAI,CAACC,OAA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CAACV,MAAM,CAACI,YAAY,CAACM;MAAe,CAAC;IAAE,CAAE,CAClF,CAAC,GAAG,IACjB,CAAC;EACX;AACF;AAEA,OAAO,MAAMI,cAAc,GAAGA,CAACC,KAAY,EAAEC,cAAgC,EAAEC,OAAkB,EAAEf,QAA0B,KAAK;EAChI,MAAMH,KAAK,GAAG,CAAC,CAAc;EAC7B,MAAMmB,YAAY,GAAIC,QAAa,IAAK;IACtC,IAAI,CAAChF,WAAW,CAAE8E,OAAO,CAASE,QAAQ,CAAC,CAAC,EAAE;MAC3CpB,KAAK,CAASoB,QAAQ,CAAC,GAAIF,OAAO,CAASE,QAAQ,CAAC;IACvD;EACF,CAAC;EACDD,YAAY,CAAC,OAAO,CAAC;EACrBA,YAAY,CAAC,QAAQ,CAAC;EACtBA,YAAY,CAAC,cAAc,CAAC;EAC5BA,YAAY,CAAC,cAAc,CAAC;EAC5BA,YAAY,CAAC,WAAW,CAAC;EACzBA,YAAY,CAAC,cAAc,CAAC;EAC5BA,YAAY,CAAC,YAAY,CAAC;EAC1BA,YAAY,CAAC,aAAa,CAAC;EAC3B,oBAAOzF,KAAA,CAAAkE,aAAA,CAAC1B,UAAU;IAAC+B,MAAM,EAAEe,KAAK,CAACK,UAAU,CAACJ,cAAc,EAAE;MAACf,IAAI,EAAEF;IAAK,CAAC,CAAE;IAACG,QAAQ,EAAEA;EAAS,CAAC,CAAC;AACnG,CAAC","ignoreList":[]}
|
@@ -10,6 +10,7 @@ import { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';
|
|
10
10
|
import { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';
|
11
11
|
import { PartialHost, PartialHostState } from './partial-host.component';
|
12
12
|
import { createSkeleton } from '../basic/skeleton/skeleton.component';
|
13
|
+
import { ScrollView } from 'react-native-gesture-handler';
|
13
14
|
export class WmContainerState extends PartialHostState {
|
14
15
|
constructor(...args) {
|
15
16
|
super(...args);
|
@@ -65,8 +66,14 @@ export default class WmContainer extends PartialHost {
|
|
65
66
|
}, this.getBackground(), /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(), {
|
66
67
|
target: this,
|
67
68
|
styles: dimensions
|
68
|
-
}), /*#__PURE__*/React.createElement(View, {
|
69
|
+
}), !props.scrollable ? /*#__PURE__*/React.createElement(View, {
|
69
70
|
style: [dimensions, this.styles.content]
|
71
|
+
}, this.renderContent(props)) : /*#__PURE__*/React.createElement(ScrollView, {
|
72
|
+
style: [dimensions, this.styles.content],
|
73
|
+
onScroll: event => {
|
74
|
+
this.notify('scroll', [event]);
|
75
|
+
},
|
76
|
+
scrollEventThrottle: 48
|
70
77
|
}, this.renderContent(props))));
|
71
78
|
}
|
72
79
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","WmContainerProps","DEFAULT_CLASS","Tappable","Animatedview","PartialHost","PartialHostState","createSkeleton","WmContainerState","constructor","args","_defineProperty","WmContainer","props","getBackground","_showSkeleton","_background","renderSkeleton","showskeletonchildren","_this$props","dimensions","width","styles","root","undefined","height","skeletonStyles","skeleton","text","theme","createElement","style","opacity","_extends","getTestPropsForAction","target","content","renderContent","renderWidget","entryanimation","animation","delay","animationdelay"],"sources":["container.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ColorValue, View, ViewStyle } from 'react-native';\n\nimport WmContainerProps from './container.props';\nimport { DEFAULT_CLASS, WmContainerStyles } from './container.styles';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { PartialHost, PartialHostState } from './partial-host.component';\nimport { createSkeleton } from '../basic/skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '../basic/skeleton/skeleton.styles';\n\nexport class WmContainerState extends PartialHostState<WmContainerProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmContainer extends PartialHost<WmContainerProps, WmContainerState, WmContainerStyles> {\n constructor(props: WmContainerProps) {\n super(props, DEFAULT_CLASS, new WmContainerProps(), new WmContainerState());\n }\n\n getBackground(): React.JSX.Element | null {\n return this._showSkeleton ? null : this._background\n } \n \n public renderSkeleton(props: WmContainerProps): React.ReactNode {\n if(!props.showskeletonchildren) {\n const dimensions = {\n width: this.styles.root.width ? '100%' : undefined,\n height: this.styles.root.height ? '100%' : undefined\n }; \n const skeletonStyles: WmSkeletonStyles = this.props?.styles?.skeleton || { root: {}, text: {} } as WmSkeletonStyles\n return createSkeleton(this.theme, skeletonStyles, {\n ...this.styles.root\n }, (<View style={[this.styles.root, { opacity: 0 }]}>\n <Tappable {...this.getTestPropsForAction()} target={this} styles={dimensions}>\n <View style={[dimensions as ViewStyle, this.styles.content]}>{this.renderContent(props)}</View>\n </Tappable>\n\n </View>))\n }\n return null;\n }\n\n\n renderWidget(props: WmContainerProps) {\n const dimensions = {\n width: this.styles.root.width ? '100%' : undefined,\n height: this.styles.root.height ? '100%' : undefined\n };\n\n const styles = this._showSkeleton ? {\n ...this.styles.root,\n ...this.styles.skeleton.root\n } : this.styles.root\n return (\n <Animatedview entryanimation={props.animation} delay={props.animationdelay} style={styles}>\n {this.getBackground()}\n <Tappable {...this.getTestPropsForAction()} target={this} styles={dimensions}>\n <View style={[dimensions as ViewStyle, this.styles.content]}>{this.renderContent(props)}</View>\n </Tappable>\n </Animatedview>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAqBC,IAAI,QAAmB,cAAc;AAE1D,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AACrE,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAASC,WAAW,EAAEC,gBAAgB,QAAQ,0BAA0B;AACxE,SAASC,cAAc,QAAQ,sCAAsC;
|
1
|
+
{"version":3,"names":["React","View","WmContainerProps","DEFAULT_CLASS","Tappable","Animatedview","PartialHost","PartialHostState","createSkeleton","ScrollView","WmContainerState","constructor","args","_defineProperty","WmContainer","props","getBackground","_showSkeleton","_background","renderSkeleton","showskeletonchildren","_this$props","dimensions","width","styles","root","undefined","height","skeletonStyles","skeleton","text","theme","createElement","style","opacity","_extends","getTestPropsForAction","target","content","renderContent","renderWidget","entryanimation","animation","delay","animationdelay","scrollable","onScroll","event","notify","scrollEventThrottle"],"sources":["container.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ColorValue, View, ViewStyle } from 'react-native';\n\nimport WmContainerProps from './container.props';\nimport { DEFAULT_CLASS, WmContainerStyles } from './container.styles';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { PartialHost, PartialHostState } from './partial-host.component';\nimport { createSkeleton } from '../basic/skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '../basic/skeleton/skeleton.styles';\nimport { ScrollView } from 'react-native-gesture-handler';\n\nexport class WmContainerState extends PartialHostState<WmContainerProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmContainer extends PartialHost<WmContainerProps, WmContainerState, WmContainerStyles> {\n constructor(props: WmContainerProps) {\n super(props, DEFAULT_CLASS, new WmContainerProps(), new WmContainerState());\n }\n\n getBackground(): React.JSX.Element | null {\n return this._showSkeleton ? null : this._background\n } \n \n public renderSkeleton(props: WmContainerProps): React.ReactNode {\n if(!props.showskeletonchildren) {\n const dimensions = {\n width: this.styles.root.width ? '100%' : undefined,\n height: this.styles.root.height ? '100%' : undefined\n }; \n const skeletonStyles: WmSkeletonStyles = this.props?.styles?.skeleton || { root: {}, text: {} } as WmSkeletonStyles\n return createSkeleton(this.theme, skeletonStyles, {\n ...this.styles.root\n }, (<View style={[this.styles.root, { opacity: 0 }]}>\n <Tappable {...this.getTestPropsForAction()} target={this} styles={dimensions}>\n <View style={[dimensions as ViewStyle, this.styles.content]}>{this.renderContent(props)}</View>\n </Tappable>\n\n </View>))\n }\n return null;\n }\n\n\n renderWidget(props: WmContainerProps) {\n const dimensions = {\n width: this.styles.root.width ? '100%' : undefined,\n height: this.styles.root.height ? '100%' : undefined\n };\n\n const styles = this._showSkeleton ? {\n ...this.styles.root,\n ...this.styles.skeleton.root\n } : this.styles.root\n return (\n <Animatedview entryanimation={props.animation} delay={props.animationdelay} style={styles}>\n {this.getBackground()}\n <Tappable {...this.getTestPropsForAction()} target={this} styles={dimensions}>\n {!props.scrollable ? <View style={[dimensions as ViewStyle, this.styles.content]}>{this.renderContent(props)}</View> : \n <ScrollView style={[dimensions as ViewStyle, this.styles.content]}\n onScroll={(event) => {this.notify('scroll', [event])}}\n scrollEventThrottle={48}>\n {this.renderContent(props)}\n </ScrollView>}\n </Tappable>\n </Animatedview>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAqBC,IAAI,QAAmB,cAAc;AAE1D,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AACrE,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAASC,WAAW,EAAEC,gBAAgB,QAAQ,0BAA0B;AACxE,SAASC,cAAc,QAAQ,sCAAsC;AAErE,SAASC,UAAU,QAAQ,8BAA8B;AAEzD,OAAO,MAAMC,gBAAgB,SAASH,gBAAgB,CAAmB;EAAAI,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,0BACrD,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,WAAW,SAASR,WAAW,CAAwD;EAC1GK,WAAWA,CAACI,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEZ,aAAa,EAAE,IAAID,gBAAgB,CAAC,CAAC,EAAE,IAAIQ,gBAAgB,CAAC,CAAC,CAAC;EAC7E;EAEAM,aAAaA,CAAA,EAA6B;IACxC,OAAO,IAAI,CAACC,aAAa,GAAG,IAAI,GAAG,IAAI,CAACC,WAAW;EACrD;EAEOC,cA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