ordering-ui-external 14.1.38 → 14.1.40

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 (20) hide show
  1. package/_bundles/{7.ordering-ui.56519bcd02a6caa88dd1.js → 7.ordering-ui.2a09e7e0162e34ea955c.js} +1 -1
  2. package/_bundles/ordering-ui.2a09e7e0162e34ea955c.js +2 -0
  3. package/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +4 -3
  4. package/_modules/themes/five/src/components/BusinessController/index.js +15 -3
  5. package/_modules/themes/five/src/components/BusinessController/styles.js +8 -6
  6. package/package.json +1 -1
  7. package/src/themes/callcenterOriginal/src/components/AddressForm/index.js +1 -0
  8. package/src/themes/five/src/components/BusinessController/index.js +20 -5
  9. package/src/themes/five/src/components/BusinessController/styles.js +32 -9
  10. package/_bundles/ordering-ui.56519bcd02a6caa88dd1.js +0 -2
  11. /package/_bundles/{0.ordering-ui.56519bcd02a6caa88dd1.js → 0.ordering-ui.2a09e7e0162e34ea955c.js} +0 -0
  12. /package/_bundles/{1.ordering-ui.56519bcd02a6caa88dd1.js → 1.ordering-ui.2a09e7e0162e34ea955c.js} +0 -0
  13. /package/_bundles/{2.ordering-ui.56519bcd02a6caa88dd1.js → 2.ordering-ui.2a09e7e0162e34ea955c.js} +0 -0
  14. /package/_bundles/{4.ordering-ui.56519bcd02a6caa88dd1.js → 4.ordering-ui.2a09e7e0162e34ea955c.js} +0 -0
  15. /package/_bundles/{5.ordering-ui.56519bcd02a6caa88dd1.js → 5.ordering-ui.2a09e7e0162e34ea955c.js} +0 -0
  16. /package/_bundles/{6.ordering-ui.56519bcd02a6caa88dd1.js → 6.ordering-ui.2a09e7e0162e34ea955c.js} +0 -0
  17. /package/_bundles/{7.ordering-ui.56519bcd02a6caa88dd1.js.LICENSE.txt → 7.ordering-ui.2a09e7e0162e34ea955c.js.LICENSE.txt} +0 -0
  18. /package/_bundles/{8.ordering-ui.56519bcd02a6caa88dd1.js → 8.ordering-ui.2a09e7e0162e34ea955c.js} +0 -0
  19. /package/_bundles/{9.ordering-ui.56519bcd02a6caa88dd1.js → 9.ordering-ui.2a09e7e0162e34ea955c.js} +0 -0
  20. /package/_bundles/{ordering-ui.56519bcd02a6caa88dd1.js.LICENSE.txt → ordering-ui.2a09e7e0162e34ea955c.js.LICENSE.txt} +0 -0
