s-platform-landing-section 0.1.26 → 0.1.27

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.
@@ -19,7 +19,6 @@ import 'slick-carousel/slick/slick-theme.css';
19
19
  import { AiOutlineShoppingCart, AiOutlinePhone } from 'react-icons/ai';
20
20
  import { GoCreditCard, GoClock } from 'react-icons/go';
21
21
  import { HiOutlineLocationMarker } from 'react-icons/hi';
22
- import { MdOutlineFormatQuote } from 'react-icons/md';
23
22
  import { RiDeleteBin7Line } from 'react-icons/ri';
24
23
  import { GiNewspaper } from 'react-icons/gi';
25
24
 
@@ -1096,15 +1095,15 @@ var Hero2 = function Hero2(props) {
1096
1095
  alt: 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,
1097
1096
  className: "w-full object-cover min-h-[22vh] md:min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
1098
1097
  }), /*#__PURE__*/React__default.createElement("div", {
1099
- className: "absolute flex flex-col gap-1 md:gap-4 absolute w-1/2 lg:w-[40%] top-6 sm:top-[20%] xl:top-1/4 right-[2%] lg:right-[15%]"
1098
+ className: "absolute flex flex-col gap-1 md:gap-4 absolute w-1/2 lg:w-[40%] top-12 sm:top-[20%] xl:top-1/4 right-[2%] lg:right-[15%]"
1100
1099
  }, /*#__PURE__*/React__default.createElement("img", {
1101
1100
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
1102
1101
  alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName,
1103
1102
  className: "h-5 w-5 sm:h-8 sm:w-8 md:h-16 md:w-16 lg:h-20 lg:w-20"
1104
1103
  }), /*#__PURE__*/React__default.createElement("div", {
1105
- className: "text-base md:text-3xl lg:text-4xl font-medium"
1104
+ className: "text-base md:text-3xl lg:text-4xl font-medium line-clamp-1"
1106
1105
  }, 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$.title), /*#__PURE__*/React__default.createElement("div", {
1107
- className: "text-xs md:text-xl lg:text-2xl "
1106
+ className: "text-xs md:text-xl lg:text-2xl line-clamp-2"
1108
1107
  }, 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$.description)));
1109
1108
  };
1110
1109
 
@@ -1116,13 +1115,13 @@ var Hero5 = function Hero5(props) {
1116
1115
  }, /*#__PURE__*/React__default.createElement("img", {
1117
1116
  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],
1118
1117
  alt: 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,
1119
- className: "w-full min-h-[30vh] md:min-h-[50vh] max-h-[100vh] object-cover"
1118
+ className: "w-full min-h-[25vh] md:min-h-[50vh] max-h-[100vh] object-cover"
1120
1119
  }), /*#__PURE__*/React__default.createElement("div", {
1121
- className: "flex flex-col gap-2 md:gap-4 absolute top-5 md:top-[20%] w-1/2 lg:w-1/3 left-4 xl:left-20"
1120
+ className: "flex flex-col gap-2 md:gap-4 absolute top-10 md:top-[20%] w-1/2 lg:w-[45%] left-4 lg:left-10 xl:left-20"
1122
1121
  }, /*#__PURE__*/React__default.createElement("div", {
1123
- className: "text-xl md:text-3xl lg:text-4xl text-textHeading font-medium"
1122
+ className: "text-xl sm:text-2xl md:text-3xl lg:text-4xl text-textHeading font-medium line-clamp-2 md:line-clamp-3"
1124
1123
  }, 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$.title), /*#__PURE__*/React__default.createElement("div", {
1125
- className: "md:text-xl lg:text-2xl text-primary line-clamp-3 md:line-clamp-none"
1124
+ className: "md:text-xl lg:text-2xl text-primary line-clamp-3 md:line-clamp-4 md:line-clamp-none"
1126
1125
  }, 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$.description)));
1127
1126
  };
1128
1127
 
