ordering-ui-external 14.1.44 → 14.1.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/_bundles/{7.ordering-ui.d9252dcccf4ce0155028.js → 7.ordering-ui.247fbb361bb31d72a262.js} +1 -1
  2. package/_bundles/{ordering-ui.d9252dcccf4ce0155028.js → ordering-ui.247fbb361bb31d72a262.js} +2 -2
  3. package/_modules/components/BusinessesMap/index.js +7 -22
  4. package/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +1 -13
  5. package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +4 -4
  6. package/_modules/themes/callcenterOriginal/src/components/Header/index.js +9 -1
  7. package/_modules/themes/callcenterOriginal/src/components/UserDetails/styles.js +3 -3
  8. package/_modules/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +1 -1
  9. package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +25 -21
  10. package/_modules/themes/five/src/components/BusinessController/index.js +3 -1
  11. package/_modules/themes/five/src/components/BusinessController/styles.js +7 -4
  12. package/_modules/themes/five/src/components/Checkout/index.js +5 -8
  13. package/package.json +2 -2
  14. package/src/components/BusinessesMap/index.js +24 -38
  15. package/src/themes/callcenterOriginal/src/components/AddressForm/index.js +0 -13
  16. package/src/themes/callcenterOriginal/src/components/AddressList/index.js +0 -1
  17. package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +10 -4
  18. package/src/themes/callcenterOriginal/src/components/Header/index.js +6 -1
  19. package/src/themes/callcenterOriginal/src/components/UserDetails/styles.js +8 -2
  20. package/src/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +3 -0
  21. package/src/themes/five/src/components/BusinessBasicInformation/styles.js +13 -1
  22. package/src/themes/five/src/components/BusinessController/index.js +15 -1
  23. package/src/themes/five/src/components/BusinessController/styles.js +12 -1
  24. package/src/themes/five/src/components/Checkout/index.js +1 -2
  25. /package/_bundles/{0.ordering-ui.d9252dcccf4ce0155028.js → 0.ordering-ui.247fbb361bb31d72a262.js} +0 -0
  26. /package/_bundles/{1.ordering-ui.d9252dcccf4ce0155028.js → 1.ordering-ui.247fbb361bb31d72a262.js} +0 -0
  27. /package/_bundles/{2.ordering-ui.d9252dcccf4ce0155028.js → 2.ordering-ui.247fbb361bb31d72a262.js} +0 -0
  28. /package/_bundles/{4.ordering-ui.d9252dcccf4ce0155028.js → 4.ordering-ui.247fbb361bb31d72a262.js} +0 -0
  29. /package/_bundles/{5.ordering-ui.d9252dcccf4ce0155028.js → 5.ordering-ui.247fbb361bb31d72a262.js} +0 -0
  30. /package/_bundles/{6.ordering-ui.d9252dcccf4ce0155028.js → 6.ordering-ui.247fbb361bb31d72a262.js} +0 -0
  31. /package/_bundles/{7.ordering-ui.d9252dcccf4ce0155028.js.LICENSE.txt → 7.ordering-ui.247fbb361bb31d72a262.js.LICENSE.txt} +0 -0
  32. /package/_bundles/{8.ordering-ui.d9252dcccf4ce0155028.js → 8.ordering-ui.247fbb361bb31d72a262.js} +0 -0
  33. /package/_bundles/{9.ordering-ui.d9252dcccf4ce0155028.js → 9.ordering-ui.247fbb361bb31d72a262.js} +0 -0
  34. /package/_bundles/{ordering-ui.d9252dcccf4ce0155028.js.LICENSE.txt → ordering-ui.247fbb361bb31d72a262.js.LICENSE.txt} +0 -0
@@ -15,7 +15,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
15
15
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
18
- 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); }
19
18
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
20
19
  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."); }
21
20
  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); }
@@ -23,7 +22,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
23
22
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
24
23
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
25
24
  var BusinessesMapUI = function BusinessesMapUI(props) {
26
- var _props$beforeElements, _props$beforeComponen, _configState$configs, _configState$configs2, _theme$images, _configState$configs$, _configState$configs3, _configState$configs$2, _configState$configs4, _props$afterComponent, _props$afterElements;
25
+ var _configState$configs, _configState$configs2, _theme$images, _configState$configs$, _configState$configs3, _configState$configs$2, _configState$configs4;
27
26
  var userLocation = props.userLocation,
28
27
  businessLocations = props.businessLocations,
29
28
  onBusinessClick = props.onBusinessClick,
@@ -34,7 +33,9 @@ var BusinessesMapUI = function BusinessesMapUI(props) {
34
33
  configState = _useConfig2[0];
35
34
  var _useOrder = (0, _orderingComponentsExternal.useOrder)(),
36
35
  _useOrder2 = _slicedToArray(_useOrder, 1),
37
- orderState = _useOrder2[0];
36
+ _useOrder2$ = _useOrder2[0],
37
+ options = _useOrder2$.options,
38
+ loading = _useOrder2$.loading;
38
39
  var theme = (0, _styledComponents.useTheme)();
39
40
  var googleMapsControls = {
40
41
  defaultZoom: 18,
@@ -49,16 +50,8 @@ var BusinessesMapUI = function BusinessesMapUI(props) {
49
50
  },
50
51
  isMarkerDraggable: false
51
52
  };
52
- 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) {
53
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
54
- key: i
55
- }, BeforeElement);
56
- }), (_props$beforeComponen = props.beforeComponents) === null || _props$beforeComponen === void 0 ? void 0 : _props$beforeComponen.map(function (BeforeComponent, i) {
57
- return /*#__PURE__*/_react.default.createElement(BeforeComponent, _extends({
58
- key: i
59
- }, props));
60
- }), /*#__PURE__*/_react.default.createElement(_styles.WrapperMap, {
61
- disabled: orderState.loading
53
+ return /*#__PURE__*/_react.default.createElement(_styles.WrapperMap, {
54
+ disabled: loading
62
55
  }, /*#__PURE__*/_react.default.createElement(_orderingComponentsExternal.GoogleMapsMap, {
63
56
  useMapWithBusinessZones: true,
64
57
  deactiveAlerts: true,
@@ -68,7 +61,7 @@ var BusinessesMapUI = function BusinessesMapUI(props) {
68
61
  locations: businessLocations,
69
62
  mapControls: googleMapsControls,
70
63
  maxLimitLocation: parseInt(configState === null || configState === void 0 || (_configState$configs2 = configState.configs) === null || _configState$configs2 === void 0 || (_configState$configs2 = _configState$configs2.meters_to_change_address) === null || _configState$configs2 === void 0 ? void 0 : _configState$configs2.value),
71
- onBusinessClick: onBusinessClick,
64
+ onBusinessClick: options.type !== 1 ? onBusinessClick : function () {},
72
65
  businessZones: businessList === null || businessList === void 0 ? void 0 : businessList.map(function (business) {
73
66
  return business === null || business === void 0 ? void 0 : business.zones;
74
67
  }),
@@ -80,14 +73,6 @@ var BusinessesMapUI = function BusinessesMapUI(props) {
80
73
  lat: parseFloat((_configState$configs$ = configState === null || configState === void 0 || (_configState$configs3 = configState.configs) === null || _configState$configs3 === void 0 || (_configState$configs3 = _configState$configs3.location_default_latitude) === null || _configState$configs3 === void 0 ? void 0 : _configState$configs3.value) !== null && _configState$configs$ !== void 0 ? _configState$configs$ : 0, 10),
81
74
  lng: parseFloat((_configState$configs$2 = configState === null || configState === void 0 || (_configState$configs4 = configState.configs) === null || _configState$configs4 === void 0 || (_configState$configs4 = _configState$configs4.location_default_longitude) === null || _configState$configs4 === void 0 ? void 0 : _configState$configs4.value) !== null && _configState$configs$2 !== void 0 ? _configState$configs$2 : 0, 10)
82
75
  })
83
- })), (_props$afterComponent = props.afterComponents) === null || _props$afterComponent === void 0 ? void 0 : _props$afterComponent.map(function (AfterComponent, i) {
84
- return /*#__PURE__*/_react.default.createElement(AfterComponent, _extends({
85
- key: i
86
- }, props));
87
- }), (_props$afterElements = props.afterElements) === null || _props$afterElements === void 0 ? void 0 : _props$afterElements.map(function (AfterElement, i) {
88
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
89
- key: i
90
- }, AfterElement);
91
76
  }));
