@controleonline/ui-common 1.2.133 → 1.2.135

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 (52) hide show
  1. package/.release/rc-manifest.json +12 -6
  2. package/package.json +1 -1
  3. package/src/react/components/CategoryForm.js +539 -539
  4. package/src/react/components/DefaultProvider.native.js +2 -2
  5. package/src/react/components/DefaultProvider.web.js +2 -2
  6. package/src/react/components/integrations/IntegrationHero/index.js +1 -1
  7. package/src/react/components/integrations/IntegrationHero/styles.js +2 -2
  8. package/src/react/components/integrations/IntegrationTabs/index.js +1 -1
  9. package/src/react/components/integrations/IntegrationTabs/styles.js +1 -1
  10. package/src/react/pages/Connections.styles.js +72 -72
  11. package/src/react/pages/Devices/detail/DeviceDetailHeader.js +1 -1
  12. package/src/react/pages/Devices/detail/DeviceDetailMovementSections.js +1 -1
  13. package/src/react/pages/Devices/detail/useDeviceDetailStateA.js +2 -2
  14. package/src/react/pages/Devices/detail/useDeviceDetailStateB.js +2 -2
  15. package/src/react/pages/Devices/deviceTypes/DeviceGroupCard.js +1 -1
  16. package/src/react/pages/Devices/deviceTypes/shared.js +2 -2
  17. package/src/react/pages/Devices.js +2 -2
  18. package/src/react/pages/Devices.styles.js +353 -353
  19. package/src/react/pages/Food99IntegrationPage/components/Food99CatalogTab.js +219 -219
  20. package/src/react/pages/Food99IntegrationPage/components/Food99OverviewTab.js +134 -134
  21. package/src/react/pages/Food99IntegrationPage/components/Food99PreviewModal.js +173 -173
  22. package/src/react/pages/Food99IntegrationPage/components/Food99QuickWalletModal.js +1 -1
  23. package/src/react/pages/Food99IntegrationPage/components/Food99SettingsTab.js +306 -306
  24. package/src/react/pages/Food99IntegrationPage/components/Food99StoreTab.js +417 -417
  25. package/src/react/pages/Food99IntegrationPage/index.js +1530 -1530
  26. package/src/react/pages/Food99IntegrationPage/styles.js +792 -792
  27. package/src/react/pages/IFoodIntegrationPage/components/IFoodOperationsTab.js +267 -267
  28. package/src/react/pages/IFoodIntegrationPage/components/IFoodOverviewTab.js +118 -118
  29. package/src/react/pages/IFoodIntegrationPage/components/IFoodPreviewModal.js +101 -101
  30. package/src/react/pages/IFoodIntegrationPage/components/IFoodStoreTab.js +150 -150
  31. package/src/react/pages/IFoodIntegrationPage/index.js +1298 -1298
  32. package/src/react/pages/Imports.js +1 -1
  33. package/src/react/pages/Imports.styles.js +223 -223
  34. package/src/react/pages/IntegrationConfigPage.js +2 -2
  35. package/src/react/pages/Integrations.js +2 -15
  36. package/src/react/pages/Integrations.styles.js +130 -130
  37. package/src/react/pages/LinkedInIntegrationPage.js +2 -2
  38. package/src/react/pages/ManagerOrderNotificationsPage.js +642 -642
  39. package/src/react/pages/MarketplaceIntegrationPage/components/MarketplaceProductCard.js +205 -205
  40. package/src/react/pages/MercadoLivreIntegrationPage.js +2 -2
  41. package/src/react/pages/PrinterDeviceDetailPage.js +1915 -1915
  42. package/src/react/pages/PrinterDeviceFormPage.js +2 -2
  43. package/src/react/pages/WhatsAppConnectionPage.js +51 -0
  44. package/src/react/pages/WhatsAppConnectionPage.styles.js +315 -279
  45. package/src/react/pages/WhatsAppProviderForm.js +39 -1
  46. package/src/react/pages/whatsAppConnectionHelpers.js +38 -10
  47. package/src/react/pages/whatsAppEmbeddedSignup.js +133 -0
  48. package/src/react/router/__tests__/publicRoutes.test.js +12 -0
  49. package/src/react/router/publicRoutes.js +3 -0
  50. package/src/react/utils/fileUrl.js +1 -1
  51. package/src/store/connections/customActions.js +51 -14
  52. package/src/store/connections/index.js +109 -105
