ordering-ui-external 2.7.2 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/_bundles/{7.ordering-ui.0a58ae9fc1a4bce64c6e.js → 7.ordering-ui.5fbb70216ae0e9633027.js} +1 -1
  2. package/_bundles/ordering-ui.5fbb70216ae0e9633027.js +2 -0
  3. package/_modules/themes/five/src/components/BusinessInformation/index.js +9 -9
  4. package/_modules/themes/five/src/components/BusinessProductsList/index.js +1 -1
  5. package/_modules/themes/five/src/components/BusinessProductsList/layouts/groceries/index.js +1 -1
  6. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +1 -1
  7. package/_modules/themes/five/src/components/Header/index.js +1 -1
  8. package/_modules/themes/five/src/components/OrderContextUI/index.js +1 -1
  9. package/_modules/themes/five/src/components/OrderContextUI/styles.js +1 -1
  10. package/_modules/themes/five/src/components/ProductForm/styles.js +1 -1
  11. package/_modules/themes/five/src/components/RenderProductsLayout/index.js +20 -10
  12. package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +5 -3
  13. package/_modules/themes/five/src/components/ScheduleAccordion/index.js +3 -3
  14. package/package.json +2 -2
  15. package/src/components/MomentContent/index.js +1 -1
  16. package/src/themes/callcenterOriginal/src/components/Shared/Modal/index.js +1 -1
  17. package/src/themes/five/src/components/BusinessInformation/index.js +7 -5
  18. package/src/themes/five/src/components/BusinessProductsList/index.js +1 -1
  19. package/src/themes/five/src/components/BusinessProductsList/layouts/groceries/index.js +1 -1
  20. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +1 -1
  21. package/src/themes/five/src/components/Header/index.js +1 -1
  22. package/src/themes/five/src/components/OrderContextUI/index.js +1 -1
  23. package/src/themes/five/src/components/OrderContextUI/styles.js +1 -1
  24. package/src/themes/five/src/components/ProductForm/styles.js +2 -2
  25. package/src/themes/five/src/components/RenderProductsLayout/index.js +16 -3
  26. package/src/themes/five/src/components/RenderProductsLayout/styles.js +11 -0
  27. package/src/themes/five/src/components/ScheduleAccordion/index.js +4 -4
  28. package/src/themes/two/src/components/Header/index.js +1 -1
  29. package/template/app.js +10 -6
  30. package/template/pages/BusinessProductsList/index.js +10 -4
  31. package/template/pages/BusinessesList/index.js +11 -4
  32. package/template/pages/Checkout/index.js +7 -2
  33. package/template/pages/Home/index.js +5 -2
  34. package/template/pages/MessagesList/index.js +7 -2
  35. package/template/pages/MyOrders/index.js +10 -3
  36. package/_bundles/ordering-ui.0a58ae9fc1a4bce64c6e.js +0 -2
  37. /package/_bundles/{0.ordering-ui.0a58ae9fc1a4bce64c6e.js → 0.ordering-ui.5fbb70216ae0e9633027.js} +0 -0
  38. /package/_bundles/{1.ordering-ui.0a58ae9fc1a4bce64c6e.js → 1.ordering-ui.5fbb70216ae0e9633027.js} +0 -0
  39. /package/_bundles/{2.ordering-ui.0a58ae9fc1a4bce64c6e.js → 2.ordering-ui.5fbb70216ae0e9633027.js} +0 -0
  40. /package/_bundles/{4.ordering-ui.0a58ae9fc1a4bce64c6e.js → 4.ordering-ui.5fbb70216ae0e9633027.js} +0 -0
  41. /package/_bundles/{5.ordering-ui.0a58ae9fc1a4bce64c6e.js → 5.ordering-ui.5fbb70216ae0e9633027.js} +0 -0
  42. /package/_bundles/{6.ordering-ui.0a58ae9fc1a4bce64c6e.js → 6.ordering-ui.5fbb70216ae0e9633027.js} +0 -0
  43. /package/_bundles/{7.ordering-ui.0a58ae9fc1a4bce64c6e.js.LICENSE.txt → 7.ordering-ui.5fbb70216ae0e9633027.js.LICENSE.txt} +0 -0
  44. /package/_bundles/{8.ordering-ui.0a58ae9fc1a4bce64c6e.js → 8.ordering-ui.5fbb70216ae0e9633027.js} +0 -0
  45. /package/_bundles/{9.ordering-ui.0a58ae9fc1a4bce64c6e.js → 9.ordering-ui.5fbb70216ae0e9633027.js} +0 -0
  46. /package/_bundles/{ordering-ui.0a58ae9fc1a4bce64c6e.js.LICENSE.txt → ordering-ui.5fbb70216ae0e9633027.js.LICENSE.txt} +0 -0
@@ -13,6 +13,7 @@ var _styles = require("./styles");
13
13
  var _MdClose = _interopRequireDefault(require("@meronex/icons/md/MdClose"));
14
14
  var _ScheduleAccordion = require("../ScheduleAccordion");
15
15
  var _styledComponents = require("styled-components");
16
+ var _moment = _interopRequireDefault(require("moment"));
16
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
18
  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); }
18
19
  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; }
@@ -29,7 +30,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
29
30
  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; } }
