ordering-ui-external 1.7.2 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{0.ordering-ui.f9c3deec77a8e21645ed.js → 0.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{1.ordering-ui.f9c3deec77a8e21645ed.js → 1.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/2.ordering-ui.a7de4e953ec3c5879d9b.js +1 -0
- package/_bundles/{4.ordering-ui.f9c3deec77a8e21645ed.js → 4.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{5.ordering-ui.f9c3deec77a8e21645ed.js → 5.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{6.ordering-ui.f9c3deec77a8e21645ed.js → 6.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{7.ordering-ui.f9c3deec77a8e21645ed.js → 7.ordering-ui.a7de4e953ec3c5879d9b.js} +2 -2
- package/_bundles/{7.ordering-ui.f9c3deec77a8e21645ed.js.LICENSE.txt → 7.ordering-ui.a7de4e953ec3c5879d9b.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.f9c3deec77a8e21645ed.js → 8.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{9.ordering-ui.f9c3deec77a8e21645ed.js → 9.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/ordering-ui.a7de4e953ec3c5879d9b.js +2 -0
- package/_bundles/{ordering-ui.f9c3deec77a8e21645ed.js.LICENSE.txt → ordering-ui.a7de4e953ec3c5879d9b.js.LICENSE.txt} +0 -0
- package/_modules/components/BusinessInformation/index.js +4 -8
- package/_modules/components/OrdersOption/styles.js +4 -2
- package/_modules/components/Pagination/index.js +100 -0
- package/_modules/components/Pagination/styles.js +56 -0
- package/_modules/components/SmartAppBanner/index.js +2 -1
- package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +92 -0
- package/_modules/components/VerticalOrdersLayout/index.js +115 -41
- package/_modules/components/VerticalOrdersLayout/styles.js +25 -11
- package/_modules/index.js +7 -0
- package/_modules/themes/five/src/components/AccordionDropdown/index.js +15 -4
- package/_modules/themes/five/src/components/AccordionDropdown/styles.js +14 -4
- package/_modules/themes/five/src/components/AddressList/styles.js +2 -2
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +17 -10
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +48 -42
- package/_modules/themes/five/src/components/BusinessListingSearch/index.js +5 -1
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +0 -3
- package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/index.js +22 -13
- package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +15 -7
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +3 -0
- package/_modules/themes/five/src/components/BusinessTypeFilter/index.js +15 -5
- package/_modules/themes/five/src/components/BusinessesListing/index.js +6 -13
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +66 -40
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +13 -7
- package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +16 -7
- package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +21 -15
- package/_modules/themes/five/src/components/CardForm/index.js +17 -3
- package/_modules/themes/five/src/components/CardForm/styles.js +14 -6
- package/_modules/themes/five/src/components/CartPopover/index.js +6 -4
- package/_modules/themes/five/src/components/CartPopover/styles.js +4 -2
- package/_modules/themes/five/src/components/Footer/index.js +16 -6
- package/_modules/themes/five/src/components/Footer/styles.js +11 -9
- package/_modules/themes/five/src/components/Header/index.js +14 -9
- package/_modules/themes/five/src/components/Header/styles.js +64 -44
- package/_modules/themes/five/src/components/HeaderOption/index.js +9 -2
- package/_modules/themes/five/src/components/HeaderOption/styles.js +8 -2
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +9 -3
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +5 -3
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/index.js +9 -19
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +23 -19
- package/_modules/themes/five/src/components/InputPhoneNumber/index.js +1 -0
- package/_modules/themes/five/src/components/LoginForm/index.js +3 -2
- package/_modules/themes/five/src/components/MyOrders/index.js +24 -56
- package/_modules/themes/five/src/components/MyOrders/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderDetails/index.js +5 -2
- package/_modules/themes/five/src/components/OrderDetails/styles.js +24 -24
- package/_modules/themes/five/src/components/OrderItAgain/styles.js +6 -2
- package/_modules/themes/five/src/components/OrdersOption/index.js +18 -18
- package/_modules/themes/five/src/components/OrdersOption/styles.js +2 -2
- package/_modules/themes/five/src/components/PageBanner/index.js +50 -0
- package/_modules/themes/five/src/components/PageBanner/styles.js +18 -0
- package/_modules/themes/five/src/components/Pagination/index.js +99 -0
- package/_modules/themes/five/src/components/Pagination/styles.js +56 -0
- package/_modules/themes/five/src/components/ProductForm/index.js +39 -23
- package/_modules/themes/five/src/components/ProductForm/styles.js +74 -38
- package/_modules/themes/five/src/components/Promotions/index.js +7 -2
- package/_modules/themes/five/src/components/Promotions/styles.js +16 -14
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +31 -10
- package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +19 -11
- package/_modules/themes/five/src/components/SidebarMenu/styles.js +1 -1
- package/_modules/themes/five/src/components/SignUpForm/index.js +3 -2
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +7 -17
- package/_modules/themes/five/src/components/SingleProductCard/index.js +7 -298
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +310 -0
- package/_modules/themes/five/src/components/SingleProductCard/{styles.js → layouts/original/styles.js} +36 -32
- package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +305 -0
- package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/styles.js +143 -0
- package/_modules/themes/five/src/components/StripeElementsForm/index.js +1 -0
- package/_modules/themes/five/src/components/UserPopover/index.js +3 -1
- package/_modules/themes/five/src/components/UserPopover/styles.js +4 -3
- package/_modules/themes/five/src/components/UserProfileForm/styles.js +5 -8
- package/_modules/themes/six/src/components/BusinessController/index.js +81 -15
- package/_modules/themes/six/src/components/BusinessController/styles.js +58 -30
- package/_modules/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +5 -3
- package/_modules/themes/six/src/components/BusinessesMap/styles.js +1 -1
- package/_modules/themes/six/src/components/SearchBar/index.js +19 -10
- package/_modules/themes/six/src/components/SearchBar/styles.js +44 -16
- package/index-template.js +3 -1
- package/package.json +2 -2
- package/src/components/BusinessInformation/index.js +3 -8
- package/src/components/OrdersOption/styles.js +5 -5
- package/src/components/Pagination/index.js +107 -0
- package/src/components/Pagination/styles.js +106 -0
- package/src/components/SmartAppBanner/index.js +1 -0
- package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +89 -0
- package/src/components/VerticalOrdersLayout/index.js +86 -48
- package/src/components/VerticalOrdersLayout/styles.js +66 -22
- package/src/index.js +2 -0
- package/src/themes/five/src/components/AccordionDropdown/index.js +19 -6
- package/src/themes/five/src/components/AccordionDropdown/styles.js +25 -1
- package/src/themes/five/src/components/AddressList/styles.js +2 -0
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +21 -11
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +9 -3
- package/src/themes/five/src/components/BusinessListingSearch/index.js +1 -0
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +0 -2
- package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/index.js +23 -12
- package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +12 -4
- package/src/themes/five/src/components/BusinessProductsListing/index.js +3 -0
- package/src/themes/five/src/components/BusinessTypeFilter/index.js +15 -5
- package/src/themes/five/src/components/BusinessesListing/index.js +5 -5
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +54 -25
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +40 -26
- package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +19 -6
- package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +38 -3
- package/src/themes/five/src/components/CardForm/index.js +49 -8
- package/src/themes/five/src/components/CardForm/styles.js +20 -2
- package/src/themes/five/src/components/CartPopover/index.js +2 -1
- package/src/themes/five/src/components/CartPopover/styles.js +3 -3
- package/src/themes/five/src/components/Footer/index.js +15 -6
- package/src/themes/five/src/components/Footer/styles.js +15 -14
- package/src/themes/five/src/components/Header/index.js +6 -4
- package/src/themes/five/src/components/Header/styles.js +14 -11
- package/src/themes/five/src/components/HeaderOption/index.js +13 -10
- package/src/themes/five/src/components/HeaderOption/styles.js +2 -2
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +22 -10
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +8 -0
- package/src/themes/five/src/components/HorizontalOrdersLayout/index.js +24 -36
- package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +12 -1
- package/src/themes/five/src/components/InputPhoneNumber/index.js +1 -0
- package/src/themes/five/src/components/LoginForm/index.js +2 -1
- package/src/themes/five/src/components/MyOrders/index.js +20 -62
- package/src/themes/five/src/components/MyOrders/styles.js +1 -2
- package/src/themes/five/src/components/OrderDetails/index.js +9 -0
- package/src/themes/five/src/components/OrderDetails/styles.js +0 -55
- package/src/themes/five/src/components/OrderItAgain/styles.js +18 -0
- package/src/themes/five/src/components/OrdersOption/index.js +10 -16
- package/src/themes/five/src/components/OrdersOption/styles.js +1 -3
- package/src/themes/five/src/components/PageBanner/index.js +58 -0
- package/src/themes/five/src/components/PageBanner/styles.js +58 -0
- package/src/themes/five/src/components/Pagination/index.js +106 -0
- package/src/themes/five/src/components/Pagination/styles.js +106 -0
- package/src/themes/five/src/components/ProductForm/index.js +108 -84
- package/src/themes/five/src/components/ProductForm/styles.js +94 -12
- package/src/themes/five/src/components/Promotions/index.js +22 -16
- package/src/themes/five/src/components/Promotions/styles.js +10 -4
- package/src/themes/five/src/components/RenderProductsLayout/index.js +94 -66
- package/src/themes/five/src/components/RenderProductsLayout/styles.js +23 -22
- package/src/themes/five/src/components/SidebarMenu/styles.js +1 -1
- package/src/themes/five/src/components/SignUpForm/index.js +2 -1
- package/src/themes/five/src/components/SingleOrderCard/index.js +0 -21
- package/src/themes/five/src/components/SingleProductCard/index.js +7 -300
- package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +312 -0
- package/src/themes/five/src/components/SingleProductCard/{styles.js → layouts/original/styles.js} +9 -5
- package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +313 -0
- package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/styles.js +353 -0
- package/src/themes/five/src/components/StripeElementsForm/index.js +1 -0
- package/src/themes/five/src/components/UserPopover/index.js +2 -0
- package/src/themes/five/src/components/UserPopover/styles.js +2 -2
- package/src/themes/five/src/components/UserProfileForm/styles.js +3 -11
- package/src/themes/six/src/components/BusinessController/index.js +163 -62
- package/src/themes/six/src/components/BusinessController/styles.js +53 -14
- package/src/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +3 -1
- package/src/themes/six/src/components/BusinessesMap/styles.js +1 -1
- package/src/themes/six/src/components/SearchBar/index.js +27 -8
- package/src/themes/six/src/components/SearchBar/styles.js +33 -2
- package/template/app.js +364 -364
- package/template/assets/images/chew_logo.png +0 -0
- package/template/components/HelmetTags/index.js +5 -4
- package/_bundles/2.ordering-ui.f9c3deec77a8e21645ed.js +0 -1
- package/_bundles/ordering-ui.f9c3deec77a8e21645ed.js +0 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ImageWrapper = exports.BannerContainer = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject, _templateObject2;
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
+
var BannerContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n margin: 40px 0;\n overflow: hidden;\n .swiper-slide {\n /* position: relative; */\n /* height: 256px; */\n }\n .swiper-button-next {\n background-image: url(", ");\n background-color: #d1d0d04d;\n background-repeat: no-repeat;\n background-position: 55% center;\n width: 32px;\n height: 32px;\n box-shadow: rgb(0 0 0 / 7%) 0px 4px 10px;\n border-radius: 50%;\n transition: all 0.2s ease;\n &:hover {\n transform: scale(1.05);\n }\n }\n .swiper-button-prev {\n background-image: url(", ");\n background-color: #d1d0d04d;\n background-repeat: no-repeat;\n background-position: 45% center;\n width: 32px;\n height: 32px;\n border-radius: 50%;\n box-shadow: rgb(0 0 0 / 7%) 0px 4px 10px;\n transition: all 0.2s ease;\n &:hover {\n transform: scale(1.05);\n }\n }\n .swiper-button-next::after, .swiper-button-prev::after {\n display: none;\n }\n"])), function (props) {
|
|
12
|
+
return props.theme.images.general.rightArrow;
|
|
13
|
+
}, function (props) {
|
|
14
|
+
return props.theme.images.general.leftArrow;
|
|
15
|
+
});
|
|
16
|
+
exports.BannerContainer = BannerContainer;
|
|
17
|
+
var ImageWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n padding-top: 260px;\n position: relative;\n .banner-img {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n @media (min-width: 768px) {\n padding-top: 18%;\n }\n"])));
|
|
18
|
+
exports.ImageWrapper = ImageWrapper;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Pagination = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _orderingComponentsExternal = require("ordering-components-external");
|
|
10
|
+
var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
11
|
+
var _styles = require("./styles");
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
+
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."); }
|
|
16
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
18
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
19
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
+
var Pagination = function Pagination(props) {
|
|
21
|
+
var currentPage = props.currentPage,
|
|
22
|
+
totalPages = props.totalPages,
|
|
23
|
+
handleChangePage = props.handleChangePage;
|
|
24
|
+
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
25
|
+
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
26
|
+
t = _useLanguage2[1];
|
|
27
|
+
var _useState = (0, _react.useState)([]),
|
|
28
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
+
visiblePages = _useState2[0],
|
|
30
|
+
setVisiblePages = _useState2[1];
|
|
31
|
+
var _useState3 = (0, _react.useState)(currentPage),
|
|
32
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
33
|
+
activePage = _useState4[0],
|
|
34
|
+
setActivePage = _useState4[1];
|
|
35
|
+
var filterPages = function filterPages(visiblePages, totalPages) {
|
|
36
|
+
return visiblePages.filter(function (page) {
|
|
37
|
+
return page <= totalPages;
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
var getVisiblePages = function getVisiblePages(page, total) {
|
|
41
|
+
if (total < 7) {
|
|
42
|
+
return filterPages([1, 2, 3, 4, 5, 6], total);
|
|
43
|
+
} else {
|
|
44
|
+
if (page % 5 >= 0 && page > 4 && page + 2 < total) {
|
|
45
|
+
return [1, page - 1, page, page + 1, total];
|
|
46
|
+
} else if (page % 5 >= 0 && page > 4 && page + 2 >= total) {
|
|
47
|
+
return [1, total - 3, total - 2, total - 1, total];
|
|
48
|
+
} else {
|
|
49
|
+
return [1, 2, 3, 4, 5, total];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
var changePage = function changePage(page) {
|
|
54
|
+
if (page === activePage) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
setActivePage(page);
|
|
58
|
+
var _visiblePages = getVisiblePages(page, totalPages);
|
|
59
|
+
setVisiblePages(filterPages(_visiblePages, totalPages));
|
|
60
|
+
handleChangePage(page);
|
|
61
|
+
};
|
|
62
|
+
(0, _react.useEffect)(function () {
|
|
63
|
+
if (!totalPages) return;
|
|
64
|
+
setVisiblePages(getVisiblePages(null, totalPages));
|
|
65
|
+
}, [totalPages]);
|
|
66
|
+
(0, _react.useEffect)(function () {
|
|
67
|
+
setActivePage(currentPage);
|
|
68
|
+
var _visiblePages = getVisiblePages(currentPage, totalPages);
|
|
69
|
+
setVisiblePages(filterPages(_visiblePages, totalPages));
|
|
70
|
+
}, [currentPage]);
|
|
71
|
+
return /*#__PURE__*/_react.default.createElement(_styles.PaginationContainer, null, /*#__PURE__*/_react.default.createElement(_styles.PaginationButtonContainer, null, /*#__PURE__*/_react.default.createElement(_styles.PageButton, {
|
|
72
|
+
disabled: activePage === 1,
|
|
73
|
+
onClick: function onClick() {
|
|
74
|
+
return activePage !== 1 && changePage(activePage - 1);
|
|
75
|
+
}
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.ChevronLeft, null)), visiblePages.map(function (page, index, array) {
|
|
77
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
78
|
+
key: page
|
|
79
|
+
}, array[index - 1] + 2 <= page ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.PageButton, {
|
|
80
|
+
noEffect: true
|
|
81
|
+
}, "..."), /*#__PURE__*/_react.default.createElement(_styles.PageButton, {
|
|
82
|
+
active: activePage === page,
|
|
83
|
+
onClick: function onClick() {
|
|
84
|
+
return changePage(page);
|
|
85
|
+
}
|
|
86
|
+
}, page)) : /*#__PURE__*/_react.default.createElement(_styles.PageButton, {
|
|
87
|
+
active: activePage === page,
|
|
88
|
+
onClick: function onClick() {
|
|
89
|
+
return changePage(page);
|
|
90
|
+
}
|
|
91
|
+
}, page));
|
|
92
|
+
}), /*#__PURE__*/_react.default.createElement(_styles.PageButton, {
|
|
93
|
+
disabled: activePage === totalPages,
|
|
94
|
+
onClick: function onClick() {
|
|
95
|
+
return activePage !== totalPages && changePage(activePage + 1);
|
|
96
|
+
}
|
|
97
|
+
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.ChevronRight, null))));
|
|
98
|
+
};
|
|
99
|
+
exports.Pagination = Pagination;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.PaginationContainer = exports.PaginationButtonContainer = exports.PageSizeTitle = exports.PageSizeContainer = exports.PageButton = exports.Option = void 0;
|
|
8
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
+
var _polished = require("polished");
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
|
11
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
14
|
+
var PaginationContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: flex-end;\n"])));
|
|
15
|
+
exports.PaginationContainer = PaginationContainer;
|
|
16
|
+
var PaginationButtonContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n ", "\n"])), function (props) {
|
|
17
|
+
var _props$theme;
|
|
18
|
+
return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.rtl ? (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-left: 20px;\n "]))) : (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-right: 20px;\n "])));
|
|
19
|
+
});
|
|
20
|
+
exports.PaginationButtonContainer = PaginationButtonContainer;
|
|
21
|
+
var PageButton = _styledComponents.default.button(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background-color: transparent;\n font-size: 14px;\n color: ", ";\n outline: none;\n border: none;\n border-radius: 27px;\n min-width: 27px;\n min-height: 27px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0px 7px;\n\n ", "\n\n &:hover {\n background-color: #1507260a;\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n &:active {\n background-color: #1507261a;\n }\n\n ", "\n\n ", "\n"])), function (props) {
|
|
22
|
+
return props.theme.colors.headingColor;
|
|
23
|
+
}, function (props) {
|
|
24
|
+
var _props$theme2;
|
|
25
|
+
return (_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 && _props$theme2.rtl ? (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-left: 3px;\n "]))) : (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-right: 3px;\n "])));
|
|
26
|
+
}, function (_ref) {
|
|
27
|
+
var active = _ref.active;
|
|
28
|
+
return active && (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n background-color: ", ";\n color: ", ";\n &:hover {\n background: ", ";\n }\n &:active {\n background: ", ";\n }\n "])), function (props) {
|
|
29
|
+
return props.theme.colors.primary;
|
|
30
|
+
}, function (props) {
|
|
31
|
+
return props.theme.colors.primaryContrast;
|
|
32
|
+
}, function (props) {
|
|
33
|
+
return (0, _polished.darken)(0.04, props.theme.colors.primary);
|
|
34
|
+
}, function (props) {
|
|
35
|
+
return (0, _polished.darken)(0.1, props.theme.colors.primary);
|
|
36
|
+
});
|
|
37
|
+
}, function (_ref2) {
|
|
38
|
+
var noEffect = _ref2.noEffect;
|
|
39
|
+
return noEffect && (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n cursor: initial;\n &:hover {\n background-color: transparent;\n }\n &:active {\n background-color: transparent;\n }\n "])));
|
|
40
|
+
});
|
|
41
|
+
exports.PageButton = PageButton;
|
|
42
|
+
var PageSizeContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin: 10px 0;\n\n .select {\n border-color: ", ";\n padding: 5px 0;\n\n > div:first-child {\n padding-left: 10px;\n padding-right: 10px;\n }\n }\n"])), function (props) {
|
|
43
|
+
return props.theme.colors.lightGray;
|
|
44
|
+
});
|
|
45
|
+
exports.PageSizeContainer = PageSizeContainer;
|
|
46
|
+
var PageSizeTitle = _styledComponents.default.p(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin: 0px;\n color: ", ";\n font-size: 12px;\n ", "\n"])), function (props) {
|
|
47
|
+
return props.theme.colors.lightGray;
|
|
48
|
+
}, function (props) {
|
|
49
|
+
var _props$theme3;
|
|
50
|
+
return (_props$theme3 = props.theme) !== null && _props$theme3 !== void 0 && _props$theme3.rtl ? (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-left: 10px;\n "]))) : (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-right: 10px;\n "])));
|
|
51
|
+
});
|
|
52
|
+
exports.PageSizeTitle = PageSizeTitle;
|
|
53
|
+
var Option = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n font-size: 14px;\n color: ", ";\n"])), function (props) {
|
|
54
|
+
return props.theme.colors.lightGray;
|
|
55
|
+
});
|
|
56
|
+
exports.Option = Option;
|
|
@@ -11,6 +11,7 @@ var _FiMinusCircle = _interopRequireDefault(require("@meronex/icons/fi/FiMinusCi
|
|
|
11
11
|
var _FiPlusCircle = _interopRequireDefault(require("@meronex/icons/fi/FiPlusCircle"));
|
|
12
12
|
var _MdcPlayCircleOutline = _interopRequireDefault(require("@meronex/icons/mdc/MdcPlayCircleOutline"));
|
|
13
13
|
var _LinkableText = require("../LinkableText");
|
|
14
|
+
var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
14
15
|
var _AutoScroll = require("../AutoScroll");
|
|
15
16
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
16
17
|
var _utils = require("../../../../../utils");
|
|
@@ -69,7 +70,8 @@ var ProductOptionsUI = function ProductOptionsUI(props) {
|
|
|
69
70
|
handleChangeIngredientState = props.handleChangeIngredientState,
|
|
70
71
|
handleChangeSuboptionState = props.handleChangeSuboptionState,
|
|
71
72
|
handleChangeCommentState = props.handleChangeCommentState,
|
|
72
|
-
productAddedToCartLength = props.productAddedToCartLength
|
|
73
|
+
productAddedToCartLength = props.productAddedToCartLength,
|
|
74
|
+
handleFavoriteProduct = props.handleFavoriteProduct;
|
|
73
75
|
var product = productObject.product,
|
|
74
76
|
loading = productObject.loading,
|
|
75
77
|
error = productObject.error;
|
|
@@ -168,6 +170,14 @@ var ProductOptionsUI = function ProductOptionsUI(props) {
|
|
|
168
170
|
closeModal();
|
|
169
171
|
}
|
|
170
172
|
};
|
|
173
|
+
var handleChangeFavorite = function handleChangeFavorite() {
|
|
174
|
+
if (auth) {
|
|
175
|
+
handleFavoriteProduct && handleFavoriteProduct(product, !(product !== null && product !== void 0 && product.favorite));
|
|
176
|
+
} else {
|
|
177
|
+
setModalPageToShow('login');
|
|
178
|
+
setModalIsOpen(true);
|
|
179
|
+
}
|
|
180
|
+
};
|
|
171
181
|
var handleSaveProduct = function handleSaveProduct() {
|
|
172
182
|
var isErrors = Object.values(errors).length > 0;
|
|
173
183
|
if (!isErrors) {
|
|
@@ -393,18 +403,7 @@ var ProductOptionsUI = function ProductOptionsUI(props) {
|
|
|
393
403
|
className: "product-container",
|
|
394
404
|
ref: productContainerRef,
|
|
395
405
|
useKioskApp: props.useKioskApp
|
|
396
|
-
},
|
|
397
|
-
width: 90
|
|
398
|
-
}, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
399
|
-
variant: "rect",
|
|
400
|
-
height: 50
|
|
401
|
-
}), /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
402
|
-
variant: "rect",
|
|
403
|
-
height: 50
|
|
404
|
-
}), /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
405
|
-
variant: "rect",
|
|
406
|
-
height: 200
|
|
407
|
-
})), product && !loading && !error && /*#__PURE__*/_react.default.createElement(_styles.ProductShareWrapper, null, !props.useKioskApp ? /*#__PURE__*/_react.default.createElement(_ProductShare.ProductShare, {
|
|
406
|
+
}, product && !error && /*#__PURE__*/_react.default.createElement(_styles.ProductShareWrapper, null, !props.useKioskApp ? /*#__PURE__*/_react.default.createElement(_ProductShare.ProductShare, {
|
|
408
407
|
defaultUrl: urlToShare,
|
|
409
408
|
slug: businessSlug,
|
|
410
409
|
categoryId: product === null || product === void 0 ? void 0 : product.category_id,
|
|
@@ -414,7 +413,7 @@ var ProductOptionsUI = function ProductOptionsUI(props) {
|
|
|
414
413
|
style: {
|
|
415
414
|
height: 30
|
|
416
415
|
}
|
|
417
|
-
})),
|
|
416
|
+
})), product && /*#__PURE__*/_react.default.createElement(_styles.WrapperImage, null, /*#__PURE__*/_react.default.createElement(_styles.SwiperWrapper, {
|
|
418
417
|
isSoldOut: isSoldOut
|
|
419
418
|
}, /*#__PURE__*/_react.default.createElement(_react2.Swiper, {
|
|
420
419
|
spaceBetween: 10,
|
|
@@ -430,14 +429,15 @@ var ProductOptionsUI = function ProductOptionsUI(props) {
|
|
|
430
429
|
onSlideChange: function onSlideChange() {
|
|
431
430
|
return handleSlideChange();
|
|
432
431
|
}
|
|
433
|
-
}, gallery.map(function (img, i) {
|
|
432
|
+
}, gallery === null || gallery === void 0 ? void 0 : gallery.map(function (img, i) {
|
|
434
433
|
return /*#__PURE__*/_react.default.createElement(_react2.SwiperSlide, {
|
|
435
434
|
key: i
|
|
436
435
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
437
436
|
src: img,
|
|
438
|
-
alt: ""
|
|
437
|
+
alt: "",
|
|
438
|
+
className: "active-img"
|
|
439
439
|
}));
|
|
440
|
-
}), videoGallery && videoGallery.length > 0 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, videoGallery.map(function (video, j) {
|
|
440
|
+
}), videoGallery && (videoGallery === null || videoGallery === void 0 ? void 0 : videoGallery.length) > 0 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, videoGallery === null || videoGallery === void 0 ? void 0 : videoGallery.map(function (video, j) {
|
|
441
441
|
return /*#__PURE__*/_react.default.createElement(_react2.SwiperSlide, {
|
|
442
442
|
key: j
|
|
443
443
|
}, /*#__PURE__*/_react.default.createElement("iframe", {
|
|
@@ -481,25 +481,41 @@ var ProductOptionsUI = function ProductOptionsUI(props) {
|
|
|
481
481
|
observer: true,
|
|
482
482
|
observeParents: true,
|
|
483
483
|
parallax: true
|
|
484
|
-
}, gallery.map(function (img, i) {
|
|
484
|
+
}, gallery === null || gallery === void 0 ? void 0 : gallery.map(function (img, i) {
|
|
485
485
|
return /*#__PURE__*/_react.default.createElement(_react2.SwiperSlide, {
|
|
486
486
|
key: i
|
|
487
487
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
488
488
|
src: img,
|
|
489
489
|
alt: ""
|
|
490
490
|
}));
|
|
491
|
-
}), videoGallery && videoGallery.length > 0 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, videoGallery.map(function (video, j) {
|
|
491
|
+
}), videoGallery && (videoGallery === null || videoGallery === void 0 ? void 0 : videoGallery.length) > 0 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, videoGallery === null || videoGallery === void 0 ? void 0 : videoGallery.map(function (video, j) {
|
|
492
492
|
return /*#__PURE__*/_react.default.createElement(_react2.SwiperSlide, {
|
|
493
493
|
key: j
|
|
494
494
|
}, /*#__PURE__*/_react.default.createElement(_styles.VideoGalleryWrapper, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
495
495
|
src: getOverFlowImage(video),
|
|
496
496
|
alt: ""
|
|
497
497
|
}), /*#__PURE__*/_react.default.createElement(_MdcPlayCircleOutline.default, null)));
|
|
498
|
-
}))))),
|
|
499
|
-
|
|
500
|
-
},
|
|
498
|
+
}))))), loading && !error && /*#__PURE__*/_react.default.createElement(_styles.SkeletonBlock, {
|
|
499
|
+
width: 90
|
|
500
|
+
}, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
501
|
+
variant: "rect",
|
|
502
|
+
height: 50
|
|
503
|
+
}), /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
504
|
+
variant: "rect",
|
|
505
|
+
height: 50
|
|
506
|
+
}), /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
507
|
+
variant: "rect",
|
|
508
|
+
height: 200
|
|
509
|
+
})), !loading && !error && product && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.ProductInfo, null, /*#__PURE__*/_react.default.createElement(_styles.ProductFormTitle, null, /*#__PURE__*/_react.default.createElement(_styles.TitleWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.ProductName, null, /*#__PURE__*/_react.default.createElement("span", null, product === null || product === void 0 ? void 0 : product.name)), /*#__PURE__*/_react.default.createElement("span", {
|
|
510
|
+
className: "favorite",
|
|
511
|
+
onClick: function onClick() {
|
|
512
|
+
return handleChangeFavorite();
|
|
513
|
+
}
|
|
514
|
+
}, product !== null && product !== void 0 && product.favorite ? /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.HeartFill, null) : /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Heart, null))), /*#__PURE__*/_react.default.createElement(_styles.Properties, null, isHaveWeight ? /*#__PURE__*/_react.default.createElement(_styles.PriceContent, null, parsePrice(pricePerWeightUnit), " / ", product === null || product === void 0 ? void 0 : product.weight_unit) : /*#__PURE__*/_react.default.createElement(_styles.PriceContent, null, /*#__PURE__*/_react.default.createElement("p", null, product !== null && product !== void 0 && product.price ? parsePrice(product === null || product === void 0 ? void 0 : product.price) : ''), (product === null || product === void 0 ? void 0 : product.in_offer) && /*#__PURE__*/_react.default.createElement("span", {
|
|
501
515
|
className: "offer-price"
|
|
502
|
-
}, product !== null && product !== void 0 && product.offer_price ? parsePrice(product === null || product === void 0 ? void 0 : product.offer_price) : '')), /*#__PURE__*/_react.default.createElement(_styles.ProductMeta, null, (product === null || product === void 0 ? void 0 : product.
|
|
516
|
+
}, product !== null && product !== void 0 && product.offer_price ? parsePrice(product === null || product === void 0 ? void 0 : product.offer_price) : '')), /*#__PURE__*/_react.default.createElement(_styles.ProductMeta, null, (product === null || product === void 0 ? void 0 : product.calories) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
517
|
+
className: "calories"
|
|
518
|
+
}, product === null || product === void 0 ? void 0 : product.calories, ' ', "cal"), /*#__PURE__*/_react.default.createElement("span", null, "\xA0\xB7\xA0")), (product === null || product === void 0 ? void 0 : product.sku) && (product === null || product === void 0 ? void 0 : product.sku) !== '-1' && (product === null || product === void 0 ? void 0 : product.sku) !== '1' && /*#__PURE__*/_react.default.createElement(_styles.SkuContent, null, /*#__PURE__*/_react.default.createElement("span", null, t('SKU', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag = theme.defaultLanguages) === null || _theme$defaultLanguag === void 0 ? void 0 : _theme$defaultLanguag.SKU) || 'Sku'), "\xA0"), /*#__PURE__*/_react.default.createElement("span", null, product === null || product === void 0 ? void 0 : product.sku)), (product === null || product === void 0 ? void 0 : product.sku) && (product === null || product === void 0 ? void 0 : product.sku) !== '-1' && (product === null || product === void 0 ? void 0 : product.sku) !== '1' && (product === null || product === void 0 ? void 0 : product.estimated_person) && /*#__PURE__*/_react.default.createElement("span", null, "\xA0\xB7\xA0"), (product === null || product === void 0 ? void 0 : product.estimated_person) && /*#__PURE__*/_react.default.createElement(_styles.EstimatedPersons, null, /*#__PURE__*/_react.default.createElement("span", null, product === null || product === void 0 ? void 0 : product.estimated_person, "\xA0"), /*#__PURE__*/_react.default.createElement("span", null, t('ESTIMATED_PERSONS', 'persons'))))), (product === null || product === void 0 ? void 0 : product.description) && /*#__PURE__*/_react.default.createElement(_styles.ProductDescription, null, /*#__PURE__*/_react.default.createElement(_LinkableText.LinkableText, {
|
|
503
519
|
text: product === null || product === void 0 ? void 0 : product.description
|
|
504
520
|
}))), /*#__PURE__*/_react.default.createElement(_styles.ProductTagsListContainer, null, product.tags.map(function (tag) {
|
|
505
521
|
var _theme$images2, _theme$images2$dummie;
|
|
@@ -4,9 +4,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.WrapperSubOption = exports.WrapperIngredients = exports.WrapperImage = exports.WeightUnitSwitch = exports.WeightUnitItem = exports.VideoGalleryWrapper = exports.SwiperWrapper = exports.SkuContent = exports.SkeletonBlock = exports.SectionTitle = exports.Properties = exports.ProductTagsListContainer = exports.ProductTagWrapper = exports.ProductTabContainer = exports.ProductShareWrapper = exports.ProductName = exports.ProductMeta = exports.ProductInfo = exports.ProductFormTitle = exports.ProductEdition = exports.ProductDescription = exports.ProductContainer = exports.ProductComment = exports.ProductActions = exports.PriceContent = exports.EstimatedPersons = exports.Divider = void 0;
|
|
7
|
+
exports.WrapperSubOption = exports.WrapperIngredients = exports.WrapperImage = exports.WeightUnitSwitch = exports.WeightUnitItem = exports.VideoGalleryWrapper = exports.TitleWrapper = exports.SwiperWrapper = exports.SkuContent = exports.SkeletonBlock = exports.SectionTitle = exports.Properties = exports.ProductTagsListContainer = exports.ProductTagWrapper = exports.ProductTabContainer = exports.ProductShareWrapper = exports.ProductName = exports.ProductMeta = exports.ProductInfo = exports.ProductFormTitle = exports.ProductEdition = exports.ProductDescription = exports.ProductContainer = exports.ProductComment = exports.ProductActions = exports.PriceContent = exports.EstimatedPersons = exports.Divider = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36;
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45;
|
|
10
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
@@ -14,92 +14,128 @@ var ProductContainer = _styledComponents.default.div(_templateObject || (_templa
|
|
|
14
14
|
return !props.useKioskApp && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n max-height: 70vh;\n "])));
|
|
15
15
|
});
|
|
16
16
|
exports.ProductContainer = ProductContainer;
|
|
17
|
-
var
|
|
17
|
+
var TitleWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n gap: 15px;\n margin-top: 20px;\n .favorite {\n cursor: pointer;\n svg {\n color: ", ";\n display: flex;\n font-size: 20px;\n }\n }\n"])), function (props) {
|
|
18
|
+
return props.theme.colors.danger500;
|
|
19
|
+
});
|
|
20
|
+
exports.TitleWrapper = TitleWrapper;
|
|
21
|
+
var WrapperImage = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-left: -20px;\n margin-top: 20px;\n width: calc(100% + 40px);\n position: relative;\n"])));
|
|
18
22
|
exports.WrapperImage = WrapperImage;
|
|
19
|
-
var SwiperWrapper = _styledComponents.default.div(
|
|
20
|
-
return props.isSoldOut && (0, _styledComponents.css)(
|
|
23
|
+
var SwiperWrapper = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: relative;\n width: 100%;\n\n img{\n ", "\n }\n .mySwiper2 {\n height: 250px;\n width: 100%;\n ", "\n .swiper-slide-active {\n border-radius: 0px;\n img {\n border-radius: 0px;\n }\n }\n\n @media (min-width: 480px){\n ", "\n }\n\n @media (min-width: 576px) {\n height: 320px;\n ", "\n }\n ", "\n }\n \n\n .swiper {\n width: 100%;\n height: 500px;\n margin-left: auto;\n margin-right: auto;\n }\n\n .swiper-slide {\n background-size: cover;\n background-position: center;\n .active-img {\n ", "\n }\n }\n\n .product-thumb {\n box-sizing: border-box;\n padding: 30px 0px;\n margin: 0px 20px;\n\n .swiper-slide {\n display: flex;\n opacity: 0.8;\n border-radius: 7.6px;\n height: auto;\n cursor: pointer;\n overflow: hidden;\n\n img {\n border-radius: 7.6px;\n max-height: 70px;\n ", "\n }\n }\n\n .swiper-slide-thumb-active {\n opacity: 1;\n }\n }\n\n .swiper-slide img {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n ", "\n }\n\n .active-img {\n ", "\n }\n\n .swiper-button-next {\n background-image: url(", ");\n background-color: #d1d0d04d;\n background-repeat: no-repeat;\n background-position: 55% center;\n width: 32px;\n height: 32px;\n box-shadow: rgb(0 0 0 / 7%) 0px 4px 10px;\n border-radius: 50%;\n transition: all 0.2s ease;\n\n &:hover {\n transform: scale(1.05);\n }\n }\n\n .swiper-button-prev {\n background-image: url(", ");\n background-color: #d1d0d04d;\n background-repeat: no-repeat;\n background-position: 45% center;\n width: 32px;\n height: 32px;\n border-radius: 50%;\n box-shadow: rgb(0 0 0 / 7%) 0px 4px 10px;\n transition: all 0.2s ease;\n\n &:hover {\n transform: scale(1.05);\n }\n }\n\n .swiper-button-next::after, .swiper-button-prev::after {\n display: none;\n }\n"])), function (props) {
|
|
24
|
+
return props.isSoldOut && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n filter: grayscale(1);\n "])));
|
|
25
|
+
}, function (_ref) {
|
|
26
|
+
var _theme$business_view, _theme$business_view$, _theme$business_view$2, _theme$business_view$3, _theme$business_view$4;
|
|
27
|
+
var theme = _ref.theme;
|
|
28
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$business_view = theme.business_view) === null || _theme$business_view === void 0 ? void 0 : (_theme$business_view$ = _theme$business_view.components) === null || _theme$business_view$ === void 0 ? void 0 : (_theme$business_view$2 = _theme$business_view$.products) === null || _theme$business_view$2 === void 0 ? void 0 : (_theme$business_view$3 = _theme$business_view$2.components) === null || _theme$business_view$3 === void 0 ? void 0 : (_theme$business_view$4 = _theme$business_view$3.layout) === null || _theme$business_view$4 === void 0 ? void 0 : _theme$business_view$4.type) === 'starbucks' && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n height: 290px;\n "])));
|
|
29
|
+
}, function (_ref2) {
|
|
30
|
+
var _theme$business_view2, _theme$business_view3, _theme$business_view4, _theme$business_view5, _theme$business_view6;
|
|
31
|
+
var theme = _ref2.theme;
|
|
32
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$business_view2 = theme.business_view) === null || _theme$business_view2 === void 0 ? void 0 : (_theme$business_view3 = _theme$business_view2.components) === null || _theme$business_view3 === void 0 ? void 0 : (_theme$business_view4 = _theme$business_view3.products) === null || _theme$business_view4 === void 0 ? void 0 : (_theme$business_view5 = _theme$business_view4.components) === null || _theme$business_view5 === void 0 ? void 0 : (_theme$business_view6 = _theme$business_view5.layout) === null || _theme$business_view6 === void 0 ? void 0 : _theme$business_view6.type) === 'starbucks' && (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n height: 340px;\n "])));
|
|
33
|
+
}, function (_ref3) {
|
|
34
|
+
var _theme$business_view7, _theme$business_view8, _theme$business_view9, _theme$business_view10, _theme$business_view11;
|
|
35
|
+
var theme = _ref3.theme;
|
|
36
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$business_view7 = theme.business_view) === null || _theme$business_view7 === void 0 ? void 0 : (_theme$business_view8 = _theme$business_view7.components) === null || _theme$business_view8 === void 0 ? void 0 : (_theme$business_view9 = _theme$business_view8.products) === null || _theme$business_view9 === void 0 ? void 0 : (_theme$business_view10 = _theme$business_view9.components) === null || _theme$business_view10 === void 0 ? void 0 : (_theme$business_view11 = _theme$business_view10.layout) === null || _theme$business_view11 === void 0 ? void 0 : _theme$business_view11.type) === 'starbucks' && (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n height: 60vw;\n "])));
|
|
37
|
+
}, function (_ref4) {
|
|
38
|
+
var _theme$business_view12, _theme$business_view13, _theme$business_view14, _theme$business_view15, _theme$business_view16;
|
|
39
|
+
var theme = _ref4.theme;
|
|
40
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$business_view12 = theme.business_view) === null || _theme$business_view12 === void 0 ? void 0 : (_theme$business_view13 = _theme$business_view12.components) === null || _theme$business_view13 === void 0 ? void 0 : (_theme$business_view14 = _theme$business_view13.products) === null || _theme$business_view14 === void 0 ? void 0 : (_theme$business_view15 = _theme$business_view14.components) === null || _theme$business_view15 === void 0 ? void 0 : (_theme$business_view16 = _theme$business_view15.layout) === null || _theme$business_view16 === void 0 ? void 0 : _theme$business_view16.type) === 'starbucks' && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n @media (min-width: 768px) {\n height: 40vw;\n }\n @media (min-width: 993px) {\n height: 30vw;\n }\n @media (min-width: 1024px){\n height: 350px !important;\n }\n @media (min-width: 1200px) {\n height: 300px !important;\n width: 300px !important;\n }\n "])));
|
|
41
|
+
}, function (_ref5) {
|
|
42
|
+
var _theme$business_view17, _theme$business_view18, _theme$business_view19, _theme$business_view20, _theme$business_view21;
|
|
43
|
+
var theme = _ref5.theme;
|
|
44
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$business_view17 = theme.business_view) === null || _theme$business_view17 === void 0 ? void 0 : (_theme$business_view18 = _theme$business_view17.components) === null || _theme$business_view18 === void 0 ? void 0 : (_theme$business_view19 = _theme$business_view18.products) === null || _theme$business_view19 === void 0 ? void 0 : (_theme$business_view20 = _theme$business_view19.components) === null || _theme$business_view20 === void 0 ? void 0 : (_theme$business_view21 = _theme$business_view20.layout) === null || _theme$business_view21 === void 0 ? void 0 : _theme$business_view21.type) === 'starbucks' && (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n "])));
|
|
45
|
+
}, function (_ref6) {
|
|
46
|
+
var _theme$business_view22, _theme$business_view23, _theme$business_view24, _theme$business_view25, _theme$business_view26;
|
|
47
|
+
var theme = _ref6.theme;
|
|
48
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$business_view22 = theme.business_view) === null || _theme$business_view22 === void 0 ? void 0 : (_theme$business_view23 = _theme$business_view22.components) === null || _theme$business_view23 === void 0 ? void 0 : (_theme$business_view24 = _theme$business_view23.products) === null || _theme$business_view24 === void 0 ? void 0 : (_theme$business_view25 = _theme$business_view24.components) === null || _theme$business_view25 === void 0 ? void 0 : (_theme$business_view26 = _theme$business_view25.layout) === null || _theme$business_view26 === void 0 ? void 0 : _theme$business_view26.type) === 'starbucks' && (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n max-width: 80px;\n max-height: 80px;\n "])));
|
|
49
|
+
}, function (_ref7) {
|
|
50
|
+
var _theme$business_view27, _theme$business_view28, _theme$business_view29, _theme$business_view30, _theme$business_view31;
|
|
51
|
+
var theme = _ref7.theme;
|
|
52
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$business_view27 = theme.business_view) === null || _theme$business_view27 === void 0 ? void 0 : (_theme$business_view28 = _theme$business_view27.components) === null || _theme$business_view28 === void 0 ? void 0 : (_theme$business_view29 = _theme$business_view28.products) === null || _theme$business_view29 === void 0 ? void 0 : (_theme$business_view30 = _theme$business_view29.components) === null || _theme$business_view30 === void 0 ? void 0 : (_theme$business_view31 = _theme$business_view30.layout) === null || _theme$business_view31 === void 0 ? void 0 : _theme$business_view31.type) === 'starbucks' && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n border-radius: 50% !important;\n "])));
|
|
53
|
+
}, function (_ref8) {
|
|
54
|
+
var _theme$business_view32, _theme$business_view33, _theme$business_view34, _theme$business_view35, _theme$business_view36;
|
|
55
|
+
var theme = _ref8.theme;
|
|
56
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$business_view32 = theme.business_view) === null || _theme$business_view32 === void 0 ? void 0 : (_theme$business_view33 = _theme$business_view32.components) === null || _theme$business_view33 === void 0 ? void 0 : (_theme$business_view34 = _theme$business_view33.products) === null || _theme$business_view34 === void 0 ? void 0 : (_theme$business_view35 = _theme$business_view34.components) === null || _theme$business_view35 === void 0 ? void 0 : (_theme$business_view36 = _theme$business_view35.layout) === null || _theme$business_view36 === void 0 ? void 0 : _theme$business_view36.type) === 'starbucks' && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n height: 60vw !important;\n width: 60vw !important;\n margin: 0 auto;\n @media (min-width: 768px) {\n height: 40vw !important;\n width: 40vw !important;\n }\n @media (min-width: 993px) {\n height: 30vw !important;\n width: 30vw !important;\n }\n @media (min-width: 1024px) {\n height: 350px !important;\n width: 350px !important;\n }\n @media (min-width: 1200px) {\n height: 300px !important;\n width: 300px !important;\n }\n "])));
|
|
21
57
|
}, function (props) {
|
|
22
58
|
return props.theme.images.general.rightArrow;
|
|
23
59
|
}, function (props) {
|
|
24
60
|
return props.theme.images.general.leftArrow;
|
|
25
61
|
});
|
|
26
62
|
exports.SwiperWrapper = SwiperWrapper;
|
|
27
|
-
var ProductInfo = _styledComponents.default.div(
|
|
63
|
+
var ProductInfo = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 100%;\n padding: 0px;\n /* position: relative; */\n"])));
|
|
28
64
|
exports.ProductInfo = ProductInfo;
|
|
29
|
-
var ProductFormTitle = _styledComponents.default.div(
|
|
65
|
+
var ProductFormTitle = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n overflow-wrap: break-word;\n\n .price-discount {\n text-decoration: line-through;\n }\n"])));
|
|
30
66
|
exports.ProductFormTitle = ProductFormTitle;
|
|
31
|
-
var ProductEdition = _styledComponents.default.div(
|
|
67
|
+
var ProductEdition = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n margin-top: 20px;\n margin-bottom: 20px;\n"])));
|
|
32
68
|
exports.ProductEdition = ProductEdition;
|
|
33
|
-
var SectionTitle = _styledComponents.default.h3(
|
|
69
|
+
var SectionTitle = _styledComponents.default.h3(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n text-transform: capitalize;\n font-weight: 600;\n font-size: 16px;\n line-height: 24px;\n padding: 7px 0px;\n margin-bottom: 0px;\n margin-top: 15px;\n color: ", ";\n"])), function (props) {
|
|
34
70
|
return props.theme.colors.headingColor;
|
|
35
71
|
});
|
|
36
72
|
exports.SectionTitle = SectionTitle;
|
|
37
|
-
var ProductComment = _styledComponents.default.div(
|
|
73
|
+
var ProductComment = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n margin-bottom: 130px;\n\n textarea {\n margin-top: 8px;\n }\n\n p {\n font-weight: 300;\n margin-bottom: 5px;\n }\n\n @media (min-width: 577px) {\n margin-bottom: 62px;\n }\n\n @media (min-width: 769px) {\n margin-bottom: 0px;\n padding-bottom: 10px;\n }\n"])));
|
|
38
74
|
exports.ProductComment = ProductComment;
|
|
39
|
-
var ProductActions = _styledComponents.default.div(
|
|
75
|
+
var ProductActions = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 10px 0px;\n width: 100%;\n z-index: 9999997;\n\n position: fixed;\n bottom: 0;\n right: 0;\n width: 100%;\n background-color: #FFF;\n\n div.price {\n padding-top: 10px;\n color: ", ";\n h4 {\n margin: 0;\n font-weight: 600;\n font-size: 20px;\n line-height: 20px;\n }\n span {\n font-size: 13px;\n color: #D83520;\n line-height: 15px;\n }\n }\n\n div.incdec-control {\n width: 135px;\n display: flex;\n justify-content: space-around;\n align-items: center;\n position: relative;\n\n svg {\n width: 25px;\n height: 25px;\n cursor: pointer;\n }\n }\n\n div.price-amount-block {\n display: flex;\n justify-content: space-between;\n width: 80%\n }\n\n svg {\n color: ", ";\n }\n\n svg.disabled {\n pointer-events: none;\n color: #CED4DA;\n }\n\n button:disabled,\n button.disabled {\n background: #E9ECEF;\n border: 1px solid #E9ECEF;\n color: #B1BCCC;\n }\n\n button.add {\n width: 90%;\n padding: 5px 10px;\n margin-top: 10px;\n position: relative;\n\n &.soldout {\n width: 100%;\n pointer-events: none;\n }\n }\n .qty {\n flex: 1;\n text-align: center;\n display: flex;\n align-items: center;\n height: 38px;\n min-width: 60px;\n box-sizing: border-box;\n padding: 0;\n margin: 0 10px;\n }\n\n @media (min-width: 577px) {\n position: sticky;\n }\n\n @media (min-width: 1200px) {\n bottom: 0px;\n flex-direction: row;\n justify-content: space-between;\n border-top: 1px solid #E9ECEF;\n width: calc(100% + 40px);\n transform: translateX(-20px);\n padding: 10px 20px;\n box-sizing: border-box;\n\n div.price {\n width: 25%;\n }\n\n button.add {\n width: 35%;\n margin-top: 0;\n }\n\n div.incdec-control {\n padding-right: 18%;\n &.show-weight-unit{\n width: 30%;\n }\n }\n }\n"])), function (props) {
|
|
40
76
|
var _props$theme;
|
|
41
77
|
return (_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.colors.darkTextColor;
|
|
42
78
|
}, function (props) {
|
|
43
79
|
return props.theme.colors.primary;
|
|
44
80
|
});
|
|
45
81
|
exports.ProductActions = ProductActions;
|
|
46
|
-
var SkeletonBlock = _styledComponents.default.div(
|
|
47
|
-
var width =
|
|
82
|
+
var SkeletonBlock = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n width: ", ";\n border-radius: 16px;\n margin: auto;\n\n span {\n margin-bottom: 10px;\n }\n"])), function (_ref9) {
|
|
83
|
+
var width = _ref9.width;
|
|
48
84
|
return width && "".concat(width, "%");
|
|
49
85
|
});
|
|
50
86
|
exports.SkeletonBlock = SkeletonBlock;
|
|
51
|
-
var WrapperSubOption = _styledComponents.default.div(
|
|
87
|
+
var WrapperSubOption = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n border-radius: 10px;\n\n &.soldout {\n pointer-events: none;\n background-color: hsl(0, 0%, 72%);\n }\n"])));
|
|
52
88
|
exports.WrapperSubOption = WrapperSubOption;
|
|
53
|
-
var SkuContent = _styledComponents.default.div(
|
|
89
|
+
var SkuContent = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n display: flex;\n"])));
|
|
54
90
|
exports.SkuContent = SkuContent;
|
|
55
|
-
var WrapperIngredients = _styledComponents.default.div(
|
|
56
|
-
var isProductSoldout =
|
|
57
|
-
return isProductSoldout && (0, _styledComponents.css)(
|
|
91
|
+
var WrapperIngredients = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref10) {
|
|
92
|
+
var isProductSoldout = _ref10.isProductSoldout;
|
|
93
|
+
return isProductSoldout && (0, _styledComponents.css)(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n border-radius: 10px;\n pointer-events: none;\n background: hsl(0, 0%, 72%);\n "])));
|
|
58
94
|
});
|
|
59
95
|
exports.WrapperIngredients = WrapperIngredients;
|
|
60
|
-
var ProductTabContainer = _styledComponents.default.div(
|
|
61
|
-
return props.theme.rtl && (0, _styledComponents.css)(
|
|
96
|
+
var ProductTabContainer = _styledComponents.default.div(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n border-bottom: 1px solid #E9ECEF;\n position: sticky;\n top: 0px;\n background: white;\n z-index: 9999996;\n overflow: scroll hidden;\n width: 100%;\n ::-webkit-scrollbar {\n height: 0px;\n }\n\n #optionList {\n > div {\n white-space: nowrap;\n max-width: 200px;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 10px 0px;\n margin-right: 25px;\n ", "\n }\n }\n"])), function (props) {
|
|
97
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n margin-right: 0px;\n margin-left: 25px;\n "])));
|
|
62
98
|
});
|
|
63
99
|
exports.ProductTabContainer = ProductTabContainer;
|
|
64
|
-
var Divider = _styledComponents.default.div(
|
|
100
|
+
var Divider = _styledComponents.default.div(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n height: 8px;\n width: calc(100% + 40px);\n margin-left: -20px;\n background: #F8F9FA;\n"])));
|
|
65
101
|
exports.Divider = Divider;
|
|
66
|
-
var ProductShareWrapper = _styledComponents.default.div(
|
|
102
|
+
var ProductShareWrapper = _styledComponents.default.div(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n justify-content: flex-end;\n padding-right: 20px;\n ", "\n\n > div {\n > svg {\n margin: 0px !important;\n }\n }\n\n @media (max-width: 768px) {\n > div {\n right: 16px;\n top: 25px;\n left: auto;\n }\n }\n\n"])), function (props) {
|
|
67
103
|
var _props$theme2;
|
|
68
|
-
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(
|
|
104
|
+
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n padding-left: 20px;\n padding-right: 0;\n "])));
|
|
69
105
|
});
|
|
70
106
|
exports.ProductShareWrapper = ProductShareWrapper;
|
|
71
|
-
var ProductName = _styledComponents.default.h1(
|
|
107
|
+
var ProductName = _styledComponents.default.h1(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n font-size: 20px;\n line-height: 30px;\n color: #344050;\n display: flex;\n justify-content: space-between;\n margin: 0;\n .calories {\n font-size: 16px;\n font-weight: 100;\n color: #909BA9;\n white-space: nowrap;\n display: flex;\n align-items: flex-end;\n }\n @media (min-width: 768px) {\n font-size: 22px;\n line-height: 34px;\n }\n"])));
|
|
72
108
|
exports.ProductName = ProductName;
|
|
73
|
-
var Properties = _styledComponents.default.div(
|
|
109
|
+
var Properties = _styledComponents.default.div(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n flex-direction: row;\n justify-content: space-between;\n margin-bottom: 20px;\n"])));
|
|
74
110
|
exports.Properties = Properties;
|
|
75
|
-
var ProductDescription = _styledComponents.default.p(
|
|
111
|
+
var ProductDescription = _styledComponents.default.p(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n margin-top: 0px;\n white-space: pre-wrap;\n"])));
|
|
76
112
|
exports.ProductDescription = ProductDescription;
|
|
77
|
-
var PriceContent = _styledComponents.default.
|
|
113
|
+
var PriceContent = _styledComponents.default.div(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n gap: 10px;\n > p {\n font-size: 18px;\n line-height: 27px;\n color: #344050;\n margin: 0;\n }\n .offer-price {\n text-decoration: line-through;\n font-size: 16px;\n color: #909BA9;\n }\n"])));
|
|
78
114
|
exports.PriceContent = PriceContent;
|
|
79
|
-
var ProductMeta = _styledComponents.default.div(
|
|
115
|
+
var ProductMeta = _styledComponents.default.div(_templateObject35 || (_templateObject35 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n span {\n font-size: 16px;\n line-height: 24px;\n color: #909BA9;\n }\n"])));
|
|
80
116
|
exports.ProductMeta = ProductMeta;
|
|
81
|
-
var EstimatedPersons = _styledComponents.default.div(
|
|
117
|
+
var EstimatedPersons = _styledComponents.default.div(_templateObject36 || (_templateObject36 = _taggedTemplateLiteral(["\n display: flex;\n"])));
|
|
82
118
|
exports.EstimatedPersons = EstimatedPersons;
|
|
83
|
-
var ProductTagsListContainer = _styledComponents.default.div(
|
|
119
|
+
var ProductTagsListContainer = _styledComponents.default.div(_templateObject37 || (_templateObject37 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n margin-bottom: 20px;\n"])));
|
|
84
120
|
exports.ProductTagsListContainer = ProductTagsListContainer;
|
|
85
|
-
var ProductTagWrapper = _styledComponents.default.div(
|
|
121
|
+
var ProductTagWrapper = _styledComponents.default.div(_templateObject38 || (_templateObject38 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin: 5px 0;\n\n img {\n width: 32px;\n height: 32px;\n border-radius: 8px;\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);\n }\n\n span {\n font-size: 14px;\n ", "\n }\n"])), function (props) {
|
|
86
122
|
var _props$theme3;
|
|
87
|
-
return (_props$theme3 = props.theme) !== null && _props$theme3 !== void 0 && _props$theme3.rtl ? (0, _styledComponents.css)(
|
|
123
|
+
return (_props$theme3 = props.theme) !== null && _props$theme3 !== void 0 && _props$theme3.rtl ? (0, _styledComponents.css)(_templateObject39 || (_templateObject39 = _taggedTemplateLiteral(["\n margin: 0 10px 0 20px;\n "]))) : (0, _styledComponents.css)(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["\n margin: 0 20px 0 10px;\n "])));
|
|
88
124
|
});
|
|
89
125
|
exports.ProductTagWrapper = ProductTagWrapper;
|
|
90
|
-
var WeightUnitSwitch = _styledComponents.default.div(
|
|
126
|
+
var WeightUnitSwitch = _styledComponents.default.div(_templateObject41 || (_templateObject41 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: auto;\n margin-left: 10px;\n \n ", "\n"])), function (props) {
|
|
91
127
|
var _props$theme4;
|
|
92
|
-
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(
|
|
128
|
+
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["\n margin-right: 10px;\n margin-left: 0;\n "])));
|
|
93
129
|
});
|
|
94
130
|
exports.WeightUnitSwitch = WeightUnitSwitch;
|
|
95
|
-
var WeightUnitItem = _styledComponents.default.span(
|
|
96
|
-
var active =
|
|
97
|
-
return active && (0, _styledComponents.css)(
|
|
131
|
+
var WeightUnitItem = _styledComponents.default.span(_templateObject43 || (_templateObject43 = _taggedTemplateLiteral(["\n display: inline-flex;\n width: fit-content;\n min-width: unset !important;\n font-size: 12px;\n line-height: 18px;\n padding: 2px 6px;\n cursor: pointer;\n \n ", "\n"])), function (_ref11) {
|
|
132
|
+
var active = _ref11.active;
|
|
133
|
+
return active && (0, _styledComponents.css)(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["\n background-color: ", "15;\n border-radius: 3px;\n color: ", ";\n "])), function (props) {
|
|
98
134
|
return props.theme.colors.primary;
|
|
99
135
|
}, function (props) {
|
|
100
136
|
return props.theme.colors.primary;
|
|
101
137
|
});
|
|
102
138
|
});
|
|
103
139
|
exports.WeightUnitItem = WeightUnitItem;
|
|
104
|
-
var VideoGalleryWrapper = _styledComponents.default.div(
|
|
140
|
+
var VideoGalleryWrapper = _styledComponents.default.div(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n\n svg {\n position: absolute;\n fill: #fff;\n font-size: 28px;\n }\n"])));
|
|
105
141
|
exports.VideoGalleryWrapper = VideoGalleryWrapper;
|
|
@@ -14,6 +14,7 @@ var _Modal = require("../Modal");
|
|
|
14
14
|
var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
|
|
15
15
|
var _NotFoundSource = require("../NotFoundSource");
|
|
16
16
|
var _utils = require("../../../../../utils");
|
|
17
|
+
var _styledComponents = require("styled-components");
|
|
17
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
19
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -42,6 +43,7 @@ var PromotionsUI = function PromotionsUI(props) {
|
|
|
42
43
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
43
44
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
44
45
|
t = _useLanguage2[1];
|
|
46
|
+
var theme = (0, _styledComponents.useTheme)();
|
|
45
47
|
var _useUtils = (0, _orderingComponentsExternal.useUtils)(),
|
|
46
48
|
_useUtils2 = _slicedToArray(_useUtils, 1),
|
|
47
49
|
_useUtils2$ = _useUtils2[0],
|
|
@@ -104,16 +106,19 @@ var PromotionsUI = function PromotionsUI(props) {
|
|
|
104
106
|
})), (!(offersState !== null && offersState !== void 0 && offersState.loading) && (filteredOffers === null || filteredOffers === void 0 ? void 0 : filteredOffers.length) === 0 || (offersState === null || offersState === void 0 ? void 0 : offersState.error)) && /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
|
|
105
107
|
content: (offersState === null || offersState === void 0 ? void 0 : offersState.error) || t('NOT_FOUND_OFFERS', 'Not found offers')
|
|
106
108
|
}), !(offersState !== null && offersState !== void 0 && offersState.loading) && ((_offersState$offers2 = offersState.offers) === null || _offersState$offers2 === void 0 ? void 0 : _offersState$offers2.length) > 0 && (filteredOffers === null || filteredOffers === void 0 ? void 0 : filteredOffers.map(function (offer) {
|
|
109
|
+
var _theme$images, _theme$images$dummies;
|
|
107
110
|
return /*#__PURE__*/_react.default.createElement(_styles.SingleOfferContainer, {
|
|
108
111
|
key: offer.id
|
|
109
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.
|
|
112
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.OfferInfoWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessLogo, {
|
|
113
|
+
bgimage: (offer === null || offer === void 0 ? void 0 : offer.image) || ((_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$dummies = _theme$images.dummies) === null || _theme$images$dummies === void 0 ? void 0 : _theme$images$dummies.businessLogo)
|
|
114
|
+
}), /*#__PURE__*/_react.default.createElement(_styles.OfferInformation, null, /*#__PURE__*/_react.default.createElement("h2", null, offer === null || offer === void 0 ? void 0 : offer.name), /*#__PURE__*/_react.default.createElement(_styles.Description, null, offer === null || offer === void 0 ? void 0 : offer.description), /*#__PURE__*/_react.default.createElement(_styles.ExpiresAt, null, t('EXPIRES', 'Expires'), " ", parseDate(offer === null || offer === void 0 ? void 0 : offer.end, {
|
|
110
115
|
outputFormat: 'MMM DD, YYYY'
|
|
111
116
|
})), /*#__PURE__*/_react.default.createElement(_styles.AvailableBusinesses, null, /*#__PURE__*/_react.default.createElement("p", null, t('APPLY_FOR', 'Apply for'), ":"), /*#__PURE__*/_react.default.createElement("p", null, offer.businesses.map(function (business, i) {
|
|
112
117
|
var _offer$businesses;
|
|
113
118
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
114
119
|
key: business === null || business === void 0 ? void 0 : business.id
|
|
115
120
|
}, ' ', business === null || business === void 0 ? void 0 : business.name, i + 1 < ((_offer$businesses = offer.businesses) === null || _offer$businesses === void 0 ? void 0 : _offer$businesses.length) ? ',' : '');
|
|
116
|
-
})))), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
121
|
+
}))))), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
117
122
|
color: "primary",
|
|
118
123
|
onClick: function onClick() {
|
|
119
124
|
return handleClickOffer(offer);
|