ordering-ui-react-native 0.14.35 → 0.14.36
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
|
@@ -46,7 +46,7 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
|
|
|
46
46
|
const [menu, setMenu] = useState({})
|
|
47
47
|
const [timeList, setTimeList] = useState<any>([])
|
|
48
48
|
const [selectDate, setSelectedDate] = useState<any>(null)
|
|
49
|
-
const [datesWhitelist, setDateWhitelist] = useState<any>([{start: null, end: null}])
|
|
49
|
+
const [datesWhitelist, setDateWhitelist] = useState<any>([{ start: null, end: null }])
|
|
50
50
|
|
|
51
51
|
const styles = StyleSheet.create({
|
|
52
52
|
container: {
|
|
@@ -54,19 +54,19 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
|
|
|
54
54
|
paddingVertical: 30,
|
|
55
55
|
paddingHorizontal: 40
|
|
56
56
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
57
|
+
businessLogo: {
|
|
58
|
+
backgroundColor: 'white',
|
|
59
|
+
width: 60,
|
|
60
|
+
height: 60,
|
|
61
|
+
borderRadius: 7.6,
|
|
62
|
+
justifyContent: 'center',
|
|
63
|
+
alignItems: 'center',
|
|
64
|
+
shadowColor: '#000000',
|
|
65
|
+
shadowOffset: { width: 0, height: 1 },
|
|
66
|
+
shadowOpacity: 0.1,
|
|
67
|
+
shadowRadius: 1,
|
|
68
|
+
elevation: 2
|
|
69
|
+
},
|
|
70
70
|
selectOption: {
|
|
71
71
|
backgroundColor: theme.colors.backgroundGray100,
|
|
72
72
|
borderRadius: 7.6,
|
|
@@ -82,7 +82,7 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
|
|
|
82
82
|
paddingBottom: 15,
|
|
83
83
|
borderBottomWidth: 1,
|
|
84
84
|
borderColor: theme.colors.backgroundGray200,
|
|
85
|
-
height: 100
|
|
85
|
+
height: 100,
|
|
86
86
|
},
|
|
87
87
|
calendarHeaderContainer: {
|
|
88
88
|
flex: 1,
|
|
@@ -101,35 +101,36 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
|
|
|
101
101
|
dateNumber: {
|
|
102
102
|
color: '#B1BCCC',
|
|
103
103
|
fontSize: 16,
|
|
104
|
-
fontWeight: '500'
|
|
104
|
+
fontWeight: '500',
|
|
105
105
|
},
|
|
106
106
|
dateName: {
|
|
107
107
|
color: '#B1BCCC',
|
|
108
108
|
fontSize: 12,
|
|
109
|
-
textTransform: 'capitalize'
|
|
109
|
+
textTransform: 'capitalize',
|
|
110
110
|
},
|
|
111
111
|
highlightDateName: {
|
|
112
112
|
color: '#344050',
|
|
113
113
|
fontSize: 12,
|
|
114
|
-
textTransform: 'capitalize'
|
|
114
|
+
textTransform: 'capitalize',
|
|
115
115
|
},
|
|
116
116
|
highlightDateNumber: {
|
|
117
117
|
color: '#344050',
|
|
118
118
|
fontSize: 16,
|
|
119
|
-
textTransform: 'capitalize'
|
|
119
|
+
textTransform: 'capitalize',
|
|
120
120
|
},
|
|
121
121
|
disabledDateName: {
|
|
122
122
|
color: '#B1BCCC',
|
|
123
123
|
fontSize: 10,
|
|
124
124
|
textTransform: 'capitalize',
|
|
125
|
-
opacity: 1
|
|
125
|
+
opacity: 1,
|
|
126
126
|
},
|
|
127
127
|
disabledDateNumber: {
|
|
128
128
|
color: '#B1BCCC',
|
|
129
129
|
fontSize: 14,
|
|
130
|
-
fontWeight: '500'
|
|
130
|
+
fontWeight: '500',
|
|
131
|
+
|
|
131
132
|
}
|
|
132
|
-
|
|
133
|
+
})
|
|
133
134
|
|
|
134
135
|
const preorderTypeList = [
|
|
135
136
|
{ key: 'business_hours', name: t('BUSINESS_HOURS', 'Business hours') },
|
|
@@ -191,7 +192,7 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
|
|
|
191
192
|
|
|
192
193
|
const LeftSelector = () => {
|
|
193
194
|
return (
|
|
194
|
-
<View style={{height: '100%', justifyContent: 'flex-end'}}>
|
|
195
|
+
<View style={{ height: '100%', justifyContent: 'flex-end' }}>
|
|
195
196
|
<IconAntDesign
|
|
196
197
|
name='caretleft'
|
|
197
198
|
color={theme.colors.textNormal}
|
|
@@ -203,7 +204,7 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
|
|
|
203
204
|
|
|
204
205
|
const RightSelector = () => {
|
|
205
206
|
return (
|
|
206
|
-
<View style={{height: '100%', justifyContent: 'flex-end'}}>
|
|
207
|
+
<View style={{ height: '100%', justifyContent: 'flex-end' }}>
|
|
207
208
|
<IconAntDesign
|
|
208
209
|
name='caretright'
|
|
209
210
|
color={theme.colors.textNormal}
|
|
@@ -280,7 +281,7 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
|
|
|
280
281
|
name='close'
|
|
281
282
|
color={theme.colors.textThird}
|
|
282
283
|
size={24}
|
|
283
|
-
style={{ marginLeft: -4}}
|
|
284
|
+
style={{ marginLeft: -4 }}
|
|
284
285
|
/>
|
|
285
286
|
</TouchableOpacity>
|
|
286
287
|
<BusinessInfoWrapper>
|
|
@@ -294,8 +295,8 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
|
|
|
294
295
|
<FastImage
|
|
295
296
|
style={{ width: 59, height: 59 }}
|
|
296
297
|
source={{
|
|
297
|
-
|
|
298
|
-
|
|
298
|
+
uri: optimizeImage(business?.logo, 'h_60,c_limit'),
|
|
299
|
+
priority: FastImage.priority.normal,
|
|
299
300
|
}}
|
|
300
301
|
resizeMode={FastImage.resizeMode.cover}
|
|
301
302
|
/>
|
|
@@ -372,7 +373,7 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
|
|
|
372
373
|
setMenu={setMenu}
|
|
373
374
|
menu={menu}
|
|
374
375
|
/>
|
|
375
|
-
</MenuWrapper>
|
|
376
|
+
</MenuWrapper>
|
|
376
377
|
)}
|
|
377
378
|
<OrderTimeWrapper>
|
|
378
379
|
<OText
|
|
@@ -393,14 +394,15 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
|
|
|
393
394
|
calendarHeaderStyle={styles.calendarHeader}
|
|
394
395
|
dateNumberStyle={styles.dateNumber}
|
|
395
396
|
dateNameStyle={styles.dateName}
|
|
396
|
-
iconContainer={{flex: 0.1}}
|
|
397
|
+
iconContainer={{ flex: 0.1 }}
|
|
397
398
|
highlightDateNameStyle={styles.highlightDateName}
|
|
398
399
|
highlightDateNumberStyle={styles.highlightDateNumber}
|
|
400
|
+
dayContainerStyle={{ height: '100%' }}
|
|
401
|
+
highlightDateContainerStyle={{ height: '100%' }}
|
|
399
402
|
calendarHeaderFormat='MMMM, YYYY'
|
|
400
|
-
iconStyle={{borderWidth: 1}}
|
|
403
|
+
iconStyle={{ borderWidth: 1 }}
|
|
401
404
|
selectedDate={selectDate}
|
|
402
405
|
datesWhitelist={datesWhitelist}
|
|
403
|
-
dayContainerStyle={{height: 40}}
|
|
404
406
|
disabledDateNameStyle={styles.disabledDateName}
|
|
405
407
|
disabledDateNumberStyle={styles.disabledDateNumber}
|
|
406
408
|
disabledDateOpacity={0.6}
|
|
@@ -417,7 +419,7 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
|
|
|
417
419
|
<TimeItem active={timeSelected === time.value}>
|
|
418
420
|
<OText
|
|
419
421
|
size={14}
|
|
420
|
-
color={timeSelected === time.value ? theme.colors.primary: theme.colors.textNormal}
|
|
422
|
+
color={timeSelected === time.value ? theme.colors.primary : theme.colors.textNormal}
|
|
421
423
|
style={{
|
|
422
424
|
lineHeight: 24
|
|
423
425
|
}}
|
|
@@ -426,15 +428,15 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
|
|
|
426
428
|
</TouchableOpacity>
|
|
427
429
|
))}
|
|
428
430
|
{timeList.length % 3 === 2 && (
|
|
429
|
-
<TimeItem style={{backgroundColor: 'transparent'}}/>
|
|
431
|
+
<TimeItem style={{ backgroundColor: 'transparent' }} />
|
|
430
432
|
)}
|
|
431
433
|
</TimeContentWrapper>
|
|
432
434
|
</TimeListWrapper>
|
|
433
435
|
</OrderTimeWrapper>
|
|
434
436
|
<OButton
|
|
435
437
|
text={t('GO_TO_MENU', 'Go to menu')}
|
|
436
|
-
textStyle={{color: 'white'}}
|
|
437
|
-
style={{borderRadius: 7.6, marginBottom: 20, marginTop: 30}}
|
|
438
|
+
textStyle={{ color: 'white' }}
|
|
439
|
+
style={{ borderRadius: 7.6, marginBottom: 20, marginTop: 30 }}
|
|
438
440
|
onClick={() => handleClickBusiness()}
|
|
439
441
|
/>
|
|
440
442
|
</PreOrderContainer>
|