s-platform-landing-section 0.1.35 → 0.1.36-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1661 -733
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1649 -734
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10,16 +10,16 @@ var pi = require('react-icons/pi');
|
|
|
10
10
|
var tb = require('react-icons/tb');
|
|
11
11
|
var si = require('react-icons/si');
|
|
12
12
|
var io = require('react-icons/io');
|
|
13
|
+
var md = require('react-icons/md');
|
|
13
14
|
var fa6 = require('react-icons/fa6');
|
|
14
|
-
require('react-icons/
|
|
15
|
-
var bs = require('react-icons/bs');
|
|
15
|
+
var ai = require('react-icons/ai');
|
|
16
16
|
var lu = require('react-icons/lu');
|
|
17
17
|
var DatePicker = _interopDefault(require('react-datepicker'));
|
|
18
18
|
require('react-datepicker/dist/react-datepicker.css');
|
|
19
19
|
var Slider = _interopDefault(require('react-slick'));
|
|
20
20
|
require('slick-carousel/slick/slick.css');
|
|
21
21
|
require('slick-carousel/slick/slick-theme.css');
|
|
22
|
-
var
|
|
22
|
+
var bs = require('react-icons/bs');
|
|
23
23
|
var go = require('react-icons/go');
|
|
24
24
|
var gr = require('react-icons/gr');
|
|
25
25
|
var ri = require('react-icons/ri');
|
|
@@ -951,7 +951,7 @@ var SectionTitle2 = function SectionTitle2(props) {
|
|
|
951
951
|
}), /*#__PURE__*/React__default.createElement(io.IoIosStar, {
|
|
952
952
|
className: "w-4 h-4 text-warning"
|
|
953
953
|
})) : null, data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("div", {
|
|
954
|
-
className: "text-xl text-center leading-relaxed text-textSecondary"
|
|
954
|
+
className: "text-xl text-center leading-relaxed text-textSecondary pb-4"
|
|
955
955
|
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
|
|
956
956
|
};
|
|
957
957
|
|
|
@@ -978,10 +978,27 @@ var SectionTitle4 = function SectionTitle4(props) {
|
|
|
978
978
|
}, data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
|
|
979
979
|
className: "border w-32 border-primary"
|
|
980
980
|
})) : null, data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("p", {
|
|
981
|
-
className: "text-xl text-center
|
|
981
|
+
className: "text-xl text-center leading-relaxed text-secondary mt-2"
|
|
982
982
|
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
|
|
983
983
|
};
|
|
984
984
|
|
|
985
|
+
var SectionTitle5 = function SectionTitle5(props) {
|
|
986
|
+
var data = props.data;
|
|
987
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
988
|
+
className: true
|
|
989
|
+
}, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement("div", {
|
|
990
|
+
className: "flex items-start gap-2"
|
|
991
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
992
|
+
className: "text-secondary text-4xl md:text-5xl"
|
|
993
|
+
}, /*#__PURE__*/React__default.createElement(md.MdKeyboardDoubleArrowRight, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
994
|
+
className: "flex flex-col gap-2"
|
|
995
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
996
|
+
className: "text-2xl md:text-4xl text-textHeading font-medium font-fontHeading"
|
|
997
|
+
}, data === null || data === void 0 ? void 0 : data.sectionTitle), data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("p", {
|
|
998
|
+
className: "text-lg md:text-2xl leading-relaxed text-textSecondary"
|
|
999
|
+
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null)) : null);
|
|
1000
|
+
};
|
|
1001
|
+
|
|
985
1002
|
var Input = React.forwardRef(function (props, ref) {
|
|
986
1003
|
var _props$label = props.label,
|
|
987
1004
|
label = _props$label === void 0 ? "" : _props$label,
|
|
@@ -1214,20 +1231,22 @@ var Hero2 = function Hero2(props) {
|
|
|
1214
1231
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
1215
1232
|
src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
|
|
1216
1233
|
alt: data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.title,
|
|
1217
|
-
className: "w-full h-auto object-cover min-h-[
|
|
1234
|
+
className: "w-full h-auto object-cover min-h-[35vh] max-h-[100vh]"
|
|
1218
1235
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1219
|
-
className: "absolute inset-y-0 right-[
|
|
1236
|
+
className: "absolute inset-y-0 right-[2%] md:right-[4%] w-[58%] md:w-[54%] flex flex-col gap-2 md:gap-4 xl:gap-6 justify-center items-start px-4 pt-4 pb-2 md:px-8 md:pt-8 md:pb-6 xl:p-8"
|
|
1220
1237
|
}, shopConfig !== null && shopConfig !== void 0 && shopConfig.logoUrl ? /*#__PURE__*/React__default.createElement("img", {
|
|
1221
1238
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
1222
1239
|
className: "h-6 w-6 sm:h-10 sm:w-10 md:h-12 md:w-12 lg:w-14 lg:h-14 xl:h-20 xl:w-20"
|
|
1223
1240
|
}) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
1224
|
-
className: "font-medium line-clamp-1 ",
|
|
1241
|
+
className: "font-medium line-clamp-2 lg:line-clamp-1 text-2xl md:text-3xl lg:text-4xl xl:text-6xl",
|
|
1225
1242
|
style: {
|
|
1226
|
-
fontSize: "clamp(1.25rem, 4vw, 3.5rem)",
|
|
1227
1243
|
lineHeight: "1.5"
|
|
1228
1244
|
}
|
|
1229
1245
|
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.title), /*#__PURE__*/React__default.createElement("div", {
|
|
1230
|
-
className: "
|
|
1246
|
+
className: "line-clamp-3 text-ellipsis text-base md:text-lg lg:text-xl xl:text-2xl",
|
|
1247
|
+
style: {
|
|
1248
|
+
lineHeight: 1.625
|
|
1249
|
+
}
|
|
1231
1250
|
}, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : _data$data4$.description)));
|
|
1232
1251
|
};
|
|
1233
1252
|
|
|
@@ -1239,13 +1258,16 @@ var Hero5 = function Hero5(props) {
|
|
|
1239
1258
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
1240
1259
|
src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
|
|
1241
1260
|
alt: data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.title,
|
|
1242
|
-
className: "w-full min-h-[
|
|
1261
|
+
className: "w-full min-h-[35vh] max-h-[100vh] object-cover"
|
|
1243
1262
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1244
|
-
className: "absolute inset-0 flex flex-col top-[
|
|
1263
|
+
className: "absolute inset-0 flex flex-col top-[8%] md:top-[10%] gap-1 md:gap-4 p-4 lg:p-10 w-3/5 md:w-1/2 max-w-[90%] left-1 lg:left-10 xl:left-20"
|
|
1245
1264
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1246
|
-
className: "text-xl sm:text-2xl md:text-3xl lg:text-4xl text-textHeading
|
|
1265
|
+
className: "text-xl sm:text-2xl md:text-3xl lg:text-4xl text-textHeading overflow-hidden text-ellipsis font-medium line-clamp-2 xl:line-clamp-1",
|
|
1266
|
+
style: {
|
|
1267
|
+
lineHeight: 1.5
|
|
1268
|
+
}
|
|
1247
1269
|
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.title), /*#__PURE__*/React__default.createElement("div", {
|
|
1248
|
-
className: "text-sm md:text-xl lg:text-2xl text-primary line-clamp-3
|
|
1270
|
+
className: "text-sm md:text-xl lg:text-2xl text-primary line-clamp-3 overflow-hidden text-ellipsis"
|
|
1249
1271
|
}, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : _data$data4$.description)));
|
|
1250
1272
|
};
|
|
1251
1273
|
|
|
@@ -1261,21 +1283,20 @@ var Hero6 = function Hero6(props) {
|
|
|
1261
1283
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
1262
1284
|
src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
|
|
1263
1285
|
alt: data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.title,
|
|
1264
|
-
className: "object-cover w-full h-
|
|
1286
|
+
className: "object-cover w-full min-h-[30vh] max-h-[100vh]"
|
|
1265
1287
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1266
|
-
className: "absolute inset-0 flex flex-col items-center justify-center md:gap-1 lg:gap-2 text-center py-1 md:py-4 px-
|
|
1288
|
+
className: "absolute inset-0 flex flex-col items-center justify-center md:gap-1 lg:gap-2 text-center py-1 md:py-4 px-10 md:px-20 "
|
|
1267
1289
|
}, data !== null && data !== void 0 && (_data$data3 = data.data) !== null && _data$data3 !== void 0 && (_data$data3$ = _data$data3[0]) !== null && _data$data3$ !== void 0 && _data$data3$.title ? /*#__PURE__*/React__default.createElement("div", {
|
|
1268
|
-
className: "text-primary font-headingFont text-center line-clamp-1 text-
|
|
1290
|
+
className: "text-primary font-headingFont text-center line-clamp-1 text-2xl md:text-4xl xl:text-6xl text-ellipsis",
|
|
1269
1291
|
style: {
|
|
1270
|
-
fontSize: "clamp(1rem, 4vw, 3rem)",
|
|
1271
1292
|
lineHeight: "2"
|
|
1272
1293
|
}
|
|
1273
1294
|
}, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : _data$data4$.title) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
1274
|
-
className: "flex flex-col gap-
|
|
1295
|
+
className: "flex flex-col gap-2 md:gap-4 lg:gap-6 "
|
|
1275
1296
|
}, data !== null && data !== void 0 && (_data$data5 = data.data) !== null && _data$data5 !== void 0 && (_data$data5$ = _data$data5[0]) !== null && _data$data5$ !== void 0 && _data$data5$.description ? /*#__PURE__*/React__default.createElement("div", {
|
|
1276
|
-
className: "line-clamp-
|
|
1297
|
+
className: "line-clamp-2 lg:line-clamp-3 md:text-xl xl:text-2xl",
|
|
1277
1298
|
style: {
|
|
1278
|
-
|
|
1299
|
+
lineHeight: 1.5
|
|
1279
1300
|
}
|
|
1280
1301
|
}, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description) : null, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : (_sectionData$$buttons = _sectionData$.buttons) === null || _sectionData$$buttons === void 0 ? void 0 : _sectionData$$buttons.map(function (button) {
|
|
1281
1302
|
return button !== null && button !== void 0 && button.label && (button !== null && button !== void 0 && button.route || button !== null && button !== void 0 && button.link) ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
@@ -1322,13 +1343,16 @@ var Hero10 = function Hero10(props) {
|
|
|
1322
1343
|
|
|
1323
1344
|
var SECTION_DEFAULT_CLASS = "my-12 mx-4 xl:mx-20 bg-background";
|
|
1324
1345
|
var SECTION_CLASS = "my-6 md:my-12 px-4 xl:px-20 bg-background";
|
|
1346
|
+
var SECTION_CLASS_PADDING = "py-6 md:py-12 px-4 xl:px-20 bg-background";
|
|
1325
1347
|
|
|
1326
1348
|
var Hero11 = function Hero11(props) {
|
|
1327
|
-
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3
|
|
1349
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3$, _data$data4, _data$data4$, _data$data4$$buttons;
|
|
1328
1350
|
var _props$data = props.data,
|
|
1329
1351
|
data = _props$data === void 0 ? {} : _props$data,
|
|
1330
1352
|
_props$shopConfigStyl = props.shopConfigStyle,
|
|
1331
|
-
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl
|
|
1353
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
1354
|
+
_props$Link = props.Link,
|
|
1355
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
1332
1356
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1333
1357
|
className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-2 py-12 !bg-bgSecondary gap-6 md:gap-12"
|
|
1334
1358
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -1356,11 +1380,16 @@ var Hero11 = function Hero11(props) {
|
|
|
1356
1380
|
className: "text-2xl md:text-4xl !leading-[1.6] font-headingFont w-max text-center text-primary"
|
|
1357
1381
|
}, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : (_data$data2$$title = _data$data2$.title) === null || _data$data2$$title === void 0 ? void 0 : _data$data2$$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
|
|
1358
1382
|
className: "text-lg md:text-xl lg:text-2xl"
|
|
1359
|
-
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description),
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1383
|
+
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description), data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : (_data$data4$$buttons = _data$data4$.buttons) === null || _data$data4$$buttons === void 0 ? void 0 : _data$data4$$buttons.map(function (button, index) {
|
|
1384
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
1385
|
+
Link: Link,
|
|
1386
|
+
key: "gdf-" + index,
|
|
1387
|
+
href: convertURL(button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
1388
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
1389
|
+
label: button === null || button === void 0 ? void 0 : button.label,
|
|
1390
|
+
shopConfigStyle: shopConfigStyle,
|
|
1391
|
+
className: "!font-normal w-max"
|
|
1392
|
+
}));
|
|
1364
1393
|
})));
|
|
1365
1394
|
};
|
|
1366
1395
|
|
|
@@ -1386,113 +1415,6 @@ var Hero12 = function Hero12(props) {
|
|
|
1386
1415
|
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description)));
|
|
1387
1416
|
};
|
|
1388
1417
|
|
|
1389
|
-
var CarouselItem = function CarouselItem(props) {
|
|
1390
|
-
var _Object$keys;
|
|
1391
|
-
var _props$data = props.data,
|
|
1392
|
-
data = _props$data === void 0 ? [] : _props$data,
|
|
1393
|
-
_props$className = props.className,
|
|
1394
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
1395
|
-
_props$style = props.style,
|
|
1396
|
-
style = _props$style === void 0 ? {} : _props$style,
|
|
1397
|
-
_props$onClick = props.onClick,
|
|
1398
|
-
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
1399
|
-
_props$isAll = props.isAll,
|
|
1400
|
-
isAll = _props$isAll === void 0 ? true : _props$isAll,
|
|
1401
|
-
_props$isNavigateButt = props.isNavigateButton,
|
|
1402
|
-
isNavigateButton = _props$isNavigateButt === void 0 ? true : _props$isNavigateButt,
|
|
1403
|
-
_props$itemClassName = props.itemClassName,
|
|
1404
|
-
itemClassName = _props$itemClassName === void 0 ? "" : _props$itemClassName;
|
|
1405
|
-
var listRef = React.useRef(null);
|
|
1406
|
-
var _useState = React.useState(false),
|
|
1407
|
-
canScrollLeft = _useState[0],
|
|
1408
|
-
setCanScrollLeft = _useState[1];
|
|
1409
|
-
var _useState2 = React.useState(false),
|
|
1410
|
-
canScrollRight = _useState2[0],
|
|
1411
|
-
setCanScrollRight = _useState2[1];
|
|
1412
|
-
var _useState3 = React.useState({}),
|
|
1413
|
-
value = _useState3[0],
|
|
1414
|
-
setValue = _useState3[1];
|
|
1415
|
-
React.useEffect(function () {
|
|
1416
|
-
var _listRef$current;
|
|
1417
|
-
checkScroll();
|
|
1418
|
-
(_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.addEventListener("scroll", checkScroll);
|
|
1419
|
-
return function () {
|
|
1420
|
-
var _listRef$current2;
|
|
1421
|
-
return (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.removeEventListener("scroll", checkScroll);
|
|
1422
|
-
};
|
|
1423
|
-
}, [data]);
|
|
1424
|
-
var checkScroll = function checkScroll() {
|
|
1425
|
-
if (listRef.current) {
|
|
1426
|
-
var _listRef$current3 = listRef.current,
|
|
1427
|
-
scrollLeft = _listRef$current3.scrollLeft,
|
|
1428
|
-
scrollWidth = _listRef$current3.scrollWidth,
|
|
1429
|
-
clientWidth = _listRef$current3.clientWidth;
|
|
1430
|
-
setCanScrollLeft(scrollLeft > 0);
|
|
1431
|
-
setCanScrollRight(scrollLeft + clientWidth < scrollWidth - 1);
|
|
1432
|
-
}
|
|
1433
|
-
};
|
|
1434
|
-
var handleClickPrevImg = function handleClickPrevImg() {
|
|
1435
|
-
if (listRef.current) {
|
|
1436
|
-
checkScroll();
|
|
1437
|
-
listRef.current.scrollBy({
|
|
1438
|
-
left: -300,
|
|
1439
|
-
behavior: "smooth"
|
|
1440
|
-
});
|
|
1441
|
-
}
|
|
1442
|
-
};
|
|
1443
|
-
var handleClickNextImg = function handleClickNextImg() {
|
|
1444
|
-
if (listRef.current) {
|
|
1445
|
-
checkScroll();
|
|
1446
|
-
listRef.current.scrollBy({
|
|
1447
|
-
left: 300,
|
|
1448
|
-
behavior: "smooth"
|
|
1449
|
-
});
|
|
1450
|
-
}
|
|
1451
|
-
};
|
|
1452
|
-
var handleOnClick = function handleOnClick(item) {
|
|
1453
|
-
setValue(item);
|
|
1454
|
-
onClick === null || onClick === void 0 ? void 0 : onClick(item);
|
|
1455
|
-
};
|
|
1456
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
1457
|
-
className: "h-10 md:h-12 flex justify-between items-center " + className,
|
|
1458
|
-
style: style
|
|
1459
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1460
|
-
className: "w-full overflow-hidden "
|
|
1461
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1462
|
-
className: "flex overflow-x-auto gap-2 " + (isNavigateButton ? "no-scrollbar" : "scroll-custom pb-2") + " items-center",
|
|
1463
|
-
ref: listRef
|
|
1464
|
-
}, isAll ? /*#__PURE__*/React__default.createElement("div", {
|
|
1465
|
-
className: " " + ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(value)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0 ? "bg-primary text-textButton" : "bg-background") + " w-max border border-primary p-1 md:p-2 rounded-lg cursor-pointer whitespace-nowrap",
|
|
1466
|
-
onClick: function onClick() {
|
|
1467
|
-
handleOnClick({});
|
|
1468
|
-
}
|
|
1469
|
-
}, "T\u1EA5t c\u1EA3") : null, data && (data === null || data === void 0 ? void 0 : data.length) > 0 && (data === null || data === void 0 ? void 0 : data.map(function (item, index) {
|
|
1470
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
1471
|
-
className: ((value === null || value === void 0 ? void 0 : value.value) === (item === null || item === void 0 ? void 0 : item.value) ? "bg-primary text-textButton" : "bg-background") + " w-max border border-primary py-1 px-2 md:py-2 md:px-3 rounded-lg cursor-pointer whitespace-nowrap " + itemClassName,
|
|
1472
|
-
key: "carousel-" + index,
|
|
1473
|
-
onClick: function onClick() {
|
|
1474
|
-
handleOnClick(item);
|
|
1475
|
-
}
|
|
1476
|
-
}, item === null || item === void 0 ? void 0 : item.label);
|
|
1477
|
-
})))), isNavigateButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
1478
|
-
className: "hidden my-auto gap-4 md:flex justify-end ps-10"
|
|
1479
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
1480
|
-
className: "h-full w-9 h-9 md:h-11 md:w-11 items-center justify-center rounded-full " + (canScrollLeft ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
|
|
1481
|
-
onClick: handleClickPrevImg,
|
|
1482
|
-
disabled: !canScrollLeft
|
|
1483
|
-
}, /*#__PURE__*/React__default.createElement(io.IoIosArrowBack, {
|
|
1484
|
-
size: 24,
|
|
1485
|
-
className: "inline-block text-lg"
|
|
1486
|
-
})), /*#__PURE__*/React__default.createElement("button", {
|
|
1487
|
-
className: "h-full w-9 h-9 md:h-11 md:w-11 flex items-center justify-center rounded-full " + (canScrollRight ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
|
|
1488
|
-
onClick: handleClickNextImg,
|
|
1489
|
-
disabled: !canScrollRight
|
|
1490
|
-
}, /*#__PURE__*/React__default.createElement(io.IoIosArrowForward, {
|
|
1491
|
-
size: 24,
|
|
1492
|
-
className: "inline-block text-lg "
|
|
1493
|
-
}))) : null);
|
|
1494
|
-
};
|
|
1495
|
-
|
|
1496
1418
|
// A type of promise-like that resolves synchronously and supports only one observer
|
|
1497
1419
|
|
|
1498
1420
|
const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
|
|
@@ -1512,6 +1434,19 @@ function _catch(body, recover) {
|
|
|
1512
1434
|
return result;
|
|
1513
1435
|
}
|
|
1514
1436
|
|
|
1437
|
+
// Asynchronously await a promise and pass the result to a finally continuation
|
|
1438
|
+
function _finallyRethrows(body, finalizer) {
|
|
1439
|
+
try {
|
|
1440
|
+
var result = body();
|
|
1441
|
+
} catch (e) {
|
|
1442
|
+
return finalizer(true, e);
|
|
1443
|
+
}
|
|
1444
|
+
if (result && result.then) {
|
|
1445
|
+
return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
|
|
1446
|
+
}
|
|
1447
|
+
return finalizer(false, result);
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1515
1450
|
function bind(fn, thisArg) {
|
|
1516
1451
|
return function wrap() {
|
|
1517
1452
|
return fn.apply(thisArg, arguments);
|
|
@@ -7603,6 +7538,14 @@ var formatCurrency = function formatCurrency(amount) {
|
|
|
7603
7538
|
var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
7604
7539
|
return formattedAmount + " \u20AB";
|
|
7605
7540
|
};
|
|
7541
|
+
var formatCurrency2 = function formatCurrency2(amount) {
|
|
7542
|
+
if (isNaN(amount)) {
|
|
7543
|
+
return 'đ 0';
|
|
7544
|
+
}
|
|
7545
|
+
var roundedAmount = Math.round(amount);
|
|
7546
|
+
var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
7547
|
+
return "\u0111 " + formattedAmount;
|
|
7548
|
+
};
|
|
7606
7549
|
var pattern = {
|
|
7607
7550
|
phoneNumberPattern: /^(?:\+84|0)\d{9}$/
|
|
7608
7551
|
};
|
|
@@ -7700,102 +7643,273 @@ var Hero13 = function Hero13(props) {
|
|
|
7700
7643
|
var _sectionData$, _sectionData$$srcImag, _data$data, _data$data$;
|
|
7701
7644
|
var listRef = React.useRef(null);
|
|
7702
7645
|
var _useState = React.useState(false);
|
|
7703
|
-
var
|
|
7646
|
+
var shopConfig = props.shopConfig,
|
|
7647
|
+
data = props.data;
|
|
7704
7648
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7705
7649
|
var _CategoryController = CategoryController(props);
|
|
7706
7650
|
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("img", {
|
|
7707
7651
|
src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : (_sectionData$$srcImag = _sectionData$.srcImages) === null || _sectionData$$srcImag === void 0 ? void 0 : _sectionData$$srcImag[0],
|
|
7708
7652
|
alt: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : _data$data$.title,
|
|
7709
7653
|
className: "w-full object-cover"
|
|
7710
|
-
})
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
var data = props.data;
|
|
7715
|
-
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7716
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
7717
|
-
className: "" + SECTION_DEFAULT_CLASS
|
|
7654
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7655
|
+
className: "fixed right-6 bottom-10 md:bottom-24 z-50 flex flex-col gap-4 w-max"
|
|
7656
|
+
}, /*#__PURE__*/React__default.createElement("a", {
|
|
7657
|
+
href: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopPhone ? "tel:" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone) : "#"
|
|
7718
7658
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7719
|
-
className: "
|
|
7720
|
-
},
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7659
|
+
className: "relative w-max"
|
|
7660
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
7661
|
+
className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
|
|
7662
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7663
|
+
className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
|
|
7664
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlinePhone, {
|
|
7665
|
+
size: 36
|
|
7666
|
+
})))), /*#__PURE__*/React__default.createElement("a", {
|
|
7667
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#",
|
|
7668
|
+
target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopMessenger ? "_blank" : "_self"
|
|
7669
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7670
|
+
className: "relative w-max"
|
|
7671
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
7672
|
+
className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
|
|
7673
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7674
|
+
className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
|
|
7675
|
+
}, /*#__PURE__*/React__default.createElement(fa.FaFacebookMessenger, {
|
|
7676
|
+
size: 32
|
|
7677
|
+
})))), /*#__PURE__*/React__default.createElement("a", {
|
|
7678
|
+
href: "https://zalo.me/" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#",
|
|
7679
|
+
target: "_blank"
|
|
7680
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7681
|
+
className: "relative w-max"
|
|
7682
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
7683
|
+
className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
|
|
7684
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7685
|
+
className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
|
|
7686
|
+
}, /*#__PURE__*/React__default.createElement(si.SiZalo, {
|
|
7687
|
+
size: 32
|
|
7688
|
+
}))))));
|
|
7735
7689
|
};
|
|
7736
7690
|
|
|
7737
|
-
var
|
|
7738
|
-
var _data$
|
|
7691
|
+
var Hero14 = function Hero14(props) {
|
|
7692
|
+
var _data$data, _data$data$, _data$data$$srcImages, _sectionData$, _sectionData$2, _sectionData$3, _sectionData$4, _sectionData$4$button;
|
|
7739
7693
|
var shopConfigStyle = props.shopConfigStyle,
|
|
7740
|
-
shopConfig = props.shopConfig,
|
|
7741
7694
|
data = props.data,
|
|
7742
|
-
_props$SectionTitle = props.SectionTitle,
|
|
7743
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
7744
7695
|
_props$Link = props.Link,
|
|
7745
7696
|
Link = _props$Link === void 0 ? null : _props$Link;
|
|
7746
7697
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7747
|
-
data.sectionTitle = data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.replace("{shopName}", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName);
|
|
7748
|
-
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
7749
|
-
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
|
|
7750
|
-
textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
7751
|
-
_shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
|
|
7752
|
-
background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
|
|
7753
|
-
_shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
|
|
7754
|
-
bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
7755
7698
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7756
|
-
className:
|
|
7699
|
+
className: "relative w-full bg-cover bg-center bg-no-repeat ",
|
|
7757
7700
|
style: {
|
|
7758
|
-
|
|
7759
|
-
color: textBody
|
|
7701
|
+
backgroundImage: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0]) + ")"
|
|
7760
7702
|
}
|
|
7761
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
7762
|
-
|
|
7763
|
-
shopConfigStyle: shopConfigStyle
|
|
7703
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7704
|
+
className: "absolute top-0 w-full h-full bg-black opacity-40 z-0"
|
|
7764
7705
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7765
|
-
className: "
|
|
7766
|
-
},
|
|
7706
|
+
className: "relative w-full min-h-[540px] p-12 z-10 flex flex-col gap-6 items-center justify-end bg-gradient-to-t from-black/50 to-transparent"
|
|
7707
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7708
|
+
className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
7709
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.title), sectionData !== null && sectionData !== void 0 && (_sectionData$2 = sectionData[0]) !== null && _sectionData$2 !== void 0 && _sectionData$2.description ? /*#__PURE__*/React__default.createElement("div", {
|
|
7710
|
+
className: "text-lg text-center text-white md:text-2xl"
|
|
7711
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$3 = sectionData[0]) === null || _sectionData$3 === void 0 ? void 0 : _sectionData$3.description) : null, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$4 = sectionData[0]) === null || _sectionData$4 === void 0 ? void 0 : (_sectionData$4$button = _sectionData$4.buttons) === null || _sectionData$4$button === void 0 ? void 0 : _sectionData$4$button.map(function (button, index) {
|
|
7767
7712
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7768
7713
|
Link: Link,
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
}, /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title), item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
7777
|
-
className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 h-auto"
|
|
7778
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7779
|
-
dangerouslySetInnerHTML: {
|
|
7780
|
-
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
7781
|
-
}
|
|
7782
|
-
})) : /*#__PURE__*/React__default.createElement("img", {
|
|
7783
|
-
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
7784
|
-
className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 object-cover",
|
|
7785
|
-
alt: ""
|
|
7786
|
-
})));
|
|
7714
|
+
key: "gdf-" + index,
|
|
7715
|
+
href: convertURL(button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
7716
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
7717
|
+
label: button === null || button === void 0 ? void 0 : button.label,
|
|
7718
|
+
className: "!bg-secondary",
|
|
7719
|
+
shopConfigStyle: shopConfigStyle
|
|
7720
|
+
}));
|
|
7787
7721
|
})));
|
|
7788
7722
|
};
|
|
7789
7723
|
|
|
7790
|
-
var
|
|
7791
|
-
var
|
|
7792
|
-
|
|
7793
|
-
_props$
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7724
|
+
var Hero15 = function Hero15(props) {
|
|
7725
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3$, _data$data4, _data$data4$, _data$data4$$buttons, _data$data5, _data$data5$, _data$data5$$buttons, _data$data5$$buttons$, _data$data6, _data$data6$, _data$data6$$buttons, _data$data6$$buttons$, _data$data7, _data$data7$, _data$data7$$buttons, _data$data7$$buttons$, _data$data8, _data$data8$, _data$data8$$srcImage;
|
|
7726
|
+
var _props$data = props.data,
|
|
7727
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
7728
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
7729
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
7730
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7731
|
+
className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-2 py-12 !bg-primary gap-6 md:gap-10"
|
|
7732
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
7733
|
+
src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
|
|
7734
|
+
className: "object-cover max-w-full h-auto border-4 border-secondary block md:hidden"
|
|
7735
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7736
|
+
className: "relative flex flex-col justify-center gap-6 lg:gap-10"
|
|
7737
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7738
|
+
className: "text-2xl md:text-4xl !leading-[1.6] font-headingFont text-textSecondary"
|
|
7739
|
+
}, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : (_data$data2$$title = _data$data2$.title) === null || _data$data2$$title === void 0 ? void 0 : _data$data2$$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
|
|
7740
|
+
className: "text-lg text-textButton"
|
|
7741
|
+
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description), /*#__PURE__*/React__default.createElement("hr", {
|
|
7742
|
+
className: "w-1/3"
|
|
7743
|
+
}), (data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : (_data$data4$$buttons = _data$data4$.buttons) === null || _data$data4$$buttons === void 0 ? void 0 : _data$data4$$buttons.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7744
|
+
href: (data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : (_data$data5$ = _data$data5[0]) === null || _data$data5$ === void 0 ? void 0 : (_data$data5$$buttons = _data$data5$.buttons) === null || _data$data5$$buttons === void 0 ? void 0 : (_data$data5$$buttons$ = _data$data5$$buttons[0]) === null || _data$data5$$buttons$ === void 0 ? void 0 : _data$data5$$buttons$.route) || (data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : (_data$data6$$buttons = _data$data6$.buttons) === null || _data$data6$$buttons === void 0 ? void 0 : (_data$data6$$buttons$ = _data$data6$$buttons[0]) === null || _data$data6$$buttons$ === void 0 ? void 0 : _data$data6$$buttons$.link) || "#"
|
|
7745
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
7746
|
+
label: data === null || data === void 0 ? void 0 : (_data$data7 = data.data) === null || _data$data7 === void 0 ? void 0 : (_data$data7$ = _data$data7[0]) === null || _data$data7$ === void 0 ? void 0 : (_data$data7$$buttons = _data$data7$.buttons) === null || _data$data7$$buttons === void 0 ? void 0 : (_data$data7$$buttons$ = _data$data7$$buttons[0]) === null || _data$data7$$buttons$ === void 0 ? void 0 : _data$data7$$buttons$.label,
|
|
7747
|
+
shopConfigStyle: shopConfigStyle,
|
|
7748
|
+
className: "!font-normal w-max !bg-secondary"
|
|
7749
|
+
})) : null), /*#__PURE__*/React__default.createElement("img", {
|
|
7750
|
+
src: data === null || data === void 0 ? void 0 : (_data$data8 = data.data) === null || _data$data8 === void 0 ? void 0 : (_data$data8$ = _data$data8[0]) === null || _data$data8$ === void 0 ? void 0 : (_data$data8$$srcImage = _data$data8$.srcImages) === null || _data$data8$$srcImage === void 0 ? void 0 : _data$data8$$srcImage[0],
|
|
7751
|
+
className: "object-cover max-w-full h-auto border-4 border-secondary hidden md:block"
|
|
7752
|
+
}));
|
|
7753
|
+
};
|
|
7754
|
+
|
|
7755
|
+
var Hero16 = function Hero16(props) {
|
|
7756
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$srcImage;
|
|
7757
|
+
var _props$data = props.data,
|
|
7758
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
7759
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
7760
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
7761
|
+
_props$router = props.router,
|
|
7762
|
+
router = _props$router === void 0 ? function () {} : _props$router,
|
|
7763
|
+
_props$Link = props.Link,
|
|
7764
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
7765
|
+
var _useState = React.useState(""),
|
|
7766
|
+
value = _useState[0],
|
|
7767
|
+
setValue = _useState[1];
|
|
7768
|
+
var handleSearch = function handleSearch(e) {
|
|
7769
|
+
if ((e === null || e === void 0 ? void 0 : e.key) === "Enter" && value && value.length > 0) {
|
|
7770
|
+
router === null || router === void 0 ? void 0 : router.push(genLinkSearch(value));
|
|
7771
|
+
}
|
|
7772
|
+
};
|
|
7773
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7774
|
+
className: "min-h-[480px] w-full h-full relative"
|
|
7775
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
7776
|
+
src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
|
|
7777
|
+
className: "object-cover max-w-full h-auto"
|
|
7778
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7779
|
+
className: "absolute top-0 left-0 z-0 bg-secondary opacity-80 w-full h-full"
|
|
7780
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7781
|
+
className: "w-full md:w-2/3 absolute top-[10%] md:top-1/3 left-0 z-10 px-4 xl:px-20 flex flex-col gap-6 text-textButton my-auto"
|
|
7782
|
+
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
7783
|
+
className: "font-medium text-2xl lg:text-4xl"
|
|
7784
|
+
}, "Thu\u1ED1c t\u1ED1t, gi\xE1 t\u1ED1t - V\xEC s\u1EE9c kh\u1ECFe c\u1EE7a b\u1EA1n"), /*#__PURE__*/React__default.createElement("div", {
|
|
7785
|
+
className: " text-lg lg:text-2xl"
|
|
7786
|
+
}, "Ch\xFAng t\xF4i lu\xF4n n\u1ED5 l\u1EF1c h\u1EBFt m\xECnh cung c\u1EA5p s\u1EA3n ph\u1EA9m v\xE0 d\u1ECBch v\u1EE5 \u0111\xFAng v\u1EDBi gi\xE1 tr\u1ECB m\xE0 kh\xE1ch h\xE0ng mong \u0111\u1EE3i."), /*#__PURE__*/React__default.createElement("div", {
|
|
7787
|
+
className: "flex flex-col md:flex-row gap-4 w-full"
|
|
7788
|
+
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
7789
|
+
wrapClassName: "w-full md:w-2/3 xl:w-[85%]",
|
|
7790
|
+
icons: /*#__PURE__*/React__default.createElement(lu.LuSearch, {
|
|
7791
|
+
className: "text-gray3",
|
|
7792
|
+
size: 18
|
|
7793
|
+
}),
|
|
7794
|
+
placeholder: "Nh\u1EADp t\xEAn s\u1EA3n ph\u1EA9m",
|
|
7795
|
+
inputClassName: "w-full text-textBody",
|
|
7796
|
+
className: "h-12",
|
|
7797
|
+
onKeyDown: function onKeyDown(e) {
|
|
7798
|
+
handleSearch(e);
|
|
7799
|
+
},
|
|
7800
|
+
onChange: setValue
|
|
7801
|
+
}), value && (value === null || value === void 0 ? void 0 : value.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7802
|
+
Link: Link,
|
|
7803
|
+
href: genLinkSearch(value)
|
|
7804
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
7805
|
+
label: "T\xECm ki\u1EBFm",
|
|
7806
|
+
className: "whitespace-nowrap h-12 w-max",
|
|
7807
|
+
shopConfigStyle: shopConfigStyle
|
|
7808
|
+
})) : /*#__PURE__*/React__default.createElement(Button, {
|
|
7809
|
+
label: "T\xECm ki\u1EBFm",
|
|
7810
|
+
className: "whitespace-nowrap w-max h-12",
|
|
7811
|
+
shopConfigStyle: shopConfigStyle
|
|
7812
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
7813
|
+
className: "absolute bottom-0 right-0 text-primary w-[45%] z-10"
|
|
7814
|
+
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
7815
|
+
viewBox: "0 0 480 212",
|
|
7816
|
+
fill: "none",
|
|
7817
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
7818
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
7819
|
+
d: "M75.1847 149.804C55 189.553 14.9932 204.532 0 212H480V0C424.514 20.7319 393 94.1529 216.361 62.1956C120.186 44.7957 96.1405 108.537 75.1847 149.804Z",
|
|
7820
|
+
fill: "currentColor"
|
|
7821
|
+
}))), /*#__PURE__*/React__default.createElement("img", {
|
|
7822
|
+
src: data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : (_data$data2$$srcImage = _data$data2$.srcImages) === null || _data$data2$$srcImage === void 0 ? void 0 : _data$data2$$srcImage[1],
|
|
7823
|
+
className: "object-cover w-[28%] h-auto absolute right-10 opacity-100 bottom-0 z-10"
|
|
7824
|
+
}));
|
|
7825
|
+
};
|
|
7826
|
+
|
|
7827
|
+
var Features2 = function Features2(props) {
|
|
7828
|
+
var data = props.data;
|
|
7829
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7830
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7831
|
+
className: "" + SECTION_DEFAULT_CLASS
|
|
7832
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7833
|
+
className: "p-6 grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6 lg:gap-8 rounded-xl bg-bgSecondary"
|
|
7834
|
+
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
7835
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7836
|
+
className: "flex flex-col gap-2 items-center text-sm lg:text-lg font-semibold text-center",
|
|
7837
|
+
key: "dfgg-" + index
|
|
7838
|
+
}, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
7839
|
+
className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24 h-24",
|
|
7840
|
+
dangerouslySetInnerHTML: {
|
|
7841
|
+
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
7842
|
+
}
|
|
7843
|
+
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
7844
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
7845
|
+
className: "w-12 md:w-16 lg:w-20 xl:w-24 text-primary",
|
|
7846
|
+
alt: "logo"
|
|
7847
|
+
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title));
|
|
7848
|
+
})));
|
|
7849
|
+
};
|
|
7850
|
+
|
|
7851
|
+
var Features3 = function Features3(props) {
|
|
7852
|
+
var _data$sectionTitle;
|
|
7853
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
7854
|
+
shopConfig = props.shopConfig,
|
|
7855
|
+
data = props.data,
|
|
7856
|
+
_props$SectionTitle = props.SectionTitle,
|
|
7857
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
7858
|
+
_props$Link = props.Link,
|
|
7859
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
7860
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7861
|
+
data.sectionTitle = data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.replace("{shopName}", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName);
|
|
7862
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
7863
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
|
|
7864
|
+
textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
7865
|
+
_shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
|
|
7866
|
+
background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
|
|
7867
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
|
|
7868
|
+
bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
7869
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7870
|
+
className: SECTION_DEFAULT_CLASS + " flex flex-col gap-4 lg:gap-6",
|
|
7871
|
+
style: {
|
|
7872
|
+
background: background,
|
|
7873
|
+
color: textBody
|
|
7874
|
+
}
|
|
7875
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
7876
|
+
data: data,
|
|
7877
|
+
shopConfigStyle: shopConfigStyle
|
|
7878
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7879
|
+
className: "grid grid-cols-2 sm:grid-cols-4 gap-6 text-sm md:text-base"
|
|
7880
|
+
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
7881
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7882
|
+
Link: Link,
|
|
7883
|
+
href: (item === null || item === void 0 ? void 0 : item.link) || convertURL(item === null || item === void 0 ? void 0 : item.route) || "#"
|
|
7884
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7885
|
+
className: "grid grid-cols-2 p-3 h-full w-full rounded-lg font-semibold",
|
|
7886
|
+
key: "dfsdfj-" + index,
|
|
7887
|
+
style: {
|
|
7888
|
+
background: bgSecondary
|
|
7889
|
+
}
|
|
7890
|
+
}, /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title), item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
7891
|
+
className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 h-auto"
|
|
7892
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7893
|
+
dangerouslySetInnerHTML: {
|
|
7894
|
+
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
7895
|
+
}
|
|
7896
|
+
})) : /*#__PURE__*/React__default.createElement("img", {
|
|
7897
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
7898
|
+
className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 object-cover",
|
|
7899
|
+
alt: ""
|
|
7900
|
+
})));
|
|
7901
|
+
})));
|
|
7902
|
+
};
|
|
7903
|
+
|
|
7904
|
+
var ProductController = function ProductController(props) {
|
|
7905
|
+
var shopConfig = props.shopConfig,
|
|
7906
|
+
params = props.params,
|
|
7907
|
+
_props$isAutoGetList = props.isAutoGetList,
|
|
7908
|
+
isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList;
|
|
7909
|
+
var _useState = React.useState([]),
|
|
7910
|
+
products = _useState[0],
|
|
7911
|
+
setProducts = _useState[1];
|
|
7912
|
+
var _useState2 = React.useState(false),
|
|
7799
7913
|
loading = _useState2[0],
|
|
7800
7914
|
setLoading = _useState2[1];
|
|
7801
7915
|
var _useState3 = React.useState(),
|
|
@@ -7822,11 +7936,6 @@ var ProductController = function ProductController(props) {
|
|
|
7822
7936
|
var _res$data2, _res$data3;
|
|
7823
7937
|
setProducts(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
|
|
7824
7938
|
setPage(res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.page);
|
|
7825
|
-
var url = new URL(window.location.href);
|
|
7826
|
-
if (/^(\/(danh-muc))\/[^/]+-\d+$/.test(url.pathname)) {
|
|
7827
|
-
url.pathname = url.pathname.replace(/\/[^/]+-\d+$/, "");
|
|
7828
|
-
window.history.replaceState({}, '', url.pathname + url.search);
|
|
7829
|
-
}
|
|
7830
7939
|
}
|
|
7831
7940
|
setLoading(false);
|
|
7832
7941
|
});
|
|
@@ -8226,6 +8335,7 @@ var NotFoundProduct = function NotFoundProduct(props) {
|
|
|
8226
8335
|
};
|
|
8227
8336
|
|
|
8228
8337
|
var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
8338
|
+
var _products$slice;
|
|
8229
8339
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
8230
8340
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
8231
8341
|
_props$data = props.data,
|
|
@@ -8238,7 +8348,8 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8238
8348
|
_shopConfigStyle$colo2 = _shopConfigStyle$colo.secondary,
|
|
8239
8349
|
secondary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2;
|
|
8240
8350
|
var _useState = React.useState({
|
|
8241
|
-
types: "1"
|
|
8351
|
+
types: "1,10",
|
|
8352
|
+
size: 12
|
|
8242
8353
|
}),
|
|
8243
8354
|
params = _useState[0],
|
|
8244
8355
|
setParams = _useState[1];
|
|
@@ -8255,15 +8366,27 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8255
8366
|
var _useState2 = React.useState(0),
|
|
8256
8367
|
selectedCategory = _useState2[0],
|
|
8257
8368
|
setSelectedCategory = _useState2[1];
|
|
8369
|
+
var _useState3 = React.useState(true),
|
|
8370
|
+
isGetMore = _useState3[0],
|
|
8371
|
+
setIsGetMore = _useState3[1];
|
|
8258
8372
|
React.useEffect(function () {
|
|
8259
8373
|
var newParams = _extends({}, params, {
|
|
8260
|
-
categoryId: selectedCategory
|
|
8374
|
+
categoryId: selectedCategory,
|
|
8375
|
+
size: 12
|
|
8261
8376
|
});
|
|
8262
8377
|
if (!selectedCategory) {
|
|
8263
8378
|
delete newParams.categoryId;
|
|
8264
8379
|
}
|
|
8265
8380
|
setParams(newParams);
|
|
8266
8381
|
}, [selectedCategory]);
|
|
8382
|
+
var handleGetMoreProducts = function handleGetMoreProducts() {
|
|
8383
|
+
setIsGetMore(false);
|
|
8384
|
+
setParams(function (prev) {
|
|
8385
|
+
return _extends({}, prev, {
|
|
8386
|
+
size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
|
|
8387
|
+
});
|
|
8388
|
+
});
|
|
8389
|
+
};
|
|
8267
8390
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
8268
8391
|
className: SECTION_DEFAULT_CLASS + " relative"
|
|
8269
8392
|
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
@@ -8280,15 +8403,16 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8280
8403
|
key: index,
|
|
8281
8404
|
className: "p-3 flex gap-3 shrink-0 cursor-pointer text-base " + (selectedCategory === item.categoryId ? "bg-primary text-textButton" : ""),
|
|
8282
8405
|
onClick: function onClick() {
|
|
8283
|
-
|
|
8406
|
+
setSelectedCategory(item.categoryId);
|
|
8407
|
+
setIsGetMore(true);
|
|
8284
8408
|
}
|
|
8285
8409
|
}, item === null || item === void 0 ? void 0 : item.cateName);
|
|
8286
8410
|
}
|
|
8287
|
-
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
8411
|
+
}), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
8288
8412
|
className: "flex w-full justify-center p-12"
|
|
8289
|
-
}, /*#__PURE__*/React__default.createElement(Loading, null)) : products
|
|
8413
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
8290
8414
|
className: "grid grid-cols-1 md:grid-cols-2 gap-10 mt-6"
|
|
8291
|
-
}, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
8415
|
+
}, 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) {
|
|
8292
8416
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
8293
8417
|
key: index,
|
|
8294
8418
|
Link: Link,
|
|
@@ -8298,7 +8422,13 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8298
8422
|
}));
|
|
8299
8423
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
|
|
8300
8424
|
text: "d\u1ECBch v\u1EE5"
|
|
8301
|
-
})
|
|
8425
|
+
}), !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", {
|
|
8426
|
+
className: "w-full flex justify-center mt-6"
|
|
8427
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
8428
|
+
label: "Xem thêm",
|
|
8429
|
+
onClick: handleGetMoreProducts,
|
|
8430
|
+
className: "" + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
|
|
8431
|
+
})) : null), /*#__PURE__*/React__default.createElement(Dash, {
|
|
8302
8432
|
color: secondary
|
|
8303
8433
|
}));
|
|
8304
8434
|
};
|
|
@@ -8316,7 +8446,7 @@ var TreatmentsList6 = function TreatmentsList6(props) {
|
|
|
8316
8446
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
8317
8447
|
var _useState = React.useState({
|
|
8318
8448
|
size: 12,
|
|
8319
|
-
types: "1"
|
|
8449
|
+
types: "1,10"
|
|
8320
8450
|
}),
|
|
8321
8451
|
params = _useState[0],
|
|
8322
8452
|
setParams = _useState[1];
|
|
@@ -8515,82 +8645,178 @@ var BookingController = function BookingController(props) {
|
|
|
8515
8645
|
};
|
|
8516
8646
|
};
|
|
8517
8647
|
|
|
8518
|
-
var
|
|
8648
|
+
var DateTimePicker = React.forwardRef(function (props, ref) {
|
|
8519
8649
|
var _props$label = props.label,
|
|
8520
8650
|
label = _props$label === void 0 ? "" : _props$label,
|
|
8521
|
-
_props$labelClassName = props.labelClassName,
|
|
8522
|
-
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8523
|
-
_props$placeholder = props.placeholder,
|
|
8524
|
-
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
8525
8651
|
_props$className = props.className,
|
|
8526
8652
|
className = _props$className === void 0 ? "" : _props$className,
|
|
8527
|
-
_props$
|
|
8528
|
-
|
|
8529
|
-
_props$wrapClassName = props.wrapClassName,
|
|
8530
|
-
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
8531
|
-
_props$selectClassNam = props.selectClassName,
|
|
8532
|
-
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
8533
|
-
_props$disabled = props.disabled,
|
|
8534
|
-
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
8535
|
-
_props$rules = props.rules,
|
|
8536
|
-
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
8537
|
-
options = props.options,
|
|
8653
|
+
_props$labelClassName = props.labelClassName,
|
|
8654
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8538
8655
|
_props$defaultValue = props.defaultValue,
|
|
8539
|
-
defaultValue = _props$defaultValue === void 0 ?
|
|
8540
|
-
|
|
8541
|
-
_props$
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
|
|
8547
|
-
_props$funcDelete = props.funcDelete,
|
|
8548
|
-
funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
|
|
8549
|
-
_props$isSearch = props.isSearch,
|
|
8550
|
-
isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
|
|
8551
|
-
renderItem = props.renderItem;
|
|
8552
|
-
var _useState = React.useState(false),
|
|
8553
|
-
isOpen = _useState[0],
|
|
8554
|
-
setIsOpen = _useState[1];
|
|
8555
|
-
var selectRef = React.useRef(null);
|
|
8656
|
+
defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
|
|
8657
|
+
_props$time = props.time,
|
|
8658
|
+
time = _props$time === void 0 ? false : _props$time,
|
|
8659
|
+
rules = props.rules;
|
|
8660
|
+
var _useState = React.useState(defaultValue),
|
|
8661
|
+
value = _useState[0],
|
|
8662
|
+
_setValue = _useState[1];
|
|
8556
8663
|
var _useState2 = React.useState(""),
|
|
8557
8664
|
error = _useState2[0],
|
|
8558
8665
|
_setError = _useState2[1];
|
|
8559
|
-
var
|
|
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
|
-
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
|
|
8593
|
-
|
|
8666
|
+
var _className = "h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer " + className;
|
|
8667
|
+
var CustomInput = React.forwardRef(function (_ref, ref) {
|
|
8668
|
+
var value = _ref.value,
|
|
8669
|
+
onClick = _ref.onClick,
|
|
8670
|
+
className = _ref.className;
|
|
8671
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8672
|
+
className: className,
|
|
8673
|
+
onClick: onClick,
|
|
8674
|
+
ref: ref
|
|
8675
|
+
}, value);
|
|
8676
|
+
});
|
|
8677
|
+
React.useImperativeHandle(ref, function () {
|
|
8678
|
+
return {
|
|
8679
|
+
validateData: function validateData() {
|
|
8680
|
+
return _validateData();
|
|
8681
|
+
},
|
|
8682
|
+
setValue: function setValue(text) {
|
|
8683
|
+
return _setValue(text);
|
|
8684
|
+
},
|
|
8685
|
+
getValue: function getValue() {
|
|
8686
|
+
return value;
|
|
8687
|
+
},
|
|
8688
|
+
setError: function setError(err) {
|
|
8689
|
+
return _setError(err);
|
|
8690
|
+
}
|
|
8691
|
+
};
|
|
8692
|
+
});
|
|
8693
|
+
var _validateData = function _validateData() {
|
|
8694
|
+
var count = 0;
|
|
8695
|
+
rules === null || rules === void 0 ? void 0 : rules.forEach(function (e) {
|
|
8696
|
+
var _e$pattern, _e$validate;
|
|
8697
|
+
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
|
|
8698
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8699
|
+
count++;
|
|
8700
|
+
return false;
|
|
8701
|
+
} 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))) {
|
|
8702
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8703
|
+
count++;
|
|
8704
|
+
return false;
|
|
8705
|
+
} 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))) {
|
|
8706
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8707
|
+
count++;
|
|
8708
|
+
return false;
|
|
8709
|
+
}
|
|
8710
|
+
});
|
|
8711
|
+
if (count) {
|
|
8712
|
+
return false;
|
|
8713
|
+
} else {
|
|
8714
|
+
_setError('');
|
|
8715
|
+
return true;
|
|
8716
|
+
}
|
|
8717
|
+
};
|
|
8718
|
+
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
8719
|
+
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
8720
|
+
}));
|
|
8721
|
+
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
8722
|
+
className: "text-danger"
|
|
8723
|
+
}, " *") : null;
|
|
8724
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8725
|
+
className: "w-full"
|
|
8726
|
+
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
8727
|
+
className: "mb-1 " + labelClassName
|
|
8728
|
+
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
|
|
8729
|
+
selected: value,
|
|
8730
|
+
onChange: function onChange(date) {
|
|
8731
|
+
_setValue(date);
|
|
8732
|
+
},
|
|
8733
|
+
customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
|
|
8734
|
+
className: _className
|
|
8735
|
+
}),
|
|
8736
|
+
dateFormat: time ? "dd/MM/yyyy HH:mm" : "dd/MM/yyyy",
|
|
8737
|
+
showTimeSelect: time,
|
|
8738
|
+
timeIntervals: 15,
|
|
8739
|
+
wrapperClassName: "w-full"
|
|
8740
|
+
}), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
8741
|
+
className: "text-danger"
|
|
8742
|
+
}, error) : null);
|
|
8743
|
+
});
|
|
8744
|
+
|
|
8745
|
+
var Select = React.forwardRef(function (props, ref) {
|
|
8746
|
+
var _props$label = props.label,
|
|
8747
|
+
label = _props$label === void 0 ? "" : _props$label,
|
|
8748
|
+
_props$labelClassName = props.labelClassName,
|
|
8749
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8750
|
+
_props$placeholder = props.placeholder,
|
|
8751
|
+
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
8752
|
+
_props$className = props.className,
|
|
8753
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
8754
|
+
_props$optionClassNam = props.optionClassName,
|
|
8755
|
+
optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
|
|
8756
|
+
_props$wrapClassName = props.wrapClassName,
|
|
8757
|
+
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
8758
|
+
_props$selectClassNam = props.selectClassName,
|
|
8759
|
+
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
8760
|
+
_props$disabled = props.disabled,
|
|
8761
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
8762
|
+
_props$rules = props.rules,
|
|
8763
|
+
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
8764
|
+
options = props.options,
|
|
8765
|
+
_props$defaultValue = props.defaultValue,
|
|
8766
|
+
defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
|
|
8767
|
+
_props$isMulti = props.isMulti,
|
|
8768
|
+
isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
|
|
8769
|
+
_props$onClick = props.onClick,
|
|
8770
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
8771
|
+
_props$isButtonDelete = props.isButtonDelete,
|
|
8772
|
+
isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
|
|
8773
|
+
_props$funcDelete = props.funcDelete,
|
|
8774
|
+
funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
|
|
8775
|
+
_props$isSearch = props.isSearch,
|
|
8776
|
+
isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
|
|
8777
|
+
renderItem = props.renderItem;
|
|
8778
|
+
var _useState = React.useState(false),
|
|
8779
|
+
isOpen = _useState[0],
|
|
8780
|
+
setIsOpen = _useState[1];
|
|
8781
|
+
var selectRef = React.useRef(null);
|
|
8782
|
+
var _useState2 = React.useState(""),
|
|
8783
|
+
error = _useState2[0],
|
|
8784
|
+
_setError = _useState2[1];
|
|
8785
|
+
var _useState3 = React.useState(""),
|
|
8786
|
+
inputSearch = _useState3[0],
|
|
8787
|
+
setInputSearch = _useState3[1];
|
|
8788
|
+
var _useState4 = React.useState(defaultValue),
|
|
8789
|
+
value = _useState4[0],
|
|
8790
|
+
setValue = _useState4[1];
|
|
8791
|
+
var _useState5 = React.useState(options),
|
|
8792
|
+
listOptions = _useState5[0],
|
|
8793
|
+
setListOptions = _useState5[1];
|
|
8794
|
+
var dropdownRef = React.useRef(null);
|
|
8795
|
+
var _useState6 = React.useState('bottom'),
|
|
8796
|
+
dropdownPosition = _useState6[0],
|
|
8797
|
+
setDropdownPosition = _useState6[1];
|
|
8798
|
+
var inputRef = React.useRef(null);
|
|
8799
|
+
React.useEffect(function () {
|
|
8800
|
+
if (isMulti) setValue(defaultValue);
|
|
8801
|
+
}, [defaultValue]);
|
|
8802
|
+
React.useEffect(function () {
|
|
8803
|
+
setListOptions(options);
|
|
8804
|
+
if (!isMulti) setValue(defaultValue);
|
|
8805
|
+
}, [options]);
|
|
8806
|
+
React.useEffect(function () {
|
|
8807
|
+
var delayDebounceFn = setTimeout(function () {
|
|
8808
|
+
handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
|
|
8809
|
+
}, 600);
|
|
8810
|
+
return function () {
|
|
8811
|
+
return clearTimeout(delayDebounceFn);
|
|
8812
|
+
};
|
|
8813
|
+
}, [inputSearch]);
|
|
8814
|
+
React.useEffect(function () {
|
|
8815
|
+
var _inputRef$current;
|
|
8816
|
+
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
8817
|
+
var updateDropdownPosition = function updateDropdownPosition() {
|
|
8818
|
+
if (selectRef.current && dropdownRef.current) {
|
|
8819
|
+
var _selectRef$current, _window;
|
|
8594
8820
|
var selectRect = selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.getBoundingClientRect();
|
|
8595
8821
|
var spaceBelow = ((_window = window) === null || _window === void 0 ? void 0 : _window.innerHeight) - (selectRect === null || selectRect === void 0 ? void 0 : selectRect.bottom);
|
|
8596
8822
|
var spaceAbove = selectRect === null || selectRect === void 0 ? void 0 : selectRect.top;
|
|
@@ -8662,20 +8888,13 @@ var Select = React.forwardRef(function (props, ref) {
|
|
|
8662
8888
|
}
|
|
8663
8889
|
};
|
|
8664
8890
|
var handleSearch = function handleSearch(searchValue) {
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
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());
|
|
8671
|
-
});
|
|
8672
|
-
setListOptions(listFilterOptions);
|
|
8673
|
-
}
|
|
8891
|
+
var listFilterOptions = options.filter(function (item) {
|
|
8892
|
+
var _item$label;
|
|
8893
|
+
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());
|
|
8894
|
+
});
|
|
8895
|
+
setListOptions(listFilterOptions);
|
|
8674
8896
|
};
|
|
8675
8897
|
var handleToggleSelect = function handleToggleSelect() {
|
|
8676
|
-
if (!isOpen && handleSearchOption && typeof handleSearchOption === 'function') {
|
|
8677
|
-
handleSearchOption("");
|
|
8678
|
-
}
|
|
8679
8898
|
setIsOpen(!isOpen);
|
|
8680
8899
|
setInputSearch("");
|
|
8681
8900
|
setListOptions(options);
|
|
@@ -8774,103 +8993,6 @@ var Select = React.forwardRef(function (props, ref) {
|
|
|
8774
8993
|
});
|
|
8775
8994
|
var Select$1 = React.memo(Select);
|
|
8776
8995
|
|
|
8777
|
-
var DateTimePicker = React.forwardRef(function (props, ref) {
|
|
8778
|
-
var _props$label = props.label,
|
|
8779
|
-
label = _props$label === void 0 ? "" : _props$label,
|
|
8780
|
-
_props$className = props.className,
|
|
8781
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
8782
|
-
_props$labelClassName = props.labelClassName,
|
|
8783
|
-
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8784
|
-
_props$defaultValue = props.defaultValue,
|
|
8785
|
-
defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
|
|
8786
|
-
_props$time = props.time,
|
|
8787
|
-
time = _props$time === void 0 ? false : _props$time,
|
|
8788
|
-
rules = props.rules;
|
|
8789
|
-
var _useState = React.useState(defaultValue),
|
|
8790
|
-
value = _useState[0],
|
|
8791
|
-
_setValue = _useState[1];
|
|
8792
|
-
var _useState2 = React.useState(""),
|
|
8793
|
-
error = _useState2[0],
|
|
8794
|
-
_setError = _useState2[1];
|
|
8795
|
-
var _className = "h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer " + className;
|
|
8796
|
-
var CustomInput = React.forwardRef(function (_ref, ref) {
|
|
8797
|
-
var value = _ref.value,
|
|
8798
|
-
onClick = _ref.onClick,
|
|
8799
|
-
className = _ref.className;
|
|
8800
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
8801
|
-
className: className,
|
|
8802
|
-
onClick: onClick,
|
|
8803
|
-
ref: ref
|
|
8804
|
-
}, value);
|
|
8805
|
-
});
|
|
8806
|
-
React.useImperativeHandle(ref, function () {
|
|
8807
|
-
return {
|
|
8808
|
-
validateData: function validateData() {
|
|
8809
|
-
return _validateData();
|
|
8810
|
-
},
|
|
8811
|
-
setValue: function setValue(text) {
|
|
8812
|
-
return _setValue(text);
|
|
8813
|
-
},
|
|
8814
|
-
getValue: function getValue() {
|
|
8815
|
-
return value;
|
|
8816
|
-
},
|
|
8817
|
-
setError: function setError(err) {
|
|
8818
|
-
return _setError(err);
|
|
8819
|
-
}
|
|
8820
|
-
};
|
|
8821
|
-
});
|
|
8822
|
-
var _validateData = function _validateData() {
|
|
8823
|
-
var count = 0;
|
|
8824
|
-
rules === null || rules === void 0 ? void 0 : rules.forEach(function (e) {
|
|
8825
|
-
var _e$pattern, _e$validate;
|
|
8826
|
-
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
|
|
8827
|
-
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8828
|
-
count++;
|
|
8829
|
-
return false;
|
|
8830
|
-
} 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))) {
|
|
8831
|
-
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8832
|
-
count++;
|
|
8833
|
-
return false;
|
|
8834
|
-
} 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))) {
|
|
8835
|
-
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8836
|
-
count++;
|
|
8837
|
-
return false;
|
|
8838
|
-
}
|
|
8839
|
-
});
|
|
8840
|
-
if (count) {
|
|
8841
|
-
return false;
|
|
8842
|
-
} else {
|
|
8843
|
-
_setError('');
|
|
8844
|
-
return true;
|
|
8845
|
-
}
|
|
8846
|
-
};
|
|
8847
|
-
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
8848
|
-
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
8849
|
-
}));
|
|
8850
|
-
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
8851
|
-
className: "text-danger"
|
|
8852
|
-
}, " *") : null;
|
|
8853
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
8854
|
-
className: "w-full"
|
|
8855
|
-
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
8856
|
-
className: "mb-1 " + labelClassName
|
|
8857
|
-
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
|
|
8858
|
-
selected: value,
|
|
8859
|
-
onChange: function onChange(date) {
|
|
8860
|
-
_setValue(date);
|
|
8861
|
-
},
|
|
8862
|
-
customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
|
|
8863
|
-
className: _className
|
|
8864
|
-
}),
|
|
8865
|
-
dateFormat: time ? "dd/MM/yyyy HH:mm" : "dd/MM/yyyy",
|
|
8866
|
-
showTimeSelect: time,
|
|
8867
|
-
timeIntervals: 15,
|
|
8868
|
-
wrapperClassName: "w-full"
|
|
8869
|
-
}), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
8870
|
-
className: "text-danger"
|
|
8871
|
-
}, error) : null);
|
|
8872
|
-
});
|
|
8873
|
-
|
|
8874
8996
|
var InputPhoneNumber = React.forwardRef(function (props, ref) {
|
|
8875
8997
|
var _props$label = props.label,
|
|
8876
8998
|
label = _props$label === void 0 ? "" : _props$label,
|
|
@@ -9019,150 +9141,312 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
|
|
|
9019
9141
|
}, error) : null);
|
|
9020
9142
|
});
|
|
9021
9143
|
|
|
9022
|
-
var
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
|
|
9031
|
-
|
|
9032
|
-
|
|
9033
|
-
|
|
9034
|
-
|
|
9035
|
-
|
|
9144
|
+
var Select$2 = React.forwardRef(function (props, ref) {
|
|
9145
|
+
var _props$label = props.label,
|
|
9146
|
+
label = _props$label === void 0 ? "" : _props$label,
|
|
9147
|
+
_props$labelClassName = props.labelClassName,
|
|
9148
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
9149
|
+
_props$placeholder = props.placeholder,
|
|
9150
|
+
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
9151
|
+
_props$className = props.className,
|
|
9152
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
9153
|
+
_props$optionClassNam = props.optionClassName,
|
|
9154
|
+
optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
|
|
9155
|
+
_props$wrapClassName = props.wrapClassName,
|
|
9156
|
+
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
9157
|
+
_props$selectClassNam = props.selectClassName,
|
|
9158
|
+
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
9159
|
+
_props$disabled = props.disabled,
|
|
9160
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
9161
|
+
_props$rules = props.rules,
|
|
9162
|
+
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
9163
|
+
options = props.options,
|
|
9164
|
+
_props$defaultValue = props.defaultValue,
|
|
9165
|
+
defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
|
|
9166
|
+
handleSearchOption = props.handleSearchOption,
|
|
9167
|
+
_props$isMulti = props.isMulti,
|
|
9168
|
+
isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
|
|
9169
|
+
_props$onClick = props.onClick,
|
|
9170
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
9171
|
+
_props$isButtonDelete = props.isButtonDelete,
|
|
9172
|
+
isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
|
|
9173
|
+
_props$funcDelete = props.funcDelete,
|
|
9174
|
+
funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
|
|
9175
|
+
setParams = props.setParams,
|
|
9176
|
+
_props$isSearch = props.isSearch,
|
|
9177
|
+
isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
|
|
9178
|
+
renderItem = props.renderItem;
|
|
9179
|
+
var _useState = React.useState(false),
|
|
9180
|
+
isOpen = _useState[0],
|
|
9181
|
+
setIsOpen = _useState[1];
|
|
9182
|
+
var selectRef = React.useRef(null);
|
|
9183
|
+
var _useState2 = React.useState(""),
|
|
9184
|
+
error = _useState2[0],
|
|
9185
|
+
_setError = _useState2[1];
|
|
9186
|
+
var _useState3 = React.useState(""),
|
|
9187
|
+
inputSearch = _useState3[0],
|
|
9188
|
+
setInputSearch = _useState3[1];
|
|
9189
|
+
var _useState4 = React.useState(defaultValue),
|
|
9190
|
+
value = _useState4[0],
|
|
9191
|
+
setValue = _useState4[1];
|
|
9192
|
+
var _useState5 = React.useState(options),
|
|
9193
|
+
listOptions = _useState5[0],
|
|
9194
|
+
setListOptions = _useState5[1];
|
|
9195
|
+
var dropdownRef = React.useRef(null);
|
|
9196
|
+
var _useState6 = React.useState('bottom'),
|
|
9197
|
+
dropdownPosition = _useState6[0],
|
|
9198
|
+
setDropdownPosition = _useState6[1];
|
|
9199
|
+
var inputRef = React.useRef(null);
|
|
9200
|
+
var _useState7 = React.useState(12),
|
|
9201
|
+
nextTrigger = _useState7[0],
|
|
9202
|
+
setNextTrigger = _useState7[1];
|
|
9203
|
+
var optionRef = React.useRef(null);
|
|
9204
|
+
React.useEffect(function () {
|
|
9205
|
+
if (isMulti) setValue(defaultValue);
|
|
9206
|
+
}, [defaultValue]);
|
|
9207
|
+
React.useEffect(function () {
|
|
9208
|
+
setListOptions(options);
|
|
9209
|
+
if (!isMulti) setValue(defaultValue);
|
|
9210
|
+
}, [options]);
|
|
9211
|
+
React.useEffect(function () {
|
|
9212
|
+
if (typeof setParams !== 'function') return;
|
|
9213
|
+
var handleScroll = function handleScroll() {
|
|
9214
|
+
if (!optionRef.current) return;
|
|
9215
|
+
var children = optionRef.current.querySelectorAll('div.option');
|
|
9216
|
+
var parentRect = optionRef.current.getBoundingClientRect();
|
|
9217
|
+
children.forEach(function (child, index) {
|
|
9218
|
+
var rect = child.getBoundingClientRect();
|
|
9219
|
+
if (rect.top >= parentRect.top && rect.bottom <= parentRect.bottom) {
|
|
9220
|
+
if (index === nextTrigger) {
|
|
9221
|
+
setParams === null || setParams === void 0 ? void 0 : setParams(function (prev) {
|
|
9222
|
+
return _extends({}, prev, {
|
|
9223
|
+
size: (prev === null || prev === void 0 ? void 0 : prev.size) + 8
|
|
9224
|
+
});
|
|
9225
|
+
});
|
|
9226
|
+
setNextTrigger(function (prev) {
|
|
9227
|
+
return prev + 8;
|
|
9228
|
+
});
|
|
9229
|
+
}
|
|
9230
|
+
}
|
|
9231
|
+
});
|
|
9232
|
+
};
|
|
9233
|
+
if (optionRef.current) {
|
|
9234
|
+
optionRef.current.addEventListener('scroll', handleScroll);
|
|
9235
|
+
}
|
|
9236
|
+
return function () {
|
|
9237
|
+
if (optionRef.current) {
|
|
9238
|
+
optionRef.current.removeEventListener('scroll', handleScroll);
|
|
9239
|
+
}
|
|
9240
|
+
};
|
|
9241
|
+
}, [listOptions, nextTrigger]);
|
|
9242
|
+
React.useEffect(function () {
|
|
9243
|
+
var delayDebounceFn = setTimeout(function () {
|
|
9244
|
+
handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
|
|
9245
|
+
if (optionRef.current) {
|
|
9246
|
+
optionRef.current.scrollTop = 0;
|
|
9247
|
+
}
|
|
9248
|
+
}, 600);
|
|
9249
|
+
return function () {
|
|
9250
|
+
return clearTimeout(delayDebounceFn);
|
|
9251
|
+
};
|
|
9252
|
+
}, [inputSearch]);
|
|
9253
|
+
React.useEffect(function () {
|
|
9254
|
+
var _inputRef$current;
|
|
9255
|
+
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
9256
|
+
var updateDropdownPosition = function updateDropdownPosition() {
|
|
9257
|
+
if (selectRef.current && dropdownRef.current) {
|
|
9258
|
+
var _selectRef$current, _window;
|
|
9259
|
+
var selectRect = selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.getBoundingClientRect();
|
|
9260
|
+
var spaceBelow = ((_window = window) === null || _window === void 0 ? void 0 : _window.innerHeight) - (selectRect === null || selectRect === void 0 ? void 0 : selectRect.bottom);
|
|
9261
|
+
var spaceAbove = selectRect === null || selectRect === void 0 ? void 0 : selectRect.top;
|
|
9262
|
+
if (spaceBelow < spaceAbove) {
|
|
9263
|
+
setDropdownPosition('top');
|
|
9264
|
+
} else {
|
|
9265
|
+
setDropdownPosition('bottom');
|
|
9266
|
+
}
|
|
9267
|
+
}
|
|
9268
|
+
};
|
|
9269
|
+
if (isOpen) {
|
|
9270
|
+
updateDropdownPosition();
|
|
9271
|
+
window.addEventListener('resize', updateDropdownPosition);
|
|
9272
|
+
}
|
|
9273
|
+
return function () {
|
|
9274
|
+
window.removeEventListener('resize', updateDropdownPosition);
|
|
9275
|
+
};
|
|
9276
|
+
}, [isOpen]);
|
|
9277
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
9278
|
+
var _selectRef$current2;
|
|
9279
|
+
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))) {
|
|
9280
|
+
setIsOpen(false);
|
|
9281
|
+
setInputSearch("");
|
|
9282
|
+
setListOptions(options);
|
|
9283
|
+
}
|
|
9284
|
+
};
|
|
9285
|
+
React.useEffect(function () {
|
|
9286
|
+
document.addEventListener('click', handleClickOutside);
|
|
9287
|
+
return function () {
|
|
9288
|
+
document.removeEventListener('click', handleClickOutside);
|
|
9289
|
+
};
|
|
9290
|
+
}, []);
|
|
9291
|
+
React.useImperativeHandle(ref, function () {
|
|
9292
|
+
return {
|
|
9293
|
+
validateData: function validateData() {
|
|
9294
|
+
return _validateData();
|
|
9295
|
+
},
|
|
9296
|
+
setError: function setError(err) {
|
|
9297
|
+
return _setError(err);
|
|
9036
9298
|
}
|
|
9299
|
+
};
|
|
9300
|
+
});
|
|
9301
|
+
var isEmpty = function isEmpty(value) {
|
|
9302
|
+
var _Object$keys;
|
|
9303
|
+
if (Array !== null && Array !== void 0 && Array.isArray(value)) return (value === null || value === void 0 ? void 0 : value.length) <= 0;
|
|
9304
|
+
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;
|
|
9305
|
+
return false;
|
|
9306
|
+
};
|
|
9307
|
+
var _validateData = function _validateData() {
|
|
9308
|
+
var count = 0;
|
|
9309
|
+
for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
|
|
9310
|
+
var _e$pattern;
|
|
9311
|
+
var e = _step.value;
|
|
9312
|
+
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && isEmpty(value)) {
|
|
9313
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
9314
|
+
count++;
|
|
9315
|
+
break;
|
|
9316
|
+
} 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))) {
|
|
9317
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
9318
|
+
count++;
|
|
9319
|
+
break;
|
|
9320
|
+
}
|
|
9321
|
+
}
|
|
9322
|
+
if (count) {
|
|
9323
|
+
return false;
|
|
9324
|
+
} else {
|
|
9325
|
+
_setError('');
|
|
9326
|
+
return true;
|
|
9327
|
+
}
|
|
9328
|
+
};
|
|
9329
|
+
var handleSearch = function handleSearch(searchValue) {
|
|
9330
|
+
if (handleSearchOption && typeof handleSearchOption === 'function') {
|
|
9331
|
+
handleSearchOption === null || handleSearchOption === void 0 ? void 0 : handleSearchOption(searchValue);
|
|
9332
|
+
setNextTrigger(12);
|
|
9333
|
+
} else {
|
|
9334
|
+
var listFilterOptions = options.filter(function (item) {
|
|
9335
|
+
var _item$label;
|
|
9336
|
+
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());
|
|
9337
|
+
});
|
|
9338
|
+
setListOptions(listFilterOptions);
|
|
9037
9339
|
}
|
|
9038
|
-
|
|
9039
|
-
|
|
9040
|
-
|
|
9041
|
-
|
|
9042
|
-
|
|
9043
|
-
|
|
9044
|
-
|
|
9045
|
-
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
|
|
9049
|
-
|
|
9050
|
-
write: function (value) {
|
|
9051
|
-
return encodeURIComponent(value).replace(
|
|
9052
|
-
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
9053
|
-
decodeURIComponent
|
|
9054
|
-
)
|
|
9340
|
+
};
|
|
9341
|
+
var handleToggleSelect = function handleToggleSelect() {
|
|
9342
|
+
setIsOpen(!isOpen);
|
|
9343
|
+
setInputSearch("");
|
|
9344
|
+
setListOptions(options);
|
|
9345
|
+
if (typeof setParams === 'function') {
|
|
9346
|
+
setParams === null || setParams === void 0 ? void 0 : setParams(function (prev) {
|
|
9347
|
+
return _extends({}, prev, {
|
|
9348
|
+
size: 16
|
|
9349
|
+
});
|
|
9350
|
+
});
|
|
9351
|
+
setNextTrigger(12);
|
|
9055
9352
|
}
|
|
9056
9353
|
};
|
|
9057
|
-
|
|
9058
|
-
|
|
9059
|
-
|
|
9060
|
-
|
|
9061
|
-
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
if (typeof attributes.expires === 'number') {
|
|
9070
|
-
attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
|
|
9071
|
-
}
|
|
9072
|
-
if (attributes.expires) {
|
|
9073
|
-
attributes.expires = attributes.expires.toUTCString();
|
|
9074
|
-
}
|
|
9075
|
-
|
|
9076
|
-
name = encodeURIComponent(name)
|
|
9077
|
-
.replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
|
|
9078
|
-
.replace(/[()]/g, escape);
|
|
9079
|
-
|
|
9080
|
-
var stringifiedAttributes = '';
|
|
9081
|
-
for (var attributeName in attributes) {
|
|
9082
|
-
if (!attributes[attributeName]) {
|
|
9083
|
-
continue
|
|
9084
|
-
}
|
|
9085
|
-
|
|
9086
|
-
stringifiedAttributes += '; ' + attributeName;
|
|
9087
|
-
|
|
9088
|
-
if (attributes[attributeName] === true) {
|
|
9089
|
-
continue
|
|
9090
|
-
}
|
|
9091
|
-
|
|
9092
|
-
// Considers RFC 6265 section 5.2:
|
|
9093
|
-
// ...
|
|
9094
|
-
// 3. If the remaining unparsed-attributes contains a %x3B (";")
|
|
9095
|
-
// character:
|
|
9096
|
-
// Consume the characters of the unparsed-attributes up to,
|
|
9097
|
-
// not including, the first %x3B (";") character.
|
|
9098
|
-
// ...
|
|
9099
|
-
stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
|
|
9100
|
-
}
|
|
9101
|
-
|
|
9102
|
-
return (document.cookie =
|
|
9103
|
-
name + '=' + converter.write(value, name) + stringifiedAttributes)
|
|
9354
|
+
var checkSelection = function checkSelection(valueId) {
|
|
9355
|
+
if (isMulti) return value === null || value === void 0 ? void 0 : value.some(function (item) {
|
|
9356
|
+
return (item === null || item === void 0 ? void 0 : item.value) === valueId;
|
|
9357
|
+
});
|
|
9358
|
+
return (value === null || value === void 0 ? void 0 : value.value) == valueId;
|
|
9359
|
+
};
|
|
9360
|
+
var handleSelection = function handleSelection(item, e) {
|
|
9361
|
+
e.stopPropagation();
|
|
9362
|
+
if (!isMulti) {
|
|
9363
|
+
setValue(item);
|
|
9364
|
+
setIsOpen(false);
|
|
9104
9365
|
}
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
|
|
9366
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(item);
|
|
9367
|
+
};
|
|
9368
|
+
var handleDeleteSelection = function handleDeleteSelection(e, item) {
|
|
9369
|
+
e.stopPropagation();
|
|
9370
|
+
if (isMulti === false) setValue({});
|
|
9371
|
+
funcDelete === null || funcDelete === void 0 ? void 0 : funcDelete(item);
|
|
9372
|
+
};
|
|
9373
|
+
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
9374
|
+
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
9375
|
+
}));
|
|
9376
|
+
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
9377
|
+
className: "text-danger"
|
|
9378
|
+
}, " *") : null;
|
|
9379
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9380
|
+
ref: selectRef,
|
|
9381
|
+
className: "relative " + wrapClassName
|
|
9382
|
+
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
9383
|
+
className: "mb-1 " + labelClassName
|
|
9384
|
+
}, label, " ", labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
9385
|
+
className: "flex flex-col gap-2 rounded-lg w-full bg-white " + (disabled ? "!bg-gray6" : "") + " border border-stroke " + className
|
|
9386
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
9387
|
+
className: " w-full h-10 bg-transparent flex justify-between items-center px-3 py-2 " + selectClassName,
|
|
9388
|
+
onClick: handleToggleSelect,
|
|
9389
|
+
disabled: disabled
|
|
9390
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9391
|
+
className: "flex justify-between items-center w-full"
|
|
9392
|
+
}, isEmpty(value) || isMulti ? /*#__PURE__*/React__default.createElement("div", {
|
|
9393
|
+
className: "text-gray3 line-clamp-1"
|
|
9394
|
+
}, placeholder) : /*#__PURE__*/React__default.createElement("div", {
|
|
9395
|
+
className: "w-full text-start pointer-events-none line-clamp-1",
|
|
9396
|
+
dangerouslySetInnerHTML: {
|
|
9397
|
+
__html: value === null || value === void 0 ? void 0 : value.label
|
|
9130
9398
|
}
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9399
|
+
}), isButtonDelete && !isEmpty(value) ? /*#__PURE__*/React__default.createElement("div", {
|
|
9400
|
+
onClick: function onClick(e) {
|
|
9401
|
+
handleDeleteSelection(e, value);
|
|
9402
|
+
}
|
|
9403
|
+
}, /*#__PURE__*/React__default.createElement(rx.RxCross2, null)) : /*#__PURE__*/React__default.createElement("div", {
|
|
9404
|
+
className: "ms-1"
|
|
9405
|
+
}, /*#__PURE__*/React__default.createElement(fa.FaAngleUp, {
|
|
9406
|
+
className: "text-xs"
|
|
9407
|
+
}), /*#__PURE__*/React__default.createElement(fa.FaAngleDown, {
|
|
9408
|
+
className: "text-xs"
|
|
9409
|
+
})))), isOpen ? /*#__PURE__*/React__default.createElement("div", {
|
|
9410
|
+
ref: dropdownRef,
|
|
9411
|
+
style: {
|
|
9412
|
+
background: "#FFFFFF"
|
|
9413
|
+
},
|
|
9414
|
+
className: "absolute p-1 my-2 rounded-2xl w-full z-40 border " + (dropdownPosition === 'top' ? 'bottom-full mb-2' : 'top-full mt-2') + " " + optionClassName
|
|
9415
|
+
}, /*#__PURE__*/React__default.createElement("div", null, isSearch ? /*#__PURE__*/React__default.createElement("div", {
|
|
9416
|
+
className: "px-3 flex items-center border-b-[1px]"
|
|
9417
|
+
}, /*#__PURE__*/React__default.createElement(lu.LuSearch, {
|
|
9418
|
+
className: "inline text-gray3 me-2"
|
|
9419
|
+
}), /*#__PURE__*/React__default.createElement("input", {
|
|
9420
|
+
type: "text",
|
|
9421
|
+
ref: inputRef,
|
|
9422
|
+
className: "py-2 w-full border-0 focus:outline-none focus:ring-0",
|
|
9423
|
+
placeholder: "T\xECm ki\u1EBFm",
|
|
9424
|
+
value: inputSearch,
|
|
9425
|
+
onChange: function onChange(e) {
|
|
9426
|
+
setInputSearch(e.target.value);
|
|
9427
|
+
}
|
|
9428
|
+
})) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
9429
|
+
className: "overflow-y-auto max-h-72 scroll-container",
|
|
9430
|
+
ref: optionRef
|
|
9431
|
+
}, (listOptions === null || listOptions === void 0 ? void 0 : listOptions.length) > 0 ? listOptions === null || listOptions === void 0 ? void 0 : listOptions.map(function (item, index) {
|
|
9432
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9433
|
+
key: "gjfd-" + index,
|
|
9434
|
+
className: "option px-2 cursor-default py-1.5 flex items-center hover:bg-gray-100 rounded-lg",
|
|
9435
|
+
onClick: function onClick(e) {
|
|
9436
|
+
handleSelection(item, e);
|
|
9155
9437
|
}
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
|
|
9438
|
+
}, /*#__PURE__*/React__default.createElement(io.IoMdCheckmark, {
|
|
9439
|
+
className: (checkSelection(item === null || item === void 0 ? void 0 : item.value) ? "" : 'invisible') + " inline me-2 w-4"
|
|
9440
|
+
}), renderItem ? renderItem(item) : /*#__PURE__*/React__default.createElement("div", {
|
|
9441
|
+
className: " whitespace-nowrap line-clamp-1"
|
|
9442
|
+
}, item === null || item === void 0 ? void 0 : item.label));
|
|
9443
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
9444
|
+
className: "py-6 text-center"
|
|
9445
|
+
}, "Kh\xF4ng c\xF3 k\u1EBFt qu\u1EA3")))) : null), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
9446
|
+
className: "text-danger"
|
|
9447
|
+
}, error) : null);
|
|
9165
9448
|
});
|
|
9449
|
+
var SelectDynamic = React.memo(Select$2);
|
|
9166
9450
|
|
|
9167
9451
|
var BookingForm = function BookingForm(props) {
|
|
9168
9452
|
var _props$shopConfig = props.shopConfig,
|
|
@@ -9179,7 +9463,8 @@ var BookingForm = function BookingForm(props) {
|
|
|
9179
9463
|
isModalBooking = _props$isModalBooking === void 0 ? false : _props$isModalBooking;
|
|
9180
9464
|
var _useState = React.useState(false);
|
|
9181
9465
|
var _useState2 = React.useState({
|
|
9182
|
-
types: "1,10"
|
|
9466
|
+
types: "1,10",
|
|
9467
|
+
size: 16
|
|
9183
9468
|
}),
|
|
9184
9469
|
productsParams = _useState2[0],
|
|
9185
9470
|
setProductsParams = _useState2[1];
|
|
@@ -9353,6 +9638,7 @@ var BookingForm = function BookingForm(props) {
|
|
|
9353
9638
|
var handleSearchProducts = function handleSearchProducts(value) {
|
|
9354
9639
|
setProductsParams(function (prev) {
|
|
9355
9640
|
return _extends({}, prev, {
|
|
9641
|
+
size: 16,
|
|
9356
9642
|
productName: value
|
|
9357
9643
|
});
|
|
9358
9644
|
});
|
|
@@ -9389,7 +9675,8 @@ var BookingForm = function BookingForm(props) {
|
|
|
9389
9675
|
className: "grid grid-cols-1 gap-4"
|
|
9390
9676
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9391
9677
|
className: "relative"
|
|
9392
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
9678
|
+
}, /*#__PURE__*/React__default.createElement(SelectDynamic, {
|
|
9679
|
+
setParams: setProductsParams,
|
|
9393
9680
|
ref: inputSelectedRef,
|
|
9394
9681
|
isMulti: true,
|
|
9395
9682
|
defaultValue: listProductSelected,
|
|
@@ -9505,6 +9792,7 @@ var BookingForm = function BookingForm(props) {
|
|
|
9505
9792
|
className: "text-center"
|
|
9506
9793
|
}, "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"))));
|
|
9507
9794
|
};
|
|
9795
|
+
var BookingForm$1 = React.memo(BookingForm);
|
|
9508
9796
|
|
|
9509
9797
|
var TreatmentsList7 = function TreatmentsList7(props) {
|
|
9510
9798
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
@@ -9625,7 +9913,7 @@ var TreatmentsList7 = function TreatmentsList7(props) {
|
|
|
9625
9913
|
color: secondary
|
|
9626
9914
|
}), isOpenModal ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
9627
9915
|
onClose: handleCloseModal
|
|
9628
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
9916
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
9629
9917
|
className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh] !bg-bgSecondary",
|
|
9630
9918
|
onCloseFormBooking: handleCloseModal,
|
|
9631
9919
|
defaultValue: dataBooking,
|
|
@@ -9767,13 +10055,13 @@ var ServiceDetail1 = function ServiceDetail1(props) {
|
|
|
9767
10055
|
product: product,
|
|
9768
10056
|
className: "w-full aspect-square !object-contain rounded-2xl"
|
|
9769
10057
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
9770
|
-
className: "flex gap-
|
|
10058
|
+
className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
|
|
9771
10059
|
}, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
|
|
9772
10060
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
9773
10061
|
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
9774
10062
|
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
9775
10063
|
alt: "",
|
|
9776
|
-
className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " h-
|
|
10064
|
+
className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " \n h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full rounded-md lg:rounded-lg aspect-square object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
|
|
9777
10065
|
onClick: function onClick() {
|
|
9778
10066
|
handleDisplayImage(item);
|
|
9779
10067
|
}
|
|
@@ -9820,7 +10108,7 @@ var ServiceDetail1 = function ServiceDetail1(props) {
|
|
|
9820
10108
|
className: "text-gray3 mt-2"
|
|
9821
10109
|
}, "Kh\xF4ng c\xF3 th\xF4ng tin"))), isBooking ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
9822
10110
|
onClose: handleCloseModal
|
|
9823
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
10111
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
9824
10112
|
isModalBooking: isBooking,
|
|
9825
10113
|
className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh]",
|
|
9826
10114
|
onCloseFormBooking: handleCloseModal,
|
|
@@ -9894,7 +10182,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
|
|
|
9894
10182
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9895
10183
|
className: "flex flex-col gap-4 col-span-2"
|
|
9896
10184
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9897
|
-
className: "rounded-2xl
|
|
10185
|
+
className: "rounded-2xl bg-background border"
|
|
9898
10186
|
}, displayImage ? /*#__PURE__*/React__default.createElement("img", {
|
|
9899
10187
|
src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
|
|
9900
10188
|
className: "w-full aspect-square object-contain rounded-2xl"
|
|
@@ -9902,13 +10190,13 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
|
|
|
9902
10190
|
product: product,
|
|
9903
10191
|
className: "w-full aspect-square !object-contain rounded-2xl"
|
|
9904
10192
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
9905
|
-
className: "flex gap-
|
|
10193
|
+
className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
|
|
9906
10194
|
}, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
|
|
9907
10195
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
9908
10196
|
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
9909
10197
|
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
9910
10198
|
alt: "",
|
|
9911
|
-
className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " h-
|
|
10199
|
+
className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " \n h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full rounded-md lg:rounded-lg aspect-square object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
|
|
9912
10200
|
onClick: function onClick() {
|
|
9913
10201
|
handleDisplayImage(item);
|
|
9914
10202
|
}
|
|
@@ -9955,7 +10243,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
|
|
|
9955
10243
|
className: "text-gray3 mt-2"
|
|
9956
10244
|
}, "Kh\xF4ng c\xF3 th\xF4ng tin"))), isBooking ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
9957
10245
|
onClose: handleCloseModal
|
|
9958
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
10246
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
9959
10247
|
isModalBooking: isBooking,
|
|
9960
10248
|
className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh]",
|
|
9961
10249
|
onCloseFormBooking: handleCloseModal,
|
|
@@ -10030,7 +10318,7 @@ var ProductItem3 = function ProductItem3(props) {
|
|
|
10030
10318
|
className: "w-full border border-stroke rounded-2xl " + className
|
|
10031
10319
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10032
10320
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10033
|
-
className: "w-full
|
|
10321
|
+
className: "w-full rounded-t-2xl"
|
|
10034
10322
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10035
10323
|
className: "p-4 flex flex-col gap-2 md:gap-4 items-start"
|
|
10036
10324
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -10057,7 +10345,7 @@ var ProductItem4 = function ProductItem4(props) {
|
|
|
10057
10345
|
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
|
|
10058
10346
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10059
10347
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10060
|
-
className: "w-full
|
|
10348
|
+
className: "w-full rounded-2xl"
|
|
10061
10349
|
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10062
10350
|
className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis text-lg"
|
|
10063
10351
|
}, 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, {
|
|
@@ -10092,7 +10380,7 @@ var ProductItem5 = function ProductItem5(props) {
|
|
|
10092
10380
|
className: "w-full flex flex-col gap-4 rounded-2xl p-1 " + className
|
|
10093
10381
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10094
10382
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10095
|
-
className: "w-full
|
|
10383
|
+
className: "w-full rounded-2xl"
|
|
10096
10384
|
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10097
10385
|
className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
|
|
10098
10386
|
}, 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, {
|
|
@@ -10125,7 +10413,7 @@ var ProductItem6 = function ProductItem6(props) {
|
|
|
10125
10413
|
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
|
|
10126
10414
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10127
10415
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10128
|
-
className: "w-full
|
|
10416
|
+
className: "w-full !aspect-[3/4] rounded-2xl"
|
|
10129
10417
|
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10130
10418
|
className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
|
|
10131
10419
|
}, 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, {
|
|
@@ -10143,66 +10431,238 @@ var ProductItem6 = function ProductItem6(props) {
|
|
|
10143
10431
|
};
|
|
10144
10432
|
|
|
10145
10433
|
var ProductItem7 = function ProductItem7(props) {
|
|
10146
|
-
var _product$productInfo, _product$productInfo2, _product$productInfo3, _product$productInfo4, _product$productInfo5, _product$productInfo6;
|
|
10434
|
+
var _product$productInfo, _product$productInfo2, _product$productInfo3, _product$productInfo4, _product$productInfo5, _product$productInfo6, _product$productInfo7, _product$productInfo8, _product$productInfo9, _product$productInfo10, _product$productInfo11;
|
|
10435
|
+
var product = props.product,
|
|
10436
|
+
_props$Link = props.Link,
|
|
10437
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10438
|
+
_props$className = props.className,
|
|
10439
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
10440
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10441
|
+
Link: Link,
|
|
10442
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10443
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10444
|
+
className: "w-full bg-bgSecondary relative p-2 md:p-4 rounded-2xl " + className
|
|
10445
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10446
|
+
className: "relative"
|
|
10447
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10448
|
+
className: "px-2 md:px-4 xl:px-6"
|
|
10449
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10450
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10451
|
+
className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl !object-contain"
|
|
10452
|
+
})), (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", {
|
|
10453
|
+
className: "absolute top-4 left-0 py-1 px-4 rounded-r-2xl bg-danger text-textButton font-semibold shadow-lg"
|
|
10454
|
+
}, "-", 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", {
|
|
10455
|
+
className: "flex flex-col mt-4 gap-4 items-start"
|
|
10456
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10457
|
+
className: "line-clamp-2 min-h-12 w-full overflow-hidden text-ellipsis"
|
|
10458
|
+
}, 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, {
|
|
10459
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10460
|
+
className: "text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10461
|
+
})), 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", {
|
|
10462
|
+
className: "absolute top-5 left-0 font-semibold px-3 py-1 bg-danger text-textButton rounded-r-2xl shadow-lg v-max"
|
|
10463
|
+
}, 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));
|
|
10464
|
+
};
|
|
10465
|
+
|
|
10466
|
+
var ProductItem8 = function ProductItem8(props) {
|
|
10467
|
+
var _product$productInfo;
|
|
10147
10468
|
var product = props.product,
|
|
10148
10469
|
_props$Link = props.Link,
|
|
10149
10470
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10150
10471
|
_props$className = props.className,
|
|
10151
10472
|
className = _props$className === void 0 ? "" : _props$className,
|
|
10152
|
-
_props$
|
|
10153
|
-
|
|
10473
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10474
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
10154
10475
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10155
10476
|
Link: Link,
|
|
10156
10477
|
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10157
10478
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10158
|
-
className: "
|
|
10479
|
+
className: "text-center rounded relative group " + className
|
|
10480
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10481
|
+
className: "relative "
|
|
10159
10482
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10160
10483
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10161
|
-
className: "
|
|
10484
|
+
className: "!aspect-[5/8] rounded"
|
|
10162
10485
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10163
|
-
className: "
|
|
10486
|
+
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 "
|
|
10164
10487
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10165
|
-
className: "
|
|
10488
|
+
className: "text-lg text-textButton"
|
|
10166
10489
|
}, 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, {
|
|
10167
10490
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10168
|
-
className:
|
|
10169
|
-
|
|
10170
|
-
|
|
10171
|
-
},
|
|
10491
|
+
className: !(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "",
|
|
10492
|
+
priceClassName: "text-textButton !font-normal",
|
|
10493
|
+
priceBeforeDiscountClassName: "text-textButton !font-normal"
|
|
10494
|
+
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
10495
|
+
label: "Th\xEAm v\xE0o gi\u1ECF",
|
|
10496
|
+
shopConfigStyle: shopConfigStyle,
|
|
10497
|
+
className: "hidden group-hover:block transition-all duration-300 !font-normal"
|
|
10498
|
+
})))));
|
|
10499
|
+
};
|
|
10500
|
+
|
|
10501
|
+
var ProductItem9 = function ProductItem9(props) {
|
|
10502
|
+
var _product$productInfo;
|
|
10503
|
+
var product = props.product,
|
|
10504
|
+
_props$Link = props.Link,
|
|
10505
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10506
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10507
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10508
|
+
_props$className = props.className,
|
|
10509
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
10510
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10511
|
+
Link: Link,
|
|
10512
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10513
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10514
|
+
className: "w-full flex flex-col gap-4 rounded-2xl p-2 md:p-6 bg-bgSecondary " + className
|
|
10515
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10516
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10517
|
+
className: "hover:scale-105 transition duration-300 ease-in-out !object-contain !aspect-[9/8]"
|
|
10518
|
+
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10519
|
+
className: "text-start line-clamp-2 font-medium min-h-12 w-full overflow-hidden text-ellipsis mb-2"
|
|
10520
|
+
}, 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, {
|
|
10521
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10522
|
+
priceClassName: "!text-secondary !text-base !font-normal",
|
|
10523
|
+
className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10524
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10525
|
+
className: "flex gap-2 md:gap-4 "
|
|
10526
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlineShoppingCart, {
|
|
10527
|
+
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)
|
|
10528
|
+
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
10529
|
+
label: "Mua ngay",
|
|
10530
|
+
className: "w-full",
|
|
10531
|
+
shopConfigStyle: shopConfigStyle
|
|
10532
|
+
}))));
|
|
10533
|
+
};
|
|
10534
|
+
|
|
10535
|
+
var ProductItem10 = function ProductItem10(props) {
|
|
10536
|
+
var _product$productInfo;
|
|
10537
|
+
var product = props.product;
|
|
10538
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10539
|
+
className: "flex border-b border-stroke items-center py-4"
|
|
10540
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10541
|
+
className: "mb-auto"
|
|
10542
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10543
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10544
|
+
className: "!w-24 rounded-lg"
|
|
10545
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10546
|
+
className: "ml-4 flex-1"
|
|
10547
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10548
|
+
className: "text-xl"
|
|
10549
|
+
}, 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", {
|
|
10550
|
+
className: "mt-2"
|
|
10551
|
+
}, /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10552
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10553
|
+
priceClassName: "!font-normal text-lg"
|
|
10554
|
+
})) : null));
|
|
10555
|
+
};
|
|
10556
|
+
|
|
10557
|
+
function getMinMax$1(array, field) {
|
|
10558
|
+
if (!(array !== null && array !== void 0 && array.length) || !array[0].hasOwnProperty(field)) {
|
|
10559
|
+
return null;
|
|
10560
|
+
}
|
|
10561
|
+
var _array$reduce = array.reduce(function (acc, obj) {
|
|
10562
|
+
var value = obj[field];
|
|
10563
|
+
return {
|
|
10564
|
+
min: value < acc.min ? value : acc.min,
|
|
10565
|
+
max: value > acc.max ? value : acc.max
|
|
10566
|
+
};
|
|
10567
|
+
}, {
|
|
10568
|
+
min: array[0][field],
|
|
10569
|
+
max: array[0][field]
|
|
10570
|
+
}),
|
|
10571
|
+
min = _array$reduce.min,
|
|
10572
|
+
max = _array$reduce.max;
|
|
10573
|
+
return {
|
|
10574
|
+
min: min,
|
|
10575
|
+
max: max
|
|
10576
|
+
};
|
|
10577
|
+
}
|
|
10578
|
+
var ProductPrice2 = function ProductPrice2(props) {
|
|
10579
|
+
var product = props.product,
|
|
10580
|
+
variant = props.variant,
|
|
10581
|
+
_props$className = props.className,
|
|
10582
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
10583
|
+
_props$style = props.style,
|
|
10584
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
10585
|
+
_props$priceClassName = props.priceClassName,
|
|
10586
|
+
priceClassName = _props$priceClassName === void 0 ? "" : _props$priceClassName,
|
|
10587
|
+
_props$priceBeforeDis = props.priceBeforeDiscountClassName,
|
|
10588
|
+
priceBeforeDiscountClassName = _props$priceBeforeDis === void 0 ? "" : _props$priceBeforeDis;
|
|
10589
|
+
var _useState = React.useState(),
|
|
10590
|
+
displayPrice = _useState[0],
|
|
10591
|
+
setDisplayPrice = _useState[1];
|
|
10592
|
+
var _useState2 = React.useState(),
|
|
10593
|
+
displayPriceBeforeDiscount = _useState2[0],
|
|
10594
|
+
setDisplayPriceBeforeDiscount = _useState2[1];
|
|
10595
|
+
React.useEffect(function () {
|
|
10596
|
+
if (variant) {
|
|
10597
|
+
genProductPrice([variant]);
|
|
10598
|
+
} else if (product) {
|
|
10599
|
+
genProductPrice(product.variants);
|
|
10600
|
+
}
|
|
10601
|
+
}, [product, variant]);
|
|
10602
|
+
var genProductPrice = function genProductPrice(variants) {
|
|
10603
|
+
var mPrice = getMinMax$1(variants, 'price');
|
|
10604
|
+
var mPriceBeforeDiscount = getMinMax$1(variants, 'priceBeforeDiscount');
|
|
10605
|
+
if (mPrice && mPriceBeforeDiscount) {
|
|
10606
|
+
var _displayPriceBeforeDiscount = formatCurrency2(mPriceBeforeDiscount.min);
|
|
10607
|
+
var _displayPrice = formatCurrency2(mPrice.min);
|
|
10608
|
+
if (mPrice.min !== mPrice.max) {
|
|
10609
|
+
_displayPrice += " - " + formatCurrency2(mPrice.max);
|
|
10610
|
+
}
|
|
10611
|
+
if (mPriceBeforeDiscount.min !== mPriceBeforeDiscount.max) {
|
|
10612
|
+
_displayPriceBeforeDiscount += " - " + formatCurrency2(mPriceBeforeDiscount.max);
|
|
10613
|
+
}
|
|
10614
|
+
setDisplayPrice(_displayPrice);
|
|
10615
|
+
setDisplayPriceBeforeDiscount(_displayPriceBeforeDiscount);
|
|
10616
|
+
} else {
|
|
10617
|
+
var _displayPrice2 = formatCurrency2(product === null || product === void 0 ? void 0 : product.price);
|
|
10618
|
+
setDisplayPrice(_displayPrice2);
|
|
10619
|
+
}
|
|
10620
|
+
};
|
|
10621
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10622
|
+
className: "flex gap-4 flex-wrap " + className
|
|
10623
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10624
|
+
className: "text-primary font-semibold " + priceClassName,
|
|
10625
|
+
style: style
|
|
10626
|
+
}, displayPrice), displayPriceBeforeDiscount !== displayPrice && displayPriceBeforeDiscount != null ? /*#__PURE__*/React__default.createElement("span", {
|
|
10627
|
+
className: "text-gray3 line-through " + priceBeforeDiscountClassName + " "
|
|
10628
|
+
}, displayPriceBeforeDiscount) : null);
|
|
10172
10629
|
};
|
|
10173
10630
|
|
|
10174
|
-
var
|
|
10631
|
+
var ProductItem11 = function ProductItem11(props) {
|
|
10175
10632
|
var _product$productInfo;
|
|
10176
10633
|
var product = props.product,
|
|
10177
10634
|
_props$Link = props.Link,
|
|
10178
10635
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10179
|
-
_props$className = props.className,
|
|
10180
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
10181
10636
|
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10182
|
-
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl
|
|
10637
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10638
|
+
_props$className = props.className,
|
|
10639
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
10183
10640
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10184
10641
|
Link: Link,
|
|
10185
10642
|
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10186
10643
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10187
|
-
className: "
|
|
10644
|
+
className: "w-full bg-bgSecondary " + className
|
|
10188
10645
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10189
|
-
className: "
|
|
10646
|
+
className: "overflow-hidden"
|
|
10190
10647
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10191
10648
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10192
|
-
className: "
|
|
10193
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10194
|
-
className: "
|
|
10195
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10196
|
-
className: "text-
|
|
10197
|
-
}, 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(
|
|
10649
|
+
className: "hover:scale-105 transition duration-300 ease-in-out"
|
|
10650
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10651
|
+
className: "p-4 flex flex-col gap-4"
|
|
10652
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10653
|
+
className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
|
|
10654
|
+
}, 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, {
|
|
10198
10655
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10199
|
-
|
|
10200
|
-
|
|
10201
|
-
|
|
10656
|
+
priceClassName: "!font-normal",
|
|
10657
|
+
className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10658
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10659
|
+
className: "flex gap-2 md:gap-4 "
|
|
10660
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlineShoppingCart, {
|
|
10661
|
+
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)
|
|
10202
10662
|
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
10203
|
-
label: "
|
|
10204
|
-
|
|
10205
|
-
|
|
10663
|
+
label: "Mua ngay",
|
|
10664
|
+
className: "w-full",
|
|
10665
|
+
shopConfigStyle: shopConfigStyle
|
|
10206
10666
|
})))));
|
|
10207
10667
|
};
|
|
10208
10668
|
|
|
@@ -10220,7 +10680,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
|
|
|
10220
10680
|
className: "w-full flex flex-col gap-4 rounded-2xl p-1"
|
|
10221
10681
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10222
10682
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10223
|
-
className: "
|
|
10683
|
+
className: " rounded-2xl"
|
|
10224
10684
|
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10225
10685
|
className: "line-clamp-1 mb-2 font-medium text-lg"
|
|
10226
10686
|
}, 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, {
|
|
@@ -10331,13 +10791,13 @@ var Products2 = function Products2(props) {
|
|
|
10331
10791
|
breakpoint: 1024,
|
|
10332
10792
|
settings: {
|
|
10333
10793
|
slidesToShow: 4,
|
|
10334
|
-
slidesToScroll:
|
|
10794
|
+
slidesToScroll: 1
|
|
10335
10795
|
}
|
|
10336
10796
|
}, {
|
|
10337
10797
|
breakpoint: 1023,
|
|
10338
10798
|
settings: {
|
|
10339
10799
|
slidesToShow: 3,
|
|
10340
|
-
slidesToScroll:
|
|
10800
|
+
slidesToScroll: 1
|
|
10341
10801
|
}
|
|
10342
10802
|
}, {
|
|
10343
10803
|
breakpoint: 635,
|
|
@@ -10345,6 +10805,12 @@ var Products2 = function Products2(props) {
|
|
|
10345
10805
|
slidesToShow: 2,
|
|
10346
10806
|
slidesToScroll: 2
|
|
10347
10807
|
}
|
|
10808
|
+
}, {
|
|
10809
|
+
breakpoint: 370,
|
|
10810
|
+
settings: {
|
|
10811
|
+
slidesToShow: 1,
|
|
10812
|
+
slidesToScroll: 1
|
|
10813
|
+
}
|
|
10348
10814
|
}]
|
|
10349
10815
|
};
|
|
10350
10816
|
React.useEffect(function () {
|
|
@@ -10378,12 +10844,12 @@ var Products2 = function Products2(props) {
|
|
|
10378
10844
|
color: textBody
|
|
10379
10845
|
}
|
|
10380
10846
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10381
|
-
className: "relative rounded-3xl w-full py-
|
|
10847
|
+
className: "relative rounded-3xl w-full py-6 md:py-10 md:px-6 px-3 xl:px-10",
|
|
10382
10848
|
style: {
|
|
10383
10849
|
background: secondary
|
|
10384
10850
|
}
|
|
10385
10851
|
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
10386
|
-
className: "font-semibold text-2xl md:text-4xl lg:text-4xl ps-5 pb-
|
|
10852
|
+
className: "font-semibold text-2xl md:text-4xl lg:text-4xl ps-5 pb-6",
|
|
10387
10853
|
style: {
|
|
10388
10854
|
color: textButton
|
|
10389
10855
|
}
|
|
@@ -10397,16 +10863,15 @@ var Products2 = function Products2(props) {
|
|
|
10397
10863
|
beforeChange: handleBeforeChange
|
|
10398
10864
|
}), products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
10399
10865
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10400
|
-
className: "px-2 lg:px-3",
|
|
10866
|
+
className: "px-1 md:px-2 lg:px-3",
|
|
10401
10867
|
key: "dfg-" + index
|
|
10402
10868
|
}, /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10403
10869
|
product: product,
|
|
10404
10870
|
Link: Link,
|
|
10405
|
-
shopConfigStyle: shopConfigStyle
|
|
10406
|
-
classNamePrice: "text-base md:text-lg"
|
|
10871
|
+
shopConfigStyle: shopConfigStyle
|
|
10407
10872
|
}));
|
|
10408
10873
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
10409
|
-
className: "absolute left-0 top-
|
|
10874
|
+
className: "absolute left-0 top-[45%] w-full flex justify-between px-2 md:px-4 lg:px-6"
|
|
10410
10875
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
10411
10876
|
onClick: goToPrev,
|
|
10412
10877
|
className: (canGoPrev ? "bg-primary" : "bg-gray5 cursor-not-allowed") + " p-2 rounded-full"
|
|
@@ -10451,7 +10916,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
10451
10916
|
for (var i = start; i <= end; i++) {
|
|
10452
10917
|
pages.push(i);
|
|
10453
10918
|
}
|
|
10454
|
-
if (current_page < total_pages -
|
|
10919
|
+
if (current_page < total_pages - 3) pages.push("...");
|
|
10455
10920
|
pages.push(total_pages);
|
|
10456
10921
|
return pages;
|
|
10457
10922
|
};
|
|
@@ -10471,7 +10936,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
10471
10936
|
onClick: function onClick() {
|
|
10472
10937
|
return typeof page === "number" && handlePageChange(page - 1);
|
|
10473
10938
|
},
|
|
10474
|
-
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" : ""),
|
|
10939
|
+
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" : ""),
|
|
10475
10940
|
disabled: page === "..."
|
|
10476
10941
|
}, page);
|
|
10477
10942
|
})), /*#__PURE__*/React__default.createElement(io5.IoChevronForwardOutline, {
|
|
@@ -10590,44 +11055,217 @@ var Products3 = function Products3(props) {
|
|
|
10590
11055
|
}));
|
|
10591
11056
|
};
|
|
10592
11057
|
|
|
10593
|
-
var
|
|
11058
|
+
var CarouselItem = function CarouselItem(props) {
|
|
10594
11059
|
var _Object$keys;
|
|
11060
|
+
var _props$data = props.data,
|
|
11061
|
+
data = _props$data === void 0 ? [] : _props$data,
|
|
11062
|
+
_props$className = props.className,
|
|
11063
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
11064
|
+
_props$style = props.style,
|
|
11065
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
11066
|
+
_props$onClick = props.onClick,
|
|
11067
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
11068
|
+
_props$isAll = props.isAll,
|
|
11069
|
+
isAll = _props$isAll === void 0 ? true : _props$isAll,
|
|
11070
|
+
_props$isNavigateButt = props.isNavigateButton,
|
|
11071
|
+
isNavigateButton = _props$isNavigateButt === void 0 ? true : _props$isNavigateButt,
|
|
11072
|
+
_props$itemClassName = props.itemClassName,
|
|
11073
|
+
itemClassName = _props$itemClassName === void 0 ? "" : _props$itemClassName;
|
|
11074
|
+
var listRef = React.useRef(null);
|
|
11075
|
+
var _useState = React.useState(false),
|
|
11076
|
+
canScrollLeft = _useState[0],
|
|
11077
|
+
setCanScrollLeft = _useState[1];
|
|
11078
|
+
var _useState2 = React.useState(false),
|
|
11079
|
+
canScrollRight = _useState2[0],
|
|
11080
|
+
setCanScrollRight = _useState2[1];
|
|
11081
|
+
var _useState3 = React.useState({}),
|
|
11082
|
+
value = _useState3[0],
|
|
11083
|
+
setValue = _useState3[1];
|
|
11084
|
+
React.useEffect(function () {
|
|
11085
|
+
var _listRef$current;
|
|
11086
|
+
checkScroll();
|
|
11087
|
+
(_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.addEventListener("scroll", checkScroll);
|
|
11088
|
+
return function () {
|
|
11089
|
+
var _listRef$current2;
|
|
11090
|
+
return (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.removeEventListener("scroll", checkScroll);
|
|
11091
|
+
};
|
|
11092
|
+
}, [data]);
|
|
11093
|
+
var checkScroll = function checkScroll() {
|
|
11094
|
+
if (listRef.current) {
|
|
11095
|
+
var _listRef$current3 = listRef.current,
|
|
11096
|
+
scrollLeft = _listRef$current3.scrollLeft,
|
|
11097
|
+
scrollWidth = _listRef$current3.scrollWidth,
|
|
11098
|
+
clientWidth = _listRef$current3.clientWidth;
|
|
11099
|
+
setCanScrollLeft(scrollLeft > 0);
|
|
11100
|
+
setCanScrollRight(scrollLeft + clientWidth < scrollWidth - 1);
|
|
11101
|
+
}
|
|
11102
|
+
};
|
|
11103
|
+
var handleClickPrevImg = function handleClickPrevImg() {
|
|
11104
|
+
if (listRef.current) {
|
|
11105
|
+
checkScroll();
|
|
11106
|
+
listRef.current.scrollBy({
|
|
11107
|
+
left: -300,
|
|
11108
|
+
behavior: "smooth"
|
|
11109
|
+
});
|
|
11110
|
+
}
|
|
11111
|
+
};
|
|
11112
|
+
var handleClickNextImg = function handleClickNextImg() {
|
|
11113
|
+
if (listRef.current) {
|
|
11114
|
+
checkScroll();
|
|
11115
|
+
listRef.current.scrollBy({
|
|
11116
|
+
left: 300,
|
|
11117
|
+
behavior: "smooth"
|
|
11118
|
+
});
|
|
11119
|
+
}
|
|
11120
|
+
};
|
|
11121
|
+
var handleOnClick = function handleOnClick(item) {
|
|
11122
|
+
setValue(item);
|
|
11123
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(item);
|
|
11124
|
+
};
|
|
11125
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11126
|
+
className: "h-10 md:h-12 flex justify-between items-center " + className,
|
|
11127
|
+
style: style
|
|
11128
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11129
|
+
className: "w-full overflow-hidden "
|
|
11130
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11131
|
+
className: "flex overflow-x-auto gap-2 " + (isNavigateButton ? "no-scrollbar" : "scroll-custom pb-2") + " items-center",
|
|
11132
|
+
ref: listRef
|
|
11133
|
+
}, isAll ? /*#__PURE__*/React__default.createElement("div", {
|
|
11134
|
+
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",
|
|
11135
|
+
onClick: function onClick() {
|
|
11136
|
+
handleOnClick({});
|
|
11137
|
+
}
|
|
11138
|
+
}, "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) {
|
|
11139
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11140
|
+
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,
|
|
11141
|
+
key: "carousel-" + index,
|
|
11142
|
+
onClick: function onClick() {
|
|
11143
|
+
handleOnClick(item);
|
|
11144
|
+
}
|
|
11145
|
+
}, item === null || item === void 0 ? void 0 : item.label);
|
|
11146
|
+
})))), isNavigateButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
11147
|
+
className: "hidden my-auto gap-4 md:flex justify-end ps-10"
|
|
11148
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
11149
|
+
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"),
|
|
11150
|
+
onClick: handleClickPrevImg,
|
|
11151
|
+
disabled: !canScrollLeft
|
|
11152
|
+
}, /*#__PURE__*/React__default.createElement(io.IoIosArrowBack, {
|
|
11153
|
+
size: 24,
|
|
11154
|
+
className: "inline-block text-lg"
|
|
11155
|
+
})), /*#__PURE__*/React__default.createElement("button", {
|
|
11156
|
+
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"),
|
|
11157
|
+
onClick: handleClickNextImg,
|
|
11158
|
+
disabled: !canScrollRight
|
|
11159
|
+
}, /*#__PURE__*/React__default.createElement(io.IoIosArrowForward, {
|
|
11160
|
+
size: 24,
|
|
11161
|
+
className: "inline-block text-lg "
|
|
11162
|
+
}))) : null);
|
|
11163
|
+
};
|
|
11164
|
+
|
|
11165
|
+
var Products9 = function Products9(props) {
|
|
11166
|
+
var _Object$keys2;
|
|
10595
11167
|
var _props$Link = props.Link,
|
|
10596
11168
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10597
11169
|
shopConfigStyle = props.shopConfigStyle,
|
|
10598
11170
|
_props$ProductItem = props.ProductItem,
|
|
10599
11171
|
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
10600
|
-
var _useState = React.useState(
|
|
11172
|
+
var _useState = React.useState(true),
|
|
11173
|
+
loading = _useState[0],
|
|
11174
|
+
setLoading = _useState[1];
|
|
11175
|
+
var _useState2 = React.useState({
|
|
10601
11176
|
size: 12
|
|
10602
11177
|
}),
|
|
10603
|
-
params =
|
|
10604
|
-
|
|
11178
|
+
params = _useState2[0];
|
|
11179
|
+
var _useState3 = React.useState(false),
|
|
11180
|
+
isAutoGetList = _useState3[0];
|
|
10605
11181
|
var _CategoryController = CategoryController(_extends({}, props, {
|
|
10606
11182
|
types: "0"
|
|
10607
11183
|
})),
|
|
10608
11184
|
_CategoryController$c = _CategoryController.categories,
|
|
10609
11185
|
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
10610
11186
|
var _ProductController = ProductController(_extends({}, props, {
|
|
10611
|
-
params: params
|
|
11187
|
+
params: params,
|
|
11188
|
+
isAutoGetList: isAutoGetList
|
|
10612
11189
|
})),
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
11190
|
+
getProductListSearch = _ProductController.getProductListSearch;
|
|
11191
|
+
var _useState4 = React.useState([]),
|
|
11192
|
+
categoryProducts = _useState4[0],
|
|
11193
|
+
setCategoryProducts = _useState4[1];
|
|
11194
|
+
React.useEffect(function () {
|
|
11195
|
+
if ((categories === null || categories === void 0 ? void 0 : categories.length) > 0) {
|
|
11196
|
+
fetchAll();
|
|
11197
|
+
}
|
|
11198
|
+
}, [categories]);
|
|
11199
|
+
var fetchAll = function fetchAll() {
|
|
11200
|
+
try {
|
|
11201
|
+
setLoading(true);
|
|
11202
|
+
var _temp = _finallyRethrows(function () {
|
|
11203
|
+
return _catch(function () {
|
|
11204
|
+
var _categories$slice;
|
|
11205
|
+
var result = {};
|
|
11206
|
+
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) {
|
|
11207
|
+
try {
|
|
11208
|
+
return Promise.resolve(getProductListSearch({
|
|
11209
|
+
categoryId: cat === null || cat === void 0 ? void 0 : cat.categoryId,
|
|
11210
|
+
size: 4
|
|
11211
|
+
})).then(function (products) {
|
|
11212
|
+
if ((products === null || products === void 0 ? void 0 : products.length) > 0) {
|
|
11213
|
+
result[cat === null || cat === void 0 ? void 0 : cat.cateName] = products;
|
|
11214
|
+
}
|
|
11215
|
+
});
|
|
11216
|
+
} catch (e) {
|
|
11217
|
+
return Promise.reject(e);
|
|
11218
|
+
}
|
|
11219
|
+
}))).then(function () {
|
|
11220
|
+
setCategoryProducts(result);
|
|
11221
|
+
});
|
|
11222
|
+
}, function (error) {
|
|
11223
|
+
console.log(error);
|
|
11224
|
+
});
|
|
11225
|
+
}, function (_wasThrown, _result) {
|
|
11226
|
+
setLoading(false);
|
|
11227
|
+
if (_wasThrown) throw _result;
|
|
11228
|
+
return _result;
|
|
11229
|
+
});
|
|
11230
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
11231
|
+
} catch (e) {
|
|
11232
|
+
return Promise.reject(e);
|
|
11233
|
+
}
|
|
11234
|
+
};
|
|
10616
11235
|
var handleChooseCategory = function handleChooseCategory(item) {
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
}
|
|
11236
|
+
var _Object$keys;
|
|
11237
|
+
if ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(item)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0) {
|
|
11238
|
+
fetchAll();
|
|
11239
|
+
} else {
|
|
11240
|
+
fetchOne(item);
|
|
11241
|
+
}
|
|
10621
11242
|
};
|
|
10622
|
-
var
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
|
|
11243
|
+
var fetchOne = function fetchOne(item) {
|
|
11244
|
+
try {
|
|
11245
|
+
setLoading(true);
|
|
11246
|
+
var _temp2 = _finallyRethrows(function () {
|
|
11247
|
+
return _catch(function () {
|
|
11248
|
+
return Promise.resolve(getProductListSearch({
|
|
11249
|
+
categoryId: item === null || item === void 0 ? void 0 : item.categoryId,
|
|
11250
|
+
size: 12
|
|
11251
|
+
})).then(function (products) {
|
|
11252
|
+
var _setCategoryProducts, _console$log;
|
|
11253
|
+
setCategoryProducts((_setCategoryProducts = {}, _setCategoryProducts[item === null || item === void 0 ? void 0 : item.cateName] = products, _setCategoryProducts));
|
|
11254
|
+
console.log("check::::", (_console$log = {}, _console$log[item === null || item === void 0 ? void 0 : item.cateName] = products, _console$log));
|
|
11255
|
+
});
|
|
11256
|
+
}, function (error) {
|
|
11257
|
+
console.log(error);
|
|
11258
|
+
});
|
|
11259
|
+
}, function (_wasThrown2, _result2) {
|
|
11260
|
+
setLoading(false);
|
|
11261
|
+
if (_wasThrown2) throw _result2;
|
|
11262
|
+
return _result2;
|
|
11263
|
+
});
|
|
11264
|
+
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
11265
|
+
} catch (e) {
|
|
11266
|
+
return Promise.reject(e);
|
|
10627
11267
|
}
|
|
10628
|
-
|
|
10629
|
-
return acc;
|
|
10630
|
-
}, {});
|
|
11268
|
+
};
|
|
10631
11269
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10632
11270
|
className: SECTION_CLASS + " flex flex-col gap-4 md:!my-6 md:gap-6 "
|
|
10633
11271
|
}, /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
@@ -10635,7 +11273,7 @@ var Products9 = function Products9(props) {
|
|
|
10635
11273
|
onClick: handleChooseCategory
|
|
10636
11274
|
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
10637
11275
|
className: "m-auto mt-20 min-h-32"
|
|
10638
|
-
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (Object === null || Object === void 0 ? void 0 : (_Object$
|
|
11276
|
+
}, /*#__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) {
|
|
10639
11277
|
var _products$;
|
|
10640
11278
|
var categoryName = _ref[0],
|
|
10641
11279
|
products = _ref[1];
|
|
@@ -10659,7 +11297,9 @@ var Products9 = function Products9(props) {
|
|
|
10659
11297
|
product: product,
|
|
10660
11298
|
key: product === null || product === void 0 ? void 0 : product.landingShopProductId
|
|
10661
11299
|
});
|
|
10662
|
-
}) :
|
|
11300
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
11301
|
+
className: "col-span-2 sm:col-span-3 lg:col-span-4"
|
|
11302
|
+
}, /*#__PURE__*/React__default.createElement(NotFoundProduct, null))));
|
|
10663
11303
|
}) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
|
|
10664
11304
|
};
|
|
10665
11305
|
|
|
@@ -10730,34 +11370,30 @@ var listFilter = [{
|
|
|
10730
11370
|
value: "sortPriceDESC"
|
|
10731
11371
|
}];
|
|
10732
11372
|
var Products11 = function Products11(props) {
|
|
10733
|
-
var _productsFilter$slice;
|
|
10734
11373
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
10735
11374
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10736
11375
|
_props$Link = props.Link,
|
|
10737
11376
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10738
11377
|
_props$categoryId = props.categoryId,
|
|
10739
|
-
categoryId = _props$categoryId === void 0 ?
|
|
11378
|
+
categoryId = _props$categoryId === void 0 ? "" : _props$categoryId,
|
|
10740
11379
|
_props$ProductItem = props.ProductItem,
|
|
10741
11380
|
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
10742
11381
|
var _useState = React.useState({
|
|
10743
11382
|
page: 0,
|
|
10744
11383
|
size: 12,
|
|
10745
|
-
categoryId: categoryId
|
|
11384
|
+
categoryId: categoryId || ""
|
|
10746
11385
|
}),
|
|
10747
11386
|
params = _useState[0],
|
|
10748
11387
|
setParams = _useState[1];
|
|
10749
|
-
var _useState2 = React.useState(
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
var _useState3 = React.useState(
|
|
10753
|
-
|
|
10754
|
-
|
|
10755
|
-
var _useState4 = React.useState([]),
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
var _useState5 = React.useState(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]),
|
|
10759
|
-
filterItem = _useState5[0],
|
|
10760
|
-
setFilterItem = _useState5[1];
|
|
11388
|
+
var _useState2 = React.useState({}),
|
|
11389
|
+
categorySelected = _useState2[0],
|
|
11390
|
+
setCategorySelected = _useState2[1];
|
|
11391
|
+
var _useState3 = React.useState([]),
|
|
11392
|
+
productsFilter = _useState3[0],
|
|
11393
|
+
setProductsFilter = _useState3[1];
|
|
11394
|
+
var _useState4 = React.useState(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]),
|
|
11395
|
+
filterItem = _useState4[0],
|
|
11396
|
+
setFilterItem = _useState4[1];
|
|
10761
11397
|
var _CategoryController = CategoryController(_extends({}, props, {
|
|
10762
11398
|
types: "0"
|
|
10763
11399
|
})),
|
|
@@ -10771,22 +11407,33 @@ var Products11 = function Products11(props) {
|
|
|
10771
11407
|
loading = _ProductController.loading,
|
|
10772
11408
|
page = _ProductController.page;
|
|
10773
11409
|
var handleOnChangePage = function handleOnChangePage(pageIndex) {
|
|
10774
|
-
setFirstLoading(false);
|
|
10775
11410
|
setParams(function (prev) {
|
|
10776
11411
|
return _extends({}, prev, {
|
|
10777
11412
|
page: pageIndex
|
|
10778
11413
|
});
|
|
10779
11414
|
});
|
|
11415
|
+
window.scrollTo({
|
|
11416
|
+
top: 0,
|
|
11417
|
+
behavior: 'smooth'
|
|
11418
|
+
});
|
|
10780
11419
|
};
|
|
10781
11420
|
var handleChooseCategory = function handleChooseCategory(category) {
|
|
11421
|
+
if (categoryId) {
|
|
11422
|
+
var newUrl = getLinkProductsByCategory(category);
|
|
11423
|
+
window.history.replaceState(null, '', newUrl);
|
|
11424
|
+
}
|
|
10782
11425
|
setCategorySelected(category);
|
|
10783
|
-
setFirstLoading(true);
|
|
10784
11426
|
setFilterItem(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]);
|
|
10785
11427
|
setParams(function (prev) {
|
|
10786
|
-
return
|
|
11428
|
+
return {
|
|
11429
|
+
page: 0,
|
|
10787
11430
|
categoryId: category === null || category === void 0 ? void 0 : category.categoryId,
|
|
10788
11431
|
size: 12
|
|
10789
|
-
}
|
|
11432
|
+
};
|
|
11433
|
+
});
|
|
11434
|
+
window.scrollTo({
|
|
11435
|
+
top: 0,
|
|
11436
|
+
behavior: 'smooth'
|
|
10790
11437
|
});
|
|
10791
11438
|
};
|
|
10792
11439
|
React.useEffect(function () {
|
|
@@ -10798,23 +11445,42 @@ var Products11 = function Products11(props) {
|
|
|
10798
11445
|
}
|
|
10799
11446
|
}, [categories]);
|
|
10800
11447
|
React.useEffect(function () {
|
|
10801
|
-
|
|
11448
|
+
if ((filterItem === null || filterItem === void 0 ? void 0 : filterItem.value) === "sortPriceDESC") {
|
|
11449
|
+
var productsCopy = [].concat(products);
|
|
11450
|
+
productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.sort(function (a, b) {
|
|
11451
|
+
var _a$productInfo, _b$productInfo;
|
|
11452
|
+
return (a === null || a === void 0 ? void 0 : (_a$productInfo = a.productInfo) === null || _a$productInfo === void 0 ? void 0 : _a$productInfo.price) - (b === null || b === void 0 ? void 0 : (_b$productInfo = b.productInfo) === null || _b$productInfo === void 0 ? void 0 : _b$productInfo.price);
|
|
11453
|
+
});
|
|
11454
|
+
setProductsFilter(productsCopy);
|
|
11455
|
+
} else if ((filterItem === null || filterItem === void 0 ? void 0 : filterItem.value) === "discount") {
|
|
11456
|
+
var _productsCopy2;
|
|
11457
|
+
var _productsCopy = [].concat(products);
|
|
11458
|
+
_productsCopy = (_productsCopy2 = _productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
|
|
11459
|
+
var _product$productInfo, _product$productInfo2, _product$productInfo3;
|
|
11460
|
+
return (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo3 = product.productInfo) === null || _product$productInfo3 === void 0 ? void 0 : _product$productInfo3.price);
|
|
11461
|
+
});
|
|
11462
|
+
setProductsFilter(_productsCopy);
|
|
11463
|
+
} else {
|
|
11464
|
+
setProductsFilter(products);
|
|
11465
|
+
}
|
|
10802
11466
|
}, [products, categorySelected]);
|
|
10803
11467
|
var handleFilter = function handleFilter(item) {
|
|
10804
11468
|
setFilterItem(item);
|
|
10805
|
-
if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC") {
|
|
11469
|
+
if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC" && !(params !== null && params !== void 0 && params.isHighlight)) {
|
|
10806
11470
|
var productsCopy = [].concat(products);
|
|
10807
11471
|
productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.sort(function (a, b) {
|
|
10808
|
-
var
|
|
10809
|
-
return
|
|
11472
|
+
var _a$productInfo2, _b$productInfo2;
|
|
11473
|
+
return (a === null || a === void 0 ? void 0 : (_a$productInfo2 = a.productInfo) === null || _a$productInfo2 === void 0 ? void 0 : _a$productInfo2.price) - (b === null || b === void 0 ? void 0 : (_b$productInfo2 = b.productInfo) === null || _b$productInfo2 === void 0 ? void 0 : _b$productInfo2.price);
|
|
10810
11474
|
});
|
|
10811
11475
|
setProductsFilter(productsCopy);
|
|
10812
|
-
} else if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
|
|
10813
|
-
var
|
|
10814
|
-
|
|
10815
|
-
|
|
11476
|
+
} else if ((item === null || item === void 0 ? void 0 : item.value) === "discount" && !(params !== null && params !== void 0 && params.isHighlight)) {
|
|
11477
|
+
var _productsCopy4;
|
|
11478
|
+
var _productsCopy3 = [].concat(products);
|
|
11479
|
+
_productsCopy3 = (_productsCopy4 = _productsCopy3) === null || _productsCopy4 === void 0 ? void 0 : _productsCopy4.filter(function (product) {
|
|
11480
|
+
var _product$productInfo4, _product$productInfo5, _product$productInfo6;
|
|
11481
|
+
return (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.price);
|
|
10816
11482
|
});
|
|
10817
|
-
setProductsFilter(
|
|
11483
|
+
setProductsFilter(_productsCopy3);
|
|
10818
11484
|
} else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
|
|
10819
11485
|
setParams(function (prev) {
|
|
10820
11486
|
return _extends({}, prev, {
|
|
@@ -10823,19 +11489,20 @@ var Products11 = function Products11(props) {
|
|
|
10823
11489
|
});
|
|
10824
11490
|
} else {
|
|
10825
11491
|
setParams(function (prev) {
|
|
10826
|
-
return
|
|
11492
|
+
return {
|
|
11493
|
+
page: 0,
|
|
10827
11494
|
categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
|
|
10828
11495
|
size: 12
|
|
10829
|
-
}
|
|
11496
|
+
};
|
|
10830
11497
|
});
|
|
10831
11498
|
}
|
|
10832
11499
|
};
|
|
10833
11500
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10834
11501
|
className: SECTION_CLASS + " grid grid-cols-1 !my-6 !md:my-6 md:grid-cols-4 gap-6"
|
|
10835
11502
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10836
|
-
className: "md:sticky top-
|
|
11503
|
+
className: "md:sticky top-16 self-start"
|
|
10837
11504
|
}, (categories === null || categories === void 0 ? void 0 : categories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
10838
|
-
className: " flex flex-col gap-2 rounded-
|
|
11505
|
+
className: " flex flex-col gap-2 rounded-2xl bg-bgSecondary p-4 max-h-96 scroll-container overflow-y-auto"
|
|
10839
11506
|
}, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
|
|
10840
11507
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10841
11508
|
className: "px-6 py-2 hover:bg-gray-100 hover:text-primary cursor-pointer rounded-lg " + ((categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId) === (item === null || item === void 0 ? void 0 : item.categoryId) ? " bg-primary text-textButton" : ""),
|
|
@@ -10843,7 +11510,9 @@ var Products11 = function Products11(props) {
|
|
|
10843
11510
|
onClick: function onClick() {
|
|
10844
11511
|
handleChooseCategory(item);
|
|
10845
11512
|
}
|
|
10846
|
-
},
|
|
11513
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11514
|
+
className: "line-clamp-2"
|
|
11515
|
+
}, item === null || item === void 0 ? void 0 : item.cateName));
|
|
10847
11516
|
})) : null), /*#__PURE__*/React__default.createElement("div", {
|
|
10848
11517
|
className: "md:col-span-3 flex flex-col gap-6"
|
|
10849
11518
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -10856,11 +11525,11 @@ var Products11 = function Products11(props) {
|
|
|
10856
11525
|
handleFilter(item);
|
|
10857
11526
|
}
|
|
10858
11527
|
}, item === null || item === void 0 ? void 0 : item.label);
|
|
10859
|
-
})), loading
|
|
11528
|
+
})), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
10860
11529
|
className: "w-full h-96 mb-1 flex justify-center items-center"
|
|
10861
11530
|
}, /*#__PURE__*/React__default.createElement(Loading, null)) : /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10862
|
-
className: "grid grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-6
|
|
10863
|
-
}, (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > 0 ? productsFilter === null || productsFilter === void 0 ? void 0 :
|
|
11531
|
+
className: "grid grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-6 xl:gap-8"
|
|
11532
|
+
}, (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > 0 ? productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.map(function (product, index) {
|
|
10864
11533
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10865
11534
|
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo),
|
|
10866
11535
|
Link: Link,
|
|
@@ -10884,26 +11553,6 @@ var Products11 = function Products11(props) {
|
|
|
10884
11553
|
}) : null)));
|
|
10885
11554
|
};
|
|
10886
11555
|
|
|
10887
|
-
var ProductItem9 = function ProductItem9(props) {
|
|
10888
|
-
var _product$productInfo;
|
|
10889
|
-
var product = props.product;
|
|
10890
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
10891
|
-
className: "flex border-b border-stroke items-center py-4"
|
|
10892
|
-
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10893
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10894
|
-
className: "!w-24 rounded-lg"
|
|
10895
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10896
|
-
className: "ml-4 flex-1"
|
|
10897
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10898
|
-
className: "text-xl"
|
|
10899
|
-
}, 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", {
|
|
10900
|
-
className: "mt-2"
|
|
10901
|
-
}, /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10902
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10903
|
-
priceClassName: "!font-normal text-lg"
|
|
10904
|
-
})) : null));
|
|
10905
|
-
};
|
|
10906
|
-
|
|
10907
11556
|
var Products12 = function Products12(props) {
|
|
10908
11557
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
10909
11558
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
@@ -10936,15 +11585,19 @@ var Products12 = function Products12(props) {
|
|
|
10936
11585
|
});
|
|
10937
11586
|
};
|
|
10938
11587
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
10939
|
-
className:
|
|
11588
|
+
className: SECTION_CLASS + " w-full flex flex-col gap-6"
|
|
10940
11589
|
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
10941
11590
|
data: data,
|
|
10942
11591
|
shopConfigStyle: shopConfigStyle
|
|
10943
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
11592
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11593
|
+
className: "flex justify-center"
|
|
11594
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11595
|
+
className: "!overflow-hidden max-w-[80%] md:max-w-[67%] pt-2"
|
|
11596
|
+
}, /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
10944
11597
|
isNavigateButton: false,
|
|
10945
11598
|
data: categories,
|
|
10946
11599
|
onClick: handleFilterByCategory
|
|
10947
|
-
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
11600
|
+
}))), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
10948
11601
|
className: "flex w-full justify-center p-12"
|
|
10949
11602
|
}, /*#__PURE__*/React__default.createElement(Loading, null)) : products !== null && products !== void 0 && products.length ? /*#__PURE__*/React__default.createElement("div", {
|
|
10950
11603
|
className: "grid grid-cols-1 md:grid-cols-2 gap-x-12"
|
|
@@ -10953,12 +11606,70 @@ var Products12 = function Products12(props) {
|
|
|
10953
11606
|
key: index,
|
|
10954
11607
|
Link: Link,
|
|
10955
11608
|
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10956
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
11609
|
+
}, /*#__PURE__*/React__default.createElement(ProductItem10, {
|
|
10957
11610
|
product: product
|
|
10958
11611
|
}));
|
|
10959
11612
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)));
|
|
10960
11613
|
};
|
|
10961
11614
|
|
|
11615
|
+
var Products14 = function Products14(props) {
|
|
11616
|
+
var _products$slice;
|
|
11617
|
+
var _props$Link = props.Link,
|
|
11618
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
11619
|
+
data = props.data,
|
|
11620
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
11621
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
11622
|
+
_props$SectionTitle = props.SectionTitle,
|
|
11623
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
11624
|
+
_props$ProductItem = props.ProductItem,
|
|
11625
|
+
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
11626
|
+
var _ProductDetailControl = ProductDetailController(props),
|
|
11627
|
+
product = _ProductDetailControl.product;
|
|
11628
|
+
var _useState = React.useState(false),
|
|
11629
|
+
isAutoGetList = _useState[0],
|
|
11630
|
+
setIsAutoGetList = _useState[1];
|
|
11631
|
+
var _useState2 = React.useState({
|
|
11632
|
+
size: 12,
|
|
11633
|
+
categoryId: product === null || product === void 0 ? void 0 : product.categoryId
|
|
11634
|
+
}),
|
|
11635
|
+
params = _useState2[0],
|
|
11636
|
+
setParams = _useState2[1];
|
|
11637
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
11638
|
+
params: params,
|
|
11639
|
+
isAutoGetList: isAutoGetList
|
|
11640
|
+
})),
|
|
11641
|
+
_ProductController$pr = _ProductController.products,
|
|
11642
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
11643
|
+
loading = _ProductController.loading;
|
|
11644
|
+
React.useEffect(function () {
|
|
11645
|
+
if (product !== null && product !== void 0 && product.categoryId) {
|
|
11646
|
+
setParams(function (prev) {
|
|
11647
|
+
return _extends({}, prev, {
|
|
11648
|
+
categoryId: product === null || product === void 0 ? void 0 : product.categoryId
|
|
11649
|
+
});
|
|
11650
|
+
});
|
|
11651
|
+
setIsAutoGetList(true);
|
|
11652
|
+
}
|
|
11653
|
+
}, [product]);
|
|
11654
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11655
|
+
className: SECTION_CLASS + " flex flex-col gap-6 md:gap-12"
|
|
11656
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
11657
|
+
data: data,
|
|
11658
|
+
shopConfigStyle: shopConfigStyle
|
|
11659
|
+
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
11660
|
+
className: "m-auto mt-20 min-h-32"
|
|
11661
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
11662
|
+
className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-x-2 gap-y-4 md:gap-4 xl:gap-6"
|
|
11663
|
+
}, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, idx) {
|
|
11664
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
11665
|
+
Link: Link,
|
|
11666
|
+
shopConfigStyle: shopConfigStyle,
|
|
11667
|
+
product: product,
|
|
11668
|
+
key: "zjk-" + idx
|
|
11669
|
+
});
|
|
11670
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
|
|
11671
|
+
};
|
|
11672
|
+
|
|
10962
11673
|
var ProductCategory2 = function ProductCategory2(props) {
|
|
10963
11674
|
var _products$slice;
|
|
10964
11675
|
var _props$Link = props.Link,
|
|
@@ -11110,7 +11821,11 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11110
11821
|
isAutoGetList: isAutoGetList
|
|
11111
11822
|
})),
|
|
11112
11823
|
products = _ProductController.products,
|
|
11113
|
-
loading = _ProductController.loading
|
|
11824
|
+
loading = _ProductController.loading,
|
|
11825
|
+
page = _ProductController.page;
|
|
11826
|
+
var _useState5 = React.useState({}),
|
|
11827
|
+
filterValue = _useState5[0],
|
|
11828
|
+
setFilterValue = _useState5[1];
|
|
11114
11829
|
React.useEffect(function () {
|
|
11115
11830
|
setIsAutoGetList(true);
|
|
11116
11831
|
setParams(function (prev) {
|
|
@@ -11120,8 +11835,16 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11120
11835
|
});
|
|
11121
11836
|
}, [keywordValue]);
|
|
11122
11837
|
React.useEffect(function () {
|
|
11123
|
-
if ((
|
|
11124
|
-
|
|
11838
|
+
if ((filterValue === null || filterValue === void 0 ? void 0 : filterValue.value) === "discount") {
|
|
11839
|
+
var _productsCopy;
|
|
11840
|
+
var productsCopy = [].concat(products);
|
|
11841
|
+
productsCopy = (_productsCopy = productsCopy) === null || _productsCopy === void 0 ? void 0 : _productsCopy.filter(function (product) {
|
|
11842
|
+
var _product$productInfo, _product$productInfo2, _product$productInfo3;
|
|
11843
|
+
return (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo3 = product.productInfo) === null || _product$productInfo3 === void 0 ? void 0 : _product$productInfo3.price);
|
|
11844
|
+
});
|
|
11845
|
+
setProductsFilter(productsCopy);
|
|
11846
|
+
} else {
|
|
11847
|
+
setProductsFilter(products);
|
|
11125
11848
|
}
|
|
11126
11849
|
}, [products]);
|
|
11127
11850
|
var handleGetMoreProducts = function handleGetMoreProducts() {
|
|
@@ -11133,10 +11856,13 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11133
11856
|
});
|
|
11134
11857
|
};
|
|
11135
11858
|
var handleFilter = function handleFilter(item) {
|
|
11136
|
-
|
|
11859
|
+
setFilterValue(item);
|
|
11860
|
+
if ((item === null || item === void 0 ? void 0 : item.value) === "discount" && !(params !== null && params !== void 0 && params.isHighlight)) {
|
|
11861
|
+
var _productsCopy2;
|
|
11137
11862
|
var productsCopy = [].concat(products);
|
|
11138
|
-
productsCopy === null ||
|
|
11139
|
-
|
|
11863
|
+
productsCopy = (_productsCopy2 = productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
|
|
11864
|
+
var _product$productInfo4, _product$productInfo5, _product$productInfo6;
|
|
11865
|
+
return (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.price);
|
|
11140
11866
|
});
|
|
11141
11867
|
setProductsFilter(productsCopy);
|
|
11142
11868
|
} else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
|
|
@@ -11161,7 +11887,7 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11161
11887
|
shopConfigStyle: shopConfigStyle
|
|
11162
11888
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11163
11889
|
className: "text-lg"
|
|
11164
|
-
}, "T\u1EEB kh\xF3a \"", keywordValue, "\" (",
|
|
11890
|
+
}, "T\u1EEB kh\xF3a \"", keywordValue, "\" (", page === null || page === void 0 ? void 0 : page.total_elements, " s\u1EA3n ph\u1EA9m)"), /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
11165
11891
|
data: listFilter$1,
|
|
11166
11892
|
isNavigateButton: false,
|
|
11167
11893
|
onClick: handleFilter
|
|
@@ -11555,12 +12281,12 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
11555
12281
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
11556
12282
|
className: SECTION_CLASS + " mt-0 md:mt-0 mb-0 " + ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "bg-bgSecondary pb-8" : "bg-background")
|
|
11557
12283
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11558
|
-
className: ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "" : "px-4 md:px-6") + " py-4 md:py-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 md:gap-6 bg-bgSecondary"
|
|
12284
|
+
className: ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "" : "px-4 md:px-6") + " py-4 md:py-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 gap-3 md:gap-6 bg-bgSecondary"
|
|
11559
12285
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11560
|
-
className: "flex flex-col gap-4 col-span-2 "
|
|
12286
|
+
className: "flex flex-col gap-4 md:col-span-2 "
|
|
11561
12287
|
}, displayImage ? /*#__PURE__*/React__default.createElement("img", {
|
|
11562
12288
|
src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
|
|
11563
|
-
className: "w-full border
|
|
12289
|
+
className: "w-full border bg-background aspect-square object-contain rounded-2xl "
|
|
11564
12290
|
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
11565
12291
|
className: "flex justify-center items-center w-full border rounded-2xl aspect-square",
|
|
11566
12292
|
style: {
|
|
@@ -11571,19 +12297,19 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
11571
12297
|
height: "25%",
|
|
11572
12298
|
fill: "#D9D9D9"
|
|
11573
12299
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
11574
|
-
className: "flex gap-
|
|
12300
|
+
className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
|
|
11575
12301
|
}, product === null || product === void 0 ? void 0 : (_product$images2 = product.images) === null || _product$images2 === void 0 ? void 0 : _product$images2.map(function (item) {
|
|
11576
12302
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
11577
12303
|
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
11578
12304
|
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
11579
12305
|
alt: "",
|
|
11580
|
-
className: "cursor-pointer h-
|
|
12306
|
+
className: "cursor-pointer h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full aspect-square rounded-md lg:rounded-lg bg-background object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 "),
|
|
11581
12307
|
onClick: function onClick() {
|
|
11582
12308
|
handleDisplayImage(item);
|
|
11583
12309
|
}
|
|
11584
12310
|
});
|
|
11585
12311
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
11586
|
-
className: "col-span-3"
|
|
12312
|
+
className: "md:col-span-3 "
|
|
11587
12313
|
}, /*#__PURE__*/React__default.createElement("p", {
|
|
11588
12314
|
className: "font-semibold text-2xl"
|
|
11589
12315
|
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
@@ -11597,7 +12323,7 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
11597
12323
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11598
12324
|
className: "min-w-24"
|
|
11599
12325
|
}, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
|
|
11600
|
-
className: "flex gap-2"
|
|
12326
|
+
className: "flex flex-wrap gap-2"
|
|
11601
12327
|
}, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
|
|
11602
12328
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
11603
12329
|
key: i,
|
|
@@ -11649,7 +12375,7 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
11649
12375
|
__html: product === null || product === void 0 ? void 0 : product.description
|
|
11650
12376
|
}
|
|
11651
12377
|
}), !isSeeMore && !hiddenButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
11652
|
-
className: "h-
|
|
12378
|
+
className: "h-28 relative -mt-28 rounded-b-lg",
|
|
11653
12379
|
style: {
|
|
11654
12380
|
background: "linear-gradient(to top, #81818169 0%, #00000003 50%)"
|
|
11655
12381
|
}
|
|
@@ -11794,7 +12520,7 @@ var ProductDetail11 = function ProductDetail11(props) {
|
|
|
11794
12520
|
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
11795
12521
|
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
11796
12522
|
alt: "",
|
|
11797
|
-
className: "cursor-pointer px-3 py-2 !h-24 !w-24 object-
|
|
12523
|
+
className: "cursor-pointer px-3 py-2 !h-24 !w-24 object-contain aspect-square rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
|
|
11798
12524
|
onClick: function onClick() {
|
|
11799
12525
|
handleDisplayImage(item);
|
|
11800
12526
|
}
|
|
@@ -11826,7 +12552,7 @@ var ProductDetail11 = function ProductDetail11(props) {
|
|
|
11826
12552
|
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
11827
12553
|
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
11828
12554
|
alt: "",
|
|
11829
|
-
className: "cursor-pointer px-2 py-1 !h-24 !w-24 object-
|
|
12555
|
+
className: "cursor-pointer px-2 py-1 !h-24 !w-24 object-contain rounded-lg aspect-square\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
|
|
11830
12556
|
onClick: function onClick() {
|
|
11831
12557
|
handleDisplayImage(item);
|
|
11832
12558
|
}
|
|
@@ -11846,7 +12572,7 @@ var ProductDetail11 = function ProductDetail11(props) {
|
|
|
11846
12572
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11847
12573
|
className: "min-w-24 my-auto"
|
|
11848
12574
|
}, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
|
|
11849
|
-
className: "flex gap-2"
|
|
12575
|
+
className: "flex flex-wrap gap-2"
|
|
11850
12576
|
}, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
|
|
11851
12577
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
11852
12578
|
key: i,
|
|
@@ -11958,7 +12684,7 @@ var Booking1 = function Booking1(props) {
|
|
|
11958
12684
|
shopConfigStyle: shopConfigStyle
|
|
11959
12685
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11960
12686
|
className: "mt-12 grid grid-cols-1 gap-6 md:grid-cols-2 md:gap-12"
|
|
11961
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
12687
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
11962
12688
|
shopConfigStyle: shopConfigStyle,
|
|
11963
12689
|
shopConfig: shopConfig,
|
|
11964
12690
|
className: "!bg-bgSecondary"
|
|
@@ -12000,7 +12726,7 @@ var BookingForm6 = function BookingForm6(props) {
|
|
|
12000
12726
|
className: "w-full h-auto"
|
|
12001
12727
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12002
12728
|
className: "mt-4 whitespace-pre-line"
|
|
12003
|
-
}, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description)), /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
12729
|
+
}, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description)), /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
12004
12730
|
shopConfigStyle: shopConfigStyle,
|
|
12005
12731
|
shopConfig: shopConfig,
|
|
12006
12732
|
className: "col-span-2"
|
|
@@ -12244,7 +12970,7 @@ var BookingFoodForm = function BookingFoodForm(props) {
|
|
|
12244
12970
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
12245
12971
|
className: "text-center"
|
|
12246
12972
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
12247
|
-
label: "Đặt
|
|
12973
|
+
label: "Đặt bàn ngay",
|
|
12248
12974
|
shopConfigStyle: shopConfigStyle,
|
|
12249
12975
|
onClick: handleSubmit
|
|
12250
12976
|
}))) : null, isOpenPopup && /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
@@ -12261,7 +12987,7 @@ var BookingFoodForm = function BookingFoodForm(props) {
|
|
|
12261
12987
|
}
|
|
12262
12988
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
12263
12989
|
className: "font-medium text-2xl"
|
|
12264
|
-
}, "\u0110\u1EB7t
|
|
12990
|
+
}, "\u0110\u1EB7t b\xE0n th\xE0nh c\xF4ng"), /*#__PURE__*/React__default.createElement("div", {
|
|
12265
12991
|
className: "text-center"
|
|
12266
12992
|
}, "Ch\xFAng t\xF4i \u0111\xE3 ghi nh\u1EADn th\xF4ng tin c\u1EE7a b\u1EA1n v\xE0 s\u1EBD li\xEAn h\u1EC7 l\u1EA1i ngay"))));
|
|
12267
12993
|
};
|
|
@@ -12283,7 +13009,7 @@ var BookingTable1 = function BookingTable1(props) {
|
|
|
12283
13009
|
data: data,
|
|
12284
13010
|
shopConfigStyle: shopConfigStyle
|
|
12285
13011
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12286
|
-
className: "mt-6 md:mt-12 grid grid-cols-1 gap-6 md:grid-cols-3
|
|
13012
|
+
className: "mt-6 md:mt-12 grid grid-cols-1 gap-6 md:grid-cols-3 lg:gap-12"
|
|
12287
13013
|
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12288
13014
|
href: convertURL(data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : _data$data$.route) || (data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.link) || "#"
|
|
12289
13015
|
}, data !== null && data !== void 0 && (_data$data3 = data.data) !== null && _data$data3 !== void 0 && (_data$data3$ = _data$data3[0]) !== null && _data$data3$ !== void 0 && _data$data3$.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -12294,13 +13020,13 @@ var BookingTable1 = function BookingTable1(props) {
|
|
|
12294
13020
|
}
|
|
12295
13021
|
})) : /*#__PURE__*/React__default.createElement("img", {
|
|
12296
13022
|
src: data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : (_data$data5$ = _data$data5[0]) === null || _data$data5$ === void 0 ? void 0 : _data$data5$.srcImage,
|
|
12297
|
-
className: "w-full h-auto"
|
|
13023
|
+
className: "w-full h-full lg:h-auto object-cover rounded-2xl"
|
|
12298
13024
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12299
13025
|
className: "mt-4 whitespace-pre-line"
|
|
12300
13026
|
}, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description)), /*#__PURE__*/React__default.createElement(BookingFoodForm, {
|
|
12301
13027
|
shopConfigStyle: shopConfigStyle,
|
|
12302
13028
|
shopConfig: shopConfig,
|
|
12303
|
-
className: "col-span-2"
|
|
13029
|
+
className: "md:col-span-2"
|
|
12304
13030
|
})));
|
|
12305
13031
|
};
|
|
12306
13032
|
|
|
@@ -12412,6 +13138,30 @@ var Banner3 = function Banner3(props) {
|
|
|
12412
13138
|
}));
|
|
12413
13139
|
};
|
|
12414
13140
|
|
|
13141
|
+
var Banner4 = function Banner4(props) {
|
|
13142
|
+
var _data$data, _data$data$, _data$data2, _data$data2$slice;
|
|
13143
|
+
var data = props.data,
|
|
13144
|
+
_props$Link = props.Link,
|
|
13145
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
13146
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
13147
|
+
className: SECTION_CLASS_PADDING + " grid grid-cols-1 bg-bgSecondary md:grid-cols-3 gap-6"
|
|
13148
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13149
|
+
src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : _data$data$.srcImage,
|
|
13150
|
+
className: "md:col-span-2 object-cover w-full h-full rounded-[10px]"
|
|
13151
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13152
|
+
className: "flex flex-col gap-6"
|
|
13153
|
+
}, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$slice = _data$data2.slice(1, 3)) === null || _data$data2$slice === void 0 ? void 0 : _data$data2$slice.map(function (item, index) {
|
|
13154
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13155
|
+
Link: Link,
|
|
13156
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
13157
|
+
key: "djsd-" + index
|
|
13158
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13159
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
13160
|
+
className: "object-cover w-full h-full rounded-xl"
|
|
13161
|
+
}));
|
|
13162
|
+
})));
|
|
13163
|
+
};
|
|
13164
|
+
|
|
12415
13165
|
var Banner7 = function Banner7(props) {
|
|
12416
13166
|
var _data$data;
|
|
12417
13167
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
@@ -12483,7 +13233,7 @@ var Partner1 = function Partner1(props) {
|
|
|
12483
13233
|
data: data,
|
|
12484
13234
|
shopConfigStyle: shopConfigStyle
|
|
12485
13235
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12486
|
-
className: "grid grid-cols-4 md:grid-cols-6 gap-6 mt-4 md:mt-6 p-6 rounded-xl",
|
|
13236
|
+
className: "grid grid-cols-4 md:grid-cols-6 gap-6 mt-4 md:mt-6 p-4 md:p-6 rounded-xl",
|
|
12487
13237
|
style: {
|
|
12488
13238
|
background: bgSecondary
|
|
12489
13239
|
}
|
|
@@ -13037,7 +13787,9 @@ var Footer7 = function Footer7(props) {
|
|
|
13037
13787
|
style: {
|
|
13038
13788
|
background: primary
|
|
13039
13789
|
}
|
|
13040
|
-
}))))), /*#__PURE__*/React__default.createElement("hr",
|
|
13790
|
+
}))))), /*#__PURE__*/React__default.createElement("hr", {
|
|
13791
|
+
className: "mt-12"
|
|
13792
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13041
13793
|
className: "py-4"
|
|
13042
13794
|
}, /*#__PURE__*/React__default.createElement("small", {
|
|
13043
13795
|
className: "me-5"
|
|
@@ -13057,24 +13809,26 @@ var RatingStar = function RatingStar(props) {
|
|
|
13057
13809
|
star = _props$star === void 0 ? 5 : _props$star,
|
|
13058
13810
|
_props$style = props.style,
|
|
13059
13811
|
style = _props$style === void 0 ? {} : _props$style,
|
|
13812
|
+
_props$color = props.color,
|
|
13813
|
+
color = _props$color === void 0 ? "#E2B93B" : _props$color,
|
|
13060
13814
|
_props$className = props.className,
|
|
13061
13815
|
className = _props$className === void 0 ? "" : _props$className;
|
|
13062
13816
|
var res = [];
|
|
13063
13817
|
for (var i = 1; i <= star; i++) {
|
|
13064
13818
|
res.push(/*#__PURE__*/React__default.createElement(fa6.FaStar, {
|
|
13065
|
-
color:
|
|
13819
|
+
color: color
|
|
13066
13820
|
}));
|
|
13067
|
-
if (i
|
|
13821
|
+
if (i >= 5) break;
|
|
13068
13822
|
}
|
|
13069
13823
|
var decimalPart = star % 1;
|
|
13070
13824
|
if (decimalPart && decimalPart >= 0.5) {
|
|
13071
13825
|
res.push(/*#__PURE__*/React__default.createElement(fa6.FaRegStarHalfStroke, {
|
|
13072
|
-
color:
|
|
13826
|
+
color: color
|
|
13073
13827
|
}));
|
|
13074
13828
|
}
|
|
13075
13829
|
for (var _i = res === null || res === void 0 ? void 0 : res.length; _i < 5; _i++) {
|
|
13076
13830
|
res.push(/*#__PURE__*/React__default.createElement(fa6.FaRegStar, {
|
|
13077
|
-
color:
|
|
13831
|
+
color: color
|
|
13078
13832
|
}));
|
|
13079
13833
|
}
|
|
13080
13834
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -13244,9 +13998,9 @@ var CustomerRating8 = function CustomerRating8(props) {
|
|
|
13244
13998
|
src: item === null || item === void 0 ? void 0 : item.avatar,
|
|
13245
13999
|
className: "w-40 h-40 rounded-full object-cover border-8 border-stroke"
|
|
13246
14000
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13247
|
-
className: "text-xl text-primary"
|
|
14001
|
+
className: "text-xl text-primary text-center"
|
|
13248
14002
|
}, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
|
|
13249
|
-
className: "text-gray3"
|
|
14003
|
+
className: "text-gray3 text-center"
|
|
13250
14004
|
}, item === null || item === void 0 ? void 0 : item.description), /*#__PURE__*/React__default.createElement("div", {
|
|
13251
14005
|
className: "flex gap-2 "
|
|
13252
14006
|
}, /*#__PURE__*/React__default.createElement(ri.RiDoubleQuotesL, {
|
|
@@ -13261,6 +14015,58 @@ var CustomerRating8 = function CustomerRating8(props) {
|
|
|
13261
14015
|
}))));
|
|
13262
14016
|
};
|
|
13263
14017
|
|
|
14018
|
+
var CustomerRating9 = function CustomerRating9(props) {
|
|
14019
|
+
var _data$data;
|
|
14020
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
14021
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
14022
|
+
_props$data = props.data,
|
|
14023
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
14024
|
+
_props$SectionTitle = props.SectionTitle,
|
|
14025
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
14026
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
14027
|
+
className: SECTION_DEFAULT_CLASS
|
|
14028
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
14029
|
+
data: data,
|
|
14030
|
+
shopConfigStyle: shopConfigStyle
|
|
14031
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14032
|
+
className: "mt-12 grid grid-cols-1 lg:grid-cols-3 gap-6"
|
|
14033
|
+
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
|
|
14034
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
14035
|
+
key: index,
|
|
14036
|
+
className: "flex bg-primary pt-16 px-6 pb-6"
|
|
14037
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14038
|
+
className: "bg-background relative"
|
|
14039
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14040
|
+
className: "flex justify-between items-center pr-4 w-full absolute top-[-40px]"
|
|
14041
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14042
|
+
className: "text-[#A85A09]"
|
|
14043
|
+
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
14044
|
+
width: "39",
|
|
14045
|
+
height: "28",
|
|
14046
|
+
viewBox: "0 0 39 28",
|
|
14047
|
+
fill: "none",
|
|
14048
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
14049
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
14050
|
+
d: "M34.5852 25.8793C34.9242 26.5446 34.4409 27.3333 33.6942 27.3333H27.7867C27.4106 27.3333 27.0664 27.1223 26.8957 26.7873L21.7391 16.6666V3.66663C21.7391 2.00977 23.0822 0.666626 24.7391 0.666626H35.0435C36.7003 0.666626 38.0435 2.00977 38.0435 3.66663V16.6666H29.8913L34.5852 25.8793ZM12.8461 25.8793C13.185 26.5446 12.7017 27.3333 11.955 27.3333H6.0475C5.67146 27.3333 5.3272 27.1223 5.15649 26.7873L-0.000110626 16.6666V3.66663C-0.000110626 2.00977 1.34304 0.666626 2.99989 0.666626H13.3043C14.9611 0.666626 16.3043 2.00977 16.3043 3.66663V16.6666H8.15208L12.8461 25.8793Z",
|
|
14051
|
+
fill: "currentColor"
|
|
14052
|
+
}))), /*#__PURE__*/React__default.createElement("img", {
|
|
14053
|
+
src: item === null || item === void 0 ? void 0 : item.avatar,
|
|
14054
|
+
className: " w-20 object-cover h-20 rounded-full"
|
|
14055
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
14056
|
+
className: "p-4 flex flex-col gap-2"
|
|
14057
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14058
|
+
className: "text-lg text-textHeading md:text-2xl"
|
|
14059
|
+
}, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
|
|
14060
|
+
className: "w-full border border-secondary"
|
|
14061
|
+
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.content), /*#__PURE__*/React__default.createElement("div", {
|
|
14062
|
+
className: "ms-auto"
|
|
14063
|
+
}, /*#__PURE__*/React__default.createElement(RatingStar, {
|
|
14064
|
+
star: (item === null || item === void 0 ? void 0 : item.rate) || 5,
|
|
14065
|
+
color: "#A85A09"
|
|
14066
|
+
})))));
|
|
14067
|
+
}))));
|
|
14068
|
+
};
|
|
14069
|
+
|
|
13264
14070
|
var CustomerRating10 = function CustomerRating10(props) {
|
|
13265
14071
|
var _data$data;
|
|
13266
14072
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
@@ -13435,7 +14241,7 @@ var Gallery1 = function Gallery1(props) {
|
|
|
13435
14241
|
}));
|
|
13436
14242
|
};
|
|
13437
14243
|
|
|
13438
|
-
var
|
|
14244
|
+
var Gallery2 = function Gallery2(props) {
|
|
13439
14245
|
var _data$data, _data$data$slice, _data$data2, _data$data2$slice, _data$data3, _data$data3$slice;
|
|
13440
14246
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
13441
14247
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
@@ -13455,25 +14261,49 @@ var Gallery1$1 = function Gallery1(props) {
|
|
|
13455
14261
|
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$slice = _data$data.slice(0, 2)) === null || _data$data$slice === void 0 ? void 0 : _data$data$slice.map(function (item, index) {
|
|
13456
14262
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
13457
14263
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
13458
|
-
className: "w-full h-full object-cover rounded-
|
|
14264
|
+
className: "w-full h-full object-cover rounded-lg md:rounded-2xl"
|
|
13459
14265
|
});
|
|
13460
14266
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
13461
14267
|
className: "flex flex-col gap-2 md:gap-4"
|
|
13462
14268
|
}, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$slice = _data$data2.slice(2, 4)) === null || _data$data2$slice === void 0 ? void 0 : _data$data2$slice.map(function (item, index) {
|
|
13463
14269
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
13464
14270
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
13465
|
-
className: "w-full h-full object-cover rounded-
|
|
14271
|
+
className: "w-full h-full object-cover rounded-lg md:rounded-2xl odd:h-[130%]"
|
|
13466
14272
|
});
|
|
13467
14273
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
13468
14274
|
className: "flex flex-col gap-2 md:gap-4"
|
|
13469
14275
|
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$slice = _data$data3.slice(4, 6)) === null || _data$data3$slice === void 0 ? void 0 : _data$data3$slice.map(function (item, index) {
|
|
13470
14276
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
13471
14277
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
13472
|
-
className: "w-full h-full object-cover rounded-
|
|
14278
|
+
className: "w-full h-full object-cover rounded-lg md:rounded-2xl even:h-[130%]"
|
|
13473
14279
|
});
|
|
13474
14280
|
})))));
|
|
13475
14281
|
};
|
|
13476
14282
|
|
|
14283
|
+
var Gallery3 = function Gallery3(props) {
|
|
14284
|
+
var _data$data;
|
|
14285
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
14286
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
14287
|
+
_props$data = props.data,
|
|
14288
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
14289
|
+
_props$SectionTitle = props.SectionTitle,
|
|
14290
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
14291
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
14292
|
+
className: "" + SECTION_DEFAULT_CLASS
|
|
14293
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
14294
|
+
data: data,
|
|
14295
|
+
shopConfigStyle: shopConfigStyle
|
|
14296
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14297
|
+
className: "grid grid-cols-3 gap-2 md:gap-6 mt-6 md:mt-12"
|
|
14298
|
+
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
|
|
14299
|
+
return /*#__PURE__*/React__default.createElement("img", {
|
|
14300
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
14301
|
+
key: "iggdf-" + index,
|
|
14302
|
+
className: (index === 1 || index === 5 ? "col-span-2" : "") + " w-full h-full object-cover"
|
|
14303
|
+
});
|
|
14304
|
+
}))));
|
|
14305
|
+
};
|
|
14306
|
+
|
|
13477
14307
|
var PageTitle1 = function PageTitle1(props) {
|
|
13478
14308
|
var _sectionData$;
|
|
13479
14309
|
var data = props.data,
|
|
@@ -13504,13 +14334,13 @@ var PageTitle2 = function PageTitle2(props) {
|
|
|
13504
14334
|
backgroundImage: "url(" + (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage) + ")"
|
|
13505
14335
|
}
|
|
13506
14336
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13507
|
-
className: "absolute top-0 w-full h-full bg-black
|
|
14337
|
+
className: "absolute top-0 w-full h-full bg-black/60 z-0"
|
|
13508
14338
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13509
|
-
className: "relative w-full p-20 z-10 flex flex-col gap-6 items-center justify-center"
|
|
14339
|
+
className: "relative w-full p-10 lg:p-20 z-10 flex flex-col gap-6 items-center justify-center"
|
|
13510
14340
|
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
13511
14341
|
className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
13512
14342
|
}, data !== null && data !== void 0 && data.sectionTitle ? data === null || data === void 0 ? void 0 : data.sectionTitle : route === null || route === void 0 ? void 0 : route.label), data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("div", {
|
|
13513
|
-
className: "text-lg md:text-2xl text-white"
|
|
14343
|
+
className: "text-lg md:text-2xl text-white text-center"
|
|
13514
14344
|
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null));
|
|
13515
14345
|
};
|
|
13516
14346
|
|
|
@@ -13591,9 +14421,9 @@ var PageTitle3 = function PageTitle3(props) {
|
|
|
13591
14421
|
backgroundImage: "url(" + (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage) + ")"
|
|
13592
14422
|
}
|
|
13593
14423
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13594
|
-
className: "absolute top-0 w-full h-full bg-black
|
|
14424
|
+
className: "absolute top-0 w-full h-full bg-black/60 z-0"
|
|
13595
14425
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13596
|
-
className: "relative w-full p-20 z-10 flex flex-col items-center justify-center"
|
|
14426
|
+
className: "relative w-full pt-8 md:p-2 md:p-12 lg:p-20 z-10 flex flex-col items-center justify-center"
|
|
13597
14427
|
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
13598
14428
|
className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
13599
14429
|
}, route === null || route === void 0 ? void 0 : (_route$route = route.route) === null || _route$route === void 0 ? void 0 : (_route$route$split = _route$route.split("/")) === null || _route$route$split === void 0 ? void 0 : (_route$route$split$fi = _route$route$split.filter(function (e) {
|
|
@@ -14066,6 +14896,10 @@ var FormCheckout = React.forwardRef(function (props, ref) {
|
|
|
14066
14896
|
})));
|
|
14067
14897
|
});
|
|
14068
14898
|
|
|
14899
|
+
var dayjs_min = createCommonjsModule(function (module, exports) {
|
|
14900
|
+
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
14901
|
+
});
|
|
14902
|
+
|
|
14069
14903
|
var OrderControllerWithoutLogin = function OrderControllerWithoutLogin(props) {
|
|
14070
14904
|
_objectDestructuringEmpty(props);
|
|
14071
14905
|
var draftOrderWithoutLogin = function draftOrderWithoutLogin(shopId, dataOrder) {
|
|
@@ -14735,7 +15569,7 @@ var SearchBar6 = function SearchBar6(props) {
|
|
|
14735
15569
|
}
|
|
14736
15570
|
};
|
|
14737
15571
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
14738
|
-
className: "w-full flex flex-col justify-center px-3 md:px-6 gap-2 md:gap-4 lg:gap-6 items-center
|
|
15572
|
+
className: "w-full flex flex-col justify-center px-3 md:px-6 gap-2 md:gap-4 lg:gap-6 items-center py-6 md:py-12 lg:px-20",
|
|
14739
15573
|
style: {
|
|
14740
15574
|
background: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.srcImage) + ")",
|
|
14741
15575
|
backgroundPosition: "center",
|
|
@@ -14948,7 +15782,7 @@ var ShopHighlights8 = function ShopHighlights8(props) {
|
|
|
14948
15782
|
className: "flex flex-col h-full gap-3"
|
|
14949
15783
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
14950
15784
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
14951
|
-
className: "object-cover"
|
|
15785
|
+
className: "object-cover rounded-lg"
|
|
14952
15786
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14953
15787
|
className: "text-2xl text-textBody"
|
|
14954
15788
|
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -14957,6 +15791,89 @@ var ShopHighlights8 = function ShopHighlights8(props) {
|
|
|
14957
15791
|
})));
|
|
14958
15792
|
};
|
|
14959
15793
|
|
|
15794
|
+
var ShopHighlights9 = function ShopHighlights9(props) {
|
|
15795
|
+
var data = props.data,
|
|
15796
|
+
_props$Link = props.Link,
|
|
15797
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
15798
|
+
_props$SectionTitle = props.SectionTitle,
|
|
15799
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
15800
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
15801
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
15802
|
+
className: SECTION_CLASS + " flex flex-col gap-6 md:gap-10"
|
|
15803
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
15804
|
+
data: data
|
|
15805
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15806
|
+
className: "grid grid-cols-1 lg:grid-cols-2 gap-4 lg:gap-x-12 lg:gap-y-6"
|
|
15807
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
15808
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
15809
|
+
Link: Link,
|
|
15810
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
15811
|
+
key: "kdf-" + index
|
|
15812
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15813
|
+
className: "flex flex-col md:flex-row h-full gap-4"
|
|
15814
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
15815
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
15816
|
+
className: "object-cover rounded-lg w-full md:min-w-60 md:max-w-60"
|
|
15817
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15818
|
+
className: "flex flex-col gap-2"
|
|
15819
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15820
|
+
className: "text-lg font-semibold text-textHeading"
|
|
15821
|
+
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
|
|
15822
|
+
className: "w-1/3 border border-stroke"
|
|
15823
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15824
|
+
className: "flex-grow text-textBody leading-relaxed"
|
|
15825
|
+
}, item === null || item === void 0 ? void 0 : item.description))));
|
|
15826
|
+
})));
|
|
15827
|
+
};
|
|
15828
|
+
|
|
15829
|
+
var ShopHighlights10 = function ShopHighlights10(props) {
|
|
15830
|
+
var data = props.data,
|
|
15831
|
+
_props$Link = props.Link,
|
|
15832
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
15833
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
15834
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
15835
|
+
className: "pt-10"
|
|
15836
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15837
|
+
className: "relative overflow-hidden w-full"
|
|
15838
|
+
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
15839
|
+
viewBox: "0 0 1440 105",
|
|
15840
|
+
className: "text-[#FFE7CC] w-[105%]",
|
|
15841
|
+
fill: "none",
|
|
15842
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
15843
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
15844
|
+
d: "M439.5 55.3739C216.5 71.3734 77 37.8735 0 0.747667V104.606H1440C1410.56 83.7584 1313.93 35.6959 1162.92 10.2239C974.151 -21.6161 726.714 34.7672 439.5 55.3739Z",
|
|
15845
|
+
fill: "currentColor"
|
|
15846
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
15847
|
+
className: "text-primary w-[105%] absolute top-2"
|
|
15848
|
+
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
15849
|
+
viewBox: "0 0 1440 104",
|
|
15850
|
+
fill: "none",
|
|
15851
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
15852
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
15853
|
+
d: "M439.5 54.6864C216.5 70.6859 77 37.186 0 0.0601582V103.918H1440C1410.56 83.0709 1313.93 35.0084 1162.92 9.53638C974.151 -22.3036 726.714 34.0797 439.5 54.6864Z",
|
|
15854
|
+
fill: "currentColor"
|
|
15855
|
+
})))), /*#__PURE__*/React__default.createElement("div", {
|
|
15856
|
+
className: SECTION_CLASS + " mt-0 md:mt-0 grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-4 bg-primary py-10"
|
|
15857
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
15858
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
15859
|
+
Link: Link,
|
|
15860
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
15861
|
+
key: "kdf-" + index
|
|
15862
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15863
|
+
className: "flex flex-col h-full gap-6"
|
|
15864
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15865
|
+
className: "flex flex-col gap-3 items-center"
|
|
15866
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15867
|
+
className: "text-2xl text-center text-textButton"
|
|
15868
|
+
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
|
|
15869
|
+
className: "flex-grow text-lg leading-relaxed text-center text-textSecondary"
|
|
15870
|
+
}, item === null || item === void 0 ? void 0 : item.description)), /*#__PURE__*/React__default.createElement("img", {
|
|
15871
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
15872
|
+
className: "h-56 lg:h-72 object-cover mt-auto border-4 border-secondary"
|
|
15873
|
+
})));
|
|
15874
|
+
})));
|
|
15875
|
+
};
|
|
15876
|
+
|
|
14960
15877
|
var VideoFull1 = function VideoFull1(props) {
|
|
14961
15878
|
var _data$data, _data$data$;
|
|
14962
15879
|
var shopConfigStyle = props.shopConfigStyle,
|
|
@@ -15044,11 +15961,6 @@ var NewsController = function NewsController(props) {
|
|
|
15044
15961
|
var _response$data2, _response$data2$data, _response$data3, _response$data3$data;
|
|
15045
15962
|
setNewsArticles(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$data = _response$data2.data) === null || _response$data2$data === void 0 ? void 0 : _response$data2$data.content);
|
|
15046
15963
|
setPage(response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : (_response$data3$data = _response$data3.data) === null || _response$data3$data === void 0 ? void 0 : _response$data3$data.totalElements);
|
|
15047
|
-
var url = new URL(window.location.href);
|
|
15048
|
-
if (/^(\/(tin-tuc-theo-danh-muc))\/[^/]+-\d+$/.test(url.pathname)) {
|
|
15049
|
-
url.pathname = url.pathname.replace(/\/[^/]+-\d+$/, "");
|
|
15050
|
-
window.history.replaceState({}, '', url.pathname + url.search);
|
|
15051
|
-
}
|
|
15052
15964
|
}
|
|
15053
15965
|
setLoading(false);
|
|
15054
15966
|
});
|
|
@@ -15282,7 +16194,8 @@ var News1 = function News1(props) {
|
|
|
15282
16194
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
15283
16195
|
_props$Link = props.Link,
|
|
15284
16196
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
15285
|
-
catId = props.catId
|
|
16197
|
+
_props$catId = props.catId,
|
|
16198
|
+
catId = _props$catId === void 0 ? "" : _props$catId;
|
|
15286
16199
|
var _useState = React.useState({
|
|
15287
16200
|
page: 0,
|
|
15288
16201
|
sort: "timeUpdate,DESC",
|
|
@@ -15322,6 +16235,18 @@ var News1 = function News1(props) {
|
|
|
15322
16235
|
setCategorySelected(category);
|
|
15323
16236
|
}
|
|
15324
16237
|
}, [newsCategories]);
|
|
16238
|
+
var handleSelectedCateogry = function handleSelectedCateogry(item) {
|
|
16239
|
+
if (catId) {
|
|
16240
|
+
var newUrl = getLinkNewsByCategory(item);
|
|
16241
|
+
window.history.replaceState(null, '', newUrl);
|
|
16242
|
+
}
|
|
16243
|
+
setCategorySelected(item);
|
|
16244
|
+
setParams(function (prev) {
|
|
16245
|
+
return _extends({}, prev, {
|
|
16246
|
+
catId: item === null || item === void 0 ? void 0 : item.catId
|
|
16247
|
+
});
|
|
16248
|
+
});
|
|
16249
|
+
};
|
|
15325
16250
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
15326
16251
|
className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 gap-6"
|
|
15327
16252
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -15342,12 +16267,7 @@ var News1 = function News1(props) {
|
|
|
15342
16267
|
className: "px-6 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
|
|
15343
16268
|
key: "sdjfdh-" + index,
|
|
15344
16269
|
onClick: function onClick() {
|
|
15345
|
-
|
|
15346
|
-
setParams(function (prev) {
|
|
15347
|
-
return _extends({}, prev, {
|
|
15348
|
-
catId: item === null || item === void 0 ? void 0 : item.catId
|
|
15349
|
-
});
|
|
15350
|
-
});
|
|
16270
|
+
handleSelectedCateogry(item);
|
|
15351
16271
|
}
|
|
15352
16272
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15353
16273
|
className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
|
|
@@ -15401,12 +16321,7 @@ var News1 = function News1(props) {
|
|
|
15401
16321
|
className: "px-4 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
|
|
15402
16322
|
key: "sdjfdh-" + index,
|
|
15403
16323
|
onClick: function onClick() {
|
|
15404
|
-
|
|
15405
|
-
setParams(function (prev) {
|
|
15406
|
-
return _extends({}, prev, {
|
|
15407
|
-
catId: item === null || item === void 0 ? void 0 : item.catId
|
|
15408
|
-
});
|
|
15409
|
-
});
|
|
16324
|
+
handleSelectedCateogry(item);
|
|
15410
16325
|
}
|
|
15411
16326
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15412
16327
|
className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
|
|
@@ -15565,6 +16480,7 @@ exports.Address1 = Address1;
|
|
|
15565
16480
|
exports.Banner1 = Banner1;
|
|
15566
16481
|
exports.Banner2 = Banner2;
|
|
15567
16482
|
exports.Banner3 = Banner3;
|
|
16483
|
+
exports.Banner4 = Banner4;
|
|
15568
16484
|
exports.Banner7 = Banner7;
|
|
15569
16485
|
exports.BannerFull1 = BannerFull1;
|
|
15570
16486
|
exports.BannerFull2 = BannerFull2;
|
|
@@ -15580,6 +16496,7 @@ exports.CustomerRating10 = CustomerRating10;
|
|
|
15580
16496
|
exports.CustomerRating5 = CustomerRating5;
|
|
15581
16497
|
exports.CustomerRating6 = CustomerRating6;
|
|
15582
16498
|
exports.CustomerRating8 = CustomerRating8;
|
|
16499
|
+
exports.CustomerRating9 = CustomerRating9;
|
|
15583
16500
|
exports.DateTimePicker = DateTimePicker;
|
|
15584
16501
|
exports.Employees1 = Employees1;
|
|
15585
16502
|
exports.Features2 = Features2;
|
|
@@ -15587,12 +16504,16 @@ exports.Features3 = Features3;
|
|
|
15587
16504
|
exports.Footer1 = Footer1;
|
|
15588
16505
|
exports.Footer7 = Footer7;
|
|
15589
16506
|
exports.Gallery1 = Gallery1;
|
|
15590
|
-
exports.Gallery2 =
|
|
16507
|
+
exports.Gallery2 = Gallery2;
|
|
16508
|
+
exports.Gallery3 = Gallery3;
|
|
15591
16509
|
exports.Hero1 = Hero1;
|
|
15592
16510
|
exports.Hero10 = Hero10;
|
|
15593
16511
|
exports.Hero11 = Hero11;
|
|
15594
16512
|
exports.Hero12 = Hero12;
|
|
15595
16513
|
exports.Hero13 = Hero13;
|
|
16514
|
+
exports.Hero14 = Hero14;
|
|
16515
|
+
exports.Hero15 = Hero15;
|
|
16516
|
+
exports.Hero16 = Hero16;
|
|
15596
16517
|
exports.Hero2 = Hero2;
|
|
15597
16518
|
exports.Hero5 = Hero5;
|
|
15598
16519
|
exports.Hero6 = Hero6;
|
|
@@ -15616,6 +16537,8 @@ exports.ProductHighlight1 = ProductHighlight1;
|
|
|
15616
16537
|
exports.ProductHot1 = ProductHot1;
|
|
15617
16538
|
exports.ProductHot3 = ProductHot3;
|
|
15618
16539
|
exports.ProductImage = ProductImage;
|
|
16540
|
+
exports.ProductItem10 = ProductItem10;
|
|
16541
|
+
exports.ProductItem11 = ProductItem11;
|
|
15619
16542
|
exports.ProductItem2 = ProductItem2;
|
|
15620
16543
|
exports.ProductItem3 = ProductItem3;
|
|
15621
16544
|
exports.ProductItem4 = ProductItem4;
|
|
@@ -15623,6 +16546,7 @@ exports.ProductItem5 = ProductItem5;
|
|
|
15623
16546
|
exports.ProductItem6 = ProductItem6;
|
|
15624
16547
|
exports.ProductItem7 = ProductItem7;
|
|
15625
16548
|
exports.ProductItem8 = ProductItem8;
|
|
16549
|
+
exports.ProductItem9 = ProductItem9;
|
|
15626
16550
|
exports.ProductList5 = ProductList5;
|
|
15627
16551
|
exports.ProductList7 = ProductList7;
|
|
15628
16552
|
exports.ProductSale2 = ProductSale2;
|
|
@@ -15630,6 +16554,7 @@ exports.ProductSearch1 = ProductSearch1;
|
|
|
15630
16554
|
exports.Products10 = Products10;
|
|
15631
16555
|
exports.Products11 = Products11;
|
|
15632
16556
|
exports.Products12 = Products12;
|
|
16557
|
+
exports.Products14 = Products14;
|
|
15633
16558
|
exports.Products2 = Products2;
|
|
15634
16559
|
exports.Products3 = Products3;
|
|
15635
16560
|
exports.Products9 = Products9;
|
|
@@ -15642,13 +16567,16 @@ exports.SectionTitle1 = SectionTitle1;
|
|
|
15642
16567
|
exports.SectionTitle2 = SectionTitle2;
|
|
15643
16568
|
exports.SectionTitle3 = SectionTitle3;
|
|
15644
16569
|
exports.SectionTitle4 = SectionTitle4;
|
|
16570
|
+
exports.SectionTitle5 = SectionTitle5;
|
|
15645
16571
|
exports.Select = Select$1;
|
|
15646
16572
|
exports.ServiceDetail1 = ServiceDetail1;
|
|
16573
|
+
exports.ShopHighlights10 = ShopHighlights10;
|
|
15647
16574
|
exports.ShopHighlights2 = ShopHighlights2;
|
|
15648
16575
|
exports.ShopHighlights5 = ShopHighlights5;
|
|
15649
16576
|
exports.ShopHighlights6 = ShopHighlights6;
|
|
15650
16577
|
exports.ShopHighlights7 = ShopHighlights7;
|
|
15651
16578
|
exports.ShopHighlights8 = ShopHighlights8;
|
|
16579
|
+
exports.ShopHighlights9 = ShopHighlights9;
|
|
15652
16580
|
exports.TextArea = TextArea;
|
|
15653
16581
|
exports.TreatmentDetail1 = TreatmentDetail1;
|
|
15654
16582
|
exports.TreatmentItem1 = TreatmentItem1;
|