ordering-ui-external 10.6.2 → 10.7.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.
- package/_bundles/{0.ordering-ui.fd929d6879c63ef1ff62.js → 0.ordering-ui.69ebaa12d869719caa38.js} +1 -1
- package/_bundles/{4.ordering-ui.fd929d6879c63ef1ff62.js → 4.ordering-ui.69ebaa12d869719caa38.js} +1 -1
- package/_bundles/{7.ordering-ui.fd929d6879c63ef1ff62.js → 7.ordering-ui.69ebaa12d869719caa38.js} +1 -1
- package/_bundles/ordering-ui.69ebaa12d869719caa38.js +2 -0
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +31 -17
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/styles.js +8 -5
- package/_modules/themes/callcenterOriginal/src/components/AddressList/index.js +21 -11
- package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +15 -5
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +183 -59
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +55 -9
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +25 -3
- package/_modules/themes/five/src/components/MyOrders/index.js +11 -2
- package/_modules/themes/five/src/components/OrderDetails/index.js +4 -2
- package/_modules/themes/five/src/components/OrdersOption/index.js +21 -18
- package/_modules/themes/five/src/components/PageBanner/index.js +23 -9
- package/_modules/themes/five/src/components/PhoneAutocomplete/index.js +1 -1
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +5 -2
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +5 -2
- package/_modules/themes/five/src/components/UserDetails/styles.js +2 -2
- package/_modules/themes/five/src/components/WebsocketStatus/index.js +6 -3
- package/package.json +2 -2
- package/src/themes/callcenterOriginal/src/components/AddressForm/index.js +22 -13
- package/src/themes/callcenterOriginal/src/components/AddressForm/styles.js +20 -7
- package/src/themes/callcenterOriginal/src/components/AddressList/index.js +26 -14
- package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +13 -5
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +210 -68
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +127 -11
- package/src/themes/five/src/components/BusinessProductsListing/index.js +21 -0
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +1 -1
- package/src/themes/five/src/components/MyOrders/index.js +5 -1
- package/src/themes/five/src/components/OrderDetails/index.js +2 -0
- package/src/themes/five/src/components/OrdersOption/index.js +5 -3
- package/src/themes/five/src/components/PageBanner/index.js +14 -4
- package/src/themes/five/src/components/PhoneAutocomplete/index.js +1 -2
- package/src/themes/five/src/components/ProductItemAccordion/index.js +4 -0
- package/src/themes/five/src/components/RenderProductsLayout/index.js +4 -1
- package/src/themes/five/src/components/UserDetails/styles.js +2 -2
- package/src/themes/five/src/components/WebsocketStatus/index.js +4 -4
- package/_bundles/ordering-ui.fd929d6879c63ef1ff62.js +0 -2
- /package/_bundles/{1.ordering-ui.fd929d6879c63ef1ff62.js → 1.ordering-ui.69ebaa12d869719caa38.js} +0 -0
- /package/_bundles/{2.ordering-ui.fd929d6879c63ef1ff62.js → 2.ordering-ui.69ebaa12d869719caa38.js} +0 -0
- /package/_bundles/{5.ordering-ui.fd929d6879c63ef1ff62.js → 5.ordering-ui.69ebaa12d869719caa38.js} +0 -0
- /package/_bundles/{6.ordering-ui.fd929d6879c63ef1ff62.js → 6.ordering-ui.69ebaa12d869719caa38.js} +0 -0
- /package/_bundles/{7.ordering-ui.fd929d6879c63ef1ff62.js.LICENSE.txt → 7.ordering-ui.69ebaa12d869719caa38.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.fd929d6879c63ef1ff62.js → 8.ordering-ui.69ebaa12d869719caa38.js} +0 -0
- /package/_bundles/{9.ordering-ui.fd929d6879c63ef1ff62.js → 9.ordering-ui.69ebaa12d869719caa38.js} +0 -0
- /package/_bundles/{ordering-ui.fd929d6879c63ef1ff62.js.LICENSE.txt → ordering-ui.69ebaa12d869719caa38.js.LICENSE.txt} +0 -0
|
@@ -35,19 +35,6 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
35
35
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
36
36
|
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; } }
|
|
37
37
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
38
|
-
var inputNames = [{
|
|
39
|
-
name: 'address',
|
|
40
|
-
code: 'Address'
|
|
41
|
-
}, {
|
|
42
|
-
name: 'internal_number',
|
|
43
|
-
code: 'Internal number'
|
|
44
|
-
}, {
|
|
45
|
-
name: 'zipcode',
|
|
46
|
-
code: 'Zipcode'
|
|
47
|
-
}, {
|
|
48
|
-
name: 'address_notes',
|
|
49
|
-
code: 'Address notes'
|
|
50
|
-
}];
|
|
51
38
|
var AddressFormUI = function AddressFormUI(props) {
|
|
52
39
|
var _addressState$address, _ref, _formState$changes$ad, _formState$changes, _addressState$address2, _addressState$address3, _addressState$address4, _formState$changes$lo, _formState$changes2, _configState$configs, _configState$configs2, _configState$configs3, _configState$configs4, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _orderState$options6, _props$afterComponent, _props$afterElements;
|
|
53
40
|
var addressesList = props.addressesList,
|
|
@@ -61,7 +48,10 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
61
48
|
handleChangeInput = props.handleChangeInput,
|
|
62
49
|
saveAddress = props.saveAddress,
|
|
63
50
|
setIsEdit = props.setIsEdit,
|
|
64
|
-
userCustomerSetup = props.userCustomerSetup
|
|
51
|
+
userCustomerSetup = props.userCustomerSetup,
|
|
52
|
+
businessesList = props.businessesList,
|
|
53
|
+
getBusinessDeliveryZones = props.getBusinessDeliveryZones,
|
|
54
|
+
isEnableContinueButton = props.isEnableContinueButton;
|
|
65
55
|
var _useConfig = (0, _orderingComponentsExternal.useConfig)(),
|
|
66
56
|
_useConfig2 = _slicedToArray(_useConfig, 1),
|
|
67
57
|
configState = _useConfig2[0];
|
|
@@ -114,6 +104,19 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
114
104
|
ERROR_NOT_FOUND_ADDRESS: 'Sorry, we couldn\'t find an address',
|
|
115
105
|
ERROR_MAX_LIMIT_LOCATION: "Sorry, You can only set the position to ".concat(maxLimitLocation, "m")
|
|
116
106
|
};
|
|
107
|
+
var inputNames = [{
|
|
108
|
+
name: 'address',
|
|
109
|
+
code: 'Address'
|
|
110
|
+
}, {
|
|
111
|
+
name: 'internal_number',
|
|
112
|
+
code: 'Internal number'
|
|
113
|
+
}, {
|
|
114
|
+
name: 'zipcode',
|
|
115
|
+
code: 'Zipcode'
|
|
116
|
+
}, {
|
|
117
|
+
name: 'address_notes',
|
|
118
|
+
code: 'Address notes'
|
|
119
|
+
}];
|
|
117
120
|
var closeAlert = function closeAlert() {
|
|
118
121
|
setAlertState({
|
|
119
122
|
open: false,
|
|
@@ -303,6 +306,9 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
303
306
|
});
|
|
304
307
|
};
|
|
305
308
|
var handleChangeAddress = function handleChangeAddress(address) {
|
|
309
|
+
if (address !== null && address !== void 0 && address.address) {
|
|
310
|
+
getBusinessDeliveryZones(address === null || address === void 0 ? void 0 : address.location);
|
|
311
|
+
}
|
|
306
312
|
setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
307
313
|
selectedFromAutocomplete: true
|
|
308
314
|
}));
|
|
@@ -441,7 +447,7 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
441
447
|
key: i
|
|
442
448
|
}, props));
|
|
443
449
|
}), inputNames.map(function (field) {
|
|
444
|
-
var _configState$configs5, _addressState$address12, _formState$changes26, _ref9, _formState$changes$fi2, _formState$changes27, _addressState$address13, _ref10, _formState$changes$ad5, _formState$changes28;
|
|
450
|
+
var _configState$configs5, _addressState$address12, _formState$changes26, _businessesList$busin, _ref9, _formState$changes$fi2, _formState$changes27, _addressState$address13, _ref10, _formState$changes$ad5, _formState$changes28;
|
|
445
451
|
return showField && showField(field.name) && (field.name === 'address' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
446
452
|
key: field.name
|
|
447
453
|
}, /*#__PURE__*/_react.default.createElement(_styles.AddressWrap, {
|
|
@@ -476,14 +482,22 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
476
482
|
onError: setMapErrors,
|
|
477
483
|
IconButton: _reactBootstrapIcons.GeoAlt,
|
|
478
484
|
IconLoadingButton: _CgSearchLoading.default
|
|
479
|
-
})), locationChange && ((addressState === null || addressState === void 0 || (_addressState$address12 = addressState.address) === null || _addressState$address12 === void 0 ? void 0 : _addressState$address12.location) || (formState === null || formState === void 0 || (_formState$changes26 = formState.changes) === null || _formState$changes26 === void 0 ? void 0 : _formState$changes26.location)) && /*#__PURE__*/_react.default.createElement(_styles.WrapperMap,
|
|
485
|
+
})), locationChange && ((addressState === null || addressState === void 0 || (_addressState$address12 = addressState.address) === null || _addressState$address12 === void 0 ? void 0 : _addressState$address12.location) || (formState === null || formState === void 0 || (_formState$changes26 = formState.changes) === null || _formState$changes26 === void 0 ? void 0 : _formState$changes26.location)) && /*#__PURE__*/_react.default.createElement(_styles.WrapperMap, {
|
|
486
|
+
isEnableContinueButton: isEnableContinueButton
|
|
487
|
+
}, /*#__PURE__*/_react.default.createElement(_orderingComponentsExternal.GoogleMapsMap, {
|
|
488
|
+
useLocationPin: true,
|
|
489
|
+
deactiveAlerts: true,
|
|
480
490
|
apiKey: googleMapsApiKey,
|
|
481
491
|
location: locationChange,
|
|
492
|
+
locations: businessesList === null || businessesList === void 0 ? void 0 : businessesList.businesses,
|
|
482
493
|
fixedLocation: !isEditing ? firstLocationNoEdit.value : null,
|
|
483
494
|
mapControls: googleMapsControls,
|
|
484
495
|
handleChangeAddressMap: handleChangeAddress,
|
|
485
496
|
setErrors: setMapErrors,
|
|
486
|
-
maxLimitLocation: maxLimitLocation
|
|
497
|
+
maxLimitLocation: maxLimitLocation,
|
|
498
|
+
businessZones: businessesList === null || businessesList === void 0 || (_businessesList$busin = businessesList.businesses) === null || _businessesList$busin === void 0 ? void 0 : _businessesList$busin.map(function (business) {
|
|
499
|
+
return business === null || business === void 0 ? void 0 : business.zones;
|
|
500
|
+
})
|
|
487
501
|
}))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
488
502
|
key: field.name
|
|
489
503
|
}, field.name !== 'address_notes' ? /*#__PURE__*/_react.default.createElement(_Inputs.Input, {
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.WrapperSkeleton = exports.WrapperMap = exports.WrapAddressInput = exports.FormControl = exports.FormActions = exports.AddressWrap = exports.AddressTagSection = 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;
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
|
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) } })); }
|
|
@@ -24,9 +24,9 @@ var FormControl = _styledComponents.default.form(_templateObject2 || (_templateO
|
|
|
24
24
|
return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.rtl ? (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-left: 15px;\n "]))) : (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-right: 15px;\n "])));
|
|
25
25
|
});
|
|
26
26
|
exports.FormControl = FormControl;
|
|
27
|
-
var AddressWrap = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width:
|
|
27
|
+
var AddressWrap = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: 50%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n position: absolute;\n bottom: 75%;\n right: 0px;\n padding-right: 20px;\n button {\n height: 41px;\n right: 25px;\n border: none;\n width: 25px;\n position: absolute;\n z-index: 1000;\n\n ", "\n\n svg {\n font-size: 18px;\n }\n }\n"])), function (props) {
|
|
28
28
|
var _props$theme2;
|
|
29
|
-
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n left:
|
|
29
|
+
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n left: 25px;\n right: initial;\n "])));
|
|
30
30
|
});
|
|
31
31
|
exports.AddressWrap = AddressWrap;
|
|
32
32
|
var WrapAddressInput = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 100%;\n i {\n padding: 0px 10px;\n }\n\n svg {\n position: absolute;\n color: ", ";\n top: 21px;\n left: 10px;\n font-size: 20px;\n ", "\n }\n\n input {\n background-position: left 10px center !important;\n background-repeat: no-repeat !important;\n background-size: 13px !important;\n padding: 7px 30px 7px 15px !important;\n ", "\n }\n"])), function (props) {
|
|
@@ -43,7 +43,10 @@ var AddressTagSection = _styledComponents.default.div(_templateObject10 || (_tem
|
|
|
43
43
|
return props.theme.colors.primary;
|
|
44
44
|
});
|
|
45
45
|
exports.AddressTagSection = AddressTagSection;
|
|
46
|
-
var WrapperMap = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n width:
|
|
46
|
+
var WrapperMap = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n width: 50%;\n position: absolute;\n bottom: 2%;\n right: 0;\n padding-right: 20px;\n ", "\n > div {\n position: relative !important;\n width: 100% !important;\n height: 100% !important;\n border-radius: 15px;\n }\n"])), function (_ref) {
|
|
47
|
+
var isEnableContinueButton = _ref.isEnableContinueButton;
|
|
48
|
+
return isEnableContinueButton ? (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n height: 460px;\n "]))) : (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n height: 480px;\n "])));
|
|
49
|
+
});
|
|
47
50
|
exports.WrapperMap = WrapperMap;
|
|
48
|
-
var WrapperSkeleton = _styledComponents.default.div(
|
|
51
|
+
var WrapperSkeleton = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 10px;\n\n span {\n width: 100%;\n }\n"])));
|
|
49
52
|
exports.WrapperSkeleton = WrapperSkeleton;
|
|
@@ -184,6 +184,11 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
184
184
|
handleCloseAddressForm();
|
|
185
185
|
};
|
|
186
186
|
}, []);
|
|
187
|
+
(0, _react.useEffect)(function () {
|
|
188
|
+
if (isOpenUserData) {
|
|
189
|
+
handleCloseAddressForm();
|
|
190
|
+
}
|
|
191
|
+
}, [isOpenUserData]);
|
|
187
192
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (_props$beforeElements = props.beforeElements) === null || _props$beforeElements === void 0 ? void 0 : _props$beforeElements.map(function (BeforeElement, i) {
|
|
188
193
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
189
194
|
key: i
|
|
@@ -198,8 +203,9 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
198
203
|
}, /*#__PURE__*/_react.default.createElement(_styles.AddressHalfContainer, null, /*#__PURE__*/_react.default.createElement(_styles.List, {
|
|
199
204
|
halfWidth: addressOpen,
|
|
200
205
|
isOpenUserData: isOpenUserData,
|
|
201
|
-
isHeader: isHeader
|
|
202
|
-
|
|
206
|
+
isHeader: isHeader,
|
|
207
|
+
isEnableContinueButton: isEnableContinueButton
|
|
208
|
+
}, (!isPopover || !addressOpen) && !isOpenUserData && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
203
209
|
className: "add",
|
|
204
210
|
outline: true,
|
|
205
211
|
color: isEnableContinueButton && (addressList === null || addressList === void 0 || (_addressList$addresse = addressList.addresses) === null || _addressList$addresse === void 0 ? void 0 : _addressList$addresse.length) > 0 ? 'secondary' : 'primary',
|
|
@@ -217,7 +223,7 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
217
223
|
},
|
|
218
224
|
onSaveAddress: handleSaveAddress,
|
|
219
225
|
userCustomerSetup: userCustomerSetup
|
|
220
|
-
}), !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, {
|
|
226
|
+
}), !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 && (!addressOpen && isPopover || isModal) && /*#__PURE__*/_react.default.createElement(_styles.AddressListUl, {
|
|
221
227
|
id: "list"
|
|
222
228
|
}, /*#__PURE__*/_react.default.createElement(_styles.AddressTitle, null, t('SELECT_ONE_OF_SAVED_PLACES', 'Select one of your saved places')), uniqueAddressesList.map(function (address) {
|
|
223
229
|
return /*#__PURE__*/_react.default.createElement(_styles.AddressItem, {
|
|
@@ -238,7 +244,7 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
238
244
|
}, /*#__PURE__*/_react.default.createElement("span", null, address.address), /*#__PURE__*/_react.default.createElement("span", null, address.internal_number, " ", address.zipcode))), /*#__PURE__*/_react.default.createElement(_styles.AddressItemActions, {
|
|
239
245
|
className: "form"
|
|
240
246
|
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
241
|
-
className: actionStatus.loading ? 'disabled' : '',
|
|
247
|
+
className: actionStatus.loading || isOpenUserData ? 'disabled' : '',
|
|
242
248
|
onClick: function onClick() {
|
|
243
249
|
return openAddress(address);
|
|
244
250
|
}
|
|
@@ -267,11 +273,7 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
267
273
|
content: ((_addressList$error$ = addressList.error[0]) === null || _addressList$error$ === void 0 ? void 0 : _addressList$error$.message) || addressList.error[0]
|
|
268
274
|
}), !(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, {
|
|
269
275
|
content: t('NETWORK_ERROR', 'Network error, please reload the page')
|
|
270
|
-
})
|
|
271
|
-
onClick: function onClick() {
|
|
272
|
-
return handleCloseAddressForm();
|
|
273
|
-
}
|
|
274
|
-
})), /*#__PURE__*/_react.default.createElement("h1", null, t('ADD_NEW_ADDRESS', 'Add new address'))), /*#__PURE__*/_react.default.createElement(_AddressForm.AddressForm, {
|
|
276
|
+
}), !isPopover && addressOpen && /*#__PURE__*/_react.default.createElement(_styles.AddressFormContainer, null, /*#__PURE__*/_react.default.createElement(_AddressForm.AddressForm, {
|
|
275
277
|
userId: userId,
|
|
276
278
|
addressesList: addressList === null || addressList === void 0 ? void 0 : addressList.addresses,
|
|
277
279
|
useValidationFileds: true,
|
|
@@ -280,8 +282,16 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
280
282
|
return handleCloseAddressForm();
|
|
281
283
|
},
|
|
282
284
|
onSaveAddress: handleSaveAddress,
|
|
283
|
-
userCustomerSetup: userCustomerSetup
|
|
284
|
-
|
|
285
|
+
userCustomerSetup: userCustomerSetup,
|
|
286
|
+
isEnableContinueButton: isEnableContinueButton
|
|
287
|
+
}))), addressOpen && /*#__PURE__*/_react.default.createElement(_styles.AddressFormContainer, {
|
|
288
|
+
width: "50%",
|
|
289
|
+
isEnableContinueButton: isEnableContinueButton
|
|
290
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.TitleFormContainer, null, /*#__PURE__*/_react.default.createElement(_styles.CloseIcon, null, /*#__PURE__*/_react.default.createElement(_MdClose.default, {
|
|
291
|
+
onClick: function onClick() {
|
|
292
|
+
return handleCloseAddressForm();
|
|
293
|
+
}
|
|
294
|
+
})), /*#__PURE__*/_react.default.createElement("h1", null, t('ADD_NEW_ADDRESS', 'Add new address'))))), (addressList.loading || actionStatus.loading || orderState.loading) && !isProductForm && /*#__PURE__*/_react.default.createElement(_styles.AddressListUl, null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
285
295
|
height: 50,
|
|
286
296
|
count: 3,
|
|
287
297
|
style: {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.WrappNotAddresses = exports.TitleFormContainer = 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
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19;
|
|
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;
|
|
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) } })); }
|
|
@@ -54,14 +54,24 @@ var AddressTitle = _styledComponents.default.span(_templateObject13 || (_templat
|
|
|
54
54
|
exports.AddressTitle = AddressTitle;
|
|
55
55
|
var AddressHalfContainer = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n"])));
|
|
56
56
|
exports.AddressHalfContainer = AddressHalfContainer;
|
|
57
|
-
var List = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n width: ", ";\n padding-right: 10px;\n
|
|
57
|
+
var List = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n width: ", ";\n padding-right: 10px;\n ", " \n button {\n width: 100%;\n }\n"])), function (_ref2) {
|
|
58
58
|
var halfWidth = _ref2.halfWidth;
|
|
59
59
|
return halfWidth ? '50%' : '100%';
|
|
60
|
+
}, function (_ref3) {
|
|
61
|
+
var isEnableContinueButton = _ref3.isEnableContinueButton,
|
|
62
|
+
isOpenUserData = _ref3.isOpenUserData;
|
|
63
|
+
return isEnableContinueButton || isOpenUserData ? (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n margin-top: 0px;\n "]))) : (0, _styledComponents.css)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n margin-top: 222px;\n "])));
|
|
60
64
|
});
|
|
61
65
|
exports.List = List;
|
|
62
|
-
var AddressFormContainer = _styledComponents.default.div(
|
|
66
|
+
var AddressFormContainer = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n z-index: 10;\n height: 100%;\n padding-left: 10px;\n ", "\n ", "\n"])), function (_ref4) {
|
|
67
|
+
var width = _ref4.width;
|
|
68
|
+
return (0, _styledComponents.css)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n width: ", ";\n "])), width);
|
|
69
|
+
}, function (_ref5) {
|
|
70
|
+
var isEnableContinueButton = _ref5.isEnableContinueButton;
|
|
71
|
+
return isEnableContinueButton && (0, _styledComponents.css)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n position: relative;\n bottom: 190px;\n "])));
|
|
72
|
+
});
|
|
63
73
|
exports.AddressFormContainer = AddressFormContainer;
|
|
64
|
-
var CloseIcon = _styledComponents.default.div(
|
|
74
|
+
var CloseIcon = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n cursor: pointer;\n svg{\n width: 30px;\n height: 30px;\n }\n"])));
|
|
65
75
|
exports.CloseIcon = CloseIcon;
|
|
66
|
-
var TitleFormContainer = _styledComponents.default.div(
|
|
76
|
+
var TitleFormContainer = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n display: flex; \n align-items: center;\n margin-top: 7px;\n h1 {\n margin: auto;\n font-size: 24px;\n }\n"])));
|
|
67
77
|
exports.TitleFormContainer = TitleFormContainer;
|