@wavemaker/app-rn-runtime 12.0.0-next.140535 → 12.0.0-next.141167
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 +2 -14
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js +0 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +0 -15
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +5 -15
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js +0 -3
- app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +2 -15
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +2 -10
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +3 -13
- 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 +0 -12
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +0 -2
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +0 -6
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js +3 -4
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.props.js +1 -9
- app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.styles.js +1 -7
- 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 +1 -7
- app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +0 -23
- 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 +1 -7
- 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 +1 -7
- 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 +1 -7
- 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 +0 -2
- 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 +1 -7
- app-rn-runtime/components/chart/line-chart/line-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js +1 -7
- app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +4 -44
- 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 +0 -4
- app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +1 -4
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +2 -36
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.styles.js +0 -7
- app-rn-runtime/components/container/container.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +1 -5
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js +1 -6
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +2 -27
- 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 +1 -4
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js +5 -31
- 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 +1 -4
- app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +4 -42
- 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 +0 -3
- 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 +1 -4
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +3 -28
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js +1 -4
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +1 -23
- 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 +1 -6
- app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +2 -27
- 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 +0 -3
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +1 -4
- 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 +2 -6
- 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 +1 -4
- app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +0 -18
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.styles.js +0 -3
- 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 +0 -1
- app-rn-runtime/components/data/form/form.props.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js +1 -15
- 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 +0 -1
- 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 +1 -11
- app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +24 -32
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +0 -1
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js +0 -9
- 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 +0 -20
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js +0 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +0 -20
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js +0 -1
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +0 -21
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +0 -2
- 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 +0 -21
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js +0 -2
- 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/page-content/page-content.component.js +2 -27
- 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 +1 -6
- 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 +1 -7
- app-rn-runtime/components/page/page.styles.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.component.js +0 -21
- 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 +1 -6
- app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js +0 -22
- 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 +1 -6
- app-rn-runtime/components/prefab/prefab-container.styles.js.map +1 -1
- app-rn-runtime/core/base.component.js +2 -3
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/utils.js +0 -5
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/package.json +3 -3
- app-rn-runtime/runtime/base-fragment.component.js +13 -28
- 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/styles/theme.variables.js +0 -1
- app-rn-runtime/styles/theme.variables.js.map +1 -1
@@ -12,7 +12,6 @@ import * as SwipeAnimation from '@wavemaker/app-rn-runtime/gestures/swipe.animat
|
|
12
12
|
import { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';
|
13
13
|
import WmCarouselProps from './carousel.props';
|
14
14
|
import { DEFAULT_CLASS } from './carousel.styles';
|
15
|
-
import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
|
16
15
|
export class WmCarouselState extends BaseComponentState {
|
17
16
|
constructor(...args) {
|
18
17
|
super(...args);
|
@@ -198,10 +197,6 @@ export default class WmCarousel extends BaseComponent {
|
|
198
197
|
if (maxIndex === data.length) {
|
199
198
|
minIndex = maxIndex - maxNoOfDots;
|
200
199
|
}
|
201
|
-
const dotStyle = this._showSkeleton ? {
|
202
|
-
...this.styles.dotStyle,
|
203
|
-
...this.styles.dotSkeleton
|
204
|
-
} : this.styles.dotStyle;
|
205
200
|
return /*#__PURE__*/React.createElement(View, {
|
206
201
|
style: this.styles.dotsWrapperStyle
|
207
202
|
}, /*#__PURE__*/React.createElement(View, {
|
@@ -212,9 +207,9 @@ export default class WmCarousel extends BaseComponent {
|
|
212
207
|
return index >= minIndex && index <= maxIndex ? /*#__PURE__*/React.createElement(View, _extends({
|
213
208
|
key: 'dots_' + this.generateItemKey(item, index, this.state.props)
|
214
209
|
}, this.getTestPropsForAction('indicator' + index), {
|
215
|
-
style: [dotStyle]
|
210
|
+
style: [this.styles.dotStyle]
|
216
211
|
})) : null;
|
217
|
-
}),
|
212
|
+
}), /*#__PURE__*/React.createElement(Animated.View, {
|
218
213
|
style: [this.styles.dotStyle, this.styles.activeDotStyle, {
|
219
214
|
width: undefined,
|
220
215
|
height: undefined,
|
@@ -236,13 +231,6 @@ export default class WmCarousel extends BaseComponent {
|
|
236
231
|
}]
|
237
232
|
}))));
|
238
233
|
}
|
239
|
-
renderSkeleton(props) {
|
240
|
-
var _this$styles$skeleton;
|
241
|
-
return /*#__PURE__*/React.createElement(View, null, createSkeleton(this.theme, this.styles.skeleton, {
|
242
|
-
...this.styles.root,
|
243
|
-
height: (_this$styles$skeleton = this.styles.skeleton.root) === null || _this$styles$skeleton === void 0 ? void 0 : _this$styles$skeleton.height
|
244
|
-
}), this.renderPagination([{}, {}, {}]));
|
245
|
-
}
|
246
234
|
componentDidMount() {
|
247
235
|
super.componentDidMount();
|
248
236
|
this.autoPlay();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","isArray","isUndefined","Animated","Easing","View","DefaultKeyExtractor","WmIcon","BaseComponent","BaseComponentState","SwipeAnimation","Tappable","WmCarouselProps","DEFAULT_CLASS","createSkeleton","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","createElement","style","dotsWrapperStyle","flexDirection","map","_extends","key","getTestPropsForAction","activeDotStyle","undefined","height","transform","translateX","right","left","renderSkeleton","_this$styles$skeleton","theme","skeleton","root","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","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';\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\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>\n {\n createSkeleton(this.theme, this.styles.skeleton, {...this.styles.root, height: this.styles.skeleton.root?.height})}\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,SAAS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,CAACrG,IAAK;MACjB+G,kBAAkB,EAAC;IAAM,CAAC,CACxB,CAAC,GAAG,IAAI,EACbxC,OAAO,IAAIjG,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","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,oDAA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AAA,CAAC3H,MAAM;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":[]}
|
@@ -15,7 +15,6 @@ 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);
|
19
18
|
}
|
20
19
|
}
|
21
20
|
//# 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
|
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;AAClB","ignoreList":[]}
|
@@ -88,21 +88,6 @@ 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
|
-
height: 200
|
96
|
-
},
|
97
|
-
text: {}
|
98
|
-
},
|
99
|
-
dotSkeleton: {
|
100
|
-
root: {
|
101
|
-
width: 10,
|
102
|
-
height: 10,
|
103
|
-
borderRadius: 5,
|
104
|
-
backgroundColor: themeVariables.carouselDotColor
|
105
|
-
}
|
106
91
|
}
|
107
92
|
});
|
108
93
|
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","skeleton","dotSkeleton","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 height: 200, \n },\n text: {}\n } as any as WmSkeletonStyles,\n dotSkeleton: {\n root: {\n width: 10,\n height: 10,\n borderRadius: 5,\n backgroundColor: themeVariables.carouselDotColor \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,CAA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AAE;MACLjB,IAAI,EAAE;QACFN,YAAY,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,CAACoD,aAAa;MAC7ChD,KAAK,EAAE,MAAM;MACboB,GAAG,EAAE,MAAM;MACX6B,KAAK,EAAE,CAAC;MACRP,OAAO,EAAE,CAAC;MACVrC,cAAc,EAAE;IACpB,CAAC;IACD8B,gBAAgB,EAAC;MACbe,SAAS,EAAE,YAAY;MACvB7C,cAAc,EAAE;IACpB,CAAC;IACDmC,cAAc,EAAE;MACZd,eAAe,EAAE9B,cAAc,CAACuD;IACpC,CAAC;IACDR,QAAQ,EAAE;MACNjB,eAAe,EAAE9B,cAAc,CAACuD;IACpC,CAAC;IACD3B,OAAO,EAAE;MACLjB,IAAI,EAAE;QACFmB,eAAe,EAAE,0BAA0B;QAC3CxB,WAAW,EAAEN,cAAc,CAACuD;MAChC,CAAC;MACDtB,IAAI,EAAG;QACHC,KAAK,EAAElC,cAAc,CAACuD;MAC1B;IACJ,CAAC;IACDnB,OAAO,EAAE;MACLzB,IAAI,EAAE;QACFkB,UAAU,EAAE,CAAC;QACbC,eAAe,EAAE,0BAA0B;QAC3CxB,WAAW,EAAEN,cAAc,CAACuD;MAChC,CAAC;MACDtB,IAAI,EAAG;QACHC,KAAK,EAAElC,cAAc,CAACuD;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","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,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,EAAE;MACNX,QAAQ,EAAE,UAAU;MACpBY,GAAG,EAAE,KAAK;MACVC,SAAS,EAAE,CAAC,EAAE;MACdtB,MAAM,EAAE,EAAE;MACVuB,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,QAAQ;MACpBlB,cAAc,EAAE,eAAe;MAC/BL,KAAK,EAAE;IACX,CAAC;IACDwB,OAAO,EAAG;MACNjB,IAAI,EAAE;QACFkB,UAAU,EAAE,EAAE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0B;QAC3CxB,WAAW,EAAEN,cAAc,CAACqD;MAChC,CAAC;MACDpB,IAAI,EAAG;QACHC,KAAK,EAAElC,cAAc,CAACqD;MAC1B;IACJ;EACJ,CAA4B,CAAC;AACjC,CAAC,CAAC","ignoreList":[]}
|
@@ -34,20 +34,6 @@ 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
|
-
}
|
51
37
|
renderWidget(props) {
|
52
38
|
const {
|
53
39
|
iconclass,
|
@@ -72,6 +58,10 @@ export default class WmAnchor extends BaseComponent {
|
|
72
58
|
iconmargin: iconmargin,
|
73
59
|
iconwidth: iconwidth
|
74
60
|
});
|
61
|
+
//@ts-ignore
|
62
|
+
const badge = badgevalue != undefined ? /*#__PURE__*/React.createElement(Badge, _extends({
|
63
|
+
style: this.styles.badge
|
64
|
+
}, this.getTestProps('badge')), badgevalue) : null;
|
75
65
|
return /*#__PURE__*/React.createElement(NavigationServiceConsumer, null, navigationService => /*#__PURE__*/React.createElement(Animatedview, {
|
76
66
|
entryanimation: props.animation,
|
77
67
|
delay: props.animationdelay,
|
@@ -93,7 +83,7 @@ export default class WmAnchor extends BaseComponent {
|
|
93
83
|
style: this.styles.text
|
94
84
|
}, this.getTestPropsForLabel('caption'), getAccessibilityProps(AccessibilityWidgetType.ANCHOR, props), {
|
95
85
|
numberOfLines: props.nooflines
|
96
|
-
}), props.caption) : null, props.iconposition === 'right' && icon,
|
86
|
+
}), props.caption) : null, props.iconposition === 'right' && icon, badge)));
|
97
87
|
}
|
98
88
|
}
|
99
89
|
//# 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","renderWidget","iconclass","iconurl","name","iconheight","iconmargin","iconwidth","badgevalue","icon","text","color","createElement","id","getTestId","hint","badge","undefined","_extends","style","getTestProps","entryanimation","animation","delay","animationdelay","justifyContent","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 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 //@ts-ignore\n const badge = badgevalue != undefined ? (<Badge style={this.styles.badge} {...this.getTestProps('badge')}>{badgevalue}</Badge>): null;\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 {badge}\n </Tappable>\n </Animatedview>)\n }\n </NavigationServiceConsumer>\n );\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAAyBC,QAAQ,QAAQ,mDAAmD;AAC5F,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,SAAS,QAAQ,sCAAsC;AAChE,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAA4BC,yBAAyB,QAAQ,mDAAmD;AAEhH,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAASC,cAAc,QAAQ,gCAAgC;AAE/D,OAAO,MAAMC,aAAa,SAASX,kBAAkB,CAAgB;AAIrE,eAAe,MAAMY,QAAQ,SAASb,aAAa,CAA+C;EAEhGc,WAAWA,CAACC,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,CAAC;EAClD;EAEAQ,KAAKA,CAACC,iBAAoC,EAAEC,CAAiB,EAAE;IAC7D,MAAMH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AAI,IAAI,CAACH,MAAM,CAACE,IAAI,CAACG,MAAM,GAAG;QAAEF,KAAK,EAAE,MAAM;QAAEE,MAAM,EAAE;MAAM,CAAC,GAAG,IAAI,EAAE;QAAC4B,aAAa,EAAE/C,KAAK,CAACgD,YAAY,KAAK,KAAK,GAAG,QAAQ,GAAE;MAAK,CAAC,CAAE;MACjP/C,KAAK,EAAED,KAAK,CAACK,SAAS,IAAIL,KAAK,CAACC,KAAK,GAAIE,CAAiB,IAAK,IAAI,CAACF,KAAK,CAACC,iBAAiB,EAAEC,CAAC,CAAC,GAAGkC;IAAU,IAC3G,IAAI,CAACY,WAAW,EAChBjD,KAAK,CAACgD,YAAY,KAAK,KAAK,IAAInB,IAAI,EACpC7B,KAAK,CAACgD,YAAY,KAAK,MAAM,IAAInB,IAAI,EACrC7B,KAAK,CAACkD,OAAO,gBAAIpE,KAAA,CAAAkD,aAAA,CAACjD,IAAI,EAAAuD,QAAA;MAACC,KAAK,EAAE,IAAI,CAACzB,MAAM,CAACgB;IAAK,GAC5C,IAAI,CAACqB,oBAAoB,CAAC,SAAS,CAAC,EACpC5D,qBAAqB,CAACD,uBAAuB,CAAC8D,MAAM,EAAEpD,KAAK,CAAC;MAChEqD,aAAa,EAAErD,KAAK,CAACsD;IAAU,IAAEtD,KAAK,CAACkD,OAAc,CAAC,GAAI,IAAI,EAC7DlD,KAAK,CAACgD,YAAY,KAAK,OAAO,IAAInB,IAAI,EACtCO,KACO,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","
|
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;AAS7E,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;MACpBC,QAAQ,EAAE;IACd,CAAC;IACDC,IAAI,EAAE;MACFC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE,CAAC;MACfP,KAAK,EAAEJ,cAAc,CAACK,gBAAgB;MACtCO,QAAQ,EAAE,EAAE;MACZC,kBAAkB,EAAE;IACxB,CAAC;IACDC,KAAK,EAAE;MACHC,eAAe,EAAEpB,KAAK,CAACK,cAAc,CAACK,gBAAgB,CAAC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cAAc,CAAC8B,gBAAgB,CAAC,CAAC;EAC5E7B,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE4B,aAAa,CAAC7B,cAAc,CAAC+B,kBAAkB,CAAC,CAAC;EAChF9B,QAAQ,CAAC,cAAc,EAAE,EAAE,EAAE4B,aAAa,CAAC7B,cAAc,CAACgC,gBAAgB,CAAC,CAAC;EAC5E/B,QAAQ,CAAC,aAAa,EAAE,EAAE,EAAE4B,aAAa,CAAC7B,cAAc,CAACiC,eAAe,CAAC,CAAC;EAC1EhC,QAAQ,CAAC,cAAc,EAAE,EAAE,EAAE4B,aAAa,CAAC7B,cAAc,CAACkC,gBAAgB,CAAC,CAAC;EAC5EjC,QAAQ,CAAC,WAAW,EAAE,EAAE,EAAE4B,aAAa,CAAC7B,cAAc,CAACmC,aAAa,CAAC,CAAC;EACtElC,QAAQ,CAAC,YAAY,EAAE,EAAE,EAAE4B,aAAa,CAAC7B,cAAc,CAACoC,cAAc,CAAC,CAAC;EACxEnC,QAAQ,CAAC,WAAW,EAAE,EAAE,EAAE4B,aAAa,CAAC7B,cAAc,CAACqC,aAAa,CAAC,CAAC;AAC1E,CAAC,CAAC","ignoreList":[]}
|
@@ -45,23 +45,10 @@ 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
|
-
}
|
61
48
|
return createSkeleton(this.theme, this.styles.skeleton, {
|
62
49
|
...this.styles.root,
|
63
|
-
width:
|
64
|
-
height:
|
50
|
+
width: this.props.skeletonwidth || this.styles.root.width,
|
51
|
+
height: this.props.skeletonheight || this.styles.root.height
|
65
52
|
});
|
66
53
|
}
|
67
54
|
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","theme","skeleton","root","width","skeletonwidth","height","skeletonheight","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 return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: (this.props.skeletonwidth || this.styles.root.width)as DimensionValue,\n height: (this.props.skeletonheight || this.styles.root.height) as DimensionValue\n });\n }\n\n renderWidget(props: 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,IAAI,QAAQ,cAAc;AACzD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,KAAK,QAAQ,oBAAoB;AAE1C,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAASC,cAAc,QAAQ,gCAAgC;AAC/D,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAO,MAAMC,aAAa,SAASV,kBAAkB,CAAgB;AAIrE,eAAe,MAAMW,QAAQ,SAASZ,aAAa,CAA+C;EAEhGa,WAAWA,CAACC,KAAoB,EAAE;IAChC,KAAK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MAChCC,kBAAkB,EAAE;QAAC,GAAGpD,qBAAqB,CAC3CD,uBAAuB,CAACsD,MAAM,EAC9BjD,KACF;MAAC;IAAE,iBACHjB,KAAA,CAAA2B,aAAA,CAACzB,IAAI;MACHgC,KAAK,EAAE,CACL,IAAI,CAACJ,MAAM,CAACqC,OAAO,EACnB;QAAET,aAAa,EAAEzC,KAAK,CAACmD,YAAY,KAAK,KAAK,GAAG,QAAQ,GAAG;MAAM,CAAC;IAClE,GACDnD,KAAK,CAACmD,YAAY,KAAK,KAAK,IAAI,IAAI,CAAClD,WAAW,CAACD,KAAK,CAAC,EACvDA,KAAK,CAACmD,YAAY,KAAK,MAAM,IAAI,IAAI,CAAClD,WAAW,CAACD,KAAK,CAAC,EACxDA,KAAK,CAACoD,OAAO,gBACZrE,KAAA,CAAA2B,aAAA,CAAC1B,IAAI,EAAAgC,QAAA;MACHC,KAAK,EAAE,IAAI,CAACJ,MAAM,CAACwC;IAAK,GACpB,IAAI,CAACC,oBAAoB,CAAC,SAAS,CAAC;MACxCC,yBAAyB,EAAE;MAC3B;IAAA,IAECvD,KAAK,CAACoD,OACH,CAAC,GACL,IAAI,EACPpD,KAAK,CAACmD,YAAY,KAAK,OAAO,IAAI,IAAI,CAAClD,WAAW,CAACD,KAAK,CACrD,CACE,CACE,CAAC,EACdA,KAAK,CAACoB,UAAU,IAAI,IAAI,CAACL,YAAY,CAACf,KAAK,CAC1C,CAAC;EAEP;AACF","ignoreList":[]}
|
@@ -108,18 +108,10 @@ 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
|
-
}
|
119
111
|
return createSkeleton(this.theme, this.styles.skeleton, {
|
120
112
|
...this.styles.root,
|
121
|
-
width:
|
122
|
-
height:
|
113
|
+
width: this.props.skeletonwidth || this.props.iconsize || this.styles.root.width,
|
114
|
+
height: this.props.skeletonheight || this.props.iconsize || this.styles.root.height
|
123
115
|
});
|
124
116
|
}
|
125
117
|
getElementToShow(props, iconSrc) {
|