ordering-ui-external 10.1.0 → 10.2.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 (129) hide show
  1. package/_bundles/{0.ordering-ui.e9827c5566d8cce0eaa4.js → 0.ordering-ui.8384f3801abcc340af2a.js} +1 -1
  2. package/_bundles/{1.ordering-ui.e9827c5566d8cce0eaa4.js → 1.ordering-ui.8384f3801abcc340af2a.js} +1 -1
  3. package/_bundles/{2.ordering-ui.e9827c5566d8cce0eaa4.js → 2.ordering-ui.8384f3801abcc340af2a.js} +1 -1
  4. package/_bundles/{4.ordering-ui.e9827c5566d8cce0eaa4.js → 4.ordering-ui.8384f3801abcc340af2a.js} +1 -1
  5. package/_bundles/{5.ordering-ui.e9827c5566d8cce0eaa4.js → 5.ordering-ui.8384f3801abcc340af2a.js} +1 -1
  6. package/_bundles/{6.ordering-ui.e9827c5566d8cce0eaa4.js → 6.ordering-ui.8384f3801abcc340af2a.js} +1 -1
  7. package/_bundles/{7.ordering-ui.e9827c5566d8cce0eaa4.js → 7.ordering-ui.8384f3801abcc340af2a.js} +2 -2
  8. package/_bundles/{8.ordering-ui.e9827c5566d8cce0eaa4.js → 8.ordering-ui.8384f3801abcc340af2a.js} +1 -1
  9. package/_bundles/{9.ordering-ui.e9827c5566d8cce0eaa4.js → 9.ordering-ui.8384f3801abcc340af2a.js} +1 -1
  10. package/_bundles/ordering-ui.8384f3801abcc340af2a.js +2 -0
  11. package/_modules/components/BusinessBasicInformation/index.js +7 -10
  12. package/_modules/components/OrderDetails/index.js +14 -17
  13. package/_modules/components/ProductItemAccordion/index.js +4 -5
  14. package/_modules/components/RenderProductsLayout/SearchProducts/index.js +2 -5
  15. package/_modules/components/UserFormDetails/index.js +7 -8
  16. package/_modules/components/UserProfileForm/ProfileOptions/index.js +4 -5
  17. package/_modules/components/UserProfileForm/index.js +10 -11
  18. package/_modules/contexts/ThemeContext/index.js +1 -1
  19. package/_modules/themes/five/src/components/AddressList/index.js +0 -3
  20. package/_modules/themes/five/src/components/BusinessController/index.js +11 -14
  21. package/_modules/themes/five/src/components/BusinessInformation/styles.js +19 -14
  22. package/_modules/themes/five/src/components/BusinessPreorder/index.js +51 -10
  23. package/_modules/themes/five/src/components/BusinessPreorder/styles.js +32 -25
  24. package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +2 -5
  25. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +11 -4
  26. package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +11 -12
  27. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +5 -10
  28. package/_modules/themes/five/src/components/Cart/index.js +17 -9
  29. package/_modules/themes/five/src/components/CartPopover/index.js +4 -7
  30. package/_modules/themes/five/src/components/CartPopover/styles.js +4 -1
  31. package/_modules/themes/five/src/components/Checkout/index.js +3 -6
  32. package/_modules/themes/five/src/components/Confirm/styles.js +16 -13
  33. package/_modules/themes/five/src/components/DatePicker/index.js +2 -1
  34. package/_modules/themes/five/src/components/Favorite/index.js +4 -5
  35. package/_modules/themes/five/src/components/Footer/index.js +2 -3
  36. package/_modules/themes/five/src/components/Header/index.js +5 -8
  37. package/_modules/themes/five/src/components/HeaderOption/index.js +4 -5
  38. package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +7 -10
  39. package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +1 -1
  40. package/_modules/themes/five/src/components/Modal/styles.js +4 -2
  41. package/_modules/themes/five/src/components/MomentContent/index.js +16 -6
  42. package/_modules/themes/five/src/components/MomentControl/index.js +44 -34
  43. package/_modules/themes/five/src/components/MomentControl/styles.js +49 -27
  44. package/_modules/themes/five/src/components/OrderDetails/index.js +31 -24
  45. package/_modules/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +4 -7
  46. package/_modules/themes/five/src/components/OrderTypeSelectorContent/index.js +11 -1
  47. package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +4 -5
  48. package/_modules/themes/five/src/components/PageBanner/index.js +75 -54
  49. package/_modules/themes/five/src/components/ProductForm/styles.js +12 -9
  50. package/_modules/themes/five/src/components/ProductItemAccordion/index.js +0 -3
  51. package/_modules/themes/five/src/components/ProductOption/styles.js +4 -1
  52. package/_modules/themes/five/src/components/RenderProductsLayout/index.js +8 -9
  53. package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +0 -3
  54. package/_modules/themes/five/src/components/UserFormDetails/index.js +3 -6
  55. package/_modules/themes/five/src/components/UserPopover/index.js +3 -6
  56. package/_modules/themes/five/src/components/UserPopover/styles.js +8 -5
  57. package/_modules/themes/five/src/components/UserProfileForm/ProfileOptions/index.js +4 -5
  58. package/_modules/themes/five/src/components/UserProfileForm/index.js +2 -5
  59. package/_modules/themes/six/src/components/BusinessBasicInformation/index.js +8 -9
  60. package/_modules/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +3 -6
  61. package/package.json +2 -2
  62. package/src/components/BusinessBasicInformation/index.js +7 -8
  63. package/src/components/OrderDetails/index.js +14 -16
  64. package/src/components/ProductItemAccordion/index.js +4 -3
  65. package/src/components/RenderProductsLayout/SearchProducts/index.js +2 -3
  66. package/src/components/UserFormDetails/index.js +6 -5
  67. package/src/components/UserProfileForm/ProfileOptions/index.js +4 -4
  68. package/src/components/UserProfileForm/index.js +10 -10
  69. package/src/contexts/ThemeContext/index.js +1 -1
  70. package/src/themes/five/src/components/AddressForm/index.js +1 -2
  71. package/src/themes/five/src/components/AddressList/index.js +1 -3
  72. package/src/themes/five/src/components/BusinessController/index.js +2 -4
  73. package/src/themes/five/src/components/BusinessInformation/index.js +1 -2
  74. package/src/themes/five/src/components/BusinessInformation/styles.js +2 -2
  75. package/src/themes/five/src/components/BusinessPreorder/index.js +61 -10
  76. package/src/themes/five/src/components/BusinessPreorder/styles.js +93 -43
  77. package/src/themes/five/src/components/BusinessProductsCategories/index.js +2 -3
  78. package/src/themes/five/src/components/BusinessProductsList/index.js +1 -2
  79. package/src/themes/five/src/components/BusinessProductsListing/index.js +10 -3
  80. package/src/themes/five/src/components/BusinessProductsListing/styles.js +1 -1
  81. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +6 -7
  82. package/src/themes/five/src/components/Cart/index.js +11 -4
  83. package/src/themes/five/src/components/CartPopover/index.js +2 -3
  84. package/src/themes/five/src/components/CartPopover/styles.js +1 -1
  85. package/src/themes/five/src/components/Checkout/index.js +2 -4
  86. package/src/themes/five/src/components/Confirm/styles.js +1 -1
  87. package/src/themes/five/src/components/DatePicker/index.js +1 -0
  88. package/src/themes/five/src/components/Favorite/index.js +4 -3
  89. package/src/themes/five/src/components/Footer/index.js +3 -2
  90. package/src/themes/five/src/components/Header/index.js +4 -5
  91. package/src/themes/five/src/components/HeaderOption/index.js +4 -3
  92. package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +7 -8
  93. package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +1 -0
  94. package/src/themes/five/src/components/Modal/styles.js +1 -1
  95. package/src/themes/five/src/components/MomentContent/index.js +17 -8
  96. package/src/themes/five/src/components/MomentControl/index.js +83 -45
  97. package/src/themes/five/src/components/MomentControl/styles.js +137 -34
  98. package/src/themes/five/src/components/MyOrders/index.js +1 -1
  99. package/src/themes/five/src/components/OrderDetails/index.js +50 -21
  100. package/src/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +4 -6
  101. package/src/themes/five/src/components/OrderTypeSelectorContent/index.js +13 -1
  102. package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +4 -3
  103. package/src/themes/five/src/components/PageBanner/index.js +64 -50
  104. package/src/themes/five/src/components/ProductForm/styles.js +1 -1
  105. package/src/themes/five/src/components/ProductItemAccordion/index.js +1 -2
  106. package/src/themes/five/src/components/ProductOption/styles.js +1 -1
  107. package/src/themes/five/src/components/RenderProductsLayout/index.js +9 -6
  108. package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +1 -2
  109. package/src/themes/five/src/components/UserFormDetails/index.js +3 -4
  110. package/src/themes/five/src/components/UserPopover/index.js +3 -4
  111. package/src/themes/five/src/components/UserPopover/styles.js +1 -1
  112. package/src/themes/five/src/components/UserProfileForm/ProfileOptions/index.js +4 -3
  113. package/src/themes/five/src/components/UserProfileForm/index.js +2 -4
  114. package/src/themes/six/src/components/BusinessBasicInformation/index.js +8 -7
  115. package/src/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +2 -3
  116. package/template/app.js +15 -10
  117. package/template/components/HelmetTags/index.js +3 -2
  118. package/template/pages/AddressList/index.js +4 -3
  119. package/template/pages/BusinessProductsList/index.js +5 -4
  120. package/template/pages/BusinessesList/index.js +6 -6
  121. package/template/pages/Checkout/index.js +6 -4
  122. package/template/pages/Home/index.js +4 -2
  123. package/template/pages/MessagesList/index.js +5 -4
  124. package/template/pages/MyOrders/index.js +6 -5
  125. package/template/pages/OrderDetails/index.js +4 -3
  126. package/_bundles/ordering-ui.e9827c5566d8cce0eaa4.js +0 -2
  127. package/template/components/OrderingThemeUpdated/index.js +0 -41
  128. /package/_bundles/{7.ordering-ui.e9827c5566d8cce0eaa4.js.LICENSE.txt → 7.ordering-ui.8384f3801abcc340af2a.js.LICENSE.txt} +0 -0
  129. /package/_bundles/{ordering-ui.e9827c5566d8cce0eaa4.js.LICENSE.txt → ordering-ui.8384f3801abcc340af2a.js.LICENSE.txt} +0 -0
@@ -19,11 +19,13 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
19
19
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
20
20
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
21
  var MomentContent = function MomentContent(props) {
22
- var _configs$max_days_pre, _document, _document$getElementB, _props$beforeElements, _props$beforeComponen, _orderState$options, _orderState$options$a, _props$afterComponent, _props$afterElements;
22
+ var _props$preorderMaximu, _configs$max_days_pre, _document, _document$getElementB, _props$beforeElements, _props$beforeComponen, _orderState$options, _orderState$options$a, _props$afterComponent, _props$afterElements;
23
23
  var _useConfig = (0, _orderingComponentsExternal.useConfig)(),
24
24
  _useConfig2 = _slicedToArray(_useConfig, 1),
25
- configs = _useConfig2[0].configs;
26
- var limitDays = parseInt(configs === null || configs === void 0 ? void 0 : (_configs$max_days_pre = configs.max_days_preorder) === null || _configs$max_days_pre === void 0 ? void 0 : _configs$max_days_pre.value, 10);
25
+ _useConfig2$ = _useConfig2[0],
26
+ configs = _useConfig2$.configs,
27
+ loading = _useConfig2$.loading;
28
+ var limitDays = parseInt((_props$preorderMaximu = props.preorderMaximumDays) !== null && _props$preorderMaximu !== void 0 ? _props$preorderMaximu : configs === null || configs === void 0 ? void 0 : (_configs$max_days_pre = configs.max_days_preorder) === null || _configs$max_days_pre === void 0 ? void 0 : _configs$max_days_pre.value, 10);
27
29
  var _useOrder = (0, _orderingComponentsExternal.useOrder)(),
28
30
  _useOrder2 = _slicedToArray(_useOrder, 1),
29
31
  orderState = _useOrder2[0];
@@ -48,9 +50,17 @@ var MomentContent = function MomentContent(props) {
48
50
  }, props));
