ordering-ui-external 1.7.2 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{0.ordering-ui.f9c3deec77a8e21645ed.js → 0.ordering-ui.cf9ba81c5417ae8af84a.js} +1 -1
- package/_bundles/{1.ordering-ui.f9c3deec77a8e21645ed.js → 1.ordering-ui.cf9ba81c5417ae8af84a.js} +1 -1
- package/_bundles/2.ordering-ui.cf9ba81c5417ae8af84a.js +1 -0
- package/_bundles/{4.ordering-ui.f9c3deec77a8e21645ed.js → 4.ordering-ui.cf9ba81c5417ae8af84a.js} +1 -1
- package/_bundles/{5.ordering-ui.f9c3deec77a8e21645ed.js → 5.ordering-ui.cf9ba81c5417ae8af84a.js} +1 -1
- package/_bundles/{6.ordering-ui.f9c3deec77a8e21645ed.js → 6.ordering-ui.cf9ba81c5417ae8af84a.js} +1 -1
- package/_bundles/{7.ordering-ui.f9c3deec77a8e21645ed.js → 7.ordering-ui.cf9ba81c5417ae8af84a.js} +2 -2
- package/_bundles/{7.ordering-ui.f9c3deec77a8e21645ed.js.LICENSE.txt → 7.ordering-ui.cf9ba81c5417ae8af84a.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.f9c3deec77a8e21645ed.js → 8.ordering-ui.cf9ba81c5417ae8af84a.js} +1 -1
- package/_bundles/{9.ordering-ui.f9c3deec77a8e21645ed.js → 9.ordering-ui.cf9ba81c5417ae8af84a.js} +1 -1
- package/_bundles/ordering-ui.cf9ba81c5417ae8af84a.js +2 -0
- package/_bundles/{ordering-ui.f9c3deec77a8e21645ed.js.LICENSE.txt → ordering-ui.cf9ba81c5417ae8af84a.js.LICENSE.txt} +0 -0
- package/_modules/components/BusinessInformation/index.js +4 -8
- package/_modules/components/OrdersOption/styles.js +4 -2
- package/_modules/components/Pagination/index.js +100 -0
- package/_modules/components/Pagination/styles.js +56 -0
- package/_modules/components/SmartAppBanner/index.js +2 -1
- package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +92 -0
- package/_modules/components/VerticalOrdersLayout/index.js +115 -41
- package/_modules/components/VerticalOrdersLayout/styles.js +25 -11
- package/_modules/index.js +7 -0
- package/_modules/themes/five/src/components/AccordionDropdown/index.js +15 -4
- package/_modules/themes/five/src/components/AccordionDropdown/styles.js +14 -4
- package/_modules/themes/five/src/components/AddressList/styles.js +2 -2
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +17 -10
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +48 -42
- package/_modules/themes/five/src/components/BusinessListingSearch/index.js +5 -1
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +0 -3
- package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/index.js +22 -13
- package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +15 -7
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +3 -0
- package/_modules/themes/five/src/components/BusinessTypeFilter/index.js +15 -5
- package/_modules/themes/five/src/components/BusinessesListing/index.js +6 -13
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +66 -40
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +13 -7
- package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +16 -7
- package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +21 -15
- package/_modules/themes/five/src/components/CardForm/index.js +17 -3
- package/_modules/themes/five/src/components/CardForm/styles.js +14 -6
- package/_modules/themes/five/src/components/CartPopover/index.js +6 -4
- package/_modules/themes/five/src/components/CartPopover/styles.js +4 -2
- package/_modules/themes/five/src/components/Footer/index.js +16 -6
- package/_modules/themes/five/src/components/Footer/styles.js +11 -9
- package/_modules/themes/five/src/components/Header/index.js +14 -9
- package/_modules/themes/five/src/components/Header/styles.js +64 -44
- package/_modules/themes/five/src/components/HeaderOption/index.js +9 -2
- package/_modules/themes/five/src/components/HeaderOption/styles.js +8 -2
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +9 -3
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +5 -3
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/index.js +9 -19
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +23 -19
- package/_modules/themes/five/src/components/InputPhoneNumber/index.js +1 -0
- package/_modules/themes/five/src/components/LoginForm/index.js +3 -2
- package/_modules/themes/five/src/components/MyOrders/index.js +24 -56
- package/_modules/themes/five/src/components/MyOrders/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderDetails/index.js +5 -2
- package/_modules/themes/five/src/components/OrderDetails/styles.js +24 -24
- package/_modules/themes/five/src/components/OrderItAgain/styles.js +6 -2
- package/_modules/themes/five/src/components/OrdersOption/index.js +18 -18
- package/_modules/themes/five/src/components/OrdersOption/styles.js +2 -2
- package/_modules/themes/five/src/components/PageBanner/index.js +50 -0
- package/_modules/themes/five/src/components/PageBanner/styles.js +18 -0
- package/_modules/themes/five/src/components/Pagination/index.js +99 -0
- package/_modules/themes/five/src/components/Pagination/styles.js +56 -0
- package/_modules/themes/five/src/components/ProductForm/index.js +39 -23
- package/_modules/themes/five/src/components/ProductForm/styles.js +74 -38
- package/_modules/themes/five/src/components/Promotions/index.js +7 -2
- package/_modules/themes/five/src/components/Promotions/styles.js +16 -14
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +31 -10
- package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +19 -11
- package/_modules/themes/five/src/components/SidebarMenu/styles.js +1 -1
- package/_modules/themes/five/src/components/SignUpForm/index.js +3 -2
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +7 -17
- package/_modules/themes/five/src/components/SingleProductCard/index.js +7 -298
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +310 -0
- package/_modules/themes/five/src/components/SingleProductCard/{styles.js → layouts/original/styles.js} +37 -33
- package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +305 -0
- package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/styles.js +143 -0
- package/_modules/themes/five/src/components/StripeElementsForm/index.js +1 -0
- package/_modules/themes/five/src/components/UserPopover/index.js +3 -1
- package/_modules/themes/five/src/components/UserPopover/styles.js +4 -3
- package/_modules/themes/five/src/components/UserProfileForm/styles.js +5 -8
- package/_modules/themes/six/src/components/BusinessController/index.js +81 -15
- package/_modules/themes/six/src/components/BusinessController/styles.js +58 -30
- package/_modules/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +5 -3
- package/_modules/themes/six/src/components/BusinessesMap/styles.js +1 -1
- package/_modules/themes/six/src/components/SearchBar/index.js +19 -10
- package/_modules/themes/six/src/components/SearchBar/styles.js +44 -16
- package/index-template.js +3 -1
- package/package.json +2 -2
- package/src/components/BusinessInformation/index.js +3 -8
- package/src/components/OrdersOption/styles.js +5 -5
- package/src/components/Pagination/index.js +107 -0
- package/src/components/Pagination/styles.js +106 -0
- package/src/components/SmartAppBanner/index.js +1 -0
- package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +89 -0
- package/src/components/VerticalOrdersLayout/index.js +86 -48
- package/src/components/VerticalOrdersLayout/styles.js +66 -22
- package/src/index.js +2 -0
- package/src/themes/five/src/components/AccordionDropdown/index.js +19 -6
- package/src/themes/five/src/components/AccordionDropdown/styles.js +25 -1
- package/src/themes/five/src/components/AddressList/styles.js +2 -0
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +21 -11
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +9 -3
- package/src/themes/five/src/components/BusinessListingSearch/index.js +1 -0
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +0 -2
- package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/index.js +23 -12
- package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +12 -4
- package/src/themes/five/src/components/BusinessProductsListing/index.js +3 -0
- package/src/themes/five/src/components/BusinessTypeFilter/index.js +15 -5
- package/src/themes/five/src/components/BusinessesListing/index.js +5 -5
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +54 -25
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +40 -26
- package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +19 -6
- package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +38 -3
- package/src/themes/five/src/components/CardForm/index.js +49 -8
- package/src/themes/five/src/components/CardForm/styles.js +20 -2
- package/src/themes/five/src/components/CartPopover/index.js +2 -1
- package/src/themes/five/src/components/CartPopover/styles.js +3 -3
- package/src/themes/five/src/components/Footer/index.js +15 -6
- package/src/themes/five/src/components/Footer/styles.js +15 -14
- package/src/themes/five/src/components/Header/index.js +6 -4
- package/src/themes/five/src/components/Header/styles.js +14 -11
- package/src/themes/five/src/components/HeaderOption/index.js +13 -10
- package/src/themes/five/src/components/HeaderOption/styles.js +2 -2
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +22 -10
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +8 -0
- package/src/themes/five/src/components/HorizontalOrdersLayout/index.js +24 -36
- package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +12 -1
- package/src/themes/five/src/components/InputPhoneNumber/index.js +1 -0
- package/src/themes/five/src/components/LoginForm/index.js +2 -1
- package/src/themes/five/src/components/MyOrders/index.js +20 -62
- package/src/themes/five/src/components/MyOrders/styles.js +1 -2
- package/src/themes/five/src/components/OrderDetails/index.js +9 -0
- package/src/themes/five/src/components/OrderDetails/styles.js +0 -55
- package/src/themes/five/src/components/OrderItAgain/styles.js +18 -0
- package/src/themes/five/src/components/OrdersOption/index.js +10 -16
- package/src/themes/five/src/components/OrdersOption/styles.js +1 -3
- package/src/themes/five/src/components/PageBanner/index.js +58 -0
- package/src/themes/five/src/components/PageBanner/styles.js +58 -0
- package/src/themes/five/src/components/Pagination/index.js +106 -0
- package/src/themes/five/src/components/Pagination/styles.js +106 -0
- package/src/themes/five/src/components/ProductForm/index.js +108 -84
- package/src/themes/five/src/components/ProductForm/styles.js +94 -12
- package/src/themes/five/src/components/Promotions/index.js +22 -16
- package/src/themes/five/src/components/Promotions/styles.js +10 -4
- package/src/themes/five/src/components/RenderProductsLayout/index.js +94 -66
- package/src/themes/five/src/components/RenderProductsLayout/styles.js +23 -22
- package/src/themes/five/src/components/SidebarMenu/styles.js +1 -1
- package/src/themes/five/src/components/SignUpForm/index.js +2 -1
- package/src/themes/five/src/components/SingleOrderCard/index.js +0 -21
- package/src/themes/five/src/components/SingleProductCard/index.js +7 -300
- package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +312 -0
- package/src/themes/five/src/components/SingleProductCard/{styles.js → layouts/original/styles.js} +9 -6
- package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +313 -0
- package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/styles.js +353 -0
- package/src/themes/five/src/components/StripeElementsForm/index.js +1 -0
- package/src/themes/five/src/components/UserPopover/index.js +2 -0
- package/src/themes/five/src/components/UserPopover/styles.js +2 -2
- package/src/themes/five/src/components/UserProfileForm/styles.js +3 -11
- package/src/themes/six/src/components/BusinessController/index.js +163 -62
- package/src/themes/six/src/components/BusinessController/styles.js +53 -14
- package/src/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +3 -1
- package/src/themes/six/src/components/BusinessesMap/styles.js +1 -1
- package/src/themes/six/src/components/SearchBar/index.js +27 -8
- package/src/themes/six/src/components/SearchBar/styles.js +33 -2
- package/template/app.js +364 -364
- package/template/assets/images/chew_logo.png +0 -0
- package/template/components/HelmetTags/index.js +5 -4
- package/_bundles/2.ordering-ui.f9c3deec77a8e21645ed.js +0 -1
- package/_bundles/ordering-ui.f9c3deec77a8e21645ed.js +0 -2
|
@@ -19,6 +19,9 @@ var _GrLocation = _interopRequireDefault(require("@meronex/icons/gr/GrLocation")
|
|
|
19
19
|
var _GrStar = _interopRequireDefault(require("@meronex/icons/gr/GrStar"));
|
|
20
20
|
var _BiCar = _interopRequireDefault(require("@meronex/icons/bi/BiCar"));
|
|
21
21
|
var _BiBasket = _interopRequireDefault(require("@meronex/icons/bi/BiBasket"));
|
|
22
|
+
var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
23
|
+
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
24
|
+
var _five = require("../../../../five");
|
|
22
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
26
|
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); }
|
|
24
27
|
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; }
|
|
@@ -37,7 +40,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
37
40
|
// import BusinessInformation from '../BusinessInformation'
|
|
38
41
|
|
|
39
42
|
var BusinessControllerUI = function BusinessControllerUI(props) {
|
|
40
|
-
var _props$beforeElements, _props$beforeComponen, _theme$images, _theme$images$dummies, _theme$images2, _theme$images2$dummie, _orderState$options, _business$available_d, _business$busy_driver, _business$active_orde, _business$
|
|
43
|
+
var _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _theme$business_listi4, _theme$business_listi5, _theme$business_listi6, _theme$business_listi7, _theme$business_listi8, _theme$business_listi9, _theme$business_listi10, _theme$business_listi11, _theme$business_listi12, _theme$business_listi13, _theme$business_listi14, _theme$business_listi15, _theme$business_listi16, _theme$business_listi17, _theme$business_listi18, _theme$business_listi19, _props$beforeElements, _props$beforeComponen, _theme$images, _theme$images$dummies, _theme$images2, _theme$images2$dummie, _business$reviews, _business$reviews2, _business$reviews3, _orderState$options, _business$available_d, _business$busy_driver, _business$active_orde, _business$reviews4, _business$reviews5, _business$reviews6, _props$afterComponent, _props$afterElements;
|
|
41
44
|
var isSkeleton = props.isSkeleton,
|
|
42
45
|
business = props.business,
|
|
43
46
|
orderState = props.orderState,
|
|
@@ -45,7 +48,8 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
|
|
|
45
48
|
orderType = props.orderType,
|
|
46
49
|
isCustomLayout = props.isCustomLayout,
|
|
47
50
|
isShowCallcenterInformation = props.isShowCallcenterInformation,
|
|
48
|
-
handleShowBusinessInfo = props.handleShowBusinessInfo
|
|
51
|
+
handleShowBusinessInfo = props.handleShowBusinessInfo,
|
|
52
|
+
handleFavoriteBusiness = props.handleFavoriteBusiness;
|
|
49
53
|
var theme = (0, _styledComponents.useTheme)();
|
|
50
54
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
51
55
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
@@ -56,6 +60,10 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
|
|
|
56
60
|
parsePrice = _useUtils2$.parsePrice,
|
|
57
61
|
parseDistance = _useUtils2$.parseDistance,
|
|
58
62
|
optimizeImage = _useUtils2$.optimizeImage;
|
|
63
|
+
var _useSession = (0, _orderingComponentsExternal.useSession)(),
|
|
64
|
+
_useSession2 = _slicedToArray(_useSession, 1),
|
|
65
|
+
auth = _useSession2[0].auth;
|
|
66
|
+
var favoriteRef = (0, _react.useRef)(null);
|
|
59
67
|
var _useState = (0, _react.useState)({
|
|
60
68
|
open: false,
|
|
61
69
|
content: []
|
|
@@ -63,6 +71,10 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
|
|
|
63
71
|
_useState2 = _slicedToArray(_useState, 2),
|
|
64
72
|
alertState = _useState2[0],
|
|
65
73
|
setAlertState = _useState2[1];
|
|
74
|
+
var layout = (theme === null || theme === void 0 ? void 0 : (_theme$business_listi = theme.business_listing_view) === null || _theme$business_listi === void 0 ? void 0 : (_theme$business_listi2 = _theme$business_listi.components) === null || _theme$business_listi2 === void 0 ? void 0 : (_theme$business_listi3 = _theme$business_listi2.layout) === null || _theme$business_listi3 === void 0 ? void 0 : _theme$business_listi3.type) || 'starbucks';
|
|
75
|
+
var hideCategories = theme === null || theme === void 0 ? void 0 : (_theme$business_listi4 = theme.business_listing_view) === null || _theme$business_listi4 === void 0 ? void 0 : (_theme$business_listi5 = _theme$business_listi4.components) === null || _theme$business_listi5 === void 0 ? void 0 : (_theme$business_listi6 = _theme$business_listi5.business) === null || _theme$business_listi6 === void 0 ? void 0 : (_theme$business_listi7 = _theme$business_listi6.components) === null || _theme$business_listi7 === void 0 ? void 0 : (_theme$business_listi8 = _theme$business_listi7.categories) === null || _theme$business_listi8 === void 0 ? void 0 : _theme$business_listi8.hidden;
|
|
76
|
+
var hideAddress = (_theme$business_listi9 = theme === null || theme === void 0 ? void 0 : (_theme$business_listi10 = theme.business_listing_view) === null || _theme$business_listi10 === void 0 ? void 0 : (_theme$business_listi11 = _theme$business_listi10.components) === null || _theme$business_listi11 === void 0 ? void 0 : (_theme$business_listi12 = _theme$business_listi11.business) === null || _theme$business_listi12 === void 0 ? void 0 : (_theme$business_listi13 = _theme$business_listi12.components) === null || _theme$business_listi13 === void 0 ? void 0 : (_theme$business_listi14 = _theme$business_listi13.address) === null || _theme$business_listi14 === void 0 ? void 0 : _theme$business_listi14.hidden) !== null && _theme$business_listi9 !== void 0 ? _theme$business_listi9 : true;
|
|
77
|
+
var hideBusinessFavorite = theme === null || theme === void 0 ? void 0 : (_theme$business_listi15 = theme.business_listing_view) === null || _theme$business_listi15 === void 0 ? void 0 : (_theme$business_listi16 = _theme$business_listi15.components) === null || _theme$business_listi16 === void 0 ? void 0 : (_theme$business_listi17 = _theme$business_listi16.business) === null || _theme$business_listi17 === void 0 ? void 0 : (_theme$business_listi18 = _theme$business_listi17.components) === null || _theme$business_listi18 === void 0 ? void 0 : (_theme$business_listi19 = _theme$business_listi18.favorite) === null || _theme$business_listi19 === void 0 ? void 0 : _theme$business_listi19.hidden;
|
|
66
78
|
var types = ['food', 'alcohol', 'groceries', 'laundry'];
|
|
67
79
|
var businessType = function businessType() {
|
|
68
80
|
if (Object.keys(business).length <= 0) return t('GENERAL', 'General');
|
|
@@ -79,6 +91,38 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
|
|
|
79
91
|
content: [t('ERROR_ADD_PRODUCT_BUSINESS_CLOSED', 'The Business is closed at the moment')]
|
|
80
92
|
});
|
|
81
93
|
};
|
|
94
|
+
var handleChangeFavorite = function handleChangeFavorite() {
|
|
95
|
+
if (auth) {
|
|
96
|
+
handleFavoriteBusiness && handleFavoriteBusiness(!(business !== null && business !== void 0 && business.favorite));
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
var scheduleFormatted = function scheduleFormatted(_ref) {
|
|
100
|
+
var hour = _ref.hour,
|
|
101
|
+
minute = _ref.minute;
|
|
102
|
+
var checkTime = function checkTime(val) {
|
|
103
|
+
return val < 10 ? "0".concat(val) : val;
|
|
104
|
+
};
|
|
105
|
+
return "".concat(checkTime(hour), ":").concat(checkTime(minute));
|
|
106
|
+
};
|
|
107
|
+
var getScheduleOpen = function getScheduleOpen(business) {
|
|
108
|
+
var _business$today;
|
|
109
|
+
var currentDate = (0, _dayjs.default)().tz(business === null || business === void 0 ? void 0 : business.timezone);
|
|
110
|
+
var lapse = null;
|
|
111
|
+
if (business !== null && business !== void 0 && (_business$today = business.today) !== null && _business$today !== void 0 && _business$today.enabled) {
|
|
112
|
+
var _business$today2, _business$today2$laps;
|
|
113
|
+
lapse = business === null || business === void 0 ? void 0 : (_business$today2 = business.today) === null || _business$today2 === void 0 ? void 0 : (_business$today2$laps = _business$today2.lapses) === null || _business$today2$laps === void 0 ? void 0 : _business$today2$laps.find(function (lapse) {
|
|
114
|
+
var from = currentDate.hour(lapse.open.hour).minute(lapse.open.minute);
|
|
115
|
+
var to = currentDate.hour(lapse.close.hour).minute(lapse.close.minute);
|
|
116
|
+
return currentDate.unix() >= from.unix() && currentDate.unix() <= to.unix();
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
return lapse ? "".concat(scheduleFormatted(lapse.open), " - ").concat(scheduleFormatted(lapse.close)) : '';
|
|
120
|
+
};
|
|
121
|
+
var handleClickBusiness = function handleClickBusiness(e, business) {
|
|
122
|
+
var _favoriteRef$current;
|
|
123
|
+
if (favoriteRef !== null && favoriteRef !== void 0 && (_favoriteRef$current = favoriteRef.current) !== null && _favoriteRef$current !== void 0 && _favoriteRef$current.contains(e.target)) return;
|
|
124
|
+
handleClick(business);
|
|
125
|
+
};
|
|
82
126
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (_props$beforeElements = props.beforeElements) === null || _props$beforeElements === void 0 ? void 0 : _props$beforeElements.map(function (BeforeElement, i) {
|
|
83
127
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
84
128
|
key: i
|
|
@@ -91,8 +135,8 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
|
|
|
91
135
|
isSkeleton: isSkeleton
|
|
92
136
|
}, /*#__PURE__*/_react.default.createElement(_styles.WrapperBusinessCard, {
|
|
93
137
|
isSkeleton: isSkeleton,
|
|
94
|
-
onClick: function onClick() {
|
|
95
|
-
return !isSkeleton && handleClick && (!(business !== null && business !== void 0 && business.open) && isCustomLayout ? handleShowAlert() :
|
|
138
|
+
onClick: function onClick(e) {
|
|
139
|
+
return !isSkeleton && handleClick && (!(business !== null && business !== void 0 && business.open) && isCustomLayout ? handleShowAlert() : handleClickBusiness(e, business));
|
|
96
140
|
}
|
|
97
141
|
}, /*#__PURE__*/_react.default.createElement(_styles.BusinessContent, null, /*#__PURE__*/_react.default.createElement(_styles.WrapperBusinessLogo, {
|
|
98
142
|
isSkeleton: isSkeleton
|
|
@@ -105,9 +149,28 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
|
|
|
105
149
|
className: "info"
|
|
106
150
|
}, /*#__PURE__*/_react.default.createElement(_styles.BusinessInfoItem, null, /*#__PURE__*/_react.default.createElement(_styles.NameWrapper, null, business !== null && business !== void 0 && business.name ? /*#__PURE__*/_react.default.createElement(_styles.BusinessName, null, business === null || business === void 0 ? void 0 : business.name) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
107
151
|
width: 100
|
|
108
|
-
})
|
|
152
|
+
}), layout === 'mapview' && /*#__PURE__*/_react.default.createElement(_styles.BusinessInfomation, null, (business === null || business === void 0 ? void 0 : (_business$reviews = business.reviews) === null || _business$reviews === void 0 ? void 0 : _business$reviews.total) > 0 ? /*#__PURE__*/_react.default.createElement("div", {
|
|
153
|
+
className: "reviews"
|
|
154
|
+
}, /*#__PURE__*/_react.default.createElement(_GrStar.default, null), /*#__PURE__*/_react.default.createElement("span", null, business === null || business === void 0 ? void 0 : (_business$reviews2 = business.reviews) === null || _business$reviews2 === void 0 ? void 0 : _business$reviews2.total)) : (business === null || business === void 0 ? void 0 : (_business$reviews3 = business.reviews) === null || _business$reviews3 === void 0 ? void 0 : _business$reviews3.total) !== 0 && /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
155
|
+
width: 50
|
|
156
|
+
}), !hideBusinessFavorite && /*#__PURE__*/_react.default.createElement("div", {
|
|
157
|
+
className: "favorite",
|
|
158
|
+
ref: favoriteRef,
|
|
159
|
+
onClick: handleChangeFavorite
|
|
160
|
+
}, !isSkeleton ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, business !== null && business !== void 0 && business.favorite ? /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.HeartFill, null) : /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Heart, null)) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
161
|
+
width: 16,
|
|
162
|
+
height: 16
|
|
163
|
+
})), business && handleShowBusinessInfo ? /*#__PURE__*/_react.default.createElement(_BsExclamationCircle.default, {
|
|
164
|
+
onClick: function onClick() {
|
|
165
|
+
return handleShowBusinessInfo(business);
|
|
166
|
+
}
|
|
167
|
+
}) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
168
|
+
width: 20
|
|
169
|
+
}))), !isShowCallcenterInformation && !hideCategories && /*#__PURE__*/_react.default.createElement(_styles.Categories, null, Object.keys(business).length > 0 ? businessType() : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
170
|
+
width: 100
|
|
171
|
+
})), !isShowCallcenterInformation && !hideAddress && /*#__PURE__*/_react.default.createElement(_styles.Address, null, Object.keys(business).length > 0 ? business === null || business === void 0 ? void 0 : business.address : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
109
172
|
width: 100
|
|
110
|
-
})), /*#__PURE__*/_react.default.createElement(_styles.Medadata, {
|
|
173
|
+
})), layout !== 'mapview' && /*#__PURE__*/_react.default.createElement(_styles.Medadata, {
|
|
111
174
|
isCustomerMode: isShowCallcenterInformation
|
|
112
175
|
}, Object.keys(business).length > 0 ? /*#__PURE__*/_react.default.createElement("p", {
|
|
113
176
|
className: "bullet"
|
|
@@ -127,17 +190,20 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
|
|
|
127
190
|
bgcolor: "red"
|
|
128
191
|
}, /*#__PURE__*/_react.default.createElement(_BiCar.default, null), business === null || business === void 0 ? void 0 : (_business$busy_driver = business.busy_drivers) === null || _business$busy_driver === void 0 ? void 0 : _business$busy_driver.length), /*#__PURE__*/_react.default.createElement(_styles.CallCenterInformationBullet, {
|
|
129
192
|
bgcolor: "rgb(252,225,5)"
|
|
130
|
-
}, /*#__PURE__*/_react.default.createElement(_BiBasket.default, null), business === null || business === void 0 ? void 0 : (_business$active_orde = business.active_orders) === null || _business$active_orde === void 0 ? void 0 : _business$active_orde.length)), (business === null || business === void 0 ? void 0 : (_business$
|
|
193
|
+
}, /*#__PURE__*/_react.default.createElement(_BiBasket.default, null), business === null || business === void 0 ? void 0 : (_business$active_orde = business.active_orders) === null || _business$active_orde === void 0 ? void 0 : _business$active_orde.length)), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (business === null || business === void 0 ? void 0 : (_business$reviews4 = business.reviews) === null || _business$reviews4 === void 0 ? void 0 : _business$reviews4.total) > 0 ? /*#__PURE__*/_react.default.createElement("div", {
|
|
131
194
|
className: "reviews"
|
|
132
|
-
}, /*#__PURE__*/_react.default.createElement(_GrStar.default, null), /*#__PURE__*/_react.default.createElement("span", null, business === null || business === void 0 ? void 0 : (_business$
|
|
195
|
+
}, /*#__PURE__*/_react.default.createElement(_GrStar.default, null), /*#__PURE__*/_react.default.createElement("span", null, business === null || business === void 0 ? void 0 : (_business$reviews5 = business.reviews) === null || _business$reviews5 === void 0 ? void 0 : _business$reviews5.total)) : (business === null || business === void 0 ? void 0 : (_business$reviews6 = business.reviews) === null || _business$reviews6 === void 0 ? void 0 : _business$reviews6.total) !== 0 && /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
133
196
|
width: 50
|
|
134
|
-
})))
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
139
|
-
width:
|
|
140
|
-
})
|
|
197
|
+
}))), /*#__PURE__*/_react.default.createElement(_styles.Medadata, null, !isSkeleton > 0 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
198
|
+
className: "schedule"
|
|
199
|
+
}, "".concat(t('SCHEDULE', 'Schedule'), ": ").concat(getScheduleOpen(business))), /*#__PURE__*/_react.default.createElement(_styles.SelectStoreContainer, null, /*#__PURE__*/_react.default.createElement(_five.Button, {
|
|
200
|
+
outline: true
|
|
201
|
+
}, t('SELECT_BUSINESS', 'Select business')))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
202
|
+
width: 70
|
|
203
|
+
}), /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
204
|
+
width: 120,
|
|
205
|
+
height: 20
|
|
206
|
+
})))))))), /*#__PURE__*/_react.default.createElement(_Confirm.Alert, {
|
|
141
207
|
title: t('BUSINESS_CLOSED', 'Business Closed'),
|
|
142
208
|
content: alertState.content,
|
|
143
209
|
acceptText: t('ACCEPT', 'Accept'),
|
|
@@ -4,16 +4,16 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.WrapperBusinessLogo = exports.WrapperBusinessCard = exports.NameWrapper = exports.Medadata = exports.ContainerCard = exports.Categories = exports.CallCenterInformationBullet = exports.CallCenterInformation = exports.BusinessTags = exports.BusinessName = exports.BusinessLogo = exports.BusinessInfomation = exports.BusinessInfoItem = exports.BusinessInfo = exports.BusinessHero = exports.BusinessHeader = exports.BusinessContent = void 0;
|
|
7
|
+
exports.WrapperBusinessLogo = exports.WrapperBusinessCard = exports.SelectStoreContainer = exports.NameWrapper = exports.Medadata = exports.ContainerCard = exports.Categories = exports.CallCenterInformationBullet = exports.CallCenterInformation = exports.BusinessTags = exports.BusinessName = exports.BusinessLogo = exports.BusinessInfomation = exports.BusinessInfoItem = exports.BusinessInfo = exports.BusinessHero = exports.BusinessHeader = exports.BusinessContent = exports.Address = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28;
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34;
|
|
11
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
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); }
|
|
15
15
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
16
|
-
var ContainerCard = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral([" \n
|
|
16
|
+
var ContainerCard = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral([" \n width: 100%;\n position: relative;\n"])));
|
|
17
17
|
exports.ContainerCard = ContainerCard;
|
|
18
18
|
var WrapperBusinessCard = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border-radius: 10px;\n cursor: ", ";\n"])), function (_ref) {
|
|
19
19
|
var isSkeleton = _ref.isSkeleton;
|
|
@@ -35,22 +35,26 @@ var BusinessHeader = function BusinessHeader(props) {
|
|
|
35
35
|
}), props.children);
|
|
36
36
|
};
|
|
37
37
|
exports.BusinessHeader = BusinessHeader;
|
|
38
|
-
var BusinessTags = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n position: absolute;\n justify-content: space-between;\n align-items: center;\n top: 0;\n margin: 15px;\n width: calc(100% - 35px);\n\n span.crown {\n background-color: rgba(0, 0, 0, 0.5);\n font-size: 20px;\n display: flex;\n align-items: center;\n color: #FFC917;\n }\n\n div {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n\n span {\n background-color: #6C6C6C;\n font-size: 12px;\n color: #FFF;\n padding: 8px;\n border-radius: 10px;\n margin-right: 10px;\n ", "\n &:last-child {\n ", "\n }\n }\n"])), function (
|
|
38
|
+
var BusinessTags = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n position: absolute;\n justify-content: space-between;\n align-items: center;\n top: 0;\n margin: 15px;\n width: calc(100% - 35px);\n \n ", "\n span.crown {\n background-color: rgba(0, 0, 0, 0.5);\n font-size: 20px;\n display: flex;\n align-items: center;\n color: #FFC917;\n }\n\n div {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n\n span {\n background-color: #6C6C6C;\n font-size: 12px;\n color: #FFF;\n padding: 8px;\n border-radius: 10px;\n margin-right: 10px;\n ", "\n &:last-child {\n ", "\n }\n }\n"])), function (_ref2) {
|
|
39
|
+
var _theme$business_listi, _theme$business_listi2, _theme$business_listi3;
|
|
40
|
+
var theme = _ref2.theme;
|
|
41
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$business_listi = theme.business_listing_view) === null || _theme$business_listi === void 0 ? void 0 : (_theme$business_listi2 = _theme$business_listi.components) === null || _theme$business_listi2 === void 0 ? void 0 : (_theme$business_listi3 = _theme$business_listi2.layout) === null || _theme$business_listi3 === void 0 ? void 0 : _theme$business_listi3.type) === 'mapview' && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 100%;\n "])));
|
|
42
|
+
}, function (props) {
|
|
39
43
|
var _props$theme;
|
|
40
|
-
return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(
|
|
44
|
+
return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-left: 10px;\n margin-right: 0;\n "])));
|
|
41
45
|
}, function (props) {
|
|
42
46
|
var _props$theme2;
|
|
43
|
-
return (_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 && _props$theme2.rtl ? (0, _styledComponents.css)(
|
|
47
|
+
return (_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 && _props$theme2.rtl ? (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-left: 0px;\n "]))) : (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin-right: 0px;\n "])));
|
|
44
48
|
});
|
|
45
49
|
exports.BusinessTags = BusinessTags;
|
|
46
|
-
var BusinessContent = _styledComponents.default.div(
|
|
50
|
+
var BusinessContent = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n margin: 12px 24px;\n max-height: 115px;\n"])));
|
|
47
51
|
exports.BusinessContent = BusinessContent;
|
|
48
|
-
var WrapperBusinessLogo = _styledComponents.default.div(
|
|
49
|
-
var isSkeleton =
|
|
50
|
-
return isSkeleton && (0, _styledComponents.css)(
|
|
52
|
+
var WrapperBusinessLogo = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n align-self: center;\n width: 65px;\n height: 65px;\n min-height: 65px;\n min-width: 65px;\n min-height: 65px;\n ", "\n\n @media (min-width: 481px){\n max-width: 75px;\n max-height: 75px;\n height: 75px;\n width: 75px;\n min-width: 75px;\n min-height: 75px;\n }\n"])), function (_ref3) {
|
|
53
|
+
var isSkeleton = _ref3.isSkeleton;
|
|
54
|
+
return isSkeleton && (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n width: auto;\n height: auto;\n "])));
|
|
51
55
|
});
|
|
52
56
|
exports.WrapperBusinessLogo = WrapperBusinessLogo;
|
|
53
|
-
var BusinessLogoStyled = _styledComponents.default.div(
|
|
57
|
+
var BusinessLogoStyled = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n display: flex;\n width: 65px;\n height: 65px;\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 min-height: 65px;\n border-radius: 10px;\n\n @media (min-width: 481px){\n width: 100%;\n height: 100%;\n min-height: 75px;\n }\n"])));
|
|
54
58
|
var BusinessLogo = function BusinessLogo(props) {
|
|
55
59
|
var style = {};
|
|
56
60
|
if (props.bgimage) {
|
|
@@ -61,45 +65,69 @@ var BusinessLogo = function BusinessLogo(props) {
|
|
|
61
65
|
}), props.children);
|
|
62
66
|
};
|
|
63
67
|
exports.BusinessLogo = BusinessLogo;
|
|
64
|
-
var BusinessInfo = _styledComponents.default.div(
|
|
68
|
+
var BusinessInfo = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n display: flex;\n width: calc(100% - 65px);\n\n @media (min-width: 481px){\n width: calc(100% - 75px);\n ", "\n }\n"])), function (_ref4) {
|
|
69
|
+
var _theme$business_listi4, _theme$business_listi5, _theme$business_listi6;
|
|
70
|
+
var theme = _ref4.theme;
|
|
71
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$business_listi4 = theme.business_listing_view) === null || _theme$business_listi4 === void 0 ? void 0 : (_theme$business_listi5 = _theme$business_listi4.components) === null || _theme$business_listi5 === void 0 ? void 0 : (_theme$business_listi6 = _theme$business_listi5.layout) === null || _theme$business_listi6 === void 0 ? void 0 : _theme$business_listi6.type) === 'mapview' && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n "])));
|
|
72
|
+
});
|
|
65
73
|
exports.BusinessInfo = BusinessInfo;
|
|
66
|
-
var BusinessInfoItem = _styledComponents.default.div(
|
|
74
|
+
var BusinessInfoItem = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n width: 92%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: 0px 5px 0px 10px;\n font-size: 12px;\n ", "\n .reviews {\n display: flex;\n align-items: center;\n svg {\n margin-right: 3px;\n font-size: 22px;\n color: #FDC918;\n ", "\n }\n }\n\n div {\n display: flex;\n justify-content: space-between;\n ", "\n p {\n text-transform: capitalize;\n display: flex;\n align-items: center;\n margin: 0px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n img {\n margin-right: 4px;\n ", "\n }\n }\n p.bold {\n font-weight: bold;\n }\n }\n\n @media (min-width: 1201px) {\n width: 95%;\n }\n\n @media (min-width: 481px){\n ", "\n padding: 0px 5px 0px 16px;\n font-size: 16px;\n\n ", "\n }\n"])), function (props) {
|
|
67
75
|
var _props$theme3;
|
|
68
|
-
return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(
|
|
76
|
+
return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n padding: 0px 10px 0px 5px;\n "])));
|
|
69
77
|
}, function (props) {
|
|
70
78
|
var _props$theme4;
|
|
71
|
-
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(
|
|
79
|
+
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n margin-left: 3px;\n margin-right: 0;\n "])));
|
|
80
|
+
}, function (_ref5) {
|
|
81
|
+
var _theme$business_listi7, _theme$business_listi8, _theme$business_listi9;
|
|
82
|
+
var theme = _ref5.theme;
|
|
83
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$business_listi7 = theme.business_listing_view) === null || _theme$business_listi7 === void 0 ? void 0 : (_theme$business_listi8 = _theme$business_listi7.components) === null || _theme$business_listi8 === void 0 ? void 0 : (_theme$business_listi9 = _theme$business_listi8.layout) === null || _theme$business_listi9 === void 0 ? void 0 : _theme$business_listi9.type) === 'mapview' && (0, _styledComponents.css)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n align-items: center;\n "])));
|
|
72
84
|
}, function (props) {
|
|
73
85
|
var _props$theme5;
|
|
74
|
-
return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(
|
|
86
|
+
return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n margin-left: 4px;\n margin-right: 0px;\n "])));
|
|
87
|
+
}, function (_ref6) {
|
|
88
|
+
var _theme$business_listi10, _theme$business_listi11, _theme$business_listi12;
|
|
89
|
+
var theme = _ref6.theme;
|
|
90
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$business_listi10 = theme.business_listing_view) === null || _theme$business_listi10 === void 0 ? void 0 : (_theme$business_listi11 = _theme$business_listi10.components) === null || _theme$business_listi11 === void 0 ? void 0 : (_theme$business_listi12 = _theme$business_listi11.layout) === null || _theme$business_listi12 === void 0 ? void 0 : _theme$business_listi12.type) === 'mapview' && (0, _styledComponents.css)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n min-width: 100%;\n width: 100%;\n "])));
|
|
75
91
|
}, function (props) {
|
|
76
92
|
var _props$theme6;
|
|
77
|
-
return ((_props$theme6 = props.theme) === null || _props$theme6 === void 0 ? void 0 : _props$theme6.rtl) && (0, _styledComponents.css)(
|
|
93
|
+
return ((_props$theme6 = props.theme) === null || _props$theme6 === void 0 ? void 0 : _props$theme6.rtl) && (0, _styledComponents.css)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n padding: 0px 16px 0px 5px;\n "])));
|
|
78
94
|
});
|
|
79
95
|
exports.BusinessInfoItem = BusinessInfoItem;
|
|
80
|
-
var BusinessName = _styledComponents.default.h6(
|
|
96
|
+
var BusinessName = _styledComponents.default.h6(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n font-size: 18px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: 500;\n margin-block-start: 0;\n margin-block-end: 0;\n"])));
|
|
81
97
|
exports.BusinessName = BusinessName;
|
|
82
|
-
var Categories = _styledComponents.default.div(
|
|
98
|
+
var Categories = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n font-size: 14px;\n font-weight: 300;\n color: #6C6C6C;\n\n @media (min-width: 481px) {\n font-size: 16px;\n }\n"])));
|
|
83
99
|
exports.Categories = Categories;
|
|
84
|
-
var Medadata = _styledComponents.default.div(
|
|
85
|
-
var isCustomerMode =
|
|
86
|
-
return isCustomerMode && (0, _styledComponents.css)(
|
|
100
|
+
var Medadata = _styledComponents.default.div(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n display: flex;\n font-weight: 300;\n font-size: 12px;\n .schedule{\n font-size: 12px;\n color: #ADB5BD;\n }\n ", "\n p {\n svg {\n margin-right: 3px;\n ", "\n }\n }\n\n @media (min-width: 481px) {\n font-size: 14px;\n }\n"])), function (_ref7) {
|
|
101
|
+
var isCustomerMode = _ref7.isCustomerMode;
|
|
102
|
+
return isCustomerMode && (0, _styledComponents.css)(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n > div {\n flex-direction: column;\n }\n "])));
|
|
87
103
|
}, function (props) {
|
|
88
104
|
var _props$theme7;
|
|
89
|
-
return ((_props$theme7 = props.theme) === null || _props$theme7 === void 0 ? void 0 : _props$theme7.rtl) && (0, _styledComponents.css)(
|
|
105
|
+
return ((_props$theme7 = props.theme) === null || _props$theme7 === void 0 ? void 0 : _props$theme7.rtl) && (0, _styledComponents.css)(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n margin-left: 3px;\n margin-right: 0;\n "])));
|
|
90
106
|
});
|
|
91
107
|
exports.Medadata = Medadata;
|
|
92
|
-
var CallCenterInformation = _styledComponents.default.div(
|
|
108
|
+
var CallCenterInformation = _styledComponents.default.div(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n div{\n justify-content: space-evenly;\n }\n"])));
|
|
93
109
|
exports.CallCenterInformation = CallCenterInformation;
|
|
94
|
-
var CallCenterInformationBullet = _styledComponents.default.div(
|
|
95
|
-
var bgcolor =
|
|
110
|
+
var CallCenterInformationBullet = _styledComponents.default.div(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n display: flex;\n padding: 2px;\n margin-bottom: 2px;\n border-radius: 16px;\n background: ", ";\n width: 50px;\n color: #fff;\n svg{\n font-size: 18px;\n }\n"])), function (_ref8) {
|
|
111
|
+
var bgcolor = _ref8.bgcolor;
|
|
96
112
|
return bgcolor;
|
|
97
113
|
});
|
|
98
114
|
exports.CallCenterInformationBullet = CallCenterInformationBullet;
|
|
99
|
-
var NameWrapper = _styledComponents.default.div(
|
|
115
|
+
var NameWrapper = _styledComponents.default.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n justify-content: space-between;\n"])));
|
|
100
116
|
exports.NameWrapper = NameWrapper;
|
|
101
|
-
var BusinessInfomation = _styledComponents.default.div(
|
|
117
|
+
var BusinessInfomation = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 2;\n .reviews {\n margin-right: 10px;\n }\n .favorite {\n margin-right: 10px;\n svg {\n color: #E63757\n }\n }\n ", "\n\n svg {\n font-size: 20px;\n }\n\n &:hover svg{\n font-size: 21px;\n }\n"])), function (props) {
|
|
102
118
|
var _props$theme8;
|
|
103
|
-
return ((_props$theme8 = props.theme) === null || _props$theme8 === void 0 ? void 0 : _props$theme8.rtl) && (0, _styledComponents.css)(
|
|
119
|
+
return ((_props$theme8 = props.theme) === null || _props$theme8 === void 0 ? void 0 : _props$theme8.rtl) && (0, _styledComponents.css)(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n right: unset;\n left: 0;\n "])));
|
|
120
|
+
});
|
|
121
|
+
exports.BusinessInfomation = BusinessInfomation;
|
|
122
|
+
var Address = _styledComponents.default.p(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n width: 70%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 0;\n font-size: 14px;\n"])));
|
|
123
|
+
exports.Address = Address;
|
|
124
|
+
var SelectStoreContainer = _styledComponents.default.div(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n button{ \n background: transparent;\n color: ", ";\n border-color: ", ";\n height: 27px;\n line-height: 0;\n font-size: 14px;\n white-space: nowrap;\n }\n"])), function (_ref9) {
|
|
125
|
+
var _theme$colors;
|
|
126
|
+
var theme = _ref9.theme;
|
|
127
|
+
return theme === null || theme === void 0 ? void 0 : (_theme$colors = theme.colors) === null || _theme$colors === void 0 ? void 0 : _theme$colors.primary;
|
|
128
|
+
}, function (_ref10) {
|
|
129
|
+
var _theme$colors2;
|
|
130
|
+
var theme = _ref10.theme;
|
|
131
|
+
return theme === null || theme === void 0 ? void 0 : (_theme$colors2 = theme.colors) === null || _theme$colors2 === void 0 ? void 0 : _theme$colors2.primary;
|
|
104
132
|
});
|
|
105
|
-
exports.
|
|
133
|
+
exports.SelectStoreContainer = SelectStoreContainer;
|
|
@@ -17,7 +17,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
17
17
|
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; } }
|
|
18
18
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
19
19
|
var SearchProducts = function SearchProducts(props) {
|
|
20
|
-
var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderingTheme$theme$5, _orderingTheme$theme$6, _orderingTheme$theme$7, _theme$defaultLanguag, _businessState$busine;
|
|
20
|
+
var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderingTheme$theme$5, _orderingTheme$theme$6, _orderingTheme$theme$7, _theme$business_view, _theme$business_view$, _theme$business_view$2, _theme$business_view$3, _theme$business_view$4, _theme$defaultLanguag, _businessState$busine;
|
|
21
21
|
var handleChangeSearch = props.handleChangeSearch,
|
|
22
22
|
searchValue = props.searchValue,
|
|
23
23
|
businessState = props.businessState,
|
|
@@ -32,12 +32,14 @@ var SearchProducts = function SearchProducts(props) {
|
|
|
32
32
|
_useOrderingTheme2 = _slicedToArray(_useOrderingTheme, 1),
|
|
33
33
|
orderingTheme = _useOrderingTheme2[0];
|
|
34
34
|
var showSort = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme = orderingTheme.theme) !== null && _orderingTheme$theme !== void 0 && (_orderingTheme$theme$ = _orderingTheme$theme.business_view) !== null && _orderingTheme$theme$ !== void 0 && (_orderingTheme$theme$2 = _orderingTheme$theme$.components) !== null && _orderingTheme$theme$2 !== void 0 && (_orderingTheme$theme$3 = _orderingTheme$theme$2.header) !== null && _orderingTheme$theme$3 !== void 0 && (_orderingTheme$theme$4 = _orderingTheme$theme$3.components) !== null && _orderingTheme$theme$4 !== void 0 && (_orderingTheme$theme$5 = _orderingTheme$theme$4.business) !== null && _orderingTheme$theme$5 !== void 0 && (_orderingTheme$theme$6 = _orderingTheme$theme$5.components) !== null && _orderingTheme$theme$6 !== void 0 && (_orderingTheme$theme$7 = _orderingTheme$theme$6.sort) !== null && _orderingTheme$theme$7 !== void 0 && _orderingTheme$theme$7.hidden);
|
|
35
|
+
var searchLayout = theme === null || theme === void 0 ? void 0 : (_theme$business_view = theme.business_view) === null || _theme$business_view === void 0 ? void 0 : (_theme$business_view$ = _theme$business_view.components) === null || _theme$business_view$ === void 0 ? void 0 : (_theme$business_view$2 = _theme$business_view$.product_search) === null || _theme$business_view$2 === void 0 ? void 0 : (_theme$business_view$3 = _theme$business_view$2.components) === null || _theme$business_view$3 === void 0 ? void 0 : (_theme$business_view$4 = _theme$business_view$3.layout) === null || _theme$business_view$4 === void 0 ? void 0 : _theme$business_view$4.type;
|
|
35
36
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_SearchBar.SearchBar, {
|
|
36
37
|
onSearch: handleChangeSearch,
|
|
37
38
|
search: searchValue,
|
|
38
39
|
placeholder: t('SEARCH_PRODUCTS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag = theme.defaultLanguages) === null || _theme$defaultLanguag === void 0 ? void 0 : _theme$defaultLanguag.SEARCH_PRODUCTS) || 'Search Products'),
|
|
39
|
-
lazyLoad: businessState === null || businessState === void 0 ? void 0 : (_businessState$busine = businessState.business) === null || _businessState$busine === void 0 ? void 0 : _businessState$busine.lazy_load_products_recommended
|
|
40
|
-
|
|
40
|
+
lazyLoad: businessState === null || businessState === void 0 ? void 0 : (_businessState$busine = businessState.business) === null || _businessState$busine === void 0 ? void 0 : _businessState$busine.lazy_load_products_recommended,
|
|
41
|
+
disablePadding: props.disablePadding
|
|
42
|
+
}), showSort && searchLayout !== 'floating' && /*#__PURE__*/_react.default.createElement(_Select.Select, {
|
|
41
43
|
notAsync: true,
|
|
42
44
|
notReload: true,
|
|
43
45
|
options: sortByOptions,
|
|
@@ -10,7 +10,7 @@ var _templateObject, _templateObject2;
|
|
|
10
10
|
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); }
|
|
11
11
|
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; }
|
|
12
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
13
|
-
var WrapperMap = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n display: flex; \n justify-content: center;\n box-sizing: border-box;\n min-height:
|
|
13
|
+
var WrapperMap = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n display: flex; \n justify-content: center;\n box-sizing: border-box;\n min-height: 70vh;\n height:100%;\n \n > div {\n width: 100% !important;\n height: 100% !important; \n }\n\n #map {\n top: 1px;\n }\n\n ", "\n\n @media(min-width: 850px){\n width:60vw; \n }\n\n @media(min-width: 1201px){\n \n }\n\n"])), function (_ref) {
|
|
14
14
|
var disabled = _ref.disabled;
|
|
15
15
|
return disabled && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n pointer-events: none\n "])));
|
|
16
16
|
});
|
|
@@ -7,9 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.SearchBar = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _Inputs = require("../../styles/Inputs");
|
|
10
|
-
var _ThemeContext = require("../../../../../contexts/ThemeContext");
|
|
11
10
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
11
|
+
var _AiOutlineSearch = _interopRequireDefault(require("@meronex/icons/ai/AiOutlineSearch"));
|
|
12
12
|
var _styles = require("./styles");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
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); }
|
|
14
15
|
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; }
|
|
15
16
|
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); }
|
|
@@ -20,15 +21,12 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
20
21
|
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; } }
|
|
21
22
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
23
|
var SearchBar = function SearchBar(props) {
|
|
23
|
-
var _props$beforeElements, _props$beforeComponen, _el$current, _el$current2,
|
|
24
|
+
var _props$beforeElements, _props$beforeComponen, _el$current, _el$current2, _props$afterComponent, _props$afterElements;
|
|
24
25
|
var onSearch = props.onSearch,
|
|
25
26
|
search = props.search,
|
|
26
27
|
placeholder = props.placeholder,
|
|
27
28
|
lazyLoad = props.lazyLoad,
|
|
28
29
|
isCustomLayout = props.isCustomLayout;
|
|
29
|
-
var _useTheme = (0, _ThemeContext.useTheme)(),
|
|
30
|
-
_useTheme2 = _slicedToArray(_useTheme, 1),
|
|
31
|
-
theme = _useTheme2[0];
|
|
32
30
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
33
31
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
34
32
|
t = _useLanguage2[1];
|
|
@@ -40,10 +38,16 @@ var SearchBar = function SearchBar(props) {
|
|
|
40
38
|
if (previousSearch !== e.target.value) {
|
|
41
39
|
if (!lazyLoad) {
|
|
42
40
|
onSearch(e.target.value);
|
|
41
|
+
if (el.current) {
|
|
42
|
+
el.current.value = e.target.value;
|
|
43
|
+
}
|
|
43
44
|
} else {
|
|
44
45
|
clearTimeout(timeout);
|
|
45
46
|
timeout = setTimeout(function () {
|
|
46
47
|
onSearch(e.target.value);
|
|
48
|
+
if (el.current) {
|
|
49
|
+
el.current.value = e.target.value;
|
|
50
|
+
}
|
|
47
51
|
}, 750);
|
|
48
52
|
}
|
|
49
53
|
}
|
|
@@ -71,20 +75,25 @@ var SearchBar = function SearchBar(props) {
|
|
|
71
75
|
}), /*#__PURE__*/_react.default.createElement(_styles.BusinessSearch, {
|
|
72
76
|
className: !isCustomLayout && 'search-bar',
|
|
73
77
|
isCustomLayout: isCustomLayout,
|
|
74
|
-
hasValue: (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.value
|
|
78
|
+
hasValue: (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.value,
|
|
79
|
+
disablePadding: props.disablePadding
|
|
75
80
|
}, /*#__PURE__*/_react.default.createElement(_Inputs.Input, {
|
|
76
81
|
ref: el,
|
|
77
82
|
name: "search",
|
|
78
83
|
"aria-label": "search",
|
|
84
|
+
id: "select-input",
|
|
79
85
|
placeholder: placeholder,
|
|
80
86
|
isCustomLayout: isCustomLayout,
|
|
81
87
|
autoComplete: "off",
|
|
82
88
|
maxLength: "500"
|
|
83
|
-
}),
|
|
89
|
+
}), ((_el$current2 = el.current) === null || _el$current2 === void 0 ? void 0 : _el$current2.value) && /*#__PURE__*/_react.default.createElement(_styles.DeleteContent, {
|
|
90
|
+
isHome: props.isHome,
|
|
91
|
+
isClear: true
|
|
92
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
84
93
|
onClick: handleClear
|
|
85
|
-
}, t('CLEAR', 'Clear'))
|
|
86
|
-
|
|
87
|
-
}))), (_props$afterComponent = props.afterComponents) === null || _props$afterComponent === void 0 ? void 0 : _props$afterComponent.map(function (AfterComponent, i) {
|
|
94
|
+
}, t('CLEAR', 'Clear'))), /*#__PURE__*/_react.default.createElement(_styles.SearchWrapper, {
|
|
95
|
+
isHome: props.isHome
|
|
96
|
+
}, /*#__PURE__*/_react.default.createElement(_AiOutlineSearch.default, null))), (_props$afterComponent = props.afterComponents) === null || _props$afterComponent === void 0 ? void 0 : _props$afterComponent.map(function (AfterComponent, i) {
|
|
88
97
|
return /*#__PURE__*/_react.default.createElement(AfterComponent, _extends({
|
|
89
98
|
key: i
|
|
90
99
|
}, props));
|
|
@@ -4,38 +4,66 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.SearchIcon = exports.DeleteContent = exports.BusinessSearch = void 0;
|
|
7
|
+
exports.SearchWrapper = exports.SearchIcon = exports.DeleteContent = exports.BusinessSearch = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17;
|
|
10
10
|
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); }
|
|
11
11
|
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; }
|
|
12
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
13
|
-
var BusinessSearch = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n justify-content: flex-end;\n position: relative;\n\n input {\n width: 100%;\n background-position: right 10px center;\n background-repeat: no-repeat;\n background-size: 15px;\n box-sizing: border-box;\n border:none;\n border-bottom: 1px solid ", ";\n border-radius: 0px;\n\n ", "\n\n ", "\n\n @media (min-width: 681px) {\n width: 100%;\n ", "\n }\n }\n"])), function (props) {
|
|
13
|
+
var BusinessSearch = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n justify-content: flex-end;\n position: relative;\n\n input {\n width: 100%;\n background-position: right 10px center;\n background-repeat: no-repeat;\n background-size: 15px;\n box-sizing: border-box;\n border:none;\n border-bottom: 1px solid ", ";\n border-radius: 0px;\n\n ", "\n\n ", "\n\n ", "\n\n @media (min-width: 681px) {\n width: 100%;\n ", "\n ", "\n }\n }\n"])), function (props) {
|
|
14
14
|
return props.theme.colors.borderColor;
|
|
15
15
|
}, function (props) {
|
|
16
16
|
var _props$theme;
|
|
17
17
|
return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.rtl ? (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding-left: 60px;\n "]))) : (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding-right: 60px;\n "])));
|
|
18
18
|
}, function (_ref) {
|
|
19
|
-
var
|
|
20
|
-
|
|
19
|
+
var _theme$business_listi, _theme$business_listi2, _theme$business_listi3;
|
|
20
|
+
var theme = _ref.theme,
|
|
21
|
+
disablePadding = _ref.disablePadding;
|
|
22
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$business_listi = theme.business_listing_view) === null || _theme$business_listi === void 0 ? void 0 : (_theme$business_listi2 = _theme$business_listi.components) === null || _theme$business_listi2 === void 0 ? void 0 : (_theme$business_listi3 = _theme$business_listi2.layout) === null || _theme$business_listi3 === void 0 ? void 0 : _theme$business_listi3.type) === 'mapview' && (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-bottom: none;\n ", "\n "])), function (props) {
|
|
23
|
+
var _props$theme2;
|
|
24
|
+
return (_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 && _props$theme2.rtl ? (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-right: 70px;\n "]))) : (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding-left: 70px;\n "])));
|
|
25
|
+
});
|
|
21
26
|
}, function (_ref2) {
|
|
22
|
-
var
|
|
23
|
-
|
|
27
|
+
var _theme$business_view, _theme$business_view$, _theme$business_view$2, _theme$business_view$3, _theme$business_view$4;
|
|
28
|
+
var isCustomLayout = _ref2.isCustomLayout,
|
|
29
|
+
theme = _ref2.theme;
|
|
30
|
+
return !isCustomLayout && (theme === null || theme === void 0 ? void 0 : (_theme$business_view = theme.business_view) === null || _theme$business_view === void 0 ? void 0 : (_theme$business_view$ = _theme$business_view.components) === null || _theme$business_view$ === void 0 ? void 0 : (_theme$business_view$2 = _theme$business_view$.product_search) === null || _theme$business_view$2 === void 0 ? void 0 : (_theme$business_view$3 = _theme$business_view$2.components) === null || _theme$business_view$3 === void 0 ? void 0 : (_theme$business_view$4 = _theme$business_view$3.layout) === null || _theme$business_view$4 === void 0 ? void 0 : _theme$business_view$4.type) !== 'floating' && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n justify-content: center;\n -webkit-transition: width 0.4s ease-in-out;\n transition: width 0.4s ease-in-out; \n "])));
|
|
31
|
+
}, function (_ref3) {
|
|
32
|
+
var _theme$business_view2, _theme$business_view3, _theme$business_view4, _theme$business_view5, _theme$business_view6;
|
|
33
|
+
var isCustomLayout = _ref3.isCustomLayout,
|
|
34
|
+
theme = _ref3.theme;
|
|
35
|
+
return !isCustomLayout && (theme === null || theme === void 0 ? void 0 : (_theme$business_view2 = theme.business_view) === null || _theme$business_view2 === void 0 ? void 0 : (_theme$business_view3 = _theme$business_view2.components) === null || _theme$business_view3 === void 0 ? void 0 : (_theme$business_view4 = _theme$business_view3.product_search) === null || _theme$business_view4 === void 0 ? void 0 : (_theme$business_view5 = _theme$business_view4.components) === null || _theme$business_view5 === void 0 ? void 0 : (_theme$business_view6 = _theme$business_view5.layout) === null || _theme$business_view6 === void 0 ? void 0 : _theme$business_view6.type) !== 'floating' && (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n width: 200px;\n &:focus {\n width: 50%;\n }\n "])));
|
|
36
|
+
}, function (_ref4) {
|
|
37
|
+
var _theme$business_listi4, _theme$business_listi5, _theme$business_listi6;
|
|
38
|
+
var theme = _ref4.theme,
|
|
39
|
+
disablePadding = _ref4.disablePadding;
|
|
40
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$business_listi4 = theme.business_listing_view) === null || _theme$business_listi4 === void 0 ? void 0 : (_theme$business_listi5 = _theme$business_listi4.components) === null || _theme$business_listi5 === void 0 ? void 0 : (_theme$business_listi6 = _theme$business_listi5.layout) === null || _theme$business_listi6 === void 0 ? void 0 : _theme$business_listi6.type) === 'mapview' && (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n ", "\n "])), disablePadding && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n padding-left: 0;\n "]))));
|
|
24
41
|
});
|
|
25
42
|
exports.BusinessSearch = BusinessSearch;
|
|
26
|
-
var DeleteContent = _styledComponents.default.span(
|
|
27
|
-
var
|
|
28
|
-
|
|
43
|
+
var DeleteContent = _styledComponents.default.span(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n position: absolute;\n font-weight: 300;\n padding: 10px 0;\n color: #333;\n font-size: 14px;\n transform: translate(-30%, 0%);\n border-radius: 25%;\n max-height: 100%;\n ", "\n ", "\n ", "\n span{\n cursor: pointer;\n }\n svg {\n color: #ADB5BD;\n width: 24px;\n height: 24px;\n position: relative;\n bottom: 4px;\n }\n img{\n width: 20px;\n transform: translate(-25%, 0%);\n ", "\n }\n"])), function (_ref5) {
|
|
44
|
+
var _theme$business_listi7, _theme$business_listi8, _theme$business_listi9;
|
|
45
|
+
var theme = _ref5.theme,
|
|
46
|
+
isHome = _ref5.isHome;
|
|
47
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$business_listi7 = theme.business_listing_view) === null || _theme$business_listi7 === void 0 ? void 0 : (_theme$business_listi8 = _theme$business_listi7.components) === null || _theme$business_listi8 === void 0 ? void 0 : (_theme$business_listi9 = _theme$business_listi8.layout) === null || _theme$business_listi9 === void 0 ? void 0 : _theme$business_listi9.type) === 'mapview' && (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n left: ", ";\n "])), isHome ? '40px' : '30px');
|
|
48
|
+
}, function (_ref6) {
|
|
49
|
+
var isClear = _ref6.isClear,
|
|
50
|
+
isHome = _ref6.isHome;
|
|
51
|
+
return isClear && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n left: initial;\n right: 20px;\n "])));
|
|
29
52
|
}, function (props) {
|
|
30
53
|
var _props$theme3;
|
|
31
|
-
return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(
|
|
54
|
+
return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n transform: translate(30%, 0%);\n "])));
|
|
55
|
+
}, function (props) {
|
|
56
|
+
var _props$theme4;
|
|
57
|
+
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n transform: translate(25%, 0%);\n "])));
|
|
32
58
|
});
|
|
33
59
|
exports.DeleteContent = DeleteContent;
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
60
|
+
var SearchWrapper = (0, _styledComponents.default)(DeleteContent)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral([""])));
|
|
61
|
+
exports.SearchWrapper = SearchWrapper;
|
|
62
|
+
var SearchIcon = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n background-image: url(", ");\n background-position: right 10px center;\n background-repeat: no-repeat;\n background-size: 15px;\n background-color: ", ";\n\n"])), function (props) {
|
|
63
|
+
var _props$theme5, _props$theme5$images, _props$theme5$images$;
|
|
64
|
+
return (_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : (_props$theme5$images = _props$theme5.images) === null || _props$theme5$images === void 0 ? void 0 : (_props$theme5$images$ = _props$theme5$images.general) === null || _props$theme5$images$ === void 0 ? void 0 : _props$theme5$images$.searchIcon;
|
|
37
65
|
}, function (props) {
|
|
38
|
-
var _props$
|
|
39
|
-
return (_props$
|
|
66
|
+
var _props$theme6, _props$theme6$colors;
|
|
67
|
+
return (_props$theme6 = props.theme) === null || _props$theme6 === void 0 ? void 0 : (_props$theme6$colors = _props$theme6.colors) === null || _props$theme6$colors === void 0 ? void 0 : _props$theme6$colors.backgroundPage;
|
|
40
68
|
});
|
|
41
69
|
exports.SearchIcon = SearchIcon;
|
package/index-template.js
CHANGED
|
@@ -13,6 +13,7 @@ import smoothscroll from 'smoothscroll-polyfill'
|
|
|
13
13
|
/**
|
|
14
14
|
* Theme images
|
|
15
15
|
*/
|
|
16
|
+
import chewLogo from './template/assets/images/chew_logo.png'
|
|
16
17
|
import logotype from './template/assets/images/logotype.svg'
|
|
17
18
|
import logotypeInvert from './template/assets/images/logotype-invert.svg'
|
|
18
19
|
import isotype from './template/assets/images/isotype.svg'
|
|
@@ -107,7 +108,8 @@ const logos = {
|
|
|
107
108
|
logotype,
|
|
108
109
|
logotypeInvert,
|
|
109
110
|
isotype,
|
|
110
|
-
isotypeInvert
|
|
111
|
+
isotypeInvert,
|
|
112
|
+
chewLogo
|
|
111
113
|
}
|
|
112
114
|
|
|
113
115
|
theme.images = {
|