@@ -329,22 +329,23 @@ var AddressFormUI = function AddressFormUI(props) {
329
329
  while (1) switch (_context2.prev = _context2.next) {
330
330
  case 0:
331
331
  if (!(address !== null && address !== void 0 && address.location)) {
332
- _context2.next = 5;
332
+ _context2.next = 6;
333
333
  break;
334
334
  }
335
335
  _context2.next = 3;
336
336
  return getBusinessDeliveryZones(address === null || address === void 0 ? void 0 : address.location);
337
337
  case 3:
338
338
  result = _context2.sent;
339
+ setLocationChange(address === null || address === void 0 ? void 0 : address.location);
339
340
  if ((result === null || result === void 0 ? void 0 : result.length) === 0) {
340
341
  showToast(_orderingComponentsExternal.ToastType.Error, t('NO_NEAR_DELIVERY_ZONES', 'No near delivery zones'), 3000);
341
342
  }
342
- case 5:
343
+ case 6:
343
344
  setSelectedFromAutocomplete(true);
344
345
  updateChanges(_objectSpread(_objectSpread({}, address), {}, {
345
346
  address: googleInputRef === null || googleInputRef === void 0 || (_googleInputRef$curre = googleInputRef.current) === null || _googleInputRef$curre === void 0 ? void 0 : _googleInputRef$curre.value
346
347
  }));
347
- case 7:
348
+ case 8:
348
349
  case "end":
349
350
  return _context2.stop();
350
351
  }
@@ -37,7 +37,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
37
37
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
38
38
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
39
39
  var BusinessControllerUI = function BusinessControllerUI(props) {
40
- var _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _theme$business_listi4, _theme$business_listi5, _theme$business_listi6, _theme$business_listi7, _theme$business_listi8, _theme$business_listi9, _theme$business_listi10, _business$ribbon, _business$ribbon2, _business$ribbon3, _business$ribbon4, _business$ribbon5, _business$ribbon6, _business$ribbon7, _theme$images, _configState$configs, _orderState$options, _theme$images2, _theme$images3, _business$reviews, _business$reviews2, _businessState$busine2, _orderState$options2, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4;
40
+ var _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _theme$business_listi4, _theme$business_listi5, _theme$business_listi6, _theme$business_listi7, _theme$business_listi8, _theme$business_listi9, _theme$business_listi10, _business$ribbon, _business$ribbon2, _business$ribbon3, _business$ribbon4, _business$ribbon5, _business$ribbon6, _business$ribbon7, _theme$images, _configState$configs, _orderState$options, _business$today, _theme$images2, _theme$images3, _business$reviews, _business$reviews2, _businessState$busine2, _orderState$options2, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4;
41
41
  var isSkeleton = props.isSkeleton,
42
42
  business = props.business,
43
43
  getBusinessOffer = props.getBusinessOffer,
@@ -149,6 +149,14 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
149
149
  token: user === null || user === void 0 || (_user$session = user.session) === null || _user$session === void 0 ? void 0 : _user$session.access_token
150
150
  });
151
151
  };
152
+ var scheduleFormatted = function scheduleFormatted(_ref2) {
153
+ var hour = _ref2.hour,
154
+ minute = _ref2.minute;
155
+ var checkTime = function checkTime(val) {
156
+ return val < 10 ? "0".concat(val) : val;
157
+ };
158
+ return "".concat(checkTime(hour), ":").concat(checkTime(minute));
159
+ };
152
160
  var hasInformationLength = !!(business !== null && business !== void 0 && business.idle_drivers_count) || !!(business !== null && business !== void 0 && business.busy_drivers_count) || !!(business !== null && business !== void 0 && business.activated_orders);
