ordering-ui-external 1.8.9 → 1.8.10

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 (32) hide show
  1. package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +7 -2
  2. package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +0 -2
  3. package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +2 -2
  4. package/_modules/themes/five/src/components/Checkout/index.js +5 -9
  5. package/_modules/themes/five/src/components/Header/index.js +0 -3
  6. package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +5 -20
  7. package/_modules/themes/five/src/components/PhoneAutocomplete/index.js +0 -4
  8. package/_modules/themes/five/src/components/PlaceSpot/index.js +1 -3
  9. package/_modules/themes/five/src/components/ProductForm/styles.js +1 -1
  10. package/_modules/themes/five/src/components/ProductOptionSubOption/styles.js +1 -1
  11. package/_modules/themes/five/src/components/UserPopover/index.js +4 -14
  12. package/_modules/themes/pwa/src/components/MomentControl/index.js +3 -0
  13. package/_modules/themes/six/src/components/BusinessController/styles.js +1 -1
  14. package/_modules/themes/six/src/components/SearchBar/index.js +2 -4
  15. package/_modules/themes/six/src/components/SearchBar/styles.js +4 -6
  16. package/package.json +1 -1
  17. package/src/themes/five/src/components/BusinessBasicInformation/index.js +10 -0
  18. package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +0 -2
  19. package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +6 -2
  20. package/src/themes/five/src/components/Checkout/index.js +5 -9
  21. package/src/themes/five/src/components/Header/index.js +0 -1
  22. package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +3 -13
  23. package/src/themes/five/src/components/PhoneAutocomplete/index.js +0 -2
  24. package/src/themes/five/src/components/PlaceSpot/index.js +1 -3
  25. package/src/themes/five/src/components/ProductForm/styles.js +0 -1
  26. package/src/themes/five/src/components/ProductOptionSubOption/styles.js +1 -0
  27. package/src/themes/five/src/components/UserPopover/index.js +3 -12
  28. package/src/themes/pwa/src/components/MomentContent/index.js +1 -0
  29. package/src/themes/pwa/src/components/MomentControl/index.js +3 -0
  30. package/src/themes/six/src/components/BusinessController/styles.js +0 -4
  31. package/src/themes/six/src/components/SearchBar/index.js +2 -10
  32. package/src/themes/six/src/components/SearchBar/styles.js +1 -12
@@ -44,7 +44,7 @@ _dayjs.default.extend(_timezone.default);
44
44
  _dayjs.default.extend(_isBetween.default);
45
45
  var types = ['food', 'laundry', 'alcohol', 'groceries'];
46
46
  var BusinessBasicInformation = function BusinessBasicInformation(props) {
47
- var _configs$preorder_sta, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderingTheme$theme$5, _orderingTheme$theme$6, _orderingTheme$theme$7, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _orderingTheme$theme9, _orderingTheme$theme10, _orderingTheme$theme11, _orderingTheme$theme12, _orderingTheme$theme13, _orderingTheme$theme14, _orderingTheme$theme15, _orderingTheme$theme16, _orderingTheme$theme17, _orderingTheme$theme18, _orderingTheme$theme19, _orderingTheme$theme20, _orderingTheme$theme21, _orderingTheme$theme22, _orderingTheme$theme23, _orderingTheme$theme24, _orderingTheme$theme25, _orderingTheme$theme26, _orderingTheme$theme27, _orderingTheme$theme28, _orderingTheme$theme29, _orderingTheme$theme30, _orderingTheme$theme31, _orderingTheme$theme32, _orderingTheme$theme33, _orderingTheme$theme34, _orderingTheme$theme35, _orderingTheme$theme36, _orderingTheme$theme37, _orderingTheme$theme38, _orderingTheme$theme39, _orderingTheme$theme40, _orderingTheme$theme41, _orderingTheme$theme42, _orderingTheme$theme43, _orderingTheme$theme44, _orderingTheme$theme45, _orderingTheme$theme46, _orderingTheme$theme47, _orderingTheme$theme48, _orderingTheme$theme49, _theme$business_view, _theme$business_view$, _theme$business_view$2, _theme$business_view$3, _theme$business_view$4, _orderingTheme$theme50, _orderingTheme$theme51, _orderingTheme$theme52, _orderingTheme$theme53, _orderingTheme$theme54, _orderingTheme$theme55, _orderingTheme$theme56, _orderingTheme$theme57, _orderingTheme$theme58, _orderingTheme$theme59, _orderingTheme$theme60, _orderingTheme$theme61, _orderingTheme$theme62, _theme$business_view2, _theme$business_view3, _theme$business_view4, _theme$business_view5, _theme$business_view6, _props$beforeElements, _props$beforeComponen, _business$reviews3, _business$reviews4, _props$afterComponent, _props$afterElements;
47
+ var _configs$preorder_sta, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderingTheme$theme$5, _orderingTheme$theme$6, _orderingTheme$theme$7, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _orderingTheme$theme9, _orderingTheme$theme10, _orderingTheme$theme11, _orderingTheme$theme12, _orderingTheme$theme13, _orderingTheme$theme14, _orderingTheme$theme15, _orderingTheme$theme16, _orderingTheme$theme17, _orderingTheme$theme18, _orderingTheme$theme19, _orderingTheme$theme20, _orderingTheme$theme21, _orderingTheme$theme22, _orderingTheme$theme23, _orderingTheme$theme24, _orderingTheme$theme25, _orderingTheme$theme26, _orderingTheme$theme27, _orderingTheme$theme28, _orderingTheme$theme29, _orderingTheme$theme30, _orderingTheme$theme31, _orderingTheme$theme32, _orderingTheme$theme33, _orderingTheme$theme34, _orderingTheme$theme35, _orderingTheme$theme36, _orderingTheme$theme37, _orderingTheme$theme38, _orderingTheme$theme39, _orderingTheme$theme40, _orderingTheme$theme41, _orderingTheme$theme42, _orderingTheme$theme43, _orderingTheme$theme44, _orderingTheme$theme45, _orderingTheme$theme46, _orderingTheme$theme47, _orderingTheme$theme48, _orderingTheme$theme49, _theme$business_view, _theme$business_view$, _theme$business_view$2, _theme$business_view$3, _theme$business_view$4, _orderingTheme$theme50, _orderingTheme$theme51, _orderingTheme$theme52, _orderingTheme$theme53, _orderingTheme$theme54, _orderingTheme$theme55, _orderingTheme$theme56, _orderingTheme$theme57, _orderingTheme$theme58, _orderingTheme$theme59, _orderingTheme$theme60, _orderingTheme$theme61, _orderingTheme$theme62, _orderingTheme$theme63, _orderingTheme$theme64, _orderingTheme$theme65, _orderingTheme$theme66, _orderingTheme$theme67, _orderingTheme$theme68, _orderingTheme$theme69, _orderingTheme$theme70, _theme$business_view2, _theme$business_view3, _theme$business_view4, _theme$business_view5, _theme$business_view6, _props$beforeElements, _props$beforeComponen, _business$reviews3, _business$reviews4, _props$afterComponent, _props$afterElements;
48
48
  var isSkeleton = props.isSkeleton,
49
49
  businessState = props.businessState,
50
50
  setOpenBusinessInformation = props.setOpenBusinessInformation,
@@ -103,6 +103,7 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
103
103
  var searchLayout = theme === null || theme === void 0 ? void 0 : (_theme$business_view = theme.business_view) === null || _theme$business_view === void 0 ? void 0 : (_theme$business_view$ = _theme$business_view.components) === null || _theme$business_view$ === void 0 ? void 0 : (_theme$business_view$2 = _theme$business_view$.product_search) === null || _theme$business_view$2 === void 0 ? void 0 : (_theme$business_view$3 = _theme$business_view$2.components) === null || _theme$business_view$3 === void 0 ? void 0 : (_theme$business_view$4 = _theme$business_view$3.layout) === null || _theme$business_view$4 === void 0 ? void 0 : _theme$business_view$4.type;
104
104
  var hideCity = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme50 = orderingTheme.theme) === null || _orderingTheme$theme50 === void 0 ? void 0 : (_orderingTheme$theme51 = _orderingTheme$theme50.business_view) === null || _orderingTheme$theme51 === void 0 ? void 0 : (_orderingTheme$theme52 = _orderingTheme$theme51.components) === null || _orderingTheme$theme52 === void 0 ? void 0 : (_orderingTheme$theme53 = _orderingTheme$theme52.header) === null || _orderingTheme$theme53 === void 0 ? void 0 : (_orderingTheme$theme54 = _orderingTheme$theme53.components) === null || _orderingTheme$theme54 === void 0 ? void 0 : (_orderingTheme$theme55 = _orderingTheme$theme54.business) === null || _orderingTheme$theme55 === void 0 ? void 0 : (_orderingTheme$theme56 = _orderingTheme$theme55.components) === null || _orderingTheme$theme56 === void 0 ? void 0 : (_orderingTheme$theme57 = _orderingTheme$theme56.city) === null || _orderingTheme$theme57 === void 0 ? void 0 : _orderingTheme$theme57.hidden;
105
105
  var isChew = (orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme58 = orderingTheme.theme) === null || _orderingTheme$theme58 === void 0 ? void 0 : (_orderingTheme$theme59 = _orderingTheme$theme58.header) === null || _orderingTheme$theme59 === void 0 ? void 0 : (_orderingTheme$theme60 = _orderingTheme$theme59.components) === null || _orderingTheme$theme60 === void 0 ? void 0 : (_orderingTheme$theme61 = _orderingTheme$theme60.layout) === null || _orderingTheme$theme61 === void 0 ? void 0 : (_orderingTheme$theme62 = _orderingTheme$theme61.type) === null || _orderingTheme$theme62 === void 0 ? void 0 : _orderingTheme$theme62.toLowerCase()) === 'chew';