30
31
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
31
32
  var BusinessInformationUI = function BusinessInformationUI(props) {
32
- var _theme$business_view, _theme$business_view$, _theme$business_view$2, _theme$business_view$3, _theme$business_view$4, _theme$business_view2, _theme$business_view3, _theme$business_view4, _theme$business_view5, _theme$business_view6, _theme$business_view7, _theme$business_view8, _theme$business_view9, _theme$business_view10, _theme$business_view11, _theme$business_view12, _theme$business_view13, _theme$business_view14, _theme$business_view15, _theme$business_view16, _theme$business_view17, _theme$business_view18, _theme$business_view19, _theme$business_view20, _theme$business_view21, _theme$business_view22, _theme$business_view23, _theme$business_view24, _theme$business_view25, _theme$business_view26, _theme$business_view27, _theme$business_view28, _theme$business_view29, _theme$business_view30, _theme$business_view31, _theme$business_view32, _theme$business_view33, _theme$business_view34, _theme$business_view35, _theme$business_view36, _theme$business_view37, _theme$business_view38, _theme$business_view39, _theme$business_view40, _theme$business_view41, _props$beforeElements, _props$beforeComponen, _configs$google_maps_, _props$afterComponent, _props$afterElements;
33
+ var _theme$business_view, _theme$business_view$, _theme$business_view$2, _theme$business_view$3, _theme$business_view$4, _theme$business_view2, _theme$business_view3, _theme$business_view4, _theme$business_view5, _theme$business_view6, _theme$business_view7, _theme$business_view8, _theme$business_view9, _theme$business_view10, _theme$business_view11, _theme$business_view12, _theme$business_view13, _theme$business_view14, _theme$business_view15, _theme$business_view16, _theme$business_view17, _theme$business_view18, _theme$business_view19, _theme$business_view20, _theme$business_view21, _theme$business_view22, _theme$business_view23, _theme$business_view24, _theme$business_view25, _theme$business_view26, _theme$business_view27, _theme$business_view28, _theme$business_view29, _theme$business_view30, _theme$business_view31, _theme$business_view32, _theme$business_view33, _theme$business_view34, _theme$business_view35, _theme$business_view36, _theme$business_view37, _theme$business_view38, _theme$business_view39, _theme$business_view40, _theme$business_view41, _configs$general_hour, _props$beforeElements, _props$beforeComponen, _configs$google_maps_, _props$afterComponent, _props$afterElements;
33
34
  var business = props.business,
34
35
  businessLocation = props.businessLocation,
35
36
  businessSchedule = props.businessSchedule,
@@ -60,13 +61,12 @@ var BusinessInformationUI = function BusinessInformationUI(props) {
60
61
  var hidePickupTime = theme === null || theme === void 0 ? void 0 : (_theme$business_view27 = theme.business_view) === null || _theme$business_view27 === void 0 ? void 0 : (_theme$business_view28 = _theme$business_view27.components) === null || _theme$business_view28 === void 0 ? void 0 : (_theme$business_view29 = _theme$business_view28.information) === null || _theme$business_view29 === void 0 ? void 0 : (_theme$business_view30 = _theme$business_view29.components) === null || _theme$business_view30 === void 0 ? void 0 : (_theme$business_view31 = _theme$business_view30.pickup_time) === null || _theme$business_view31 === void 0 ? void 0 : _theme$business_view31.hidden;
61
62
  var hideImages = theme === null || theme === void 0 ? void 0 : (_theme$business_view32 = theme.business_view) === null || _theme$business_view32 === void 0 ? void 0 : (_theme$business_view33 = _theme$business_view32.components) === null || _theme$business_view33 === void 0 ? void 0 : (_theme$business_view34 = _theme$business_view33.information) === null || _theme$business_view34 === void 0 ? void 0 : (_theme$business_view35 = _theme$business_view34.components) === null || _theme$business_view35 === void 0 ? void 0 : (_theme$business_view36 = _theme$business_view35.images) === null || _theme$business_view36 === void 0 ? void 0 : _theme$business_view36.hidden;
62
63
  var hideAddress = theme === null || theme === void 0 ? void 0 : (_theme$business_view37 = theme.business_view) === null || _theme$business_view37 === void 0 ? void 0 : (_theme$business_view38 = _theme$business_view37.components) === null || _theme$business_view38 === void 0 ? void 0 : (_theme$business_view39 = _theme$business_view38.information) === null || _theme$business_view39 === void 0 ? void 0 : (_theme$business_view40 = _theme$business_view39.components) === null || _theme$business_view40 === void 0 ? void 0 : (_theme$business_view41 = _theme$business_view40.address) === null || _theme$business_view41 === void 0 ? void 0 : _theme$business_view41.hidden;
63
- var scheduleFormatted = function scheduleFormatted(_ref) {
64
- var hour = _ref.hour,
65
- minute = _ref.minute;
66
- var checkTime = function checkTime(val) {
67
- return val < 10 ? "0".concat(val) : val;
68
- };
69
- return "".concat(checkTime(hour), ":").concat(checkTime(minute));
64
+ var formatTime = configs === null || configs === void 0 ? void 0 : (_configs$general_hour = configs.general_hour_format) === null || _configs$general_hour === void 0 ? void 0 : _configs$general_hour.value;
65
+ var checkTime = function checkTime(val) {
66
+ return val < 10 ? "0".concat(val) : val;
67
+ };
68
+ var timeFormated = function timeFormated(time) {
69
+ return (0, _moment.default)("1900-01-01 ".concat(checkTime(time.hour), ":").concat(checkTime(time.minute))).format(formatTime);
70
70
  };
71
71
  var handleModalImage = function handleModalImage(src) {
72
72
  setImage(src);
@@ -92,7 +92,7 @@ var BusinessInformationUI = function BusinessInformationUI(props) {
92
92
  return /*#__PURE__*/_react.default.createElement(_ScheduleAccordion.ScheduleAccordion, {
93
93
  key: i,
94
94
  weekIndex: i,
95
- scheduleFormatted: scheduleFormatted,
95
+ timeFormated: timeFormated,
96
96
  schedule: schedule
97
97
  });
98
98
  }))), /*#__PURE__*/_react.default.createElement(_styles.Divider, null)), /*#__PURE__*/_react.default.createElement(_styles.DeliveryInfo, null, /*#__PURE__*/_react.default.createElement("div", null, !hideDeliveryTime && /*#__PURE__*/_react.default.createElement("h5", null, t('DELIVERY_TIME', 'Delivery Time'), ": ", (0, _utils.convertHoursToMinutes)(business === null || business === void 0 ? void 0 : business.delivery_time)), !hidePickupTime && /*#__PURE__*/_react.default.createElement("h5", null, t('PICKUP_TIME', 'Pickup Time'), ": ", (0, _utils.convertHoursToMinutes)(business === null || business === void 0 ? void 0 : business.pickup_time)))), /*#__PURE__*/_react.default.createElement(_styles.Divider, null)), !hideVideos && (businessVideos === null || businessVideos === void 0 ? void 0 : businessVideos.length) > 0 && /*#__PURE__*/_react.default.createElement(_styles.BusinessMediaContent, null, /*#__PURE__*/_react.default.createElement(_styles.SectionTitle, null, t('VIDEOS', 'Videos')), /*#__PURE__*/_react.default.createElement("div", null, businessVideos.map(function (video, i) {
@@ -363,7 +363,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
363
363
  onClickButton: function onClickButton() {
364
364
  return !searchValue ? handleSearchRedirect() : handleClearSearch('');
365
365
  }
366
- })), errors && errors.length > 0 && errors.map(function (e, i) {
366
+ })), errors && errors.length > 0 && (typeof errors === 'string' ? [errors] : errors).map(function (e, i) {
367
367
  return /*#__PURE__*/_react.default.createElement(_styles.ErrorMessage, {
368
368
  key: i
369
369
  }, "ERROR: [", e, "]");
@@ -218,7 +218,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
218
218
  onClickButton: function onClickButton() {
219
219
  return !searchValue ? handleSearchRedirect() : handleClearSearch('');
220
220
  }
221
- })), errors && errors.length > 0 && errors.map(function (e, i) {
221
+ })), errors && errors.length > 0 && (typeof errors === 'string' ? [errors] : errors).map(function (e, i) {
222
222
  return /*#__PURE__*/_react.default.createElement(_styles.ErrorMessage, {
223
223
  key: i
224
224
  }, "ERROR: [", e, "]");
@@ -258,7 +258,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
258
258
  }
259
259
  return /*#__PURE__*/_react.default.createElement(_styles.BusinessContainer, null, (windowSize.width < 576 || (configs === null || configs === void 0 ? void 0 : (_configs$business_lis = configs.business_listing_hide_image) === null || _configs$business_lis === void 0 ? void 0 : _configs$business_lis.value) !== '1' && !isChew) && /*#__PURE__*/_react.default.createElement(_styles.BusinessBanner, null, windowSize.width < 576 && /*#__PURE__*/_react.default.createElement(_OrderContextUI.OrderContextUI, {
260
260
  isBusinessList: true,
261
- hideHero: !!(configs !== null && configs !== void 0 && (_configs$business_lis2 = configs.business_listing_hide_image) !== null && _configs$business_lis2 !== void 0 && _configs$business_lis2.value) && !hideHero
261
+ hideHero: !!(configs !== null && configs !== void 0 && (_configs$business_lis2 = configs.business_listing_hide_image) !== null && _configs$business_lis2 !== void 0 && _configs$business_lis2.value) !== '1' && !hideHero
262
262
  }), (configs === null || configs === void 0 ? void 0 : (_configs$business_lis3 = configs.business_listing_hide_image) === null || _configs$business_lis3 === void 0 ? void 0 : _configs$business_lis3.value) !== '1' && !isChew && !hideHero && /*#__PURE__*/_react.default.createElement(_styles.BusinessHeroImg, {
263
263
  bgimage: (_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.businessHero,
264
264
  height: theme === null || theme === void 0 ? void 0 : (_theme$business_listi22 = theme.business_listing_view) === null || _theme$business_listi22 === void 0 ? void 0 : (_theme$business_listi23 = _theme$business_listi22.components) === null || _theme$business_listi23 === void 0 ? void 0 : (_theme$business_listi24 = _theme$business_listi23.business_hero) === null || _theme$business_listi24 === void 0 ? void 0 : (_theme$business_listi25 = _theme$business_listi24.style) === null || _theme$business_listi25 === void 0 ? void 0 : _theme$business_listi25.height
@@ -296,7 +296,7 @@ var Header = function Header(props) {
296
296
  alt: "Isotype",
297
297
  width: isChew ? '70px' : '35px',
298
298
  height: isChew ? '20px' : '45px',
299
- src: isChew ? theme === null || theme === void 0 ? void 0 : (_theme$images3 = theme.images) === null || _theme$images3 === void 0 ? void 0 : (_theme$images3$logos = _theme$images3.logos) === null || _theme$images3$logos === void 0 ? void 0 : _theme$images3$logos.chewLogo : isHome && windowSize.width < 576 ? theme === null || theme === void 0 ? void 0 : (_theme$images4 = theme.images) === null || _theme$images4 === void 0 ? void 0 : (_theme$images4$logos = _theme$images4.logos) === null || _theme$images4$logos === void 0 ? void 0 : _theme$images4$logos.isotypeInvert : (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) || (theme === null || theme === void 0 ? void 0 : (_theme$images5 = theme.images) === null || _theme$images5 === void 0 ? void 0 : (_theme$images5$logos = _theme$images5.logos) === null || _theme$images5$logos === void 0 ? void 0 : _theme$images5$logos.isotype),
299
+ src: isChew ? theme === null || theme === void 0 ? void 0 : (_theme$images3 = theme.images) === null || _theme$images3 === void 0 ? void 0 : (_theme$images3$logos = _theme$images3.logos) === null || _theme$images3$logos === void 0 ? void 0 : _theme$images3$logos.chewLogo : windowSize.width <= 768 ? theme === null || theme === void 0 ? void 0 : (_theme$images4 = theme.images) === null || _theme$images4 === void 0 ? void 0 : (_theme$images4$logos = _theme$images4.logos) === null || _theme$images4$logos === void 0 ? void 0 : _theme$images4$logos.isotypeInvert : (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) || (theme === null || theme === void 0 ? void 0 : (_theme$images5 = theme.images) === null || _theme$images5 === void 0 ? void 0 : (_theme$images5$logos = _theme$images5.logos) === null || _theme$images5$logos === void 0 ? void 0 : _theme$images5$logos.isotype),
300
300
  loading: "lazy"
301
301
  }))), isShowOrderOptions && windowSize.width >= 576 && /*#__PURE__*/_react.default.createElement(_styles.Menu, {
302
302
  id: "center-side",
@@ -128,7 +128,7 @@ var OrderContextUI = function OrderContextUI(props) {
128
128
  onClick: function onClick() {
129
129
  return handleClickAddress();
130
130
  },
131
- isCheckOut: isCheckOut
131
+ isCheckOut: isCheckOut || !props.hideHero
132
132
  }, /*#__PURE__*/_react.default.createElement(_FaMapMarkerAlt.default, null), /*#__PURE__*/_react.default.createElement("span", null, ((_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', 'Where do we delivery?'))), /*#__PURE__*/_react.default.createElement(_styles.FeatureItems, null, /*#__PURE__*/_react.default.createElement(_styles.ItemInline, null, /*#__PURE__*/_react.default.createElement(_OrderTypeSelectorHeader.OrderTypeSelectorHeader, {
133
133
  configTypes: configTypes,
134
134
  autoCloseWhenScroll: windowSize.width < 576
@@ -16,7 +16,7 @@ var Container = _styledComponents.default.div(_templateObject || (_templateObjec
16
16
  }, function (_ref2) {
17
17
  var hero = _ref2.hero,
18
18
  isCheckOut = _ref2.isCheckOut;
19
- return !(hero || isCheckOut) && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n top: 10%;\n "])));
19
+ return hero && !isCheckOut && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n top: 10%;\n "])));
20
20
  });
21
21
  exports.Container = Container;
22
22
  var AddressMenu = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n cursor: pointer;\n font-size: 14px;\n display: flex;\n align-items: center;\n background-color: ", ";\n font-weight: 600;\n border-radius: 50px;\n padding: 13px 19px;\n margin-bottom: 10px;\n ", "\n\n span {\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n svg {\n margin-right: 5px;\n color: ", ";\n ", "\n }\n"])), function (props) {
@@ -72,7 +72,7 @@ var SectionTitle = _styledComponents.default.h3(_templateObject18 || (_templateO
72
72
  exports.SectionTitle = SectionTitle;
73
73
  var ProductComment = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n margin-bottom: 130px;\n\n textarea {\n margin-top: 8px;\n }\n\n p {\n font-weight: 300;\n margin-bottom: 5px;\n }\n\n @media (min-width: 577px) {\n margin-bottom: 62px;\n }\n\n @media (min-width: 769px) {\n margin-bottom: 0px;\n padding-bottom: 10px;\n }\n"])));
74
74
  exports.ProductComment = ProductComment;
75
- var ProductActions = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 10px 0px;\n width: 100%;\n z-index: 9999997;\n\n position: fixed;\n bottom: 0;\n right: 0;\n width: 100%;\n background-color: #FFF;\n\n div.price {\n padding-top: 10px;\n color: ", ";\n h4 {\n margin: 0;\n font-weight: 600;\n font-size: 20px;\n line-height: 20px;\n }\n span {\n font-size: 13px;\n color: #D83520;\n line-height: 15px;\n }\n }\n\n div.incdec-control {\n width: 135px;\n display: flex;\n justify-content: space-around;\n align-items: center;\n position: relative;\n\n svg {\n width: 25px;\n height: 25px;\n cursor: pointer;\n }\n }\n\n div.price-amount-block {\n display: flex;\n justify-content: space-between;\n width: 70%\n }\n\n svg {\n color: ", ";\n }\n\n svg.disabled {\n pointer-events: none;\n color: #CED4DA;\n }\n\n button:disabled,\n button.disabled {\n background: #E9ECEF;\n border: 1px solid #E9ECEF;\n color: #B1BCCC;\n }\n\n button.add {\n width: 90%;\n padding: 5px 10px;\n margin-top: 10px;\n position: relative;\n\n &.soldout {\n width: 100%;\n pointer-events: none;\n }\n }\n .qty {\n flex: 1;\n text-align: center;\n display: flex;\n align-items: center;\n height: 38px;\n min-width: 60px;\n box-sizing: border-box;\n padding: 0;\n margin: 0 10px;\n }\n\n #address_control {\n button.add {\n width: calc(100% - 20px) !important;\n margin: 10px 10px 0 10px;\n }\n }\n \n div#address_list {\n padding: 0;\n }\n\n @media (min-width: 577px) {\n position: sticky;\n }\n\n @media (min-width: 1200px) {\n bottom: 0px;\n flex-direction: row;\n justify-content: space-between;\n border-top: 1px solid #E9ECEF;\n width: calc(100% + 40px);\n transform: translateX(-20px);\n padding: 10px 20px;\n box-sizing: border-box;\n\n ", "\n\n div.price {\n width: 25%;\n }\n\n button.add {\n width: 35%;\n margin-top: 0;\n }\n\n div.incdec-control {\n margin-right: 18%;\n &.show-weight-unit{\n width: 30%;\n }\n }\n }\n"])), function (props) {
75
+ var ProductActions = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 10px 0px;\n width: 100%;\n z-index: 9999997;\n\n position: fixed;\n bottom: 0;\n right: 0;\n width: 100%;\n background-color: #FFF;\n\n div.price {\n padding-top: 10px;\n color: ", ";\n h4 {\n margin: 0;\n font-weight: 600;\n font-size: 20px;\n line-height: 20px;\n }\n span {\n font-size: 13px;\n color: #D83520;\n line-height: 15px;\n }\n }\n\n div.incdec-control {\n width: 195px;\n display: flex;\n justify-content: space-around;\n align-items: center;\n position: relative;\n\n svg {\n width: 25px;\n height: 25px;\n cursor: pointer;\n }\n }\n\n div.price-amount-block {\n display: flex;\n justify-content: space-between;\n width: 70%\n }\n\n svg {\n color: ", ";\n }\n\n svg.disabled {\n pointer-events: none;\n color: #CED4DA;\n }\n\n button:disabled,\n button.disabled {\n background: #E9ECEF;\n border: 1px solid #E9ECEF;\n color: #B1BCCC;\n }\n\n button.add {\n width: 90%;\n padding: 5px 10px;\n margin-top: 10px;\n position: relative;\n\n &.soldout {\n width: 100%;\n pointer-events: none;\n }\n }\n .qty {\n flex: 1;\n text-align: center;\n display: flex;\n align-items: center;\n height: 38px;\n min-width: 60px;\n box-sizing: border-box;\n padding: 0;\n margin: 0 10px;\n }\n\n #address_control {\n button.add {\n width: calc(100% - 20px) !important;\n margin: 10px 10px 0 10px;\n }\n }\n \n div#address_list {\n padding: 0;\n }\n\n @media (min-width: 577px) {\n position: sticky;\n }\n\n @media (min-width: 1200px) {\n bottom: 0px;\n flex-direction: row;\n justify-content: space-between;\n border-top: 1px solid #E9ECEF;\n width: calc(100% + 40px);\n transform: translateX(-20px);\n padding: 10px 20px;\n box-sizing: border-box;\n\n ", "\n\n div.price {\n width: 25%;\n }\n\n button.add {\n width: 35%;\n margin-top: 0;\n }\n\n div.incdec-control {\n margin-right: 18%;\n &.show-weight-unit{\n width: 40%;\n }\n }\n }\n"])), function (props) {
76
76
  var _props$theme;
77
77
  return (_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.colors.darkTextColor;
78
78
  }, function (props) {
@@ -49,7 +49,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
49
49
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
50
50
  var layoutOne = 'groceries';
51
51
  var RenderProductsLayout = function RenderProductsLayout(props) {
52
- var _configs$use_parent_c, _configs$use_parent_c2, _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, _theme$business_view, _theme$business_view$, _theme$business_view$2, _theme$business_view$3, _theme$business_view$4, _theme$business_view2, _theme$business_view3, _theme$business_view4, _theme$business_view5, _theme$business_view6, _orderingTheme$theme14, _orderingTheme$theme15, _orderingTheme$theme16, _orderingTheme$theme17, _orderingTheme$theme18, _theme$business_view$5, _theme$business_view7, _theme$business_view8, _theme$business_view9, _theme$business_view10, _theme$business_view11, _theme$business_view12, _businessState$busine, _businessState$busine2, _business$previously_, _business$professiona, _business$categories, _theme$defaultLanguag, _theme$defaultLanguag2, _business$professiona2, _theme$defaultLanguag3, _theme$defaultLanguag4, _business$professiona3, _currentCart$products, _business$professiona4, _business$categories2, _theme$defaultLanguag5, _theme$defaultLanguag6, _business$previously_2, _theme$defaultLanguag7, _theme$defaultLanguag8, _currentCart$products2, _currentCart$products3;
52
+ var _configs$use_parent_c, _configs$use_parent_c2, _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, _theme$business_view, _theme$business_view$, _theme$business_view$2, _theme$business_view$3, _theme$business_view$4, _theme$business_view2, _theme$business_view3, _theme$business_view4, _theme$business_view5, _theme$business_view6, _orderingTheme$theme14, _orderingTheme$theme15, _orderingTheme$theme16, _orderingTheme$theme17, _orderingTheme$theme18, _theme$business_view$5, _theme$business_view7, _theme$business_view8, _theme$business_view9, _theme$business_view10, _theme$business_view11, _theme$business_view12, _businessState$busine, _businessState$busine2, _business$previously_, _business$professiona, _business$categories, _theme$defaultLanguag, _theme$defaultLanguag2, _business$professiona2, _business$categories2, _theme$defaultLanguag4, _theme$defaultLanguag5, _business$professiona3, _currentCart$products, _business$professiona4, _business$categories3, _theme$defaultLanguag6, _theme$defaultLanguag7, _business$previously_2, _theme$defaultLanguag8, _theme$defaultLanguag9, _currentCart$products2, _currentCart$products3;
53
53
  var errors = props.errors,
54
54
  isError = props.isError,
55
55
  isLoading = props.isLoading,
@@ -208,7 +208,7 @@ var RenderProductsLayout = function RenderProductsLayout(props) {
208
208
  style: {
209
209
  position: 'relative'
210
210
  }
211
- }, !((business === null || business === void 0 ? void 0 : (_business$categories = business.categories) === null || _business$categories === void 0 ? void 0 : _business$categories.length) === 0 && !categoryId) && /*#__PURE__*/_react.default.createElement(BusinessLayoutCategories, {
211
+ }, !((business === null || business === void 0 ? void 0 : (_business$categories = business.categories) === null || _business$categories === void 0 ? void 0 : _business$categories.length) === 0 && !categoryId) && !(categorySelected !== null && categorySelected !== void 0 && categorySelected.id) && /*#__PURE__*/_react.default.createElement(BusinessLayoutCategories, {
212
212
  categories: [{
213
213
  id: null,
214
214
  name: t('ALL', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag = theme.defaultLanguages) === null || _theme$defaultLanguag === void 0 ? void 0 : _theme$defaultLanguag.ALL) || 'All')
@@ -227,7 +227,17 @@ var RenderProductsLayout = function RenderProductsLayout(props) {
227
227
  currentCart: currentCart,
228
228
  wContainerStyle: useKioskApp && 'calc(100% - 50px)',
229
229
  isProfessional: (business === null || business === void 0 ? void 0 : (_business$professiona2 = business.professionals) === null || _business$professiona2 === void 0 ? void 0 : _business$professiona2.length) > 0 && !useKioskApp
230
- }), useKioskApp && /*#__PURE__*/_react.default.createElement(_styles.WrapperSearchAbsolute, {
230
+ }), !((business === null || business === void 0 ? void 0 : (_business$categories2 = business.categories) === null || _business$categories2 === void 0 ? void 0 : _business$categories2.length) === 0 && !categoryId) && (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.id) && /*#__PURE__*/_react.default.createElement(_styles.BackButton, null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
231
+ color: "primary",
232
+ initialIcon: true,
233
+ onClick: function onClick() {
234
+ var _theme$defaultLanguag3;
235
+ return onClickCategory({
236
+ id: null,
237
+ name: t('ALL', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag3 = theme.defaultLanguages) === null || _theme$defaultLanguag3 === void 0 ? void 0 : _theme$defaultLanguag3.ALL) || 'All')
238
+ });
239
+ }
240
+ }, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.ArrowLeft, null), /*#__PURE__*/_react.default.createElement("div", null, t('GO_TO_ALL_CATEGORIES', 'Go to all categories')))), useKioskApp && /*#__PURE__*/_react.default.createElement(_styles.WrapperSearchAbsolute, {
231
241
  id: "WrapperSearchAbsolute"
232
242
  }, /*#__PURE__*/_react.default.createElement(_styles2.SearchIconWrapper, {
233
243
  onClick: function onClick() {
@@ -257,10 +267,10 @@ var RenderProductsLayout = function RenderProductsLayout(props) {
257
267
  }, /*#__PURE__*/_react.default.createElement(BusinessLayoutProductsList, {
258
268
  categories: [{
259
269
  id: null,
260
- name: t('ALL', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag3 = theme.defaultLanguages) === null || _theme$defaultLanguag3 === void 0 ? void 0 : _theme$defaultLanguag3.ALL) || 'All')
270
+ name: t('ALL', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag4 = theme.defaultLanguages) === null || _theme$defaultLanguag4 === void 0 ? void 0 : _theme$defaultLanguag4.ALL) || 'All')
261
271
  }, {
262
272
  id: 'featured',
263
- name: t('FEATURED', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag4 = theme.defaultLanguages) === null || _theme$defaultLanguag4 === void 0 ? void 0 : _theme$defaultLanguag4.FEATURED) || 'Featured')
273
+ name: t('FEATURED', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag5 = theme.defaultLanguages) === null || _theme$defaultLanguag5 === void 0 ? void 0 : _theme$defaultLanguag5.FEATURED) || 'Featured')
264
274
  }].concat(_toConsumableArray(business === null || business === void 0 ? void 0 : business.categories.sort(function (a, b) {
265
275
  return a.rank - b.rank;
266
276
  }))),
@@ -311,14 +321,14 @@ var RenderProductsLayout = function RenderProductsLayout(props) {
311
321
  handleUpdateProfessionals: handleUpdateProfessionals
312
322
  })), /*#__PURE__*/_react.default.createElement(_styles.BusinessContent, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessCategoriesContainer, {
313
323
  offSticky: true
314
- }, !((business === null || business === void 0 ? void 0 : (_business$categories2 = business.categories) === null || _business$categories2 === void 0 ? void 0 : _business$categories2.length) === 0 && !categoryId) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (!categoryClicked || windowSize.width >= 993) && /*#__PURE__*/_react.default.createElement(BusinessLayoutCategories, {
324
+ }, !((business === null || business === void 0 ? void 0 : (_business$categories3 = business.categories) === null || _business$categories3 === void 0 ? void 0 : _business$categories3.length) === 0 && !categoryId) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (!categoryClicked || windowSize.width >= 993) && /*#__PURE__*/_react.default.createElement(BusinessLayoutCategories, {
315
325
  component: "categories",
316
326
  categories: [{
317
327
  id: null,
318
- name: t('ALL', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag5 = theme.defaultLanguages) === null || _theme$defaultLanguag5 === void 0 ? void 0 : _theme$defaultLanguag5.ALL) || 'All')
328
+ name: t('ALL', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag6 = theme.defaultLanguages) === null || _theme$defaultLanguag6 === void 0 ? void 0 : _theme$defaultLanguag6.ALL) || 'All')
319
329
  }, {
320
330
  id: 'featured',
321
- name: t('FEATURED', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag6 = theme.defaultLanguages) === null || _theme$defaultLanguag6 === void 0 ? void 0 : _theme$defaultLanguag6.FEATURED) || 'Featured')
331
+ name: t('FEATURED', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag7 = theme.defaultLanguages) === null || _theme$defaultLanguag7 === void 0 ? void 0 : _theme$defaultLanguag7.FEATURED) || 'Featured')
322
332
  }].concat(_toConsumableArray(business === null || business === void 0 ? void 0 : business.categories.sort(function (a, b) {
323
333
  return a.rank - b.rank;
324
334
  }))),
@@ -342,10 +352,10 @@ var RenderProductsLayout = function RenderProductsLayout(props) {
342
352
  }), /*#__PURE__*/_react.default.createElement(BusinessLayoutProductsList, {
343
353
  categories: [{
344
354
  id: null,
345
- name: t('ALL', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag7 = theme.defaultLanguages) === null || _theme$defaultLanguag7 === void 0 ? void 0 : _theme$defaultLanguag7.ALL) || 'All')
355
+ name: t('ALL', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag8 = theme.defaultLanguages) === null || _theme$defaultLanguag8 === void 0 ? void 0 : _theme$defaultLanguag8.ALL) || 'All')
346
356
  }, {
347
357
  id: 'featured',
348
- name: t('FEATURED', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag8 = theme.defaultLanguages) === null || _theme$defaultLanguag8 === void 0 ? void 0 : _theme$defaultLanguag8.FEATURED) || 'Featured')
358
+ name: t('FEATURED', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag9 = theme.defaultLanguages) === null || _theme$defaultLanguag9 === void 0 ? void 0 : _theme$defaultLanguag9.FEATURED) || 'Featured')
349
359
  }].concat(_toConsumableArray(business === null || business === void 0 ? void 0 : business.categories.sort(function (a, b) {
350
360
  return a.rank - b.rank;
351
361
  }))),
