@oxyhq/services 5.17.18 → 5.18.0
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/lib/commonjs/core/mixins/OxyServices.features.js +372 -0
- package/lib/commonjs/core/mixins/OxyServices.features.js.map +1 -0
- package/lib/commonjs/core/mixins/index.js +3 -2
- package/lib/commonjs/core/mixins/index.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedItem.js +11 -1
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
- package/lib/commonjs/ui/components/SettingRow.js +17 -4
- package/lib/commonjs/ui/components/SettingRow.js.map +1 -1
- package/lib/commonjs/ui/components/feedback/FormInput.js +72 -0
- package/lib/commonjs/ui/components/feedback/FormInput.js.map +1 -0
- package/lib/commonjs/ui/components/feedback/ProgressIndicator.js +33 -0
- package/lib/commonjs/ui/components/feedback/ProgressIndicator.js.map +1 -0
- package/lib/commonjs/ui/components/feedback/constants.js +59 -0
- package/lib/commonjs/ui/components/feedback/constants.js.map +1 -0
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js +262 -0
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js.map +1 -0
- package/lib/commonjs/ui/components/feedback/index.js +54 -0
- package/lib/commonjs/ui/components/feedback/index.js.map +1 -0
- package/lib/commonjs/ui/components/feedback/types.js +6 -0
- package/lib/commonjs/ui/components/feedback/types.js.map +1 -0
- package/lib/commonjs/ui/components/feedback/useFeedbackForm.js +52 -0
- package/lib/commonjs/ui/components/feedback/useFeedbackForm.js.map +1 -0
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +282 -0
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -0
- package/lib/commonjs/ui/components/modals/index.js +14 -0
- package/lib/commonjs/ui/components/modals/index.js.map +1 -0
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +309 -0
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -0
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +79 -0
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -0
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +108 -0
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -0
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +79 -0
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -0
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +176 -0
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -0
- package/lib/commonjs/ui/components/payment/constants.js +53 -0
- package/lib/commonjs/ui/components/payment/constants.js.map +1 -0
- package/lib/commonjs/ui/components/payment/index.js +80 -0
- package/lib/commonjs/ui/components/payment/index.js.map +1 -0
- package/lib/commonjs/ui/components/payment/paymentStyles.js +409 -0
- package/lib/commonjs/ui/components/payment/paymentStyles.js.map +1 -0
- package/lib/commonjs/ui/components/payment/types.js +6 -0
- package/lib/commonjs/ui/components/payment/types.js.map +1 -0
- package/lib/commonjs/ui/hooks/index.js +26 -0
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAsyncAction.js +95 -0
- package/lib/commonjs/ui/hooks/useAsyncAction.js.map +1 -0
- package/lib/commonjs/ui/hooks/useSettingToggle.js +126 -0
- package/lib/commonjs/ui/hooks/useSettingToggle.js.map +1 -0
- package/lib/commonjs/ui/navigation/routes.js +1 -0
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +4 -2
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +33 -30
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +315 -0
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FeedbackScreen.js +73 -590
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +8 -7
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +67 -1395
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +13 -5
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +16 -10
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +23 -11
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.features.js +369 -0
- package/lib/module/core/mixins/OxyServices.features.js.map +1 -0
- package/lib/module/core/mixins/index.js +3 -2
- package/lib/module/core/mixins/index.js.map +1 -1
- package/lib/module/ui/components/GroupedItem.js +11 -1
- package/lib/module/ui/components/GroupedItem.js.map +1 -1
- package/lib/module/ui/components/SettingRow.js +17 -4
- package/lib/module/ui/components/SettingRow.js.map +1 -1
- package/lib/module/ui/components/feedback/FormInput.js +67 -0
- package/lib/module/ui/components/feedback/FormInput.js.map +1 -0
- package/lib/module/ui/components/feedback/ProgressIndicator.js +28 -0
- package/lib/module/ui/components/feedback/ProgressIndicator.js.map +1 -0
- package/lib/module/ui/components/feedback/constants.js +55 -0
- package/lib/module/ui/components/feedback/constants.js.map +1 -0
- package/lib/module/ui/components/feedback/feedbackStyles.js +257 -0
- package/lib/module/ui/components/feedback/feedbackStyles.js.map +1 -0
- package/lib/module/ui/components/feedback/index.js +8 -0
- package/lib/module/ui/components/feedback/index.js.map +1 -0
- package/lib/module/ui/components/feedback/types.js +4 -0
- package/lib/module/ui/components/feedback/types.js.map +1 -0
- package/lib/module/ui/components/feedback/useFeedbackForm.js +47 -0
- package/lib/module/ui/components/feedback/useFeedbackForm.js.map +1 -0
- package/lib/module/ui/components/modals/DeleteAccountModal.js +276 -0
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -0
- package/lib/module/ui/components/modals/index.js +4 -0
- package/lib/module/ui/components/modals/index.js.map +1 -0
- package/lib/module/ui/components/payment/PaymentDetailsStep.js +303 -0
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -0
- package/lib/module/ui/components/payment/PaymentMethodStep.js +73 -0
- package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -0
- package/lib/module/ui/components/payment/PaymentReviewStep.js +102 -0
- package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -0
- package/lib/module/ui/components/payment/PaymentSuccessStep.js +73 -0
- package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -0
- package/lib/module/ui/components/payment/PaymentSummaryStep.js +170 -0
- package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -0
- package/lib/module/ui/components/payment/constants.js +47 -0
- package/lib/module/ui/components/payment/constants.js.map +1 -0
- package/lib/module/ui/components/payment/index.js +10 -0
- package/lib/module/ui/components/payment/index.js.map +1 -0
- package/lib/module/ui/components/payment/paymentStyles.js +404 -0
- package/lib/module/ui/components/payment/paymentStyles.js.map +1 -0
- package/lib/module/ui/components/payment/types.js +4 -0
- package/lib/module/ui/components/payment/types.js.map +1 -0
- package/lib/module/ui/hooks/index.js +2 -0
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/useAsyncAction.js +89 -0
- package/lib/module/ui/hooks/useAsyncAction.js.map +1 -0
- package/lib/module/ui/hooks/useSettingToggle.js +120 -0
- package/lib/module/ui/hooks/useSettingToggle.js.map +1 -0
- package/lib/module/ui/navigation/routes.js +1 -0
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +4 -2
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +33 -30
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +310 -0
- package/lib/module/ui/screens/FAQScreen.js.map +1 -0
- package/lib/module/ui/screens/FeedbackScreen.js +64 -581
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +8 -7
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +67 -1397
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +13 -5
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +16 -10
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +23 -11
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.features.d.ts +229 -0
- package/lib/typescript/core/mixins/OxyServices.features.d.ts.map +1 -0
- package/lib/typescript/core/mixins/index.d.ts +71 -1
- package/lib/typescript/core/mixins/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedItem.d.ts +5 -1
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
- package/lib/typescript/ui/components/SettingRow.d.ts +6 -0
- package/lib/typescript/ui/components/SettingRow.d.ts.map +1 -1
- package/lib/typescript/ui/components/feedback/FormInput.d.ts +20 -0
- package/lib/typescript/ui/components/feedback/FormInput.d.ts.map +1 -0
- package/lib/typescript/ui/components/feedback/ProgressIndicator.d.ts +11 -0
- package/lib/typescript/ui/components/feedback/ProgressIndicator.d.ts.map +1 -0
- package/lib/typescript/ui/components/feedback/constants.d.ts +5 -0
- package/lib/typescript/ui/components/feedback/constants.d.ts.map +1 -0
- package/lib/typescript/ui/components/feedback/feedbackStyles.d.ts +280 -0
- package/lib/typescript/ui/components/feedback/feedbackStyles.d.ts.map +1 -0
- package/lib/typescript/ui/components/feedback/index.d.ts +7 -0
- package/lib/typescript/ui/components/feedback/index.d.ts.map +1 -0
- package/lib/typescript/ui/components/feedback/types.d.ts +46 -0
- package/lib/typescript/ui/components/feedback/types.d.ts.map +1 -0
- package/lib/typescript/ui/components/feedback/useFeedbackForm.d.ts +9 -0
- package/lib/typescript/ui/components/feedback/useFeedbackForm.d.ts.map +1 -0
- package/lib/typescript/ui/components/modals/DeleteAccountModal.d.ts +19 -0
- package/lib/typescript/ui/components/modals/DeleteAccountModal.d.ts.map +1 -0
- package/lib/typescript/ui/components/modals/index.d.ts +2 -0
- package/lib/typescript/ui/components/modals/index.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/PaymentDetailsStep.d.ts +21 -0
- package/lib/typescript/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/PaymentMethodStep.d.ts +14 -0
- package/lib/typescript/ui/components/payment/PaymentMethodStep.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/PaymentReviewStep.d.ts +16 -0
- package/lib/typescript/ui/components/payment/PaymentReviewStep.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/PaymentSuccessStep.d.ts +10 -0
- package/lib/typescript/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/PaymentSummaryStep.d.ts +15 -0
- package/lib/typescript/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/constants.d.ts +7 -0
- package/lib/typescript/ui/components/payment/constants.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/index.d.ts +9 -0
- package/lib/typescript/ui/components/payment/index.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/paymentStyles.d.ts +396 -0
- package/lib/typescript/ui/components/payment/paymentStyles.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/types.d.ts +40 -0
- package/lib/typescript/ui/components/payment/types.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/index.d.ts +2 -0
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useAsyncAction.d.ts +51 -0
- package/lib/typescript/ui/hooks/useAsyncAction.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useSettingToggle.d.ts +55 -0
- package/lib/typescript/ui/hooks/useSettingToggle.d.ts.map +1 -0
- package/lib/typescript/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FAQScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/FAQScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +3 -15
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/core/mixins/OxyServices.features.ts +428 -0
- package/src/core/mixins/index.ts +20 -17
- package/src/ui/components/GroupedItem.tsx +19 -1
- package/src/ui/components/SettingRow.tsx +26 -4
- package/src/ui/components/feedback/FormInput.tsx +84 -0
- package/src/ui/components/feedback/ProgressIndicator.tsx +35 -0
- package/src/ui/components/feedback/constants.ts +22 -0
- package/src/ui/components/feedback/feedbackStyles.ts +247 -0
- package/src/ui/components/feedback/index.ts +6 -0
- package/src/ui/components/feedback/types.ts +52 -0
- package/src/ui/components/feedback/useFeedbackForm.ts +44 -0
- package/src/ui/components/modals/DeleteAccountModal.tsx +294 -0
- package/src/ui/components/modals/index.ts +1 -0
- package/src/ui/components/payment/PaymentDetailsStep.tsx +222 -0
- package/src/ui/components/payment/PaymentMethodStep.tsx +89 -0
- package/src/ui/components/payment/PaymentReviewStep.tsx +126 -0
- package/src/ui/components/payment/PaymentSuccessStep.tsx +71 -0
- package/src/ui/components/payment/PaymentSummaryStep.tsx +159 -0
- package/src/ui/components/payment/constants.ts +39 -0
- package/src/ui/components/payment/index.ts +9 -0
- package/src/ui/components/payment/paymentStyles.ts +397 -0
- package/src/ui/components/payment/types.ts +45 -0
- package/src/ui/hooks/index.ts +3 -1
- package/src/ui/hooks/useAsyncAction.ts +129 -0
- package/src/ui/hooks/useSettingToggle.ts +147 -0
- package/src/ui/navigation/routes.ts +2 -0
- package/src/ui/screens/AccountCenterScreen.tsx +2 -2
- package/src/ui/screens/AccountOverviewScreen.tsx +35 -37
- package/src/ui/screens/FAQScreen.tsx +332 -0
- package/src/ui/screens/FeedbackScreen.tsx +91 -626
- package/src/ui/screens/HelpSupportScreen.tsx +7 -5
- package/src/ui/screens/PaymentGatewayScreen.tsx +96 -1275
- package/src/ui/screens/ProfileScreen.tsx +11 -6
- package/src/ui/screens/SavesCollectionsScreen.tsx +19 -10
- package/src/ui/screens/karma/KarmaCenterScreen.tsx +10 -10
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createPaymentStyles = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _styles = require("../../styles");
|
|
9
|
+
const createPaymentStyles = colors => _reactNative.StyleSheet.create({
|
|
10
|
+
container: {
|
|
11
|
+
flex: 1
|
|
12
|
+
},
|
|
13
|
+
content: {
|
|
14
|
+
flex: 1,
|
|
15
|
+
padding: 16
|
|
16
|
+
},
|
|
17
|
+
stepContainer: {
|
|
18
|
+
justifyContent: 'flex-start',
|
|
19
|
+
alignItems: 'flex-start',
|
|
20
|
+
width: '100%'
|
|
21
|
+
},
|
|
22
|
+
section: {
|
|
23
|
+
marginBottom: 24,
|
|
24
|
+
width: '100%'
|
|
25
|
+
},
|
|
26
|
+
sectionTitle: {
|
|
27
|
+
fontSize: 16,
|
|
28
|
+
fontWeight: '600',
|
|
29
|
+
color: colors.text,
|
|
30
|
+
marginBottom: 12,
|
|
31
|
+
fontFamily: _styles.fontFamilies.phuduSemiBold
|
|
32
|
+
},
|
|
33
|
+
errorContainer: {
|
|
34
|
+
flex: 1,
|
|
35
|
+
justifyContent: 'center',
|
|
36
|
+
alignItems: 'center',
|
|
37
|
+
padding: 32
|
|
38
|
+
},
|
|
39
|
+
errorText: {
|
|
40
|
+
fontSize: 18,
|
|
41
|
+
color: 'red',
|
|
42
|
+
marginBottom: 24
|
|
43
|
+
},
|
|
44
|
+
// Summary card styles
|
|
45
|
+
summaryCard: {
|
|
46
|
+
backgroundColor: '#fff',
|
|
47
|
+
borderRadius: 16,
|
|
48
|
+
padding: 24,
|
|
49
|
+
marginBottom: 24,
|
|
50
|
+
alignItems: 'center',
|
|
51
|
+
width: '100%'
|
|
52
|
+
},
|
|
53
|
+
summaryCardContent: {
|
|
54
|
+
alignItems: 'center',
|
|
55
|
+
width: '100%'
|
|
56
|
+
},
|
|
57
|
+
summaryCardIcon: {
|
|
58
|
+
marginBottom: 8
|
|
59
|
+
},
|
|
60
|
+
summaryCardMainTitle: {
|
|
61
|
+
fontFamily: _styles.fontFamilies.phuduBold,
|
|
62
|
+
fontWeight: 'bold',
|
|
63
|
+
fontSize: 28,
|
|
64
|
+
color: colors.text,
|
|
65
|
+
marginBottom: 2,
|
|
66
|
+
textAlign: 'center',
|
|
67
|
+
letterSpacing: 0.5
|
|
68
|
+
},
|
|
69
|
+
summaryCardSubtitle: {
|
|
70
|
+
fontSize: 16,
|
|
71
|
+
color: colors.secondaryText,
|
|
72
|
+
textAlign: 'center',
|
|
73
|
+
marginBottom: 24,
|
|
74
|
+
width: '100%'
|
|
75
|
+
},
|
|
76
|
+
summaryCardItems: {
|
|
77
|
+
width: '100%',
|
|
78
|
+
marginBottom: 16
|
|
79
|
+
},
|
|
80
|
+
summaryItemPrice: {
|
|
81
|
+
color: colors.text,
|
|
82
|
+
fontWeight: '600',
|
|
83
|
+
fontSize: 16
|
|
84
|
+
},
|
|
85
|
+
summaryCardAmount: {
|
|
86
|
+
alignItems: 'center',
|
|
87
|
+
width: '100%',
|
|
88
|
+
marginBottom: 16
|
|
89
|
+
},
|
|
90
|
+
summaryCardAmountLabel: {
|
|
91
|
+
fontSize: 16,
|
|
92
|
+
color: colors.secondaryText,
|
|
93
|
+
textAlign: 'center',
|
|
94
|
+
marginBottom: 8
|
|
95
|
+
},
|
|
96
|
+
summaryCardAmountValue: {
|
|
97
|
+
fontSize: 32,
|
|
98
|
+
fontWeight: 'bold',
|
|
99
|
+
color: colors.text,
|
|
100
|
+
textAlign: 'center',
|
|
101
|
+
marginBottom: 8,
|
|
102
|
+
fontFamily: _styles.fontFamilies.phuduBold
|
|
103
|
+
},
|
|
104
|
+
summaryCardAmountDescription: {
|
|
105
|
+
fontSize: 14,
|
|
106
|
+
color: colors.secondaryText,
|
|
107
|
+
textAlign: 'center',
|
|
108
|
+
lineHeight: 20
|
|
109
|
+
},
|
|
110
|
+
summaryCardDivider: {
|
|
111
|
+
height: 1,
|
|
112
|
+
backgroundColor: colors.border,
|
|
113
|
+
marginVertical: 16,
|
|
114
|
+
width: '100%'
|
|
115
|
+
},
|
|
116
|
+
summaryCardTotalSection: {
|
|
117
|
+
width: '100%',
|
|
118
|
+
marginBottom: 8
|
|
119
|
+
},
|
|
120
|
+
summaryCardTotalRow: {
|
|
121
|
+
flexDirection: 'row',
|
|
122
|
+
justifyContent: 'space-between',
|
|
123
|
+
alignItems: 'center',
|
|
124
|
+
paddingVertical: 4
|
|
125
|
+
},
|
|
126
|
+
summaryCardTotalLabel: {
|
|
127
|
+
fontSize: 16,
|
|
128
|
+
color: colors.secondaryText,
|
|
129
|
+
fontWeight: '500'
|
|
130
|
+
},
|
|
131
|
+
summaryCardTotalValue: {
|
|
132
|
+
fontSize: 16,
|
|
133
|
+
color: colors.text,
|
|
134
|
+
fontWeight: '600'
|
|
135
|
+
},
|
|
136
|
+
// Card payment styles
|
|
137
|
+
cardPaymentCard: {
|
|
138
|
+
backgroundColor: '#fff',
|
|
139
|
+
borderRadius: 16,
|
|
140
|
+
padding: 24,
|
|
141
|
+
marginBottom: 24,
|
|
142
|
+
alignItems: 'center',
|
|
143
|
+
width: '100%'
|
|
144
|
+
},
|
|
145
|
+
cardPaymentContent: {
|
|
146
|
+
alignItems: 'center',
|
|
147
|
+
width: '100%'
|
|
148
|
+
},
|
|
149
|
+
cardPaymentIcon: {
|
|
150
|
+
marginBottom: 8
|
|
151
|
+
},
|
|
152
|
+
cardPaymentMainTitle: {
|
|
153
|
+
fontFamily: _styles.fontFamilies.phuduBold,
|
|
154
|
+
fontWeight: 'bold',
|
|
155
|
+
fontSize: 28,
|
|
156
|
+
color: colors.text,
|
|
157
|
+
marginBottom: 2,
|
|
158
|
+
textAlign: 'center',
|
|
159
|
+
letterSpacing: 0.5
|
|
160
|
+
},
|
|
161
|
+
cardPaymentSubtitle: {
|
|
162
|
+
fontSize: 16,
|
|
163
|
+
color: colors.secondaryText,
|
|
164
|
+
textAlign: 'center',
|
|
165
|
+
marginBottom: 24,
|
|
166
|
+
width: '100%'
|
|
167
|
+
},
|
|
168
|
+
cardPaymentFields: {
|
|
169
|
+
width: '100%',
|
|
170
|
+
marginBottom: 16
|
|
171
|
+
},
|
|
172
|
+
cardPaymentWaiting: {
|
|
173
|
+
fontSize: 14,
|
|
174
|
+
color: colors.secondaryText,
|
|
175
|
+
textAlign: 'center',
|
|
176
|
+
marginBottom: 8
|
|
177
|
+
},
|
|
178
|
+
cardRowInfo: {
|
|
179
|
+
flexDirection: 'row',
|
|
180
|
+
alignItems: 'center',
|
|
181
|
+
marginBottom: 16
|
|
182
|
+
},
|
|
183
|
+
cardRowIcon: {
|
|
184
|
+
marginRight: 8
|
|
185
|
+
},
|
|
186
|
+
cardRowText: {
|
|
187
|
+
fontSize: 15,
|
|
188
|
+
color: colors.secondaryText
|
|
189
|
+
},
|
|
190
|
+
cardFieldContainer: {
|
|
191
|
+
marginBottom: 16
|
|
192
|
+
},
|
|
193
|
+
cardFieldRow: {
|
|
194
|
+
flexDirection: 'row',
|
|
195
|
+
gap: 12
|
|
196
|
+
},
|
|
197
|
+
cardFieldHalfLeft: {
|
|
198
|
+
flex: 1,
|
|
199
|
+
marginRight: 6
|
|
200
|
+
},
|
|
201
|
+
cardFieldHalfRight: {
|
|
202
|
+
flex: 1,
|
|
203
|
+
marginLeft: 6
|
|
204
|
+
},
|
|
205
|
+
// Oxy Pay styles
|
|
206
|
+
oxyPayCard: {
|
|
207
|
+
backgroundColor: '#fff',
|
|
208
|
+
borderRadius: 16,
|
|
209
|
+
padding: 24,
|
|
210
|
+
marginBottom: 24,
|
|
211
|
+
alignItems: 'center',
|
|
212
|
+
width: '100%'
|
|
213
|
+
},
|
|
214
|
+
oxyPayContent: {
|
|
215
|
+
alignItems: 'center',
|
|
216
|
+
width: '100%'
|
|
217
|
+
},
|
|
218
|
+
oxyPayIcon: {
|
|
219
|
+
marginBottom: 8
|
|
220
|
+
},
|
|
221
|
+
oxyPayMainTitle: {
|
|
222
|
+
fontFamily: _styles.fontFamilies.phuduBold,
|
|
223
|
+
fontWeight: 'bold',
|
|
224
|
+
fontSize: 28,
|
|
225
|
+
color: colors.text,
|
|
226
|
+
marginBottom: 2,
|
|
227
|
+
textAlign: 'center',
|
|
228
|
+
letterSpacing: 0.5
|
|
229
|
+
},
|
|
230
|
+
oxyPaySubtitle: {
|
|
231
|
+
fontSize: 16,
|
|
232
|
+
color: colors.secondaryText,
|
|
233
|
+
textAlign: 'center',
|
|
234
|
+
marginBottom: 8
|
|
235
|
+
},
|
|
236
|
+
oxyPayBalanceBox: {
|
|
237
|
+
backgroundColor: colors.primary + '22',
|
|
238
|
+
borderRadius: 12,
|
|
239
|
+
padding: 8,
|
|
240
|
+
marginTop: 8
|
|
241
|
+
},
|
|
242
|
+
oxyPayBalanceText: {
|
|
243
|
+
color: colors.primary,
|
|
244
|
+
fontWeight: '600'
|
|
245
|
+
},
|
|
246
|
+
oxyPayWaiting: {
|
|
247
|
+
fontSize: 14,
|
|
248
|
+
color: colors.secondaryText,
|
|
249
|
+
textAlign: 'center',
|
|
250
|
+
marginBottom: 8
|
|
251
|
+
},
|
|
252
|
+
// FairCoin styles
|
|
253
|
+
faircoinCard: {
|
|
254
|
+
backgroundColor: '#fff',
|
|
255
|
+
borderRadius: 16,
|
|
256
|
+
padding: 24,
|
|
257
|
+
marginBottom: 24,
|
|
258
|
+
alignItems: 'center',
|
|
259
|
+
width: '100%'
|
|
260
|
+
},
|
|
261
|
+
faircoinContent: {
|
|
262
|
+
alignItems: 'center',
|
|
263
|
+
width: '100%'
|
|
264
|
+
},
|
|
265
|
+
faircoinIcon: {
|
|
266
|
+
marginBottom: 8
|
|
267
|
+
},
|
|
268
|
+
faircoinMainTitle: {
|
|
269
|
+
fontFamily: _styles.fontFamilies.phuduBold,
|
|
270
|
+
fontWeight: 'bold',
|
|
271
|
+
fontSize: 28,
|
|
272
|
+
color: '#1b1f0a',
|
|
273
|
+
marginBottom: 2,
|
|
274
|
+
textAlign: 'center',
|
|
275
|
+
letterSpacing: 0.5
|
|
276
|
+
},
|
|
277
|
+
faircoinSubtitle: {
|
|
278
|
+
color: '#1b1f0a',
|
|
279
|
+
fontWeight: '700',
|
|
280
|
+
fontSize: 17,
|
|
281
|
+
marginBottom: 18,
|
|
282
|
+
textAlign: 'center',
|
|
283
|
+
letterSpacing: 0.2
|
|
284
|
+
},
|
|
285
|
+
faircoinScanText: {
|
|
286
|
+
color: '#1b1f0a',
|
|
287
|
+
fontWeight: '600',
|
|
288
|
+
fontSize: 15,
|
|
289
|
+
marginBottom: 8
|
|
290
|
+
},
|
|
291
|
+
faircoinQRCard: {
|
|
292
|
+
width: 200,
|
|
293
|
+
height: 200,
|
|
294
|
+
backgroundColor: '#fff',
|
|
295
|
+
borderRadius: 32,
|
|
296
|
+
justifyContent: 'center',
|
|
297
|
+
alignItems: 'center',
|
|
298
|
+
marginBottom: 16,
|
|
299
|
+
padding: 16,
|
|
300
|
+
borderWidth: 3,
|
|
301
|
+
borderColor: '#9ffb50',
|
|
302
|
+
shadowColor: '#9ffb50',
|
|
303
|
+
shadowOffset: {
|
|
304
|
+
width: 0,
|
|
305
|
+
height: 4
|
|
306
|
+
},
|
|
307
|
+
shadowOpacity: 0.25,
|
|
308
|
+
shadowRadius: 12,
|
|
309
|
+
elevation: 8,
|
|
310
|
+
position: 'relative'
|
|
311
|
+
},
|
|
312
|
+
faircoinQRBadge: {
|
|
313
|
+
position: 'absolute',
|
|
314
|
+
bottom: 12,
|
|
315
|
+
right: 12,
|
|
316
|
+
backgroundColor: '#fff',
|
|
317
|
+
borderRadius: 16,
|
|
318
|
+
padding: 4,
|
|
319
|
+
shadowColor: '#000',
|
|
320
|
+
shadowOffset: {
|
|
321
|
+
width: 0,
|
|
322
|
+
height: 2
|
|
323
|
+
},
|
|
324
|
+
shadowOpacity: 0.1,
|
|
325
|
+
shadowRadius: 4,
|
|
326
|
+
elevation: 2
|
|
327
|
+
},
|
|
328
|
+
faircoinTitle: {
|
|
329
|
+
fontSize: 16,
|
|
330
|
+
marginBottom: 8,
|
|
331
|
+
color: colors.text,
|
|
332
|
+
fontWeight: '600',
|
|
333
|
+
textAlign: 'center'
|
|
334
|
+
},
|
|
335
|
+
faircoinAddress: {
|
|
336
|
+
color: colors.secondaryText,
|
|
337
|
+
fontSize: 13,
|
|
338
|
+
textAlign: 'center',
|
|
339
|
+
marginTop: 6,
|
|
340
|
+
marginBottom: 2
|
|
341
|
+
},
|
|
342
|
+
faircoinButton: {
|
|
343
|
+
flexDirection: 'row',
|
|
344
|
+
alignItems: 'center',
|
|
345
|
+
alignSelf: 'center',
|
|
346
|
+
backgroundColor: colors.primary + '11',
|
|
347
|
+
borderRadius: 16,
|
|
348
|
+
paddingHorizontal: 16,
|
|
349
|
+
paddingVertical: 8,
|
|
350
|
+
marginTop: 6,
|
|
351
|
+
marginBottom: 2
|
|
352
|
+
},
|
|
353
|
+
faircoinButtonText: {
|
|
354
|
+
color: colors.primary,
|
|
355
|
+
fontWeight: '600',
|
|
356
|
+
fontSize: 15
|
|
357
|
+
},
|
|
358
|
+
faircoinWaiting: {
|
|
359
|
+
fontSize: 14,
|
|
360
|
+
color: colors.secondaryText,
|
|
361
|
+
textAlign: 'center',
|
|
362
|
+
marginBottom: 8
|
|
363
|
+
},
|
|
364
|
+
faircoinPlaceholder: {
|
|
365
|
+
fontSize: 13,
|
|
366
|
+
color: colors.secondaryText,
|
|
367
|
+
textAlign: 'center'
|
|
368
|
+
},
|
|
369
|
+
// Success styles
|
|
370
|
+
successCard: {
|
|
371
|
+
backgroundColor: '#fff',
|
|
372
|
+
borderRadius: 16,
|
|
373
|
+
padding: 24,
|
|
374
|
+
marginBottom: 24,
|
|
375
|
+
alignItems: 'center',
|
|
376
|
+
width: '100%'
|
|
377
|
+
},
|
|
378
|
+
successContent: {
|
|
379
|
+
alignItems: 'center',
|
|
380
|
+
width: '100%'
|
|
381
|
+
},
|
|
382
|
+
successIcon: {
|
|
383
|
+
marginBottom: 8
|
|
384
|
+
},
|
|
385
|
+
successMainTitle: {
|
|
386
|
+
fontFamily: _styles.fontFamilies.phuduBold,
|
|
387
|
+
fontWeight: 'bold',
|
|
388
|
+
fontSize: 28,
|
|
389
|
+
color: colors.success || '#4BB543',
|
|
390
|
+
marginBottom: 2,
|
|
391
|
+
textAlign: 'center',
|
|
392
|
+
letterSpacing: 0.5
|
|
393
|
+
},
|
|
394
|
+
successSubtitle: {
|
|
395
|
+
fontSize: 16,
|
|
396
|
+
color: colors.text,
|
|
397
|
+
textAlign: 'center',
|
|
398
|
+
marginBottom: 8,
|
|
399
|
+
width: '100%'
|
|
400
|
+
},
|
|
401
|
+
successMessage: {
|
|
402
|
+
fontSize: 14,
|
|
403
|
+
color: colors.secondaryText,
|
|
404
|
+
textAlign: 'center',
|
|
405
|
+
marginBottom: 8
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
exports.createPaymentStyles = createPaymentStyles;
|
|
409
|
+
//# sourceMappingURL=paymentStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_styles","createPaymentStyles","colors","StyleSheet","create","container","flex","content","padding","stepContainer","justifyContent","alignItems","width","section","marginBottom","sectionTitle","fontSize","fontWeight","color","text","fontFamily","fontFamilies","phuduSemiBold","errorContainer","errorText","summaryCard","backgroundColor","borderRadius","summaryCardContent","summaryCardIcon","summaryCardMainTitle","phuduBold","textAlign","letterSpacing","summaryCardSubtitle","secondaryText","summaryCardItems","summaryItemPrice","summaryCardAmount","summaryCardAmountLabel","summaryCardAmountValue","summaryCardAmountDescription","lineHeight","summaryCardDivider","height","border","marginVertical","summaryCardTotalSection","summaryCardTotalRow","flexDirection","paddingVertical","summaryCardTotalLabel","summaryCardTotalValue","cardPaymentCard","cardPaymentContent","cardPaymentIcon","cardPaymentMainTitle","cardPaymentSubtitle","cardPaymentFields","cardPaymentWaiting","cardRowInfo","cardRowIcon","marginRight","cardRowText","cardFieldContainer","cardFieldRow","gap","cardFieldHalfLeft","cardFieldHalfRight","marginLeft","oxyPayCard","oxyPayContent","oxyPayIcon","oxyPayMainTitle","oxyPaySubtitle","oxyPayBalanceBox","primary","marginTop","oxyPayBalanceText","oxyPayWaiting","faircoinCard","faircoinContent","faircoinIcon","faircoinMainTitle","faircoinSubtitle","faircoinScanText","faircoinQRCard","borderWidth","borderColor","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","position","faircoinQRBadge","bottom","right","faircoinTitle","faircoinAddress","faircoinButton","alignSelf","paddingHorizontal","faircoinButtonText","faircoinWaiting","faircoinPlaceholder","successCard","successContent","successIcon","successMainTitle","success","successSubtitle","successMessage","exports"],"sourceRoot":"../../../../../src","sources":["ui/components/payment/paymentStyles.ts"],"mappings":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,EAAE,EAAE;IACZE,KAAK,EAAEhB,MAAM,CAAC4G,OAAO,IAAI,SAAS;IAClChG,YAAY,EAAE,CAAC;IACfkB,SAAS,EAAE,QAAQ;IACnBC,aAAa,EAAE;EACnB,CAAC;EACD8E,eAAe,EAAE;IACb/F,QAAQ,EAAE,EAAE;IACZE,KAAK,EAAEhB,MAAM,CAACiB,IAAI;IAClBa,SAAS,EAAE,QAAQ;IACnBlB,YAAY,EAAE,CAAC;IACfF,KAAK,EAAE;EACX,CAAC;EACDoG,cAAc,EAAE;IACZhG,QAAQ,EAAE,EAAE;IACZE,KAAK,EAAEhB,MAAM,CAACiC,aAAa;IAC3BH,SAAS,EAAE,QAAQ;IACnBlB,YAAY,EAAE;EAClB;AACJ,CAAC,CAAC;AAACmG,OAAA,CAAAhH,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["ui/components/payment/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -3,12 +3,24 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "executeWithToast", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _useAsyncAction.executeWithToast;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "setOxyFileUrlInstance", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function () {
|
|
9
15
|
return _useFileDownloadUrl.setOxyFileUrlInstance;
|
|
10
16
|
}
|
|
11
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "useAsyncAction", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _useAsyncAction.useAsyncAction;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
12
24
|
Object.defineProperty(exports, "useFileDownloadUrl", {
|
|
13
25
|
enumerable: true,
|
|
14
26
|
get: function () {
|
|
@@ -27,6 +39,18 @@ Object.defineProperty(exports, "useFollowerCounts", {
|
|
|
27
39
|
return _useFollow.useFollowerCounts;
|
|
28
40
|
}
|
|
29
41
|
});
|
|
42
|
+
Object.defineProperty(exports, "useSettingToggle", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _useSettingToggle.useSettingToggle;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "useSettingToggles", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _useSettingToggle.useSettingToggles;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
30
54
|
Object.defineProperty(exports, "useThemeColors", {
|
|
31
55
|
enumerable: true,
|
|
32
56
|
get: function () {
|
|
@@ -43,4 +67,6 @@ var _useFollow = require("./useFollow");
|
|
|
43
67
|
var _useFileDownloadUrl = require("./useFileDownloadUrl");
|
|
44
68
|
var _useThemeStyles = require("./useThemeStyles");
|
|
45
69
|
var _useThemeColors = require("./useThemeColors");
|
|
70
|
+
var _useAsyncAction = require("./useAsyncAction");
|
|
71
|
+
var _useSettingToggle = require("./useSettingToggle");
|
|
46
72
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_useFollow","require","_useFileDownloadUrl","_useThemeStyles","_useThemeColors"],"sourceRoot":"../../../../src","sources":["ui/hooks/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_useFollow","require","_useFileDownloadUrl","_useThemeStyles","_useThemeColors","_useAsyncAction","_useSettingToggle"],"sourceRoot":"../../../../src","sources":["ui/hooks/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
exports.executeWithToast = executeWithToast;
|
|
8
|
+
exports.useAsyncAction = useAsyncAction;
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
var _sonner = require("../../lib/sonner");
|
|
11
|
+
/**
|
|
12
|
+
* Hook for handling async actions with loading state, error handling, and toast notifications.
|
|
13
|
+
* Reduces boilerplate for common patterns like try-catch with toast feedback.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const { execute, isLoading } = useAsyncAction({
|
|
17
|
+
* action: () => api.saveSettings(settings),
|
|
18
|
+
* successMessage: 'Settings saved!',
|
|
19
|
+
* errorMessage: 'Failed to save settings',
|
|
20
|
+
* });
|
|
21
|
+
*
|
|
22
|
+
* <Button onPress={execute} disabled={isLoading}>Save</Button>
|
|
23
|
+
*/
|
|
24
|
+
function useAsyncAction(options) {
|
|
25
|
+
const [isLoading, setIsLoading] = (0, _react.useState)(false);
|
|
26
|
+
const [error, setError] = (0, _react.useState)(null);
|
|
27
|
+
const execute = (0, _react.useCallback)(async () => {
|
|
28
|
+
const {
|
|
29
|
+
action,
|
|
30
|
+
successMessage,
|
|
31
|
+
errorMessage,
|
|
32
|
+
onSuccess,
|
|
33
|
+
onError,
|
|
34
|
+
showLoadingToast,
|
|
35
|
+
loadingMessage
|
|
36
|
+
} = options;
|
|
37
|
+
setIsLoading(true);
|
|
38
|
+
setError(null);
|
|
39
|
+
if (showLoadingToast && loadingMessage) {
|
|
40
|
+
_sonner.toast.loading(loadingMessage);
|
|
41
|
+
}
|
|
42
|
+
try {
|
|
43
|
+
const result = await action();
|
|
44
|
+
if (successMessage) {
|
|
45
|
+
_sonner.toast.success(successMessage);
|
|
46
|
+
}
|
|
47
|
+
onSuccess?.(result);
|
|
48
|
+
return result;
|
|
49
|
+
} catch (err) {
|
|
50
|
+
const message = typeof errorMessage === 'function' ? errorMessage(err) : errorMessage || err?.message || 'An error occurred';
|
|
51
|
+
_sonner.toast.error(message);
|
|
52
|
+
setError(err instanceof Error ? err : new Error(message));
|
|
53
|
+
onError?.(err);
|
|
54
|
+
return undefined;
|
|
55
|
+
} finally {
|
|
56
|
+
setIsLoading(false);
|
|
57
|
+
}
|
|
58
|
+
}, [options]);
|
|
59
|
+
const resetError = (0, _react.useCallback)(() => {
|
|
60
|
+
setError(null);
|
|
61
|
+
}, []);
|
|
62
|
+
return {
|
|
63
|
+
execute,
|
|
64
|
+
isLoading,
|
|
65
|
+
error,
|
|
66
|
+
resetError
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Simplified version that just executes an async action with toast feedback.
|
|
72
|
+
* Useful for one-off actions.
|
|
73
|
+
*/
|
|
74
|
+
async function executeWithToast(action, options) {
|
|
75
|
+
const {
|
|
76
|
+
successMessage,
|
|
77
|
+
errorMessage,
|
|
78
|
+
loadingMessage
|
|
79
|
+
} = options || {};
|
|
80
|
+
if (loadingMessage) {
|
|
81
|
+
_sonner.toast.loading(loadingMessage);
|
|
82
|
+
}
|
|
83
|
+
try {
|
|
84
|
+
const result = await action();
|
|
85
|
+
if (successMessage) {
|
|
86
|
+
_sonner.toast.success(successMessage);
|
|
87
|
+
}
|
|
88
|
+
return result;
|
|
89
|
+
} catch (err) {
|
|
90
|
+
_sonner.toast.error(errorMessage || err?.message || 'An error occurred');
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
var _default = exports.default = useAsyncAction;
|
|
95
|
+
//# sourceMappingURL=useAsyncAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_sonner","useAsyncAction","options","isLoading","setIsLoading","useState","error","setError","execute","useCallback","action","successMessage","errorMessage","onSuccess","onError","showLoadingToast","loadingMessage","toast","loading","result","success","err","message","Error","undefined","resetError","executeWithToast","_default","exports","default"],"sourceRoot":"../../../../src","sources":["ui/hooks/useAsyncAction.ts"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AA8BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,cAAcA,CAC1BC,OAAiC,EACV;EACvB,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EACjD,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAF,eAAQ,EAAe,IAAI,CAAC;EAEtD,MAAMG,OAAO,GAAG,IAAAC,kBAAW,EAAC,YAAoC;IAC5D,MAAM;MACFC,MAAM;MACNC,cAAc;MACdC,YAAY;MACZC,SAAS;MACTC,OAAO;MACPC,gBAAgB;MAChBC;IACJ,CAAC,GAAGd,OAAO;IAEXE,YAAY,CAAC,IAAI,CAAC;IAClBG,QAAQ,CAAC,IAAI,CAAC;IAEd,IAAIQ,gBAAgB,IAAIC,cAAc,EAAE;MACpCC,aAAK,CAACC,OAAO,CAACF,cAAc,CAAC;IACjC;IAEA,IAAI;MACA,MAAMG,MAAM,GAAG,MAAMT,MAAM,CAAC,CAAC;MAE7B,IAAIC,cAAc,EAAE;QAChBM,aAAK,CAACG,OAAO,CAACT,cAAc,CAAC;MACjC;MAEAE,SAAS,GAAGM,MAAM,CAAC;MACnB,OAAOA,MAAM;IACjB,CAAC,CAAC,OAAOE,GAAQ,EAAE;MACf,MAAMC,OAAO,GAAG,OAAOV,YAAY,KAAK,UAAU,GAC5CA,YAAY,CAACS,GAAG,CAAC,GACjBT,YAAY,IAAIS,GAAG,EAAEC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