ordering-ui-external 4.0.7 → 5.0.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.b594c1b9cf54956bec90.js → 0.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{1.ordering-ui.b594c1b9cf54956bec90.js → 1.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{2.ordering-ui.b594c1b9cf54956bec90.js → 2.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{4.ordering-ui.b594c1b9cf54956bec90.js → 4.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{5.ordering-ui.b594c1b9cf54956bec90.js → 5.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{6.ordering-ui.b594c1b9cf54956bec90.js → 6.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{7.ordering-ui.b594c1b9cf54956bec90.js → 7.ordering-ui.dc2501dcf51ed5b7b821.js} +2 -2
- package/_bundles/{8.ordering-ui.b594c1b9cf54956bec90.js → 8.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{9.ordering-ui.b594c1b9cf54956bec90.js → 9.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{ordering-ui.b594c1b9cf54956bec90.js → ordering-ui.dc2501dcf51ed5b7b821.js} +2 -2
- package/_modules/components/BusinessBasicInformation/index.js +4 -4
- package/_modules/components/BusinessBasicInformation/styles.js +4 -1
- package/_modules/components/UserProfileForm/styles.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/AddressList/index.js +4 -5
- package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +2 -6
- package/_modules/themes/callcenterOriginal/src/components/Checkout/index.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/Header/index.js +23 -43
- package/_modules/themes/callcenterOriginal/src/components/Header/styles.js +14 -12
- package/_modules/themes/callcenterOriginal/src/components/SidebarMenu/index.js +16 -1
- package/_modules/themes/callcenterOriginal/src/components/SidebarMenu/styles.js +11 -3
- package/_modules/themes/callcenterOriginal/src/components/UserDetails/index.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/UserDetails/styles.js +2 -2
- package/_modules/themes/five/src/components/BusinessInformation/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessInformation/styles.js +9 -5
- package/_modules/themes/five/src/components/BusinessItemAccordion/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +2 -3
- package/_modules/themes/five/src/components/BusinessProductsList/layouts/groceries/index.js +8 -4
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +18 -14
- package/_modules/themes/five/src/components/Checkout/index.js +6 -6
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/index.js +5 -2
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +44 -39
- package/_modules/themes/five/src/components/OrderContextUI/index.js +61 -7
- package/_modules/themes/five/src/components/OrderContextUI/styles.js +1 -1
- package/_modules/themes/five/src/components/PageBanner/index.js +3 -3
- package/_modules/themes/five/src/components/PhoneAutocomplete/styles.js +1 -1
- package/_modules/themes/five/src/components/ProductForm/index.js +20 -18
- package/_modules/themes/five/src/components/ProductShare/index.js +1 -1
- package/_modules/themes/five/src/components/ProductShare/styles.js +2 -2
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +5 -3
- package/_modules/themes/five/src/components/ResetPassword/index.js +6 -7
- package/_modules/themes/five/src/components/ScheduleAccordion/styles.js +1 -1
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +4 -2
- package/_modules/themes/five/src/components/SingleOrderCard/styles.js +18 -15
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +3 -2
- package/_modules/themes/five/src/components/TaxInformation/styles.js +1 -1
- package/package.json +2 -2
- package/src/components/BusinessBasicInformation/index.js +7 -10
- package/src/components/BusinessBasicInformation/styles.js +13 -0
- package/src/components/UserProfileForm/styles.js +0 -1
- package/src/themes/callcenterOriginal/src/components/AddressList/index.js +2 -2
- package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +6 -5
- package/src/themes/callcenterOriginal/src/components/Checkout/index.js +1 -1
- package/src/themes/callcenterOriginal/src/components/Header/index.js +2 -40
- package/src/themes/callcenterOriginal/src/components/Header/styles.js +6 -3
- package/src/themes/callcenterOriginal/src/components/SidebarMenu/index.js +19 -1
- package/src/themes/callcenterOriginal/src/components/SidebarMenu/styles.js +27 -0
- package/src/themes/callcenterOriginal/src/components/UserDetails/index.js +1 -1
- package/src/themes/callcenterOriginal/src/components/UserDetails/styles.js +5 -1
- package/src/themes/five/src/components/BusinessInformation/index.js +2 -0
- package/src/themes/five/src/components/BusinessInformation/styles.js +10 -1
- package/src/themes/five/src/components/BusinessItemAccordion/styles.js +3 -0
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +1 -2
- package/src/themes/five/src/components/BusinessProductsList/layouts/groceries/index.js +5 -1
- package/src/themes/five/src/components/BusinessProductsListing/index.js +5 -1
- package/src/themes/five/src/components/Checkout/index.js +2 -1
- package/src/themes/five/src/components/HorizontalOrdersLayout/index.js +16 -10
- package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +16 -1
- package/src/themes/five/src/components/OrderContextUI/index.js +47 -3
- package/src/themes/five/src/components/OrderContextUI/styles.js +3 -0
- package/src/themes/five/src/components/PageBanner/index.js +3 -3
- package/src/themes/five/src/components/PhoneAutocomplete/styles.js +4 -0
- package/src/themes/five/src/components/ProductForm/index.js +28 -24
- package/src/themes/five/src/components/ProductShare/index.js +1 -1
- package/src/themes/five/src/components/ProductShare/styles.js +1 -3
- package/src/themes/five/src/components/RenderProductsLayout/index.js +8 -4
- package/src/themes/five/src/components/ResetPassword/index.js +1 -1
- package/src/themes/five/src/components/ScheduleAccordion/styles.js +4 -0
- package/src/themes/five/src/components/SidebarMenu/index.js +3 -2
- package/src/themes/five/src/components/SingleOrderCard/index.js +4 -4
- package/src/themes/five/src/components/SingleOrderCard/styles.js +1 -1
- package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +3 -2
- package/src/themes/five/src/components/TaxInformation/styles.js +3 -0
- package/template/pages/BusinessProductsList/index.js +1 -0
- /package/_bundles/{7.ordering-ui.b594c1b9cf54956bec90.js.LICENSE.txt → 7.ordering-ui.dc2501dcf51ed5b7b821.js.LICENSE.txt} +0 -0
- /package/_bundles/{ordering-ui.b594c1b9cf54956bec90.js.LICENSE.txt → ordering-ui.dc2501dcf51ed5b7b821.js.LICENSE.txt} +0 -0
|
@@ -48,7 +48,8 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
48
48
|
categoriesState = props.categoriesState,
|
|
49
49
|
onClickCategory = props.onClickCategory,
|
|
50
50
|
currentCart = props.currentCart,
|
|
51
|
-
handleUpdateProducts = props.handleUpdateProducts
|
|
51
|
+
handleUpdateProducts = props.handleUpdateProducts,
|
|
52
|
+
isCustomerMode = props.isCustomerMode;
|
|
52
53
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
53
54
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
54
55
|
t = _useLanguage2[1];
|
|
@@ -88,7 +89,8 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
88
89
|
handleUpdateProducts: handleUpdateProducts,
|
|
89
90
|
productAddedToCartLength: currentCart === null || currentCart === void 0 ? void 0 : (_currentCart$products = currentCart.products) === null || _currentCart$products === void 0 ? void 0 : _currentCart$products.reduce(function (productsLength, Cproduct) {
|
|
90
91
|
return productsLength + ((Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.id) === (product === null || product === void 0 ? void 0 : product.id) ? Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.quantity : 0);
|
|
91
|
-
}, 0)
|
|
92
|
+
}, 0),
|
|
93
|
+
isCustomerMode: isCustomerMode
|
|
92
94
|
});
|
|
93
95
|
}))), !(category !== null && category !== void 0 && category.id) && categories.filter(function (category) {
|
|
94
96
|
return (category === null || category === void 0 ? void 0 : category.id) === 'featured';
|
|
@@ -123,7 +125,8 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
123
125
|
isCartOnProductsList: isCartOnProductsList,
|
|
124
126
|
productAddedToCartLength: currentCart === null || currentCart === void 0 ? void 0 : (_currentCart$products2 = currentCart.products) === null || _currentCart$products2 === void 0 ? void 0 : _currentCart$products2.reduce(function (productsLength, Cproduct) {
|
|
125
127
|
return productsLength + ((Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.id) === (product === null || product === void 0 ? void 0 : product.id) ? Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.quantity : 0);
|
|
126
|
-
}, 0)
|
|
128
|
+
}, 0),
|
|
129
|
+
isCustomerMode: isCustomerMode
|
|
127
130
|
});
|
|
128
131
|
}), !(business !== null && business !== void 0 && business.food) && !(categoryState !== null && categoryState !== void 0 && categoryState.loading) && (featProducts === null || featProducts === void 0 ? void 0 : featProducts.length) > 9 && /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
129
132
|
useCustomFunctionality: true,
|
|
@@ -187,7 +190,8 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
187
190
|
isCartOnProductsList: isCartOnProductsList,
|
|
188
191
|
productAddedToCartLength: currentCart === null || currentCart === void 0 ? void 0 : (_currentCart$products3 = currentCart.products) === null || _currentCart$products3 === void 0 ? void 0 : _currentCart$products3.reduce(function (productsLength, Cproduct) {
|
|
189
192
|
return productsLength + ((Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.id) === (product === null || product === void 0 ? void 0 : product.id) ? Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.quantity : 0);
|
|
190
|
-
}, 0)
|
|
193
|
+
}, 0),
|
|
194
|
+
isCustomerMode: isCustomerMode
|
|
191
195
|
});
|
|
192
196
|
}), !(business !== null && business !== void 0 && business.food) && !(categoryState !== null && categoryState !== void 0 && categoryState.loading) && (products === null || products === void 0 ? void 0 : products.length) > 9 && /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
193
197
|
useCustomFunctionality: true,
|
|
@@ -80,6 +80,7 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
80
80
|
handleChangePriceFilterValues = props.handleChangePriceFilterValues,
|
|
81
81
|
priceFilterValues = props.priceFilterValues,
|
|
82
82
|
handleUpdateProfessionals = props.handleUpdateProfessionals,
|
|
83
|
+
isCustomerMode = props.isCustomerMode,
|
|
83
84
|
isCustomLayout = props.isCustomLayout;
|
|
84
85
|
var business = businessState.business,
|
|
85
86
|
loading = businessState.loading,
|
|
@@ -181,12 +182,12 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
181
182
|
};
|
|
182
183
|
var onProductClick = /*#__PURE__*/function () {
|
|
183
184
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(product) {
|
|
184
|
-
var _currentCart$products, isProductAddedToCart, productQuantity, addCurrentProduct, updateCurrentProduct, cartData, _business$professiona, _product$category;
|
|
185
|
+
var _currentCart$products, isProductAddedToCart, productQuantity, minimumPerOrder, addCurrentProduct, updateCurrentProduct, cartData, _business$professiona, _product$category;
|
|
185
186
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
186
187
|
while (1) switch (_context.prev = _context.next) {
|
|
187
188
|
case 0:
|
|
188
189
|
if (!(product.extras.length === 0 && !product.inventoried && auth && isQuickAddProduct)) {
|
|
189
|
-
_context.next =
|
|
190
|
+
_context.next = 18;
|
|
190
191
|
break;
|
|
191
192
|
}
|
|
192
193
|
setProductIdToLoading(product.id);
|
|
@@ -194,8 +195,9 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
194
195
|
return Cproduct.id === product.id;
|
|
195
196
|
});
|
|
196
197
|
productQuantity = isProductAddedToCart === null || isProductAddedToCart === void 0 ? void 0 : isProductAddedToCart.quantity;
|
|
198
|
+
minimumPerOrder = (product === null || product === void 0 ? void 0 : product.minimum_per_order) || 1;
|
|
197
199
|
addCurrentProduct = _objectSpread(_objectSpread({}, product), {}, {
|
|
198
|
-
quantity:
|
|
200
|
+
quantity: minimumPerOrder
|
|
199
201
|
});
|
|
200
202
|
updateCurrentProduct = {
|
|
201
203
|
id: product.id,
|
|
@@ -206,22 +208,22 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
206
208
|
business_id: business.id
|
|
207
209
|
};
|
|
208
210
|
if (!isProductAddedToCart) {
|
|
209
|
-
_context.next =
|
|
211
|
+
_context.next = 13;
|
|
210
212
|
break;
|
|
211
213
|
}
|
|
212
|
-
_context.next =
|
|
214
|
+
_context.next = 11;
|
|
213
215
|
return updateProduct(updateCurrentProduct, cartData, isQuickAddProduct);
|
|
214
|
-
case
|
|
215
|
-
_context.next =
|
|
216
|
+
case 11:
|
|
217
|
+
_context.next = 15;
|
|
216
218
|
break;
|
|
217
|
-
case
|
|
218
|
-
_context.next =
|
|
219
|
+
case 13:
|
|
220
|
+
_context.next = 15;
|
|
219
221
|
return addProduct(addCurrentProduct, cartData, isQuickAddProduct);
|
|
220
|
-
case
|
|
222
|
+
case 15:
|
|
221
223
|
setProductIdToLoading(null);
|
|
222
|
-
_context.next =
|
|
224
|
+
_context.next = 22;
|
|
223
225
|
break;
|
|
224
|
-
case
|
|
226
|
+
case 18:
|
|
225
227
|
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)) {
|
|
226
228
|
if (site !== null && site !== void 0 && site.product_url_template) {
|
|
227
229
|
onProductRedirect({
|
|
@@ -240,7 +242,7 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
240
242
|
setCurProduct(product);
|
|
241
243
|
setModalIsOpen(true);
|
|
242
244
|
events.emit('product_clicked', product);
|
|
243
|
-
case
|
|
245
|
+
case 22:
|
|
244
246
|
case "end":
|
|
245
247
|
return _context.stop();
|
|
246
248
|
}
|
|
@@ -474,7 +476,8 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
474
476
|
priceFilterValues: priceFilterValues,
|
|
475
477
|
handleChangePriceFilterValues: handleChangePriceFilterValues,
|
|
476
478
|
productToIdLoading: productToIdLoading,
|
|
477
|
-
handleUpdateProfessionals: handleUpdateProfessionals
|
|
479
|
+
handleUpdateProfessionals: handleUpdateProfessionals,
|
|
480
|
+
isCustomerMode: isCustomerMode
|
|
478
481
|
}), isMounted && !loading && business && !Object.keys(business).length && /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
|
|
479
482
|
content: t('NOT_FOUND_BUSINESS_PRODUCTS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag7 = theme.defaultLanguages) === null || _theme$defaultLanguag7 === void 0 ? void 0 : _theme$defaultLanguag7.NOT_FOUND_BUSINESS_PRODUCTS) || 'No products to show at this business, please try with other business.'),
|
|
480
483
|
btnTitle: t('SEARCH_REDIRECT', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag8 = theme.defaultLanguages) === null || _theme$defaultLanguag8 === void 0 ? void 0 : _theme$defaultLanguag8.SEARCH_REDIRECT) || 'Go to Businesses'),
|
|
@@ -570,6 +573,7 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
570
573
|
productId: curProduct === null || curProduct === void 0 ? void 0 : curProduct.id,
|
|
571
574
|
handleUpdateProducts: handleUpdateProducts,
|
|
572
575
|
onSave: handlerProductAction,
|
|
576
|
+
isCustomerMode: isCustomerMode,
|
|
573
577
|
productAddedToCartLength: (currentCart === null || currentCart === void 0 ? void 0 : (_currentCart$products8 = currentCart.products) === null || _currentCart$products8 === void 0 ? void 0 : _currentCart$products8.reduce(function (productsLength, Cproduct) {
|
|
574
578
|
var _ref4;
|
|
575
579
|
return productsLength + ((Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.id) === ((_ref4 = productModal.product || curProduct) === null || _ref4 === void 0 ? void 0 : _ref4.id) ? Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.quantity : 0);
|
|
@@ -62,7 +62,7 @@ var mapConfigs = {
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
var CheckoutUI = function CheckoutUI(props) {
|
|
65
|
-
var _businessDetails$busi, _businessDetails$busi2, _configs$table_numer_, _businessConfigs$find, _businessConfigs$find2, _configs$cash_wallet, _configs$wallet_enabl, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _validationFields$fie4, _validationFields$fie5, _validationFields$fie6, _cart$comment, _cardList$cards, _cartState$cart, _validationFields$fie7, _validationFields$fie8, _validationFields$fie9, _validationFields$fie10, _validationFields$fie11, _validationFields$fie12, _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _instructionsOptions$, _instructionsOptions$2, _theme$checkout, _theme$checkout$compo, _theme$checkout$compo2, _theme$checkout$compo3, _theme$checkout$compo4, _theme$checkout2, _theme$checkout2$comp, _theme$checkout2$comp2, _theme$checkout3, _theme$checkout3$comp, _theme$checkout3$comp2, _theme$checkout4, _theme$checkout4$comp, _theme$checkout4$comp2, _validationFields$fie13, _validationFields$fie14, _validationFields$fie15, _loyaltyPlansState$re, _creditPointPlan$busi, _options$address, _businessDetails$busi3, _theme$images, _theme$images$dummies, _configs$google_maps_, _customerState$user, _customerState$user2, _Object$values, _businessDetails$busi4, _businessDetails$busi5, _businessDetails$busi6, _businessDetails$busi7, _businessDetails$erro, _businessDetails$erro2, _businessDetails$
|
|
65
|
+
var _businessDetails$busi, _businessDetails$busi2, _configs$table_numer_, _businessConfigs$find, _businessConfigs$find2, _configs$cash_wallet, _configs$wallet_enabl, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _validationFields$fie4, _validationFields$fie5, _validationFields$fie6, _cart$comment, _cardList$cards, _cartState$cart, _validationFields$fie7, _validationFields$fie8, _validationFields$fie9, _validationFields$fie10, _validationFields$fie11, _validationFields$fie12, _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _instructionsOptions$, _instructionsOptions$2, _theme$checkout, _theme$checkout$compo, _theme$checkout$compo2, _theme$checkout$compo3, _theme$checkout$compo4, _theme$checkout2, _theme$checkout2$comp, _theme$checkout2$comp2, _theme$checkout3, _theme$checkout3$comp, _theme$checkout3$comp2, _theme$checkout4, _theme$checkout4$comp, _theme$checkout4$comp2, _validationFields$fie13, _validationFields$fie14, _validationFields$fie15, _loyaltyPlansState$re, _creditPointPlan$busi, _options$address, _businessDetails$busi3, _theme$images, _theme$images$dummies, _configs$google_maps_, _customerState$user, _customerState$user2, _Object$values, _businessDetails$busi4, _businessDetails$busi5, _businessDetails$busi6, _businessDetails$busi7, _businessDetails$busi8, _businessDetails$busi9, _businessDetails$erro, _businessDetails$erro2, _businessDetails$busi10, _businessDetails$busi11, _businessDetails$busi12, _configs$driver_tip_t, _configs$driver_tip_u, _configs$driver_tip_t2, _cartState$cart$spot_, _cartState$cart2, _cart$business3, _cart$products2, _ref, _creditPointPlanOnBus, _configs$driver_tip_t3, _configs$driver_tip_u2, _configs$driver_tip_t4, _validationFields$fie24, _validationFields$fie25, _validationFields$fie26, _validationFields$fie27, _validationFields$fie28, _validationFields$fie29, _customerState$user3;
|
|
66
66
|
var cart = props.cart,
|
|
67
67
|
errors = props.errors,
|
|
68
68
|
placing = props.placing,
|
|
@@ -248,7 +248,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
248
248
|
var _validationFields$fie16, _validationFields$fie17, _validationFields$fie18, _validationFields$fie19, _validationFields$fie20, _validationFields$fie21, _validationFields$fie22, _configs$verification;
|
|
249
249
|
setUserErrors([]);
|
|
250
250
|
var errors = [];
|
|
251
|
-
var notFields = ['coupon', 'driver_tip', 'mobile_phone', 'address', 'zipcode', 'address_notes'];
|
|
251
|
+
var notFields = ['coupon', 'driver_tip', 'mobile_phone', 'address', 'zipcode', 'address_notes', 'comments'];
|
|
252
252
|
var userSelected = isCustomerMode ? customerState.user : user;
|
|
253
253
|
var _requiredFields = [];
|
|
254
254
|
Object.values(validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie16 = validationFields.fields) === null || _validationFields$fie16 === void 0 ? void 0 : _validationFields$fie16.checkout).map(function (field) {
|
|
@@ -444,7 +444,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
444
444
|
style: {
|
|
445
445
|
marginBottom: '10px'
|
|
446
446
|
}
|
|
447
|
-
}))), !cartState.loading && (businessDetails === null || businessDetails === void 0 ? void 0 : businessDetails.business) && ((_Object$values = Object.values(businessDetails === null || businessDetails === void 0 ? void 0 : businessDetails.business)) === null || _Object$values === void 0 ? void 0 : _Object$values.length) > 0 && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h1", null, t('BUSINESS_DETAILS', 'Business Details')), /*#__PURE__*/_react.default.createElement("div", null, !hideBusinessAddress && /*#__PURE__*/_react.default.createElement("p", null, businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$busi4 = businessDetails.business) === null || _businessDetails$busi4 === void 0 ? void 0 : _businessDetails$busi4.address), /*#__PURE__*/_react.default.createElement("p", null, businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$busi5 = businessDetails.business) === null || _businessDetails$busi5 === void 0 ? void 0 : _businessDetails$busi5.name), /*#__PURE__*/_react.default.createElement("p", null, businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$busi6 = businessDetails.business) === null || _businessDetails$busi6 === void 0 ? void 0 : _businessDetails$busi6.email), /*#__PURE__*/_react.default.createElement("p", null, businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$busi7 = businessDetails.business) === null || _businessDetails$busi7 === void 0 ? void 0 : _businessDetails$busi7.cellphone))), (businessDetails === null || businessDetails === void 0 ? void 0 : businessDetails.error) && (businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$erro = businessDetails.error) === null || _businessDetails$erro === void 0 ? void 0 : _businessDetails$erro.length) > 0 && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h1", null, t('BUSINESS_DETAILS', 'Business Details')), /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
|
|
447
|
+
}))), !cartState.loading && (businessDetails === null || businessDetails === void 0 ? void 0 : businessDetails.business) && ((_Object$values = Object.values(businessDetails === null || businessDetails === void 0 ? void 0 : businessDetails.business)) === null || _Object$values === void 0 ? void 0 : _Object$values.length) > 0 && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h1", null, t('BUSINESS_DETAILS', 'Business Details')), /*#__PURE__*/_react.default.createElement("div", null, !hideBusinessAddress && /*#__PURE__*/_react.default.createElement("p", null, businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$busi4 = businessDetails.business) === null || _businessDetails$busi4 === void 0 ? void 0 : _businessDetails$busi4.address), /*#__PURE__*/_react.default.createElement("p", null, businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$busi5 = businessDetails.business) === null || _businessDetails$busi5 === void 0 ? void 0 : _businessDetails$busi5.name), /*#__PURE__*/_react.default.createElement("p", null, businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$busi6 = businessDetails.business) === null || _businessDetails$busi6 === void 0 ? void 0 : _businessDetails$busi6.email), /*#__PURE__*/_react.default.createElement("p", null, businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$busi7 = businessDetails.business) === null || _businessDetails$busi7 === void 0 ? void 0 : _businessDetails$busi7.cellphone), (businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$busi8 = businessDetails.business) === null || _businessDetails$busi8 === void 0 ? void 0 : _businessDetails$busi8.address_notes) && /*#__PURE__*/_react.default.createElement("p", null, businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$busi9 = businessDetails.business) === null || _businessDetails$busi9 === void 0 ? void 0 : _businessDetails$busi9.address_notes))), (businessDetails === null || businessDetails === void 0 ? void 0 : businessDetails.error) && (businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$erro = businessDetails.error) === null || _businessDetails$erro === void 0 ? void 0 : _businessDetails$erro.length) > 0 && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h1", null, t('BUSINESS_DETAILS', 'Business Details')), /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
|
|
448
448
|
content: (businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$erro2 = businessDetails.error[0]) === null || _businessDetails$erro2 === void 0 ? void 0 : _businessDetails$erro2.message) || (businessDetails === null || businessDetails === void 0 ? void 0 : businessDetails.error[0])
|
|
449
449
|
}))), /*#__PURE__*/_react.default.createElement(_styles.CheckOutDivider, null)) : /*#__PURE__*/_react.default.createElement(_styles.WrapperActionsInput, null, /*#__PURE__*/_react.default.createElement("h1", null, t('WHATS_YOUR_NAME', "What's your name?")), /*#__PURE__*/_react.default.createElement(_Inputs.Input, {
|
|
450
450
|
placeholder: t('WRITE_YOUR_NAME', 'Write your name'),
|
|
@@ -479,9 +479,9 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
479
479
|
cart: cart,
|
|
480
480
|
useKioskApp: useKioskApp,
|
|
481
481
|
isDisabled: (cart === null || cart === void 0 ? void 0 : cart.status) === 2,
|
|
482
|
-
businessId: !isGiftCardCart ? businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$
|
|
482
|
+
businessId: !isGiftCardCart ? businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$busi10 = businessDetails.business) === null || _businessDetails$busi10 === void 0 ? void 0 : _businessDetails$busi10.id : -1,
|
|
483
483
|
isLoading: !isGiftCardCart ? businessDetails.loading : false,
|
|
484
|
-
paymethods: businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$
|
|
484
|
+
paymethods: businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$busi11 = businessDetails.business) === null || _businessDetails$busi11 === void 0 ? void 0 : _businessDetails$busi11.paymethods,
|
|
485
485
|
onPaymentChange: handlePaymethodChange,
|
|
486
486
|
errorCash: errorCash,
|
|
487
487
|
setErrorCash: setErrorCash,
|
|
@@ -494,7 +494,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
494
494
|
})), isWalletEnabled && !(businessDetails !== null && businessDetails !== void 0 && businessDetails.loading) && /*#__PURE__*/_react.default.createElement(_styles.WalletPaymentOptionContainer, null, /*#__PURE__*/_react.default.createElement(_PaymentOptionWallet.PaymentOptionWallet, {
|
|
495
495
|
cart: cart,
|
|
496
496
|
loyaltyPlansState: loyaltyPlansState,
|
|
497
|
-
businessConfigs: businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$
|
|
497
|
+
businessConfigs: businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$busi12 = businessDetails.business) === null || _businessDetails$busi12 === void 0 ? void 0 : _businessDetails$busi12.configs
|
|
498
498
|
})))), /*#__PURE__*/_react.default.createElement(_styles.WrapperRightContainer, null, !!(!isMultiDriverTips && driverTipsField) && /*#__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, {
|
|
499
499
|
businessId: cart === null || cart === void 0 ? void 0 : cart.business_id,
|
|
500
500
|
driverTipsOptions: driverTipsOptions,
|
|
@@ -9,6 +9,7 @@ var _styles = require("./styles");
|
|
|
9
9
|
var _styles2 = require("../OrdersOption/styles");
|
|
10
10
|
var _SingleOrderCard = require("../SingleOrderCard");
|
|
11
11
|
var _Pagination = require("../Pagination");
|
|
12
|
+
var _AutoScroll = require("../AutoScroll");
|
|
12
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
14
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
15
|
var HorizontalOrdersLayout = function HorizontalOrdersLayout(props) {
|
|
@@ -36,13 +37,15 @@ var HorizontalOrdersLayout = function HorizontalOrdersLayout(props) {
|
|
|
36
37
|
activeOrders: true,
|
|
37
38
|
ordersLength: (orders === null || orders === void 0 ? void 0 : orders.length) <= 1,
|
|
38
39
|
isBusinessesPage: isBusinessesPage
|
|
39
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.CardWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.CardWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.CardsContainerWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.CardsContainer, null, /*#__PURE__*/_react.default.createElement(_AutoScroll.AutoScroll, {
|
|
41
|
+
scrollId: "orderScroll"
|
|
42
|
+
}, orders.length > 0 && ordersToShow.map(function (order, i) {
|
|
40
43
|
var _order$id;
|
|
41
44
|
return /*#__PURE__*/_react.default.createElement(_SingleOrderCard.SingleOrderCard, _extends({}, props, {
|
|
42
45
|
key: order.id || ((_order$id = order.id) === null || _order$id === void 0 ? void 0 : _order$id[0]) || i,
|
|
43
46
|
order: order
|
|
44
47
|
}));
|
|
45
|
-
})), orders.length > 0 && ordersToShow.length > 0 && /*#__PURE__*/_react.default.createElement(_Pagination.Pagination, {
|
|
48
|
+
})))), orders.length > 0 && ordersToShow.length > 0 && /*#__PURE__*/_react.default.createElement(_Pagination.Pagination, {
|
|
46
49
|
currentPage: pagination.currentPage,
|
|
47
50
|
totalPages: Math.ceil(pagination === null || pagination === void 0 ? void 0 : pagination.totalPages),
|
|
48
51
|
handleChangePage: handleChangePage
|
|
@@ -4,10 +4,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.TitleContainer = exports.Price = exports.Map = exports.Logo = exports.FavoriteWrapper = exports.Content = exports.CardsContainer = exports.CardWrapper = exports.Card = exports.ButtonWrapper = exports.BusinessLogoWrapper = void 0;
|
|
7
|
+
exports.TitleContainer = exports.Price = exports.Map = exports.Logo = exports.FavoriteWrapper = exports.Content = exports.CardsContainerWrapper = exports.CardsContainer = exports.CardWrapper = exports.Card = exports.ButtonWrapper = exports.BusinessLogoWrapper = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24;
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26;
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
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); }
|
|
13
13
|
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; }
|
|
@@ -20,50 +20,55 @@ var Content = _styledComponents.default.div(_templateObject || (_templateObject
|
|
|
20
20
|
exports.Content = Content;
|
|
21
21
|
var CardWrapper = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 100%;\n"])));
|
|
22
22
|
exports.CardWrapper = CardWrapper;
|
|
23
|
-
var CardsContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n
|
|
23
|
+
var CardsContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n"])));
|
|
24
24
|
exports.CardsContainer = CardsContainer;
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
return
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
var CardsContainerWrapper = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-bottom: 10px;\n display: flex;\n overflow: auto hidden;\n ::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n ", "\n"])), function (_ref2) {
|
|
26
|
+
var isLoading = _ref2.isLoading;
|
|
27
|
+
return isLoading && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ::-webkit-scrollbar {\n width: 0px;\n height: 0px;\n }\n "])));
|
|
28
|
+
});
|
|
29
|
+
exports.CardsContainerWrapper = CardsContainerWrapper;
|
|
30
|
+
var Price = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n width: 35%;\n\n ", "\n\n h2 {\n font-size: 16px;\n margin-block-end: ", ";\n margin-block-start: 0.1em;\n font-weight: normal;\n }\n p {\n margin-block-end: 0.1em;\n margin-block-start: ", ";\n color: #ff9300;\n font-size: 0.8em;\n overflow:hidden;\n text-overflow: ellipsis;\n margin-left: 5px;\n }\n\n p[name='view-cart']{\n color: ", ";\n cursor: pointer;\n }\n\n @media (min-width: 480px) {\n ", "\n }\n"])), function (_ref3) {
|
|
31
|
+
var isCustomerMode = _ref3.isCustomerMode;
|
|
32
|
+
return isCustomerMode ? (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n text-align: end;\n white-space: nowrap;\n text-overflow: ellipsis;\n "]))) : (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n flex-direction: column;\n align-items: flex-end;\n "])));
|
|
31
33
|
}, function (_ref4) {
|
|
32
34
|
var isBusinessesPage = _ref4.isBusinessesPage;
|
|
33
35
|
return isBusinessesPage ? '0.1em' : '1em';
|
|
36
|
+
}, function (_ref5) {
|
|
37
|
+
var isBusinessesPage = _ref5.isBusinessesPage;
|
|
38
|
+
return isBusinessesPage ? '0.1em' : '1em';
|
|
34
39
|
}, function (props) {
|
|
35
40
|
return props.theme.colors.primary;
|
|
36
|
-
}, function (
|
|
37
|
-
var isCustomerMode =
|
|
38
|
-
return !isCustomerMode && (0, _styledComponents.css)(
|
|
41
|
+
}, function (_ref6) {
|
|
42
|
+
var isCustomerMode = _ref6.isCustomerMode;
|
|
43
|
+
return !isCustomerMode && (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n flex-direction: row;\n align-items: center;\n "])));
|
|
39
44
|
});
|
|
40
45
|
exports.Price = Price;
|
|
41
|
-
var Card = _styledComponents.default.div(
|
|
42
|
-
var isCustomerMode =
|
|
43
|
-
return isCustomerMode ? (0, _styledComponents.css)(
|
|
44
|
-
var isBusinessesPage = _ref7.isBusinessesPage;
|
|
45
|
-
return isBusinessesPage && '300px';
|
|
46
|
-
}, function (_ref8) {
|
|
46
|
+
var Card = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n cursor: pointer;\n margin: 10px;\n position: relative;\n background: white;\n border-radius: 16px;\n display: inline-block;\n text-align: left;\n transition: all 0.3s ease;\n\n ", "\n\n &:hover {\n box-shadow: rgb(0 0 0 / 20%) 0px 8px 24px;\n }\n\n button.load-orders {\n padding: 10px 30px;\n }\n\n ", "\n\n ", "\n\n ", "\n\n @media (min-width: 480px) {\n min-width: 430px;\n max-height: ", ";\n width: 430px;\n }\n\n @media(min-width: 993px){\n ", "\n }\n"])), function (_ref7) {
|
|
47
|
+
var isCustomerMode = _ref7.isCustomerMode;
|
|
48
|
+
return isCustomerMode ? (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n min-width: 300px;\n width: 300px;\n display: inline-block;\n "]))) : (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n min-width: 380px;\n width: 380px;\n height: ", ";\n max-height: ", ";\n "])), function (_ref8) {
|
|
47
49
|
var isBusinessesPage = _ref8.isBusinessesPage;
|
|
50
|
+
return isBusinessesPage && '300px';
|
|
51
|
+
}, function (_ref9) {
|
|
52
|
+
var isBusinessesPage = _ref9.isBusinessesPage;
|
|
48
53
|
return isBusinessesPage ? '300px' : '220px';
|
|
49
54
|
});
|
|
50
55
|
}, function (props) {
|
|
51
56
|
var _props$theme;
|
|
52
|
-
return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(
|
|
57
|
+
return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n text-align: right;\n "])));
|
|
53
58
|
}, function (props) {
|
|
54
|
-
return (props.nobg || props.isBusinessesPage) && (0, _styledComponents.css)(
|
|
59
|
+
return (props.nobg || props.isBusinessesPage) && (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n background: transparent;\n "])));
|
|
55
60
|
}, function (props) {
|
|
56
|
-
return props.flex && (0, _styledComponents.css)(
|
|
57
|
-
}, function (_ref9) {
|
|
58
|
-
var isBusinessesPage = _ref9.isBusinessesPage;
|
|
59
|
-
return isBusinessesPage ? '300px' : '250px';
|
|
61
|
+
return props.flex && (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n "])));
|
|
60
62
|
}, function (_ref10) {
|
|
61
63
|
var isBusinessesPage = _ref10.isBusinessesPage;
|
|
62
|
-
return isBusinessesPage
|
|
64
|
+
return isBusinessesPage ? '300px' : '250px';
|
|
65
|
+
}, function (_ref11) {
|
|
66
|
+
var isBusinessesPage = _ref11.isBusinessesPage;
|
|
67
|
+
return isBusinessesPage && (0, _styledComponents.css)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n margin: 30px 20px;\n width: calc(33% - 40px);\n "])));
|
|
63
68
|
});
|
|
64
69
|
exports.Card = Card;
|
|
65
|
-
var BusinessLogoWrapperStyled = _styledComponents.default.div(
|
|
66
|
-
return props.theme.rtl && (0, _styledComponents.css)(
|
|
70
|
+
var BusinessLogoWrapperStyled = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n display: flex;\n width: 55px;\n min-width: 55px;\n height: 55px;\n min-height: 55px;\n box-sizing: border-box;\n position: relative;\n background-repeat: no-repeat, repeat;\n background-size: cover;\n object-fit: cover;\n background-position: center;\n justify-content: center;\n align-items: center;\n border-radius: 7.6px;\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);\n\n margin-left: 8px;\n\n ", "\n\n @media (min-width: 576px) {\n width: 86px;\n min-width: 86px;\n height: 86px;\n min-height: 86px;\n }\n"])), function (props) {
|
|
71
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n margin-left: 0px;\n margin-right: 8px;\n "])));
|
|
67
72
|
});
|
|
68
73
|
var BusinessLogoWrapper = function BusinessLogoWrapper(props) {
|
|
69
74
|
var style = {};
|
|
@@ -77,7 +82,7 @@ var BusinessLogoWrapper = function BusinessLogoWrapper(props) {
|
|
|
77
82
|
}), props.children);
|
|
78
83
|
};
|
|
79
84
|
exports.BusinessLogoWrapper = BusinessLogoWrapper;
|
|
80
|
-
var ButtonWrapper = _styledComponents.default.div(
|
|
85
|
+
var ButtonWrapper = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n position: absolute;\n right: 0px;\n top: 4px;\n display: flex;\n align-items: center;\n\n button {\n border-radius: 50px;\n font-size: 10px;\n line-height: 15px;\n padding: 4px 8px;\n border: 1px solid ", ";\n margin: 5px;\n\n &.reorder {\n background: ", ";\n &:hover {\n background: ", ";\n }\n }\n }\n"])), function (props) {
|
|
81
86
|
return props.theme.colors.primaryContrast;
|
|
82
87
|
}, function (props) {
|
|
83
88
|
return props.theme.colors.primaryContrast;
|
|
@@ -85,29 +90,29 @@ var ButtonWrapper = _styledComponents.default.div(_templateObject19 || (_templat
|
|
|
85
90
|
return props.theme.colors.primary;
|
|
86
91
|
});
|
|
87
92
|
exports.ButtonWrapper = ButtonWrapper;
|
|
88
|
-
var Logo = _styledComponents.default.div(
|
|
93
|
+
var Logo = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n width: 55px;\n height: 55px;\n filter: drop-shadow(0px 1px 4px rgba(0, 0, 0, 0.1));\n border-radius: 7.6px;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 7.6px;\n }\n\n @media (min-width: 480px){\n width: 86px;\n height: 86px;\n }\n"])));
|
|
89
94
|
exports.Logo = Logo;
|
|
90
|
-
var TitleContainer = _styledComponents.default.div(
|
|
95
|
+
var TitleContainer = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n"])));
|
|
91
96
|
exports.TitleContainer = TitleContainer;
|
|
92
|
-
var Map = _styledComponents.default.div(
|
|
93
|
-
var isBusinessesPage = _ref11.isBusinessesPage;
|
|
94
|
-
return isBusinessesPage ? '200px' : '88px';
|
|
95
|
-
}, function (_ref12) {
|
|
97
|
+
var Map = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n width: 100%;\n height: ", ";\n min-height: ", ";\n img{\n width: 100%;\n height: 100%;\n border-top-left-radius: 16px;\n border-top-right-radius: 16px;\n border-radius: ", ";\n image-rendering: -webkit-optimize-contrast;\n object-fit: cover;\n }\n @media(min-width: 480px){\n height: ", ";\n min-height: ", "\n }\n"])), function (_ref12) {
|
|
96
98
|
var isBusinessesPage = _ref12.isBusinessesPage;
|
|
97
|
-
return isBusinessesPage
|
|
99
|
+
return isBusinessesPage ? '200px' : '88px';
|
|
98
100
|
}, function (_ref13) {
|
|
99
101
|
var isBusinessesPage = _ref13.isBusinessesPage;
|
|
100
|
-
return isBusinessesPage && '
|
|
102
|
+
return isBusinessesPage && '175px';
|
|
101
103
|
}, function (_ref14) {
|
|
102
104
|
var isBusinessesPage = _ref14.isBusinessesPage;
|
|
103
|
-
return isBusinessesPage
|
|
105
|
+
return isBusinessesPage && '16px';
|
|
104
106
|
}, function (_ref15) {
|
|
105
107
|
var isBusinessesPage = _ref15.isBusinessesPage;
|
|
108
|
+
return isBusinessesPage ? '200px' : '100px';
|
|
109
|
+
}, function (_ref16) {
|
|
110
|
+
var isBusinessesPage = _ref16.isBusinessesPage;
|
|
106
111
|
return isBusinessesPage && '200px';
|
|
107
112
|
});
|
|
108
113
|
exports.Map = Map;
|
|
109
|
-
var FavoriteWrapper = _styledComponents.default.div(
|
|
110
|
-
return props.theme.rtl && (0, _styledComponents.css)(
|
|
114
|
+
var FavoriteWrapper = _styledComponents.default.div(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n position: absolute;\n display: flex;\n z-index: 10;\n align-items: center;\n justify-content: center;\n top: 41px;\n right: 10px;\n ", "\n svg {\n color: ", ";\n font-size: 16px;\n }\n"])), function (props) {
|
|
115
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n left: 10px;\n right: initial;\n "])));
|
|
111
116
|
}, function (props) {
|
|
112
117
|
return props.theme.colors.danger500;
|
|
113
118
|
});
|
|
@@ -16,9 +16,14 @@ var _AddressList = require("../AddressList");
|
|
|
16
16
|
var _Confirm = require("../Confirm");
|
|
17
17
|
var _styles = require("./styles");
|
|
18
18
|
var _useWindowSize = require("../../../../../hooks/useWindowSize");
|
|
19
|
+
var _MomentContent = require("../MomentContent");
|
|
20
|
+
var _OrderTypeSelectorContent = require("../OrderTypeSelectorContent");
|
|
21
|
+
var _utils = require("../../../../../utils");
|
|
22
|
+
var _reactRouterDom = require("react-router-dom");
|
|
19
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
24
|
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); }
|
|
21
25
|
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; }
|
|
26
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
22
27
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
28
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
24
29
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -31,11 +36,13 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
31
36
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
32
37
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
33
38
|
var OrderContextUI = function OrderContextUI(props) {
|
|
34
|
-
var _configState$configs, _configState$configs$, _configState$configs2, _configState$configs3, _orderState$options2, _orderState$
|
|
39
|
+
var _configState$configs, _configState$configs$, _configState$configs2, _configState$configs3, _orderState$options, _orderState$options2, _Object$keys, _orderState$options4, _orderState$options4$, _orderState$options5, _orderState$options6;
|
|
35
40
|
var isCheckOut = props.isCheckOut,
|
|
36
41
|
setMapErrors = props.setMapErrors,
|
|
37
42
|
isCustomerMode = props.isCustomerMode,
|
|
38
43
|
isBusinessList = props.isBusinessList;
|
|
44
|
+
var _useLocation = (0, _reactRouterDom.useLocation)(),
|
|
45
|
+
pathname = _useLocation.pathname;
|
|
39
46
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
40
47
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
41
48
|
t = _useLanguage2[1];
|
|
@@ -48,6 +55,9 @@ var OrderContextUI = function OrderContextUI(props) {
|
|
|
48
55
|
var _useSession = (0, _orderingComponentsExternal.useSession)(),
|
|
49
56
|
_useSession2 = _slicedToArray(_useSession, 1),
|
|
50
57
|
auth = _useSession2[0].auth;
|
|
58
|
+
var _useBusiness = (0, _orderingComponentsExternal.useBusiness)(),
|
|
59
|
+
_useBusiness2 = _slicedToArray(_useBusiness, 1),
|
|
60
|
+
business = _useBusiness2[0].business;
|
|
51
61
|
var _useState = (0, _react.useState)({}),
|
|
52
62
|
_useState2 = _slicedToArray(_useState, 2),
|
|
53
63
|
openPopover = _useState2[0],
|
|
@@ -67,12 +77,22 @@ var OrderContextUI = function OrderContextUI(props) {
|
|
|
67
77
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
68
78
|
alertState = _useState6[0],
|
|
69
79
|
setAlertState = _useState6[1];
|
|
80
|
+
var _useState7 = (0, _react.useState)(null),
|
|
81
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
82
|
+
modalSelected = _useState8[0],
|
|
83
|
+
setModalSelected = _useState8[1];
|
|
84
|
+
var _useState9 = (0, _react.useState)(false),
|
|
85
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
86
|
+
modalIsOpen = _useState10[0],
|
|
87
|
+
setModalIsOpen = _useState10[1];
|
|
70
88
|
var windowSize = (0, _useWindowSize.useWindowSize)();
|
|
71
89
|
var userCustomer = JSON.parse(window.localStorage.getItem('user-customer'));
|
|
72
90
|
var configTypes = (configState === null || configState === void 0 ? void 0 : (_configState$configs = configState.configs) === null || _configState$configs === void 0 ? void 0 : (_configState$configs$ = _configState$configs.order_types_allowed) === null || _configState$configs$ === void 0 ? void 0 : _configState$configs$.value.split('|').map(function (value) {
|
|
73
91
|
return Number(value);
|
|
74
92
|
})) || [];
|
|
75
93
|
var isPreOrderSetting = (configState === null || configState === void 0 ? void 0 : (_configState$configs2 = configState.configs) === null || _configState$configs2 === void 0 ? void 0 : (_configState$configs3 = _configState$configs2.preorder_status_enabled) === null || _configState$configs3 === void 0 ? void 0 : _configState$configs3.value) === '1';
|
|
94
|
+
var cateringTypeString = (orderState === null || orderState === void 0 ? void 0 : (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.type) === 7 ? 'catering_delivery' : (orderState === null || orderState === void 0 ? void 0 : (_orderState$options2 = orderState.options) === null || _orderState$options2 === void 0 ? void 0 : _orderState$options2.type) === 8 ? 'catering_pickup' : null;
|
|
95
|
+
var cateringValues = (0, _utils.getCateringValues)(cateringTypeString, pathname.includes('store') && (Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(business || {})) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) > 0 ? business === null || business === void 0 ? void 0 : business.configs : configState === null || configState === void 0 ? void 0 : configState.configs);
|
|
76
96
|
var handleTogglePopover = function handleTogglePopover(type) {
|
|
77
97
|
setOpenPopover(_objectSpread(_objectSpread({}, openPopover), {}, _defineProperty({}, type, !openPopover[type])));
|
|
78
98
|
};
|
|
@@ -80,8 +100,8 @@ var OrderContextUI = function OrderContextUI(props) {
|
|
|
80
100
|
setOpenPopover(_objectSpread(_objectSpread({}, openPopover), {}, _defineProperty({}, type, false)));
|
|
81
101
|
};
|
|
82
102
|
var handleFindBusinesses = function handleFindBusinesses() {
|
|
83
|
-
var _orderState$
|
|
84
|
-
if (!(orderState !== null && orderState !== void 0 && (_orderState$
|
|
103
|
+
var _orderState$options3, _orderState$options3$;
|
|
104
|
+
if (!(orderState !== null && orderState !== void 0 && (_orderState$options3 = orderState.options) !== null && _orderState$options3 !== void 0 && (_orderState$options3$ = _orderState$options3.address) !== null && _orderState$options3$ !== void 0 && _orderState$options3$.location)) {
|
|
85
105
|
setAlertState({
|
|
86
106
|
open: true,
|
|
87
107
|
content: [t('SELECT_AN_ADDRESS_TO_SEARCH', 'Select or add an address to search')]
|
|
@@ -111,6 +131,10 @@ var OrderContextUI = function OrderContextUI(props) {
|
|
|
111
131
|
}));
|
|
112
132
|
}
|
|
113
133
|
};
|
|
134
|
+
var openModal = function openModal(opt) {
|
|
135
|
+
setModalSelected(opt);
|
|
136
|
+
setModalIsOpen(true);
|
|
137
|
+
};
|
|
114
138
|
(0, _react.useEffect)(function () {
|
|
115
139
|
var handleCloseallPopovers = function handleCloseallPopovers() {
|
|
116
140
|
return handleClosePopover('moment');
|
|
@@ -129,11 +153,22 @@ var OrderContextUI = function OrderContextUI(props) {
|
|
|
129
153
|
return handleClickAddress();
|
|
130
154
|
},
|
|
131
155
|
isCheckOut: isCheckOut || !props.hideHero
|
|
132
|
-
}, /*#__PURE__*/_react.default.createElement(_FaMapMarkerAlt.default, null), /*#__PURE__*/_react.default.createElement("span", null, ((_orderState$
|
|
156
|
+
}, /*#__PURE__*/_react.default.createElement(_FaMapMarkerAlt.default, null), /*#__PURE__*/_react.default.createElement("span", null, ((_orderState$options4 = orderState.options) === null || _orderState$options4 === void 0 ? void 0 : (_orderState$options4$ = _orderState$options4.address) === null || _orderState$options4$ === void 0 ? void 0 : _orderState$options4$.address) || t('WHERE_DO_WE_DELIVERY', 'Where do we delivery?'))), /*#__PURE__*/_react.default.createElement(_styles.FeatureItems, null, /*#__PURE__*/_react.default.createElement(_styles.ItemInline, {
|
|
157
|
+
onClick: function onClick() {
|
|
158
|
+
return openModal('delivery');
|
|
159
|
+
}
|
|
160
|
+
}, /*#__PURE__*/_react.default.createElement(_OrderTypeSelectorHeader.OrderTypeSelectorHeader, {
|
|
133
161
|
configTypes: configTypes,
|
|
134
162
|
autoCloseWhenScroll: windowSize.width < 576
|
|
135
|
-
})), isPreOrderSetting && /*#__PURE__*/_react.default.createElement(_styles.ItemInline,
|
|
163
|
+
})), isPreOrderSetting && /*#__PURE__*/_react.default.createElement(_styles.ItemInline, {
|
|
164
|
+
onClick: function onClick() {
|
|
165
|
+
return openModal('moment');
|
|
166
|
+
}
|
|
167
|
+
}, /*#__PURE__*/_react.default.createElement(_MomentPopover.MomentPopover, {
|
|
136
168
|
open: openPopover.moment,
|
|
169
|
+
onCustomClick: function onCustomClick() {
|
|
170
|
+
return openModal('moment');
|
|
171
|
+
},
|
|
137
172
|
onClick: function onClick() {
|
|
138
173
|
return handleTogglePopover('moment');
|
|
139
174
|
},
|
|
@@ -141,7 +176,26 @@ var OrderContextUI = function OrderContextUI(props) {
|
|
|
141
176
|
return handleClosePopover('moment');
|
|
142
177
|
},
|
|
143
178
|
isBanner: true
|
|
144
|
-
})))), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
179
|
+
})))), modalIsOpen && /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
180
|
+
open: modalIsOpen,
|
|
181
|
+
onClose: function onClose() {
|
|
182
|
+
return setModalIsOpen(false);
|
|
183
|
+
},
|
|
184
|
+
width: orderState !== null && orderState !== void 0 && (_orderState$options5 = orderState.options) !== null && _orderState$options5 !== void 0 && _orderState$options5.user_id ? '70%' : '50%'
|
|
185
|
+
}, modalSelected === 'moment' && /*#__PURE__*/_react.default.createElement(_MomentContent.MomentContent, _extends({
|
|
186
|
+
onClose: function onClose() {
|
|
187
|
+
return setModalIsOpen(false);
|
|
188
|
+
},
|
|
189
|
+
cateringPreorder: !!cateringTypeString,
|
|
190
|
+
isHeader: true,
|
|
191
|
+
business: pathname.includes('store') && business
|
|
192
|
+
}, cateringValues)), modalSelected === 'delivery' && /*#__PURE__*/_react.default.createElement(_OrderTypeSelectorContent.OrderTypeSelectorContent, {
|
|
193
|
+
onClose: function onClose() {
|
|
194
|
+
return setModalIsOpen(false);
|
|
195
|
+
},
|
|
196
|
+
configTypes: !(configState !== null && configState !== void 0 && configState.loading) && (configTypes === null || configTypes === void 0 ? void 0 : configTypes.length) > 0 ? configTypes : null,
|
|
197
|
+
defaultValue: !(!(configState !== null && configState !== void 0 && configState.loading) && (configTypes === null || configTypes === void 0 ? void 0 : configTypes.length) > 0) && 1
|
|
198
|
+
})), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
145
199
|
title: t('ADDRESS_FORM', 'Address Form'),
|
|
146
200
|
open: modals.formOpen,
|
|
147
201
|
onClose: function onClose() {
|
|
@@ -151,7 +205,7 @@ var OrderContextUI = function OrderContextUI(props) {
|
|
|
151
205
|
}
|
|
152
206
|
}, /*#__PURE__*/_react.default.createElement(_AddressForm.AddressForm, {
|
|
153
207
|
useValidationFileds: true,
|
|
154
|
-
address: (orderState === null || orderState === void 0 ? void 0 : (_orderState$
|
|
208
|
+
address: (orderState === null || orderState === void 0 ? void 0 : (_orderState$options6 = orderState.options) === null || _orderState$options6 === void 0 ? void 0 : _orderState$options6.address) || {},
|
|
155
209
|
onClose: function onClose() {
|
|
156
210
|
return setModals(_objectSpread(_objectSpread({}, modals), {}, {
|
|
157
211
|
formOpen: false
|
|
@@ -35,7 +35,7 @@ var AddressMenu = _styledComponents.default.div(_templateObject4 || (_templateOb
|
|
|
35
35
|
exports.AddressMenu = AddressMenu;
|
|
36
36
|
var FeatureItems = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n justify-content: space-between;\n"])));
|
|
37
37
|
exports.FeatureItems = FeatureItems;
|
|
38
|
-
var ItemInline = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n > span #select-input {\n background-color: ", " !important;\n border: none;\n border-radius: 7.6px;\n svg {\n font-size: 14px;\n }\n #list {\n background-color: ", ";\n border: none;\n border-radius: 7.6px;\n\n left: 0px;\n right: initial;\n\n ", "\n }\n\n > div:first-child {\n font-size: 11px;\n }\n }\n\n .moment-popover {\n > div:first-child {\n font-size: 11px;\n padding: 4px 7px;\n svg {\n font-size: 14px;\n }\n }\n }\n"])), function (props) {
|
|
38
|
+
var ItemInline = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n > * {\n pointer-events: none;\n }\n > span #select-input {\n background-color: ", " !important;\n border: none;\n border-radius: 7.6px;\n svg {\n font-size: 14px;\n }\n #list {\n background-color: ", ";\n border: none;\n border-radius: 7.6px;\n\n left: 0px;\n right: initial;\n\n ", "\n }\n\n > div:first-child {\n font-size: 11px;\n }\n }\n\n .moment-popover {\n > div:first-child {\n font-size: 11px;\n padding: 4px 7px;\n svg {\n font-size: 14px;\n }\n }\n }\n"])), function (props) {
|
|
39
39
|
return props.theme.colors.grayDividerColor;
|
|
40
40
|
}, function (props) {
|
|
41
41
|
return props.theme.colors.backgroundPage;
|
|
@@ -140,15 +140,15 @@ var PageBannerUI = function PageBannerUI(props) {
|
|
|
140
140
|
})) : ((_pageBannerState$bann = pageBannerState.banner) === null || _pageBannerState$bann === void 0 ? void 0 : (_pageBannerState$bann2 = _pageBannerState$bann.items) === null || _pageBannerState$bann2 === void 0 ? void 0 : _pageBannerState$bann2.length) > 0 && /*#__PURE__*/_react.default.createElement(_styles.BannerContainer, null, /*#__PURE__*/_react.default.createElement(_react2.Swiper, {
|
|
141
141
|
navigation: true,
|
|
142
142
|
spaceBetween: 0,
|
|
143
|
+
shortSwipes: false,
|
|
143
144
|
loop: ((_pageBannerState$bann3 = pageBannerState.banner) === null || _pageBannerState$bann3 === void 0 ? void 0 : _pageBannerState$bann3.items.length) > 1
|
|
144
145
|
}, (_pageBannerState$bann4 = pageBannerState.banner) === null || _pageBannerState$bann4 === void 0 ? void 0 : _pageBannerState$bann4.items.map(function (img, i) {
|
|
145
146
|
return /*#__PURE__*/_react.default.createElement(_react2.SwiperSlide, {
|
|
146
|
-
key: i
|
|
147
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.ImageWrapper, {
|
|
147
|
+
key: i,
|
|
148
148
|
onClick: function onClick() {
|
|
149
149
|
return handleGoToPage(img === null || img === void 0 ? void 0 : img.action);
|
|
150
150
|
}
|
|
151
|
-
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
151
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.ImageWrapper, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
152
152
|
src: img.url,
|
|
153
153
|
className: "banner-img",
|
|
154
154
|
alt: ""
|
|
@@ -32,7 +32,7 @@ var ContentWrapper = _styledComponents.default.div(_templateObject3 || (_templat
|
|
|
32
32
|
return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding: 0px 40px 0px;\n "])));
|
|
33
33
|
});
|
|
34
34
|
exports.ContentWrapper = ContentWrapper;
|
|
35
|
-
var WrappBtn = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 50%;\n\n button {\n min-width: 130px;\n }\n"])));
|
|
35
|
+
var WrappBtn = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 50%;\n\n button {\n min-width: 130px;\n max-width: 400px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n"])));
|
|
36
36
|
exports.WrappBtn = WrappBtn;
|
|
37
37
|
var Title = _styledComponents.default.h1(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin: 0px;\n text-align: left;\n font: normal normal normal 80px ", ";\n letter-spacing: 0px;\n color: #ffffff;\n text-shadow: 0px 3px 6px #00000029;\n opacity: 1;\n font-size: 35px;\n\n ", "\n"])), function (props) {
|
|
38
38
|
var _props$theme$fonts$sp;
|