s-platform-landing-section 0.1.17 → 0.1.19
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 +759 -206
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +758 -208
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -16,8 +16,9 @@ import Slider from 'react-slick';
|
|
|
16
16
|
import 'slick-carousel/slick/slick.css';
|
|
17
17
|
import 'slick-carousel/slick/slick-theme.css';
|
|
18
18
|
import { AiOutlineShoppingCart } from 'react-icons/ai';
|
|
19
|
-
import { GoCreditCard } from 'react-icons/go';
|
|
19
|
+
import { GoCreditCard, GoClock } from 'react-icons/go';
|
|
20
20
|
import { RiDeleteBin7Line } from 'react-icons/ri';
|
|
21
|
+
import { GiNewspaper } from 'react-icons/gi';
|
|
21
22
|
|
|
22
23
|
var Button = function Button(props) {
|
|
23
24
|
var _props$label = props.label,
|
|
@@ -33,7 +34,7 @@ var Button = function Button(props) {
|
|
|
33
34
|
_props$type = props.type,
|
|
34
35
|
type = _props$type === void 0 ? "primary" : _props$type;
|
|
35
36
|
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) || "")
|
|
37
|
+
_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 + " " + className + " " + ((shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) || "");
|
|
37
38
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
38
39
|
type: "button",
|
|
39
40
|
className: _className,
|
|
@@ -108,18 +109,19 @@ var getDurationValue = function getDurationValue(attributes) {
|
|
|
108
109
|
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" : "";
|
|
109
110
|
};
|
|
110
111
|
var genProductSlug = function genProductSlug(productName, id) {
|
|
112
|
+
var _slug, _slug2, _slug3, _slug4, _slug5, _slug6, _slug7, _slug8, _slug9, _slug10, _slug11;
|
|
111
113
|
var slug = productName === null || productName === void 0 ? void 0 : productName.toLowerCase();
|
|
112
|
-
slug = slug.replace(/(à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ)/g, "a");
|
|
113
|
-
slug = slug.replace(/(è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ)/g, "e");
|
|
114
|
-
slug = slug.replace(/(ì|í|ị|ỉ|ĩ)/g, "i");
|
|
115
|
-
slug = slug.replace(/(ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ)/g, "o");
|
|
116
|
-
slug = slug.replace(/(ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ)/g, "u");
|
|
117
|
-
slug = slug.replace(/(ỳ|ý|ỵ|ỷ|ỹ)/g, "y");
|
|
118
|
-
slug = slug.replace(/(đ)/g, "d");
|
|
119
|
-
slug = slug.replace(/([^0-9a-z-\s])/g, "");
|
|
120
|
-
slug = slug.replace(/(\s+)/g, "-");
|
|
121
|
-
slug = slug.replace(/^-+/g, "");
|
|
122
|
-
slug = slug.replace(/-+$/g, "");
|
|
114
|
+
slug = (_slug = slug) === null || _slug === void 0 ? void 0 : _slug.replace(/(à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ)/g, "a");
|
|
115
|
+
slug = (_slug2 = slug) === null || _slug2 === void 0 ? void 0 : _slug2.replace(/(è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ)/g, "e");
|
|
116
|
+
slug = (_slug3 = slug) === null || _slug3 === void 0 ? void 0 : _slug3.replace(/(ì|í|ị|ỉ|ĩ)/g, "i");
|
|
117
|
+
slug = (_slug4 = slug) === null || _slug4 === void 0 ? void 0 : _slug4.replace(/(ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ)/g, "o");
|
|
118
|
+
slug = (_slug5 = slug) === null || _slug5 === void 0 ? void 0 : _slug5.replace(/(ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ)/g, "u");
|
|
119
|
+
slug = (_slug6 = slug) === null || _slug6 === void 0 ? void 0 : _slug6.replace(/(ỳ|ý|ỵ|ỷ|ỹ)/g, "y");
|
|
120
|
+
slug = (_slug7 = slug) === null || _slug7 === void 0 ? void 0 : _slug7.replace(/(đ)/g, "d");
|
|
121
|
+
slug = (_slug8 = slug) === null || _slug8 === void 0 ? void 0 : _slug8.replace(/([^0-9a-z-\s])/g, "");
|
|
122
|
+
slug = (_slug9 = slug) === null || _slug9 === void 0 ? void 0 : _slug9.replace(/(\s+)/g, "-");
|
|
123
|
+
slug = (_slug10 = slug) === null || _slug10 === void 0 ? void 0 : _slug10.replace(/^-+/g, "");
|
|
124
|
+
slug = (_slug11 = slug) === null || _slug11 === void 0 ? void 0 : _slug11.replace(/-+$/g, "");
|
|
123
125
|
return slug + "-" + id;
|
|
124
126
|
};
|
|
125
127
|
var getLinkProductDetail = function getLinkProductDetail(product) {
|
|
@@ -130,6 +132,13 @@ var getLinkServiceDetail = function getLinkServiceDetail(product) {
|
|
|
130
132
|
var slug = genProductSlug(product === null || product === void 0 ? void 0 : product.productName, product === null || product === void 0 ? void 0 : product.productId);
|
|
131
133
|
return "/service/" + slug + "/" + (product === null || product === void 0 ? void 0 : product.shopId);
|
|
132
134
|
};
|
|
135
|
+
var getLinkNewsDetail = function getLinkNewsDetail(news) {
|
|
136
|
+
var slug = genProductSlug(news === null || news === void 0 ? void 0 : news.title, news === null || news === void 0 ? void 0 : news.articleId);
|
|
137
|
+
return "/news_detail/" + slug + "/" + (news === null || news === void 0 ? void 0 : news.catId) + "/" + (news === null || news === void 0 ? void 0 : news.shopId);
|
|
138
|
+
};
|
|
139
|
+
var getLinkNewsByCategory = function getLinkNewsByCategory(news) {
|
|
140
|
+
return "/news_by_category/" + (news === null || news === void 0 ? void 0 : news.catId) + "/" + (news === null || news === void 0 ? void 0 : news.shopId);
|
|
141
|
+
};
|
|
133
142
|
var LinkToPage = function LinkToPage(props) {
|
|
134
143
|
var _props$Link = props.Link,
|
|
135
144
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
@@ -373,20 +382,38 @@ var NavBar7 = function NavBar7(props) {
|
|
|
373
382
|
onClick: function onClick(event) {
|
|
374
383
|
return event.stopPropagation();
|
|
375
384
|
}
|
|
376
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
377
|
-
className: "flex
|
|
385
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
386
|
+
className: "flex justify-between"
|
|
387
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
388
|
+
className: "flex gap-2 items-center"
|
|
389
|
+
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
390
|
+
Link: Link,
|
|
391
|
+
href: "/",
|
|
392
|
+
onClick: function onClick() {
|
|
393
|
+
return setIsOpen(false);
|
|
394
|
+
}
|
|
395
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
396
|
+
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
397
|
+
className: "h-14 w-14 bg-cover bg-no-repeat"
|
|
398
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
399
|
+
className: "text-xl font-semibold line-clamp-1"
|
|
400
|
+
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("button", {
|
|
401
|
+
className: "text-gray4",
|
|
378
402
|
onClick: function onClick() {
|
|
379
403
|
setIsOpen(false);
|
|
380
404
|
}
|
|
381
405
|
}, /*#__PURE__*/React__default.createElement(RxCross2, {
|
|
382
406
|
size: 24
|
|
383
|
-
})), /*#__PURE__*/React__default.createElement("div", null, shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : (_shopConfigStyle$navB3 = shopConfigStyle.navBarMenus) === null || _shopConfigStyle$navB3 === void 0 ? void 0 : (_shopConfigStyle$navB4 = _shopConfigStyle$navB3.filter(function (e) {
|
|
407
|
+
}))), /*#__PURE__*/React__default.createElement("div", null, shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : (_shopConfigStyle$navB3 = shopConfigStyle.navBarMenus) === null || _shopConfigStyle$navB3 === void 0 ? void 0 : (_shopConfigStyle$navB4 = _shopConfigStyle$navB3.filter(function (e) {
|
|
384
408
|
return e === null || e === void 0 ? void 0 : e.isShow;
|
|
385
409
|
})) === null || _shopConfigStyle$navB4 === void 0 ? void 0 : _shopConfigStyle$navB4.map(function (item, index) {
|
|
386
410
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
387
411
|
Link: Link,
|
|
388
412
|
href: item === null || item === void 0 ? void 0 : item.route,
|
|
389
|
-
key: index
|
|
413
|
+
key: index,
|
|
414
|
+
onClick: function onClick() {
|
|
415
|
+
return setIsOpen(false);
|
|
416
|
+
}
|
|
390
417
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
391
418
|
className: "py-2 " + ((item === null || item === void 0 ? void 0 : item.name) === (route === null || route === void 0 ? void 0 : route.name) ? "text-textHeading" : "")
|
|
392
419
|
}, item === null || item === void 0 ? void 0 : item.label));
|
|
@@ -577,10 +604,16 @@ var NavBar1 = function NavBar1(props) {
|
|
|
577
604
|
className: "flex justify-between"
|
|
578
605
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
579
606
|
className: "flex gap-2 items-center"
|
|
607
|
+
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
608
|
+
Link: Link,
|
|
609
|
+
href: "/",
|
|
610
|
+
onClick: function onClick() {
|
|
611
|
+
return setIsOpen(false);
|
|
612
|
+
}
|
|
580
613
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
581
614
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
582
615
|
className: "h-14 w-14 bg-cover bg-no-repeat"
|
|
583
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
616
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
584
617
|
className: "text-xl font-semibold line-clamp-1"
|
|
585
618
|
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("button", {
|
|
586
619
|
className: "text-gray4",
|
|
@@ -595,7 +628,10 @@ var NavBar1 = function NavBar1(props) {
|
|
|
595
628
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
596
629
|
Link: Link,
|
|
597
630
|
href: item === null || item === void 0 ? void 0 : item.route,
|
|
598
|
-
key: index
|
|
631
|
+
key: index,
|
|
632
|
+
onClick: function onClick() {
|
|
633
|
+
return setIsOpen(false);
|
|
634
|
+
}
|
|
599
635
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
600
636
|
className: "py-2 " + ((item === null || item === void 0 ? void 0 : item.name) === (route === null || route === void 0 ? void 0 : route.name) ? "text-textHeading" : "")
|
|
601
637
|
}, item === null || item === void 0 ? void 0 : item.label));
|
|
@@ -784,7 +820,7 @@ var Input = forwardRef(function (props, ref) {
|
|
|
784
820
|
setTypeInput("text");
|
|
785
821
|
}
|
|
786
822
|
};
|
|
787
|
-
var _className = "h-
|
|
823
|
+
var _className = "h-10 py-1 px-2 border border-stroke rounded-lg " + className;
|
|
788
824
|
var _inputClassName = (isQuantity ? "text-center w-12" : "") + " focus:outline-none focus:ring-0 bg-transparent\t " + inputClassName;
|
|
789
825
|
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
790
826
|
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
@@ -828,7 +864,7 @@ var Input = forwardRef(function (props, ref) {
|
|
|
828
864
|
});
|
|
829
865
|
|
|
830
866
|
var Hero1 = function Hero1(props) {
|
|
831
|
-
var _sectionData$, _sectionData$$srcImag, _sectionData$2, _sectionData$3, _sectionData$4, _sectionData$4$button, _sectionData$4$button2, _sectionData$5, _sectionData$5$button, _sectionData$5$button2;
|
|
867
|
+
var _sectionData$, _sectionData$$srcImag, _sectionData$2, _sectionData$3, _sectionData$4, _sectionData$4$button, _sectionData$4$button2, _sectionData$5, _sectionData$5$button, _sectionData$5$button2, _sectionData$6, _sectionData$6$button, _sectionData$6$button2;
|
|
832
868
|
var shopConfigStyle = props.shopConfigStyle,
|
|
833
869
|
data = props.data,
|
|
834
870
|
_props$Link = props.Link,
|
|
@@ -845,14 +881,17 @@ var Hero1 = function Hero1(props) {
|
|
|
845
881
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
846
882
|
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]"
|
|
847
883
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
848
|
-
className: "text-xl text-center md:text-4xl lg:text-[40px] text-primary font-medium"
|
|
884
|
+
className: "text-xl text-center md:text-4xl lg:text-[40px] text-primary font-medium ",
|
|
885
|
+
style: {
|
|
886
|
+
lineHeight: "normal"
|
|
887
|
+
}
|
|
849
888
|
}, 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", {
|
|
850
889
|
className: "text-center md:text-2xl lg:text-3xl font-medium"
|
|
851
890
|
}, 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, {
|
|
852
891
|
Link: Link,
|
|
853
|
-
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
|
|
892
|
+
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.route) || (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.link) || "#"
|
|
854
893
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
855
|
-
label: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$
|
|
894
|
+
label: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$6 = sectionData[0]) === null || _sectionData$6 === void 0 ? void 0 : (_sectionData$6$button = _sectionData$6.buttons) === null || _sectionData$6$button === void 0 ? void 0 : (_sectionData$6$button2 = _sectionData$6$button[0]) === null || _sectionData$6$button2 === void 0 ? void 0 : _sectionData$6$button2.label,
|
|
856
895
|
shopConfigStyle: shopConfigStyle
|
|
857
896
|
})), " "), /*#__PURE__*/React__default.createElement("div", {
|
|
858
897
|
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"
|
|
@@ -884,7 +923,7 @@ var Hero2 = function Hero2(props) {
|
|
|
884
923
|
className: "relative"
|
|
885
924
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
886
925
|
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],
|
|
887
|
-
className: "w-full object-cover min-h-[
|
|
926
|
+
className: "w-full object-cover min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
|
|
888
927
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
889
928
|
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%]"
|
|
890
929
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
@@ -904,7 +943,7 @@ var Hero5 = function Hero5(props) {
|
|
|
904
943
|
className: "relative"
|
|
905
944
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
906
945
|
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],
|
|
907
|
-
className: "w-full min-h-[
|
|
946
|
+
className: "w-full min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
|
|
908
947
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
909
948
|
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"
|
|
910
949
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -917,13 +956,15 @@ var Hero5 = function Hero5(props) {
|
|
|
917
956
|
var Hero6 = function Hero6(props) {
|
|
918
957
|
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$, _sectionData$, _sectionData$$buttons;
|
|
919
958
|
var shopConfigStyle = props.shopConfigStyle,
|
|
920
|
-
data = props.data
|
|
959
|
+
data = props.data,
|
|
960
|
+
_props$Link = props.Link,
|
|
961
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
921
962
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
922
963
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
923
964
|
className: "relative"
|
|
924
965
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
925
966
|
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],
|
|
926
|
-
className: "w-full h-auto min-h-[
|
|
967
|
+
className: "w-full h-auto min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
|
|
927
968
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
928
969
|
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"
|
|
929
970
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -931,7 +972,8 @@ var Hero6 = function Hero6(props) {
|
|
|
931
972
|
}, 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", {
|
|
932
973
|
className: "md:text-xl"
|
|
933
974
|
}, 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) {
|
|
934
|
-
return /*#__PURE__*/React__default.createElement(
|
|
975
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
976
|
+
Link: Link,
|
|
935
977
|
href: (button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
936
978
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
937
979
|
label: button === null || button === void 0 ? void 0 : button.label,
|
|
@@ -943,7 +985,9 @@ var Hero6 = function Hero6(props) {
|
|
|
943
985
|
var Hero10 = function Hero10(props) {
|
|
944
986
|
var _data$data, _data$data$, _data$data$$srcImages, _sectionData$, _sectionData$2, _sectionData$2$button;
|
|
945
987
|
var shopConfigStyle = props.shopConfigStyle,
|
|
946
|
-
data = props.data
|
|
988
|
+
data = props.data,
|
|
989
|
+
_props$Link = props.Link,
|
|
990
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
947
991
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
948
992
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
949
993
|
className: "relative w-full bg-cover bg-center bg-no-repeat ",
|
|
@@ -956,8 +1000,10 @@ var Hero10 = function Hero10(props) {
|
|
|
956
1000
|
className: "relative w-full min-h-[540px] p-12 z-10 flex flex-col gap-6 items-center justify-center"
|
|
957
1001
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
958
1002
|
className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
959
|
-
}, 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) {
|
|
960
|
-
return /*#__PURE__*/React__default.createElement(
|
|
1003
|
+
}, 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, index) {
|
|
1004
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
1005
|
+
Link: Link,
|
|
1006
|
+
key: "gdf-" + index,
|
|
961
1007
|
href: (button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
962
1008
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
963
1009
|
label: button === null || button === void 0 ? void 0 : button.label,
|
|
@@ -1057,13 +1103,13 @@ var CarouselItem = function CarouselItem(props) {
|
|
|
1057
1103
|
})))), isNavigateButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
1058
1104
|
className: "hidden my-auto col-span-5 md:col-span-3 lg:col-span-2 gap-4 md:flex justify-end "
|
|
1059
1105
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
1060
|
-
className: "p-2 h-full w-10 md:w-12 rounded-full " + (isScrolledToRight ? "bg-gray5" : "bg-primary"),
|
|
1106
|
+
className: "p-2 h-full w-10 h-10 md:h-12 md:w-12 rounded-full " + (isScrolledToRight ? "bg-gray5" : "bg-primary"),
|
|
1061
1107
|
onClick: handleClickPrevImg
|
|
1062
1108
|
}, /*#__PURE__*/React__default.createElement(IoIosArrowBack, {
|
|
1063
1109
|
size: 32,
|
|
1064
1110
|
className: "inline-block text-lg text-textButton"
|
|
1065
1111
|
})), /*#__PURE__*/React__default.createElement("button", {
|
|
1066
|
-
className: " p-2 h-full w-10 md:w-12 rounded-full " + (isScrolledToRight ? "bg-primary" : "bg-gray5"),
|
|
1112
|
+
className: " p-2 h-full w-10 h-10 md:h-12 md:w-12 rounded-full " + (isScrolledToRight ? "bg-primary" : "bg-gray5"),
|
|
1067
1113
|
onClick: handleClickNextImg
|
|
1068
1114
|
}, /*#__PURE__*/React__default.createElement(IoIosArrowForward, {
|
|
1069
1115
|
size: 32,
|
|
@@ -7324,7 +7370,7 @@ var Features3 = function Features3(props) {
|
|
|
7324
7370
|
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
7325
7371
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7326
7372
|
Link: Link,
|
|
7327
|
-
href: (item === null || item === void 0 ? void 0 : item.link) || (item === null || item === void 0 ? void 0 : item.route)
|
|
7373
|
+
href: (item === null || item === void 0 ? void 0 : item.link) || (item === null || item === void 0 ? void 0 : item.route) || "#"
|
|
7328
7374
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7329
7375
|
className: "grid grid-cols-2 p-3 rounded-lg font-semibold",
|
|
7330
7376
|
key: "dfsdfj-" + index,
|
|
@@ -7819,12 +7865,14 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
7819
7865
|
}));
|
|
7820
7866
|
};
|
|
7821
7867
|
|
|
7822
|
-
var NotFoundProduct = function NotFoundProduct() {
|
|
7868
|
+
var NotFoundProduct = function NotFoundProduct(props) {
|
|
7869
|
+
var _props$text = props.text,
|
|
7870
|
+
text = _props$text === void 0 ? "sản phẩm" : _props$text;
|
|
7823
7871
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7824
7872
|
className: "h-60 flex flex-col justify-center items-center text-xl text-gray3"
|
|
7825
7873
|
}, /*#__PURE__*/React__default.createElement(FaBoxOpen, {
|
|
7826
7874
|
size: 80
|
|
7827
|
-
}), /*#__PURE__*/React__default.createElement("div", null, "Kh\xF4ng c\xF3
|
|
7875
|
+
}), /*#__PURE__*/React__default.createElement("div", null, "Kh\xF4ng c\xF3 ", text));
|
|
7828
7876
|
};
|
|
7829
7877
|
|
|
7830
7878
|
var TreatmentsList6 = function TreatmentsList6(props) {
|
|
@@ -7889,28 +7937,34 @@ var ModalNotification = function ModalNotification(props) {
|
|
|
7889
7937
|
var onClose = props.onClose,
|
|
7890
7938
|
onCloseFormBooking = props.onCloseFormBooking,
|
|
7891
7939
|
_props$isButtonClose = props.isButtonClose,
|
|
7892
|
-
isButtonClose = _props$isButtonClose === void 0 ? true : _props$isButtonClose
|
|
7940
|
+
isButtonClose = _props$isButtonClose === void 0 ? true : _props$isButtonClose,
|
|
7941
|
+
_props$className = props.className,
|
|
7942
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
7943
|
+
_props$style = props.style,
|
|
7944
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
7945
|
+
_props$buttonClassNam = props.buttonClassName,
|
|
7946
|
+
buttonClassName = _props$buttonClassNam === void 0 ? "" : _props$buttonClassNam;
|
|
7893
7947
|
var handleClickOutside = function handleClickOutside(event) {
|
|
7894
|
-
|
|
7895
|
-
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
|
|
7948
|
+
event.stopPropagation();
|
|
7949
|
+
if (onClose) {
|
|
7950
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
7951
|
+
}
|
|
7952
|
+
if (onCloseFormBooking && typeof onCloseFormBooking === 'function') {
|
|
7953
|
+
onCloseFormBooking();
|
|
7899
7954
|
}
|
|
7900
7955
|
};
|
|
7901
|
-
useEffect(function () {
|
|
7902
|
-
document.addEventListener('click', handleClickOutside);
|
|
7903
|
-
return function () {
|
|
7904
|
-
document.removeEventListener('click', handleClickOutside);
|
|
7905
|
-
};
|
|
7906
|
-
}, []);
|
|
7907
7956
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7908
|
-
className: "fixed inset-0 bg-black flex items-center justify-center bg-opacity-50 z-50 "
|
|
7957
|
+
className: "fixed inset-0 bg-black flex items-center justify-center bg-opacity-50 z-50 ",
|
|
7958
|
+
onClick: handleClickOutside
|
|
7909
7959
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7910
|
-
className: "
|
|
7960
|
+
className: "flex items-center justify-center relative " + className,
|
|
7961
|
+
onClick: function onClick(e) {
|
|
7962
|
+
return e.stopPropagation();
|
|
7963
|
+
},
|
|
7964
|
+
style: style,
|
|
7911
7965
|
ref: modalRef
|
|
7912
7966
|
}, props === null || props === void 0 ? void 0 : props.children, isButtonClose && /*#__PURE__*/React__default.createElement("button", {
|
|
7913
|
-
className: "absolute top-4 right-4",
|
|
7967
|
+
className: "absolute top-4 right-4 " + buttonClassName,
|
|
7914
7968
|
onClick: onClose
|
|
7915
7969
|
}, /*#__PURE__*/React__default.createElement(RxCross2, null))));
|
|
7916
7970
|
};
|
|
@@ -8081,6 +8135,14 @@ var Select = forwardRef(function (props, ref) {
|
|
|
8081
8135
|
setListOptions(options);
|
|
8082
8136
|
if (!isMulti) setValue(defaultValue);
|
|
8083
8137
|
}, [options]);
|
|
8138
|
+
useEffect(function () {
|
|
8139
|
+
var delayDebounceFn = setTimeout(function () {
|
|
8140
|
+
handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
|
|
8141
|
+
}, 500);
|
|
8142
|
+
return function () {
|
|
8143
|
+
return clearTimeout(delayDebounceFn);
|
|
8144
|
+
};
|
|
8145
|
+
}, [inputSearch]);
|
|
8084
8146
|
useEffect(function () {
|
|
8085
8147
|
var _inputRef$current;
|
|
8086
8148
|
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
@@ -8157,11 +8219,9 @@ var Select = forwardRef(function (props, ref) {
|
|
|
8157
8219
|
return true;
|
|
8158
8220
|
}
|
|
8159
8221
|
};
|
|
8160
|
-
var handleSearch = function handleSearch(
|
|
8161
|
-
var searchValue = e.target.value;
|
|
8162
|
-
setInputSearch(searchValue);
|
|
8222
|
+
var handleSearch = function handleSearch(searchValue) {
|
|
8163
8223
|
if (handleSearchOption && typeof handleSearchOption === 'function') {
|
|
8164
|
-
handleSearchOption(searchValue);
|
|
8224
|
+
handleSearchOption === null || handleSearchOption === void 0 ? void 0 : handleSearchOption(searchValue);
|
|
8165
8225
|
} else {
|
|
8166
8226
|
var listFilterOptions = options.filter(function (item) {
|
|
8167
8227
|
var _item$label;
|
|
@@ -8249,7 +8309,7 @@ var Select = forwardRef(function (props, ref) {
|
|
|
8249
8309
|
placeholder: "T\xECm ki\u1EBFm",
|
|
8250
8310
|
value: inputSearch,
|
|
8251
8311
|
onChange: function onChange(e) {
|
|
8252
|
-
|
|
8312
|
+
setInputSearch(e.target.value);
|
|
8253
8313
|
}
|
|
8254
8314
|
})) : null, /*#__PURE__*/React__default.createElement("div", null, (listOptions === null || listOptions === void 0 ? void 0 : listOptions.length) > 0 ? listOptions === null || listOptions === void 0 ? void 0 : listOptions.map(function (item, index) {
|
|
8255
8315
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -9044,9 +9104,10 @@ var TreatmentsList7 = function TreatmentsList7(props) {
|
|
|
9044
9104
|
var renderItemSlide = function renderItemSlide(product, index) {
|
|
9045
9105
|
var _product$productInfo, _product$productInfo2;
|
|
9046
9106
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9047
|
-
className: "w-full"
|
|
9107
|
+
className: "w-full",
|
|
9108
|
+
key: "shshf-" + index
|
|
9048
9109
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9049
|
-
className: "grid grid-cols-1 md:grid-cols-2 gap-6
|
|
9110
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
9050
9111
|
key: index
|
|
9051
9112
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
9052
9113
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
@@ -9069,33 +9130,22 @@ var TreatmentsList7 = function TreatmentsList7(props) {
|
|
|
9069
9130
|
}
|
|
9070
9131
|
}))));
|
|
9071
9132
|
};
|
|
9072
|
-
function RenderArrow(props) {
|
|
9073
|
-
var className = props.className,
|
|
9074
|
-
style = props.style,
|
|
9075
|
-
onClick = props.onClick;
|
|
9076
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
9077
|
-
className: className,
|
|
9078
|
-
style: _extends({}, style, {
|
|
9079
|
-
display: "none"
|
|
9080
|
-
}),
|
|
9081
|
-
onClick: onClick
|
|
9082
|
-
});
|
|
9083
|
-
}
|
|
9084
9133
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
9085
9134
|
className: "" + SECTION_DEFAULT_CLASS
|
|
9086
9135
|
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
9087
9136
|
data: data,
|
|
9088
9137
|
shopConfigStyle: shopConfigStyle
|
|
9089
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
9090
|
-
className: "
|
|
9138
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9139
|
+
className: "mt-12 w-full"
|
|
9140
|
+
}, (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(Slider, {
|
|
9091
9141
|
infinite: true,
|
|
9092
9142
|
slidesToShow: 1,
|
|
9143
|
+
slidesToScroll: 1,
|
|
9093
9144
|
speed: 500,
|
|
9094
9145
|
autoplay: true,
|
|
9095
9146
|
autoplaySpeed: 4000,
|
|
9096
9147
|
pauseOnHover: true,
|
|
9097
|
-
|
|
9098
|
-
prevArrow: /*#__PURE__*/React__default.createElement(RenderArrow, null),
|
|
9148
|
+
arrows: false,
|
|
9099
9149
|
beforeChange: function beforeChange(oldIndex, newIndex) {
|
|
9100
9150
|
return setCurrentSlide(newIndex);
|
|
9101
9151
|
},
|
|
@@ -9109,6 +9159,8 @@ var TreatmentsList7 = function TreatmentsList7(props) {
|
|
|
9109
9159
|
}
|
|
9110
9160
|
}, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
9111
9161
|
return renderItemSlide(product, index);
|
|
9162
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
|
|
9163
|
+
text: "d\u1ECBch v\u1EE5"
|
|
9112
9164
|
}))), /*#__PURE__*/React__default.createElement(Dash, {
|
|
9113
9165
|
color: secondary
|
|
9114
9166
|
}), isOpenModal ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
@@ -9355,7 +9407,6 @@ var ProductItem2 = function ProductItem2(props) {
|
|
|
9355
9407
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
9356
9408
|
_props$className = props.className,
|
|
9357
9409
|
className = _props$className === void 0 ? "" : _props$className;
|
|
9358
|
-
console.log("checkkkkkkkk:::::::", className);
|
|
9359
9410
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
9360
9411
|
Link: Link,
|
|
9361
9412
|
href: getLinkProductDetail(product)
|
|
@@ -9387,9 +9438,9 @@ var ProductItem3 = function ProductItem3(props) {
|
|
|
9387
9438
|
product: product,
|
|
9388
9439
|
className: "w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-t-2xl"
|
|
9389
9440
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9390
|
-
className: "p-4 flex flex-col gap-4 items-start"
|
|
9441
|
+
className: "p-4 flex flex-col gap-2 md:gap-4 items-start"
|
|
9391
9442
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9392
|
-
className: "line-clamp-1"
|
|
9443
|
+
className: "line-clamp-1 text-lg"
|
|
9393
9444
|
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
9394
9445
|
product: product,
|
|
9395
9446
|
className: "text-lg text-start"
|
|
@@ -9411,14 +9462,14 @@ var ProductItem4 = function ProductItem4(props) {
|
|
|
9411
9462
|
className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
|
|
9412
9463
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
9413
9464
|
product: product,
|
|
9414
|
-
className: "w-full h-
|
|
9465
|
+
className: "w-full h-40 sm:h-56 lg:h-60 xl:h-64 bg-cover bg-no-repeat rounded-2xl"
|
|
9415
9466
|
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9416
|
-
className: "text-start line-clamp-1"
|
|
9467
|
+
className: "text-start line-clamp-1 text-lg"
|
|
9417
9468
|
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
9418
9469
|
product: product,
|
|
9419
9470
|
className: "text-lg text-start mt-2"
|
|
9420
9471
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
9421
|
-
className: "flex pt-4 gap-2 md:gap-4 border-t items-center"
|
|
9472
|
+
className: "flex pt-2 md:pt-4 gap-2 md:gap-4 border-t items-center"
|
|
9422
9473
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9423
9474
|
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)
|
|
9424
9475
|
}, /*#__PURE__*/React__default.createElement(FiShoppingCart, {
|
|
@@ -9477,7 +9528,7 @@ var ProductItem6 = function ProductItem6(props) {
|
|
|
9477
9528
|
className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
|
|
9478
9529
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
9479
9530
|
product: product,
|
|
9480
|
-
className: "w-full h-
|
|
9531
|
+
className: "w-full h-40 sm:h-56 lg:h-60 xl:h-64 bg-cover bg-no-repeat rounded-2xl"
|
|
9481
9532
|
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9482
9533
|
className: "text start line-clamp-1"
|
|
9483
9534
|
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
@@ -10352,12 +10403,14 @@ var ProductHighlight1 = function ProductHighlight1(props) {
|
|
|
10352
10403
|
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10353
10404
|
Link: Link,
|
|
10354
10405
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10406
|
+
shopConfigStyle: shopConfigStyle,
|
|
10355
10407
|
key: "zjk-" + idx
|
|
10356
10408
|
});
|
|
10357
10409
|
})) : /*#__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, {
|
|
10358
10410
|
label: "Xem thêm",
|
|
10359
10411
|
onClick: handleGetMoreProducts,
|
|
10360
|
-
|
|
10412
|
+
shopConfigStyle: shopConfigStyle,
|
|
10413
|
+
className: "mx-auto",
|
|
10361
10414
|
type: "outline"
|
|
10362
10415
|
}) : null);
|
|
10363
10416
|
};
|
|
@@ -10619,7 +10672,7 @@ var Booking1 = function Booking1(props) {
|
|
|
10619
10672
|
};
|
|
10620
10673
|
|
|
10621
10674
|
var BookingForm6 = function BookingForm6(props) {
|
|
10622
|
-
var _data$data, _data$data$, _data$data2, _data$data2$;
|
|
10675
|
+
var _data$data, _data$data$, _data$data2, _data$data2$, _data$data3, _data$data3$, _data$data4, _data$data4$, _data$data5, _data$data5$, _data$data6, _data$data6$;
|
|
10623
10676
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
10624
10677
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10625
10678
|
_props$shopConfig = props.shopConfig,
|
|
@@ -10636,14 +10689,20 @@ var BookingForm6 = function BookingForm6(props) {
|
|
|
10636
10689
|
shopConfigStyle: shopConfigStyle
|
|
10637
10690
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10638
10691
|
className: "mt-12 grid grid-cols-1 gap-6 md:grid-cols-3 md:gap-12"
|
|
10692
|
+
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10693
|
+
href: (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$.route) || (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$.link) || "#"
|
|
10694
|
+
}, data !== null && data !== void 0 && (_data$data3 = data.data) !== null && _data$data3 !== void 0 && (_data$data3$ = _data$data3[0]) !== null && _data$data3$ !== void 0 && _data$data3$.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
10695
|
+
className: "text-primary w-full h-auto"
|
|
10639
10696
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10697
|
+
dangerouslySetInnerHTML: {
|
|
10698
|
+
__html: configSvg(data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : _data$data4$.svgImage)
|
|
10699
|
+
}
|
|
10700
|
+
})) : /*#__PURE__*/React__default.createElement("img", {
|
|
10701
|
+
src: data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : (_data$data5$ = _data$data5[0]) === null || _data$data5$ === void 0 ? void 0 : _data$data5$.srcImage,
|
|
10643
10702
|
className: "w-full h-auto"
|
|
10644
10703
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10645
10704
|
className: "mt-4 whitespace-pre-line"
|
|
10646
|
-
}, data === null || data === void 0 ? void 0 : (_data$
|
|
10705
|
+
}, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description)), /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
10647
10706
|
shopConfigStyle: shopConfigStyle,
|
|
10648
10707
|
shopConfig: shopConfig,
|
|
10649
10708
|
className: "col-span-2"
|
|
@@ -10740,15 +10799,21 @@ var Banner2 = function Banner2(props) {
|
|
|
10740
10799
|
};
|
|
10741
10800
|
|
|
10742
10801
|
var Banner3 = function Banner3(props) {
|
|
10743
|
-
var data = props.data
|
|
10802
|
+
var data = props.data,
|
|
10803
|
+
_props$Link = props.Link,
|
|
10804
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
10744
10805
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
10745
10806
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10746
10807
|
className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 gap-5"
|
|
10747
10808
|
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
10748
|
-
return /*#__PURE__*/React__default.createElement(
|
|
10809
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10810
|
+
Link: Link,
|
|
10811
|
+
href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
10812
|
+
key: "djsd-" + index
|
|
10813
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
10749
10814
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
10750
10815
|
className: "bg-cover bg-no-repeat h-full rounded-xl"
|
|
10751
|
-
});
|
|
10816
|
+
}));
|
|
10752
10817
|
}));
|
|
10753
10818
|
};
|
|
10754
10819
|
|
|
@@ -10941,13 +11006,11 @@ var Links1 = function Links1(props) {
|
|
|
10941
11006
|
};
|
|
10942
11007
|
|
|
10943
11008
|
var Footer1 = function Footer1(props) {
|
|
10944
|
-
var
|
|
11009
|
+
var _shopConfigStyle$navB, _shopConfigStyle$navB2;
|
|
10945
11010
|
var shopConfig = props.shopConfig,
|
|
10946
11011
|
shopConfigStyle = props.shopConfigStyle,
|
|
10947
11012
|
_props$Link = props.Link,
|
|
10948
|
-
Link = _props$Link === void 0 ? null : _props$Link
|
|
10949
|
-
_props$routes = props.routes,
|
|
10950
|
-
routes = _props$routes === void 0 ? [] : _props$routes;
|
|
11013
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
10951
11014
|
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
10952
11015
|
_shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
|
|
10953
11016
|
primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
|
|
@@ -10979,7 +11042,9 @@ var Footer1 = function Footer1(props) {
|
|
|
10979
11042
|
};
|
|
10980
11043
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10981
11044
|
className: SECTION_CLASS + " !md:my-0 !my-0 pt-12 bg-bgSecondary"
|
|
10982
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
11045
|
+
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
11046
|
+
Link: Link,
|
|
11047
|
+
href: "/",
|
|
10983
11048
|
className: "flex items-center"
|
|
10984
11049
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
10985
11050
|
className: "object-cover w-16 h-16",
|
|
@@ -11018,12 +11083,13 @@ var Footer1 = function Footer1(props) {
|
|
|
11018
11083
|
className: "mb-3 font-semibold text-lg"
|
|
11019
11084
|
}, "Li\xEAn k\u1EBFt"), /*#__PURE__*/React__default.createElement("div", {
|
|
11020
11085
|
className: "leading-10 flex flex-col "
|
|
11021
|
-
},
|
|
11086
|
+
}, shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : (_shopConfigStyle$navB = shopConfigStyle.navBarMenus) === null || _shopConfigStyle$navB === void 0 ? void 0 : (_shopConfigStyle$navB2 = _shopConfigStyle$navB.filter(function (e) {
|
|
11022
11087
|
return e === null || e === void 0 ? void 0 : e.isShow;
|
|
11023
|
-
})) === null ||
|
|
11088
|
+
})) === null || _shopConfigStyle$navB2 === void 0 ? void 0 : _shopConfigStyle$navB2.map(function (route, index) {
|
|
11024
11089
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
11025
11090
|
Link: Link,
|
|
11026
|
-
href: route === null || route === void 0 ? void 0 : route.route
|
|
11091
|
+
href: (route === null || route === void 0 ? void 0 : route.route) || "#",
|
|
11092
|
+
key: "dfjg-" + index
|
|
11027
11093
|
}, /*#__PURE__*/React__default.createElement("div", null, route === null || route === void 0 ? void 0 : route.label));
|
|
11028
11094
|
}))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
11029
11095
|
className: "font-semibold mb-4 text-lg"
|
|
@@ -11071,11 +11137,11 @@ var Footer1 = function Footer1(props) {
|
|
|
11071
11137
|
};
|
|
11072
11138
|
|
|
11073
11139
|
var Footer7 = function Footer7(props) {
|
|
11074
|
-
var
|
|
11140
|
+
var _shopConfigStyle$navB, _shopConfigStyle$navB2;
|
|
11075
11141
|
var shopConfig = props.shopConfig,
|
|
11076
11142
|
shopConfigStyle = props.shopConfigStyle,
|
|
11077
|
-
_props$
|
|
11078
|
-
|
|
11143
|
+
_props$Link = props.Link,
|
|
11144
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
11079
11145
|
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
11080
11146
|
_shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
|
|
11081
11147
|
primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
|
|
@@ -11116,7 +11182,9 @@ var Footer7 = function Footer7(props) {
|
|
|
11116
11182
|
background: bgSecondary,
|
|
11117
11183
|
color: textBody
|
|
11118
11184
|
}
|
|
11119
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
11185
|
+
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
11186
|
+
Link: Link,
|
|
11187
|
+
href: "/",
|
|
11120
11188
|
className: "flex items-center gap-2"
|
|
11121
11189
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
11122
11190
|
className: "object-cover w-14",
|
|
@@ -11134,7 +11202,9 @@ var Footer7 = function Footer7(props) {
|
|
|
11134
11202
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11135
11203
|
className: "mb-4 font-semibold text-md md:text-lg"
|
|
11136
11204
|
}, "Th\xF4ng tin li\xEAn h\u1EC7"), shopAddressList === null || shopAddressList === void 0 ? void 0 : shopAddressList.map(function (item, index) {
|
|
11137
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment,
|
|
11205
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
11206
|
+
key: "dlkhg-" + index
|
|
11207
|
+
}, /*#__PURE__*/React__default.createElement("div", null, "C\u01A1 s\u1EDF ", index + 1), /*#__PURE__*/React__default.createElement("div", {
|
|
11138
11208
|
className: "flex gap-1"
|
|
11139
11209
|
}, /*#__PURE__*/React__default.createElement(IoLocationOutline, {
|
|
11140
11210
|
size: 24,
|
|
@@ -11155,11 +11225,13 @@ var Footer7 = function Footer7(props) {
|
|
|
11155
11225
|
className: "mb-4 font-semibold text-md md:text-lg"
|
|
11156
11226
|
}, "Li\xEAn k\u1EBFt"), /*#__PURE__*/React__default.createElement("div", {
|
|
11157
11227
|
className: "leading-10 flex flex-col "
|
|
11158
|
-
},
|
|
11228
|
+
}, shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : (_shopConfigStyle$navB = shopConfigStyle.navBarMenus) === null || _shopConfigStyle$navB === void 0 ? void 0 : (_shopConfigStyle$navB2 = _shopConfigStyle$navB.filter(function (e) {
|
|
11159
11229
|
return e === null || e === void 0 ? void 0 : e.isShow;
|
|
11160
|
-
})) === null ||
|
|
11161
|
-
return /*#__PURE__*/React__default.createElement(
|
|
11162
|
-
href: route === null || route === void 0 ? void 0 : route.route
|
|
11230
|
+
})) === null || _shopConfigStyle$navB2 === void 0 ? void 0 : _shopConfigStyle$navB2.map(function (route, index) {
|
|
11231
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
11232
|
+
href: (route === null || route === void 0 ? void 0 : route.route) || "#",
|
|
11233
|
+
Link: Link,
|
|
11234
|
+
key: "fiddf-" + index
|
|
11163
11235
|
}, /*#__PURE__*/React__default.createElement("div", null, route === null || route === void 0 ? void 0 : route.label));
|
|
11164
11236
|
}))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
11165
11237
|
className: "font-semibold mb-4 text-md md:text-lg"
|
|
@@ -11280,71 +11352,48 @@ var CustomerRating1 = function CustomerRating1(props) {
|
|
|
11280
11352
|
var CustomerRating5 = function CustomerRating5(props) {
|
|
11281
11353
|
var _props$data = props.data,
|
|
11282
11354
|
data = _props$data === void 0 ? {} : _props$data;
|
|
11283
|
-
var _useState = useState(0),
|
|
11284
|
-
currentIndex = _useState[0],
|
|
11285
|
-
setCurrentIndex = _useState[1];
|
|
11286
11355
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
11287
|
-
var
|
|
11288
|
-
|
|
11289
|
-
|
|
11290
|
-
var _useState3 = useState(0),
|
|
11291
|
-
endX = _useState3[0],
|
|
11292
|
-
setEndX = _useState3[1];
|
|
11293
|
-
var sliderRef = useRef();
|
|
11294
|
-
var handleTouchStart = function handleTouchStart(e) {
|
|
11295
|
-
var touchStart = e.touches[0].clientX;
|
|
11296
|
-
setStartX(touchStart);
|
|
11297
|
-
};
|
|
11298
|
-
var handleTouchMove = function handleTouchMove(e) {
|
|
11299
|
-
var touchMove = e.touches[0].clientX;
|
|
11300
|
-
setEndX(touchMove);
|
|
11301
|
-
};
|
|
11302
|
-
var handleTouchEnd = function handleTouchEnd() {
|
|
11303
|
-
var diff = startX - endX;
|
|
11304
|
-
var threshold = sliderRef.current.offsetWidth / 3;
|
|
11305
|
-
if (diff > threshold && currentIndex < sectionData.length - 1) {
|
|
11306
|
-
setCurrentIndex(currentIndex + 1);
|
|
11307
|
-
} else if (diff < -threshold && currentIndex > 0) {
|
|
11308
|
-
setCurrentIndex(currentIndex - 1);
|
|
11309
|
-
}
|
|
11310
|
-
};
|
|
11356
|
+
var _useState = useState(0),
|
|
11357
|
+
currentSlide = _useState[0],
|
|
11358
|
+
setCurrentSlide = _useState[1];
|
|
11311
11359
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
11312
|
-
className: SECTION_CLASS + " mx-0 md:mx-4 xl:mx-20 rounded-xl relative"
|
|
11360
|
+
className: SECTION_CLASS + " mx-0 md:mx-4 xl:mx-20 rounded-xl pb-6 relative"
|
|
11313
11361
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11314
11362
|
className: "absolute mt-16 inset-0 bg-bgSecondary [clip-path:polygon(0%_0%,_100%_30%,_100%_100%,_0%_100%)] z-0 rounded-3xl"
|
|
11315
11363
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11316
|
-
className: "w-full relative z-10 border border-textHeading rounded-3xl
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
|
|
11320
|
-
|
|
11321
|
-
|
|
11322
|
-
|
|
11323
|
-
|
|
11324
|
-
|
|
11364
|
+
className: "w-full relative z-10 border border-textHeading rounded-3xl"
|
|
11365
|
+
}, /*#__PURE__*/React__default.createElement(Slider, {
|
|
11366
|
+
infinite: true,
|
|
11367
|
+
slidesToShow: 1,
|
|
11368
|
+
slidesToScroll: 1,
|
|
11369
|
+
speed: 500,
|
|
11370
|
+
autoplay: true,
|
|
11371
|
+
autoplaySpeed: 4000,
|
|
11372
|
+
pauseOnHover: true,
|
|
11373
|
+
arrows: false,
|
|
11374
|
+
beforeChange: function beforeChange(oldIndex, newIndex) {
|
|
11375
|
+
return setCurrentSlide(newIndex);
|
|
11376
|
+
},
|
|
11377
|
+
dots: true,
|
|
11378
|
+
customPaging: function customPaging(i) {
|
|
11379
|
+
return i === currentSlide ? /*#__PURE__*/React__default.createElement("div", {
|
|
11380
|
+
className: "w-4 h-1 rounded-full bg-primary mt-4"
|
|
11381
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
11382
|
+
className: "w-4 h-1 rounded-full bg-gray-300 mt-4"
|
|
11383
|
+
});
|
|
11325
11384
|
}
|
|
11326
11385
|
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
11327
11386
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
11328
|
-
className: "flex flex-col
|
|
11387
|
+
className: "p-6 !flex !flex-col md:!flex-row gap-4 xl:gap-6",
|
|
11329
11388
|
key: "lpky-" + index
|
|
11330
11389
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
11331
11390
|
src: item === null || item === void 0 ? void 0 : item.avatar,
|
|
11332
|
-
className: "w-80 h-96 object-cover rounded-3xl"
|
|
11391
|
+
className: "w-full md:w-80 h-96 object-cover rounded-3xl"
|
|
11333
11392
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11334
|
-
className: "flex flex-col items-center md:items-start gap-6 justify-center"
|
|
11393
|
+
className: "flex flex-col items-center md:items-start gap-4 lg:gap-6 justify-center"
|
|
11335
11394
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11336
11395
|
className: "text-4xl font-semibold"
|
|
11337
|
-
}, 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)));
|
|
11338
|
-
})), /*#__PURE__*/React__default.createElement("div", {
|
|
11339
|
-
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"
|
|
11340
|
-
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (_, index) {
|
|
11341
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
11342
|
-
key: "dot-" + index,
|
|
11343
|
-
onClick: function onClick() {
|
|
11344
|
-
setCurrentIndex(index);
|
|
11345
|
-
},
|
|
11346
|
-
className: (currentIndex === index ? "w-6 bg-primary" : "w-3 bg-gray4") + " h-3 rounded-full hover:opacity-80 cursor-pointer "
|
|
11347
|
-
});
|
|
11396
|
+
}, 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, " ")));
|
|
11348
11397
|
}))));
|
|
11349
11398
|
};
|
|
11350
11399
|
|
|
@@ -11513,21 +11562,19 @@ var PageTitle1 = function PageTitle1(props) {
|
|
|
11513
11562
|
};
|
|
11514
11563
|
|
|
11515
11564
|
var About1 = function About1(props) {
|
|
11565
|
+
var shopConfig = props.shopConfig,
|
|
11566
|
+
data = props.data;
|
|
11516
11567
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
11517
11568
|
className: SECTION_CLASS + " flex flex-col gap-4"
|
|
11518
|
-
},
|
|
11519
|
-
className: "font-semibold"
|
|
11520
|
-
},
|
|
11521
|
-
className: "
|
|
11522
|
-
},
|
|
11523
|
-
|
|
11524
|
-
|
|
11525
|
-
|
|
11526
|
-
}
|
|
11527
|
-
className: "ps-4"
|
|
11528
|
-
}, " 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", {
|
|
11529
|
-
className: "font-semibold"
|
|
11530
|
-
}, "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."));
|
|
11569
|
+
}, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement("h1", {
|
|
11570
|
+
className: "text-4xl font-semibold"
|
|
11571
|
+
}, data === null || data === void 0 ? void 0 : data.sectionTitle) : null, data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("div", {
|
|
11572
|
+
className: "text-xl"
|
|
11573
|
+
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
11574
|
+
dangerouslySetInnerHTML: {
|
|
11575
|
+
__html: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopAbout
|
|
11576
|
+
}
|
|
11577
|
+
}));
|
|
11531
11578
|
};
|
|
11532
11579
|
|
|
11533
11580
|
var About5 = function About5(props) {
|
|
@@ -11627,6 +11674,7 @@ var Breadcrumb1 = function Breadcrumb1(props) {
|
|
|
11627
11674
|
label: "Trang chủ",
|
|
11628
11675
|
route: "/"
|
|
11629
11676
|
});
|
|
11677
|
+
console.log(items);
|
|
11630
11678
|
setItems(items);
|
|
11631
11679
|
};
|
|
11632
11680
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -11639,7 +11687,7 @@ var Breadcrumb1 = function Breadcrumb1(props) {
|
|
|
11639
11687
|
className: "text-gray4"
|
|
11640
11688
|
}, "/") : null, item !== null && item !== void 0 && item.route ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
11641
11689
|
Link: Link,
|
|
11642
|
-
href: item === null || item === void 0 ? void 0 : item.route,
|
|
11690
|
+
href: (item === null || item === void 0 ? void 0 : item.route) || "#",
|
|
11643
11691
|
style: {
|
|
11644
11692
|
color: textHeading
|
|
11645
11693
|
}
|
|
@@ -12498,7 +12546,7 @@ var SearchProduct1 = function SearchProduct1(props) {
|
|
|
12498
12546
|
setSearchValue = _useState2[1];
|
|
12499
12547
|
useEffect(function () {
|
|
12500
12548
|
if (valueSearch === "") {
|
|
12501
|
-
|
|
12549
|
+
setListProducts([]);
|
|
12502
12550
|
} else {
|
|
12503
12551
|
var delayDebounceFn = setTimeout(function () {
|
|
12504
12552
|
handleSearch(valueSearch);
|
|
@@ -12570,6 +12618,7 @@ var SearchProduct1 = function SearchProduct1(props) {
|
|
|
12570
12618
|
};
|
|
12571
12619
|
|
|
12572
12620
|
var SearchBar2 = function SearchBar2(props) {
|
|
12621
|
+
var _data$data;
|
|
12573
12622
|
var _props$Link = props.Link,
|
|
12574
12623
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
12575
12624
|
data = props.data;
|
|
@@ -12615,12 +12664,21 @@ var SearchBar2 = function SearchBar2(props) {
|
|
|
12615
12664
|
}
|
|
12616
12665
|
};
|
|
12617
12666
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
12618
|
-
className: "
|
|
12667
|
+
className: SECTION_CLASS + " md:mt-6"
|
|
12668
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12669
|
+
className: " w-full flex flex-col justify-center px-6 gap-2 md:gap-4 items-center rounded-xl md:rounded-3xl ",
|
|
12670
|
+
style: {
|
|
12671
|
+
background: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.srcImage) + ")",
|
|
12672
|
+
backgroundPosition: "center",
|
|
12673
|
+
backgroundSize: "cover"
|
|
12674
|
+
}
|
|
12675
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12676
|
+
className: "w-full md:w-1/2 py-6 mx-auto px-6 flex flex-col h-full gap-4"
|
|
12619
12677
|
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
12620
12678
|
icons: /*#__PURE__*/React__default.createElement(IoSearchOutline, {
|
|
12621
12679
|
className: "text-gray3"
|
|
12622
12680
|
}),
|
|
12623
|
-
className: "w-full",
|
|
12681
|
+
className: "w-full h-12",
|
|
12624
12682
|
inputClassName: "w-full",
|
|
12625
12683
|
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",
|
|
12626
12684
|
onChange: setSearchValue
|
|
@@ -12645,14 +12703,13 @@ var SearchBar2 = function SearchBar2(props) {
|
|
|
12645
12703
|
})));
|
|
12646
12704
|
})) : /*#__PURE__*/React__default.createElement("div", {
|
|
12647
12705
|
className: "mx-auto"
|
|
12648
|
-
}, data === null || data === void 0 ? void 0 : data.sectionDescription));
|
|
12706
|
+
}, data === null || data === void 0 ? void 0 : data.sectionDescription))));
|
|
12649
12707
|
};
|
|
12650
12708
|
|
|
12651
12709
|
var SearchBar5 = function SearchBar5(props) {
|
|
12652
|
-
var _data$data, _data$data2, _data$data3;
|
|
12710
|
+
var _data$data, _data$data2, _data$data3, _data$data4, _data$data5;
|
|
12653
12711
|
var _props$Link = props.Link,
|
|
12654
12712
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
12655
|
-
shopConfigStyle = props.shopConfigStyle,
|
|
12656
12713
|
data = props.data;
|
|
12657
12714
|
var _useState = useState(""),
|
|
12658
12715
|
value = _useState[0],
|
|
@@ -12666,14 +12723,17 @@ var SearchBar5 = function SearchBar5(props) {
|
|
|
12666
12723
|
backgroundPosition: "center",
|
|
12667
12724
|
backgroundSize: "cover"
|
|
12668
12725
|
}
|
|
12669
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12726
|
+
}, data !== null && data !== void 0 && (_data$data2 = data.data) !== null && _data$data2 !== void 0 && _data$data2.title ? /*#__PURE__*/React__default.createElement("div", {
|
|
12670
12727
|
className: "text-xl font-semibold md:text-3xl lg:text-4xl text-textButton text-center"
|
|
12671
|
-
}, data === null || data === void 0 ? void 0 : (_data$
|
|
12728
|
+
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : _data$data3.title) : null, data !== null && data !== void 0 && (_data$data4 = data.data) !== null && _data$data4 !== void 0 && _data$data4.description ? /*#__PURE__*/React__default.createElement("div", {
|
|
12729
|
+
className: "text-center text-textButton"
|
|
12730
|
+
}, data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : _data$data5.description) : null, /*#__PURE__*/React__default.createElement(Input, {
|
|
12672
12731
|
onChange: setValue,
|
|
12673
12732
|
icons: /*#__PURE__*/React__default.createElement(IoSearchOutline, {
|
|
12674
|
-
className: "text-gray3 text-xl md:text-2xl"
|
|
12733
|
+
className: "text-gray3 ps-1 text-xl md:text-2xl"
|
|
12675
12734
|
}),
|
|
12676
|
-
|
|
12735
|
+
wrapClassName: "w-full sm:w-[60%] md:w-[50%] lg:w-[40%]",
|
|
12736
|
+
className: "w-full bg-bgSecondary mb-2 md:h-12",
|
|
12677
12737
|
style: {
|
|
12678
12738
|
borderRadius: "32px"
|
|
12679
12739
|
},
|
|
@@ -12684,20 +12744,17 @@ var SearchBar5 = function SearchBar5(props) {
|
|
|
12684
12744
|
href: genLinkSearch(value)
|
|
12685
12745
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
12686
12746
|
label: "T\xECm ki\u1EBFm",
|
|
12687
|
-
className: "whitespace-nowrap h-full "
|
|
12688
|
-
shopConfigStyle: shopConfigStyle
|
|
12747
|
+
className: "whitespace-nowrap h-full !rounded-3xl "
|
|
12689
12748
|
})) : /*#__PURE__*/React__default.createElement(Button, {
|
|
12690
12749
|
label: "T\xECm ki\u1EBFm",
|
|
12691
|
-
className: "whitespace-nowrap "
|
|
12692
|
-
shopConfigStyle: shopConfigStyle
|
|
12750
|
+
className: "whitespace-nowrap !rounded-3xl py-1.5 md:py-2.5"
|
|
12693
12751
|
}))
|
|
12694
12752
|
})));
|
|
12695
12753
|
};
|
|
12696
12754
|
|
|
12697
12755
|
var SearchBar6 = function SearchBar6(props) {
|
|
12698
|
-
var _data$data, _data$data2, _data$data3;
|
|
12699
|
-
var
|
|
12700
|
-
_props$Link = props.Link,
|
|
12756
|
+
var _data$data, _data$data2, _data$data3, _data$data4, _data$data5;
|
|
12757
|
+
var _props$Link = props.Link,
|
|
12701
12758
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
12702
12759
|
data = props.data;
|
|
12703
12760
|
var _useState = useState(""),
|
|
@@ -12710,15 +12767,18 @@ var SearchBar6 = function SearchBar6(props) {
|
|
|
12710
12767
|
backgroundPosition: "center",
|
|
12711
12768
|
backgroundSize: "cover"
|
|
12712
12769
|
}
|
|
12713
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12770
|
+
}, data !== null && data !== void 0 && (_data$data2 = data.data) !== null && _data$data2 !== void 0 && _data$data2.title ? /*#__PURE__*/React__default.createElement("div", {
|
|
12714
12771
|
className: "text-lg font-semibold text-textBody md:text-2xl lg:text-3xl text-center"
|
|
12715
|
-
}, data === null || data === void 0 ? void 0 : (_data$
|
|
12716
|
-
className: "
|
|
12772
|
+
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : _data$data3.title) : null, data !== null && data !== void 0 && (_data$data4 = data.data) !== null && _data$data4 !== void 0 && _data$data4.description ? /*#__PURE__*/React__default.createElement("div", {
|
|
12773
|
+
className: "text-center text-textBody"
|
|
12774
|
+
}, data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : _data$data5.description) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
12775
|
+
className: "flex gap-2 md:gap-4 lg:gap-6 mb-2 md:mb-0 w-full md:w-[70%] h-10 lg:h-12 lg:w-1/2"
|
|
12717
12776
|
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
12718
12777
|
icons: /*#__PURE__*/React__default.createElement(IoSearchOutline, {
|
|
12719
12778
|
className: "text-gray3"
|
|
12720
12779
|
}),
|
|
12721
|
-
className: "w-full h-full
|
|
12780
|
+
className: "w-full h-full",
|
|
12781
|
+
wrapClassName: " w-full h-full",
|
|
12722
12782
|
inputClassName: "w-full",
|
|
12723
12783
|
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",
|
|
12724
12784
|
onChange: setValue
|
|
@@ -12727,22 +12787,25 @@ var SearchBar6 = function SearchBar6(props) {
|
|
|
12727
12787
|
href: genLinkSearch(value)
|
|
12728
12788
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
12729
12789
|
label: "T\xECm ki\u1EBFm",
|
|
12730
|
-
className: "whitespace-nowrap h-full"
|
|
12731
|
-
shopConfigStyle: shopConfigStyle
|
|
12790
|
+
className: "whitespace-nowrap h-full"
|
|
12732
12791
|
})) : /*#__PURE__*/React__default.createElement(Button, {
|
|
12733
12792
|
label: "T\xECm ki\u1EBFm",
|
|
12734
|
-
className: "whitespace-nowrap "
|
|
12735
|
-
shopConfigStyle: shopConfigStyle
|
|
12793
|
+
className: "whitespace-nowrap "
|
|
12736
12794
|
}))));
|
|
12737
12795
|
};
|
|
12738
12796
|
|
|
12739
12797
|
var ShopHighlights2 = function ShopHighlights2(props) {
|
|
12740
|
-
var data = props.data
|
|
12798
|
+
var data = props.data,
|
|
12799
|
+
_props$Link = props.Link,
|
|
12800
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
12741
12801
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
12742
12802
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
12743
12803
|
className: SECTION_CLASS + " my-0 md:my-0 py-6 grid grid-cols-2 md:grid-cols-4 gap-4 lg:gap-6"
|
|
12744
12804
|
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
12745
|
-
return /*#__PURE__*/React__default.createElement(
|
|
12805
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12806
|
+
Link: Link,
|
|
12807
|
+
href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
|
|
12808
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12746
12809
|
className: "flex flex-col items-center text-center lg:px-3 gap-3",
|
|
12747
12810
|
key: "kdf-" + index
|
|
12748
12811
|
}, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -12756,17 +12819,22 @@ var ShopHighlights2 = function ShopHighlights2(props) {
|
|
|
12756
12819
|
className: "w-16 h-16 p-3 rounded-full bg-primary"
|
|
12757
12820
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12758
12821
|
className: "font-medium text-lg"
|
|
12759
|
-
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description));
|
|
12822
|
+
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description)));
|
|
12760
12823
|
}));
|
|
12761
12824
|
};
|
|
12762
12825
|
|
|
12763
12826
|
var ShopHighlights5 = function ShopHighlights5(props) {
|
|
12764
|
-
var data = props.data
|
|
12827
|
+
var data = props.data,
|
|
12828
|
+
_props$Link = props.Link,
|
|
12829
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
12765
12830
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
12766
12831
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
12767
12832
|
className: SECTION_CLASS + " grid md:grid-cols-3 py-6 gap-4 lg:gap-6 bg-bgSecondary"
|
|
12768
12833
|
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
12769
|
-
return /*#__PURE__*/React__default.createElement(
|
|
12834
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12835
|
+
href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
12836
|
+
Link: Link
|
|
12837
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12770
12838
|
className: "flex flex-col items-center text-center md:px-3 lg:px-6 gap-3",
|
|
12771
12839
|
key: "kdf-" + index
|
|
12772
12840
|
}, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -12780,7 +12848,7 @@ var ShopHighlights5 = function ShopHighlights5(props) {
|
|
|
12780
12848
|
className: "w-16 h-16 rounded-full bg-primary"
|
|
12781
12849
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12782
12850
|
className: "font-medium text-xl text-textHeading pt-2 border-t border-textHeading"
|
|
12783
|
-
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description));
|
|
12851
|
+
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description)));
|
|
12784
12852
|
}));
|
|
12785
12853
|
};
|
|
12786
12854
|
|
|
@@ -12810,7 +12878,7 @@ var ShopHighlights6 = function ShopHighlights6(props) {
|
|
|
12810
12878
|
className: " w-44 h-0.5 rounded-full bg-primary"
|
|
12811
12879
|
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description), /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12812
12880
|
Link: Link,
|
|
12813
|
-
href: (item === null || item === void 0 ? void 0 : item.
|
|
12881
|
+
href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
|
|
12814
12882
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
12815
12883
|
shopConfigStyle: shopConfigStyle,
|
|
12816
12884
|
label: item === null || item === void 0 ? void 0 : item.title
|
|
@@ -12825,7 +12893,9 @@ var ShopHighlights7 = function ShopHighlights7(props) {
|
|
|
12825
12893
|
_props$data = props.data,
|
|
12826
12894
|
data = _props$data === void 0 ? {} : _props$data,
|
|
12827
12895
|
_props$SectionTitle = props.SectionTitle,
|
|
12828
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle
|
|
12896
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
12897
|
+
_props$Link = props.Link,
|
|
12898
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
12829
12899
|
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
12830
12900
|
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
12831
12901
|
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
|
|
@@ -12836,7 +12906,9 @@ var ShopHighlights7 = function ShopHighlights7(props) {
|
|
|
12836
12906
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12837
12907
|
className: "mt-6 grid grid-cols-3 gap-4 md:gap-8"
|
|
12838
12908
|
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
|
|
12839
|
-
return /*#__PURE__*/React__default.createElement(
|
|
12909
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12910
|
+
Link: Link,
|
|
12911
|
+
href: (it === null || it === void 0 ? void 0 : it.route) || (it === null || it === void 0 ? void 0 : it.link) || "#",
|
|
12840
12912
|
key: index,
|
|
12841
12913
|
className: "pt-6 col-span-3 md:col-span-1"
|
|
12842
12914
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -12894,5 +12966,483 @@ var VideoFull1 = function VideoFull1(props) {
|
|
|
12894
12966
|
})) : null);
|
|
12895
12967
|
};
|
|
12896
12968
|
|
|
12897
|
-
|
|
12969
|
+
var getAllArticleNewsApi = function getAllArticleNewsApi(shopId, appId, landingShopConfigId, params) {
|
|
12970
|
+
if (params === void 0) {
|
|
12971
|
+
params = {};
|
|
12972
|
+
}
|
|
12973
|
+
return api({
|
|
12974
|
+
method: "get",
|
|
12975
|
+
url: "/landing/news/article/get-all-filter",
|
|
12976
|
+
params: _extends({
|
|
12977
|
+
shopId: shopId,
|
|
12978
|
+
appId: appId,
|
|
12979
|
+
landingShopConfigId: landingShopConfigId
|
|
12980
|
+
}, params)
|
|
12981
|
+
});
|
|
12982
|
+
};
|
|
12983
|
+
var getNewsDetailApi = function getNewsDetailApi(articleId, shopId, landingShopConfigId) {
|
|
12984
|
+
return api({
|
|
12985
|
+
method: "get",
|
|
12986
|
+
url: "/landing/news/article/" + articleId,
|
|
12987
|
+
params: {
|
|
12988
|
+
shopId: shopId,
|
|
12989
|
+
landingShopConfigId: landingShopConfigId,
|
|
12990
|
+
articleId: articleId
|
|
12991
|
+
}
|
|
12992
|
+
});
|
|
12993
|
+
};
|
|
12994
|
+
|
|
12995
|
+
var NewsController = function NewsController(props) {
|
|
12996
|
+
var shopConfig = props.shopConfig,
|
|
12997
|
+
params = props.params;
|
|
12998
|
+
var _useState = useState(false),
|
|
12999
|
+
loading = _useState[0],
|
|
13000
|
+
setLoading = _useState[1];
|
|
13001
|
+
var _useState2 = useState([]),
|
|
13002
|
+
newsArticles = _useState2[0],
|
|
13003
|
+
setNewsArticles = _useState2[1];
|
|
13004
|
+
var _useState3 = useState(),
|
|
13005
|
+
setPage = _useState3[1];
|
|
13006
|
+
useEffect(function () {
|
|
13007
|
+
if (shopConfig !== null && shopConfig !== void 0 && shopConfig.shopId && shopConfig !== null && shopConfig !== void 0 && shopConfig.landingShopConfigId) {
|
|
13008
|
+
getAllArticleNews();
|
|
13009
|
+
} else {
|
|
13010
|
+
setNewsArticles([]);
|
|
13011
|
+
setPage(null);
|
|
13012
|
+
}
|
|
13013
|
+
}, [shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingShopConfigId, params]);
|
|
13014
|
+
var getAllArticleNews = function getAllArticleNews() {
|
|
13015
|
+
try {
|
|
13016
|
+
setLoading(true);
|
|
13017
|
+
var _temp = _catch(function () {
|
|
13018
|
+
var defaultParams = {
|
|
13019
|
+
page: 0,
|
|
13020
|
+
size: 10,
|
|
13021
|
+
active: true
|
|
13022
|
+
};
|
|
13023
|
+
var filterParams = _extends({}, defaultParams, params);
|
|
13024
|
+
return Promise.resolve(getAllArticleNewsApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.appId, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingShopConfigId, filterParams)).then(function (response) {
|
|
13025
|
+
var _response$data, _response$data$status;
|
|
13026
|
+
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$status = _response$data.status) === null || _response$data$status === void 0 ? void 0 : _response$data$status.code) == 200) {
|
|
13027
|
+
var _response$data2, _response$data2$data, _response$data3, _response$data3$data;
|
|
13028
|
+
setNewsArticles(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$data = _response$data2.data) === null || _response$data2$data === void 0 ? void 0 : _response$data2$data.content);
|
|
13029
|
+
setPage(response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : (_response$data3$data = _response$data3.data) === null || _response$data3$data === void 0 ? void 0 : _response$data3$data.totalElements);
|
|
13030
|
+
}
|
|
13031
|
+
setLoading(false);
|
|
13032
|
+
});
|
|
13033
|
+
}, function (error) {
|
|
13034
|
+
console.log(error);
|
|
13035
|
+
setLoading(false);
|
|
13036
|
+
});
|
|
13037
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
13038
|
+
} catch (e) {
|
|
13039
|
+
return Promise.reject(e);
|
|
13040
|
+
}
|
|
13041
|
+
};
|
|
13042
|
+
return {
|
|
13043
|
+
newsArticles: newsArticles,
|
|
13044
|
+
loading: loading
|
|
13045
|
+
};
|
|
13046
|
+
};
|
|
13047
|
+
|
|
13048
|
+
var DefaultImage$1 = function DefaultImage(props) {
|
|
13049
|
+
var _props$className = props.className,
|
|
13050
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
13051
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
13052
|
+
className: "flex justify-center items-center max-w-full h-full aspect-video rounded-lg " + className,
|
|
13053
|
+
style: {
|
|
13054
|
+
backgroundColor: "#FAFAFA"
|
|
13055
|
+
}
|
|
13056
|
+
}, /*#__PURE__*/React__default.createElement(SvgImageGallery, {
|
|
13057
|
+
width: "25%",
|
|
13058
|
+
height: "25%",
|
|
13059
|
+
fill: "#D9D9D9"
|
|
13060
|
+
}));
|
|
13061
|
+
};
|
|
13062
|
+
var NewsImage = function NewsImage(props) {
|
|
13063
|
+
var _props$size2 = props.size,
|
|
13064
|
+
size = _props$size2 === void 0 ? 0 : _props$size2,
|
|
13065
|
+
_props$className2 = props.className,
|
|
13066
|
+
className = _props$className2 === void 0 ? "" : _props$className2,
|
|
13067
|
+
news = props.news;
|
|
13068
|
+
var _useState = useState(""),
|
|
13069
|
+
src = _useState[0],
|
|
13070
|
+
setSrc = _useState[1];
|
|
13071
|
+
useEffect(function () {
|
|
13072
|
+
getNewsImage();
|
|
13073
|
+
}, [news]);
|
|
13074
|
+
var getNewsImage = function getNewsImage() {
|
|
13075
|
+
var src = news === null || news === void 0 ? void 0 : news.thumbnail;
|
|
13076
|
+
setSrc(src);
|
|
13077
|
+
};
|
|
13078
|
+
return src ? /*#__PURE__*/React__default.createElement("img", {
|
|
13079
|
+
src: src,
|
|
13080
|
+
className: "h-full rounded-lg max-w-full aspect-video " + className,
|
|
13081
|
+
style: size ? {
|
|
13082
|
+
width: size,
|
|
13083
|
+
height: size
|
|
13084
|
+
} : null
|
|
13085
|
+
}) : /*#__PURE__*/React__default.createElement(DefaultImage$1, {
|
|
13086
|
+
className: className,
|
|
13087
|
+
size: size
|
|
13088
|
+
});
|
|
13089
|
+
};
|
|
13090
|
+
|
|
13091
|
+
var NewsHighlight1 = function NewsHighlight1(props) {
|
|
13092
|
+
var _newsArticles$, _newsArticles$2, _newsArticles$3, _newsArticles$slice;
|
|
13093
|
+
var _props$SectionTitle = props.SectionTitle,
|
|
13094
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
13095
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
13096
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
13097
|
+
_props$Link = props.Link,
|
|
13098
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
13099
|
+
data = props.data;
|
|
13100
|
+
var _useState = useState({
|
|
13101
|
+
tags: "HIGHLIGHT",
|
|
13102
|
+
page: 0,
|
|
13103
|
+
size: 6,
|
|
13104
|
+
sort: "timeUpdate,DESC"
|
|
13105
|
+
}),
|
|
13106
|
+
params = _useState[0];
|
|
13107
|
+
var _NewsController = NewsController(_extends({}, props, {
|
|
13108
|
+
params: params
|
|
13109
|
+
})),
|
|
13110
|
+
_NewsController$newsA = _NewsController.newsArticles,
|
|
13111
|
+
newsArticles = _NewsController$newsA === void 0 ? [] : _NewsController$newsA;
|
|
13112
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
13113
|
+
className: "" + SECTION_CLASS
|
|
13114
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
13115
|
+
data: data,
|
|
13116
|
+
shopConfigStyle: shopConfigStyle
|
|
13117
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13118
|
+
className: "mt-12 mb-6 grid grid-cols-1 md:grid-cols-2 gap-6 "
|
|
13119
|
+
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13120
|
+
href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[0]),
|
|
13121
|
+
Link: Link
|
|
13122
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
|
|
13123
|
+
news: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[0]
|
|
13124
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13125
|
+
className: "pt-3 font-medium text-lg"
|
|
13126
|
+
}, newsArticles === null || newsArticles === void 0 ? void 0 : (_newsArticles$ = newsArticles[0]) === null || _newsArticles$ === void 0 ? void 0 : _newsArticles$.title))), /*#__PURE__*/React__default.createElement("div", {
|
|
13127
|
+
className: "flex flex-col gap-6"
|
|
13128
|
+
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13129
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4 ",
|
|
13130
|
+
href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1]),
|
|
13131
|
+
Link: Link
|
|
13132
|
+
}, /*#__PURE__*/React__default.createElement(NewsImage, {
|
|
13133
|
+
news: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1]
|
|
13134
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13135
|
+
className: "font-medium text-lg"
|
|
13136
|
+
}, newsArticles === null || newsArticles === void 0 ? void 0 : (_newsArticles$2 = newsArticles[1]) === null || _newsArticles$2 === void 0 ? void 0 : _newsArticles$2.title)), /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13137
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
13138
|
+
href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[2]),
|
|
13139
|
+
Link: Link
|
|
13140
|
+
}, /*#__PURE__*/React__default.createElement(NewsImage, {
|
|
13141
|
+
news: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[2]
|
|
13142
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13143
|
+
className: "font-medium text-lg"
|
|
13144
|
+
}, newsArticles === null || newsArticles === void 0 ? void 0 : (_newsArticles$3 = newsArticles[2]) === null || _newsArticles$3 === void 0 ? void 0 : _newsArticles$3.title)))), /*#__PURE__*/React__default.createElement("div", {
|
|
13145
|
+
className: "grid grid-cols-1 md:grid-cols-3 gap-6 mt-6 "
|
|
13146
|
+
}, newsArticles === null || newsArticles === void 0 ? void 0 : (_newsArticles$slice = newsArticles.slice(3, 6)) === null || _newsArticles$slice === void 0 ? void 0 : _newsArticles$slice.map(function (item, index) {
|
|
13147
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13148
|
+
href: getLinkNewsDetail(item),
|
|
13149
|
+
Link: Link,
|
|
13150
|
+
key: "kdjf-" + index
|
|
13151
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13152
|
+
className: "jgdfg-" + index
|
|
13153
|
+
}, /*#__PURE__*/React__default.createElement(NewsImage, {
|
|
13154
|
+
news: item
|
|
13155
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13156
|
+
className: "font-medium text-lg py-2"
|
|
13157
|
+
}, item === null || item === void 0 ? void 0 : item.title)));
|
|
13158
|
+
})));
|
|
13159
|
+
};
|
|
13160
|
+
|
|
13161
|
+
var relativeTime = createCommonjsModule(function (module, exports) {
|
|
13162
|
+
!function(r,e){module.exports=e();}(commonjsGlobal,(function(){return function(r,e,t){r=r||{};var n=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return "function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)};}}));
|
|
13163
|
+
});
|
|
13164
|
+
|
|
13165
|
+
var vi = createCommonjsModule(function (module, exports) {
|
|
13166
|
+
!function(t,n){module.exports=n(dayjs_min);}(commonjsGlobal,(function(t){function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var h=n(t),_={name:"vi",weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),weekStart:1,weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),ordinal:function(t){return t},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"}};return h.default.locale(_,null,!0),_}));
|
|
13167
|
+
});
|
|
13168
|
+
|
|
13169
|
+
var getAllNewsCategoriesApi = function getAllNewsCategoriesApi(shopId, landingShopConfigId, appId) {
|
|
13170
|
+
if (appId === void 0) {
|
|
13171
|
+
appId = "SSPA";
|
|
13172
|
+
}
|
|
13173
|
+
return api({
|
|
13174
|
+
method: "get",
|
|
13175
|
+
url: "/landing/news/category/get-all",
|
|
13176
|
+
params: {
|
|
13177
|
+
shopId: shopId,
|
|
13178
|
+
landingShopConfigId: landingShopConfigId,
|
|
13179
|
+
appId: appId,
|
|
13180
|
+
active: true
|
|
13181
|
+
}
|
|
13182
|
+
});
|
|
13183
|
+
};
|
|
13184
|
+
|
|
13185
|
+
var NewsCategoryController = function NewsCategoryController(props) {
|
|
13186
|
+
var params = props.params,
|
|
13187
|
+
shopConfig = props.shopConfig;
|
|
13188
|
+
var _useState = useState([]),
|
|
13189
|
+
newsCategories = _useState[0],
|
|
13190
|
+
setNewsCategories = _useState[1];
|
|
13191
|
+
useEffect(function () {
|
|
13192
|
+
if (shopConfig !== null && shopConfig !== void 0 && shopConfig.shopId && shopConfig !== null && shopConfig !== void 0 && shopConfig.landingShopConfigId) getAllNewsCategories();
|
|
13193
|
+
}, [shopConfig, params]);
|
|
13194
|
+
var getAllNewsCategories = function getAllNewsCategories() {
|
|
13195
|
+
try {
|
|
13196
|
+
var _temp = _catch(function () {
|
|
13197
|
+
return Promise.resolve(getAllNewsCategoriesApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingShopConfigId, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.appId)).then(function (res) {
|
|
13198
|
+
var _res$data, _res$data$status;
|
|
13199
|
+
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) {
|
|
13200
|
+
var _res$data2;
|
|
13201
|
+
setNewsCategories(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
|
|
13202
|
+
}
|
|
13203
|
+
});
|
|
13204
|
+
}, function (error) {
|
|
13205
|
+
console.log(error);
|
|
13206
|
+
});
|
|
13207
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
13208
|
+
} catch (e) {
|
|
13209
|
+
return Promise.reject(e);
|
|
13210
|
+
}
|
|
13211
|
+
};
|
|
13212
|
+
return {
|
|
13213
|
+
newsCategories: newsCategories
|
|
13214
|
+
};
|
|
13215
|
+
};
|
|
13216
|
+
|
|
13217
|
+
dayjs_min.extend(relativeTime);
|
|
13218
|
+
dayjs_min.locale("vi");
|
|
13219
|
+
var News1 = function News1(props) {
|
|
13220
|
+
var _newsArticles$slice;
|
|
13221
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
13222
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
13223
|
+
_props$Link = props.Link,
|
|
13224
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
13225
|
+
_props$catId = props.catId,
|
|
13226
|
+
catId = _props$catId === void 0 ? "" : _props$catId;
|
|
13227
|
+
var _useState = useState({
|
|
13228
|
+
page: 0,
|
|
13229
|
+
sort: "timeUpdate,DESC",
|
|
13230
|
+
size: 10,
|
|
13231
|
+
catId: catId
|
|
13232
|
+
}),
|
|
13233
|
+
params = _useState[0],
|
|
13234
|
+
setParams = _useState[1];
|
|
13235
|
+
var _useState2 = useState({}),
|
|
13236
|
+
categorySelected = _useState2[0],
|
|
13237
|
+
setCategorySelected = _useState2[1];
|
|
13238
|
+
var _useState3 = useState(true),
|
|
13239
|
+
isSeeMore = _useState3[0],
|
|
13240
|
+
setIsSeeMore = _useState3[1];
|
|
13241
|
+
var _NewsController = NewsController(_extends({}, props, {
|
|
13242
|
+
params: params
|
|
13243
|
+
})),
|
|
13244
|
+
_NewsController$newsA = _NewsController.newsArticles,
|
|
13245
|
+
newsArticles = _NewsController$newsA === void 0 ? [] : _NewsController$newsA,
|
|
13246
|
+
loading = _NewsController.loading;
|
|
13247
|
+
var _NewsCategoryControll = NewsCategoryController(props),
|
|
13248
|
+
_NewsCategoryControll2 = _NewsCategoryControll.newsCategories,
|
|
13249
|
+
newsCategories = _NewsCategoryControll2 === void 0 ? [] : _NewsCategoryControll2;
|
|
13250
|
+
var handleSeeMoreNews = function handleSeeMoreNews() {
|
|
13251
|
+
setIsSeeMore(false);
|
|
13252
|
+
setParams(function (prev) {
|
|
13253
|
+
return _extends({}, prev, {
|
|
13254
|
+
size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
|
|
13255
|
+
});
|
|
13256
|
+
});
|
|
13257
|
+
};
|
|
13258
|
+
useEffect(function () {
|
|
13259
|
+
if ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) > 0 && params !== null && params !== void 0 && params.catId) {
|
|
13260
|
+
var category = newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.find(function (item) {
|
|
13261
|
+
return (item === null || item === void 0 ? void 0 : item.catId) == catId;
|
|
13262
|
+
});
|
|
13263
|
+
setCategorySelected(category);
|
|
13264
|
+
}
|
|
13265
|
+
}, [params === null || params === void 0 ? void 0 : params.catId, newsCategories]);
|
|
13266
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
13267
|
+
className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 gap-6"
|
|
13268
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13269
|
+
className: "md:col-span-2 flex flex-col gap-8"
|
|
13270
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
13271
|
+
className: "px-6 py-3 text-textButton text-lg rounded-t-lg bg-primary w-max"
|
|
13272
|
+
}, params !== null && params !== void 0 && params.catId ? categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catName : "Tin mới"), /*#__PURE__*/React__default.createElement("div", {
|
|
13273
|
+
className: "w-full border border-primary"
|
|
13274
|
+
})), loading & isSeeMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
13275
|
+
className: "w-full h-80 flex justify-center items-center"
|
|
13276
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : /*#__PURE__*/React__default.createElement("div", {
|
|
13277
|
+
className: "flex flex-col gap-8"
|
|
13278
|
+
}, (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > 0 ? newsArticles === null || newsArticles === void 0 ? void 0 : (_newsArticles$slice = newsArticles.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _newsArticles$slice === void 0 ? void 0 : _newsArticles$slice.map(function (item, index) {
|
|
13279
|
+
var _dayjs;
|
|
13280
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13281
|
+
href: getLinkNewsDetail(item),
|
|
13282
|
+
Link: Link,
|
|
13283
|
+
key: "kghf-" + index
|
|
13284
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13285
|
+
className: "grid grid-cols-2 gap-2 md:gap-4 cursor-pointer",
|
|
13286
|
+
key: "djfsdf-" + index
|
|
13287
|
+
}, /*#__PURE__*/React__default.createElement(NewsImage, {
|
|
13288
|
+
news: item
|
|
13289
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13290
|
+
className: "flex flex-col gap-2 md:gap-3 pb-4"
|
|
13291
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13292
|
+
className: "font-medium text-lg md:text-xl line-clamp-2"
|
|
13293
|
+
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
|
|
13294
|
+
className: "line-clamp-3 font-normal min-h-6 md:min-h-20 text-gray3"
|
|
13295
|
+
}, item === null || item === void 0 ? void 0 : item.shortDescription), /*#__PURE__*/React__default.createElement("div", {
|
|
13296
|
+
className: " text-gray3"
|
|
13297
|
+
}, (_dayjs = dayjs_min(item === null || item === void 0 ? void 0 : item.timeUpdate)) === null || _dayjs === void 0 ? void 0 : _dayjs.fromNow()))));
|
|
13298
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
13299
|
+
className: "w-full h-64 flex flex-col justify-center items-center text-gray3"
|
|
13300
|
+
}, /*#__PURE__*/React__default.createElement(GiNewspaper, {
|
|
13301
|
+
size: 80
|
|
13302
|
+
}), " Kh\xF4ng c\xF3 tin t\u1EE9c n\xE0o"), (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
|
|
13303
|
+
label: "Xem th\xEAm",
|
|
13304
|
+
shopConfigStyle: shopConfigStyle,
|
|
13305
|
+
onClick: handleSeeMoreNews,
|
|
13306
|
+
className: "w-max mx-auto"
|
|
13307
|
+
}) : null)), /*#__PURE__*/React__default.createElement("div", {
|
|
13308
|
+
className: "sticky top-20 self-start"
|
|
13309
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13310
|
+
className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
|
|
13311
|
+
}, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
|
|
13312
|
+
className: "rounded-b-lg bg-bgSecondary"
|
|
13313
|
+
}, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
|
|
13314
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13315
|
+
href: getLinkNewsByCategory(item),
|
|
13316
|
+
Link: Link,
|
|
13317
|
+
key: "fjhnfg-" + index
|
|
13318
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13319
|
+
className: "px-6 py-3 hover:bg-gray-100 hover:text-primary cursor-pointer",
|
|
13320
|
+
key: "sdjfdh-" + index
|
|
13321
|
+
}, item === null || item === void 0 ? void 0 : item.catName));
|
|
13322
|
+
}))));
|
|
13323
|
+
};
|
|
13324
|
+
|
|
13325
|
+
var NewsDetailController = function NewsDetailController(props) {
|
|
13326
|
+
var shopConfig = props.shopConfig,
|
|
13327
|
+
_props$articleId = props.articleId,
|
|
13328
|
+
articleId = _props$articleId === void 0 ? 0 : _props$articleId;
|
|
13329
|
+
var _useState = useState(),
|
|
13330
|
+
article = _useState[0],
|
|
13331
|
+
setArticle = _useState[1];
|
|
13332
|
+
useEffect(function () {
|
|
13333
|
+
if (articleId) {
|
|
13334
|
+
getProductDetail();
|
|
13335
|
+
}
|
|
13336
|
+
}, [articleId]);
|
|
13337
|
+
var getProductDetail = function getProductDetail() {
|
|
13338
|
+
try {
|
|
13339
|
+
var _temp = _catch(function () {
|
|
13340
|
+
return Promise.resolve(getNewsDetailApi(articleId, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingShopConfigId)).then(function (res) {
|
|
13341
|
+
var _res$data, _res$data$status;
|
|
13342
|
+
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) {
|
|
13343
|
+
var _res$data2;
|
|
13344
|
+
setArticle(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
|
|
13345
|
+
}
|
|
13346
|
+
});
|
|
13347
|
+
}, function (e) {
|
|
13348
|
+
console.log(e);
|
|
13349
|
+
});
|
|
13350
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
13351
|
+
} catch (e) {
|
|
13352
|
+
return Promise.reject(e);
|
|
13353
|
+
}
|
|
13354
|
+
};
|
|
13355
|
+
return {
|
|
13356
|
+
article: article
|
|
13357
|
+
};
|
|
13358
|
+
};
|
|
13359
|
+
|
|
13360
|
+
dayjs_min.extend(relativeTime);
|
|
13361
|
+
dayjs_min.locale("vi");
|
|
13362
|
+
var NewsDetail1 = function NewsDetail1(props) {
|
|
13363
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
13364
|
+
_props$catId = props.catId,
|
|
13365
|
+
catId = _props$catId === void 0 ? 0 : _props$catId,
|
|
13366
|
+
_props$Link = props.Link,
|
|
13367
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
13368
|
+
var _useState = useState({
|
|
13369
|
+
catId: catId,
|
|
13370
|
+
szie: 10
|
|
13371
|
+
}),
|
|
13372
|
+
params = _useState[0],
|
|
13373
|
+
setParams = _useState[1];
|
|
13374
|
+
var _NewsDetailController = NewsDetailController(props),
|
|
13375
|
+
_NewsDetailController2 = _NewsDetailController.article,
|
|
13376
|
+
article = _NewsDetailController2 === void 0 ? {} : _NewsDetailController2;
|
|
13377
|
+
var _NewsCategoryControll = NewsCategoryController(props),
|
|
13378
|
+
_NewsCategoryControll2 = _NewsCategoryControll.newsCategories,
|
|
13379
|
+
newsCategories = _NewsCategoryControll2 === void 0 ? [] : _NewsCategoryControll2;
|
|
13380
|
+
var _NewsController = NewsController(_extends({}, props, {
|
|
13381
|
+
params: params
|
|
13382
|
+
})),
|
|
13383
|
+
_NewsController$newsA = _NewsController.newsArticles,
|
|
13384
|
+
newsArticles = _NewsController$newsA === void 0 ? [] : _NewsController$newsA;
|
|
13385
|
+
var handleSeeMore = function handleSeeMore() {
|
|
13386
|
+
setParams(function (prev) {
|
|
13387
|
+
return _extends({}, prev, {
|
|
13388
|
+
size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
|
|
13389
|
+
});
|
|
13390
|
+
});
|
|
13391
|
+
};
|
|
13392
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
13393
|
+
className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 mt-0 md:mt-0 gap-6"
|
|
13394
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13395
|
+
className: "md:col-span-2 flex flex-col gap-4"
|
|
13396
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
13397
|
+
className: "text-2xl font-medium"
|
|
13398
|
+
}, article === null || article === void 0 ? void 0 : article.title), /*#__PURE__*/React__default.createElement("div", {
|
|
13399
|
+
className: "flex items-center gap-2 text-gray3 mt-2"
|
|
13400
|
+
}, /*#__PURE__*/React__default.createElement(GoClock, null), dayjs_min(article === null || article === void 0 ? void 0 : article.timeUpdate).fromNow())), /*#__PURE__*/React__default.createElement("div", {
|
|
13401
|
+
className: "text-gray2"
|
|
13402
|
+
}, article === null || article === void 0 ? void 0 : article.shortDescription), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
|
|
13403
|
+
news: article
|
|
13404
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
13405
|
+
dangerouslySetInnerHTML: {
|
|
13406
|
+
__html: article === null || article === void 0 ? void 0 : article.content
|
|
13407
|
+
}
|
|
13408
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13409
|
+
className: "mt-6"
|
|
13410
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13411
|
+
className: "font-medium text-2xl mb-4"
|
|
13412
|
+
}, "Tin c\xF9ng chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
|
|
13413
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-6"
|
|
13414
|
+
}, newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.map(function (item, index) {
|
|
13415
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13416
|
+
href: getLinkNewsDetail(item),
|
|
13417
|
+
Link: Link,
|
|
13418
|
+
key: "kghf-" + index
|
|
13419
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
|
|
13420
|
+
news: item
|
|
13421
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13422
|
+
className: "font-medium text-lg line-clamp-2"
|
|
13423
|
+
}, item === null || item === void 0 ? void 0 : item.title)));
|
|
13424
|
+
})), (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement("div", {
|
|
13425
|
+
className: "flex justify-center mt-4 w-full"
|
|
13426
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
13427
|
+
label: "Xem thêm",
|
|
13428
|
+
onClick: handleSeeMore,
|
|
13429
|
+
shopConfigStyle: shopConfigStyle
|
|
13430
|
+
})) : null)), /*#__PURE__*/React__default.createElement("div", {
|
|
13431
|
+
className: "sticky top-20 self-start"
|
|
13432
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13433
|
+
className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
|
|
13434
|
+
}, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
|
|
13435
|
+
className: "rounded-b-lg bg-bgSecondary"
|
|
13436
|
+
}, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
|
|
13437
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13438
|
+
href: getLinkNewsByCategory(item),
|
|
13439
|
+
Link: Link
|
|
13440
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13441
|
+
className: "px-6 py-3 hover:bg-gray-100 hover:text-primary cursor-pointer",
|
|
13442
|
+
key: "sdjfdh-" + index
|
|
13443
|
+
}, item === null || item === void 0 ? void 0 : item.catName));
|
|
13444
|
+
}))));
|
|
13445
|
+
};
|
|
13446
|
+
|
|
13447
|
+
export { About1, About5, Address1, Banner1, Banner2, Banner3, Banner7, BannerFull1, BannerFull2, Booking1, BookingForm6, Breadcrumb1, Button, Carts1, Contact1, CustomerRating1, CustomerRating10, CustomerRating5, CustomerRating6, DateTimePicker, Employees1, Features2, Features3, Footer1, Footer7, Gallery1, Hero1, Hero10, Hero11 as Hero12, Hero13, Hero2, Hero5, Hero6, Input, InputPhoneNumber, Links1, ModalNotification, NavBar1, NavBar7, News1, NewsDetail1, NewsHighlight1, PageTitle1, Partner1, ProductCategory2, ProductDetail10, ProductHighlight1, ProductHot1, ProductHot3, ProductItem2, ProductItem3, ProductItem4, ProductItem5, ProductItem6, ProductItem7, ProductList5, ProductList7, ProductSale2, ProductSearch1, Products10, Products2, Products3, ProductsTop1, SearchBar2, SearchBar5, SearchBar6, SearchProduct1, SectionTitle1, SectionTitle2, SectionTitle3, Select$1 as Select, ServiceDetail1, ShopHighlights2, ShopHighlights5, ShopHighlights6, ShopHighlights7, TextArea, TreatmentDetail1, TreatmentItem1, TreatmentsCategory7, TreatmentsList6, TreatmentsList7, VideoFull1 };
|
|
12898
13448
|
//# sourceMappingURL=index.modern.js.map
|