ordering-ui-external 14.1.45 → 14.1.47
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.d9252dcccf4ce0155028.js → 7.ordering-ui.a574355896c3077ecd50.js} +1 -1
- package/_bundles/ordering-ui.a574355896c3077ecd50.js +2 -0
- package/_modules/components/BusinessesMap/index.js +7 -22
- package/_modules/components/LogoutButton/index.js +1 -7
- package/_modules/themes/callcenterOriginal/src/components/Header/index.js +5 -7
- package/_modules/themes/callcenterOriginal/src/components/Header/styles.js +8 -12
- package/_modules/themes/callcenterOriginal/src/components/HeaderOption/index.js +6 -26
- package/_modules/themes/callcenterOriginal/src/components/HeaderOption/styles.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/SidebarMenu/index.js +74 -69
- package/_modules/themes/callcenterOriginal/src/components/UserPopover/index.js +30 -21
- package/_modules/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +1 -1
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +25 -21
- package/_modules/themes/five/src/components/BusinessController/index.js +3 -1
- package/_modules/themes/five/src/components/BusinessController/styles.js +7 -4
- package/_modules/themes/five/src/components/Checkout/index.js +5 -8
- package/package.json +2 -2
- package/src/components/BusinessesMap/index.js +24 -38
- package/src/components/LogoutButton/index.js +3 -5
- package/src/themes/callcenterOriginal/src/components/Header/index.js +14 -12
- package/src/themes/callcenterOriginal/src/components/Header/styles.js +18 -40
- package/src/themes/callcenterOriginal/src/components/HeaderOption/index.js +30 -51
- package/src/themes/callcenterOriginal/src/components/HeaderOption/styles.js +2 -4
- package/src/themes/callcenterOriginal/src/components/SidebarMenu/index.js +75 -101
- package/src/themes/callcenterOriginal/src/components/UserPopover/index.js +36 -17
- package/src/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +3 -0
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +13 -1
- package/src/themes/five/src/components/BusinessController/index.js +15 -1
- package/src/themes/five/src/components/BusinessController/styles.js +12 -1
- package/src/themes/five/src/components/Checkout/index.js +1 -2
- package/_bundles/ordering-ui.d9252dcccf4ce0155028.js +0 -2
- /package/_bundles/{0.ordering-ui.d9252dcccf4ce0155028.js → 0.ordering-ui.a574355896c3077ecd50.js} +0 -0
- /package/_bundles/{1.ordering-ui.d9252dcccf4ce0155028.js → 1.ordering-ui.a574355896c3077ecd50.js} +0 -0
- /package/_bundles/{2.ordering-ui.d9252dcccf4ce0155028.js → 2.ordering-ui.a574355896c3077ecd50.js} +0 -0
- /package/_bundles/{4.ordering-ui.d9252dcccf4ce0155028.js → 4.ordering-ui.a574355896c3077ecd50.js} +0 -0
- /package/_bundles/{5.ordering-ui.d9252dcccf4ce0155028.js → 5.ordering-ui.a574355896c3077ecd50.js} +0 -0
- /package/_bundles/{6.ordering-ui.d9252dcccf4ce0155028.js → 6.ordering-ui.a574355896c3077ecd50.js} +0 -0
- /package/_bundles/{7.ordering-ui.d9252dcccf4ce0155028.js.LICENSE.txt → 7.ordering-ui.a574355896c3077ecd50.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.d9252dcccf4ce0155028.js → 8.ordering-ui.a574355896c3077ecd50.js} +0 -0
- /package/_bundles/{9.ordering-ui.d9252dcccf4ce0155028.js → 9.ordering-ui.a574355896c3077ecd50.js} +0 -0
- /package/_bundles/{ordering-ui.d9252dcccf4ce0155028.js.LICENSE.txt → ordering-ui.a574355896c3077ecd50.js.LICENSE.txt} +0 -0
|
@@ -50,8 +50,24 @@ var extraOptions = [{
|
|
|
50
50
|
displayName: 'help',
|
|
51
51
|
key: 'help'
|
|
52
52
|
}];
|
|
53
|
+
var adminOptionsDefault = [{
|
|
54
|
+
name: 'orderlist',
|
|
55
|
+
pathname: '/orderlist',
|
|
56
|
+
displayName: 'order list',
|
|
57
|
+
key: 'ORDER_LIST'
|
|
58
|
+
}, {
|
|
59
|
+
name: 'deliveries',
|
|
60
|
+
pathname: '/deliveries',
|
|
61
|
+
displayName: 'delivery dashboard',
|
|
62
|
+
key: 'DELIVERY_DASHBOARD'
|
|
63
|
+
}, {
|
|
64
|
+
name: 'drivers_dashboard',
|
|
65
|
+
pathname: '/drivers',
|
|
66
|
+
displayName: 'drivers dashboard',
|
|
67
|
+
key: 'DRIVERS_DASHBOARD'
|
|
68
|
+
}];
|
|
53
69
|
var UserPopover = exports.UserPopover = function UserPopover(props) {
|
|
54
|
-
var
|
|
70
|
+
var _sessionState$user, _sessionState$user2, _sessionState$user3, _sessionState$user4;
|
|
55
71
|
var open = props.open,
|
|
56
72
|
isHome = props.isHome,
|
|
57
73
|
optionsList = props.optionsList,
|
|
@@ -87,8 +103,7 @@ var UserPopover = exports.UserPopover = function UserPopover(props) {
|
|
|
87
103
|
}]
|
|
88
104
|
});
|
|
89
105
|
var styles = popper.styles,
|
|
90
|
-
attributes = popper.attributes
|
|
91
|
-
forceUpdate = popper.forceUpdate;
|
|
106
|
+
attributes = popper.attributes;
|
|
92
107
|
(0, _react.useEffect)(function () {
|
|
93
108
|
// forceUpdate && forceUpdate()
|
|
94
109
|
}, [open, sessionState]);
|
|
@@ -131,15 +146,7 @@ var UserPopover = exports.UserPopover = function UserPopover(props) {
|
|
|
131
146
|
style: {
|
|
132
147
|
overflow: 'hidden'
|
|
133
148
|
}
|
|
134
|
-
},
|
|
135
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
136
|
-
key: i
|
|
137
|
-
}, BeforeElement);
|
|
138
|
-
}), (_props$beforeComponen = props.beforeComponents) === null || _props$beforeComponen === void 0 ? void 0 : _props$beforeComponen.map(function (BeforeComponent, i) {
|
|
139
|
-
return /*#__PURE__*/_react.default.createElement(BeforeComponent, _extends({
|
|
140
|
-
key: i
|
|
141
|
-
}, props));
|
|
142
|
-
}), /*#__PURE__*/_react.default.createElement(_styles.HeaderItem, {
|
|
149
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.HeaderItem, {
|
|
143
150
|
isPhoto: sessionState === null || sessionState === void 0 || (_sessionState$user = sessionState.user) === null || _sessionState$user === void 0 ? void 0 : _sessionState$user.photo,
|
|
144
151
|
isHome: isHome,
|
|
145
152
|
ref: referenceElement,
|
|
@@ -169,17 +176,19 @@ var UserPopover = exports.UserPopover = function UserPopover(props) {
|
|
|
169
176
|
return handleGoToPage(option.name);
|
|
170
177
|
}
|
|
171
178
|
}, t((option.key || option.name).toUpperCase(), (0, _utils.capitalize)(option.displayName || option.name)));
|
|
179
|
+
}), !((sessionState === null || sessionState === void 0 || (_sessionState$user3 = sessionState.user) === null || _sessionState$user3 === void 0 ? void 0 : _sessionState$user3.level) === 0) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.Divider, null), withLogout && /*#__PURE__*/_react.default.createElement(PopoverListItemLogout, {
|
|
180
|
+
onClose: props.onClose
|
|
181
|
+
}))), (sessionState === null || sessionState === void 0 || (_sessionState$user4 = sessionState.user) === null || _sessionState$user4 === void 0 ? void 0 : _sessionState$user4.level) === 0 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.Divider, null), /*#__PURE__*/_react.default.createElement(_styles.ExtraOptions, null, adminOptionsDefault && adminOptionsDefault.map(function (option, i) {
|
|
182
|
+
return /*#__PURE__*/_react.default.createElement(_styles.PopoverListLink, {
|
|
183
|
+
key: i,
|
|
184
|
+
active: window.location.pathname === option.pathname,
|
|
185
|
+
onClick: function onClick() {
|
|
186
|
+
return handleGoToPage(option.name);
|
|
187
|
+
}
|
|
188
|
+
}, t((option.key || option.name).toUpperCase(), (0, _utils.capitalize)(option.displayName || option.name)));
|
|
172
189
|
}), /*#__PURE__*/_react.default.createElement(_styles.Divider, null), withLogout && /*#__PURE__*/_react.default.createElement(PopoverListItemLogout, {
|
|
173
190
|
onClose: props.onClose
|
|
174
|
-
}))))
|
|
175
|
-
return /*#__PURE__*/_react.default.createElement(AfterComponent, _extends({
|
|
176
|
-
key: i
|
|
177
|
-
}, props));
|
|
178
|
-
}), (_props$afterElements = props.afterElements) === null || _props$afterElements === void 0 ? void 0 : _props$afterElements.map(function (AfterElement, i) {
|
|
179
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
180
|
-
key: i
|
|
181
|
-
}, AfterElement);
|
|
182
|
-
}));
|
|
191
|
+
}))))));
|
|
183
192
|
};
|
|
184
193
|
var LogoutActionUI = function LogoutActionUI(props) {
|
|
185
194
|
var _useLanguage3 = (0, _orderingComponentsExternal.useLanguage)(),
|
package/_modules/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js
CHANGED
|
@@ -87,7 +87,7 @@ var BusinessInfoComponent = exports.BusinessInfoComponent = function BusinessInf
|
|
|
87
87
|
}, /*#__PURE__*/_react.default.createElement("h2", {
|
|
88
88
|
className: "bold",
|
|
89
89
|
id: "business_name"
|
|
90
|
-
}, business === null || business === void 0 ? void 0 : business.name), /*#__PURE__*/_react.default.createElement("span", {
|
|
90
|
+
}, business === null || business === void 0 ? void 0 : business.name), isCustomerMode && (business === null || business === void 0 ? void 0 : business.address) && /*#__PURE__*/_react.default.createElement("h3", null, business === null || business === void 0 ? void 0 : business.address), /*#__PURE__*/_react.default.createElement("span", {
|
|
91
91
|
id: "business_name_feedback"
|
|
92
92
|
}), (business === null || business === void 0 || (_business$ribbon = business.ribbon) === null || _business$ribbon === void 0 ? void 0 : _business$ribbon.enabled) && /*#__PURE__*/_react.default.createElement(_styles.RibbonBox, {
|
|
93
93
|
bgColor: business === null || business === void 0 || (_business$ribbon2 = business.ribbon) === null || _business$ribbon2 === void 0 ? void 0 : _business$ribbon2.color,
|
|
@@ -103,7 +103,7 @@ var BusinessMoreDetail = exports.BusinessMoreDetail = _styledComponents.default.
|
|
|
103
103
|
}, function (props) {
|
|
104
104
|
return props.position ? 'black' : 'white';
|
|
105
105
|
});
|
|
106
|
-
var TitleWrapper = exports.TitleWrapper = _styledComponents.default.div(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n span {\n height: 70px;\n width: 1px;\n display: none;\n }\n h2 {\n font-size: 24px;\n line-height: 36px;\n margin: 0 0 10px 0;\n font-weight: 600;\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n background: ", ";\n &.fixed-name {\n z-index: 10001;\n position: fixed;\n top: 0;\n padding: 10px 0;\n font-size: 18px;\n ", "\n ", "\n }\n @media (min-width: 768px) {\n font-size: 32px;\n
|
|
106
|
+
var TitleWrapper = exports.TitleWrapper = _styledComponents.default.div(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n span {\n height: 70px;\n width: 1px;\n display: none;\n }\n h2 {\n font-size: 24px;\n line-height: 36px;\n margin: 0 0 10px 0;\n font-weight: 600;\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n background: ", ";\n &.fixed-name {\n z-index: 10001;\n position: fixed;\n top: 0;\n padding: 10px 0;\n font-size: 18px;\n ", "\n ", "\n }\n\n @media (min-width: 768px) {\n font-size: 32px;\n }\n }\n\n h3 {\n font-size: 16px;\n line-height: 36px;\n margin: 0px;\n font-weight: 500;\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n background: ", ";\n }\n"])), function (_ref5) {
|
|
107
107
|
var _theme$colors;
|
|
108
108
|
var theme = _ref5.theme;
|
|
109
109
|
return theme === null || theme === void 0 || (_theme$colors = theme.colors) === null || _theme$colors === void 0 ? void 0 : _theme$colors.backgroundPage;
|
|
@@ -122,6 +122,10 @@ var TitleWrapper = exports.TitleWrapper = _styledComponents.default.div(_templat
|
|
|
122
122
|
var _props$theme13;
|
|
123
123
|
return (_props$theme13 = props.theme) !== null && _props$theme13 !== void 0 && _props$theme13.rtl ? (0, _styledComponents.css)(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["\n right: 48px;\n "]))) : (0, _styledComponents.css)(_templateObject41 || (_templateObject41 = _taggedTemplateLiteral(["\n left: 48px;\n "])));
|
|
124
124
|
});
|
|
125
|
+
}, function (_ref8) {
|
|
126
|
+
var _theme$colors2;
|
|
127
|
+
var theme = _ref8.theme;
|
|
128
|
+
return theme === null || theme === void 0 || (_theme$colors2 = theme.colors) === null || _theme$colors2 === void 0 ? void 0 : _theme$colors2.backgroundPage;
|
|
125
129
|
});
|
|
126
130
|
var RibbonBox = exports.RibbonBox = _styledComponents.default.div(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["\n padding: 2px 8px;\n box-sizing: border-box;\n z-index: 10;\n color: ", ";\n font-weight: 400;\n font-size: 10px;\n line-height: 13px;\n background-color: ", ";\n max-width: 200px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n margin-left: 5px;\n margin-bottom: 10px;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
|
|
127
131
|
return props.theme.colors.colorTextSignForm;
|
|
@@ -129,41 +133,41 @@ var RibbonBox = exports.RibbonBox = _styledComponents.default.div(_templateObjec
|
|
|
129
133
|
return props.theme.colors.primary;
|
|
130
134
|
}, function (props) {
|
|
131
135
|
return props.theme.rtl && (0, _styledComponents.css)(_templateObject43 || (_templateObject43 = _taggedTemplateLiteral(["\n margin-left: 0px;\n margin-right: 5px;\n "])));
|
|
132
|
-
}, function (_ref8) {
|
|
133
|
-
var bgColor = _ref8.bgColor;
|
|
134
|
-
return bgColor && (0, _styledComponents.css)(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), bgColor);
|
|
135
136
|
}, function (_ref9) {
|
|
136
|
-
var
|
|
137
|
-
return
|
|
137
|
+
var bgColor = _ref9.bgColor;
|
|
138
|
+
return bgColor && (0, _styledComponents.css)(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), bgColor);
|
|
138
139
|
}, function (_ref10) {
|
|
139
|
-
var
|
|
140
|
-
return
|
|
140
|
+
var isRoundRect = _ref10.isRoundRect;
|
|
141
|
+
return isRoundRect && (0, _styledComponents.css)(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["\n border-radius: 7.6px;\n "])));
|
|
141
142
|
}, function (_ref11) {
|
|
142
|
-
var
|
|
143
|
-
return
|
|
143
|
+
var isCapsule = _ref11.isCapsule;
|
|
144
|
+
return isCapsule && (0, _styledComponents.css)(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["\n border-radius: 50px;\n "])));
|
|
144
145
|
}, function (_ref12) {
|
|
145
|
-
var
|
|
146
|
+
var colorText = _ref12.colorText;
|
|
147
|
+
return colorText && (0, _styledComponents.css)(_templateObject47 || (_templateObject47 = _taggedTemplateLiteral(["\n color: ", ";\n "])), colorText ? 'black' : 'white');
|
|
148
|
+
}, function (_ref13) {
|
|
149
|
+
var borderRibbon = _ref13.borderRibbon;
|
|
146
150
|
return borderRibbon && (0, _styledComponents.css)(_templateObject48 || (_templateObject48 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n "])), borderRibbon ? 'black' : 'white');
|
|
147
151
|
});
|
|
148
152
|
var SearchIconWrapper = exports.SearchIconWrapper = _styledComponents.default.div(_templateObject49 || (_templateObject49 = _taggedTemplateLiteral(["\n cursor: pointer;\n background-color: ", ";\n width: 36px;\n height: 36px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n\n svg {\n font-size: 18px;\n }\n"])), function (props) {
|
|
149
153
|
return props.theme.colors.gray200;
|
|
150
154
|
});
|
|
151
|
-
var SearchComponentContainer = exports.SearchComponentContainer = _styledComponents.default.div(_templateObject50 || (_templateObject50 = _taggedTemplateLiteral(["\n position: absolute;\n top: 10px;\n right: 60px;\n color: ", ";\n #select-input {\n color: #FFFFFF !important;\n }\n svg {\n color: #FFFFFF;\n }\n"])), function (
|
|
152
|
-
var theme =
|
|
155
|
+
var SearchComponentContainer = exports.SearchComponentContainer = _styledComponents.default.div(_templateObject50 || (_templateObject50 = _taggedTemplateLiteral(["\n position: absolute;\n top: 10px;\n right: 60px;\n color: ", ";\n #select-input {\n color: #FFFFFF !important;\n }\n svg {\n color: #FFFFFF;\n }\n"])), function (_ref14) {
|
|
156
|
+
var theme = _ref14.theme;
|
|
153
157
|
return theme.colors.white;
|
|
154
158
|
});
|
|
155
159
|
var SocialList = exports.SocialList = _styledComponents.default.div(_templateObject51 || (_templateObject51 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-left: -3px;\n ", "\n"])), function (props) {
|
|
156
160
|
return props.theme.rtl && (0, _styledComponents.css)(_templateObject52 || (_templateObject52 = _taggedTemplateLiteral(["\n margin-right: -3px;\n margin-left: 0px;\n "])));
|
|
157
161
|
});
|
|
158
|
-
var CategorySelectedContainer = exports.CategorySelectedContainer = _styledComponents.default.div(_templateObject53 || (_templateObject53 = _taggedTemplateLiteral(["\n display: inline;\n margin-left: 10px;\n color: ", ";\n padding-right: 5px;\n cursor: pointer;\n p{\n margin: 0;\n }\n svg {\n position: relative;\n top: 2px;\n margin-right: 3px;\n width: 14px;\n height: 14px;\n }\n"])), function (
|
|
159
|
-
var _theme$
|
|
160
|
-
var theme =
|
|
161
|
-
return theme === null || theme === void 0 || (_theme$
|
|
162
|
+
var CategorySelectedContainer = exports.CategorySelectedContainer = _styledComponents.default.div(_templateObject53 || (_templateObject53 = _taggedTemplateLiteral(["\n display: inline;\n margin-left: 10px;\n color: ", ";\n padding-right: 5px;\n cursor: pointer;\n p{\n margin: 0;\n }\n svg {\n position: relative;\n top: 2px;\n margin-right: 3px;\n width: 14px;\n height: 14px;\n }\n"])), function (_ref15) {
|
|
163
|
+
var _theme$colors3;
|
|
164
|
+
var theme = _ref15.theme;
|
|
165
|
+
return theme === null || theme === void 0 || (_theme$colors3 = theme.colors) === null || _theme$colors3 === void 0 ? void 0 : _theme$colors3.primary;
|
|
162
166
|
});
|
|
163
167
|
var IconWrapper = exports.IconWrapper = _styledComponents.default.a(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["\n margin: 0px 3px 10px 3px;\n border-radius: 3px;\n border: 0.5px solid ", ";\n width: 27px;\n height: 27px;\n min-width: 27px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: all 0.2s linear;\n\n ", "\n\n svg {\n height: 18px;\n font-size: 18px;\n transition: all 0.2s ease-in;\n color: ", ";\n }\n &:hover {\n background-color: ", ";\n svg {\n transform: scale(1.07);\n }\n }\n"])), function (props) {
|
|
164
168
|
return props.theme.colors.gray200;
|
|
165
|
-
}, function (
|
|
166
|
-
var isSkeleton =
|
|
169
|
+
}, function (_ref16) {
|
|
170
|
+
var isSkeleton = _ref16.isSkeleton;
|
|
167
171
|
return isSkeleton && (0, _styledComponents.css)(_templateObject55 || (_templateObject55 = _taggedTemplateLiteral(["\n border: none;\n "])));
|
|
168
172
|
}, function (props) {
|
|
169
173
|
return props.theme.colors.headingColor;
|
|
@@ -171,8 +175,8 @@ var IconWrapper = exports.IconWrapper = _styledComponents.default.a(_templateObj
|
|
|
171
175
|
return props.theme.colors.gray200;
|
|
172
176
|
});
|
|
173
177
|
var BusinessInfoWrapper = exports.BusinessInfoWrapper = _styledComponents.default.div(_templateObject56 || (_templateObject56 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column-reverse;\n @media (min-width: 768px) {\n flex-direction: column;\n }\n"])));
|
|
174
|
-
var WrapperFloatingSearch = exports.WrapperFloatingSearch = _styledComponents.default.div(_templateObject57 || (_templateObject57 = _taggedTemplateLiteral(["\n position: absolute;\n color: ", ";\n display: flex;\n background: rgba(0,0,0,0.2);\n top: 80px;\n right: 10px;\n width: 80%;\n border-bottom: 1px solid #FFFFFF;\n #select-input {\n color: #FFFFFF !important;\n background: transparent;\n }\n svg, span {\n color: #FFFFFF !important;\n }\n @media (min-width: 681px){\n top: 23px;\n right: 60px;\n width: 300px;\n input {\n width: 80%;\n }\n }\n"])), function (
|
|
175
|
-
var theme =
|
|
178
|
+
var WrapperFloatingSearch = exports.WrapperFloatingSearch = _styledComponents.default.div(_templateObject57 || (_templateObject57 = _taggedTemplateLiteral(["\n position: absolute;\n color: ", ";\n display: flex;\n background: rgba(0,0,0,0.2);\n top: 80px;\n right: 10px;\n width: 80%;\n border-bottom: 1px solid #FFFFFF;\n #select-input {\n color: #FFFFFF !important;\n background: transparent;\n }\n svg, span {\n color: #FFFFFF !important;\n }\n @media (min-width: 681px){\n top: 23px;\n right: 60px;\n width: 300px;\n input {\n width: 80%;\n }\n }\n"])), function (_ref17) {
|
|
179
|
+
var theme = _ref17.theme;
|
|
176
180
|
return theme.colors.white;
|
|
177
181
|
});
|
|
178
182
|
var BackButton = exports.BackButton = _styledComponents.default.div(_templateObject58 || (_templateObject58 = _taggedTemplateLiteral(["\n button {\n display: flex;\n flex-direction: row;\n align-items: center;}\n margin-top: 10px;\n svg {\n margin-right: 10px;\n }\n }\n"])));
|
|
@@ -222,7 +222,9 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
|
|
|
222
222
|
isCustomerMode: isCustomerMode
|
|
223
223
|
}, /*#__PURE__*/_react.default.createElement(_styles.BusinessInfoItem, null, /*#__PURE__*/_react.default.createElement("div", null, business !== null && business !== void 0 && business.name ? /*#__PURE__*/_react.default.createElement(_styles.BusinessName, null, business === null || business === void 0 ? void 0 : business.name) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
224
224
|
width: 100
|
|
225
|
-
})), /*#__PURE__*/_react.default.createElement(_styles.
|
|
225
|
+
})), isCustomerMode && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, business !== null && business !== void 0 && business.address ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_styles.BusinessAddress, null, business === null || business === void 0 ? void 0 : business.address)) : /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
226
|
+
width: 100
|
|
227
|
+
}))), /*#__PURE__*/_react.default.createElement(_styles.Medadata, {
|
|
226
228
|
isCustomerMode: isCustomerMode,
|
|
227
229
|
isSkeleton: isSkeleton
|
|
228
230
|
}, !hideBusinessFee && orderType === 1 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (businessDeliveryPrice !== null && businessDeliveryPrice !== void 0 ? businessDeliveryPrice : business === null || business === void 0 ? void 0 : business.delivery_price) >= 0 ? /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("span", null, t('DELIVERY_FEE', 'Delivery fee')), business && parsePrice(businessDeliveryPrice !== null && businessDeliveryPrice !== void 0 ? businessDeliveryPrice : business === null || business === void 0 ? void 0 : business.delivery_price)) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
@@ -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.WrapperBusinessLogo = exports.WrapperBusinessCard = exports.ScheduleContainer = exports.RibbonBox = exports.Medadata = exports.InfoLength = exports.InfoDescription = exports.FavoriteWrapper = exports.ContainerCard = exports.ClosedContainer = exports.Categories = exports.CardOverlay = exports.CallCenterInformationBullet = exports.CallCenterInformation = exports.BusinessTags = exports.BusinessStarInfo = exports.BusinessName = exports.BusinessLogoWrapper = exports.BusinessLogo = exports.BusinessInfoItem = exports.BusinessInfo = exports.BusinessHero = exports.BusinessHeaderClosedContainer = exports.BusinessHeader = exports.BusinessContent = void 0;
|
|
7
|
+
exports.WrapperBusinessLogo = exports.WrapperBusinessCard = exports.ScheduleContainer = exports.RibbonBox = exports.Medadata = exports.InfoLength = exports.InfoDescription = exports.FavoriteWrapper = exports.ContainerCard = exports.ClosedContainer = exports.Categories = exports.CardOverlay = exports.CallCenterInformationBullet = exports.CallCenterInformation = exports.BusinessTags = exports.BusinessStarInfo = exports.BusinessName = exports.BusinessLogoWrapper = exports.BusinessLogo = exports.BusinessInfoItem = exports.BusinessInfo = exports.BusinessHero = exports.BusinessHeaderClosedContainer = exports.BusinessHeader = exports.BusinessContent = exports.BusinessAddress = 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, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54;
|
|
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, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55;
|
|
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 && {}.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 }; }
|
|
@@ -106,7 +106,7 @@ var BusinessInfoItem = exports.BusinessInfoItem = _styledComponents.default.div(
|
|
|
106
106
|
var _props$theme3;
|
|
107
107
|
return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n margin-left: 5px;\n margin-right: 0;\n "])));
|
|
108
108
|
});
|
|
109
|
-
var BusinessName = exports.BusinessName = _styledComponents.default.
|
|
109
|
+
var BusinessName = exports.BusinessName = _styledComponents.default.h5(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n font-size: 16px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: 500;\n margin-block-start: 0;\n margin-block-end: 0;\n color: ", ";\n"])), function (props) {
|
|
110
110
|
return props.theme.colors.darkTextColor;
|
|
111
111
|
});
|
|
112
112
|
var Categories = exports.Categories = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n font-size: 14px;\n font-weight: 300;\n color: #6C6C6C;\n\n @media (min-width: 481px) {\n font-size: 16px;\n }\n"])));
|
|
@@ -161,4 +161,7 @@ var FavoriteWrapper = exports.FavoriteWrapper = _styledComponents.default.div(_t
|
|
|
161
161
|
return props.theme.colors.danger500;
|
|
162
162
|
});
|
|
163
163
|
var ScheduleContainer = exports.ScheduleContainer = _styledComponents.default.div(_templateObject53 || (_templateObject53 = _taggedTemplateLiteral(["\n width: 50%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n background: #4472C4;\n border: 2px solid #000;\n div {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n p {\n margin: 0;\n color: #fff;\n font-size: 12px;\n }\n"])));
|
|
164
|
-
var ClosedContainer = exports.ClosedContainer = _styledComponents.default.div(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["\n text-align: center;\n width: 100%;\n line-break: anywhere;\n"])));
|
|
164
|
+
var ClosedContainer = exports.ClosedContainer = _styledComponents.default.div(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["\n text-align: center;\n width: 100%;\n line-break: anywhere;\n"])));
|
|
165
|
+
var BusinessAddress = exports.BusinessAddress = _styledComponents.default.h6(_templateObject55 || (_templateObject55 = _taggedTemplateLiteral(["\n font-size: 14px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n margin-block-start: 0;\n margin-block-end: 0;\n font-weight: 400;\n color: ", ";\n"])), function (props) {
|
|
166
|
+
return props.theme.colors.darkTextColor;
|
|
167
|
+
});
|
|
@@ -64,7 +64,7 @@ var mapConfigs = {
|
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
var CheckoutUI = function CheckoutUI(props) {
|
|
67
|
-
var
|
|
67
|
+
var _businessDetails$busi, _businessDetails$busi2, _configs$table_numer_, _businessConfigs$find, _businessConfigs$find2, _configs$cash_wallet, _configs$wallet_enabl, _theme$header, _theme$colors, _theme$colors$split, _cart$comment, _cart$offers, _paymethodSelected$da, _paymethodSelected$da2, _cardList$cards, _cartState$cart, _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _instructionsOptions$, _theme$checkout, _theme$checkout2, _theme$checkout3, _theme$checkout4, _loyaltyPlansState$re, _creditPointPlan$busi, _cart$business2, _businessDetails$busi3, _theme$images, _configs$google_maps_, _customerState$user, _customerState$user2, _Object$values2, _businessDetails$busi4, _businessDetails$busi5, _businessDetails$busi6, _businessDetails$busi7, _businessDetails$busi8, _businessDetails$busi9, _businessDetails$erro, _businessDetails$erro2, _businessDetails$busi10, _businessDetails$busi11, _businessDetails$busi12, _configs$driver_tip_t, _configs$driver_tip_u, _configs$driver_tip_t2, _cartState$cart$spot_, _cartState$cart2, _cart$business3, _cart$products2, _ref2, _creditPointPlanOnBus, _configs$driver_tip_t3, _configs$driver_tip_u2, _configs$driver_tip_t4, _customerState$user3, _options$address;
|
|
68
68
|
var cart = props.cart,
|
|
69
69
|
errors = props.errors,
|
|
70
70
|
placing = props.placing,
|
|
@@ -90,9 +90,6 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
90
90
|
alseaCheckPriceError = props.alseaCheckPriceError,
|
|
91
91
|
isLoadingCheckprice = props.isLoadingCheckprice;
|
|
92
92
|
var theme = (0, _styledComponents.useTheme)();
|
|
93
|
-
var _useApi = (0, _orderingComponentsExternal.useApi)(),
|
|
94
|
-
_useApi2 = _slicedToArray(_useApi, 1),
|
|
95
|
-
ordering = _useApi2[0];
|
|
96
93
|
var _useOrder = (0, _orderingComponentsExternal.useOrder)(),
|
|
97
94
|
_useOrder2 = _slicedToArray(_useOrder, 1),
|
|
98
95
|
_useOrder2$ = _useOrder2[0],
|
|
@@ -180,7 +177,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
180
177
|
_useState26 = _slicedToArray(_useState25, 2),
|
|
181
178
|
productLoading = _useState26[0],
|
|
182
179
|
setProductLoading = _useState26[1];
|
|
183
|
-
var shouldActivateOrderDetailModal =
|
|
180
|
+
var shouldActivateOrderDetailModal = isCustomerMode;
|
|
184
181
|
var cardsMethods = ['stripe', 'credomatic'];
|
|
185
182
|
var stripePaymethods = ['stripe', 'stripe_connect', 'stripe_redirect'];
|
|
186
183
|
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 : [];
|
|
@@ -789,9 +786,9 @@ var Checkout = exports.Checkout = function Checkout(props) {
|
|
|
789
786
|
var _useSession3 = (0, _orderingComponentsExternal.useSession)(),
|
|
790
787
|
_useSession4 = _slicedToArray(_useSession3, 1),
|
|
791
788
|
token = _useSession4[0].token;
|
|
792
|
-
var
|
|
793
|
-
|
|
794
|
-
ordering =
|
|
789
|
+
var _useApi = (0, _orderingComponentsExternal.useApi)(),
|
|
790
|
+
_useApi2 = _slicedToArray(_useApi, 1),
|
|
791
|
+
ordering = _useApi2[0];
|
|
795
792
|
var _useLanguage3 = (0, _orderingComponentsExternal.useLanguage)(),
|
|
796
793
|
_useLanguage4 = _slicedToArray(_useLanguage3, 2),
|
|
797
794
|
t = _useLanguage4[1];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-external",
|
|
3
|
-
"version": "14.1.
|
|
3
|
+
"version": "14.1.47",
|
|
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.40",
|
|
92
92
|
"payment": "^2.4.6",
|
|
93
93
|
"polished": "^3.6.6",
|
|
94
94
|
"react-bootstrap-icons": "^1.7.2",
|
|
@@ -13,7 +13,7 @@ const BusinessesMapUI = (props) => {
|
|
|
13
13
|
} = props
|
|
14
14
|
|
|
15
15
|
const [configState] = useConfig()
|
|
16
|
-
const [
|
|
16
|
+
const [{ options, loading }] = useOrder()
|
|
17
17
|
const theme = useTheme()
|
|
18
18
|
const googleMapsControls = {
|
|
19
19
|
defaultZoom: 18,
|
|
@@ -29,43 +29,29 @@ const BusinessesMapUI = (props) => {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
return (
|
|
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
|
-
lat: parseFloat(configState?.configs?.location_default_latitude?.value ?? 0, 10),
|
|
57
|
-
lng: parseFloat(configState?.configs?.location_default_longitude?.value ?? 0, 10)
|
|
58
|
-
}
|
|
59
|
-
)}
|
|
60
|
-
/>
|
|
61
|
-
</WrapperMap>
|
|
62
|
-
{props.afterComponents?.map((AfterComponent, i) => (
|
|
63
|
-
<AfterComponent key={i} {...props} />))}
|
|
64
|
-
{props.afterElements?.map((AfterElement, i) => (
|
|
65
|
-
<React.Fragment key={i}>
|
|
66
|
-
{AfterElement}
|
|
67
|
-
</React.Fragment>))}
|
|
68
|
-
</>
|
|
32
|
+
<WrapperMap disabled={loading}>
|
|
33
|
+
<GoogleMapsMap
|
|
34
|
+
useMapWithBusinessZones
|
|
35
|
+
deactiveAlerts
|
|
36
|
+
businessMap
|
|
37
|
+
apiKey={configState?.configs?.google_maps_api_key?.value}
|
|
38
|
+
location={userLocation}
|
|
39
|
+
locations={businessLocations}
|
|
40
|
+
mapControls={googleMapsControls}
|
|
41
|
+
maxLimitLocation={parseInt(configState?.configs?.meters_to_change_address?.value)}
|
|
42
|
+
onBusinessClick={options.type !== 1 ? onBusinessClick : () => {}}
|
|
43
|
+
businessZones={businessList?.map(business => business?.zones)}
|
|
44
|
+
fallbackIcon={theme.images?.dummies?.businessLogo}
|
|
45
|
+
setErrors={setErrors}
|
|
46
|
+
fixedLocation={!userLocation && (businessLocations?.length
|
|
47
|
+
? { ...businessLocations[0], hideicon: true }
|
|
48
|
+
: {
|
|
49
|
+
lat: parseFloat(configState?.configs?.location_default_latitude?.value ?? 0, 10),
|
|
50
|
+
lng: parseFloat(configState?.configs?.location_default_longitude?.value ?? 0, 10)
|
|
51
|
+
}
|
|
52
|
+
)}
|
|
53
|
+
/>
|
|
54
|
+
</WrapperMap>
|
|
69
55
|
)
|
|
70
56
|
}
|
|
71
57
|
|
|
@@ -16,8 +16,6 @@ const LogoutButtonUI = (props) => {
|
|
|
16
16
|
const { onCustomClick, hideText } = props
|
|
17
17
|
const [, t] = useLanguage()
|
|
18
18
|
|
|
19
|
-
const isHome = window.location.pathname === '/' || window.location.pathname === '/home'
|
|
20
|
-
|
|
21
19
|
const handleLogOutClick = () => {
|
|
22
20
|
window.FB.getLoginStatus((response) => {
|
|
23
21
|
if (response.status === 'connected') {
|
|
@@ -40,14 +38,14 @@ const LogoutButtonUI = (props) => {
|
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
return (
|
|
43
|
-
<MenuLink id='logoutbtn' onClick={handleLogOutClick}
|
|
41
|
+
<MenuLink id='logoutbtn' onClick={handleLogOutClick} style={props.styleContainer}>
|
|
44
42
|
<WrappContent style={props.styleWrappContent}>
|
|
45
|
-
<MenuLinkIcon
|
|
43
|
+
<MenuLinkIcon>
|
|
46
44
|
<FaSignOutAlt />
|
|
47
45
|
</MenuLinkIcon>
|
|
48
46
|
{!hideText && (
|
|
49
47
|
<MenuLinkText>
|
|
50
|
-
<TextInfo
|
|
48
|
+
<TextInfo>
|
|
51
49
|
{t('LOGOUT', 'Logout')}
|
|
52
50
|
</TextInfo>
|
|
53
51
|
</MenuLinkText>
|
|
@@ -168,20 +168,24 @@ export const Header = (props) => {
|
|
|
168
168
|
{isShowOrderOptions && (
|
|
169
169
|
<>
|
|
170
170
|
<Menu className='left-header' id='center-side'>
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
171
|
+
{windowSize.width > 820 && (
|
|
172
|
+
<>
|
|
173
|
+
<AddressMenu
|
|
174
|
+
onClick={(e) => handleClickUserCustomer(e)}
|
|
175
|
+
>
|
|
176
|
+
<GeoAlt /> <span><p>{orderState.options?.address?.address?.split(',')?.[0] || t('WHAT_IS_YOUR_ADDRESS', 'What\'s your address?')}</p></span>
|
|
177
|
+
</AddressMenu>
|
|
178
|
+
<Divider />
|
|
179
|
+
</>
|
|
180
|
+
)}
|
|
181
|
+
{isCustomerMode && (
|
|
178
182
|
<CustomerInfo
|
|
179
183
|
onClick={(e) => handleClickUserCustomer(e)}
|
|
180
184
|
>
|
|
181
185
|
<span>
|
|
182
186
|
<p>
|
|
183
|
-
{windowSize.width >
|
|
184
|
-
{' '}{windowSize.width >
|
|
187
|
+
{windowSize.width > 1200 ? userCustomer?.name : cutCharactersName({ str: userCustomer?.name })}
|
|
188
|
+
{' '}{windowSize.width > 1200 ? userCustomer?.lastname : null}
|
|
185
189
|
</p>
|
|
186
190
|
</span>
|
|
187
191
|
<span
|
|
@@ -218,14 +222,12 @@ export const Header = (props) => {
|
|
|
218
222
|
</>
|
|
219
223
|
)}
|
|
220
224
|
<>
|
|
221
|
-
{user?.level === 0 && (
|
|
225
|
+
{user?.level === 0 && windowSize.width > 1200 && (
|
|
222
226
|
<>
|
|
223
227
|
{!isShowOrderOptions && (
|
|
224
228
|
<Menu className='left-header invisible' id='center-side' />
|
|
225
229
|
)}
|
|
226
230
|
<AdminAreaPopover
|
|
227
|
-
withLogout
|
|
228
|
-
isCustomerMode={isCustomerMode}
|
|
229
231
|
open={openPopover.admin}
|
|
230
232
|
onClick={() => handleTogglePopover('admin')}
|
|
231
233
|
onClose={() => handleClosePopover('admin')}
|
|
@@ -16,25 +16,7 @@ export const InnerHeader = styled.div`
|
|
|
16
16
|
align-items: center;
|
|
17
17
|
|
|
18
18
|
#center-side {
|
|
19
|
-
width:
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@media (min-width: 1024px) {
|
|
23
|
-
#center-side {
|
|
24
|
-
width: calc(60% - 100px);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@media (min-width: 1200px) {
|
|
29
|
-
#center-side {
|
|
30
|
-
width: calc(60% - 160px);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@media (min-width: 1500px) {
|
|
35
|
-
#center-side {
|
|
36
|
-
width: calc(60% - 200px);
|
|
37
|
-
}
|
|
19
|
+
width: calc(60% - 30px);
|
|
38
20
|
}
|
|
39
21
|
`
|
|
40
22
|
|
|
@@ -241,32 +223,28 @@ export const SubMenu = styled(InnerHeader)`
|
|
|
241
223
|
`
|
|
242
224
|
|
|
243
225
|
export const CustomerInfo = styled.div`
|
|
244
|
-
display:
|
|
226
|
+
display: flex;
|
|
227
|
+
justify-content: center;
|
|
228
|
+
align-items: center;
|
|
245
229
|
cursor: pointer;
|
|
246
230
|
flex: 1;
|
|
247
231
|
position: relative;
|
|
248
|
-
@media (min-width: 450px) {
|
|
249
|
-
display: flex;
|
|
250
|
-
justify-content: center;
|
|
251
|
-
align-items: center;
|
|
252
232
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
233
|
+
span {
|
|
234
|
+
align-items: center;
|
|
235
|
+
margin: 0;
|
|
236
|
+
p {
|
|
237
|
+
max-width: 250px;
|
|
238
|
+
overflow: hidden;
|
|
239
|
+
text-overflow: ellipsis;
|
|
240
|
+
white-space: nowrap;
|
|
241
|
+
color: #909BA9;
|
|
256
242
|
margin: 0;
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
color: #909BA9;
|
|
263
|
-
margin: 0;
|
|
264
|
-
}
|
|
265
|
-
svg {
|
|
266
|
-
color: #748194;
|
|
267
|
-
margin: 0;
|
|
268
|
-
font-size: 20px;
|
|
269
|
-
}
|
|
243
|
+
}
|
|
244
|
+
svg {
|
|
245
|
+
color: #748194;
|
|
246
|
+
margin: 0;
|
|
247
|
+
font-size: 20px;
|
|
270
248
|
}
|
|
271
249
|
}
|
|
272
250
|
`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { useUtils, useLanguage, useConfig, useOrder } from 'ordering-components-external'
|
|
3
|
-
import
|
|
3
|
+
import { Cart3 } from 'react-bootstrap-icons'
|
|
4
4
|
import FaMapMarkerAlt from '@meronex/icons/fa/FaMapMarkerAlt'
|
|
5
5
|
|
|
6
6
|
import {
|
|
@@ -23,57 +23,36 @@ export const HeaderOption = (props) => {
|
|
|
23
23
|
const [orderStatus] = useOrder()
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
|
-
|
|
27
|
-
{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
<Container
|
|
27
|
+
variant={variant}
|
|
28
|
+
onClick={() => props.onClick(variant)}
|
|
29
|
+
>
|
|
30
|
+
{variant === 'cart' && (
|
|
31
|
+
<span>
|
|
32
|
+
<Cart3 />
|
|
33
|
+
{totalCarts > 0 && <span>{totalCarts}</span>}
|
|
34
|
+
</span>
|
|
35
|
+
)}
|
|
36
|
+
{variant === 'address' && (
|
|
37
|
+
<>
|
|
38
|
+
<FaMapMarkerAlt id='icon' />
|
|
39
|
+
{addressState || t('WHAT_IS_YOUR_ADDRESS', 'What\'s your address?')}
|
|
40
|
+
</>
|
|
41
|
+
)}
|
|
42
|
+
{variant === 'moment' && (
|
|
43
|
+
<>
|
|
44
|
+
{momentState
|
|
45
|
+
? parseDate(momentState, { outputFormat: configs?.dates_moment_format?.value })
|
|
46
|
+
: t('ASAP_ABBREVIATION', 'ASAP')}
|
|
47
|
+
</>
|
|
48
|
+
)}
|
|
31
49
|
{
|
|
32
|
-
|
|
33
|
-
|
|
50
|
+
variant === 'delivery' && (
|
|
51
|
+
<DeliveryType>
|
|
52
|
+
{(orderTypeList && orderTypeList[orderStatus?.options.type - 1]) || t('DELIVERY', 'Delivery')}
|
|
53
|
+
</DeliveryType>
|
|
54
|
+
)
|
|
34
55
|
}
|
|
35
|
-
|
|
36
|
-
variant={variant}
|
|
37
|
-
onClick={() => props.onClick(variant)}
|
|
38
|
-
isHome={props.isHome}
|
|
39
|
-
>
|
|
40
|
-
{variant === 'cart' && (
|
|
41
|
-
<span>
|
|
42
|
-
<AiOutlineShoppingCart id='icon' />
|
|
43
|
-
{totalCarts > 0 && <p>{totalCarts}</p>}
|
|
44
|
-
</span>
|
|
45
|
-
)}
|
|
46
|
-
{variant === 'address' && (
|
|
47
|
-
<>
|
|
48
|
-
<FaMapMarkerAlt id='icon' />
|
|
49
|
-
{addressState || t('WHAT_IS_YOUR_ADDRESS', 'What\'s your address?')}
|
|
50
|
-
</>
|
|
51
|
-
)}
|
|
52
|
-
{variant === 'moment' && (
|
|
53
|
-
<>
|
|
54
|
-
{momentState
|
|
55
|
-
? parseDate(momentState, { outputFormat: configs?.dates_moment_format?.value })
|
|
56
|
-
: t('ASAP_ABBREVIATION', 'ASAP')}
|
|
57
|
-
</>
|
|
58
|
-
)}
|
|
59
|
-
{
|
|
60
|
-
variant === 'delivery' && (
|
|
61
|
-
<DeliveryType>
|
|
62
|
-
{(orderTypeList && orderTypeList[orderStatus?.options.type - 1]) || t('DELIVERY', 'Delivery')}
|
|
63
|
-
</DeliveryType>
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
</Container>
|
|
67
|
-
{
|
|
68
|
-
props.afterComponents?.map((AfterComponent, i) => (
|
|
69
|
-
<AfterComponent key={i} {...props} />))
|
|
70
|
-
}
|
|
71
|
-
{
|
|
72
|
-
props.afterElements?.map((AfterElement, i) => (
|
|
73
|
-
<React.Fragment key={i}>
|
|
74
|
-
{AfterElement}
|
|
75
|
-
</React.Fragment>))
|
|
76
|
-
}
|
|
77
|
-
</>
|
|
56
|
+
</Container>
|
|
78
57
|
)
|
|
79
58
|
}
|