106
+ var showBusinessInfo = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme63 = orderingTheme.theme) !== null && _orderingTheme$theme63 !== void 0 && (_orderingTheme$theme64 = _orderingTheme$theme63.business_view) !== null && _orderingTheme$theme64 !== void 0 && (_orderingTheme$theme65 = _orderingTheme$theme64.components) !== null && _orderingTheme$theme65 !== void 0 && (_orderingTheme$theme66 = _orderingTheme$theme65.header) !== null && _orderingTheme$theme66 !== void 0 && (_orderingTheme$theme67 = _orderingTheme$theme66.components) !== null && _orderingTheme$theme67 !== void 0 && (_orderingTheme$theme68 = _orderingTheme$theme67.business) !== null && _orderingTheme$theme68 !== void 0 && (_orderingTheme$theme69 = _orderingTheme$theme68.components) !== null && _orderingTheme$theme69 !== void 0 && (_orderingTheme$theme70 = _orderingTheme$theme69.business_info) !== null && _orderingTheme$theme70 !== void 0 && _orderingTheme$theme70.hidden) && !isChew;
106
107
  var layoutsWithOldSearch = ['starbucks', 'old', 'floating'];
107
108
  var hideSearch = layoutsWithOldSearch.includes(theme === null || theme === void 0 ? void 0 : (_theme$business_view2 = theme.business_view) === null || _theme$business_view2 === void 0 ? void 0 : (_theme$business_view3 = _theme$business_view2.components) === null || _theme$business_view3 === void 0 ? void 0 : (_theme$business_view4 = _theme$business_view3.product_search) === null || _theme$business_view4 === void 0 ? void 0 : (_theme$business_view5 = _theme$business_view4.components) === null || _theme$business_view5 === void 0 ? void 0 : (_theme$business_view6 = _theme$business_view5.layout) === null || _theme$business_view6 === void 0 ? void 0 : _theme$business_view6.type);
108
109
  var getBusinessType = function getBusinessType() {
@@ -210,7 +211,11 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
210
211
  }, 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, {
211
212
  width: isCustomerMode ? 100 : 150,
212
213
  height: isCustomerMode ? 35 : 'auto'
213
- }), 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", {
214
+ }), showBusinessInfo && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !loading ? /*#__PURE__*/_react.default.createElement("p", {
215
+ className: "type"
216
+ }, getBusinessType()) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
217
+ width: isCustomerMode ? 100 : 150
218
+ })), 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", {
214
219
  className: "type"
