s-platform-landing-section 0.1.34 → 0.1.36-beta.1
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 +1971 -972
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1959 -973
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10,17 +10,18 @@ var pi = require('react-icons/pi');
|
|
|
10
10
|
var tb = require('react-icons/tb');
|
|
11
11
|
var si = require('react-icons/si');
|
|
12
12
|
var io = require('react-icons/io');
|
|
13
|
+
var md = require('react-icons/md');
|
|
13
14
|
var fa6 = require('react-icons/fa6');
|
|
14
|
-
require('react-icons/
|
|
15
|
-
var bs = require('react-icons/bs');
|
|
15
|
+
var ai = require('react-icons/ai');
|
|
16
16
|
var lu = require('react-icons/lu');
|
|
17
17
|
var DatePicker = _interopDefault(require('react-datepicker'));
|
|
18
18
|
require('react-datepicker/dist/react-datepicker.css');
|
|
19
19
|
var Slider = _interopDefault(require('react-slick'));
|
|
20
20
|
require('slick-carousel/slick/slick.css');
|
|
21
21
|
require('slick-carousel/slick/slick-theme.css');
|
|
22
|
-
var
|
|
22
|
+
var bs = require('react-icons/bs');
|
|
23
23
|
var go = require('react-icons/go');
|
|
24
|
+
var gr = require('react-icons/gr');
|
|
24
25
|
var ri = require('react-icons/ri');
|
|
25
26
|
var hi = require('react-icons/hi');
|
|
26
27
|
var gi = require('react-icons/gi');
|
|
@@ -950,7 +951,7 @@ var SectionTitle2 = function SectionTitle2(props) {
|
|
|
950
951
|
}), /*#__PURE__*/React__default.createElement(io.IoIosStar, {
|
|
951
952
|
className: "w-4 h-4 text-warning"
|
|
952
953
|
})) : null, data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("div", {
|
|
953
|
-
className: "text-xl text-center leading-relaxed text-textSecondary"
|
|
954
|
+
className: "text-xl text-center leading-relaxed text-textSecondary pb-4"
|
|
954
955
|
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
|
|
955
956
|
};
|
|
956
957
|
|
|
@@ -977,10 +978,27 @@ var SectionTitle4 = function SectionTitle4(props) {
|
|
|
977
978
|
}, data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
|
|
978
979
|
className: "border w-32 border-primary"
|
|
979
980
|
})) : null, data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("p", {
|
|
980
|
-
className: "text-xl text-center
|
|
981
|
+
className: "text-xl text-center leading-relaxed text-secondary mt-2"
|
|
981
982
|
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
|
|
982
983
|
};
|
|
983
984
|
|
|
985
|
+
var SectionTitle5 = function SectionTitle5(props) {
|
|
986
|
+
var data = props.data;
|
|
987
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
988
|
+
className: true
|
|
989
|
+
}, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement("div", {
|
|
990
|
+
className: "flex items-start gap-2"
|
|
991
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
992
|
+
className: "text-secondary text-4xl md:text-5xl"
|
|
993
|
+
}, /*#__PURE__*/React__default.createElement(md.MdKeyboardDoubleArrowRight, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
994
|
+
className: "flex flex-col gap-2"
|
|
995
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
996
|
+
className: "text-2xl md:text-4xl text-textHeading font-medium font-fontHeading"
|
|
997
|
+
}, data === null || data === void 0 ? void 0 : data.sectionTitle), data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("p", {
|
|
998
|
+
className: "text-lg md:text-2xl leading-relaxed text-textSecondary"
|
|
999
|
+
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null)) : null);
|
|
1000
|
+
};
|
|
1001
|
+
|
|
984
1002
|
var Input = React.forwardRef(function (props, ref) {
|
|
985
1003
|
var _props$label = props.label,
|
|
986
1004
|
label = _props$label === void 0 ? "" : _props$label,
|
|
@@ -1213,21 +1231,22 @@ var Hero2 = function Hero2(props) {
|
|
|
1213
1231
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
1214
1232
|
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],
|
|
1215
1233
|
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,
|
|
1216
|
-
className: "w-full h-auto object-cover min-h-[
|
|
1234
|
+
className: "w-full h-auto object-cover min-h-[35vh] max-h-[100vh]"
|
|
1217
1235
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1218
|
-
className: "absolute inset-y-0 right-[
|
|
1219
|
-
}, /*#__PURE__*/React__default.createElement("img", {
|
|
1236
|
+
className: "absolute inset-y-0 right-[2%] md:right-[4%] w-[58%] md:w-[54%] flex flex-col gap-2 md:gap-4 xl:gap-6 justify-center items-start px-4 pt-4 pb-2 md:px-8 md:pt-8 md:pb-6 xl:p-8"
|
|
1237
|
+
}, shopConfig !== null && shopConfig !== void 0 && shopConfig.logoUrl ? /*#__PURE__*/React__default.createElement("img", {
|
|
1220
1238
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
1221
|
-
alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName,
|
|
1222
1239
|
className: "h-6 w-6 sm:h-10 sm:w-10 md:h-12 md:w-12 lg:w-14 lg:h-14 xl:h-20 xl:w-20"
|
|
1223
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1224
|
-
className: "font-medium line-clamp-1 ",
|
|
1240
|
+
}) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
1241
|
+
className: "font-medium line-clamp-2 lg:line-clamp-1 text-2xl md:text-3xl lg:text-4xl xl:text-6xl",
|
|
1225
1242
|
style: {
|
|
1226
|
-
fontSize: "clamp(1.25rem, 4vw, 3.5rem)",
|
|
1227
1243
|
lineHeight: "1.5"
|
|
1228
1244
|
}
|
|
1229
1245
|
}, 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", {
|
|
1230
|
-
className: "
|
|
1246
|
+
className: "line-clamp-3 text-ellipsis text-base md:text-lg lg:text-xl xl:text-2xl",
|
|
1247
|
+
style: {
|
|
1248
|
+
lineHeight: 1.625
|
|
1249
|
+
}
|
|
1231
1250
|
}, 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)));
|
|
1232
1251
|
};
|
|
1233
1252
|
|
|
@@ -1239,13 +1258,16 @@ var Hero5 = function Hero5(props) {
|
|
|
1239
1258
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
1240
1259
|
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],
|
|
1241
1260
|
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,
|
|
1242
|
-
className: "w-full min-h-[
|
|
1261
|
+
className: "w-full min-h-[35vh] max-h-[100vh] object-cover"
|
|
1243
1262
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1244
|
-
className: "absolute inset-0 flex flex-col top-[
|
|
1263
|
+
className: "absolute inset-0 flex flex-col top-[8%] md:top-[10%] gap-1 md:gap-4 p-4 lg:p-10 w-3/5 md:w-1/2 max-w-[90%] left-1 lg:left-10 xl:left-20"
|
|
1245
1264
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1246
|
-
className: "text-xl sm:text-2xl md:text-3xl lg:text-4xl text-textHeading
|
|
1265
|
+
className: "text-xl sm:text-2xl md:text-3xl lg:text-4xl text-textHeading overflow-hidden text-ellipsis font-medium line-clamp-2 xl:line-clamp-1",
|
|
1266
|
+
style: {
|
|
1267
|
+
lineHeight: 1.5
|
|
1268
|
+
}
|
|
1247
1269
|
}, 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", {
|
|
1248
|
-
className: "text-sm md:text-xl lg:text-2xl text-primary line-clamp-3
|
|
1270
|
+
className: "text-sm md:text-xl lg:text-2xl text-primary line-clamp-3 overflow-hidden text-ellipsis"
|
|
1249
1271
|
}, 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)));
|
|
1250
1272
|
};
|
|
1251
1273
|
|
|
@@ -1261,21 +1283,20 @@ var Hero6 = function Hero6(props) {
|
|
|
1261
1283
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
1262
1284
|
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],
|
|
1263
1285
|
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,
|
|
1264
|
-
className: "object-cover w-full h-
|
|
1286
|
+
className: "object-cover w-full min-h-[30vh] max-h-[100vh]"
|
|
1265
1287
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1266
|
-
className: "absolute inset-0 flex flex-col items-center justify-center md:gap-1 lg:gap-2 text-center py-1 md:py-4 px-
|
|
1288
|
+
className: "absolute inset-0 flex flex-col items-center justify-center md:gap-1 lg:gap-2 text-center py-1 md:py-4 px-10 md:px-20 "
|
|
1267
1289
|
}, 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$.title ? /*#__PURE__*/React__default.createElement("div", {
|
|
1268
|
-
className: "text-primary font-headingFont text-center line-clamp-1 text-
|
|
1290
|
+
className: "text-primary font-headingFont text-center line-clamp-1 text-2xl md:text-4xl xl:text-6xl text-ellipsis",
|
|
1269
1291
|
style: {
|
|
1270
|
-
fontSize: "clamp(1rem, 4vw, 3rem)",
|
|
1271
1292
|
lineHeight: "2"
|
|
1272
1293
|
}
|
|
1273
1294
|
}, 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$.title) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
1274
|
-
className: "flex flex-col gap-
|
|
1295
|
+
className: "flex flex-col gap-2 md:gap-4 lg:gap-6 "
|
|
1275
1296
|
}, data !== null && data !== void 0 && (_data$data5 = data.data) !== null && _data$data5 !== void 0 && (_data$data5$ = _data$data5[0]) !== null && _data$data5$ !== void 0 && _data$data5$.description ? /*#__PURE__*/React__default.createElement("div", {
|
|
1276
|
-
className: "line-clamp-
|
|
1297
|
+
className: "line-clamp-2 lg:line-clamp-3 md:text-xl xl:text-2xl",
|
|
1277
1298
|
style: {
|
|
1278
|
-
|
|
1299
|
+
lineHeight: 1.5
|
|
1279
1300
|
}
|
|
1280
1301
|
}, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description) : null, 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) {
|
|
1281
1302
|
return button !== null && button !== void 0 && button.label && (button !== null && button !== void 0 && button.route || button !== null && button !== void 0 && button.link) ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
@@ -1322,13 +1343,16 @@ var Hero10 = function Hero10(props) {
|
|
|
1322
1343
|
|
|
1323
1344
|
var SECTION_DEFAULT_CLASS = "my-12 mx-4 xl:mx-20 bg-background";
|
|
1324
1345
|
var SECTION_CLASS = "my-6 md:my-12 px-4 xl:px-20 bg-background";
|
|
1346
|
+
var SECTION_CLASS_PADDING = "py-6 md:py-12 px-4 xl:px-20 bg-background";
|
|
1325
1347
|
|
|
1326
1348
|
var Hero11 = function Hero11(props) {
|
|
1327
|
-
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3
|
|
1349
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3$, _data$data4, _data$data4$, _data$data4$$buttons;
|
|
1328
1350
|
var _props$data = props.data,
|
|
1329
1351
|
data = _props$data === void 0 ? {} : _props$data,
|
|
1330
1352
|
_props$shopConfigStyl = props.shopConfigStyle,
|
|
1331
|
-
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl
|
|
1353
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
1354
|
+
_props$Link = props.Link,
|
|
1355
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
1332
1356
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1333
1357
|
className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-2 py-12 !bg-bgSecondary gap-6 md:gap-12"
|
|
1334
1358
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -1356,11 +1380,16 @@ var Hero11 = function Hero11(props) {
|
|
|
1356
1380
|
className: "text-2xl md:text-4xl !leading-[1.6] font-headingFont w-max text-center text-primary"
|
|
1357
1381
|
}, 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 = _data$data2$.title) === null || _data$data2$$title === void 0 ? void 0 : _data$data2$$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
|
|
1358
1382
|
className: "text-lg md:text-xl lg:text-2xl"
|
|
1359
|
-
}, 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$.description),
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1383
|
+
}, 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$.description), 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$$buttons = _data$data4$.buttons) === null || _data$data4$$buttons === void 0 ? void 0 : _data$data4$$buttons.map(function (button, index) {
|
|
1384
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
1385
|
+
Link: Link,
|
|
1386
|
+
key: "gdf-" + index,
|
|
1387
|
+
href: convertURL(button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
1388
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
1389
|
+
label: button === null || button === void 0 ? void 0 : button.label,
|
|
1390
|
+
shopConfigStyle: shopConfigStyle,
|
|
1391
|
+
className: "!font-normal w-max"
|
|
1392
|
+
}));
|
|
1364
1393
|
})));
|
|
1365
1394
|
};
|
|
1366
1395
|
|
|
@@ -1386,113 +1415,6 @@ var Hero12 = function Hero12(props) {
|
|
|
1386
1415
|
}, 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$.description)));
|
|
1387
1416
|
};
|
|
1388
1417
|
|
|
1389
|
-
var CarouselItem = function CarouselItem(props) {
|
|
1390
|
-
var _Object$keys;
|
|
1391
|
-
var _props$data = props.data,
|
|
1392
|
-
data = _props$data === void 0 ? [] : _props$data,
|
|
1393
|
-
_props$className = props.className,
|
|
1394
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
1395
|
-
_props$style = props.style,
|
|
1396
|
-
style = _props$style === void 0 ? {} : _props$style,
|
|
1397
|
-
_props$onClick = props.onClick,
|
|
1398
|
-
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
1399
|
-
_props$isAll = props.isAll,
|
|
1400
|
-
isAll = _props$isAll === void 0 ? true : _props$isAll,
|
|
1401
|
-
_props$isNavigateButt = props.isNavigateButton,
|
|
1402
|
-
isNavigateButton = _props$isNavigateButt === void 0 ? true : _props$isNavigateButt,
|
|
1403
|
-
_props$itemClassName = props.itemClassName,
|
|
1404
|
-
itemClassName = _props$itemClassName === void 0 ? "" : _props$itemClassName;
|
|
1405
|
-
var listRef = React.useRef(null);
|
|
1406
|
-
var _useState = React.useState(false),
|
|
1407
|
-
canScrollLeft = _useState[0],
|
|
1408
|
-
setCanScrollLeft = _useState[1];
|
|
1409
|
-
var _useState2 = React.useState(false),
|
|
1410
|
-
canScrollRight = _useState2[0],
|
|
1411
|
-
setCanScrollRight = _useState2[1];
|
|
1412
|
-
var _useState3 = React.useState({}),
|
|
1413
|
-
value = _useState3[0],
|
|
1414
|
-
setValue = _useState3[1];
|
|
1415
|
-
React.useEffect(function () {
|
|
1416
|
-
var _listRef$current;
|
|
1417
|
-
checkScroll();
|
|
1418
|
-
(_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.addEventListener("scroll", checkScroll);
|
|
1419
|
-
return function () {
|
|
1420
|
-
var _listRef$current2;
|
|
1421
|
-
return (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.removeEventListener("scroll", checkScroll);
|
|
1422
|
-
};
|
|
1423
|
-
}, [data]);
|
|
1424
|
-
var checkScroll = function checkScroll() {
|
|
1425
|
-
if (listRef.current) {
|
|
1426
|
-
var _listRef$current3 = listRef.current,
|
|
1427
|
-
scrollLeft = _listRef$current3.scrollLeft,
|
|
1428
|
-
scrollWidth = _listRef$current3.scrollWidth,
|
|
1429
|
-
clientWidth = _listRef$current3.clientWidth;
|
|
1430
|
-
setCanScrollLeft(scrollLeft > 0);
|
|
1431
|
-
setCanScrollRight(scrollLeft + clientWidth < scrollWidth - 1);
|
|
1432
|
-
}
|
|
1433
|
-
};
|
|
1434
|
-
var handleClickPrevImg = function handleClickPrevImg() {
|
|
1435
|
-
if (listRef.current) {
|
|
1436
|
-
checkScroll();
|
|
1437
|
-
listRef.current.scrollBy({
|
|
1438
|
-
left: -300,
|
|
1439
|
-
behavior: "smooth"
|
|
1440
|
-
});
|
|
1441
|
-
}
|
|
1442
|
-
};
|
|
1443
|
-
var handleClickNextImg = function handleClickNextImg() {
|
|
1444
|
-
if (listRef.current) {
|
|
1445
|
-
checkScroll();
|
|
1446
|
-
listRef.current.scrollBy({
|
|
1447
|
-
left: 300,
|
|
1448
|
-
behavior: "smooth"
|
|
1449
|
-
});
|
|
1450
|
-
}
|
|
1451
|
-
};
|
|
1452
|
-
var handleOnClick = function handleOnClick(item) {
|
|
1453
|
-
setValue(item);
|
|
1454
|
-
onClick === null || onClick === void 0 ? void 0 : onClick(item);
|
|
1455
|
-
};
|
|
1456
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
1457
|
-
className: "h-10 md:h-12 flex justify-between items-center " + className,
|
|
1458
|
-
style: style
|
|
1459
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1460
|
-
className: "w-full overflow-hidden "
|
|
1461
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1462
|
-
className: "flex overflow-x-auto gap-2 " + (isNavigateButton ? "no-scrollbar" : "scroll-custom pb-2") + " items-center",
|
|
1463
|
-
ref: listRef
|
|
1464
|
-
}, isAll ? /*#__PURE__*/React__default.createElement("div", {
|
|
1465
|
-
className: " " + ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(value)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0 ? "bg-primary text-textButton" : "bg-background") + " w-max border border-primary p-1 md:p-2 rounded-lg cursor-pointer whitespace-nowrap",
|
|
1466
|
-
onClick: function onClick() {
|
|
1467
|
-
handleOnClick({});
|
|
1468
|
-
}
|
|
1469
|
-
}, "T\u1EA5t c\u1EA3") : null, data && (data === null || data === void 0 ? void 0 : data.length) > 0 && (data === null || data === void 0 ? void 0 : data.map(function (item, index) {
|
|
1470
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
1471
|
-
className: ((value === null || value === void 0 ? void 0 : value.value) === (item === null || item === void 0 ? void 0 : item.value) ? "bg-primary text-textButton" : "bg-background") + " w-max border border-primary py-1 px-2 md:py-2 md:px-3 rounded-lg cursor-pointer whitespace-nowrap " + itemClassName,
|
|
1472
|
-
key: "carousel-" + index,
|
|
1473
|
-
onClick: function onClick() {
|
|
1474
|
-
handleOnClick(item);
|
|
1475
|
-
}
|
|
1476
|
-
}, item === null || item === void 0 ? void 0 : item.label);
|
|
1477
|
-
})))), isNavigateButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
1478
|
-
className: "hidden my-auto gap-4 md:flex justify-end ps-10"
|
|
1479
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
1480
|
-
className: "h-full w-9 h-9 md:h-11 md:w-11 items-center justify-center rounded-full " + (canScrollLeft ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
|
|
1481
|
-
onClick: handleClickPrevImg,
|
|
1482
|
-
disabled: !canScrollLeft
|
|
1483
|
-
}, /*#__PURE__*/React__default.createElement(io.IoIosArrowBack, {
|
|
1484
|
-
size: 24,
|
|
1485
|
-
className: "inline-block text-lg"
|
|
1486
|
-
})), /*#__PURE__*/React__default.createElement("button", {
|
|
1487
|
-
className: "h-full w-9 h-9 md:h-11 md:w-11 flex items-center justify-center rounded-full " + (canScrollRight ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
|
|
1488
|
-
onClick: handleClickNextImg,
|
|
1489
|
-
disabled: !canScrollRight
|
|
1490
|
-
}, /*#__PURE__*/React__default.createElement(io.IoIosArrowForward, {
|
|
1491
|
-
size: 24,
|
|
1492
|
-
className: "inline-block text-lg "
|
|
1493
|
-
}))) : null);
|
|
1494
|
-
};
|
|
1495
|
-
|
|
1496
1418
|
// A type of promise-like that resolves synchronously and supports only one observer
|
|
1497
1419
|
|
|
1498
1420
|
const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
|
|
@@ -1512,6 +1434,19 @@ function _catch(body, recover) {
|
|
|
1512
1434
|
return result;
|
|
1513
1435
|
}
|
|
1514
1436
|
|
|
1437
|
+
// Asynchronously await a promise and pass the result to a finally continuation
|
|
1438
|
+
function _finallyRethrows(body, finalizer) {
|
|
1439
|
+
try {
|
|
1440
|
+
var result = body();
|
|
1441
|
+
} catch (e) {
|
|
1442
|
+
return finalizer(true, e);
|
|
1443
|
+
}
|
|
1444
|
+
if (result && result.then) {
|
|
1445
|
+
return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
|
|
1446
|
+
}
|
|
1447
|
+
return finalizer(false, result);
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1515
1450
|
function bind(fn, thisArg) {
|
|
1516
1451
|
return function wrap() {
|
|
1517
1452
|
return fn.apply(thisArg, arguments);
|
|
@@ -7603,6 +7538,14 @@ var formatCurrency = function formatCurrency(amount) {
|
|
|
7603
7538
|
var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
7604
7539
|
return formattedAmount + " \u20AB";
|
|
7605
7540
|
};
|
|
7541
|
+
var formatCurrency2 = function formatCurrency2(amount) {
|
|
7542
|
+
if (isNaN(amount)) {
|
|
7543
|
+
return 'đ 0';
|
|
7544
|
+
}
|
|
7545
|
+
var roundedAmount = Math.round(amount);
|
|
7546
|
+
var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
7547
|
+
return "\u0111 " + formattedAmount;
|
|
7548
|
+
};
|
|
7606
7549
|
var pattern = {
|
|
7607
7550
|
phoneNumberPattern: /^(?:\+84|0)\d{9}$/
|
|
7608
7551
|
};
|
|
@@ -7700,99 +7643,270 @@ var Hero13 = function Hero13(props) {
|
|
|
7700
7643
|
var _sectionData$, _sectionData$$srcImag, _data$data, _data$data$;
|
|
7701
7644
|
var listRef = React.useRef(null);
|
|
7702
7645
|
var _useState = React.useState(false);
|
|
7703
|
-
var
|
|
7646
|
+
var shopConfig = props.shopConfig,
|
|
7647
|
+
data = props.data;
|
|
7704
7648
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7705
7649
|
var _CategoryController = CategoryController(props);
|
|
7706
7650
|
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("img", {
|
|
7707
7651
|
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],
|
|
7708
7652
|
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,
|
|
7709
7653
|
className: "w-full object-cover"
|
|
7710
|
-
})
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
var data = props.data;
|
|
7715
|
-
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7716
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
7717
|
-
className: "" + SECTION_DEFAULT_CLASS
|
|
7654
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7655
|
+
className: "fixed right-6 bottom-10 md:bottom-24 z-50 flex flex-col gap-4 w-max"
|
|
7656
|
+
}, /*#__PURE__*/React__default.createElement("a", {
|
|
7657
|
+
href: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopPhone ? "tel:" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone) : "#"
|
|
7718
7658
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7719
|
-
className: "
|
|
7720
|
-
},
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7659
|
+
className: "relative w-max"
|
|
7660
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
7661
|
+
className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
|
|
7662
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7663
|
+
className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
|
|
7664
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlinePhone, {
|
|
7665
|
+
size: 36
|
|
7666
|
+
})))), /*#__PURE__*/React__default.createElement("a", {
|
|
7667
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#",
|
|
7668
|
+
target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopMessenger ? "_blank" : "_self"
|
|
7669
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7670
|
+
className: "relative w-max"
|
|
7671
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
7672
|
+
className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
|
|
7673
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7674
|
+
className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
|
|
7675
|
+
}, /*#__PURE__*/React__default.createElement(fa.FaFacebookMessenger, {
|
|
7676
|
+
size: 32
|
|
7677
|
+
})))), /*#__PURE__*/React__default.createElement("a", {
|
|
7678
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#",
|
|
7679
|
+
target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopFacebookPage ? "_blank" : "_self"
|
|
7680
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7681
|
+
className: "relative w-max"
|
|
7682
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
7683
|
+
className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
|
|
7684
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7685
|
+
className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
|
|
7686
|
+
}, /*#__PURE__*/React__default.createElement(si.SiZalo, {
|
|
7687
|
+
size: 32
|
|
7688
|
+
}))))));
|
|
7735
7689
|
};
|
|
7736
7690
|
|
|
7737
|
-
var
|
|
7738
|
-
var _data$
|
|
7691
|
+
var Hero14 = function Hero14(props) {
|
|
7692
|
+
var _data$data, _data$data$, _data$data$$srcImages, _sectionData$, _sectionData$2, _sectionData$3, _sectionData$4, _sectionData$4$button;
|
|
7739
7693
|
var shopConfigStyle = props.shopConfigStyle,
|
|
7740
|
-
shopConfig = props.shopConfig,
|
|
7741
7694
|
data = props.data,
|
|
7742
|
-
_props$SectionTitle = props.SectionTitle,
|
|
7743
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
7744
7695
|
_props$Link = props.Link,
|
|
7745
7696
|
Link = _props$Link === void 0 ? null : _props$Link;
|
|
7746
7697
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7747
|
-
data.sectionTitle = data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.replace("{shopName}", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName);
|
|
7748
|
-
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
7749
|
-
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
|
|
7750
|
-
textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
7751
|
-
_shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
|
|
7752
|
-
background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
|
|
7753
|
-
_shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
|
|
7754
|
-
bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
7755
7698
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7756
|
-
className:
|
|
7699
|
+
className: "relative w-full bg-cover bg-center bg-no-repeat ",
|
|
7757
7700
|
style: {
|
|
7758
|
-
|
|
7759
|
-
color: textBody
|
|
7701
|
+
backgroundImage: "url(" + (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]) + ")"
|
|
7760
7702
|
}
|
|
7761
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
7762
|
-
|
|
7763
|
-
shopConfigStyle: shopConfigStyle
|
|
7703
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7704
|
+
className: "absolute top-0 w-full h-full bg-black opacity-40 z-0"
|
|
7764
7705
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7765
|
-
className: "
|
|
7766
|
-
},
|
|
7706
|
+
className: "relative w-full min-h-[540px] p-12 z-10 flex flex-col gap-6 items-center justify-end bg-gradient-to-t from-black/50 to-transparent"
|
|
7707
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7708
|
+
className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
7709
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.title), sectionData !== null && sectionData !== void 0 && (_sectionData$2 = sectionData[0]) !== null && _sectionData$2 !== void 0 && _sectionData$2.description ? /*#__PURE__*/React__default.createElement("div", {
|
|
7710
|
+
className: "text-lg text-center text-white md:text-2xl"
|
|
7711
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$3 = sectionData[0]) === null || _sectionData$3 === void 0 ? void 0 : _sectionData$3.description) : null, 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$button.map(function (button, index) {
|
|
7767
7712
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7768
7713
|
Link: Link,
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
}, /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title), item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
7777
|
-
className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 h-auto"
|
|
7778
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7779
|
-
dangerouslySetInnerHTML: {
|
|
7780
|
-
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
7781
|
-
}
|
|
7782
|
-
})) : /*#__PURE__*/React__default.createElement("img", {
|
|
7783
|
-
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
7784
|
-
className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 object-cover",
|
|
7785
|
-
alt: ""
|
|
7786
|
-
})));
|
|
7714
|
+
key: "gdf-" + index,
|
|
7715
|
+
href: convertURL(button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
7716
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
7717
|
+
label: button === null || button === void 0 ? void 0 : button.label,
|
|
7718
|
+
className: "!bg-secondary",
|
|
7719
|
+
shopConfigStyle: shopConfigStyle
|
|
7720
|
+
}));
|
|
7787
7721
|
})));
|
|
7788
7722
|
};
|
|
7789
7723
|
|
|
7790
|
-
var
|
|
7791
|
-
var
|
|
7792
|
-
|
|
7793
|
-
_props$
|
|
7794
|
-
|
|
7795
|
-
|
|
7724
|
+
var Hero15 = function Hero15(props) {
|
|
7725
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3$, _data$data4, _data$data4$, _data$data4$$buttons, _data$data5, _data$data5$, _data$data5$$buttons, _data$data5$$buttons$, _data$data6, _data$data6$, _data$data6$$buttons, _data$data6$$buttons$, _data$data7, _data$data7$, _data$data7$$buttons, _data$data7$$buttons$, _data$data8, _data$data8$, _data$data8$$srcImage;
|
|
7726
|
+
var _props$data = props.data,
|
|
7727
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
7728
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
7729
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
7730
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7731
|
+
className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-2 py-12 !bg-primary gap-6 md:gap-10"
|
|
7732
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
7733
|
+
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],
|
|
7734
|
+
className: "object-cover max-w-full h-auto border-4 border-secondary block md:hidden"
|
|
7735
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7736
|
+
className: "relative flex flex-col justify-center gap-6 lg:gap-10"
|
|
7737
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7738
|
+
className: "text-2xl md:text-4xl !leading-[1.6] font-headingFont text-textSecondary"
|
|
7739
|
+
}, 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 = _data$data2$.title) === null || _data$data2$$title === void 0 ? void 0 : _data$data2$$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
|
|
7740
|
+
className: "text-lg text-textButton"
|
|
7741
|
+
}, 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$.description), /*#__PURE__*/React__default.createElement("hr", {
|
|
7742
|
+
className: "w-1/3"
|
|
7743
|
+
}), (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$$buttons = _data$data4$.buttons) === null || _data$data4$$buttons === void 0 ? void 0 : _data$data4$$buttons.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7744
|
+
href: (data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : (_data$data5$ = _data$data5[0]) === null || _data$data5$ === void 0 ? void 0 : (_data$data5$$buttons = _data$data5$.buttons) === null || _data$data5$$buttons === void 0 ? void 0 : (_data$data5$$buttons$ = _data$data5$$buttons[0]) === null || _data$data5$$buttons$ === void 0 ? void 0 : _data$data5$$buttons$.route) || (data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : (_data$data6$$buttons = _data$data6$.buttons) === null || _data$data6$$buttons === void 0 ? void 0 : (_data$data6$$buttons$ = _data$data6$$buttons[0]) === null || _data$data6$$buttons$ === void 0 ? void 0 : _data$data6$$buttons$.link) || "#"
|
|
7745
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
7746
|
+
label: data === null || data === void 0 ? void 0 : (_data$data7 = data.data) === null || _data$data7 === void 0 ? void 0 : (_data$data7$ = _data$data7[0]) === null || _data$data7$ === void 0 ? void 0 : (_data$data7$$buttons = _data$data7$.buttons) === null || _data$data7$$buttons === void 0 ? void 0 : (_data$data7$$buttons$ = _data$data7$$buttons[0]) === null || _data$data7$$buttons$ === void 0 ? void 0 : _data$data7$$buttons$.label,
|
|
7747
|
+
shopConfigStyle: shopConfigStyle,
|
|
7748
|
+
className: "!font-normal w-max !bg-secondary"
|
|
7749
|
+
})) : null), /*#__PURE__*/React__default.createElement("img", {
|
|
7750
|
+
src: data === null || data === void 0 ? void 0 : (_data$data8 = data.data) === null || _data$data8 === void 0 ? void 0 : (_data$data8$ = _data$data8[0]) === null || _data$data8$ === void 0 ? void 0 : (_data$data8$$srcImage = _data$data8$.srcImages) === null || _data$data8$$srcImage === void 0 ? void 0 : _data$data8$$srcImage[0],
|
|
7751
|
+
className: "object-cover max-w-full h-auto border-4 border-secondary hidden md:block"
|
|
7752
|
+
}));
|
|
7753
|
+
};
|
|
7754
|
+
|
|
7755
|
+
var Hero16 = function Hero16(props) {
|
|
7756
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$srcImage;
|
|
7757
|
+
var _props$data = props.data,
|
|
7758
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
7759
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
7760
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
7761
|
+
_props$router = props.router,
|
|
7762
|
+
router = _props$router === void 0 ? function () {} : _props$router,
|
|
7763
|
+
_props$Link = props.Link,
|
|
7764
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
7765
|
+
var _useState = React.useState(""),
|
|
7766
|
+
value = _useState[0],
|
|
7767
|
+
setValue = _useState[1];
|
|
7768
|
+
var handleSearch = function handleSearch(e) {
|
|
7769
|
+
if ((e === null || e === void 0 ? void 0 : e.key) === "Enter" && value && value.length > 0) {
|
|
7770
|
+
router === null || router === void 0 ? void 0 : router.push(genLinkSearch(value));
|
|
7771
|
+
}
|
|
7772
|
+
};
|
|
7773
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7774
|
+
className: "min-h-[480px] w-full h-full relative"
|
|
7775
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
7776
|
+
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],
|
|
7777
|
+
className: "object-cover max-w-full h-auto"
|
|
7778
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7779
|
+
className: "absolute top-0 left-0 z-0 bg-secondary opacity-80 w-full h-full"
|
|
7780
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7781
|
+
className: "w-full md:w-2/3 absolute top-[10%] md:top-1/3 left-0 z-10 px-4 xl:px-20 flex flex-col gap-6 text-textButton my-auto"
|
|
7782
|
+
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
7783
|
+
className: "font-medium text-2xl lg:text-4xl"
|
|
7784
|
+
}, "Thu\u1ED1c t\u1ED1t, gi\xE1 t\u1ED1t - V\xEC s\u1EE9c kh\u1ECFe c\u1EE7a b\u1EA1n"), /*#__PURE__*/React__default.createElement("div", {
|
|
7785
|
+
className: " text-lg lg:text-2xl"
|
|
7786
|
+
}, "Ch\xFAng t\xF4i lu\xF4n n\u1ED5 l\u1EF1c h\u1EBFt m\xECnh cung c\u1EA5p s\u1EA3n ph\u1EA9m v\xE0 d\u1ECBch v\u1EE5 \u0111\xFAng v\u1EDBi gi\xE1 tr\u1ECB m\xE0 kh\xE1ch h\xE0ng mong \u0111\u1EE3i."), /*#__PURE__*/React__default.createElement("div", {
|
|
7787
|
+
className: "flex flex-col md:flex-row gap-4 w-full"
|
|
7788
|
+
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
7789
|
+
wrapClassName: "w-full md:w-2/3 xl:w-[85%]",
|
|
7790
|
+
icons: /*#__PURE__*/React__default.createElement(lu.LuSearch, {
|
|
7791
|
+
className: "text-gray3",
|
|
7792
|
+
size: 18
|
|
7793
|
+
}),
|
|
7794
|
+
placeholder: "Nh\u1EADp t\xEAn s\u1EA3n ph\u1EA9m",
|
|
7795
|
+
inputClassName: "w-full text-textBody",
|
|
7796
|
+
className: "h-12",
|
|
7797
|
+
onKeyDown: function onKeyDown(e) {
|
|
7798
|
+
handleSearch(e);
|
|
7799
|
+
},
|
|
7800
|
+
onChange: setValue
|
|
7801
|
+
}), value && (value === null || value === void 0 ? void 0 : value.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7802
|
+
Link: Link,
|
|
7803
|
+
href: genLinkSearch(value)
|
|
7804
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
7805
|
+
label: "T\xECm ki\u1EBFm",
|
|
7806
|
+
className: "whitespace-nowrap h-12 w-max",
|
|
7807
|
+
shopConfigStyle: shopConfigStyle
|
|
7808
|
+
})) : /*#__PURE__*/React__default.createElement(Button, {
|
|
7809
|
+
label: "T\xECm ki\u1EBFm",
|
|
7810
|
+
className: "whitespace-nowrap w-max h-12",
|
|
7811
|
+
shopConfigStyle: shopConfigStyle
|
|
7812
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
7813
|
+
className: "absolute bottom-0 right-0 text-primary w-[45%] z-10"
|
|
7814
|
+
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
7815
|
+
viewBox: "0 0 480 212",
|
|
7816
|
+
fill: "none",
|
|
7817
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
7818
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
7819
|
+
d: "M75.1847 149.804C55 189.553 14.9932 204.532 0 212H480V0C424.514 20.7319 393 94.1529 216.361 62.1956C120.186 44.7957 96.1405 108.537 75.1847 149.804Z",
|
|
7820
|
+
fill: "currentColor"
|
|
7821
|
+
}))), /*#__PURE__*/React__default.createElement("img", {
|
|
7822
|
+
src: 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$$srcImage = _data$data2$.srcImages) === null || _data$data2$$srcImage === void 0 ? void 0 : _data$data2$$srcImage[1],
|
|
7823
|
+
className: "object-cover w-[28%] h-auto absolute right-10 opacity-100 bottom-0 z-10"
|
|
7824
|
+
}));
|
|
7825
|
+
};
|
|
7826
|
+
|
|
7827
|
+
var Features2 = function Features2(props) {
|
|
7828
|
+
var data = props.data;
|
|
7829
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7830
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7831
|
+
className: "" + SECTION_DEFAULT_CLASS
|
|
7832
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7833
|
+
className: "p-6 grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6 lg:gap-8 rounded-xl bg-bgSecondary"
|
|
7834
|
+
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
7835
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7836
|
+
className: "flex flex-col gap-2 items-center text-sm lg:text-lg font-semibold text-center",
|
|
7837
|
+
key: "dfgg-" + index
|
|
7838
|
+
}, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
7839
|
+
className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24 h-24",
|
|
7840
|
+
dangerouslySetInnerHTML: {
|
|
7841
|
+
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
7842
|
+
}
|
|
7843
|
+
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
7844
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
7845
|
+
className: "w-12 md:w-16 lg:w-20 xl:w-24 text-primary",
|
|
7846
|
+
alt: "logo"
|
|
7847
|
+
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title));
|
|
7848
|
+
})));
|
|
7849
|
+
};
|
|
7850
|
+
|
|
7851
|
+
var Features3 = function Features3(props) {
|
|
7852
|
+
var _data$sectionTitle;
|
|
7853
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
7854
|
+
shopConfig = props.shopConfig,
|
|
7855
|
+
data = props.data,
|
|
7856
|
+
_props$SectionTitle = props.SectionTitle,
|
|
7857
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
7858
|
+
_props$Link = props.Link,
|
|
7859
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
7860
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7861
|
+
data.sectionTitle = data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.replace("{shopName}", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName);
|
|
7862
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
7863
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
|
|
7864
|
+
textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
7865
|
+
_shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
|
|
7866
|
+
background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
|
|
7867
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
|
|
7868
|
+
bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
7869
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7870
|
+
className: SECTION_DEFAULT_CLASS + " flex flex-col gap-4 lg:gap-6",
|
|
7871
|
+
style: {
|
|
7872
|
+
background: background,
|
|
7873
|
+
color: textBody
|
|
7874
|
+
}
|
|
7875
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
7876
|
+
data: data,
|
|
7877
|
+
shopConfigStyle: shopConfigStyle
|
|
7878
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7879
|
+
className: "grid grid-cols-2 sm:grid-cols-4 gap-6 text-sm md:text-base"
|
|
7880
|
+
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
7881
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7882
|
+
Link: Link,
|
|
7883
|
+
href: (item === null || item === void 0 ? void 0 : item.link) || convertURL(item === null || item === void 0 ? void 0 : item.route) || "#"
|
|
7884
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7885
|
+
className: "grid grid-cols-2 p-3 h-full w-full rounded-lg font-semibold",
|
|
7886
|
+
key: "dfsdfj-" + index,
|
|
7887
|
+
style: {
|
|
7888
|
+
background: bgSecondary
|
|
7889
|
+
}
|
|
7890
|
+
}, /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title), item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
7891
|
+
className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 h-auto"
|
|
7892
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7893
|
+
dangerouslySetInnerHTML: {
|
|
7894
|
+
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
7895
|
+
}
|
|
7896
|
+
})) : /*#__PURE__*/React__default.createElement("img", {
|
|
7897
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
7898
|
+
className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 object-cover",
|
|
7899
|
+
alt: ""
|
|
7900
|
+
})));
|
|
7901
|
+
})));
|
|
7902
|
+
};
|
|
7903
|
+
|
|
7904
|
+
var ProductController = function ProductController(props) {
|
|
7905
|
+
var shopConfig = props.shopConfig,
|
|
7906
|
+
params = props.params,
|
|
7907
|
+
_props$isAutoGetList = props.isAutoGetList,
|
|
7908
|
+
isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList;
|
|
7909
|
+
var _useState = React.useState([]),
|
|
7796
7910
|
products = _useState[0],
|
|
7797
7911
|
setProducts = _useState[1];
|
|
7798
7912
|
var _useState2 = React.useState(false),
|
|
@@ -7816,8 +7930,6 @@ var ProductController = function ProductController(props) {
|
|
|
7816
7930
|
setLoading(true);
|
|
7817
7931
|
var _temp = _catch(function () {
|
|
7818
7932
|
var filterParams = _extends({}, defaultParams, params);
|
|
7819
|
-
console.log("filterParams params", params);
|
|
7820
|
-
console.log("filterParams", filterParams);
|
|
7821
7933
|
return Promise.resolve(getProductListApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, filterParams)).then(function (res) {
|
|
7822
7934
|
var _res$data, _res$data$status;
|
|
7823
7935
|
if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$status = _res$data.status) === null || _res$data$status === void 0 ? void 0 : _res$data$status.code) == 200) {
|
|
@@ -8161,33 +8273,34 @@ var ProductPrice = function ProductPrice(props) {
|
|
|
8161
8273
|
}
|
|
8162
8274
|
};
|
|
8163
8275
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8164
|
-
className: className
|
|
8276
|
+
className: "flex gap-4 flex-wrap " + className
|
|
8165
8277
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
8166
|
-
className: "text-primary font-semibold
|
|
8278
|
+
className: "text-primary font-semibold " + priceClassName,
|
|
8167
8279
|
style: style
|
|
8168
8280
|
}, displayPrice), displayPriceBeforeDiscount !== displayPrice && displayPriceBeforeDiscount != null ? /*#__PURE__*/React__default.createElement("span", {
|
|
8169
8281
|
className: "text-gray3 line-through " + priceBeforeDiscountClassName + " "
|
|
8170
|
-
},
|
|
8282
|
+
}, displayPriceBeforeDiscount) : null);
|
|
8171
8283
|
};
|
|
8172
8284
|
|
|
8173
8285
|
var ProductItem1 = function ProductItem1(props) {
|
|
8286
|
+
var _product$productInfo, _product$productInfo2;
|
|
8174
8287
|
var product = props.product;
|
|
8175
8288
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8176
8289
|
className: "flex"
|
|
8177
8290
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
8178
|
-
product: product,
|
|
8291
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
8179
8292
|
className: "!w-20 rounded-lg"
|
|
8180
8293
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
8181
8294
|
className: "ml-4 border-b border-stroke flex-1"
|
|
8182
8295
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8183
8296
|
className: "text-lg"
|
|
8184
|
-
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement("div", {
|
|
8297
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement("div", {
|
|
8185
8298
|
className: "flex mt-2"
|
|
8186
8299
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8187
8300
|
className: "flex-1 text-gray3"
|
|
8188
|
-
}, getDurationValue(product === null || product === void 0 ? void 0 : product.attributes)), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
8189
|
-
product: product
|
|
8190
|
-
}))));
|
|
8301
|
+
}, getDurationValue(product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.attributes)), product !== null && product !== void 0 && product.isShowProductPriceOnLanding ? /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
8302
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo
|
|
8303
|
+
}) : null)));
|
|
8191
8304
|
};
|
|
8192
8305
|
|
|
8193
8306
|
var Dash = function Dash(props) {
|
|
@@ -8227,6 +8340,7 @@ var NotFoundProduct = function NotFoundProduct(props) {
|
|
|
8227
8340
|
};
|
|
8228
8341
|
|
|
8229
8342
|
var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
8343
|
+
var _products$slice;
|
|
8230
8344
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
8231
8345
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
8232
8346
|
_props$data = props.data,
|
|
@@ -8239,7 +8353,8 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8239
8353
|
_shopConfigStyle$colo2 = _shopConfigStyle$colo.secondary,
|
|
8240
8354
|
secondary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2;
|
|
8241
8355
|
var _useState = React.useState({
|
|
8242
|
-
types: "1"
|
|
8356
|
+
types: "1,10",
|
|
8357
|
+
size: 12
|
|
8243
8358
|
}),
|
|
8244
8359
|
params = _useState[0],
|
|
8245
8360
|
setParams = _useState[1];
|
|
@@ -8256,15 +8371,27 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8256
8371
|
var _useState2 = React.useState(0),
|
|
8257
8372
|
selectedCategory = _useState2[0],
|
|
8258
8373
|
setSelectedCategory = _useState2[1];
|
|
8374
|
+
var _useState3 = React.useState(true),
|
|
8375
|
+
isGetMore = _useState3[0],
|
|
8376
|
+
setIsGetMore = _useState3[1];
|
|
8259
8377
|
React.useEffect(function () {
|
|
8260
8378
|
var newParams = _extends({}, params, {
|
|
8261
|
-
categoryId: selectedCategory
|
|
8379
|
+
categoryId: selectedCategory,
|
|
8380
|
+
size: 12
|
|
8262
8381
|
});
|
|
8263
8382
|
if (!selectedCategory) {
|
|
8264
8383
|
delete newParams.categoryId;
|
|
8265
8384
|
}
|
|
8266
8385
|
setParams(newParams);
|
|
8267
8386
|
}, [selectedCategory]);
|
|
8387
|
+
var handleGetMoreProducts = function handleGetMoreProducts() {
|
|
8388
|
+
setIsGetMore(false);
|
|
8389
|
+
setParams(function (prev) {
|
|
8390
|
+
return _extends({}, prev, {
|
|
8391
|
+
size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
|
|
8392
|
+
});
|
|
8393
|
+
});
|
|
8394
|
+
};
|
|
8268
8395
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
8269
8396
|
className: SECTION_DEFAULT_CLASS + " relative"
|
|
8270
8397
|
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
@@ -8281,25 +8408,32 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8281
8408
|
key: index,
|
|
8282
8409
|
className: "p-3 flex gap-3 shrink-0 cursor-pointer text-base " + (selectedCategory === item.categoryId ? "bg-primary text-textButton" : ""),
|
|
8283
8410
|
onClick: function onClick() {
|
|
8284
|
-
|
|
8411
|
+
setSelectedCategory(item.categoryId);
|
|
8412
|
+
setIsGetMore(true);
|
|
8285
8413
|
}
|
|
8286
8414
|
}, item === null || item === void 0 ? void 0 : item.cateName);
|
|
8287
8415
|
}
|
|
8288
|
-
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
8416
|
+
}), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
8289
8417
|
className: "flex w-full justify-center p-12"
|
|
8290
|
-
}, /*#__PURE__*/React__default.createElement(Loading, null)) : products
|
|
8418
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
8291
8419
|
className: "grid grid-cols-1 md:grid-cols-2 gap-10 mt-6"
|
|
8292
|
-
}, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
8420
|
+
}, 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) {
|
|
8293
8421
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
8294
8422
|
key: index,
|
|
8295
8423
|
Link: Link,
|
|
8296
8424
|
href: getLinkServiceDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
8297
8425
|
}, /*#__PURE__*/React__default.createElement(ProductItem1, {
|
|
8298
|
-
product: product
|
|
8426
|
+
product: product
|
|
8299
8427
|
}));
|
|
8300
8428
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
|
|
8301
8429
|
text: "d\u1ECBch v\u1EE5"
|
|
8302
|
-
})
|
|
8430
|
+
}), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement("div", {
|
|
8431
|
+
className: "w-full flex justify-center mt-6"
|
|
8432
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
8433
|
+
label: "Xem thêm",
|
|
8434
|
+
onClick: handleGetMoreProducts,
|
|
8435
|
+
className: "" + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
|
|
8436
|
+
})) : null), /*#__PURE__*/React__default.createElement(Dash, {
|
|
8303
8437
|
color: secondary
|
|
8304
8438
|
}));
|
|
8305
8439
|
};
|
|
@@ -8317,7 +8451,7 @@ var TreatmentsList6 = function TreatmentsList6(props) {
|
|
|
8317
8451
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
8318
8452
|
var _useState = React.useState({
|
|
8319
8453
|
size: 12,
|
|
8320
|
-
types: "1"
|
|
8454
|
+
types: "1,10"
|
|
8321
8455
|
}),
|
|
8322
8456
|
params = _useState[0],
|
|
8323
8457
|
setParams = _useState[1];
|
|
@@ -8350,10 +8484,12 @@ var TreatmentsList6 = function TreatmentsList6(props) {
|
|
|
8350
8484
|
return /*#__PURE__*/React__default.createElement(TreatmentItem, {
|
|
8351
8485
|
Link: Link,
|
|
8352
8486
|
shopConfigStyle: shopConfigStyle,
|
|
8353
|
-
product: product
|
|
8487
|
+
product: product,
|
|
8354
8488
|
key: "htrhr-" + idx
|
|
8355
8489
|
});
|
|
8356
|
-
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct,
|
|
8490
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
|
|
8491
|
+
text: "d\u1ECBch v\u1EE5"
|
|
8492
|
+
}), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
|
|
8357
8493
|
label: "Xem thêm",
|
|
8358
8494
|
onClick: handleGetMoreProducts,
|
|
8359
8495
|
className: "mx-auto " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass),
|
|
@@ -8514,79 +8650,175 @@ var BookingController = function BookingController(props) {
|
|
|
8514
8650
|
};
|
|
8515
8651
|
};
|
|
8516
8652
|
|
|
8517
|
-
var
|
|
8653
|
+
var DateTimePicker = React.forwardRef(function (props, ref) {
|
|
8518
8654
|
var _props$label = props.label,
|
|
8519
8655
|
label = _props$label === void 0 ? "" : _props$label,
|
|
8520
|
-
_props$labelClassName = props.labelClassName,
|
|
8521
|
-
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8522
|
-
_props$placeholder = props.placeholder,
|
|
8523
|
-
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
8524
8656
|
_props$className = props.className,
|
|
8525
8657
|
className = _props$className === void 0 ? "" : _props$className,
|
|
8526
|
-
_props$
|
|
8527
|
-
|
|
8528
|
-
_props$wrapClassName = props.wrapClassName,
|
|
8529
|
-
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
8530
|
-
_props$selectClassNam = props.selectClassName,
|
|
8531
|
-
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
8532
|
-
_props$disabled = props.disabled,
|
|
8533
|
-
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
8534
|
-
_props$rules = props.rules,
|
|
8535
|
-
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
8536
|
-
options = props.options,
|
|
8658
|
+
_props$labelClassName = props.labelClassName,
|
|
8659
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8537
8660
|
_props$defaultValue = props.defaultValue,
|
|
8538
|
-
defaultValue = _props$defaultValue === void 0 ?
|
|
8539
|
-
|
|
8540
|
-
_props$
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
|
|
8546
|
-
_props$funcDelete = props.funcDelete,
|
|
8547
|
-
funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
|
|
8548
|
-
_props$isSearch = props.isSearch,
|
|
8549
|
-
isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
|
|
8550
|
-
renderItem = props.renderItem;
|
|
8551
|
-
var _useState = React.useState(false),
|
|
8552
|
-
isOpen = _useState[0],
|
|
8553
|
-
setIsOpen = _useState[1];
|
|
8554
|
-
var selectRef = React.useRef(null);
|
|
8661
|
+
defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
|
|
8662
|
+
_props$time = props.time,
|
|
8663
|
+
time = _props$time === void 0 ? false : _props$time,
|
|
8664
|
+
rules = props.rules;
|
|
8665
|
+
var _useState = React.useState(defaultValue),
|
|
8666
|
+
value = _useState[0],
|
|
8667
|
+
_setValue = _useState[1];
|
|
8555
8668
|
var _useState2 = React.useState(""),
|
|
8556
8669
|
error = _useState2[0],
|
|
8557
8670
|
_setError = _useState2[1];
|
|
8558
|
-
var
|
|
8559
|
-
|
|
8560
|
-
|
|
8561
|
-
|
|
8562
|
-
|
|
8563
|
-
|
|
8564
|
-
|
|
8565
|
-
|
|
8566
|
-
|
|
8567
|
-
|
|
8568
|
-
|
|
8569
|
-
|
|
8570
|
-
|
|
8571
|
-
|
|
8572
|
-
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
|
|
8577
|
-
|
|
8578
|
-
|
|
8579
|
-
|
|
8580
|
-
|
|
8581
|
-
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8587
|
-
|
|
8588
|
-
|
|
8589
|
-
|
|
8671
|
+
var _className = "h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer " + className;
|
|
8672
|
+
var CustomInput = React.forwardRef(function (_ref, ref) {
|
|
8673
|
+
var value = _ref.value,
|
|
8674
|
+
onClick = _ref.onClick,
|
|
8675
|
+
className = _ref.className;
|
|
8676
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8677
|
+
className: className,
|
|
8678
|
+
onClick: onClick,
|
|
8679
|
+
ref: ref
|
|
8680
|
+
}, value);
|
|
8681
|
+
});
|
|
8682
|
+
React.useImperativeHandle(ref, function () {
|
|
8683
|
+
return {
|
|
8684
|
+
validateData: function validateData() {
|
|
8685
|
+
return _validateData();
|
|
8686
|
+
},
|
|
8687
|
+
setValue: function setValue(text) {
|
|
8688
|
+
return _setValue(text);
|
|
8689
|
+
},
|
|
8690
|
+
getValue: function getValue() {
|
|
8691
|
+
return value;
|
|
8692
|
+
},
|
|
8693
|
+
setError: function setError(err) {
|
|
8694
|
+
return _setError(err);
|
|
8695
|
+
}
|
|
8696
|
+
};
|
|
8697
|
+
});
|
|
8698
|
+
var _validateData = function _validateData() {
|
|
8699
|
+
var count = 0;
|
|
8700
|
+
rules === null || rules === void 0 ? void 0 : rules.forEach(function (e) {
|
|
8701
|
+
var _e$pattern, _e$validate;
|
|
8702
|
+
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
|
|
8703
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8704
|
+
count++;
|
|
8705
|
+
return false;
|
|
8706
|
+
} else if ((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))) {
|
|
8707
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8708
|
+
count++;
|
|
8709
|
+
return false;
|
|
8710
|
+
} 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))) {
|
|
8711
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8712
|
+
count++;
|
|
8713
|
+
return false;
|
|
8714
|
+
}
|
|
8715
|
+
});
|
|
8716
|
+
if (count) {
|
|
8717
|
+
return false;
|
|
8718
|
+
} else {
|
|
8719
|
+
_setError('');
|
|
8720
|
+
return true;
|
|
8721
|
+
}
|
|
8722
|
+
};
|
|
8723
|
+
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
8724
|
+
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
8725
|
+
}));
|
|
8726
|
+
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
8727
|
+
className: "text-danger"
|
|
8728
|
+
}, " *") : null;
|
|
8729
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8730
|
+
className: "w-full"
|
|
8731
|
+
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
8732
|
+
className: "mb-1 " + labelClassName
|
|
8733
|
+
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
|
|
8734
|
+
selected: value,
|
|
8735
|
+
onChange: function onChange(date) {
|
|
8736
|
+
_setValue(date);
|
|
8737
|
+
},
|
|
8738
|
+
customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
|
|
8739
|
+
className: _className
|
|
8740
|
+
}),
|
|
8741
|
+
dateFormat: time ? "dd/MM/yyyy HH:mm" : "dd/MM/yyyy",
|
|
8742
|
+
showTimeSelect: time,
|
|
8743
|
+
timeIntervals: 15,
|
|
8744
|
+
wrapperClassName: "w-full"
|
|
8745
|
+
}), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
8746
|
+
className: "text-danger"
|
|
8747
|
+
}, error) : null);
|
|
8748
|
+
});
|
|
8749
|
+
|
|
8750
|
+
var Select = React.forwardRef(function (props, ref) {
|
|
8751
|
+
var _props$label = props.label,
|
|
8752
|
+
label = _props$label === void 0 ? "" : _props$label,
|
|
8753
|
+
_props$labelClassName = props.labelClassName,
|
|
8754
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8755
|
+
_props$placeholder = props.placeholder,
|
|
8756
|
+
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
8757
|
+
_props$className = props.className,
|
|
8758
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
8759
|
+
_props$optionClassNam = props.optionClassName,
|
|
8760
|
+
optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
|
|
8761
|
+
_props$wrapClassName = props.wrapClassName,
|
|
8762
|
+
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
8763
|
+
_props$selectClassNam = props.selectClassName,
|
|
8764
|
+
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
8765
|
+
_props$disabled = props.disabled,
|
|
8766
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
8767
|
+
_props$rules = props.rules,
|
|
8768
|
+
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
8769
|
+
options = props.options,
|
|
8770
|
+
_props$defaultValue = props.defaultValue,
|
|
8771
|
+
defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
|
|
8772
|
+
_props$isMulti = props.isMulti,
|
|
8773
|
+
isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
|
|
8774
|
+
_props$onClick = props.onClick,
|
|
8775
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
8776
|
+
_props$isButtonDelete = props.isButtonDelete,
|
|
8777
|
+
isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
|
|
8778
|
+
_props$funcDelete = props.funcDelete,
|
|
8779
|
+
funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
|
|
8780
|
+
_props$isSearch = props.isSearch,
|
|
8781
|
+
isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
|
|
8782
|
+
renderItem = props.renderItem;
|
|
8783
|
+
var _useState = React.useState(false),
|
|
8784
|
+
isOpen = _useState[0],
|
|
8785
|
+
setIsOpen = _useState[1];
|
|
8786
|
+
var selectRef = React.useRef(null);
|
|
8787
|
+
var _useState2 = React.useState(""),
|
|
8788
|
+
error = _useState2[0],
|
|
8789
|
+
_setError = _useState2[1];
|
|
8790
|
+
var _useState3 = React.useState(""),
|
|
8791
|
+
inputSearch = _useState3[0],
|
|
8792
|
+
setInputSearch = _useState3[1];
|
|
8793
|
+
var _useState4 = React.useState(defaultValue),
|
|
8794
|
+
value = _useState4[0],
|
|
8795
|
+
setValue = _useState4[1];
|
|
8796
|
+
var _useState5 = React.useState(options),
|
|
8797
|
+
listOptions = _useState5[0],
|
|
8798
|
+
setListOptions = _useState5[1];
|
|
8799
|
+
var dropdownRef = React.useRef(null);
|
|
8800
|
+
var _useState6 = React.useState('bottom'),
|
|
8801
|
+
dropdownPosition = _useState6[0],
|
|
8802
|
+
setDropdownPosition = _useState6[1];
|
|
8803
|
+
var inputRef = React.useRef(null);
|
|
8804
|
+
React.useEffect(function () {
|
|
8805
|
+
if (isMulti) setValue(defaultValue);
|
|
8806
|
+
}, [defaultValue]);
|
|
8807
|
+
React.useEffect(function () {
|
|
8808
|
+
setListOptions(options);
|
|
8809
|
+
if (!isMulti) setValue(defaultValue);
|
|
8810
|
+
}, [options]);
|
|
8811
|
+
React.useEffect(function () {
|
|
8812
|
+
var delayDebounceFn = setTimeout(function () {
|
|
8813
|
+
handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
|
|
8814
|
+
}, 600);
|
|
8815
|
+
return function () {
|
|
8816
|
+
return clearTimeout(delayDebounceFn);
|
|
8817
|
+
};
|
|
8818
|
+
}, [inputSearch]);
|
|
8819
|
+
React.useEffect(function () {
|
|
8820
|
+
var _inputRef$current;
|
|
8821
|
+
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
8590
8822
|
var updateDropdownPosition = function updateDropdownPosition() {
|
|
8591
8823
|
if (selectRef.current && dropdownRef.current) {
|
|
8592
8824
|
var _selectRef$current, _window;
|
|
@@ -8661,20 +8893,13 @@ var Select = React.forwardRef(function (props, ref) {
|
|
|
8661
8893
|
}
|
|
8662
8894
|
};
|
|
8663
8895
|
var handleSearch = function handleSearch(searchValue) {
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
return item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.toLowerCase().includes(searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase());
|
|
8670
|
-
});
|
|
8671
|
-
setListOptions(listFilterOptions);
|
|
8672
|
-
}
|
|
8896
|
+
var listFilterOptions = options.filter(function (item) {
|
|
8897
|
+
var _item$label;
|
|
8898
|
+
return item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.toLowerCase().includes(searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase());
|
|
8899
|
+
});
|
|
8900
|
+
setListOptions(listFilterOptions);
|
|
8673
8901
|
};
|
|
8674
8902
|
var handleToggleSelect = function handleToggleSelect() {
|
|
8675
|
-
if (!isOpen && handleSearchOption && typeof handleSearchOption === 'function') {
|
|
8676
|
-
handleSearchOption("");
|
|
8677
|
-
}
|
|
8678
8903
|
setIsOpen(!isOpen);
|
|
8679
8904
|
setInputSearch("");
|
|
8680
8905
|
setListOptions(options);
|
|
@@ -8710,7 +8935,7 @@ var Select = React.forwardRef(function (props, ref) {
|
|
|
8710
8935
|
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
8711
8936
|
className: "mb-1 " + labelClassName
|
|
8712
8937
|
}, label, " ", labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
8713
|
-
className: "flex flex-col gap-2 rounded-lg w-full bg-white " + (disabled ? "!bg-gray6" : "") + " border " + className
|
|
8938
|
+
className: "flex flex-col gap-2 rounded-lg w-full bg-white " + (disabled ? "!bg-gray6" : "") + " border border-stroke " + className
|
|
8714
8939
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
8715
8940
|
className: " w-full h-10 bg-transparent flex justify-between items-center px-3 py-2 " + selectClassName,
|
|
8716
8941
|
onClick: handleToggleSelect,
|
|
@@ -8773,103 +8998,6 @@ var Select = React.forwardRef(function (props, ref) {
|
|
|
8773
8998
|
});
|
|
8774
8999
|
var Select$1 = React.memo(Select);
|
|
8775
9000
|
|
|
8776
|
-
var DateTimePicker = React.forwardRef(function (props, ref) {
|
|
8777
|
-
var _props$label = props.label,
|
|
8778
|
-
label = _props$label === void 0 ? "" : _props$label,
|
|
8779
|
-
_props$className = props.className,
|
|
8780
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
8781
|
-
_props$labelClassName = props.labelClassName,
|
|
8782
|
-
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8783
|
-
_props$defaultValue = props.defaultValue,
|
|
8784
|
-
defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
|
|
8785
|
-
_props$time = props.time,
|
|
8786
|
-
time = _props$time === void 0 ? false : _props$time,
|
|
8787
|
-
rules = props.rules;
|
|
8788
|
-
var _useState = React.useState(defaultValue),
|
|
8789
|
-
value = _useState[0],
|
|
8790
|
-
_setValue = _useState[1];
|
|
8791
|
-
var _useState2 = React.useState(""),
|
|
8792
|
-
error = _useState2[0],
|
|
8793
|
-
_setError = _useState2[1];
|
|
8794
|
-
var _className = "h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer " + className;
|
|
8795
|
-
var CustomInput = React.forwardRef(function (_ref, ref) {
|
|
8796
|
-
var value = _ref.value,
|
|
8797
|
-
onClick = _ref.onClick,
|
|
8798
|
-
className = _ref.className;
|
|
8799
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
8800
|
-
className: className,
|
|
8801
|
-
onClick: onClick,
|
|
8802
|
-
ref: ref
|
|
8803
|
-
}, value);
|
|
8804
|
-
});
|
|
8805
|
-
React.useImperativeHandle(ref, function () {
|
|
8806
|
-
return {
|
|
8807
|
-
validateData: function validateData() {
|
|
8808
|
-
return _validateData();
|
|
8809
|
-
},
|
|
8810
|
-
setValue: function setValue(text) {
|
|
8811
|
-
return _setValue(text);
|
|
8812
|
-
},
|
|
8813
|
-
getValue: function getValue() {
|
|
8814
|
-
return value;
|
|
8815
|
-
},
|
|
8816
|
-
setError: function setError(err) {
|
|
8817
|
-
return _setError(err);
|
|
8818
|
-
}
|
|
8819
|
-
};
|
|
8820
|
-
});
|
|
8821
|
-
var _validateData = function _validateData() {
|
|
8822
|
-
var count = 0;
|
|
8823
|
-
rules === null || rules === void 0 ? void 0 : rules.forEach(function (e) {
|
|
8824
|
-
var _e$pattern, _e$validate;
|
|
8825
|
-
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
|
|
8826
|
-
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8827
|
-
count++;
|
|
8828
|
-
return false;
|
|
8829
|
-
} else if ((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))) {
|
|
8830
|
-
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8831
|
-
count++;
|
|
8832
|
-
return false;
|
|
8833
|
-
} 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))) {
|
|
8834
|
-
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8835
|
-
count++;
|
|
8836
|
-
return false;
|
|
8837
|
-
}
|
|
8838
|
-
});
|
|
8839
|
-
if (count) {
|
|
8840
|
-
return false;
|
|
8841
|
-
} else {
|
|
8842
|
-
_setError('');
|
|
8843
|
-
return true;
|
|
8844
|
-
}
|
|
8845
|
-
};
|
|
8846
|
-
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
8847
|
-
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
8848
|
-
}));
|
|
8849
|
-
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
8850
|
-
className: "text-danger"
|
|
8851
|
-
}, " *") : null;
|
|
8852
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
8853
|
-
className: "w-full"
|
|
8854
|
-
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
8855
|
-
className: "mb-1 " + labelClassName
|
|
8856
|
-
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
|
|
8857
|
-
selected: value,
|
|
8858
|
-
onChange: function onChange(date) {
|
|
8859
|
-
_setValue(date);
|
|
8860
|
-
},
|
|
8861
|
-
customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
|
|
8862
|
-
className: _className
|
|
8863
|
-
}),
|
|
8864
|
-
dateFormat: time ? "dd/MM/yyyy HH:mm" : "dd/MM/yyyy",
|
|
8865
|
-
showTimeSelect: time,
|
|
8866
|
-
timeIntervals: 15,
|
|
8867
|
-
wrapperClassName: "w-full"
|
|
8868
|
-
}), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
8869
|
-
className: "text-danger"
|
|
8870
|
-
}, error) : null);
|
|
8871
|
-
});
|
|
8872
|
-
|
|
8873
9001
|
var InputPhoneNumber = React.forwardRef(function (props, ref) {
|
|
8874
9002
|
var _props$label = props.label,
|
|
8875
9003
|
label = _props$label === void 0 ? "" : _props$label,
|
|
@@ -9018,150 +9146,312 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
|
|
|
9018
9146
|
}, error) : null);
|
|
9019
9147
|
});
|
|
9020
9148
|
|
|
9021
|
-
var
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
|
|
9031
|
-
|
|
9032
|
-
|
|
9033
|
-
|
|
9034
|
-
|
|
9035
|
-
|
|
9149
|
+
var Select$2 = React.forwardRef(function (props, ref) {
|
|
9150
|
+
var _props$label = props.label,
|
|
9151
|
+
label = _props$label === void 0 ? "" : _props$label,
|
|
9152
|
+
_props$labelClassName = props.labelClassName,
|
|
9153
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
9154
|
+
_props$placeholder = props.placeholder,
|
|
9155
|
+
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
9156
|
+
_props$className = props.className,
|
|
9157
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
9158
|
+
_props$optionClassNam = props.optionClassName,
|
|
9159
|
+
optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
|
|
9160
|
+
_props$wrapClassName = props.wrapClassName,
|
|
9161
|
+
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
9162
|
+
_props$selectClassNam = props.selectClassName,
|
|
9163
|
+
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
9164
|
+
_props$disabled = props.disabled,
|
|
9165
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
9166
|
+
_props$rules = props.rules,
|
|
9167
|
+
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
9168
|
+
options = props.options,
|
|
9169
|
+
_props$defaultValue = props.defaultValue,
|
|
9170
|
+
defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
|
|
9171
|
+
handleSearchOption = props.handleSearchOption,
|
|
9172
|
+
_props$isMulti = props.isMulti,
|
|
9173
|
+
isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
|
|
9174
|
+
_props$onClick = props.onClick,
|
|
9175
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
9176
|
+
_props$isButtonDelete = props.isButtonDelete,
|
|
9177
|
+
isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
|
|
9178
|
+
_props$funcDelete = props.funcDelete,
|
|
9179
|
+
funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
|
|
9180
|
+
setParams = props.setParams,
|
|
9181
|
+
_props$isSearch = props.isSearch,
|
|
9182
|
+
isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
|
|
9183
|
+
renderItem = props.renderItem;
|
|
9184
|
+
var _useState = React.useState(false),
|
|
9185
|
+
isOpen = _useState[0],
|
|
9186
|
+
setIsOpen = _useState[1];
|
|
9187
|
+
var selectRef = React.useRef(null);
|
|
9188
|
+
var _useState2 = React.useState(""),
|
|
9189
|
+
error = _useState2[0],
|
|
9190
|
+
_setError = _useState2[1];
|
|
9191
|
+
var _useState3 = React.useState(""),
|
|
9192
|
+
inputSearch = _useState3[0],
|
|
9193
|
+
setInputSearch = _useState3[1];
|
|
9194
|
+
var _useState4 = React.useState(defaultValue),
|
|
9195
|
+
value = _useState4[0],
|
|
9196
|
+
setValue = _useState4[1];
|
|
9197
|
+
var _useState5 = React.useState(options),
|
|
9198
|
+
listOptions = _useState5[0],
|
|
9199
|
+
setListOptions = _useState5[1];
|
|
9200
|
+
var dropdownRef = React.useRef(null);
|
|
9201
|
+
var _useState6 = React.useState('bottom'),
|
|
9202
|
+
dropdownPosition = _useState6[0],
|
|
9203
|
+
setDropdownPosition = _useState6[1];
|
|
9204
|
+
var inputRef = React.useRef(null);
|
|
9205
|
+
var _useState7 = React.useState(12),
|
|
9206
|
+
nextTrigger = _useState7[0],
|
|
9207
|
+
setNextTrigger = _useState7[1];
|
|
9208
|
+
var optionRef = React.useRef(null);
|
|
9209
|
+
React.useEffect(function () {
|
|
9210
|
+
if (isMulti) setValue(defaultValue);
|
|
9211
|
+
}, [defaultValue]);
|
|
9212
|
+
React.useEffect(function () {
|
|
9213
|
+
setListOptions(options);
|
|
9214
|
+
if (!isMulti) setValue(defaultValue);
|
|
9215
|
+
}, [options]);
|
|
9216
|
+
React.useEffect(function () {
|
|
9217
|
+
if (typeof setParams !== 'function') return;
|
|
9218
|
+
var handleScroll = function handleScroll() {
|
|
9219
|
+
if (!optionRef.current) return;
|
|
9220
|
+
var children = optionRef.current.querySelectorAll('div.option');
|
|
9221
|
+
var parentRect = optionRef.current.getBoundingClientRect();
|
|
9222
|
+
children.forEach(function (child, index) {
|
|
9223
|
+
var rect = child.getBoundingClientRect();
|
|
9224
|
+
if (rect.top >= parentRect.top && rect.bottom <= parentRect.bottom) {
|
|
9225
|
+
if (index === nextTrigger) {
|
|
9226
|
+
setParams === null || setParams === void 0 ? void 0 : setParams(function (prev) {
|
|
9227
|
+
return _extends({}, prev, {
|
|
9228
|
+
size: (prev === null || prev === void 0 ? void 0 : prev.size) + 8
|
|
9229
|
+
});
|
|
9230
|
+
});
|
|
9231
|
+
setNextTrigger(function (prev) {
|
|
9232
|
+
return prev + 8;
|
|
9233
|
+
});
|
|
9234
|
+
}
|
|
9235
|
+
}
|
|
9236
|
+
});
|
|
9237
|
+
};
|
|
9238
|
+
if (optionRef.current) {
|
|
9239
|
+
optionRef.current.addEventListener('scroll', handleScroll);
|
|
9036
9240
|
}
|
|
9037
|
-
return
|
|
9038
|
-
|
|
9039
|
-
|
|
9040
|
-
|
|
9041
|
-
/* eslint-disable no-var */
|
|
9042
|
-
var defaultConverter = {
|
|
9043
|
-
read: function (value) {
|
|
9044
|
-
if (value[0] === '"') {
|
|
9045
|
-
value = value.slice(1, -1);
|
|
9241
|
+
return function () {
|
|
9242
|
+
if (optionRef.current) {
|
|
9243
|
+
optionRef.current.removeEventListener('scroll', handleScroll);
|
|
9046
9244
|
}
|
|
9047
|
-
|
|
9048
|
-
|
|
9049
|
-
|
|
9050
|
-
|
|
9051
|
-
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
}
|
|
9055
|
-
};
|
|
9056
|
-
/* eslint-enable no-var */
|
|
9057
|
-
|
|
9058
|
-
/* eslint-disable no-var */
|
|
9059
|
-
|
|
9060
|
-
function init (converter, defaultAttributes) {
|
|
9061
|
-
function set (name, value, attributes) {
|
|
9062
|
-
if (typeof document === 'undefined') {
|
|
9063
|
-
return
|
|
9245
|
+
};
|
|
9246
|
+
}, [listOptions, nextTrigger]);
|
|
9247
|
+
React.useEffect(function () {
|
|
9248
|
+
var delayDebounceFn = setTimeout(function () {
|
|
9249
|
+
handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
|
|
9250
|
+
if (optionRef.current) {
|
|
9251
|
+
optionRef.current.scrollTop = 0;
|
|
9064
9252
|
}
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9253
|
+
}, 600);
|
|
9254
|
+
return function () {
|
|
9255
|
+
return clearTimeout(delayDebounceFn);
|
|
9256
|
+
};
|
|
9257
|
+
}, [inputSearch]);
|
|
9258
|
+
React.useEffect(function () {
|
|
9259
|
+
var _inputRef$current;
|
|
9260
|
+
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
9261
|
+
var updateDropdownPosition = function updateDropdownPosition() {
|
|
9262
|
+
if (selectRef.current && dropdownRef.current) {
|
|
9263
|
+
var _selectRef$current, _window;
|
|
9264
|
+
var selectRect = selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.getBoundingClientRect();
|
|
9265
|
+
var spaceBelow = ((_window = window) === null || _window === void 0 ? void 0 : _window.innerHeight) - (selectRect === null || selectRect === void 0 ? void 0 : selectRect.bottom);
|
|
9266
|
+
var spaceAbove = selectRect === null || selectRect === void 0 ? void 0 : selectRect.top;
|
|
9267
|
+
if (spaceBelow < spaceAbove) {
|
|
9268
|
+
setDropdownPosition('top');
|
|
9269
|
+
} else {
|
|
9270
|
+
setDropdownPosition('bottom');
|
|
9271
|
+
}
|
|
9070
9272
|
}
|
|
9071
|
-
|
|
9072
|
-
|
|
9273
|
+
};
|
|
9274
|
+
if (isOpen) {
|
|
9275
|
+
updateDropdownPosition();
|
|
9276
|
+
window.addEventListener('resize', updateDropdownPosition);
|
|
9277
|
+
}
|
|
9278
|
+
return function () {
|
|
9279
|
+
window.removeEventListener('resize', updateDropdownPosition);
|
|
9280
|
+
};
|
|
9281
|
+
}, [isOpen]);
|
|
9282
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
9283
|
+
var _selectRef$current2;
|
|
9284
|
+
if (selectRef !== null && selectRef !== void 0 && selectRef.current && !(selectRef !== null && selectRef !== void 0 && (_selectRef$current2 = selectRef.current) !== null && _selectRef$current2 !== void 0 && _selectRef$current2.contains(event.target))) {
|
|
9285
|
+
setIsOpen(false);
|
|
9286
|
+
setInputSearch("");
|
|
9287
|
+
setListOptions(options);
|
|
9288
|
+
}
|
|
9289
|
+
};
|
|
9290
|
+
React.useEffect(function () {
|
|
9291
|
+
document.addEventListener('click', handleClickOutside);
|
|
9292
|
+
return function () {
|
|
9293
|
+
document.removeEventListener('click', handleClickOutside);
|
|
9294
|
+
};
|
|
9295
|
+
}, []);
|
|
9296
|
+
React.useImperativeHandle(ref, function () {
|
|
9297
|
+
return {
|
|
9298
|
+
validateData: function validateData() {
|
|
9299
|
+
return _validateData();
|
|
9300
|
+
},
|
|
9301
|
+
setError: function setError(err) {
|
|
9302
|
+
return _setError(err);
|
|
9073
9303
|
}
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
// Consume the characters of the unparsed-attributes up to,
|
|
9096
|
-
// not including, the first %x3B (";") character.
|
|
9097
|
-
// ...
|
|
9098
|
-
stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
|
|
9304
|
+
};
|
|
9305
|
+
});
|
|
9306
|
+
var isEmpty = function isEmpty(value) {
|
|
9307
|
+
var _Object$keys;
|
|
9308
|
+
if (Array !== null && Array !== void 0 && Array.isArray(value)) return (value === null || value === void 0 ? void 0 : value.length) <= 0;
|
|
9309
|
+
if (typeof value === 'object') return (Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(value)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0;
|
|
9310
|
+
return false;
|
|
9311
|
+
};
|
|
9312
|
+
var _validateData = function _validateData() {
|
|
9313
|
+
var count = 0;
|
|
9314
|
+
for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
|
|
9315
|
+
var _e$pattern;
|
|
9316
|
+
var e = _step.value;
|
|
9317
|
+
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && isEmpty(value)) {
|
|
9318
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
9319
|
+
count++;
|
|
9320
|
+
break;
|
|
9321
|
+
} else if ((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))) {
|
|
9322
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
9323
|
+
count++;
|
|
9324
|
+
break;
|
|
9099
9325
|
}
|
|
9100
|
-
|
|
9101
|
-
return (document.cookie =
|
|
9102
|
-
name + '=' + converter.write(value, name) + stringifiedAttributes)
|
|
9103
9326
|
}
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9327
|
+
if (count) {
|
|
9328
|
+
return false;
|
|
9329
|
+
} else {
|
|
9330
|
+
_setError('');
|
|
9331
|
+
return true;
|
|
9332
|
+
}
|
|
9333
|
+
};
|
|
9334
|
+
var handleSearch = function handleSearch(searchValue) {
|
|
9335
|
+
if (handleSearchOption && typeof handleSearchOption === 'function') {
|
|
9336
|
+
handleSearchOption === null || handleSearchOption === void 0 ? void 0 : handleSearchOption(searchValue);
|
|
9337
|
+
setNextTrigger(12);
|
|
9338
|
+
} else {
|
|
9339
|
+
var listFilterOptions = options.filter(function (item) {
|
|
9340
|
+
var _item$label;
|
|
9341
|
+
return item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.toLowerCase().includes(searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase());
|
|
9342
|
+
});
|
|
9343
|
+
setListOptions(listFilterOptions);
|
|
9344
|
+
}
|
|
9345
|
+
};
|
|
9346
|
+
var handleToggleSelect = function handleToggleSelect() {
|
|
9347
|
+
setIsOpen(!isOpen);
|
|
9348
|
+
setInputSearch("");
|
|
9349
|
+
setListOptions(options);
|
|
9350
|
+
if (typeof setParams === 'function') {
|
|
9351
|
+
setParams === null || setParams === void 0 ? void 0 : setParams(function (prev) {
|
|
9352
|
+
return _extends({}, prev, {
|
|
9353
|
+
size: 16
|
|
9354
|
+
});
|
|
9355
|
+
});
|
|
9356
|
+
setNextTrigger(12);
|
|
9357
|
+
}
|
|
9358
|
+
};
|
|
9359
|
+
var checkSelection = function checkSelection(valueId) {
|
|
9360
|
+
if (isMulti) return value === null || value === void 0 ? void 0 : value.some(function (item) {
|
|
9361
|
+
return (item === null || item === void 0 ? void 0 : item.value) === valueId;
|
|
9362
|
+
});
|
|
9363
|
+
return (value === null || value === void 0 ? void 0 : value.value) == valueId;
|
|
9364
|
+
};
|
|
9365
|
+
var handleSelection = function handleSelection(item, e) {
|
|
9366
|
+
e.stopPropagation();
|
|
9367
|
+
if (!isMulti) {
|
|
9368
|
+
setValue(item);
|
|
9369
|
+
setIsOpen(false);
|
|
9370
|
+
}
|
|
9371
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(item);
|
|
9372
|
+
};
|
|
9373
|
+
var handleDeleteSelection = function handleDeleteSelection(e, item) {
|
|
9374
|
+
e.stopPropagation();
|
|
9375
|
+
if (isMulti === false) setValue({});
|
|
9376
|
+
funcDelete === null || funcDelete === void 0 ? void 0 : funcDelete(item);
|
|
9377
|
+
};
|
|
9378
|
+
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
9379
|
+
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
9380
|
+
}));
|
|
9381
|
+
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
9382
|
+
className: "text-danger"
|
|
9383
|
+
}, " *") : null;
|
|
9384
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9385
|
+
ref: selectRef,
|
|
9386
|
+
className: "relative " + wrapClassName
|
|
9387
|
+
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
9388
|
+
className: "mb-1 " + labelClassName
|
|
9389
|
+
}, label, " ", labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
9390
|
+
className: "flex flex-col gap-2 rounded-lg w-full bg-white " + (disabled ? "!bg-gray6" : "") + " border border-stroke " + className
|
|
9391
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
9392
|
+
className: " w-full h-10 bg-transparent flex justify-between items-center px-3 py-2 " + selectClassName,
|
|
9393
|
+
onClick: handleToggleSelect,
|
|
9394
|
+
disabled: disabled
|
|
9395
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9396
|
+
className: "flex justify-between items-center w-full"
|
|
9397
|
+
}, isEmpty(value) || isMulti ? /*#__PURE__*/React__default.createElement("div", {
|
|
9398
|
+
className: "text-gray3 line-clamp-1"
|
|
9399
|
+
}, placeholder) : /*#__PURE__*/React__default.createElement("div", {
|
|
9400
|
+
className: "w-full text-start pointer-events-none line-clamp-1",
|
|
9401
|
+
dangerouslySetInnerHTML: {
|
|
9402
|
+
__html: value === null || value === void 0 ? void 0 : value.label
|
|
9403
|
+
}
|
|
9404
|
+
}), isButtonDelete && !isEmpty(value) ? /*#__PURE__*/React__default.createElement("div", {
|
|
9405
|
+
onClick: function onClick(e) {
|
|
9406
|
+
handleDeleteSelection(e, value);
|
|
9129
9407
|
}
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9408
|
+
}, /*#__PURE__*/React__default.createElement(rx.RxCross2, null)) : /*#__PURE__*/React__default.createElement("div", {
|
|
9409
|
+
className: "ms-1"
|
|
9410
|
+
}, /*#__PURE__*/React__default.createElement(fa.FaAngleUp, {
|
|
9411
|
+
className: "text-xs"
|
|
9412
|
+
}), /*#__PURE__*/React__default.createElement(fa.FaAngleDown, {
|
|
9413
|
+
className: "text-xs"
|
|
9414
|
+
})))), isOpen ? /*#__PURE__*/React__default.createElement("div", {
|
|
9415
|
+
ref: dropdownRef,
|
|
9416
|
+
style: {
|
|
9417
|
+
background: "#FFFFFF"
|
|
9418
|
+
},
|
|
9419
|
+
className: "absolute p-1 my-2 rounded-2xl w-full z-40 border " + (dropdownPosition === 'top' ? 'bottom-full mb-2' : 'top-full mt-2') + " " + optionClassName
|
|
9420
|
+
}, /*#__PURE__*/React__default.createElement("div", null, isSearch ? /*#__PURE__*/React__default.createElement("div", {
|
|
9421
|
+
className: "px-3 flex items-center border-b-[1px]"
|
|
9422
|
+
}, /*#__PURE__*/React__default.createElement(lu.LuSearch, {
|
|
9423
|
+
className: "inline text-gray3 me-2"
|
|
9424
|
+
}), /*#__PURE__*/React__default.createElement("input", {
|
|
9425
|
+
type: "text",
|
|
9426
|
+
ref: inputRef,
|
|
9427
|
+
className: "py-2 w-full border-0 focus:outline-none focus:ring-0",
|
|
9428
|
+
placeholder: "T\xECm ki\u1EBFm",
|
|
9429
|
+
value: inputSearch,
|
|
9430
|
+
onChange: function onChange(e) {
|
|
9431
|
+
setInputSearch(e.target.value);
|
|
9432
|
+
}
|
|
9433
|
+
})) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
9434
|
+
className: "overflow-y-auto max-h-72 scroll-container",
|
|
9435
|
+
ref: optionRef
|
|
9436
|
+
}, (listOptions === null || listOptions === void 0 ? void 0 : listOptions.length) > 0 ? listOptions === null || listOptions === void 0 ? void 0 : listOptions.map(function (item, index) {
|
|
9437
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9438
|
+
key: "gjfd-" + index,
|
|
9439
|
+
className: "option px-2 cursor-default py-1.5 flex items-center hover:bg-gray-100 rounded-lg",
|
|
9440
|
+
onClick: function onClick(e) {
|
|
9441
|
+
handleSelection(item, e);
|
|
9154
9442
|
}
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
|
|
9443
|
+
}, /*#__PURE__*/React__default.createElement(io.IoMdCheckmark, {
|
|
9444
|
+
className: (checkSelection(item === null || item === void 0 ? void 0 : item.value) ? "" : 'invisible') + " inline me-2 w-4"
|
|
9445
|
+
}), renderItem ? renderItem(item) : /*#__PURE__*/React__default.createElement("div", {
|
|
9446
|
+
className: " whitespace-nowrap line-clamp-1"
|
|
9447
|
+
}, item === null || item === void 0 ? void 0 : item.label));
|
|
9448
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
9449
|
+
className: "py-6 text-center"
|
|
9450
|
+
}, "Kh\xF4ng c\xF3 k\u1EBFt qu\u1EA3")))) : null), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
9451
|
+
className: "text-danger"
|
|
9452
|
+
}, error) : null);
|
|
9164
9453
|
});
|
|
9454
|
+
var SelectDynamic = React.memo(Select$2);
|
|
9165
9455
|
|
|
9166
9456
|
var BookingForm = function BookingForm(props) {
|
|
9167
9457
|
var _props$shopConfig = props.shopConfig,
|
|
@@ -9178,7 +9468,8 @@ var BookingForm = function BookingForm(props) {
|
|
|
9178
9468
|
isModalBooking = _props$isModalBooking === void 0 ? false : _props$isModalBooking;
|
|
9179
9469
|
var _useState = React.useState(false);
|
|
9180
9470
|
var _useState2 = React.useState({
|
|
9181
|
-
types: "1,10"
|
|
9471
|
+
types: "1,10",
|
|
9472
|
+
size: 16
|
|
9182
9473
|
}),
|
|
9183
9474
|
productsParams = _useState2[0],
|
|
9184
9475
|
setProductsParams = _useState2[1];
|
|
@@ -9352,6 +9643,7 @@ var BookingForm = function BookingForm(props) {
|
|
|
9352
9643
|
var handleSearchProducts = function handleSearchProducts(value) {
|
|
9353
9644
|
setProductsParams(function (prev) {
|
|
9354
9645
|
return _extends({}, prev, {
|
|
9646
|
+
size: 16,
|
|
9355
9647
|
productName: value
|
|
9356
9648
|
});
|
|
9357
9649
|
});
|
|
@@ -9388,7 +9680,8 @@ var BookingForm = function BookingForm(props) {
|
|
|
9388
9680
|
className: "grid grid-cols-1 gap-4"
|
|
9389
9681
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9390
9682
|
className: "relative"
|
|
9391
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
9683
|
+
}, /*#__PURE__*/React__default.createElement(SelectDynamic, {
|
|
9684
|
+
setParams: setProductsParams,
|
|
9392
9685
|
ref: inputSelectedRef,
|
|
9393
9686
|
isMulti: true,
|
|
9394
9687
|
defaultValue: listProductSelected,
|
|
@@ -9504,6 +9797,7 @@ var BookingForm = function BookingForm(props) {
|
|
|
9504
9797
|
className: "text-center"
|
|
9505
9798
|
}, "Ch\xFAng t\xF4i \u0111\xE3 ghi nh\u1EADn th\xF4ng tin c\u1EE7a b\u1EA1n v\xE0 s\u1EBD li\xEAn h\u1EC7 l\u1EA1i ngay"))));
|
|
9506
9799
|
};
|
|
9800
|
+
var BookingForm$1 = React.memo(BookingForm);
|
|
9507
9801
|
|
|
9508
9802
|
var TreatmentsList7 = function TreatmentsList7(props) {
|
|
9509
9803
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
@@ -9536,8 +9830,8 @@ var TreatmentsList7 = function TreatmentsList7(props) {
|
|
|
9536
9830
|
params: params
|
|
9537
9831
|
})),
|
|
9538
9832
|
_ProductController$pr = _ProductController.products,
|
|
9539
|
-
products = _ProductController$pr === void 0 ? [] : _ProductController$pr
|
|
9540
|
-
|
|
9833
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
9834
|
+
loading = _ProductController.loading;
|
|
9541
9835
|
var handleOpenModalBooking = function handleOpenModalBooking(event, data) {
|
|
9542
9836
|
try {
|
|
9543
9837
|
var _data$productInfo, _data$productInfo2;
|
|
@@ -9594,7 +9888,9 @@ var TreatmentsList7 = function TreatmentsList7(props) {
|
|
|
9594
9888
|
shopConfigStyle: shopConfigStyle
|
|
9595
9889
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9596
9890
|
className: "mt-12 w-full"
|
|
9597
|
-
},
|
|
9891
|
+
}, loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
9892
|
+
className: "flex justify-center h-20 items-center"
|
|
9893
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(Slider, {
|
|
9598
9894
|
infinite: (products === null || products === void 0 ? void 0 : products.length) > 1 ? true : false,
|
|
9599
9895
|
slidesToShow: 1,
|
|
9600
9896
|
slidesToScroll: 1,
|
|
@@ -9622,7 +9918,7 @@ var TreatmentsList7 = function TreatmentsList7(props) {
|
|
|
9622
9918
|
color: secondary
|
|
9623
9919
|
}), isOpenModal ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
9624
9920
|
onClose: handleCloseModal
|
|
9625
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
9921
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
9626
9922
|
className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh] !bg-bgSecondary",
|
|
9627
9923
|
onCloseFormBooking: handleCloseModal,
|
|
9628
9924
|
defaultValue: dataBooking,
|
|
@@ -9792,7 +10088,7 @@ var ServiceDetail1 = function ServiceDetail1(props) {
|
|
|
9792
10088
|
}
|
|
9793
10089
|
}), /*#__PURE__*/React__default.createElement("p", {
|
|
9794
10090
|
className: "text-lg mt-12 text-xl pb-1 pt-6 border-t border-stroke"
|
|
9795
|
-
}, "M\xF4 t\u1EA3
|
|
10091
|
+
}, "M\xF4 t\u1EA3 d\u1ECBch v\u1EE5"), product !== null && product !== void 0 && product.description ? /*#__PURE__*/React__default.createElement("div", {
|
|
9796
10092
|
className: "h-max"
|
|
9797
10093
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9798
10094
|
ref: descriptionRef,
|
|
@@ -9817,7 +10113,7 @@ var ServiceDetail1 = function ServiceDetail1(props) {
|
|
|
9817
10113
|
className: "text-gray3 mt-2"
|
|
9818
10114
|
}, "Kh\xF4ng c\xF3 th\xF4ng tin"))), isBooking ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
9819
10115
|
onClose: handleCloseModal
|
|
9820
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
10116
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
9821
10117
|
isModalBooking: isBooking,
|
|
9822
10118
|
className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh]",
|
|
9823
10119
|
onCloseFormBooking: handleCloseModal,
|
|
@@ -9927,7 +10223,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
|
|
|
9927
10223
|
}
|
|
9928
10224
|
}), /*#__PURE__*/React__default.createElement("p", {
|
|
9929
10225
|
className: "text-lg mt-12 text-xl pb-1 pt-6 border-t border-stroke"
|
|
9930
|
-
}, "M\xF4 t\u1EA3
|
|
10226
|
+
}, "M\xF4 t\u1EA3 d\u1ECBch v\u1EE5"), product !== null && product !== void 0 && product.description ? /*#__PURE__*/React__default.createElement("div", {
|
|
9931
10227
|
className: "h-max"
|
|
9932
10228
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9933
10229
|
ref: descriptionRef,
|
|
@@ -9952,7 +10248,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
|
|
|
9952
10248
|
className: "text-gray3 mt-2"
|
|
9953
10249
|
}, "Kh\xF4ng c\xF3 th\xF4ng tin"))), isBooking ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
9954
10250
|
onClose: handleCloseModal
|
|
9955
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
10251
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
9956
10252
|
isModalBooking: isBooking,
|
|
9957
10253
|
className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh]",
|
|
9958
10254
|
onCloseFormBooking: handleCloseModal,
|
|
@@ -9963,6 +10259,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
|
|
|
9963
10259
|
};
|
|
9964
10260
|
|
|
9965
10261
|
var ProductItem2 = function ProductItem2(props) {
|
|
10262
|
+
var _product$productInfo;
|
|
9966
10263
|
var product = props.product,
|
|
9967
10264
|
_props$Link = props.Link,
|
|
9968
10265
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
@@ -9970,27 +10267,29 @@ var ProductItem2 = function ProductItem2(props) {
|
|
|
9970
10267
|
className = _props$className === void 0 ? "" : _props$className;
|
|
9971
10268
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
9972
10269
|
Link: Link,
|
|
9973
|
-
href: getLinkProductDetail(product)
|
|
10270
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
9974
10271
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9975
10272
|
className: "text-center relative group " + className
|
|
9976
10273
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
9977
|
-
product: product,
|
|
10274
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
9978
10275
|
className: "max-w-[240px] rounded-full mx-auto !object-cover"
|
|
9979
|
-
}), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
9980
|
-
product: product,
|
|
9981
|
-
className: "text-lg mt-4"
|
|
9982
10276
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10277
|
+
className: "flex justify-center"
|
|
10278
|
+
}, /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10279
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10280
|
+
className: "text-lg mt-4 " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10281
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
9983
10282
|
className: "text-lg mt-2"
|
|
9984
|
-
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement("div", {
|
|
10283
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement("div", {
|
|
9985
10284
|
className: "absolute w-full h-full rounded-2xl top-0 left-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300 bg-[rgba(0,0,0,0.5)] flex flex-col items-center justify-center gap-4"
|
|
9986
10285
|
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
9987
|
-
href: getLinkProductDetail(product)
|
|
10286
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
9988
10287
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
9989
10288
|
label: /*#__PURE__*/React__default.createElement("div", {
|
|
9990
10289
|
className: "flex items-center gap-2"
|
|
9991
10290
|
}, "Xem chi ti\u1EBFt ", /*#__PURE__*/React__default.createElement(fa.FaArrowRight, null))
|
|
9992
10291
|
})), /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
9993
|
-
href: getLinkProductDetail(product)
|
|
10292
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
9994
10293
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
9995
10294
|
label: /*#__PURE__*/React__default.createElement("div", {
|
|
9996
10295
|
className: "flex items-center gap-2"
|
|
@@ -10000,7 +10299,7 @@ var ProductItem2 = function ProductItem2(props) {
|
|
|
10000
10299
|
type: "outline",
|
|
10001
10300
|
className: "!border-white !text-white hover:!border-gray5"
|
|
10002
10301
|
})), /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10003
|
-
href: getLinkProductDetail(product)
|
|
10302
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10004
10303
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
10005
10304
|
label: /*#__PURE__*/React__default.createElement("div", {
|
|
10006
10305
|
className: "flex items-center gap-2"
|
|
@@ -10011,6 +10310,7 @@ var ProductItem2 = function ProductItem2(props) {
|
|
|
10011
10310
|
};
|
|
10012
10311
|
|
|
10013
10312
|
var ProductItem3 = function ProductItem3(props) {
|
|
10313
|
+
var _product$productInfo;
|
|
10014
10314
|
var product = props.product,
|
|
10015
10315
|
_props$Link = props.Link,
|
|
10016
10316
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
@@ -10018,23 +10318,24 @@ var ProductItem3 = function ProductItem3(props) {
|
|
|
10018
10318
|
className = _props$className === void 0 ? "" : _props$className;
|
|
10019
10319
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10020
10320
|
Link: Link,
|
|
10021
|
-
href: getLinkProductDetail(product)
|
|
10321
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10022
10322
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10023
10323
|
className: "w-full border border-stroke rounded-2xl " + className
|
|
10024
10324
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10025
|
-
product: product,
|
|
10325
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10026
10326
|
className: "w-full h-48 md:h-60 xl:h-[304px] rounded-t-2xl"
|
|
10027
10327
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10028
10328
|
className: "p-4 flex flex-col gap-2 md:gap-4 items-start"
|
|
10029
10329
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10030
10330
|
className: "line-clamp-1 w-full overflow-hidden text-ellipsis"
|
|
10031
|
-
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10032
|
-
product: product,
|
|
10033
|
-
className: "text-lg text-start"
|
|
10331
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10332
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10333
|
+
className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10034
10334
|
}))));
|
|
10035
10335
|
};
|
|
10036
10336
|
|
|
10037
10337
|
var ProductItem4 = function ProductItem4(props) {
|
|
10338
|
+
var _product$productInfo;
|
|
10038
10339
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
10039
10340
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10040
10341
|
product = props.product,
|
|
@@ -10044,17 +10345,17 @@ var ProductItem4 = function ProductItem4(props) {
|
|
|
10044
10345
|
className = _props$className === void 0 ? "" : _props$className;
|
|
10045
10346
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10046
10347
|
Link: Link,
|
|
10047
|
-
href: getLinkProductDetail(product)
|
|
10348
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10048
10349
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10049
10350
|
className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
|
|
10050
10351
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10051
|
-
product: product,
|
|
10352
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10052
10353
|
className: "w-full h-40 sm:h-56 lg:h-60 xl:h-64 bg-cover bg-no-repeat rounded-2xl"
|
|
10053
10354
|
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10054
10355
|
className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis text-lg"
|
|
10055
|
-
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10056
|
-
product: product,
|
|
10057
|
-
className: "text-lg text-start mt-2"
|
|
10356
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10357
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10358
|
+
className: "text-lg text-start mt-2 " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10058
10359
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10059
10360
|
className: "flex pt-2 md:pt-4 gap-2 md:gap-4 border-t items-center"
|
|
10060
10361
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -10068,7 +10369,272 @@ var ProductItem4 = function ProductItem4(props) {
|
|
|
10068
10369
|
}))));
|
|
10069
10370
|
};
|
|
10070
10371
|
|
|
10071
|
-
var ProductItem5 = function ProductItem5(props) {
|
|
10372
|
+
var ProductItem5 = function ProductItem5(props) {
|
|
10373
|
+
var _product$productInfo;
|
|
10374
|
+
var product = props.product,
|
|
10375
|
+
_props$Link = props.Link,
|
|
10376
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10377
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10378
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10379
|
+
_props$className = props.className,
|
|
10380
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
10381
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10382
|
+
Link: Link,
|
|
10383
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10384
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10385
|
+
className: "w-full flex flex-col gap-4 rounded-2xl p-1 " + className
|
|
10386
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10387
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10388
|
+
className: "w-full w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
|
|
10389
|
+
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10390
|
+
className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
|
|
10391
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10392
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10393
|
+
className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10394
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10395
|
+
className: "flex gap-2 md:gap-4 "
|
|
10396
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlineShoppingCart, {
|
|
10397
|
+
className: "text-primary p-2.5 h-10 w-12 border border-primary rounded-lg hover:bg-primary hover:text-textButton " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
|
|
10398
|
+
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
10399
|
+
label: "Mua ngay",
|
|
10400
|
+
className: "w-full",
|
|
10401
|
+
shopConfigStyle: shopConfigStyle
|
|
10402
|
+
}))));
|
|
10403
|
+
};
|
|
10404
|
+
|
|
10405
|
+
var ProductItem6 = function ProductItem6(props) {
|
|
10406
|
+
var _product$productInfo;
|
|
10407
|
+
var product = props.product,
|
|
10408
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10409
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10410
|
+
_props$Link = props.Link,
|
|
10411
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10412
|
+
_props$className = props.className,
|
|
10413
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
10414
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10415
|
+
Link: Link,
|
|
10416
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10417
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10418
|
+
className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
|
|
10419
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10420
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10421
|
+
className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
|
|
10422
|
+
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10423
|
+
className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
|
|
10424
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10425
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10426
|
+
className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10427
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10428
|
+
className: "flex pt-4 gap-2 md:gap-4 border-t items-center"
|
|
10429
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10430
|
+
className: "p-2 md:p-[10px] text-primary rounded-lg hover:bg-primary hover:text-textButton hover:opacity-80 border border-primary h-full w-auto flex items-center justify-center " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) + " "
|
|
10431
|
+
}, /*#__PURE__*/React__default.createElement(fi.FiShoppingCart, null)), /*#__PURE__*/React__default.createElement(Button, {
|
|
10432
|
+
label: "Mua ngay",
|
|
10433
|
+
className: "w-full",
|
|
10434
|
+
shopConfigStyle: shopConfigStyle
|
|
10435
|
+
}))));
|
|
10436
|
+
};
|
|
10437
|
+
|
|
10438
|
+
var ProductItem7 = function ProductItem7(props) {
|
|
10439
|
+
var _product$productInfo, _product$productInfo2, _product$productInfo3, _product$productInfo4, _product$productInfo5, _product$productInfo6, _product$productInfo7, _product$productInfo8, _product$productInfo9, _product$productInfo10, _product$productInfo11;
|
|
10440
|
+
var product = props.product,
|
|
10441
|
+
_props$Link = props.Link,
|
|
10442
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10443
|
+
_props$className = props.className,
|
|
10444
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
10445
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10446
|
+
Link: Link,
|
|
10447
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10448
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10449
|
+
className: "w-full bg-bgSecondary relative p-2 md:p-4 rounded-2xl " + className
|
|
10450
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10451
|
+
className: "relative"
|
|
10452
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10453
|
+
className: "px-2 md:px-4 xl:px-6"
|
|
10454
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10455
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10456
|
+
className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl"
|
|
10457
|
+
})), (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.price) !== (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) && product !== null && product !== void 0 && (_product$productInfo3 = product.productInfo) !== null && _product$productInfo3 !== void 0 && _product$productInfo3.priceBeforeDiscount ? /*#__PURE__*/React__default.createElement("div", {
|
|
10458
|
+
className: "absolute top-4 left-0 py-1 px-4 rounded-r-2xl bg-danger text-textButton font-semibold shadow-lg"
|
|
10459
|
+
}, "-", Math.round(100 - (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.price) / (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) * 100)) : null), /*#__PURE__*/React__default.createElement("div", {
|
|
10460
|
+
className: "flex flex-col mt-4 gap-4 items-start"
|
|
10461
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10462
|
+
className: "line-clamp-2 min-h-12 w-full overflow-hidden text-ellipsis"
|
|
10463
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10464
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10465
|
+
className: "text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10466
|
+
})), product !== null && product !== void 0 && product.isShowProductPriceOnLanding && product !== null && product !== void 0 && (_product$productInfo7 = product.productInfo) !== null && _product$productInfo7 !== void 0 && _product$productInfo7.priceBeforeDiscount && (product === null || product === void 0 ? void 0 : (_product$productInfo8 = product.productInfo) === null || _product$productInfo8 === void 0 ? void 0 : _product$productInfo8.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo9 = product.productInfo) === null || _product$productInfo9 === void 0 ? void 0 : _product$productInfo9.price) ? /*#__PURE__*/React__default.createElement("div", {
|
|
10467
|
+
className: "absolute top-5 left-0 font-semibold px-3 py-1 bg-danger text-textButton rounded-r-2xl shadow-lg v-max"
|
|
10468
|
+
}, 1 - 100 * (product === null || product === void 0 ? void 0 : (_product$productInfo10 = product.productInfo) === null || _product$productInfo10 === void 0 ? void 0 : _product$productInfo10.price) / (product === null || product === void 0 ? void 0 : (_product$productInfo11 = product.productInfo) === null || _product$productInfo11 === void 0 ? void 0 : _product$productInfo11.priceBeforeDiscount)) : null));
|
|
10469
|
+
};
|
|
10470
|
+
|
|
10471
|
+
var ProductItem8 = function ProductItem8(props) {
|
|
10472
|
+
var _product$productInfo;
|
|
10473
|
+
var product = props.product,
|
|
10474
|
+
_props$Link = props.Link,
|
|
10475
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10476
|
+
_props$className = props.className,
|
|
10477
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
10478
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10479
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
10480
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10481
|
+
Link: Link,
|
|
10482
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10483
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10484
|
+
className: "text-center rounded relative group " + className
|
|
10485
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10486
|
+
className: "relative "
|
|
10487
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10488
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10489
|
+
className: "h-[340px] md:h-[400px] xl:h-[460px] rounded"
|
|
10490
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10491
|
+
className: "absolute bottom-0 rounded-b pb-6 px-4 bg-gradient-to-t from-black/50 to-transparent flex flex-col items-center h-1/2 gap-2 w-full justify-end "
|
|
10492
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10493
|
+
className: "text-lg text-textButton"
|
|
10494
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10495
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10496
|
+
className: !(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "",
|
|
10497
|
+
priceClassName: "text-textButton !font-normal",
|
|
10498
|
+
priceBeforeDiscountClassName: "text-textButton !font-normal"
|
|
10499
|
+
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
10500
|
+
label: "Th\xEAm v\xE0o gi\u1ECF",
|
|
10501
|
+
shopConfigStyle: shopConfigStyle,
|
|
10502
|
+
className: "hidden group-hover:block transition-all duration-300 !font-normal"
|
|
10503
|
+
})))));
|
|
10504
|
+
};
|
|
10505
|
+
|
|
10506
|
+
var ProductItem9 = function ProductItem9(props) {
|
|
10507
|
+
var _product$productInfo;
|
|
10508
|
+
var product = props.product,
|
|
10509
|
+
_props$Link = props.Link,
|
|
10510
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10511
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10512
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10513
|
+
_props$className = props.className,
|
|
10514
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
10515
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10516
|
+
Link: Link,
|
|
10517
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10518
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10519
|
+
className: "w-full flex flex-col gap-4 rounded-2xl p-2 md:p-6 bg-bgSecondary " + className
|
|
10520
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10521
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10522
|
+
className: "hover:scale-105 transition duration-300 ease-in-out w-full h-44 md:h-56 xl:h-60"
|
|
10523
|
+
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10524
|
+
className: "text-start line-clamp-2 font-medium min-h-12 w-full overflow-hidden text-ellipsis mb-2"
|
|
10525
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10526
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10527
|
+
priceClassName: "!text-secondary !text-base !font-normal",
|
|
10528
|
+
className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10529
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10530
|
+
className: "flex gap-2 md:gap-4 "
|
|
10531
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlineShoppingCart, {
|
|
10532
|
+
className: "text-primary p-2.5 h-10 w-12 border border-primary rounded-lg hover:bg-primary hover:text-textButton " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
|
|
10533
|
+
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
10534
|
+
label: "Mua ngay",
|
|
10535
|
+
className: "w-full",
|
|
10536
|
+
shopConfigStyle: shopConfigStyle
|
|
10537
|
+
}))));
|
|
10538
|
+
};
|
|
10539
|
+
|
|
10540
|
+
var ProductItem10 = function ProductItem10(props) {
|
|
10541
|
+
var _product$productInfo;
|
|
10542
|
+
var product = props.product;
|
|
10543
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10544
|
+
className: "flex border-b border-stroke items-center py-4"
|
|
10545
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10546
|
+
className: "mb-auto"
|
|
10547
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10548
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10549
|
+
className: "!w-24 rounded-lg"
|
|
10550
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10551
|
+
className: "ml-4 flex-1"
|
|
10552
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10553
|
+
className: "text-xl"
|
|
10554
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), product !== null && product !== void 0 && product.isShowProductPriceOnLanding ? /*#__PURE__*/React__default.createElement("div", {
|
|
10555
|
+
className: "mt-2"
|
|
10556
|
+
}, /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10557
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10558
|
+
priceClassName: "!font-normal text-lg"
|
|
10559
|
+
})) : null));
|
|
10560
|
+
};
|
|
10561
|
+
|
|
10562
|
+
function getMinMax$1(array, field) {
|
|
10563
|
+
if (!(array !== null && array !== void 0 && array.length) || !array[0].hasOwnProperty(field)) {
|
|
10564
|
+
return null;
|
|
10565
|
+
}
|
|
10566
|
+
var _array$reduce = array.reduce(function (acc, obj) {
|
|
10567
|
+
var value = obj[field];
|
|
10568
|
+
return {
|
|
10569
|
+
min: value < acc.min ? value : acc.min,
|
|
10570
|
+
max: value > acc.max ? value : acc.max
|
|
10571
|
+
};
|
|
10572
|
+
}, {
|
|
10573
|
+
min: array[0][field],
|
|
10574
|
+
max: array[0][field]
|
|
10575
|
+
}),
|
|
10576
|
+
min = _array$reduce.min,
|
|
10577
|
+
max = _array$reduce.max;
|
|
10578
|
+
return {
|
|
10579
|
+
min: min,
|
|
10580
|
+
max: max
|
|
10581
|
+
};
|
|
10582
|
+
}
|
|
10583
|
+
var ProductPrice2 = function ProductPrice2(props) {
|
|
10584
|
+
var product = props.product,
|
|
10585
|
+
variant = props.variant,
|
|
10586
|
+
_props$className = props.className,
|
|
10587
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
10588
|
+
_props$style = props.style,
|
|
10589
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
10590
|
+
_props$priceClassName = props.priceClassName,
|
|
10591
|
+
priceClassName = _props$priceClassName === void 0 ? "" : _props$priceClassName,
|
|
10592
|
+
_props$priceBeforeDis = props.priceBeforeDiscountClassName,
|
|
10593
|
+
priceBeforeDiscountClassName = _props$priceBeforeDis === void 0 ? "" : _props$priceBeforeDis;
|
|
10594
|
+
var _useState = React.useState(),
|
|
10595
|
+
displayPrice = _useState[0],
|
|
10596
|
+
setDisplayPrice = _useState[1];
|
|
10597
|
+
var _useState2 = React.useState(),
|
|
10598
|
+
displayPriceBeforeDiscount = _useState2[0],
|
|
10599
|
+
setDisplayPriceBeforeDiscount = _useState2[1];
|
|
10600
|
+
React.useEffect(function () {
|
|
10601
|
+
if (variant) {
|
|
10602
|
+
genProductPrice([variant]);
|
|
10603
|
+
} else if (product) {
|
|
10604
|
+
genProductPrice(product.variants);
|
|
10605
|
+
}
|
|
10606
|
+
}, [product, variant]);
|
|
10607
|
+
var genProductPrice = function genProductPrice(variants) {
|
|
10608
|
+
var mPrice = getMinMax$1(variants, 'price');
|
|
10609
|
+
var mPriceBeforeDiscount = getMinMax$1(variants, 'priceBeforeDiscount');
|
|
10610
|
+
if (mPrice && mPriceBeforeDiscount) {
|
|
10611
|
+
var _displayPriceBeforeDiscount = formatCurrency2(mPriceBeforeDiscount.min);
|
|
10612
|
+
var _displayPrice = formatCurrency2(mPrice.min);
|
|
10613
|
+
if (mPrice.min !== mPrice.max) {
|
|
10614
|
+
_displayPrice += " - " + formatCurrency2(mPrice.max);
|
|
10615
|
+
}
|
|
10616
|
+
if (mPriceBeforeDiscount.min !== mPriceBeforeDiscount.max) {
|
|
10617
|
+
_displayPriceBeforeDiscount += " - " + formatCurrency2(mPriceBeforeDiscount.max);
|
|
10618
|
+
}
|
|
10619
|
+
setDisplayPrice(_displayPrice);
|
|
10620
|
+
setDisplayPriceBeforeDiscount(_displayPriceBeforeDiscount);
|
|
10621
|
+
} else {
|
|
10622
|
+
var _displayPrice2 = formatCurrency2(product === null || product === void 0 ? void 0 : product.price);
|
|
10623
|
+
setDisplayPrice(_displayPrice2);
|
|
10624
|
+
}
|
|
10625
|
+
};
|
|
10626
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10627
|
+
className: "flex gap-4 flex-wrap " + className
|
|
10628
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10629
|
+
className: "text-primary font-semibold " + priceClassName,
|
|
10630
|
+
style: style
|
|
10631
|
+
}, displayPrice), displayPriceBeforeDiscount !== displayPrice && displayPriceBeforeDiscount != null ? /*#__PURE__*/React__default.createElement("span", {
|
|
10632
|
+
className: "text-gray3 line-through " + priceBeforeDiscountClassName + " "
|
|
10633
|
+
}, displayPriceBeforeDiscount) : null);
|
|
10634
|
+
};
|
|
10635
|
+
|
|
10636
|
+
var ProductItem11 = function ProductItem11(props) {
|
|
10637
|
+
var _product$productInfo;
|
|
10072
10638
|
var product = props.product,
|
|
10073
10639
|
_props$Link = props.Link,
|
|
10074
10640
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
@@ -10078,17 +10644,22 @@ var ProductItem5 = function ProductItem5(props) {
|
|
|
10078
10644
|
className = _props$className === void 0 ? "" : _props$className;
|
|
10079
10645
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10080
10646
|
Link: Link,
|
|
10081
|
-
href: getLinkProductDetail(product)
|
|
10647
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10082
10648
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10083
|
-
className: "w-full
|
|
10649
|
+
className: "w-full bg-bgSecondary " + className
|
|
10650
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10651
|
+
className: "overflow-hidden"
|
|
10084
10652
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10085
|
-
product: product,
|
|
10086
|
-
className: "
|
|
10087
|
-
}), /*#__PURE__*/React__default.createElement("div",
|
|
10653
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10654
|
+
className: "hover:scale-105 transition duration-300 ease-in-out w-full h-56 sm:h-64 lg:h-72 xl:h-[302px]"
|
|
10655
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10656
|
+
className: "p-4 flex flex-col gap-4"
|
|
10657
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10088
10658
|
className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
|
|
10089
|
-
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(
|
|
10090
|
-
product: product,
|
|
10091
|
-
|
|
10659
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice2, {
|
|
10660
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10661
|
+
priceClassName: "!font-normal",
|
|
10662
|
+
className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10092
10663
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10093
10664
|
className: "flex gap-2 md:gap-4 "
|
|
10094
10665
|
}, /*#__PURE__*/React__default.createElement(ai.AiOutlineShoppingCart, {
|
|
@@ -10097,101 +10668,11 @@ var ProductItem5 = function ProductItem5(props) {
|
|
|
10097
10668
|
label: "Mua ngay",
|
|
10098
10669
|
className: "w-full",
|
|
10099
10670
|
shopConfigStyle: shopConfigStyle
|
|
10100
|
-
}))));
|
|
10101
|
-
};
|
|
10102
|
-
|
|
10103
|
-
var ProductItem6 = function ProductItem6(props) {
|
|
10104
|
-
var product = props.product,
|
|
10105
|
-
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10106
|
-
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10107
|
-
_props$Link = props.Link,
|
|
10108
|
-
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10109
|
-
_props$className = props.className,
|
|
10110
|
-
className = _props$className === void 0 ? "" : _props$className;
|
|
10111
|
-
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10112
|
-
Link: Link,
|
|
10113
|
-
href: getLinkProductDetail(product)
|
|
10114
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10115
|
-
className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
|
|
10116
|
-
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10117
|
-
product: product,
|
|
10118
|
-
className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
|
|
10119
|
-
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10120
|
-
className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
|
|
10121
|
-
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10122
|
-
product: product,
|
|
10123
|
-
className: "text-lg text-start"
|
|
10124
|
-
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10125
|
-
className: "flex pt-4 gap-2 md:gap-4 border-t items-center"
|
|
10126
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10127
|
-
className: "p-2 md:p-[10px] text-primary rounded-lg hover:bg-primary hover:text-textButton hover:opacity-80 border border-primary h-full w-auto flex items-center justify-center " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) + " "
|
|
10128
|
-
}, /*#__PURE__*/React__default.createElement(fi.FiShoppingCart, null)), /*#__PURE__*/React__default.createElement(Button, {
|
|
10129
|
-
label: "Mua ngay",
|
|
10130
|
-
className: "w-full",
|
|
10131
|
-
shopConfigStyle: shopConfigStyle
|
|
10132
|
-
}))));
|
|
10133
|
-
};
|
|
10134
|
-
|
|
10135
|
-
var ProductItem7 = function ProductItem7(props) {
|
|
10136
|
-
var product = props.product,
|
|
10137
|
-
_props$Link = props.Link,
|
|
10138
|
-
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10139
|
-
_props$className = props.className,
|
|
10140
|
-
className = _props$className === void 0 ? "" : _props$className;
|
|
10141
|
-
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10142
|
-
Link: Link,
|
|
10143
|
-
href: getLinkProductDetail(product)
|
|
10144
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10145
|
-
className: "w-full bg-bgSecondary relative rounded-2xl " + className
|
|
10146
|
-
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10147
|
-
product: product,
|
|
10148
|
-
className: "w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-t-2xl"
|
|
10149
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10150
|
-
className: "p-4 flex flex-col gap-4 items-start"
|
|
10151
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10152
|
-
className: "line-clamp-1 w-full overflow-hidden text-ellipsis"
|
|
10153
|
-
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10154
|
-
product: product,
|
|
10155
|
-
className: "text-lg text-start"
|
|
10156
|
-
})), product !== null && product !== void 0 && product.priceBeforeDiscount && (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : product.price) ? /*#__PURE__*/React__default.createElement("div", {
|
|
10157
|
-
className: "absolute top-5 left-0 font-semibold px-3 py-1 bg-danger text-textButton rounded-r-2xl shadow-lg v-max"
|
|
10158
|
-
}, 1 - 100 * (product === null || product === void 0 ? void 0 : product.price) / (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount)) : null));
|
|
10159
|
-
};
|
|
10160
|
-
|
|
10161
|
-
var ProductItem8 = function ProductItem8(props) {
|
|
10162
|
-
var product = props.product,
|
|
10163
|
-
_props$Link = props.Link,
|
|
10164
|
-
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10165
|
-
_props$className = props.className,
|
|
10166
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
10167
|
-
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10168
|
-
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
10169
|
-
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10170
|
-
Link: Link,
|
|
10171
|
-
href: getLinkProductDetail(product)
|
|
10172
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10173
|
-
className: "text-center rounded relative group " + className
|
|
10174
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10175
|
-
className: "relative "
|
|
10176
|
-
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10177
|
-
product: product,
|
|
10178
|
-
className: "min-h-[360px] md:min-h-[400px] xl:min-h-[440px] !object-cover !rounded"
|
|
10179
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10180
|
-
className: "absolute bottom-0 rounded-b pb-6 px-4 bg-gradient-to-t from-black/50 to-transparent flex flex-col items-center h-1/2 gap-2 w-full justify-end "
|
|
10181
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10182
|
-
className: "text-lg text-textButton"
|
|
10183
|
-
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10184
|
-
product: product,
|
|
10185
|
-
priceClassName: "text-textButton !font-normal",
|
|
10186
|
-
priceBeforeDiscountClassName: "text-textButton !font-normal"
|
|
10187
|
-
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
10188
|
-
label: "Th\xEAm v\xE0o gi\u1ECF",
|
|
10189
|
-
shopConfigStyle: shopConfigStyle,
|
|
10190
|
-
className: "hidden group-hover:block transition-all duration-300 !font-normal"
|
|
10191
10671
|
})))));
|
|
10192
10672
|
};
|
|
10193
10673
|
|
|
10194
10674
|
var TreatmentItem1 = function TreatmentItem1(props) {
|
|
10675
|
+
var _product$productInfo;
|
|
10195
10676
|
var product = props.product,
|
|
10196
10677
|
_props$Link = props.Link,
|
|
10197
10678
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
@@ -10199,17 +10680,17 @@ var TreatmentItem1 = function TreatmentItem1(props) {
|
|
|
10199
10680
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
10200
10681
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10201
10682
|
Link: Link,
|
|
10202
|
-
href: getLinkServiceDetail(product)
|
|
10683
|
+
href: getLinkServiceDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10203
10684
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10204
10685
|
className: "w-full flex flex-col gap-4 rounded-2xl p-1"
|
|
10205
10686
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10206
|
-
product: product,
|
|
10687
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10207
10688
|
className: "w-full w-full h-[189px] md:h-[238px] xl:h-[304px] rounded-2xl"
|
|
10208
10689
|
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10209
10690
|
className: "line-clamp-1 mb-2 font-medium text-lg"
|
|
10210
|
-
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10211
|
-
product: product,
|
|
10212
|
-
className: "text-lg text-start"
|
|
10691
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10692
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10693
|
+
className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10213
10694
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10214
10695
|
className: "flex flex-col md:flex-row gap-2 md:items-center md:gap-6 "
|
|
10215
10696
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -10257,7 +10738,7 @@ var ProductList7 = function ProductList7(props) {
|
|
|
10257
10738
|
Link: Link,
|
|
10258
10739
|
shopConfigStyle: shopConfigStyle,
|
|
10259
10740
|
key: index,
|
|
10260
|
-
product: product
|
|
10741
|
+
product: product
|
|
10261
10742
|
});
|
|
10262
10743
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), (products === null || products === void 0 ? void 0 : products.length) > 4 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10263
10744
|
href: "/san-pham",
|
|
@@ -10315,13 +10796,13 @@ var Products2 = function Products2(props) {
|
|
|
10315
10796
|
breakpoint: 1024,
|
|
10316
10797
|
settings: {
|
|
10317
10798
|
slidesToShow: 4,
|
|
10318
|
-
slidesToScroll:
|
|
10799
|
+
slidesToScroll: 1
|
|
10319
10800
|
}
|
|
10320
10801
|
}, {
|
|
10321
10802
|
breakpoint: 1023,
|
|
10322
10803
|
settings: {
|
|
10323
10804
|
slidesToShow: 3,
|
|
10324
|
-
slidesToScroll:
|
|
10805
|
+
slidesToScroll: 1
|
|
10325
10806
|
}
|
|
10326
10807
|
}, {
|
|
10327
10808
|
breakpoint: 635,
|
|
@@ -10329,6 +10810,12 @@ var Products2 = function Products2(props) {
|
|
|
10329
10810
|
slidesToShow: 2,
|
|
10330
10811
|
slidesToScroll: 2
|
|
10331
10812
|
}
|
|
10813
|
+
}, {
|
|
10814
|
+
breakpoint: 370,
|
|
10815
|
+
settings: {
|
|
10816
|
+
slidesToShow: 1,
|
|
10817
|
+
slidesToScroll: 1
|
|
10818
|
+
}
|
|
10332
10819
|
}]
|
|
10333
10820
|
};
|
|
10334
10821
|
React.useEffect(function () {
|
|
@@ -10362,12 +10849,12 @@ var Products2 = function Products2(props) {
|
|
|
10362
10849
|
color: textBody
|
|
10363
10850
|
}
|
|
10364
10851
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10365
|
-
className: "relative rounded-3xl w-full py-
|
|
10852
|
+
className: "relative rounded-3xl w-full py-6 md:py-10 md:px-6 px-3 xl:px-10",
|
|
10366
10853
|
style: {
|
|
10367
10854
|
background: secondary
|
|
10368
10855
|
}
|
|
10369
10856
|
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
10370
|
-
className: "font-semibold text-2xl md:text-4xl lg:text-4xl ps-5 pb-
|
|
10857
|
+
className: "font-semibold text-2xl md:text-4xl lg:text-4xl ps-5 pb-6",
|
|
10371
10858
|
style: {
|
|
10372
10859
|
color: textButton
|
|
10373
10860
|
}
|
|
@@ -10381,15 +10868,15 @@ var Products2 = function Products2(props) {
|
|
|
10381
10868
|
beforeChange: handleBeforeChange
|
|
10382
10869
|
}), products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
10383
10870
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10384
|
-
className: "px-2 lg:px-3",
|
|
10871
|
+
className: "px-1 md:px-2 lg:px-3",
|
|
10385
10872
|
key: "dfg-" + index
|
|
10386
10873
|
}, /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10387
|
-
product: product
|
|
10874
|
+
product: product,
|
|
10388
10875
|
Link: Link,
|
|
10389
10876
|
shopConfigStyle: shopConfigStyle
|
|
10390
10877
|
}));
|
|
10391
10878
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
10392
|
-
className: "absolute left-0 top-
|
|
10879
|
+
className: "absolute left-0 top-[45%] w-full flex justify-between px-2 md:px-4 lg:px-6"
|
|
10393
10880
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
10394
10881
|
onClick: goToPrev,
|
|
10395
10882
|
className: (canGoPrev ? "bg-primary" : "bg-gray5 cursor-not-allowed") + " p-2 rounded-full"
|
|
@@ -10434,7 +10921,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
10434
10921
|
for (var i = start; i <= end; i++) {
|
|
10435
10922
|
pages.push(i);
|
|
10436
10923
|
}
|
|
10437
|
-
if (current_page < total_pages -
|
|
10924
|
+
if (current_page < total_pages - 3) pages.push("...");
|
|
10438
10925
|
pages.push(total_pages);
|
|
10439
10926
|
return pages;
|
|
10440
10927
|
};
|
|
@@ -10454,7 +10941,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
10454
10941
|
onClick: function onClick() {
|
|
10455
10942
|
return typeof page === "number" && handlePageChange(page - 1);
|
|
10456
10943
|
},
|
|
10457
|
-
className: "px-4 py-1 rounded-md " + (page === current_page + 1 ? "bg-primary text-white" : "bg-transparent text-primary") + " hover:opacity-80 " + (page === "..." ? "cursor-default text-gray-500" : ""),
|
|
10944
|
+
className: "px-2 md:px-4 py-1 rounded-md " + (page === current_page + 1 ? "bg-primary text-white" : "bg-transparent text-primary") + " hover:opacity-80 " + (page === "..." ? "cursor-default text-gray-500" : ""),
|
|
10458
10945
|
disabled: page === "..."
|
|
10459
10946
|
}, page);
|
|
10460
10947
|
})), /*#__PURE__*/React__default.createElement(io5.IoChevronForwardOutline, {
|
|
@@ -10496,9 +10983,7 @@ var Products3 = function Products3(props) {
|
|
|
10496
10983
|
loading = _ProductController.loading,
|
|
10497
10984
|
page = _ProductController.page;
|
|
10498
10985
|
var _CategoryController = CategoryController(_extends({}, props, {
|
|
10499
|
-
|
|
10500
|
-
type: "0"
|
|
10501
|
-
}
|
|
10986
|
+
types: "0"
|
|
10502
10987
|
})),
|
|
10503
10988
|
categories = _CategoryController.categories;
|
|
10504
10989
|
React.useEffect(function () {
|
|
@@ -10508,118 +10993,292 @@ var Products3 = function Products3(props) {
|
|
|
10508
10993
|
categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId
|
|
10509
10994
|
}));
|
|
10510
10995
|
}
|
|
10511
|
-
}, [categorySelected]);
|
|
10512
|
-
var onSelectCategory = function onSelectCategory(category) {
|
|
10513
|
-
setCategorySelected(category);
|
|
10996
|
+
}, [categorySelected]);
|
|
10997
|
+
var onSelectCategory = function onSelectCategory(category) {
|
|
10998
|
+
setCategorySelected(category);
|
|
10999
|
+
};
|
|
11000
|
+
var onPageChange = function onPageChange(pageNum) {
|
|
11001
|
+
setProductParams(_extends({}, productParams, {
|
|
11002
|
+
page: pageNum
|
|
11003
|
+
}));
|
|
11004
|
+
};
|
|
11005
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
11006
|
+
className: "" + SECTION_DEFAULT_CLASS
|
|
11007
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
11008
|
+
data: data,
|
|
11009
|
+
shopConfigStyle: shopConfigStyle
|
|
11010
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11011
|
+
className: "grid grid-cols-1 md:grid-cols-4 gap-12"
|
|
11012
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11013
|
+
className: "hidden md:block"
|
|
11014
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11015
|
+
className: "text-xl"
|
|
11016
|
+
}, "Danh m\u1EE5c s\u1EA3n ph\u1EA9m"), /*#__PURE__*/React__default.createElement("div", {
|
|
11017
|
+
className: "overflow-y-auto max-h-96 scroll-container pr-3"
|
|
11018
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11019
|
+
className: "flex gap-2 py-4 border-b border-stroke cursor-pointer hover:text-primary " + (!(categorySelected !== null && categorySelected !== void 0 && categorySelected.categoryId) ? "text-primary" : "text-textSecondary"),
|
|
11020
|
+
onClick: function onClick() {
|
|
11021
|
+
return onSelectCategory({
|
|
11022
|
+
categoryId: undefined
|
|
11023
|
+
});
|
|
11024
|
+
}
|
|
11025
|
+
}, /*#__PURE__*/React__default.createElement(io.IoIosHeartEmpty, {
|
|
11026
|
+
size: 24
|
|
11027
|
+
}), /*#__PURE__*/React__default.createElement("div", null, "T\u1EA5t c\u1EA3")), categories === null || categories === void 0 ? void 0 : categories.map(function (category, index) {
|
|
11028
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11029
|
+
className: "flex gap-2 py-4 border-b border-stroke cursor-pointer hover:text-primary " + ((categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId) === (category === null || category === void 0 ? void 0 : category.categoryId) ? "text-primary" : "text-textSecondary"),
|
|
11030
|
+
key: index,
|
|
11031
|
+
onClick: function onClick() {
|
|
11032
|
+
return onSelectCategory(category);
|
|
11033
|
+
}
|
|
11034
|
+
}, /*#__PURE__*/React__default.createElement(io.IoIosHeartEmpty, {
|
|
11035
|
+
size: 24
|
|
11036
|
+
}), /*#__PURE__*/React__default.createElement("div", null, category === null || category === void 0 ? void 0 : category.cateName));
|
|
11037
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
11038
|
+
className: "md:hidden"
|
|
11039
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11040
|
+
className: "col-span-3 text-center"
|
|
11041
|
+
}, loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
11042
|
+
className: "flex w-full justify-center items-center p-12 h-[700px]"
|
|
11043
|
+
}, /*#__PURE__*/React__default.createElement(Loading, {
|
|
11044
|
+
size: 32
|
|
11045
|
+
})) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
11046
|
+
className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-12 mt-12"
|
|
11047
|
+
}, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
11048
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
11049
|
+
Link: Link,
|
|
11050
|
+
key: index,
|
|
11051
|
+
shopConfigStyle: shopConfigStyle,
|
|
11052
|
+
product: product
|
|
11053
|
+
});
|
|
11054
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), (page === null || page === void 0 ? void 0 : page.total_pages) > 1 ? /*#__PURE__*/React__default.createElement(Pagination, _extends({
|
|
11055
|
+
className: "mt-12"
|
|
11056
|
+
}, page, {
|
|
11057
|
+
onPageChange: onPageChange
|
|
11058
|
+
})) : null))), /*#__PURE__*/React__default.createElement(Dash, {
|
|
11059
|
+
color: secondary
|
|
11060
|
+
}));
|
|
11061
|
+
};
|
|
11062
|
+
|
|
11063
|
+
var CarouselItem = function CarouselItem(props) {
|
|
11064
|
+
var _Object$keys;
|
|
11065
|
+
var _props$data = props.data,
|
|
11066
|
+
data = _props$data === void 0 ? [] : _props$data,
|
|
11067
|
+
_props$className = props.className,
|
|
11068
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
11069
|
+
_props$style = props.style,
|
|
11070
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
11071
|
+
_props$onClick = props.onClick,
|
|
11072
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
11073
|
+
_props$isAll = props.isAll,
|
|
11074
|
+
isAll = _props$isAll === void 0 ? true : _props$isAll,
|
|
11075
|
+
_props$isNavigateButt = props.isNavigateButton,
|
|
11076
|
+
isNavigateButton = _props$isNavigateButt === void 0 ? true : _props$isNavigateButt,
|
|
11077
|
+
_props$itemClassName = props.itemClassName,
|
|
11078
|
+
itemClassName = _props$itemClassName === void 0 ? "" : _props$itemClassName;
|
|
11079
|
+
var listRef = React.useRef(null);
|
|
11080
|
+
var _useState = React.useState(false),
|
|
11081
|
+
canScrollLeft = _useState[0],
|
|
11082
|
+
setCanScrollLeft = _useState[1];
|
|
11083
|
+
var _useState2 = React.useState(false),
|
|
11084
|
+
canScrollRight = _useState2[0],
|
|
11085
|
+
setCanScrollRight = _useState2[1];
|
|
11086
|
+
var _useState3 = React.useState({}),
|
|
11087
|
+
value = _useState3[0],
|
|
11088
|
+
setValue = _useState3[1];
|
|
11089
|
+
React.useEffect(function () {
|
|
11090
|
+
var _listRef$current;
|
|
11091
|
+
checkScroll();
|
|
11092
|
+
(_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.addEventListener("scroll", checkScroll);
|
|
11093
|
+
return function () {
|
|
11094
|
+
var _listRef$current2;
|
|
11095
|
+
return (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.removeEventListener("scroll", checkScroll);
|
|
11096
|
+
};
|
|
11097
|
+
}, [data]);
|
|
11098
|
+
var checkScroll = function checkScroll() {
|
|
11099
|
+
if (listRef.current) {
|
|
11100
|
+
var _listRef$current3 = listRef.current,
|
|
11101
|
+
scrollLeft = _listRef$current3.scrollLeft,
|
|
11102
|
+
scrollWidth = _listRef$current3.scrollWidth,
|
|
11103
|
+
clientWidth = _listRef$current3.clientWidth;
|
|
11104
|
+
setCanScrollLeft(scrollLeft > 0);
|
|
11105
|
+
setCanScrollRight(scrollLeft + clientWidth < scrollWidth - 1);
|
|
11106
|
+
}
|
|
11107
|
+
};
|
|
11108
|
+
var handleClickPrevImg = function handleClickPrevImg() {
|
|
11109
|
+
if (listRef.current) {
|
|
11110
|
+
checkScroll();
|
|
11111
|
+
listRef.current.scrollBy({
|
|
11112
|
+
left: -300,
|
|
11113
|
+
behavior: "smooth"
|
|
11114
|
+
});
|
|
11115
|
+
}
|
|
11116
|
+
};
|
|
11117
|
+
var handleClickNextImg = function handleClickNextImg() {
|
|
11118
|
+
if (listRef.current) {
|
|
11119
|
+
checkScroll();
|
|
11120
|
+
listRef.current.scrollBy({
|
|
11121
|
+
left: 300,
|
|
11122
|
+
behavior: "smooth"
|
|
11123
|
+
});
|
|
11124
|
+
}
|
|
10514
11125
|
};
|
|
10515
|
-
var
|
|
10516
|
-
|
|
10517
|
-
|
|
10518
|
-
}));
|
|
11126
|
+
var handleOnClick = function handleOnClick(item) {
|
|
11127
|
+
setValue(item);
|
|
11128
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(item);
|
|
10519
11129
|
};
|
|
10520
|
-
return /*#__PURE__*/React__default.createElement(
|
|
10521
|
-
className: "" +
|
|
10522
|
-
|
|
10523
|
-
data: data,
|
|
10524
|
-
shopConfigStyle: shopConfigStyle
|
|
10525
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10526
|
-
className: "grid grid-cols-1 md:grid-cols-4 gap-12"
|
|
10527
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10528
|
-
className: "hidden md:block"
|
|
11130
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11131
|
+
className: "h-10 md:h-12 flex justify-between items-center " + className,
|
|
11132
|
+
style: style
|
|
10529
11133
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10530
|
-
className: "
|
|
10531
|
-
}, "Danh m\u1EE5c s\u1EA3n ph\u1EA9m"), /*#__PURE__*/React__default.createElement("div", {
|
|
10532
|
-
className: "overflow-y-auto max-h-96 scroll-container pr-3"
|
|
11134
|
+
className: "w-full overflow-hidden "
|
|
10533
11135
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10534
|
-
className: "flex
|
|
11136
|
+
className: "flex overflow-x-auto gap-2 " + (isNavigateButton ? "no-scrollbar" : "scroll-custom pb-2") + " items-center",
|
|
11137
|
+
ref: listRef
|
|
11138
|
+
}, isAll ? /*#__PURE__*/React__default.createElement("div", {
|
|
11139
|
+
className: " " + ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(value)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0 ? "bg-primary text-textButton" : "bg-background") + " text-primary w-max border border-primary p-1 md:p-2 rounded-lg cursor-pointer whitespace-nowrap",
|
|
10535
11140
|
onClick: function onClick() {
|
|
10536
|
-
|
|
10537
|
-
categoryId: undefined
|
|
10538
|
-
});
|
|
11141
|
+
handleOnClick({});
|
|
10539
11142
|
}
|
|
10540
|
-
},
|
|
10541
|
-
size: 24
|
|
10542
|
-
}), /*#__PURE__*/React__default.createElement("div", null, "T\u1EA5t c\u1EA3")), categories === null || categories === void 0 ? void 0 : categories.map(function (category, index) {
|
|
11143
|
+
}, "T\u1EA5t c\u1EA3") : null, data && (data === null || data === void 0 ? void 0 : data.length) > 0 && (data === null || data === void 0 ? void 0 : data.map(function (item, index) {
|
|
10543
11144
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10544
|
-
className:
|
|
10545
|
-
key: index,
|
|
11145
|
+
className: ((value === null || value === void 0 ? void 0 : value.value) === (item === null || item === void 0 ? void 0 : item.value) ? "bg-primary text-textButton" : "bg-background") + " w-max border text-primary border-primary py-1 px-2 md:py-2 md:px-3 rounded-lg cursor-pointer whitespace-nowrap " + itemClassName,
|
|
11146
|
+
key: "carousel-" + index,
|
|
10546
11147
|
onClick: function onClick() {
|
|
10547
|
-
|
|
11148
|
+
handleOnClick(item);
|
|
10548
11149
|
}
|
|
10549
|
-
},
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
}
|
|
10553
|
-
className: "md:
|
|
10554
|
-
|
|
10555
|
-
|
|
10556
|
-
},
|
|
10557
|
-
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
|
|
10561
|
-
|
|
10562
|
-
|
|
10563
|
-
|
|
10564
|
-
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo
|
|
10568
|
-
});
|
|
10569
|
-
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), (page === null || page === void 0 ? void 0 : page.total_pages) > 1 ? /*#__PURE__*/React__default.createElement(Pagination, _extends({
|
|
10570
|
-
className: "mt-12"
|
|
10571
|
-
}, page, {
|
|
10572
|
-
onPageChange: onPageChange
|
|
10573
|
-
})) : null))), /*#__PURE__*/React__default.createElement(Dash, {
|
|
10574
|
-
color: secondary
|
|
10575
|
-
}));
|
|
11150
|
+
}, item === null || item === void 0 ? void 0 : item.label);
|
|
11151
|
+
})))), isNavigateButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
11152
|
+
className: "hidden my-auto gap-4 md:flex justify-end ps-10"
|
|
11153
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
11154
|
+
className: "h-full w-9 h-9 md:h-11 md:w-11 items-center justify-center rounded-full " + (canScrollLeft ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
|
|
11155
|
+
onClick: handleClickPrevImg,
|
|
11156
|
+
disabled: !canScrollLeft
|
|
11157
|
+
}, /*#__PURE__*/React__default.createElement(io.IoIosArrowBack, {
|
|
11158
|
+
size: 24,
|
|
11159
|
+
className: "inline-block text-lg"
|
|
11160
|
+
})), /*#__PURE__*/React__default.createElement("button", {
|
|
11161
|
+
className: "h-full w-9 h-9 md:h-11 md:w-11 flex items-center justify-center rounded-full " + (canScrollRight ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
|
|
11162
|
+
onClick: handleClickNextImg,
|
|
11163
|
+
disabled: !canScrollRight
|
|
11164
|
+
}, /*#__PURE__*/React__default.createElement(io.IoIosArrowForward, {
|
|
11165
|
+
size: 24,
|
|
11166
|
+
className: "inline-block text-lg "
|
|
11167
|
+
}))) : null);
|
|
10576
11168
|
};
|
|
10577
11169
|
|
|
10578
11170
|
var Products9 = function Products9(props) {
|
|
10579
|
-
var _Object$
|
|
11171
|
+
var _Object$keys2;
|
|
10580
11172
|
var _props$Link = props.Link,
|
|
10581
11173
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10582
11174
|
shopConfigStyle = props.shopConfigStyle,
|
|
10583
11175
|
_props$ProductItem = props.ProductItem,
|
|
10584
11176
|
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
10585
|
-
var _useState = React.useState(
|
|
11177
|
+
var _useState = React.useState(true),
|
|
11178
|
+
loading = _useState[0],
|
|
11179
|
+
setLoading = _useState[1];
|
|
11180
|
+
var _useState2 = React.useState({
|
|
10586
11181
|
size: 12
|
|
10587
11182
|
}),
|
|
10588
|
-
params =
|
|
10589
|
-
|
|
10590
|
-
|
|
11183
|
+
params = _useState2[0];
|
|
11184
|
+
var _useState3 = React.useState(false),
|
|
11185
|
+
isAutoGetList = _useState3[0];
|
|
11186
|
+
var _CategoryController = CategoryController(_extends({}, props, {
|
|
11187
|
+
types: "0"
|
|
11188
|
+
})),
|
|
10591
11189
|
_CategoryController$c = _CategoryController.categories,
|
|
10592
11190
|
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
10593
11191
|
var _ProductController = ProductController(_extends({}, props, {
|
|
10594
|
-
params: params
|
|
11192
|
+
params: params,
|
|
11193
|
+
isAutoGetList: isAutoGetList
|
|
10595
11194
|
})),
|
|
10596
|
-
|
|
10597
|
-
|
|
10598
|
-
|
|
11195
|
+
getProductListSearch = _ProductController.getProductListSearch;
|
|
11196
|
+
var _useState4 = React.useState([]),
|
|
11197
|
+
categoryProducts = _useState4[0],
|
|
11198
|
+
setCategoryProducts = _useState4[1];
|
|
11199
|
+
React.useEffect(function () {
|
|
11200
|
+
if ((categories === null || categories === void 0 ? void 0 : categories.length) > 0) {
|
|
11201
|
+
fetchAll();
|
|
11202
|
+
}
|
|
11203
|
+
}, [categories]);
|
|
11204
|
+
var fetchAll = function fetchAll() {
|
|
11205
|
+
try {
|
|
11206
|
+
setLoading(true);
|
|
11207
|
+
var _temp = _finallyRethrows(function () {
|
|
11208
|
+
return _catch(function () {
|
|
11209
|
+
var _categories$slice;
|
|
11210
|
+
var result = {};
|
|
11211
|
+
return Promise.resolve(Promise.all(categories === null || categories === void 0 ? void 0 : (_categories$slice = categories.slice(0, 4)) === null || _categories$slice === void 0 ? void 0 : _categories$slice.map(function (cat) {
|
|
11212
|
+
try {
|
|
11213
|
+
return Promise.resolve(getProductListSearch({
|
|
11214
|
+
categoryId: cat === null || cat === void 0 ? void 0 : cat.categoryId,
|
|
11215
|
+
size: 4
|
|
11216
|
+
})).then(function (products) {
|
|
11217
|
+
if ((products === null || products === void 0 ? void 0 : products.length) > 0) {
|
|
11218
|
+
result[cat === null || cat === void 0 ? void 0 : cat.cateName] = products;
|
|
11219
|
+
}
|
|
11220
|
+
});
|
|
11221
|
+
} catch (e) {
|
|
11222
|
+
return Promise.reject(e);
|
|
11223
|
+
}
|
|
11224
|
+
}))).then(function () {
|
|
11225
|
+
setCategoryProducts(result);
|
|
11226
|
+
});
|
|
11227
|
+
}, function (error) {
|
|
11228
|
+
console.log(error);
|
|
11229
|
+
});
|
|
11230
|
+
}, function (_wasThrown, _result) {
|
|
11231
|
+
setLoading(false);
|
|
11232
|
+
if (_wasThrown) throw _result;
|
|
11233
|
+
return _result;
|
|
11234
|
+
});
|
|
11235
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
11236
|
+
} catch (e) {
|
|
11237
|
+
return Promise.reject(e);
|
|
11238
|
+
}
|
|
11239
|
+
};
|
|
10599
11240
|
var handleChooseCategory = function handleChooseCategory(item) {
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
}
|
|
11241
|
+
var _Object$keys;
|
|
11242
|
+
if ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(item)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0) {
|
|
11243
|
+
fetchAll();
|
|
11244
|
+
} else {
|
|
11245
|
+
fetchOne(item);
|
|
11246
|
+
}
|
|
10604
11247
|
};
|
|
10605
|
-
var
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
11248
|
+
var fetchOne = function fetchOne(item) {
|
|
11249
|
+
try {
|
|
11250
|
+
setLoading(true);
|
|
11251
|
+
var _temp2 = _finallyRethrows(function () {
|
|
11252
|
+
return _catch(function () {
|
|
11253
|
+
return Promise.resolve(getProductListSearch({
|
|
11254
|
+
categoryId: item === null || item === void 0 ? void 0 : item.categoryId,
|
|
11255
|
+
size: 12
|
|
11256
|
+
})).then(function (products) {
|
|
11257
|
+
var _setCategoryProducts, _console$log;
|
|
11258
|
+
setCategoryProducts((_setCategoryProducts = {}, _setCategoryProducts[item === null || item === void 0 ? void 0 : item.cateName] = products, _setCategoryProducts));
|
|
11259
|
+
console.log("check::::", (_console$log = {}, _console$log[item === null || item === void 0 ? void 0 : item.cateName] = products, _console$log));
|
|
11260
|
+
});
|
|
11261
|
+
}, function (error) {
|
|
11262
|
+
console.log(error);
|
|
11263
|
+
});
|
|
11264
|
+
}, function (_wasThrown2, _result2) {
|
|
11265
|
+
setLoading(false);
|
|
11266
|
+
if (_wasThrown2) throw _result2;
|
|
11267
|
+
return _result2;
|
|
11268
|
+
});
|
|
11269
|
+
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
11270
|
+
} catch (e) {
|
|
11271
|
+
return Promise.reject(e);
|
|
10610
11272
|
}
|
|
10611
|
-
|
|
10612
|
-
return acc;
|
|
10613
|
-
}, {});
|
|
10614
|
-
console.log(groupedProducts);
|
|
11273
|
+
};
|
|
10615
11274
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10616
|
-
className: SECTION_CLASS + " flex flex-col gap-4
|
|
11275
|
+
className: SECTION_CLASS + " flex flex-col gap-4 md:!my-6 md:gap-6 "
|
|
10617
11276
|
}, /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
10618
11277
|
data: categories,
|
|
10619
11278
|
onClick: handleChooseCategory
|
|
10620
11279
|
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
10621
11280
|
className: "m-auto mt-20 min-h-32"
|
|
10622
|
-
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (Object === null || Object === void 0 ? void 0 : (_Object$
|
|
11281
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (Object === null || Object === void 0 ? void 0 : (_Object$keys2 = Object.keys(categoryProducts)) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.length) > 0 ? Object.entries(categoryProducts).map(function (_ref, index) {
|
|
10623
11282
|
var _products$;
|
|
10624
11283
|
var categoryName = _ref[0],
|
|
10625
11284
|
products = _ref[1];
|
|
@@ -10640,10 +11299,12 @@ var Products9 = function Products9(props) {
|
|
|
10640
11299
|
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10641
11300
|
Link: Link,
|
|
10642
11301
|
shopConfigStyle: shopConfigStyle,
|
|
10643
|
-
product: product
|
|
11302
|
+
product: product,
|
|
10644
11303
|
key: product === null || product === void 0 ? void 0 : product.landingShopProductId
|
|
10645
11304
|
});
|
|
10646
|
-
}) :
|
|
11305
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
11306
|
+
className: "col-span-2 sm:col-span-3 lg:col-span-4"
|
|
11307
|
+
}, /*#__PURE__*/React__default.createElement(NotFoundProduct, null))));
|
|
10647
11308
|
}) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
|
|
10648
11309
|
};
|
|
10649
11310
|
|
|
@@ -10661,7 +11322,9 @@ var Products10 = function Products10(props) {
|
|
|
10661
11322
|
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem,
|
|
10662
11323
|
_props$Link = props.Link,
|
|
10663
11324
|
Link = _props$Link === void 0 ? null : _props$Link;
|
|
10664
|
-
var _CategoryController = CategoryController(props
|
|
11325
|
+
var _CategoryController = CategoryController(_extends({}, props, {
|
|
11326
|
+
types: "0"
|
|
11327
|
+
})),
|
|
10665
11328
|
_CategoryController$c = _CategoryController.categories,
|
|
10666
11329
|
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
10667
11330
|
var _ProductController = ProductController(_extends({}, props, {
|
|
@@ -10692,7 +11355,7 @@ var Products10 = function Products10(props) {
|
|
|
10692
11355
|
Link: Link,
|
|
10693
11356
|
className: "border-0 bg-bgSecondary",
|
|
10694
11357
|
shopConfigStyle: shopConfigStyle,
|
|
10695
|
-
product: product
|
|
11358
|
+
product: product,
|
|
10696
11359
|
key: "zjk-" + idx
|
|
10697
11360
|
});
|
|
10698
11361
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
|
|
@@ -10712,7 +11375,6 @@ var listFilter = [{
|
|
|
10712
11375
|
value: "sortPriceDESC"
|
|
10713
11376
|
}];
|
|
10714
11377
|
var Products11 = function Products11(props) {
|
|
10715
|
-
var _productsFilter$slice;
|
|
10716
11378
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
10717
11379
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10718
11380
|
_props$Link = props.Link,
|
|
@@ -10724,24 +11386,21 @@ var Products11 = function Products11(props) {
|
|
|
10724
11386
|
var _useState = React.useState({
|
|
10725
11387
|
page: 0,
|
|
10726
11388
|
size: 12,
|
|
10727
|
-
categoryId: categoryId
|
|
11389
|
+
categoryId: categoryId || ""
|
|
10728
11390
|
}),
|
|
10729
11391
|
params = _useState[0],
|
|
10730
11392
|
setParams = _useState[1];
|
|
10731
|
-
var _useState2 = React.useState(
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
var _useState3 = React.useState(
|
|
10735
|
-
|
|
10736
|
-
|
|
10737
|
-
var _useState4 = React.useState([]),
|
|
10738
|
-
|
|
10739
|
-
|
|
10740
|
-
var _useState5 = React.useState(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]),
|
|
10741
|
-
filterItem = _useState5[0],
|
|
10742
|
-
setFilterItem = _useState5[1];
|
|
11393
|
+
var _useState2 = React.useState({}),
|
|
11394
|
+
categorySelected = _useState2[0],
|
|
11395
|
+
setCategorySelected = _useState2[1];
|
|
11396
|
+
var _useState3 = React.useState([]),
|
|
11397
|
+
productsFilter = _useState3[0],
|
|
11398
|
+
setProductsFilter = _useState3[1];
|
|
11399
|
+
var _useState4 = React.useState(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]),
|
|
11400
|
+
filterItem = _useState4[0],
|
|
11401
|
+
setFilterItem = _useState4[1];
|
|
10743
11402
|
var _CategoryController = CategoryController(_extends({}, props, {
|
|
10744
|
-
|
|
11403
|
+
types: "0"
|
|
10745
11404
|
})),
|
|
10746
11405
|
_CategoryController$c = _CategoryController.categories,
|
|
10747
11406
|
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
@@ -10753,16 +11412,18 @@ var Products11 = function Products11(props) {
|
|
|
10753
11412
|
loading = _ProductController.loading,
|
|
10754
11413
|
page = _ProductController.page;
|
|
10755
11414
|
var handleOnChangePage = function handleOnChangePage(pageIndex) {
|
|
10756
|
-
setFirstLoading(false);
|
|
10757
11415
|
setParams(function (prev) {
|
|
10758
11416
|
return _extends({}, prev, {
|
|
10759
11417
|
page: pageIndex
|
|
10760
11418
|
});
|
|
10761
11419
|
});
|
|
11420
|
+
window.scrollTo({
|
|
11421
|
+
top: 0,
|
|
11422
|
+
behavior: 'smooth'
|
|
11423
|
+
});
|
|
10762
11424
|
};
|
|
10763
11425
|
var handleChooseCategory = function handleChooseCategory(category) {
|
|
10764
11426
|
setCategorySelected(category);
|
|
10765
|
-
setFirstLoading(true);
|
|
10766
11427
|
setFilterItem(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]);
|
|
10767
11428
|
setParams(function (prev) {
|
|
10768
11429
|
return _extends({}, prev, {
|
|
@@ -10770,6 +11431,10 @@ var Products11 = function Products11(props) {
|
|
|
10770
11431
|
size: 12
|
|
10771
11432
|
});
|
|
10772
11433
|
});
|
|
11434
|
+
window.scrollTo({
|
|
11435
|
+
top: 0,
|
|
11436
|
+
behavior: 'smooth'
|
|
11437
|
+
});
|
|
10773
11438
|
};
|
|
10774
11439
|
React.useEffect(function () {
|
|
10775
11440
|
if ((categories === null || categories === void 0 ? void 0 : categories.length) > 0 && params !== null && params !== void 0 && params.categoryId) {
|
|
@@ -10780,23 +11445,42 @@ var Products11 = function Products11(props) {
|
|
|
10780
11445
|
}
|
|
10781
11446
|
}, [categories]);
|
|
10782
11447
|
React.useEffect(function () {
|
|
10783
|
-
|
|
11448
|
+
if ((filterItem === null || filterItem === void 0 ? void 0 : filterItem.value) === "sortPriceDESC") {
|
|
11449
|
+
var productsCopy = [].concat(products);
|
|
11450
|
+
productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.sort(function (a, b) {
|
|
11451
|
+
var _a$productInfo, _b$productInfo;
|
|
11452
|
+
return (a === null || a === void 0 ? void 0 : (_a$productInfo = a.productInfo) === null || _a$productInfo === void 0 ? void 0 : _a$productInfo.price) - (b === null || b === void 0 ? void 0 : (_b$productInfo = b.productInfo) === null || _b$productInfo === void 0 ? void 0 : _b$productInfo.price);
|
|
11453
|
+
});
|
|
11454
|
+
setProductsFilter(productsCopy);
|
|
11455
|
+
} else if ((filterItem === null || filterItem === void 0 ? void 0 : filterItem.value) === "discount") {
|
|
11456
|
+
var _productsCopy2;
|
|
11457
|
+
var _productsCopy = [].concat(products);
|
|
11458
|
+
_productsCopy = (_productsCopy2 = _productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
|
|
11459
|
+
var _product$productInfo, _product$productInfo2, _product$productInfo3;
|
|
11460
|
+
return (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo3 = product.productInfo) === null || _product$productInfo3 === void 0 ? void 0 : _product$productInfo3.price);
|
|
11461
|
+
});
|
|
11462
|
+
setProductsFilter(_productsCopy);
|
|
11463
|
+
} else {
|
|
11464
|
+
setProductsFilter(products);
|
|
11465
|
+
}
|
|
10784
11466
|
}, [products, categorySelected]);
|
|
10785
11467
|
var handleFilter = function handleFilter(item) {
|
|
10786
11468
|
setFilterItem(item);
|
|
10787
|
-
if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC") {
|
|
11469
|
+
if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC" && !(params !== null && params !== void 0 && params.isHighlight)) {
|
|
10788
11470
|
var productsCopy = [].concat(products);
|
|
10789
11471
|
productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.sort(function (a, b) {
|
|
10790
|
-
var
|
|
10791
|
-
return
|
|
11472
|
+
var _a$productInfo2, _b$productInfo2;
|
|
11473
|
+
return (a === null || a === void 0 ? void 0 : (_a$productInfo2 = a.productInfo) === null || _a$productInfo2 === void 0 ? void 0 : _a$productInfo2.price) - (b === null || b === void 0 ? void 0 : (_b$productInfo2 = b.productInfo) === null || _b$productInfo2 === void 0 ? void 0 : _b$productInfo2.price);
|
|
10792
11474
|
});
|
|
10793
11475
|
setProductsFilter(productsCopy);
|
|
10794
|
-
} else if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
|
|
10795
|
-
var
|
|
10796
|
-
|
|
10797
|
-
|
|
11476
|
+
} else if ((item === null || item === void 0 ? void 0 : item.value) === "discount" && !(params !== null && params !== void 0 && params.isHighlight)) {
|
|
11477
|
+
var _productsCopy4;
|
|
11478
|
+
var _productsCopy3 = [].concat(products);
|
|
11479
|
+
_productsCopy3 = (_productsCopy4 = _productsCopy3) === null || _productsCopy4 === void 0 ? void 0 : _productsCopy4.filter(function (product) {
|
|
11480
|
+
var _product$productInfo4, _product$productInfo5, _product$productInfo6;
|
|
11481
|
+
return (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.price);
|
|
10798
11482
|
});
|
|
10799
|
-
setProductsFilter(
|
|
11483
|
+
setProductsFilter(_productsCopy3);
|
|
10800
11484
|
} else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
|
|
10801
11485
|
setParams(function (prev) {
|
|
10802
11486
|
return _extends({}, prev, {
|
|
@@ -10805,19 +11489,20 @@ var Products11 = function Products11(props) {
|
|
|
10805
11489
|
});
|
|
10806
11490
|
} else {
|
|
10807
11491
|
setParams(function (prev) {
|
|
10808
|
-
return
|
|
11492
|
+
return {
|
|
11493
|
+
page: 0,
|
|
10809
11494
|
categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
|
|
10810
11495
|
size: 12
|
|
10811
|
-
}
|
|
11496
|
+
};
|
|
10812
11497
|
});
|
|
10813
11498
|
}
|
|
10814
11499
|
};
|
|
10815
11500
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10816
|
-
className: SECTION_CLASS + " grid grid-cols-1 !
|
|
11501
|
+
className: SECTION_CLASS + " grid grid-cols-1 !my-6 !md:my-6 md:grid-cols-4 gap-6"
|
|
10817
11502
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10818
|
-
className: "md:sticky top-
|
|
10819
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10820
|
-
className: " flex flex-col gap-2 rounded-
|
|
11503
|
+
className: "md:sticky top-16 self-start"
|
|
11504
|
+
}, (categories === null || categories === void 0 ? void 0 : categories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
11505
|
+
className: " flex flex-col gap-2 rounded-2xl bg-bgSecondary p-4 max-h-96 overflow-y-auto"
|
|
10821
11506
|
}, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
|
|
10822
11507
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10823
11508
|
className: "px-6 py-2 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" : ""),
|
|
@@ -10825,11 +11510,13 @@ var Products11 = function Products11(props) {
|
|
|
10825
11510
|
onClick: function onClick() {
|
|
10826
11511
|
handleChooseCategory(item);
|
|
10827
11512
|
}
|
|
10828
|
-
},
|
|
10829
|
-
|
|
11513
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11514
|
+
className: "line-clamp-2"
|
|
11515
|
+
}, item === null || item === void 0 ? void 0 : item.cateName));
|
|
11516
|
+
})) : null), /*#__PURE__*/React__default.createElement("div", {
|
|
10830
11517
|
className: "md:col-span-3 flex flex-col gap-6"
|
|
10831
11518
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10832
|
-
className: "flex gap-4"
|
|
11519
|
+
className: "flex gap-4 flex-wrap"
|
|
10833
11520
|
}, listFilter === null || listFilter === void 0 ? void 0 : listFilter.map(function (item, index) {
|
|
10834
11521
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10835
11522
|
key: "kgkf-" + index,
|
|
@@ -10838,11 +11525,11 @@ var Products11 = function Products11(props) {
|
|
|
10838
11525
|
handleFilter(item);
|
|
10839
11526
|
}
|
|
10840
11527
|
}, item === null || item === void 0 ? void 0 : item.label);
|
|
10841
|
-
})), loading
|
|
11528
|
+
})), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
10842
11529
|
className: "w-full h-96 mb-1 flex justify-center items-center"
|
|
10843
11530
|
}, /*#__PURE__*/React__default.createElement(Loading, null)) : /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10844
|
-
className: "grid grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-6
|
|
10845
|
-
}, (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > 0 ? productsFilter === null || productsFilter === void 0 ? void 0 :
|
|
11531
|
+
className: "grid grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-6 xl:gap-8"
|
|
11532
|
+
}, (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > 0 ? productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.map(function (product, index) {
|
|
10846
11533
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10847
11534
|
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo),
|
|
10848
11535
|
Link: Link,
|
|
@@ -10850,11 +11537,11 @@ var Products11 = function Products11(props) {
|
|
|
10850
11537
|
}, /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10851
11538
|
Link: Link,
|
|
10852
11539
|
shopConfigStyle: shopConfigStyle,
|
|
10853
|
-
product: product
|
|
11540
|
+
product: product,
|
|
10854
11541
|
key: product === null || product === void 0 ? void 0 : product.landingShopProductId
|
|
10855
11542
|
}));
|
|
10856
11543
|
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
10857
|
-
className: "
|
|
11544
|
+
className: "col-span-2 lg:col-span-3 mt-20 m-auto"
|
|
10858
11545
|
}, /*#__PURE__*/React__default.createElement(NotFoundProduct, null)))), /*#__PURE__*/React__default.createElement("div", {
|
|
10859
11546
|
className: "w-full m-auto"
|
|
10860
11547
|
}, (page === null || page === void 0 ? void 0 : page.total_pages) > 1 ? /*#__PURE__*/React__default.createElement(Pagination, {
|
|
@@ -10866,25 +11553,6 @@ var Products11 = function Products11(props) {
|
|
|
10866
11553
|
}) : null)));
|
|
10867
11554
|
};
|
|
10868
11555
|
|
|
10869
|
-
var ProductItem9 = function ProductItem9(props) {
|
|
10870
|
-
var product = props.product;
|
|
10871
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
10872
|
-
className: "flex border-b border-stroke items-center py-4"
|
|
10873
|
-
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10874
|
-
product: product,
|
|
10875
|
-
className: "!w-24 rounded-lg"
|
|
10876
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10877
|
-
className: "ml-4 flex-1"
|
|
10878
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10879
|
-
className: "text-xl"
|
|
10880
|
-
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement("div", {
|
|
10881
|
-
className: "mt-2"
|
|
10882
|
-
}, /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10883
|
-
product: product,
|
|
10884
|
-
priceClassName: "!font-normal text-lg"
|
|
10885
|
-
}))));
|
|
10886
|
-
};
|
|
10887
|
-
|
|
10888
11556
|
var Products12 = function Products12(props) {
|
|
10889
11557
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
10890
11558
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
@@ -10917,15 +11585,19 @@ var Products12 = function Products12(props) {
|
|
|
10917
11585
|
});
|
|
10918
11586
|
};
|
|
10919
11587
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
10920
|
-
className:
|
|
11588
|
+
className: SECTION_CLASS + " w-full flex flex-col gap-6"
|
|
10921
11589
|
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
10922
11590
|
data: data,
|
|
10923
11591
|
shopConfigStyle: shopConfigStyle
|
|
10924
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
11592
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11593
|
+
className: "flex justify-center"
|
|
11594
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11595
|
+
className: "!overflow-hidden max-w-[80%] md:max-w-[67%] pt-2"
|
|
11596
|
+
}, /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
10925
11597
|
isNavigateButton: false,
|
|
10926
11598
|
data: categories,
|
|
10927
11599
|
onClick: handleFilterByCategory
|
|
10928
|
-
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
11600
|
+
}))), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
10929
11601
|
className: "flex w-full justify-center p-12"
|
|
10930
11602
|
}, /*#__PURE__*/React__default.createElement(Loading, null)) : products !== null && products !== void 0 && products.length ? /*#__PURE__*/React__default.createElement("div", {
|
|
10931
11603
|
className: "grid grid-cols-1 md:grid-cols-2 gap-x-12"
|
|
@@ -10934,12 +11606,70 @@ var Products12 = function Products12(props) {
|
|
|
10934
11606
|
key: index,
|
|
10935
11607
|
Link: Link,
|
|
10936
11608
|
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10937
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
10938
|
-
product: product
|
|
11609
|
+
}, /*#__PURE__*/React__default.createElement(ProductItem10, {
|
|
11610
|
+
product: product
|
|
10939
11611
|
}));
|
|
10940
11612
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)));
|
|
10941
11613
|
};
|
|
10942
11614
|
|
|
11615
|
+
var Products14 = function Products14(props) {
|
|
11616
|
+
var _products$slice;
|
|
11617
|
+
var _props$Link = props.Link,
|
|
11618
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
11619
|
+
data = props.data,
|
|
11620
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
11621
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
11622
|
+
_props$SectionTitle = props.SectionTitle,
|
|
11623
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
11624
|
+
_props$ProductItem = props.ProductItem,
|
|
11625
|
+
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
11626
|
+
var _ProductDetailControl = ProductDetailController(props),
|
|
11627
|
+
product = _ProductDetailControl.product;
|
|
11628
|
+
var _useState = React.useState(false),
|
|
11629
|
+
isAutoGetList = _useState[0],
|
|
11630
|
+
setIsAutoGetList = _useState[1];
|
|
11631
|
+
var _useState2 = React.useState({
|
|
11632
|
+
size: 12,
|
|
11633
|
+
categoryId: product === null || product === void 0 ? void 0 : product.categoryId
|
|
11634
|
+
}),
|
|
11635
|
+
params = _useState2[0],
|
|
11636
|
+
setParams = _useState2[1];
|
|
11637
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
11638
|
+
params: params,
|
|
11639
|
+
isAutoGetList: isAutoGetList
|
|
11640
|
+
})),
|
|
11641
|
+
_ProductController$pr = _ProductController.products,
|
|
11642
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
11643
|
+
loading = _ProductController.loading;
|
|
11644
|
+
React.useEffect(function () {
|
|
11645
|
+
if (product !== null && product !== void 0 && product.categoryId) {
|
|
11646
|
+
setParams(function (prev) {
|
|
11647
|
+
return _extends({}, prev, {
|
|
11648
|
+
categoryId: product === null || product === void 0 ? void 0 : product.categoryId
|
|
11649
|
+
});
|
|
11650
|
+
});
|
|
11651
|
+
setIsAutoGetList(true);
|
|
11652
|
+
}
|
|
11653
|
+
}, [product]);
|
|
11654
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11655
|
+
className: SECTION_CLASS + " flex flex-col gap-6 md:gap-12"
|
|
11656
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
11657
|
+
data: data,
|
|
11658
|
+
shopConfigStyle: shopConfigStyle
|
|
11659
|
+
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
11660
|
+
className: "m-auto mt-20 min-h-32"
|
|
11661
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
11662
|
+
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"
|
|
11663
|
+
}, 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) {
|
|
11664
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
11665
|
+
Link: Link,
|
|
11666
|
+
shopConfigStyle: shopConfigStyle,
|
|
11667
|
+
product: product,
|
|
11668
|
+
key: "zjk-" + idx
|
|
11669
|
+
});
|
|
11670
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
|
|
11671
|
+
};
|
|
11672
|
+
|
|
10943
11673
|
var ProductCategory2 = function ProductCategory2(props) {
|
|
10944
11674
|
var _products$slice;
|
|
10945
11675
|
var _props$Link = props.Link,
|
|
@@ -10955,7 +11685,9 @@ var ProductCategory2 = function ProductCategory2(props) {
|
|
|
10955
11685
|
}),
|
|
10956
11686
|
params = _useState[0],
|
|
10957
11687
|
setParams = _useState[1];
|
|
10958
|
-
var _CategoryController = CategoryController(_extends({}, props
|
|
11688
|
+
var _CategoryController = CategoryController(_extends({}, props, {
|
|
11689
|
+
types: "0"
|
|
11690
|
+
})),
|
|
10959
11691
|
_CategoryController$c = _CategoryController.categories,
|
|
10960
11692
|
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
10961
11693
|
var _ProductController = ProductController(_extends({}, props, {
|
|
@@ -10996,7 +11728,7 @@ var ProductCategory2 = function ProductCategory2(props) {
|
|
|
10996
11728
|
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10997
11729
|
Link: Link,
|
|
10998
11730
|
shopConfigStyle: shopConfigStyle,
|
|
10999
|
-
product: product
|
|
11731
|
+
product: product,
|
|
11000
11732
|
key: "zjk-" + idx
|
|
11001
11733
|
});
|
|
11002
11734
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
|
|
@@ -11034,7 +11766,7 @@ var ProductSale2 = function ProductSale2(props) {
|
|
|
11034
11766
|
}, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
11035
11767
|
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
11036
11768
|
key: index,
|
|
11037
|
-
product: product
|
|
11769
|
+
product: product
|
|
11038
11770
|
});
|
|
11039
11771
|
})), /*#__PURE__*/React__default.createElement(Button, {
|
|
11040
11772
|
label: "Xem tất cả",
|
|
@@ -11089,7 +11821,11 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11089
11821
|
isAutoGetList: isAutoGetList
|
|
11090
11822
|
})),
|
|
11091
11823
|
products = _ProductController.products,
|
|
11092
|
-
loading = _ProductController.loading
|
|
11824
|
+
loading = _ProductController.loading,
|
|
11825
|
+
page = _ProductController.page;
|
|
11826
|
+
var _useState5 = React.useState({}),
|
|
11827
|
+
filterValue = _useState5[0],
|
|
11828
|
+
setFilterValue = _useState5[1];
|
|
11093
11829
|
React.useEffect(function () {
|
|
11094
11830
|
setIsAutoGetList(true);
|
|
11095
11831
|
setParams(function (prev) {
|
|
@@ -11099,7 +11835,17 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11099
11835
|
});
|
|
11100
11836
|
}, [keywordValue]);
|
|
11101
11837
|
React.useEffect(function () {
|
|
11102
|
-
if ((
|
|
11838
|
+
if ((filterValue === null || filterValue === void 0 ? void 0 : filterValue.value) === "discount") {
|
|
11839
|
+
var _productsCopy;
|
|
11840
|
+
var productsCopy = [].concat(products);
|
|
11841
|
+
productsCopy = (_productsCopy = productsCopy) === null || _productsCopy === void 0 ? void 0 : _productsCopy.filter(function (product) {
|
|
11842
|
+
var _product$productInfo, _product$productInfo2, _product$productInfo3;
|
|
11843
|
+
return (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo3 = product.productInfo) === null || _product$productInfo3 === void 0 ? void 0 : _product$productInfo3.price);
|
|
11844
|
+
});
|
|
11845
|
+
setProductsFilter(productsCopy);
|
|
11846
|
+
} else {
|
|
11847
|
+
setProductsFilter(products);
|
|
11848
|
+
}
|
|
11103
11849
|
}, [products]);
|
|
11104
11850
|
var handleGetMoreProducts = function handleGetMoreProducts() {
|
|
11105
11851
|
setIsGetMore(false);
|
|
@@ -11110,10 +11856,13 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11110
11856
|
});
|
|
11111
11857
|
};
|
|
11112
11858
|
var handleFilter = function handleFilter(item) {
|
|
11113
|
-
|
|
11859
|
+
setFilterValue(item);
|
|
11860
|
+
if ((item === null || item === void 0 ? void 0 : item.value) === "discount" && !(params !== null && params !== void 0 && params.isHighlight)) {
|
|
11861
|
+
var _productsCopy2;
|
|
11114
11862
|
var productsCopy = [].concat(products);
|
|
11115
|
-
productsCopy === null ||
|
|
11116
|
-
|
|
11863
|
+
productsCopy = (_productsCopy2 = productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
|
|
11864
|
+
var _product$productInfo4, _product$productInfo5, _product$productInfo6;
|
|
11865
|
+
return (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.price);
|
|
11117
11866
|
});
|
|
11118
11867
|
setProductsFilter(productsCopy);
|
|
11119
11868
|
} else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
|
|
@@ -11138,7 +11887,7 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11138
11887
|
shopConfigStyle: shopConfigStyle
|
|
11139
11888
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11140
11889
|
className: "text-lg"
|
|
11141
|
-
}, "T\u1EEB kh\xF3a \"", keywordValue, "\" (",
|
|
11890
|
+
}, "T\u1EEB kh\xF3a \"", keywordValue, "\" (", page === null || page === void 0 ? void 0 : page.total_elements, " s\u1EA3n ph\u1EA9m)"), /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
11142
11891
|
data: listFilter$1,
|
|
11143
11892
|
isNavigateButton: false,
|
|
11144
11893
|
onClick: handleFilter
|
|
@@ -11149,7 +11898,7 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11149
11898
|
}, productsFilter === null || productsFilter === void 0 ? void 0 : (_productsFilter$slice = productsFilter.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _productsFilter$slice === void 0 ? void 0 : _productsFilter$slice.map(function (product, idx) {
|
|
11150
11899
|
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
11151
11900
|
Link: Link,
|
|
11152
|
-
product: product
|
|
11901
|
+
product: product,
|
|
11153
11902
|
key: "htrhr-" + idx
|
|
11154
11903
|
});
|
|
11155
11904
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
|
|
@@ -11205,7 +11954,7 @@ var ProductHot1 = function ProductHot1(props) {
|
|
|
11205
11954
|
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
11206
11955
|
Link: Link,
|
|
11207
11956
|
shopConfigStyle: shopConfigStyle,
|
|
11208
|
-
product: product
|
|
11957
|
+
product: product,
|
|
11209
11958
|
key: "zjk-" + idx
|
|
11210
11959
|
});
|
|
11211
11960
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
|
|
@@ -11254,7 +12003,7 @@ var ProductHot3 = function ProductHot3(props) {
|
|
|
11254
12003
|
Link: Link,
|
|
11255
12004
|
shopConfigStyle: shopConfigStyle,
|
|
11256
12005
|
key: "htjtr-" + index,
|
|
11257
|
-
product: product
|
|
12006
|
+
product: product
|
|
11258
12007
|
});
|
|
11259
12008
|
}))), /*#__PURE__*/React__default.createElement(Dash, {
|
|
11260
12009
|
color: secondary
|
|
@@ -11296,7 +12045,7 @@ var ProductsTop1 = function ProductsTop1(props) {
|
|
|
11296
12045
|
Link: Link,
|
|
11297
12046
|
className: "border-0",
|
|
11298
12047
|
shopConfigStyle: shopConfigStyle,
|
|
11299
|
-
product: product
|
|
12048
|
+
product: product,
|
|
11300
12049
|
key: "htrhr-" + idx
|
|
11301
12050
|
});
|
|
11302
12051
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
|
|
@@ -11346,7 +12095,7 @@ var ProductList5 = function ProductList5(props) {
|
|
|
11346
12095
|
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
11347
12096
|
Link: Link,
|
|
11348
12097
|
shopConfigStyle: shopConfigStyle,
|
|
11349
|
-
product: product
|
|
12098
|
+
product: product,
|
|
11350
12099
|
key: "htrhr-" + idx
|
|
11351
12100
|
});
|
|
11352
12101
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
|
|
@@ -11401,7 +12150,7 @@ var ProductHighlight1 = function ProductHighlight1(props) {
|
|
|
11401
12150
|
}, 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) {
|
|
11402
12151
|
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
11403
12152
|
Link: Link,
|
|
11404
|
-
product: product
|
|
12153
|
+
product: product,
|
|
11405
12154
|
shopConfigStyle: shopConfigStyle,
|
|
11406
12155
|
key: "zjk-" + idx
|
|
11407
12156
|
});
|
|
@@ -11935,7 +12684,7 @@ var Booking1 = function Booking1(props) {
|
|
|
11935
12684
|
shopConfigStyle: shopConfigStyle
|
|
11936
12685
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11937
12686
|
className: "mt-12 grid grid-cols-1 gap-6 md:grid-cols-2 md:gap-12"
|
|
11938
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
12687
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
11939
12688
|
shopConfigStyle: shopConfigStyle,
|
|
11940
12689
|
shopConfig: shopConfig,
|
|
11941
12690
|
className: "!bg-bgSecondary"
|
|
@@ -11977,7 +12726,7 @@ var BookingForm6 = function BookingForm6(props) {
|
|
|
11977
12726
|
className: "w-full h-auto"
|
|
11978
12727
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11979
12728
|
className: "mt-4 whitespace-pre-line"
|
|
11980
|
-
}, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description)), /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
12729
|
+
}, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description)), /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
11981
12730
|
shopConfigStyle: shopConfigStyle,
|
|
11982
12731
|
shopConfig: shopConfig,
|
|
11983
12732
|
className: "col-span-2"
|
|
@@ -12221,7 +12970,7 @@ var BookingFoodForm = function BookingFoodForm(props) {
|
|
|
12221
12970
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
12222
12971
|
className: "text-center"
|
|
12223
12972
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
12224
|
-
label: "Đặt
|
|
12973
|
+
label: "Đặt bàn ngay",
|
|
12225
12974
|
shopConfigStyle: shopConfigStyle,
|
|
12226
12975
|
onClick: handleSubmit
|
|
12227
12976
|
}))) : null, isOpenPopup && /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
@@ -12238,7 +12987,7 @@ var BookingFoodForm = function BookingFoodForm(props) {
|
|
|
12238
12987
|
}
|
|
12239
12988
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
12240
12989
|
className: "font-medium text-2xl"
|
|
12241
|
-
}, "\u0110\u1EB7t
|
|
12990
|
+
}, "\u0110\u1EB7t b\xE0n th\xE0nh c\xF4ng"), /*#__PURE__*/React__default.createElement("div", {
|
|
12242
12991
|
className: "text-center"
|
|
12243
12992
|
}, "Ch\xFAng t\xF4i \u0111\xE3 ghi nh\u1EADn th\xF4ng tin c\u1EE7a b\u1EA1n v\xE0 s\u1EBD li\xEAn h\u1EC7 l\u1EA1i ngay"))));
|
|
12244
12993
|
};
|
|
@@ -12260,7 +13009,7 @@ var BookingTable1 = function BookingTable1(props) {
|
|
|
12260
13009
|
data: data,
|
|
12261
13010
|
shopConfigStyle: shopConfigStyle
|
|
12262
13011
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12263
|
-
className: "mt-6 md:mt-12 grid grid-cols-1 gap-6 md:grid-cols-3
|
|
13012
|
+
className: "mt-6 md:mt-12 grid grid-cols-1 gap-6 md:grid-cols-3 lg:gap-12"
|
|
12264
13013
|
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12265
13014
|
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) || "#"
|
|
12266
13015
|
}, 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", {
|
|
@@ -12271,13 +13020,13 @@ var BookingTable1 = function BookingTable1(props) {
|
|
|
12271
13020
|
}
|
|
12272
13021
|
})) : /*#__PURE__*/React__default.createElement("img", {
|
|
12273
13022
|
src: data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : (_data$data5$ = _data$data5[0]) === null || _data$data5$ === void 0 ? void 0 : _data$data5$.srcImage,
|
|
12274
|
-
className: "w-full h-auto"
|
|
13023
|
+
className: "w-full h-full lg:h-auto object-cover rounded-2xl"
|
|
12275
13024
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12276
13025
|
className: "mt-4 whitespace-pre-line"
|
|
12277
13026
|
}, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description)), /*#__PURE__*/React__default.createElement(BookingFoodForm, {
|
|
12278
13027
|
shopConfigStyle: shopConfigStyle,
|
|
12279
13028
|
shopConfig: shopConfig,
|
|
12280
|
-
className: "col-span-2"
|
|
13029
|
+
className: "md:col-span-2"
|
|
12281
13030
|
})));
|
|
12282
13031
|
};
|
|
12283
13032
|
|
|
@@ -12389,6 +13138,30 @@ var Banner3 = function Banner3(props) {
|
|
|
12389
13138
|
}));
|
|
12390
13139
|
};
|
|
12391
13140
|
|
|
13141
|
+
var Banner4 = function Banner4(props) {
|
|
13142
|
+
var _data$data, _data$data$, _data$data2, _data$data2$slice;
|
|
13143
|
+
var data = props.data,
|
|
13144
|
+
_props$Link = props.Link,
|
|
13145
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
13146
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
13147
|
+
className: SECTION_CLASS_PADDING + " grid grid-cols-1 bg-bgSecondary md:grid-cols-3 gap-6"
|
|
13148
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13149
|
+
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$.srcImage,
|
|
13150
|
+
className: "md:col-span-2 object-cover w-full h-full rounded-[10px]"
|
|
13151
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13152
|
+
className: "flex flex-col gap-6"
|
|
13153
|
+
}, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$slice = _data$data2.slice(1, 3)) === null || _data$data2$slice === void 0 ? void 0 : _data$data2$slice.map(function (item, index) {
|
|
13154
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13155
|
+
Link: Link,
|
|
13156
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
13157
|
+
key: "djsd-" + index
|
|
13158
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13159
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
13160
|
+
className: "object-cover w-full h-full rounded-xl"
|
|
13161
|
+
}));
|
|
13162
|
+
})));
|
|
13163
|
+
};
|
|
13164
|
+
|
|
12392
13165
|
var Banner7 = function Banner7(props) {
|
|
12393
13166
|
var _data$data;
|
|
12394
13167
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
@@ -12460,7 +13233,7 @@ var Partner1 = function Partner1(props) {
|
|
|
12460
13233
|
data: data,
|
|
12461
13234
|
shopConfigStyle: shopConfigStyle
|
|
12462
13235
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12463
|
-
className: "grid grid-cols-4 md:grid-cols-6 gap-6 mt-4 md:mt-6 p-6 rounded-xl",
|
|
13236
|
+
className: "grid grid-cols-4 md:grid-cols-6 gap-6 mt-4 md:mt-6 p-4 md:p-6 rounded-xl",
|
|
12464
13237
|
style: {
|
|
12465
13238
|
background: bgSecondary
|
|
12466
13239
|
}
|
|
@@ -12625,7 +13398,7 @@ var dataFake = [{
|
|
|
12625
13398
|
title: "Đa dạng thanh toán",
|
|
12626
13399
|
data: [{
|
|
12627
13400
|
svgImage: "",
|
|
12628
|
-
srcImage: /*#__PURE__*/React__default.createElement(
|
|
13401
|
+
srcImage: /*#__PURE__*/React__default.createElement(gr.GrPowerCycle, null),
|
|
12629
13402
|
label: "Chuyển khoản",
|
|
12630
13403
|
link: ""
|
|
12631
13404
|
}, {
|
|
@@ -12662,7 +13435,7 @@ var dataFake = [{
|
|
|
12662
13435
|
label: "Chính sách bảo hành",
|
|
12663
13436
|
link: ""
|
|
12664
13437
|
}, {
|
|
12665
|
-
srcImage: /*#__PURE__*/React__default.createElement(
|
|
13438
|
+
srcImage: /*#__PURE__*/React__default.createElement(gr.GrPowerCycle, null),
|
|
12666
13439
|
svgImage: "",
|
|
12667
13440
|
label: "Chính sách đổi trả",
|
|
12668
13441
|
link: ""
|
|
@@ -12899,7 +13672,6 @@ var Footer7 = function Footer7(props) {
|
|
|
12899
13672
|
textButton = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
|
|
12900
13673
|
_shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
|
|
12901
13674
|
bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
12902
|
-
console.log("Footer7 shopConfig", shopConfig);
|
|
12903
13675
|
var _useState = React.useState([]),
|
|
12904
13676
|
shopAddressList = _useState[0],
|
|
12905
13677
|
setShopAddressList = _useState[1];
|
|
@@ -13015,7 +13787,9 @@ var Footer7 = function Footer7(props) {
|
|
|
13015
13787
|
style: {
|
|
13016
13788
|
background: primary
|
|
13017
13789
|
}
|
|
13018
|
-
}))))), /*#__PURE__*/React__default.createElement("hr",
|
|
13790
|
+
}))))), /*#__PURE__*/React__default.createElement("hr", {
|
|
13791
|
+
className: "mt-12"
|
|
13792
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13019
13793
|
className: "py-4"
|
|
13020
13794
|
}, /*#__PURE__*/React__default.createElement("small", {
|
|
13021
13795
|
className: "me-5"
|
|
@@ -13035,23 +13809,26 @@ var RatingStar = function RatingStar(props) {
|
|
|
13035
13809
|
star = _props$star === void 0 ? 5 : _props$star,
|
|
13036
13810
|
_props$style = props.style,
|
|
13037
13811
|
style = _props$style === void 0 ? {} : _props$style,
|
|
13812
|
+
_props$color = props.color,
|
|
13813
|
+
color = _props$color === void 0 ? "#E2B93B" : _props$color,
|
|
13038
13814
|
_props$className = props.className,
|
|
13039
13815
|
className = _props$className === void 0 ? "" : _props$className;
|
|
13040
13816
|
var res = [];
|
|
13041
|
-
for (var i = 1; i
|
|
13817
|
+
for (var i = 1; i <= star; i++) {
|
|
13042
13818
|
res.push(/*#__PURE__*/React__default.createElement(fa6.FaStar, {
|
|
13043
|
-
color:
|
|
13819
|
+
color: color
|
|
13044
13820
|
}));
|
|
13821
|
+
if (i >= 5) break;
|
|
13045
13822
|
}
|
|
13046
13823
|
var decimalPart = star % 1;
|
|
13047
13824
|
if (decimalPart && decimalPart >= 0.5) {
|
|
13048
13825
|
res.push(/*#__PURE__*/React__default.createElement(fa6.FaRegStarHalfStroke, {
|
|
13049
|
-
color:
|
|
13826
|
+
color: color
|
|
13050
13827
|
}));
|
|
13051
13828
|
}
|
|
13052
13829
|
for (var _i = res === null || res === void 0 ? void 0 : res.length; _i < 5; _i++) {
|
|
13053
13830
|
res.push(/*#__PURE__*/React__default.createElement(fa6.FaRegStar, {
|
|
13054
|
-
color:
|
|
13831
|
+
color: color
|
|
13055
13832
|
}));
|
|
13056
13833
|
}
|
|
13057
13834
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -13221,9 +13998,9 @@ var CustomerRating8 = function CustomerRating8(props) {
|
|
|
13221
13998
|
src: item === null || item === void 0 ? void 0 : item.avatar,
|
|
13222
13999
|
className: "w-40 h-40 rounded-full object-cover border-8 border-stroke"
|
|
13223
14000
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13224
|
-
className: "text-xl text-primary"
|
|
14001
|
+
className: "text-xl text-primary text-center"
|
|
13225
14002
|
}, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
|
|
13226
|
-
className: "text-gray3"
|
|
14003
|
+
className: "text-gray3 text-center"
|
|
13227
14004
|
}, item === null || item === void 0 ? void 0 : item.description), /*#__PURE__*/React__default.createElement("div", {
|
|
13228
14005
|
className: "flex gap-2 "
|
|
13229
14006
|
}, /*#__PURE__*/React__default.createElement(ri.RiDoubleQuotesL, {
|
|
@@ -13238,6 +14015,58 @@ var CustomerRating8 = function CustomerRating8(props) {
|
|
|
13238
14015
|
}))));
|
|
13239
14016
|
};
|
|
13240
14017
|
|
|
14018
|
+
var CustomerRating9 = function CustomerRating9(props) {
|
|
14019
|
+
var _data$data;
|
|
14020
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
14021
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
14022
|
+
_props$data = props.data,
|
|
14023
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
14024
|
+
_props$SectionTitle = props.SectionTitle,
|
|
14025
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
14026
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
14027
|
+
className: SECTION_DEFAULT_CLASS
|
|
14028
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
14029
|
+
data: data,
|
|
14030
|
+
shopConfigStyle: shopConfigStyle
|
|
14031
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14032
|
+
className: "mt-12 grid grid-cols-1 lg:grid-cols-3 gap-6"
|
|
14033
|
+
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
|
|
14034
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
14035
|
+
key: index,
|
|
14036
|
+
className: "flex bg-primary pt-16 px-6 pb-6"
|
|
14037
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14038
|
+
className: "bg-background relative"
|
|
14039
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14040
|
+
className: "flex justify-between items-center pr-4 w-full absolute top-[-40px]"
|
|
14041
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14042
|
+
className: "text-[#A85A09]"
|
|
14043
|
+
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
14044
|
+
width: "39",
|
|
14045
|
+
height: "28",
|
|
14046
|
+
viewBox: "0 0 39 28",
|
|
14047
|
+
fill: "none",
|
|
14048
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
14049
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
14050
|
+
d: "M34.5852 25.8793C34.9242 26.5446 34.4409 27.3333 33.6942 27.3333H27.7867C27.4106 27.3333 27.0664 27.1223 26.8957 26.7873L21.7391 16.6666V3.66663C21.7391 2.00977 23.0822 0.666626 24.7391 0.666626H35.0435C36.7003 0.666626 38.0435 2.00977 38.0435 3.66663V16.6666H29.8913L34.5852 25.8793ZM12.8461 25.8793C13.185 26.5446 12.7017 27.3333 11.955 27.3333H6.0475C5.67146 27.3333 5.3272 27.1223 5.15649 26.7873L-0.000110626 16.6666V3.66663C-0.000110626 2.00977 1.34304 0.666626 2.99989 0.666626H13.3043C14.9611 0.666626 16.3043 2.00977 16.3043 3.66663V16.6666H8.15208L12.8461 25.8793Z",
|
|
14051
|
+
fill: "currentColor"
|
|
14052
|
+
}))), /*#__PURE__*/React__default.createElement("img", {
|
|
14053
|
+
src: item === null || item === void 0 ? void 0 : item.avatar,
|
|
14054
|
+
className: " w-20 object-cover h-20 rounded-full"
|
|
14055
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
14056
|
+
className: "p-4 flex flex-col gap-2"
|
|
14057
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14058
|
+
className: "text-lg text-textHeading md:text-2xl"
|
|
14059
|
+
}, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
|
|
14060
|
+
className: "w-full border border-secondary"
|
|
14061
|
+
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.content), /*#__PURE__*/React__default.createElement("div", {
|
|
14062
|
+
className: "ms-auto"
|
|
14063
|
+
}, /*#__PURE__*/React__default.createElement(RatingStar, {
|
|
14064
|
+
star: (item === null || item === void 0 ? void 0 : item.rate) || 5,
|
|
14065
|
+
color: "#A85A09"
|
|
14066
|
+
})))));
|
|
14067
|
+
}))));
|
|
14068
|
+
};
|
|
14069
|
+
|
|
13241
14070
|
var CustomerRating10 = function CustomerRating10(props) {
|
|
13242
14071
|
var _data$data;
|
|
13243
14072
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
@@ -13412,7 +14241,7 @@ var Gallery1 = function Gallery1(props) {
|
|
|
13412
14241
|
}));
|
|
13413
14242
|
};
|
|
13414
14243
|
|
|
13415
|
-
var
|
|
14244
|
+
var Gallery2 = function Gallery2(props) {
|
|
13416
14245
|
var _data$data, _data$data$slice, _data$data2, _data$data2$slice, _data$data3, _data$data3$slice;
|
|
13417
14246
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
13418
14247
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
@@ -13451,6 +14280,30 @@ var Gallery1$1 = function Gallery1(props) {
|
|
|
13451
14280
|
})))));
|
|
13452
14281
|
};
|
|
13453
14282
|
|
|
14283
|
+
var Gallery3 = function Gallery3(props) {
|
|
14284
|
+
var _data$data;
|
|
14285
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
14286
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
14287
|
+
_props$data = props.data,
|
|
14288
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
14289
|
+
_props$SectionTitle = props.SectionTitle,
|
|
14290
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
14291
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
14292
|
+
className: "" + SECTION_DEFAULT_CLASS
|
|
14293
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
14294
|
+
data: data,
|
|
14295
|
+
shopConfigStyle: shopConfigStyle
|
|
14296
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14297
|
+
className: "grid grid-cols-3 gap-2 md:gap-6 mt-6 md:mt-12"
|
|
14298
|
+
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
|
|
14299
|
+
return /*#__PURE__*/React__default.createElement("img", {
|
|
14300
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
14301
|
+
key: "iggdf-" + index,
|
|
14302
|
+
className: (index === 1 || index === 5 ? "col-span-2" : "") + " w-full h-full object-cover"
|
|
14303
|
+
});
|
|
14304
|
+
}))));
|
|
14305
|
+
};
|
|
14306
|
+
|
|
13454
14307
|
var PageTitle1 = function PageTitle1(props) {
|
|
13455
14308
|
var _sectionData$;
|
|
13456
14309
|
var data = props.data,
|
|
@@ -13481,13 +14334,13 @@ var PageTitle2 = function PageTitle2(props) {
|
|
|
13481
14334
|
backgroundImage: "url(" + (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage) + ")"
|
|
13482
14335
|
}
|
|
13483
14336
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13484
|
-
className: "absolute top-0 w-full h-full bg-black
|
|
14337
|
+
className: "absolute top-0 w-full h-full bg-black/60 z-0"
|
|
13485
14338
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13486
|
-
className: "relative w-full p-20 z-10 flex flex-col gap-6 items-center justify-center"
|
|
14339
|
+
className: "relative w-full p-10 lg:p-20 z-10 flex flex-col gap-6 items-center justify-center"
|
|
13487
14340
|
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
13488
14341
|
className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
13489
14342
|
}, data !== null && data !== void 0 && data.sectionTitle ? data === null || data === void 0 ? void 0 : data.sectionTitle : route === null || route === void 0 ? void 0 : route.label), data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("div", {
|
|
13490
|
-
className: "text-lg md:text-2xl text-white"
|
|
14343
|
+
className: "text-lg md:text-2xl text-white text-center"
|
|
13491
14344
|
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null));
|
|
13492
14345
|
};
|
|
13493
14346
|
|
|
@@ -13568,9 +14421,9 @@ var PageTitle3 = function PageTitle3(props) {
|
|
|
13568
14421
|
backgroundImage: "url(" + (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage) + ")"
|
|
13569
14422
|
}
|
|
13570
14423
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13571
|
-
className: "absolute top-0 w-full h-full bg-black
|
|
14424
|
+
className: "absolute top-0 w-full h-full bg-black/60 z-0"
|
|
13572
14425
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13573
|
-
className: "relative w-full p-20 z-10 flex flex-col items-center justify-center"
|
|
14426
|
+
className: "relative w-full pt-8 md:p-2 md:p-12 lg:p-20 z-10 flex flex-col items-center justify-center"
|
|
13574
14427
|
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
13575
14428
|
className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
13576
14429
|
}, route === null || route === void 0 ? void 0 : (_route$route = route.route) === null || _route$route === void 0 ? void 0 : (_route$route$split = _route$route.split("/")) === null || _route$route$split === void 0 ? void 0 : (_route$route$split$fi = _route$route$split.filter(function (e) {
|
|
@@ -13592,7 +14445,7 @@ var About1 = function About1(props) {
|
|
|
13592
14445
|
_props$SectionTitle = props.SectionTitle,
|
|
13593
14446
|
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
13594
14447
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
13595
|
-
className: SECTION_CLASS + " flex flex-col gap-
|
|
14448
|
+
className: SECTION_CLASS + " flex flex-col gap-6"
|
|
13596
14449
|
}, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
13597
14450
|
data: data,
|
|
13598
14451
|
shopConfigStyle: shopConfigStyle
|
|
@@ -13612,13 +14465,14 @@ var About5 = function About5(props) {
|
|
|
13612
14465
|
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
13613
14466
|
data = props.data;
|
|
13614
14467
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
13615
|
-
console.log("About5 sectionData", sectionData);
|
|
13616
14468
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
13617
14469
|
className: SECTION_DEFAULT_CLASS + " "
|
|
13618
|
-
}, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement(
|
|
14470
|
+
}, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement("div", {
|
|
14471
|
+
className: "mb-6"
|
|
14472
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
13619
14473
|
data: data,
|
|
13620
14474
|
shopConfigStyle: shopConfigStyle
|
|
13621
|
-
}) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
14475
|
+
})) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
13622
14476
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-12 mt-4 md:mt-6"
|
|
13623
14477
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13624
14478
|
src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage,
|
|
@@ -13636,25 +14490,28 @@ var About5 = function About5(props) {
|
|
|
13636
14490
|
|
|
13637
14491
|
var About6 = function About6(props) {
|
|
13638
14492
|
var _sectionData$, _sectionData$2;
|
|
13639
|
-
var
|
|
13640
|
-
|
|
14493
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
14494
|
+
shopConfig = props.shopConfig,
|
|
14495
|
+
data = props.data,
|
|
14496
|
+
_props$SectionTitle = props.SectionTitle,
|
|
14497
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
13641
14498
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
13642
|
-
console.log("About5 sectionData", sectionData);
|
|
13643
14499
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
13644
14500
|
className: SECTION_DEFAULT_CLASS + " mt-0"
|
|
13645
|
-
},
|
|
13646
|
-
|
|
13647
|
-
|
|
13648
|
-
|
|
14501
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
14502
|
+
data: data,
|
|
14503
|
+
shopConfigStyle: shopConfigStyle
|
|
14504
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14505
|
+
className: "grid grid-cols-1 lg:grid-cols-5 gap-6 lg:gap-10 " + (data !== null && data !== void 0 && data.sectionTitle ? "mt-6" : "mt-0")
|
|
13649
14506
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13650
14507
|
src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage,
|
|
13651
14508
|
className: "w-full h-auto object-cover lg:hidden block rounded-xl"
|
|
13652
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14509
|
+
}), shopConfig !== null && shopConfig !== void 0 && shopConfig.shopAbout ? /*#__PURE__*/React__default.createElement("div", {
|
|
13653
14510
|
className: "ck-content text-wrap lg:col-span-3 bg-bgSecondary p-4 lg:p-6 rounded-2xl",
|
|
13654
14511
|
dangerouslySetInnerHTML: {
|
|
13655
14512
|
__html: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopAbout
|
|
13656
14513
|
}
|
|
13657
|
-
}), /*#__PURE__*/React__default.createElement("img", {
|
|
14514
|
+
}) : null, /*#__PURE__*/React__default.createElement("img", {
|
|
13658
14515
|
src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$2 = sectionData[0]) === null || _sectionData$2 === void 0 ? void 0 : _sectionData$2.srcImage,
|
|
13659
14516
|
className: "w-full h-auto object-cover lg:col-span-2 lg:block hidden rounded-xl"
|
|
13660
14517
|
})));
|
|
@@ -14039,6 +14896,10 @@ var FormCheckout = React.forwardRef(function (props, ref) {
|
|
|
14039
14896
|
})));
|
|
14040
14897
|
});
|
|
14041
14898
|
|
|
14899
|
+
var dayjs_min = createCommonjsModule(function (module, exports) {
|
|
14900
|
+
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
14901
|
+
});
|
|
14902
|
+
|
|
14042
14903
|
var OrderControllerWithoutLogin = function OrderControllerWithoutLogin(props) {
|
|
14043
14904
|
_objectDestructuringEmpty(props);
|
|
14044
14905
|
var draftOrderWithoutLogin = function draftOrderWithoutLogin(shopId, dataOrder) {
|
|
@@ -14474,7 +15335,7 @@ var SearchProduct1 = function SearchProduct1(props) {
|
|
|
14474
15335
|
} else {
|
|
14475
15336
|
var delayDebounceFn = setTimeout(function () {
|
|
14476
15337
|
handleSearch(valueSearch);
|
|
14477
|
-
},
|
|
15338
|
+
}, 600);
|
|
14478
15339
|
return function () {
|
|
14479
15340
|
return clearTimeout(delayDebounceFn);
|
|
14480
15341
|
};
|
|
@@ -14533,9 +15394,9 @@ var SearchProduct1 = function SearchProduct1(props) {
|
|
|
14533
15394
|
className: "flex flex-col px-1 gap-2 border-b w-full"
|
|
14534
15395
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14535
15396
|
className: "mt-1 text-lg font-medium\t"
|
|
14536
|
-
}, item === null || item === void 0 ? void 0 : (_item$productInfo = item.productInfo) === null || _item$productInfo === void 0 ? void 0 : _item$productInfo.productName), /*#__PURE__*/React__default.createElement("div", {
|
|
14537
|
-
className: " text-lg font-medium
|
|
14538
|
-
}, formatCurrency(item === null || item === void 0 ? void 0 : (_item$productInfo2 = item.productInfo) === null || _item$productInfo2 === void 0 ? void 0 : _item$productInfo2.price))));
|
|
15397
|
+
}, item === null || item === void 0 ? void 0 : (_item$productInfo = item.productInfo) === null || _item$productInfo === void 0 ? void 0 : _item$productInfo.productName), item !== null && item !== void 0 && item.isShowProductPriceOnLanding ? /*#__PURE__*/React__default.createElement("div", {
|
|
15398
|
+
className: " text-lg font-medium"
|
|
15399
|
+
}, formatCurrency(item === null || item === void 0 ? void 0 : (_item$productInfo2 = item.productInfo) === null || _item$productInfo2 === void 0 ? void 0 : _item$productInfo2.price)) : null));
|
|
14539
15400
|
})) : /*#__PURE__*/React__default.createElement("div", {
|
|
14540
15401
|
className: "text-center"
|
|
14541
15402
|
}, data === null || data === void 0 ? void 0 : data.sectionDescription));
|
|
@@ -14564,7 +15425,7 @@ var SearchBar2 = function SearchBar2(props) {
|
|
|
14564
15425
|
} else {
|
|
14565
15426
|
var delayDebounceFn = setTimeout(function () {
|
|
14566
15427
|
handleSearch(valueSearch);
|
|
14567
|
-
},
|
|
15428
|
+
}, 600);
|
|
14568
15429
|
return function () {
|
|
14569
15430
|
return clearTimeout(delayDebounceFn);
|
|
14570
15431
|
};
|
|
@@ -14626,9 +15487,9 @@ var SearchBar2 = function SearchBar2(props) {
|
|
|
14626
15487
|
className: "flex flex-col px-1 gap-2 border-b w-full"
|
|
14627
15488
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14628
15489
|
className: "mt-1 text-lg font-medium\t"
|
|
14629
|
-
}, item === null || item === void 0 ? void 0 : (_item$productInfo = item.productInfo) === null || _item$productInfo === void 0 ? void 0 : _item$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
15490
|
+
}, item === null || item === void 0 ? void 0 : (_item$productInfo = item.productInfo) === null || _item$productInfo === void 0 ? void 0 : _item$productInfo.productName), item !== null && item !== void 0 && item.isShowProductPriceOnLanding ? /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
14630
15491
|
product: item === null || item === void 0 ? void 0 : item.productInfo
|
|
14631
|
-
})));
|
|
15492
|
+
}) : null));
|
|
14632
15493
|
})) : null)));
|
|
14633
15494
|
};
|
|
14634
15495
|
|
|
@@ -14659,7 +15520,7 @@ var SearchBar5 = function SearchBar5(props) {
|
|
|
14659
15520
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14660
15521
|
className: "absolute inset-0 bg-black/45 rounded-xl md:rounded-3xl"
|
|
14661
15522
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14662
|
-
className: "flex flex-col relative gap-2 md:gap-4 items-center justify-center"
|
|
15523
|
+
className: "flex flex-col relative gap-2 md:gap-4 items-center justify-center w-full sm:min-w-2/3 lg:min-w-1/2"
|
|
14663
15524
|
}, data !== null && data !== void 0 && (_data$data2 = data.data) !== null && _data$data2 !== void 0 && _data$data2.title ? /*#__PURE__*/React__default.createElement("div", {
|
|
14664
15525
|
className: "text-lg font-semibold md:text-3xl lg:text-4xl text-textButton text-center"
|
|
14665
15526
|
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : _data$data3.title) : null, data !== null && data !== void 0 && (_data$data4 = data.data) !== null && _data$data4 !== void 0 && _data$data4.description ? /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -14669,7 +15530,7 @@ var SearchBar5 = function SearchBar5(props) {
|
|
|
14669
15530
|
icons: /*#__PURE__*/React__default.createElement(io5.IoSearchOutline, {
|
|
14670
15531
|
className: "text-gray3 ps-1 text-xl md:text-2xl"
|
|
14671
15532
|
}),
|
|
14672
|
-
wrapClassName: "w-
|
|
15533
|
+
wrapClassName: "w-[90%] sm:w-1/2 lg:w-[40%] ",
|
|
14673
15534
|
className: "w-full bg-bgSecondary mb-2 md:h-12",
|
|
14674
15535
|
onKeyDown: function onKeyDown(e) {
|
|
14675
15536
|
handleSearch(e);
|
|
@@ -14708,7 +15569,7 @@ var SearchBar6 = function SearchBar6(props) {
|
|
|
14708
15569
|
}
|
|
14709
15570
|
};
|
|
14710
15571
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
14711
|
-
className: "w-full flex flex-col justify-center px-3 md:px-6 gap-2 md:gap-4 lg:gap-6 items-center
|
|
15572
|
+
className: "w-full flex flex-col justify-center px-3 md:px-6 gap-2 md:gap-4 lg:gap-6 items-center py-6 md:py-12 lg:px-20",
|
|
14712
15573
|
style: {
|
|
14713
15574
|
background: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.srcImage) + ")",
|
|
14714
15575
|
backgroundPosition: "center",
|
|
@@ -14921,7 +15782,7 @@ var ShopHighlights8 = function ShopHighlights8(props) {
|
|
|
14921
15782
|
className: "flex flex-col h-full gap-3"
|
|
14922
15783
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
14923
15784
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
14924
|
-
className: "object-cover"
|
|
15785
|
+
className: "object-cover rounded-lg"
|
|
14925
15786
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14926
15787
|
className: "text-2xl text-textBody"
|
|
14927
15788
|
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -14930,6 +15791,89 @@ var ShopHighlights8 = function ShopHighlights8(props) {
|
|
|
14930
15791
|
})));
|
|
14931
15792
|
};
|
|
14932
15793
|
|
|
15794
|
+
var ShopHighlights9 = function ShopHighlights9(props) {
|
|
15795
|
+
var data = props.data,
|
|
15796
|
+
_props$Link = props.Link,
|
|
15797
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
15798
|
+
_props$SectionTitle = props.SectionTitle,
|
|
15799
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
15800
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
15801
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
15802
|
+
className: SECTION_CLASS + " flex flex-col gap-6 md:gap-10"
|
|
15803
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
15804
|
+
data: data
|
|
15805
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15806
|
+
className: "grid grid-cols-1 lg:grid-cols-2 gap-4 lg:gap-x-12 lg:gap-y-6"
|
|
15807
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
15808
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
15809
|
+
Link: Link,
|
|
15810
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
15811
|
+
key: "kdf-" + index
|
|
15812
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15813
|
+
className: "flex flex-col md:flex-row h-full gap-4"
|
|
15814
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
15815
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
15816
|
+
className: "object-cover rounded-lg w-full md:min-w-60 md:max-w-60"
|
|
15817
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15818
|
+
className: "flex flex-col gap-2"
|
|
15819
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15820
|
+
className: "text-lg font-semibold text-textHeading"
|
|
15821
|
+
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
|
|
15822
|
+
className: "w-1/3 border border-stroke"
|
|
15823
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15824
|
+
className: "flex-grow text-textBody leading-relaxed"
|
|
15825
|
+
}, item === null || item === void 0 ? void 0 : item.description))));
|
|
15826
|
+
})));
|
|
15827
|
+
};
|
|
15828
|
+
|
|
15829
|
+
var ShopHighlights10 = function ShopHighlights10(props) {
|
|
15830
|
+
var data = props.data,
|
|
15831
|
+
_props$Link = props.Link,
|
|
15832
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
15833
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
15834
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
15835
|
+
className: "pt-10"
|
|
15836
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15837
|
+
className: "relative overflow-hidden w-full"
|
|
15838
|
+
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
15839
|
+
viewBox: "0 0 1440 105",
|
|
15840
|
+
className: "text-[#FFE7CC] w-[105%]",
|
|
15841
|
+
fill: "none",
|
|
15842
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
15843
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
15844
|
+
d: "M439.5 55.3739C216.5 71.3734 77 37.8735 0 0.747667V104.606H1440C1410.56 83.7584 1313.93 35.6959 1162.92 10.2239C974.151 -21.6161 726.714 34.7672 439.5 55.3739Z",
|
|
15845
|
+
fill: "currentColor"
|
|
15846
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
15847
|
+
className: "text-primary w-[105%] absolute top-2"
|
|
15848
|
+
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
15849
|
+
viewBox: "0 0 1440 104",
|
|
15850
|
+
fill: "none",
|
|
15851
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
15852
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
15853
|
+
d: "M439.5 54.6864C216.5 70.6859 77 37.186 0 0.0601582V103.918H1440C1410.56 83.0709 1313.93 35.0084 1162.92 9.53638C974.151 -22.3036 726.714 34.0797 439.5 54.6864Z",
|
|
15854
|
+
fill: "currentColor"
|
|
15855
|
+
})))), /*#__PURE__*/React__default.createElement("div", {
|
|
15856
|
+
className: SECTION_CLASS + " mt-0 md:mt-0 grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-4 bg-primary py-10"
|
|
15857
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
15858
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
15859
|
+
Link: Link,
|
|
15860
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
15861
|
+
key: "kdf-" + index
|
|
15862
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15863
|
+
className: "flex flex-col h-full gap-6"
|
|
15864
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15865
|
+
className: "flex flex-col gap-3 items-center"
|
|
15866
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15867
|
+
className: "text-2xl text-center text-textButton"
|
|
15868
|
+
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
|
|
15869
|
+
className: "flex-grow text-lg leading-relaxed text-center text-textSecondary"
|
|
15870
|
+
}, item === null || item === void 0 ? void 0 : item.description)), /*#__PURE__*/React__default.createElement("img", {
|
|
15871
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
15872
|
+
className: "h-56 lg:h-72 object-cover mt-auto border-4 border-secondary"
|
|
15873
|
+
})));
|
|
15874
|
+
})));
|
|
15875
|
+
};
|
|
15876
|
+
|
|
14933
15877
|
var VideoFull1 = function VideoFull1(props) {
|
|
14934
15878
|
var _data$data, _data$data$;
|
|
14935
15879
|
var shopConfigStyle = props.shopConfigStyle,
|
|
@@ -15044,7 +15988,7 @@ var DefaultImage$1 = function DefaultImage(props) {
|
|
|
15044
15988
|
var _props$className = props.className,
|
|
15045
15989
|
className = _props$className === void 0 ? "" : _props$className;
|
|
15046
15990
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
15047
|
-
className: "flex justify-center items-center
|
|
15991
|
+
className: "flex justify-center items-center w-full h-full aspect-video object-cover rounded-lg " + className,
|
|
15048
15992
|
style: {
|
|
15049
15993
|
backgroundColor: "#FAFAFA"
|
|
15050
15994
|
}
|
|
@@ -15072,7 +16016,7 @@ var NewsImage = function NewsImage(props) {
|
|
|
15072
16016
|
};
|
|
15073
16017
|
return src ? /*#__PURE__*/React__default.createElement("img", {
|
|
15074
16018
|
src: src,
|
|
15075
|
-
className: "h-full rounded-lg
|
|
16019
|
+
className: "h-full rounded-lg w-full aspect-video object-cover " + className,
|
|
15076
16020
|
style: size ? {
|
|
15077
16021
|
width: size,
|
|
15078
16022
|
height: size
|
|
@@ -15083,8 +16027,56 @@ var NewsImage = function NewsImage(props) {
|
|
|
15083
16027
|
});
|
|
15084
16028
|
};
|
|
15085
16029
|
|
|
16030
|
+
var NewsItem2 = function NewsItem2(_ref) {
|
|
16031
|
+
var newsArticle = _ref.newsArticle;
|
|
16032
|
+
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
|
|
16033
|
+
news: newsArticle
|
|
16034
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
16035
|
+
className: "pt-3 font-medium text-lg line-clamp-3",
|
|
16036
|
+
style: {
|
|
16037
|
+
lineHeight: 1.6
|
|
16038
|
+
}
|
|
16039
|
+
}, newsArticle === null || newsArticle === void 0 ? void 0 : newsArticle.title));
|
|
16040
|
+
};
|
|
16041
|
+
|
|
16042
|
+
var relativeTime = createCommonjsModule(function (module, exports) {
|
|
16043
|
+
!function(r,e){module.exports=e();}(commonjsGlobal,(function(){return function(r,e,t){r=r||{};var n=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return "function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)};}}));
|
|
16044
|
+
});
|
|
16045
|
+
|
|
16046
|
+
var vi = createCommonjsModule(function (module, exports) {
|
|
16047
|
+
!function(t,n){module.exports=n(dayjs_min);}(commonjsGlobal,(function(t){function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var h=n(t),_={name:"vi",weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),weekStart:1,weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),ordinal:function(t){return t},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"}};return h.default.locale(_,null,!0),_}));
|
|
16048
|
+
});
|
|
16049
|
+
|
|
16050
|
+
dayjs_min.extend(relativeTime);
|
|
16051
|
+
dayjs_min.locale("vi");
|
|
16052
|
+
var NewsItem1 = function NewsItem1(_ref) {
|
|
16053
|
+
var _dayjs;
|
|
16054
|
+
var newsArticle = _ref.newsArticle,
|
|
16055
|
+
_ref$isHidden = _ref.isHidden,
|
|
16056
|
+
isHidden = _ref$isHidden === void 0 ? false : _ref$isHidden;
|
|
16057
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
16058
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4 "
|
|
16059
|
+
}, /*#__PURE__*/React__default.createElement(NewsImage, {
|
|
16060
|
+
news: newsArticle
|
|
16061
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
16062
|
+
className: "flex flex-col gap-4 md:gap-3 pb-4"
|
|
16063
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
16064
|
+
className: "font-medium text-lg line-clamp-3 md:line-clamp-2 lg:line-clamp-3",
|
|
16065
|
+
style: {
|
|
16066
|
+
lineHeight: 1.6
|
|
16067
|
+
}
|
|
16068
|
+
}, newsArticle === null || newsArticle === void 0 ? void 0 : newsArticle.title), !isHidden ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
16069
|
+
className: "line-clamp-4 md:line-clamp-3 lg:line-clamp-4 font-normal min-h-6 md:min-h-20 text-gray3",
|
|
16070
|
+
style: {
|
|
16071
|
+
lineHeight: 1.6
|
|
16072
|
+
}
|
|
16073
|
+
}, newsArticle === null || newsArticle === void 0 ? void 0 : newsArticle.shortDescription), /*#__PURE__*/React__default.createElement("div", {
|
|
16074
|
+
className: "text-gray3 mt-4"
|
|
16075
|
+
}, (_dayjs = dayjs_min(newsArticle === null || newsArticle === void 0 ? void 0 : newsArticle.timeUpdate)) === null || _dayjs === void 0 ? void 0 : _dayjs.fromNow())) : null));
|
|
16076
|
+
};
|
|
16077
|
+
|
|
15086
16078
|
var NewsHighlight1 = function NewsHighlight1(props) {
|
|
15087
|
-
var _newsArticles
|
|
16079
|
+
var _newsArticles$slice;
|
|
15088
16080
|
var _props$SectionTitle = props.SectionTitle,
|
|
15089
16081
|
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
15090
16082
|
_props$shopConfigStyl = props.shopConfigStyle,
|
|
@@ -15109,34 +16101,34 @@ var NewsHighlight1 = function NewsHighlight1(props) {
|
|
|
15109
16101
|
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
15110
16102
|
data: data,
|
|
15111
16103
|
shopConfigStyle: shopConfigStyle
|
|
15112
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
16104
|
+
}), (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
15113
16105
|
className: "mt-12 mb-6 grid grid-cols-1 md:grid-cols-2 gap-6 "
|
|
15114
16106
|
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
15115
16107
|
href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[0]),
|
|
15116
16108
|
Link: Link
|
|
15117
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
15118
|
-
|
|
15119
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15120
|
-
className: "pt-3 font-medium text-lg"
|
|
15121
|
-
}, newsArticles === null || newsArticles === void 0 ? void 0 : (_newsArticles$ = newsArticles[0]) === null || _newsArticles$ === void 0 ? void 0 : _newsArticles$.title))), /*#__PURE__*/React__default.createElement("div", {
|
|
16109
|
+
}, /*#__PURE__*/React__default.createElement(NewsItem2, {
|
|
16110
|
+
newsArticle: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[0]
|
|
16111
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
15122
16112
|
className: "flex flex-col gap-6"
|
|
15123
|
-
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
15124
|
-
className: "grid grid-cols-1 md:grid-cols-2 gap-4 ",
|
|
16113
|
+
}, newsArticles !== null && newsArticles !== void 0 && newsArticles[1] ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
15125
16114
|
href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1]),
|
|
15126
16115
|
Link: Link
|
|
15127
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
15128
|
-
|
|
15129
|
-
|
|
15130
|
-
|
|
15131
|
-
|
|
15132
|
-
|
|
16116
|
+
}, newsArticles !== null && newsArticles !== void 0 && newsArticles[2] ? /*#__PURE__*/React__default.createElement(NewsItem1, {
|
|
16117
|
+
newsArticle: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1],
|
|
16118
|
+
isHidden: true
|
|
16119
|
+
}) : /*#__PURE__*/React__default.createElement(NewsItem2, {
|
|
16120
|
+
newsArticle: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1]
|
|
16121
|
+
})) : null, newsArticles !== null && newsArticles !== void 0 && newsArticles[2] ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
15133
16122
|
href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[2]),
|
|
15134
16123
|
Link: Link
|
|
15135
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
15136
|
-
|
|
15137
|
-
|
|
15138
|
-
|
|
15139
|
-
|
|
16124
|
+
}, /*#__PURE__*/React__default.createElement(NewsItem1, {
|
|
16125
|
+
newsArticle: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[2],
|
|
16126
|
+
isHidden: true
|
|
16127
|
+
})) : null)) : /*#__PURE__*/React__default.createElement("div", {
|
|
16128
|
+
className: "w-full h-64 flex flex-col justify-center items-center text-gray3"
|
|
16129
|
+
}, /*#__PURE__*/React__default.createElement(gi.GiNewspaper, {
|
|
16130
|
+
size: 80
|
|
16131
|
+
}), " Kh\xF4ng c\xF3 tin t\u1EE9c n\xE0o"), /*#__PURE__*/React__default.createElement("div", {
|
|
15140
16132
|
className: "grid grid-cols-1 md:grid-cols-3 gap-6 mt-6 "
|
|
15141
16133
|
}, newsArticles === null || newsArticles === void 0 ? void 0 : (_newsArticles$slice = newsArticles.slice(3, 6)) === null || _newsArticles$slice === void 0 ? void 0 : _newsArticles$slice.map(function (item, index) {
|
|
15142
16134
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
@@ -15145,22 +16137,12 @@ var NewsHighlight1 = function NewsHighlight1(props) {
|
|
|
15145
16137
|
key: "kdjf-" + index
|
|
15146
16138
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15147
16139
|
className: "jgdfg-" + index
|
|
15148
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
15149
|
-
|
|
15150
|
-
})
|
|
15151
|
-
className: "font-medium text-lg py-2"
|
|
15152
|
-
}, item === null || item === void 0 ? void 0 : item.title)));
|
|
16140
|
+
}, /*#__PURE__*/React__default.createElement(NewsItem2, {
|
|
16141
|
+
newsArticle: item
|
|
16142
|
+
})));
|
|
15153
16143
|
})));
|
|
15154
16144
|
};
|
|
15155
16145
|
|
|
15156
|
-
var relativeTime = createCommonjsModule(function (module, exports) {
|
|
15157
|
-
!function(r,e){module.exports=e();}(commonjsGlobal,(function(){return function(r,e,t){r=r||{};var n=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return "function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)};}}));
|
|
15158
|
-
});
|
|
15159
|
-
|
|
15160
|
-
var vi = createCommonjsModule(function (module, exports) {
|
|
15161
|
-
!function(t,n){module.exports=n(dayjs_min);}(commonjsGlobal,(function(t){function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var h=n(t),_={name:"vi",weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),weekStart:1,weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),ordinal:function(t){return t},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"}};return h.default.locale(_,null,!0),_}));
|
|
15162
|
-
});
|
|
15163
|
-
|
|
15164
16146
|
var getAllNewsCategoriesApi = function getAllNewsCategoriesApi(shopId, landingShopConfigId, appId) {
|
|
15165
16147
|
if (appId === void 0) {
|
|
15166
16148
|
appId = "SSPA";
|
|
@@ -15271,10 +16253,10 @@ var News1 = function News1(props) {
|
|
|
15271
16253
|
});
|
|
15272
16254
|
}
|
|
15273
16255
|
}, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
|
|
15274
|
-
className: "rounded-b-lg bg-bgSecondary"
|
|
16256
|
+
className: "rounded-b-lg bg-bgSecondary overflow-y-auto scroll-container max-h-[700px]"
|
|
15275
16257
|
}, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
|
|
15276
16258
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
15277
|
-
className: "px-6
|
|
16259
|
+
className: "px-6 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
|
|
15278
16260
|
key: "sdjfdh-" + index,
|
|
15279
16261
|
onClick: function onClick() {
|
|
15280
16262
|
setCategorySelected(item);
|
|
@@ -15284,39 +16266,33 @@ var News1 = function News1(props) {
|
|
|
15284
16266
|
});
|
|
15285
16267
|
});
|
|
15286
16268
|
}
|
|
15287
|
-
},
|
|
16269
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
16270
|
+
className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
|
|
16271
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
16272
|
+
className: "line-clamp-3"
|
|
16273
|
+
}, item === null || item === void 0 ? void 0 : item.catName)));
|
|
15288
16274
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
15289
16275
|
className: "md:col-span-2 flex flex-col gap-8"
|
|
15290
16276
|
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
15291
|
-
className: "px-6 py-3 text-textButton text-lg rounded-t-lg bg-primary w-max"
|
|
15292
|
-
},
|
|
16277
|
+
className: "px-6 py-3 text-textButton text-lg rounded-t-lg bg-primary w-max max-w-full"
|
|
16278
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
16279
|
+
className: "line-clamp-1"
|
|
16280
|
+
}, params !== null && params !== void 0 && params.catId ? categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catName : "Tin mới")), /*#__PURE__*/React__default.createElement("div", {
|
|
15293
16281
|
className: "w-full border border-primary"
|
|
15294
16282
|
})), loading & isSeeMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
15295
16283
|
className: "w-full h-80 flex justify-center items-center"
|
|
15296
16284
|
}, /*#__PURE__*/React__default.createElement(Loading, null)) : /*#__PURE__*/React__default.createElement("div", {
|
|
15297
16285
|
className: "flex flex-col gap-8"
|
|
15298
16286
|
}, (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > 0 ? newsArticles === null || newsArticles === void 0 ? void 0 : (_newsArticles$slice = newsArticles.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _newsArticles$slice === void 0 ? void 0 : _newsArticles$slice.map(function (item, index) {
|
|
15299
|
-
var _dayjs;
|
|
15300
16287
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
15301
16288
|
href: getLinkNewsDetail(item),
|
|
15302
16289
|
Link: Link,
|
|
15303
16290
|
key: "kghf-" + index
|
|
15304
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
15305
|
-
|
|
15306
|
-
|
|
15307
|
-
}, /*#__PURE__*/React__default.createElement(NewsImage, {
|
|
15308
|
-
news: item
|
|
15309
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15310
|
-
className: "flex flex-col gap-2 md:gap-3 pb-4"
|
|
15311
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15312
|
-
className: "font-medium text-lg md:text-xl line-clamp-2"
|
|
15313
|
-
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
|
|
15314
|
-
className: "line-clamp-3 font-normal min-h-6 md:min-h-20 text-gray3"
|
|
15315
|
-
}, item === null || item === void 0 ? void 0 : item.shortDescription), /*#__PURE__*/React__default.createElement("div", {
|
|
15316
|
-
className: " text-gray3"
|
|
15317
|
-
}, (_dayjs = dayjs_min(item === null || item === void 0 ? void 0 : item.timeUpdate)) === null || _dayjs === void 0 ? void 0 : _dayjs.fromNow()))));
|
|
16291
|
+
}, /*#__PURE__*/React__default.createElement(NewsItem1, {
|
|
16292
|
+
newsArticle: item
|
|
16293
|
+
}));
|
|
15318
16294
|
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
15319
|
-
className: "w-full h-64 flex flex-col justify-center items-center text-gray3"
|
|
16295
|
+
className: "w-full h-64 flex flex-col justify-center items-center text-gray3 "
|
|
15320
16296
|
}, /*#__PURE__*/React__default.createElement(gi.GiNewspaper, {
|
|
15321
16297
|
size: 80
|
|
15322
16298
|
}), " Kh\xF4ng c\xF3 tin t\u1EE9c n\xE0o"), (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
|
|
@@ -15336,10 +16312,10 @@ var News1 = function News1(props) {
|
|
|
15336
16312
|
});
|
|
15337
16313
|
}
|
|
15338
16314
|
}, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
|
|
15339
|
-
className: "rounded-b-lg bg-bgSecondary"
|
|
16315
|
+
className: "rounded-b-lg bg-bgSecondary overflow-y-auto scroll-container max-h-[700px]"
|
|
15340
16316
|
}, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
|
|
15341
16317
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
15342
|
-
className: "px-
|
|
16318
|
+
className: "px-4 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
|
|
15343
16319
|
key: "sdjfdh-" + index,
|
|
15344
16320
|
onClick: function onClick() {
|
|
15345
16321
|
setCategorySelected(item);
|
|
@@ -15349,7 +16325,11 @@ var News1 = function News1(props) {
|
|
|
15349
16325
|
});
|
|
15350
16326
|
});
|
|
15351
16327
|
}
|
|
15352
|
-
},
|
|
16328
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
16329
|
+
className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
|
|
16330
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
16331
|
+
className: "line-clamp-3"
|
|
16332
|
+
}, item === null || item === void 0 ? void 0 : item.catName)));
|
|
15353
16333
|
}))));
|
|
15354
16334
|
};
|
|
15355
16335
|
|
|
@@ -15398,7 +16378,7 @@ var NewsDetail1 = function NewsDetail1(props) {
|
|
|
15398
16378
|
Link = _props$Link === void 0 ? null : _props$Link;
|
|
15399
16379
|
var _useState = React.useState({
|
|
15400
16380
|
catId: catId,
|
|
15401
|
-
|
|
16381
|
+
size: 10
|
|
15402
16382
|
}),
|
|
15403
16383
|
params = _useState[0],
|
|
15404
16384
|
setParams = _useState[1];
|
|
@@ -15436,10 +16416,10 @@ var NewsDetail1 = function NewsDetail1(props) {
|
|
|
15436
16416
|
dangerouslySetInnerHTML: {
|
|
15437
16417
|
__html: article === null || article === void 0 ? void 0 : article.content
|
|
15438
16418
|
}
|
|
15439
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
16419
|
+
}), (newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
15440
16420
|
className: "top-6 block md:hidden"
|
|
15441
16421
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15442
|
-
className: "px-6
|
|
16422
|
+
className: "px-6 bg-primary rounded-t-lg text-lg text-textButton text-center"
|
|
15443
16423
|
}, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
|
|
15444
16424
|
className: "rounded-b-lg bg-bgSecondary"
|
|
15445
16425
|
}, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
|
|
@@ -15447,10 +16427,14 @@ var NewsDetail1 = function NewsDetail1(props) {
|
|
|
15447
16427
|
href: getLinkNewsByCategory(item),
|
|
15448
16428
|
Link: Link
|
|
15449
16429
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15450
|
-
className: "px-
|
|
16430
|
+
className: "px-4 hover:bg-gray-100 hover:text-primary cursor-pointer",
|
|
15451
16431
|
key: "sdjfdh-" + index
|
|
15452
|
-
},
|
|
15453
|
-
|
|
16432
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
16433
|
+
className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
|
|
16434
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
16435
|
+
className: "line-clamp-3"
|
|
16436
|
+
}, item === null || item === void 0 ? void 0 : item.catName))));
|
|
16437
|
+
}))) : null, (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
15454
16438
|
className: "mt-6"
|
|
15455
16439
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15456
16440
|
className: "font-medium text-2xl mb-4"
|
|
@@ -15461,19 +16445,17 @@ var NewsDetail1 = function NewsDetail1(props) {
|
|
|
15461
16445
|
href: getLinkNewsDetail(item),
|
|
15462
16446
|
Link: Link,
|
|
15463
16447
|
key: "kghf-" + index
|
|
15464
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
15465
|
-
|
|
15466
|
-
})
|
|
15467
|
-
className: "font-medium text-lg line-clamp-2"
|
|
15468
|
-
}, item === null || item === void 0 ? void 0 : item.title)));
|
|
16448
|
+
}, /*#__PURE__*/React__default.createElement(NewsItem2, {
|
|
16449
|
+
newsArticle: item
|
|
16450
|
+
}));
|
|
15469
16451
|
})), (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement("div", {
|
|
15470
16452
|
className: "flex justify-center mt-4 w-full"
|
|
15471
16453
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
15472
16454
|
label: "Xem thêm",
|
|
15473
16455
|
onClick: handleSeeMore,
|
|
15474
16456
|
shopConfigStyle: shopConfigStyle
|
|
15475
|
-
})) : null)), /*#__PURE__*/React__default.createElement("div", {
|
|
15476
|
-
className: "sticky top-20 self-start hidden md:block"
|
|
16457
|
+
})) : null) : null), (newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
16458
|
+
className: "sticky top-20 self-start hidden md:block overflow-y-auto scroll-container max-h-[700px]"
|
|
15477
16459
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15478
16460
|
className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
|
|
15479
16461
|
}, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -15483,10 +16465,14 @@ var NewsDetail1 = function NewsDetail1(props) {
|
|
|
15483
16465
|
href: getLinkNewsByCategory(item),
|
|
15484
16466
|
Link: Link
|
|
15485
16467
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15486
|
-
className: "px-
|
|
16468
|
+
className: "px-4 hover:bg-gray-100 hover:text-primary cursor-pointer",
|
|
15487
16469
|
key: "sdjfdh-" + index
|
|
15488
|
-
},
|
|
15489
|
-
|
|
16470
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
16471
|
+
className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
|
|
16472
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
16473
|
+
className: "line-clamp-3"
|
|
16474
|
+
}, item === null || item === void 0 ? void 0 : item.catName))));
|
|
16475
|
+
}))) : null);
|
|
15490
16476
|
};
|
|
15491
16477
|
|
|
15492
16478
|
exports.About1 = About1;
|
|
@@ -15496,6 +16482,7 @@ exports.Address1 = Address1;
|
|
|
15496
16482
|
exports.Banner1 = Banner1;
|
|
15497
16483
|
exports.Banner2 = Banner2;
|
|
15498
16484
|
exports.Banner3 = Banner3;
|
|
16485
|
+
exports.Banner4 = Banner4;
|
|
15499
16486
|
exports.Banner7 = Banner7;
|
|
15500
16487
|
exports.BannerFull1 = BannerFull1;
|
|
15501
16488
|
exports.BannerFull2 = BannerFull2;
|
|
@@ -15511,6 +16498,7 @@ exports.CustomerRating10 = CustomerRating10;
|
|
|
15511
16498
|
exports.CustomerRating5 = CustomerRating5;
|
|
15512
16499
|
exports.CustomerRating6 = CustomerRating6;
|
|
15513
16500
|
exports.CustomerRating8 = CustomerRating8;
|
|
16501
|
+
exports.CustomerRating9 = CustomerRating9;
|
|
15514
16502
|
exports.DateTimePicker = DateTimePicker;
|
|
15515
16503
|
exports.Employees1 = Employees1;
|
|
15516
16504
|
exports.Features2 = Features2;
|
|
@@ -15518,12 +16506,16 @@ exports.Features3 = Features3;
|
|
|
15518
16506
|
exports.Footer1 = Footer1;
|
|
15519
16507
|
exports.Footer7 = Footer7;
|
|
15520
16508
|
exports.Gallery1 = Gallery1;
|
|
15521
|
-
exports.Gallery2 =
|
|
16509
|
+
exports.Gallery2 = Gallery2;
|
|
16510
|
+
exports.Gallery3 = Gallery3;
|
|
15522
16511
|
exports.Hero1 = Hero1;
|
|
15523
16512
|
exports.Hero10 = Hero10;
|
|
15524
16513
|
exports.Hero11 = Hero11;
|
|
15525
16514
|
exports.Hero12 = Hero12;
|
|
15526
16515
|
exports.Hero13 = Hero13;
|
|
16516
|
+
exports.Hero14 = Hero14;
|
|
16517
|
+
exports.Hero15 = Hero15;
|
|
16518
|
+
exports.Hero16 = Hero16;
|
|
15527
16519
|
exports.Hero2 = Hero2;
|
|
15528
16520
|
exports.Hero5 = Hero5;
|
|
15529
16521
|
exports.Hero6 = Hero6;
|
|
@@ -15547,6 +16539,8 @@ exports.ProductHighlight1 = ProductHighlight1;
|
|
|
15547
16539
|
exports.ProductHot1 = ProductHot1;
|
|
15548
16540
|
exports.ProductHot3 = ProductHot3;
|
|
15549
16541
|
exports.ProductImage = ProductImage;
|
|
16542
|
+
exports.ProductItem10 = ProductItem10;
|
|
16543
|
+
exports.ProductItem11 = ProductItem11;
|
|
15550
16544
|
exports.ProductItem2 = ProductItem2;
|
|
15551
16545
|
exports.ProductItem3 = ProductItem3;
|
|
15552
16546
|
exports.ProductItem4 = ProductItem4;
|
|
@@ -15554,6 +16548,7 @@ exports.ProductItem5 = ProductItem5;
|
|
|
15554
16548
|
exports.ProductItem6 = ProductItem6;
|
|
15555
16549
|
exports.ProductItem7 = ProductItem7;
|
|
15556
16550
|
exports.ProductItem8 = ProductItem8;
|
|
16551
|
+
exports.ProductItem9 = ProductItem9;
|
|
15557
16552
|
exports.ProductList5 = ProductList5;
|
|
15558
16553
|
exports.ProductList7 = ProductList7;
|
|
15559
16554
|
exports.ProductSale2 = ProductSale2;
|
|
@@ -15561,6 +16556,7 @@ exports.ProductSearch1 = ProductSearch1;
|
|
|
15561
16556
|
exports.Products10 = Products10;
|
|
15562
16557
|
exports.Products11 = Products11;
|
|
15563
16558
|
exports.Products12 = Products12;
|
|
16559
|
+
exports.Products14 = Products14;
|
|
15564
16560
|
exports.Products2 = Products2;
|
|
15565
16561
|
exports.Products3 = Products3;
|
|
15566
16562
|
exports.Products9 = Products9;
|
|
@@ -15573,13 +16569,16 @@ exports.SectionTitle1 = SectionTitle1;
|
|
|
15573
16569
|
exports.SectionTitle2 = SectionTitle2;
|
|
15574
16570
|
exports.SectionTitle3 = SectionTitle3;
|
|
15575
16571
|
exports.SectionTitle4 = SectionTitle4;
|
|
16572
|
+
exports.SectionTitle5 = SectionTitle5;
|
|
15576
16573
|
exports.Select = Select$1;
|
|
15577
16574
|
exports.ServiceDetail1 = ServiceDetail1;
|
|
16575
|
+
exports.ShopHighlights10 = ShopHighlights10;
|
|
15578
16576
|
exports.ShopHighlights2 = ShopHighlights2;
|
|
15579
16577
|
exports.ShopHighlights5 = ShopHighlights5;
|
|
15580
16578
|
exports.ShopHighlights6 = ShopHighlights6;
|
|
15581
16579
|
exports.ShopHighlights7 = ShopHighlights7;
|
|
15582
16580
|
exports.ShopHighlights8 = ShopHighlights8;
|
|
16581
|
+
exports.ShopHighlights9 = ShopHighlights9;
|
|
15583
16582
|
exports.TextArea = TextArea;
|
|
15584
16583
|
exports.TreatmentDetail1 = TreatmentDetail1;
|
|
15585
16584
|
exports.TreatmentItem1 = TreatmentItem1;
|