ordering-ui-external 10.5.2 → 10.5.3

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 (25) hide show
  1. package/_bundles/{0.ordering-ui.920fc54b3e922667dfb1.js → 0.ordering-ui.f2a935c917370f7de531.js} +1 -1
  2. package/_bundles/{1.ordering-ui.920fc54b3e922667dfb1.js → 1.ordering-ui.f2a935c917370f7de531.js} +1 -1
  3. package/_bundles/{2.ordering-ui.920fc54b3e922667dfb1.js → 2.ordering-ui.f2a935c917370f7de531.js} +1 -1
  4. package/_bundles/{4.ordering-ui.920fc54b3e922667dfb1.js → 4.ordering-ui.f2a935c917370f7de531.js} +1 -1
  5. package/_bundles/{5.ordering-ui.920fc54b3e922667dfb1.js → 5.ordering-ui.f2a935c917370f7de531.js} +1 -1
  6. package/_bundles/{6.ordering-ui.920fc54b3e922667dfb1.js → 6.ordering-ui.f2a935c917370f7de531.js} +1 -1
  7. package/_bundles/{7.ordering-ui.920fc54b3e922667dfb1.js → 7.ordering-ui.f2a935c917370f7de531.js} +2 -2
  8. package/_bundles/{8.ordering-ui.920fc54b3e922667dfb1.js → 8.ordering-ui.f2a935c917370f7de531.js} +1 -1
  9. package/_bundles/{9.ordering-ui.920fc54b3e922667dfb1.js → 9.ordering-ui.f2a935c917370f7de531.js} +1 -1
  10. package/_bundles/ordering-ui.f2a935c917370f7de531.js +2 -0
  11. package/_modules/themes/five/src/components/AddressList/index.js +18 -8
  12. package/_modules/themes/five/src/components/AddressList/styles.js +26 -22
  13. package/_modules/themes/five/src/components/PhoneAutocomplete/styles.js +12 -10
  14. package/_modules/themes/five/src/components/SignUpForm/index.js +1 -1
  15. package/_modules/themes/five/src/components/UserFormDetails/index.js +3 -3
  16. package/package.json +2 -2
  17. package/src/themes/five/src/components/AddressList/index.js +16 -5
  18. package/src/themes/five/src/components/AddressList/styles.js +13 -7
  19. package/src/themes/five/src/components/PhoneAutocomplete/index.js +1 -1
  20. package/src/themes/five/src/components/PhoneAutocomplete/styles.js +22 -6
  21. package/src/themes/five/src/components/SignUpForm/index.js +1 -1
  22. package/src/themes/five/src/components/UserFormDetails/index.js +3 -3
  23. package/_bundles/ordering-ui.920fc54b3e922667dfb1.js +0 -2
  24. /package/_bundles/{7.ordering-ui.920fc54b3e922667dfb1.js.LICENSE.txt → 7.ordering-ui.f2a935c917370f7de531.js.LICENSE.txt} +0 -0
  25. /package/_bundles/{ordering-ui.920fc54b3e922667dfb1.js.LICENSE.txt → ordering-ui.f2a935c917370f7de531.js.LICENSE.txt} +0 -0
@@ -40,7 +40,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
40
40
  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; } }
41
41
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
42
42
  var AddressListUI = function AddressListUI(props) {
43
- var _theme$profile, _theme$profile2, _theme$profile3, _theme$profile4, _theme$profile5, _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
43
+ var _theme$profile, _theme$profile2, _theme$profile3, _theme$profile4, _theme$profile5, _addressList$addresse2, _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
44
44
  var actionStatus = props.actionStatus,
45
45
  addressList = props.addressList,
46
46
  handleDelete = props.handleDelete,
@@ -58,7 +58,8 @@ var AddressListUI = function AddressListUI(props) {
58
58
  setIsAddressFormOpen = props.setIsAddressFormOpen,
59
59
  isProfile = props.isProfile,
60
60
  isMobile = props.isMobile,
61
- onCancel = props.onCancel;
61
+ onCancel = props.onCancel,
62
+ isOpenUserData = props.isOpenUserData;
62
63
  var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
63
64
  _useLanguage2 = _slicedToArray(_useLanguage, 2),
64
65
  t = _useLanguage2[1];
@@ -214,13 +215,20 @@ var AddressListUI = function AddressListUI(props) {
214
215
  handleCloseAddressForm();
215
216
  };
216
217
  }, []);
