ordering-ui-external 1.0.1 → 1.1.0

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 (368) hide show
  1. package/_bundles/{0.ordering-ui.f64ae9230411e0edb7d6.js → 0.ordering-ui.f3d1068d8ea119f4e4f2.js} +1 -1
  2. package/_bundles/{1.ordering-ui.f64ae9230411e0edb7d6.js → 1.ordering-ui.f3d1068d8ea119f4e4f2.js} +1 -1
  3. package/_bundles/{3.ordering-ui.f64ae9230411e0edb7d6.js → 3.ordering-ui.f3d1068d8ea119f4e4f2.js} +1 -1
  4. package/_bundles/{4.ordering-ui.f64ae9230411e0edb7d6.js → 4.ordering-ui.f3d1068d8ea119f4e4f2.js} +1 -1
  5. package/_bundles/{5.ordering-ui.f64ae9230411e0edb7d6.js → 5.ordering-ui.f3d1068d8ea119f4e4f2.js} +1 -1
  6. package/_bundles/{6.ordering-ui.f64ae9230411e0edb7d6.js → 6.ordering-ui.f3d1068d8ea119f4e4f2.js} +1 -1
  7. package/_bundles/{7.ordering-ui.f64ae9230411e0edb7d6.js → 7.ordering-ui.f3d1068d8ea119f4e4f2.js} +2 -2
  8. package/_bundles/{7.ordering-ui.f64ae9230411e0edb7d6.js.LICENSE.txt → 7.ordering-ui.f3d1068d8ea119f4e4f2.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.f64ae9230411e0edb7d6.js → 8.ordering-ui.f3d1068d8ea119f4e4f2.js} +1 -1
  10. package/_bundles/{9.ordering-ui.f64ae9230411e0edb7d6.js → 9.ordering-ui.f3d1068d8ea119f4e4f2.js} +1 -1
  11. package/_bundles/ordering-ui.f3d1068d8ea119f4e4f2.js +2 -0
  12. package/_bundles/{ordering-ui.f64ae9230411e0edb7d6.js.LICENSE.txt → ordering-ui.f3d1068d8ea119f4e4f2.js.LICENSE.txt} +0 -0
  13. package/_modules/components/BusinessBasicInformation/index.js +17 -7
  14. package/_modules/components/BusinessProductsList/index.js +9 -9
  15. package/_modules/components/BusinessProductsList/layouts/groceries/index.js +9 -9
  16. package/_modules/components/Checkout/index.js +2 -1
  17. package/_modules/components/ForgotPasswordForm/index.js +4 -1
  18. package/_modules/components/LoginForm/index.js +4 -1
  19. package/_modules/components/OrderDetails/index.js +30 -13
  20. package/_modules/components/PaymentOptionSquare/index.js +6 -4
  21. package/_modules/components/PaymentOptionSquare/styles.js +13 -6
  22. package/_modules/components/PaymentOptions/index.js +6 -3
  23. package/_modules/components/ProductItemAccordion/index.js +7 -2
  24. package/_modules/components/RenderProductsLayout/SearchProducts/index.js +6 -2
  25. package/_modules/components/RenderProductsLayout/index.js +24 -34
  26. package/_modules/components/SignUpForm/index.js +4 -1
  27. package/_modules/components/SingleProductCard/index.js +2 -2
  28. package/_modules/components/TaxInformation/index.js +3 -5
  29. package/_modules/components/UserFormDetails/index.js +23 -7
  30. package/_modules/components/UserProfileForm/ProfileOptions/index.js +19 -1
  31. package/_modules/components/UserProfileForm/index.js +28 -6
  32. package/_modules/components/UserProfileForm/styles.js +1 -1
  33. package/_modules/hooks/useCountdownTimer.js +1 -1
  34. package/_modules/themes/callcenterOriginal/src/components/BusinessProductsList/layouts/groceries/styles.js +1 -1
  35. package/_modules/themes/callcenterOriginal/src/components/BusinessProductsList/styles.js +1 -1
  36. package/_modules/themes/callcenterOriginal/src/components/ForgotPasswordForm/index.js +4 -1
  37. package/_modules/themes/callcenterOriginal/src/components/LoginForm/index.js +4 -1
  38. package/_modules/themes/callcenterOriginal/src/components/SignUpBusiness/index.js +4 -1
  39. package/_modules/themes/callcenterOriginal/src/components/SignUpForm/index.js +4 -1
  40. package/_modules/themes/callcenterOriginal/src/components/UserFormDetails/index.js +4 -1
  41. package/_modules/themes/eight/src/components/BusinessProductsList/index.js +9 -9
  42. package/_modules/themes/eight/src/components/LoginForm/index.js +4 -1
  43. package/_modules/themes/eight/src/components/SignUpForm/index.js +4 -1
  44. package/_modules/themes/eight/src/components/SingleProductCard/index.js +2 -2
  45. package/_modules/themes/five/index.js +50 -2
  46. package/_modules/themes/five/src/components/AddressDetails/index.js +2 -20
  47. package/_modules/themes/five/src/components/AddressForm/index.js +18 -6
  48. package/_modules/themes/five/src/components/AddressForm/styles.js +1 -1
  49. package/_modules/themes/five/src/components/AddressList/index.js +24 -11
  50. package/_modules/themes/five/src/components/AddressList/styles.js +11 -7
  51. package/_modules/themes/five/src/components/BusinessInformation/index.js +11 -4
  52. package/_modules/themes/five/src/components/BusinessItemAccordion/index.js +19 -4
  53. package/_modules/themes/five/src/components/BusinessItemAccordion/styles.js +30 -4
  54. package/_modules/themes/five/src/components/BusinessListingSearch/index.js +64 -3
  55. package/_modules/themes/five/src/components/BusinessPreorder/index.js +5 -3
  56. package/_modules/themes/five/src/components/BusinessPreorder/styles.js +1 -1
  57. package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +87 -54
  58. package/_modules/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
  59. package/_modules/themes/five/src/components/BusinessProductsList/layouts/groceries/index.js +2 -1
  60. package/_modules/themes/five/src/components/BusinessProductsList/layouts/groceries/styles.js +13 -10
  61. package/_modules/themes/five/src/components/BusinessProductsList/styles.js +3 -3
  62. package/_modules/themes/five/src/components/BusinessReviews/index.js +24 -30
  63. package/_modules/themes/five/src/components/BusinessesListing/index.js +22 -5
  64. package/_modules/themes/five/src/components/BusinessesListing/layouts/AppointmentsBusinessListing/index.js +23 -5
  65. package/_modules/themes/five/src/components/BusinessesListing/layouts/AppointmentsBusinessListing/styles.js +3 -3
  66. package/_modules/themes/five/src/components/Cart/index.js +28 -9
  67. package/_modules/themes/five/src/components/Cart/styles.js +4 -4
  68. package/_modules/themes/five/src/components/CartContent/index.js +11 -24
  69. package/_modules/themes/five/src/components/CartPopover/index.js +44 -4
  70. package/_modules/themes/five/src/components/CartPopover/styles.js +13 -3
  71. package/_modules/themes/five/src/components/Checkout/index.js +81 -30
  72. package/_modules/themes/five/src/components/Header/index.js +1 -5
  73. package/_modules/themes/five/src/components/HomeHero/layouts/KioskHomeHero/index.js +2 -1
  74. package/_modules/themes/five/src/components/HomeHero/layouts/KioskHomeHero/styles.js +1 -1
  75. package/_modules/themes/five/src/components/HorizontalOrdersLayout/index.js +4 -6
  76. package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +5 -5
  77. package/_modules/themes/five/src/components/LoginForm/styles.js +29 -29
  78. package/_modules/themes/five/src/components/Modal/index.js +5 -0
  79. package/_modules/themes/five/src/components/Modal/styles.js +20 -15
  80. package/_modules/themes/five/src/components/MomentControl/Layouts/CustomLayout/styles.js +4 -4
  81. package/_modules/themes/five/src/components/NotNetworkConnectivity/index.js +70 -5
  82. package/_modules/themes/five/src/components/OrderDetails/ActionsSection.js +5 -3
  83. package/_modules/themes/five/src/components/OrderDetails/OrderBillSection.js +3 -1
  84. package/_modules/themes/five/src/components/OrderDetails/index.js +121 -39
  85. package/_modules/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +8 -4
  86. package/_modules/themes/five/src/components/OrderDetails/styles.js +26 -18
  87. package/_modules/themes/five/src/components/OrderProgress/index.js +1 -0
  88. package/_modules/themes/five/src/components/OrdersOption/index.js +6 -0
  89. package/_modules/themes/five/src/components/OrdersOption/styles.js +13 -13
  90. package/_modules/themes/five/src/components/PaymentOptionWallet/index.js +6 -2
  91. package/_modules/themes/five/src/components/PaymentOptions/index.js +25 -3
  92. package/_modules/themes/five/src/components/PhoneAutocomplete/index.js +1 -1
  93. package/_modules/themes/five/src/components/ProductForm/index.js +108 -43
  94. package/_modules/themes/five/src/components/ProductForm/styles.js +19 -21
  95. package/_modules/themes/five/src/components/ProductItemAccordion/index.js +11 -3
  96. package/_modules/themes/five/src/components/ProductOption/index.js +3 -1
  97. package/_modules/themes/five/src/components/ProductOption/styles.js +1 -1
  98. package/_modules/themes/five/src/components/ProfessionalProfile/styles.js +1 -1
  99. package/_modules/themes/five/src/components/ReviewDriver/index.js +330 -0
  100. package/_modules/themes/five/src/components/ReviewDriver/styles.js +137 -0
  101. package/_modules/themes/five/src/components/ReviewOrder/index.js +342 -0
  102. package/_modules/themes/five/src/components/ReviewOrder/styles.js +141 -0
  103. package/_modules/themes/five/src/components/ReviewProduct/index.js +329 -0
  104. package/_modules/themes/five/src/components/ReviewProduct/styles.js +111 -0
  105. package/_modules/themes/five/src/components/ReviewTrigger/index.js +130 -0
  106. package/_modules/themes/five/src/components/ReviewTrigger/styles.js +84 -0
  107. package/_modules/themes/five/src/components/SearchBar/index.js +4 -1
  108. package/_modules/themes/five/src/components/SearchProducts/index.js +1 -0
  109. package/_modules/themes/five/src/components/ServiceForm/index.js +93 -26
  110. package/_modules/themes/five/src/components/ServiceForm/styles.js +38 -14
  111. package/_modules/themes/five/src/components/SignUpBusiness/index.js +4 -1
  112. package/_modules/themes/five/src/components/SignUpDriver/index.js +4 -1
  113. package/_modules/themes/five/src/components/SignUpForm/styles.js +12 -12
  114. package/_modules/themes/five/src/components/SingleOrderCard/index.js +216 -26
  115. package/_modules/themes/five/src/components/SingleOrderCard/styles.js +7 -3
  116. package/_modules/themes/five/src/components/TaxInformation/index.js +3 -5
  117. package/_modules/themes/five/src/components/UserDetails/index.js +132 -9
  118. package/_modules/themes/five/src/components/UserDetails/styles.js +3 -3
  119. package/_modules/themes/five/src/components/UserFormDetails/index.js +69 -20
  120. package/_modules/themes/five/src/components/UserPopover/index.js +13 -7
  121. package/_modules/themes/five/src/components/UserProfileForm/ProfileOptions/index.js +19 -1
  122. package/_modules/themes/five/src/components/UserProfileForm/index.js +119 -23
  123. package/_modules/themes/five/src/components/VerifyCodeForm/index.js +86 -0
  124. package/_modules/themes/five/src/components/VerifyCodeForm/styles.js +32 -0
  125. package/_modules/themes/four/src/components/AccordionDropdown/index.js +46 -0
  126. package/_modules/themes/four/src/components/AccordionDropdown/styles.js +31 -0
  127. package/_modules/themes/four/src/components/BusinessBasicInformation/index.js +2 -5
  128. package/_modules/themes/four/src/components/BusinessProductsCategories/index.js +2 -1
  129. package/_modules/themes/four/src/components/BusinessProductsCategories/layouts/groceries/index.js +128 -0
  130. package/_modules/themes/four/src/components/BusinessProductsCategories/layouts/groceries/styles.js +43 -0
  131. package/_modules/themes/four/src/components/BusinessProductsList/layouts/groceries/index.js +235 -0
  132. package/_modules/themes/four/src/components/BusinessProductsList/layouts/groceries/styles.js +52 -0
  133. package/_modules/themes/four/src/components/BusinessProductsListing/index.js +131 -108
  134. package/_modules/themes/four/src/components/BusinessProductsListing/styles.js +8 -33
  135. package/_modules/themes/four/src/components/ForgotPasswordForm/index.js +4 -1
  136. package/_modules/themes/four/src/components/LoginForm/index.js +4 -1
  137. package/_modules/themes/four/src/components/NotFoundSource/index.js +63 -0
  138. package/_modules/themes/four/src/components/NotFoundSource/styles.js +22 -0
  139. package/_modules/themes/four/src/components/RenderProductsLayout/index.js +301 -0
  140. package/_modules/themes/four/src/components/RenderProductsLayout/styles.js +68 -0
  141. package/_modules/themes/four/src/components/SignUpForm/index.js +4 -1
  142. package/_modules/themes/four/src/components/SingleProductCard/index.js +15 -5
  143. package/_modules/themes/four/src/components/UserFormDetails/index.js +4 -1
  144. package/_modules/themes/franchise/src/components/ForgotPasswordForm/index.js +4 -1
  145. package/_modules/themes/franchise/src/components/LoginForm/index.js +4 -1
  146. package/_modules/themes/franchise/src/components/SignUpForm/index.js +4 -1
  147. package/_modules/themes/franchise/src/components/UserFormDetails/index.js +4 -1
  148. package/_modules/themes/orderAndPay/src/components/ForgotPasswordForm/index.js +4 -1
  149. package/_modules/themes/orderAndPay/src/components/LoginForm/index.js +4 -1
  150. package/_modules/themes/orderAndPay/src/components/SignUpForm/index.js +4 -1
  151. package/_modules/themes/orderAndPay/src/components/UserFormDetails/index.js +4 -1
  152. package/_modules/themes/pwa/src/components/ForgotPasswordForm/index.js +4 -1
  153. package/_modules/themes/pwa/src/components/LoginForm/index.js +4 -1
  154. package/_modules/themes/pwa/src/components/SignUpForm/index.js +4 -1
  155. package/_modules/themes/pwa/src/components/UserFormDetails/index.js +4 -1
  156. package/_modules/themes/seven/index.js +4 -4
  157. package/_modules/themes/seven/src/components/ForgotPasswordForm/index.js +4 -1
  158. package/_modules/themes/seven/src/components/LoginForm/index.js +4 -1
  159. package/_modules/themes/seven/src/components/SignUpForm/index.js +4 -1
  160. package/_modules/themes/seven/src/components/SignUpForm/styles.js +1 -1
  161. package/_modules/themes/seven/src/components/UserFormDetails/index.js +4 -1
  162. package/_modules/themes/six/index.js +3 -3
  163. package/_modules/themes/six/src/components/AddressForm/index.js +3 -3
  164. package/_modules/themes/six/src/components/BusinessBasicInformation/index.js +16 -7
  165. package/_modules/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +6 -2
  166. package/_modules/themes/six/src/components/BusinessProductsListing/index.js +21 -27
  167. package/_modules/themes/six/src/components/DriverTips/index.js +2 -2
  168. package/_modules/themes/six/src/components/ForgotPasswordForm/index.js +4 -1
  169. package/_modules/themes/six/src/components/LoginForm/index.js +7 -4
  170. package/_modules/themes/six/src/components/PaymentOptionCash/index.js +2 -2
  171. package/_modules/themes/six/src/components/ProductForm/index.js +2 -2
  172. package/_modules/themes/six/src/components/SearchBar/index.js +2 -2
  173. package/_modules/themes/six/src/components/SignUpForm/index.js +8 -5
  174. package/_modules/themes/six/src/components/UserFormDetails/index.js +8 -5
  175. package/_modules/themes/three/src/components/ForgotPasswordForm/index.js +4 -1
  176. package/_modules/themes/three/src/components/LoginForm/index.js +4 -1
  177. package/_modules/themes/three/src/components/SignUpForm/index.js +4 -1
  178. package/_modules/themes/two/src/components/ForgotPasswordForm/index.js +4 -1
  179. package/_modules/themes/two/src/components/LoginForm/index.js +4 -1
  180. package/_modules/themes/two/src/components/SignUpForm/index.js +4 -1
  181. package/package.json +3 -3
  182. package/src/components/BusinessBasicInformation/index.js +64 -41
  183. package/src/components/BusinessProductsList/index.js +3 -3
  184. package/src/components/BusinessProductsList/layouts/groceries/index.js +3 -3
  185. package/src/components/Checkout/index.js +1 -0
  186. package/src/components/ForgotPasswordForm/index.js +3 -1
  187. package/src/components/Header/index.js +1 -1
  188. package/src/components/LoginForm/index.js +30 -28
  189. package/src/components/OrderDetails/index.js +101 -58
  190. package/src/components/PaymentOptionSquare/index.js +4 -8
  191. package/src/components/PaymentOptionSquare/styles.js +4 -1
  192. package/src/components/PaymentOptions/index.js +3 -0
  193. package/src/components/ProductItemAccordion/index.js +5 -3
  194. package/src/components/RenderProductsLayout/SearchProducts/index.js +3 -2
  195. package/src/components/RenderProductsLayout/index.js +13 -25
  196. package/src/components/SignUpForm/index.js +4 -2
  197. package/src/components/SingleProductCard/index.js +3 -3
  198. package/src/components/TaxInformation/index.js +1 -1
  199. package/src/components/UserFormDetails/index.js +35 -26
  200. package/src/components/UserProfileForm/ProfileOptions/index.js +12 -1
  201. package/src/components/UserProfileForm/index.js +70 -41
  202. package/src/components/UserProfileForm/styles.js +3 -1
  203. package/src/hooks/useCountdownTimer.js +9 -9
  204. package/src/themes/callcenterOriginal/src/components/BusinessProductsList/layouts/groceries/styles.js +1 -0
  205. package/src/themes/callcenterOriginal/src/components/BusinessProductsList/styles.js +4 -0
  206. package/src/themes/callcenterOriginal/src/components/ForgotPasswordForm/index.js +3 -1
  207. package/src/themes/callcenterOriginal/src/components/LoginForm/index.js +3 -1
  208. package/src/themes/callcenterOriginal/src/components/SignUpBusiness/index.js +3 -1
  209. package/src/themes/callcenterOriginal/src/components/SignUpForm/index.js +3 -1
  210. package/src/themes/callcenterOriginal/src/components/UserFormDetails/index.js +21 -19
  211. package/src/themes/eight/src/components/BusinessProductsList/index.js +3 -3
  212. package/src/themes/eight/src/components/LoginForm/index.js +34 -32
  213. package/src/themes/eight/src/components/SignUpForm/index.js +4 -2
  214. package/src/themes/eight/src/components/SingleProductCard/index.js +3 -3
  215. package/src/themes/five/index.js +15 -2
  216. package/src/themes/five/src/components/AddressDetails/index.js +0 -10
  217. package/src/themes/five/src/components/AddressForm/index.js +58 -45
  218. package/src/themes/five/src/components/AddressForm/styles.js +1 -1
  219. package/src/themes/five/src/components/AddressList/index.js +52 -28
  220. package/src/themes/five/src/components/AddressList/styles.js +9 -2
  221. package/src/themes/five/src/components/BusinessInformation/index.js +52 -37
  222. package/src/themes/five/src/components/BusinessItemAccordion/index.js +36 -3
  223. package/src/themes/five/src/components/BusinessItemAccordion/styles.js +46 -0
  224. package/src/themes/five/src/components/BusinessListingSearch/index.js +39 -1
  225. package/src/themes/five/src/components/BusinessPreorder/index.js +8 -4
  226. package/src/themes/five/src/components/BusinessPreorder/styles.js +1 -0
  227. package/src/themes/five/src/components/BusinessProductsCategories/index.js +89 -58
  228. package/src/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
  229. package/src/themes/five/src/components/BusinessProductsList/layouts/groceries/index.js +1 -1
  230. package/src/themes/five/src/components/BusinessProductsList/layouts/groceries/styles.js +7 -1
  231. package/src/themes/five/src/components/BusinessProductsList/styles.js +8 -3
  232. package/src/themes/five/src/components/BusinessReviews/index.js +84 -56
  233. package/src/themes/five/src/components/BusinessesListing/index.js +8 -7
  234. package/src/themes/five/src/components/BusinessesListing/layouts/AppointmentsBusinessListing/index.js +9 -3
  235. package/src/themes/five/src/components/BusinessesListing/layouts/AppointmentsBusinessListing/styles.js +8 -2
  236. package/src/themes/five/src/components/Cart/index.js +15 -4
  237. package/src/themes/five/src/components/Cart/styles.js +6 -0
  238. package/src/themes/five/src/components/CartContent/index.js +10 -23
  239. package/src/themes/five/src/components/CartPopover/index.js +50 -12
  240. package/src/themes/five/src/components/CartPopover/styles.js +27 -0
  241. package/src/themes/five/src/components/Checkout/index.js +38 -3
  242. package/src/themes/five/src/components/Header/index.js +2 -3
  243. package/src/themes/five/src/components/HomeHero/layouts/KioskHomeHero/index.js +1 -1
  244. package/src/themes/five/src/components/HomeHero/layouts/KioskHomeHero/styles.js +1 -1
  245. package/src/themes/five/src/components/HorizontalOrdersLayout/index.js +2 -2
  246. package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +18 -0
  247. package/src/themes/five/src/components/LoginForm/styles.js +4 -1
  248. package/src/themes/five/src/components/Modal/index.js +5 -0
  249. package/src/themes/five/src/components/Modal/styles.js +36 -0
  250. package/src/themes/five/src/components/MomentControl/Layouts/CustomLayout/styles.js +22 -0
  251. package/src/themes/five/src/components/NotNetworkConnectivity/index.js +28 -2
  252. package/src/themes/five/src/components/OrderDetails/ActionsSection.js +14 -10
  253. package/src/themes/five/src/components/OrderDetails/OrderBillSection.js +1 -1
  254. package/src/themes/five/src/components/OrderDetails/index.js +102 -61
  255. package/src/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +6 -5
  256. package/src/themes/five/src/components/OrderDetails/styles.js +64 -1
  257. package/src/themes/five/src/components/OrderProgress/index.js +1 -0
  258. package/src/themes/five/src/components/OrdersOption/index.js +3 -2
  259. package/src/themes/five/src/components/OrdersOption/styles.js +25 -0
  260. package/src/themes/five/src/components/PaymentOptionWallet/index.js +41 -41
  261. package/src/themes/five/src/components/PaymentOptions/index.js +23 -2
  262. package/src/themes/five/src/components/PhoneAutocomplete/index.js +1 -1
  263. package/src/themes/five/src/components/ProductForm/index.js +147 -100
  264. package/src/themes/five/src/components/ProductForm/styles.js +68 -12
  265. package/src/themes/five/src/components/ProductItemAccordion/index.js +9 -5
  266. package/src/themes/five/src/components/ProductOption/index.js +1 -1
  267. package/src/themes/five/src/components/ProductOption/styles.js +5 -1
  268. package/src/themes/five/src/components/ProfessionalProfile/styles.js +1 -0
  269. package/src/themes/five/src/components/ReviewDriver/index.js +253 -0
  270. package/src/themes/five/src/components/ReviewDriver/styles.js +233 -0
  271. package/src/themes/five/src/components/ReviewOrder/index.js +241 -0
  272. package/src/themes/five/src/components/ReviewOrder/styles.js +253 -0
  273. package/src/themes/five/src/components/ReviewProduct/index.js +251 -0
  274. package/src/themes/five/src/components/ReviewProduct/styles.js +158 -0
  275. package/src/themes/five/src/components/ReviewTrigger/index.js +86 -0
  276. package/src/themes/five/src/components/ReviewTrigger/styles.js +121 -0
  277. package/src/themes/five/src/components/SearchBar/index.js +1 -0
  278. package/src/themes/five/src/components/SearchProducts/index.js +2 -0
  279. package/src/themes/five/src/components/ServiceForm/index.js +93 -22
  280. package/src/themes/five/src/components/ServiceForm/styles.js +43 -2
  281. package/src/themes/five/src/components/SignUpBusiness/index.js +5 -3
  282. package/src/themes/five/src/components/SignUpDriver/index.js +5 -3
  283. package/src/themes/five/src/components/SignUpForm/styles.js +33 -0
  284. package/src/themes/five/src/components/SingleOrderCard/index.js +118 -22
  285. package/src/themes/five/src/components/SingleOrderCard/styles.js +5 -0
  286. package/src/themes/five/src/components/TaxInformation/index.js +1 -1
  287. package/src/themes/five/src/components/UserDetails/index.js +122 -19
  288. package/src/themes/five/src/components/UserDetails/styles.js +7 -0
  289. package/src/themes/five/src/components/UserFormDetails/index.js +108 -63
  290. package/src/themes/five/src/components/UserPopover/index.js +6 -6
  291. package/src/themes/five/src/components/UserProfileForm/ProfileOptions/index.js +12 -1
  292. package/src/themes/five/src/components/UserProfileForm/index.js +130 -38
  293. package/src/themes/five/src/components/VerifyCodeForm/index.js +64 -0
  294. package/src/themes/five/src/components/VerifyCodeForm/styles.js +82 -0
  295. package/src/themes/four/src/components/AccordionDropdown/index.js +47 -0
  296. package/src/themes/four/src/components/AccordionDropdown/styles.js +25 -0
  297. package/src/themes/four/src/components/BusinessBasicInformation/index.js +16 -22
  298. package/src/themes/four/src/components/BusinessProductsCategories/index.js +1 -1
  299. package/src/themes/four/src/components/BusinessProductsCategories/layouts/groceries/index.js +125 -0
  300. package/src/themes/four/src/components/BusinessProductsCategories/layouts/groceries/styles.js +52 -0
  301. package/src/themes/four/src/components/BusinessProductsList/layouts/groceries/index.js +237 -0
  302. package/src/themes/four/src/components/BusinessProductsList/layouts/groceries/styles.js +62 -0
  303. package/src/themes/four/src/components/BusinessProductsListing/index.js +69 -113
  304. package/src/themes/four/src/components/BusinessProductsListing/styles.js +1 -71
  305. package/src/themes/four/src/components/ForgotPasswordForm/index.js +3 -1
  306. package/src/themes/four/src/components/LoginForm/index.js +48 -46
  307. package/src/themes/four/src/components/NotFoundSource/index.js +66 -0
  308. package/src/themes/four/src/components/NotFoundSource/styles.js +27 -0
  309. package/src/themes/four/src/components/RenderProductsLayout/index.js +306 -0
  310. package/src/themes/four/src/components/RenderProductsLayout/styles.js +177 -0
  311. package/src/themes/four/src/components/SignUpForm/index.js +4 -2
  312. package/src/themes/four/src/components/SingleProductCard/index.js +35 -23
  313. package/src/themes/four/src/components/UserFormDetails/index.js +21 -19
  314. package/src/themes/franchise/src/components/ForgotPasswordForm/index.js +3 -1
  315. package/src/themes/franchise/src/components/LoginForm/index.js +32 -30
  316. package/src/themes/franchise/src/components/SignUpForm/index.js +3 -1
  317. package/src/themes/franchise/src/components/UserFormDetails/index.js +21 -19
  318. package/src/themes/orderAndPay/src/components/ForgotPasswordForm/index.js +3 -1
  319. package/src/themes/orderAndPay/src/components/LoginForm/index.js +33 -31
  320. package/src/themes/orderAndPay/src/components/SignUpForm/index.js +11 -9
  321. package/src/themes/orderAndPay/src/components/UserFormDetails/index.js +21 -19
  322. package/src/themes/pwa/src/components/ForgotPasswordForm/index.js +3 -1
  323. package/src/themes/pwa/src/components/LoginForm/index.js +32 -30
  324. package/src/themes/pwa/src/components/SignUpForm/index.js +3 -1
  325. package/src/themes/pwa/src/components/UserFormDetails/index.js +3 -1
  326. package/src/themes/seven/index.js +4 -4
  327. package/src/themes/seven/src/components/CouponControl/index.js +0 -1
  328. package/src/themes/seven/src/components/ForgotPasswordForm/index.js +3 -1
  329. package/src/themes/seven/src/components/LoginForm/index.js +5 -3
  330. package/src/themes/seven/src/components/OrderDetails/index.js +1 -1
  331. package/src/themes/seven/src/components/SignUpForm/index.js +3 -1
  332. package/src/themes/seven/src/components/SignUpForm/styles.js +1 -0
  333. package/src/themes/seven/src/components/UserFormDetails/index.js +3 -1
  334. package/src/themes/six/index.js +3 -3
  335. package/src/themes/six/src/components/AddressForm/index.js +1 -1
  336. package/src/themes/six/src/components/BusinessBasicInformation/index.js +57 -34
  337. package/src/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +3 -2
  338. package/src/themes/six/src/components/BusinessProductsListing/index.js +7 -13
  339. package/src/themes/six/src/components/DriverTips/index.js +1 -1
  340. package/src/themes/six/src/components/ForgotPasswordForm/index.js +3 -1
  341. package/src/themes/six/src/components/LoginForm/index.js +33 -31
  342. package/src/themes/six/src/components/PaymentOptionCash/index.js +1 -1
  343. package/src/themes/six/src/components/ProductForm/index.js +1 -1
  344. package/src/themes/six/src/components/SearchBar/index.js +1 -1
  345. package/src/themes/six/src/components/SignUpForm/index.js +4 -2
  346. package/src/themes/six/src/components/UserFormDetails/index.js +22 -20
  347. package/src/themes/three/src/components/ForgotPasswordForm/index.js +3 -1
  348. package/src/themes/three/src/components/LoginForm/index.js +52 -50
  349. package/src/themes/three/src/components/SignUpForm/index.js +10 -8
  350. package/src/themes/two/src/components/ForgotPasswordForm/index.js +3 -1
  351. package/src/themes/two/src/components/LoginForm/index.js +42 -40
  352. package/src/themes/two/src/components/SignUpForm/index.js +10 -8
  353. package/template/components/ListenPageChanges/index.js +1 -1
  354. package/template/pages/Checkout/index.js +0 -1
  355. package/template/pages/Home/styles.js +0 -14
  356. package/_bundles/ordering-ui.f64ae9230411e0edb7d6.js +0 -2
  357. package/_modules/themes/five/src/components/FavoriteBusinesses/index.js +0 -268
  358. package/_modules/themes/five/src/components/FavoriteBusinesses/styles.js +0 -53
  359. package/_modules/themes/five/src/components/FavoriteOrders/index.js +0 -353
  360. package/_modules/themes/five/src/components/FavoriteOrders/styles.js +0 -53
  361. package/_modules/themes/five/src/components/FavoriteProducts/index.js +0 -190
  362. package/_modules/themes/five/src/components/FavoriteProducts/styles.js +0 -53
  363. package/src/themes/five/src/components/FavoriteBusinesses/index.js +0 -217
  364. package/src/themes/five/src/components/FavoriteBusinesses/styles.js +0 -85
  365. package/src/themes/five/src/components/FavoriteOrders/index.js +0 -225
  366. package/src/themes/five/src/components/FavoriteOrders/styles.js +0 -87
  367. package/src/themes/five/src/components/FavoriteProducts/index.js +0 -165
  368. package/src/themes/five/src/components/FavoriteProducts/styles.js +0 -87
