s-platform-landing-section 0.1.36-beta.6 → 0.1.36-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +94 -104
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +94 -104
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -436,7 +436,7 @@ var NavBar7 = function NavBar7(props) {
|
|
|
436
436
|
href: "/",
|
|
437
437
|
className: "flex items-center gap-2"
|
|
438
438
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
439
|
-
className: "object-
|
|
439
|
+
className: "object-contain w-12 h-12",
|
|
440
440
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
|
|
441
441
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
442
442
|
className: "text-xl md:text-2xl text-primary font-headingFont text-wrap line-clamp-2 leading-tight"
|
|
@@ -499,7 +499,7 @@ var NavBar7 = function NavBar7(props) {
|
|
|
499
499
|
href: "/",
|
|
500
500
|
className: "flex flex-1 gap-2 items-center"
|
|
501
501
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
502
|
-
className: "object-
|
|
502
|
+
className: "object-contain w-12 h-12",
|
|
503
503
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
|
|
504
504
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
505
505
|
className: "text-xl md:text-2xl font-headingFont text-wrap text-primary line-clamp-2"
|
|
@@ -533,7 +533,7 @@ var NavBar7 = function NavBar7(props) {
|
|
|
533
533
|
className: "flex gap-2 items-center mb-2"
|
|
534
534
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
535
535
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
536
|
-
className: "
|
|
536
|
+
className: "h-14 w-14 object-contain"
|
|
537
537
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
538
538
|
className: "text-xl font-headingFont text-primary line-clamp-1"
|
|
539
539
|
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName))), /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -729,7 +729,7 @@ var NavBar1 = function NavBar1(props) {
|
|
|
729
729
|
href: "/",
|
|
730
730
|
className: "flex items-center gap-2"
|
|
731
731
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
732
|
-
className: "object-
|
|
732
|
+
className: "object-contain w-12 h-12",
|
|
733
733
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
734
734
|
alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
|
|
735
735
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
@@ -791,7 +791,7 @@ var NavBar1 = function NavBar1(props) {
|
|
|
791
791
|
href: "/",
|
|
792
792
|
className: "flex flex-1 gap-2 items-center"
|
|
793
793
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
794
|
-
className: "object-
|
|
794
|
+
className: "object-contain w-12 h-12",
|
|
795
795
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
796
796
|
alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
|
|
797
797
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
@@ -826,7 +826,7 @@ var NavBar1 = function NavBar1(props) {
|
|
|
826
826
|
className: "flex gap-2 items-center mb-2"
|
|
827
827
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
828
828
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
829
|
-
className: "
|
|
829
|
+
className: "h-14 w-14 object-contain"
|
|
830
830
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
831
831
|
className: "text-xl font-headingFont text-primary line-clamp-1"
|
|
832
832
|
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName))), /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -1236,7 +1236,7 @@ var Hero2 = function Hero2(props) {
|
|
|
1236
1236
|
className: "absolute inset-y-0 right-[2%] md:right-[4%] w-[58%] md:w-[54%] flex flex-col gap-2 md:gap-4 xl:gap-6 justify-center items-start px-4 pt-4 pb-2 md:px-8 md:pt-8 md:pb-6 xl:p-8"
|
|
1237
1237
|
}, shopConfig !== null && shopConfig !== void 0 && shopConfig.logoUrl ? /*#__PURE__*/React__default.createElement("img", {
|
|
1238
1238
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
1239
|
-
className: "h-6 w-6 sm:h-10 sm:w-10 md:h-12 md:w-12 lg:w-14 lg:h-14 xl:h-20 xl:w-20"
|
|
1239
|
+
className: "h-6 w-6 object-contain sm:h-10 sm:w-10 md:h-12 md:w-12 lg:w-14 lg:h-14 xl:h-20 xl:w-20"
|
|
1240
1240
|
}) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
1241
1241
|
className: "font-medium line-clamp-2 lg:line-clamp-1 text-2xl md:text-3xl lg:text-4xl xl:text-6xl",
|
|
1242
1242
|
style: {
|
|
@@ -7774,19 +7774,19 @@ var Hero16 = function Hero16(props) {
|
|
|
7774
7774
|
className: "min-h-[480px] w-full h-full relative"
|
|
7775
7775
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
7776
7776
|
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],
|
|
7777
|
-
className: "object-cover
|
|
7777
|
+
className: "object-cover w-full h-full min-h-[480px]"
|
|
7778
7778
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7779
7779
|
className: "absolute top-0 left-0 z-0 bg-secondary opacity-80 w-full h-full"
|
|
7780
7780
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7781
|
-
className: "w-full
|
|
7781
|
+
className: "w-full sm:w-2/3 absolute z-20 top-[15%] md:top-1/3 left-0 z-10 px-4 xl:px-20 flex flex-col gap-6 text-textButton my-auto"
|
|
7782
7782
|
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
7783
7783
|
className: "font-medium text-2xl lg:text-4xl"
|
|
7784
7784
|
}, 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", {
|
|
7785
7785
|
className: " text-lg lg:text-2xl"
|
|
7786
7786
|
}, 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), /*#__PURE__*/React__default.createElement("div", {
|
|
7787
|
-
className: "flex flex-col
|
|
7787
|
+
className: "flex flex-col sm:flex-row gap-4 w-full"
|
|
7788
7788
|
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
7789
|
-
wrapClassName: "w-
|
|
7789
|
+
wrapClassName: "w-2/3 sm:w-[80%] xl:w-[85%]",
|
|
7790
7790
|
icons: /*#__PURE__*/React__default.createElement(lu.LuSearch, {
|
|
7791
7791
|
className: "text-gray3",
|
|
7792
7792
|
size: 18
|
|
@@ -7820,31 +7820,36 @@ var Hero16 = function Hero16(props) {
|
|
|
7820
7820
|
fill: "currentColor"
|
|
7821
7821
|
}))), /*#__PURE__*/React__default.createElement("img", {
|
|
7822
7822
|
src: 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$$srcImage = _data$data4$.srcImages) === null || _data$data4$$srcImage === void 0 ? void 0 : _data$data4$$srcImage[1],
|
|
7823
|
-
className: "object-cover w-[
|
|
7823
|
+
className: "object-cover w-[25%] h-auto max-h-full absolute right-10 opacity-100 bottom-0 z-10"
|
|
7824
7824
|
}));
|
|
7825
7825
|
};
|
|
7826
7826
|
|
|
7827
7827
|
var Features2 = function Features2(props) {
|
|
7828
|
-
var data = props.data
|
|
7828
|
+
var data = props.data,
|
|
7829
|
+
_props$Link = props.Link,
|
|
7830
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
7829
7831
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7830
7832
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7831
7833
|
className: "" + SECTION_DEFAULT_CLASS
|
|
7832
7834
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7833
7835
|
className: "p-6 grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6 lg:gap-8 rounded-xl bg-bgSecondary"
|
|
7834
7836
|
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
7835
|
-
return /*#__PURE__*/React__default.createElement(
|
|
7837
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7838
|
+
Link: Link,
|
|
7839
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
|
|
7840
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7836
7841
|
className: "flex flex-col gap-2 items-center text-sm lg:text-lg font-semibold text-center",
|
|
7837
7842
|
key: "dfgg-" + index
|
|
7838
7843
|
}, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
7839
|
-
className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24
|
|
7844
|
+
className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24 aspect-square",
|
|
7840
7845
|
dangerouslySetInnerHTML: {
|
|
7841
7846
|
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
7842
7847
|
}
|
|
7843
7848
|
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
7844
7849
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
7845
|
-
className: "w-12 md:w-16 lg:w-20 xl:w-24 text-primary",
|
|
7850
|
+
className: "w-12 md:w-16 lg:w-20 object-contain xl:w-24 aspect-square text-primary",
|
|
7846
7851
|
alt: "logo"
|
|
7847
|
-
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title));
|
|
7852
|
+
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title)));
|
|
7848
7853
|
})));
|
|
7849
7854
|
};
|
|
7850
7855
|
|
|
@@ -10769,7 +10774,14 @@ var Products2 = function Products2(props) {
|
|
|
10769
10774
|
var _useState2 = React.useState(false),
|
|
10770
10775
|
canGoNext = _useState2[0],
|
|
10771
10776
|
setCanGoNext = _useState2[1];
|
|
10772
|
-
var
|
|
10777
|
+
var _useState3 = React.useState({
|
|
10778
|
+
size: 16,
|
|
10779
|
+
isSale: true
|
|
10780
|
+
}),
|
|
10781
|
+
params = _useState3[0];
|
|
10782
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
10783
|
+
params: params
|
|
10784
|
+
})),
|
|
10773
10785
|
_ProductController$pr = _ProductController.products,
|
|
10774
10786
|
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
10775
10787
|
_ProductController$lo = _ProductController.loading,
|
|
@@ -11452,48 +11464,38 @@ var Products11 = function Products11(props) {
|
|
|
11452
11464
|
return (a === null || a === void 0 ? void 0 : (_a$productInfo = a.productInfo) === null || _a$productInfo === void 0 ? void 0 : _a$productInfo.price) - (b === null || b === void 0 ? void 0 : (_b$productInfo = b.productInfo) === null || _b$productInfo === void 0 ? void 0 : _b$productInfo.price);
|
|
11453
11465
|
});
|
|
11454
11466
|
setProductsFilter(productsCopy);
|
|
11455
|
-
} else if ((filterItem === null || filterItem === void 0 ? void 0 : filterItem.value) === "discount") {
|
|
11456
|
-
var _productsCopy2;
|
|
11457
|
-
var _productsCopy = [].concat(products);
|
|
11458
|
-
_productsCopy = (_productsCopy2 = _productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
|
|
11459
|
-
var _product$productInfo, _product$productInfo2, _product$productInfo3;
|
|
11460
|
-
return (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo3 = product.productInfo) === null || _product$productInfo3 === void 0 ? void 0 : _product$productInfo3.price);
|
|
11461
|
-
});
|
|
11462
|
-
setProductsFilter(_productsCopy);
|
|
11463
11467
|
} else {
|
|
11464
11468
|
setProductsFilter(products);
|
|
11465
11469
|
}
|
|
11466
11470
|
}, [products, categorySelected]);
|
|
11467
11471
|
var handleFilter = function handleFilter(item) {
|
|
11468
11472
|
setFilterItem(item);
|
|
11469
|
-
if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC" && !(params !== null && params !== void 0 && params.isHighlight)) {
|
|
11473
|
+
if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC" && !(params !== null && params !== void 0 && params.isHighlight) && !(params !== null && params !== void 0 && params.isSale)) {
|
|
11470
11474
|
var productsCopy = [].concat(products);
|
|
11471
11475
|
productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.sort(function (a, b) {
|
|
11472
11476
|
var _a$productInfo2, _b$productInfo2;
|
|
11473
11477
|
return (a === null || a === void 0 ? void 0 : (_a$productInfo2 = a.productInfo) === null || _a$productInfo2 === void 0 ? void 0 : _a$productInfo2.price) - (b === null || b === void 0 ? void 0 : (_b$productInfo2 = b.productInfo) === null || _b$productInfo2 === void 0 ? void 0 : _b$productInfo2.price);
|
|
11474
11478
|
});
|
|
11475
11479
|
setProductsFilter(productsCopy);
|
|
11476
|
-
} else if ((item === null || item === void 0 ? void 0 : item.value) === "discount"
|
|
11477
|
-
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
|
|
11480
|
+
} else if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
|
|
11481
|
+
setParams({
|
|
11482
|
+
page: 0,
|
|
11483
|
+
categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
|
|
11484
|
+
size: 12,
|
|
11485
|
+
isSale: true
|
|
11482
11486
|
});
|
|
11483
|
-
setProductsFilter(_productsCopy3);
|
|
11484
11487
|
} else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
|
|
11485
|
-
setParams(
|
|
11486
|
-
|
|
11487
|
-
|
|
11488
|
-
|
|
11488
|
+
setParams({
|
|
11489
|
+
page: 0,
|
|
11490
|
+
categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
|
|
11491
|
+
size: 12,
|
|
11492
|
+
isHighlight: true
|
|
11489
11493
|
});
|
|
11490
11494
|
} else {
|
|
11491
|
-
setParams(
|
|
11492
|
-
|
|
11493
|
-
|
|
11494
|
-
|
|
11495
|
-
size: 12
|
|
11496
|
-
};
|
|
11495
|
+
setParams({
|
|
11496
|
+
page: 0,
|
|
11497
|
+
categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
|
|
11498
|
+
size: 12
|
|
11497
11499
|
});
|
|
11498
11500
|
}
|
|
11499
11501
|
};
|
|
@@ -11791,7 +11793,7 @@ var listFilter$1 = [{
|
|
|
11791
11793
|
}
|
|
11792
11794
|
}];
|
|
11793
11795
|
var ProductSearch1 = function ProductSearch1(props) {
|
|
11794
|
-
var _window, _window$location,
|
|
11796
|
+
var _window, _window$location, _products$slice;
|
|
11795
11797
|
var _props$Link = props.Link,
|
|
11796
11798
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
11797
11799
|
_props$SectionTitle = props.SectionTitle,
|
|
@@ -11801,21 +11803,18 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11801
11803
|
shopConfigStyle = props.shopConfigStyle;
|
|
11802
11804
|
var queryParams = new URLSearchParams((_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : _window$location.search);
|
|
11803
11805
|
var keywordValue = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get('tu-khoa');
|
|
11804
|
-
var _useState = React.useState(
|
|
11805
|
-
productsFilter = _useState[0],
|
|
11806
|
-
setProductsFilter = _useState[1];
|
|
11807
|
-
var _useState2 = React.useState({
|
|
11806
|
+
var _useState = React.useState({
|
|
11808
11807
|
productName: keywordValue,
|
|
11809
11808
|
size: 12
|
|
11810
11809
|
}),
|
|
11811
|
-
params =
|
|
11812
|
-
setParams =
|
|
11813
|
-
var
|
|
11814
|
-
isGetMore =
|
|
11815
|
-
setIsGetMore =
|
|
11816
|
-
var
|
|
11817
|
-
isAutoGetList =
|
|
11818
|
-
setIsAutoGetList =
|
|
11810
|
+
params = _useState[0],
|
|
11811
|
+
setParams = _useState[1];
|
|
11812
|
+
var _useState2 = React.useState(true),
|
|
11813
|
+
isGetMore = _useState2[0],
|
|
11814
|
+
setIsGetMore = _useState2[1];
|
|
11815
|
+
var _useState3 = React.useState(false),
|
|
11816
|
+
isAutoGetList = _useState3[0],
|
|
11817
|
+
setIsAutoGetList = _useState3[1];
|
|
11819
11818
|
var _ProductController = ProductController(_extends({}, props, {
|
|
11820
11819
|
params: params,
|
|
11821
11820
|
isAutoGetList: isAutoGetList
|
|
@@ -11823,9 +11822,6 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11823
11822
|
products = _ProductController.products,
|
|
11824
11823
|
loading = _ProductController.loading,
|
|
11825
11824
|
page = _ProductController.page;
|
|
11826
|
-
var _useState5 = React.useState({}),
|
|
11827
|
-
filterValue = _useState5[0],
|
|
11828
|
-
setFilterValue = _useState5[1];
|
|
11829
11825
|
React.useEffect(function () {
|
|
11830
11826
|
setIsAutoGetList(true);
|
|
11831
11827
|
setParams(function (prev) {
|
|
@@ -11834,19 +11830,6 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11834
11830
|
});
|
|
11835
11831
|
});
|
|
11836
11832
|
}, [keywordValue]);
|
|
11837
|
-
React.useEffect(function () {
|
|
11838
|
-
if ((filterValue === null || filterValue === void 0 ? void 0 : filterValue.value) === "discount") {
|
|
11839
|
-
var _productsCopy;
|
|
11840
|
-
var productsCopy = [].concat(products);
|
|
11841
|
-
productsCopy = (_productsCopy = productsCopy) === null || _productsCopy === void 0 ? void 0 : _productsCopy.filter(function (product) {
|
|
11842
|
-
var _product$productInfo, _product$productInfo2, _product$productInfo3;
|
|
11843
|
-
return (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo3 = product.productInfo) === null || _product$productInfo3 === void 0 ? void 0 : _product$productInfo3.price);
|
|
11844
|
-
});
|
|
11845
|
-
setProductsFilter(productsCopy);
|
|
11846
|
-
} else {
|
|
11847
|
-
setProductsFilter(products);
|
|
11848
|
-
}
|
|
11849
|
-
}, [products]);
|
|
11850
11833
|
var handleGetMoreProducts = function handleGetMoreProducts() {
|
|
11851
11834
|
setIsGetMore(false);
|
|
11852
11835
|
setParams(function (prev) {
|
|
@@ -11856,20 +11839,17 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11856
11839
|
});
|
|
11857
11840
|
};
|
|
11858
11841
|
var handleFilter = function handleFilter(item) {
|
|
11859
|
-
|
|
11860
|
-
|
|
11861
|
-
|
|
11862
|
-
|
|
11863
|
-
|
|
11864
|
-
var _product$productInfo4, _product$productInfo5, _product$productInfo6;
|
|
11865
|
-
return (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.price);
|
|
11842
|
+
if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
|
|
11843
|
+
setParams({
|
|
11844
|
+
size: 12,
|
|
11845
|
+
productName: keywordValue,
|
|
11846
|
+
isSale: true
|
|
11866
11847
|
});
|
|
11867
|
-
setProductsFilter(productsCopy);
|
|
11868
11848
|
} else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
|
|
11869
|
-
setParams(
|
|
11870
|
-
|
|
11871
|
-
|
|
11872
|
-
|
|
11849
|
+
setParams({
|
|
11850
|
+
size: 12,
|
|
11851
|
+
productName: keywordValue,
|
|
11852
|
+
isHighlight: true
|
|
11873
11853
|
});
|
|
11874
11854
|
} else {
|
|
11875
11855
|
setParams({
|
|
@@ -11893,15 +11873,15 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11893
11873
|
onClick: handleFilter
|
|
11894
11874
|
}), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
11895
11875
|
className: "m-auto mt-20 min-h-32"
|
|
11896
|
-
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (
|
|
11876
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
11897
11877
|
className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-x-2 gap-y-4 md:gap-4 xl:gap-6"
|
|
11898
|
-
},
|
|
11878
|
+
}, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, idx) {
|
|
11899
11879
|
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
11900
11880
|
Link: Link,
|
|
11901
11881
|
product: product,
|
|
11902
11882
|
key: "htrhr-" + idx
|
|
11903
11883
|
});
|
|
11904
|
-
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (
|
|
11884
|
+
})) : /*#__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, {
|
|
11905
11885
|
label: "Xem thêm",
|
|
11906
11886
|
onClick: handleGetMoreProducts,
|
|
11907
11887
|
className: "mx-auto " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass),
|
|
@@ -13034,7 +13014,9 @@ var Banner1 = function Banner1(props) {
|
|
|
13034
13014
|
var data = props.data,
|
|
13035
13015
|
shopConfigStyle = props.shopConfigStyle,
|
|
13036
13016
|
_props$SectionTitle = props.SectionTitle,
|
|
13037
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle
|
|
13017
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
13018
|
+
_props$Link = props.Link,
|
|
13019
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
13038
13020
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
13039
13021
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
13040
13022
|
className: "" + SECTION_DEFAULT_CLASS
|
|
@@ -13044,12 +13026,15 @@ var Banner1 = function Banner1(props) {
|
|
|
13044
13026
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13045
13027
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-4 lg:gap-6 mt-6"
|
|
13046
13028
|
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
13047
|
-
return /*#__PURE__*/React__default.createElement(
|
|
13029
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13030
|
+
Link: Link,
|
|
13031
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
|
|
13032
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13048
13033
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
13049
13034
|
alt: "",
|
|
13050
13035
|
className: "rounded-2xl",
|
|
13051
13036
|
key: "hnfhn-" + index
|
|
13052
|
-
});
|
|
13037
|
+
}));
|
|
13053
13038
|
})));
|
|
13054
13039
|
};
|
|
13055
13040
|
|
|
@@ -13139,25 +13124,30 @@ var Banner3 = function Banner3(props) {
|
|
|
13139
13124
|
};
|
|
13140
13125
|
|
|
13141
13126
|
var Banner4 = function Banner4(props) {
|
|
13142
|
-
var _data$data, _data$data$, _data$data2, _data$data2$slice;
|
|
13127
|
+
var _data$data, _data$data$, _data$data2, _data$data2$, _data$data3, _data$data3$, _data$data4, _data$data4$slice;
|
|
13143
13128
|
var data = props.data,
|
|
13144
13129
|
_props$Link = props.Link,
|
|
13145
13130
|
Link = _props$Link === void 0 ? null : _props$Link;
|
|
13146
13131
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
13147
13132
|
className: SECTION_CLASS_PADDING + " grid grid-cols-1 bg-bgSecondary md:grid-cols-3 gap-6"
|
|
13133
|
+
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13134
|
+
className: "md:col-span-2",
|
|
13135
|
+
Link: Link,
|
|
13136
|
+
href: convertURL(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) || "#"
|
|
13148
13137
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13149
|
-
src: data === null || data === void 0 ? void 0 : (_data$
|
|
13150
|
-
className: "
|
|
13151
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13152
|
-
className: "flex flex-col gap-6"
|
|
13153
|
-
}, data === null || data === void 0 ? void 0 : (_data$
|
|
13138
|
+
src: 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$.srcImage,
|
|
13139
|
+
className: " object-cover w-full h-full rounded-[10px]"
|
|
13140
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
13141
|
+
className: "flex flex-col gap-6 h-full"
|
|
13142
|
+
}, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$slice = _data$data4.slice(1, 3)) === null || _data$data4$slice === void 0 ? void 0 : _data$data4$slice.map(function (item, index) {
|
|
13154
13143
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13155
13144
|
Link: Link,
|
|
13156
13145
|
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
13146
|
+
className: "flex-1 min-h-0",
|
|
13157
13147
|
key: "djsd-" + index
|
|
13158
13148
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13159
13149
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
13160
|
-
className: "object-cover w-full h-full rounded-
|
|
13150
|
+
className: "object-cover w-full h-full rounded-[10px]"
|
|
13161
13151
|
}));
|
|
13162
13152
|
})));
|
|
13163
13153
|
};
|
|
@@ -13564,7 +13554,7 @@ var Footer1 = function Footer1(props) {
|
|
|
13564
13554
|
href: "/",
|
|
13565
13555
|
className: "flex items-center"
|
|
13566
13556
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13567
|
-
className: "object-
|
|
13557
|
+
className: "object-contain w-14 h-14",
|
|
13568
13558
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
|
|
13569
13559
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
13570
13560
|
className: "text-2xl md:text-3xl ms-2 font-headingFont ",
|
|
@@ -13707,7 +13697,7 @@ var Footer7 = function Footer7(props) {
|
|
|
13707
13697
|
href: "/",
|
|
13708
13698
|
className: "flex items-center gap-2"
|
|
13709
13699
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13710
|
-
className: "object-
|
|
13700
|
+
className: "object-contain w-14 h-14",
|
|
13711
13701
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
|
|
13712
13702
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
13713
13703
|
className: " text-2xl md:text-3xl ms-2 font-headingFont ",
|
|
@@ -15628,7 +15618,7 @@ var ShopHighlights2 = function ShopHighlights2(props) {
|
|
|
15628
15618
|
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
15629
15619
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
15630
15620
|
alt: "logo",
|
|
15631
|
-
className: "w-16 h-16 p-3 rounded-full bg-primary"
|
|
15621
|
+
className: "w-16 h-16 p-3 rounded-full object-cover bg-primary"
|
|
15632
15622
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15633
15623
|
className: "font-medium text-lg"
|
|
15634
15624
|
}, item === null || item === void 0 ? void 0 : (_item$title = item.title) === null || _item$title === void 0 ? void 0 : _item$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -15660,7 +15650,7 @@ var ShopHighlights5 = function ShopHighlights5(props) {
|
|
|
15660
15650
|
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
15661
15651
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
15662
15652
|
alt: "logo",
|
|
15663
|
-
className: "w-16 h-16 rounded-full bg-primary"
|
|
15653
|
+
className: "w-16 h-16 rounded-full object-cover bg-primary"
|
|
15664
15654
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15665
15655
|
className: "font-semibold text-xl text-textHeading pt-2 border-t border-textHeading"
|
|
15666
15656
|
}, item === null || item === void 0 ? void 0 : (_item$title = item.title) === null || _item$title === void 0 ? void 0 : _item$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -15690,7 +15680,7 @@ var ShopHighlights6 = function ShopHighlights6(props) {
|
|
|
15690
15680
|
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
15691
15681
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
15692
15682
|
alt: "logo",
|
|
15693
|
-
className: "w-16 h-16"
|
|
15683
|
+
className: "w-16 h-16 object-cover"
|
|
15694
15684
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15695
15685
|
className: " w-44 h-0.5 rounded-full bg-primary"
|
|
15696
15686
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -15869,7 +15859,7 @@ var ShopHighlights10 = function ShopHighlights10(props) {
|
|
|
15869
15859
|
className: "flex-grow text-lg leading-relaxed text-center text-textSecondary"
|
|
15870
15860
|
}, item === null || item === void 0 ? void 0 : item.description)), /*#__PURE__*/React__default.createElement("img", {
|
|
15871
15861
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
15872
|
-
className: "
|
|
15862
|
+
className: "aspect-video object-cover mt-auto border-4 border-secondary"
|
|
15873
15863
|
})));
|
|
15874
15864
|
})));
|
|
15875
15865
|
};
|