ordering-ui-external 14.1.8 → 14.1.10
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/{7.ordering-ui.8668ba2c7ba56b89cbdd.js → 7.ordering-ui.8deae335e250e653c308.js} +1 -1
- package/_bundles/ordering-ui.8deae335e250e653c308.js +2 -0
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +27 -10
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/styles.js +3 -5
- package/_modules/themes/callcenterOriginal/src/components/AddressList/index.js +1 -4
- package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/Header/index.js +0 -1
- package/_modules/themes/callcenterOriginal/src/components/Header/styles.js +4 -4
- package/_modules/themes/callcenterOriginal/src/components/InputPhoneNumber/styles.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/OrderTypeSelectorHeader/styles.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +20 -18
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +20 -18
- package/_modules/themes/five/src/components/BusinessPreorder/index.js +3 -1
- package/_modules/themes/five/src/components/BusinessPreorder/styles.js +3 -3
- package/_modules/themes/five/src/components/Cart/index.js +1 -1
- package/_modules/themes/five/src/components/Cart/styles.js +5 -2
- package/_modules/themes/five/src/components/Checkout/index.js +1 -1
- package/_modules/themes/five/src/components/Checkout/styles.js +5 -4
- package/_modules/themes/five/src/components/MomentControl/index.js +3 -1
- package/_modules/themes/five/src/components/MomentControl/styles.js +3 -3
- package/_modules/themes/five/src/components/OrderDetails/index.js +12 -5
- package/_modules/themes/five/src/components/ProductOptionSubOption/index.js +6 -5
- package/_modules/themes/five/src/components/UserFormDetails/index.js +5 -5
- package/package.json +2 -2
- package/src/themes/callcenterOriginal/src/components/AddressForm/index.js +46 -17
- package/src/themes/callcenterOriginal/src/components/AddressForm/styles.js +5 -6
- package/src/themes/callcenterOriginal/src/components/AddressList/index.js +5 -4
- package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +1 -1
- package/src/themes/callcenterOriginal/src/components/Header/index.js +0 -2
- package/src/themes/callcenterOriginal/src/components/Header/styles.js +6 -6
- package/src/themes/callcenterOriginal/src/components/InputPhoneNumber/styles.js +1 -1
- package/src/themes/callcenterOriginal/src/components/OrderTypeSelectorHeader/styles.js +0 -1
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +14 -16
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +10 -6
- package/src/themes/five/src/components/BusinessPreorder/index.js +1 -1
- package/src/themes/five/src/components/BusinessPreorder/styles.js +9 -4
- package/src/themes/five/src/components/Cart/index.js +7 -1
- package/src/themes/five/src/components/Cart/styles.js +6 -0
- package/src/themes/five/src/components/Checkout/index.js +19 -19
- package/src/themes/five/src/components/Checkout/styles.js +8 -0
- package/src/themes/five/src/components/FavoriteList/index.js +9 -8
- package/src/themes/five/src/components/FavoriteList/styles.js +1 -0
- package/src/themes/five/src/components/MomentControl/index.js +1 -1
- package/src/themes/five/src/components/MomentControl/styles.js +9 -4
- package/src/themes/five/src/components/OrderDetails/index.js +38 -3
- package/src/themes/five/src/components/ProductOptionSubOption/index.js +2 -1
- package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +1 -1
- package/src/themes/five/src/components/UserFormDetails/index.js +2 -4
- package/_bundles/ordering-ui.8668ba2c7ba56b89cbdd.js +0 -2
- /package/_bundles/{0.ordering-ui.8668ba2c7ba56b89cbdd.js → 0.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{1.ordering-ui.8668ba2c7ba56b89cbdd.js → 1.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{2.ordering-ui.8668ba2c7ba56b89cbdd.js → 2.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{4.ordering-ui.8668ba2c7ba56b89cbdd.js → 4.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{5.ordering-ui.8668ba2c7ba56b89cbdd.js → 5.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{6.ordering-ui.8668ba2c7ba56b89cbdd.js → 6.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{7.ordering-ui.8668ba2c7ba56b89cbdd.js.LICENSE.txt → 7.ordering-ui.8deae335e250e653c308.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.8668ba2c7ba56b89cbdd.js → 8.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{9.ordering-ui.8668ba2c7ba56b89cbdd.js → 9.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{ordering-ui.8668ba2c7ba56b89cbdd.js.LICENSE.txt → ordering-ui.8deae335e250e653c308.js.LICENSE.txt} +0 -0
|
@@ -95,12 +95,16 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
95
95
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
96
96
|
firstLocationNoEdit = _useState10[0],
|
|
97
97
|
setFirstLocationNoEdit = _useState10[1];
|
|
98
|
+
var _useState11 = (0, _react.useState)(false),
|
|
99
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
100
|
+
showMap = _useState12[0],
|
|
101
|
+
setShowMap = _useState12[1];
|
|
98
102
|
var isEditing = !!((_addressState$address3 = addressState.address) !== null && _addressState$address3 !== void 0 && _addressState$address3.id);
|
|
99
103
|
var googleInputRef = (0, _react.useRef)();
|
|
100
|
-
var
|
|
101
|
-
|
|
102
|
-
locationChange =
|
|
103
|
-
setLocationChange =
|
|
104
|
+
var _useState13 = (0, _react.useState)(isEditing ? addressState === null || addressState === void 0 || (_addressState$address4 = addressState.address) === null || _addressState$address4 === void 0 ? void 0 : _addressState$address4.location : (_formState$changes$lo = (_formState$changes2 = formState.changes) === null || _formState$changes2 === void 0 ? void 0 : _formState$changes2.location) !== null && _formState$changes$lo !== void 0 ? _formState$changes$lo : null),
|
|
105
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
106
|
+
locationChange = _useState14[0],
|
|
107
|
+
setLocationChange = _useState14[1];
|
|
104
108
|
var maxLimitLocation = configState === null || configState === void 0 || (_configState$configs = configState.configs) === null || _configState$configs === void 0 || (_configState$configs = _configState$configs.meters_to_change_address) === null || _configState$configs === void 0 ? void 0 : _configState$configs.value;
|
|
105
109
|
var googleMapsApiKey = configState === null || configState === void 0 || (_configState$configs2 = configState.configs) === null || _configState$configs2 === void 0 || (_configState$configs2 = _configState$configs2.google_maps_api_key) === null || _configState$configs2 === void 0 ? void 0 : _configState$configs2.value;
|
|
106
110
|
var isLocationRequired = ((_configState$configs3 = configState.configs) === null || _configState$configs3 === void 0 || (_configState$configs3 = _configState$configs3.google_autocomplete_selection_required) === null || _configState$configs3 === void 0 ? void 0 : _configState$configs3.value) === '1' || ((_configState$configs4 = configState.configs) === null || _configState$configs4 === void 0 || (_configState$configs4 = _configState$configs4.google_autocomplete_selection_required) === null || _configState$configs4 === void 0 ? void 0 : _configState$configs4.value) === 'true';
|
|
@@ -457,7 +461,7 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
457
461
|
key: i
|
|
458
462
|
}, props));
|
|
459
463
|
}), inputNames.map(function (field) {
|
|
460
|
-
var _address$location, _address$location2, _formState$result3, _formState$result4, _formState$changes$ad5, _formState$changes26, _configState$configs5, _addressState$address12, _formState$changes27, _businessesList$busin, _theme$images, _ref9, _formState$changes$fi2, _formState$
|
|
464
|
+
var _address$location, _address$location2, _formState$result3, _formState$result4, _formState$changes$ad5, _formState$changes26, _configState$configs5, _addressState$address12, _formState$changes27, _addressState$address13, _formState$changes28, _addressState$address14, _formState$changes29, _addressState$address15, _formState$changes30, _addressState$address16, _formState$changes31, _addressState$address17, _formState$changes32, _addressState$address18, _formState$changes33, _addressState$address19, _formState$changes34, _addressState$address20, _formState$changes35, _addressState$address21, _formState$changes36, _addressState$address22, _formState$changes37, _businessesList$busin, _theme$images, _ref9, _formState$changes$fi2, _formState$changes38, _addressState$address23, _ref10, _formState$changes$ad6, _formState$changes39;
|
|
461
465
|
return showField && showField(field.name) && (field.name === 'address' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
462
466
|
key: field.name
|
|
463
467
|
}, /*#__PURE__*/_react.default.createElement(_styles.AddressWrap, {
|
|
@@ -495,11 +499,24 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
495
499
|
onError: setMapErrors,
|
|
496
500
|
IconButton: _reactBootstrapIcons.GeoAlt,
|
|
497
501
|
IconLoadingButton: _CgSearchLoading.default
|
|
498
|
-
})),
|
|
499
|
-
isEnableContinueButton: isEnableContinueButton,
|
|
502
|
+
})), ((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$changes27 = formState.changes) === null || _formState$changes27 === void 0 ? void 0 : _formState$changes27.location)) && /*#__PURE__*/_react.default.createElement(_styles.WrapperMap, {
|
|
500
503
|
notUseCustomerInfo: notUseCustomerInfo,
|
|
501
504
|
addFormRestrictions: addFormRestrictions
|
|
502
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
505
|
+
}, !showMap && /*#__PURE__*/_react.default.createElement("section", null, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.GeoAlt, {
|
|
506
|
+
style: {
|
|
507
|
+
fontSize: 25,
|
|
508
|
+
marginRight: 5
|
|
509
|
+
}
|
|
510
|
+
}), ((addressState === null || addressState === void 0 || (_addressState$address13 = addressState.address) === null || _addressState$address13 === void 0 ? void 0 : _addressState$address13.address) || (formState === null || formState === void 0 || (_formState$changes28 = formState.changes) === null || _formState$changes28 === void 0 ? void 0 : _formState$changes28.address)) && /*#__PURE__*/_react.default.createElement("span", null, (addressState === null || addressState === void 0 || (_addressState$address14 = addressState.address) === null || _addressState$address14 === void 0 ? void 0 : _addressState$address14.address) || (formState === null || formState === void 0 || (_formState$changes29 = formState.changes) === null || _formState$changes29 === void 0 ? void 0 : _formState$changes29.address), ', '), ((addressState === null || addressState === void 0 || (_addressState$address15 = addressState.address) === null || _addressState$address15 === void 0 ? void 0 : _addressState$address15.country) || (formState === null || formState === void 0 || (_formState$changes30 = formState.changes) === null || _formState$changes30 === void 0 ? void 0 : _formState$changes30.country)) && /*#__PURE__*/_react.default.createElement("span", null, (addressState === null || addressState === void 0 || (_addressState$address16 = addressState.address) === null || _addressState$address16 === void 0 ? void 0 : _addressState$address16.country) || (formState === null || formState === void 0 || (_formState$changes31 = formState.changes) === null || _formState$changes31 === void 0 ? void 0 : _formState$changes31.country), ', '), ((addressState === null || addressState === void 0 || (_addressState$address17 = addressState.address) === null || _addressState$address17 === void 0 ? void 0 : _addressState$address17.address_notes) || (formState === null || formState === void 0 || (_formState$changes32 = formState.changes) === null || _formState$changes32 === void 0 ? void 0 : _formState$changes32.address_notes)) && /*#__PURE__*/_react.default.createElement("span", null, (addressState === null || addressState === void 0 || (_addressState$address18 = addressState.address) === null || _addressState$address18 === void 0 ? void 0 : _addressState$address18.address_notes) || (formState === null || formState === void 0 || (_formState$changes33 = formState.changes) === null || _formState$changes33 === void 0 ? void 0 : _formState$changes33.address_notes), ', '), ((addressState === null || addressState === void 0 || (_addressState$address19 = addressState.address) === null || _addressState$address19 === void 0 ? void 0 : _addressState$address19.internal_number) || (formState === null || formState === void 0 || (_formState$changes34 = formState.changes) === null || _formState$changes34 === void 0 ? void 0 : _formState$changes34.internal_number)) && /*#__PURE__*/_react.default.createElement("span", null, (addressState === null || addressState === void 0 || (_addressState$address20 = addressState.address) === null || _addressState$address20 === void 0 ? void 0 : _addressState$address20.internal_number) || (formState === null || formState === void 0 || (_formState$changes35 = formState.changes) === null || _formState$changes35 === void 0 ? void 0 : _formState$changes35.internal_number), ', '), ((addressState === null || addressState === void 0 || (_addressState$address21 = addressState.address) === null || _addressState$address21 === void 0 ? void 0 : _addressState$address21.zipcode) || (formState === null || formState === void 0 || (_formState$changes36 = formState.changes) === null || _formState$changes36 === void 0 ? void 0 : _formState$changes36.zipcode)) && /*#__PURE__*/_react.default.createElement("span", null, (addressState === null || addressState === void 0 || (_addressState$address22 = addressState.address) === null || _addressState$address22 === void 0 ? void 0 : _addressState$address22.zipcode) || (formState === null || formState === void 0 || (_formState$changes37 = formState.changes) === null || _formState$changes37 === void 0 ? void 0 : _formState$changes37.zipcode), ', '), /*#__PURE__*/_react.default.createElement("a", {
|
|
511
|
+
style: {
|
|
512
|
+
textDecoration: 'underline',
|
|
513
|
+
color: 'blue',
|
|
514
|
+
cursor: 'pointer'
|
|
515
|
+
},
|
|
516
|
+
onClick: function onClick() {
|
|
517
|
+
return setShowMap(!showMap);
|
|
518
|
+
}
|
|
519
|
+
}, t('SHOW_MAP', 'Show Map'))), locationChange && showMap && /*#__PURE__*/_react.default.createElement(_orderingComponentsExternal.GoogleMapsMap, {
|
|
503
520
|
useMapWithBusinessZones: true,
|
|
504
521
|
deactiveAlerts: true,
|
|
505
522
|
avoidFitBounds: true,
|
|
@@ -520,7 +537,7 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
520
537
|
}, field.name !== 'address_notes' ? /*#__PURE__*/_react.default.createElement(_Inputs.Input, {
|
|
521
538
|
className: field.name,
|
|
522
539
|
placeholder: t(field.name.toUpperCase(), field.code),
|
|
523
|
-
value: (_ref9 = (_formState$changes$fi2 = (_formState$
|
|
540
|
+
value: (_ref9 = (_formState$changes$fi2 = (_formState$changes38 = formState.changes) === null || _formState$changes38 === void 0 ? void 0 : _formState$changes38[field.name]) !== null && _formState$changes$fi2 !== void 0 ? _formState$changes$fi2 : (_addressState$address23 = addressState.address) === null || _addressState$address23 === void 0 ? void 0 : _addressState$address23[field.name]) !== null && _ref9 !== void 0 ? _ref9 : '',
|
|
524
541
|
onChange: function onChange(e) {
|
|
525
542
|
formMethods.setValue(field.name, e.target.value);
|
|
526
543
|
handleChangeInput({
|
|
@@ -535,7 +552,7 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
535
552
|
}) : /*#__PURE__*/_react.default.createElement(_Inputs.TextArea, {
|
|
536
553
|
rows: 4,
|
|
537
554
|
placeholder: t('ADDRESS_NOTES', 'Address Notes'),
|
|
538
|
-
value: (_ref10 = (_formState$changes$ad6 = (_formState$
|
|
555
|
+
value: (_ref10 = (_formState$changes$ad6 = (_formState$changes39 = formState.changes) === null || _formState$changes39 === void 0 ? void 0 : _formState$changes39.address_notes) !== null && _formState$changes$ad6 !== void 0 ? _formState$changes$ad6 : addressState.address.address_notes) !== null && _ref10 !== void 0 ? _ref10 : '',
|
|
539
556
|
onChange: function onChange(e) {
|
|
540
557
|
formMethods.setValue('address_notes', e.target.value);
|
|
541
558
|
handleChangeInput({
|
|
@@ -38,11 +38,9 @@ var WrapAddressInput = exports.WrapAddressInput = _styledComponents.default.div(
|
|
|
38
38
|
var AddressTagSection = exports.AddressTagSection = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n width: 100%;\n margin: 10px 0px;\n display: flex;\n justify-content: space-between;\n\n button {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 46px;\n height: 46px;\n border: none;\n color: #B1BCCC;\n\n img {\n width: 25px;\n height: 25px;\n }\n\n span {\n display: flex;\n justify-content: center;\n align-items: center;\n\n svg {\n font-size: 30px;\n }\n }\n }\n\n button.active {\n color: ", ";\n }\n"])), function (props) {
|
|
39
39
|
return props.theme.colors.primary;
|
|
40
40
|
});
|
|
41
|
-
var WrapperMap = exports.WrapperMap = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n z-index: 100;\n width: 50%;\n position: absolute;\n bottom: 2%;\n right: 0;\n padding-right: 20px;\n height: ", ";\n\n > div {\n position: relative !important;\n width: 100% !important;\n height: 100% !important;\n border-radius: 15px;\n }\n"])), function (_ref) {
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
addFormRestrictions = _ref.addFormRestrictions;
|
|
45
|
-
return isEnableContinueButton ? addFormRestrictions ? '460px' : '425px' : notUseCustomerInfo ? '370px' : '480px';
|
|
41
|
+
var WrapperMap = exports.WrapperMap = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n z-index: 100;\n width: 50%;\n position: absolute;\n bottom: 2%;\n right: 0;\n padding-right: 20px;\n padding-top: 30px;\n height: ", ";\n\n > div {\n position: relative !important;\n width: 100% !important;\n height: 100% !important;\n border-radius: 15px;\n }\n"])), function (_ref) {
|
|
42
|
+
var notUseCustomerInfo = _ref.notUseCustomerInfo;
|
|
43
|
+
return notUseCustomerInfo ? '370px' : '480px';
|
|
46
44
|
});
|
|
47
45
|
var WrapperSkeleton = exports.WrapperSkeleton = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 10px;\n\n span {\n width: 100%;\n }\n"])));
|
|
48
46
|
var AddressMarkContainer = exports.AddressMarkContainer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n background: #FFE69C;\n border: 1px solid #FFF3CD;\n display: flex;\n padding: 8px;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n position: absolute;\n top: 50px;\n width: max-content;\n p {\n margin: 0;\n color: #664D03;\n font-size: 12px;\n }\n"])));
|
|
@@ -226,13 +226,12 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
226
226
|
halfWidth: addressOpen,
|
|
227
227
|
isOpenUserData: isOpenUserData,
|
|
228
228
|
isHeader: isHeader,
|
|
229
|
-
isEnableContinueButton: isEnableContinueButton,
|
|
230
229
|
notUseCustomerInfo: notUseCustomerInfo,
|
|
231
230
|
addFormRestrictions: addFormRestrictions
|
|
232
231
|
}, !addFormRestrictions && !addressOpen && !isOpenUserData && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
233
232
|
className: "add",
|
|
234
233
|
outline: true,
|
|
235
|
-
color:
|
|
234
|
+
color: (addressList === null || addressList === void 0 || (_addressList$addresse3 = addressList.addresses) === null || _addressList$addresse3 === void 0 ? void 0 : _addressList$addresse3.length) > 0 ? 'secondary' : 'primary',
|
|
236
235
|
onClick: function onClick() {
|
|
237
236
|
return openAddress({});
|
|
238
237
|
},
|
|
@@ -309,13 +308,11 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
309
308
|
},
|
|
310
309
|
onSaveAddress: handleSaveAddress,
|
|
311
310
|
userCustomerSetup: userCustomerSetup,
|
|
312
|
-
isEnableContinueButton: isEnableContinueButton,
|
|
313
311
|
notUseCustomerInfo: notUseCustomerInfo,
|
|
314
312
|
franchiseId: franchiseId,
|
|
315
313
|
addFormRestrictions: addFormRestrictions
|
|
316
314
|
}))), addressOpen && !notUseCustomerInfo && /*#__PURE__*/_react.default.createElement(_styles.AddressFormContainer, {
|
|
317
315
|
width: "50%",
|
|
318
|
-
isEnableContinueButton: isEnableContinueButton,
|
|
319
316
|
addFormRestrictions: addFormRestrictions
|
|
320
317
|
}, /*#__PURE__*/_react.default.createElement(_styles.TitleFormContainer, null, !addFormRestrictions && /*#__PURE__*/_react.default.createElement(_styles.CloseIcon, null, /*#__PURE__*/_react.default.createElement(_MdClose.default, {
|
|
321
318
|
onClick: function onClick() {
|
|
@@ -63,7 +63,7 @@ var AddressFormContainer = exports.AddressFormContainer = _styledComponents.defa
|
|
|
63
63
|
}, function (_ref6) {
|
|
64
64
|
var isEnableContinueButton = _ref6.isEnableContinueButton,
|
|
65
65
|
addFormRestrictions = _ref6.addFormRestrictions;
|
|
66
|
-
return isEnableContinueButton && (0, _styledComponents.css)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n position: relative;\n bottom:
|
|
66
|
+
return isEnableContinueButton && (0, _styledComponents.css)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n position: relative;\n bottom: 164px;\n "])));
|
|
67
67
|
});
|
|
68
68
|
var CloseIcon = exports.CloseIcon = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n cursor: pointer;\n svg{\n width: 30px;\n height: 30px;\n }\n"])));
|
|
69
69
|
var TitleFormContainer = exports.TitleFormContainer = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n display: flex; \n align-items: center;\n margin-top: 7px;\n h1 {\n margin: auto;\n font-size: 24px;\n }\n"])));
|
|
@@ -10,7 +10,6 @@ var _reactRouterDom = require("react-router-dom");
|
|
|
10
10
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
11
11
|
var _styledComponents = require("styled-components");
|
|
12
12
|
var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
13
|
-
var _TiWarningOutline = _interopRequireDefault(require("@meronex/icons/ti/TiWarningOutline"));
|
|
14
13
|
var _OrderTypeSelectorContent = require("../OrderTypeSelectorContent");
|
|
15
14
|
var _LanguageSelector = require("../LanguageSelector");
|
|
16
15
|
var _AiOutlineClose = _interopRequireDefault(require("@meronex/icons/ai/AiOutlineClose"));
|
|
@@ -24,7 +24,7 @@ var LeftHeader = exports.LeftHeader = _styledComponents.default.div(_templateObj
|
|
|
24
24
|
var RightHeader = exports.RightHeader = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n align-self: center;\n display: flex;\n\n #select-input {\n div {\n color: ", ";\n }\n }\n"])), function (props) {
|
|
25
25
|
return props.theme.colors.darkTextColor;
|
|
26
26
|
});
|
|
27
|
-
var Menu = exports.Menu = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n\n #select-input {\n border-radius: 7.6px;\n\n #list {\n border-radius: 7.6px;\n }\n }\n\n &.left-header {\n background: #F8F9FA;\n border: none;\n box-sizing: border-box;\n border-radius: 50px;\n margin: 0 20px;\n padding: 0 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n height: 44px;\n\n @media (min-width: 821px) {\n border: 1px solid #DEE2E6;\n justify-content: space-between;\n }\n\n @media (min-width: 1024px) {\n padding: 0 20px;\n margin-left: 35px;\n margin-right: 10px;\n }\n
|
|
27
|
+
var Menu = exports.Menu = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n\n #select-input {\n border-radius: 7.6px;\n\n #list {\n border-radius: 7.6px;\n }\n }\n\n &.left-header {\n background: #F8F9FA;\n border: none;\n box-sizing: border-box;\n border-radius: 50px;\n margin: 0 20px;\n padding: 0 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n height: 44px;\n\n @media (min-width: 821px) {\n border: 1px solid #DEE2E6;\n justify-content: space-between;\n }\n\n @media (min-width: 1024px) {\n padding: 0 20px;\n margin-left: 35px;\n margin-right: 10px;\n }\n\n @media (min-width: 1200px) {\n padding: 0 30px;\n margin-left: 50px;\n margin-right: 15px;\n }\n\n @media (min-width: 1500px) {\n padding: 0 30px;\n margin-left: 75px;\n margin-right: 20px\n }\n }\n\n > *:not(:last-child) {\n margin: 0 5px;\n }\n\n > span {\n #select-input {\n background: transparent !important;\n }\n }\n\n .moment-popover {\n border-left: 1px solid #DEE2E6;\n border-right: 1px solid #DEE2E6;\n justify-content: center;\n width: 200px;\n display: none;\n\n @media (min-width: 1175px) {\n width: 250px;\n }\n\n @media (min-width: 1400px) {\n width: 400px;\n }\n\n > div:first-child {\n width: 100%;\n display: flex;\n justify-content: center;\n }\n }\n\n .address-popover {\n flex-grow: 1;\n display: none;\n > div:first-child {\n width: 100%;\n }\n }\n\n .order-type {\n padding: 0 5px;\n\n > div {\n min-width: auto;\n text-overflow: ellipsis;\n overflow: hidden;\n min-width: 40px;\n }\n\n @media (min-width: 1123px) {\n padding: 0 10px;\n > div {\n min-width: fit-content;\n }\n }\n @media (min-width: 1200px) {\n padding: 0 20px;\n }\n }\n\n\n @media (min-width: 821px) {\n .moment-popover,\n .address-popover {\n display: flex;\n }\n }\n"])));
|
|
28
28
|
var MenuItem = exports.MenuItem = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n"])));
|
|
29
29
|
var MenuLink = exports.MenuLink = _styledComponents.default.a(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n text-decoration: none;\n font-size: 14px;\n padding: 10px;\n color: #333;\n cursor: pointer;\n\n ", "\n"])), function (_ref2) {
|
|
30
30
|
var highlight = _ref2.highlight;
|
|
@@ -35,8 +35,8 @@ var MenuLink = exports.MenuLink = _styledComponents.default.a(_templateObject9 |
|
|
|
35
35
|
});
|
|
36
36
|
});
|
|
37
37
|
var SubMenu = exports.SubMenu = (0, _styledComponents.default)(InnerHeader)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n justify-content: space-between;\n padding: 0px 20px 7px;\n box-sizing: border-box;\n margin: 0px;\n position: relative;\n\n @media (min-width: 821px) {\n display: none;\n }\n"])));
|
|
38
|
-
var CustomerInfo = exports.CustomerInfo = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: none;\n cursor: pointer;\n flex: 1;\n position: relative;\n @media (min-width: 450px) {\n display: flex;\n justify-content: center;\n align-items: center;\n\n span {\n display: flex;\n align-items: center;\n margin: 0;\n p {\n max-width: 250px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: #909BA9;\n margin: 0;\n }\n svg {
|
|
39
|
-
var UserEdit = exports.UserEdit = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n > :first-child{\n margin-bottom: 20px;\n width: 100%;\n ", "\n"])), function (props) {
|
|
38
|
+
var CustomerInfo = exports.CustomerInfo = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: none;\n cursor: pointer;\n flex: 1;\n position: relative;\n @media (min-width: 450px) {\n display: flex;\n justify-content: center;\n align-items: center;\n\n span {\n display: flex;\n align-items: center;\n margin: 0;\n p {\n max-width: 250px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: #909BA9;\n margin: 0;\n }\n svg {\n color: #748194;\n margin: 0;\n font-size: 20px;\n }\n }\n }\n"])));
|
|
39
|
+
var UserEdit = exports.UserEdit = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n > :first-child{\n margin-bottom: 20px;\n width: 100%;\n ", "\n }\n"])), function (props) {
|
|
40
40
|
return !props.isOpenUserData && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n position: absolute;\n "])));
|
|
41
41
|
});
|
|
42
42
|
var AddressMenu = exports.AddressMenu = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n cursor: pointer;\n font-size: 14px;\n font-weight: 600;\n color: ", ";\n display: flex;\n align-items: center;\n position: relative;\n width: 50%;\n\n span {\n width: 85%;\n p {\n margin: 0;\n padding: 0;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n }\n\n svg {\n color: ", ";\n font-size: 16px;\n margin-right: 10px;\n ", "\n }\n @media (min-width: 765px) {\n width: 80%;\n }\n @media (min-width: 820px) {\n width: 50%;\n }\n"])), function (props) {
|
|
@@ -49,7 +49,7 @@ var AddressMenu = exports.AddressMenu = _styledComponents.default.div(_templateO
|
|
|
49
49
|
var _props$theme2;
|
|
50
50
|
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n margin-left: 10px;\n margin-right: 0;\n "])));
|
|
51
51
|
});
|
|
52
|
-
var MomentMenu = exports.MomentMenu = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n border-left: 1px solid #DEE2E6;\n border-right: 1px solid #DEE2E6;\n height: 100%;\n justify-content: center;\n width: 200px;\n display: none;\n
|
|
52
|
+
var MomentMenu = exports.MomentMenu = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n border-left: 1px solid #DEE2E6;\n border-right: 1px solid #DEE2E6;\n height: 100%;\n justify-content: center;\n width: 200px;\n display: none;\n\n @media (min-width: 821px) {\n display: flex;\n }\n\n @media (min-width: 1175px) {\n width: 250px;\n }\n\n @media (min-width: 1400px) {\n width: 300px;\n }\n\n > div {\n cursor: pointer;\n font-size: 14px;\n color: #909BA9;\n display: flex;\n align-items: center;\n text-align: center;\n white-space: nowrap;\n padding: 0 10px;\n }\n"])));
|
|
53
53
|
var FarAwayMessage = exports.FarAwayMessage = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n pointer-events: none;\n position: absolute;\n display: flex;\n align-items: center;\n top: 100%;\n background: ", ";\n border: 1px solid ", ";\n box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);\n border-radius: 7.6px;\n padding: 6px 15px;\n box-sizing: border-box;\n z-index: 2000;\n margin: 10px 0px 0px 0px !important;\n\n left: 5px;\n ", "\n\n svg {\n font-size: 20px;\n color: ", ";\n margin-right: 10px;\n ", "\n }\n span {\n font-size: 12px;\n line-height: 18px;\n color: ", ";\n }\n\n @media (min-width: 400px) {\n padding: 8px 20px;\n font-size: 14px;\n line-height: 24px;\n left: 10px;\n ", "\n }\n"])), function (props) {
|
|
54
54
|
return props.theme.colors.warning100;
|
|
55
55
|
}, function (props) {
|
|
@@ -22,6 +22,6 @@ var Container = exports.Container = _styledComponents.default.div(_templateObjec
|
|
|
22
22
|
var ErrorMsg = exports.ErrorMsg = _styledComponents.default.span(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin: 0;\n padding: 0;\n color: ", ";\n font-weight: 400;\n font-size: 16px;\n"])), function (props) {
|
|
23
23
|
return props.theme.colors.primary;
|
|
24
24
|
});
|
|
25
|
-
var InputBeforeIconWrapper = exports.InputBeforeIconWrapper = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: absolute;\n height: 100%;\n top:
|
|
25
|
+
var InputBeforeIconWrapper = exports.InputBeforeIconWrapper = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: absolute;\n height: 100%;\n top: 10px;\n left: 100px;\n\n ", "\n\n svg {\n color: #B1BCCC;\n font-size: 16px;\n }\n"])), function (props) {
|
|
26
26
|
return props.theme.rtl && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n right: 100px;\n left: initial;\n "])));
|
|
27
27
|
});
|
|
@@ -8,4 +8,4 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
var _templateObject;
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
-
var HeaderItem = exports.HeaderItem = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n font-size: 14px;\n color: #909BA9;\n min-width: 150px;\n text-align: center;\n
|
|
11
|
+
var HeaderItem = exports.HeaderItem = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n font-size: 14px;\n color: #909BA9;\n min-width: 150px;\n text-align: center;\n flex: 1;\n"])));
|
|
@@ -64,9 +64,6 @@ var PhoneAutocompleteUI = function PhoneAutocompleteUI(props) {
|
|
|
64
64
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
65
65
|
t = _useLanguage2[1];
|
|
66
66
|
var theme = (0, _styledComponents.useTheme)();
|
|
67
|
-
var _useCustomer = (0, _orderingComponentsExternal.useCustomer)(),
|
|
68
|
-
_useCustomer2 = _slicedToArray(_useCustomer, 2),
|
|
69
|
-
deleteUserCustomer = _useCustomer2[1].deleteUserCustomer;
|
|
70
67
|
var _useConfig = (0, _orderingComponentsExternal.useConfig)(),
|
|
71
68
|
_useConfig2 = _slicedToArray(_useConfig, 1),
|
|
72
69
|
configState = _useConfig2[0];
|
|
@@ -106,7 +103,7 @@ var PhoneAutocompleteUI = function PhoneAutocompleteUI(props) {
|
|
|
106
103
|
value: userCustomer.cellphone || userCustomer.phone,
|
|
107
104
|
label: "".concat(countryPhoneCode ? "(".concat(countryPhoneCode, ")") : '', " ").concat(userCustomer !== null && userCustomer !== void 0 && userCustomer.phone && !(userCustomer !== null && userCustomer !== void 0 && userCustomer.cellphone) ? "".concat(userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.phone) : '', " ").concat(userCustomer !== null && userCustomer !== void 0 && userCustomer.cellphone ? "".concat(userCustomer.cellphone) : '', " - {").concat(userCustomer.name, "}"),
|
|
108
105
|
flag: (userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.imported_address_text) && (userCustomer === null || userCustomer === void 0 || (_userCustomer$address = userCustomer.addresses) === null || _userCustomer$address === void 0 ? void 0 : _userCustomer$address.length) === 0,
|
|
109
|
-
lastname: userCustomer.lastname
|
|
106
|
+
lastname: "".concat(userCustomer.name, " ").concat(userCustomer.lastname)
|
|
110
107
|
} : null),
|
|
111
108
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
112
109
|
optSelected = _useState14[0],
|
|
@@ -183,13 +180,14 @@ var PhoneAutocompleteUI = function PhoneAutocompleteUI(props) {
|
|
|
183
180
|
onChangeNumber(inputValue);
|
|
184
181
|
};
|
|
185
182
|
var onChange = function onChange(option, triggeredAction) {
|
|
186
|
-
var _user
|
|
183
|
+
var _user, _user2;
|
|
187
184
|
if ((triggeredAction === null || triggeredAction === void 0 ? void 0 : triggeredAction.action) === 'clear') {
|
|
188
185
|
setOptSelected(null);
|
|
189
186
|
setCustomersPhones(_objectSpread(_objectSpread({}, customersPhones), {}, {
|
|
190
187
|
users: []
|
|
191
188
|
}));
|
|
192
189
|
setInputValue('');
|
|
190
|
+
onChangeNumber('');
|
|
193
191
|
return;
|
|
194
192
|
}
|
|
195
193
|
var user;
|
|
@@ -200,7 +198,7 @@ var PhoneAutocompleteUI = function PhoneAutocompleteUI(props) {
|
|
|
200
198
|
});
|
|
201
199
|
}
|
|
202
200
|
setOptSelected(_objectSpread(_objectSpread({}, option), {}, {
|
|
203
|
-
lastname: (
|
|
201
|
+
lastname: "".concat((_user = user) === null || _user === void 0 ? void 0 : _user.name, " ").concat((_user2 = user) === null || _user2 === void 0 ? void 0 : _user2.lastname)
|
|
204
202
|
}));
|
|
205
203
|
setInputValue(option ? option === null || option === void 0 ? void 0 : option.value : '');
|
|
206
204
|
if (!option) {
|
|
@@ -246,7 +244,6 @@ var PhoneAutocompleteUI = function PhoneAutocompleteUI(props) {
|
|
|
246
244
|
error: false
|
|
247
245
|
}
|
|
248
246
|
}));
|
|
249
|
-
deleteUserCustomer(true);
|
|
250
247
|
if (isFromUrlPhone) {
|
|
251
248
|
onRedirectPhoneUrlPage && onRedirectPhoneUrlPage('home');
|
|
252
249
|
}
|
|
@@ -260,11 +257,11 @@ var PhoneAutocompleteUI = function PhoneAutocompleteUI(props) {
|
|
|
260
257
|
setIsPickupSelected(true);
|
|
261
258
|
};
|
|
262
259
|
var optionsToSelect = customersPhones.users.map(function (user) {
|
|
263
|
-
var _user$country_phone_c, _user$addresses;
|
|
260
|
+
var _user$country_phone_c, _user$lastname, _user$addresses;
|
|
264
261
|
var countryPhoneCode = (_user$country_phone_c = user === null || user === void 0 ? void 0 : user.country_phone_code) !== null && _user$country_phone_c !== void 0 ? _user$country_phone_c : user === null || user === void 0 ? void 0 : user.country_code;
|
|
265
262
|
var obj = {};
|
|
266
263
|
obj.value = user.cellphone || user.phone;
|
|
267
|
-
obj.label = "".concat(countryPhoneCode ? "(".concat(countryPhoneCode, ")") : '', " ").concat(user !== null && user !== void 0 && user.phone && !(user !== null && user !== void 0 && user.cellphone) ? "".concat(user === null || user === void 0 ? void 0 : user.phone) : '', " ").concat(user !== null && user !== void 0 && user.cellphone ? "".concat(user.cellphone) : '', " - {").concat(user.name, "}");
|
|
264
|
+
obj.label = "".concat(countryPhoneCode ? "(".concat(countryPhoneCode, ")") : '', " ").concat(user !== null && user !== void 0 && user.phone && !(user !== null && user !== void 0 && user.cellphone) ? "".concat(user === null || user === void 0 ? void 0 : user.phone) : '', " ").concat(user !== null && user !== void 0 && user.cellphone ? "".concat(user.cellphone) : '', " - {").concat(user.name, " ").concat((_user$lastname = user === null || user === void 0 ? void 0 : user.lastname) !== null && _user$lastname !== void 0 ? _user$lastname : '', "}");
|
|
268
265
|
obj.flag = (user === null || user === void 0 ? void 0 : user.imported_address_text) && (user === null || user === void 0 || (_user$addresses = user.addresses) === null || _user$addresses === void 0 ? void 0 : _user$addresses.length) === 0;
|
|
269
266
|
return obj;
|
|
270
267
|
}) || [];
|
|
@@ -372,7 +369,9 @@ var PhoneAutocompleteUI = function PhoneAutocompleteUI(props) {
|
|
|
372
369
|
onChange: onChange,
|
|
373
370
|
onInputChange: onInputChange,
|
|
374
371
|
isLoading: customersPhones === null || customersPhones === void 0 ? void 0 : customersPhones.loading,
|
|
375
|
-
options: optionsToSelect
|
|
372
|
+
options: optionsToSelect.filter(function (opt) {
|
|
373
|
+
return inputValue ? opt.value.toString().includes(inputValue) : opt;
|
|
374
|
+
}),
|
|
376
375
|
components: {
|
|
377
376
|
Option: Option
|
|
378
377
|
}
|
|
@@ -392,7 +391,7 @@ var PhoneAutocompleteUI = function PhoneAutocompleteUI(props) {
|
|
|
392
391
|
}));
|
|
393
392
|
}
|
|
394
393
|
}, /*#__PURE__*/_react.default.createElement(_SignUpForm.SignUpForm, {
|
|
395
|
-
externalPhoneNumber: "".concat(
|
|
394
|
+
externalPhoneNumber: "".concat(countryCallingCode || localPhoneCode, " ").concat((optSelected === null || optSelected === void 0 ? void 0 : optSelected.value) || phone),
|
|
396
395
|
saveCustomerUser: saveCustomerUser,
|
|
397
396
|
fieldsNotValid: props.fieldsNotValid,
|
|
398
397
|
useChekoutFileds: true,
|
|
@@ -406,16 +405,20 @@ var PhoneAutocompleteUI = function PhoneAutocompleteUI(props) {
|
|
|
406
405
|
},
|
|
407
406
|
hideCloseDefault: true,
|
|
408
407
|
padding: "20px"
|
|
409
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.UserEdit,
|
|
408
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.UserEdit, {
|
|
409
|
+
isOpenUserData: isOpenUserData
|
|
410
|
+
}, !(customerState !== null && customerState !== void 0 && customerState.loading) && !(customersPhones !== null && customersPhones !== void 0 && customersPhones.loading) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_UserDetails.UserDetails, {
|
|
410
411
|
isAddressFormOpen: isAddressFormOpen,
|
|
411
|
-
|
|
412
|
+
userData: customerState === null || customerState === void 0 ? void 0 : customerState.result,
|
|
412
413
|
userId: customerState === null || customerState === void 0 || (_customerState$result = customerState.result) === null || _customerState$result === void 0 ? void 0 : _customerState$result.id,
|
|
414
|
+
isOpenUserData: isOpenUserData,
|
|
413
415
|
isCustomerMode: true,
|
|
414
416
|
isModal: true,
|
|
415
417
|
setIsOpenUserData: setIsOpenUserData,
|
|
416
418
|
onClose: function onClose() {
|
|
417
419
|
return handleCloseAddressList();
|
|
418
|
-
}
|
|
420
|
+
},
|
|
421
|
+
franchiseId: franchiseId
|
|
419
422
|
}), /*#__PURE__*/_react.default.createElement(_AddressList.AddressList, {
|
|
420
423
|
isModal: true,
|
|
421
424
|
userId: customerState === null || customerState === void 0 || (_customerState$result2 = customerState.result) === null || _customerState$result2 === void 0 ? void 0 : _customerState$result2.id,
|
|
@@ -424,14 +427,13 @@ var PhoneAutocompleteUI = function PhoneAutocompleteUI(props) {
|
|
|
424
427
|
phone: phone,
|
|
425
428
|
urlPhone: urlPhone
|
|
426
429
|
}),
|
|
427
|
-
isEnableContinueButton: true,
|
|
428
|
-
isCustomerMode: true,
|
|
429
|
-
isFromPhoneAutocomplete: true,
|
|
430
430
|
isOpenUserData: isOpenUserData,
|
|
431
|
+
isEnableContinueButton: true,
|
|
431
432
|
setIsOpenUserData: setIsOpenUserData,
|
|
433
|
+
setIsSavedAddress: setIsSavedAddress,
|
|
432
434
|
setIsAddressFormOpen: setIsAddressFormOpen,
|
|
433
435
|
franchiseId: franchiseId,
|
|
434
|
-
|
|
436
|
+
isHeader: true
|
|
435
437
|
})))), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
436
438
|
open: openModal.error,
|
|
437
439
|
width: "50%",
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.WrappBtn = exports.WrapInput = exports.UserEdit = exports.TypesContainer = exports.TypeButton = exports.Title = exports.Slogan = exports.SelectContainer = exports.SearchContainer = exports.PhoneContainer = exports.PhoneAutocompleteContainer = exports.OptionContainer = exports.NotFoundUser = 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, _templateObject31, _templateObject32, _templateObject33;
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34;
|
|
11
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
12
12
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -45,7 +45,7 @@ var Slogan = exports.Slogan = _styledComponents.default.p(_templateObject9 || (_
|
|
|
45
45
|
var _props$theme7;
|
|
46
46
|
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 "])));
|
|
47
47
|
});
|
|
48
|
-
var WrapInput = exports.WrapInput = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n position: relative;\n cursor: pointer;\n\n ", "\n
|
|
48
|
+
var WrapInput = exports.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) {
|
|
49
49
|
var withIcon = _ref2.withIcon;
|
|
50
50
|
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) {
|
|
51
51
|
var _props$theme8;
|
|
@@ -61,14 +61,16 @@ var WrapInput = exports.WrapInput = _styledComponents.default.div(_templateObjec
|
|
|
61
61
|
var _props$theme11;
|
|
62
62
|
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 "])));
|
|
63
63
|
});
|
|
64
|
-
var AutoComplete = exports.AutoComplete = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n width: 45
|
|
65
|
-
var UserEdit = exports.UserEdit = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n > :first-child{\n margin-bottom: 20px
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
var
|
|
69
|
-
var
|
|
64
|
+
var AutoComplete = exports.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"])));
|
|
65
|
+
var UserEdit = exports.UserEdit = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n > :first-child {\n margin-bottom: 20px;\n width: 100%;\n ", "\n }\n"])), function (props) {
|
|
66
|
+
return !props.isOpenUserData && (0, _styledComponents.css)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n position: absolute;\n "])));
|
|
67
|
+
});
|
|
68
|
+
var Info = exports.Info = _styledComponents.default.p(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral([""])));
|
|
69
|
+
var SelectContainer = exports.SelectContainer = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _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"])));
|
|
70
|
+
var SearchContainer = exports.SearchContainer = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n width: 90%;\n"])));
|
|
71
|
+
var ImageWrapperStyled = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n width: 30%;\n ", "\n @media (min-width: 1400px){\n width: 40%;\n }\n"])), function (_ref3) {
|
|
70
72
|
var bgimage = _ref3.bgimage;
|
|
71
|
-
return bgimage && (0, _styledComponents.css)(
|
|
73
|
+
return bgimage && (0, _styledComponents.css)(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n background-repeat: no-repeat, repeat;\n background-size: cover;\n object-fit: cover;\n background-position: center;\n "])));
|
|
72
74
|
});
|
|
73
75
|
var ImageWrapper = exports.ImageWrapper = function ImageWrapper(props) {
|
|
74
76
|
var style = {};
|
|
@@ -77,7 +79,7 @@ var ImageWrapper = exports.ImageWrapper = function ImageWrapper(props) {
|
|
|
77
79
|
style: style
|
|
78
80
|
}), props.children);
|
|
79
81
|
};
|
|
80
|
-
var TypeButton = exports.TypeButton = _styledComponents.default.div(
|
|
82
|
+
var TypeButton = exports.TypeButton = _styledComponents.default.div(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n width: 215px;\n height: 75px;\n border-radius: 7.6px;\n padding: 16px;\n box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.10);\n margin-right: 32px;\n margin-bottom: 32px;\n cursor: pointer;\n background: ", ";\n p{\n margin: 0;\n margin-left: 33px;\n ", "\n }\n"])), function (_ref4) {
|
|
81
83
|
var _theme$colors, _theme$colors2;
|
|
82
84
|
var activated = _ref4.activated,
|
|
83
85
|
theme = _ref4.theme;
|
|
@@ -86,21 +88,21 @@ var TypeButton = exports.TypeButton = _styledComponents.default.div(_templateObj
|
|
|
86
88
|
var _theme$colors3;
|
|
87
89
|
var activated = _ref5.activated,
|
|
88
90
|
theme = _ref5.theme;
|
|
89
|
-
return activated && (0, _styledComponents.css)(
|
|
91
|
+
return activated && (0, _styledComponents.css)(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n color: ", ";\n "])), theme === null || theme === void 0 || (_theme$colors3 = theme.colors) === null || _theme$colors3 === void 0 ? void 0 : _theme$colors3.white);
|
|
90
92
|
});
|
|
91
|
-
var IconTypeButton = exports.IconTypeButton = _styledComponents.default.div(
|
|
93
|
+
var IconTypeButton = exports.IconTypeButton = _styledComponents.default.div(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 44px;\n height: 44px;\n background: ", ";\n border-radius: 44px;\n"])), function (_ref6) {
|
|
92
94
|
var _theme$colors4;
|
|
93
95
|
var activated = _ref6.activated,
|
|
94
96
|
theme = _ref6.theme;
|
|
95
97
|
return activated ? theme === null || theme === void 0 || (_theme$colors4 = theme.colors) === null || _theme$colors4 === void 0 ? void 0 : _theme$colors4.white : '#F3F9FF';
|
|
96
98
|
});
|
|
97
|
-
var TypesContainer = exports.TypesContainer = _styledComponents.default.div(
|
|
98
|
-
var AdditionalTypesContainer = exports.AdditionalTypesContainer = _styledComponents.default.div(
|
|
99
|
+
var TypesContainer = exports.TypesContainer = _styledComponents.default.div(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n display: flex;\n"])));
|
|
100
|
+
var AdditionalTypesContainer = exports.AdditionalTypesContainer = _styledComponents.default.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n width: 60%;\n display: flex;\n margin-bottom: 20px;\n button {\n padding: 4px 10px;\n border-radius: 50px;\n font-size: 10px;\n line-height: 0;\n height: 25px;\n margin-right: 20px;\n }\n .activated {\n color: ", "\n }\n"])), function (_ref7) {
|
|
99
101
|
var _theme$colors5;
|
|
100
102
|
var theme = _ref7.theme;
|
|
101
103
|
return theme === null || theme === void 0 || (_theme$colors5 = theme.colors) === null || _theme$colors5 === void 0 ? void 0 : _theme$colors5.darkTextColor;
|
|
102
104
|
});
|
|
103
|
-
var PhoneAutocompleteContainer = exports.PhoneAutocompleteContainer = _styledComponents.default.div(
|
|
104
|
-
var ContinueButton = exports.ContinueButton = _styledComponents.default.span(
|
|
105
|
-
var NotFoundUser = exports.NotFoundUser = _styledComponents.default.div(
|
|
106
|
-
var OptionContainer = exports.OptionContainer = _styledComponents.default.div(
|
|
105
|
+
var PhoneAutocompleteContainer = exports.PhoneAutocompleteContainer = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n position: relative;\n h2 {\n font-size: 20px;\n margin-bottom: 20px;\n }\n"])));
|
|
106
|
+
var ContinueButton = exports.ContinueButton = _styledComponents.default.span(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n position: absolute;\n right: 35px;\n bottom: 5px;\n width:\n button {\n cursor: pointer;\n }\n"])));
|
|
107
|
+
var NotFoundUser = exports.NotFoundUser = _styledComponents.default.div(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n margin: 70px 0px;\n text-align: center;\n"])));
|
|
108
|
+
var OptionContainer = exports.OptionContainer = _styledComponents.default.div(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n display: flex;\n img {\n position: absolute;\n right: 10px;\n transform: translateY(55%);\n }\n"])));
|
|
@@ -246,7 +246,9 @@ var BusinessPreorderUI = function BusinessPreorderUI(props) {
|
|
|
246
246
|
cateringPreorder: cateringPreorder
|
|
247
247
|
}, /*#__PURE__*/_react.default.createElement("span", null, cateringPreorder && /*#__PURE__*/_react.default.createElement(_styles.CheckIcon, null, timeSelected === time.value ? /*#__PURE__*/_react.default.createElement(_styles.CheckedIcon, {
|
|
248
248
|
cateringPreorder: cateringPreorder
|
|
249
|
-
}) : /*#__PURE__*/_react.default.createElement(_CgRadioCheck.default, null)), /*#__PURE__*/_react.default.createElement("p",
|
|
249
|
+
}) : /*#__PURE__*/_react.default.createElement(_CgRadioCheck.default, null)), /*#__PURE__*/_react.default.createElement("p", {
|
|
250
|
+
id: "time"
|
|
251
|
+
}, time.text, " ", cateringPreorder && "- ".concat(time.endText))));
|
|
250
252
|
})) : /*#__PURE__*/_react.default.createElement(_styles.ClosedBusinessMsg, null, !isProfessional ? t('ERROR_ADD_PRODUCT_BUSINESS_CLOSED', 'The business is closed at the moment') : t('PROFESSIONAL_NOT_AVAILABLE', 'Professional is not available at the moment')))), !isPreOrderSetting && !isProfessional && /*#__PURE__*/_react.default.createElement(_styles.ClosedBusinessMsg, null, t('ERROR_ADD_PRODUCT_BUSINESS_CLOSED', 'The business is closed at the moment')), showButton && /*#__PURE__*/_react.default.createElement(_styles.ButtonWrapper, null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
251
253
|
color: "primary",
|
|
252
254
|
onClick: goToBusinessPage,
|
|
@@ -43,14 +43,14 @@ var ButtonWrapper = exports.ButtonWrapper = _styledComponents.default.div(_templ
|
|
|
43
43
|
return props.theme.rtl && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n left: 15px;\n right: initial;\n "])));
|
|
44
44
|
});
|
|
45
45
|
var TimeListWrapper = exports.TimeListWrapper = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _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"])));
|
|
46
|
-
var TimeItem = exports.TimeItem = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n cursor: pointer;\n display: flex;\n span {\n font-size: 14px;\n white-space: nowrap;\n }\n ", "\n", "\n ", "\n"])), function (_ref) {
|
|
46
|
+
var TimeItem = exports.TimeItem = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n cursor: pointer;\n display: flex;\n span {\n font-size: 14px;\n white-space: nowrap;\n\n p#time {\n margin: auto;\n padding: 10px;\n }\n }\n ", "\n", "\n ", "\n"])), function (_ref) {
|
|
47
47
|
var active = _ref.active;
|
|
48
48
|
return active && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n background: #F5F9FF;\n color: ", ";\n "])), function (props) {
|
|
49
49
|
return props.theme.colors.primary;
|
|
50
50
|
});
|
|
51
51
|
}, function (_ref2) {
|
|
52
52
|
var cateringPreorder = _ref2.cateringPreorder;
|
|
53
|
-
return cateringPreorder ? (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n background: ", ";\n width: 100%;\n min-width: 100%;\n height: 50px;\n
|
|
53
|
+
return cateringPreorder ? (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n background: ", ";\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 (props) {
|
|
54
54
|
var _props$theme;
|
|
55
55
|
return (_props$theme = props.theme) === null || _props$theme === void 0 || (_props$theme = _props$theme.colors) === null || _props$theme === void 0 ? void 0 : _props$theme.backgroundPage;
|
|
56
56
|
}, function (_ref3) {
|
|
@@ -58,7 +58,7 @@ var TimeItem = exports.TimeItem = _styledComponents.default.div(_templateObject1
|
|
|
58
58
|
return active && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n background: #F5F9FF;\n color: ", ";\n span {\n p{\n bottom: 0;\n margin-left: 2px;\n }\n }\n "])), function (props) {
|
|
59
59
|
return props.theme.colors.primary;
|
|
60
60
|
});
|
|
61
|
-
}) : (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _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
|
|
61
|
+
}) : (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _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 (_ref4) {
|
|
62
62
|
var isAppoint = _ref4.isAppoint;
|
|
63
63
|
return isAppoint && (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n width: calc(33.33% - 24px);\n min-width: calc(33.33% - 24px);\n span {\n font-size: 12px;\n }\n "])));
|
|
64
64
|
});
|
|
@@ -599,7 +599,7 @@ var CartUI = function CartUI(props) {
|
|
|
599
599
|
cateringPreorder: true,
|
|
600
600
|
isCart: true,
|
|
601
601
|
business: cart === null || cart === void 0 ? void 0 : cart.business
|
|
602
|
-
}, cateringValues))), (onClickCheckout || isForceOpenCart) && !isCheckout && (cart === null || cart === void 0 ? void 0 : cart.valid) && (!isMultiCheckout || isStore || !(cart !== null && cart !== void 0 && cart.business_id)) && /*#__PURE__*/_react.default.createElement(_styles.CheckoutAction, null, /*#__PURE__*/_react.default.createElement("p", null, (cart === null || cart === void 0 ? void 0 : cart.total) >= 1 && parsePrice(cart === null || cart === void 0 ? void 0 : cart.total)), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
602
|
+
}, cateringValues))), !(cart !== null && cart !== void 0 && cart.valid_address) && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && !isCheckout && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('INVALID_CART_ADDRESS', 'Selected address is invalid, please select a closer address.')), (onClickCheckout || isForceOpenCart) && !isCheckout && (cart === null || cart === void 0 ? void 0 : cart.valid) && (!isMultiCheckout || isStore || !(cart !== null && cart !== void 0 && cart.business_id)) && /*#__PURE__*/_react.default.createElement(_styles.CheckoutAction, null, /*#__PURE__*/_react.default.createElement("p", null, (cart === null || cart === void 0 ? void 0 : cart.total) >= 1 && parsePrice(cart === null || cart === void 0 ? void 0 : cart.total)), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
603
603
|
color: !(cart !== null && cart !== void 0 && cart.valid_maximum) || subtotalWithTaxes < (cart === null || cart === void 0 ? void 0 : cart.minimum) || !(cart !== null && cart !== void 0 && cart.valid_address) ? 'secundary' : 'primary',
|
|
604
604
|
onClick: function onClick() {
|
|
605
605
|
return checkOutBtnClick(cart === null || cart === void 0 ? void 0 : cart.uuid);
|
|
@@ -4,10 +4,10 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.SpotSelect = exports.SpinnerCart = exports.Spinner = exports.SavedContainer = exports.OrderBill = exports.NoValidProductMessage = exports.IconContainer = exports.Exclamation = exports.DriverTipContainer = exports.Divider = exports.CouponContainer = exports.CommentContainer = exports.CheckoutAction = exports.CartSticky = exports.CartContainer = void 0;
|
|
7
|
+
exports.WarningText = exports.SpotSelect = exports.SpinnerCart = exports.Spinner = exports.SavedContainer = exports.OrderBill = exports.NoValidProductMessage = exports.IconContainer = exports.Exclamation = exports.DriverTipContainer = exports.Divider = exports.CouponContainer = exports.CommentContainer = exports.CheckoutAction = exports.CartSticky = exports.CartContainer = 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;
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22;
|
|
11
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
12
12
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
13
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
@@ -62,4 +62,7 @@ var DriverTipContainer = exports.DriverTipContainer = _styledComponents.default.
|
|
|
62
62
|
var SpinnerCart = exports.SpinnerCart = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n position: absolute;\n right: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n ", "\n"])), function (_ref4) {
|
|
63
63
|
var emptyCart = _ref4.emptyCart;
|
|
64
64
|
return emptyCart && (0, _styledComponents.css)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n top: 0;\n "])));
|
|
65
|
+
});
|
|
66
|
+
var WarningText = exports.WarningText = _styledComponents.default.p(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n margin: 10px auto;\n text-align: center;\n color: ", ";\n"])), function (props) {
|
|
67
|
+
return props.theme.colors.primary;
|
|
65
68
|
});
|
|
@@ -182,7 +182,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
182
182
|
setProductLoading = _useState26[1];
|
|
183
183
|
var shouldActivateOrderDetailModal = ordering === null || ordering === void 0 || (_ordering$project = ordering.project) === null || _ordering$project === void 0 ? void 0 : _ordering$project.includes('alsea');
|
|
184
184
|
var cardsMethods = ['stripe', 'credomatic'];
|
|
185
|
-
var stripePaymethods = ['stripe', '
|
|
185
|
+
var stripePaymethods = ['stripe', 'stripe_connect', 'stripe_redirect'];
|
|
186
186
|
var businessConfigs = (_businessDetails$busi = businessDetails === null || businessDetails === void 0 || (_businessDetails$busi2 = businessDetails.business) === null || _businessDetails$busi2 === void 0 ? void 0 : _businessDetails$busi2.configs) !== null && _businessDetails$busi !== void 0 ? _businessDetails$busi : [];
|
|
187
187
|
var isTableNumberEnabled = configs === null || configs === void 0 || (_configs$table_numer_ = configs.table_numer_enabled) === null || _configs$table_numer_ === void 0 ? void 0 : _configs$table_numer_.value;
|
|
188
188
|
var isWalletCashEnabled = ((_businessConfigs$find = businessConfigs.find(function (config) {
|
|
@@ -4,9 +4,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.WrapperUserDetails = exports.WrapperRightContainer = exports.WrapperPlaceOrderButton = exports.WrapperLeftContent = exports.WrapperLeftContainer = exports.WrapperActionsInput = exports.WarningText = exports.WarningMessage = exports.WalletPaymentOptionContainer = exports.UserDetailsContainer = exports.SelectSpotContainer = exports.SectionTitleContainer = exports.PaymentMethodContainer = exports.OrderDetailContainer = exports.OrderContextUIWrapper = exports.NotFoundImage = exports.MobileWrapperPlaceOrderButton = exports.HeaderContent = exports.Flag = exports.DriverTipDivider = exports.DriverTipContainer = exports.DeliveryOptionsContainer = exports.Container = exports.CheckOutDivider = exports.CartsList = exports.CartHeader = exports.CartContainer = exports.BusinessDetailsContainer = exports.AuthButtonList = void 0;
|
|
7
|
+
exports.WrapperUserDetails = exports.WrapperRightContainer = exports.WrapperPlaceOrderButton = exports.WrapperLeftContent = exports.WrapperLeftContainer = exports.WrapperActionsInput = exports.WarningText = exports.WarningMessage = exports.WalletPaymentOptionContainer = exports.UserDetailsContainer = exports.SpinnerContainer = exports.SelectSpotContainer = exports.SectionTitleContainer = exports.PaymentMethodContainer = exports.OrderDetailContainer = exports.OrderContextUIWrapper = exports.NotFoundImage = exports.MobileWrapperPlaceOrderButton = exports.HeaderContent = exports.Flag = exports.DriverTipDivider = exports.DriverTipContainer = exports.DeliveryOptionsContainer = exports.Container = exports.CheckOutDivider = exports.CartsList = exports.CartHeader = exports.CartContainer = exports.BusinessDetailsContainer = exports.AuthButtonList = 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, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31;
|
|
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;
|
|
10
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
11
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
@@ -22,7 +22,7 @@ var PaymentMethodContainer = exports.PaymentMethodContainer = _styledComponents.
|
|
|
22
22
|
return props.theme.colors.darkTextColor;
|
|
23
23
|
});
|
|
24
24
|
var DriverTipContainer = exports.DriverTipContainer = (0, _styledComponents.default)(PaymentMethodContainer)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n > p {\n margin: 0;\n font-size: 16px;\n color: #909BA9;\n }\n"])));
|
|
25
|
-
var CartContainer = exports.CartContainer = (0, _styledComponents.default)(PaymentMethodContainer)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin-bottom: 20px;\n"])));
|
|
25
|
+
var CartContainer = exports.CartContainer = (0, _styledComponents.default)(PaymentMethodContainer)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin-bottom: 20px;\n position: relative;\n"])));
|
|
26
26
|
var WalletPaymentOptionContainer = exports.WalletPaymentOptionContainer = (0, _styledComponents.default)(PaymentMethodContainer)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n padding-top: 20px;\n"])));
|
|
27
27
|
var WrapperPlaceOrderButton = exports.WrapperPlaceOrderButton = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n justify-content: center;\n\n button {\n width: 100%;\n padding: 5px 20px;\n cursor: pointer;\n border-radius: 7.6px;\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n }\n"])));
|
|
28
28
|
var WarningMessage = exports.WarningMessage = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n width: 100%;\n height: fit-content;\n max-height: fit-content;\n min-height: 150px;\n background-color: #F2BB40;\n display: flex;\n justify-content: center;\n align-items: center;\n opacity: 0.8;\n border-radius: 10px;\n position: relative;\n\n svg {\n position: absolute;\n font-size: 30px;\n top: 0;\n left: 0;\n margin: 11px;\n ", "\n }\n\n h1 {\n font-size: 20px;\n margin: 0px 60px;\n text-align: center;\n }\n"])), function (props) {
|
|
@@ -54,4 +54,5 @@ var HeaderContent = exports.HeaderContent = _styledComponents.default.div(_templ
|
|
|
54
54
|
var AuthButtonList = exports.AuthButtonList = _styledComponents.default.div(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n h2 {\n font-weight: 600;\n font-size: 20px;\n margin-bottom: 3px;\n }\n button {\n width: 100%;\n height: 44px;\n margin-top: 22px;\n }\n"])));
|
|
55
55
|
var Flag = exports.Flag = _styledComponents.default.span(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n font-size: 13px;\n margin: 0px;\n text-transform: capitalize;\n color: #E63757;\n font-weight: 500;\n\n @media (min-width: 381px) {\n font-size: 14px;\n }\n"])));
|
|
56
56
|
var SectionTitleContainer = exports.SectionTitleContainer = _styledComponents.default.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n"])));
|
|
57
|
-
var OrderDetailContainer = exports.OrderDetailContainer = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 10px 30px 20px;\n"])));
|
|
57
|
+
var OrderDetailContainer = exports.OrderDetailContainer = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 10px 30px 20px;\n"])));
|
|
58
|
+
var SpinnerContainer = exports.SpinnerContainer = _styledComponents.default.div(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n position: absolute;\n width: 100%;\n left: 0;\n top: -100%;\n"])));
|