49
51
  }), /*#__PURE__*/_react.default.createElement(_styles.Container, {
50
52
  isLoading: orderState === null || orderState === void 0 ? void 0 : orderState.loading
51
- }, /*#__PURE__*/_react.default.createElement(_MomentControl.MomentControl, _extends({}, momentProps, {
52
- onClose: props.onClose
53
- })), (orderState === null || orderState === void 0 ? void 0 : orderState.loading) && /*#__PURE__*/_react.default.createElement(_styles.Layer, {
53
+ }, (!props.cateringPreorder || !loading) && /*#__PURE__*/_react.default.createElement(_MomentControl.MomentControl, _extends({}, momentProps, {
54
+ onClose: props.onClose,
55
+ cateringPreorder: props.cateringPreorder,
56
+ isCart: props.isCart,
57
+ preorderSlotInterval: props.preorderSlotInterval,
58
+ preorderLeadTime: props.preorderLeadTime,
59
+ preorderTimeRange: props.preorderTimeRange,
60
+ preorderMaximumDays: props.preorderMaximumDays,
61
+ preorderMinimumDays: props.preorderMinimumDays,
62
+ business: props.business
63
+ })), (orderState === null || orderState === void 0 ? void 0 : orderState.loading) && !props.isHeader && /*#__PURE__*/_react.default.createElement(_styles.Layer, {
54
64
  height: (momentControl === null || momentControl === void 0 ? void 0 : momentControl.height) && "".concat(momentControl === null || momentControl === void 0 ? void 0 : momentControl.height, "px")
55
65
  }, (window.location.pathname !== '/search' || (orderState === null || orderState === void 0 ? void 0 : (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : (_orderState$options$a = _orderState$options.address) === null || _orderState$options$a === void 0 ? void 0 : _orderState$options$a.location)) && /*#__PURE__*/_react.default.createElement(_SpinnerLoader.SpinnerLoader, {
56
66
  style: {
@@ -29,7 +29,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
29
29
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
30
30
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
31
31
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
32
- 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); }
33
32
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
34
33
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
35
34
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -38,7 +37,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
38
37
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
39
38
  _swiper.default.use([_swiper.Navigation]);
40
39
  var MomentControlUI = function MomentControlUI(props) {
41
- var _configs$general_hour, _configs$general_hour2, _props$beforeElements, _props$beforeComponen, _configs$max_days_pre, _configs$max_days_pre2, _configs$max_days_pre3, _props$afterComponent, _props$afterElements;
40
+ var _configs$general_hour, _configs$general_hour2, _datesList$slice, _configs$max_days_pre, _configs$max_days_pre2, _configs$max_days_pre3, _configs$max_days_pre4, _configs$max_days_pre5, _configs$max_days_pre6;
42
41
  var isAsap = props.isAsap,
43
42
  datesList = props.datesList,
44
43
  hoursList = props.hoursList,
@@ -48,7 +47,14 @@ var MomentControlUI = function MomentControlUI(props) {
48
47
  handleChangeDate = props.handleChangeDate,
49
48
  handleChangeTime = props.handleChangeTime,
50
49
  onClose = props.onClose,
51
- isAppoint = props.isAppoint;
50
+ isAppoint = props.isAppoint,
51
+ cateringPreorder = props.cateringPreorder,
52
+ isCart = props.isCart,
53
+ preorderLeadTime = props.preorderLeadTime,
54
+ business = props.business,
55
+ getActualSchedule = props.getActualSchedule,
56
+ preorderMaximumDays = props.preorderMaximumDays,
57
+ preorderMinimumDays = props.preorderMinimumDays;
52
58
  var _useConfig = (0, _orderingComponentsExternal.useConfig)(),
53
59
  _useConfig2 = _slicedToArray(_useConfig, 1),
54
60
  configs = _useConfig2[0].configs;
@@ -112,14 +118,30 @@ var MomentControlUI = function MomentControlUI(props) {
112
118
  };
113
119
  (0, _react.useEffect)(function () {
114
120
  var _timeLists = [];
115
- if (!scheduleList) {
116
- _timeLists = hoursList.map(function (hour) {
121
+ if (!scheduleList || cateringPreorder) {
122
+ var _Object$keys, _Object$keys2;
123
+ var schedule = business && ((_Object$keys = Object.keys(business || {})) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) > 0 && getActualSchedule();
124
+ if (!schedule && cateringPreorder && ((_Object$keys2 = Object.keys(business)) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.length) > 0) {
125
+ setIsEnabled(false);
126
+ return;
127
+ }
128
+ _timeLists = hoursList.filter(function (hour) {
129
+ var _Object$keys3, _schedule$lapses;
130
+ return (((_Object$keys3 = Object.keys(business || {})) === null || _Object$keys3 === void 0 ? void 0 : _Object$keys3.length) === 0 || (schedule === null || schedule === void 0 ? void 0 : (_schedule$lapses = schedule.lapses) === null || _schedule$lapses === void 0 ? void 0 : _schedule$lapses.some(function (lapse) {
131
+ return (0, _moment.default)(dateSelected + " ".concat(hour.startTime)) >= (0, _moment.default)(dateSelected + " ".concat(lapse.open.hour, ":").concat(lapse.open.minute)).add(preorderLeadTime, 'minutes') && (0, _moment.default)(dateSelected + " ".concat(hour.endTime)) <= (0, _moment.default)(dateSelected + " ".concat(lapse.close.hour, ":").concat(lapse.close.minute));
132
+ }))) && (0, _moment.default)(dateSelected + " ".concat(hour.startTime)) < (0, _moment.default)(dateSelected + " ".concat(hour.endTime)) && ((0, _moment.default)().add(preorderLeadTime, 'minutes') < (0, _moment.default)(dateSelected + " ".concat(hour.startTime)) || !cateringPreorder);
133
+ }).map(function (hour) {
117
134
  return {
118
135
  value: hour.startTime,
119
136
  text: is12hours ? hour.startTime.includes('12') ? "".concat(hour.startTime, "PM") : parseTime((0, _moment.default)(hour.startTime, 'HH:mm'), {
120
137
  outputFormat: 'hh:mma'
121
138
  }) : parseTime((0, _moment.default)(hour.startTime, 'HH:mm'), {
122
139
  outputFormat: 'HH:mm'
140
+ }),
141
+ endText: is12hours ? hour.endTime.includes('12') ? "".concat(hour.endTime, "PM") : parseTime((0, _moment.default)(hour.endTime, 'HH:mm'), {
142
+ outputFormat: 'hh:mma'
143
+ }) : parseTime((0, _moment.default)(hour.endTime, 'HH:mm'), {
144
+ outputFormat: 'HH:mm'
123
145
  })
124
146
  };
125
147
  });
@@ -128,12 +150,12 @@ var MomentControlUI = function MomentControlUI(props) {
128
150
  _timeLists = getTimes(dateSelected, scheduleList);
129
151
  }
130
152
  setTimeList(_timeLists);
131
- }, [dateSelected, hoursList, scheduleList]);
153
+ }, [dateSelected, hoursList, scheduleList, cateringPreorder, JSON.stringify(business)]);
132
154
  (0, _react.useEffect)(function () {
133
- handleCheckBoxChange(isAsap);
155
+ handleCheckBoxChange(isAsap && (preorderMinimumDays === 0 && preorderLeadTime === 0 || !cateringPreorder));
134
156
  }, [isAsap]);
135
157
  (0, _react.useEffect)(function () {
136
- if (!pathname.includes('store')) {
158
+ if (!pathname.includes('store') || isCart) {
137
159
  setScheduleList(null);
138
160
  return;
139
161
  }
@@ -145,15 +167,7 @@ var MomentControlUI = function MomentControlUI(props) {
145
167
  }, []);
146
168
  return /*#__PURE__*/_react.default.createElement("div", {
147
169
  id: "moment_control"
148
- }, (_props$beforeElements = props.beforeElements) === null || _props$beforeElements === void 0 ? void 0 : _props$beforeElements.map(function (BeforeElement, i) {
149
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
150
- key: i
151
- }, BeforeElement);
152
- }), (_props$beforeComponen = props.beforeComponents) === null || _props$beforeComponen === void 0 ? void 0 : _props$beforeComponen.map(function (BeforeComponent, i) {
153
- return /*#__PURE__*/_react.default.createElement(BeforeComponent, _extends({
154
- key: i
155
- }, props));
156
- }), !isAppoint && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.Title, null, t('WHEN_DO_WE_DELIVERY', 'When do we delivery?')), /*#__PURE__*/_react.default.createElement(_styles.CheckBoxWrapper, {
170
+ }, !isAppoint && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !isCart && /*#__PURE__*/_react.default.createElement(_styles.Title, null, t('WHEN_DO_WE_DELIVERY', 'When do we delivery?')), (preorderMinimumDays === 0 && preorderLeadTime === 0 || !cateringPreorder) && /*#__PURE__*/_react.default.createElement(_styles.CheckBoxWrapper, {
157
171
  highlight: isAsap && isASP,
158
172
  onClick: function onClick() {
159
173
  return handleCheckBoxChange(true);
@@ -164,7 +178,7 @@ var MomentControlUI = function MomentControlUI(props) {
164
178
  onClick: function onClick() {
165
179
  return handleCheckBoxChange(null);
166
180
  }
167
- }, isASP ? /*#__PURE__*/_react.default.createElement(_CgRadioCheck.default, null) : /*#__PURE__*/_react.default.createElement(_styles.CheckedIcon, null), /*#__PURE__*/_react.default.createElement("span", null, t('SCHEDULE_FOR_LATER', 'Schedule for later')))), (!isASP || isAppoint) && (!props.isCustomLayout ? /*#__PURE__*/_react.default.createElement(_styles.OrderTimeWrapper, null, !isAppoint && /*#__PURE__*/_react.default.createElement("p", null, t('ORDER_TIME', 'Order time')), /*#__PURE__*/_react.default.createElement(_styles.DateWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.MonthYearLayer, null, /*#__PURE__*/_react.default.createElement("span", null, (0, _moment.default)(dateSelected).format('MMMM, yyyy'))), /*#__PURE__*/_react.default.createElement(_styles.DaysSwiper, {
181
+ }, isASP ? /*#__PURE__*/_react.default.createElement(_CgRadioCheck.default, null) : /*#__PURE__*/_react.default.createElement(_styles.CheckedIcon, null), /*#__PURE__*/_react.default.createElement("span", null, t('SCHEDULE_FOR_LATER', 'Schedule for later')))), (!isASP || isAppoint) && (!props.isCustomLayout ? /*#__PURE__*/_react.default.createElement(_styles.OrderTimeWrapper, null, !isAppoint && !isCart && /*#__PURE__*/_react.default.createElement("p", null, t('ORDER_TIME', 'Order time')), /*#__PURE__*/_react.default.createElement(_styles.DateWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.MonthYearLayer, null, /*#__PURE__*/_react.default.createElement("span", null, ((_datesList$slice = datesList.slice(cateringPreorder && preorderMinimumDays || 0, Number(cateringPreorder ? preorderMaximumDays : (_configs$max_days_pre = configs === null || configs === void 0 ? void 0 : (_configs$max_days_pre2 = configs.max_days_preorder) === null || _configs$max_days_pre2 === void 0 ? void 0 : _configs$max_days_pre2.value) !== null && _configs$max_days_pre !== void 0 ? _configs$max_days_pre : 6, 10))) === null || _datesList$slice === void 0 ? void 0 : _datesList$slice.length) === 0 ? (0, _moment.default)(dateSelected).format('Do MMMM, yyyy') : (0, _moment.default)(dateSelected).format('MMMM, yyyy'))), /*#__PURE__*/_react.default.createElement(_styles.DaysSwiper, {
168
182
  left: /*#__PURE__*/_react.default.createElement(_BsCaretLeftFill.default, null)
169
183
  }, /*#__PURE__*/_react.default.createElement(_react2.Swiper, {
170
184
  spaceBetween: 0,
@@ -183,7 +197,7 @@ var MomentControlUI = function MomentControlUI(props) {
183
197
  spaceBetween: 0
184
198
  },
185
199
  769: {
186
- slidesPerView: (configs === null || configs === void 0 ? void 0 : (_configs$max_days_pre = configs.max_days_preorder) === null || _configs$max_days_pre === void 0 ? void 0 : _configs$max_days_pre.value) < 7 ? configs === null || configs === void 0 ? void 0 : (_configs$max_days_pre2 = configs.max_days_preorder) === null || _configs$max_days_pre2 === void 0 ? void 0 : _configs$max_days_pre2.value : 7,
200
+ slidesPerView: (configs === null || configs === void 0 ? void 0 : (_configs$max_days_pre3 = configs.max_days_preorder) === null || _configs$max_days_pre3 === void 0 ? void 0 : _configs$max_days_pre3.value) < 7 ? configs === null || configs === void 0 ? void 0 : (_configs$max_days_pre4 = configs.max_days_preorder) === null || _configs$max_days_pre4 === void 0 ? void 0 : _configs$max_days_pre4.value : 7,
187
201
  spaceBetween: 0
188
202
  }
189
203
  },
@@ -191,7 +205,7 @@ var MomentControlUI = function MomentControlUI(props) {
191
205
  watchSlidesProgress: true,
192
206
  className: "swiper-datelist",
193
207
  preventClicksPropagation: false
194
- }, datesList.slice(0, Number((configs === null || configs === void 0 ? void 0 : (_configs$max_days_pre3 = configs.max_days_preorder) === null || _configs$max_days_pre3 === void 0 ? void 0 : _configs$max_days_pre3.value) || 6, 10)).map(function (date) {
208
+ }, datesList.slice(cateringPreorder && preorderMinimumDays || 0, Number(cateringPreorder ? preorderMaximumDays : (_configs$max_days_pre5 = configs === null || configs === void 0 ? void 0 : (_configs$max_days_pre6 = configs.max_days_preorder) === null || _configs$max_days_pre6 === void 0 ? void 0 : _configs$max_days_pre6.value) !== null && _configs$max_days_pre5 !== void 0 ? _configs$max_days_pre5 : 6, 10)).map(function (date) {
195
209
  var dateParts = date.split('-');
196
210
  var _date = new Date(dateParts[0], dateParts[1] - 1, dateParts[2]);
197
211
  var dayName = t('DAY' + (_date.getDay() >= 1 ? _date.getDay() : 7)).substring(0, 2);
@@ -215,9 +229,12 @@ var MomentControlUI = function MomentControlUI(props) {
215
229
  onClick: function onClick() {
216
230
  return handleChangeTime(time.value);
217
231
  },
218
- isAppoint: isAppoint
219
- }, /*#__PURE__*/_react.default.createElement("span", null, time.text));
220
- })) : /*#__PURE__*/_react.default.createElement(_styles.ClosedBusinessMsg, null, t('ERROR_ADD_PRODUCT_BUSINESS_CLOSED', 'The business is closed at the moment')))) : /*#__PURE__*/_react.default.createElement(_CustomLayout.CustomLayout, {
232
+ isAppoint: isAppoint,
233
+ cateringPreorder: cateringPreorder
234
+ }, /*#__PURE__*/_react.default.createElement("span", null, cateringPreorder && /*#__PURE__*/_react.default.createElement(_styles.CheckIcon, null, timeSelected === time.value ? /*#__PURE__*/_react.default.createElement(_styles.CheckedIcon, {
235
+ cateringPreorder: cateringPreorder
236
+ }) : /*#__PURE__*/_react.default.createElement(_CgRadioCheck.default, null)), /*#__PURE__*/_react.default.createElement("p", null, time.text, " ", cateringPreorder && "- ".concat(time.endText))));
237
+ })) : /*#__PURE__*/_react.default.createElement(_styles.ClosedBusinessMsg, null, !business ? t('ERROR_SHEDULE_UNAVAILABLE', 'There are no schedules for this date') : t('ERROR_ADD_PRODUCT_BUSINESS_CLOSED', 'The business is closed at the moment')))) : /*#__PURE__*/_react.default.createElement(_CustomLayout.CustomLayout, {
221
238
  handleChangeDate: handleChangeDate,
222
239
  datesList: datesList,
223
240
  hoursList: hoursList,
@@ -225,20 +242,13 @@ var MomentControlUI = function MomentControlUI(props) {
225
242
  timeList: timeList,
226
243
  timeSelected: timeSelected,
227
244
  handleChangeTime: handleChangeTime
228
- })), !isAppoint && /*#__PURE__*/_react.default.createElement(_styles.ButtonWrapper, null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
245
+ })), !isAppoint && !isCart && /*#__PURE__*/_react.default.createElement(_styles.ButtonWrapper, null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
229
246
  color: "primary",
230
247
  onClick: function onClick() {
231
248
  return onClose();
232
- }
233
- }, /*#__PURE__*/_react.default.createElement("span", null, t('CONTINUE', 'Continue')), /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.ArrowRight, null))), (_props$afterComponent = props.afterComponents) === null || _props$afterComponent === void 0 ? void 0 : _props$afterComponent.map(function (AfterComponent, i) {
234
- return /*#__PURE__*/_react.default.createElement(AfterComponent, _extends({
235
- key: i
236
- }, props));
237
- }), (_props$afterElements = props.afterElements) === null || _props$afterElements === void 0 ? void 0 : _props$afterElements.map(function (AfterElement, i) {
238
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
239
- key: i
240
- }, AfterElement);
241
- }));
249
+ },
250
+ disabled: !timeSelected
251
+ }, /*#__PURE__*/_react.default.createElement("span", null, t('CONTINUE', 'Continue')), /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.ArrowRight, null))));
242
252
  };