@@ -10,7 +10,7 @@ import {
10
10
  import { useNavigation, useFocusEffect } from '@react-navigation/native';
11
11
  import { useStore } from '@store';
12
12
  import { api } from '@controleonline/ui-common/src/api';
13
- import { colors } from '@controleonline/../../src/styles/colors';
13
+ import { colors } from '@controleonline/ui-layout/src/styles/colors';
14
14
  import Icon from 'react-native-vector-icons/FontAwesome';
15
15
  import IconAdd from 'react-native-vector-icons/MaterialIcons';
16
16
  import AddImportModal from '../components/AddImportModal';
@@ -1,223 +1,223 @@
1
- import { Platform, StyleSheet } from 'react-native'
2
- import { colors } from '@controleonline/../../src/styles/colors'
3
-
4
- const styles = StyleSheet.create({
5
- container: { flex: 1, backgroundColor: '#F8FAFC' },
6
- headerBar: {
7
- flexDirection: 'row',
8
- justifyContent: 'space-between',
9
- alignItems: 'center',
10
- padding: 16,
11
- backgroundColor: '#fff',
12
- borderBottomWidth: 1,
13
- borderBottomColor: '#eee',
14
- },
15
- headerTitle: {
16
- fontSize: 18,
17
- fontWeight: '700',
18
- },
19
-
20
- subHeader: {
21
- paddingHorizontal: 16,
22
- paddingTop: 9,
23
- paddingBottom: 9,
24
- backgroundColor: colors.white,
25
- borderBottomWidth: 1,
26
- borderBottomColor: colors.border,
27
- },
28
-
29
- topRow: {
30
- marginBottom: 8,
31
- },
32
-
33
- topRowActions: {
34
- flexDirection: 'row',
35
- alignItems: 'center',
36
- flexWrap: 'wrap',
37
- },
38
-
39
- downloadButton: {
40
- backgroundColor: colors.primary,
41
- paddingHorizontal: 12,
42
- paddingVertical: 6,
43
- borderRadius: 8,
44
- flexDirection: 'row',
45
- alignItems: 'center',
46
- },
47
-
48
- downloadText: { color: '#fff', fontWeight: '600', marginLeft: 6 },
49
- refreshButton: {
50
- marginLeft: 8,
51
- paddingHorizontal: 12,
52
- paddingVertical: 6,
53
- borderRadius: 8,
54
- flexDirection: 'row',
55
- alignItems: 'center',
56
- backgroundColor: '#EFF6FF',
57
- borderWidth: 1,
58
- borderColor: '#BFDBFE',
59
- },
60
- refreshButtonText: {
61
- color: colors.primary,
62
- fontWeight: '600',
63
- marginLeft: 6,
64
- },
65
- processingBadge: {
66
- alignSelf: 'flex-start',
67
- flexDirection: 'row',
68
- alignItems: 'center',
69
- backgroundColor: '#FEF3C7',
70
- borderRadius: 999,
71
- paddingHorizontal: 10,
72
- paddingVertical: 5,
73
- marginTop: 10,
74
- },
75
- processingBadgeText: {
76
- marginLeft: 6,
77
- fontSize: 12,
78
- fontWeight: '600',
79
- color: '#B45309',
80
- },
81
- searchRow: { flexDirection: 'row', alignItems: 'center' },
82
-
83
- searchInputContainer: {
84
- flex: 1,
85
- flexDirection: 'row',
86
- alignItems: 'center',
87
- backgroundColor: colors.background,
88
- borderRadius: 8,
89
- paddingHorizontal: 12,
90
- borderWidth: 1,
91
- borderColor: colors.border,
92
- height: 40,
93
- },
94
-
95
- searchInput: {
96
- flex: 1,
97
- height: '100%',
98
- paddingHorizontal: 8,
99
- color: colors.text,
100
- fontSize: 14,
101
- outlineStyle: 'none',
102
- outlineWidth: 0,
103
- },
104
-
105
- clearSearchButton: { padding: 4 },
106
- addButton: {
107
- backgroundColor: colors.primary,
108
- width: 40,
109
- height: 40,
110
- borderRadius: 20,
111
- alignItems: 'center',
112
- justifyContent: 'center',
113
- marginLeft: 12,
114
- },
115
-
116
- scrollContent: {
117
- padding: 16,
118
- paddingBottom: 32,
119
- },
120
-
121
- card: {
122
- backgroundColor: '#fff',
123
- borderRadius: 12,
124
- padding: 16,
125
- marginBottom: 12,
126
- borderWidth: 1,
127
- borderColor: '#F1F5F9',
128
- ...Platform.select({
129
- ios: {
130
- shadowColor: '#64748B',
131
- shadowOffset: { width: 0, height: 4 },
132
- shadowOpacity: 0.1,
133
- shadowRadius: 12,
134
- },
135
- android: { elevation: 4 },
136
- web: { boxShadow: '0 8px 16px rgba(15, 23, 42, 0.1)' },
137
- }),
138
- },
139
-
140
- cardHeader: { flexDirection: 'row', alignItems: 'center', marginBottom: 12 },
141
- avatar: {
142
- width: 48,
143
- height: 48,
144
- borderRadius: 16,
145
- backgroundColor: colors.primary,
146
- justifyContent: 'center',
147
- alignItems: 'center',
148
- marginRight: 12,
149
- },
150
- avatarText: { color: '#fff', fontSize: 20, fontWeight: '700' },
151
- title: {
152
- flex: 1,
153
- fontWeight: '700',
154
- fontSize: 16,
155
- color: '#1E293B',
156
- lineHeight: 24,
157
- },
158
- cardBody: { marginTop: 4 },
159
- infoRow: {
160
- flexDirection: 'row',
161
- alignItems: 'center',
162
- marginBottom: 8,
163
- backgroundColor: '#F8FAFC',
164
- padding: 8,
165
- borderRadius: 8,
166
- },
167
- infoText: {
168
- fontSize: 14,
169
- color: '#475569',
170
- marginLeft: 8,
171
- fontWeight: '500',
172
- flex: 1,
173
- },
174
- statusContent: {
175
- flex: 1,
176
- marginLeft: 8,
177
- },
178
- statusBadge: {
179
- alignSelf: 'flex-start',
180
- borderRadius: 999,
181
- paddingHorizontal: 10,
182
- paddingVertical: 4,
183
- },
184
- statusBadgeText: {
185
- fontSize: 12,
186
- fontWeight: '700',
187
- },
188
- statusHelperText: {
189
- marginTop: 6,
190
- fontSize: 12,
191
- color: '#92400E',
192
- },
193
- errorText: {
194
- fontSize: 13,
195
- color: '#B91C1C',
196
- marginLeft: 8,
197
- fontWeight: '500',
198
- flex: 1,
199
- },
200
- emptyContainer: {
201
- flex: 1,
202
- justifyContent: 'center',
203
- alignItems: 'center',
204
- paddingTop: 80,
205
- },
206
- emptyIcon: { marginBottom: 14 },
207
- emptyTitle: {
208
- fontSize: 18,
209
- fontWeight: '600',
210
- color: '#0F172A',
211
- marginBottom: 6,
212
- textAlign: 'center',
213
- },
214
- emptySubtitle: { fontSize: 14, color: '#94A3B8', textAlign: 'center' },
215
- modalHeader: {
216
- flexDirection: 'row',
217
- justifyContent: 'space-between',
218
- alignItems: 'center',
219
- marginBottom: 16,
220
- },
221
- })
222
-
223
- export default styles
1
+ import { Platform, StyleSheet } from 'react-native'
2
+ import { colors } from '@controleonline/ui-layout/src/styles/colors'
3
+
4
+ const styles = StyleSheet.create({
5
+ container: { flex: 1, backgroundColor: '#F8FAFC' },
6
+ headerBar: {
7
+ flexDirection: 'row',
8
+ justifyContent: 'space-between',
9
+ alignItems: 'center',
10
+ padding: 16,
11
+ backgroundColor: '#fff',
12
+ borderBottomWidth: 1,
13
+ borderBottomColor: '#eee',
14
+ },
15
+ headerTitle: {
16
+ fontSize: 18,
17
+ fontWeight: '700',
18
+ },
19
+
20
+ subHeader: {
21
+ paddingHorizontal: 16,
22
+ paddingTop: 9,
23
+ paddingBottom: 9,
24
+ backgroundColor: colors.white,
25
+ borderBottomWidth: 1,
26
+ borderBottomColor: colors.border,
27
+ },
28
+
29
+ topRow: {
30
+ marginBottom: 8,
31
+ },
32
+
33
+ topRowActions: {
34
+ flexDirection: 'row',
35
+ alignItems: 'center',
36
+ flexWrap: 'wrap',
37
+ },
38
+
39
+ downloadButton: {
40
+ backgroundColor: colors.primary,
41
+ paddingHorizontal: 12,
42
+ paddingVertical: 6,
43
+ borderRadius: 8,
44
+ flexDirection: 'row',
45
+ alignItems: 'center',
46
+ },
47
+
48
+ downloadText: { color: '#fff', fontWeight: '600', marginLeft: 6 },
49
+ refreshButton: {
50
+ marginLeft: 8,
51
+ paddingHorizontal: 12,
52
+ paddingVertical: 6,
53
+ borderRadius: 8,
54
+ flexDirection: 'row',
55
+ alignItems: 'center',
56
+ backgroundColor: '#EFF6FF',
57
+ borderWidth: 1,
58
+ borderColor: '#BFDBFE',
59
+ },
60
+ refreshButtonText: {
61
+ color: colors.primary,
62
+ fontWeight: '600',
63
+ marginLeft: 6,
64
+ },
65
+ processingBadge: {
66
+ alignSelf: 'flex-start',
67
+ flexDirection: 'row',
68
+ alignItems: 'center',
69
+ backgroundColor: '#FEF3C7',
70
+ borderRadius: 999,
71
+ paddingHorizontal: 10,
72
+ paddingVertical: 5,
73
+ marginTop: 10,
74
+ },
75
+ processingBadgeText: {
76
+ marginLeft: 6,
77
+ fontSize: 12,
78
+ fontWeight: '600',
79
+ color: '#B45309',
80
+ },
81
+ searchRow: { flexDirection: 'row', alignItems: 'center' },
82
+
83
+ searchInputContainer: {
84
+ flex: 1,
85
+ flexDirection: 'row',
86
+ alignItems: 'center',
87
+ backgroundColor: colors.background,
88
+ borderRadius: 8,
89
+ paddingHorizontal: 12,
90
+ borderWidth: 1,
91
+ borderColor: colors.border,
92
+ height: 40,
93
+ },
94
+
95
+ searchInput: {
96
+ flex: 1,
97
+ height: '100%',
98
+ paddingHorizontal: 8,
99
+ color: colors.text,
100
+ fontSize: 14,
101
+ outlineStyle: 'none',
102
+ outlineWidth: 0,
103
+ },
104
+
105
+ clearSearchButton: { padding: 4 },
106
+ addButton: {
107
+ backgroundColor: colors.primary,
108
+ width: 40,
109
+ height: 40,
110
+ borderRadius: 20,
111
+ alignItems: 'center',
112
+ justifyContent: 'center',
113
+ marginLeft: 12,
114
+ },
115
+
116
+ scrollContent: {
117
+ padding: 16,
118
+ paddingBottom: 32,
119
+ },
120
+
121
+ card: {
122
+ backgroundColor: '#fff',
123
+ borderRadius: 12,
124
+ padding: 16,
125
+ marginBottom: 12,
126
+ borderWidth: 1,
127
+ borderColor: '#F1F5F9',
128
+ ...Platform.select({
129
+ ios: {
130
+ shadowColor: '#64748B',
131
+ shadowOffset: { width: 0, height: 4 },
132
+ shadowOpacity: 0.1,
133
+ shadowRadius: 12,
134
+ },
135
+ android: { elevation: 4 },
136
+ web: { boxShadow: '0 8px 16px rgba(15, 23, 42, 0.1)' },
137
+ }),
138
+ },
139
+
140
+ cardHeader: { flexDirection: 'row', alignItems: 'center', marginBottom: 12 },
141
+ avatar: {
142
+ width: 48,
143
+ height: 48,
144
+ borderRadius: 16,
145
+ backgroundColor: colors.primary,
146
+ justifyContent: 'center',
147
+ alignItems: 'center',
148
+ marginRight: 12,
149
+ },
150
+ avatarText: { color: '#fff', fontSize: 20, fontWeight: '700' },
151
+ title: {
152
+ flex: 1,
153
+ fontWeight: '700',
154
+ fontSize: 16,
155
+ color: '#1E293B',
156
+ lineHeight: 24,
157
+ },
158
+ cardBody: { marginTop: 4 },
159
+ infoRow: {
160
+ flexDirection: 'row',
161
+ alignItems: 'center',
162
+ marginBottom: 8,
163
+ backgroundColor: '#F8FAFC',
164
+ padding: 8,
165
+ borderRadius: 8,
166
+ },
167
+ infoText: {
168
+ fontSize: 14,
169
+ color: '#475569',
170
+ marginLeft: 8,
171
+ fontWeight: '500',
172
+ flex: 1,
173
+ },
174
+ statusContent: {
175
+ flex: 1,
176
+ marginLeft: 8,
177
+ },
178
+ statusBadge: {
179
+ alignSelf: 'flex-start',
180
+ borderRadius: 999,
181
+ paddingHorizontal: 10,
182
+ paddingVertical: 4,
183
+ },
184
+ statusBadgeText: {
185
+ fontSize: 12,
186
+ fontWeight: '700',
187
+ },
188
+ statusHelperText: {
189
+ marginTop: 6,
190
+ fontSize: 12,
191
+ color: '#92400E',
192
+ },
193
+ errorText: {
194
+ fontSize: 13,
195
+ color: '#B91C1C',
196
+ marginLeft: 8,
197
+ fontWeight: '500',
198
+ flex: 1,
199
+ },
200
+ emptyContainer: {
201
+ flex: 1,
202
+ justifyContent: 'center',
203
+ alignItems: 'center',
204
+ paddingTop: 80,
205
+ },
206
+ emptyIcon: { marginBottom: 14 },
207
+ emptyTitle: {
208
+ fontSize: 18,
209
+ fontWeight: '600',
210
+ color: '#0F172A',
211
+ marginBottom: 6,
212
+ textAlign: 'center',
213
+ },
214
+ emptySubtitle: { fontSize: 14, color: '#94A3B8', textAlign: 'center' },
215
+ modalHeader: {
216
+ flexDirection: 'row',
217
+ justifyContent: 'space-between',
218
+ alignItems: 'center',
219
+ marginBottom: 16,
220
+ },
221
+ })
222
+
223
+ export default styles
@@ -7,8 +7,8 @@ import Icon from 'react-native-vector-icons/Feather';
7
7
  import { api } from '@controleonline/ui-common/src/api';
8
8
  import useToastMessage from '@controleonline/ui-crm/src/react/hooks/useToastMessage';
9
9
  import { useStore } from '@store';
10
- import { colors } from '@controleonline/../../src/styles/colors';
11
- import { resolveThemePalette, withOpacity } from '@controleonline/../../src/styles/branding';
10
+ import { colors } from '@controleonline/ui-layout/src/styles/colors';
11
+ import { resolveThemePalette, withOpacity } from '@controleonline/ui-layout/src/styles/branding';
12
12
  import { getIntegrationConfig, getIntegrationByKey } from './integrationsCatalog';
13
13
  import { fetchPeopleConfigs } from './fetchPeopleConfigs';
14
14
  import IntegrationConfigFields from './IntegrationConfigFields';
@@ -16,11 +16,11 @@ import Icon from 'react-native-vector-icons/Feather';
16
16
  import {api} from '@controleonline/ui-common/src/api';
17
17
  import useToastMessage from '@controleonline/ui-crm/src/react/hooks/useToastMessage';
18
18
  import {useStore} from '@store';
19
- import {colors} from '@controleonline/../../src/styles/colors';
19
+ import {colors} from '@controleonline/ui-layout/src/styles/colors';
20
20
  import {
21
21
  resolveThemePalette,
22
22
  withOpacity,
23
- } from '@controleonline/../../src/styles/branding';
23
+ } from '@controleonline/ui-layout/src/styles/branding';
24
24
 
25
25
  import {
26
26
  INTEGRATION_LIST,
@@ -180,21 +180,8 @@ export default function IntegrationsPage({navigation}) {
180
180
  return;
181
181
  }
182
182
 
183
- const tab = integration.routeParams?.tab;
184
- if (tab && typeof globalThis !== 'undefined' && globalThis.localStorage) {
185
- try {
186
- globalThis.localStorage.setItem(
187
- 'controleonline.general-settings.active-tab',
188
- String(tab),
189
- );
190
- } catch {
191
- /* ignore storage failures */
192
- }
193
- }
194
-
195
183
  navigation.navigate(integration.route, {
196
184
  providerKey: integration.routeParams?.providerKey || integration.key,
197
- tab: tab || undefined,
198
185
  });
199
186
  },
200
187
  [navigation, showInfo],