218
+ (0, _react.useEffect)(function () {
219
+ var _addressList$addresse;
220
+ if ((addressList === null || addressList === void 0 || (_addressList$addresse = addressList.addresses) === null || _addressList$addresse === void 0 ? void 0 : _addressList$addresse.length) === 0 && !addressList.loading && isCustomerMode) {
221
+ openAddress({});
222
+ }
223
+ }, [addressList.loading, addressList === null || addressList === void 0 || (_addressList$addresse2 = addressList.addresses) === null || _addressList$addresse2 === void 0 ? void 0 : _addressList$addresse2.length]);
217
224
  var AddressListCallcenterLayout = function AddressListCallcenterLayout(_ref2) {
218
225
  var children = _ref2.children;
219
226
  return /*#__PURE__*/_react.default.createElement(_styles.AddressHalfContainer, null, /*#__PURE__*/_react.default.createElement(_styles.List, {
220
227
  halfWidth: addressOpen,
221
228
  id: "address_list"
222
229
  }, children), addressOpen && /*#__PURE__*/_react.default.createElement(_styles.AddressFormContainer, {
223
- isCustomerMode: isCustomerMode
230
+ isCustomerMode: isCustomerMode,
231
+ isOpenUserData: isOpenUserData
224
232
  }, /*#__PURE__*/_react.default.createElement(_styles.TitleFormContainer, null, /*#__PURE__*/_react.default.createElement(_styles.CloseIcon, null, /*#__PURE__*/_react.default.createElement(_MdClose.default, {
225
233
  onClick: function onClick() {
226
234
  return handleCloseAddressForm();
@@ -238,11 +246,11 @@ var AddressListUI = function AddressListUI(props) {
238
246
  })));
239
247
  };
240
248
  var AddressListContent = function AddressListContent() {
241
- var _addressList$addresse, _addressList$addresse2, _orderState$options6, _addressList$addresse3, _theme$images, _addressList$error$, _orderState$options7;
249
+ var _addressList$addresse3, _addressList$addresse4, _orderState$options6, _addressList$addresse5, _theme$images, _addressList$error$, _orderState$options7;
242
250
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (!isPopover || !addressOpen) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !isCompletedLayout && /*#__PURE__*/_react.default.createElement(_styles.TitleAddress, null, t('WHAT_IS_YOUR_ADDRESS', 'What\'s your address?')), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
243
251
  className: "add",
244
252
  outline: true,
245
- color: isEnableContinueButton && (addressList === null || addressList === void 0 || (_addressList$addresse = addressList.addresses) === null || _addressList$addresse === void 0 ? void 0 : _addressList$addresse.length) > 0 ? 'secondary' : 'primary',
253
+ color: isEnableContinueButton && (addressList === null || addressList === void 0 || (_addressList$addresse3 = addressList.addresses) === null || _addressList$addresse3 === void 0 ? void 0 : _addressList$addresse3.length) > 0 ? 'secondary' : 'primary',
246
254
  onClick: function onClick() {
247
255
  return openAddress({});
248
256
  },
@@ -261,7 +269,7 @@ var AddressListUI = function AddressListUI(props) {
261
269
  },
262
270
  onSaveAddress: handleSaveAddress,
263
271
  userCustomerSetup: userCustomerSetup
264
- }), !addressList.loading && !actionStatus.loading && !orderState.loading && !addressList.error && (addressList === null || addressList === void 0 || (_addressList$addresse2 = addressList.addresses) === null || _addressList$addresse2 === void 0 ? void 0 : _addressList$addresse2.length) > 0 && _typeof((_orderState$options6 = orderState.options) === null || _orderState$options6 === void 0 ? void 0 : _orderState$options6.address) === 'object' && (!addressOpen && isPopover || isModal) && /*#__PURE__*/_react.default.createElement(_styles.AddressListUl, {
272
+ }), !addressList.loading && !actionStatus.loading && !orderState.loading && !addressList.error && (addressList === null || addressList === void 0 || (_addressList$addresse4 = addressList.addresses) === null || _addressList$addresse4 === void 0 ? void 0 : _addressList$addresse4.length) > 0 && _typeof((_orderState$options6 = orderState.options) === null || _orderState$options6 === void 0 ? void 0 : _orderState$options6.address) === 'object' && (!addressOpen && isPopover || isModal) && /*#__PURE__*/_react.default.createElement(_styles.AddressListUl, {
265
273
  id: "list"
266
274
  }, /*#__PURE__*/_react.default.createElement(_styles.AddressTitle, null, t('SELECT_ONE_OF_SAVED_PLACES', 'Select one of your saved places')), uniqueAddressesList.map(function (address) {
267
275
  return /*#__PURE__*/_react.default.createElement(_styles.AddressItem, {
@@ -301,13 +309,15 @@ var AddressListUI = function AddressListUI(props) {
301
309
  return handleSetAddress(address);
302
310
  }
303
311
  }, t('CONTINUE_WITH', 'Continue with'), ": ", address.address));
304
- })), !(addressList.loading || actionStatus.loading || orderState.loading) && !addressList.error && (addressList === null || addressList === void 0 || (_addressList$addresse3 = addressList.addresses) === null || _addressList$addresse3 === void 0 ? void 0 : _addressList$addresse3.length) === 0 && !isProductForm && /*#__PURE__*/_react.default.createElement(_styles.WrappNotAddresses, null, /*#__PURE__*/_react.default.createElement("img", {
312
+ })), !(addressList.loading || actionStatus.loading || orderState.loading) && !addressList.error && (addressList === null || addressList === void 0 || (_addressList$addresse5 = addressList.addresses) === null || _addressList$addresse5 === void 0 ? void 0 : _addressList$addresse5.length) === 0 && !isProductForm && /*#__PURE__*/_react.default.createElement(_styles.WrappNotAddresses, {
313
+ isCustomerMode: isCustomerMode
314
+ }, !isCustomerMode && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("img", {
305
315
  src: (_theme$images = theme.images) === null || _theme$images === void 0 || (_theme$images = _theme$images.general) === null || _theme$images === void 0 ? void 0 : _theme$images.notFound,
306
316
  alt: "Not Found",
307
317
  width: "200px",
308
318
  height: "112px",
309
319
  loading: "lazy"
310
- }), /*#__PURE__*/_react.default.createElement("h1", null, t('NOT_FOUND_ADDRESS', 'Sorry, You don\'t seem to have any addresses.'))), !(addressList.loading || actionStatus.loading || orderState.loading) && addressList.error && addressList.error.length > 0 && /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
320
+ }), /*#__PURE__*/_react.default.createElement("h1", null, t('NOT_FOUND_ADDRESS', 'Sorry, You don\'t seem to have any addresses.')))), !(addressList.loading || actionStatus.loading || orderState.loading) && addressList.error && addressList.error.length > 0 && /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
311
321
  image: notFoundImage,
312
322
  content: ((_addressList$error$ = addressList.error[0]) === null || _addressList$error$ === void 0 ? void 0 : _addressList$error$.message) || addressList.error[0]
