s-platform-landing-section 0.1.35 → 0.1.36-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1659 -729
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1647 -730
- 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: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#",
|
|
7676
|
+
target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopFacebookPage ? "_blank" : "_self"
|
|
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];
|
|
@@ -8223,6 +8337,7 @@ var NotFoundProduct = function NotFoundProduct(props) {
|
|
|
8223
8337
|
};
|
|
8224
8338
|
|
|
8225
8339
|
var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
8340
|
+
var _products$slice;
|
|
8226
8341
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
8227
8342
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
8228
8343
|
_props$data = props.data,
|
|
@@ -8235,7 +8350,8 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8235
8350
|
_shopConfigStyle$colo2 = _shopConfigStyle$colo.secondary,
|
|
8236
8351
|
secondary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2;
|
|
8237
8352
|
var _useState = useState({
|
|
8238
|
-
types: "1"
|
|
8353
|
+
types: "1,10",
|
|
8354
|
+
size: 12
|
|
8239
8355
|
}),
|
|
8240
8356
|
params = _useState[0],
|
|
8241
8357
|
setParams = _useState[1];
|
|
@@ -8252,15 +8368,27 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8252
8368
|
var _useState2 = useState(0),
|
|
8253
8369
|
selectedCategory = _useState2[0],
|
|
8254
8370
|
setSelectedCategory = _useState2[1];
|
|
8371
|
+
var _useState3 = useState(true),
|
|
8372
|
+
isGetMore = _useState3[0],
|
|
8373
|
+
setIsGetMore = _useState3[1];
|
|
8255
8374
|
useEffect(function () {
|
|
8256
8375
|
var newParams = _extends({}, params, {
|
|
8257
|
-
categoryId: selectedCategory
|
|
8376
|
+
categoryId: selectedCategory,
|
|
8377
|
+
size: 12
|
|
8258
8378
|
});
|
|
8259
8379
|
if (!selectedCategory) {
|
|
8260
8380
|
delete newParams.categoryId;
|
|
8261
8381
|
}
|
|
8262
8382
|
setParams(newParams);
|
|
8263
8383
|
}, [selectedCategory]);
|
|
8384
|
+
var handleGetMoreProducts = function handleGetMoreProducts() {
|
|
8385
|
+
setIsGetMore(false);
|
|
8386
|
+
setParams(function (prev) {
|
|
8387
|
+
return _extends({}, prev, {
|
|
8388
|
+
size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
|
|
8389
|
+
});
|
|
8390
|
+
});
|
|
8391
|
+
};
|
|
8264
8392
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
8265
8393
|
className: SECTION_DEFAULT_CLASS + " relative"
|
|
8266
8394
|
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
@@ -8277,15 +8405,16 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8277
8405
|
key: index,
|
|
8278
8406
|
className: "p-3 flex gap-3 shrink-0 cursor-pointer text-base " + (selectedCategory === item.categoryId ? "bg-primary text-textButton" : ""),
|
|
8279
8407
|
onClick: function onClick() {
|
|
8280
|
-
|
|
8408
|
+
setSelectedCategory(item.categoryId);
|
|
8409
|
+
setIsGetMore(true);
|
|
8281
8410
|
}
|
|
8282
8411
|
}, item === null || item === void 0 ? void 0 : item.cateName);
|
|
8283
8412
|
}
|
|
8284
|
-
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
8413
|
+
}), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
8285
8414
|
className: "flex w-full justify-center p-12"
|
|
8286
|
-
}, /*#__PURE__*/React__default.createElement(Loading, null)) : products
|
|
8415
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
8287
8416
|
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) {
|
|
8417
|
+
}, 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
8418
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
8290
8419
|
key: index,
|
|
8291
8420
|
Link: Link,
|
|
@@ -8295,7 +8424,13 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8295
8424
|
}));
|
|
8296
8425
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
|
|
8297
8426
|
text: "d\u1ECBch v\u1EE5"
|
|
8298
|
-
})
|
|
8427
|
+
}), !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", {
|
|
8428
|
+
className: "w-full flex justify-center mt-6"
|
|
8429
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
8430
|
+
label: "Xem thêm",
|
|
8431
|
+
onClick: handleGetMoreProducts,
|
|
8432
|
+
className: "" + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
|
|
8433
|
+
})) : null), /*#__PURE__*/React__default.createElement(Dash, {
|
|
8299
8434
|
color: secondary
|
|
8300
8435
|
}));
|
|
8301
8436
|
};
|
|
@@ -8313,7 +8448,7 @@ var TreatmentsList6 = function TreatmentsList6(props) {
|
|
|
8313
8448
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
8314
8449
|
var _useState = useState({
|
|
8315
8450
|
size: 12,
|
|
8316
|
-
types: "1"
|
|
8451
|
+
types: "1,10"
|
|
8317
8452
|
}),
|
|
8318
8453
|
params = _useState[0],
|
|
8319
8454
|
setParams = _useState[1];
|
|
@@ -8512,81 +8647,177 @@ var BookingController = function BookingController(props) {
|
|
|
8512
8647
|
};
|
|
8513
8648
|
};
|
|
8514
8649
|
|
|
8515
|
-
var
|
|
8650
|
+
var DateTimePicker = forwardRef(function (props, ref) {
|
|
8516
8651
|
var _props$label = props.label,
|
|
8517
8652
|
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
8653
|
_props$className = props.className,
|
|
8523
8654
|
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,
|
|
8655
|
+
_props$labelClassName = props.labelClassName,
|
|
8656
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8535
8657
|
_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);
|
|
8658
|
+
defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
|
|
8659
|
+
_props$time = props.time,
|
|
8660
|
+
time = _props$time === void 0 ? false : _props$time,
|
|
8661
|
+
rules = props.rules;
|
|
8662
|
+
var _useState = useState(defaultValue),
|
|
8663
|
+
value = _useState[0],
|
|
8664
|
+
_setValue = _useState[1];
|
|
8553
8665
|
var _useState2 = useState(""),
|
|
8554
8666
|
error = _useState2[0],
|
|
8555
8667
|
_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
|
-
|
|
8589
|
-
|
|
8668
|
+
var _className = "h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer " + className;
|
|
8669
|
+
var CustomInput = forwardRef(function (_ref, ref) {
|
|
8670
|
+
var value = _ref.value,
|
|
8671
|
+
onClick = _ref.onClick,
|
|
8672
|
+
className = _ref.className;
|
|
8673
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8674
|
+
className: className,
|
|
8675
|
+
onClick: onClick,
|
|
8676
|
+
ref: ref
|
|
8677
|
+
}, value);
|
|
8678
|
+
});
|
|
8679
|
+
useImperativeHandle(ref, function () {
|
|
8680
|
+
return {
|
|
8681
|
+
validateData: function validateData() {
|
|
8682
|
+
return _validateData();
|
|
8683
|
+
},
|
|
8684
|
+
setValue: function setValue(text) {
|
|
8685
|
+
return _setValue(text);
|
|
8686
|
+
},
|
|
8687
|
+
getValue: function getValue() {
|
|
8688
|
+
return value;
|
|
8689
|
+
},
|
|
8690
|
+
setError: function setError(err) {
|
|
8691
|
+
return _setError(err);
|
|
8692
|
+
}
|
|
8693
|
+
};
|
|
8694
|
+
});
|
|
8695
|
+
var _validateData = function _validateData() {
|
|
8696
|
+
var count = 0;
|
|
8697
|
+
rules === null || rules === void 0 ? void 0 : rules.forEach(function (e) {
|
|
8698
|
+
var _e$pattern, _e$validate;
|
|
8699
|
+
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
|
|
8700
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8701
|
+
count++;
|
|
8702
|
+
return false;
|
|
8703
|
+
} 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))) {
|
|
8704
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8705
|
+
count++;
|
|
8706
|
+
return false;
|
|
8707
|
+
} 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))) {
|
|
8708
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8709
|
+
count++;
|
|
8710
|
+
return false;
|
|
8711
|
+
}
|
|
8712
|
+
});
|
|
8713
|
+
if (count) {
|
|
8714
|
+
return false;
|
|
8715
|
+
} else {
|
|
8716
|
+
_setError('');
|
|
8717
|
+
return true;
|
|
8718
|
+
}
|
|
8719
|
+
};
|
|
8720
|
+
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
8721
|
+
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
8722
|
+
}));
|
|
8723
|
+
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
8724
|
+
className: "text-danger"
|
|
8725
|
+
}, " *") : null;
|
|
8726
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8727
|
+
className: "w-full"
|
|
8728
|
+
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
8729
|
+
className: "mb-1 " + labelClassName
|
|
8730
|
+
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
|
|
8731
|
+
selected: value,
|
|
8732
|
+
onChange: function onChange(date) {
|
|
8733
|
+
_setValue(date);
|
|
8734
|
+
},
|
|
8735
|
+
customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
|
|
8736
|
+
className: _className
|
|
8737
|
+
}),
|
|
8738
|
+
dateFormat: time ? "dd/MM/yyyy HH:mm" : "dd/MM/yyyy",
|
|
8739
|
+
showTimeSelect: time,
|
|
8740
|
+
timeIntervals: 15,
|
|
8741
|
+
wrapperClassName: "w-full"
|
|
8742
|
+
}), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
8743
|
+
className: "text-danger"
|
|
8744
|
+
}, error) : null);
|
|
8745
|
+
});
|
|
8746
|
+
|
|
8747
|
+
var Select = forwardRef(function (props, ref) {
|
|
8748
|
+
var _props$label = props.label,
|
|
8749
|
+
label = _props$label === void 0 ? "" : _props$label,
|
|
8750
|
+
_props$labelClassName = props.labelClassName,
|
|
8751
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8752
|
+
_props$placeholder = props.placeholder,
|
|
8753
|
+
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
8754
|
+
_props$className = props.className,
|
|
8755
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
8756
|
+
_props$optionClassNam = props.optionClassName,
|
|
8757
|
+
optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
|
|
8758
|
+
_props$wrapClassName = props.wrapClassName,
|
|
8759
|
+
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
8760
|
+
_props$selectClassNam = props.selectClassName,
|
|
8761
|
+
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
8762
|
+
_props$disabled = props.disabled,
|
|
8763
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
8764
|
+
_props$rules = props.rules,
|
|
8765
|
+
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
8766
|
+
options = props.options,
|
|
8767
|
+
_props$defaultValue = props.defaultValue,
|
|
8768
|
+
defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
|
|
8769
|
+
_props$isMulti = props.isMulti,
|
|
8770
|
+
isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
|
|
8771
|
+
_props$onClick = props.onClick,
|
|
8772
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
8773
|
+
_props$isButtonDelete = props.isButtonDelete,
|
|
8774
|
+
isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
|
|
8775
|
+
_props$funcDelete = props.funcDelete,
|
|
8776
|
+
funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
|
|
8777
|
+
_props$isSearch = props.isSearch,
|
|
8778
|
+
isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
|
|
8779
|
+
renderItem = props.renderItem;
|
|
8780
|
+
var _useState = useState(false),
|
|
8781
|
+
isOpen = _useState[0],
|
|
8782
|
+
setIsOpen = _useState[1];
|
|
8783
|
+
var selectRef = useRef(null);
|
|
8784
|
+
var _useState2 = useState(""),
|
|
8785
|
+
error = _useState2[0],
|
|
8786
|
+
_setError = _useState2[1];
|
|
8787
|
+
var _useState3 = useState(""),
|
|
8788
|
+
inputSearch = _useState3[0],
|
|
8789
|
+
setInputSearch = _useState3[1];
|
|
8790
|
+
var _useState4 = useState(defaultValue),
|
|
8791
|
+
value = _useState4[0],
|
|
8792
|
+
setValue = _useState4[1];
|
|
8793
|
+
var _useState5 = useState(options),
|
|
8794
|
+
listOptions = _useState5[0],
|
|
8795
|
+
setListOptions = _useState5[1];
|
|
8796
|
+
var dropdownRef = useRef(null);
|
|
8797
|
+
var _useState6 = useState('bottom'),
|
|
8798
|
+
dropdownPosition = _useState6[0],
|
|
8799
|
+
setDropdownPosition = _useState6[1];
|
|
8800
|
+
var inputRef = useRef(null);
|
|
8801
|
+
useEffect(function () {
|
|
8802
|
+
if (isMulti) setValue(defaultValue);
|
|
8803
|
+
}, [defaultValue]);
|
|
8804
|
+
useEffect(function () {
|
|
8805
|
+
setListOptions(options);
|
|
8806
|
+
if (!isMulti) setValue(defaultValue);
|
|
8807
|
+
}, [options]);
|
|
8808
|
+
useEffect(function () {
|
|
8809
|
+
var delayDebounceFn = setTimeout(function () {
|
|
8810
|
+
handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
|
|
8811
|
+
}, 600);
|
|
8812
|
+
return function () {
|
|
8813
|
+
return clearTimeout(delayDebounceFn);
|
|
8814
|
+
};
|
|
8815
|
+
}, [inputSearch]);
|
|
8816
|
+
useEffect(function () {
|
|
8817
|
+
var _inputRef$current;
|
|
8818
|
+
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
8819
|
+
var updateDropdownPosition = function updateDropdownPosition() {
|
|
8820
|
+
if (selectRef.current && dropdownRef.current) {
|
|
8590
8821
|
var _selectRef$current, _window;
|
|
8591
8822
|
var selectRect = selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.getBoundingClientRect();
|
|
8592
8823
|
var spaceBelow = ((_window = window) === null || _window === void 0 ? void 0 : _window.innerHeight) - (selectRect === null || selectRect === void 0 ? void 0 : selectRect.bottom);
|
|
@@ -8659,20 +8890,13 @@ var Select = forwardRef(function (props, ref) {
|
|
|
8659
8890
|
}
|
|
8660
8891
|
};
|
|
8661
8892
|
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
|
-
}
|
|
8893
|
+
var listFilterOptions = options.filter(function (item) {
|
|
8894
|
+
var _item$label;
|
|
8895
|
+
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());
|
|
8896
|
+
});
|
|
8897
|
+
setListOptions(listFilterOptions);
|
|
8671
8898
|
};
|
|
8672
8899
|
var handleToggleSelect = function handleToggleSelect() {
|
|
8673
|
-
if (!isOpen && handleSearchOption && typeof handleSearchOption === 'function') {
|
|
8674
|
-
handleSearchOption("");
|
|
8675
|
-
}
|
|
8676
8900
|
setIsOpen(!isOpen);
|
|
8677
8901
|
setInputSearch("");
|
|
8678
8902
|
setListOptions(options);
|
|
@@ -8771,103 +8995,6 @@ var Select = forwardRef(function (props, ref) {
|
|
|
8771
8995
|
});
|
|
8772
8996
|
var Select$1 = memo(Select);
|
|
8773
8997
|
|
|
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
8998
|
var InputPhoneNumber = forwardRef(function (props, ref) {
|
|
8872
8999
|
var _props$label = props.label,
|
|
8873
9000
|
label = _props$label === void 0 ? "" : _props$label,
|
|
@@ -9016,150 +9143,312 @@ var InputPhoneNumber = forwardRef(function (props, ref) {
|
|
|
9016
9143
|
}, error) : null);
|
|
9017
9144
|
});
|
|
9018
9145
|
|
|
9019
|
-
var
|
|
9020
|
-
|
|
9021
|
-
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
|
|
9031
|
-
|
|
9032
|
-
|
|
9033
|
-
|
|
9146
|
+
var Select$2 = forwardRef(function (props, ref) {
|
|
9147
|
+
var _props$label = props.label,
|
|
9148
|
+
label = _props$label === void 0 ? "" : _props$label,
|
|
9149
|
+
_props$labelClassName = props.labelClassName,
|
|
9150
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
9151
|
+
_props$placeholder = props.placeholder,
|
|
9152
|
+
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
9153
|
+
_props$className = props.className,
|
|
9154
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
9155
|
+
_props$optionClassNam = props.optionClassName,
|
|
9156
|
+
optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
|
|
9157
|
+
_props$wrapClassName = props.wrapClassName,
|
|
9158
|
+
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
9159
|
+
_props$selectClassNam = props.selectClassName,
|
|
9160
|
+
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
9161
|
+
_props$disabled = props.disabled,
|
|
9162
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
9163
|
+
_props$rules = props.rules,
|
|
9164
|
+
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
9165
|
+
options = props.options,
|
|
9166
|
+
_props$defaultValue = props.defaultValue,
|
|
9167
|
+
defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
|
|
9168
|
+
handleSearchOption = props.handleSearchOption,
|
|
9169
|
+
_props$isMulti = props.isMulti,
|
|
9170
|
+
isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
|
|
9171
|
+
_props$onClick = props.onClick,
|
|
9172
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
9173
|
+
_props$isButtonDelete = props.isButtonDelete,
|
|
9174
|
+
isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
|
|
9175
|
+
_props$funcDelete = props.funcDelete,
|
|
9176
|
+
funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
|
|
9177
|
+
setParams = props.setParams,
|
|
9178
|
+
_props$isSearch = props.isSearch,
|
|
9179
|
+
isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
|
|
9180
|
+
renderItem = props.renderItem;
|
|
9181
|
+
var _useState = useState(false),
|
|
9182
|
+
isOpen = _useState[0],
|
|
9183
|
+
setIsOpen = _useState[1];
|
|
9184
|
+
var selectRef = useRef(null);
|
|
9185
|
+
var _useState2 = useState(""),
|
|
9186
|
+
error = _useState2[0],
|
|
9187
|
+
_setError = _useState2[1];
|
|
9188
|
+
var _useState3 = useState(""),
|
|
9189
|
+
inputSearch = _useState3[0],
|
|
9190
|
+
setInputSearch = _useState3[1];
|
|
9191
|
+
var _useState4 = useState(defaultValue),
|
|
9192
|
+
value = _useState4[0],
|
|
9193
|
+
setValue = _useState4[1];
|
|
9194
|
+
var _useState5 = useState(options),
|
|
9195
|
+
listOptions = _useState5[0],
|
|
9196
|
+
setListOptions = _useState5[1];
|
|
9197
|
+
var dropdownRef = useRef(null);
|
|
9198
|
+
var _useState6 = useState('bottom'),
|
|
9199
|
+
dropdownPosition = _useState6[0],
|
|
9200
|
+
setDropdownPosition = _useState6[1];
|
|
9201
|
+
var inputRef = useRef(null);
|
|
9202
|
+
var _useState7 = useState(12),
|
|
9203
|
+
nextTrigger = _useState7[0],
|
|
9204
|
+
setNextTrigger = _useState7[1];
|
|
9205
|
+
var optionRef = useRef(null);
|
|
9206
|
+
useEffect(function () {
|
|
9207
|
+
if (isMulti) setValue(defaultValue);
|
|
9208
|
+
}, [defaultValue]);
|
|
9209
|
+
useEffect(function () {
|
|
9210
|
+
setListOptions(options);
|
|
9211
|
+
if (!isMulti) setValue(defaultValue);
|
|
9212
|
+
}, [options]);
|
|
9213
|
+
useEffect(function () {
|
|
9214
|
+
if (typeof setParams !== 'function') return;
|
|
9215
|
+
var handleScroll = function handleScroll() {
|
|
9216
|
+
if (!optionRef.current) return;
|
|
9217
|
+
var children = optionRef.current.querySelectorAll('div.option');
|
|
9218
|
+
var parentRect = optionRef.current.getBoundingClientRect();
|
|
9219
|
+
children.forEach(function (child, index) {
|
|
9220
|
+
var rect = child.getBoundingClientRect();
|
|
9221
|
+
if (rect.top >= parentRect.top && rect.bottom <= parentRect.bottom) {
|
|
9222
|
+
if (index === nextTrigger) {
|
|
9223
|
+
setParams === null || setParams === void 0 ? void 0 : setParams(function (prev) {
|
|
9224
|
+
return _extends({}, prev, {
|
|
9225
|
+
size: (prev === null || prev === void 0 ? void 0 : prev.size) + 8
|
|
9226
|
+
});
|
|
9227
|
+
});
|
|
9228
|
+
setNextTrigger(function (prev) {
|
|
9229
|
+
return prev + 8;
|
|
9230
|
+
});
|
|
9231
|
+
}
|
|
9232
|
+
}
|
|
9233
|
+
});
|
|
9234
|
+
};
|
|
9235
|
+
if (optionRef.current) {
|
|
9236
|
+
optionRef.current.addEventListener('scroll', handleScroll);
|
|
9034
9237
|
}
|
|
9035
|
-
return
|
|
9036
|
-
|
|
9037
|
-
|
|
9038
|
-
|
|
9039
|
-
/* eslint-disable no-var */
|
|
9040
|
-
var defaultConverter = {
|
|
9041
|
-
read: function (value) {
|
|
9042
|
-
if (value[0] === '"') {
|
|
9043
|
-
value = value.slice(1, -1);
|
|
9238
|
+
return function () {
|
|
9239
|
+
if (optionRef.current) {
|
|
9240
|
+
optionRef.current.removeEventListener('scroll', handleScroll);
|
|
9044
9241
|
}
|
|
9045
|
-
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
|
|
9049
|
-
|
|
9050
|
-
|
|
9051
|
-
|
|
9052
|
-
}
|
|
9053
|
-
};
|
|
9054
|
-
/* eslint-enable no-var */
|
|
9055
|
-
|
|
9056
|
-
/* eslint-disable no-var */
|
|
9057
|
-
|
|
9058
|
-
function init (converter, defaultAttributes) {
|
|
9059
|
-
function set (name, value, attributes) {
|
|
9060
|
-
if (typeof document === 'undefined') {
|
|
9061
|
-
return
|
|
9242
|
+
};
|
|
9243
|
+
}, [listOptions, nextTrigger]);
|
|
9244
|
+
useEffect(function () {
|
|
9245
|
+
var delayDebounceFn = setTimeout(function () {
|
|
9246
|
+
handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
|
|
9247
|
+
if (optionRef.current) {
|
|
9248
|
+
optionRef.current.scrollTop = 0;
|
|
9062
9249
|
}
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9250
|
+
}, 600);
|
|
9251
|
+
return function () {
|
|
9252
|
+
return clearTimeout(delayDebounceFn);
|
|
9253
|
+
};
|
|
9254
|
+
}, [inputSearch]);
|
|
9255
|
+
useEffect(function () {
|
|
9256
|
+
var _inputRef$current;
|
|
9257
|
+
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
9258
|
+
var updateDropdownPosition = function updateDropdownPosition() {
|
|
9259
|
+
if (selectRef.current && dropdownRef.current) {
|
|
9260
|
+
var _selectRef$current, _window;
|
|
9261
|
+
var selectRect = selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.getBoundingClientRect();
|
|
9262
|
+
var spaceBelow = ((_window = window) === null || _window === void 0 ? void 0 : _window.innerHeight) - (selectRect === null || selectRect === void 0 ? void 0 : selectRect.bottom);
|
|
9263
|
+
var spaceAbove = selectRect === null || selectRect === void 0 ? void 0 : selectRect.top;
|
|
9264
|
+
if (spaceBelow < spaceAbove) {
|
|
9265
|
+
setDropdownPosition('top');
|
|
9266
|
+
} else {
|
|
9267
|
+
setDropdownPosition('bottom');
|
|
9268
|
+
}
|
|
9068
9269
|
}
|
|
9069
|
-
|
|
9070
|
-
|
|
9270
|
+
};
|
|
9271
|
+
if (isOpen) {
|
|
9272
|
+
updateDropdownPosition();
|
|
9273
|
+
window.addEventListener('resize', updateDropdownPosition);
|
|
9274
|
+
}
|
|
9275
|
+
return function () {
|
|
9276
|
+
window.removeEventListener('resize', updateDropdownPosition);
|
|
9277
|
+
};
|
|
9278
|
+
}, [isOpen]);
|
|
9279
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
9280
|
+
var _selectRef$current2;
|
|
9281
|
+
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))) {
|
|
9282
|
+
setIsOpen(false);
|
|
9283
|
+
setInputSearch("");
|
|
9284
|
+
setListOptions(options);
|
|
9285
|
+
}
|
|
9286
|
+
};
|
|
9287
|
+
useEffect(function () {
|
|
9288
|
+
document.addEventListener('click', handleClickOutside);
|
|
9289
|
+
return function () {
|
|
9290
|
+
document.removeEventListener('click', handleClickOutside);
|
|
9291
|
+
};
|
|
9292
|
+
}, []);
|
|
9293
|
+
useImperativeHandle(ref, function () {
|
|
9294
|
+
return {
|
|
9295
|
+
validateData: function validateData() {
|
|
9296
|
+
return _validateData();
|
|
9297
|
+
},
|
|
9298
|
+
setError: function setError(err) {
|
|
9299
|
+
return _setError(err);
|
|
9071
9300
|
}
|
|
9072
|
-
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
// Consume the characters of the unparsed-attributes up to,
|
|
9094
|
-
// not including, the first %x3B (";") character.
|
|
9095
|
-
// ...
|
|
9096
|
-
stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
|
|
9301
|
+
};
|
|
9302
|
+
});
|
|
9303
|
+
var isEmpty = function isEmpty(value) {
|
|
9304
|
+
var _Object$keys;
|
|
9305
|
+
if (Array !== null && Array !== void 0 && Array.isArray(value)) return (value === null || value === void 0 ? void 0 : value.length) <= 0;
|
|
9306
|
+
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;
|
|
9307
|
+
return false;
|
|
9308
|
+
};
|
|
9309
|
+
var _validateData = function _validateData() {
|
|
9310
|
+
var count = 0;
|
|
9311
|
+
for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
|
|
9312
|
+
var _e$pattern;
|
|
9313
|
+
var e = _step.value;
|
|
9314
|
+
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && isEmpty(value)) {
|
|
9315
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
9316
|
+
count++;
|
|
9317
|
+
break;
|
|
9318
|
+
} 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))) {
|
|
9319
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
9320
|
+
count++;
|
|
9321
|
+
break;
|
|
9097
9322
|
}
|
|
9098
|
-
|
|
9099
|
-
return (document.cookie =
|
|
9100
|
-
name + '=' + converter.write(value, name) + stringifiedAttributes)
|
|
9101
9323
|
}
|
|
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
|
-
|
|
9324
|
+
if (count) {
|
|
9325
|
+
return false;
|
|
9326
|
+
} else {
|
|
9327
|
+
_setError('');
|
|
9328
|
+
return true;
|
|
9329
|
+
}
|
|
9330
|
+
};
|
|
9331
|
+
var handleSearch = function handleSearch(searchValue) {
|
|
9332
|
+
if (handleSearchOption && typeof handleSearchOption === 'function') {
|
|
9333
|
+
handleSearchOption === null || handleSearchOption === void 0 ? void 0 : handleSearchOption(searchValue);
|
|
9334
|
+
setNextTrigger(12);
|
|
9335
|
+
} else {
|
|
9336
|
+
var listFilterOptions = options.filter(function (item) {
|
|
9337
|
+
var _item$label;
|
|
9338
|
+
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());
|
|
9339
|
+
});
|
|
9340
|
+
setListOptions(listFilterOptions);
|
|
9341
|
+
}
|
|
9342
|
+
};
|
|
9343
|
+
var handleToggleSelect = function handleToggleSelect() {
|
|
9344
|
+
setIsOpen(!isOpen);
|
|
9345
|
+
setInputSearch("");
|
|
9346
|
+
setListOptions(options);
|
|
9347
|
+
if (typeof setParams === 'function') {
|
|
9348
|
+
setParams === null || setParams === void 0 ? void 0 : setParams(function (prev) {
|
|
9349
|
+
return _extends({}, prev, {
|
|
9350
|
+
size: 16
|
|
9351
|
+
});
|
|
9352
|
+
});
|
|
9353
|
+
setNextTrigger(12);
|
|
9354
|
+
}
|
|
9355
|
+
};
|
|
9356
|
+
var checkSelection = function checkSelection(valueId) {
|
|
9357
|
+
if (isMulti) return value === null || value === void 0 ? void 0 : value.some(function (item) {
|
|
9358
|
+
return (item === null || item === void 0 ? void 0 : item.value) === valueId;
|
|
9359
|
+
});
|
|
9360
|
+
return (value === null || value === void 0 ? void 0 : value.value) == valueId;
|
|
9361
|
+
};
|
|
9362
|
+
var handleSelection = function handleSelection(item, e) {
|
|
9363
|
+
e.stopPropagation();
|
|
9364
|
+
if (!isMulti) {
|
|
9365
|
+
setValue(item);
|
|
9366
|
+
setIsOpen(false);
|
|
9367
|
+
}
|
|
9368
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(item);
|
|
9369
|
+
};
|
|
9370
|
+
var handleDeleteSelection = function handleDeleteSelection(e, item) {
|
|
9371
|
+
e.stopPropagation();
|
|
9372
|
+
if (isMulti === false) setValue({});
|
|
9373
|
+
funcDelete === null || funcDelete === void 0 ? void 0 : funcDelete(item);
|
|
9374
|
+
};
|
|
9375
|
+
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
9376
|
+
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
9377
|
+
}));
|
|
9378
|
+
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
9379
|
+
className: "text-danger"
|
|
9380
|
+
}, " *") : null;
|
|
9381
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9382
|
+
ref: selectRef,
|
|
9383
|
+
className: "relative " + wrapClassName
|
|
9384
|
+
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
9385
|
+
className: "mb-1 " + labelClassName
|
|
9386
|
+
}, label, " ", labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
9387
|
+
className: "flex flex-col gap-2 rounded-lg w-full bg-white " + (disabled ? "!bg-gray6" : "") + " border border-stroke " + className
|
|
9388
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
9389
|
+
className: " w-full h-10 bg-transparent flex justify-between items-center px-3 py-2 " + selectClassName,
|
|
9390
|
+
onClick: handleToggleSelect,
|
|
9391
|
+
disabled: disabled
|
|
9392
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9393
|
+
className: "flex justify-between items-center w-full"
|
|
9394
|
+
}, isEmpty(value) || isMulti ? /*#__PURE__*/React__default.createElement("div", {
|
|
9395
|
+
className: "text-gray3 line-clamp-1"
|
|
9396
|
+
}, placeholder) : /*#__PURE__*/React__default.createElement("div", {
|
|
9397
|
+
className: "w-full text-start pointer-events-none line-clamp-1",
|
|
9398
|
+
dangerouslySetInnerHTML: {
|
|
9399
|
+
__html: value === null || value === void 0 ? void 0 : value.label
|
|
9400
|
+
}
|
|
9401
|
+
}), isButtonDelete && !isEmpty(value) ? /*#__PURE__*/React__default.createElement("div", {
|
|
9402
|
+
onClick: function onClick(e) {
|
|
9403
|
+
handleDeleteSelection(e, value);
|
|
9127
9404
|
}
|
|
9128
|
-
|
|
9129
|
-
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9405
|
+
}, /*#__PURE__*/React__default.createElement(RxCross2, null)) : /*#__PURE__*/React__default.createElement("div", {
|
|
9406
|
+
className: "ms-1"
|
|
9407
|
+
}, /*#__PURE__*/React__default.createElement(FaAngleUp, {
|
|
9408
|
+
className: "text-xs"
|
|
9409
|
+
}), /*#__PURE__*/React__default.createElement(FaAngleDown, {
|
|
9410
|
+
className: "text-xs"
|
|
9411
|
+
})))), isOpen ? /*#__PURE__*/React__default.createElement("div", {
|
|
9412
|
+
ref: dropdownRef,
|
|
9413
|
+
style: {
|
|
9414
|
+
background: "#FFFFFF"
|
|
9415
|
+
},
|
|
9416
|
+
className: "absolute p-1 my-2 rounded-2xl w-full z-40 border " + (dropdownPosition === 'top' ? 'bottom-full mb-2' : 'top-full mt-2') + " " + optionClassName
|
|
9417
|
+
}, /*#__PURE__*/React__default.createElement("div", null, isSearch ? /*#__PURE__*/React__default.createElement("div", {
|
|
9418
|
+
className: "px-3 flex items-center border-b-[1px]"
|
|
9419
|
+
}, /*#__PURE__*/React__default.createElement(LuSearch, {
|
|
9420
|
+
className: "inline text-gray3 me-2"
|
|
9421
|
+
}), /*#__PURE__*/React__default.createElement("input", {
|
|
9422
|
+
type: "text",
|
|
9423
|
+
ref: inputRef,
|
|
9424
|
+
className: "py-2 w-full border-0 focus:outline-none focus:ring-0",
|
|
9425
|
+
placeholder: "T\xECm ki\u1EBFm",
|
|
9426
|
+
value: inputSearch,
|
|
9427
|
+
onChange: function onChange(e) {
|
|
9428
|
+
setInputSearch(e.target.value);
|
|
9429
|
+
}
|
|
9430
|
+
})) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
9431
|
+
className: "overflow-y-auto max-h-72 scroll-container",
|
|
9432
|
+
ref: optionRef
|
|
9433
|
+
}, (listOptions === null || listOptions === void 0 ? void 0 : listOptions.length) > 0 ? listOptions === null || listOptions === void 0 ? void 0 : listOptions.map(function (item, index) {
|
|
9434
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9435
|
+
key: "gjfd-" + index,
|
|
9436
|
+
className: "option px-2 cursor-default py-1.5 flex items-center hover:bg-gray-100 rounded-lg",
|
|
9437
|
+
onClick: function onClick(e) {
|
|
9438
|
+
handleSelection(item, e);
|
|
9152
9439
|
}
|
|
9153
|
-
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9440
|
+
}, /*#__PURE__*/React__default.createElement(IoMdCheckmark, {
|
|
9441
|
+
className: (checkSelection(item === null || item === void 0 ? void 0 : item.value) ? "" : 'invisible') + " inline me-2 w-4"
|
|
9442
|
+
}), renderItem ? renderItem(item) : /*#__PURE__*/React__default.createElement("div", {
|
|
9443
|
+
className: " whitespace-nowrap line-clamp-1"
|
|
9444
|
+
}, item === null || item === void 0 ? void 0 : item.label));
|
|
9445
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
9446
|
+
className: "py-6 text-center"
|
|
9447
|
+
}, "Kh\xF4ng c\xF3 k\u1EBFt qu\u1EA3")))) : null), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
9448
|
+
className: "text-danger"
|
|
9449
|
+
}, error) : null);
|
|
9162
9450
|
});
|
|
9451
|
+
var SelectDynamic = memo(Select$2);
|
|
9163
9452
|
|
|
9164
9453
|
var BookingForm = function BookingForm(props) {
|
|
9165
9454
|
var _props$shopConfig = props.shopConfig,
|
|
@@ -9176,7 +9465,8 @@ var BookingForm = function BookingForm(props) {
|
|
|
9176
9465
|
isModalBooking = _props$isModalBooking === void 0 ? false : _props$isModalBooking;
|
|
9177
9466
|
var _useState = useState(false);
|
|
9178
9467
|
var _useState2 = useState({
|
|
9179
|
-
types: "1,10"
|
|
9468
|
+
types: "1,10",
|
|
9469
|
+
size: 16
|
|
9180
9470
|
}),
|
|
9181
9471
|
productsParams = _useState2[0],
|
|
9182
9472
|
setProductsParams = _useState2[1];
|
|
@@ -9350,6 +9640,7 @@ var BookingForm = function BookingForm(props) {
|
|
|
9350
9640
|
var handleSearchProducts = function handleSearchProducts(value) {
|
|
9351
9641
|
setProductsParams(function (prev) {
|
|
9352
9642
|
return _extends({}, prev, {
|
|
9643
|
+
size: 16,
|
|
9353
9644
|
productName: value
|
|
9354
9645
|
});
|
|
9355
9646
|
});
|
|
@@ -9386,7 +9677,8 @@ var BookingForm = function BookingForm(props) {
|
|
|
9386
9677
|
className: "grid grid-cols-1 gap-4"
|
|
9387
9678
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9388
9679
|
className: "relative"
|
|
9389
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
9680
|
+
}, /*#__PURE__*/React__default.createElement(SelectDynamic, {
|
|
9681
|
+
setParams: setProductsParams,
|
|
9390
9682
|
ref: inputSelectedRef,
|
|
9391
9683
|
isMulti: true,
|
|
9392
9684
|
defaultValue: listProductSelected,
|
|
@@ -9502,6 +9794,7 @@ var BookingForm = function BookingForm(props) {
|
|
|
9502
9794
|
className: "text-center"
|
|
9503
9795
|
}, "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
9796
|
};
|
|
9797
|
+
var BookingForm$1 = memo(BookingForm);
|
|
9505
9798
|
|
|
9506
9799
|
var TreatmentsList7 = function TreatmentsList7(props) {
|
|
9507
9800
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
@@ -9622,7 +9915,7 @@ var TreatmentsList7 = function TreatmentsList7(props) {
|
|
|
9622
9915
|
color: secondary
|
|
9623
9916
|
}), isOpenModal ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
9624
9917
|
onClose: handleCloseModal
|
|
9625
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
9918
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
9626
9919
|
className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh] !bg-bgSecondary",
|
|
9627
9920
|
onCloseFormBooking: handleCloseModal,
|
|
9628
9921
|
defaultValue: dataBooking,
|
|
@@ -9817,7 +10110,7 @@ var ServiceDetail1 = function ServiceDetail1(props) {
|
|
|
9817
10110
|
className: "text-gray3 mt-2"
|
|
9818
10111
|
}, "Kh\xF4ng c\xF3 th\xF4ng tin"))), isBooking ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
9819
10112
|
onClose: handleCloseModal
|
|
9820
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
10113
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
9821
10114
|
isModalBooking: isBooking,
|
|
9822
10115
|
className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh]",
|
|
9823
10116
|
onCloseFormBooking: handleCloseModal,
|
|
@@ -9952,7 +10245,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
|
|
|
9952
10245
|
className: "text-gray3 mt-2"
|
|
9953
10246
|
}, "Kh\xF4ng c\xF3 th\xF4ng tin"))), isBooking ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
9954
10247
|
onClose: handleCloseModal
|
|
9955
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
10248
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
9956
10249
|
isModalBooking: isBooking,
|
|
9957
10250
|
className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh]",
|
|
9958
10251
|
onCloseFormBooking: handleCloseModal,
|
|
@@ -10106,100 +10399,272 @@ var ProductItem5 = function ProductItem5(props) {
|
|
|
10106
10399
|
}))));
|
|
10107
10400
|
};
|
|
10108
10401
|
|
|
10109
|
-
var ProductItem6 = function ProductItem6(props) {
|
|
10402
|
+
var ProductItem6 = function ProductItem6(props) {
|
|
10403
|
+
var _product$productInfo;
|
|
10404
|
+
var product = props.product,
|
|
10405
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10406
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10407
|
+
_props$Link = props.Link,
|
|
10408
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10409
|
+
_props$className = props.className,
|
|
10410
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
10411
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10412
|
+
Link: Link,
|
|
10413
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10414
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10415
|
+
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
|
|
10416
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10417
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10418
|
+
className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
|
|
10419
|
+
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10420
|
+
className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
|
|
10421
|
+
}, 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, {
|
|
10422
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10423
|
+
className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10424
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10425
|
+
className: "flex pt-4 gap-2 md:gap-4 border-t items-center"
|
|
10426
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10427
|
+
className: "p-2 md:p-[10px] text-primary rounded-lg hover:bg-primary hover:text-textButton hover:opacity-80 border border-primary h-full w-auto flex items-center justify-center " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) + " "
|
|
10428
|
+
}, /*#__PURE__*/React__default.createElement(FiShoppingCart, null)), /*#__PURE__*/React__default.createElement(Button, {
|
|
10429
|
+
label: "Mua ngay",
|
|
10430
|
+
className: "w-full",
|
|
10431
|
+
shopConfigStyle: shopConfigStyle
|
|
10432
|
+
}))));
|
|
10433
|
+
};
|
|
10434
|
+
|
|
10435
|
+
var ProductItem7 = function ProductItem7(props) {
|
|
10436
|
+
var _product$productInfo, _product$productInfo2, _product$productInfo3, _product$productInfo4, _product$productInfo5, _product$productInfo6, _product$productInfo7, _product$productInfo8, _product$productInfo9, _product$productInfo10, _product$productInfo11;
|
|
10437
|
+
var product = props.product,
|
|
10438
|
+
_props$Link = props.Link,
|
|
10439
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10440
|
+
_props$className = props.className,
|
|
10441
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
10442
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10443
|
+
Link: Link,
|
|
10444
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10445
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10446
|
+
className: "w-full bg-bgSecondary relative p-2 md:p-4 rounded-2xl " + className
|
|
10447
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10448
|
+
className: "relative"
|
|
10449
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10450
|
+
className: "px-2 md:px-4 xl:px-6"
|
|
10451
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10452
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10453
|
+
className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl"
|
|
10454
|
+
})), (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", {
|
|
10455
|
+
className: "absolute top-4 left-0 py-1 px-4 rounded-r-2xl bg-danger text-textButton font-semibold shadow-lg"
|
|
10456
|
+
}, "-", 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", {
|
|
10457
|
+
className: "flex flex-col mt-4 gap-4 items-start"
|
|
10458
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10459
|
+
className: "line-clamp-2 min-h-12 w-full overflow-hidden text-ellipsis"
|
|
10460
|
+
}, 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, {
|
|
10461
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10462
|
+
className: "text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10463
|
+
})), 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", {
|
|
10464
|
+
className: "absolute top-5 left-0 font-semibold px-3 py-1 bg-danger text-textButton rounded-r-2xl shadow-lg v-max"
|
|
10465
|
+
}, 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));
|
|
10466
|
+
};
|
|
10467
|
+
|
|
10468
|
+
var ProductItem8 = function ProductItem8(props) {
|
|
10469
|
+
var _product$productInfo;
|
|
10470
|
+
var product = props.product,
|
|
10471
|
+
_props$Link = props.Link,
|
|
10472
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10473
|
+
_props$className = props.className,
|
|
10474
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
10475
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10476
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
10477
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10478
|
+
Link: Link,
|
|
10479
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10480
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10481
|
+
className: "text-center rounded relative group " + className
|
|
10482
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10483
|
+
className: "relative "
|
|
10484
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10485
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10486
|
+
className: "h-[340px] md:h-[400px] xl:h-[460px] rounded"
|
|
10487
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10488
|
+
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 "
|
|
10489
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10490
|
+
className: "text-lg text-textButton"
|
|
10491
|
+
}, 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, {
|
|
10492
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10493
|
+
className: !(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "",
|
|
10494
|
+
priceClassName: "text-textButton !font-normal",
|
|
10495
|
+
priceBeforeDiscountClassName: "text-textButton !font-normal"
|
|
10496
|
+
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
10497
|
+
label: "Th\xEAm v\xE0o gi\u1ECF",
|
|
10498
|
+
shopConfigStyle: shopConfigStyle,
|
|
10499
|
+
className: "hidden group-hover:block transition-all duration-300 !font-normal"
|
|
10500
|
+
})))));
|
|
10501
|
+
};
|
|
10502
|
+
|
|
10503
|
+
var ProductItem9 = function ProductItem9(props) {
|
|
10504
|
+
var _product$productInfo;
|
|
10505
|
+
var product = props.product,
|
|
10506
|
+
_props$Link = props.Link,
|
|
10507
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10508
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10509
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10510
|
+
_props$className = props.className,
|
|
10511
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
10512
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10513
|
+
Link: Link,
|
|
10514
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10515
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10516
|
+
className: "w-full flex flex-col gap-4 rounded-2xl p-2 md:p-6 bg-bgSecondary " + className
|
|
10517
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10518
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10519
|
+
className: "hover:scale-105 transition duration-300 ease-in-out w-full h-44 md:h-56 xl:h-60"
|
|
10520
|
+
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10521
|
+
className: "text-start line-clamp-2 font-medium min-h-12 w-full overflow-hidden text-ellipsis mb-2"
|
|
10522
|
+
}, 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, {
|
|
10523
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10524
|
+
priceClassName: "!text-secondary !text-base !font-normal",
|
|
10525
|
+
className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10526
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10527
|
+
className: "flex gap-2 md:gap-4 "
|
|
10528
|
+
}, /*#__PURE__*/React__default.createElement(AiOutlineShoppingCart, {
|
|
10529
|
+
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)
|
|
10530
|
+
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
10531
|
+
label: "Mua ngay",
|
|
10532
|
+
className: "w-full",
|
|
10533
|
+
shopConfigStyle: shopConfigStyle
|
|
10534
|
+
}))));
|
|
10535
|
+
};
|
|
10536
|
+
|
|
10537
|
+
var ProductItem10 = function ProductItem10(props) {
|
|
10538
|
+
var _product$productInfo;
|
|
10539
|
+
var product = props.product;
|
|
10540
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10541
|
+
className: "flex border-b border-stroke items-center py-4"
|
|
10542
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10543
|
+
className: "mb-auto"
|
|
10544
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10545
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10546
|
+
className: "!w-24 rounded-lg"
|
|
10547
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10548
|
+
className: "ml-4 flex-1"
|
|
10549
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10550
|
+
className: "text-xl"
|
|
10551
|
+
}, 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", {
|
|
10552
|
+
className: "mt-2"
|
|
10553
|
+
}, /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10554
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10555
|
+
priceClassName: "!font-normal text-lg"
|
|
10556
|
+
})) : null));
|
|
10557
|
+
};
|
|
10558
|
+
|
|
10559
|
+
function getMinMax$1(array, field) {
|
|
10560
|
+
if (!(array !== null && array !== void 0 && array.length) || !array[0].hasOwnProperty(field)) {
|
|
10561
|
+
return null;
|
|
10562
|
+
}
|
|
10563
|
+
var _array$reduce = array.reduce(function (acc, obj) {
|
|
10564
|
+
var value = obj[field];
|
|
10565
|
+
return {
|
|
10566
|
+
min: value < acc.min ? value : acc.min,
|
|
10567
|
+
max: value > acc.max ? value : acc.max
|
|
10568
|
+
};
|
|
10569
|
+
}, {
|
|
10570
|
+
min: array[0][field],
|
|
10571
|
+
max: array[0][field]
|
|
10572
|
+
}),
|
|
10573
|
+
min = _array$reduce.min,
|
|
10574
|
+
max = _array$reduce.max;
|
|
10575
|
+
return {
|
|
10576
|
+
min: min,
|
|
10577
|
+
max: max
|
|
10578
|
+
};
|
|
10579
|
+
}
|
|
10580
|
+
var ProductPrice2 = function ProductPrice2(props) {
|
|
10581
|
+
var product = props.product,
|
|
10582
|
+
variant = props.variant,
|
|
10583
|
+
_props$className = props.className,
|
|
10584
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
10585
|
+
_props$style = props.style,
|
|
10586
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
10587
|
+
_props$priceClassName = props.priceClassName,
|
|
10588
|
+
priceClassName = _props$priceClassName === void 0 ? "" : _props$priceClassName,
|
|
10589
|
+
_props$priceBeforeDis = props.priceBeforeDiscountClassName,
|
|
10590
|
+
priceBeforeDiscountClassName = _props$priceBeforeDis === void 0 ? "" : _props$priceBeforeDis;
|
|
10591
|
+
var _useState = useState(),
|
|
10592
|
+
displayPrice = _useState[0],
|
|
10593
|
+
setDisplayPrice = _useState[1];
|
|
10594
|
+
var _useState2 = useState(),
|
|
10595
|
+
displayPriceBeforeDiscount = _useState2[0],
|
|
10596
|
+
setDisplayPriceBeforeDiscount = _useState2[1];
|
|
10597
|
+
useEffect(function () {
|
|
10598
|
+
if (variant) {
|
|
10599
|
+
genProductPrice([variant]);
|
|
10600
|
+
} else if (product) {
|
|
10601
|
+
genProductPrice(product.variants);
|
|
10602
|
+
}
|
|
10603
|
+
}, [product, variant]);
|
|
10604
|
+
var genProductPrice = function genProductPrice(variants) {
|
|
10605
|
+
var mPrice = getMinMax$1(variants, 'price');
|
|
10606
|
+
var mPriceBeforeDiscount = getMinMax$1(variants, 'priceBeforeDiscount');
|
|
10607
|
+
if (mPrice && mPriceBeforeDiscount) {
|
|
10608
|
+
var _displayPriceBeforeDiscount = formatCurrency2(mPriceBeforeDiscount.min);
|
|
10609
|
+
var _displayPrice = formatCurrency2(mPrice.min);
|
|
10610
|
+
if (mPrice.min !== mPrice.max) {
|
|
10611
|
+
_displayPrice += " - " + formatCurrency2(mPrice.max);
|
|
10612
|
+
}
|
|
10613
|
+
if (mPriceBeforeDiscount.min !== mPriceBeforeDiscount.max) {
|
|
10614
|
+
_displayPriceBeforeDiscount += " - " + formatCurrency2(mPriceBeforeDiscount.max);
|
|
10615
|
+
}
|
|
10616
|
+
setDisplayPrice(_displayPrice);
|
|
10617
|
+
setDisplayPriceBeforeDiscount(_displayPriceBeforeDiscount);
|
|
10618
|
+
} else {
|
|
10619
|
+
var _displayPrice2 = formatCurrency2(product === null || product === void 0 ? void 0 : product.price);
|
|
10620
|
+
setDisplayPrice(_displayPrice2);
|
|
10621
|
+
}
|
|
10622
|
+
};
|
|
10623
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10624
|
+
className: "flex gap-4 flex-wrap " + className
|
|
10625
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10626
|
+
className: "text-primary font-semibold " + priceClassName,
|
|
10627
|
+
style: style
|
|
10628
|
+
}, displayPrice), displayPriceBeforeDiscount !== displayPrice && displayPriceBeforeDiscount != null ? /*#__PURE__*/React__default.createElement("span", {
|
|
10629
|
+
className: "text-gray3 line-through " + priceBeforeDiscountClassName + " "
|
|
10630
|
+
}, displayPriceBeforeDiscount) : null);
|
|
10631
|
+
};
|
|
10632
|
+
|
|
10633
|
+
var ProductItem11 = function ProductItem11(props) {
|
|
10110
10634
|
var _product$productInfo;
|
|
10111
10635
|
var product = props.product,
|
|
10112
|
-
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10113
|
-
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10114
10636
|
_props$Link = props.Link,
|
|
10115
10637
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10638
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10639
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10116
10640
|
_props$className = props.className,
|
|
10117
10641
|
className = _props$className === void 0 ? "" : _props$className;
|
|
10118
10642
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10119
10643
|
Link: Link,
|
|
10120
10644
|
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10121
10645
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10122
|
-
className: "w-full
|
|
10646
|
+
className: "w-full bg-bgSecondary " + className
|
|
10647
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10648
|
+
className: "overflow-hidden"
|
|
10123
10649
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10124
10650
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10125
|
-
className: "w-full h-
|
|
10126
|
-
}), /*#__PURE__*/React__default.createElement("div",
|
|
10127
|
-
className: "
|
|
10128
|
-
},
|
|
10651
|
+
className: "hover:scale-105 transition duration-300 ease-in-out w-full h-56 sm:h-64 lg:h-72 xl:h-[302px]"
|
|
10652
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10653
|
+
className: "p-4 flex flex-col gap-4"
|
|
10654
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10655
|
+
className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
|
|
10656
|
+
}, 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, {
|
|
10129
10657
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10658
|
+
priceClassName: "!font-normal",
|
|
10130
10659
|
className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10131
10660
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10132
|
-
className: "flex
|
|
10133
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
10134
|
-
className: "p-2
|
|
10135
|
-
}
|
|
10661
|
+
className: "flex gap-2 md:gap-4 "
|
|
10662
|
+
}, /*#__PURE__*/React__default.createElement(AiOutlineShoppingCart, {
|
|
10663
|
+
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)
|
|
10664
|
+
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
10136
10665
|
label: "Mua ngay",
|
|
10137
10666
|
className: "w-full",
|
|
10138
10667
|
shopConfigStyle: shopConfigStyle
|
|
10139
|
-
}))));
|
|
10140
|
-
};
|
|
10141
|
-
|
|
10142
|
-
var ProductItem7 = function ProductItem7(props) {
|
|
10143
|
-
var _product$productInfo, _product$productInfo2, _product$productInfo3, _product$productInfo4, _product$productInfo5, _product$productInfo6;
|
|
10144
|
-
var product = props.product,
|
|
10145
|
-
_props$Link = props.Link,
|
|
10146
|
-
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10147
|
-
_props$className = props.className,
|
|
10148
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
10149
|
-
_props$classNamePrice = props.classNamePrice,
|
|
10150
|
-
classNamePrice = _props$classNamePrice === void 0 ? "text-lg" : _props$classNamePrice;
|
|
10151
|
-
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10152
|
-
Link: Link,
|
|
10153
|
-
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10154
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10155
|
-
className: "w-full bg-bgSecondary relative rounded-2xl " + className
|
|
10156
|
-
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10157
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10158
|
-
className: "w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-t-2xl"
|
|
10159
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10160
|
-
className: "p-3 sm:p-4 flex flex-col gap-4 items-start"
|
|
10161
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10162
|
-
className: "line-clamp-1 w-full overflow-hidden text-ellipsis"
|
|
10163
|
-
}, 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
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10165
|
-
className: "text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "") + " " + classNamePrice
|
|
10166
|
-
})), product !== null && product !== void 0 && product.isShowProductPriceOnLanding && product !== null && product !== void 0 && (_product$productInfo2 = product.productInfo) !== null && _product$productInfo2 !== 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.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.price) ? /*#__PURE__*/React__default.createElement("div", {
|
|
10167
|
-
className: "absolute top-5 left-0 font-semibold px-3 py-1 bg-danger text-textButton rounded-r-2xl shadow-lg v-max"
|
|
10168
|
-
}, 1 - 100 * (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.price) / (product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.priceBeforeDiscount)) : null));
|
|
10169
|
-
};
|
|
10170
|
-
|
|
10171
|
-
var ProductItem8 = function ProductItem8(props) {
|
|
10172
|
-
var _product$productInfo;
|
|
10173
|
-
var product = props.product,
|
|
10174
|
-
_props$Link = props.Link,
|
|
10175
|
-
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10176
|
-
_props$className = props.className,
|
|
10177
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
10178
|
-
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10179
|
-
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
10180
|
-
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10181
|
-
Link: Link,
|
|
10182
|
-
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10183
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10184
|
-
className: "text-center rounded relative group " + className
|
|
10185
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10186
|
-
className: "relative "
|
|
10187
|
-
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10188
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10189
|
-
className: "min-h-[360px] md:min-h-[400px] xl:min-h-[440px] !object-cover !rounded"
|
|
10190
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10191
|
-
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 "
|
|
10192
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10193
|
-
className: "text-lg text-textButton"
|
|
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(ProductPrice, {
|
|
10195
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10196
|
-
className: !(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "",
|
|
10197
|
-
priceClassName: "text-textButton !font-normal",
|
|
10198
|
-
priceBeforeDiscountClassName: "text-textButton !font-normal"
|
|
10199
|
-
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
10200
|
-
label: "Th\xEAm v\xE0o gi\u1ECF",
|
|
10201
|
-
shopConfigStyle: shopConfigStyle,
|
|
10202
|
-
className: "hidden group-hover:block transition-all duration-300 !font-normal"
|
|
10203
10668
|
})))));
|
|
10204
10669
|
};
|
|
10205
10670
|
|
|
@@ -10328,13 +10793,13 @@ var Products2 = function Products2(props) {
|
|
|
10328
10793
|
breakpoint: 1024,
|
|
10329
10794
|
settings: {
|
|
10330
10795
|
slidesToShow: 4,
|
|
10331
|
-
slidesToScroll:
|
|
10796
|
+
slidesToScroll: 1
|
|
10332
10797
|
}
|
|
10333
10798
|
}, {
|
|
10334
10799
|
breakpoint: 1023,
|
|
10335
10800
|
settings: {
|
|
10336
10801
|
slidesToShow: 3,
|
|
10337
|
-
slidesToScroll:
|
|
10802
|
+
slidesToScroll: 1
|
|
10338
10803
|
}
|
|
10339
10804
|
}, {
|
|
10340
10805
|
breakpoint: 635,
|
|
@@ -10342,6 +10807,12 @@ var Products2 = function Products2(props) {
|
|
|
10342
10807
|
slidesToShow: 2,
|
|
10343
10808
|
slidesToScroll: 2
|
|
10344
10809
|
}
|
|
10810
|
+
}, {
|
|
10811
|
+
breakpoint: 370,
|
|
10812
|
+
settings: {
|
|
10813
|
+
slidesToShow: 1,
|
|
10814
|
+
slidesToScroll: 1
|
|
10815
|
+
}
|
|
10345
10816
|
}]
|
|
10346
10817
|
};
|
|
10347
10818
|
useEffect(function () {
|
|
@@ -10375,12 +10846,12 @@ var Products2 = function Products2(props) {
|
|
|
10375
10846
|
color: textBody
|
|
10376
10847
|
}
|
|
10377
10848
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10378
|
-
className: "relative rounded-3xl w-full py-
|
|
10849
|
+
className: "relative rounded-3xl w-full py-6 md:py-10 md:px-6 px-3 xl:px-10",
|
|
10379
10850
|
style: {
|
|
10380
10851
|
background: secondary
|
|
10381
10852
|
}
|
|
10382
10853
|
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
10383
|
-
className: "font-semibold text-2xl md:text-4xl lg:text-4xl ps-5 pb-
|
|
10854
|
+
className: "font-semibold text-2xl md:text-4xl lg:text-4xl ps-5 pb-6",
|
|
10384
10855
|
style: {
|
|
10385
10856
|
color: textButton
|
|
10386
10857
|
}
|
|
@@ -10394,16 +10865,15 @@ var Products2 = function Products2(props) {
|
|
|
10394
10865
|
beforeChange: handleBeforeChange
|
|
10395
10866
|
}), products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
10396
10867
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10397
|
-
className: "px-2 lg:px-3",
|
|
10868
|
+
className: "px-1 md:px-2 lg:px-3",
|
|
10398
10869
|
key: "dfg-" + index
|
|
10399
10870
|
}, /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10400
10871
|
product: product,
|
|
10401
10872
|
Link: Link,
|
|
10402
|
-
shopConfigStyle: shopConfigStyle
|
|
10403
|
-
classNamePrice: "text-base md:text-lg"
|
|
10873
|
+
shopConfigStyle: shopConfigStyle
|
|
10404
10874
|
}));
|
|
10405
10875
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
10406
|
-
className: "absolute left-0 top-
|
|
10876
|
+
className: "absolute left-0 top-[45%] w-full flex justify-between px-2 md:px-4 lg:px-6"
|
|
10407
10877
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
10408
10878
|
onClick: goToPrev,
|
|
10409
10879
|
className: (canGoPrev ? "bg-primary" : "bg-gray5 cursor-not-allowed") + " p-2 rounded-full"
|
|
@@ -10448,7 +10918,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
10448
10918
|
for (var i = start; i <= end; i++) {
|
|
10449
10919
|
pages.push(i);
|
|
10450
10920
|
}
|
|
10451
|
-
if (current_page < total_pages -
|
|
10921
|
+
if (current_page < total_pages - 3) pages.push("...");
|
|
10452
10922
|
pages.push(total_pages);
|
|
10453
10923
|
return pages;
|
|
10454
10924
|
};
|
|
@@ -10468,7 +10938,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
10468
10938
|
onClick: function onClick() {
|
|
10469
10939
|
return typeof page === "number" && handlePageChange(page - 1);
|
|
10470
10940
|
},
|
|
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" : ""),
|
|
10941
|
+
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
10942
|
disabled: page === "..."
|
|
10473
10943
|
}, page);
|
|
10474
10944
|
})), /*#__PURE__*/React__default.createElement(IoChevronForwardOutline, {
|
|
@@ -10587,44 +11057,217 @@ var Products3 = function Products3(props) {
|
|
|
10587
11057
|
}));
|
|
10588
11058
|
};
|
|
10589
11059
|
|
|
10590
|
-
var
|
|
11060
|
+
var CarouselItem = function CarouselItem(props) {
|
|
10591
11061
|
var _Object$keys;
|
|
11062
|
+
var _props$data = props.data,
|
|
11063
|
+
data = _props$data === void 0 ? [] : _props$data,
|
|
11064
|
+
_props$className = props.className,
|
|
11065
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
11066
|
+
_props$style = props.style,
|
|
11067
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
11068
|
+
_props$onClick = props.onClick,
|
|
11069
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
11070
|
+
_props$isAll = props.isAll,
|
|
11071
|
+
isAll = _props$isAll === void 0 ? true : _props$isAll,
|
|
11072
|
+
_props$isNavigateButt = props.isNavigateButton,
|
|
11073
|
+
isNavigateButton = _props$isNavigateButt === void 0 ? true : _props$isNavigateButt,
|
|
11074
|
+
_props$itemClassName = props.itemClassName,
|
|
11075
|
+
itemClassName = _props$itemClassName === void 0 ? "" : _props$itemClassName;
|
|
11076
|
+
var listRef = useRef(null);
|
|
11077
|
+
var _useState = useState(false),
|
|
11078
|
+
canScrollLeft = _useState[0],
|
|
11079
|
+
setCanScrollLeft = _useState[1];
|
|
11080
|
+
var _useState2 = useState(false),
|
|
11081
|
+
canScrollRight = _useState2[0],
|
|
11082
|
+
setCanScrollRight = _useState2[1];
|
|
11083
|
+
var _useState3 = useState({}),
|
|
11084
|
+
value = _useState3[0],
|
|
11085
|
+
setValue = _useState3[1];
|
|
11086
|
+
useEffect(function () {
|
|
11087
|
+
var _listRef$current;
|
|
11088
|
+
checkScroll();
|
|
11089
|
+
(_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.addEventListener("scroll", checkScroll);
|
|
11090
|
+
return function () {
|
|
11091
|
+
var _listRef$current2;
|
|
11092
|
+
return (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.removeEventListener("scroll", checkScroll);
|
|
11093
|
+
};
|
|
11094
|
+
}, [data]);
|
|
11095
|
+
var checkScroll = function checkScroll() {
|
|
11096
|
+
if (listRef.current) {
|
|
11097
|
+
var _listRef$current3 = listRef.current,
|
|
11098
|
+
scrollLeft = _listRef$current3.scrollLeft,
|
|
11099
|
+
scrollWidth = _listRef$current3.scrollWidth,
|
|
11100
|
+
clientWidth = _listRef$current3.clientWidth;
|
|
11101
|
+
setCanScrollLeft(scrollLeft > 0);
|
|
11102
|
+
setCanScrollRight(scrollLeft + clientWidth < scrollWidth - 1);
|
|
11103
|
+
}
|
|
11104
|
+
};
|
|
11105
|
+
var handleClickPrevImg = function handleClickPrevImg() {
|
|
11106
|
+
if (listRef.current) {
|
|
11107
|
+
checkScroll();
|
|
11108
|
+
listRef.current.scrollBy({
|
|
11109
|
+
left: -300,
|
|
11110
|
+
behavior: "smooth"
|
|
11111
|
+
});
|
|
11112
|
+
}
|
|
11113
|
+
};
|
|
11114
|
+
var handleClickNextImg = function handleClickNextImg() {
|
|
11115
|
+
if (listRef.current) {
|
|
11116
|
+
checkScroll();
|
|
11117
|
+
listRef.current.scrollBy({
|
|
11118
|
+
left: 300,
|
|
11119
|
+
behavior: "smooth"
|
|
11120
|
+
});
|
|
11121
|
+
}
|
|
11122
|
+
};
|
|
11123
|
+
var handleOnClick = function handleOnClick(item) {
|
|
11124
|
+
setValue(item);
|
|
11125
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(item);
|
|
11126
|
+
};
|
|
11127
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11128
|
+
className: "h-10 md:h-12 flex justify-between items-center " + className,
|
|
11129
|
+
style: style
|
|
11130
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11131
|
+
className: "w-full overflow-hidden "
|
|
11132
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11133
|
+
className: "flex overflow-x-auto gap-2 " + (isNavigateButton ? "no-scrollbar" : "scroll-custom pb-2") + " items-center",
|
|
11134
|
+
ref: listRef
|
|
11135
|
+
}, isAll ? /*#__PURE__*/React__default.createElement("div", {
|
|
11136
|
+
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",
|
|
11137
|
+
onClick: function onClick() {
|
|
11138
|
+
handleOnClick({});
|
|
11139
|
+
}
|
|
11140
|
+
}, "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) {
|
|
11141
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11142
|
+
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,
|
|
11143
|
+
key: "carousel-" + index,
|
|
11144
|
+
onClick: function onClick() {
|
|
11145
|
+
handleOnClick(item);
|
|
11146
|
+
}
|
|
11147
|
+
}, item === null || item === void 0 ? void 0 : item.label);
|
|
11148
|
+
})))), isNavigateButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
11149
|
+
className: "hidden my-auto gap-4 md:flex justify-end ps-10"
|
|
11150
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
11151
|
+
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"),
|
|
11152
|
+
onClick: handleClickPrevImg,
|
|
11153
|
+
disabled: !canScrollLeft
|
|
11154
|
+
}, /*#__PURE__*/React__default.createElement(IoIosArrowBack, {
|
|
11155
|
+
size: 24,
|
|
11156
|
+
className: "inline-block text-lg"
|
|
11157
|
+
})), /*#__PURE__*/React__default.createElement("button", {
|
|
11158
|
+
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"),
|
|
11159
|
+
onClick: handleClickNextImg,
|
|
11160
|
+
disabled: !canScrollRight
|
|
11161
|
+
}, /*#__PURE__*/React__default.createElement(IoIosArrowForward, {
|
|
11162
|
+
size: 24,
|
|
11163
|
+
className: "inline-block text-lg "
|
|
11164
|
+
}))) : null);
|
|
11165
|
+
};
|
|
11166
|
+
|
|
11167
|
+
var Products9 = function Products9(props) {
|
|
11168
|
+
var _Object$keys2;
|
|
10592
11169
|
var _props$Link = props.Link,
|
|
10593
11170
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10594
11171
|
shopConfigStyle = props.shopConfigStyle,
|
|
10595
11172
|
_props$ProductItem = props.ProductItem,
|
|
10596
11173
|
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
10597
|
-
var _useState = useState(
|
|
11174
|
+
var _useState = useState(true),
|
|
11175
|
+
loading = _useState[0],
|
|
11176
|
+
setLoading = _useState[1];
|
|
11177
|
+
var _useState2 = useState({
|
|
10598
11178
|
size: 12
|
|
10599
11179
|
}),
|
|
10600
|
-
params =
|
|
10601
|
-
|
|
11180
|
+
params = _useState2[0];
|
|
11181
|
+
var _useState3 = useState(false),
|
|
11182
|
+
isAutoGetList = _useState3[0];
|
|
10602
11183
|
var _CategoryController = CategoryController(_extends({}, props, {
|
|
10603
11184
|
types: "0"
|
|
10604
11185
|
})),
|
|
10605
11186
|
_CategoryController$c = _CategoryController.categories,
|
|
10606
11187
|
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
10607
11188
|
var _ProductController = ProductController(_extends({}, props, {
|
|
10608
|
-
params: params
|
|
11189
|
+
params: params,
|
|
11190
|
+
isAutoGetList: isAutoGetList
|
|
10609
11191
|
})),
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
|
|
11192
|
+
getProductListSearch = _ProductController.getProductListSearch;
|
|
11193
|
+
var _useState4 = useState([]),
|
|
11194
|
+
categoryProducts = _useState4[0],
|
|
11195
|
+
setCategoryProducts = _useState4[1];
|
|
11196
|
+
useEffect(function () {
|
|
11197
|
+
if ((categories === null || categories === void 0 ? void 0 : categories.length) > 0) {
|
|
11198
|
+
fetchAll();
|
|
11199
|
+
}
|
|
11200
|
+
}, [categories]);
|
|
11201
|
+
var fetchAll = function fetchAll() {
|
|
11202
|
+
try {
|
|
11203
|
+
setLoading(true);
|
|
11204
|
+
var _temp = _finallyRethrows(function () {
|
|
11205
|
+
return _catch(function () {
|
|
11206
|
+
var _categories$slice;
|
|
11207
|
+
var result = {};
|
|
11208
|
+
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) {
|
|
11209
|
+
try {
|
|
11210
|
+
return Promise.resolve(getProductListSearch({
|
|
11211
|
+
categoryId: cat === null || cat === void 0 ? void 0 : cat.categoryId,
|
|
11212
|
+
size: 4
|
|
11213
|
+
})).then(function (products) {
|
|
11214
|
+
if ((products === null || products === void 0 ? void 0 : products.length) > 0) {
|
|
11215
|
+
result[cat === null || cat === void 0 ? void 0 : cat.cateName] = products;
|
|
11216
|
+
}
|
|
11217
|
+
});
|
|
11218
|
+
} catch (e) {
|
|
11219
|
+
return Promise.reject(e);
|
|
11220
|
+
}
|
|
11221
|
+
}))).then(function () {
|
|
11222
|
+
setCategoryProducts(result);
|
|
11223
|
+
});
|
|
11224
|
+
}, function (error) {
|
|
11225
|
+
console.log(error);
|
|
11226
|
+
});
|
|
11227
|
+
}, function (_wasThrown, _result) {
|
|
11228
|
+
setLoading(false);
|
|
11229
|
+
if (_wasThrown) throw _result;
|
|
11230
|
+
return _result;
|
|
11231
|
+
});
|
|
11232
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
11233
|
+
} catch (e) {
|
|
11234
|
+
return Promise.reject(e);
|
|
11235
|
+
}
|
|
11236
|
+
};
|
|
10613
11237
|
var handleChooseCategory = function handleChooseCategory(item) {
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
}
|
|
11238
|
+
var _Object$keys;
|
|
11239
|
+
if ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(item)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0) {
|
|
11240
|
+
fetchAll();
|
|
11241
|
+
} else {
|
|
11242
|
+
fetchOne(item);
|
|
11243
|
+
}
|
|
10618
11244
|
};
|
|
10619
|
-
var
|
|
10620
|
-
|
|
10621
|
-
|
|
10622
|
-
|
|
10623
|
-
|
|
11245
|
+
var fetchOne = function fetchOne(item) {
|
|
11246
|
+
try {
|
|
11247
|
+
setLoading(true);
|
|
11248
|
+
var _temp2 = _finallyRethrows(function () {
|
|
11249
|
+
return _catch(function () {
|
|
11250
|
+
return Promise.resolve(getProductListSearch({
|
|
11251
|
+
categoryId: item === null || item === void 0 ? void 0 : item.categoryId,
|
|
11252
|
+
size: 12
|
|
11253
|
+
})).then(function (products) {
|
|
11254
|
+
var _setCategoryProducts, _console$log;
|
|
11255
|
+
setCategoryProducts((_setCategoryProducts = {}, _setCategoryProducts[item === null || item === void 0 ? void 0 : item.cateName] = products, _setCategoryProducts));
|
|
11256
|
+
console.log("check::::", (_console$log = {}, _console$log[item === null || item === void 0 ? void 0 : item.cateName] = products, _console$log));
|
|
11257
|
+
});
|
|
11258
|
+
}, function (error) {
|
|
11259
|
+
console.log(error);
|
|
11260
|
+
});
|
|
11261
|
+
}, function (_wasThrown2, _result2) {
|
|
11262
|
+
setLoading(false);
|
|
11263
|
+
if (_wasThrown2) throw _result2;
|
|
11264
|
+
return _result2;
|
|
11265
|
+
});
|
|
11266
|
+
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
11267
|
+
} catch (e) {
|
|
11268
|
+
return Promise.reject(e);
|
|
10624
11269
|
}
|
|
10625
|
-
|
|
10626
|
-
return acc;
|
|
10627
|
-
}, {});
|
|
11270
|
+
};
|
|
10628
11271
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10629
11272
|
className: SECTION_CLASS + " flex flex-col gap-4 md:!my-6 md:gap-6 "
|
|
10630
11273
|
}, /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
@@ -10632,7 +11275,7 @@ var Products9 = function Products9(props) {
|
|
|
10632
11275
|
onClick: handleChooseCategory
|
|
10633
11276
|
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
10634
11277
|
className: "m-auto mt-20 min-h-32"
|
|
10635
|
-
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (Object === null || Object === void 0 ? void 0 : (_Object$
|
|
11278
|
+
}, /*#__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
11279
|
var _products$;
|
|
10637
11280
|
var categoryName = _ref[0],
|
|
10638
11281
|
products = _ref[1];
|
|
@@ -10656,7 +11299,9 @@ var Products9 = function Products9(props) {
|
|
|
10656
11299
|
product: product,
|
|
10657
11300
|
key: product === null || product === void 0 ? void 0 : product.landingShopProductId
|
|
10658
11301
|
});
|
|
10659
|
-
}) :
|
|
11302
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
11303
|
+
className: "col-span-2 sm:col-span-3 lg:col-span-4"
|
|
11304
|
+
}, /*#__PURE__*/React__default.createElement(NotFoundProduct, null))));
|
|
10660
11305
|
}) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
|
|
10661
11306
|
};
|
|
10662
11307
|
|
|
@@ -10727,7 +11372,6 @@ var listFilter = [{
|
|
|
10727
11372
|
value: "sortPriceDESC"
|
|
10728
11373
|
}];
|
|
10729
11374
|
var Products11 = function Products11(props) {
|
|
10730
|
-
var _productsFilter$slice;
|
|
10731
11375
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
10732
11376
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10733
11377
|
_props$Link = props.Link,
|
|
@@ -10739,22 +11383,19 @@ var Products11 = function Products11(props) {
|
|
|
10739
11383
|
var _useState = useState({
|
|
10740
11384
|
page: 0,
|
|
10741
11385
|
size: 12,
|
|
10742
|
-
categoryId: categoryId
|
|
11386
|
+
categoryId: categoryId || ""
|
|
10743
11387
|
}),
|
|
10744
11388
|
params = _useState[0],
|
|
10745
11389
|
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];
|
|
11390
|
+
var _useState2 = useState({}),
|
|
11391
|
+
categorySelected = _useState2[0],
|
|
11392
|
+
setCategorySelected = _useState2[1];
|
|
11393
|
+
var _useState3 = useState([]),
|
|
11394
|
+
productsFilter = _useState3[0],
|
|
11395
|
+
setProductsFilter = _useState3[1];
|
|
11396
|
+
var _useState4 = useState(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]),
|
|
11397
|
+
filterItem = _useState4[0],
|
|
11398
|
+
setFilterItem = _useState4[1];
|
|
10758
11399
|
var _CategoryController = CategoryController(_extends({}, props, {
|
|
10759
11400
|
types: "0"
|
|
10760
11401
|
})),
|
|
@@ -10768,16 +11409,18 @@ var Products11 = function Products11(props) {
|
|
|
10768
11409
|
loading = _ProductController.loading,
|
|
10769
11410
|
page = _ProductController.page;
|
|
10770
11411
|
var handleOnChangePage = function handleOnChangePage(pageIndex) {
|
|
10771
|
-
setFirstLoading(false);
|
|
10772
11412
|
setParams(function (prev) {
|
|
10773
11413
|
return _extends({}, prev, {
|
|
10774
11414
|
page: pageIndex
|
|
10775
11415
|
});
|
|
10776
11416
|
});
|
|
11417
|
+
window.scrollTo({
|
|
11418
|
+
top: 0,
|
|
11419
|
+
behavior: 'smooth'
|
|
11420
|
+
});
|
|
10777
11421
|
};
|
|
10778
11422
|
var handleChooseCategory = function handleChooseCategory(category) {
|
|
10779
11423
|
setCategorySelected(category);
|
|
10780
|
-
setFirstLoading(true);
|
|
10781
11424
|
setFilterItem(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]);
|
|
10782
11425
|
setParams(function (prev) {
|
|
10783
11426
|
return _extends({}, prev, {
|
|
@@ -10785,6 +11428,10 @@ var Products11 = function Products11(props) {
|
|
|
10785
11428
|
size: 12
|
|
10786
11429
|
});
|
|
10787
11430
|
});
|
|
11431
|
+
window.scrollTo({
|
|
11432
|
+
top: 0,
|
|
11433
|
+
behavior: 'smooth'
|
|
11434
|
+
});
|
|
10788
11435
|
};
|
|
10789
11436
|
useEffect(function () {
|
|
10790
11437
|
if ((categories === null || categories === void 0 ? void 0 : categories.length) > 0 && params !== null && params !== void 0 && params.categoryId) {
|
|
@@ -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 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
|
|
@@ -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,
|
|
@@ -13471,6 +14277,30 @@ var Gallery1$1 = function Gallery1(props) {
|
|
|
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,
|
|
@@ -15555,5 +16472,5 @@ var NewsDetail1 = function NewsDetail1(props) {
|
|
|
15555
16472
|
}))) : null);
|
|
15556
16473
|
};
|
|
15557
16474
|
|
|
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,
|
|
16475
|
+
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
16476
|
//# sourceMappingURL=index.modern.js.map
|