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 +185 -19
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +186 -20
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -18,7 +18,7 @@ import 'slick-carousel/slick/slick.css';
|
|
|
18
18
|
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
|
-
import { HiOutlineLocationMarker } from 'react-icons/hi';
|
|
21
|
+
import { HiOutlineLocationMarker, HiOutlineArrowNarrowLeft, HiOutlineArrowNarrowRight } from 'react-icons/hi';
|
|
22
22
|
import { RiDeleteBin7Line } from 'react-icons/ri';
|
|
23
23
|
import { GiNewspaper } from 'react-icons/gi';
|
|
24
24
|
|
|
@@ -163,6 +163,103 @@ var urlMappings = {
|
|
|
163
163
|
function convertURL(path) {
|
|
164
164
|
return urlMappings[path] || path;
|
|
165
165
|
}
|
|
166
|
+
var ROUTE = {
|
|
167
|
+
HOME: {
|
|
168
|
+
name: "home",
|
|
169
|
+
label: "Trang chủ",
|
|
170
|
+
route: "/",
|
|
171
|
+
isShow: true
|
|
172
|
+
},
|
|
173
|
+
PRODUCTS: {
|
|
174
|
+
name: "products",
|
|
175
|
+
label: "Sản phẩm",
|
|
176
|
+
route: "/products",
|
|
177
|
+
isShow: true
|
|
178
|
+
},
|
|
179
|
+
PRODUCTS_BY_CATEGORY: {
|
|
180
|
+
name: "products_by_category",
|
|
181
|
+
label: "Sản phẩm theo danh mục",
|
|
182
|
+
route: "/products/:slug"
|
|
183
|
+
},
|
|
184
|
+
PRODUCT: {
|
|
185
|
+
name: "product",
|
|
186
|
+
label: "Chi tiết sản phẩm",
|
|
187
|
+
route: "/product/:slug"
|
|
188
|
+
},
|
|
189
|
+
SERVICES: {
|
|
190
|
+
name: "services",
|
|
191
|
+
label: "Dịch vụ",
|
|
192
|
+
route: "/services",
|
|
193
|
+
isShow: true
|
|
194
|
+
},
|
|
195
|
+
SERVICE: {
|
|
196
|
+
name: "service",
|
|
197
|
+
label: "Chi tiết dịch vụ",
|
|
198
|
+
route: "/service/:slug"
|
|
199
|
+
},
|
|
200
|
+
BOOKING: {
|
|
201
|
+
name: "booking",
|
|
202
|
+
label: "Đặt lịch",
|
|
203
|
+
route: "/dat-lich",
|
|
204
|
+
isShow: true
|
|
205
|
+
},
|
|
206
|
+
ABOUT: {
|
|
207
|
+
name: "about",
|
|
208
|
+
label: "Giới thiệu",
|
|
209
|
+
route: "/about",
|
|
210
|
+
isShow: true
|
|
211
|
+
},
|
|
212
|
+
SALES: {
|
|
213
|
+
name: "sales",
|
|
214
|
+
label: "Sản phẩm",
|
|
215
|
+
route: "/sales"
|
|
216
|
+
},
|
|
217
|
+
NEWS: {
|
|
218
|
+
name: "news",
|
|
219
|
+
label: "Tin tức",
|
|
220
|
+
route: "/news"
|
|
221
|
+
},
|
|
222
|
+
NEWS_BY_CATEGORY: {
|
|
223
|
+
name: "news_by_category",
|
|
224
|
+
label: "Tin tức theo danh mục",
|
|
225
|
+
route: "/news/:slug"
|
|
226
|
+
},
|
|
227
|
+
NEWS_DETAIL: {
|
|
228
|
+
name: "news_detail",
|
|
229
|
+
label: "Tin tức",
|
|
230
|
+
route: "/news/:slug/:languageCode"
|
|
231
|
+
},
|
|
232
|
+
CARTS: {
|
|
233
|
+
name: "carts",
|
|
234
|
+
label: "Giỏ hàng",
|
|
235
|
+
route: "/carts"
|
|
236
|
+
},
|
|
237
|
+
ORDERS: {
|
|
238
|
+
name: "orders",
|
|
239
|
+
label: "Đơn hàng",
|
|
240
|
+
route: "/orders"
|
|
241
|
+
},
|
|
242
|
+
ORDER: {
|
|
243
|
+
name: "order",
|
|
244
|
+
label: "Chi tiết đơn hàng",
|
|
245
|
+
route: "/order"
|
|
246
|
+
},
|
|
247
|
+
ACCOUNT: {
|
|
248
|
+
name: "account",
|
|
249
|
+
label: "Tài khoản",
|
|
250
|
+
route: "/account"
|
|
251
|
+
},
|
|
252
|
+
PROFILE: {
|
|
253
|
+
name: "profile",
|
|
254
|
+
label: "Tài khoản",
|
|
255
|
+
route: "/profile"
|
|
256
|
+
},
|
|
257
|
+
SEARCH: {
|
|
258
|
+
name: "search",
|
|
259
|
+
label: "Tìm kiếm",
|
|
260
|
+
route: "/search"
|
|
261
|
+
}
|
|
262
|
+
};
|
|
166
263
|
|
|
167
264
|
var Options = function Options(props) {
|
|
168
265
|
var _props$className = props.className,
|
|
@@ -1107,7 +1204,7 @@ var Hero2 = function Hero2(props) {
|
|
|
1107
1204
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1108
1205
|
className: "font-medium line-clamp-1 ",
|
|
1109
1206
|
style: {
|
|
1110
|
-
fontSize: "clamp(1.25rem,
|
|
1207
|
+
fontSize: "clamp(1.25rem, 4vw, 3.5rem)",
|
|
1111
1208
|
lineHeight: "1.5"
|
|
1112
1209
|
}
|
|
1113
1210
|
}, 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", {
|
|
@@ -9432,7 +9529,7 @@ var TreatmentsList7 = function TreatmentsList7(props) {
|
|
|
9432
9529
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9433
9530
|
className: "mt-12 w-full"
|
|
9434
9531
|
}, (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(Slider, {
|
|
9435
|
-
infinite: true,
|
|
9532
|
+
infinite: (products === null || products === void 0 ? void 0 : products.length) > 1 ? true : false,
|
|
9436
9533
|
slidesToShow: 1,
|
|
9437
9534
|
slidesToScroll: 1,
|
|
9438
9535
|
speed: 500,
|
|
@@ -10026,6 +10123,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
|
|
|
10026
10123
|
};
|
|
10027
10124
|
|
|
10028
10125
|
var ProductList7 = function ProductList7(props) {
|
|
10126
|
+
var _products$slice;
|
|
10029
10127
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
10030
10128
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10031
10129
|
_props$data = props.data,
|
|
@@ -10039,7 +10137,7 @@ var ProductList7 = function ProductList7(props) {
|
|
|
10039
10137
|
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
10040
10138
|
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
|
|
10041
10139
|
var _useState = useState({
|
|
10042
|
-
size:
|
|
10140
|
+
size: 8
|
|
10043
10141
|
}),
|
|
10044
10142
|
params = _useState[0];
|
|
10045
10143
|
var _ProductController = ProductController(_extends({}, props, {
|
|
@@ -10055,21 +10153,21 @@ var ProductList7 = function ProductList7(props) {
|
|
|
10055
10153
|
shopConfigStyle: shopConfigStyle
|
|
10056
10154
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10057
10155
|
className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-10 mt-12"
|
|
10058
|
-
}, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
10156
|
+
}, 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) {
|
|
10059
10157
|
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10060
10158
|
Link: Link,
|
|
10061
10159
|
shopConfigStyle: shopConfigStyle,
|
|
10062
10160
|
key: index,
|
|
10063
10161
|
product: product === null || product === void 0 ? void 0 : product.productInfo
|
|
10064
10162
|
});
|
|
10065
|
-
})), (products === null || products === void 0 ? void 0 : products.length) >
|
|
10163
|
+
})), (products === null || products === void 0 ? void 0 : products.length) > 4 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10066
10164
|
href: "/san-pham",
|
|
10067
10165
|
Link: Link
|
|
10068
10166
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
10069
10167
|
label: "Xem tất cả",
|
|
10070
10168
|
shopConfigStyle: shopConfigStyle,
|
|
10071
10169
|
className: "mt-12"
|
|
10072
|
-
})) : null), /*#__PURE__*/React__default.createElement(Dash, {
|
|
10170
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)), /*#__PURE__*/React__default.createElement(Dash, {
|
|
10073
10171
|
color: secondary
|
|
10074
10172
|
}));
|
|
10075
10173
|
};
|
|
@@ -12617,31 +12715,99 @@ var Employees1 = function Employees1(props) {
|
|
|
12617
12715
|
};
|
|
12618
12716
|
|
|
12619
12717
|
var Gallery1 = function Gallery1(props) {
|
|
12620
|
-
var _data$data;
|
|
12718
|
+
var _data$data, _data$data2, _ROUTE$BOOKING;
|
|
12621
12719
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
12622
12720
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
12623
12721
|
_props$data = props.data,
|
|
12624
12722
|
data = _props$data === void 0 ? {} : _props$data,
|
|
12625
12723
|
_props$SectionTitle = props.SectionTitle,
|
|
12626
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle
|
|
12724
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
12725
|
+
_props$Link = props.Link,
|
|
12726
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
12627
12727
|
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
12628
12728
|
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
12629
12729
|
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
|
|
12630
|
-
|
|
12730
|
+
var sliderRef = useRef(null);
|
|
12731
|
+
var settings = {
|
|
12732
|
+
infinite: true,
|
|
12733
|
+
slidesToShow: 3,
|
|
12734
|
+
slidesToScroll: 1,
|
|
12735
|
+
speed: 500,
|
|
12736
|
+
autoplay: false,
|
|
12737
|
+
autoplaySpeed: 4000,
|
|
12738
|
+
pauseOnHover: true,
|
|
12739
|
+
dots: false,
|
|
12740
|
+
swipe: true,
|
|
12741
|
+
touchMove: true,
|
|
12742
|
+
arrows: false,
|
|
12743
|
+
responsive: [{
|
|
12744
|
+
breakpoint: 1024,
|
|
12745
|
+
settings: {
|
|
12746
|
+
slidesToShow: 3,
|
|
12747
|
+
slidesToScroll: 1
|
|
12748
|
+
}
|
|
12749
|
+
}, {
|
|
12750
|
+
breakpoint: 1023,
|
|
12751
|
+
settings: {
|
|
12752
|
+
slidesToShow: 2,
|
|
12753
|
+
slidesToScroll: 1
|
|
12754
|
+
}
|
|
12755
|
+
}, {
|
|
12756
|
+
breakpoint: 635,
|
|
12757
|
+
settings: {
|
|
12758
|
+
slidesToShow: 1,
|
|
12759
|
+
slidesToScroll: 1
|
|
12760
|
+
}
|
|
12761
|
+
}]
|
|
12762
|
+
};
|
|
12763
|
+
var goToNext = function goToNext() {
|
|
12764
|
+
if (sliderRef.current) {
|
|
12765
|
+
sliderRef.current.slickNext();
|
|
12766
|
+
}
|
|
12767
|
+
};
|
|
12768
|
+
var goToPrev = function goToPrev() {
|
|
12769
|
+
if (sliderRef.current) {
|
|
12770
|
+
sliderRef.current.slickPrev();
|
|
12771
|
+
}
|
|
12772
|
+
};
|
|
12631
12773
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
12632
12774
|
className: "" + SECTION_DEFAULT_CLASS
|
|
12633
12775
|
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
12634
12776
|
data: data,
|
|
12635
12777
|
shopConfigStyle: shopConfigStyle
|
|
12636
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12637
|
-
className: "mt-
|
|
12638
|
-
},
|
|
12778
|
+
}), (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", {
|
|
12779
|
+
className: "mt-10"
|
|
12780
|
+
}, /*#__PURE__*/React__default.createElement(Slider, _extends({}, settings, {
|
|
12781
|
+
ref: sliderRef
|
|
12782
|
+
}), data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : _data$data2.map(function (it, index) {
|
|
12639
12783
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
12640
|
-
key: index
|
|
12784
|
+
key: index,
|
|
12785
|
+
className: "px-0 sm:px-4 md:px-4 pointer-events-none lg:px-6"
|
|
12641
12786
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
12642
|
-
src: it === null || it === void 0 ? void 0 : it.srcImage
|
|
12787
|
+
src: it === null || it === void 0 ? void 0 : it.srcImage,
|
|
12788
|
+
className: "rounded-2xl object-cover"
|
|
12643
12789
|
}));
|
|
12644
|
-
}))
|
|
12790
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
12791
|
+
className: "flex flex-col gap-6 items-center"
|
|
12792
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12793
|
+
className: "flex gap-6 mt-2 items-center"
|
|
12794
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12795
|
+
className: "text-primary cursor-pointer hover:scale-110 duration-200 hover:opacity-80",
|
|
12796
|
+
onClick: goToPrev
|
|
12797
|
+
}, /*#__PURE__*/React__default.createElement(HiOutlineArrowNarrowLeft, {
|
|
12798
|
+
size: 34
|
|
12799
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
12800
|
+
className: "text-primary cursor-pointer hover:scale-110 duration-200 hover:opacity-80",
|
|
12801
|
+
onClick: goToNext
|
|
12802
|
+
}, /*#__PURE__*/React__default.createElement(HiOutlineArrowNarrowRight, {
|
|
12803
|
+
size: 34
|
|
12804
|
+
}))), /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12805
|
+
href: ROUTE === null || ROUTE === void 0 ? void 0 : (_ROUTE$BOOKING = ROUTE.BOOKING) === null || _ROUTE$BOOKING === void 0 ? void 0 : _ROUTE$BOOKING.route,
|
|
12806
|
+
Link: Link
|
|
12807
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
12808
|
+
label: "\u0110\u1EB6T L\u1ECACH NGAY",
|
|
12809
|
+
shopConfigStyle: shopConfigStyle
|
|
12810
|
+
})))) : null), /*#__PURE__*/React__default.createElement(Dash, {
|
|
12645
12811
|
color: secondary
|
|
12646
12812
|
}));
|
|
12647
12813
|
};
|
|
@@ -13934,7 +14100,7 @@ var SearchBar6 = function SearchBar6(props) {
|
|
|
13934
14100
|
}
|
|
13935
14101
|
};
|
|
13936
14102
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
13937
|
-
className: "w-full flex flex-col justify-center px-3 md:px-6 gap-2 lg:gap-
|
|
14103
|
+
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 ",
|
|
13938
14104
|
style: {
|
|
13939
14105
|
background: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.srcImage) + ")",
|
|
13940
14106
|
backgroundPosition: "center",
|
|
@@ -13945,7 +14111,7 @@ var SearchBar6 = function SearchBar6(props) {
|
|
|
13945
14111
|
}, 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", {
|
|
13946
14112
|
className: "text-center text-textBody"
|
|
13947
14113
|
}, 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", {
|
|
13948
|
-
className: "flex gap-2 md:gap-4 lg:gap-6 mb-2 md:mb-0 w-
|
|
14114
|
+
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"
|
|
13949
14115
|
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
13950
14116
|
icons: /*#__PURE__*/React__default.createElement(IoSearchOutline, {
|
|
13951
14117
|
className: "text-gray3"
|
|
@@ -13976,7 +14142,7 @@ var ShopHighlights2 = function ShopHighlights2(props) {
|
|
|
13976
14142
|
Link = _props$Link === void 0 ? null : _props$Link;
|
|
13977
14143
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
13978
14144
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
13979
|
-
className: SECTION_CLASS + "
|
|
14145
|
+
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"
|
|
13980
14146
|
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
13981
14147
|
var _item$title;
|
|
13982
14148
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
@@ -14140,7 +14306,7 @@ var VideoFull1 = function VideoFull1(props) {
|
|
|
14140
14306
|
data: data,
|
|
14141
14307
|
shopConfigStyle: shopConfigStyle
|
|
14142
14308
|
}), youtubeVideoId ? /*#__PURE__*/React__default.createElement("div", {
|
|
14143
|
-
className: "w-full aspect-video"
|
|
14309
|
+
className: "w-full aspect-video mt-6"
|
|
14144
14310
|
}, /*#__PURE__*/React__default.createElement("iframe", {
|
|
14145
14311
|
className: "w-full h-full",
|
|
14146
14312
|
src: "https://www.youtube.com/embed/" + youtubeVideoId,
|