92
77
  };
93
78
  var BusinessesMap = exports.BusinessesMap = function BusinessesMap(props) {
@@ -7,13 +7,11 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.AddressForm = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
10
- var _CgSearchLoading = _interopRequireDefault(require("@meronex/icons/cg/CgSearchLoading"));
11
10
  var _reactBootstrapIcons = require("react-bootstrap-icons");
12
11
  var _styledComponents = require("styled-components");
13
12
  var _reactHookForm = require("react-hook-form");
14
13
  var _orderingComponentsExternal = require("ordering-components-external");
15
14
  var _Confirm = require("../Confirm");
16
- var _GoogleGpsButton = require("../../../../../components/GoogleGpsButton");
17
15
  var _styles = require("./styles");
18
16
  var _Buttons = require("../../styles/Buttons");
19
17
  var _Inputs = require("../../styles/Inputs");
@@ -537,17 +535,7 @@ var AddressFormUI = function AddressFormUI(props) {
537
535
  defaultValue: formState !== null && formState !== void 0 && (_formState$result3 = formState.result) !== null && _formState$result3 !== void 0 && _formState$result3.result ? formState === null || formState === void 0 || (_formState$result4 = formState.result) === null || _formState$result4 === void 0 || (_formState$result4 = _formState$result4.result) === null || _formState$result4 === void 0 ? void 0 : _formState$result4.address : (_formState$changes$ad5 = formState === null || formState === void 0 || (_formState$changes28 = formState.changes) === null || _formState$changes28 === void 0 ? void 0 : _formState$changes28.address) !== null && _formState$changes$ad5 !== void 0 ? _formState$changes$ad5 : addressValue,
538
536
  autoComplete: "new-field",
539
537
  countryCode: (configState === null || configState === void 0 || (_configState$configs5 = configState.configs) === null || _configState$configs5 === void 0 || (_configState$configs5 = _configState$configs5.country_autocomplete) === null || _configState$configs5 === void 0 ? void 0 : _configState$configs5.value) || '*'
540
- })), /*#__PURE__*/_react.default.createElement(_GoogleGpsButton.GoogleGpsButton, {
541
- className: "gps-button",
542
- apiKey: googleMapsApiKey,
543
- onAddress: function onAddress(e) {
544
- formMethods.setValue('address', e.address);
545
- handleChangeAddress(e);
546
- },
547
- onError: setMapErrors,
548
- IconButton: _reactBootstrapIcons.GeoAlt,
549
- IconLoadingButton: _CgSearchLoading.default
550
- })), ((addressState === null || addressState === void 0 || (_addressState$address12 = addressState.address) === null || _addressState$address12 === void 0 ? void 0 : _addressState$address12.location) || (formState === null || formState === void 0 || (_formState$changes29 = formState.changes) === null || _formState$changes29 === void 0 ? void 0 : _formState$changes29.location)) && /*#__PURE__*/_react.default.createElement(_styles.WrapperMap, {
538
+ }))), ((addressState === null || addressState === void 0 || (_addressState$address12 = addressState.address) === null || _addressState$address12 === void 0 ? void 0 : _addressState$address12.location) || (formState === null || formState === void 0 || (_formState$changes29 = formState.changes) === null || _formState$changes29 === void 0 ? void 0 : _formState$changes29.location)) && /*#__PURE__*/_react.default.createElement(_styles.WrapperMap, {
551
539
  showMap: showMap || !showSpreadForm,
552
540
  notUseCustomerInfo: notUseCustomerInfo,
553
541
  addFormRestrictions: addFormRestrictions
@@ -30,7 +30,7 @@ var AddressItem = exports.AddressItem = _styledComponents.default.li(_templateOb
30
30
  }, function (props) {
31
31
  return props.theme.colors.lightGray;
32
32
  });
33
- var AddressItemActions = exports.AddressItemActions = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n a {\n display: flex;\n cursor: pointer;\n margin: 0px 5px;\n font-size: 20px;\n \n svg {\n color: #B1BCCC;\n }\n }\n a.disabled {\n svg {\n color: #CCC;\n }\n pointer-events: none;\n }\n"])));
33
+ var AddressItemActions = exports.AddressItemActions = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n a {\n display: flex;\n cursor: pointer;\n margin: 0px 5px;\n font-size: 20px;\n\n svg {\n color: #B1BCCC;\n }\n }\n a.disabled {\n svg {\n color: #CCC;\n }\n pointer-events: none;\n }\n"])));
34
34
  var WrappNotAddresses = exports.WrappNotAddresses = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n height: 270px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 80%;\n margin: 20px auto 10px;\n\n img {\n width: 200px;\n height: auto;\n aspect-ratio: attr(width) / attr(height)\n }\n h1 {\n margin: 5px 0px 0px;\n opacity: 0.5;\n text-align: center;\n font-size: 24px;\n }\n"])));
35
35
  var FormActions = exports.FormActions = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n padding: 10px 0px;\n display: flex;\n justify-content: space-between;\n width: 100%;\n button {\n height: 45px;\n flex: 1;\n\n &:last-child#second-btn {\n margin-left: 10px;\n ", "\n }\n }\n\n @media (min-width: 769px) {\n button {\n &:last-child#second-btn {\n margin-left: 25px;\n ", "\n }\n }\n }\n"])), function (props) {
36
36
  var _props$theme3;
@@ -39,13 +39,13 @@ var FormActions = exports.FormActions = _styledComponents.default.div(_templateO
39
39
  var _props$theme4;
40
40
  return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-left: 0;\n margin-right: 25px;\n "])));
41
41
  });
42
- var ContinueButton = exports.ContinueButton = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n width: 100%;\n position: sticky;\n bottom: 1px;\n \n button {\n width: 100%;\n white-space: nowrap;\n height: 50px;\n }\n"])));
42
+ var ContinueButton = exports.ContinueButton = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n width: 100%;\n position: sticky;\n bottom: 1px;\n\n button {\n width: 100%;\n white-space: nowrap;\n height: 50px;\n }\n"])));
43
43
  var AddressTitle = exports.AddressTitle = _styledComponents.default.span(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n font-size: 16px;\n margin-bottom: 25px;\n text-align: left;\n ", "\n"])), function (props) {
44
44
  var _props$theme5;
45
45
  return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n text-align: right;\n "])));
46
46
  });
47
47
  var AddressHalfContainer = exports.AddressHalfContainer = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n"])));
48
- var List = exports.List = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n width: ", ";\n padding-right: 10px;\n ", " \n ", "\n button {\n width: 100%;\n }\n"])), function (_ref2) {
48
+ var List = exports.List = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n width: ", ";\n padding-right: 10px;\n ", "\n ", "\n button {\n width: 100%;\n }\n"])), function (_ref2) {
49
49
  var halfWidth = _ref2.halfWidth;
50
50
  return halfWidth ? '50%' : '100%';
51
51
  }, function (_ref3) {
@@ -66,7 +66,7 @@ var AddressFormContainer = exports.AddressFormContainer = _styledComponents.defa
66
66
  return isEnableContinueButton && (0, _styledComponents.css)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n position: relative;\n bottom: 164px;\n "])));
67
67
  });
68
68
  var CloseIcon = exports.CloseIcon = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n cursor: pointer;\n svg{\n width: 30px;\n height: 30px;\n }\n"])));
69
- var TitleFormContainer = exports.TitleFormContainer = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n display: flex; \n align-items: center;\n margin-top: 7px;\n h1 {\n margin: auto;\n font-size: 24px;\n }\n"])));
69
+ var TitleFormContainer = exports.TitleFormContainer = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-top: 7px;\n h1 {\n margin: auto;\n font-size: 24px;\n }\n\n @media (max-width: 930px) {\n h1 {\n font-size: 18px !important;\n }\n }\n"])));
70
70
  var AddressHoverInfo = exports.AddressHoverInfo = _styledComponents.default.span(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n background: #FFE69C;\n border: 1px solid #FFF3CD;\n display: flex;\n padding: 8px;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n position: absolute;\n top: 0px;\n left: 25px;\n opacity: 0;\n width: max-content;\n p {\n margin: 0;\n color: #664D03;\n font-size: 12px;\n }\n\n"])));
71
71
  var AddressBookMark = exports.AddressBookMark = _styledComponents.default.div(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n span {\n opacity: 0;\n transition: opacity 0.3s, visibility 0.3s;\n\n }\n &:hover + span {\n opacity: 1;\n transition: opacity 0.3s, visibility 0.3s;\n }\n"])));
72
72
  var AddressBookMarkContainer = exports.AddressBookMarkContainer = _styledComponents.default.div(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n position: relative;\n"])));
@@ -188,6 +188,12 @@ var Header = exports.Header = function Header(props) {
188
188
  }
189
189
  });
190
190
  };
191
+ var cutCharactersName = function cutCharactersName(_ref) {
192
+ var str = _ref.str,
193
+ _ref$maxSize = _ref.maxSize,
194
+ maxSize = _ref$maxSize === void 0 ? 8 : _ref$maxSize;
195
+ return str.length <= maxSize ? str : str.slice(0, maxSize) + '...';
196
+ };
191
197
  (0, _react.useEffect)(function () {
192
198
  if (isCustomerMode) {
193
199
  setCustomerModalOpen(false);
@@ -228,7 +234,9 @@ var Header = exports.Header = function Header(props) {
228
234
  onClick: function onClick(e) {
229
235
  return handleClickUserCustomer(e);
230
236
  }
231
- }, /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("p", null, userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.name, " ", userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.lastname)), /*#__PURE__*/_react.default.createElement("span", {
237
+ }, /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("p", null, windowSize.width > 940 ? userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.name : cutCharactersName({
238
+ str: userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.name
239
+ }), ' ', windowSize.width > 940 ? userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.lastname : null)), /*#__PURE__*/_react.default.createElement("span", {
232
240
  ref: clearCustomer
233
241
  }, /*#__PURE__*/_react.default.createElement(_AiOutlineClose.default, null))), onlineStatus && windowSize.width > 820 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (isPreOrderSetting || (configState === null || configState === void 0 || (_configState$configs3 = configState.configs) === null || _configState$configs3 === void 0 || (_configState$configs3 = _configState$configs3.preorder_status_enabled) === null || _configState$configs3 === void 0 ? void 0 : _configState$configs3.value) === undefined) && /*#__PURE__*/_react.default.createElement(_styles.MomentMenu, {
234
242
  onClick: (configState === null || configState === void 0 || (_configState$configs4 = configState.configs) === null || _configState$configs4 === void 0 || (_configState$configs4 = _configState$configs4.max_days_preorder) === null || _configState$configs4 === void 0 ? void 0 : _configState$configs4.value) === -1 || (configState === null || configState === void 0 || (_configState$configs5 = configState.configs) === null || _configState$configs5 === void 0 || (_configState$configs5 = _configState$configs5.max_days_preorder) === null || _configState$configs5 === void 0 ? void 0 : _configState$configs5.value) === 0 ? null : function () {
@@ -10,11 +10,11 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
10
10
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
11
11
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
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 Container = exports.Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: ", ";\n"])), function (_ref) {
13
+ var Container = exports.Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: ", ";\n\n @media (max-width: 930px) {\n h1 {\n font-size: 18px !important;\n }\n }\n"])), function (_ref) {
14
14
  var isEdit = _ref.isEdit;
15
15
  return isEdit ? 'auto' : '145px';
16
16
  });
17
- var Header = exports.Header = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 5px;\n\n h1 {\n font-weight: 500;\n font-size: 20px;\n color: ", "; \n margin: 0px 10px 0px 0px;\n ", "\n }\n\n svg {\n font-size: 24px;\n }\n\n svg.cancel {\n color: #D81212;\n cursor: pointer;\n }\n\n span {\n font-size: 13px;\n color: ", ";\n text-decoration: underline;\n cursor: pointer;\n user-select: none;\n }\n"])), function (props) {
17
+ var Header = exports.Header = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 5px;\n\n h1 {\n font-weight: 500;\n font-size: 20px;\n color: ", ";\n margin: 0px 10px 0px 0px;\n ", "\n }\n\n svg {\n font-size: 24px;\n }\n\n svg.cancel {\n color: #D81212;\n cursor: pointer;\n }\n\n span {\n font-size: 13px;\n color: ", ";\n text-decoration: underline;\n cursor: pointer;\n user-select: none;\n }\n"])), function (props) {
18
18
  return props.theme.colors.darkTextColor;
19
19
  }, function (props) {
20
20
  var _props$theme;
@@ -37,4 +37,4 @@ var TitleContainer = exports.TitleContainer = _styledComponents.default.div(_tem
37
37
  return isAddressFormOpen && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n h1{\n width: 75%;\n }\n "])));
38
38
  });
39
39
  var CountryFlag = exports.CountryFlag = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-right: 5px;\n .PhoneInputCountryIcon {\n width: 25px;\n }\n .PhoneInputInput {\n display: none;\n }\n .PhoneInputCountrySelect {\n display: none;\n }\n"])));
40
- var PhoneContainer = exports.PhoneContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n height: 30px;\n \n p {\n margin: 0;\n }\n"])));
40
+ var PhoneContainer = exports.PhoneContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n height: 30px;\n\n p {\n margin: 0;\n }\n"])));
@@ -87,7 +87,7 @@ var BusinessInfoComponent = exports.BusinessInfoComponent = function BusinessInf
87
87
  }, /*#__PURE__*/_react.default.createElement("h2", {
88
88
  className: "bold",
89
89
  id: "business_name"
90
- }, business === null || business === void 0 ? void 0 : business.name), /*#__PURE__*/_react.default.createElement("span", {
90
+ }, business === null || business === void 0 ? void 0 : business.name), isCustomerMode && (business === null || business === void 0 ? void 0 : business.address) && /*#__PURE__*/_react.default.createElement("h3", null, business === null || business === void 0 ? void 0 : business.address), /*#__PURE__*/_react.default.createElement("span", {
91
91
  id: "business_name_feedback"
92
92
  }), (business === null || business === void 0 || (_business$ribbon = business.ribbon) === null || _business$ribbon === void 0 ? void 0 : _business$ribbon.enabled) && /*#__PURE__*/_react.default.createElement(_styles.RibbonBox, {
93
93
  bgColor: business === null || business === void 0 || (_business$ribbon2 = business.ribbon) === null || _business$ribbon2 === void 0 ? void 0 : _business$ribbon2.color,
@@ -103,7 +103,7 @@ var BusinessMoreDetail = exports.BusinessMoreDetail = _styledComponents.default.
103
103
  }, function (props) {
104
104
  return props.position ? 'black' : 'white';
105
105
  });
106
- var TitleWrapper = exports.TitleWrapper = _styledComponents.default.div(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n span {\n height: 70px;\n width: 1px;\n display: none;\n }\n h2 {\n font-size: 24px;\n line-height: 36px;\n margin: 0 0 10px 0;\n font-weight: 600;\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n background: ", ";\n &.fixed-name {\n z-index: 10001;\n position: fixed;\n top: 0;\n padding: 10px 0;\n font-size: 18px;\n ", "\n ", "\n }\n @media (min-width: 768px) {\n font-size: 32px;\n \n }\n }\n"])), function (_ref5) {
106
+ var TitleWrapper = exports.TitleWrapper = _styledComponents.default.div(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n span {\n height: 70px;\n width: 1px;\n display: none;\n }\n h2 {\n font-size: 24px;\n line-height: 36px;\n margin: 0 0 10px 0;\n font-weight: 600;\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n background: ", ";\n &.fixed-name {\n z-index: 10001;\n position: fixed;\n top: 0;\n padding: 10px 0;\n font-size: 18px;\n ", "\n ", "\n }\n\n @media (min-width: 768px) {\n font-size: 32px;\n }\n }\n\n h3 {\n font-size: 16px;\n line-height: 36px;\n margin: 0px;\n font-weight: 500;\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n background: ", ";\n }\n"])), function (_ref5) {
107
107
  var _theme$colors;
108
108
  var theme = _ref5.theme;
109
109
  return theme === null || theme === void 0 || (_theme$colors = theme.colors) === null || _theme$colors === void 0 ? void 0 : _theme$colors.backgroundPage;
@@ -122,6 +122,10 @@ var TitleWrapper = exports.TitleWrapper = _styledComponents.default.div(_templat
122
122
  var _props$theme13;
123
123
  return (_props$theme13 = props.theme) !== null && _props$theme13 !== void 0 && _props$theme13.rtl ? (0, _styledComponents.css)(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["\n right: 48px;\n "]))) : (0, _styledComponents.css)(_templateObject41 || (_templateObject41 = _taggedTemplateLiteral(["\n left: 48px;\n "])));
124
124
  });
125
+ }, function (_ref8) {
126
+ var _theme$colors2;
127
+ var theme = _ref8.theme;
128
+ return theme === null || theme === void 0 || (_theme$colors2 = theme.colors) === null || _theme$colors2 === void 0 ? void 0 : _theme$colors2.backgroundPage;
125
129
  });
126
130
  var RibbonBox = exports.RibbonBox = _styledComponents.default.div(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["\n padding: 2px 8px;\n box-sizing: border-box;\n z-index: 10;\n color: ", ";\n font-weight: 400;\n font-size: 10px;\n line-height: 13px;\n background-color: ", ";\n max-width: 200px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n margin-left: 5px;\n margin-bottom: 10px;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
127
131
  return props.theme.colors.colorTextSignForm;
@@ -129,41 +133,41 @@ var RibbonBox = exports.RibbonBox = _styledComponents.default.div(_templateObjec
129
133
  return props.theme.colors.primary;
130
134
  }, function (props) {
131
135
  return props.theme.rtl && (0, _styledComponents.css)(_templateObject43 || (_templateObject43 = _taggedTemplateLiteral(["\n margin-left: 0px;\n margin-right: 5px;\n "])));
132
- }, function (_ref8) {
133
- var bgColor = _ref8.bgColor;
134
- return bgColor && (0, _styledComponents.css)(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), bgColor);
135
136
  }, function (_ref9) {
136
- var isRoundRect = _ref9.isRoundRect;
137
- return isRoundRect && (0, _styledComponents.css)(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["\n border-radius: 7.6px;\n "])));
137
+ var bgColor = _ref9.bgColor;
138
+ return bgColor && (0, _styledComponents.css)(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), bgColor);
138
139
  }, function (_ref10) {
139
- var isCapsule = _ref10.isCapsule;
140
- return isCapsule && (0, _styledComponents.css)(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["\n border-radius: 50px;\n "])));
140
+ var isRoundRect = _ref10.isRoundRect;
141
+ return isRoundRect && (0, _styledComponents.css)(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["\n border-radius: 7.6px;\n "])));
141
142
  }, function (_ref11) {
142
- var colorText = _ref11.colorText;
143
- return colorText && (0, _styledComponents.css)(_templateObject47 || (_templateObject47 = _taggedTemplateLiteral(["\n color: ", ";\n "])), colorText ? 'black' : 'white');
143
+ var isCapsule = _ref11.isCapsule;
144
+ return isCapsule && (0, _styledComponents.css)(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["\n border-radius: 50px;\n "])));
144
145
  }, function (_ref12) {
145
- var borderRibbon = _ref12.borderRibbon;
146
+ var colorText = _ref12.colorText;
147
+ return colorText && (0, _styledComponents.css)(_templateObject47 || (_templateObject47 = _taggedTemplateLiteral(["\n color: ", ";\n "])), colorText ? 'black' : 'white');
148
+ }, function (_ref13) {
149
+ var borderRibbon = _ref13.borderRibbon;
146
150
  return borderRibbon && (0, _styledComponents.css)(_templateObject48 || (_templateObject48 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n "])), borderRibbon ? 'black' : 'white');
147
151
  });
148
152
  var SearchIconWrapper = exports.SearchIconWrapper = _styledComponents.default.div(_templateObject49 || (_templateObject49 = _taggedTemplateLiteral(["\n cursor: pointer;\n background-color: ", ";\n width: 36px;\n height: 36px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n\n svg {\n font-size: 18px;\n }\n"])), function (props) {
149
153
  return props.theme.colors.gray200;
150
154
  });
151
- var SearchComponentContainer = exports.SearchComponentContainer = _styledComponents.default.div(_templateObject50 || (_templateObject50 = _taggedTemplateLiteral(["\n position: absolute;\n top: 10px;\n right: 60px;\n color: ", ";\n #select-input {\n color: #FFFFFF !important;\n }\n svg {\n color: #FFFFFF;\n }\n"])), function (_ref13) {
152
- var theme = _ref13.theme;
155
+ var SearchComponentContainer = exports.SearchComponentContainer = _styledComponents.default.div(_templateObject50 || (_templateObject50 = _taggedTemplateLiteral(["\n position: absolute;\n top: 10px;\n right: 60px;\n color: ", ";\n #select-input {\n color: #FFFFFF !important;\n }\n svg {\n color: #FFFFFF;\n }\n"])), function (_ref14) {
156
+ var theme = _ref14.theme;
153
157
  return theme.colors.white;
154
158
  });
155
159
  var SocialList = exports.SocialList = _styledComponents.default.div(_templateObject51 || (_templateObject51 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-left: -3px;\n ", "\n"])), function (props) {
156
160
  return props.theme.rtl && (0, _styledComponents.css)(_templateObject52 || (_templateObject52 = _taggedTemplateLiteral(["\n margin-right: -3px;\n margin-left: 0px;\n "])));
157
161
  });
158
- var CategorySelectedContainer = exports.CategorySelectedContainer = _styledComponents.default.div(_templateObject53 || (_templateObject53 = _taggedTemplateLiteral(["\n display: inline;\n margin-left: 10px;\n color: ", ";\n padding-right: 5px;\n cursor: pointer;\n p{\n margin: 0;\n }\n svg {\n position: relative;\n top: 2px;\n margin-right: 3px;\n width: 14px;\n height: 14px;\n }\n"])), function (_ref14) {
159
- var _theme$colors2;
160
- var theme = _ref14.theme;
161
- return theme === null || theme === void 0 || (_theme$colors2 = theme.colors) === null || _theme$colors2 === void 0 ? void 0 : _theme$colors2.primary;
162
+ var CategorySelectedContainer = exports.CategorySelectedContainer = _styledComponents.default.div(_templateObject53 || (_templateObject53 = _taggedTemplateLiteral(["\n display: inline;\n margin-left: 10px;\n color: ", ";\n padding-right: 5px;\n cursor: pointer;\n p{\n margin: 0;\n }\n svg {\n position: relative;\n top: 2px;\n margin-right: 3px;\n width: 14px;\n height: 14px;\n }\n"])), function (_ref15) {
163
+ var _theme$colors3;
164
+ var theme = _ref15.theme;
165
+ return theme === null || theme === void 0 || (_theme$colors3 = theme.colors) === null || _theme$colors3 === void 0 ? void 0 : _theme$colors3.primary;
162
166
  });
163
167
  var IconWrapper = exports.IconWrapper = _styledComponents.default.a(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["\n margin: 0px 3px 10px 3px;\n border-radius: 3px;\n border: 0.5px solid ", ";\n width: 27px;\n height: 27px;\n min-width: 27px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: all 0.2s linear;\n\n ", "\n\n svg {\n height: 18px;\n font-size: 18px;\n transition: all 0.2s ease-in;\n color: ", ";\n }\n &:hover {\n background-color: ", ";\n svg {\n transform: scale(1.07);\n }\n }\n"])), function (props) {
164
168
  return props.theme.colors.gray200;
165
- }, function (_ref15) {
166
- var isSkeleton = _ref15.isSkeleton;
169
+ }, function (_ref16) {
170
+ var isSkeleton = _ref16.isSkeleton;
167
171
  return isSkeleton && (0, _styledComponents.css)(_templateObject55 || (_templateObject55 = _taggedTemplateLiteral(["\n border: none;\n "])));
168
172
  }, function (props) {
169
173
  return props.theme.colors.headingColor;
@@ -171,8 +175,8 @@ var IconWrapper = exports.IconWrapper = _styledComponents.default.a(_templateObj
171
175
  return props.theme.colors.gray200;
172
176
  });
173
177
  var BusinessInfoWrapper = exports.BusinessInfoWrapper = _styledComponents.default.div(_templateObject56 || (_templateObject56 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column-reverse;\n @media (min-width: 768px) {\n flex-direction: column;\n }\n"])));
174
- var WrapperFloatingSearch = exports.WrapperFloatingSearch = _styledComponents.default.div(_templateObject57 || (_templateObject57 = _taggedTemplateLiteral(["\n position: absolute;\n color: ", ";\n display: flex;\n background: rgba(0,0,0,0.2);\n top: 80px;\n right: 10px;\n width: 80%;\n border-bottom: 1px solid #FFFFFF;\n #select-input {\n color: #FFFFFF !important;\n background: transparent;\n }\n svg, span {\n color: #FFFFFF !important;\n }\n @media (min-width: 681px){\n top: 23px;\n right: 60px;\n width: 300px;\n input {\n width: 80%;\n }\n }\n"])), function (_ref16) {
175
- var theme = _ref16.theme;
178
+ var WrapperFloatingSearch = exports.WrapperFloatingSearch = _styledComponents.default.div(_templateObject57 || (_templateObject57 = _taggedTemplateLiteral(["\n position: absolute;\n color: ", ";\n display: flex;\n background: rgba(0,0,0,0.2);\n top: 80px;\n right: 10px;\n width: 80%;\n border-bottom: 1px solid #FFFFFF;\n #select-input {\n color: #FFFFFF !important;\n background: transparent;\n }\n svg, span {\n color: #FFFFFF !important;\n }\n @media (min-width: 681px){\n top: 23px;\n right: 60px;\n width: 300px;\n input {\n width: 80%;\n }\n }\n"])), function (_ref17) {
179
+ var theme = _ref17.theme;
176
180
  return theme.colors.white;
177
181
  });
178
182
  var BackButton = exports.BackButton = _styledComponents.default.div(_templateObject58 || (_templateObject58 = _taggedTemplateLiteral(["\n button {\n display: flex;\n flex-direction: row;\n align-items: center;}\n margin-top: 10px;\n svg {\n margin-right: 10px;\n }\n }\n"])));
@@ -222,7 +222,9 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
222
222
  isCustomerMode: isCustomerMode
223
223
  }, /*#__PURE__*/_react.default.createElement(_styles.BusinessInfoItem, null, /*#__PURE__*/_react.default.createElement("div", 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, {
224
224
  width: 100
225
- })), /*#__PURE__*/_react.default.createElement(_styles.Medadata, {
225
+ })), isCustomerMode && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, business !== null && business !== void 0 && business.address ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_styles.BusinessAddress, null, business === null || business === void 0 ? void 0 : business.address)) : /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
226
+ width: 100
227
+ }))), /*#__PURE__*/_react.default.createElement(_styles.Medadata, {
226
228
  isCustomerMode: isCustomerMode,
227
229
  isSkeleton: isSkeleton
228
230
  }, !hideBusinessFee && orderType === 1 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (businessDeliveryPrice !== null && businessDeliveryPrice !== void 0 ? businessDeliveryPrice : business === null || business === void 0 ? void 0 : business.delivery_price) >= 0 ? /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("span", null, t('DELIVERY_FEE', 'Delivery fee')), business && parsePrice(businessDeliveryPrice !== null && businessDeliveryPrice !== void 0 ? businessDeliveryPrice : business === null || business === void 0 ? void 0 : business.delivery_price)) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
