ordering-ui-external 1.1.6 → 1.2.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 (75) hide show
  1. package/_bundles/{0.ordering-ui.ff2158785c5abf7d9a26.js → 0.ordering-ui.5a3714c3be025beef39b.js} +0 -0
  2. package/_bundles/{1.ordering-ui.ff2158785c5abf7d9a26.js → 1.ordering-ui.5a3714c3be025beef39b.js} +0 -0
  3. package/_bundles/{3.ordering-ui.ff2158785c5abf7d9a26.js → 3.ordering-ui.5a3714c3be025beef39b.js} +0 -0
  4. package/_bundles/{4.ordering-ui.ff2158785c5abf7d9a26.js → 4.ordering-ui.5a3714c3be025beef39b.js} +0 -0
  5. package/_bundles/{5.ordering-ui.ff2158785c5abf7d9a26.js → 5.ordering-ui.5a3714c3be025beef39b.js} +0 -0
  6. package/_bundles/{6.ordering-ui.ff2158785c5abf7d9a26.js → 6.ordering-ui.5a3714c3be025beef39b.js} +0 -0
  7. package/_bundles/{7.ordering-ui.ff2158785c5abf7d9a26.js → 7.ordering-ui.5a3714c3be025beef39b.js} +1 -1
  8. package/_bundles/{7.ordering-ui.ff2158785c5abf7d9a26.js.LICENSE.txt → 7.ordering-ui.5a3714c3be025beef39b.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.ff2158785c5abf7d9a26.js → 8.ordering-ui.5a3714c3be025beef39b.js} +0 -0
  10. package/_bundles/{9.ordering-ui.ff2158785c5abf7d9a26.js → 9.ordering-ui.5a3714c3be025beef39b.js} +0 -0
  11. package/_bundles/ordering-ui.5a3714c3be025beef39b.js +2 -0
  12. package/_bundles/{ordering-ui.ff2158785c5abf7d9a26.js.LICENSE.txt → ordering-ui.5a3714c3be025beef39b.js.LICENSE.txt} +0 -0
  13. package/_modules/themes/five/index.js +8 -0
  14. package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +33 -1
  15. package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +3 -1
  16. package/_modules/themes/five/src/components/BusinessInformation/styles.js +2 -2
  17. package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +27 -11
  18. package/_modules/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
  19. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +5 -3
  20. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +3 -7
  21. package/_modules/themes/five/src/components/Cart/index.js +14 -3
  22. package/_modules/themes/five/src/components/Cart/styles.js +9 -3
  23. package/_modules/themes/five/src/components/Checkout/index.js +1 -10
  24. package/_modules/themes/five/src/components/Checkout/styles.js +1 -1
  25. package/_modules/themes/five/src/components/Modal/styles.js +1 -1
  26. package/_modules/themes/five/src/components/MomentControl/styles.js +1 -1
  27. package/_modules/themes/five/src/components/MultiCheckout/index.js +4 -0
  28. package/_modules/themes/five/src/components/OrderItAgain/index.js +60 -0
  29. package/_modules/themes/five/src/components/OrderItAgain/styles.js +46 -0
  30. package/_modules/themes/five/src/components/ProductForm/index.js +5 -0
  31. package/_modules/themes/five/src/components/ProfessionalFilter/index.js +4 -2
  32. package/_modules/themes/five/src/components/ProfessionalFilter/styles.js +20 -8
  33. package/_modules/themes/five/src/components/RenderProductsLayout/index.js +20 -6
  34. package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +29 -24
  35. package/_modules/themes/five/src/components/ReviewProduct/styles.js +6 -6
  36. package/_modules/themes/five/src/components/ServiceForm/index.js +5 -7
  37. package/_modules/themes/five/src/components/ServiceForm/styles.js +9 -5
  38. package/_modules/themes/five/src/components/SidebarMenu/index.js +13 -2
  39. package/_modules/themes/five/src/components/SingleOrderCard/index.js +1 -1
  40. package/_modules/themes/five/src/components/SingleProductCard/index.js +17 -9
  41. package/_modules/themes/five/src/components/SingleProductCard/styles.js +60 -48
  42. package/_modules/themes/four/src/components/BusinessBasicInformation/index.js +1 -1
  43. package/package.json +1 -1
  44. package/src/themes/five/index.js +2 -0
  45. package/src/themes/five/src/components/BusinessBasicInformation/index.js +29 -1
  46. package/src/themes/five/src/components/BusinessBasicInformation/styles.js +11 -0
  47. package/src/themes/five/src/components/BusinessInformation/styles.js +3 -3
  48. package/src/themes/five/src/components/BusinessProductsCategories/index.js +21 -11
  49. package/src/themes/five/src/components/BusinessProductsCategories/styles.js +3 -3
  50. package/src/themes/five/src/components/BusinessProductsListing/index.js +2 -2
  51. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +2 -4
  52. package/src/themes/five/src/components/Cart/index.js +37 -2
  53. package/src/themes/five/src/components/Cart/styles.js +17 -0
  54. package/src/themes/five/src/components/Checkout/index.js +1 -5
  55. package/src/themes/five/src/components/Checkout/styles.js +5 -1
  56. package/src/themes/five/src/components/Modal/styles.js +5 -0
  57. package/src/themes/five/src/components/MomentControl/index.js +48 -48
  58. package/src/themes/five/src/components/MomentControl/styles.js +0 -1
  59. package/src/themes/five/src/components/MultiCheckout/index.js +2 -0
  60. package/src/themes/five/src/components/OrderItAgain/index.js +46 -0
  61. package/src/themes/five/src/components/OrderItAgain/styles.js +60 -0
  62. package/src/themes/five/src/components/ProductForm/index.js +1 -0
  63. package/src/themes/five/src/components/ProfessionalFilter/index.js +10 -2
  64. package/src/themes/five/src/components/ProfessionalFilter/styles.js +24 -9
  65. package/src/themes/five/src/components/RenderProductsLayout/index.js +20 -3
  66. package/src/themes/five/src/components/RenderProductsLayout/styles.js +12 -5
  67. package/src/themes/five/src/components/ReviewProduct/styles.js +14 -0
  68. package/src/themes/five/src/components/ServiceForm/index.js +31 -22
  69. package/src/themes/five/src/components/ServiceForm/styles.js +16 -0
  70. package/src/themes/five/src/components/SidebarMenu/index.js +32 -1
  71. package/src/themes/five/src/components/SingleOrderCard/index.js +1 -1
  72. package/src/themes/five/src/components/SingleProductCard/index.js +10 -6
  73. package/src/themes/five/src/components/SingleProductCard/styles.js +21 -7
  74. package/src/themes/four/src/components/BusinessBasicInformation/index.js +15 -17
  75. package/_bundles/ordering-ui.ff2158785c5abf7d9a26.js +0 -2
