s-platform-landing-section 0.1.31 → 0.1.32

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
@@ -166,6 +166,103 @@ var urlMappings = {
166
166
  function convertURL(path) {
167
167
  return urlMappings[path] || path;
168
168
  }
169
+ var ROUTE = {
170
+ HOME: {
171
+ name: "home",
172
+ label: "Trang chủ",
173
+ route: "/",
174
+ isShow: true
175
+ },
176
+ PRODUCTS: {
177
+ name: "products",
178
+ label: "Sản phẩm",
179
+ route: "/products",
180
+ isShow: true
181
+ },
182
+ PRODUCTS_BY_CATEGORY: {
183
+ name: "products_by_category",
184
+ label: "Sản phẩm theo danh mục",
185
+ route: "/products/:slug"
186
+ },
187
+ PRODUCT: {
188
+ name: "product",
189
+ label: "Chi tiết sản phẩm",
190
+ route: "/product/:slug"
191
+ },
192
+ SERVICES: {
193
+ name: "services",
194
+ label: "Dịch vụ",
195
+ route: "/services",
196
+ isShow: true
197
+ },
198
+ SERVICE: {
199
+ name: "service",
200
+ label: "Chi tiết dịch vụ",
201
+ route: "/service/:slug"
202
+ },
203
+ BOOKING: {
204
+ name: "booking",
205
+ label: "Đặt lịch",
206
+ route: "/dat-lich",
207
+ isShow: true
208
+ },
209
+ ABOUT: {
210
+ name: "about",
211
+ label: "Giới thiệu",
212
+ route: "/about",
213
+ isShow: true
214
+ },
215
+ SALES: {
216
+ name: "sales",
217
+ label: "Sản phẩm",
218
+ route: "/sales"
219
+ },
220
+ NEWS: {
221
+ name: "news",
222
+ label: "Tin tức",
223
+ route: "/news"
224
+ },
225
+ NEWS_BY_CATEGORY: {
226
+ name: "news_by_category",
227
+ label: "Tin tức theo danh mục",
228
+ route: "/news/:slug"
229
+ },
230
+ NEWS_DETAIL: {
231
+ name: "news_detail",
232
+ label: "Tin tức",
233
+ route: "/news/:slug/:languageCode"
234
+ },
235
+ CARTS: {
236
+ name: "carts",
237
+ label: "Giỏ hàng",
238
+ route: "/carts"
239
+ },
240
+ ORDERS: {
241
+ name: "orders",
242
+ label: "Đơn hàng",
243
+ route: "/orders"
244
+ },
245
+ ORDER: {
246
+ name: "order",
247
+ label: "Chi tiết đơn hàng",
248
+ route: "/order"
249
+ },
250
+ ACCOUNT: {
251
+ name: "account",
252
+ label: "Tài khoản",
253
+ route: "/account"
254
+ },
255
+ PROFILE: {
256
+ name: "profile",
257
+ label: "Tài khoản",
258
+ route: "/profile"
259
+ },
260
+ SEARCH: {
261
+ name: "search",
262
+ label: "Tìm kiếm",
263
+ route: "/search"
264
+ }
265
+ };
169
266
 
170
267
  var Options = function Options(props) {
171
268
  var _props$className = props.className,
@@ -1110,7 +1207,7 @@ var Hero2 = function Hero2(props) {
1110
1207
  }), /*#__PURE__*/React__default.createElement("div", {
1111
1208
  className: "font-medium line-clamp-1 ",
1112
1209
  style: {
1113
- fontSize: "clamp(1.25rem, 3vw, 3.5rem)",
1210
+ fontSize: "clamp(1.25rem, 4vw, 3.5rem)",
1114
1211
  lineHeight: "1.5"
1115
1212
  }
1116
1213
  }, 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", {
@@ -9435,7 +9532,7 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9435
9532
  }), /*#__PURE__*/React__default.createElement("div", {
9436
9533
  className: "mt-12 w-full"
9437
9534
  }, (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(Slider, {
9438
- infinite: true,
9535
+ infinite: (products === null || products === void 0 ? void 0 : products.length) > 1 ? true : false,
9439
9536
  slidesToShow: 1,
9440
9537
  slidesToScroll: 1,
9441
9538
  speed: 500,
@@ -10029,6 +10126,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10029
10126
  };
10030
10127
 
10031
10128
  var ProductList7 = function ProductList7(props) {
10129
+ var _products$slice;
10032
10130
  var _props$shopConfigStyl = props.shopConfigStyle,
10033
10131
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10034
10132
  _props$data = props.data,
@@ -10042,7 +10140,7 @@ var ProductList7 = function ProductList7(props) {
10042
10140
  _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
10043
10141
  secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
10044
10142
  var _useState = React.useState({
10045
- size: 4
10143
+ size: 8
10046
10144
  }),
10047
10145
  params = _useState[0];
10048
10146
  var _ProductController = ProductController(_extends({}, props, {
@@ -10058,21 +10156,21 @@ var ProductList7 = function ProductList7(props) {
10058
10156
  shopConfigStyle: shopConfigStyle
10059
10157
  }), /*#__PURE__*/React__default.createElement("div", {
10060
10158
  className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-10 mt-12"
10061
- }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
10159
+ }, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, index) {
10062
10160
  return /*#__PURE__*/React__default.createElement(ProductItem, {
10063
10161
  Link: Link,
10064
10162
  shopConfigStyle: shopConfigStyle,
10065
10163
  key: index,
10066
10164
  product: product === null || product === void 0 ? void 0 : product.productInfo
10067
10165
  });
10068
- })), (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
10166
+ })), (products === null || products === void 0 ? void 0 : products.length) > 4 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
10069
10167
  href: "/san-pham",
10070
10168
  Link: Link
10071
10169
  }, /*#__PURE__*/React__default.createElement(Button, {
10072
10170
  label: "Xem tất cả",
10073
10171
  shopConfigStyle: shopConfigStyle,
10074
10172
  className: "mt-12"
10075
- })) : null), /*#__PURE__*/React__default.createElement(Dash, {
10173
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)), /*#__PURE__*/React__default.createElement(Dash, {
10076
10174
  color: secondary
10077
10175
  }));
