@wavemaker/app-rn-runtime 11.4.2-rc.5405 → 11.4.2-rc.5568
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- app-rn-runtime/components/advanced/carousel/carousel.component.js +29 -114
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +3 -7
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +1 -2
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.props.js +0 -1
- app-rn-runtime/components/basic/label/label.props.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +10 -15
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.props.js +1 -9
- app-rn-runtime/components/chart/area-chart/area-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +39 -82
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +3 -8
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js +1 -25
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +2 -23
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +0 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +2 -93
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.props.js +0 -4
- app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +2 -103
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +0 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +5 -39
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js +0 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +1 -4
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +1 -4
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js +3 -5
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/core/formatters.js +2 -9
- app-rn-runtime/core/formatters.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +2 -5
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/utils.js +0 -16
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/gestures/swipe.animation.js +5 -53
- app-rn-runtime/gestures/swipe.animation.js.map +1 -1
- app-rn-runtime/package.json +3 -3
- app-rn-runtime/runtime/App.js +0 -16
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/core/constant.service.js +0 -22
- app-rn-runtime/core/constant.service.js.map +0 -1
|
@@ -2,8 +2,8 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
2
2
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
3
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { isArray
|
|
6
|
-
import { Animated,
|
|
5
|
+
import { isArray } from 'lodash-es';
|
|
6
|
+
import { Animated, View } from 'react-native';
|
|
7
7
|
import { DefaultKeyExtractor } from '@wavemaker/app-rn-runtime/core/key.extractor';
|
|
8
8
|
import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';
|
|
9
9
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
@@ -20,32 +20,25 @@ export default class WmCarousel extends BaseComponent {
|
|
|
20
20
|
constructor(_props) {
|
|
21
21
|
super(_props, DEFAULT_CLASS, new WmCarouselProps(), new WmCarouselState());
|
|
22
22
|
_defineProperty(this, "noOfSlides", 0);
|
|
23
|
-
_defineProperty(this, "
|
|
23
|
+
_defineProperty(this, "slideLayout", null);
|
|
24
24
|
_defineProperty(this, "keyExtractor", new DefaultKeyExtractor());
|
|
25
25
|
_defineProperty(this, "stopPlay", null);
|
|
26
|
-
_defineProperty(this, "dotScale", new Animated.Value(0));
|
|
27
|
-
_defineProperty(this, "dotPosition", new Animated.Value(0));
|
|
28
26
|
_defineProperty(this, "animationView", null);
|
|
29
27
|
_defineProperty(this, "animationHandlers", {
|
|
30
28
|
bounds: e => {
|
|
31
|
-
var _this$
|
|
32
|
-
const activeTabIndex = this.state.activeIndex - 1
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
lower = this.slidesLayout.filter((l, i) => i < activeTabIndex - 1).reduce((s, l) => s + l.width, 0);
|
|
36
|
-
}
|
|
37
|
-
let center = lower + (((_this$slidesLayout = this.slidesLayout[activeTabIndex - 1]) === null || _this$slidesLayout === void 0 ? void 0 : _this$slidesLayout.width) || 0);
|
|
38
|
-
let upper = center + (((_this$slidesLayout$ac = this.slidesLayout[activeTabIndex]) === null || _this$slidesLayout$ac === void 0 ? void 0 : _this$slidesLayout$ac.width) || 0);
|
|
29
|
+
var _this$slideLayout;
|
|
30
|
+
const activeTabIndex = this.state.activeIndex - 1,
|
|
31
|
+
w = ((_this$slideLayout = this.slideLayout) === null || _this$slideLayout === void 0 ? void 0 : _this$slideLayout.width) || 0,
|
|
32
|
+
noOfTabs = this.state.props.dataset.length;
|
|
39
33
|
return {
|
|
40
|
-
lower: -1 *
|
|
41
|
-
center: -1 *
|
|
42
|
-
upper: -1 *
|
|
34
|
+
lower: -1 * (activeTabIndex - (activeTabIndex === 0 ? 0 : 1)) * w,
|
|
35
|
+
center: -1 * activeTabIndex * w,
|
|
36
|
+
upper: -1 * (activeTabIndex + (activeTabIndex === noOfTabs - 1 ? 0 : 1)) * w
|
|
43
37
|
};
|
|
44
38
|
},
|
|
45
39
|
computePhase: value => {
|
|
46
|
-
var _this$
|
|
47
|
-
const
|
|
48
|
-
const w = ((_this$slidesLayout$ac2 = this.slidesLayout[activeTabIndex]) === null || _this$slidesLayout$ac2 === void 0 ? void 0 : _this$slidesLayout$ac2.width) || 0;
|
|
40
|
+
var _this$slideLayout2;
|
|
41
|
+
const w = ((_this$slideLayout2 = this.slideLayout) === null || _this$slideLayout2 === void 0 ? void 0 : _this$slideLayout2.width) || 0;
|
|
49
42
|
return w && Math.abs(value / w);
|
|
50
43
|
},
|
|
51
44
|
onLower: e => {
|
|
@@ -60,7 +53,6 @@ export default class WmCarousel extends BaseComponent {
|
|
|
60
53
|
this.updateState({
|
|
61
54
|
activeIndex: index
|
|
62
55
|
}, () => this.invokeEventCallback('onChange', [this, index, prevIndex]));
|
|
63
|
-
this.animatePagination(index);
|
|
64
56
|
});
|
|
65
57
|
_defineProperty(this, "renderItem", (item, index) => {
|
|
66
58
|
const props = this.state.props;
|
|
@@ -87,18 +79,16 @@ export default class WmCarousel extends BaseComponent {
|
|
|
87
79
|
this.stopPlay && this.stopPlay();
|
|
88
80
|
});
|
|
89
81
|
}
|
|
90
|
-
addSlideLayout(index, nativeEvent) {
|
|
91
|
-
this.slidesLayout[index] = nativeEvent.nativeEvent.layout;
|
|
92
|
-
if (index === this.state.activeIndex) {
|
|
93
|
-
this.forceUpdate();
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
82
|
generateItemKey(item, index, props) {
|
|
97
83
|
if (props.itemkey && item && !this._showSkeleton) {
|
|
98
84
|
return props.itemkey(item, index);
|
|
99
85
|
}
|
|
100
86
|
return 'list_item_' + this.keyExtractor.getKey(item, true);
|
|
101
87
|
}
|
|
88
|
+
setSlideLayout(event) {
|
|
89
|
+
this.slideLayout = event.nativeEvent.layout;
|
|
90
|
+
this.forceUpdate();
|
|
91
|
+
}
|
|
102
92
|
autoPlay() {
|
|
103
93
|
const props = this.state.props;
|
|
104
94
|
this.stopPlay && this.stopPlay();
|
|
@@ -123,7 +113,7 @@ export default class WmCarousel extends BaseComponent {
|
|
|
123
113
|
var _this$keyExtractor;
|
|
124
114
|
(_this$keyExtractor = this.keyExtractor) === null || _this$keyExtractor === void 0 ? void 0 : _this$keyExtractor.clear();
|
|
125
115
|
this.updateState({
|
|
126
|
-
activeIndex: Math.min(this.state.activeIndex, ($new === null || $new === void 0 ? void 0 : $new.length) ||
|
|
116
|
+
activeIndex: Math.min(this.state.activeIndex, ($new === null || $new === void 0 ? void 0 : $new.length) || 0)
|
|
127
117
|
});
|
|
128
118
|
break;
|
|
129
119
|
}
|
|
@@ -134,43 +124,6 @@ export default class WmCarousel extends BaseComponent {
|
|
|
134
124
|
}
|
|
135
125
|
}
|
|
136
126
|
}
|
|
137
|
-
animatePagination(index) {
|
|
138
|
-
var _this$styles$dotStyle, _this$styles$dotStyle2, _this$styles$dotStyle3;
|
|
139
|
-
const prevIndex = this.state.activeIndex;
|
|
140
|
-
const margin = (((_this$styles$dotStyle = this.styles.dotStyle) === null || _this$styles$dotStyle === void 0 ? void 0 : _this$styles$dotStyle.marginLeft) || 0) + (((_this$styles$dotStyle2 = this.styles.dotStyle) === null || _this$styles$dotStyle2 === void 0 ? void 0 : _this$styles$dotStyle2.marginRight) || 0);
|
|
141
|
-
const width = ((_this$styles$dotStyle3 = this.styles.dotStyle) === null || _this$styles$dotStyle3 === void 0 ? void 0 : _this$styles$dotStyle3.width) || 2;
|
|
142
|
-
const size = margin + width;
|
|
143
|
-
const position = Math.max(index - 1, 0) * size;
|
|
144
|
-
const scale = Math.abs(index - prevIndex) * size;
|
|
145
|
-
const options = {
|
|
146
|
-
useNativeDriver: true,
|
|
147
|
-
duration: 200,
|
|
148
|
-
easing: Easing.out(Easing.linear)
|
|
149
|
-
};
|
|
150
|
-
if (prevIndex < index) {
|
|
151
|
-
Animated.sequence([Animated.timing(this.dotScale, {
|
|
152
|
-
toValue: scale,
|
|
153
|
-
...options
|
|
154
|
-
}), Animated.parallel([Animated.timing(this.dotScale, {
|
|
155
|
-
toValue: 0,
|
|
156
|
-
...options
|
|
157
|
-
}), Animated.timing(this.dotPosition, {
|
|
158
|
-
toValue: (this.isRTL ? -1 : 1) * position,
|
|
159
|
-
...options
|
|
160
|
-
})])]).start();
|
|
161
|
-
} else if (prevIndex > index) {
|
|
162
|
-
Animated.sequence([Animated.parallel([Animated.timing(this.dotScale, {
|
|
163
|
-
toValue: scale,
|
|
164
|
-
...options
|
|
165
|
-
}), Animated.timing(this.dotPosition, {
|
|
166
|
-
toValue: (this.isRTL ? -1 : 1) * position,
|
|
167
|
-
...options
|
|
168
|
-
})]), Animated.timing(this.dotScale, {
|
|
169
|
-
toValue: 0,
|
|
170
|
-
...options
|
|
171
|
-
})]).start();
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
127
|
renderPagination(data) {
|
|
175
128
|
const maxNoOfDots = this.state.props.maxnoofdots;
|
|
176
129
|
let minIndex = Math.max(this.state.activeIndex - maxNoOfDots + 1, 0);
|
|
@@ -180,72 +133,43 @@ export default class WmCarousel extends BaseComponent {
|
|
|
180
133
|
}
|
|
181
134
|
return /*#__PURE__*/React.createElement(View, {
|
|
182
135
|
style: this.styles.dotsWrapperStyle
|
|
183
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
184
|
-
style: {
|
|
185
|
-
flexDirection: this.isRTL ? 'row-reverse' : 'row'
|
|
186
|
-
}
|
|
187
136
|
}, data.map((item, index) => {
|
|
188
137
|
return index >= minIndex && index <= maxIndex ? /*#__PURE__*/React.createElement(View, {
|
|
189
138
|
key: 'dots_' + this.generateItemKey(item, index, this.state.props),
|
|
190
|
-
style: [this.styles.dotStyle]
|
|
139
|
+
style: [this.styles.dotStyle, index === this.state.activeIndex - 1 ? this.styles.activeDotStyle : null]
|
|
191
140
|
}) : null;
|
|
192
|
-
})
|
|
193
|
-
style: [this.styles.dotStyle, this.styles.activeDotStyle, {
|
|
194
|
-
width: undefined,
|
|
195
|
-
height: undefined,
|
|
196
|
-
transform: [{
|
|
197
|
-
translateX: this.dotPosition
|
|
198
|
-
}]
|
|
199
|
-
}, this.isRTL ? {
|
|
200
|
-
right: 0
|
|
201
|
-
} : {
|
|
202
|
-
left: 0
|
|
203
|
-
}]
|
|
204
|
-
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
205
|
-
style: [{
|
|
206
|
-
width: 1,
|
|
207
|
-
height: 1
|
|
208
|
-
}, {
|
|
209
|
-
// This is failing in Android
|
|
210
|
-
// minWidth: this.dotScale
|
|
211
|
-
}]
|
|
212
|
-
}))));
|
|
141
|
+
}));
|
|
213
142
|
}
|
|
214
143
|
renderWidget(props) {
|
|
215
|
-
var _data
|
|
144
|
+
var _data;
|
|
216
145
|
const hasNavs = props.controls === 'both' || props.controls === 'navs';
|
|
217
146
|
const hasDots = props.controls === 'both' || props.controls === 'indicators';
|
|
218
147
|
let styles = this.styles;
|
|
219
148
|
let data = props.type === 'dynamic' ? props.dataset : props.children;
|
|
220
149
|
data = isArray(data) ? data : [];
|
|
221
150
|
this.noOfSlides = ((_data = data) === null || _data === void 0 ? void 0 : _data.length) || 0;
|
|
222
|
-
let slideScale = undefined;
|
|
223
|
-
let slideTranslateX = undefined;
|
|
224
|
-
if (isArray((_this$styles$slide = this.styles.slide) === null || _this$styles$slide === void 0 ? void 0 : _this$styles$slide.transform)) {
|
|
225
|
-
var _this$styles$slide2, _this$styles$slide3;
|
|
226
|
-
slideScale = (_this$styles$slide2 = this.styles.slide) === null || _this$styles$slide2 === void 0 || (_this$styles$slide2 = _this$styles$slide2.transform) === null || _this$styles$slide2 === void 0 || (_this$styles$slide2 = _this$styles$slide2.find(o => !isUndefined(o.scale))) === null || _this$styles$slide2 === void 0 ? void 0 : _this$styles$slide2.scale;
|
|
227
|
-
slideTranslateX = (_this$styles$slide3 = this.styles.slide) === null || _this$styles$slide3 === void 0 || (_this$styles$slide3 = _this$styles$slide3.transform) === null || _this$styles$slide3 === void 0 || (_this$styles$slide3 = _this$styles$slide3.find(o => !isUndefined(o.translateX))) === null || _this$styles$slide3 === void 0 ? void 0 : _this$styles$slide3.translateX;
|
|
228
|
-
}
|
|
229
151
|
// TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608
|
|
230
152
|
return /*#__PURE__*/React.createElement(View, {
|
|
231
|
-
style: styles.root
|
|
153
|
+
style: styles.root,
|
|
154
|
+
onLayout: this.setSlideLayout.bind(this)
|
|
232
155
|
}, this._background, /*#__PURE__*/React.createElement(SwipeAnimation.View, {
|
|
233
156
|
enableGestures: props.enablegestures,
|
|
234
157
|
style: {
|
|
235
|
-
|
|
158
|
+
flexDirection: 'row',
|
|
159
|
+
flexWrap: 'nowrap',
|
|
160
|
+
alignItems: 'center'
|
|
236
161
|
},
|
|
237
162
|
direction: "horizontal",
|
|
238
163
|
ref: r => {
|
|
239
164
|
this.animationView = r;
|
|
240
165
|
},
|
|
241
|
-
handlers: this.animationHandlers
|
|
242
|
-
slideWidth: this.styles.slide.width
|
|
166
|
+
handlers: this.animationHandlers
|
|
243
167
|
}, data.map((item, index) => {
|
|
244
168
|
var _this$animationView5, _this$animationView6;
|
|
245
169
|
const isActive = index === this.state.activeIndex - 1;
|
|
246
170
|
let scale = (_this$animationView5 = this.animationView) === null || _this$animationView5 === void 0 ? void 0 : _this$animationView5.animationPhase.interpolate({
|
|
247
171
|
inputRange: [-2000, index - 1, index, index + 1, 2000],
|
|
248
|
-
outputRange: [
|
|
172
|
+
outputRange: [0.8, 0.8, 1, 0.8, 0.8]
|
|
249
173
|
});
|
|
250
174
|
let translateX = (_this$animationView6 = this.animationView) === null || _this$animationView6 === void 0 ? void 0 : _this$animationView6.animationPhase.interpolate({
|
|
251
175
|
inputRange: [-2000, index - 1, index, index + 1, 2000],
|
|
@@ -253,18 +177,9 @@ export default class WmCarousel extends BaseComponent {
|
|
|
253
177
|
});
|
|
254
178
|
return /*#__PURE__*/React.createElement(Animated.View, {
|
|
255
179
|
key: this.generateItemKey(item, index, props),
|
|
256
|
-
|
|
257
|
-
onTouchEnd: () => {
|
|
258
|
-
var _this$animationView7;
|
|
259
|
-
this.onSlideChange(index + 1);
|
|
260
|
-
const position = this.slidesLayout.filter((l, i) => i < index).reduce((s, l) => s + l.width, 0);
|
|
261
|
-
(_this$animationView7 = this.animationView) === null || _this$animationView7 === void 0 ? void 0 : _this$animationView7.setPosition(-1 * position);
|
|
262
|
-
},
|
|
263
|
-
style: [{
|
|
264
|
-
height: props.type === 'dynamic' ? undefined : '100%'
|
|
265
|
-
}, this.styles.slide, index === 0 ? this.styles.firstSlide : null, index === data.length - 1 ? this.styles.lastSlide : null, isActive ? this.styles.activeSlide : null, translateX && scale ? {
|
|
180
|
+
style: [this.styles.slide, index === 0 ? this.styles.firstSlide : null, index === data.length - 1 ? this.styles.lastSlide : null, isActive ? this.styles.activeSlide : null, translateX && scale ? {
|
|
266
181
|
transform: [{
|
|
267
|
-
translateX:
|
|
182
|
+
translateX: translateX
|
|
268
183
|
}, {
|
|
269
184
|
scale: scale
|
|
270
185
|
}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","isArray","isUndefined","Animated","Easing","View","DefaultKeyExtractor","WmIcon","BaseComponent","BaseComponentState","SwipeAnimation","WmCarouselProps","DEFAULT_CLASS","WmCarouselState","constructor","arguments","_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","index","prevIndex","updateState","invokeEventCallback","animatePagination","item","type","renderSlide","children","dataset","length","_this$animationView","animationView","setPosition","_this$animationView2","goToUpper","_this$animationView3","goToLower","cleanup","push","stopPlay","addSlideLayout","nativeEvent","layout","forceUpdate","generateItemKey","itemkey","_showSkeleton","keyExtractor","getKey","autoPlay","animation","animationinterval","intervalId","setInterval","next","clearInterval","setTimeout","_this$animationView4","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","data","maxNoOfDots","maxnoofdots","minIndex","maxIndex","createElement","style","dotsWrapperStyle","flexDirection","map","key","activeDotStyle","undefined","height","transform","translateX","right","left","renderWidget","_data","_this$styles$slide","hasNavs","controls","hasDots","noOfSlides","slideScale","slideTranslateX","slide","_this$styles$slide2","_this$styles$slide3","find","o","root","_background","enableGestures","enablegestures","direction","ref","r","handlers","animationHandlers","slideWidth","_this$animationView5","_this$animationView6","isActive","animationPhase","interpolate","inputRange","outputRange","onLayout","bind","onTouchEnd","_this$animationView7","firstSlide","lastSlide","activeSlide","renderItem","btnPanel","iconclass","prevBtn","onTap","prev","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';\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 this.onSlideChange(this.state.activeIndex + 1);\n }\n } as SwipeAnimation.Handlers;\n\n constructor(props: WmCarouselProps) {\n super(props, DEFAULT_CLASS, new WmCarouselProps(), new WmCarouselState());\n this.cleanup.push(() => {\n this.stopPlay && this.stopPlay();\n })\n }\n\n addSlideLayout(index: number, nativeEvent: LayoutChangeEvent) {\n this.slidesLayout[index] = nativeEvent.nativeEvent.layout;\n if (index === this.state.activeIndex) {\n this.forceUpdate();\n }\n }\n\n private generateItemKey(item: any, index: number, props: WmCarouselProps) {\n if (props.itemkey && item && !this._showSkeleton) {\n return props.itemkey(item, index);\n }\n return 'list_item_' + this.keyExtractor.getKey(item, true);\n }\n\n autoPlay() {\n const props = this.state.props;\n this.stopPlay && this.stopPlay();\n if (props.animation === 'auto' && props.animationinterval) {\n const intervalId = setInterval(() => {\n this.next();\n }, props.animationinterval * 1000);\n this.stopPlay = () => clearInterval(intervalId);\n } else {\n setTimeout(() => {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n }, 1000);\n }\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'dataset': {\n this.keyExtractor?.clear();\n this.updateState({\n activeIndex: Math.min(this.state.activeIndex, $new?.length || 1)\n } as WmCarouselState);\n break;\n }\n case 'animation':\n case 'animationinterval' : {\n this.autoPlay();\n }\n }\n }\n\n animatePagination(index: number) {\n const prevIndex = this.state.activeIndex;\n const margin = ((this.styles.dotStyle?.marginLeft as number)|| 0) + \n ((this.styles.dotStyle?.marginRight as number)|| 0)\n const width = (this.styles.dotStyle?.width as number)|| 2;\n const size = margin + width;\n const position = Math.max(index - 1, 0) * size;\n const scale = Math.abs(index - prevIndex) * size;\n const options = {\n useNativeDriver: true,\n duration: 200,\n easing: Easing.out(Easing.linear)\n };\n if (prevIndex < index) {\n Animated.sequence([\n Animated.timing(this.dotScale, {\n toValue: scale,\n ...options\n }),\n Animated.parallel([\n Animated.timing(this.dotScale, {\n toValue: 0,\n ...options\n }),\n Animated.timing(this.dotPosition, {\n toValue: (this.isRTL ? -1: 1) * position,\n ...options\n })\n ])\n ]).start();\n } else if (prevIndex > index) {\n Animated.sequence([\n Animated.parallel([\n Animated.timing(this.dotScale, {\n toValue: scale,\n ...options\n }),\n Animated.timing(this.dotPosition, {\n toValue: (this.isRTL ? -1: 1) * position,\n ...options\n })\n ]),\n Animated.timing(this.dotScale, {\n toValue: 0,\n ...options\n }),\n ]).start();\n } \n }\n\n onSlideChange = (index: number) => {\n const prevIndex = this.state.activeIndex;\n this.updateState({\n activeIndex: index\n } as WmCarouselState,\n () => this.invokeEventCallback('onChange', [this, index, prevIndex]));\n this.animatePagination(index);\n }\n\n renderItem = (item: any, index: number) => {\n const props = this.state.props;\n if (props.type === 'dynamic') {\n return props.renderSlide ? props.renderSlide(item, index) : null;\n }\n return props.children[index];\n }\n\n next = () => {\n if (this.state.activeIndex >= this.state.props.dataset.length) {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n } else {\n this.animationView?.goToUpper();\n }\n }\n\n prev = () => {\n this.animationView?.goToLower();\n }\n\n renderPagination(data: any) {\n const maxNoOfDots = this.state.props.maxnoofdots;\n let minIndex = Math.max(this.state.activeIndex - maxNoOfDots + 1, 0);\n let maxIndex = Math.min(minIndex + maxNoOfDots - 1, data.length);\n if (maxIndex === data.length) {\n minIndex = maxIndex - maxNoOfDots;\n }\n return (<View style={this.styles.dotsWrapperStyle}>\n <View style={{flexDirection: this.isRTL ? 'row-reverse' : 'row'}}>\n {\n data.map((item: any, index: number) => {\n return index >= minIndex && index <= maxIndex ? (\n <View key={'dots_' + this.generateItemKey(item, index, this.state.props)} \n style={[this.styles.dotStyle]}>\n </View>) : null;\n })\n }\n <Animated.View style={[\n this.styles.dotStyle,\n this.styles.activeDotStyle, {\n width: undefined,\n height: undefined,\n transform: [{\n translateX: this.dotPosition\n }]\n }, this.isRTL ? { right: 0 } : { left: 0}]}>\n <Animated.View style={[{\n width: 1,\n height: 1\n }, {\n // This is failing in Android\n // minWidth: this.dotScale\n }]}>\n </Animated.View>\n </Animated.View>\n </View>\n </View>);\n }\n\n renderWidget(props: WmCarouselProps) {\n const hasNavs = props.controls === 'both' || props.controls ==='navs';\n const hasDots = props.controls === 'both' || props.controls ==='indicators';\n let styles = this.styles;\n let data = props.type === 'dynamic' ? props.dataset : props.children;\n data = isArray(data) ? data : [];\n this.noOfSlides = data?.length || 0;\n let slideScale = undefined as any;\n let slideTranslateX = undefined as any;\n if (isArray(this.styles.slide?.transform)) {\n slideScale = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).scale)) as any)?.scale;\n slideTranslateX = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).translateX)) as any)?.translateX;\n }\n // TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608\n return (\n <View style={styles.root}>\n {this._background}\n <SwipeAnimation.View \n enableGestures={props.enablegestures}\n style={{\n height: props.type === 'dynamic' ? undefined : '100%',\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\n slideWidth={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 onTouchEnd={() => {\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 }}\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 {this.renderItem(item, index)}\n </Animated.View>\n );\n })}\n </SwipeAnimation.View>\n {hasNavs ? (\n <View style={styles.btnPanel}>\n <WmIcon\n iconclass=\"wi wi-chevron-left fa-2x\"\n styles={styles.prevBtn}\n onTap={this.prev}/>\n <WmIcon\n iconclass=\"wi wi-chevron-right fa-2x\"\n styles={styles.nextBtn}\n onTap={this.next}/>\n </View>): null}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I,CAACwC,MAAM,CAAC6E,SAAS,GAAE,IAAI,EACvDV,QAAQ,GAAG,IAAI,CAACnE,MAAM,CAAC8E,WAAW,GAAE,IAAI,EACxCxC,UAAU,IAAI/B,KAAK,GAAG;UACpB8B,SAAS,EAAE,CACT;YACEC,UAAU,EAAE,CAACpI,WAAW,CAAC+I,eAAe,CAAC,GAAGA,eAAe,GAAGX;UAChE,CAAC,EAAE;YACD/B,KAAK,EAAEA;UACT,CAAC;QAEL,CAAC,GAAG,IAAI;MAAE,GACX,IAAI,CAACwE,UAAU,CAAC5H,IAAI,EAAEL,KAAK,CACf,CAAC;IAEpB,CAAC,CACkB,CAAC,EACrB8F,OAAO,gBACN5I,KAAA,CAAA4H,aAAA,CAACvH,IAAI;MAACwH,KAAK,EAAE7B,MAAM,CAACgF;IAAS,gBAC3BhL,KAAA,CAAA4H,aAAA,CAACrH,MAAM;MACL0K,SAAS,EAAC,0BAA0B;MACpCjF,MAAM,EAAEA,MAAM,CAACkF,OAAQ;MACvBC,KAAK,EAAE,IAAI,CAACC;IAAK,CAAC,CAAC,eACrBpL,KAAA,CAAA4H,aAAA,CAACrH,MAAM;MACL0K,SAAS,EAAC,2BAA2B;MACrCjF,MAAM,EAAEA,MAAM,CAACqF,OAAQ;MACvBF,KAAK,EAAE,IAAI,CAAClG;IAAK,CAAC,CAChB,CAAC,GAAG,IAAI,EACb6D,OAAO,IAAIvB,IAAI,GAAG,IAAI,CAACD,gBAAgB,CAACC,IAAI,CAAC,GAAG,IAC/C,CAAC;EACX;AACF"}
|
|
1
|
+
{"version":3,"names":["React","isArray","Animated","View","DefaultKeyExtractor","WmIcon","BaseComponent","BaseComponentState","SwipeAnimation","WmCarouselProps","DEFAULT_CLASS","WmCarouselState","constructor","arguments","_defineProperty","WmCarousel","props","bounds","e","_this$slideLayout","activeTabIndex","state","activeIndex","w","slideLayout","width","noOfTabs","dataset","length","lower","center","upper","computePhase","value","_this$slideLayout2","Math","abs","onLower","onSlideChange","onUpper","index","prevIndex","updateState","invokeEventCallback","item","type","renderSlide","children","_this$animationView","animationView","setPosition","_this$animationView2","goToUpper","_this$animationView3","goToLower","cleanup","push","stopPlay","generateItemKey","itemkey","_showSkeleton","keyExtractor","getKey","setSlideLayout","event","nativeEvent","layout","forceUpdate","autoPlay","animation","animationinterval","intervalId","setInterval","next","clearInterval","setTimeout","_this$animationView4","onPropertyChange","name","$new","$old","_this$keyExtractor","clear","min","renderPagination","data","maxNoOfDots","maxnoofdots","minIndex","max","maxIndex","createElement","style","styles","dotsWrapperStyle","map","key","dotStyle","activeDotStyle","renderWidget","_data","hasNavs","controls","hasDots","noOfSlides","root","onLayout","bind","_background","enableGestures","enablegestures","flexDirection","flexWrap","alignItems","direction","ref","r","handlers","animationHandlers","_this$animationView5","_this$animationView6","isActive","scale","animationPhase","interpolate","inputRange","outputRange","translateX","slide","firstSlide","lastSlide","activeSlide","transform","renderItem","btnPanel","iconclass","prevBtn","onTap","prev","nextBtn"],"sources":["carousel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { isArray } from 'lodash-es';\nimport { Animated, View, Text, 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';\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 slideLayout: LayoutRectangle = null as any;\n private keyExtractor = new DefaultKeyExtractor();\n stopPlay: Function = null as any;\n private animationView: SwipeAnimation.View | null = null as any;\n private animationHandlers = {\n bounds: (e) => {\n const activeTabIndex = this.state.activeIndex - 1,\n w = this.slideLayout?.width || 0,\n noOfTabs = this.state.props.dataset.length;\n return {\n lower: -1 * (activeTabIndex - (activeTabIndex === 0 ? 0 : 1)) * w,\n center: -1 * activeTabIndex * w,\n upper: -1 * (activeTabIndex + (activeTabIndex === noOfTabs - 1 ? 0 : 1)) * w\n };\n },\n computePhase: (value) => {\n const w = this.slideLayout?.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 this.onSlideChange(this.state.activeIndex + 1);\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 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 setSlideLayout(event: LayoutChangeEvent) {\n this.slideLayout = event.nativeEvent.layout;\n this.forceUpdate();\n }\n\n autoPlay() {\n const props = this.state.props;\n this.stopPlay && this.stopPlay();\n if (props.animation === 'auto' && props.animationinterval) {\n const intervalId = setInterval(() => {\n this.next();\n }, props.animationinterval * 1000);\n this.stopPlay = () => clearInterval(intervalId);\n } else {\n setTimeout(() => {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n }, 1000);\n }\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'dataset': {\n this.keyExtractor?.clear();\n this.updateState({\n activeIndex: Math.min(this.state.activeIndex, $new?.length || 0)\n } as WmCarouselState);\n break;\n }\n case 'animation':\n case 'animationinterval' : {\n this.autoPlay();\n }\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 }\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) : null;\n }\n return props.children[index];\n }\n\n next = () => {\n if (this.state.activeIndex >= this.state.props.dataset.length) {\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 {\n data.map((item: any, index: number) => {\n return index >= minIndex && index <= maxIndex ? (\n <View key={'dots_' + this.generateItemKey(item, index, this.state.props)} \n style={[\n this.styles.dotStyle,\n index === this.state.activeIndex - 1 ? this.styles.activeDotStyle: null]}>\n </View>) : null;\n })\n }\n </View>);\n }\n\n renderWidget(props: WmCarouselProps) {\n const hasNavs = props.controls === 'both' || props.controls ==='navs';\n const hasDots = props.controls === 'both' || props.controls ==='indicators';\n let styles = this.styles;\n let data = props.type === 'dynamic' ? props.dataset : props.children;\n data = isArray(data) ? data : [];\n this.noOfSlides = data?.length || 0;\n // 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} onLayout={this.setSlideLayout.bind(this)}>\n {this._background}\n <SwipeAnimation.View \n enableGestures={props.enablegestures}\n style={{\n flexDirection: 'row',\n flexWrap: 'nowrap',\n alignItems: 'center'\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\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: [0.8, 0.8, 1, 0.8, 0.8]\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 style={[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: translateX\n },\n {\n scale: scale\n }\n ]\n } : null]}>\n {this.renderItem(item, index)}\n </Animated.View>\n );\n })}\n </SwipeAnimation.View>\n {hasNavs ? (\n <View style={styles.btnPanel}>\n <WmIcon\n iconclass=\"wi wi-chevron-left fa-2x\"\n styles={styles.prevBtn}\n onTap={this.prev}/>\n <WmIcon\n iconclass=\"wi wi-chevron-right fa-2x\"\n styles={styles.nextBtn}\n onTap={this.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,QAAQ,WAAW;AACnC,SAASC,QAAQ,EAAEC,IAAI,QAAkD,cAAc;AACvF,SAASC,mBAAmB,QAAQ,8CAA8C;AAClF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAO,KAAKC,cAAc,MAAM,oDAAoD;AAEpF,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AAEnE,OAAO,MAAMC,eAAe,SAASJ,kBAAkB,CAAkB;EAAAK,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,sBACzD,CAAC;EAAA;AACjB;AAEA,eAAe,MAAMC,UAAU,SAAST,aAAa,CAAqD;EA8BxGM,WAAWA,CAACI,MAAsB,EAAE;IAClC,KAAK,CAACA,MAAK,EAAEN,aAAa,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kI,SAAS,EAAC,2BAA2B;MACrC1C,MAAM,EAAEA,MAAM,CAAC8C,OAAQ;MACvBF,KAAK,EAAE,IAAI,CAAChE;IAAK,CAAC,CAChB,CAAC,GAAG,IAAI,EACb8B,OAAO,IAAIlB,IAAI,GAAG,IAAI,CAACD,gBAAgB,CAACC,IAAI,CAAC,GAAG,IAC/C,CAAC;EACX;AACF"}
|
|
@@ -17,10 +17,9 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
17
17
|
text: {},
|
|
18
18
|
slide: {
|
|
19
19
|
width: '100%',
|
|
20
|
-
overflow: 'hidden',
|
|
21
20
|
paddingHorizontal: 16,
|
|
22
21
|
transform: [{
|
|
23
|
-
|
|
22
|
+
translateX: 0
|
|
24
23
|
}]
|
|
25
24
|
},
|
|
26
25
|
firstSlide: {},
|
|
@@ -72,18 +71,15 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
72
71
|
paddingBottom: 4
|
|
73
72
|
},
|
|
74
73
|
activeDotStyle: {
|
|
75
|
-
position: 'absolute',
|
|
76
74
|
backgroundColor: themeVariables.carouselActiveDotColor,
|
|
77
|
-
opacity: 1
|
|
78
|
-
padding: 4
|
|
75
|
+
opacity: 1
|
|
79
76
|
},
|
|
80
77
|
dotStyle: {
|
|
81
78
|
width: 8,
|
|
82
79
|
height: 8,
|
|
83
80
|
borderRadius: 10,
|
|
84
81
|
opacity: 0.2,
|
|
85
|
-
|
|
86
|
-
marginRight: 2,
|
|
82
|
+
marginHorizontal: 2,
|
|
87
83
|
backgroundColor: themeVariables.carouselDotColor
|
|
88
84
|
}
|
|
89
85
|
});
|
|
@@ -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","text","slide","
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","btn","height","width","borderRadius","borderColor","transparent","borderWidth","justifyContent","defaultStyles","root","position","text","slide","paddingHorizontal","transform","translateX","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","dotStyle","marginHorizontal","carouselDotColor","rotateY","defaultColorF","right","padding","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 },\n text: {},\n slide: {\n width: '100%',\n paddingHorizontal: 16,\n transform: [\n {\n translateX: 0\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 },\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 },\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 backgroundColor: themeVariables.carouselActiveDotColor,\n opacity: 1\n },\n dotStyle: {\n width: 8,\n height: 8,\n borderRadius: 10,\n opacity: 0.2,\n marginHorizontal: 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;IACd,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,KAAK,EAAE;MACHV,KAAK,EAAE,MAAM;MACbW,iBAAiB,EAAE,EAAE;MACrBC,SAAS,EAAE,CACP;QACIC,UAAU,EAAE;MAChB,CAAC;IAET,CAAC;IACDC,UAAU,EAAE,CAAC,CAAC;IACdC,SAAS,EAAE,CAAC,CAAC;IACbC,WAAW,EAAE,CAAC,CAAC;IACfC,QAAQ,EAAE;MACNT,QAAQ,EAAE,UAAU;MACpBU,GAAG,EAAE,KAAK;MACVC,SAAS,EAAE,CAAC,EAAE;MACdpB,MAAM,EAAE,EAAE;MACVqB,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,QAAQ;MACpBhB,cAAc,EAAE,eAAe;MAC/BL,KAAK,EAAE;IACX,CAAC;IACDsB,OAAO,EAAG;MACNf,IAAI,EAAE;QACFgB,UAAU,EAAE,EAAE;QACd,GAAGzB,GAAG;QACN0B,eAAe,EAAE5B,cAA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ponent {
|
|
|
57
57
|
style: [this.styles.text, {
|
|
58
58
|
color: props.isValid === false ? 'red' : this.styles.text.color
|
|
59
59
|
}],
|
|
60
|
-
|
|
61
|
-
numberOfLines: props.wrap ? undefined : props.nooflines,
|
|
60
|
+
numberOfLines: props.wrap ? undefined : 1,
|
|
62
61
|
selectable: this.styles.text.userSelect === 'text'
|
|
63
62
|
}, toString(props.caption), props.required && this.getAsterisk()))) : null;
|
|
64
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","WmLabelProps","DEFAULT_CLASS","isNil","toString","Animatedview","createSkeleton","WmLabelState","WmLabel","constructor","props","getAsterisk","createElement","style","styles","asterisk","getMultilineSkeleton","width","height","borderRadius","marginBottom","theme","skeleton","renderSkeleton","_this$styles$root","_this$styles$root2","skeletonWidth","skeletonwidth","root","skeletonHeight","skeletonheight","text","fontSize","multilineskeleton","renderWidget","caption","entryanimation","animation","_background","target","color","isValid","
|
|
1
|
+
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","WmLabelProps","DEFAULT_CLASS","isNil","toString","Animatedview","createSkeleton","WmLabelState","WmLabel","constructor","props","getAsterisk","createElement","style","styles","asterisk","getMultilineSkeleton","width","height","borderRadius","marginBottom","theme","skeleton","renderSkeleton","_this$styles$root","_this$styles$root2","skeletonWidth","skeletonwidth","root","skeletonHeight","skeletonheight","text","fontSize","multilineskeleton","renderWidget","caption","entryanimation","animation","_background","target","color","isValid","numberOfLines","wrap","undefined","selectable","userSelect","required"],"sources":["label.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';\n\nimport WmLabelProps from './label.props';\nimport { DEFAULT_CLASS, WmLabelStyles } from './label.styles';\nimport { isNil, toString } from 'lodash-es';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\nimport { totalMonths } from 'react-native-paper-dates/lib/typescript/Date/dateUtils';\n\nexport class WmLabelState extends BaseComponentState<WmLabelProps> {\n\n}\n\nexport default class WmLabel extends BaseComponent<WmLabelProps, WmLabelState, WmLabelStyles> {\n\n constructor(props: WmLabelProps) {\n super(props, DEFAULT_CLASS, new WmLabelProps());\n }\n\n private getAsterisk () {\n return <Text style={this.styles.asterisk}>*</Text>;\n }\n\n private getMultilineSkeleton(width: any, height: any) {\n const styles = {\n borderRadius:4,\n marginBottom: 10,\n height: height\n };\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...styles,\n width: width,\n height: height\n });\n }\n\n public renderSkeleton(props: WmLabelProps){\n const skeletonWidth = this.props.skeletonwidth || this.styles.root?.width;\n const skeletonHeight = this.props.skeletonheight || this.styles.root?.height || this.styles.text.fontSize;\n if(this.props.multilineskeleton) {\n return (<View style={{\n width: skeletonWidth as DimensionValue\n }}>\n {this.getMultilineSkeleton('100%', skeletonHeight)}\n {this.getMultilineSkeleton('70%', skeletonHeight)}\n {this.getMultilineSkeleton('40%', skeletonHeight)}\n </View>)\n }\n else{\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\n renderWidget(props: WmLabelProps) {\n return !isNil(props.caption)? (\n <Animatedview entryanimation={props.animation} style={this.styles.root}>\n {this._background}\n <Tappable target={this}>\n <Text\n style={[this.styles.text, \n {color: props.isValid === false ? 'red' : this.styles.text.color}]}\n numberOfLines={props.wrap ? undefined : 1}\n selectable={this.styles.text.userSelect === 'text'}>\n {toString(props.caption)}\n {props.required && this.getAsterisk()}\n </Text>\n </Tappable>\n </Animatedview>\n ): null;\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,EAAEC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AAM,CAACiB,IAAI,CAACS;MAAK,CAAC,CAAE;MACrEE,aAAa,EAAEhC,KAAK,CAACiC,IAAI,GAAGC,SAAS,GAAG,CAAE;MAC1CC,UAAU,EAAE,IAAI,CAAC/B,MAAM,CAACiB,IAAI,CAACe,UAAU,KAAK;IAAO,GAClD1C,QAAQ,CAACM,KAAK,CAACyB,OAAO,CAAC,EACvBzB,KAAK,CAACqC,QAAQ,IAAI,IAAI,CAACpC,WAAW,CAAC,CAChC,CACA,CACE,CAAC,GACd,IAAI;EACT;AACF"}
|
|
@@ -13,7 +13,6 @@ export default class WmLabelProps extends BaseProps {
|
|
|
13
13
|
_defineProperty(this, "skeletonheight", null);
|
|
14
14
|
_defineProperty(this, "skeletonwidth", null);
|
|
15
15
|
_defineProperty(this, "multilineskeleton", false);
|
|
16
|
-
_defineProperty(this, "nooflines", 1);
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
18
|
//# sourceMappingURL=label.props.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseProps","WmLabelProps","constructor","arguments","_defineProperty"],"sources":["label.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmLabelProps extends BaseProps {\n animation?: string = null as any;\n caption?: string = 'Label';\n required?: boolean = null as any;\n isValid?: boolean = true;\n wrap?: boolean = true;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n multilineskeleton?: boolean = false;\n
|
|
1
|
+
{"version":3,"names":["BaseProps","WmLabelProps","constructor","arguments","_defineProperty"],"sources":["label.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmLabelProps extends BaseProps {\n animation?: string = null as any;\n caption?: string = 'Label';\n required?: boolean = null as any;\n isValid?: boolean = true;\n wrap?: boolean = true;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n multilineskeleton?: boolean = false;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,YAAY,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBAC3B,IAAI;IAAAA,eAAA,kBACN,OAAO;IAAAA,eAAA,mBACL,IAAI;IAAAA,eAAA,kBACL,IAAI;IAAAA,eAAA,eACP,IAAI;IAAAA,eAAA,yBACK,IAAI;IAAAA,eAAA,wBACL,IAAI;IAAAA,eAAA,4BACC,KAAK;EAAA;AACvC"}
|
|
@@ -2,14 +2,12 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
2
2
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
3
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import Color from "color";
|
|
6
5
|
import { View } from 'react-native';
|
|
7
6
|
import { Defs, LinearGradient, Stop, Svg } from 'react-native-svg';
|
|
8
7
|
import { VictoryArea, VictoryChart, VictoryLegend, VictoryStack, VictoryScatter, VictoryGroup } from "victory-native";
|
|
9
8
|
import WmAreaChartProps from './area-chart.props';
|
|
10
9
|
import { DEFAULT_CLASS } from './area-chart.styles';
|
|
11
10
|
import { BaseChartComponent, BaseChartComponentState } from "@wavemaker/app-rn-runtime/components/chart/basechart.component";
|
|
12
|
-
import { isNumber } from 'lodash-es';
|
|
13
11
|
export class WmAreaChartState extends BaseChartComponentState {
|
|
14
12
|
constructor() {
|
|
15
13
|
super(...arguments);
|
|
@@ -32,14 +30,10 @@ export default class WmAreaChart extends BaseChartComponent {
|
|
|
32
30
|
return null;
|
|
33
31
|
}
|
|
34
32
|
let mindomain = {
|
|
35
|
-
x: props.xdomain === 'Min' ? this.state.chartMinX : undefined,
|
|
36
|
-
y: props.ydomain === 'Min' ? this.state.chartMinY : undefined
|
|
33
|
+
x: this.props.xdomain === 'Min' ? this.state.chartMinX : undefined,
|
|
34
|
+
y: this.props.ydomain === 'Min' ? this.state.chartMinY : undefined
|
|
37
35
|
};
|
|
38
36
|
const chartName = this.props.name ?? 'nonameAreachart';
|
|
39
|
-
let gradientStop = '100%';
|
|
40
|
-
if (isNumber(this.state.chartMaxY) && isNumber(this.state.chartMinY) && this.state.chartMaxY > 0) {
|
|
41
|
-
gradientStop = (this.state.chartMaxY - this.state.chartMinY) * 100 / this.state.chartMaxY + '%';
|
|
42
|
-
}
|
|
43
37
|
return /*#__PURE__*/React.createElement(View, {
|
|
44
38
|
style: this.styles.root,
|
|
45
39
|
onLayout: this.onViewLayoutChange.bind(this)
|
|
@@ -51,7 +45,7 @@ export default class WmAreaChart extends BaseChartComponent {
|
|
|
51
45
|
top: 70,
|
|
52
46
|
bottom: 50,
|
|
53
47
|
left: 50,
|
|
54
|
-
right:
|
|
48
|
+
right: 50
|
|
55
49
|
},
|
|
56
50
|
minDomain: mindomain
|
|
57
51
|
}, /*#__PURE__*/React.createElement(VictoryLegend, {
|
|
@@ -73,18 +67,18 @@ export default class WmAreaChart extends BaseChartComponent {
|
|
|
73
67
|
y2: "100%"
|
|
74
68
|
}, /*#__PURE__*/React.createElement(Stop, {
|
|
75
69
|
offset: "0%",
|
|
76
|
-
stopColor:
|
|
70
|
+
stopColor: this.state.colors[i]
|
|
77
71
|
}), /*#__PURE__*/React.createElement(Stop, {
|
|
78
|
-
offset:
|
|
79
|
-
stopColor:
|
|
72
|
+
offset: "100%",
|
|
73
|
+
stopColor: '#ffffff00',
|
|
74
|
+
stopOpacity: "0"
|
|
80
75
|
}))), /*#__PURE__*/React.createElement(VictoryArea, {
|
|
81
76
|
interpolation: props.interpolation,
|
|
82
77
|
key: props.name + '_' + i,
|
|
83
78
|
style: {
|
|
84
79
|
data: {
|
|
85
80
|
fill: `url(#${chartName}Gradient${i})`,
|
|
86
|
-
stroke: this.state.colors[i]
|
|
87
|
-
strokeWidth: props.linethickness
|
|
81
|
+
stroke: this.state.colors[i]
|
|
88
82
|
}
|
|
89
83
|
},
|
|
90
84
|
data: d
|
|
@@ -93,7 +87,8 @@ export default class WmAreaChart extends BaseChartComponent {
|
|
|
93
87
|
key: props.name + '_scatter' + i,
|
|
94
88
|
style: {
|
|
95
89
|
data: {
|
|
96
|
-
fill:
|
|
90
|
+
fill: this.state.colors[i],
|
|
91
|
+
opacity: 0.8
|
|
97
92
|
}
|
|
98
93
|
},
|
|
99
94
|
data: d
|