@@ -4,10 +4,10 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.WrapperBusinessLogo = exports.WrapperBusinessCard = exports.ScheduleContainer = exports.RibbonBox = exports.Medadata = exports.InfoLength = exports.InfoDescription = exports.FavoriteWrapper = exports.ContainerCard = exports.ClosedContainer = exports.Categories = exports.CardOverlay = exports.CallCenterInformationBullet = exports.CallCenterInformation = exports.BusinessTags = exports.BusinessStarInfo = exports.BusinessName = exports.BusinessLogoWrapper = exports.BusinessLogo = exports.BusinessInfoItem = exports.BusinessInfo = exports.BusinessHero = exports.BusinessHeaderClosedContainer = exports.BusinessHeader = exports.BusinessContent = void 0;
7
+ exports.WrapperBusinessLogo = exports.WrapperBusinessCard = exports.ScheduleContainer = exports.RibbonBox = exports.Medadata = exports.InfoLength = exports.InfoDescription = exports.FavoriteWrapper = exports.ContainerCard = exports.ClosedContainer = exports.Categories = exports.CardOverlay = exports.CallCenterInformationBullet = exports.CallCenterInformation = exports.BusinessTags = exports.BusinessStarInfo = exports.BusinessName = exports.BusinessLogoWrapper = exports.BusinessLogo = exports.BusinessInfoItem = exports.BusinessInfo = exports.BusinessHero = exports.BusinessHeaderClosedContainer = exports.BusinessHeader = exports.BusinessContent = exports.BusinessAddress = 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, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54;
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, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55;
11
11
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
12
12
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -106,7 +106,7 @@ var BusinessInfoItem = exports.BusinessInfoItem = _styledComponents.default.div(
106
106
  var _props$theme3;
107
107
  return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n margin-left: 5px;\n margin-right: 0;\n "])));
108
108
  });
