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.js
CHANGED
|
@@ -6,10 +6,11 @@ var io5 = require('react-icons/io5');
|
|
|
6
6
|
var fa = require('react-icons/fa');
|
|
7
7
|
var fi = require('react-icons/fi');
|
|
8
8
|
var rx = require('react-icons/rx');
|
|
9
|
+
var pi = require('react-icons/pi');
|
|
10
|
+
var tb = require('react-icons/tb');
|
|
9
11
|
var si = require('react-icons/si');
|
|
10
12
|
var io = require('react-icons/io');
|
|
11
13
|
var fa6 = require('react-icons/fa6');
|
|
12
|
-
require('react-icons/pi');
|
|
13
14
|
require('react-icons/ci');
|
|
14
15
|
var bs = require('react-icons/bs');
|
|
15
16
|
var lu = require('react-icons/lu');
|
|
@@ -20,6 +21,7 @@ require('slick-carousel/slick/slick.css');
|
|
|
20
21
|
require('slick-carousel/slick/slick-theme.css');
|
|
21
22
|
var ai = require('react-icons/ai');
|
|
22
23
|
var go = require('react-icons/go');
|
|
24
|
+
var hi = require('react-icons/hi');
|
|
23
25
|
var ri = require('react-icons/ri');
|
|
24
26
|
var gi = require('react-icons/gi');
|
|
25
27
|
|
|
@@ -111,36 +113,35 @@ var getDurationValue = function getDurationValue(attributes) {
|
|
|
111
113
|
});
|
|
112
114
|
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" : "";
|
|
113
115
|
};
|
|
114
|
-
var
|
|
115
|
-
var
|
|
116
|
-
|
|
117
|
-
slug = (_slug = slug) === null || _slug === void 0 ? void 0 : _slug.replace(/(à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ)/g, "a");
|
|
118
|
-
slug = (_slug2 = slug) === null || _slug2 === void 0 ? void 0 : _slug2.replace(/(è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ)/g, "e");
|
|
119
|
-
slug = (_slug3 = slug) === null || _slug3 === void 0 ? void 0 : _slug3.replace(/(ì|í|ị|ỉ|ĩ)/g, "i");
|
|
120
|
-
slug = (_slug4 = slug) === null || _slug4 === void 0 ? void 0 : _slug4.replace(/(ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ)/g, "o");
|
|
121
|
-
slug = (_slug5 = slug) === null || _slug5 === void 0 ? void 0 : _slug5.replace(/(ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ)/g, "u");
|
|
122
|
-
slug = (_slug6 = slug) === null || _slug6 === void 0 ? void 0 : _slug6.replace(/(ỳ|ý|ỵ|ỷ|ỹ)/g, "y");
|
|
123
|
-
slug = (_slug7 = slug) === null || _slug7 === void 0 ? void 0 : _slug7.replace(/(đ)/g, "d");
|
|
124
|
-
slug = (_slug8 = slug) === null || _slug8 === void 0 ? void 0 : _slug8.replace(/([^0-9a-z-\s])/g, "");
|
|
125
|
-
slug = (_slug9 = slug) === null || _slug9 === void 0 ? void 0 : _slug9.replace(/(\s+)/g, "-");
|
|
126
|
-
slug = (_slug10 = slug) === null || _slug10 === void 0 ? void 0 : _slug10.replace(/^-+/g, "");
|
|
127
|
-
slug = (_slug11 = slug) === null || _slug11 === void 0 ? void 0 : _slug11.replace(/-+$/g, "");
|
|
128
|
-
return slug + "-" + id;
|
|
116
|
+
var genProductSlugVi = function genProductSlugVi(productName, id) {
|
|
117
|
+
var _productName$replace;
|
|
118
|
+
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;
|
|
129
119
|
};
|
|
130
120
|
var getLinkProductDetail = function getLinkProductDetail(product) {
|
|
131
|
-
var slug =
|
|
132
|
-
return "/
|
|
121
|
+
var slug = genProductSlugVi(product === null || product === void 0 ? void 0 : product.productName, product === null || product === void 0 ? void 0 : product.productId);
|
|
122
|
+
return "/san-pham/" + slug;
|
|
133
123
|
};
|
|
134
124
|
var getLinkServiceDetail = function getLinkServiceDetail(product) {
|
|
135
|
-
var slug =
|
|
136
|
-
return "/
|
|
125
|
+
var slug = genProductSlugVi(product === null || product === void 0 ? void 0 : product.productName, product === null || product === void 0 ? void 0 : product.productId);
|
|
126
|
+
return "/dich-vu/" + slug;
|
|
137
127
|
};
|
|
138
128
|
var getLinkNewsDetail = function getLinkNewsDetail(news) {
|
|
139
|
-
var slug =
|
|
140
|
-
|
|
129
|
+
var slug = genProductSlugVi(news === null || news === void 0 ? void 0 : news.title, news === null || news === void 0 ? void 0 : news.articleId);
|
|
130
|
+
var category = genProductSlugVi(news === null || news === void 0 ? void 0 : news.catName, news === null || news === void 0 ? void 0 : news.catId);
|
|
131
|
+
return "/tin-tuc/" + category + "/" + slug;
|
|
141
132
|
};
|
|
142
133
|
var getLinkNewsByCategory = function getLinkNewsByCategory(news) {
|
|
143
|
-
|
|
134
|
+
var slug = genProductSlugVi(news === null || news === void 0 ? void 0 : news.catName, news === null || news === void 0 ? void 0 : news.catId);
|
|
135
|
+
return "/tin-tuc/" + slug;
|
|
136
|
+
};
|
|
137
|
+
var getLinkProductsByCategory = function getLinkProductsByCategory(product) {
|
|
138
|
+
if (product !== null && product !== void 0 && product.categoryName) {
|
|
139
|
+
var slug = genProductSlugVi(product === null || product === void 0 ? void 0 : product.categoryName, product === null || product === void 0 ? void 0 : product.categoryId);
|
|
140
|
+
return "/danh-muc/" + slug;
|
|
141
|
+
} else {
|
|
142
|
+
var _slug12 = genProductSlugVi(product === null || product === void 0 ? void 0 : product.cateName, product === null || product === void 0 ? void 0 : product.categoryId);
|
|
143
|
+
return "/danh-muc/" + _slug12;
|
|
144
|
+
}
|
|
144
145
|
};
|
|
145
146
|
var LinkToPage = function LinkToPage(props) {
|
|
146
147
|
var _props$Link = props.Link,
|
|
@@ -150,12 +151,22 @@ var LinkToPage = function LinkToPage(props) {
|
|
|
150
151
|
};
|
|
151
152
|
var SSHOP_SPA_TOKEN = "sshop-spa-token";
|
|
152
153
|
var genLinkSearch = function genLinkSearch(keyword) {
|
|
153
|
-
return "/
|
|
154
|
+
return "/tim-kiem?tu-khoa=" + keyword;
|
|
154
155
|
};
|
|
155
156
|
var configSvg = function configSvg(data) {
|
|
156
157
|
var _data$replace, _data$replace$replace;
|
|
157
158
|
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="[^"]*"/, '');
|
|
158
159
|
};
|
|
160
|
+
var urlMappings = {
|
|
161
|
+
"/products": "/san-pham",
|
|
162
|
+
"/news": "/tin-tuc",
|
|
163
|
+
"/services": "/dich-vu",
|
|
164
|
+
"/booking": "/dat-lich",
|
|
165
|
+
"/about": "/gioi-thieu"
|
|
166
|
+
};
|
|
167
|
+
function convertURL(path) {
|
|
168
|
+
return urlMappings[path] || path;
|
|
169
|
+
}
|
|
159
170
|
|
|
160
171
|
var Options = function Options(props) {
|
|
161
172
|
var _props$className = props.className,
|
|
@@ -222,6 +233,29 @@ var Options = function Options(props) {
|
|
|
222
233
|
}))) : null);
|
|
223
234
|
};
|
|
224
235
|
|
|
236
|
+
var listIconRoute = {
|
|
237
|
+
home: /*#__PURE__*/React__default.createElement(fi.FiHome, {
|
|
238
|
+
size: 20
|
|
239
|
+
}),
|
|
240
|
+
products: /*#__PURE__*/React__default.createElement(fi.FiBox, {
|
|
241
|
+
size: 20
|
|
242
|
+
}),
|
|
243
|
+
services: /*#__PURE__*/React__default.createElement(fi.FiPhoneCall, {
|
|
244
|
+
size: 20
|
|
245
|
+
}),
|
|
246
|
+
booking: /*#__PURE__*/React__default.createElement(pi.PiHandHeartBold, {
|
|
247
|
+
size: 20
|
|
248
|
+
}),
|
|
249
|
+
news: /*#__PURE__*/React__default.createElement(fa.FaRegNewspaper, {
|
|
250
|
+
size: 20
|
|
251
|
+
}),
|
|
252
|
+
news_by_category: /*#__PURE__*/React__default.createElement(tb.TbCategory, {
|
|
253
|
+
size: 20
|
|
254
|
+
}),
|
|
255
|
+
about: /*#__PURE__*/React__default.createElement(io5.IoInformationCircleOutline, {
|
|
256
|
+
size: 24
|
|
257
|
+
})
|
|
258
|
+
};
|
|
225
259
|
var NavBar7 = function NavBar7(props) {
|
|
226
260
|
var _routes$find, _shopConfigStyle$navB, _shopConfigStyle$navB2, _shopConfigStyle$navB3, _shopConfigStyle$navB4;
|
|
227
261
|
var _useState = React.useState(false),
|
|
@@ -281,7 +315,7 @@ var NavBar7 = function NavBar7(props) {
|
|
|
281
315
|
var cart = function cart() {
|
|
282
316
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
283
317
|
Link: Link,
|
|
284
|
-
href: "/
|
|
318
|
+
href: "/gio-hang"
|
|
285
319
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
286
320
|
className: "relative cursor-pointer"
|
|
287
321
|
}, /*#__PURE__*/React__default.createElement(io5.IoCartOutline, {
|
|
@@ -293,7 +327,12 @@ var NavBar7 = function NavBar7(props) {
|
|
|
293
327
|
};
|
|
294
328
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
295
329
|
className: "w-full sticky top-0 shadow z-50 bg-background"
|
|
296
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
330
|
+
}, /*#__PURE__*/React__default.createElement("h1", {
|
|
331
|
+
style: {
|
|
332
|
+
position: "fixed",
|
|
333
|
+
top: "-100px"
|
|
334
|
+
}
|
|
335
|
+
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.defaultDomain, " | ", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName), /*#__PURE__*/React__default.createElement("div", {
|
|
297
336
|
className: "hidden lg:flex gap-6 justify-between items-center py-2 px-4 xl:px-20"
|
|
298
337
|
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
299
338
|
Link: Link,
|
|
@@ -312,8 +351,8 @@ var NavBar7 = function NavBar7(props) {
|
|
|
312
351
|
})) === null || _shopConfigStyle$navB2 === void 0 ? void 0 : _shopConfigStyle$navB2.map(function (item, index) {
|
|
313
352
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
314
353
|
Link: Link,
|
|
315
|
-
href: item === null || item === void 0 ? void 0 : item.route,
|
|
316
|
-
key: index
|
|
354
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route),
|
|
355
|
+
key: "dhfs" + index
|
|
317
356
|
}, (item === null || item === void 0 ? void 0 : item.name) === (route === null || route === void 0 ? void 0 : route.name) ? /*#__PURE__*/React__default.createElement("div", {
|
|
318
357
|
className: "whitespace-nowrap py-1 border-b text-textHeading border-textHeading"
|
|
319
358
|
}, item === null || item === void 0 ? void 0 : item.label) : /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -324,7 +363,7 @@ var NavBar7 = function NavBar7(props) {
|
|
|
324
363
|
React__default.createElement("div", {
|
|
325
364
|
className: "flex justify-center"
|
|
326
365
|
}, /*#__PURE__*/React__default.createElement(fa.FaUserCircle, {
|
|
327
|
-
className: "text-
|
|
366
|
+
className: "text-primary",
|
|
328
367
|
size: 48
|
|
329
368
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
330
369
|
className: "ml-2"
|
|
@@ -344,7 +383,7 @@ var NavBar7 = function NavBar7(props) {
|
|
|
344
383
|
className: "flex gap-2"
|
|
345
384
|
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
346
385
|
Link: Link,
|
|
347
|
-
href: "/
|
|
386
|
+
href: "/dang-nhap"
|
|
348
387
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
349
388
|
label: "Đăng nhập",
|
|
350
389
|
shopConfigStyle: shopConfigStyle
|
|
@@ -387,42 +426,102 @@ var NavBar7 = function NavBar7(props) {
|
|
|
387
426
|
}
|
|
388
427
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
389
428
|
className: "flex justify-between"
|
|
390
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
391
|
-
className: "flex gap-2 items-center"
|
|
392
429
|
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
393
430
|
Link: Link,
|
|
394
431
|
href: "/",
|
|
395
432
|
onClick: function onClick() {
|
|
396
433
|
return setIsOpen(false);
|
|
397
434
|
}
|
|
435
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
436
|
+
className: "flex gap-2 items-center"
|
|
398
437
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
399
438
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
400
439
|
className: "h-14 w-14 bg-cover bg-no-repeat"
|
|
401
|
-
})
|
|
440
|
+
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
402
441
|
className: "text-xl font-semibold line-clamp-1"
|
|
403
|
-
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("button", {
|
|
442
|
+
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName))), /*#__PURE__*/React__default.createElement("button", {
|
|
404
443
|
className: "text-gray4",
|
|
405
444
|
onClick: function onClick() {
|
|
406
445
|
setIsOpen(false);
|
|
407
446
|
}
|
|
408
447
|
}, /*#__PURE__*/React__default.createElement(rx.RxCross2, {
|
|
409
448
|
size: 24
|
|
410
|
-
}))), /*#__PURE__*/React__default.createElement("div",
|
|
449
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
450
|
+
className: "flex flex-col justify-start"
|
|
451
|
+
}, 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) {
|
|
411
452
|
return e === null || e === void 0 ? void 0 : e.isShow;
|
|
412
453
|
})) === null || _shopConfigStyle$navB4 === void 0 ? void 0 : _shopConfigStyle$navB4.map(function (item, index) {
|
|
413
454
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
414
455
|
Link: Link,
|
|
415
|
-
href: item === null || item === void 0 ? void 0 : item.route,
|
|
416
|
-
key: index,
|
|
456
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route),
|
|
457
|
+
key: "ieytg-" + index,
|
|
417
458
|
onClick: function onClick() {
|
|
418
459
|
return setIsOpen(false);
|
|
419
460
|
}
|
|
420
461
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
421
|
-
className: "py-2 " + ((item === null || item === void 0 ? void 0 : item.name) === (route === null || route === void 0 ? void 0 : route.name) ? "text-textHeading" : "")
|
|
422
|
-
}, item === null || item === void 0 ? void 0 : item.label));
|
|
423
|
-
})
|
|
462
|
+
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" : "")
|
|
463
|
+
}, /*#__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));
|
|
464
|
+
}), /*#__PURE__*/React__default.createElement("hr", {
|
|
465
|
+
className: "border-black"
|
|
466
|
+
}), userInfo ? profileOptions === null || profileOptions === void 0 ? void 0 : profileOptions.map(function (option, index) {
|
|
467
|
+
return option !== null && option !== void 0 && option.href ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
468
|
+
onClick: function onClick() {
|
|
469
|
+
return setIsOpen(false);
|
|
470
|
+
},
|
|
471
|
+
key: "hkfdfh-" + index,
|
|
472
|
+
Link: Link,
|
|
473
|
+
href: option === null || option === void 0 ? void 0 : option.href,
|
|
474
|
+
className: "flex gap-2 px-4 py-2 text-black hover:bg-gray-100 rounded cursor-pointer",
|
|
475
|
+
role: "menuitem"
|
|
476
|
+
}, /*#__PURE__*/React__default.createElement(io5.IoPersonCircleOutline, {
|
|
477
|
+
size: 24
|
|
478
|
+
}), /*#__PURE__*/React__default.createElement("p", null, option === null || option === void 0 ? void 0 : option.label)) : /*#__PURE__*/React__default.createElement("div", {
|
|
479
|
+
key: "hkfdfh-" + index,
|
|
480
|
+
onClick: function onClick() {
|
|
481
|
+
setIsOpen(false);
|
|
482
|
+
logout();
|
|
483
|
+
},
|
|
484
|
+
className: "flex gap-2 px-4 py-2 text-black hover:bg-gray-100 rounded cursor-pointer",
|
|
485
|
+
role: "menuitem"
|
|
486
|
+
}, /*#__PURE__*/React__default.createElement(io5.IoLogOutOutline, {
|
|
487
|
+
size: 24
|
|
488
|
+
}), /*#__PURE__*/React__default.createElement("p", null, option === null || option === void 0 ? void 0 : option.label));
|
|
489
|
+
}) : /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
490
|
+
Link: Link,
|
|
491
|
+
href: "/dang-nhap",
|
|
492
|
+
onClick: function onClick() {
|
|
493
|
+
return setIsOpen(false);
|
|
494
|
+
}
|
|
495
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
496
|
+
className: "py-2 px-4 flex items-center gap-4"
|
|
497
|
+
}, /*#__PURE__*/React__default.createElement(fi.FiLogIn, {
|
|
498
|
+
size: 20
|
|
499
|
+
}), "\u0110\u0103ng nh\u1EADp"))))) : null));
|
|
500
|
+
};
|
|
501
|
+
|
|
502
|
+
var listIconRoute$1 = {
|
|
503
|
+
home: /*#__PURE__*/React__default.createElement(fi.FiHome, {
|
|
504
|
+
size: 20
|
|
505
|
+
}),
|
|
506
|
+
products: /*#__PURE__*/React__default.createElement(fi.FiBox, {
|
|
507
|
+
size: 20
|
|
508
|
+
}),
|
|
509
|
+
services: /*#__PURE__*/React__default.createElement(fi.FiPhoneCall, {
|
|
510
|
+
size: 20
|
|
511
|
+
}),
|
|
512
|
+
booking: /*#__PURE__*/React__default.createElement(pi.PiHandHeartBold, {
|
|
513
|
+
size: 20
|
|
514
|
+
}),
|
|
515
|
+
news: /*#__PURE__*/React__default.createElement(fa.FaRegNewspaper, {
|
|
516
|
+
size: 20
|
|
517
|
+
}),
|
|
518
|
+
news_by_category: /*#__PURE__*/React__default.createElement(tb.TbCategory, {
|
|
519
|
+
size: 20
|
|
520
|
+
}),
|
|
521
|
+
about: /*#__PURE__*/React__default.createElement(io5.IoInformationCircleOutline, {
|
|
522
|
+
size: 24
|
|
523
|
+
})
|
|
424
524
|
};
|
|
425
|
-
|
|
426
525
|
var NavBar1 = function NavBar1(props) {
|
|
427
526
|
var _routes$find, _shopConfigStyle$navB, _shopConfigStyle$navB2, _shopConfigStyle$navB3, _shopConfigStyle$navB4;
|
|
428
527
|
var _useState = React.useState(false),
|
|
@@ -482,7 +581,7 @@ var NavBar1 = function NavBar1(props) {
|
|
|
482
581
|
var cart = function cart() {
|
|
483
582
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
484
583
|
Link: Link,
|
|
485
|
-
href: "/
|
|
584
|
+
href: "/gio-hang"
|
|
486
585
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
487
586
|
className: "relative cursor-pointer"
|
|
488
587
|
}, /*#__PURE__*/React__default.createElement(io5.IoBagOutline, {
|
|
@@ -492,24 +591,32 @@ var NavBar1 = function NavBar1(props) {
|
|
|
492
591
|
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"
|
|
493
592
|
}, totalItem) : null));
|
|
494
593
|
};
|
|
495
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("
|
|
594
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("h1", {
|
|
595
|
+
style: {
|
|
596
|
+
position: "fixed",
|
|
597
|
+
top: "-100px"
|
|
598
|
+
}
|
|
599
|
+
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.defaultDomain, " | ", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName), /*#__PURE__*/React__default.createElement("div", {
|
|
496
600
|
className: "hidden lg:flex justify-end items-center gap-6 px-20 py-2 bg-primary"
|
|
497
601
|
}, shopConfig !== null && shopConfig !== void 0 && shopConfig.shopPhone ? /*#__PURE__*/React__default.createElement("div", {
|
|
498
602
|
className: "font-medium border-r pr-6 text-background"
|
|
499
603
|
}, "Hotline: ", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
500
604
|
className: "flex justify-start items-center gap-2"
|
|
501
605
|
}, /*#__PURE__*/React__default.createElement("a", {
|
|
502
|
-
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#"
|
|
606
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#",
|
|
607
|
+
target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopFacebookPage ? "_blank" : "_self"
|
|
503
608
|
}, /*#__PURE__*/React__default.createElement(fa.FaFacebookF, {
|
|
504
609
|
size: 24,
|
|
505
610
|
className: "p-1 rounded bg-background text-primary"
|
|
506
611
|
})), /*#__PURE__*/React__default.createElement("a", {
|
|
507
|
-
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#"
|
|
612
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#",
|
|
613
|
+
target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopMessenger ? "_blank" : "_self"
|
|
508
614
|
}, /*#__PURE__*/React__default.createElement(fa.FaFacebookMessenger, {
|
|
509
615
|
size: 24,
|
|
510
616
|
className: "p-1 rounded bg-background text-primary"
|
|
511
617
|
})), /*#__PURE__*/React__default.createElement("a", {
|
|
512
|
-
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#"
|
|
618
|
+
href: "https://zalo.me/" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#",
|
|
619
|
+
target: "_blank"
|
|
513
620
|
}, /*#__PURE__*/React__default.createElement(si.SiZalo, {
|
|
514
621
|
size: 24,
|
|
515
622
|
className: "p-1 rounded bg-background text-primary"
|
|
@@ -532,7 +639,7 @@ var NavBar1 = function NavBar1(props) {
|
|
|
532
639
|
})) === null || _shopConfigStyle$navB2 === void 0 ? void 0 : _shopConfigStyle$navB2.map(function (item, index) {
|
|
533
640
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
534
641
|
Link: Link,
|
|
535
|
-
href: item === null || item === void 0 ? void 0 : item.route,
|
|
642
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route),
|
|
536
643
|
key: index
|
|
537
644
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
538
645
|
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") + " "
|
|
@@ -562,7 +669,7 @@ var NavBar1 = function NavBar1(props) {
|
|
|
562
669
|
className: "flex gap-2"
|
|
563
670
|
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
564
671
|
Link: Link,
|
|
565
|
-
href: "/
|
|
672
|
+
href: "/dang-nhap"
|
|
566
673
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
567
674
|
label: "Đăng nhập",
|
|
568
675
|
shopConfigStyle: shopConfigStyle
|
|
@@ -605,40 +712,77 @@ var NavBar1 = function NavBar1(props) {
|
|
|
605
712
|
}
|
|
606
713
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
607
714
|
className: "flex justify-between"
|
|
608
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
609
|
-
className: "flex gap-2 items-center"
|
|
610
715
|
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
611
716
|
Link: Link,
|
|
612
717
|
href: "/",
|
|
613
718
|
onClick: function onClick() {
|
|
614
719
|
return setIsOpen(false);
|
|
615
720
|
}
|
|
721
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
722
|
+
className: "flex gap-2 items-center"
|
|
616
723
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
617
724
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
618
725
|
className: "h-14 w-14 bg-cover bg-no-repeat"
|
|
619
|
-
})
|
|
726
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
620
727
|
className: "text-xl font-semibold line-clamp-1"
|
|
621
|
-
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("button", {
|
|
728
|
+
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName))), /*#__PURE__*/React__default.createElement("button", {
|
|
622
729
|
className: "text-gray4",
|
|
623
730
|
onClick: function onClick() {
|
|
624
731
|
setIsOpen(false);
|
|
625
732
|
}
|
|
626
733
|
}, /*#__PURE__*/React__default.createElement(rx.RxCross2, {
|
|
627
734
|
size: 24
|
|
628
|
-
}))), /*#__PURE__*/React__default.createElement("div",
|
|
735
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
736
|
+
className: "flex flex-col justify-start"
|
|
737
|
+
}, 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) {
|
|
629
738
|
return e === null || e === void 0 ? void 0 : e.isShow;
|
|
630
739
|
})) === null || _shopConfigStyle$navB4 === void 0 ? void 0 : _shopConfigStyle$navB4.map(function (item, index) {
|
|
631
740
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
632
741
|
Link: Link,
|
|
633
|
-
href: item === null || item === void 0 ? void 0 : item.route,
|
|
742
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route),
|
|
634
743
|
key: index,
|
|
635
744
|
onClick: function onClick() {
|
|
636
745
|
return setIsOpen(false);
|
|
637
746
|
}
|
|
638
747
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
639
|
-
className: "py-2 " + ((item === null || item === void 0 ? void 0 : item.name) === (route === null || route === void 0 ? void 0 : route.name) ? "text-textHeading" : "")
|
|
640
|
-
}, item === null || item === void 0 ? void 0 : item.label));
|
|
641
|
-
})
|
|
748
|
+
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" : "")
|
|
749
|
+
}, /*#__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));
|
|
750
|
+
}), /*#__PURE__*/React__default.createElement("hr", {
|
|
751
|
+
className: "border-black"
|
|
752
|
+
}), userInfo ? profileOptions === null || profileOptions === void 0 ? void 0 : profileOptions.map(function (option, index) {
|
|
753
|
+
return option !== null && option !== void 0 && option.href ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
754
|
+
onClick: function onClick() {
|
|
755
|
+
return setIsOpen(false);
|
|
756
|
+
},
|
|
757
|
+
key: "hkfdfh-" + index,
|
|
758
|
+
Link: Link,
|
|
759
|
+
href: option === null || option === void 0 ? void 0 : option.href,
|
|
760
|
+
className: "flex gap-2 px-4 py-2 text-black hover:bg-gray-100 rounded cursor-pointer",
|
|
761
|
+
role: "menuitem"
|
|
762
|
+
}, /*#__PURE__*/React__default.createElement(io5.IoPersonCircleOutline, {
|
|
763
|
+
size: 24
|
|
764
|
+
}), /*#__PURE__*/React__default.createElement("p", null, option === null || option === void 0 ? void 0 : option.label)) : /*#__PURE__*/React__default.createElement("div", {
|
|
765
|
+
key: "hkfdfh-" + index,
|
|
766
|
+
onClick: function onClick() {
|
|
767
|
+
setIsOpen(false);
|
|
768
|
+
logout();
|
|
769
|
+
},
|
|
770
|
+
className: "flex gap-2 px-4 py-2 text-black hover:bg-gray-100 rounded cursor-pointer",
|
|
771
|
+
role: "menuitem"
|
|
772
|
+
}, /*#__PURE__*/React__default.createElement(io5.IoLogOutOutline, {
|
|
773
|
+
size: 24
|
|
774
|
+
}), /*#__PURE__*/React__default.createElement("p", null, option === null || option === void 0 ? void 0 : option.label));
|
|
775
|
+
}) : /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
776
|
+
Link: Link,
|
|
777
|
+
href: "/dang-nhap",
|
|
778
|
+
onClick: function onClick() {
|
|
779
|
+
return setIsOpen(false);
|
|
780
|
+
}
|
|
781
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
782
|
+
className: "py-2 px-4 flex items-center gap-4"
|
|
783
|
+
}, /*#__PURE__*/React__default.createElement(fi.FiLogIn, {
|
|
784
|
+
size: 20
|
|
785
|
+
}), "\u0110\u0103ng nh\u1EADp"))))) : null));
|
|
642
786
|
};
|
|
643
787
|
|
|
644
788
|
var SvgIcon = function SvgIcon(_ref) {
|
|
@@ -666,7 +810,7 @@ var SvgIcon = function SvgIcon(_ref) {
|
|
|
666
810
|
var SectionTitle1 = function SectionTitle1(props) {
|
|
667
811
|
var _props$data = props.data,
|
|
668
812
|
data = _props$data === void 0 ? {} : _props$data;
|
|
669
|
-
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("
|
|
813
|
+
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", {
|
|
670
814
|
className: "text-center text-2xl md:text-4xl font-headingFont font-semibold leading-relaxed text-textHeading"
|
|
671
815
|
}, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement("div", {
|
|
672
816
|
className: "flex items-center justify-center"
|
|
@@ -690,7 +834,7 @@ var SectionTitle2 = function SectionTitle2(props) {
|
|
|
690
834
|
className: "flex gap-4 justify-center items-center"
|
|
691
835
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
692
836
|
className: " w-32 h-0.5 rounded-full bg-stroke"
|
|
693
|
-
}), /*#__PURE__*/React__default.createElement("
|
|
837
|
+
}), /*#__PURE__*/React__default.createElement("h2", {
|
|
694
838
|
className: "text-center whitespace-nowrap text-2xl md:text-4xl font-headingFont font-semibold leading-relaxed text-textHeading"
|
|
695
839
|
}, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement("div", {
|
|
696
840
|
className: " w-32 h-0.5 rounded-full bg-stroke"
|
|
@@ -709,7 +853,7 @@ var SectionTitle2 = function SectionTitle2(props) {
|
|
|
709
853
|
|
|
710
854
|
var SectionTitle3 = function SectionTitle3(props) {
|
|
711
855
|
var data = props.data;
|
|
712
|
-
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("
|
|
856
|
+
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("h2", {
|
|
713
857
|
className: "font-headingFont leading-relaxed text-textHeading text-2xl md:text-4xl font-semibold"
|
|
714
858
|
}, data === null || data === void 0 ? void 0 : data.sectionTitle), data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("p", {
|
|
715
859
|
className: "text-xl font-medium leading-relaxed text-textSecondary mt-4 lg:mt-6"
|
|
@@ -735,6 +879,8 @@ var Input = React.forwardRef(function (props, ref) {
|
|
|
735
879
|
style = _props$style === void 0 ? {} : _props$style,
|
|
736
880
|
_props$onChange = props.onChange,
|
|
737
881
|
onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
|
|
882
|
+
_props$disabled = props.disabled,
|
|
883
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
738
884
|
_props$defaultValue = props.defaultValue,
|
|
739
885
|
defaultValue = _props$defaultValue === void 0 ? "" : _props$defaultValue,
|
|
740
886
|
_props$type = props.type,
|
|
@@ -782,15 +928,15 @@ var Input = React.forwardRef(function (props, ref) {
|
|
|
782
928
|
for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
|
|
783
929
|
var _e$pattern, _e$validate;
|
|
784
930
|
var e = _step.value;
|
|
785
|
-
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' &&
|
|
931
|
+
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && !value) {
|
|
786
932
|
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
787
933
|
count++;
|
|
788
934
|
break;
|
|
789
|
-
} else if (value
|
|
935
|
+
} 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))) {
|
|
790
936
|
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
791
937
|
count++;
|
|
792
938
|
break;
|
|
793
|
-
} else if (value
|
|
939
|
+
} 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))) {
|
|
794
940
|
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
795
941
|
count++;
|
|
796
942
|
break;
|
|
@@ -813,7 +959,7 @@ var Input = React.forwardRef(function (props, ref) {
|
|
|
813
959
|
};
|
|
814
960
|
var changeQuantity = function changeQuantity(quantity) {
|
|
815
961
|
var newValue = parseInt(value) + quantity;
|
|
816
|
-
if (newValue > min && (max === null || newValue <= max)) {
|
|
962
|
+
if (!disabled && newValue > min && (max === null || newValue <= max)) {
|
|
817
963
|
_setValue(newValue);
|
|
818
964
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
819
965
|
}
|
|
@@ -836,7 +982,7 @@ var Input = React.forwardRef(function (props, ref) {
|
|
|
836
982
|
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
837
983
|
className: "mb-1 " + labelClassName
|
|
838
984
|
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
839
|
-
className: "flex gap-2 items-center
|
|
985
|
+
className: "bg-white " + (disabled ? "!bg-gray6" : "") + " flex gap-2 items-center " + _className,
|
|
840
986
|
style: style
|
|
841
987
|
}, isQuantity ? /*#__PURE__*/React__default.createElement("button", {
|
|
842
988
|
onClick: function onClick() {
|
|
@@ -847,6 +993,7 @@ var Input = React.forwardRef(function (props, ref) {
|
|
|
847
993
|
name: name,
|
|
848
994
|
value: value,
|
|
849
995
|
placeholder: placeholder,
|
|
996
|
+
disabled: disabled,
|
|
850
997
|
onChange: handleOnChange,
|
|
851
998
|
required: required,
|
|
852
999
|
className: _inputClassName,
|
|
@@ -880,7 +1027,7 @@ var Hero1 = function Hero1(props) {
|
|
|
880
1027
|
style: {
|
|
881
1028
|
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]) + ")"
|
|
882
1029
|
},
|
|
883
|
-
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"
|
|
1030
|
+
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"
|
|
884
1031
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
885
1032
|
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]"
|
|
886
1033
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -892,7 +1039,7 @@ var Hero1 = function Hero1(props) {
|
|
|
892
1039
|
className: "text-center md:text-2xl lg:text-3xl font-medium"
|
|
893
1040
|
}, 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, {
|
|
894
1041
|
Link: Link,
|
|
895
|
-
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) || "#"
|
|
1042
|
+
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) || "#"
|
|
896
1043
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
897
1044
|
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,
|
|
898
1045
|
shopConfigStyle: shopConfigStyle
|
|
@@ -919,45 +1066,48 @@ var Hero1 = function Hero1(props) {
|
|
|
919
1066
|
};
|
|
920
1067
|
|
|
921
1068
|
var Hero2 = function Hero2(props) {
|
|
922
|
-
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$;
|
|
1069
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$, _data$data4, _data$data4$;
|
|
923
1070
|
var shopConfig = props.shopConfig,
|
|
924
1071
|
data = props.data;
|
|
925
1072
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
926
1073
|
className: "relative"
|
|
927
1074
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
928
1075
|
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],
|
|
1076
|
+
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,
|
|
929
1077
|
className: "w-full object-cover min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
|
|
930
1078
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
931
1079
|
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%]"
|
|
932
1080
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
933
1081
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
1082
|
+
alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName,
|
|
934
1083
|
className: "h-6 w-6 md:h-16 md:w-16 lg:h-20 lg:w-20"
|
|
935
1084
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
936
1085
|
className: "text-lg md:text-3xl lg:text-4xl font-medium"
|
|
937
|
-
}, data === null || data === void 0 ? void 0 : (_data$
|
|
1086
|
+
}, 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", {
|
|
938
1087
|
className: "text-sm md:text-xl lg:text-2xl "
|
|
939
|
-
}, data === null || data === void 0 ? void 0 : (_data$
|
|
1088
|
+
}, 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)));
|
|
940
1089
|
};
|
|
941
1090
|
|
|
942
1091
|
var Hero5 = function Hero5(props) {
|
|
943
|
-
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$;
|
|
1092
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$, _data$data4, _data$data4$;
|
|
944
1093
|
var data = props.data;
|
|
945
1094
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
946
1095
|
className: "relative"
|
|
947
1096
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
948
1097
|
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],
|
|
949
|
-
|
|
1098
|
+
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,
|
|
1099
|
+
className: "w-full min-h-[30vh] md:min-h-[50vh] max-h-[100vh] object-cover"
|
|
950
1100
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
951
1101
|
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"
|
|
952
1102
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
953
1103
|
className: "text-xl md:text-3xl lg:text-4xl text-textHeading font-medium"
|
|
954
|
-
}, data === null || data === void 0 ? void 0 : (_data$
|
|
1104
|
+
}, 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", {
|
|
955
1105
|
className: "md:text-xl lg:text-2xl text-primary line-clamp-3 md:line-clamp-none"
|
|
956
|
-
}, data === null || data === void 0 ? void 0 : (_data$
|
|
1106
|
+
}, 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)));
|
|
957
1107
|
};
|
|
958
1108
|
|
|
959
1109
|
var Hero6 = function Hero6(props) {
|
|
960
|
-
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$, _sectionData$, _sectionData$$buttons;
|
|
1110
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$, _data$data4, _data$data4$, _sectionData$, _sectionData$$buttons;
|
|
961
1111
|
var shopConfigStyle = props.shopConfigStyle,
|
|
962
1112
|
data = props.data,
|
|
963
1113
|
_props$Link = props.Link,
|
|
@@ -967,17 +1117,18 @@ var Hero6 = function Hero6(props) {
|
|
|
967
1117
|
className: "relative"
|
|
968
1118
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
969
1119
|
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],
|
|
970
|
-
|
|
1120
|
+
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,
|
|
1121
|
+
className: "object-cover w-full h-auto min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
|
|
971
1122
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
972
1123
|
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"
|
|
973
1124
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
974
1125
|
className: "text-primary text-xl md:text-3xl lg:text-5xl leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
975
|
-
}, data === null || data === void 0 ? void 0 : (_data$
|
|
1126
|
+
}, 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", {
|
|
976
1127
|
className: "md:text-xl"
|
|
977
|
-
}, data === null || data === void 0 ? void 0 : (_data$
|
|
1128
|
+
}, 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) {
|
|
978
1129
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
979
1130
|
Link: Link,
|
|
980
|
-
href: (button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
1131
|
+
href: convertURL(button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
981
1132
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
982
1133
|
label: button === null || button === void 0 ? void 0 : button.label,
|
|
983
1134
|
shopConfigStyle: shopConfigStyle
|
|
@@ -1007,7 +1158,7 @@ var Hero10 = function Hero10(props) {
|
|
|
1007
1158
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
1008
1159
|
Link: Link,
|
|
1009
1160
|
key: "gdf-" + index,
|
|
1010
|
-
href: (button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
1161
|
+
href: convertURL(button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
1011
1162
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
1012
1163
|
label: button === null || button === void 0 ? void 0 : button.label,
|
|
1013
1164
|
shopConfigStyle: shopConfigStyle
|
|
@@ -7302,7 +7453,7 @@ var CategoryController = function CategoryController(props) {
|
|
|
7302
7453
|
};
|
|
7303
7454
|
|
|
7304
7455
|
var Hero13 = function Hero13(props) {
|
|
7305
|
-
var _sectionData$, _sectionData$$srcImag
|
|
7456
|
+
var _sectionData$, _sectionData$$srcImag, _data$data, _data$data$;
|
|
7306
7457
|
var listRef = React.useRef(null);
|
|
7307
7458
|
var _useState = React.useState(false);
|
|
7308
7459
|
var data = props.data;
|
|
@@ -7310,7 +7461,8 @@ var Hero13 = function Hero13(props) {
|
|
|
7310
7461
|
var _CategoryController = CategoryController(props);
|
|
7311
7462
|
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("img", {
|
|
7312
7463
|
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],
|
|
7313
|
-
|
|
7464
|
+
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,
|
|
7465
|
+
className: "w-full object-cover"
|
|
7314
7466
|
}));
|
|
7315
7467
|
};
|
|
7316
7468
|
|
|
@@ -7373,7 +7525,7 @@ var Features3 = function Features3(props) {
|
|
|
7373
7525
|
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
7374
7526
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7375
7527
|
Link: Link,
|
|
7376
|
-
href: (item === null || item === void 0 ? void 0 : item.link) || (item === null || item === void 0 ? void 0 : item.route) || "#"
|
|
7528
|
+
href: (item === null || item === void 0 ? void 0 : item.link) || convertURL(item === null || item === void 0 ? void 0 : item.route) || "#"
|
|
7377
7529
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7378
7530
|
className: "grid grid-cols-2 p-3 rounded-lg font-semibold",
|
|
7379
7531
|
key: "dfsdfj-" + index,
|
|
@@ -7618,13 +7770,16 @@ function SvgImageGallery(props) {
|
|
|
7618
7770
|
}
|
|
7619
7771
|
|
|
7620
7772
|
var DefaultImage = function DefaultImage(props) {
|
|
7621
|
-
var _props$
|
|
7773
|
+
var _props$size = props.size,
|
|
7774
|
+
size = _props$size === void 0 ? 0 : _props$size,
|
|
7775
|
+
_props$className = props.className,
|
|
7622
7776
|
className = _props$className === void 0 ? "" : _props$className;
|
|
7623
7777
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7624
|
-
className: "flex justify-center items-center w-full aspect-square " + className,
|
|
7625
|
-
style: {
|
|
7626
|
-
|
|
7627
|
-
|
|
7778
|
+
className: "flex justify-center items-center w-full aspect-square " + className + " bg-[#FAFAFA]",
|
|
7779
|
+
style: size ? {
|
|
7780
|
+
width: size,
|
|
7781
|
+
height: size
|
|
7782
|
+
} : null
|
|
7628
7783
|
}, /*#__PURE__*/React__default.createElement(SvgImageGallery, {
|
|
7629
7784
|
width: "25%",
|
|
7630
7785
|
height: "25%",
|
|
@@ -7645,12 +7800,20 @@ var ProductImage = function ProductImage(props) {
|
|
|
7645
7800
|
}, [product]);
|
|
7646
7801
|
var getProductImage = function getProductImage() {
|
|
7647
7802
|
var _JSON$parse, _JSON$parse$;
|
|
7648
|
-
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$.
|
|
7649
|
-
|
|
7803
|
+
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;
|
|
7804
|
+
if (src !== null && src !== void 0 && src.startsWith("http")) {
|
|
7805
|
+
setSrc(src);
|
|
7806
|
+
} else if (src) {
|
|
7807
|
+
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;
|
|
7808
|
+
setSrc(urlImage);
|
|
7809
|
+
} else {
|
|
7810
|
+
setSrc(src);
|
|
7811
|
+
}
|
|
7650
7812
|
};
|
|
7651
7813
|
return src ? /*#__PURE__*/React__default.createElement("img", {
|
|
7652
7814
|
src: src,
|
|
7653
|
-
|
|
7815
|
+
alt: product === null || product === void 0 ? void 0 : product.productName,
|
|
7816
|
+
className: "w-full aspect-square object-cover " + className,
|
|
7654
7817
|
style: size ? {
|
|
7655
7818
|
width: size,
|
|
7656
7819
|
height: size
|
|
@@ -7678,6 +7841,7 @@ var getYoutubeVideoIdByUrl = function getYoutubeVideoIdByUrl(url) {
|
|
|
7678
7841
|
var match = url === null || url === void 0 ? void 0 : url.match(regex);
|
|
7679
7842
|
return match ? match[1] : null;
|
|
7680
7843
|
};
|
|
7844
|
+
var linkPagePolicy = "https://sites.google.com/view/sodofin-landing-page-policy";
|
|
7681
7845
|
|
|
7682
7846
|
function getMinMax(array, field) {
|
|
7683
7847
|
if (!(array !== null && array !== void 0 && array.length) || !array[0].hasOwnProperty(field)) {
|
|
@@ -8093,6 +8257,8 @@ var Select = React.forwardRef(function (props, ref) {
|
|
|
8093
8257
|
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
8094
8258
|
_props$selectClassNam = props.selectClassName,
|
|
8095
8259
|
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
8260
|
+
_props$disabled = props.disabled,
|
|
8261
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
8096
8262
|
_props$rules = props.rules,
|
|
8097
8263
|
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
8098
8264
|
options = props.options,
|
|
@@ -8272,10 +8438,11 @@ var Select = React.forwardRef(function (props, ref) {
|
|
|
8272
8438
|
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
8273
8439
|
className: "mb-1 " + labelClassName
|
|
8274
8440
|
}, label, " ", labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
8275
|
-
className: "flex flex-col gap-2 rounded-lg w-full bg-white border " + className
|
|
8441
|
+
className: "flex flex-col gap-2 rounded-lg w-full bg-white " + (disabled ? "!bg-gray6" : "") + " border " + className
|
|
8276
8442
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
8277
|
-
className: "w-full h-10 bg-transparent flex justify-between items-center px-3 py-2 " + selectClassName,
|
|
8278
|
-
onClick: handleToggleSelect
|
|
8443
|
+
className: " w-full h-10 bg-transparent flex justify-between items-center px-3 py-2 " + selectClassName,
|
|
8444
|
+
onClick: handleToggleSelect,
|
|
8445
|
+
disabled: disabled
|
|
8279
8446
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8280
8447
|
className: "flex justify-between items-center w-full"
|
|
8281
8448
|
}, isEmpty(value) || isMulti ? /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -8343,6 +8510,8 @@ var DateTimePicker = React.forwardRef(function (props, ref) {
|
|
|
8343
8510
|
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8344
8511
|
_props$defaultValue = props.defaultValue,
|
|
8345
8512
|
defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
|
|
8513
|
+
_props$time = props.time,
|
|
8514
|
+
time = _props$time === void 0 ? false : _props$time,
|
|
8346
8515
|
rules = props.rules;
|
|
8347
8516
|
var _useState = React.useState(defaultValue),
|
|
8348
8517
|
value = _useState[0],
|
|
@@ -8380,7 +8549,7 @@ var DateTimePicker = React.forwardRef(function (props, ref) {
|
|
|
8380
8549
|
var _validateData = function _validateData() {
|
|
8381
8550
|
var count = 0;
|
|
8382
8551
|
rules === null || rules === void 0 ? void 0 : rules.forEach(function (e) {
|
|
8383
|
-
var _e$pattern;
|
|
8552
|
+
var _e$pattern, _e$validate;
|
|
8384
8553
|
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
|
|
8385
8554
|
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8386
8555
|
count++;
|
|
@@ -8389,6 +8558,10 @@ var DateTimePicker = React.forwardRef(function (props, ref) {
|
|
|
8389
8558
|
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8390
8559
|
count++;
|
|
8391
8560
|
return false;
|
|
8561
|
+
} 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))) {
|
|
8562
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8563
|
+
count++;
|
|
8564
|
+
return false;
|
|
8392
8565
|
}
|
|
8393
8566
|
});
|
|
8394
8567
|
if (count) {
|
|
@@ -8412,13 +8585,17 @@ var DateTimePicker = React.forwardRef(function (props, ref) {
|
|
|
8412
8585
|
selected: value,
|
|
8413
8586
|
onChange: function onChange(date) {
|
|
8414
8587
|
_setValue(date);
|
|
8415
|
-
console.log("check date: ", date);
|
|
8416
8588
|
},
|
|
8417
8589
|
customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
|
|
8418
8590
|
className: _className
|
|
8419
8591
|
}),
|
|
8592
|
+
dateFormat: time ? "dd/MM/yyyy HH:mm" : "dd/MM/yyyy",
|
|
8593
|
+
showTimeSelect: time,
|
|
8594
|
+
timeIntervals: 15,
|
|
8420
8595
|
wrapperClassName: "w-full"
|
|
8421
|
-
}), error ? /*#__PURE__*/React__default.createElement("div",
|
|
8596
|
+
}), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
8597
|
+
className: "text-danger"
|
|
8598
|
+
}, error) : null);
|
|
8422
8599
|
});
|
|
8423
8600
|
|
|
8424
8601
|
var InputPhoneNumber = React.forwardRef(function (props, ref) {
|
|
@@ -8432,6 +8609,8 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
|
|
|
8432
8609
|
name = _props$name === void 0 ? "" : _props$name,
|
|
8433
8610
|
_props$onChange = props.onChange,
|
|
8434
8611
|
onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
|
|
8612
|
+
_props$disabled = props.disabled,
|
|
8613
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
8435
8614
|
_props$defaultValue = props.defaultValue,
|
|
8436
8615
|
defaultValue = _props$defaultValue === void 0 ? "" : _props$defaultValue,
|
|
8437
8616
|
_props$type = props.type,
|
|
@@ -8497,11 +8676,11 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
|
|
|
8497
8676
|
for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
|
|
8498
8677
|
var _e$pattern;
|
|
8499
8678
|
var e = _step.value;
|
|
8500
|
-
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value
|
|
8679
|
+
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && !value) {
|
|
8501
8680
|
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8502
8681
|
count++;
|
|
8503
8682
|
break;
|
|
8504
|
-
} else if (value
|
|
8683
|
+
} 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))) {
|
|
8505
8684
|
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8506
8685
|
count++;
|
|
8507
8686
|
break;
|
|
@@ -8533,6 +8712,7 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
|
|
|
8533
8712
|
className: 'w-max border-0 !rounded-none !rounded-l-lg',
|
|
8534
8713
|
defaultValue: countryCode,
|
|
8535
8714
|
options: options,
|
|
8715
|
+
disabled: disabled,
|
|
8536
8716
|
optionClassName: "w-max",
|
|
8537
8717
|
placeholder: "+84",
|
|
8538
8718
|
onClick: setCountryCode,
|
|
@@ -8554,11 +8734,12 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
|
|
|
8554
8734
|
})), /*#__PURE__*/React__default.createElement("input", {
|
|
8555
8735
|
type: type,
|
|
8556
8736
|
name: name,
|
|
8737
|
+
disabled: disabled,
|
|
8557
8738
|
value: value,
|
|
8558
8739
|
placeholder: placeholder,
|
|
8559
8740
|
onChange: handleOnChange,
|
|
8560
8741
|
required: required,
|
|
8561
|
-
className: "bg-white rounded-r-lg " + _inputClassName
|
|
8742
|
+
className: "bg-white " + (disabled ? "!bg-gray6" : "") + " rounded-r-lg " + _inputClassName
|
|
8562
8743
|
})), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
8563
8744
|
className: "text-danger"
|
|
8564
8745
|
}, error) : null);
|
|
@@ -8843,19 +9024,24 @@ var BookingForm = function BookingForm(props) {
|
|
|
8843
9024
|
});
|
|
8844
9025
|
});
|
|
8845
9026
|
};
|
|
9027
|
+
var checkDateBooking = function checkDateBooking() {
|
|
9028
|
+
var _inputDateRef$current;
|
|
9029
|
+
var scheduleDate = inputDateRef === null || inputDateRef === void 0 ? void 0 : (_inputDateRef$current = inputDateRef.current) === null || _inputDateRef$current === void 0 ? void 0 : _inputDateRef$current.getValue();
|
|
9030
|
+
return scheduleDate && scheduleDate >= Date.now();
|
|
9031
|
+
};
|
|
8846
9032
|
var handleSubmit = function handleSubmit() {
|
|
8847
9033
|
try {
|
|
8848
|
-
var _inputNameRef$current, _inputPhoneNumberRef$, _inputDateRef$
|
|
9034
|
+
var _inputNameRef$current, _inputPhoneNumberRef$, _inputDateRef$current2, _inputSelectedRef$cur;
|
|
8849
9035
|
var validateName = inputNameRef === null || inputNameRef === void 0 ? void 0 : (_inputNameRef$current = inputNameRef.current) === null || _inputNameRef$current === void 0 ? void 0 : _inputNameRef$current.validateData();
|
|
8850
9036
|
var validatePhoneNumber = inputPhoneNumberRef === null || inputPhoneNumberRef === void 0 ? void 0 : (_inputPhoneNumberRef$ = inputPhoneNumberRef.current) === null || _inputPhoneNumberRef$ === void 0 ? void 0 : _inputPhoneNumberRef$.validateData();
|
|
8851
|
-
var validateDate = inputDateRef === null || inputDateRef === void 0 ? void 0 : (_inputDateRef$
|
|
9037
|
+
var validateDate = inputDateRef === null || inputDateRef === void 0 ? void 0 : (_inputDateRef$current2 = inputDateRef.current) === null || _inputDateRef$current2 === void 0 ? void 0 : _inputDateRef$current2.validateData();
|
|
8852
9038
|
var validateService = inputSelectedRef === null || inputSelectedRef === void 0 ? void 0 : (_inputSelectedRef$cur = inputSelectedRef.current) === null || _inputSelectedRef$cur === void 0 ? void 0 : _inputSelectedRef$cur.validateData();
|
|
8853
9039
|
var _temp = function () {
|
|
8854
9040
|
if (validateName && validatePhoneNumber && validateDate && validateService) {
|
|
8855
|
-
var _inputPhoneNumberRef$2, _inputNameRef$current2, _inputDateRef$
|
|
9041
|
+
var _inputPhoneNumberRef$2, _inputNameRef$current2, _inputDateRef$current3;
|
|
8856
9042
|
var customerPhone = inputPhoneNumberRef === null || inputPhoneNumberRef === void 0 ? void 0 : (_inputPhoneNumberRef$2 = inputPhoneNumberRef.current) === null || _inputPhoneNumberRef$2 === void 0 ? void 0 : _inputPhoneNumberRef$2.getValue();
|
|
8857
9043
|
var customerName = inputNameRef === null || inputNameRef === void 0 ? void 0 : (_inputNameRef$current2 = inputNameRef.current) === null || _inputNameRef$current2 === void 0 ? void 0 : _inputNameRef$current2.getValue();
|
|
8858
|
-
var scheduleDate = inputDateRef === null || inputDateRef === void 0 ? void 0 : (_inputDateRef$
|
|
9044
|
+
var scheduleDate = inputDateRef === null || inputDateRef === void 0 ? void 0 : (_inputDateRef$current3 = inputDateRef.current) === null || _inputDateRef$current3 === void 0 ? void 0 : _inputDateRef$current3.getValue();
|
|
8859
9045
|
var services = listProductSelected === null || listProductSelected === void 0 ? void 0 : listProductSelected.map(function (item) {
|
|
8860
9046
|
var _item$technical;
|
|
8861
9047
|
return {
|
|
@@ -8949,9 +9135,14 @@ var BookingForm = function BookingForm(props) {
|
|
|
8949
9135
|
label: "Thời gian",
|
|
8950
9136
|
className: "w-full rounded-lg",
|
|
8951
9137
|
placeholder: "Chọn thời gian",
|
|
9138
|
+
time: true,
|
|
8952
9139
|
rules: [{
|
|
8953
9140
|
type: "required",
|
|
8954
9141
|
message: "Bắt buộc chọn ngày đặt"
|
|
9142
|
+
}, {
|
|
9143
|
+
type: "validate",
|
|
9144
|
+
message: "Thời gian không hợp lệ",
|
|
9145
|
+
validate: checkDateBooking
|
|
8955
9146
|
}]
|
|
8956
9147
|
})), (listProductSelected === null || listProductSelected === void 0 ? void 0 : listProductSelected.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
8957
9148
|
className: "grid grid-cols-1"
|
|
@@ -9337,10 +9528,10 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
|
|
|
9337
9528
|
className: "flex flex-col gap-4 col-span-2"
|
|
9338
9529
|
}, displayImage ? /*#__PURE__*/React__default.createElement("img", {
|
|
9339
9530
|
src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
|
|
9340
|
-
className: "w-full aspect-square rounded-2xl"
|
|
9531
|
+
className: "w-full aspect-square object-cover rounded-2xl"
|
|
9341
9532
|
}) : /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
9342
9533
|
product: product,
|
|
9343
|
-
className: "w-full aspect-square rounded-2xl"
|
|
9534
|
+
className: "w-full aspect-square object-contain rounded-2xl"
|
|
9344
9535
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9345
9536
|
className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
|
|
9346
9537
|
}, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
|
|
@@ -9417,7 +9608,7 @@ var ProductItem2 = function ProductItem2(props) {
|
|
|
9417
9608
|
className: "text-center relative group " + className
|
|
9418
9609
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
9419
9610
|
product: product,
|
|
9420
|
-
className: "max-w-[240px] rounded-full mx-auto"
|
|
9611
|
+
className: "max-w-[240px] rounded-full mx-auto !object-cover"
|
|
9421
9612
|
}), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
9422
9613
|
product: product,
|
|
9423
9614
|
className: "text-lg mt-4"
|
|
@@ -9642,7 +9833,7 @@ var ProductList7 = function ProductList7(props) {
|
|
|
9642
9833
|
product: product === null || product === void 0 ? void 0 : product.productInfo
|
|
9643
9834
|
});
|
|
9644
9835
|
})), (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
9645
|
-
href: "/
|
|
9836
|
+
href: "/san-pham",
|
|
9646
9837
|
Link: Link
|
|
9647
9838
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
9648
9839
|
label: "Xem tất cả",
|
|
@@ -9653,68 +9844,6 @@ var ProductList7 = function ProductList7(props) {
|
|
|
9653
9844
|
}));
|
|
9654
9845
|
};
|
|
9655
9846
|
|
|
9656
|
-
var Carousel = function Carousel(props) {
|
|
9657
|
-
var carouselRef = React.useRef(null);
|
|
9658
|
-
var _useState = React.useState(false),
|
|
9659
|
-
isScrolledToLeft = _useState[0],
|
|
9660
|
-
setIsScrolledToLeft = _useState[1];
|
|
9661
|
-
var _useState2 = React.useState(0);
|
|
9662
|
-
var _props$data = props.data,
|
|
9663
|
-
data = _props$data === void 0 ? [] : _props$data,
|
|
9664
|
-
_props$className = props.className,
|
|
9665
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
9666
|
-
_props$style = props.style,
|
|
9667
|
-
style = _props$style === void 0 ? {} : _props$style,
|
|
9668
|
-
_props$primaryColor = props.primaryColor,
|
|
9669
|
-
primaryColor = _props$primaryColor === void 0 ? "" : _props$primaryColor,
|
|
9670
|
-
_props$renderItem = props.renderItem,
|
|
9671
|
-
renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
|
|
9672
|
-
var handleClickPrevImg = function handleClickPrevImg() {
|
|
9673
|
-
if (carouselRef !== null && carouselRef !== void 0 && carouselRef.current) {
|
|
9674
|
-
setIsScrolledToLeft(true);
|
|
9675
|
-
carouselRef.current.scrollBy({
|
|
9676
|
-
left: -carouselRef.current.offsetWidth / 4,
|
|
9677
|
-
behavior: "smooth"
|
|
9678
|
-
});
|
|
9679
|
-
}
|
|
9680
|
-
};
|
|
9681
|
-
var handleClickNextImg = function handleClickNextImg() {
|
|
9682
|
-
setIsScrolledToLeft(false);
|
|
9683
|
-
if (carouselRef !== null && carouselRef !== void 0 && carouselRef.current) {
|
|
9684
|
-
var _carouselRef$current, _carouselRef$current2;
|
|
9685
|
-
carouselRef === null || carouselRef === void 0 ? void 0 : (_carouselRef$current = carouselRef.current) === null || _carouselRef$current === void 0 ? void 0 : _carouselRef$current.scrollBy({
|
|
9686
|
-
left: (carouselRef === null || carouselRef === void 0 ? void 0 : (_carouselRef$current2 = carouselRef.current) === null || _carouselRef$current2 === void 0 ? void 0 : _carouselRef$current2.offsetWidth) / 4,
|
|
9687
|
-
behavior: "smooth"
|
|
9688
|
-
});
|
|
9689
|
-
}
|
|
9690
|
-
};
|
|
9691
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
9692
|
-
className: "relative " + className + " ",
|
|
9693
|
-
style: style
|
|
9694
|
-
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9695
|
-
className: " w-full pe-2 h-full flex gap-2 md:gap-4 xl:gap-6 overflow-x-auto no-scrollbar",
|
|
9696
|
-
ref: carouselRef
|
|
9697
|
-
}, data && (data === null || data === void 0 ? void 0 : data.length) > 0 ? data === null || data === void 0 ? void 0 : data.map(function (item, index) {
|
|
9698
|
-
return renderItem(item, index);
|
|
9699
|
-
}) : null)), data && (data === null || data === void 0 ? void 0 : data.length) > 4 ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("button", {
|
|
9700
|
-
className: " hidden lg:block bg-gray3 p-3 rounded-full absolute top-[45%] left-[-8px] lg:left-[-2%]",
|
|
9701
|
-
style: {
|
|
9702
|
-
backgroundColor: isScrolledToLeft ? primaryColor : "#BDBDBD"
|
|
9703
|
-
},
|
|
9704
|
-
onClick: handleClickPrevImg
|
|
9705
|
-
}, /*#__PURE__*/React__default.createElement(fa.FaArrowLeft, {
|
|
9706
|
-
className: "text-sm lg:text-lg text-white"
|
|
9707
|
-
})), /*#__PURE__*/React__default.createElement("button", {
|
|
9708
|
-
className: " hidden lg:block p-3 rounded-full absolute top-[45%] right-[-2%] ",
|
|
9709
|
-
style: {
|
|
9710
|
-
backgroundColor: !isScrolledToLeft ? primaryColor : "#BDBDBD"
|
|
9711
|
-
},
|
|
9712
|
-
onClick: handleClickNextImg
|
|
9713
|
-
}, /*#__PURE__*/React__default.createElement(fa.FaArrowRight, {
|
|
9714
|
-
className: "text-sm lg:text-lg text-white"
|
|
9715
|
-
}))) : null);
|
|
9716
|
-
};
|
|
9717
|
-
|
|
9718
9847
|
var Products2 = function Products2(props) {
|
|
9719
9848
|
var shopConfigStyle = props.shopConfigStyle,
|
|
9720
9849
|
data = props.data,
|
|
@@ -9723,8 +9852,6 @@ var Products2 = function Products2(props) {
|
|
|
9723
9852
|
_props$Link = props.Link,
|
|
9724
9853
|
Link = _props$Link === void 0 ? null : _props$Link;
|
|
9725
9854
|
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
9726
|
-
_shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
|
|
9727
|
-
primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
|
|
9728
9855
|
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
9729
9856
|
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
9730
9857
|
_shopConfigStyle$colo4 = _shopConfigStyle$colo.textBody,
|
|
@@ -9735,8 +9862,53 @@ var Products2 = function Products2(props) {
|
|
|
9735
9862
|
textButton = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
|
|
9736
9863
|
var _ProductController = ProductController(props),
|
|
9737
9864
|
_ProductController$pr = _ProductController.products,
|
|
9738
|
-
products = _ProductController$pr === void 0 ? [] : _ProductController$pr
|
|
9865
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
9866
|
+
_ProductController$lo = _ProductController.loading,
|
|
9867
|
+
loading = _ProductController$lo === void 0 ? true : _ProductController$lo;
|
|
9868
|
+
var sliderRef = React.useRef(null);
|
|
9739
9869
|
console.log("Products2 products");
|
|
9870
|
+
var settings = {
|
|
9871
|
+
infinite: false,
|
|
9872
|
+
slidesToShow: 4,
|
|
9873
|
+
slidesToScroll: 1,
|
|
9874
|
+
speed: 500,
|
|
9875
|
+
autoplay: false,
|
|
9876
|
+
autoplaySpeed: 4000,
|
|
9877
|
+
pauseOnHover: true,
|
|
9878
|
+
dots: false,
|
|
9879
|
+
swipe: true,
|
|
9880
|
+
touchMove: true,
|
|
9881
|
+
arrows: false,
|
|
9882
|
+
responsive: [{
|
|
9883
|
+
breakpoint: 1024,
|
|
9884
|
+
settings: {
|
|
9885
|
+
slidesToShow: 4,
|
|
9886
|
+
slidesToScroll: 4
|
|
9887
|
+
}
|
|
9888
|
+
}, {
|
|
9889
|
+
breakpoint: 1023,
|
|
9890
|
+
settings: {
|
|
9891
|
+
slidesToShow: 3,
|
|
9892
|
+
slidesToScroll: 3
|
|
9893
|
+
}
|
|
9894
|
+
}, {
|
|
9895
|
+
breakpoint: 635,
|
|
9896
|
+
settings: {
|
|
9897
|
+
slidesToShow: 2,
|
|
9898
|
+
slidesToScroll: 2
|
|
9899
|
+
}
|
|
9900
|
+
}]
|
|
9901
|
+
};
|
|
9902
|
+
var goToNext = function goToNext() {
|
|
9903
|
+
if (sliderRef.current) {
|
|
9904
|
+
sliderRef.current.slickNext();
|
|
9905
|
+
}
|
|
9906
|
+
};
|
|
9907
|
+
var goToPrev = function goToPrev() {
|
|
9908
|
+
if (sliderRef.current) {
|
|
9909
|
+
sliderRef.current.slickPrev();
|
|
9910
|
+
}
|
|
9911
|
+
};
|
|
9740
9912
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9741
9913
|
className: "pt-10 px-4 xl:px-20",
|
|
9742
9914
|
style: {
|
|
@@ -9744,29 +9916,43 @@ var Products2 = function Products2(props) {
|
|
|
9744
9916
|
color: textBody
|
|
9745
9917
|
}
|
|
9746
9918
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9747
|
-
className: "rounded-3xl w-full py-10 md:px-10 sm:px-6 px-4",
|
|
9919
|
+
className: "relative rounded-3xl w-full py-10 md:px-10 sm:px-6 px-4",
|
|
9748
9920
|
style: {
|
|
9749
9921
|
background: secondary
|
|
9750
9922
|
}
|
|
9751
9923
|
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
9752
|
-
className: "font-semibold text-2xl md:text-
|
|
9924
|
+
className: "font-semibold text-2xl md:text-4xl lg:text-4xl ps-5 pb-4",
|
|
9753
9925
|
style: {
|
|
9754
9926
|
color: textButton
|
|
9755
9927
|
}
|
|
9756
|
-
}, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement(
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
|
|
9769
|
-
|
|
9928
|
+
}, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement("div", null, loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
9929
|
+
className: "flex justify-center mt-20 w-full min-h-32"
|
|
9930
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9931
|
+
className: "mx-auto"
|
|
9932
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null))) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(Slider, _extends({
|
|
9933
|
+
ref: sliderRef
|
|
9934
|
+
}, settings), products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
9935
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9936
|
+
className: "px-2 lg:px-3",
|
|
9937
|
+
key: "dfg-" + index
|
|
9938
|
+
}, /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
9939
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
9940
|
+
Link: Link,
|
|
9941
|
+
shopConfigStyle: shopConfigStyle
|
|
9942
|
+
}));
|
|
9943
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
9944
|
+
className: "absolute left-0 top-1/2 w-full flex justify-between px-2 md:px-4 lg:px-6"
|
|
9945
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
9946
|
+
onClick: goToPrev,
|
|
9947
|
+
className: "bg-primary p-2 rounded-full"
|
|
9948
|
+
}, /*#__PURE__*/React__default.createElement(fa.FaArrowLeft, {
|
|
9949
|
+
className: "text-white text-lg md:text-2xl"
|
|
9950
|
+
}), " "), /*#__PURE__*/React__default.createElement("button", {
|
|
9951
|
+
onClick: goToNext,
|
|
9952
|
+
className: "bg-primary p-2 rounded-full"
|
|
9953
|
+
}, /*#__PURE__*/React__default.createElement(fa.FaArrowRight, {
|
|
9954
|
+
className: "text-white text-lg md:text-2xl"
|
|
9955
|
+
}), " "))));
|
|
9770
9956
|
};
|
|
9771
9957
|
|
|
9772
9958
|
var Pagination = function Pagination(props) {
|
|
@@ -9790,8 +9976,11 @@ var Pagination = function Pagination(props) {
|
|
|
9790
9976
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9791
9977
|
className: "flex gap-4 items-center justify-self-center " + className
|
|
9792
9978
|
}, /*#__PURE__*/React__default.createElement(io5.IoChevronBackOutline, {
|
|
9793
|
-
className: has_previous ? "text-primary" : "text-gray3",
|
|
9794
|
-
size: size
|
|
9979
|
+
className: has_previous ? "text-primary cursor-pointer" : "text-gray3",
|
|
9980
|
+
size: size,
|
|
9981
|
+
onClick: function onClick() {
|
|
9982
|
+
if (has_previous) handlePageChange(current_page - 1);
|
|
9983
|
+
}
|
|
9795
9984
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9796
9985
|
className: "flex items-center space-x-1"
|
|
9797
9986
|
}, Array(total_pages).fill().map(function (_, index) {
|
|
@@ -9803,8 +9992,11 @@ var Pagination = function Pagination(props) {
|
|
|
9803
9992
|
className: "px-4 py-1 rounded-md " + (index === current_page ? 'bg-primary text-textButton' : 'bg-transparent text-primary') + " hover:opacity-80"
|
|
9804
9993
|
}, index + 1);
|
|
9805
9994
|
})), /*#__PURE__*/React__default.createElement(io5.IoChevronForwardOutline, {
|
|
9806
|
-
className: has_next ? "text-primary" : "text-gray3",
|
|
9807
|
-
size: size
|
|
9995
|
+
className: has_next ? "text-primary cursor-pointer" : "text-gray3",
|
|
9996
|
+
size: size,
|
|
9997
|
+
onClick: function onClick() {
|
|
9998
|
+
if (has_next) handlePageChange(current_page + 1);
|
|
9999
|
+
}
|
|
9808
10000
|
}));
|
|
9809
10001
|
};
|
|
9810
10002
|
|
|
@@ -9914,6 +10106,77 @@ var Products3 = function Products3(props) {
|
|
|
9914
10106
|
}));
|
|
9915
10107
|
};
|
|
9916
10108
|
|
|
10109
|
+
var Products9 = function Products9(props) {
|
|
10110
|
+
var _props$Link = props.Link,
|
|
10111
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10112
|
+
shopConfigStyle = props.shopConfigStyle,
|
|
10113
|
+
_props$ProductItem = props.ProductItem,
|
|
10114
|
+
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
10115
|
+
var _useState = React.useState({
|
|
10116
|
+
size: 12
|
|
10117
|
+
}),
|
|
10118
|
+
params = _useState[0],
|
|
10119
|
+
setParams = _useState[1];
|
|
10120
|
+
var _CategoryController = CategoryController(_extends({}, props)),
|
|
10121
|
+
_CategoryController$c = _CategoryController.categories,
|
|
10122
|
+
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
10123
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
10124
|
+
params: params
|
|
10125
|
+
})),
|
|
10126
|
+
_ProductController$pr = _ProductController.products,
|
|
10127
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
10128
|
+
loading = _ProductController.loading;
|
|
10129
|
+
var handleChooseCategory = function handleChooseCategory(item) {
|
|
10130
|
+
setParams(_extends({}, params, {
|
|
10131
|
+
categoryId: item === null || item === void 0 ? void 0 : item.categoryId,
|
|
10132
|
+
size: 12
|
|
10133
|
+
}));
|
|
10134
|
+
};
|
|
10135
|
+
var groupedProducts = products === null || products === void 0 ? void 0 : products.reduce(function (acc, product) {
|
|
10136
|
+
var _product$productInfo = product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10137
|
+
categoryName = _product$productInfo.categoryName;
|
|
10138
|
+
if (!acc[categoryName]) {
|
|
10139
|
+
acc[categoryName] = [];
|
|
10140
|
+
}
|
|
10141
|
+
acc[categoryName].push(product);
|
|
10142
|
+
return acc;
|
|
10143
|
+
}, {});
|
|
10144
|
+
console.log(groupedProducts);
|
|
10145
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10146
|
+
className: SECTION_CLASS + " flex flex-col gap-4 mt-0 md:gap-6 "
|
|
10147
|
+
}, /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
10148
|
+
data: categories,
|
|
10149
|
+
onClick: handleChooseCategory
|
|
10150
|
+
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
10151
|
+
className: "m-auto mt-20 min-h-32"
|
|
10152
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : groupedProducts ? Object.entries(groupedProducts).map(function (_ref, index) {
|
|
10153
|
+
var _products$;
|
|
10154
|
+
var categoryName = _ref[0],
|
|
10155
|
+
products = _ref[1];
|
|
10156
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10157
|
+
key: "wds-" + index,
|
|
10158
|
+
id: categoryName
|
|
10159
|
+
}, (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
10160
|
+
className: "flex justify-between items-center"
|
|
10161
|
+
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
10162
|
+
className: "text-2xl md:text-4xl font-semibold mb-4"
|
|
10163
|
+
}, categoryName), /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10164
|
+
Link: Link,
|
|
10165
|
+
href: getLinkProductsByCategory(products === null || products === void 0 ? void 0 : (_products$ = products[0]) === null || _products$ === void 0 ? void 0 : _products$.productInfo),
|
|
10166
|
+
className: "font-semibold text-primary cursor-pointer"
|
|
10167
|
+
}, "Xem t\u1EA5t c\u1EA3")) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
10168
|
+
className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-2 md:gap-4 lg:gap-8"
|
|
10169
|
+
}, (products === null || products === void 0 ? void 0 : products.length) > 0 ? products === null || products === void 0 ? void 0 : products.map(function (product) {
|
|
10170
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10171
|
+
Link: Link,
|
|
10172
|
+
shopConfigStyle: shopConfigStyle,
|
|
10173
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10174
|
+
key: product === null || product === void 0 ? void 0 : product.landingShopProductId
|
|
10175
|
+
});
|
|
10176
|
+
}) : null));
|
|
10177
|
+
}) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
|
|
10178
|
+
};
|
|
10179
|
+
|
|
9917
10180
|
var Products10 = function Products10(props) {
|
|
9918
10181
|
var _useState = React.useState({
|
|
9919
10182
|
size: 8
|
|
@@ -9953,7 +10216,7 @@ var Products10 = function Products10(props) {
|
|
|
9953
10216
|
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
9954
10217
|
className: "m-auto mt-20 min-h-32"
|
|
9955
10218
|
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
9956
|
-
className: "grid grid-cols-2
|
|
10219
|
+
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"
|
|
9957
10220
|
}, products === null || products === void 0 ? void 0 : products.map(function (product, idx) {
|
|
9958
10221
|
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
9959
10222
|
Link: Link,
|
|
@@ -9965,22 +10228,32 @@ var Products10 = function Products10(props) {
|
|
|
9965
10228
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
|
|
9966
10229
|
};
|
|
9967
10230
|
|
|
9968
|
-
var
|
|
10231
|
+
var Products11 = function Products11(props) {
|
|
9969
10232
|
var _products$slice;
|
|
9970
|
-
var _props$
|
|
10233
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
10234
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10235
|
+
_props$Link = props.Link,
|
|
9971
10236
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
9972
|
-
|
|
9973
|
-
|
|
9974
|
-
_props$SectionTitle = props.SectionTitle,
|
|
9975
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
10237
|
+
_props$categoryId = props.categoryId,
|
|
10238
|
+
categoryId = _props$categoryId === void 0 ? 0 : _props$categoryId,
|
|
9976
10239
|
_props$ProductItem = props.ProductItem,
|
|
9977
10240
|
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
9978
10241
|
var _useState = React.useState({
|
|
9979
|
-
|
|
10242
|
+
page: 0,
|
|
10243
|
+
size: 12,
|
|
10244
|
+
categoryId: categoryId
|
|
9980
10245
|
}),
|
|
9981
10246
|
params = _useState[0],
|
|
9982
10247
|
setParams = _useState[1];
|
|
9983
|
-
var
|
|
10248
|
+
var _useState2 = React.useState(true),
|
|
10249
|
+
firstLoading = _useState2[0],
|
|
10250
|
+
setFirstLoading = _useState2[1];
|
|
10251
|
+
var _useState3 = React.useState({}),
|
|
10252
|
+
categorySelected = _useState3[0],
|
|
10253
|
+
setCategorySelected = _useState3[1];
|
|
10254
|
+
var _CategoryController = CategoryController(_extends({}, props, {
|
|
10255
|
+
params: params
|
|
10256
|
+
})),
|
|
9984
10257
|
_CategoryController$c = _CategoryController.categories,
|
|
9985
10258
|
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
9986
10259
|
var _ProductController = ProductController(_extends({}, props, {
|
|
@@ -9988,10 +10261,109 @@ var ProductCategory2 = function ProductCategory2(props) {
|
|
|
9988
10261
|
})),
|
|
9989
10262
|
_ProductController$pr = _ProductController.products,
|
|
9990
10263
|
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
9991
|
-
loading = _ProductController.loading
|
|
9992
|
-
|
|
9993
|
-
|
|
9994
|
-
|
|
10264
|
+
loading = _ProductController.loading,
|
|
10265
|
+
page = _ProductController.page;
|
|
10266
|
+
var handleOnChangePage = function handleOnChangePage(pageIndex) {
|
|
10267
|
+
setFirstLoading(false);
|
|
10268
|
+
setParams(function (prev) {
|
|
10269
|
+
return _extends({}, prev, {
|
|
10270
|
+
page: pageIndex
|
|
10271
|
+
});
|
|
10272
|
+
});
|
|
10273
|
+
};
|
|
10274
|
+
var handleChooseCategory = function handleChooseCategory(category) {
|
|
10275
|
+
setCategorySelected(category);
|
|
10276
|
+
setFirstLoading(true);
|
|
10277
|
+
setParams(function (prev) {
|
|
10278
|
+
return _extends({}, prev, {
|
|
10279
|
+
categoryId: category === null || category === void 0 ? void 0 : category.categoryId,
|
|
10280
|
+
size: 12
|
|
10281
|
+
});
|
|
10282
|
+
});
|
|
10283
|
+
};
|
|
10284
|
+
React.useEffect(function () {
|
|
10285
|
+
if ((categories === null || categories === void 0 ? void 0 : categories.length) > 0 && params !== null && params !== void 0 && params.categoryId) {
|
|
10286
|
+
var category = categories === null || categories === void 0 ? void 0 : categories.find(function (item) {
|
|
10287
|
+
return (item === null || item === void 0 ? void 0 : item.categoryId) == categoryId;
|
|
10288
|
+
});
|
|
10289
|
+
setCategorySelected(category);
|
|
10290
|
+
}
|
|
10291
|
+
}, [params === null || params === void 0 ? void 0 : params.categoryId, categories]);
|
|
10292
|
+
console.log("check page:::::::", page);
|
|
10293
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10294
|
+
className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-4 gap-6"
|
|
10295
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10296
|
+
className: "md:sticky top-20 self-start"
|
|
10297
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10298
|
+
className: "rounded-3xl bg-bgSecondary p-4"
|
|
10299
|
+
}, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
|
|
10300
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10301
|
+
href: getLinkProductsByCategory(item),
|
|
10302
|
+
Link: Link
|
|
10303
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10304
|
+
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" : ""),
|
|
10305
|
+
onClick: function onClick() {
|
|
10306
|
+
handleChooseCategory(item);
|
|
10307
|
+
},
|
|
10308
|
+
key: "sdjfdh-" + index
|
|
10309
|
+
}, item === null || item === void 0 ? void 0 : item.cateName));
|
|
10310
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
10311
|
+
className: "md:col-span-3 flex flex-col gap-8"
|
|
10312
|
+
}, loading && firstLoading ? /*#__PURE__*/React__default.createElement("div", {
|
|
10313
|
+
className: "w-full h-80 flex justify-center items-center"
|
|
10314
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : /*#__PURE__*/React__default.createElement("div", {
|
|
10315
|
+
className: "grid grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-6 lg:gap-8"
|
|
10316
|
+
}, (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) {
|
|
10317
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10318
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo),
|
|
10319
|
+
Link: Link,
|
|
10320
|
+
key: "kghf-" + index
|
|
10321
|
+
}, /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10322
|
+
Link: Link,
|
|
10323
|
+
shopConfigStyle: shopConfigStyle,
|
|
10324
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10325
|
+
key: product === null || product === void 0 ? void 0 : product.landingShopProductId
|
|
10326
|
+
}));
|
|
10327
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
10328
|
+
className: "md:col-span-2 lg:col-span-3 mt-20 m-auto"
|
|
10329
|
+
}, /*#__PURE__*/React__default.createElement(NotFoundProduct, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
10330
|
+
className: "w-full m-auto"
|
|
10331
|
+
}, (page === null || page === void 0 ? void 0 : page.total_pages) > 1 ? /*#__PURE__*/React__default.createElement(Pagination, {
|
|
10332
|
+
total_pages: page === null || page === void 0 ? void 0 : page.total_pages,
|
|
10333
|
+
has_next: page === null || page === void 0 ? void 0 : page.has_next,
|
|
10334
|
+
has_previous: page === null || page === void 0 ? void 0 : page.has_previous,
|
|
10335
|
+
current_page: page === null || page === void 0 ? void 0 : page.current_page,
|
|
10336
|
+
onPageChange: handleOnChangePage
|
|
10337
|
+
}) : null)));
|
|
10338
|
+
};
|
|
10339
|
+
|
|
10340
|
+
var ProductCategory2 = function ProductCategory2(props) {
|
|
10341
|
+
var _products$slice;
|
|
10342
|
+
var _props$Link = props.Link,
|
|
10343
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10344
|
+
data = props.data,
|
|
10345
|
+
shopConfigStyle = props.shopConfigStyle,
|
|
10346
|
+
_props$SectionTitle = props.SectionTitle,
|
|
10347
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
10348
|
+
_props$ProductItem = props.ProductItem,
|
|
10349
|
+
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
10350
|
+
var _useState = React.useState({
|
|
10351
|
+
size: 12
|
|
10352
|
+
}),
|
|
10353
|
+
params = _useState[0],
|
|
10354
|
+
setParams = _useState[1];
|
|
10355
|
+
var _CategoryController = CategoryController(_extends({}, props)),
|
|
10356
|
+
_CategoryController$c = _CategoryController.categories,
|
|
10357
|
+
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
10358
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
10359
|
+
params: params
|
|
10360
|
+
})),
|
|
10361
|
+
_ProductController$pr = _ProductController.products,
|
|
10362
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
10363
|
+
loading = _ProductController.loading;
|
|
10364
|
+
var _useState2 = React.useState(true),
|
|
10365
|
+
isFilter = _useState2[0],
|
|
10366
|
+
setIsFilter = _useState2[1];
|
|
9995
10367
|
var handleChooseCategory = function handleChooseCategory(item) {
|
|
9996
10368
|
setIsFilter(true);
|
|
9997
10369
|
setParams(_extends({}, params, {
|
|
@@ -10016,7 +10388,7 @@ var ProductCategory2 = function ProductCategory2(props) {
|
|
|
10016
10388
|
}), loading && isFilter ? /*#__PURE__*/React__default.createElement("div", {
|
|
10017
10389
|
className: "m-auto mt-20 min-h-32"
|
|
10018
10390
|
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
10019
|
-
className: "grid grid-cols-2
|
|
10391
|
+
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"
|
|
10020
10392
|
}, 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) {
|
|
10021
10393
|
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10022
10394
|
Link: Link,
|
|
@@ -10080,7 +10452,7 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
10080
10452
|
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem,
|
|
10081
10453
|
shopConfigStyle = props.shopConfigStyle;
|
|
10082
10454
|
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);
|
|
10083
|
-
var keywordValue = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get('
|
|
10455
|
+
var keywordValue = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get('tu-khoa');
|
|
10084
10456
|
var _useState = React.useState(0),
|
|
10085
10457
|
length = _useState[0],
|
|
10086
10458
|
setLength = _useState[1];
|
|
@@ -10279,6 +10651,7 @@ var ProductsTop1 = function ProductsTop1(props) {
|
|
|
10279
10651
|
_props$Link = props.Link,
|
|
10280
10652
|
Link = _props$Link === void 0 ? null : _props$Link;
|
|
10281
10653
|
var _useState = React.useState({
|
|
10654
|
+
sort: "ranked,DESC",
|
|
10282
10655
|
size: 8
|
|
10283
10656
|
}),
|
|
10284
10657
|
params = _useState[0];
|
|
@@ -10289,6 +10662,7 @@ var ProductsTop1 = function ProductsTop1(props) {
|
|
|
10289
10662
|
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
10290
10663
|
loading = _ProductController.loading;
|
|
10291
10664
|
console.log("ProductsTop1 products");
|
|
10665
|
+
console.log(products);
|
|
10292
10666
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10293
10667
|
className: SECTION_DEFAULT_CLASS + " flex flex-col gap-8 "
|
|
10294
10668
|
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
@@ -10379,7 +10753,7 @@ var ProductHighlight1 = function ProductHighlight1(props) {
|
|
|
10379
10753
|
isGetMore = _useState[0],
|
|
10380
10754
|
setIsGetMore = _useState[1];
|
|
10381
10755
|
var _useState2 = React.useState({
|
|
10382
|
-
size:
|
|
10756
|
+
size: 12,
|
|
10383
10757
|
isHighlight: true
|
|
10384
10758
|
}),
|
|
10385
10759
|
params = _useState2[0],
|
|
@@ -10404,7 +10778,7 @@ var ProductHighlight1 = function ProductHighlight1(props) {
|
|
|
10404
10778
|
}), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
10405
10779
|
className: "m-auto mt-20 min-h-32"
|
|
10406
10780
|
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
10407
|
-
className: "grid grid-cols-2
|
|
10781
|
+
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"
|
|
10408
10782
|
}, 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) {
|
|
10409
10783
|
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10410
10784
|
Link: Link,
|
|
@@ -10422,7 +10796,7 @@ var ProductHighlight1 = function ProductHighlight1(props) {
|
|
|
10422
10796
|
};
|
|
10423
10797
|
|
|
10424
10798
|
var ProductDetail10 = function ProductDetail10(props) {
|
|
10425
|
-
var _product$
|
|
10799
|
+
var _product$images2;
|
|
10426
10800
|
var shopConfigStyle = props.shopConfigStyle,
|
|
10427
10801
|
shopConfig = props.shopConfig,
|
|
10428
10802
|
_props$handleRedirect = props.handleRedirect,
|
|
@@ -10450,6 +10824,7 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
10450
10824
|
var descriptionRef = React.useRef();
|
|
10451
10825
|
React.useEffect(function () {
|
|
10452
10826
|
if (product) {
|
|
10827
|
+
var _product$images;
|
|
10453
10828
|
initVariant();
|
|
10454
10829
|
if (descriptionRef.current) {
|
|
10455
10830
|
var descriptionHeight = descriptionRef.current.offsetHeight;
|
|
@@ -10457,6 +10832,7 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
10457
10832
|
setHiddenButton(false);
|
|
10458
10833
|
}
|
|
10459
10834
|
}
|
|
10835
|
+
setDisplayImage(product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images[0]);
|
|
10460
10836
|
}
|
|
10461
10837
|
}, [product]);
|
|
10462
10838
|
var initVariant = function initVariant() {
|
|
@@ -10522,7 +10898,7 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
10522
10898
|
var _refInputQuantity$cur3;
|
|
10523
10899
|
var quantity = refInputQuantity === null || refInputQuantity === void 0 ? void 0 : (_refInputQuantity$cur3 = refInputQuantity.current) === null || _refInputQuantity$cur3 === void 0 ? void 0 : _refInputQuantity$cur3.getValue();
|
|
10524
10900
|
return Promise.resolve(addProductToCart(product, variant, quantity)).then(function () {
|
|
10525
|
-
handleRedirect("/
|
|
10901
|
+
handleRedirect("/gio-hang");
|
|
10526
10902
|
});
|
|
10527
10903
|
}
|
|
10528
10904
|
}();
|
|
@@ -10539,21 +10915,27 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
10539
10915
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10540
10916
|
className: "p-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 gap-6 bg-bgSecondary"
|
|
10541
10917
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10542
|
-
className: "flex flex-col gap-4 col-span-2"
|
|
10918
|
+
className: "flex flex-col gap-4 col-span-2 "
|
|
10543
10919
|
}, displayImage ? /*#__PURE__*/React__default.createElement("img", {
|
|
10544
10920
|
src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
|
|
10545
|
-
className: "w-full aspect-square rounded-2xl "
|
|
10546
|
-
}) : /*#__PURE__*/React__default.createElement(
|
|
10547
|
-
|
|
10548
|
-
|
|
10549
|
-
|
|
10921
|
+
className: "w-full border rounded-2xl p-2 bg-background aspect-square object-contain rounded-2xl "
|
|
10922
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
10923
|
+
className: "flex justify-center items-center w-full rounded-2xl aspect-square",
|
|
10924
|
+
style: {
|
|
10925
|
+
backgroundColor: "#FAFAFA"
|
|
10926
|
+
}
|
|
10927
|
+
}, /*#__PURE__*/React__default.createElement(SvgImageGallery, {
|
|
10928
|
+
width: "25%",
|
|
10929
|
+
height: "25%",
|
|
10930
|
+
fill: "#D9D9D9"
|
|
10931
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10550
10932
|
className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
|
|
10551
|
-
}, product === null || product === void 0 ? void 0 : (_product$
|
|
10933
|
+
}, product === null || product === void 0 ? void 0 : (_product$images2 = product.images) === null || _product$images2 === void 0 ? void 0 : _product$images2.map(function (item) {
|
|
10552
10934
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
10553
10935
|
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
10554
10936
|
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
10555
10937
|
alt: "",
|
|
10556
|
-
className:
|
|
10938
|
+
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 "),
|
|
10557
10939
|
onClick: function onClick() {
|
|
10558
10940
|
handleDisplayImage(item);
|
|
10559
10941
|
}
|
|
@@ -10642,6 +11024,268 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
10642
11024
|
}, "Kh\xF4ng c\xF3 th\xF4ng tin"))));
|
|
10643
11025
|
};
|
|
10644
11026
|
|
|
11027
|
+
var ProductDetail11 = function ProductDetail11(props) {
|
|
11028
|
+
var _product$images2, _product$images3, _product$attributes, _product$attributes2;
|
|
11029
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
11030
|
+
shopConfig = props.shopConfig,
|
|
11031
|
+
_props$handleRedirect = props.handleRedirect,
|
|
11032
|
+
handleRedirect = _props$handleRedirect === void 0 ? function () {} : _props$handleRedirect;
|
|
11033
|
+
var _ProductDetailControl = ProductDetailController(props),
|
|
11034
|
+
product = _ProductDetailControl.product;
|
|
11035
|
+
var _useState = React.useState(),
|
|
11036
|
+
variant = _useState[0],
|
|
11037
|
+
setVariant = _useState[1];
|
|
11038
|
+
var _useState2 = React.useState([]),
|
|
11039
|
+
options = _useState2[0],
|
|
11040
|
+
setOptions = _useState2[1];
|
|
11041
|
+
var _useState3 = React.useState(),
|
|
11042
|
+
displayImage = _useState3[0],
|
|
11043
|
+
setDisplayImage = _useState3[1];
|
|
11044
|
+
var _useState4 = React.useState(false),
|
|
11045
|
+
isSeeMore = _useState4[0],
|
|
11046
|
+
setIsSeeMore = _useState4[1];
|
|
11047
|
+
var _useState5 = React.useState(true),
|
|
11048
|
+
hiddenButton = _useState5[0],
|
|
11049
|
+
setHiddenButton = _useState5[1];
|
|
11050
|
+
var _CartController = CartController(props),
|
|
11051
|
+
addProductToCart = _CartController.addProductToCart;
|
|
11052
|
+
var refInputQuantity = React.useRef();
|
|
11053
|
+
var descriptionRef = React.useRef();
|
|
11054
|
+
React.useEffect(function () {
|
|
11055
|
+
if (product) {
|
|
11056
|
+
var _product$images;
|
|
11057
|
+
initVariant();
|
|
11058
|
+
if (descriptionRef.current) {
|
|
11059
|
+
var descriptionHeight = descriptionRef.current.offsetHeight;
|
|
11060
|
+
if (descriptionHeight >= 700) {
|
|
11061
|
+
setHiddenButton(false);
|
|
11062
|
+
}
|
|
11063
|
+
}
|
|
11064
|
+
setDisplayImage(product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images[0]);
|
|
11065
|
+
}
|
|
11066
|
+
}, [product]);
|
|
11067
|
+
var initVariant = function initVariant() {
|
|
11068
|
+
var _product$variants, _variant$index;
|
|
11069
|
+
var variant = product === null || product === void 0 ? void 0 : (_product$variants = product.variants) === null || _product$variants === void 0 ? void 0 : _product$variants[0];
|
|
11070
|
+
var indexOptions = variant === null || variant === void 0 ? void 0 : (_variant$index = variant.index) === null || _variant$index === void 0 ? void 0 : _variant$index.split(",");
|
|
11071
|
+
setVariant(variant);
|
|
11072
|
+
var options = (product === null || product === void 0 ? void 0 : product.optionValues) || [];
|
|
11073
|
+
options = options.map(function (e, i) {
|
|
11074
|
+
return _extends({}, e, {
|
|
11075
|
+
valueIndex: (indexOptions === null || indexOptions === void 0 ? void 0 : indexOptions[i]) || 0
|
|
11076
|
+
});
|
|
11077
|
+
});
|
|
11078
|
+
setOptions(options);
|
|
11079
|
+
};
|
|
11080
|
+
var selectOption = function selectOption(optionIndex, valueIndex) {
|
|
11081
|
+
console.log("selectOption optionIndex valueIndex", optionIndex, valueIndex);
|
|
11082
|
+
var newOption = _extends({}, options[optionIndex], {
|
|
11083
|
+
valueIndex: valueIndex
|
|
11084
|
+
});
|
|
11085
|
+
options.splice(optionIndex, 1, newOption);
|
|
11086
|
+
var newOptions = [].concat(options);
|
|
11087
|
+
setOptions(newOptions);
|
|
11088
|
+
console.log("newOptions", newOptions);
|
|
11089
|
+
var variant = getVariantFromOption(newOptions);
|
|
11090
|
+
console.log("getVariantFromOption variant", variant);
|
|
11091
|
+
setVariant(variant);
|
|
11092
|
+
};
|
|
11093
|
+
var getVariantFromOption = function getVariantFromOption(_options) {
|
|
11094
|
+
console.log("getVariantFromOption options", _options);
|
|
11095
|
+
var listOptionIndexSelected = _options.map(function (e) {
|
|
11096
|
+
return e.valueIndex;
|
|
11097
|
+
}).filter(function (e) {
|
|
11098
|
+
return e !== undefined;
|
|
11099
|
+
});
|
|
11100
|
+
var variantIndex = listOptionIndexSelected.join(",");
|
|
11101
|
+
return ((product === null || product === void 0 ? void 0 : product.variants) || []).find(function (e) {
|
|
11102
|
+
return e.index === variantIndex;
|
|
11103
|
+
});
|
|
11104
|
+
};
|
|
11105
|
+
var validateData = function validateData() {
|
|
11106
|
+
var _refInputQuantity$cur;
|
|
11107
|
+
return (refInputQuantity === null || refInputQuantity === void 0 ? void 0 : (_refInputQuantity$cur = refInputQuantity.current) === null || _refInputQuantity$cur === void 0 ? void 0 : _refInputQuantity$cur.validateData()) && variant;
|
|
11108
|
+
};
|
|
11109
|
+
var addToCart = function addToCart() {
|
|
11110
|
+
try {
|
|
11111
|
+
var _temp = function () {
|
|
11112
|
+
if (validateData()) {
|
|
11113
|
+
var _refInputQuantity$cur2;
|
|
11114
|
+
var quantity = refInputQuantity === null || refInputQuantity === void 0 ? void 0 : (_refInputQuantity$cur2 = refInputQuantity.current) === null || _refInputQuantity$cur2 === void 0 ? void 0 : _refInputQuantity$cur2.getValue();
|
|
11115
|
+
return Promise.resolve(addProductToCart(product, variant, quantity)).then(function () {});
|
|
11116
|
+
}
|
|
11117
|
+
}();
|
|
11118
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
11119
|
+
} catch (e) {
|
|
11120
|
+
return Promise.reject(e);
|
|
11121
|
+
}
|
|
11122
|
+
};
|
|
11123
|
+
var buyNow = function buyNow() {
|
|
11124
|
+
try {
|
|
11125
|
+
var _temp2 = function () {
|
|
11126
|
+
if (validateData()) {
|
|
11127
|
+
var _refInputQuantity$cur3;
|
|
11128
|
+
var quantity = refInputQuantity === null || refInputQuantity === void 0 ? void 0 : (_refInputQuantity$cur3 = refInputQuantity.current) === null || _refInputQuantity$cur3 === void 0 ? void 0 : _refInputQuantity$cur3.getValue();
|
|
11129
|
+
return Promise.resolve(addProductToCart(product, variant, quantity)).then(function () {
|
|
11130
|
+
handleRedirect("/gio-hang");
|
|
11131
|
+
});
|
|
11132
|
+
}
|
|
11133
|
+
}();
|
|
11134
|
+
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
11135
|
+
} catch (e) {
|
|
11136
|
+
return Promise.reject(e);
|
|
11137
|
+
}
|
|
11138
|
+
};
|
|
11139
|
+
var handleDisplayImage = function handleDisplayImage(item) {
|
|
11140
|
+
setDisplayImage(item);
|
|
11141
|
+
};
|
|
11142
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11143
|
+
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")
|
|
11144
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11145
|
+
className: "p-6 rounded-2xl grid grid-cols-1 md:grid-cols-2 bg-bgSecondary"
|
|
11146
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11147
|
+
className: "grid grid-cols-5 gap-6"
|
|
11148
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11149
|
+
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"
|
|
11150
|
+
}, product === null || product === void 0 ? void 0 : (_product$images2 = product.images) === null || _product$images2 === void 0 ? void 0 : _product$images2.map(function (item) {
|
|
11151
|
+
return /*#__PURE__*/React__default.createElement("img", {
|
|
11152
|
+
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
11153
|
+
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
11154
|
+
alt: "",
|
|
11155
|
+
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" : ""),
|
|
11156
|
+
onClick: function onClick() {
|
|
11157
|
+
handleDisplayImage(item);
|
|
11158
|
+
}
|
|
11159
|
+
});
|
|
11160
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
11161
|
+
className: "flex flex-col gap-4 col-span-5 lg:col-span-4 p-4 border border-stroke rounded-2xl"
|
|
11162
|
+
}, displayImage ? /*#__PURE__*/React__default.createElement("img", {
|
|
11163
|
+
src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
|
|
11164
|
+
className: "w-full aspect-square object-contain rounded-2xl "
|
|
11165
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
11166
|
+
className: "flex justify-center items-center rounded-2xl w-full aspect-square",
|
|
11167
|
+
style: {
|
|
11168
|
+
backgroundColor: "#FAFAFA"
|
|
11169
|
+
}
|
|
11170
|
+
}, /*#__PURE__*/React__default.createElement(SvgImageGallery, {
|
|
11171
|
+
width: "25%",
|
|
11172
|
+
height: "25%",
|
|
11173
|
+
fill: "#D9D9D9"
|
|
11174
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
11175
|
+
className: " block lg:hidden w-full flex gap-4 col-span-5 overflow-x-auto overflow-hidden no-scrollbar"
|
|
11176
|
+
}, product === null || product === void 0 ? void 0 : (_product$images3 = product.images) === null || _product$images3 === void 0 ? void 0 : _product$images3.map(function (item) {
|
|
11177
|
+
return /*#__PURE__*/React__default.createElement("img", {
|
|
11178
|
+
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
11179
|
+
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
11180
|
+
alt: "",
|
|
11181
|
+
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" : ""),
|
|
11182
|
+
onClick: function onClick() {
|
|
11183
|
+
handleDisplayImage(item);
|
|
11184
|
+
}
|
|
11185
|
+
});
|
|
11186
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
11187
|
+
className: "mt-2 md:ms-10"
|
|
11188
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
11189
|
+
className: "font-semibold text-2xl"
|
|
11190
|
+
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
11191
|
+
product: product,
|
|
11192
|
+
variant: variant,
|
|
11193
|
+
className: "mt-4 md:mt-6 text-[22px]"
|
|
11194
|
+
}), options.map(function (option, index) {
|
|
11195
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11196
|
+
className: "flex gap-2 mt-4 md:mt-6",
|
|
11197
|
+
key: index
|
|
11198
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11199
|
+
className: "min-w-24 my-auto"
|
|
11200
|
+
}, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
|
|
11201
|
+
className: "flex gap-2"
|
|
11202
|
+
}, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
|
|
11203
|
+
return /*#__PURE__*/React__default.createElement("button", {
|
|
11204
|
+
key: i,
|
|
11205
|
+
onClick: function onClick() {
|
|
11206
|
+
return selectOption(index, i);
|
|
11207
|
+
},
|
|
11208
|
+
className: "rounded py-1 px-2 " + (i == option.valueIndex ? "bg-primary text-textButton" : "border bg-gray6")
|
|
11209
|
+
}, v);
|
|
11210
|
+
})));
|
|
11211
|
+
}), /*#__PURE__*/React__default.createElement(Input, {
|
|
11212
|
+
label: "Số lượng",
|
|
11213
|
+
wrapClassName: "flex items-center gap-6 mt-4 md:mt-6 ",
|
|
11214
|
+
rules: [{
|
|
11215
|
+
type: "required",
|
|
11216
|
+
message: "Bắt buộc nhập số lượng"
|
|
11217
|
+
}, {
|
|
11218
|
+
type: "pattern",
|
|
11219
|
+
pattern: numberPattern,
|
|
11220
|
+
message: "Số lượng không đúng"
|
|
11221
|
+
}],
|
|
11222
|
+
defaultValue: 1,
|
|
11223
|
+
isQuantity: true,
|
|
11224
|
+
min: 0,
|
|
11225
|
+
className: "bg-background",
|
|
11226
|
+
ref: refInputQuantity
|
|
11227
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11228
|
+
className: "flex gap-4 mt-6"
|
|
11229
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
11230
|
+
label: "THÊM VÀO GIỎ",
|
|
11231
|
+
shopConfigStyle: shopConfigStyle,
|
|
11232
|
+
type: "outline",
|
|
11233
|
+
onClick: function onClick() {
|
|
11234
|
+
return addToCart();
|
|
11235
|
+
}
|
|
11236
|
+
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
11237
|
+
label: "MUA NGAY",
|
|
11238
|
+
shopConfigStyle: shopConfigStyle,
|
|
11239
|
+
onClick: function onClick() {
|
|
11240
|
+
return buyNow();
|
|
11241
|
+
}
|
|
11242
|
+
})))), /*#__PURE__*/React__default.createElement("div", {
|
|
11243
|
+
className: "grid grid-cols-1 lg:grid-cols-5 mt-8 lg:gap-8"
|
|
11244
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11245
|
+
className: "lg:col-span-3 "
|
|
11246
|
+
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
11247
|
+
className: "mb-8 font-semibold text-3xl"
|
|
11248
|
+
}, "M\xF4 t\u1EA3 s\u1EA3n ph\u1EA9m"), product !== null && product !== void 0 && product.description ? /*#__PURE__*/React__default.createElement("div", {
|
|
11249
|
+
className: "h-max relative p-2 p-6 pb-0 rounded-2xl bg-bgSecondary"
|
|
11250
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11251
|
+
ref: descriptionRef,
|
|
11252
|
+
className: "" + (isSeeMore && !hiddenButton ? "h-full mb-4" : "max-h-[700px] overflow-hidden"),
|
|
11253
|
+
dangerouslySetInnerHTML: {
|
|
11254
|
+
__html: product === null || product === void 0 ? void 0 : product.description
|
|
11255
|
+
}
|
|
11256
|
+
}), !isSeeMore && !hiddenButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
11257
|
+
className: "absolute bottom-0 rounded-b-2xl left-0 w-full h-24 bg-gradient-to-t from-black/40 to-transparent"
|
|
11258
|
+
}) : null, !hiddenButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
11259
|
+
className: "w-full " + (!isSeeMore ? "absolute bottom-4" : "mt-2 pb-2") + " flex justify-center "
|
|
11260
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
11261
|
+
label: isSeeMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
11262
|
+
className: "flex items-center gap-2"
|
|
11263
|
+
}, "Thu nh\u1ECF ", /*#__PURE__*/React__default.createElement(fa6.FaMinus, null)) : /*#__PURE__*/React__default.createElement("div", {
|
|
11264
|
+
className: "flex items-center gap-2"
|
|
11265
|
+
}, "Xem th\xEAm ", /*#__PURE__*/React__default.createElement(fa6.FaPlus, null)),
|
|
11266
|
+
className: " bottom-0 z-50",
|
|
11267
|
+
onClick: function onClick() {
|
|
11268
|
+
setIsSeeMore(!isSeeMore);
|
|
11269
|
+
}
|
|
11270
|
+
})) : null) : /*#__PURE__*/React__default.createElement("div", {
|
|
11271
|
+
className: "text-gray3 bg-bgSecondary mt-2"
|
|
11272
|
+
}, "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", {
|
|
11273
|
+
className: "lg:col-span-2"
|
|
11274
|
+
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
11275
|
+
className: "text-3xl mb-8 font-semibold"
|
|
11276
|
+
}, "Th\xF4ng tin s\u1EA3n ph\u1EA9m"), /*#__PURE__*/React__default.createElement("div", {
|
|
11277
|
+
className: "bg-bgSecondary rounded-2xl py-2 px-2 md:px-6"
|
|
11278
|
+
}, product === null || product === void 0 ? void 0 : (_product$attributes2 = product.attributes) === null || _product$attributes2 === void 0 ? void 0 : _product$attributes2.map(function (item, index) {
|
|
11279
|
+
var _item$value;
|
|
11280
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11281
|
+
className: "p-4 flex gap-4 rounded-lg even:bg-background",
|
|
11282
|
+
key: "ptyh-" + index
|
|
11283
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11284
|
+
className: "min-w-32 max-w-32 text-wrap"
|
|
11285
|
+
}, 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]));
|
|
11286
|
+
}))) : null));
|
|
11287
|
+
};
|
|
11288
|
+
|
|
10645
11289
|
var Booking1 = function Booking1(props) {
|
|
10646
11290
|
var _data$data, _data$data$, _data$data2, _data$data2$;
|
|
10647
11291
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
@@ -10696,7 +11340,7 @@ var BookingForm6 = function BookingForm6(props) {
|
|
|
10696
11340
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10697
11341
|
className: "mt-12 grid grid-cols-1 gap-6 md:grid-cols-3 md:gap-12"
|
|
10698
11342
|
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10699
|
-
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) || "#"
|
|
11343
|
+
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) || "#"
|
|
10700
11344
|
}, 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", {
|
|
10701
11345
|
className: "text-primary w-full h-auto"
|
|
10702
11346
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -10814,7 +11458,7 @@ var Banner3 = function Banner3(props) {
|
|
|
10814
11458
|
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
10815
11459
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10816
11460
|
Link: Link,
|
|
10817
|
-
href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
11461
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
10818
11462
|
key: "djsd-" + index
|
|
10819
11463
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
10820
11464
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
@@ -10970,11 +11614,12 @@ var Address1 = function Address1(props) {
|
|
|
10970
11614
|
className: "sm:flex justify-between mt-3"
|
|
10971
11615
|
}, /*#__PURE__*/React__default.createElement("small", null, "M\u1EDF c\u1EEDa 08:00-21:00"), /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10972
11616
|
Link: Link,
|
|
10973
|
-
href: "
|
|
11617
|
+
href: "https://www.google.com/maps/search/?q=" + encodeURIComponent(item === null || item === void 0 ? void 0 : item.address),
|
|
11618
|
+
target: "_black"
|
|
10974
11619
|
}, /*#__PURE__*/React__default.createElement("small", {
|
|
10975
11620
|
className: "text-primary block"
|
|
10976
11621
|
}, "Ch\u1EC9 \u0111\u01B0\u1EDDng ", /*#__PURE__*/React__default.createElement(fa.FaArrowRight, {
|
|
10977
|
-
className: "inline-block
|
|
11622
|
+
className: "inline-block text-primary"
|
|
10978
11623
|
}), " "))));
|
|
10979
11624
|
}))));
|
|
10980
11625
|
};
|
|
@@ -10995,8 +11640,8 @@ var Links1 = function Links1(props) {
|
|
|
10995
11640
|
}, [1, 2, 3].map(function (item, index) {
|
|
10996
11641
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10997
11642
|
key: "qwikf-" + index + " "
|
|
10998
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
10999
|
-
className: "text-lg md:text-
|
|
11643
|
+
}, /*#__PURE__*/React__default.createElement("h3", {
|
|
11644
|
+
className: "text-lg md:text-2xl font-semibold mb-4"
|
|
11000
11645
|
}, "\u0110a d\u1EA1ng thanh to\xE1n"), /*#__PURE__*/React__default.createElement("div", {
|
|
11001
11646
|
className: "leading-10 flex flex-col bg-background2 p-4 rounded-xl bg-bgSecondary "
|
|
11002
11647
|
}, /*#__PURE__*/React__default.createElement("label", null, /*#__PURE__*/React__default.createElement(fa6.FaArrowsRotate, {
|
|
@@ -11055,7 +11700,7 @@ var Footer1 = function Footer1(props) {
|
|
|
11055
11700
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
11056
11701
|
className: "object-cover w-16 h-16",
|
|
11057
11702
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
11058
|
-
alt:
|
|
11703
|
+
alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
|
|
11059
11704
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
11060
11705
|
className: " text-2xl md:text-3xl font-semibold ms-2",
|
|
11061
11706
|
style: {
|
|
@@ -11069,8 +11714,8 @@ var Footer1 = function Footer1(props) {
|
|
|
11069
11714
|
className: "mb-3 font-semibold text-md md:text-lg"
|
|
11070
11715
|
}, "Th\xF4ng tin li\xEAn h\u1EC7"), shopAddressList === null || shopAddressList === void 0 ? void 0 : shopAddressList.map(function (item, index) {
|
|
11071
11716
|
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", {
|
|
11072
|
-
className: "flex gap-
|
|
11073
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
11717
|
+
className: "flex gap-2 items-center"
|
|
11718
|
+
}, /*#__PURE__*/React__default.createElement(hi.HiOutlineLocationMarker, {
|
|
11074
11719
|
size: 24,
|
|
11075
11720
|
className: "inline-block",
|
|
11076
11721
|
style: {
|
|
@@ -11078,7 +11723,7 @@ var Footer1 = function Footer1(props) {
|
|
|
11078
11723
|
}
|
|
11079
11724
|
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.address)), /*#__PURE__*/React__default.createElement("div", {
|
|
11080
11725
|
className: "flex gap-2 items-center"
|
|
11081
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
11726
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlinePhone, {
|
|
11082
11727
|
size: 24,
|
|
11083
11728
|
className: "inline-block",
|
|
11084
11729
|
style: {
|
|
@@ -11094,7 +11739,7 @@ var Footer1 = function Footer1(props) {
|
|
|
11094
11739
|
})) === null || _shopConfigStyle$navB2 === void 0 ? void 0 : _shopConfigStyle$navB2.map(function (route, index) {
|
|
11095
11740
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
11096
11741
|
Link: Link,
|
|
11097
|
-
href: (route === null || route === void 0 ? void 0 : route.route) || "#",
|
|
11742
|
+
href: convertURL(route === null || route === void 0 ? void 0 : route.route) || "#",
|
|
11098
11743
|
key: "dfjg-" + index
|
|
11099
11744
|
}, /*#__PURE__*/React__default.createElement("div", null, route === null || route === void 0 ? void 0 : route.label));
|
|
11100
11745
|
}))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -11102,7 +11747,8 @@ var Footer1 = function Footer1(props) {
|
|
|
11102
11747
|
}, "H\u1ED7 tr\u1EE3"), /*#__PURE__*/React__default.createElement("div", {
|
|
11103
11748
|
className: "flex justify-start items-center gap-4"
|
|
11104
11749
|
}, /*#__PURE__*/React__default.createElement("a", {
|
|
11105
|
-
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#"
|
|
11750
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#",
|
|
11751
|
+
target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopFacebookPage ? "_blank" : "_self"
|
|
11106
11752
|
}, /*#__PURE__*/React__default.createElement(fa.FaFacebookF, {
|
|
11107
11753
|
size: 40,
|
|
11108
11754
|
color: textButton,
|
|
@@ -11111,7 +11757,8 @@ var Footer1 = function Footer1(props) {
|
|
|
11111
11757
|
background: primary
|
|
11112
11758
|
}
|
|
11113
11759
|
})), /*#__PURE__*/React__default.createElement("a", {
|
|
11114
|
-
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#"
|
|
11760
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#",
|
|
11761
|
+
target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopMessenger ? "_blank" : "_self"
|
|
11115
11762
|
}, /*#__PURE__*/React__default.createElement(fa.FaFacebookMessenger, {
|
|
11116
11763
|
size: 40,
|
|
11117
11764
|
color: textButton,
|
|
@@ -11120,7 +11767,8 @@ var Footer1 = function Footer1(props) {
|
|
|
11120
11767
|
background: primary
|
|
11121
11768
|
}
|
|
11122
11769
|
})), /*#__PURE__*/React__default.createElement("a", {
|
|
11123
|
-
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#"
|
|
11770
|
+
href: "https://zalo.me/" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#",
|
|
11771
|
+
target: "_blank"
|
|
11124
11772
|
}, /*#__PURE__*/React__default.createElement(si.SiZalo, {
|
|
11125
11773
|
size: 40,
|
|
11126
11774
|
color: textButton,
|
|
@@ -11133,7 +11781,8 @@ var Footer1 = function Footer1(props) {
|
|
|
11133
11781
|
}, /*#__PURE__*/React__default.createElement("small", {
|
|
11134
11782
|
className: "me-5"
|
|
11135
11783
|
}, "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", {
|
|
11136
|
-
href:
|
|
11784
|
+
href: linkPagePolicy,
|
|
11785
|
+
target: "_blank"
|
|
11137
11786
|
}, /*#__PURE__*/React__default.createElement("small", {
|
|
11138
11787
|
className: "underline decoration-solid",
|
|
11139
11788
|
style: {
|
|
@@ -11195,7 +11844,7 @@ var Footer7 = function Footer7(props) {
|
|
|
11195
11844
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
11196
11845
|
className: "object-cover w-14",
|
|
11197
11846
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
11198
|
-
alt:
|
|
11847
|
+
alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
|
|
11199
11848
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
11200
11849
|
className: " text-2xl md:text-3xl font-semibold ms-2",
|
|
11201
11850
|
style: {
|
|
@@ -11211,16 +11860,16 @@ var Footer7 = function Footer7(props) {
|
|
|
11211
11860
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
11212
11861
|
key: "dlkhg-" + index
|
|
11213
11862
|
}, /*#__PURE__*/React__default.createElement("div", null, "C\u01A1 s\u1EDF ", index + 1), /*#__PURE__*/React__default.createElement("div", {
|
|
11214
|
-
className: "flex gap-
|
|
11215
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
11863
|
+
className: "flex gap-2"
|
|
11864
|
+
}, /*#__PURE__*/React__default.createElement(hi.HiOutlineLocationMarker, {
|
|
11216
11865
|
size: 24,
|
|
11217
11866
|
className: "inline-block mt-1",
|
|
11218
11867
|
style: {
|
|
11219
11868
|
color: primary
|
|
11220
11869
|
}
|
|
11221
11870
|
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.address)), /*#__PURE__*/React__default.createElement("div", {
|
|
11222
|
-
className: "flex gap-
|
|
11223
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
11871
|
+
className: "flex gap-2"
|
|
11872
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlinePhone, {
|
|
11224
11873
|
size: 24,
|
|
11225
11874
|
className: "inline-block mt-1",
|
|
11226
11875
|
style: {
|
|
@@ -11235,7 +11884,7 @@ var Footer7 = function Footer7(props) {
|
|
|
11235
11884
|
return e === null || e === void 0 ? void 0 : e.isShow;
|
|
11236
11885
|
})) === null || _shopConfigStyle$navB2 === void 0 ? void 0 : _shopConfigStyle$navB2.map(function (route, index) {
|
|
11237
11886
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
11238
|
-
href: (route === null || route === void 0 ? void 0 : route.route) || "#",
|
|
11887
|
+
href: convertURL(route === null || route === void 0 ? void 0 : route.route) || "#",
|
|
11239
11888
|
Link: Link,
|
|
11240
11889
|
key: "fiddf-" + index
|
|
11241
11890
|
}, /*#__PURE__*/React__default.createElement("div", null, route === null || route === void 0 ? void 0 : route.label));
|
|
@@ -11244,7 +11893,8 @@ var Footer7 = function Footer7(props) {
|
|
|
11244
11893
|
}, "H\u1ED7 tr\u1EE3"), /*#__PURE__*/React__default.createElement("div", {
|
|
11245
11894
|
className: "flex justify-start items-center gap-4"
|
|
11246
11895
|
}, /*#__PURE__*/React__default.createElement("a", {
|
|
11247
|
-
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#"
|
|
11896
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#",
|
|
11897
|
+
target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopFacebookPage ? "_blank" : "_self"
|
|
11248
11898
|
}, /*#__PURE__*/React__default.createElement(fa.FaFacebookF, {
|
|
11249
11899
|
size: 40,
|
|
11250
11900
|
color: textButton,
|
|
@@ -11253,7 +11903,8 @@ var Footer7 = function Footer7(props) {
|
|
|
11253
11903
|
background: primary
|
|
11254
11904
|
}
|
|
11255
11905
|
})), /*#__PURE__*/React__default.createElement("a", {
|
|
11256
|
-
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#"
|
|
11906
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#",
|
|
11907
|
+
target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopMessenger ? "_blank" : "_self"
|
|
11257
11908
|
}, /*#__PURE__*/React__default.createElement(fa.FaFacebookMessenger, {
|
|
11258
11909
|
size: 40,
|
|
11259
11910
|
color: textButton,
|
|
@@ -11262,7 +11913,8 @@ var Footer7 = function Footer7(props) {
|
|
|
11262
11913
|
background: primary
|
|
11263
11914
|
}
|
|
11264
11915
|
})), /*#__PURE__*/React__default.createElement("a", {
|
|
11265
|
-
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#"
|
|
11916
|
+
href: "https://zalo.me/" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#",
|
|
11917
|
+
target: "_blank"
|
|
11266
11918
|
}, /*#__PURE__*/React__default.createElement(si.SiZalo, {
|
|
11267
11919
|
size: 40,
|
|
11268
11920
|
color: textButton,
|
|
@@ -11275,7 +11927,8 @@ var Footer7 = function Footer7(props) {
|
|
|
11275
11927
|
}, /*#__PURE__*/React__default.createElement("small", {
|
|
11276
11928
|
className: "me-5"
|
|
11277
11929
|
}, "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", {
|
|
11278
|
-
href:
|
|
11930
|
+
href: linkPagePolicy,
|
|
11931
|
+
target: "_blank"
|
|
11279
11932
|
}, /*#__PURE__*/React__default.createElement("small", {
|
|
11280
11933
|
className: "underline decoration-solid",
|
|
11281
11934
|
style: {
|
|
@@ -11562,7 +12215,7 @@ var PageTitle1 = function PageTitle1(props) {
|
|
|
11562
12215
|
className: "absolute top-0 w-full h-full bg-black opacity-40 z-0"
|
|
11563
12216
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11564
12217
|
className: "relative w-full p-20 z-10 flex flex-col gap-6 items-center justify-center"
|
|
11565
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
12218
|
+
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
11566
12219
|
className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
11567
12220
|
}, 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)));
|
|
11568
12221
|
};
|
|
@@ -11577,6 +12230,7 @@ var About1 = function About1(props) {
|
|
|
11577
12230
|
}, data === null || data === void 0 ? void 0 : data.sectionTitle) : null, data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("div", {
|
|
11578
12231
|
className: "text-xl"
|
|
11579
12232
|
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
12233
|
+
className: "text-wrap",
|
|
11580
12234
|
dangerouslySetInnerHTML: {
|
|
11581
12235
|
__html: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopAbout
|
|
11582
12236
|
}
|
|
@@ -11595,7 +12249,7 @@ var About5 = function About5(props) {
|
|
|
11595
12249
|
src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage,
|
|
11596
12250
|
className: "w-full hidden lg:block rounded-xl"
|
|
11597
12251
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11598
|
-
className: "ck-content",
|
|
12252
|
+
className: "ck-content text-wrap",
|
|
11599
12253
|
dangerouslySetInnerHTML: {
|
|
11600
12254
|
__html: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopAbout
|
|
11601
12255
|
}
|
|
@@ -11605,6 +12259,32 @@ var About5 = function About5(props) {
|
|
|
11605
12259
|
}));
|
|
11606
12260
|
};
|
|
11607
12261
|
|
|
12262
|
+
var About6 = function About6(props) {
|
|
12263
|
+
var _sectionData$, _sectionData$2;
|
|
12264
|
+
var shopConfig = props.shopConfig,
|
|
12265
|
+
data = props.data;
|
|
12266
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
12267
|
+
console.log("About5 sectionData", sectionData);
|
|
12268
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
12269
|
+
className: SECTION_DEFAULT_CLASS + " mt-0"
|
|
12270
|
+
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
12271
|
+
className: "text-2xl md:text-4xl text-textHeading font-semibold mb-6 lg:mb-8"
|
|
12272
|
+
}, data === null || data === void 0 ? void 0 : data.sectionTitle) , /*#__PURE__*/React__default.createElement("div", {
|
|
12273
|
+
className: "grid grid-cols-1 lg:grid-cols-5 gap-6 lg:gap-10"
|
|
12274
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
12275
|
+
src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage,
|
|
12276
|
+
className: "w-full h-auto object-cover lg:hidden block rounded-xl"
|
|
12277
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12278
|
+
className: "ck-content text-wrap lg:col-span-3 bg-bgSecondary p-4 lg:p-6 rounded-2xl",
|
|
12279
|
+
dangerouslySetInnerHTML: {
|
|
12280
|
+
__html: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopAbout
|
|
12281
|
+
}
|
|
12282
|
+
}), /*#__PURE__*/React__default.createElement("img", {
|
|
12283
|
+
src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$2 = sectionData[0]) === null || _sectionData$2 === void 0 ? void 0 : _sectionData$2.srcImage,
|
|
12284
|
+
className: "w-full h-auto object-cover lg:col-span-2 lg:block hidden rounded-xl"
|
|
12285
|
+
})));
|
|
12286
|
+
};
|
|
12287
|
+
|
|
11608
12288
|
var Contact1 = function Contact1(props) {
|
|
11609
12289
|
var _sectionData$;
|
|
11610
12290
|
var shopConfigStyle = props.shopConfigStyle,
|
|
@@ -11668,11 +12348,12 @@ var Breadcrumb1 = function Breadcrumb1(props) {
|
|
|
11668
12348
|
return e === null || e === void 0 ? void 0 : e.length;
|
|
11669
12349
|
})) === null || _route$route$split$fi === void 0 ? void 0 : _route$route$split$fi.slice(0, 2);
|
|
11670
12350
|
items = (_items = items) === null || _items === void 0 ? void 0 : _items.map(function (e) {
|
|
12351
|
+
var _e, _e$replace, _e$replace$replace, _e$replace$replace$re;
|
|
11671
12352
|
if (e === "product") e = "products";else if (e === "service") e = "services";
|
|
11672
12353
|
return (routes === null || routes === void 0 ? void 0 : routes.find(function (r) {
|
|
11673
12354
|
return (r === null || r === void 0 ? void 0 : r.name) === e;
|
|
11674
12355
|
})) || {
|
|
11675
|
-
label: e
|
|
12356
|
+
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, "/")
|
|
11676
12357
|
};
|
|
11677
12358
|
});
|
|
11678
12359
|
(_items2 = items) === null || _items2 === void 0 ? void 0 : _items2.unshift({
|
|
@@ -11693,7 +12374,7 @@ var Breadcrumb1 = function Breadcrumb1(props) {
|
|
|
11693
12374
|
className: "text-gray4"
|
|
11694
12375
|
}, "/") : null, item !== null && item !== void 0 && item.route ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
11695
12376
|
Link: Link,
|
|
11696
|
-
href: (item === null || item === void 0 ? void 0 : item.route) || "#",
|
|
12377
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || "#",
|
|
11697
12378
|
style: {
|
|
11698
12379
|
color: textHeading
|
|
11699
12380
|
}
|
|
@@ -12810,7 +13491,7 @@ var ShopHighlights2 = function ShopHighlights2(props) {
|
|
|
12810
13491
|
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
12811
13492
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12812
13493
|
Link: Link,
|
|
12813
|
-
href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
|
|
13494
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
|
|
12814
13495
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12815
13496
|
className: "flex flex-col items-center text-center lg:px-3 gap-3",
|
|
12816
13497
|
key: "kdf-" + index
|
|
@@ -12838,7 +13519,7 @@ var ShopHighlights5 = function ShopHighlights5(props) {
|
|
|
12838
13519
|
className: SECTION_CLASS + " grid md:grid-cols-3 py-6 gap-4 lg:gap-6 bg-bgSecondary"
|
|
12839
13520
|
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
12840
13521
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12841
|
-
href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
13522
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
12842
13523
|
Link: Link
|
|
12843
13524
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12844
13525
|
className: "flex flex-col items-center text-center md:px-3 lg:px-6 gap-3",
|
|
@@ -12884,7 +13565,7 @@ var ShopHighlights6 = function ShopHighlights6(props) {
|
|
|
12884
13565
|
className: " w-44 h-0.5 rounded-full bg-primary"
|
|
12885
13566
|
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description), /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12886
13567
|
Link: Link,
|
|
12887
|
-
href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
|
|
13568
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
|
|
12888
13569
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
12889
13570
|
shopConfigStyle: shopConfigStyle,
|
|
12890
13571
|
label: item === null || item === void 0 ? void 0 : item.title
|
|
@@ -12914,7 +13595,7 @@ var ShopHighlights7 = function ShopHighlights7(props) {
|
|
|
12914
13595
|
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
|
|
12915
13596
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12916
13597
|
Link: Link,
|
|
12917
|
-
href: (it === null || it === void 0 ? void 0 : it.route) || (it === null || it === void 0 ? void 0 : it.link) || "#",
|
|
13598
|
+
href: convertURL(it === null || it === void 0 ? void 0 : it.route) || (it === null || it === void 0 ? void 0 : it.link) || "#",
|
|
12918
13599
|
key: index,
|
|
12919
13600
|
className: "pt-6 col-span-3 md:col-span-1"
|
|
12920
13601
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -13452,6 +14133,7 @@ var NewsDetail1 = function NewsDetail1(props) {
|
|
|
13452
14133
|
|
|
13453
14134
|
exports.About1 = About1;
|
|
13454
14135
|
exports.About5 = About5;
|
|
14136
|
+
exports.About6 = About6;
|
|
13455
14137
|
exports.Address1 = Address1;
|
|
13456
14138
|
exports.Banner1 = Banner1;
|
|
13457
14139
|
exports.Banner2 = Banner2;
|
|
@@ -13496,9 +14178,11 @@ exports.PageTitle1 = PageTitle1;
|
|
|
13496
14178
|
exports.Partner1 = Partner1;
|
|
13497
14179
|
exports.ProductCategory2 = ProductCategory2;
|
|
13498
14180
|
exports.ProductDetail10 = ProductDetail10;
|
|
14181
|
+
exports.ProductDetail11 = ProductDetail11;
|
|
13499
14182
|
exports.ProductHighlight1 = ProductHighlight1;
|
|
13500
14183
|
exports.ProductHot1 = ProductHot1;
|
|
13501
14184
|
exports.ProductHot3 = ProductHot3;
|
|
14185
|
+
exports.ProductImage = ProductImage;
|
|
13502
14186
|
exports.ProductItem2 = ProductItem2;
|
|
13503
14187
|
exports.ProductItem3 = ProductItem3;
|
|
13504
14188
|
exports.ProductItem4 = ProductItem4;
|
|
@@ -13510,8 +14194,10 @@ exports.ProductList7 = ProductList7;
|
|
|
13510
14194
|
exports.ProductSale2 = ProductSale2;
|
|
13511
14195
|
exports.ProductSearch1 = ProductSearch1;
|
|
13512
14196
|
exports.Products10 = Products10;
|
|
14197
|
+
exports.Products11 = Products11;
|
|
13513
14198
|
exports.Products2 = Products2;
|
|
13514
14199
|
exports.Products3 = Products3;
|
|
14200
|
+
exports.Products9 = Products9;
|
|
13515
14201
|
exports.ProductsTop1 = ProductsTop1;
|
|
13516
14202
|
exports.SearchBar2 = SearchBar2;
|
|
13517
14203
|
exports.SearchBar5 = SearchBar5;
|