s-platform-landing-section 0.1.20 → 0.1.21
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 +939 -253
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +939 -258
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React__default, { useState, useRef, useEffect, forwardRef, useImperativeHandle, createElement, memo } from 'react';
|
|
2
|
-
import { IoCartOutline, IoChevronDownOutline,
|
|
3
|
-
import { FaUserCircle, FaFacebookF, FaFacebookMessenger, FaBoxOpen, FaAngleUp, FaAngleDown, FaCheckCircle, FaArrowLeft, FaArrowRight } from 'react-icons/fa';
|
|
4
|
-
import { FiMenu, FiShoppingCart, FiSearch } from 'react-icons/fi';
|
|
2
|
+
import { IoCartOutline, IoChevronDownOutline, IoPersonCircleOutline, IoLogOutOutline, IoInformationCircleOutline, IoBagOutline, IoSearchOutline, IoChevronBackOutline, IoChevronForwardOutline } from 'react-icons/io5';
|
|
3
|
+
import { FaUserCircle, FaRegNewspaper, FaFacebookF, FaFacebookMessenger, FaBoxOpen, FaAngleUp, FaAngleDown, FaCheckCircle, FaArrowLeft, FaArrowRight } from 'react-icons/fa';
|
|
4
|
+
import { FiMenu, FiLogIn, FiHome, FiBox, FiPhoneCall, FiShoppingCart, FiSearch } from 'react-icons/fi';
|
|
5
5
|
import { RxCross2 } from 'react-icons/rx';
|
|
6
|
+
import { PiHandHeartBold } from 'react-icons/pi';
|
|
7
|
+
import { TbCategory } from 'react-icons/tb';
|
|
6
8
|
import { SiZalo, SiVisa } from 'react-icons/si';
|
|
7
9
|
import { IoIosStar, IoIosArrowBack, IoIosArrowForward, IoMdCheckmark, IoIosHeartEmpty, IoMdQuote } from 'react-icons/io';
|
|
8
10
|
import { FaMinus, FaRegEyeSlash, FaPlus, FaArrowsRotate, FaStar, FaRegStarHalfStroke, FaRegStar } from 'react-icons/fa6';
|
|
9
|
-
import 'react-icons/pi';
|
|
10
11
|
import 'react-icons/ci';
|
|
11
12
|
import { BsCurrencyDollar } from 'react-icons/bs';
|
|
12
13
|
import { LuSearch } from 'react-icons/lu';
|
|
@@ -15,8 +16,9 @@ import 'react-datepicker/dist/react-datepicker.css';
|
|
|
15
16
|
import Slider from 'react-slick';
|
|
16
17
|
import 'slick-carousel/slick/slick.css';
|
|
17
18
|
import 'slick-carousel/slick/slick-theme.css';
|
|
18
|
-
import { AiOutlineShoppingCart } from 'react-icons/ai';
|
|
19
|
+
import { AiOutlineShoppingCart, AiOutlinePhone } from 'react-icons/ai';
|
|
19
20
|
import { GoCreditCard, GoClock } from 'react-icons/go';
|
|
21
|
+
import { HiOutlineLocationMarker } from 'react-icons/hi';
|
|
20
22
|
import { RiDeleteBin7Line } from 'react-icons/ri';
|
|
21
23
|
import { GiNewspaper } from 'react-icons/gi';
|
|
22
24
|
|
|
@@ -108,36 +110,35 @@ var getDurationValue = function getDurationValue(attributes) {
|
|
|
108
110
|
});
|
|
109
111
|
return durationAtt ? ((durationAtt === null || durationAtt === void 0 ? void 0 : (_durationAtt$value = durationAtt.value) === null || _durationAtt$value === void 0 ? void 0 : _durationAtt$value[0]) || "0") + " p" : "";
|
|
110
112
|
};
|
|
111
|
-
var
|
|
112
|
-
var
|
|
113
|
-
|
|
114
|
-
slug = (_slug = slug) === null || _slug === void 0 ? void 0 : _slug.replace(/(à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ)/g, "a");
|
|
115
|
-
slug = (_slug2 = slug) === null || _slug2 === void 0 ? void 0 : _slug2.replace(/(è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ)/g, "e");
|
|
116
|
-
slug = (_slug3 = slug) === null || _slug3 === void 0 ? void 0 : _slug3.replace(/(ì|í|ị|ỉ|ĩ)/g, "i");
|
|
117
|
-
slug = (_slug4 = slug) === null || _slug4 === void 0 ? void 0 : _slug4.replace(/(ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ)/g, "o");
|
|
118
|
-
slug = (_slug5 = slug) === null || _slug5 === void 0 ? void 0 : _slug5.replace(/(ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ)/g, "u");
|
|
119
|
-
slug = (_slug6 = slug) === null || _slug6 === void 0 ? void 0 : _slug6.replace(/(ỳ|ý|ỵ|ỷ|ỹ)/g, "y");
|
|
120
|
-
slug = (_slug7 = slug) === null || _slug7 === void 0 ? void 0 : _slug7.replace(/(đ)/g, "d");
|
|
121
|
-
slug = (_slug8 = slug) === null || _slug8 === void 0 ? void 0 : _slug8.replace(/([^0-9a-z-\s])/g, "");
|
|
122
|
-
slug = (_slug9 = slug) === null || _slug9 === void 0 ? void 0 : _slug9.replace(/(\s+)/g, "-");
|
|
123
|
-
slug = (_slug10 = slug) === null || _slug10 === void 0 ? void 0 : _slug10.replace(/^-+/g, "");
|
|
124
|
-
slug = (_slug11 = slug) === null || _slug11 === void 0 ? void 0 : _slug11.replace(/-+$/g, "");
|
|
125
|
-
return slug + "-" + id;
|
|
113
|
+
var genProductSlugVi = function genProductSlugVi(productName, id) {
|
|
114
|
+
var _productName$replace;
|
|
115
|
+
return (productName === null || productName === void 0 ? void 0 : (_productName$replace = productName.replace(/\s+/g, "-")) === null || _productName$replace === void 0 ? void 0 : _productName$replace.replace(/\//g, "~")) + "-" + id;
|
|
126
116
|
};
|
|
127
117
|
var getLinkProductDetail = function getLinkProductDetail(product) {
|
|
128
|
-
var slug =
|
|
129
|
-
return "/
|
|
118
|
+
var slug = genProductSlugVi(product === null || product === void 0 ? void 0 : product.productName, product === null || product === void 0 ? void 0 : product.productId);
|
|
119
|
+
return "/san-pham/" + slug;
|
|
130
120
|
};
|
|
131
121
|
var getLinkServiceDetail = function getLinkServiceDetail(product) {
|
|
132
|
-
var slug =
|
|
133
|
-
return "/
|
|
122
|
+
var slug = genProductSlugVi(product === null || product === void 0 ? void 0 : product.productName, product === null || product === void 0 ? void 0 : product.productId);
|
|
123
|
+
return "/dich-vu/" + slug;
|
|
134
124
|
};
|
|
135
125
|
var getLinkNewsDetail = function getLinkNewsDetail(news) {
|
|
136
|
-
var slug =
|
|
137
|
-
|
|
126
|
+
var slug = genProductSlugVi(news === null || news === void 0 ? void 0 : news.title, news === null || news === void 0 ? void 0 : news.articleId);
|
|
127
|
+
var category = genProductSlugVi(news === null || news === void 0 ? void 0 : news.catName, news === null || news === void 0 ? void 0 : news.catId);
|
|
128
|
+
return "/tin-tuc/" + category + "/" + slug;
|
|
138
129
|
};
|
|
139
130
|
var getLinkNewsByCategory = function getLinkNewsByCategory(news) {
|
|
140
|
-
|
|
131
|
+
var slug = genProductSlugVi(news === null || news === void 0 ? void 0 : news.catName, news === null || news === void 0 ? void 0 : news.catId);
|
|
132
|
+
return "/tin-tuc/" + slug;
|
|
133
|
+
};
|
|
134
|
+
var getLinkProductsByCategory = function getLinkProductsByCategory(product) {
|
|
135
|
+
if (product !== null && product !== void 0 && product.categoryName) {
|
|
136
|
+
var slug = genProductSlugVi(product === null || product === void 0 ? void 0 : product.categoryName, product === null || product === void 0 ? void 0 : product.categoryId);
|
|
137
|
+
return "/danh-muc/" + slug;
|
|
138
|
+
} else {
|
|
139
|
+
var _slug12 = genProductSlugVi(product === null || product === void 0 ? void 0 : product.cateName, product === null || product === void 0 ? void 0 : product.categoryId);
|
|
140
|
+
return "/danh-muc/" + _slug12;
|
|
141
|
+
}
|
|
141
142
|
};
|
|
142
143
|
var LinkToPage = function LinkToPage(props) {
|
|
143
144
|
var _props$Link = props.Link,
|
|
@@ -147,12 +148,22 @@ var LinkToPage = function LinkToPage(props) {
|
|
|
147
148
|
};
|
|
148
149
|
var SSHOP_SPA_TOKEN = "sshop-spa-token";
|
|
149
150
|
var genLinkSearch = function genLinkSearch(keyword) {
|
|
150
|
-
return "/
|
|
151
|
+
return "/tim-kiem?tu-khoa=" + keyword;
|
|
151
152
|
};
|
|
152
153
|
var configSvg = function configSvg(data) {
|
|
153
154
|
var _data$replace, _data$replace$replace;
|
|
154
155
|
return data === null || data === void 0 ? void 0 : (_data$replace = data.replace(/<path(?![^>]*fill=")[^>]*>/g, "<path fill=\"currentColor\" $&")) === null || _data$replace === void 0 ? void 0 : (_data$replace$replace = _data$replace.replace(/width="[^"]*"/, '')) === null || _data$replace$replace === void 0 ? void 0 : _data$replace$replace.replace(/height="[^"]*"/, '');
|
|
155
156
|
};
|
|
157
|
+
var urlMappings = {
|
|
158
|
+
"/products": "/san-pham",
|
|
159
|
+
"/news": "/tin-tuc",
|
|
160
|
+
"/services": "/dich-vu",
|
|
161
|
+
"/booking": "/dat-lich",
|
|
162
|
+
"/about": "/gioi-thieu"
|
|
163
|
+
};
|
|
164
|
+
function convertURL(path) {
|
|
165
|
+
return urlMappings[path] || path;
|
|
166
|
+
}
|
|
156
167
|
|
|
157
168
|
var Options = function Options(props) {
|
|
158
169
|
var _props$className = props.className,
|
|
@@ -219,6 +230,29 @@ var Options = function Options(props) {
|
|
|
219
230
|
}))) : null);
|
|
220
231
|
};
|
|
221
232
|
|
|
233
|
+
var listIconRoute = {
|
|
234
|
+
home: /*#__PURE__*/React__default.createElement(FiHome, {
|
|
235
|
+
size: 20
|
|
236
|
+
}),
|
|
237
|
+
products: /*#__PURE__*/React__default.createElement(FiBox, {
|
|
238
|
+
size: 20
|
|
239
|
+
}),
|
|
240
|
+
services: /*#__PURE__*/React__default.createElement(FiPhoneCall, {
|
|
241
|
+
size: 20
|
|
242
|
+
}),
|
|
243
|
+
booking: /*#__PURE__*/React__default.createElement(PiHandHeartBold, {
|
|
244
|
+
size: 20
|
|
245
|
+
}),
|
|
246
|
+
news: /*#__PURE__*/React__default.createElement(FaRegNewspaper, {
|
|
247
|
+
size: 20
|
|
248
|
+
}),
|
|
249
|
+
news_by_category: /*#__PURE__*/React__default.createElement(TbCategory, {
|
|
250
|
+
size: 20
|
|
251
|
+
}),
|
|
252
|
+
about: /*#__PURE__*/React__default.createElement(IoInformationCircleOutline, {
|
|
253
|
+
size: 24
|
|
254
|
+
})
|
|
255
|
+
};
|
|
222
256
|
var NavBar7 = function NavBar7(props) {
|
|
223
257
|
var _routes$find, _shopConfigStyle$navB, _shopConfigStyle$navB2, _shopConfigStyle$navB3, _shopConfigStyle$navB4;
|
|
224
258
|
var _useState = useState(false),
|
|
@@ -278,7 +312,7 @@ var NavBar7 = function NavBar7(props) {
|
|
|
278
312
|
var cart = function cart() {
|
|
279
313
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
280
314
|
Link: Link,
|
|
281
|
-
href: "/
|
|
315
|
+
href: "/gio-hang"
|
|
282
316
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
283
317
|
className: "relative cursor-pointer"
|
|
284
318
|
}, /*#__PURE__*/React__default.createElement(IoCartOutline, {
|
|
@@ -290,7 +324,12 @@ var NavBar7 = function NavBar7(props) {
|
|
|
290
324
|
};
|
|
291
325
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
292
326
|
className: "w-full sticky top-0 shadow z-50 bg-background"
|
|
293
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
327
|
+
}, /*#__PURE__*/React__default.createElement("h1", {
|
|
328
|
+
style: {
|
|
329
|
+
position: "fixed",
|
|
330
|
+
top: "-100px"
|
|
331
|
+
}
|
|
332
|
+
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.defaultDomain, " | ", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName), /*#__PURE__*/React__default.createElement("div", {
|
|
294
333
|
className: "hidden lg:flex gap-6 justify-between items-center py-2 px-4 xl:px-20"
|
|
295
334
|
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
296
335
|
Link: Link,
|
|
@@ -309,8 +348,8 @@ var NavBar7 = function NavBar7(props) {
|
|
|
309
348
|
})) === null || _shopConfigStyle$navB2 === void 0 ? void 0 : _shopConfigStyle$navB2.map(function (item, index) {
|
|
310
349
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
311
350
|
Link: Link,
|
|
312
|
-
href: item === null || item === void 0 ? void 0 : item.route,
|
|
313
|
-
key: index
|
|
351
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route),
|
|
352
|
+
key: "dhfs" + index
|
|
314
353
|
}, (item === null || item === void 0 ? void 0 : item.name) === (route === null || route === void 0 ? void 0 : route.name) ? /*#__PURE__*/React__default.createElement("div", {
|
|
315
354
|
className: "whitespace-nowrap py-1 border-b text-textHeading border-textHeading"
|
|
316
355
|
}, item === null || item === void 0 ? void 0 : item.label) : /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -321,7 +360,7 @@ var NavBar7 = function NavBar7(props) {
|
|
|
321
360
|
React__default.createElement("div", {
|
|
322
361
|
className: "flex justify-center"
|
|
323
362
|
}, /*#__PURE__*/React__default.createElement(FaUserCircle, {
|
|
324
|
-
className: "text-
|
|
363
|
+
className: "text-primary",
|
|
325
364
|
size: 48
|
|
326
365
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
327
366
|
className: "ml-2"
|
|
@@ -341,7 +380,7 @@ var NavBar7 = function NavBar7(props) {
|
|
|
341
380
|
className: "flex gap-2"
|
|
342
381
|
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
343
382
|
Link: Link,
|
|
344
|
-
href: "/
|
|
383
|
+
href: "/dang-nhap"
|
|
345
384
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
346
385
|
label: "Đăng nhập",
|
|
347
386
|
shopConfigStyle: shopConfigStyle
|
|
@@ -384,42 +423,102 @@ var NavBar7 = function NavBar7(props) {
|
|
|
384
423
|
}
|
|
385
424
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
386
425
|
className: "flex justify-between"
|
|
387
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
388
|
-
className: "flex gap-2 items-center"
|
|
389
426
|
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
390
427
|
Link: Link,
|
|
391
428
|
href: "/",
|
|
392
429
|
onClick: function onClick() {
|
|
393
430
|
return setIsOpen(false);
|
|
394
431
|
}
|
|
432
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
433
|
+
className: "flex gap-2 items-center"
|
|
395
434
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
396
435
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
397
436
|
className: "h-14 w-14 bg-cover bg-no-repeat"
|
|
398
|
-
})
|
|
437
|
+
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
399
438
|
className: "text-xl font-semibold line-clamp-1"
|
|
400
|
-
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("button", {
|
|
439
|
+
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName))), /*#__PURE__*/React__default.createElement("button", {
|
|
401
440
|
className: "text-gray4",
|
|
402
441
|
onClick: function onClick() {
|
|
403
442
|
setIsOpen(false);
|
|
404
443
|
}
|
|
405
444
|
}, /*#__PURE__*/React__default.createElement(RxCross2, {
|
|
406
445
|
size: 24
|
|
407
|
-
}))), /*#__PURE__*/React__default.createElement("div",
|
|
446
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
447
|
+
className: "flex flex-col justify-start"
|
|
448
|
+
}, shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : (_shopConfigStyle$navB3 = shopConfigStyle.navBarMenus) === null || _shopConfigStyle$navB3 === void 0 ? void 0 : (_shopConfigStyle$navB4 = _shopConfigStyle$navB3.filter(function (e) {
|
|
408
449
|
return e === null || e === void 0 ? void 0 : e.isShow;
|
|
409
450
|
})) === null || _shopConfigStyle$navB4 === void 0 ? void 0 : _shopConfigStyle$navB4.map(function (item, index) {
|
|
410
451
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
411
452
|
Link: Link,
|
|
412
|
-
href: item === null || item === void 0 ? void 0 : item.route,
|
|
413
|
-
key: index,
|
|
453
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route),
|
|
454
|
+
key: "ieytg-" + index,
|
|
414
455
|
onClick: function onClick() {
|
|
415
456
|
return setIsOpen(false);
|
|
416
457
|
}
|
|
417
458
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
418
|
-
className: "py-2 " + ((item === null || item === void 0 ? void 0 : item.name) === (route === null || route === void 0 ? void 0 : route.name) ? "text-textHeading" : "")
|
|
419
|
-
}, item === null || item === void 0 ? void 0 : item.label));
|
|
420
|
-
})
|
|
459
|
+
className: "py-2 px-4 flex items-center gap-4 " + ((item === null || item === void 0 ? void 0 : item.name) === (route === null || route === void 0 ? void 0 : route.name) ? "text-textHeading" : "")
|
|
460
|
+
}, /*#__PURE__*/React__default.createElement("div", null, (listIconRoute === null || listIconRoute === void 0 ? void 0 : listIconRoute[item === null || item === void 0 ? void 0 : item.name]) || ""), item === null || item === void 0 ? void 0 : item.label));
|
|
461
|
+
}), /*#__PURE__*/React__default.createElement("hr", {
|
|
462
|
+
className: "border-black"
|
|
463
|
+
}), userInfo ? profileOptions === null || profileOptions === void 0 ? void 0 : profileOptions.map(function (option, index) {
|
|
464
|
+
return option !== null && option !== void 0 && option.href ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
465
|
+
onClick: function onClick() {
|
|
466
|
+
return setIsOpen(false);
|
|
467
|
+
},
|
|
468
|
+
key: "hkfdfh-" + index,
|
|
469
|
+
Link: Link,
|
|
470
|
+
href: option === null || option === void 0 ? void 0 : option.href,
|
|
471
|
+
className: "flex gap-2 px-4 py-2 text-black hover:bg-gray-100 rounded cursor-pointer",
|
|
472
|
+
role: "menuitem"
|
|
473
|
+
}, /*#__PURE__*/React__default.createElement(IoPersonCircleOutline, {
|
|
474
|
+
size: 24
|
|
475
|
+
}), /*#__PURE__*/React__default.createElement("p", null, option === null || option === void 0 ? void 0 : option.label)) : /*#__PURE__*/React__default.createElement("div", {
|
|
476
|
+
key: "hkfdfh-" + index,
|
|
477
|
+
onClick: function onClick() {
|
|
478
|
+
setIsOpen(false);
|
|
479
|
+
logout();
|
|
480
|
+
},
|
|
481
|
+
className: "flex gap-2 px-4 py-2 text-black hover:bg-gray-100 rounded cursor-pointer",
|
|
482
|
+
role: "menuitem"
|
|
483
|
+
}, /*#__PURE__*/React__default.createElement(IoLogOutOutline, {
|
|
484
|
+
size: 24
|
|
485
|
+
}), /*#__PURE__*/React__default.createElement("p", null, option === null || option === void 0 ? void 0 : option.label));
|
|
486
|
+
}) : /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
487
|
+
Link: Link,
|
|
488
|
+
href: "/dang-nhap",
|
|
489
|
+
onClick: function onClick() {
|
|
490
|
+
return setIsOpen(false);
|
|
491
|
+
}
|
|
492
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
493
|
+
className: "py-2 px-4 flex items-center gap-4"
|
|
494
|
+
}, /*#__PURE__*/React__default.createElement(FiLogIn, {
|
|
495
|
+
size: 20
|
|
496
|
+
}), "\u0110\u0103ng nh\u1EADp"))))) : null));
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
var listIconRoute$1 = {
|
|
500
|
+
home: /*#__PURE__*/React__default.createElement(FiHome, {
|
|
501
|
+
size: 20
|
|
502
|
+
}),
|
|
503
|
+
products: /*#__PURE__*/React__default.createElement(FiBox, {
|
|
504
|
+
size: 20
|
|
505
|
+
}),
|
|
506
|
+
services: /*#__PURE__*/React__default.createElement(FiPhoneCall, {
|
|
507
|
+
size: 20
|
|
508
|
+
}),
|
|
509
|
+
booking: /*#__PURE__*/React__default.createElement(PiHandHeartBold, {
|
|
510
|
+
size: 20
|
|
511
|
+
}),
|
|
512
|
+
news: /*#__PURE__*/React__default.createElement(FaRegNewspaper, {
|
|
513
|
+
size: 20
|
|
514
|
+
}),
|
|
515
|
+
news_by_category: /*#__PURE__*/React__default.createElement(TbCategory, {
|
|
516
|
+
size: 20
|
|
517
|
+
}),
|
|
518
|
+
about: /*#__PURE__*/React__default.createElement(IoInformationCircleOutline, {
|
|
519
|
+
size: 24
|
|
520
|
+
})
|
|
421
521
|
};
|
|
422
|
-
|
|
423
522
|
var NavBar1 = function NavBar1(props) {
|
|
424
523
|
var _routes$find, _shopConfigStyle$navB, _shopConfigStyle$navB2, _shopConfigStyle$navB3, _shopConfigStyle$navB4;
|
|
425
524
|
var _useState = useState(false),
|
|
@@ -479,7 +578,7 @@ var NavBar1 = function NavBar1(props) {
|
|
|
479
578
|
var cart = function cart() {
|
|
480
579
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
481
580
|
Link: Link,
|
|
482
|
-
href: "/
|
|
581
|
+
href: "/gio-hang"
|
|
483
582
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
484
583
|
className: "relative cursor-pointer"
|
|
485
584
|
}, /*#__PURE__*/React__default.createElement(IoBagOutline, {
|
|
@@ -489,24 +588,32 @@ var NavBar1 = function NavBar1(props) {
|
|
|
489
588
|
className: "absolute aspect-square flex items-center justify-center bg-danger w-5 text-xs rounded-full text-white -top-1 -right-1 pb-px ps-px"
|
|
490
589
|
}, totalItem) : null));
|
|
491
590
|
};
|
|
492
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("
|
|
591
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("h1", {
|
|
592
|
+
style: {
|
|
593
|
+
position: "fixed",
|
|
594
|
+
top: "-100px"
|
|
595
|
+
}
|
|
596
|
+
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.defaultDomain, " | ", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName), /*#__PURE__*/React__default.createElement("div", {
|
|
493
597
|
className: "hidden lg:flex justify-end items-center gap-6 px-20 py-2 bg-primary"
|
|
494
598
|
}, shopConfig !== null && shopConfig !== void 0 && shopConfig.shopPhone ? /*#__PURE__*/React__default.createElement("div", {
|
|
495
599
|
className: "font-medium border-r pr-6 text-background"
|
|
496
600
|
}, "Hotline: ", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
497
601
|
className: "flex justify-start items-center gap-2"
|
|
498
602
|
}, /*#__PURE__*/React__default.createElement("a", {
|
|
499
|
-
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#"
|
|
603
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#",
|
|
604
|
+
target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopFacebookPage ? "_blank" : "_self"
|
|
500
605
|
}, /*#__PURE__*/React__default.createElement(FaFacebookF, {
|
|
501
606
|
size: 24,
|
|
502
607
|
className: "p-1 rounded bg-background text-primary"
|
|
503
608
|
})), /*#__PURE__*/React__default.createElement("a", {
|
|
504
|
-
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#"
|
|
609
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#",
|
|
610
|
+
target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopMessenger ? "_blank" : "_self"
|
|
505
611
|
}, /*#__PURE__*/React__default.createElement(FaFacebookMessenger, {
|
|
506
612
|
size: 24,
|
|
507
613
|
className: "p-1 rounded bg-background text-primary"
|
|
508
614
|
})), /*#__PURE__*/React__default.createElement("a", {
|
|
509
|
-
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#"
|
|
615
|
+
href: "https://zalo.me/" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#",
|
|
616
|
+
target: "_blank"
|
|
510
617
|
}, /*#__PURE__*/React__default.createElement(SiZalo, {
|
|
511
618
|
size: 24,
|
|
512
619
|
className: "p-1 rounded bg-background text-primary"
|
|
@@ -529,7 +636,7 @@ var NavBar1 = function NavBar1(props) {
|
|
|
529
636
|
})) === null || _shopConfigStyle$navB2 === void 0 ? void 0 : _shopConfigStyle$navB2.map(function (item, index) {
|
|
530
637
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
531
638
|
Link: Link,
|
|
532
|
-
href: item === null || item === void 0 ? void 0 : item.route,
|
|
639
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route),
|
|
533
640
|
key: index
|
|
534
641
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
535
642
|
className: "py-1 whitespace-nowrap " + ((item === null || item === void 0 ? void 0 : item.name) === (route === null || route === void 0 ? void 0 : route.name) ? "border-b text-primary border-primary" : "text-textBody") + " "
|
|
@@ -559,7 +666,7 @@ var NavBar1 = function NavBar1(props) {
|
|
|
559
666
|
className: "flex gap-2"
|
|
560
667
|
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
561
668
|
Link: Link,
|
|
562
|
-
href: "/
|
|
669
|
+
href: "/dang-nhap"
|
|
563
670
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
564
671
|
label: "Đăng nhập",
|
|
565
672
|
shopConfigStyle: shopConfigStyle
|
|
@@ -602,40 +709,77 @@ var NavBar1 = function NavBar1(props) {
|
|
|
602
709
|
}
|
|
603
710
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
604
711
|
className: "flex justify-between"
|
|
605
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
606
|
-
className: "flex gap-2 items-center"
|
|
607
712
|
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
608
713
|
Link: Link,
|
|
609
714
|
href: "/",
|
|
610
715
|
onClick: function onClick() {
|
|
611
716
|
return setIsOpen(false);
|
|
612
717
|
}
|
|
718
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
719
|
+
className: "flex gap-2 items-center"
|
|
613
720
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
614
721
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
615
722
|
className: "h-14 w-14 bg-cover bg-no-repeat"
|
|
616
|
-
})
|
|
723
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
617
724
|
className: "text-xl font-semibold line-clamp-1"
|
|
618
|
-
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("button", {
|
|
725
|
+
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName))), /*#__PURE__*/React__default.createElement("button", {
|
|
619
726
|
className: "text-gray4",
|
|
620
727
|
onClick: function onClick() {
|
|
621
728
|
setIsOpen(false);
|
|
622
729
|
}
|
|
623
730
|
}, /*#__PURE__*/React__default.createElement(RxCross2, {
|
|
624
731
|
size: 24
|
|
625
|
-
}))), /*#__PURE__*/React__default.createElement("div",
|
|
732
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
733
|
+
className: "flex flex-col justify-start"
|
|
734
|
+
}, shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : (_shopConfigStyle$navB3 = shopConfigStyle.navBarMenus) === null || _shopConfigStyle$navB3 === void 0 ? void 0 : (_shopConfigStyle$navB4 = _shopConfigStyle$navB3.filter(function (e) {
|
|
626
735
|
return e === null || e === void 0 ? void 0 : e.isShow;
|
|
627
736
|
})) === null || _shopConfigStyle$navB4 === void 0 ? void 0 : _shopConfigStyle$navB4.map(function (item, index) {
|
|
628
737
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
629
738
|
Link: Link,
|
|
630
|
-
href: item === null || item === void 0 ? void 0 : item.route,
|
|
739
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route),
|
|
631
740
|
key: index,
|
|
632
741
|
onClick: function onClick() {
|
|
633
742
|
return setIsOpen(false);
|
|
634
743
|
}
|
|
635
744
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
636
|
-
className: "py-2 " + ((item === null || item === void 0 ? void 0 : item.name) === (route === null || route === void 0 ? void 0 : route.name) ? "text-textHeading" : "")
|
|
637
|
-
}, item === null || item === void 0 ? void 0 : item.label));
|
|
638
|
-
})
|
|
745
|
+
className: "py-2 px-4 flex items-center gap-4 " + ((item === null || item === void 0 ? void 0 : item.name) === (route === null || route === void 0 ? void 0 : route.name) ? "text-textHeading" : "")
|
|
746
|
+
}, /*#__PURE__*/React__default.createElement("div", null, (listIconRoute$1 === null || listIconRoute$1 === void 0 ? void 0 : listIconRoute$1[item === null || item === void 0 ? void 0 : item.name]) || ""), item === null || item === void 0 ? void 0 : item.label));
|
|
747
|
+
}), /*#__PURE__*/React__default.createElement("hr", {
|
|
748
|
+
className: "border-black"
|
|
749
|
+
}), userInfo ? profileOptions === null || profileOptions === void 0 ? void 0 : profileOptions.map(function (option, index) {
|
|
750
|
+
return option !== null && option !== void 0 && option.href ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
751
|
+
onClick: function onClick() {
|
|
752
|
+
return setIsOpen(false);
|
|
753
|
+
},
|
|
754
|
+
key: "hkfdfh-" + index,
|
|
755
|
+
Link: Link,
|
|
756
|
+
href: option === null || option === void 0 ? void 0 : option.href,
|
|
757
|
+
className: "flex gap-2 px-4 py-2 text-black hover:bg-gray-100 rounded cursor-pointer",
|
|
758
|
+
role: "menuitem"
|
|
759
|
+
}, /*#__PURE__*/React__default.createElement(IoPersonCircleOutline, {
|
|
760
|
+
size: 24
|
|
761
|
+
}), /*#__PURE__*/React__default.createElement("p", null, option === null || option === void 0 ? void 0 : option.label)) : /*#__PURE__*/React__default.createElement("div", {
|
|
762
|
+
key: "hkfdfh-" + index,
|
|
763
|
+
onClick: function onClick() {
|
|
764
|
+
setIsOpen(false);
|
|
765
|
+
logout();
|
|
766
|
+
},
|
|
767
|
+
className: "flex gap-2 px-4 py-2 text-black hover:bg-gray-100 rounded cursor-pointer",
|
|
768
|
+
role: "menuitem"
|
|
769
|
+
}, /*#__PURE__*/React__default.createElement(IoLogOutOutline, {
|
|
770
|
+
size: 24
|
|
771
|
+
}), /*#__PURE__*/React__default.createElement("p", null, option === null || option === void 0 ? void 0 : option.label));
|
|
772
|
+
}) : /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
773
|
+
Link: Link,
|
|
774
|
+
href: "/dang-nhap",
|
|
775
|
+
onClick: function onClick() {
|
|
776
|
+
return setIsOpen(false);
|
|
777
|
+
}
|
|
778
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
779
|
+
className: "py-2 px-4 flex items-center gap-4"
|
|
780
|
+
}, /*#__PURE__*/React__default.createElement(FiLogIn, {
|
|
781
|
+
size: 20
|
|
782
|
+
}), "\u0110\u0103ng nh\u1EADp"))))) : null));
|
|
639
783
|
};
|
|
640
784
|
|
|
641
785
|
var SvgIcon = function SvgIcon(_ref) {
|
|
@@ -663,7 +807,7 @@ var SvgIcon = function SvgIcon(_ref) {
|
|
|
663
807
|
var SectionTitle1 = function SectionTitle1(props) {
|
|
664
808
|
var _props$data = props.data,
|
|
665
809
|
data = _props$data === void 0 ? {} : _props$data;
|
|
666
|
-
return /*#__PURE__*/React__default.createElement("div", null, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("
|
|
810
|
+
return /*#__PURE__*/React__default.createElement("div", null, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("h2", {
|
|
667
811
|
className: "text-center text-2xl md:text-4xl font-headingFont font-semibold leading-relaxed text-textHeading"
|
|
668
812
|
}, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement("div", {
|
|
669
813
|
className: "flex items-center justify-center"
|
|
@@ -687,7 +831,7 @@ var SectionTitle2 = function SectionTitle2(props) {
|
|
|
687
831
|
className: "flex gap-4 justify-center items-center"
|
|
688
832
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
689
833
|
className: " w-32 h-0.5 rounded-full bg-stroke"
|
|
690
|
-
}), /*#__PURE__*/React__default.createElement("
|
|
834
|
+
}), /*#__PURE__*/React__default.createElement("h2", {
|
|
691
835
|
className: "text-center whitespace-nowrap text-2xl md:text-4xl font-headingFont font-semibold leading-relaxed text-textHeading"
|
|
692
836
|
}, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement("div", {
|
|
693
837
|
className: " w-32 h-0.5 rounded-full bg-stroke"
|
|
@@ -706,7 +850,7 @@ var SectionTitle2 = function SectionTitle2(props) {
|
|
|
706
850
|
|
|
707
851
|
var SectionTitle3 = function SectionTitle3(props) {
|
|
708
852
|
var data = props.data;
|
|
709
|
-
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("
|
|
853
|
+
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("h2", {
|
|
710
854
|
className: "font-headingFont leading-relaxed text-textHeading text-2xl md:text-4xl font-semibold"
|
|
711
855
|
}, data === null || data === void 0 ? void 0 : data.sectionTitle), data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("p", {
|
|
712
856
|
className: "text-xl font-medium leading-relaxed text-textSecondary mt-4 lg:mt-6"
|
|
@@ -732,6 +876,8 @@ var Input = forwardRef(function (props, ref) {
|
|
|
732
876
|
style = _props$style === void 0 ? {} : _props$style,
|
|
733
877
|
_props$onChange = props.onChange,
|
|
734
878
|
onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
|
|
879
|
+
_props$disabled = props.disabled,
|
|
880
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
735
881
|
_props$defaultValue = props.defaultValue,
|
|
736
882
|
defaultValue = _props$defaultValue === void 0 ? "" : _props$defaultValue,
|
|
737
883
|
_props$type = props.type,
|
|
@@ -779,15 +925,15 @@ var Input = forwardRef(function (props, ref) {
|
|
|
779
925
|
for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
|
|
780
926
|
var _e$pattern, _e$validate;
|
|
781
927
|
var e = _step.value;
|
|
782
|
-
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' &&
|
|
928
|
+
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && !value) {
|
|
783
929
|
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
784
930
|
count++;
|
|
785
931
|
break;
|
|
786
|
-
} else if (value
|
|
932
|
+
} else if (value && (e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
|
|
787
933
|
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
788
934
|
count++;
|
|
789
935
|
break;
|
|
790
|
-
} else if (value
|
|
936
|
+
} else if (value && (e === null || e === void 0 ? void 0 : e.type) === "validate" && e !== null && e !== void 0 && e.validate && !(e !== null && e !== void 0 && (_e$validate = e.validate) !== null && _e$validate !== void 0 && _e$validate.call(e))) {
|
|
791
937
|
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
792
938
|
count++;
|
|
793
939
|
break;
|
|
@@ -810,7 +956,7 @@ var Input = forwardRef(function (props, ref) {
|
|
|
810
956
|
};
|
|
811
957
|
var changeQuantity = function changeQuantity(quantity) {
|
|
812
958
|
var newValue = parseInt(value) + quantity;
|
|
813
|
-
if (newValue > min && (max === null || newValue <= max)) {
|
|
959
|
+
if (!disabled && newValue > min && (max === null || newValue <= max)) {
|
|
814
960
|
_setValue(newValue);
|
|
815
961
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
816
962
|
}
|
|
@@ -833,7 +979,7 @@ var Input = forwardRef(function (props, ref) {
|
|
|
833
979
|
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
834
980
|
className: "mb-1 " + labelClassName
|
|
835
981
|
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
836
|
-
className: "flex gap-2 items-center
|
|
982
|
+
className: "bg-white " + (disabled ? "!bg-gray6" : "") + " flex gap-2 items-center " + _className,
|
|
837
983
|
style: style
|
|
838
984
|
}, isQuantity ? /*#__PURE__*/React__default.createElement("button", {
|
|
839
985
|
onClick: function onClick() {
|
|
@@ -844,6 +990,7 @@ var Input = forwardRef(function (props, ref) {
|
|
|
844
990
|
name: name,
|
|
845
991
|
value: value,
|
|
846
992
|
placeholder: placeholder,
|
|
993
|
+
disabled: disabled,
|
|
847
994
|
onChange: handleOnChange,
|
|
848
995
|
required: required,
|
|
849
996
|
className: _inputClassName,
|
|
@@ -877,7 +1024,7 @@ var Hero1 = function Hero1(props) {
|
|
|
877
1024
|
style: {
|
|
878
1025
|
backgroundImage: "url(" + (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]) + ")"
|
|
879
1026
|
},
|
|
880
|
-
className: "relative w-full h-[200px] md:h-[320px] lg:h-[400px] xl:h-[480px] bg-cover bg-center bg-no-repeat z-0 flex flex-col items-center justify-center mb-24"
|
|
1027
|
+
className: "relative w-full min-h-[200px] md:min-h-[320px] lg:min-h-[400px] xl:min-h-[480px] h-full bg-cover bg-center bg-no-repeat z-0 flex flex-col items-center justify-center mb-24"
|
|
881
1028
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
882
1029
|
className: "w-[80%] md:w-2/3 xl:w-1/2 md:h-2/3 flex flex-col gap-2 md:gap-8 justify-center items-center bg-background opacity-90 absolute top-5 md:top-10 px-6 py-4 rounded-tr-[40px] rounded-bl-[40px] md:rounded-tr-[80px] md:rounded-bl-[80px]"
|
|
883
1030
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -889,7 +1036,7 @@ var Hero1 = function Hero1(props) {
|
|
|
889
1036
|
className: "text-center md:text-2xl lg:text-3xl font-medium"
|
|
890
1037
|
}, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$3 = sectionData[0]) === null || _sectionData$3 === void 0 ? void 0 : _sectionData$3.description), /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
891
1038
|
Link: Link,
|
|
892
|
-
href: (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$4 = sectionData[0]) === null || _sectionData$4 === void 0 ? void 0 : (_sectionData$4$button = _sectionData$4.buttons) === null || _sectionData$4$button === void 0 ? void 0 : (_sectionData$4$button2 = _sectionData$4$button[0]) === null || _sectionData$4$button2 === void 0 ? void 0 : _sectionData$4$button2.route) || (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$5 = sectionData[0]) === null || _sectionData$5 === void 0 ? void 0 : (_sectionData$5$button = _sectionData$5.buttons) === null || _sectionData$5$button === void 0 ? void 0 : (_sectionData$5$button2 = _sectionData$5$button[0]) === null || _sectionData$5$button2 === void 0 ? void 0 : _sectionData$5$button2.link) || "#"
|
|
1039
|
+
href: convertURL(sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$4 = sectionData[0]) === null || _sectionData$4 === void 0 ? void 0 : (_sectionData$4$button = _sectionData$4.buttons) === null || _sectionData$4$button === void 0 ? void 0 : (_sectionData$4$button2 = _sectionData$4$button[0]) === null || _sectionData$4$button2 === void 0 ? void 0 : _sectionData$4$button2.route) || (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$5 = sectionData[0]) === null || _sectionData$5 === void 0 ? void 0 : (_sectionData$5$button = _sectionData$5.buttons) === null || _sectionData$5$button === void 0 ? void 0 : (_sectionData$5$button2 = _sectionData$5$button[0]) === null || _sectionData$5$button2 === void 0 ? void 0 : _sectionData$5$button2.link) || "#"
|
|
893
1040
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
894
1041
|
label: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$6 = sectionData[0]) === null || _sectionData$6 === void 0 ? void 0 : (_sectionData$6$button = _sectionData$6.buttons) === null || _sectionData$6$button === void 0 ? void 0 : (_sectionData$6$button2 = _sectionData$6$button[0]) === null || _sectionData$6$button2 === void 0 ? void 0 : _sectionData$6$button2.label,
|
|
895
1042
|
shopConfigStyle: shopConfigStyle
|
|
@@ -916,45 +1063,48 @@ var Hero1 = function Hero1(props) {
|
|
|
916
1063
|
};
|
|
917
1064
|
|
|
918
1065
|
var Hero2 = function Hero2(props) {
|
|
919
|
-
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$;
|
|
1066
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$, _data$data4, _data$data4$;
|
|
920
1067
|
var shopConfig = props.shopConfig,
|
|
921
1068
|
data = props.data;
|
|
922
1069
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
923
1070
|
className: "relative"
|
|
924
1071
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
925
1072
|
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],
|
|
1073
|
+
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,
|
|
926
1074
|
className: "w-full object-cover min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
|
|
927
1075
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
928
1076
|
className: "absolute flex flex-col gap-1 md:gap-4 absolute w-1/2 lg:w-1/3 top-2 sm:top-[20%] xl:top-1/4 right-[2%] lg:right-[15%]"
|
|
929
1077
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
930
1078
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
1079
|
+
alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName,
|
|
931
1080
|
className: "h-6 w-6 md:h-16 md:w-16 lg:h-20 lg:w-20"
|
|
932
1081
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
933
1082
|
className: "text-lg md:text-3xl lg:text-4xl font-medium"
|
|
934
|
-
}, data === null || data === void 0 ? void 0 : (_data$
|
|
1083
|
+
}, 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", {
|
|
935
1084
|
className: "text-sm md:text-xl lg:text-2xl "
|
|
936
|
-
}, data === null || data === void 0 ? void 0 : (_data$
|
|
1085
|
+
}, 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)));
|
|
937
1086
|
};
|
|
938
1087
|
|
|
939
1088
|
var Hero5 = function Hero5(props) {
|
|
940
|
-
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$;
|
|
1089
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$, _data$data4, _data$data4$;
|
|
941
1090
|
var data = props.data;
|
|
942
1091
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
943
1092
|
className: "relative"
|
|
944
1093
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
945
1094
|
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],
|
|
946
|
-
|
|
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,
|
|
1096
|
+
className: "w-full min-h-[30vh] md:min-h-[50vh] max-h-[100vh] object-cover"
|
|
947
1097
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
948
1098
|
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"
|
|
949
1099
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
950
1100
|
className: "text-xl md:text-3xl lg:text-4xl text-textHeading font-medium"
|
|
951
|
-
}, data === null || data === void 0 ? void 0 : (_data$
|
|
1101
|
+
}, 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", {
|
|
952
1102
|
className: "md:text-xl lg:text-2xl text-primary line-clamp-3 md:line-clamp-none"
|
|
953
|
-
}, data === null || data === void 0 ? void 0 : (_data$
|
|
1103
|
+
}, 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)));
|
|
954
1104
|
};
|
|
955
1105
|
|
|
956
1106
|
var Hero6 = function Hero6(props) {
|
|
957
|
-
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$, _sectionData$, _sectionData$$buttons;
|
|
1107
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$, _data$data4, _data$data4$, _sectionData$, _sectionData$$buttons;
|
|
958
1108
|
var shopConfigStyle = props.shopConfigStyle,
|
|
959
1109
|
data = props.data,
|
|
960
1110
|
_props$Link = props.Link,
|
|
@@ -964,17 +1114,18 @@ var Hero6 = function Hero6(props) {
|
|
|
964
1114
|
className: "relative"
|
|
965
1115
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
966
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],
|
|
967
|
-
|
|
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,
|
|
1118
|
+
className: "object-cover w-full h-auto min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
|
|
968
1119
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
969
1120
|
className: "absolute top-0 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"
|
|
970
1121
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
971
1122
|
className: "text-primary text-xl md:text-3xl lg:text-5xl leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
972
|
-
}, data === null || data === void 0 ? void 0 : (_data$
|
|
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", {
|
|
973
1124
|
className: "md:text-xl"
|
|
974
|
-
}, data === null || data === void 0 ? void 0 : (_data$
|
|
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), 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) {
|
|
975
1126
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
976
1127
|
Link: Link,
|
|
977
|
-
href: (button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
1128
|
+
href: convertURL(button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
978
1129
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
979
1130
|
label: button === null || button === void 0 ? void 0 : button.label,
|
|
980
1131
|
shopConfigStyle: shopConfigStyle
|
|
@@ -1004,7 +1155,7 @@ var Hero10 = function Hero10(props) {
|
|
|
1004
1155
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
1005
1156
|
Link: Link,
|
|
1006
1157
|
key: "gdf-" + index,
|
|
1007
|
-
href: (button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
1158
|
+
href: convertURL(button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
1008
1159
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
1009
1160
|
label: button === null || button === void 0 ? void 0 : button.label,
|
|
1010
1161
|
shopConfigStyle: shopConfigStyle
|
|
@@ -7299,7 +7450,7 @@ var CategoryController = function CategoryController(props) {
|
|
|
7299
7450
|
};
|
|
7300
7451
|
|
|
7301
7452
|
var Hero13 = function Hero13(props) {
|
|
7302
|
-
var _sectionData$, _sectionData$$srcImag
|
|
7453
|
+
var _sectionData$, _sectionData$$srcImag, _data$data, _data$data$;
|
|
7303
7454
|
var listRef = useRef(null);
|
|
7304
7455
|
var _useState = useState(false);
|
|
7305
7456
|
var data = props.data;
|
|
@@ -7307,7 +7458,8 @@ var Hero13 = function Hero13(props) {
|
|
|
7307
7458
|
var _CategoryController = CategoryController(props);
|
|
7308
7459
|
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("img", {
|
|
7309
7460
|
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],
|
|
7310
|
-
|
|
7461
|
+
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,
|
|
7462
|
+
className: "w-full object-cover"
|
|
7311
7463
|
}));
|
|
7312
7464
|
};
|
|
7313
7465
|
|
|
@@ -7370,7 +7522,7 @@ var Features3 = function Features3(props) {
|
|
|
7370
7522
|
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
7371
7523
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7372
7524
|
Link: Link,
|
|
7373
|
-
href: (item === null || item === void 0 ? void 0 : item.link) || (item === null || item === void 0 ? void 0 : item.route) || "#"
|
|
7525
|
+
href: (item === null || item === void 0 ? void 0 : item.link) || convertURL(item === null || item === void 0 ? void 0 : item.route) || "#"
|
|
7374
7526
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7375
7527
|
className: "grid grid-cols-2 p-3 rounded-lg font-semibold",
|
|
7376
7528
|
key: "dfsdfj-" + index,
|
|
@@ -7615,13 +7767,16 @@ function SvgImageGallery(props) {
|
|
|
7615
7767
|
}
|
|
7616
7768
|
|
|
7617
7769
|
var DefaultImage = function DefaultImage(props) {
|
|
7618
|
-
var _props$
|
|
7770
|
+
var _props$size = props.size,
|
|
7771
|
+
size = _props$size === void 0 ? 0 : _props$size,
|
|
7772
|
+
_props$className = props.className,
|
|
7619
7773
|
className = _props$className === void 0 ? "" : _props$className;
|
|
7620
7774
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7621
|
-
className: "flex justify-center items-center w-full aspect-square " + className,
|
|
7622
|
-
style: {
|
|
7623
|
-
|
|
7624
|
-
|
|
7775
|
+
className: "flex justify-center items-center w-full aspect-square " + className + " bg-[#FAFAFA]",
|
|
7776
|
+
style: size ? {
|
|
7777
|
+
width: size,
|
|
7778
|
+
height: size
|
|
7779
|
+
} : null
|
|
7625
7780
|
}, /*#__PURE__*/React__default.createElement(SvgImageGallery, {
|
|
7626
7781
|
width: "25%",
|
|
7627
7782
|
height: "25%",
|
|
@@ -7642,12 +7797,20 @@ var ProductImage = function ProductImage(props) {
|
|
|
7642
7797
|
}, [product]);
|
|
7643
7798
|
var getProductImage = function getProductImage() {
|
|
7644
7799
|
var _JSON$parse, _JSON$parse$;
|
|
7645
|
-
var src = (_JSON$parse = JSON.parse((product === null || product === void 0 ? void 0 : product.imagesUrl) || "[]")) === null || _JSON$parse === void 0 ? void 0 : (_JSON$parse$ = _JSON$parse[0]) === null || _JSON$parse$ === void 0 ? void 0 : _JSON$parse$.
|
|
7646
|
-
|
|
7800
|
+
var src = (_JSON$parse = JSON.parse((product === null || product === void 0 ? void 0 : product.imagesUrl) || "[]")) === null || _JSON$parse === void 0 ? void 0 : (_JSON$parse$ = _JSON$parse[0]) === null || _JSON$parse$ === void 0 ? void 0 : _JSON$parse$.src;
|
|
7801
|
+
if (src !== null && src !== void 0 && src.startsWith("http")) {
|
|
7802
|
+
setSrc(src);
|
|
7803
|
+
} else if (src) {
|
|
7804
|
+
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;
|
|
7805
|
+
setSrc(urlImage);
|
|
7806
|
+
} else {
|
|
7807
|
+
setSrc(src);
|
|
7808
|
+
}
|
|
7647
7809
|
};
|
|
7648
7810
|
return src ? /*#__PURE__*/React__default.createElement("img", {
|
|
7649
7811
|
src: src,
|
|
7650
|
-
|
|
7812
|
+
alt: product === null || product === void 0 ? void 0 : product.productName,
|
|
7813
|
+
className: "w-full aspect-square object-cover " + className,
|
|
7651
7814
|
style: size ? {
|
|
7652
7815
|
width: size,
|
|
7653
7816
|
height: size
|
|
@@ -7675,6 +7838,7 @@ var getYoutubeVideoIdByUrl = function getYoutubeVideoIdByUrl(url) {
|
|
|
7675
7838
|
var match = url === null || url === void 0 ? void 0 : url.match(regex);
|
|
7676
7839
|
return match ? match[1] : null;
|
|
7677
7840
|
};
|
|
7841
|
+
var linkPagePolicy = "https://sites.google.com/view/sodofin-landing-page-policy";
|
|
7678
7842
|
|
|
7679
7843
|
function getMinMax(array, field) {
|
|
7680
7844
|
if (!(array !== null && array !== void 0 && array.length) || !array[0].hasOwnProperty(field)) {
|
|
@@ -8090,6 +8254,8 @@ var Select = forwardRef(function (props, ref) {
|
|
|
8090
8254
|
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
8091
8255
|
_props$selectClassNam = props.selectClassName,
|
|
8092
8256
|
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
8257
|
+
_props$disabled = props.disabled,
|
|
8258
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
8093
8259
|
_props$rules = props.rules,
|
|
8094
8260
|
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
8095
8261
|
options = props.options,
|
|
@@ -8269,10 +8435,11 @@ var Select = forwardRef(function (props, ref) {
|
|
|
8269
8435
|
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
8270
8436
|
className: "mb-1 " + labelClassName
|
|
8271
8437
|
}, label, " ", labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
8272
|
-
className: "flex flex-col gap-2 rounded-lg w-full bg-white border " + className
|
|
8438
|
+
className: "flex flex-col gap-2 rounded-lg w-full bg-white " + (disabled ? "!bg-gray6" : "") + " border " + className
|
|
8273
8439
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
8274
|
-
className: "w-full h-10 bg-transparent flex justify-between items-center px-3 py-2 " + selectClassName,
|
|
8275
|
-
onClick: handleToggleSelect
|
|
8440
|
+
className: " w-full h-10 bg-transparent flex justify-between items-center px-3 py-2 " + selectClassName,
|
|
8441
|
+
onClick: handleToggleSelect,
|
|
8442
|
+
disabled: disabled
|
|
8276
8443
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8277
8444
|
className: "flex justify-between items-center w-full"
|
|
8278
8445
|
}, isEmpty(value) || isMulti ? /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -8340,6 +8507,8 @@ var DateTimePicker = forwardRef(function (props, ref) {
|
|
|
8340
8507
|
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8341
8508
|
_props$defaultValue = props.defaultValue,
|
|
8342
8509
|
defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
|
|
8510
|
+
_props$time = props.time,
|
|
8511
|
+
time = _props$time === void 0 ? false : _props$time,
|
|
8343
8512
|
rules = props.rules;
|
|
8344
8513
|
var _useState = useState(defaultValue),
|
|
8345
8514
|
value = _useState[0],
|
|
@@ -8377,7 +8546,7 @@ var DateTimePicker = forwardRef(function (props, ref) {
|
|
|
8377
8546
|
var _validateData = function _validateData() {
|
|
8378
8547
|
var count = 0;
|
|
8379
8548
|
rules === null || rules === void 0 ? void 0 : rules.forEach(function (e) {
|
|
8380
|
-
var _e$pattern;
|
|
8549
|
+
var _e$pattern, _e$validate;
|
|
8381
8550
|
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
|
|
8382
8551
|
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8383
8552
|
count++;
|
|
@@ -8386,6 +8555,10 @@ var DateTimePicker = forwardRef(function (props, ref) {
|
|
|
8386
8555
|
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8387
8556
|
count++;
|
|
8388
8557
|
return false;
|
|
8558
|
+
} else if (value !== "" && (e === null || e === void 0 ? void 0 : e.type) === "validate" && e !== null && e !== void 0 && e.validate && !(e !== null && e !== void 0 && (_e$validate = e.validate) !== null && _e$validate !== void 0 && _e$validate.call(e))) {
|
|
8559
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8560
|
+
count++;
|
|
8561
|
+
return false;
|
|
8389
8562
|
}
|
|
8390
8563
|
});
|
|
8391
8564
|
if (count) {
|
|
@@ -8409,13 +8582,17 @@ var DateTimePicker = forwardRef(function (props, ref) {
|
|
|
8409
8582
|
selected: value,
|
|
8410
8583
|
onChange: function onChange(date) {
|
|
8411
8584
|
_setValue(date);
|
|
8412
|
-
console.log("check date: ", date);
|
|
8413
8585
|
},
|
|
8414
8586
|
customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
|
|
8415
8587
|
className: _className
|
|
8416
8588
|
}),
|
|
8589
|
+
dateFormat: time ? "dd/MM/yyyy HH:mm" : "dd/MM/yyyy",
|
|
8590
|
+
showTimeSelect: time,
|
|
8591
|
+
timeIntervals: 15,
|
|
8417
8592
|
wrapperClassName: "w-full"
|
|
8418
|
-
}), error ? /*#__PURE__*/React__default.createElement("div",
|
|
8593
|
+
}), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
8594
|
+
className: "text-danger"
|
|
8595
|
+
}, error) : null);
|
|
8419
8596
|
});
|
|
8420
8597
|
|
|
8421
8598
|
var InputPhoneNumber = forwardRef(function (props, ref) {
|
|
@@ -8429,6 +8606,8 @@ var InputPhoneNumber = forwardRef(function (props, ref) {
|
|
|
8429
8606
|
name = _props$name === void 0 ? "" : _props$name,
|
|
8430
8607
|
_props$onChange = props.onChange,
|
|
8431
8608
|
onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
|
|
8609
|
+
_props$disabled = props.disabled,
|
|
8610
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
8432
8611
|
_props$defaultValue = props.defaultValue,
|
|
8433
8612
|
defaultValue = _props$defaultValue === void 0 ? "" : _props$defaultValue,
|
|
8434
8613
|
_props$type = props.type,
|
|
@@ -8494,11 +8673,11 @@ var InputPhoneNumber = forwardRef(function (props, ref) {
|
|
|
8494
8673
|
for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
|
|
8495
8674
|
var _e$pattern;
|
|
8496
8675
|
var e = _step.value;
|
|
8497
|
-
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value
|
|
8676
|
+
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && !value) {
|
|
8498
8677
|
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8499
8678
|
count++;
|
|
8500
8679
|
break;
|
|
8501
|
-
} else if (value
|
|
8680
|
+
} else if (value && (e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
|
|
8502
8681
|
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8503
8682
|
count++;
|
|
8504
8683
|
break;
|
|
@@ -8530,6 +8709,7 @@ var InputPhoneNumber = forwardRef(function (props, ref) {
|
|
|
8530
8709
|
className: 'w-max border-0 !rounded-none !rounded-l-lg',
|
|
8531
8710
|
defaultValue: countryCode,
|
|
8532
8711
|
options: options,
|
|
8712
|
+
disabled: disabled,
|
|
8533
8713
|
optionClassName: "w-max",
|
|
8534
8714
|
placeholder: "+84",
|
|
8535
8715
|
onClick: setCountryCode,
|
|
@@ -8551,11 +8731,12 @@ var InputPhoneNumber = forwardRef(function (props, ref) {
|
|
|
8551
8731
|
})), /*#__PURE__*/React__default.createElement("input", {
|
|
8552
8732
|
type: type,
|
|
8553
8733
|
name: name,
|
|
8734
|
+
disabled: disabled,
|
|
8554
8735
|
value: value,
|
|
8555
8736
|
placeholder: placeholder,
|
|
8556
8737
|
onChange: handleOnChange,
|
|
8557
8738
|
required: required,
|
|
8558
|
-
className: "bg-white rounded-r-lg " + _inputClassName
|
|
8739
|
+
className: "bg-white " + (disabled ? "!bg-gray6" : "") + " rounded-r-lg " + _inputClassName
|
|
8559
8740
|
})), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
8560
8741
|
className: "text-danger"
|
|
8561
8742
|
}, error) : null);
|
|
@@ -8840,19 +9021,24 @@ var BookingForm = function BookingForm(props) {
|
|
|
8840
9021
|
});
|
|
8841
9022
|
});
|
|
8842
9023
|
};
|
|
9024
|
+
var checkDateBooking = function checkDateBooking() {
|
|
9025
|
+
var _inputDateRef$current;
|
|
9026
|
+
var scheduleDate = inputDateRef === null || inputDateRef === void 0 ? void 0 : (_inputDateRef$current = inputDateRef.current) === null || _inputDateRef$current === void 0 ? void 0 : _inputDateRef$current.getValue();
|
|
9027
|
+
return scheduleDate && scheduleDate >= Date.now();
|
|
9028
|
+
};
|
|
8843
9029
|
var handleSubmit = function handleSubmit() {
|
|
8844
9030
|
try {
|
|
8845
|
-
var _inputNameRef$current, _inputPhoneNumberRef$, _inputDateRef$
|
|
9031
|
+
var _inputNameRef$current, _inputPhoneNumberRef$, _inputDateRef$current2, _inputSelectedRef$cur;
|
|
8846
9032
|
var validateName = inputNameRef === null || inputNameRef === void 0 ? void 0 : (_inputNameRef$current = inputNameRef.current) === null || _inputNameRef$current === void 0 ? void 0 : _inputNameRef$current.validateData();
|
|
8847
9033
|
var validatePhoneNumber = inputPhoneNumberRef === null || inputPhoneNumberRef === void 0 ? void 0 : (_inputPhoneNumberRef$ = inputPhoneNumberRef.current) === null || _inputPhoneNumberRef$ === void 0 ? void 0 : _inputPhoneNumberRef$.validateData();
|
|
8848
|
-
var validateDate = inputDateRef === null || inputDateRef === void 0 ? void 0 : (_inputDateRef$
|
|
9034
|
+
var validateDate = inputDateRef === null || inputDateRef === void 0 ? void 0 : (_inputDateRef$current2 = inputDateRef.current) === null || _inputDateRef$current2 === void 0 ? void 0 : _inputDateRef$current2.validateData();
|
|
8849
9035
|
var validateService = inputSelectedRef === null || inputSelectedRef === void 0 ? void 0 : (_inputSelectedRef$cur = inputSelectedRef.current) === null || _inputSelectedRef$cur === void 0 ? void 0 : _inputSelectedRef$cur.validateData();
|
|
8850
9036
|
var _temp = function () {
|
|
8851
9037
|
if (validateName && validatePhoneNumber && validateDate && validateService) {
|
|
8852
|
-
var _inputPhoneNumberRef$2, _inputNameRef$current2, _inputDateRef$
|
|
9038
|
+
var _inputPhoneNumberRef$2, _inputNameRef$current2, _inputDateRef$current3;
|
|
8853
9039
|
var customerPhone = inputPhoneNumberRef === null || inputPhoneNumberRef === void 0 ? void 0 : (_inputPhoneNumberRef$2 = inputPhoneNumberRef.current) === null || _inputPhoneNumberRef$2 === void 0 ? void 0 : _inputPhoneNumberRef$2.getValue();
|
|
8854
9040
|
var customerName = inputNameRef === null || inputNameRef === void 0 ? void 0 : (_inputNameRef$current2 = inputNameRef.current) === null || _inputNameRef$current2 === void 0 ? void 0 : _inputNameRef$current2.getValue();
|
|
8855
|
-
var scheduleDate = inputDateRef === null || inputDateRef === void 0 ? void 0 : (_inputDateRef$
|
|
9041
|
+
var scheduleDate = inputDateRef === null || inputDateRef === void 0 ? void 0 : (_inputDateRef$current3 = inputDateRef.current) === null || _inputDateRef$current3 === void 0 ? void 0 : _inputDateRef$current3.getValue();
|
|
8856
9042
|
var services = listProductSelected === null || listProductSelected === void 0 ? void 0 : listProductSelected.map(function (item) {
|
|
8857
9043
|
var _item$technical;
|
|
8858
9044
|
return {
|
|
@@ -8946,9 +9132,14 @@ var BookingForm = function BookingForm(props) {
|
|
|
8946
9132
|
label: "Thời gian",
|
|
8947
9133
|
className: "w-full rounded-lg",
|
|
8948
9134
|
placeholder: "Chọn thời gian",
|
|
9135
|
+
time: true,
|
|
8949
9136
|
rules: [{
|
|
8950
9137
|
type: "required",
|
|
8951
9138
|
message: "Bắt buộc chọn ngày đặt"
|
|
9139
|
+
}, {
|
|
9140
|
+
type: "validate",
|
|
9141
|
+
message: "Thời gian không hợp lệ",
|
|
9142
|
+
validate: checkDateBooking
|
|
8952
9143
|
}]
|
|
8953
9144
|
})), (listProductSelected === null || listProductSelected === void 0 ? void 0 : listProductSelected.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
8954
9145
|
className: "grid grid-cols-1"
|
|
@@ -9334,10 +9525,10 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
|
|
|
9334
9525
|
className: "flex flex-col gap-4 col-span-2"
|
|
9335
9526
|
}, displayImage ? /*#__PURE__*/React__default.createElement("img", {
|
|
9336
9527
|
src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
|
|
9337
|
-
className: "w-full aspect-square rounded-2xl"
|
|
9528
|
+
className: "w-full aspect-square object-cover rounded-2xl"
|
|
9338
9529
|
}) : /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
9339
9530
|
product: product,
|
|
9340
|
-
className: "w-full aspect-square rounded-2xl"
|
|
9531
|
+
className: "w-full aspect-square object-contain rounded-2xl"
|
|
9341
9532
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9342
9533
|
className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
|
|
9343
9534
|
}, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
|
|
@@ -9414,7 +9605,7 @@ var ProductItem2 = function ProductItem2(props) {
|
|
|
9414
9605
|
className: "text-center relative group " + className
|
|
9415
9606
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
9416
9607
|
product: product,
|
|
9417
|
-
className: "max-w-[240px] rounded-full mx-auto"
|
|
9608
|
+
className: "max-w-[240px] rounded-full mx-auto !object-cover"
|
|
9418
9609
|
}), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
9419
9610
|
product: product,
|
|
9420
9611
|
className: "text-lg mt-4"
|
|
@@ -9639,7 +9830,7 @@ var ProductList7 = function ProductList7(props) {
|
|
|
9639
9830
|
product: product === null || product === void 0 ? void 0 : product.productInfo
|
|
9640
9831
|
});
|
|
9641
9832
|
})), (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
9642
|
-
href: "/
|
|
9833
|
+
href: "/san-pham",
|
|
9643
9834
|
Link: Link
|
|
9644
9835
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
9645
9836
|
label: "Xem tất cả",
|
|
@@ -9650,68 +9841,6 @@ var ProductList7 = function ProductList7(props) {
|
|
|
9650
9841
|
}));
|
|
9651
9842
|
};
|
|
9652
9843
|
|
|
9653
|
-
var Carousel = function Carousel(props) {
|
|
9654
|
-
var carouselRef = useRef(null);
|
|
9655
|
-
var _useState = useState(false),
|
|
9656
|
-
isScrolledToLeft = _useState[0],
|
|
9657
|
-
setIsScrolledToLeft = _useState[1];
|
|
9658
|
-
var _useState2 = useState(0);
|
|
9659
|
-
var _props$data = props.data,
|
|
9660
|
-
data = _props$data === void 0 ? [] : _props$data,
|
|
9661
|
-
_props$className = props.className,
|
|
9662
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
9663
|
-
_props$style = props.style,
|
|
9664
|
-
style = _props$style === void 0 ? {} : _props$style,
|
|
9665
|
-
_props$primaryColor = props.primaryColor,
|
|
9666
|
-
primaryColor = _props$primaryColor === void 0 ? "" : _props$primaryColor,
|
|
9667
|
-
_props$renderItem = props.renderItem,
|
|
9668
|
-
renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
|
|
9669
|
-
var handleClickPrevImg = function handleClickPrevImg() {
|
|
9670
|
-
if (carouselRef !== null && carouselRef !== void 0 && carouselRef.current) {
|
|
9671
|
-
setIsScrolledToLeft(true);
|
|
9672
|
-
carouselRef.current.scrollBy({
|
|
9673
|
-
left: -carouselRef.current.offsetWidth / 4,
|
|
9674
|
-
behavior: "smooth"
|
|
9675
|
-
});
|
|
9676
|
-
}
|
|
9677
|
-
};
|
|
9678
|
-
var handleClickNextImg = function handleClickNextImg() {
|
|
9679
|
-
setIsScrolledToLeft(false);
|
|
9680
|
-
if (carouselRef !== null && carouselRef !== void 0 && carouselRef.current) {
|
|
9681
|
-
var _carouselRef$current, _carouselRef$current2;
|
|
9682
|
-
carouselRef === null || carouselRef === void 0 ? void 0 : (_carouselRef$current = carouselRef.current) === null || _carouselRef$current === void 0 ? void 0 : _carouselRef$current.scrollBy({
|
|
9683
|
-
left: (carouselRef === null || carouselRef === void 0 ? void 0 : (_carouselRef$current2 = carouselRef.current) === null || _carouselRef$current2 === void 0 ? void 0 : _carouselRef$current2.offsetWidth) / 4,
|
|
9684
|
-
behavior: "smooth"
|
|
9685
|
-
});
|
|
9686
|
-
}
|
|
9687
|
-
};
|
|
9688
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
9689
|
-
className: "relative " + className + " ",
|
|
9690
|
-
style: style
|
|
9691
|
-
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9692
|
-
className: " w-full pe-2 h-full flex gap-2 md:gap-4 xl:gap-6 overflow-x-auto no-scrollbar",
|
|
9693
|
-
ref: carouselRef
|
|
9694
|
-
}, data && (data === null || data === void 0 ? void 0 : data.length) > 0 ? data === null || data === void 0 ? void 0 : data.map(function (item, index) {
|
|
9695
|
-
return renderItem(item, index);
|
|
9696
|
-
}) : null)), data && (data === null || data === void 0 ? void 0 : data.length) > 4 ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("button", {
|
|
9697
|
-
className: " hidden lg:block bg-gray3 p-3 rounded-full absolute top-[45%] left-[-8px] lg:left-[-2%]",
|
|
9698
|
-
style: {
|
|
9699
|
-
backgroundColor: isScrolledToLeft ? primaryColor : "#BDBDBD"
|
|
9700
|
-
},
|
|
9701
|
-
onClick: handleClickPrevImg
|
|
9702
|
-
}, /*#__PURE__*/React__default.createElement(FaArrowLeft, {
|
|
9703
|
-
className: "text-sm lg:text-lg text-white"
|
|
9704
|
-
})), /*#__PURE__*/React__default.createElement("button", {
|
|
9705
|
-
className: " hidden lg:block p-3 rounded-full absolute top-[45%] right-[-2%] ",
|
|
9706
|
-
style: {
|
|
9707
|
-
backgroundColor: !isScrolledToLeft ? primaryColor : "#BDBDBD"
|
|
9708
|
-
},
|
|
9709
|
-
onClick: handleClickNextImg
|
|
9710
|
-
}, /*#__PURE__*/React__default.createElement(FaArrowRight, {
|
|
9711
|
-
className: "text-sm lg:text-lg text-white"
|
|
9712
|
-
}))) : null);
|
|
9713
|
-
};
|
|
9714
|
-
|
|
9715
9844
|
var Products2 = function Products2(props) {
|
|
9716
9845
|
var shopConfigStyle = props.shopConfigStyle,
|
|
9717
9846
|
data = props.data,
|
|
@@ -9720,8 +9849,6 @@ var Products2 = function Products2(props) {
|
|
|
9720
9849
|
_props$Link = props.Link,
|
|
9721
9850
|
Link = _props$Link === void 0 ? null : _props$Link;
|
|
9722
9851
|
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
9723
|
-
_shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
|
|
9724
|
-
primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
|
|
9725
9852
|
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
9726
9853
|
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
9727
9854
|
_shopConfigStyle$colo4 = _shopConfigStyle$colo.textBody,
|
|
@@ -9732,8 +9859,53 @@ var Products2 = function Products2(props) {
|
|
|
9732
9859
|
textButton = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
|
|
9733
9860
|
var _ProductController = ProductController(props),
|
|
9734
9861
|
_ProductController$pr = _ProductController.products,
|
|
9735
|
-
products = _ProductController$pr === void 0 ? [] : _ProductController$pr
|
|
9862
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
9863
|
+
_ProductController$lo = _ProductController.loading,
|
|
9864
|
+
loading = _ProductController$lo === void 0 ? true : _ProductController$lo;
|
|
9865
|
+
var sliderRef = useRef(null);
|
|
9736
9866
|
console.log("Products2 products");
|
|
9867
|
+
var settings = {
|
|
9868
|
+
infinite: false,
|
|
9869
|
+
slidesToShow: 4,
|
|
9870
|
+
slidesToScroll: 1,
|
|
9871
|
+
speed: 500,
|
|
9872
|
+
autoplay: false,
|
|
9873
|
+
autoplaySpeed: 4000,
|
|
9874
|
+
pauseOnHover: true,
|
|
9875
|
+
dots: false,
|
|
9876
|
+
swipe: true,
|
|
9877
|
+
touchMove: true,
|
|
9878
|
+
arrows: false,
|
|
9879
|
+
responsive: [{
|
|
9880
|
+
breakpoint: 1024,
|
|
9881
|
+
settings: {
|
|
9882
|
+
slidesToShow: 4,
|
|
9883
|
+
slidesToScroll: 4
|
|
9884
|
+
}
|
|
9885
|
+
}, {
|
|
9886
|
+
breakpoint: 1023,
|
|
9887
|
+
settings: {
|
|
9888
|
+
slidesToShow: 3,
|
|
9889
|
+
slidesToScroll: 3
|
|
9890
|
+
}
|
|
9891
|
+
}, {
|
|
9892
|
+
breakpoint: 635,
|
|
9893
|
+
settings: {
|
|
9894
|
+
slidesToShow: 2,
|
|
9895
|
+
slidesToScroll: 2
|
|
9896
|
+
}
|
|
9897
|
+
}]
|
|
9898
|
+
};
|
|
9899
|
+
var goToNext = function goToNext() {
|
|
9900
|
+
if (sliderRef.current) {
|
|
9901
|
+
sliderRef.current.slickNext();
|
|
9902
|
+
}
|
|
9903
|
+
};
|
|
9904
|
+
var goToPrev = function goToPrev() {
|
|
9905
|
+
if (sliderRef.current) {
|
|
9906
|
+
sliderRef.current.slickPrev();
|
|
9907
|
+
}
|
|
9908
|
+
};
|
|
9737
9909
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9738
9910
|
className: "pt-10 px-4 xl:px-20",
|
|
9739
9911
|
style: {
|
|
@@ -9741,29 +9913,43 @@ var Products2 = function Products2(props) {
|
|
|
9741
9913
|
color: textBody
|
|
9742
9914
|
}
|
|
9743
9915
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9744
|
-
className: "rounded-3xl w-full py-10 md:px-10 sm:px-6 px-4",
|
|
9916
|
+
className: "relative rounded-3xl w-full py-10 md:px-10 sm:px-6 px-4",
|
|
9745
9917
|
style: {
|
|
9746
9918
|
background: secondary
|
|
9747
9919
|
}
|
|
9748
9920
|
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
9749
|
-
className: "font-semibold text-2xl md:text-
|
|
9921
|
+
className: "font-semibold text-2xl md:text-4xl lg:text-4xl ps-5 pb-4",
|
|
9750
9922
|
style: {
|
|
9751
9923
|
color: textButton
|
|
9752
9924
|
}
|
|
9753
|
-
}, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement(
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9925
|
+
}, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement("div", null, loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
9926
|
+
className: "flex justify-center mt-20 w-full min-h-32"
|
|
9927
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9928
|
+
className: "mx-auto"
|
|
9929
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null))) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(Slider, _extends({
|
|
9930
|
+
ref: sliderRef
|
|
9931
|
+
}, settings), products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
9932
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9933
|
+
className: "px-2 lg:px-3",
|
|
9934
|
+
key: "dfg-" + index
|
|
9935
|
+
}, /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
9936
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
9937
|
+
Link: Link,
|
|
9938
|
+
shopConfigStyle: shopConfigStyle
|
|
9939
|
+
}));
|
|
9940
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
9941
|
+
className: "absolute left-0 top-1/2 w-full flex justify-between px-2 md:px-4 lg:px-6"
|
|
9942
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
9943
|
+
onClick: goToPrev,
|
|
9944
|
+
className: "bg-primary p-2 rounded-full"
|
|
9945
|
+
}, /*#__PURE__*/React__default.createElement(FaArrowLeft, {
|
|
9946
|
+
className: "text-white text-lg md:text-2xl"
|
|
9947
|
+
}), " "), /*#__PURE__*/React__default.createElement("button", {
|
|
9948
|
+
onClick: goToNext,
|
|
9949
|
+
className: "bg-primary p-2 rounded-full"
|
|
9950
|
+
}, /*#__PURE__*/React__default.createElement(FaArrowRight, {
|
|
9951
|
+
className: "text-white text-lg md:text-2xl"
|
|
9952
|
+
}), " "))));
|
|
9767
9953
|
};
|
|
9768
9954
|
|
|
9769
9955
|
var Pagination = function Pagination(props) {
|
|
@@ -9787,8 +9973,11 @@ var Pagination = function Pagination(props) {
|
|
|
9787
9973
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9788
9974
|
className: "flex gap-4 items-center justify-self-center " + className
|
|
9789
9975
|
}, /*#__PURE__*/React__default.createElement(IoChevronBackOutline, {
|
|
9790
|
-
className: has_previous ? "text-primary" : "text-gray3",
|
|
9791
|
-
size: size
|
|
9976
|
+
className: has_previous ? "text-primary cursor-pointer" : "text-gray3",
|
|
9977
|
+
size: size,
|
|
9978
|
+
onClick: function onClick() {
|
|
9979
|
+
if (has_previous) handlePageChange(current_page - 1);
|
|
9980
|
+
}
|
|
9792
9981
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9793
9982
|
className: "flex items-center space-x-1"
|
|
9794
9983
|
}, Array(total_pages).fill().map(function (_, index) {
|
|
@@ -9800,8 +9989,11 @@ var Pagination = function Pagination(props) {
|
|
|
9800
9989
|
className: "px-4 py-1 rounded-md " + (index === current_page ? 'bg-primary text-textButton' : 'bg-transparent text-primary') + " hover:opacity-80"
|
|
9801
9990
|
}, index + 1);
|
|
9802
9991
|
})), /*#__PURE__*/React__default.createElement(IoChevronForwardOutline, {
|
|
9803
|
-
className: has_next ? "text-primary" : "text-gray3",
|
|
9804
|
-
size: size
|
|
9992
|
+
className: has_next ? "text-primary cursor-pointer" : "text-gray3",
|
|
9993
|
+
size: size,
|
|
9994
|
+
onClick: function onClick() {
|
|
9995
|
+
if (has_next) handlePageChange(current_page + 1);
|
|
9996
|
+
}
|
|
9805
9997
|
}));
|
|
9806
9998
|
};
|
|
9807
9999
|
|
|
@@ -9911,6 +10103,77 @@ var Products3 = function Products3(props) {
|
|
|
9911
10103
|
}));
|
|
9912
10104
|
};
|
|
9913
10105
|
|
|
10106
|
+
var Products9 = function Products9(props) {
|
|
10107
|
+
var _props$Link = props.Link,
|
|
10108
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10109
|
+
shopConfigStyle = props.shopConfigStyle,
|
|
10110
|
+
_props$ProductItem = props.ProductItem,
|
|
10111
|
+
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
10112
|
+
var _useState = useState({
|
|
10113
|
+
size: 12
|
|
10114
|
+
}),
|
|
10115
|
+
params = _useState[0],
|
|
10116
|
+
setParams = _useState[1];
|
|
10117
|
+
var _CategoryController = CategoryController(_extends({}, props)),
|
|
10118
|
+
_CategoryController$c = _CategoryController.categories,
|
|
10119
|
+
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
10120
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
10121
|
+
params: params
|
|
10122
|
+
})),
|
|
10123
|
+
_ProductController$pr = _ProductController.products,
|
|
10124
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
10125
|
+
loading = _ProductController.loading;
|
|
10126
|
+
var handleChooseCategory = function handleChooseCategory(item) {
|
|
10127
|
+
setParams(_extends({}, params, {
|
|
10128
|
+
categoryId: item === null || item === void 0 ? void 0 : item.categoryId,
|
|
10129
|
+
size: 12
|
|
10130
|
+
}));
|
|
10131
|
+
};
|
|
10132
|
+
var groupedProducts = products === null || products === void 0 ? void 0 : products.reduce(function (acc, product) {
|
|
10133
|
+
var _product$productInfo = product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10134
|
+
categoryName = _product$productInfo.categoryName;
|
|
10135
|
+
if (!acc[categoryName]) {
|
|
10136
|
+
acc[categoryName] = [];
|
|
10137
|
+
}
|
|
10138
|
+
acc[categoryName].push(product);
|
|
10139
|
+
return acc;
|
|
10140
|
+
}, {});
|
|
10141
|
+
console.log(groupedProducts);
|
|
10142
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10143
|
+
className: SECTION_CLASS + " flex flex-col gap-4 mt-0 md:gap-6 "
|
|
10144
|
+
}, /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
10145
|
+
data: categories,
|
|
10146
|
+
onClick: handleChooseCategory
|
|
10147
|
+
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
10148
|
+
className: "m-auto mt-20 min-h-32"
|
|
10149
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : groupedProducts ? Object.entries(groupedProducts).map(function (_ref, index) {
|
|
10150
|
+
var _products$;
|
|
10151
|
+
var categoryName = _ref[0],
|
|
10152
|
+
products = _ref[1];
|
|
10153
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10154
|
+
key: "wds-" + index,
|
|
10155
|
+
id: categoryName
|
|
10156
|
+
}, (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
10157
|
+
className: "flex justify-between items-center"
|
|
10158
|
+
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
10159
|
+
className: "text-2xl md:text-4xl font-semibold mb-4"
|
|
10160
|
+
}, categoryName), /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10161
|
+
Link: Link,
|
|
10162
|
+
href: getLinkProductsByCategory(products === null || products === void 0 ? void 0 : (_products$ = products[0]) === null || _products$ === void 0 ? void 0 : _products$.productInfo),
|
|
10163
|
+
className: "font-semibold text-primary cursor-pointer"
|
|
10164
|
+
}, "Xem t\u1EA5t c\u1EA3")) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
10165
|
+
className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-2 md:gap-4 lg:gap-8"
|
|
10166
|
+
}, (products === null || products === void 0 ? void 0 : products.length) > 0 ? products === null || products === void 0 ? void 0 : products.map(function (product) {
|
|
10167
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10168
|
+
Link: Link,
|
|
10169
|
+
shopConfigStyle: shopConfigStyle,
|
|
10170
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10171
|
+
key: product === null || product === void 0 ? void 0 : product.landingShopProductId
|
|
10172
|
+
});
|
|
10173
|
+
}) : null));
|
|
10174
|
+
}) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
|
|
10175
|
+
};
|
|
10176
|
+
|
|
9914
10177
|
var Products10 = function Products10(props) {
|
|
9915
10178
|
var _useState = useState({
|
|
9916
10179
|
size: 8
|
|
@@ -9950,7 +10213,7 @@ var Products10 = function Products10(props) {
|
|
|
9950
10213
|
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
9951
10214
|
className: "m-auto mt-20 min-h-32"
|
|
9952
10215
|
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
9953
|
-
className: "grid grid-cols-2
|
|
10216
|
+
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"
|
|
9954
10217
|
}, products === null || products === void 0 ? void 0 : products.map(function (product, idx) {
|
|
9955
10218
|
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
9956
10219
|
Link: Link,
|
|
@@ -9962,22 +10225,32 @@ var Products10 = function Products10(props) {
|
|
|
9962
10225
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
|
|
9963
10226
|
};
|
|
9964
10227
|
|
|
9965
|
-
var
|
|
10228
|
+
var Products11 = function Products11(props) {
|
|
9966
10229
|
var _products$slice;
|
|
9967
|
-
var _props$
|
|
10230
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
10231
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10232
|
+
_props$Link = props.Link,
|
|
9968
10233
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
_props$SectionTitle = props.SectionTitle,
|
|
9972
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
10234
|
+
_props$categoryId = props.categoryId,
|
|
10235
|
+
categoryId = _props$categoryId === void 0 ? 0 : _props$categoryId,
|
|
9973
10236
|
_props$ProductItem = props.ProductItem,
|
|
9974
10237
|
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
9975
10238
|
var _useState = useState({
|
|
9976
|
-
|
|
10239
|
+
page: 0,
|
|
10240
|
+
size: 12,
|
|
10241
|
+
categoryId: categoryId
|
|
9977
10242
|
}),
|
|
9978
10243
|
params = _useState[0],
|
|
9979
10244
|
setParams = _useState[1];
|
|
9980
|
-
var
|
|
10245
|
+
var _useState2 = useState(true),
|
|
10246
|
+
firstLoading = _useState2[0],
|
|
10247
|
+
setFirstLoading = _useState2[1];
|
|
10248
|
+
var _useState3 = useState({}),
|
|
10249
|
+
categorySelected = _useState3[0],
|
|
10250
|
+
setCategorySelected = _useState3[1];
|
|
10251
|
+
var _CategoryController = CategoryController(_extends({}, props, {
|
|
10252
|
+
params: params
|
|
10253
|
+
})),
|
|
9981
10254
|
_CategoryController$c = _CategoryController.categories,
|
|
9982
10255
|
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
9983
10256
|
var _ProductController = ProductController(_extends({}, props, {
|
|
@@ -9985,10 +10258,109 @@ var ProductCategory2 = function ProductCategory2(props) {
|
|
|
9985
10258
|
})),
|
|
9986
10259
|
_ProductController$pr = _ProductController.products,
|
|
9987
10260
|
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
9988
|
-
loading = _ProductController.loading
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
|
|
10261
|
+
loading = _ProductController.loading,
|
|
10262
|
+
page = _ProductController.page;
|
|
10263
|
+
var handleOnChangePage = function handleOnChangePage(pageIndex) {
|
|
10264
|
+
setFirstLoading(false);
|
|
10265
|
+
setParams(function (prev) {
|
|
10266
|
+
return _extends({}, prev, {
|
|
10267
|
+
page: pageIndex
|
|
10268
|
+
});
|
|
10269
|
+
});
|
|
10270
|
+
};
|
|
10271
|
+
var handleChooseCategory = function handleChooseCategory(category) {
|
|
10272
|
+
setCategorySelected(category);
|
|
10273
|
+
setFirstLoading(true);
|
|
10274
|
+
setParams(function (prev) {
|
|
10275
|
+
return _extends({}, prev, {
|
|
10276
|
+
categoryId: category === null || category === void 0 ? void 0 : category.categoryId,
|
|
10277
|
+
size: 12
|
|
10278
|
+
});
|
|
10279
|
+
});
|
|
10280
|
+
};
|
|
10281
|
+
useEffect(function () {
|
|
10282
|
+
if ((categories === null || categories === void 0 ? void 0 : categories.length) > 0 && params !== null && params !== void 0 && params.categoryId) {
|
|
10283
|
+
var category = categories === null || categories === void 0 ? void 0 : categories.find(function (item) {
|
|
10284
|
+
return (item === null || item === void 0 ? void 0 : item.categoryId) == categoryId;
|
|
10285
|
+
});
|
|
10286
|
+
setCategorySelected(category);
|
|
10287
|
+
}
|
|
10288
|
+
}, [params === null || params === void 0 ? void 0 : params.categoryId, categories]);
|
|
10289
|
+
console.log("check page:::::::", page);
|
|
10290
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10291
|
+
className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-4 gap-6"
|
|
10292
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10293
|
+
className: "md:sticky top-20 self-start"
|
|
10294
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10295
|
+
className: "rounded-3xl bg-bgSecondary p-4"
|
|
10296
|
+
}, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
|
|
10297
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10298
|
+
href: getLinkProductsByCategory(item),
|
|
10299
|
+
Link: Link
|
|
10300
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10301
|
+
className: "px-6 py-3 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" : ""),
|
|
10302
|
+
onClick: function onClick() {
|
|
10303
|
+
handleChooseCategory(item);
|
|
10304
|
+
},
|
|
10305
|
+
key: "sdjfdh-" + index
|
|
10306
|
+
}, item === null || item === void 0 ? void 0 : item.cateName));
|
|
10307
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
10308
|
+
className: "md:col-span-3 flex flex-col gap-8"
|
|
10309
|
+
}, loading && firstLoading ? /*#__PURE__*/React__default.createElement("div", {
|
|
10310
|
+
className: "w-full h-80 flex justify-center items-center"
|
|
10311
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : /*#__PURE__*/React__default.createElement("div", {
|
|
10312
|
+
className: "grid grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-6 lg:gap-8"
|
|
10313
|
+
}, (products === null || products === void 0 ? void 0 : products.length) > 0 ? 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, index) {
|
|
10314
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10315
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo),
|
|
10316
|
+
Link: Link,
|
|
10317
|
+
key: "kghf-" + index
|
|
10318
|
+
}, /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10319
|
+
Link: Link,
|
|
10320
|
+
shopConfigStyle: shopConfigStyle,
|
|
10321
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10322
|
+
key: product === null || product === void 0 ? void 0 : product.landingShopProductId
|
|
10323
|
+
}));
|
|
10324
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
10325
|
+
className: "md:col-span-2 lg:col-span-3 mt-20 m-auto"
|
|
10326
|
+
}, /*#__PURE__*/React__default.createElement(NotFoundProduct, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
10327
|
+
className: "w-full m-auto"
|
|
10328
|
+
}, (page === null || page === void 0 ? void 0 : page.total_pages) > 1 ? /*#__PURE__*/React__default.createElement(Pagination, {
|
|
10329
|
+
total_pages: page === null || page === void 0 ? void 0 : page.total_pages,
|
|
10330
|
+
has_next: page === null || page === void 0 ? void 0 : page.has_next,
|
|
10331
|
+
has_previous: page === null || page === void 0 ? void 0 : page.has_previous,
|
|
10332
|
+
current_page: page === null || page === void 0 ? void 0 : page.current_page,
|
|
10333
|
+
onPageChange: handleOnChangePage
|
|
10334
|
+
}) : null)));
|
|
10335
|
+
};
|
|
10336
|
+
|
|
10337
|
+
var ProductCategory2 = function ProductCategory2(props) {
|
|
10338
|
+
var _products$slice;
|
|
10339
|
+
var _props$Link = props.Link,
|
|
10340
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10341
|
+
data = props.data,
|
|
10342
|
+
shopConfigStyle = props.shopConfigStyle,
|
|
10343
|
+
_props$SectionTitle = props.SectionTitle,
|
|
10344
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
10345
|
+
_props$ProductItem = props.ProductItem,
|
|
10346
|
+
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
10347
|
+
var _useState = useState({
|
|
10348
|
+
size: 12
|
|
10349
|
+
}),
|
|
10350
|
+
params = _useState[0],
|
|
10351
|
+
setParams = _useState[1];
|
|
10352
|
+
var _CategoryController = CategoryController(_extends({}, props)),
|
|
10353
|
+
_CategoryController$c = _CategoryController.categories,
|
|
10354
|
+
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
10355
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
10356
|
+
params: params
|
|
10357
|
+
})),
|
|
10358
|
+
_ProductController$pr = _ProductController.products,
|
|
10359
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
10360
|
+
loading = _ProductController.loading;
|
|
10361
|
+
var _useState2 = useState(true),
|
|
10362
|
+
isFilter = _useState2[0],
|
|
10363
|
+
setIsFilter = _useState2[1];
|
|
9992
10364
|
var handleChooseCategory = function handleChooseCategory(item) {
|
|
9993
10365
|
setIsFilter(true);
|
|
9994
10366
|
setParams(_extends({}, params, {
|
|
@@ -10013,7 +10385,7 @@ var ProductCategory2 = function ProductCategory2(props) {
|
|
|
10013
10385
|
}), loading && isFilter ? /*#__PURE__*/React__default.createElement("div", {
|
|
10014
10386
|
className: "m-auto mt-20 min-h-32"
|
|
10015
10387
|
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
10016
|
-
className: "grid grid-cols-2
|
|
10388
|
+
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"
|
|
10017
10389
|
}, 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) {
|
|
10018
10390
|
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10019
10391
|
Link: Link,
|
|
@@ -10077,7 +10449,7 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
10077
10449
|
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem,
|
|
10078
10450
|
shopConfigStyle = props.shopConfigStyle;
|
|
10079
10451
|
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);
|
|
10080
|
-
var keywordValue = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get('
|
|
10452
|
+
var keywordValue = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get('tu-khoa');
|
|
10081
10453
|
var _useState = useState(0),
|
|
10082
10454
|
length = _useState[0],
|
|
10083
10455
|
setLength = _useState[1];
|
|
@@ -10276,6 +10648,7 @@ var ProductsTop1 = function ProductsTop1(props) {
|
|
|
10276
10648
|
_props$Link = props.Link,
|
|
10277
10649
|
Link = _props$Link === void 0 ? null : _props$Link;
|
|
10278
10650
|
var _useState = useState({
|
|
10651
|
+
sort: "ranked,DESC",
|
|
10279
10652
|
size: 8
|
|
10280
10653
|
}),
|
|
10281
10654
|
params = _useState[0];
|
|
@@ -10286,6 +10659,7 @@ var ProductsTop1 = function ProductsTop1(props) {
|
|
|
10286
10659
|
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
10287
10660
|
loading = _ProductController.loading;
|
|
10288
10661
|
console.log("ProductsTop1 products");
|
|
10662
|
+
console.log(products);
|
|
10289
10663
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10290
10664
|
className: SECTION_DEFAULT_CLASS + " flex flex-col gap-8 "
|
|
10291
10665
|
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
@@ -10376,7 +10750,7 @@ var ProductHighlight1 = function ProductHighlight1(props) {
|
|
|
10376
10750
|
isGetMore = _useState[0],
|
|
10377
10751
|
setIsGetMore = _useState[1];
|
|
10378
10752
|
var _useState2 = useState({
|
|
10379
|
-
size:
|
|
10753
|
+
size: 12,
|
|
10380
10754
|
isHighlight: true
|
|
10381
10755
|
}),
|
|
10382
10756
|
params = _useState2[0],
|
|
@@ -10401,7 +10775,7 @@ var ProductHighlight1 = function ProductHighlight1(props) {
|
|
|
10401
10775
|
}), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
10402
10776
|
className: "m-auto mt-20 min-h-32"
|
|
10403
10777
|
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
10404
|
-
className: "grid grid-cols-2
|
|
10778
|
+
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"
|
|
10405
10779
|
}, 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) {
|
|
10406
10780
|
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10407
10781
|
Link: Link,
|
|
@@ -10419,7 +10793,7 @@ var ProductHighlight1 = function ProductHighlight1(props) {
|
|
|
10419
10793
|
};
|
|
10420
10794
|
|
|
10421
10795
|
var ProductDetail10 = function ProductDetail10(props) {
|
|
10422
|
-
var _product$
|
|
10796
|
+
var _product$images2;
|
|
10423
10797
|
var shopConfigStyle = props.shopConfigStyle,
|
|
10424
10798
|
shopConfig = props.shopConfig,
|
|
10425
10799
|
_props$handleRedirect = props.handleRedirect,
|
|
@@ -10447,6 +10821,7 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
10447
10821
|
var descriptionRef = useRef();
|
|
10448
10822
|
useEffect(function () {
|
|
10449
10823
|
if (product) {
|
|
10824
|
+
var _product$images;
|
|
10450
10825
|
initVariant();
|
|
10451
10826
|
if (descriptionRef.current) {
|
|
10452
10827
|
var descriptionHeight = descriptionRef.current.offsetHeight;
|
|
@@ -10454,6 +10829,7 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
10454
10829
|
setHiddenButton(false);
|
|
10455
10830
|
}
|
|
10456
10831
|
}
|
|
10832
|
+
setDisplayImage(product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images[0]);
|
|
10457
10833
|
}
|
|
10458
10834
|
}, [product]);
|
|
10459
10835
|
var initVariant = function initVariant() {
|
|
@@ -10519,7 +10895,7 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
10519
10895
|
var _refInputQuantity$cur3;
|
|
10520
10896
|
var quantity = refInputQuantity === null || refInputQuantity === void 0 ? void 0 : (_refInputQuantity$cur3 = refInputQuantity.current) === null || _refInputQuantity$cur3 === void 0 ? void 0 : _refInputQuantity$cur3.getValue();
|
|
10521
10897
|
return Promise.resolve(addProductToCart(product, variant, quantity)).then(function () {
|
|
10522
|
-
handleRedirect("/
|
|
10898
|
+
handleRedirect("/gio-hang");
|
|
10523
10899
|
});
|
|
10524
10900
|
}
|
|
10525
10901
|
}();
|
|
@@ -10536,21 +10912,27 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
10536
10912
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10537
10913
|
className: "p-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 gap-6 bg-bgSecondary"
|
|
10538
10914
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10539
|
-
className: "flex flex-col gap-4 col-span-2"
|
|
10915
|
+
className: "flex flex-col gap-4 col-span-2 "
|
|
10540
10916
|
}, displayImage ? /*#__PURE__*/React__default.createElement("img", {
|
|
10541
10917
|
src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
|
|
10542
|
-
className: "w-full aspect-square rounded-2xl "
|
|
10543
|
-
}) : /*#__PURE__*/React__default.createElement(
|
|
10544
|
-
|
|
10545
|
-
|
|
10546
|
-
|
|
10918
|
+
className: "w-full border rounded-2xl p-2 bg-background aspect-square object-contain rounded-2xl "
|
|
10919
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
10920
|
+
className: "flex justify-center items-center w-full rounded-2xl aspect-square",
|
|
10921
|
+
style: {
|
|
10922
|
+
backgroundColor: "#FAFAFA"
|
|
10923
|
+
}
|
|
10924
|
+
}, /*#__PURE__*/React__default.createElement(SvgImageGallery, {
|
|
10925
|
+
width: "25%",
|
|
10926
|
+
height: "25%",
|
|
10927
|
+
fill: "#D9D9D9"
|
|
10928
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10547
10929
|
className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
|
|
10548
|
-
}, product === null || product === void 0 ? void 0 : (_product$
|
|
10930
|
+
}, product === null || product === void 0 ? void 0 : (_product$images2 = product.images) === null || _product$images2 === void 0 ? void 0 : _product$images2.map(function (item) {
|
|
10549
10931
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
10550
10932
|
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
10551
10933
|
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
10552
10934
|
alt: "",
|
|
10553
|
-
className:
|
|
10935
|
+
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 "),
|
|
10554
10936
|
onClick: function onClick() {
|
|
10555
10937
|
handleDisplayImage(item);
|
|
10556
10938
|
}
|
|
@@ -10639,6 +11021,268 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
10639
11021
|
}, "Kh\xF4ng c\xF3 th\xF4ng tin"))));
|
|
10640
11022
|
};
|
|
10641
11023
|
|
|
11024
|
+
var ProductDetail11 = function ProductDetail11(props) {
|
|
11025
|
+
var _product$images2, _product$images3, _product$attributes, _product$attributes2;
|
|
11026
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
11027
|
+
shopConfig = props.shopConfig,
|
|
11028
|
+
_props$handleRedirect = props.handleRedirect,
|
|
11029
|
+
handleRedirect = _props$handleRedirect === void 0 ? function () {} : _props$handleRedirect;
|
|
11030
|
+
var _ProductDetailControl = ProductDetailController(props),
|
|
11031
|
+
product = _ProductDetailControl.product;
|
|
11032
|
+
var _useState = useState(),
|
|
11033
|
+
variant = _useState[0],
|
|
11034
|
+
setVariant = _useState[1];
|
|
11035
|
+
var _useState2 = useState([]),
|
|
11036
|
+
options = _useState2[0],
|
|
11037
|
+
setOptions = _useState2[1];
|
|
11038
|
+
var _useState3 = useState(),
|
|
11039
|
+
displayImage = _useState3[0],
|
|
11040
|
+
setDisplayImage = _useState3[1];
|
|
11041
|
+
var _useState4 = useState(false),
|
|
11042
|
+
isSeeMore = _useState4[0],
|
|
11043
|
+
setIsSeeMore = _useState4[1];
|
|
11044
|
+
var _useState5 = useState(true),
|
|
11045
|
+
hiddenButton = _useState5[0],
|
|
11046
|
+
setHiddenButton = _useState5[1];
|
|
11047
|
+
var _CartController = CartController(props),
|
|
11048
|
+
addProductToCart = _CartController.addProductToCart;
|
|
11049
|
+
var refInputQuantity = useRef();
|
|
11050
|
+
var descriptionRef = useRef();
|
|
11051
|
+
useEffect(function () {
|
|
11052
|
+
if (product) {
|
|
11053
|
+
var _product$images;
|
|
11054
|
+
initVariant();
|
|
11055
|
+
if (descriptionRef.current) {
|
|
11056
|
+
var descriptionHeight = descriptionRef.current.offsetHeight;
|
|
11057
|
+
if (descriptionHeight >= 700) {
|
|
11058
|
+
setHiddenButton(false);
|
|
11059
|
+
}
|
|
11060
|
+
}
|
|
11061
|
+
setDisplayImage(product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images[0]);
|
|
11062
|
+
}
|
|
11063
|
+
}, [product]);
|
|
11064
|
+
var initVariant = function initVariant() {
|
|
11065
|
+
var _product$variants, _variant$index;
|
|
11066
|
+
var variant = product === null || product === void 0 ? void 0 : (_product$variants = product.variants) === null || _product$variants === void 0 ? void 0 : _product$variants[0];
|
|
11067
|
+
var indexOptions = variant === null || variant === void 0 ? void 0 : (_variant$index = variant.index) === null || _variant$index === void 0 ? void 0 : _variant$index.split(",");
|
|
11068
|
+
setVariant(variant);
|
|
11069
|
+
var options = (product === null || product === void 0 ? void 0 : product.optionValues) || [];
|
|
11070
|
+
options = options.map(function (e, i) {
|
|
11071
|
+
return _extends({}, e, {
|
|
11072
|
+
valueIndex: (indexOptions === null || indexOptions === void 0 ? void 0 : indexOptions[i]) || 0
|
|
11073
|
+
});
|
|
11074
|
+
});
|
|
11075
|
+
setOptions(options);
|
|
11076
|
+
};
|
|
11077
|
+
var selectOption = function selectOption(optionIndex, valueIndex) {
|
|
11078
|
+
console.log("selectOption optionIndex valueIndex", optionIndex, valueIndex);
|
|
11079
|
+
var newOption = _extends({}, options[optionIndex], {
|
|
11080
|
+
valueIndex: valueIndex
|
|
11081
|
+
});
|
|
11082
|
+
options.splice(optionIndex, 1, newOption);
|
|
11083
|
+
var newOptions = [].concat(options);
|
|
11084
|
+
setOptions(newOptions);
|
|
11085
|
+
console.log("newOptions", newOptions);
|
|
11086
|
+
var variant = getVariantFromOption(newOptions);
|
|
11087
|
+
console.log("getVariantFromOption variant", variant);
|
|
11088
|
+
setVariant(variant);
|
|
11089
|
+
};
|
|
11090
|
+
var getVariantFromOption = function getVariantFromOption(_options) {
|
|
11091
|
+
console.log("getVariantFromOption options", _options);
|
|
11092
|
+
var listOptionIndexSelected = _options.map(function (e) {
|
|
11093
|
+
return e.valueIndex;
|
|
11094
|
+
}).filter(function (e) {
|
|
11095
|
+
return e !== undefined;
|
|
11096
|
+
});
|
|
11097
|
+
var variantIndex = listOptionIndexSelected.join(",");
|
|
11098
|
+
return ((product === null || product === void 0 ? void 0 : product.variants) || []).find(function (e) {
|
|
11099
|
+
return e.index === variantIndex;
|
|
11100
|
+
});
|
|
11101
|
+
};
|
|
11102
|
+
var validateData = function validateData() {
|
|
11103
|
+
var _refInputQuantity$cur;
|
|
11104
|
+
return (refInputQuantity === null || refInputQuantity === void 0 ? void 0 : (_refInputQuantity$cur = refInputQuantity.current) === null || _refInputQuantity$cur === void 0 ? void 0 : _refInputQuantity$cur.validateData()) && variant;
|
|
11105
|
+
};
|
|
11106
|
+
var addToCart = function addToCart() {
|
|
11107
|
+
try {
|
|
11108
|
+
var _temp = function () {
|
|
11109
|
+
if (validateData()) {
|
|
11110
|
+
var _refInputQuantity$cur2;
|
|
11111
|
+
var quantity = refInputQuantity === null || refInputQuantity === void 0 ? void 0 : (_refInputQuantity$cur2 = refInputQuantity.current) === null || _refInputQuantity$cur2 === void 0 ? void 0 : _refInputQuantity$cur2.getValue();
|
|
11112
|
+
return Promise.resolve(addProductToCart(product, variant, quantity)).then(function () {});
|
|
11113
|
+
}
|
|
11114
|
+
}();
|
|
11115
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
11116
|
+
} catch (e) {
|
|
11117
|
+
return Promise.reject(e);
|
|
11118
|
+
}
|
|
11119
|
+
};
|
|
11120
|
+
var buyNow = function buyNow() {
|
|
11121
|
+
try {
|
|
11122
|
+
var _temp2 = function () {
|
|
11123
|
+
if (validateData()) {
|
|
11124
|
+
var _refInputQuantity$cur3;
|
|
11125
|
+
var quantity = refInputQuantity === null || refInputQuantity === void 0 ? void 0 : (_refInputQuantity$cur3 = refInputQuantity.current) === null || _refInputQuantity$cur3 === void 0 ? void 0 : _refInputQuantity$cur3.getValue();
|
|
11126
|
+
return Promise.resolve(addProductToCart(product, variant, quantity)).then(function () {
|
|
11127
|
+
handleRedirect("/gio-hang");
|
|
11128
|
+
});
|
|
11129
|
+
}
|
|
11130
|
+
}();
|
|
11131
|
+
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
11132
|
+
} catch (e) {
|
|
11133
|
+
return Promise.reject(e);
|
|
11134
|
+
}
|
|
11135
|
+
};
|
|
11136
|
+
var handleDisplayImage = function handleDisplayImage(item) {
|
|
11137
|
+
setDisplayImage(item);
|
|
11138
|
+
};
|
|
11139
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11140
|
+
className: SECTION_CLASS + " mt-6 md:mt-6 mb-0 " + ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "bg-bgSecondary pb-8" : "bg-background")
|
|
11141
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11142
|
+
className: "p-6 rounded-2xl grid grid-cols-1 md:grid-cols-2 bg-bgSecondary"
|
|
11143
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11144
|
+
className: "grid grid-cols-5 gap-6"
|
|
11145
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11146
|
+
className: "hidden lg:block col-span-1 lg:min-h-[240px] lg:max-h-[400px] xl:min-h-[400px] xl:max-h-[480px] overflow-y-auto overflow-hidden no-scrollbar"
|
|
11147
|
+
}, product === null || product === void 0 ? void 0 : (_product$images2 = product.images) === null || _product$images2 === void 0 ? void 0 : _product$images2.map(function (item) {
|
|
11148
|
+
return /*#__PURE__*/React__default.createElement("img", {
|
|
11149
|
+
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
11150
|
+
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
11151
|
+
alt: "",
|
|
11152
|
+
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" : ""),
|
|
11153
|
+
onClick: function onClick() {
|
|
11154
|
+
handleDisplayImage(item);
|
|
11155
|
+
}
|
|
11156
|
+
});
|
|
11157
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
11158
|
+
className: "flex flex-col gap-4 col-span-5 lg:col-span-4 p-4 border border-stroke rounded-2xl"
|
|
11159
|
+
}, displayImage ? /*#__PURE__*/React__default.createElement("img", {
|
|
11160
|
+
src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
|
|
11161
|
+
className: "w-full aspect-square object-contain rounded-2xl "
|
|
11162
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
11163
|
+
className: "flex justify-center items-center rounded-2xl w-full aspect-square",
|
|
11164
|
+
style: {
|
|
11165
|
+
backgroundColor: "#FAFAFA"
|
|
11166
|
+
}
|
|
11167
|
+
}, /*#__PURE__*/React__default.createElement(SvgImageGallery, {
|
|
11168
|
+
width: "25%",
|
|
11169
|
+
height: "25%",
|
|
11170
|
+
fill: "#D9D9D9"
|
|
11171
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
11172
|
+
className: " block lg:hidden w-full flex gap-4 col-span-5 overflow-x-auto overflow-hidden no-scrollbar"
|
|
11173
|
+
}, product === null || product === void 0 ? void 0 : (_product$images3 = product.images) === null || _product$images3 === void 0 ? void 0 : _product$images3.map(function (item) {
|
|
11174
|
+
return /*#__PURE__*/React__default.createElement("img", {
|
|
11175
|
+
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
11176
|
+
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
11177
|
+
alt: "",
|
|
11178
|
+
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" : ""),
|
|
11179
|
+
onClick: function onClick() {
|
|
11180
|
+
handleDisplayImage(item);
|
|
11181
|
+
}
|
|
11182
|
+
});
|
|
11183
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
11184
|
+
className: "mt-2 md:ms-10"
|
|
11185
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
11186
|
+
className: "font-semibold text-2xl"
|
|
11187
|
+
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
11188
|
+
product: product,
|
|
11189
|
+
variant: variant,
|
|
11190
|
+
className: "mt-4 md:mt-6 text-[22px]"
|
|
11191
|
+
}), options.map(function (option, index) {
|
|
11192
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11193
|
+
className: "flex gap-2 mt-4 md:mt-6",
|
|
11194
|
+
key: index
|
|
11195
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11196
|
+
className: "min-w-24 my-auto"
|
|
11197
|
+
}, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
|
|
11198
|
+
className: "flex gap-2"
|
|
11199
|
+
}, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
|
|
11200
|
+
return /*#__PURE__*/React__default.createElement("button", {
|
|
11201
|
+
key: i,
|
|
11202
|
+
onClick: function onClick() {
|
|
11203
|
+
return selectOption(index, i);
|
|
11204
|
+
},
|
|
11205
|
+
className: "rounded py-1 px-2 " + (i == option.valueIndex ? "bg-primary text-textButton" : "border bg-gray6")
|
|
11206
|
+
}, v);
|
|
11207
|
+
})));
|
|
11208
|
+
}), /*#__PURE__*/React__default.createElement(Input, {
|
|
11209
|
+
label: "Số lượng",
|
|
11210
|
+
wrapClassName: "flex items-center gap-6 mt-4 md:mt-6 ",
|
|
11211
|
+
rules: [{
|
|
11212
|
+
type: "required",
|
|
11213
|
+
message: "Bắt buộc nhập số lượng"
|
|
11214
|
+
}, {
|
|
11215
|
+
type: "pattern",
|
|
11216
|
+
pattern: numberPattern,
|
|
11217
|
+
message: "Số lượng không đúng"
|
|
11218
|
+
}],
|
|
11219
|
+
defaultValue: 1,
|
|
11220
|
+
isQuantity: true,
|
|
11221
|
+
min: 0,
|
|
11222
|
+
className: "bg-background",
|
|
11223
|
+
ref: refInputQuantity
|
|
11224
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11225
|
+
className: "flex gap-4 mt-6"
|
|
11226
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
11227
|
+
label: "THÊM VÀO GIỎ",
|
|
11228
|
+
shopConfigStyle: shopConfigStyle,
|
|
11229
|
+
type: "outline",
|
|
11230
|
+
onClick: function onClick() {
|
|
11231
|
+
return addToCart();
|
|
11232
|
+
}
|
|
11233
|
+
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
11234
|
+
label: "MUA NGAY",
|
|
11235
|
+
shopConfigStyle: shopConfigStyle,
|
|
11236
|
+
onClick: function onClick() {
|
|
11237
|
+
return buyNow();
|
|
11238
|
+
}
|
|
11239
|
+
})))), /*#__PURE__*/React__default.createElement("div", {
|
|
11240
|
+
className: "grid grid-cols-1 lg:grid-cols-5 mt-8 lg:gap-8"
|
|
11241
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11242
|
+
className: "lg:col-span-3 "
|
|
11243
|
+
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
11244
|
+
className: "mb-8 font-semibold text-3xl"
|
|
11245
|
+
}, "M\xF4 t\u1EA3 s\u1EA3n ph\u1EA9m"), product !== null && product !== void 0 && product.description ? /*#__PURE__*/React__default.createElement("div", {
|
|
11246
|
+
className: "h-max relative p-2 p-6 pb-0 rounded-2xl bg-bgSecondary"
|
|
11247
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11248
|
+
ref: descriptionRef,
|
|
11249
|
+
className: "" + (isSeeMore && !hiddenButton ? "h-full mb-4" : "max-h-[700px] overflow-hidden"),
|
|
11250
|
+
dangerouslySetInnerHTML: {
|
|
11251
|
+
__html: product === null || product === void 0 ? void 0 : product.description
|
|
11252
|
+
}
|
|
11253
|
+
}), !isSeeMore && !hiddenButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
11254
|
+
className: "absolute bottom-0 rounded-b-2xl left-0 w-full h-24 bg-gradient-to-t from-black/40 to-transparent"
|
|
11255
|
+
}) : null, !hiddenButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
11256
|
+
className: "w-full " + (!isSeeMore ? "absolute bottom-4" : "mt-2 pb-2") + " flex justify-center "
|
|
11257
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
11258
|
+
label: isSeeMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
11259
|
+
className: "flex items-center gap-2"
|
|
11260
|
+
}, "Thu nh\u1ECF ", /*#__PURE__*/React__default.createElement(FaMinus, null)) : /*#__PURE__*/React__default.createElement("div", {
|
|
11261
|
+
className: "flex items-center gap-2"
|
|
11262
|
+
}, "Xem th\xEAm ", /*#__PURE__*/React__default.createElement(FaPlus, null)),
|
|
11263
|
+
className: " bottom-0 z-50",
|
|
11264
|
+
onClick: function onClick() {
|
|
11265
|
+
setIsSeeMore(!isSeeMore);
|
|
11266
|
+
}
|
|
11267
|
+
})) : null) : /*#__PURE__*/React__default.createElement("div", {
|
|
11268
|
+
className: "text-gray3 bg-bgSecondary mt-2"
|
|
11269
|
+
}, "Kh\xF4ng c\xF3 th\xF4ng tin")), (product === null || product === void 0 ? void 0 : (_product$attributes = product.attributes) === null || _product$attributes === void 0 ? void 0 : _product$attributes.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
11270
|
+
className: "lg:col-span-2"
|
|
11271
|
+
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
11272
|
+
className: "text-3xl mb-8 font-semibold"
|
|
11273
|
+
}, "Th\xF4ng tin s\u1EA3n ph\u1EA9m"), /*#__PURE__*/React__default.createElement("div", {
|
|
11274
|
+
className: "bg-bgSecondary rounded-2xl py-2 px-2 md:px-6"
|
|
11275
|
+
}, product === null || product === void 0 ? void 0 : (_product$attributes2 = product.attributes) === null || _product$attributes2 === void 0 ? void 0 : _product$attributes2.map(function (item, index) {
|
|
11276
|
+
var _item$value;
|
|
11277
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11278
|
+
className: "p-4 flex gap-4 rounded-lg even:bg-background",
|
|
11279
|
+
key: "ptyh-" + index
|
|
11280
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11281
|
+
className: "min-w-32 max-w-32 text-wrap"
|
|
11282
|
+
}, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : (_item$value = item.value) === null || _item$value === void 0 ? void 0 : _item$value[0]));
|
|
11283
|
+
}))) : null));
|
|
11284
|
+
};
|
|
11285
|
+
|
|
10642
11286
|
var Booking1 = function Booking1(props) {
|
|
10643
11287
|
var _data$data, _data$data$, _data$data2, _data$data2$;
|
|
10644
11288
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
@@ -10693,7 +11337,7 @@ var BookingForm6 = function BookingForm6(props) {
|
|
|
10693
11337
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10694
11338
|
className: "mt-12 grid grid-cols-1 gap-6 md:grid-cols-3 md:gap-12"
|
|
10695
11339
|
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10696
|
-
href: (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) || "#"
|
|
11340
|
+
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) || "#"
|
|
10697
11341
|
}, data !== null && data !== void 0 && (_data$data3 = data.data) !== null && _data$data3 !== void 0 && (_data$data3$ = _data$data3[0]) !== null && _data$data3$ !== void 0 && _data$data3$.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
10698
11342
|
className: "text-primary w-full h-auto"
|
|
10699
11343
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -10811,7 +11455,7 @@ var Banner3 = function Banner3(props) {
|
|
|
10811
11455
|
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
10812
11456
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10813
11457
|
Link: Link,
|
|
10814
|
-
href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
11458
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
10815
11459
|
key: "djsd-" + index
|
|
10816
11460
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
10817
11461
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
@@ -10967,11 +11611,12 @@ var Address1 = function Address1(props) {
|
|
|
10967
11611
|
className: "sm:flex justify-between mt-3"
|
|
10968
11612
|
}, /*#__PURE__*/React__default.createElement("small", null, "M\u1EDF c\u1EEDa 08:00-21:00"), /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10969
11613
|
Link: Link,
|
|
10970
|
-
href: "
|
|
11614
|
+
href: "https://www.google.com/maps/search/?q=" + encodeURIComponent(item === null || item === void 0 ? void 0 : item.address),
|
|
11615
|
+
target: "_black"
|
|
10971
11616
|
}, /*#__PURE__*/React__default.createElement("small", {
|
|
10972
11617
|
className: "text-primary block"
|
|
10973
11618
|
}, "Ch\u1EC9 \u0111\u01B0\u1EDDng ", /*#__PURE__*/React__default.createElement(FaArrowRight, {
|
|
10974
|
-
className: "inline-block
|
|
11619
|
+
className: "inline-block text-primary"
|
|
10975
11620
|
}), " "))));
|
|
10976
11621
|
}))));
|
|
10977
11622
|
};
|
|
@@ -10992,8 +11637,8 @@ var Links1 = function Links1(props) {
|
|
|
10992
11637
|
}, [1, 2, 3].map(function (item, index) {
|
|
10993
11638
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10994
11639
|
key: "qwikf-" + index + " "
|
|
10995
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
10996
|
-
className: "text-lg md:text-
|
|
11640
|
+
}, /*#__PURE__*/React__default.createElement("h3", {
|
|
11641
|
+
className: "text-lg md:text-2xl font-semibold mb-4"
|
|
10997
11642
|
}, "\u0110a d\u1EA1ng thanh to\xE1n"), /*#__PURE__*/React__default.createElement("div", {
|
|
10998
11643
|
className: "leading-10 flex flex-col bg-background2 p-4 rounded-xl bg-bgSecondary "
|
|
10999
11644
|
}, /*#__PURE__*/React__default.createElement("label", null, /*#__PURE__*/React__default.createElement(FaArrowsRotate, {
|
|
@@ -11052,7 +11697,7 @@ var Footer1 = function Footer1(props) {
|
|
|
11052
11697
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
11053
11698
|
className: "object-cover w-16 h-16",
|
|
11054
11699
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
11055
|
-
alt:
|
|
11700
|
+
alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
|
|
11056
11701
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
11057
11702
|
className: " text-2xl md:text-3xl font-semibold ms-2",
|
|
11058
11703
|
style: {
|
|
@@ -11066,8 +11711,8 @@ var Footer1 = function Footer1(props) {
|
|
|
11066
11711
|
className: "mb-3 font-semibold text-md md:text-lg"
|
|
11067
11712
|
}, "Th\xF4ng tin li\xEAn h\u1EC7"), shopAddressList === null || shopAddressList === void 0 ? void 0 : shopAddressList.map(function (item, index) {
|
|
11068
11713
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", null, "C\u01A1 s\u1EDF ", index + 1), /*#__PURE__*/React__default.createElement("div", {
|
|
11069
|
-
className: "flex gap-
|
|
11070
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
11714
|
+
className: "flex gap-2 items-center"
|
|
11715
|
+
}, /*#__PURE__*/React__default.createElement(HiOutlineLocationMarker, {
|
|
11071
11716
|
size: 24,
|
|
11072
11717
|
className: "inline-block",
|
|
11073
11718
|
style: {
|
|
@@ -11075,7 +11720,7 @@ var Footer1 = function Footer1(props) {
|
|
|
11075
11720
|
}
|
|
11076
11721
|
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.address)), /*#__PURE__*/React__default.createElement("div", {
|
|
11077
11722
|
className: "flex gap-2 items-center"
|
|
11078
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
11723
|
+
}, /*#__PURE__*/React__default.createElement(AiOutlinePhone, {
|
|
11079
11724
|
size: 24,
|
|
11080
11725
|
className: "inline-block",
|
|
11081
11726
|
style: {
|
|
@@ -11091,7 +11736,7 @@ var Footer1 = function Footer1(props) {
|
|
|
11091
11736
|
})) === null || _shopConfigStyle$navB2 === void 0 ? void 0 : _shopConfigStyle$navB2.map(function (route, index) {
|
|
11092
11737
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
11093
11738
|
Link: Link,
|
|
11094
|
-
href: (route === null || route === void 0 ? void 0 : route.route) || "#",
|
|
11739
|
+
href: convertURL(route === null || route === void 0 ? void 0 : route.route) || "#",
|
|
11095
11740
|
key: "dfjg-" + index
|
|
11096
11741
|
}, /*#__PURE__*/React__default.createElement("div", null, route === null || route === void 0 ? void 0 : route.label));
|
|
11097
11742
|
}))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -11099,7 +11744,8 @@ var Footer1 = function Footer1(props) {
|
|
|
11099
11744
|
}, "H\u1ED7 tr\u1EE3"), /*#__PURE__*/React__default.createElement("div", {
|
|
11100
11745
|
className: "flex justify-start items-center gap-4"
|
|
11101
11746
|
}, /*#__PURE__*/React__default.createElement("a", {
|
|
11102
|
-
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#"
|
|
11747
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#",
|
|
11748
|
+
target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopFacebookPage ? "_blank" : "_self"
|
|
11103
11749
|
}, /*#__PURE__*/React__default.createElement(FaFacebookF, {
|
|
11104
11750
|
size: 40,
|
|
11105
11751
|
color: textButton,
|
|
@@ -11108,7 +11754,8 @@ var Footer1 = function Footer1(props) {
|
|
|
11108
11754
|
background: primary
|
|
11109
11755
|
}
|
|
11110
11756
|
})), /*#__PURE__*/React__default.createElement("a", {
|
|
11111
|
-
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#"
|
|
11757
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#",
|
|
11758
|
+
target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopMessenger ? "_blank" : "_self"
|
|
11112
11759
|
}, /*#__PURE__*/React__default.createElement(FaFacebookMessenger, {
|
|
11113
11760
|
size: 40,
|
|
11114
11761
|
color: textButton,
|
|
@@ -11117,7 +11764,8 @@ var Footer1 = function Footer1(props) {
|
|
|
11117
11764
|
background: primary
|
|
11118
11765
|
}
|
|
11119
11766
|
})), /*#__PURE__*/React__default.createElement("a", {
|
|
11120
|
-
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#"
|
|
11767
|
+
href: "https://zalo.me/" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#",
|
|
11768
|
+
target: "_blank"
|
|
11121
11769
|
}, /*#__PURE__*/React__default.createElement(SiZalo, {
|
|
11122
11770
|
size: 40,
|
|
11123
11771
|
color: textButton,
|
|
@@ -11130,7 +11778,8 @@ var Footer1 = function Footer1(props) {
|
|
|
11130
11778
|
}, /*#__PURE__*/React__default.createElement("small", {
|
|
11131
11779
|
className: "me-5"
|
|
11132
11780
|
}, "B\u1EA3n quy\u1EC1n thu\u1ED9c c\xF4ng ty c\u1ED5 ph\u1EA7n c\xF4ng ngh\u1EC7 th\xF4ng minh SFIN."), /*#__PURE__*/React__default.createElement("a", {
|
|
11133
|
-
href:
|
|
11781
|
+
href: linkPagePolicy,
|
|
11782
|
+
target: "_blank"
|
|
11134
11783
|
}, /*#__PURE__*/React__default.createElement("small", {
|
|
11135
11784
|
className: "underline decoration-solid",
|
|
11136
11785
|
style: {
|
|
@@ -11192,7 +11841,7 @@ var Footer7 = function Footer7(props) {
|
|
|
11192
11841
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
11193
11842
|
className: "object-cover w-14",
|
|
11194
11843
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
11195
|
-
alt:
|
|
11844
|
+
alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
|
|
11196
11845
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
11197
11846
|
className: " text-2xl md:text-3xl font-semibold ms-2",
|
|
11198
11847
|
style: {
|
|
@@ -11208,16 +11857,16 @@ var Footer7 = function Footer7(props) {
|
|
|
11208
11857
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
11209
11858
|
key: "dlkhg-" + index
|
|
11210
11859
|
}, /*#__PURE__*/React__default.createElement("div", null, "C\u01A1 s\u1EDF ", index + 1), /*#__PURE__*/React__default.createElement("div", {
|
|
11211
|
-
className: "flex gap-
|
|
11212
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
11860
|
+
className: "flex gap-2"
|
|
11861
|
+
}, /*#__PURE__*/React__default.createElement(HiOutlineLocationMarker, {
|
|
11213
11862
|
size: 24,
|
|
11214
11863
|
className: "inline-block mt-1",
|
|
11215
11864
|
style: {
|
|
11216
11865
|
color: primary
|
|
11217
11866
|
}
|
|
11218
11867
|
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.address)), /*#__PURE__*/React__default.createElement("div", {
|
|
11219
|
-
className: "flex gap-
|
|
11220
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
11868
|
+
className: "flex gap-2"
|
|
11869
|
+
}, /*#__PURE__*/React__default.createElement(AiOutlinePhone, {
|
|
11221
11870
|
size: 24,
|
|
11222
11871
|
className: "inline-block mt-1",
|
|
11223
11872
|
style: {
|
|
@@ -11232,7 +11881,7 @@ var Footer7 = function Footer7(props) {
|
|
|
11232
11881
|
return e === null || e === void 0 ? void 0 : e.isShow;
|
|
11233
11882
|
})) === null || _shopConfigStyle$navB2 === void 0 ? void 0 : _shopConfigStyle$navB2.map(function (route, index) {
|
|
11234
11883
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
11235
|
-
href: (route === null || route === void 0 ? void 0 : route.route) || "#",
|
|
11884
|
+
href: convertURL(route === null || route === void 0 ? void 0 : route.route) || "#",
|
|
11236
11885
|
Link: Link,
|
|
11237
11886
|
key: "fiddf-" + index
|
|
11238
11887
|
}, /*#__PURE__*/React__default.createElement("div", null, route === null || route === void 0 ? void 0 : route.label));
|
|
@@ -11241,7 +11890,8 @@ var Footer7 = function Footer7(props) {
|
|
|
11241
11890
|
}, "H\u1ED7 tr\u1EE3"), /*#__PURE__*/React__default.createElement("div", {
|
|
11242
11891
|
className: "flex justify-start items-center gap-4"
|
|
11243
11892
|
}, /*#__PURE__*/React__default.createElement("a", {
|
|
11244
|
-
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#"
|
|
11893
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#",
|
|
11894
|
+
target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopFacebookPage ? "_blank" : "_self"
|
|
11245
11895
|
}, /*#__PURE__*/React__default.createElement(FaFacebookF, {
|
|
11246
11896
|
size: 40,
|
|
11247
11897
|
color: textButton,
|
|
@@ -11250,7 +11900,8 @@ var Footer7 = function Footer7(props) {
|
|
|
11250
11900
|
background: primary
|
|
11251
11901
|
}
|
|
11252
11902
|
})), /*#__PURE__*/React__default.createElement("a", {
|
|
11253
|
-
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#"
|
|
11903
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#",
|
|
11904
|
+
target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopMessenger ? "_blank" : "_self"
|
|
11254
11905
|
}, /*#__PURE__*/React__default.createElement(FaFacebookMessenger, {
|
|
11255
11906
|
size: 40,
|
|
11256
11907
|
color: textButton,
|
|
@@ -11259,7 +11910,8 @@ var Footer7 = function Footer7(props) {
|
|
|
11259
11910
|
background: primary
|
|
11260
11911
|
}
|
|
11261
11912
|
})), /*#__PURE__*/React__default.createElement("a", {
|
|
11262
|
-
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#"
|
|
11913
|
+
href: "https://zalo.me/" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#",
|
|
11914
|
+
target: "_blank"
|
|
11263
11915
|
}, /*#__PURE__*/React__default.createElement(SiZalo, {
|
|
11264
11916
|
size: 40,
|
|
11265
11917
|
color: textButton,
|
|
@@ -11272,7 +11924,8 @@ var Footer7 = function Footer7(props) {
|
|
|
11272
11924
|
}, /*#__PURE__*/React__default.createElement("small", {
|
|
11273
11925
|
className: "me-5"
|
|
11274
11926
|
}, "B\u1EA3n quy\u1EC1n thu\u1ED9c c\xF4ng ty c\u1ED5 ph\u1EA7n c\xF4ng ngh\u1EC7 th\xF4ng minh SFIN."), /*#__PURE__*/React__default.createElement("a", {
|
|
11275
|
-
href:
|
|
11927
|
+
href: linkPagePolicy,
|
|
11928
|
+
target: "_blank"
|
|
11276
11929
|
}, /*#__PURE__*/React__default.createElement("small", {
|
|
11277
11930
|
className: "underline decoration-solid",
|
|
11278
11931
|
style: {
|
|
@@ -11559,7 +12212,7 @@ var PageTitle1 = function PageTitle1(props) {
|
|
|
11559
12212
|
className: "absolute top-0 w-full h-full bg-black opacity-40 z-0"
|
|
11560
12213
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11561
12214
|
className: "relative w-full p-20 z-10 flex flex-col gap-6 items-center justify-center"
|
|
11562
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
12215
|
+
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
11563
12216
|
className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
11564
12217
|
}, sectionData !== null && sectionData !== void 0 && sectionData.sectionTitle ? sectionData === null || sectionData === void 0 ? void 0 : sectionData.sectionTitle : route === null || route === void 0 ? void 0 : route.label)));
|
|
11565
12218
|
};
|
|
@@ -11574,6 +12227,7 @@ var About1 = function About1(props) {
|
|
|
11574
12227
|
}, data === null || data === void 0 ? void 0 : data.sectionTitle) : null, data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("div", {
|
|
11575
12228
|
className: "text-xl"
|
|
11576
12229
|
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
12230
|
+
className: "text-wrap",
|
|
11577
12231
|
dangerouslySetInnerHTML: {
|
|
11578
12232
|
__html: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopAbout
|
|
11579
12233
|
}
|
|
@@ -11592,7 +12246,7 @@ var About5 = function About5(props) {
|
|
|
11592
12246
|
src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage,
|
|
11593
12247
|
className: "w-full hidden lg:block rounded-xl"
|
|
11594
12248
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11595
|
-
className: "ck-content",
|
|
12249
|
+
className: "ck-content text-wrap",
|
|
11596
12250
|
dangerouslySetInnerHTML: {
|
|
11597
12251
|
__html: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopAbout
|
|
11598
12252
|
}
|
|
@@ -11602,6 +12256,32 @@ var About5 = function About5(props) {
|
|
|
11602
12256
|
}));
|
|
11603
12257
|
};
|
|
11604
12258
|
|
|
12259
|
+
var About6 = function About6(props) {
|
|
12260
|
+
var _sectionData$, _sectionData$2;
|
|
12261
|
+
var shopConfig = props.shopConfig,
|
|
12262
|
+
data = props.data;
|
|
12263
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
12264
|
+
console.log("About5 sectionData", sectionData);
|
|
12265
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
12266
|
+
className: SECTION_DEFAULT_CLASS + " mt-0"
|
|
12267
|
+
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
12268
|
+
className: "text-2xl md:text-4xl text-textHeading font-semibold mb-6 lg:mb-8"
|
|
12269
|
+
}, data === null || data === void 0 ? void 0 : data.sectionTitle) , /*#__PURE__*/React__default.createElement("div", {
|
|
12270
|
+
className: "grid grid-cols-1 lg:grid-cols-5 gap-6 lg:gap-10"
|
|
12271
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
12272
|
+
src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage,
|
|
12273
|
+
className: "w-full h-auto object-cover lg:hidden block rounded-xl"
|
|
12274
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12275
|
+
className: "ck-content text-wrap lg:col-span-3 bg-bgSecondary p-4 lg:p-6 rounded-2xl",
|
|
12276
|
+
dangerouslySetInnerHTML: {
|
|
12277
|
+
__html: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopAbout
|
|
12278
|
+
}
|
|
12279
|
+
}), /*#__PURE__*/React__default.createElement("img", {
|
|
12280
|
+
src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$2 = sectionData[0]) === null || _sectionData$2 === void 0 ? void 0 : _sectionData$2.srcImage,
|
|
12281
|
+
className: "w-full h-auto object-cover lg:col-span-2 lg:block hidden rounded-xl"
|
|
12282
|
+
})));
|
|
12283
|
+
};
|
|
12284
|
+
|
|
11605
12285
|
var Contact1 = function Contact1(props) {
|
|
11606
12286
|
var _sectionData$;
|
|
11607
12287
|
var shopConfigStyle = props.shopConfigStyle,
|
|
@@ -11665,11 +12345,12 @@ var Breadcrumb1 = function Breadcrumb1(props) {
|
|
|
11665
12345
|
return e === null || e === void 0 ? void 0 : e.length;
|
|
11666
12346
|
})) === null || _route$route$split$fi === void 0 ? void 0 : _route$route$split$fi.slice(0, 2);
|
|
11667
12347
|
items = (_items = items) === null || _items === void 0 ? void 0 : _items.map(function (e) {
|
|
12348
|
+
var _e, _e$replace, _e$replace$replace, _e$replace$replace$re;
|
|
11668
12349
|
if (e === "product") e = "products";else if (e === "service") e = "services";
|
|
11669
12350
|
return (routes === null || routes === void 0 ? void 0 : routes.find(function (r) {
|
|
11670
12351
|
return (r === null || r === void 0 ? void 0 : r.name) === e;
|
|
11671
12352
|
})) || {
|
|
11672
|
-
label: e
|
|
12353
|
+
label: (_e = e) === null || _e === void 0 ? void 0 : (_e$replace = _e.replace(/-{3}/g, "###")) === null || _e$replace === void 0 ? void 0 : (_e$replace$replace = _e$replace.replace(/-/g, " ")) === null || _e$replace$replace === void 0 ? void 0 : (_e$replace$replace$re = _e$replace$replace.replace(/###/g, "-")) === null || _e$replace$replace$re === void 0 ? void 0 : _e$replace$replace$re.replace(/~/g, "/")
|
|
11673
12354
|
};
|
|
11674
12355
|
});
|
|
11675
12356
|
(_items2 = items) === null || _items2 === void 0 ? void 0 : _items2.unshift({
|
|
@@ -11690,7 +12371,7 @@ var Breadcrumb1 = function Breadcrumb1(props) {
|
|
|
11690
12371
|
className: "text-gray4"
|
|
11691
12372
|
}, "/") : null, item !== null && item !== void 0 && item.route ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
11692
12373
|
Link: Link,
|
|
11693
|
-
href: (item === null || item === void 0 ? void 0 : item.route) || "#",
|
|
12374
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || "#",
|
|
11694
12375
|
style: {
|
|
11695
12376
|
color: textHeading
|
|
11696
12377
|
}
|
|
@@ -12807,7 +13488,7 @@ var ShopHighlights2 = function ShopHighlights2(props) {
|
|
|
12807
13488
|
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
12808
13489
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12809
13490
|
Link: Link,
|
|
12810
|
-
href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
|
|
13491
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
|
|
12811
13492
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12812
13493
|
className: "flex flex-col items-center text-center lg:px-3 gap-3",
|
|
12813
13494
|
key: "kdf-" + index
|
|
@@ -12835,7 +13516,7 @@ var ShopHighlights5 = function ShopHighlights5(props) {
|
|
|
12835
13516
|
className: SECTION_CLASS + " grid md:grid-cols-3 py-6 gap-4 lg:gap-6 bg-bgSecondary"
|
|
12836
13517
|
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
12837
13518
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12838
|
-
href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
13519
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
12839
13520
|
Link: Link
|
|
12840
13521
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12841
13522
|
className: "flex flex-col items-center text-center md:px-3 lg:px-6 gap-3",
|
|
@@ -12881,7 +13562,7 @@ var ShopHighlights6 = function ShopHighlights6(props) {
|
|
|
12881
13562
|
className: " w-44 h-0.5 rounded-full bg-primary"
|
|
12882
13563
|
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description), /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12883
13564
|
Link: Link,
|
|
12884
|
-
href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
|
|
13565
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
|
|
12885
13566
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
12886
13567
|
shopConfigStyle: shopConfigStyle,
|
|
12887
13568
|
label: item === null || item === void 0 ? void 0 : item.title
|
|
@@ -12911,7 +13592,7 @@ var ShopHighlights7 = function ShopHighlights7(props) {
|
|
|
12911
13592
|
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
|
|
12912
13593
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12913
13594
|
Link: Link,
|
|
12914
|
-
href: (it === null || it === void 0 ? void 0 : it.route) || (it === null || it === void 0 ? void 0 : it.link) || "#",
|
|
13595
|
+
href: convertURL(it === null || it === void 0 ? void 0 : it.route) || (it === null || it === void 0 ? void 0 : it.link) || "#",
|
|
12915
13596
|
key: index,
|
|
12916
13597
|
className: "pt-6 col-span-3 md:col-span-1"
|
|
12917
13598
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -13447,5 +14128,5 @@ var NewsDetail1 = function NewsDetail1(props) {
|
|
|
13447
14128
|
}))));
|
|
13448
14129
|
};
|
|
13449
14130
|
|
|
13450
|
-
export { About1, About5, Address1, Banner1, Banner2, Banner3, Banner7, BannerFull1, BannerFull2, Booking1, BookingForm6, Breadcrumb1, Button, Carts1, Contact1, CustomerRating1, CustomerRating10, CustomerRating5, CustomerRating6, DateTimePicker, Employees1, Features2, Features3, Footer1, Footer7, Gallery1, Hero1, Hero10, Hero11 as Hero12, Hero13, Hero2, Hero5, Hero6, Input, InputPhoneNumber, Links1, ModalNotification, NavBar1, NavBar7, News1, NewsDetail1, NewsHighlight1, PageTitle1, Partner1, ProductCategory2, ProductDetail10, ProductHighlight1, ProductHot1, ProductHot3, ProductItem2, ProductItem3, ProductItem4, ProductItem5, ProductItem6, ProductItem7, ProductList5, ProductList7, ProductSale2, ProductSearch1, Products10, Products2, Products3, ProductsTop1, SearchBar2, SearchBar5, SearchBar6, SearchProduct1, SectionTitle1, SectionTitle2, SectionTitle3, Select$1 as Select, ServiceDetail1, ShopHighlights2, ShopHighlights5, ShopHighlights6, ShopHighlights7, TextArea, TreatmentDetail1, TreatmentItem1, TreatmentsCategory7, TreatmentsList6, TreatmentsList7, VideoFull1 };
|
|
14131
|
+
export { About1, About5, About6, Address1, Banner1, Banner2, Banner3, Banner7, BannerFull1, BannerFull2, Booking1, BookingForm6, Breadcrumb1, Button, Carts1, Contact1, CustomerRating1, CustomerRating10, CustomerRating5, CustomerRating6, DateTimePicker, Employees1, Features2, Features3, Footer1, Footer7, Gallery1, Hero1, Hero10, Hero11 as Hero12, Hero13, Hero2, Hero5, Hero6, Input, InputPhoneNumber, Links1, ModalNotification, NavBar1, NavBar7, News1, NewsDetail1, NewsHighlight1, PageTitle1, Partner1, ProductCategory2, ProductDetail10, ProductDetail11, ProductHighlight1, ProductHot1, ProductHot3, ProductImage, ProductItem2, ProductItem3, ProductItem4, ProductItem5, ProductItem6, ProductItem7, ProductList5, ProductList7, ProductSale2, ProductSearch1, Products10, Products11, Products2, Products3, Products9, ProductsTop1, SearchBar2, SearchBar5, SearchBar6, SearchProduct1, SectionTitle1, SectionTitle2, SectionTitle3, Select$1 as Select, ServiceDetail1, ShopHighlights2, ShopHighlights5, ShopHighlights6, ShopHighlights7, TextArea, TreatmentDetail1, TreatmentItem1, TreatmentsCategory7, TreatmentsList6, TreatmentsList7, VideoFull1 };
|
|
13451
14132
|
//# sourceMappingURL=index.modern.js.map
|