s-platform-landing-section 0.1.10-alpha.9 → 0.1.11
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/dist/index.js +2782 -1006
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +2758 -1020
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,15 +6,16 @@ var io5 = require('react-icons/io5');
|
|
|
6
6
|
var fa = require('react-icons/fa');
|
|
7
7
|
var fi = require('react-icons/fi');
|
|
8
8
|
var rx = require('react-icons/rx');
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var bs = require('react-icons/bs');
|
|
9
|
+
var si = require('react-icons/si');
|
|
10
|
+
var io = require('react-icons/io');
|
|
12
11
|
var fa6 = require('react-icons/fa6');
|
|
12
|
+
require('react-icons/pi');
|
|
13
|
+
require('react-icons/ci');
|
|
14
|
+
var bs = require('react-icons/bs');
|
|
13
15
|
var lu = require('react-icons/lu');
|
|
14
|
-
var io = require('react-icons/io');
|
|
15
16
|
var DatePicker = _interopDefault(require('react-datepicker'));
|
|
16
17
|
require('react-datepicker/dist/react-datepicker.css');
|
|
17
|
-
var
|
|
18
|
+
var ai = require('react-icons/ai');
|
|
18
19
|
var go = require('react-icons/go');
|
|
19
20
|
var ri = require('react-icons/ri');
|
|
20
21
|
|
|
@@ -31,8 +32,8 @@ var Button = function Button(props) {
|
|
|
31
32
|
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
32
33
|
_props$type = props.type,
|
|
33
34
|
type = _props$type === void 0 ? "primary" : _props$type;
|
|
34
|
-
var _className = type === "primary" ? "text-textButton bg-primary" : "text-primary
|
|
35
|
-
_className = "font-medium rounded-lg text-sm px-4 py-2.5 hover:text-textButton hover:bg-primary hover:opacity-80 " + _className + " " + ((shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) || "") + " " + className;
|
|
35
|
+
var _className = type === "primary" ? "text-textButton bg-primary" : "text-primary border border-primary";
|
|
36
|
+
_className = "font-medium rounded-lg text-sm px-3 py-2 md:px-4 md:py-2.5 hover:text-textButton hover:bg-primary hover:opacity-80 " + _className + " " + ((shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) || "") + " " + className;
|
|
36
37
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
37
38
|
type: "button",
|
|
38
39
|
className: _className,
|
|
@@ -94,7 +95,7 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
94
95
|
|
|
95
96
|
var _excluded = ["Link"];
|
|
96
97
|
var getDurationValue = function getDurationValue(attributes) {
|
|
97
|
-
var _durationAtt$value
|
|
98
|
+
var _durationAtt$value;
|
|
98
99
|
if (!attributes) {
|
|
99
100
|
return "";
|
|
100
101
|
}
|
|
@@ -102,12 +103,12 @@ var getDurationValue = function getDurationValue(attributes) {
|
|
|
102
103
|
attributes = JSON.parse(attributes || "[]");
|
|
103
104
|
}
|
|
104
105
|
var durationAtt = attributes.find(function (attr) {
|
|
105
|
-
return attr.name === "Thời lượng (phút) / buổi";
|
|
106
|
+
return (attr === null || attr === void 0 ? void 0 : attr.name) === "Thời lượng (phút) / buổi";
|
|
106
107
|
});
|
|
107
|
-
return durationAtt ? ((durationAtt === null || durationAtt === void 0 ? void 0 : (_durationAtt$value = durationAtt.value) === null || _durationAtt$value === void 0 ? void 0 : _durationAtt$value[0]) || "0") + " "
|
|
108
|
+
return durationAtt ? ((durationAtt === null || durationAtt === void 0 ? void 0 : (_durationAtt$value = durationAtt.value) === null || _durationAtt$value === void 0 ? void 0 : _durationAtt$value[0]) || "0") + " p" : "";
|
|
108
109
|
};
|
|
109
110
|
var genProductSlug = function genProductSlug(productName, id) {
|
|
110
|
-
var slug = productName.toLowerCase();
|
|
111
|
+
var slug = productName === null || productName === void 0 ? void 0 : productName.toLowerCase();
|
|
111
112
|
slug = slug.replace(/(à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ)/g, "a");
|
|
112
113
|
slug = slug.replace(/(è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ)/g, "e");
|
|
113
114
|
slug = slug.replace(/(ì|í|ị|ỉ|ĩ)/g, "i");
|
|
@@ -125,12 +126,24 @@ var getLinkProductDetail = function getLinkProductDetail(product) {
|
|
|
125
126
|
var slug = genProductSlug(product === null || product === void 0 ? void 0 : product.productName, product === null || product === void 0 ? void 0 : product.productId);
|
|
126
127
|
return "/product/" + slug + "/" + (product === null || product === void 0 ? void 0 : product.shopId);
|
|
127
128
|
};
|
|
129
|
+
var getLinkServiceDetail = function getLinkServiceDetail(product) {
|
|
130
|
+
var slug = genProductSlug(product === null || product === void 0 ? void 0 : product.productName, product === null || product === void 0 ? void 0 : product.productId);
|
|
131
|
+
return "/service/" + slug + "/" + (product === null || product === void 0 ? void 0 : product.shopId);
|
|
132
|
+
};
|
|
128
133
|
var LinkToPage = function LinkToPage(props) {
|
|
129
134
|
var _props$Link = props.Link,
|
|
130
135
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
131
136
|
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
132
137
|
return Link ? /*#__PURE__*/React__default.createElement(Link, otherProps, props.children) : /*#__PURE__*/React__default.createElement("a", otherProps, props.children);
|
|
133
138
|
};
|
|
139
|
+
var SSHOP_SPA_TOKEN = "sshop-spa-token";
|
|
140
|
+
var genLinkSearch = function genLinkSearch(keyword) {
|
|
141
|
+
return "/search?keyword=" + keyword;
|
|
142
|
+
};
|
|
143
|
+
var configSvg = function configSvg(data) {
|
|
144
|
+
var _data$replace, _data$replace$replace;
|
|
145
|
+
return data === null || data === void 0 ? void 0 : (_data$replace = data.replace(/<path(?![^>]*fill=")[^>]*>/g, "<path fill=\"currentColor\" $&")) === null || _data$replace === void 0 ? void 0 : (_data$replace$replace = _data$replace.replace(/width="[^"]*"/, '')) === null || _data$replace$replace === void 0 ? void 0 : _data$replace$replace.replace(/height="[^"]*"/, '');
|
|
146
|
+
};
|
|
134
147
|
|
|
135
148
|
var Options = function Options(props) {
|
|
136
149
|
var _props$className = props.className,
|
|
@@ -216,15 +229,17 @@ var NavBar7 = function NavBar7(props) {
|
|
|
216
229
|
_props$logout = props.logout,
|
|
217
230
|
logout = _props$logout === void 0 ? function () {} : _props$logout;
|
|
218
231
|
var cartItems = useSelector === null || useSelector === void 0 ? void 0 : useSelector(function (state) {
|
|
219
|
-
|
|
232
|
+
var _state$cart;
|
|
233
|
+
return state === null || state === void 0 ? void 0 : (_state$cart = state.cart) === null || _state$cart === void 0 ? void 0 : _state$cart.items;
|
|
220
234
|
});
|
|
221
235
|
var userInfo = useSelector === null || useSelector === void 0 ? void 0 : useSelector(function (state) {
|
|
222
|
-
|
|
236
|
+
var _state$user;
|
|
237
|
+
return state === null || state === void 0 ? void 0 : (_state$user = state.user) === null || _state$user === void 0 ? void 0 : _state$user.info;
|
|
223
238
|
});
|
|
224
239
|
var _useState2 = React.useState(""),
|
|
225
240
|
totalItem = _useState2[0],
|
|
226
241
|
setTotalItem = _useState2[1];
|
|
227
|
-
var profileRoute = (_routes$find = routes.find(function (e) {
|
|
242
|
+
var profileRoute = routes === null || routes === void 0 ? void 0 : (_routes$find = routes.find(function (e) {
|
|
228
243
|
return (e === null || e === void 0 ? void 0 : e.name) === "profile";
|
|
229
244
|
})) === null || _routes$find === void 0 ? void 0 : _routes$find.route;
|
|
230
245
|
var profileOptions = [{
|
|
@@ -243,9 +258,19 @@ var NavBar7 = function NavBar7(props) {
|
|
|
243
258
|
})
|
|
244
259
|
}];
|
|
245
260
|
React.useEffect(function () {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
261
|
+
if ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === "cafe_1" || (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === "grocery_1" || (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === "fashion_1") {
|
|
262
|
+
routes === null || routes === void 0 ? void 0 : routes.forEach(function (route) {
|
|
263
|
+
if ((route === null || route === void 0 ? void 0 : route.name) === "home" || (route === null || route === void 0 ? void 0 : route.name) === "products" || (route === null || route === void 0 ? void 0 : route.name) === "about") {
|
|
264
|
+
route.isShow = true;
|
|
265
|
+
} else {
|
|
266
|
+
route.isShow = false;
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
}, [shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode]);
|
|
271
|
+
React.useEffect(function () {
|
|
272
|
+
var totalItem = cartItems === null || cartItems === void 0 ? void 0 : cartItems.reduce(function (total, item) {
|
|
273
|
+
return total + (item === null || item === void 0 ? void 0 : item.quantity);
|
|
249
274
|
}, 0);
|
|
250
275
|
if (totalItem > 9) {
|
|
251
276
|
totalItem = "9+";
|
|
@@ -291,7 +316,7 @@ var NavBar7 = function NavBar7(props) {
|
|
|
291
316
|
}, (item === null || item === void 0 ? void 0 : item.name) === (route === null || route === void 0 ? void 0 : route.name) ? /*#__PURE__*/React__default.createElement("div", {
|
|
292
317
|
className: "py-1 border-b text-textHeading border-textHeading"
|
|
293
318
|
}, item === null || item === void 0 ? void 0 : item.label) : /*#__PURE__*/React__default.createElement("div", {
|
|
294
|
-
className: "py-1"
|
|
319
|
+
className: "py-1 text-textBody"
|
|
295
320
|
}, item === null || item === void 0 ? void 0 : item.label));
|
|
296
321
|
})), cart(), userInfo ?
|
|
297
322
|
/*#__PURE__*/
|
|
@@ -379,6 +404,226 @@ var NavBar7 = function NavBar7(props) {
|
|
|
379
404
|
})))) : null));
|
|
380
405
|
};
|
|
381
406
|
|
|
407
|
+
var NavBar1 = function NavBar1(props) {
|
|
408
|
+
var _routes$find, _routes$filter, _routes$filter2;
|
|
409
|
+
var _useState = React.useState(false),
|
|
410
|
+
isOpen = _useState[0],
|
|
411
|
+
setIsOpen = _useState[1];
|
|
412
|
+
var _props$shopConfig = props.shopConfig,
|
|
413
|
+
shopConfig = _props$shopConfig === void 0 ? {} : _props$shopConfig,
|
|
414
|
+
shopConfigStyle = props.shopConfigStyle,
|
|
415
|
+
_props$routes = props.routes,
|
|
416
|
+
routes = _props$routes === void 0 ? [] : _props$routes,
|
|
417
|
+
_props$route = props.route,
|
|
418
|
+
route = _props$route === void 0 ? null : _props$route,
|
|
419
|
+
_props$Link = props.Link,
|
|
420
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
421
|
+
_props$useSelector = props.useSelector,
|
|
422
|
+
useSelector = _props$useSelector === void 0 ? null : _props$useSelector,
|
|
423
|
+
_props$logout = props.logout,
|
|
424
|
+
logout = _props$logout === void 0 ? function () {} : _props$logout;
|
|
425
|
+
var cartItems = useSelector === null || useSelector === void 0 ? void 0 : useSelector(function (state) {
|
|
426
|
+
var _state$cart;
|
|
427
|
+
return state === null || state === void 0 ? void 0 : (_state$cart = state.cart) === null || _state$cart === void 0 ? void 0 : _state$cart.items;
|
|
428
|
+
});
|
|
429
|
+
var userInfo = useSelector === null || useSelector === void 0 ? void 0 : useSelector(function (state) {
|
|
430
|
+
var _state$user;
|
|
431
|
+
return state === null || state === void 0 ? void 0 : (_state$user = state.user) === null || _state$user === void 0 ? void 0 : _state$user.info;
|
|
432
|
+
});
|
|
433
|
+
var _useState2 = React.useState(""),
|
|
434
|
+
totalItem = _useState2[0],
|
|
435
|
+
setTotalItem = _useState2[1];
|
|
436
|
+
var profileRoute = routes === null || routes === void 0 ? void 0 : (_routes$find = routes.find(function (e) {
|
|
437
|
+
return (e === null || e === void 0 ? void 0 : e.name) === "profile";
|
|
438
|
+
})) === null || _routes$find === void 0 ? void 0 : _routes$find.route;
|
|
439
|
+
var profileOptions = [{
|
|
440
|
+
label: "Thông tin cá nhân",
|
|
441
|
+
href: profileRoute,
|
|
442
|
+
icon: /*#__PURE__*/React__default.createElement(io5.IoInformationCircleOutline, {
|
|
443
|
+
size: 24,
|
|
444
|
+
className: "text-gray3"
|
|
445
|
+
})
|
|
446
|
+
}, {
|
|
447
|
+
label: "Đăng xuất",
|
|
448
|
+
onClick: logout,
|
|
449
|
+
icon: /*#__PURE__*/React__default.createElement(io5.IoLogOutOutline, {
|
|
450
|
+
size: 24,
|
|
451
|
+
className: "text-gray3"
|
|
452
|
+
})
|
|
453
|
+
}];
|
|
454
|
+
React.useEffect(function () {
|
|
455
|
+
if ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === "cafe_1" || (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === "grocery_1" || (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === "fashion_1") {
|
|
456
|
+
routes === null || routes === void 0 ? void 0 : routes.forEach(function (route) {
|
|
457
|
+
if ((route === null || route === void 0 ? void 0 : route.name) === "home" || (route === null || route === void 0 ? void 0 : route.name) === "products" || (route === null || route === void 0 ? void 0 : route.name) === "about") {
|
|
458
|
+
route.isShow = true;
|
|
459
|
+
} else {
|
|
460
|
+
route.isShow = false;
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
}, [shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode]);
|
|
465
|
+
React.useEffect(function () {
|
|
466
|
+
var totalItem = cartItems === null || cartItems === void 0 ? void 0 : cartItems.reduce(function (total, item) {
|
|
467
|
+
return total + (item === null || item === void 0 ? void 0 : item.quantity);
|
|
468
|
+
}, 0);
|
|
469
|
+
if (totalItem > 9) {
|
|
470
|
+
totalItem = "9+";
|
|
471
|
+
}
|
|
472
|
+
setTotalItem(totalItem);
|
|
473
|
+
}, [cartItems]);
|
|
474
|
+
var cart = function cart() {
|
|
475
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
476
|
+
Link: Link,
|
|
477
|
+
href: "/carts"
|
|
478
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
479
|
+
className: "relative cursor-pointer"
|
|
480
|
+
}, /*#__PURE__*/React__default.createElement(io5.IoBagOutline, {
|
|
481
|
+
className: "text-primary",
|
|
482
|
+
size: 30
|
|
483
|
+
}), totalItem ? /*#__PURE__*/React__default.createElement("small", {
|
|
484
|
+
className: "absolute aspect-square flex items-center justify-center bg-danger w-5 text-xs rounded-full text-white -top-1 -right-1 pb-px ps-px"
|
|
485
|
+
}, totalItem) : null));
|
|
486
|
+
};
|
|
487
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
488
|
+
className: "hidden lg:flex justify-end items-center gap-6 px-20 py-2 bg-primary"
|
|
489
|
+
}, shopConfig !== null && shopConfig !== void 0 && shopConfig.shopPhone ? /*#__PURE__*/React__default.createElement("div", {
|
|
490
|
+
className: "font-medium border-r pr-6 text-background"
|
|
491
|
+
}, "Hotline: ", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
492
|
+
className: "flex justify-start items-center gap-2"
|
|
493
|
+
}, /*#__PURE__*/React__default.createElement("a", {
|
|
494
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#"
|
|
495
|
+
}, /*#__PURE__*/React__default.createElement(fa.FaFacebookF, {
|
|
496
|
+
size: 24,
|
|
497
|
+
className: "p-1 rounded bg-background text-primary"
|
|
498
|
+
})), /*#__PURE__*/React__default.createElement("a", {
|
|
499
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#"
|
|
500
|
+
}, /*#__PURE__*/React__default.createElement(fa.FaFacebookMessenger, {
|
|
501
|
+
size: 24,
|
|
502
|
+
className: "p-1 rounded bg-background text-primary"
|
|
503
|
+
})), /*#__PURE__*/React__default.createElement("a", {
|
|
504
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#"
|
|
505
|
+
}, /*#__PURE__*/React__default.createElement(si.SiZalo, {
|
|
506
|
+
size: 24,
|
|
507
|
+
className: "p-1 rounded bg-background text-primary"
|
|
508
|
+
})))), /*#__PURE__*/React__default.createElement("div", {
|
|
509
|
+
className: "hidden lg:flex gap-6 justify-between items-center py-2 px-4 xl:px-20 sticky top-0 z-50 bg-background shadow "
|
|
510
|
+
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
511
|
+
Link: Link,
|
|
512
|
+
href: "/",
|
|
513
|
+
className: "flex items-center gap-2"
|
|
514
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
515
|
+
className: "object-cover w-12 h-12",
|
|
516
|
+
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
517
|
+
alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
|
|
518
|
+
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
519
|
+
className: "text-xl md:text-2xl whitespace-nowrap font-semibold text-primary"
|
|
520
|
+
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("div", {
|
|
521
|
+
className: "hidden lg:flex flex-1 items-center gap-4"
|
|
522
|
+
}, routes === null || routes === void 0 ? void 0 : (_routes$filter = routes.filter(function (e) {
|
|
523
|
+
return e === null || e === void 0 ? void 0 : e.isShow;
|
|
524
|
+
})) === null || _routes$filter === void 0 ? void 0 : _routes$filter.map(function (item, index) {
|
|
525
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
526
|
+
Link: Link,
|
|
527
|
+
href: item === null || item === void 0 ? void 0 : item.route,
|
|
528
|
+
key: index
|
|
529
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
530
|
+
className: "py-1 " + ((item === null || item === void 0 ? void 0 : item.name) === (route === null || route === void 0 ? void 0 : route.name) ? "border-b text-primary border-primary" : "text-textBody") + " "
|
|
531
|
+
}, item === null || item === void 0 ? void 0 : item.label));
|
|
532
|
+
})), cart(), userInfo ?
|
|
533
|
+
/*#__PURE__*/
|
|
534
|
+
React__default.createElement("div", {
|
|
535
|
+
className: "flex justify-center"
|
|
536
|
+
}, /*#__PURE__*/React__default.createElement(fa.FaUserCircle, {
|
|
537
|
+
className: "text-primary",
|
|
538
|
+
size: 48
|
|
539
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
540
|
+
className: "ml-2"
|
|
541
|
+
}, /*#__PURE__*/React__default.createElement("label", null, "Xin ch\xE0o!"), /*#__PURE__*/React__default.createElement(Options, {
|
|
542
|
+
Link: Link,
|
|
543
|
+
options: profileOptions,
|
|
544
|
+
dropdownClassName: "right-0 top-8",
|
|
545
|
+
className: "flex gap-4 items-center"
|
|
546
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
547
|
+
className: "font-semibold"
|
|
548
|
+
}, userInfo === null || userInfo === void 0 ? void 0 : userInfo.name), /*#__PURE__*/React__default.createElement(io5.IoChevronDownOutline, {
|
|
549
|
+
className: "text-gray3",
|
|
550
|
+
size: 24
|
|
551
|
+
})))) :
|
|
552
|
+
/*#__PURE__*/
|
|
553
|
+
React__default.createElement("div", {
|
|
554
|
+
className: "flex gap-2"
|
|
555
|
+
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
556
|
+
Link: Link,
|
|
557
|
+
href: "/account"
|
|
558
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
559
|
+
label: "Đăng nhập",
|
|
560
|
+
shopConfigStyle: shopConfigStyle
|
|
561
|
+
})), /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
562
|
+
Link: Link,
|
|
563
|
+
href: "/account"
|
|
564
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
565
|
+
label: "Đăng ký",
|
|
566
|
+
shopConfigStyle: shopConfigStyle,
|
|
567
|
+
type: 'outline'
|
|
568
|
+
})))), /*#__PURE__*/React__default.createElement("div", {
|
|
569
|
+
className: "relative lg:hidden flex gap-4 items-center px-4 py-2"
|
|
570
|
+
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
571
|
+
Link: Link,
|
|
572
|
+
href: "/",
|
|
573
|
+
className: "flex flex-1 gap-2 items-center"
|
|
574
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
575
|
+
className: "object-cover w-12 h-12",
|
|
576
|
+
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
577
|
+
alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
|
|
578
|
+
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
579
|
+
className: "text-xl md:text-2xl font-semibold text-primary"
|
|
580
|
+
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), cart(), /*#__PURE__*/React__default.createElement("button", {
|
|
581
|
+
type: "button",
|
|
582
|
+
onClick: function onClick() {
|
|
583
|
+
setIsOpen(true);
|
|
584
|
+
}
|
|
585
|
+
}, /*#__PURE__*/React__default.createElement(fi.FiMenu, {
|
|
586
|
+
size: 32,
|
|
587
|
+
className: "text-primary"
|
|
588
|
+
})), isOpen ? /*#__PURE__*/React__default.createElement("div", {
|
|
589
|
+
className: "absolute bg-[rgba(0,0,0,0.5)] h-screen w-full top-0 left-0 z-50 flex justify-end",
|
|
590
|
+
onClick: function onClick() {
|
|
591
|
+
setIsOpen(false);
|
|
592
|
+
}
|
|
593
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
594
|
+
className: "h-full w-[80vw] max-w-[320px] p-4 bg-bgSecondary",
|
|
595
|
+
onClick: function onClick(event) {
|
|
596
|
+
return event.stopPropagation();
|
|
597
|
+
}
|
|
598
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
599
|
+
className: "flex justify-between"
|
|
600
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
601
|
+
className: "flex gap-2 items-center"
|
|
602
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
603
|
+
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
604
|
+
className: "h-14 w-14 bg-cover bg-no-repeat"
|
|
605
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
606
|
+
className: "text-xl font-semibold line-clamp-1"
|
|
607
|
+
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("button", {
|
|
608
|
+
className: "text-gray4",
|
|
609
|
+
onClick: function onClick() {
|
|
610
|
+
setIsOpen(false);
|
|
611
|
+
}
|
|
612
|
+
}, /*#__PURE__*/React__default.createElement(rx.RxCross2, {
|
|
613
|
+
size: 24
|
|
614
|
+
}))), /*#__PURE__*/React__default.createElement("div", null, routes === null || routes === void 0 ? void 0 : (_routes$filter2 = routes.filter(function (e) {
|
|
615
|
+
return e === null || e === void 0 ? void 0 : e.isShow;
|
|
616
|
+
})) === null || _routes$filter2 === void 0 ? void 0 : _routes$filter2.map(function (item, index) {
|
|
617
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
618
|
+
Link: Link,
|
|
619
|
+
href: item === null || item === void 0 ? void 0 : item.route,
|
|
620
|
+
key: index
|
|
621
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
622
|
+
className: "py-2 " + ((item === null || item === void 0 ? void 0 : item.name) === (route === null || route === void 0 ? void 0 : route.name) ? "text-textHeading" : "")
|
|
623
|
+
}, item === null || item === void 0 ? void 0 : item.label));
|
|
624
|
+
})))) : null));
|
|
625
|
+
};
|
|
626
|
+
|
|
382
627
|
var SvgIcon = function SvgIcon(_ref) {
|
|
383
628
|
var className = _ref.className,
|
|
384
629
|
style = _ref.style;
|
|
@@ -419,59 +664,358 @@ var SectionTitle1 = function SectionTitle1(props) {
|
|
|
419
664
|
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
|
|
420
665
|
};
|
|
421
666
|
|
|
422
|
-
var
|
|
423
|
-
var
|
|
424
|
-
|
|
425
|
-
data = props.data;
|
|
426
|
-
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
667
|
+
var SectionTitle2 = function SectionTitle2(props) {
|
|
668
|
+
var _props$data = props.data,
|
|
669
|
+
data = _props$data === void 0 ? {} : _props$data;
|
|
427
670
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
428
|
-
className: "
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
}
|
|
671
|
+
className: "flex flex-col gap-2"
|
|
672
|
+
}, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement("div", {
|
|
673
|
+
className: "flex gap-4 justify-center items-center"
|
|
432
674
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
433
|
-
className: "
|
|
675
|
+
className: " w-32 h-0.5 rounded-full bg-stroke"
|
|
434
676
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
435
|
-
className: "
|
|
436
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
437
|
-
className: "
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
677
|
+
className: "text-center whitespace-nowrap text-2xl md:text-4xl font-headingFont font-semibold leading-relaxed text-textHeading"
|
|
678
|
+
}, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement("div", {
|
|
679
|
+
className: " w-32 h-0.5 rounded-full bg-stroke"
|
|
680
|
+
})) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
681
|
+
className: "flex items-center gap-2 justify-center"
|
|
682
|
+
}, /*#__PURE__*/React__default.createElement(io.IoIosStar, {
|
|
683
|
+
className: "w-4 h-4 text-warning"
|
|
684
|
+
}), /*#__PURE__*/React__default.createElement(io.IoIosStar, {
|
|
685
|
+
className: "w-6 h-6 text-warning"
|
|
686
|
+
}), /*#__PURE__*/React__default.createElement(io.IoIosStar, {
|
|
687
|
+
className: "w-4 h-4 text-warning"
|
|
688
|
+
})), data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("div", {
|
|
689
|
+
className: "text-xl text-center leading-relaxed text-textSecondary"
|
|
690
|
+
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
|
|
446
691
|
};
|
|
447
692
|
|
|
448
|
-
var
|
|
449
|
-
var
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
style: {
|
|
456
|
-
backgroundImage: "repeating-linear-gradient(to right, " + color + " 0, " + color + " 10px, transparent 10px, transparent 20px)",
|
|
457
|
-
height: "1px"
|
|
458
|
-
}
|
|
459
|
-
});
|
|
693
|
+
var SectionTitle3 = function SectionTitle3(props) {
|
|
694
|
+
var data = props.data;
|
|
695
|
+
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("h3", {
|
|
696
|
+
className: "font-headingFont leading-relaxed text-textHeading text-2xl md:text-4xl font-semibold"
|
|
697
|
+
}, data === null || data === void 0 ? void 0 : data.sectionTitle), data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("p", {
|
|
698
|
+
className: "text-xl font-medium leading-relaxed text-textSecondary mt-4 lg:mt-6"
|
|
699
|
+
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
|
|
460
700
|
};
|
|
461
701
|
|
|
462
|
-
var
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
_props$
|
|
469
|
-
|
|
470
|
-
_props$
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
702
|
+
var Input = React.forwardRef(function (props, ref) {
|
|
703
|
+
var _props$label = props.label,
|
|
704
|
+
label = _props$label === void 0 ? "" : _props$label,
|
|
705
|
+
_props$placeholder = props.placeholder,
|
|
706
|
+
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
707
|
+
_props$className = props.className,
|
|
708
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
709
|
+
_props$inputClassName = props.inputClassName,
|
|
710
|
+
inputClassName = _props$inputClassName === void 0 ? "" : _props$inputClassName,
|
|
711
|
+
_props$wrapClassName = props.wrapClassName,
|
|
712
|
+
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
713
|
+
_props$labelClassName = props.labelClassName,
|
|
714
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
715
|
+
_props$name = props.name,
|
|
716
|
+
name = _props$name === void 0 ? "" : _props$name,
|
|
717
|
+
_props$style = props.style,
|
|
718
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
719
|
+
_props$onChange = props.onChange,
|
|
720
|
+
onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
|
|
721
|
+
_props$defaultValue = props.defaultValue,
|
|
722
|
+
defaultValue = _props$defaultValue === void 0 ? "" : _props$defaultValue,
|
|
723
|
+
_props$type = props.type,
|
|
724
|
+
type = _props$type === void 0 ? "text" : _props$type,
|
|
725
|
+
_props$rules = props.rules,
|
|
726
|
+
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
727
|
+
_props$isQuantity = props.isQuantity,
|
|
728
|
+
isQuantity = _props$isQuantity === void 0 ? false : _props$isQuantity,
|
|
729
|
+
_props$min = props.min,
|
|
730
|
+
min = _props$min === void 0 ? 0 : _props$min,
|
|
731
|
+
_props$max = props.max,
|
|
732
|
+
max = _props$max === void 0 ? null : _props$max,
|
|
733
|
+
_props$isHidden = props.isHidden,
|
|
734
|
+
isHidden = _props$isHidden === void 0 ? false : _props$isHidden,
|
|
735
|
+
icons = props.icons,
|
|
736
|
+
suffix = props.suffix;
|
|
737
|
+
var _useState = React.useState(defaultValue),
|
|
738
|
+
value = _useState[0],
|
|
739
|
+
_setValue = _useState[1];
|
|
740
|
+
var _useState2 = React.useState(""),
|
|
741
|
+
error = _useState2[0],
|
|
742
|
+
_setError = _useState2[1];
|
|
743
|
+
var _useState3 = React.useState(type),
|
|
744
|
+
typeInput = _useState3[0],
|
|
745
|
+
setTypeInput = _useState3[1];
|
|
746
|
+
var refInput = React.useRef();
|
|
747
|
+
React.useImperativeHandle(ref, function () {
|
|
748
|
+
return {
|
|
749
|
+
validateData: function validateData() {
|
|
750
|
+
return _validateData();
|
|
751
|
+
},
|
|
752
|
+
setValue: function setValue(text) {
|
|
753
|
+
return _setValue(text);
|
|
754
|
+
},
|
|
755
|
+
getValue: function getValue() {
|
|
756
|
+
return value;
|
|
757
|
+
},
|
|
758
|
+
setError: function setError(err) {
|
|
759
|
+
return _setError(err);
|
|
760
|
+
}
|
|
761
|
+
};
|
|
762
|
+
});
|
|
763
|
+
var _validateData = function _validateData() {
|
|
764
|
+
var count = 0;
|
|
765
|
+
for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
|
|
766
|
+
var _e$pattern, _e$validate;
|
|
767
|
+
var e = _step.value;
|
|
768
|
+
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
|
|
769
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
770
|
+
count++;
|
|
771
|
+
break;
|
|
772
|
+
} else if ((e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
|
|
773
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
774
|
+
count++;
|
|
775
|
+
break;
|
|
776
|
+
} else if ((e === null || e === void 0 ? void 0 : e.type) === "validate" && e !== null && e !== void 0 && e.validate && !(e !== null && e !== void 0 && (_e$validate = e.validate) !== null && _e$validate !== void 0 && _e$validate.call(e))) {
|
|
777
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
778
|
+
count++;
|
|
779
|
+
break;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
if (count) {
|
|
783
|
+
return false;
|
|
784
|
+
} else {
|
|
785
|
+
_setError('');
|
|
786
|
+
return true;
|
|
787
|
+
}
|
|
788
|
+
};
|
|
789
|
+
var handleOnChange = function handleOnChange(event) {
|
|
790
|
+
var value = event.target.value;
|
|
791
|
+
if (isQuantity) {
|
|
792
|
+
value = parseInt(value) || 1;
|
|
793
|
+
}
|
|
794
|
+
_setValue(value);
|
|
795
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
796
|
+
};
|
|
797
|
+
var changeQuantity = function changeQuantity(quantity) {
|
|
798
|
+
var newValue = parseInt(value) + quantity;
|
|
799
|
+
if (newValue > min && (max === null || newValue <= max)) {
|
|
800
|
+
_setValue(newValue);
|
|
801
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
802
|
+
}
|
|
803
|
+
};
|
|
804
|
+
var changeHidden = function changeHidden() {
|
|
805
|
+
if (typeInput === "text") setTypeInput("password");else {
|
|
806
|
+
setTypeInput("text");
|
|
807
|
+
}
|
|
808
|
+
};
|
|
809
|
+
var _className = "h-9 md:h-10 py-1 px-2 border border-stroke rounded-lg " + className;
|
|
810
|
+
var _inputClassName = (isQuantity ? "text-center w-12" : "") + " focus:outline-none focus:ring-0 bg-transparent\t " + inputClassName;
|
|
811
|
+
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
812
|
+
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
813
|
+
}));
|
|
814
|
+
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
815
|
+
className: "text-danger"
|
|
816
|
+
}, " *") : null;
|
|
817
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
818
|
+
className: wrapClassName
|
|
819
|
+
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
820
|
+
className: "mb-1 " + labelClassName
|
|
821
|
+
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
822
|
+
className: "flex gap-2 items-center bg-white " + _className,
|
|
823
|
+
style: style
|
|
824
|
+
}, isQuantity ? /*#__PURE__*/React__default.createElement("button", {
|
|
825
|
+
onClick: function onClick() {
|
|
826
|
+
return changeQuantity(-1);
|
|
827
|
+
}
|
|
828
|
+
}, /*#__PURE__*/React__default.createElement(fa6.FaMinus, null)) : null, icons ? /*#__PURE__*/React__default.createElement("div", null, icons) : null, /*#__PURE__*/React__default.createElement("input", {
|
|
829
|
+
type: typeInput,
|
|
830
|
+
name: name,
|
|
831
|
+
value: value,
|
|
832
|
+
placeholder: placeholder,
|
|
833
|
+
onChange: handleOnChange,
|
|
834
|
+
required: required,
|
|
835
|
+
className: _inputClassName,
|
|
836
|
+
ref: refInput
|
|
837
|
+
}), suffix ? /*#__PURE__*/React__default.createElement("div", null, suffix) : null, isHidden ? /*#__PURE__*/React__default.createElement("button", {
|
|
838
|
+
onClick: function onClick() {
|
|
839
|
+
changeHidden();
|
|
840
|
+
}
|
|
841
|
+
}, /*#__PURE__*/React__default.createElement(fa6.FaRegEyeSlash, {
|
|
842
|
+
className: "font-semibold"
|
|
843
|
+
})) : null, isQuantity ? /*#__PURE__*/React__default.createElement("button", {
|
|
844
|
+
onClick: function onClick() {
|
|
845
|
+
return changeQuantity(1);
|
|
846
|
+
}
|
|
847
|
+
}, /*#__PURE__*/React__default.createElement(fa6.FaPlus, null)) : null), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
848
|
+
className: "text-danger"
|
|
849
|
+
}, error) : null);
|
|
850
|
+
});
|
|
851
|
+
|
|
852
|
+
var Hero1 = function Hero1(props) {
|
|
853
|
+
var _sectionData$, _sectionData$$srcImag, _sectionData$2, _sectionData$3, _sectionData$4, _sectionData$4$button, _sectionData$4$button2, _sectionData$5, _sectionData$5$button, _sectionData$5$button2;
|
|
854
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
855
|
+
data = props.data,
|
|
856
|
+
_props$Link = props.Link,
|
|
857
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
858
|
+
var _useState = React.useState(""),
|
|
859
|
+
value = _useState[0],
|
|
860
|
+
setValue = _useState[1];
|
|
861
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
862
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
863
|
+
style: {
|
|
864
|
+
backgroundImage: "url(" + (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : (_sectionData$$srcImag = _sectionData$.srcImages) === null || _sectionData$$srcImag === void 0 ? void 0 : _sectionData$$srcImag[0]) + ")"
|
|
865
|
+
},
|
|
866
|
+
className: "relative w-full h-[200px] md:h-[320px] lg:h-[400px] xl:h-[480px] bg-cover bg-center bg-no-repeat z-0 flex flex-col items-center justify-center mb-24"
|
|
867
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
868
|
+
className: "w-[80%] md:w-2/3 xl:w-1/2 md:h-2/3 flex flex-col gap-2 md:gap-8 justify-center items-center bg-background opacity-90 absolute top-5 md:top-10 px-6 py-4 rounded-tr-[40px] rounded-bl-[40px] md:rounded-tr-[80px] md:rounded-bl-[80px]"
|
|
869
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
870
|
+
className: "text-xl md:text-4xl lg:text-[40px] text-primary font-medium"
|
|
871
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$2 = sectionData[0]) === null || _sectionData$2 === void 0 ? void 0 : _sectionData$2.title), /*#__PURE__*/React__default.createElement("div", {
|
|
872
|
+
className: "text-center md:text-2xl lg:text-3xl font-medium"
|
|
873
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$3 = sectionData[0]) === null || _sectionData$3 === void 0 ? void 0 : _sectionData$3.description), /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
874
|
+
Link: Link,
|
|
875
|
+
href: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$4 = sectionData[0]) === null || _sectionData$4 === void 0 ? void 0 : (_sectionData$4$button = _sectionData$4.buttons) === null || _sectionData$4$button === void 0 ? void 0 : (_sectionData$4$button2 = _sectionData$4$button[0]) === null || _sectionData$4$button2 === void 0 ? void 0 : _sectionData$4$button2.link
|
|
876
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
877
|
+
label: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$5 = sectionData[0]) === null || _sectionData$5 === void 0 ? void 0 : (_sectionData$5$button = _sectionData$5.buttons) === null || _sectionData$5$button === void 0 ? void 0 : (_sectionData$5$button2 = _sectionData$5$button[0]) === null || _sectionData$5$button2 === void 0 ? void 0 : _sectionData$5$button2.label,
|
|
878
|
+
shopConfigStyle: shopConfigStyle
|
|
879
|
+
})), " "), /*#__PURE__*/React__default.createElement("div", {
|
|
880
|
+
className: "w-[90%] md:w-2/3 xl:w-1/2 bg-background flex gap-2 md:gap-4 lg:gap-6 p-2 md:p-4 lg:p-6 rounded-xl absolute bottom-[-40px] shadow-lg"
|
|
881
|
+
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
882
|
+
placeholder: "Tìm kiếm sản phẩm",
|
|
883
|
+
icons: /*#__PURE__*/React__default.createElement(io5.IoSearchOutline, null),
|
|
884
|
+
wrapClassName: "w-full",
|
|
885
|
+
inputClassName: "w-full",
|
|
886
|
+
onChange: setValue
|
|
887
|
+
}), value && (value === null || value === void 0 ? void 0 : value.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
888
|
+
Link: Link,
|
|
889
|
+
href: genLinkSearch(value)
|
|
890
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
891
|
+
label: "T\xECm ki\u1EBFm",
|
|
892
|
+
className: "whitespace-nowrap h-full ",
|
|
893
|
+
shopConfigStyle: shopConfigStyle
|
|
894
|
+
})) : /*#__PURE__*/React__default.createElement(Button, {
|
|
895
|
+
label: "T\xECm ki\u1EBFm",
|
|
896
|
+
className: "whitespace-nowrap ",
|
|
897
|
+
shopConfigStyle: shopConfigStyle
|
|
898
|
+
})));
|
|
899
|
+
};
|
|
900
|
+
|
|
901
|
+
var Hero2 = function Hero2(props) {
|
|
902
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$;
|
|
903
|
+
var shopConfig = props.shopConfig,
|
|
904
|
+
data = props.data;
|
|
905
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
906
|
+
className: "relative"
|
|
907
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
908
|
+
src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
|
|
909
|
+
className: "w-full object-cover min-h-[25vh] md:min-h-[30vh] max-h-[100vh]"
|
|
910
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
911
|
+
className: "absolute flex flex-col gap-1 md:gap-4 absolute w-1/2 lg:w-1/3 top-2 sm:top-[20%] xl:top-1/4 right-[2%] lg:right-[15%]"
|
|
912
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
913
|
+
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
914
|
+
className: "h-6 w-6 md:h-16 md:w-16 lg:h-20 lg:w-20"
|
|
915
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
916
|
+
className: "text-lg md:text-3xl lg:text-4xl font-medium"
|
|
917
|
+
}, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.title), /*#__PURE__*/React__default.createElement("div", {
|
|
918
|
+
className: "text-sm md:text-xl lg:text-2xl "
|
|
919
|
+
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description)));
|
|
920
|
+
};
|
|
921
|
+
|
|
922
|
+
var Hero5 = function Hero5(props) {
|
|
923
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$;
|
|
924
|
+
var data = props.data;
|
|
925
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
926
|
+
className: "relative"
|
|
927
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
928
|
+
src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
|
|
929
|
+
className: "w-full min-h-[25vh] md:min-h-[30vh] max-h-[100vh]"
|
|
930
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
931
|
+
className: "flex flex-col gap-2 md:gap-4 absolute top-5 md:top-[20%] w-1/2 lg:w-1/3 left-4 xl:left-20"
|
|
932
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
933
|
+
className: "text-xl md:text-3xl lg:text-4xl text-textHeading font-medium"
|
|
934
|
+
}, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.title), /*#__PURE__*/React__default.createElement("div", {
|
|
935
|
+
className: "md:text-xl lg:text-2xl text-primary line-clamp-3 md:line-clamp-none"
|
|
936
|
+
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description)));
|
|
937
|
+
};
|
|
938
|
+
|
|
939
|
+
var Hero6 = function Hero6(props) {
|
|
940
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$, _sectionData$, _sectionData$$buttons;
|
|
941
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
942
|
+
data = props.data;
|
|
943
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
944
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
945
|
+
className: "relative"
|
|
946
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
947
|
+
src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
|
|
948
|
+
className: "w-full h-auto min-h-[25vh md:min-h-[30vh] max-h-[100vh]"
|
|
949
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
950
|
+
className: "absolute top-0 md:top-14 lg:top-20 w-full p-3 md:p-6 lg:p-12 z-10 flex flex-col gap-2 md:gap-4 lg:gap-6 items-center justify-center"
|
|
951
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
952
|
+
className: "text-primary text-xl md:text-3xl lg:text-5xl leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
953
|
+
}, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.title), /*#__PURE__*/React__default.createElement("div", {
|
|
954
|
+
className: "md:text-xl"
|
|
955
|
+
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description), sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : (_sectionData$$buttons = _sectionData$.buttons) === null || _sectionData$$buttons === void 0 ? void 0 : _sectionData$$buttons.map(function (button) {
|
|
956
|
+
return /*#__PURE__*/React__default.createElement("a", {
|
|
957
|
+
href: (button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
958
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
959
|
+
label: button === null || button === void 0 ? void 0 : button.label,
|
|
960
|
+
shopConfigStyle: shopConfigStyle
|
|
961
|
+
}));
|
|
962
|
+
})));
|
|
963
|
+
};
|
|
964
|
+
|
|
965
|
+
var Hero10 = function Hero10(props) {
|
|
966
|
+
var _data$data, _data$data$, _data$data$$srcImages, _sectionData$, _sectionData$2, _sectionData$2$button;
|
|
967
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
968
|
+
data = props.data;
|
|
969
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
970
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
971
|
+
className: "relative w-full bg-cover bg-center bg-no-repeat ",
|
|
972
|
+
style: {
|
|
973
|
+
backgroundImage: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0]) + ")"
|
|
974
|
+
}
|
|
975
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
976
|
+
className: "absolute top-0 w-full h-full bg-black opacity-40 z-0"
|
|
977
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
978
|
+
className: "relative w-full min-h-[540px] p-12 z-10 flex flex-col gap-6 items-center justify-center"
|
|
979
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
980
|
+
className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
981
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.title), sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$2 = sectionData[0]) === null || _sectionData$2 === void 0 ? void 0 : (_sectionData$2$button = _sectionData$2.buttons) === null || _sectionData$2$button === void 0 ? void 0 : _sectionData$2$button.map(function (button) {
|
|
982
|
+
return /*#__PURE__*/React__default.createElement("a", {
|
|
983
|
+
href: (button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
984
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
985
|
+
label: button === null || button === void 0 ? void 0 : button.label,
|
|
986
|
+
shopConfigStyle: shopConfigStyle
|
|
987
|
+
}));
|
|
988
|
+
})));
|
|
989
|
+
};
|
|
990
|
+
|
|
991
|
+
var Dash = function Dash(props) {
|
|
992
|
+
var _props$color = props.color,
|
|
993
|
+
color = _props$color === void 0 ? "#ccc" : _props$color,
|
|
994
|
+
_props$className = props.className,
|
|
995
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
996
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
997
|
+
className: "mx-auto w-full max-w-[240px] md:max-w-[720px] border-b-0 " + className,
|
|
998
|
+
style: {
|
|
999
|
+
backgroundImage: "repeating-linear-gradient(to right, " + color + " 0, " + color + " 10px, transparent 10px, transparent 20px)",
|
|
1000
|
+
height: "1px"
|
|
1001
|
+
}
|
|
1002
|
+
});
|
|
1003
|
+
};
|
|
1004
|
+
|
|
1005
|
+
var SECTION_DEFAULT_CLASS = "my-12 mx-4 xl:mx-20 bg-background";
|
|
1006
|
+
var SECTION_CLASS = "my-6 md:my-12 px-4 xl:px-20 bg-background";
|
|
1007
|
+
|
|
1008
|
+
var Hero11 = function Hero11(props) {
|
|
1009
|
+
var _data$data;
|
|
1010
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
1011
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
1012
|
+
_props$data = props.data,
|
|
1013
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
1014
|
+
_props$SectionTitle = props.SectionTitle,
|
|
1015
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
1016
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
1017
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
1018
|
+
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
|
|
475
1019
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
476
1020
|
className: "" + SECTION_DEFAULT_CLASS
|
|
477
1021
|
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
@@ -513,6 +1057,89 @@ var Hero11$1 = function Hero11(props) {
|
|
|
513
1057
|
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description)));
|
|
514
1058
|
};
|
|
515
1059
|
|
|
1060
|
+
var CarouselItem = function CarouselItem(props) {
|
|
1061
|
+
var _Object$keys;
|
|
1062
|
+
var _props$data = props.data,
|
|
1063
|
+
data = _props$data === void 0 ? [] : _props$data,
|
|
1064
|
+
_props$className = props.className,
|
|
1065
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
1066
|
+
_props$style = props.style,
|
|
1067
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
1068
|
+
_props$onClick = props.onClick,
|
|
1069
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
1070
|
+
_props$isAll = props.isAll,
|
|
1071
|
+
isAll = _props$isAll === void 0 ? true : _props$isAll,
|
|
1072
|
+
_props$isNavigateButt = props.isNavigateButton,
|
|
1073
|
+
isNavigateButton = _props$isNavigateButt === void 0 ? true : _props$isNavigateButt,
|
|
1074
|
+
_props$itemClassName = props.itemClassName,
|
|
1075
|
+
itemClassName = _props$itemClassName === void 0 ? "" : _props$itemClassName;
|
|
1076
|
+
var listRef = React.useRef(null);
|
|
1077
|
+
var _useState = React.useState(true),
|
|
1078
|
+
isScrolledToRight = _useState[0],
|
|
1079
|
+
setIsScrolledToRight = _useState[1];
|
|
1080
|
+
var _useState2 = React.useState({}),
|
|
1081
|
+
value = _useState2[0],
|
|
1082
|
+
setValue = _useState2[1];
|
|
1083
|
+
var handleClickPrevImg = function handleClickPrevImg() {
|
|
1084
|
+
if (listRef.current) {
|
|
1085
|
+
setIsScrolledToRight(false);
|
|
1086
|
+
listRef.current.scrollBy({
|
|
1087
|
+
left: -150,
|
|
1088
|
+
behavior: "smooth"
|
|
1089
|
+
});
|
|
1090
|
+
}
|
|
1091
|
+
};
|
|
1092
|
+
var handleClickNextImg = function handleClickNextImg() {
|
|
1093
|
+
setIsScrolledToRight(true);
|
|
1094
|
+
if (listRef.current) {
|
|
1095
|
+
listRef.current.scrollBy({
|
|
1096
|
+
left: 150,
|
|
1097
|
+
behavior: "smooth"
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
};
|
|
1101
|
+
var handleOnClick = function handleOnClick(item) {
|
|
1102
|
+
setValue(item);
|
|
1103
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(item);
|
|
1104
|
+
};
|
|
1105
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1106
|
+
className: "grid grid-cols-12 h-10 md:h-12 " + className,
|
|
1107
|
+
style: style
|
|
1108
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1109
|
+
className: "col-span-12 lg:col-span-10 md:col-span-9 overflow-hidden "
|
|
1110
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1111
|
+
className: "flex overflow-x-auto gap-2 hide-scrollbar items-center",
|
|
1112
|
+
ref: listRef
|
|
1113
|
+
}, isAll ? /*#__PURE__*/React__default.createElement("div", {
|
|
1114
|
+
className: " " + ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(value)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0 ? "bg-primary text-textButton" : "bg-background") + " w-max border border-primary p-1 md:p-2 rounded-lg cursor-pointer whitespace-nowrap",
|
|
1115
|
+
onClick: function onClick() {
|
|
1116
|
+
handleOnClick({});
|
|
1117
|
+
}
|
|
1118
|
+
}, "T\u1EA5t c\u1EA3") : null, data && (data === null || data === void 0 ? void 0 : data.length) > 0 && (data === null || data === void 0 ? void 0 : data.map(function (item, index) {
|
|
1119
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1120
|
+
className: ((value === null || value === void 0 ? void 0 : value.value) === (item === null || item === void 0 ? void 0 : item.value) ? "bg-primary text-textButton" : "bg-background") + " w-max border border-primary py-1 px-2 md:py-2 md:px-3 rounded-lg cursor-pointer whitespace-nowrap " + itemClassName,
|
|
1121
|
+
key: "carousel-" + index,
|
|
1122
|
+
onClick: function onClick() {
|
|
1123
|
+
handleOnClick(item);
|
|
1124
|
+
}
|
|
1125
|
+
}, item === null || item === void 0 ? void 0 : item.label);
|
|
1126
|
+
})))), isNavigateButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
1127
|
+
className: "hidden my-auto col-span-5 md:col-span-3 lg:col-span-2 gap-4 md:flex justify-end "
|
|
1128
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
1129
|
+
className: "p-2 h-full w-10 md:w-12 rounded-full " + (isScrolledToRight ? "bg-gray5" : "bg-primary"),
|
|
1130
|
+
onClick: handleClickPrevImg
|
|
1131
|
+
}, /*#__PURE__*/React__default.createElement(io.IoIosArrowBack, {
|
|
1132
|
+
size: 32,
|
|
1133
|
+
className: "inline-block text-lg text-textButton"
|
|
1134
|
+
})), /*#__PURE__*/React__default.createElement("button", {
|
|
1135
|
+
className: " p-2 h-full w-10 md:w-12 rounded-full " + (isScrolledToRight ? "bg-primary" : "bg-gray5"),
|
|
1136
|
+
onClick: handleClickNextImg
|
|
1137
|
+
}, /*#__PURE__*/React__default.createElement(io.IoIosArrowForward, {
|
|
1138
|
+
size: 32,
|
|
1139
|
+
className: "inline-block text-lg text-textButton"
|
|
1140
|
+
}))) : null);
|
|
1141
|
+
};
|
|
1142
|
+
|
|
516
1143
|
// A type of promise-like that resolves synchronously and supports only one observer
|
|
517
1144
|
|
|
518
1145
|
const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
|
|
@@ -6601,363 +7228,110 @@ request.interceptors.response.use(function (response) {
|
|
|
6601
7228
|
data: {}
|
|
6602
7229
|
});
|
|
6603
7230
|
});
|
|
6604
|
-
var api = function api(options) {
|
|
6605
|
-
var config = _extends({
|
|
6606
|
-
baseURL: getBaseUrl()
|
|
6607
|
-
}, options, {
|
|
6608
|
-
paramsSerializer: function paramsSerializer(params) {
|
|
6609
|
-
return lib.stringify(params, {
|
|
6610
|
-
arrayFormat: "repeat"
|
|
6611
|
-
});
|
|
6612
|
-
},
|
|
6613
|
-
headers: _extends({}, options.headers)
|
|
6614
|
-
});
|
|
6615
|
-
return request(config);
|
|
6616
|
-
};
|
|
6617
|
-
|
|
6618
|
-
var getShopCategoriesApi = function getShopCategoriesApi(shopId, types) {
|
|
6619
|
-
return api({
|
|
6620
|
-
method: "get",
|
|
6621
|
-
url: "/landing-shop/get-product-category-on-landing",
|
|
6622
|
-
params: {
|
|
6623
|
-
shopId: shopId,
|
|
6624
|
-
types: types,
|
|
6625
|
-
isShowOnLanding: true
|
|
6626
|
-
},
|
|
6627
|
-
headers: {
|
|
6628
|
-
shopId: shopId
|
|
6629
|
-
}
|
|
6630
|
-
});
|
|
6631
|
-
};
|
|
6632
|
-
var getProductListApi = function getProductListApi(shopId, params) {
|
|
6633
|
-
if (params === void 0) {
|
|
6634
|
-
params = {};
|
|
6635
|
-
}
|
|
6636
|
-
return api({
|
|
6637
|
-
method: "get",
|
|
6638
|
-
url: "/landing-shop/get-product-on-landing",
|
|
6639
|
-
params: _extends({
|
|
6640
|
-
shopId: shopId,
|
|
6641
|
-
isShowOnLanding: true
|
|
6642
|
-
}, params),
|
|
6643
|
-
headers: {
|
|
6644
|
-
shopId: shopId
|
|
6645
|
-
}
|
|
6646
|
-
});
|
|
6647
|
-
};
|
|
6648
|
-
var getDetailProductApi = function getDetailProductApi(shopId, productId) {
|
|
6649
|
-
return api({
|
|
6650
|
-
method: "get",
|
|
6651
|
-
url: "/products/" + productId + "/shops/" + shopId + "/info",
|
|
6652
|
-
headers: {
|
|
6653
|
-
shopId: shopId
|
|
6654
|
-
}
|
|
6655
|
-
});
|
|
6656
|
-
};
|
|
6657
|
-
|
|
6658
|
-
var CategoryController = function CategoryController(props) {
|
|
6659
|
-
var shopConfig = props.shopConfig,
|
|
6660
|
-
_props$types = props.types,
|
|
6661
|
-
types = _props$types === void 0 ? "" : _props$types;
|
|
6662
|
-
var _useState = React.useState([]),
|
|
6663
|
-
categories = _useState[0],
|
|
6664
|
-
setCategories = _useState[1];
|
|
6665
|
-
React.useEffect(function () {
|
|
6666
|
-
getCategoryList();
|
|
6667
|
-
}, []);
|
|
6668
|
-
var getCategoryList = function getCategoryList() {
|
|
6669
|
-
try {
|
|
6670
|
-
var _temp = _catch(function () {
|
|
6671
|
-
return Promise.resolve(getShopCategoriesApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, types)).then(function (res) {
|
|
6672
|
-
var _res$data, _res$data$status;
|
|
6673
|
-
if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$status = _res$data.status) === null || _res$data$status === void 0 ? void 0 : _res$data$status.code) == 200) {
|
|
6674
|
-
var _res$data2;
|
|
6675
|
-
setCategories(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
|
|
6676
|
-
}
|
|
6677
|
-
});
|
|
6678
|
-
}, function (e) {
|
|
6679
|
-
console.log(e);
|
|
6680
|
-
});
|
|
6681
|
-
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
6682
|
-
} catch (e) {
|
|
6683
|
-
return Promise.reject(e);
|
|
6684
|
-
}
|
|
6685
|
-
};
|
|
6686
|
-
return {
|
|
6687
|
-
categories: categories
|
|
6688
|
-
};
|
|
6689
|
-
};
|
|
6690
|
-
|
|
6691
|
-
var Hero13 = function Hero13(props) {
|
|
6692
|
-
var listRef = React.useRef(null);
|
|
6693
|
-
var _useState = React.useState(false),
|
|
6694
|
-
isOpen = _useState[0],
|
|
6695
|
-
setIsOpen = _useState[1];
|
|
6696
|
-
var shopConfigStyle = props.shopConfigStyle,
|
|
6697
|
-
data = props.data;
|
|
6698
|
-
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
6699
|
-
var _CategoryController = CategoryController(props),
|
|
6700
|
-
_CategoryController$c = _CategoryController.categories,
|
|
6701
|
-
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
6702
|
-
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
6703
|
-
_shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
|
|
6704
|
-
primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
|
|
6705
|
-
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
|
|
6706
|
-
textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
6707
|
-
_shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
|
|
6708
|
-
background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
|
|
6709
|
-
_shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
|
|
6710
|
-
bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
|
|
6711
|
-
_shopConfigStyle$colo6 = _shopConfigStyle$colo.textButton,
|
|
6712
|
-
textButton = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
|
|
6713
|
-
var handleClickPrevImg = function handleClickPrevImg() {
|
|
6714
|
-
if (listRef.current) {
|
|
6715
|
-
listRef.current.scrollBy({
|
|
6716
|
-
left: -90,
|
|
6717
|
-
behavior: "smooth"
|
|
6718
|
-
});
|
|
6719
|
-
}
|
|
6720
|
-
};
|
|
6721
|
-
var handleClickNextImg = function handleClickNextImg() {
|
|
6722
|
-
if (listRef.current) {
|
|
6723
|
-
listRef.current.scrollBy({
|
|
6724
|
-
left: 90,
|
|
6725
|
-
behavior: "smooth"
|
|
6726
|
-
});
|
|
6727
|
-
}
|
|
6728
|
-
};
|
|
6729
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
6730
|
-
style: {
|
|
6731
|
-
background: background
|
|
6732
|
-
}
|
|
6733
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6734
|
-
className: "lg:block hidden lg:flex lg:flex-row justify-between h-20 items-center px-4 md:px-8 lg:px-12 xl:px-20",
|
|
6735
|
-
style: {
|
|
6736
|
-
background: bgSecondary,
|
|
6737
|
-
color: textBody
|
|
6738
|
-
}
|
|
6739
|
-
}, /*#__PURE__*/React__default.createElement("a", {
|
|
6740
|
-
href: "/",
|
|
6741
|
-
className: "flex items-center"
|
|
6742
|
-
}, /*#__PURE__*/React__default.createElement("img", {
|
|
6743
|
-
className: "object-cover w-14 ",
|
|
6744
|
-
src: "https://s3-alpha-sig.figma.com/img/05e9/1165/8608d0a8b864cc9e15fa74b32f8bfabc?Expires=1730073600&Key-Pair-Id=APKAQ4GOSFWCVNEHN3O4&Signature=qkNnTVXTSs7-CbaDRo5jFJm9a5drVP9BvVPKX8ToQS4fi0lKL0atq45SIxxzXQV21dgoMvHvNZwO5-lsnrq6hbeedSkTWSWLrU65pUy7X9W0d20kGMLnP5KH3RWdZ0bfgJ9ZvRBbsqMz1bIucbLNeAt8PLaHvLl4HLKz5qvKVbWb6j098vwScj6LI51qG2y01N9qu051QWzOj5ijYS7qWNXT1PTlf4o07xAThnGObDdatBIaocIQPno6srkWK~agAdBrW9IdE~l3UP5XBP~pR~zvLGiniYloQoDvAscoaYr2aTTjf6z9DQLl35WBbNGKrWcKFA80WAE69QdpNJxckQ__",
|
|
6745
|
-
alt: ""
|
|
6746
|
-
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
6747
|
-
className: "text-xl md:text-2xl whitespace-nowrap font-semibold ms-2",
|
|
6748
|
-
style: {
|
|
6749
|
-
color: primary
|
|
6750
|
-
}
|
|
6751
|
-
}, data !== null && data !== void 0 && data.sectionTitle ? data.sectionTitle : "Điện thoại Hải Anh")), /*#__PURE__*/React__default.createElement("div", {
|
|
6752
|
-
className: " hidden lg:flex items-center py-8"
|
|
6753
|
-
}, /*#__PURE__*/React__default.createElement("a", {
|
|
6754
|
-
href: "/"
|
|
6755
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6756
|
-
className: "border-b-2",
|
|
6757
|
-
style: {
|
|
6758
|
-
color: primary,
|
|
6759
|
-
borderColor: primary
|
|
6760
|
-
}
|
|
6761
|
-
}, "Trang ch\u1EE7")), /*#__PURE__*/React__default.createElement("div", {
|
|
6762
|
-
className: "relative group "
|
|
6763
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6764
|
-
className: " mx-4 "
|
|
6765
|
-
}, "Danh m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
|
|
6766
|
-
className: "absolute hidden grid group-hover:grid grid-cols-3 lg:w-[400px] 2xl:w-[600px] ms-4 py-2 px-2 gap-2 leading-10 rounded-xl z-50",
|
|
6767
|
-
style: {
|
|
6768
|
-
background: bgSecondary
|
|
6769
|
-
}
|
|
6770
|
-
}, categories && categories.length > 0 && categories.map(function (item) {
|
|
6771
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
6772
|
-
key: "hover-" + item.categoryId,
|
|
6773
|
-
className: "hover:bg-gray4 hover:text-white mx-auto px-6"
|
|
6774
|
-
}, /*#__PURE__*/React__default.createElement("a", {
|
|
6775
|
-
href: "#"
|
|
6776
|
-
}, /*#__PURE__*/React__default.createElement("div", null, item.cateName)));
|
|
6777
|
-
}))), /*#__PURE__*/React__default.createElement("a", {
|
|
6778
|
-
href: "/introduction"
|
|
6779
|
-
}, /*#__PURE__*/React__default.createElement("div", null, "Gi\u1EDBi thi\u1EC7u"))), /*#__PURE__*/React__default.createElement("div", {
|
|
6780
|
-
className: " hidden xl:flex group "
|
|
6781
|
-
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(fa.FaPhone, {
|
|
6782
|
-
className: "inline-block mb-1 me-2",
|
|
6783
|
-
style: {
|
|
6784
|
-
color: primary
|
|
6785
|
-
}
|
|
6786
|
-
}), " 0123456789"), /*#__PURE__*/React__default.createElement("div", {
|
|
6787
|
-
className: "relative"
|
|
6788
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6789
|
-
className: " ms-5"
|
|
6790
|
-
}, /*#__PURE__*/React__default.createElement(io5.IoLocationOutline, {
|
|
6791
|
-
className: " inline-block\ttext-xl mb-1",
|
|
6792
|
-
style: {
|
|
6793
|
-
color: primary
|
|
6794
|
-
}
|
|
6795
|
-
}), " \u0110\u1ECBa ch\u1EC9 c\u1EEDa h\xE0ng"), /*#__PURE__*/React__default.createElement("div", {
|
|
6796
|
-
className: "absolute grid grid-cols-1 hidden group-hover:grid w-[420px] ms-6 leading-6 rounded-xl z-50"
|
|
6797
|
-
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
6798
|
-
className: "flex"
|
|
6799
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6800
|
-
className: "relative"
|
|
6801
|
-
}, /*#__PURE__*/React__default.createElement(pi.PiHandbagSimpleLight, {
|
|
6802
|
-
style: {
|
|
6803
|
-
fontSize: "30px",
|
|
6804
|
-
color: primary
|
|
6805
|
-
}
|
|
6806
|
-
}), /*#__PURE__*/React__default.createElement("small", {
|
|
6807
|
-
className: " border leading-3 absolute flex items-center bg-red-500 px-[1px] text-sm rounded-full",
|
|
6808
|
-
style: {
|
|
6809
|
-
color: textButton,
|
|
6810
|
-
fontSize: "10px",
|
|
6811
|
-
width: "50%",
|
|
6812
|
-
top: "1px",
|
|
6813
|
-
right: "2px"
|
|
6814
|
-
}
|
|
6815
|
-
}, "11"))),
|
|
6816
|
-
/*#__PURE__*/
|
|
6817
|
-
React__default.createElement("div", {
|
|
6818
|
-
className: "flex"
|
|
6819
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
6820
|
-
className: "me-3 p-2 rounded-lg ",
|
|
6821
|
-
style: {
|
|
6822
|
-
background: primary,
|
|
6823
|
-
color: textButton
|
|
6824
|
-
}
|
|
6825
|
-
}, "\u0110\u0103ng nh\u1EADp"), /*#__PURE__*/React__default.createElement("button", {
|
|
6826
|
-
className: "border rounded-lg p-2",
|
|
6827
|
-
style: {
|
|
6828
|
-
color: primary,
|
|
6829
|
-
borderColor: primary
|
|
6830
|
-
}
|
|
6831
|
-
}, "\u0110\u0103ng k\xFD"))), /*#__PURE__*/React__default.createElement("div", {
|
|
6832
|
-
className: "relative lg:hidden block flex justify-between items-center h-12 items-center px-4 md:px-8"
|
|
6833
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6834
|
-
className: ""
|
|
6835
|
-
}, isOpen === false ? /*#__PURE__*/React__default.createElement("button", {
|
|
6836
|
-
type: "button",
|
|
6837
|
-
onClick: function onClick() {
|
|
6838
|
-
setIsOpen(true);
|
|
6839
|
-
}
|
|
6840
|
-
}, /*#__PURE__*/React__default.createElement(fi.FiMenu, {
|
|
6841
|
-
className: "text-3xl mt-2"
|
|
6842
|
-
})) : /*#__PURE__*/React__default.createElement("div", {
|
|
6843
|
-
className: "absolute h-screen top-0 -ms-4 md:-ms-8 lg:-ms-12 xl:-ms-20 py-4 w-[60vw] z-50 ",
|
|
6844
|
-
style: {
|
|
6845
|
-
background: bgSecondary
|
|
6846
|
-
}
|
|
6847
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6848
|
-
className: "flex justify-between items-center px-2 mb-6"
|
|
6849
|
-
}, /*#__PURE__*/React__default.createElement("a", {
|
|
6850
|
-
href: "/",
|
|
6851
|
-
className: "flex items-center"
|
|
6852
|
-
}, /*#__PURE__*/React__default.createElement("img", {
|
|
6853
|
-
className: "object-cover w-14 ",
|
|
6854
|
-
src: "https://s3-alpha-sig.figma.com/img/05e9/1165/8608d0a8b864cc9e15fa74b32f8bfabc?Expires=1730073600&Key-Pair-Id=APKAQ4GOSFWCVNEHN3O4&Signature=qkNnTVXTSs7-CbaDRo5jFJm9a5drVP9BvVPKX8ToQS4fi0lKL0atq45SIxxzXQV21dgoMvHvNZwO5-lsnrq6hbeedSkTWSWLrU65pUy7X9W0d20kGMLnP5KH3RWdZ0bfgJ9ZvRBbsqMz1bIucbLNeAt8PLaHvLl4HLKz5qvKVbWb6j098vwScj6LI51qG2y01N9qu051QWzOj5ijYS7qWNXT1PTlf4o07xAThnGObDdatBIaocIQPno6srkWK~agAdBrW9IdE~l3UP5XBP~pR~zvLGiniYloQoDvAscoaYr2aTTjf6z9DQLl35WBbNGKrWcKFA80WAE69QdpNJxckQ__",
|
|
6855
|
-
alt: ""
|
|
6856
|
-
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
6857
|
-
className: "text-xl md:text-2xl font-semibold ms-2",
|
|
6858
|
-
style: {
|
|
6859
|
-
color: primary
|
|
6860
|
-
}
|
|
6861
|
-
}, data !== null && data !== void 0 && data.sectionTitle ? data.sectionTitle : "Điện thoại Hải Anh")), /*#__PURE__*/React__default.createElement("button", {
|
|
6862
|
-
className: "text-4xl text-gray3",
|
|
6863
|
-
onClick: function onClick() {
|
|
6864
|
-
setIsOpen(false);
|
|
7231
|
+
var api = function api(options) {
|
|
7232
|
+
var config = _extends({
|
|
7233
|
+
baseURL: getBaseUrl()
|
|
7234
|
+
}, options, {
|
|
7235
|
+
paramsSerializer: function paramsSerializer(params) {
|
|
7236
|
+
return lib.stringify(params, {
|
|
7237
|
+
arrayFormat: "repeat"
|
|
7238
|
+
});
|
|
7239
|
+
},
|
|
7240
|
+
headers: _extends({}, options.headers)
|
|
7241
|
+
});
|
|
7242
|
+
return request(config);
|
|
7243
|
+
};
|
|
7244
|
+
|
|
7245
|
+
var getShopCategoriesApi = function getShopCategoriesApi(shopId, types) {
|
|
7246
|
+
return api({
|
|
7247
|
+
method: "get",
|
|
7248
|
+
url: "/landing-shop/get-product-category-on-landing",
|
|
7249
|
+
params: {
|
|
7250
|
+
shopId: shopId,
|
|
7251
|
+
types: types,
|
|
7252
|
+
isShowOnLanding: true
|
|
7253
|
+
},
|
|
7254
|
+
headers: {
|
|
7255
|
+
shopId: shopId
|
|
6865
7256
|
}
|
|
6866
|
-
}
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
6881
|
-
className: "border-2 rounded-lg p-4"
|
|
6882
|
-
}, "Gi\u1EDBi thi\u1EC7u"))))))), /*#__PURE__*/React__default.createElement("a", {
|
|
6883
|
-
href: "/",
|
|
6884
|
-
className: "flex items-center"
|
|
6885
|
-
}, /*#__PURE__*/React__default.createElement("img", {
|
|
6886
|
-
className: "object-cover w-12 md:w-14 ",
|
|
6887
|
-
src: "https://s3-alpha-sig.figma.com/img/05e9/1165/8608d0a8b864cc9e15fa74b32f8bfabc?Expires=1730073600&Key-Pair-Id=APKAQ4GOSFWCVNEHN3O4&Signature=qkNnTVXTSs7-CbaDRo5jFJm9a5drVP9BvVPKX8ToQS4fi0lKL0atq45SIxxzXQV21dgoMvHvNZwO5-lsnrq6hbeedSkTWSWLrU65pUy7X9W0d20kGMLnP5KH3RWdZ0bfgJ9ZvRBbsqMz1bIucbLNeAt8PLaHvLl4HLKz5qvKVbWb6j098vwScj6LI51qG2y01N9qu051QWzOj5ijYS7qWNXT1PTlf4o07xAThnGObDdatBIaocIQPno6srkWK~agAdBrW9IdE~l3UP5XBP~pR~zvLGiniYloQoDvAscoaYr2aTTjf6z9DQLl35WBbNGKrWcKFA80WAE69QdpNJxckQ__",
|
|
6888
|
-
alt: ""
|
|
6889
|
-
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
6890
|
-
className: "text-xl md:text-2xl font-semibold ",
|
|
6891
|
-
style: {
|
|
6892
|
-
color: primary
|
|
7257
|
+
});
|
|
7258
|
+
};
|
|
7259
|
+
var getProductListApi = function getProductListApi(shopId, params) {
|
|
7260
|
+
if (params === void 0) {
|
|
7261
|
+
params = {};
|
|
7262
|
+
}
|
|
7263
|
+
return api({
|
|
7264
|
+
method: "get",
|
|
7265
|
+
url: "/landing-shop/get-product-on-landing",
|
|
7266
|
+
params: _extends({
|
|
7267
|
+
shopId: shopId,
|
|
7268
|
+
isShowOnLanding: true
|
|
7269
|
+
}, params),
|
|
7270
|
+
headers: {
|
|
7271
|
+
shopId: shopId
|
|
6893
7272
|
}
|
|
6894
|
-
}
|
|
6895
|
-
|
|
6896
|
-
|
|
6897
|
-
|
|
6898
|
-
|
|
6899
|
-
|
|
7273
|
+
});
|
|
7274
|
+
};
|
|
7275
|
+
var getDetailProductApi = function getDetailProductApi(shopId, productId) {
|
|
7276
|
+
return api({
|
|
7277
|
+
method: "get",
|
|
7278
|
+
url: "/products/" + productId + "/shops/" + shopId + "/info",
|
|
7279
|
+
headers: {
|
|
7280
|
+
shopId: shopId
|
|
6900
7281
|
}
|
|
6901
|
-
})
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
7282
|
+
});
|
|
7283
|
+
};
|
|
7284
|
+
|
|
7285
|
+
var CategoryController = function CategoryController(props) {
|
|
7286
|
+
var shopConfig = props.shopConfig,
|
|
7287
|
+
_props$types = props.types,
|
|
7288
|
+
types = _props$types === void 0 ? "" : _props$types;
|
|
7289
|
+
var _useState = React.useState([]),
|
|
7290
|
+
categories = _useState[0],
|
|
7291
|
+
setCategories = _useState[1];
|
|
7292
|
+
React.useEffect(function () {
|
|
7293
|
+
getCategoryList();
|
|
7294
|
+
}, []);
|
|
7295
|
+
var getCategoryList = function getCategoryList() {
|
|
7296
|
+
try {
|
|
7297
|
+
var _temp = _catch(function () {
|
|
7298
|
+
return Promise.resolve(getShopCategoriesApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, types)).then(function (res) {
|
|
7299
|
+
var _res$data, _res$data$status;
|
|
7300
|
+
if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$status = _res$data.status) === null || _res$data$status === void 0 ? void 0 : _res$data$status.code) == 200) {
|
|
7301
|
+
var _res$data2, _res$data2$data;
|
|
7302
|
+
var mappingCategory = res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : (_res$data2$data = _res$data2.data) === null || _res$data2$data === void 0 ? void 0 : _res$data2$data.map(function (item) {
|
|
7303
|
+
return _extends({}, item, {
|
|
7304
|
+
label: item === null || item === void 0 ? void 0 : item.cateName,
|
|
7305
|
+
value: item === null || item === void 0 ? void 0 : item.categoryId
|
|
7306
|
+
});
|
|
7307
|
+
});
|
|
7308
|
+
setCategories(mappingCategory);
|
|
7309
|
+
}
|
|
7310
|
+
});
|
|
7311
|
+
}, function (e) {
|
|
7312
|
+
console.log(e);
|
|
7313
|
+
});
|
|
7314
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
7315
|
+
} catch (e) {
|
|
7316
|
+
return Promise.reject(e);
|
|
6916
7317
|
}
|
|
6917
|
-
}
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
}, /*#__PURE__*/React__default.createElement("a", {
|
|
6935
|
-
href: "/products/category?id=" + item.categoryId
|
|
6936
|
-
}, item.cateName));
|
|
6937
|
-
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
6938
|
-
className: "lg:block hidden lg:col-span-1 my-auto flex "
|
|
6939
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
6940
|
-
className: "",
|
|
6941
|
-
onClick: handleClickPrevImg
|
|
6942
|
-
}, /*#__PURE__*/React__default.createElement(fa.FaChevronLeft, {
|
|
6943
|
-
className: "inline-block\t text-2xl lg:me-2 xl:me-4 2xl:me-6"
|
|
6944
|
-
})), /*#__PURE__*/React__default.createElement("button", {
|
|
6945
|
-
onClick: handleClickNextImg
|
|
6946
|
-
}, /*#__PURE__*/React__default.createElement(fa.FaChevronRight, {
|
|
6947
|
-
className: "inline-block\t text-2xl"
|
|
6948
|
-
})))), /*#__PURE__*/React__default.createElement("div", {
|
|
6949
|
-
className: "col-span-12 sm:col-span-3 my-auto relative py-2"
|
|
6950
|
-
}, /*#__PURE__*/React__default.createElement("input", {
|
|
6951
|
-
type: "text",
|
|
6952
|
-
placeholder: "T\xECm ki\u1EBFm...",
|
|
6953
|
-
className: "w-full sm:v-max md:h-10 h-8 lg:ms-6 ps-12 pb-1 border text-gray3 rounded-lg"
|
|
6954
|
-
}), /*#__PURE__*/React__default.createElement(ci.CiSearch, {
|
|
6955
|
-
className: "absolute text-gray3 text-2xl left-4 lg:left-10 top-1/4 "
|
|
6956
|
-
}))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("img", {
|
|
6957
|
-
className: "h-max",
|
|
6958
|
-
src: sectionData && sectionData.length > 0 && sectionData[0].srcImages && sectionData[0].srcImages.length > 0 ? sectionData[0].srcImages[0] : "",
|
|
6959
|
-
alt: ""
|
|
6960
|
-
})));
|
|
7318
|
+
};
|
|
7319
|
+
return {
|
|
7320
|
+
categories: categories
|
|
7321
|
+
};
|
|
7322
|
+
};
|
|
7323
|
+
|
|
7324
|
+
var Hero13 = function Hero13(props) {
|
|
7325
|
+
var _sectionData$, _sectionData$$srcImag;
|
|
7326
|
+
var listRef = React.useRef(null);
|
|
7327
|
+
var _useState = React.useState(false);
|
|
7328
|
+
var data = props.data;
|
|
7329
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7330
|
+
var _CategoryController = CategoryController(props);
|
|
7331
|
+
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("img", {
|
|
7332
|
+
src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : (_sectionData$$srcImag = _sectionData$.srcImages) === null || _sectionData$$srcImag === void 0 ? void 0 : _sectionData$$srcImag[0],
|
|
7333
|
+
className: "w-full"
|
|
7334
|
+
}));
|
|
6961
7335
|
};
|
|
6962
7336
|
|
|
6963
7337
|
var Features1 = function Features1(props) {
|
|
@@ -6987,7 +7361,13 @@ var Features1 = function Features1(props) {
|
|
|
6987
7361
|
className: "absolute w-40 h-24 rounded-2xl z-10 bg-primary"
|
|
6988
7362
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
6989
7363
|
className: "absolute w-24 h-16 rounded-2xl -right-2 -top-2 z-0 bg-secondary"
|
|
6990
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7364
|
+
}), it !== null && it !== void 0 && it.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
7365
|
+
className: "w-12 text-primary h-16 w-16 z-20 m-auto"
|
|
7366
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7367
|
+
dangerouslySetInnerHTML: {
|
|
7368
|
+
__html: configSvg(it === null || it === void 0 ? void 0 : it.svgImage)
|
|
7369
|
+
}
|
|
7370
|
+
})) : /*#__PURE__*/React__default.createElement("div", {
|
|
6991
7371
|
className: "h-16 m-auto bg-center w-16 bg-cover bg-no-repeat z-20",
|
|
6992
7372
|
style: {
|
|
6993
7373
|
backgroundImage: "url(" + it.srcImage + ")"
|
|
@@ -7010,13 +7390,18 @@ var Features2 = function Features2(props) {
|
|
|
7010
7390
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7011
7391
|
className: "" + SECTION_DEFAULT_CLASS
|
|
7012
7392
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7013
|
-
className: "p-6 grid grid-cols-4 gap-8 rounded-xl bg-bgSecondary"
|
|
7393
|
+
className: "p-6 grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6 lg:gap-8 rounded-xl bg-bgSecondary"
|
|
7014
7394
|
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
7015
7395
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7016
7396
|
className: "flex flex-col gap-2 items-center text-sm lg:text-lg font-semibold text-center",
|
|
7017
7397
|
key: "dfgg-" + index
|
|
7018
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
7019
|
-
|
|
7398
|
+
}, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
7399
|
+
className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24 h-24",
|
|
7400
|
+
dangerouslySetInnerHTML: {
|
|
7401
|
+
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
7402
|
+
}
|
|
7403
|
+
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
7404
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
7020
7405
|
className: "w-12 md:w-16 lg:w-20 xl:w-24 text-primary",
|
|
7021
7406
|
alt: "logo"
|
|
7022
7407
|
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title));
|
|
@@ -7024,11 +7409,16 @@ var Features2 = function Features2(props) {
|
|
|
7024
7409
|
};
|
|
7025
7410
|
|
|
7026
7411
|
var Features3 = function Features3(props) {
|
|
7412
|
+
var _data$sectionTitle;
|
|
7027
7413
|
var shopConfigStyle = props.shopConfigStyle,
|
|
7028
7414
|
shopConfig = props.shopConfig,
|
|
7029
|
-
data = props.data
|
|
7415
|
+
data = props.data,
|
|
7416
|
+
_props$SectionTitle = props.SectionTitle,
|
|
7417
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
7418
|
+
_props$Link = props.Link,
|
|
7419
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
7030
7420
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7031
|
-
data.sectionTitle = data.sectionTitle.replace("{shopName}", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName);
|
|
7421
|
+
data.sectionTitle = data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.replace("{shopName}", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName);
|
|
7032
7422
|
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
7033
7423
|
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
|
|
7034
7424
|
textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
@@ -7037,28 +7427,37 @@ var Features3 = function Features3(props) {
|
|
|
7037
7427
|
_shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
|
|
7038
7428
|
bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
7039
7429
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7040
|
-
className: "
|
|
7430
|
+
className: SECTION_DEFAULT_CLASS + " flex flex-col gap-4 lg:gap-6",
|
|
7041
7431
|
style: {
|
|
7042
7432
|
background: background,
|
|
7043
7433
|
color: textBody
|
|
7044
7434
|
}
|
|
7045
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
className: "grid grid-cols-2 sm:grid-cols-4 gap-6 mt-6 text-sm md:text-base"
|
|
7435
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
7436
|
+
data: data,
|
|
7437
|
+
shopConfigStyle: shopConfigStyle
|
|
7438
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7439
|
+
className: "grid grid-cols-2 sm:grid-cols-4 gap-6 text-sm md:text-base"
|
|
7051
7440
|
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
7052
|
-
return /*#__PURE__*/React__default.createElement(
|
|
7441
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7442
|
+
Link: Link,
|
|
7443
|
+
href: (item === null || item === void 0 ? void 0 : item.link) || (item === null || item === void 0 ? void 0 : item.route)
|
|
7444
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7053
7445
|
className: "grid grid-cols-2 p-3 rounded-lg font-semibold",
|
|
7054
7446
|
key: "dfsdfj-" + index,
|
|
7055
7447
|
style: {
|
|
7056
7448
|
background: bgSecondary
|
|
7057
7449
|
}
|
|
7058
|
-
}, /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("
|
|
7450
|
+
}, /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title), item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
7451
|
+
className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 h-auto"
|
|
7452
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7453
|
+
dangerouslySetInnerHTML: {
|
|
7454
|
+
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
7455
|
+
}
|
|
7456
|
+
})) : /*#__PURE__*/React__default.createElement("img", {
|
|
7059
7457
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
7458
|
+
className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 object-cover",
|
|
7060
7459
|
alt: ""
|
|
7061
|
-
}));
|
|
7460
|
+
})));
|
|
7062
7461
|
})));
|
|
7063
7462
|
};
|
|
7064
7463
|
|
|
@@ -7088,8 +7487,8 @@ var ProductController = function ProductController(props) {
|
|
|
7088
7487
|
}, [params, isAutoGetList]);
|
|
7089
7488
|
var getProductList = function getProductList() {
|
|
7090
7489
|
try {
|
|
7490
|
+
setLoading(true);
|
|
7091
7491
|
var _temp = _catch(function () {
|
|
7092
|
-
setLoading(true);
|
|
7093
7492
|
var filterParams = _extends({}, defaultParams, params);
|
|
7094
7493
|
console.log("filterParams params", params);
|
|
7095
7494
|
console.log("filterParams", filterParams);
|
|
@@ -7103,6 +7502,7 @@ var ProductController = function ProductController(props) {
|
|
|
7103
7502
|
setLoading(false);
|
|
7104
7503
|
});
|
|
7105
7504
|
}, function (e) {
|
|
7505
|
+
setLoading(false);
|
|
7106
7506
|
console.log(e);
|
|
7107
7507
|
});
|
|
7108
7508
|
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
@@ -7110,10 +7510,35 @@ var ProductController = function ProductController(props) {
|
|
|
7110
7510
|
return Promise.reject(e);
|
|
7111
7511
|
}
|
|
7112
7512
|
};
|
|
7513
|
+
var getProductListSearch = function getProductListSearch(data) {
|
|
7514
|
+
try {
|
|
7515
|
+
setLoading(true);
|
|
7516
|
+
return Promise.resolve(_catch(function () {
|
|
7517
|
+
var filterParams = _extends({}, defaultParams, data);
|
|
7518
|
+
return Promise.resolve(getProductListApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, filterParams)).then(function (res) {
|
|
7519
|
+
var _res$data4, _res$data4$status;
|
|
7520
|
+
if ((res === null || res === void 0 ? void 0 : (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : (_res$data4$status = _res$data4.status) === null || _res$data4$status === void 0 ? void 0 : _res$data4$status.code) == 200) {
|
|
7521
|
+
var _res$data5;
|
|
7522
|
+
setLoading(false);
|
|
7523
|
+
return res === null || res === void 0 ? void 0 : (_res$data5 = res.data) === null || _res$data5 === void 0 ? void 0 : _res$data5.data;
|
|
7524
|
+
} else {
|
|
7525
|
+
setLoading(false);
|
|
7526
|
+
return [];
|
|
7527
|
+
}
|
|
7528
|
+
});
|
|
7529
|
+
}, function (e) {
|
|
7530
|
+
setLoading(false);
|
|
7531
|
+
console.log(e);
|
|
7532
|
+
}));
|
|
7533
|
+
} catch (e) {
|
|
7534
|
+
return Promise.reject(e);
|
|
7535
|
+
}
|
|
7536
|
+
};
|
|
7113
7537
|
return {
|
|
7114
7538
|
products: products,
|
|
7115
7539
|
loading: loading,
|
|
7116
|
-
page: page
|
|
7540
|
+
page: page,
|
|
7541
|
+
getProductListSearch: getProductListSearch
|
|
7117
7542
|
};
|
|
7118
7543
|
};
|
|
7119
7544
|
|
|
@@ -7296,156 +7721,32 @@ var BookingController = function BookingController(props) {
|
|
|
7296
7721
|
var createSchedule = function createSchedule(customerName, customerPhone, scheduleDate, services, shopId) {
|
|
7297
7722
|
try {
|
|
7298
7723
|
return Promise.resolve(_catch(function () {
|
|
7724
|
+
var _Date;
|
|
7299
7725
|
var data = {
|
|
7300
7726
|
appId: "SSPA",
|
|
7301
7727
|
customerName: customerName,
|
|
7302
|
-
customerPhone: customerPhone.replace("+", ""),
|
|
7728
|
+
customerPhone: customerPhone === null || customerPhone === void 0 ? void 0 : customerPhone.replace("+", ""),
|
|
7303
7729
|
isSellService: true,
|
|
7304
|
-
scheduleDate: new Date(scheduleDate).getTime(),
|
|
7730
|
+
scheduleDate: (_Date = new Date(scheduleDate)) === null || _Date === void 0 ? void 0 : _Date.getTime(),
|
|
7305
7731
|
services: services === null || services === void 0 ? void 0 : services.map(function (_ref) {
|
|
7306
7732
|
var productName = _ref.productName,
|
|
7307
7733
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
7308
|
-
return rest;
|
|
7309
|
-
}),
|
|
7310
|
-
shopId: shopId
|
|
7311
|
-
};
|
|
7312
|
-
return Promise.resolve(createSpaScheduleApi(shopId, data));
|
|
7313
|
-
}, function (e) {
|
|
7314
|
-
console.log(e);
|
|
7315
|
-
}));
|
|
7316
|
-
} catch (e) {
|
|
7317
|
-
return Promise.reject(e);
|
|
7318
|
-
}
|
|
7319
|
-
};
|
|
7320
|
-
return {
|
|
7321
|
-
createSchedule: createSchedule
|
|
7322
|
-
};
|
|
7323
|
-
};
|
|
7324
|
-
|
|
7325
|
-
var Input = React.forwardRef(function (props, ref) {
|
|
7326
|
-
var _props$label = props.label,
|
|
7327
|
-
label = _props$label === void 0 ? "" : _props$label,
|
|
7328
|
-
_props$placeholder = props.placeholder,
|
|
7329
|
-
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
7330
|
-
_props$className = props.className,
|
|
7331
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
7332
|
-
_props$inputClassName = props.inputClassName,
|
|
7333
|
-
inputClassName = _props$inputClassName === void 0 ? "" : _props$inputClassName,
|
|
7334
|
-
_props$wrapClassName = props.wrapClassName,
|
|
7335
|
-
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
7336
|
-
_props$labelClassName = props.labelClassName,
|
|
7337
|
-
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
7338
|
-
_props$name = props.name,
|
|
7339
|
-
name = _props$name === void 0 ? "" : _props$name,
|
|
7340
|
-
_props$onChange = props.onChange,
|
|
7341
|
-
onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
|
|
7342
|
-
_props$defaultValue = props.defaultValue,
|
|
7343
|
-
defaultValue = _props$defaultValue === void 0 ? "" : _props$defaultValue,
|
|
7344
|
-
_props$type = props.type,
|
|
7345
|
-
type = _props$type === void 0 ? "text" : _props$type,
|
|
7346
|
-
_props$rules = props.rules,
|
|
7347
|
-
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
7348
|
-
_props$isQuantity = props.isQuantity,
|
|
7349
|
-
isQuantity = _props$isQuantity === void 0 ? false : _props$isQuantity,
|
|
7350
|
-
_props$min = props.min,
|
|
7351
|
-
min = _props$min === void 0 ? 0 : _props$min,
|
|
7352
|
-
_props$max = props.max,
|
|
7353
|
-
max = _props$max === void 0 ? null : _props$max;
|
|
7354
|
-
var _useState = React.useState(defaultValue),
|
|
7355
|
-
value = _useState[0],
|
|
7356
|
-
_setValue = _useState[1];
|
|
7357
|
-
var _useState2 = React.useState(""),
|
|
7358
|
-
error = _useState2[0],
|
|
7359
|
-
_setError = _useState2[1];
|
|
7360
|
-
var refInput = React.useRef();
|
|
7361
|
-
React.useImperativeHandle(ref, function () {
|
|
7362
|
-
return {
|
|
7363
|
-
validateData: function validateData() {
|
|
7364
|
-
return _validateData();
|
|
7365
|
-
},
|
|
7366
|
-
setValue: function setValue(text) {
|
|
7367
|
-
return _setValue(text);
|
|
7368
|
-
},
|
|
7369
|
-
getValue: function getValue() {
|
|
7370
|
-
return value;
|
|
7371
|
-
},
|
|
7372
|
-
setError: function setError(err) {
|
|
7373
|
-
return _setError(err);
|
|
7374
|
-
}
|
|
7375
|
-
};
|
|
7376
|
-
});
|
|
7377
|
-
var _validateData = function _validateData() {
|
|
7378
|
-
var count = 0;
|
|
7379
|
-
for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
|
|
7380
|
-
var _e$pattern;
|
|
7381
|
-
var e = _step.value;
|
|
7382
|
-
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
|
|
7383
|
-
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
7384
|
-
count++;
|
|
7385
|
-
break;
|
|
7386
|
-
} else if ((e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
|
|
7387
|
-
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
7388
|
-
count++;
|
|
7389
|
-
break;
|
|
7390
|
-
}
|
|
7391
|
-
}
|
|
7392
|
-
if (count) {
|
|
7393
|
-
return false;
|
|
7394
|
-
} else {
|
|
7395
|
-
_setError('');
|
|
7396
|
-
return true;
|
|
7397
|
-
}
|
|
7398
|
-
};
|
|
7399
|
-
var handleOnChange = function handleOnChange(event) {
|
|
7400
|
-
var value = event.target.value;
|
|
7401
|
-
if (isQuantity) {
|
|
7402
|
-
value = parseInt(value) || 1;
|
|
7734
|
+
return rest;
|
|
7735
|
+
}),
|
|
7736
|
+
shopId: shopId
|
|
7737
|
+
};
|
|
7738
|
+
return Promise.resolve(createSpaScheduleApi(shopId, data));
|
|
7739
|
+
}, function (e) {
|
|
7740
|
+
console.log(e);
|
|
7741
|
+
}));
|
|
7742
|
+
} catch (e) {
|
|
7743
|
+
return Promise.reject(e);
|
|
7403
7744
|
}
|
|
7404
|
-
_setValue(value);
|
|
7405
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
7406
7745
|
};
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
if (newValue > min && (max === null || newValue <= max)) {
|
|
7410
|
-
_setValue(newValue);
|
|
7411
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
7412
|
-
}
|
|
7746
|
+
return {
|
|
7747
|
+
createSchedule: createSchedule
|
|
7413
7748
|
};
|
|
7414
|
-
|
|
7415
|
-
var _inputClassName = (isQuantity ? "text-center w-12" : "") + " " + inputClassName + " focus:outline-none focus:ring-0";
|
|
7416
|
-
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
7417
|
-
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
7418
|
-
}));
|
|
7419
|
-
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
7420
|
-
className: "text-danger"
|
|
7421
|
-
}, " *") : null;
|
|
7422
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
7423
|
-
className: wrapClassName
|
|
7424
|
-
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
7425
|
-
className: "mb-1 " + labelClassName
|
|
7426
|
-
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
7427
|
-
className: "flex gap-2 " + _className
|
|
7428
|
-
}, isQuantity ? /*#__PURE__*/React__default.createElement("button", {
|
|
7429
|
-
onClick: function onClick() {
|
|
7430
|
-
return changeQuantity(-1);
|
|
7431
|
-
}
|
|
7432
|
-
}, /*#__PURE__*/React__default.createElement(fa6.FaMinus, null)) : null, /*#__PURE__*/React__default.createElement("input", {
|
|
7433
|
-
type: type,
|
|
7434
|
-
name: name,
|
|
7435
|
-
value: value,
|
|
7436
|
-
placeholder: placeholder,
|
|
7437
|
-
onChange: handleOnChange,
|
|
7438
|
-
required: required,
|
|
7439
|
-
className: _inputClassName,
|
|
7440
|
-
ref: refInput
|
|
7441
|
-
}), isQuantity ? /*#__PURE__*/React__default.createElement("button", {
|
|
7442
|
-
onClick: function onClick() {
|
|
7443
|
-
return changeQuantity(1);
|
|
7444
|
-
}
|
|
7445
|
-
}, /*#__PURE__*/React__default.createElement(fa6.FaPlus, null)) : null), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
7446
|
-
className: "text-danger"
|
|
7447
|
-
}, error) : null);
|
|
7448
|
-
});
|
|
7749
|
+
};
|
|
7449
7750
|
|
|
7450
7751
|
var Select = React.forwardRef(function (props, ref) {
|
|
7451
7752
|
var _props$label = props.label,
|
|
@@ -7456,14 +7757,18 @@ var Select = React.forwardRef(function (props, ref) {
|
|
|
7456
7757
|
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
7457
7758
|
_props$className = props.className,
|
|
7458
7759
|
className = _props$className === void 0 ? "" : _props$className,
|
|
7760
|
+
_props$optionClassNam = props.optionClassName,
|
|
7761
|
+
optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
|
|
7762
|
+
_props$wrapClassName = props.wrapClassName,
|
|
7763
|
+
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
7764
|
+
_props$selectClassNam = props.selectClassName,
|
|
7765
|
+
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
7459
7766
|
_props$rules = props.rules,
|
|
7460
7767
|
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
7461
7768
|
options = props.options,
|
|
7462
7769
|
_props$defaultValue = props.defaultValue,
|
|
7463
7770
|
defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
|
|
7464
7771
|
handleSearchOption = props.handleSearchOption,
|
|
7465
|
-
_props$wrapClassName = props.wrapClassName,
|
|
7466
|
-
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
7467
7772
|
_props$isMulti = props.isMulti,
|
|
7468
7773
|
isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
|
|
7469
7774
|
_props$onClick = props.onClick,
|
|
@@ -7473,7 +7778,8 @@ var Select = React.forwardRef(function (props, ref) {
|
|
|
7473
7778
|
_props$funcDelete = props.funcDelete,
|
|
7474
7779
|
funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
|
|
7475
7780
|
_props$isSearch = props.isSearch,
|
|
7476
|
-
isSearch = _props$isSearch === void 0 ? true : _props$isSearch
|
|
7781
|
+
isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
|
|
7782
|
+
renderItem = props.renderItem;
|
|
7477
7783
|
var _useState = React.useState(false),
|
|
7478
7784
|
isOpen = _useState[0],
|
|
7479
7785
|
setIsOpen = _useState[1];
|
|
@@ -7495,21 +7801,12 @@ var Select = React.forwardRef(function (props, ref) {
|
|
|
7495
7801
|
dropdownPosition = _useState6[0],
|
|
7496
7802
|
setDropdownPosition = _useState6[1];
|
|
7497
7803
|
var inputRef = React.useRef(null);
|
|
7498
|
-
React.useEffect(function () {
|
|
7499
|
-
if (isMulti) return;else {
|
|
7500
|
-
setIsOpen(false);
|
|
7501
|
-
setInputSearch("");
|
|
7502
|
-
setListOptions(options);
|
|
7503
|
-
}
|
|
7504
|
-
}, [value]);
|
|
7505
7804
|
React.useEffect(function () {
|
|
7506
7805
|
if (isMulti) setValue(defaultValue);
|
|
7507
7806
|
}, [defaultValue]);
|
|
7508
7807
|
React.useEffect(function () {
|
|
7509
7808
|
setListOptions(options);
|
|
7510
|
-
if (!isMulti)
|
|
7511
|
-
setValue({});
|
|
7512
|
-
}
|
|
7809
|
+
if (!isMulti) setValue(defaultValue);
|
|
7513
7810
|
}, [options]);
|
|
7514
7811
|
React.useEffect(function () {
|
|
7515
7812
|
var _inputRef$current;
|
|
@@ -7614,8 +7911,12 @@ var Select = React.forwardRef(function (props, ref) {
|
|
|
7614
7911
|
});
|
|
7615
7912
|
return (value === null || value === void 0 ? void 0 : value.value) == valueId;
|
|
7616
7913
|
};
|
|
7617
|
-
var handleSelection = function handleSelection(item) {
|
|
7618
|
-
|
|
7914
|
+
var handleSelection = function handleSelection(item, e) {
|
|
7915
|
+
e.stopPropagation();
|
|
7916
|
+
if (!isMulti) {
|
|
7917
|
+
setValue(item);
|
|
7918
|
+
setIsOpen(false);
|
|
7919
|
+
}
|
|
7619
7920
|
onClick === null || onClick === void 0 ? void 0 : onClick(item);
|
|
7620
7921
|
};
|
|
7621
7922
|
var handleDeleteSelection = function handleDeleteSelection(e, item) {
|
|
@@ -7631,21 +7932,24 @@ var Select = React.forwardRef(function (props, ref) {
|
|
|
7631
7932
|
}, " *") : null;
|
|
7632
7933
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7633
7934
|
ref: selectRef,
|
|
7634
|
-
className:
|
|
7935
|
+
className: "relative " + wrapClassName
|
|
7635
7936
|
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
7636
|
-
className:
|
|
7937
|
+
className: "mb-1 " + labelClassName
|
|
7637
7938
|
}, label, " ", labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
7638
|
-
className:
|
|
7939
|
+
className: "flex flex-col gap-2 rounded-lg w-full bg-white border " + className
|
|
7639
7940
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
7640
|
-
className: "w-full h-10 bg-transparent flex justify-between items-center px-3 py-2",
|
|
7941
|
+
className: "w-full h-10 bg-transparent flex justify-between items-center px-3 py-2 " + selectClassName,
|
|
7641
7942
|
onClick: handleToggleSelect
|
|
7642
7943
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7643
7944
|
className: "flex justify-between items-center w-full"
|
|
7644
7945
|
}, isEmpty(value) || isMulti ? /*#__PURE__*/React__default.createElement("div", {
|
|
7645
7946
|
className: "text-gray3 line-clamp-1"
|
|
7646
7947
|
}, placeholder) : /*#__PURE__*/React__default.createElement("div", {
|
|
7647
|
-
className: "line-clamp-1"
|
|
7648
|
-
|
|
7948
|
+
className: "w-full text-start pointer-events-none line-clamp-1",
|
|
7949
|
+
dangerouslySetInnerHTML: {
|
|
7950
|
+
__html: value === null || value === void 0 ? void 0 : value.label
|
|
7951
|
+
}
|
|
7952
|
+
}), isButtonDelete && !isEmpty(value) ? /*#__PURE__*/React__default.createElement("div", {
|
|
7649
7953
|
onClick: function onClick(e) {
|
|
7650
7954
|
handleDeleteSelection(e, value);
|
|
7651
7955
|
}
|
|
@@ -7660,7 +7964,7 @@ var Select = React.forwardRef(function (props, ref) {
|
|
|
7660
7964
|
style: {
|
|
7661
7965
|
background: "#FFFFFF"
|
|
7662
7966
|
},
|
|
7663
|
-
className:
|
|
7967
|
+
className: "overflow-y-auto max-h-72 absolute p-1 my-2 rounded-2xl w-full z-50 border " + (dropdownPosition === 'top' ? 'bottom-full mb-2' : 'top-full mt-2') + " " + optionClassName
|
|
7664
7968
|
}, /*#__PURE__*/React__default.createElement("div", null, isSearch ? /*#__PURE__*/React__default.createElement("div", {
|
|
7665
7969
|
className: "px-3 flex items-center border-b-[1px]"
|
|
7666
7970
|
}, /*#__PURE__*/React__default.createElement(lu.LuSearch, {
|
|
@@ -7678,12 +7982,12 @@ var Select = React.forwardRef(function (props, ref) {
|
|
|
7678
7982
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7679
7983
|
key: "gjfd-" + index,
|
|
7680
7984
|
className: "px-2 cursor-default py-1.5 flex items-center hover:bg-gray-100 rounded-lg",
|
|
7681
|
-
onClick: function onClick() {
|
|
7682
|
-
handleSelection(item);
|
|
7985
|
+
onClick: function onClick(e) {
|
|
7986
|
+
handleSelection(item, e);
|
|
7683
7987
|
}
|
|
7684
7988
|
}, /*#__PURE__*/React__default.createElement(io.IoMdCheckmark, {
|
|
7685
7989
|
className: (checkSelection(item === null || item === void 0 ? void 0 : item.value) ? "" : 'invisible') + " inline me-2 w-4"
|
|
7686
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7990
|
+
}), renderItem ? renderItem(item) : /*#__PURE__*/React__default.createElement("div", {
|
|
7687
7991
|
className: " whitespace-nowrap line-clamp-1"
|
|
7688
7992
|
}, item === null || item === void 0 ? void 0 : item.label));
|
|
7689
7993
|
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -7699,6 +8003,8 @@ var DateTimePicker = React.forwardRef(function (props, ref) {
|
|
|
7699
8003
|
label = _props$label === void 0 ? "" : _props$label,
|
|
7700
8004
|
_props$className = props.className,
|
|
7701
8005
|
className = _props$className === void 0 ? "" : _props$className,
|
|
8006
|
+
_props$labelClassName = props.labelClassName,
|
|
8007
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
7702
8008
|
_props$defaultValue = props.defaultValue,
|
|
7703
8009
|
defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
|
|
7704
8010
|
rules = props.rules;
|
|
@@ -7737,7 +8043,7 @@ var DateTimePicker = React.forwardRef(function (props, ref) {
|
|
|
7737
8043
|
});
|
|
7738
8044
|
var _validateData = function _validateData() {
|
|
7739
8045
|
var count = 0;
|
|
7740
|
-
rules.forEach(function (e) {
|
|
8046
|
+
rules === null || rules === void 0 ? void 0 : rules.forEach(function (e) {
|
|
7741
8047
|
var _e$pattern;
|
|
7742
8048
|
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
|
|
7743
8049
|
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
@@ -7765,7 +8071,7 @@ var DateTimePicker = React.forwardRef(function (props, ref) {
|
|
|
7765
8071
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7766
8072
|
className: "w-full"
|
|
7767
8073
|
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
7768
|
-
className: "mb-1"
|
|
8074
|
+
className: "mb-1 " + labelClassName
|
|
7769
8075
|
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
|
|
7770
8076
|
selected: value,
|
|
7771
8077
|
onChange: function onChange(date) {
|
|
@@ -7798,12 +8104,22 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
|
|
|
7798
8104
|
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
7799
8105
|
_props$wrapClassName = props.wrapClassName,
|
|
7800
8106
|
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
7801
|
-
inputClassName = props.inputClassName
|
|
7802
|
-
|
|
8107
|
+
_props$inputClassName = props.inputClassName,
|
|
8108
|
+
inputClassName = _props$inputClassName === void 0 ? "" : _props$inputClassName,
|
|
8109
|
+
_props$labelClassName = props.labelClassName,
|
|
8110
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8111
|
+
_props$options = props.options,
|
|
8112
|
+
options = _props$options === void 0 ? [{
|
|
8113
|
+
label: "<svg width=\"20\" height=\"20\" viewBox=\"0 0 36 36\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" class=\"iconify iconify--twemoji\" preserveAspectRatio=\"xMidYMid meet\"><path fill=\"#DA251D\" d=\"M32 5H4a4 4 0 0 0-4 4v18a4 4 0 0 0 4 4h28a4 4 0 0 0 4-4V9a4 4 0 0 0-4-4z\"></path><path fill=\"#FF0\" d=\"M19.753 16.037L18 10.642l-1.753 5.395h-5.672l4.589 3.333l-1.753 5.395L18 21.431l4.589 3.334l-1.753-5.395l4.589-3.333z\"></path></svg>",
|
|
8114
|
+
country: "Việt Nam",
|
|
8115
|
+
value: "+84"
|
|
8116
|
+
}] : _props$options;
|
|
8117
|
+
var _useState = React.useState(""),
|
|
7803
8118
|
value = _useState[0],
|
|
7804
8119
|
_setValue = _useState[1];
|
|
7805
8120
|
var _useState2 = React.useState({
|
|
7806
|
-
label: "
|
|
8121
|
+
label: "<svg width=\"20\" height=\"20\" viewBox=\"0 0 36 36\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" class=\"iconify iconify--twemoji\" preserveAspectRatio=\"xMidYMid meet\"><path fill=\"#DA251D\" d=\"M32 5H4a4 4 0 0 0-4 4v18a4 4 0 0 0 4 4h28a4 4 0 0 0 4-4V9a4 4 0 0 0-4-4z\"></path><path fill=\"#FF0\" d=\"M19.753 16.037L18 10.642l-1.753 5.395h-5.672l4.589 3.333l-1.753 5.395L18 21.431l4.589 3.334l-1.753-5.395l4.589-3.333z\"></path></svg>",
|
|
8122
|
+
country: "Việt Nam",
|
|
7807
8123
|
value: "+84"
|
|
7808
8124
|
}),
|
|
7809
8125
|
countryCode = _useState2[0],
|
|
@@ -7811,6 +8127,11 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
|
|
|
7811
8127
|
var _useState3 = React.useState(""),
|
|
7812
8128
|
error = _useState3[0],
|
|
7813
8129
|
_setError = _useState3[1];
|
|
8130
|
+
React.useEffect(function () {
|
|
8131
|
+
if (defaultValue) {
|
|
8132
|
+
_setValue("+" + defaultValue);
|
|
8133
|
+
}
|
|
8134
|
+
}, []);
|
|
7814
8135
|
var handleOnChange = function handleOnChange(event) {
|
|
7815
8136
|
var value = event.target.value;
|
|
7816
8137
|
_setValue(value);
|
|
@@ -7825,8 +8146,10 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
|
|
|
7825
8146
|
return _setValue(text);
|
|
7826
8147
|
},
|
|
7827
8148
|
getValue: function getValue() {
|
|
7828
|
-
|
|
7829
|
-
|
|
8149
|
+
if (!(value !== null && value !== void 0 && value.startsWith(countryCode === null || countryCode === void 0 ? void 0 : countryCode.value))) {
|
|
8150
|
+
return (countryCode === null || countryCode === void 0 ? void 0 : countryCode.value) + (value === null || value === void 0 ? void 0 : value.replace(/^0/, ''));
|
|
8151
|
+
}
|
|
8152
|
+
return value;
|
|
7830
8153
|
},
|
|
7831
8154
|
setError: function setError(err) {
|
|
7832
8155
|
return _setError(err);
|
|
@@ -7861,25 +8184,37 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
|
|
|
7861
8184
|
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
7862
8185
|
className: "text-danger"
|
|
7863
8186
|
}, " *") : null;
|
|
7864
|
-
var _inputClassName = "h-
|
|
7865
|
-
var data = React.useCallback([{
|
|
7866
|
-
label: "+84",
|
|
7867
|
-
value: "+84"
|
|
7868
|
-
}], []);
|
|
8187
|
+
var _inputClassName = "h-full w-full px-2 focus:outline-none focus:ring-0 " + inputClassName;
|
|
7869
8188
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7870
|
-
className:
|
|
8189
|
+
className: "flex flex-col " + wrapClassName
|
|
7871
8190
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
7872
|
-
className: "mb-1"
|
|
8191
|
+
className: "mb-1 " + labelClassName
|
|
7873
8192
|
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
7874
|
-
className: "flex items-center h-10 rounded-lg
|
|
8193
|
+
className: "flex items-center h-10 rounded-lg border " + className
|
|
7875
8194
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
7876
|
-
className: "
|
|
8195
|
+
className: "border-r-2 "
|
|
7877
8196
|
}, /*#__PURE__*/React__default.createElement(Select$1, {
|
|
7878
|
-
className: 'w-max',
|
|
8197
|
+
className: 'w-max border-0 !rounded-none !rounded-l-lg',
|
|
7879
8198
|
defaultValue: countryCode,
|
|
7880
|
-
options:
|
|
8199
|
+
options: options,
|
|
8200
|
+
optionClassName: "w-max",
|
|
7881
8201
|
placeholder: "+84",
|
|
7882
|
-
onClick: setCountryCode
|
|
8202
|
+
onClick: setCountryCode,
|
|
8203
|
+
selectClassName: "h-full !rounded-none py-[7px] ps-2 pr-1",
|
|
8204
|
+
renderItem: function renderItem(item) {
|
|
8205
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8206
|
+
className: "flex gap-3 items-center w-full"
|
|
8207
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8208
|
+
dangerouslySetInnerHTML: {
|
|
8209
|
+
__html: item === null || item === void 0 ? void 0 : item.label
|
|
8210
|
+
}
|
|
8211
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
8212
|
+
className: "text-start flex-1 text-sm"
|
|
8213
|
+
}, item === null || item === void 0 ? void 0 : item.country), /*#__PURE__*/React__default.createElement("div", {
|
|
8214
|
+
className: "text-gray3"
|
|
8215
|
+
}, item === null || item === void 0 ? void 0 : item.value));
|
|
8216
|
+
},
|
|
8217
|
+
wrapClassName: "w-full"
|
|
7883
8218
|
})), /*#__PURE__*/React__default.createElement("input", {
|
|
7884
8219
|
type: type,
|
|
7885
8220
|
name: name,
|
|
@@ -7887,7 +8222,7 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
|
|
|
7887
8222
|
placeholder: placeholder,
|
|
7888
8223
|
onChange: handleOnChange,
|
|
7889
8224
|
required: required,
|
|
7890
|
-
className: _inputClassName
|
|
8225
|
+
className: "bg-white rounded-r-lg " + _inputClassName
|
|
7891
8226
|
})), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
7892
8227
|
className: "text-danger"
|
|
7893
8228
|
}, error) : null);
|
|
@@ -7902,7 +8237,7 @@ var formatCurrency = function formatCurrency(amount) {
|
|
|
7902
8237
|
return formattedAmount + " \u20AB";
|
|
7903
8238
|
};
|
|
7904
8239
|
var pattern = {
|
|
7905
|
-
phoneNumberPattern: /^0
|
|
8240
|
+
phoneNumberPattern: /^(?:\+84|0)\d{9}$/
|
|
7906
8241
|
};
|
|
7907
8242
|
var numberPattern = /^\d+$/;
|
|
7908
8243
|
|
|
@@ -7910,6 +8245,147 @@ var dayjs_min = createCommonjsModule(function (module, exports) {
|
|
|
7910
8245
|
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
7911
8246
|
});
|
|
7912
8247
|
|
|
8248
|
+
var js_cookie = createCommonjsModule(function (module, exports) {
|
|
8249
|
+
(function (global, factory) {
|
|
8250
|
+
module.exports = factory() ;
|
|
8251
|
+
})(commonjsGlobal, (function () {
|
|
8252
|
+
/* eslint-disable no-var */
|
|
8253
|
+
function assign (target) {
|
|
8254
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
8255
|
+
var source = arguments[i];
|
|
8256
|
+
for (var key in source) {
|
|
8257
|
+
target[key] = source[key];
|
|
8258
|
+
}
|
|
8259
|
+
}
|
|
8260
|
+
return target
|
|
8261
|
+
}
|
|
8262
|
+
/* eslint-enable no-var */
|
|
8263
|
+
|
|
8264
|
+
/* eslint-disable no-var */
|
|
8265
|
+
var defaultConverter = {
|
|
8266
|
+
read: function (value) {
|
|
8267
|
+
if (value[0] === '"') {
|
|
8268
|
+
value = value.slice(1, -1);
|
|
8269
|
+
}
|
|
8270
|
+
return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent)
|
|
8271
|
+
},
|
|
8272
|
+
write: function (value) {
|
|
8273
|
+
return encodeURIComponent(value).replace(
|
|
8274
|
+
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
8275
|
+
decodeURIComponent
|
|
8276
|
+
)
|
|
8277
|
+
}
|
|
8278
|
+
};
|
|
8279
|
+
/* eslint-enable no-var */
|
|
8280
|
+
|
|
8281
|
+
/* eslint-disable no-var */
|
|
8282
|
+
|
|
8283
|
+
function init (converter, defaultAttributes) {
|
|
8284
|
+
function set (name, value, attributes) {
|
|
8285
|
+
if (typeof document === 'undefined') {
|
|
8286
|
+
return
|
|
8287
|
+
}
|
|
8288
|
+
|
|
8289
|
+
attributes = assign({}, defaultAttributes, attributes);
|
|
8290
|
+
|
|
8291
|
+
if (typeof attributes.expires === 'number') {
|
|
8292
|
+
attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
|
|
8293
|
+
}
|
|
8294
|
+
if (attributes.expires) {
|
|
8295
|
+
attributes.expires = attributes.expires.toUTCString();
|
|
8296
|
+
}
|
|
8297
|
+
|
|
8298
|
+
name = encodeURIComponent(name)
|
|
8299
|
+
.replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
|
|
8300
|
+
.replace(/[()]/g, escape);
|
|
8301
|
+
|
|
8302
|
+
var stringifiedAttributes = '';
|
|
8303
|
+
for (var attributeName in attributes) {
|
|
8304
|
+
if (!attributes[attributeName]) {
|
|
8305
|
+
continue
|
|
8306
|
+
}
|
|
8307
|
+
|
|
8308
|
+
stringifiedAttributes += '; ' + attributeName;
|
|
8309
|
+
|
|
8310
|
+
if (attributes[attributeName] === true) {
|
|
8311
|
+
continue
|
|
8312
|
+
}
|
|
8313
|
+
|
|
8314
|
+
// Considers RFC 6265 section 5.2:
|
|
8315
|
+
// ...
|
|
8316
|
+
// 3. If the remaining unparsed-attributes contains a %x3B (";")
|
|
8317
|
+
// character:
|
|
8318
|
+
// Consume the characters of the unparsed-attributes up to,
|
|
8319
|
+
// not including, the first %x3B (";") character.
|
|
8320
|
+
// ...
|
|
8321
|
+
stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
|
|
8322
|
+
}
|
|
8323
|
+
|
|
8324
|
+
return (document.cookie =
|
|
8325
|
+
name + '=' + converter.write(value, name) + stringifiedAttributes)
|
|
8326
|
+
}
|
|
8327
|
+
|
|
8328
|
+
function get (name) {
|
|
8329
|
+
if (typeof document === 'undefined' || (arguments.length && !name)) {
|
|
8330
|
+
return
|
|
8331
|
+
}
|
|
8332
|
+
|
|
8333
|
+
// To prevent the for loop in the first place assign an empty array
|
|
8334
|
+
// in case there are no cookies at all.
|
|
8335
|
+
var cookies = document.cookie ? document.cookie.split('; ') : [];
|
|
8336
|
+
var jar = {};
|
|
8337
|
+
for (var i = 0; i < cookies.length; i++) {
|
|
8338
|
+
var parts = cookies[i].split('=');
|
|
8339
|
+
var value = parts.slice(1).join('=');
|
|
8340
|
+
|
|
8341
|
+
try {
|
|
8342
|
+
var found = decodeURIComponent(parts[0]);
|
|
8343
|
+
jar[found] = converter.read(value, found);
|
|
8344
|
+
|
|
8345
|
+
if (name === found) {
|
|
8346
|
+
break
|
|
8347
|
+
}
|
|
8348
|
+
} catch (e) {}
|
|
8349
|
+
}
|
|
8350
|
+
|
|
8351
|
+
return name ? jar[name] : jar
|
|
8352
|
+
}
|
|
8353
|
+
|
|
8354
|
+
return Object.create(
|
|
8355
|
+
{
|
|
8356
|
+
set,
|
|
8357
|
+
get,
|
|
8358
|
+
remove: function (name, attributes) {
|
|
8359
|
+
set(
|
|
8360
|
+
name,
|
|
8361
|
+
'',
|
|
8362
|
+
assign({}, attributes, {
|
|
8363
|
+
expires: -1
|
|
8364
|
+
})
|
|
8365
|
+
);
|
|
8366
|
+
},
|
|
8367
|
+
withAttributes: function (attributes) {
|
|
8368
|
+
return init(this.converter, assign({}, this.attributes, attributes))
|
|
8369
|
+
},
|
|
8370
|
+
withConverter: function (converter) {
|
|
8371
|
+
return init(assign({}, this.converter, converter), this.attributes)
|
|
8372
|
+
}
|
|
8373
|
+
},
|
|
8374
|
+
{
|
|
8375
|
+
attributes: { value: Object.freeze(defaultAttributes) },
|
|
8376
|
+
converter: { value: Object.freeze(converter) }
|
|
8377
|
+
}
|
|
8378
|
+
)
|
|
8379
|
+
}
|
|
8380
|
+
|
|
8381
|
+
var api = init(defaultConverter, { path: '/' });
|
|
8382
|
+
/* eslint-enable no-var */
|
|
8383
|
+
|
|
8384
|
+
return api;
|
|
8385
|
+
|
|
8386
|
+
}));
|
|
8387
|
+
});
|
|
8388
|
+
|
|
7913
8389
|
var BookingForm = function BookingForm(props) {
|
|
7914
8390
|
var _props$shopConfig = props.shopConfig,
|
|
7915
8391
|
shopConfig = _props$shopConfig === void 0 ? {} : _props$shopConfig,
|
|
@@ -7922,8 +8398,8 @@ var BookingForm = function BookingForm(props) {
|
|
|
7922
8398
|
_props$className = props.className,
|
|
7923
8399
|
className = _props$className === void 0 ? "" : _props$className;
|
|
7924
8400
|
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
7925
|
-
_shopConfigStyle$
|
|
7926
|
-
|
|
8401
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
|
|
8402
|
+
background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
7927
8403
|
var _useState = React.useState(false);
|
|
7928
8404
|
var _useState2 = React.useState({
|
|
7929
8405
|
types: "1,10"
|
|
@@ -7953,11 +8429,11 @@ var BookingForm = function BookingForm(props) {
|
|
|
7953
8429
|
var _EmployeeController = EmployeeController(_extends({}, props)),
|
|
7954
8430
|
_EmployeeController$l = _EmployeeController.listEmployment,
|
|
7955
8431
|
listEmployment = _EmployeeController$l === void 0 ? [] : _EmployeeController$l;
|
|
8432
|
+
var token = js_cookie === null || js_cookie === void 0 ? void 0 : js_cookie.get(SSHOP_SPA_TOKEN);
|
|
7956
8433
|
var _ProductController = ProductController(_extends({}, props, {
|
|
7957
8434
|
params: productsParams
|
|
7958
8435
|
})),
|
|
7959
8436
|
products = _ProductController.products;
|
|
7960
|
-
console.log("BookingForm products", products);
|
|
7961
8437
|
var _BookingController = BookingController(props),
|
|
7962
8438
|
_BookingController$cr = _BookingController.createSchedule,
|
|
7963
8439
|
createSchedule = _BookingController$cr === void 0 ? function () {} : _BookingController$cr;
|
|
@@ -8058,9 +8534,9 @@ var BookingForm = function BookingForm(props) {
|
|
|
8058
8534
|
var customerName = inputNameRef === null || inputNameRef === void 0 ? void 0 : (_inputNameRef$current2 = inputNameRef.current) === null || _inputNameRef$current2 === void 0 ? void 0 : _inputNameRef$current2.getValue();
|
|
8059
8535
|
var scheduleDate = inputDateRef === null || inputDateRef === void 0 ? void 0 : (_inputDateRef$current2 = inputDateRef.current) === null || _inputDateRef$current2 === void 0 ? void 0 : _inputDateRef$current2.getValue();
|
|
8060
8536
|
var services = listProductSelected === null || listProductSelected === void 0 ? void 0 : listProductSelected.map(function (item) {
|
|
8061
|
-
var _item$
|
|
8537
|
+
var _item$technical;
|
|
8062
8538
|
return {
|
|
8063
|
-
productId: item === null || item === void 0 ? void 0 :
|
|
8539
|
+
productId: item === null || item === void 0 ? void 0 : item.value,
|
|
8064
8540
|
technicalStaffIds: [item === null || item === void 0 ? void 0 : (_item$technical = item.technical) === null || _item$technical === void 0 ? void 0 : _item$technical.sysUserId],
|
|
8065
8541
|
quantity: item === null || item === void 0 ? void 0 : item.quantity,
|
|
8066
8542
|
oldService: item === null || item === void 0 ? void 0 : item.oldService
|
|
@@ -8098,9 +8574,9 @@ var BookingForm = function BookingForm(props) {
|
|
|
8098
8574
|
});
|
|
8099
8575
|
};
|
|
8100
8576
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8101
|
-
className: "grid gap-4 rounded-
|
|
8577
|
+
className: "grid gap-4 rounded-2xl p-6 border " + className,
|
|
8102
8578
|
style: {
|
|
8103
|
-
backgroundColor:
|
|
8579
|
+
backgroundColor: background
|
|
8104
8580
|
}
|
|
8105
8581
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8106
8582
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4"
|
|
@@ -8126,8 +8602,7 @@ var BookingForm = function BookingForm(props) {
|
|
|
8126
8602
|
pattern: pattern === null || pattern === void 0 ? void 0 : pattern.phoneNumberPattern,
|
|
8127
8603
|
message: "Số điện thoại không hợp lệ!"
|
|
8128
8604
|
}],
|
|
8129
|
-
className: "
|
|
8130
|
-
inputClassName: "w-full"
|
|
8605
|
+
className: "bg-bgSecondary"
|
|
8131
8606
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
8132
8607
|
className: "grid grid-cols-1 gap-4"
|
|
8133
8608
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -8138,7 +8613,7 @@ var BookingForm = function BookingForm(props) {
|
|
|
8138
8613
|
defaultValue: listProductSelected,
|
|
8139
8614
|
onClick: handleSelectedProduct,
|
|
8140
8615
|
handleSearchOption: handleSearchProducts,
|
|
8141
|
-
className: "bg-bgSecondary
|
|
8616
|
+
className: "bg-bgSecondary",
|
|
8142
8617
|
rules: [{
|
|
8143
8618
|
type: "required",
|
|
8144
8619
|
message: "Bắt buộc chọn dịch vụ"
|
|
@@ -8158,9 +8633,8 @@ var BookingForm = function BookingForm(props) {
|
|
|
8158
8633
|
})), (listProductSelected === null || listProductSelected === void 0 ? void 0 : listProductSelected.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
8159
8634
|
className: "grid grid-cols-1"
|
|
8160
8635
|
}, /*#__PURE__*/React__default.createElement("div", null, "D\u1ECBch v\u1EE5 \u0111\xE3 ch\u1ECDn"), listProductSelected === null || listProductSelected === void 0 ? void 0 : listProductSelected.map(function (item, optionIndex) {
|
|
8161
|
-
var _item$productInfo7;
|
|
8162
8636
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8163
|
-
className: "w-full bg-transparent border-b
|
|
8637
|
+
className: "w-full bg-transparent border-b py-3 grid grid-col-12 gap-2",
|
|
8164
8638
|
key: "ohoihtr-" + optionIndex
|
|
8165
8639
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8166
8640
|
className: "col-span-12 grid grid-cols-12"
|
|
@@ -8170,7 +8644,7 @@ var BookingForm = function BookingForm(props) {
|
|
|
8170
8644
|
className: "col-span-10"
|
|
8171
8645
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8172
8646
|
className: "col-span-10 font-semibold "
|
|
8173
|
-
}, item === null || item === void 0 ? void 0 :
|
|
8647
|
+
}, item === null || item === void 0 ? void 0 : item.label)), /*#__PURE__*/React__default.createElement("div", {
|
|
8174
8648
|
className: "col-span-1 flex justify-center px-2"
|
|
8175
8649
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8176
8650
|
className: "flex items-center justify-center cursor-pointer",
|
|
@@ -8216,8 +8690,8 @@ var BookingForm = function BookingForm(props) {
|
|
|
8216
8690
|
options: listEmploymentMapping,
|
|
8217
8691
|
isButtonDelete: true,
|
|
8218
8692
|
funcDelete: function funcDelete(technical) {
|
|
8219
|
-
var _item$
|
|
8220
|
-
removeTechnicalSelected(item === null || item === void 0 ? void 0 : (_item$
|
|
8693
|
+
var _item$productInfo6;
|
|
8694
|
+
removeTechnicalSelected(item === null || item === void 0 ? void 0 : (_item$productInfo6 = item.productInfo) === null || _item$productInfo6 === void 0 ? void 0 : _item$productInfo6.productId);
|
|
8221
8695
|
}
|
|
8222
8696
|
}))));
|
|
8223
8697
|
})) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -8230,7 +8704,7 @@ var BookingForm = function BookingForm(props) {
|
|
|
8230
8704
|
onCloseFormBooking: onCloseFormBooking,
|
|
8231
8705
|
onClose: handleClosePopup
|
|
8232
8706
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8233
|
-
className: "bg-white rounded-lg shadow-lg p-6 max-w-sm
|
|
8707
|
+
className: "bg-white rounded-lg shadow-lg p-6 max-w-sm flex flex-col items-center justify-center min-w-[320px] md:min-w-[650px] min-h-[420px] md:min-h-[380px] lg:h-auto "
|
|
8234
8708
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8235
8709
|
className: "h-20 mb-4 flex items-center justify-center"
|
|
8236
8710
|
}, /*#__PURE__*/React__default.createElement(fa.FaCheckCircle, {
|
|
@@ -8244,12 +8718,14 @@ var BookingForm = function BookingForm(props) {
|
|
|
8244
8718
|
className: "mb-2"
|
|
8245
8719
|
}, "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i: ", dataBooking === null || dataBooking === void 0 ? void 0 : dataBooking.customerPhone), /*#__PURE__*/React__default.createElement("div", {
|
|
8246
8720
|
className: "mb-4"
|
|
8247
|
-
}, "Th\u1EDDi gian: ", dayjs_min(dataBooking === null || dataBooking === void 0 ? void 0 : dataBooking.scheduleDate).format("DD/MM/YYYY")), /*#__PURE__*/React__default.createElement("
|
|
8248
|
-
className: "
|
|
8721
|
+
}, "Th\u1EDDi gian: ", dayjs_min(dataBooking === null || dataBooking === void 0 ? void 0 : dataBooking.scheduleDate).format("DD/MM/YYYY")), token ? /*#__PURE__*/React__default.createElement("div", null) : /*#__PURE__*/React__default.createElement("div", {
|
|
8722
|
+
className: "flex flex-col items-center"
|
|
8723
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
8724
|
+
className: "mb-4 text-center"
|
|
8249
8725
|
}, "B\u1EA1n \u0111\xE3 c\xF3 t\xE0i kho\u1EA3n, vui l\xF2ng \u0111\u0103ng nh\u1EADp \u0111\u1EC3 xem chi ti\u1EBFt c\xE1c s\u1EA3n ph\u1EA9m, d\u1ECBch v\u1EE5 li\u1EC7u tr\xECnh m\xE0 b\u1EA1n \u0111ang s\u1EDF h\u1EEFu"), /*#__PURE__*/React__default.createElement(Button, {
|
|
8250
8726
|
label: "Đăng nhập",
|
|
8251
8727
|
shopConfigStyle: shopConfigStyle
|
|
8252
|
-
}))));
|
|
8728
|
+
})))));
|
|
8253
8729
|
};
|
|
8254
8730
|
|
|
8255
8731
|
var Treatments1 = function Treatments1(props) {
|
|
@@ -8344,7 +8820,7 @@ var Treatments1 = function Treatments1(props) {
|
|
|
8344
8820
|
}), isOpenModal ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
8345
8821
|
onClose: handleCloseModal
|
|
8346
8822
|
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
8347
|
-
className: "overflow-y-auto hide-scrollbar max-h-[80vh]",
|
|
8823
|
+
className: "overflow-y-auto hide-scrollbar max-h-[80vh] !bg-bgSecondary",
|
|
8348
8824
|
onCloseFormBooking: handleCloseModal,
|
|
8349
8825
|
defaultValue: dataBooking,
|
|
8350
8826
|
shopConfig: shopConfig,
|
|
@@ -8524,11 +9000,14 @@ var ProductPrice = function ProductPrice(props) {
|
|
|
8524
9000
|
}
|
|
8525
9001
|
setDisplayPrice(_displayPrice);
|
|
8526
9002
|
setDisplayPriceBeforeDiscount(_displayPriceBeforeDiscount);
|
|
9003
|
+
} else {
|
|
9004
|
+
var _displayPrice2 = formatCurrency(product === null || product === void 0 ? void 0 : product.price);
|
|
9005
|
+
setDisplayPrice(_displayPrice2);
|
|
8527
9006
|
}
|
|
8528
9007
|
};
|
|
8529
9008
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8530
9009
|
className: className
|
|
8531
|
-
}, displayPriceBeforeDiscount !== displayPrice ? /*#__PURE__*/React__default.createElement("span", {
|
|
9010
|
+
}, displayPriceBeforeDiscount !== displayPrice && displayPriceBeforeDiscount != null ? /*#__PURE__*/React__default.createElement("span", {
|
|
8532
9011
|
className: "text-gray3 line-through mr-2"
|
|
8533
9012
|
}, displayPriceBeforeDiscount) : null, /*#__PURE__*/React__default.createElement("span", {
|
|
8534
9013
|
className: "text-primary font-semibold",
|
|
@@ -8641,6 +9120,71 @@ var Treatments1$1 = function Treatments1(props) {
|
|
|
8641
9120
|
}));
|
|
8642
9121
|
};
|
|
8643
9122
|
|
|
9123
|
+
var NotFoundProduct = function NotFoundProduct() {
|
|
9124
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9125
|
+
className: "h-60 flex flex-col justify-center items-center text-xl text-gray3"
|
|
9126
|
+
}, /*#__PURE__*/React__default.createElement(fa.FaBoxOpen, {
|
|
9127
|
+
size: 80
|
|
9128
|
+
}), /*#__PURE__*/React__default.createElement("div", null, "Kh\xF4ng c\xF3 s\u1EA3n ph\u1EA9m"));
|
|
9129
|
+
};
|
|
9130
|
+
|
|
9131
|
+
var TreatmentsList6 = function TreatmentsList6(props) {
|
|
9132
|
+
var _products$slice;
|
|
9133
|
+
var data = props.data,
|
|
9134
|
+
_props$Link = props.Link,
|
|
9135
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
9136
|
+
_props$SectionTitle = props.SectionTitle,
|
|
9137
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
9138
|
+
_props$TreatmentItem = props.TreatmentItem,
|
|
9139
|
+
TreatmentItem = _props$TreatmentItem === void 0 ? null : _props$TreatmentItem,
|
|
9140
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
9141
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
9142
|
+
var _useState = React.useState({
|
|
9143
|
+
size: 12,
|
|
9144
|
+
types: "1"
|
|
9145
|
+
}),
|
|
9146
|
+
params = _useState[0],
|
|
9147
|
+
setParams = _useState[1];
|
|
9148
|
+
var _useState2 = React.useState(true),
|
|
9149
|
+
isGetMore = _useState2[0],
|
|
9150
|
+
setIsGetMore = _useState2[1];
|
|
9151
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
9152
|
+
params: params
|
|
9153
|
+
})),
|
|
9154
|
+
products = _ProductController.products,
|
|
9155
|
+
loading = _ProductController.loading;
|
|
9156
|
+
var handleGetMoreProducts = function handleGetMoreProducts() {
|
|
9157
|
+
setIsGetMore(false);
|
|
9158
|
+
setParams(function (prev) {
|
|
9159
|
+
return _extends({}, prev, {
|
|
9160
|
+
size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
|
|
9161
|
+
});
|
|
9162
|
+
});
|
|
9163
|
+
};
|
|
9164
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9165
|
+
className: SECTION_CLASS + " flex flex-col gap-8 "
|
|
9166
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
9167
|
+
data: data,
|
|
9168
|
+
shopConfigStyle: shopConfigStyle
|
|
9169
|
+
}), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
9170
|
+
className: "m-auto mt-20 min-h-32"
|
|
9171
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
9172
|
+
className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-x-2 gap-y-4 md:gap-4 xl:gap-6"
|
|
9173
|
+
}, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, params.size - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, idx) {
|
|
9174
|
+
return /*#__PURE__*/React__default.createElement(TreatmentItem, {
|
|
9175
|
+
Link: Link,
|
|
9176
|
+
shopConfigStyle: shopConfigStyle,
|
|
9177
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
9178
|
+
key: "htrhr-" + idx
|
|
9179
|
+
});
|
|
9180
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
|
|
9181
|
+
label: "Xem thêm",
|
|
9182
|
+
onClick: handleGetMoreProducts,
|
|
9183
|
+
className: "mx-auto " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass),
|
|
9184
|
+
type: "outline"
|
|
9185
|
+
}) : null);
|
|
9186
|
+
};
|
|
9187
|
+
|
|
8644
9188
|
var ProductDetailController = function ProductDetailController(props) {
|
|
8645
9189
|
var shopConfig = props.shopConfig,
|
|
8646
9190
|
_props$productId = props.productId,
|
|
@@ -8709,17 +9253,176 @@ var ServiceDetail1 = function ServiceDetail1(props) {
|
|
|
8709
9253
|
dangerouslySetInnerHTML: {
|
|
8710
9254
|
__html: product === null || product === void 0 ? void 0 : product.description
|
|
8711
9255
|
}
|
|
8712
|
-
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
9256
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
9257
|
+
className: "text-gray3 mt-2"
|
|
9258
|
+
}, "Kh\xF4ng c\xF3 th\xF4ng tin"))));
|
|
9259
|
+
};
|
|
9260
|
+
|
|
9261
|
+
var CartController = function CartController(props) {
|
|
9262
|
+
var addToCart = props.addToCart,
|
|
9263
|
+
dispatch = props.dispatch;
|
|
9264
|
+
React.useEffect(function () {}, []);
|
|
9265
|
+
var addProductToCart = function addProductToCart(product, variant, quantity) {
|
|
9266
|
+
try {
|
|
9267
|
+
try {
|
|
9268
|
+
dispatch(addToCart({
|
|
9269
|
+
product: product,
|
|
9270
|
+
variant: variant,
|
|
9271
|
+
quantity: quantity
|
|
9272
|
+
}));
|
|
9273
|
+
} catch (e) {
|
|
9274
|
+
console.log(e);
|
|
9275
|
+
}
|
|
9276
|
+
return Promise.resolve();
|
|
9277
|
+
} catch (e) {
|
|
9278
|
+
return Promise.reject(e);
|
|
9279
|
+
}
|
|
9280
|
+
};
|
|
9281
|
+
return {
|
|
9282
|
+
addProductToCart: addProductToCart
|
|
9283
|
+
};
|
|
9284
|
+
};
|
|
9285
|
+
|
|
9286
|
+
var TreatmentDetail1 = function TreatmentDetail1(props) {
|
|
9287
|
+
var _product$images;
|
|
9288
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
9289
|
+
shopConfig = props.shopConfig;
|
|
9290
|
+
var _ProductDetailControl = ProductDetailController(props),
|
|
9291
|
+
product = _ProductDetailControl.product;
|
|
9292
|
+
var _useState = React.useState(),
|
|
9293
|
+
displayImage = _useState[0],
|
|
9294
|
+
setDisplayImage = _useState[1];
|
|
9295
|
+
var _useState2 = React.useState(false),
|
|
9296
|
+
isSeeMore = _useState2[0],
|
|
9297
|
+
setIsSeeMore = _useState2[1];
|
|
9298
|
+
var _useState3 = React.useState(true),
|
|
9299
|
+
hiddenButton = _useState3[0],
|
|
9300
|
+
setHiddenButton = _useState3[1];
|
|
9301
|
+
var descriptionRef = React.useRef();
|
|
9302
|
+
var _useState4 = React.useState(false),
|
|
9303
|
+
isBooking = _useState4[0],
|
|
9304
|
+
setIsBooking = _useState4[1];
|
|
9305
|
+
var _useState5 = React.useState([]),
|
|
9306
|
+
dataBooking = _useState5[0],
|
|
9307
|
+
setDataBooking = _useState5[1];
|
|
9308
|
+
React.useEffect(function () {
|
|
9309
|
+
if (product) {
|
|
9310
|
+
if (descriptionRef.current) {
|
|
9311
|
+
var descriptionHeight = descriptionRef.current.offsetHeight;
|
|
9312
|
+
if (descriptionHeight >= 700) {
|
|
9313
|
+
setHiddenButton(false);
|
|
9314
|
+
}
|
|
9315
|
+
}
|
|
9316
|
+
}
|
|
9317
|
+
}, [product]);
|
|
9318
|
+
var handleDisplayImage = function handleDisplayImage(item) {
|
|
9319
|
+
setDisplayImage(item);
|
|
9320
|
+
};
|
|
9321
|
+
var handleOpenModalBooking = function handleOpenModalBooking(event) {
|
|
9322
|
+
try {
|
|
9323
|
+
event.stopPropagation();
|
|
9324
|
+
setDataBooking([_extends({}, product, {
|
|
9325
|
+
quantity: 1,
|
|
9326
|
+
technical: {},
|
|
9327
|
+
oldService: false,
|
|
9328
|
+
label: product === null || product === void 0 ? void 0 : product.productName,
|
|
9329
|
+
value: product === null || product === void 0 ? void 0 : product.productId
|
|
9330
|
+
})]);
|
|
9331
|
+
setIsBooking(true);
|
|
9332
|
+
} catch (error) {
|
|
9333
|
+
console.log("::::::::::errrorrrrr::::::", error);
|
|
9334
|
+
}
|
|
9335
|
+
};
|
|
9336
|
+
var handleCloseModal = function handleCloseModal() {
|
|
9337
|
+
setIsBooking(false);
|
|
9338
|
+
setDataBooking([]);
|
|
9339
|
+
};
|
|
9340
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9341
|
+
className: SECTION_CLASS + " mt-6 mb-12 " + ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "bg-bgSecondary pb-8" : "bg-background")
|
|
9342
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9343
|
+
className: "p-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 gap-6 bg-bgSecondary"
|
|
9344
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9345
|
+
className: "flex flex-col gap-4 col-span-2"
|
|
9346
|
+
}, displayImage ? /*#__PURE__*/React__default.createElement("img", {
|
|
9347
|
+
src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
|
|
9348
|
+
className: "w-full aspect-square rounded-2xl"
|
|
9349
|
+
}) : /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
9350
|
+
product: product,
|
|
9351
|
+
className: "w-full aspect-square rounded-2xl"
|
|
9352
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9353
|
+
className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
|
|
9354
|
+
}, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
|
|
9355
|
+
return /*#__PURE__*/React__default.createElement("img", {
|
|
9356
|
+
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
9357
|
+
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
9358
|
+
alt: "",
|
|
9359
|
+
className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " h-16 w-16 rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
|
|
9360
|
+
onClick: function onClick() {
|
|
9361
|
+
handleDisplayImage(item);
|
|
9362
|
+
}
|
|
9363
|
+
});
|
|
9364
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
9365
|
+
className: "col-span-3"
|
|
9366
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
9367
|
+
className: "font-semibold text-2xl"
|
|
9368
|
+
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
9369
|
+
product: product,
|
|
9370
|
+
className: "mt-6 text-[22px]"
|
|
9371
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9372
|
+
className: " text-lg py-3"
|
|
9373
|
+
}, "Th\u1EDDi gian: " + getDurationValue(product === null || product === void 0 ? void 0 : product.attributes)), /*#__PURE__*/React__default.createElement(Button, {
|
|
9374
|
+
label: "ĐẶT LỊCH NGAY",
|
|
9375
|
+
shopConfigStyle: shopConfigStyle,
|
|
9376
|
+
onClick: function onClick(e) {
|
|
9377
|
+
return handleOpenModalBooking(e);
|
|
9378
|
+
}
|
|
9379
|
+
}), /*#__PURE__*/React__default.createElement("p", {
|
|
9380
|
+
className: "text-lg mt-12 text-xl pb-1 pt-6 border-t border-stroke"
|
|
9381
|
+
}, "M\xF4 t\u1EA3 s\u1EA3n ph\u1EA9m"), product !== null && product !== void 0 && product.description ? /*#__PURE__*/React__default.createElement("div", {
|
|
9382
|
+
className: "h-max"
|
|
9383
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9384
|
+
ref: descriptionRef,
|
|
9385
|
+
className: "" + (isSeeMore && !hiddenButton ? "h-full mb-4" : "max-h-[700px] overflow-hidden"),
|
|
9386
|
+
dangerouslySetInnerHTML: {
|
|
9387
|
+
__html: product === null || product === void 0 ? void 0 : product.description
|
|
9388
|
+
}
|
|
9389
|
+
}), !isSeeMore && !hiddenButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
9390
|
+
className: "h-10 relative -mt-10 rounded-b-lg",
|
|
9391
|
+
style: {
|
|
9392
|
+
background: "linear-gradient(to top, #81818169 0%, #00000003 50%)"
|
|
9393
|
+
}
|
|
9394
|
+
}) : null, !hiddenButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
9395
|
+
className: "w-full flex justify-center mt-2"
|
|
9396
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
9397
|
+
label: isSeeMore ? "Thu nhỏ" : "Xem thêm",
|
|
9398
|
+
className: " bottom-0 z-50",
|
|
9399
|
+
onClick: function onClick() {
|
|
9400
|
+
setIsSeeMore(!isSeeMore);
|
|
9401
|
+
}
|
|
9402
|
+
})) : null) : /*#__PURE__*/React__default.createElement("div", {
|
|
8713
9403
|
className: "text-gray3 mt-2"
|
|
8714
|
-
}, "Kh\xF4ng c\xF3 th\xF4ng tin")))
|
|
9404
|
+
}, "Kh\xF4ng c\xF3 th\xF4ng tin"))), isBooking ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
9405
|
+
onClose: handleCloseModal
|
|
9406
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
9407
|
+
className: "overflow-y-auto hide-scrollbar max-h-[80vh]",
|
|
9408
|
+
onCloseFormBooking: handleCloseModal,
|
|
9409
|
+
defaultValue: dataBooking,
|
|
9410
|
+
shopConfig: shopConfig,
|
|
9411
|
+
shopConfigStyle: shopConfigStyle
|
|
9412
|
+
})) : null);
|
|
8715
9413
|
};
|
|
8716
9414
|
|
|
8717
9415
|
var ProductItem2 = function ProductItem2(props) {
|
|
8718
|
-
var product = props.product
|
|
8719
|
-
|
|
9416
|
+
var product = props.product,
|
|
9417
|
+
_props$Link = props.Link,
|
|
9418
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
9419
|
+
_props$className = props.className,
|
|
9420
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
9421
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
9422
|
+
Link: Link,
|
|
8720
9423
|
href: getLinkProductDetail(product)
|
|
8721
9424
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8722
|
-
className: "text-center relative group"
|
|
9425
|
+
className: "text-center relative group " + className
|
|
8723
9426
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
8724
9427
|
product: product,
|
|
8725
9428
|
className: "max-w-[240px] rounded-full mx-auto"
|
|
@@ -8731,13 +9434,168 @@ var ProductItem2 = function ProductItem2(props) {
|
|
|
8731
9434
|
}, product === null || product === void 0 ? void 0 : product.productName)));
|
|
8732
9435
|
};
|
|
8733
9436
|
|
|
9437
|
+
var ProductItem3 = function ProductItem3(props) {
|
|
9438
|
+
var product = props.product,
|
|
9439
|
+
_props$Link = props.Link,
|
|
9440
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
9441
|
+
_props$className = props.className,
|
|
9442
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
9443
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
9444
|
+
Link: Link,
|
|
9445
|
+
href: getLinkProductDetail(product)
|
|
9446
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9447
|
+
className: "w-full border rounded-2xl " + className
|
|
9448
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
9449
|
+
product: product,
|
|
9450
|
+
className: "w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-t-2xl"
|
|
9451
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9452
|
+
className: "p-4 flex flex-col gap-4 justify-start"
|
|
9453
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9454
|
+
className: "line-clamp-1"
|
|
9455
|
+
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
9456
|
+
product: product,
|
|
9457
|
+
className: "text-lg text-start"
|
|
9458
|
+
}))));
|
|
9459
|
+
};
|
|
9460
|
+
|
|
9461
|
+
var ProductItem4 = function ProductItem4(props) {
|
|
9462
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
9463
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
9464
|
+
product = props.product,
|
|
9465
|
+
_props$Link = props.Link,
|
|
9466
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
9467
|
+
_props$className = props.className,
|
|
9468
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
9469
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
9470
|
+
Link: Link,
|
|
9471
|
+
href: getLinkProductDetail(product)
|
|
9472
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9473
|
+
className: "w-full border flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
|
|
9474
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
9475
|
+
product: product,
|
|
9476
|
+
className: "w-full h-44 sm:h-56 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
|
|
9477
|
+
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9478
|
+
className: "line-clamp-1"
|
|
9479
|
+
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
9480
|
+
product: product,
|
|
9481
|
+
className: "text-lg text-start"
|
|
9482
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
9483
|
+
className: "flex pt-4 gap-2 md:gap-4 border-t items-center"
|
|
9484
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9485
|
+
className: "p-2 md:p-[10px] rounded-full hover:opacity-80 border border-primary h-full w-auto flex items-center justify-center " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
|
|
9486
|
+
}, /*#__PURE__*/React__default.createElement(fi.FiShoppingCart, {
|
|
9487
|
+
className: "text-primary "
|
|
9488
|
+
})), /*#__PURE__*/React__default.createElement(Button, {
|
|
9489
|
+
label: "Mua ngay",
|
|
9490
|
+
className: "!rounded-3xl w-full",
|
|
9491
|
+
shopConfigStyle: shopConfigStyle
|
|
9492
|
+
}))));
|
|
9493
|
+
};
|
|
9494
|
+
|
|
9495
|
+
var ProductItem5 = function ProductItem5(props) {
|
|
9496
|
+
var product = props.product,
|
|
9497
|
+
_props$Link = props.Link,
|
|
9498
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
9499
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
9500
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
9501
|
+
_props$className = props.className,
|
|
9502
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
9503
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
9504
|
+
Link: Link,
|
|
9505
|
+
href: getLinkProductDetail(product)
|
|
9506
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9507
|
+
className: "w-full flex flex-col gap-4 rounded-2xl p-1 " + className
|
|
9508
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
9509
|
+
product: product,
|
|
9510
|
+
className: "w-full w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
|
|
9511
|
+
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9512
|
+
className: "line-clamp-1 mb-2"
|
|
9513
|
+
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
9514
|
+
product: product,
|
|
9515
|
+
className: "text-lg text-start"
|
|
9516
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
9517
|
+
className: "flex gap-2 md:gap-4 "
|
|
9518
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlineShoppingCart, {
|
|
9519
|
+
className: "text-primary p-2.5 h-10 w-12 border border-primary rounded-lg hover:bg-primary hover:text-textButton " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
|
|
9520
|
+
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
9521
|
+
label: "Mua ngay",
|
|
9522
|
+
className: "w-full",
|
|
9523
|
+
shopConfigStyle: shopConfigStyle
|
|
9524
|
+
}))));
|
|
9525
|
+
};
|
|
9526
|
+
|
|
9527
|
+
var ProductItem6 = function ProductItem6(props) {
|
|
9528
|
+
var product = props.product,
|
|
9529
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
9530
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
9531
|
+
_props$Link = props.Link,
|
|
9532
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
9533
|
+
_props$className = props.className,
|
|
9534
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
9535
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
9536
|
+
Link: Link,
|
|
9537
|
+
href: getLinkProductDetail(product)
|
|
9538
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9539
|
+
className: "w-full border flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
|
|
9540
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
9541
|
+
product: product,
|
|
9542
|
+
className: "w-full h-44 sm:h-56 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
|
|
9543
|
+
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9544
|
+
className: "line-clamp-1"
|
|
9545
|
+
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
9546
|
+
product: product,
|
|
9547
|
+
className: "text-lg text-start"
|
|
9548
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
9549
|
+
className: "flex pt-4 gap-2 md:gap-4 border-t items-center"
|
|
9550
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9551
|
+
className: "p-2 md:p-[10px] text-primary rounded-lg hover:bg-primary hover:text-textButton hover:opacity-80 border border-primary h-full w-auto flex items-center justify-center " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) + " "
|
|
9552
|
+
}, /*#__PURE__*/React__default.createElement(fi.FiShoppingCart, null)), /*#__PURE__*/React__default.createElement(Button, {
|
|
9553
|
+
label: "Mua ngay",
|
|
9554
|
+
className: "w-full",
|
|
9555
|
+
shopConfigStyle: shopConfigStyle
|
|
9556
|
+
}))));
|
|
9557
|
+
};
|
|
9558
|
+
|
|
9559
|
+
var TreatmentItem1 = function TreatmentItem1(props) {
|
|
9560
|
+
var product = props.product,
|
|
9561
|
+
_props$Link = props.Link,
|
|
9562
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
9563
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
9564
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
9565
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
9566
|
+
Link: Link,
|
|
9567
|
+
href: getLinkServiceDetail(product)
|
|
9568
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9569
|
+
className: "w-full flex flex-col gap-4 rounded-2xl p-1"
|
|
9570
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
9571
|
+
product: product,
|
|
9572
|
+
className: "w-full w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
|
|
9573
|
+
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9574
|
+
className: "line-clamp-1 mb-2 font-medium text-lg"
|
|
9575
|
+
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
9576
|
+
product: product,
|
|
9577
|
+
className: "text-lg text-start"
|
|
9578
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
9579
|
+
className: "flex flex-col md:flex-row gap-2 md:items-center md:gap-6 "
|
|
9580
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9581
|
+
className: "whitespace-nowrap"
|
|
9582
|
+
}, "Th\u1EDDi gian: 120p"), /*#__PURE__*/React__default.createElement(Button, {
|
|
9583
|
+
shopConfigStyle: shopConfigStyle,
|
|
9584
|
+
label: "\u0110\u1EB7t l\u1ECBch",
|
|
9585
|
+
className: "w-full"
|
|
9586
|
+
}))));
|
|
9587
|
+
};
|
|
9588
|
+
|
|
8734
9589
|
var Products1 = function Products1(props) {
|
|
8735
9590
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
8736
9591
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
8737
9592
|
_props$data = props.data,
|
|
8738
9593
|
data = _props$data === void 0 ? {} : _props$data,
|
|
8739
9594
|
_props$SectionTitle = props.SectionTitle,
|
|
8740
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle
|
|
9595
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
9596
|
+
_props$Link = props.Link,
|
|
9597
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
9598
|
+
ProductItem = props.ProductItem;
|
|
8741
9599
|
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
8742
9600
|
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
8743
9601
|
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
|
|
@@ -8759,7 +9617,9 @@ var Products1 = function Products1(props) {
|
|
|
8759
9617
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
8760
9618
|
className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-10 mt-12"
|
|
8761
9619
|
}, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
8762
|
-
return /*#__PURE__*/React__default.createElement(
|
|
9620
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
9621
|
+
Link: Link,
|
|
9622
|
+
shopConfigStyle: shopConfigStyle,
|
|
8763
9623
|
key: index,
|
|
8764
9624
|
product: product === null || product === void 0 ? void 0 : product.productInfo
|
|
8765
9625
|
});
|
|
@@ -8772,43 +9632,14 @@ var Products1 = function Products1(props) {
|
|
|
8772
9632
|
}));
|
|
8773
9633
|
};
|
|
8774
9634
|
|
|
8775
|
-
var ItemProduct = function ItemProduct(props) {
|
|
8776
|
-
var product = props.product;
|
|
8777
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
8778
|
-
className: "pb-4 rounded-2xl w-full bg-bgSecondary"
|
|
8779
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8780
|
-
className: "relative pt-2 flex justify-center h-32 sm:h-40 lg:h-52"
|
|
8781
|
-
}, /*#__PURE__*/React__default.createElement("a", {
|
|
8782
|
-
href: "#"
|
|
8783
|
-
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
8784
|
-
product: product,
|
|
8785
|
-
className: "aspect-w-1 aspect-h-1 max-h-32 sm:max-h-40 lg:max-h-52 object-cover"
|
|
8786
|
-
})), product && (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) && +(product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : product.price) && /*#__PURE__*/React__default.createElement("label", {
|
|
8787
|
-
className: "absolute bg-red-600 rounded-r-lg sm:px-2 text-textButton",
|
|
8788
|
-
style: {
|
|
8789
|
-
top: "10%"
|
|
8790
|
-
}
|
|
8791
|
-
}, ((product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) - (product === null || product === void 0 ? void 0 : product.price)) / (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) * 100, "%")), /*#__PURE__*/React__default.createElement("div", {
|
|
8792
|
-
className: "px-4 h-[100px] mt-6"
|
|
8793
|
-
}, /*#__PURE__*/React__default.createElement("label", {
|
|
8794
|
-
className: "line-clamp-2 lg:h-12 lg:block"
|
|
8795
|
-
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement("div", {
|
|
8796
|
-
className: "mt-3 md:flex md:justify-between flex-col"
|
|
8797
|
-
}, /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
8798
|
-
product: product
|
|
8799
|
-
}))));
|
|
8800
|
-
};
|
|
8801
|
-
|
|
8802
9635
|
var Carousel = function Carousel(props) {
|
|
8803
9636
|
var carouselRef = React.useRef(null);
|
|
8804
9637
|
var _useState = React.useState(false),
|
|
8805
9638
|
isScrolledToLeft = _useState[0],
|
|
8806
9639
|
setIsScrolledToLeft = _useState[1];
|
|
8807
|
-
var _useState2 = React.useState(
|
|
8808
|
-
|
|
8809
|
-
|
|
8810
|
-
var _props$datas = props.datas,
|
|
8811
|
-
datas = _props$datas === void 0 ? [] : _props$datas,
|
|
9640
|
+
var _useState2 = React.useState(0);
|
|
9641
|
+
var _props$data = props.data,
|
|
9642
|
+
data = _props$data === void 0 ? [] : _props$data,
|
|
8812
9643
|
_props$className = props.className,
|
|
8813
9644
|
className = _props$className === void 0 ? "" : _props$className,
|
|
8814
9645
|
_props$style = props.style,
|
|
@@ -8818,21 +9649,20 @@ var Carousel = function Carousel(props) {
|
|
|
8818
9649
|
_props$renderItem = props.renderItem,
|
|
8819
9650
|
renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
|
|
8820
9651
|
var handleClickPrevImg = function handleClickPrevImg() {
|
|
8821
|
-
if (carouselRef.current) {
|
|
9652
|
+
if (carouselRef !== null && carouselRef !== void 0 && carouselRef.current) {
|
|
8822
9653
|
setIsScrolledToLeft(true);
|
|
8823
|
-
setIsScrolledToRight(false);
|
|
8824
9654
|
carouselRef.current.scrollBy({
|
|
8825
|
-
left: -
|
|
9655
|
+
left: -carouselRef.current.offsetWidth / 4,
|
|
8826
9656
|
behavior: "smooth"
|
|
8827
9657
|
});
|
|
8828
9658
|
}
|
|
8829
9659
|
};
|
|
8830
9660
|
var handleClickNextImg = function handleClickNextImg() {
|
|
8831
|
-
setIsScrolledToRight(true);
|
|
8832
9661
|
setIsScrolledToLeft(false);
|
|
8833
|
-
if (carouselRef.current) {
|
|
8834
|
-
|
|
8835
|
-
|
|
9662
|
+
if (carouselRef !== null && carouselRef !== void 0 && carouselRef.current) {
|
|
9663
|
+
var _carouselRef$current, _carouselRef$current2;
|
|
9664
|
+
carouselRef === null || carouselRef === void 0 ? void 0 : (_carouselRef$current = carouselRef.current) === null || _carouselRef$current === void 0 ? void 0 : _carouselRef$current.scrollBy({
|
|
9665
|
+
left: (carouselRef === null || carouselRef === void 0 ? void 0 : (_carouselRef$current2 = carouselRef.current) === null || _carouselRef$current2 === void 0 ? void 0 : _carouselRef$current2.offsetWidth) / 4,
|
|
8836
9666
|
behavior: "smooth"
|
|
8837
9667
|
});
|
|
8838
9668
|
}
|
|
@@ -8840,13 +9670,13 @@ var Carousel = function Carousel(props) {
|
|
|
8840
9670
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8841
9671
|
className: "relative " + className + " ",
|
|
8842
9672
|
style: style
|
|
8843
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8844
|
-
className: " w-full pe-2 h-full flex overflow-x-auto hide-scrollbar",
|
|
9673
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9674
|
+
className: " w-full pe-2 h-full flex gap-2 md:gap-4 xl:gap-6 overflow-x-auto hide-scrollbar",
|
|
8845
9675
|
ref: carouselRef
|
|
8846
|
-
},
|
|
9676
|
+
}, data && (data === null || data === void 0 ? void 0 : data.length) > 0 ? data === null || data === void 0 ? void 0 : data.map(function (item, index) {
|
|
8847
9677
|
return renderItem(item, index);
|
|
8848
|
-
})),
|
|
8849
|
-
className: " hidden
|
|
9678
|
+
}) : null)), data && (data === null || data === void 0 ? void 0 : data.length) > 4 ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("button", {
|
|
9679
|
+
className: " hidden lg:block bg-gray3 p-3 rounded-full absolute top-[45%] left-[-8px] lg:left-[-2%]",
|
|
8850
9680
|
style: {
|
|
8851
9681
|
backgroundColor: isScrolledToLeft ? primaryColor : "#BDBDBD"
|
|
8852
9682
|
},
|
|
@@ -8854,19 +9684,23 @@ var Carousel = function Carousel(props) {
|
|
|
8854
9684
|
}, /*#__PURE__*/React__default.createElement(fa.FaArrowLeft, {
|
|
8855
9685
|
className: "text-sm lg:text-lg text-white"
|
|
8856
9686
|
})), /*#__PURE__*/React__default.createElement("button", {
|
|
8857
|
-
className: " hidden
|
|
9687
|
+
className: " hidden lg:block p-3 rounded-full absolute top-[45%] right-[-2%] ",
|
|
8858
9688
|
style: {
|
|
8859
|
-
backgroundColor:
|
|
9689
|
+
backgroundColor: !isScrolledToLeft ? primaryColor : "#BDBDBD"
|
|
8860
9690
|
},
|
|
8861
9691
|
onClick: handleClickNextImg
|
|
8862
9692
|
}, /*#__PURE__*/React__default.createElement(fa.FaArrowRight, {
|
|
8863
9693
|
className: "text-sm lg:text-lg text-white"
|
|
8864
|
-
}))));
|
|
9694
|
+
}))) : null);
|
|
8865
9695
|
};
|
|
8866
9696
|
|
|
8867
9697
|
var Products2 = function Products2(props) {
|
|
8868
9698
|
var shopConfigStyle = props.shopConfigStyle,
|
|
8869
|
-
data = props.data
|
|
9699
|
+
data = props.data,
|
|
9700
|
+
_props$ProductItem = props.ProductItem,
|
|
9701
|
+
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem,
|
|
9702
|
+
_props$Link = props.Link,
|
|
9703
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
8870
9704
|
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
8871
9705
|
_shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
|
|
8872
9706
|
primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
|
|
@@ -8899,15 +9733,17 @@ var Products2 = function Products2(props) {
|
|
|
8899
9733
|
color: textButton
|
|
8900
9734
|
}
|
|
8901
9735
|
}, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement(Carousel, {
|
|
8902
|
-
|
|
9736
|
+
data: products,
|
|
8903
9737
|
primaryColor: primary,
|
|
8904
9738
|
renderItem: function renderItem(item, index) {
|
|
8905
9739
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8906
9740
|
key: "carousel-" + index,
|
|
8907
|
-
className: "
|
|
8908
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
9741
|
+
className: "flex-shrink-0 w-[calc(50%-2px)] md:w-[calc(34%-16px)] lg:w-[calc(25%-12px)] xl:w-[calc(25%-19px)]"
|
|
9742
|
+
}, /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
8909
9743
|
product: item.productInfo,
|
|
8910
|
-
|
|
9744
|
+
Link: Link,
|
|
9745
|
+
shopConfigStyle: shopConfigStyle,
|
|
9746
|
+
className: "border-0 bg-bgSecondary"
|
|
8911
9747
|
}));
|
|
8912
9748
|
}
|
|
8913
9749
|
})));
|
|
@@ -8958,7 +9794,11 @@ var Products3 = function Products3(props) {
|
|
|
8958
9794
|
_props$data = props.data,
|
|
8959
9795
|
data = _props$data === void 0 ? {} : _props$data,
|
|
8960
9796
|
_props$SectionTitle = props.SectionTitle,
|
|
8961
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle
|
|
9797
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
9798
|
+
_props$Link = props.Link,
|
|
9799
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
9800
|
+
_props$ProductItem = props.ProductItem,
|
|
9801
|
+
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
8962
9802
|
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
8963
9803
|
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
8964
9804
|
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
|
|
@@ -9039,8 +9879,10 @@ var Products3 = function Products3(props) {
|
|
|
9039
9879
|
})) : /*#__PURE__*/React__default.createElement("div", {
|
|
9040
9880
|
className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-12 mt-12"
|
|
9041
9881
|
}, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
9042
|
-
return /*#__PURE__*/React__default.createElement(
|
|
9882
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
9883
|
+
Link: Link,
|
|
9043
9884
|
key: index,
|
|
9885
|
+
shopConfigStyle: shopConfigStyle,
|
|
9044
9886
|
product: product === null || product === void 0 ? void 0 : product.productInfo
|
|
9045
9887
|
});
|
|
9046
9888
|
})), /*#__PURE__*/React__default.createElement(Pagination, _extends({
|
|
@@ -9052,162 +9894,123 @@ var Products3 = function Products3(props) {
|
|
|
9052
9894
|
}));
|
|
9053
9895
|
};
|
|
9054
9896
|
|
|
9055
|
-
var
|
|
9056
|
-
var
|
|
9057
|
-
|
|
9058
|
-
|
|
9059
|
-
|
|
9060
|
-
|
|
9061
|
-
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
_props$
|
|
9066
|
-
|
|
9067
|
-
_props$
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
}
|
|
9084
|
-
};
|
|
9085
|
-
var handleClickNextImg = function handleClickNextImg() {
|
|
9086
|
-
setIsScrolledToRight(true);
|
|
9087
|
-
setIsScrolledToLeft(false);
|
|
9088
|
-
if (listRef.current) {
|
|
9089
|
-
listRef.current.scrollBy({
|
|
9090
|
-
left: 80,
|
|
9091
|
-
behavior: "smooth"
|
|
9092
|
-
});
|
|
9093
|
-
}
|
|
9094
|
-
};
|
|
9095
|
-
console.log("check propsss::::::::", datas);
|
|
9096
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
9097
|
-
className: "grid grid-cols-12 h-12 " + className,
|
|
9098
|
-
style: style
|
|
9099
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9100
|
-
className: "col-span-12 lg:col-span-10 md:col-span-9 overflow-hidden "
|
|
9101
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9102
|
-
className: "flex overflow-x-auto gap-2 hide-scrollbar items-center",
|
|
9103
|
-
ref: listRef
|
|
9104
|
-
}, datas && datas.length > 0 && datas.map(function (item, index) {
|
|
9105
|
-
return renderItem(item, index);
|
|
9106
|
-
}))), datas && datas.length > 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
9107
|
-
className: "hidden my-auto col-span-5 md:col-span-3 lg:col-span-2 gap-4 md:flex justify-end "
|
|
9108
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
9109
|
-
className: " px-4 py-3 rounded-full",
|
|
9110
|
-
onClick: handleClickPrevImg,
|
|
9111
|
-
style: {
|
|
9112
|
-
backgroundColor: isScrolledToLeft ? primaryColor : "#BDBDBD"
|
|
9113
|
-
}
|
|
9114
|
-
}, /*#__PURE__*/React__default.createElement(fa.FaArrowLeft, {
|
|
9115
|
-
className: "inline-block mb-1 text-lg",
|
|
9116
|
-
style: {
|
|
9117
|
-
color: textButtonColor
|
|
9118
|
-
}
|
|
9119
|
-
})), /*#__PURE__*/React__default.createElement("button", {
|
|
9120
|
-
className: "bg-gray2 px-4 py-3 rounded-full",
|
|
9121
|
-
style: {
|
|
9122
|
-
backgroundColor: isScrolledToRight ? primaryColor : "#BDBDBD"
|
|
9123
|
-
},
|
|
9124
|
-
onClick: handleClickNextImg
|
|
9125
|
-
}, /*#__PURE__*/React__default.createElement(fa.FaArrowRight, {
|
|
9126
|
-
className: "inline-block mb-1 text-lg",
|
|
9127
|
-
style: {
|
|
9128
|
-
color: textButtonColor
|
|
9129
|
-
}
|
|
9130
|
-
}))));
|
|
9131
|
-
};
|
|
9132
|
-
|
|
9133
|
-
var ListProduct = function ListProduct(props) {
|
|
9134
|
-
var _props$datas = props.datas,
|
|
9135
|
-
datas = _props$datas === void 0 ? [] : _props$datas,
|
|
9136
|
-
_props$style = props.style,
|
|
9137
|
-
style = _props$style === void 0 ? {} : _props$style,
|
|
9138
|
-
_props$className = props.className,
|
|
9139
|
-
className = _props$className === void 0 ? {} : _props$className,
|
|
9140
|
-
_props$renderItem = props.renderItem,
|
|
9141
|
-
renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
|
|
9897
|
+
var Products10 = function Products10(props) {
|
|
9898
|
+
var _useState = React.useState({
|
|
9899
|
+
size: 8
|
|
9900
|
+
}),
|
|
9901
|
+
params = _useState[0],
|
|
9902
|
+
setParams = _useState[1];
|
|
9903
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
9904
|
+
data = props.data,
|
|
9905
|
+
_props$SectionTitle = props.SectionTitle,
|
|
9906
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
9907
|
+
_props$ProductItem = props.ProductItem,
|
|
9908
|
+
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem,
|
|
9909
|
+
_props$Link = props.Link,
|
|
9910
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
9911
|
+
var _CategoryController = CategoryController(props),
|
|
9912
|
+
_CategoryController$c = _CategoryController.categories,
|
|
9913
|
+
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
9914
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
9915
|
+
params: params
|
|
9916
|
+
})),
|
|
9917
|
+
_ProductController$pr = _ProductController.products,
|
|
9918
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
9919
|
+
loading = _ProductController.loading;
|
|
9920
|
+
var handleChooseCategory = function handleChooseCategory(item) {
|
|
9921
|
+
setParams(_extends({}, params, {
|
|
9922
|
+
categoryId: item === null || item === void 0 ? void 0 : item.categoryId
|
|
9923
|
+
}));
|
|
9924
|
+
};
|
|
9142
9925
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9143
|
-
className: "
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
})
|
|
9926
|
+
className: SECTION_DEFAULT_CLASS + " flex flex-col gap-4 md:gap-6 "
|
|
9927
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
9928
|
+
data: data,
|
|
9929
|
+
shopConfigStyle: shopConfigStyle
|
|
9930
|
+
}), /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
9931
|
+
data: categories,
|
|
9932
|
+
onClick: handleChooseCategory
|
|
9933
|
+
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
9934
|
+
className: "m-auto mt-20 min-h-32"
|
|
9935
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
9936
|
+
className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-2 gap-y-4 md:gap-4 xl:gap-6"
|
|
9937
|
+
}, products === null || products === void 0 ? void 0 : products.map(function (product, idx) {
|
|
9938
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
9939
|
+
Link: Link,
|
|
9940
|
+
className: "border-0 bg-bgSecondary",
|
|
9941
|
+
shopConfigStyle: shopConfigStyle,
|
|
9942
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
9943
|
+
key: "zjk-" + idx
|
|
9944
|
+
});
|
|
9945
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
|
|
9148
9946
|
};
|
|
9149
9947
|
|
|
9150
|
-
var
|
|
9151
|
-
var
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
|
|
9165
|
-
|
|
9166
|
-
bgSecondary = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
|
|
9167
|
-
var _CategoryController = CategoryController(props),
|
|
9948
|
+
var ProductCategory2 = function ProductCategory2(props) {
|
|
9949
|
+
var _products$slice;
|
|
9950
|
+
var _props$Link = props.Link,
|
|
9951
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
9952
|
+
data = props.data,
|
|
9953
|
+
shopConfigStyle = props.shopConfigStyle,
|
|
9954
|
+
_props$SectionTitle = props.SectionTitle,
|
|
9955
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
9956
|
+
_props$ProductItem = props.ProductItem,
|
|
9957
|
+
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
9958
|
+
var _useState = React.useState({
|
|
9959
|
+
size: 12
|
|
9960
|
+
}),
|
|
9961
|
+
params = _useState[0],
|
|
9962
|
+
setParams = _useState[1];
|
|
9963
|
+
var _CategoryController = CategoryController(_extends({}, props)),
|
|
9168
9964
|
_CategoryController$c = _CategoryController.categories,
|
|
9169
9965
|
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
9170
|
-
var _ProductController = ProductController(props
|
|
9966
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
9967
|
+
params: params
|
|
9968
|
+
})),
|
|
9171
9969
|
_ProductController$pr = _ProductController.products,
|
|
9172
|
-
products = _ProductController$pr === void 0 ? [] : _ProductController$pr
|
|
9173
|
-
|
|
9970
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
9971
|
+
loading = _ProductController.loading;
|
|
9972
|
+
var _useState2 = React.useState(true),
|
|
9973
|
+
isFilter = _useState2[0],
|
|
9974
|
+
setIsFilter = _useState2[1];
|
|
9975
|
+
var handleChooseCategory = function handleChooseCategory(item) {
|
|
9976
|
+
setIsFilter(true);
|
|
9977
|
+
setParams(_extends({}, params, {
|
|
9978
|
+
categoryId: item === null || item === void 0 ? void 0 : item.categoryId,
|
|
9979
|
+
size: 12
|
|
9980
|
+
}));
|
|
9981
|
+
};
|
|
9982
|
+
var handleGetMoreProducts = function handleGetMoreProducts() {
|
|
9983
|
+
setIsFilter(false);
|
|
9984
|
+
setParams(_extends({}, params, {
|
|
9985
|
+
size: (params === null || params === void 0 ? void 0 : params.size) + 4
|
|
9986
|
+
}));
|
|
9987
|
+
};
|
|
9174
9988
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9175
|
-
className: "
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
},
|
|
9183
|
-
|
|
9184
|
-
|
|
9185
|
-
|
|
9186
|
-
|
|
9187
|
-
|
|
9188
|
-
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9200
|
-
}), /*#__PURE__*/React__default.createElement(ListProduct, {
|
|
9201
|
-
datas: products,
|
|
9202
|
-
renderItem: function renderItem(item, index) {
|
|
9203
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
9204
|
-
key: "productfsd-" + index
|
|
9205
|
-
}, /*#__PURE__*/React__default.createElement(ItemProduct, {
|
|
9206
|
-
product: item.productInfo,
|
|
9207
|
-
shopConfigStyle: shopConfigStyle
|
|
9208
|
-
}));
|
|
9209
|
-
}
|
|
9210
|
-
}));
|
|
9989
|
+
className: SECTION_CLASS + " flex flex-col gap-4 md:gap-6 "
|
|
9990
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
9991
|
+
data: data,
|
|
9992
|
+
shopConfigStyle: shopConfigStyle
|
|
9993
|
+
}), /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
9994
|
+
data: categories,
|
|
9995
|
+
onClick: handleChooseCategory
|
|
9996
|
+
}), loading && isFilter ? /*#__PURE__*/React__default.createElement("div", {
|
|
9997
|
+
className: "m-auto mt-20 min-h-32"
|
|
9998
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
9999
|
+
className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-2 gap-y-4 md:gap-4 xl:gap-6"
|
|
10000
|
+
}, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, idx) {
|
|
10001
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10002
|
+
Link: Link,
|
|
10003
|
+
shopConfigStyle: shopConfigStyle,
|
|
10004
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10005
|
+
key: "zjk-" + idx
|
|
10006
|
+
});
|
|
10007
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
|
|
10008
|
+
label: "Xem thêm",
|
|
10009
|
+
onClick: handleGetMoreProducts,
|
|
10010
|
+
className: "mx-auto",
|
|
10011
|
+
type: "outline",
|
|
10012
|
+
shopConfigStyle: shopConfigStyle
|
|
10013
|
+
}) : null);
|
|
9211
10014
|
};
|
|
9212
10015
|
|
|
9213
10016
|
var ProductSale2 = function ProductSale2(props) {
|
|
@@ -9216,7 +10019,8 @@ var ProductSale2 = function ProductSale2(props) {
|
|
|
9216
10019
|
_props$data = props.data,
|
|
9217
10020
|
data = _props$data === void 0 ? {} : _props$data,
|
|
9218
10021
|
_props$SectionTitle = props.SectionTitle,
|
|
9219
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle
|
|
10022
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
10023
|
+
ProductItem = props.ProductItem;
|
|
9220
10024
|
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
9221
10025
|
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
9222
10026
|
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
|
|
@@ -9233,7 +10037,7 @@ var ProductSale2 = function ProductSale2(props) {
|
|
|
9233
10037
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9234
10038
|
className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-10 mt-12"
|
|
9235
10039
|
}, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
9236
|
-
return /*#__PURE__*/React__default.createElement(
|
|
10040
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
9237
10041
|
key: index,
|
|
9238
10042
|
product: product === null || product === void 0 ? void 0 : product.productInfo
|
|
9239
10043
|
});
|
|
@@ -9246,13 +10050,171 @@ var ProductSale2 = function ProductSale2(props) {
|
|
|
9246
10050
|
})) : null;
|
|
9247
10051
|
};
|
|
9248
10052
|
|
|
10053
|
+
var ProductSearch1 = function ProductSearch1(props) {
|
|
10054
|
+
var _window, _window$location;
|
|
10055
|
+
var _props$Link = props.Link,
|
|
10056
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10057
|
+
_props$SectionTitle = props.SectionTitle,
|
|
10058
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
10059
|
+
_props$ProductItem = props.ProductItem,
|
|
10060
|
+
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem,
|
|
10061
|
+
shopConfigStyle = props.shopConfigStyle;
|
|
10062
|
+
var queryParams = new URLSearchParams((_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : _window$location.search);
|
|
10063
|
+
var keywordValue = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get('keyword');
|
|
10064
|
+
var _useState = React.useState(0),
|
|
10065
|
+
length = _useState[0],
|
|
10066
|
+
setLength = _useState[1];
|
|
10067
|
+
var _useState2 = React.useState({
|
|
10068
|
+
productName: keywordValue,
|
|
10069
|
+
size: 24
|
|
10070
|
+
}),
|
|
10071
|
+
params = _useState2[0],
|
|
10072
|
+
setParams = _useState2[1];
|
|
10073
|
+
var _useState3 = React.useState(true),
|
|
10074
|
+
isGetMore = _useState3[0],
|
|
10075
|
+
setIsGetMore = _useState3[1];
|
|
10076
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
10077
|
+
params: params
|
|
10078
|
+
})),
|
|
10079
|
+
products = _ProductController.products,
|
|
10080
|
+
loading = _ProductController.loading;
|
|
10081
|
+
React.useEffect(function () {
|
|
10082
|
+
setParams(function (prev) {
|
|
10083
|
+
return _extends({}, prev, {
|
|
10084
|
+
productName: keywordValue
|
|
10085
|
+
});
|
|
10086
|
+
});
|
|
10087
|
+
}, [keywordValue]);
|
|
10088
|
+
var handleGetMoreProducts = function handleGetMoreProducts() {
|
|
10089
|
+
setIsGetMore(false);
|
|
10090
|
+
setLength(function (prev) {
|
|
10091
|
+
return prev + 4;
|
|
10092
|
+
});
|
|
10093
|
+
};
|
|
10094
|
+
var listFilter = [{
|
|
10095
|
+
label: "Khuyến mãi",
|
|
10096
|
+
value: "discount",
|
|
10097
|
+
filter: {
|
|
10098
|
+
isDiscount: true
|
|
10099
|
+
}
|
|
10100
|
+
}, {
|
|
10101
|
+
label: "Nổi bật",
|
|
10102
|
+
value: "highlight",
|
|
10103
|
+
filter: {
|
|
10104
|
+
isHighlight: true
|
|
10105
|
+
}
|
|
10106
|
+
}];
|
|
10107
|
+
var handleFilter = function handleFilter(item) {
|
|
10108
|
+
setParams(function (prev) {
|
|
10109
|
+
var _Object$keys;
|
|
10110
|
+
var newParams = _extends({}, prev);
|
|
10111
|
+
Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(newParams)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.forEach(function (key) {
|
|
10112
|
+
if (key !== 'productName' && key !== 'size') {
|
|
10113
|
+
delete newParams[key];
|
|
10114
|
+
}
|
|
10115
|
+
});
|
|
10116
|
+
return _extends({}, newParams, item === null || item === void 0 ? void 0 : item.filter);
|
|
10117
|
+
});
|
|
10118
|
+
};
|
|
10119
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10120
|
+
className: SECTION_CLASS + " flex flex-col gap-4 md:gap-6 "
|
|
10121
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
10122
|
+
data: {
|
|
10123
|
+
sectionTitle: "Kết quả tìm kiếm"
|
|
10124
|
+
},
|
|
10125
|
+
shopConfigStyle: shopConfigStyle
|
|
10126
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10127
|
+
className: "text-lg"
|
|
10128
|
+
}, "T\u1EEB kh\xF3a \"", keywordValue, "\" (", products === null || products === void 0 ? void 0 : products.length, " s\u1EA3n ph\u1EA9m)"), /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
10129
|
+
data: listFilter,
|
|
10130
|
+
isNavigateButton: false,
|
|
10131
|
+
onClick: handleFilter
|
|
10132
|
+
}), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
10133
|
+
className: "m-auto mt-20 min-h-32"
|
|
10134
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
10135
|
+
className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-x-2 gap-y-4 md:gap-4 xl:gap-6"
|
|
10136
|
+
}, products.slice(0, 8 + length).map(function (product, idx) {
|
|
10137
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10138
|
+
Link: Link,
|
|
10139
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10140
|
+
key: "htrhr-" + idx
|
|
10141
|
+
});
|
|
10142
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > 8 + length ? /*#__PURE__*/React__default.createElement(Button, {
|
|
10143
|
+
label: "Xem thêm",
|
|
10144
|
+
onClick: handleGetMoreProducts,
|
|
10145
|
+
className: "mx-auto " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass),
|
|
10146
|
+
type: "outline"
|
|
10147
|
+
}) : null);
|
|
10148
|
+
};
|
|
10149
|
+
|
|
10150
|
+
var ProductHot1 = function ProductHot1(props) {
|
|
10151
|
+
var _products$slice;
|
|
10152
|
+
var _props$Link = props.Link,
|
|
10153
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10154
|
+
data = props.data,
|
|
10155
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10156
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10157
|
+
_props$SectionTitle = props.SectionTitle,
|
|
10158
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
10159
|
+
_props$ProductItem = props.ProductItem,
|
|
10160
|
+
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
10161
|
+
var _useState = React.useState({
|
|
10162
|
+
sort: "ranked,DESC",
|
|
10163
|
+
size: 12
|
|
10164
|
+
}),
|
|
10165
|
+
params = _useState[0],
|
|
10166
|
+
setParams = _useState[1];
|
|
10167
|
+
var _useState2 = React.useState(true),
|
|
10168
|
+
isGetMore = _useState2[0],
|
|
10169
|
+
setIsGetMore = _useState2[1];
|
|
10170
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
10171
|
+
params: params
|
|
10172
|
+
})),
|
|
10173
|
+
_ProductController$pr = _ProductController.products,
|
|
10174
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
10175
|
+
loading = _ProductController.loading;
|
|
10176
|
+
var handleGetMoreProducts = function handleGetMoreProducts() {
|
|
10177
|
+
setIsGetMore(false);
|
|
10178
|
+
setParams(_extends({}, params, {
|
|
10179
|
+
size: (params === null || params === void 0 ? void 0 : params.size) + 4
|
|
10180
|
+
}));
|
|
10181
|
+
};
|
|
10182
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10183
|
+
className: SECTION_CLASS + " flex flex-col gap-4 md:gap-8"
|
|
10184
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
10185
|
+
data: data,
|
|
10186
|
+
shopConfigStyle: shopConfigStyle
|
|
10187
|
+
}), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
10188
|
+
className: "m-auto mt-20 min-h-32"
|
|
10189
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
10190
|
+
className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-x-2 gap-y-4 md:gap-4 xl:gap-6"
|
|
10191
|
+
}, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, idx) {
|
|
10192
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10193
|
+
Link: Link,
|
|
10194
|
+
shopConfigStyle: shopConfigStyle,
|
|
10195
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10196
|
+
key: "zjk-" + idx
|
|
10197
|
+
});
|
|
10198
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
|
|
10199
|
+
label: "Xem thêm",
|
|
10200
|
+
onClick: handleGetMoreProducts,
|
|
10201
|
+
className: "mx-auto",
|
|
10202
|
+
type: "outline",
|
|
10203
|
+
shopConfigStyle: shopConfigStyle
|
|
10204
|
+
}) : null);
|
|
10205
|
+
};
|
|
10206
|
+
|
|
9249
10207
|
var ProductHot3 = function ProductHot3(props) {
|
|
9250
10208
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
9251
10209
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
9252
10210
|
_props$data = props.data,
|
|
9253
10211
|
data = _props$data === void 0 ? {} : _props$data,
|
|
9254
10212
|
_props$SectionTitle = props.SectionTitle,
|
|
9255
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle
|
|
10213
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
10214
|
+
_props$Link = props.Link,
|
|
10215
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10216
|
+
_props$ProductItem = props.ProductItem,
|
|
10217
|
+
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
9256
10218
|
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
9257
10219
|
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
9258
10220
|
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
|
|
@@ -9275,8 +10237,10 @@ var ProductHot3 = function ProductHot3(props) {
|
|
|
9275
10237
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9276
10238
|
className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-10 mt-12"
|
|
9277
10239
|
}, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
9278
|
-
return /*#__PURE__*/React__default.createElement(
|
|
9279
|
-
|
|
10240
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10241
|
+
Link: Link,
|
|
10242
|
+
shopConfigStyle: shopConfigStyle,
|
|
10243
|
+
key: "htjtr-" + index,
|
|
9280
10244
|
product: product === null || product === void 0 ? void 0 : product.productInfo
|
|
9281
10245
|
});
|
|
9282
10246
|
}))), /*#__PURE__*/React__default.createElement(Dash, {
|
|
@@ -9286,61 +10250,159 @@ var ProductHot3 = function ProductHot3(props) {
|
|
|
9286
10250
|
|
|
9287
10251
|
var ProductsTop1 = function ProductsTop1(props) {
|
|
9288
10252
|
var data = props.data,
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
|
|
10253
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10254
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10255
|
+
_props$SectionTitle = props.SectionTitle,
|
|
10256
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
10257
|
+
_props$ProductItem = props.ProductItem,
|
|
10258
|
+
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem,
|
|
10259
|
+
_props$Link = props.Link,
|
|
10260
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
10261
|
+
var _useState = React.useState({
|
|
10262
|
+
size: 8
|
|
10263
|
+
}),
|
|
10264
|
+
params = _useState[0];
|
|
10265
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
10266
|
+
params: params
|
|
10267
|
+
})),
|
|
9294
10268
|
_ProductController$pr = _ProductController.products,
|
|
9295
|
-
products = _ProductController$pr === void 0 ? [] : _ProductController$pr
|
|
10269
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
10270
|
+
loading = _ProductController.loading;
|
|
9296
10271
|
console.log("ProductsTop1 products");
|
|
9297
10272
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9298
|
-
className: "
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
9303
|
-
className: "
|
|
9304
|
-
},
|
|
9305
|
-
|
|
9306
|
-
|
|
9307
|
-
|
|
9308
|
-
|
|
9309
|
-
|
|
9310
|
-
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
}
|
|
9314
|
-
}));
|
|
10273
|
+
className: SECTION_DEFAULT_CLASS + " flex flex-col gap-8 "
|
|
10274
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
10275
|
+
data: data,
|
|
10276
|
+
shopConfigStyle: shopConfigStyle
|
|
10277
|
+
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
10278
|
+
className: "m-auto mt-20 min-h-32"
|
|
10279
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
10280
|
+
className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-x-2 gap-y-4 md:gap-4 xl:gap-6"
|
|
10281
|
+
}, products === null || products === void 0 ? void 0 : products.map(function (product, idx) {
|
|
10282
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10283
|
+
Link: Link,
|
|
10284
|
+
className: "bg-bgSecondary border-0",
|
|
10285
|
+
shopConfigStyle: shopConfigStyle,
|
|
10286
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10287
|
+
key: "htrhr-" + idx
|
|
10288
|
+
});
|
|
10289
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
|
|
9315
10290
|
};
|
|
9316
10291
|
|
|
9317
|
-
var
|
|
9318
|
-
var
|
|
9319
|
-
|
|
9320
|
-
|
|
9321
|
-
|
|
9322
|
-
|
|
9323
|
-
|
|
9324
|
-
|
|
9325
|
-
|
|
9326
|
-
|
|
9327
|
-
|
|
9328
|
-
|
|
9329
|
-
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
|
|
9334
|
-
|
|
9335
|
-
|
|
10292
|
+
var ProductList5 = function ProductList5(props) {
|
|
10293
|
+
var data = props.data,
|
|
10294
|
+
_props$Link = props.Link,
|
|
10295
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10296
|
+
_props$SectionTitle = props.SectionTitle,
|
|
10297
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
10298
|
+
_props$ProductItem = props.ProductItem,
|
|
10299
|
+
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem,
|
|
10300
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10301
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
10302
|
+
var _useState = React.useState({
|
|
10303
|
+
size: 12
|
|
10304
|
+
}),
|
|
10305
|
+
params = _useState[0],
|
|
10306
|
+
setParams = _useState[1];
|
|
10307
|
+
var _useState2 = React.useState(true),
|
|
10308
|
+
isGetMore = _useState2[0],
|
|
10309
|
+
setIsGetMore = _useState2[1];
|
|
10310
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
10311
|
+
params: params
|
|
10312
|
+
})),
|
|
10313
|
+
products = _ProductController.products,
|
|
10314
|
+
loading = _ProductController.loading;
|
|
10315
|
+
var handleGetMoreProducts = function handleGetMoreProducts() {
|
|
10316
|
+
setIsGetMore(false);
|
|
10317
|
+
setParams(function (prev) {
|
|
10318
|
+
return _extends({}, prev, {
|
|
10319
|
+
size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
|
|
10320
|
+
});
|
|
10321
|
+
});
|
|
9336
10322
|
};
|
|
9337
|
-
return {
|
|
9338
|
-
|
|
10323
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10324
|
+
className: SECTION_CLASS + " flex flex-col gap-8 "
|
|
10325
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
10326
|
+
data: data,
|
|
10327
|
+
shopConfigStyle: shopConfigStyle
|
|
10328
|
+
}), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
10329
|
+
className: "m-auto mt-20 min-h-32"
|
|
10330
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
10331
|
+
className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-x-2 gap-y-4 md:gap-4 xl:gap-6"
|
|
10332
|
+
}, products.slice(0, params.size - 4).map(function (product, idx) {
|
|
10333
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10334
|
+
Link: Link,
|
|
10335
|
+
shopConfigStyle: shopConfigStyle,
|
|
10336
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10337
|
+
key: "htrhr-" + idx
|
|
10338
|
+
});
|
|
10339
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
|
|
10340
|
+
label: "Xem thêm",
|
|
10341
|
+
onClick: handleGetMoreProducts,
|
|
10342
|
+
className: "mx-auto",
|
|
10343
|
+
type: "outline",
|
|
10344
|
+
shopConfigStyle: shopConfigStyle
|
|
10345
|
+
}) : null);
|
|
10346
|
+
};
|
|
10347
|
+
|
|
10348
|
+
var ProductHighlight1 = function ProductHighlight1(props) {
|
|
10349
|
+
var _products$slice;
|
|
10350
|
+
var _props$Link = props.Link,
|
|
10351
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10352
|
+
data = props.data,
|
|
10353
|
+
shopConfigStyle = props.shopConfigStyle,
|
|
10354
|
+
_props$SectionTitle = props.SectionTitle,
|
|
10355
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
10356
|
+
_props$ProductItem = props.ProductItem,
|
|
10357
|
+
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
10358
|
+
var _useState = React.useState(true),
|
|
10359
|
+
isGetMore = _useState[0],
|
|
10360
|
+
setIsGetMore = _useState[1];
|
|
10361
|
+
var _useState2 = React.useState({
|
|
10362
|
+
size: 8,
|
|
10363
|
+
isHighlight: true
|
|
10364
|
+
}),
|
|
10365
|
+
params = _useState2[0],
|
|
10366
|
+
setParams = _useState2[1];
|
|
10367
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
10368
|
+
params: params
|
|
10369
|
+
})),
|
|
10370
|
+
_ProductController$pr = _ProductController.products,
|
|
10371
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
10372
|
+
loading = _ProductController.loading;
|
|
10373
|
+
var handleGetMoreProducts = function handleGetMoreProducts() {
|
|
10374
|
+
setIsGetMore(false);
|
|
10375
|
+
setParams(_extends({}, params, {
|
|
10376
|
+
size: (params === null || params === void 0 ? void 0 : params.size) + 4
|
|
10377
|
+
}));
|
|
9339
10378
|
};
|
|
10379
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10380
|
+
className: SECTION_CLASS + " flex flex-col gap-4 md:gap-6 "
|
|
10381
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
10382
|
+
data: data,
|
|
10383
|
+
shopConfigStyle: shopConfigStyle
|
|
10384
|
+
}), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
10385
|
+
className: "m-auto mt-20 min-h-32"
|
|
10386
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
10387
|
+
className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-2 gap-y-4 md:gap-4 xl:gap-6"
|
|
10388
|
+
}, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, idx) {
|
|
10389
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10390
|
+
Link: Link,
|
|
10391
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10392
|
+
key: "zjk-" + idx
|
|
10393
|
+
});
|
|
10394
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
|
|
10395
|
+
label: "Xem thêm",
|
|
10396
|
+
onClick: handleGetMoreProducts,
|
|
10397
|
+
className: "mx-auto " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass),
|
|
10398
|
+
type: "outline"
|
|
10399
|
+
}) : null);
|
|
9340
10400
|
};
|
|
9341
10401
|
|
|
9342
10402
|
var ProductDetail10 = function ProductDetail10(props) {
|
|
9343
|
-
var
|
|
10403
|
+
var _product$images;
|
|
10404
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
10405
|
+
shopConfig = props.shopConfig;
|
|
9344
10406
|
var _ProductDetailControl = ProductDetailController(props),
|
|
9345
10407
|
product = _ProductDetailControl.product;
|
|
9346
10408
|
var _useState = React.useState(),
|
|
@@ -9349,18 +10411,34 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
9349
10411
|
var _useState2 = React.useState([]),
|
|
9350
10412
|
options = _useState2[0],
|
|
9351
10413
|
setOptions = _useState2[1];
|
|
10414
|
+
var _useState3 = React.useState(),
|
|
10415
|
+
displayImage = _useState3[0],
|
|
10416
|
+
setDisplayImage = _useState3[1];
|
|
10417
|
+
var _useState4 = React.useState(false),
|
|
10418
|
+
isSeeMore = _useState4[0],
|
|
10419
|
+
setIsSeeMore = _useState4[1];
|
|
10420
|
+
var _useState5 = React.useState(true),
|
|
10421
|
+
hiddenButton = _useState5[0],
|
|
10422
|
+
setHiddenButton = _useState5[1];
|
|
9352
10423
|
var _CartController = CartController(props),
|
|
9353
10424
|
addProductToCart = _CartController.addProductToCart;
|
|
9354
10425
|
var refInputQuantity = React.useRef();
|
|
10426
|
+
var descriptionRef = React.useRef();
|
|
9355
10427
|
React.useEffect(function () {
|
|
9356
10428
|
if (product) {
|
|
9357
10429
|
initVariant();
|
|
10430
|
+
if (descriptionRef.current) {
|
|
10431
|
+
var descriptionHeight = descriptionRef.current.offsetHeight;
|
|
10432
|
+
if (descriptionHeight >= 700) {
|
|
10433
|
+
setHiddenButton(false);
|
|
10434
|
+
}
|
|
10435
|
+
}
|
|
9358
10436
|
}
|
|
9359
10437
|
}, [product]);
|
|
9360
10438
|
var initVariant = function initVariant() {
|
|
9361
|
-
var _product$variants;
|
|
10439
|
+
var _product$variants, _variant$index;
|
|
9362
10440
|
var variant = product === null || product === void 0 ? void 0 : (_product$variants = product.variants) === null || _product$variants === void 0 ? void 0 : _product$variants[0];
|
|
9363
|
-
var indexOptions = variant.index.split(",");
|
|
10441
|
+
var indexOptions = variant === null || variant === void 0 ? void 0 : (_variant$index = variant.index) === null || _variant$index === void 0 ? void 0 : _variant$index.split(",");
|
|
9364
10442
|
setVariant(variant);
|
|
9365
10443
|
var options = (product === null || product === void 0 ? void 0 : product.optionValues) || [];
|
|
9366
10444
|
options = options.map(function (e, i) {
|
|
@@ -9414,21 +10492,41 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
9414
10492
|
}
|
|
9415
10493
|
};
|
|
9416
10494
|
var buyNow = function buyNow() {};
|
|
10495
|
+
var handleDisplayImage = function handleDisplayImage(item) {
|
|
10496
|
+
setDisplayImage(item);
|
|
10497
|
+
};
|
|
9417
10498
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9418
|
-
className:
|
|
10499
|
+
className: SECTION_CLASS + " mt-6 md:mt-6 mb-0 " + ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "bg-bgSecondary pb-8" : "bg-background")
|
|
9419
10500
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9420
|
-
className: "p-6 rounded-2xl grid grid-cols-1 md:grid-cols-
|
|
9421
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
10501
|
+
className: "p-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 gap-6 bg-bgSecondary"
|
|
10502
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10503
|
+
className: "flex flex-col gap-4 col-span-2"
|
|
10504
|
+
}, displayImage ? /*#__PURE__*/React__default.createElement("img", {
|
|
10505
|
+
src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
|
|
10506
|
+
className: "w-full aspect-square rounded-2xl "
|
|
10507
|
+
}) : /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
9422
10508
|
product: product,
|
|
9423
10509
|
className: "w-full aspect-square rounded-2xl"
|
|
9424
10510
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9425
|
-
className: "
|
|
10511
|
+
className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
|
|
10512
|
+
}, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
|
|
10513
|
+
return /*#__PURE__*/React__default.createElement("img", {
|
|
10514
|
+
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
10515
|
+
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
10516
|
+
alt: "",
|
|
10517
|
+
className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " cursor-pointer h-16 w-16 rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
|
|
10518
|
+
onClick: function onClick() {
|
|
10519
|
+
handleDisplayImage(item);
|
|
10520
|
+
}
|
|
10521
|
+
});
|
|
10522
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
10523
|
+
className: "col-span-3"
|
|
9426
10524
|
}, /*#__PURE__*/React__default.createElement("p", {
|
|
9427
10525
|
className: "font-semibold text-2xl"
|
|
9428
10526
|
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
9429
10527
|
product: product,
|
|
9430
10528
|
variant: variant,
|
|
9431
|
-
className: "mt-6"
|
|
10529
|
+
className: "mt-6 text-[22px]"
|
|
9432
10530
|
}), options.map(function (option, index) {
|
|
9433
10531
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9434
10532
|
className: "flex gap-2 mt-6",
|
|
@@ -9448,7 +10546,7 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
9448
10546
|
})));
|
|
9449
10547
|
}), /*#__PURE__*/React__default.createElement(Input, {
|
|
9450
10548
|
label: "Số lượng",
|
|
9451
|
-
wrapClassName: "flex items-center gap-6 mt-6",
|
|
10549
|
+
wrapClassName: "flex items-center gap-6 mt-6 ",
|
|
9452
10550
|
rules: [{
|
|
9453
10551
|
type: "required",
|
|
9454
10552
|
message: "Bắt buộc nhập số lượng"
|
|
@@ -9459,7 +10557,8 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
9459
10557
|
}],
|
|
9460
10558
|
defaultValue: 1,
|
|
9461
10559
|
isQuantity: true,
|
|
9462
|
-
min:
|
|
10560
|
+
min: 0,
|
|
10561
|
+
className: "bg-background",
|
|
9463
10562
|
ref: refInputQuantity
|
|
9464
10563
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9465
10564
|
className: "flex gap-4 mt-6"
|
|
@@ -9477,13 +10576,29 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
9477
10576
|
return buyNow();
|
|
9478
10577
|
}
|
|
9479
10578
|
})), /*#__PURE__*/React__default.createElement("p", {
|
|
9480
|
-
className: "text-lg mt-12 pt-6 border-t border-stroke"
|
|
10579
|
+
className: "text-lg mt-12 text-xl pb-1 pt-6 border-t border-stroke"
|
|
9481
10580
|
}, "M\xF4 t\u1EA3 s\u1EA3n ph\u1EA9m"), product !== null && product !== void 0 && product.description ? /*#__PURE__*/React__default.createElement("div", {
|
|
9482
|
-
className: "
|
|
10581
|
+
className: "h-max"
|
|
10582
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10583
|
+
ref: descriptionRef,
|
|
10584
|
+
className: "" + (isSeeMore && !hiddenButton ? "h-full mb-4" : "max-h-[700px] overflow-hidden"),
|
|
9483
10585
|
dangerouslySetInnerHTML: {
|
|
9484
10586
|
__html: product === null || product === void 0 ? void 0 : product.description
|
|
9485
10587
|
}
|
|
9486
|
-
})
|
|
10588
|
+
}), !isSeeMore && !hiddenButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
10589
|
+
className: "h-10 relative -mt-10 rounded-b-lg",
|
|
10590
|
+
style: {
|
|
10591
|
+
background: "linear-gradient(to top, #81818169 0%, #00000003 50%)"
|
|
10592
|
+
}
|
|
10593
|
+
}) : null, !hiddenButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
10594
|
+
className: "w-full flex justify-center mt-2"
|
|
10595
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
10596
|
+
label: isSeeMore ? "Thu nhỏ" : "Xem thêm",
|
|
10597
|
+
className: " bottom-0 z-50",
|
|
10598
|
+
onClick: function onClick() {
|
|
10599
|
+
setIsSeeMore(!isSeeMore);
|
|
10600
|
+
}
|
|
10601
|
+
})) : null) : /*#__PURE__*/React__default.createElement("div", {
|
|
9487
10602
|
className: "text-gray3 mt-2"
|
|
9488
10603
|
}, "Kh\xF4ng c\xF3 th\xF4ng tin"))));
|
|
9489
10604
|
};
|
|
@@ -9514,7 +10629,8 @@ var Booking1 = function Booking1(props) {
|
|
|
9514
10629
|
className: "mt-12 grid grid-cols-1 gap-6 md:grid-cols-2 md:gap-12"
|
|
9515
10630
|
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
9516
10631
|
shopConfigStyle: shopConfigStyle,
|
|
9517
|
-
shopConfig: shopConfig
|
|
10632
|
+
shopConfig: shopConfig,
|
|
10633
|
+
className: "!bg-bgSecondary"
|
|
9518
10634
|
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9519
10635
|
className: "text-xl"
|
|
9520
10636
|
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : _data$data$.title), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -9522,15 +10638,51 @@ var Booking1 = function Booking1(props) {
|
|
|
9522
10638
|
}, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.description))));
|
|
9523
10639
|
};
|
|
9524
10640
|
|
|
10641
|
+
var BookingForm6 = function BookingForm6(props) {
|
|
10642
|
+
var _data$data, _data$data$, _data$data2, _data$data2$;
|
|
10643
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
10644
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10645
|
+
_props$shopConfig = props.shopConfig,
|
|
10646
|
+
shopConfig = _props$shopConfig === void 0 ? {} : _props$shopConfig,
|
|
10647
|
+
_props$data = props.data,
|
|
10648
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
10649
|
+
_props$SectionTitle = props.SectionTitle,
|
|
10650
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
10651
|
+
console.log("booking data", data);
|
|
10652
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10653
|
+
className: "relative w-full px-4 xl:px-20 py-12 bg-bgSecondary"
|
|
10654
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
10655
|
+
data: data,
|
|
10656
|
+
shopConfigStyle: shopConfigStyle
|
|
10657
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10658
|
+
className: "mt-12 grid grid-cols-1 gap-6 md:grid-cols-3 md:gap-12"
|
|
10659
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10660
|
+
className: ""
|
|
10661
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
10662
|
+
src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : _data$data$.srcImage,
|
|
10663
|
+
className: "w-full h-auto"
|
|
10664
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10665
|
+
className: "mt-4 whitespace-pre-line"
|
|
10666
|
+
}, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.description)), /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
10667
|
+
shopConfigStyle: shopConfigStyle,
|
|
10668
|
+
shopConfig: shopConfig,
|
|
10669
|
+
className: "col-span-2"
|
|
10670
|
+
})));
|
|
10671
|
+
};
|
|
10672
|
+
|
|
9525
10673
|
var Banner1 = function Banner1(props) {
|
|
9526
|
-
var data = props.data
|
|
10674
|
+
var data = props.data,
|
|
10675
|
+
shopConfigStyle = props.shopConfigStyle,
|
|
10676
|
+
_props$SectionTitle = props.SectionTitle,
|
|
10677
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
9527
10678
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
9528
10679
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9529
|
-
className: "
|
|
9530
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
9531
|
-
|
|
9532
|
-
|
|
9533
|
-
|
|
10680
|
+
className: "" + SECTION_DEFAULT_CLASS
|
|
10681
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
10682
|
+
data: data,
|
|
10683
|
+
shopConfigStyle: shopConfigStyle
|
|
10684
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10685
|
+
className: "grid grid-cols-1 sm:grid-cols-3 gap-4 lg:gap-6 mt-6"
|
|
9534
10686
|
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
9535
10687
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
9536
10688
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
@@ -9541,9 +10693,44 @@ var Banner1 = function Banner1(props) {
|
|
|
9541
10693
|
})));
|
|
9542
10694
|
};
|
|
9543
10695
|
|
|
10696
|
+
var Banner3 = function Banner3(props) {
|
|
10697
|
+
var data = props.data;
|
|
10698
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
10699
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10700
|
+
className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 gap-5"
|
|
10701
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
10702
|
+
return /*#__PURE__*/React__default.createElement("img", {
|
|
10703
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
10704
|
+
className: "bg-cover bg-no-repeat h-full rounded-xl"
|
|
10705
|
+
});
|
|
10706
|
+
}));
|
|
10707
|
+
};
|
|
10708
|
+
|
|
10709
|
+
var BannerFull1 = function BannerFull1(props) {
|
|
10710
|
+
var data = props.data;
|
|
10711
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
10712
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10713
|
+
className: "" + SECTION_CLASS
|
|
10714
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
10715
|
+
src: sectionData === null || sectionData === void 0 ? void 0 : sectionData.srcImages,
|
|
10716
|
+
className: "bg-cover bg-no-repeat w-full rounded-xl"
|
|
10717
|
+
}));
|
|
10718
|
+
};
|
|
10719
|
+
|
|
10720
|
+
var BannerFull2 = function BannerFull2(props) {
|
|
10721
|
+
var _data$data;
|
|
10722
|
+
var data = props.data;
|
|
10723
|
+
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("img", {
|
|
10724
|
+
src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.srcImages,
|
|
10725
|
+
className: "w-full h-auto object-cover "
|
|
10726
|
+
}));
|
|
10727
|
+
};
|
|
10728
|
+
|
|
9544
10729
|
var Partner1 = function Partner1(props) {
|
|
9545
10730
|
var shopConfigStyle = props.shopConfigStyle,
|
|
9546
|
-
data = props.data
|
|
10731
|
+
data = props.data,
|
|
10732
|
+
_props$SectionTitle = props.SectionTitle,
|
|
10733
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
9547
10734
|
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
9548
10735
|
_shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
|
|
9549
10736
|
background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
|
|
@@ -9551,14 +10738,15 @@ var Partner1 = function Partner1(props) {
|
|
|
9551
10738
|
bgSecondary = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
|
|
9552
10739
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
9553
10740
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9554
|
-
className: "
|
|
10741
|
+
className: "" + SECTION_DEFAULT_CLASS,
|
|
9555
10742
|
style: {
|
|
9556
10743
|
background: background
|
|
9557
10744
|
}
|
|
9558
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
|
|
10745
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
10746
|
+
data: data,
|
|
10747
|
+
shopConfigStyle: shopConfigStyle
|
|
10748
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10749
|
+
className: "grid grid-cols-4 md:grid-cols-6 gap-6 mt-4 md:mt-6 p-6 rounded-xl",
|
|
9562
10750
|
style: {
|
|
9563
10751
|
background: bgSecondary
|
|
9564
10752
|
}
|
|
@@ -9574,7 +10762,12 @@ var Partner1 = function Partner1(props) {
|
|
|
9574
10762
|
|
|
9575
10763
|
var Address1 = function Address1(props) {
|
|
9576
10764
|
var shopConfigStyle = props.shopConfigStyle,
|
|
9577
|
-
|
|
10765
|
+
shopConfig = props.shopConfig,
|
|
10766
|
+
data = props.data,
|
|
10767
|
+
_props$SectionTitle = props.SectionTitle,
|
|
10768
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
10769
|
+
_props$Link = props.Link,
|
|
10770
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
9578
10771
|
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
9579
10772
|
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
|
|
9580
10773
|
textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
@@ -9582,18 +10775,42 @@ var Address1 = function Address1(props) {
|
|
|
9582
10775
|
background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
|
|
9583
10776
|
_shopConfigStyle$colo6 = _shopConfigStyle$colo.bgSecondary,
|
|
9584
10777
|
bgSecondary = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
|
|
9585
|
-
var
|
|
10778
|
+
var _useState = React.useState([]),
|
|
10779
|
+
shopAddressList = _useState[0],
|
|
10780
|
+
setShopAddressList = _useState[1];
|
|
10781
|
+
React.useEffect(function () {
|
|
10782
|
+
genShopAddress();
|
|
10783
|
+
}, [shopConfig]);
|
|
10784
|
+
var genShopAddress = function genShopAddress() {
|
|
10785
|
+
try {
|
|
10786
|
+
var addressJson = JSON.parse(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopAddress);
|
|
10787
|
+
if (addressJson) {
|
|
10788
|
+
setShopAddressList(addressJson);
|
|
10789
|
+
} else {
|
|
10790
|
+
setShopAddressList([{
|
|
10791
|
+
address: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopAddress,
|
|
10792
|
+
phone: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone
|
|
10793
|
+
}]);
|
|
10794
|
+
}
|
|
10795
|
+
} catch (e) {
|
|
10796
|
+
setShopAddressList([{
|
|
10797
|
+
address: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopAddress,
|
|
10798
|
+
phone: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone
|
|
10799
|
+
}]);
|
|
10800
|
+
}
|
|
10801
|
+
};
|
|
9586
10802
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9587
|
-
className: "
|
|
10803
|
+
className: "" + SECTION_DEFAULT_CLASS,
|
|
9588
10804
|
style: {
|
|
9589
10805
|
background: background,
|
|
9590
10806
|
color: textBody
|
|
9591
10807
|
}
|
|
9592
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
|
|
9596
|
-
|
|
10808
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
10809
|
+
data: data,
|
|
10810
|
+
shopConfigStyle: shopConfigStyle
|
|
10811
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10812
|
+
className: "grid grid-cols-2 sm:grid-cols-3 gap-4 lg:gap-6 mt-6 "
|
|
10813
|
+
}, shopAddressList && shopAddressList.length > 0 && (shopAddressList === null || shopAddressList === void 0 ? void 0 : shopAddressList.map(function (item, index) {
|
|
9597
10814
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9598
10815
|
className: "lg:leading-6 p-4 rounded-xl",
|
|
9599
10816
|
key: "fyfoy-" + index,
|
|
@@ -9602,30 +10819,39 @@ var Address1 = function Address1(props) {
|
|
|
9602
10819
|
}
|
|
9603
10820
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9604
10821
|
className: "font-semibold mb-3"
|
|
9605
|
-
}, item.city), /*#__PURE__*/React__default.createElement("div", null, item.address), /*#__PURE__*/React__default.createElement("div", {
|
|
10822
|
+
}, item !== null && item !== void 0 && item.city ? item === null || item === void 0 ? void 0 : item.city : "Hà Nội"), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.address), /*#__PURE__*/React__default.createElement("div", {
|
|
9606
10823
|
className: "sm:flex justify-between mt-3"
|
|
9607
|
-
}, /*#__PURE__*/React__default.createElement("small", null,
|
|
10824
|
+
}, /*#__PURE__*/React__default.createElement("small", null, "M\u1EDF c\u1EEDa 08:00-21:00"), /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10825
|
+
Link: Link,
|
|
9608
10826
|
href: "#"
|
|
9609
10827
|
}, /*#__PURE__*/React__default.createElement("small", {
|
|
9610
10828
|
className: "text-primary block"
|
|
9611
|
-
}, "Ch\u1EC9 \u0111\u01B0\u1EDDng ", /*#__PURE__*/React__default.createElement(FaArrowRight, {
|
|
10829
|
+
}, "Ch\u1EC9 \u0111\u01B0\u1EDDng ", /*#__PURE__*/React__default.createElement(fa.FaArrowRight, {
|
|
9612
10830
|
className: "inline-block\t text-primary"
|
|
9613
10831
|
}), " "))));
|
|
9614
|
-
})));
|
|
10832
|
+
}))));
|
|
9615
10833
|
};
|
|
9616
10834
|
|
|
9617
10835
|
var Links1 = function Links1(props) {
|
|
9618
|
-
var data = props.data
|
|
9619
|
-
|
|
10836
|
+
var data = props.data,
|
|
10837
|
+
_props$SectionTitle = props.SectionTitle,
|
|
10838
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
10839
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10840
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
9620
10841
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9621
|
-
className: "
|
|
9622
|
-
},
|
|
10842
|
+
className: "" + SECTION_DEFAULT_CLASS
|
|
10843
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
10844
|
+
data: data,
|
|
10845
|
+
shopConfigStyle: shopConfigStyle
|
|
10846
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10847
|
+
className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-6 lg:gap-8 w-full bg-background"
|
|
10848
|
+
}, [1, 2, 3].map(function (item, index) {
|
|
9623
10849
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9624
|
-
key: "qwikf-" + index
|
|
10850
|
+
key: "qwikf-" + index + " "
|
|
9625
10851
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
9626
10852
|
className: "text-lg md:text-xl lg:text-2xl font-semibold mb-4"
|
|
9627
10853
|
}, "\u0110a d\u1EA1ng thanh to\xE1n"), /*#__PURE__*/React__default.createElement("div", {
|
|
9628
|
-
className: "leading-10 flex flex-col bg-background2 p-4 rounded-xl
|
|
10854
|
+
className: "leading-10 flex flex-col bg-background2 p-4 rounded-xl bg-bgSecondary "
|
|
9629
10855
|
}, /*#__PURE__*/React__default.createElement("label", null, /*#__PURE__*/React__default.createElement(fa6.FaArrowsRotate, {
|
|
9630
10856
|
className: "inline-block\t text-primary text-2xl mb-1 me-3"
|
|
9631
10857
|
}), " Chuy\u1EC3n kho\u1EA3n"), /*#__PURE__*/React__default.createElement("label", null, /*#__PURE__*/React__default.createElement(bs.BsCurrencyDollar, {
|
|
@@ -9635,93 +10861,126 @@ var Links1 = function Links1(props) {
|
|
|
9635
10861
|
}), " Th\u1EBB ATM"), /*#__PURE__*/React__default.createElement("label", null, /*#__PURE__*/React__default.createElement(si.SiVisa, {
|
|
9636
10862
|
className: "inline-block\t text-primary text-2xl mb-1 me-3"
|
|
9637
10863
|
}), " Th\u1EBB Qu\u1ED1c t\u1EBF")));
|
|
9638
|
-
}));
|
|
10864
|
+
})));
|
|
9639
10865
|
};
|
|
9640
10866
|
|
|
9641
10867
|
var Footer1 = function Footer1(props) {
|
|
9642
|
-
var
|
|
10868
|
+
var _routes$filter;
|
|
10869
|
+
var shopConfig = props.shopConfig,
|
|
10870
|
+
shopConfigStyle = props.shopConfigStyle,
|
|
10871
|
+
_props$Link = props.Link,
|
|
10872
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10873
|
+
_props$routes = props.routes,
|
|
10874
|
+
routes = _props$routes === void 0 ? [] : _props$routes;
|
|
9643
10875
|
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
9644
10876
|
_shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
|
|
9645
10877
|
primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
|
|
9646
|
-
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
|
|
9647
|
-
textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
9648
10878
|
_shopConfigStyle$colo4 = _shopConfigStyle$colo.textButton,
|
|
9649
|
-
textButton = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4
|
|
9650
|
-
|
|
9651
|
-
|
|
9652
|
-
|
|
9653
|
-
|
|
9654
|
-
|
|
9655
|
-
|
|
9656
|
-
|
|
10879
|
+
textButton = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4;
|
|
10880
|
+
var _useState = React.useState([]),
|
|
10881
|
+
shopAddressList = _useState[0],
|
|
10882
|
+
setShopAddressList = _useState[1];
|
|
10883
|
+
React.useEffect(function () {
|
|
10884
|
+
genShopAddress();
|
|
10885
|
+
}, [shopConfig]);
|
|
10886
|
+
var genShopAddress = function genShopAddress() {
|
|
10887
|
+
try {
|
|
10888
|
+
var addressJson = JSON.parse(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopAddress);
|
|
10889
|
+
if (addressJson) {
|
|
10890
|
+
setShopAddressList(addressJson);
|
|
10891
|
+
} else {
|
|
10892
|
+
setShopAddressList([{
|
|
10893
|
+
address: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopAddress,
|
|
10894
|
+
phone: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone
|
|
10895
|
+
}]);
|
|
10896
|
+
}
|
|
10897
|
+
} catch (e) {
|
|
10898
|
+
setShopAddressList([{
|
|
10899
|
+
address: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopAddress,
|
|
10900
|
+
phone: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone
|
|
10901
|
+
}]);
|
|
9657
10902
|
}
|
|
10903
|
+
};
|
|
10904
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10905
|
+
className: SECTION_CLASS + " !md:my-0 !my-0 pt-12 bg-bgSecondary"
|
|
9658
10906
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9659
10907
|
className: "flex items-center"
|
|
9660
10908
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
9661
|
-
className: "object-cover w-
|
|
9662
|
-
src:
|
|
10909
|
+
className: "object-cover w-16 h-16",
|
|
10910
|
+
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
9663
10911
|
alt: ""
|
|
9664
10912
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
9665
10913
|
className: " text-2xl md:text-3xl font-semibold ms-2",
|
|
9666
10914
|
style: {
|
|
9667
10915
|
color: primary
|
|
9668
10916
|
}
|
|
9669
|
-
},
|
|
10917
|
+
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("div", {
|
|
9670
10918
|
className: "mt-6 grid grid-cols-1 sm:grid-cols-4 mb-12"
|
|
9671
10919
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9672
|
-
className: " col-span-2 flex flex-col
|
|
10920
|
+
className: " col-span-2 flex flex-col mb-10 leading-8 sm:mb-0 "
|
|
9673
10921
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9674
10922
|
className: "mb-3 font-semibold text-md md:text-lg"
|
|
9675
|
-
}, "Th\xF4ng tin li\xEAn h\u1EC7"),
|
|
9676
|
-
|
|
9677
|
-
|
|
9678
|
-
|
|
9679
|
-
|
|
9680
|
-
|
|
9681
|
-
|
|
9682
|
-
|
|
9683
|
-
|
|
9684
|
-
}
|
|
9685
|
-
|
|
9686
|
-
|
|
9687
|
-
|
|
9688
|
-
|
|
9689
|
-
|
|
9690
|
-
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
color: primary
|
|
9696
|
-
}
|
|
9697
|
-
}), /*#__PURE__*/React__default.createElement("span", null, "0123456789"))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9698
|
-
className: "mb-4 font-semibold text-lg"
|
|
10923
|
+
}, "Th\xF4ng tin li\xEAn h\u1EC7"), shopAddressList === null || shopAddressList === void 0 ? void 0 : shopAddressList.map(function (item, index) {
|
|
10924
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", null, "C\u01A1 s\u1EDF ", index + 1), /*#__PURE__*/React__default.createElement("div", {
|
|
10925
|
+
className: "flex gap-1 items-center"
|
|
10926
|
+
}, /*#__PURE__*/React__default.createElement(io5.IoLocationOutline, {
|
|
10927
|
+
size: 24,
|
|
10928
|
+
className: "inline-block",
|
|
10929
|
+
style: {
|
|
10930
|
+
color: primary
|
|
10931
|
+
}
|
|
10932
|
+
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.address)), /*#__PURE__*/React__default.createElement("div", {
|
|
10933
|
+
className: "flex gap-2 items-center"
|
|
10934
|
+
}, /*#__PURE__*/React__default.createElement(io5.IoCallOutline, {
|
|
10935
|
+
size: 24,
|
|
10936
|
+
className: "inline-block",
|
|
10937
|
+
style: {
|
|
10938
|
+
color: primary
|
|
10939
|
+
}
|
|
10940
|
+
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.phone)));
|
|
10941
|
+
})), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10942
|
+
className: "mb-3 font-semibold text-lg"
|
|
9699
10943
|
}, "Li\xEAn k\u1EBFt"), /*#__PURE__*/React__default.createElement("div", {
|
|
9700
10944
|
className: "leading-10 flex flex-col "
|
|
9701
|
-
},
|
|
10945
|
+
}, routes === null || routes === void 0 ? void 0 : (_routes$filter = routes.filter(function (e) {
|
|
10946
|
+
return e === null || e === void 0 ? void 0 : e.isShow;
|
|
10947
|
+
})) === null || _routes$filter === void 0 ? void 0 : _routes$filter.map(function (route, index) {
|
|
10948
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10949
|
+
Link: Link,
|
|
10950
|
+
href: route === null || route === void 0 ? void 0 : route.route
|
|
10951
|
+
}, /*#__PURE__*/React__default.createElement("div", null, route === null || route === void 0 ? void 0 : route.label));
|
|
10952
|
+
}))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9702
10953
|
className: "font-semibold mb-4 text-lg"
|
|
9703
10954
|
}, "H\u1ED7 tr\u1EE3"), /*#__PURE__*/React__default.createElement("div", {
|
|
9704
|
-
className: "flex justify-start items-center"
|
|
9705
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
10955
|
+
className: "flex justify-start items-center gap-4"
|
|
10956
|
+
}, /*#__PURE__*/React__default.createElement("a", {
|
|
10957
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#"
|
|
10958
|
+
}, /*#__PURE__*/React__default.createElement(fa.FaFacebookF, {
|
|
10959
|
+
size: 40,
|
|
10960
|
+
color: textButton,
|
|
10961
|
+
className: "p-2 rounded-lg",
|
|
9706
10962
|
style: {
|
|
9707
|
-
|
|
9708
|
-
color: primary
|
|
10963
|
+
background: primary
|
|
9709
10964
|
}
|
|
9710
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
9711
|
-
|
|
10965
|
+
})), /*#__PURE__*/React__default.createElement("a", {
|
|
10966
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#"
|
|
10967
|
+
}, /*#__PURE__*/React__default.createElement(fa.FaFacebookMessenger, {
|
|
10968
|
+
size: 40,
|
|
10969
|
+
color: textButton,
|
|
10970
|
+
className: "p-2 rounded-lg",
|
|
9712
10971
|
style: {
|
|
9713
|
-
fontSize: "40px",
|
|
9714
|
-
color: textButton,
|
|
9715
10972
|
background: primary
|
|
9716
10973
|
}
|
|
9717
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
10974
|
+
})), /*#__PURE__*/React__default.createElement("a", {
|
|
10975
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#"
|
|
10976
|
+
}, /*#__PURE__*/React__default.createElement(si.SiZalo, {
|
|
10977
|
+
size: 40,
|
|
10978
|
+
color: textButton,
|
|
9718
10979
|
className: "p-2 rounded-lg",
|
|
9719
10980
|
style: {
|
|
9720
|
-
fontSize: "40px",
|
|
9721
|
-
color: textButton,
|
|
9722
10981
|
background: primary
|
|
9723
10982
|
}
|
|
9724
|
-
})))), /*#__PURE__*/React__default.createElement("hr", null), /*#__PURE__*/React__default.createElement("div", {
|
|
10983
|
+
}))))), /*#__PURE__*/React__default.createElement("hr", null), /*#__PURE__*/React__default.createElement("div", {
|
|
9725
10984
|
className: "mt-6"
|
|
9726
10985
|
}, /*#__PURE__*/React__default.createElement("small", {
|
|
9727
10986
|
className: "me-5"
|
|
@@ -9901,6 +11160,157 @@ var RatingStar = function RatingStar(props) {
|
|
|
9901
11160
|
}, res);
|
|
9902
11161
|
};
|
|
9903
11162
|
|
|
11163
|
+
var CustomerRating1 = function CustomerRating1(props) {
|
|
11164
|
+
var _data$data;
|
|
11165
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
11166
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
11167
|
+
_props$data = props.data,
|
|
11168
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
11169
|
+
_props$SectionTitle = props.SectionTitle,
|
|
11170
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
11171
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
11172
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
11173
|
+
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
|
|
11174
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
11175
|
+
className: SECTION_DEFAULT_CLASS
|
|
11176
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
11177
|
+
data: data,
|
|
11178
|
+
shopConfigStyle: shopConfigStyle
|
|
11179
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11180
|
+
className: "mt-4 md:mt-8 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 xl:gap-6"
|
|
11181
|
+
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
|
|
11182
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11183
|
+
key: index,
|
|
11184
|
+
className: "border rounded-lg bg-bgSecondary p-3 md:p-4"
|
|
11185
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11186
|
+
className: "flex items-end gap-2"
|
|
11187
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
11188
|
+
src: item === null || item === void 0 ? void 0 : item.avatar,
|
|
11189
|
+
className: "w-20 h-20 rounded-full object-cover object-center"
|
|
11190
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11191
|
+
className: "ml-4"
|
|
11192
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11193
|
+
className: "mb-1 font-medium"
|
|
11194
|
+
}, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement(RatingStar, {
|
|
11195
|
+
star: (item === null || item === void 0 ? void 0 : item.rate) || 5
|
|
11196
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
11197
|
+
className: "mt-4"
|
|
11198
|
+
}, "\"", item === null || item === void 0 ? void 0 : item.content, "\""));
|
|
11199
|
+
}))), /*#__PURE__*/React__default.createElement(Dash, {
|
|
11200
|
+
color: secondary
|
|
11201
|
+
}));
|
|
11202
|
+
};
|
|
11203
|
+
|
|
11204
|
+
var CustomerRating5 = function CustomerRating5(props) {
|
|
11205
|
+
var _props$data = props.data,
|
|
11206
|
+
data = _props$data === void 0 ? {} : _props$data;
|
|
11207
|
+
var _useState = React.useState(0),
|
|
11208
|
+
currentIndex = _useState[0],
|
|
11209
|
+
setCurrentIndex = _useState[1];
|
|
11210
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
11211
|
+
var _useState2 = React.useState(0),
|
|
11212
|
+
startX = _useState2[0],
|
|
11213
|
+
setStartX = _useState2[1];
|
|
11214
|
+
var _useState3 = React.useState(0),
|
|
11215
|
+
endX = _useState3[0],
|
|
11216
|
+
setEndX = _useState3[1];
|
|
11217
|
+
var sliderRef = React.useRef();
|
|
11218
|
+
var handleTouchStart = function handleTouchStart(e) {
|
|
11219
|
+
var touchStart = e.touches[0].clientX;
|
|
11220
|
+
setStartX(touchStart);
|
|
11221
|
+
};
|
|
11222
|
+
var handleTouchMove = function handleTouchMove(e) {
|
|
11223
|
+
var touchMove = e.touches[0].clientX;
|
|
11224
|
+
setEndX(touchMove);
|
|
11225
|
+
};
|
|
11226
|
+
var handleTouchEnd = function handleTouchEnd() {
|
|
11227
|
+
var diff = startX - endX;
|
|
11228
|
+
var threshold = sliderRef.current.offsetWidth / 3;
|
|
11229
|
+
if (diff > threshold && currentIndex < sectionData.length - 1) {
|
|
11230
|
+
setCurrentIndex(currentIndex + 1);
|
|
11231
|
+
} else if (diff < -threshold && currentIndex > 0) {
|
|
11232
|
+
setCurrentIndex(currentIndex - 1);
|
|
11233
|
+
}
|
|
11234
|
+
};
|
|
11235
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11236
|
+
className: SECTION_CLASS + " mx-0 md:mx-4 xl:mx-20 rounded-xl relative"
|
|
11237
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11238
|
+
className: "absolute mt-16 inset-0 bg-bgSecondary [clip-path:polygon(0%_0%,_100%_30%,_100%_100%,_0%_100%)] z-0 rounded-3xl"
|
|
11239
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11240
|
+
className: "w-full relative z-10 border border-textHeading rounded-3xl flex overflow-hidden",
|
|
11241
|
+
ref: sliderRef,
|
|
11242
|
+
onTouchStart: handleTouchStart,
|
|
11243
|
+
onTouchMove: handleTouchMove,
|
|
11244
|
+
onTouchEnd: handleTouchEnd
|
|
11245
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11246
|
+
className: "flex justify-start transition-transform duration-300",
|
|
11247
|
+
style: {
|
|
11248
|
+
transform: "translateX(-" + currentIndex * 100 + "%)"
|
|
11249
|
+
}
|
|
11250
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
11251
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11252
|
+
className: "flex flex-col px-2 py-2 md:px-6 lg:px-12 md:py-6 items-center md:flex-row gap-6 md:gap-12 min-w-full overflow-hidden",
|
|
11253
|
+
key: "lpky-" + index
|
|
11254
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
11255
|
+
src: item === null || item === void 0 ? void 0 : item.avatar,
|
|
11256
|
+
className: "w-80 h-96 object-cover rounded-3xl"
|
|
11257
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11258
|
+
className: "flex flex-col items-center md:items-start gap-6 justify-center"
|
|
11259
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11260
|
+
className: "text-4xl font-semibold"
|
|
11261
|
+
}, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.content), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description)));
|
|
11262
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
11263
|
+
className: "absolute bottom-2 md:bottom-20 lg:bottom-[30%] left-1/2 md:left-2/3 xl:left-1/2 transform -translate-x-1/2 flex gap-2"
|
|
11264
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (_, index) {
|
|
11265
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11266
|
+
key: "dot-" + index,
|
|
11267
|
+
onClick: function onClick() {
|
|
11268
|
+
setCurrentIndex(index);
|
|
11269
|
+
},
|
|
11270
|
+
className: (currentIndex === index ? "w-6 bg-primary" : "w-3 bg-gray4") + " h-3 rounded-full hover:opacity-80 cursor-pointer "
|
|
11271
|
+
});
|
|
11272
|
+
}))));
|
|
11273
|
+
};
|
|
11274
|
+
|
|
11275
|
+
var CustomerRating6 = function CustomerRating6(props) {
|
|
11276
|
+
var _data$data;
|
|
11277
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
11278
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
11279
|
+
_props$data = props.data,
|
|
11280
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
11281
|
+
_props$SectionTitle = props.SectionTitle,
|
|
11282
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
11283
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
11284
|
+
className: SECTION_CLASS + " !my-0 py-12 bg-bgSecondary"
|
|
11285
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
11286
|
+
data: data,
|
|
11287
|
+
shopConfigStyle: shopConfigStyle
|
|
11288
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11289
|
+
className: "mt-12 grid grid-cols-1 md:grid-cols-2 gap-6"
|
|
11290
|
+
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
|
|
11291
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11292
|
+
key: index,
|
|
11293
|
+
className: "relative bg-primary rounded-lg text-textButton px-6 py-4"
|
|
11294
|
+
}, /*#__PURE__*/React__default.createElement(io.IoMdQuote, {
|
|
11295
|
+
size: 30,
|
|
11296
|
+
className: "absolute text-textButton top-[-15px] right-8"
|
|
11297
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11298
|
+
className: "flex items-end gap-2"
|
|
11299
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
11300
|
+
src: item === null || item === void 0 ? void 0 : item.avatar,
|
|
11301
|
+
className: "w-24 h-24 rounded-full object-cover"
|
|
11302
|
+
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
11303
|
+
className: "text-xl md:text-2xl mt-2"
|
|
11304
|
+
}, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
|
|
11305
|
+
className: "text-gray3"
|
|
11306
|
+
}, item === null || item === void 0 ? void 0 : item.description))), /*#__PURE__*/React__default.createElement("hr", {
|
|
11307
|
+
className: "mt-4"
|
|
11308
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11309
|
+
className: "mt-2 md:text-lg"
|
|
11310
|
+
}, item === null || item === void 0 ? void 0 : item.content));
|
|
11311
|
+
}))));
|
|
11312
|
+
};
|
|
11313
|
+
|
|
9904
11314
|
var CustomerRating10 = function CustomerRating10(props) {
|
|
9905
11315
|
var _data$data;
|
|
9906
11316
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
@@ -10023,7 +11433,25 @@ var PageTitle1 = function PageTitle1(props) {
|
|
|
10023
11433
|
className: "relative w-full p-20 z-10 flex flex-col gap-6 items-center justify-center"
|
|
10024
11434
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10025
11435
|
className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
10026
|
-
}, route === null || route === void 0 ? void 0 : route.label)));
|
|
11436
|
+
}, sectionData !== null && sectionData !== void 0 && sectionData.sectionTitle ? sectionData === null || sectionData === void 0 ? void 0 : sectionData.sectionTitle : route === null || route === void 0 ? void 0 : route.label)));
|
|
11437
|
+
};
|
|
11438
|
+
|
|
11439
|
+
var About1 = function About1(props) {
|
|
11440
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11441
|
+
className: SECTION_CLASS + " flex flex-col gap-4"
|
|
11442
|
+
}, /*#__PURE__*/React__default.createElement("div", null, "Tr\xE1i c\xE2y s\u1EA1ch - an to\xE0n cho s\u1EE9c kho\u1EBB ng\u01B0\u1EDDi ti\xEAu d\xF9ng. C\u1EEDa h\xE0ng ORGANIC FOOD c\u1EE7a ch\xFAng t\xF4i t\u1EEBng b\u01B0\u1EDBc \u0111i v\xE0o th\u1ECB tr\u01B0\u1EDDng v\xE0 ni\u1EC1m tin c\u1EE7a kh\xE1ch h\xE0ng. Ho\u1EA1t \u0111\u1ED9ng v\xE0o th\xE1ng 5/2020, ORGANIC FOOD \u0111\xE3 tr\u1EDF th\xE0nh c\xE1i t\xEAn quen thu\u1ED9c trong l\u0129nh v\u1EF1c cung c\u1EA5p tr\xE1i c\xE2y s\u1EA1ch, an to\xE0n, cam k\u1EBFt ch\xEDn t\u1EF1 nhi\xEAn 100% v\xE0 h\u01B0\u1EDBng \u0111\u1EBFn s\u1EE9c kho\u1EBB ng\u01B0\u1EDDi ti\xEAu d\xF9ng qua 3 ti\xEAu ch\xED:"), /*#__PURE__*/React__default.createElement("div", {
|
|
11443
|
+
className: "font-semibold"
|
|
11444
|
+
}, "T\u1EA7m Nh\xECn"), /*#__PURE__*/React__default.createElement("div", null, "S\u1EA3n ph\u1EA9m t\u01B0\u0300 ORGANIC FOOD se\u0303 tr\u1EDF tha\u0300nh thu\u031Bo\u031Bng hi\u1EB9\u0302u quen thu\u1ECD\u0302c va\u0300 h\u01B0\u1EDBng \u0111\u1EBFn ch\u1EA5t l\u01B0\u1EE3ng t\u1ED1t nh\u1EA5t."), /*#__PURE__*/React__default.createElement("div", {
|
|
11445
|
+
className: "font-semibold"
|
|
11446
|
+
}, "S\u1EE9 m\u1EC7nh"), /*#__PURE__*/React__default.createElement("li", {
|
|
11447
|
+
className: "ps-4"
|
|
11448
|
+
}, " \u0110\u1ECD\u0302i ngu\u0303 ba\u0301n ha\u0300ng s\u0103\u0303n sa\u0300ng l\u0103\u0301ng nghe va\u0300 t\u1EA1\u0302n ta\u0302m nhi\u1EB9\u0302t huy\xEA\u0301t trong co\u0302ng vi\u1EB9\u0302c."), /*#__PURE__*/React__default.createElement("li", {
|
|
11449
|
+
className: "ps-4"
|
|
11450
|
+
}, " Sa\u0309n ph\xE2\u0309m th\u01B0\u0301c u\xF4\u0301ng \u0111a da\u0323ng, \u0111a\u0309m ba\u0309o t\xF4\u0301t s\u01B0\u0301c kho\u0309e va\u0300 \u0111a\u0301p \u01B0\u0301ng \u0111u\u031B\u01A1\u0323c mong \u0111\u01A1\u0323i cu\u0309a kha\u0301ch ha\u0300ng."), /*#__PURE__*/React__default.createElement("li", {
|
|
11451
|
+
className: "ps-4"
|
|
11452
|
+
}, " Tr\xE1i c\xE2y \u0111a d\u1EA1ng, cam k\u1EBFt h\xE0ng s\u1EA1ch \u0111\u1EA3m b\u1EA3o ch\u1EA5t l\u01B0\u1EE3ng t\u1ED1t nh\u1EA5t v\xE0 an to\xE0n tuy\u1EC7t \u0111\u1ED1i cho ng\u01B0\u1EDDi ti\xEAu d\xF9ng"), /*#__PURE__*/React__default.createElement("div", {
|
|
11453
|
+
className: "font-semibold"
|
|
11454
|
+
}, "Gi\xE1 Tr\u1ECB C\u1ED1t L\xF5i"), /*#__PURE__*/React__default.createElement("div", null, "ORGANIC FOOD s\u1EBD lu\xF4n l\xE0 ng\u01B0\u1EDDi b\u1EA1n tin c\u1EADy nh\u1EA5t c\xF9ng kh\xE1ch h\xE0ng, tr\xE1i c\xE2y s\u1EA1ch lu\xF4n \u0111\u1EA3m b\u1EA3o ch\u1EA5t l\u01B0\u1EE3ng v\xE0 mang l\u1EA1i ngu\u1ED3n dinh d\u01B0\u1EE1ng c\u0169ng nh\u01B0 s\u1EF1 an to\xE0n cho kh\xE1ch h\xE0ng, g\xF3p ph\u1EA7n mang \u0111\u1EBFn cu\u1ED9c s\u1ED1ng xanh kho\u1EBB m\u1EA1nh cho m\u1ECDi nh\xE0."));
|
|
10027
11455
|
};
|
|
10028
11456
|
|
|
10029
11457
|
var About5 = function About5(props) {
|
|
@@ -10093,7 +11521,9 @@ var Breadcrumb1 = function Breadcrumb1(props) {
|
|
|
10093
11521
|
var shopConfigStyle = props.shopConfigStyle,
|
|
10094
11522
|
route = props.route,
|
|
10095
11523
|
_props$routes = props.routes,
|
|
10096
|
-
routes = _props$routes === void 0 ? [] : _props$routes
|
|
11524
|
+
routes = _props$routes === void 0 ? [] : _props$routes,
|
|
11525
|
+
_props$Link = props.Link,
|
|
11526
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
10097
11527
|
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
10098
11528
|
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textHeading,
|
|
10099
11529
|
textHeading = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
|
|
@@ -10104,18 +11534,19 @@ var Breadcrumb1 = function Breadcrumb1(props) {
|
|
|
10104
11534
|
getItems();
|
|
10105
11535
|
}, [route]);
|
|
10106
11536
|
var getItems = function getItems() {
|
|
10107
|
-
var _route$route, _route$route$split, _route$route$split$fi;
|
|
11537
|
+
var _route$route, _route$route$split, _route$route$split$fi, _items, _items2;
|
|
10108
11538
|
var items = route === null || route === void 0 ? void 0 : (_route$route = route.route) === null || _route$route === void 0 ? void 0 : (_route$route$split = _route$route.split("/")) === null || _route$route$split === void 0 ? void 0 : (_route$route$split$fi = _route$route$split.filter(function (e) {
|
|
10109
11539
|
return e === null || e === void 0 ? void 0 : e.length;
|
|
10110
11540
|
})) === null || _route$route$split$fi === void 0 ? void 0 : _route$route$split$fi.slice(0, 2);
|
|
10111
|
-
items = items.map(function (e) {
|
|
11541
|
+
items = (_items = items) === null || _items === void 0 ? void 0 : _items.map(function (e) {
|
|
11542
|
+
if (e === "product") e = "products";else if (e === "service") e = "services";
|
|
10112
11543
|
return (routes === null || routes === void 0 ? void 0 : routes.find(function (r) {
|
|
10113
11544
|
return (r === null || r === void 0 ? void 0 : r.name) === e;
|
|
10114
11545
|
})) || {
|
|
10115
11546
|
label: e
|
|
10116
11547
|
};
|
|
10117
11548
|
});
|
|
10118
|
-
items.unshift({
|
|
11549
|
+
(_items2 = items) === null || _items2 === void 0 ? void 0 : _items2.unshift({
|
|
10119
11550
|
name: "home",
|
|
10120
11551
|
label: "Trang chủ",
|
|
10121
11552
|
route: "/"
|
|
@@ -10130,7 +11561,8 @@ var Breadcrumb1 = function Breadcrumb1(props) {
|
|
|
10130
11561
|
className: "flex gap-2"
|
|
10131
11562
|
}, index ? /*#__PURE__*/React__default.createElement("div", {
|
|
10132
11563
|
className: "text-gray4"
|
|
10133
|
-
}, "/") : null, item !== null && item !== void 0 && item.route ? /*#__PURE__*/React__default.createElement(
|
|
11564
|
+
}, "/") : null, item !== null && item !== void 0 && item.route ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
11565
|
+
Link: Link,
|
|
10134
11566
|
href: item === null || item === void 0 ? void 0 : item.route,
|
|
10135
11567
|
style: {
|
|
10136
11568
|
color: textHeading
|
|
@@ -10269,6 +11701,8 @@ var TextArea = React.forwardRef(function (props, ref) {
|
|
|
10269
11701
|
className = _props$className === void 0 ? "" : _props$className,
|
|
10270
11702
|
_props$defaultValue = props.defaultValue,
|
|
10271
11703
|
defaultValue = _props$defaultValue === void 0 ? "" : _props$defaultValue,
|
|
11704
|
+
_props$labelClassName = props.labelClassName,
|
|
11705
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
10272
11706
|
_props$onChange = props.onChange,
|
|
10273
11707
|
onChange = _props$onChange === void 0 ? function () {} : _props$onChange;
|
|
10274
11708
|
var _useState = React.useState(defaultValue),
|
|
@@ -10329,11 +11763,11 @@ var TextArea = React.forwardRef(function (props, ref) {
|
|
|
10329
11763
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10330
11764
|
className: "" + className
|
|
10331
11765
|
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
10332
|
-
className: "mb-1"
|
|
11766
|
+
className: "mb-1 " + labelClassName
|
|
10333
11767
|
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement("textarea", {
|
|
10334
11768
|
name: "",
|
|
10335
11769
|
id: "",
|
|
10336
|
-
className:
|
|
11770
|
+
className: "focus:outline-none focus:ring-0 " + textareaClassName,
|
|
10337
11771
|
placeholder: placeholder,
|
|
10338
11772
|
value: value,
|
|
10339
11773
|
onChange: function onChange(e) {
|
|
@@ -10969,15 +12403,328 @@ var CartItem = function CartItem(props) {
|
|
|
10969
12403
|
}, /*#__PURE__*/React__default.createElement(ri.RiDeleteBin7Line, null), /*#__PURE__*/React__default.createElement("span", null, "X\xF3a"))));
|
|
10970
12404
|
};
|
|
10971
12405
|
|
|
12406
|
+
var SearchProduct1 = function SearchProduct1(props) {
|
|
12407
|
+
var _props$Link = props.Link,
|
|
12408
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
12409
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
12410
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
12411
|
+
data = props.data;
|
|
12412
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
12413
|
+
_shopConfigStyle$colo6 = _shopConfigStyle$colo.bgSecondary,
|
|
12414
|
+
bgSecondary = _shopConfigStyle$colo6 === void 0 ? "#fffff" : _shopConfigStyle$colo6;
|
|
12415
|
+
var _useState = React.useState([]),
|
|
12416
|
+
listProducts = _useState[0],
|
|
12417
|
+
setListProducts = _useState[1];
|
|
12418
|
+
var _ProductController = ProductController(_extends({}, props)),
|
|
12419
|
+
getProductListSearch = _ProductController.getProductListSearch;
|
|
12420
|
+
var handleSearch = function handleSearch(productName) {
|
|
12421
|
+
try {
|
|
12422
|
+
var _temp = function () {
|
|
12423
|
+
if (productName) {
|
|
12424
|
+
return Promise.resolve(getProductListSearch({
|
|
12425
|
+
productName: productName
|
|
12426
|
+
})).then(function (data) {
|
|
12427
|
+
setListProducts(data);
|
|
12428
|
+
});
|
|
12429
|
+
} else {
|
|
12430
|
+
setListProducts([]);
|
|
12431
|
+
}
|
|
12432
|
+
}();
|
|
12433
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
12434
|
+
} catch (e) {
|
|
12435
|
+
return Promise.reject(e);
|
|
12436
|
+
}
|
|
12437
|
+
};
|
|
12438
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
12439
|
+
className: "flex flex-col gap-2 px-6 md:w-[720px] rounded-lg mx-auto mt-12 "
|
|
12440
|
+
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
12441
|
+
className: "flex items-center w-full h-9 md:h-14",
|
|
12442
|
+
style: {
|
|
12443
|
+
backgroundColor: bgSecondary
|
|
12444
|
+
},
|
|
12445
|
+
inputClassName: "w-full h-full p-2 text-lg",
|
|
12446
|
+
placeholder: (data === null || data === void 0 ? void 0 : data.sectionTitle) || "Tìm kiếm sản phẩm",
|
|
12447
|
+
onChange: handleSearch,
|
|
12448
|
+
icons: /*#__PURE__*/React__default.createElement("div", {
|
|
12449
|
+
className: "px-2"
|
|
12450
|
+
}, /*#__PURE__*/React__default.createElement(fi.FiSearch, {
|
|
12451
|
+
style: {
|
|
12452
|
+
color: "#828282"
|
|
12453
|
+
}
|
|
12454
|
+
}))
|
|
12455
|
+
}), (listProducts === null || listProducts === void 0 ? void 0 : listProducts.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
12456
|
+
className: "max-h-64 overflow-y-auto flex flex-col gap-2 pr-3"
|
|
12457
|
+
}, listProducts === null || listProducts === void 0 ? void 0 : listProducts.map(function (item) {
|
|
12458
|
+
var _item$productInfo, _item$productInfo2;
|
|
12459
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12460
|
+
Link: Link,
|
|
12461
|
+
href: getLinkProductDetail(item === null || item === void 0 ? void 0 : item.productInfo),
|
|
12462
|
+
className: "flex gap-2 text-Body"
|
|
12463
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
12464
|
+
product: item,
|
|
12465
|
+
className: "h-20 max-w-20 rounded-lg border"
|
|
12466
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12467
|
+
className: "flex flex-col px-1 gap-2 border-b w-full"
|
|
12468
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12469
|
+
className: "mt-1 text-lg font-medium\t"
|
|
12470
|
+
}, item === null || item === void 0 ? void 0 : (_item$productInfo = item.productInfo) === null || _item$productInfo === void 0 ? void 0 : _item$productInfo.productName), /*#__PURE__*/React__default.createElement("div", {
|
|
12471
|
+
className: " text-lg font-medium\t"
|
|
12472
|
+
}, formatCurrency(item === null || item === void 0 ? void 0 : (_item$productInfo2 = item.productInfo) === null || _item$productInfo2 === void 0 ? void 0 : _item$productInfo2.price))));
|
|
12473
|
+
})) : /*#__PURE__*/React__default.createElement("div", {
|
|
12474
|
+
className: "text-center"
|
|
12475
|
+
}, data === null || data === void 0 ? void 0 : data.sectionDescription));
|
|
12476
|
+
};
|
|
12477
|
+
|
|
12478
|
+
var SearchBar2 = function SearchBar2(props) {
|
|
12479
|
+
var _props$Link = props.Link,
|
|
12480
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
12481
|
+
data = props.data;
|
|
12482
|
+
var _useState = React.useState([]),
|
|
12483
|
+
products = _useState[0],
|
|
12484
|
+
setProducts = _useState[1];
|
|
12485
|
+
var _ProductController = ProductController(_extends({}, props)),
|
|
12486
|
+
getProductListSearch = _ProductController.getProductListSearch;
|
|
12487
|
+
var handleSearch = function handleSearch(productName) {
|
|
12488
|
+
if (productName === void 0) {
|
|
12489
|
+
productName = "";
|
|
12490
|
+
}
|
|
12491
|
+
try {
|
|
12492
|
+
var _temp = function () {
|
|
12493
|
+
if (productName === "") setProducts([]);else {
|
|
12494
|
+
return Promise.resolve(getProductListSearch({
|
|
12495
|
+
productName: productName
|
|
12496
|
+
})).then(function (productList) {
|
|
12497
|
+
setProducts(productList);
|
|
12498
|
+
});
|
|
12499
|
+
}
|
|
12500
|
+
}();
|
|
12501
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
12502
|
+
} catch (e) {
|
|
12503
|
+
return Promise.reject(e);
|
|
12504
|
+
}
|
|
12505
|
+
};
|
|
12506
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
12507
|
+
className: "w-[100vw] md:w-[50vw] py-6 mx-auto px-6 flex flex-col gap-4"
|
|
12508
|
+
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
12509
|
+
icons: /*#__PURE__*/React__default.createElement(io5.IoSearchOutline, {
|
|
12510
|
+
className: "text-gray3"
|
|
12511
|
+
}),
|
|
12512
|
+
className: "w-full",
|
|
12513
|
+
inputClassName: "w-full",
|
|
12514
|
+
placeholder: data !== null && data !== void 0 && data.sectionTitle ? data === null || data === void 0 ? void 0 : data.sectionTitle : "Tìm kiếm sản phẩm",
|
|
12515
|
+
onChange: handleSearch
|
|
12516
|
+
}), (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
12517
|
+
className: "max-h-64 overflow-y-auto flex flex-col gap-2"
|
|
12518
|
+
}, products === null || products === void 0 ? void 0 : products.map(function (item, index) {
|
|
12519
|
+
var _item$productInfo;
|
|
12520
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12521
|
+
Link: Link,
|
|
12522
|
+
href: getLinkProductDetail(item === null || item === void 0 ? void 0 : item.productInfo),
|
|
12523
|
+
key: "jkgr-" + index,
|
|
12524
|
+
className: "flex gap-2 text-Body"
|
|
12525
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
12526
|
+
product: item,
|
|
12527
|
+
className: "h-20 max-w-20 rounded-lg border"
|
|
12528
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12529
|
+
className: "flex flex-col px-1 gap-2 border-b w-full"
|
|
12530
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12531
|
+
className: "mt-1 text-lg font-medium\t"
|
|
12532
|
+
}, item === null || item === void 0 ? void 0 : (_item$productInfo = item.productInfo) === null || _item$productInfo === void 0 ? void 0 : _item$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
12533
|
+
product: item === null || item === void 0 ? void 0 : item.productInfo
|
|
12534
|
+
})));
|
|
12535
|
+
})) : /*#__PURE__*/React__default.createElement("div", {
|
|
12536
|
+
className: "mx-auto"
|
|
12537
|
+
}, data === null || data === void 0 ? void 0 : data.sectionDescription));
|
|
12538
|
+
};
|
|
12539
|
+
|
|
12540
|
+
var SearchBar5 = function SearchBar5(props) {
|
|
12541
|
+
var _data$data, _data$data2, _data$data3;
|
|
12542
|
+
var _props$Link = props.Link,
|
|
12543
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
12544
|
+
shopConfigStyle = props.shopConfigStyle,
|
|
12545
|
+
data = props.data;
|
|
12546
|
+
var _useState = React.useState(""),
|
|
12547
|
+
value = _useState[0],
|
|
12548
|
+
setValue = _useState[1];
|
|
12549
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
12550
|
+
className: SECTION_CLASS + " md:mt-6"
|
|
12551
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12552
|
+
className: " w-full flex flex-col justify-center px-6 gap-2 md:gap-4 items-center h-32 md:h-48 lg:h-56 rounded-xl md:rounded-3xl ",
|
|
12553
|
+
style: {
|
|
12554
|
+
background: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.srcImage) + ")",
|
|
12555
|
+
backgroundPosition: "center",
|
|
12556
|
+
backgroundSize: "cover"
|
|
12557
|
+
}
|
|
12558
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12559
|
+
className: "text-xl font-semibold md:text-3xl lg:text-4xl text-textButton text-center"
|
|
12560
|
+
}, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : _data$data2.title), /*#__PURE__*/React__default.createElement("div", null, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : _data$data3.description), /*#__PURE__*/React__default.createElement(Input, {
|
|
12561
|
+
onChange: setValue,
|
|
12562
|
+
icons: /*#__PURE__*/React__default.createElement(io5.IoSearchOutline, {
|
|
12563
|
+
className: "text-gray3 text-xl md:text-2xl"
|
|
12564
|
+
}),
|
|
12565
|
+
className: "w-full bg-bgSecondary w-full md:w-[50vw] lg:w-[35vw] mb-2 md:h-12",
|
|
12566
|
+
style: {
|
|
12567
|
+
borderRadius: "32px"
|
|
12568
|
+
},
|
|
12569
|
+
inputClassName: "w-full",
|
|
12570
|
+
placeholder: data !== null && data !== void 0 && data.sectionTitle ? data === null || data === void 0 ? void 0 : data.sectionTitle : "Tìm kiếm sản phẩm",
|
|
12571
|
+
suffix: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, value && (value === null || value === void 0 ? void 0 : value.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12572
|
+
Link: Link,
|
|
12573
|
+
href: genLinkSearch(value)
|
|
12574
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
12575
|
+
label: "T\xECm ki\u1EBFm",
|
|
12576
|
+
className: "whitespace-nowrap h-full ",
|
|
12577
|
+
shopConfigStyle: shopConfigStyle
|
|
12578
|
+
})) : /*#__PURE__*/React__default.createElement(Button, {
|
|
12579
|
+
label: "T\xECm ki\u1EBFm",
|
|
12580
|
+
className: "whitespace-nowrap ",
|
|
12581
|
+
shopConfigStyle: shopConfigStyle
|
|
12582
|
+
}))
|
|
12583
|
+
})));
|
|
12584
|
+
};
|
|
12585
|
+
|
|
12586
|
+
var SearchBar6 = function SearchBar6(props) {
|
|
12587
|
+
var _data$data, _data$data2, _data$data3;
|
|
12588
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
12589
|
+
_props$Link = props.Link,
|
|
12590
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
12591
|
+
data = props.data;
|
|
12592
|
+
var _useState = React.useState(""),
|
|
12593
|
+
value = _useState[0],
|
|
12594
|
+
setValue = _useState[1];
|
|
12595
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
12596
|
+
className: "w-full flex flex-col justify-center px-3 md:px-6 gap-2 lg:gap-3 items-center h-32 lg:h-44 ",
|
|
12597
|
+
style: {
|
|
12598
|
+
background: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.srcImage) + ")",
|
|
12599
|
+
backgroundPosition: "center",
|
|
12600
|
+
backgroundSize: "cover"
|
|
12601
|
+
}
|
|
12602
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12603
|
+
className: "text-lg font-semibold text-textBody md:text-2xl lg:text-3xl text-center"
|
|
12604
|
+
}, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : _data$data2.title), /*#__PURE__*/React__default.createElement("div", null, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : _data$data3.description), /*#__PURE__*/React__default.createElement("div", {
|
|
12605
|
+
className: "flex gap-2 md:gap-4 lg:gap-6 mb-2 md:mb-0"
|
|
12606
|
+
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
12607
|
+
icons: /*#__PURE__*/React__default.createElement(io5.IoSearchOutline, {
|
|
12608
|
+
className: "text-gray3"
|
|
12609
|
+
}),
|
|
12610
|
+
className: "w-full h-full md:h-12 w-full md:w-[70vw] bg-background lg:w-[50vw]",
|
|
12611
|
+
inputClassName: "w-full",
|
|
12612
|
+
placeholder: data !== null && data !== void 0 && data.sectionTitle ? data === null || data === void 0 ? void 0 : data.sectionTitle : "Tìm kiếm sản phẩm",
|
|
12613
|
+
onChange: setValue
|
|
12614
|
+
}), /*#__PURE__*/React__default.createElement(React__default.Fragment, null, value && (value === null || value === void 0 ? void 0 : value.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12615
|
+
Link: Link,
|
|
12616
|
+
href: genLinkSearch(value)
|
|
12617
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
12618
|
+
label: "T\xECm ki\u1EBFm",
|
|
12619
|
+
className: "whitespace-nowrap h-full",
|
|
12620
|
+
shopConfigStyle: shopConfigStyle
|
|
12621
|
+
})) : /*#__PURE__*/React__default.createElement(Button, {
|
|
12622
|
+
label: "T\xECm ki\u1EBFm",
|
|
12623
|
+
className: "whitespace-nowrap ",
|
|
12624
|
+
shopConfigStyle: shopConfigStyle
|
|
12625
|
+
}))));
|
|
12626
|
+
};
|
|
12627
|
+
|
|
12628
|
+
var ShopHighlights2 = function ShopHighlights2(props) {
|
|
12629
|
+
var data = props.data;
|
|
12630
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
12631
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
12632
|
+
className: SECTION_CLASS + " my-0 md:my-0 py-6 grid grid-cols-2 md:grid-cols-4 gap-4 lg:gap-6"
|
|
12633
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
12634
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
12635
|
+
className: "flex flex-col items-center text-center lg:px-3 gap-3",
|
|
12636
|
+
key: "kdf-" + index
|
|
12637
|
+
}, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
12638
|
+
className: "w-12 text-primary w-16 h-16 rounded-full",
|
|
12639
|
+
dangerouslySetInnerHTML: {
|
|
12640
|
+
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
12641
|
+
}
|
|
12642
|
+
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
12643
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
12644
|
+
alt: "logo",
|
|
12645
|
+
className: "w-16 h-16 p-3 rounded-full bg-primary"
|
|
12646
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12647
|
+
className: "font-medium text-lg"
|
|
12648
|
+
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description));
|
|
12649
|
+
}));
|
|
12650
|
+
};
|
|
12651
|
+
|
|
12652
|
+
var ShopHighlights5 = function ShopHighlights5(props) {
|
|
12653
|
+
var data = props.data;
|
|
12654
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
12655
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
12656
|
+
className: SECTION_CLASS + " grid md:grid-cols-3 py-6 gap-4 lg:gap-6 bg-bgSecondary"
|
|
12657
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
12658
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
12659
|
+
className: "flex flex-col items-center text-center md:px-3 lg:px-6 gap-3",
|
|
12660
|
+
key: "kdf-" + index
|
|
12661
|
+
}, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
12662
|
+
className: "w-16 h-16 rounded-full text-primary ",
|
|
12663
|
+
dangerouslySetInnerHTML: {
|
|
12664
|
+
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
12665
|
+
}
|
|
12666
|
+
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
12667
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
12668
|
+
alt: "logo",
|
|
12669
|
+
className: "w-16 h-16 rounded-full bg-primary"
|
|
12670
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12671
|
+
className: "font-medium text-xl text-textHeading pt-2 border-t border-textHeading"
|
|
12672
|
+
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description));
|
|
12673
|
+
}));
|
|
12674
|
+
};
|
|
12675
|
+
|
|
12676
|
+
var ShopHighlights6 = function ShopHighlights6(props) {
|
|
12677
|
+
var data = props.data,
|
|
12678
|
+
_props$Link = props.Link,
|
|
12679
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
12680
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
12681
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
12682
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
12683
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
12684
|
+
className: SECTION_CLASS + " grid md:grid-cols-3 py-6 gap-8 md:gap-4 lg:gap-6"
|
|
12685
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
12686
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
12687
|
+
className: "flex flex-col items-center text-center md:px-3 lg:px-6 gap-3",
|
|
12688
|
+
key: "kdf-" + index
|
|
12689
|
+
}, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
12690
|
+
className: "text-primary w-16 h-16 rounded-full",
|
|
12691
|
+
dangerouslySetInnerHTML: {
|
|
12692
|
+
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
12693
|
+
}
|
|
12694
|
+
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
12695
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
12696
|
+
alt: "logo",
|
|
12697
|
+
className: "w-16 h-16 rounded-full bg-primary"
|
|
12698
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12699
|
+
className: " w-44 h-0.5 rounded-full bg-primary"
|
|
12700
|
+
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description), /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12701
|
+
Link: Link,
|
|
12702
|
+
href: (item === null || item === void 0 ? void 0 : item.link) || (item === null || item === void 0 ? void 0 : item.route)
|
|
12703
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
12704
|
+
shopConfigStyle: shopConfigStyle,
|
|
12705
|
+
label: item === null || item === void 0 ? void 0 : item.title
|
|
12706
|
+
})));
|
|
12707
|
+
}));
|
|
12708
|
+
};
|
|
12709
|
+
|
|
12710
|
+
exports.About1 = About1;
|
|
10972
12711
|
exports.About5 = About5;
|
|
10973
12712
|
exports.Address1 = Address1;
|
|
10974
12713
|
exports.Banner1 = Banner1;
|
|
12714
|
+
exports.Banner3 = Banner3;
|
|
12715
|
+
exports.BannerFull1 = BannerFull1;
|
|
12716
|
+
exports.BannerFull2 = BannerFull2;
|
|
10975
12717
|
exports.Booking1 = Booking1;
|
|
12718
|
+
exports.BookingForm6 = BookingForm6;
|
|
10976
12719
|
exports.Breadcrumb1 = Breadcrumb1;
|
|
10977
12720
|
exports.Button = Button;
|
|
10978
12721
|
exports.Carts1 = Carts1;
|
|
10979
12722
|
exports.Contact1 = Contact1;
|
|
12723
|
+
exports.CustomerRating1 = CustomerRating1;
|
|
10980
12724
|
exports.CustomerRating10 = CustomerRating10;
|
|
12725
|
+
exports.CustomerRating5 = CustomerRating5;
|
|
12726
|
+
exports.CustomerRating6 = CustomerRating6;
|
|
12727
|
+
exports.DateTimePicker = DateTimePicker;
|
|
10981
12728
|
exports.Employees1 = Employees1;
|
|
10982
12729
|
exports.Features1 = Features1;
|
|
10983
12730
|
exports.Features2 = Features2;
|
|
@@ -10985,27 +12732,56 @@ exports.Features3 = Features3;
|
|
|
10985
12732
|
exports.Footer1 = Footer1;
|
|
10986
12733
|
exports.Footer7 = Footer7;
|
|
10987
12734
|
exports.Gallery1 = Gallery1;
|
|
12735
|
+
exports.Hero1 = Hero1;
|
|
10988
12736
|
exports.Hero10 = Hero10;
|
|
10989
12737
|
exports.Hero11 = Hero11;
|
|
10990
12738
|
exports.Hero12 = Hero11$1;
|
|
10991
12739
|
exports.Hero13 = Hero13;
|
|
12740
|
+
exports.Hero2 = Hero2;
|
|
12741
|
+
exports.Hero5 = Hero5;
|
|
12742
|
+
exports.Hero6 = Hero6;
|
|
10992
12743
|
exports.Input = Input;
|
|
10993
12744
|
exports.InputPhoneNumber = InputPhoneNumber;
|
|
10994
12745
|
exports.Links1 = Links1;
|
|
12746
|
+
exports.ModalNotification = ModalNotification;
|
|
12747
|
+
exports.NavBar1 = NavBar1;
|
|
10995
12748
|
exports.NavBar7 = NavBar7;
|
|
10996
12749
|
exports.PageTitle1 = PageTitle1;
|
|
10997
12750
|
exports.Partner1 = Partner1;
|
|
12751
|
+
exports.ProductCategory2 = ProductCategory2;
|
|
10998
12752
|
exports.ProductDetail10 = ProductDetail10;
|
|
12753
|
+
exports.ProductHighlight1 = ProductHighlight1;
|
|
12754
|
+
exports.ProductHot1 = ProductHot1;
|
|
10999
12755
|
exports.ProductHot3 = ProductHot3;
|
|
12756
|
+
exports.ProductItem2 = ProductItem2;
|
|
12757
|
+
exports.ProductItem3 = ProductItem3;
|
|
12758
|
+
exports.ProductItem4 = ProductItem4;
|
|
12759
|
+
exports.ProductItem5 = ProductItem5;
|
|
12760
|
+
exports.ProductItem6 = ProductItem6;
|
|
12761
|
+
exports.ProductList5 = ProductList5;
|
|
11000
12762
|
exports.ProductSale2 = ProductSale2;
|
|
12763
|
+
exports.ProductSearch1 = ProductSearch1;
|
|
11001
12764
|
exports.Products1 = Products1;
|
|
11002
12765
|
exports.Products10 = Products10;
|
|
11003
12766
|
exports.Products2 = Products2;
|
|
11004
12767
|
exports.Products3 = Products3;
|
|
11005
12768
|
exports.ProductsTop1 = ProductsTop1;
|
|
12769
|
+
exports.SearchBar2 = SearchBar2;
|
|
12770
|
+
exports.SearchBar5 = SearchBar5;
|
|
12771
|
+
exports.SearchBar6 = SearchBar6;
|
|
12772
|
+
exports.SearchProduct1 = SearchProduct1;
|
|
11006
12773
|
exports.SectionTitle1 = SectionTitle1;
|
|
12774
|
+
exports.SectionTitle2 = SectionTitle2;
|
|
12775
|
+
exports.SectionTitle3 = SectionTitle3;
|
|
11007
12776
|
exports.Select = Select$1;
|
|
11008
12777
|
exports.ServiceDetail1 = ServiceDetail1;
|
|
12778
|
+
exports.ShopHighlights2 = ShopHighlights2;
|
|
12779
|
+
exports.ShopHighlights5 = ShopHighlights5;
|
|
12780
|
+
exports.ShopHighlights6 = ShopHighlights6;
|
|
12781
|
+
exports.TextArea = TextArea;
|
|
12782
|
+
exports.TreatmentDetail1 = TreatmentDetail1;
|
|
12783
|
+
exports.TreatmentItem1 = TreatmentItem1;
|
|
11009
12784
|
exports.Treatments1 = Treatments1;
|
|
11010
12785
|
exports.Treatments2 = Treatments1$1;
|
|
12786
|
+
exports.TreatmentsList6 = TreatmentsList6;
|
|
11011
12787
|
//# sourceMappingURL=index.js.map
|