153
161
  if (typeButton) {
154
162
  return /*#__PURE__*/_react.default.createElement(_styles.ContainerCard, {
@@ -181,11 +189,15 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
181
189
  isClosed: !isBusinessOpen
182
190
  }, /*#__PURE__*/_react.default.createElement(_styles.BusinessTags, null, (businessFeatured !== null && businessFeatured !== void 0 ? businessFeatured : business === null || business === void 0 ? void 0 : business.featured) && !hideBusinessFavoriteBadge && /*#__PURE__*/_react.default.createElement("span", {
183
191
  className: "crown"
184
- }, /*#__PURE__*/_react.default.createElement(_FaCrown.default, null)), !hideBusinessOffer && !isCustomLayout && (configState === null || configState === void 0 || (_configState$configs = configState.configs) === null || _configState$configs === void 0 || (_configState$configs = _configState$configs.preorder_status_enabled) === null || _configState$configs === void 0 ? void 0 : _configState$configs.value) === '1' && /*#__PURE__*/_react.default.createElement("div", null, !!getBusinessOffer(businessOffers !== null && businessOffers !== void 0 ? businessOffers : business === null || business === void 0 ? void 0 : business.offers) && /*#__PURE__*/_react.default.createElement("span", null, t('DISCOUNT', 'Discount'), ' ', getBusinessOffer(businessOffers !== null && businessOffers !== void 0 ? businessOffers : business === null || business === void 0 ? void 0 : business.offers)), !isBusinessOpen && /*#__PURE__*/_react.default.createElement("span", null, t('PREORDER', 'PreOrder')))), /*#__PURE__*/_react.default.createElement(_styles.BusinessHeaderClosedContainer, null, /*#__PURE__*/_react.default.createElement("div", null, !!businessWillCloseSoonMinutes && (orderState === null || orderState === void 0 || (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.moment) === null && isBusinessOpen && (business === null || business === void 0 ? void 0 : business.enabled) !== false && /*#__PURE__*/_react.default.createElement("h1", null, businessWillCloseSoonMinutes, " ", t('MINUTES_TO_CLOSE', 'minutes to close')), !isBusinessOpen && /*#__PURE__*/_react.default.createElement("h1", {
192
+ }, /*#__PURE__*/_react.default.createElement(_FaCrown.default, null)), !hideBusinessOffer && !isCustomLayout && (configState === null || configState === void 0 || (_configState$configs = configState.configs) === null || _configState$configs === void 0 || (_configState$configs = _configState$configs.preorder_status_enabled) === null || _configState$configs === void 0 ? void 0 : _configState$configs.value) === '1' && /*#__PURE__*/_react.default.createElement("div", null, !!getBusinessOffer(businessOffers !== null && businessOffers !== void 0 ? businessOffers : business === null || business === void 0 ? void 0 : business.offers) && /*#__PURE__*/_react.default.createElement("span", null, t('DISCOUNT', 'Discount'), ' ', getBusinessOffer(businessOffers !== null && businessOffers !== void 0 ? businessOffers : business === null || business === void 0 ? void 0 : business.offers)), !isBusinessOpen && /*#__PURE__*/_react.default.createElement("span", null, t('PREORDER', 'PreOrder')))), /*#__PURE__*/_react.default.createElement(_styles.BusinessHeaderClosedContainer, null, /*#__PURE__*/_react.default.createElement(_styles.ClosedContainer, null, !!businessWillCloseSoonMinutes && (orderState === null || orderState === void 0 || (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.moment) === null && isBusinessOpen && (business === null || business === void 0 ? void 0 : business.enabled) !== false && /*#__PURE__*/_react.default.createElement("h1", null, businessWillCloseSoonMinutes, " ", t('MINUTES_TO_CLOSE', 'minutes to close')), !isBusinessOpen && /*#__PURE__*/_react.default.createElement("h1", {
185
193
  className: "closed"
186
194
  }, t('CLOSED', 'Closed'), (business === null || business === void 0 ? void 0 : business.enabled) === false && "(".concat(t('DISABLED', 'Disabled'), ")"))), (business === null || business === void 0 ? void 0 : business.disabled_reason) && (business === null || business === void 0 ? void 0 : business.enabled) === false && /*#__PURE__*/_react.default.createElement("h2", {
187
195
  className: "disabled"
188
- }, business === null || business === void 0 ? void 0 : business.disabled_reason)))), /*#__PURE__*/_react.default.createElement(_styles.BusinessContent, {
196
+ }, business === null || business === void 0 ? void 0 : business.disabled_reason), isCustomerMode && /*#__PURE__*/_react.default.createElement(_styles.ScheduleContainer, null, /*#__PURE__*/_react.default.createElement("p", null, t('OPERATION_SCHEDULE', 'Operatiion schedule')), business === null || business === void 0 || (_business$today = business.today) === null || _business$today === void 0 || (_business$today = _business$today.lapses) === null || _business$today === void 0 ? void 0 : _business$today.map(function (lapse, i) {
197
+ return /*#__PURE__*/_react.default.createElement("div", {
198
+ key: i
199
+ }, /*#__PURE__*/_react.default.createElement("p", null, scheduleFormatted(lapse === null || lapse === void 0 ? void 0 : lapse.open), " ", t('TO', 'to'), " ", scheduleFormatted(lapse === null || lapse === void 0 ? void 0 : lapse.close)));
200
+ }))))), /*#__PURE__*/_react.default.createElement(_styles.BusinessContent, {
189
201
  isCustomerMode: isCustomerMode
190
202
  }, /*#__PURE__*/_react.default.createElement(_styles.BusinessLogoWrapper, null, !hideBusinessLogo && /*#__PURE__*/_react.default.createElement(_styles.WrapperBusinessLogo, {
191
203
  isSkeleton: isSkeleton,
@@ -4,16 +4,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.WrapperBusinessLogo = exports.WrapperBusinessCard = exports.RibbonBox = exports.Medadata = exports.InfoLength = exports.InfoDescription = exports.FavoriteWrapper = exports.ContainerCard = exports.Categories = exports.CardOverlay = exports.CallCenterInformationBullet = exports.CallCenterInformation = exports.BusinessTags = exports.BusinessStarInfo = exports.BusinessName = exports.BusinessLogoWrapper = exports.BusinessLogo = exports.BusinessInfoItem = exports.BusinessInfo = exports.BusinessHero = exports.BusinessHeaderClosedContainer = exports.BusinessHeader = exports.BusinessContent = void 0;
7
+ exports.WrapperBusinessLogo = exports.WrapperBusinessCard = exports.ScheduleContainer = exports.RibbonBox = exports.Medadata = exports.InfoLength = exports.InfoDescription = exports.FavoriteWrapper = exports.ContainerCard = exports.ClosedContainer = exports.Categories = exports.CardOverlay = exports.CallCenterInformationBullet = exports.CallCenterInformation = exports.BusinessTags = exports.BusinessStarInfo = exports.BusinessName = exports.BusinessLogoWrapper = exports.BusinessLogo = exports.BusinessInfoItem = exports.BusinessInfo = exports.BusinessHero = exports.BusinessHeaderClosedContainer = exports.BusinessHeader = exports.BusinessContent = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
10
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52;
10
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54;
11
11
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
12
12
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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 = exports.ContainerCard = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border: 1px solid #E9ECEF;\n box-sizing: border-box;\n border-radius: 7.6px;\n max-height: 300px;\n height: ", ";\n border-radius: 10px;\n margin: 30px 20px;\n\n ", "\n\n ", "\n\n ", "\n \n ", "\n\n ", "\n \n ", "\n \n"])), function (_ref) {
16
+ var ContainerCard = exports.ContainerCard = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border: 1px solid #E9ECEF;\n box-sizing: border-box;\n border-radius: 7.6px;\n max-height: 300px;\n height: ", ";\n border-radius: 10px;\n margin: 30px 20px;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n"])), function (_ref) {
17
17
  var isSkeleton = _ref.isSkeleton;
18
18
  return isSkeleton ? 'auto' : '320px';
19
19
  }, function (_ref2) {
@@ -63,7 +63,7 @@ var BusinessHeader = exports.BusinessHeader = function BusinessHeader(props) {
63
63
  style: style
64
64
  }), props.children);
65
65
  };
66
- var BusinessHeaderClosedContainer = exports.BusinessHeaderClosedContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n div {\n text-align: center;\n width: 100%;\n line-break: anywhere;\n }\n\n"])));
66
+ var BusinessHeaderClosedContainer = exports.BusinessHeaderClosedContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n\n h1, h2 {\n margin: 0;\n }\n"])));
67
67
  var BusinessTags = exports.BusinessTags = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n display: flex;\n position: absolute;\n justify-content: space-between;\n align-items: center;\n top: 0;\n margin: 15px;\n width: calc(100% - 35px);\n\n span.crown {\n background-color: rgba(0, 0, 0, 0.5);\n font-size: 20px;\n display: flex;\n align-items: center;\n color: #FFC917;\n }\n\n div {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n\n span {\n font-size: 11px;\n padding: 3px 8px;\n color: #748194;\n background: #DEE2E6;\n border-radius: 50px;\n margin-right: 10px;\n ", "\n &:last-child {\n ", "\n }\n }\n"])), function (props) {
68
68
  var _props$theme;
69
69
  return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin-left: 10px;\n margin-right: 0;\n "])));
@@ -110,7 +110,7 @@ var BusinessName = exports.BusinessName = _styledComponents.default.h6(_template
110
110
  return props.theme.colors.darkTextColor;
111
111
  });
112
112
  var Categories = exports.Categories = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n font-size: 14px;\n font-weight: 300;\n color: #6C6C6C;\n\n @media (min-width: 481px) {\n font-size: 16px;\n }\n"])));
113
- var Medadata = exports.Medadata = _styledComponents.default.div(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n margin-top: 5px;\n display: flex;\n font-weight: 300;\n font-size: 12px;\n color: #909BA9;\n flex-wrap: wrap;\n \n\n ", "\n ", "\n p {\n color: #909BA9;\n svg {\n font-size: 7px;\n min-width: 6px;\n margin: 0 3px;\n }\n\n span {\n margin-right: 10px;\n ", "\n }\n }\n\n @media (min-width: 481px) {\n font-size: 14px;\n }\n"])), function (_ref18) {
113
+ var Medadata = exports.Medadata = _styledComponents.default.div(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n margin-top: 5px;\n display: flex;\n font-weight: 300;\n font-size: 12px;\n color: #909BA9;\n flex-wrap: wrap;\n\n ", "\n ", "\n p {\n color: #909BA9;\n svg {\n font-size: 7px;\n min-width: 6px;\n margin: 0 3px;\n }\n\n span {\n margin-right: 10px;\n ", "\n }\n }\n\n @media (min-width: 481px) {\n font-size: 14px;\n }\n"])), function (_ref18) {
114
114
  var isCustomerMode = _ref18.isCustomerMode;
115
115
  return isCustomerMode && (0, _styledComponents.css)(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n > div {\n flex-direction: column;\n }\n "])));
116
116
  }, function (_ref19) {
@@ -159,4 +159,6 @@ var FavoriteWrapper = exports.FavoriteWrapper = _styledComponents.default.div(_t
159
159
  return props.theme.rtl && (0, _styledComponents.css)(_templateObject52 || (_templateObject52 = _taggedTemplateLiteral(["\n margin-right: 15px;\n margin-left: 0px;\n "])));
160
160
  }, function (props) {
161
161
  return props.theme.colors.danger500;
162
- });
162
+ });
163
+ var ScheduleContainer = exports.ScheduleContainer = _styledComponents.default.div(_templateObject53 || (_templateObject53 = _taggedTemplateLiteral(["\n width: 50%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n background: #4472C4;\n border: 2px solid #000;\n div {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n p {\n margin: 0;\n color: #fff;\n font-size: 12px;\n }\n"])));
164
+ var ClosedContainer = exports.ClosedContainer = _styledComponents.default.div(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["\n text-align: center;\n width: 100%;\n line-break: anywhere;\n"])));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-external",
3
- "version": "14.1.38",
3
+ "version": "14.1.40",
4
4
  "description": "Ordering UI Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -252,6 +252,7 @@ const AddressFormUI = (props) => {