@@ -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.WrapperSearchAbsolute = exports.WrapperSearch = exports.WrappLayout = exports.WrapContent = exports.Title = exports.ProfessionalFilterWrapper = exports.PageBannerWrapper = exports.NearBusiness = exports.MobileCartViewWrapper = exports.EmptyCart = exports.EmptyBtnWrapper = exports.BusinessContent = exports.BusinessCategoryProductWrapper = exports.BusinessCategoriesContainer = exports.BusinessCartContent = exports.BusinessCartContainer = void 0;
7
+ exports.WrapperSearchAbsolute = exports.WrapperSearch = exports.WrappLayout = exports.WrapContent = exports.Title = exports.ProfessionalFilterWrapper = exports.PageBannerWrapper = exports.NearBusiness = exports.MobileCartViewWrapper = exports.EmptyCart = exports.EmptyBtnWrapper = exports.BusinessContent = exports.BusinessCategoryProductWrapper = exports.BusinessCategoriesContainer = exports.BusinessCartContent = exports.BusinessCartContainer = exports.BackButton = 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, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23;
9
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24;
10
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) } })); }
@@ -74,4 +74,6 @@ exports.WrapperSearchAbsolute = WrapperSearchAbsolute;
74
74
  var NearBusiness = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n width: 100%;\n"])));
