s-platform-landing-section 0.1.35 → 0.1.36-beta.2
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 +1661 -733
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1649 -734
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -6,17 +6,17 @@ import { RxCross2 } from 'react-icons/rx';
|
|
|
6
6
|
import { PiHandHeartBold } from 'react-icons/pi';
|
|
7
7
|
import { TbCategory } from 'react-icons/tb';
|
|
8
8
|
import { SiZalo } from 'react-icons/si';
|
|
9
|
-
import { IoIosStar,
|
|
9
|
+
import { IoIosStar, IoMdCheckmark, IoIosHeartEmpty, IoIosArrowBack, IoIosArrowForward, IoMdCheckmarkCircleOutline } from 'react-icons/io';
|
|
10
|
+
import { MdKeyboardDoubleArrowRight } from 'react-icons/md';
|
|
10
11
|
import { FaMinus, FaRegEyeSlash, FaPlus, FaStar, FaRegStarHalfStroke, FaRegStar } from 'react-icons/fa6';
|
|
11
|
-
import 'react-icons/
|
|
12
|
-
import { BsCurrencyDollar } from 'react-icons/bs';
|
|
12
|
+
import { AiOutlinePhone, AiOutlineShoppingCart, AiOutlineInfoCircle } from 'react-icons/ai';
|
|
13
13
|
import { LuSearch, LuShoppingCart, LuShoppingBag } from 'react-icons/lu';
|
|
14
14
|
import DatePicker from 'react-datepicker';
|
|
15
15
|
import 'react-datepicker/dist/react-datepicker.css';
|
|
16
16
|
import Slider from 'react-slick';
|
|
17
17
|
import 'slick-carousel/slick/slick.css';
|
|
18
18
|
import 'slick-carousel/slick/slick-theme.css';
|
|
19
|
-
import {
|
|
19
|
+
import { BsCurrencyDollar } from 'react-icons/bs';
|
|
20
20
|
import { GoCreditCard, GoClock } from 'react-icons/go';
|
|
21
21
|
import { GrPowerCycle } from 'react-icons/gr';
|
|
22
22
|
import { RiMessengerFill, RiDoubleQuotesL, RiDeleteBin7Line } from 'react-icons/ri';
|
|
@@ -948,7 +948,7 @@ var SectionTitle2 = function SectionTitle2(props) {
|
|
|
948
948
|
}), /*#__PURE__*/React__default.createElement(IoIosStar, {
|
|
949
949
|
className: "w-4 h-4 text-warning"
|
|
950
950
|
})) : null, data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("div", {
|
|
951
|
-
className: "text-xl text-center leading-relaxed text-textSecondary"
|
|
951
|
+
className: "text-xl text-center leading-relaxed text-textSecondary pb-4"
|
|
952
952
|
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
|
|
953
953
|
};
|
|
954
954
|
|
|
@@ -975,10 +975,27 @@ var SectionTitle4 = function SectionTitle4(props) {
|
|
|
975
975
|
}, 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", {
|
|
976
976
|
className: "border w-32 border-primary"
|
|
977
977
|
})) : null, data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("p", {
|
|
978
|
-
className: "text-xl text-center
|
|
978
|
+
className: "text-xl text-center leading-relaxed text-secondary mt-2"
|
|
979
979
|
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
|
|
980
980
|
};
|
|
981
981
|
|
|
982
|
+
var SectionTitle5 = function SectionTitle5(props) {
|
|
983
|
+
var data = props.data;
|
|
984
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
985
|
+
className: true
|
|
986
|
+
}, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement("div", {
|
|
987
|
+
className: "flex items-start gap-2"
|
|
988
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
989
|
+
className: "text-secondary text-4xl md:text-5xl"
|
|
990
|
+
}, /*#__PURE__*/React__default.createElement(MdKeyboardDoubleArrowRight, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
991
|
+
className: "flex flex-col gap-2"
|
|
992
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
993
|
+
className: "text-2xl md:text-4xl text-textHeading font-medium font-fontHeading"
|
|
994
|
+
}, data === null || data === void 0 ? void 0 : data.sectionTitle), data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("p", {
|
|
995
|
+
className: "text-lg md:text-2xl leading-relaxed text-textSecondary"
|
|
996
|
+
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null)) : null);
|
|
997
|
+
};
|
|
998
|
+
|
|
982
999
|
var Input = forwardRef(function (props, ref) {
|
|
983
1000
|
var _props$label = props.label,
|
|
984
1001
|
label = _props$label === void 0 ? "" : _props$label,
|
|
@@ -1211,20 +1228,22 @@ var Hero2 = function Hero2(props) {
|
|
|
1211
1228
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
1212
1229
|
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],
|
|
1213
1230
|
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,
|
|
1214
|
-
className: "w-full h-auto object-cover min-h-[
|
|
1231
|
+
className: "w-full h-auto object-cover min-h-[35vh] max-h-[100vh]"
|
|
1215
1232
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1216
|
-
className: "absolute inset-y-0 right-[
|
|
1233
|
+
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"
|
|
1217
1234
|
}, shopConfig !== null && shopConfig !== void 0 && shopConfig.logoUrl ? /*#__PURE__*/React__default.createElement("img", {
|
|
1218
1235
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
1219
1236
|
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"
|
|
1220
1237
|
}) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
1221
|
-
className: "font-medium line-clamp-1 ",
|
|
1238
|
+
className: "font-medium line-clamp-2 lg:line-clamp-1 text-2xl md:text-3xl lg:text-4xl xl:text-6xl",
|
|
1222
1239
|
style: {
|
|
1223
|
-
fontSize: "clamp(1.25rem, 4vw, 3.5rem)",
|
|
1224
1240
|
lineHeight: "1.5"
|
|
1225
1241
|
}
|
|
1226
1242
|
}, 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", {
|
|
1227
|
-
className: "
|
|
1243
|
+
className: "line-clamp-3 text-ellipsis text-base md:text-lg lg:text-xl xl:text-2xl",
|
|
1244
|
+
style: {
|
|
1245
|
+
lineHeight: 1.625
|
|
1246
|
+
}
|
|
1228
1247
|
}, 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)));
|
|
1229
1248
|
};
|
|
1230
1249
|
|
|
@@ -1236,13 +1255,16 @@ var Hero5 = function Hero5(props) {
|
|
|
1236
1255
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
1237
1256
|
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],
|
|
1238
1257
|
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,
|
|
1239
|
-
className: "w-full min-h-[
|
|
1258
|
+
className: "w-full min-h-[35vh] max-h-[100vh] object-cover"
|
|
1240
1259
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1241
|
-
className: "absolute inset-0 flex flex-col top-[
|
|
1260
|
+
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"
|
|
1242
1261
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1243
|
-
className: "text-xl sm:text-2xl md:text-3xl lg:text-4xl text-textHeading
|
|
1262
|
+
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",
|
|
1263
|
+
style: {
|
|
1264
|
+
lineHeight: 1.5
|
|
1265
|
+
}
|
|
1244
1266
|
}, 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", {
|
|
1245
|
-
className: "text-sm md:text-xl lg:text-2xl text-primary line-clamp-3
|
|
1267
|
+
className: "text-sm md:text-xl lg:text-2xl text-primary line-clamp-3 overflow-hidden text-ellipsis"
|
|
1246
1268
|
}, 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)));
|
|
1247
1269
|
};
|
|
1248
1270
|
|
|
@@ -1258,21 +1280,20 @@ var Hero6 = function Hero6(props) {
|
|
|
1258
1280
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
1259
1281
|
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],
|
|
1260
1282
|
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,
|
|
1261
|
-
className: "object-cover w-full h-
|
|
1283
|
+
className: "object-cover w-full min-h-[30vh] max-h-[100vh]"
|
|
1262
1284
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1263
|
-
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-
|
|
1285
|
+
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 "
|
|
1264
1286
|
}, 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", {
|
|
1265
|
-
className: "text-primary font-headingFont text-center line-clamp-1 text-
|
|
1287
|
+
className: "text-primary font-headingFont text-center line-clamp-1 text-2xl md:text-4xl xl:text-6xl text-ellipsis",
|
|
1266
1288
|
style: {
|
|
1267
|
-
fontSize: "clamp(1rem, 4vw, 3rem)",
|
|
1268
1289
|
lineHeight: "2"
|
|
1269
1290
|
}
|
|
1270
1291
|
}, 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", {
|
|
1271
|
-
className: "flex flex-col gap-
|
|
1292
|
+
className: "flex flex-col gap-2 md:gap-4 lg:gap-6 "
|
|
1272
1293
|
}, 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", {
|
|
1273
|
-
className: "line-clamp-
|
|
1294
|
+
className: "line-clamp-2 lg:line-clamp-3 md:text-xl xl:text-2xl",
|
|
1274
1295
|
style: {
|
|
1275
|
-
|
|
1296
|
+
lineHeight: 1.5
|
|
1276
1297
|
}
|
|
1277
1298
|
}, 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) {
|
|
1278
1299
|
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, {
|
|
@@ -1319,13 +1340,16 @@ var Hero10 = function Hero10(props) {
|
|
|
1319
1340
|
|
|
1320
1341
|
var SECTION_DEFAULT_CLASS = "my-12 mx-4 xl:mx-20 bg-background";
|
|
1321
1342
|
var SECTION_CLASS = "my-6 md:my-12 px-4 xl:px-20 bg-background";
|
|
1343
|
+
var SECTION_CLASS_PADDING = "py-6 md:py-12 px-4 xl:px-20 bg-background";
|
|
1322
1344
|
|
|
1323
1345
|
var Hero11 = function Hero11(props) {
|
|
1324
|
-
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3
|
|
1346
|
+
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;
|
|
1325
1347
|
var _props$data = props.data,
|
|
1326
1348
|
data = _props$data === void 0 ? {} : _props$data,
|
|
1327
1349
|
_props$shopConfigStyl = props.shopConfigStyle,
|
|
1328
|
-
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl
|
|
1350
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
1351
|
+
_props$Link = props.Link,
|
|
1352
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
1329
1353
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1330
1354
|
className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-2 py-12 !bg-bgSecondary gap-6 md:gap-12"
|
|
1331
1355
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -1353,11 +1377,16 @@ var Hero11 = function Hero11(props) {
|
|
|
1353
1377
|
className: "text-2xl md:text-4xl !leading-[1.6] font-headingFont w-max text-center text-primary"
|
|
1354
1378
|
}, 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", {
|
|
1355
1379
|
className: "text-lg md:text-xl lg:text-2xl"
|
|
1356
|
-
}, 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),
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1380
|
+
}, 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) {
|
|
1381
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
1382
|
+
Link: Link,
|
|
1383
|
+
key: "gdf-" + index,
|
|
1384
|
+
href: convertURL(button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
1385
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
1386
|
+
label: button === null || button === void 0 ? void 0 : button.label,
|
|
1387
|
+
shopConfigStyle: shopConfigStyle,
|
|
1388
|
+
className: "!font-normal w-max"
|
|
1389
|
+
}));
|
|
1361
1390
|
})));
|
|
1362
1391
|
};
|
|
1363
1392
|
|
|
@@ -1383,113 +1412,6 @@ var Hero12 = function Hero12(props) {
|
|
|
1383
1412
|
}, 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)));
|
|
1384
1413
|
};
|
|
1385
1414
|
|
|
1386
|
-
var CarouselItem = function CarouselItem(props) {
|
|
1387
|
-
var _Object$keys;
|
|
1388
|
-
var _props$data = props.data,
|
|
1389
|
-
data = _props$data === void 0 ? [] : _props$data,
|
|
1390
|
-
_props$className = props.className,
|
|
1391
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
1392
|
-
_props$style = props.style,
|
|
1393
|
-
style = _props$style === void 0 ? {} : _props$style,
|
|
1394
|
-
_props$onClick = props.onClick,
|
|
1395
|
-
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
1396
|
-
_props$isAll = props.isAll,
|
|
1397
|
-
isAll = _props$isAll === void 0 ? true : _props$isAll,
|
|
1398
|
-
_props$isNavigateButt = props.isNavigateButton,
|
|
1399
|
-
isNavigateButton = _props$isNavigateButt === void 0 ? true : _props$isNavigateButt,
|
|
1400
|
-
_props$itemClassName = props.itemClassName,
|
|
1401
|
-
itemClassName = _props$itemClassName === void 0 ? "" : _props$itemClassName;
|
|
1402
|
-
var listRef = useRef(null);
|
|
1403
|
-
var _useState = useState(false),
|
|
1404
|
-
canScrollLeft = _useState[0],
|
|
1405
|
-
setCanScrollLeft = _useState[1];
|
|
1406
|
-
var _useState2 = useState(false),
|
|
1407
|
-
canScrollRight = _useState2[0],
|
|
1408
|
-
setCanScrollRight = _useState2[1];
|
|
1409
|
-
var _useState3 = useState({}),
|
|
1410
|
-
value = _useState3[0],
|
|
1411
|
-
setValue = _useState3[1];
|
|
1412
|
-
useEffect(function () {
|
|
1413
|
-
var _listRef$current;
|
|
1414
|
-
checkScroll();
|
|
1415
|
-
(_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.addEventListener("scroll", checkScroll);
|
|
1416
|
-
return function () {
|
|
1417
|
-
var _listRef$current2;
|
|
1418
|
-
return (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.removeEventListener("scroll", checkScroll);
|
|
1419
|
-
};
|
|
1420
|
-
}, [data]);
|
|
1421
|
-
var checkScroll = function checkScroll() {
|
|
1422
|
-
if (listRef.current) {
|
|
1423
|
-
var _listRef$current3 = listRef.current,
|
|
1424
|
-
scrollLeft = _listRef$current3.scrollLeft,
|
|
1425
|
-
scrollWidth = _listRef$current3.scrollWidth,
|
|
1426
|
-
clientWidth = _listRef$current3.clientWidth;
|
|
1427
|
-
setCanScrollLeft(scrollLeft > 0);
|
|
1428
|
-
setCanScrollRight(scrollLeft + clientWidth < scrollWidth - 1);
|
|
1429
|
-
}
|
|
1430
|
-
};
|
|
1431
|
-
var handleClickPrevImg = function handleClickPrevImg() {
|
|
1432
|
-
if (listRef.current) {
|
|
1433
|
-
checkScroll();
|
|
1434
|
-
listRef.current.scrollBy({
|
|
1435
|
-
left: -300,
|
|
1436
|
-
behavior: "smooth"
|
|
1437
|
-
});
|
|
1438
|
-
}
|
|
1439
|
-
};
|
|
1440
|
-
var handleClickNextImg = function handleClickNextImg() {
|
|
1441
|
-
if (listRef.current) {
|
|
1442
|
-
checkScroll();
|
|
1443
|
-
listRef.current.scrollBy({
|
|
1444
|
-
left: 300,
|
|
1445
|
-
behavior: "smooth"
|
|
1446
|
-
});
|
|
1447
|
-
}
|
|
1448
|
-
};
|
|
1449
|
-
var handleOnClick = function handleOnClick(item) {
|
|
1450
|
-
setValue(item);
|
|
1451
|
-
onClick === null || onClick === void 0 ? void 0 : onClick(item);
|
|
1452
|
-
};
|
|
1453
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
1454
|
-
className: "h-10 md:h-12 flex justify-between items-center " + className,
|
|
1455
|
-
style: style
|
|
1456
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1457
|
-
className: "w-full overflow-hidden "
|
|
1458
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1459
|
-
className: "flex overflow-x-auto gap-2 " + (isNavigateButton ? "no-scrollbar" : "scroll-custom pb-2") + " items-center",
|
|
1460
|
-
ref: listRef
|
|
1461
|
-
}, isAll ? /*#__PURE__*/React__default.createElement("div", {
|
|
1462
|
-
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",
|
|
1463
|
-
onClick: function onClick() {
|
|
1464
|
-
handleOnClick({});
|
|
1465
|
-
}
|
|
1466
|
-
}, "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) {
|
|
1467
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
1468
|
-
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,
|
|
1469
|
-
key: "carousel-" + index,
|
|
1470
|
-
onClick: function onClick() {
|
|
1471
|
-
handleOnClick(item);
|
|
1472
|
-
}
|
|
1473
|
-
}, item === null || item === void 0 ? void 0 : item.label);
|
|
1474
|
-
})))), isNavigateButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
1475
|
-
className: "hidden my-auto gap-4 md:flex justify-end ps-10"
|
|
1476
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
1477
|
-
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"),
|
|
1478
|
-
onClick: handleClickPrevImg,
|
|
1479
|
-
disabled: !canScrollLeft
|
|
1480
|
-
}, /*#__PURE__*/React__default.createElement(IoIosArrowBack, {
|
|
1481
|
-
size: 24,
|
|
1482
|
-
className: "inline-block text-lg"
|
|
1483
|
-
})), /*#__PURE__*/React__default.createElement("button", {
|
|
1484
|
-
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"),
|
|
1485
|
-
onClick: handleClickNextImg,
|
|
1486
|
-
disabled: !canScrollRight
|
|
1487
|
-
}, /*#__PURE__*/React__default.createElement(IoIosArrowForward, {
|
|
1488
|
-
size: 24,
|
|
1489
|
-
className: "inline-block text-lg "
|
|
1490
|
-
}))) : null);
|
|
1491
|
-
};
|
|
1492
|
-
|
|
1493
1415
|
// A type of promise-like that resolves synchronously and supports only one observer
|
|
1494
1416
|
|
|
1495
1417
|
const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
|
|
@@ -1509,6 +1431,19 @@ function _catch(body, recover) {
|
|
|
1509
1431
|
return result;
|
|
1510
1432
|
}
|
|
1511
1433
|
|
|
1434
|
+
// Asynchronously await a promise and pass the result to a finally continuation
|
|
1435
|
+
function _finallyRethrows(body, finalizer) {
|
|
1436
|
+
try {
|
|
1437
|
+
var result = body();
|
|
1438
|
+
} catch (e) {
|
|
1439
|
+
return finalizer(true, e);
|
|
1440
|
+
}
|
|
1441
|
+
if (result && result.then) {
|
|
1442
|
+
return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
|
|
1443
|
+
}
|
|
1444
|
+
return finalizer(false, result);
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1512
1447
|
function bind(fn, thisArg) {
|
|
1513
1448
|
return function wrap() {
|
|
1514
1449
|
return fn.apply(thisArg, arguments);
|
|
@@ -7600,6 +7535,14 @@ var formatCurrency = function formatCurrency(amount) {
|
|
|
7600
7535
|
var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
7601
7536
|
return formattedAmount + " \u20AB";
|
|
7602
7537
|
};
|
|
7538
|
+
var formatCurrency2 = function formatCurrency2(amount) {
|
|
7539
|
+
if (isNaN(amount)) {
|
|
7540
|
+
return 'đ 0';
|
|
7541
|
+
}
|
|
7542
|
+
var roundedAmount = Math.round(amount);
|
|
7543
|
+
var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
7544
|
+
return "\u0111 " + formattedAmount;
|
|
7545
|
+
};
|
|
7603
7546
|
var pattern = {
|
|
7604
7547
|
phoneNumberPattern: /^(?:\+84|0)\d{9}$/
|
|
7605
7548
|
};
|
|
@@ -7697,104 +7640,275 @@ var Hero13 = function Hero13(props) {
|
|
|
7697
7640
|
var _sectionData$, _sectionData$$srcImag, _data$data, _data$data$;
|
|
7698
7641
|
var listRef = useRef(null);
|
|
7699
7642
|
var _useState = useState(false);
|
|
7700
|
-
var
|
|
7643
|
+
var shopConfig = props.shopConfig,
|
|
7644
|
+
data = props.data;
|
|
7701
7645
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7702
7646
|
var _CategoryController = CategoryController(props);
|
|
7703
7647
|
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("img", {
|
|
7704
7648
|
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],
|
|
7705
7649
|
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,
|
|
7706
7650
|
className: "w-full object-cover"
|
|
7707
|
-
})
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
var data = props.data;
|
|
7712
|
-
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7713
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
7714
|
-
className: "" + SECTION_DEFAULT_CLASS
|
|
7651
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7652
|
+
className: "fixed right-6 bottom-10 md:bottom-24 z-50 flex flex-col gap-4 w-max"
|
|
7653
|
+
}, /*#__PURE__*/React__default.createElement("a", {
|
|
7654
|
+
href: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopPhone ? "tel:" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone) : "#"
|
|
7715
7655
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7716
|
-
className: "
|
|
7717
|
-
},
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7656
|
+
className: "relative w-max"
|
|
7657
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
7658
|
+
className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
|
|
7659
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7660
|
+
className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
|
|
7661
|
+
}, /*#__PURE__*/React__default.createElement(AiOutlinePhone, {
|
|
7662
|
+
size: 36
|
|
7663
|
+
})))), /*#__PURE__*/React__default.createElement("a", {
|
|
7664
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#",
|
|
7665
|
+
target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopMessenger ? "_blank" : "_self"
|
|
7666
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7667
|
+
className: "relative w-max"
|
|
7668
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
7669
|
+
className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
|
|
7670
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7671
|
+
className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
|
|
7672
|
+
}, /*#__PURE__*/React__default.createElement(FaFacebookMessenger, {
|
|
7673
|
+
size: 32
|
|
7674
|
+
})))), /*#__PURE__*/React__default.createElement("a", {
|
|
7675
|
+
href: "https://zalo.me/" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#",
|
|
7676
|
+
target: "_blank"
|
|
7677
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7678
|
+
className: "relative w-max"
|
|
7679
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
7680
|
+
className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
|
|
7681
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7682
|
+
className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
|
|
7683
|
+
}, /*#__PURE__*/React__default.createElement(SiZalo, {
|
|
7684
|
+
size: 32
|
|
7685
|
+
}))))));
|
|
7732
7686
|
};
|
|
7733
7687
|
|
|
7734
|
-
var
|
|
7735
|
-
var _data$
|
|
7688
|
+
var Hero14 = function Hero14(props) {
|
|
7689
|
+
var _data$data, _data$data$, _data$data$$srcImages, _sectionData$, _sectionData$2, _sectionData$3, _sectionData$4, _sectionData$4$button;
|
|
7736
7690
|
var shopConfigStyle = props.shopConfigStyle,
|
|
7737
|
-
shopConfig = props.shopConfig,
|
|
7738
7691
|
data = props.data,
|
|
7739
|
-
_props$SectionTitle = props.SectionTitle,
|
|
7740
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
7741
7692
|
_props$Link = props.Link,
|
|
7742
7693
|
Link = _props$Link === void 0 ? null : _props$Link;
|
|
7743
7694
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7744
|
-
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);
|
|
7745
|
-
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
7746
|
-
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
|
|
7747
|
-
textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
7748
|
-
_shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
|
|
7749
|
-
background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
|
|
7750
|
-
_shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
|
|
7751
|
-
bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
7752
7695
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7753
|
-
className:
|
|
7696
|
+
className: "relative w-full bg-cover bg-center bg-no-repeat ",
|
|
7754
7697
|
style: {
|
|
7755
|
-
|
|
7756
|
-
color: textBody
|
|
7698
|
+
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]) + ")"
|
|
7757
7699
|
}
|
|
7758
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
7759
|
-
|
|
7760
|
-
shopConfigStyle: shopConfigStyle
|
|
7700
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7701
|
+
className: "absolute top-0 w-full h-full bg-black opacity-40 z-0"
|
|
7761
7702
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7762
|
-
className: "
|
|
7763
|
-
},
|
|
7703
|
+
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"
|
|
7704
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7705
|
+
className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
7706
|
+
}, 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", {
|
|
7707
|
+
className: "text-lg text-center text-white md:text-2xl"
|
|
7708
|
+
}, 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) {
|
|
7764
7709
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7765
7710
|
Link: Link,
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
}, /*#__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", {
|
|
7774
|
-
className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 h-auto"
|
|
7775
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7776
|
-
dangerouslySetInnerHTML: {
|
|
7777
|
-
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
7778
|
-
}
|
|
7779
|
-
})) : /*#__PURE__*/React__default.createElement("img", {
|
|
7780
|
-
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
7781
|
-
className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 object-cover",
|
|
7782
|
-
alt: ""
|
|
7783
|
-
})));
|
|
7711
|
+
key: "gdf-" + index,
|
|
7712
|
+
href: convertURL(button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
7713
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
7714
|
+
label: button === null || button === void 0 ? void 0 : button.label,
|
|
7715
|
+
className: "!bg-secondary",
|
|
7716
|
+
shopConfigStyle: shopConfigStyle
|
|
7717
|
+
}));
|
|
7784
7718
|
})));
|
|
7785
7719
|
};
|
|
7786
7720
|
|
|
7787
|
-
var
|
|
7788
|
-
var
|
|
7789
|
-
|
|
7790
|
-
_props$
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7721
|
+
var Hero15 = function Hero15(props) {
|
|
7722
|
+
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;
|
|
7723
|
+
var _props$data = props.data,
|
|
7724
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
7725
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
7726
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
7727
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7728
|
+
className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-2 py-12 !bg-primary gap-6 md:gap-10"
|
|
7729
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
7730
|
+
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],
|
|
7731
|
+
className: "object-cover max-w-full h-auto border-4 border-secondary block md:hidden"
|
|
7732
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7733
|
+
className: "relative flex flex-col justify-center gap-6 lg:gap-10"
|
|
7734
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7735
|
+
className: "text-2xl md:text-4xl !leading-[1.6] font-headingFont text-textSecondary"
|
|
7736
|
+
}, 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", {
|
|
7737
|
+
className: "text-lg text-textButton"
|
|
7738
|
+
}, 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", {
|
|
7739
|
+
className: "w-1/3"
|
|
7740
|
+
}), (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, {
|
|
7741
|
+
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) || "#"
|
|
7742
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
7743
|
+
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,
|
|
7744
|
+
shopConfigStyle: shopConfigStyle,
|
|
7745
|
+
className: "!font-normal w-max !bg-secondary"
|
|
7746
|
+
})) : null), /*#__PURE__*/React__default.createElement("img", {
|
|
7747
|
+
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],
|
|
7748
|
+
className: "object-cover max-w-full h-auto border-4 border-secondary hidden md:block"
|
|
7749
|
+
}));
|
|
7750
|
+
};
|
|
7751
|
+
|
|
7752
|
+
var Hero16 = function Hero16(props) {
|
|
7753
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$srcImage;
|
|
7754
|
+
var _props$data = props.data,
|
|
7755
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
7756
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
7757
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
7758
|
+
_props$router = props.router,
|
|
7759
|
+
router = _props$router === void 0 ? function () {} : _props$router,
|
|
7760
|
+
_props$Link = props.Link,
|
|
7761
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
7762
|
+
var _useState = useState(""),
|
|
7763
|
+
value = _useState[0],
|
|
7764
|
+
setValue = _useState[1];
|
|
7765
|
+
var handleSearch = function handleSearch(e) {
|
|
7766
|
+
if ((e === null || e === void 0 ? void 0 : e.key) === "Enter" && value && value.length > 0) {
|
|
7767
|
+
router === null || router === void 0 ? void 0 : router.push(genLinkSearch(value));
|
|
7768
|
+
}
|
|
7769
|
+
};
|
|
7770
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7771
|
+
className: "min-h-[480px] w-full h-full relative"
|
|
7772
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
7773
|
+
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],
|
|
7774
|
+
className: "object-cover max-w-full h-auto"
|
|
7775
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7776
|
+
className: "absolute top-0 left-0 z-0 bg-secondary opacity-80 w-full h-full"
|
|
7777
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7778
|
+
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"
|
|
7779
|
+
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
7780
|
+
className: "font-medium text-2xl lg:text-4xl"
|
|
7781
|
+
}, "Thu\u1ED1c t\u1ED1t, gi\xE1 t\u1ED1t - V\xEC s\u1EE9c kh\u1ECFe c\u1EE7a b\u1EA1n"), /*#__PURE__*/React__default.createElement("div", {
|
|
7782
|
+
className: " text-lg lg:text-2xl"
|
|
7783
|
+
}, "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", {
|
|
7784
|
+
className: "flex flex-col md:flex-row gap-4 w-full"
|
|
7785
|
+
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
7786
|
+
wrapClassName: "w-full md:w-2/3 xl:w-[85%]",
|
|
7787
|
+
icons: /*#__PURE__*/React__default.createElement(LuSearch, {
|
|
7788
|
+
className: "text-gray3",
|
|
7789
|
+
size: 18
|
|
7790
|
+
}),
|
|
7791
|
+
placeholder: "Nh\u1EADp t\xEAn s\u1EA3n ph\u1EA9m",
|
|
7792
|
+
inputClassName: "w-full text-textBody",
|
|
7793
|
+
className: "h-12",
|
|
7794
|
+
onKeyDown: function onKeyDown(e) {
|
|
7795
|
+
handleSearch(e);
|
|
7796
|
+
},
|
|
7797
|
+
onChange: setValue
|
|
7798
|
+
}), value && (value === null || value === void 0 ? void 0 : value.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7799
|
+
Link: Link,
|
|
7800
|
+
href: genLinkSearch(value)
|
|
7801
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
7802
|
+
label: "T\xECm ki\u1EBFm",
|
|
7803
|
+
className: "whitespace-nowrap h-12 w-max",
|
|
7804
|
+
shopConfigStyle: shopConfigStyle
|
|
7805
|
+
})) : /*#__PURE__*/React__default.createElement(Button, {
|
|
7806
|
+
label: "T\xECm ki\u1EBFm",
|
|
7807
|
+
className: "whitespace-nowrap w-max h-12",
|
|
7808
|
+
shopConfigStyle: shopConfigStyle
|
|
7809
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
7810
|
+
className: "absolute bottom-0 right-0 text-primary w-[45%] z-10"
|
|
7811
|
+
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
7812
|
+
viewBox: "0 0 480 212",
|
|
7813
|
+
fill: "none",
|
|
7814
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
7815
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
7816
|
+
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",
|
|
7817
|
+
fill: "currentColor"
|
|
7818
|
+
}))), /*#__PURE__*/React__default.createElement("img", {
|
|
7819
|
+
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],
|
|
7820
|
+
className: "object-cover w-[28%] h-auto absolute right-10 opacity-100 bottom-0 z-10"
|
|
7821
|
+
}));
|
|
7822
|
+
};
|
|
7823
|
+
|
|
7824
|
+
var Features2 = function Features2(props) {
|
|
7825
|
+
var data = props.data;
|
|
7826
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7827
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7828
|
+
className: "" + SECTION_DEFAULT_CLASS
|
|
7829
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7830
|
+
className: "p-6 grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6 lg:gap-8 rounded-xl bg-bgSecondary"
|
|
7831
|
+
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
7832
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7833
|
+
className: "flex flex-col gap-2 items-center text-sm lg:text-lg font-semibold text-center",
|
|
7834
|
+
key: "dfgg-" + index
|
|
7835
|
+
}, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
7836
|
+
className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24 h-24",
|
|
7837
|
+
dangerouslySetInnerHTML: {
|
|
7838
|
+
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
7839
|
+
}
|
|
7840
|
+
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
7841
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
7842
|
+
className: "w-12 md:w-16 lg:w-20 xl:w-24 text-primary",
|
|
7843
|
+
alt: "logo"
|
|
7844
|
+
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title));
|
|
7845
|
+
})));
|
|
7846
|
+
};
|
|
7847
|
+
|
|
7848
|
+
var Features3 = function Features3(props) {
|
|
7849
|
+
var _data$sectionTitle;
|
|
7850
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
7851
|
+
shopConfig = props.shopConfig,
|
|
7852
|
+
data = props.data,
|
|
7853
|
+
_props$SectionTitle = props.SectionTitle,
|
|
7854
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
7855
|
+
_props$Link = props.Link,
|
|
7856
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
7857
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7858
|
+
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);
|
|
7859
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
7860
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
|
|
7861
|
+
textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
7862
|
+
_shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
|
|
7863
|
+
background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
|
|
7864
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
|
|
7865
|
+
bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
7866
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7867
|
+
className: SECTION_DEFAULT_CLASS + " flex flex-col gap-4 lg:gap-6",
|
|
7868
|
+
style: {
|
|
7869
|
+
background: background,
|
|
7870
|
+
color: textBody
|
|
7871
|
+
}
|
|
7872
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
7873
|
+
data: data,
|
|
7874
|
+
shopConfigStyle: shopConfigStyle
|
|
7875
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7876
|
+
className: "grid grid-cols-2 sm:grid-cols-4 gap-6 text-sm md:text-base"
|
|
7877
|
+
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
7878
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7879
|
+
Link: Link,
|
|
7880
|
+
href: (item === null || item === void 0 ? void 0 : item.link) || convertURL(item === null || item === void 0 ? void 0 : item.route) || "#"
|
|
7881
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7882
|
+
className: "grid grid-cols-2 p-3 h-full w-full rounded-lg font-semibold",
|
|
7883
|
+
key: "dfsdfj-" + index,
|
|
7884
|
+
style: {
|
|
7885
|
+
background: bgSecondary
|
|
7886
|
+
}
|
|
7887
|
+
}, /*#__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", {
|
|
7888
|
+
className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 h-auto"
|
|
7889
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7890
|
+
dangerouslySetInnerHTML: {
|
|
7891
|
+
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
7892
|
+
}
|
|
7893
|
+
})) : /*#__PURE__*/React__default.createElement("img", {
|
|
7894
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
7895
|
+
className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 object-cover",
|
|
7896
|
+
alt: ""
|
|
7897
|
+
})));
|
|
7898
|
+
})));
|
|
7899
|
+
};
|
|
7900
|
+
|
|
7901
|
+
var ProductController = function ProductController(props) {
|
|
7902
|
+
var shopConfig = props.shopConfig,
|
|
7903
|
+
params = props.params,
|
|
7904
|
+
_props$isAutoGetList = props.isAutoGetList,
|
|
7905
|
+
isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList;
|
|
7906
|
+
var _useState = useState([]),
|
|
7907
|
+
products = _useState[0],
|
|
7908
|
+
setProducts = _useState[1];
|
|
7909
|
+
var _useState2 = useState(false),
|
|
7910
|
+
loading = _useState2[0],
|
|
7911
|
+
setLoading = _useState2[1];
|
|
7798
7912
|
var _useState3 = useState(),
|
|
7799
7913
|
page = _useState3[0],
|
|
7800
7914
|
setPage = _useState3[1];
|
|
@@ -7819,11 +7933,6 @@ var ProductController = function ProductController(props) {
|
|
|
7819
7933
|
var _res$data2, _res$data3;
|
|
7820
7934
|
setProducts(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
|
|
7821
7935
|
setPage(res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.page);
|
|
7822
|
-
var url = new URL(window.location.href);
|
|
7823
|
-
if (/^(\/(danh-muc))\/[^/]+-\d+$/.test(url.pathname)) {
|
|
7824
|
-
url.pathname = url.pathname.replace(/\/[^/]+-\d+$/, "");
|
|
7825
|
-
window.history.replaceState({}, '', url.pathname + url.search);
|
|
7826
|
-
}
|
|
7827
7936
|
}
|
|
7828
7937
|
setLoading(false);
|
|
7829
7938
|
});
|
|
@@ -8223,6 +8332,7 @@ var NotFoundProduct = function NotFoundProduct(props) {
|
|
|
8223
8332
|
};
|
|
8224
8333
|
|
|
8225
8334
|
var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
8335
|
+
var _products$slice;
|
|
8226
8336
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
8227
8337
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
8228
8338
|
_props$data = props.data,
|
|
@@ -8235,7 +8345,8 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8235
8345
|
_shopConfigStyle$colo2 = _shopConfigStyle$colo.secondary,
|
|
8236
8346
|
secondary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2;
|
|
8237
8347
|
var _useState = useState({
|
|
8238
|
-
types: "1"
|
|
8348
|
+
types: "1,10",
|
|
8349
|
+
size: 12
|
|
8239
8350
|
}),
|
|
8240
8351
|
params = _useState[0],
|
|
8241
8352
|
setParams = _useState[1];
|
|
@@ -8252,15 +8363,27 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8252
8363
|
var _useState2 = useState(0),
|
|
8253
8364
|
selectedCategory = _useState2[0],
|
|
8254
8365
|
setSelectedCategory = _useState2[1];
|
|
8366
|
+
var _useState3 = useState(true),
|
|
8367
|
+
isGetMore = _useState3[0],
|
|
8368
|
+
setIsGetMore = _useState3[1];
|
|
8255
8369
|
useEffect(function () {
|
|
8256
8370
|
var newParams = _extends({}, params, {
|
|
8257
|
-
categoryId: selectedCategory
|
|
8371
|
+
categoryId: selectedCategory,
|
|
8372
|
+
size: 12
|
|
8258
8373
|
});
|
|
8259
8374
|
if (!selectedCategory) {
|
|
8260
8375
|
delete newParams.categoryId;
|
|
8261
8376
|
}
|
|
8262
8377
|
setParams(newParams);
|
|
8263
8378
|
}, [selectedCategory]);
|
|
8379
|
+
var handleGetMoreProducts = function handleGetMoreProducts() {
|
|
8380
|
+
setIsGetMore(false);
|
|
8381
|
+
setParams(function (prev) {
|
|
8382
|
+
return _extends({}, prev, {
|
|
8383
|
+
size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
|
|
8384
|
+
});
|
|
8385
|
+
});
|
|
8386
|
+
};
|
|
8264
8387
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
8265
8388
|
className: SECTION_DEFAULT_CLASS + " relative"
|
|
8266
8389
|
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
@@ -8277,15 +8400,16 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8277
8400
|
key: index,
|
|
8278
8401
|
className: "p-3 flex gap-3 shrink-0 cursor-pointer text-base " + (selectedCategory === item.categoryId ? "bg-primary text-textButton" : ""),
|
|
8279
8402
|
onClick: function onClick() {
|
|
8280
|
-
|
|
8403
|
+
setSelectedCategory(item.categoryId);
|
|
8404
|
+
setIsGetMore(true);
|
|
8281
8405
|
}
|
|
8282
8406
|
}, item === null || item === void 0 ? void 0 : item.cateName);
|
|
8283
8407
|
}
|
|
8284
|
-
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
8408
|
+
}), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
8285
8409
|
className: "flex w-full justify-center p-12"
|
|
8286
|
-
}, /*#__PURE__*/React__default.createElement(Loading, null)) : products
|
|
8410
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
8287
8411
|
className: "grid grid-cols-1 md:grid-cols-2 gap-10 mt-6"
|
|
8288
|
-
}, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
8412
|
+
}, 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) {
|
|
8289
8413
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
8290
8414
|
key: index,
|
|
8291
8415
|
Link: Link,
|
|
@@ -8295,7 +8419,13 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8295
8419
|
}));
|
|
8296
8420
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
|
|
8297
8421
|
text: "d\u1ECBch v\u1EE5"
|
|
8298
|
-
})
|
|
8422
|
+
}), !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", {
|
|
8423
|
+
className: "w-full flex justify-center mt-6"
|
|
8424
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
8425
|
+
label: "Xem thêm",
|
|
8426
|
+
onClick: handleGetMoreProducts,
|
|
8427
|
+
className: "" + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
|
|
8428
|
+
})) : null), /*#__PURE__*/React__default.createElement(Dash, {
|
|
8299
8429
|
color: secondary
|
|
8300
8430
|
}));
|
|
8301
8431
|
};
|
|
@@ -8313,7 +8443,7 @@ var TreatmentsList6 = function TreatmentsList6(props) {
|
|
|
8313
8443
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
8314
8444
|
var _useState = useState({
|
|
8315
8445
|
size: 12,
|
|
8316
|
-
types: "1"
|
|
8446
|
+
types: "1,10"
|
|
8317
8447
|
}),
|
|
8318
8448
|
params = _useState[0],
|
|
8319
8449
|
setParams = _useState[1];
|
|
@@ -8512,80 +8642,176 @@ var BookingController = function BookingController(props) {
|
|
|
8512
8642
|
};
|
|
8513
8643
|
};
|
|
8514
8644
|
|
|
8515
|
-
var
|
|
8645
|
+
var DateTimePicker = forwardRef(function (props, ref) {
|
|
8516
8646
|
var _props$label = props.label,
|
|
8517
8647
|
label = _props$label === void 0 ? "" : _props$label,
|
|
8518
|
-
_props$labelClassName = props.labelClassName,
|
|
8519
|
-
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8520
|
-
_props$placeholder = props.placeholder,
|
|
8521
|
-
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
8522
8648
|
_props$className = props.className,
|
|
8523
8649
|
className = _props$className === void 0 ? "" : _props$className,
|
|
8524
|
-
_props$
|
|
8525
|
-
|
|
8526
|
-
_props$wrapClassName = props.wrapClassName,
|
|
8527
|
-
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
8528
|
-
_props$selectClassNam = props.selectClassName,
|
|
8529
|
-
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
8530
|
-
_props$disabled = props.disabled,
|
|
8531
|
-
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
8532
|
-
_props$rules = props.rules,
|
|
8533
|
-
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
8534
|
-
options = props.options,
|
|
8650
|
+
_props$labelClassName = props.labelClassName,
|
|
8651
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8535
8652
|
_props$defaultValue = props.defaultValue,
|
|
8536
|
-
defaultValue = _props$defaultValue === void 0 ?
|
|
8537
|
-
|
|
8538
|
-
_props$
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
|
|
8544
|
-
_props$funcDelete = props.funcDelete,
|
|
8545
|
-
funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
|
|
8546
|
-
_props$isSearch = props.isSearch,
|
|
8547
|
-
isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
|
|
8548
|
-
renderItem = props.renderItem;
|
|
8549
|
-
var _useState = useState(false),
|
|
8550
|
-
isOpen = _useState[0],
|
|
8551
|
-
setIsOpen = _useState[1];
|
|
8552
|
-
var selectRef = useRef(null);
|
|
8653
|
+
defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
|
|
8654
|
+
_props$time = props.time,
|
|
8655
|
+
time = _props$time === void 0 ? false : _props$time,
|
|
8656
|
+
rules = props.rules;
|
|
8657
|
+
var _useState = useState(defaultValue),
|
|
8658
|
+
value = _useState[0],
|
|
8659
|
+
_setValue = _useState[1];
|
|
8553
8660
|
var _useState2 = useState(""),
|
|
8554
8661
|
error = _useState2[0],
|
|
8555
8662
|
_setError = _useState2[1];
|
|
8556
|
-
var
|
|
8557
|
-
|
|
8558
|
-
|
|
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
|
-
|
|
8663
|
+
var _className = "h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer " + className;
|
|
8664
|
+
var CustomInput = forwardRef(function (_ref, ref) {
|
|
8665
|
+
var value = _ref.value,
|
|
8666
|
+
onClick = _ref.onClick,
|
|
8667
|
+
className = _ref.className;
|
|
8668
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8669
|
+
className: className,
|
|
8670
|
+
onClick: onClick,
|
|
8671
|
+
ref: ref
|
|
8672
|
+
}, value);
|
|
8673
|
+
});
|
|
8674
|
+
useImperativeHandle(ref, function () {
|
|
8675
|
+
return {
|
|
8676
|
+
validateData: function validateData() {
|
|
8677
|
+
return _validateData();
|
|
8678
|
+
},
|
|
8679
|
+
setValue: function setValue(text) {
|
|
8680
|
+
return _setValue(text);
|
|
8681
|
+
},
|
|
8682
|
+
getValue: function getValue() {
|
|
8683
|
+
return value;
|
|
8684
|
+
},
|
|
8685
|
+
setError: function setError(err) {
|
|
8686
|
+
return _setError(err);
|
|
8687
|
+
}
|
|
8688
|
+
};
|
|
8689
|
+
});
|
|
8690
|
+
var _validateData = function _validateData() {
|
|
8691
|
+
var count = 0;
|
|
8692
|
+
rules === null || rules === void 0 ? void 0 : rules.forEach(function (e) {
|
|
8693
|
+
var _e$pattern, _e$validate;
|
|
8694
|
+
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
|
|
8695
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8696
|
+
count++;
|
|
8697
|
+
return false;
|
|
8698
|
+
} 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))) {
|
|
8699
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8700
|
+
count++;
|
|
8701
|
+
return false;
|
|
8702
|
+
} 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))) {
|
|
8703
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8704
|
+
count++;
|
|
8705
|
+
return false;
|
|
8706
|
+
}
|
|
8707
|
+
});
|
|
8708
|
+
if (count) {
|
|
8709
|
+
return false;
|
|
8710
|
+
} else {
|
|
8711
|
+
_setError('');
|
|
8712
|
+
return true;
|
|
8713
|
+
}
|
|
8714
|
+
};
|
|
8715
|
+
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
8716
|
+
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
8717
|
+
}));
|
|
8718
|
+
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
8719
|
+
className: "text-danger"
|
|
8720
|
+
}, " *") : null;
|
|
8721
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8722
|
+
className: "w-full"
|
|
8723
|
+
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
8724
|
+
className: "mb-1 " + labelClassName
|
|
8725
|
+
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
|
|
8726
|
+
selected: value,
|
|
8727
|
+
onChange: function onChange(date) {
|
|
8728
|
+
_setValue(date);
|
|
8729
|
+
},
|
|
8730
|
+
customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
|
|
8731
|
+
className: _className
|
|
8732
|
+
}),
|
|
8733
|
+
dateFormat: time ? "dd/MM/yyyy HH:mm" : "dd/MM/yyyy",
|
|
8734
|
+
showTimeSelect: time,
|
|
8735
|
+
timeIntervals: 15,
|
|
8736
|
+
wrapperClassName: "w-full"
|
|
8737
|
+
}), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
8738
|
+
className: "text-danger"
|
|
8739
|
+
}, error) : null);
|
|
8740
|
+
});
|
|
8741
|
+
|
|
8742
|
+
var Select = forwardRef(function (props, ref) {
|
|
8743
|
+
var _props$label = props.label,
|
|
8744
|
+
label = _props$label === void 0 ? "" : _props$label,
|
|
8745
|
+
_props$labelClassName = props.labelClassName,
|
|
8746
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8747
|
+
_props$placeholder = props.placeholder,
|
|
8748
|
+
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
8749
|
+
_props$className = props.className,
|
|
8750
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
8751
|
+
_props$optionClassNam = props.optionClassName,
|
|
8752
|
+
optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
|
|
8753
|
+
_props$wrapClassName = props.wrapClassName,
|
|
8754
|
+
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
8755
|
+
_props$selectClassNam = props.selectClassName,
|
|
8756
|
+
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
8757
|
+
_props$disabled = props.disabled,
|
|
8758
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
8759
|
+
_props$rules = props.rules,
|
|
8760
|
+
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
8761
|
+
options = props.options,
|
|
8762
|
+
_props$defaultValue = props.defaultValue,
|
|
8763
|
+
defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
|
|
8764
|
+
_props$isMulti = props.isMulti,
|
|
8765
|
+
isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
|
|
8766
|
+
_props$onClick = props.onClick,
|
|
8767
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
8768
|
+
_props$isButtonDelete = props.isButtonDelete,
|
|
8769
|
+
isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
|
|
8770
|
+
_props$funcDelete = props.funcDelete,
|
|
8771
|
+
funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
|
|
8772
|
+
_props$isSearch = props.isSearch,
|
|
8773
|
+
isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
|
|
8774
|
+
renderItem = props.renderItem;
|
|
8775
|
+
var _useState = useState(false),
|
|
8776
|
+
isOpen = _useState[0],
|
|
8777
|
+
setIsOpen = _useState[1];
|
|
8778
|
+
var selectRef = useRef(null);
|
|
8779
|
+
var _useState2 = useState(""),
|
|
8780
|
+
error = _useState2[0],
|
|
8781
|
+
_setError = _useState2[1];
|
|
8782
|
+
var _useState3 = useState(""),
|
|
8783
|
+
inputSearch = _useState3[0],
|
|
8784
|
+
setInputSearch = _useState3[1];
|
|
8785
|
+
var _useState4 = useState(defaultValue),
|
|
8786
|
+
value = _useState4[0],
|
|
8787
|
+
setValue = _useState4[1];
|
|
8788
|
+
var _useState5 = useState(options),
|
|
8789
|
+
listOptions = _useState5[0],
|
|
8790
|
+
setListOptions = _useState5[1];
|
|
8791
|
+
var dropdownRef = useRef(null);
|
|
8792
|
+
var _useState6 = useState('bottom'),
|
|
8793
|
+
dropdownPosition = _useState6[0],
|
|
8794
|
+
setDropdownPosition = _useState6[1];
|
|
8795
|
+
var inputRef = useRef(null);
|
|
8796
|
+
useEffect(function () {
|
|
8797
|
+
if (isMulti) setValue(defaultValue);
|
|
8798
|
+
}, [defaultValue]);
|
|
8799
|
+
useEffect(function () {
|
|
8800
|
+
setListOptions(options);
|
|
8801
|
+
if (!isMulti) setValue(defaultValue);
|
|
8802
|
+
}, [options]);
|
|
8803
|
+
useEffect(function () {
|
|
8804
|
+
var delayDebounceFn = setTimeout(function () {
|
|
8805
|
+
handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
|
|
8806
|
+
}, 600);
|
|
8807
|
+
return function () {
|
|
8808
|
+
return clearTimeout(delayDebounceFn);
|
|
8809
|
+
};
|
|
8810
|
+
}, [inputSearch]);
|
|
8811
|
+
useEffect(function () {
|
|
8812
|
+
var _inputRef$current;
|
|
8813
|
+
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
8814
|
+
var updateDropdownPosition = function updateDropdownPosition() {
|
|
8589
8815
|
if (selectRef.current && dropdownRef.current) {
|
|
8590
8816
|
var _selectRef$current, _window;
|
|
8591
8817
|
var selectRect = selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.getBoundingClientRect();
|
|
@@ -8659,20 +8885,13 @@ var Select = forwardRef(function (props, ref) {
|
|
|
8659
8885
|
}
|
|
8660
8886
|
};
|
|
8661
8887
|
var handleSearch = function handleSearch(searchValue) {
|
|
8662
|
-
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
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());
|
|
8668
|
-
});
|
|
8669
|
-
setListOptions(listFilterOptions);
|
|
8670
|
-
}
|
|
8888
|
+
var listFilterOptions = options.filter(function (item) {
|
|
8889
|
+
var _item$label;
|
|
8890
|
+
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());
|
|
8891
|
+
});
|
|
8892
|
+
setListOptions(listFilterOptions);
|
|
8671
8893
|
};
|
|
8672
8894
|
var handleToggleSelect = function handleToggleSelect() {
|
|
8673
|
-
if (!isOpen && handleSearchOption && typeof handleSearchOption === 'function') {
|
|
8674
|
-
handleSearchOption("");
|
|
8675
|
-
}
|
|
8676
8895
|
setIsOpen(!isOpen);
|
|
8677
8896
|
setInputSearch("");
|
|
8678
8897
|
setListOptions(options);
|
|
@@ -8771,103 +8990,6 @@ var Select = forwardRef(function (props, ref) {
|
|
|
8771
8990
|
});
|
|
8772
8991
|
var Select$1 = memo(Select);
|
|
8773
8992
|
|
|
8774
|
-
var DateTimePicker = forwardRef(function (props, ref) {
|
|
8775
|
-
var _props$label = props.label,
|
|
8776
|
-
label = _props$label === void 0 ? "" : _props$label,
|
|
8777
|
-
_props$className = props.className,
|
|
8778
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
8779
|
-
_props$labelClassName = props.labelClassName,
|
|
8780
|
-
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8781
|
-
_props$defaultValue = props.defaultValue,
|
|
8782
|
-
defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
|
|
8783
|
-
_props$time = props.time,
|
|
8784
|
-
time = _props$time === void 0 ? false : _props$time,
|
|
8785
|
-
rules = props.rules;
|
|
8786
|
-
var _useState = useState(defaultValue),
|
|
8787
|
-
value = _useState[0],
|
|
8788
|
-
_setValue = _useState[1];
|
|
8789
|
-
var _useState2 = useState(""),
|
|
8790
|
-
error = _useState2[0],
|
|
8791
|
-
_setError = _useState2[1];
|
|
8792
|
-
var _className = "h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer " + className;
|
|
8793
|
-
var CustomInput = forwardRef(function (_ref, ref) {
|
|
8794
|
-
var value = _ref.value,
|
|
8795
|
-
onClick = _ref.onClick,
|
|
8796
|
-
className = _ref.className;
|
|
8797
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
8798
|
-
className: className,
|
|
8799
|
-
onClick: onClick,
|
|
8800
|
-
ref: ref
|
|
8801
|
-
}, value);
|
|
8802
|
-
});
|
|
8803
|
-
useImperativeHandle(ref, function () {
|
|
8804
|
-
return {
|
|
8805
|
-
validateData: function validateData() {
|
|
8806
|
-
return _validateData();
|
|
8807
|
-
},
|
|
8808
|
-
setValue: function setValue(text) {
|
|
8809
|
-
return _setValue(text);
|
|
8810
|
-
},
|
|
8811
|
-
getValue: function getValue() {
|
|
8812
|
-
return value;
|
|
8813
|
-
},
|
|
8814
|
-
setError: function setError(err) {
|
|
8815
|
-
return _setError(err);
|
|
8816
|
-
}
|
|
8817
|
-
};
|
|
8818
|
-
});
|
|
8819
|
-
var _validateData = function _validateData() {
|
|
8820
|
-
var count = 0;
|
|
8821
|
-
rules === null || rules === void 0 ? void 0 : rules.forEach(function (e) {
|
|
8822
|
-
var _e$pattern, _e$validate;
|
|
8823
|
-
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
|
|
8824
|
-
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8825
|
-
count++;
|
|
8826
|
-
return false;
|
|
8827
|
-
} 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))) {
|
|
8828
|
-
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8829
|
-
count++;
|
|
8830
|
-
return false;
|
|
8831
|
-
} 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))) {
|
|
8832
|
-
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8833
|
-
count++;
|
|
8834
|
-
return false;
|
|
8835
|
-
}
|
|
8836
|
-
});
|
|
8837
|
-
if (count) {
|
|
8838
|
-
return false;
|
|
8839
|
-
} else {
|
|
8840
|
-
_setError('');
|
|
8841
|
-
return true;
|
|
8842
|
-
}
|
|
8843
|
-
};
|
|
8844
|
-
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
8845
|
-
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
8846
|
-
}));
|
|
8847
|
-
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
8848
|
-
className: "text-danger"
|
|
8849
|
-
}, " *") : null;
|
|
8850
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
8851
|
-
className: "w-full"
|
|
8852
|
-
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
8853
|
-
className: "mb-1 " + labelClassName
|
|
8854
|
-
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
|
|
8855
|
-
selected: value,
|
|
8856
|
-
onChange: function onChange(date) {
|
|
8857
|
-
_setValue(date);
|
|
8858
|
-
},
|
|
8859
|
-
customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
|
|
8860
|
-
className: _className
|
|
8861
|
-
}),
|
|
8862
|
-
dateFormat: time ? "dd/MM/yyyy HH:mm" : "dd/MM/yyyy",
|
|
8863
|
-
showTimeSelect: time,
|
|
8864
|
-
timeIntervals: 15,
|
|
8865
|
-
wrapperClassName: "w-full"
|
|
8866
|
-
}), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
8867
|
-
className: "text-danger"
|
|
8868
|
-
}, error) : null);
|
|
8869
|
-
});
|
|
8870
|
-
|
|
8871
8993
|
var InputPhoneNumber = forwardRef(function (props, ref) {
|
|
8872
8994
|
var _props$label = props.label,
|
|
8873
8995
|
label = _props$label === void 0 ? "" : _props$label,
|
|
@@ -9016,150 +9138,312 @@ var InputPhoneNumber = forwardRef(function (props, ref) {
|
|
|
9016
9138
|
}, error) : null);
|
|
9017
9139
|
});
|
|
9018
9140
|
|
|
9019
|
-
var
|
|
9020
|
-
|
|
9021
|
-
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
|
|
9031
|
-
|
|
9032
|
-
|
|
9141
|
+
var Select$2 = forwardRef(function (props, ref) {
|
|
9142
|
+
var _props$label = props.label,
|
|
9143
|
+
label = _props$label === void 0 ? "" : _props$label,
|
|
9144
|
+
_props$labelClassName = props.labelClassName,
|
|
9145
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
9146
|
+
_props$placeholder = props.placeholder,
|
|
9147
|
+
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
9148
|
+
_props$className = props.className,
|
|
9149
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
9150
|
+
_props$optionClassNam = props.optionClassName,
|
|
9151
|
+
optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
|
|
9152
|
+
_props$wrapClassName = props.wrapClassName,
|
|
9153
|
+
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
9154
|
+
_props$selectClassNam = props.selectClassName,
|
|
9155
|
+
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
9156
|
+
_props$disabled = props.disabled,
|
|
9157
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
9158
|
+
_props$rules = props.rules,
|
|
9159
|
+
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
9160
|
+
options = props.options,
|
|
9161
|
+
_props$defaultValue = props.defaultValue,
|
|
9162
|
+
defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
|
|
9163
|
+
handleSearchOption = props.handleSearchOption,
|
|
9164
|
+
_props$isMulti = props.isMulti,
|
|
9165
|
+
isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
|
|
9166
|
+
_props$onClick = props.onClick,
|
|
9167
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
9168
|
+
_props$isButtonDelete = props.isButtonDelete,
|
|
9169
|
+
isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
|
|
9170
|
+
_props$funcDelete = props.funcDelete,
|
|
9171
|
+
funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
|
|
9172
|
+
setParams = props.setParams,
|
|
9173
|
+
_props$isSearch = props.isSearch,
|
|
9174
|
+
isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
|
|
9175
|
+
renderItem = props.renderItem;
|
|
9176
|
+
var _useState = useState(false),
|
|
9177
|
+
isOpen = _useState[0],
|
|
9178
|
+
setIsOpen = _useState[1];
|
|
9179
|
+
var selectRef = useRef(null);
|
|
9180
|
+
var _useState2 = useState(""),
|
|
9181
|
+
error = _useState2[0],
|
|
9182
|
+
_setError = _useState2[1];
|
|
9183
|
+
var _useState3 = useState(""),
|
|
9184
|
+
inputSearch = _useState3[0],
|
|
9185
|
+
setInputSearch = _useState3[1];
|
|
9186
|
+
var _useState4 = useState(defaultValue),
|
|
9187
|
+
value = _useState4[0],
|
|
9188
|
+
setValue = _useState4[1];
|
|
9189
|
+
var _useState5 = useState(options),
|
|
9190
|
+
listOptions = _useState5[0],
|
|
9191
|
+
setListOptions = _useState5[1];
|
|
9192
|
+
var dropdownRef = useRef(null);
|
|
9193
|
+
var _useState6 = useState('bottom'),
|
|
9194
|
+
dropdownPosition = _useState6[0],
|
|
9195
|
+
setDropdownPosition = _useState6[1];
|
|
9196
|
+
var inputRef = useRef(null);
|
|
9197
|
+
var _useState7 = useState(12),
|
|
9198
|
+
nextTrigger = _useState7[0],
|
|
9199
|
+
setNextTrigger = _useState7[1];
|
|
9200
|
+
var optionRef = useRef(null);
|
|
9201
|
+
useEffect(function () {
|
|
9202
|
+
if (isMulti) setValue(defaultValue);
|
|
9203
|
+
}, [defaultValue]);
|
|
9204
|
+
useEffect(function () {
|
|
9205
|
+
setListOptions(options);
|
|
9206
|
+
if (!isMulti) setValue(defaultValue);
|
|
9207
|
+
}, [options]);
|
|
9208
|
+
useEffect(function () {
|
|
9209
|
+
if (typeof setParams !== 'function') return;
|
|
9210
|
+
var handleScroll = function handleScroll() {
|
|
9211
|
+
if (!optionRef.current) return;
|
|
9212
|
+
var children = optionRef.current.querySelectorAll('div.option');
|
|
9213
|
+
var parentRect = optionRef.current.getBoundingClientRect();
|
|
9214
|
+
children.forEach(function (child, index) {
|
|
9215
|
+
var rect = child.getBoundingClientRect();
|
|
9216
|
+
if (rect.top >= parentRect.top && rect.bottom <= parentRect.bottom) {
|
|
9217
|
+
if (index === nextTrigger) {
|
|
9218
|
+
setParams === null || setParams === void 0 ? void 0 : setParams(function (prev) {
|
|
9219
|
+
return _extends({}, prev, {
|
|
9220
|
+
size: (prev === null || prev === void 0 ? void 0 : prev.size) + 8
|
|
9221
|
+
});
|
|
9222
|
+
});
|
|
9223
|
+
setNextTrigger(function (prev) {
|
|
9224
|
+
return prev + 8;
|
|
9225
|
+
});
|
|
9226
|
+
}
|
|
9227
|
+
}
|
|
9228
|
+
});
|
|
9229
|
+
};
|
|
9230
|
+
if (optionRef.current) {
|
|
9231
|
+
optionRef.current.addEventListener('scroll', handleScroll);
|
|
9232
|
+
}
|
|
9233
|
+
return function () {
|
|
9234
|
+
if (optionRef.current) {
|
|
9235
|
+
optionRef.current.removeEventListener('scroll', handleScroll);
|
|
9236
|
+
}
|
|
9237
|
+
};
|
|
9238
|
+
}, [listOptions, nextTrigger]);
|
|
9239
|
+
useEffect(function () {
|
|
9240
|
+
var delayDebounceFn = setTimeout(function () {
|
|
9241
|
+
handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
|
|
9242
|
+
if (optionRef.current) {
|
|
9243
|
+
optionRef.current.scrollTop = 0;
|
|
9244
|
+
}
|
|
9245
|
+
}, 600);
|
|
9246
|
+
return function () {
|
|
9247
|
+
return clearTimeout(delayDebounceFn);
|
|
9248
|
+
};
|
|
9249
|
+
}, [inputSearch]);
|
|
9250
|
+
useEffect(function () {
|
|
9251
|
+
var _inputRef$current;
|
|
9252
|
+
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
9253
|
+
var updateDropdownPosition = function updateDropdownPosition() {
|
|
9254
|
+
if (selectRef.current && dropdownRef.current) {
|
|
9255
|
+
var _selectRef$current, _window;
|
|
9256
|
+
var selectRect = selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.getBoundingClientRect();
|
|
9257
|
+
var spaceBelow = ((_window = window) === null || _window === void 0 ? void 0 : _window.innerHeight) - (selectRect === null || selectRect === void 0 ? void 0 : selectRect.bottom);
|
|
9258
|
+
var spaceAbove = selectRect === null || selectRect === void 0 ? void 0 : selectRect.top;
|
|
9259
|
+
if (spaceBelow < spaceAbove) {
|
|
9260
|
+
setDropdownPosition('top');
|
|
9261
|
+
} else {
|
|
9262
|
+
setDropdownPosition('bottom');
|
|
9263
|
+
}
|
|
9264
|
+
}
|
|
9265
|
+
};
|
|
9266
|
+
if (isOpen) {
|
|
9267
|
+
updateDropdownPosition();
|
|
9268
|
+
window.addEventListener('resize', updateDropdownPosition);
|
|
9269
|
+
}
|
|
9270
|
+
return function () {
|
|
9271
|
+
window.removeEventListener('resize', updateDropdownPosition);
|
|
9272
|
+
};
|
|
9273
|
+
}, [isOpen]);
|
|
9274
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
9275
|
+
var _selectRef$current2;
|
|
9276
|
+
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))) {
|
|
9277
|
+
setIsOpen(false);
|
|
9278
|
+
setInputSearch("");
|
|
9279
|
+
setListOptions(options);
|
|
9280
|
+
}
|
|
9281
|
+
};
|
|
9282
|
+
useEffect(function () {
|
|
9283
|
+
document.addEventListener('click', handleClickOutside);
|
|
9284
|
+
return function () {
|
|
9285
|
+
document.removeEventListener('click', handleClickOutside);
|
|
9286
|
+
};
|
|
9287
|
+
}, []);
|
|
9288
|
+
useImperativeHandle(ref, function () {
|
|
9289
|
+
return {
|
|
9290
|
+
validateData: function validateData() {
|
|
9291
|
+
return _validateData();
|
|
9292
|
+
},
|
|
9293
|
+
setError: function setError(err) {
|
|
9294
|
+
return _setError(err);
|
|
9033
9295
|
}
|
|
9296
|
+
};
|
|
9297
|
+
});
|
|
9298
|
+
var isEmpty = function isEmpty(value) {
|
|
9299
|
+
var _Object$keys;
|
|
9300
|
+
if (Array !== null && Array !== void 0 && Array.isArray(value)) return (value === null || value === void 0 ? void 0 : value.length) <= 0;
|
|
9301
|
+
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;
|
|
9302
|
+
return false;
|
|
9303
|
+
};
|
|
9304
|
+
var _validateData = function _validateData() {
|
|
9305
|
+
var count = 0;
|
|
9306
|
+
for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
|
|
9307
|
+
var _e$pattern;
|
|
9308
|
+
var e = _step.value;
|
|
9309
|
+
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && isEmpty(value)) {
|
|
9310
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
9311
|
+
count++;
|
|
9312
|
+
break;
|
|
9313
|
+
} 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))) {
|
|
9314
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
9315
|
+
count++;
|
|
9316
|
+
break;
|
|
9317
|
+
}
|
|
9318
|
+
}
|
|
9319
|
+
if (count) {
|
|
9320
|
+
return false;
|
|
9321
|
+
} else {
|
|
9322
|
+
_setError('');
|
|
9323
|
+
return true;
|
|
9324
|
+
}
|
|
9325
|
+
};
|
|
9326
|
+
var handleSearch = function handleSearch(searchValue) {
|
|
9327
|
+
if (handleSearchOption && typeof handleSearchOption === 'function') {
|
|
9328
|
+
handleSearchOption === null || handleSearchOption === void 0 ? void 0 : handleSearchOption(searchValue);
|
|
9329
|
+
setNextTrigger(12);
|
|
9330
|
+
} else {
|
|
9331
|
+
var listFilterOptions = options.filter(function (item) {
|
|
9332
|
+
var _item$label;
|
|
9333
|
+
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());
|
|
9334
|
+
});
|
|
9335
|
+
setListOptions(listFilterOptions);
|
|
9034
9336
|
}
|
|
9035
|
-
|
|
9036
|
-
|
|
9037
|
-
|
|
9038
|
-
|
|
9039
|
-
|
|
9040
|
-
|
|
9041
|
-
|
|
9042
|
-
|
|
9043
|
-
|
|
9044
|
-
|
|
9045
|
-
|
|
9046
|
-
|
|
9047
|
-
write: function (value) {
|
|
9048
|
-
return encodeURIComponent(value).replace(
|
|
9049
|
-
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
9050
|
-
decodeURIComponent
|
|
9051
|
-
)
|
|
9337
|
+
};
|
|
9338
|
+
var handleToggleSelect = function handleToggleSelect() {
|
|
9339
|
+
setIsOpen(!isOpen);
|
|
9340
|
+
setInputSearch("");
|
|
9341
|
+
setListOptions(options);
|
|
9342
|
+
if (typeof setParams === 'function') {
|
|
9343
|
+
setParams === null || setParams === void 0 ? void 0 : setParams(function (prev) {
|
|
9344
|
+
return _extends({}, prev, {
|
|
9345
|
+
size: 16
|
|
9346
|
+
});
|
|
9347
|
+
});
|
|
9348
|
+
setNextTrigger(12);
|
|
9052
9349
|
}
|
|
9053
9350
|
};
|
|
9054
|
-
|
|
9055
|
-
|
|
9056
|
-
|
|
9057
|
-
|
|
9058
|
-
|
|
9059
|
-
|
|
9060
|
-
|
|
9061
|
-
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
if (typeof attributes.expires === 'number') {
|
|
9067
|
-
attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
|
|
9068
|
-
}
|
|
9069
|
-
if (attributes.expires) {
|
|
9070
|
-
attributes.expires = attributes.expires.toUTCString();
|
|
9071
|
-
}
|
|
9072
|
-
|
|
9073
|
-
name = encodeURIComponent(name)
|
|
9074
|
-
.replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
|
|
9075
|
-
.replace(/[()]/g, escape);
|
|
9076
|
-
|
|
9077
|
-
var stringifiedAttributes = '';
|
|
9078
|
-
for (var attributeName in attributes) {
|
|
9079
|
-
if (!attributes[attributeName]) {
|
|
9080
|
-
continue
|
|
9081
|
-
}
|
|
9082
|
-
|
|
9083
|
-
stringifiedAttributes += '; ' + attributeName;
|
|
9084
|
-
|
|
9085
|
-
if (attributes[attributeName] === true) {
|
|
9086
|
-
continue
|
|
9087
|
-
}
|
|
9088
|
-
|
|
9089
|
-
// Considers RFC 6265 section 5.2:
|
|
9090
|
-
// ...
|
|
9091
|
-
// 3. If the remaining unparsed-attributes contains a %x3B (";")
|
|
9092
|
-
// character:
|
|
9093
|
-
// Consume the characters of the unparsed-attributes up to,
|
|
9094
|
-
// not including, the first %x3B (";") character.
|
|
9095
|
-
// ...
|
|
9096
|
-
stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
|
|
9097
|
-
}
|
|
9098
|
-
|
|
9099
|
-
return (document.cookie =
|
|
9100
|
-
name + '=' + converter.write(value, name) + stringifiedAttributes)
|
|
9351
|
+
var checkSelection = function checkSelection(valueId) {
|
|
9352
|
+
if (isMulti) return value === null || value === void 0 ? void 0 : value.some(function (item) {
|
|
9353
|
+
return (item === null || item === void 0 ? void 0 : item.value) === valueId;
|
|
9354
|
+
});
|
|
9355
|
+
return (value === null || value === void 0 ? void 0 : value.value) == valueId;
|
|
9356
|
+
};
|
|
9357
|
+
var handleSelection = function handleSelection(item, e) {
|
|
9358
|
+
e.stopPropagation();
|
|
9359
|
+
if (!isMulti) {
|
|
9360
|
+
setValue(item);
|
|
9361
|
+
setIsOpen(false);
|
|
9101
9362
|
}
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9363
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(item);
|
|
9364
|
+
};
|
|
9365
|
+
var handleDeleteSelection = function handleDeleteSelection(e, item) {
|
|
9366
|
+
e.stopPropagation();
|
|
9367
|
+
if (isMulti === false) setValue({});
|
|
9368
|
+
funcDelete === null || funcDelete === void 0 ? void 0 : funcDelete(item);
|
|
9369
|
+
};
|
|
9370
|
+
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
9371
|
+
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
9372
|
+
}));
|
|
9373
|
+
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
9374
|
+
className: "text-danger"
|
|
9375
|
+
}, " *") : null;
|
|
9376
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9377
|
+
ref: selectRef,
|
|
9378
|
+
className: "relative " + wrapClassName
|
|
9379
|
+
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
9380
|
+
className: "mb-1 " + labelClassName
|
|
9381
|
+
}, label, " ", labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
9382
|
+
className: "flex flex-col gap-2 rounded-lg w-full bg-white " + (disabled ? "!bg-gray6" : "") + " border border-stroke " + className
|
|
9383
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
9384
|
+
className: " w-full h-10 bg-transparent flex justify-between items-center px-3 py-2 " + selectClassName,
|
|
9385
|
+
onClick: handleToggleSelect,
|
|
9386
|
+
disabled: disabled
|
|
9387
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9388
|
+
className: "flex justify-between items-center w-full"
|
|
9389
|
+
}, isEmpty(value) || isMulti ? /*#__PURE__*/React__default.createElement("div", {
|
|
9390
|
+
className: "text-gray3 line-clamp-1"
|
|
9391
|
+
}, placeholder) : /*#__PURE__*/React__default.createElement("div", {
|
|
9392
|
+
className: "w-full text-start pointer-events-none line-clamp-1",
|
|
9393
|
+
dangerouslySetInnerHTML: {
|
|
9394
|
+
__html: value === null || value === void 0 ? void 0 : value.label
|
|
9127
9395
|
}
|
|
9128
|
-
|
|
9129
|
-
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9396
|
+
}), isButtonDelete && !isEmpty(value) ? /*#__PURE__*/React__default.createElement("div", {
|
|
9397
|
+
onClick: function onClick(e) {
|
|
9398
|
+
handleDeleteSelection(e, value);
|
|
9399
|
+
}
|
|
9400
|
+
}, /*#__PURE__*/React__default.createElement(RxCross2, null)) : /*#__PURE__*/React__default.createElement("div", {
|
|
9401
|
+
className: "ms-1"
|
|
9402
|
+
}, /*#__PURE__*/React__default.createElement(FaAngleUp, {
|
|
9403
|
+
className: "text-xs"
|
|
9404
|
+
}), /*#__PURE__*/React__default.createElement(FaAngleDown, {
|
|
9405
|
+
className: "text-xs"
|
|
9406
|
+
})))), isOpen ? /*#__PURE__*/React__default.createElement("div", {
|
|
9407
|
+
ref: dropdownRef,
|
|
9408
|
+
style: {
|
|
9409
|
+
background: "#FFFFFF"
|
|
9410
|
+
},
|
|
9411
|
+
className: "absolute p-1 my-2 rounded-2xl w-full z-40 border " + (dropdownPosition === 'top' ? 'bottom-full mb-2' : 'top-full mt-2') + " " + optionClassName
|
|
9412
|
+
}, /*#__PURE__*/React__default.createElement("div", null, isSearch ? /*#__PURE__*/React__default.createElement("div", {
|
|
9413
|
+
className: "px-3 flex items-center border-b-[1px]"
|
|
9414
|
+
}, /*#__PURE__*/React__default.createElement(LuSearch, {
|
|
9415
|
+
className: "inline text-gray3 me-2"
|
|
9416
|
+
}), /*#__PURE__*/React__default.createElement("input", {
|
|
9417
|
+
type: "text",
|
|
9418
|
+
ref: inputRef,
|
|
9419
|
+
className: "py-2 w-full border-0 focus:outline-none focus:ring-0",
|
|
9420
|
+
placeholder: "T\xECm ki\u1EBFm",
|
|
9421
|
+
value: inputSearch,
|
|
9422
|
+
onChange: function onChange(e) {
|
|
9423
|
+
setInputSearch(e.target.value);
|
|
9424
|
+
}
|
|
9425
|
+
})) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
9426
|
+
className: "overflow-y-auto max-h-72 scroll-container",
|
|
9427
|
+
ref: optionRef
|
|
9428
|
+
}, (listOptions === null || listOptions === void 0 ? void 0 : listOptions.length) > 0 ? listOptions === null || listOptions === void 0 ? void 0 : listOptions.map(function (item, index) {
|
|
9429
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9430
|
+
key: "gjfd-" + index,
|
|
9431
|
+
className: "option px-2 cursor-default py-1.5 flex items-center hover:bg-gray-100 rounded-lg",
|
|
9432
|
+
onClick: function onClick(e) {
|
|
9433
|
+
handleSelection(item, e);
|
|
9152
9434
|
}
|
|
9153
|
-
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9435
|
+
}, /*#__PURE__*/React__default.createElement(IoMdCheckmark, {
|
|
9436
|
+
className: (checkSelection(item === null || item === void 0 ? void 0 : item.value) ? "" : 'invisible') + " inline me-2 w-4"
|
|
9437
|
+
}), renderItem ? renderItem(item) : /*#__PURE__*/React__default.createElement("div", {
|
|
9438
|
+
className: " whitespace-nowrap line-clamp-1"
|
|
9439
|
+
}, item === null || item === void 0 ? void 0 : item.label));
|
|
9440
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
9441
|
+
className: "py-6 text-center"
|
|
9442
|
+
}, "Kh\xF4ng c\xF3 k\u1EBFt qu\u1EA3")))) : null), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
9443
|
+
className: "text-danger"
|
|
9444
|
+
}, error) : null);
|
|
9162
9445
|
});
|
|
9446
|
+
var SelectDynamic = memo(Select$2);
|
|
9163
9447
|
|
|
9164
9448
|
var BookingForm = function BookingForm(props) {
|
|
9165
9449
|
var _props$shopConfig = props.shopConfig,
|
|
@@ -9176,7 +9460,8 @@ var BookingForm = function BookingForm(props) {
|
|
|
9176
9460
|
isModalBooking = _props$isModalBooking === void 0 ? false : _props$isModalBooking;
|
|
9177
9461
|
var _useState = useState(false);
|
|
9178
9462
|
var _useState2 = useState({
|
|
9179
|
-
types: "1,10"
|
|
9463
|
+
types: "1,10",
|
|
9464
|
+
size: 16
|
|
9180
9465
|
}),
|
|
9181
9466
|
productsParams = _useState2[0],
|
|
9182
9467
|
setProductsParams = _useState2[1];
|
|
@@ -9350,6 +9635,7 @@ var BookingForm = function BookingForm(props) {
|
|
|
9350
9635
|
var handleSearchProducts = function handleSearchProducts(value) {
|
|
9351
9636
|
setProductsParams(function (prev) {
|
|
9352
9637
|
return _extends({}, prev, {
|
|
9638
|
+
size: 16,
|
|
9353
9639
|
productName: value
|
|
9354
9640
|
});
|
|
9355
9641
|
});
|
|
@@ -9386,7 +9672,8 @@ var BookingForm = function BookingForm(props) {
|
|
|
9386
9672
|
className: "grid grid-cols-1 gap-4"
|
|
9387
9673
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9388
9674
|
className: "relative"
|
|
9389
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
9675
|
+
}, /*#__PURE__*/React__default.createElement(SelectDynamic, {
|
|
9676
|
+
setParams: setProductsParams,
|
|
9390
9677
|
ref: inputSelectedRef,
|
|
9391
9678
|
isMulti: true,
|
|
9392
9679
|
defaultValue: listProductSelected,
|
|
@@ -9502,6 +9789,7 @@ var BookingForm = function BookingForm(props) {
|
|
|
9502
9789
|
className: "text-center"
|
|
9503
9790
|
}, "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"))));
|
|
9504
9791
|
};
|
|
9792
|
+
var BookingForm$1 = memo(BookingForm);
|
|
9505
9793
|
|
|
9506
9794
|
var TreatmentsList7 = function TreatmentsList7(props) {
|
|
9507
9795
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
@@ -9622,7 +9910,7 @@ var TreatmentsList7 = function TreatmentsList7(props) {
|
|
|
9622
9910
|
color: secondary
|
|
9623
9911
|
}), isOpenModal ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
9624
9912
|
onClose: handleCloseModal
|
|
9625
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
9913
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
9626
9914
|
className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh] !bg-bgSecondary",
|
|
9627
9915
|
onCloseFormBooking: handleCloseModal,
|
|
9628
9916
|
defaultValue: dataBooking,
|
|
@@ -9764,13 +10052,13 @@ var ServiceDetail1 = function ServiceDetail1(props) {
|
|
|
9764
10052
|
product: product,
|
|
9765
10053
|
className: "w-full aspect-square !object-contain rounded-2xl"
|
|
9766
10054
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
9767
|
-
className: "flex gap-
|
|
10055
|
+
className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
|
|
9768
10056
|
}, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
|
|
9769
10057
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
9770
10058
|
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
9771
10059
|
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
9772
10060
|
alt: "",
|
|
9773
|
-
className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " h-
|
|
10061
|
+
className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " \n h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full rounded-md lg:rounded-lg aspect-square object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
|
|
9774
10062
|
onClick: function onClick() {
|
|
9775
10063
|
handleDisplayImage(item);
|
|
9776
10064
|
}
|
|
@@ -9817,7 +10105,7 @@ var ServiceDetail1 = function ServiceDetail1(props) {
|
|
|
9817
10105
|
className: "text-gray3 mt-2"
|
|
9818
10106
|
}, "Kh\xF4ng c\xF3 th\xF4ng tin"))), isBooking ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
9819
10107
|
onClose: handleCloseModal
|
|
9820
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
10108
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
9821
10109
|
isModalBooking: isBooking,
|
|
9822
10110
|
className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh]",
|
|
9823
10111
|
onCloseFormBooking: handleCloseModal,
|
|
@@ -9891,7 +10179,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
|
|
|
9891
10179
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9892
10180
|
className: "flex flex-col gap-4 col-span-2"
|
|
9893
10181
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9894
|
-
className: "rounded-2xl
|
|
10182
|
+
className: "rounded-2xl bg-background border"
|
|
9895
10183
|
}, displayImage ? /*#__PURE__*/React__default.createElement("img", {
|
|
9896
10184
|
src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
|
|
9897
10185
|
className: "w-full aspect-square object-contain rounded-2xl"
|
|
@@ -9899,13 +10187,13 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
|
|
|
9899
10187
|
product: product,
|
|
9900
10188
|
className: "w-full aspect-square !object-contain rounded-2xl"
|
|
9901
10189
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
9902
|
-
className: "flex gap-
|
|
10190
|
+
className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
|
|
9903
10191
|
}, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
|
|
9904
10192
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
9905
10193
|
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
9906
10194
|
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
9907
10195
|
alt: "",
|
|
9908
|
-
className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " h-
|
|
10196
|
+
className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " \n h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full rounded-md lg:rounded-lg aspect-square object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
|
|
9909
10197
|
onClick: function onClick() {
|
|
9910
10198
|
handleDisplayImage(item);
|
|
9911
10199
|
}
|
|
@@ -9952,7 +10240,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
|
|
|
9952
10240
|
className: "text-gray3 mt-2"
|
|
9953
10241
|
}, "Kh\xF4ng c\xF3 th\xF4ng tin"))), isBooking ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
9954
10242
|
onClose: handleCloseModal
|
|
9955
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
10243
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
9956
10244
|
isModalBooking: isBooking,
|
|
9957
10245
|
className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh]",
|
|
9958
10246
|
onCloseFormBooking: handleCloseModal,
|
|
@@ -10027,7 +10315,7 @@ var ProductItem3 = function ProductItem3(props) {
|
|
|
10027
10315
|
className: "w-full border border-stroke rounded-2xl " + className
|
|
10028
10316
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10029
10317
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10030
|
-
className: "w-full
|
|
10318
|
+
className: "w-full rounded-t-2xl"
|
|
10031
10319
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10032
10320
|
className: "p-4 flex flex-col gap-2 md:gap-4 items-start"
|
|
10033
10321
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -10054,7 +10342,7 @@ var ProductItem4 = function ProductItem4(props) {
|
|
|
10054
10342
|
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
|
|
10055
10343
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10056
10344
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10057
|
-
className: "w-full
|
|
10345
|
+
className: "w-full rounded-2xl"
|
|
10058
10346
|
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10059
10347
|
className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis text-lg"
|
|
10060
10348
|
}, 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, {
|
|
@@ -10089,7 +10377,7 @@ var ProductItem5 = function ProductItem5(props) {
|
|
|
10089
10377
|
className: "w-full flex flex-col gap-4 rounded-2xl p-1 " + className
|
|
10090
10378
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10091
10379
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10092
|
-
className: "w-full
|
|
10380
|
+
className: "w-full rounded-2xl"
|
|
10093
10381
|
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10094
10382
|
className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
|
|
10095
10383
|
}, 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, {
|
|
@@ -10122,7 +10410,7 @@ var ProductItem6 = function ProductItem6(props) {
|
|
|
10122
10410
|
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
|
|
10123
10411
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10124
10412
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10125
|
-
className: "w-full
|
|
10413
|
+
className: "w-full !aspect-[3/4] rounded-2xl"
|
|
10126
10414
|
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10127
10415
|
className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
|
|
10128
10416
|
}, 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, {
|
|
@@ -10140,66 +10428,238 @@ var ProductItem6 = function ProductItem6(props) {
|
|
|
10140
10428
|
};
|
|
10141
10429
|
|
|
10142
10430
|
var ProductItem7 = function ProductItem7(props) {
|
|
10143
|
-
var _product$productInfo, _product$productInfo2, _product$productInfo3, _product$productInfo4, _product$productInfo5, _product$productInfo6;
|
|
10431
|
+
var _product$productInfo, _product$productInfo2, _product$productInfo3, _product$productInfo4, _product$productInfo5, _product$productInfo6, _product$productInfo7, _product$productInfo8, _product$productInfo9, _product$productInfo10, _product$productInfo11;
|
|
10432
|
+
var product = props.product,
|
|
10433
|
+
_props$Link = props.Link,
|
|
10434
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10435
|
+
_props$className = props.className,
|
|
10436
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
10437
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10438
|
+
Link: Link,
|
|
10439
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10440
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10441
|
+
className: "w-full bg-bgSecondary relative p-2 md:p-4 rounded-2xl " + className
|
|
10442
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10443
|
+
className: "relative"
|
|
10444
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10445
|
+
className: "px-2 md:px-4 xl:px-6"
|
|
10446
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10447
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10448
|
+
className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl !object-contain"
|
|
10449
|
+
})), (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", {
|
|
10450
|
+
className: "absolute top-4 left-0 py-1 px-4 rounded-r-2xl bg-danger text-textButton font-semibold shadow-lg"
|
|
10451
|
+
}, "-", 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", {
|
|
10452
|
+
className: "flex flex-col mt-4 gap-4 items-start"
|
|
10453
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10454
|
+
className: "line-clamp-2 min-h-12 w-full overflow-hidden text-ellipsis"
|
|
10455
|
+
}, 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, {
|
|
10456
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10457
|
+
className: "text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10458
|
+
})), 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", {
|
|
10459
|
+
className: "absolute top-5 left-0 font-semibold px-3 py-1 bg-danger text-textButton rounded-r-2xl shadow-lg v-max"
|
|
10460
|
+
}, 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));
|
|
10461
|
+
};
|
|
10462
|
+
|
|
10463
|
+
var ProductItem8 = function ProductItem8(props) {
|
|
10464
|
+
var _product$productInfo;
|
|
10144
10465
|
var product = props.product,
|
|
10145
10466
|
_props$Link = props.Link,
|
|
10146
10467
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10147
10468
|
_props$className = props.className,
|
|
10148
10469
|
className = _props$className === void 0 ? "" : _props$className,
|
|
10149
|
-
_props$
|
|
10150
|
-
|
|
10470
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10471
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
10151
10472
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10152
10473
|
Link: Link,
|
|
10153
10474
|
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10154
10475
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10155
|
-
className: "
|
|
10476
|
+
className: "text-center rounded relative group " + className
|
|
10477
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10478
|
+
className: "relative "
|
|
10156
10479
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10157
10480
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10158
|
-
className: "
|
|
10481
|
+
className: "!aspect-[5/8] rounded"
|
|
10159
10482
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10160
|
-
className: "
|
|
10483
|
+
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 "
|
|
10161
10484
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10162
|
-
className: "
|
|
10485
|
+
className: "text-lg text-textButton"
|
|
10163
10486
|
}, 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, {
|
|
10164
10487
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10165
|
-
className:
|
|
10166
|
-
|
|
10167
|
-
|
|
10168
|
-
},
|
|
10488
|
+
className: !(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "",
|
|
10489
|
+
priceClassName: "text-textButton !font-normal",
|
|
10490
|
+
priceBeforeDiscountClassName: "text-textButton !font-normal"
|
|
10491
|
+
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
10492
|
+
label: "Th\xEAm v\xE0o gi\u1ECF",
|
|
10493
|
+
shopConfigStyle: shopConfigStyle,
|
|
10494
|
+
className: "hidden group-hover:block transition-all duration-300 !font-normal"
|
|
10495
|
+
})))));
|
|
10496
|
+
};
|
|
10497
|
+
|
|
10498
|
+
var ProductItem9 = function ProductItem9(props) {
|
|
10499
|
+
var _product$productInfo;
|
|
10500
|
+
var product = props.product,
|
|
10501
|
+
_props$Link = props.Link,
|
|
10502
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10503
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10504
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10505
|
+
_props$className = props.className,
|
|
10506
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
10507
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10508
|
+
Link: Link,
|
|
10509
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10510
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10511
|
+
className: "w-full flex flex-col gap-4 rounded-2xl p-2 md:p-6 bg-bgSecondary " + className
|
|
10512
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10513
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10514
|
+
className: "hover:scale-105 transition duration-300 ease-in-out !object-contain !aspect-[9/8]"
|
|
10515
|
+
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10516
|
+
className: "text-start line-clamp-2 font-medium min-h-12 w-full overflow-hidden text-ellipsis mb-2"
|
|
10517
|
+
}, 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, {
|
|
10518
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10519
|
+
priceClassName: "!text-secondary !text-base !font-normal",
|
|
10520
|
+
className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10521
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10522
|
+
className: "flex gap-2 md:gap-4 "
|
|
10523
|
+
}, /*#__PURE__*/React__default.createElement(AiOutlineShoppingCart, {
|
|
10524
|
+
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)
|
|
10525
|
+
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
10526
|
+
label: "Mua ngay",
|
|
10527
|
+
className: "w-full",
|
|
10528
|
+
shopConfigStyle: shopConfigStyle
|
|
10529
|
+
}))));
|
|
10530
|
+
};
|
|
10531
|
+
|
|
10532
|
+
var ProductItem10 = function ProductItem10(props) {
|
|
10533
|
+
var _product$productInfo;
|
|
10534
|
+
var product = props.product;
|
|
10535
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10536
|
+
className: "flex border-b border-stroke items-center py-4"
|
|
10537
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10538
|
+
className: "mb-auto"
|
|
10539
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10540
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10541
|
+
className: "!w-24 rounded-lg"
|
|
10542
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10543
|
+
className: "ml-4 flex-1"
|
|
10544
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10545
|
+
className: "text-xl"
|
|
10546
|
+
}, 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", {
|
|
10547
|
+
className: "mt-2"
|
|
10548
|
+
}, /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10549
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10550
|
+
priceClassName: "!font-normal text-lg"
|
|
10551
|
+
})) : null));
|
|
10552
|
+
};
|
|
10553
|
+
|
|
10554
|
+
function getMinMax$1(array, field) {
|
|
10555
|
+
if (!(array !== null && array !== void 0 && array.length) || !array[0].hasOwnProperty(field)) {
|
|
10556
|
+
return null;
|
|
10557
|
+
}
|
|
10558
|
+
var _array$reduce = array.reduce(function (acc, obj) {
|
|
10559
|
+
var value = obj[field];
|
|
10560
|
+
return {
|
|
10561
|
+
min: value < acc.min ? value : acc.min,
|
|
10562
|
+
max: value > acc.max ? value : acc.max
|
|
10563
|
+
};
|
|
10564
|
+
}, {
|
|
10565
|
+
min: array[0][field],
|
|
10566
|
+
max: array[0][field]
|
|
10567
|
+
}),
|
|
10568
|
+
min = _array$reduce.min,
|
|
10569
|
+
max = _array$reduce.max;
|
|
10570
|
+
return {
|
|
10571
|
+
min: min,
|
|
10572
|
+
max: max
|
|
10573
|
+
};
|
|
10574
|
+
}
|
|
10575
|
+
var ProductPrice2 = function ProductPrice2(props) {
|
|
10576
|
+
var product = props.product,
|
|
10577
|
+
variant = props.variant,
|
|
10578
|
+
_props$className = props.className,
|
|
10579
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
10580
|
+
_props$style = props.style,
|
|
10581
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
10582
|
+
_props$priceClassName = props.priceClassName,
|
|
10583
|
+
priceClassName = _props$priceClassName === void 0 ? "" : _props$priceClassName,
|
|
10584
|
+
_props$priceBeforeDis = props.priceBeforeDiscountClassName,
|
|
10585
|
+
priceBeforeDiscountClassName = _props$priceBeforeDis === void 0 ? "" : _props$priceBeforeDis;
|
|
10586
|
+
var _useState = useState(),
|
|
10587
|
+
displayPrice = _useState[0],
|
|
10588
|
+
setDisplayPrice = _useState[1];
|
|
10589
|
+
var _useState2 = useState(),
|
|
10590
|
+
displayPriceBeforeDiscount = _useState2[0],
|
|
10591
|
+
setDisplayPriceBeforeDiscount = _useState2[1];
|
|
10592
|
+
useEffect(function () {
|
|
10593
|
+
if (variant) {
|
|
10594
|
+
genProductPrice([variant]);
|
|
10595
|
+
} else if (product) {
|
|
10596
|
+
genProductPrice(product.variants);
|
|
10597
|
+
}
|
|
10598
|
+
}, [product, variant]);
|
|
10599
|
+
var genProductPrice = function genProductPrice(variants) {
|
|
10600
|
+
var mPrice = getMinMax$1(variants, 'price');
|
|
10601
|
+
var mPriceBeforeDiscount = getMinMax$1(variants, 'priceBeforeDiscount');
|
|
10602
|
+
if (mPrice && mPriceBeforeDiscount) {
|
|
10603
|
+
var _displayPriceBeforeDiscount = formatCurrency2(mPriceBeforeDiscount.min);
|
|
10604
|
+
var _displayPrice = formatCurrency2(mPrice.min);
|
|
10605
|
+
if (mPrice.min !== mPrice.max) {
|
|
10606
|
+
_displayPrice += " - " + formatCurrency2(mPrice.max);
|
|
10607
|
+
}
|
|
10608
|
+
if (mPriceBeforeDiscount.min !== mPriceBeforeDiscount.max) {
|
|
10609
|
+
_displayPriceBeforeDiscount += " - " + formatCurrency2(mPriceBeforeDiscount.max);
|
|
10610
|
+
}
|
|
10611
|
+
setDisplayPrice(_displayPrice);
|
|
10612
|
+
setDisplayPriceBeforeDiscount(_displayPriceBeforeDiscount);
|
|
10613
|
+
} else {
|
|
10614
|
+
var _displayPrice2 = formatCurrency2(product === null || product === void 0 ? void 0 : product.price);
|
|
10615
|
+
setDisplayPrice(_displayPrice2);
|
|
10616
|
+
}
|
|
10617
|
+
};
|
|
10618
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10619
|
+
className: "flex gap-4 flex-wrap " + className
|
|
10620
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10621
|
+
className: "text-primary font-semibold " + priceClassName,
|
|
10622
|
+
style: style
|
|
10623
|
+
}, displayPrice), displayPriceBeforeDiscount !== displayPrice && displayPriceBeforeDiscount != null ? /*#__PURE__*/React__default.createElement("span", {
|
|
10624
|
+
className: "text-gray3 line-through " + priceBeforeDiscountClassName + " "
|
|
10625
|
+
}, displayPriceBeforeDiscount) : null);
|
|
10169
10626
|
};
|
|
10170
10627
|
|
|
10171
|
-
var
|
|
10628
|
+
var ProductItem11 = function ProductItem11(props) {
|
|
10172
10629
|
var _product$productInfo;
|
|
10173
10630
|
var product = props.product,
|
|
10174
10631
|
_props$Link = props.Link,
|
|
10175
10632
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10176
|
-
_props$className = props.className,
|
|
10177
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
10178
10633
|
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10179
|
-
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl
|
|
10634
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10635
|
+
_props$className = props.className,
|
|
10636
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
10180
10637
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10181
10638
|
Link: Link,
|
|
10182
10639
|
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10183
10640
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10184
|
-
className: "
|
|
10641
|
+
className: "w-full bg-bgSecondary " + className
|
|
10185
10642
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10186
|
-
className: "
|
|
10643
|
+
className: "overflow-hidden"
|
|
10187
10644
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10188
10645
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10189
|
-
className: "
|
|
10190
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10191
|
-
className: "
|
|
10192
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10193
|
-
className: "text-
|
|
10194
|
-
}, 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(
|
|
10646
|
+
className: "hover:scale-105 transition duration-300 ease-in-out"
|
|
10647
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10648
|
+
className: "p-4 flex flex-col gap-4"
|
|
10649
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10650
|
+
className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
|
|
10651
|
+
}, 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, {
|
|
10195
10652
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10653
|
+
priceClassName: "!font-normal",
|
|
10654
|
+
className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10655
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10656
|
+
className: "flex gap-2 md:gap-4 "
|
|
10657
|
+
}, /*#__PURE__*/React__default.createElement(AiOutlineShoppingCart, {
|
|
10658
|
+
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)
|
|
10199
10659
|
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
10200
|
-
label: "
|
|
10201
|
-
|
|
10202
|
-
|
|
10660
|
+
label: "Mua ngay",
|
|
10661
|
+
className: "w-full",
|
|
10662
|
+
shopConfigStyle: shopConfigStyle
|
|
10203
10663
|
})))));
|
|
10204
10664
|
};
|
|
10205
10665
|
|
|
@@ -10217,7 +10677,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
|
|
|
10217
10677
|
className: "w-full flex flex-col gap-4 rounded-2xl p-1"
|
|
10218
10678
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10219
10679
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10220
|
-
className: "
|
|
10680
|
+
className: " rounded-2xl"
|
|
10221
10681
|
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10222
10682
|
className: "line-clamp-1 mb-2 font-medium text-lg"
|
|
10223
10683
|
}, 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, {
|
|
@@ -10328,13 +10788,13 @@ var Products2 = function Products2(props) {
|
|
|
10328
10788
|
breakpoint: 1024,
|
|
10329
10789
|
settings: {
|
|
10330
10790
|
slidesToShow: 4,
|
|
10331
|
-
slidesToScroll:
|
|
10791
|
+
slidesToScroll: 1
|
|
10332
10792
|
}
|
|
10333
10793
|
}, {
|
|
10334
10794
|
breakpoint: 1023,
|
|
10335
10795
|
settings: {
|
|
10336
10796
|
slidesToShow: 3,
|
|
10337
|
-
slidesToScroll:
|
|
10797
|
+
slidesToScroll: 1
|
|
10338
10798
|
}
|
|
10339
10799
|
}, {
|
|
10340
10800
|
breakpoint: 635,
|
|
@@ -10342,6 +10802,12 @@ var Products2 = function Products2(props) {
|
|
|
10342
10802
|
slidesToShow: 2,
|
|
10343
10803
|
slidesToScroll: 2
|
|
10344
10804
|
}
|
|
10805
|
+
}, {
|
|
10806
|
+
breakpoint: 370,
|
|
10807
|
+
settings: {
|
|
10808
|
+
slidesToShow: 1,
|
|
10809
|
+
slidesToScroll: 1
|
|
10810
|
+
}
|
|
10345
10811
|
}]
|
|
10346
10812
|
};
|
|
10347
10813
|
useEffect(function () {
|
|
@@ -10375,12 +10841,12 @@ var Products2 = function Products2(props) {
|
|
|
10375
10841
|
color: textBody
|
|
10376
10842
|
}
|
|
10377
10843
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10378
|
-
className: "relative rounded-3xl w-full py-
|
|
10844
|
+
className: "relative rounded-3xl w-full py-6 md:py-10 md:px-6 px-3 xl:px-10",
|
|
10379
10845
|
style: {
|
|
10380
10846
|
background: secondary
|
|
10381
10847
|
}
|
|
10382
10848
|
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
10383
|
-
className: "font-semibold text-2xl md:text-4xl lg:text-4xl ps-5 pb-
|
|
10849
|
+
className: "font-semibold text-2xl md:text-4xl lg:text-4xl ps-5 pb-6",
|
|
10384
10850
|
style: {
|
|
10385
10851
|
color: textButton
|
|
10386
10852
|
}
|
|
@@ -10394,16 +10860,15 @@ var Products2 = function Products2(props) {
|
|
|
10394
10860
|
beforeChange: handleBeforeChange
|
|
10395
10861
|
}), products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
10396
10862
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10397
|
-
className: "px-2 lg:px-3",
|
|
10863
|
+
className: "px-1 md:px-2 lg:px-3",
|
|
10398
10864
|
key: "dfg-" + index
|
|
10399
10865
|
}, /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10400
10866
|
product: product,
|
|
10401
10867
|
Link: Link,
|
|
10402
|
-
shopConfigStyle: shopConfigStyle
|
|
10403
|
-
classNamePrice: "text-base md:text-lg"
|
|
10868
|
+
shopConfigStyle: shopConfigStyle
|
|
10404
10869
|
}));
|
|
10405
10870
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
10406
|
-
className: "absolute left-0 top-
|
|
10871
|
+
className: "absolute left-0 top-[45%] w-full flex justify-between px-2 md:px-4 lg:px-6"
|
|
10407
10872
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
10408
10873
|
onClick: goToPrev,
|
|
10409
10874
|
className: (canGoPrev ? "bg-primary" : "bg-gray5 cursor-not-allowed") + " p-2 rounded-full"
|
|
@@ -10448,7 +10913,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
10448
10913
|
for (var i = start; i <= end; i++) {
|
|
10449
10914
|
pages.push(i);
|
|
10450
10915
|
}
|
|
10451
|
-
if (current_page < total_pages -
|
|
10916
|
+
if (current_page < total_pages - 3) pages.push("...");
|
|
10452
10917
|
pages.push(total_pages);
|
|
10453
10918
|
return pages;
|
|
10454
10919
|
};
|
|
@@ -10468,7 +10933,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
10468
10933
|
onClick: function onClick() {
|
|
10469
10934
|
return typeof page === "number" && handlePageChange(page - 1);
|
|
10470
10935
|
},
|
|
10471
|
-
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" : ""),
|
|
10936
|
+
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" : ""),
|
|
10472
10937
|
disabled: page === "..."
|
|
10473
10938
|
}, page);
|
|
10474
10939
|
})), /*#__PURE__*/React__default.createElement(IoChevronForwardOutline, {
|
|
@@ -10587,44 +11052,217 @@ var Products3 = function Products3(props) {
|
|
|
10587
11052
|
}));
|
|
10588
11053
|
};
|
|
10589
11054
|
|
|
10590
|
-
var
|
|
11055
|
+
var CarouselItem = function CarouselItem(props) {
|
|
10591
11056
|
var _Object$keys;
|
|
11057
|
+
var _props$data = props.data,
|
|
11058
|
+
data = _props$data === void 0 ? [] : _props$data,
|
|
11059
|
+
_props$className = props.className,
|
|
11060
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
11061
|
+
_props$style = props.style,
|
|
11062
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
11063
|
+
_props$onClick = props.onClick,
|
|
11064
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
11065
|
+
_props$isAll = props.isAll,
|
|
11066
|
+
isAll = _props$isAll === void 0 ? true : _props$isAll,
|
|
11067
|
+
_props$isNavigateButt = props.isNavigateButton,
|
|
11068
|
+
isNavigateButton = _props$isNavigateButt === void 0 ? true : _props$isNavigateButt,
|
|
11069
|
+
_props$itemClassName = props.itemClassName,
|
|
11070
|
+
itemClassName = _props$itemClassName === void 0 ? "" : _props$itemClassName;
|
|
11071
|
+
var listRef = useRef(null);
|
|
11072
|
+
var _useState = useState(false),
|
|
11073
|
+
canScrollLeft = _useState[0],
|
|
11074
|
+
setCanScrollLeft = _useState[1];
|
|
11075
|
+
var _useState2 = useState(false),
|
|
11076
|
+
canScrollRight = _useState2[0],
|
|
11077
|
+
setCanScrollRight = _useState2[1];
|
|
11078
|
+
var _useState3 = useState({}),
|
|
11079
|
+
value = _useState3[0],
|
|
11080
|
+
setValue = _useState3[1];
|
|
11081
|
+
useEffect(function () {
|
|
11082
|
+
var _listRef$current;
|
|
11083
|
+
checkScroll();
|
|
11084
|
+
(_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.addEventListener("scroll", checkScroll);
|
|
11085
|
+
return function () {
|
|
11086
|
+
var _listRef$current2;
|
|
11087
|
+
return (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.removeEventListener("scroll", checkScroll);
|
|
11088
|
+
};
|
|
11089
|
+
}, [data]);
|
|
11090
|
+
var checkScroll = function checkScroll() {
|
|
11091
|
+
if (listRef.current) {
|
|
11092
|
+
var _listRef$current3 = listRef.current,
|
|
11093
|
+
scrollLeft = _listRef$current3.scrollLeft,
|
|
11094
|
+
scrollWidth = _listRef$current3.scrollWidth,
|
|
11095
|
+
clientWidth = _listRef$current3.clientWidth;
|
|
11096
|
+
setCanScrollLeft(scrollLeft > 0);
|
|
11097
|
+
setCanScrollRight(scrollLeft + clientWidth < scrollWidth - 1);
|
|
11098
|
+
}
|
|
11099
|
+
};
|
|
11100
|
+
var handleClickPrevImg = function handleClickPrevImg() {
|
|
11101
|
+
if (listRef.current) {
|
|
11102
|
+
checkScroll();
|
|
11103
|
+
listRef.current.scrollBy({
|
|
11104
|
+
left: -300,
|
|
11105
|
+
behavior: "smooth"
|
|
11106
|
+
});
|
|
11107
|
+
}
|
|
11108
|
+
};
|
|
11109
|
+
var handleClickNextImg = function handleClickNextImg() {
|
|
11110
|
+
if (listRef.current) {
|
|
11111
|
+
checkScroll();
|
|
11112
|
+
listRef.current.scrollBy({
|
|
11113
|
+
left: 300,
|
|
11114
|
+
behavior: "smooth"
|
|
11115
|
+
});
|
|
11116
|
+
}
|
|
11117
|
+
};
|
|
11118
|
+
var handleOnClick = function handleOnClick(item) {
|
|
11119
|
+
setValue(item);
|
|
11120
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(item);
|
|
11121
|
+
};
|
|
11122
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11123
|
+
className: "h-10 md:h-12 flex justify-between items-center " + className,
|
|
11124
|
+
style: style
|
|
11125
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11126
|
+
className: "w-full overflow-hidden "
|
|
11127
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11128
|
+
className: "flex overflow-x-auto gap-2 " + (isNavigateButton ? "no-scrollbar" : "scroll-custom pb-2") + " items-center",
|
|
11129
|
+
ref: listRef
|
|
11130
|
+
}, isAll ? /*#__PURE__*/React__default.createElement("div", {
|
|
11131
|
+
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",
|
|
11132
|
+
onClick: function onClick() {
|
|
11133
|
+
handleOnClick({});
|
|
11134
|
+
}
|
|
11135
|
+
}, "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) {
|
|
11136
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11137
|
+
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,
|
|
11138
|
+
key: "carousel-" + index,
|
|
11139
|
+
onClick: function onClick() {
|
|
11140
|
+
handleOnClick(item);
|
|
11141
|
+
}
|
|
11142
|
+
}, item === null || item === void 0 ? void 0 : item.label);
|
|
11143
|
+
})))), isNavigateButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
11144
|
+
className: "hidden my-auto gap-4 md:flex justify-end ps-10"
|
|
11145
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
11146
|
+
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"),
|
|
11147
|
+
onClick: handleClickPrevImg,
|
|
11148
|
+
disabled: !canScrollLeft
|
|
11149
|
+
}, /*#__PURE__*/React__default.createElement(IoIosArrowBack, {
|
|
11150
|
+
size: 24,
|
|
11151
|
+
className: "inline-block text-lg"
|
|
11152
|
+
})), /*#__PURE__*/React__default.createElement("button", {
|
|
11153
|
+
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"),
|
|
11154
|
+
onClick: handleClickNextImg,
|
|
11155
|
+
disabled: !canScrollRight
|
|
11156
|
+
}, /*#__PURE__*/React__default.createElement(IoIosArrowForward, {
|
|
11157
|
+
size: 24,
|
|
11158
|
+
className: "inline-block text-lg "
|
|
11159
|
+
}))) : null);
|
|
11160
|
+
};
|
|
11161
|
+
|
|
11162
|
+
var Products9 = function Products9(props) {
|
|
11163
|
+
var _Object$keys2;
|
|
10592
11164
|
var _props$Link = props.Link,
|
|
10593
11165
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10594
11166
|
shopConfigStyle = props.shopConfigStyle,
|
|
10595
11167
|
_props$ProductItem = props.ProductItem,
|
|
10596
11168
|
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
10597
|
-
var _useState = useState(
|
|
11169
|
+
var _useState = useState(true),
|
|
11170
|
+
loading = _useState[0],
|
|
11171
|
+
setLoading = _useState[1];
|
|
11172
|
+
var _useState2 = useState({
|
|
10598
11173
|
size: 12
|
|
10599
11174
|
}),
|
|
10600
|
-
params =
|
|
10601
|
-
|
|
11175
|
+
params = _useState2[0];
|
|
11176
|
+
var _useState3 = useState(false),
|
|
11177
|
+
isAutoGetList = _useState3[0];
|
|
10602
11178
|
var _CategoryController = CategoryController(_extends({}, props, {
|
|
10603
11179
|
types: "0"
|
|
10604
11180
|
})),
|
|
10605
11181
|
_CategoryController$c = _CategoryController.categories,
|
|
10606
11182
|
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
10607
11183
|
var _ProductController = ProductController(_extends({}, props, {
|
|
10608
|
-
params: params
|
|
11184
|
+
params: params,
|
|
11185
|
+
isAutoGetList: isAutoGetList
|
|
10609
11186
|
})),
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
|
|
11187
|
+
getProductListSearch = _ProductController.getProductListSearch;
|
|
11188
|
+
var _useState4 = useState([]),
|
|
11189
|
+
categoryProducts = _useState4[0],
|
|
11190
|
+
setCategoryProducts = _useState4[1];
|
|
11191
|
+
useEffect(function () {
|
|
11192
|
+
if ((categories === null || categories === void 0 ? void 0 : categories.length) > 0) {
|
|
11193
|
+
fetchAll();
|
|
11194
|
+
}
|
|
11195
|
+
}, [categories]);
|
|
11196
|
+
var fetchAll = function fetchAll() {
|
|
11197
|
+
try {
|
|
11198
|
+
setLoading(true);
|
|
11199
|
+
var _temp = _finallyRethrows(function () {
|
|
11200
|
+
return _catch(function () {
|
|
11201
|
+
var _categories$slice;
|
|
11202
|
+
var result = {};
|
|
11203
|
+
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) {
|
|
11204
|
+
try {
|
|
11205
|
+
return Promise.resolve(getProductListSearch({
|
|
11206
|
+
categoryId: cat === null || cat === void 0 ? void 0 : cat.categoryId,
|
|
11207
|
+
size: 4
|
|
11208
|
+
})).then(function (products) {
|
|
11209
|
+
if ((products === null || products === void 0 ? void 0 : products.length) > 0) {
|
|
11210
|
+
result[cat === null || cat === void 0 ? void 0 : cat.cateName] = products;
|
|
11211
|
+
}
|
|
11212
|
+
});
|
|
11213
|
+
} catch (e) {
|
|
11214
|
+
return Promise.reject(e);
|
|
11215
|
+
}
|
|
11216
|
+
}))).then(function () {
|
|
11217
|
+
setCategoryProducts(result);
|
|
11218
|
+
});
|
|
11219
|
+
}, function (error) {
|
|
11220
|
+
console.log(error);
|
|
11221
|
+
});
|
|
11222
|
+
}, function (_wasThrown, _result) {
|
|
11223
|
+
setLoading(false);
|
|
11224
|
+
if (_wasThrown) throw _result;
|
|
11225
|
+
return _result;
|
|
11226
|
+
});
|
|
11227
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
11228
|
+
} catch (e) {
|
|
11229
|
+
return Promise.reject(e);
|
|
11230
|
+
}
|
|
11231
|
+
};
|
|
10613
11232
|
var handleChooseCategory = function handleChooseCategory(item) {
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
}
|
|
11233
|
+
var _Object$keys;
|
|
11234
|
+
if ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(item)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0) {
|
|
11235
|
+
fetchAll();
|
|
11236
|
+
} else {
|
|
11237
|
+
fetchOne(item);
|
|
11238
|
+
}
|
|
10618
11239
|
};
|
|
10619
|
-
var
|
|
10620
|
-
|
|
10621
|
-
|
|
10622
|
-
|
|
10623
|
-
|
|
11240
|
+
var fetchOne = function fetchOne(item) {
|
|
11241
|
+
try {
|
|
11242
|
+
setLoading(true);
|
|
11243
|
+
var _temp2 = _finallyRethrows(function () {
|
|
11244
|
+
return _catch(function () {
|
|
11245
|
+
return Promise.resolve(getProductListSearch({
|
|
11246
|
+
categoryId: item === null || item === void 0 ? void 0 : item.categoryId,
|
|
11247
|
+
size: 12
|
|
11248
|
+
})).then(function (products) {
|
|
11249
|
+
var _setCategoryProducts, _console$log;
|
|
11250
|
+
setCategoryProducts((_setCategoryProducts = {}, _setCategoryProducts[item === null || item === void 0 ? void 0 : item.cateName] = products, _setCategoryProducts));
|
|
11251
|
+
console.log("check::::", (_console$log = {}, _console$log[item === null || item === void 0 ? void 0 : item.cateName] = products, _console$log));
|
|
11252
|
+
});
|
|
11253
|
+
}, function (error) {
|
|
11254
|
+
console.log(error);
|
|
11255
|
+
});
|
|
11256
|
+
}, function (_wasThrown2, _result2) {
|
|
11257
|
+
setLoading(false);
|
|
11258
|
+
if (_wasThrown2) throw _result2;
|
|
11259
|
+
return _result2;
|
|
11260
|
+
});
|
|
11261
|
+
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
11262
|
+
} catch (e) {
|
|
11263
|
+
return Promise.reject(e);
|
|
10624
11264
|
}
|
|
10625
|
-
|
|
10626
|
-
return acc;
|
|
10627
|
-
}, {});
|
|
11265
|
+
};
|
|
10628
11266
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10629
11267
|
className: SECTION_CLASS + " flex flex-col gap-4 md:!my-6 md:gap-6 "
|
|
10630
11268
|
}, /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
@@ -10632,7 +11270,7 @@ var Products9 = function Products9(props) {
|
|
|
10632
11270
|
onClick: handleChooseCategory
|
|
10633
11271
|
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
10634
11272
|
className: "m-auto mt-20 min-h-32"
|
|
10635
|
-
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (Object === null || Object === void 0 ? void 0 : (_Object$
|
|
11273
|
+
}, /*#__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) {
|
|
10636
11274
|
var _products$;
|
|
10637
11275
|
var categoryName = _ref[0],
|
|
10638
11276
|
products = _ref[1];
|
|
@@ -10656,7 +11294,9 @@ var Products9 = function Products9(props) {
|
|
|
10656
11294
|
product: product,
|
|
10657
11295
|
key: product === null || product === void 0 ? void 0 : product.landingShopProductId
|
|
10658
11296
|
});
|
|
10659
|
-
}) :
|
|
11297
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
11298
|
+
className: "col-span-2 sm:col-span-3 lg:col-span-4"
|
|
11299
|
+
}, /*#__PURE__*/React__default.createElement(NotFoundProduct, null))));
|
|
10660
11300
|
}) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
|
|
10661
11301
|
};
|
|
10662
11302
|
|
|
@@ -10727,34 +11367,30 @@ var listFilter = [{
|
|
|
10727
11367
|
value: "sortPriceDESC"
|
|
10728
11368
|
}];
|
|
10729
11369
|
var Products11 = function Products11(props) {
|
|
10730
|
-
var _productsFilter$slice;
|
|
10731
11370
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
10732
11371
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10733
11372
|
_props$Link = props.Link,
|
|
10734
11373
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10735
11374
|
_props$categoryId = props.categoryId,
|
|
10736
|
-
categoryId = _props$categoryId === void 0 ?
|
|
11375
|
+
categoryId = _props$categoryId === void 0 ? "" : _props$categoryId,
|
|
10737
11376
|
_props$ProductItem = props.ProductItem,
|
|
10738
11377
|
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
10739
11378
|
var _useState = useState({
|
|
10740
11379
|
page: 0,
|
|
10741
11380
|
size: 12,
|
|
10742
|
-
categoryId: categoryId
|
|
11381
|
+
categoryId: categoryId || ""
|
|
10743
11382
|
}),
|
|
10744
11383
|
params = _useState[0],
|
|
10745
11384
|
setParams = _useState[1];
|
|
10746
|
-
var _useState2 = useState(
|
|
10747
|
-
|
|
10748
|
-
|
|
10749
|
-
var _useState3 = useState(
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
var _useState4 = useState([]),
|
|
10753
|
-
|
|
10754
|
-
|
|
10755
|
-
var _useState5 = useState(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]),
|
|
10756
|
-
filterItem = _useState5[0],
|
|
10757
|
-
setFilterItem = _useState5[1];
|
|
11385
|
+
var _useState2 = useState({}),
|
|
11386
|
+
categorySelected = _useState2[0],
|
|
11387
|
+
setCategorySelected = _useState2[1];
|
|
11388
|
+
var _useState3 = useState([]),
|
|
11389
|
+
productsFilter = _useState3[0],
|
|
11390
|
+
setProductsFilter = _useState3[1];
|
|
11391
|
+
var _useState4 = useState(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]),
|
|
11392
|
+
filterItem = _useState4[0],
|
|
11393
|
+
setFilterItem = _useState4[1];
|
|
10758
11394
|
var _CategoryController = CategoryController(_extends({}, props, {
|
|
10759
11395
|
types: "0"
|
|
10760
11396
|
})),
|
|
@@ -10768,22 +11404,33 @@ var Products11 = function Products11(props) {
|
|
|
10768
11404
|
loading = _ProductController.loading,
|
|
10769
11405
|
page = _ProductController.page;
|
|
10770
11406
|
var handleOnChangePage = function handleOnChangePage(pageIndex) {
|
|
10771
|
-
setFirstLoading(false);
|
|
10772
11407
|
setParams(function (prev) {
|
|
10773
11408
|
return _extends({}, prev, {
|
|
10774
11409
|
page: pageIndex
|
|
10775
11410
|
});
|
|
10776
11411
|
});
|
|
11412
|
+
window.scrollTo({
|
|
11413
|
+
top: 0,
|
|
11414
|
+
behavior: 'smooth'
|
|
11415
|
+
});
|
|
10777
11416
|
};
|
|
10778
11417
|
var handleChooseCategory = function handleChooseCategory(category) {
|
|
11418
|
+
if (categoryId) {
|
|
11419
|
+
var newUrl = getLinkProductsByCategory(category);
|
|
11420
|
+
window.history.replaceState(null, '', newUrl);
|
|
11421
|
+
}
|
|
10779
11422
|
setCategorySelected(category);
|
|
10780
|
-
setFirstLoading(true);
|
|
10781
11423
|
setFilterItem(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]);
|
|
10782
11424
|
setParams(function (prev) {
|
|
10783
|
-
return
|
|
11425
|
+
return {
|
|
11426
|
+
page: 0,
|
|
10784
11427
|
categoryId: category === null || category === void 0 ? void 0 : category.categoryId,
|
|
10785
11428
|
size: 12
|
|
10786
|
-
}
|
|
11429
|
+
};
|
|
11430
|
+
});
|
|
11431
|
+
window.scrollTo({
|
|
11432
|
+
top: 0,
|
|
11433
|
+
behavior: 'smooth'
|
|
10787
11434
|
});
|
|
10788
11435
|
};
|
|
10789
11436
|
useEffect(function () {
|
|
@@ -10795,23 +11442,42 @@ var Products11 = function Products11(props) {
|
|
|
10795
11442
|
}
|
|
10796
11443
|
}, [categories]);
|
|
10797
11444
|
useEffect(function () {
|
|
10798
|
-
|
|
11445
|
+
if ((filterItem === null || filterItem === void 0 ? void 0 : filterItem.value) === "sortPriceDESC") {
|
|
11446
|
+
var productsCopy = [].concat(products);
|
|
11447
|
+
productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.sort(function (a, b) {
|
|
11448
|
+
var _a$productInfo, _b$productInfo;
|
|
11449
|
+
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);
|
|
11450
|
+
});
|
|
11451
|
+
setProductsFilter(productsCopy);
|
|
11452
|
+
} else if ((filterItem === null || filterItem === void 0 ? void 0 : filterItem.value) === "discount") {
|
|
11453
|
+
var _productsCopy2;
|
|
11454
|
+
var _productsCopy = [].concat(products);
|
|
11455
|
+
_productsCopy = (_productsCopy2 = _productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
|
|
11456
|
+
var _product$productInfo, _product$productInfo2, _product$productInfo3;
|
|
11457
|
+
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);
|
|
11458
|
+
});
|
|
11459
|
+
setProductsFilter(_productsCopy);
|
|
11460
|
+
} else {
|
|
11461
|
+
setProductsFilter(products);
|
|
11462
|
+
}
|
|
10799
11463
|
}, [products, categorySelected]);
|
|
10800
11464
|
var handleFilter = function handleFilter(item) {
|
|
10801
11465
|
setFilterItem(item);
|
|
10802
|
-
if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC") {
|
|
11466
|
+
if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC" && !(params !== null && params !== void 0 && params.isHighlight)) {
|
|
10803
11467
|
var productsCopy = [].concat(products);
|
|
10804
11468
|
productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.sort(function (a, b) {
|
|
10805
|
-
var
|
|
10806
|
-
return
|
|
11469
|
+
var _a$productInfo2, _b$productInfo2;
|
|
11470
|
+
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);
|
|
10807
11471
|
});
|
|
10808
11472
|
setProductsFilter(productsCopy);
|
|
10809
|
-
} else if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
|
|
10810
|
-
var
|
|
10811
|
-
|
|
10812
|
-
|
|
11473
|
+
} else if ((item === null || item === void 0 ? void 0 : item.value) === "discount" && !(params !== null && params !== void 0 && params.isHighlight)) {
|
|
11474
|
+
var _productsCopy4;
|
|
11475
|
+
var _productsCopy3 = [].concat(products);
|
|
11476
|
+
_productsCopy3 = (_productsCopy4 = _productsCopy3) === null || _productsCopy4 === void 0 ? void 0 : _productsCopy4.filter(function (product) {
|
|
11477
|
+
var _product$productInfo4, _product$productInfo5, _product$productInfo6;
|
|
11478
|
+
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);
|
|
10813
11479
|
});
|
|
10814
|
-
setProductsFilter(
|
|
11480
|
+
setProductsFilter(_productsCopy3);
|
|
10815
11481
|
} else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
|
|
10816
11482
|
setParams(function (prev) {
|
|
10817
11483
|
return _extends({}, prev, {
|
|
@@ -10820,19 +11486,20 @@ var Products11 = function Products11(props) {
|
|
|
10820
11486
|
});
|
|
10821
11487
|
} else {
|
|
10822
11488
|
setParams(function (prev) {
|
|
10823
|
-
return
|
|
11489
|
+
return {
|
|
11490
|
+
page: 0,
|
|
10824
11491
|
categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
|
|
10825
11492
|
size: 12
|
|
10826
|
-
}
|
|
11493
|
+
};
|
|
10827
11494
|
});
|
|
10828
11495
|
}
|
|
10829
11496
|
};
|
|
10830
11497
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10831
11498
|
className: SECTION_CLASS + " grid grid-cols-1 !my-6 !md:my-6 md:grid-cols-4 gap-6"
|
|
10832
11499
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10833
|
-
className: "md:sticky top-
|
|
11500
|
+
className: "md:sticky top-16 self-start"
|
|
10834
11501
|
}, (categories === null || categories === void 0 ? void 0 : categories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
10835
|
-
className: " flex flex-col gap-2 rounded-
|
|
11502
|
+
className: " flex flex-col gap-2 rounded-2xl bg-bgSecondary p-4 max-h-96 scroll-container overflow-y-auto"
|
|
10836
11503
|
}, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
|
|
10837
11504
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10838
11505
|
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" : ""),
|
|
@@ -10840,7 +11507,9 @@ var Products11 = function Products11(props) {
|
|
|
10840
11507
|
onClick: function onClick() {
|
|
10841
11508
|
handleChooseCategory(item);
|
|
10842
11509
|
}
|
|
10843
|
-
},
|
|
11510
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11511
|
+
className: "line-clamp-2"
|
|
11512
|
+
}, item === null || item === void 0 ? void 0 : item.cateName));
|
|
10844
11513
|
})) : null), /*#__PURE__*/React__default.createElement("div", {
|
|
10845
11514
|
className: "md:col-span-3 flex flex-col gap-6"
|
|
10846
11515
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -10853,11 +11522,11 @@ var Products11 = function Products11(props) {
|
|
|
10853
11522
|
handleFilter(item);
|
|
10854
11523
|
}
|
|
10855
11524
|
}, item === null || item === void 0 ? void 0 : item.label);
|
|
10856
|
-
})), loading
|
|
11525
|
+
})), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
10857
11526
|
className: "w-full h-96 mb-1 flex justify-center items-center"
|
|
10858
11527
|
}, /*#__PURE__*/React__default.createElement(Loading, null)) : /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10859
|
-
className: "grid grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-6
|
|
10860
|
-
}, (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > 0 ? productsFilter === null || productsFilter === void 0 ? void 0 :
|
|
11528
|
+
className: "grid grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-6 xl:gap-8"
|
|
11529
|
+
}, (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > 0 ? productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.map(function (product, index) {
|
|
10861
11530
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10862
11531
|
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo),
|
|
10863
11532
|
Link: Link,
|
|
@@ -10881,26 +11550,6 @@ var Products11 = function Products11(props) {
|
|
|
10881
11550
|
}) : null)));
|
|
10882
11551
|
};
|
|
10883
11552
|
|
|
10884
|
-
var ProductItem9 = function ProductItem9(props) {
|
|
10885
|
-
var _product$productInfo;
|
|
10886
|
-
var product = props.product;
|
|
10887
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
10888
|
-
className: "flex border-b border-stroke items-center py-4"
|
|
10889
|
-
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10890
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10891
|
-
className: "!w-24 rounded-lg"
|
|
10892
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10893
|
-
className: "ml-4 flex-1"
|
|
10894
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10895
|
-
className: "text-xl"
|
|
10896
|
-
}, 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", {
|
|
10897
|
-
className: "mt-2"
|
|
10898
|
-
}, /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10899
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10900
|
-
priceClassName: "!font-normal text-lg"
|
|
10901
|
-
})) : null));
|
|
10902
|
-
};
|
|
10903
|
-
|
|
10904
11553
|
var Products12 = function Products12(props) {
|
|
10905
11554
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
10906
11555
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
@@ -10933,15 +11582,19 @@ var Products12 = function Products12(props) {
|
|
|
10933
11582
|
});
|
|
10934
11583
|
};
|
|
10935
11584
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
10936
|
-
className:
|
|
11585
|
+
className: SECTION_CLASS + " w-full flex flex-col gap-6"
|
|
10937
11586
|
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
10938
11587
|
data: data,
|
|
10939
11588
|
shopConfigStyle: shopConfigStyle
|
|
10940
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
11589
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11590
|
+
className: "flex justify-center"
|
|
11591
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11592
|
+
className: "!overflow-hidden max-w-[80%] md:max-w-[67%] pt-2"
|
|
11593
|
+
}, /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
10941
11594
|
isNavigateButton: false,
|
|
10942
11595
|
data: categories,
|
|
10943
11596
|
onClick: handleFilterByCategory
|
|
10944
|
-
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
11597
|
+
}))), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
10945
11598
|
className: "flex w-full justify-center p-12"
|
|
10946
11599
|
}, /*#__PURE__*/React__default.createElement(Loading, null)) : products !== null && products !== void 0 && products.length ? /*#__PURE__*/React__default.createElement("div", {
|
|
10947
11600
|
className: "grid grid-cols-1 md:grid-cols-2 gap-x-12"
|
|
@@ -10950,12 +11603,70 @@ var Products12 = function Products12(props) {
|
|
|
10950
11603
|
key: index,
|
|
10951
11604
|
Link: Link,
|
|
10952
11605
|
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10953
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
11606
|
+
}, /*#__PURE__*/React__default.createElement(ProductItem10, {
|
|
10954
11607
|
product: product
|
|
10955
11608
|
}));
|
|
10956
11609
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)));
|
|
10957
11610
|
};
|
|
10958
11611
|
|
|
11612
|
+
var Products14 = function Products14(props) {
|
|
11613
|
+
var _products$slice;
|
|
11614
|
+
var _props$Link = props.Link,
|
|
11615
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
11616
|
+
data = props.data,
|
|
11617
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
11618
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
11619
|
+
_props$SectionTitle = props.SectionTitle,
|
|
11620
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
11621
|
+
_props$ProductItem = props.ProductItem,
|
|
11622
|
+
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
11623
|
+
var _ProductDetailControl = ProductDetailController(props),
|
|
11624
|
+
product = _ProductDetailControl.product;
|
|
11625
|
+
var _useState = useState(false),
|
|
11626
|
+
isAutoGetList = _useState[0],
|
|
11627
|
+
setIsAutoGetList = _useState[1];
|
|
11628
|
+
var _useState2 = useState({
|
|
11629
|
+
size: 12,
|
|
11630
|
+
categoryId: product === null || product === void 0 ? void 0 : product.categoryId
|
|
11631
|
+
}),
|
|
11632
|
+
params = _useState2[0],
|
|
11633
|
+
setParams = _useState2[1];
|
|
11634
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
11635
|
+
params: params,
|
|
11636
|
+
isAutoGetList: isAutoGetList
|
|
11637
|
+
})),
|
|
11638
|
+
_ProductController$pr = _ProductController.products,
|
|
11639
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
11640
|
+
loading = _ProductController.loading;
|
|
11641
|
+
useEffect(function () {
|
|
11642
|
+
if (product !== null && product !== void 0 && product.categoryId) {
|
|
11643
|
+
setParams(function (prev) {
|
|
11644
|
+
return _extends({}, prev, {
|
|
11645
|
+
categoryId: product === null || product === void 0 ? void 0 : product.categoryId
|
|
11646
|
+
});
|
|
11647
|
+
});
|
|
11648
|
+
setIsAutoGetList(true);
|
|
11649
|
+
}
|
|
11650
|
+
}, [product]);
|
|
11651
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11652
|
+
className: SECTION_CLASS + " flex flex-col gap-6 md:gap-12"
|
|
11653
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
11654
|
+
data: data,
|
|
11655
|
+
shopConfigStyle: shopConfigStyle
|
|
11656
|
+
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
11657
|
+
className: "m-auto mt-20 min-h-32"
|
|
11658
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
11659
|
+
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"
|
|
11660
|
+
}, 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) {
|
|
11661
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
11662
|
+
Link: Link,
|
|
11663
|
+
shopConfigStyle: shopConfigStyle,
|
|
11664
|
+
product: product,
|
|
11665
|
+
key: "zjk-" + idx
|
|
11666
|
+
});
|
|
11667
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
|
|
11668
|
+
};
|
|
11669
|
+
|
|
10959
11670
|
var ProductCategory2 = function ProductCategory2(props) {
|
|
10960
11671
|
var _products$slice;
|
|
10961
11672
|
var _props$Link = props.Link,
|
|
@@ -11107,7 +11818,11 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11107
11818
|
isAutoGetList: isAutoGetList
|
|
11108
11819
|
})),
|
|
11109
11820
|
products = _ProductController.products,
|
|
11110
|
-
loading = _ProductController.loading
|
|
11821
|
+
loading = _ProductController.loading,
|
|
11822
|
+
page = _ProductController.page;
|
|
11823
|
+
var _useState5 = useState({}),
|
|
11824
|
+
filterValue = _useState5[0],
|
|
11825
|
+
setFilterValue = _useState5[1];
|
|
11111
11826
|
useEffect(function () {
|
|
11112
11827
|
setIsAutoGetList(true);
|
|
11113
11828
|
setParams(function (prev) {
|
|
@@ -11117,8 +11832,16 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11117
11832
|
});
|
|
11118
11833
|
}, [keywordValue]);
|
|
11119
11834
|
useEffect(function () {
|
|
11120
|
-
if ((
|
|
11121
|
-
|
|
11835
|
+
if ((filterValue === null || filterValue === void 0 ? void 0 : filterValue.value) === "discount") {
|
|
11836
|
+
var _productsCopy;
|
|
11837
|
+
var productsCopy = [].concat(products);
|
|
11838
|
+
productsCopy = (_productsCopy = productsCopy) === null || _productsCopy === void 0 ? void 0 : _productsCopy.filter(function (product) {
|
|
11839
|
+
var _product$productInfo, _product$productInfo2, _product$productInfo3;
|
|
11840
|
+
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);
|
|
11841
|
+
});
|
|
11842
|
+
setProductsFilter(productsCopy);
|
|
11843
|
+
} else {
|
|
11844
|
+
setProductsFilter(products);
|
|
11122
11845
|
}
|
|
11123
11846
|
}, [products]);
|
|
11124
11847
|
var handleGetMoreProducts = function handleGetMoreProducts() {
|
|
@@ -11130,10 +11853,13 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11130
11853
|
});
|
|
11131
11854
|
};
|
|
11132
11855
|
var handleFilter = function handleFilter(item) {
|
|
11133
|
-
|
|
11856
|
+
setFilterValue(item);
|
|
11857
|
+
if ((item === null || item === void 0 ? void 0 : item.value) === "discount" && !(params !== null && params !== void 0 && params.isHighlight)) {
|
|
11858
|
+
var _productsCopy2;
|
|
11134
11859
|
var productsCopy = [].concat(products);
|
|
11135
|
-
productsCopy === null ||
|
|
11136
|
-
|
|
11860
|
+
productsCopy = (_productsCopy2 = productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
|
|
11861
|
+
var _product$productInfo4, _product$productInfo5, _product$productInfo6;
|
|
11862
|
+
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);
|
|
11137
11863
|
});
|
|
11138
11864
|
setProductsFilter(productsCopy);
|
|
11139
11865
|
} else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
|
|
@@ -11158,7 +11884,7 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11158
11884
|
shopConfigStyle: shopConfigStyle
|
|
11159
11885
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11160
11886
|
className: "text-lg"
|
|
11161
|
-
}, "T\u1EEB kh\xF3a \"", keywordValue, "\" (",
|
|
11887
|
+
}, "T\u1EEB kh\xF3a \"", keywordValue, "\" (", page === null || page === void 0 ? void 0 : page.total_elements, " s\u1EA3n ph\u1EA9m)"), /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
11162
11888
|
data: listFilter$1,
|
|
11163
11889
|
isNavigateButton: false,
|
|
11164
11890
|
onClick: handleFilter
|
|
@@ -11552,12 +12278,12 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
11552
12278
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
11553
12279
|
className: SECTION_CLASS + " mt-0 md:mt-0 mb-0 " + ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "bg-bgSecondary pb-8" : "bg-background")
|
|
11554
12280
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11555
|
-
className: ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "" : "px-4 md:px-6") + " py-4 md:py-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 md:gap-6 bg-bgSecondary"
|
|
12281
|
+
className: ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "" : "px-4 md:px-6") + " py-4 md:py-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 gap-3 md:gap-6 bg-bgSecondary"
|
|
11556
12282
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11557
|
-
className: "flex flex-col gap-4 col-span-2 "
|
|
12283
|
+
className: "flex flex-col gap-4 md:col-span-2 "
|
|
11558
12284
|
}, displayImage ? /*#__PURE__*/React__default.createElement("img", {
|
|
11559
12285
|
src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
|
|
11560
|
-
className: "w-full border
|
|
12286
|
+
className: "w-full border bg-background aspect-square object-contain rounded-2xl "
|
|
11561
12287
|
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
11562
12288
|
className: "flex justify-center items-center w-full border rounded-2xl aspect-square",
|
|
11563
12289
|
style: {
|
|
@@ -11568,19 +12294,19 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
11568
12294
|
height: "25%",
|
|
11569
12295
|
fill: "#D9D9D9"
|
|
11570
12296
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
11571
|
-
className: "flex gap-
|
|
12297
|
+
className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
|
|
11572
12298
|
}, product === null || product === void 0 ? void 0 : (_product$images2 = product.images) === null || _product$images2 === void 0 ? void 0 : _product$images2.map(function (item) {
|
|
11573
12299
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
11574
12300
|
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
11575
12301
|
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
11576
12302
|
alt: "",
|
|
11577
|
-
className: "cursor-pointer h-
|
|
12303
|
+
className: "cursor-pointer h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full aspect-square rounded-md lg:rounded-lg bg-background object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 "),
|
|
11578
12304
|
onClick: function onClick() {
|
|
11579
12305
|
handleDisplayImage(item);
|
|
11580
12306
|
}
|
|
11581
12307
|
});
|
|
11582
12308
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
11583
|
-
className: "col-span-3"
|
|
12309
|
+
className: "md:col-span-3 "
|
|
11584
12310
|
}, /*#__PURE__*/React__default.createElement("p", {
|
|
11585
12311
|
className: "font-semibold text-2xl"
|
|
11586
12312
|
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
@@ -11594,7 +12320,7 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
11594
12320
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11595
12321
|
className: "min-w-24"
|
|
11596
12322
|
}, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
|
|
11597
|
-
className: "flex gap-2"
|
|
12323
|
+
className: "flex flex-wrap gap-2"
|
|
11598
12324
|
}, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
|
|
11599
12325
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
11600
12326
|
key: i,
|
|
@@ -11646,7 +12372,7 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
11646
12372
|
__html: product === null || product === void 0 ? void 0 : product.description
|
|
11647
12373
|
}
|
|
11648
12374
|
}), !isSeeMore && !hiddenButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
11649
|
-
className: "h-
|
|
12375
|
+
className: "h-28 relative -mt-28 rounded-b-lg",
|
|
11650
12376
|
style: {
|
|
11651
12377
|
background: "linear-gradient(to top, #81818169 0%, #00000003 50%)"
|
|
11652
12378
|
}
|
|
@@ -11791,7 +12517,7 @@ var ProductDetail11 = function ProductDetail11(props) {
|
|
|
11791
12517
|
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
11792
12518
|
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
11793
12519
|
alt: "",
|
|
11794
|
-
className: "cursor-pointer px-3 py-2 !h-24 !w-24 object-
|
|
12520
|
+
className: "cursor-pointer px-3 py-2 !h-24 !w-24 object-contain aspect-square rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
|
|
11795
12521
|
onClick: function onClick() {
|
|
11796
12522
|
handleDisplayImage(item);
|
|
11797
12523
|
}
|
|
@@ -11823,7 +12549,7 @@ var ProductDetail11 = function ProductDetail11(props) {
|
|
|
11823
12549
|
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
11824
12550
|
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
11825
12551
|
alt: "",
|
|
11826
|
-
className: "cursor-pointer px-2 py-1 !h-24 !w-24 object-
|
|
12552
|
+
className: "cursor-pointer px-2 py-1 !h-24 !w-24 object-contain rounded-lg aspect-square\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
|
|
11827
12553
|
onClick: function onClick() {
|
|
11828
12554
|
handleDisplayImage(item);
|
|
11829
12555
|
}
|
|
@@ -11843,7 +12569,7 @@ var ProductDetail11 = function ProductDetail11(props) {
|
|
|
11843
12569
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11844
12570
|
className: "min-w-24 my-auto"
|
|
11845
12571
|
}, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
|
|
11846
|
-
className: "flex gap-2"
|
|
12572
|
+
className: "flex flex-wrap gap-2"
|
|
11847
12573
|
}, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
|
|
11848
12574
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
11849
12575
|
key: i,
|
|
@@ -11955,7 +12681,7 @@ var Booking1 = function Booking1(props) {
|
|
|
11955
12681
|
shopConfigStyle: shopConfigStyle
|
|
11956
12682
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11957
12683
|
className: "mt-12 grid grid-cols-1 gap-6 md:grid-cols-2 md:gap-12"
|
|
11958
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
12684
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
11959
12685
|
shopConfigStyle: shopConfigStyle,
|
|
11960
12686
|
shopConfig: shopConfig,
|
|
11961
12687
|
className: "!bg-bgSecondary"
|
|
@@ -11997,7 +12723,7 @@ var BookingForm6 = function BookingForm6(props) {
|
|
|
11997
12723
|
className: "w-full h-auto"
|
|
11998
12724
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11999
12725
|
className: "mt-4 whitespace-pre-line"
|
|
12000
|
-
}, 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, {
|
|
12726
|
+
}, 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, {
|
|
12001
12727
|
shopConfigStyle: shopConfigStyle,
|
|
12002
12728
|
shopConfig: shopConfig,
|
|
12003
12729
|
className: "col-span-2"
|
|
@@ -12241,7 +12967,7 @@ var BookingFoodForm = function BookingFoodForm(props) {
|
|
|
12241
12967
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
12242
12968
|
className: "text-center"
|
|
12243
12969
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
12244
|
-
label: "Đặt
|
|
12970
|
+
label: "Đặt bàn ngay",
|
|
12245
12971
|
shopConfigStyle: shopConfigStyle,
|
|
12246
12972
|
onClick: handleSubmit
|
|
12247
12973
|
}))) : null, isOpenPopup && /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
@@ -12258,7 +12984,7 @@ var BookingFoodForm = function BookingFoodForm(props) {
|
|
|
12258
12984
|
}
|
|
12259
12985
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
12260
12986
|
className: "font-medium text-2xl"
|
|
12261
|
-
}, "\u0110\u1EB7t
|
|
12987
|
+
}, "\u0110\u1EB7t b\xE0n th\xE0nh c\xF4ng"), /*#__PURE__*/React__default.createElement("div", {
|
|
12262
12988
|
className: "text-center"
|
|
12263
12989
|
}, "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"))));
|
|
12264
12990
|
};
|
|
@@ -12280,7 +13006,7 @@ var BookingTable1 = function BookingTable1(props) {
|
|
|
12280
13006
|
data: data,
|
|
12281
13007
|
shopConfigStyle: shopConfigStyle
|
|
12282
13008
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12283
|
-
className: "mt-6 md:mt-12 grid grid-cols-1 gap-6 md:grid-cols-3
|
|
13009
|
+
className: "mt-6 md:mt-12 grid grid-cols-1 gap-6 md:grid-cols-3 lg:gap-12"
|
|
12284
13010
|
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12285
13011
|
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) || "#"
|
|
12286
13012
|
}, 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", {
|
|
@@ -12291,13 +13017,13 @@ var BookingTable1 = function BookingTable1(props) {
|
|
|
12291
13017
|
}
|
|
12292
13018
|
})) : /*#__PURE__*/React__default.createElement("img", {
|
|
12293
13019
|
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,
|
|
12294
|
-
className: "w-full h-auto"
|
|
13020
|
+
className: "w-full h-full lg:h-auto object-cover rounded-2xl"
|
|
12295
13021
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12296
13022
|
className: "mt-4 whitespace-pre-line"
|
|
12297
13023
|
}, 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, {
|
|
12298
13024
|
shopConfigStyle: shopConfigStyle,
|
|
12299
13025
|
shopConfig: shopConfig,
|
|
12300
|
-
className: "col-span-2"
|
|
13026
|
+
className: "md:col-span-2"
|
|
12301
13027
|
})));
|
|
12302
13028
|
};
|
|
12303
13029
|
|
|
@@ -12409,6 +13135,30 @@ var Banner3 = function Banner3(props) {
|
|
|
12409
13135
|
}));
|
|
12410
13136
|
};
|
|
12411
13137
|
|
|
13138
|
+
var Banner4 = function Banner4(props) {
|
|
13139
|
+
var _data$data, _data$data$, _data$data2, _data$data2$slice;
|
|
13140
|
+
var data = props.data,
|
|
13141
|
+
_props$Link = props.Link,
|
|
13142
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
13143
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
13144
|
+
className: SECTION_CLASS_PADDING + " grid grid-cols-1 bg-bgSecondary md:grid-cols-3 gap-6"
|
|
13145
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13146
|
+
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,
|
|
13147
|
+
className: "md:col-span-2 object-cover w-full h-full rounded-[10px]"
|
|
13148
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13149
|
+
className: "flex flex-col gap-6"
|
|
13150
|
+
}, 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) {
|
|
13151
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13152
|
+
Link: Link,
|
|
13153
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
13154
|
+
key: "djsd-" + index
|
|
13155
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13156
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
13157
|
+
className: "object-cover w-full h-full rounded-xl"
|
|
13158
|
+
}));
|
|
13159
|
+
})));
|
|
13160
|
+
};
|
|
13161
|
+
|
|
12412
13162
|
var Banner7 = function Banner7(props) {
|
|
12413
13163
|
var _data$data;
|
|
12414
13164
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
@@ -12480,7 +13230,7 @@ var Partner1 = function Partner1(props) {
|
|
|
12480
13230
|
data: data,
|
|
12481
13231
|
shopConfigStyle: shopConfigStyle
|
|
12482
13232
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12483
|
-
className: "grid grid-cols-4 md:grid-cols-6 gap-6 mt-4 md:mt-6 p-6 rounded-xl",
|
|
13233
|
+
className: "grid grid-cols-4 md:grid-cols-6 gap-6 mt-4 md:mt-6 p-4 md:p-6 rounded-xl",
|
|
12484
13234
|
style: {
|
|
12485
13235
|
background: bgSecondary
|
|
12486
13236
|
}
|
|
@@ -13034,7 +13784,9 @@ var Footer7 = function Footer7(props) {
|
|
|
13034
13784
|
style: {
|
|
13035
13785
|
background: primary
|
|
13036
13786
|
}
|
|
13037
|
-
}))))), /*#__PURE__*/React__default.createElement("hr",
|
|
13787
|
+
}))))), /*#__PURE__*/React__default.createElement("hr", {
|
|
13788
|
+
className: "mt-12"
|
|
13789
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13038
13790
|
className: "py-4"
|
|
13039
13791
|
}, /*#__PURE__*/React__default.createElement("small", {
|
|
13040
13792
|
className: "me-5"
|
|
@@ -13054,24 +13806,26 @@ var RatingStar = function RatingStar(props) {
|
|
|
13054
13806
|
star = _props$star === void 0 ? 5 : _props$star,
|
|
13055
13807
|
_props$style = props.style,
|
|
13056
13808
|
style = _props$style === void 0 ? {} : _props$style,
|
|
13809
|
+
_props$color = props.color,
|
|
13810
|
+
color = _props$color === void 0 ? "#E2B93B" : _props$color,
|
|
13057
13811
|
_props$className = props.className,
|
|
13058
13812
|
className = _props$className === void 0 ? "" : _props$className;
|
|
13059
13813
|
var res = [];
|
|
13060
13814
|
for (var i = 1; i <= star; i++) {
|
|
13061
13815
|
res.push(/*#__PURE__*/React__default.createElement(FaStar, {
|
|
13062
|
-
color:
|
|
13816
|
+
color: color
|
|
13063
13817
|
}));
|
|
13064
|
-
if (i
|
|
13818
|
+
if (i >= 5) break;
|
|
13065
13819
|
}
|
|
13066
13820
|
var decimalPart = star % 1;
|
|
13067
13821
|
if (decimalPart && decimalPart >= 0.5) {
|
|
13068
13822
|
res.push(/*#__PURE__*/React__default.createElement(FaRegStarHalfStroke, {
|
|
13069
|
-
color:
|
|
13823
|
+
color: color
|
|
13070
13824
|
}));
|
|
13071
13825
|
}
|
|
13072
13826
|
for (var _i = res === null || res === void 0 ? void 0 : res.length; _i < 5; _i++) {
|
|
13073
13827
|
res.push(/*#__PURE__*/React__default.createElement(FaRegStar, {
|
|
13074
|
-
color:
|
|
13828
|
+
color: color
|
|
13075
13829
|
}));
|
|
13076
13830
|
}
|
|
13077
13831
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -13241,9 +13995,9 @@ var CustomerRating8 = function CustomerRating8(props) {
|
|
|
13241
13995
|
src: item === null || item === void 0 ? void 0 : item.avatar,
|
|
13242
13996
|
className: "w-40 h-40 rounded-full object-cover border-8 border-stroke"
|
|
13243
13997
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13244
|
-
className: "text-xl text-primary"
|
|
13998
|
+
className: "text-xl text-primary text-center"
|
|
13245
13999
|
}, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
|
|
13246
|
-
className: "text-gray3"
|
|
14000
|
+
className: "text-gray3 text-center"
|
|
13247
14001
|
}, item === null || item === void 0 ? void 0 : item.description), /*#__PURE__*/React__default.createElement("div", {
|
|
13248
14002
|
className: "flex gap-2 "
|
|
13249
14003
|
}, /*#__PURE__*/React__default.createElement(RiDoubleQuotesL, {
|
|
@@ -13258,6 +14012,58 @@ var CustomerRating8 = function CustomerRating8(props) {
|
|
|
13258
14012
|
}))));
|
|
13259
14013
|
};
|
|
13260
14014
|
|
|
14015
|
+
var CustomerRating9 = function CustomerRating9(props) {
|
|
14016
|
+
var _data$data;
|
|
14017
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
14018
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
14019
|
+
_props$data = props.data,
|
|
14020
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
14021
|
+
_props$SectionTitle = props.SectionTitle,
|
|
14022
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
14023
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
14024
|
+
className: SECTION_DEFAULT_CLASS
|
|
14025
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
14026
|
+
data: data,
|
|
14027
|
+
shopConfigStyle: shopConfigStyle
|
|
14028
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14029
|
+
className: "mt-12 grid grid-cols-1 lg:grid-cols-3 gap-6"
|
|
14030
|
+
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
|
|
14031
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
14032
|
+
key: index,
|
|
14033
|
+
className: "flex bg-primary pt-16 px-6 pb-6"
|
|
14034
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14035
|
+
className: "bg-background relative"
|
|
14036
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14037
|
+
className: "flex justify-between items-center pr-4 w-full absolute top-[-40px]"
|
|
14038
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14039
|
+
className: "text-[#A85A09]"
|
|
14040
|
+
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
14041
|
+
width: "39",
|
|
14042
|
+
height: "28",
|
|
14043
|
+
viewBox: "0 0 39 28",
|
|
14044
|
+
fill: "none",
|
|
14045
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
14046
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
14047
|
+
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",
|
|
14048
|
+
fill: "currentColor"
|
|
14049
|
+
}))), /*#__PURE__*/React__default.createElement("img", {
|
|
14050
|
+
src: item === null || item === void 0 ? void 0 : item.avatar,
|
|
14051
|
+
className: " w-20 object-cover h-20 rounded-full"
|
|
14052
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
14053
|
+
className: "p-4 flex flex-col gap-2"
|
|
14054
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14055
|
+
className: "text-lg text-textHeading md:text-2xl"
|
|
14056
|
+
}, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
|
|
14057
|
+
className: "w-full border border-secondary"
|
|
14058
|
+
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.content), /*#__PURE__*/React__default.createElement("div", {
|
|
14059
|
+
className: "ms-auto"
|
|
14060
|
+
}, /*#__PURE__*/React__default.createElement(RatingStar, {
|
|
14061
|
+
star: (item === null || item === void 0 ? void 0 : item.rate) || 5,
|
|
14062
|
+
color: "#A85A09"
|
|
14063
|
+
})))));
|
|
14064
|
+
}))));
|
|
14065
|
+
};
|
|
14066
|
+
|
|
13261
14067
|
var CustomerRating10 = function CustomerRating10(props) {
|
|
13262
14068
|
var _data$data;
|
|
13263
14069
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
@@ -13432,7 +14238,7 @@ var Gallery1 = function Gallery1(props) {
|
|
|
13432
14238
|
}));
|
|
13433
14239
|
};
|
|
13434
14240
|
|
|
13435
|
-
var
|
|
14241
|
+
var Gallery2 = function Gallery2(props) {
|
|
13436
14242
|
var _data$data, _data$data$slice, _data$data2, _data$data2$slice, _data$data3, _data$data3$slice;
|
|
13437
14243
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
13438
14244
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
@@ -13452,25 +14258,49 @@ var Gallery1$1 = function Gallery1(props) {
|
|
|
13452
14258
|
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$slice = _data$data.slice(0, 2)) === null || _data$data$slice === void 0 ? void 0 : _data$data$slice.map(function (item, index) {
|
|
13453
14259
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
13454
14260
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
13455
|
-
className: "w-full h-full object-cover rounded-
|
|
14261
|
+
className: "w-full h-full object-cover rounded-lg md:rounded-2xl"
|
|
13456
14262
|
});
|
|
13457
14263
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
13458
14264
|
className: "flex flex-col gap-2 md:gap-4"
|
|
13459
14265
|
}, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$slice = _data$data2.slice(2, 4)) === null || _data$data2$slice === void 0 ? void 0 : _data$data2$slice.map(function (item, index) {
|
|
13460
14266
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
13461
14267
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
13462
|
-
className: "w-full h-full object-cover rounded-
|
|
14268
|
+
className: "w-full h-full object-cover rounded-lg md:rounded-2xl odd:h-[130%]"
|
|
13463
14269
|
});
|
|
13464
14270
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
13465
14271
|
className: "flex flex-col gap-2 md:gap-4"
|
|
13466
14272
|
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$slice = _data$data3.slice(4, 6)) === null || _data$data3$slice === void 0 ? void 0 : _data$data3$slice.map(function (item, index) {
|
|
13467
14273
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
13468
14274
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
13469
|
-
className: "w-full h-full object-cover rounded-
|
|
14275
|
+
className: "w-full h-full object-cover rounded-lg md:rounded-2xl even:h-[130%]"
|
|
13470
14276
|
});
|
|
13471
14277
|
})))));
|
|
13472
14278
|
};
|
|
13473
14279
|
|
|
14280
|
+
var Gallery3 = function Gallery3(props) {
|
|
14281
|
+
var _data$data;
|
|
14282
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
14283
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
14284
|
+
_props$data = props.data,
|
|
14285
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
14286
|
+
_props$SectionTitle = props.SectionTitle,
|
|
14287
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
14288
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
14289
|
+
className: "" + SECTION_DEFAULT_CLASS
|
|
14290
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
14291
|
+
data: data,
|
|
14292
|
+
shopConfigStyle: shopConfigStyle
|
|
14293
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14294
|
+
className: "grid grid-cols-3 gap-2 md:gap-6 mt-6 md:mt-12"
|
|
14295
|
+
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
|
|
14296
|
+
return /*#__PURE__*/React__default.createElement("img", {
|
|
14297
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
14298
|
+
key: "iggdf-" + index,
|
|
14299
|
+
className: (index === 1 || index === 5 ? "col-span-2" : "") + " w-full h-full object-cover"
|
|
14300
|
+
});
|
|
14301
|
+
}))));
|
|
14302
|
+
};
|
|
14303
|
+
|
|
13474
14304
|
var PageTitle1 = function PageTitle1(props) {
|
|
13475
14305
|
var _sectionData$;
|
|
13476
14306
|
var data = props.data,
|
|
@@ -13501,13 +14331,13 @@ var PageTitle2 = function PageTitle2(props) {
|
|
|
13501
14331
|
backgroundImage: "url(" + (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage) + ")"
|
|
13502
14332
|
}
|
|
13503
14333
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13504
|
-
className: "absolute top-0 w-full h-full bg-black
|
|
14334
|
+
className: "absolute top-0 w-full h-full bg-black/60 z-0"
|
|
13505
14335
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13506
|
-
className: "relative w-full p-20 z-10 flex flex-col gap-6 items-center justify-center"
|
|
14336
|
+
className: "relative w-full p-10 lg:p-20 z-10 flex flex-col gap-6 items-center justify-center"
|
|
13507
14337
|
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
13508
14338
|
className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
13509
14339
|
}, 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", {
|
|
13510
|
-
className: "text-lg md:text-2xl text-white"
|
|
14340
|
+
className: "text-lg md:text-2xl text-white text-center"
|
|
13511
14341
|
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null));
|
|
13512
14342
|
};
|
|
13513
14343
|
|
|
@@ -13588,9 +14418,9 @@ var PageTitle3 = function PageTitle3(props) {
|
|
|
13588
14418
|
backgroundImage: "url(" + (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage) + ")"
|
|
13589
14419
|
}
|
|
13590
14420
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13591
|
-
className: "absolute top-0 w-full h-full bg-black
|
|
14421
|
+
className: "absolute top-0 w-full h-full bg-black/60 z-0"
|
|
13592
14422
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13593
|
-
className: "relative w-full p-20 z-10 flex flex-col items-center justify-center"
|
|
14423
|
+
className: "relative w-full pt-8 md:p-2 md:p-12 lg:p-20 z-10 flex flex-col items-center justify-center"
|
|
13594
14424
|
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
13595
14425
|
className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
13596
14426
|
}, 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) {
|
|
@@ -14063,6 +14893,10 @@ var FormCheckout = forwardRef(function (props, ref) {
|
|
|
14063
14893
|
})));
|
|
14064
14894
|
});
|
|
14065
14895
|
|
|
14896
|
+
var dayjs_min = createCommonjsModule(function (module, exports) {
|
|
14897
|
+
!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}));
|
|
14898
|
+
});
|
|
14899
|
+
|
|
14066
14900
|
var OrderControllerWithoutLogin = function OrderControllerWithoutLogin(props) {
|
|
14067
14901
|
_objectDestructuringEmpty(props);
|
|
14068
14902
|
var draftOrderWithoutLogin = function draftOrderWithoutLogin(shopId, dataOrder) {
|
|
@@ -14732,7 +15566,7 @@ var SearchBar6 = function SearchBar6(props) {
|
|
|
14732
15566
|
}
|
|
14733
15567
|
};
|
|
14734
15568
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
14735
|
-
className: "w-full flex flex-col justify-center px-3 md:px-6 gap-2 md:gap-4 lg:gap-6 items-center
|
|
15569
|
+
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",
|
|
14736
15570
|
style: {
|
|
14737
15571
|
background: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.srcImage) + ")",
|
|
14738
15572
|
backgroundPosition: "center",
|
|
@@ -14945,7 +15779,7 @@ var ShopHighlights8 = function ShopHighlights8(props) {
|
|
|
14945
15779
|
className: "flex flex-col h-full gap-3"
|
|
14946
15780
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
14947
15781
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
14948
|
-
className: "object-cover"
|
|
15782
|
+
className: "object-cover rounded-lg"
|
|
14949
15783
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14950
15784
|
className: "text-2xl text-textBody"
|
|
14951
15785
|
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -14954,6 +15788,89 @@ var ShopHighlights8 = function ShopHighlights8(props) {
|
|
|
14954
15788
|
})));
|
|
14955
15789
|
};
|
|
14956
15790
|
|
|
15791
|
+
var ShopHighlights9 = function ShopHighlights9(props) {
|
|
15792
|
+
var data = props.data,
|
|
15793
|
+
_props$Link = props.Link,
|
|
15794
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
15795
|
+
_props$SectionTitle = props.SectionTitle,
|
|
15796
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
15797
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
15798
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
15799
|
+
className: SECTION_CLASS + " flex flex-col gap-6 md:gap-10"
|
|
15800
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
15801
|
+
data: data
|
|
15802
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15803
|
+
className: "grid grid-cols-1 lg:grid-cols-2 gap-4 lg:gap-x-12 lg:gap-y-6"
|
|
15804
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
15805
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
15806
|
+
Link: Link,
|
|
15807
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
15808
|
+
key: "kdf-" + index
|
|
15809
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15810
|
+
className: "flex flex-col md:flex-row h-full gap-4"
|
|
15811
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
15812
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
15813
|
+
className: "object-cover rounded-lg w-full md:min-w-60 md:max-w-60"
|
|
15814
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15815
|
+
className: "flex flex-col gap-2"
|
|
15816
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15817
|
+
className: "text-lg font-semibold text-textHeading"
|
|
15818
|
+
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
|
|
15819
|
+
className: "w-1/3 border border-stroke"
|
|
15820
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15821
|
+
className: "flex-grow text-textBody leading-relaxed"
|
|
15822
|
+
}, item === null || item === void 0 ? void 0 : item.description))));
|
|
15823
|
+
})));
|
|
15824
|
+
};
|
|
15825
|
+
|
|
15826
|
+
var ShopHighlights10 = function ShopHighlights10(props) {
|
|
15827
|
+
var data = props.data,
|
|
15828
|
+
_props$Link = props.Link,
|
|
15829
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
15830
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
15831
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
15832
|
+
className: "pt-10"
|
|
15833
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15834
|
+
className: "relative overflow-hidden w-full"
|
|
15835
|
+
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
15836
|
+
viewBox: "0 0 1440 105",
|
|
15837
|
+
className: "text-[#FFE7CC] w-[105%]",
|
|
15838
|
+
fill: "none",
|
|
15839
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
15840
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
15841
|
+
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",
|
|
15842
|
+
fill: "currentColor"
|
|
15843
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
15844
|
+
className: "text-primary w-[105%] absolute top-2"
|
|
15845
|
+
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
15846
|
+
viewBox: "0 0 1440 104",
|
|
15847
|
+
fill: "none",
|
|
15848
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
15849
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
15850
|
+
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",
|
|
15851
|
+
fill: "currentColor"
|
|
15852
|
+
})))), /*#__PURE__*/React__default.createElement("div", {
|
|
15853
|
+
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"
|
|
15854
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
15855
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
15856
|
+
Link: Link,
|
|
15857
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
15858
|
+
key: "kdf-" + index
|
|
15859
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15860
|
+
className: "flex flex-col h-full gap-6"
|
|
15861
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15862
|
+
className: "flex flex-col gap-3 items-center"
|
|
15863
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15864
|
+
className: "text-2xl text-center text-textButton"
|
|
15865
|
+
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
|
|
15866
|
+
className: "flex-grow text-lg leading-relaxed text-center text-textSecondary"
|
|
15867
|
+
}, item === null || item === void 0 ? void 0 : item.description)), /*#__PURE__*/React__default.createElement("img", {
|
|
15868
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
15869
|
+
className: "h-56 lg:h-72 object-cover mt-auto border-4 border-secondary"
|
|
15870
|
+
})));
|
|
15871
|
+
})));
|
|
15872
|
+
};
|
|
15873
|
+
|
|
14957
15874
|
var VideoFull1 = function VideoFull1(props) {
|
|
14958
15875
|
var _data$data, _data$data$;
|
|
14959
15876
|
var shopConfigStyle = props.shopConfigStyle,
|
|
@@ -15041,11 +15958,6 @@ var NewsController = function NewsController(props) {
|
|
|
15041
15958
|
var _response$data2, _response$data2$data, _response$data3, _response$data3$data;
|
|
15042
15959
|
setNewsArticles(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$data = _response$data2.data) === null || _response$data2$data === void 0 ? void 0 : _response$data2$data.content);
|
|
15043
15960
|
setPage(response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : (_response$data3$data = _response$data3.data) === null || _response$data3$data === void 0 ? void 0 : _response$data3$data.totalElements);
|
|
15044
|
-
var url = new URL(window.location.href);
|
|
15045
|
-
if (/^(\/(tin-tuc-theo-danh-muc))\/[^/]+-\d+$/.test(url.pathname)) {
|
|
15046
|
-
url.pathname = url.pathname.replace(/\/[^/]+-\d+$/, "");
|
|
15047
|
-
window.history.replaceState({}, '', url.pathname + url.search);
|
|
15048
|
-
}
|
|
15049
15961
|
}
|
|
15050
15962
|
setLoading(false);
|
|
15051
15963
|
});
|
|
@@ -15279,7 +16191,8 @@ var News1 = function News1(props) {
|
|
|
15279
16191
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
15280
16192
|
_props$Link = props.Link,
|
|
15281
16193
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
15282
|
-
catId = props.catId
|
|
16194
|
+
_props$catId = props.catId,
|
|
16195
|
+
catId = _props$catId === void 0 ? "" : _props$catId;
|
|
15283
16196
|
var _useState = useState({
|
|
15284
16197
|
page: 0,
|
|
15285
16198
|
sort: "timeUpdate,DESC",
|
|
@@ -15319,6 +16232,18 @@ var News1 = function News1(props) {
|
|
|
15319
16232
|
setCategorySelected(category);
|
|
15320
16233
|
}
|
|
15321
16234
|
}, [newsCategories]);
|
|
16235
|
+
var handleSelectedCateogry = function handleSelectedCateogry(item) {
|
|
16236
|
+
if (catId) {
|
|
16237
|
+
var newUrl = getLinkNewsByCategory(item);
|
|
16238
|
+
window.history.replaceState(null, '', newUrl);
|
|
16239
|
+
}
|
|
16240
|
+
setCategorySelected(item);
|
|
16241
|
+
setParams(function (prev) {
|
|
16242
|
+
return _extends({}, prev, {
|
|
16243
|
+
catId: item === null || item === void 0 ? void 0 : item.catId
|
|
16244
|
+
});
|
|
16245
|
+
});
|
|
16246
|
+
};
|
|
15322
16247
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
15323
16248
|
className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 gap-6"
|
|
15324
16249
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -15339,12 +16264,7 @@ var News1 = function News1(props) {
|
|
|
15339
16264
|
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" : "") + " ",
|
|
15340
16265
|
key: "sdjfdh-" + index,
|
|
15341
16266
|
onClick: function onClick() {
|
|
15342
|
-
|
|
15343
|
-
setParams(function (prev) {
|
|
15344
|
-
return _extends({}, prev, {
|
|
15345
|
-
catId: item === null || item === void 0 ? void 0 : item.catId
|
|
15346
|
-
});
|
|
15347
|
-
});
|
|
16267
|
+
handleSelectedCateogry(item);
|
|
15348
16268
|
}
|
|
15349
16269
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15350
16270
|
className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
|
|
@@ -15398,12 +16318,7 @@ var News1 = function News1(props) {
|
|
|
15398
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" : "") + " ",
|
|
15399
16319
|
key: "sdjfdh-" + index,
|
|
15400
16320
|
onClick: function onClick() {
|
|
15401
|
-
|
|
15402
|
-
setParams(function (prev) {
|
|
15403
|
-
return _extends({}, prev, {
|
|
15404
|
-
catId: item === null || item === void 0 ? void 0 : item.catId
|
|
15405
|
-
});
|
|
15406
|
-
});
|
|
16321
|
+
handleSelectedCateogry(item);
|
|
15407
16322
|
}
|
|
15408
16323
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15409
16324
|
className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
|
|
@@ -15555,5 +16470,5 @@ var NewsDetail1 = function NewsDetail1(props) {
|
|
|
15555
16470
|
}))) : null);
|
|
15556
16471
|
};
|
|
15557
16472
|
|
|
15558
|
-
export { About1, About5, About6, Address1, Banner1, Banner2, Banner3, Banner7, BannerFull1, BannerFull2, Booking1, BookingForm6, BookingTable1, Breadcrumb1, Button, Carts1, Contact1, CustomerRating1, CustomerRating10, CustomerRating5, CustomerRating6, CustomerRating8, DateTimePicker, Employees1, Features2, Features3, Footer1, Footer7, Gallery1,
|
|
16473
|
+
export { About1, About5, About6, Address1, Banner1, Banner2, Banner3, Banner4, Banner7, BannerFull1, BannerFull2, Booking1, BookingForm6, BookingTable1, Breadcrumb1, Button, Carts1, Contact1, CustomerRating1, CustomerRating10, CustomerRating5, CustomerRating6, CustomerRating8, CustomerRating9, DateTimePicker, Employees1, Features2, Features3, Footer1, Footer7, Gallery1, Gallery2, Gallery3, Hero1, Hero10, Hero11, Hero12, Hero13, Hero14, Hero15, Hero16, Hero2, Hero5, Hero6, Input, InputPhoneNumber, Links1, ModalNotification, NavBar1, NavBar7, News1, NewsDetail1, NewsHighlight1, PageTitle1, PageTitle2, PageTitle3, Partner1, ProductCategory2, ProductDetail10, ProductDetail11, ProductHighlight1, ProductHot1, ProductHot3, ProductImage, ProductItem10, ProductItem11, ProductItem2, ProductItem3, ProductItem4, ProductItem5, ProductItem6, ProductItem7, ProductItem8, ProductItem9, ProductList5, ProductList7, ProductSale2, ProductSearch1, Products10, Products11, Products12, Products14, Products2, Products3, Products9, ProductsTop1, SearchBar2, SearchBar5, SearchBar6, SearchProduct1, SectionTitle1, SectionTitle2, SectionTitle3, SectionTitle4, SectionTitle5, Select$1 as Select, ServiceDetail1, ShopHighlights10, ShopHighlights2, ShopHighlights5, ShopHighlights6, ShopHighlights7, ShopHighlights8, ShopHighlights9, TextArea, TreatmentDetail1, TreatmentItem1, TreatmentsCategory7, TreatmentsList6, TreatmentsList7, VideoFull1 };
|
|
15559
16474
|
//# sourceMappingURL=index.modern.js.map
|