313
323
  }), !(addressList.loading || actionStatus.loading || orderState.loading) && _typeof((_orderState$options7 = orderState.options) === null || _orderState$options7 === void 0 ? void 0 : _orderState$options7.address) !== 'object' && !addressList.error && /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.WrappNotAddresses = exports.TitleFormContainer = exports.TitleAddress = exports.List = exports.FormActions = exports.ContinueButton = exports.CloseIcon = exports.AddressTitle = exports.AddressListUl = exports.AddressListContainer = exports.AddressItemActions = exports.AddressItem = exports.AddressHalfContainer = exports.AddressFormContainer = void 0;
8
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
9
  var _polished = require("polished");
10
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24;
10
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26;
11
11
  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); }
12
12
  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; }
13
13
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
@@ -40,48 +40,52 @@ var AddressItem = _styledComponents.default.li(_templateObject6 || (_templateObj
40
40
  return props.theme.colors.lightGray;
41
41
  });
42
42
  exports.AddressItem = AddressItem;
43
- var AddressItemActions = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n a {\n display: flex;\n cursor: pointer;\n margin: 0px 5px;\n font-size: 20px;\n \n svg {\n color: #B1BCCC;\n }\n }\n a.disabled {\n svg {\n color: #CCC;\n }\n pointer-events: none;\n }\n"])));
43
+ var AddressItemActions = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n a {\n display: flex;\n cursor: pointer;\n margin: 0px 5px;\n font-size: 20px;\n\n svg {\n color: #B1BCCC;\n }\n }\n a.disabled {\n svg {\n color: #CCC;\n }\n pointer-events: none;\n }\n"])));
44
44
  exports.AddressItemActions = AddressItemActions;
45
- var WrappNotAddresses = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n height: 350px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 80%;\n margin: 20px auto 10px;\n\n img {\n width: 200px;\n height: auto;\n aspect-ratio: attr(width) / attr(height)\n }\n h1 {\n margin: 5px 0px 0px;\n opacity: 0.5;\n text-align: center;\n font-size: 24px;\n }\n"])));
45
+ var WrappNotAddresses = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 80%;\n margin: 20px auto 10px;\n\n ", "\n\n img {\n width: 200px;\n height: auto;\n aspect-ratio: attr(width) / attr(height)\n }\n h1 {\n margin: 5px 0px 0px;\n opacity: 0.5;\n text-align: center;\n font-size: 24px;\n }\n"])), function (_ref4) {
46
+ var isCustomerMode = _ref4.isCustomerMode;
47
+ return isCustomerMode ? (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n min-height: 200px;\n height: 200px\n "]))) : (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n height: 350px;\n "])));
48
+ });
46
49
  exports.WrappNotAddresses = WrappNotAddresses;
47
- var FormActions = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n padding: 10px 0px;\n display: flex;\n justify-content: space-between;\n width: 100%;\n button {\n height: 45px;\n flex: 1;\n\n &:last-child#second-btn {\n margin-left: 10px;\n ", "\n }\n }\n\n @media (min-width: 769px) {\n button {\n &:last-child#second-btn {\n margin-left: 25px;\n ", "\n }\n }\n }\n"])), function (props) {
50
+ var FormActions = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n padding: 10px 0px;\n display: flex;\n justify-content: space-between;\n width: 100%;\n button {\n height: 45px;\n flex: 1;\n\n &:last-child#second-btn {\n margin-left: 10px;\n ", "\n }\n }\n\n @media (min-width: 769px) {\n button {\n &:last-child#second-btn {\n margin-left: 25px;\n ", "\n }\n }\n }\n"])), function (props) {
48
51
  var _props$theme3;
49
- return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-left: 0;\n margin-right: 10px;\n "])));
52
+ return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin-left: 0;\n margin-right: 10px;\n "])));
50
53
  }, function (props) {
51
54
  var _props$theme4;
52
- return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-left: 0;\n margin-right: 25px;\n "])));
55
+ return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n margin-left: 0;\n margin-right: 25px;\n "])));
53
56
  });
54
57
  exports.FormActions = FormActions;
55
- var ContinueButton = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n width: 100%;\n position: sticky;\n bottom: 1px;\n \n button {\n width: 100%;\n white-space: nowrap;\n height: 50px;\n }\n"])));
58
+ var ContinueButton = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n width: 100%;\n position: sticky;\n bottom: 1px;\n\n button {\n width: 100%;\n white-space: nowrap;\n height: 50px;\n }\n"])));
56
59
  exports.ContinueButton = ContinueButton;
57
- var AddressTitle = _styledComponents.default.span(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n font-size: 16px;\n margin-bottom: 25px;\n text-align: left;\n ", "\n"])), function (props) {
60
+ var AddressTitle = _styledComponents.default.span(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n font-size: 16px;\n margin-bottom: 25px;\n text-align: left;\n ", "\n"])), function (props) {
58
61
  var _props$theme5;
59
- return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n text-align: right;\n "])));
62
+ return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n text-align: right;\n "])));
60
63
  });
61
64
  exports.AddressTitle = AddressTitle;
62
- var AddressHalfContainer = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n"])));
65
+ var AddressHalfContainer = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n"])));
63
66
  exports.AddressHalfContainer = AddressHalfContainer;
64
- var List = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n width: ", ";\n padding-right: 10px;\n button { \n width: 100%;\n }\n"])), function (_ref4) {
65
- var halfWidth = _ref4.halfWidth;
67
+ var List = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n width: ", ";\n padding-right: 10px;\n button {\n width: 100%;\n }\n"])), function (_ref5) {
68
+ var halfWidth = _ref5.halfWidth;
66
69
  return halfWidth ? '50%' : '100%';
67
70
  });
68
71
  exports.List = List;
