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
@@ -363,6 +363,12 @@ Object.defineProperty(exports, "OrderDetailsKiosk", {
363
363
  return _Kiosk2.OrderDetails;
364
364
  }
365
365
  });
366
+ Object.defineProperty(exports, "OrderItAgain", {
367
+ enumerable: true,
368
+ get: function get() {
369
+ return _OrderItAgain.OrderItAgain;
370
+ }
371
+ });
366
372
  Object.defineProperty(exports, "OrderProgress", {
367
373
  enumerable: true,
368
374
  get: function get() {
@@ -758,6 +764,8 @@ var _OrderDetails = require("./src/components/OrderDetails");
758
764
 
759
765
  var _Kiosk2 = require("./src/components/OrderDetails/layouts/Kiosk");
760
766
 
767
+ var _OrderItAgain = require("./src/components/OrderItAgain");
768
+
761
769
  var _OrdersOption = require("./src/components/OrdersOption");
762
770
 
763
771
  var _OrderProgress = require("./src/components/OrderProgress");
@@ -192,8 +192,36 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
192
192
  document.body.style.overflowY = openSearchProducts ? 'hidden' : 'auto';
193
193
  }, [openSearchProducts]);
194
194
 
195
+ var handleScroll = function handleScroll() {
196
+ var searchElement = document.getElementById('search-component');
197
+ if (!searchElement) return;
198
+ var limit = window.pageYOffset >= (searchElement === null || searchElement === void 0 ? void 0 : searchElement.offsetTop) && window.pageYOffset > 0;
199
+
200
+ if (limit) {
201
+ var classAdded = searchElement.classList.contains('fixed-search');
202
+ !classAdded && searchElement.classList.add('fixed-search');
203
+ } else {
204
+ searchElement && searchElement.classList.remove('fixed-search');
205
+ }
206
+ };
207
+
208
+ (0, _react.useEffect)(function () {
209
+ window.addEventListener('scroll', handleScroll);
210
+ return function () {
211
+ return window.removeEventListener('scroll', handleScroll);
212
+ };
213
+ }, []);
214
+ (0, _react.useEffect)(function () {
215
+ window.scroll({
216
+ top: window.scrollY - 1,
217
+ left: 0
218
+ });
219
+ }, [sortByValue]);
220
+
195
221
  var SearchComponent = function SearchComponent() {
196
- return /*#__PURE__*/_react.default.createElement(_styles.WrapperSearch, null, /*#__PURE__*/_react.default.createElement(_styles.SearchIconWrapper, {
222
+ return /*#__PURE__*/_react.default.createElement(_styles.WrapperSearch, {
223
+ id: "search-component"
224
+ }, /*#__PURE__*/_react.default.createElement(_styles.SearchIconWrapper, {
197
225
  onClick: function onClick() {
198
226
  return setOpenSearchProducts(true);
199
227
  }
@@ -319,6 +347,10 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
319
347
  onClose: function onClose() {
320
348
  handleChangeSearch('');
321
349
  setOpenSearchProducts(false);
350
+ window.scroll({
351
+ top: window.scrollY - 1,
352
+ left: 0
353
+ });
322
354
  },
323
355
  business: businessState.business
324
356
  })), !isInfoShrunken && /*#__PURE__*/_react.default.createElement(BusinessInfoComponent, null), /*#__PURE__*/_react.default.createElement(_styles.BusinessContainer, {
@@ -90,7 +90,7 @@ var BusinessInfoContent = _styledComponents.default.div(_templateObject14 || (_t
90
90
 
91
91
  exports.BusinessInfoContent = BusinessInfoContent;
92
92
 
93
- var WrapperSearch = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n margin: 15px 0px 0px;\n display: flex;\n align-items: flex-end;\n justify-content: flex-end;\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"])), function (props) {
93
+ var WrapperSearch = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n margin: 15px 0px 0px;\n display: flex;\n align-items: flex-end;\n justify-content: flex-end;\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) {
94
94
  var _props$theme4;
95
95
 
96
96
  return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n margin-left: 10px;\n margin-right: 0;\n "])));
@@ -98,6 +98,8 @@ var WrapperSearch = _styledComponents.default.div(_templateObject15 || (_templat
98
98
  var _props$theme5;
99
99
 
100
100
  return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n text-align: left;\n "])));
101
+ }, function (props) {
102
+ return props.theme.colors.backgroundPage;
101
103
  });
102
104
 
103
105
  exports.WrapperSearch = WrapperSearch;
@@ -63,7 +63,7 @@ var BusinessContent = _styledComponents.default.div(_templateObject7 || (_templa
63
63
 
64
64
  exports.BusinessContent = BusinessContent;
65
65
 
66
- var SectionTitle = _styledComponents.default.h3(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n font-weight: 500;\n font-size: 16px;\n color: ", ";\n margin: 25px 0 20px 0;\n"])), function (props) {
66
+ var SectionTitle = _styledComponents.default.h3(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n font-weight: 500;\n font-size: 16px;\n color: ", ";\n margin: 10px 0 10px 0;\n"])), function (props) {
67
67
  return props.theme.colors.darkTextColor;
68
68
  });
69
69
 
@@ -129,7 +129,7 @@ var ImageContainer = _styledComponents.default.div(_templateObject21 || (_templa
129
129
 
130
130
  exports.ImageContainer = ImageContainer;
131
131
 
132
- var BusinessTitle = _styledComponents.default.h2(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n font-weight: 600;\n font-size: 24px;\n color: ", ";\n text-align: center;\n margin-top: 0;\n margin-bottom: 36px;\n padding-left: 30px;\n\n ", "\n"])), function (props) {
132
+ var BusinessTitle = _styledComponents.default.h2(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n font-weight: 600;\n font-size: 24px;\n color: ", ";\n text-align: center;\n margin-top: 0;\n margin-bottom: 0;\n padding-left: 30px;\n padding-top: 25px;\n ", "\n"])), function (props) {
133
133
  return props.theme.colors.darkTextColor;
134
134
  }, function (props) {
135
135
  var _props$theme7;
@@ -15,6 +15,10 @@ var _orderingComponentsExternal = require("ordering-components-external");
15
15
 
16
16
  var _AutoScroll = require("../../../../../components/AutoScroll");
17
17
 
18
+ var _styledComponents = require("styled-components");
19
+
20
+ var _useWindowSize2 = require("../../../../../hooks/useWindowSize");
21
+
18
22
  var _styles = require("./styles");
19
23
 
20
24
  var _Tabs = require("../../styles/Tabs");
@@ -62,7 +66,9 @@ var BusinessProductsCategoriesUI = function BusinessProductsCategoriesUI(props)
62
66
  openBusinessInformation = props.openBusinessInformation,
63
67
  business = props.business,
64
68
  handlerClickCategory = props.handlerClickCategory,
65
- categorySelected = props.categorySelected;
69
+ categorySelected = props.categorySelected,
70
+ useKioskApp = props.useKioskApp;
71
+ var theme = (0, _styledComponents.useTheme)();
66
72
 
67
73
  var _useState = (0, _react.useState)({
68
74
  id: null
@@ -71,6 +77,9 @@ var BusinessProductsCategoriesUI = function BusinessProductsCategoriesUI(props)
71
77
  selectedCategory = _useState2[0],
72
78
  setSelectedCateogry = _useState2[1];
73
79
 
80
+ var _useWindowSize = (0, _useWindowSize2.useWindowSize)(),
81
+ width = _useWindowSize.width;
82
+
74
83
  var scrollTopSpan = 60;
75
84
 
76
85
  var handleChangeCategory = function handleChangeCategory(category) {
@@ -126,12 +135,16 @@ var BusinessProductsCategoriesUI = function BusinessProductsCategoriesUI(props)
126
135
  var _diff = -50;
127
136
 
128
137
  var _moveDiff = 30;
138
+
139
+ var _paddDiff = scrollTopSpan + 10;
140
+
129
141
  (_categories === null || _categories === void 0 ? void 0 : _categories.length) && _categories.some(function (category) {
130
- var _document$getElementB3, _document$getElementB4;
142
+ var _document$getElementB3, _document$getElementB4, _document$getElementB5;
131
143
 
132
144
  var topPos = category !== null && category !== void 0 && category.id ? (_document$getElementB3 = document.getElementById("category".concat(category.id))) === null || _document$getElementB3 === void 0 ? void 0 : _document$getElementB3.offsetTop : (_document$getElementB4 = document.getElementById('businessProductList')) === null || _document$getElementB4 === void 0 ? void 0 : _document$getElementB4.offsetTop;
145
+ var HeightOfEle = category !== null && category !== void 0 && category.id ? (_document$getElementB5 = document.getElementById("category".concat(category.id))) === null || _document$getElementB5 === void 0 ? void 0 : _document$getElementB5.clientHeight : 0;
133
146
 
134
- if (topPos - windowTop < scrollTopSpan + 5 && topPos - windowTop > 0 && category !== null && category !== void 0 && category.id) {
147
+ if (windowTop > topPos - _paddDiff && windowTop < topPos + HeightOfEle - _paddDiff && category !== null && category !== void 0 && category.id) {
135
148
  var choosedCategory = document.getElementById("category-menu".concat((category === null || category === void 0 ? void 0 : category.id) || '-all'));
136
149
  var choosedCategoryLeft = (choosedCategory === null || choosedCategory === void 0 ? void 0 : choosedCategory.offsetLeft) || 0;
137
150
 
@@ -170,26 +183,29 @@ var BusinessProductsCategoriesUI = function BusinessProductsCategoriesUI(props)
170
183
  };
171
184
 
172
185
  (0, _react.useEffect)(function () {
186
+ if (typeof useKioskApp === 'undefined') return;
173
187
  var styleSheet = document.getElementById('styles').sheet;
174
188
  var style0 = '.sticky-prod-cat {';
175
189
  style0 += 'position: fixed !important;';
176
- style0 += 'top: 0 !important;';
177
- style0 += 'width: 97% !important;';
178
- style0 += 'padding: 15px 5px 0px 0px;';
190
+ style0 += 'top: 0px !important;';
191
+ style0 += 'left: 0px !important;';
192
+ style0 += 'padding: 5px 5px 0px 5px !important;';
193
+ style0 += "width: calc(100% - ".concat(useKioskApp ? '50px' : '155px', ") !important;");
179
194
  style0 += '}';
180
195
  var style1 = '.sticky-prod-cart {';
181
196
  style1 += 'position: fixed !important;';
182
- style1 += 'top: 0 !important;';
197
+ style1 += 'top: 38px !important;';
183
198
  style1 += 'right: 2.5% !important;';
184
199
  style1 += 'width: 28.5% !important;';
185
200
  style1 += 'margin-top: 32px !important;';
186
201
  style1 += '}';
187
202
  var style2 = '.sticky-search {';
188
203
  style2 += 'position: fixed !important;';
189
- style2 += 'top: 10px !important;';
190
- style2 += 'right: 32% !important;';
191
- style2 += 'height: 50px !important;';
204
+ style2 += 'top: 0px !important;';
205
+ style2 += 'right: 0% !important;';
192
206
  style2 += 'z-index: 9999 !important;';
207
+ style2 += 'width: 50px !important;';
208
+ style2 += "background-color: ".concat(theme.colors.backgroundPage, " !important;");
193
209
  style2 += '}';
194
210
  styleSheet.insertRule(style0, 0);
195
211
  styleSheet.insertRule(style1, 1);
@@ -198,7 +214,7 @@ var BusinessProductsCategoriesUI = function BusinessProductsCategoriesUI(props)
198
214
  return function () {
199
215
  return window.removeEventListener('scroll', handleScroll);
200
216
  };
201
- }, []);
217
+ }, [useKioskApp]);
202
218
  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) {
203
219
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
204
220
  key: i
@@ -17,7 +17,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
17
17
 
18
18
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
19
19
 
20
- var CategoriesContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n overflow-x: auto;\n padding: 5px 0px 0px 0px;\n background: ", ";\n z-index: 1000;\n position: absolute;\n top: 0;\n border-bottom: 1px solid #D9D9D9;\n text-align: center;\n width: ", ";\n\n div.category {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n padding: 10px 0px;\n margin: 0 15px;\n &:nth-of-type(1) {\n margin-left: 0;\n ", "\n }\n }\n\n div.special {\n ", "\n }\n\n @media (min-width: 381px) {\n padding: 15px 0px 0px 0px;\n }\n @media (min-width: 992px) {\n width: ", ";\n }\n"])), function (props) {
20
+ var CategoriesContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n overflow-x: auto;\n padding: 5px 0px 0px 0px;\n background: ", ";\n z-index: 1002;\n position: absolute;\n top: 0;\n border-bottom: 1px solid #D9D9D9;\n text-align: center;\n width: ", ";\n\n div.category {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n padding: 10px 0px;\n margin: 0 15px;\n &:nth-of-type(1) {\n margin-left: 0;\n ", "\n }\n }\n\n div.special {\n ", "\n }\n\n /* @media (min-width: 381px) {\n padding: 15px 0px 0px 0px;\n } */\n @media (min-width: 992px) {\n width: ", ";\n }\n"])), function (props) {
21
21
  return props.theme.colors.backgroundPage;
22
22
  }, function (props) {
23
23
  var _props$w;
@@ -78,7 +78,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
78
78
  var PIXELS_TO_SCROLL = 300;
79
79
 
80
80
  var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
81
- var _Object$values$find, _businessState$busine, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _currentCart$products, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9, _theme$defaultLanguag10, _error$, _theme$defaultLanguag11, _currentCart$products2, _theme$defaultLanguag12, _theme$defaultLanguag13, _theme$defaultLanguag14, _theme$defaultLanguag15, _currentCart$products3, _currentCart$products4, _currentCart$products5, _productModal$error$, _theme$defaultLanguag16, _productModal$product2;
81
+ var _Object$values$find, _businessState$busine, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _currentCart$products, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9, _theme$defaultLanguag10, _error$, _theme$defaultLanguag11, _currentCart$products2, _theme$defaultLanguag12, _theme$defaultLanguag13, _theme$defaultLanguag14, _theme$defaultLanguag15, _currentCart$products3, _currentCart$products4, _currentCart$products5, _productModal$error$, _theme$defaultLanguag16, _productModal$product2, _business$professiona2;
82
82
 
83
83
  var errors = props.errors,
84
84
  openCategories = props.openCategories,
@@ -213,7 +213,9 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
213
213
  };
214
214
 
215
215
  var onProductClick = function onProductClick(product) {
216
- if (!((product === null || product === void 0 ? void 0 : product.type) === 'service' && professionalSelected)) {
216
+ var _business$professiona;
217
+
218
+ if (!((product === null || product === void 0 ? void 0 : product.type) === 'service' && (business === null || business === void 0 ? void 0 : (_business$professiona = business.professionals) === null || _business$professiona === void 0 ? void 0 : _business$professiona.length) > 0)) {
217
219
  if (site !== null && site !== void 0 && site.product_url_template) {
218
220
  var _product$category;
219
221
 
@@ -519,7 +521,7 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
519
521
  content: ((_productModal$error$ = productModal.error[0]) === null || _productModal$error$ === void 0 ? void 0 : _productModal$error$.message) || productModal.error[0]
520
522
  }), isInitialRender && !productModal.loading && !productModal.error && !productModal.product && /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
521
523
  content: t('ERROR_GET_PRODUCT', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag16 = theme.defaultLanguages) === null || _theme$defaultLanguag16 === void 0 ? void 0 : _theme$defaultLanguag16.ERROR_GET_PRODUCT) || 'Sorry, we couldn\'t find the requested product.')
522
- }), (productModal.product || curProduct) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ((productModal === null || productModal === void 0 ? void 0 : (_productModal$product2 = productModal.product) === null || _productModal$product2 === void 0 ? void 0 : _productModal$product2.type) === 'service' || (curProduct === null || curProduct === void 0 ? void 0 : curProduct.type) === 'service') && professionalSelected ? /*#__PURE__*/_react.default.createElement(_ServiceForm.ServiceForm, {
524
+ }), (productModal.product || curProduct) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ((productModal === null || productModal === void 0 ? void 0 : (_productModal$product2 = productModal.product) === null || _productModal$product2 === void 0 ? void 0 : _productModal$product2.type) === 'service' || (curProduct === null || curProduct === void 0 ? void 0 : curProduct.type) === 'service') && (business === null || business === void 0 ? void 0 : (_business$professiona2 = business.professionals) === null || _business$professiona2 === void 0 ? void 0 : _business$professiona2.length) > 0 ? /*#__PURE__*/_react.default.createElement(_ServiceForm.ServiceForm, {
523
525
  businessSlug: business === null || business === void 0 ? void 0 : business.slug,
524
526
  useKioskApp: props.useKioskApp,
525
527
  product: productModal.product || curProduct,
@@ -90,7 +90,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
90
90
  var PIXELS_TO_SCROLL = 300;
91
91
 
92
92
  var BusinessesListingUI = function BusinessesListingUI(props) {
93
- var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _businessesList$busin, _businessesList$busin3, _props$beforeElements, _props$beforeComponen, _theme$images2, _theme$images2$genera, _citiesState$cities2, _citiesState$cities3, _citiesState$cities3$, _configs$advanced_bus, _orderState$options4, _orderState$options4$, _configs$advanced_bus2, _orderState$options5, _orderState$options5$, _businessesList$busin6, _businessesList$busin7, _orderState$options8, _citiesState$cities4, _props$afterComponent, _props$afterElements;
93
+ var _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _theme$business_listi4, _businessesList$busin, _businessesList$busin3, _props$beforeElements, _props$beforeComponen, _theme$images2, _theme$images2$genera, _citiesState$cities2, _citiesState$cities3, _citiesState$cities3$, _configs$advanced_bus, _orderState$options4, _orderState$options4$, _configs$advanced_bus2, _orderState$options5, _orderState$options5$, _businessesList$busin6, _businessesList$busin7, _orderState$options8, _citiesState$cities4, _props$afterComponent, _props$afterElements;
94
94
 
95
95
  var businessesList = props.businessesList,
96
96
  paginationProps = props.paginationProps,
@@ -128,10 +128,6 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
128
128
 
129
129
  var theme = (0, _styledComponents.useTheme)();
130
130
 
131
- var _useOrderingTheme = (0, _orderingComponentsExternal.useOrderingTheme)(),
132
- _useOrderingTheme2 = _slicedToArray(_useOrderingTheme, 1),
133
- orderingTheme = _useOrderingTheme2[0];
134
-
135
131
  var _useState = (0, _react.useState)({
136
132
  listOpen: false,
137
133
  formOpen: false,
@@ -181,7 +177,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
181
177
  favoriteIds = _useState16[0],
182
178
  setFavoriteIds = _useState16[1];
183
179
 
184
- var hideCities = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme = orderingTheme.theme) === null || _orderingTheme$theme === void 0 ? void 0 : (_orderingTheme$theme$ = _orderingTheme$theme.business_listing_view) === null || _orderingTheme$theme$ === void 0 ? void 0 : (_orderingTheme$theme$2 = _orderingTheme$theme$.components) === null || _orderingTheme$theme$2 === void 0 ? void 0 : (_orderingTheme$theme$3 = _orderingTheme$theme$2.cities) === null || _orderingTheme$theme$3 === void 0 ? void 0 : _orderingTheme$theme$3.hidden;
180
+ var hideCities = (_theme$business_listi = theme === null || theme === void 0 ? void 0 : (_theme$business_listi2 = theme.business_listing_view) === null || _theme$business_listi2 === void 0 ? void 0 : (_theme$business_listi3 = _theme$business_listi2.components) === null || _theme$business_listi3 === void 0 ? void 0 : (_theme$business_listi4 = _theme$business_listi3.cities) === null || _theme$business_listi4 === void 0 ? void 0 : _theme$business_listi4.hidden) !== null && _theme$business_listi !== void 0 ? _theme$business_listi : true;
185
181
  var businessesIds = isCustomLayout && businessesList.businesses && ((_businessesList$busin = businessesList.businesses) === null || _businessesList$busin === void 0 ? void 0 : _businessesList$busin.map(function (business) {
186
182
  return business.id;
187
183
  }));
@@ -387,7 +383,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
387
383
  page: 'business_search'
388
384
  });
389
385
  }
390
- }), typeof hideCities !== 'undefined' && !hideCities && (citiesState === null || citiesState === void 0 ? void 0 : (_citiesState$cities2 = citiesState.cities) === null || _citiesState$cities2 === void 0 ? void 0 : _citiesState$cities2.length) > 0 && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
386
+ }), !hideCities && (citiesState === null || citiesState === void 0 ? void 0 : (_citiesState$cities2 = citiesState.cities) === null || _citiesState$cities2 === void 0 ? void 0 : _citiesState$cities2.length) > 0 && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
391
387
  color: "primary",
392
388
  onClick: handleOpenCities
393
389
  }, (citiesState === null || citiesState === void 0 ? void 0 : (_citiesState$cities3 = citiesState.cities) === null || _citiesState$cities3 === void 0 ? void 0 : (_citiesState$cities3$ = _citiesState$cities3.find(function (city) {
@@ -39,6 +39,8 @@ var _SpinnerLoader = require("../../../../../components/SpinnerLoader");
39
39
 
40
40
  var _CartStoresListing = require("../../../../franchise/src/components/CartStoresListing");
41
41
 
42
+ var _DriverTips = require("../DriverTips");
43
+
42
44
  var _styles = require("./styles");
43
45
 
44
46
  var _utils = require("../../../../../utils");
@@ -74,7 +76,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
74
76
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
75
77
 
76
78
  var CartUI = function CartUI(props) {
77
- var _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _configs$checkout_mul, _Object$values, _orderState$carts, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderingTheme$theme$5, _orderState$option, _orderState$option2, _props$beforeElements, _props$beforeComponen, _cart$products2, _cart$offers, _cart$offers2, _cart$offers3, _cart$offers3$filter, _cart$offers4, _cart$offers4$filter, _cart$business, _ref, _cart$subtotal_with_d, _cart$taxes2, _cart$taxes3, _cart$fees, _cart$fees2, _cart$offers5, _cart$offers6, _cart$offers6$filter, _orderState$options, _cart$offers7, _cart$offers8, _cart$offers8$filter, _configs$driver_tip_t, _configs$driver_tip_u, _cart$payment_events, _cart$payment_events2, _cart$business2, _openTaxModal$data, _openTaxModal$data2, _openTaxModal$data3, _openTaxModal$data4, _openTaxModal$data$fi, _openTaxModal$data5, _openTaxModal$data6, _props$afterComponent, _props$afterElements;
79
+ var _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _configs$checkout_mul, _Object$values, _orderState$carts, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderingTheme$theme$5, _orderState$option, _orderState$option2, _props$beforeElements, _props$beforeComponen, _cart$products2, _cart$offers, _cart$offers2, _cart$offers3, _cart$offers3$filter, _cart$offers4, _cart$offers4$filter, _cart$business, _ref, _cart$subtotal_with_d, _cart$taxes2, _cart$taxes3, _cart$fees, _cart$fees2, _cart$offers5, _cart$offers6, _cart$offers6$filter, _orderState$options, _cart$offers7, _cart$offers8, _cart$offers8$filter, _configs$driver_tip_t, _configs$driver_tip_u, _orderState$options2, _validationFields$fie4, _validationFields$fie5, _validationFields$fie6, _configs$driver_tip_t2, _configs$driver_tip_u2, _configs$driver_tip_t3, _cart$payment_events, _cart$payment_events2, _cart$business2, _openTaxModal$data, _openTaxModal$data2, _openTaxModal$data3, _openTaxModal$data4, _openTaxModal$data$fi, _openTaxModal$data5, _openTaxModal$data6, _props$afterComponent, _props$afterElements;
78
80
 
79
81
  var currentCartUuid = props.currentCartUuid,
80
82
  clearCart = props.clearCart,
@@ -136,6 +138,7 @@ var CartUI = function CartUI(props) {
136
138
  site = _useSite2[0].site;
137
139
 
138
140
  var windowSize = (0, _useWindowSize.useWindowSize)();
141
+ var driverTipsOptions = typeof (configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_o = configs.driver_tip_options) === null || _configs$driver_tip_o === void 0 ? void 0 : _configs$driver_tip_o.value) === 'string' ? JSON.parse(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_o2 = configs.driver_tip_options) === null || _configs$driver_tip_o2 === void 0 ? void 0 : _configs$driver_tip_o2.value) || [] : (configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_o3 = configs.driver_tip_options) === null || _configs$driver_tip_o3 === void 0 ? void 0 : _configs$driver_tip_o3.value) || [];
139
142
 
140
143
  var _useState = (0, _react.useState)({
141
144
  open: false,
@@ -521,10 +524,18 @@ var CartUI = function CartUI(props) {
521
524
  return onRemoveOffer(offer === null || offer === void 0 ? void 0 : offer.id);
522
525
  }
523
526
  }))), /*#__PURE__*/_react.default.createElement("td", null, "- ", parsePrice(offer === null || offer === void 0 ? void 0 : (_offer$summary3 = offer.summary) === null || _offer$summary3 === void 0 ? void 0 : _offer$summary3.discount)));
524
- })), (cart === null || cart === void 0 ? void 0 : cart.driver_tip) > 0 && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DRIVER_TIP', 'Driver tip'), ' ', (cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate) > 0 && parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_t = configs.driver_tip_type) === null || _configs$driver_tip_t === void 0 ? void 0 : _configs$driver_tip_t.value, 10) === 2 && !parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_u = configs.driver_tip_use_custom) === null || _configs$driver_tip_u === void 0 ? void 0 : _configs$driver_tip_u.value, 10) && /*#__PURE__*/_react.default.createElement("span", null, "(".concat((0, _utils.verifyDecimals)(cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate, parseNumber), "%)"))), /*#__PURE__*/_react.default.createElement("td", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.driver_tip))))), isCouponEnabled && !isCartPending && (isCheckout || isCartPopover) && !(isCheckout && isCartPopover) && /*#__PURE__*/_react.default.createElement(_styles.CouponContainer, null, /*#__PURE__*/_react.default.createElement(_CouponControl.CouponControl, {
527
+ })), (cart === null || cart === void 0 ? void 0 : cart.driver_tip) > 0 && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DRIVER_TIP', 'Driver tip'), ' ', (cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate) > 0 && parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_t = configs.driver_tip_type) === null || _configs$driver_tip_t === void 0 ? void 0 : _configs$driver_tip_t.value, 10) === 2 && !parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_u = configs.driver_tip_use_custom) === null || _configs$driver_tip_u === void 0 ? void 0 : _configs$driver_tip_u.value, 10) && /*#__PURE__*/_react.default.createElement("span", null, "(".concat((0, _utils.verifyDecimals)(cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate, parseNumber), "%)"))), /*#__PURE__*/_react.default.createElement("td", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.driver_tip))))), isCouponEnabled && !isCartPending && (isCheckout || isCartPopover || isMultiCheckout) && !(isCheckout && isCartPopover) && /*#__PURE__*/_react.default.createElement(_styles.CouponContainer, null, /*#__PURE__*/_react.default.createElement(_CouponControl.CouponControl, {
525
528
  businessId: cart.business_id,
526
529
  price: cart.total
527
- })), /*#__PURE__*/_react.default.createElement("table", {
530
+ })), isMultiCheckout && cart && (cart === null || cart === void 0 ? void 0 : cart.business_id) && (orderState === null || orderState === void 0 ? void 0 : (_orderState$options2 = orderState.options) === null || _orderState$options2 === void 0 ? void 0 : _orderState$options2.type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie4 = validationFields.fields) === null || _validationFields$fie4 === void 0 ? void 0 : (_validationFields$fie5 = _validationFields$fie4.checkout) === null || _validationFields$fie5 === void 0 ? void 0 : (_validationFields$fie6 = _validationFields$fie5.driver_tip) === null || _validationFields$fie6 === void 0 ? void 0 : _validationFields$fie6.enabled) && driverTipsOptions.length > 0 && !useKioskApp && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.DriverTipContainer, null, /*#__PURE__*/_react.default.createElement("h1", null, t('DRIVER_TIPS', 'Driver Tips')), /*#__PURE__*/_react.default.createElement("p", null, t('100%_OF_THE_TIP_YOUR_DRIVER', '100% of the tip goes to your driver')), /*#__PURE__*/_react.default.createElement(_DriverTips.DriverTips, {
531
+ businessId: cart === null || cart === void 0 ? void 0 : cart.business_id,
532
+ driverTipsOptions: driverTipsOptions,
533
+ isFixedPrice: parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_t2 = configs.driver_tip_type) === null || _configs$driver_tip_t2 === void 0 ? void 0 : _configs$driver_tip_t2.value, 10) === 1,
534
+ isDriverTipUseCustom: !!parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_u2 = configs.driver_tip_use_custom) === null || _configs$driver_tip_u2 === void 0 ? void 0 : _configs$driver_tip_u2.value, 10),
535
+ driverTip: parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_t3 = configs.driver_tip_type) === null || _configs$driver_tip_t3 === void 0 ? void 0 : _configs$driver_tip_t3.value, 10) === 1 ? cart === null || cart === void 0 ? void 0 : cart.driver_tip : cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate,
536
+ cart: cart,
537
+ useOrderContext: true
538
+ }))), /*#__PURE__*/_react.default.createElement("table", {
528
539
  className: "total"
529
540
  }, /*#__PURE__*/_react.default.createElement("tbody", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('TOTAL', 'Total')), /*#__PURE__*/_react.default.createElement("td", null, parsePrice((cart === null || cart === void 0 ? void 0 : cart.total) >= 0 ? cart === null || cart === void 0 ? void 0 : cart.total : 0))))), (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && !hideCartComments && /*#__PURE__*/_react.default.createElement("table", {
530
541
  className: "comments"
@@ -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.SpotSelect = exports.Spinner = exports.SavedContainer = exports.OrderBill = exports.NoValidProductMessage = exports.IconContainer = exports.Exclamation = exports.Divider = exports.CouponContainer = exports.CommentContainer = exports.CheckoutAction = exports.CartSticky = exports.CartContainer = void 0;
8
+ exports.SpotSelect = exports.Spinner = exports.SavedContainer = exports.OrderBill = exports.NoValidProductMessage = exports.IconContainer = exports.Exclamation = exports.DriverTipContainer = exports.Divider = exports.CouponContainer = exports.CommentContainer = exports.CheckoutAction = exports.CartSticky = exports.CartContainer = void 0;
9
9
 
10
10
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
11
 
12
12
  var _polished = require("polished");
13
13
 
14
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
14
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19;
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
 
@@ -106,4 +106,10 @@ exports.SpotSelect = SpotSelect;
106
106
 
107
107
  var NoValidProductMessage = _styledComponents.default.p(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n font-size: 14px;\n"])));
108
108
 
109
- exports.NoValidProductMessage = NoValidProductMessage;
109
+ exports.NoValidProductMessage = NoValidProductMessage;
110
+
111
+ var DriverTipContainer = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n flex-direction: column;\n margin: 20px 0px 0px;\n h1 {\n margin: 0px;\n font-weight: 500;\n font-size: 20px;\n color: ", ";\n }\n > p {\n margin: 0;\n font-size: 16px;\n color: #909BA9;\n }\n"])), function (props) {
112
+ return props.theme.colors.darkTextColor;
113
+ });
114
+
115
+ exports.DriverTipContainer = DriverTipContainer;
@@ -301,15 +301,6 @@ var CheckoutUI = function CheckoutUI(props) {
301
301
  setUserErrors(errors);
302
302
  };
303
303
 
304
- var handleGoToStore = function handleGoToStore(slug) {
305
- events.emit('go_to_page', {
306
- page: 'business',
307
- params: {
308
- store: slug
309
- }
310
- });
311
- };
312
-
313
304
  (0, _react.useEffect)(function () {
314
305
  var _validationFields$fie14;
315
306
 
@@ -493,7 +484,7 @@ var CheckoutUI = function CheckoutUI(props) {
493
484
  onClick: function onClick() {
494
485
  var _cart$business2, _cart$business3;
495
486
 
496
- return (cart === null || cart === void 0 ? void 0 : (_cart$business2 = cart.business) === null || _cart$business2 === void 0 ? void 0 : _cart$business2.slug) && handleGoToStore(cart === null || cart === void 0 ? void 0 : (_cart$business3 = cart.business) === null || _cart$business3 === void 0 ? void 0 : _cart$business3.slug);
487
+ return (cart === null || cart === void 0 ? void 0 : (_cart$business2 = cart.business) === null || _cart$business2 === void 0 ? void 0 : _cart$business2.slug) && handleStoreRedirect && handleStoreRedirect(cart === null || cart === void 0 ? void 0 : (_cart$business3 = cart.business) === null || _cart$business3 === void 0 ? void 0 : _cart$business3.slug);
497
488
  }
498
489
  }, ('ADD_PRODUCTS', 'Add products'))), /*#__PURE__*/_react.default.createElement(_Cart.Cart, {
499
490
  isCartPending: (cart === null || cart === void 0 ? void 0 : cart.status) === 2,
@@ -21,7 +21,7 @@ var Container = _styledComponents.default.div(_templateObject || (_templateObjec
21
21
 
22
22
  exports.Container = Container;
23
23
 
24
- var WrapperLeftContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n box-sizing: border-box;\n padding: 30px 20px;\n\n @media (min-width: 769px) {\n width: 55%;\n padding: 30px 60px 55px 40px;\n }\n"])));
24
+ var WrapperLeftContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n box-sizing: border-box;\n padding: 55px 20px 30px;\n\n @media (min-width: 769px) {\n width: 55%;\n padding: 55px 60px 55px 40px;\n }\n\n @media (min-width: 820px) {\n padding: 30px 60px 55px 40px;\n }\n"])));
25
25
 
26
26
  exports.WrapperLeftContainer = WrapperLeftContainer;
27
27
 
@@ -58,7 +58,7 @@ var ModalActions = _styledComponents.default.div(_templateObject7 || (_templateO
58
58
 
59
59
  exports.ModalActions = ModalActions;
60
60
 
61
- var ModalHeader = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n\n"])));
61
+ var ModalHeader = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n margin-top: 30px;\n\n @media(min-width: 450px){\n margin-top: 0;\n }\n\n"])));
62
62
 
63
63
  exports.ModalHeader = ModalHeader;
64
64
 
@@ -17,7 +17,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
17
17
 
18
18
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
19
19
 
20
- var Title = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: 24px;\n font-weight: 600;\n text-align: center;\n margin-bottom: 40px;\n color: ", ";\n\n @media (max-width: 450px) {\n padding-left: 30px;\n ", "\n }\n"])), function (props) {
20
+ var Title = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: 24px;\n font-weight: 600;\n text-align: center;\n margin-bottom: 40px;\n color: ", ";\n\n @media (max-width: 450px) {\n ", "\n }\n"])), function (props) {
21
21
  var _props$theme$colors;
22
22
 
23
23
  return (_props$theme$colors = props.theme.colors) === null || _props$theme$colors === void 0 ? void 0 : _props$theme$colors.darkTextColor;
@@ -9,6 +9,8 @@ exports.MultiCheckout = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
+ var _reactRouterDom = require("react-router-dom");
13
+
12
14
  var _orderingComponentsExternal = require("ordering-components-external");
13
15
 
14
16
  var _libphonenumberJs = _interopRequireDefault(require("libphonenumber-js"));
@@ -100,6 +102,8 @@ var MultiCheckoutUI = function MultiCheckoutUI(props) {
100
102
  _useSession2 = _slicedToArray(_useSession, 1),
101
103
  user = _useSession2[0].user;
102
104
 
105
+ var history = (0, _reactRouterDom.useHistory)();
106
+
103
107
  var _useState = (0, _react.useState)([]),
104
108
  _useState2 = _slicedToArray(_useState, 2),
105
109
  userErrors = _useState2[0],
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.OrderItAgain = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _orderingComponentsExternal = require("ordering-components-external");
11
+
12
+ var _SingleProductCard = require("../SingleProductCard");
13
+
14
+ var _styles = require("./styles");
15
+
16
+ var _AutoScroll = require("../AutoScroll");
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+
20
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
21
+
22
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
23
+
24
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
25
+
26
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
27
+
28
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
29
+
30
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
31
+
32
+ var OrderItAgain = function OrderItAgain(props) {
33
+ var onProductClick = props.onProductClick,
34
+ isGroceries = props.isGroceries,
35
+ productList = props.productList,
36
+ businessId = props.businessId;
37
+
38
+ var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
39
+ _useLanguage2 = _slicedToArray(_useLanguage, 2),
40
+ t = _useLanguage2[1];
41
+
42
+ return /*#__PURE__*/_react.default.createElement(_styles.Container, {
43
+ isGroceries: isGroceries
44
+ }, /*#__PURE__*/_react.default.createElement(_styles.ContentHeader, {
45
+ isGroceries: isGroceries
46
+ }, /*#__PURE__*/_react.default.createElement("h2", null, t('ORDER_IT_AGAIN', 'Order it again')), /*#__PURE__*/_react.default.createElement("p", null, t('ORDER_IT_AGAIN_DESC', 'Quickly add items from your past orders.'))), /*#__PURE__*/_react.default.createElement(_styles.ProductListWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.ProductList, null, /*#__PURE__*/_react.default.createElement(_AutoScroll.AutoScroll, {
47
+ scrollId: "orderItAgain"
48
+ }, productList.map(function (product, i) {
49
+ return /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
50
+ key: i,
51
+ isSoldOut: product.inventoried && !product.quantity,
52
+ businessId: businessId,
53
+ product: product,
54
+ onProductClick: onProductClick,
55
+ isPreviously: true
56
+ });
57
+ })))));
58
+ };
59
+
60
+ exports.OrderItAgain = OrderItAgain;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.ProductListWrapper = exports.ProductList = exports.ContentHeader = exports.Container = void 0;
9
+
10
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
+
12
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
13
+
14
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
+
16
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
+
18
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
19
+
20
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-top: 30px;\n margin-right: 30px;\n ", "\n ", "\n"])), function (props) {
21
+ return props.theme.rtl && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-left: 30px;\n margin-right: 0px;\n "])));
22
+ }, function (_ref) {
23
+ var isGroceries = _ref.isGroceries;
24
+ return isGroceries && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding-top: 0px;\n margin-right: 0px;\n margin-left: 0px;\n "])));
25
+ });
26
+
27
+ exports.Container = Container;
28
+
29
+ var ContentHeader = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-bottom: 27px;\n\n > h2 {\n font-weight: 600;\n font-size: 24px;\n line-height: 36px;\n margin: 0px;\n }\n p {\n font-weight: 400;\n font-size: 14px;\n line-height: 24px;\n margin: 0px;\n color: ", ";\n }\n ", "\n"])), function (props) {
30
+ return props.theme.colors.darkGray;
31
+ }, function (_ref2) {
32
+ var isGroceries = _ref2.isGroceries;
33
+ return isGroceries && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", "\n "])), function (props) {
34
+ return props.theme.rtl ? (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-right: 10px;\n "]))) : (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-left: 10px;\n "])));
35
+ });
36
+ });
37
+
38
+ exports.ContentHeader = ContentHeader;
39
+
40
+ var ProductListWrapper = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n overflow: auto hidden;\n width: 100%;\n ::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n"])));
41
+
42
+ exports.ProductListWrapper = ProductListWrapper;
43
+
44
+ var ProductList = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n box-sizing: border-box;\n align-items: center;\n\n #orderItAgain > div {\n width: 350px;\n }\n"])));
45
+
46
+ exports.ProductList = ProductList;
@@ -860,7 +860,12 @@ var ProductOptionsUI = function ProductOptionsUI(props) {
860
860
  };