10078
10176
  };
@@ -12620,31 +12718,99 @@ var Employees1 = function Employees1(props) {
12620
12718
  };
12621
12719
 
12622
12720
  var Gallery1 = function Gallery1(props) {
12623
- var _data$data;
12721
+ var _data$data, _data$data2, _ROUTE$BOOKING;
12624
12722
  var _props$shopConfigStyl = props.shopConfigStyle,
12625
12723
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
12626
12724
  _props$data = props.data,
12627
12725
  data = _props$data === void 0 ? {} : _props$data,
12628
12726
  _props$SectionTitle = props.SectionTitle,
12629
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
12727
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
12728
+ _props$Link = props.Link,
12729
+ Link = _props$Link === void 0 ? null : _props$Link;
12630
12730
  var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
12631
12731
  _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
12632
12732
  secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
12633
- console.log("Gallery1 data", data);
12733
+ var sliderRef = React.useRef(null);
12734
+ var settings = {
12735
+ infinite: true,
12736
+ slidesToShow: 3,
12737
+ slidesToScroll: 1,
12738
+ speed: 500,
12739
+ autoplay: false,
12740
+ autoplaySpeed: 4000,
12741
+ pauseOnHover: true,
12742
+ dots: false,
12743
+ swipe: true,
12744
+ touchMove: true,
12745
+ arrows: false,
12746
+ responsive: [{
12747
+ breakpoint: 1024,
12748
+ settings: {
12749
+ slidesToShow: 3,
12750
+ slidesToScroll: 1
12751
+ }
12752
+ }, {
12753
+ breakpoint: 1023,
12754
+ settings: {
12755
+ slidesToShow: 2,
12756
+ slidesToScroll: 1
12757
+ }
12758
+ }, {
12759
+ breakpoint: 635,
12760
+ settings: {
12761
+ slidesToShow: 1,
12762
+ slidesToScroll: 1
12763
+ }
12764
+ }]
12765
+ };
12766
+ var goToNext = function goToNext() {
12767
+ if (sliderRef.current) {
12768
+ sliderRef.current.slickNext();
12769
+ }
12770
+ };
12771
+ var goToPrev = function goToPrev() {
12772
+ if (sliderRef.current) {
12773
+ sliderRef.current.slickPrev();
12774
+ }
12775
+ };
12634
12776
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
12635
12777
  className: "" + SECTION_DEFAULT_CLASS
12636
12778
  }, /*#__PURE__*/React__default.createElement(SectionTitle, {
12637
12779
  data: data,
12638
12780
  shopConfigStyle: shopConfigStyle
12639
- }), /*#__PURE__*/React__default.createElement("div", {
12640
- className: "mt-6 grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-1 md:gap-2"
12641
- }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
12781
+ }), (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
12782
+ className: "mt-10"
12783
+ }, /*#__PURE__*/React__default.createElement(Slider, _extends({}, settings, {
12784
+ ref: sliderRef
12785
+ }), data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : _data$data2.map(function (it, index) {
12642
12786
  return /*#__PURE__*/React__default.createElement("div", {
12643
- key: index
12787
+ key: index,
12788
+ className: "px-0 sm:px-4 md:px-4 pointer-events-none lg:px-6"
12644
12789
  }, /*#__PURE__*/React__default.createElement("img", {
12645
- src: it === null || it === void 0 ? void 0 : it.srcImage
12790
+ src: it === null || it === void 0 ? void 0 : it.srcImage,
12791
+ className: "rounded-2xl object-cover"
12646
12792
  }));
12647
- }))), /*#__PURE__*/React__default.createElement(Dash, {
12793
+ })), /*#__PURE__*/React__default.createElement("div", {
12794
+ className: "flex flex-col gap-6 items-center"
12795
+ }, /*#__PURE__*/React__default.createElement("div", {
12796
+ className: "flex gap-6 mt-2 items-center"
12797
+ }, /*#__PURE__*/React__default.createElement("div", {
12798
+ className: "text-primary cursor-pointer hover:scale-110 duration-200 hover:opacity-80",
12799
+ onClick: goToPrev
12800
+ }, /*#__PURE__*/React__default.createElement(hi.HiOutlineArrowNarrowLeft, {
12801
+ size: 34
12802
+ })), /*#__PURE__*/React__default.createElement("div", {
12803
+ className: "text-primary cursor-pointer hover:scale-110 duration-200 hover:opacity-80",
12804
+ onClick: goToNext
12805
+ }, /*#__PURE__*/React__default.createElement(hi.HiOutlineArrowNarrowRight, {
12806
+ size: 34
12807
+ }))), /*#__PURE__*/React__default.createElement(LinkToPage, {
12808
+ href: ROUTE === null || ROUTE === void 0 ? void 0 : (_ROUTE$BOOKING = ROUTE.BOOKING) === null || _ROUTE$BOOKING === void 0 ? void 0 : _ROUTE$BOOKING.route,
12809
+ Link: Link
12810
+ }, /*#__PURE__*/React__default.createElement(Button, {
12811
+ label: "\u0110\u1EB6T L\u1ECACH NGAY",
12812
+ shopConfigStyle: shopConfigStyle
12813
+ })))) : null), /*#__PURE__*/React__default.createElement(Dash, {
12648
12814
  color: secondary
12649
12815
  }));
