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.modern.js
CHANGED
|
@@ -433,7 +433,7 @@ var NavBar7 = function NavBar7(props) {
|
|
|
433
433
|
href: "/",
|
|
434
434
|
className: "flex items-center gap-2"
|
|
435
435
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
436
|
-
className: "object-
|
|
436
|
+
className: "object-contain w-12 h-12",
|
|
437
437
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
|
|
438
438
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
439
439
|
className: "text-xl md:text-2xl text-primary font-headingFont text-wrap line-clamp-2 leading-tight"
|
|
@@ -496,7 +496,7 @@ var NavBar7 = function NavBar7(props) {
|
|
|
496
496
|
href: "/",
|
|
497
497
|
className: "flex flex-1 gap-2 items-center"
|
|
498
498
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
499
|
-
className: "object-
|
|
499
|
+
className: "object-contain w-12 h-12",
|
|
500
500
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
|
|
501
501
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
502
502
|
className: "text-xl md:text-2xl font-headingFont text-wrap text-primary line-clamp-2"
|
|
@@ -530,7 +530,7 @@ var NavBar7 = function NavBar7(props) {
|
|
|
530
530
|
className: "flex gap-2 items-center mb-2"
|
|
531
531
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
532
532
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
533
|
-
className: "
|
|
533
|
+
className: "h-14 w-14 object-contain"
|
|
534
534
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
535
535
|
className: "text-xl font-headingFont text-primary line-clamp-1"
|
|
536
536
|
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName))), /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -726,7 +726,7 @@ var NavBar1 = function NavBar1(props) {
|
|
|
726
726
|
href: "/",
|
|
727
727
|
className: "flex items-center gap-2"
|
|
728
728
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
729
|
-
className: "object-
|
|
729
|
+
className: "object-contain w-12 h-12",
|
|
730
730
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
731
731
|
alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
|
|
732
732
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
@@ -788,7 +788,7 @@ var NavBar1 = function NavBar1(props) {
|
|
|
788
788
|
href: "/",
|
|
789
789
|
className: "flex flex-1 gap-2 items-center"
|
|
790
790
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
791
|
-
className: "object-
|
|
791
|
+
className: "object-contain w-12 h-12",
|
|
792
792
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
793
793
|
alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
|
|
794
794
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
@@ -823,7 +823,7 @@ var NavBar1 = function NavBar1(props) {
|
|
|
823
823
|
className: "flex gap-2 items-center mb-2"
|
|
824
824
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
825
825
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
826
|
-
className: "
|
|
826
|
+
className: "h-14 w-14 object-contain"
|
|
827
827
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
828
828
|
className: "text-xl font-headingFont text-primary line-clamp-1"
|
|
829
829
|
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName))), /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -1233,7 +1233,7 @@ var Hero2 = function Hero2(props) {
|
|
|
1233
1233
|
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"
|
|
1234
1234
|
}, shopConfig !== null && shopConfig !== void 0 && shopConfig.logoUrl ? /*#__PURE__*/React__default.createElement("img", {
|
|
1235
1235
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
1236
|
-
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"
|
|
1236
|
+
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"
|
|
1237
1237
|
}) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
1238
1238
|
className: "font-medium line-clamp-2 lg:line-clamp-1 text-2xl md:text-3xl lg:text-4xl xl:text-6xl",
|
|
1239
1239
|
style: {
|
|
@@ -7771,19 +7771,19 @@ var Hero16 = function Hero16(props) {
|
|
|
7771
7771
|
className: "min-h-[480px] w-full h-full relative"
|
|
7772
7772
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
7773
7773
|
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],
|
|
7774
|
-
className: "object-cover
|
|
7774
|
+
className: "object-cover w-full h-full min-h-[480px]"
|
|
7775
7775
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7776
7776
|
className: "absolute top-0 left-0 z-0 bg-secondary opacity-80 w-full h-full"
|
|
7777
7777
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7778
|
-
className: "w-full
|
|
7778
|
+
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"
|
|
7779
7779
|
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
7780
7780
|
className: "font-medium text-2xl lg:text-4xl"
|
|
7781
7781
|
}, 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", {
|
|
7782
7782
|
className: " text-lg lg:text-2xl"
|
|
7783
7783
|
}, 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", {
|
|
7784
|
-
className: "flex flex-col
|
|
7784
|
+
className: "flex flex-col sm:flex-row gap-4 w-full"
|
|
7785
7785
|
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
7786
|
-
wrapClassName: "w-
|
|
7786
|
+
wrapClassName: "w-2/3 sm:w-[80%] xl:w-[85%]",
|
|
7787
7787
|
icons: /*#__PURE__*/React__default.createElement(LuSearch, {
|
|
7788
7788
|
className: "text-gray3",
|
|
7789
7789
|
size: 18
|
|
@@ -7817,31 +7817,36 @@ var Hero16 = function Hero16(props) {
|
|
|
7817
7817
|
fill: "currentColor"
|
|
7818
7818
|
}))), /*#__PURE__*/React__default.createElement("img", {
|
|
7819
7819
|
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],
|
|
7820
|
-
className: "object-cover w-[
|
|
7820
|
+
className: "object-cover w-[25%] h-auto max-h-full absolute right-10 opacity-100 bottom-0 z-10"
|
|
7821
7821
|
}));
|
|
7822
7822
|
};
|
|
7823
7823
|
|
|
7824
7824
|
var Features2 = function Features2(props) {
|
|
7825
|
-
var data = props.data
|
|
7825
|
+
var data = props.data,
|
|
7826
|
+
_props$Link = props.Link,
|
|
7827
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
7826
7828
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7827
7829
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7828
7830
|
className: "" + SECTION_DEFAULT_CLASS
|
|
7829
7831
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7830
7832
|
className: "p-6 grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6 lg:gap-8 rounded-xl bg-bgSecondary"
|
|
7831
7833
|
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
7832
|
-
return /*#__PURE__*/React__default.createElement(
|
|
7834
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7835
|
+
Link: Link,
|
|
7836
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
|
|
7837
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7833
7838
|
className: "flex flex-col gap-2 items-center text-sm lg:text-lg font-semibold text-center",
|
|
7834
7839
|
key: "dfgg-" + index
|
|
7835
7840
|
}, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
7836
|
-
className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24
|
|
7841
|
+
className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24 aspect-square",
|
|
7837
7842
|
dangerouslySetInnerHTML: {
|
|
7838
7843
|
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
7839
7844
|
}
|
|
7840
7845
|
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
7841
7846
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
7842
|
-
className: "w-12 md:w-16 lg:w-20 xl:w-24 text-primary",
|
|
7847
|
+
className: "w-12 md:w-16 lg:w-20 object-contain xl:w-24 aspect-square text-primary",
|
|
7843
7848
|
alt: "logo"
|
|
7844
|
-
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title));
|
|
7849
|
+
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title)));
|
|
7845
7850
|
})));
|
|
7846
7851
|
};
|
|
7847
7852
|
|
|
@@ -10766,7 +10771,14 @@ var Products2 = function Products2(props) {
|
|
|
10766
10771
|
var _useState2 = useState(false),
|
|
10767
10772
|
canGoNext = _useState2[0],
|
|
10768
10773
|
setCanGoNext = _useState2[1];
|
|
10769
|
-
var
|
|
10774
|
+
var _useState3 = useState({
|
|
10775
|
+
size: 16,
|
|
10776
|
+
isSale: true
|
|
10777
|
+
}),
|
|
10778
|
+
params = _useState3[0];
|
|
10779
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
10780
|
+
params: params
|
|
10781
|
+
})),
|
|
10770
10782
|
_ProductController$pr = _ProductController.products,
|
|
10771
10783
|
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
10772
10784
|
_ProductController$lo = _ProductController.loading,
|
|
@@ -11449,48 +11461,38 @@ var Products11 = function Products11(props) {
|
|
|
11449
11461
|
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);
|
|
11450
11462
|
});
|
|
11451
11463
|
setProductsFilter(productsCopy);
|
|
11452
|
-
} else if ((filterItem === null || filterItem === void 0 ? void 0 : filterItem.value) === "discount") {
|
|
11453
|
-
var _productsCopy2;
|
|
11454
|
-
var _productsCopy = [].concat(products);
|
|
11455
|
-
_productsCopy = (_productsCopy2 = _productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
|
|
11456
|
-
var _product$productInfo, _product$productInfo2, _product$productInfo3;
|
|
11457
|
-
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);
|
|
11458
|
-
});
|
|
11459
|
-
setProductsFilter(_productsCopy);
|
|
11460
11464
|
} else {
|
|
11461
11465
|
setProductsFilter(products);
|
|
11462
11466
|
}
|
|
11463
11467
|
}, [products, categorySelected]);
|
|
11464
11468
|
var handleFilter = function handleFilter(item) {
|
|
11465
11469
|
setFilterItem(item);
|
|
11466
|
-
if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC" && !(params !== null && params !== void 0 && params.isHighlight)) {
|
|
11470
|
+
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)) {
|
|
11467
11471
|
var productsCopy = [].concat(products);
|
|
11468
11472
|
productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.sort(function (a, b) {
|
|
11469
11473
|
var _a$productInfo2, _b$productInfo2;
|
|
11470
11474
|
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);
|
|
11471
11475
|
});
|
|
11472
11476
|
setProductsFilter(productsCopy);
|
|
11473
|
-
} else if ((item === null || item === void 0 ? void 0 : item.value) === "discount"
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
|
|
11478
|
-
|
|
11477
|
+
} else if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
|
|
11478
|
+
setParams({
|
|
11479
|
+
page: 0,
|
|
11480
|
+
categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
|
|
11481
|
+
size: 12,
|
|
11482
|
+
isSale: true
|
|
11479
11483
|
});
|
|
11480
|
-
setProductsFilter(_productsCopy3);
|
|
11481
11484
|
} else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
|
|
11482
|
-
setParams(
|
|
11483
|
-
|
|
11484
|
-
|
|
11485
|
-
|
|
11485
|
+
setParams({
|
|
11486
|
+
page: 0,
|
|
11487
|
+
categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
|
|
11488
|
+
size: 12,
|
|
11489
|
+
isHighlight: true
|
|
11486
11490
|
});
|
|
11487
11491
|
} else {
|
|
11488
|
-
setParams(
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
size: 12
|
|
11493
|
-
};
|
|
11492
|
+
setParams({
|
|
11493
|
+
page: 0,
|
|
11494
|
+
categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
|
|
11495
|
+
size: 12
|
|
11494
11496
|
});
|
|
11495
11497
|
}
|
|
11496
11498
|
};
|
|
@@ -11788,7 +11790,7 @@ var listFilter$1 = [{
|
|
|
11788
11790
|
}
|
|
11789
11791
|
}];
|
|
11790
11792
|
var ProductSearch1 = function ProductSearch1(props) {
|
|
11791
|
-
var _window, _window$location,
|
|
11793
|
+
var _window, _window$location, _products$slice;
|
|
11792
11794
|
var _props$Link = props.Link,
|
|
11793
11795
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
11794
11796
|
_props$SectionTitle = props.SectionTitle,
|
|
@@ -11798,21 +11800,18 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11798
11800
|
shopConfigStyle = props.shopConfigStyle;
|
|
11799
11801
|
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);
|
|
11800
11802
|
var keywordValue = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get('tu-khoa');
|
|
11801
|
-
var _useState = useState(
|
|
11802
|
-
productsFilter = _useState[0],
|
|
11803
|
-
setProductsFilter = _useState[1];
|
|
11804
|
-
var _useState2 = useState({
|
|
11803
|
+
var _useState = useState({
|
|
11805
11804
|
productName: keywordValue,
|
|
11806
11805
|
size: 12
|
|
11807
11806
|
}),
|
|
11808
|
-
params =
|
|
11809
|
-
setParams =
|
|
11810
|
-
var
|
|
11811
|
-
isGetMore =
|
|
11812
|
-
setIsGetMore =
|
|
11813
|
-
var
|
|
11814
|
-
isAutoGetList =
|
|
11815
|
-
setIsAutoGetList =
|
|
11807
|
+
params = _useState[0],
|
|
11808
|
+
setParams = _useState[1];
|
|
11809
|
+
var _useState2 = useState(true),
|
|
11810
|
+
isGetMore = _useState2[0],
|
|
11811
|
+
setIsGetMore = _useState2[1];
|
|
11812
|
+
var _useState3 = useState(false),
|
|
11813
|
+
isAutoGetList = _useState3[0],
|
|
11814
|
+
setIsAutoGetList = _useState3[1];
|
|
11816
11815
|
var _ProductController = ProductController(_extends({}, props, {
|
|
11817
11816
|
params: params,
|
|
11818
11817
|
isAutoGetList: isAutoGetList
|
|
@@ -11820,9 +11819,6 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11820
11819
|
products = _ProductController.products,
|
|
11821
11820
|
loading = _ProductController.loading,
|
|
11822
11821
|
page = _ProductController.page;
|
|
11823
|
-
var _useState5 = useState({}),
|
|
11824
|
-
filterValue = _useState5[0],
|
|
11825
|
-
setFilterValue = _useState5[1];
|
|
11826
11822
|
useEffect(function () {
|
|
11827
11823
|
setIsAutoGetList(true);
|
|
11828
11824
|
setParams(function (prev) {
|
|
@@ -11831,19 +11827,6 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11831
11827
|
});
|
|
11832
11828
|
});
|
|
11833
11829
|
}, [keywordValue]);
|
|
11834
|
-
useEffect(function () {
|
|
11835
|
-
if ((filterValue === null || filterValue === void 0 ? void 0 : filterValue.value) === "discount") {
|
|
11836
|
-
var _productsCopy;
|
|
11837
|
-
var productsCopy = [].concat(products);
|
|
11838
|
-
productsCopy = (_productsCopy = productsCopy) === null || _productsCopy === void 0 ? void 0 : _productsCopy.filter(function (product) {
|
|
11839
|
-
var _product$productInfo, _product$productInfo2, _product$productInfo3;
|
|
11840
|
-
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);
|
|
11841
|
-
});
|
|
11842
|
-
setProductsFilter(productsCopy);
|
|
11843
|
-
} else {
|
|
11844
|
-
setProductsFilter(products);
|
|
11845
|
-
}
|
|
11846
|
-
}, [products]);
|
|
11847
11830
|
var handleGetMoreProducts = function handleGetMoreProducts() {
|
|
11848
11831
|
setIsGetMore(false);
|
|
11849
11832
|
setParams(function (prev) {
|
|
@@ -11853,20 +11836,17 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11853
11836
|
});
|
|
11854
11837
|
};
|
|
11855
11838
|
var handleFilter = function handleFilter(item) {
|
|
11856
|
-
|
|
11857
|
-
|
|
11858
|
-
|
|
11859
|
-
|
|
11860
|
-
|
|
11861
|
-
var _product$productInfo4, _product$productInfo5, _product$productInfo6;
|
|
11862
|
-
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);
|
|
11839
|
+
if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
|
|
11840
|
+
setParams({
|
|
11841
|
+
size: 12,
|
|
11842
|
+
productName: keywordValue,
|
|
11843
|
+
isSale: true
|
|
11863
11844
|
});
|
|
11864
|
-
setProductsFilter(productsCopy);
|
|
11865
11845
|
} else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
|
|
11866
|
-
setParams(
|
|
11867
|
-
|
|
11868
|
-
|
|
11869
|
-
|
|
11846
|
+
setParams({
|
|
11847
|
+
size: 12,
|
|
11848
|
+
productName: keywordValue,
|
|
11849
|
+
isHighlight: true
|
|
11870
11850
|
});
|
|
11871
11851
|
} else {
|
|
11872
11852
|
setParams({
|
|
@@ -11890,15 +11870,15 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11890
11870
|
onClick: handleFilter
|
|
11891
11871
|
}), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
11892
11872
|
className: "m-auto mt-20 min-h-32"
|
|
11893
|
-
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (
|
|
11873
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
11894
11874
|
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"
|
|
11895
|
-
},
|
|
11875
|
+
}, 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) {
|
|
11896
11876
|
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
11897
11877
|
Link: Link,
|
|
11898
11878
|
product: product,
|
|
11899
11879
|
key: "htrhr-" + idx
|
|
11900
11880
|
});
|
|
11901
|
-
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (
|
|
11881
|
+
})) : /*#__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, {
|
|
11902
11882
|
label: "Xem thêm",
|
|
11903
11883
|
onClick: handleGetMoreProducts,
|
|
11904
11884
|
className: "mx-auto " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass),
|
|
@@ -13031,7 +13011,9 @@ var Banner1 = function Banner1(props) {
|
|
|
13031
13011
|
var data = props.data,
|
|
13032
13012
|
shopConfigStyle = props.shopConfigStyle,
|
|
13033
13013
|
_props$SectionTitle = props.SectionTitle,
|
|
13034
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle
|
|
13014
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
13015
|
+
_props$Link = props.Link,
|
|
13016
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
13035
13017
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
13036
13018
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
13037
13019
|
className: "" + SECTION_DEFAULT_CLASS
|
|
@@ -13041,12 +13023,15 @@ var Banner1 = function Banner1(props) {
|
|
|
13041
13023
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13042
13024
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-4 lg:gap-6 mt-6"
|
|
13043
13025
|
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
13044
|
-
return /*#__PURE__*/React__default.createElement(
|
|
13026
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13027
|
+
Link: Link,
|
|
13028
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
|
|
13029
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13045
13030
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
13046
13031
|
alt: "",
|
|
13047
13032
|
className: "rounded-2xl",
|
|
13048
13033
|
key: "hnfhn-" + index
|
|
13049
|
-
});
|
|
13034
|
+
}));
|
|
13050
13035
|
})));
|
|
13051
13036
|
};
|
|
13052
13037
|
|
|
@@ -13136,25 +13121,30 @@ var Banner3 = function Banner3(props) {
|
|
|
13136
13121
|
};
|
|
13137
13122
|
|
|
13138
13123
|
var Banner4 = function Banner4(props) {
|
|
13139
|
-
var _data$data, _data$data$, _data$data2, _data$data2$slice;
|
|
13124
|
+
var _data$data, _data$data$, _data$data2, _data$data2$, _data$data3, _data$data3$, _data$data4, _data$data4$slice;
|
|
13140
13125
|
var data = props.data,
|
|
13141
13126
|
_props$Link = props.Link,
|
|
13142
13127
|
Link = _props$Link === void 0 ? null : _props$Link;
|
|
13143
13128
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
13144
13129
|
className: SECTION_CLASS_PADDING + " grid grid-cols-1 bg-bgSecondary md:grid-cols-3 gap-6"
|
|
13130
|
+
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13131
|
+
className: "md:col-span-2",
|
|
13132
|
+
Link: Link,
|
|
13133
|
+
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) || "#"
|
|
13145
13134
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13146
|
-
src: data === null || data === void 0 ? void 0 : (_data$
|
|
13147
|
-
className: "
|
|
13148
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13149
|
-
className: "flex flex-col gap-6"
|
|
13150
|
-
}, data === null || data === void 0 ? void 0 : (_data$
|
|
13135
|
+
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,
|
|
13136
|
+
className: " object-cover w-full h-full rounded-[10px]"
|
|
13137
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
13138
|
+
className: "flex flex-col gap-6 h-full"
|
|
13139
|
+
}, 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) {
|
|
13151
13140
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13152
13141
|
Link: Link,
|
|
13153
13142
|
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
13143
|
+
className: "flex-1 min-h-0",
|
|
13154
13144
|
key: "djsd-" + index
|
|
13155
13145
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13156
13146
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
13157
|
-
className: "object-cover w-full h-full rounded-
|
|
13147
|
+
className: "object-cover w-full h-full rounded-[10px]"
|
|
13158
13148
|
}));
|
|
13159
13149
|
})));
|
|
13160
13150
|
};
|
|
@@ -13561,7 +13551,7 @@ var Footer1 = function Footer1(props) {
|
|
|
13561
13551
|
href: "/",
|
|
13562
13552
|
className: "flex items-center"
|
|
13563
13553
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13564
|
-
className: "object-
|
|
13554
|
+
className: "object-contain w-14 h-14",
|
|
13565
13555
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
|
|
13566
13556
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
13567
13557
|
className: "text-2xl md:text-3xl ms-2 font-headingFont ",
|
|
@@ -13704,7 +13694,7 @@ var Footer7 = function Footer7(props) {
|
|
|
13704
13694
|
href: "/",
|
|
13705
13695
|
className: "flex items-center gap-2"
|
|
13706
13696
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13707
|
-
className: "object-
|
|
13697
|
+
className: "object-contain w-14 h-14",
|
|
13708
13698
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
|
|
13709
13699
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
13710
13700
|
className: " text-2xl md:text-3xl ms-2 font-headingFont ",
|
|
@@ -15625,7 +15615,7 @@ var ShopHighlights2 = function ShopHighlights2(props) {
|
|
|
15625
15615
|
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
15626
15616
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
15627
15617
|
alt: "logo",
|
|
15628
|
-
className: "w-16 h-16 p-3 rounded-full bg-primary"
|
|
15618
|
+
className: "w-16 h-16 p-3 rounded-full object-cover bg-primary"
|
|
15629
15619
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15630
15620
|
className: "font-medium text-lg"
|
|
15631
15621
|
}, 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", {
|
|
@@ -15657,7 +15647,7 @@ var ShopHighlights5 = function ShopHighlights5(props) {
|
|
|
15657
15647
|
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
15658
15648
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
15659
15649
|
alt: "logo",
|
|
15660
|
-
className: "w-16 h-16 rounded-full bg-primary"
|
|
15650
|
+
className: "w-16 h-16 rounded-full object-cover bg-primary"
|
|
15661
15651
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15662
15652
|
className: "font-semibold text-xl text-textHeading pt-2 border-t border-textHeading"
|
|
15663
15653
|
}, 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", {
|
|
@@ -15687,7 +15677,7 @@ var ShopHighlights6 = function ShopHighlights6(props) {
|
|
|
15687
15677
|
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
15688
15678
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
15689
15679
|
alt: "logo",
|
|
15690
|
-
className: "w-16 h-16"
|
|
15680
|
+
className: "w-16 h-16 object-cover"
|
|
15691
15681
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15692
15682
|
className: " w-44 h-0.5 rounded-full bg-primary"
|
|
15693
15683
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -15866,7 +15856,7 @@ var ShopHighlights10 = function ShopHighlights10(props) {
|
|
|
15866
15856
|
className: "flex-grow text-lg leading-relaxed text-center text-textSecondary"
|
|
15867
15857
|
}, item === null || item === void 0 ? void 0 : item.description)), /*#__PURE__*/React__default.createElement("img", {
|
|
15868
15858
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
15869
|
-
className: "
|
|
15859
|
+
className: "aspect-video object-cover mt-auto border-4 border-secondary"
|
|
15870
15860
|
})));
|
|
15871
15861
|
})));
|
|
15872
15862
|
};
|