861
861
 
862
862
  var ProductForm = function ProductForm(props) {
863
+ var _props$product;
864
+
863
865
  var productOptionsProps = _objectSpread(_objectSpread({}, props), {}, {
866
+ productCart: {
867
+ quantity: (props === null || props === void 0 ? void 0 : (_props$product = props.product) === null || _props$product === void 0 ? void 0 : _props$product.minimum_per_order) || 1
868
+ },
864
869
  UIComponent: ProductOptionsUI
865
870
  });
866
871
 
@@ -13,6 +13,8 @@ var _orderingComponentsExternal = require("ordering-components-external");
13
13
 
14
14
  var _FaUserAlt = _interopRequireDefault(require("@meronex/icons/fa/FaUserAlt"));
15
15
 
16
+ var _reactBootstrapIcons = require("react-bootstrap-icons");
17
+
16
18
  var _styles = require("./styles");
17
19
 
18
20
  var _Modal = require("../Modal");
@@ -84,9 +86,9 @@ var ProfessionalFilter = function ProfessionalFilter(props) {
84
86
  }
85
87
  }, professional !== null && professional !== void 0 && professional.photo ? /*#__PURE__*/_react.default.createElement(_styles.ProfessionalPhoto, {
86
88
  bgimage: professional === null || professional === void 0 ? void 0 : professional.photo
87
- }) : /*#__PURE__*/_react.default.createElement(_FaUserAlt.default, null), /*#__PURE__*/_react.default.createElement("p", {
89
+ }) : /*#__PURE__*/_react.default.createElement(_FaUserAlt.default, null), /*#__PURE__*/_react.default.createElement(_styles.InfoWrapper, null, /*#__PURE__*/_react.default.createElement("p", {
88
90
  className: "name"
89
- }, professional === null || professional === void 0 ? void 0 : professional.name, " ", professional === null || professional === void 0 ? void 0 : professional.lastname));
91
+ }, professional === null || professional === void 0 ? void 0 : professional.name, " ", professional === null || professional === void 0 ? void 0 : professional.lastname), /*#__PURE__*/_react.default.createElement(_styles.HeartIconWrapper, null, professional !== null && professional !== void 0 && professional.favorite ? /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.HeartFill, null) : /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Heart, null))));
90
92
  }))))), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
91
93
  open: open,
92
94
  width: "760px",