ordering-ui-external 2.4.6 → 2.5.1

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 (147) hide show
  1. package/_bundles/{0.ordering-ui.038c4b4d536032472bc7.js → 0.ordering-ui.5488030edb520175432d.js} +1 -1
  2. package/_bundles/{1.ordering-ui.038c4b4d536032472bc7.js → 1.ordering-ui.5488030edb520175432d.js} +1 -1
  3. package/_bundles/{2.ordering-ui.038c4b4d536032472bc7.js → 2.ordering-ui.5488030edb520175432d.js} +1 -1
  4. package/_bundles/{4.ordering-ui.038c4b4d536032472bc7.js → 4.ordering-ui.5488030edb520175432d.js} +1 -1
  5. package/_bundles/{5.ordering-ui.038c4b4d536032472bc7.js → 5.ordering-ui.5488030edb520175432d.js} +1 -1
  6. package/_bundles/{6.ordering-ui.038c4b4d536032472bc7.js → 6.ordering-ui.5488030edb520175432d.js} +1 -1
  7. package/_bundles/{7.ordering-ui.038c4b4d536032472bc7.js → 7.ordering-ui.5488030edb520175432d.js} +2 -2
  8. package/_bundles/{8.ordering-ui.038c4b4d536032472bc7.js → 8.ordering-ui.5488030edb520175432d.js} +1 -1
  9. package/_bundles/{9.ordering-ui.038c4b4d536032472bc7.js → 9.ordering-ui.5488030edb520175432d.js} +1 -1
  10. package/_bundles/ordering-ui.5488030edb520175432d.js +2 -0
  11. package/_modules/components/OrdersOption/styles.js +1 -1
  12. package/_modules/components/StripeMethodForm/index.js +26 -11
  13. package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +15 -8
  14. package/_modules/components/VerticalOrdersLayout/styles.js +2 -2
  15. package/_modules/contexts/ThemeContext/index.js +1 -0
  16. package/_modules/themes/five/src/components/AddressList/index.js +8 -7
  17. package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +28 -22
  18. package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +22 -21
  19. package/_modules/themes/five/src/components/BusinessController/index.js +5 -3
  20. package/_modules/themes/five/src/components/BusinessInformation/index.js +16 -10
  21. package/_modules/themes/five/src/components/BusinessItemAccordion/index.js +5 -8
  22. package/_modules/themes/five/src/components/BusinessListingSearch/index.js +93 -74
  23. package/_modules/themes/five/src/components/BusinessListingSearch/styles.js +10 -4
  24. package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +7 -2
  25. package/_modules/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
  26. package/_modules/themes/five/src/components/BusinessProductsList/index.js +1 -1
  27. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +38 -13
  28. package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +20 -9
  29. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +35 -23
  30. package/_modules/themes/five/src/components/Cart/index.js +7 -3
  31. package/_modules/themes/five/src/components/Checkout/index.js +12 -11
  32. package/_modules/themes/five/src/components/Checkout/styles.js +8 -4
  33. package/_modules/themes/five/src/components/CitiesControl/index.js +1 -1
  34. package/_modules/themes/five/src/components/GiftCard/GiftCardUI/index.js +1 -0
  35. package/_modules/themes/five/src/components/GiftCard/PurchaseGiftCard/index.js +4 -3
  36. package/_modules/themes/five/src/components/GiftCard/PurchaseGiftCard/styles.js +14 -8
  37. package/_modules/themes/five/src/components/GiftCard/RedeemGiftCard/index.js +1 -1
  38. package/_modules/themes/five/src/components/Header/index.js +29 -21
  39. package/_modules/themes/five/src/components/Header/styles.js +44 -40
  40. package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +1 -1
  41. package/_modules/themes/five/src/components/MultiCartsPaymethodsAndWallets/index.js +36 -5
  42. package/_modules/themes/five/src/components/MultiCheckout/index.js +35 -6
  43. package/_modules/themes/five/src/components/MultiOrdersDetails/SingleOrderCard.js +6 -4
  44. package/_modules/themes/five/src/components/MyOrders/index.js +16 -10
  45. package/_modules/themes/five/src/components/MyOrders/styles.js +15 -12
  46. package/_modules/themes/five/src/components/OrderDetails/OrderEta.js +4 -3
  47. package/_modules/themes/five/src/components/OrderDetails/OrderHistory.js +2 -2
  48. package/_modules/themes/five/src/components/OrderDetails/index.js +2 -2
  49. package/_modules/themes/five/src/components/OrderItAgain/styles.js +1 -1
  50. package/_modules/themes/five/src/components/OrderProgress/index.js +15 -4
  51. package/_modules/themes/five/src/components/OrderTypeSelectorContent/index.js +16 -4
  52. package/_modules/themes/five/src/components/PageBanner/styles.js +1 -1
  53. package/_modules/themes/five/src/components/PaymentOptions/index.js +8 -5
  54. package/_modules/themes/five/src/components/ProductForm/index.js +27 -7
  55. package/_modules/themes/five/src/components/ProductForm/styles.js +40 -31
  56. package/_modules/themes/five/src/components/ProductItemAccordion/index.js +6 -6
  57. package/_modules/themes/five/src/components/RenderProductsLayout/index.js +3 -3
  58. package/_modules/themes/five/src/components/ReviewProduct/index.js +9 -4
  59. package/_modules/themes/five/src/components/ServiceForm/index.js +22 -3
  60. package/_modules/themes/five/src/components/ServiceForm/styles.js +9 -3
  61. package/_modules/themes/five/src/components/SidebarMenu/index.js +19 -10
  62. package/_modules/themes/five/src/components/SignUpForm/index.js +56 -29
  63. package/_modules/themes/five/src/components/SingleOrderCard/index.js +1 -1
  64. package/_modules/themes/five/src/components/SingleOrderCard/styles.js +26 -24
  65. package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +9 -5
  66. package/_modules/themes/five/src/components/SingleProductCard/layouts/original/styles.js +2 -2
  67. package/_modules/themes/five/src/components/StripeElementsForm/index.js +3 -1
  68. package/_modules/themes/five/src/components/UpsellingPage/index.js +2 -1
  69. package/_modules/themes/five/src/components/UserFormDetails/index.js +58 -18
  70. package/_modules/themes/five/src/components/UserFormDetails/styles.js +7 -3
  71. package/_modules/themes/five/src/components/UserPopover/index.js +41 -25
  72. package/_modules/themes/five/src/components/UserProfileForm/index.js +19 -11
  73. package/_modules/themes/five/src/styles/Buttons/index.js +68 -58
  74. package/_modules/themes/five/src/styles/Inputs/index.js +40 -16
  75. package/_modules/utils/index.js +8 -2
  76. package/index.html +1 -1
  77. package/package.json +3 -2
  78. package/src/components/OrdersOption/styles.js +1 -0
  79. package/src/components/StripeMethodForm/index.js +22 -10
  80. package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +35 -17
  81. package/src/components/VerticalOrdersLayout/styles.js +9 -0
  82. package/src/contexts/ThemeContext/index.js +1 -0
  83. package/src/themes/five/src/components/AddressList/index.js +6 -6
  84. package/src/themes/five/src/components/BusinessBasicInformation/index.js +24 -22
  85. package/src/themes/five/src/components/BusinessBasicInformation/styles.js +24 -3
  86. package/src/themes/five/src/components/BusinessController/index.js +4 -2
  87. package/src/themes/five/src/components/BusinessInformation/index.js +24 -12
  88. package/src/themes/five/src/components/BusinessItemAccordion/index.js +5 -6
  89. package/src/themes/five/src/components/BusinessListingSearch/index.js +127 -101
  90. package/src/themes/five/src/components/BusinessListingSearch/styles.js +15 -0
  91. package/src/themes/five/src/components/BusinessProductsCategories/index.js +7 -2
  92. package/src/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
  93. package/src/themes/five/src/components/BusinessProductsList/index.js +1 -1
  94. package/src/themes/five/src/components/BusinessProductsListing/index.js +34 -9
  95. package/src/themes/five/src/components/BusinessProductsListing/styles.js +26 -0
  96. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +9 -2
  97. package/src/themes/five/src/components/Cart/index.js +3 -4
  98. package/src/themes/five/src/components/Checkout/index.js +18 -4
  99. package/src/themes/five/src/components/Checkout/styles.js +22 -0
  100. package/src/themes/five/src/components/CitiesControl/index.js +1 -1
  101. package/src/themes/five/src/components/GiftCard/GiftCardUI/index.js +1 -0
  102. package/src/themes/five/src/components/GiftCard/PurchaseGiftCard/index.js +41 -31
  103. package/src/themes/five/src/components/GiftCard/PurchaseGiftCard/styles.js +15 -4
  104. package/src/themes/five/src/components/GiftCard/RedeemGiftCard/index.js +2 -2
  105. package/src/themes/five/src/components/Header/index.js +17 -5
  106. package/src/themes/five/src/components/Header/styles.js +9 -6
  107. package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +1 -1
  108. package/src/themes/five/src/components/MultiCartsPaymethodsAndWallets/index.js +83 -51
  109. package/src/themes/five/src/components/MultiCheckout/index.js +21 -6
  110. package/src/themes/five/src/components/MultiOrdersDetails/SingleOrderCard.js +8 -5
  111. package/src/themes/five/src/components/MyOrders/index.js +13 -9
  112. package/src/themes/five/src/components/MyOrders/styles.js +3 -1
  113. package/src/themes/five/src/components/OrderDetails/OrderEta.js +6 -3
  114. package/src/themes/five/src/components/OrderDetails/OrderHistory.js +8 -2
  115. package/src/themes/five/src/components/OrderDetails/index.js +2 -2
  116. package/src/themes/five/src/components/OrderItAgain/styles.js +1 -1
  117. package/src/themes/five/src/components/OrderProgress/index.js +16 -5
  118. package/src/themes/five/src/components/OrderTypeSelectorContent/index.js +7 -4
  119. package/src/themes/five/src/components/PageBanner/styles.js +1 -4
  120. package/src/themes/five/src/components/PaymentOptions/index.js +7 -4
  121. package/src/themes/five/src/components/ProductForm/index.js +23 -5
  122. package/src/themes/five/src/components/ProductForm/styles.js +36 -1
  123. package/src/themes/five/src/components/ProductItemAccordion/index.js +37 -29
  124. package/src/themes/five/src/components/RenderProductsLayout/index.js +3 -3
  125. package/src/themes/five/src/components/ReviewProduct/index.js +14 -6
  126. package/src/themes/five/src/components/ServiceForm/index.js +22 -4
  127. package/src/themes/five/src/components/ServiceForm/styles.js +16 -0
  128. package/src/themes/five/src/components/SidebarMenu/index.js +162 -144
  129. package/src/themes/five/src/components/SignUpForm/index.js +4 -3
  130. package/src/themes/five/src/components/SingleOrderCard/index.js +1 -1
  131. package/src/themes/five/src/components/SingleOrderCard/styles.js +9 -1
  132. package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +13 -3
  133. package/src/themes/five/src/components/SingleProductCard/layouts/original/styles.js +2 -2
  134. package/src/themes/five/src/components/StripeElementsForm/index.js +3 -1
  135. package/src/themes/five/src/components/UpsellingPage/index.js +1 -1
  136. package/src/themes/five/src/components/UserFormDetails/index.js +58 -14
  137. package/src/themes/five/src/components/UserFormDetails/styles.js +16 -0
  138. package/src/themes/five/src/components/UserPopover/index.js +26 -15
  139. package/src/themes/five/src/components/UserProfileForm/index.js +18 -9
  140. package/src/themes/five/src/styles/Buttons/index.js +11 -0
  141. package/src/themes/five/src/styles/Inputs/index.js +34 -0
  142. package/src/utils/index.js +5 -0
  143. package/template/app.js +5 -3
  144. package/template/theme.json +335 -24
  145. package/_bundles/ordering-ui.038c4b4d536032472bc7.js +0 -2
  146. /package/_bundles/{7.ordering-ui.038c4b4d536032472bc7.js.LICENSE.txt → 7.ordering-ui.5488030edb520175432d.js.LICENSE.txt} +0 -0
  147. /package/_bundles/{ordering-ui.038c4b4d536032472bc7.js.LICENSE.txt → ordering-ui.5488030edb520175432d.js.LICENSE.txt} +0 -0
