ordering-ui-react-native 0.17.17-release → 0.17.18-release

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.17.17-release",
3
+ "version": "0.17.18-release",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -273,7 +273,7 @@ export const transformCountryCode = (countryCode: number) => {
273
273
  }
274
274
 
275
275
  export const findExitingCode = (countryCode: string) => {
276
- const code = CODES.find((code: any) => code.countryCode === countryCode)
276
+ const code = CODES.find((code: any) => code.countryCode === (countryCode || '').toUpperCase())
277
277
  return code?.countryCode
278
278
  }
279
279
 
@@ -384,7 +384,7 @@ export const getOrderStatus = (s: string) => {
384
384
  key: 0,
385
385
  value: t('PENDING', 'Pending'),
386
386
  slug: 'PENDING',
387
- percentage: 0.25,
387
+ percentage: 0.1,
388
388
  image: theme.images.order.status0,
389
389
  },
390
390
  {
@@ -412,7 +412,7 @@ export const getOrderStatus = (s: string) => {
412
412
  key: 4,
413
413
  value: t('PREPARATION_COMPLETED', 'Preparation Completed'),
414
414
  slug: 'PREPARATION_COMPLETED',
415
- percentage: 0.7,
415
+ percentage: 0.2,
416
416
  image: theme.images.order.status4,
417
417
  },
418
418
  {
@@ -433,21 +433,21 @@ export const getOrderStatus = (s: string) => {
433
433
  key: 7,
434
434
  value: t('ACCEPTED_BY_BUSINESS', 'Accepted by business'),
435
435
  slug: 'ACCEPTED_BY_BUSINESS',
436
- percentage: 0.35,
436
+ percentage: 0.15,
437
437
  image: theme.images.order.status7,
438
438
  },
439
439
  {
440
440
  key: 8,
441
441
  value: t('ACCEPTED_BY_DRIVER', 'Accepted by driver'),
442
442
  slug: 'ACCEPTED_BY_DRIVER',
443
- percentage: 0.45,
443
+ percentage: 0.4,
444
444
  image: theme.images.order.status8,
445
445
  },
446
446
  {
447
447
  key: 9,
448
448
  value: t('PICK_UP_COMPLETED_BY_DRIVER', 'Pick up completed by driver'),
449
449
  slug: 'PICK_UP_COMPLETED_BY_DRIVER',
450
- percentage: 0.8,
450
+ percentage: 0.7,
451
451
  image: theme.images.order.status9,
452
452
  },
453
453
  {
@@ -485,7 +485,7 @@ export const getOrderStatus = (s: string) => {
485
485
  key: 14,
486
486
  value: t('ORDER_NOT_READY', 'Order not ready'),
487
487
  slug: 'ORDER_NOT_READY',
488
- percentage: 0,
488
+ percentage: 0.15,
489
489
  image: theme.images.order.status13,
490
490
  },
491
491
  {
@@ -495,7 +495,7 @@ export const getOrderStatus = (s: string) => {
495
495
  'Order picked up completed by customer',
496
496
  ),
497
497
  slug: 'ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER',
498
- percentage: 100,
498
+ percentage: 1,
499
499
  image: theme.images.order.status1,
500
500
  },
501
501
  {
@@ -522,7 +522,7 @@ export const getOrderStatus = (s: string) => {
522
522
  'Driver almost arrived to business',
523
523
  ),
524
524
  slug: 'DRIVER_ALMOST_ARRIVED_TO_BUSINESS',
525
- percentage: 0.15,
525
+ percentage: 0.5,
526
526
  image: theme.images.order.status3,
527
527
  },
528
528
  {
@@ -542,7 +542,7 @@ export const getOrderStatus = (s: string) => {
542
542
  'Customer almost arrived to business',
543
543
  ),
544
544
  slug: 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS',
545
- percentage: 90,
545
+ percentage: 0.9,
546
546
  image: theme.images.order.status7,
547
547
  },
548
548
  {
@@ -552,21 +552,21 @@ export const getOrderStatus = (s: string) => {
552
552
  'Customer arrived to business',
553
553
  ),
554
554
  slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS',
555
- percentage: 95,
555
+ percentage: 0.9,
556
556
  image: theme.images.order.status7,
557
557
  },
558
558
  {
559
559
  key: 22,
560
560
  value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver'),
561
561
  slug: 'ORDER_LOOKING_FOR_DRIVER',
562
- percentage: 35,
562
+ percentage: 0.3,
563
563
  image: theme.images.order.status8
564
564
  },
565
565
  {
566
566
  key: 23,
567
567
  value: t('ORDER_DRIVER_ON_WAY', 'Driver on way'),
568
568
  slug: 'ORDER_DRIVER_ON_WAY',
569
- percentage: 45,
569
+ percentage: 0.8,
570
570
  image: theme.images.order.status8
571
571
  }
572
572
  ];
@@ -614,7 +614,7 @@ export const lightenDarkenColor = (color: any) => {
614
614
  }
615
615
  }
616
616
 
617
- export const vibrateApp = (impact ?: string) => {
617
+ export const vibrateApp = (impact?: string) => {
618
618
  const options = {
619
619
  enableVibrateFallback: true,
620
620
  ignoreAndroidSystemSettings: false