ordering-ui-react-native 0.22.3 → 0.22.5

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": "ordering-ui-react-native",
3
- "version": "0.22.03",
3
+ "version": "0.22.05",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -152,7 +152,7 @@ export const StripeMethodForm = (props: StripeMethodFormParams) => {
152
152
 
153
153
  const { error, paymentMethod } = await presentApplePay({
154
154
  cartItems: [{
155
- label: t('CART', 'Cart'),
155
+ label: t('CART_APPLE_PAY_LABEL', 'Cart'),
156
156
  amount: cartTotal?.toString?.() ?? cart?.balance?.toString() ?? cart?.total?.toString?.(),
157
157
  paymentType: 'Immediate'
158
158
  }],
@@ -344,10 +344,11 @@ const PaymentOptionsUI = (props: any) => {
344
344
  setAddCardOpen={setAddCardOpen}
345
345
  addCardOpen={addCardOpen}
346
346
  isOpenMethod={isOpenMethod}
347
- handlePaymethodDataChange={handlePaymethodDataChange}
347
+ handleSource={handlePaymethodDataChange}
348
348
  clientSecret={props.clientSecret}
349
349
  businessId={props.businessId}
350
350
  onPaymentChange={onPaymentChange}
351
+ paySelected={props.paySelected}
351
352
  />
352
353
  </View>
353
354
  )}
@@ -368,7 +369,7 @@ const PaymentOptionsUI = (props: any) => {
368
369
  methodPaySupported={methodPaySupported}
369
370
  placeByMethodPay={placeByMethodPay}
370
371
  setPlaceByMethodPay={setPlaceByMethodPay}
371
- publicKeyAddCard={isOpenMethod?.paymethod?.credentials?.stripe?.publishable}
372
+ publicKeyAddCard={isOpenMethod?.paymethod?.credentials?.stripe?.publishable || isOpenMethod?.paymethod?.credentials?.publishable}
372
373
  />
373
374
  )}
374
375
 
@@ -413,7 +414,8 @@ const PaymentOptionsUI = (props: any) => {
413
414
  merchantId={merchantId}
414
415
  urlscheme={urlscheme}
415
416
  androidAppId={androidAppId}
416
- publicKeyAddCard={isOpenMethod?.paymethod?.credentials?.stripe?.publishable}
417
+ publicKeyAddCard={isOpenMethod?.paymethod?.credentials?.stripe?.publishable || isOpenMethod?.paymethod?.credentials?.publishable}
418
+ paySelected={props.paySelected}
417
419
  />
418
420
  </KeyboardAvoidingView>
419
421
  </OModal>
@@ -438,7 +440,8 @@ const PaymentOptionsUI = (props: any) => {
438
440
  onNavigationRedirect={onNavigationRedirect}
439
441
  onCancel={() => handlePaymethodClick(null)}
440
442
  publicKey={isOpenMethod?.paymethod?.credentials.publishable}
441
- publicKeyAddCard={isOpenMethod?.paymethod?.credentials?.stripe?.publishable}
443
+ publicKeyAddCard={isOpenMethod?.paymethod?.credentials?.stripe?.publishable || isOpenMethod?.paymethod?.credentials?.publishable}
444
+ paySelected={props.paySelected}
442
445
  />
443
446
  </View>
444
447
  )}
@@ -463,7 +466,7 @@ const PaymentOptionsUI = (props: any) => {
463
466
  accountId={isOpenMethod?.paymethod?.credentials?.user}
464
467
  onSelectCard={handlePaymethodDataChange}
465
468
  onCancel={() => setAddCardOpen({ ...addCardOpen, stripeConnect: false })}
466
- publicKeyAddCard={isOpenMethod?.paymethod?.credentials?.stripe?.publishable}
469
+ publicKeyAddCard={isOpenMethod?.paymethod?.credentials?.stripe?.publishable || isOpenMethod?.paymethod?.credentials?.publishable}
467
470
  />
468
471
  </KeyboardAvoidingView>
469
472
  </OModal>
@@ -489,9 +492,10 @@ const PaymentOptionsUI = (props: any) => {
489
492
  publicKey={props.publicKey || isOpenMethod?.paymethod?.credentials?.publishable}
490
493
  setCardsList={setCardList}
491
494
  requirements={props.clientSecret}
495
+ handleSource={handlePaymethodDataChange}
492
496
  onSelectCard={handlePaymethodDataChange}
493
497
  onCancel={() => setAddCardOpen({ ...addCardOpen, stripe: false })}
494
- publicKeyAddCard={isOpenMethod?.paymethod?.credentials?.stripe?.publishable}
498
+ publicKeyAddCard={isOpenMethod?.paymethod?.credentials?.stripe?.publishable || isOpenMethod?.paymethod?.credentials?.publishable}
495
499
  />
496
500
  </KeyboardAvoidingView>
497
501
  </OModal>
@@ -280,7 +280,7 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
280
280
  )}
281
281
  </Accordion>
282
282
 
283
- <View style={{ display: isActive ? 'flex' : 'none', paddingStart: 40 }}>
283
+ <View style={{ display: isActive ? 'flex' : 'none', paddingStart: isFromCheckout ? 100 : 40, marginTop: isFromCheckout ? -80 : -30 }}>
284
284
  <Animated.View>
285
285
  <AccordionContent>
286
286
  {productInfo().ingredients.length > 0 && productInfo().ingredients.some((ingredient: any) => !ingredient.selected) && (
@@ -54,4 +54,6 @@ export const ProductSubOption = styled.View`
54
54
  margin-left: 0px;
55
55
  `
56
56
 
57
- export const ProductComment = styled.View``
57
+ export const ProductComment = styled.View`
58
+ margin-left: 20px;
59
+ `
@@ -31,6 +31,7 @@ export const StripeCardsListUI = (props: any) => {
31
31
  handleCardClick,
32
32
  onOpen,
33
33
  gateway,
34
+ paySelected
34
35
  } = props;
35
36
 
36
37
  const theme = useTheme();
@@ -93,10 +94,9 @@ export const StripeCardsListUI = (props: any) => {
93
94
  >
94
95
  {cardsList.cards.map((card: any) => (
95
96
  <OSItem key={card.id} isUnique={cardsList.cards.length} isInvalid={!card?.zipcode && validateZipcodeCard}>
96
- {console.log(card?.zipcode && validateZipcodeCard)}
97
97
  <OSItemContent onPress={() => handleCardSelected(card)}>
98
98
  <View style={styles.viewStyle}>
99
- {card.id === cardSelected?.id ? (
99
+ {(card.id === cardSelected?.id || card.id === paySelected?.data?.id) ? (
100
100
  <OIcon
101
101
  src={theme.images.general.radio_act}
102
102
  width={16}