@originallyus/feedback-rn-sdk 3.1.1 → 3.1.2-beta.2

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.
Files changed (59) hide show
  1. package/lib/commonjs/api/index.js +1 -1
  2. package/lib/commonjs/index.js +1 -1
  3. package/lib/commonjs/package.json +1 -0
  4. package/lib/commonjs/utils/MyFunction.js +1 -1
  5. package/lib/commonjs/utils/NetworkHelper.js +1 -1
  6. package/lib/commonjs/utils/const.js +1 -1
  7. package/lib/module/ContentUsefulness.js +302 -0
  8. package/lib/module/ContentUsefulness.js.map +1 -0
  9. package/lib/module/FeedbackSDK.js +461 -0
  10. package/lib/module/FeedbackSDK.js.map +1 -0
  11. package/lib/module/FeedbackSDKForm.js +280 -0
  12. package/lib/module/FeedbackSDKForm.js.map +1 -0
  13. package/lib/module/FeedbackSDKSplash.js +60 -0
  14. package/lib/module/FeedbackSDKSplash.js.map +1 -0
  15. package/lib/module/FeedbackSDKStyles.js +357 -0
  16. package/lib/module/FeedbackSDKStyles.js.map +1 -0
  17. package/lib/module/FeedbackSDKSuccess.js +57 -0
  18. package/lib/module/FeedbackSDKSuccess.js.map +1 -0
  19. package/lib/module/assets/CheckIcon.js +21 -0
  20. package/lib/module/assets/CheckIcon.js.map +1 -0
  21. package/lib/module/assets/CloseIcon.js +21 -0
  22. package/lib/module/assets/CloseIcon.js.map +1 -0
  23. package/lib/module/assets/ErrorIcon.js +23 -0
  24. package/lib/module/assets/ErrorIcon.js.map +1 -0
  25. package/lib/module/assets/PlusIcon.js +21 -0
  26. package/lib/module/assets/PlusIcon.js.map +1 -0
  27. package/lib/module/assets/StarIcon.js +21 -0
  28. package/lib/module/assets/StarIcon.js.map +1 -0
  29. package/lib/module/component/Button.js +49 -0
  30. package/lib/module/component/Button.js.map +1 -0
  31. package/lib/module/component/ButtonSubmit.js +196 -0
  32. package/lib/module/component/ButtonSubmit.js.map +1 -0
  33. package/lib/module/component/Input.js +174 -0
  34. package/lib/module/component/Input.js.map +1 -0
  35. package/lib/module/component/MultiSelectButtons.js +186 -0
  36. package/lib/module/component/MultiSelectButtons.js.map +1 -0
  37. package/lib/module/component/README.md +215 -0
  38. package/lib/module/component/Rating.js +169 -0
  39. package/lib/module/component/Rating.js.map +1 -0
  40. package/lib/module/component/RatingNumber.js +289 -0
  41. package/lib/module/component/RatingNumber.js.map +1 -0
  42. package/lib/module/component/Textarea.js +167 -0
  43. package/lib/module/component/Textarea.js.map +1 -0
  44. package/lib/module/component/YesNoButtons.js +185 -0
  45. package/lib/module/component/YesNoButtons.js.map +1 -0
  46. package/lib/module/index.js +13 -0
  47. package/lib/module/index.js.map +1 -0
  48. package/lib/module/package.json +1 -0
  49. package/lib/module/service/feedbackService.js +77 -0
  50. package/lib/module/service/feedbackService.js.map +1 -0
  51. package/lib/module/utils/common.js +240 -0
  52. package/lib/module/utils/common.js.map +1 -0
  53. package/lib/module/utils/constants.js +49 -0
  54. package/lib/module/utils/constants.js.map +1 -0
  55. package/lib/module/utils/index.js +140 -0
  56. package/lib/module/utils/index.js.map +1 -0
  57. package/lib/module/utils/networking.js +164 -0
  58. package/lib/module/utils/networking.js.map +1 -0
  59. package/package.json +10 -120