243
253
  var MomentControl = function MomentControl(props) {
244
254
  var momentProps = _objectSpread(_objectSpread({}, 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.Title = exports.TimeListWrapper = exports.TimeItem = exports.OrderTimeWrapper = exports.MonthYearLayer = exports.DaysSwiper = exports.DayNumber = exports.DayName = exports.Day = exports.DateWrapper = exports.ClosedBusinessMsg = exports.CheckedIcon = exports.CheckBoxWrapper = exports.ButtonWrapper = void 0;
7
+ exports.Title = exports.TimeListWrapper = exports.TimeItem = exports.SelectContainer = exports.OrderTimeWrapper = exports.MonthYearLayer = exports.DaysSwiper = exports.DayNumber = exports.DayName = exports.Day = exports.DateWrapper = exports.ClosedBusinessMsg = exports.CheckedIcon = exports.CheckIcon = exports.CheckBoxWrapper = exports.ButtonWrapper = 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, _templateObject24, _templateObject25, _templateObject26;
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, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34;
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) } })); }
@@ -36,50 +36,72 @@ var CheckBoxWrapper = _styledComponents.default.div(_templateObject3 || (_templa
36
36
  exports.CheckBoxWrapper = CheckBoxWrapper;
37
37
  var DateWrapper = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral([""])));
38
38
  exports.DateWrapper = DateWrapper;
39
- var TimeListWrapper = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n margin-left: -12px;\n width: calc(100% + 24px);\n margin-top: 30px;\n max-height: 250px;\n overflow: auto;\n"])));
39
+ var TimeListWrapper = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n margin-left: -12px;\n width: calc(100% + 24px);\n margin-top: 30px;\n max-height: 250px;\n overflow: auto;\n ", "\n"])), function (_ref3) {
40
+ var cateringPreorder = _ref3.cateringPreorder;
41
+ return cateringPreorder && (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin-left: 0;\n "])));
42
+ });
40
43
  exports.TimeListWrapper = TimeListWrapper;
41
- var CheckedIcon = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n border-radius: 50%;\n width: 20px;\n min-width: 20px;\n height: 20px;\n box-sizing: border-box;\n border: 6px solid ", ";\n margin: 2px 12px 2px 2px;\n ", "\n"])), function (props) {
44
+ var CheckedIcon = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n border-radius: 50%;\n width: 20px;\n min-width: 20px;\n height: 20px;\n box-sizing: border-box;\n border: 6px solid ", ";\n margin: 2px 12px 2px 2px;\n ", "\n ", "\n"])), function (props) {
42
45
  var _props$theme$colors4;
43
46
  return (_props$theme$colors4 = props.theme.colors) === null || _props$theme$colors4 === void 0 ? void 0 : _props$theme$colors4.primary;
44
47
  }, function (props) {
45
- return props.theme.rtl && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin: 2px 2px 2px 12px;\n "])));
48
+ return props.theme.rtl && (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin: 2px 2px 2px 12px;\n "])));
49
+ }, function (_ref4) {
50
+ var cateringPreorder = _ref4.cateringPreorder;
51
+ return cateringPreorder && (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n width: 21px;\n min-width: 21px;\n height: 21px;\n margin: 0;\n margin-left: 1px;\n "])));
46
52
  });
47
53
  exports.CheckedIcon = CheckedIcon;
48
- var ButtonWrapper = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-top: 25px;\n button {\n width: 100%;\n height: 44px;\n display: flex;\n align-items: center;\n justify-content: center;\n\n svg {\n position: absolute;\n font-size: 21px;\n ", "\n }\n }\n"])), function (props) {
54
+ var ButtonWrapper = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-top: 25px;\n button {\n width: 100%;\n height: 44px;\n display: flex;\n align-items: center;\n justify-content: center;\n\n svg {\n position: absolute;\n font-size: 21px;\n ", "\n }\n }\n"])), function (props) {
49
55
  var _props$theme2;
50
- return (_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 && _props$theme2.rtl ? (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n left: 17px;\n "]))) : (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n right: 17px;\n "])));
56
+ return (_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 && _props$theme2.rtl ? (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n left: 17px;\n "]))) : (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n right: 17px;\n "])));
51
57
  });
52
58
  exports.ButtonWrapper = ButtonWrapper;
53
- var OrderTimeWrapper = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n > p {\n font-weight: 600;\n font-size: 20px;\n }\n"])));
59
+ var OrderTimeWrapper = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n > p {\n font-weight: 600;\n font-size: 20px;\n }\n"])));
54
60
  exports.OrderTimeWrapper = OrderTimeWrapper;
55
- var MonthYearLayer = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n margin-top: 0px;\n margin-bottom: 13px;\n\n span {\n font-size: 16px;\n line-height: 24px;\n }\n"])));
61
+ var MonthYearLayer = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n margin-top: 0px;\n margin-bottom: 13px;\n\n span {\n font-size: 16px;\n line-height: 24px;\n }\n"])));
56
62
  exports.MonthYearLayer = MonthYearLayer;