109
- var BusinessName = exports.BusinessName = _styledComponents.default.h6(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n font-size: 16px;\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 color: ", ";\n"])), function (props) {
109
+ var BusinessName = exports.BusinessName = _styledComponents.default.h5(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n font-size: 16px;\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 color: ", ";\n"])), function (props) {
110
110
  return props.theme.colors.darkTextColor;
111
111
  });
112
112
  var Categories = exports.Categories = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n font-size: 14px;\n font-weight: 300;\n color: #6C6C6C;\n\n @media (min-width: 481px) {\n font-size: 16px;\n }\n"])));
@@ -161,4 +161,7 @@ var FavoriteWrapper = exports.FavoriteWrapper = _styledComponents.default.div(_t
161
161
  return props.theme.colors.danger500;
162
162
  });
163
163
  var ScheduleContainer = exports.ScheduleContainer = _styledComponents.default.div(_templateObject53 || (_templateObject53 = _taggedTemplateLiteral(["\n width: 50%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n background: #4472C4;\n border: 2px solid #000;\n div {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n p {\n margin: 0;\n color: #fff;\n font-size: 12px;\n }\n"])));
164
- var ClosedContainer = exports.ClosedContainer = _styledComponents.default.div(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["\n text-align: center;\n width: 100%;\n line-break: anywhere;\n"])));
164
+ var ClosedContainer = exports.ClosedContainer = _styledComponents.default.div(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["\n text-align: center;\n width: 100%;\n line-break: anywhere;\n"])));
165
+ var BusinessAddress = exports.BusinessAddress = _styledComponents.default.h6(_templateObject55 || (_templateObject55 = _taggedTemplateLiteral(["\n font-size: 14px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n margin-block-start: 0;\n margin-block-end: 0;\n font-weight: 400;\n color: ", ";\n"])), function (props) {
166
+ return props.theme.colors.darkTextColor;
167
+ });
@@ -64,7 +64,7 @@ var mapConfigs = {
64
64
  }