215
220
  }, 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, {
216
221
  width: isCustomerMode ? 100 : 150
@@ -202,7 +202,6 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
202
202
  isCustomLayout: isCustomLayout
203
203
  }, /*#__PURE__*/_react.default.createElement(_SearchBar.SearchBar, {
204
204
  lazyLoad: true,
205
- isStarbucks: true,
206
205
  search: searchValue,
207
206
  isCustomLayout: true,
208
207
  placeholder: t('SEARCH_BUSINESSES', 'Search Businesses'),
@@ -266,7 +265,6 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
266
265
  isCustomLayout: isCustomLayout
267
266
  }, /*#__PURE__*/_react.default.createElement(_SearchBar.SearchBar, {
268
267
  lazyLoad: true,
269
- isStarbucks: true,
270
268
  search: searchValue,
271
269
  isCustomLayout: isCustomLayout,
272
270
  placeholder: t('SEARCH_BUSINESSES', 'Search Businesses'),
@@ -10,11 +10,11 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
10
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
11
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
12
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
13
- var BusinessContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 100%;\n margin-top: 0;\n"])));
13
+ var BusinessContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 100%;\n margin-top: 0;\n @media (min-width: 577px){\n margin-top: 35px\n }\n"])));
14
14
  exports.BusinessContainer = BusinessContainer;
15
15
  var BusinessList = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n"])));
16
16
  exports.BusinessList = BusinessList;
17
- var WrapperSearch = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n position: relative;\n padding: 30px;\n input {\n border-bottom: 1px solid #ccc;\n }\n svg{\n ", "\n }\n @media (min-width: 850px) {\n width: 100%;\n box-shadow: 0px -2px 1px 4px lightgrey;\n }\n\n ", "\n"])), function (_ref) {
17
+ var WrapperSearch = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n position: relative;\n padding: 15px 10px 15px 25px;\n input {\n border-bottom: 1px solid #ccc;\n }\n svg{\n ", "\n }\n @media (min-width: 850px) {\n width: 100%;\n box-shadow: 0px -2px 1px 4px lightgrey;\n }\n \n \n ", "\n"])), function (_ref) {
18
18
  var _theme$business_listi, _theme$business_listi2, _theme$business_listi3;
19
19
  var theme = _ref.theme;
20
20
  return (theme === null || theme === void 0 ? void 0 : (_theme$business_listi = theme.business_listing_view) === null || _theme$business_listi === void 0 ? void 0 : (_theme$business_listi2 = _theme$business_listi.components) === null || _theme$business_listi2 === void 0 ? void 0 : (_theme$business_listi3 = _theme$business_listi2.layout) === null || _theme$business_listi3 === void 0 ? void 0 : _theme$business_listi3.type) === 'mapview' && (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n right: 5px;\n transform: translateY(70%);\n cursor: pointer;\n "])));
@@ -59,7 +59,7 @@ var mapConfigs = {
59
59
  }
60
60
  };
61
61
  var CheckoutUI = function CheckoutUI(props) {
62
- var _businessDetails$busi, _businessDetails$busi2, _configs$table_numer_, _businessConfigs$find, _businessConfigs$find2, _configs$cash_wallet, _configs$wallet_enabl, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _cartState$cart, _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _validationFields$fie4, _validationFields$fie5, _validationFields$fie6, _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _instructionsOptions$, _instructionsOptions$2, _businessDetails$busi3, _businessDetails$busi4, _theme$images, _theme$images$dummies, _configs$google_maps_, _customerState$user, _customerState$user2, _Object$values, _businessDetails$busi5, _businessDetails$busi6, _businessDetails$busi7, _businessDetails$busi8, _businessDetails$erro, _businessDetails$erro2, _businessDetails$busi9, _businessDetails$busi10, _businessDetails$busi11, _validationFields$fie15, _validationFields$fie16, _validationFields$fie17, _configs$driver_tip_t, _configs$driver_tip_u, _configs$driver_tip_t2, _cartState$cart$spot_, _cartState$cart2, _validationFields$fie18, _validationFields$fie19, _validationFields$fie20, _configs$driver_tip_t3, _configs$driver_tip_u2, _configs$driver_tip_t4, _cart$products2, _validationFields$fie21, _validationFields$fie22, _validationFields$fie23, _validationFields$fie24, _validationFields$fie25, _validationFields$fie26, _customerState$user3;
62
+ var _businessDetails$busi, _businessDetails$busi2, _businessConfigs$find, _businessConfigs$find2, _configs$cash_wallet, _configs$wallet_enabl, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _cartState$cart, _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _validationFields$fie4, _validationFields$fie5, _validationFields$fie6, _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _instructionsOptions$, _instructionsOptions$2, _businessDetails$busi3, _businessDetails$busi4, _theme$images, _theme$images$dummies, _configs$google_maps_, _customerState$user, _customerState$user2, _Object$values, _businessDetails$busi5, _businessDetails$busi6, _businessDetails$busi7, _businessDetails$busi8, _businessDetails$erro, _businessDetails$erro2, _businessDetails$busi9, _businessDetails$busi10, _businessDetails$busi11, _validationFields$fie15, _validationFields$fie16, _validationFields$fie17, _configs$driver_tip_t, _configs$driver_tip_u, _configs$driver_tip_t2, _cartState$cart$spot_, _cartState$cart2, _validationFields$fie18, _validationFields$fie19, _validationFields$fie20, _configs$driver_tip_t3, _configs$driver_tip_u2, _configs$driver_tip_t4, _cart$products2, _validationFields$fie21, _validationFields$fie22, _validationFields$fie23, _validationFields$fie24, _validationFields$fie25, _validationFields$fie26, _customerState$user3;
63
63
  var cart = props.cart,
64
64
  errors = props.errors,
65
65
  placing = props.placing,
@@ -77,9 +77,7 @@ var CheckoutUI = function CheckoutUI(props) {
77
77
  instructionsOptions = props.instructionsOptions,
78
78
  deliveryOptionSelected = props.deliveryOptionSelected,
79
79
  handleStoreRedirect = props.handleStoreRedirect,
80
- onPlaceOrderClick = props.onPlaceOrderClick,
81
- setPlaceSpotNumber = props.setPlaceSpotNumber,
82
- placeSpotNumber = props.placeSpotNumber;
80
+ onPlaceOrderClick = props.onPlaceOrderClick;
83
81
  var theme = (0, _styledComponents.useTheme)();
84
82
  var _useValidationFields = (0, _orderingComponentsExternal.useValidationFields)(),
85
83
  _useValidationFields2 = _slicedToArray(_useValidationFields, 1),
@@ -145,7 +143,6 @@ var CheckoutUI = function CheckoutUI(props) {
145
143
  isSuccess = _useState16[0],
146
144
  setIsSuccess = _useState16[1];
147
145
  var businessConfigs = (_businessDetails$busi = businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$busi2 = businessDetails.business) === null || _businessDetails$busi2 === void 0 ? void 0 : _businessDetails$busi2.configs) !== null && _businessDetails$busi !== void 0 ? _businessDetails$busi : [];
148
- var isTableNumberEnabled = configs === null || configs === void 0 ? void 0 : (_configs$table_numer_ = configs.table_numer_enabled) === null || _configs$table_numer_ === void 0 ? void 0 : _configs$table_numer_.value;
149
146
  var isWalletCashEnabled = ((_businessConfigs$find = businessConfigs.find(function (config) {
150
147
  return config.key === 'wallet_cash_enabled';
151
148
  })) === null || _businessConfigs$find === void 0 ? void 0 : _businessConfigs$find.value) === '1';
@@ -158,7 +155,7 @@ var CheckoutUI = function CheckoutUI(props) {
158
155
  var placeSpotsEnabled = placeSpotTypes.includes(options === null || options === void 0 ? void 0 : options.type) && !useKioskApp;
159
156
  // const [hasBusinessPlaces, setHasBusinessPlaces] = useState(null)
160
157
 
161
- var isDisablePlaceOrderButton = !(cart !== null && cart !== void 0 && cart.valid) || !paymethodSelected && (cart === null || cart === void 0 ? void 0 : cart.balance) > 0 || placing || errorCash || loading || isTableNumberEnabled === '1' && (options === null || options === void 0 ? void 0 : options.type) === 3 && !(cartState !== null && cartState !== void 0 && (_cartState$cart = cartState.cart) !== null && _cartState$cart !== void 0 && _cartState$cart.spot_number || cart !== null && cart !== void 0 && cart.spot_number || placeSpotNumber) || !(cart !== null && cart !== void 0 && cart.valid_maximum) || !(cart !== null && cart !== void 0 && cart.valid_minimum) && !((cart === null || cart === void 0 ? void 0 : cart.discount_type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.discount_rate) === 100) ||
158
+ var isDisablePlaceOrderButton = !(cart !== null && cart !== void 0 && cart.valid) || !paymethodSelected && (cart === null || cart === void 0 ? void 0 : cart.balance) > 0 || placing || errorCash || loading || (options === null || options === void 0 ? void 0 : options.type) === 3 && !(cartState !== null && cartState !== void 0 && (_cartState$cart = cartState.cart) !== null && _cartState$cart !== void 0 && _cartState$cart.spot_number || cart !== null && cart !== void 0 && cart.spot_number) || !(cart !== null && cart !== void 0 && cart.valid_maximum) || !(cart !== null && cart !== void 0 && cart.valid_minimum) && !((cart === null || cart === void 0 ? void 0 : cart.discount_type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.discount_rate) === 100) ||
162
159
  // (((placeSpotTypes.includes(options?.type) && !cart?.place) && hasBusinessPlaces)) ||
163
160
  options.type === 1 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie = validationFields.fields) === null || _validationFields$fie === void 0 ? void 0 : (_validationFields$fie2 = _validationFields$fie.checkout) === null || _validationFields$fie2 === void 0 ? void 0 : (_validationFields$fie3 = _validationFields$fie2.driver_tip) === null || _validationFields$fie3 === void 0 ? void 0 : _validationFields$fie3.enabled) && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie4 = validationFields.fields) === null || _validationFields$fie4 === void 0 ? void 0 : (_validationFields$fie5 = _validationFields$fie4.checkout) === null || _validationFields$fie5 === void 0 ? void 0 : (_validationFields$fie6 = _validationFields$fie5.driver_tip) === null || _validationFields$fie6 === void 0 ? void 0 : _validationFields$fie6.required) && Number(cart === null || cart === void 0 ? void 0 : cart.driver_tip) <= 0;
164
161
  var driverTipsOptions = typeof (configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_o = configs.driver_tip_options) === null || _configs$driver_tip_o === void 0 ? void 0 : _configs$driver_tip_o.value) === 'string' ? JSON.parse(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_o2 = configs.driver_tip_options) === null || _configs$driver_tip_o2 === void 0 ? void 0 : _configs$driver_tip_o2.value) || [] : (configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_o3 = configs.driver_tip_options) === null || _configs$driver_tip_o3 === void 0 ? void 0 : _configs$driver_tip_o3.value) || [];
@@ -414,8 +411,7 @@ var CheckoutUI = function CheckoutUI(props) {
414
411
  isHomeStyle: true,
415
412
  cart: cart,
416
413
  spotNumberDefault: (_cartState$cart$spot_ = cartState === null || cartState === void 0 ? void 0 : (_cartState$cart2 = cartState.cart) === null || _cartState$cart2 === void 0 ? void 0 : _cartState$cart2.spot_number) !== null && _cartState$cart$spot_ !== void 0 ? _cartState$cart$spot_ : cart === null || cart === void 0 ? void 0 : cart.spot_number,
417
- vehicleDefault: cart === null || cart === void 0 ? void 0 : cart.vehicle,
418
- setPlaceSpotNumber: setPlaceSpotNumber
414
+ vehicleDefault: cart === null || cart === void 0 ? void 0 : cart.vehicle
419
415
  })), !isMultiDriverTips && !cartState.loading && cart && (cart === null || cart === void 0 ? void 0 : cart.business_id) && options.type === 1 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie18 = validationFields.fields) === null || _validationFields$fie18 === void 0 ? void 0 : (_validationFields$fie19 = _validationFields$fie18.checkout) === null || _validationFields$fie19 === void 0 ? void 0 : (_validationFields$fie20 = _validationFields$fie19.driver_tip) === null || _validationFields$fie20 === void 0 ? void 0 : _validationFields$fie20.enabled) && driverTipsOptions.length > 0 && !useKioskApp && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.DriverTipContainer, null, /*#__PURE__*/_react.default.createElement("h1", null, t('DRIVER_TIPS', 'Driver Tips')), /*#__PURE__*/_react.default.createElement("p", null, t('100%_OF_THE_TIP_YOUR_DRIVER', '100% of the tip goes to your driver')), /*#__PURE__*/_react.default.createElement(_DriverTips.DriverTips, {
420
416
  businessId: cart === null || cart === void 0 ? void 0 : cart.business_id,
421
417
  driverTipsOptions: driverTipsOptions,
@@ -441,7 +437,7 @@ var CheckoutUI = function CheckoutUI(props) {
441
437
  onClick: function onClick() {
442
438
  return handlePlaceOrder();
443
439
  }
444
- }, !(cart !== null && cart !== void 0 && cart.valid_maximum) ? "".concat(t('MAXIMUM_SUBTOTAL_ORDER', 'Maximum subtotal order'), ": ").concat(parsePrice(cart === null || cart === void 0 ? void 0 : cart.maximum)) : !(cart !== null && cart !== void 0 && cart.valid_minimum) && !((cart === null || cart === void 0 ? void 0 : cart.discount_type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.discount_rate) === 100) ? "".concat(t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:'), " ").concat(parsePrice(cart === null || cart === void 0 ? void 0 : cart.minimum)) : placing ? t('PLACING', 'Placing') : t('PLACE_ORDER', 'Place Order'))), !(cart !== null && cart !== void 0 && cart.valid_address) && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('INVALID_CART_ADDRESS', 'Selected address is invalid, please select a closer address.')), !paymethodSelected && (cart === null || cart === void 0 ? void 0 : cart.balance) > 0 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_NOT_PAYMENT_SELECTED', 'Please, select a payment method to place order.')), !(cart !== null && cart !== void 0 && cart.valid_products) && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_INVALID_PRODUCTS', 'Some products are invalid, please check them.')), isTableNumberEnabled === '1' && (options === null || options === void 0 ? void 0 : options.type) === 3 && !(cart !== null && cart !== void 0 && cart.spot_number || placeSpotNumber) && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_PLACE_SPOT', 'Please, select your spot to place order.')), options.type === 1 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie21 = validationFields.fields) === null || _validationFields$fie21 === void 0 ? void 0 : (_validationFields$fie22 = _validationFields$fie21.checkout) === null || _validationFields$fie22 === void 0 ? void 0 : (_validationFields$fie23 = _validationFields$fie22.driver_tip) === null || _validationFields$fie23 === void 0 ? void 0 : _validationFields$fie23.enabled) && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie24 = validationFields.fields) === null || _validationFields$fie24 === void 0 ? void 0 : (_validationFields$fie25 = _validationFields$fie24.checkout) === null || _validationFields$fie25 === void 0 ? void 0 : (_validationFields$fie26 = _validationFields$fie25.driver_tip) === null || _validationFields$fie26 === void 0 ? void 0 : _validationFields$fie26.required) && Number(cart === null || cart === void 0 ? void 0 : cart.driver_tip) <= 0 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_INVALID_DRIVER_TIP', 'Driver Tip is required.'))), windowSize.width < 576 && !cartState.loading && cart && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.MobileWrapperPlaceOrderButton, null, /*#__PURE__*/_react.default.createElement("span", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.total)), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
440
+ }, !(cart !== null && cart !== void 0 && cart.valid_maximum) ? "".concat(t('MAXIMUM_SUBTOTAL_ORDER', 'Maximum subtotal order'), ": ").concat(parsePrice(cart === null || cart === void 0 ? void 0 : cart.maximum)) : !(cart !== null && cart !== void 0 && cart.valid_minimum) && !((cart === null || cart === void 0 ? void 0 : cart.discount_type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.discount_rate) === 100) ? "".concat(t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:'), " ").concat(parsePrice(cart === null || cart === void 0 ? void 0 : cart.minimum)) : placing ? t('PLACING', 'Placing') : t('PLACE_ORDER', 'Place Order'))), !(cart !== null && cart !== void 0 && cart.valid_address) && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('INVALID_CART_ADDRESS', 'Selected address is invalid, please select a closer address.')), !paymethodSelected && (cart === null || cart === void 0 ? void 0 : cart.balance) > 0 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_NOT_PAYMENT_SELECTED', 'Please, select a payment method to place order.')), !(cart !== null && cart !== void 0 && cart.valid_products) && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_INVALID_PRODUCTS', 'Some products are invalid, please check them.')), (options === null || options === void 0 ? void 0 : options.type) === 3 && !(cart !== null && cart !== void 0 && cart.spot_number) && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_PLACE_SPOT', 'Please, select your spot to place order.')), options.type === 1 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie21 = validationFields.fields) === null || _validationFields$fie21 === void 0 ? void 0 : (_validationFields$fie22 = _validationFields$fie21.checkout) === null || _validationFields$fie22 === void 0 ? void 0 : (_validationFields$fie23 = _validationFields$fie22.driver_tip) === null || _validationFields$fie23 === void 0 ? void 0 : _validationFields$fie23.enabled) && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie24 = validationFields.fields) === null || _validationFields$fie24 === void 0 ? void 0 : (_validationFields$fie25 = _validationFields$fie24.checkout) === null || _validationFields$fie25 === void 0 ? void 0 : (_validationFields$fie26 = _validationFields$fie25.driver_tip) === null || _validationFields$fie26 === void 0 ? void 0 : _validationFields$fie26.required) && Number(cart === null || cart === void 0 ? void 0 : cart.driver_tip) <= 0 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_INVALID_DRIVER_TIP', 'Driver Tip is required.'))), windowSize.width < 576 && !cartState.loading && cart && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.MobileWrapperPlaceOrderButton, null, /*#__PURE__*/_react.default.createElement("span", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.total)), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
445
441
  color: !(cart !== null && cart !== void 0 && cart.valid_maximum) || !(cart !== null && cart !== void 0 && cart.valid_minimum) && !((cart === null || cart === void 0 ? void 0 : cart.discount_type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.discount_rate) === 100) ? 'secundary' : 'primary'
446
442
  // disabled={isDisablePlaceOrderButton}
447
443
  ,
@@ -371,9 +371,6 @@ var Header = function Header(props) {
371
371
  withLogout: true,
372
372
  isCustomerMode: isCustomerMode,
373
373
  open: openPopover.user,
374
- handleOpenAddressModal: function handleOpenAddressModal() {
375
- return openModal('address');
376
- },
377
374
  onClick: function onClick() {
378
375
  return handleTogglePopover('user');
379
376
  },
@@ -33,7 +33,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
33
33
  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; } }
34
34
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
35
35
  var OriginalHomeHero = function OriginalHomeHero(props) {
36
- var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderingTheme$theme$5, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _orderingTheme$theme9, _orderingTheme$theme10, _orderingTheme$theme11, _orderingTheme$theme12, _orderingTheme$theme13, _orderingTheme$theme14, _orderingTheme$theme15, _orderingTheme$theme16, _orderingTheme$theme17, _orderingTheme$theme18, _orderingTheme$theme19, _orderingTheme$theme20, _orderingTheme$theme21, _orderingTheme$theme22, _orderingTheme$theme23, _orderingTheme$theme24, _orderingTheme$theme25, _orderingTheme$theme26, _orderingTheme$theme27, _configs$powered_by_o, _theme$images, _theme$images$general, _theme$images2, _theme$images2$genera, _theme$images3, _theme$images3$logos, _theme$defaultLanguag, _theme$defaultLanguag2, _orderState$options3, _orderState$options3$, _theme$defaultLanguag3, _theme$defaultLanguag4, _theme$defaultLanguag5, _orderState$options4, _theme$defaultLanguag6, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9, _theme$defaultLanguag10;
36
+ var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderingTheme$theme$5, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _orderingTheme$theme9, _orderingTheme$theme10, _orderingTheme$theme11, _orderingTheme$theme12, _orderingTheme$theme13, _orderingTheme$theme14, _orderingTheme$theme15, _orderingTheme$theme16, _orderingTheme$theme17, _orderingTheme$theme18, _orderingTheme$theme19, _orderingTheme$theme20, _configs$powered_by_o, _theme$images, _theme$images$general, _theme$images2, _theme$images2$genera, _theme$images3, _theme$images3$logos, _theme$defaultLanguag, _theme$defaultLanguag2, _orderState$options2, _orderState$options2$, _theme$defaultLanguag3, _theme$defaultLanguag4, _theme$defaultLanguag5, _orderState$options3, _theme$defaultLanguag6, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9, _theme$defaultLanguag10;
37
37
  var onFindBusiness = props.onFindBusiness;
38
38
  var _useSession = (0, _orderingComponentsExternal.useSession)(),
39
39
  _useSession2 = _slicedToArray(_useSession, 2),
@@ -69,15 +69,10 @@ var OriginalHomeHero = function OriginalHomeHero(props) {
69
69
  _useState6 = _slicedToArray(_useState5, 2),
70
70
  modalPageToShow = _useState6[0],
71
71
  setModalPageToShow = _useState6[1];
72
- var _useState7 = (0, _react.useState)(false),
73
- _useState8 = _slicedToArray(_useState7, 2),
74
- newAddressModalOpened = _useState8[0],
75
- setNewAddressModalOpened = _useState8[1];
76
72
  var isShowLoginAccount = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme = orderingTheme.theme) !== null && _orderingTheme$theme !== void 0 && (_orderingTheme$theme$ = _orderingTheme$theme.mobile_view_web) !== null && _orderingTheme$theme$ !== void 0 && (_orderingTheme$theme$2 = _orderingTheme$theme$.components) !== null && _orderingTheme$theme$2 !== void 0 && (_orderingTheme$theme$3 = _orderingTheme$theme$2.home) !== null && _orderingTheme$theme$3 !== void 0 && (_orderingTheme$theme$4 = _orderingTheme$theme$3.components) !== null && _orderingTheme$theme$4 !== void 0 && (_orderingTheme$theme$5 = _orderingTheme$theme$4.login_account) !== null && _orderingTheme$theme$5 !== void 0 && _orderingTheme$theme$5.hidden);
77
73
  var bgImg = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme2 = orderingTheme.theme) === null || _orderingTheme$theme2 === void 0 ? void 0 : (_orderingTheme$theme3 = _orderingTheme$theme2.my_products) === null || _orderingTheme$theme3 === void 0 ? void 0 : (_orderingTheme$theme4 = _orderingTheme$theme3.components) === null || _orderingTheme$theme4 === void 0 ? void 0 : (_orderingTheme$theme5 = _orderingTheme$theme4.images) === null || _orderingTheme$theme5 === void 0 ? void 0 : (_orderingTheme$theme6 = _orderingTheme$theme5.components) === null || _orderingTheme$theme6 === void 0 ? void 0 : (_orderingTheme$theme7 = _orderingTheme$theme6.homepage_background) === null || _orderingTheme$theme7 === void 0 ? void 0 : (_orderingTheme$theme8 = _orderingTheme$theme7.components) === null || _orderingTheme$theme8 === void 0 ? void 0 : _orderingTheme$theme8.image;
78
74
  var logo = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme9 = orderingTheme.theme) === null || _orderingTheme$theme9 === void 0 ? void 0 : (_orderingTheme$theme10 = _orderingTheme$theme9.my_products) === null || _orderingTheme$theme10 === void 0 ? void 0 : (_orderingTheme$theme11 = _orderingTheme$theme10.components) === null || _orderingTheme$theme11 === void 0 ? void 0 : (_orderingTheme$theme12 = _orderingTheme$theme11.images) === null || _orderingTheme$theme12 === void 0 ? void 0 : (_orderingTheme$theme13 = _orderingTheme$theme12.components) === null || _orderingTheme$theme13 === void 0 ? void 0 : (_orderingTheme$theme14 = _orderingTheme$theme13.logo) === null || _orderingTheme$theme14 === void 0 ? void 0 : (_orderingTheme$theme15 = _orderingTheme$theme14.components) === null || _orderingTheme$theme15 === void 0 ? void 0 : _orderingTheme$theme15.image;
79
- var mobileBgImg = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme16 = orderingTheme.theme) === null || _orderingTheme$theme16 === void 0 ? void 0 : (_orderingTheme$theme17 = _orderingTheme$theme16.my_products) === null || _orderingTheme$theme17 === void 0 ? void 0 : (_orderingTheme$theme18 = _orderingTheme$theme17.components) === null || _orderingTheme$theme18 === void 0 ? void 0 : (_orderingTheme$theme19 = _orderingTheme$theme18.images) === null || _orderingTheme$theme19 === void 0 ? void 0 : (_orderingTheme$theme20 = _orderingTheme$theme19.components) === null || _orderingTheme$theme20 === void 0 ? void 0 : (_orderingTheme$theme21 = _orderingTheme$theme20.homepage_mobile_background) === null || _orderingTheme$theme21 === void 0 ? void 0 : (_orderingTheme$theme22 = _orderingTheme$theme21.components) === null || _orderingTheme$theme22 === void 0 ? void 0 : _orderingTheme$theme22.image;
80
- var isFullScreen = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme23 = orderingTheme.theme) === null || _orderingTheme$theme23 === void 0 ? void 0 : (_orderingTheme$theme24 = _orderingTheme$theme23.my_products) === null || _orderingTheme$theme24 === void 0 ? void 0 : (_orderingTheme$theme25 = _orderingTheme$theme24.components) === null || _orderingTheme$theme25 === void 0 ? void 0 : (_orderingTheme$theme26 = _orderingTheme$theme25.images) === null || _orderingTheme$theme26 === void 0 ? void 0 : (_orderingTheme$theme27 = _orderingTheme$theme26.components) === null || _orderingTheme$theme27 === void 0 ? void 0 : _orderingTheme$theme27.homepage_image_fullscreen;
75
+ var isFullScreen = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme16 = orderingTheme.theme) === null || _orderingTheme$theme16 === void 0 ? void 0 : (_orderingTheme$theme17 = _orderingTheme$theme16.my_products) === null || _orderingTheme$theme17 === void 0 ? void 0 : (_orderingTheme$theme18 = _orderingTheme$theme17.components) === null || _orderingTheme$theme18 === void 0 ? void 0 : (_orderingTheme$theme19 = _orderingTheme$theme18.images) === null || _orderingTheme$theme19 === void 0 ? void 0 : (_orderingTheme$theme20 = _orderingTheme$theme19.components) === null || _orderingTheme$theme20 === void 0 ? void 0 : _orderingTheme$theme20.homepage_image_fullscreen;
81
76
  var enabledPoweredByOrdering = configs === null || configs === void 0 ? void 0 : (_configs$powered_by_o = configs.powered_by_ordering_module) === null || _configs$powered_by_o === void 0 ? void 0 : _configs$powered_by_o.value;
82
77
  var handleFindBusinesses = function handleFindBusinesses() {
83
78
  var _orderState$options, _orderState$options$a;
@@ -137,19 +132,9 @@ var OriginalHomeHero = function OriginalHomeHero(props) {
137
132
  });
138
133
  };
139
134
  }, []);
140
- (0, _react.useEffect)(function () {
141
- var _orderState$options2, _orderState$options2$;
142
- if (newAddressModalOpened) return;
143
- if (auth && !orderState.loading && !(orderState !== null && orderState !== void 0 && (_orderState$options2 = orderState.options) !== null && _orderState$options2 !== void 0 && (_orderState$options2$ = _orderState$options2.address) !== null && _orderState$options2$ !== void 0 && _orderState$options2$.location)) {
144
- setModals(_objectSpread(_objectSpread({}, modals), {}, {
145
- listOpen: true
146
- }));
147
- setNewAddressModalOpened(true);
148
- }
149
- }, [auth, orderState, newAddressModalOpened]);
150
135
  return /*#__PURE__*/_react.default.createElement(_styles.HeroContainer, {
151
136
  mb: !auth && isShowLoginAccount && '30vh',
152
- bgimage: windowSize.width < 576 ? mobileBgImg || ((_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$general = _theme$images.general) === null || _theme$images$general === void 0 ? void 0 : _theme$images$general.homeHeroMobile) : bgImg || ((_theme$images2 = theme.images) === null || _theme$images2 === void 0 ? void 0 : (_theme$images2$genera = _theme$images2.general) === null || _theme$images2$genera === void 0 ? void 0 : _theme$images2$genera.homeHero),
137
+ bgimage: bgImg || (windowSize.width < 576 ? (_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$general = _theme$images.general) === null || _theme$images$general === void 0 ? void 0 : _theme$images$general.homeHeroMobile : (_theme$images2 = theme.images) === null || _theme$images2 === void 0 ? void 0 : (_theme$images2$genera = _theme$images2.general) === null || _theme$images2$genera === void 0 ? void 0 : _theme$images2$genera.homeHero),
153
138
  isFullScreen: isFullScreen
154
139
  }, /*#__PURE__*/_react.default.createElement(_styles.ContentWrapper, null, windowSize.width < 576 && /*#__PURE__*/_react.default.createElement(_styles.LogoWrapper, null, /*#__PURE__*/_react.default.createElement("img", {
155
140
  alt: "Logotype",
@@ -158,7 +143,7 @@ var OriginalHomeHero = function OriginalHomeHero(props) {
158
143
  })), /*#__PURE__*/_react.default.createElement(_styles.HeroContent, null, /*#__PURE__*/_react.default.createElement(_styles.Title, null, t('TITLE_HOME', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag = theme.defaultLanguages) === null || _theme$defaultLanguag === void 0 ? void 0 : _theme$defaultLanguag.TITLE_HOME) || 'All We need is Food.')), /*#__PURE__*/_react.default.createElement(_styles.Slogan, null, t('SUBTITLE_HOME', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag2 = theme.defaultLanguages) === null || _theme$defaultLanguag2 === void 0 ? void 0 : _theme$defaultLanguag2.SUBTITLE_HOME) || 'Let\'s start to order food now')), /*#__PURE__*/_react.default.createElement(_styles.WrapInput, {
159
144
  onClick: handleAddressInput,
160
145
  withIcon: true
161
- }, /*#__PURE__*/_react.default.createElement(_HiOutlineLocationMarker.default, null), /*#__PURE__*/_react.default.createElement("p", null, (orderState === null || orderState === void 0 ? void 0 : (_orderState$options3 = orderState.options) === null || _orderState$options3 === void 0 ? void 0 : (_orderState$options3$ = _orderState$options3.address) === null || _orderState$options3$ === void 0 ? void 0 : _orderState$options3$.address) || t('WHERE_DO_WE_DELIVERY', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag3 = theme.defaultLanguages) === null || _theme$defaultLanguag3 === void 0 ? void 0 : _theme$defaultLanguag3.WHERE_DO_WE_DELIVERY) || 'Where do we delivery?'))), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
146
+ }, /*#__PURE__*/_react.default.createElement(_HiOutlineLocationMarker.default, null), /*#__PURE__*/_react.default.createElement("p", null, (orderState === null || orderState === void 0 ? void 0 : (_orderState$options2 = orderState.options) === null || _orderState$options2 === void 0 ? void 0 : (_orderState$options2$ = _orderState$options2.address) === null || _orderState$options2$ === void 0 ? void 0 : _orderState$options2$.address) || t('WHERE_DO_WE_DELIVERY', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag3 = theme.defaultLanguages) === null || _theme$defaultLanguag3 === void 0 ? void 0 : _theme$defaultLanguag3.WHERE_DO_WE_DELIVERY) || 'Where do we delivery?'))), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
162
147
  color: "primary",
163
148
  name: "find-business",
164
149
  onClick: handleFindBusinesses
@@ -184,7 +169,7 @@ var OriginalHomeHero = function OriginalHomeHero(props) {
184
169
  }