@@ -1138,13 +1137,13 @@ var Hero6 = function Hero6(props) {
1138
1137
  }, /*#__PURE__*/React__default.createElement("img", {
1139
1138
  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],
1140
1139
  alt: 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,
1141
- className: "object-cover w-full h-auto min-h-[25vh] md:min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
1140
+ className: "object-cover w-full h-auto min-h-[20vh] md:min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
1142
1141
  }), /*#__PURE__*/React__default.createElement("div", {
1143
- className: "absolute top-0 sm:top-8 md:top-14 lg:top-20 w-full p-3 md:p-6 lg:p-12 z-10 flex flex-col gap-2 md:gap-4 lg:gap-6 items-center justify-center"
1142
+ className: "absolute top-4 sm:top-8 md:top-14 lg:top-20 w-full p-3 md:p-6 lg:p-12 z-10 flex flex-col gap-2 md:gap-4 lg:gap-6 items-center justify-center"
1144
1143
  }, /*#__PURE__*/React__default.createElement("div", {
1145
1144
  className: "text-primary line-clamp-1 text-xl md:text-3xl lg:text-5xl leading-[1.6] md:leading-[1.6] text-center font-headingFont"
1146
1145
  }, 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$.title), /*#__PURE__*/React__default.createElement("div", {
1147
- className: "md:text-xl text-center line-clamp-2"
1146
+ className: "md:text-xl text-center line-clamp-1"
1148
1147
  }, 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$.description), sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : (_sectionData$$buttons = _sectionData$.buttons) === null || _sectionData$$buttons === void 0 ? void 0 : _sectionData$$buttons.map(function (button) {
1149
1148
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
1150
1149
  Link: Link,
@@ -7362,7 +7361,7 @@ var lib = {
7362
7361
  };
7363
7362
 
7364
7363
  var getBaseUrl = function getBaseUrl() {
7365
- return process.env.NEXT_PUBLIC_BASE_URL || "https://test-apigateway.sfin.vn";
7364
+ return process.env.NEXT_PUBLIC_BASE_URL || "https://proapi.sspa.com.vn";
7366
7365
  };
7367
7366
  var request = axios.create();
7368
7367
  request.interceptors.request.use(function (config) {
@@ -7393,10 +7392,32 @@ var api = function api(options) {
7393
7392
  return request(config);
7394
7393
  };
7395
7394
 
7395
+ var formatCurrency = function formatCurrency(amount) {
7396
+ if (isNaN(amount)) {
7397
+ return '0 ₫';
7398
+ }
7399
+ var roundedAmount = Math.round(amount);
7400
+ var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
7401
+ return formattedAmount + " \u20AB";
7402
+ };
7403
+ var pattern = {
7404
+ phoneNumberPattern: /^(?:\+84|0)\d{9}$/
7405
+ };
7406
+ var numberPattern = /^\d+$/;
7407
+ var getYoutubeVideoIdByUrl = function getYoutubeVideoIdByUrl(url) {
7408
+ var regex = /(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/|youtube\.com\/shorts\/)([a-zA-Z0-9_-]{11})/;
7409
+ var match = url === null || url === void 0 ? void 0 : url.match(regex);
7410
+ return match ? match[1] : null;
7411
+ };
7412
+ var linkPagePolicy = "https://sites.google.com/view/sodofin-landing-page-policy";
7413
+ var endpointLandingShop = "/landing-shop/v2";
7414
+ var endpointLanding = "/landing/v2";
7415
+ var baseURL = "https://proapi.sspa.com.vn";
7416
+
7396
7417
  var getShopCategoriesApi = function getShopCategoriesApi(shopId, types) {
7397
7418
  return api({
7398
7419
  method: "get",
7399
- url: "/landing-shop/get-product-category-on-landing",
7420
+ url: endpointLandingShop + "/get-product-category-on-landing",
7400
7421
  params: {
7401
7422
  shopId: shopId,
7402
7423
  types: types,
@@ -7413,7 +7434,7 @@ var getProductListApi = function getProductListApi(shopId, params) {
7413
7434
  }
7414
7435
  return api({
7415
7436
  method: "get",
7416
- url: "/landing-shop/get-product-on-landing",
7437
+ url: endpointLandingShop + "/get-product-on-landing",
7417
7438
  params: _extends({
7418
7439
  shopId: shopId,
7419
7440
  isShowOnLanding: true
@@ -7830,7 +7851,7 @@ var ProductImage = function ProductImage(props) {
7830
7851
  if (src !== null && src !== void 0 && src.startsWith("http")) {
7831
7852
  setSrc(src);
7832
7853
  } else if (src) {
7833
- var urlImage = "https://test-apigateway.sfin.vn/assets/images/sshop/shops/" + (product === null || product === void 0 ? void 0 : product.shopId) + "/" + (product === null || product === void 0 ? void 0 : product.productId) + "/" + src;
7854
+ var urlImage = baseURL + "/assets/images/sshop/shops/" + (product === null || product === void 0 ? void 0 : product.shopId) + "/" + (product === null || product === void 0 ? void 0 : product.productId) + "/" + src;
7834
7855
  setSrc(urlImage);
7835
7856
  } else {
7836
7857
  setSrc(src);
@@ -7850,25 +7871,6 @@ var ProductImage = function ProductImage(props) {
7850
7871
  });
7851
7872
  };
7852
7873
 
7853
- var formatCurrency = function formatCurrency(amount) {
7854
- if (isNaN(amount)) {
7855
- return '0 ₫';
7856
- }
7857
- var roundedAmount = Math.round(amount);
7858
- var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
7859
- return formattedAmount + " \u20AB";
7860
- };
7861
- var pattern = {
7862
- phoneNumberPattern: /^(?:\+84|0)\d{9}$/
7863
- };
7864
- var numberPattern = /^\d+$/;
7865
- var getYoutubeVideoIdByUrl = function getYoutubeVideoIdByUrl(url) {
7866
- var regex = /(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/|youtube\.com\/shorts\/)([a-zA-Z0-9_-]{11})/;
7867
- var match = url === null || url === void 0 ? void 0 : url.match(regex);
7868
- return match ? match[1] : null;
7869
- };
7870
- var linkPagePolicy = "https://sites.google.com/view/sodofin-landing-page-policy";
7871
-
7872
7874
  function getMinMax(array, field) {
7873
7875
  if (!(array !== null && array !== void 0 && array.length) || !array[0].hasOwnProperty(field)) {
7874
7876
  return null;
@@ -9395,7 +9397,7 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9395
9397
  }), isOpenModal ? /*#__PURE__*/React__default.createElement(ModalNotification, {
9396
9398
  onClose: handleCloseModal
9397
9399
  }, /*#__PURE__*/React__default.createElement(BookingForm, {
9398
- className: "overflow-y-auto hide-scrollbar max-h-[80vh] !bg-bgSecondary",
9400
+ className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh] !bg-bgSecondary",
9399
9401
  onCloseFormBooking: handleCloseModal,
9400
9402
  defaultValue: dataBooking,
9401
9403
  shopConfig: shopConfig,
@@ -9591,7 +9593,7 @@ var ServiceDetail1 = function ServiceDetail1(props) {
9591
9593
  onClose: handleCloseModal
9592
9594
  }, /*#__PURE__*/React__default.createElement(BookingForm, {
9593
9595
  isModalBooking: isBooking,
9594
- className: "overflow-y-auto hide-scrollbar max-h-[80vh]",
9596
+ className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh]",
9595
9597
  onCloseFormBooking: handleCloseModal,
9596
9598
  defaultValue: dataBooking,
9597
9599
  shopConfig: shopConfig,
@@ -9726,7 +9728,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
9726
9728
  onClose: handleCloseModal
9727
9729
  }, /*#__PURE__*/React__default.createElement(BookingForm, {
9728
9730
  isModalBooking: isBooking,
9729
- className: "overflow-y-auto hide-scrollbar max-h-[80vh]",
9731
+ className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh]",
9730
9732
  onCloseFormBooking: handleCloseModal,
9731
9733
  defaultValue: dataBooking,
9732
9734
  shopConfig: shopConfig,
@@ -11675,7 +11677,7 @@ var Banner3 = function Banner3(props) {
11675
11677
  key: "djsd-" + index
11676
11678
  }, /*#__PURE__*/React__default.createElement("img", {
11677
11679
  src: item === null || item === void 0 ? void 0 : item.srcImage,
11678
- className: "bg-cover bg-no-repeat h-full rounded-xl"
11680
+ className: "bg-cover bg-no-repeat w-full h-full rounded-xl"
11679
11681
  }));
11680
11682
  }));
11681
11683
  };
@@ -12288,10 +12290,20 @@ var CustomerRating6 = function CustomerRating6(props) {
12288
12290
  return /*#__PURE__*/React__default.createElement("div", {
12289
12291
  key: index,
12290
12292
  className: "relative bg-primary rounded-lg text-textButton px-6 py-4"
12291
- }, /*#__PURE__*/React__default.createElement(MdOutlineFormatQuote, {
12292
- size: 43,
12293
- className: "absolute text-black top-[-20px] right-8"
12294
- }), /*#__PURE__*/React__default.createElement("div", {
12293
+ }, /*#__PURE__*/React__default.createElement("div", {
12294
+ className: "absolute top-[-18px] right-8"
12295
+ }, /*#__PURE__*/React__default.createElement("svg", {
12296
+ width: "42",
12297
+ height: "31",
12298
+ viewBox: "0 0 42 31",
12299
+ fill: "none",
12300
+ xmlns: "http://www.w3.org/2000/svg"
12301
+ }, /*#__PURE__*/React__default.createElement("path", {
12302
+ d: "M18.8944 18.4472L19 18.2361V18V5C19 2.79086 17.2091 1 15 1H5C2.79086 1 1 2.79086 1 5V18V19H2H8.38197L4.49585 26.7722C3.83095 28.102 4.79794 29.6667 6.2847 29.6667H12.0486C12.8062 29.6667 13.4987 29.2387 13.8375 28.5611L18.8944 18.4472ZM40.2278 18.4472L40.3333 18.2361V18V5C40.3333 2.79086 38.5425 1 36.3333 1H26.3333C24.1242 1 22.3333 2.79086 22.3333 5V18V19H23.3333H29.7153L25.8292 26.7722C25.1643 28.102 26.1313 29.6667 27.618 29.6667H33.382C34.1395 29.6667 34.832 29.2387 35.1708 28.5611L40.2278 18.4472Z",
12303
+ fill: "white",
12304
+ stroke: "#36306A",
12305
+ "stroke-width": "2"
12306
+ }))), /*#__PURE__*/React__default.createElement("div", {
12295
12307
  className: "flex items-end gap-2"
12296
12308
  }, /*#__PURE__*/React__default.createElement("img", {
12297
12309
  src: item === null || item === void 0 ? void 0 : item.avatar,
@@ -12299,7 +12311,7 @@ var CustomerRating6 = function CustomerRating6(props) {
12299
12311
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
12300
12312
  className: "text-xl md:text-2xl mt-2"
12301
12313
  }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
12302
- className: "text-gray3"
12314
+ className: "text-gray5"
12303
12315
  }, item === null || item === void 0 ? void 0 : item.description))), /*#__PURE__*/React__default.createElement("hr", {
12304
12316
  className: "mt-4"
12305
12317
  }), /*#__PURE__*/React__default.createElement("div", {
@@ -13892,7 +13904,7 @@ var getAllArticleNewsApi = function getAllArticleNewsApi(shopId, appId, landingS
13892
13904
  }
13893
13905
  return api({
13894
13906
  method: "get",
13895
- url: "/landing/news/article/get-all-filter",
13907
+ url: endpointLanding + "/news/article/get-all-filter",
13896
13908
  params: _extends({
13897
13909
  shopId: shopId,
13898
13910
  appId: appId,
@@ -13903,7 +13915,7 @@ var getAllArticleNewsApi = function getAllArticleNewsApi(shopId, appId, landingS
13903
13915
  var getNewsDetailApi = function getNewsDetailApi(articleId, shopId, landingShopConfigId) {
13904
13916
  return api({
13905
13917
  method: "get",
13906
- url: "/landing/news/article/" + articleId,
13918
+ url: endpointLanding + "/news/article/" + articleId,
13907
13919
  params: {
13908
13920
  shopId: shopId,
13909
13921
  landingShopConfigId: landingShopConfigId,
@@ -14097,7 +14109,7 @@ var getAllNewsCategoriesApi = function getAllNewsCategoriesApi(shopId, landingSh
14097
14109
  }
14098
14110
  return api({
14099
14111
  method: "get",
14100
- url: "/landing/news/category/get-all",
14112
+ url: endpointLanding + "/news/category/get-all",
14101
14113
  params: {
14102
14114
  shopId: shopId,
14103
14115
  landingShopConfigId: landingShopConfigId,