ordering-ui-external 14.1.19 → 14.1.20
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/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +2 -2
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +3 -2
- package/_modules/themes/five/src/components/CitiesControl/index.js +9 -3
- package/_modules/themes/five/src/components/CitiesControl/styles.js +2 -2
- package/package.json +2 -2
- package/src/themes/callcenterOriginal/src/components/AddressForm/index.js +1 -2
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +2 -1
- package/src/themes/five/src/components/CitiesControl/index.js +51 -34
- package/src/themes/five/src/components/CitiesControl/styles.js +7 -3
|
@@ -38,7 +38,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
38
38
|
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; } }
|
|
39
39
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
40
40
|
var AddressFormUI = function AddressFormUI(props) {
|
|
41
|
-
var _addressState$address, _ref, _formState$changes$ad, _formState$changes, _addressState$address2, _addressState$address3, _addressState$address4, _formState$changes$lo, _formState$changes2, _configState$configs, _configState$configs2, _configState$configs3, _configState$configs4, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _orderState$options6, _props$afterComponent, _props$afterElements;
|
|
41
|
+
var _addressState$address, _ref, _formState$changes$ad, _formState$changes, _addressState$address2, _addressState$address3, _addressState$address4, _formState$changes$lo, _formState$changes2, _configState$configs, _configState$configs2, _configState$configs3, _configState$configs4, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _address$location5, _address$location6, _orderState$options6, _props$afterComponent, _props$afterElements;
|
|
42
42
|
var addressesList = props.addressesList,
|
|
43
43
|
googleMapsControls = props.googleMapsControls,
|
|
44
44
|
formState = props.formState,
|
|
@@ -654,7 +654,7 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
654
654
|
return onCancel();
|
|
655
655
|
},
|
|
656
656
|
hoverColor: "#CCC"
|
|
657
|
-
}, t('CANCEL', 'Cancel')), Object.keys(formState === null || formState === void 0 ? void 0 : formState.changes).length > 0 && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
657
|
+
}, t('CANCEL', 'Cancel')), !(!selectedFromAutocomplete && address !== null && address !== void 0 && address.address && (!(address !== null && address !== void 0 && (_address$location5 = address.location) !== null && _address$location5 !== void 0 && _address$location5.lat) || !(address !== null && address !== void 0 && (_address$location6 = address.location) !== null && _address$location6 !== void 0 && _address$location6.lng))) && Object.keys(formState === null || formState === void 0 ? void 0 : formState.changes).length > 0 && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
658
658
|
id: "submit-btn",
|
|
659
659
|
type: "submit",
|
|
660
660
|
disabled: formState.loading,
|
|
@@ -496,14 +496,15 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
496
496
|
showButton: true,
|
|
497
497
|
cateringPreorder: !!cateringTypeString
|
|
498
498
|
}, cateringValues))), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
499
|
-
title: t('SELECT_A_STORE', 'Select a store'),
|
|
500
499
|
open: modals.citiesOpen,
|
|
501
500
|
width: "70%",
|
|
502
501
|
onClose: function onClose() {
|
|
503
502
|
return setModals(_objectSpread(_objectSpread({}, modals), {}, {
|
|
504
503
|
citiesOpen: false
|
|
505
504
|
}));
|
|
506
|
-
}
|
|
505
|
+
},
|
|
506
|
+
padding: "0px",
|
|
507
|
+
hideCloseDefault: true
|
|
507
508
|
}, /*#__PURE__*/_react.default.createElement(_CitiesControl.CitiesControl, {
|
|
508
509
|
cities: citiesState === null || citiesState === void 0 ? void 0 : citiesState.cities,
|
|
509
510
|
handleChangeCity: handleChangeCity,
|
|
@@ -14,6 +14,8 @@ var _BsArrowRight = _interopRequireDefault(require("@meronex/icons/bs/BsArrowRig
|
|
|
14
14
|
var _styles = require("./styles");
|
|
15
15
|
var _Buttons = require("../../styles/Buttons");
|
|
16
16
|
var _SearchBar = require("../SearchBar");
|
|
17
|
+
var _styles2 = require("../Modal/styles");
|
|
18
|
+
var _MdClose = _interopRequireDefault(require("@meronex/icons/md/MdClose"));
|
|
17
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
20
|
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); }
|
|
19
21
|
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; }
|
|
@@ -47,7 +49,11 @@ var CitiesControl = exports.CitiesControl = function CitiesControl(props) {
|
|
|
47
49
|
cityState !== (orderState === null || orderState === void 0 || (_orderState$options2 = orderState.options) === null || _orderState$options2 === void 0 ? void 0 : _orderState$options2.city_id) && handleChangeCity(cityState);
|
|
48
50
|
onClose && onClose();
|
|
49
51
|
};
|
|
50
|
-
return /*#__PURE__*/_react.default.createElement(_styles.Container, null,
|
|
52
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.Container, null, /*#__PURE__*/_react.default.createElement(_styles2.ModalIconWrapper, null, /*#__PURE__*/_react.default.createElement(_styles2.ModalIcon, null, /*#__PURE__*/_react.default.createElement(_MdClose.default, {
|
|
53
|
+
onClick: function onClick() {
|
|
54
|
+
return onClose();
|
|
55
|
+
}
|
|
56
|
+
}))), /*#__PURE__*/_react.default.createElement(_styles2.ModalHeader, null, /*#__PURE__*/_react.default.createElement(_styles2.ModalTitle, null, t('SELECT_A_STORE', 'Select a store'))), orderState !== null && orderState !== void 0 && orderState.loading ? /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
51
57
|
height: 40,
|
|
52
58
|
count: 3,
|
|
53
59
|
style: {
|
|
@@ -74,10 +80,10 @@ var CitiesControl = exports.CitiesControl = function CitiesControl(props) {
|
|
|
74
80
|
}, (city === null || city === void 0 ? void 0 : city.id) === cityState ? /*#__PURE__*/_react.default.createElement(_RiRadioButtonFill.default, {
|
|
75
81
|
className: "city-checked"
|
|
76
82
|
}) : /*#__PURE__*/_react.default.createElement(_IosRadioButtonOff.default, null)), city === null || city === void 0 ? void 0 : city.name);
|
|
77
|
-
}), /*#__PURE__*/_react.default.createElement(_styles.ButtonWrapper, null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
83
|
+
}))), /*#__PURE__*/_react.default.createElement(_styles.ButtonWrapper, null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
78
84
|
color: "primary",
|
|
79
85
|
onClick: function onClick() {
|
|
80
86
|
return handleClick();
|
|
81
87
|
}
|
|
82
|
-
}, t('CONTINUE', 'Continue')), /*#__PURE__*/_react.default.createElement(_BsArrowRight.default, null)))
|
|
88
|
+
}, t('CONTINUE', 'Continue')), /*#__PURE__*/_react.default.createElement(_BsArrowRight.default, null)));
|
|
83
89
|
};
|
|
@@ -8,9 +8,9 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
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 Container = exports.Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral([""])));
|
|
11
|
+
var Container = exports.Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 30px 20px;\n"])));
|
|
12
12
|
var CityItem = exports.CityItem = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-start;\n align-items: center;\n padding: 15px 0px;\n cursor: pointer;\n span {\n margin-right: 15px;\n }\n .city-checked{\n color: ", ";\n }\n"])), function (props) {
|
|
13
13
|
return props.theme.colors.primary;
|
|
14
14
|
});
|
|
15
|
-
var ButtonWrapper = exports.ButtonWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: sticky;\n bottom: 0;\n svg {\n position: absolute;\n right:
|
|
15
|
+
var ButtonWrapper = exports.ButtonWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: sticky;\n bottom: 0;\n padding: 10px 20px 30px 20px;\n background: white;\n svg {\n position: absolute;\n right: 30px;\n top: 40px;\n font-size: 25px;\n color: #ffffff;\n }\n button {\n width: 100%;\n padding: 5px;\n }\n"])));
|
|
16
16
|
var SearchBarContainer = exports.SearchBarContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-bottom: 10px;\n"])));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-external",
|
|
3
|
-
"version": "14.1.
|
|
3
|
+
"version": "14.1.20",
|
|
4
4
|
"description": "Ordering UI Components",
|
|
5
5
|
"main": "./_modules/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"lodash": "^4.17.19",
|
|
89
89
|
"moment": "^2.29.4",
|
|
90
90
|
"nanoid": "^4.0.0",
|
|
91
|
-
"ordering-components-external": "13.0.
|
|
91
|
+
"ordering-components-external": "13.0.30",
|
|
92
92
|
"payment": "^2.4.6",
|
|
93
93
|
"polished": "^3.6.6",
|
|
94
94
|
"react-bootstrap-icons": "^1.7.2",
|
|
@@ -582,8 +582,7 @@ const AddressFormUI = (props) => {
|
|
|
582
582
|
</Button>
|
|
583
583
|
)
|
|
584
584
|
}
|
|
585
|
-
|
|
586
|
-
{Object.keys(formState?.changes).length > 0 && (
|
|
585
|
+
{!(!selectedFromAutocomplete && address?.address && (!address?.location?.lat || !address?.location?.lng)) && Object.keys(formState?.changes).length > 0 && (
|
|
587
586
|
<Button
|
|
588
587
|
id='submit-btn'
|
|
589
588
|
type='submit'
|
package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js
CHANGED
|
@@ -540,10 +540,11 @@ const BusinessesListingUI = (props) => {
|
|
|
540
540
|
/>
|
|
541
541
|
</Modal>
|
|
542
542
|
<Modal
|
|
543
|
-
title={t('SELECT_A_STORE', 'Select a store')}
|
|
544
543
|
open={modals.citiesOpen}
|
|
545
544
|
width='70%'
|
|
546
545
|
onClose={() => setModals({ ...modals, citiesOpen: false })}
|
|
546
|
+
padding='0px'
|
|
547
|
+
hideCloseDefault
|
|
547
548
|
>
|
|
548
549
|
<CitiesControl
|
|
549
550
|
cities={citiesState?.cities}
|
|
@@ -8,6 +8,8 @@ import BsArrowRight from '@meronex/icons/bs/BsArrowRight'
|
|
|
8
8
|
import { ButtonWrapper, CityItem, Container, SearchBarContainer } from './styles'
|
|
9
9
|
import { Button } from '../../styles/Buttons'
|
|
10
10
|
import { SearchBar } from '../SearchBar'
|
|
11
|
+
import { ModalHeader, ModalIcon, ModalIconWrapper, ModalTitle } from '../Modal/styles'
|
|
12
|
+
import MdClose from '@meronex/icons/md/MdClose'
|
|
11
13
|
|
|
12
14
|
export const CitiesControl = (props) => {
|
|
13
15
|
const {
|
|
@@ -27,39 +29,54 @@ export const CitiesControl = (props) => {
|
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
return (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
32
|
+
<>
|
|
33
|
+
<Container>
|
|
34
|
+
<ModalIconWrapper>
|
|
35
|
+
<ModalIcon>
|
|
36
|
+
{
|
|
37
|
+
<MdClose onClick={() => onClose()} />
|
|
38
|
+
}
|
|
39
|
+
</ModalIcon>
|
|
40
|
+
</ModalIconWrapper>
|
|
41
|
+
<ModalHeader>
|
|
42
|
+
<ModalTitle>
|
|
43
|
+
{t('SELECT_A_STORE', 'Select a store')}
|
|
44
|
+
</ModalTitle>
|
|
45
|
+
</ModalHeader>
|
|
46
|
+
{
|
|
47
|
+
orderState?.loading ? (
|
|
48
|
+
<Skeleton height={40} count={3} style={{ marginBottom: '10px' }} />
|
|
49
|
+
) : (
|
|
50
|
+
<>
|
|
51
|
+
<SearchBarContainer>
|
|
52
|
+
<SearchBar
|
|
53
|
+
name='city-filter'
|
|
54
|
+
placeholder={t('SEARCH_CITIES', 'Search Cities')}
|
|
55
|
+
onSearch={(val) => setCityFilter(val)}
|
|
56
|
+
search={cityFilter}
|
|
57
|
+
/>
|
|
58
|
+
</SearchBarContainer>
|
|
59
|
+
{cities?.filter(city => city?.name?.toLowerCase?.()?.includes(cityFilter?.toLowerCase?.()))?.map(city => city?.enabled && (
|
|
60
|
+
<CityItem key={city?.id} onClick={() => setCityState(city?.id === cityState ? null : city?.id)}>
|
|
61
|
+
<span className='radio'>
|
|
62
|
+
{city?.id === cityState
|
|
63
|
+
? <RiRadioButtonFill className='city-checked' />
|
|
64
|
+
: <IosRadioButtonOff />}
|
|
65
|
+
</span>
|
|
66
|
+
{city?.name}
|
|
67
|
+
</CityItem>
|
|
68
|
+
))}
|
|
69
|
+
|
|
70
|
+
</>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
</Container>
|
|
74
|
+
<ButtonWrapper>
|
|
75
|
+
<Button color='primary' onClick={() => handleClick()}>
|
|
76
|
+
{t('CONTINUE', 'Continue')}
|
|
77
|
+
</Button>
|
|
78
|
+
<BsArrowRight />
|
|
79
|
+
</ButtonWrapper>
|
|
80
|
+
</>
|
|
64
81
|
)
|
|
65
82
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import styled from 'styled-components'
|
|
2
2
|
|
|
3
|
-
export const Container = styled.div
|
|
3
|
+
export const Container = styled.div`
|
|
4
|
+
padding: 30px 20px;
|
|
5
|
+
`
|
|
4
6
|
|
|
5
7
|
export const CityItem = styled.div`
|
|
6
8
|
display: flex;
|
|
@@ -19,10 +21,12 @@ export const CityItem = styled.div`
|
|
|
19
21
|
export const ButtonWrapper = styled.div`
|
|
20
22
|
position: sticky;
|
|
21
23
|
bottom: 0;
|
|
24
|
+
padding: 10px 20px 30px 20px;
|
|
25
|
+
background: white;
|
|
22
26
|
svg {
|
|
23
27
|
position: absolute;
|
|
24
|
-
right:
|
|
25
|
-
top:
|
|
28
|
+
right: 30px;
|
|
29
|
+
top: 40px;
|
|
26
30
|
font-size: 25px;
|
|
27
31
|
color: #ffffff;
|
|
28
32
|
}
|