@@ -5,13 +5,13 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.WrapLogo = exports.TitleWrapper = exports.SoldOut = exports.SkeletonCardLogo = exports.SkeletonCardInfo = exports.RibbonBox = exports.QuantityContainer = exports.PriceWrapper = exports.CardLogo = exports.CardInfo = exports.CardContainer = void 0;
8
+ exports.WrapLogo = exports.TitleWrapper = exports.SoldOut = exports.SkeletonCardLogo = exports.SkeletonCardInfo = exports.RibbonBox = exports.QuantityContainer = exports.PriceWrapper = exports.LastOrder = exports.CardLogo = exports.CardInfo = exports.CardContainer = void 0;
9
9
 
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
13
13
 
14
- 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;
14
+ 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;
15
15
 
16
16
  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); }
17
17
 
@@ -23,65 +23,71 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
23
23
 
24
24
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
25
25
 
26
- var CardContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n min-height: 162px;\n max-height: 162px;\n background: ", ";\n border: 1px solid #E9ECEF;\n padding: 10px;\n border-radius: 7.6px;\n box-sizing: border-box;\n cursor: pointer;\n position: relative;\n > div {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n button {\n width: 100%;\n margin-top: 10px;\n }\n ", "\n"])), function (_ref) {
27
- var soldOut = _ref.soldOut;
28
- return soldOut ? '#6c757d33' : '#FFF';
26
+ var CardContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n background: ", ";\n border: 1px solid #E9ECEF;\n padding: 10px;\n border-radius: 7.6px;\n box-sizing: border-box;\n cursor: pointer;\n position: relative;\n > div {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n button {\n width: 100%;\n margin-top: 10px;\n }\n ", "\n"])), function (_ref) {
27
+ var isShowAddButt = _ref.isShowAddButt;
28
+ return (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-height: ", ";\n max-height: ", ";\n "])), isShowAddButt ? '162px' : '110px', isShowAddButt ? '162px' : '110px');
29
29
  }, function (_ref2) {
30
- var productsRows = _ref2.productsRows;
31
- return productsRows ? (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: ", ";\n margin: 10px;\n "])), function () {
32
- return productsRows === 3 ? 'calc(33% - 40px)' : 'calc(50% - 40px)';
33
- }) : (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n margin: 10px 0px;\n @media (min-width: 576px) {\n margin: 10px;\n width: calc(100% - 40px);\n }\n ", "\n \n "])), function (_ref3) {
34
- var isCartOnProductsList = _ref3.isCartOnProductsList;
35
- return isCartOnProductsList ? (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n @media (min-width: 993px) {\n width: calc(50% - 40px);\n margin: 10px 20px 10px 0px;\n ", "\n }\n "])), function (props) {
30
+ var soldOut = _ref2.soldOut;
31
+ return soldOut ? '#6c757d33' : '#FFF';
32
+ }, function (_ref3) {
33
+ var productsRows = _ref3.productsRows;
34
+ return productsRows ? (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: ", ";\n margin: 10px;\n "])), function () {
35
+ return productsRows === 3 ? 'calc(33% - 20px)' : 'calc(50% - 20px)';
36
+ }) : (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n margin: 10px 0px;\n @media (min-width: 576px) {\n margin: 10px;\n width: calc(100% - 20px);\n }\n ", "\n \n "])), function (_ref4) {
37
+ var isCartOnProductsList = _ref4.isCartOnProductsList;
38
+ return isCartOnProductsList ? (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n @media (min-width: 993px) {\n width: calc(50% - 20px);\n margin: 10px 20px 10px 0px;\n ", "\n }\n "])), function (props) {
36
39
  var _props$theme;
37
40
 
38
- return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin: 10px 0px 10px 20px;\n "])));
39
- }) : (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n @media (min-width: 681px) {\n width: calc(49% - 40px);\n }\n @media (min-width: 1440px) {\n width: calc(33% - 40px);\n margin: 10px 20px 10px 0px;\n ", "\n }\n "])), function (props) {
41
+ return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin: 10px 0px 10px 20px;\n "])));
42
+ }) : (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n @media (min-width: 681px) {\n width: calc(49% - 20px);\n }\n @media (min-width: 1440px) {\n width: calc(33% - 20px);\n margin: 10px 20px 10px 0px;\n ", "\n }\n "])), function (props) {
40
43
  var _props$theme2;
41
44
 
42
- return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin: 10px 0px 10px 20px;\n "])));
45
+ return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin: 10px 0px 10px 20px;\n "])));
43
46
  });