12650
12816
  };
@@ -13937,7 +14103,7 @@ var SearchBar6 = function SearchBar6(props) {
13937
14103
  }
13938
14104
  };
13939
14105
  return /*#__PURE__*/React__default.createElement("div", {
13940
- className: "w-full flex flex-col justify-center px-3 md:px-6 gap-2 lg:gap-3 items-center h-32 lg:h-44 ",
14106
+ className: "w-full flex flex-col justify-center px-3 md:px-6 gap-2 md:gap-4 lg:gap-6 items-center h-40 lg:h-52 ",
13941
14107
  style: {
13942
14108
  background: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.srcImage) + ")",
13943
14109
  backgroundPosition: "center",
@@ -13948,7 +14114,7 @@ var SearchBar6 = function SearchBar6(props) {
13948
14114
  }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : _data$data3.title) : null, data !== null && data !== void 0 && (_data$data4 = data.data) !== null && _data$data4 !== void 0 && _data$data4.description ? /*#__PURE__*/React__default.createElement("div", {
13949
14115
  className: "text-center text-textBody"
13950
14116
  }, data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : _data$data5.description) : null, /*#__PURE__*/React__default.createElement("div", {
13951
- className: "flex gap-2 md:gap-4 lg:gap-6 mb-2 md:mb-0 w-full md:w-[70%] h-10 lg:h-12 lg:w-1/2"
14117
+ className: "flex gap-2 md:gap-4 lg:gap-6 mb-2 md:mb-0 w-[90%] sm:w-[70%] h-10 lg:h-12 lg:w-1/2"
13952
14118
  }, /*#__PURE__*/React__default.createElement(Input, {
13953
14119
  icons: /*#__PURE__*/React__default.createElement(io5.IoSearchOutline, {
13954
14120
  className: "text-gray3"
@@ -13979,7 +14145,7 @@ var ShopHighlights2 = function ShopHighlights2(props) {
13979
14145
  Link = _props$Link === void 0 ? null : _props$Link;
13980
14146
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
13981
14147
  return /*#__PURE__*/React__default.createElement("div", {
13982
- className: SECTION_CLASS + " my-0 md:my-0 !bg-bgSecondary py-6 grid grid-cols-2 lg:grid-cols-4 gap-4 lg:gap-6"
14148
+ className: SECTION_CLASS + " !mt-0 !md:mt-0 !bg-bgSecondary py-6 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 md:gap-6"
13983
14149
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
13984
14150
  var _item$title;
13985
14151
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
@@ -14143,7 +14309,7 @@ var VideoFull1 = function VideoFull1(props) {
14143
14309
  data: data,
14144
14310
  shopConfigStyle: shopConfigStyle
14145
14311
  }), youtubeVideoId ? /*#__PURE__*/React__default.createElement("div", {
14146
- className: "w-full aspect-video"
14312
+ className: "w-full aspect-video mt-6"
14147
14313
  }, /*#__PURE__*/React__default.createElement("iframe", {
14148
14314
  className: "w-full h-full",
14149
14315
  src: "https://www.youtube.com/embed/" + youtubeVideoId,