57
- var DaysSwiper = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n width: 100%;\n position: relative;\n border-top: 1px solid #E9ECEF;\n border-bottom: 1px solid #E9ECEF;\n\n .swiper-datelist {\n padding: 0 20px;\n .swiper-button-prev {\n background-image: url(\"data:image/svg+xml,%3Csvg stroke='currentColor' fill='currentColor' stroke-width='0' viewBox='0 0 16 16' height='1em' width='1em' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.86 8.753l5.482 4.796c.646.566 1.658.106 1.658-.753V3.204a1 1 0 00-1.659-.753l-5.48 4.796a1 1 0 000 1.506z'%3E%3C/path%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-size: 100% auto;\n background-position: center;\n width: 20px;\n }\n\n .swiper-button-prev::after {\n display: none;\n }\n .swiper-button-next {\n background-image: url(\"data:image/svg+xml,%3Csvg stroke='currentColor' fill='currentColor' stroke-width='0' viewBox='0 0 16 16' height='1em' width='1em' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.14 8.753l-5.482 4.796c-.646.566-1.658.106-1.658-.753V3.204a1 1 0 011.659-.753l5.48 4.796a1 1 0 010 1.506z'%3E%3C/path%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-size: 100% auto;\n background-position: center;\n width: 18px;\n }\n\n .swiper-button-next::after {\n display: none;\n }\n\n .swiper-button-next, .swiper-container-rtl .swiper-button-prev {\n right: 0px;\n left: auto;\n }\n .swiper-button-prev, .swiper-container-rtl .swiper-button-next {\n left: 0px;\n right: auto;\n }\n }\n"])));
63
+ var DaysSwiper = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n width: 100%;\n position: relative;\n border-top: 1px solid #E9ECEF;\n border-bottom: 1px solid #E9ECEF;\n\n .swiper-datelist {\n padding: 0 20px;\n .swiper-button-prev {\n background-image: url(\"data:image/svg+xml,%3Csvg stroke='currentColor' fill='currentColor' stroke-width='0' viewBox='0 0 16 16' height='1em' width='1em' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.86 8.753l5.482 4.796c.646.566 1.658.106 1.658-.753V3.204a1 1 0 00-1.659-.753l-5.48 4.796a1 1 0 000 1.506z'%3E%3C/path%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-size: 100% auto;\n background-position: center;\n width: 20px;\n }\n\n .swiper-button-prev::after {\n display: none;\n }\n .swiper-button-next {\n background-image: url(\"data:image/svg+xml,%3Csvg stroke='currentColor' fill='currentColor' stroke-width='0' viewBox='0 0 16 16' height='1em' width='1em' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.14 8.753l-5.482 4.796c-.646.566-1.658.106-1.658-.753V3.204a1 1 0 011.659-.753l5.48 4.796a1 1 0 010 1.506z'%3E%3C/path%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-size: 100% auto;\n background-position: center;\n width: 18px;\n }\n\n .swiper-button-next::after {\n display: none;\n }\n\n .swiper-button-next, .swiper-container-rtl .swiper-button-prev {\n right: 0px;\n left: auto;\n }\n .swiper-button-prev, .swiper-container-rtl .swiper-button-next {\n left: 0px;\n right: auto;\n }\n .swiper-wrapper {\n display: flex;\n justify-content: space-between;\n }\n }\n"])));
58
64
  exports.DaysSwiper = DaysSwiper;
59
- var Day = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n display: flex;\n flex-grow: 1;\n color: #B1BCCC;\n cursor: pointer;\n padding: 14px 0 13px 0;\n flex-direction: column;\n align-items: center;\n transition: background-color .16s ease -0.01s;\n\n ", "\n\n :hover {\n background-color: #e9ecef;\n }\n"])), function (_ref3) {
60
- var selected = _ref3.selected;
61
- return selected && (0, _styledComponents.css)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n color: #344050;\n "])));
65
+ var Day = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n display: flex;\n flex-grow: 1;\n color: #B1BCCC;\n cursor: pointer;\n padding: 14px 0 13px 0;\n flex-direction: column;\n align-items: center;\n transition: background-color .16s ease -0.01s;\n\n ", "\n\n :hover {\n background-color: #e9ecef;\n }\n"])), function (_ref5) {
66
+ var selected = _ref5.selected;
67
+ return selected && (0, _styledComponents.css)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n color: #344050;\n "])));
62
68
  });
63
69
  exports.Day = Day;
64
- var DayName = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n display: flex;\n font-size: 14px;\n line-height: 24px;\n margin-bottom: 10px;\n &:first-letter {\n text-transform: uppercase;\n }\n\n ", "\n"])), function (_ref4) {
65
- var isAppoint = _ref4.isAppoint;
66
- return isAppoint && (0, _styledComponents.css)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n font-size: 12px;\n line-height: 22px;\n "])));
70
+ var DayName = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n display: flex;\n font-size: 14px;\n line-height: 24px;\n margin-bottom: 10px;\n &:first-letter {\n text-transform: uppercase;\n }\n\n ", "\n"])), function (_ref6) {
71
+ var isAppoint = _ref6.isAppoint;
72
+ return isAppoint && (0, _styledComponents.css)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n font-size: 12px;\n line-height: 22px;\n "])));
67
73
  });
68
74
  exports.DayName = DayName;
69
- var DayNumber = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n display: flex;\n font-weight: 500;\n font-size: 20px;\n line-height: 30px;\n\n ", "\n"])), function (_ref5) {
70
- var isAppoint = _ref5.isAppoint;
71
- return isAppoint && (0, _styledComponents.css)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n font-weight: 400;\n font-size: 16px;\n line-height: 26px;\n "])));
75
+ var DayNumber = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n display: flex;\n font-weight: 500;\n font-size: 20px;\n line-height: 30px;\n\n ", "\n"])), function (_ref7) {
76
+ var isAppoint = _ref7.isAppoint;
77
+ return isAppoint && (0, _styledComponents.css)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n font-weight: 400;\n font-size: 16px;\n line-height: 26px;\n "])));
72
78
  });
73
79
  exports.DayNumber = DayNumber;
74
- var TimeItem = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n cursor: pointer;\n display: flex;\n justify-content: center;\n align-items: center;\n background: #E9ECEF;\n border-radius: 7.6px;\n padding: 5px 15px;\n margin: 12px;\n width: calc(50% - 24px);\n min-width: calc(50% - 24px);\n box-sizing: border-box;\n user-select: none;\n\n ", "\n\n span {\n font-size: 14px;\n white-space: nowrap;\n }\n\n @media (min-width: 400px) {\n width: calc(33.33% - 24px);\n min-width: calc(33.33% - 24px);\n }\n\n @media (min-width: 576px) {\n width: calc(25% - 24px);\n min-width: calc(25% - 24px);\n }\n\n @media (min-width: 769px) {\n width: calc(16.66% - 24px);\n min-width: calc(16.66% - 24px);\n ", "\n }\n"])), function (_ref6) {
75
- var active = _ref6.active;
76
- return active && (0, _styledComponents.css)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n background: #F5F9FF;\n color: ", ";\n "])), function (props) {
80
+ var TimeItem = _styledComponents.default.div(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n cursor: pointer;\n display: flex;\n span {\n font-size: 14px;\n white-space: nowrap;\n }\n ", "\n", "\n"])), function (_ref8) {
81
+ var active = _ref8.active;
82
+ return active && (0, _styledComponents.css)(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n background: #F5F9FF;\n color: ", ";\n "])), function (props) {
77
83
  return props.theme.colors.primary;
78
84
  });
79
- }, function (_ref7) {
80
- var isAppoint = _ref7.isAppoint;
81
- return isAppoint && (0, _styledComponents.css)(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n width: calc(33.33% - 24px);\n min-width: calc(33.33% - 24px);\n span {\n font-size: 12px;\n }\n "])));
85
+ }, function (_ref9) {
86
+ var cateringPreorder = _ref9.cateringPreorder;
87
+ return cateringPreorder ? (0, _styledComponents.css)(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n background: #fff;\n width: 100%;\n min-width: 100%;\n height: 50px;\n \n span {\n font-size: 18px;\n display: flex;\n align-items: center;\n margin: 10px 0;\n margin-left: 15px;\n p{\n position: relative;\n bottom: 2px;\n }\n }\n ", "\n "])), function (_ref10) {
88
+ var active = _ref10.active;
89
+ return active && (0, _styledComponents.css)(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n background: #F5F9FF;\n color: ", ";\n span {\n p{\n bottom: 0;\n margin-left: 2px;\n }\n }\n "])), function (props) {
90
+ return props.theme.colors.primary;
91
+ });
92
+ }) : (0, _styledComponents.css)(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n justify-content: center;\n align-items: center;\n background: #E9ECEF;\n border-radius: 7.6px;\n padding: 5px 15px;\n margin: 12px;\n width: calc(50% - 24px);\n min-width: calc(50% - 24px);\n box-sizing: border-box;\n user-select: none;\n \n @media (min-width: 400px) {\n width: calc(33.33% - 24px);\n min-width: calc(33.33% - 24px);\n }\n \n @media (min-width: 576px) {\n width: calc(25% - 24px);\n min-width: calc(25% - 24px);\n }\n \n @media (min-width: 769px) {\n width: calc(33.33% - 24px);\n min-width: calc(33.33% - 24px);\n ", "\n }\n "])), function (_ref11) {
93
+ var isAppoint = _ref11.isAppoint;
94
+ return isAppoint && (0, _styledComponents.css)(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n width: calc(33.33% - 24px);\n min-width: calc(33.33% - 24px);\n span {\n font-size: 12px;\n }\n "])));
95
+ });
82
96
  });
83
97
  exports.TimeItem = TimeItem;
84
- var ClosedBusinessMsg = _styledComponents.default.div(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n text-align: center;\n font-size: 16px;\n width: 100%;\n"])));
85
- exports.ClosedBusinessMsg = ClosedBusinessMsg;
98
+ var ClosedBusinessMsg = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n text-align: center;\n font-size: 16px;\n width: 100%;\n"])));
99
+ exports.ClosedBusinessMsg = ClosedBusinessMsg;
100
+ var SelectContainer = _styledComponents.default.div(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n #list {\n width: 100%;\n }\n\n > div {\n width: 100%;\n background-color: #F8F9FA!important;\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);\n min-height: 44px;\n border: none;\n border-radius: 7.6px;\n color: #909BA9 !important;\n\n > div:first-child {\n padding-top: 5px;\n padding-bottom: 5px;\n justify-content: space-between;\n }\n > div#list {\n width: 100%;\n background-color: #F8F9FA!important;\n border: 1px solid #F8F9FA;\n border-radius: 7.6px;\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);\n }\n }\n\n ", "\n"])), function (_ref12) {
101
+ var _theme$layouts, _theme$layouts$checko, _theme$layouts$checko2, _theme$layouts$checko3;
102
+ var theme = _ref12.theme;
103
+ return (theme === null || theme === void 0 ? void 0 : (_theme$layouts = theme.layouts) === null || _theme$layouts === void 0 ? void 0 : (_theme$layouts$checko = _theme$layouts.checkout) === null || _theme$layouts$checko === void 0 ? void 0 : (_theme$layouts$checko2 = _theme$layouts$checko.components) === null || _theme$layouts$checko2 === void 0 ? void 0 : (_theme$layouts$checko3 = _theme$layouts$checko2.layout) === null || _theme$layouts$checko3 === void 0 ? void 0 : _theme$layouts$checko3.type) === 'pfchangs' && (0, _styledComponents.css)(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n background: #000;\n #select-input {\n margin-bottom: 0px;\n }\n div {\n white-space: pre-wrap;\n }\n > div {\n background-color: #000!important;\n border: 1px solid #fff;\n border-radius: 0px;\n color: #fff !important;\n padding: 0px 10px;\n box-sizing: border-box;\n height: auto;\n > div#list {\n background-color: #000 !important;\n border: 1px solid #fff;\n border-radius: 0px;\n }\n }\n "])));
104
+ });
105
+ exports.SelectContainer = SelectContainer;
106
+ var CheckIcon = _styledComponents.default.div(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n margin-right: 20px;\n svg {\n width: 24px;\n height: 24px;\n }\n"])));
107
+ exports.CheckIcon = CheckIcon;
@@ -57,7 +57,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
57
57
  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; } }
