@wavemaker/app-rn-runtime 12.0.0-next.140494 → 12.0.0-next.140498
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 +5 -3
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +3 -3
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +1 -0
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +2 -1
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.styles.js +1 -0
- app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +2 -4
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +2 -2
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +0 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +14 -8
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js +1 -0
- app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +2 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +2 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +1 -1
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +6 -3
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +5 -5
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +10 -7
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +2 -2
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +2 -3
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/core/base.component.js +1 -0
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/textinput.component.js +3 -3
- app-rn-runtime/core/components/textinput.component.js.map +1 -1
- app-rn-runtime/core/props.provider.js +4 -1
- app-rn-runtime/core/props.provider.js.map +1 -1
- app-rn-runtime/package.json +3 -3
- app-rn-runtime/runtime/base-fragment.component.js +15 -0
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
@@ -1,3 +1,4 @@
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
1
2
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
2
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
4
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
@@ -194,10 +195,11 @@ export default class WmCarousel extends BaseComponent {
|
|
194
195
|
flexDirection: this.isRTL ? 'row-reverse' : 'row'
|
195
196
|
}
|
196
197
|
}, data.map((item, index) => {
|
197
|
-
return index >= minIndex && index <= maxIndex ? /*#__PURE__*/React.createElement(View, {
|
198
|
-
key: 'dots_' + this.generateItemKey(item, index, this.state.props)
|
198
|
+
return index >= minIndex && index <= maxIndex ? /*#__PURE__*/React.createElement(View, _extends({
|
199
|
+
key: 'dots_' + this.generateItemKey(item, index, this.state.props)
|
200
|
+
}, this.getTestPropsForAction('indicator' + index), {
|
199
201
|
style: [this.styles.dotStyle]
|
200
|
-
}) : null;
|
202
|
+
})) : null;
|
201
203
|
}), /*#__PURE__*/React.createElement(Animated.View, {
|
202
204
|
style: [this.styles.dotStyle, this.styles.activeDotStyle, {
|
203
205
|
width: undefined,
|
@@ -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","animation","animationinterval","intervalId","setInterval","next","clearInterval","setTimeout","_this$animationView5","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","createElement","style","dotsWrapperStyle","flexDirection","map","key","activeDotStyle","undefined","height","transform","translateX","right","left","renderWidget","_data","_this$styles$slide","hasNavs","controls","hasDots","slideScale","slideTranslateX","slide","_this$styles$slide2","_this$styles$slide3","find","o","root","_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","renderItem","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';\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 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 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 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)} \n style={[this.styles.dotStyle]}>\n </View>) : null;\n })\n }\n <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 </View>\n </View>);\n }\n\n renderWidget(props: WmCarouselProps) {\n const hasNavs = props.controls === 'both' || props.controls ==='navs';\n const hasDots = props.controls === 'both' || props.controls ==='indicators';\n let styles = this.styles;\n let data = props.type === 'dynamic' ? props.dataset : props.children;\n data = isArray(data) ? data : [];\n this.noOfSlides = data?.length || 0;\n let slideScale = undefined as any;\n let slideTranslateX = undefined as any;\n if (isArray(this.styles.slide?.transform)) {\n slideScale = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).scale)) as any)?.scale;\n slideTranslateX = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).translateX)) as any)?.translateX;\n }\n // TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608\n return (\n <View style={styles.root}>\n {this._background}\n <SwipeAnimation.View \n enableGestures={props.enablegestures && this.noOfSlides > 1}\n style={{\n flex: 1\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\n slideMinWidth={this.styles.slide.width}\n >\n {data.map((item: any, index: number) => {\n const isActive = index === this.state.activeIndex - 1;\n let scale = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [slideScale, slideScale, 1, slideScale, slideScale]\n });\n let translateX = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [-56, -56, 0, 56, 56]\n });\n return (\n <Animated.View key={this.generateItemKey(item, index, props)}\n onLayout={this.addSlideLayout.bind(this, index)}\n style={[\n {height: props.type === 'dynamic' ? undefined : '100%'},\n this.styles.slide,\n index === 0 ? this.styles.firstSlide : null,\n index === data.length - 1 ? this.styles.lastSlide: null,\n isActive ? this.styles.activeSlide: null,\n translateX && scale ? {\n transform: [\n {\n translateX: !isUndefined(slideTranslateX) ? slideTranslateX : translateX\n }, {\n scale: scale\n }\n ]\n } : null]}>\n <Tappable onTap={() => {\n this.onSlideChange(index + 1);\n const position = this.slidesLayout\n .filter((l , i) => i < index)\n .reduce((s, l) => s + l.width, 0);\n this.animationView?.setPosition(-1 * position);\n }} rippleColor={this.styles.root.rippleColor} styles={{height: \"100%\"}}>\n {this.renderItem(item, index)}\n </Tappable>\n </Animated.View>\n );\n })}\n </SwipeAnimation.View>\n {hasNavs ? (\n <View style={styles.btnPanel}>\n <WmIcon\n id={this.getTestId('prev_icon')}\n iconclass=\"wi wi-chevron-left fa-2x\"\n styles={styles.prevBtn}\n onTap={this.prev}\n accessibilitylabel='back'/>\n <WmIcon\n id={this.getTestId('next_icon')}\n iconclass=\"wi wi-chevron-right fa-2x\"\n styles={styles.nextBtn}\n onTap={this.next}\n accessibilitylabel='next'/>\n </View>): null}\n {hasDots && data ? this.renderPagination(data) : null}\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,EAAEC,WAAW,QAAQ,WAAW;AAChD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,QAA4C,cAAc;AACzF,SAASC,mBAAmB,QAAQ,8CAA8C;AAClF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAA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B;MACrCnF,MAAM,EAAEA,MAAM,CAACuF,OAAQ;MACvBX,KAAK,EAAE,IAAI,CAAC3F,IAAK;MACjBqG,kBAAkB,EAAC;IAAM,CAAC,CACxB,CAAC,GAAG,IAAI,EACbzC,OAAO,IAAIrF,IAAI,GAAG,IAAI,CAAC8D,gBAAgB,CAAC9D,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","animation","animationinterval","intervalId","setInterval","next","clearInterval","setTimeout","_this$animationView5","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","createElement","style","dotsWrapperStyle","flexDirection","map","_extends","key","getTestPropsForAction","activeDotStyle","undefined","height","transform","translateX","right","left","renderWidget","_data","_this$styles$slide","hasNavs","controls","hasDots","slideScale","slideTranslateX","slide","_this$styles$slide2","_this$styles$slide3","find","o","root","_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","renderItem","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';\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 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 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 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={[this.styles.dotStyle]}>\n </View>) : null;\n })\n }\n <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 </View>\n </View>);\n }\n\n renderWidget(props: WmCarouselProps) {\n const hasNavs = props.controls === 'both' || props.controls ==='navs';\n const hasDots = props.controls === 'both' || props.controls ==='indicators';\n let styles = this.styles;\n let data = props.type === 'dynamic' ? props.dataset : props.children;\n data = isArray(data) ? data : [];\n this.noOfSlides = data?.length || 0;\n let slideScale = undefined as any;\n let slideTranslateX = undefined as any;\n if (isArray(this.styles.slide?.transform)) {\n slideScale = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).scale)) as any)?.scale;\n slideTranslateX = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).translateX)) as any)?.translateX;\n }\n // TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608\n return (\n <View style={styles.root}>\n {this._background}\n <SwipeAnimation.View \n enableGestures={props.enablegestures && this.noOfSlides > 1}\n style={{\n flex: 1\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\n slideMinWidth={this.styles.slide.width}\n >\n {data.map((item: any, index: number) => {\n const isActive = index === this.state.activeIndex - 1;\n let scale = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [slideScale, slideScale, 1, slideScale, slideScale]\n });\n let translateX = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [-56, -56, 0, 56, 56]\n });\n return (\n <Animated.View key={this.generateItemKey(item, index, props)}\n onLayout={this.addSlideLayout.bind(this, index)}\n style={[\n {height: props.type === 'dynamic' ? undefined : '100%'},\n this.styles.slide,\n index === 0 ? this.styles.firstSlide : null,\n index === data.length - 1 ? this.styles.lastSlide: null,\n isActive ? this.styles.activeSlide: null,\n translateX && scale ? {\n transform: [\n {\n translateX: !isUndefined(slideTranslateX) ? slideTranslateX : translateX\n }, {\n scale: scale\n }\n ]\n } : null]}>\n <Tappable onTap={() => {\n this.onSlideChange(index + 1);\n const position = this.slidesLayout\n .filter((l , i) => i < index)\n .reduce((s, l) => s + l.width, 0);\n this.animationView?.setPosition(-1 * position);\n }} rippleColor={this.styles.root.rippleColor} styles={{height: \"100%\"}}>\n {this.renderItem(item, index)}\n </Tappable>\n </Animated.View>\n );\n })}\n </SwipeAnimation.View>\n {hasNavs ? (\n <View style={styles.btnPanel}>\n <WmIcon\n id={this.getTestId('prev_icon')}\n iconclass=\"wi wi-chevron-left fa-2x\"\n styles={styles.prevBtn}\n onTap={this.prev}\n accessibilitylabel='back'/>\n <WmIcon\n id={this.getTestId('next_icon')}\n iconclass=\"wi wi-chevron-right fa-2x\"\n styles={styles.nextBtn}\n onTap={this.next}\n accessibilitylabel='next'/>\n </View>): null}\n {hasDots && data ? this.renderPagination(data) : null}\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,EAAEC,WAAW,QAAQ,WAAW;AAChD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,QAA4C,cAAc;AACzF,SAASC,mBAAmB,QAAQ,8CAA8C;AAClF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAO,KAAKC,cAAc,MAAM,oDAAoD;AACpF,SAASC,QAAQ,QAAQ,mDAAmD;AAE5E,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAAS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AAQ;MACvBX,KAAK,EAAE,IAAI,CAAC7F,IAAK;MACjBuG,kBAAkB,EAAC;IAAM,CAAC,CACxB,CAAC,GAAG,IAAI,EACbzC,OAAO,IAAIvF,IAAI,GAAG,IAAI,CAAC8D,gBAAgB,CAAC9D,IAAI,CAAC,GAAG,IAC/C,CAAC;EACX;AACF","ignoreList":[]}
|
@@ -46,7 +46,7 @@ export default class WmProgressCircle extends BaseComponent {
|
|
46
46
|
return /*#__PURE__*/React.createElement(View, _extends({
|
47
47
|
style: styles.root,
|
48
48
|
onLayout: this.onLayout.bind(this)
|
49
|
-
}, getAccessibilityProps(AccessibilityWidgetType.PROGRESSCIRCLE, props)), this._background, /*#__PURE__*/React.createElement(Tappable, {
|
49
|
+
}, getAccessibilityProps(AccessibilityWidgetType.PROGRESSCIRCLE, props), this.getTestPropsForAction('progresscircle')), this._background, /*#__PURE__*/React.createElement(Tappable, {
|
50
50
|
target: this,
|
51
51
|
styles: {
|
52
52
|
root: {
|
@@ -54,7 +54,7 @@ export default class WmProgressCircle extends BaseComponent {
|
|
54
54
|
height: '100%'
|
55
55
|
}
|
56
56
|
}
|
57
|
-
}, /*#__PURE__*/React.createElement(AnimatedCircularProgress,
|
57
|
+
}, /*#__PURE__*/React.createElement(AnimatedCircularProgress, {
|
58
58
|
fill: value,
|
59
59
|
width: styles.progressValue.height,
|
60
60
|
backgroundWidth: styles.progressValue.height,
|
@@ -63,7 +63,7 @@ export default class WmProgressCircle extends BaseComponent {
|
|
63
63
|
lineCap: styles.progressValue.buttStyle || "butt",
|
64
64
|
backgroundColor: styles.progressCircle.backgroundColor,
|
65
65
|
size: this.state.radius
|
66
|
-
}
|
66
|
+
}, fill => /*#__PURE__*/React.createElement(View, {
|
67
67
|
style: {
|
68
68
|
alignItems: 'center'
|
69
69
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","Text","isNumber","AnimatedCircularProgress","Tappable","BaseComponent","BaseComponentState","AccessibilityWidgetType","getAccessibilityProps","WmProgressCircleProps","DEFAULT_CLASS","WmProgressCircleState","constructor","args","_defineProperty","WmProgressCircle","props","onLayout","e","width","nativeEvent","layout","height","radius","state","Math","min","updateState","renderWidget","value","datavalue","minvalue","maxvalue","styles","theme","mergeStyle","getStyle","type","showText","captionplacement","createElement","_extends","style","root","bind","PROGRESSCIRCLE","
|
1
|
+
{"version":3,"names":["React","View","Text","isNumber","AnimatedCircularProgress","Tappable","BaseComponent","BaseComponentState","AccessibilityWidgetType","getAccessibilityProps","WmProgressCircleProps","DEFAULT_CLASS","WmProgressCircleState","constructor","args","_defineProperty","WmProgressCircle","props","onLayout","e","width","nativeEvent","layout","height","radius","state","Math","min","updateState","renderWidget","value","datavalue","minvalue","maxvalue","styles","theme","mergeStyle","getStyle","type","showText","captionplacement","createElement","_extends","style","root","bind","PROGRESSCIRCLE","getTestPropsForAction","_background","target","fill","progressValue","backgroundWidth","rotation","tintColor","backgroundColor","lineCap","buttStyle","progressCircle","size","alignItems","text","getTestPropsForLabel","title","subtitle","subTitle"],"sources":["progress-circle.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Text } from 'react-native';\nimport { isNumber } from 'lodash';\nimport { AnimatedCircularProgress } from 'react-native-circular-progress';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nimport WmProgressCircleProps from './progress-circle.props';\nimport { DEFAULT_CLASS, WmProgressCircleStyles } from './progress-circle.styles';\n\n\nexport class WmProgressCircleState extends BaseComponentState<WmProgressCircleProps> {\n radius = 10;\n}\n\nexport default class WmProgressCircle extends BaseComponent<WmProgressCircleProps, WmProgressCircleState, WmProgressCircleStyles> {\n\n constructor(props: WmProgressCircleProps) {\n super(props, DEFAULT_CLASS, new WmProgressCircleProps(), new WmProgressCircleState());\n }\n\n onLayout(e: LayoutChangeEvent) {\n const width = e.nativeEvent.layout.width;\n const height = e.nativeEvent.layout.height;\n let radius = this.state.radius;\n if (!width) {\n radius = height;\n } else if (!height) {\n radius = width;\n } else {\n radius = Math.min(width, height);\n }\n this.updateState({\n radius: radius\n } as WmProgressCircleState);\n }\n\n renderWidget(props: WmProgressCircleProps) {\n let value = 0;\n if (isNumber(props.datavalue) && isNumber(props.minvalue) && isNumber(props.maxvalue)) {\n value = (+props.datavalue - (+props.minvalue)) / (+props.maxvalue - (+props.minvalue)) * 100;\n }\n const styles = this.theme.mergeStyle(this.theme.getStyle(`app-${props.type}-progress-circle`), this.styles);\n const showText = props.captionplacement !== 'hidden';\n return (\n <View style={styles.root} onLayout={this.onLayout.bind(this)} {...getAccessibilityProps(AccessibilityWidgetType.PROGRESSCIRCLE, props)} {...this.getTestPropsForAction('progresscircle')}>\n {this._background}\n <Tappable target={this} styles={{root:{width: '100%', height: '100%'}}}>\n <AnimatedCircularProgress\n fill={value}\n width={styles.progressValue.height}\n backgroundWidth={styles.progressValue.height}\n rotation={0}\n tintColor={styles.progressValue.backgroundColor}\n lineCap={styles.progressValue.buttStyle || \"butt\"}\n backgroundColor={styles.progressCircle.backgroundColor}\n size={this.state.radius}>\n {(fill) => (<View style={{alignItems: 'center'}}>\n <Text style={styles.text} {...this.getTestPropsForLabel('title')}>{ showText ? props.title || value : '' }</Text>\n {showText && props.subtitle ? (<Text style={styles.subTitle} {...this.getTestPropsForLabel('subtitle')}>{ props.subtitle }</Text>) : null}\n </View>)} \n </AnimatedCircularProgress>\n </Tappable>\n </View>); \n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC5D,SAASC,QAAQ,QAAQ,QAAQ;AACjC,SAASC,wBAAwB,QAAQ,gCAAgC;AACzE,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+C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AgB;MACvDI,IAAI,EAAE,IAAI,CAAClC,KAAK,CAACD;IAAO,GACpB0B,IAAI,iBAAMlD,KAAA,CAAAyC,aAAA,CAACxC,IAAI;MAAC0C,KAAK,EAAE;QAACiB,UAAU,EAAE;MAAQ;IAAE,gBAClC5D,KAAA,CAAAyC,aAAA,CAACvC,IAAI,EAAAwC,QAAA;MAACC,KAAK,EAAET,MAAM,CAAC2B;IAAK,GAAK,IAAI,CAACC,oBAAoB,CAAC,OAAO,CAAC,GAAIvB,QAAQ,GAAGtB,KAAK,CAAC8C,KAAK,IAAIjC,KAAK,GAAG,EAAU,CAAC,EAChHS,QAAQ,IAAItB,KAAK,CAAC+C,QAAQ,gBAAIhE,KAAA,CAAAyC,aAAA,CAACvC,IAAI,EAAAwC,QAAA;MAACC,KAAK,EAAET,MAAM,CAAC+B;IAAS,GAAK,IAAI,CAACH,oBAAoB,CAAC,UAAU,CAAC,GAAI7C,KAAK,CAAC+C,QAAgB,CAAC,GAAI,IACjI,CACI,CAClB,CACN,CAAC;EACT;AACF","ignoreList":[]}
|
@@ -582,6 +582,7 @@ export class BaseChartComponent extends BaseComponent {
|
|
582
582
|
renderLoadingIcon() {
|
583
583
|
const props = this.state.props;
|
584
584
|
return /*#__PURE__*/React.createElement(WmIcon, {
|
585
|
+
id: this.getTestId('loadericon'),
|
585
586
|
styles: this.styles.loadingIcon,
|
586
587
|
iconclass: props.loadingicon,
|
587
588
|
caption: props.loadingdatamsg
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Dimensions","View","Text","moment","forEach","get","isArray","isEmpty","isObject","maxBy","minBy","set","trim","orderBy","VictoryAxis","VictoryLegend","VictoryLabel","BaseComponent","BaseComponentState","WmIcon","ThemeFactory","DEFAULT_CLASS","constructSampleData","getChartType","isWebPreviewMode","BaseChartComponentState","constructor","args","_defineProperty","undefined","screenWidth","width","shapes","SI_SYMBOL","BaseChartComponent","props","defaultClass","defaultProps","defaultState","theme","applyTheme","subscribe","event","updateState","isTooltipOpen","componentDidMount","onViewLayoutChange","e","viewWidth","nativeEvent","layout","viewHeight","height","state","chartWidth","Number","totalHeight","abbreviateNumber","number","tier","Math","log10","abs","suffix","scale","pow","scaled","toFixed","getLegendView","colorScale","showlegend","top","parseInt","styles","root","orientation","createElement","name","gutter","data","legendData","style","border","stroke","borderPadding","left","y","getYScaleMinValue","value","_min","floor","setYAxisFormat","yVal","ynumberformat","matchFixed","match","matchExponential","toExponential","toLocaleString","getXaxis","minIndex","maxIndex","xaxisDatakeyArr","length","getTickValueLabel","xtickexpr","yaxislabeldistance","crossAxis","label","xaxislabel","xaxisdatakey","xunits","axisLabel","mergeStyle","yAxisLabel","grid","hidegridxaxis","xGrid","axis","showxaxis","xAxis","ticks","xTicks","tickLabels","xTickLabels","fixLabelOverlap","autoadjustlabels","axisLabelComponent","tickLabelComponent","offsetyaxis","angle","labelangle","tickCount","invertAxis","isRTL","tickFormat","d","i","getYAxis","showyaxis","ytickexpr","xaxislabeldistance","yaxislabel","yaxisdatakey","yunits","hidegridyaxis","yGrid","yAxis","yTicks","yTickLabels","x","offsetxaxis","dependentAxis","setTooltipTemplate","partialName","template","setTooltipPosition","xCoordinate","offsetX","locationX","yCoordinate","offsetY","locationY","tooltipXPosition","tooltipoffsetx","tooltipYPosition","tooltipoffsety","setTooltipPartialLayout","tooltipLayout","renderPointer","transform","rotate","bottom","tooltipPointer","borderBottomWidth","getTooltip","yAxisData","tooltipYaxis","renderitempartial","onLayout","bind","position","zIndex","selectedItem","index","tooltipContainer","fontSize","fontWeight","tooltipXText","tooltipXaxis","isAxisDomainSupported","type","isAxisDomainValid","areMinMaxValuesValid","values","isFinite","min","max","setDomainValues","xDomainValues","yDomainValues","getXMinMaxValues","getYMinMaxValues","chartMinX","chartMaxX","yMin","chartMinY","chartMaxY","datum","xValues","dataObject","yValues","minValues","maxValues","push","setHeightWidthOnChart","cb","chartHeight","themeName","colorsToUse","customcolors","split","map","themeToUse","getColorsObj","getTheme","colors","prepareLegendData","ldata","prepareEvents","_","idx","childName","target","eventKey","String","eventHandlers","onClick","mutation","onMouseOver","onMouseOut","getxAxisVal","dataObj","xKey","isValid","isNaN","replace","prepareDataItems","dataset","xaxis","yaxis","datasets","_yaxis","shape","yPts","o","xindex","xVal","parseFloat","bubblesize","invokeEventCallback","proxy","setTimeout","endAngle","updateData","renderLoadingIcon","loadingIcon","iconclass","loadingicon","caption","loadingdatamsg","labeltype","setTotal","ydomain","xdomain","loading","total","onPropertyChange","$new","$old","units","xLabel","yLabel","getDataType","widgetContext","Error"],"sources":["basechart.component.tsx"],"sourcesContent":["import React from \"react\";\nimport { Dimensions, View, Text, LayoutChangeEvent, LayoutRectangle} from 'react-native';\nimport moment from \"moment\";\nimport {forEach, get, isArray, isEmpty, isObject, maxBy, minBy, set, trim, orderBy} from \"lodash-es\";\nimport { ScatterSymbolType } from \"victory-core\";\nimport {VictoryAxis, VictoryLegend, VictoryLabel, VictoryVoronoiContainer, VictoryTooltip} from \"victory-native\";\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.component\";\nimport ThemeFactory from \"@wavemaker/app-rn-runtime/components/chart/theme/chart.theme\";\n\nimport BaseChartComponentProps from \"./basechart.props\";\nimport { DEFAULT_CLASS, BaseChartComponentStyles} from \"./basechart.styles\";\nimport _ from \"lodash\";\nimport { constructSampleData, getChartType } from \"./staticdata\";\nimport { isWebPreviewMode } from \"@wavemaker/app-rn-runtime/core/utils\";\n\nexport class BaseChartComponentState <T extends BaseChartComponentProps> extends BaseComponentState<T> {\n data: any = [];\n content: any = null;\n yAxis: Array<string> = [];\n xaxisDatakeyArr: Array<any> = [];\n legendData: any = [];\n theme: any;\n colors: any;\n xLabel: string = '';\n yLabel: string = '';\n total: number = 0;\n endAngle: number = 0;\n loading: boolean = true;\n chartHeight: number = 0;\n chartWidth: number = 0;\n totalHeight: number = 0;\n chartMinY: number | undefined = undefined;\n chartMinX: number | undefined = undefined;\n chartMaxY: number | undefined = undefined;\n chartMaxX: number | undefined = undefined;\n tooltipXPosition = 0;\n tooltipYPosition = 0;\n tooltipXaxis = 0;\n tooltipYaxis = 0;\n tooltipoffsetx: number = 50;\n tooltipoffsety: number = 60;\n isTooltipOpen: boolean = false;\n selectedItem: any = {}\n template: string = \"\";\n}\n\nconst screenWidth = Dimensions.get(\"window\").width;\n\nconst shapes: {[key: string]: any} = {\n 'circle': 'circle',\n 'cross': 'cross',\n 'diamond': 'diamond',\n 'plus': 'plus',\n 'minus': 'minus',\n 'square': 'square',\n 'star': 'star',\n 'triangle-down': 'triangleDown',\n 'triangle-up': 'triangleUp',\n};\n\nconst SI_SYMBOL = [\"\", \"k\", \"M\", \"G\", \"T\", \"P\", \"E\"];\n\nexport abstract class BaseChartComponent<T extends BaseChartComponentProps, S extends BaseChartComponentState<T>, L extends BaseChartComponentStyles> extends BaseComponent<T, S, L> {\n protected screenWidth: number = screenWidth;\n constructor(props: T, public defaultClass: string = DEFAULT_CLASS, defaultProps?: T, defaultState?: S) {\n super(props, defaultClass, defaultProps, defaultState);\n if (!props.theme) {\n this.applyTheme(props);\n }\n this.subscribe('globaltouch', (event: any) => {\n this.updateState({\n isTooltipOpen: false\n } as any)\n });\n }\n\n componentDidMount() {\n super.componentDidMount();\n }\n\n onViewLayoutChange(e: LayoutChangeEvent){\n let viewWidth = e.nativeEvent.layout.width;\n let viewHeight = e.nativeEvent.layout.height;\n if (this?.state && viewWidth !== this.state.chartWidth) {\n this.updateState({\n chartWidth: Number(viewWidth),\n totalHeight: Number(viewHeight)\n } as any)\n }\n }\n\n\n abbreviateNumber(number: any) {\n if (typeof number !== 'number') {\n return number;\n }\n const tier = Math.log10(Math.abs(number)) / 3 | 0;\n\n if (tier == 0) {\n return number;\n }\n\n // get suffix and determine scale\n const suffix = SI_SYMBOL[tier];\n const scale = Math.pow(10, tier * 3);\n\n // scale the number\n var scaled = number / scale;\n\n // format number and add suffix\n return scaled.toFixed(1) + suffix;\n }\n\n getLegendView(colorScale?: any) {\n if (this.state.props.showlegend === 'hide') {\n return null;\n }\n const props = this.state.props;\n let top = props.showlegend === 'bottom' ? parseInt(this.styles.root.height as string) : 0;\n if (top) {\n top = top - (50); // remove legendHeight\n }\n const orientation = (props.showlegend === 'right' || props.showlegend === 'left') ? 'vertical' : 'horizontal';\n return <VictoryLegend\n colorScale={colorScale}\n name={'legendData'}\n orientation={orientation}\n gutter={20}\n data={this.state.legendData}\n style={{ border: { stroke: 'none' } }}\n borderPadding={{top: 30, left: 50}}\n y={top}\n />\n }\n\n getYScaleMinValue(value: number) {\n const _min = Math.floor(value);\n return Math.abs(value) - _min > 0 ? value - .1 : _min - 1;\n };\n\n setYAxisFormat(yVal: any, ynumberformat: string){\n const matchFixed = ynumberformat.match(/\\.([0-9])f/);\n const matchExponential = ynumberformat.match(/\\.([0-9])g/);\n if (matchFixed) {\n return yVal.toFixed(parseInt(matchFixed[1], 10));\n } else if (matchExponential) {\n return yVal.toExponential(parseInt(matchExponential[1], 10));\n }\n switch (ynumberformat) {\n case '%':\n return (yVal * 100).toFixed(0) + '%';\n case 'Billion':\n return (yVal / 1e9).toFixed(1) + 'B';\n case 'Million':\n return (yVal / 1e6).toFixed(1) + 'M';\n case 'Thousand':\n return (yVal / 1e3).toFixed(1) + 'K';\n case ',r':\n return yVal.toLocaleString();\n }\n }\n\n // x axis with vertical lines having grid stroke colors\n getXaxis() {\n const minIndex = 0;\n const maxIndex = this.state.xaxisDatakeyArr.length - 1;\n const props = this.state.props;\n const getTickValueLabel = props.xtickexpr as any;\n let height = this.styles.root.height || 250;\n let yaxislabeldistance = props.yaxislabeldistance ? props.yaxislabeldistance : height as number - 20;\n if (height && typeof height === 'string') {\n height = parseInt(height);\n }\n return <VictoryAxis crossAxis={false} label={(props.xaxislabel || props.xaxisdatakey || \"name\") + (props.xunits ? `(${props.xunits})` : '')}\n style={{\n axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel),\n grid: props.hidegridxaxis ?\n { stroke: null } : this.theme.mergeStyle(this.styles.grid, this.styles.xGrid),\n axis: props.showxaxis === false ?\n { stroke: 'none' } : this.theme.mergeStyle(this.styles.axis, this.styles.xAxis),\n ticks: this.theme.mergeStyle(this.styles.ticks, this.styles.xTicks),\n tickLabels: this.theme.mergeStyle(this.styles.tickLabels, this.styles.xTickLabels)\n }}\n fixLabelOverlap= {props.autoadjustlabels?true:false}\n axisLabelComponent={<VictoryLabel y={yaxislabeldistance}/>}\n tickLabelComponent={<VictoryLabel y={props.offsetyaxis ? props.offsetyaxis : height as number - 30} angle={props.labelangle || 0}/>} theme={this.state.theme}\n tickCount={this.state.xaxisDatakeyArr.length} \n invertAxis={this.isRTL}\n tickFormat= {(d: number, i: number, ticks: any) => {\n if (getTickValueLabel) {\n return getTickValueLabel(this.state.xaxisDatakeyArr[d], i, (ticks || []).length);\n } else if (this.state.xaxisDatakeyArr) {\n return this.state.xaxisDatakeyArr[d];\n }\n return '';\n }}\n />; \n} \n\n\n /* y axis with horizontal lines having grid stroke colors*/\n getYAxis() {\n const props = this.state.props;\n if (props.showyaxis === false) {\n return null;\n }\n const getTickValueLabel = props.ytickexpr as any;\n const ynumberformat = props.ynumberformat;\n let xaxislabeldistance = props.xaxislabeldistance ? props.xaxislabeldistance : 20\n return <VictoryAxis crossAxis={false} label={(props.yaxislabel || props.yaxisdatakey) + (props.yunits ? `(${props.yunits})` : '')}\n style={{\n axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel),\n grid: props.hidegridyaxis ? { stroke: null } : this.theme.mergeStyle(this.styles.grid, this.styles.yGrid),\n axis: props.showxaxis === false ?\n { stroke: 'none' } : this.theme.mergeStyle(this.styles.axis, this.styles.yAxis),\n ticks: this.theme.mergeStyle(this.styles.ticks, this.styles.yTicks),\n tickLabels: this.theme.mergeStyle(this.styles.tickLabels, this.styles.yTickLabels)\n }}\n fixLabelOverlap= {props.autoadjustlabels?true:false}\n axisLabelComponent={<VictoryLabel x={xaxislabeldistance}/>}\n tickLabelComponent={<VictoryLabel x={props.offsetxaxis ? props.offsetxaxis : 50}/>} \n theme={this.state.theme}\n tickFormat= {(d: number, i: number, ticks: any) => {\n if (getTickValueLabel) {\n return getTickValueLabel(d, i, (ticks || []).length);\n }\n if (ynumberformat) {\n return this.setYAxisFormat(d, ynumberformat);\n }\n return this.abbreviateNumber(d);\n }}\n orientation={this.isRTL?\"right\":\"left\"}\n dependentAxis />;\n }\n \n setTooltipTemplate(partialName: any) {\n this.updateState({ template: partialName} as any);\n }\n\n setTooltipPosition(nativeEvent: any){\n let xCoordinate = isWebPreviewMode() ? nativeEvent.offsetX : nativeEvent.locationX;\n let yCoordinate = isWebPreviewMode() ? nativeEvent.offsetY : nativeEvent.locationY;\n this.updateState({\n tooltipXPosition: xCoordinate - this.state.tooltipoffsetx,\n tooltipYPosition: yCoordinate - this.state.tooltipoffsety,\n } as any)\n }\n\n setTooltipPartialLayout(event: LayoutChangeEvent){\n let tooltipLayout = event.nativeEvent.layout;\n this.updateState({\n tooltipoffsetx: tooltipLayout.width/2,\n tooltipoffsety: tooltipLayout.height\n } as any)\n }\n \n renderPointer(){\n return (\n <View \n style={[\n {\n transform: [\n { rotate: '180deg' }\n ],\n bottom: -10,\n left: this.state.tooltipoffsetx - this.styles.tooltipPointer.borderBottomWidth/2\n },\n this.styles.tooltipPointer\n ]}\n />\n )\n }\n\n getTooltip() {\n const ynumberformat = this.state.props.ynumberformat;\n let yAxisData = ynumberformat ? this.setYAxisFormat(this.state.tooltipYaxis, ynumberformat) : this.state.tooltipYaxis;\n return this.state.isTooltipOpen ? (\n !isEmpty(this.state.template) && this.props.renderitempartial ?\n <View onLayout={this.setTooltipPartialLayout.bind(this)} style={{ position: \"absolute\", top: this.state.tooltipYPosition as number, left: this.state.tooltipXPosition as number , zIndex: 99}}>\n {this.props.renderitempartial(this.state.selectedItem, this.state.selectedItem.index, this.state.template)}\n {this.renderPointer()}\n </View> : (\n <View style={[\n { position: \"absolute\", top: this.state.tooltipYPosition as number, left: this.state.tooltipXPosition as number},\n this.styles.tooltipContainer\n ]}>\n <Text style={[{ fontSize: 16, fontWeight: 'bold' },this.styles.tooltipXText]}>{this.state.tooltipXaxis}</Text>\n <Text style={this.styles.tooltipXText}>{yAxisData}</Text>\n {this.renderPointer()}\n </View>)\n ) : null;\n } \n\n // X/Y Domain properties are supported only for Column and Area charts\n isAxisDomainSupported(type: string) {\n return type === 'Column'|| type === 'Area';\n }\n\n // Check whether X/Y Domain was set to Min and is supported for the present chart\n isAxisDomainValid(axis: string) {\n const props = this.state.props;\n if (get(props, axis + 'domain') === 'Min' && (this.isAxisDomainSupported(props.type))) {\n return true;\n }\n return false;\n };\n\n// Check whether min and max values are finite or not\n areMinMaxValuesValid(values: any) {\n if (isFinite(values.min) && isFinite(values.max)) {\n return true;\n }\n return false;\n };\n\n setDomainValues() {\n let xDomainValues, yDomainValues;\n if (this.state.data.length > 0) {\n if (this.isAxisDomainValid('x') && typeof this.state.data[0].x === 'number') {\n xDomainValues = this.getXMinMaxValues(this.state.data[0]);\n }\n if (this.isAxisDomainValid('y')) {\n yDomainValues = this.getYMinMaxValues(this.state.data);\n }\n if (xDomainValues) {\n this.updateState({\n chartMinX: yDomainValues.min.x,\n chartMaxX: yDomainValues.max.x\n } as S)\n }\n let yMin;\n if (yDomainValues) {\n if (this.areMinMaxValuesValid({max: yDomainValues.max.y, min: yDomainValues.min.y})) {\n yMin = this.getYScaleMinValue(yDomainValues.min.y);\n }\n this.updateState({\n chartMinY: yMin ? yMin : yDomainValues.min.y,\n chartMaxY: yDomainValues.max.y\n } as S);\n }\n }\n }\n\n // Getting the min and max values among all the x values\n getXMinMaxValues(datum: Array<{x: number, y: any}>) {\n if (!datum) {\n return;\n }\n const xValues: any = {};\n /*\n compute the min x valuex\n eg: When data has objects\n input: [{x:1, y:2}, {x:2, y:3}, {x:3, y:4}]\n min x: 1\n eg: When data has arrays\n input: [[10, 20], [20, 30], [30, 40]];\n min x: 10\n */\n xValues.min = minBy(datum, (dataObject: {x: any, y: any}) => dataObject.x) || {x: undefined};\n /*\n compute the max x value\n eg: When data has objects\n input: [{x:1, y:2}, {x:2, y:3}, {x:3, y:4}]\n max x: 3\n eg: When data has arrays\n input: [[10, 20], [20, 30], [30, 40]];\n max x: 30\n */\n xValues.max = maxBy(datum, (dataObject: {x: any, y: any}) => dataObject.x)|| {x: undefined};\n return xValues;\n }\n\n // Getting the min and max values among all the y values\n getYMinMaxValues(datum: Array<Array<{x: any, y: number}>>) {\n const yValues: any = {},\n minValues: any = [],\n maxValues: any = [];\n if (!datum) {\n return;\n }\n\n /*\n Getting the min and max y values among all the series of data\n compute the min y value\n eg: When data has objects\n input: [[{x:1, y:2}, {x:2, y:3}, {x:3, y:4}], [{x:2, y:3}, {x:3, y:4}, {x:4, y:5}]]\n min y values : '2'(among first set) & '3'(among second set)\n max y values : '4'(among first set) & '5'(among second set)\n\n eg: When data has arrays\n input: [[[10, 20], [20, 30], [30, 40]], [[20, 30], [30, 40], [40, 50]]]\n min y values : '20'(among first set) & '30'(among second set)\n max y values : '40'(among first set) & '50'(among second set)\n */\n\n forEach(datum, data => {\n if (data && !isEmpty(data)) {\n minValues.push(minBy(data, (dataObject: {x: any, y: any}) => { return dataObject.y }));\n maxValues.push(maxBy(data, (dataObject: {x: any, y: any}) => { return dataObject.y }));\n }\n });\n // Gets the least and highest values among all the min and max values of respective series of data\n yValues.min = minBy(minValues, (dataObject: {x: any, y: any}) => dataObject.y) || {y: undefined};\n yValues.max = maxBy(maxValues, (dataObject: {x: any, y: any}) => dataObject.y) || {y: undefined};\n return yValues;\n }\n\n setHeightWidthOnChart(cb?: () => void) {\n let height = this.styles.root.height || 250;\n let width = this.styles.root.width || screenWidth;\n if (height && typeof height === 'string') {\n height = parseInt(height);\n }\n if (width && typeof width === 'string') {\n width = parseInt(width);\n }\n this.updateState({\n chartHeight: height,\n chartWidth: width\n } as S, cb);\n }\n\n applyTheme(props: BaseChartComponentProps) {\n let themeName = props.theme ? props.theme : (props.type === 'Pie' ? 'Azure' : 'Terrestrial');\n let colorsToUse = [];\n if (typeof props.customcolors === 'string' && !isEmpty(props.customcolors)) {\n colorsToUse = props.customcolors.split(',').map(trim);\n }\n let themeToUse;\n if (typeof themeName === 'string') {\n if (!colorsToUse.length) {\n colorsToUse = props.customcolors as string[];\n }\n if(props.customcolors===undefined) {\n colorsToUse = ThemeFactory.getColorsObj(themeName);\n }\n themeToUse = ThemeFactory.getTheme(themeName, props.styles, colorsToUse);\n } else if (typeof themeName === 'object') {\n // if theme is passed as an object then use that custom theme.\n themeToUse = props.theme;\n }\n this.updateState({\n colors: colorsToUse,\n theme: themeToUse\n } as S);\n }\n\n prepareLegendData() {\n const props = this.state.props;\n if (this.state.yAxis) {\n let ldata: any;\n if (props.type === 'Stack') {\n const data = orderBy(this.state.data[0], 'y', 'asc');\n ldata = data.map((d: any) => {\n return {\n name: this.state.xaxisDatakeyArr[d.x]\n }\n });\n } else {\n ldata = this.state.yAxis.map((d: string) => {\n return {\n name: d\n }\n });\n }\n\n this.updateState({\n legendData: ldata\n } as S);\n }\n }\n\n prepareEvents(name: string) {\n return this.state.legendData.map((_: any, idx: number) => {\n return {\n childName: ['legend'],\n target: 'data',\n eventKey: String(idx),\n eventHandlers: {\n onClick: () => {\n return [\n {\n childName: [name + '_' + idx],\n target: 'data',\n eventKey: 'all',\n mutation: (props: any) => {\n return null;\n }\n }\n ];\n },\n onMouseOver: () => {\n },\n onMouseOut: () => {\n }\n }\n };\n });\n }\n\n // If date string is bound to xaxis then we are pushing the x values as indexes.\n getxAxisVal(dataObj: {[key: string] : any}, xKey: string, index: number, xaxisDatakeyArr: Array<any>) {\n const value: any = get(dataObj, xKey);\n if (moment(value).isValid() || isNaN(value) || typeof value === 'string' || typeof value === 'number') {\n if (typeof value === \"string\"){\n xaxisDatakeyArr.push(value.replace(\"\\\\n\",\"\\n\"));\n }\n else{\n xaxisDatakeyArr.push(value);\n }\n return index;\n }\n return value;\n }\n\n prepareDataItems(dataset: any) {\n const props = this.state.props;\n let xaxis = props.xaxisdatakey;\n let yaxis = props.yaxisdatakey;\n let xaxisDatakeyArr: Array<any> = [];\n let datasets: any = [];\n if (dataset.length === 0) {\n dataset = constructSampleData(getChartType(this.props), yaxis?.split(','), this.props.shape);\n xaxis = \"x\";\n yaxis = \"y\";\n }\n if (xaxis && yaxis) {\n let yPts = yaxis.split(',');\n yPts.forEach((y: any) => {\n if (xaxis !== y) {\n datasets.push(dataset.map((o: {[key: string] : any}, xindex: number) => {\n const xVal = this.getxAxisVal(o, xaxis, xindex, xaxisDatakeyArr);\n let yVal: string | number = get(o, y);\n if (typeof yVal === 'string') {\n yVal = parseFloat(yVal) || yVal;\n }\n let dataObj = {\n x: xVal,\n y: yVal,\n };\n if (props.bubblesize) {\n set(dataObj, 'size', get(o, props.bubblesize, 5));\n }\n if (props.shape) {\n set(dataObj, 'symbol', shapes[props.shape]);\n }\n return dataObj;\n }));\n }\n });\n // chartTransform\n this.invokeEventCallback('onTransform', [undefined, this.proxy]);\n if (props.type == 'Pie' || props.type === 'Donut') {\n // for animation effect\n setTimeout(() => {\n this.updateState({\n endAngle: 360,\n } as S);\n }, 500);\n }\n this.updateData(datasets, yPts, xaxisDatakeyArr);\n }\n }\n\n\n protected renderLoadingIcon() {\n const props = this.state.props;\n return (<WmIcon styles={this.styles.loadingIcon}\n iconclass={props.loadingicon}\n caption={props.loadingdatamsg}></WmIcon>);\n }\n\n updateData(datasets: any, yPts: any, xaxisDatakeyArr: Array<any>) {\n const props = this.state.props;\n this.updateState({\n data: datasets as any,\n yAxis: yPts,\n xaxisDatakeyArr: xaxisDatakeyArr\n } as S, () => {\n this.prepareLegendData();\n if (!props.labeltype || props.labeltype === 'percent') {\n this.setTotal(this.state.data[0]);\n }\n if (this.isAxisDomainSupported(props.type) && (props.ydomain || props.xdomain)) {\n this.setDomainValues();\n }\n this.updateState({\n loading: false\n } as S);\n });\n }\n\n setTotal(data: Array<{x: any, y: number}>) {\n let total = 0;\n data.forEach((d: {x: any, y: any}) => {\n total += d.y as number;\n });\n this.updateState({\n total: total\n } as S);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n const props = this.state.props;\n let units = '';\n switch(name) {\n case 'customcolors':\n if (isEmpty($new)) {\n return;\n }\n if (typeof $new === 'string') {\n $new = $new.split(',');\n }\n this.updateState({\n colors: $new\n } as S);\n break;\n case 'theme':\n this.applyTheme(props);\n break;\n case 'dataset':\n if (!isArray($new)) {\n if (isObject($new) && !isEmpty($new)) {\n $new = [$new];\n } else {\n $new = [];\n }\n }\n $new && this.prepareDataItems($new);\n break;\n case 'xaxislabel':\n if (props.xunits) {\n units = ' (' + props.xunits + ')';\n }\n this.updateState({\n xLabel: $new + units\n } as S);\n break;\n case 'yaxislabel':\n if (props.yunits) {\n units = ' (' + props.yunits + ')';\n }\n this.updateState({\n yLabel: $new + units\n } as S);\n break;\n }\n }\n}\nfunction getDataType(widgetContext: { yaxisdatakey: string | null | undefined; shape: any; }): any {\n throw new Error(\"Function not implemented.\");\n}\n\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAA2C,cAAc;AACxF,OAAOC,MAAM,MAAM,QAAQ;AAC3B,SAAQC,OAAO,EAAEC,GAAG,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,KAAK,EAAEC,GAAG,EAAEC,IAAI,EAAEC,OAAO,QAAO,WAAW;AAEpG,SAAQC,WAAW,EAAEC,aAAa,EAAEC,YAAY,QAAgD,gBAAgB;AAEhH,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,YAAY,MAAO,8DAA8D;AAGxF,SAASC,aAAa,QAAiC,oBAAoB;AAE3E,SAASC,mBAAmB,EAAEC,YAAY,QAAQ,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;QACP;MACF,KAAK,OAAO;QACV,IAAI,CAAC9O,UAAU,CAACL,KAAK,CAAC;QACtB;MACF,KAAK,SAAS;QACZ,IAAI,CAAC7B,OAAO,CAACgR,IAAI,CAAC,EAAE;UAClB,IAAI9Q,QAAQ,CAAC8Q,IAAI,CAAC,IAAI,CAAC/Q,OAAO,CAAC+Q,IAAI,CAAC,EAAE;YACpCA,IAAI,GAAG,CAACA,IAAI,CAAC;UACf,CAAC,MAAM;YACLA,IAAI,GAAG,EAAE;UACX;QACF;QACAA,IAAI,IAAI,IAAI,CAAC/B,gBAAgB,CAAC+B,IAAI,CAAC;QACnC;MACF,KAAK,YAAY;QACf,IAAInP,KAAK,CAAC4E,MAAM,EAAE;UAChByK,KAAK,GAAG,IAAI,GAAGrP,KAAK,CAAC4E,MAAM,GAAG,GAAG;QACnC;QACA,IAAI,CAACpE,WAAW,CAAC;UACf8O,MAAM,EAAEH,IAAI,GAAGE;QACjB,CAAM,CAAC;QACP;MACF,KAAK,YAAY;QACf,IAAIrP,KAAK,CAAC6G,MAAM,EAAE;UAChBwI,KAAK,GAAG,IAAI,GAAGrP,KAAK,CAAC6G,MAAM,GAAG,GAAG;QACnC;QACA,IAAI,CAACrG,WAAW,CAAC;UACf+O,MAAM,EAAEJ,IAAI,GAAGE;QACjB,CAAM,CAAC;QACP;IACJ;EACF;AACF;AACA,SAASG,WAAWA,CAACC,aAAuE,EAAO;EACjG,MAAM,IAAIC,KAAK,CAAC,2BAA2B,CAAC;AAC9C","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","Dimensions","View","Text","moment","forEach","get","isArray","isEmpty","isObject","maxBy","minBy","set","trim","orderBy","VictoryAxis","VictoryLegend","VictoryLabel","BaseComponent","BaseComponentState","WmIcon","ThemeFactory","DEFAULT_CLASS","constructSampleData","getChartType","isWebPreviewMode","BaseChartComponentState","constructor","args","_defineProperty","undefined","screenWidth","width","shapes","SI_SYMBOL","BaseChartComponent","props","defaultClass","defaultProps","defaultState","theme","applyTheme","subscribe","event","updateState","isTooltipOpen","componentDidMount","onViewLayoutChange","e","viewWidth","nativeEvent","layout","viewHeight","height","state","chartWidth","Number","totalHeight","abbreviateNumber","number","tier","Math","log10","abs","suffix","scale","pow","scaled","toFixed","getLegendView","colorScale","showlegend","top","parseInt","styles","root","orientation","createElement","name","gutter","data","legendData","style","border","stroke","borderPadding","left","y","getYScaleMinValue","value","_min","floor","setYAxisFormat","yVal","ynumberformat","matchFixed","match","matchExponential","toExponential","toLocaleString","getXaxis","minIndex","maxIndex","xaxisDatakeyArr","length","getTickValueLabel","xtickexpr","yaxislabeldistance","crossAxis","label","xaxislabel","xaxisdatakey","xunits","axisLabel","mergeStyle","yAxisLabel","grid","hidegridxaxis","xGrid","axis","showxaxis","xAxis","ticks","xTicks","tickLabels","xTickLabels","fixLabelOverlap","autoadjustlabels","axisLabelComponent","tickLabelComponent","offsetyaxis","angle","labelangle","tickCount","invertAxis","isRTL","tickFormat","d","i","getYAxis","showyaxis","ytickexpr","xaxislabeldistance","yaxislabel","yaxisdatakey","yunits","hidegridyaxis","yGrid","yAxis","yTicks","yTickLabels","x","offsetxaxis","dependentAxis","setTooltipTemplate","partialName","template","setTooltipPosition","xCoordinate","offsetX","locationX","yCoordinate","offsetY","locationY","tooltipXPosition","tooltipoffsetx","tooltipYPosition","tooltipoffsety","setTooltipPartialLayout","tooltipLayout","renderPointer","transform","rotate","bottom","tooltipPointer","borderBottomWidth","getTooltip","yAxisData","tooltipYaxis","renderitempartial","onLayout","bind","position","zIndex","selectedItem","index","tooltipContainer","fontSize","fontWeight","tooltipXText","tooltipXaxis","isAxisDomainSupported","type","isAxisDomainValid","areMinMaxValuesValid","values","isFinite","min","max","setDomainValues","xDomainValues","yDomainValues","getXMinMaxValues","getYMinMaxValues","chartMinX","chartMaxX","yMin","chartMinY","chartMaxY","datum","xValues","dataObject","yValues","minValues","maxValues","push","setHeightWidthOnChart","cb","chartHeight","themeName","colorsToUse","customcolors","split","map","themeToUse","getColorsObj","getTheme","colors","prepareLegendData","ldata","prepareEvents","_","idx","childName","target","eventKey","String","eventHandlers","onClick","mutation","onMouseOver","onMouseOut","getxAxisVal","dataObj","xKey","isValid","isNaN","replace","prepareDataItems","dataset","xaxis","yaxis","datasets","_yaxis","shape","yPts","o","xindex","xVal","parseFloat","bubblesize","invokeEventCallback","proxy","setTimeout","endAngle","updateData","renderLoadingIcon","id","getTestId","loadingIcon","iconclass","loadingicon","caption","loadingdatamsg","labeltype","setTotal","ydomain","xdomain","loading","total","onPropertyChange","$new","$old","units","xLabel","yLabel","getDataType","widgetContext","Error"],"sources":["basechart.component.tsx"],"sourcesContent":["import React from \"react\";\nimport { Dimensions, View, Text, LayoutChangeEvent, LayoutRectangle} from 'react-native';\nimport moment from \"moment\";\nimport {forEach, get, isArray, isEmpty, isObject, maxBy, minBy, set, trim, orderBy} from \"lodash-es\";\nimport { ScatterSymbolType } from \"victory-core\";\nimport {VictoryAxis, VictoryLegend, VictoryLabel, VictoryVoronoiContainer, VictoryTooltip} from \"victory-native\";\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.component\";\nimport ThemeFactory from \"@wavemaker/app-rn-runtime/components/chart/theme/chart.theme\";\n\nimport BaseChartComponentProps from \"./basechart.props\";\nimport { DEFAULT_CLASS, BaseChartComponentStyles} from \"./basechart.styles\";\nimport _ from \"lodash\";\nimport { constructSampleData, getChartType } from \"./staticdata\";\nimport { isWebPreviewMode } from \"@wavemaker/app-rn-runtime/core/utils\";\n\nexport class BaseChartComponentState <T extends BaseChartComponentProps> extends BaseComponentState<T> {\n data: any = [];\n content: any = null;\n yAxis: Array<string> = [];\n xaxisDatakeyArr: Array<any> = [];\n legendData: any = [];\n theme: any;\n colors: any;\n xLabel: string = '';\n yLabel: string = '';\n total: number = 0;\n endAngle: number = 0;\n loading: boolean = true;\n chartHeight: number = 0;\n chartWidth: number = 0;\n totalHeight: number = 0;\n chartMinY: number | undefined = undefined;\n chartMinX: number | undefined = undefined;\n chartMaxY: number | undefined = undefined;\n chartMaxX: number | undefined = undefined;\n tooltipXPosition = 0;\n tooltipYPosition = 0;\n tooltipXaxis = 0;\n tooltipYaxis = 0;\n tooltipoffsetx: number = 50;\n tooltipoffsety: number = 60;\n isTooltipOpen: boolean = false;\n selectedItem: any = {}\n template: string = \"\";\n}\n\nconst screenWidth = Dimensions.get(\"window\").width;\n\nconst shapes: {[key: string]: any} = {\n 'circle': 'circle',\n 'cross': 'cross',\n 'diamond': 'diamond',\n 'plus': 'plus',\n 'minus': 'minus',\n 'square': 'square',\n 'star': 'star',\n 'triangle-down': 'triangleDown',\n 'triangle-up': 'triangleUp',\n};\n\nconst SI_SYMBOL = [\"\", \"k\", \"M\", \"G\", \"T\", \"P\", \"E\"];\n\nexport abstract class BaseChartComponent<T extends BaseChartComponentProps, S extends BaseChartComponentState<T>, L extends BaseChartComponentStyles> extends BaseComponent<T, S, L> {\n protected screenWidth: number = screenWidth;\n constructor(props: T, public defaultClass: string = DEFAULT_CLASS, defaultProps?: T, defaultState?: S) {\n super(props, defaultClass, defaultProps, defaultState);\n if (!props.theme) {\n this.applyTheme(props);\n }\n this.subscribe('globaltouch', (event: any) => {\n this.updateState({\n isTooltipOpen: false\n } as any)\n });\n }\n\n componentDidMount() {\n super.componentDidMount();\n }\n\n onViewLayoutChange(e: LayoutChangeEvent){\n let viewWidth = e.nativeEvent.layout.width;\n let viewHeight = e.nativeEvent.layout.height;\n if (this?.state && viewWidth !== this.state.chartWidth) {\n this.updateState({\n chartWidth: Number(viewWidth),\n totalHeight: Number(viewHeight)\n } as any)\n }\n }\n\n\n abbreviateNumber(number: any) {\n if (typeof number !== 'number') {\n return number;\n }\n const tier = Math.log10(Math.abs(number)) / 3 | 0;\n\n if (tier == 0) {\n return number;\n }\n\n // get suffix and determine scale\n const suffix = SI_SYMBOL[tier];\n const scale = Math.pow(10, tier * 3);\n\n // scale the number\n var scaled = number / scale;\n\n // format number and add suffix\n return scaled.toFixed(1) + suffix;\n }\n\n getLegendView(colorScale?: any) {\n if (this.state.props.showlegend === 'hide') {\n return null;\n }\n const props = this.state.props;\n let top = props.showlegend === 'bottom' ? parseInt(this.styles.root.height as string) : 0;\n if (top) {\n top = top - (50); // remove legendHeight\n }\n const orientation = (props.showlegend === 'right' || props.showlegend === 'left') ? 'vertical' : 'horizontal';\n return <VictoryLegend\n colorScale={colorScale}\n name={'legendData'}\n orientation={orientation}\n gutter={20}\n data={this.state.legendData}\n style={{ border: { stroke: 'none' } }}\n borderPadding={{top: 30, left: 50}}\n y={top}\n />\n }\n\n getYScaleMinValue(value: number) {\n const _min = Math.floor(value);\n return Math.abs(value) - _min > 0 ? value - .1 : _min - 1;\n };\n\n setYAxisFormat(yVal: any, ynumberformat: string){\n const matchFixed = ynumberformat.match(/\\.([0-9])f/);\n const matchExponential = ynumberformat.match(/\\.([0-9])g/);\n if (matchFixed) {\n return yVal.toFixed(parseInt(matchFixed[1], 10));\n } else if (matchExponential) {\n return yVal.toExponential(parseInt(matchExponential[1], 10));\n }\n switch (ynumberformat) {\n case '%':\n return (yVal * 100).toFixed(0) + '%';\n case 'Billion':\n return (yVal / 1e9).toFixed(1) + 'B';\n case 'Million':\n return (yVal / 1e6).toFixed(1) + 'M';\n case 'Thousand':\n return (yVal / 1e3).toFixed(1) + 'K';\n case ',r':\n return yVal.toLocaleString();\n }\n }\n\n // x axis with vertical lines having grid stroke colors\n getXaxis() {\n const minIndex = 0;\n const maxIndex = this.state.xaxisDatakeyArr.length - 1;\n const props = this.state.props;\n const getTickValueLabel = props.xtickexpr as any;\n let height = this.styles.root.height || 250;\n let yaxislabeldistance = props.yaxislabeldistance ? props.yaxislabeldistance : height as number - 20;\n if (height && typeof height === 'string') {\n height = parseInt(height);\n }\n return <VictoryAxis crossAxis={false} label={(props.xaxislabel || props.xaxisdatakey || \"name\") + (props.xunits ? `(${props.xunits})` : '')}\n style={{\n axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel),\n grid: props.hidegridxaxis ?\n { stroke: null } : this.theme.mergeStyle(this.styles.grid, this.styles.xGrid),\n axis: props.showxaxis === false ?\n { stroke: 'none' } : this.theme.mergeStyle(this.styles.axis, this.styles.xAxis),\n ticks: this.theme.mergeStyle(this.styles.ticks, this.styles.xTicks),\n tickLabels: this.theme.mergeStyle(this.styles.tickLabels, this.styles.xTickLabels)\n }}\n fixLabelOverlap= {props.autoadjustlabels?true:false}\n axisLabelComponent={<VictoryLabel y={yaxislabeldistance}/>}\n tickLabelComponent={<VictoryLabel y={props.offsetyaxis ? props.offsetyaxis : height as number - 30} angle={props.labelangle || 0}/>} theme={this.state.theme}\n tickCount={this.state.xaxisDatakeyArr.length} \n invertAxis={this.isRTL}\n tickFormat= {(d: number, i: number, ticks: any) => {\n if (getTickValueLabel) {\n return getTickValueLabel(this.state.xaxisDatakeyArr[d], i, (ticks || []).length);\n } else if (this.state.xaxisDatakeyArr) {\n return this.state.xaxisDatakeyArr[d];\n }\n return '';\n }}\n />; \n} \n\n\n /* y axis with horizontal lines having grid stroke colors*/\n getYAxis() {\n const props = this.state.props;\n if (props.showyaxis === false) {\n return null;\n }\n const getTickValueLabel = props.ytickexpr as any;\n const ynumberformat = props.ynumberformat;\n let xaxislabeldistance = props.xaxislabeldistance ? props.xaxislabeldistance : 20\n return <VictoryAxis crossAxis={false} label={(props.yaxislabel || props.yaxisdatakey) + (props.yunits ? `(${props.yunits})` : '')}\n style={{\n axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel),\n grid: props.hidegridyaxis ? { stroke: null } : this.theme.mergeStyle(this.styles.grid, this.styles.yGrid),\n axis: props.showxaxis === false ?\n { stroke: 'none' } : this.theme.mergeStyle(this.styles.axis, this.styles.yAxis),\n ticks: this.theme.mergeStyle(this.styles.ticks, this.styles.yTicks),\n tickLabels: this.theme.mergeStyle(this.styles.tickLabels, this.styles.yTickLabels)\n }}\n fixLabelOverlap= {props.autoadjustlabels?true:false}\n axisLabelComponent={<VictoryLabel x={xaxislabeldistance}/>}\n tickLabelComponent={<VictoryLabel x={props.offsetxaxis ? props.offsetxaxis : 50}/>} \n theme={this.state.theme}\n tickFormat= {(d: number, i: number, ticks: any) => {\n if (getTickValueLabel) {\n return getTickValueLabel(d, i, (ticks || []).length);\n }\n if (ynumberformat) {\n return this.setYAxisFormat(d, ynumberformat);\n }\n return this.abbreviateNumber(d);\n }}\n orientation={this.isRTL?\"right\":\"left\"}\n dependentAxis />;\n }\n \n setTooltipTemplate(partialName: any) {\n this.updateState({ template: partialName} as any);\n }\n\n setTooltipPosition(nativeEvent: any){\n let xCoordinate = isWebPreviewMode() ? nativeEvent.offsetX : nativeEvent.locationX;\n let yCoordinate = isWebPreviewMode() ? nativeEvent.offsetY : nativeEvent.locationY;\n this.updateState({\n tooltipXPosition: xCoordinate - this.state.tooltipoffsetx,\n tooltipYPosition: yCoordinate - this.state.tooltipoffsety,\n } as any)\n }\n\n setTooltipPartialLayout(event: LayoutChangeEvent){\n let tooltipLayout = event.nativeEvent.layout;\n this.updateState({\n tooltipoffsetx: tooltipLayout.width/2,\n tooltipoffsety: tooltipLayout.height\n } as any)\n }\n \n renderPointer(){\n return (\n <View \n style={[\n {\n transform: [\n { rotate: '180deg' }\n ],\n bottom: -10,\n left: this.state.tooltipoffsetx - this.styles.tooltipPointer.borderBottomWidth/2\n },\n this.styles.tooltipPointer\n ]}\n />\n )\n }\n\n getTooltip() {\n const ynumberformat = this.state.props.ynumberformat;\n let yAxisData = ynumberformat ? this.setYAxisFormat(this.state.tooltipYaxis, ynumberformat) : this.state.tooltipYaxis;\n return this.state.isTooltipOpen ? (\n !isEmpty(this.state.template) && this.props.renderitempartial ?\n <View onLayout={this.setTooltipPartialLayout.bind(this)} style={{ position: \"absolute\", top: this.state.tooltipYPosition as number, left: this.state.tooltipXPosition as number , zIndex: 99}}>\n {this.props.renderitempartial(this.state.selectedItem, this.state.selectedItem.index, this.state.template)}\n {this.renderPointer()}\n </View> : (\n <View style={[\n { position: \"absolute\", top: this.state.tooltipYPosition as number, left: this.state.tooltipXPosition as number},\n this.styles.tooltipContainer\n ]}>\n <Text style={[{ fontSize: 16, fontWeight: 'bold' },this.styles.tooltipXText]}>{this.state.tooltipXaxis}</Text>\n <Text style={this.styles.tooltipXText}>{yAxisData}</Text>\n {this.renderPointer()}\n </View>)\n ) : null;\n } \n\n // X/Y Domain properties are supported only for Column and Area charts\n isAxisDomainSupported(type: string) {\n return type === 'Column'|| type === 'Area';\n }\n\n // Check whether X/Y Domain was set to Min and is supported for the present chart\n isAxisDomainValid(axis: string) {\n const props = this.state.props;\n if (get(props, axis + 'domain') === 'Min' && (this.isAxisDomainSupported(props.type))) {\n return true;\n }\n return false;\n };\n\n// Check whether min and max values are finite or not\n areMinMaxValuesValid(values: any) {\n if (isFinite(values.min) && isFinite(values.max)) {\n return true;\n }\n return false;\n };\n\n setDomainValues() {\n let xDomainValues, yDomainValues;\n if (this.state.data.length > 0) {\n if (this.isAxisDomainValid('x') && typeof this.state.data[0].x === 'number') {\n xDomainValues = this.getXMinMaxValues(this.state.data[0]);\n }\n if (this.isAxisDomainValid('y')) {\n yDomainValues = this.getYMinMaxValues(this.state.data);\n }\n if (xDomainValues) {\n this.updateState({\n chartMinX: yDomainValues.min.x,\n chartMaxX: yDomainValues.max.x\n } as S)\n }\n let yMin;\n if (yDomainValues) {\n if (this.areMinMaxValuesValid({max: yDomainValues.max.y, min: yDomainValues.min.y})) {\n yMin = this.getYScaleMinValue(yDomainValues.min.y);\n }\n this.updateState({\n chartMinY: yMin ? yMin : yDomainValues.min.y,\n chartMaxY: yDomainValues.max.y\n } as S);\n }\n }\n }\n\n // Getting the min and max values among all the x values\n getXMinMaxValues(datum: Array<{x: number, y: any}>) {\n if (!datum) {\n return;\n }\n const xValues: any = {};\n /*\n compute the min x valuex\n eg: When data has objects\n input: [{x:1, y:2}, {x:2, y:3}, {x:3, y:4}]\n min x: 1\n eg: When data has arrays\n input: [[10, 20], [20, 30], [30, 40]];\n min x: 10\n */\n xValues.min = minBy(datum, (dataObject: {x: any, y: any}) => dataObject.x) || {x: undefined};\n /*\n compute the max x value\n eg: When data has objects\n input: [{x:1, y:2}, {x:2, y:3}, {x:3, y:4}]\n max x: 3\n eg: When data has arrays\n input: [[10, 20], [20, 30], [30, 40]];\n max x: 30\n */\n xValues.max = maxBy(datum, (dataObject: {x: any, y: any}) => dataObject.x)|| {x: undefined};\n return xValues;\n }\n\n // Getting the min and max values among all the y values\n getYMinMaxValues(datum: Array<Array<{x: any, y: number}>>) {\n const yValues: any = {},\n minValues: any = [],\n maxValues: any = [];\n if (!datum) {\n return;\n }\n\n /*\n Getting the min and max y values among all the series of data\n compute the min y value\n eg: When data has objects\n input: [[{x:1, y:2}, {x:2, y:3}, {x:3, y:4}], [{x:2, y:3}, {x:3, y:4}, {x:4, y:5}]]\n min y values : '2'(among first set) & '3'(among second set)\n max y values : '4'(among first set) & '5'(among second set)\n\n eg: When data has arrays\n input: [[[10, 20], [20, 30], [30, 40]], [[20, 30], [30, 40], [40, 50]]]\n min y values : '20'(among first set) & '30'(among second set)\n max y values : '40'(among first set) & '50'(among second set)\n */\n\n forEach(datum, data => {\n if (data && !isEmpty(data)) {\n minValues.push(minBy(data, (dataObject: {x: any, y: any}) => { return dataObject.y }));\n maxValues.push(maxBy(data, (dataObject: {x: any, y: any}) => { return dataObject.y }));\n }\n });\n // Gets the least and highest values among all the min and max values of respective series of data\n yValues.min = minBy(minValues, (dataObject: {x: any, y: any}) => dataObject.y) || {y: undefined};\n yValues.max = maxBy(maxValues, (dataObject: {x: any, y: any}) => dataObject.y) || {y: undefined};\n return yValues;\n }\n\n setHeightWidthOnChart(cb?: () => void) {\n let height = this.styles.root.height || 250;\n let width = this.styles.root.width || screenWidth;\n if (height && typeof height === 'string') {\n height = parseInt(height);\n }\n if (width && typeof width === 'string') {\n width = parseInt(width);\n }\n this.updateState({\n chartHeight: height,\n chartWidth: width\n } as S, cb);\n }\n\n applyTheme(props: BaseChartComponentProps) {\n let themeName = props.theme ? props.theme : (props.type === 'Pie' ? 'Azure' : 'Terrestrial');\n let colorsToUse = [];\n if (typeof props.customcolors === 'string' && !isEmpty(props.customcolors)) {\n colorsToUse = props.customcolors.split(',').map(trim);\n }\n let themeToUse;\n if (typeof themeName === 'string') {\n if (!colorsToUse.length) {\n colorsToUse = props.customcolors as string[];\n }\n if(props.customcolors===undefined) {\n colorsToUse = ThemeFactory.getColorsObj(themeName);\n }\n themeToUse = ThemeFactory.getTheme(themeName, props.styles, colorsToUse);\n } else if (typeof themeName === 'object') {\n // if theme is passed as an object then use that custom theme.\n themeToUse = props.theme;\n }\n this.updateState({\n colors: colorsToUse,\n theme: themeToUse\n } as S);\n }\n\n prepareLegendData() {\n const props = this.state.props;\n if (this.state.yAxis) {\n let ldata: any;\n if (props.type === 'Stack') {\n const data = orderBy(this.state.data[0], 'y', 'asc');\n ldata = data.map((d: any) => {\n return {\n name: this.state.xaxisDatakeyArr[d.x]\n }\n });\n } else {\n ldata = this.state.yAxis.map((d: string) => {\n return {\n name: d\n }\n });\n }\n\n this.updateState({\n legendData: ldata\n } as S);\n }\n }\n\n prepareEvents(name: string) {\n return this.state.legendData.map((_: any, idx: number) => {\n return {\n childName: ['legend'],\n target: 'data',\n eventKey: String(idx),\n eventHandlers: {\n onClick: () => {\n return [\n {\n childName: [name + '_' + idx],\n target: 'data',\n eventKey: 'all',\n mutation: (props: any) => {\n return null;\n }\n }\n ];\n },\n onMouseOver: () => {\n },\n onMouseOut: () => {\n }\n }\n };\n });\n }\n\n // If date string is bound to xaxis then we are pushing the x values as indexes.\n getxAxisVal(dataObj: {[key: string] : any}, xKey: string, index: number, xaxisDatakeyArr: Array<any>) {\n const value: any = get(dataObj, xKey);\n if (moment(value).isValid() || isNaN(value) || typeof value === 'string' || typeof value === 'number') {\n if (typeof value === \"string\"){\n xaxisDatakeyArr.push(value.replace(\"\\\\n\",\"\\n\"));\n }\n else{\n xaxisDatakeyArr.push(value);\n }\n return index;\n }\n return value;\n }\n\n prepareDataItems(dataset: any) {\n const props = this.state.props;\n let xaxis = props.xaxisdatakey;\n let yaxis = props.yaxisdatakey;\n let xaxisDatakeyArr: Array<any> = [];\n let datasets: any = [];\n if (dataset.length === 0) {\n dataset = constructSampleData(getChartType(this.props), yaxis?.split(','), this.props.shape);\n xaxis = \"x\";\n yaxis = \"y\";\n }\n if (xaxis && yaxis) {\n let yPts = yaxis.split(',');\n yPts.forEach((y: any) => {\n if (xaxis !== y) {\n datasets.push(dataset.map((o: {[key: string] : any}, xindex: number) => {\n const xVal = this.getxAxisVal(o, xaxis, xindex, xaxisDatakeyArr);\n let yVal: string | number = get(o, y);\n if (typeof yVal === 'string') {\n yVal = parseFloat(yVal) || yVal;\n }\n let dataObj = {\n x: xVal,\n y: yVal,\n };\n if (props.bubblesize) {\n set(dataObj, 'size', get(o, props.bubblesize, 5));\n }\n if (props.shape) {\n set(dataObj, 'symbol', shapes[props.shape]);\n }\n return dataObj;\n }));\n }\n });\n // chartTransform\n this.invokeEventCallback('onTransform', [undefined, this.proxy]);\n if (props.type == 'Pie' || props.type === 'Donut') {\n // for animation effect\n setTimeout(() => {\n this.updateState({\n endAngle: 360,\n } as S);\n }, 500);\n }\n this.updateData(datasets, yPts, xaxisDatakeyArr);\n }\n }\n\n\n protected renderLoadingIcon() {\n const props = this.state.props;\n return (<WmIcon id={this.getTestId('loadericon')} styles={this.styles.loadingIcon}\n iconclass={props.loadingicon}\n caption={props.loadingdatamsg}></WmIcon>);\n }\n\n updateData(datasets: any, yPts: any, xaxisDatakeyArr: Array<any>) {\n const props = this.state.props;\n this.updateState({\n data: datasets as any,\n yAxis: yPts,\n xaxisDatakeyArr: xaxisDatakeyArr\n } as S, () => {\n this.prepareLegendData();\n if (!props.labeltype || props.labeltype === 'percent') {\n this.setTotal(this.state.data[0]);\n }\n if (this.isAxisDomainSupported(props.type) && (props.ydomain || props.xdomain)) {\n this.setDomainValues();\n }\n this.updateState({\n loading: false\n } as S);\n });\n }\n\n setTotal(data: Array<{x: any, y: number}>) {\n let total = 0;\n data.forEach((d: {x: any, y: any}) => {\n total += d.y as number;\n });\n this.updateState({\n total: total\n } as S);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n const props = this.state.props;\n let units = '';\n switch(name) {\n case 'customcolors':\n if (isEmpty($new)) {\n return;\n }\n if (typeof $new === 'string') {\n $new = $new.split(',');\n }\n this.updateState({\n colors: $new\n } as S);\n break;\n case 'theme':\n this.applyTheme(props);\n break;\n case 'dataset':\n if (!isArray($new)) {\n if (isObject($new) && !isEmpty($new)) {\n $new = [$new];\n } else {\n $new = [];\n }\n }\n $new && this.prepareDataItems($new);\n break;\n case 'xaxislabel':\n if (props.xunits) {\n units = ' (' + props.xunits + ')';\n }\n this.updateState({\n xLabel: $new + units\n } as S);\n break;\n case 'yaxislabel':\n if (props.yunits) {\n units = ' (' + props.yunits + ')';\n }\n this.updateState({\n yLabel: $new + units\n } as S);\n break;\n }\n }\n}\nfunction getDataType(widgetContext: { yaxisdatakey: string | null | undefined; shape: any; }): any {\n throw new Error(\"Function not implemented.\");\n}\n\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAA2C,cAAc;AACxF,OAAOC,MAAM,MAAM,QAAQ;AAC3B,SAAQC,OAAO,EAAEC,GAAG,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,KAAK,EAAEC,GAAG,EAAEC,IAAI,EAAEC,OAAO,QAAO,WAAW;AAEpG,SAAQC,WAAW,EAAEC,aAAa,EAAEC,YAAY,QAAgD,gBAAgB;AAEhH,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,YAAY,MAAO,8DAA8D;AAGxF,SAASC,aAAa,QAAiC,oBAAoB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D,KAAK,CAAC,GAAG,CAAC;QACxB;QACA,IAAI,CAAClL,WAAW,CAAC;UACfuL,MAAM,EAAEsD;QACV,CAAM,CAAC;QACP;MACF,KAAK,OAAO;QACV,IAAI,CAAChP,UAAU,CAACL,KAAK,CAAC;QACtB;MACF,KAAK,SAAS;QACZ,IAAI,CAAC7B,OAAO,CAACkR,IAAI,CAAC,EAAE;UAClB,IAAIhR,QAAQ,CAACgR,IAAI,CAAC,IAAI,CAACjR,OAAO,CAACiR,IAAI,CAAC,EAAE;YACpCA,IAAI,GAAG,CAACA,IAAI,CAAC;UACf,CAAC,MAAM;YACLA,IAAI,GAAG,EAAE;UACX;QACF;QACAA,IAAI,IAAI,IAAI,CAACjC,gBAAgB,CAACiC,IAAI,CAAC;QACnC;MACF,KAAK,YAAY;QACf,IAAIrP,KAAK,CAAC4E,MAAM,EAAE;UAChB2K,KAAK,GAAG,IAAI,GAAGvP,KAAK,CAAC4E,MAAM,GAAG,GAAG;QACnC;QACA,IAAI,CAACpE,WAAW,CAAC;UACfgP,MAAM,EAAEH,IAAI,GAAGE;QACjB,CAAM,CAAC;QACP;MACF,KAAK,YAAY;QACf,IAAIvP,KAAK,CAAC6G,MAAM,EAAE;UAChB0I,KAAK,GAAG,IAAI,GAAGvP,KAAK,CAAC6G,MAAM,GAAG,GAAG;QACnC;QACA,IAAI,CAACrG,WAAW,CAAC;UACfiP,MAAM,EAAEJ,IAAI,GAAGE;QACjB,CAAM,CAAC;QACP;IACJ;EACF;AACF;AACA,SAASG,WAAWA,CAACC,aAAuE,EAAO;EACjG,MAAM,IAAIC,KAAK,CAAC,2BAA2B,CAAC;AAC9C","ignoreList":[]}
|
@@ -70,6 +70,7 @@ export default class WmAccordion extends BaseComponent {
|
|
70
70
|
renderAccordionpane(item, index, accordionpanes = []) {
|
71
71
|
const showIconOnLeft = this.styles.leftToggleIcon.root.width !== undefined;
|
72
72
|
const isExpanded = this.state.isExpanded[index];
|
73
|
+
const titleIconStyles = this.theme.mergeStyle(this.styles.icon, this.styles.titleIcon);
|
73
74
|
return item.props.show != false ? /*#__PURE__*/React.createElement(View, {
|
74
75
|
style: this.styles.pane,
|
75
76
|
key: item.props.title
|
@@ -80,7 +81,7 @@ export default class WmAccordion extends BaseComponent {
|
|
80
81
|
onPress: this.toggle.bind(this, index + 1, !isExpanded)
|
81
82
|
}), this.expandCollapseIcon(item, index, false, showIconOnLeft, true, isExpanded), item.props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
|
82
83
|
id: this.getTestId('icon'),
|
83
|
-
styles:
|
84
|
+
styles: titleIconStyles,
|
84
85
|
name: item.props.name + '_icon',
|
85
86
|
iconclass: item.props.iconclass
|
86
87
|
}) : null, /*#__PURE__*/React.createElement(View, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Text","TouchableOpacity","View","Badge","isArray","BaseComponent","BaseComponentState","WmAccordionProps","DEFAULT_CLASS","WmIcon","isDefined","WmAccordionState","constructor","args","_defineProperty","WmAccordion","props","addAccordionPane","accordionPane","_this$state$isExpande","i","accordionPanes","findIndex","t","title","newIndex","state","isExpanded","find","v","toggle","defaultpaneindex","expand","accordionName","name","collapse","expandCollapseIcon","item","index","showBadge","showIcon","useChevron","widgetProps","badge","badgevalue","undefined","createElement","_extends","style","styles","activeBadge","badgetype","getTestProps","iconclass","flexDirection","id","getTestId","theme","mergeStyle","icon","activeIcon","renderAccordionpane","accordionpanes","showIconOnLeft","leftToggleIcon","root","width","show","pane","key","getTestPropsForAction","header","firstHeader","length","lastHeader","activeHeader","onPress","bind","flex","justifyContent","text","heading","activeHeaderTitle","accessibilityRole","description","subheading","expandedId","collapseId","closeothers","lastExpandedIndex","collapsedPane","hide","Promise","resolve","then","expandedPane","setState","invokeEventCallback","proxy","componentDidMount","renderWidget","children","_background","map"],"sources":["accordion.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, TouchableOpacity, View } from 'react-native';\nimport { Badge } from 'react-native-paper';\nimport { isArray } from 'lodash';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmAccordionProps from './accordion.props';\nimport { DEFAULT_CLASS, WmAccordionStyles } from './accordion.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmAccordionpane from './accordionpane/accordionpane.component';\nimport { isDefined } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmAccordionState extends BaseComponentState<WmAccordionProps> {\n lastExpandedIndex = -1;\n isExpanded = [] as boolean[];\n}\n\nexport default class WmAccordion extends BaseComponent<WmAccordionProps, WmAccordionState, WmAccordionStyles> {\n public accordionPanes = [] as WmAccordionpane[];\n private newIndex = 0;\n\n constructor(props: WmAccordionProps) {\n super(props, DEFAULT_CLASS, new WmAccordionProps(), new WmAccordionState());\n }\n\n addAccordionPane(accordionPane: WmAccordionpane) {\n const i = this.accordionPanes.findIndex(t => t.props.title === accordionPane.props.title);\n if (i >= 0) {\n this.accordionPanes[i] = accordionPane;\n } else {\n this.accordionPanes[this.newIndex++] = accordionPane;\n }\n if (!(this.state.isExpanded?.find((v) => v))) {\n this.toggle(this.state.props.defaultpaneindex + 1);\n }\n }\n\n expand(accordionName: string) {\n const i = this.accordionPanes.findIndex(t => t.props.name === accordionName);\n this.toggle(i + 1, true);\n }\n\n collapse(accordionName: string) {\n const i = this.accordionPanes.findIndex(t => t.props.name === accordionName);\n this.toggle(i + 1, false);\n }\n\n expandCollapseIcon(item: any, index: number, showBadge = true, showIcon = true, useChevron = true, isExpanded = false) {\n const widgetProps = item.props;\n //@ts-ignore\n const badge = showBadge && widgetProps.badgevalue != undefined ? (\n <Badge style={[\n this.styles.badge,\n isExpanded ? this.styles.activeBadge: null,\n this.styles[widgetProps.badgetype || 'default']]}\n {...this.getTestProps('badge'+index)}>\n {widgetProps.badgevalue}\n </Badge>): null;\n let iconclass = null;\n if (useChevron) {\n iconclass = isExpanded ? 'wi wi-chevron-down' : 'wi wi-chevron-up';\n } else {\n iconclass = isExpanded ? 'wi wi-minus' : 'wi wi-plus';\n }\n return (<View style={{flexDirection: 'row'}}>\n {badge}\n {showIcon ? (\n <WmIcon\n id={this.getTestId('icon' + index)}\n styles={this.theme.mergeStyle({}, this.styles.icon, isExpanded ? this.styles.activeIcon : null)}\n name={'expand_collapse_icon'}\n iconclass={iconclass}></WmIcon>): null}\n </View>);\n }\n\n renderAccordionpane(item: any, index: any, accordionpanes: any[] = []) {\n const showIconOnLeft = this.styles.leftToggleIcon.root.width !== undefined;\n const isExpanded = this.state.isExpanded[index];\n return item.props.show != false ? (\n <View style={this.styles.pane} key={item.props.title}>\n <TouchableOpacity key={'accordionpane_' + (index + 1)}\n {...this.getTestPropsForAction(`header${index}`)}\n style={[this.styles.header,\n index === 0 ? this.styles.firstHeader: null,\n index === accordionpanes.length - 1 && !isExpanded ? this.styles.lastHeader: null,\n isExpanded ? this.styles.activeHeader : {}]}\n onPress={this.toggle.bind(this, index + 1, !isExpanded)}>\n {this.expandCollapseIcon(item, index, false, showIconOnLeft, true, isExpanded)}\n {item.props.iconclass ? <WmIcon id={this.getTestId('icon')} styles={this.styles.icon} name={item.props.name + '_icon'} iconclass={item.props.iconclass}></WmIcon>: null}\n <View style={{flexDirection: 'column', flex: 1, justifyContent: 'center'}}>\n <Text style={[\n this.styles.text,\n this.styles.heading,\n isExpanded ? this.styles.activeHeaderTitle : {}]}\n {...this.getTestPropsForAction(`header${index}_title`)}\n accessibilityRole='header'>\n {isDefined(item.props.title) ? item.props.title : 'Title'}\n </Text>\n {item.props.description ? \n (<Text style={this.styles.subheading}\n {...this.getTestPropsForAction(`header${index}_description`)}>{item.props.description}</Text>) : null }\n </View>\n {this.expandCollapseIcon(item, index, true, !showIconOnLeft, true, isExpanded)}\n </TouchableOpacity>\n {item}\n </View>\n ): null;\n }\n\n toggle(index: number, expand = true) {\n let expandedId = expand ? index : -1;\n let collapseId = expand ? -1 : index;\n if (expand && this.state.isExpanded[expandedId - 1]\n || !expand && this.state.isExpanded[collapseId - 1] === false) {\n return;\n }\n if (collapseId < 0 && this.state.props.closeothers) {\n collapseId = this.state.lastExpandedIndex;\n }\n const collapsedPane = this.accordionPanes[collapseId -1];\n collapsedPane?.hide();\n Promise.resolve().then(() => {\n const expandedPane = expandedId ? this.accordionPanes[expandedId - 1]: null;\n expandedPane?.show();\n this.setState((state) => {\n if (collapseId > 0 && collapsedPane) {\n state.isExpanded[collapseId - 1] = false;\n }\n if (expandedId > 0 && expandedPane) {\n state.isExpanded[expandedId - 1] = true;\n }\n return {\n lastExpandedIndex: expandedId,\n isExpanded: [...state.isExpanded]\n };\n }, () => {\n this.invokeEventCallback('onChange', [{},\n this.proxy,\n expandedId - 1,\n collapseId ? collapseId - 1 : null,\n expandedPane && expandedPane.props.name,\n collapsedPane && collapsedPane.props.name]);\n });\n }, () => {});\n }\n\n public componentDidMount(): void {\n super.componentDidMount();\n this.toggle(this.state.props.defaultpaneindex + 1);\n }\n\n renderWidget(props: WmAccordionProps) {\n const accordionpanes = props.children;\n const expandedId = this.state.lastExpandedIndex || 0;\n return (\n <View style={this.styles.root}>\n {this._background}\n {accordionpanes\n ? isArray(accordionpanes) && accordionpanes.length\n ? accordionpanes.map((item: any, index: any) => this.renderAccordionpane(item, index, accordionpanes))\n : this.renderAccordionpane(accordionpanes, 0)\n : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAC3D,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,OAAO,QAAQ,QAAQ;AAEhC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AACrE,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,SAASC,SAAS,QAAQ,sCAAsC;AAEhE,OAAO,MAAMC,gBAAgB,SAASL,kBAAkB,CAAmB;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ACpD,oBACI1F,KAAA,CAAA+C,aAAA,CAAC5C,IAAI;MAAC8C,KAAK,EAAE,IAAI,CAACC,MAAM,CAACgB;IAAK,GAC3B,IAAI,CAACqC,WAAW,EACdxC,cAAc,GACX1D,OAAO,CAAC0D,cAAc,CAAC,IAAIA,cAAc,CAACW,MAAM,GAC9CX,cAAc,CAACyC,GAAG,CAAC,CAAClE,IAAS,EAAEC,KAAU,KAAK,IAAI,CAACuB,mBAAmB,CAACxB,IAAI,EAAEC,KAAK,EAAEwB,cAAc,CAAC,CAAC,GACpG,IAAI,CAACD,mBAAmB,CAACC,cAAc,EAAE,CAAC,CAAC,GAC7C,IACF,CAAC;EAEb;AACF","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","Text","TouchableOpacity","View","Badge","isArray","BaseComponent","BaseComponentState","WmAccordionProps","DEFAULT_CLASS","WmIcon","isDefined","WmAccordionState","constructor","args","_defineProperty","WmAccordion","props","addAccordionPane","accordionPane","_this$state$isExpande","i","accordionPanes","findIndex","t","title","newIndex","state","isExpanded","find","v","toggle","defaultpaneindex","expand","accordionName","name","collapse","expandCollapseIcon","item","index","showBadge","showIcon","useChevron","widgetProps","badge","badgevalue","undefined","createElement","_extends","style","styles","activeBadge","badgetype","getTestProps","iconclass","flexDirection","id","getTestId","theme","mergeStyle","icon","activeIcon","renderAccordionpane","accordionpanes","showIconOnLeft","leftToggleIcon","root","width","titleIconStyles","titleIcon","show","pane","key","getTestPropsForAction","header","firstHeader","length","lastHeader","activeHeader","onPress","bind","flex","justifyContent","text","heading","activeHeaderTitle","accessibilityRole","description","subheading","expandedId","collapseId","closeothers","lastExpandedIndex","collapsedPane","hide","Promise","resolve","then","expandedPane","setState","invokeEventCallback","proxy","componentDidMount","renderWidget","children","_background","map"],"sources":["accordion.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, TouchableOpacity, View } from 'react-native';\nimport { Badge } from 'react-native-paper';\nimport { isArray } from 'lodash';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmAccordionProps from './accordion.props';\nimport { DEFAULT_CLASS, WmAccordionStyles } from './accordion.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmAccordionpane from './accordionpane/accordionpane.component';\nimport { isDefined } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmAccordionState extends BaseComponentState<WmAccordionProps> {\n lastExpandedIndex = -1;\n isExpanded = [] as boolean[];\n}\n\nexport default class WmAccordion extends BaseComponent<WmAccordionProps, WmAccordionState, WmAccordionStyles> {\n public accordionPanes = [] as WmAccordionpane[];\n private newIndex = 0;\n\n constructor(props: WmAccordionProps) {\n super(props, DEFAULT_CLASS, new WmAccordionProps(), new WmAccordionState());\n }\n\n addAccordionPane(accordionPane: WmAccordionpane) {\n const i = this.accordionPanes.findIndex(t => t.props.title === accordionPane.props.title);\n if (i >= 0) {\n this.accordionPanes[i] = accordionPane;\n } else {\n this.accordionPanes[this.newIndex++] = accordionPane;\n }\n if (!(this.state.isExpanded?.find((v) => v))) {\n this.toggle(this.state.props.defaultpaneindex + 1);\n }\n }\n\n expand(accordionName: string) {\n const i = this.accordionPanes.findIndex(t => t.props.name === accordionName);\n this.toggle(i + 1, true);\n }\n\n collapse(accordionName: string) {\n const i = this.accordionPanes.findIndex(t => t.props.name === accordionName);\n this.toggle(i + 1, false);\n }\n\n expandCollapseIcon(item: any, index: number, showBadge = true, showIcon = true, useChevron = true, isExpanded = false) {\n const widgetProps = item.props;\n //@ts-ignore\n const badge = showBadge && widgetProps.badgevalue != undefined ? (\n <Badge style={[\n this.styles.badge,\n isExpanded ? this.styles.activeBadge: null,\n this.styles[widgetProps.badgetype || 'default']]}\n {...this.getTestProps('badge'+index)}>\n {widgetProps.badgevalue}\n </Badge>): null;\n let iconclass = null;\n if (useChevron) {\n iconclass = isExpanded ? 'wi wi-chevron-down' : 'wi wi-chevron-up';\n } else {\n iconclass = isExpanded ? 'wi wi-minus' : 'wi wi-plus';\n }\n return (<View style={{flexDirection: 'row'}}>\n {badge}\n {showIcon ? (\n <WmIcon\n id={this.getTestId('icon' + index)}\n styles={this.theme.mergeStyle({}, this.styles.icon, isExpanded ? this.styles.activeIcon : null)}\n name={'expand_collapse_icon'}\n iconclass={iconclass}></WmIcon>): null}\n </View>);\n }\n\n renderAccordionpane(item: any, index: any, accordionpanes: any[] = []) {\n const showIconOnLeft = this.styles.leftToggleIcon.root.width !== undefined;\n const isExpanded = this.state.isExpanded[index];\n const titleIconStyles = this.theme.mergeStyle(this.styles.icon, this.styles.titleIcon)\n return item.props.show != false ? (\n <View style={this.styles.pane} key={item.props.title}>\n <TouchableOpacity key={'accordionpane_' + (index + 1)}\n {...this.getTestPropsForAction(`header${index}`)}\n style={[this.styles.header,\n index === 0 ? this.styles.firstHeader: null,\n index === accordionpanes.length - 1 && !isExpanded ? this.styles.lastHeader: null,\n isExpanded ? this.styles.activeHeader : {}]}\n onPress={this.toggle.bind(this, index + 1, !isExpanded)}>\n {this.expandCollapseIcon(item, index, false, showIconOnLeft, true, isExpanded)}\n {item.props.iconclass ? <WmIcon id={this.getTestId('icon')} styles={titleIconStyles} name={item.props.name + '_icon'} iconclass={item.props.iconclass}></WmIcon>: null}\n <View style={{flexDirection: 'column', flex: 1, justifyContent: 'center'}}>\n <Text style={[\n this.styles.text,\n this.styles.heading,\n isExpanded ? this.styles.activeHeaderTitle : {}]}\n {...this.getTestPropsForAction(`header${index}_title`)}\n accessibilityRole='header'>\n {isDefined(item.props.title) ? item.props.title : 'Title'}\n </Text>\n {item.props.description ? \n (<Text style={this.styles.subheading}\n {...this.getTestPropsForAction(`header${index}_description`)}>{item.props.description}</Text>) : null }\n </View>\n {this.expandCollapseIcon(item, index, true, !showIconOnLeft, true, isExpanded)}\n </TouchableOpacity>\n {item}\n </View>\n ): null;\n }\n\n toggle(index: number, expand = true) {\n let expandedId = expand ? index : -1;\n let collapseId = expand ? -1 : index;\n if (expand && this.state.isExpanded[expandedId - 1]\n || !expand && this.state.isExpanded[collapseId - 1] === false) {\n return;\n }\n if (collapseId < 0 && this.state.props.closeothers) {\n collapseId = this.state.lastExpandedIndex;\n }\n const collapsedPane = this.accordionPanes[collapseId -1];\n collapsedPane?.hide();\n Promise.resolve().then(() => {\n const expandedPane = expandedId ? this.accordionPanes[expandedId - 1]: null;\n expandedPane?.show();\n this.setState((state) => {\n if (collapseId > 0 && collapsedPane) {\n state.isExpanded[collapseId - 1] = false;\n }\n if (expandedId > 0 && expandedPane) {\n state.isExpanded[expandedId - 1] = true;\n }\n return {\n lastExpandedIndex: expandedId,\n isExpanded: [...state.isExpanded]\n };\n }, () => {\n this.invokeEventCallback('onChange', [{},\n this.proxy,\n expandedId - 1,\n collapseId ? collapseId - 1 : null,\n expandedPane && expandedPane.props.name,\n collapsedPane && collapsedPane.props.name]);\n });\n }, () => {});\n }\n\n public componentDidMount(): void {\n super.componentDidMount();\n this.toggle(this.state.props.defaultpaneindex + 1);\n }\n\n renderWidget(props: WmAccordionProps) {\n const accordionpanes = props.children;\n const expandedId = this.state.lastExpandedIndex || 0;\n return (\n <View style={this.styles.root}>\n {this._background}\n {accordionpanes\n ? isArray(accordionpanes) && accordionpanes.length\n ? accordionpanes.map((item: any, index: any) => this.renderAccordionpane(item, index, accordionpanes))\n : this.renderAccordionpane(accordionpanes, 0)\n : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAC3D,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,OAAO,QAAQ,QAAQ;AAEhC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AACrE,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,SAASC,SAAS,QAAQ,sCAAsC;AAEhE,OAAO,MAAMC,gB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