75
75
  exports.NearBusiness = NearBusiness;
76
76
  var PageBannerWrapper = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n > div {\n border-radius: 8px;\n }\n"])));
77
- exports.PageBannerWrapper = PageBannerWrapper;
77
+ exports.PageBannerWrapper = PageBannerWrapper;
78
+ var BackButton = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n button {\n display: flex;\n flex-direction: row;\n align-items: center;\n svg {\n margin-right: 10px;\n }\n }\n"])));
79
+ exports.BackButton = BackButton;
@@ -20,7 +20,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
20
20
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
21
  var ScheduleAccordion = function ScheduleAccordion(props) {
22
22
  var _schedule$lapses;
23
- var scheduleFormatted = props.scheduleFormatted,
23
+ var timeFormated = props.timeFormated,
24
24
  schedule = props.schedule,
25
25
  weekIndex = props.weekIndex;
26
26
  var _useState = (0, _react.useState)(false),
@@ -42,8 +42,8 @@ var ScheduleAccordion = function ScheduleAccordion(props) {
42
42
  }
43
43
  }, schedule === null || schedule === void 0 ? void 0 : (_schedule$lapses = schedule.lapses) === null || _schedule$lapses === void 0 ? void 0 : _schedule$lapses.map(function (lapse, i) {
44
44
  return schedule !== null && schedule !== void 0 && schedule.enabled ? /*#__PURE__*/_react.default.createElement("p", {
45
- key: "".concat(i, "-").concat(scheduleFormatted(lapse.open))
46
- }, scheduleFormatted(lapse.open) + ' - ' + scheduleFormatted(lapse.close)) : /*#__PURE__*/_react.default.createElement(_styles.ClosedSchedule, null, t('CLOSED', 'Closed'));
45
+ key: "".concat(i, "-").concat(timeFormated(lapse.open))
46
+ }, timeFormated(lapse.open) + ' - ' + timeFormated(lapse.close)) : /*#__PURE__*/_react.default.createElement(_styles.ClosedSchedule, null, t('CLOSED', 'Closed'));
47
47
  }))));