@@ -0,0 +1,215 @@
1
+ # Components – Props reference
2
+
3
+ Documentation for all components and their props in `@originallyus/feedback-rn-sdk`. Tables: **Prop** | **Type** | **Default** | **Description**.
4
+
5
+ ---
6
+
7
+ ## Button
8
+
9
+ Basic pressable button (Pressable + Text).
10
+
11
+ | Prop | Type | Default | Description |
12
+ | ----------- | ------------ | ------- | --------------------------------------- |
13
+ | `title` | `string` | — | **Required.** Text shown on the button. |
14
+ | `onPress` | `() => void` | — | **Required.** Callback when pressed. |
15
+ | `disabled` | `boolean` | `false` | Disables the button. |
16
+ | `style` | `ViewStyle` | — | Style for the button container. |
17
+ | `textStyle` | `TextStyle` | — | Style for the label text. |
18
+
19
+ ---
20
+
21
+ ## ButtonSubmit
22
+
23
+ Submit button for forms: primary (red background) or secondary (red border + red text, light pink background). Supports loading state, left icon, and full width or content-based width.
24
+
25
+ | Prop | Type | Default | Description |
26
+ | ------------------------- | -------------------------- | ----------- | ----------------------------------------------------------------------- |
27
+ | `onPress` | `() => void` | — | **Required.** Callback when pressed. |
28
+ | `title` | `string` | — | **Required.** Button label. |
29
+ | `leftIcon` | `string` | — | Character shown to the left of the title (e.g. `"+"`, `"✓"`). |
30
+ | `variant` | `'primary' \| 'secondary'` | `'primary'` | primary = red background; secondary = red border + text, light pink bg. |
31
+ | `fullWidth` | `boolean` | `true` | `true` = full width, `false` = width by content. |
32
+ | `disabled` | `boolean` | `false` | Disables the button. |
33
+ | `loading` | `boolean` | `false` | Shows ActivityIndicator and blocks press. |
34
+ | `appWidth` | `number` | — | **Required.** Screen width (used for margin). |
35
+ | `isTabletInstrusive` | `boolean` | — | On tablet: fixed 200px width instead of full width. |
36
+ | `fontFamily` | `string` | — | Font family. |
37
+ | `fontSize` | `number` | `16` | Font size. |
38
+ | `textColor` | `string` | — | Text color (primary = white, secondary = red). |
39
+ | `backgroundColor` | `string` | — | Background color. |
40
+ | `pressedColor` | `string` | — | Color when pressed. |
41
+ | `disabledBackgroundColor` | `string` | — | Background color when disabled. |
42
+ | `disabledTextColor` | `string` | — | Text color when disabled. |
43
+ | `borderColor` | `string` | — | Border color (secondary variant). |
44
+ | `containerStyle` | `ViewStyle` | — | Style for the wrapper view. |
45
+ | `style` | `ViewStyle` | — | Style for the Pressable. |
46
+ | `textStyle` | `TextStyle` | — | Style for the text. |
47
+
48
+ ---
49
+
50
+ ## RatingNumber
51
+
52
+ Numeric rating scale: a row of buttons from `rating_min` to `rating_max` with optional left/right labels. Buttons are full width per device; supports size presets and compact mode.
53
+
54
+ | Prop | Type | Default | Description |
55
+ | ------------------------------------- | -------------------------------- | ----------- | ------------------------------------------------------- |
56
+ | `scale_label_color` | `string` | — | **Required.** Text color for left/right labels. |
57
+ | `scale_label_left` | `string` | — | Left label (e.g. "Strongly disagree"). |
58
+ | `scale_label_right` | `string` | — | Right label (e.g. "Strongly agree"). |
59
+ | `scale_label_font` | `string` | — | Font for labels. |
60
+ | `scale_label_fontsize` | `number` | — | Font size for labels. |
61
+ | `handlePressRating` | `(rating: number) => void` | — | **Required.** Callback when a number is selected. |
62
+ | `numStar` | `number` | — | **Required.** Currently selected value. |
63
+ | `rating_min` | `number` | — | **Required.** Minimum value. |
64
+ | `rating_max` | `number` | — | **Required.** Maximum value. |
65
+ | `appWidth` | `number` | — | **Required.** App width (for layout). |
66
+ | `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Preset for height and spacing. |
67
+ | `compact` | `boolean` | `true` | `true` = no gap between buttons; `false` = gap between. |
68
+ | `error` | `string` | — | Error message; red border on buttons and text below. |
69
+ | `errorBorderColor` | `string` | `'#D32F2F'` | Border color when error is set. |
70
+ | `rating_number_font` | `string` | — | Font for the number inside each button. |
71
+ | `rating_number_fontsize` | `number` | — | Font size for the number. |
72
+ | `rating_number_bg_color` | `string` | — | Background color when not selected. |
73
+ | `rating_number_border_color` | `string` | — | Border color when not selected. |
74
+ | `rating_number_selected_bg_color` | `string` | — | Background color when selected (default #082065). |
75
+ | `rating_number_selected_border_color` | `string` | — | Border color when selected. |
76
+ | `rating_number_selected_text_color` | `string` | — | Text color when selected. |
77
+ | `rating_number_text_color` | `string` | — | Text color when not selected. |
78
+ | `errorStyle` | `TextStyle` | — | Style for the error text. |
79
+
80
+ ---
81
+
82
+ ## Rating
83
+
84
+ Star rating block: title, question/subtitle, and a row of tappable stars (1–5 by default). Uses `RatingStar` internally. Selected stars are filled (e.g. golden), unselected are grey. Optional error message below.
85
+
86
+ | Prop | Type | Default | Description |
87
+ | ------------------- | -------------------------- | ---------------------------------- | ------------------------------------------------- |
88
+ | `title` | `string` | `'Help us get better'` | Main heading above the question. |
89
+ | `question` | `string` | `'How was your experience today?'` | Subtitle or question text. |
90
+ | `value` | `number` | — | **Required.** Current star value (1..rating_max). |
91
+ | `onRate` | `(rating: number) => void` | — | **Required.** Callback when user selects a star. |
92
+ | `rating_min` | `number` | `1` | Minimum star value. |
93
+ | `rating_max` | `number` | `5` | Maximum star value. |
94
+ | `disabled` | `boolean` | `false` | Disables star taps. |
95
+ | `error` | `string` | — | Error message; shown below the stars. |
96
+ | `normalStarColor` | `string` | `'#D0D0D0'` | Color for unselected stars. |
97
+ | `selectedStarColor` | `string` | `'#FFC107'` | Color for selected stars (e.g. golden). |
98
+ | `titleStyle` | `TextStyle` | — | Style for the title. |
99
+ | `questionStyle` | `TextStyle` | — | Style for the question. |
100
+ | `errorStyle` | `TextStyle` | — | Style for the error text. |
101
+ | `style` | `ViewStyle` | — | Style for the wrapper. |
102
+
103
+ ---
104
+
105
+ ## Textarea
106
+
107
+ Multi-line text input: label on top, note below, placeholder, and optional character count (maxLength). Supports focus and error states.
108
+
109
+ | Prop | Type | Default | Description |
110
+ | ---------------------- | ------------------------ | --------------- | ----------------------------------------------------- |
111
+ | `value` | `string` | — | **Required.** Current value. |
112
+ | `onChangeText` | `(text: string) => void` | — | **Required.** Callback when text changes. |
113
+ | `placeholder` | `string` | `'Placeholder'` | Placeholder text. |
114
+ | `label` | `string` | — | Label above the field. |
115
+ | `note` | `string` | — | Helper text below the field. |
116
+ | `error` | `string` | — | Error message; red border and text below. |
117
+ | `maxLength` | `number` | — | Max characters; shows count 0/maxLength bottom-right. |
118
+ | `appWidth` | `number` | — | **Required.** App width (for padding). |
119
+ | `minHeight` | `number` | `120` | Minimum height of the input area. |
120
+ | `backgroundColor` | `string` | — | Background color of the field. |
121
+ | `borderColor` | `string` | — | Border color (unfocused). |
122
+ | `focusBackgroundColor` | `string` | — | Background color when focused. |
123
+ | `focusBorderColor` | `string` | — | Border color when focused. |
124
+ | `errorBorderColor` | `string` | `'#D32F2F'` | Border color when error is set. |
125
+ | `fontFamily` | `string` | — | Font family. |
126
+ | `fontSize` | `number` | `16` | Font size. |
127
+ | `placeholderTextColor` | `string` | — | Placeholder text color. |
128
+ | `textColor` | `string` | — | Text color. |
129
+ | `labelStyle` | `TextStyle` | — | Style for the label. |
130
+ | `captionStyle` | `TextStyle` | — | Style for caption. |
131
+ | `noteStyle` | `TextStyle` | — | Style for the note. |
132
+ | `errorStyle` | `TextStyle` | — | Style for the error text. |
133
+ | `counterStyle` | `TextStyle` | — | Style for the character counter. |
134
+ | `style` | `ViewStyle` | — | Style for the wrapper. |
135
+
136
+ ---
137
+
138
+ ## Input
139
+
140
+ Single-line text input: same structure as Textarea (label, note, error), with optional character counter when `maxLength` is set.
141
+
142
+ | Prop | Type | Default | Description |
143
+ | ---------------------- | ------------------------ | --------------- | -------------------------------------------------------- |
144
+ | `value` | `string` | — | **Required.** Current value. |
145
+ | `onChangeText` | `(text: string) => void` | — | **Required.** Callback when text changes. |
146
+ | `placeholder` | `string` | `'Placeholder'` | Placeholder text. |
147
+ | `label` | `string` | — | Label above the field. |
148
+ | `note` | `string` | — | Helper text below the field. |
149
+ | `error` | `string` | — | Error message; red border and text below. |
150
+ | `maxLength` | `number` | — | Max characters. |
151
+ | `showCounter` | `boolean` | `true` | Show 0/maxLength when maxLength is set; `false` to hide. |
152
+ | `appWidth` | `number` | — | **Required.** App width (for padding). |
153
+ | `backgroundColor` | `string` | — | Background color. |
154
+ | `borderColor` | `string` | — | Border color. |
155
+ | `focusBackgroundColor` | `string` | — | Background color when focused. |
156
+ | `focusBorderColor` | `string` | — | Border color when focused. |
157
+ | `errorBorderColor` | `string` | `'#D32F2F'` | Border color when error is set. |
158
+ | `fontFamily` | `string` | — | Font family. |
159
+ | `fontSize` | `number` | `16` | Font size. |
160
+ | `placeholderTextColor` | `string` | — | Placeholder text color. |
161
+ | `textColor` | `string` | — | Text color. |
162
+ | `labelStyle` | `TextStyle` | — | Style for the label. |
163
+ | `noteStyle` | `TextStyle` | — | Style for the note. |
164
+ | `errorStyle` | `TextStyle` | — | Style for the error text. |
165
+ | `counterStyle` | `TextStyle` | — | Style for the counter. |
166
+ | `style` | `ViewStyle` | — | Style for the wrapper. |
167
+
168
+ ---
169
+
170
+ ## YesNoButtons
171
+
172
+ Two Yes / No buttons built with ButtonSubmit. Single selection; selected style can be primary (red background) or secondary (light background + bold border).
173
+
174
+ | Prop | Type | Default | Description |
175
+ | ------------------------- | -------------------------------- | ----------- | ----------------------------------------------------------------- |
176
+ | `question` | `string` | — | **Required.** Question text above the buttons. |
177
+ | `value` | `'yes' \| 'no' \| null` | — | **Required.** Current selection. |
178
+ | `onSelect` | `(value: 'yes' \| 'no') => void` | — | **Required.** Callback when an option is selected. |
179
+ | `selectedVariant` | `'primary' \| 'secondary'` | `'primary'` | primary = red bg, white text; secondary = light bg + bold border. |
180
+ | `yesLabel` | `string` | `'Yes'` | Label for the Yes button. |
181
+ | `noLabel` | `string` | `'No'` | Label for the No button. |
182
+ | `error` | `string` | — | Error message; shown below the two buttons with "!". |
183
+ | `appWidth` | `number` | — | **Required.** App width (for ButtonSubmit). |
184
+ | `selectedBackgroundColor` | `string` | — | Override background when selected (secondary). |
185
+ | `selectedBorderColor` | `string` | — | Override border when selected (secondary). |
186
+ | `selectedTextColor` | `string` | — | Override text color when selected (secondary). |
187
+ | `questionStyle` | `TextStyle` | — | Style for the question. |
188
+ | `errorStyle` | `TextStyle` | — | Style for the error text. |
189
+ | `errorColor` | `string` | — | Error text color (default red). |
190
+ | `style` | `ViewStyle` | — | Style for the wrapper. |
191
+
192
+ ---
193
+
194
+ ## MultiSelectButtons
195
+
196
+ Multiple choice (tag) buttons: select several options, wrap layout. Uses ButtonSubmit with "+" / "✓" icon on the left. Selected variant: primary (red background) or secondary (light background + bold border, black text).
197
+
198
+ | Prop | Type | Default | Description |
199
+ | ------------------------- | ------------------------------ | ------------- | ----------------------------------------------------------------------------- |
200
+ | `question` | `string` | — | **Required.** Question text above the options. |
201
+ | `options` | `MultiSelectOption[]` | — | **Required.** List of options. Each: `{ value: string, label: string }`. |
202
+ | `value` | `string[]` | — | **Required.** Array of selected values. |
203
+ | `onSelect` | `(selected: string[]) => void` | — | **Required.** Callback when selection changes (toggles per option). |
204
+ | `appWidth` | `number` | — | **Required.** App width. |
205
+ | `selectedVariant` | `'primary' \| 'secondary'` | `'secondary'` | primary = red bg, white text; secondary = light bg + blue border, black text. |
206
+ | `error` | `string` | — | Error message; shown below the buttons. |
207
+ | `selectedBackgroundColor` | `string` | — | Override background when selected. |
208
+ | `selectedBorderColor` | `string` | — | Override border when selected. |
209
+ | `selectedTextColor` | `string` | — | Override text color when selected. |
210
+ | `questionStyle` | `TextStyle` | — | Style for the question. |
211
+ | `errorStyle` | `TextStyle` | — | Style for the error text. |
212
+ | `errorColor` | `string` | — | Error text color. |
213
+ | `style` | `ViewStyle` | — | Style for the wrapper. |
214
+
215
+ **MultiSelectOption:** `{ value: string; label: string }`
@@ -0,0 +1,169 @@
1
+ "use strict";
2
+
3
+ import { memo, useMemo, useRef } from 'react';
4
+ import { View, Text, StyleSheet, TouchableOpacity, Animated } from 'react-native';
5
+ import * as f from "../utils/common.js";
6
+ import { COLOR_STAR_NORMAL, COLOR_STAR_SELECTED, ERROR_COLOR, TEXT_DARK } from "../utils/constants.js";
7
+ import StarIcon from "../assets/StarIcon.js";
8
+ import ErrorIcon from "../assets/ErrorIcon.js";
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ let pressRatingTimestamp = null;
11
+
12
+ /**
13
+ * Props for the star rating component.
14
+ *
15
+ * Renders a title, question and a row of tappable stars with optional error text.
16
+ */
17
+
18
+ const ButtonStar = /*#__PURE__*/memo(props => {
19
+ const {
20
+ disabled,
21
+ onRate,
22
+ active = false,
23
+ normalStarColor,
24
+ selectedStarColor
25
+ } = props;
26
+ const springAnimated = useRef(new Animated.Value(0)).current;
27
+ const onPressStar = () => {
28
+ const nowTimestamp = Date.now();
29
+ if (pressRatingTimestamp && nowTimestamp - pressRatingTimestamp < 200) {
30
+ return;
31
+ }
32
+ pressRatingTimestamp = nowTimestamp;
33
+ Animated.sequence([Animated.timing(springAnimated, {
34
+ toValue: 1,
35
+ duration: 80,
36
+ useNativeDriver: true
37
+ }), Animated.timing(springAnimated, {
38
+ toValue: 0,
39
+ duration: 80,
40
+ useNativeDriver: true
41
+ })]).start();
42
+ f.triggerHaptic();
43
+ onRate();
44
+ };
45
+ const scaleStar = useMemo(() => springAnimated.interpolate({
46
+ inputRange: [0, 1],
47
+ outputRange: [1, 1.5]
48
+ }), [springAnimated]);
49
+ const starColor = active ? selectedStarColor : normalStarColor;
50
+ const size = f.isTablet ? 42 : 34;
51
+ const marginH = f.isTablet ? 12 : 8;
52
+ const starWrapStyle = useMemo(() => [styles.starWrap, {
53
+ transform: [{
54
+ scale: scaleStar
55
+ }],
56
+ marginHorizontal: marginH
57
+ }], [scaleStar, marginH]);
58
+ return /*#__PURE__*/_jsx(Animated.View, {
59
+ style: starWrapStyle,
60
+ children: /*#__PURE__*/_jsx(TouchableOpacity, {
61
+ disabled: disabled,
62
+ onPress: onPressStar,
63
+ activeOpacity: 0.8,
64
+ children: /*#__PURE__*/_jsx(StarIcon, {
65
+ size: size,
66
+ color: starColor
67
+ })
68
+ })
69
+ });
70
+ });
71
+ function Rating({
72
+ title = 'Help us get better',
73
+ question = 'How was your experience today?',
74
+ value,
75
+ onRate,
76
+ rating_min = 1,
77
+ rating_max = 5,
78
+ disabled = false,
79
+ error,
80
+ normalStarColor = COLOR_STAR_NORMAL,
81
+ selectedStarColor = COLOR_STAR_SELECTED,
82
+ titleStyle,
83
+ questionStyle,
84
+ errorStyle,
85
+ style
86
+ }) {
87
+ const hasError = useMemo(() => error != null && error !== '', [error]);
88
+ const stars = useMemo(() => {
89
+ const listStar = [];
90
+ for (let i = rating_min; i <= rating_max; i++) {
91
+ listStar.push(/*#__PURE__*/_jsx(ButtonStar, {
92
+ normalStarColor: normalStarColor,
93
+ selectedStarColor: selectedStarColor,
94
+ disabled: disabled || value === i,
95
+ onRate: () => onRate(i),
96
+ active: i <= value
97
+ }, `ButtonStar-${i}`));
98
+ }
99
+ return listStar;
100
+ }, [rating_min, rating_max, disabled, value, normalStarColor, selectedStarColor, onRate]);
101
+ const titleCombinedStyle = useMemo(() => [styles.title, {
102
+ color: TEXT_DARK
103
+ }, titleStyle], [titleStyle]);
104
+ const questionCombinedStyle = useMemo(() => [styles.question, {
105
+ color: TEXT_DARK
106
+ }, questionStyle], [questionStyle]);
107
+ const errorTextStyle = useMemo(() => [styles.error, {
108
+ color: ERROR_COLOR
109
+ }, errorStyle], [errorStyle]);
110
+ return /*#__PURE__*/_jsxs(View, {
111
+ style: [styles.wrapper, style],
112
+ children: [title != null && title !== '' && /*#__PURE__*/_jsx(Text, {
113
+ style: titleCombinedStyle,
114
+ children: title
115
+ }), question != null && question !== '' && /*#__PURE__*/_jsx(Text, {
116
+ style: questionCombinedStyle,
117
+ children: question
118
+ }), /*#__PURE__*/_jsx(View, {
119
+ style: styles.starsWrap,
120
+ children: stars
121
+ }), hasError && /*#__PURE__*/_jsxs(View, {
122
+ style: styles.errorWrap,
123
+ children: [/*#__PURE__*/_jsx(ErrorIcon, {
124
+ size: 20,
125
+ color: ERROR_COLOR
126
+ }), /*#__PURE__*/_jsx(Text, {
127
+ style: errorTextStyle,
128
+ children: error
129
+ })]
130
+ })]
131
+ });
132
+ }
133
+ export default Rating;
134
+ const styles = StyleSheet.create({
135
+ wrapper: {
136
+ width: '100%'
137
+ },
138
+ title: {
139
+ fontSize: 18,
140
+ marginBottom: 8,
141
+ lineHeight: 32,
142
+ fontWeight: 500,
143
+ letterSpacing: 0
144
+ },
145
+ question: {
146
+ fontSize: 16,
147
+ marginBottom: 24
148
+ },
149
+ starsWrap: {
150
+ flexDirection: 'row',
151
+ justifyContent: 'center',
152
+ alignItems: 'center',
153
+ width: '100%'
154
+ },
155
+ errorWrap: {
156
+ flexDirection: 'row',
157
+ alignItems: 'center',
158
+ marginTop: 8,
159
+ gap: 6
160
+ },
161
+ error: {
162
+ fontSize: 14,
163
+ lineHeight: 20,
164
+ flex: 1,
165
+ fontWeight: '400'
166
+ },
167
+ starWrap: {}
168
+ });
169
+ //# sourceMappingURL=Rating.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["memo","useMemo","useRef","View","Text","StyleSheet","TouchableOpacity","Animated","f","COLOR_STAR_NORMAL","COLOR_STAR_SELECTED","ERROR_COLOR","TEXT_DARK","StarIcon","ErrorIcon","jsx","_jsx","jsxs","_jsxs","pressRatingTimestamp","ButtonStar","props","disabled","onRate","active","normalStarColor","selectedStarColor","springAnimated","Value","current","onPressStar","nowTimestamp","Date","now","sequence","timing","toValue","duration","useNativeDriver","start","triggerHaptic","scaleStar","interpolate","inputRange","outputRange","starColor","size","isTablet","marginH","starWrapStyle","styles","starWrap","transform","scale","marginHorizontal","style","children","onPress","activeOpacity","color","Rating","title","question","value","rating_min","rating_max","error","titleStyle","questionStyle","errorStyle","hasError","stars","listStar","i","push","titleCombinedStyle","questionCombinedStyle","errorTextStyle","wrapper","starsWrap","errorWrap","create","width","fontSize","marginBottom","lineHeight","fontWeight","letterSpacing","flexDirection","justifyContent","alignItems","marginTop","gap","flex"],"sourceRoot":"../../../src","sources":["component/Rating.tsx"],"mappings":";;AAAA,SAAQA,IAAI,EAAEC,OAAO,EAAEC,MAAM,QAAO,OAAO;AAC3C,SAAQC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,gBAAgB,EAAEC,QAAQ,QAAuC,cAAc;AAC/G,OAAO,KAAKC,CAAC;AACb,SAAQC,iBAAiB,EAAEC,mBAAmB,EAAEC,WAAW,EAAEC,SAAS;AACtE,OAAOC,QAAQ;AACf,OAAOC,SAAS;AAA0B,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE1C,IAAIC,oBAAmC,GAAG,IAAI;;AAU9C;AACA;AACA;AACA;AACA;;AA4EA,MAAMC,UAAU,gBAAGpB,IAAI,CAAEqB,KAAsB,IAAK;EACnD,MAAM;IAACC,QAAQ;IAAEC,MAAM;IAAEC,MAAM,GAAG,KAAK;IAAEC,eAAe;IAAEC;EAAiB,CAAC,GAAGL,K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