44
47
  });
45
48
  });
46
49
 
47
50
  exports.CardContainer = CardContainer;
48
51
 
49
- var SoldOut = _styledComponents.default.span(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n font-weight: bold;\n position: absolute;\n background: #495057 0% 0% no-repeat padding-box;\n padding: 5px 10px;\n top: 7px;\n border-radius: 2px 0px 0px 2px;\n right: 0px;\n color: white;\n font-size: 12px;\n ", "\n &:first-letter {\n text-transform: uppercase;\n }\n ", "\n"])), function (props) {
52
+ var SoldOut = _styledComponents.default.span(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n font-weight: bold;\n position: absolute;\n background: #495057 0% 0% no-repeat padding-box;\n padding: 5px 10px;\n top: 7px;\n border-radius: 2px 0px 0px 2px;\n right: 0px;\n color: white;\n font-size: 12px;\n ", "\n &:first-letter {\n text-transform: uppercase;\n }\n ", "\n"])), function (props) {
50
53
  var _props$theme3;
51
54
 
52
- return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n left: 0px;\n right: initial;\n "])));
53
- }, function (_ref4) {
54
- var isBottom = _ref4.isBottom;
55
- return isBottom && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n bottom: 7px;\n top: initial;\n "])));
55
+ return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n left: 0px;\n right: initial;\n "])));
56
+ }, function (_ref5) {
57
+ var isBottom = _ref5.isBottom;
58
+ return isBottom && (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n bottom: 7px;\n top: initial;\n "])));
56
59
  });
57
60
 
58
61
  exports.SoldOut = SoldOut;
59
62
 
60
- var CardInfo = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n ", "\n > * {\n margin: 3px;\n }\n p {\n color: #909BA9;\n text-align: left;\n font-size: 10px;\n ", "\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n white-space: pre-wrap;\n }\n span {\n color: ", ";\n font-size: 14px;\n }\n @media (min-width: 1024px) {\n p {\n font-size: 12px;\n }\n span {\n font-size: 14px;\n }\n }\n"])), function (_ref5) {
61
- var isBgimage = _ref5.isBgimage;
62
- return (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n width: ", ";\n "])), isBgimage ? 'calc(100% - 90px)' : '100%');
63
+ var CardInfo = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n ", "\n > * {\n margin: 3px;\n }\n p {\n color: #909BA9;\n text-align: left;\n font-size: 10px;\n ", "\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n white-space: pre-wrap;\n }\n span {\n color: ", ";\n font-size: 14px;\n }\n ", "\n @media (min-width: 1024px) {\n p {\n font-size: 12px;\n }\n span {\n font-size: 14px;\n }\n }\n"])), function (_ref6) {
64
+ var isBgimage = _ref6.isBgimage;
65
+ return (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n width: ", ";\n "])), isBgimage ? 'calc(100% - 90px)' : '100%');
63
66
  }, function (props) {
64
67
  var _props$theme4;
65
68
 
66
- return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n text-align: right;\n "])));
69
+ return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n text-align: right;\n "])));
67
70
  }, function (props) {
68
71
  return props.theme.colors.darkTextColor;
72
+ }, function (_ref7) {
73
+ var oneLine = _ref7.oneLine;
74
+ return oneLine && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n p {\n -webkit-line-clamp: 1;\n }\n "])));
69
75
  });
70
76
 
71
77
  exports.CardInfo = CardInfo;
72
78
 
73
- var WrapLogo = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n position: relative;\n max-width: 86px;\n max-height: 86px;\n height: 86px;\n ", "\n margin-left: 5px;\n ", "\n"])), function (_ref6) {
74
- var isBgimage = _ref6.isBgimage;
75
- return isBgimage && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n width: 86px;\n "])));
79
+ var WrapLogo = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n position: relative;\n max-width: 86px;\n max-height: 86px;\n height: 86px;\n ", "\n margin-left: 5px;\n ", "\n"])), function (_ref8) {
80
+ var isBgimage = _ref8.isBgimage;
81
+ return isBgimage && (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n width: 86px;\n "])));
76
82
  }, function (props) {
77
83
  var _props$theme5;
78
84
 
79
- return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n margin-right: 5px;\n margin-left: 0px;\n "])));
85
+ return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n margin-right: 5px;\n margin-left: 0px;\n "])));
80
86
  });
81
87
 
82
88
  exports.WrapLogo = WrapLogo;
83
89
 
84
- var CardLogoStyled = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n position: relative;\n background-repeat: no-repeat, repeat;\n background-size: cover;\n background-position: center;\n object-fit: cover;\n min-height: 86px;\n border-radius: 10px;\n"])));
90
+ var CardLogoStyled = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n position: relative;\n background-repeat: no-repeat, repeat;\n background-size: cover;\n background-position: center;\n object-fit: cover;\n min-height: 86px;\n border-radius: 10px;\n"])));
85
91
 
86
92
  var CardLogo = function CardLogo(props) {
87
93
  var style = {};
@@ -101,42 +107,48 @@ var CardLogo = function CardLogo(props) {
101
107
 
102
108
  exports.CardLogo = CardLogo;
103
109
 
104
- var PriceWrapper = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n .off-price {\n font-size: 10px;\n color: #909BA9;\n margin-left: 5px;\n text-decoration: line-through;\n ", "\n @media (min-width: 1024px) {\n font-size: 13px;\n }\n }\n"])), function (props) {
105
- return props.theme.rtl && (0, _styledComponents.css)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n margin-right: 5px;\n margin-left: 0;\n "])));
110
+ var PriceWrapper = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n .off-price {\n font-size: 10px;\n color: #909BA9;\n margin-left: 5px;\n text-decoration: line-through;\n ", "\n @media (min-width: 1024px) {\n font-size: 13px;\n }\n }\n"])), function (props) {
111
+ return props.theme.rtl && (0, _styledComponents.css)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n margin-right: 5px;\n margin-left: 0;\n "])));
106
112
  });
107
113
 
108
114
  exports.PriceWrapper = PriceWrapper;
109
115
 
110
- var QuantityContainer = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n position: absolute;\n left: 100%;\n bottom: 100%;\n width: 25px;\n height: 25px;\n text-align: center;\n border-radius: 50%;\n transform: translate(-50%, 50%);\n"])), function (_ref7) {
111
- var theme = _ref7.theme;
116
+ var QuantityContainer = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n position: absolute;\n left: 100%;\n bottom: 100%;\n width: 25px;\n height: 25px;\n text-align: center;\n border-radius: 50%;\n transform: translate(-50%, 50%);\n"])), function (_ref9) {
117
+ var theme = _ref9.theme;
112
118
  return theme.colors.primary;
113
- }, function (_ref8) {
114
- var theme = _ref8.theme;
119
+ }, function (_ref10) {
120
+ var theme = _ref10.theme;
115
121
  return theme.colors.primaryContrast;
116
122
  });
117
123
 
118
124
  exports.QuantityContainer = QuantityContainer;
119
125
 
120
- var RibbonBox = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n position: absolute;\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 top: -4px;\n right: -3px;\n background-color: ", ";\n max-width: 50px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n ", "\n ", "\n ", "\n ", "\n"])), function (props) {
126
+ var RibbonBox = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n position: absolute;\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 top: -4px;\n right: -3px;\n background-color: ", ";\n max-width: 50px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n ", "\n ", "\n ", "\n ", "\n"])), function (props) {
121
127
  return props.theme.colors.colorTextSignForm;
122
128
  }, function (props) {
123
129
  return props.theme.colors.primary;
124
130
  }, function (props) {
125
- return props.theme.rtl && (0, _styledComponents.css)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n left: -3px;\n right: initial;\n "])));
126
- }, function (_ref9) {
127
- var bgColor = _ref9.bgColor;
128
- return bgColor && (0, _styledComponents.css)(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), bgColor);
129
- }, function (_ref10) {
130
- var isRoundRect = _ref10.isRoundRect;
131
- return isRoundRect && (0, _styledComponents.css)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n border-radius: 7.6px;\n "])));
131
+ return props.theme.rtl && (0, _styledComponents.css)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n left: -3px;\n right: initial;\n "])));
132
132
  }, function (_ref11) {
133
- var isCapsule = _ref11.isCapsule;
134
- return isCapsule && (0, _styledComponents.css)(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n border-radius: 50px;\n "])));
133
+ var bgColor = _ref11.bgColor;
134
+ return bgColor && (0, _styledComponents.css)(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), bgColor);
135
+ }, function (_ref12) {
136
+ var isRoundRect = _ref12.isRoundRect;
137
+ return isRoundRect && (0, _styledComponents.css)(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n border-radius: 7.6px;\n "])));
138
+ }, function (_ref13) {
139
+ var isCapsule = _ref13.isCapsule;
140
+ return isCapsule && (0, _styledComponents.css)(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n border-radius: 50px;\n "])));
135
141
  });
136
142
 
137
143
  exports.RibbonBox = RibbonBox;
138
144
 
139
- var TitleWrapper = _styledComponents.default.div(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n h1 {\n font-size: 14px;\n font-weight: 500;\n text-align: left;\n color: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n margin: 0px;\n }\n > span {\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n svg {\n color: ", ";\n font-size: 16px;\n }\n }\n"])), function (props) {
145
+ var LastOrder = _styledComponents.default.span(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n color: ", ";\n font-weight: 400;\n font-size: 10px !important;\n margin: 0px 3px;\n"])), function (props) {
146
+ return props.theme.colors.primary;
147
+ });
148
+
149
+ exports.LastOrder = LastOrder;
150
+
151
+ var TitleWrapper = _styledComponents.default.div(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n h1 {\n font-size: 14px;\n font-weight: 500;\n text-align: left;\n color: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n margin: 0px;\n }\n > span {\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n svg {\n color: ", ";\n font-size: 16px;\n }\n }\n"])), function (props) {
140
152
  return props.theme.colors.headingColor;
141
153
  }, function (props) {
142
154
  return props.theme.colors.danger500;
@@ -144,14 +156,14 @@ var TitleWrapper = _styledComponents.default.div(_templateObject26 || (_template
144
156
 
145
157
  exports.TitleWrapper = TitleWrapper;
146
158
 
147
- var SkeletonCardInfo = _styledComponents.default.div(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: calc(100% - 90px);\n > * {\n margin: 3px;\n }\n"])));
159
+ var SkeletonCardInfo = _styledComponents.default.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: calc(100% - 90px);\n > * {\n margin: 3px;\n }\n"])));
148
160
 
149
161
  exports.SkeletonCardInfo = SkeletonCardInfo;
150
162
 
151
- var SkeletonCardLogo = _styledComponents.default.div(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n max-width: 86px;\n max-height: 86px;\n width: 86px;\n height: 86px;\n margin-left: 5px;\n ", "\n"])), function (props) {
163
+ var SkeletonCardLogo = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n max-width: 86px;\n max-height: 86px;\n width: 86px;\n height: 86px;\n margin-left: 5px;\n ", "\n"])), function (props) {
152
164
  var _props$theme6;
153
165
 
154
- return ((_props$theme6 = props.theme) === null || _props$theme6 === void 0 ? void 0 : _props$theme6.rtl) && (0, _styledComponents.css)(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n margin-right: 5px;\n margin-left: 0px;\n "])));
166
+ return ((_props$theme6 = props.theme) === null || _props$theme6 === void 0 ? void 0 : _props$theme6.rtl) && (0, _styledComponents.css)(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n margin-right: 5px;\n margin-left: 0px;\n "])));
155
167
  });
156
168
 
157
169
  exports.SkeletonCardLogo = SkeletonCardLogo;
@@ -153,7 +153,7 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
153
153
  onClick: function onClick() {
154
154
  return setOpenBusinessInformation(true);
155
155
  }
156
- })))))), !errorQuantityProducts && /*#__PURE__*/_react.default.createElement(_styles.WrapperSearch, null, /*#__PURE__*/_react.default.createElement(_SearchBar.SearchBar, {
156
+ })))))), /*#__PURE__*/_react.default.createElement(_styles.WrapperSearch, null, /*#__PURE__*/_react.default.createElement(_SearchBar.SearchBar, {
157
157
  onSearch: handleChangeSearch,
158
158
  search: searchValue,
159
159
  placeholder: t('SEARCH_PRODUCTS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag7 = theme.defaultLanguages) === null || _theme$defaultLanguag7 === void 0 ? void 0 : _theme$defaultLanguag7.SEARCH_PRODUCTS) || 'Search Products'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-external",
3
- "version": "1.1.6",
3
+ "version": "1.2.0",
4
4
  "description": "Ordering UI Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -54,6 +54,7 @@ import { NotNetworkConnectivity } from './src/components/NotNetworkConnectivity'
54
54
  import { Modal } from './src/components/Modal'
55
55
  import { OrderDetails } from './src/components/OrderDetails'
56
56
  import { OrderDetails as OrderDetailsKiosk } from './src/components/OrderDetails/layouts/Kiosk'
57
+ import { OrderItAgain } from './src/components/OrderItAgain'
57
58
  import { OrdersOption } from './src/components/OrdersOption'
58
59
  import { OrderProgress } from './src/components/OrderProgress'
59
60
  import { OrderTypeSelectorContent } from './src/components/OrderTypeSelectorContent'
@@ -163,6 +164,7 @@ export {
163
164
  NotFoundSource,
164
165
  NotNetworkConnectivity,
165
166
  OrderDetails,
167
+ OrderItAgain,
166
168
  OrderDetailsKiosk,
167
169
  OrdersOption,
168
170
  OrderTypeSelectorContent,
@@ -121,9 +121,33 @@ export const BusinessBasicInformation = (props) => {
121
121
  document.body.style.overflowY = openSearchProducts ? 'hidden' : 'auto'
122
122
  }, [openSearchProducts])
123
123
 
124
+ const handleScroll = () => {
125
+ const searchElement = document.getElementById('search-component')
126
+ if (!searchElement) return
127
+ const limit = window.pageYOffset >= searchElement?.offsetTop && window.pageYOffset > 0
128
+ if (limit) {
129
+ const classAdded = searchElement.classList.contains('fixed-search')
130
+ !classAdded && searchElement.classList.add('fixed-search')
131
+ } else {
132
+ searchElement && searchElement.classList.remove('fixed-search')
133
+ }
134
+ }
135
+
136
+ useEffect(() => {
137
+ window.addEventListener('scroll', handleScroll)
138
+ return () => window.removeEventListener('scroll', handleScroll)
139
+ }, [])
140
+
141
+ useEffect(() => {
142
+ window.scroll({
143
+ top: window.scrollY - 1,
144
+ left: 0
145
+ })
146
+ }, [sortByValue])
147
+
124
148
  const SearchComponent = () => {
125
149
  return (
126
- <WrapperSearch>
150
+ <WrapperSearch id='search-component'>
127
151
  <SearchIconWrapper
128
152
  onClick={() => setOpenSearchProducts(true)}
129
153
  >
@@ -345,6 +369,10 @@ export const BusinessBasicInformation = (props) => {
345
369
  onClose={() => {
346
370
  handleChangeSearch('')
347
371
  setOpenSearchProducts(false)
372
+ window.scroll({
373
+ top: window.scrollY - 1,
374
+ left: 0
375
+ })
348
376
  }}
349
377
  business={businessState.business}
350
378
  />
@@ -159,6 +159,7 @@ export const WrapperSearch = styled.div`
159
159
  display: flex;
160
160
  align-items: flex-end;
161
161
  justify-content: flex-end;
162
+ box-sizing: border-box;
162
163
 
163
164
  .search-bar {
164
165
  margin-right: 10px;
@@ -192,6 +193,16 @@ export const WrapperSearch = styled.div`
192
193
  border-radius: 8px;
193
194
  }
194
195
  }
196
+ &.fixed-search {
197
+ position: fixed;
198
+ top: 0;
199
+ left: 0;
200
+ z-index: 1002;
201
+ width: 100vw;
202
+ margin-top: 0px;
203
+ background-color: ${props => props.theme.colors.backgroundPage};
204
+ padding: 10px;
205
+ }
195
206
  `
196
207
 
197
208
  export const BusinessDetail = styled.div`
@@ -87,7 +87,7 @@ export const SectionTitle = styled.h3`
87
87
  font-weight: 500;
88
88
  font-size: 16px;
89
89
  color: ${props => props.theme.colors.darkTextColor};
90
- margin: 25px 0 20px 0;
90
+ margin: 10px 0 10px 0;
91
91
  `
92
92
 
93
93
  export const Map = styled.div`
@@ -264,9 +264,9 @@ export const BusinessTitle = styled.h2`
264
264
  color: ${props => props.theme.colors.darkTextColor};
265
265
  text-align: center;
266
266
  margin-top: 0;
267
- margin-bottom: 36px;
267
+ margin-bottom: 0;
268
268
  padding-left: 30px;
269
-
269
+ padding-top: 25px;
270
270
  ${props => props.theme?.rtl && css`
271
271
  padding-right: 30px;
272
272
  padding-left: 0;
@@ -2,6 +2,8 @@ import React, { useEffect, useState } from 'react'
2
2
  import Skeleton from 'react-loading-skeleton'
3
3
  import { BusinessProductsCategories as ProductsCategories } from 'ordering-components-external'
4
4
  import { AutoScroll } from '../../../../../components/AutoScroll'
5
+ import { useTheme } from 'styled-components'
6
+ import { useWindowSize } from '../../../../../hooks/useWindowSize'
5
7
 
6
8
  import { CategoriesContainer } from './styles'
7
9
  import { Tabs, Tab } from '../../styles/Tabs'
@@ -14,10 +16,13 @@ const BusinessProductsCategoriesUI = (props) => {
14
16
  openBusinessInformation,
15
17
  business,
16
18
  handlerClickCategory,
17
- categorySelected
19
+ categorySelected,
20
+ useKioskApp
18
21
  } = props
19
22
 
23
+ const theme = useTheme()
20
24
  const [selectedCategory, setSelectedCateogry] = useState({ id: null })
25
+ const { width } = useWindowSize()
21
26
  const scrollTopSpan = 60
22
27
 
23
28
  const handleChangeCategory = (category) => {
@@ -69,12 +74,14 @@ const BusinessProductsCategoriesUI = (props) => {
69
74
 
70
75
  const _diff = -50
71
76
  const _moveDiff = 30
77
+ const _paddDiff = scrollTopSpan + 10
72
78
 
73
79
  _categories?.length && _categories.some(category => {
74
80
  const topPos = category?.id ? document.getElementById(`category${category.id}`)?.offsetTop
75
81
  : document.getElementById('businessProductList')?.offsetTop
76
-
77
- if (topPos - windowTop < scrollTopSpan + 5 && topPos - windowTop > 0 && category?.id) {
82
+ const HeightOfEle = category?.id ? document.getElementById(`category${category.id}`)?.clientHeight : 0
83
+ if ((windowTop > topPos - _paddDiff && windowTop < topPos + HeightOfEle - _paddDiff) &&
84
+ category?.id) {
78
85
  const choosedCategory = document.getElementById(`category-menu${category?.id || '-all'}`)
79
86
  const choosedCategoryLeft = choosedCategory?.offsetLeft || 0
80
87
 
@@ -112,18 +119,20 @@ const BusinessProductsCategoriesUI = (props) => {
112
119
  }
113
120
 
114
121
  useEffect(() => {
122
+ if (typeof useKioskApp === 'undefined') return
115
123
  const styleSheet = document.getElementById('styles').sheet
116
124
 
117
125
  let style0 = '.sticky-prod-cat {'
118
126
  style0 += 'position: fixed !important;'
119
- style0 += 'top: 0 !important;'
120
- style0 += 'width: 97% !important;'
121
- style0 += 'padding: 15px 5px 0px 0px;'
127
+ style0 += 'top: 0px !important;'
128
+ style0 += 'left: 0px !important;'
129
+ style0 += 'padding: 5px 5px 0px 5px !important;'
130
+ style0 += `width: calc(100% - ${useKioskApp ? '50px' : '155px'}) !important;`
122
131
  style0 += '}'
123
132
 
124
133
  let style1 = '.sticky-prod-cart {'
125
134
  style1 += 'position: fixed !important;'
126
- style1 += 'top: 0 !important;'
135
+ style1 += 'top: 38px !important;'
127
136
  style1 += 'right: 2.5% !important;'
128
137
  style1 += 'width: 28.5% !important;'
129
138
  style1 += 'margin-top: 32px !important;'
@@ -131,10 +140,11 @@ const BusinessProductsCategoriesUI = (props) => {
131
140
 
132
141
  let style2 = '.sticky-search {'
133
142
  style2 += 'position: fixed !important;'
134
- style2 += 'top: 10px !important;'
135
- style2 += 'right: 32% !important;'
136
- style2 += 'height: 50px !important;'
143
+ style2 += 'top: 0px !important;'
144
+ style2 += 'right: 0% !important;'
137
145
  style2 += 'z-index: 9999 !important;'
146
+ style2 += 'width: 50px !important;'
147
+ style2 += `background-color: ${theme.colors.backgroundPage} !important;`
138
148
  style2 += '}'
139
149
 
140
150
  styleSheet.insertRule(style0, 0)
@@ -143,7 +153,7 @@ const BusinessProductsCategoriesUI = (props) => {
143
153
 
144
154
  window.addEventListener('scroll', handleScroll)
145
155
  return () => window.removeEventListener('scroll', handleScroll)
146
- }, [])
156
+ }, [useKioskApp])
147
157
 
148
158
  return (
149
159
  <>
@@ -5,7 +5,7 @@ export const CategoriesContainer = styled.div`
5
5
  overflow-x: auto;
6
6
  padding: 5px 0px 0px 0px;
7
7
  background: ${props => props.theme.colors.backgroundPage};
8
- z-index: 1000;
8
+ z-index: 1002;
9
9
  position: absolute;
10
10
  top: 0;
11
11
  border-bottom: 1px solid #D9D9D9;
@@ -33,9 +33,9 @@ export const CategoriesContainer = styled.div`
33
33
  `}
34
34
  }
35
35
 
36
- @media (min-width: 381px) {
36
+ /* @media (min-width: 381px) {
37
37
  padding: 15px 0px 0px 0px;
38
- }
38
+ } */
39
39
  @media (min-width: 992px) {
40
40
  width: ${props => props.w ?? 'auto'};
41
41
  }
@@ -111,7 +111,7 @@ const BusinessProductsListingUI = (props) => {
111
111
  }
112
112
 
113
113
  const onProductClick = (product) => {
114
- if (!((product?.type === 'service') && professionalSelected)) {
114
+ if (!((product?.type === 'service') && business?.professionals?.length > 0)) {
115
115
  if (site?.product_url_template) {
116
116
  onProductRedirect({
117
117
  slug: business?.slug,
@@ -414,7 +414,7 @@ const BusinessProductsListingUI = (props) => {
414
414
  )}
415
415
  {(productModal.product || curProduct) && (
416
416
  <>
417
- {(((productModal?.product?.type === 'service') || (curProduct?.type === 'service')) && professionalSelected) ? (
417
+ {(((productModal?.product?.type === 'service') || (curProduct?.type === 'service')) && business?.professionals?.length > 0) ? (
418
418
  <ServiceForm
419
419
  businessSlug={business?.slug}
420
420
  useKioskApp={props.useKioskApp}
@@ -9,7 +9,6 @@ import {
9
9
  useSession,
10
10
  useLanguage,
11
11
  useConfig,
12
- useOrderingTheme,
13
12
  BusinessList as BusinessListController
14
13
  } from 'ordering-components-external'
15
14
 
@@ -77,7 +76,6 @@ const BusinessesListingUI = (props) => {
77
76
  const [{ auth }] = useSession()
78
77
  const [{ configs }] = useConfig()
79
78
  const theme = useTheme()
80
- const [orderingTheme] = useOrderingTheme()
81
79
  const [modals, setModals] = useState({ listOpen: false, formOpen: false, citiesOpen: false })
82
80
  const [alertState, setAlertState] = useState({ open: false, content: [] })
83
81
  const [activeMap, setActiveMap] = useState(false)
@@ -87,7 +85,7 @@ const BusinessesListingUI = (props) => {
87
85
  const [hasHighRatedBusiness, setHasHighRatedBusiness] = useState(true)
88
86
  const userCustomer = JSON.parse(window.localStorage.getItem('user-customer'))
89
87
  const [favoriteIds, setFavoriteIds] = useState([])
90
- const hideCities = orderingTheme?.theme?.business_listing_view?.components?.cities?.hidden
88
+ const hideCities = theme?.business_listing_view?.components?.cities?.hidden ?? true
91
89
 
92
90
  const businessesIds = isCustomLayout &&
93
91
  businessesList.businesses &&
@@ -273,7 +271,7 @@ const BusinessesListingUI = (props) => {
273
271
  onSearch={handleChangeSearch}
274
272
  handleCustomEnter={() => onRedirectPage({ page: 'business_search' })}
275
273
  />
276
- {typeof hideCities !== 'undefined' && !hideCities && citiesState?.cities?.length > 0 && (
274
+ {!hideCities && citiesState?.cities?.length > 0 && (
277
275
  <Button color='primary' onClick={handleOpenCities}>
278
276
  {citiesState?.cities?.find(city => city?.id === orderState?.options?.city_id)?.name || t('SELECT_A_CITY', 'Select a city')}
279
277
  </Button>
@@ -14,6 +14,7 @@ import { TaxInformation } from '../TaxInformation'
14
14
  import { TextArea } from '../../styles/Inputs'
15
15
  import { SpinnerLoader } from '../../../../../components/SpinnerLoader'
16
16
  import { CartStoresListing } from '../../../../franchise/src/components/CartStoresListing'
17
+ import { DriverTips } from '../DriverTips'
17
18
  import {
18
19
  CartContainer,
19
20
  OrderBill,
@@ -24,7 +25,8 @@ import {
24
25
  Spinner,
25
26
  CommentContainer,
26
27
  IconContainer,
27
- NoValidProductMessage
28
+ NoValidProductMessage,
29
+ DriverTipContainer
28
30
  } from './styles'
29
31
  import { verifyDecimals } from '../../../../../utils'
30
32
  import BsInfoCircle from '@meronex/icons/bs/BsInfoCircle'
@@ -67,6 +69,10 @@ const CartUI = (props) => {
67
69
  const [{ site }] = useSite()
68
70
  const windowSize = useWindowSize()
69
71
 
72
+ const driverTipsOptions = typeof configs?.driver_tip_options?.value === 'string'
73
+ ? JSON.parse(configs?.driver_tip_options?.value) || []
74
+ : configs?.driver_tip_options?.value || []
75
+
70
76
  const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
71
77
  const [openProduct, setModalIsOpen] = useState(false)
72
78
  const [curProduct, setCurProduct] = useState({})
@@ -402,7 +408,7 @@ const CartUI = (props) => {
402
408
  )}
403
409
  </tbody>
404
410
  </table>
405
- {isCouponEnabled && !isCartPending && ((isCheckout || isCartPopover) && !(isCheckout && isCartPopover)) && (
411
+ {isCouponEnabled && !isCartPending && ((isCheckout || isCartPopover || isMultiCheckout) && !(isCheckout && isCartPopover)) && (
406
412
  <CouponContainer>
407
413
  <CouponControl
408
414
  businessId={cart.business_id}
@@ -410,6 +416,35 @@ const CartUI = (props) => {
410
416
  />
411
417
  </CouponContainer>
412
418
  )}
419
+ {
420
+ isMultiCheckout &&
421
+ cart &&
422
+ cart?.business_id &&
423
+ orderState?.options?.type === 1 &&
424
+ cart?.status !== 2 &&
425
+ validationFields?.fields?.checkout?.driver_tip?.enabled &&
426
+ driverTipsOptions.length > 0 &&
427
+ !useKioskApp &&
428
+ (
429
+ <>
430
+ <DriverTipContainer>
431
+ <h1>{t('DRIVER_TIPS', 'Driver Tips')}</h1>
432
+ <p>{t('100%_OF_THE_TIP_YOUR_DRIVER', '100% of the tip goes to your driver')}</p>
433
+ <DriverTips
434
+ businessId={cart?.business_id}
435
+ driverTipsOptions={driverTipsOptions}
436
+ isFixedPrice={parseInt(configs?.driver_tip_type?.value, 10) === 1}
437
+ isDriverTipUseCustom={!!parseInt(configs?.driver_tip_use_custom?.value, 10)}
438
+ driverTip={parseInt(configs?.driver_tip_type?.value, 10) === 1
439
+ ? cart?.driver_tip
440
+ : cart?.driver_tip_rate}
441
+ cart={cart}
442
+ useOrderContext
443
+ />
444
+ </DriverTipContainer>
445
+ </>
446
+ )
447
+ }
413
448
  <table className='total'>
414
449
  <tbody>
415
450
  <tr>
@@ -207,3 +207,20 @@ export const SpotSelect = styled.select`
207
207
  export const NoValidProductMessage = styled.p`
208
208
  font-size: 14px;
209
209
  `
210
+ export const DriverTipContainer = styled.div`
211
+ width: 100%;
212
+ display: flex;
213
+ flex-direction: column;
214
+ margin: 20px 0px 0px;
215
+ h1 {
216
+ margin: 0px;
217
+ font-weight: 500;
218
+ font-size: 20px;
219
+ color: ${props => props.theme.colors.darkTextColor};
220
+ }
221
+ > p {
222
+ margin: 0;
223
+ font-size: 16px;
224
+ color: #909BA9;
225
+ }
226
+ `
@@ -213,10 +213,6 @@ const CheckoutUI = (props) => {
213
213
  setUserErrors(errors)
214
214
  }
215
215
 
216
- const handleGoToStore = (slug) => {
217
- events.emit('go_to_page', { page: 'business', params: { store: slug } })
218
- }
219
-
220
216
  useEffect(() => {
221
217
  if (validationFields && validationFields?.fields?.checkout) {
222
218
  checkValidationFields()
@@ -465,7 +461,7 @@ const CheckoutUI = (props) => {
465
461
  <CartContainer>
466
462
  <CartHeader>
467
463
  <h1>{t('MOBILE_FRONT_YOUR_ORDER', 'Your order')}</h1>
468
- <span onClick={() => cart?.business?.slug && handleGoToStore(cart?.business?.slug)}>{('ADD_PRODUCTS', 'Add products')}</span>
464
+ <span onClick={() => cart?.business?.slug && handleStoreRedirect && handleStoreRedirect(cart?.business?.slug)}>{('ADD_PRODUCTS', 'Add products')}</span>
469
465
  </CartHeader>
470
466
  <Cart
471
467
  isCartPending={cart?.status === 2}
@@ -19,10 +19,14 @@ export const Container = styled.div`
19
19
  export const WrapperLeftContainer = styled.div`
20
20
  width: 100%;
21
21
  box-sizing: border-box;
22
- padding: 30px 20px;
22
+ padding: 55px 20px 30px;
23
23
 
24
24
  @media (min-width: 769px) {
25
25
  width: 55%;
26
+ padding: 55px 60px 55px 40px;
27
+ }
28
+
29
+ @media (min-width: 820px) {
26
30
  padding: 30px 60px 55px 40px;
27
31
  }
28
32
  `