@@ -109,7 +109,7 @@ var SkeletonReorder = _styledComponents.default.div(_templateObject26 || (_templ
109
109
  exports.SkeletonReorder = SkeletonReorder;
110
110
  var ImageNotFound = _styledComponents.default.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n \n margin: 0 auto;\n img{\n width: 100%\n }\n"])));
111
111
  exports.ImageNotFound = ImageNotFound;
112
- var BusinessInformation = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n display: inline-flex;\n flex-direction: column;\n flex: 1;\n padding-left: 10px;\n font-size: 0.9em;\n ", "\n ", "\n h2 {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n font-size: 14px;\n margin-block-end: 0;\n margin-block-start: 0;\n }\n p {\n margin-block-end: 0.1em;\n margin-block-start: 0.1em;\n color : #9A9A9A;\n white-space: nowrap;\n font-size: 0.9em;\n ", "\n }\n\n p[name='order_number']{\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n p[name='view_order'] {\n color: ", ";\n cursor: pointer;\n text-decoration: none;\n width: fit-content;\n }\n\n .status {\n color: ", ";\n }\n\n @media (min-width: 480px){\n h2 {\n font-size: 14px;\n margin-block-end: 0.1em;\n margin-block-start: 0.1em;\n }\n p{\n ", "\n }\n }\n\n @media (min-width: 768px){\n font-size: 0.9em;\n p {\n font-size: 1em;\n }\n }\n"])), function (_ref18) {
112
+ var BusinessInformation = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n width: 80%;\n display: inline-flex;\n flex-direction: column;\n flex: 1;\n padding-left: 10px;\n font-size: 0.9em;\n ", "\n ", "\n h2 {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n font-size: 14px;\n margin-block-end: 0;\n margin-block-start: 0;\n }\n p {\n margin-block-end: 0.1em;\n margin-block-start: 0.1em;\n color : #9A9A9A;\n white-space: nowrap;\n font-size: 0.9em;\n ", "\n }\n\n p[name='order_number']{\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n p[name='view_order'] {\n color: ", ";\n cursor: pointer;\n text-decoration: none;\n width: fit-content;\n }\n\n .status {\n color: ", ";\n }\n\n @media (min-width: 480px){\n h2 {\n font-size: 14px;\n margin-block-end: 0.1em;\n margin-block-start: 0.1em;\n }\n p{\n ", "\n }\n }\n\n @media (min-width: 768px){\n font-size: 0.9em;\n p {\n font-size: 1em;\n }\n }\n"])), function (_ref18) {
113
113
  var activeOrders = _ref18.activeOrders;
114
114
  return activeOrders && (0, _styledComponents.css)(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n width: 30%;\n "])));
115
115
  }, function (props) {
@@ -31,11 +31,15 @@ var StripeMethodFormUI = function StripeMethodFormUI(props) {
31
31
  var cart = props.cart,
32
32
  handleSource = props.handleSource,
33
33
  handleCancel = props.handleCancel,
34
- paymethod = props.paymethod;
34
+ paymethod = props.paymethod,
35
+ cartGroup = props.cartGroup;
35
36
  var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
36
37
  _useLanguage2 = _slicedToArray(_useLanguage, 2),
37
38
  t = _useLanguage2[1];
38
39
  var stripe = (0, _reactStripeJs.useStripe)();
40
+ var _useConfig = (0, _orderingComponentsExternal.useConfig)(),
41
+ _useConfig2 = _slicedToArray(_useConfig, 1),
42
+ configs = _useConfig2[0].configs;
39
43
  var _useState = (0, _react.useState)(null),
40
44
  _useState2 = _slicedToArray(_useState, 2),
41
45
  paymentRequest = _useState2[0],
@@ -44,15 +48,24 @@ var StripeMethodFormUI = function StripeMethodFormUI(props) {
44
48
  _useState4 = _slicedToArray(_useState3, 2),
45
49
  methodUnavailable = _useState4[0],
46
50
  setMethodUnavailable = _useState4[1];
51
+ var googlePayMethods = ['google_pay', 'global_google_pay'];
47
52
  (0, _react.useEffect)(function () {
48
53
  if (stripe) {
49
- var _cart$business;
54
+ var _configs$stripe_curre, _configs$stripe_curre2, _configs$stripe_curre3, _cart$business2;
55
+ var cartNames = '';
56
+ if (cartGroup) {
57
+ // eslint-disable-next-line no-unused-expressions
58
+ cartGroup === null || cartGroup === void 0 ? void 0 : cartGroup.carts.map(function (cart, i) {
59
+ var _cart$business, _cartNames, _cartNames$carts;
60
+ return cartNames = "".concat(cart === null || cart === void 0 ? void 0 : (_cart$business = cart.business) === null || _cart$business === void 0 ? void 0 : _cart$business.name, " ").concat(i !== ((_cartNames = cartNames) === null || _cartNames === void 0 ? void 0 : (_cartNames$carts = _cartNames.carts) === null || _cartNames$carts === void 0 ? void 0 : _cartNames$carts.length) && ', ');
61
+ });
62
+ }
50
63
  var pr = stripe.paymentRequest({
51
64
  country: 'US',
52
- currency: 'usd',
65
+ currency: (configs === null || configs === void 0 ? void 0 : (_configs$stripe_curre = configs.stripe_currency) === null || _configs$stripe_curre === void 0 ? void 0 : (_configs$stripe_curre2 = _configs$stripe_curre.value) === null || _configs$stripe_curre2 === void 0 ? void 0 : (_configs$stripe_curre3 = _configs$stripe_curre2.toLowerCase) === null || _configs$stripe_curre3 === void 0 ? void 0 : _configs$stripe_curre3.call(_configs$stripe_curre2)) || 'usd',
53
66
  total: {
54
- label: cart === null || cart === void 0 ? void 0 : (_cart$business = cart.business) === null || _cart$business === void 0 ? void 0 : _cart$business.name,
55
- amount: Math.floor(((cart === null || cart === void 0 ? void 0 : cart.balance) || (cart === null || cart === void 0 ? void 0 : cart.total)) * 100)
67
+ label: cartNames || (cart === null || cart === void 0 ? void 0 : (_cart$business2 = cart.business) === null || _cart$business2 === void 0 ? void 0 : _cart$business2.name),
68
+ amount: Math.floor(((cartGroup === null || cartGroup === void 0 ? void 0 : cartGroup.balance) || (cartGroup === null || cartGroup === void 0 ? void 0 : cartGroup.total) || (cart === null || cart === void 0 ? void 0 : cart.balance) || (cart === null || cart === void 0 ? void 0 : cart.total)) * 100)
56
69
  },
57
70
  requestPayerName: true,
58
71
  requestPayerEmail: true
@@ -67,12 +80,11 @@ var StripeMethodFormUI = function StripeMethodFormUI(props) {
67
80
  pr.on('paymentmethod', /*#__PURE__*/function () {
68
81
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
69
82
  var _e$paymentMethod, _e$paymentMethod2;
83
+ var data;
70
84
  return _regeneratorRuntime().wrap(function _callee$(_context) {
71
85
  while (1) switch (_context.prev = _context.next) {
72
86
  case 0:
73
- e.complete('success');
74
- handleCancel();
75
- handleSource(_objectSpread(_objectSpread({}, e === null || e === void 0 ? void 0 : (_e$paymentMethod = e.paymentMethod) === null || _e$paymentMethod === void 0 ? void 0 : _e$paymentMethod.card), {}, {
87
+ data = _objectSpread(_objectSpread({}, e === null || e === void 0 ? void 0 : (_e$paymentMethod = e.paymentMethod) === null || _e$paymentMethod === void 0 ? void 0 : _e$paymentMethod.card), {}, {
76
88
  id: e.paymentMethod.id,
77
89
  type: e.paymentMethod.type,
78
90
  source_id: e === null || e === void 0 ? void 0 : (_e$paymentMethod2 = e.paymentMethod) === null || _e$paymentMethod2 === void 0 ? void 0 : _e$paymentMethod2.id,
@@ -80,8 +92,11 @@ var StripeMethodFormUI = function StripeMethodFormUI(props) {
80
92
  brand: e.paymentMethod.card.brand,
81
93
  last4: e.paymentMethod.card.last4
82
94
  }
83
- }));
84
- case 3:
95
+ });
96
+ e.complete('success');
97
+ handleCancel();
98
+ handleSource(cartGroup ? JSON.stringify(data) : data);
99
+ case 4:
85
100
  case "end":
86
101
  return _context.stop();
87
102
  }
@@ -93,7 +108,7 @@ var StripeMethodFormUI = function StripeMethodFormUI(props) {
93
108
  }());
94
109
  }
95
110
  }, [stripe]);
96
- return /*#__PURE__*/_react.default.createElement(_styles.Container, null, methodUnavailable ? /*#__PURE__*/_react.default.createElement("h2", null, paymethod === 'google_pay' ? t('GOOGLE_PAY_UNAVAILABLE', 'Google pay unavailable') : t('APPLE_PAY_UNAVAILABLE', 'Apple pay unavailable')) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, paymentRequest ? /*#__PURE__*/_react.default.createElement(_reactStripeJs.PaymentRequestButtonElement, {
111
+ return /*#__PURE__*/_react.default.createElement(_styles.Container, null, methodUnavailable ? /*#__PURE__*/_react.default.createElement("h2", null, googlePayMethods.includes(paymethod) ? t('GOOGLE_PAY_UNAVAILABLE', 'Google pay unavailable') : t('APPLE_PAY_UNAVAILABLE', 'Apple pay unavailable')) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, paymentRequest ? /*#__PURE__*/_react.default.createElement(_reactStripeJs.PaymentRequestButtonElement, {
97
112
  options: {
98
113
  paymentRequest: paymentRequest
99
114
  }
@@ -26,7 +26,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
26
26
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
27
27
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
28
28
  var SingleOrderCardUI = function SingleOrderCardUI(props) {
29
- var _order$business, _theme$images, _theme$images$dummies, _order$business2, _order$business3, _order$business4, _order$business5, _order$business6, _order$business7, _theme$images3, _theme$images3$dummie, _order$business8, _order$business9, _order$business10, _order$business11, _order$business12, _getOrderStatus;
29
+ var _theme$orders, _theme$orders$compone, _theme$orders$compone2, _theme$orders2, _theme$orders2$compon, _theme$orders2$compon2, _theme$orders3, _theme$orders3$compon, _theme$orders3$compon2, _theme$orders4, _theme$orders4$compon, _theme$orders4$compon2, _theme$orders5, _theme$orders5$compon, _theme$orders5$compon2, _theme$orders6, _theme$orders6$compon, _theme$orders6$compon2, _theme$orders7, _theme$orders7$compon, _theme$orders7$compon2, _order$business, _theme$images, _theme$images$dummies, _order$business2, _order$business3, _order$business4, _order$business5, _order$business6, _order$business7, _theme$images3, _theme$images3$dummie, _order$business8, _order$business9, _order$business10, _order$business11, _order$business12, _getOrderStatus;
30
30
  var order = props.order,
31
31
  getOrderStatus = props.getOrderStatus,
32
32
  handleReorder = props.handleReorder,
@@ -56,13 +56,20 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
56
56
  params: params
57
57
  });
58
58
  };
59
+ var hideBusinessLogo = theme === null || theme === void 0 ? void 0 : (_theme$orders = theme.orders) === null || _theme$orders === void 0 ? void 0 : (_theme$orders$compone = _theme$orders.components) === null || _theme$orders$compone === void 0 ? void 0 : (_theme$orders$compone2 = _theme$orders$compone.business_logo) === null || _theme$orders$compone2 === void 0 ? void 0 : _theme$orders$compone2.hidden;
60
+ var hideDate = theme === null || theme === void 0 ? void 0 : (_theme$orders2 = theme.orders) === null || _theme$orders2 === void 0 ? void 0 : (_theme$orders2$compon = _theme$orders2.components) === null || _theme$orders2$compon === void 0 ? void 0 : (_theme$orders2$compon2 = _theme$orders2$compon.date) === null || _theme$orders2$compon2 === void 0 ? void 0 : _theme$orders2$compon2.hidden;
61
+ var hideBusinessName = theme === null || theme === void 0 ? void 0 : (_theme$orders3 = theme.orders) === null || _theme$orders3 === void 0 ? void 0 : (_theme$orders3$compon = _theme$orders3.components) === null || _theme$orders3$compon === void 0 ? void 0 : (_theme$orders3$compon2 = _theme$orders3$compon.business_name) === null || _theme$orders3$compon2 === void 0 ? void 0 : _theme$orders3$compon2.hidden;
62
+ var hideOrderNumber = theme === null || theme === void 0 ? void 0 : (_theme$orders4 = theme.orders) === null || _theme$orders4 === void 0 ? void 0 : (_theme$orders4$compon = _theme$orders4.components) === null || _theme$orders4$compon === void 0 ? void 0 : (_theme$orders4$compon2 = _theme$orders4$compon.order_number) === null || _theme$orders4$compon2 === void 0 ? void 0 : _theme$orders4$compon2.hidden;
63
+ var hideReviewOrderButton = theme === null || theme === void 0 ? void 0 : (_theme$orders5 = theme.orders) === null || _theme$orders5 === void 0 ? void 0 : (_theme$orders5$compon = _theme$orders5.components) === null || _theme$orders5$compon === void 0 ? void 0 : (_theme$orders5$compon2 = _theme$orders5$compon.review_order_button) === null || _theme$orders5$compon2 === void 0 ? void 0 : _theme$orders5$compon2.hidden;
64
+ var hideReorderButton = theme === null || theme === void 0 ? void 0 : (_theme$orders6 = theme.orders) === null || _theme$orders6 === void 0 ? void 0 : (_theme$orders6$compon = _theme$orders6.components) === null || _theme$orders6$compon === void 0 ? void 0 : (_theme$orders6$compon2 = _theme$orders6$compon.reorder_button) === null || _theme$orders6$compon2 === void 0 ? void 0 : _theme$orders6$compon2.hidden;
65
+ var hideOrderStatus = theme === null || theme === void 0 ? void 0 : (_theme$orders7 = theme.orders) === null || _theme$orders7 === void 0 ? void 0 : (_theme$orders7$compon = _theme$orders7.components) === null || _theme$orders7$compon === void 0 ? void 0 : (_theme$orders7$compon2 = _theme$orders7$compon.order_status) === null || _theme$orders7$compon2 === void 0 ? void 0 : _theme$orders7$compon2.hidden;
59
66
  return /*#__PURE__*/_react.default.createElement(_styles2.SingleCard, {
60
67
  key: order.id,
61
68
  id: "order-card",
62
69
  onClick: function onClick(e) {
63
70
  return handleClickCard(e, order);
64
71
  }
65
- }, /*#__PURE__*/_react.default.createElement(_styles2.OrderPastContent, null, (((_order$business = order.business) === null || _order$business === void 0 ? void 0 : _order$business.logo) || ((_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$dummies = _theme$images.dummies) === null || _theme$images$dummies === void 0 ? void 0 : _theme$images$dummies.businessLogo)) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (order === null || order === void 0 ? void 0 : (_order$business2 = order.business) === null || _order$business2 === void 0 ? void 0 : _order$business2.length) > 1 ? /*#__PURE__*/_react.default.createElement(_styles2.MultiLogosContainer, null, order === null || order === void 0 ? void 0 : (_order$business3 = order.business) === null || _order$business3 === void 0 ? void 0 : _order$business3.map(function (business, i) {
72
+ }, /*#__PURE__*/_react.default.createElement(_styles2.OrderPastContent, null, !hideBusinessLogo && (((_order$business = order.business) === null || _order$business === void 0 ? void 0 : _order$business.logo) || ((_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$dummies = _theme$images.dummies) === null || _theme$images$dummies === void 0 ? void 0 : _theme$images$dummies.businessLogo)) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (order === null || order === void 0 ? void 0 : (_order$business2 = order.business) === null || _order$business2 === void 0 ? void 0 : _order$business2.length) > 1 ? /*#__PURE__*/_react.default.createElement(_styles2.MultiLogosContainer, null, order === null || order === void 0 ? void 0 : (_order$business3 = order.business) === null || _order$business3 === void 0 ? void 0 : _order$business3.map(function (business, i) {
66
73
  var _theme$images2, _theme$images2$dummie;
67
74
  return i < 2 && /*#__PURE__*/_react.default.createElement(_styles2.PastLogo, {
68
75
  key: business === null || business === void 0 ? void 0 : business.id,
@@ -80,20 +87,20 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
80
87
  width: "55px",
81
88
  height: "64px",
82
89
  loading: "lazy"
83
- }))), /*#__PURE__*/_react.default.createElement(_styles.BusinessInformation, null, /*#__PURE__*/_react.default.createElement(_styles2.WrapperBusinessTitle, null, /*#__PURE__*/_react.default.createElement("h2", null, (order === null || order === void 0 ? void 0 : (_order$business8 = order.business) === null || _order$business8 === void 0 ? void 0 : _order$business8.length) > 1 ? "".concat(t('GROUP_ORDER', 'Group Order'), " ").concat(t('No', 'No'), ". ").concat(order === null || order === void 0 ? void 0 : order.cart_group_id) : (_order$business9 = order.business) === null || _order$business9 === void 0 ? void 0 : _order$business9.name), !(order !== null && order !== void 0 && (_order$business10 = order.business) !== null && _order$business10 !== void 0 && _order$business10.length) && /*#__PURE__*/_react.default.createElement(_styles2.FavoriteWrapper, {
90
+ }))), /*#__PURE__*/_react.default.createElement(_styles.BusinessInformation, null, /*#__PURE__*/_react.default.createElement(_styles2.WrapperBusinessTitle, null, !hideBusinessName && /*#__PURE__*/_react.default.createElement("h2", null, (order === null || order === void 0 ? void 0 : (_order$business8 = order.business) === null || _order$business8 === void 0 ? void 0 : _order$business8.length) > 1 ? "".concat(t('GROUP_ORDER', 'Group Order'), " ").concat(t('No', 'No'), ". ").concat(order === null || order === void 0 ? void 0 : order.cart_group_id) : (_order$business9 = order.business) === null || _order$business9 === void 0 ? void 0 : _order$business9.name), !(order !== null && order !== void 0 && (_order$business10 = order.business) !== null && _order$business10 !== void 0 && _order$business10.length) && /*#__PURE__*/_react.default.createElement(_styles2.FavoriteWrapper, {
84
91
  onClick: function onClick() {
85
92
  return handleChangeFavorite(order);
86
93
  },
87
94
  className: "favorite"
88
- }, order !== null && order !== void 0 && order.favorite ? /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.HeartFill, null) : /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Heart, null))), /*#__PURE__*/_react.default.createElement(_styles2.OrderInfo, null, (order === null || order === void 0 ? void 0 : order.id) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("p", {
95
+ }, order !== null && order !== void 0 && order.favorite ? /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.HeartFill, null) : /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Heart, null))), /*#__PURE__*/_react.default.createElement(_styles2.OrderInfo, null, !hideOrderNumber && (order === null || order === void 0 ? void 0 : order.id) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("p", {
89
96
  name: "order_number"
90
97
  }, (order === null || order === void 0 ? void 0 : (_order$business11 = order.business) === null || _order$business11 === void 0 ? void 0 : _order$business11.length) > 1 ? "".concat(order === null || order === void 0 ? void 0 : (_order$business12 = order.business) === null || _order$business12 === void 0 ? void 0 : _order$business12.length, " ").concat(t('ORDERS', 'orders')) : "".concat(t('ORDER_NUM', 'Order No.'), " ").concat(order.id)), /*#__PURE__*/_react.default.createElement(_BsDot.default, {
91
98
  className: "dot"
92
- })), /*#__PURE__*/_react.default.createElement("p", null, order !== null && order !== void 0 && order.delivery_datetime_utc ? parseDate(order === null || order === void 0 ? void 0 : order.delivery_datetime_utc) : parseDate(order === null || order === void 0 ? void 0 : order.delivery_datetime, {
99
+ })), !hideDate && /*#__PURE__*/_react.default.createElement("p", null, order !== null && order !== void 0 && order.delivery_datetime_utc ? parseDate(order === null || order === void 0 ? void 0 : order.delivery_datetime_utc) : parseDate(order === null || order === void 0 ? void 0 : order.delivery_datetime, {
93
100
  utc: false
94
- }))), /*#__PURE__*/_react.default.createElement("p", {
101
+ }))), !hideOrderStatus && /*#__PURE__*/_react.default.createElement("p", {
95
102
  className: "status"
96
- }, (_getOrderStatus = getOrderStatus(order.status)) === null || _getOrderStatus === void 0 ? void 0 : _getOrderStatus.value))), /*#__PURE__*/_react.default.createElement(_styles2.Reorder, null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
103
+ }, (_getOrderStatus = getOrderStatus(order.status)) === null || _getOrderStatus === void 0 ? void 0 : _getOrderStatus.value))), /*#__PURE__*/_react.default.createElement(_styles2.Reorder, null, !hideReviewOrderButton && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
97
104
  outline: true,
98
105
  disabled: !!(order !== null && order !== void 0 && order.review),
99
106
  color: "primary",
@@ -101,7 +108,7 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
101
108
  onClick: function onClick() {
102
109
  return setOrderSelected(order);
103
110
  }
104
- }, !!(order !== null && order !== void 0 && order.review) ? t('REVIEWED', 'Reviewed') : t('REVIEW', 'Review')), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
111
+ }, !!(order !== null && order !== void 0 && order.review) ? t('REVIEWED', 'Reviewed') : t('REVIEW', 'Review')), !hideReorderButton && typeof (order === null || order === void 0 ? void 0 : order.id) === 'number' && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
105
112
  color: "primary",
106
113
  className: "reorder",
107
114
  outline: true,
@@ -26,12 +26,12 @@ var FavoriteWrapper = _styledComponents.default.div(_templateObject6 || (_templa
26
26
  return props.theme.colors.danger500;
27
27
  });
28
28
  exports.FavoriteWrapper = FavoriteWrapper;
29
- var PastLogo = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: 75px;\n height: 100%;\n ", "\n img {\n width: 100%;\n height: 100%;\n border-radius: 17px;\n object-fit: contain;\n }\n box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 10px;\n"])), function (_ref) {
29
+ var PastLogo = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: 75px;\n height: 100%;\n ", "\n img {\n width: 100%;\n height: 100%;\n border-radius: 17px;\n object-fit: contain;\n }\n box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 10px;\n display: none;\n\n @media (min-width: 480px) {\n display: block;\n }\n"])), function (_ref) {
30
30
  var isMulti = _ref.isMulti;
31
31
  return isMulti && (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n width: 55px;\n min-width: 55px;\n height: 55px;\n min-height: 55px;\n margin: 3px;\n "])));
32
32
  });
33
33
  exports.PastLogo = PastLogo;
34
- var WrapperBusinessTitle = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n width: 95%;\n display: flex;\n gap: 10px;\n"])));
34
+ var WrapperBusinessTitle = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n width: 95%;\n display: flex;\n gap: 10px;\n\n @media (min-width: 480px) {\n width: 80%;\n }\n"])));
35
35
  exports.WrapperBusinessTitle = WrapperBusinessTitle;
36
36
  var Reorder = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 20%;\n text-align: center;\n align-items: center;\n justify-content: center;\n font-size: 0.8em;\n\n button {\n border-radius: 8px;\n font-size: 10px;\n line-height: 15px;\n padding: 10px;\n overflow: inherit;\n text-overflow: inherit;\n border: 1px solid ", ";\n margin: 5px 0;\n\n &.reorder {\n background: ", ";\n &:hover {\n background: ", ";\n }\n }\n }\n\n ", "\n\n p {\n color: #53ad26;\n margin-block-start: 0;\n margin-block-end: 0;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2; /* number of lines to show */\n -webkit-box-orient: vertical;\n }\n @media (min-width: 480px){\n font-size: 1em;\n button{\n width: 90%;\n font-size: 0.9em;\n }\n flex-direction: row;\n gap: 10px;\n margin-right: 25px;\n }\n\n @media (min-width: 768px){\n ", "\n button{\n width: 80%;\n }\n }\n\n @media (min-width: 1024px){\n button{\n width: 50%;\n }\n }\n"])), function (props) {
37
37
  return props.theme.colors.primaryContrast;
@@ -65,6 +65,7 @@ var ThemeProvider = function ThemeProvider(_ref) {
65
65
  font.rel = 'stylesheet';
66
66
  font.async = true;
67
67
  font.defer = true;
68
+ font.name = fontFamily.name;
68
69
  font.href = "https://fonts.googleapis.com/css2?family=".concat(fontFamily.name, ":wght@").concat(fontFamily.weights.join(';'), "&display=swap");
69
70
  window.document.body.appendChild(font);
70
71
  }
@@ -37,7 +37,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
37
37
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
38
38
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
39
39
  var AddressListUI = function AddressListUI(props) {
40
- var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderingTheme$theme$5, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _orderingTheme$theme9, _orderingTheme$theme10, _orderingTheme$theme11, _orderingTheme$theme12, _orderingTheme$theme13, _orderingTheme$theme14, _orderingTheme$theme15, _orderingTheme$theme16, _orderingTheme$theme17, _orderingTheme$theme18, _orderingTheme$theme19, _orderingTheme$theme20, _orderingTheme$theme21, _orderingTheme$theme22, _orderingTheme$theme23, _orderingTheme$theme24, _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
40
+ var _theme$profile, _theme$profile$compon, _theme$profile$compon2, _theme$profile$compon3, _theme$profile$compon4, _theme$profile2, _theme$profile2$compo, _theme$profile2$compo2, _theme$profile2$compo3, _theme$profile2$compo4, _theme$profile3, _theme$profile3$compo, _theme$profile3$compo2, _theme$profile3$compo3, _theme$profile3$compo4, _theme$profile4, _theme$profile4$compo, _theme$profile4$compo2, _theme$profile4$compo3, _theme$profile4$compo4, _theme$profile5, _theme$profile5$compo, _theme$profile5$compo2, _theme$profile5$compo3, _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
41
41
  var actionStatus = props.actionStatus,
42
42
  addressList = props.addressList,
43
43
  handleDelete = props.handleDelete,
@@ -95,11 +95,11 @@ var AddressListUI = function AddressListUI(props) {
95
95
  return address.address === obj.address && address.address_notes === obj.address_notes && address.zipcode === obj.zipcode && address.internal_number === obj.internal_number;
96
96
  });
97
97
  }) || [];
98
- var showAddress = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme = orderingTheme.theme) !== null && _orderingTheme$theme !== void 0 && (_orderingTheme$theme$ = _orderingTheme$theme.profile) !== null && _orderingTheme$theme$ !== void 0 && (_orderingTheme$theme$2 = _orderingTheme$theme$.components) !== null && _orderingTheme$theme$2 !== void 0 && (_orderingTheme$theme$3 = _orderingTheme$theme$2.address_list) !== null && _orderingTheme$theme$3 !== void 0 && (_orderingTheme$theme$4 = _orderingTheme$theme$3.components) !== null && _orderingTheme$theme$4 !== void 0 && (_orderingTheme$theme$5 = _orderingTheme$theme$4.address) !== null && _orderingTheme$theme$5 !== void 0 && _orderingTheme$theme$5.hidden);
99
- var showIcons = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme2 = orderingTheme.theme) !== null && _orderingTheme$theme2 !== void 0 && (_orderingTheme$theme3 = _orderingTheme$theme2.profile) !== null && _orderingTheme$theme3 !== void 0 && (_orderingTheme$theme4 = _orderingTheme$theme3.components) !== null && _orderingTheme$theme4 !== void 0 && (_orderingTheme$theme5 = _orderingTheme$theme4.address_list) !== null && _orderingTheme$theme5 !== void 0 && (_orderingTheme$theme6 = _orderingTheme$theme5.components) !== null && _orderingTheme$theme6 !== void 0 && (_orderingTheme$theme7 = _orderingTheme$theme6.icons) !== null && _orderingTheme$theme7 !== void 0 && _orderingTheme$theme7.hidden);
100
- var showZipcode = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme8 = orderingTheme.theme) !== null && _orderingTheme$theme8 !== void 0 && (_orderingTheme$theme9 = _orderingTheme$theme8.profile) !== null && _orderingTheme$theme9 !== void 0 && (_orderingTheme$theme10 = _orderingTheme$theme9.components) !== null && _orderingTheme$theme10 !== void 0 && (_orderingTheme$theme11 = _orderingTheme$theme10.address_list) !== null && _orderingTheme$theme11 !== void 0 && (_orderingTheme$theme12 = _orderingTheme$theme11.components) !== null && _orderingTheme$theme12 !== void 0 && (_orderingTheme$theme13 = _orderingTheme$theme12.zipcode) !== null && _orderingTheme$theme13 !== void 0 && _orderingTheme$theme13.hidden);
101
- var showInternalNumber = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme14 = orderingTheme.theme) !== null && _orderingTheme$theme14 !== void 0 && (_orderingTheme$theme15 = _orderingTheme$theme14.profile) !== null && _orderingTheme$theme15 !== void 0 && (_orderingTheme$theme16 = _orderingTheme$theme15.components) !== null && _orderingTheme$theme16 !== void 0 && (_orderingTheme$theme17 = _orderingTheme$theme16.address_list) !== null && _orderingTheme$theme17 !== void 0 && (_orderingTheme$theme18 = _orderingTheme$theme17.components) !== null && _orderingTheme$theme18 !== void 0 && (_orderingTheme$theme19 = _orderingTheme$theme18.internal_number) !== null && _orderingTheme$theme19 !== void 0 && _orderingTheme$theme19.hidden);
102
- var notFoundImage = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme20 = orderingTheme.theme) === null || _orderingTheme$theme20 === void 0 ? void 0 : (_orderingTheme$theme21 = _orderingTheme$theme20.profile) === null || _orderingTheme$theme21 === void 0 ? void 0 : (_orderingTheme$theme22 = _orderingTheme$theme21.components) === null || _orderingTheme$theme22 === void 0 ? void 0 : (_orderingTheme$theme23 = _orderingTheme$theme22.address_list) === null || _orderingTheme$theme23 === void 0 ? void 0 : (_orderingTheme$theme24 = _orderingTheme$theme23.components) === null || _orderingTheme$theme24 === void 0 ? void 0 : _orderingTheme$theme24.image;
98
+ var showAddress = !(theme !== null && theme !== void 0 && (_theme$profile = theme.profile) !== null && _theme$profile !== void 0 && (_theme$profile$compon = _theme$profile.components) !== null && _theme$profile$compon !== void 0 && (_theme$profile$compon2 = _theme$profile$compon.address_list) !== null && _theme$profile$compon2 !== void 0 && (_theme$profile$compon3 = _theme$profile$compon2.components) !== null && _theme$profile$compon3 !== void 0 && (_theme$profile$compon4 = _theme$profile$compon3.address) !== null && _theme$profile$compon4 !== void 0 && _theme$profile$compon4.hidden);
99
+ var showIcons = !(theme !== null && theme !== void 0 && (_theme$profile2 = theme.profile) !== null && _theme$profile2 !== void 0 && (_theme$profile2$compo = _theme$profile2.components) !== null && _theme$profile2$compo !== void 0 && (_theme$profile2$compo2 = _theme$profile2$compo.address_list) !== null && _theme$profile2$compo2 !== void 0 && (_theme$profile2$compo3 = _theme$profile2$compo2.components) !== null && _theme$profile2$compo3 !== void 0 && (_theme$profile2$compo4 = _theme$profile2$compo3.icons) !== null && _theme$profile2$compo4 !== void 0 && _theme$profile2$compo4.hidden);
100
+ var showZipcode = !(theme !== null && theme !== void 0 && (_theme$profile3 = theme.profile) !== null && _theme$profile3 !== void 0 && (_theme$profile3$compo = _theme$profile3.components) !== null && _theme$profile3$compo !== void 0 && (_theme$profile3$compo2 = _theme$profile3$compo.address_list) !== null && _theme$profile3$compo2 !== void 0 && (_theme$profile3$compo3 = _theme$profile3$compo2.components) !== null && _theme$profile3$compo3 !== void 0 && (_theme$profile3$compo4 = _theme$profile3$compo3.zipcode) !== null && _theme$profile3$compo4 !== void 0 && _theme$profile3$compo4.hidden);
101
+ var showInternalNumber = !(theme !== null && theme !== void 0 && (_theme$profile4 = theme.profile) !== null && _theme$profile4 !== void 0 && (_theme$profile4$compo = _theme$profile4.components) !== null && _theme$profile4$compo !== void 0 && (_theme$profile4$compo2 = _theme$profile4$compo.address_list) !== null && _theme$profile4$compo2 !== void 0 && (_theme$profile4$compo3 = _theme$profile4$compo2.components) !== null && _theme$profile4$compo3 !== void 0 && (_theme$profile4$compo4 = _theme$profile4$compo3.internal_number) !== null && _theme$profile4$compo4 !== void 0 && _theme$profile4$compo4.hidden);
102
+ var notFoundImage = theme === null || theme === void 0 ? void 0 : (_theme$profile5 = theme.profile) === null || _theme$profile5 === void 0 ? void 0 : (_theme$profile5$compo = _theme$profile5.components) === null || _theme$profile5$compo === void 0 ? void 0 : (_theme$profile5$compo2 = _theme$profile5$compo.address_list) === null || _theme$profile5$compo2 === void 0 ? void 0 : (_theme$profile5$compo3 = _theme$profile5$compo2.components) === null || _theme$profile5$compo3 === void 0 ? void 0 : _theme$profile5$compo3.image;
103
103
  var openAddress = function openAddress(address) {
104
104
  setCurAddress(address);
105
105
  setAddressOpen(true);
@@ -197,7 +197,8 @@ var AddressListUI = function AddressListUI(props) {
197
197
  var AddressListCallcenterLayout = function AddressListCallcenterLayout(_ref) {
198
198
  var children = _ref.children;
199
199
  return /*#__PURE__*/_react.default.createElement(_styles.AddressHalfContainer, null, /*#__PURE__*/_react.default.createElement(_styles.List, {
200
- halfWidth: addressOpen
200
+ halfWidth: addressOpen,
201
+ id: "address_list"
201
202
  }, children), addressOpen && /*#__PURE__*/_react.default.createElement(_styles.AddressFormContainer, {
202
203
  isCustomerMode: isCustomerMode
203
204
  }, /*#__PURE__*/_react.default.createElement(_styles.TitleFormContainer, null, /*#__PURE__*/_react.default.createElement(_styles.CloseIcon, null, /*#__PURE__*/_react.default.createElement(_MdClose.default, {
@@ -26,7 +26,6 @@ var _dayjs = _interopRequireDefault(require("dayjs"));
26
26
  var _timezone = _interopRequireDefault(require("dayjs/plugin/timezone"));
27
27
  var _isBetween = _interopRequireDefault(require("dayjs/plugin/isBetween"));
28
28
  var _useWindowSize = require("../../../../../hooks/useWindowSize");
29
- var _BsCaretLeftFill = _interopRequireDefault(require("@meronex/icons/bs/BsCaretLeftFill"));
30
29
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31
30
  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); }
32
31
  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; }
@@ -57,10 +56,7 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
57
56
  handleChangeSortBy = props.handleChangeSortBy,
58
57
  categoryState = props.categoryState,
59
58
  errorQuantityProducts = props.errorQuantityProducts,
60
- isCustomerMode = props.isCustomerMode,
61
- categoryClicked = props.categoryClicked,
62
- categorySelected = props.categorySelected,
63
- setCategoryClicked = props.setCategoryClicked;
59
+ isCustomerMode = props.isCustomerMode;
64
60
  var business = businessState.business,
65
61
  loading = businessState.loading;
66
62
  var theme = (0, _styledComponents.useTheme)();
@@ -146,13 +142,24 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
146
142
  }, [openSearchProducts]);
147
143
  var handleScroll = function handleScroll() {
148
144
  var searchElement = document.getElementById('search-component');
149
- if (!searchElement) return;
150
- var limit = window.pageYOffset >= (searchElement === null || searchElement === void 0 ? void 0 : searchElement.offsetTop) && window.pageYOffset > 0;
151
- if (limit) {
152
- var classAdded = searchElement.classList.contains('fixed-search');
153
- !classAdded && searchElement.classList.add('fixed-search');
154
- } else {
155
- searchElement && searchElement.classList.remove('fixed-search');
145
+ if (searchElement) {
146
+ var limit = window.pageYOffset >= (searchElement === null || searchElement === void 0 ? void 0 : searchElement.offsetTop) && window.pageYOffset > 0;
147
+ if (limit) {
148
+ var classAdded = searchElement.classList.contains('fixed-search');
149
+ !classAdded && searchElement.classList.add('fixed-search');
150
+ } else {
151
+ searchElement && searchElement.classList.remove('fixed-search');
152
+ }
153
+ }
154
+ var businessNameElement = document.getElementById('business_name');
155
+ if (businessNameElement) {
156
+ var _limit = window.pageYOffset >= (businessNameElement === null || businessNameElement === void 0 ? void 0 : businessNameElement.offsetTop) - 55 && window.pageYOffset > 0;
157
+ if (_limit && windowSize.width < 993) {
158
+ var _classAdded = businessNameElement.classList.contains('fixed-name');
159
+ !_classAdded && businessNameElement.classList.add('fixed-name');
160
+ } else {
161
+ businessNameElement && businessNameElement.classList.remove('fixed-name');
162
+ }
156
163
  }
157
164
  };
158
165
  (0, _react.useEffect)(function () {
@@ -160,7 +167,7 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
160
167
  return function () {
161
168
  return window.removeEventListener('scroll', handleScroll);
162
169
  };
163
- }, []);
170
+ }, [windowSize === null || windowSize === void 0 ? void 0 : windowSize.width]);
164
171
  (0, _react.useEffect)(function () {
165
172
  window.scroll({
166
173
  top: window.scrollY - 1,
@@ -169,13 +176,8 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
169
176
  }, [sortByValue]);
170
177
  var SearchComponent = function SearchComponent() {
171
178
  return /*#__PURE__*/_react.default.createElement(_styles.WrapperSearch, {
172
- id: "search-component",
173
- isFlexEnd: windowSize.width >= 768
174
- }, (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.name) && windowSize.width < 768 && /*#__PURE__*/_react.default.createElement(_styles.CategorySelectedContainer, {
175
- onClick: function onClick() {
176
- return setCategoryClicked(false);
177
- }
178
- }, /*#__PURE__*/_react.default.createElement(_BsCaretLeftFill.default, null), " ", categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.name), /*#__PURE__*/_react.default.createElement(_styles.SearchWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.SearchIconWrapper, {
179
+ id: "search-component"
180
+ }, /*#__PURE__*/_react.default.createElement(_styles.SearchWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.SearchIconWrapper, {
179
181
  onClick: function onClick() {
180
182
  return setOpenSearchProducts(true);
181
183
  }
@@ -208,7 +210,8 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
208
210
  }, /*#__PURE__*/_react.default.createElement(_styles.BusinessInfoItem, {
209
211
  isInfoShrunken: isInfoShrunken
210
212
  }, !loading ? /*#__PURE__*/_react.default.createElement(_styles.TitleWrapper, null, /*#__PURE__*/_react.default.createElement("h2", {
211
- className: "bold"
213
+ className: "bold",
214
+ id: "business_name"
212
215
  }, business === null || business === void 0 ? void 0 : business.name), (business === null || business === void 0 ? void 0 : (_business$ribbon = business.ribbon) === null || _business$ribbon === void 0 ? void 0 : _business$ribbon.enabled) && /*#__PURE__*/_react.default.createElement(_styles.RibbonBox, {
213
216
  bgColor: business === null || business === void 0 ? void 0 : (_business$ribbon2 = business.ribbon) === null || _business$ribbon2 === void 0 ? void 0 : _business$ribbon2.color,
214
217
  colorText: (0, _utils.lightenDarkenColor)(business === null || business === void 0 ? void 0 : (_business$ribbon3 = business.ribbon) === null || _business$ribbon3 === void 0 ? void 0 : _business$ribbon3.color),
@@ -284,7 +287,10 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
284
287
  }
285
288
  }, t('REVIEWS', 'Reviews'))) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
286
289
  width: isCustomerMode ? 100 : 150
287
- })))), !hideSearch && ((categoryState === null || categoryState === void 0 ? void 0 : (_categoryState$produc = categoryState.products) === null || _categoryState$produc === void 0 ? void 0 : _categoryState$produc.length) !== 0 || searchValue) && !errorQuantityProducts && !isInfoShrunken && !(business !== null && business !== void 0 && (_business$professiona = business.professionals) !== null && _business$professiona !== void 0 && _business$professiona.length) && (categoryClicked || windowSize.width >= 993) && /*#__PURE__*/_react.default.createElement(SearchComponent, null));
290
+ })))), !hideSearch && ((categoryState === null || categoryState === void 0 ? void 0 : (_categoryState$produc = categoryState.products) === null || _categoryState$produc === void 0 ? void 0 : _categoryState$produc.length) !== 0 || searchValue) && !errorQuantityProducts && !isInfoShrunken && !(business !== null && business !== void 0 && (_business$professiona = business.professionals) !== null && _business$professiona !== void 0 && _business$professiona.length) &&
291
+ /*#__PURE__*/
292
+ // (categoryClicked || windowSize.width >= 993) &&
293
+ _react.default.createElement(SearchComponent, null));
288
294
  };