48
48
  };
49
49
  exports.ScheduleAccordion = ScheduleAccordion;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-external",
3
- "version": "2.7.2",
3
+ "version": "3.0.0",
4
4
  "description": "Ordering UI Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -87,7 +87,7 @@
87
87
  "lodash": "^4.17.19",
88
88
  "moment": "^2.29.4",
89
89
  "nanoid": "^4.0.0",
90
- "ordering-components-external": "2.8.0",
90
+ "ordering-components-external": "3.0.0",
91
91
  "payment": "^2.4.6",
92
92
  "polished": "^3.6.6",
93
93
  "react-bootstrap-icons": "^1.7.2",
@@ -8,7 +8,7 @@ import { SpinnerLoader } from '../SpinnerLoader'
8
8
  import { useWindowSize } from '../../hooks/useWindowSize'
9
9
 
10
10
  export const MomentContent = (props) => {
11
-
11
+
12
12
  const [orderState] = useOrder()
13
13
 
14
14
  const { width } = useWindowSize()
@@ -73,7 +73,7 @@ const ModalUI = (props) => {
73
73
  {onCancel && <Button color='primary' onClick={() => onCancel()}>{cancelText || t('CANCEL')}</Button>}
74
74
  </ModalActions>)}
75
75
  </ModalDialogInnerContainer>