58
58
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
59
59
  var OrderDetailsUI = function OrderDetailsUI(props) {
60
- var _configs$google_maps_, _configs$powered_by_o, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _theme$confirmation, _theme$confirmation$c, _theme$confirmation$c2, _theme$confirmation$c3, _theme$confirmation$c4, _theme$confirmation2, _theme$confirmation2$, _theme$confirmation2$2, _theme$confirmation2$3, _theme$confirmation2$4, _theme$confirmation3, _theme$confirmation3$, _theme$confirmation3$2, _theme$confirmation3$3, _theme$confirmation3$4, _theme$confirmation4, _theme$confirmation4$, _theme$confirmation4$2, _theme$confirmation4$3, _theme$confirmation4$4, _theme$confirmation5, _theme$confirmation5$, _theme$confirmation5$2, _theme$confirmation5$3, _theme$confirmation5$4, _theme$confirmation6, _theme$confirmation6$, _theme$confirmation6$2, _theme$confirmation6$3, _theme$confirmation6$4, _theme$confirmation7, _theme$confirmation7$, _theme$confirmation7$2, _theme$confirmation7$3, _theme$confirmation7$4, _theme$confirmation8, _theme$confirmation8$, _theme$confirmation8$2, _theme$confirmation8$3, _theme$confirmation8$4, _theme$confirmation9, _theme$confirmation9$, _theme$confirmation9$2, _theme$confirmation9$3, _theme$confirmation9$4, _theme$confirmation10, _theme$confirmation11, _theme$confirmation12, _theme$confirmation13, _theme$confirmation14, _theme$confirmation15, _theme$confirmation16, _theme$confirmation17, _theme$confirmation18, _theme$confirmation19, _theme$confirmation20, _theme$confirmation21, _theme$confirmation22, _theme$confirmation23, _theme$confirmation24, _theme$confirmation25, _theme$confirmation26, _theme$confirmation27, _theme$confirmation28, _theme$confirmation29, _theme$confirmation30, _theme$confirmation31, _theme$confirmation32, _theme$confirmation33, _theme$confirmation34, _theme$confirmation35, _theme$confirmation36, _theme$confirmation37, _theme$confirmation38, _theme$confirmation39, _theme$confirmation40, _theme$confirmation41, _theme$confirmation42, _theme$confirmation43, _theme$confirmation44, _theme$confirmation45, _theme$confirmation46, _theme$confirmation47, _theme$confirmation48, _theme$confirmation49, _order$driver, _order$driver2, _theme$images, _theme$images$dummies, _order$business2, _order$business3, _theme$images2, _theme$images2$dummie, _order$customer, _order$customer2, _theme$images3, _theme$images3$dummie, _order$driver3, _order$driver3$locati, _order$driver4, _order$driver4$locati, _order$driver4$locati2, _theme$defaultLanguag, _configs$guest_uuid_a, _order$business4, _order$business5, _orderTypes$find, _configs$general_hour, _order$reporting_data, _configs$general_hour2, _progressBarObjt, _progressBarObjt2, _theme$defaultLanguag2, _order$business6, _order$business7, _order$business8, _order$business9, _order$business10, _order$place, _order$place2, _progressBarObjt3, _progressBarObjt4, _order$business12, _order$customer3, _order$customer4, _order$customer5, _order$customer6, _order$customer7, _order$customer8, _order$customer9, _order$customer10, _theme$defaultLanguag3, _order$driver5, _order$driver6, _order$driver7, _order$driver8, _order$driver9, _order$driver10, _order$driver11, _order$driver12, _order$driver13, _order$driver13$locat, _order$driver14, _configs$google_maps_2, _order$products$, _order$products$$gift, _order$products$2, _order$products$2$gif, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _openTaxModal$data, _openTaxModal$data2, _openTaxModal$data3, _openTaxModal$data4, _openTaxModal$data$fi, _openTaxModal$data5, _openTaxModal$data6;
60
+ var _configs$google_maps_, _configs$powered_by_o, _theme$confirmation, _theme$confirmation$c, _theme$confirmation$c2, _theme$confirmation2, _theme$confirmation2$, _theme$confirmation2$2, _theme$confirmation2$3, _theme$confirmation2$4, _theme$confirmation3, _theme$confirmation3$, _theme$confirmation3$2, _theme$confirmation3$3, _theme$confirmation3$4, _theme$confirmation4, _theme$confirmation4$, _theme$confirmation4$2, _theme$confirmation4$3, _theme$confirmation4$4, _theme$confirmation5, _theme$confirmation5$, _theme$confirmation5$2, _theme$confirmation5$3, _theme$confirmation5$4, _theme$confirmation6, _theme$confirmation6$, _theme$confirmation6$2, _theme$confirmation6$3, _theme$confirmation6$4, _theme$confirmation7, _theme$confirmation7$, _theme$confirmation7$2, _theme$confirmation7$3, _theme$confirmation7$4, _theme$confirmation8, _theme$confirmation8$, _theme$confirmation8$2, _theme$confirmation8$3, _theme$confirmation8$4, _theme$confirmation9, _theme$confirmation9$, _theme$confirmation9$2, _theme$confirmation9$3, _theme$confirmation9$4, _theme$confirmation10, _theme$confirmation11, _theme$confirmation12, _theme$confirmation13, _theme$confirmation14, _theme$confirmation15, _theme$confirmation16, _theme$confirmation17, _theme$confirmation18, _theme$confirmation19, _theme$confirmation20, _theme$confirmation21, _theme$confirmation22, _theme$confirmation23, _theme$confirmation24, _theme$confirmation25, _theme$confirmation26, _theme$confirmation27, _theme$confirmation28, _theme$confirmation29, _theme$confirmation30, _theme$confirmation31, _theme$confirmation32, _theme$confirmation33, _theme$confirmation34, _theme$confirmation35, _theme$confirmation36, _theme$confirmation37, _theme$confirmation38, _theme$confirmation39, _theme$confirmation40, _theme$confirmation41, _theme$confirmation42, _theme$confirmation43, _theme$confirmation44, _theme$confirmation45, _theme$confirmation46, _theme$confirmation47, _theme$confirmation48, _theme$confirmation49, _theme$confirmation50, _theme$confirmation51, _theme$confirmation52, _theme$confirmation53, _theme$confirmation54, _order$driver, _order$driver2, _theme$images, _theme$images$dummies, _order$business2, _order$business3, _theme$images2, _theme$images2$dummie, _order$customer, _order$customer2, _theme$images3, _theme$images3$dummie, _order$driver3, _order$driver3$locati, _order$driver4, _order$driver4$locati, _order$driver4$locati2, _theme$defaultLanguag, _configs$guest_uuid_a, _order$business4, _order$business5, _orderTypes$find, _configs$general_hour, _order$reporting_data, _configs$general_hour2, _progressBarObjt, _progressBarObjt2, _theme$defaultLanguag2, _order$business6, _order$business7, _order$business8, _order$business9, _order$business10, _order$place, _order$place2, _progressBarObjt3, _progressBarObjt4, _order$business12, _order$customer3, _order$customer4, _order$customer5, _order$customer6, _order$customer7, _order$customer8, _order$customer9, _order$customer10, _theme$defaultLanguag3, _order$driver5, _order$driver6, _order$driver7, _order$driver8, _order$driver9, _order$driver10, _order$driver11, _order$driver12, _order$driver13, _order$driver13$locat, _order$driver14, _configs$google_maps_2, _order$products$, _order$products$$gift, _order$products$2, _order$products$2$gif, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _openTaxModal$data, _openTaxModal$data2, _openTaxModal$data3, _openTaxModal$data4, _openTaxModal$data$fi, _openTaxModal$data5, _openTaxModal$data6;
61
61
  var userCustomerId = props.userCustomerId,
62
62
  handleChangeOrderStatus = props.handleChangeOrderStatus,
63
63
  handleBusinessRedirect = props.handleBusinessRedirect,
@@ -80,6 +80,9 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
80
80
  _useConfig2 = _slicedToArray(_useConfig, 1),
81
81
  configs = _useConfig2[0].configs;
82
82
  var theme = (0, _styledComponents.useTheme)();
83
+ var _useSession = (0, _orderingComponentsExternal.useSession)(),
84
+ _useSession2 = _slicedToArray(_useSession, 1),
85
+ token = _useSession2[0].token;
83
86
  var _useEvent = (0, _orderingComponentsExternal.useEvent)(),
84
87
  _useEvent2 = _slicedToArray(_useEvent, 1),
85
88
  events = _useEvent2[0];
@@ -95,9 +98,6 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
95
98
  _useOrder2 = _slicedToArray(_useOrder, 2),
96
99
  carts = _useOrder2[0].carts,
97
100
  refreshOrderOptions = _useOrder2[1].refreshOrderOptions;
98
- var _useOrderingTheme = (0, _orderingComponentsExternal.useOrderingTheme)(),
99
- _useOrderingTheme2 = _slicedToArray(_useOrderingTheme, 1),
100
- orderingTheme = _useOrderingTheme2[0];
101
101
  var _useState = (0, _react.useState)({
102
102
  business: false,
103
103
  driver: false
@@ -186,24 +186,24 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
186
186
  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;
187
187
  var hideOrderActions = (order === null || order === void 0 ? void 0 : order.delivery_type) === 1;
188
188
  var isGiftCardOrder = !(order !== null && order !== void 0 && order.business_id);
189
- var isOriginalLayout = (orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme = orderingTheme.theme) === null || _orderingTheme$theme === void 0 ? void 0 : (_orderingTheme$theme$ = _orderingTheme$theme.confirmation) === null || _orderingTheme$theme$ === void 0 ? void 0 : (_orderingTheme$theme$2 = _orderingTheme$theme$.components) === null || _orderingTheme$theme$2 === void 0 ? void 0 : (_orderingTheme$theme$3 = _orderingTheme$theme$2.layout) === null || _orderingTheme$theme$3 === void 0 ? void 0 : _orderingTheme$theme$3.type) === 'original';
190
- var hideDeliveryType = theme === null || theme === void 0 ? void 0 : (_theme$confirmation = theme.confirmation) === null || _theme$confirmation === void 0 ? void 0 : (_theme$confirmation$c = _theme$confirmation.components) === null || _theme$confirmation$c === void 0 ? void 0 : (_theme$confirmation$c2 = _theme$confirmation$c.order) === null || _theme$confirmation$c2 === void 0 ? void 0 : (_theme$confirmation$c3 = _theme$confirmation$c2.components) === null || _theme$confirmation$c3 === void 0 ? void 0 : (_theme$confirmation$c4 = _theme$confirmation$c3.delivery_type) === null || _theme$confirmation$c4 === void 0 ? void 0 : _theme$confirmation$c4.hidden;
191
- var hideDeliveryDate = theme === null || theme === void 0 ? void 0 : (_theme$confirmation2 = theme.confirmation) === null || _theme$confirmation2 === void 0 ? void 0 : (_theme$confirmation2$ = _theme$confirmation2.components) === null || _theme$confirmation2$ === void 0 ? void 0 : (_theme$confirmation2$2 = _theme$confirmation2$.order) === null || _theme$confirmation2$2 === void 0 ? void 0 : (_theme$confirmation2$3 = _theme$confirmation2$2.components) === null || _theme$confirmation2$3 === void 0 ? void 0 : (_theme$confirmation2$4 = _theme$confirmation2$3.date) === null || _theme$confirmation2$4 === void 0 ? void 0 : _theme$confirmation2$4.hidden;
192
- var hideDeliveryProgress = theme === null || theme === void 0 ? void 0 : (_theme$confirmation3 = theme.confirmation) === null || _theme$confirmation3 === void 0 ? void 0 : (_theme$confirmation3$ = _theme$confirmation3.components) === null || _theme$confirmation3$ === void 0 ? void 0 : (_theme$confirmation3$2 = _theme$confirmation3$.order) === null || _theme$confirmation3$2 === void 0 ? void 0 : (_theme$confirmation3$3 = _theme$confirmation3$2.components) === null || _theme$confirmation3$3 === void 0 ? void 0 : (_theme$confirmation3$4 = _theme$confirmation3$3.progress) === null || _theme$confirmation3$4 === void 0 ? void 0 : _theme$confirmation3$4.hidden;
193
- var hideBusinessPhone = theme === null || theme === void 0 ? void 0 : (_theme$confirmation4 = theme.confirmation) === null || _theme$confirmation4 === void 0 ? void 0 : (_theme$confirmation4$ = _theme$confirmation4.components) === null || _theme$confirmation4$ === void 0 ? void 0 : (_theme$confirmation4$2 = _theme$confirmation4$.business) === null || _theme$confirmation4$2 === void 0 ? void 0 : (_theme$confirmation4$3 = _theme$confirmation4$2.components) === null || _theme$confirmation4$3 === void 0 ? void 0 : (_theme$confirmation4$4 = _theme$confirmation4$3.phone) === null || _theme$confirmation4$4 === void 0 ? void 0 : _theme$confirmation4$4.hidden;
194
- var hideBusinessMessages = theme === null || theme === void 0 ? void 0 : (_theme$confirmation5 = theme.confirmation) === null || _theme$confirmation5 === void 0 ? void 0 : (_theme$confirmation5$ = _theme$confirmation5.components) === null || _theme$confirmation5$ === void 0 ? void 0 : (_theme$confirmation5$2 = _theme$confirmation5$.business) === null || _theme$confirmation5$2 === void 0 ? void 0 : (_theme$confirmation5$3 = _theme$confirmation5$2.components) === null || _theme$confirmation5$3 === void 0 ? void 0 : (_theme$confirmation5$4 = _theme$confirmation5$3.messages) === null || _theme$confirmation5$4 === void 0 ? void 0 : _theme$confirmation5$4.hidden;
195
- var hideBusinessEmail = theme === null || theme === void 0 ? void 0 : (_theme$confirmation6 = theme.confirmation) === null || _theme$confirmation6 === void 0 ? void 0 : (_theme$confirmation6$ = _theme$confirmation6.components) === null || _theme$confirmation6$ === void 0 ? void 0 : (_theme$confirmation6$2 = _theme$confirmation6$.business) === null || _theme$confirmation6$2 === void 0 ? void 0 : (_theme$confirmation6$3 = _theme$confirmation6$2.components) === null || _theme$confirmation6$3 === void 0 ? void 0 : (_theme$confirmation6$4 = _theme$confirmation6$3.email) === null || _theme$confirmation6$4 === void 0 ? void 0 : _theme$confirmation6$4.hidden;
196
- var hideBusinessAddress = theme === null || theme === void 0 ? void 0 : (_theme$confirmation7 = theme.confirmation) === null || _theme$confirmation7 === void 0 ? void 0 : (_theme$confirmation7$ = _theme$confirmation7.components) === null || _theme$confirmation7$ === void 0 ? void 0 : (_theme$confirmation7$2 = _theme$confirmation7$.business) === null || _theme$confirmation7$2 === void 0 ? void 0 : (_theme$confirmation7$3 = _theme$confirmation7$2.components) === null || _theme$confirmation7$3 === void 0 ? void 0 : (_theme$confirmation7$4 = _theme$confirmation7$3.address) === null || _theme$confirmation7$4 === void 0 ? void 0 : _theme$confirmation7$4.hidden;
197
- var hideBusinessMap = theme === null || theme === void 0 ? void 0 : (_theme$confirmation8 = theme.confirmation) === null || _theme$confirmation8 === void 0 ? void 0 : (_theme$confirmation8$ = _theme$confirmation8.components) === null || _theme$confirmation8$ === void 0 ? void 0 : (_theme$confirmation8$2 = _theme$confirmation8$.business) === null || _theme$confirmation8$2 === void 0 ? void 0 : (_theme$confirmation8$3 = _theme$confirmation8$2.components) === null || _theme$confirmation8$3 === void 0 ? void 0 : (_theme$confirmation8$4 = _theme$confirmation8$3.map) === null || _theme$confirmation8$4 === void 0 ? void 0 : _theme$confirmation8$4.hidden;
198
- var hideDriverName = theme === null || theme === void 0 ? void 0 : (_theme$confirmation9 = theme.confirmation) === null || _theme$confirmation9 === void 0 ? void 0 : (_theme$confirmation9$ = _theme$confirmation9.components) === null || _theme$confirmation9$ === void 0 ? void 0 : (_theme$confirmation9$2 = _theme$confirmation9$.driver) === null || _theme$confirmation9$2 === void 0 ? void 0 : (_theme$confirmation9$3 = _theme$confirmation9$2.components) === null || _theme$confirmation9$3 === void 0 ? void 0 : (_theme$confirmation9$4 = _theme$confirmation9$3.name) === null || _theme$confirmation9$4 === void 0 ? void 0 : _theme$confirmation9$4.hidden;
199
- var hideDriverPhone = theme === null || theme === void 0 ? void 0 : (_theme$confirmation10 = theme.confirmation) === null || _theme$confirmation10 === void 0 ? void 0 : (_theme$confirmation11 = _theme$confirmation10.components) === null || _theme$confirmation11 === void 0 ? void 0 : (_theme$confirmation12 = _theme$confirmation11.driver) === null || _theme$confirmation12 === void 0 ? void 0 : (_theme$confirmation13 = _theme$confirmation12.components) === null || _theme$confirmation13 === void 0 ? void 0 : (_theme$confirmation14 = _theme$confirmation13.phone) === null || _theme$confirmation14 === void 0 ? void 0 : _theme$confirmation14.hidden;
200
- var hideDriverMessages = theme === null || theme === void 0 ? void 0 : (_theme$confirmation15 = theme.confirmation) === null || _theme$confirmation15 === void 0 ? void 0 : (_theme$confirmation16 = _theme$confirmation15.components) === null || _theme$confirmation16 === void 0 ? void 0 : (_theme$confirmation17 = _theme$confirmation16.driver) === null || _theme$confirmation17 === void 0 ? void 0 : (_theme$confirmation18 = _theme$confirmation17.components) === null || _theme$confirmation18 === void 0 ? void 0 : (_theme$confirmation19 = _theme$confirmation18.messages) === null || _theme$confirmation19 === void 0 ? void 0 : _theme$confirmation19.hidden;
201
- var hideDriverEmail = theme === null || theme === void 0 ? void 0 : (_theme$confirmation20 = theme.confirmation) === null || _theme$confirmation20 === void 0 ? void 0 : (_theme$confirmation21 = _theme$confirmation20.components) === null || _theme$confirmation21 === void 0 ? void 0 : (_theme$confirmation22 = _theme$confirmation21.driver) === null || _theme$confirmation22 === void 0 ? void 0 : (_theme$confirmation23 = _theme$confirmation22.components) === null || _theme$confirmation23 === void 0 ? void 0 : (_theme$confirmation24 = _theme$confirmation23.email) === null || _theme$confirmation24 === void 0 ? void 0 : _theme$confirmation24.hidden;
202
- var hideDriverPhoto = theme === null || theme === void 0 ? void 0 : (_theme$confirmation25 = theme.confirmation) === null || _theme$confirmation25 === void 0 ? void 0 : (_theme$confirmation26 = _theme$confirmation25.components) === null || _theme$confirmation26 === void 0 ? void 0 : (_theme$confirmation27 = _theme$confirmation26.driver) === null || _theme$confirmation27 === void 0 ? void 0 : (_theme$confirmation28 = _theme$confirmation27.components) === null || _theme$confirmation28 === void 0 ? void 0 : (_theme$confirmation29 = _theme$confirmation28.photo) === null || _theme$confirmation29 === void 0 ? void 0 : _theme$confirmation29.hidden;
203
- var hideCustomerPhone = theme === null || theme === void 0 ? void 0 : (_theme$confirmation30 = theme.confirmation) === null || _theme$confirmation30 === void 0 ? void 0 : (_theme$confirmation31 = _theme$confirmation30.components) === null || _theme$confirmation31 === void 0 ? void 0 : (_theme$confirmation32 = _theme$confirmation31.customer) === null || _theme$confirmation32 === void 0 ? void 0 : (_theme$confirmation33 = _theme$confirmation32.components) === null || _theme$confirmation33 === void 0 ? void 0 : (_theme$confirmation34 = _theme$confirmation33.phone) === null || _theme$confirmation34 === void 0 ? void 0 : _theme$confirmation34.hidden;
204
- var hideCustomerAddress = theme === null || theme === void 0 ? void 0 : (_theme$confirmation35 = theme.confirmation) === null || _theme$confirmation35 === void 0 ? void 0 : (_theme$confirmation36 = _theme$confirmation35.components) === null || _theme$confirmation36 === void 0 ? void 0 : (_theme$confirmation37 = _theme$confirmation36.customer) === null || _theme$confirmation37 === void 0 ? void 0 : (_theme$confirmation38 = _theme$confirmation37.components) === null || _theme$confirmation38 === void 0 ? void 0 : (_theme$confirmation39 = _theme$confirmation38.address) === null || _theme$confirmation39 === void 0 ? void 0 : _theme$confirmation39.hidden;
205
- var hideCustomerEmail = theme === null || theme === void 0 ? void 0 : (_theme$confirmation40 = theme.confirmation) === null || _theme$confirmation40 === void 0 ? void 0 : (_theme$confirmation41 = _theme$confirmation40.components) === null || _theme$confirmation41 === void 0 ? void 0 : (_theme$confirmation42 = _theme$confirmation41.customer) === null || _theme$confirmation42 === void 0 ? void 0 : (_theme$confirmation43 = _theme$confirmation42.components) === null || _theme$confirmation43 === void 0 ? void 0 : (_theme$confirmation44 = _theme$confirmation43.email) === null || _theme$confirmation44 === void 0 ? void 0 : _theme$confirmation44.hidden;
206
- var hideCustomerPhoto = theme === null || theme === void 0 ? void 0 : (_theme$confirmation45 = theme.confirmation) === null || _theme$confirmation45 === void 0 ? void 0 : (_theme$confirmation46 = _theme$confirmation45.components) === null || _theme$confirmation46 === void 0 ? void 0 : (_theme$confirmation47 = _theme$confirmation46.customer) === null || _theme$confirmation47 === void 0 ? void 0 : (_theme$confirmation48 = _theme$confirmation47.components) === null || _theme$confirmation48 === void 0 ? void 0 : (_theme$confirmation49 = _theme$confirmation48.photo) === null || _theme$confirmation49 === void 0 ? void 0 : _theme$confirmation49.hidden;
189
+ var isOriginalLayout = (theme === null || theme === void 0 ? void 0 : (_theme$confirmation = theme.confirmation) === null || _theme$confirmation === void 0 ? void 0 : (_theme$confirmation$c = _theme$confirmation.components) === null || _theme$confirmation$c === void 0 ? void 0 : (_theme$confirmation$c2 = _theme$confirmation$c.layout) === null || _theme$confirmation$c2 === void 0 ? void 0 : _theme$confirmation$c2.type) === 'original';
190
+ var hideDeliveryType = theme === null || theme === void 0 ? void 0 : (_theme$confirmation2 = theme.confirmation) === null || _theme$confirmation2 === void 0 ? void 0 : (_theme$confirmation2$ = _theme$confirmation2.components) === null || _theme$confirmation2$ === void 0 ? void 0 : (_theme$confirmation2$2 = _theme$confirmation2$.order) === null || _theme$confirmation2$2 === void 0 ? void 0 : (_theme$confirmation2$3 = _theme$confirmation2$2.components) === null || _theme$confirmation2$3 === void 0 ? void 0 : (_theme$confirmation2$4 = _theme$confirmation2$3.delivery_type) === null || _theme$confirmation2$4 === void 0 ? void 0 : _theme$confirmation2$4.hidden;
191
+ var hideDeliveryDate = theme === null || theme === void 0 ? void 0 : (_theme$confirmation3 = theme.confirmation) === null || _theme$confirmation3 === void 0 ? void 0 : (_theme$confirmation3$ = _theme$confirmation3.components) === null || _theme$confirmation3$ === void 0 ? void 0 : (_theme$confirmation3$2 = _theme$confirmation3$.order) === null || _theme$confirmation3$2 === void 0 ? void 0 : (_theme$confirmation3$3 = _theme$confirmation3$2.components) === null || _theme$confirmation3$3 === void 0 ? void 0 : (_theme$confirmation3$4 = _theme$confirmation3$3.date) === null || _theme$confirmation3$4 === void 0 ? void 0 : _theme$confirmation3$4.hidden;
192
+ var hideDeliveryProgress = theme === null || theme === void 0 ? void 0 : (_theme$confirmation4 = theme.confirmation) === null || _theme$confirmation4 === void 0 ? void 0 : (_theme$confirmation4$ = _theme$confirmation4.components) === null || _theme$confirmation4$ === void 0 ? void 0 : (_theme$confirmation4$2 = _theme$confirmation4$.order) === null || _theme$confirmation4$2 === void 0 ? void 0 : (_theme$confirmation4$3 = _theme$confirmation4$2.components) === null || _theme$confirmation4$3 === void 0 ? void 0 : (_theme$confirmation4$4 = _theme$confirmation4$3.progress) === null || _theme$confirmation4$4 === void 0 ? void 0 : _theme$confirmation4$4.hidden;
193
+ var hideBusinessPhone = theme === null || theme === void 0 ? void 0 : (_theme$confirmation5 = theme.confirmation) === null || _theme$confirmation5 === void 0 ? void 0 : (_theme$confirmation5$ = _theme$confirmation5.components) === null || _theme$confirmation5$ === void 0 ? void 0 : (_theme$confirmation5$2 = _theme$confirmation5$.business) === null || _theme$confirmation5$2 === void 0 ? void 0 : (_theme$confirmation5$3 = _theme$confirmation5$2.components) === null || _theme$confirmation5$3 === void 0 ? void 0 : (_theme$confirmation5$4 = _theme$confirmation5$3.phone) === null || _theme$confirmation5$4 === void 0 ? void 0 : _theme$confirmation5$4.hidden;
194
+ var hideBusinessMessages = theme === null || theme === void 0 ? void 0 : (_theme$confirmation6 = theme.confirmation) === null || _theme$confirmation6 === void 0 ? void 0 : (_theme$confirmation6$ = _theme$confirmation6.components) === null || _theme$confirmation6$ === void 0 ? void 0 : (_theme$confirmation6$2 = _theme$confirmation6$.business) === null || _theme$confirmation6$2 === void 0 ? void 0 : (_theme$confirmation6$3 = _theme$confirmation6$2.components) === null || _theme$confirmation6$3 === void 0 ? void 0 : (_theme$confirmation6$4 = _theme$confirmation6$3.messages) === null || _theme$confirmation6$4 === void 0 ? void 0 : _theme$confirmation6$4.hidden;
195
+ var hideBusinessEmail = theme === null || theme === void 0 ? void 0 : (_theme$confirmation7 = theme.confirmation) === null || _theme$confirmation7 === void 0 ? void 0 : (_theme$confirmation7$ = _theme$confirmation7.components) === null || _theme$confirmation7$ === void 0 ? void 0 : (_theme$confirmation7$2 = _theme$confirmation7$.business) === null || _theme$confirmation7$2 === void 0 ? void 0 : (_theme$confirmation7$3 = _theme$confirmation7$2.components) === null || _theme$confirmation7$3 === void 0 ? void 0 : (_theme$confirmation7$4 = _theme$confirmation7$3.email) === null || _theme$confirmation7$4 === void 0 ? void 0 : _theme$confirmation7$4.hidden;
196
+ var hideBusinessAddress = theme === null || theme === void 0 ? void 0 : (_theme$confirmation8 = theme.confirmation) === null || _theme$confirmation8 === void 0 ? void 0 : (_theme$confirmation8$ = _theme$confirmation8.components) === null || _theme$confirmation8$ === void 0 ? void 0 : (_theme$confirmation8$2 = _theme$confirmation8$.business) === null || _theme$confirmation8$2 === void 0 ? void 0 : (_theme$confirmation8$3 = _theme$confirmation8$2.components) === null || _theme$confirmation8$3 === void 0 ? void 0 : (_theme$confirmation8$4 = _theme$confirmation8$3.address) === null || _theme$confirmation8$4 === void 0 ? void 0 : _theme$confirmation8$4.hidden;
197
+ var hideBusinessMap = theme === null || theme === void 0 ? void 0 : (_theme$confirmation9 = theme.confirmation) === null || _theme$confirmation9 === void 0 ? void 0 : (_theme$confirmation9$ = _theme$confirmation9.components) === null || _theme$confirmation9$ === void 0 ? void 0 : (_theme$confirmation9$2 = _theme$confirmation9$.business) === null || _theme$confirmation9$2 === void 0 ? void 0 : (_theme$confirmation9$3 = _theme$confirmation9$2.components) === null || _theme$confirmation9$3 === void 0 ? void 0 : (_theme$confirmation9$4 = _theme$confirmation9$3.map) === null || _theme$confirmation9$4 === void 0 ? void 0 : _theme$confirmation9$4.hidden;
198
+ var hideDriverName = theme === null || theme === void 0 ? void 0 : (_theme$confirmation10 = theme.confirmation) === null || _theme$confirmation10 === void 0 ? void 0 : (_theme$confirmation11 = _theme$confirmation10.components) === null || _theme$confirmation11 === void 0 ? void 0 : (_theme$confirmation12 = _theme$confirmation11.driver) === null || _theme$confirmation12 === void 0 ? void 0 : (_theme$confirmation13 = _theme$confirmation12.components) === null || _theme$confirmation13 === void 0 ? void 0 : (_theme$confirmation14 = _theme$confirmation13.name) === null || _theme$confirmation14 === void 0 ? void 0 : _theme$confirmation14.hidden;
199
+ var hideDriverPhone = theme === null || theme === void 0 ? void 0 : (_theme$confirmation15 = theme.confirmation) === null || _theme$confirmation15 === void 0 ? void 0 : (_theme$confirmation16 = _theme$confirmation15.components) === null || _theme$confirmation16 === void 0 ? void 0 : (_theme$confirmation17 = _theme$confirmation16.driver) === null || _theme$confirmation17 === void 0 ? void 0 : (_theme$confirmation18 = _theme$confirmation17.components) === null || _theme$confirmation18 === void 0 ? void 0 : (_theme$confirmation19 = _theme$confirmation18.phone) === null || _theme$confirmation19 === void 0 ? void 0 : _theme$confirmation19.hidden;
200
+ var hideDriverMessages = theme === null || theme === void 0 ? void 0 : (_theme$confirmation20 = theme.confirmation) === null || _theme$confirmation20 === void 0 ? void 0 : (_theme$confirmation21 = _theme$confirmation20.components) === null || _theme$confirmation21 === void 0 ? void 0 : (_theme$confirmation22 = _theme$confirmation21.driver) === null || _theme$confirmation22 === void 0 ? void 0 : (_theme$confirmation23 = _theme$confirmation22.components) === null || _theme$confirmation23 === void 0 ? void 0 : (_theme$confirmation24 = _theme$confirmation23.messages) === null || _theme$confirmation24 === void 0 ? void 0 : _theme$confirmation24.hidden;
201
+ var hideDriverEmail = theme === null || theme === void 0 ? void 0 : (_theme$confirmation25 = theme.confirmation) === null || _theme$confirmation25 === void 0 ? void 0 : (_theme$confirmation26 = _theme$confirmation25.components) === null || _theme$confirmation26 === void 0 ? void 0 : (_theme$confirmation27 = _theme$confirmation26.driver) === null || _theme$confirmation27 === void 0 ? void 0 : (_theme$confirmation28 = _theme$confirmation27.components) === null || _theme$confirmation28 === void 0 ? void 0 : (_theme$confirmation29 = _theme$confirmation28.email) === null || _theme$confirmation29 === void 0 ? void 0 : _theme$confirmation29.hidden;
202
+ var hideDriverPhoto = theme === null || theme === void 0 ? void 0 : (_theme$confirmation30 = theme.confirmation) === null || _theme$confirmation30 === void 0 ? void 0 : (_theme$confirmation31 = _theme$confirmation30.components) === null || _theme$confirmation31 === void 0 ? void 0 : (_theme$confirmation32 = _theme$confirmation31.driver) === null || _theme$confirmation32 === void 0 ? void 0 : (_theme$confirmation33 = _theme$confirmation32.components) === null || _theme$confirmation33 === void 0 ? void 0 : (_theme$confirmation34 = _theme$confirmation33.photo) === null || _theme$confirmation34 === void 0 ? void 0 : _theme$confirmation34.hidden;
203
+ var hideCustomerPhone = theme === null || theme === void 0 ? void 0 : (_theme$confirmation35 = theme.confirmation) === null || _theme$confirmation35 === void 0 ? void 0 : (_theme$confirmation36 = _theme$confirmation35.components) === null || _theme$confirmation36 === void 0 ? void 0 : (_theme$confirmation37 = _theme$confirmation36.customer) === null || _theme$confirmation37 === void 0 ? void 0 : (_theme$confirmation38 = _theme$confirmation37.components) === null || _theme$confirmation38 === void 0 ? void 0 : (_theme$confirmation39 = _theme$confirmation38.phone) === null || _theme$confirmation39 === void 0 ? void 0 : _theme$confirmation39.hidden;
204
+ var hideCustomerAddress = theme === null || theme === void 0 ? void 0 : (_theme$confirmation40 = theme.confirmation) === null || _theme$confirmation40 === void 0 ? void 0 : (_theme$confirmation41 = _theme$confirmation40.components) === null || _theme$confirmation41 === void 0 ? void 0 : (_theme$confirmation42 = _theme$confirmation41.customer) === null || _theme$confirmation42 === void 0 ? void 0 : (_theme$confirmation43 = _theme$confirmation42.components) === null || _theme$confirmation43 === void 0 ? void 0 : (_theme$confirmation44 = _theme$confirmation43.address) === null || _theme$confirmation44 === void 0 ? void 0 : _theme$confirmation44.hidden;
205
+ var hideCustomerEmail = theme === null || theme === void 0 ? void 0 : (_theme$confirmation45 = theme.confirmation) === null || _theme$confirmation45 === void 0 ? void 0 : (_theme$confirmation46 = _theme$confirmation45.components) === null || _theme$confirmation46 === void 0 ? void 0 : (_theme$confirmation47 = _theme$confirmation46.customer) === null || _theme$confirmation47 === void 0 ? void 0 : (_theme$confirmation48 = _theme$confirmation47.components) === null || _theme$confirmation48 === void 0 ? void 0 : (_theme$confirmation49 = _theme$confirmation48.email) === null || _theme$confirmation49 === void 0 ? void 0 : _theme$confirmation49.hidden;
206
+ var hideCustomerPhoto = theme === null || theme === void 0 ? void 0 : (_theme$confirmation50 = theme.confirmation) === null || _theme$confirmation50 === void 0 ? void 0 : (_theme$confirmation51 = _theme$confirmation50.components) === null || _theme$confirmation51 === void 0 ? void 0 : (_theme$confirmation52 = _theme$confirmation51.customer) === null || _theme$confirmation52 === void 0 ? void 0 : (_theme$confirmation53 = _theme$confirmation52.components) === null || _theme$confirmation53 === void 0 ? void 0 : (_theme$confirmation54 = _theme$confirmation53.photo) === null || _theme$confirmation54 === void 0 ? void 0 : _theme$confirmation54.hidden;
207
207
  var validTrackingStatus = [9, 19, 23];
208
208
  var mapConfigs = {
209
209
  zoom: 15
@@ -502,6 +502,9 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
502
502
  });
503
503
  setIsService(_isService);
504
504
  businessLogoUrlValidation();
505
+ props.openBChatByParam && setOpenMessages(_objectSpread(_objectSpread({}, openMessages), {}, {
506
+ business: !!props.openBChatByParam
507
+ }));
505
508
  }, [order]);
