s-platform-landing-section 0.1.36-beta.1 → 0.1.36-beta.3

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 CHANGED
@@ -7641,20 +7641,17 @@ var CategoryController = function CategoryController(props) {
7641
7641
 
7642
7642
  var Hero13 = function Hero13(props) {
7643
7643
  var _sectionData$, _sectionData$$srcImag, _data$data, _data$data$;
7644
- var listRef = React.useRef(null);
7645
- var _useState = React.useState(false);
7646
7644
  var shopConfig = props.shopConfig,
7647
7645
  data = props.data;
7648
7646
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
7649
- var _CategoryController = CategoryController(props);
7650
7647
  return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("img", {
7651
7648
  src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : (_sectionData$$srcImag = _sectionData$.srcImages) === null || _sectionData$$srcImag === void 0 ? void 0 : _sectionData$$srcImag[0],
7652
7649
  alt: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : _data$data$.title,
7653
7650
  className: "w-full object-cover"
7654
7651
  }), /*#__PURE__*/React__default.createElement("div", {
7655
7652
  className: "fixed right-6 bottom-10 md:bottom-24 z-50 flex flex-col gap-4 w-max"
7656
- }, /*#__PURE__*/React__default.createElement("a", {
7657
- href: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopPhone ? "tel:" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone) : "#"
7653
+ }, (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone) && /*#__PURE__*/React__default.createElement("a", {
7654
+ href: "tel:" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone)
7658
7655
  }, /*#__PURE__*/React__default.createElement("div", {
7659
7656
  className: "relative w-max"
7660
7657
  }, /*#__PURE__*/React__default.createElement("span", {
@@ -7663,9 +7660,9 @@ var Hero13 = function Hero13(props) {
7663
7660
  className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
7664
7661
  }, /*#__PURE__*/React__default.createElement(ai.AiOutlinePhone, {
7665
7662
  size: 36
7666
- })))), /*#__PURE__*/React__default.createElement("a", {
7663
+ })))), (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) && /*#__PURE__*/React__default.createElement("a", {
7667
7664
  href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#",
7668
- target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopMessenger ? "_blank" : "_self"
7665
+ target: "_blank"
7669
7666
  }, /*#__PURE__*/React__default.createElement("div", {
7670
7667
  className: "relative w-max"
7671
7668
  }, /*#__PURE__*/React__default.createElement("span", {
@@ -7674,9 +7671,9 @@ var Hero13 = function Hero13(props) {
7674
7671
  className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
7675
7672
  }, /*#__PURE__*/React__default.createElement(fa.FaFacebookMessenger, {
7676
7673
  size: 32
7677
- })))), /*#__PURE__*/React__default.createElement("a", {
7678
- href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#",
7679
- target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopFacebookPage ? "_blank" : "_self"
7674
+ })))), (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) && /*#__PURE__*/React__default.createElement("a", {
7675
+ href: "https://zalo.me/" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#",
7676
+ target: "_blank"
7680
7677
  }, /*#__PURE__*/React__default.createElement("div", {
7681
7678
  className: "relative w-max"
7682
7679
  }, /*#__PURE__*/React__default.createElement("span", {
@@ -7936,11 +7933,6 @@ var ProductController = function ProductController(props) {
7936
7933
  var _res$data2, _res$data3;
7937
7934
  setProducts(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
7938
7935
  setPage(res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.page);
7939
- var url = new URL(window.location.href);
7940
- if (/^(\/(danh-muc))\/[^/]+-\d+$/.test(url.pathname)) {
7941
- url.pathname = url.pathname.replace(/\/[^/]+-\d+$/, "");
7942
- window.history.replaceState({}, '', url.pathname + url.search);
7943
- }
7944
7936
  }
7945
7937
  setLoading(false);
7946
7938
  });
@@ -10060,13 +10052,13 @@ var ServiceDetail1 = function ServiceDetail1(props) {
10060
10052
  product: product,
10061
10053
  className: "w-full aspect-square !object-contain rounded-2xl"
10062
10054
  })), /*#__PURE__*/React__default.createElement("div", {
10063
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
10055
+ className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
10064
10056
  }, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
10065
10057
  return /*#__PURE__*/React__default.createElement("img", {
10066
10058
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
10067
10059
  key: item === null || item === void 0 ? void 0 : item.imageId,
10068
10060
  alt: "",
10069
- className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " h-16 w-16 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
10061
+ className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " \n h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full rounded-md lg:rounded-lg aspect-square object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
10070
10062
  onClick: function onClick() {
10071
10063
  handleDisplayImage(item);
10072
10064
  }
@@ -10187,7 +10179,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
10187
10179
  }, /*#__PURE__*/React__default.createElement("div", {
10188
10180
  className: "flex flex-col gap-4 col-span-2"
10189
10181
  }, /*#__PURE__*/React__default.createElement("div", {
10190
- className: "rounded-2xl p-2 bg-background border"
10182
+ className: "rounded-2xl bg-background border"
10191
10183
  }, displayImage ? /*#__PURE__*/React__default.createElement("img", {
10192
10184
  src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
10193
10185
  className: "w-full aspect-square object-contain rounded-2xl"
@@ -10195,13 +10187,13 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
10195
10187
  product: product,
10196
10188
  className: "w-full aspect-square !object-contain rounded-2xl"
10197
10189
  })), /*#__PURE__*/React__default.createElement("div", {
10198
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
10190
+ className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
10199
10191
  }, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
10200
10192
  return /*#__PURE__*/React__default.createElement("img", {
10201
10193
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
10202
10194
  key: item === null || item === void 0 ? void 0 : item.imageId,
10203
10195
  alt: "",
10204
- className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " h-16 w-16 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
10196
+ className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " \n h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full rounded-md lg:rounded-lg aspect-square object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
10205
10197
  onClick: function onClick() {
10206
10198
  handleDisplayImage(item);
10207
10199
  }
@@ -10323,7 +10315,7 @@ var ProductItem3 = function ProductItem3(props) {
10323
10315
  className: "w-full border border-stroke rounded-2xl " + className
10324
10316
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10325
10317
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10326
- className: "w-full h-48 md:h-60 xl:h-[304px] rounded-t-2xl"
10318
+ className: "w-full rounded-t-2xl"
10327
10319
  }), /*#__PURE__*/React__default.createElement("div", {
10328
10320
  className: "p-4 flex flex-col gap-2 md:gap-4 items-start"
10329
10321
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10350,7 +10342,7 @@ var ProductItem4 = function ProductItem4(props) {
10350
10342
  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
10351
10343
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10352
10344
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10353
- className: "w-full h-40 sm:h-56 lg:h-60 xl:h-64 bg-cover bg-no-repeat rounded-2xl"
10345
+ className: "w-full rounded-2xl"
10354
10346
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10355
10347
  className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis text-lg"
10356
10348
  }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10385,7 +10377,7 @@ var ProductItem5 = function ProductItem5(props) {
10385
10377
  className: "w-full flex flex-col gap-4 rounded-2xl p-1 " + className
10386
10378
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10387
10379
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10388
- className: "w-full w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
10380
+ className: "w-full rounded-2xl"
10389
10381
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10390
10382
  className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
10391
10383
  }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10418,7 +10410,7 @@ var ProductItem6 = function ProductItem6(props) {
10418
10410
  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
10419
10411
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10420
10412
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10421
- className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
10413
+ className: "w-full !aspect-[3/4] rounded-2xl"
10422
10414
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10423
10415
  className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
10424
10416
  }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10453,7 +10445,7 @@ var ProductItem7 = function ProductItem7(props) {
10453
10445
  className: "px-2 md:px-4 xl:px-6"
10454
10446
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10455
10447
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10456
- className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl"
10448
+ className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl !object-contain"
10457
10449
  })), (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.price) !== (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 && (_product$productInfo3 = product.productInfo) !== null && _product$productInfo3 !== void 0 && _product$productInfo3.priceBeforeDiscount ? /*#__PURE__*/React__default.createElement("div", {
10458
10450
  className: "absolute top-4 left-0 py-1 px-4 rounded-r-2xl bg-danger text-textButton font-semibold shadow-lg"
10459
10451
  }, "-", Math.round(100 - (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.price) / (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) * 100)) : null), /*#__PURE__*/React__default.createElement("div", {
@@ -10486,7 +10478,7 @@ var ProductItem8 = function ProductItem8(props) {
10486
10478
  className: "relative "
10487
10479
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10488
10480
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10489
- className: "h-[340px] md:h-[400px] xl:h-[460px] rounded"
10481
+ className: "!aspect-[5/8] rounded"
10490
10482
  }), /*#__PURE__*/React__default.createElement("div", {
10491
10483
  className: "absolute bottom-0 rounded-b pb-6 px-4 bg-gradient-to-t from-black/50 to-transparent flex flex-col items-center h-1/2 gap-2 w-full justify-end "
10492
10484
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10519,7 +10511,7 @@ var ProductItem9 = function ProductItem9(props) {
10519
10511
  className: "w-full flex flex-col gap-4 rounded-2xl p-2 md:p-6 bg-bgSecondary " + className
10520
10512
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10521
10513
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10522
- className: "hover:scale-105 transition duration-300 ease-in-out w-full h-44 md:h-56 xl:h-60"
10514
+ className: "hover:scale-105 transition duration-300 ease-in-out !object-contain !aspect-[9/8]"
10523
10515
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10524
10516
  className: "text-start line-clamp-2 font-medium min-h-12 w-full overflow-hidden text-ellipsis mb-2"
10525
10517
  }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10651,7 +10643,7 @@ var ProductItem11 = function ProductItem11(props) {
10651
10643
  className: "overflow-hidden"
10652
10644
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10653
10645
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10654
- className: "hover:scale-105 transition duration-300 ease-in-out w-full h-56 sm:h-64 lg:h-72 xl:h-[302px]"
10646
+ className: "hover:scale-105 transition duration-300 ease-in-out"
10655
10647
  })), /*#__PURE__*/React__default.createElement("div", {
10656
10648
  className: "p-4 flex flex-col gap-4"
10657
10649
  }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
@@ -10672,7 +10664,7 @@ var ProductItem11 = function ProductItem11(props) {
10672
10664
  };
10673
10665
 
10674
10666
  var TreatmentItem1 = function TreatmentItem1(props) {
10675
- var _product$productInfo;
10667
+ var _product$productInfo, _product$productInfo2;
10676
10668
  var product = props.product,
10677
10669
  _props$Link = props.Link,
10678
10670
  Link = _props$Link === void 0 ? null : _props$Link,
@@ -10685,7 +10677,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10685
10677
  className: "w-full flex flex-col gap-4 rounded-2xl p-1"
10686
10678
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10687
10679
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10688
- className: "w-full w-full h-[189px] md:h-[238px] xl:h-[304px] rounded-2xl"
10680
+ className: " rounded-2xl"
10689
10681
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10690
10682
  className: "line-clamp-1 mb-2 font-medium text-lg"
10691
10683
  }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10695,7 +10687,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10695
10687
  className: "flex flex-col md:flex-row gap-2 md:items-center md:gap-6 "
10696
10688
  }, /*#__PURE__*/React__default.createElement("div", {
10697
10689
  className: "whitespace-nowrap"
10698
- }, "Th\u1EDDi gian: 120p"), /*#__PURE__*/React__default.createElement(Button, {
10690
+ }, "Th\u1EDDi gian: ", getDurationValue(product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.attributes)), /*#__PURE__*/React__default.createElement(Button, {
10699
10691
  shopConfigStyle: shopConfigStyle,
10700
10692
  label: "\u0110\u1EB7t l\u1ECBch",
10701
10693
  className: "w-full"
@@ -11380,7 +11372,7 @@ var Products11 = function Products11(props) {
11380
11372
  _props$Link = props.Link,
11381
11373
  Link = _props$Link === void 0 ? null : _props$Link,
11382
11374
  _props$categoryId = props.categoryId,
11383
- categoryId = _props$categoryId === void 0 ? 0 : _props$categoryId,
11375
+ categoryId = _props$categoryId === void 0 ? "" : _props$categoryId,
11384
11376
  _props$ProductItem = props.ProductItem,
11385
11377
  ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
11386
11378
  var _useState = React.useState({
@@ -11423,13 +11415,18 @@ var Products11 = function Products11(props) {
11423
11415
  });
11424
11416
  };
11425
11417
  var handleChooseCategory = function handleChooseCategory(category) {
11418
+ if (categoryId) {
11419
+ var newUrl = getLinkProductsByCategory(category);
11420
+ window.history.replaceState(null, '', newUrl);
11421
+ }
11426
11422
  setCategorySelected(category);
11427
11423
  setFilterItem(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]);
11428
11424
  setParams(function (prev) {
11429
- return _extends({}, prev, {
11425
+ return {
11426
+ page: 0,
11430
11427
  categoryId: category === null || category === void 0 ? void 0 : category.categoryId,
11431
11428
  size: 12
11432
- });
11429
+ };
11433
11430
  });
11434
11431
  window.scrollTo({
11435
11432
  top: 0,
@@ -11502,7 +11499,7 @@ var Products11 = function Products11(props) {
11502
11499
  }, /*#__PURE__*/React__default.createElement("div", {
11503
11500
  className: "md:sticky top-16 self-start"
11504
11501
  }, (categories === null || categories === void 0 ? void 0 : categories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
11505
- className: " flex flex-col gap-2 rounded-2xl bg-bgSecondary p-4 max-h-96 overflow-y-auto"
11502
+ className: " flex flex-col gap-2 rounded-2xl bg-bgSecondary p-4 max-h-96 scroll-container overflow-y-auto"
11506
11503
  }, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
11507
11504
  return /*#__PURE__*/React__default.createElement("div", {
11508
11505
  className: "px-6 py-2 hover:bg-gray-100 hover:text-primary cursor-pointer rounded-lg " + ((categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId) === (item === null || item === void 0 ? void 0 : item.categoryId) ? " bg-primary text-textButton" : ""),
@@ -12281,12 +12278,12 @@ var ProductDetail10 = function ProductDetail10(props) {
12281
12278
  return /*#__PURE__*/React__default.createElement("div", {
12282
12279
  className: SECTION_CLASS + " mt-0 md:mt-0 mb-0 " + ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "bg-bgSecondary pb-8" : "bg-background")
12283
12280
  }, /*#__PURE__*/React__default.createElement("div", {
12284
- className: ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "" : "px-4 md:px-6") + " py-4 md:py-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 md:gap-6 bg-bgSecondary"
12281
+ className: ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "" : "px-4 md:px-6") + " py-4 md:py-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 gap-3 md:gap-6 bg-bgSecondary"
12285
12282
  }, /*#__PURE__*/React__default.createElement("div", {
12286
- className: "flex flex-col gap-4 col-span-2 "
12283
+ className: "flex flex-col gap-4 md:col-span-2 "
12287
12284
  }, displayImage ? /*#__PURE__*/React__default.createElement("img", {
12288
12285
  src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
12289
- className: "w-full border rounded-2xl p-2 bg-background aspect-square object-contain rounded-2xl "
12286
+ className: "w-full border bg-background aspect-square object-contain rounded-2xl "
12290
12287
  }) : /*#__PURE__*/React__default.createElement("div", {
12291
12288
  className: "flex justify-center items-center w-full border rounded-2xl aspect-square",
12292
12289
  style: {
@@ -12297,19 +12294,19 @@ var ProductDetail10 = function ProductDetail10(props) {
12297
12294
  height: "25%",
12298
12295
  fill: "#D9D9D9"
12299
12296
  })), /*#__PURE__*/React__default.createElement("div", {
12300
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
12297
+ className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
12301
12298
  }, product === null || product === void 0 ? void 0 : (_product$images2 = product.images) === null || _product$images2 === void 0 ? void 0 : _product$images2.map(function (item) {
12302
12299
  return /*#__PURE__*/React__default.createElement("img", {
12303
12300
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
12304
12301
  key: item === null || item === void 0 ? void 0 : item.imageId,
12305
12302
  alt: "",
12306
- className: "cursor-pointer h-16 w-16 rounded-lg bg-background\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 "),
12303
+ className: "cursor-pointer h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full aspect-square rounded-md lg:rounded-lg bg-background object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 "),
12307
12304
  onClick: function onClick() {
12308
12305
  handleDisplayImage(item);
12309
12306
  }
12310
12307
  });
12311
12308
  }))), /*#__PURE__*/React__default.createElement("div", {
12312
- className: "col-span-3"
12309
+ className: "md:col-span-3 "
12313
12310
  }, /*#__PURE__*/React__default.createElement("p", {
12314
12311
  className: "font-semibold text-2xl"
12315
12312
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -12323,7 +12320,7 @@ var ProductDetail10 = function ProductDetail10(props) {
12323
12320
  }, /*#__PURE__*/React__default.createElement("div", {
12324
12321
  className: "min-w-24"
12325
12322
  }, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
12326
- className: "flex gap-2"
12323
+ className: "flex flex-wrap gap-2"
12327
12324
  }, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
12328
12325
  return /*#__PURE__*/React__default.createElement("button", {
12329
12326
  key: i,
@@ -12375,7 +12372,7 @@ var ProductDetail10 = function ProductDetail10(props) {
12375
12372
  __html: product === null || product === void 0 ? void 0 : product.description
12376
12373
  }
12377
12374
  }), !isSeeMore && !hiddenButton ? /*#__PURE__*/React__default.createElement("div", {
12378
- className: "h-10 relative -mt-10 rounded-b-lg",
12375
+ className: "h-28 relative -mt-28 rounded-b-lg",
12379
12376
  style: {
12380
12377
  background: "linear-gradient(to top, #81818169 0%, #00000003 50%)"
12381
12378
  }
@@ -12520,7 +12517,7 @@ var ProductDetail11 = function ProductDetail11(props) {
12520
12517
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
12521
12518
  key: item === null || item === void 0 ? void 0 : item.imageId,
12522
12519
  alt: "",
12523
- className: "cursor-pointer px-3 py-2 !h-24 !w-24 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
12520
+ className: "cursor-pointer px-3 py-2 !h-24 !w-24 object-contain aspect-square rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
12524
12521
  onClick: function onClick() {
12525
12522
  handleDisplayImage(item);
12526
12523
  }
@@ -12552,7 +12549,7 @@ var ProductDetail11 = function ProductDetail11(props) {
12552
12549
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
12553
12550
  key: item === null || item === void 0 ? void 0 : item.imageId,
12554
12551
  alt: "",
12555
- className: "cursor-pointer px-2 py-1 !h-24 !w-24 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
12552
+ className: "cursor-pointer px-2 py-1 !h-24 !w-24 object-contain rounded-lg aspect-square\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
12556
12553
  onClick: function onClick() {
12557
12554
  handleDisplayImage(item);
12558
12555
  }
@@ -12572,7 +12569,7 @@ var ProductDetail11 = function ProductDetail11(props) {
12572
12569
  }, /*#__PURE__*/React__default.createElement("div", {
12573
12570
  className: "min-w-24 my-auto"
12574
12571
  }, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
12575
- className: "flex gap-2"
12572
+ className: "flex flex-wrap gap-2"
12576
12573
  }, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
12577
12574
  return /*#__PURE__*/React__default.createElement("button", {
12578
12575
  key: i,
@@ -14261,21 +14258,21 @@ var Gallery2 = function Gallery2(props) {
14261
14258
  }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$slice = _data$data.slice(0, 2)) === null || _data$data$slice === void 0 ? void 0 : _data$data$slice.map(function (item, index) {
14262
14259
  return /*#__PURE__*/React__default.createElement("img", {
14263
14260
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14264
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl"
14261
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl"
14265
14262
  });
14266
14263
  })), /*#__PURE__*/React__default.createElement("div", {
14267
14264
  className: "flex flex-col gap-2 md:gap-4"
14268
14265
  }, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$slice = _data$data2.slice(2, 4)) === null || _data$data2$slice === void 0 ? void 0 : _data$data2$slice.map(function (item, index) {
14269
14266
  return /*#__PURE__*/React__default.createElement("img", {
14270
14267
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14271
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl odd:h-[130%]"
14268
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl odd:h-[130%]"
14272
14269
  });
14273
14270
  })), /*#__PURE__*/React__default.createElement("div", {
14274
14271
  className: "flex flex-col gap-2 md:gap-4"
14275
14272
  }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$slice = _data$data3.slice(4, 6)) === null || _data$data3$slice === void 0 ? void 0 : _data$data3$slice.map(function (item, index) {
14276
14273
  return /*#__PURE__*/React__default.createElement("img", {
14277
14274
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14278
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl even:h-[130%]"
14275
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl even:h-[130%]"
14279
14276
  });
14280
14277
  })))));
14281
14278
  };
@@ -15961,11 +15958,6 @@ var NewsController = function NewsController(props) {
15961
15958
  var _response$data2, _response$data2$data, _response$data3, _response$data3$data;
15962
15959
  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);
15963
15960
  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);
15964
- var url = new URL(window.location.href);
15965
- if (/^(\/(tin-tuc-theo-danh-muc))\/[^/]+-\d+$/.test(url.pathname)) {
15966
- url.pathname = url.pathname.replace(/\/[^/]+-\d+$/, "");
15967
- window.history.replaceState({}, '', url.pathname + url.search);
15968
- }
15969
15961
  }
15970
15962
  setLoading(false);
15971
15963
  });
@@ -16199,7 +16191,8 @@ var News1 = function News1(props) {
16199
16191
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
16200
16192
  _props$Link = props.Link,
16201
16193
  Link = _props$Link === void 0 ? null : _props$Link,
16202
- catId = props.catId;
16194
+ _props$catId = props.catId,
16195
+ catId = _props$catId === void 0 ? "" : _props$catId;
16203
16196
  var _useState = React.useState({
16204
16197
  page: 0,
16205
16198
  sort: "timeUpdate,DESC",
@@ -16239,6 +16232,18 @@ var News1 = function News1(props) {
16239
16232
  setCategorySelected(category);
16240
16233
  }
16241
16234
  }, [newsCategories]);
16235
+ var handleSelectedCateogry = function handleSelectedCateogry(item) {
16236
+ if (catId) {
16237
+ var newUrl = getLinkNewsByCategory(item);
16238
+ window.history.replaceState(null, '', newUrl);
16239
+ }
16240
+ setCategorySelected(item);
16241
+ setParams(function (prev) {
16242
+ return _extends({}, prev, {
16243
+ catId: item === null || item === void 0 ? void 0 : item.catId
16244
+ });
16245
+ });
16246
+ };
16242
16247
  return /*#__PURE__*/React__default.createElement("div", {
16243
16248
  className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 gap-6"
16244
16249
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -16259,12 +16264,7 @@ var News1 = function News1(props) {
16259
16264
  className: "px-6 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
16260
16265
  key: "sdjfdh-" + index,
16261
16266
  onClick: function onClick() {
16262
- setCategorySelected(item);
16263
- setParams(function (prev) {
16264
- return _extends({}, prev, {
16265
- catId: item === null || item === void 0 ? void 0 : item.catId
16266
- });
16267
- });
16267
+ handleSelectedCateogry(item);
16268
16268
  }
16269
16269
  }, /*#__PURE__*/React__default.createElement("div", {
16270
16270
  className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
@@ -16318,12 +16318,7 @@ var News1 = function News1(props) {
16318
16318
  className: "px-4 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
16319
16319
  key: "sdjfdh-" + index,
16320
16320
  onClick: function onClick() {
16321
- setCategorySelected(item);
16322
- setParams(function (prev) {
16323
- return _extends({}, prev, {
16324
- catId: item === null || item === void 0 ? void 0 : item.catId
16325
- });
16326
- });
16321
+ handleSelectedCateogry(item);
16327
16322
  }
16328
16323
  }, /*#__PURE__*/React__default.createElement("div", {
16329
16324
  className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
@@ -16419,7 +16414,7 @@ var NewsDetail1 = function NewsDetail1(props) {
16419
16414
  }), (newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
16420
16415
  className: "top-6 block md:hidden"
16421
16416
  }, /*#__PURE__*/React__default.createElement("div", {
16422
- className: "px-6 bg-primary rounded-t-lg text-lg text-textButton text-center"
16417
+ className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
16423
16418
  }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
16424
16419
  className: "rounded-b-lg bg-bgSecondary"
16425
16420
  }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {