ordering-ui-react-native 0.12.18 → 0.12.19

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 (91) hide show
  1. package/package.json +1 -1
  2. package/src/config.json +2 -2
  3. package/themes/business/src/components 2/AcceptOrRejectOrder/index.tsx +0 -389
  4. package/themes/business/src/components 2/AcceptOrRejectOrder/styles.tsx +0 -36
  5. package/themes/business/src/components 2/BusinessController/index.tsx +0 -155
  6. package/themes/business/src/components 2/BusinessController/styles.tsx +0 -19
  7. package/themes/business/src/components 2/Chat/index.tsx +0 -1152
  8. package/themes/business/src/components 2/Chat/styles.tsx +0 -12
  9. package/themes/business/src/components 2/Contacts/index.tsx +0 -299
  10. package/themes/business/src/components 2/Contacts/styles.tsx +0 -42
  11. package/themes/business/src/components 2/DriverMap/index.tsx +0 -525
  12. package/themes/business/src/components 2/FloatingButton/index.tsx +0 -141
  13. package/themes/business/src/components 2/FloatingButton/styles.tsx +0 -35
  14. package/themes/business/src/components 2/ForgotPasswordForm/index.tsx +0 -204
  15. package/themes/business/src/components 2/ForgotPasswordForm/styles.tsx +0 -11
  16. package/themes/business/src/components 2/GoogleMap/index.tsx +0 -347
  17. package/themes/business/src/components 2/Home/index.tsx +0 -111
  18. package/themes/business/src/components 2/Home/styles.tsx +0 -27
  19. package/themes/business/src/components 2/LanguageSelector/index.tsx +0 -124
  20. package/themes/business/src/components 2/LanguageSelector/lang_country.json +0 -152
  21. package/themes/business/src/components 2/LanguageSelector/styles.tsx +0 -17
  22. package/themes/business/src/components 2/LoginForm/index.tsx +0 -663
  23. package/themes/business/src/components 2/LoginForm/styles.tsx +0 -48
  24. package/themes/business/src/components 2/LogoutButton/index.tsx +0 -63
  25. package/themes/business/src/components 2/MapView/index.tsx +0 -317
  26. package/themes/business/src/components 2/MessagesOption/index.tsx +0 -337
  27. package/themes/business/src/components 2/MessagesOption/styles.tsx +0 -27
  28. package/themes/business/src/components 2/NewOrderNotification/index.tsx +0 -167
  29. package/themes/business/src/components 2/NewOrderNotification/styles.tsx +0 -8
  30. package/themes/business/src/components 2/NotFoundSource/index.tsx +0 -52
  31. package/themes/business/src/components 2/NotFoundSource/styles.tsx +0 -17
  32. package/themes/business/src/components 2/OrderDetails/Business.tsx +0 -683
  33. package/themes/business/src/components 2/OrderDetails/Delivery.tsx +0 -454
  34. package/themes/business/src/components 2/OrderDetails/OrderContentComponent.tsx +0 -391
  35. package/themes/business/src/components 2/OrderDetails/OrderHeaderComponent.tsx +0 -148
  36. package/themes/business/src/components 2/OrderDetails/styles.tsx +0 -84
  37. package/themes/business/src/components 2/OrderMessage/index.tsx +0 -344
  38. package/themes/business/src/components 2/OrderMessage/styles.tsx +0 -5
  39. package/themes/business/src/components 2/OrderSummary/index.tsx +0 -700
  40. package/themes/business/src/components 2/OrderSummary/styles.tsx +0 -61
  41. package/themes/business/src/components 2/OrdersOption/index.tsx +0 -755
  42. package/themes/business/src/components 2/OrdersOption/styles.tsx +0 -54
  43. package/themes/business/src/components 2/OrdersOptionBusiness/index.tsx +0 -51
  44. package/themes/business/src/components 2/OrdersOptionBusiness/styles.tsx +0 -8
  45. package/themes/business/src/components 2/OrdersOptionCity/index.tsx +0 -52
  46. package/themes/business/src/components 2/OrdersOptionCity/styles.tsx +0 -8
  47. package/themes/business/src/components 2/OrdersOptionDate/index.tsx +0 -52
  48. package/themes/business/src/components 2/OrdersOptionDate/styles.tsx +0 -8
  49. package/themes/business/src/components 2/OrdersOptionDelivery/index.tsx +0 -35
  50. package/themes/business/src/components 2/OrdersOptionDelivery/styles.tsx +0 -8
  51. package/themes/business/src/components 2/OrdersOptionDriver/index.tsx +0 -50
  52. package/themes/business/src/components 2/OrdersOptionDriver/styles.tsx +0 -8
  53. package/themes/business/src/components 2/OrdersOptionPaymethod/index.tsx +0 -49
  54. package/themes/business/src/components 2/OrdersOptionPaymethod/styles.tsx +0 -8
  55. package/themes/business/src/components 2/OrdersOptionStatus/index.tsx +0 -46
  56. package/themes/business/src/components 2/OrdersOptionStatus/styles.tsx +0 -8
  57. package/themes/business/src/components 2/PhoneInputNumber/index.tsx +0 -160
  58. package/themes/business/src/components 2/PhoneInputNumber/styles.tsx +0 -3
  59. package/themes/business/src/components 2/PreviousMessages/index.tsx +0 -304
  60. package/themes/business/src/components 2/PreviousMessages/styles.tsx +0 -32
  61. package/themes/business/src/components 2/PreviousOrders/index.tsx +0 -180
  62. package/themes/business/src/components 2/PreviousOrders/styles.tsx +0 -38
  63. package/themes/business/src/components 2/ProductItemAccordion/index.tsx +0 -301
  64. package/themes/business/src/components 2/ProductItemAccordion/styles.tsx +0 -61
  65. package/themes/business/src/components 2/SearchBar/index.tsx +0 -112
  66. package/themes/business/src/components 2/SignupForm/index.tsx +0 -530
  67. package/themes/business/src/components 2/SignupForm/styles.tsx +0 -16
  68. package/themes/business/src/components 2/StoresList/index.tsx +0 -208
  69. package/themes/business/src/components 2/StoresList/styles.tsx +0 -26
  70. package/themes/business/src/components 2/UserFormDetails/index.tsx +0 -513
  71. package/themes/business/src/components 2/UserFormDetails/styles.tsx +0 -40
  72. package/themes/business/src/components 2/UserProfileForm/index.tsx +0 -496
  73. package/themes/business/src/components 2/UserProfileForm/styles.tsx +0 -36
  74. package/themes/business/src/components 2/VerifyPhone/index.tsx +0 -201
  75. package/themes/business/src/components 2/VerifyPhone/styles.tsx +0 -43
  76. package/themes/business/src/components 2/shared/OAlert.tsx +0 -52
  77. package/themes/business/src/components 2/shared/OButton.tsx +0 -149
  78. package/themes/business/src/components 2/shared/OChatBubble.tsx +0 -100
  79. package/themes/business/src/components 2/shared/ODropDown.tsx +0 -195
  80. package/themes/business/src/components 2/shared/ODropDownCalendar.tsx +0 -328
  81. package/themes/business/src/components 2/shared/OFab.tsx +0 -54
  82. package/themes/business/src/components 2/shared/OIcon.tsx +0 -67
  83. package/themes/business/src/components 2/shared/OIconButton.tsx +0 -127
  84. package/themes/business/src/components 2/shared/OInput.tsx +0 -144
  85. package/themes/business/src/components 2/shared/OLink.tsx +0 -76
  86. package/themes/business/src/components 2/shared/OModal.tsx +0 -275
  87. package/themes/business/src/components 2/shared/OSegment.tsx +0 -86
  88. package/themes/business/src/components 2/shared/OText.tsx +0 -55
  89. package/themes/business/src/components 2/shared/OTextarea.tsx +0 -46
  90. package/themes/business/src/components 2/shared/OToast.tsx +0 -92
  91. package/themes/business/src/components 2/shared/index.tsx +0 -27