252
252
  const handleChangeAddress = async (address) => {
253
253
  if (address?.location) {
254
254
  const result = await getBusinessDeliveryZones(address?.location)
255
+ setLocationChange(address?.location)
255
256
  if (result?.length === 0) {
256
257
  showToast(ToastType.Error, t('NO_NEAR_DELIVERY_ZONES', 'No near delivery zones'), 3000)
257
258
  }
@@ -29,11 +29,11 @@ import {
29
29
  CallCenterInformationBullet,
30
30
  BusinessLogoWrapper,
31
31
  BusinessStarInfo,
32
- InfoLength,
33
- InfoDescription,
34
32
  RibbonBox,
35
33
  FavoriteWrapper,
36
- BusinessHeaderClosedContainer
34
+ BusinessHeaderClosedContainer,
35
+ ScheduleContainer,
36
+ ClosedContainer
37
37
  // CardOverlay
38
38
  } from './styles'
39
39
  import GoPrimitiveDot from '@meronex/icons/go/GoPrimitiveDot'
@@ -132,6 +132,11 @@ const BusinessControllerUI = (props) => {
132
132
  })
133
133
  }
134
134
 
135
+ const scheduleFormatted = ({ hour, minute }) => {
136
+ const checkTime = (val) => val < 10 ? `0${val}` : val
137
+ return `${checkTime(hour)}:${checkTime(minute)}`
138
+ }
139
+
135
140
  const hasInformationLength = !!business?.idle_drivers_count || !!business?.busy_drivers_count || !!business?.activated_orders
