ordering-ui-external 14.1.7 → 14.1.9
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.d53641b81f759911f36f.js → 7.ordering-ui.8deae335e250e653c308.js} +1 -1
- package/_bundles/ordering-ui.8deae335e250e653c308.js +2 -0
- package/_modules/components/BusinessesMap/index.js +14 -5
- package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +32 -11
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/styles.js +7 -6
- package/_modules/themes/callcenterOriginal/src/components/AddressList/index.js +12 -5
- package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +7 -6
- package/_modules/themes/callcenterOriginal/src/components/InputPhoneNumber/styles.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +10 -11
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +3 -4
- package/_modules/themes/callcenterOriginal/src/components/SignUpForm/index.js +3 -3
- package/_modules/themes/callcenterOriginal/src/components/UserDetails/index.js +12 -6
- package/_modules/themes/callcenterOriginal/src/components/UserDetails/styles.js +6 -3
- package/_modules/themes/callcenterOriginal/src/styles/Buttons/index.js +5 -6
- package/_modules/themes/five/src/components/AddressDetails/styles.js +2 -2
- package/_modules/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +5 -3
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +14 -2
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +2 -8
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/OrdersSection/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +2 -2
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
- 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 +2 -2
- package/_modules/themes/five/src/components/Checkout/styles.js +5 -4
- package/_modules/themes/five/src/components/OrderDetails/index.js +12 -5
- package/_modules/themes/five/src/components/OrdersOption/styles.js +1 -1
- package/_modules/themes/five/src/components/ProductOptionSubOption/index.js +6 -5
- package/_modules/themes/five/src/components/SingleOrderCard/styles.js +1 -1
- package/_modules/themes/five/src/components/UserDetails/index.js +7 -7
- package/_modules/themes/five/src/components/UserDetails/styles.js +8 -7
- package/_modules/themes/five/src/components/UserFormDetails/index.js +5 -5
- package/package.json +2 -2
- package/src/components/BusinessesMap/index.js +11 -5
- package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +1 -1
- package/src/themes/callcenterOriginal/src/components/AddressForm/index.js +49 -16
- package/src/themes/callcenterOriginal/src/components/AddressForm/styles.js +10 -8
- package/src/themes/callcenterOriginal/src/components/AddressList/index.js +9 -3
- package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +6 -6
- package/src/themes/callcenterOriginal/src/components/InputPhoneNumber/styles.js +1 -1
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +6 -8
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +1 -1
- package/src/themes/callcenterOriginal/src/components/SignUpForm/index.js +3 -3
- package/src/themes/callcenterOriginal/src/components/UserDetails/index.js +5 -5
- package/src/themes/callcenterOriginal/src/components/UserDetails/styles.js +3 -1
- package/src/themes/callcenterOriginal/src/styles/Buttons/index.js +3 -3
- package/src/themes/five/src/components/AddressDetails/styles.js +2 -4
- package/src/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +3 -2
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +17 -6
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +6 -1
- package/src/themes/five/src/components/BusinessProductsListing/index.js +2 -9
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/OrdersSection/index.js +1 -1
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +2 -2
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
- 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 +20 -20
- 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/OrderDetails/index.js +38 -3
- package/src/themes/five/src/components/OrdersOption/styles.js +1 -1
- package/src/themes/five/src/components/ProductOptionSubOption/index.js +2 -1
- package/src/themes/five/src/components/SingleOrderCard/styles.js +1 -1
- package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +1 -1
- package/src/themes/five/src/components/UserDetails/index.js +8 -8
- package/src/themes/five/src/components/UserDetails/styles.js +16 -9
- package/src/themes/five/src/components/UserFormDetails/index.js +2 -4
- package/_bundles/ordering-ui.d53641b81f759911f36f.js +0 -2
- /package/_bundles/{0.ordering-ui.d53641b81f759911f36f.js → 0.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{1.ordering-ui.d53641b81f759911f36f.js → 1.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{2.ordering-ui.d53641b81f759911f36f.js → 2.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{4.ordering-ui.d53641b81f759911f36f.js → 4.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{5.ordering-ui.d53641b81f759911f36f.js → 5.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{6.ordering-ui.d53641b81f759911f36f.js → 6.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{7.ordering-ui.d53641b81f759911f36f.js.LICENSE.txt → 7.ordering-ui.8deae335e250e653c308.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.d53641b81f759911f36f.js → 8.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{9.ordering-ui.d53641b81f759911f36f.js → 9.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{ordering-ui.d53641b81f759911f36f.js.LICENSE.txt → ordering-ui.8deae335e250e653c308.js.LICENSE.txt} +0 -0
|
@@ -8,6 +8,7 @@ exports.BusinessesMap = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
10
10
|
var _styles = require("./styles");
|
|
11
|
+
var _styledComponents = require("styled-components");
|
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
14
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -22,19 +23,21 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
22
23
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
23
24
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
24
25
|
var BusinessesMapUI = function BusinessesMapUI(props) {
|
|
25
|
-
var _props$beforeElements, _props$beforeComponen, _configState$configs, _configState$configs2, _props$afterComponent, _props$afterElements;
|
|
26
|
+
var _props$beforeElements, _props$beforeComponen, _configState$configs, _configState$configs2, _theme$images, _props$afterComponent, _props$afterElements;
|
|
26
27
|
var userLocation = props.userLocation,
|
|
27
28
|
businessLocations = props.businessLocations,
|
|
28
29
|
onBusinessClick = props.onBusinessClick,
|
|
29
|
-
setErrors = props.setErrors
|
|
30
|
+
setErrors = props.setErrors,
|
|
31
|
+
businessList = props.businessList;
|
|
30
32
|
var _useConfig = (0, _orderingComponentsExternal.useConfig)(),
|
|
31
33
|
_useConfig2 = _slicedToArray(_useConfig, 1),
|
|
32
34
|
configState = _useConfig2[0];
|
|
33
35
|
var _useOrder = (0, _orderingComponentsExternal.useOrder)(),
|
|
34
36
|
_useOrder2 = _slicedToArray(_useOrder, 1),
|
|
35
37
|
orderState = _useOrder2[0];
|
|
38
|
+
var theme = (0, _styledComponents.useTheme)();
|
|
36
39
|
var googleMapsControls = {
|
|
37
|
-
defaultZoom:
|
|
40
|
+
defaultZoom: 18,
|
|
38
41
|
zoomControl: true,
|
|
39
42
|
streetViewControl: false,
|
|
40
43
|
fullscreenControl: false,
|
|
@@ -44,7 +47,7 @@ var BusinessesMapUI = function BusinessesMapUI(props) {
|
|
|
44
47
|
mapTypeControlOptions: {
|
|
45
48
|
mapTypeIds: ['roadmap', 'satellite']
|
|
46
49
|
},
|
|
47
|
-
isMarkerDraggable:
|
|
50
|
+
isMarkerDraggable: false
|
|
48
51
|
};
|
|
49
52
|
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) {
|
|
50
53
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
@@ -57,13 +60,19 @@ var BusinessesMapUI = function BusinessesMapUI(props) {
|
|
|
57
60
|
}), /*#__PURE__*/_react.default.createElement(_styles.WrapperMap, {
|
|
58
61
|
disabled: orderState.loading
|
|
59
62
|
}, /*#__PURE__*/_react.default.createElement(_orderingComponentsExternal.GoogleMapsMap, {
|
|
63
|
+
useMapWithBusinessZones: true,
|
|
64
|
+
deactiveAlerts: true,
|
|
65
|
+
businessMap: true,
|
|
60
66
|
apiKey: configState === null || configState === void 0 || (_configState$configs = configState.configs) === null || _configState$configs === void 0 || (_configState$configs = _configState$configs.google_maps_api_key) === null || _configState$configs === void 0 ? void 0 : _configState$configs.value,
|
|
61
67
|
location: userLocation,
|
|
62
68
|
locations: businessLocations,
|
|
63
69
|
mapControls: googleMapsControls,
|
|
64
70
|
maxLimitLocation: parseInt(configState === null || configState === void 0 || (_configState$configs2 = configState.configs) === null || _configState$configs2 === void 0 || (_configState$configs2 = _configState$configs2.meters_to_change_address) === null || _configState$configs2 === void 0 ? void 0 : _configState$configs2.value),
|
|
65
|
-
businessMap: true,
|
|
66
71
|
onBusinessClick: onBusinessClick,
|
|
72
|
+
businessZones: businessList === null || businessList === void 0 ? void 0 : businessList.map(function (business) {
|
|
73
|
+
return business === null || business === void 0 ? void 0 : business.zones;
|
|
74
|
+
}),
|
|
75
|
+
fallbackIcon: (_theme$images = theme.images) === null || _theme$images === void 0 || (_theme$images = _theme$images.dummies) === null || _theme$images === void 0 ? void 0 : _theme$images.businessLogo,
|
|
67
76
|
setErrors: setErrors
|
|
68
77
|
})), (_props$afterComponent = props.afterComponents) === null || _props$afterComponent === void 0 ? void 0 : _props$afterComponent.map(function (AfterComponent, i) {
|
|
69
78
|
return /*#__PURE__*/_react.default.createElement(AfterComponent, _extends({
|
|
@@ -114,7 +114,7 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
|
114
114
|
onClick: function onClick() {
|
|
115
115
|
return setOrderSelected(order);
|
|
116
116
|
}
|
|
117
|
-
}, order !== null && order !== void 0 && order.review ? t('REVIEWED', 'Reviewed') : t('REVIEW', 'Review')), !hideReorderButton && typeof (order === null || order === void 0 ? void 0 : order.id) === 'number' && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
117
|
+
}, !!(order !== null && order !== void 0 && order.review) ? t('REVIEWED', 'Reviewed') : t('REVIEW', 'Review')), !hideReorderButton && typeof (order === null || order === void 0 ? void 0 : order.id) === 'number' && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
118
118
|
color: "primary",
|
|
119
119
|
className: "reorder",
|
|
120
120
|
outline: true,
|
|
@@ -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,12 +499,28 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
495
499
|
onError: setMapErrors,
|
|
496
500
|
IconButton: _reactBootstrapIcons.GeoAlt,
|
|
497
501
|
IconLoadingButton: _CgSearchLoading.default
|
|
498
|
-
})),
|
|
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, {
|
|
499
503
|
isEnableContinueButton: isEnableContinueButton,
|
|
500
|
-
notUseCustomerInfo: notUseCustomerInfo
|
|
501
|
-
|
|
504
|
+
notUseCustomerInfo: notUseCustomerInfo,
|
|
505
|
+
addFormRestrictions: addFormRestrictions
|
|
506
|
+
}, /*#__PURE__*/_react.default.createElement("section", null, !showMap && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.GeoAlt, {
|
|
507
|
+
style: {
|
|
508
|
+
fontSize: 25,
|
|
509
|
+
marginRight: 5
|
|
510
|
+
}
|
|
511
|
+
}), ((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", {
|
|
512
|
+
style: {
|
|
513
|
+
textDecoration: 'underline',
|
|
514
|
+
color: 'blue',
|
|
515
|
+
cursor: 'pointer'
|
|
516
|
+
},
|
|
517
|
+
onClick: function onClick() {
|
|
518
|
+
return setShowMap(!showMap);
|
|
519
|
+
}
|
|
520
|
+
}, showMap ? t('HIDE_MAP', 'Hide Map') : t('SHOW_MAP', 'Show Map'))), locationChange && showMap && /*#__PURE__*/_react.default.createElement(_orderingComponentsExternal.GoogleMapsMap, {
|
|
502
521
|
useMapWithBusinessZones: true,
|
|
503
522
|
deactiveAlerts: true,
|
|
523
|
+
avoidFitBounds: true,
|
|
504
524
|
apiKey: googleMapsApiKey,
|
|
505
525
|
location: locationChange,
|
|
506
526
|
locations: businessesList === null || businessesList === void 0 ? void 0 : businessesList.businesses,
|
|
@@ -518,7 +538,7 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
518
538
|
}, field.name !== 'address_notes' ? /*#__PURE__*/_react.default.createElement(_Inputs.Input, {
|
|
519
539
|
className: field.name,
|
|
520
540
|
placeholder: t(field.name.toUpperCase(), field.code),
|
|
521
|
-
value: (_ref9 = (_formState$changes$fi2 = (_formState$
|
|
541
|
+
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 : '',
|
|
522
542
|
onChange: function onChange(e) {
|
|
523
543
|
formMethods.setValue(field.name, e.target.value);
|
|
524
544
|
handleChangeInput({
|
|
@@ -533,7 +553,7 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
533
553
|
}) : /*#__PURE__*/_react.default.createElement(_Inputs.TextArea, {
|
|
534
554
|
rows: 4,
|
|
535
555
|
placeholder: t('ADDRESS_NOTES', 'Address Notes'),
|
|
536
|
-
value: (_ref10 = (_formState$changes$ad6 = (_formState$
|
|
556
|
+
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 : '',
|
|
537
557
|
onChange: function onChange(e) {
|
|
538
558
|
formMethods.setValue('address_notes', e.target.value);
|
|
539
559
|
handleChangeInput({
|
|
@@ -592,7 +612,8 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
592
612
|
disabled: formState.loading,
|
|
593
613
|
onClick: function onClick() {
|
|
594
614
|
return onCancel();
|
|
595
|
-
}
|
|
615
|
+
},
|
|
616
|
+
hoverColor: "#CCC"
|
|
596
617
|
}, t('CANCEL', 'Cancel')), Object.keys(formState === null || formState === void 0 ? void 0 : formState.changes).length > 0 && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
597
618
|
id: "submit-btn",
|
|
598
619
|
type: "submit",
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.WrapperSkeleton = exports.WrapperMap = exports.WrapAddressInput = exports.FormControl = exports.FormActions = exports.AddressWrap = exports.AddressTagSection = exports.AddressMarkContainer = 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
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
|
|
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) } })); }
|
|
@@ -38,10 +38,11 @@ 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 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) {
|
|
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
42
|
var isEnableContinueButton = _ref.isEnableContinueButton,
|
|
43
|
-
notUseCustomerInfo = _ref.notUseCustomerInfo
|
|
44
|
-
|
|
43
|
+
notUseCustomerInfo = _ref.notUseCustomerInfo,
|
|
44
|
+
addFormRestrictions = _ref.addFormRestrictions;
|
|
45
|
+
return isEnableContinueButton ? addFormRestrictions ? '460px' : '425px' : notUseCustomerInfo ? '370px' : '480px';
|
|
45
46
|
});
|
|
46
|
-
var WrapperSkeleton = exports.WrapperSkeleton = _styledComponents.default.div(
|
|
47
|
-
var AddressMarkContainer = exports.AddressMarkContainer = _styledComponents.default.div(
|
|
47
|
+
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
|
+
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"])));
|
|
@@ -201,11 +201,15 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
201
201
|
}, [isOpenUserData]);
|
|
202
202
|
(0, _react.useEffect)(function () {
|
|
203
203
|
var _addressList$addresse2;
|
|
204
|
-
|
|
204
|
+
var addressValidation = ((_addressList$addresse2 = addressList.addresses) === null || _addressList$addresse2 === void 0 ? void 0 : _addressList$addresse2.length) === 0 && !(addressList !== null && addressList !== void 0 && addressList.loading) && !(addressList !== null && addressList !== void 0 && addressList.error);
|
|
205
|
+
if (userCustomerSetup !== null && userCustomerSetup !== void 0 && userCustomerSetup.imported_address_text && addressValidation) {
|
|
205
206
|
openAddress({
|
|
206
207
|
address: userCustomerSetup === null || userCustomerSetup === void 0 ? void 0 : userCustomerSetup.imported_address_text
|
|
207
208
|
});
|
|
208
209
|
}
|
|
210
|
+
if (!(userCustomerSetup !== null && userCustomerSetup !== void 0 && userCustomerSetup.imported_address_text) && addressValidation) {
|
|
211
|
+
openAddress({});
|
|
212
|
+
}
|
|
209
213
|
}, [userCustomerSetup === null || userCustomerSetup === void 0 ? void 0 : userCustomerSetup.imported_address_text, addressList.addresses, addressList === null || addressList === void 0 ? void 0 : addressList.loading, addressList === null || addressList === void 0 ? void 0 : addressList.error]);
|
|
210
214
|
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) {
|
|
211
215
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
@@ -225,14 +229,15 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
225
229
|
isEnableContinueButton: isEnableContinueButton,
|
|
226
230
|
notUseCustomerInfo: notUseCustomerInfo,
|
|
227
231
|
addFormRestrictions: addFormRestrictions
|
|
228
|
-
}, !addFormRestrictions &&
|
|
232
|
+
}, !addFormRestrictions && !addressOpen && !isOpenUserData && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
229
233
|
className: "add",
|
|
230
234
|
outline: true,
|
|
231
235
|
color: isEnableContinueButton && (addressList === null || addressList === void 0 || (_addressList$addresse3 = addressList.addresses) === null || _addressList$addresse3 === void 0 ? void 0 : _addressList$addresse3.length) > 0 ? 'secondary' : 'primary',
|
|
232
236
|
onClick: function onClick() {
|
|
233
237
|
return openAddress({});
|
|
234
238
|
},
|
|
235
|
-
disabled: (orderState === null || orderState === void 0 ? void 0 : orderState.loading) || actionStatus.loading
|
|
239
|
+
disabled: (orderState === null || orderState === void 0 ? void 0 : orderState.loading) || actionStatus.loading,
|
|
240
|
+
hoverColor: "#CCC"
|
|
236
241
|
}, orderState !== null && orderState !== void 0 && orderState.loading || actionStatus.loading ? t('LOADING', 'Loading') : t('ADD_NEW_ADDRESS', 'Add New Address')), isPopover && addressOpen && /*#__PURE__*/_react.default.createElement(_AddressForm.AddressForm, {
|
|
237
242
|
userId: userId,
|
|
238
243
|
addressesList: addressList === null || addressList === void 0 ? void 0 : addressList.addresses,
|
|
@@ -310,7 +315,8 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
310
315
|
addFormRestrictions: addFormRestrictions
|
|
311
316
|
}))), addressOpen && !notUseCustomerInfo && /*#__PURE__*/_react.default.createElement(_styles.AddressFormContainer, {
|
|
312
317
|
width: "50%",
|
|
313
|
-
isEnableContinueButton: isEnableContinueButton
|
|
318
|
+
isEnableContinueButton: isEnableContinueButton,
|
|
319
|
+
addFormRestrictions: addFormRestrictions
|
|
314
320
|
}, /*#__PURE__*/_react.default.createElement(_styles.TitleFormContainer, null, !addFormRestrictions && /*#__PURE__*/_react.default.createElement(_styles.CloseIcon, null, /*#__PURE__*/_react.default.createElement(_MdClose.default, {
|
|
315
321
|
onClick: function onClick() {
|
|
316
322
|
return handleCloseAddressForm();
|
|
@@ -327,7 +333,8 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
327
333
|
disabled: addressList.loading || actionStatus.loading || orderState.loading,
|
|
328
334
|
onClick: function onClick() {
|
|
329
335
|
return onCancel();
|
|
330
|
-
}
|
|
336
|
+
},
|
|
337
|
+
hoverColor: "#CCC"
|
|
331
338
|
}, t('CANCEL', 'Cancel')), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
332
339
|
disabled: addressList.loading || actionStatus.loading || orderState.loading,
|
|
333
340
|
id: "second-btn",
|
|
@@ -30,7 +30,7 @@ var AddressItem = exports.AddressItem = _styledComponents.default.li(_templateOb
|
|
|
30
30
|
}, function (props) {
|
|
31
31
|
return props.theme.colors.lightGray;
|
|
32
32
|
});
|
|
33
|
-
var AddressItemActions = exports.AddressItemActions = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n a {\n display: flex;\n cursor: pointer;\n margin: 0px 5px;\n font-size: 20px;\n\n svg {\n color: #B1BCCC;\n }\n }\n a.disabled {\n svg {\n color: #CCC;\n }\n pointer-events: none;\n }\n"])));
|
|
33
|
+
var AddressItemActions = exports.AddressItemActions = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n a {\n display: flex;\n cursor: pointer;\n margin: 0px 5px;\n font-size: 20px;\n \n svg {\n color: #B1BCCC;\n }\n }\n a.disabled {\n svg {\n color: #CCC;\n }\n pointer-events: none;\n }\n"])));
|
|
34
34
|
var WrappNotAddresses = exports.WrappNotAddresses = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n height: 270px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 80%;\n margin: 20px auto 10px;\n\n img {\n width: 200px;\n height: auto;\n aspect-ratio: attr(width) / attr(height)\n }\n h1 {\n margin: 5px 0px 0px;\n opacity: 0.5;\n text-align: center;\n font-size: 24px;\n }\n"])));
|
|
35
35
|
var FormActions = exports.FormActions = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n padding: 10px 0px;\n display: flex;\n justify-content: space-between;\n width: 100%;\n button {\n height: 45px;\n flex: 1;\n\n &:last-child#second-btn {\n margin-left: 10px;\n ", "\n }\n }\n\n @media (min-width: 769px) {\n button {\n &:last-child#second-btn {\n margin-left: 25px;\n ", "\n }\n }\n }\n"])), function (props) {
|
|
36
36
|
var _props$theme3;
|
|
@@ -39,13 +39,13 @@ var FormActions = exports.FormActions = _styledComponents.default.div(_templateO
|
|
|
39
39
|
var _props$theme4;
|
|
40
40
|
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-left: 0;\n margin-right: 25px;\n "])));
|
|
41
41
|
});
|
|
42
|
-
var ContinueButton = exports.ContinueButton = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n width: 100%;\n position: sticky;\n bottom: 1px;\n\n button {\n width: 100%;\n white-space: nowrap;\n height: 50px;\n }\n"])));
|
|
42
|
+
var ContinueButton = exports.ContinueButton = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n width: 100%;\n position: sticky;\n bottom: 1px;\n \n button {\n width: 100%;\n white-space: nowrap;\n height: 50px;\n }\n"])));
|
|
43
43
|
var AddressTitle = exports.AddressTitle = _styledComponents.default.span(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n font-size: 16px;\n margin-bottom: 25px;\n text-align: left;\n ", "\n"])), function (props) {
|
|
44
44
|
var _props$theme5;
|
|
45
45
|
return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n text-align: right;\n "])));
|
|
46
46
|
});
|
|
47
47
|
var AddressHalfContainer = exports.AddressHalfContainer = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n"])));
|
|
48
|
-
var List = exports.List = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n width: ", ";\n padding-right: 10px;\n ", "\n ", "\n button {\n width: 100%;\n }\n"])), function (_ref2) {
|
|
48
|
+
var List = exports.List = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n width: ", ";\n padding-right: 10px;\n ", " \n ", "\n button {\n width: 100%;\n }\n"])), function (_ref2) {
|
|
49
49
|
var halfWidth = _ref2.halfWidth;
|
|
50
50
|
return halfWidth ? '50%' : '100%';
|
|
51
51
|
}, function (_ref3) {
|
|
@@ -61,11 +61,12 @@ var AddressFormContainer = exports.AddressFormContainer = _styledComponents.defa
|
|
|
61
61
|
var width = _ref5.width;
|
|
62
62
|
return (0, _styledComponents.css)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n width: ", ";\n "])), width);
|
|
63
63
|
}, function (_ref6) {
|
|
64
|
-
var isEnableContinueButton = _ref6.isEnableContinueButton
|
|
65
|
-
|
|
64
|
+
var isEnableContinueButton = _ref6.isEnableContinueButton,
|
|
65
|
+
addFormRestrictions = _ref6.addFormRestrictions;
|
|
66
|
+
return isEnableContinueButton && (0, _styledComponents.css)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n position: relative;\n bottom: 164px;\n "])));
|
|
66
67
|
});
|
|
67
68
|
var CloseIcon = exports.CloseIcon = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n cursor: pointer;\n svg{\n width: 30px;\n height: 30px;\n }\n"])));
|
|
68
|
-
var TitleFormContainer = exports.TitleFormContainer = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n display: flex
|
|
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"])));
|
|
69
70
|
var AddressHoverInfo = exports.AddressHoverInfo = _styledComponents.default.span(_templateObject25 || (_templateObject25 = _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: 0px;\n left: 25px;\n opacity: 0;\n width: max-content;\n p {\n margin: 0;\n color: #664D03;\n font-size: 12px;\n }\n\n"])));
|
|
70
71
|
var AddressBookMark = exports.AddressBookMark = _styledComponents.default.div(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n span {\n opacity: 0;\n transition: opacity 0.3s, visibility 0.3s;\n\n }\n &:hover + span {\n opacity: 1;\n transition: opacity 0.3s, visibility 0.3s;\n }\n"])));
|
|
71
72
|
var AddressBookMarkContainer = exports.AddressBookMarkContainer = _styledComponents.default.div(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n position: relative;\n"])));
|
|
@@ -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
|
});
|
|
@@ -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,
|
|
@@ -89,10 +89,9 @@ var TypeButton = exports.TypeButton = _styledComponents.default.div(_templateObj
|
|
|
89
89
|
return activated && (0, _styledComponents.css)(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n color: ", ";\n "])), theme === null || theme === void 0 || (_theme$colors3 = theme.colors) === null || _theme$colors3 === void 0 ? void 0 : _theme$colors3.white);
|
|
90
90
|
});
|
|
91
91
|
var IconTypeButton = exports.IconTypeButton = _styledComponents.default.div(_templateObject27 || (_templateObject27 = _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
|
-
var _theme$colors4;
|
|
93
|
-
var
|
|
94
|
-
|
|
95
|
-
return activated ? theme === null || theme === void 0 || (_theme$colors4 = theme.colors) === null || _theme$colors4 === void 0 ? void 0 : _theme$colors4.white : '#F3F9FF';
|
|
92
|
+
var _theme$colors$danger, _theme$colors4;
|
|
93
|
+
var theme = _ref6.theme;
|
|
94
|
+
return (_theme$colors$danger = theme === null || theme === void 0 || (_theme$colors4 = theme.colors) === null || _theme$colors4 === void 0 ? void 0 : _theme$colors4.danger100) !== null && _theme$colors$danger !== void 0 ? _theme$colors$danger : '#FEEDF0';
|
|
96
95
|
});
|
|
97
96
|
var TypesContainer = exports.TypesContainer = _styledComponents.default.div(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n display: flex;\n"])));
|
|
98
97
|
var AdditionalTypesContainer = exports.AdditionalTypesContainer = _styledComponents.default.div(_templateObject29 || (_templateObject29 = _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) {
|
|
@@ -272,7 +272,7 @@ var SignUpFormUI = function SignUpFormUI(props) {
|
|
|
272
272
|
isPopup: isPopup
|
|
273
273
|
}, /*#__PURE__*/_react.default.createElement(_styles.FormSide, {
|
|
274
274
|
isPopup: isPopup
|
|
275
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.Title, null, t('
|
|
275
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.Title, null, t('CREATE_USER', 'Create new user')), /*#__PURE__*/_react.default.createElement(_styles.FormInput, {
|
|
276
276
|
noValidate: true,
|
|
277
277
|
isPopup: isPopup,
|
|
278
278
|
onSubmit: formMethods.handleSubmit(onSubmit),
|
|
@@ -371,11 +371,11 @@ var SignUpFormUI = function SignUpFormUI(props) {
|
|
|
371
371
|
color: "primary",
|
|
372
372
|
type: "submit",
|
|
373
373
|
disabled: formState.loading || (validationFields === null || validationFields === void 0 ? void 0 : validationFields.loading)
|
|
374
|
-
}, formState.loading ? "".concat(t('LOADING', 'Loading'), "...") : t('
|
|
374
|
+
}, formState.loading ? "".concat(t('LOADING', 'Loading'), "...") : t('CREATE_USER', 'Create new user')))), elementLinkToLogin && /*#__PURE__*/_react.default.createElement(_styles.RedirectLink, {
|
|
375
375
|
register: true,
|
|
376
376
|
isPopup: isPopup
|
|
377
377
|
}, /*#__PURE__*/_react.default.createElement("span", null, t('MOBILE_FRONT_ALREADY_HAVE_AN_ACCOUNT', 'Already have an account?')), elementLinkToLogin)), /*#__PURE__*/_react.default.createElement(_Confirm.Alert, {
|
|
378
|
-
title: t('
|
|
378
|
+
title: t('CREATE_USER', 'Create new user'),
|
|
379
379
|
content: alertState.content,
|
|
380
380
|
acceptText: t('ACCEPT', 'Accept'),
|
|
381
381
|
open: alertState.open,
|
|
@@ -22,6 +22,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
22
22
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
23
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
24
24
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
25
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
26
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
27
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
28
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
25
29
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
26
30
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
31
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -30,7 +34,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
30
34
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
31
35
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
32
36
|
var UserDetailsUI = function UserDetailsUI(props) {
|
|
33
|
-
var _userState$result, _formState$result, _Object$values, _validationFields$fie, _userData$country_pho, _props$beforeElements, _props$beforeComponen, _parsePhoneNumber, _userData$cellphone, _props$afterComponent, _props$afterElements;
|
|
37
|
+
var _userState$result, _formState$result, _Object$values, _validationFields$fie, _userData$country_pho, _props$beforeElements, _props$beforeComponen, _ref, _parsePhoneNumber, _userData$cellphone, _props$afterComponent, _props$afterElements;
|
|
34
38
|
var isEdit = props.isEdit,
|
|
35
39
|
formState = props.formState,
|
|
36
40
|
cleanFormState = props.cleanFormState,
|
|
@@ -77,20 +81,22 @@ var UserDetailsUI = function UserDetailsUI(props) {
|
|
|
77
81
|
return /*#__PURE__*/_react.default.createElement(BeforeComponent, _extends({
|
|
78
82
|
key: i
|
|
79
83
|
}, props));
|
|
80
|
-
}), (validationFields.loading || formState.loading || userState.loading) && /*#__PURE__*/_react.default.createElement(_styles.UserData, null, validationFieldsLength === null || validationFieldsLength === void 0 ? void 0 : validationFieldsLength.map(function (field) {
|
|
84
|
+
}), (validationFields.loading || formState.loading || userState.loading) && /*#__PURE__*/_react.default.createElement(_styles.UserData, null, (_ref = _toConsumableArray(Array(isCustomerMode ? 1 : validationFieldsLength === null || validationFieldsLength === void 0 ? void 0 : validationFieldsLength.length))) === null || _ref === void 0 ? void 0 : _ref.map(function (field) {
|
|
81
85
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
82
86
|
key: field === null || field === void 0 ? void 0 : field.id
|
|
83
87
|
}, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
84
88
|
width: 250,
|
|
85
|
-
height: 50
|
|
89
|
+
height: isCustomerMode ? 10 : 50
|
|
86
90
|
}), /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
87
91
|
width: 180,
|
|
88
|
-
height: 25
|
|
92
|
+
height: isCustomerMode ? 10 : 25
|
|
89
93
|
}), /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
90
94
|
width: 210,
|
|
91
|
-
height: 50
|
|
95
|
+
height: isCustomerMode ? 10 : 50
|
|
92
96
|
}));
|
|
93
|
-
})), !(validationFields.loading || formState.loading || userState.loading) && /*#__PURE__*/_react.default.createElement(_styles.Container,
|
|
97
|
+
})), !(validationFields.loading || formState.loading || userState.loading) && /*#__PURE__*/_react.default.createElement(_styles.Container, {
|
|
98
|
+
isEdit: isEdit
|
|
99
|
+
}, isModal && /*#__PURE__*/_react.default.createElement(_styles.TitleContainer, {
|
|
94
100
|
isAddressFormOpen: isAddressFormOpen && !isEdit
|
|
95
101
|
}, /*#__PURE__*/_react.default.createElement(_styles.ModalIcon, null, /*#__PURE__*/_react.default.createElement(_MdClose.default, {
|
|
96
102
|
onClick: function onClick() {
|
|
@@ -10,7 +10,10 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
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) } })); }
|
|
13
|
-
var Container = exports.Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral([""])))
|
|
13
|
+
var Container = exports.Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: ", ";\n"])), function (_ref) {
|
|
14
|
+
var isEdit = _ref.isEdit;
|
|
15
|
+
return isEdit ? 'auto' : '145px';
|
|
16
|
+
});
|
|
14
17
|
var Header = exports.Header = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 5px;\n\n h1 {\n font-weight: 500;\n font-size: 20px;\n color: ", "; \n margin: 0px 10px 0px 0px;\n ", "\n }\n\n svg {\n font-size: 24px;\n }\n\n svg.cancel {\n color: #D81212;\n cursor: pointer;\n }\n\n span {\n font-size: 13px;\n color: ", ";\n text-decoration: underline;\n cursor: pointer;\n user-select: none;\n }\n"])), function (props) {
|
|
15
18
|
return props.theme.colors.darkTextColor;
|
|
16
19
|
}, function (props) {
|
|
@@ -29,8 +32,8 @@ var UserData = exports.UserData = _styledComponents.default.div(_templateObject5
|
|
|
29
32
|
});
|
|
30
33
|
var UserName = exports.UserName = _styledComponents.default.p(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n font-weight: 600;\n"])));
|
|
31
34
|
var ModalIcon = exports.ModalIcon = _styledComponents.default.span(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n font-size: 30px;\n cursor: pointer;\n z-index: 2;\n\n svg{\n /* background: rgba(255,255,255,0.5); */\n border-radius: 50%;\n }\n\n"])));
|
|
32
|
-
var TitleContainer = exports.TitleContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-top: 0;\n h1 {\n margin: auto;\n font-size: 24px;\n }\n ", "\n"])), function (
|
|
33
|
-
var isAddressFormOpen =
|
|
35
|
+
var TitleContainer = exports.TitleContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-top: 0;\n h1 {\n margin: auto;\n font-size: 24px;\n }\n ", "\n"])), function (_ref2) {
|
|
36
|
+
var isAddressFormOpen = _ref2.isAddressFormOpen;
|
|
34
37
|
return isAddressFormOpen && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n h1{\n width: 75%;\n }\n "])));
|
|
35
38
|
});
|
|
36
39
|
var CountryFlag = exports.CountryFlag = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-right: 5px;\n .PhoneInputCountryIcon {\n width: 25px;\n }\n .PhoneInputInput {\n display: none;\n }\n .PhoneInputCountrySelect {\n display: none;\n }\n"])));
|
|
@@ -54,11 +54,12 @@ var Button = exports.Button = _styledComponents.default.button(_templateObject6
|
|
|
54
54
|
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n padding-right: 15%;\n padding-left: 0;\n "])));
|
|
55
55
|
});
|
|
56
56
|
}, function (_ref9) {
|
|
57
|
-
var outline = _ref9.outline
|
|
58
|
-
|
|
57
|
+
var outline = _ref9.outline,
|
|
58
|
+
hoverColor = _ref9.hoverColor;
|
|
59
|
+
return outline && (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n background: ", ";\n color: #CCC;\n border-color: #CCC;\n &:active {\n color: #FFF;\n background: '#CCC';\n }\n &:hover {\n background: '#CCC';\n color: ", ";\n }\n "])), function (props) {
|
|
59
60
|
var _props$theme$colors;
|
|
60
61
|
return ((_props$theme$colors = props.theme.colors) === null || _props$theme$colors === void 0 ? void 0 : _props$theme$colors.backgroundPage) || '#FFF';
|
|
61
|
-
});
|
|
62
|
+
}, hoverColor !== null && hoverColor !== void 0 ? hoverColor : '#FFF');
|
|
62
63
|
}, function (_ref10) {
|
|
63
64
|
var circle = _ref10.circle;
|
|
64
65
|
return circle && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n background: #CCC;\n color: #FFF;\n border-color: #CCC;\n padding: 0;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n border-radius: 50%;\n &:active {\n color: #FFF;\n background: '#CCC';\n }\n "])));
|
|
@@ -71,10 +72,8 @@ var Button = exports.Button = _styledComponents.default.button(_templateObject6
|
|
|
71
72
|
});
|
|
72
73
|
}, function (_ref12) {
|
|
73
74
|
var color = _ref12.color;
|
|
74
|
-
return color === 'primary' && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n background: ", ";\n color:
|
|
75
|
+
return color === 'primary' && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n background: ", ";\n color: #FFF;\n border-color: ", ";\n &:hover {\n background: ", ";\n }\n &:active {\n background: ", ";\n }\n ", "\n ", "\n ", "\n "])), function (props) {
|
|
75
76
|
return props.theme.colors.primary;
|
|
76
|
-
}, function (props) {
|
|
77
|
-
return props.theme.colors.primaryContrast;
|
|
78
77
|
}, function (props) {
|
|
79
78
|
return props.theme.colors.primary;
|
|
80
79
|
}, function (props) {
|
|
@@ -14,10 +14,10 @@ var AddressContainer = exports.AddressContainer = _styledComponents.default.div(
|
|
|
14
14
|
var Header = exports.Header = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral([""])));
|
|
15
15
|
var WrappMap = exports.WrappMap = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n margin: auto;\n height: 300px;\n"])));
|
|
16
16
|
var Map = exports.Map = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-size: 100%;\n\n img {\n width: 100%;\n height: auto;\n display: block;\n border-radius: 15px;\n -webkit-user-drag: none;\n aspect-ratio: attr(width) / attr(height)\n }\n"])));
|
|
17
|
-
var Text = exports.Text = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 14px;\n font-weight: bold;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n h1{\n
|
|
17
|
+
var Text = exports.Text = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 14px;\n font-weight: bold;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n h1{\n white-space: normal;\n width: 100%;\n font-weight: 600;\n font-size: 16px;\n }\n\n span {\n font-size: 13px!important;\n cursor: pointer;\n user-select: none;\n color: ", ";\n margin-left: 10px;\n font-weight: normal;\n\n &:hover {\n text-decoration: underline;\n }\n\n ", "\n }\n"])), function (props) {
|
|
18
18
|
return props.theme.colors.primary;
|
|
19
19
|
}, function (props) {
|
|
20
20
|
var _props$theme;
|
|
21
21
|
return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-right: 10px;\n margin-left: initial;\n "])));
|
|
22
22
|
});
|
|
23
|
-
var ToggleMap = exports.ToggleMap = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n span {\n margin: 0
|
|
23
|
+
var ToggleMap = exports.ToggleMap = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n span {\n margin: 0;\n }\n"])));
|