506
509
  (0, _react.useEffect)(function () {
507
510
  window.scrollTo(0, 0);
@@ -557,9 +560,9 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
557
560
  onClick: function onClick() {
558
561
  return setIsOrderHistory(true);
559
562
  }
560
- }, t('VIEW_DETAILS', 'View details'))), /*#__PURE__*/_react.default.createElement(_styles.ReviewOrderLink, {
563
+ }, t('VIEW_DETAILS', 'View details'))), (!props.isCustomerMode || props.isCustomerMode && !!props.hashKey && !token) && /*#__PURE__*/_react.default.createElement(_styles.ReviewOrderLink, {
561
564
  className: "Review-order",
562
- active: acceptedStatus.includes(parseInt(order === null || order === void 0 ? void 0 : order.status, 10)) && (!(order !== null && order !== void 0 && order.review) || order.driver && !(order !== null && order !== void 0 && order.user_review)) && (!isOrderReviewed || !isProductReviewed || isService && !isProReviewed || !isDriverReviewed)
565
+ active: [].concat(acceptedStatus, [16]).includes(parseInt(order === null || order === void 0 ? void 0 : order.status, 10)) && (!(order !== null && order !== void 0 && order.review) || order.driver && !(order !== null && order !== void 0 && order.user_review)) && (!isOrderReviewed || !isProductReviewed || isService && !isProReviewed || !isDriverReviewed)
563
566
  }, /*#__PURE__*/_react.default.createElement("span", {
564
567
  onClick: handleOpenReview
565
568
  }, t('REVIEW_ORDER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag2 = theme.defaultLanguages) === null || _theme$defaultLanguag2 === void 0 ? void 0 : _theme$defaultLanguag2.REVIEW_ORDER) || 'Review your Order'))))))), !isGiftCardOrder && /*#__PURE__*/_react.default.createElement(_styles.OrderBusiness, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessExternalWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessWrapper, {
@@ -727,19 +730,23 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
727
730
  title: order ? reviewStatus !== null && reviewStatus !== void 0 && reviewStatus.order ? t('REVIEW_ORDER', 'Review order') : reviewStatus !== null && reviewStatus !== void 0 && reviewStatus.product ? t('REVIEW_PRODUCT', 'Review Product') : reviewStatus !== null && reviewStatus !== void 0 && reviewStatus.professional ? t('PROFESSIONAL_REVIEW', 'Professional review') : t('REVIEW_DRIVER', 'Review Driver') : t('LOADING', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag6 = theme.defaultLanguages) === null || _theme$defaultLanguag6 === void 0 ? void 0 : _theme$defaultLanguag6.LOADING) || 'Loading...')
728
731
  }, /*#__PURE__*/_react.default.createElement(_styles.ReviewWrapper, null, reviewStatus !== null && reviewStatus !== void 0 && reviewStatus.order ? /*#__PURE__*/_react.default.createElement(_ReviewOrder.ReviewOrder, {
729
732
  order: order,
733
+ hashKey: props.hashKey,
730
734
  closeReviewOrder: closeReviewOrder,
731
735
  setIsReviewed: setIsOrderReviewed
732
736
  }) : reviewStatus !== null && reviewStatus !== void 0 && reviewStatus.product ? /*#__PURE__*/_react.default.createElement(_ReviewProduct.ReviewProduct, {
733
737
  order: order,
738
+ hashKey: props.hashKey,
734
739
  closeReviewProduct: closeReviewProduct,
735
740
  setIsProductReviewed: setIsProductReviewed
736
741
  }) : reviewStatus !== null && reviewStatus !== void 0 && reviewStatus.professional ? /*#__PURE__*/_react.default.createElement(_ReviewProfessional.ReviewProfessional, {
737
742
  order: order,
743
+ hashKey: props.hashKey,
738
744
  closeReviewProfessional: handleCloseReivew,
739
745
  setIsProfessionalReviewed: setIsProReviewed,
740
746
  isProfessional: true
741
747
  }) : /*#__PURE__*/_react.default.createElement(_ReviewDriver.ReviewDriver, {
742
748
  order: order,
749
+ hashKey: props.hashKey,
743
750
  closeReviewDriver: handleCloseReivew,
744
751
  setIsDriverReviewed: setIsDriverReviewed
745
752
  }))), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