289
295
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (_props$beforeElements = props.beforeElements) === null || _props$beforeElements === void 0 ? void 0 : _props$beforeElements.map(function (BeforeElement, i) {
290
296
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.WrapperSearch = exports.WrapperFloatingSearch = exports.WrapperBusinessLogo = exports.TitleWrapper = exports.SocialList = exports.SearchWrapper = exports.SearchIconWrapper = exports.SearchComponentContainer = exports.RibbonBox = exports.IconWrapper = exports.CategorySelectedContainer = exports.BusinessMoreDetail = exports.BusinessLogo = exports.BusinessInfoWrapper = exports.BusinessInfoItem = exports.BusinessInfoContent = exports.BusinessInfoContainer = exports.BusinessInfo = exports.BusinessDetail = exports.BusinessContent = exports.BusinessContainer = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
10
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46;
10
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48;
11
11
  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); }
12
12
  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; }
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -70,9 +70,7 @@ var BusinessInfoContent = _styledComponents.default.div(_templateObject15 || (_t
70
70
  exports.BusinessInfoContent = BusinessInfoContent;
71
71
  var SearchWrapper = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n display: flex;\n"])));
72
72
  exports.SearchWrapper = SearchWrapper;
73
- var WrapperSearch = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n margin: 15px 0px 0px;\n display: flex;\n align-items: center;\n justify-content: ", ";\n box-sizing: border-box;\n\n .search-bar {\n margin-right: 10px;\n ", "\n input {\n width: 100%;\n\n @media (min-width: 500px) {\n width: 250px;\n }\n }\n }\n\n div:last-child {\n text-align: right;\n\n ", "\n }\n\n #select-input {\n background-color: transparent !important;\n border: none;\n color: #748194 !important;\n\n #list {\n border-radius: 8px;\n }\n }\n &.fixed-search {\n position: fixed;\n top: 0;\n left: 0;\n z-index: 1002;\n width: 100vw;\n margin-top: 0px;\n background-color: ", ";\n padding: 10px;\n }\n"])), function (props) {
74
- return props.isFlexEnd ? 'flex-end' : 'space-between';
75
- }, function (props) {
73
+ var WrapperSearch = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n margin: 15px 0px 0px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n box-sizing: border-box;\n z-index: 1002;\n\n .search-bar {\n margin-right: 10px;\n ", "\n input {\n width: 100%;\n\n @media (min-width: 500px) {\n width: 250px;\n }\n }\n }\n\n div:last-child {\n text-align: right;\n\n ", "\n }\n\n #select-input {\n background-color: transparent !important;\n border: none;\n color: #748194 !important;\n\n #list {\n border-radius: 8px;\n }\n }\n &.fixed-search {\n position: fixed;\n top: 0;\n right: 0;\n z-index: 1002;\n width: fit-content;\n margin-top: 0px;\n background-color: ", ";\n padding: 10px;\n }\n\n @media (min-width: 993px) {\n &.fixed-search {\n left: 0;\n width: 100vw;\n }\n }\n"])), function (props) {
76
74
  var _props$theme4;
77
75
  return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n margin-left: 10px;\n margin-right: 0;\n "])));
78
76
  }, function (props) {
@@ -112,64 +110,67 @@ var BusinessMoreDetail = _styledComponents.default.div(_templateObject27 || (_te
112
110
  return props.position ? 'black' : 'white';
113
111
  });
114
112
  exports.BusinessMoreDetail = BusinessMoreDetail;
115
- var TitleWrapper = _styledComponents.default.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n\n h2 {\n font-size: 24px;\n line-height: 36px;\n margin: 0 0 10px 0;\n font-weight: 600;\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n @media (min-width: 768px) {\n font-size: 32px;\n }\n }\n"])));
113
+ var TitleWrapper = _styledComponents.default.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n\n h2 {\n font-size: 24px;\n line-height: 36px;\n margin: 0 0 10px 0;\n font-weight: 600;\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n &.fixed-name {\n z-index: 1002;\n position: fixed;\n top: 0;\n width: calc(100vw - 190px);\n padding: 10px 0;\n font-size: 18px;\n ", "\n }\n @media (min-width: 768px) {\n font-size: 32px;\n }\n }\n"])), function (props) {
114
+ var _props$theme11;
115
+ return (_props$theme11 = props.theme) !== null && _props$theme11 !== void 0 && _props$theme11.rtl ? (0, _styledComponents.css)(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n right: 50px;\n "]))) : (0, _styledComponents.css)(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n left: 50px;\n "])));
116
+ });
116
117
  exports.TitleWrapper = TitleWrapper;
