@umituz/react-native-subscription 2.27.31 → 2.27.32

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-subscription",
3
- "version": "2.27.31",
3
+ "version": "2.27.32",
4
4
  "description": "Complete subscription management with RevenueCat, paywall UI, and credits system for React Native apps",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -60,7 +60,6 @@
60
60
  "@umituz/react-native-auth": "^3.6.14",
61
61
  "@umituz/react-native-design-system": "^2.9.35",
62
62
  "@umituz/react-native-firebase": "*",
63
- "@umituz/react-native-localization": "^3.6.0",
64
63
  "eslint": "^9.39.2",
65
64
  "eslint-plugin-react": "^7.37.5",
66
65
  "eslint-plugin-react-hooks": "^7.0.1",
@@ -85,9 +84,7 @@
85
84
  "expo-video": "~3.0.15",
86
85
  "expo-web-browser": "~15.0.10",
87
86
  "firebase": "^11.0.0",
88
- "i18next": "^25.7.3",
89
87
  "react": "19.1.0",
90
- "react-i18next": "^16.5.1",
91
88
  "react-native": "0.81.5",
92
89
  "react-native-gesture-handler": "^2.30.0",
93
90
  "react-native-purchases": "^7.0.0",
@@ -1,13 +1,6 @@
1
- /**
2
- * Paywall Feedback Modal
3
- * Collects user feedback when declining paywall
4
- */
5
-
6
1
  import React, { useMemo } from "react";
7
2
  import { View, TouchableOpacity, TextInput } from "react-native";
8
- import { AtomicText, BaseModal } from "@umituz/react-native-design-system";
9
- import { useAppDesignTokens } from "@umituz/react-native-design-system";
10
- import { useLocalization } from "@umituz/react-native-localization";
3
+ import { AtomicText, BaseModal, useAppDesignTokens } from "@umituz/react-native-design-system";
11
4
  import { usePaywallFeedback } from "../../hooks/feedback/usePaywallFeedback";
12
5
  import { createPaywallFeedbackStyles } from "./paywallFeedbackStyles";
13
6
 
@@ -19,26 +12,33 @@ const FEEDBACK_OPTION_IDS = [
19
12
  "other",
20
13
  ] as const;
21
14
 
15
+ export interface PaywallFeedbackTranslations {
16
+ title: string;
17
+ subtitle: string;
18
+ submit: string;
19
+ otherPlaceholder: string;
20
+ reasons: {
21
+ too_expensive: string;
22
+ no_need: string;
23
+ trying_out: string;
24
+ technical_issues: string;
25
+ other: string;
26
+ };
27
+ }
28
+
22
29
  export interface PaywallFeedbackModalProps {
30
+ translations: PaywallFeedbackTranslations;
23
31
  visible: boolean;
24
32
  onClose: () => void;
25
33
  onSubmit: (reason: string) => void;
26
- title?: string;
27
- subtitle?: string;
28
- submitText?: string;
29
- otherPlaceholder?: string;
30
34
  }
31
35
 
32
36
  export const PaywallFeedbackModal: React.FC<PaywallFeedbackModalProps> = React.memo(({
37
+ translations,
33
38
  visible,
34
39
  onClose,
35
40
  onSubmit,
36
- title,
37
- subtitle,
38
- submitText,
39
- otherPlaceholder,
40
41
  }) => {
41
- const { t } = useLocalization();
42
42
  const tokens = useAppDesignTokens();
43
43
 
44
44
  const {
@@ -47,7 +47,7 @@ export const PaywallFeedbackModal: React.FC<PaywallFeedbackModalProps> = React.m
47
47
  setOtherText,
48
48
  selectReason,
49
49
  handleSubmit,
50
- handleSkip, // BaseModal's onClose will handle skipping
50
+ handleSkip,
51
51
  canSubmit,
52
52
  } = usePaywallFeedback({ onSubmit, onClose });
53
53
 
@@ -56,18 +56,12 @@ export const PaywallFeedbackModal: React.FC<PaywallFeedbackModalProps> = React.m
56
56
  [tokens, canSubmit],
57
57
  );
58
58
 
59
- const displayTitle = title || t("paywall.feedback.title");
60
- const displaySubtitle = subtitle || t("paywall.feedback.subtitle");
61
- const displaySubmitText = submitText || t("paywall.feedback.submit");
62
- const displayOtherPlaceholder = otherPlaceholder || t("paywall.feedback.otherPlaceholder");
63
-
64
- // BaseModal from design system handles animations, safe areas, keyboard avoiding, and overlay backdrop
65
59
  return (
66
60
  <BaseModal
67
61
  visible={visible}
68
62
  onClose={handleSkip}
69
- title={displayTitle}
70
- subtitle={displaySubtitle}
63
+ title={translations.title}
64
+ subtitle={translations.subtitle}
71
65
  >
72
66
  <View style={{ paddingHorizontal: tokens.spacing.md, paddingBottom: tokens.spacing.lg }}>
73
67
  <View style={[styles.optionsContainer, { backgroundColor: 'transparent', padding: 0 }]}>
@@ -75,7 +69,7 @@ export const PaywallFeedbackModal: React.FC<PaywallFeedbackModalProps> = React.m
75
69
  const isSelected = selectedReason === optionId;
76
70
  const isOther = optionId === "other";
77
71
  const showInput = isSelected && isOther;
78
- const displayText = t(`paywall.feedback.reasons.${optionId}`);
72
+ const displayText = translations.reasons[optionId];
79
73
 
80
74
  // Dynamic styles for the container
81
75
  const containerStyle = {
@@ -135,7 +129,7 @@ export const PaywallFeedbackModal: React.FC<PaywallFeedbackModalProps> = React.m
135
129
  padding: tokens.spacing.sm,
136
130
  }
137
131
  ]}
138
- placeholder={displayOtherPlaceholder}
132
+ placeholder={translations.otherPlaceholder}
139
133
  placeholderTextColor={tokens.colors.textTertiary}
140
134
  multiline
141
135
  maxLength={200}
@@ -157,7 +151,7 @@ export const PaywallFeedbackModal: React.FC<PaywallFeedbackModalProps> = React.m
157
151
  activeOpacity={0.8}
158
152
  >
159
153
  <AtomicText type="labelLarge" style={styles.submitText}>
160
- {displaySubmitText}
154
+ {translations.submit}
161
155
  </AtomicText>
162
156
  </TouchableOpacity>
163
157
  </View>