185
170
  }, /*#__PURE__*/_react.default.createElement(_AddressForm.AddressForm, {
186
171
  useValidationFileds: true,
187
- address: (orderState === null || orderState === void 0 ? void 0 : (_orderState$options4 = orderState.options) === null || _orderState$options4 === void 0 ? void 0 : _orderState$options4.address) || {},
172
+ address: (orderState === null || orderState === void 0 ? void 0 : (_orderState$options3 = orderState.options) === null || _orderState$options3 === void 0 ? void 0 : _orderState$options3.address) || {},
188
173
  onClose: function onClose() {
189
174
  return setModals(_objectSpread(_objectSpread({}, modals), {}, {
190
175
  formOpen: false
@@ -129,7 +129,6 @@ var PhoneAutocompleteUI = function PhoneAutocompleteUI(props) {
129
129
  }
130
130
  if (!inputValue) {
131
131
  setInputValue(inputValue);
132
- onChangeNumber(inputValue);
133
132
  }
134
133
  if (inputValue && inputValue.length > 10 || !/^[0-9]+$/.test(inputValue)) {
135
134
  return;
@@ -139,9 +138,6 @@ var PhoneAutocompleteUI = function PhoneAutocompleteUI(props) {
139
138
  };
140
139
  var onChange = function onChange(option) {
141
140
  var _customersPhones$user;
142
- if (!option) {
143
- onChangeNumber('');
144
- }
145
141
  setOptSelected(option);
146
142
  setInputValue(option ? option === null || option === void 0 ? void 0 : option.value : '');
147
143
  var user = (_customersPhones$user = customersPhones.users) === null || _customersPhones$user === void 0 ? void 0 : _customersPhones$user.find(function (user) {
@@ -42,8 +42,7 @@ var PlaceSpotUI = function PlaceSpotUI(props) {
42
42
  setVehicle = props.setVehicle,
43
43
  setSpotState = props.setSpotState,
44
44
  handleChangeSpot = props.handleChangeSpot,
45
- setHasBusinessPlaces = props.setHasBusinessPlaces,
46
- setPlaceSpotNumber = props.setPlaceSpotNumber;
45
+ setHasBusinessPlaces = props.setHasBusinessPlaces;
47
46
  var el = (0, _react.useRef)();
48
47
  var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
49
48
  _useLanguage2 = _slicedToArray(_useLanguage, 2),
@@ -123,7 +122,6 @@ var PlaceSpotUI = function PlaceSpotUI(props) {
123
122
  var _spotNumber = parseFloat(e === null || e === void 0 ? void 0 : (_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : _e$target2.value);
124
123
  _spotNumber = isNaN(_spotNumber) ? null : _spotNumber;
125
124
  setSpotNumber(_spotNumber);
126
- setPlaceSpotNumber(_spotNumber);
127
125
  }
128
126
  };
129
127
  var onChangeSpot = function onChangeSpot() {
@@ -108,7 +108,7 @@ var ProductName = _styledComponents.default.h1(_templateObject31 || (_templateOb
108
108
  exports.ProductName = ProductName;
109
109
  var Properties = _styledComponents.default.div(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n flex-direction: row;\n justify-content: space-between;\n margin-bottom: 20px;\n"])));
110
110
  exports.Properties = Properties;
111
- var ProductDescription = _styledComponents.default.p(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n margin-top: 0px;\n white-space: pre-wrap;\n color: #909BA9;\n"])));
111
+ var ProductDescription = _styledComponents.default.p(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n margin-top: 0px;\n white-space: pre-wrap;\n"])));
112
112
  exports.ProductDescription = ProductDescription;
113
113
  var PriceContent = _styledComponents.default.div(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n gap: 10px;\n > p {\n font-size: 18px;\n line-height: 27px;\n color: #344050;\n margin: 0;\n }\n .offer-price {\n text-decoration: line-through;\n font-size: 16px;\n color: #909BA9;\n }\n"])));
114
114
  exports.PriceContent = PriceContent;
@@ -57,7 +57,7 @@ var PositionControl = _styledComponents.default.div(_templateObject10 || (_templ
57
57
  return ((_props$theme6 = props.theme) === null || _props$theme6 === void 0 ? void 0 : _props$theme6.rtl) && (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-left: 0;\n "])));
58
58
  });
59
59
  exports.PositionControl = PositionControl;
60
- var SuboptionPrice = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n display: flex;\n white-space: nowrap;\n font-weight: 300;\n font-size: 14px;\n color: ", ";\n margin-left: 5px;\n min-width: 60px;\n ", "\n"])), function (props) {
60
+ var SuboptionPrice = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n display: flex;\n white-space: nowrap;\n font-weight: 300;\n font-size: 14px;\n color: ", ";\n margin-left: 5px;\n min-width: 60px;\n max-width: 60px;\n ", "\n"])), function (props) {
61
61
  return props.theme.colors.darkGray;
62
62
  }, function (props) {
63
63
  var _props$theme7;
@@ -50,8 +50,7 @@ var UserPopover = function UserPopover(props) {
50
50
  isHome = props.isHome,
51
51
  optionsList = props.optionsList,
52
52
  withLogout = props.withLogout,
53
- isCustomerMode = props.isCustomerMode,
54
- handleOpenAddressModal = props.handleOpenAddressModal;
53
+ isCustomerMode = props.isCustomerMode;
55
54
  var _useSession = (0, _orderingComponentsExternal.useSession)(),
56
55
  _useSession2 = _slicedToArray(_useSession, 1),
57
56
  sessionState = _useSession2[0];
@@ -67,9 +66,6 @@ var UserPopover = function UserPopover(props) {
67
66
  var _useOrderingTheme = (0, _orderingComponentsExternal.useOrderingTheme)(),
68
67
  _useOrderingTheme2 = _slicedToArray(_useOrderingTheme, 1),
69
68
  orderingTheme = _useOrderingTheme2[0];
70
- var _useOrder = (0, _orderingComponentsExternal.useOrder)(),
71
- _useOrder2 = _slicedToArray(_useOrder, 1),
72
- orderStatus = _useOrder2[0];
73
69
  var referenceElement = (0, _react.useRef)();
74
70
  var popperElement = (0, _react.useRef)();
75
71
  var arrowElement = (0, _react.useRef)();
@@ -126,7 +122,6 @@ var UserPopover = function UserPopover(props) {
126
122
  key: 'places',
127
123
  isActive: isAddressListNewPage
128
124
  }];
129
- var addressRequiredPageNames = ['business_search', 'promotions'];
130
125
  var options = isCustomerMode ? optionsDefault.filter(function (option) {
131
126
  return option.name === 'profile';
132
127
  }) : optionsList || optionsDefault;
@@ -164,14 +159,9 @@ var UserPopover = function UserPopover(props) {
164
159
  }
165
160
  };
166
161
  var handleGoToPage = function handleGoToPage(page) {
167
- var _orderStatus$options, _orderStatus$options$;
168
- if (!((_orderStatus$options = orderStatus.options) !== null && _orderStatus$options !== void 0 && (_orderStatus$options$ = _orderStatus$options.address) !== null && _orderStatus$options$ !== void 0 && _orderStatus$options$.location) && addressRequiredPageNames.includes(page)) {
169
- handleOpenAddressModal();
170
- } else {
171
- events.emit('go_to_page', {
172
- page: page
173
- });
174
- }
162
+ events.emit('go_to_page', {
163
+ page: page
164
+ });
175
165
  props.onClick && props.onClick();
176
166
  };
177
167
  (0, _react.useEffect)(function () {
@@ -144,6 +144,9 @@ var MomentControlUI = function MomentControlUI(props) {
144
144
  setTimeLists(_timeLists);
145
145
  }
146
146
  }, [hoursList]);
147
+ (0, _react.useEffect)(function () {
148
+ if (isASP) handleCheckBoxChange(true);
149
+ }, [isAsap]);
147
150
  return /*#__PURE__*/_react.default.createElement("div", {
148
151
  id: "moment_control"
149
152
  }, (_props$beforeElements = props.beforeElements) === null || _props$beforeElements === void 0 ? void 0 : _props$beforeElements.map(function (BeforeElement, i) {
@@ -13,7 +13,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
14
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
15
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
16
- var ContainerCard = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral([" \n width: 100%;\n position: relative;\n @media (min-width: 768px) {\n padding: 7px 10px 7px 20px;\n margin-bottom: 5px;\n }\n"])));
16
+ var ContainerCard = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral([" \n width: 100%;\n position: relative;\n"])));
17
17
  exports.ContainerCard = ContainerCard;
18
18
  var WrapperBusinessCard = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border-radius: 10px;\n cursor: ", ";\n"])), function (_ref) {
19
19
  var isSkeleton = _ref.isSkeleton;
@@ -9,7 +9,6 @@ var _react = _interopRequireWildcard(require("react"));
9
9
  var _Inputs = require("../../styles/Inputs");
10
10
  var _orderingComponentsExternal = require("ordering-components-external");
11
11
  var _AiOutlineSearch = _interopRequireDefault(require("@meronex/icons/ai/AiOutlineSearch"));
12
- var _reactBootstrapIcons = require("react-bootstrap-icons");
13
12
  var _styles = require("./styles");
14
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -27,8 +26,7 @@ var SearchBar = function SearchBar(props) {
27
26
  search = props.search,
28
27
  placeholder = props.placeholder,
29
28
  lazyLoad = props.lazyLoad,
30
- isCustomLayout = props.isCustomLayout,
31
- isStarbucks = props.isStarbucks;
29
+ isCustomLayout = props.isCustomLayout;
32
30
  var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
33
31
  _useLanguage2 = _slicedToArray(_useLanguage, 2),
34
32
  t = _useLanguage2[1];
@@ -95,7 +93,7 @@ var SearchBar = function SearchBar(props) {
95
93
  onClick: handleClear
96
94
  }, t('CLEAR', 'Clear'))), /*#__PURE__*/_react.default.createElement(_styles.SearchWrapper, {
97
95
  isHome: props.isHome
98
- }, /*#__PURE__*/_react.default.createElement(_AiOutlineSearch.default, null)), isStarbucks && /*#__PURE__*/_react.default.createElement(_styles.FunnelWrapper, null, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Funnel, null))), (_props$afterComponent = props.afterComponents) === null || _props$afterComponent === void 0 ? void 0 : _props$afterComponent.map(function (AfterComponent, i) {
96
+ }, /*#__PURE__*/_react.default.createElement(_AiOutlineSearch.default, null))), (_props$afterComponent = props.afterComponents) === null || _props$afterComponent === void 0 ? void 0 : _props$afterComponent.map(function (AfterComponent, i) {
99
97
  return /*#__PURE__*/_react.default.createElement(AfterComponent, _extends({
100
98
  key: i
101
99
  }, props));
@@ -4,9 +4,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.SearchWrapper = exports.SearchIcon = exports.FunnelWrapper = exports.DeleteContent = exports.BusinessSearch = void 0;
7
+ exports.SearchWrapper = exports.SearchIcon = exports.DeleteContent = exports.BusinessSearch = void 0;
8
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
9
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17;
10
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
11
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
12
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
@@ -48,7 +48,7 @@ var DeleteContent = _styledComponents.default.span(_templateObject11 || (_templa
48
48
  }, function (_ref6) {
49
49
  var isClear = _ref6.isClear,
50
50
  isHome = _ref6.isHome;
51
- return isClear && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n left: initial;\n right: 40px;\n "])));
51
+ return isClear && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n left: initial;\n right: 20px;\n "])));
52
52
  }, function (props) {
53
53
  var _props$theme3;
54
54
  return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n transform: translate(30%, 0%);\n "])));
@@ -59,9 +59,7 @@ var DeleteContent = _styledComponents.default.span(_templateObject11 || (_templa
59
59
  exports.DeleteContent = DeleteContent;
60
60
  var SearchWrapper = (0, _styledComponents.default)(DeleteContent)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral([""])));
61
61
  exports.SearchWrapper = SearchWrapper;
62
- var FunnelWrapper = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n svg {\n position: absolute;\n right: 10px !important;\n color: #ADB5BD;\n width: 20px;\n height: 20px;\n bottom: 22px;\n }\n"])));
63
- exports.FunnelWrapper = FunnelWrapper;
64
- var SearchIcon = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n background-image: url(", ");\n background-position: right 10px center;\n background-repeat: no-repeat;\n background-size: 15px;\n background-color: ", ";\n\n"])), function (props) {
62
+ var SearchIcon = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n background-image: url(", ");\n background-position: right 10px center;\n background-repeat: no-repeat;\n background-size: 15px;\n background-color: ", ";\n\n"])), function (props) {
65
63
  var _props$theme5, _props$theme5$images, _props$theme5$images$;
66
64
  return (_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : (_props$theme5$images = _props$theme5.images) === null || _props$theme5$images === void 0 ? void 0 : (_props$theme5$images$ = _props$theme5$images.general) === null || _props$theme5$images$ === void 0 ? void 0 : _props$theme5$images$.searchIcon;
67
65
  }, function (props) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-external",
3
- "version": "1.8.9",
3
+ "version": "1.8.10",
4
4
  "description": "Ordering UI Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -89,6 +89,7 @@ export const BusinessBasicInformation = (props) => {
89
89
  const searchLayout = theme?.business_view?.components?.product_search?.components?.layout?.type
90
90
  const hideCity = orderingTheme?.theme?.business_view?.components?.header?.components?.business?.components?.city?.hidden
91
91
  const isChew = orderingTheme?.theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
92
+ const showBusinessInfo = !orderingTheme?.theme?.business_view?.components?.header?.components?.business?.components?.business_info?.hidden && !isChew
92
93
  const layoutsWithOldSearch = ['starbucks', 'old', 'floating']
93
94
  const hideSearch = layoutsWithOldSearch.includes(theme?.business_view?.components?.product_search?.components?.layout?.type)
94
95
  const getBusinessType = () => {
@@ -205,6 +206,15 @@ export const BusinessBasicInformation = (props) => {
205
206
  ) : (
206
207
  <Skeleton width={isCustomerMode ? 100 : 150} height={isCustomerMode ? 35 : 'auto'} />
207
208
  )}
209
+ {showBusinessInfo && (
210
+ <>
211
+ {!loading ? (
212
+ <p className='type'>{getBusinessType()}</p>
213
+ ) : (
214
+ <Skeleton width={isCustomerMode ? 100 : 150} />
215
+ )}
216
+ </>
217
+ )}
208
218
  {typeof hideCity !== 'undefined' && !hideCity && business?.city?.name && (
209
219
  <>
210
220
  {!loading ? (
@@ -165,7 +165,6 @@ const BusinessesListingUI = (props) => {
165
165
  <WrapperSearch isCustomLayout={isCustomLayout}>
166
166
  <SearchBar
167
167
  lazyLoad
168
- isStarbucks
169
168
  search={searchValue}
170
169
  isCustomLayout
171
170
  placeholder={t('SEARCH_BUSINESSES', 'Search Businesses')}
@@ -241,7 +240,6 @@ const BusinessesListingUI = (props) => {
241
240
  <WrapperSearch isCustomLayout={isCustomLayout}>
242
241
  <SearchBar
243
242
  lazyLoad
244
- isStarbucks
245
243
  search={searchValue}
246
244
  isCustomLayout={isCustomLayout}
247
245
  placeholder={t('SEARCH_BUSINESSES', 'Search Businesses')}
@@ -4,6 +4,9 @@ export const BusinessContainer = styled.div`
4
4
  flex-direction: column;
5
5
  width: 100%;
6
6
  margin-top: 0;
7
+ @media (min-width: 577px){
8
+ margin-top: 35px
9
+ }
7
10
  `
8
11
  export const BusinessList = styled.div`
9
12
  display: flex;
@@ -14,7 +17,7 @@ export const WrapperSearch = styled.div`
14
17
  display: flex;
15
18
  justify-content: space-between;
16
19
  position: relative;
17
- padding: 30px;
20
+ padding: 15px 10px 15px 25px;
18
21
  input {
19
22
  border-bottom: 1px solid #ccc;
20
23
  }
@@ -30,7 +33,8 @@ export const WrapperSearch = styled.div`
30
33
  width: 100%;
31
34
  box-shadow: 0px -2px 1px 4px lightgrey;
32
35
  }
33
-
36
+
37
+
34
38
  ${({ isCustomLayout }) => isCustomLayout && css`
35
39
  box-sizing: border-box;
36
40
  display: flex;
@@ -89,9 +89,7 @@ const CheckoutUI = (props) => {
89
89
  instructionsOptions,
90
90
  deliveryOptionSelected,
91
91
  handleStoreRedirect,
92
- onPlaceOrderClick,
93
- setPlaceSpotNumber,
94
- placeSpotNumber
92
+ onPlaceOrderClick
95
93
  } = props
96
94
 
97
95
  const theme = useTheme()
@@ -116,7 +114,6 @@ const CheckoutUI = (props) => {
116
114
  const [isSuccess, setIsSuccess] = useState(false)
117
115
 
118
116
  const businessConfigs = businessDetails?.business?.configs ?? []
119
- const isTableNumberEnabled = configs?.table_numer_enabled?.value
120
117
  const isWalletCashEnabled = businessConfigs.find(config => config.key === 'wallet_cash_enabled')?.value === '1'
121
118
  const isWalletCreditPointsEnabled = businessConfigs.find(config => config.key === 'wallet_credit_point_enabled')?.value === '1'
122
119
  const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletCreditPointsEnabled) && !useKioskApp
@@ -131,7 +128,7 @@ const CheckoutUI = (props) => {
131
128
  placing ||
132
129
  errorCash ||
133
130
  loading ||
134
- (isTableNumberEnabled === '1' && (options?.type === 3 && !(cartState?.cart?.spot_number || cart?.spot_number || placeSpotNumber))) ||
131
+ (options?.type === 3 && !(cartState?.cart?.spot_number || cart?.spot_number)) ||
135
132
  !cart?.valid_maximum ||
136
133
  (!cart?.valid_minimum && !(cart?.discount_type === 1 && cart?.discount_rate === 100)) ||
137
134
  // (((placeSpotTypes.includes(options?.type) && !cart?.place) && hasBusinessPlaces)) ||
@@ -465,7 +462,6 @@ const CheckoutUI = (props) => {
465
462
  cart={cart}
466
463
  spotNumberDefault={cartState?.cart?.spot_number ?? cart?.spot_number}
467
464
  vehicleDefault={cart?.vehicle}
468
- setPlaceSpotNumber={setPlaceSpotNumber}
469
465
  />
470
466
  </SelectSpotContainer>
471
467
  )}
@@ -551,7 +547,7 @@ const CheckoutUI = (props) => {
551
547
  </WarningText>
552
548
  )}
553
549
 
554
- {isTableNumberEnabled === '1' && (options?.type === 3 && !(cart?.spot_number || placeSpotNumber)) && (
550
+ {options?.type === 3 && !cart?.spot_number && (
555
551
  <WarningText>
556
552
  {t('WARNING_PLACE_SPOT', 'Please, select your spot to place order.')}
557
553
  </WarningText>
@@ -576,9 +572,9 @@ const CheckoutUI = (props) => {
576
572
  onClick={() => isDisablePlaceOrderButton ? handleScrollTo('.paymentsContainer') : handlePlaceOrder()}
577
573
  >
578
574
  {!cart?.valid_maximum ? (
579
- `${t('MAXIMUM_SUBTOTAL_ORDER', 'Maximum subtotal order')}: ${parsePrice(cart?.maximum)}`
575
+ `${t('MAXIMUM_SUBTOTAL_ORDER', 'Maximum subtotal order')}: ${parsePrice(cart?.maximum)}`
580
576
  ) : (!cart?.valid_minimum && !(cart?.discount_type === 1 && cart?.discount_rate === 100)) ? (
581
- `${t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:')} ${parsePrice(cart?.minimum)}`
577
+ `${t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:')} ${parsePrice(cart?.minimum)}`
582
578
  ) : placing ? t('PLACING', 'Placing') : t('PLACE_ORDER', 'Place Order')}
583
579
  </Button>
584
580
  </MobileWrapperPlaceOrderButton>
@@ -358,7 +358,6 @@ export const Header = (props) => {
358
358
  withLogout
359
359
  isCustomerMode={isCustomerMode}
360
360
  open={openPopover.user}
361
- handleOpenAddressModal={() => openModal('address')}
362
361
  onClick={() => handleTogglePopover('user')}
363
362
  onClose={() => handleClosePopover('user')}
364
363
  />
@@ -38,12 +38,10 @@ export const OriginalHomeHero = (props) => {
38
38
  const [orderingTheme] = useOrderingTheme()
39
39
  const [authModalOpen, setAuthModalOpen] = useState(false)
40
40
  const [modalPageToShow, setModalPageToShow] = useState(null)
41
- const [newAddressModalOpened, setNewAddressModalOpened] = useState(false)
42
41
 
43
42
  const isShowLoginAccount = !orderingTheme?.theme?.mobile_view_web?.components?.home?.components?.login_account?.hidden
44
43
  const bgImg = orderingTheme?.theme?.my_products?.components?.images?.components?.homepage_background?.components?.image
45
44
  const logo = orderingTheme?.theme?.my_products?.components?.images?.components?.logo?.components?.image
46
- const mobileBgImg = orderingTheme?.theme?.my_products?.components?.images?.components?.homepage_mobile_background?.components?.image
47
45
  const isFullScreen = orderingTheme?.theme?.my_products?.components?.images?.components?.homepage_image_fullscreen
48
46
  const enabledPoweredByOrdering = configs?.powered_by_ordering_module?.value
49
47
  const handleFindBusinesses = () => {
@@ -95,20 +93,12 @@ export const OriginalHomeHero = (props) => {
95
93
  return () => setModals({ listOpen: false, formOpen: false })
96
94
  }, [])
97
95
 
98
- useEffect(() => {
99
- if (newAddressModalOpened) return
100
- if (auth && !orderState.loading && !orderState?.options?.address?.location) {
101
- setModals({ ...modals, listOpen: true })
102
- setNewAddressModalOpened(true)
103
- }
104
- }, [auth, orderState, newAddressModalOpened])
105
-
106
96
  return (
107
97
  <HeroContainer
108
98
  mb={!auth && isShowLoginAccount && '30vh'}
109
- bgimage={windowSize.width < 576
110
- ? (mobileBgImg || theme.images?.general?.homeHeroMobile)
111
- : (bgImg || theme.images?.general?.homeHero)}
99
+ bgimage={bgImg || (windowSize.width < 576
100
+ ? theme.images?.general?.homeHeroMobile
101
+ : theme.images?.general?.homeHero)}
112
102
  isFullScreen={isFullScreen}
113
103
  >
114
104
  <ContentWrapper>
@@ -86,7 +86,6 @@ const PhoneAutocompleteUI = (props) => {
86
86
  }
87
87
  if (!inputValue) {
88
88
  setInputValue(inputValue)
89
- onChangeNumber(inputValue)
90
89
  }
91
90
  if ((inputValue && inputValue.length > 10) || !(/^[0-9]+$/.test(inputValue))) {
92
91
  return
@@ -96,7 +95,6 @@ const PhoneAutocompleteUI = (props) => {
96
95
  }
97
96
 
98
97
  const onChange = (option) => {
99
- if (!option) { onChangeNumber('') }
100
98
  setOptSelected(option)
101
99
  setInputValue(option ? option?.value : '')
102
100
  const user = customersPhones.users?.find(user => user.cellphone === option?.value || user.phone === option?.value)
@@ -36,8 +36,7 @@ const PlaceSpotUI = (props) => {
36
36
  setVehicle,
37
37
  setSpotState,
38
38
  handleChangeSpot,
39
- setHasBusinessPlaces,
40
- setPlaceSpotNumber
39
+ setHasBusinessPlaces
41
40
  } = props
42
41
 
43
42
  const el = useRef()
@@ -93,7 +92,6 @@ const PlaceSpotUI = (props) => {
93
92
  let spotNumber = parseFloat(e?.target?.value)
94
93
  spotNumber = isNaN(spotNumber) ? null : spotNumber
95
94
  setSpotNumber(spotNumber)
96
- setPlaceSpotNumber(spotNumber)
97
95
  }
98
96
  }
99
97
 
@@ -508,7 +508,6 @@ export const Properties = styled.div`
508
508
  export const ProductDescription = styled.p`
509
509
  margin-top: 0px;
510
510
  white-space: pre-wrap;
511
- color: #909BA9;
512
511
  `
513
512
  export const PriceContent = styled.div`
514
513
  display: flex;
@@ -147,6 +147,7 @@ export const SuboptionPrice = styled.div`
147
147
  color: ${props => props.theme.colors.darkGray};
148
148
  margin-left: 5px;
149
149
  min-width: 60px;
150
+ max-width: 60px;
150
151
  ${props => props.theme?.rtl && css`
151
152
  margin-right: 5px;
152
153
  margin-left: 0px;
@@ -1,5 +1,5 @@
1
1
  import React, { useRef, useEffect } from 'react'
2
- import { useLanguage, useSession, LogoutAction as LogoutActionController, useEvent, useCustomer, useConfig, useOrderingTheme, useOrder } from 'ordering-components-external'
2
+ import { useLanguage, useSession, LogoutAction as LogoutActionController, useEvent, useCustomer, useConfig, useOrderingTheme } from 'ordering-components-external'
3
3
  import { usePopper } from 'react-popper'
4
4
  import {
5
5
  HeaderItem,
@@ -29,16 +29,13 @@ export const UserPopover = (props) => {
29
29
  isHome,
30
30
  optionsList,
31
31
  withLogout,
32
- isCustomerMode,
33
- handleOpenAddressModal
32
+ isCustomerMode
34
33
  } = props
35
34
  const [sessionState] = useSession()
36
35
  const [, t] = useLanguage()
37
36
  const [events] = useEvent()
38
37
  const [{ configs }] = useConfig()
39
38
  const [orderingTheme] = useOrderingTheme()
40
- const [orderStatus] = useOrder()
41
-
42
39
  const referenceElement = useRef()
43
40
  const popperElement = useRef()
44
41
  const arrowElement = useRef()
@@ -59,8 +56,6 @@ export const UserPopover = (props) => {
59
56
  { name: 'addresses', pathname: '/profile/addresses', displayName: 'places', key: 'places', isActive: isAddressListNewPage }
60
57
  ]
61
58
 
62
- const addressRequiredPageNames = ['business_search', 'promotions']
63
-
64
59
  const options = isCustomerMode
65
60
  ? optionsDefault.filter(option => option.name === 'profile')
66
61
  : optionsList || optionsDefault
@@ -99,11 +94,7 @@ export const UserPopover = (props) => {
99
94
  }
100
95
 
101
96
  const handleGoToPage = (page) => {
102
- if (!orderStatus.options?.address?.location && addressRequiredPageNames.includes(page)) {
103
- handleOpenAddressModal()
104
- } else {
105
- events.emit('go_to_page', { page })
106
- }
97
+ events.emit('go_to_page', { page })
107
98
  props.onClick && props.onClick()
108
99
  }
109
100
 
@@ -23,6 +23,7 @@ export const MomentContent = (props) => {
23
23
  const momentProps = {
24
24
  maxDate: currentDate
25
25
  }
26
+
26
27
  const { width } = useWindowSize()
27
28
  const momentControl = document?.getElementById('moment_control')?.getBoundingClientRect()
28
29
 
@@ -133,6 +133,9 @@ const MomentControlUI = (props) => {
133
133
  }
134
134
  }, [hoursList])
135
135
 
136
+ useEffect(() => {
137
+ if (isASP) handleCheckBoxChange(true)
138
+ }, [isAsap])
136
139
 
137
140
  return (
138
141
  <div id='moment_control'>
@@ -4,10 +4,6 @@ import styled, { css } from 'styled-components'
4
4
  export const ContainerCard = styled.div`
5
5
  width: 100%;
6
6
  position: relative;
7
- @media (min-width: 768px) {
8
- padding: 7px 10px 7px 20px;
9
- margin-bottom: 5px;
10
- }
11
7
  `
12
8
 
13
9
  export const WrapperBusinessCard = styled.div`
@@ -2,12 +2,10 @@ import React, { useRef, useEffect } from 'react'
2
2
  import { Input } from '../../styles/Inputs'
3
3
  import { useLanguage } from 'ordering-components-external'
4
4
  import AiOutlineSearch from '@meronex/icons/ai/AiOutlineSearch'
5
- import { Funnel } from 'react-bootstrap-icons'
6
5
  import {
7
6
  BusinessSearch,
8
7
  DeleteContent,
9
- SearchWrapper,
10
- FunnelWrapper
8
+ SearchWrapper
11
9
  } from './styles'
12
10
  export const SearchBar = (props) => {
13
11
  const {
@@ -15,8 +13,7 @@ export const SearchBar = (props) => {
15
13
  search,
16
14
  placeholder,
17
15
  lazyLoad,
18
- isCustomLayout,
19
- isStarbucks
16
+ isCustomLayout
20
17
  } = props
21
18
 
22
19
  const [, t] = useLanguage()
@@ -93,11 +90,6 @@ export const SearchBar = (props) => {
93
90
  >
94
91
  <AiOutlineSearch />
95
92
  </SearchWrapper>
96
- {isStarbucks &&
97
- <FunnelWrapper>
98
- <Funnel />
99
- </FunnelWrapper>
100
- }
101
93
  </BusinessSearch>
102
94
  {props.afterComponents?.map((AfterComponent, i) => (
103
95
  <AfterComponent key={i} {...props} />))}
@@ -68,7 +68,7 @@ export const DeleteContent = styled.span`
68
68
  `}
69
69
  ${({ isClear, isHome }) => isClear && css`
70
70
  left: initial;
71
- right: 40px;
71
+ right: 20px;
72
72
  `}
73
73
  ${props => props.theme?.rtl && css`
74
74
  transform: translate(30%, 0%);
@@ -94,17 +94,6 @@ export const DeleteContent = styled.span`
94
94
 
95
95
  export const SearchWrapper = styled(DeleteContent)``
96
96
 
97
- export const FunnelWrapper = styled.div`
98
- svg {
99
- position: absolute;
100
- right: 10px !important;
101
- color: #ADB5BD;
102
- width: 20px;
103
- height: 20px;
104
- bottom: 22px;
105
- }
106
- `
107
-
108
97
  export const SearchIcon = styled.div`
109
98
  background-image: url(${props => props.theme?.images?.general?.searchIcon});
110
99
  background-position: right 10px center;