@@ -1,208 +0,0 @@
1
- import React, { useEffect, useState } from 'react';
2
- import { View, StyleSheet, Dimensions } from 'react-native';
3
- import { ScrollView } from 'react-native-gesture-handler';
4
- import { Placeholder, PlaceholderLine, Fade } from 'rn-placeholder';
5
- import NetInfo from '@react-native-community/netinfo';
6
- import { useTheme } from 'styled-components/native';
7
- import {
8
- ToastType,
9
- useToast,
10
- useLanguage,
11
- useOrder,
12
- BusinessList,
13
- } from 'ordering-components/native';
14
- import { NotFoundSource } from '../NotFoundSource';
15
- import { SearchBar } from '../SearchBar';
16
- import { BusinessController } from '../BusinessController';
17
- import { OText } from '../shared';
18
- import { BusinessesListingParams } from '../../types';
19
-
20
- const StoresListUI = (props: BusinessesListingParams) => {
21
- const {
22
- navigation,
23
- businessesList,
24
- searchValue,
25
- getBusinesses,
26
- handleChangeBusinessType,
27
- handleBusinessClick,
28
- paginationProps,
29
- handleChangeSearch,
30
- } = props;
31
-
32
- const { loading, error, businesses } = businessesList;
33
- const [isConnected, setIsConnected] = useState<boolean | null>(false);
34
-
35
- NetInfo.fetch().then((state: any) => {
36
- setIsConnected(state.isConnected);
37
- });
38
-
39
- const [, t] = useLanguage();
40
- const [orderState] = useOrder();
41
- const theme = useTheme();
42
- const [, { showToast }] = useToast();
43
- const [isUpdateStore, setIsUpdateStore] = useState(false);
44
-
45
- const [loadBusinesses, setLoadBusinesses] = useState(loading);
46
- const [orientation, setOrientation] = useState(
47
- Dimensions.get('window').width < Dimensions.get('window').height
48
- ? 'Portrait'
49
- : 'Landscape',
50
- );
51
- const [windowsHeight, setWindowsHeight] = useState(
52
- parseInt(parseFloat(String(Dimensions.get('window').height)).toFixed(0)),
53
- );
54
-
55
- const handleScroll = ({ nativeEvent }: any) => {
56
- const y = nativeEvent.contentOffset.y;
57
- const height = nativeEvent.contentSize.height;
58
- const hasMore = !(
59
- paginationProps.totalPages === paginationProps.currentPage
60
- );
61
-
62
- if (y + windowsHeight > height && !businessesList?.loading && hasMore) {
63
- setLoadBusinesses(true);
64
- getBusinesses();
65
- showToast(
66
- ToastType.Info,
67
- t('LOADING_MORE_BUSINESSES', 'Loading more businesses'),
68
- );
69
- }
70
- };
71
- useEffect(() => {
72
- if (error) {
73
- showToast(
74
- ToastType.Error,
75
- error || error[0] || t('NETWORK_ERROR', 'Network Error'),
76
- );
77
- }
78
-
79
- if (loadBusinesses && !loading) {
80
- setLoadBusinesses(false);
81
- }
82
- }, [loading]);
83
-
84
- Dimensions.addEventListener('change', ({ window: { width, height } }) => {
85
- setWindowsHeight(
86
- parseInt(parseFloat(String(Dimensions.get('window').width)).toFixed(0)),
87
- );
88
-
89
- if (width < height) {
90
- setOrientation('Portrait');
91
- } else {
92
- setOrientation('Landscape');
93
- }
94
- });
95
-
96
- const styles = StyleSheet.create({
97
- container: {
98
- paddingBottom: 20,
99
- marginBottom: 0,
100
- flex: 1,
101
- },
102
- header: {
103
- flexDirection: 'row',
104
- justifyContent: 'space-between',
105
- marginBottom: 10,
106
- },
107
- sectionTitle: {
108
- fontStyle: 'normal',
109
- fontWeight: '600',
110
- fontSize: 26,
111
- color: theme.colors.textGray,
112
- },
113
- icons: {
114
- flexDirection: 'row',
115
- },
116
- borderStyle: {
117
- borderColor: theme.colors.red,
118
- borderWidth: 0,
119
- borderRadius: 10,
120
- },
121
- });
122
-
123
- return (
124
- <>
125
- <View style={styles.header}>
126
- <OText style={styles.sectionTitle}>{t('STORES', 'Stores')}</OText>
127
-
128
- {isConnected && (
129
- <View style={{ flexDirection: 'row', justifyContent: 'flex-end' }}>
130
- <SearchBar
131
- borderStyle={styles.borderStyle}
132
- onSearch={handleChangeSearch}
133
- searchValue={searchValue}
134
- lazyLoad
135
- isCancelXButtonShow={!!searchValue}
136
- onCancel={() => handleChangeSearch('')}
137
- placeholder={t('FIND_BUSINESS', 'Find a business')}
138
- />
139
- </View>
140
- )}
141
- </View>
142
- <ScrollView
143
- showsVerticalScrollIndicator={false}
144
- style={styles.container}
145
- onScroll={(e: any) => handleScroll(e)}>
146
- {!loading && !loadBusinesses && businesses?.length === 0 && (
147
- <NotFoundSource
148
- content={
149
- !isConnected
150
- ? t('NETWORK_ERROR', 'Network Error')
151
- : t('NO_RESULTS_FOUND', 'Sorry, no results found')
152
- }
153
- image={theme.images.general.notFound}
154
- conditioned={false}
155
- />
156
- )}
157
-
158
- {!error &&
159
- businesses?.map((business: any) => (
160
- <BusinessController
161
- key={business?.id}
162
- business={business}
163
- handleCustomClick={handleBusinessClick}
164
- orderType={orderState?.options?.type}
165
- isBusinessOpen={business?.open}
166
- setIsUpdateStore={setIsUpdateStore}
167
- isUpdateStore={isUpdateStore}
168
- />
169
- ))}
170
-
171
- {(loading || loadBusinesses) && isConnected && (
172
- <View>
173
- {[...Array(6)].map((item, i) => (
174
- <Placeholder key={i} Animation={Fade}>
175
- <View
176
- style={{ flex: 1, flexDirection: 'row', marginBottom: 10 }}>
177
- <PlaceholderLine
178
- width={orientation === 'Portrait' ? 22 : 11}
179
- height={74}
180
- style={{
181
- marginRight: 20,
182
- marginBottom: 20,
183
- borderRadius: 7.6,
184
- }}
185
- />
186
- <Placeholder>
187
- <PlaceholderLine width={30} style={{ marginTop: 5 }} />
188
- <PlaceholderLine width={50} />
189
- <PlaceholderLine width={20} />
190
- </Placeholder>
191
- </View>
192
- </Placeholder>
193
- ))}
194
- </View>
195
- )}
196
- </ScrollView>
197
- </>
198
- );
199
- };
200
-
201
- export const StoresList = (props: BusinessesListingParams) => {
202
- const BusinessesListProps = {
203
- ...props,
204
- UIComponent: StoresListUI,
205
- };
206
-
207
- return <BusinessList {...BusinessesListProps} />;
208
- };
@@ -1,26 +0,0 @@
1
- import styled from 'styled-components/native';
2
-
3
- export const OptionTitle = styled.View``;
4
-
5
- export const FiltersTab = styled.View`
6
- margin-bottom: 15px;
7
- `;
8
-
9
- export const OTabs = styled.View`
10
- display: flex;
11
- flex-direction: row;
12
- `;
13
-
14
- export const TagsContainer = styled.ScrollView`
15
- margin-bottom: 10px;
16
- `;
17
-
18
- export const Tag = styled.Pressable`
19
- background-color: ${({ isSelected }: { isSelected: string }) => isSelected};
20
- justify-content: center;
21
- align-items: center;
22
- min-height: 34px;
23
- padding: 4px 10px;
24
- border-radius: 50px;
25
- margin-right: 15px;
26
- `;