ordering-ui-external 1.1.7 → 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.
- package/_bundles/{0.ordering-ui.ff2158785c5abf7d9a26.js → 0.ordering-ui.5a3714c3be025beef39b.js} +0 -0
- package/_bundles/{1.ordering-ui.ff2158785c5abf7d9a26.js → 1.ordering-ui.5a3714c3be025beef39b.js} +0 -0
- package/_bundles/{3.ordering-ui.ff2158785c5abf7d9a26.js → 3.ordering-ui.5a3714c3be025beef39b.js} +0 -0
- package/_bundles/{4.ordering-ui.ff2158785c5abf7d9a26.js → 4.ordering-ui.5a3714c3be025beef39b.js} +0 -0
- package/_bundles/{5.ordering-ui.ff2158785c5abf7d9a26.js → 5.ordering-ui.5a3714c3be025beef39b.js} +0 -0
- package/_bundles/{6.ordering-ui.ff2158785c5abf7d9a26.js → 6.ordering-ui.5a3714c3be025beef39b.js} +0 -0
- package/_bundles/{7.ordering-ui.ff2158785c5abf7d9a26.js → 7.ordering-ui.5a3714c3be025beef39b.js} +1 -1
- package/_bundles/{7.ordering-ui.ff2158785c5abf7d9a26.js.LICENSE.txt → 7.ordering-ui.5a3714c3be025beef39b.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.ff2158785c5abf7d9a26.js → 8.ordering-ui.5a3714c3be025beef39b.js} +0 -0
- package/_bundles/{9.ordering-ui.ff2158785c5abf7d9a26.js → 9.ordering-ui.5a3714c3be025beef39b.js} +0 -0
- package/_bundles/ordering-ui.5a3714c3be025beef39b.js +2 -0
- package/_bundles/{ordering-ui.ff2158785c5abf7d9a26.js.LICENSE.txt → ordering-ui.5a3714c3be025beef39b.js.LICENSE.txt} +0 -0
- package/_modules/themes/five/index.js +8 -0
- package/_modules/themes/five/src/components/BusinessInformation/styles.js +2 -2
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +5 -3
- package/_modules/themes/five/src/components/Cart/index.js +14 -3
- package/_modules/themes/five/src/components/Cart/styles.js +9 -3
- package/_modules/themes/five/src/components/Checkout/index.js +1 -10
- package/_modules/themes/five/src/components/Checkout/styles.js +1 -1
- package/_modules/themes/five/src/components/Modal/styles.js +1 -1
- package/_modules/themes/five/src/components/MomentControl/styles.js +1 -1
- package/_modules/themes/five/src/components/MultiCheckout/index.js +4 -0
- package/_modules/themes/five/src/components/OrderItAgain/index.js +60 -0
- package/_modules/themes/five/src/components/OrderItAgain/styles.js +46 -0
- package/_modules/themes/five/src/components/ProductForm/index.js +5 -0
- package/_modules/themes/five/src/components/ProfessionalFilter/index.js +4 -2
- package/_modules/themes/five/src/components/ProfessionalFilter/styles.js +20 -8
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +16 -3
- package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +27 -24
- package/_modules/themes/five/src/components/ReviewProduct/styles.js +6 -6
- package/_modules/themes/five/src/components/ServiceForm/index.js +5 -7
- package/_modules/themes/five/src/components/ServiceForm/styles.js +9 -5
- package/_modules/themes/five/src/components/SidebarMenu/index.js +13 -2
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +1 -1
- package/_modules/themes/five/src/components/SingleProductCard/index.js +15 -7
- package/_modules/themes/five/src/components/SingleProductCard/styles.js +60 -48
- package/_modules/themes/four/src/components/BusinessBasicInformation/index.js +1 -1
- package/package.json +1 -1
- package/src/themes/five/index.js +2 -0
- package/src/themes/five/src/components/BusinessInformation/styles.js +3 -3
- package/src/themes/five/src/components/BusinessProductsListing/index.js +2 -2
- package/src/themes/five/src/components/Cart/index.js +37 -2
- package/src/themes/five/src/components/Cart/styles.js +17 -0
- package/src/themes/five/src/components/Checkout/index.js +1 -5
- package/src/themes/five/src/components/Checkout/styles.js +5 -1
- package/src/themes/five/src/components/Modal/styles.js +5 -0
- package/src/themes/five/src/components/MomentControl/index.js +48 -48
- package/src/themes/five/src/components/MomentControl/styles.js +0 -1
- package/src/themes/five/src/components/MultiCheckout/index.js +2 -0
- package/src/themes/five/src/components/OrderItAgain/index.js +46 -0
- package/src/themes/five/src/components/OrderItAgain/styles.js +60 -0
- package/src/themes/five/src/components/ProductForm/index.js +1 -0
- package/src/themes/five/src/components/ProfessionalFilter/index.js +10 -2
- package/src/themes/five/src/components/ProfessionalFilter/styles.js +24 -9
- package/src/themes/five/src/components/RenderProductsLayout/index.js +17 -1
- package/src/themes/five/src/components/RenderProductsLayout/styles.js +5 -2
- package/src/themes/five/src/components/ReviewProduct/styles.js +14 -0
- package/src/themes/five/src/components/ServiceForm/index.js +31 -22
- package/src/themes/five/src/components/ServiceForm/styles.js +16 -0
- package/src/themes/five/src/components/SidebarMenu/index.js +32 -1
- package/src/themes/five/src/components/SingleOrderCard/index.js +1 -1
- package/src/themes/five/src/components/SingleProductCard/index.js +9 -5
- package/src/themes/five/src/components/SingleProductCard/styles.js +21 -7
- package/src/themes/four/src/components/BusinessBasicInformation/index.js +15 -17
- package/_bundles/ordering-ui.ff2158785c5abf7d9a26.js +0 -2
|
File without changes
|
|
@@ -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");
|
|
@@ -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:
|
|
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:
|
|
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;
|
|
@@ -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
|
-
|
|
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') &&
|
|
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,
|
|
@@ -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("
|
|
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) &&
|
|
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:
|
|
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
|
|
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",
|
|
@@ -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.ProfessionalPhoto = exports.ProfessionalListing = exports.ProfessionalItem = exports.ContentWrapper = exports.Container = void 0;
|
|
8
|
+
exports.ProfessionalPhoto = exports.ProfessionalListing = exports.ProfessionalItem = exports.InfoWrapper = exports.HeartIconWrapper = exports.ContentWrapper = exports.Container = void 0;
|
|
9
9
|
|
|
10
10
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
11
11
|
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
|
|
14
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
@@ -27,12 +27,12 @@ var Container = _styledComponents.default.div(_templateObject || (_templateObjec
|
|
|
27
27
|
|
|
28
28
|
exports.Container = Container;
|
|
29
29
|
|
|
30
|
-
var ProfessionalItem = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n padding: 11px;\n border: 1px solid ", ";\n border-radius: 7.6px;\n cursor: pointer;\n margin: 0px 6px;\n transition: all 0.3s linear;\n width: 205px;\n min-width: 205px;\n box-sizing: border-box;\n\n &:hover {\n background-color: ", ";\n }\n\n > svg {\n height: 42px;\n width: 42px;\n min-width: 42px;\n }\n\n
|
|
30
|
+
var ProfessionalItem = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n padding: 11px;\n border: 1px solid ", ";\n border-radius: 7.6px;\n cursor: pointer;\n margin: 0px 6px;\n transition: all 0.3s linear;\n width: 205px;\n min-width: 205px;\n box-sizing: border-box;\n\n &:hover {\n background-color: ", ";\n }\n\n > svg {\n height: 42px;\n width: 42px;\n min-width: 42px;\n margin-right: 12px;\n ", "\n }\n\n p {\n font-weight: 400;\n font-size: 14px;\n line-height: 24px;\n margin: 0px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ", "\n"])), function (props) {
|
|
31
31
|
return props.theme.colors.gray200;
|
|
32
32
|
}, function (props) {
|
|
33
33
|
return props.theme.colors.primaryContrast;
|
|
34
34
|
}, function (props) {
|
|
35
|
-
return props.theme.rtl && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n
|
|
35
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-left: 12px;\n margin-right: 0px;\n "])));
|
|
36
36
|
}, function (_ref) {
|
|
37
37
|
var active = _ref.active;
|
|
38
38
|
return active && (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n "])), function (props) {
|
|
@@ -42,7 +42,9 @@ var ProfessionalItem = _styledComponents.default.div(_templateObject2 || (_templ
|
|
|
42
42
|
|
|
43
43
|
exports.ProfessionalItem = ProfessionalItem;
|
|
44
44
|
|
|
45
|
-
var ProfessionalPhotoStyled = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _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 height: 42px;\n width: 42px;\n min-width: 42px;\n border-radius: 7.6px;\n"])))
|
|
45
|
+
var ProfessionalPhotoStyled = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _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 height: 42px;\n width: 42px;\n min-width: 42px;\n border-radius: 7.6px;\n margin-right: 12px;\n ", "\n"])), function (props) {
|
|
46
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-left: 12px;\n margin-right: 0px;\n "])));
|
|
47
|
+
});
|
|
46
48
|
|
|
47
49
|
var ProfessionalPhoto = function ProfessionalPhoto(props) {
|
|
48
50
|
var style = {};
|
|
@@ -58,10 +60,20 @@ var ProfessionalPhoto = function ProfessionalPhoto(props) {
|
|
|
58
60
|
|
|
59
61
|
exports.ProfessionalPhoto = ProfessionalPhoto;
|
|
60
62
|
|
|
61
|
-
var ContentWrapper = _styledComponents.default.div(
|
|
63
|
+
var ContentWrapper = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n overflow: auto hidden;\n width: 100%;\n"])));
|
|
62
64
|
|
|
63
65
|
exports.ContentWrapper = ContentWrapper;
|
|
64
66
|
|
|
65
|
-
var ProfessionalListing = _styledComponents.default.div(
|
|
67
|
+
var ProfessionalListing = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n"])));
|
|
68
|
+
|
|
69
|
+
exports.ProfessionalListing = ProfessionalListing;
|
|
70
|
+
|
|
71
|
+
var InfoWrapper = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n width: calc(100% - 54px);\n"])));
|
|
72
|
+
|
|
73
|
+
exports.InfoWrapper = InfoWrapper;
|
|
74
|
+
|
|
75
|
+
var HeartIconWrapper = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n svg {\n color: ", ";\n font-size: 16px;\n }\n"])), function (props) {
|
|
76
|
+
return props.theme.colors.danger500;
|
|
77
|
+
});
|
|
66
78
|
|
|
67
|
-
exports.
|
|
79
|
+
exports.HeartIconWrapper = HeartIconWrapper;
|
|
@@ -53,6 +53,8 @@ var _ProfessionalFilter = require("../ProfessionalFilter");
|
|
|
53
53
|
|
|
54
54
|
var _styles2 = require("../BusinessBasicInformation/styles");
|
|
55
55
|
|
|
56
|
+
var _OrderItAgain = require("../OrderItAgain");
|
|
57
|
+
|
|
56
58
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
57
59
|
|
|
58
60
|
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); }
|
|
@@ -84,7 +86,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
84
86
|
var layoutOne = 'groceries';
|
|
85
87
|
|
|
86
88
|
var RenderProductsLayout = function RenderProductsLayout(props) {
|
|
87
|
-
var _configs$use_parent_c, _configs$use_parent_c2, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderingTheme$theme$5, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _orderingTheme$theme9, _orderingTheme$theme10, _orderingTheme$theme11, _orderingTheme$theme12, _orderingTheme$theme13, _orderingTheme$theme14, _orderingTheme$theme15, _orderingTheme$theme16, _orderingTheme$theme17, _orderingTheme$theme18, _orderingTheme$theme19, _orderingTheme$theme20, _orderingTheme$theme21, _orderingTheme$theme22, _orderingTheme$theme23, _orderingTheme$theme24, _orderingTheme$theme25, _orderingTheme$theme26, _orderingTheme$theme27, _orderingTheme$theme28, _orderingTheme$theme29, _orderingTheme$theme30, _theme$business_view$, _theme$business_view, _theme$business_view$2, _theme$business_view$3, _businessState$busine, _businessState$busine2, _business$categories, _theme$defaultLanguag, _theme$defaultLanguag2, _business$professiona, _theme$defaultLanguag3, _theme$defaultLanguag4, _currentCart$products, _business$professiona2, _business$categories2, _theme$defaultLanguag5, _theme$defaultLanguag6, _theme$defaultLanguag7, _theme$defaultLanguag8, _currentCart$products2, _currentCart$products3;
|
|
89
|
+
var _configs$use_parent_c, _configs$use_parent_c2, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderingTheme$theme$5, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _orderingTheme$theme9, _orderingTheme$theme10, _orderingTheme$theme11, _orderingTheme$theme12, _orderingTheme$theme13, _orderingTheme$theme14, _orderingTheme$theme15, _orderingTheme$theme16, _orderingTheme$theme17, _orderingTheme$theme18, _orderingTheme$theme19, _orderingTheme$theme20, _orderingTheme$theme21, _orderingTheme$theme22, _orderingTheme$theme23, _orderingTheme$theme24, _orderingTheme$theme25, _orderingTheme$theme26, _orderingTheme$theme27, _orderingTheme$theme28, _orderingTheme$theme29, _orderingTheme$theme30, _theme$business_view$, _theme$business_view, _theme$business_view$2, _theme$business_view$3, _businessState$busine, _businessState$busine2, _business$categories, _theme$defaultLanguag, _theme$defaultLanguag2, _business$professiona, _business$previously_, _theme$defaultLanguag3, _theme$defaultLanguag4, _currentCart$products, _business$professiona2, _business$categories2, _theme$defaultLanguag5, _theme$defaultLanguag6, _business$previously_2, _theme$defaultLanguag7, _theme$defaultLanguag8, _currentCart$products2, _currentCart$products3;
|
|
88
90
|
|
|
89
91
|
var errors = props.errors,
|
|
90
92
|
isError = props.isError,
|
|
@@ -247,7 +249,11 @@ var RenderProductsLayout = function RenderProductsLayout(props) {
|
|
|
247
249
|
professionals: business === null || business === void 0 ? void 0 : business.professionals,
|
|
248
250
|
professionalSelected: professionalSelected,
|
|
249
251
|
handleChangeProfessionalSelected: handleChangeProfessionalSelected
|
|
250
|
-
})), /*#__PURE__*/_react.default.createElement(
|
|
252
|
+
})), !(business !== null && business !== void 0 && business.loading) && (business === null || business === void 0 ? void 0 : (_business$previously_ = business.previously_products) === null || _business$previously_ === void 0 ? void 0 : _business$previously_.length) > 0 && /*#__PURE__*/_react.default.createElement(_OrderItAgain.OrderItAgain, {
|
|
253
|
+
onProductClick: onProductClick,
|
|
254
|
+
productList: business === null || business === void 0 ? void 0 : business.previously_products,
|
|
255
|
+
businessId: business === null || business === void 0 ? void 0 : business.id
|
|
256
|
+
}), /*#__PURE__*/_react.default.createElement(BusinessLayoutProductsList, {
|
|
251
257
|
categories: [{
|
|
252
258
|
id: null,
|
|
253
259
|
name: t('ALL', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag3 = theme.defaultLanguages) === null || _theme$defaultLanguag3 === void 0 ? void 0 : _theme$defaultLanguag3.ALL) || 'All')
|
|
@@ -319,7 +325,14 @@ var RenderProductsLayout = function RenderProductsLayout(props) {
|
|
|
319
325
|
business: business,
|
|
320
326
|
currentCart: currentCart,
|
|
321
327
|
useKioskApp: useKioskApp
|
|
322
|
-
})), /*#__PURE__*/_react.default.createElement(_styles.BusinessCategoryProductWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.WrapContent,
|
|
328
|
+
})), /*#__PURE__*/_react.default.createElement(_styles.BusinessCategoryProductWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.WrapContent, {
|
|
329
|
+
isGroceries: true
|
|
330
|
+
}, !(business !== null && business !== void 0 && business.loading) && (business === null || business === void 0 ? void 0 : (_business$previously_2 = business.previously_products) === null || _business$previously_2 === void 0 ? void 0 : _business$previously_2.length) > 0 && /*#__PURE__*/_react.default.createElement(_OrderItAgain.OrderItAgain, {
|
|
331
|
+
onProductClick: onProductClick,
|
|
332
|
+
productList: business === null || business === void 0 ? void 0 : business.previously_products,
|
|
333
|
+
businessId: business === null || business === void 0 ? void 0 : business.id,
|
|
334
|
+
isGroceries: true
|
|
335
|
+
}), /*#__PURE__*/_react.default.createElement(BusinessLayoutProductsList, {
|
|
323
336
|
categories: [{
|
|
324
337
|
id: null,
|
|
325
338
|
name: t('ALL', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag7 = theme.defaultLanguages) === null || _theme$defaultLanguag7 === void 0 ? void 0 : _theme$defaultLanguag7.ALL) || 'All')
|