136
141
 
137
142
  if (typeButton) {
@@ -182,15 +187,25 @@ const BusinessControllerUI = (props) => {
182
187
  )}
183
188
  </BusinessTags>
184
189
  <BusinessHeaderClosedContainer>
185
- <div>
190
+ <ClosedContainer>
186
191
  {!!businessWillCloseSoonMinutes && orderState?.options?.moment === null && isBusinessOpen && business?.enabled !== false && (
187
192
  <h1>{businessWillCloseSoonMinutes} {t('MINUTES_TO_CLOSE', 'minutes to close')}</h1>
188
193
  )}
189
194
  {!isBusinessOpen && <h1 className='closed'>{t('CLOSED', 'Closed')}{business?.enabled === false && `(${t('DISABLED', 'Disabled')})`}</h1>}
190
- </div>
195
+ </ClosedContainer>
191
196
  {business?.disabled_reason && business?.enabled === false && (
192
197
  <h2 className='disabled'>{business?.disabled_reason}</h2>
193
198
  )}
199
+ {isCustomerMode && (
200
+ <ScheduleContainer>
201
+ <p>{t('OPERATION_SCHEDULE', 'Operatiion schedule')}</p>
202
+ {business?.today?.lapses?.map((lapse, i) => (
203
+ <div key={i}>
204
+ <p>{scheduleFormatted(lapse?.open)} {t('TO', 'to')} {scheduleFormatted(lapse?.close)}</p>
205
+ </div>
206
+ ))}
207
+ </ScheduleContainer>
208
+ )}
194
209
  </BusinessHeaderClosedContainer>