69
- var AddressFormContainer = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n width: 50%;\n position: sticky;\n right: 0;\n top: 0;\n margin-top: ", ";\n height: 100%;\n padding-left: 10px;\n"])), function (_ref5) {
70
- var isCustomerMode = _ref5.isCustomerMode;
71
- return isCustomerMode ? '-190px' : '0';
72
+ var AddressFormContainer = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n width: 50%;\n position: sticky;\n right: 0;\n top: 0;\n margin-top: ", ";\n height: 100%;\n padding-left: 10px;\n"])), function (_ref6) {
73
+ var isCustomerMode = _ref6.isCustomerMode,
74
+ isOpenUserData = _ref6.isOpenUserData;
75
+ return isCustomerMode && !isOpenUserData ? '-190px' : '0';
72
76
  });
73
77
  exports.AddressFormContainer = AddressFormContainer;
74
- var CloseIcon = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n\n font-size: 30px;\n cursor: pointer;\n z-index: 2;\n ", "\n ", "\n svg{\n /* background: rgba(255,255,255,0.5); */\n transition: all .2s ease-in;\n\n &:hover {\n background-color: #1507260a;\n\n > svg {\n color: #151b26;\n }\n }\n\n &:active {\n background-color: ", ";\n }\n \n border-radius: 50%;\n }\n"])), function (props) {
78
+ var CloseIcon = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n\n font-size: 30px;\n cursor: pointer;\n z-index: 2;\n ", "\n ", "\n svg{\n /* background: rgba(255,255,255,0.5); */\n transition: all .2s ease-in;\n\n &:hover {\n background-color: #1507260a;\n\n > svg {\n color: #151b26;\n }\n }\n\n &:active {\n background-color: ", ";\n }\n\n border-radius: 50%;\n }\n"])), function (props) {
75
79
  var _props$theme6;
76
- return ((_props$theme6 = props.theme) === null || _props$theme6 === void 0 ? void 0 : _props$theme6.rtl) && (0, _styledComponents.css)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n right: 25px;\n left: initial;\n "])));
77
- }, function (_ref6) {
78
- var isProductForm = _ref6.isProductForm;
79
- return isProductForm && (0, _styledComponents.css)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n top: 18px;\n "])));
80
+ return ((_props$theme6 = props.theme) === null || _props$theme6 === void 0 ? void 0 : _props$theme6.rtl) && (0, _styledComponents.css)(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n right: 25px;\n left: initial;\n "])));
81
+ }, function (_ref7) {
82
+ var isProductForm = _ref7.isProductForm;
83
+ return isProductForm && (0, _styledComponents.css)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n top: 18px;\n "])));
80
84
  }, function () {
81
85
  return (0, _polished.darken)(0.07, '#CCC');
82
86
  });
83
87
  exports.CloseIcon = CloseIcon;
84
- var TitleFormContainer = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n display: flex; \n align-items: flex-start;\n h1 {\n margin: 0 auto;\n font-size: 24px;\n }\n"])));
88
+ var TitleFormContainer = _styledComponents.default.div(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-start;\n h1 {\n margin: 0 auto;\n font-size: 24px;\n }\n"])));
85
89
  exports.TitleFormContainer = TitleFormContainer;
86
- var TitleAddress = _styledComponents.default.h1(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n text-align: center;\n margin: auto;\n font-size: 24px;\n margin-bottom: 20px;\n"])));
90
+ var TitleAddress = _styledComponents.default.h1(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n text-align: center;\n margin: auto;\n font-size: 24px;\n margin-bottom: 20px;\n"])));
87
91
  exports.TitleAddress = TitleAddress;
@@ -4,10 +4,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.WrappBtn = exports.WrapInput = exports.UserEdit = exports.TypesContainer = exports.TypeButton = exports.Title = exports.Slogan = exports.SelectContainer = exports.SearchContainer = exports.PhoneContainer = exports.PhoneAutocompleteContainer = exports.Info = exports.ImageWrapper = exports.IconTypeButton = exports.ContentWrapper = exports.AutoComplete = exports.AdditionalTypesContainer = void 0;
7
+ exports.WrappBtn = exports.WrapInput = exports.UserEdit = exports.TypesContainer = exports.TypeButton = exports.Title = exports.Slogan = exports.SelectContainer = exports.SearchContainer = exports.PhoneContainer = exports.PhoneAutocompleteContainer = exports.Info = exports.ImageWrapper = exports.IconTypeButton = exports.ContinueButton = exports.ContentWrapper = exports.AutoComplete = exports.AdditionalTypesContainer = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
10
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30;
10
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31;
11
11
  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); }
12
12
  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; }
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -18,7 +18,7 @@ var PhoneContainer = _styledComponents.default.div(_templateObject || (_template
18
18
  return bgimage && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-repeat: no-repeat, repeat;\n background-size: cover;\n object-fit: cover;\n background-position: bottom;\n background-image: url(", ");\n "])), bgimage);
19
19
  });
20
20
  exports.PhoneContainer = PhoneContainer;
21
- var ContentWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100%;\n padding: 0px 20px 0px;\n width: 70%;\n\n .select__control {\n border-radius: 30px;\n }\n\n .select__control.select__control--is-focused {\n border-color: ", " !important;\n box-shadow: 0 0 0 1px ", " !important;\n }\n\n .select__value-container {\n padding: 10px 8px 0;\n }\n .select__indicator.select__loading-indicator {\n color: ", " !important;\n }\n\n .select__indicator.select__dropdown-indicator,\n .select__indicator-separator {\n display: none;\n }\n\n ", "\n\n input {\n width: 90%;\n margin-bottom: 15px;\n }\n\n @media (min-width: 425px) {\n input {\n width: 45%;\n }\n }\n\n @media (min-width: 768px) {\n padding: 0px 40px 0px;\n\n ", "\n }\n @media (min-width: 1400px){\n width: 60%;\n }\n"])), function (props) {
21
+ var ContentWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100%;\n padding: 0px 20px 0px;\n width: 70%;\n position: relative;\n .select__control {\n border-radius: 30px;\n }\n\n .select__control.select__control--is-focused {\n border-color: ", " !important;\n box-shadow: 0 0 0 1px ", " !important;\n }\n\n .select__value-container {\n padding: 10px 8px 0;\n }\n .select__indicator.select__loading-indicator {\n color: ", " !important;\n }\n\n .select__indicator.select__dropdown-indicator,\n .select__indicator-separator {\n display: none;\n }\n\n ", "\n\n input {\n width: 90%;\n margin-bottom: 15px;\n }\n\n @media (min-width: 425px) {\n input {\n width: 45%;\n }\n }\n\n @media (min-width: 768px) {\n padding: 0px 40px 0px;\n\n ", "\n }\n @media (min-width: 1400px){\n width: 60%;\n }\n"])), function (props) {
22
22
  var _props$theme;
23
23
  return (_props$theme = props.theme) === null || _props$theme === void 0 || (_props$theme = _props$theme.colors) === null || _props$theme === void 0 ? void 0 : _props$theme.primary;
24
24
  }, function (props) {
@@ -35,7 +35,7 @@ var ContentWrapper = _styledComponents.default.div(_templateObject3 || (_templat
35
35
  return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding: 0px 40px 0px;\n "])));
36
36
  });
37
37
  exports.ContentWrapper = ContentWrapper;
38
- var WrappBtn = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 50%;\n margin-top: 20px;\n button {\n min-width: 130px;\n max-width: 400px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n"])));
38
+ var WrappBtn = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 50%;\n position: relative;\n button {\n position: absolute;\n top: 55px;\n min-width: 130px;\n max-width: 400px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n z-index: 100;\n }\n"])));
39
39
  exports.WrappBtn = WrappBtn;
40
40
  var Title = _styledComponents.default.h1(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin: 0px;\n text-align: left;\n font: normal normal normal 80px ", ";\n letter-spacing: 0px;\n text-shadow: 0px 3px 6px #00000029;\n opacity: 1;\n font-size: 35px;\n\n ", "\n"])), function (props) {
41
41
  var _props$theme$fonts$sp;
@@ -50,7 +50,7 @@ var Slogan = _styledComponents.default.p(_templateObject9 || (_templateObject9 =
50
50
  return ((_props$theme7 = props.theme) === null || _props$theme7 === void 0 ? void 0 : _props$theme7.rtl) && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n text-align: right;\n "])));
51
51
  });
52
52
  exports.Slogan = Slogan;
53
- var WrapInput = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n position: relative;\n cursor: pointer;\n\n ", "\n \n div{\n color: #FFF;\n position: relative;\n bottom: 25px;\n left: 15px;\n ", "\n }\n\n svg {\n color: #FFF;\n position: absolute;\n font-size: 22px;\n\n margin-right: 10px;\n ", "\n\n ", "\n\n }\n"])), function (_ref2) {
53
+ var WrapInput = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n position: relative;\n cursor: pointer;\n\n ", "\n\n div{\n color: #FFF;\n position: relative;\n bottom: 25px;\n left: 15px;\n ", "\n }\n\n svg {\n color: #FFF;\n position: absolute;\n font-size: 22px;\n\n margin-right: 10px;\n ", "\n\n ", "\n\n }\n"])), function (_ref2) {
54
54
  var withIcon = _ref2.withIcon;
55
55
  return withIcon && (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n width: calc(100% - 20px);\n box-sizing: border-box;\n\n &::before {\n content: \"\";\n position: absolute;\n right: 5px;\n top: 0;\n bottom: 18px;\n width: 15px;\n\n ", "\n }\n\n @media (min-width: 1024px) {\n width: calc(50% - 20px);\n }\n "])), function (props) {
56
56
  var _props$theme8;
@@ -67,13 +67,13 @@ var WrapInput = _styledComponents.default.div(_templateObject11 || (_templateObj
67
67
  return (_props$theme11 = props.theme) !== null && _props$theme11 !== void 0 && _props$theme11.rtl ? (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n left: 0px;\n "]))) : (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n right: 0px;\n "])));
68
68
  });
69
69
  exports.WrapInput = WrapInput;
70
- var AutoComplete = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n width: 45%; \n button {\n position: absolute;\n left: 100%;\n transform: translate(-90%, -165%)\n }\n"])));
70
+ var AutoComplete = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n width: 45%;\n button {\n position: absolute;\n left: 100%;\n transform: translate(-90%, -165%)\n }\n"])));
71
71
  exports.AutoComplete = AutoComplete;
72
- var UserEdit = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n > :first-child{\n margin-bottom: 20px; \n }\n"])));
72
+ var UserEdit = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n > :first-child{\n margin-bottom: 20px;\n }\n"])));
73
73
  exports.UserEdit = UserEdit;
74
74
  var Info = _styledComponents.default.p(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral([""])));
75
75
  exports.Info = Info;
76
- var SelectContainer = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n display: flex;\n width: 60%;\n position: relative;\n align-items: center;\n svg{\n position: absolute;\n top: 0;\n left: 20px;\n transform: translate(50%, 70%);\n z-index: 10;\n }\n > div {\n width: 100%;\n .select__placeholder, .select__single-value, input {\n margin-left: 40px;\n z-index: 100;\n bottom: -10px;\n }\n .select__menu {\n position: relative;\n padding: 20px;\n }\n .select__clear-indicator {\n position: relative;\n left: 0;\n transform: translate(-300%, -165%);\n svg{\n width: 30px;\n height: 30px;\n }\n }\n .select__control {\n height: 45px;\n padding-left: 10px;\n }\n .select__indicator {\n bottom: 8px;\n position: relative;\n }\n input {\n position: relative;\n top: -5px;\n }\n }\n"])));
76
+ var SelectContainer = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n display: flex;\n width: 60%;\n position: relative;\n align-items: center;\n svg{\n position: absolute;\n top: 0;\n left: 20px;\n transform: translate(50%, 70%);\n z-index: 10;\n }\n > div {\n width: 100%;\n .select__placeholder, .select__single-value, input {\n margin-left: 40px;\n z-index: 100;\n bottom: -10px;\n }\n .select__menu {\n position: relative;\n padding: 20px;\n }\n .select__clear-indicator {\n position: relative;\n left: 0;\n transform: translate(-300%, -165%);\n svg{\n width: 30px;\n height: 30px;\n }\n }\n .select__control {\n height: 45px;\n padding-left: 10px;\n }\n .select__indicator {\n bottom: 8px;\n position: relative;\n }\n .select__menu{\n top: 45px;\n }\n input {\n position: relative;\n top: -5px;\n }\n }\n"])));
77
77
  exports.SelectContainer = SelectContainer;
78
78
  var SearchContainer = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n width: 90%;\n"])));
79
79
  exports.SearchContainer = SearchContainer;
@@ -116,5 +116,7 @@ var AdditionalTypesContainer = _styledComponents.default.div(_templateObject29 |
116
116
  return theme === null || theme === void 0 || (_theme$colors5 = theme.colors) === null || _theme$colors5 === void 0 ? void 0 : _theme$colors5.darkTextColor;
117
117
  });
118
118
  exports.AdditionalTypesContainer = AdditionalTypesContainer;
119
- var PhoneAutocompleteContainer = _styledComponents.default.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n\n h2 {\n font-size: 20px;\n margin-bottom: 20px;\n }\n"])));
120
- exports.PhoneAutocompleteContainer = PhoneAutocompleteContainer;
119
+ var PhoneAutocompleteContainer = _styledComponents.default.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n position: relative;\n h2 {\n font-size: 20px;\n margin-bottom: 20px;\n }\n"])));
120
+ exports.PhoneAutocompleteContainer = PhoneAutocompleteContainer;
121
+ var ContinueButton = _styledComponents.default.span(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n position: absolute;\n right: 35px;\n bottom: 5px;\n width:\n button {\n cursor: pointer;\n }\n"])));
122
+ exports.ContinueButton = ContinueButton;
@@ -431,7 +431,7 @@ var SignUpFormUI = function SignUpFormUI(props) {
431
431
  name: field.code,
432
432
  "aria-label": field.code,
433
433
  className: "form",
434
- placeholder: t(field.code.toUpperCase(), field.name),
434
+ placeholder: isCustomerMode ? t(field.code.toUpperCase() + '_OPTIONAL', field.name + ' (Optional)') : t(field.code.toUpperCase(), field.name),
435
435
  onChange: handleChangeInputEmail,
436
436
  ref: formMethods.register({
437
437
  required: !isCustomerMode && isRequiredField(field.code) ? t('VALIDATION_ERROR_EMAIL_REQUIRED', 'The field Email is required').replace('_attribute_', t('EMAIL', 'Email')) : null,
@@ -414,7 +414,7 @@ var UserFormDetailsUI = function UserFormDetailsUI(props) {
414
414
  setValue: handleChangePhoneNumber,
415
415
  handleIsValid: setIsValidPhoneNumber,
416
416
  disabled: !isEdit
417
- })), !isCheckout && showCustomerPassword && !requiredFields && /*#__PURE__*/_react.default.createElement(_styles.InputGroup, null, /*#__PURE__*/_react.default.createElement("p", null, t('PASSWORD', 'Password')), /*#__PURE__*/_react.default.createElement(_Inputs.Input, {
417
+ })), !isCheckout && showCustomerPassword && !requiredFields && !isCustomerMode && /*#__PURE__*/_react.default.createElement(_styles.InputGroup, null, /*#__PURE__*/_react.default.createElement("p", null, t('PASSWORD', 'Password')), /*#__PURE__*/_react.default.createElement(_Inputs.Input, {
418
418
  type: "password",
419
419
  name: "password",
420
420
  className: "form",
@@ -429,7 +429,7 @@ var UserFormDetailsUI = function UserFormDetailsUI(props) {
429
429
  message: t('VALIDATION_ERROR_PASSWORD_MIN_STRING', 'The Password must be at least 8 characters.').replace('_attribute_', t('PASSWORD', 'Password')).replace('_min_', 8)
430
430
  }
431
431
  })
432
- })), showNotifications && showCustomerPromotions && !requiredFields && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.NotificationsGroupSwitchWrapper, null, /*#__PURE__*/_react.default.createElement("p", null, t('MARKETING_NOTIFICATIONS', 'Marketing Notifications')), /*#__PURE__*/_react.default.createElement(_styles.SwitchWrapper, null, /*#__PURE__*/_react.default.createElement("p", null, t('EMAILS', 'Emails')), /*#__PURE__*/_react.default.createElement(_Switch.Switch, {
432
+ })), showNotifications && showCustomerPromotions && !requiredFields && !isCustomerMode && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.NotificationsGroupSwitchWrapper, null, /*#__PURE__*/_react.default.createElement("p", null, t('MARKETING_NOTIFICATIONS', 'Marketing Notifications')), /*#__PURE__*/_react.default.createElement(_styles.SwitchWrapper, null, /*#__PURE__*/_react.default.createElement("p", null, t('EMAILS', 'Emails')), /*#__PURE__*/_react.default.createElement(_Switch.Switch, {
433
433
  onChange: function onChange(value) {
434
434
  return handleEditNotifications('email', value);
435
435
  },
@@ -444,7 +444,7 @@ var UserFormDetailsUI = function UserFormDetailsUI(props) {
444
444
  return handleEditNotifications('notification', value);
445
445
  },
446
446
  defaultChecked: notificationList === null || notificationList === void 0 ? void 0 : notificationList.notification
447
- })))), showLangauges && !requiredFields && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.LanguageSelectorWrapper, null, /*#__PURE__*/_react.default.createElement("p", null, t('LANGUAGE', 'Language')), /*#__PURE__*/_react.default.createElement(_LanguageSelector.LanguageSelector, null))), (_props$afterMidElemen = props.afterMidElements) === null || _props$afterMidElemen === void 0 ? void 0 : _props$afterMidElemen.map(function (MidElement, i) {
447
+ })))), showLangauges && !requiredFields && !isCustomerMode && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.LanguageSelectorWrapper, null, /*#__PURE__*/_react.default.createElement("p", null, t('LANGUAGE', 'Language')), /*#__PURE__*/_react.default.createElement(_LanguageSelector.LanguageSelector, null))), (_props$afterMidElemen = props.afterMidElements) === null || _props$afterMidElemen === void 0 ? void 0 : _props$afterMidElemen.map(function (MidElement, i) {
448
448
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
449
449
  key: i
450
450
  }, MidElement);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-external",