@@ -37,7 +37,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
37
  var _EMAIL = 'email';
38
38
  var _SMS = 'sms';
39
39
  var OrderDetailsUI = function OrderDetailsUI(props) {
40
- 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, _order$driver, _order$driver2, _theme$images, _theme$images$dummies, _order$business, _order$business2, _theme$images2, _theme$images2$dummie, _order$customer, _order$customer2, _theme$images3, _theme$images3$dummie, _theme$defaultLanguag26, _orderTypes$find, _getOrderStatus, _getOrderStatus2, _order$products, _formMethods$errors, _formMethods$errors2, _formMethods$errors2$, _theme$defaultLanguag27, _theme$defaultLanguag28, _theme$defaultLanguag29, _theme$defaultLanguag30;
40
+ var _theme$confirmation, _theme$confirmation$c, _theme$confirmation$c2, _theme$confirmation$c3, _theme$confirmation$c4, _theme$confirmation2, _theme$confirmation2$, _theme$confirmation2$2, _theme$confirmation2$3, _theme$confirmation2$4, _theme$confirmation3, _theme$confirmation3$, _theme$confirmation3$2, _theme$confirmation3$3, _theme$confirmation3$4, _order$driver, _order$driver2, _theme$images, _theme$images$dummies, _order$business, _order$business2, _theme$images2, _theme$images2$dummie, _order$customer, _order$customer2, _theme$images3, _theme$images3$dummie, _theme$defaultLanguag26, _orderTypes$find, _getOrderStatus, _getOrderStatus2, _order$products, _formMethods$errors, _formMethods$errors2, _formMethods$errors2$, _theme$defaultLanguag27, _theme$defaultLanguag28, _theme$defaultLanguag29, _theme$defaultLanguag30;
41
41
  var handleOrderRedirect = props.handleOrderRedirect,
42
42
  driverLocation = props.driverLocation,
43
43
  orderTypes = props.orderTypes;
@@ -61,9 +61,6 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
61
61
  var _useToast = (0, _orderingComponentsExternal.useToast)(),
62
62
  _useToast2 = _slicedToArray(_useToast, 2),
63
63
  showToast = _useToast2[1].showToast;
64
- var _useOrderingTheme = (0, _orderingComponentsExternal.useOrderingTheme)(),
65
- _useOrderingTheme2 = _slicedToArray(_useOrderingTheme, 1),
66
- orderingTheme = _useOrderingTheme2[0];
67
64
  var optToSendReceipt = [{
68
65
  key: _EMAIL,
69
66
  label: t('EMAIL', 'Email'),
@@ -93,9 +90,9 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
93
90
  order = _props$order.order,
94
91
  loading = _props$order.loading,
95
92
  error = _props$order.error;
96
- var showDeliveryType = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme = orderingTheme.theme) !== null && _orderingTheme$theme !== void 0 && (_orderingTheme$theme$ = _orderingTheme$theme.confirmation) !== null && _orderingTheme$theme$ !== void 0 && (_orderingTheme$theme$2 = _orderingTheme$theme$.components) !== null && _orderingTheme$theme$2 !== void 0 && (_orderingTheme$theme$3 = _orderingTheme$theme$2.order) !== 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.delivery_type) !== null && _orderingTheme$theme$5 !== void 0 && _orderingTheme$theme$5.hidden);
97
- var showDeliveryDate = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme2 = orderingTheme.theme) !== null && _orderingTheme$theme2 !== void 0 && (_orderingTheme$theme3 = _orderingTheme$theme2.confirmation) !== null && _orderingTheme$theme3 !== void 0 && (_orderingTheme$theme4 = _orderingTheme$theme3.components) !== null && _orderingTheme$theme4 !== void 0 && (_orderingTheme$theme5 = _orderingTheme$theme4.order) !== null && _orderingTheme$theme5 !== void 0 && (_orderingTheme$theme6 = _orderingTheme$theme5.components) !== null && _orderingTheme$theme6 !== void 0 && (_orderingTheme$theme7 = _orderingTheme$theme6.date) !== null && _orderingTheme$theme7 !== void 0 && _orderingTheme$theme7.hidden);
98
- var showDeliveryProgress = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme8 = orderingTheme.theme) !== null && _orderingTheme$theme8 !== void 0 && (_orderingTheme$theme9 = _orderingTheme$theme8.confirmation) !== null && _orderingTheme$theme9 !== void 0 && (_orderingTheme$theme10 = _orderingTheme$theme9.components) !== null && _orderingTheme$theme10 !== void 0 && (_orderingTheme$theme11 = _orderingTheme$theme10.order) !== null && _orderingTheme$theme11 !== void 0 && (_orderingTheme$theme12 = _orderingTheme$theme11.components) !== null && _orderingTheme$theme12 !== void 0 && (_orderingTheme$theme13 = _orderingTheme$theme12.progress) !== null && _orderingTheme$theme13 !== void 0 && _orderingTheme$theme13.hidden);
93
+ var showDeliveryType = !(theme !== null && theme !== void 0 && (_theme$confirmation = theme.confirmation) !== null && _theme$confirmation !== void 0 && (_theme$confirmation$c = _theme$confirmation.components) !== null && _theme$confirmation$c !== void 0 && (_theme$confirmation$c2 = _theme$confirmation$c.order) !== null && _theme$confirmation$c2 !== void 0 && (_theme$confirmation$c3 = _theme$confirmation$c2.components) !== null && _theme$confirmation$c3 !== void 0 && (_theme$confirmation$c4 = _theme$confirmation$c3.delivery_type) !== null && _theme$confirmation$c4 !== void 0 && _theme$confirmation$c4.hidden);
94
+ var showDeliveryDate = !(theme !== null && theme !== void 0 && (_theme$confirmation2 = theme.confirmation) !== null && _theme$confirmation2 !== void 0 && (_theme$confirmation2$ = _theme$confirmation2.components) !== null && _theme$confirmation2$ !== void 0 && (_theme$confirmation2$2 = _theme$confirmation2$.order) !== null && _theme$confirmation2$2 !== void 0 && (_theme$confirmation2$3 = _theme$confirmation2$2.components) !== null && _theme$confirmation2$3 !== void 0 && (_theme$confirmation2$4 = _theme$confirmation2$3.date) !== null && _theme$confirmation2$4 !== void 0 && _theme$confirmation2$4.hidden);
95
+ var showDeliveryProgress = !(theme !== null && theme !== void 0 && (_theme$confirmation3 = theme.confirmation) !== null && _theme$confirmation3 !== void 0 && (_theme$confirmation3$ = _theme$confirmation3.components) !== null && _theme$confirmation3$ !== void 0 && (_theme$confirmation3$2 = _theme$confirmation3$.order) !== null && _theme$confirmation3$2 !== void 0 && (_theme$confirmation3$3 = _theme$confirmation3$2.components) !== null && _theme$confirmation3$3 !== void 0 && (_theme$confirmation3$4 = _theme$confirmation3$3.progress) !== null && _theme$confirmation3$4 !== void 0 && _theme$confirmation3$4.hidden);
99
96
  var locations = [_objectSpread(_objectSpread({}, order === null || order === void 0 ? void 0 : (_order$driver = order.driver) === null || _order$driver === void 0 ? void 0 : _order$driver.location), {}, {
100
97
  icon: (order === null || order === void 0 ? void 0 : (_order$driver2 = order.driver) === null || _order$driver2 === void 0 ? void 0 : _order$driver2.photo) || ((_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$dummies = _theme$images.dummies) === null || _theme$images$dummies === void 0 ? void 0 : _theme$images$dummies.driverPhoto)
101
98
  }), _objectSpread(_objectSpread({}, order === null || order === void 0 ? void 0 : (_order$business = order.business) === null || _order$business === void 0 ? void 0 : _order$business.location), {}, {