ordering-ui-external 2.6.5 → 2.6.8
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.ba64d5c9c7490676feb5.js +1 -0
- package/_bundles/{5.ordering-ui.80bc71775c11b08c37b2.js → 5.ordering-ui.ba64d5c9c7490676feb5.js} +1 -1
- package/_bundles/{7.ordering-ui.80bc71775c11b08c37b2.js → 7.ordering-ui.ba64d5c9c7490676feb5.js} +2 -2
- package/_bundles/ordering-ui.ba64d5c9c7490676feb5.js +2 -0
- package/_modules/components/LanguageSelector/index.js +1 -0
- package/_modules/components/OrderTypeSelectorHeader/index.js +3 -1
- package/_modules/components/SmartAppBanner/index.js +5 -2
- package/_modules/contexts/ThemeContext/index.js +1 -1
- package/_modules/styles/Select/index.js +14 -2
- package/_modules/styles/Selects/index.js +11 -8
- package/_modules/themes/callcenterOriginal/src/components/Orders/OrderMetaFields/index.js +1 -1
- package/_modules/themes/eight/src/components/AddressForm/index.js +4 -1
- package/_modules/themes/eight/src/components/SingleProductCard/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +168 -0
- package/_modules/themes/five/src/components/BusinessBasicInformation/SearchComponent.js +39 -0
- package/_modules/themes/five/src/components/BusinessBasicInformation/SocialNetWork.js +19 -0
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +35 -156
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +45 -35
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +1 -1
- package/_modules/themes/five/src/components/CardForm/index.js +16 -3
- package/_modules/themes/five/src/components/CardForm/styles.js +13 -9
- package/_modules/themes/five/src/components/CardFormCustom/cardUtils.js +102 -0
- package/_modules/themes/five/src/components/CardFormCustom/index.js +148 -0
- package/_modules/themes/five/src/components/CardFormCustom/styles.js +16 -0
- package/_modules/themes/five/src/components/CartPopover/styles.js +1 -1
- package/_modules/themes/five/src/components/Checkout/index.js +31 -22
- package/_modules/themes/five/src/components/LanguageSelector/index.js +4 -1
- package/_modules/themes/five/src/components/LoginForm/index.js +11 -8
- package/_modules/themes/five/src/components/Modal/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderContextUI/index.js +13 -1
- package/_modules/themes/five/src/components/OrderDetails/OrderHistory.js +7 -3
- package/_modules/themes/five/src/components/OrderDetails/index.js +4 -2
- package/_modules/themes/five/src/components/PaymentOptionCard/index.js +84 -0
- package/_modules/themes/five/src/components/PaymentOptionStripe/index.js +48 -22
- package/_modules/themes/five/src/components/PaymentOptionStripe/styles.js +3 -1
- package/_modules/themes/five/src/components/PaymentOptions/index.js +46 -24
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +1 -1
- package/_modules/themes/five/src/components/SearchProducts/styles.js +1 -1
- package/_modules/themes/five/src/components/UserDetails/index.js +1 -1
- package/_modules/themes/five/src/components/UserPopover/styles.js +1 -1
- package/_modules/themes/five/src/styles/Select/index.js +4 -2
- package/_modules/themes/five/src/styles/Selects/index.js +7 -4
- package/_modules/themes/four/src/components/LoginForm/index.js +1 -1
- package/_modules/themes/pwa/src/components/MomentPopover/styles.js +1 -1
- package/_modules/themes/seven/src/components/ProductForm/productForm.js +3 -1
- package/_modules/themes/six/src/components/BusinessesListing/index.js +1 -1
- package/index.html +1 -1
- package/package.json +4 -2
- package/src/components/LanguageSelector/index.js +1 -0
- package/src/components/OrderTypeSelectorHeader/index.js +3 -1
- package/src/components/SmartAppBanner/index.js +4 -2
- package/src/contexts/ThemeContext/index.js +1 -1
- package/src/styles/Select/index.js +11 -2
- package/src/styles/Selects/index.js +1 -1
- package/src/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +230 -0
- package/src/themes/five/src/components/BusinessBasicInformation/SearchComponent.js +40 -0
- package/src/themes/five/src/components/BusinessBasicInformation/SocialNetWork.js +10 -0
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +39 -247
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +14 -4
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +1 -1
- package/src/themes/five/src/components/CardForm/index.js +25 -4
- package/src/themes/five/src/components/CardForm/styles.js +35 -0
- package/src/themes/five/src/components/CardFormCustom/cardUtils.js +111 -0
- package/src/themes/five/src/components/CardFormCustom/index.js +161 -0
- package/src/themes/five/src/components/CardFormCustom/styles.js +20 -0
- package/src/themes/five/src/components/CartPopover/styles.js +1 -1
- package/src/themes/five/src/components/Checkout/index.js +34 -25
- package/src/themes/five/src/components/LanguageSelector/index.js +2 -1
- package/src/themes/five/src/components/LoginForm/index.js +6 -4
- package/src/themes/five/src/components/Modal/styles.js +1 -0
- package/src/themes/five/src/components/OrderContextUI/index.js +10 -3
- package/src/themes/five/src/components/OrderDetails/OrderHistory.js +4 -3
- package/src/themes/five/src/components/OrderDetails/index.js +1 -1
- package/src/themes/five/src/components/PaymentOptionCard/index.js +70 -0
- package/src/themes/five/src/components/PaymentOptionStripe/index.js +46 -20
- package/src/themes/five/src/components/PaymentOptionStripe/styles.js +6 -1
- package/src/themes/five/src/components/PaymentOptions/index.js +28 -3
- package/src/themes/five/src/components/ProductForm/index.js +0 -1
- package/src/themes/five/src/components/RenderProductsLayout/index.js +1 -1
- package/src/themes/five/src/components/SearchProducts/styles.js +1 -1
- package/src/themes/five/src/components/UserDetails/index.js +1 -1
- package/src/themes/five/src/components/UserPopover/styles.js +1 -1
- package/src/themes/five/src/styles/Select/index.js +3 -2
- package/src/themes/five/src/styles/Selects/index.js +1 -1
- package/src/themes/pwa/src/components/MomentPopover/styles.js +4 -1
- package/template/theme.json +3 -1
- package/_bundles/0.ordering-ui.80bc71775c11b08c37b2.js +0 -1
- package/_bundles/ordering-ui.80bc71775c11b08c37b2.js +0 -2
- /package/_bundles/{1.ordering-ui.80bc71775c11b08c37b2.js → 1.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{2.ordering-ui.80bc71775c11b08c37b2.js → 2.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{4.ordering-ui.80bc71775c11b08c37b2.js → 4.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{6.ordering-ui.80bc71775c11b08c37b2.js → 6.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{7.ordering-ui.80bc71775c11b08c37b2.js.LICENSE.txt → 7.ordering-ui.ba64d5c9c7490676feb5.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.80bc71775c11b08c37b2.js → 8.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{9.ordering-ui.80bc71775c11b08c37b2.js → 9.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{ordering-ui.80bc71775c11b08c37b2.js.LICENSE.txt → ordering-ui.ba64d5c9c7490676feb5.js.LICENSE.txt} +0 -0
|
@@ -34,6 +34,7 @@ var LanguageSelectorUI = function LanguageSelectorUI(props) {
|
|
|
34
34
|
return a.content > b.content ? 1 : b.content > a.content ? -1 : 0;
|
|
35
35
|
});
|
|
36
36
|
return _languages && _languages.length > 1 ? /*#__PURE__*/_react.default.createElement(_Select.Select, {
|
|
37
|
+
zIndex: 10002,
|
|
37
38
|
options: languagesState !== null && languagesState !== void 0 && languagesState.loading ? defaultLanguages : _languages,
|
|
38
39
|
defaultValue: languagesState !== null && languagesState !== void 0 && languagesState.loading ? defaultCurrentLanguage : currentLanguage,
|
|
39
40
|
onChange: function onChange(languageId) {
|
|
@@ -31,9 +31,11 @@ var OrderTypeSelectorHeaderUI = function OrderTypeSelectorHeaderUI(props) {
|
|
|
31
31
|
typeSelected = props.typeSelected,
|
|
32
32
|
defaultValue = props.defaultValue,
|
|
33
33
|
configTypes = props.configTypes,
|
|
34
|
-
orderTypes = props.orderTypes
|
|
34
|
+
orderTypes = props.orderTypes,
|
|
35
|
+
autoCloseWhenScroll = props.autoCloseWhenScroll;
|
|
35
36
|
var defaultType = configTypes !== null && configTypes !== void 0 && configTypes.includes(typeSelected) ? null : configTypes === null || configTypes === void 0 ? void 0 : configTypes[0];
|
|
36
37
|
return /*#__PURE__*/_react.default.createElement(_styles.OrderTypeWrapper, null, /*#__PURE__*/_react.default.createElement(_Select.Select, {
|
|
38
|
+
autoCloseWhenScroll: autoCloseWhenScroll,
|
|
37
39
|
options: configTypes ? orderTypes.filter(function (type) {
|
|
38
40
|
return configTypes === null || configTypes === void 0 ? void 0 : configTypes.includes(type.value);
|
|
39
41
|
}) : orderTypes,
|
|
@@ -8,6 +8,7 @@ exports.default = exports.SmartAppBanner = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
10
10
|
var _reactSmartbanner = _interopRequireDefault(require("react-smartbanner"));
|
|
11
|
+
var _styledComponents = require("styled-components");
|
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
13
|
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; }
|
|
13
14
|
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; }
|
|
@@ -21,12 +22,14 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
21
22
|
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; } }
|
|
22
23
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
24
|
var SmartAppBanneUI = function SmartAppBanneUI(props) {
|
|
25
|
+
var _theme$defaultLanguag, _theme$defaultLanguag2;
|
|
24
26
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
25
27
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
26
28
|
t = _useLanguage2[1];
|
|
29
|
+
var theme = (0, _styledComponents.useTheme)();
|
|
27
30
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactSmartbanner.default, {
|
|
28
|
-
title: t('MOBILE_APPNAME', 'Ordering app'),
|
|
29
|
-
author: t('MOBILE_APPNAME_AUTHOR', 'Ordering, Inc.'),
|
|
31
|
+
title: t('MOBILE_APPNAME', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag = theme.defaultLanguages) === null || _theme$defaultLanguag === void 0 ? void 0 : _theme$defaultLanguag.MOBILE_APPNAME) || 'Ordering app'),
|
|
32
|
+
author: t('MOBILE_APPNAME_AUTHOR', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag2 = theme.defaultLanguages) === null || _theme$defaultLanguag2 === void 0 ? void 0 : _theme$defaultLanguag2.MOBILE_APPNAME_AUTHOR) || 'Ordering, Inc.'),
|
|
30
33
|
daysHidden: 7,
|
|
31
34
|
daysReminder: 15,
|
|
32
35
|
button: t('VIEW', 'View'),
|
|
@@ -52,7 +52,7 @@ var ThemeProvider = function ThemeProvider(_ref) {
|
|
|
52
52
|
return theme.colors.colorPage;
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
-
var GlobalStyle = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n @media (min-width: 578px) {\n /** Mozilla scrollbar*/\n * {\n scrollbar-color: #CCC !important;\n scrollbar-width: thin !important;\n }\n /** Scrollbar for browser based on webkit */\n ::-webkit-scrollbar {\n width: 6px;\n height: 0px;\n }\n ::-webkit-scrollbar-thumb {\n background: #CCCCCC;\n }\n ::-webkit-scrollbar-thumb:hover {\n background: #AFAFAF;\n }\n ::-webkit-scrollbar-thumb:active {\n background: #6b6b6b;\n }\n ::-webkit-scrollbar-track {\n background: rgba(204, 204, 204, 0.3);\n }\n #___reactour {\n div{\n color: rgba(0,0,0,0.5);\n button svg {\n display: none;\n }\n }\n }\n }\n body {\n font-family: '", "', sans-serif;\n margin: 0;\n background-color: ", ";\n color: ", ";\n direction: ltr;\n ", "\n -webkit-overflow-scrolling: auto;\n }\n input, textarea, button {\n font-family: inherit;\n }\n h1,p,span {\n ", "\n }\n .popup-backdrop {\n background-color: rgba(0, 0, 0, 0.4);\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index:
|
|
55
|
+
var GlobalStyle = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n @media (min-width: 578px) {\n /** Mozilla scrollbar*/\n * {\n scrollbar-color: #CCC !important;\n scrollbar-width: thin !important;\n }\n /** Scrollbar for browser based on webkit */\n ::-webkit-scrollbar {\n width: 6px;\n height: 0px;\n }\n ::-webkit-scrollbar-thumb {\n background: #CCCCCC;\n }\n ::-webkit-scrollbar-thumb:hover {\n background: #AFAFAF;\n }\n ::-webkit-scrollbar-thumb:active {\n background: #6b6b6b;\n }\n ::-webkit-scrollbar-track {\n background: rgba(204, 204, 204, 0.3);\n }\n #___reactour {\n div{\n color: rgba(0,0,0,0.5);\n button svg {\n display: none;\n }\n }\n }\n }\n body {\n font-family: '", "', sans-serif;\n margin: 0;\n background-color: ", ";\n color: ", ";\n direction: ltr;\n ", "\n -webkit-overflow-scrolling: auto;\n }\n input, textarea, button {\n font-family: inherit;\n }\n h1,p,span {\n ", "\n }\n .popup-backdrop {\n background-color: rgba(0, 0, 0, 0.4);\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 20002;\n }\n .popup-component {\n background-color: rgba(0, 0, 0, 0.3);\n display: flex;\n justify-content: center;\n align-items: center;\n }\n "])), ((_theme$fonts$primary = theme.fonts.primary) === null || _theme$fonts$primary === void 0 ? void 0 : _theme$fonts$primary.name) || 'Helvetica', theme.colors.backgroundPage, getThemeColor(), theme.rtl && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n direction: rtl;\n "]))), props.isDarkTextColor && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", "\n "])), theme.colors.darkTextColor));
|
|
56
56
|
(0, _react.useEffect)(function () {
|
|
57
57
|
var fonts = Object.entries(theme.fonts || {});
|
|
58
58
|
fonts.forEach(function (_ref2) {
|
|
@@ -24,7 +24,9 @@ var Select = function Select(props) {
|
|
|
24
24
|
defaultValue = props.defaultValue,
|
|
25
25
|
onChange = props.onChange,
|
|
26
26
|
notAsync = props.notAsync,
|
|
27
|
-
notReload = props.notReload
|
|
27
|
+
notReload = props.notReload,
|
|
28
|
+
autoCloseWhenScroll = props.autoCloseWhenScroll,
|
|
29
|
+
zIndex = props.zIndex;
|
|
28
30
|
var isHome = window.location.pathname === '/' || window.location.pathname === '/home';
|
|
29
31
|
var _useState = (0, _react.useState)(false),
|
|
30
32
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -64,9 +66,18 @@ var Select = function Select(props) {
|
|
|
64
66
|
}
|
|
65
67
|
};
|
|
66
68
|
(0, _react.useEffect)(function () {
|
|
69
|
+
var handleCloseSelect = function handleCloseSelect() {
|
|
70
|
+
return setOpen(false);
|
|
71
|
+
};
|
|
67
72
|
document.addEventListener('mouseup', closeSelect);
|
|
68
73
|
document.addEventListener('keydown', handleKeyDown);
|
|
74
|
+
if (autoCloseWhenScroll) {
|
|
75
|
+
window.addEventListener('scroll', handleCloseSelect);
|
|
76
|
+
}
|
|
69
77
|
return function () {
|
|
78
|
+
if (autoCloseWhenScroll) {
|
|
79
|
+
window.removeEventListener('scroll', handleCloseSelect);
|
|
80
|
+
}
|
|
70
81
|
document.removeEventListener('mouseup', closeSelect);
|
|
71
82
|
document.removeEventListener('keydown', handleKeyDown);
|
|
72
83
|
};
|
|
@@ -96,7 +107,8 @@ var Select = function Select(props) {
|
|
|
96
107
|
}, !selectedOption && /*#__PURE__*/_react.default.createElement(_Selects.Selected, null, /*#__PURE__*/_react.default.createElement(_Selects.Header, null, placeholder || ''), /*#__PURE__*/_react.default.createElement(_Selects.Chevron, null, /*#__PURE__*/_react.default.createElement(_BsChevronDown.default, null))), selectedOption && /*#__PURE__*/_react.default.createElement(_Selects.Selected, null, /*#__PURE__*/_react.default.createElement(_Selects.Header, null, selectedOption.showOnSelected || selectedOption.content), /*#__PURE__*/_react.default.createElement(_Selects.Chevron, null, /*#__PURE__*/_react.default.createElement(_BsChevronDown.default, null))), open && options && /*#__PURE__*/_react.default.createElement(_Selects.Options, {
|
|
97
108
|
id: "list",
|
|
98
109
|
position: "right",
|
|
99
|
-
ref: dropdownReference
|
|
110
|
+
ref: dropdownReference,
|
|
111
|
+
zIndex: zIndex
|
|
100
112
|
}, options.map(function (option) {
|
|
101
113
|
return /*#__PURE__*/_react.default.createElement(_Selects.Option, {
|
|
102
114
|
id: "item",
|
|
@@ -21,14 +21,17 @@ var Option = _styledComponents.default.div(_templateObject || (_templateObject =
|
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
exports.Option = Option;
|
|
24
|
-
var Options = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n background-color: #CCC;\n margin-top: 7px;\n z-index:
|
|
25
|
-
var
|
|
24
|
+
var Options = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n background-color: #CCC;\n margin-top: 7px;\n z-index: ", ";\n border-width: 1px;\n border-style: solid;\n border-color: #CCC;\n border-radius: 15px;\n overflow: hidden;\n ", "\n ", "\n"])), function (_ref2) {
|
|
25
|
+
var zIndex = _ref2.zIndex;
|
|
26
|
+
return zIndex || 10000;
|
|
27
|
+
}, function (_ref3) {
|
|
28
|
+
var position = _ref3.position;
|
|
26
29
|
return (position === null || position === void 0 ? void 0 : position.toLowerCase()) === 'left' && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n left: 0;\n margin-left: -1px;\n ", "\n "])), function (props) {
|
|
27
30
|
var _props$theme2;
|
|
28
31
|
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-right: -1px;\n margin-left: 0px;\n right: 0;\n left: initial\n "])));
|
|
29
32
|
});
|
|
30
|
-
}, function (
|
|
31
|
-
var position =
|
|
33
|
+
}, function (_ref4) {
|
|
34
|
+
var position = _ref4.position;
|
|
32
35
|
return (position === null || position === void 0 ? void 0 : position.toLowerCase()) === 'right' && (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n right: 0;\n margin-right: -1px;\n ", "\n "])), function (props) {
|
|
33
36
|
var _props$theme3;
|
|
34
37
|
return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin-left: -1px;\n margin-right: 0px;\n left: 0;\n right: initial;\n "])));
|
|
@@ -37,11 +40,11 @@ var Options = _styledComponents.default.div(_templateObject5 || (_templateObject
|
|
|
37
40
|
exports.Options = Options;
|
|
38
41
|
var Selected = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n padding-left: 9px;\n padding-right: 9px;\n font-size: 13px;\n cursor: pointer;\n position: relative;\n display: flex;\n align-items: center;\n flex: 1;\n white-space: nowrap;\n text-overflow: ellipsis;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n z-index: 11;\n @media (min-width: 381px) {\n padding-left: 15px;\n padding-right: 15px;\n }\n"])));
|
|
39
42
|
exports.Selected = Selected;
|
|
40
|
-
var Select = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: inline-block;\n height: 34px;\n border-radius: 34px;\n line-height: 34px;\n border-width: 1px;\n border-style: solid;\n border-color: #CCC;\n background-color: ", " !important;\n color: ", " !important;\n position: relative;\n ", "\n ", "\n"])), function (
|
|
41
|
-
var isHome = _ref4.isHome;
|
|
42
|
-
return isHome ? 'rgba(247,247,247,0.3)' : '#CCC';
|
|
43
|
-
}, function (_ref5) {
|
|
43
|
+
var Select = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: inline-block;\n height: 34px;\n border-radius: 34px;\n line-height: 34px;\n border-width: 1px;\n border-style: solid;\n border-color: #CCC;\n background-color: ", " !important;\n color: ", " !important;\n position: relative;\n ", "\n ", "\n"])), function (_ref5) {
|
|
44
44
|
var isHome = _ref5.isHome;
|
|
45
|
+
return isHome ? 'rgba(247,247,247,0.3)' : '#CCC';
|
|
46
|
+
}, function (_ref6) {
|
|
47
|
+
var isHome = _ref6.isHome;
|
|
45
48
|
return isHome ? '#FFF' : '#333';
|
|
46
49
|
}, function (props) {
|
|
47
50
|
return props.disabled && (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n pointer-events: none;\n "])));
|
|
@@ -33,7 +33,7 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
|
|
|
33
33
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
34
34
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
35
35
|
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; } }
|
|
36
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
36
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import { Select } from '../../../styles/Select/FirstSelect'
|
|
37
37
|
var MetaFieldsUI = function MetaFieldsUI(props) {
|
|
38
38
|
var orderId = props.orderId,
|
|
39
39
|
metaFieldsList = props.metaFieldsList,
|
|
@@ -35,7 +35,10 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
|
|
|
35
35
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
36
36
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
37
37
|
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; } }
|
|
38
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
38
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import FaHome from '@meronex/icons/fa/FaHome'
|
|
39
|
+
// import FaPlus from '@meronex/icons/fa/FaPlus'
|
|
40
|
+
// import FaRegBuilding from '@meronex/icons/fa/FaRegBuilding'
|
|
41
|
+
// import FaRegHeart from '@meronex/icons/fa/FaRegHeart'
|
|
39
42
|
var inputNames = [{
|
|
40
43
|
name: 'address',
|
|
41
44
|
code: 'Address'
|
|
@@ -17,7 +17,7 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
|
|
|
17
17
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
18
18
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
19
19
|
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; } }
|
|
20
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import FaChevronRight from '@meronex/icons/fa/FaChevronRight'
|
|
21
21
|
var SingleProductCard = function SingleProductCard(props) {
|
|
22
22
|
var _orderState$carts, _cart$products, _cart$products2, _props$beforeElements, _props$beforeComponen, _theme$images, _theme$images$dummies, _props$afterComponent, _props$afterElements;
|
|
23
23
|
var businessId = props.businessId,
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BusinessInfoComponent = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _styles = require("./styles");
|
|
9
|
+
var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
|
|
10
|
+
var _utils = require("../../../../../utils");
|
|
11
|
+
var _useWindowSize = require("../../../../../hooks/useWindowSize");
|
|
12
|
+
var _styledComponents = require("styled-components");
|
|
13
|
+
var _SocialNetWork = require("./SocialNetWork");
|
|
14
|
+
var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
15
|
+
var _orderingComponentsExternal = require("ordering-components-external");
|
|
16
|
+
var _SearchComponent = require("./SearchComponent");
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
19
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
20
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
21
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
22
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
24
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
25
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
26
|
+
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; } }
|
|
27
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
28
|
+
var BusinessInfoComponent = function BusinessInfoComponent(props) {
|
|
29
|
+
var _theme$business_view, _theme$business_view$, _theme$business_view$2, _theme$business_view$3, _theme$business_view$4, _theme$business_view$5, _theme$business_view$6, _theme$business_view2, _theme$business_view3, _theme$business_view4, _theme$business_view5, _theme$business_view6, _theme$business_view7, _theme$business_view8, _theme$business_view9, _theme$business_view10, _theme$business_view11, _theme$business_view12, _theme$business_view13, _theme$business_view14, _theme$business_view15, _theme$business_view16, _theme$business_view17, _theme$business_view18, _theme$business_view19, _theme$business_view20, _theme$business_view21, _theme$business_view22, _theme$business_view23, _theme$business_view24, _theme$business_view25, _theme$business_view26, _theme$business_view27, _theme$business_view28, _theme$business_view29, _theme$business_view30, _theme$business_view31, _theme$business_view32, _theme$business_view33, _theme$business_view34, _theme$business_view35, _theme$business_view36, _theme$business_view37, _theme$business_view38, _theme$business_view39, _configs$preorder_sta, _business$ribbon, _business$ribbon2, _business$ribbon3, _business$ribbon4, _business$ribbon5, _business$ribbon6, _business$ribbon7, _business$city, _business$city2, _orderState$options, _business$reviews, _business$reviews2, _categoryState$produc, _business$professiona;
|
|
30
|
+
var isChew = props.isChew,
|
|
31
|
+
loading = props.loading,
|
|
32
|
+
business = props.business,
|
|
33
|
+
isInfoShrunken = props.isInfoShrunken,
|
|
34
|
+
isCustomerMode = props.isCustomerMode,
|
|
35
|
+
setIsPreOrder = props.setIsPreOrder,
|
|
36
|
+
setIsBusinessReviews = props.setIsBusinessReviews,
|
|
37
|
+
categoryState = props.categoryState,
|
|
38
|
+
searchValue = props.searchValue,
|
|
39
|
+
errorQuantityProducts = props.errorQuantityProducts,
|
|
40
|
+
setOpenSearchProducts = props.setOpenSearchProducts,
|
|
41
|
+
handleChangeSortBy = props.handleChangeSortBy,
|
|
42
|
+
sortByValue = props.sortByValue,
|
|
43
|
+
sortByOptions = props.sortByOptions,
|
|
44
|
+
isCustomLayout = props.isCustomLayout;
|
|
45
|
+
var theme = (0, _styledComponents.useTheme)();
|
|
46
|
+
var _useOrder = (0, _orderingComponentsExternal.useOrder)(),
|
|
47
|
+
_useOrder2 = _slicedToArray(_useOrder, 1),
|
|
48
|
+
orderState = _useOrder2[0];
|
|
49
|
+
var _useUtils = (0, _orderingComponentsExternal.useUtils)(),
|
|
50
|
+
_useUtils2 = _slicedToArray(_useUtils, 1),
|
|
51
|
+
_useUtils2$ = _useUtils2[0],
|
|
52
|
+
parsePrice = _useUtils2$.parsePrice,
|
|
53
|
+
parseDistance = _useUtils2$.parseDistance;
|
|
54
|
+
var _useConfig = (0, _orderingComponentsExternal.useConfig)(),
|
|
55
|
+
_useConfig2 = _slicedToArray(_useConfig, 1),
|
|
56
|
+
configs = _useConfig2[0].configs;
|
|
57
|
+
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
58
|
+
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
59
|
+
t = _useLanguage2[1];
|
|
60
|
+
var windowSize = (0, _useWindowSize.useWindowSize)();
|
|
61
|
+
var hideDeliveryFee = 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$.header) === 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.business) === null || _theme$business_view$4 === void 0 ? void 0 : (_theme$business_view$5 = _theme$business_view$4.components) === null || _theme$business_view$5 === void 0 ? void 0 : (_theme$business_view$6 = _theme$business_view$5.fee) === null || _theme$business_view$6 === void 0 ? void 0 : _theme$business_view$6.hidden;
|
|
62
|
+
var hideTime = 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.header) === 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.business) === null || _theme$business_view6 === void 0 ? void 0 : (_theme$business_view7 = _theme$business_view6.components) === null || _theme$business_view7 === void 0 ? void 0 : (_theme$business_view8 = _theme$business_view7.time) === null || _theme$business_view8 === void 0 ? void 0 : _theme$business_view8.hidden;
|
|
63
|
+
var hideReviews = theme === null || theme === void 0 ? void 0 : (_theme$business_view9 = theme.business_view) === null || _theme$business_view9 === void 0 ? void 0 : (_theme$business_view10 = _theme$business_view9.components) === null || _theme$business_view10 === void 0 ? void 0 : (_theme$business_view11 = _theme$business_view10.header) === null || _theme$business_view11 === void 0 ? void 0 : (_theme$business_view12 = _theme$business_view11.components) === null || _theme$business_view12 === void 0 ? void 0 : (_theme$business_view13 = _theme$business_view12.business) === null || _theme$business_view13 === void 0 ? void 0 : (_theme$business_view14 = _theme$business_view13.components) === null || _theme$business_view14 === void 0 ? void 0 : (_theme$business_view15 = _theme$business_view14.reviews) === null || _theme$business_view15 === void 0 ? void 0 : _theme$business_view15.hidden;
|
|
64
|
+
var hideReviewsPopup = theme === null || theme === void 0 ? void 0 : (_theme$business_view16 = theme.business_view) === null || _theme$business_view16 === void 0 ? void 0 : (_theme$business_view17 = _theme$business_view16.components) === null || _theme$business_view17 === void 0 ? void 0 : (_theme$business_view18 = _theme$business_view17.header) === null || _theme$business_view18 === void 0 ? void 0 : (_theme$business_view19 = _theme$business_view18.components) === null || _theme$business_view19 === void 0 ? void 0 : (_theme$business_view20 = _theme$business_view19.reviews) === null || _theme$business_view20 === void 0 ? void 0 : _theme$business_view20.hidden;
|
|
65
|
+
var hideDistance = theme === null || theme === void 0 ? void 0 : (_theme$business_view21 = theme.business_view) === null || _theme$business_view21 === void 0 ? void 0 : (_theme$business_view22 = _theme$business_view21.components) === null || _theme$business_view22 === void 0 ? void 0 : (_theme$business_view23 = _theme$business_view22.header) === null || _theme$business_view23 === void 0 ? void 0 : (_theme$business_view24 = _theme$business_view23.components) === null || _theme$business_view24 === void 0 ? void 0 : (_theme$business_view25 = _theme$business_view24.business) === null || _theme$business_view25 === void 0 ? void 0 : (_theme$business_view26 = _theme$business_view25.components) === null || _theme$business_view26 === void 0 ? void 0 : (_theme$business_view27 = _theme$business_view26.distance) === null || _theme$business_view27 === void 0 ? void 0 : _theme$business_view27.hidden;
|
|
66
|
+
var hideCity = theme === null || theme === void 0 ? void 0 : (_theme$business_view28 = theme.business_view) === null || _theme$business_view28 === void 0 ? void 0 : (_theme$business_view29 = _theme$business_view28.components) === null || _theme$business_view29 === void 0 ? void 0 : (_theme$business_view30 = _theme$business_view29.header) === null || _theme$business_view30 === void 0 ? void 0 : (_theme$business_view31 = _theme$business_view30.components) === null || _theme$business_view31 === void 0 ? void 0 : (_theme$business_view32 = _theme$business_view31.business) === null || _theme$business_view32 === void 0 ? void 0 : (_theme$business_view33 = _theme$business_view32.components) === null || _theme$business_view33 === void 0 ? void 0 : (_theme$business_view34 = _theme$business_view33.city) === null || _theme$business_view34 === void 0 ? void 0 : _theme$business_view34.hidden;
|
|
67
|
+
var layoutsWithOldSearch = ['starbucks', 'old', 'floating'];
|
|
68
|
+
var hideSearch = layoutsWithOldSearch.includes(theme === null || theme === void 0 ? void 0 : (_theme$business_view35 = theme.business_view) === null || _theme$business_view35 === void 0 ? void 0 : (_theme$business_view36 = _theme$business_view35.components) === null || _theme$business_view36 === void 0 ? void 0 : (_theme$business_view37 = _theme$business_view36.product_search) === null || _theme$business_view37 === void 0 ? void 0 : (_theme$business_view38 = _theme$business_view37.components) === null || _theme$business_view38 === void 0 ? void 0 : (_theme$business_view39 = _theme$business_view38.layout) === null || _theme$business_view39 === void 0 ? void 0 : _theme$business_view39.type);
|
|
69
|
+
var isPreOrderSetting = (configs === null || configs === void 0 ? void 0 : (_configs$preorder_sta = configs.preorder_status_enabled) === null || _configs$preorder_sta === void 0 ? void 0 : _configs$preorder_sta.value) === '1';
|
|
70
|
+
var searchComponentProps = {
|
|
71
|
+
setOpenSearchProducts: setOpenSearchProducts,
|
|
72
|
+
handleChangeSortBy: handleChangeSortBy,
|
|
73
|
+
sortByValue: sortByValue,
|
|
74
|
+
sortByOptions: sortByOptions
|
|
75
|
+
};
|
|
76
|
+
return /*#__PURE__*/_react.default.createElement(_styles.BusinessInfoContainer, {
|
|
77
|
+
isChew: isChew,
|
|
78
|
+
isFlexEnd: windowSize.width >= 768
|
|
79
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.BusinessInfoContent, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessInfo, {
|
|
80
|
+
className: "info"
|
|
81
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.BusinessInfoItem, {
|
|
82
|
+
isInfoShrunken: isInfoShrunken
|
|
83
|
+
}, !loading ? /*#__PURE__*/_react.default.createElement(_styles.TitleWrapper, {
|
|
84
|
+
isCustomLayout: isCustomLayout
|
|
85
|
+
}, /*#__PURE__*/_react.default.createElement("h2", {
|
|
86
|
+
className: "bold",
|
|
87
|
+
id: "business_name"
|
|
88
|
+
}, business === null || business === void 0 ? void 0 : business.name), (business === null || business === void 0 ? void 0 : (_business$ribbon = business.ribbon) === null || _business$ribbon === void 0 ? void 0 : _business$ribbon.enabled) && /*#__PURE__*/_react.default.createElement(_styles.RibbonBox, {
|
|
89
|
+
bgColor: business === null || business === void 0 ? void 0 : (_business$ribbon2 = business.ribbon) === null || _business$ribbon2 === void 0 ? void 0 : _business$ribbon2.color,
|
|
90
|
+
colorText: (0, _utils.lightenDarkenColor)(business === null || business === void 0 ? void 0 : (_business$ribbon3 = business.ribbon) === null || _business$ribbon3 === void 0 ? void 0 : _business$ribbon3.color),
|
|
91
|
+
borderRibbon: (0, _utils.lightenDarkenColor)(business === null || business === void 0 ? void 0 : (_business$ribbon4 = business.ribbon) === null || _business$ribbon4 === void 0 ? void 0 : _business$ribbon4.color),
|
|
92
|
+
isRoundRect: (business === null || business === void 0 ? void 0 : (_business$ribbon5 = business.ribbon) === null || _business$ribbon5 === void 0 ? void 0 : _business$ribbon5.shape) === (_utils.shape === null || _utils.shape === void 0 ? void 0 : _utils.shape.rectangleRound),
|
|
93
|
+
isCapsule: (business === null || business === void 0 ? void 0 : (_business$ribbon6 = business.ribbon) === null || _business$ribbon6 === void 0 ? void 0 : _business$ribbon6.shape) === (_utils.shape === null || _utils.shape === void 0 ? void 0 : _utils.shape.capsuleShape)
|
|
94
|
+
}, business === null || business === void 0 ? void 0 : (_business$ribbon7 = business.ribbon) === null || _business$ribbon7 === void 0 ? void 0 : _business$ribbon7.text)) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
95
|
+
width: isCustomerMode ? 100 : 150,
|
|
96
|
+
height: isCustomerMode ? 35 : 'auto'
|
|
97
|
+
}), typeof hideCity !== 'undefined' && !hideCity && (business === null || business === void 0 ? void 0 : (_business$city = business.city) === null || _business$city === void 0 ? void 0 : _business$city.name) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !loading ? /*#__PURE__*/_react.default.createElement("p", {
|
|
98
|
+
className: "type"
|
|
99
|
+
}, business === null || business === void 0 ? void 0 : (_business$city2 = business.city) === null || _business$city2 === void 0 ? void 0 : _business$city2.name) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
100
|
+
width: isCustomerMode ? 100 : 150
|
|
101
|
+
})), !loading ? /*#__PURE__*/_react.default.createElement(_styles.SocialList, null, (business === null || business === void 0 ? void 0 : business.facebook_profile) && /*#__PURE__*/_react.default.createElement(_SocialNetWork.SocialNetWork, {
|
|
102
|
+
url: business === null || business === void 0 ? void 0 : business.facebook_profile,
|
|
103
|
+
icon: /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Facebook, null)
|
|
104
|
+
}), (business === null || business === void 0 ? void 0 : business.instagram_profile) && /*#__PURE__*/_react.default.createElement(_SocialNetWork.SocialNetWork, {
|
|
105
|
+
url: business === null || business === void 0 ? void 0 : business.instagram_profile,
|
|
106
|
+
icon: /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Instagram, null)
|
|
107
|
+
}), (business === null || business === void 0 ? void 0 : business.tiktok_profile) && /*#__PURE__*/_react.default.createElement(_SocialNetWork.SocialNetWork, {
|
|
108
|
+
url: business === null || business === void 0 ? void 0 : business.tiktok_profile,
|
|
109
|
+
icon: /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Tiktok, null)
|
|
110
|
+
}), (business === null || business === void 0 ? void 0 : business.pinterest_profile) && /*#__PURE__*/_react.default.createElement(_SocialNetWork.SocialNetWork, {
|
|
111
|
+
url: business === null || business === void 0 ? void 0 : business.pinterest_profile,
|
|
112
|
+
icon: /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Pinterest, null)
|
|
113
|
+
}), (business === null || business === void 0 ? void 0 : business.whatsapp_number) && /*#__PURE__*/_react.default.createElement(_SocialNetWork.SocialNetWork, {
|
|
114
|
+
url: business === null || business === void 0 ? void 0 : business.whatsapp_number,
|
|
115
|
+
icon: /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Whatsapp, null)
|
|
116
|
+
}), (business === null || business === void 0 ? void 0 : business.snapchat_profile) && /*#__PURE__*/_react.default.createElement(_SocialNetWork.SocialNetWork, {
|
|
117
|
+
url: business === null || business === void 0 ? void 0 : business.snapchat_profile,
|
|
118
|
+
icon: /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Snapchat, null)
|
|
119
|
+
})) : /*#__PURE__*/_react.default.createElement(_styles.SocialList, null, _toConsumableArray(Array(5).keys()).map(function (i) {
|
|
120
|
+
return /*#__PURE__*/_react.default.createElement(_styles.IconWrapper, {
|
|
121
|
+
isSkeleton: true,
|
|
122
|
+
key: i
|
|
123
|
+
}, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
124
|
+
width: 27,
|
|
125
|
+
height: 27
|
|
126
|
+
}));
|
|
127
|
+
})), /*#__PURE__*/_react.default.createElement(_styles.BusinessDetail, {
|
|
128
|
+
isSkeleton: loading
|
|
129
|
+
}, (orderState === null || orderState === void 0 ? void 0 : orderState.options.type) === 1 && !hideDeliveryFee && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !loading ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("h5", null, /*#__PURE__*/_react.default.createElement("span", null, t('DELIVERY_FEE', 'Delivery fee')), business && parsePrice((business === null || business === void 0 ? void 0 : business.delivery_price) || 0)), /*#__PURE__*/_react.default.createElement("span", {
|
|
130
|
+
className: "dot"
|
|
131
|
+
}, "\u2022")) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
132
|
+
width: isCustomerMode ? 70 : 50
|
|
133
|
+
})), !hideTime && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !loading ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (orderState === null || orderState === void 0 ? void 0 : (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.type) === 1 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("h5", null, (0, _utils.convertHoursToMinutes)(business === null || business === void 0 ? void 0 : business.delivery_time)), /*#__PURE__*/_react.default.createElement("span", {
|
|
134
|
+
className: "dot"
|
|
135
|
+
}, "\u2022")) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("h5", null, (0, _utils.convertHoursToMinutes)(business === null || business === void 0 ? void 0 : business.pickup_time)), /*#__PURE__*/_react.default.createElement("span", {
|
|
136
|
+
className: "dot"
|
|
137
|
+
}, "\u2022"))) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
138
|
+
width: isCustomerMode ? 70 : 50
|
|
139
|
+
})), !hideDistance && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !loading ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("h5", null, parseDistance((business === null || business === void 0 ? void 0 : business.distance) || 0)), /*#__PURE__*/_react.default.createElement("span", {
|
|
140
|
+
className: "dot"
|
|
141
|
+
}, "\u2022")) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
142
|
+
width: isCustomerMode ? 70 : 50
|
|
143
|
+
})), !hideReviews && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !loading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
144
|
+
className: "review"
|
|
145
|
+
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.StarFill, {
|
|
146
|
+
className: "start"
|
|
147
|
+
}), /*#__PURE__*/_react.default.createElement("p", null, business === null || business === void 0 ? void 0 : (_business$reviews = business.reviews) === null || _business$reviews === void 0 ? void 0 : _business$reviews.total)) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
148
|
+
width: isCustomerMode ? 100 : 50
|
|
149
|
+
}))), !loading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
150
|
+
className: "preorder-Reviews"
|
|
151
|
+
}, isPreOrderSetting && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
152
|
+
onClick: function onClick() {
|
|
153
|
+
return setIsPreOrder(true);
|
|
154
|
+
}
|
|
155
|
+
}, t('PREORDER', 'Preorder')), /*#__PURE__*/_react.default.createElement("span", {
|
|
156
|
+
className: "dot"
|
|
157
|
+
}, "\u2022")), ((_business$reviews2 = business.reviews) === null || _business$reviews2 === void 0 ? void 0 : _business$reviews2.reviews) && !hideReviewsPopup && /*#__PURE__*/_react.default.createElement("span", {
|
|
158
|
+
onClick: function onClick() {
|
|
159
|
+
return setIsBusinessReviews(true);
|
|
160
|
+
}
|
|
161
|
+
}, t('REVIEWS', 'Reviews'))) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
162
|
+
width: isCustomerMode ? 100 : 150
|
|
163
|
+
})))), !hideSearch && ((categoryState === null || categoryState === void 0 ? void 0 : (_categoryState$produc = categoryState.products) === null || _categoryState$produc === void 0 ? void 0 : _categoryState$produc.length) !== 0 || searchValue) && !errorQuantityProducts && !isInfoShrunken && !(business !== null && business !== void 0 && (_business$professiona = business.professionals) !== null && _business$professiona !== void 0 && _business$professiona.length) &&
|
|
164
|
+
/*#__PURE__*/
|
|
165
|
+
// (categoryClicked || windowSize.width >= 993) &&
|
|
166
|
+
_react.default.createElement(_SearchComponent.SearchComponent, searchComponentProps));
|
|
167
|
+
};
|
|
168
|
+
exports.BusinessInfoComponent = BusinessInfoComponent;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SearchComponent = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _styles = require("./styles");
|
|
9
|
+
var _Select = require("../../styles/Select");
|
|
10
|
+
var _styledComponents = require("styled-components");
|
|
11
|
+
var _CgSearch = _interopRequireDefault(require("@meronex/icons/cg/CgSearch"));
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
var SearchComponent = function SearchComponent(props) {
|
|
14
|
+
var _theme$business_view, _theme$business_view$, _theme$business_view$2, _theme$business_view$3, _theme$business_view$4, _theme$business_view$5, _theme$business_view$6;
|
|
15
|
+
var setOpenSearchProducts = props.setOpenSearchProducts,
|
|
16
|
+
handleChangeSortBy = props.handleChangeSortBy,
|
|
17
|
+
sortByValue = props.sortByValue,
|
|
18
|
+
sortByOptions = props.sortByOptions,
|
|
19
|
+
isResponsive = props.isResponsive;
|
|
20
|
+
var theme = (0, _styledComponents.useTheme)();
|
|
21
|
+
var hideSort = 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$.header) === 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.business) === null || _theme$business_view$4 === void 0 ? void 0 : (_theme$business_view$5 = _theme$business_view$4.components) === null || _theme$business_view$5 === void 0 ? void 0 : (_theme$business_view$6 = _theme$business_view$5.sort) === null || _theme$business_view$6 === void 0 ? void 0 : _theme$business_view$6.hidden;
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement(_styles.WrapperSearch, {
|
|
23
|
+
id: "search-component",
|
|
24
|
+
isResponsive: isResponsive
|
|
25
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.SearchWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.SearchIconWrapper, {
|
|
26
|
+
onClick: function onClick() {
|
|
27
|
+
return setOpenSearchProducts(true);
|
|
28
|
+
}
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement(_CgSearch.default, null)), !hideSort && /*#__PURE__*/_react.default.createElement(_Select.Select, {
|
|
30
|
+
notAsync: true,
|
|
31
|
+
notReload: true,
|
|
32
|
+
options: sortByOptions,
|
|
33
|
+
defaultValue: sortByValue,
|
|
34
|
+
onChange: function onChange(val) {
|
|
35
|
+
return handleChangeSortBy && handleChangeSortBy(val);
|
|
36
|
+
}
|
|
37
|
+
})));
|
|
38
|
+
};
|
|
39
|
+
exports.SearchComponent = SearchComponent;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SocialNetWork = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _styles = require("./styles");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
var SocialNetWork = function SocialNetWork(_ref) {
|
|
11
|
+
var url = _ref.url,
|
|
12
|
+
icon = _ref.icon;
|
|
13
|
+
return /*#__PURE__*/_react.default.createElement(_styles.IconWrapper, {
|
|
14
|
+
href: url,
|
|
15
|
+
target: "_blank",
|
|
16
|
+
rel: "noopener noreferrer"
|
|
17
|
+
}, icon);
|
|
18
|
+
};
|
|
19
|
+
exports.SocialNetWork = SocialNetWork;
|