117
- var RibbonBox = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n padding: 2px 8px;\n box-sizing: border-box;\n z-index: 10;\n color: ", ";\n font-weight: 400;\n font-size: 10px;\n line-height: 13px;\n background-color: ", ";\n max-width: 200px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n margin-left: 5px;\n margin-bottom: 10px;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
118
+ var RibbonBox = _styledComponents.default.div(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n padding: 2px 8px;\n box-sizing: border-box;\n z-index: 10;\n color: ", ";\n font-weight: 400;\n font-size: 10px;\n line-height: 13px;\n background-color: ", ";\n max-width: 200px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n margin-left: 5px;\n margin-bottom: 10px;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
118
119
  return props.theme.colors.colorTextSignForm;
119
120
  }, function (props) {
120
121
  return props.theme.colors.primary;
121
122
  }, function (props) {
122
- return props.theme.rtl && (0, _styledComponents.css)(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n margin-left: 0px;\n margin-right: 5px;\n "])));
123
+ return props.theme.rtl && (0, _styledComponents.css)(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n margin-left: 0px;\n margin-right: 5px;\n "])));
123
124
  }, function (_ref4) {
124
125
  var bgColor = _ref4.bgColor;
125
- return bgColor && (0, _styledComponents.css)(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), bgColor);
126
+ return bgColor && (0, _styledComponents.css)(_templateObject35 || (_templateObject35 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), bgColor);
126
127
  }, function (_ref5) {
127
128
  var isRoundRect = _ref5.isRoundRect;
128
- return isRoundRect && (0, _styledComponents.css)(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n border-radius: 7.6px;\n "])));
129
+ return isRoundRect && (0, _styledComponents.css)(_templateObject36 || (_templateObject36 = _taggedTemplateLiteral(["\n border-radius: 7.6px;\n "])));
129
130
  }, function (_ref6) {
130
131
  var isCapsule = _ref6.isCapsule;
131
- return isCapsule && (0, _styledComponents.css)(_templateObject35 || (_templateObject35 = _taggedTemplateLiteral(["\n border-radius: 50px;\n "])));
132
+ return isCapsule && (0, _styledComponents.css)(_templateObject37 || (_templateObject37 = _taggedTemplateLiteral(["\n border-radius: 50px;\n "])));
132
133
  }, function (_ref7) {
133
134
  var colorText = _ref7.colorText;
134
- return colorText && (0, _styledComponents.css)(_templateObject36 || (_templateObject36 = _taggedTemplateLiteral(["\n color: ", ";\n "])), colorText ? 'black' : 'white');
135
+ return colorText && (0, _styledComponents.css)(_templateObject38 || (_templateObject38 = _taggedTemplateLiteral(["\n color: ", ";\n "])), colorText ? 'black' : 'white');
135
136
  }, function (_ref8) {
136
137
  var borderRibbon = _ref8.borderRibbon;
137
- return borderRibbon && (0, _styledComponents.css)(_templateObject37 || (_templateObject37 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n "])), borderRibbon ? 'black' : 'white');
138
+ return borderRibbon && (0, _styledComponents.css)(_templateObject39 || (_templateObject39 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n "])), borderRibbon ? 'black' : 'white');
138
139
  });
139
140
  exports.RibbonBox = RibbonBox;
140
- var SearchIconWrapper = _styledComponents.default.div(_templateObject38 || (_templateObject38 = _taggedTemplateLiteral(["\n cursor: pointer;\n background-color: ", ";\n width: 36px;\n height: 36px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n\n svg {\n font-size: 18px;\n }\n"])), function (props) {
141
+ var SearchIconWrapper = _styledComponents.default.div(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["\n cursor: pointer;\n background-color: ", ";\n width: 36px;\n height: 36px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n\n svg {\n font-size: 18px;\n }\n"])), function (props) {
141
142
  return props.theme.colors.gray200;
142
143
  });
143
144
  exports.SearchIconWrapper = SearchIconWrapper;
144
- var SearchComponentContainer = _styledComponents.default.div(_templateObject39 || (_templateObject39 = _taggedTemplateLiteral(["\n position: absolute;\n top: 10px;\n right: 60px;\n color: ", ";\n #select-input {\n color: #FFFFFF !important;\n }\n svg {\n color: #FFFFFF;\n }\n"])), function (_ref9) {
145
+ var SearchComponentContainer = _styledComponents.default.div(_templateObject41 || (_templateObject41 = _taggedTemplateLiteral(["\n position: absolute;\n top: 10px;\n right: 60px;\n color: ", ";\n #select-input {\n color: #FFFFFF !important;\n }\n svg {\n color: #FFFFFF;\n }\n"])), function (_ref9) {
145
146
  var theme = _ref9.theme;
146
147
  return theme.colors.white;
147
148
  });
148
149
  exports.SearchComponentContainer = SearchComponentContainer;
149
- var SocialList = _styledComponents.default.div(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-left: -3px;\n ", "\n"])), function (props) {
150
- return props.theme.rtl && (0, _styledComponents.css)(_templateObject41 || (_templateObject41 = _taggedTemplateLiteral(["\n margin-right: -3px;\n margin-left: 0px;\n "])));
150
+ var SocialList = _styledComponents.default.div(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-left: -3px;\n ", "\n"])), function (props) {
151
+ return props.theme.rtl && (0, _styledComponents.css)(_templateObject43 || (_templateObject43 = _taggedTemplateLiteral(["\n margin-right: -3px;\n margin-left: 0px;\n "])));
151
152
  });
152
153
  exports.SocialList = SocialList;
153
- var CategorySelectedContainer = _styledComponents.default.div(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["\n display: inline;\n margin-left: 10px;\n color: ", ";\n padding-right: 5px;\n cursor: pointer;\n p{\n margin: 0;\n }\n svg {\n position: relative;\n top: 2px;\n margin-right: 3px;\n width: 14px;\n height: 14px;\n }\n"])), function (_ref10) {
154
+ var CategorySelectedContainer = _styledComponents.default.div(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["\n display: inline;\n margin-left: 10px;\n color: ", ";\n padding-right: 5px;\n cursor: pointer;\n p{\n margin: 0;\n }\n svg {\n position: relative;\n top: 2px;\n margin-right: 3px;\n width: 14px;\n height: 14px;\n }\n"])), function (_ref10) {
154
155
  var _theme$colors;
155
156
  var theme = _ref10.theme;
156
157
  return theme === null || theme === void 0 ? void 0 : (_theme$colors = theme.colors) === null || _theme$colors === void 0 ? void 0 : _theme$colors.primary;
157
158
  });
158
159
  exports.CategorySelectedContainer = CategorySelectedContainer;
159
- var IconWrapper = _styledComponents.default.a(_templateObject43 || (_templateObject43 = _taggedTemplateLiteral(["\n margin: 0px 3px 10px 3px;\n border-radius: 3px;\n border: 0.5px solid ", ";\n width: 27px;\n height: 27px;\n min-width: 27px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: all 0.2s linear;\n\n ", "\n\n svg {\n height: 18px;\n font-size: 18px;\n transition: all 0.2s ease-in;\n color: ", ";\n }\n &:hover {\n background-color: ", ";\n svg {\n transform: scale(1.07);\n }\n }\n"])), function (props) {
160
+ var IconWrapper = _styledComponents.default.a(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["\n margin: 0px 3px 10px 3px;\n border-radius: 3px;\n border: 0.5px solid ", ";\n width: 27px;\n height: 27px;\n min-width: 27px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: all 0.2s linear;\n\n ", "\n\n svg {\n height: 18px;\n font-size: 18px;\n transition: all 0.2s ease-in;\n color: ", ";\n }\n &:hover {\n background-color: ", ";\n svg {\n transform: scale(1.07);\n }\n }\n"])), function (props) {
160
161
  return props.theme.colors.gray200;
161
162
  }, function (_ref11) {
162
163
  var isSkeleton = _ref11.isSkeleton;
163
- return isSkeleton && (0, _styledComponents.css)(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["\n border: none;\n "])));
164
+ return isSkeleton && (0, _styledComponents.css)(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["\n border: none;\n "])));
164
165
  }, function (props) {
165
166
  return props.theme.colors.headingColor;
166
167
  }, function (props) {
167
168
  return props.theme.colors.gray200;
168
169
  });
169
170
  exports.IconWrapper = IconWrapper;
170
- var BusinessInfoWrapper = _styledComponents.default.div(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column-reverse;\n @media (min-width: 768px) {\n flex-direction: column;\n }\n"])));
171
+ var BusinessInfoWrapper = _styledComponents.default.div(_templateObject47 || (_templateObject47 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column-reverse;\n @media (min-width: 768px) {\n flex-direction: column;\n }\n"])));
171
172
  exports.BusinessInfoWrapper = BusinessInfoWrapper;
172
- var WrapperFloatingSearch = _styledComponents.default.div(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["\n position: absolute;\n color: ", ";\n display: flex;\n background: rgba(0,0,0,0.2);\n top: 80px;\n right: 10px;\n width: 80%;\n border-bottom: 1px solid #FFFFFF;\n #select-input {\n color: #FFFFFF !important;\n background: transparent;\n }\n svg, span {\n color: #FFFFFF !important;\n }\n @media (min-width: 681px){\n top: 23px;\n right: 60px;\n width: 300px;\n input {\n width: 80%;\n }\n }\n"])), function (_ref12) {
173
+ var WrapperFloatingSearch = _styledComponents.default.div(_templateObject48 || (_templateObject48 = _taggedTemplateLiteral(["\n position: absolute;\n color: ", ";\n display: flex;\n background: rgba(0,0,0,0.2);\n top: 80px;\n right: 10px;\n width: 80%;\n border-bottom: 1px solid #FFFFFF;\n #select-input {\n color: #FFFFFF !important;\n background: transparent;\n }\n svg, span {\n color: #FFFFFF !important;\n }\n @media (min-width: 681px){\n top: 23px;\n right: 60px;\n width: 300px;\n input {\n width: 80%;\n }\n }\n"])), function (_ref12) {
173
174
  var theme = _ref12.theme;
174
175
  return theme.colors.white;
175
176
  });
@@ -35,7 +35,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
35
35
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
36
36
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
37
  var BusinessControllerUI = function BusinessControllerUI(props) {
38
- var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _theme$business_listi4, _theme$business_listi5, _theme$business_listi6, _theme$business_listi7, _theme$business_listi8, _theme$business_listi9, _theme$business_listi10, _theme$business_listi11, _theme$business_listi12, _theme$business_listi13, _theme$business_listi14, _theme$business_listi15, _theme$business_listi16, _theme$business_listi17, _theme$business_listi18, _theme$business_listi19, _theme$business_listi20, _theme$business_listi21, _theme$business_listi22, _theme$business_listi23, _theme$business_listi24, _theme$business_listi25, _theme$business_listi26, _theme$business_listi27, _theme$business_listi28, _theme$business_listi29, _theme$business_listi30, _theme$business_listi31, _theme$business_listi32, _theme$business_listi33, _theme$business_listi34, _theme$business_listi35, _business$available_d, _business$busy_driver, _business$active_orde, _business$ribbon, _business$ribbon2, _business$ribbon3, _business$ribbon4, _business$ribbon5, _business$ribbon6, _business$ribbon7, _theme$images, _theme$images$dummies, _configState$configs, _configState$configs$, _orderState$options, _theme$images2, _theme$images2$dummie, _theme$images3, _theme$images3$dummie, _business$reviews, _business$reviews2, _businessState$busine2, _orderState$options2, _business$available_d2, _business$available_d3, _business$busy_driver2, _business$busy_driver3, _business$active_orde2, _business$active_orde3, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4;
38
+ var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _theme$business_listi4, _theme$business_listi5, _theme$business_listi6, _theme$business_listi7, _theme$business_listi8, _theme$business_listi9, _theme$business_listi10, _theme$business_listi11, _theme$business_listi12, _theme$business_listi13, _theme$business_listi14, _theme$business_listi15, _theme$business_listi16, _theme$business_listi17, _theme$business_listi18, _theme$business_listi19, _theme$business_listi20, _theme$business_listi21, _theme$business_listi22, _theme$business_listi23, _theme$business_listi24, _theme$business_listi25, _theme$business_listi26, _theme$business_listi27, _theme$business_listi28, _theme$business_listi29, _theme$business_listi30, _theme$business_listi31, _theme$business_listi32, _theme$business_listi33, _theme$business_listi34, _theme$business_listi35, _theme$business_listi36, _theme$business_listi37, _theme$business_listi38, _theme$business_listi39, _theme$business_listi40, _theme$business_listi41, _theme$business_listi42, _theme$business_listi43, _theme$business_listi44, _theme$business_listi45, _business$available_d, _business$busy_driver, _business$active_orde, _business$ribbon, _business$ribbon2, _business$ribbon3, _business$ribbon4, _business$ribbon5, _business$ribbon6, _business$ribbon7, _theme$images, _theme$images$dummies, _configState$configs, _configState$configs$, _orderState$options, _theme$images2, _theme$images2$dummie, _theme$images3, _theme$images3$dummie, _business$reviews, _business$reviews2, _businessState$busine2, _orderState$options2, _business$available_d2, _business$available_d3, _business$busy_driver2, _business$busy_driver3, _business$active_orde2, _business$active_orde3, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4;
39
39
  var isSkeleton = props.isSkeleton,
40
40
  business = props.business,
41
41
  getBusinessOffer = props.getBusinessOffer,
@@ -108,6 +108,8 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
108
108
  var hideBusinessReviews = theme === null || theme === void 0 ? void 0 : (_theme$business_listi21 = theme.business_listing_view) === null || _theme$business_listi21 === void 0 ? void 0 : (_theme$business_listi22 = _theme$business_listi21.components) === null || _theme$business_listi22 === void 0 ? void 0 : (_theme$business_listi23 = _theme$business_listi22.business) === null || _theme$business_listi23 === void 0 ? void 0 : (_theme$business_listi24 = _theme$business_listi23.components) === null || _theme$business_listi24 === void 0 ? void 0 : (_theme$business_listi25 = _theme$business_listi24.reviews) === null || _theme$business_listi25 === void 0 ? void 0 : _theme$business_listi25.hidden;
109
109
  var hideBusinessFavorite = theme === null || theme === void 0 ? void 0 : (_theme$business_listi26 = theme.business_listing_view) === null || _theme$business_listi26 === void 0 ? void 0 : (_theme$business_listi27 = _theme$business_listi26.components) === null || _theme$business_listi27 === void 0 ? void 0 : (_theme$business_listi28 = _theme$business_listi27.business) === null || _theme$business_listi28 === void 0 ? void 0 : (_theme$business_listi29 = _theme$business_listi28.components) === null || _theme$business_listi29 === void 0 ? void 0 : (_theme$business_listi30 = _theme$business_listi29.favorite) === null || _theme$business_listi30 === void 0 ? void 0 : _theme$business_listi30.hidden;
110
110
  var hideBusinessOffer = theme === null || theme === void 0 ? void 0 : (_theme$business_listi31 = theme.business_listing_view) === null || _theme$business_listi31 === void 0 ? void 0 : (_theme$business_listi32 = _theme$business_listi31.components) === null || _theme$business_listi32 === void 0 ? void 0 : (_theme$business_listi33 = _theme$business_listi32.business) === null || _theme$business_listi33 === void 0 ? void 0 : (_theme$business_listi34 = _theme$business_listi33.components) === null || _theme$business_listi34 === void 0 ? void 0 : (_theme$business_listi35 = _theme$business_listi34.offer) === null || _theme$business_listi35 === void 0 ? void 0 : _theme$business_listi35.hidden;
111
+ var hideBusinessHeader = theme === null || theme === void 0 ? void 0 : (_theme$business_listi36 = theme.business_listing_view) === null || _theme$business_listi36 === void 0 ? void 0 : (_theme$business_listi37 = _theme$business_listi36.components) === null || _theme$business_listi37 === void 0 ? void 0 : (_theme$business_listi38 = _theme$business_listi37.business) === null || _theme$business_listi38 === void 0 ? void 0 : (_theme$business_listi39 = _theme$business_listi38.components) === null || _theme$business_listi39 === void 0 ? void 0 : (_theme$business_listi40 = _theme$business_listi39.header) === null || _theme$business_listi40 === void 0 ? void 0 : _theme$business_listi40.hidden;
112
+ var hideBusinessFavoriteBadge = theme === null || theme === void 0 ? void 0 : (_theme$business_listi41 = theme.business_listing_view) === null || _theme$business_listi41 === void 0 ? void 0 : (_theme$business_listi42 = _theme$business_listi41.components) === null || _theme$business_listi42 === void 0 ? void 0 : (_theme$business_listi43 = _theme$business_listi42.business) === null || _theme$business_listi43 === void 0 ? void 0 : (_theme$business_listi44 = _theme$business_listi43.components) === null || _theme$business_listi44 === void 0 ? void 0 : (_theme$business_listi45 = _theme$business_listi44.featured_badge) === null || _theme$business_listi45 === void 0 ? void 0 : _theme$business_listi45.hidden;
111
113
 
112
114
  // const handleShowAlert = () => {
113
115
  // setAlertState({ open: true, content: [t('ERROR_ADD_PRODUCT_BUSINESS_CLOSED', 'The Business is closed at the moment')] })
@@ -174,9 +176,9 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
174
176
  }, business === null || business === void 0 ? void 0 : (_business$ribbon7 = business.ribbon) === null || _business$ribbon7 === void 0 ? void 0 : _business$ribbon7.text), /*#__PURE__*/_react.default.createElement(_styles.BusinessHero, null, isSkeleton ? /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
175
177
  height: isCustomerMode ? 100 : 140
176
178
  }) : /*#__PURE__*/_react.default.createElement(_styles.BusinessHeader, {
177
- bgimage: optimizeImage(businessHeader || (business === null || business === void 0 ? void 0 : business.header) || ((_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$dummies = _theme$images.dummies) === null || _theme$images$dummies === void 0 ? void 0 : _theme$images$dummies.businessHeader), 'h_400,c_limit'),
179
+ bgimage: !hideBusinessHeader ? optimizeImage(businessHeader || (business === null || business === void 0 ? void 0 : business.header) || ((_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$dummies = _theme$images.dummies) === null || _theme$images$dummies === void 0 ? void 0 : _theme$images$dummies.businessHeader), 'h_400,c_limit') : '',
178
180
  isClosed: !isBusinessOpen
179
- }, /*#__PURE__*/_react.default.createElement(_styles.BusinessTags, null, (businessFeatured !== null && businessFeatured !== void 0 ? businessFeatured : business === null || business === void 0 ? void 0 : business.featured) && /*#__PURE__*/_react.default.createElement("span", {
181
+ }, /*#__PURE__*/_react.default.createElement(_styles.BusinessTags, null, (businessFeatured !== null && businessFeatured !== void 0 ? businessFeatured : business === null || business === void 0 ? void 0 : business.featured) && !hideBusinessFavoriteBadge && /*#__PURE__*/_react.default.createElement("span", {
180
182
  className: "crown"
181
183
  }, /*#__PURE__*/_react.default.createElement(_FaCrown.default, null)), !hideBusinessOffer && !isCustomLayout && (configState === null || configState === void 0 ? void 0 : (_configState$configs = configState.configs) === null || _configState$configs === void 0 ? void 0 : (_configState$configs$ = _configState$configs.preorder_status_enabled) === null || _configState$configs$ === void 0 ? void 0 : _configState$configs$.value) === '1' && /*#__PURE__*/_react.default.createElement("div", null, getBusinessOffer(businessOffers !== null && businessOffers !== void 0 ? businessOffers : business === null || business === void 0 ? void 0 : business.offers) && /*#__PURE__*/_react.default.createElement("span", null, getBusinessOffer(businessOffers !== null && businessOffers !== void 0 ? businessOffers : business === null || business === void 0 ? void 0 : business.offers) || parsePrice(0)), !isBusinessOpen && /*#__PURE__*/_react.default.createElement("span", null, t('PREORDER', 'PreOrder')))), !!businessWillCloseSoonMinutes && (orderState === null || orderState === void 0 ? void 0 : (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.moment) === null && isBusinessOpen && /*#__PURE__*/_react.default.createElement("h1", null, businessWillCloseSoonMinutes, " ", t('MINUTES_TO_CLOSE', 'minutes to close')), !isBusinessOpen && /*#__PURE__*/_react.default.createElement("h1", {
182
184
  className: "closed"