ordering-ui-external 2.6.5 → 2.6.8
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.ba64d5c9c7490676feb5.js +1 -0
- package/_bundles/{5.ordering-ui.80bc71775c11b08c37b2.js → 5.ordering-ui.ba64d5c9c7490676feb5.js} +1 -1
- package/_bundles/{7.ordering-ui.80bc71775c11b08c37b2.js → 7.ordering-ui.ba64d5c9c7490676feb5.js} +2 -2
- package/_bundles/ordering-ui.ba64d5c9c7490676feb5.js +2 -0
- package/_modules/components/LanguageSelector/index.js +1 -0
- package/_modules/components/OrderTypeSelectorHeader/index.js +3 -1
- package/_modules/components/SmartAppBanner/index.js +5 -2
- package/_modules/contexts/ThemeContext/index.js +1 -1
- package/_modules/styles/Select/index.js +14 -2
- package/_modules/styles/Selects/index.js +11 -8
- package/_modules/themes/callcenterOriginal/src/components/Orders/OrderMetaFields/index.js +1 -1
- package/_modules/themes/eight/src/components/AddressForm/index.js +4 -1
- package/_modules/themes/eight/src/components/SingleProductCard/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +168 -0
- package/_modules/themes/five/src/components/BusinessBasicInformation/SearchComponent.js +39 -0
- package/_modules/themes/five/src/components/BusinessBasicInformation/SocialNetWork.js +19 -0
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +35 -156
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +45 -35
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +1 -1
- package/_modules/themes/five/src/components/CardForm/index.js +16 -3
- package/_modules/themes/five/src/components/CardForm/styles.js +13 -9
- package/_modules/themes/five/src/components/CardFormCustom/cardUtils.js +102 -0
- package/_modules/themes/five/src/components/CardFormCustom/index.js +148 -0
- package/_modules/themes/five/src/components/CardFormCustom/styles.js +16 -0
- package/_modules/themes/five/src/components/CartPopover/styles.js +1 -1
- package/_modules/themes/five/src/components/Checkout/index.js +31 -22
- package/_modules/themes/five/src/components/LanguageSelector/index.js +4 -1
- package/_modules/themes/five/src/components/LoginForm/index.js +11 -8
- package/_modules/themes/five/src/components/Modal/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderContextUI/index.js +13 -1
- package/_modules/themes/five/src/components/OrderDetails/OrderHistory.js +7 -3
- package/_modules/themes/five/src/components/OrderDetails/index.js +4 -2
- package/_modules/themes/five/src/components/PaymentOptionCard/index.js +84 -0
- package/_modules/themes/five/src/components/PaymentOptionStripe/index.js +48 -22
- package/_modules/themes/five/src/components/PaymentOptionStripe/styles.js +3 -1
- package/_modules/themes/five/src/components/PaymentOptions/index.js +46 -24
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +1 -1
- package/_modules/themes/five/src/components/SearchProducts/styles.js +1 -1
- package/_modules/themes/five/src/components/UserDetails/index.js +1 -1
- package/_modules/themes/five/src/components/UserPopover/styles.js +1 -1
- package/_modules/themes/five/src/styles/Select/index.js +4 -2
- package/_modules/themes/five/src/styles/Selects/index.js +7 -4
- package/_modules/themes/four/src/components/LoginForm/index.js +1 -1
- package/_modules/themes/pwa/src/components/MomentPopover/styles.js +1 -1
- package/_modules/themes/seven/src/components/ProductForm/productForm.js +3 -1
- package/_modules/themes/six/src/components/BusinessesListing/index.js +1 -1
- package/index.html +1 -1
- package/package.json +4 -2
- package/src/components/LanguageSelector/index.js +1 -0
- package/src/components/OrderTypeSelectorHeader/index.js +3 -1
- package/src/components/SmartAppBanner/index.js +4 -2
- package/src/contexts/ThemeContext/index.js +1 -1
- package/src/styles/Select/index.js +11 -2
- package/src/styles/Selects/index.js +1 -1
- package/src/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +230 -0
- package/src/themes/five/src/components/BusinessBasicInformation/SearchComponent.js +40 -0
- package/src/themes/five/src/components/BusinessBasicInformation/SocialNetWork.js +10 -0
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +39 -247
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +14 -4
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +1 -1
- package/src/themes/five/src/components/CardForm/index.js +25 -4
- package/src/themes/five/src/components/CardForm/styles.js +35 -0
- package/src/themes/five/src/components/CardFormCustom/cardUtils.js +111 -0
- package/src/themes/five/src/components/CardFormCustom/index.js +161 -0
- package/src/themes/five/src/components/CardFormCustom/styles.js +20 -0
- package/src/themes/five/src/components/CartPopover/styles.js +1 -1
- package/src/themes/five/src/components/Checkout/index.js +34 -25
- package/src/themes/five/src/components/LanguageSelector/index.js +2 -1
- package/src/themes/five/src/components/LoginForm/index.js +6 -4
- package/src/themes/five/src/components/Modal/styles.js +1 -0
- package/src/themes/five/src/components/OrderContextUI/index.js +10 -3
- package/src/themes/five/src/components/OrderDetails/OrderHistory.js +4 -3
- package/src/themes/five/src/components/OrderDetails/index.js +1 -1
- package/src/themes/five/src/components/PaymentOptionCard/index.js +70 -0
- package/src/themes/five/src/components/PaymentOptionStripe/index.js +46 -20
- package/src/themes/five/src/components/PaymentOptionStripe/styles.js +6 -1
- package/src/themes/five/src/components/PaymentOptions/index.js +28 -3
- package/src/themes/five/src/components/ProductForm/index.js +0 -1
- package/src/themes/five/src/components/RenderProductsLayout/index.js +1 -1
- package/src/themes/five/src/components/SearchProducts/styles.js +1 -1
- package/src/themes/five/src/components/UserDetails/index.js +1 -1
- package/src/themes/five/src/components/UserPopover/styles.js +1 -1
- package/src/themes/five/src/styles/Select/index.js +3 -2
- package/src/themes/five/src/styles/Selects/index.js +1 -1
- package/src/themes/pwa/src/components/MomentPopover/styles.js +4 -1
- package/template/theme.json +3 -1
- package/_bundles/0.ordering-ui.80bc71775c11b08c37b2.js +0 -1
- package/_bundles/ordering-ui.80bc71775c11b08c37b2.js +0 -2
- /package/_bundles/{1.ordering-ui.80bc71775c11b08c37b2.js → 1.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{2.ordering-ui.80bc71775c11b08c37b2.js → 2.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{4.ordering-ui.80bc71775c11b08c37b2.js → 4.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{6.ordering-ui.80bc71775c11b08c37b2.js → 6.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{7.ordering-ui.80bc71775c11b08c37b2.js.LICENSE.txt → 7.ordering-ui.ba64d5c9c7490676feb5.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.80bc71775c11b08c37b2.js → 8.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{9.ordering-ui.80bc71775c11b08c37b2.js → 9.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{ordering-ui.80bc71775c11b08c37b2.js.LICENSE.txt → ordering-ui.ba64d5c9c7490676feb5.js.LICENSE.txt} +0 -0
|
@@ -6,18 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.BusinessBasicInformation = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
|
|
10
|
-
var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
11
9
|
var _styledComponents = require("styled-components");
|
|
12
10
|
var _Modal = require("../Modal");
|
|
13
11
|
var _BusinessInformation = require("../BusinessInformation");
|
|
14
12
|
var _BusinessReviews = require("../BusinessReviews");
|
|
15
13
|
var _BsInfoCircle = _interopRequireDefault(require("@meronex/icons/bs/BsInfoCircle"));
|
|
16
14
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
17
|
-
var _utils = require("../../../../../utils");
|
|
18
|
-
var _Select = require("../../styles/Select");
|
|
19
15
|
var _MomentContent = require("../MomentContent");
|
|
20
|
-
var _CgSearch = _interopRequireDefault(require("@meronex/icons/cg/CgSearch"));
|
|
21
16
|
var _SearchProducts = require("../SearchProducts");
|
|
22
17
|
var _SearchProducts2 = require("../../../../six/src/components/BusinessProductsListing/SearchProducts");
|
|
23
18
|
var _styles = require("./styles");
|
|
@@ -26,14 +21,12 @@ var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
|
26
21
|
var _timezone = _interopRequireDefault(require("dayjs/plugin/timezone"));
|
|
27
22
|
var _isBetween = _interopRequireDefault(require("dayjs/plugin/isBetween"));
|
|
28
23
|
var _useWindowSize = require("../../../../../hooks/useWindowSize");
|
|
24
|
+
var _BusinessInfoComponent = require("./BusinessInfoComponent");
|
|
25
|
+
var _SearchComponent = require("./SearchComponent");
|
|
29
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
27
|
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); }
|
|
31
28
|
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; }
|
|
32
29
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
33
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
34
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
35
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
36
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
37
30
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
38
31
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
39
32
|
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); }
|
|
@@ -44,7 +37,7 @@ _dayjs.default.extend(_timezone.default);
|
|
|
44
37
|
_dayjs.default.extend(_isBetween.default);
|
|
45
38
|
var types = ['food', 'laundry', 'alcohol', 'groceries'];
|
|
46
39
|
var BusinessBasicInformation = function BusinessBasicInformation(props) {
|
|
47
|
-
var
|
|
40
|
+
var _theme$business_view, _theme$business_view$, _theme$business_view$2, _theme$business_view$3, _theme$business_view$4, _theme$business_view$5, _theme$business_view$6, _theme$business_view2, _theme$business_view3, _theme$business_view4, _theme$business_view5, _theme$business_view6, _theme$business_view7, _theme$business_view8, _theme$business_view9, _theme$business_view10, _theme$business_view11, _theme$business_view12, _theme$business_view13, _theme$business_view14, _theme$business_view15, _theme$business_view16, _theme$business_view17, _theme$business_view18, _theme$business_view19, _theme$business_view20, _theme$header, _theme$header$compone, _theme$header$compone2, _theme$header$compone3, _props$beforeElements, _props$beforeComponen, _business$reviews, _business$reviews2, _props$afterComponent, _props$afterElements;
|
|
48
41
|
var isSkeleton = props.isSkeleton,
|
|
49
42
|
businessState = props.businessState,
|
|
50
43
|
setOpenBusinessInformation = props.setOpenBusinessInformation,
|
|
@@ -56,22 +49,17 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
|
|
|
56
49
|
handleChangeSortBy = props.handleChangeSortBy,
|
|
57
50
|
categoryState = props.categoryState,
|
|
58
51
|
errorQuantityProducts = props.errorQuantityProducts,
|
|
59
|
-
isCustomerMode = props.isCustomerMode
|
|
52
|
+
isCustomerMode = props.isCustomerMode,
|
|
53
|
+
isCustomLayout = props.isCustomLayout;
|
|
60
54
|
var business = businessState.business,
|
|
61
55
|
loading = businessState.loading;
|
|
62
56
|
var theme = (0, _styledComponents.useTheme)();
|
|
63
|
-
var _useOrder = (0, _orderingComponentsExternal.useOrder)(),
|
|
64
|
-
_useOrder2 = _slicedToArray(_useOrder, 1),
|
|
65
|
-
orderState = _useOrder2[0];
|
|
66
57
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
67
58
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
68
59
|
t = _useLanguage2[1];
|
|
69
60
|
var _useUtils = (0, _orderingComponentsExternal.useUtils)(),
|
|
70
61
|
_useUtils2 = _slicedToArray(_useUtils, 1),
|
|
71
|
-
|
|
72
|
-
parsePrice = _useUtils2$.parsePrice,
|
|
73
|
-
parseDistance = _useUtils2$.parseDistance,
|
|
74
|
-
optimizeImage = _useUtils2$.optimizeImage;
|
|
62
|
+
optimizeImage = _useUtils2[0].optimizeImage;
|
|
75
63
|
var windowSize = (0, _useWindowSize.useWindowSize)();
|
|
76
64
|
var _useState = (0, _react.useState)(false),
|
|
77
65
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -85,24 +73,28 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
|
|
|
85
73
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
86
74
|
openSearchProducts = _useState6[0],
|
|
87
75
|
setOpenSearchProducts = _useState6[1];
|
|
88
|
-
var _useConfig = (0, _orderingComponentsExternal.useConfig)(),
|
|
89
|
-
_useConfig2 = _slicedToArray(_useConfig, 1),
|
|
90
|
-
configs = _useConfig2[0].configs;
|
|
91
|
-
var isPreOrderSetting = (configs === null || configs === void 0 ? void 0 : (_configs$preorder_sta = configs.preorder_status_enabled) === null || _configs$preorder_sta === void 0 ? void 0 : _configs$preorder_sta.value) === '1';
|
|
92
76
|
var hideLogo = 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$.header) === 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.business) === null || _theme$business_view$4 === void 0 ? void 0 : (_theme$business_view$5 = _theme$business_view$4.components) === null || _theme$business_view$5 === void 0 ? void 0 : (_theme$business_view$6 = _theme$business_view$5.logo) === null || _theme$business_view$6 === void 0 ? void 0 : _theme$business_view$6.hidden;
|
|
93
|
-
var
|
|
94
|
-
var
|
|
95
|
-
var
|
|
96
|
-
var hideReviewsPopup = theme === null || theme === void 0 ? void 0 : (_theme$business_view23 = theme.business_view) === null || _theme$business_view23 === void 0 ? void 0 : (_theme$business_view24 = _theme$business_view23.components) === null || _theme$business_view24 === void 0 ? void 0 : (_theme$business_view25 = _theme$business_view24.header) === null || _theme$business_view25 === void 0 ? void 0 : (_theme$business_view26 = _theme$business_view25.components) === null || _theme$business_view26 === void 0 ? void 0 : (_theme$business_view27 = _theme$business_view26.reviews) === null || _theme$business_view27 === void 0 ? void 0 : _theme$business_view27.hidden;
|
|
97
|
-
var hideDistance = theme === null || theme === void 0 ? void 0 : (_theme$business_view28 = theme.business_view) === null || _theme$business_view28 === void 0 ? void 0 : (_theme$business_view29 = _theme$business_view28.components) === null || _theme$business_view29 === void 0 ? void 0 : (_theme$business_view30 = _theme$business_view29.header) === null || _theme$business_view30 === void 0 ? void 0 : (_theme$business_view31 = _theme$business_view30.components) === null || _theme$business_view31 === void 0 ? void 0 : (_theme$business_view32 = _theme$business_view31.business) === 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.distance) === null || _theme$business_view34 === void 0 ? void 0 : _theme$business_view34.hidden;
|
|
98
|
-
var hideSort = theme === null || theme === void 0 ? void 0 : (_theme$business_view35 = theme.business_view) === null || _theme$business_view35 === void 0 ? void 0 : (_theme$business_view36 = _theme$business_view35.components) === null || _theme$business_view36 === void 0 ? void 0 : (_theme$business_view37 = _theme$business_view36.header) === null || _theme$business_view37 === void 0 ? void 0 : (_theme$business_view38 = _theme$business_view37.components) === null || _theme$business_view38 === void 0 ? void 0 : (_theme$business_view39 = _theme$business_view38.business) === null || _theme$business_view39 === void 0 ? void 0 : (_theme$business_view40 = _theme$business_view39.components) === null || _theme$business_view40 === void 0 ? void 0 : (_theme$business_view41 = _theme$business_view40.sort) === null || _theme$business_view41 === void 0 ? void 0 : _theme$business_view41.hidden;
|
|
99
|
-
var hideInfoIcon = theme === null || theme === void 0 ? void 0 : (_theme$business_view42 = theme.business_view) === null || _theme$business_view42 === void 0 ? void 0 : (_theme$business_view43 = _theme$business_view42.components) === null || _theme$business_view43 === void 0 ? void 0 : (_theme$business_view44 = _theme$business_view43.header) === null || _theme$business_view44 === void 0 ? void 0 : (_theme$business_view45 = _theme$business_view44.components) === null || _theme$business_view45 === void 0 ? void 0 : (_theme$business_view46 = _theme$business_view45.business) === null || _theme$business_view46 === void 0 ? void 0 : (_theme$business_view47 = _theme$business_view46.components) === null || _theme$business_view47 === void 0 ? void 0 : (_theme$business_view48 = _theme$business_view47.business_info) === null || _theme$business_view48 === void 0 ? void 0 : _theme$business_view48.hidden;
|
|
100
|
-
var isInfoShrunken = (theme === null || theme === void 0 ? void 0 : (_theme$business_view49 = theme.business_view) === null || _theme$business_view49 === void 0 ? void 0 : (_theme$business_view50 = _theme$business_view49.components) === null || _theme$business_view50 === void 0 ? void 0 : (_theme$business_view51 = _theme$business_view50.header) === null || _theme$business_view51 === void 0 ? void 0 : (_theme$business_view52 = _theme$business_view51.components) === null || _theme$business_view52 === void 0 ? void 0 : (_theme$business_view53 = _theme$business_view52.business) === null || _theme$business_view53 === void 0 ? void 0 : (_theme$business_view54 = _theme$business_view53.components) === null || _theme$business_view54 === void 0 ? void 0 : (_theme$business_view55 = _theme$business_view54.layout) === null || _theme$business_view55 === void 0 ? void 0 : _theme$business_view55.position) === 'shrunken';
|
|
101
|
-
var searchLayout = theme === null || theme === void 0 ? void 0 : (_theme$business_view56 = theme.business_view) === null || _theme$business_view56 === void 0 ? void 0 : (_theme$business_view57 = _theme$business_view56.components) === null || _theme$business_view57 === void 0 ? void 0 : (_theme$business_view58 = _theme$business_view57.product_search) === null || _theme$business_view58 === void 0 ? void 0 : (_theme$business_view59 = _theme$business_view58.components) === null || _theme$business_view59 === void 0 ? void 0 : (_theme$business_view60 = _theme$business_view59.layout) === null || _theme$business_view60 === void 0 ? void 0 : _theme$business_view60.type;
|
|
102
|
-
var hideCity = theme === null || theme === void 0 ? void 0 : (_theme$business_view61 = theme.business_view) === null || _theme$business_view61 === void 0 ? void 0 : (_theme$business_view62 = _theme$business_view61.components) === null || _theme$business_view62 === void 0 ? void 0 : (_theme$business_view63 = _theme$business_view62.header) === null || _theme$business_view63 === void 0 ? void 0 : (_theme$business_view64 = _theme$business_view63.components) === null || _theme$business_view64 === void 0 ? void 0 : (_theme$business_view65 = _theme$business_view64.business) === null || _theme$business_view65 === void 0 ? void 0 : (_theme$business_view66 = _theme$business_view65.components) === null || _theme$business_view66 === void 0 ? void 0 : (_theme$business_view67 = _theme$business_view66.city) === null || _theme$business_view67 === void 0 ? void 0 : _theme$business_view67.hidden;
|
|
77
|
+
var hideInfoIcon = 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.header) === 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.business) === null || _theme$business_view6 === void 0 ? void 0 : (_theme$business_view7 = _theme$business_view6.components) === null || _theme$business_view7 === void 0 ? void 0 : (_theme$business_view8 = _theme$business_view7.business_info) === null || _theme$business_view8 === void 0 ? void 0 : _theme$business_view8.hidden;
|
|
78
|
+
var isInfoShrunken = (theme === null || theme === void 0 ? void 0 : (_theme$business_view9 = theme.business_view) === 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.header) === null || _theme$business_view11 === void 0 ? void 0 : (_theme$business_view12 = _theme$business_view11.components) === null || _theme$business_view12 === void 0 ? void 0 : (_theme$business_view13 = _theme$business_view12.business) === null || _theme$business_view13 === void 0 ? void 0 : (_theme$business_view14 = _theme$business_view13.components) === null || _theme$business_view14 === void 0 ? void 0 : (_theme$business_view15 = _theme$business_view14.layout) === null || _theme$business_view15 === void 0 ? void 0 : _theme$business_view15.position) === 'shrunken';
|
|
79
|
+
var searchLayout = theme === null || theme === void 0 ? void 0 : (_theme$business_view16 = theme.business_view) === null || _theme$business_view16 === void 0 ? void 0 : (_theme$business_view17 = _theme$business_view16.components) === null || _theme$business_view17 === void 0 ? void 0 : (_theme$business_view18 = _theme$business_view17.product_search) === null || _theme$business_view18 === void 0 ? void 0 : (_theme$business_view19 = _theme$business_view18.components) === null || _theme$business_view19 === void 0 ? void 0 : (_theme$business_view20 = _theme$business_view19.layout) === null || _theme$business_view20 === void 0 ? void 0 : _theme$business_view20.type;
|
|
103
80
|
var isChew = (theme === null || theme === void 0 ? void 0 : (_theme$header = theme.header) === null || _theme$header === void 0 ? void 0 : (_theme$header$compone = _theme$header.components) === null || _theme$header$compone === void 0 ? void 0 : (_theme$header$compone2 = _theme$header$compone.layout) === null || _theme$header$compone2 === void 0 ? void 0 : (_theme$header$compone3 = _theme$header$compone2.type) === null || _theme$header$compone3 === void 0 ? void 0 : _theme$header$compone3.toLowerCase()) === 'chew';
|
|
104
|
-
var
|
|
105
|
-
|
|
81
|
+
var businessInfoComponentProps = {
|
|
82
|
+
isChew: isChew,
|
|
83
|
+
loading: loading,
|
|
84
|
+
business: business,
|
|
85
|
+
isInfoShrunken: isInfoShrunken,
|
|
86
|
+
isCustomerMode: isCustomerMode,
|
|
87
|
+
setIsPreOrder: setIsPreOrder,
|
|
88
|
+
setIsBusinessReviews: setIsBusinessReviews,
|
|
89
|
+
categoryState: categoryState,
|
|
90
|
+
searchValue: searchValue,
|
|
91
|
+
errorQuantityProducts: errorQuantityProducts,
|
|
92
|
+
setOpenSearchProducts: setOpenSearchProducts,
|
|
93
|
+
handleChangeSortBy: handleChangeSortBy,
|
|
94
|
+
sortByValue: sortByValue,
|
|
95
|
+
sortByOptions: sortByOptions,
|
|
96
|
+
isCustomLayout: isCustomLayout
|
|
97
|
+
};
|
|
106
98
|
var getBusinessType = function getBusinessType() {
|
|
107
99
|
if (Object.keys(business).length <= 0) return t('GENERAL', 'General');
|
|
108
100
|
var _types = [];
|
|
@@ -174,124 +166,6 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
|
|
|
174
166
|
left: 0
|
|
175
167
|
});
|
|
176
168
|
}, [sortByValue]);
|
|
177
|
-
var SearchComponent = function SearchComponent() {
|
|
178
|
-
return /*#__PURE__*/_react.default.createElement(_styles.WrapperSearch, {
|
|
179
|
-
id: "search-component"
|
|
180
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.SearchWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.SearchIconWrapper, {
|
|
181
|
-
onClick: function onClick() {
|
|
182
|
-
return setOpenSearchProducts(true);
|
|
183
|
-
}
|
|
184
|
-
}, /*#__PURE__*/_react.default.createElement(_CgSearch.default, null)), !hideSort && /*#__PURE__*/_react.default.createElement(_Select.Select, {
|
|
185
|
-
notAsync: true,
|
|
186
|
-
notReload: true,
|
|
187
|
-
options: sortByOptions,
|
|
188
|
-
defaultValue: sortByValue,
|
|
189
|
-
onChange: function onChange(val) {
|
|
190
|
-
return handleChangeSortBy && handleChangeSortBy(val);
|
|
191
|
-
}
|
|
192
|
-
})));
|
|
193
|
-
};
|
|
194
|
-
var SocialNetWork = function SocialNetWork(_ref) {
|
|
195
|
-
var url = _ref.url,
|
|
196
|
-
icon = _ref.icon;
|
|
197
|
-
return /*#__PURE__*/_react.default.createElement(_styles.IconWrapper, {
|
|
198
|
-
href: url,
|
|
199
|
-
target: "_blank",
|
|
200
|
-
rel: "noopener noreferrer"
|
|
201
|
-
}, icon);
|
|
202
|
-
};
|
|
203
|
-
var BusinessInfoComponent = function BusinessInfoComponent() {
|
|
204
|
-
var _business$ribbon, _business$ribbon2, _business$ribbon3, _business$ribbon4, _business$ribbon5, _business$ribbon6, _business$ribbon7, _business$city, _business$city2, _orderState$options, _business$reviews, _business$reviews2, _categoryState$produc, _business$professiona;
|
|
205
|
-
return /*#__PURE__*/_react.default.createElement(_styles.BusinessInfoContainer, {
|
|
206
|
-
isChew: isChew,
|
|
207
|
-
isFlexEnd: windowSize.width >= 768
|
|
208
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.BusinessInfoContent, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessInfo, {
|
|
209
|
-
className: "info"
|
|
210
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.BusinessInfoItem, {
|
|
211
|
-
isInfoShrunken: isInfoShrunken
|
|
212
|
-
}, !loading ? /*#__PURE__*/_react.default.createElement(_styles.TitleWrapper, null, /*#__PURE__*/_react.default.createElement("h2", {
|
|
213
|
-
className: "bold",
|
|
214
|
-
id: "business_name"
|
|
215
|
-
}, business === null || business === void 0 ? void 0 : business.name), (business === null || business === void 0 ? void 0 : (_business$ribbon = business.ribbon) === null || _business$ribbon === void 0 ? void 0 : _business$ribbon.enabled) && /*#__PURE__*/_react.default.createElement(_styles.RibbonBox, {
|
|
216
|
-
bgColor: business === null || business === void 0 ? void 0 : (_business$ribbon2 = business.ribbon) === null || _business$ribbon2 === void 0 ? void 0 : _business$ribbon2.color,
|
|
217
|
-
colorText: (0, _utils.lightenDarkenColor)(business === null || business === void 0 ? void 0 : (_business$ribbon3 = business.ribbon) === null || _business$ribbon3 === void 0 ? void 0 : _business$ribbon3.color),
|
|
218
|
-
borderRibbon: (0, _utils.lightenDarkenColor)(business === null || business === void 0 ? void 0 : (_business$ribbon4 = business.ribbon) === null || _business$ribbon4 === void 0 ? void 0 : _business$ribbon4.color),
|
|
219
|
-
isRoundRect: (business === null || business === void 0 ? void 0 : (_business$ribbon5 = business.ribbon) === null || _business$ribbon5 === void 0 ? void 0 : _business$ribbon5.shape) === (_utils.shape === null || _utils.shape === void 0 ? void 0 : _utils.shape.rectangleRound),
|
|
220
|
-
isCapsule: (business === null || business === void 0 ? void 0 : (_business$ribbon6 = business.ribbon) === null || _business$ribbon6 === void 0 ? void 0 : _business$ribbon6.shape) === (_utils.shape === null || _utils.shape === void 0 ? void 0 : _utils.shape.capsuleShape)
|
|
221
|
-
}, business === null || business === void 0 ? void 0 : (_business$ribbon7 = business.ribbon) === null || _business$ribbon7 === void 0 ? void 0 : _business$ribbon7.text)) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
222
|
-
width: isCustomerMode ? 100 : 150,
|
|
223
|
-
height: isCustomerMode ? 35 : 'auto'
|
|
224
|
-
}), typeof hideCity !== 'undefined' && !hideCity && (business === null || business === void 0 ? void 0 : (_business$city = business.city) === null || _business$city === void 0 ? void 0 : _business$city.name) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !loading ? /*#__PURE__*/_react.default.createElement("p", {
|
|
225
|
-
className: "type"
|
|
226
|
-
}, business === null || business === void 0 ? void 0 : (_business$city2 = business.city) === null || _business$city2 === void 0 ? void 0 : _business$city2.name) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
227
|
-
width: isCustomerMode ? 100 : 150
|
|
228
|
-
})), !loading ? /*#__PURE__*/_react.default.createElement(_styles.SocialList, null, (business === null || business === void 0 ? void 0 : business.facebook_profile) && /*#__PURE__*/_react.default.createElement(SocialNetWork, {
|
|
229
|
-
url: business === null || business === void 0 ? void 0 : business.facebook_profile,
|
|
230
|
-
icon: /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Facebook, null)
|
|
231
|
-
}), (business === null || business === void 0 ? void 0 : business.instagram_profile) && /*#__PURE__*/_react.default.createElement(SocialNetWork, {
|
|
232
|
-
url: business === null || business === void 0 ? void 0 : business.instagram_profile,
|
|
233
|
-
icon: /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Instagram, null)
|
|
234
|
-
}), (business === null || business === void 0 ? void 0 : business.tiktok_profile) && /*#__PURE__*/_react.default.createElement(SocialNetWork, {
|
|
235
|
-
url: business === null || business === void 0 ? void 0 : business.tiktok_profile,
|
|
236
|
-
icon: /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Tiktok, null)
|
|
237
|
-
}), (business === null || business === void 0 ? void 0 : business.pinterest_profile) && /*#__PURE__*/_react.default.createElement(SocialNetWork, {
|
|
238
|
-
url: business === null || business === void 0 ? void 0 : business.pinterest_profile,
|
|
239
|
-
icon: /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Pinterest, null)
|
|
240
|
-
}), (business === null || business === void 0 ? void 0 : business.whatsapp_number) && /*#__PURE__*/_react.default.createElement(SocialNetWork, {
|
|
241
|
-
url: business === null || business === void 0 ? void 0 : business.whatsapp_number,
|
|
242
|
-
icon: /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Whatsapp, null)
|
|
243
|
-
}), (business === null || business === void 0 ? void 0 : business.snapchat_profile) && /*#__PURE__*/_react.default.createElement(SocialNetWork, {
|
|
244
|
-
url: business === null || business === void 0 ? void 0 : business.snapchat_profile,
|
|
245
|
-
icon: /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Snapchat, null)
|
|
246
|
-
})) : /*#__PURE__*/_react.default.createElement(_styles.SocialList, null, _toConsumableArray(Array(5).keys()).map(function (i) {
|
|
247
|
-
return /*#__PURE__*/_react.default.createElement(_styles.IconWrapper, {
|
|
248
|
-
isSkeleton: true,
|
|
249
|
-
key: i
|
|
250
|
-
}, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
251
|
-
width: 27,
|
|
252
|
-
height: 27
|
|
253
|
-
}));
|
|
254
|
-
})), /*#__PURE__*/_react.default.createElement(_styles.BusinessDetail, {
|
|
255
|
-
isSkeleton: loading
|
|
256
|
-
}, (orderState === null || orderState === void 0 ? void 0 : orderState.options.type) === 1 && !hideDeliveryFee && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !loading ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("h5", null, /*#__PURE__*/_react.default.createElement("span", null, t('DELIVERY_FEE', 'Delivery fee')), business && parsePrice((business === null || business === void 0 ? void 0 : business.delivery_price) || 0)), /*#__PURE__*/_react.default.createElement("span", {
|
|
257
|
-
className: "dot"
|
|
258
|
-
}, "\u2022")) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
259
|
-
width: isCustomerMode ? 70 : 50
|
|
260
|
-
})), !hideTime && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !loading ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (orderState === null || orderState === void 0 ? void 0 : (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.type) === 1 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("h5", null, (0, _utils.convertHoursToMinutes)(business === null || business === void 0 ? void 0 : business.delivery_time)), /*#__PURE__*/_react.default.createElement("span", {
|
|
261
|
-
className: "dot"
|
|
262
|
-
}, "\u2022")) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("h5", null, (0, _utils.convertHoursToMinutes)(business === null || business === void 0 ? void 0 : business.pickup_time)), /*#__PURE__*/_react.default.createElement("span", {
|
|
263
|
-
className: "dot"
|
|
264
|
-
}, "\u2022"))) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
265
|
-
width: isCustomerMode ? 70 : 50
|
|
266
|
-
})), !hideDistance && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !loading ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("h5", null, parseDistance((business === null || business === void 0 ? void 0 : business.distance) || 0)), /*#__PURE__*/_react.default.createElement("span", {
|
|
267
|
-
className: "dot"
|
|
268
|
-
}, "\u2022")) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
269
|
-
width: isCustomerMode ? 70 : 50
|
|
270
|
-
})), !hideReviews && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !loading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
271
|
-
className: "review"
|
|
272
|
-
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.StarFill, {
|
|
273
|
-
className: "start"
|
|
274
|
-
}), /*#__PURE__*/_react.default.createElement("p", null, business === null || business === void 0 ? void 0 : (_business$reviews = business.reviews) === null || _business$reviews === void 0 ? void 0 : _business$reviews.total)) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
275
|
-
width: isCustomerMode ? 100 : 50
|
|
276
|
-
}))), !loading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
277
|
-
className: "preorder-Reviews"
|
|
278
|
-
}, isPreOrderSetting && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
279
|
-
onClick: function onClick() {
|
|
280
|
-
return setIsPreOrder(true);
|
|
281
|
-
}
|
|
282
|
-
}, t('PREORDER', 'Preorder')), /*#__PURE__*/_react.default.createElement("span", {
|
|
283
|
-
className: "dot"
|
|
284
|
-
}, "\u2022")), ((_business$reviews2 = business.reviews) === null || _business$reviews2 === void 0 ? void 0 : _business$reviews2.reviews) && !hideReviewsPopup && /*#__PURE__*/_react.default.createElement("span", {
|
|
285
|
-
onClick: function onClick() {
|
|
286
|
-
return setIsBusinessReviews(true);
|
|
287
|
-
}
|
|
288
|
-
}, t('REVIEWS', 'Reviews'))) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
289
|
-
width: isCustomerMode ? 100 : 150
|
|
290
|
-
})))), !hideSearch && ((categoryState === null || categoryState === void 0 ? void 0 : (_categoryState$produc = categoryState.products) === null || _categoryState$produc === void 0 ? void 0 : _categoryState$produc.length) !== 0 || searchValue) && !errorQuantityProducts && !isInfoShrunken && !(business !== null && business !== void 0 && (_business$professiona = business.professionals) !== null && _business$professiona !== void 0 && _business$professiona.length) &&
|
|
291
|
-
/*#__PURE__*/
|
|
292
|
-
// (categoryClicked || windowSize.width >= 993) &&
|
|
293
|
-
_react.default.createElement(SearchComponent, null));
|
|
294
|
-
};
|
|
295
169
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (_props$beforeElements = props.beforeElements) === null || _props$beforeElements === void 0 ? void 0 : _props$beforeElements.map(function (BeforeElement, i) {
|
|
296
170
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
297
171
|
key: i
|
|
@@ -310,7 +184,7 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
|
|
|
310
184
|
});
|
|
311
185
|
},
|
|
312
186
|
business: businessState.business
|
|
313
|
-
})), /*#__PURE__*/_react.default.createElement(_styles.BusinessInfoWrapper, null, !isInfoShrunken && !isChew && /*#__PURE__*/_react.default.createElement(BusinessInfoComponent,
|
|
187
|
+
})), /*#__PURE__*/_react.default.createElement(_styles.BusinessInfoWrapper, null, !isInfoShrunken && !isChew && /*#__PURE__*/_react.default.createElement(_BusinessInfoComponent.BusinessInfoComponent, businessInfoComponentProps), ((business === null || business === void 0 ? void 0 : business.header) || (business === null || business === void 0 ? void 0 : business.logo) || loading || isInfoShrunken) && /*#__PURE__*/_react.default.createElement(_styles.BusinessContainer, {
|
|
314
188
|
bgimage: business === null || business === void 0 ? void 0 : business.header,
|
|
315
189
|
isSkeleton: isSkeleton,
|
|
316
190
|
id: "container",
|
|
@@ -318,7 +192,12 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
|
|
|
318
192
|
isChew: isChew
|
|
319
193
|
}, !loading && !(business !== null && business !== void 0 && business.open) && /*#__PURE__*/_react.default.createElement("h1", null, t('CLOSED', 'Closed')), !hideLogo && (business === null || business === void 0 ? void 0 : business.logo) && !isChew && /*#__PURE__*/_react.default.createElement(_styles.BusinessContent, null, /*#__PURE__*/_react.default.createElement(_styles.WrapperBusinessLogo, null, !loading && /*#__PURE__*/_react.default.createElement(_styles.BusinessLogo, {
|
|
320
194
|
bgimage: optimizeImage(business === null || business === void 0 ? void 0 : business.logo, 'h_200,c_limit')
|
|
321
|
-
}))), (isInfoShrunken || isChew) && /*#__PURE__*/_react.default.createElement(BusinessInfoComponent,
|
|
195
|
+
}))), (isInfoShrunken || isChew) && /*#__PURE__*/_react.default.createElement(_BusinessInfoComponent.BusinessInfoComponent, businessInfoComponentProps), !loading && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isInfoShrunken && /*#__PURE__*/_react.default.createElement(_styles.SearchComponentContainer, null, /*#__PURE__*/_react.default.createElement(_SearchComponent.SearchComponent, {
|
|
196
|
+
setOpenSearchProducts: setOpenSearchProducts,
|
|
197
|
+
handleChangeSortBy: handleChangeSortBy,
|
|
198
|
+
sortByValue: sortByValue,
|
|
199
|
+
sortByOptions: sortByOptions
|
|
200
|
+
})), searchLayout === 'floating' && /*#__PURE__*/_react.default.createElement(_styles.WrapperFloatingSearch, null, /*#__PURE__*/_react.default.createElement(_SearchProducts2.SearchProducts, {
|
|
322
201
|
handleChangeSearch: handleChangeSearch,
|
|
323
202
|
searchValue: searchValue,
|
|
324
203
|
sortByOptions: sortByOptions,
|
|
@@ -359,9 +238,9 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
|
|
|
359
238
|
padding: "20px"
|
|
360
239
|
}, /*#__PURE__*/_react.default.createElement(_BusinessReviews.BusinessReviews, {
|
|
361
240
|
businessId: business.id,
|
|
362
|
-
reviews: (_business$
|
|
241
|
+
reviews: (_business$reviews = business.reviews) === null || _business$reviews === void 0 ? void 0 : _business$reviews.reviews,
|
|
363
242
|
businessName: business.name,
|
|
364
|
-
stars: (_business$
|
|
243
|
+
stars: (_business$reviews2 = business.reviews) === null || _business$reviews2 === void 0 ? void 0 : _business$reviews2.total
|
|
365
244
|
})), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
366
245
|
open: isPreOrder,
|
|
367
246
|
width: isCustomerMode ? '700px' : '760px',
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.WrapperSearch = exports.WrapperFloatingSearch = exports.WrapperBusinessLogo = exports.TitleWrapper = exports.SocialList = exports.SearchWrapper = exports.SearchIconWrapper = exports.SearchComponentContainer = exports.RibbonBox = exports.IconWrapper = exports.CategorySelectedContainer = exports.BusinessMoreDetail = exports.BusinessLogo = exports.BusinessInfoWrapper = exports.BusinessInfoItem = exports.BusinessInfoContent = exports.BusinessInfoContainer = exports.BusinessInfo = exports.BusinessDetail = exports.BusinessContent = exports.BusinessContainer = 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;
|
|
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;
|
|
11
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
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
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -72,7 +72,7 @@ var BusinessInfoContent = _styledComponents.default.div(_templateObject16 || (_t
|
|
|
72
72
|
exports.BusinessInfoContent = BusinessInfoContent;
|
|
73
73
|
var SearchWrapper = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n display: flex;\n"])));
|
|
74
74
|
exports.SearchWrapper = SearchWrapper;
|
|
75
|
-
var WrapperSearch = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n margin: 15px 0px 0px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n box-sizing: border-box;\n z-index: 1002;\n\n .search-bar {\n margin-right: 10px;\n ", "\n input {\n width: 100%;\n\n @media (min-width: 500px) {\n width: 250px;\n }\n }\n }\n\n div:last-child {\n text-align: right;\n\n ", "\n }\n\n #select-input {\n background-color: transparent !important;\n border: none;\n color: #748194 !important;\n\n #list {\n border-radius: 8px;\n }\n }\n &.fixed-search {\n position: fixed;\n top: 0;\n right: 0;\n z-index:
|
|
75
|
+
var WrapperSearch = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n margin: 15px 0px 0px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n box-sizing: border-box;\n z-index: 1002;\n\n .search-bar {\n margin-right: 10px;\n ", "\n input {\n width: 100%;\n\n @media (min-width: 500px) {\n width: 250px;\n }\n }\n }\n\n div:last-child {\n text-align: right;\n\n ", "\n }\n\n #select-input {\n background-color: transparent !important;\n border: none;\n color: #748194 !important;\n\n #list {\n border-radius: 8px;\n }\n }\n &.fixed-search {\n position: fixed;\n top: 0;\n right: 0;\n z-index: 10001;\n width: fit-content;\n margin-top: 0px;\n background-color: ", ";\n padding: 10px;\n }\n\n @media (min-width: 993px) {\n &.fixed-search {\n left: 0;\n width: 100vw;\n z-index: 1002;\n }\n }\n"])), function (props) {
|
|
76
76
|
var _props$theme4;
|
|
77
77
|
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n margin-left: 10px;\n margin-right: 0;\n "])));
|
|
78
78
|
}, function (props) {
|
|
@@ -112,68 +112,78 @@ var BusinessMoreDetail = _styledComponents.default.div(_templateObject28 || (_te
|
|
|
112
112
|
return props.position ? 'black' : 'white';
|
|
113
113
|
});
|
|
114
114
|
exports.BusinessMoreDetail = BusinessMoreDetail;
|
|
115
|
-
var TitleWrapper = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\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 &.fixed-name {\n z-index: 1002;\n position: fixed;\n top: 0;\n
|
|
116
|
-
var
|
|
117
|
-
|
|
115
|
+
var TitleWrapper = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\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: 1002;\n position: fixed;\n top: 0;\n padding: 10px 0;\n font-size: 18px;\n ", "\n }\n @media (min-width: 768px) {\n font-size: 32px;\n }\n }\n"])), function (_ref4) {
|
|
116
|
+
var _theme$colors;
|
|
117
|
+
var theme = _ref4.theme;
|
|
118
|
+
return theme === null || theme === void 0 ? void 0 : (_theme$colors = theme.colors) === null || _theme$colors === void 0 ? void 0 : _theme$colors.white;
|
|
119
|
+
}, function (_ref5) {
|
|
120
|
+
var isCustomLayout = _ref5.isCustomLayout;
|
|
121
|
+
return !isCustomLayout ? (0, _styledComponents.css)(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n width: calc(100vw - 190px);\n ", "\n "])), function (props) {
|
|
122
|
+
var _props$theme11;
|
|
123
|
+
return (_props$theme11 = props.theme) !== null && _props$theme11 !== void 0 && _props$theme11.rtl ? (0, _styledComponents.css)(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n right: 50px;\n "]))) : (0, _styledComponents.css)(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n left: 50px;\n "])));
|
|
124
|
+
}) : (0, _styledComponents.css)(_templateObject35 || (_templateObject35 = _taggedTemplateLiteral(["\n ", "\n "])), function (props) {
|
|
125
|
+
var _props$theme12;
|
|
126
|
+
return (_props$theme12 = props.theme) !== null && _props$theme12 !== void 0 && _props$theme12.rtl ? (0, _styledComponents.css)(_templateObject36 || (_templateObject36 = _taggedTemplateLiteral(["\n right: 10px;\n "]))) : (0, _styledComponents.css)(_templateObject37 || (_templateObject37 = _taggedTemplateLiteral(["\n left: 10px;\n "])));
|
|
127
|
+
});
|
|
118
128
|
});
|
|
119
129
|
exports.TitleWrapper = TitleWrapper;
|
|
120
|
-
var RibbonBox = _styledComponents.default.div(
|
|
130
|
+
var RibbonBox = _styledComponents.default.div(_templateObject38 || (_templateObject38 = _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) {
|
|
121
131
|
return props.theme.colors.colorTextSignForm;
|
|
122
132
|
}, function (props) {
|
|
123
133
|
return props.theme.colors.primary;
|
|
124
134
|
}, function (props) {
|
|
125
|
-
return props.theme.rtl && (0, _styledComponents.css)(
|
|
126
|
-
}, function (_ref4) {
|
|
127
|
-
var bgColor = _ref4.bgColor;
|
|
128
|
-
return bgColor && (0, _styledComponents.css)(_templateObject36 || (_templateObject36 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), bgColor);
|
|
129
|
-
}, function (_ref5) {
|
|
130
|
-
var isRoundRect = _ref5.isRoundRect;
|
|
131
|
-
return isRoundRect && (0, _styledComponents.css)(_templateObject37 || (_templateObject37 = _taggedTemplateLiteral(["\n border-radius: 7.6px;\n "])));
|
|
135
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject39 || (_templateObject39 = _taggedTemplateLiteral(["\n margin-left: 0px;\n margin-right: 5px;\n "])));
|
|
132
136
|
}, function (_ref6) {
|
|
133
|
-
var
|
|
134
|
-
return
|
|
137
|
+
var bgColor = _ref6.bgColor;
|
|
138
|
+
return bgColor && (0, _styledComponents.css)(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), bgColor);
|
|
135
139
|
}, function (_ref7) {
|
|
136
|
-
var
|
|
137
|
-
return
|
|
140
|
+
var isRoundRect = _ref7.isRoundRect;
|
|
141
|
+
return isRoundRect && (0, _styledComponents.css)(_templateObject41 || (_templateObject41 = _taggedTemplateLiteral(["\n border-radius: 7.6px;\n "])));
|
|
138
142
|
}, function (_ref8) {
|
|
139
|
-
var
|
|
140
|
-
return
|
|
143
|
+
var isCapsule = _ref8.isCapsule;
|
|
144
|
+
return isCapsule && (0, _styledComponents.css)(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["\n border-radius: 50px;\n "])));
|
|
145
|
+
}, function (_ref9) {
|
|
146
|
+
var colorText = _ref9.colorText;
|
|
147
|
+
return colorText && (0, _styledComponents.css)(_templateObject43 || (_templateObject43 = _taggedTemplateLiteral(["\n color: ", ";\n "])), colorText ? 'black' : 'white');
|
|
148
|
+
}, function (_ref10) {
|
|
149
|
+
var borderRibbon = _ref10.borderRibbon;
|
|
150
|
+
return borderRibbon && (0, _styledComponents.css)(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n "])), borderRibbon ? 'black' : 'white');
|
|
141
151
|
});
|
|
142
152
|
exports.RibbonBox = RibbonBox;
|
|
143
|
-
var SearchIconWrapper = _styledComponents.default.div(
|
|
153
|
+
var SearchIconWrapper = _styledComponents.default.div(_templateObject45 || (_templateObject45 = _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) {
|
|
144
154
|
return props.theme.colors.gray200;
|
|
145
155
|
});
|
|
146
156
|
exports.SearchIconWrapper = SearchIconWrapper;
|
|
147
|
-
var SearchComponentContainer = _styledComponents.default.div(
|
|
148
|
-
var theme =
|
|
157
|
+
var SearchComponentContainer = _styledComponents.default.div(_templateObject46 || (_templateObject46 = _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 (_ref11) {
|
|
158
|
+
var theme = _ref11.theme;
|
|
149
159
|
return theme.colors.white;
|
|
150
160
|
});
|
|
151
161
|
exports.SearchComponentContainer = SearchComponentContainer;
|
|
152
|
-
var SocialList = _styledComponents.default.div(
|
|
153
|
-
return props.theme.rtl && (0, _styledComponents.css)(
|
|
162
|
+
var SocialList = _styledComponents.default.div(_templateObject47 || (_templateObject47 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-left: -3px;\n ", "\n"])), function (props) {
|
|
163
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject48 || (_templateObject48 = _taggedTemplateLiteral(["\n margin-right: -3px;\n margin-left: 0px;\n "])));
|
|
154
164
|
});
|
|
155
165
|
exports.SocialList = SocialList;
|
|
156
|
-
var CategorySelectedContainer = _styledComponents.default.div(
|
|
157
|
-
var _theme$
|
|
158
|
-
var theme =
|
|
159
|
-
return theme === null || theme === void 0 ? void 0 : (_theme$
|
|
166
|
+
var CategorySelectedContainer = _styledComponents.default.div(_templateObject49 || (_templateObject49 = _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 (_ref12) {
|
|
167
|
+
var _theme$colors2;
|
|
168
|
+
var theme = _ref12.theme;
|
|
169
|
+
return theme === null || theme === void 0 ? void 0 : (_theme$colors2 = theme.colors) === null || _theme$colors2 === void 0 ? void 0 : _theme$colors2.primary;
|
|
160
170
|
});
|
|
161
171
|
exports.CategorySelectedContainer = CategorySelectedContainer;
|
|
162
|
-
var IconWrapper = _styledComponents.default.a(
|
|
172
|
+
var IconWrapper = _styledComponents.default.a(_templateObject50 || (_templateObject50 = _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) {
|
|
163
173
|
return props.theme.colors.gray200;
|
|
164
|
-
}, function (
|
|
165
|
-
var isSkeleton =
|
|
166
|
-
return isSkeleton && (0, _styledComponents.css)(
|
|
174
|
+
}, function (_ref13) {
|
|
175
|
+
var isSkeleton = _ref13.isSkeleton;
|
|
176
|
+
return isSkeleton && (0, _styledComponents.css)(_templateObject51 || (_templateObject51 = _taggedTemplateLiteral(["\n border: none;\n "])));
|
|
167
177
|
}, function (props) {
|
|
168
178
|
return props.theme.colors.headingColor;
|
|
169
179
|
}, function (props) {
|
|
170
180
|
return props.theme.colors.gray200;
|
|
171
181
|
});
|
|
172
182
|
exports.IconWrapper = IconWrapper;
|
|
173
|
-
var BusinessInfoWrapper = _styledComponents.default.div(
|
|
183
|
+
var BusinessInfoWrapper = _styledComponents.default.div(_templateObject52 || (_templateObject52 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column-reverse;\n @media (min-width: 768px) {\n flex-direction: column;\n }\n"])));
|
|
174
184
|
exports.BusinessInfoWrapper = BusinessInfoWrapper;
|
|
175
|
-
var WrapperFloatingSearch = _styledComponents.default.div(
|
|
176
|
-
var theme =
|
|
185
|
+
var WrapperFloatingSearch = _styledComponents.default.div(_templateObject53 || (_templateObject53 = _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 (_ref14) {
|
|
186
|
+
var theme = _ref14.theme;
|
|
177
187
|
return theme.colors.white;
|
|
178
188
|
});
|
|
179
189
|
exports.WrapperFloatingSearch = WrapperFloatingSearch;
|
|
@@ -42,7 +42,7 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
|
|
|
42
42
|
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); }
|
|
43
43
|
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; }
|
|
44
44
|
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; } }
|
|
45
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import { BusinessTypeFilter } from '../../../../../../../components/BusinessTypeFilter'
|
|
46
46
|
var PIXELS_TO_SCROLL = 500;
|
|
47
47
|
var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
48
48
|
var _businessesList$busin, _props$beforeElements, _props$beforeComponen, _configs$advanced_bus2, _businessesList$busin2, _orderState$options4, _orderState$options4$, _orderState$options5, _orderState$options5$, _configs$google_maps_, _businessesList$busin3, _orderState$options6, _orderState$options6$, _getCustomArray, _businessesList$busin4, _orderState$options7, _props$afterComponent, _props$afterElements;
|
|
@@ -41,7 +41,7 @@ var CARD_ELEMENT_OPTIONS = {
|
|
|
41
41
|
showIcon: true
|
|
42
42
|
};
|
|
43
43
|
var CardFormUI = function CardFormUI(props) {
|
|
44
|
-
var _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
|
|
44
|
+
var _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _validationFields$fie4, _validationFields$fie5, _validationFields$fie6, _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
|
|
45
45
|
var error = props.error,
|
|
46
46
|
errorExpiry = props.errorExpiry,
|
|
47
47
|
errorCvc = props.errorCvc,
|
|
@@ -50,10 +50,16 @@ var CardFormUI = function CardFormUI(props) {
|
|
|
50
50
|
handleChange = props.handleChange,
|
|
51
51
|
isSplitForm = props.isSplitForm,
|
|
52
52
|
handleChangeExpiry = props.handleChangeExpiry,
|
|
53
|
-
handleChangeCvc = props.handleChangeCvc
|
|
53
|
+
handleChangeCvc = props.handleChangeCvc,
|
|
54
|
+
errorZipcode = props.errorZipcode;
|
|
54
55
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
55
56
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
56
57
|
t = _useLanguage2[1];
|
|
58
|
+
var _useValidationFields = (0, _orderingComponentsExternal.useValidationFields)(),
|
|
59
|
+
_useValidationFields2 = _slicedToArray(_useValidationFields, 1),
|
|
60
|
+
validationFields = _useValidationFields2[0];
|
|
61
|
+
var zipCodeEnabled = validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie = validationFields.fields) === null || _validationFields$fie === void 0 ? void 0 : (_validationFields$fie2 = _validationFields$fie.card) === null || _validationFields$fie2 === void 0 ? void 0 : (_validationFields$fie3 = _validationFields$fie2.zipcode) === null || _validationFields$fie3 === void 0 ? void 0 : _validationFields$fie3.enabled;
|
|
62
|
+
var zipCodeRequired = validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie4 = validationFields.fields) === null || _validationFields$fie4 === void 0 ? void 0 : (_validationFields$fie5 = _validationFields$fie4.card) === null || _validationFields$fie5 === void 0 ? void 0 : (_validationFields$fie6 = _validationFields$fie5.zipcode) === null || _validationFields$fie6 === void 0 ? void 0 : _validationFields$fie6.required;
|
|
57
63
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (_props$beforeElements = props.beforeElements) === null || _props$beforeElements === void 0 ? void 0 : _props$beforeElements.map(function (BeforeElement, i) {
|
|
58
64
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
59
65
|
key: i
|
|
@@ -76,7 +82,14 @@ var CardFormUI = function CardFormUI(props) {
|
|
|
76
82
|
}), /*#__PURE__*/_react.default.createElement(_styles.ErrorMessage, null, errorExpiry)), /*#__PURE__*/_react.default.createElement(_styles.CardCvcField, null, /*#__PURE__*/_react.default.createElement("label", null, t('CVC', 'CVC')), /*#__PURE__*/_react.default.createElement(_reactStripeJs.CardCvcElement, {
|
|
77
83
|
options: CARD_ELEMENT_OPTIONS,
|
|
78
84
|
onChange: handleChangeCvc
|
|
79
|
-
}), /*#__PURE__*/_react.default.createElement(_styles.ErrorMessage, null, errorCvc)))
|
|
85
|
+
}), /*#__PURE__*/_react.default.createElement(_styles.ErrorMessage, null, errorCvc))), zipCodeEnabled && /*#__PURE__*/_react.default.createElement(_styles.CardZipcodeField, null, /*#__PURE__*/_react.default.createElement("label", null, t('ZIPCODE', 'Zipcode')), /*#__PURE__*/_react.default.createElement(_styles.ZipcodeField, {
|
|
86
|
+
name: "zipcode",
|
|
87
|
+
placeholder: "".concat(t('ZIPCODE', 'Zipcode')).concat(zipCodeRequired ? '*' : ''),
|
|
88
|
+
options: CARD_ELEMENT_OPTIONS,
|
|
89
|
+
onChange: handleChange,
|
|
90
|
+
pattern: "[0-9]",
|
|
91
|
+
type: "number"
|
|
92
|
+
}), errorZipcode && /*#__PURE__*/_react.default.createElement(_styles.ErrorMessage, null, t('ZIPCODE_IS_INCOMPLETED', 'The zipcode is incompleted.'))))), /*#__PURE__*/_react.default.createElement(_styles.FormActions, null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
80
93
|
color: "primary",
|
|
81
94
|
type: "submit",
|
|
82
95
|
disabled: loading
|
|
@@ -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.FormStripe = exports.FormRow = exports.FormActions = exports.ErrorMessage = exports.CardNumberField = exports.CardExpiryField = exports.CardExpiryCvcField = exports.CardCvcField = void 0;
|
|
7
|
+
exports.ZipcodeField = exports.FormStripe = exports.FormRow = exports.FormActions = exports.ErrorMessage = exports.CardZipcodeField = exports.CardNumberField = exports.CardExpiryField = exports.CardExpiryCvcField = exports.CardCvcField = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
|
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) } })); }
|
|
@@ -16,16 +16,20 @@ var CardExpiryField = _styledComponents.default.div(_templateObject2 || (_templa
|
|
|
16
16
|
exports.CardExpiryField = CardExpiryField;
|
|
17
17
|
var CardCvcField = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: #ADB2B9;\n"])));
|
|
18
18
|
exports.CardCvcField = CardCvcField;
|
|
19
|
-
var
|
|
19
|
+
var CardZipcodeField = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: #ADB2B9;\n"])));
|
|
20
|
+
exports.CardZipcodeField = CardZipcodeField;
|
|
21
|
+
var CardNumberField = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: 100%;\n color: #ADB2B9;\n"])));
|
|
20
22
|
exports.CardNumberField = CardNumberField;
|
|
21
|
-
var CardExpiryCvcField = _styledComponents.default.div(
|
|
23
|
+
var CardExpiryCvcField = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n grid-gap: 10px;\n"])));
|
|
22
24
|
exports.CardExpiryCvcField = CardExpiryCvcField;
|
|
23
|
-
var FormRow = _styledComponents.default.div(
|
|
25
|
+
var FormRow = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n input {\n display: block;\n border: none;\n font-size: 18px;\n margin: 10px 0 20px 0;\n max-width: 100%;\n padding: 10px 14px;\n box-shadow: rgba(50, 50, 93, 0.14902) 0px 1px 3px,\n rgba(0, 0, 0, 0.0196078) 0px 1px 0px;\n border-radius: 4px;\n background: white;\n color: #424770;\n letter-spacing: 0.025em;\n width: 500px;\n }\n\n input::placeholder {\n color: #aab7c4;\n }\n"])));
|
|
24
26
|
exports.FormRow = FormRow;
|
|
25
|
-
var ErrorMessage = _styledComponents.default.div(
|
|
27
|
+
var ErrorMessage = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n font-size: 16px;\n font-weight: bold;\n margin-top: 10px;\n margin-bottom: 20px;\n color: #D81212;\n margin: 10px 0px 0px 10px;\n ", "\n"])), function (props) {
|
|
26
28
|
var _props$theme;
|
|
27
|
-
return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(
|
|
29
|
+
return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin: 10px 10px 0px 0px\n "])));
|
|
28
30
|
});
|
|
29
31
|
exports.ErrorMessage = ErrorMessage;
|
|
30
|
-
var FormActions = _styledComponents.default.div(
|
|
31
|
-
exports.FormActions = FormActions;
|
|
32
|
+
var FormActions = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n width: 100%;\n margin-top: 20px;\n\n button {\n height: 44px;\n width: 100%;\n border-radius: 7.6px;\n\n &:disabled {\n opacity: 0.5;\n }\n }\n"])));
|
|
33
|
+
exports.FormActions = FormActions;
|
|
34
|
+
var ZipcodeField = _styledComponents.default.input(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n font-weight: 500;\n font-size: 16px;\n box-sizing: border-box;\n width: 100% !important;\n &:-webkit-autofill {\n color: '#fce883'\n }\n &::placeholder {\n font-weight: 500\n }\n &:focus(){\n box-shadow: rgba(50, 50, 93, 0.109804) 0px 4px 6px,\n rgba(0, 0, 0, 0.0784314) 0px 1px 3px;\n -webkit-transition: all 150ms ease;\n transition: all 150ms ease;\n }\n\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n /* Firefox */\n &[type=number] {\n -moz-appearance: textfield;\n }\n \n"])));
|
|
35
|
+
exports.ZipcodeField = ZipcodeField;
|