@wavemaker/app-rn-runtime 12.0.0-next.45752 → 12.0.0-rc.5849
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 +13 -2
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js +1 -0
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +15 -0
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +15 -5
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -0
- app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +15 -2
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +10 -2
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +13 -3
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +9 -0
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +2 -0
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +5 -0
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js +4 -3
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.props.js +9 -1
- app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.styles.js +7 -1
- app-rn-runtime/components/chart/area-chart/area-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js +7 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +23 -0
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +2 -2
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js +7 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/column-chart/column-chart.styles.js +7 -1
- app-rn-runtime/components/chart/column-chart/column-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js +7 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.props.js +2 -0
- app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.styles.js +7 -1
- app-rn-runtime/components/chart/line-chart/line-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +2 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js +7 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +58 -11
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.styles.js +4 -0
- app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +11 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +36 -2
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.styles.js +7 -0
- app-rn-runtime/components/container/container.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +5 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js +6 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +28 -2
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js +4 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js +31 -5
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.styles.js +4 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +43 -4
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.styles.js +3 -0
- app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
- app-rn-runtime/components/container/partial-host.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +2 -2
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +11 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +38 -5
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js +4 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +28 -2
- app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.styles.js +6 -1
- app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +39 -6
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +3 -0
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +4 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js +6 -2
- app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.styles.js +4 -1
- app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +18 -0
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.styles.js +3 -0
- app-rn-runtime/components/data/card/card.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +1 -1
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.props.js +1 -0
- app-rn-runtime/components/data/form/form.props.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.props.js +1 -0
- app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js +11 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +32 -24
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +1 -0
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js +9 -0
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +21 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -0
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +1 -0
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +21 -1
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js +1 -0
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js +1 -0
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +21 -0
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +2 -0
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +21 -0
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js +2 -0
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/page/content/content.component.js +19 -4
- app-rn-runtime/components/page/content/content.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +27 -2
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.props.js +2 -2
- app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.styles.js +6 -1
- app-rn-runtime/components/page/page-content/page-content.styles.js.map +1 -1
- app-rn-runtime/components/page/page.component.js.map +1 -1
- app-rn-runtime/components/page/page.props.js.map +1 -1
- app-rn-runtime/components/page/page.styles.js +7 -1
- app-rn-runtime/components/page/page.styles.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.component.js +27 -1
- app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.props.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.styles.js +6 -1
- app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js +27 -1
- app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.props.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.styles.js +6 -1
- app-rn-runtime/components/prefab/prefab-container.styles.js.map +1 -1
- app-rn-runtime/core/base.component.js +3 -2
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/props.provider.js +0 -1
- app-rn-runtime/core/props.provider.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +10 -4
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/utils.js +5 -0
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/package.json +3 -3
- app-rn-runtime/runtime/App.js +2 -7
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +28 -13
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-partial.component.js.map +1 -1
- app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +17 -1
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/styles/theme.js +5 -0
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +1 -0
- app-rn-runtime/styles/theme.variables.js.map +1 -1
@@ -197,6 +197,10 @@ export default class WmCarousel extends BaseComponent {
|
|
197
197
|
if (maxIndex === data.length) {
|
198
198
|
minIndex = maxIndex - maxNoOfDots;
|
199
199
|
}
|
200
|
+
const dotStyle = this._showSkeleton ? {
|
201
|
+
...this.styles.dotStyle,
|
202
|
+
...this.styles.dotSkeleton.root
|
203
|
+
} : this.styles.dotStyle;
|
200
204
|
return /*#__PURE__*/React.createElement(View, {
|
201
205
|
style: this.styles.dotsWrapperStyle
|
202
206
|
}, /*#__PURE__*/React.createElement(View, {
|
@@ -207,9 +211,9 @@ export default class WmCarousel extends BaseComponent {
|
|
207
211
|
return index >= minIndex && index <= maxIndex ? /*#__PURE__*/React.createElement(View, _extends({
|
208
212
|
key: 'dots_' + this.generateItemKey(item, index, this.state.props)
|
209
213
|
}, this.getTestPropsForAction('indicator' + index), {
|
210
|
-
style: [
|
214
|
+
style: [dotStyle]
|
211
215
|
})) : null;
|
212
|
-
}), /*#__PURE__*/React.createElement(Animated.View, {
|
216
|
+
}), this._showSkeleton ? null : /*#__PURE__*/React.createElement(Animated.View, {
|
213
217
|
style: [this.styles.dotStyle, this.styles.activeDotStyle, {
|
214
218
|
width: undefined,
|
215
219
|
height: undefined,
|
@@ -231,6 +235,13 @@ export default class WmCarousel extends BaseComponent {
|
|
231
235
|
}]
|
232
236
|
}))));
|
233
237
|
}
|
238
|
+
renderSkeleton(props) {
|
239
|
+
return /*#__PURE__*/React.createElement(View, {
|
240
|
+
style: [this.styles.root, {
|
241
|
+
...this.styles.skeleton.root
|
242
|
+
}]
|
243
|
+
}, this.renderItem({}, 0), this.renderPagination([{}, {}, {}]));
|
244
|
+
}
|
234
245
|
componentDidMount() {
|
235
246
|
super.componentDidMount();
|
236
247
|
this.autoPlay();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","isArray","isUndefined","Animated","Easing","View","DefaultKeyExtractor","WmIcon","BaseComponent","BaseComponentState","SwipeAnimation","Tappable","WmCarouselProps","DEFAULT_CLASS","WmCarouselState","constructor","args","_defineProperty","WmCarousel","props","Value","bounds","e","_this$slidesLayout","_this$slidesLayout$ac","activeTabIndex","state","activeIndex","lower","slidesLayout","filter","l","i","reduce","s","width","center","upper","computePhase","value","_this$slidesLayout$ac2","w","Math","abs","onLower","onSlideChange","onUpper","noOfSlides","_this$animationView","animationView","setPosition","index","prevIndex","updateState","invokeEventCallback","animatePagination","item","type","renderSlide","children","data","dataset","length","_this$animationView2","_this$animationView3","goToUpper","_this$animationView4","goToLower","cleanup","push","stopPlay","addSlideLayout","nativeEvent","layout","forceUpdate","generateItemKey","itemkey","_showSkeleton","keyExtractor","getKey","autoPlay","initialized","animation","animationinterval","intervalId","setInterval","next","clearInterval","setTimeout","_this$animationView5","stopAnimation","startAnimation","onPropertyChange","name","$new","$old","_this$keyExtractor","clear","min","_this$styles$dotStyle","_this$styles$dotStyle2","_this$styles$dotStyle3","margin","styles","dotStyle","marginLeft","marginRight","size","position","max","scale","options","useNativeDriver","duration","easing","out","linear","sequence","timing","dotScale","toValue","parallel","dotPosition","isRTL","start","renderPagination","maxNoOfDots","maxnoofdots","minIndex","maxIndex","createElement","style","dotsWrapperStyle","flexDirection","map","_extends","key","getTestPropsForAction","activeDotStyle","undefined","height","transform","translateX","right","left","componentDidMount","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 if(!this.initialized){\n return;\n }\n const props = this.state.props;\n this.stopPlay && this.stopPlay();\n if (props.animation === 'auto' && props.animationinterval) {\n const intervalId = setInterval(() => {\n this.next();\n }, props.animationinterval * 1000);\n this.stopPlay = () => clearInterval(intervalId);\n } else {\n setTimeout(() => {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n }, 1000);\n }\n }\n\n stopAnimation(){ \n this.stopPlay();\n }\n startAnimation() {\n this.autoPlay();\n }\n \n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'dataset': {\n this.keyExtractor?.clear();\n this.updateState({\n activeIndex: Math.min(this.state.activeIndex, $new?.length || 1)\n } as WmCarouselState);\n break;\n }\n case 'animation':\n case 'animationinterval' : {\n this.autoPlay();\n }\n }\n }\n\n animatePagination(index: number) {\n const prevIndex = this.state.activeIndex;\n const margin = ((this.styles.dotStyle?.marginLeft as number)|| 0) + \n ((this.styles.dotStyle?.marginRight as number)|| 0)\n const width = (this.styles.dotStyle?.width as number)|| 2;\n const size = margin + width;\n const position = Math.max(index - 1, 0) * size;\n const scale = Math.abs(index - prevIndex) * size;\n const options = {\n useNativeDriver: true,\n duration: 200,\n easing: Easing.out(Easing.linear)\n };\n if (prevIndex < index) {\n Animated.sequence([\n Animated.timing(this.dotScale, {\n toValue: scale,\n ...options\n }),\n Animated.parallel([\n Animated.timing(this.dotScale, {\n toValue: 0,\n ...options\n }),\n Animated.timing(this.dotPosition, {\n toValue: (this.isRTL ? -1: 1) * position,\n ...options\n })\n ])\n ]).start();\n } else if (prevIndex > index) {\n Animated.sequence([\n Animated.parallel([\n Animated.timing(this.dotScale, {\n toValue: scale,\n ...options\n }),\n Animated.timing(this.dotPosition, {\n toValue: (this.isRTL ? -1: 1) * position,\n ...options\n })\n ]),\n Animated.timing(this.dotScale, {\n toValue: 0,\n ...options\n }),\n ]).start();\n } \n }\n\n onSlideChange = (index: number) => {\n const prevIndex = this.state.activeIndex;\n this.updateState({\n activeIndex: index\n } as WmCarouselState,\n () => this.invokeEventCallback('onChange', [this, index, prevIndex]));\n this.animatePagination(index);\n }\n\n renderItem = (item: any, index: number) => {\n const props = this.state.props;\n if (props.type === 'dynamic') {\n return props.renderSlide ? props.renderSlide(item, index, this) : null;\n }\n return props.children[index];\n }\n\n next = () => {\n const props = this.state.props;\n const data = props.type === 'dynamic' ? props.dataset : props.children;\n if (this.state.activeIndex >= data?.length || 0) {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n } else {\n this.animationView?.goToUpper();\n }\n }\n\n prev = () => {\n this.animationView?.goToLower();\n }\n\n renderPagination(data: any) {\n const maxNoOfDots = this.state.props.maxnoofdots;\n let minIndex = Math.max(this.state.activeIndex - maxNoOfDots + 1, 0);\n let maxIndex = Math.min(minIndex + maxNoOfDots - 1, data.length);\n if (maxIndex === data.length) {\n minIndex = maxIndex - maxNoOfDots;\n }\n 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 componentDidMount(): void {\n super.componentDidMount();\n this.autoPlay();\n }\n\n renderWidget(props: WmCarouselProps) {\n const hasNavs = props.controls === 'both' || props.controls ==='navs';\n const hasDots = props.controls === 'both' || props.controls ==='indicators';\n let styles = this.styles;\n let data = props.type === 'dynamic' ? props.dataset : props.children;\n data = isArray(data) ? data : [];\n this.noOfSlides = data?.length || 0;\n let slideScale = undefined as any;\n let slideTranslateX = undefined as any;\n if (isArray(this.styles.slide?.transform)) {\n slideScale = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).scale)) as any)?.scale;\n slideTranslateX = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).translateX)) as any)?.translateX;\n }\n // TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608\n return (\n <View style={styles.root}>\n {this._background}\n <SwipeAnimation.View \n enableGestures={props.enablegestures && this.noOfSlides > 1}\n style={{\n flex: 1\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\n slideMinWidth={this.styles.slide.width}\n >\n {data.map((item: any, index: number) => {\n const isActive = index === this.state.activeIndex - 1;\n let scale = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [slideScale, slideScale, 1, slideScale, slideScale]\n });\n let translateX = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [-56, -56, 0, 56, 56]\n });\n return (\n <Animated.View key={this.generateItemKey(item, index, props)}\n onLayout={this.addSlideLayout.bind(this, index)}\n style={[\n {height: props.type === 'dynamic' ? undefined : '100%'},\n this.styles.slide,\n index === 0 ? this.styles.firstSlide : null,\n index === data.length - 1 ? this.styles.lastSlide: null,\n isActive ? this.styles.activeSlide: null,\n translateX && scale ? {\n transform: [\n {\n translateX: !isUndefined(slideTranslateX) ? slideTranslateX : translateX\n }, {\n scale: scale\n }\n ]\n } : null]}>\n <Tappable onTap={() => {\n this.onSlideChange(index + 1);\n const position = this.slidesLayout\n .filter((l , i) => i < index)\n .reduce((s, l) => s + l.width, 0);\n this.animationView?.setPosition(-1 * position);\n }} rippleColor={this.styles.root.rippleColor} styles={{height: \"100%\"}}>\n {this.renderItem(item, index)}\n </Tappable>\n </Animated.View>\n );\n })}\n </SwipeAnimation.View>\n {hasNavs ? (\n <View style={styles.btnPanel}>\n <WmIcon\n id={this.getTestId('prev_icon')}\n iconclass=\"wi wi-chevron-left fa-2x\"\n styles={styles.prevBtn}\n onTap={this.prev}\n accessibilitylabel='back'/>\n <WmIcon\n id={this.getTestId('next_icon')}\n iconclass=\"wi wi-chevron-right fa-2x\"\n styles={styles.nextBtn}\n onTap={this.next}\n accessibilitylabel='next'/>\n </View>): null}\n {hasDots && data ? this.renderPagination(data) : null}\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,EAAEC,WAAW,QAAQ,WAAW;AAChD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,QAA4C,cAAc;AACzF,SAASC,mBAAmB,QAAQ,8CAA8C;AAClF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAO,KAAKC,cAAc,MAAM,oDAAoD;AACpF,SAASC,QAA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MACLoL,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,WAAW,CAAE;MAChCC,SAAS,EAAC,0BAA0B;MACpCtF,MAAM,EAAEA,MAAM,CAACuF,OAAQ;MACvBR,KAAK,EAAE,IAAI,CAACS,IAAK;MACjBC,kBAAkB,EAAC;IAAM,CAAC,CAAC,eAC7BhM,KAAA,CAAAkI,aAAA,CAAC3H,MAAM;MACLoL,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,WAAW,CAAE;MAChCC,SAAS,EAAC,2BAA2B;MACrCtF,MAAM,EAAEA,MAAM,CAAC0F,OAAQ;MACvBX,KAAK,EAAE,IAAI,CAAChG,IAAK;MACjB0G,kBAAkB,EAAC;IAAM,CAAC,CACxB,CAAC,GAAG,IAAI,EACbzC,OAAO,IAAI3F,IAAI,GAAG,IAAI,CAACiE,gBAAgB,CAACjE,IAAI,CAAC,GAAG,IAC/C,CAAC;EACX;AACF","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","isArray","isUndefined","Animated","Easing","View","DefaultKeyExtractor","WmIcon","BaseComponent","BaseComponentState","SwipeAnimation","Tappable","WmCarouselProps","DEFAULT_CLASS","WmCarouselState","constructor","args","_defineProperty","WmCarousel","props","Value","bounds","e","_this$slidesLayout","_this$slidesLayout$ac","activeTabIndex","state","activeIndex","lower","slidesLayout","filter","l","i","reduce","s","width","center","upper","computePhase","value","_this$slidesLayout$ac2","w","Math","abs","onLower","onSlideChange","onUpper","noOfSlides","_this$animationView","animationView","setPosition","index","prevIndex","updateState","invokeEventCallback","animatePagination","item","type","renderSlide","children","data","dataset","length","_this$animationView2","_this$animationView3","goToUpper","_this$animationView4","goToLower","cleanup","push","stopPlay","addSlideLayout","nativeEvent","layout","forceUpdate","generateItemKey","itemkey","_showSkeleton","keyExtractor","getKey","autoPlay","initialized","animation","animationinterval","intervalId","setInterval","next","clearInterval","setTimeout","_this$animationView5","stopAnimation","startAnimation","onPropertyChange","name","$new","$old","_this$keyExtractor","clear","min","_this$styles$dotStyle","_this$styles$dotStyle2","_this$styles$dotStyle3","margin","styles","dotStyle","marginLeft","marginRight","size","position","max","scale","options","useNativeDriver","duration","easing","out","linear","sequence","timing","dotScale","toValue","parallel","dotPosition","isRTL","start","renderPagination","maxNoOfDots","maxnoofdots","minIndex","maxIndex","dotSkeleton","root","createElement","style","dotsWrapperStyle","flexDirection","map","_extends","key","getTestPropsForAction","activeDotStyle","undefined","height","transform","translateX","right","left","renderSkeleton","skeleton","renderItem","componentDidMount","renderWidget","_data","_this$styles$slide","hasNavs","controls","hasDots","slideScale","slideTranslateX","slide","_this$styles$slide2","_this$styles$slide3","find","o","_background","enableGestures","enablegestures","flex","direction","ref","r","handlers","animationHandlers","slideMinWidth","_this$animationView6","_this$animationView7","isActive","animationPhase","interpolate","inputRange","outputRange","onLayout","bind","firstSlide","lastSlide","activeSlide","onTap","_this$animationView8","rippleColor","btnPanel","id","getTestId","iconclass","prevBtn","prev","accessibilitylabel","nextBtn"],"sources":["carousel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { isArray, isUndefined } from 'lodash-es';\nimport { Animated, Easing, View, LayoutChangeEvent, LayoutRectangle } from 'react-native';\nimport { DefaultKeyExtractor } from '@wavemaker/app-rn-runtime/core/key.extractor';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport * as SwipeAnimation from '@wavemaker/app-rn-runtime/gestures/swipe.animation';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\n\nimport WmCarouselProps from './carousel.props';\nimport { DEFAULT_CLASS, WmCarouselStyles } from './carousel.styles';\nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmCarouselState extends BaseComponentState<WmCarouselProps> {\n activeIndex = 1;\n}\n\nexport default class WmCarousel extends BaseComponent<WmCarouselProps, WmCarouselState, WmCarouselStyles> {\n\n noOfSlides: number = 0;\n private slidesLayout: LayoutRectangle[] = [];\n private keyExtractor = new DefaultKeyExtractor();\n stopPlay: Function = null as any;\n private dotScale = new Animated.Value(0);\n private dotPosition = new Animated.Value(0);\n private animationView: SwipeAnimation.View | null = null as any;\n private animationHandlers = {\n bounds: (e) => {\n const activeTabIndex = this.state.activeIndex - 1;\n let lower = 0;\n if (activeTabIndex > 0) {\n lower = this.slidesLayout\n .filter((l , i) => i < activeTabIndex - 1)\n .reduce((s, l) => s + l.width, 0);\n }\n let center = lower + (this.slidesLayout[activeTabIndex - 1]?.width || 0);\n let upper = center + (this.slidesLayout[activeTabIndex]?.width || 0);\n return {\n lower: -1 * lower,\n center: -1 * center,\n upper: -1 * upper\n };\n },\n computePhase: (value) => {\n const activeTabIndex = this.state.activeIndex - 1;\n const w = this.slidesLayout[activeTabIndex]?.width || 0;\n return w && Math.abs(value / w);\n },\n onLower: (e) => {\n this.onSlideChange(this.state.activeIndex - 1);\n },\n onUpper: (e) => {\n if(this.noOfSlides < this.state.activeIndex + 1){\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n }\n else{\n this.onSlideChange(this.state.activeIndex + 1);\n }\n }\n } as SwipeAnimation.Handlers;\n\n constructor(props: WmCarouselProps) {\n super(props, DEFAULT_CLASS, new WmCarouselProps(), new WmCarouselState());\n this.cleanup.push(() => {\n this.stopPlay && this.stopPlay();\n })\n }\n\n addSlideLayout(index: number, nativeEvent: LayoutChangeEvent) {\n this.slidesLayout[index] = nativeEvent.nativeEvent.layout;\n if (index === this.state.activeIndex) {\n this.forceUpdate();\n }\n }\n\n private generateItemKey(item: any, index: number, props: WmCarouselProps) {\n if (props.itemkey && item && !this._showSkeleton) {\n return props.itemkey(item, index);\n }\n return 'list_item_' + this.keyExtractor.getKey(item, true);\n }\n\n autoPlay() {\n if(!this.initialized){\n return;\n }\n const props = this.state.props;\n this.stopPlay && this.stopPlay();\n if (props.animation === 'auto' && props.animationinterval) {\n const intervalId = setInterval(() => {\n this.next();\n }, props.animationinterval * 1000);\n this.stopPlay = () => clearInterval(intervalId);\n } else {\n setTimeout(() => {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n }, 1000);\n }\n }\n\n stopAnimation(){ \n this.stopPlay();\n }\n startAnimation() {\n this.autoPlay();\n }\n \n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'dataset': {\n this.keyExtractor?.clear();\n this.updateState({\n activeIndex: Math.min(this.state.activeIndex, $new?.length || 1)\n } as WmCarouselState);\n break;\n }\n case 'animation':\n case 'animationinterval' : {\n this.autoPlay();\n }\n }\n }\n\n animatePagination(index: number) {\n const prevIndex = this.state.activeIndex;\n const margin = ((this.styles.dotStyle?.marginLeft as number)|| 0) + \n ((this.styles.dotStyle?.marginRight as number)|| 0)\n const width = (this.styles.dotStyle?.width as number)|| 2;\n const size = margin + width;\n const position = Math.max(index - 1, 0) * size;\n const scale = Math.abs(index - prevIndex) * size;\n const options = {\n useNativeDriver: true,\n duration: 200,\n easing: Easing.out(Easing.linear)\n };\n if (prevIndex < index) {\n Animated.sequence([\n Animated.timing(this.dotScale, {\n toValue: scale,\n ...options\n }),\n Animated.parallel([\n Animated.timing(this.dotScale, {\n toValue: 0,\n ...options\n }),\n Animated.timing(this.dotPosition, {\n toValue: (this.isRTL ? -1: 1) * position,\n ...options\n })\n ])\n ]).start();\n } else if (prevIndex > index) {\n Animated.sequence([\n Animated.parallel([\n Animated.timing(this.dotScale, {\n toValue: scale,\n ...options\n }),\n Animated.timing(this.dotPosition, {\n toValue: (this.isRTL ? -1: 1) * position,\n ...options\n })\n ]),\n Animated.timing(this.dotScale, {\n toValue: 0,\n ...options\n }),\n ]).start();\n } \n }\n\n onSlideChange = (index: number) => {\n const prevIndex = this.state.activeIndex;\n this.updateState({\n activeIndex: index\n } as WmCarouselState,\n () => this.invokeEventCallback('onChange', [this, index, prevIndex]));\n this.animatePagination(index);\n }\n\n renderItem = (item: any, index: number) => {\n const props = this.state.props;\n if (props.type === 'dynamic') {\n return props.renderSlide ? props.renderSlide(item, index, this) : null;\n }\n return props.children[index];\n }\n\n next = () => {\n const props = this.state.props;\n const data = props.type === 'dynamic' ? props.dataset : props.children;\n if (this.state.activeIndex >= data?.length || 0) {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n } else {\n this.animationView?.goToUpper();\n }\n }\n\n prev = () => {\n this.animationView?.goToLower();\n }\n\n renderPagination(data: any) {\n const maxNoOfDots = this.state.props.maxnoofdots;\n let minIndex = Math.max(this.state.activeIndex - maxNoOfDots + 1, 0);\n let maxIndex = Math.min(minIndex + maxNoOfDots - 1, data.length);\n if (maxIndex === data.length) {\n minIndex = maxIndex - maxNoOfDots;\n }\n const dotStyle = this._showSkeleton ? {\n ...this.styles.dotStyle,\n ...this.styles.dotSkeleton.root\n } : this.styles.dotStyle\n return (<View style={this.styles.dotsWrapperStyle}>\n <View style={{flexDirection: this.isRTL ? 'row-reverse' : 'row'}}>\n {\n data.map((item: any, index: number) => {\n return index >= minIndex && index <= maxIndex ? (\n <View key={'dots_' + this.generateItemKey(item, index, this.state.props)} {...this.getTestPropsForAction('indicator'+index)}\n style={[dotStyle]}>\n </View>) : null;\n })\n }\n {\n this._showSkeleton ? null : <Animated.View style={[\n this.styles.dotStyle,\n this.styles.activeDotStyle, {\n width: undefined,\n height: undefined,\n transform: [{\n translateX: this.dotPosition\n }]\n }, this.isRTL ? { right: 0 } : { left: 0}]}>\n <Animated.View style={[{\n width: 1,\n height: 1\n }, {\n // This is failing in Android\n // minWidth: this.dotScale\n }]}>\n </Animated.View>\n </Animated.View>\n }\n </View>\n </View>);\n }\n\n public renderSkeleton(props: WmCarouselProps): React.ReactNode | null {\n return <View style={[this.styles.root, {...this.styles.skeleton.root}]}>\n {this.renderItem({}, 0)}\n {this.renderPagination([{}, {}, {}])}\n </View>\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.autoPlay();\n }\n\n renderWidget(props: WmCarouselProps) {\n const hasNavs = props.controls === 'both' || props.controls ==='navs';\n const hasDots = props.controls === 'both' || props.controls ==='indicators';\n let styles = this.styles;\n let data = props.type === 'dynamic' ? props.dataset : props.children;\n data = isArray(data) ? data : [];\n this.noOfSlides = data?.length || 0;\n let slideScale = undefined as any;\n let slideTranslateX = undefined as any;\n if (isArray(this.styles.slide?.transform)) {\n slideScale = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).scale)) as any)?.scale;\n slideTranslateX = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).translateX)) as any)?.translateX;\n }\n // TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608\n return (\n <View style={styles.root}>\n {this._background}\n <SwipeAnimation.View \n enableGestures={props.enablegestures && this.noOfSlides > 1}\n style={{\n flex: 1\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\n slideMinWidth={this.styles.slide.width}\n >\n {data.map((item: any, index: number) => {\n const isActive = index === this.state.activeIndex - 1;\n let scale = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [slideScale, slideScale, 1, slideScale, slideScale]\n });\n let translateX = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [-56, -56, 0, 56, 56]\n });\n return (\n <Animated.View key={this.generateItemKey(item, index, props)}\n onLayout={this.addSlideLayout.bind(this, index)}\n style={[\n {height: props.type === 'dynamic' ? undefined : '100%'},\n this.styles.slide,\n index === 0 ? this.styles.firstSlide : null,\n index === data.length - 1 ? this.styles.lastSlide: null,\n isActive ? this.styles.activeSlide: null,\n translateX && scale ? {\n transform: [\n {\n translateX: !isUndefined(slideTranslateX) ? slideTranslateX : translateX\n }, {\n scale: scale\n }\n ]\n } : null]}>\n <Tappable onTap={() => {\n this.onSlideChange(index + 1);\n const position = this.slidesLayout\n .filter((l , i) => i < index)\n .reduce((s, l) => s + l.width, 0);\n this.animationView?.setPosition(-1 * position);\n }} rippleColor={this.styles.root.rippleColor} styles={{height: \"100%\"}}>\n {this.renderItem(item, index)}\n </Tappable>\n </Animated.View>\n );\n })}\n </SwipeAnimation.View>\n {hasNavs ? (\n <View style={styles.btnPanel}>\n <WmIcon\n id={this.getTestId('prev_icon')}\n iconclass=\"wi wi-chevron-left fa-2x\"\n styles={styles.prevBtn}\n onTap={this.prev}\n accessibilitylabel='back'/>\n <WmIcon\n id={this.getTestId('next_icon')}\n iconclass=\"wi wi-chevron-right fa-2x\"\n styles={styles.nextBtn}\n onTap={this.next}\n accessibilitylabel='next'/>\n </View>): null}\n {hasDots && data ? this.renderPagination(data) : null}\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,EAAEC,WAAW,QAAQ,WAAW;AAChD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,QAA4C,cAAc;AACzF,SAASC,mBAAmB,QAAQ,8CAA8C;AAClF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAO,KAAKC,cAAc,MAAM,oDAAoD;AACpF,SAASC,QAAQ,QAAQ,mDAAmD;AAE5E,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AAGnE,OAAO,MAAMC,eAAe,SAASL,kBAAkB,CAAkB;EAAAM,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,sBACzD,CAAC;EAAA;AACjB;AAEA,eAAe,MAAMC,UAAU,SAASV,aAAa,CAAqD;EA6CxGO,WAAWA,CAACI,MAAsB,EAAE;IAClC,KAAK,CAACA,MAAK,EAAEN,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,EAAE,IAAIE,eAAe,CAAC,CAAC,CAAC;IAACG,eAAA,qBA5CvD,CAAC;IAAAA,eAAA,uBACoB,EAAE;IAAAA,eAAA,uBACrB,IAAIX,mBAAmB,CAAC,C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AAAoI,aAAA,CAAC/H,IAAI;MAACgI,KAAK,EAAE9B,MAAM,CAACsF;IAAS,gBAC3B7L,KAAA,CAAAoI,aAAA,CAAC7H,MAAM;MACLuL,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,WAAW,CAAE;MAChCC,SAAS,EAAC,0BAA0B;MACpCzF,MAAM,EAAEA,MAAM,CAAC0F,OAAQ;MACvBP,KAAK,EAAE,IAAI,CAACQ,IAAK;MACjBC,kBAAkB,EAAC;IAAM,CAAC,CAAC,eAC7BnM,KAAA,CAAAoI,aAAA,CAAC7H,MAAM;MACLuL,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,WAAW,CAAE;MAChCC,SAAS,EAAC,2BAA2B;MACrCzF,MAAM,EAAEA,MAAM,CAAC6F,OAAQ;MACvBV,KAAK,EAAE,IAAI,CAACpG,IAAK;MACjB6G,kBAAkB,EAAC;IAAM,CAAC,CACxB,CAAC,GAAG,IAAI,EACbvC,OAAO,IAAIhG,IAAI,GAAG,IAAI,CAACiE,gBAAgB,CAACjE,IAAI,CAAC,GAAG,IAC/C,CAAC;EACX;AACF","ignoreList":[]}
|
@@ -15,6 +15,7 @@ export default class WmCarouselProps extends BaseProps {
|
|
15
15
|
_defineProperty(this, "renderSlide", void 0);
|
16
16
|
_defineProperty(this, "enablegestures", true);
|
17
17
|
_defineProperty(this, "maxnoofdots", 20);
|
18
|
+
_defineProperty(this, "showskeletonchildren", false);
|
18
19
|
}
|
19
20
|
}
|
20
21
|
//# sourceMappingURL=carousel.props.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseProps","WmCarouselProps","constructor","args","_defineProperty"],"sources":["carousel.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport React from 'react';\n\nexport default class WmCarouselProps extends BaseProps {\n dataset: any = null;\n type?: 'static' | 'dynamic' = 'static';\n animation?: 'auto' | 'none' = 'auto';\n animationinterval?: number = 3;\n controls?: 'both' | 'none' | 'navs' | 'indicators' = 'both';\n children? = null as any;\n itemkey?: ($item: any, $index: any) => any = null as any;\n renderSlide?: ($item: any, $index: number, carousel: any) => React.ReactNode;\n enablegestures = true;\n maxnoofdots = 20;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAGzE,eAAe,MAAMC,eAAe,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBACtC,IAAI;IAAAA,eAAA,eACW,QAAQ;IAAAA,eAAA,oBACR,MAAM;IAAAA,eAAA,4BACP,CAAC;IAAAA,eAAA,mBACuB,MAAM;IAAAA,eAAA,mBAC/C,IAAI;IAAAA,eAAA,kBAC6B,IAAI;IAAAA,eAAA;IAAAA,eAAA,yBAE/B,IAAI;IAAAA,eAAA,sBACR,EAAE;EAAA;
|
1
|
+
{"version":3,"names":["BaseProps","WmCarouselProps","constructor","args","_defineProperty"],"sources":["carousel.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport React from 'react';\n\nexport default class WmCarouselProps extends BaseProps {\n dataset: any = null;\n type?: 'static' | 'dynamic' = 'static';\n animation?: 'auto' | 'none' = 'auto';\n animationinterval?: number = 3;\n controls?: 'both' | 'none' | 'navs' | 'indicators' = 'both';\n children? = null as any;\n itemkey?: ($item: any, $index: any) => any = null as any;\n renderSlide?: ($item: any, $index: number, carousel: any) => React.ReactNode;\n enablegestures = true;\n maxnoofdots = 20;\n showskeletonchildren?: boolean = false;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAGzE,eAAe,MAAMC,eAAe,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBACtC,IAAI;IAAAA,eAAA,eACW,QAAQ;IAAAA,eAAA,oBACR,MAAM;IAAAA,eAAA,4BACP,CAAC;IAAAA,eAAA,mBACuB,MAAM;IAAAA,eAAA,mBAC/C,IAAI;IAAAA,eAAA,kBAC6B,IAAI;IAAAA,eAAA;IAAAA,eAAA,yBAE/B,IAAI;IAAAA,eAAA,sBACR,EAAE;IAAAA,eAAA,+BACiB,KAAK;EAAA;AACxC","ignoreList":[]}
|
@@ -88,6 +88,21 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
88
88
|
marginLeft: 2,
|
89
89
|
marginRight: 2,
|
90
90
|
backgroundColor: themeVariables.carouselDotColor
|
91
|
+
},
|
92
|
+
skeleton: {
|
93
|
+
root: {
|
94
|
+
width: '100%'
|
95
|
+
},
|
96
|
+
text: {}
|
97
|
+
},
|
98
|
+
dotSkeleton: {
|
99
|
+
root: {
|
100
|
+
width: 10,
|
101
|
+
height: 10,
|
102
|
+
borderRadius: 5,
|
103
|
+
opacity: 1,
|
104
|
+
backgroundColor: themeVariables.skeletonAnimatedBgColor
|
105
|
+
}
|
91
106
|
}
|
92
107
|
});
|
93
108
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","btn","height","width","borderRadius","borderColor","transparent","borderWidth","justifyContent","defaultStyles","root","position","rippleColor","text","slide","overflow","paddingHorizontal","transform","scale","firstSlide","lastSlide","activeSlide","btnPanel","top","marginTop","flexDirection","alignItems","prevBtn","marginLeft","backgroundColor","carouselPrevBgColor","fontSize","icon","color","carouselPrevBtnColor","nextBtn","marginRight","carouselNextBtnColor","dotsWrapperStyle","opacity","carouselDotWrapperBgColor","paddingTop","paddingBottom","activeDotStyle","carouselActiveDotColor","padding","dotStyle","carouselDotColor","rotateY","defaultColorF","right","alignSelf","primaryColor"],"sources":["carousel.styles.ts"],"sourcesContent":["import { ViewStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\nexport type WmCarouselStyles = BaseStyles & {\n btnPanel: AllStyle,\n prevBtn: WmIconStyles,\n slide: AllStyle,\n firstSlide: AllStyle,\n lastSlide: AllStyle,\n activeSlide: AllStyle,\n nextBtn: WmIconStyles,\n dotsWrapperStyle: AllStyle,\n dotStyle: AllStyle,\n activeDotStyle: AllStyle\n};\nexport const DEFAULT_CLASS = 'app-carousel';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const btn: ViewStyle = {\n height: 48,\n width: 48,\n borderRadius: 48,\n borderColor: themeVariables.transparent,\n borderWidth: 1,\n justifyContent: 'center'\n };\n const defaultStyles: WmCarouselStyles = defineStyles({\n root: {\n position: 'relative',\n rippleColor: themeVariables.transparent\n },\n text: {},\n slide: {\n width: '100%',\n overflow: 'hidden',\n paddingHorizontal: 16,\n transform: [\n {\n scale: 0.8\n }\n ]\n },\n firstSlide: {},\n lastSlide: {},\n activeSlide: {},\n btnPanel: {\n position: 'absolute',\n top: '50%',\n marginTop: -64,\n height: 64,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%'\n },\n prevBtn : {\n root: {\n marginLeft: 12,\n ...btn,\n backgroundColor: themeVariables.carouselPrevBgColor,\n rippleColor: themeVariables.transparent\n },\n text: {\n fontSize: 32\n },\n icon : {\n color: themeVariables.carouselPrevBtnColor\n }\n } as WmIconStyles,\n nextBtn : {\n root: {\n marginRight: 12,\n ...btn,\n backgroundColor: themeVariables.carouselPrevBgColor,\n rippleColor: themeVariables.transparent\n },\n text: {\n fontSize: 32\n },\n icon : {\n color: themeVariables.carouselNextBtnColor\n }\n } as WmIconStyles,\n dotsWrapperStyle:{\n opacity: 1,\n backgroundColor: themeVariables.carouselDotWrapperBgColor,\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n paddingTop: 4,\n paddingBottom: 4\n },\n activeDotStyle: {\n position: 'absolute',\n backgroundColor: themeVariables.carouselActiveDotColor,\n opacity: 1,\n padding: 4\n },\n dotStyle: {\n width: 8,\n height: 8,\n borderRadius: 10,\n opacity: 0.2,\n marginLeft: 2,\n marginRight: 2,\n backgroundColor: themeVariables.carouselDotColor\n }\n } as WmCarouselStyles);\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n prevBtn : {\n root:{\n transform: [{rotateY: '180deg'}]\n }\n },\n nextBtn : {\n root:{\n transform: [{rotateY: '180deg'}]\n }\n }\n });\n\n addStyle('app-carousel-1', '', {\n btnPanel: {\n top: '100%'\n },\n prevBtn: {\n root: {\n borderRadius: 6\n }\n },\n nextBtn: {\n root: {\n borderRadius: 6\n }\n }\n } as any as WmCarouselStyles);\n\n addStyle('app-carousel-2', '', {\n btnPanel: {\n backgroundColor: themeVariables.defaultColorF,\n width: '100%',\n top: '100%',\n right: 0,\n padding: 8,\n justifyContent: 'flex-end'\n },\n dotsWrapperStyle:{\n alignSelf: 'flex-start',\n justifyContent: 'flex-start'\n },\n activeDotStyle: {\n backgroundColor: themeVariables.primaryColor,\n },\n dotStyle: {\n backgroundColor: themeVariables.primaryColor,\n },\n prevBtn: {\n root: {\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderColor: themeVariables.primaryColor,\n },\n icon : {\n color: themeVariables.primaryColor\n }\n },\n nextBtn: {\n root: {\n marginLeft: 8,\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderColor: themeVariables.primaryColor,\n },\n icon : {\n color: themeVariables.primaryColor\n }\n }\n } as any as WmCarouselStyles);\n});"],"mappings":"AACA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAexF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,GAAc,GAAG;IACnBC,MAAM,EAAE,EAAE;IACVC,K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AY,EAAE;MAClB;IACJ,CAAC;IACD+B,OAAO,EAAE;MACLzB,IAAI,EAAE;QACFN,YAAY,EAAE;MAClB;IACJ;EACJ,CAA4B,CAAC;EAE7BJ,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE;IAC3BsB,QAAQ,EAAE;MACNO,eAAe,EAAE9B,cAAc,CAACkD,aAAa;MAC7C9C,KAAK,EAAE,MAAM;MACboB,GAAG,EAAE,MAAM;MACX2B,KAAK,EAAE,CAAC;MACRL,OAAO,EAAE,CAAC;MACVrC,cAAc,EAAE;IACpB,CAAC;IACD8B,gBAAgB,EAAC;MACba,SAAS,EAAE,YAAY;MACvB3C,cAAc,EAAE;IACpB,CAAC;IACDmC,cAAc,EAAE;MACZd,eAAe,EAAE9B,cAAc,CAACqD;IACpC,CAAC;IACDN,QAAQ,EAAE;MACNjB,eAAe,EAAE9B,cAAc,CAACqD;IACpC,CAAC;IACDzB,OAAO,EAAE;MACLjB,IAAI,EAAE;QACFmB,eAAe,EAAE,0BAA0B;QAC3CxB,WAAW,EAAEN,cAAc,CAACqD;MAChC,CAAC;MACDpB,IAAI,EAAG;QACHC,KAAK,EAAElC,cAAc,CAACqD;MAC1B;IACJ,CAAC;IACDjB,OAAO,EAAE;MACLzB,IAAI,EAAE;QACFkB,UAAU,EAAE,CAAC;QACbC,eAAe,EAAE,0BAA0B;QAC3CxB,WAAW,EAAEN,cAAc,CAACqD;MAChC,CAAC;MACDpB,IAAI,EAAG;QACHC,KAAK,EAAElC,cAAc,CAACqD;MAC1B;IACJ;EACJ,CAA4B,CAAC;AACjC,CAAC,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","btn","height","width","borderRadius","borderColor","transparent","borderWidth","justifyContent","defaultStyles","root","position","rippleColor","text","slide","overflow","paddingHorizontal","transform","scale","firstSlide","lastSlide","activeSlide","btnPanel","top","marginTop","flexDirection","alignItems","prevBtn","marginLeft","backgroundColor","carouselPrevBgColor","fontSize","icon","color","carouselPrevBtnColor","nextBtn","marginRight","carouselNextBtnColor","dotsWrapperStyle","opacity","carouselDotWrapperBgColor","paddingTop","paddingBottom","activeDotStyle","carouselActiveDotColor","padding","dotStyle","carouselDotColor","skeleton","dotSkeleton","skeletonAnimatedBgColor","rotateY","defaultColorF","right","alignSelf","primaryColor"],"sources":["carousel.styles.ts"],"sourcesContent":["import { ViewStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmCarouselStyles = BaseStyles & {\n btnPanel: AllStyle,\n prevBtn: WmIconStyles,\n slide: AllStyle,\n firstSlide: AllStyle,\n lastSlide: AllStyle,\n activeSlide: AllStyle,\n nextBtn: WmIconStyles,\n dotsWrapperStyle: AllStyle,\n dotStyle: AllStyle,\n activeDotStyle: AllStyle,\n skeleton: WmSkeletonStyles\n dotSkeleton: WmSkeletonStyles\n};\nexport const DEFAULT_CLASS = 'app-carousel';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const btn: ViewStyle = {\n height: 48,\n width: 48,\n borderRadius: 48,\n borderColor: themeVariables.transparent,\n borderWidth: 1,\n justifyContent: 'center'\n };\n const defaultStyles: WmCarouselStyles = defineStyles({\n root: {\n position: 'relative',\n rippleColor: themeVariables.transparent\n },\n text: {},\n slide: {\n width: '100%',\n overflow: 'hidden',\n paddingHorizontal: 16,\n transform: [\n {\n scale: 0.8\n }\n ]\n },\n firstSlide: {},\n lastSlide: {},\n activeSlide: {},\n btnPanel: {\n position: 'absolute',\n top: '50%',\n marginTop: -64,\n height: 64,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%'\n },\n prevBtn : {\n root: {\n marginLeft: 12,\n ...btn,\n backgroundColor: themeVariables.carouselPrevBgColor,\n rippleColor: themeVariables.transparent\n },\n text: {\n fontSize: 32\n },\n icon : {\n color: themeVariables.carouselPrevBtnColor\n }\n } as WmIconStyles,\n nextBtn : {\n root: {\n marginRight: 12,\n ...btn,\n backgroundColor: themeVariables.carouselPrevBgColor,\n rippleColor: themeVariables.transparent\n },\n text: {\n fontSize: 32\n },\n icon : {\n color: themeVariables.carouselNextBtnColor\n }\n } as WmIconStyles,\n dotsWrapperStyle:{\n opacity: 1,\n backgroundColor: themeVariables.carouselDotWrapperBgColor,\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n paddingTop: 4,\n paddingBottom: 4\n },\n activeDotStyle: {\n position: 'absolute',\n backgroundColor: themeVariables.carouselActiveDotColor,\n opacity: 1,\n padding: 4\n },\n dotStyle: {\n width: 8,\n height: 8,\n borderRadius: 10,\n opacity: 0.2,\n marginLeft: 2,\n marginRight: 2,\n backgroundColor: themeVariables.carouselDotColor\n },\n skeleton: {\n root: {\n width: '100%',\n },\n text: {}\n } as any as WmSkeletonStyles,\n dotSkeleton: {\n root: {\n width: 10,\n height: 10,\n borderRadius: 5,\n opacity: 1,\n backgroundColor: themeVariables.skeletonAnimatedBgColor \n }\n } as any as WmSkeletonStyles\n } as WmCarouselStyles);\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n prevBtn : {\n root:{\n transform: [{rotateY: '180deg'}]\n }\n },\n nextBtn : {\n root:{\n transform: [{rotateY: '180deg'}]\n }\n }\n });\n\n addStyle('app-carousel-1', '', {\n btnPanel: {\n top: '100%'\n },\n prevBtn: {\n root: {\n borderRadius: 6\n }\n },\n nextBtn: {\n root: {\n borderRadius: 6\n }\n }\n } as any as WmCarouselStyles);\n\n addStyle('app-carousel-2', '', {\n btnPanel: {\n backgroundColor: themeVariables.defaultColorF,\n width: '100%',\n top: '100%',\n right: 0,\n padding: 8,\n justifyContent: 'flex-end'\n },\n dotsWrapperStyle:{\n alignSelf: 'flex-start',\n justifyContent: 'flex-start'\n },\n activeDotStyle: {\n backgroundColor: themeVariables.primaryColor,\n },\n dotStyle: {\n backgroundColor: themeVariables.primaryColor,\n },\n prevBtn: {\n root: {\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderColor: themeVariables.primaryColor,\n },\n icon : {\n color: themeVariables.primaryColor\n }\n },\n nextBtn: {\n root: {\n marginLeft: 8,\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderColor: themeVariables.primaryColor,\n },\n icon : {\n color: themeVariables.primaryColor\n }\n }\n } as any as WmCarouselStyles);\n});"],"mappings":"AACA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAkBxF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,GAAc,GAAG;IACnBC,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE,EAAE;IACTC,YAAY,EAAE,EAAE;IAChBC,WAAW,EAAEN,cAAc,CAACO,WAAW;IACvCC,WAAW,EAAE,CAAC;IACdC,cAAc,EAAE;EACpB,CAAC;EACD,MAAMC,aAA+B,GAAGb,YAAY,CAAC;IACjDc,IAAI,EAAE;MACFC,QAAQ,EAAE,UAAU;MACpBC,WAAW,EAAEb,cAAc,CAACO;IAChC,CAAC;IACDO,IAAI,EAAE,CAAC,CAAC;IACRC,KAAK,EAAE;MACHX,KAAK,EAAE,MAAM;MACbY,QAAQ,EAAE,QAAQ;MAClBC,iBAAiB,EAAE,EAAE;MACrBC,SAAS,EAAE,CACP;QACIC,KAAK,EAAE;MACX,CAAC;IAET,CAAC;IACDC,UAAU,EAAE,CAAC,CAAC;IACdC,SAAS,EAAE,CAAC,CAAC;IACbC,WAAW,EAAE,CAAC,CAAC;IACfC,QAAQ,E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G,EAAE,MAAM;MACX8B,KAAK,EAAE,CAAC;MACRR,OAAO,EAAE,CAAC;MACVrC,cAAc,EAAE;IACpB,CAAC;IACD8B,gBAAgB,EAAC;MACbgB,SAAS,EAAE,YAAY;MACvB9C,cAAc,EAAE;IACpB,CAAC;IACDmC,cAAc,EAAE;MACZd,eAAe,EAAE9B,cAAc,CAACwD;IACpC,CAAC;IACDT,QAAQ,EAAE;MACNjB,eAAe,EAAE9B,cAAc,CAACwD;IACpC,CAAC;IACD5B,OAAO,EAAE;MACLjB,IAAI,EAAE;QACFmB,eAAe,EAAE,0BAA0B;QAC3CxB,WAAW,EAAEN,cAAc,CAACwD;MAChC,CAAC;MACDvB,IAAI,EAAG;QACHC,KAAK,EAAElC,cAAc,CAACwD;MAC1B;IACJ,CAAC;IACDpB,OAAO,EAAE;MACLzB,IAAI,EAAE;QACFkB,UAAU,EAAE,CAAC;QACbC,eAAe,EAAE,0BAA0B;QAC3CxB,WAAW,EAAEN,cAAc,CAACwD;MAChC,CAAC;MACDvB,IAAI,EAAG;QACHC,KAAK,EAAElC,cAAc,CAACwD;MAC1B;IACJ;EACJ,CAA4B,CAAC;AACjC,CAAC,CAAC","ignoreList":[]}
|
@@ -34,6 +34,20 @@ export default class WmAnchor extends BaseComponent {
|
|
34
34
|
height: this.props.skeletonheight || this.styles.root.height
|
35
35
|
});
|
36
36
|
}
|
37
|
+
renderBadge() {
|
38
|
+
const {
|
39
|
+
badgevalue
|
40
|
+
} = this.props;
|
41
|
+
if (this._showSkeleton) {
|
42
|
+
return createSkeleton(this.theme, this.styles.badgeSkeleton, {
|
43
|
+
...this.styles.badge
|
44
|
+
// marginTop: -50
|
45
|
+
});
|
46
|
+
}
|
47
|
+
return badgevalue != undefined ? /*#__PURE__*/React.createElement(Badge, {
|
48
|
+
style: this.styles.badge
|
49
|
+
}, badgevalue) : null;
|
50
|
+
}
|
37
51
|
renderWidget(props) {
|
38
52
|
const {
|
39
53
|
iconclass,
|
@@ -58,10 +72,6 @@ export default class WmAnchor extends BaseComponent {
|
|
58
72
|
iconmargin: iconmargin,
|
59
73
|
iconwidth: iconwidth
|
60
74
|
});
|
61
|
-
//@ts-ignore
|
62
|
-
const badge = badgevalue != undefined ? /*#__PURE__*/React.createElement(Badge, _extends({
|
63
|
-
style: this.styles.badge
|
64
|
-
}, this.getTestProps('badge')), badgevalue) : null;
|
65
75
|
return /*#__PURE__*/React.createElement(NavigationServiceConsumer, null, navigationService => /*#__PURE__*/React.createElement(Animatedview, {
|
66
76
|
entryanimation: props.animation,
|
67
77
|
delay: props.animationdelay,
|
@@ -83,7 +93,7 @@ export default class WmAnchor extends BaseComponent {
|
|
83
93
|
style: this.styles.text
|
84
94
|
}, this.getTestPropsForLabel('caption'), getAccessibilityProps(AccessibilityWidgetType.ANCHOR, props), {
|
85
95
|
numberOfLines: props.nooflines
|
86
|
-
}), props.caption) : null, props.iconposition === 'right' && icon,
|
96
|
+
}), props.caption) : null, props.iconposition === 'right' && icon, this.renderBadge())));
|
87
97
|
}
|
88
98
|
}
|
89
99
|
//# sourceMappingURL=anchor.component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Text","Badge","BaseComponent","BaseComponentState","Tappable","WmIcon","encodeUrl","AccessibilityWidgetType","getAccessibilityProps","NavigationServiceConsumer","WmAnchorProps","DEFAULT_CLASS","Animatedview","createSkeleton","WmAnchorState","WmAnchor","constructor","props","onTap","navigationService","e","state","hyperlink","link","encodeurl","openUrl","target","invokeEventCallback","proxy","renderSkeleton","theme","styles","skeleton","root","width","skeletonwidth","height","skeletonheight","
|
1
|
+
{"version":3,"names":["React","Text","Badge","BaseComponent","BaseComponentState","Tappable","WmIcon","encodeUrl","AccessibilityWidgetType","getAccessibilityProps","NavigationServiceConsumer","WmAnchorProps","DEFAULT_CLASS","Animatedview","createSkeleton","WmAnchorState","WmAnchor","constructor","props","onTap","navigationService","e","state","hyperlink","link","encodeurl","openUrl","target","invokeEventCallback","proxy","renderSkeleton","theme","styles","skeleton","root","width","skeletonwidth","height","skeletonheight","renderBadge","badgevalue","_showSkeleton","badgeSkeleton","badge","undefined","createElement","style","renderWidget","iconclass","iconurl","name","iconheight","iconmargin","iconwidth","icon","text","color","id","getTestId","hint","entryanimation","animation","delay","animationdelay","justifyContent","_extends","getTestPropsForAction","flexDirection","iconposition","_background","caption","getTestPropsForLabel","ANCHOR","numberOfLines","nooflines"],"sources":["anchor.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport { Badge } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { SyntheticEvent, Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { encodeUrl } from '@wavemaker/app-rn-runtime/core/utils';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\nimport NavigationService, { NavigationServiceConsumer } from '@wavemaker/app-rn-runtime/core/navigation.service';\n\nimport WmAnchorProps from './anchor.props';\nimport { DEFAULT_CLASS, WmAnchorStyles } from './anchor.styles';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmAnchorState extends BaseComponentState<WmAnchorProps> {\n\n}\n\nexport default class WmAnchor extends BaseComponent<WmAnchorProps, WmAnchorState, WmAnchorStyles> {\n\n constructor(props: WmAnchorProps) {\n super(props, DEFAULT_CLASS, new WmAnchorProps());\n }\n\n onTap(navigationService: NavigationService, e: SyntheticEvent) {\n const props = this.state.props;\n if (props.hyperlink) {\n const link = props.encodeurl ? encodeUrl(props.hyperlink) : props.hyperlink;\n navigationService.openUrl(link, {\n target: this.state.props.target\n });\n }\n this.invokeEventCallback('onTap', [e, this.proxy]);\n }\n\n public renderSkeleton(props: WmAnchorProps){\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: this.props.skeletonwidth || this.styles.root.width,\n height: this.props.skeletonheight || this.styles.root.height\n });\n }\n \n renderBadge() {\n const { badgevalue } = this.props;\n if(this._showSkeleton) {\n return createSkeleton(this.theme, this.styles.badgeSkeleton, {\n ...this.styles.badge,\n // marginTop: -50\n })\n }\n return badgevalue != undefined ? (<Badge style={this.styles.badge}>{badgevalue}</Badge>): null;\n }\n\n renderWidget(props: WmAnchorProps) {\n const {\n iconclass,\n iconurl,\n name,\n iconheight,\n iconmargin,\n iconwidth,\n badgevalue,\n } = props;\n\n if (this.styles.icon && this.styles.icon.text) {\n this.styles.icon.text.color = this.styles.text.color;\n }\n\n const icon = (iconclass || iconurl) && (\n <WmIcon\n id={this.getTestId('icon')}\n styles={this.styles.icon}\n hint={props?.hint}\n name={name + '_icon'}\n iconclass={iconclass}\n iconurl={iconurl}\n iconheight={iconheight}\n iconmargin={iconmargin}\n iconwidth={iconwidth}\n />\n );\n return (\n <NavigationServiceConsumer>\n {(navigationService: NavigationService) =>\n (<Animatedview entryanimation={props.animation} delay={props.animationdelay} style={{width: this.styles.root.width, height: this.styles.root.height, justifyContent: 'center'}}>\n <Tappable {...this.getTestPropsForAction()} target={this} styles={[this.styles.root, this.styles.root.width && this.styles.root.height ? { width: '100%', height: '100%'} : null, {flexDirection: props.iconposition === 'top' ? 'column': 'row'}]}\n onTap={props.hyperlink || props.onTap ? (e: SyntheticEvent) => this.onTap(navigationService, e) : undefined}>\n {this._background}\n {props.iconposition === 'top' && icon}\n {props.iconposition === 'left' && icon}\n {props.caption ? (<Text style={this.styles.text}\n {...this.getTestPropsForLabel('caption')}\n {...getAccessibilityProps(AccessibilityWidgetType.ANCHOR, props)}\n numberOfLines={props.nooflines}>{props.caption}</Text>) : null}\n {props.iconposition === 'right' && icon}\n {this.renderBadge()}\n </Tappable>\n </Animatedview>)\n }\n </NavigationServiceConsumer>\n );\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ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ACC,iBAAiB,EAAEC,CAAC,CAAC,GAAGuB;IAAU,IAC3G,IAAI,CAACyB,WAAW,EAChBnD,KAAK,CAACkD,YAAY,KAAK,KAAK,IAAId,IAAI,EACpCpC,KAAK,CAACkD,YAAY,KAAK,MAAM,IAAId,IAAI,EACrCpC,KAAK,CAACoD,OAAO,gBAAItE,KAAA,CAAA6C,aAAA,CAAC5C,IAAI,EAAAgE,QAAA;MAACnB,KAAK,EAAE,IAAI,CAACd,MAAM,CAACuB;IAAK,GAC5C,IAAI,CAACgB,oBAAoB,CAAC,SAAS,CAAC,EACpC9D,qBAAqB,CAACD,uBAAuB,CAACgE,MAAM,EAAEtD,KAAK,CAAC;MAChEuD,aAAa,EAAEvD,KAAK,CAACwD;IAAU,IAAExD,KAAK,CAACoD,OAAc,CAAC,GAAI,IAAI,EAC7DpD,KAAK,CAACkD,YAAY,KAAK,OAAO,IAAId,IAAI,EACtC,IAAI,CAACf,WAAW,CAAC,CACV,CACE,CAES,CAAC;EAEhC;AACF","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Color","defineStyles","BASE_THEME","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","color","linkDefaultColor","flexDirection","alignItems","overflow","text","paddingLeft","paddingRight","fontSize","textDecorationLine","badge","backgroundColor","fade","rgb","toString","alignSelf","marginTop","marginLeft","fontWeight","icon","anchorTextPadding","skeleton","width","height","borderRadius","getLinkStyles","linkPrimaryColor","linkSecondaryColor","linkSuccessColor","linkDangerColor","linkWarningColor","linkInfoColor","linkLightColor","linkDarkColor"],"sources":["anchor.styles.ts"],"sourcesContent":["import Color from 'color';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmAnchorStyles = BaseStyles & {\n badge: AllStyle,\n icon: WmIconStyles\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-anchor';\n\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmAnchorStyles = defineStyles({\n root: {\n color: themeVariables.linkDefaultColor,\n flexDirection: 'row',\n alignItems: 'center',\n overflow: 'visible'\n },\n text: {\n paddingLeft: 8,\n paddingRight: 8,\n color: themeVariables.linkDefaultColor,\n fontSize: 18, \n textDecorationLine: 'underline',\n },\n badge: {\n backgroundColor: Color(themeVariables.linkDefaultColor).fade(0.8).rgb().toString(),\n color: themeVariables.linkDefaultColor,\n alignSelf: 'flex-start',\n marginTop: -12,\n marginLeft: 0,\n fontWeight: 'bold'\n },\n icon: {\n root : {\n alignSelf: 'center'\n },\n text: {\n fontSize: 16,\n paddingRight: themeVariables.anchorTextPadding,\n color: themeVariables.linkDefaultColor\n }\n } as WmIconStyles,\n skeleton: {\n root: {\n width: '100%',\n height: 20,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n text: {\n paddingRight: 8\n }\n });\n\n const getLinkStyles = (color: string) => {\n return {\n root: {\n color: color\n },\n text: {\n color: color\n },\n icon: {\n text: {\n color: color\n }\n },\n badge: {\n backgroundColor: Color(color).fade(0.8).rgb().toString(),\n color: color,\n }\n } as WmAnchorStyles;\n };\n\n addStyle('link-primary', '', getLinkStyles(themeVariables.linkPrimaryColor));\n addStyle('link-secondary', '', getLinkStyles(themeVariables.linkSecondaryColor));\n addStyle('link-success', '', getLinkStyles(themeVariables.linkSuccessColor));\n addStyle('link-danger', '', getLinkStyles(themeVariables.linkDangerColor));\n addStyle('link-warning', '', getLinkStyles(themeVariables.linkWarningColor));\n addStyle('link-info', '', getLinkStyles(themeVariables.linkInfoColor));\n addStyle('link-light', '', getLinkStyles(themeVariables.linkLightColor));\n addStyle('link-dark', '', getLinkStyles(themeVariables.linkDarkColor));\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,OAAOC,UAAU,MAAoB,wCAAwC;
|
1
|
+
{"version":3,"names":["Color","defineStyles","BASE_THEME","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","color","linkDefaultColor","flexDirection","alignItems","overflow","text","paddingLeft","paddingRight","fontSize","textDecorationLine","badge","backgroundColor","fade","rgb","toString","alignSelf","marginTop","marginLeft","fontWeight","icon","anchorTextPadding","skeleton","width","height","borderRadius","badgeSkeleton","getLinkStyles","linkPrimaryColor","linkSecondaryColor","linkSuccessColor","linkDangerColor","linkWarningColor","linkInfoColor","linkLightColor","linkDarkColor"],"sources":["anchor.styles.ts"],"sourcesContent":["import Color from 'color';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmAnchorStyles = BaseStyles & {\n badge: AllStyle,\n icon: WmIconStyles\n skeleton: WmSkeletonStyles\n badgeSkeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-anchor';\n\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmAnchorStyles = defineStyles({\n root: {\n color: themeVariables.linkDefaultColor,\n flexDirection: 'row',\n alignItems: 'center',\n overflow: 'visible'\n },\n text: {\n paddingLeft: 8,\n paddingRight: 8,\n color: themeVariables.linkDefaultColor,\n fontSize: 18, \n textDecorationLine: 'underline',\n },\n badge: {\n backgroundColor: Color(themeVariables.linkDefaultColor).fade(0.8).rgb().toString(),\n color: themeVariables.linkDefaultColor,\n alignSelf: 'flex-start',\n marginTop: -12,\n marginLeft: 0,\n fontWeight: 'bold'\n },\n icon: {\n root : {\n alignSelf: 'center'\n },\n text: {\n fontSize: 16,\n paddingRight: themeVariables.anchorTextPadding,\n color: themeVariables.linkDefaultColor\n }\n } as WmIconStyles,\n skeleton: {\n root: {\n width: '100%',\n height: 20,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles,\n badgeSkeleton: {\n root: {\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n text: {\n paddingRight: 8\n }\n });\n\n const getLinkStyles = (color: string) => {\n return {\n root: {\n color: color\n },\n text: {\n color: color\n },\n icon: {\n text: {\n color: color\n }\n },\n badge: {\n backgroundColor: Color(color).fade(0.8).rgb().toString(),\n color: color,\n }\n } as WmAnchorStyles;\n };\n\n addStyle('link-primary', '', getLinkStyles(themeVariables.linkPrimaryColor));\n addStyle('link-secondary', '', getLinkStyles(themeVariables.linkSecondaryColor));\n addStyle('link-success', '', getLinkStyles(themeVariables.linkSuccessColor));\n addStyle('link-danger', '', getLinkStyles(themeVariables.linkDangerColor));\n addStyle('link-warning', '', getLinkStyles(themeVariables.linkWarningColor));\n addStyle('link-info', '', getLinkStyles(themeVariables.linkInfoColor));\n addStyle('link-light', '', getLinkStyles(themeVariables.linkLightColor));\n addStyle('link-dark', '', getLinkStyles(themeVariables.linkDarkColor));\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,OAAOC,UAAU,MAAoB,wCAAwC;AAU7E,OAAO,MAAMC,aAAa,GAAG,YAAY;AAEzCD,UAAU,CAACE,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA6B,GAAGN,YAAY,CAAC;IAC/CO,IAAI,EAAE;MACFC,KAAK,EAAEJ,cAAc,CAACK,gBAAgB;MACtCC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,QAAQ;M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;MACDmB,IAAI,EAAE;QACFd,IAAI,EAAE;UACFL,KAAK,EAAEA;QACX;MACJ,CAAC;MACDU,KAAK,EAAE;QACHC,eAAe,EAAEpB,KAAK,CAACS,KAAK,CAAC,CAACY,IAAI,CAAC,GAAG,CAAC,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;QACxDd,KAAK,EAAEA;MACX;IACJ,CAAC;EACL,CAAC;EAEDH,QAAQ,CAAC,cAAc,EAAE,EAAE,EAAE6B,aAAa,CAAC9B,cAAc,CAAC+B,gBAAgB,CAAC,CAAC;EAC5E9B,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE6B,aAAa,CAAC9B,cAAc,CAACgC,kBAAkB,CAAC,CAAC;EAChF/B,QAAQ,CAAC,cAAc,EAAE,EAAE,EAAE6B,aAAa,CAAC9B,cAAc,CAACiC,gBAAgB,CAAC,CAAC;EAC5EhC,QAAQ,CAAC,aAAa,EAAE,EAAE,EAAE6B,aAAa,CAAC9B,cAAc,CAACkC,eAAe,CAAC,CAAC;EAC1EjC,QAAQ,CAAC,cAAc,EAAE,EAAE,EAAE6B,aAAa,CAAC9B,cAAc,CAACmC,gBAAgB,CAAC,CAAC;EAC5ElC,QAAQ,CAAC,WAAW,EAAE,EAAE,EAAE6B,aAAa,CAAC9B,cAAc,CAACoC,aAAa,CAAC,CAAC;EACtEnC,QAAQ,CAAC,YAAY,EAAE,EAAE,EAAE6B,aAAa,CAAC9B,cAAc,CAACqC,cAAc,CAAC,CAAC;EACxEpC,QAAQ,CAAC,WAAW,EAAE,EAAE,EAAE6B,aAAa,CAAC9B,cAAc,CAACsC,aAAa,CAAC,CAAC;AAC1E,CAAC,CAAC","ignoreList":[]}
|
@@ -45,10 +45,23 @@ export default class WmButton extends BaseComponent {
|
|
45
45
|
}, this.getTestProps('badge')), props.badgevalue);
|
46
46
|
}
|
47
47
|
renderSkeleton(prop) {
|
48
|
+
let skeletonWidth, skeletonHeight;
|
49
|
+
if (this.props.skeletonwidth == "0") {
|
50
|
+
skeletonWidth = 0;
|
51
|
+
} else {
|
52
|
+
var _this$styles$root;
|
53
|
+
skeletonWidth = this.props.skeletonwidth || ((_this$styles$root = this.styles.root) === null || _this$styles$root === void 0 ? void 0 : _this$styles$root.width);
|
54
|
+
}
|
55
|
+
if (this.props.skeletonheight == "0") {
|
56
|
+
skeletonHeight = 0;
|
57
|
+
} else {
|
58
|
+
var _this$styles$root2;
|
59
|
+
skeletonHeight = this.props.skeletonheight || ((_this$styles$root2 = this.styles.root) === null || _this$styles$root2 === void 0 ? void 0 : _this$styles$root2.height);
|
60
|
+
}
|
48
61
|
return createSkeleton(this.theme, this.styles.skeleton, {
|
49
62
|
...this.styles.root,
|
50
|
-
width:
|
51
|
-
height:
|
63
|
+
width: skeletonWidth,
|
64
|
+
height: skeletonHeight
|
52
65
|
});
|
53
66
|
}
|
54
67
|
renderWidget(props) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","Badge","WmButtonProps","DEFAULT_CLASS","WmIcon","Animatedview","createSkeleton","AccessibilityWidgetType","getAccessibilityProps","WmButtonState","WmButton","constructor","props","prepareIcon","iconclass","iconurl","hint","name","iconsize","iconheight","iconmargin","iconwidth","createElement","id","getTestId","styles","icon","prepareBadge","_extends","style","badge","getTestProps","badgevalue","renderSkeleton","prop","
|
1
|
+
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","Badge","WmButtonProps","DEFAULT_CLASS","WmIcon","Animatedview","createSkeleton","AccessibilityWidgetType","getAccessibilityProps","WmButtonState","WmButton","constructor","props","prepareIcon","iconclass","iconurl","hint","name","iconsize","iconheight","iconmargin","iconwidth","createElement","id","getTestId","styles","icon","prepareBadge","_extends","style","badge","getTestProps","badgevalue","renderSkeleton","prop","skeletonWidth","skeletonHeight","skeletonwidth","_this$styles$root","root","width","skeletonheight","_this$styles$root2","height","theme","skeleton","renderWidget","Fragment","entryanimation","animation","delay","animationdelay","paddingTop","paddingBottom","paddingLeft","paddingRight","overflow","flexDirection","flex","_background","justifyContent","rippleColor","target","getTestPropsForAction","accessibilityProps","BUTTON","content","iconposition","caption","text","getTestPropsForLabel","importantForAccessibility"],"sources":["button.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Badge } from 'react-native-paper';\n\nimport WmButtonProps from './button.props';\nimport { DEFAULT_CLASS, WmButtonStyles } from './button.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { createSkeleton } from '../skeleton/skeleton.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nexport class WmButtonState extends BaseComponentState<WmButtonProps> {\n\n}\n\nexport default class WmButton extends BaseComponent<WmButtonProps, WmButtonState, WmButtonStyles> {\n\n constructor(props: WmButtonProps) {\n super(props, DEFAULT_CLASS, new WmButtonProps());\n }\n\n private prepareIcon({\n iconclass,\n iconurl,\n hint,\n name,\n iconsize,\n iconheight,\n iconmargin,\n iconwidth,\n }: any) {\n return iconclass || iconurl\n ? (<WmIcon\n id={this.getTestId('icon')}\n hint={hint}\n styles={this.styles.icon}\n name={`${name}_icon`}\n iconclass={iconclass}\n iconsize={iconsize}\n iconurl={iconurl}\n iconheight={iconheight}\n iconmargin={iconmargin}\n iconwidth={iconwidth}\n />): null;\n }\n\n private prepareBadge(props: any) {\n //@ts-ignore\n return (<Badge style={this.styles.badge} {...this.getTestProps('badge')}>{props.badgevalue}</Badge>);\n }\n\n public renderSkeleton(prop: WmButtonProps) {\n let skeletonWidth, skeletonHeight;\n if(this.props.skeletonwidth == \"0\") {\n skeletonWidth = 0\n } else {\n skeletonWidth = this.props.skeletonwidth || this.styles.root?.width\n }\n\n if(this.props.skeletonheight == \"0\") {\n skeletonHeight = 0\n } else {\n skeletonHeight = this.props.skeletonheight || this.styles.root?.height;\n }\n \n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n });\n }\n\n renderWidget(props: WmButtonProps) {\n return (\n <>\n <Animatedview entryanimation={props.animation} delay={props.animationdelay}\n style={[\n this.styles.root,\n {\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n paddingRight: 0,\n overflow: 'hidden',\n flexDirection: 'column'\n },\n this.styles.root.height == \"100%\" ? {flex: 1}:{}\n ]}\n // accessibilityProps={{...getAccessibilityProps(\n // AccessibilityWidgetType.BUTTON,\n // props\n // )}}\n >\n {this._background}\n <Tappable\n styles={{\n paddingTop: this.styles.root.paddingTop,\n paddingBottom: this.styles.root.paddingBottom,\n paddingLeft: this.styles.root.paddingLeft,\n paddingRight: this.styles.root.paddingRight,\n width: '100%',\n height: this.styles.root.height ? '100%' : null,\n justifyContent: 'center',\n }}\n rippleColor = {this.styles.root.rippleColor}\n target={this}\n {...this.getTestPropsForAction()}\n accessibilityProps={{...getAccessibilityProps(\n AccessibilityWidgetType.BUTTON,\n props\n )}}>\n <View\n style={[\n this.styles.content,\n { flexDirection: props.iconposition === 'top' ? 'column' : 'row' }\n ]}>\n {props.iconposition === 'top' && this.prepareIcon(props)}\n {props.iconposition === 'left' && this.prepareIcon(props)}\n {props.caption ? (\n <Text\n style={this.styles.text}\n {...this.getTestPropsForLabel('caption')}\n importantForAccessibility={'no'}\n // accessibilityLabel={`${props.caption}`}\n >\n {props.caption}\n </Text>\n ) : null}\n {props.iconposition === 'right' && this.prepareIcon(props)}\n </View>\n </Tappable>\n </Animatedview>\n {props.badgevalue && this.prepareBadge(props)}\n </>\n );\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,EAAEC,IA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AAM,CAAC;IAClE,GACDvD,KAAK,CAACuD,YAAY,KAAK,KAAK,IAAI,IAAI,CAACtD,WAAW,CAACD,KAAK,CAAC,EACvDA,KAAK,CAACuD,YAAY,KAAK,MAAM,IAAI,IAAI,CAACtD,WAAW,CAACD,KAAK,CAAC,EACxDA,KAAK,CAACwD,OAAO,gBACZzE,KAAA,CAAA2B,aAAA,CAAC1B,IAAI,EAAAgC,QAAA;MACHC,KAAK,EAAE,IAAI,CAACJ,MAAM,CAAC4C;IAAK,GACpB,IAAI,CAACC,oBAAoB,CAAC,SAAS,CAAC;MACxCC,yBAAyB,EAAE;MAC3B;IAAA,IAEC3D,KAAK,CAACwD,OACH,CAAC,GACL,IAAI,EACPxD,KAAK,CAACuD,YAAY,KAAK,OAAO,IAAI,IAAI,CAACtD,WAAW,CAACD,KAAK,CACrD,CACE,CACE,CAAC,EACdA,KAAK,CAACoB,UAAU,IAAI,IAAI,CAACL,YAAY,CAACf,KAAK,CAC1C,CAAC;EAEP;AACF","ignoreList":[]}
|
@@ -108,10 +108,18 @@ export default class WmIcon extends BaseComponent {
|
|
108
108
|
return null;
|
109
109
|
}
|
110
110
|
renderSkeleton(props) {
|
111
|
+
let skeletonWidth = this.props.skeletonwidth || this.props.iconsize || this.styles.root.width;
|
112
|
+
let skeletonHeight = this.props.skeletonheight || this.props.iconsize || this.styles.root.height;
|
113
|
+
if (this.props.skeletonheight == "0") {
|
114
|
+
skeletonWidth = 0;
|
115
|
+
}
|
116
|
+
if (this.props.skeletonheight == "0") {
|
117
|
+
skeletonHeight = 0;
|
118
|
+
}
|
111
119
|
return createSkeleton(this.theme, this.styles.skeleton, {
|
112
120
|
...this.styles.root,
|
113
|
-
width:
|
114
|
-
height:
|
121
|
+
width: skeletonWidth,
|
122
|
+
height: skeletonHeight
|
115
123
|
});
|
116
124
|
}
|
117
125
|
getElementToShow(props, iconSrc) {
|