65
65
  };
66
66
  var CheckoutUI = function CheckoutUI(props) {
67
- var _ordering$project, _businessDetails$busi, _businessDetails$busi2, _configs$table_numer_, _businessConfigs$find, _businessConfigs$find2, _configs$cash_wallet, _configs$wallet_enabl, _theme$header, _theme$colors, _theme$colors$split, _cart$comment, _cart$offers, _paymethodSelected$da, _paymethodSelected$da2, _cardList$cards, _cartState$cart, _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _instructionsOptions$, _theme$checkout, _theme$checkout2, _theme$checkout3, _theme$checkout4, _loyaltyPlansState$re, _creditPointPlan$busi, _cart$business2, _businessDetails$busi3, _theme$images, _configs$google_maps_, _customerState$user, _customerState$user2, _Object$values2, _businessDetails$busi4, _businessDetails$busi5, _businessDetails$busi6, _businessDetails$busi7, _businessDetails$busi8, _businessDetails$busi9, _businessDetails$erro, _businessDetails$erro2, _businessDetails$busi10, _businessDetails$busi11, _businessDetails$busi12, _configs$driver_tip_t, _configs$driver_tip_u, _configs$driver_tip_t2, _cartState$cart$spot_, _cartState$cart2, _cart$business3, _cart$products2, _ref2, _creditPointPlanOnBus, _configs$driver_tip_t3, _configs$driver_tip_u2, _configs$driver_tip_t4, _customerState$user3, _options$address;
67
+ var _businessDetails$busi, _businessDetails$busi2, _configs$table_numer_, _businessConfigs$find, _businessConfigs$find2, _configs$cash_wallet, _configs$wallet_enabl, _theme$header, _theme$colors, _theme$colors$split, _cart$comment, _cart$offers, _paymethodSelected$da, _paymethodSelected$da2, _cardList$cards, _cartState$cart, _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _instructionsOptions$, _theme$checkout, _theme$checkout2, _theme$checkout3, _theme$checkout4, _loyaltyPlansState$re, _creditPointPlan$busi, _cart$business2, _businessDetails$busi3, _theme$images, _configs$google_maps_, _customerState$user, _customerState$user2, _Object$values2, _businessDetails$busi4, _businessDetails$busi5, _businessDetails$busi6, _businessDetails$busi7, _businessDetails$busi8, _businessDetails$busi9, _businessDetails$erro, _businessDetails$erro2, _businessDetails$busi10, _businessDetails$busi11, _businessDetails$busi12, _configs$driver_tip_t, _configs$driver_tip_u, _configs$driver_tip_t2, _cartState$cart$spot_, _cartState$cart2, _cart$business3, _cart$products2, _ref2, _creditPointPlanOnBus, _configs$driver_tip_t3, _configs$driver_tip_u2, _configs$driver_tip_t4, _customerState$user3, _options$address;
68
68
  var cart = props.cart,
69
69
  errors = props.errors,
70
70
  placing = props.placing,
@@ -90,9 +90,6 @@ var CheckoutUI = function CheckoutUI(props) {
90
90
  alseaCheckPriceError = props.alseaCheckPriceError,
91
91
  isLoadingCheckprice = props.isLoadingCheckprice;
92
92
  var theme = (0, _styledComponents.useTheme)();
93
- var _useApi = (0, _orderingComponentsExternal.useApi)(),
94
- _useApi2 = _slicedToArray(_useApi, 1),
95
- ordering = _useApi2[0];
96
93
  var _useOrder = (0, _orderingComponentsExternal.useOrder)(),
97
94
  _useOrder2 = _slicedToArray(_useOrder, 1),
98
95
  _useOrder2$ = _useOrder2[0],
@@ -180,7 +177,7 @@ var CheckoutUI = function CheckoutUI(props) {
180
177
  _useState26 = _slicedToArray(_useState25, 2),
181
178
  productLoading = _useState26[0],
182
179
  setProductLoading = _useState26[1];
183
- var shouldActivateOrderDetailModal = ordering === null || ordering === void 0 || (_ordering$project = ordering.project) === null || _ordering$project === void 0 ? void 0 : _ordering$project.includes('alsea');
180
+ var shouldActivateOrderDetailModal = isCustomerMode;
184
181
  var cardsMethods = ['stripe', 'credomatic'];
185
182
  var stripePaymethods = ['stripe', 'stripe_connect', 'stripe_redirect'];
186
183
  var businessConfigs = (_businessDetails$busi = businessDetails === null || businessDetails === void 0 || (_businessDetails$busi2 = businessDetails.business) === null || _businessDetails$busi2 === void 0 ? void 0 : _businessDetails$busi2.configs) !== null && _businessDetails$busi !== void 0 ? _businessDetails$busi : [];
@@ -789,9 +786,9 @@ var Checkout = exports.Checkout = function Checkout(props) {
789
786
  var _useSession3 = (0, _orderingComponentsExternal.useSession)(),
790
787
  _useSession4 = _slicedToArray(_useSession3, 1),
791
788
  token = _useSession4[0].token;
792
- var _useApi3 = (0, _orderingComponentsExternal.useApi)(),
793
- _useApi4 = _slicedToArray(_useApi3, 1),
794
- ordering = _useApi4[0];
789
+ var _useApi = (0, _orderingComponentsExternal.useApi)(),
790
+ _useApi2 = _slicedToArray(_useApi, 1),
791
+ ordering = _useApi2[0];
795
792
  var _useLanguage3 = (0, _orderingComponentsExternal.useLanguage)(),
796
793
  _useLanguage4 = _slicedToArray(_useLanguage3, 2),
797
794
  t = _useLanguage4[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-external",
3
- "version": "14.1.44",
3
+ "version": "14.1.46",
4
4
  "description": "Ordering UI Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -88,7 +88,7 @@
88
88
  "lodash": "^4.17.19",
89
89
  "moment": "^2.29.4",
90
90
  "nanoid": "^4.0.0",
91
- "ordering-components-external": "13.0.39",
91
+ "ordering-components-external": "13.0.40",
92
92
  "payment": "^2.4.6",
93
93
  "polished": "^3.6.6",
94
94
  "react-bootstrap-icons": "^1.7.2",
@@ -13,7 +13,7 @@ const BusinessesMapUI = (props) => {
13
13
  } = props
14
14
 
15
15
  const [configState] = useConfig()
16
- const [orderState] = useOrder()
16
+ const [{ options, loading }] = useOrder()
17
17
  const theme = useTheme()
18
18
  const googleMapsControls = {
19
19
  defaultZoom: 18,
@@ -29,43 +29,29 @@ const BusinessesMapUI = (props) => {
29
29
  }
30
30
 
31
31
  return (
32
- <>
33
- {props.beforeElements?.map((BeforeElement, i) => (
34
- <React.Fragment key={i}>
35
- {BeforeElement}
36
- </React.Fragment>))}
37
- {props.beforeComponents?.map((BeforeComponent, i) => (
38
- <BeforeComponent key={i} {...props} />))}
39
- <WrapperMap disabled={orderState.loading}>
40
- <GoogleMapsMap
41
- useMapWithBusinessZones
42
- deactiveAlerts
43
- businessMap
44
- apiKey={configState?.configs?.google_maps_api_key?.value}
45
- location={userLocation}
46
- locations={businessLocations}
47
- mapControls={googleMapsControls}
48
- maxLimitLocation={parseInt(configState?.configs?.meters_to_change_address?.value)}
49
- onBusinessClick={onBusinessClick}
50
- businessZones={businessList?.map(business => business?.zones)}
51
- fallbackIcon={theme.images?.dummies?.businessLogo}
52
- setErrors={setErrors}
53
- fixedLocation={!userLocation && (businessLocations?.length
54
- ? { ...businessLocations[0], hideicon: true }
55
- : {
56
- lat: parseFloat(configState?.configs?.location_default_latitude?.value ?? 0, 10),
57
- lng: parseFloat(configState?.configs?.location_default_longitude?.value ?? 0, 10)
58
- }
59
- )}
60
- />
61
- </WrapperMap>
62
- {props.afterComponents?.map((AfterComponent, i) => (
63
- <AfterComponent key={i} {...props} />))}
64
- {props.afterElements?.map((AfterElement, i) => (
65
- <React.Fragment key={i}>
66
- {AfterElement}
67
- </React.Fragment>))}
68
- </>
32
+ <WrapperMap disabled={loading}>
33
+ <GoogleMapsMap
34
+ useMapWithBusinessZones
35
+ deactiveAlerts
36
+ businessMap
37
+ apiKey={configState?.configs?.google_maps_api_key?.value}
38
+ location={userLocation}
39
+ locations={businessLocations}
40
+ mapControls={googleMapsControls}
41
+ maxLimitLocation={parseInt(configState?.configs?.meters_to_change_address?.value)}
42
+ onBusinessClick={options.type !== 1 ? onBusinessClick : () => {}}
43
+ businessZones={businessList?.map(business => business?.zones)}
44
+ fallbackIcon={theme.images?.dummies?.businessLogo}
45
+ setErrors={setErrors}
46
+ fixedLocation={!userLocation && (businessLocations?.length
47
+ ? { ...businessLocations[0], hideicon: true }
48
+ : {
49
+ lat: parseFloat(configState?.configs?.location_default_latitude?.value ?? 0, 10),
50
+ lng: parseFloat(configState?.configs?.location_default_longitude?.value ?? 0, 10)
51
+ }
52
+ )}
53
+ />
54
+ </WrapperMap>
69
55
  )
70
56
  }
71
57
 
@@ -1,6 +1,5 @@
1
1
  import React, { useState, useEffect, useRef } from 'react'
2
2
  import Skeleton from 'react-loading-skeleton'
3
- import CgSearchLoading from '@meronex/icons/cg/CgSearchLoading'
4
3
  import {
5
4
  Heart,
6
5
  Building,
@@ -23,7 +22,6 @@ import {
23
22
  useEvent
24
23
  } from 'ordering-components-external'
25
24
  import { Alert } from '../Confirm'
26
- import { GoogleGpsButton } from '../../../../../components/GoogleGpsButton'
27
25
  import {
28
26
  FormControl,
29
27
  FormActions,
@@ -458,17 +456,6 @@ const AddressFormUI = (props) => {
458
456
  countryCode={configState?.configs?.country_autocomplete?.value || '*'}
459
457
  />
460
458
  </WrapAddressInput>
461
- <GoogleGpsButton
462
- className='gps-button'
463
- apiKey={googleMapsApiKey}
464
- onAddress={(e) => {
465
- formMethods.setValue('address', e.address)
466
- handleChangeAddress(e)
467
- }}
468
- onError={setMapErrors}
469
- IconButton={GeoAlt}
470
- IconLoadingButton={CgSearchLoading}
471
- />
472
459
  </AddressWrap>
473
460
  )}
474
461
  {(addressState?.address?.location || formState?.changes?.location) && (
@@ -27,7 +27,6 @@ import {
27
27
  AddressListUl,
28
28
  AddressItem,
29
29
  AddressItemActions,
30
- WrappNotAddresses,
31
30
  FormActions,
32
31
  ContinueButton,
33
32
  AddressTitle,
@@ -105,7 +105,7 @@ export const AddressItemActions = styled.div`
105
105
  cursor: pointer;
106
106
  margin: 0px 5px;
107
107
  font-size: 20px;
108
-
108
+
109
109
  svg {
110
110
  color: #B1BCCC;
111
111
  }
@@ -175,7 +175,7 @@ export const ContinueButton = styled.div`
175
175
  width: 100%;
176
176
  position: sticky;
177
177
  bottom: 1px;
178
-
178
+
179
179
  button {
180
180
  width: 100%;
181
181
  white-space: nowrap;
@@ -204,7 +204,7 @@ export const List = styled.div`
204
204
  margin-top: 0px;
205
205
  ` : css`
206
206
  margin-top: 200px;
207
- `}
207
+ `}
208
208
  ${({ addFormRestrictions }) => addFormRestrictions && css`
209
209
  height: 405px;
210
210
  `}
@@ -234,13 +234,19 @@ export const CloseIcon = styled.div`
234
234
  `
235
235
 
236
236
  export const TitleFormContainer = styled.div`
237
- display: flex;
237
+ display: flex;
238
238
  align-items: center;
239
239
  margin-top: 7px;
240
240
  h1 {
241
241
  margin: auto;
242
242
  font-size: 24px;
243
243
  }
244
+
245
+ @media (max-width: 930px) {
246
+ h1 {
247
+ font-size: 18px !important;
248
+ }
249
+ }
244
250
  `
245
251
 
246
252
  export const AddressHoverInfo = styled.span`