76
-
76
+
77
77
  </ModalDialog>
78
78
  )
79
79
  }
@@ -27,6 +27,7 @@ import {
27
27
  import MdClose from '@meronex/icons/md/MdClose'
28
28
  import { ScheduleAccordion } from '../ScheduleAccordion'
29
29
  import { useTheme } from 'styled-components'
30
+ import moment from 'moment'
30
31
 
31
32
  export const BusinessInformationUI = (props) => {
32
33
  const {
@@ -53,11 +54,12 @@ export const BusinessInformationUI = (props) => {
53
54
  const hidePickupTime = theme?.business_view?.components?.information?.components?.pickup_time?.hidden
54
55
  const hideImages = theme?.business_view?.components?.information?.components?.images?.hidden
55
56
  const hideAddress = theme?.business_view?.components?.information?.components?.address?.hidden
57
+ const formatTime = configs?.general_hour_format?.value
56
58
 
57
- const scheduleFormatted = ({ hour, minute }) => {
58
- const checkTime = (val) => val < 10 ? `0${val}` : val
59
- return `${checkTime(hour)}:${checkTime(minute)}`
60
- }
59
+ const checkTime = (val) => (val < 10 ? `0${val}` : val);
60
+ const timeFormated = (time) => {
61
+ return moment(`1900-01-01 ${checkTime(time.hour)}:${checkTime(time.minute)}`).format(formatTime)
62
+ }
61
63
 
62
64
  const handleModalImage = (src) => {
63
65
  setImage(src)
@@ -125,7 +127,7 @@ export const BusinessInformationUI = (props) => {
125
127
  <ScheduleAccordion
126
128
  key={i}
127
129
  weekIndex={i}
128
- scheduleFormatted={scheduleFormatted}
130
+ timeFormated={timeFormated}
129
131
  schedule={schedule}
130
132
  />
131
133
  ))}
@@ -389,7 +389,7 @@ const BusinessProductsListUI = (props) => {
389
389
  }
390
390
 
391
391
  {errors && errors.length > 0 && (
392
- errors.map((e, i) => (
392
+ (typeof errors === 'string' ? [errors] : errors).map((e, i) => (
393
393
  <ErrorMessage key={i}>ERROR: [{e}]</ErrorMessage>
394
394
  ))
395
395
  )}
@@ -275,7 +275,7 @@ const BusinessProductsListUI = (props) => {
275
275
  }
276
276
 
277
277
  {errors && errors.length > 0 && (
278
- errors.map((e, i) => (
278
+ (typeof errors === 'string' ? [errors] : errors).map((e, i) => (
279
279
  <ErrorMessage key={i}>ERROR: [{e}]</ErrorMessage>
280
280
  ))
281
281
  )}
@@ -225,7 +225,7 @@ const BusinessesListingUI = (props) => {
225
225
  {(windowSize.width < 576 || (configs?.business_listing_hide_image?.value !== '1' && !isChew)) && (
226
226
  <BusinessBanner>
227
227
  {windowSize.width < 576 && (
228
- <OrderContextUI isBusinessList hideHero={(!!configs?.business_listing_hide_image?.value && !hideHero)} />
228
+ <OrderContextUI isBusinessList hideHero={(!!configs?.business_listing_hide_image?.value !== '1' && !hideHero)} />
229
229
  )}
230
230
  {(configs?.business_listing_hide_image?.value !== '1' && !isChew) && !hideHero && (
231
231
  <BusinessHeroImg
@@ -240,7 +240,7 @@ export const Header = (props) => {
240
240
  isChew={isChew}
241
241
  >
242
242
  <img alt='Logotype' width='170px' height={isChew ? '35px' : '45px'} src={isChew ? theme?.images?.logos?.chewLogo : orderingTheme?.theme?.my_products?.components?.images?.components?.logo?.components?.image || theme?.images?.logos?.logotype} loading='lazy' />
243
- <img alt='Isotype' width={isChew ? '70px' : '35px'} height={isChew ? '20px' : '45px'} src={isChew ? theme?.images?.logos?.chewLogo : (isHome && windowSize.width < 576 ? theme?.images?.logos?.isotypeInvert : orderingTheme?.theme?.my_products?.components?.images?.components?.logo?.components?.image || theme?.images?.logos?.isotype)} loading='lazy' />
243
+ <img alt='Isotype' width={isChew ? '70px' : '35px'} height={isChew ? '20px' : '45px'} src={isChew ? theme?.images?.logos?.chewLogo : (windowSize.width <= 768 ? theme?.images?.logos?.isotypeInvert : orderingTheme?.theme?.my_products?.components?.images?.components?.logo?.components?.image || theme?.images?.logos?.isotype)} loading='lazy' />
244
244
  </LogoHeader>
245
245
  </LeftHeader>
246
246
  {isShowOrderOptions && windowSize.width >= 576 && (
@@ -78,7 +78,7 @@ export const OrderContextUI = (props) => {
78
78
  <Container isBusinessList={isBusinessList} hero={props.hideHero} isCheckOut={isCheckOut}>
79
79
  <AddressMenu
80
80
  onClick={() => handleClickAddress()}
81
- isCheckOut={isCheckOut}
81
+ isCheckOut={isCheckOut || !props.hideHero}
82
82
  >
83
83
  <FaMapMarkerAlt />
84
84
  <span>{orderState.options?.address?.address || t('WHERE_DO_WE_DELIVERY', 'Where do we delivery?')}</span>
@@ -6,7 +6,7 @@ export const Container = styled.div`
6
6
  padding: 0 15px;
7
7
  box-sizing: border-box;
8
8
  `}
9
- ${({ hero, isCheckOut }) => !(hero || isCheckOut) && css`
9
+ ${({ hero, isCheckOut }) => (hero && !isCheckOut) && css`
10
10
  position: absolute;
11
11
  top: 10%;
12
12
  `}
@@ -298,7 +298,7 @@ export const ProductActions = styled.div`
298
298
  }
299
299
 
300
300
  div.incdec-control {
301
- width: 135px;
301
+ width: 195px;
302
302
  display: flex;
303
303
  justify-content: space-around;
304
304
  align-items: center;
@@ -400,7 +400,7 @@ export const ProductActions = styled.div`
400
400
  div.incdec-control {
401
401
  margin-right: 18%;
402
402
  &.show-weight-unit{
403
- width: 30%;
403
+ width: 40%;
404
404
  }
405
405
  }
406
406
  }
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react'
2
2
  import { useTheme } from 'styled-components'
3
3
  import { useLanguage, useConfig, useUtils, useOrderingTheme } from 'ordering-components-external'
4
4
  import CgSearch from '@meronex/icons/cg/CgSearch'
5
- import { Cart3 } from 'react-bootstrap-icons'
5
+ import { Cart3, ArrowLeft } from 'react-bootstrap-icons'
6
6
  import { BusinessBasicInformation } from '../BusinessBasicInformation'
7
7
  import { BusinessBasicInformation as BusinessBasicInformationRed } from '../../../../seven'
8
8
  import { BusinessBasicInformation as BusinessBasicInformationStarbucks } from '../../../../six'
@@ -32,7 +32,8 @@ import {
32
32
  ProfessionalFilterWrapper,
33
33
  WrapperSearchAbsolute,
34
34
  NearBusiness,
35
- PageBannerWrapper
35
+ PageBannerWrapper,
36
+ BackButton
36
37
  } from './styles'
37
38
 
38
39
  import { SearchProducts as SearchProductsOriginal } from '../../../../../themes/five/src/components/SearchProducts'
@@ -241,7 +242,7 @@ export const RenderProductsLayout = (props) => {
241
242
  </>
242
243
  )}
243
244
  <div style={{ position: 'relative' }}>
244
- {!(business?.categories?.length === 0 && !categoryId) && (
245
+ {!(business?.categories?.length === 0 && !categoryId) && !categorySelected?.id && (
245
246
  <BusinessLayoutCategories
246
247
  categories={[
247
248
  { id: null, name: t('ALL', theme?.defaultLanguages?.ALL || 'All') },
@@ -259,6 +260,18 @@ export const RenderProductsLayout = (props) => {
259
260
  isProfessional={business?.professionals?.length > 0 && !useKioskApp}
260
261
  />
261
262
  )}
263
+ {!(business?.categories?.length === 0 && !categoryId) && categorySelected?.id && (
264
+ <BackButton>
265
+ <Button
266
+ color='primary'
267
+ initialIcon
268
+ onClick={() => onClickCategory({ id: null, name: t('ALL', theme?.defaultLanguages?.ALL || 'All') })}
269
+ >
270
+ <ArrowLeft />
271
+ <div>{t('GO_TO_ALL_CATEGORIES', 'Go to all categories')}</div>
272
+ </Button>
273
+ </BackButton>
274
+ )}
262
275
  {useKioskApp && (
263
276
  <WrapperSearchAbsolute id='WrapperSearchAbsolute'>
264
277
  <SearchIconWrapper
@@ -224,3 +224,14 @@ export const PageBannerWrapper = styled.div`
224
224
  border-radius: 8px;
225
225
  }
226
226
  `
227
+
228
+ export const BackButton = styled.div`
229
+ button {
230
+ display: flex;
231
+ flex-direction: row;
232
+ align-items: center;
233
+ svg {
234
+ margin-right: 10px;
235
+ }
236
+ }
237
+ `
@@ -13,7 +13,7 @@ import IosArrowDown from '@meronex/icons/ios/IosArrowDown'
13
13
  export const ScheduleAccordion = (props) => {
14
14
 
15
15
  const {
16
- scheduleFormatted,
16
+ timeFormated,
17
17
  schedule,
18
18
  weekIndex
19
19
  } = props
@@ -43,10 +43,10 @@ export const ScheduleAccordion = (props) => {
43
43
  <HoursWrappers style={{ display: isActive ? 'flex' : 'none', paddingLeft: 60 }}>
44
44
  {schedule?.lapses?.map((lapse, i) => (
45
45
  schedule?.enabled ?
46
- <p key={`${i}-${scheduleFormatted(lapse.open)}`}>
47
- {scheduleFormatted(lapse.open) +
46
+ <p key={`${i}-${timeFormated(lapse.open)}`}>
47
+ {timeFormated(lapse.open) +
48
48
  ' - ' +
49
- scheduleFormatted(lapse.close)}
49
+ timeFormated(lapse.close)}
50
50
  </p>
51
51
  :
52
52
  <ClosedSchedule>
@@ -340,7 +340,7 @@ export const Header = (props) => {
340
340
  )}
341
341
  </AddressWrapper>
342
342
  {(isPreOrderSetting || configState?.configs?.preorder_status_enabled?.value === undefined) && (
343
- <MomentControl
343
+ <MomentControl
344
344
  isModalBehavior
345
345
  />
346
346
  )}
package/template/app.js CHANGED
@@ -170,14 +170,18 @@ export const App = () => {
170
170
  }
171
171
  }
172
172
 
173
+ const websiteThemeType = orderingTheme?.theme?.my_products?.components?.website_theme?.components?.type
174
+ const websiteThemeBusinessSlug = orderingTheme?.theme?.my_products?.components?.website_theme?.components?.business_slug
175
+ const updatedBusinessSlug = (websiteThemeType === 'single_store' && websiteThemeBusinessSlug) || settings?.businessSlug
176
+
173
177
  const businessesSlug = {
174
178
  marketplace: 'marketplace',
175
- kiosk: settings?.businessSlug,
176
- business: settings?.businessSlug
179
+ kiosk: updatedBusinessSlug,
180
+ business: updatedBusinessSlug
177
181
  }
178
182
 
179
183
  const singleBusinessConfig = {
180
- isActive: settings?.use_marketplace || settings?.businessSlug || isKioskApp,
184
+ isActive: settings?.use_marketplace || updatedBusinessSlug || isKioskApp,
181
185
  businessSlug: businessesSlug[isKioskApp ? 'kiosk' : settings?.use_marketplace ? 'marketplace' : 'business']
182
186
  }
183
187
 
@@ -421,8 +425,8 @@ export const App = () => {
421
425
  }, [configs, loaded])
422
426
 
423
427
  useEffect(() => {
424
- if (isHome && (settings?.use_marketplace || settings?.businessSlug)) {
425
- goToPage('business', { store: settings?.use_marketplace ? 'marketplace' : settings?.businessSlug })
428
+ if (isHome && (settings?.use_marketplace || updatedBusinessSlug)) {
429
+ goToPage('business', { store: settings?.use_marketplace ? 'marketplace' : updatedBusinessSlug })
426
430
  }
427
431
  }, [])
428
432
 
@@ -483,7 +487,7 @@ export const App = () => {
483
487
  singleBusinessConfig={singleBusinessConfig}
484
488
  searchValue={searchValue}
485
489
  setSearchValue={setSearchValue}
486
- businessSlug={settings?.businessSlug}
490
+ businessSlug={updatedBusinessSlug}
487
491
  notificationState={oneSignalState}
488
492
  />
489
493
  )}