3
- "version": "10.5.2",
3
+ "version": "10.5.3",
4
4
  "description": "Ordering UI Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -88,7 +88,7 @@
88
88
  "lodash": "^4.17.19",
89
89
  "moment": "^2.29.4",
90
90
  "nanoid": "^4.0.0",
91
- "ordering-components-external": "9.5.1",
91
+ "ordering-components-external": "9.5.2",
92
92
  "payment": "^2.4.6",
93
93
  "polished": "^3.6.6",
94
94
  "react-bootstrap-icons": "^1.7.2",
@@ -65,7 +65,8 @@ const AddressListUI = (props) => {
65
65
  setIsAddressFormOpen,
66
66
  isProfile,
67
67
  isMobile,
68
- onCancel
68
+ onCancel,
69
+ isOpenUserData
69
70
  } = props
70
71
 
71
72
  const [, t] = useLanguage()
@@ -190,6 +191,12 @@ const AddressListUI = (props) => {
190
191
  }
191
192
  }, [])
192
193
 
194
+ useEffect(() => {
195
+ if (addressList?.addresses?.length === 0 && !addressList.loading && isCustomerMode) {
196
+ openAddress({})
197
+ }
198
+ }, [addressList.loading, addressList?.addresses?.length])
199
+
193
200
  const AddressListCallcenterLayout = ({ children }) => {
194
201
  return (
195
202
  <AddressHalfContainer>
@@ -197,7 +204,7 @@ const AddressListUI = (props) => {
197
204
  {children}
198
205
  </List>
199
206
  {addressOpen && (
200
- <AddressFormContainer isCustomerMode={isCustomerMode}>
207
+ <AddressFormContainer isCustomerMode={isCustomerMode} isOpenUserData={isOpenUserData}>
201
208
  <TitleFormContainer>
202
209
  <CloseIcon>
203
210
  <MdClose onClick={() => handleCloseAddressForm()} />
@@ -318,9 +325,13 @@ const AddressListUI = (props) => {
318
325
  addressList?.addresses?.length === 0 &&
319
326
  !isProductForm &&
320
327
  (
321
- <WrappNotAddresses>
322
- <img src={theme.images?.general?.notFound} alt='Not Found' width='200px' height='112px' loading='lazy' />
323
- <h1>{t('NOT_FOUND_ADDRESS', 'Sorry, You don\'t seem to have any addresses.')}</h1>
328
+ <WrappNotAddresses isCustomerMode={isCustomerMode}>
329
+ {!isCustomerMode && (
330
+ <>
331
+ <img src={theme.images?.general?.notFound} alt='Not Found' width='200px' height='112px' loading='lazy' />
332
+ <h1>{t('NOT_FOUND_ADDRESS', 'Sorry, You don\'t seem to have any addresses.')}</h1>
333
+ </>
334
+ )}
324
335
  </WrappNotAddresses>
325
336
  )}
326
337
 
@@ -113,7 +113,7 @@ export const AddressItemActions = styled.div`
113
113
  cursor: pointer;
114
114
  margin: 0px 5px;
115
115
  font-size: 20px;
116
-
116
+
117
117
  svg {
118
118
  color: #B1BCCC;
119
119
  }
@@ -127,7 +127,6 @@ export const AddressItemActions = styled.div`
127
127
  `
128
128
 
129
129
  export const WrappNotAddresses = styled.div`
130
- height: 350px;
131
130
  display: flex;
132
131
  flex-direction: column;
133
132
  justify-content: center;
@@ -135,6 +134,13 @@ export const WrappNotAddresses = styled.div`
135
134
  width: 80%;
136
135
  margin: 20px auto 10px;
137
136
 
137
+ ${({ isCustomerMode }) => isCustomerMode ? css`
138
+ min-height: 200px;
139
+ height: 200px
140
+ ` : css`
141
+ height: 350px;
142
+ `}
143
+
138
144
  img {
139
145
  width: 200px;
140
146
  height: auto;
@@ -183,7 +189,7 @@ export const ContinueButton = styled.div`
183
189
  width: 100%;
184
190
  position: sticky;
185
191
  bottom: 1px;
186
-
192
+
187
193
  button {
188
194
  width: 100%;
189
195
  white-space: nowrap;
@@ -208,7 +214,7 @@ export const AddressHalfContainer = styled.div`
208
214
  export const List = styled.div`
209
215
  width: ${({ halfWidth }) => halfWidth ? '50%' : '100%'};
210
216
  padding-right: 10px;
211
- button {
217
+ button {
212
218
  width: 100%;
213
219
  }
214
220
  `
@@ -218,7 +224,7 @@ export const AddressFormContainer = styled.div`
218
224
  position: sticky;
219
225
  right: 0;
220
226
  top: 0;
221
- margin-top: ${({ isCustomerMode }) => isCustomerMode ? '-190px' : '0'};
227
+ margin-top: ${({ isCustomerMode, isOpenUserData }) => isCustomerMode && !isOpenUserData ? '-190px' : '0'};
222
228
  height: 100%;
223
229
  padding-left: 10px;
224
230
  `
@@ -250,13 +256,13 @@ export const CloseIcon = styled.div`
250
256
  &:active {
251
257
  background-color: ${() => darken(0.07, '#CCC')};
252
258
  }
253
-
259
+
254
260
  border-radius: 50%;
255
261
  }
256
262
  `
257
263
 
258
264
  export const TitleFormContainer = styled.div`
259
- display: flex;
265
+ display: flex;
260
266
  align-items: flex-start;
261
267
  h1 {
262
268
  margin: 0 auto;
@@ -363,7 +363,7 @@ export const PhoneAutocomplete = (props) => {
363
363
  {
364
364
  value: 1,
365
365
  text: t('DELIVERY', 'Delivery'),
366
- description: t('ORDERTYPE_DESCRIPTION_DELIVERY', 'Delivery description'),
366
+ description: t('ORDERTYPE_DESCRIPTION_DELIVERY', 'Delivery description')
367
367
  },
368
368
  {
369
369
  value: 2,
@@ -80,7 +80,7 @@ export const ContentWrapper = styled.div`
80
80
  height: 100%;
81
81
  padding: 0px 20px 0px;
82
82
  width: 70%;
83
-
83
+ position: relative;
84
84
  .select__control {
85
85
  border-radius: 30px;
86
86
  }
@@ -131,13 +131,16 @@ export const ContentWrapper = styled.div`
131
131
 
132
132
  export const WrappBtn = styled.div`
133
133
  width: 50%;
134
- margin-top: 20px;
134
+ position: relative;
135
135
  button {
136
+ position: absolute;
137
+ top: 55px;
136
138
  min-width: 130px;
137
139
  max-width: 400px;
138
140
  overflow: hidden;
139
141
  text-overflow: ellipsis;
140
142
  white-space: nowrap;
143
+ z-index: 100;
141
144
  }
142
145
  `
143
146
 
@@ -198,7 +201,7 @@ export const WrapInput = styled.div`
198
201
  width: calc(50% - 20px);
199
202
  }
200
203
  `}
201
-
204
+
202
205
  div{
203
206
  color: #FFF;
204
207
  position: relative;
@@ -231,7 +234,7 @@ export const WrapInput = styled.div`
231
234
  `
232
235
 
233
236
  export const AutoComplete = styled.div`
234
- width: 45%;
237
+ width: 45%;
235
238
  button {
236
239
  position: absolute;
237
240
  left: 100%;
@@ -241,7 +244,7 @@ export const AutoComplete = styled.div`
241
244
 
242
245
  export const UserEdit = styled.div`
243
246
  > :first-child{
244
- margin-bottom: 20px;
247
+ margin-bottom: 20px;
245
248
  }
246
249
  `
247
250
 
@@ -287,6 +290,9 @@ export const SelectContainer = styled.div`
287
290
  bottom: 8px;
288
291
  position: relative;
289
292
  }
293
+ .select__menu{
294
+ top: 45px;
295
+ }
290
296
  input {
291
297
  position: relative;
292
298
  top: -5px;
@@ -377,9 +383,19 @@ export const AdditionalTypesContainer = styled.div`
377
383
  `
378
384
 
379
385
  export const PhoneAutocompleteContainer = styled.div`
380
-
386
+ position: relative;
381
387
  h2 {
382
388
  font-size: 20px;
383
389
  margin-bottom: 20px;
384
390
  }
385
391
  `
392
+
393
+ export const ContinueButton = styled.span`
394
+ position: absolute;
395
+ right: 35px;
396
+ bottom: 5px;
397
+ width:
398
+ button {
399
+ cursor: pointer;
400
+ }
401
+ `
@@ -417,7 +417,7 @@ const SignUpFormUI = (props) => {
417
417
  name={field.code}
418
418
  aria-label={field.code}
419
419
  className='form'
420
- placeholder={t(field.code.toUpperCase(), field.name)}
420
+ placeholder={isCustomerMode ? t(field.code.toUpperCase() + '_OPTIONAL', field.name + ' (Optional)') : t(field.code.toUpperCase(), field.name)}
421
421
  onChange={handleChangeInputEmail}
422
422
  ref={formMethods.register({
423
423
  required: !isCustomerMode && isRequiredField(field.code)
@@ -407,7 +407,7 @@ export const UserFormDetailsUI = (props) => {
407
407
  />
408
408
  </InputPhoneNumberWrapper>
409
409
  )}
410
- {!isCheckout && showCustomerPassword && !requiredFields && (
410
+ {!isCheckout && showCustomerPassword && !requiredFields && !isCustomerMode && (
411
411
  <InputGroup>
412
412
  <p>{t('PASSWORD', 'Password')}</p>
413
413
  <Input
@@ -430,7 +430,7 @@ export const UserFormDetailsUI = (props) => {
430
430
  />
431
431
  </InputGroup>
432
432
  )}
433
- {showNotifications && showCustomerPromotions && !requiredFields && (
433
+ {showNotifications && showCustomerPromotions && !requiredFields && !isCustomerMode && (
434
434
  <>
435
435
  <NotificationsGroupSwitchWrapper>
436
436
  <p>{t('MARKETING_NOTIFICATIONS', 'Marketing Notifications')}</p>
@@ -458,7 +458,7 @@ export const UserFormDetailsUI = (props) => {
458
458
  </NotificationsGroupSwitchWrapper>
459
459
  </>
460
460
  )}
461
- {showLangauges && !requiredFields && (
461
+ {showLangauges && !requiredFields && !isCustomerMode && (
462
462
  <>
463
463
  <LanguageSelectorWrapper>
464
464
  <p>{t('LANGUAGE', 'Language')}</p>