@@ -1,53 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.ProductCard = exports.ErrorMessage = exports.Container = exports.BusinessListWrapper = exports.ArrowButtonWrapper = void 0;
9
-
10
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
-
12
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
13
-
14
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
-
16
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
-
18
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
19
-
20
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n margin-top: 35px;\n"])));
21
-
22
- exports.Container = Container;
23
-
24
- var ErrorMessage = _styledComponents.default.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 20px;\n width: 100%;\n margin: 0px 15px;\n color: ", ";\n font-weight: bold;\n"])), function (props) {
25
- return props.theme.colors.danger500;
26
- });
27
-
28
- exports.ErrorMessage = ErrorMessage;
29
-
30
- var BusinessListWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n position: relative;\n\n .swiper-businesses {\n padding: 5px 0px;\n .swiper-slide {\n height: auto;\n > div {\n width: 100% !important;\n margin: 0px !important;\n height: 100%;\n cursor: default;\n }\n }\n }\n"])));
31
-
32
- exports.BusinessListWrapper = BusinessListWrapper;
33
-
34
- var ArrowButtonWrapper = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n transition: all 0.3s ease-out;\n\n &::after {\n display: none;\n }\n > svg {\n background: ", ";\n display: inline-block;\n border-radius: 50%;\n width: 25px;\n min-width: 25px;\n height: 25px;\n align-self: center;\n color: ", ";\n opacity: 0.8;\n }\n &.swiper-button-next {\n right: 10px;\n ", "\n }\n &.swiper-button-prev {\n left: 10px;\n ", "\n }\n &.swiper-button-disabled {\n display: none;\n }\n &:hover {\n transform: scale(1.07);\n }\n ", "\n"])), function (props) {
35
- var _props$theme$colors;
36
-
37
- return (_props$theme$colors = props.theme.colors) === null || _props$theme$colors === void 0 ? void 0 : _props$theme$colors.gray200;
38
- }, function (props) {
39
- return props.theme.colors.secundaryContrast;
40
- }, function (props) {
41
- return props.theme.rtl && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n left: 10px;\n right: initial;\n "])));
42
- }, function (props) {
43
- return props.theme.rtl && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n right: 10px;\n left: initial;\n "])));
44
- }, function (_ref) {
45
- var isLoading = _ref.isLoading;
46
- return isLoading && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n svg {\n display: none;\n }\n "])));
47
- });
48
-
49
- exports.ArrowButtonWrapper = ArrowButtonWrapper;
50
-
51
- var ProductCard = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n button {\n height: 44px;\n }\n"])));
52
-
53
- exports.ProductCard = ProductCard;
@@ -1,217 +0,0 @@
1
- import React, { useState, useEffect } from 'react'
2
- import { useLanguage, useOrder, useEvent, FavoriteList } from 'ordering-components-external'
3
- import { BusinessController } from '../BusinessController'
4
- import { BusinessPreorder } from '../BusinessPreorder'
5
- import { NotFoundSource } from '../NotFoundSource'
6
- import { Button } from '../../styles/Buttons'
7
- import { Modal } from '../Modal'
8
- import MdKeyboardArrowLeft from '@meronex/icons/md/MdKeyboardArrowLeft'
9
- import MdKeyboardArrowRight from '@meronex/icons/md/MdKeyboardArrowRight'
10
- import { useWindowSize } from '../../../../../hooks/useWindowSize'
11
-
12
- import {
13
- Container,
14
- ErrorMessage,
15
- BusinessListWrapper,
16
- ArrowButtonWrapper,
17
- BusinessCard
18
- } from './styles'
19
- import { Swiper, SwiperSlide } from 'swiper/react'
20
- import SwiperCore, {
21
- Navigation
22
- } from 'swiper'
23
- import 'swiper/swiper-bundle.min.css'
24
- import 'swiper/swiper.min.css'
25
-
26
- SwiperCore.use([Navigation])
27
-
28
- const FavoriteBusinessesUI = (props) => {
29
- const {
30
- favoriteList,
31
- handleUpdateFavoriteList,
32
- pagination,
33
- getFavoriteList
34
- } = props
35
-
36
- const [, t] = useLanguage()
37
- const [orderState] = useOrder()
38
- const [events] = useEvent()
39
- const { width } = useWindowSize()
40
-
41
- const [isPreorder, setIsPreorder] = useState(false)
42
- const [preorderBusiness, setPreorderBusiness] = useState(null)
43
-
44
- const handleClickBusiness = (business) => {
45
- events.emit('go_to_page', { page: 'business', params: { store: business.slug } })
46
- }
47
-
48
- const handleGoToBusinessList = () => {
49
- events.emit('go_to_page', { page: 'search' })
50
- }
51
-
52
- const handleClosePreorder = () => {
53
- setIsPreorder(false)
54
- setPreorderBusiness(null)
55
- }
56
-
57
- useEffect(() => {
58
- if (preorderBusiness) setIsPreorder(true)
59
- }, [preorderBusiness])
60
-
61
- return (
62
- <>
63
- {props.beforeElements?.map((BeforeElement, i) => (
64
- <React.Fragment key={i}>
65
- {BeforeElement}
66
- </React.Fragment>))}
67
- {props.beforeComponents?.map((BeforeComponent, i) => (
68
- <BeforeComponent key={i} {...props} />))}
69
- <Container>
70
- {
71
- !favoriteList?.loading && favoriteList?.favorites.length === 0 && (
72
- <NotFoundSource>
73
- <Button
74
- outline
75
- color='primary'
76
- onClick={() => handleGoToBusinessList()}
77
- style={{ height: '44px' }}
78
- >
79
- {t('ADD_FAVORITE', 'Add favorite')}
80
- </Button>
81
- </NotFoundSource>
82
- )
83
- }
84
- <BusinessListWrapper>
85
- <ArrowButtonWrapper className='swiper-button-prev' isLoading={favoriteList?.loading}>
86
- <MdKeyboardArrowLeft />
87
- </ArrowButtonWrapper>
88
- <Swiper
89
- spaceBetween={0}
90
- breakpoints={{
91
- 0: {
92
- slidesPerView: 1,
93
- spaceBetween: 0
94
- },
95
- 400: {
96
- slidesPerView: 1,
97
- spaceBetween: 0
98
- },
99
- 550: {
100
- slidesPerView: 2,
101
- spaceBetween: 40
102
- },
103
- 993: {
104
- slidesPerView: 3,
105
- spaceBetween: 50
106
- }
107
- }}
108
- freeMode={width > 400}
109
- watchSlidesProgress
110
- className='swiper-businesses'
111
- preventClicksPropagation={false}
112
- navigation={{
113
- nextEl: '.swiper-button-next',
114
- prevEl: '.swiper-button-prev'
115
- }}
116
- >
117
- {!favoriteList?.loading && (
118
- <>
119
- {
120
- favoriteList?.favorites?.map((business, i) => (
121
- <SwiperSlide key={i}>
122
- <BusinessController
123
- className='card'
124
- business={business}
125
- isBusinessOpen={business.open}
126
- handleCustomClick={handleClickBusiness}
127
- orderType={orderState?.options?.type}
128
- // isCustomLayout={isCustomLayout}
129
- // isCustomerMode={isCustomerMode}
130
- onPreorderBusiness={setPreorderBusiness}
131
- businessHeader={business?.header}
132
- businessFeatured={business?.featured}
133
- businessOffers={business?.offers}
134
- businessLogo={business?.logo}
135
- businessReviews={business?.reviews?.total}
136
- businessDeliveryPrice={business?.delivery_price}
137
- businessDeliveryTime={business?.delivery_time}
138
- businessPickupTime={business?.pickup_time}
139
- businessDistance={business?.distance}
140
- handleUpdateBusinessList={handleUpdateFavoriteList}
141
- />
142
- </SwiperSlide>
143
- ))
144
- }
145
- {pagination?.totalPages && pagination?.currentPage < pagination?.totalPages && (
146
- <SwiperSlide>
147
- <BusinessCard>
148
- <Button
149
- color='primary'
150
- outline
151
- onClick={() => getFavoriteList(pagination?.currentPage + 1)}
152
- >
153
- {t('LOAD_MORE_BUSINESSES', 'Load more businesses')}
154
- </Button>
155
- </BusinessCard>
156
- </SwiperSlide>
157
- )}
158
- </>
159
- )}
160
-
161
- {favoriteList?.loading && (
162
- [...Array(5).keys()].map(i => (
163
- <SwiperSlide key={i}>
164
- <BusinessController
165
- className='card'
166
- business={{}}
167
- isSkeleton
168
- orderType={orderState?.options?.type}
169
- />
170
- </SwiperSlide>
171
- ))
172
- )}
173
- </Swiper>
174
- <ArrowButtonWrapper className='swiper-button-next' isLoading={favoriteList?.loading}>
175
- <MdKeyboardArrowRight />
176
- </ArrowButtonWrapper>
177
- </BusinessListWrapper>
178
- {favoriteList?.error && favoriteList?.error.length > 0 && favoriteList?.favorites.length === 0 && (
179
- favoriteList?.error.map((e, i) => (
180
- <ErrorMessage key={i}>{t('ERROR', 'ERROR')}: [{e?.message || e}]</ErrorMessage>
181
- ))
182
- )}
183
- </Container>
184
- <Modal
185
- open={isPreorder}
186
- width='760px'
187
- onClose={() => handleClosePreorder()}
188
- >
189
- <BusinessPreorder
190
- business={preorderBusiness}
191
- handleClick={handleClickBusiness}
192
- showButton
193
- />
194
- </Modal>
195
- {props.afterComponents?.map((AfterComponent, i) => (
196
- <AfterComponent key={i} {...props} />))}
197
- {props.afterElements?.map((AfterElement, i) => (
198
- <React.Fragment key={i}>
199
- {AfterElement}
200
- </React.Fragment>))}
201
- </>
202
- )
203
- }
204
-
205
- export const FavoriteBusinesses = (props) => {
206
- const [orderState] = useOrder()
207
-
208
- const favoriteBusinessesProps = {
209
- ...props,
210
- UIComponent: FavoriteBusinessesUI,
211
- favoriteURL: 'favorite_businesses',
212
- originalURL: 'business',
213
- location: `${orderState.options?.address?.location?.lat},${orderState.options?.address?.location?.lng}`,
214
- propsToFetch: ['id', 'name', 'header', 'logo', 'location', 'address', 'ribbon', 'timezone', 'schedule', 'open', 'delivery_price', 'distance', 'delivery_time', 'pickup_time', 'reviews', 'featured', 'offers', 'food', 'laundry', 'alcohol', 'groceries', 'slug']
215
- }
216
- return <FavoriteList {...favoriteBusinessesProps} />
217
- }
@@ -1,85 +0,0 @@
1
- import styled, { css } from 'styled-components'
2
-
3
- export const Container = styled.div`
4
- width: 100%;
5
- margin-top: 35px;
6
- `
7
-
8
- export const ErrorMessage = styled.span`
9
- padding: 20px;
10
- width: 100%;
11
- margin: 0px 15px;
12
- color: ${props => props.theme.colors.danger500};
13
- font-weight: bold;
14
- `
15
-
16
- export const BusinessListWrapper = styled.div`
17
- width: 100%;
18
- position: relative;
19
-
20
- .swiper-businesses {
21
- padding: 5px 0px;
22
- .swiper-slide {
23
- height: auto;
24
- > div {
25
- width: 100% !important;
26
- margin: 0px !important;
27
- }
28
- }
29
- }
30
- `
31
-
32
- export const ArrowButtonWrapper = styled.div`
33
- position: absolute;
34
- transition: all 0.3s ease-out;
35
-
36
- &::after {
37
- display: none;
38
- }
39
- > svg {
40
- background: ${props => props.theme.colors?.gray200};
41
- display: inline-block;
42
- border-radius: 50%;
43
- width: 25px;
44
- min-width: 25px;
45
- height: 25px;
46
- align-self: center;
47
- color: ${props => props.theme.colors.secundaryContrast};
48
- opacity: 0.8;
49
- }
50
- &.swiper-button-next {
51
- right: 10px;
52
- ${props => props.theme.rtl && css`
53
- left: 10px;
54
- right: initial;
55
- `}
56
- }
57
- &.swiper-button-prev {
58
- left: 10px;
59
- ${props => props.theme.rtl && css`
60
- right: 10px;
61
- left: initial;
62
- `}
63
- }
64
- &.swiper-button-disabled {
65
- display: none;
66
- }
67
- &:hover {
68
- transform: scale(1.07);
69
- }
70
- ${({ isLoading }) => isLoading && css`
71
- svg {
72
- display: none;
73
- }
74
- `}
75
- `
76
-
77
- export const BusinessCard = styled.div`
78
- display: flex;
79
- justify-content: center;
80
- align-items: center;
81
- height: 100%;
82
- button {
83
- height: 44px;
84
- }
85
- `
@@ -1,225 +0,0 @@
1
- import React, { useState } from 'react'
2
- import { useLanguage, useEvent, useOrder, FavoriteList } from 'ordering-components-external'
3
- import { NotFoundSource } from '../NotFoundSource'
4
- import { Button } from '../../styles/Buttons'
5
- import MdKeyboardArrowLeft from '@meronex/icons/md/MdKeyboardArrowLeft'
6
- import MdKeyboardArrowRight from '@meronex/icons/md/MdKeyboardArrowRight'
7
- import { useTheme } from 'styled-components'
8
-
9
- import {
10
- Container,
11
- ErrorMessage,
12
- BusinessListWrapper,
13
- ArrowButtonWrapper,
14
- LoadMoreCard
15
- } from './styles'
16
- import { Swiper, SwiperSlide } from 'swiper/react'
17
- import SwiperCore, {
18
- Navigation
19
- } from 'swiper'
20
- import 'swiper/swiper-bundle.min.css'
21
- import 'swiper/swiper.min.css'
22
- import { SingleOrderCard } from '../SingleOrderCard'
23
-
24
- SwiperCore.use([Navigation])
25
-
26
- const FavoriteOrdersUI = (props) => {
27
- const {
28
- handleUpdateFavoriteList,
29
- favoriteList,
30
- pagination,
31
- getFavoriteList
32
- } = props
33
-
34
- const [, t] = useLanguage()
35
- const [events] = useEvent()
36
- const theme = useTheme()
37
-
38
- const [reorderLoading, setReorderLoading] = useState(false)
39
- const pastOrders = [1, 2, 5, 6, 10, 11, 12, 15, 16, 17]
40
-
41
- const [, { reorder }] = useOrder()
42
-
43
- const handleGoToOrderList = () => {
44
- events.emit('go_to_page', { page: 'orders' })
45
- }
46
-
47
- const getOrderStatus = (s) => {
48
- const status = parseInt(s)
49
- const orderStatus = [
50
- { key: 0, value: t('PENDING', theme?.defaultLanguages?.PENDING || 'Pending') },
51
- { key: 1, value: t('COMPLETED', theme?.defaultLanguages?.COMPLETED || 'Completed') },
52
- { key: 2, value: t('REJECTED', theme?.defaultLanguages?.REJECTED || 'Rejected') },
53
- { key: 3, value: t('DRIVER_IN_BUSINESS', theme?.defaultLanguages?.DRIVER_IN_BUSINESS || 'Driver in business') },
54
- { key: 4, value: t('PREPARATION_COMPLETED', theme?.defaultLanguages?.PREPARATION_COMPLETED || 'Preparation Completed') },
55
- { key: 5, value: t('REJECTED_BY_BUSINESS', theme?.defaultLanguages?.REJECTED_BY_BUSINESS || 'Rejected by business') },
56
- { key: 6, value: t('REJECTED_BY_DRIVER', theme?.defaultLanguages?.REJECTED_BY_DRIVER || 'Rejected by Driver') },
57
- { key: 7, value: t('ACCEPTED_BY_BUSINESS', theme?.defaultLanguages?.ACCEPTED_BY_BUSINESS || 'Accepted by business') },
58
- { key: 8, value: t('ACCEPTED_BY_DRIVER', theme?.defaultLanguages?.ACCEPTED_BY_DRIVER || 'Accepted by driver') },
59
- { key: 9, value: t('PICK_UP_COMPLETED_BY_DRIVER', theme?.defaultLanguages?.PICK_UP_COMPLETED_BY_DRIVER || 'Pick up completed by driver') },
60
- { key: 10, value: t('PICK_UP_FAILED_BY_DRIVER', theme?.defaultLanguages?.PICK_UP_FAILED_BY_DRIVER || 'Pick up Failed by driver') },
61
- { key: 11, value: t('DELIVERY_COMPLETED_BY_DRIVER', theme?.defaultLanguages?.DELIVERY_COMPLETED_BY_DRIVER || 'Delivery completed by driver') },
62
- { key: 12, value: t('DELIVERY_FAILED_BY_DRIVER', theme?.defaultLanguages?.DELIVERY_FAILED_BY_DRIVER || 'Delivery Failed by driver') },
63
- { key: 13, value: t('PREORDER', theme?.defaultLanguages?.PREORDER || 'PreOrder') },
64
- { key: 14, value: t('ORDER_NOT_READY', theme?.defaultLanguages?.ORDER_NOT_READY || 'Order not ready') },
65
- { key: 15, value: t('ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER', theme?.defaultLanguages?.ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER || 'Order picked up completed by customer') },
66
- { key: 16, value: t('ORDER_STATUS_CANCELLED_BY_CUSTOMER', theme?.defaultLanguages?.ORDER_STATUS_CANCELLED_BY_CUSTOMER || 'Order cancelled by customer') },
67
- { key: 17, value: t('ORDER_NOT_PICKEDUP_BY_CUSTOMER', theme?.defaultLanguages?.ORDER_NOT_PICKEDUP_BY_CUSTOMER || 'Order not picked up by customer') },
68
- { key: 18, value: t('ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS || 'Driver almost arrived to business') },
69
- { key: 19, value: t('ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER', theme?.defaultLanguages?.ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER || 'Driver almost arrived to customer') },
70
- { key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS || 'Customer almost arrived to business') },
71
- { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_CUSTOMER_ARRIVED_BUSINESS || 'Customer arrived to business') },
72
- { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', theme?.defaultLanguages?.ORDER_LOOKING_FOR_DRIVER || 'Looking for driver') },
73
- { key: 23, value: t('ORDER_DRIVER_ON_WAY', theme?.defaultLanguages?.ORDER_DRIVER_ON_WAY || 'Driver on way') }
74
- ]
75
-
76
- const objectStatus = orderStatus.find((o) => o.key === status)
77
-
78
- return objectStatus && objectStatus
79
- }
80
-
81
- const onRedirectPage = (data) => {
82
- events.emit('go_to_page', data)
83
- }
84
-
85
- const handleReorder = async (orderId) => {
86
- setReorderLoading(true)
87
- try {
88
- const { error, result } = await reorder(orderId)
89
- if (!error) {
90
- onRedirectPage && onRedirectPage({ page: 'checkout', params: { cartUuid: result.uuid } })
91
- return
92
- }
93
- setReorderLoading(false)
94
- } catch (err) {
95
- setReorderLoading(false)
96
- }
97
- }
98
-
99
- return (
100
- <>
101
- {props.beforeElements?.map((BeforeElement, i) => (
102
- <React.Fragment key={i}>
103
- {BeforeElement}
104
- </React.Fragment>))}
105
- {props.beforeComponents?.map((BeforeComponent, i) => (
106
- <BeforeComponent key={i} {...props} />))}
107
- <Container>
108
- {
109
- !favoriteList?.loading && favoriteList?.favorites?.length === 0 && (
110
- <NotFoundSource>
111
- <Button
112
- outline
113
- color='primary'
114
- onClick={() => handleGoToOrderList()}
115
- style={{ height: '44px' }}
116
- >
117
- {t('ADD_FAVORITE', 'Add favorite')}
118
- </Button>
119
- </NotFoundSource>
120
- )
121
- }
122
- <BusinessListWrapper>
123
- <ArrowButtonWrapper className='swiper-button-prev' isLoading={favoriteList?.loading}>
124
- <MdKeyboardArrowLeft />
125
- </ArrowButtonWrapper>
126
- <Swiper
127
- spaceBetween={0}
128
- breakpoints={{
129
- 0: {
130
- slidesPerView: 1,
131
- spaceBetween: 0
132
- },
133
- 1200: {
134
- slidesPerView: 2,
135
- spaceBetween: 20
136
- },
137
- 1700: {
138
- slidesPerView: 3,
139
- spaceBetween: 30
140
- }
141
- }}
142
- freeMode
143
- watchSlidesProgress
144
- className='swiper-businesses'
145
- preventClicksPropagation={false}
146
- navigation={{
147
- nextEl: '.swiper-button-next',
148
- prevEl: '.swiper-button-prev'
149
- }}
150
- >
151
- {!favoriteList?.loading && (
152
- <>
153
- {
154
- favoriteList?.favorites?.map((order, i) => (
155
- <SwiperSlide key={i}>
156
- <SingleOrderCard
157
- order={order}
158
- onRedirectPage={onRedirectPage}
159
- getOrderStatus={getOrderStatus}
160
- pastOrders={pastOrders.includes(order?.status)}
161
- handleReorder={handleReorder}
162
- handleUpdateOrderList={handleUpdateFavoriteList}
163
- />
164
- </SwiperSlide>
165
- ))
166
- }
167
- {pagination?.totalPages && pagination?.currentPage < pagination?.totalPages && (
168
- <SwiperSlide>
169
- <LoadMoreCard>
170
- <Button
171
- color='primary'
172
- outline
173
- onClick={() => getFavoriteList(pagination?.currentPage + 1)}
174
- >
175
- {t('LOAD_MORE_ORDERS', 'Load more orders')}
176
- </Button>
177
- </LoadMoreCard>
178
- </SwiperSlide>
179
- )}
180
- </>
181
- )}
182
-
183
- {favoriteList?.loading && (
184
- [...Array(5).keys()].map(i => (
185
- <SwiperSlide key={i}>
186
- <SingleOrderCard
187
- isSkeleton
188
- order={{}}
189
- onRedirectPage={onRedirectPage}
190
- getOrderStatus={getOrderStatus}
191
- handleReorder={handleReorder}
192
- />
193
- </SwiperSlide>
194
- ))
195
- )}
196
- </Swiper>
197
- <ArrowButtonWrapper className='swiper-button-next' isLoading={favoriteList?.loading}>
198
- <MdKeyboardArrowRight />
199
- </ArrowButtonWrapper>
200
- </BusinessListWrapper>
201
- {favoriteList?.error && favoriteList?.error.length > 0 && favoriteList?.favorites?.length === 0 && (
202
- favoriteList?.error.map((e, i) => (
203
- <ErrorMessage key={i}>{t('ERROR', 'ERROR')}: [{e?.message || e}]</ErrorMessage>
204
- ))
205
- )}
206
- </Container>
207
- {props.afterComponents?.map((AfterComponent, i) => (
208
- <AfterComponent key={i} {...props} />))}
209
- {props.afterElements?.map((AfterElement, i) => (
210
- <React.Fragment key={i}>
211
- {AfterElement}
212
- </React.Fragment>))}
213
- </>
214
- )
215
- }
216
-
217
- export const FavoriteOrders = (props) => {
218
- const favoriteOrdersProps = {
219
- ...props,
220
- UIComponent: FavoriteOrdersUI,
221
- favoriteURL: 'favorite_orders',
222
- originalURL: 'orders'
223
- }
224
- return <FavoriteList {...favoriteOrdersProps} />
225
- }
@@ -1,87 +0,0 @@
1
- import styled, { css } from 'styled-components'
2
-
3
- export const Container = styled.div`
4
- width: 100%;
5
- margin-top: 35px;
6
- `
7
-
8
- export const ErrorMessage = styled.span`
9
- padding: 20px;
10
- width: 100%;
11
- margin: 0px 15px;
12
- color: ${props => props.theme.colors.danger500};
13
- font-weight: bold;
14
- `
15
-
16
- export const BusinessListWrapper = styled.div`
17
- width: 100%;
18
- position: relative;
19
-
20
- .swiper-businesses {
21
- padding: 5px 0px;
22
- .swiper-slide {
23
- height: auto;
24
- > div {
25
- width: 100% !important;
26
- margin: 0px !important;
27
- height: 100%;
28
- min-width: 100%;
29
- }
30
- }
31
- }
32
- `
33
-
34
- export const ArrowButtonWrapper = styled.div`
35
- position: absolute;
36
- transition: all 0.3s ease-out;
37
-
38
- &::after {
39
- display: none;
40
- }
41
- > svg {
42
- background: ${props => props.theme.colors?.gray200};
43
- display: inline-block;
44
- border-radius: 50%;
45
- width: 25px;
46
- min-width: 25px;
47
- height: 25px;
48
- align-self: center;
49
- color: ${props => props.theme.colors.secundaryContrast};
50
- opacity: 0.8;
51
- }
52
- &.swiper-button-next {
53
- right: 10px;
54
- ${props => props.theme.rtl && css`
55
- left: 10px;
56
- right: initial;
57
- `}
58
- }
59
- &.swiper-button-prev {
60
- left: 10px;
61
- ${props => props.theme.rtl && css`
62
- right: 10px;
63
- left: initial;
64
- `}
65
- }
66
- &.swiper-button-disabled {
67
- display: none;
68
- }
69
- &:hover {
70
- transform: scale(1.07);
71
- }
72
- ${({ isLoading }) => isLoading && css`
73
- svg {
74
- display: none;
75
- }
76
- `}
77
- `
78
-
79
- export const LoadMoreCard = styled.div`
80
- display: flex;
81
- justify-content: center;
82
- align-items: center;
83
- height: 100%;
84
- button {
85
- height: 44px;
86
- }
87
- `