195
210
  </BusinessHeader>
196
211
  )}
@@ -28,7 +28,7 @@ export const ContainerCard = styled.div`
28
28
  padding: 10px 30px;
29
29
  }
30
30
  `}
31
-
31
+
32
32
  ${({ firstCard }) => firstCard && css`
33
33
  margin-left: 0;
34
34
  `}
@@ -36,7 +36,7 @@ export const ContainerCard = styled.div`
36
36
  ${({ disabled }) => disabled && css`
37
37
  cursor: not-allowed;
38
38
  `}
39
-
39
+
40
40
  ${({ businessRows }) => css`
41
41
  width: calc(100% - 40px);
42
42
 
@@ -56,7 +56,7 @@ export const ContainerCard = styled.div`
56
56
  width: ${() => businessRows === 4 ? 'calc(25% - 40px)' : businessRows === 3 ? 'calc(33% - 40px)' : 'calc(50% - 40px)'};
57
57
  }
58
58
  `}
59
-
59
+
60
60
  `
61
61
 
62
62
  export const WrapperBusinessCard = styled.div`
@@ -139,12 +139,10 @@ export const BusinessHeaderClosedContainer = styled.div`
139
139
  justify-content: center;
140
140
  align-items: center;
141
141
  width: 100%;
142
- div {
143
- text-align: center;
144
- width: 100%;
145
- line-break: anywhere;
146
- }
147
142
 
143
+ h1, h2 {
144
+ margin: 0;
145
+ }
148
146
  `
149
147
 
150
148
  export const BusinessTags = styled.div`
@@ -340,7 +338,6 @@ export const Medadata = styled.div`
340
338
  font-size: 12px;
341
339
  color: #909BA9;
342
340
  flex-wrap: wrap;
343
-
344
341
 
345
342
  ${({ isCustomerMode }) => isCustomerMode && css`
346
343
  > div {
@@ -510,3 +507,29 @@ export const FavoriteWrapper = styled.div`
510
507
  color: ${props => props.theme.colors.danger500};
511
508
  }
512
509
  `
510
+
511
+ export const ScheduleContainer = styled.div`
512
+ width: 50%;
513
+ display: flex;
514
+ flex-direction: column;
515
+ justify-content: center;
516
+ align-items: center;
517
+ background: #4472C4;
518
+ border: 2px solid #000;
519
+ div {
520
+ display: flex;
521
+ justify-content: center;
522
+ align-items: center;
523
+ }
524
+ p {
525
+ margin: 0;
526
+ color: #fff;
527
+ font-size: 12px;
528
+ }
529
+ `
530
+
531
+ export const ClosedContainer = styled.div`
532
+ text-align: center;
533
+ width: 100%;
534
+ line-break: anywhere;
535
+ `