react-native-my-survey-sdk 3.0.3 → 3.0.5
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XeboRatingView.d.ts","sourceRoot":"","sources":["../../src/components/XeboRatingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAWhD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGhE,UAAU,KAAK;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;CACxC;
|
|
1
|
+
{"version":3,"file":"XeboRatingView.d.ts","sourceRoot":"","sources":["../../src/components/XeboRatingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAWhD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGhE,UAAU,KAAK;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;CACxC;AA0JD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA6I1C,CAAC"}
|
|
@@ -83,43 +83,69 @@ function FlatEmoji({ index, selected }) {
|
|
|
83
83
|
}
|
|
84
84
|
function RatingIcon({ style, index, selected, filled, color, }) {
|
|
85
85
|
const activeColor = color || '#F59E0B';
|
|
86
|
-
const inactive = '#E5E7EB';
|
|
87
86
|
switch (style) {
|
|
88
|
-
case 'heart':
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
case 'heart': {
|
|
88
|
+
// View-based heart: filled = solid colored circle, unfilled = outlined circle
|
|
89
|
+
return (<react_native_1.View style={{
|
|
90
|
+
width: 40, height: 40, borderRadius: 20,
|
|
91
|
+
backgroundColor: filled ? activeColor : 'transparent',
|
|
92
|
+
borderWidth: filled ? 0 : 2,
|
|
93
|
+
borderColor: activeColor,
|
|
94
|
+
opacity: filled ? 1 : 0.4,
|
|
95
|
+
}}/>);
|
|
96
|
+
}
|
|
92
97
|
case 'circle':
|
|
93
98
|
return (<react_native_1.View style={{
|
|
94
99
|
width: 38,
|
|
95
100
|
height: 38,
|
|
96
101
|
borderRadius: 19,
|
|
97
|
-
backgroundColor: filled ? activeColor :
|
|
98
|
-
borderWidth:
|
|
99
|
-
borderColor: '#D1D5DB',
|
|
102
|
+
backgroundColor: filled ? activeColor : 'transparent',
|
|
103
|
+
borderWidth: 2,
|
|
104
|
+
borderColor: filled ? activeColor : '#D1D5DB',
|
|
100
105
|
}}/>);
|
|
101
106
|
case 'tile':
|
|
102
107
|
return (<react_native_1.View style={{
|
|
103
|
-
width:
|
|
104
|
-
height:
|
|
105
|
-
borderRadius:
|
|
106
|
-
backgroundColor: filled ? activeColor :
|
|
108
|
+
width: 44,
|
|
109
|
+
height: 44,
|
|
110
|
+
borderRadius: 8,
|
|
111
|
+
backgroundColor: filled ? activeColor : '#F3F4F6',
|
|
112
|
+
borderWidth: filled ? 0 : 1.5,
|
|
113
|
+
borderColor: '#D1D5DB',
|
|
107
114
|
alignItems: 'center',
|
|
108
115
|
justifyContent: 'center',
|
|
109
116
|
}}>
|
|
110
|
-
<react_native_1.Text style={{ fontSize:
|
|
117
|
+
<react_native_1.Text style={{ fontSize: 15, fontWeight: '700', color: filled ? '#FFF' : '#6B7280' }}>
|
|
111
118
|
{index + 1}
|
|
112
119
|
</react_native_1.Text>
|
|
113
120
|
</react_native_1.View>);
|
|
114
121
|
case 'emoji':
|
|
115
122
|
case 'flat_emoji':
|
|
116
123
|
case 'flatEmoji':
|
|
124
|
+
case 'smiley':
|
|
125
|
+
case 'smileys':
|
|
126
|
+
case 'faces':
|
|
127
|
+
return <FlatEmoji index={index} selected={selected}/>;
|
|
128
|
+
case '3d_emoji': {
|
|
129
|
+
// Use FlatEmoji (View-based) — reliable on all iOS versions
|
|
117
130
|
return <FlatEmoji index={index} selected={selected}/>;
|
|
131
|
+
}
|
|
118
132
|
case 'star':
|
|
119
|
-
default:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
133
|
+
default: {
|
|
134
|
+
// View-based star alternative: filled/outlined circles with a consistent look
|
|
135
|
+
return (<react_native_1.View style={{
|
|
136
|
+
width: 44, height: 44, borderRadius: 22,
|
|
137
|
+
backgroundColor: filled ? activeColor : 'transparent',
|
|
138
|
+
borderWidth: 2,
|
|
139
|
+
borderColor: filled ? activeColor : '#D1D5DB',
|
|
140
|
+
alignItems: 'center',
|
|
141
|
+
justifyContent: 'center',
|
|
142
|
+
}}>
|
|
143
|
+
{filled && (<react_native_1.View style={{
|
|
144
|
+
width: 16, height: 16, borderRadius: 8,
|
|
145
|
+
backgroundColor: '#FFF',
|
|
146
|
+
}}/>)}
|
|
147
|
+
</react_native_1.View>);
|
|
148
|
+
}
|
|
123
149
|
}
|
|
124
150
|
}
|
|
125
151
|
const XeboRatingView = ({ question, isLastQuestion, onAnswer }) => {
|
|
@@ -180,7 +206,7 @@ const XeboRatingView = ({ question, isLastQuestion, onAnswer }) => {
|
|
|
180
206
|
{Array.from({ length: totalSteps }, (_, i) => {
|
|
181
207
|
const isFilled = isCumulative ? selected !== null && i <= selected : i === selected;
|
|
182
208
|
return (<react_native_1.TouchableOpacity key={i} onPress={() => handleSelect(i)} style={styles.iconButton} activeOpacity={0.7}>
|
|
183
|
-
<RatingIcon style={ratingStyle} index={i} selected={i === selected} filled={isFilled} color={ratingColor}/>
|
|
209
|
+
<RatingIcon style={ratingStyle} index={i} selected={i === selected} filled={isFilled} color={ratingColor} totalSteps={totalSteps}/>
|
|
184
210
|
</react_native_1.TouchableOpacity>);
|
|
185
211
|
})}
|
|
186
212
|
</react_native_1.View>
|
|
@@ -222,7 +248,7 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
222
248
|
scrollContent: { paddingTop: 16, paddingBottom: 8 },
|
|
223
249
|
title: { fontSize: 18, fontWeight: '700', marginBottom: 16 },
|
|
224
250
|
subtitle: { fontSize: 14, opacity: 0.6, marginBottom: 16 },
|
|
225
|
-
iconsRow: { flexDirection: 'row', marginTop: 4, marginBottom: 20, flexWrap: 'nowrap', justifyContent: '
|
|
251
|
+
iconsRow: { flexDirection: 'row', marginTop: 4, marginBottom: 20, flexWrap: 'nowrap', justifyContent: 'center', gap: 12 },
|
|
226
252
|
iconButton: { alignItems: 'center', justifyContent: 'center' },
|
|
227
253
|
colLabels: {
|
|
228
254
|
flexDirection: 'row',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XeboNetworkService.d.ts","sourceRoot":"","sources":["../../src/core/XeboNetworkService.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAKV,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,cAAc,EACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,iBAAiB,EAGlB,MAAM,yBAAyB,CAAC;AAIjC,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAID,wBAAsB,YAAY,CAChC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,CAqCjB;AAID,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAWzD;
|
|
1
|
+
{"version":3,"file":"XeboNetworkService.d.ts","sourceRoot":"","sources":["../../src/core/XeboNetworkService.ts"],"names":[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