@anker-in/ui 0.1.11 → 0.1.13
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/demo-room.js +119 -101
- package/dist/demo-room.js.map +1 -1
- package/dist/demo-room.mjs +119 -101
- package/dist/demo-room.mjs.map +1 -1
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +299 -262
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +299 -262
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -4
package/dist/index.mjs
CHANGED
|
@@ -13,13 +13,11 @@ import dayLocaleData from 'dayjs/plugin/localeData';
|
|
|
13
13
|
import weekday from 'dayjs/plugin/weekday';
|
|
14
14
|
import weekOfYear from 'dayjs/plugin/weekOfYear';
|
|
15
15
|
import { Swiper, SwiperSlide } from 'swiper/react';
|
|
16
|
+
import { Navigation, Pagination, Autoplay } from 'swiper/modules';
|
|
17
|
+
import 'swiper/css';
|
|
18
|
+
import 'swiper/css/navigation';
|
|
19
|
+
import 'swiper/css/pagination';
|
|
16
20
|
|
|
17
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
18
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
19
|
-
}) : x)(function(x) {
|
|
20
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
21
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
22
|
-
});
|
|
23
21
|
function cn(...inputs) {
|
|
24
22
|
return twMerge(clsx(inputs));
|
|
25
23
|
}
|
|
@@ -340,12 +338,14 @@ var StudioMap = ({
|
|
|
340
338
|
const lng = Number(location.lng);
|
|
341
339
|
const svgIcon = {
|
|
342
340
|
url: `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(`
|
|
343
|
-
<svg
|
|
344
|
-
<
|
|
341
|
+
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
342
|
+
<circle cx="24" cy="24" r="22" fill="#00000010"/>
|
|
343
|
+
<circle cx="24" cy="24" r="10" fill="#000000"/>
|
|
344
|
+
<circle cx="24" cy="24" r="5" fill="#3ADB67"/>
|
|
345
345
|
</svg>
|
|
346
346
|
`)}`,
|
|
347
|
-
scaledSize: { width:
|
|
348
|
-
anchor: { x:
|
|
347
|
+
scaledSize: { width: 48, height: 48 },
|
|
348
|
+
anchor: { x: 24, y: 24 }
|
|
349
349
|
};
|
|
350
350
|
const marker = new google.maps.Marker({
|
|
351
351
|
position: { lat, lng },
|
|
@@ -533,7 +533,7 @@ var StudioMap = ({
|
|
|
533
533
|
"div",
|
|
534
534
|
{
|
|
535
535
|
className: cn(
|
|
536
|
-
"flex items-center justify-center bg-gray-100 rounded-
|
|
536
|
+
"flex items-center overflow-hidden justify-center bg-gray-100 rounded-[16px]",
|
|
537
537
|
className
|
|
538
538
|
),
|
|
539
539
|
style: { height: mapHeight },
|
|
@@ -545,7 +545,7 @@ var StudioMap = ({
|
|
|
545
545
|
return /* @__PURE__ */ jsxs(
|
|
546
546
|
"div",
|
|
547
547
|
{
|
|
548
|
-
className: cn("relative w-full rounded-
|
|
548
|
+
className: cn("relative w-full rounded-[16px] overflow-hidden", className),
|
|
549
549
|
...props,
|
|
550
550
|
children: [
|
|
551
551
|
/* @__PURE__ */ jsx("div", { ref: mapRef, style: { height: mapHeight } }),
|
|
@@ -950,6 +950,29 @@ var LocationFilter = ({
|
|
|
950
950
|
);
|
|
951
951
|
const showIndexBar = filteredItems.length >= 10;
|
|
952
952
|
const handleItemClick = (item) => {
|
|
953
|
+
if (item.code === "__all__") {
|
|
954
|
+
if (currentLevel === "country") {
|
|
955
|
+
onSelect?.({
|
|
956
|
+
level: "country"
|
|
957
|
+
});
|
|
958
|
+
onClose?.();
|
|
959
|
+
} else if (currentLevel === "state") {
|
|
960
|
+
onSelect?.({
|
|
961
|
+
level: "state",
|
|
962
|
+
country: selectedCountry
|
|
963
|
+
});
|
|
964
|
+
onClose?.();
|
|
965
|
+
} else if (currentLevel === "city") {
|
|
966
|
+
const parts = selectedState?.split("/") || [];
|
|
967
|
+
onSelect?.({
|
|
968
|
+
level: "city",
|
|
969
|
+
country: parts[0],
|
|
970
|
+
state: parts[1]
|
|
971
|
+
});
|
|
972
|
+
onClose?.();
|
|
973
|
+
}
|
|
974
|
+
return;
|
|
975
|
+
}
|
|
953
976
|
if (currentLevel === "country") {
|
|
954
977
|
setSelectedCountry(item.code);
|
|
955
978
|
setCurrentLevel("state");
|
|
@@ -980,87 +1003,94 @@ var LocationFilter = ({
|
|
|
980
1003
|
return /* @__PURE__ */ jsxs(
|
|
981
1004
|
"div",
|
|
982
1005
|
{
|
|
983
|
-
style: { height: "
|
|
1006
|
+
style: { height: "724px" },
|
|
984
1007
|
className: cn(
|
|
985
|
-
"w-full rounded-[12px] absolute z-10
|
|
1008
|
+
"w-full rounded-b-[12px] absolute z-10 bottom-[-2px] left-0 bg-white border border-[#E4E5E6]",
|
|
986
1009
|
RoomsList_default.antdMobileScope
|
|
987
1010
|
),
|
|
988
1011
|
children: [
|
|
989
|
-
/* @__PURE__ */
|
|
1012
|
+
/* @__PURE__ */ jsx(
|
|
990
1013
|
"div",
|
|
991
1014
|
{
|
|
992
1015
|
style: { background: "#F8F8F8" },
|
|
993
|
-
className: "
|
|
994
|
-
children: [
|
|
995
|
-
/* @__PURE__ */ jsx(
|
|
1016
|
+
className: "h-[76px] font-bold text-[14px] flex flex-col",
|
|
1017
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center text-[16px] px-[20px] gap-[16px] py-[24px]", children: [
|
|
1018
|
+
/* @__PURE__ */ jsx(
|
|
996
1019
|
"button",
|
|
997
1020
|
{
|
|
998
|
-
onClick:
|
|
999
|
-
className:
|
|
1000
|
-
|
|
1001
|
-
"
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
width: "24",
|
|
1005
|
-
height: "24",
|
|
1006
|
-
viewBox: "0 0 24 24",
|
|
1007
|
-
fill: "none",
|
|
1008
|
-
children: /* @__PURE__ */ jsx(
|
|
1009
|
-
"path",
|
|
1010
|
-
{
|
|
1011
|
-
d: "M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z",
|
|
1012
|
-
fill: "#1D1D1F"
|
|
1013
|
-
}
|
|
1014
|
-
)
|
|
1015
|
-
}
|
|
1016
|
-
)
|
|
1021
|
+
onClick: () => handleTabClick("country"),
|
|
1022
|
+
className: cn(
|
|
1023
|
+
"pb-[4px] transition-colors",
|
|
1024
|
+
currentLevel === "country" ? "text-[#080A0F] border-b-2 border-[#3ADB67]" : "text-[#080A0F]"
|
|
1025
|
+
),
|
|
1026
|
+
children: pageData.country
|
|
1017
1027
|
}
|
|
1018
|
-
)
|
|
1019
|
-
/* @__PURE__ */
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
{
|
|
1047
|
-
onClick: () => handleTabClick("city"),
|
|
1048
|
-
disabled: !selectedState,
|
|
1049
|
-
className: cn(
|
|
1050
|
-
"pb-[4px] transition-colors",
|
|
1051
|
-
currentLevel === "city" ? "text-[#080A0F] border-b-2 border-[#3ADB67]" : "text-[#080A0F]",
|
|
1052
|
-
!selectedState && "opacity-50 cursor-not-allowed"
|
|
1053
|
-
),
|
|
1054
|
-
children: pageData.city
|
|
1055
|
-
}
|
|
1056
|
-
)
|
|
1057
|
-
] })
|
|
1058
|
-
]
|
|
1028
|
+
),
|
|
1029
|
+
/* @__PURE__ */ jsx(
|
|
1030
|
+
"button",
|
|
1031
|
+
{
|
|
1032
|
+
onClick: () => handleTabClick("state"),
|
|
1033
|
+
disabled: !selectedCountry,
|
|
1034
|
+
className: cn(
|
|
1035
|
+
"pb-[4px] transition-colors",
|
|
1036
|
+
currentLevel === "state" ? "text-[#080A0F] border-b-2 border-[#3ADB67]" : "text-[#080A0F]",
|
|
1037
|
+
!selectedCountry && "opacity-50 cursor-not-allowed"
|
|
1038
|
+
),
|
|
1039
|
+
children: pageData.state
|
|
1040
|
+
}
|
|
1041
|
+
),
|
|
1042
|
+
/* @__PURE__ */ jsx(
|
|
1043
|
+
"button",
|
|
1044
|
+
{
|
|
1045
|
+
onClick: () => handleTabClick("city"),
|
|
1046
|
+
disabled: !selectedState,
|
|
1047
|
+
className: cn(
|
|
1048
|
+
"pb-[4px] transition-colors",
|
|
1049
|
+
currentLevel === "city" ? "text-[#080A0F] border-b-2 border-[#3ADB67]" : "text-[#080A0F]",
|
|
1050
|
+
!selectedState && "opacity-50 cursor-not-allowed"
|
|
1051
|
+
),
|
|
1052
|
+
children: pageData.city
|
|
1053
|
+
}
|
|
1054
|
+
)
|
|
1055
|
+
] })
|
|
1059
1056
|
}
|
|
1060
1057
|
),
|
|
1061
|
-
/* @__PURE__ */ jsx(AntdMobileIsolated, { style: { height: "calc(100% -
|
|
1062
|
-
|
|
1063
|
-
|
|
1058
|
+
/* @__PURE__ */ jsx(AntdMobileIsolated, { style: { height: "calc(100% - 76px)" }, children: showIndexBar ? /* @__PURE__ */ jsxs("div", { style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
|
|
1059
|
+
/* @__PURE__ */ jsx(List, { children: /* @__PURE__ */ jsx(
|
|
1060
|
+
List.Item,
|
|
1061
|
+
{
|
|
1062
|
+
onClick: () => handleItemClick({ code: "__all__", name: pageData.allLocations || "All", count: filteredItems.length }),
|
|
1063
|
+
className: "text-[16px] !pl-[24px] font-bold",
|
|
1064
|
+
style: { cursor: "pointer", borderBottom: "1px solid #E4E5E6" },
|
|
1065
|
+
children: pageData.allLocations
|
|
1066
|
+
},
|
|
1067
|
+
"__all__"
|
|
1068
|
+
) }),
|
|
1069
|
+
/* @__PURE__ */ jsx(IndexBar, { style: { flex: 1 }, children: groupedItems.map((group) => {
|
|
1070
|
+
const { title, items } = group;
|
|
1071
|
+
return /* @__PURE__ */ jsx(IndexBar.Panel, { index: title, title, children: /* @__PURE__ */ jsx(List, { children: items.map((item) => /* @__PURE__ */ jsx(
|
|
1072
|
+
List.Item,
|
|
1073
|
+
{
|
|
1074
|
+
onClick: () => handleItemClick(item),
|
|
1075
|
+
className: "text-[16px] !pl-[24px]",
|
|
1076
|
+
style: { cursor: "pointer" },
|
|
1077
|
+
children: item.name
|
|
1078
|
+
},
|
|
1079
|
+
item.code
|
|
1080
|
+
)) }) }, title);
|
|
1081
|
+
}) })
|
|
1082
|
+
] }) : /* @__PURE__ */ jsx("div", { style: { height: "100%", overflow: "auto" }, children: /* @__PURE__ */ jsxs(List, { children: [
|
|
1083
|
+
/* @__PURE__ */ jsx(
|
|
1084
|
+
List.Item,
|
|
1085
|
+
{
|
|
1086
|
+
onClick: () => handleItemClick({ code: "__all__", name: pageData.allLocations || "All", count: filteredItems.length }),
|
|
1087
|
+
className: "text-[16px] !pl-[24px] font-bold",
|
|
1088
|
+
style: { cursor: "pointer", borderBottom: "1px solid #E4E5E6" },
|
|
1089
|
+
children: pageData.allLocations
|
|
1090
|
+
},
|
|
1091
|
+
"__all__"
|
|
1092
|
+
),
|
|
1093
|
+
filteredItems.map((item) => /* @__PURE__ */ jsx(
|
|
1064
1094
|
List.Item,
|
|
1065
1095
|
{
|
|
1066
1096
|
onClick: () => handleItemClick(item),
|
|
@@ -1069,17 +1099,8 @@ var LocationFilter = ({
|
|
|
1069
1099
|
children: item.name
|
|
1070
1100
|
},
|
|
1071
1101
|
item.code
|
|
1072
|
-
))
|
|
1073
|
-
}) })
|
|
1074
|
-
List.Item,
|
|
1075
|
-
{
|
|
1076
|
-
onClick: () => handleItemClick(item),
|
|
1077
|
-
className: "text-[16px] !pl-[24px]",
|
|
1078
|
-
style: { cursor: "pointer" },
|
|
1079
|
-
children: item.name
|
|
1080
|
-
},
|
|
1081
|
-
item.code
|
|
1082
|
-
)) }) }) })
|
|
1102
|
+
))
|
|
1103
|
+
] }) }) })
|
|
1083
1104
|
]
|
|
1084
1105
|
}
|
|
1085
1106
|
);
|
|
@@ -1305,10 +1326,6 @@ var RoomsList = ({
|
|
|
1305
1326
|
setSelectedLocation(selection);
|
|
1306
1327
|
setShowLocationFilter(false);
|
|
1307
1328
|
};
|
|
1308
|
-
const handleClearFilter = () => {
|
|
1309
|
-
setSelectedLocation(void 0);
|
|
1310
|
-
};
|
|
1311
|
-
console.log(filteredStudioLocations);
|
|
1312
1329
|
return /* @__PURE__ */ jsxs("div", { className, ...props, children: [
|
|
1313
1330
|
/* @__PURE__ */ jsx(Title, { title: mergedPageData.title }),
|
|
1314
1331
|
loading && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-[794px]", children: /* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsx("div", { className: "text-lg font-medium", children: mergedPageData.loadingText }) }) }),
|
|
@@ -1323,12 +1340,15 @@ var RoomsList = ({
|
|
|
1323
1340
|
className: "flex-none relative w-[420px] l:!w-full",
|
|
1324
1341
|
style: { height: "794px" },
|
|
1325
1342
|
children: [
|
|
1326
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
1343
|
+
/* @__PURE__ */ jsx("div", { className: cn(
|
|
1344
|
+
"mb-4 bg-white border border-[#E4E5E6] px-[20px] py-[16px]",
|
|
1345
|
+
showLocationFilter ? "rounded-t-[12px] rounded-b-none" : "rounded-[12px]"
|
|
1346
|
+
), children: /* @__PURE__ */ jsxs("div", { className: "h-[40px] font-bold text-[16px] l:text-[14px] gap-10 l:gap-4 flex items-center", children: [
|
|
1327
1347
|
/* @__PURE__ */ jsxs(
|
|
1328
1348
|
"button",
|
|
1329
1349
|
{
|
|
1330
1350
|
className: "flex cursor-pointer items-center hover:text-[#3ADB67] transition-colors",
|
|
1331
|
-
onClick: () => setShowLocationFilter(
|
|
1351
|
+
onClick: () => setShowLocationFilter(!showLocationFilter),
|
|
1332
1352
|
children: [
|
|
1333
1353
|
/* @__PURE__ */ jsx("span", { className: "mr-1", children: getSelectedLocationName() }),
|
|
1334
1354
|
/* @__PURE__ */ jsx(
|
|
@@ -1339,6 +1359,10 @@ var RoomsList = ({
|
|
|
1339
1359
|
height: "24",
|
|
1340
1360
|
viewBox: "0 0 24 24",
|
|
1341
1361
|
fill: "none",
|
|
1362
|
+
className: cn(
|
|
1363
|
+
"transition-transform duration-300",
|
|
1364
|
+
showLocationFilter && "rotate-180"
|
|
1365
|
+
),
|
|
1342
1366
|
children: /* @__PURE__ */ jsx(
|
|
1343
1367
|
"path",
|
|
1344
1368
|
{
|
|
@@ -1351,14 +1375,7 @@ var RoomsList = ({
|
|
|
1351
1375
|
]
|
|
1352
1376
|
}
|
|
1353
1377
|
),
|
|
1354
|
-
selectedLocation &&
|
|
1355
|
-
"button",
|
|
1356
|
-
{
|
|
1357
|
-
onClick: handleClearFilter,
|
|
1358
|
-
className: "ml-auto text-[14px] text-[#2E8B57] hover:underline",
|
|
1359
|
-
children: mergedPageData.locationFilter.clear
|
|
1360
|
-
}
|
|
1361
|
-
),
|
|
1378
|
+
selectedLocation && false,
|
|
1362
1379
|
/* @__PURE__ */ jsxs("div", { className: "flex text-[#767880] cursor-not-allowed", children: [
|
|
1363
1380
|
mergedPageData.machine,
|
|
1364
1381
|
/* @__PURE__ */ jsx(
|
|
@@ -1399,7 +1416,6 @@ var RoomsList = ({
|
|
|
1399
1416
|
euifyMakeModel: item?.euifyMakeModel || "",
|
|
1400
1417
|
onSchedule,
|
|
1401
1418
|
onMouseEnter: () => setHoveredRoomId(item.id),
|
|
1402
|
-
onMouseLeave: () => setHoveredRoomId(null),
|
|
1403
1419
|
pageData: {
|
|
1404
1420
|
...mergedPageData.studioCard,
|
|
1405
1421
|
noAvailableTime: mergedPageData?.noAvailableTime
|
|
@@ -1655,6 +1671,7 @@ var QuestionnaireForm = ({
|
|
|
1655
1671
|
const [agreements, setAgreements] = useState({});
|
|
1656
1672
|
const [agreementError, setAgreementError] = useState("");
|
|
1657
1673
|
const [phoneCountryCodes, setPhoneCountryCodes] = useState({});
|
|
1674
|
+
const [otherInputs, setOtherInputs] = useState({});
|
|
1658
1675
|
const defaultCountryCodes = [
|
|
1659
1676
|
{ code: "+1", country: "US/CA" },
|
|
1660
1677
|
{ code: "+86", country: "CN" },
|
|
@@ -1715,6 +1732,13 @@ var QuestionnaireForm = ({
|
|
|
1715
1732
|
setAgreementError("");
|
|
1716
1733
|
}
|
|
1717
1734
|
};
|
|
1735
|
+
const handleOtherInputChange = (questionId, value) => {
|
|
1736
|
+
setOtherInputs((prev) => ({
|
|
1737
|
+
...prev,
|
|
1738
|
+
[questionId]: value
|
|
1739
|
+
}));
|
|
1740
|
+
handleChange(questionId, value);
|
|
1741
|
+
};
|
|
1718
1742
|
const validateForm = () => {
|
|
1719
1743
|
const newErrors = {};
|
|
1720
1744
|
questions.forEach((question) => {
|
|
@@ -1884,11 +1908,12 @@ var QuestionnaireForm = ({
|
|
|
1884
1908
|
value: option.value || option.label,
|
|
1885
1909
|
checked: responses[questionId] === (option.value || option.label),
|
|
1886
1910
|
onChange: (e) => handleChange(questionId, e.target.value),
|
|
1887
|
-
className: "w-5 h-5
|
|
1911
|
+
className: "w-5 h-5 appearance-none cursor-pointer flex-shrink-0",
|
|
1888
1912
|
style: {
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1913
|
+
backgroundImage: responses[questionId] === (option.value || option.label) ? "url(https://cdn.shopify.com/s/files/1/0569/5147/2268/files/SelectBox.png?v=1769507941)" : "url(https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Frame_2121235232_2.png?v=1769507995)",
|
|
1914
|
+
backgroundSize: "contain",
|
|
1915
|
+
backgroundRepeat: "no-repeat",
|
|
1916
|
+
backgroundPosition: "center"
|
|
1892
1917
|
}
|
|
1893
1918
|
}
|
|
1894
1919
|
),
|
|
@@ -1897,6 +1922,61 @@ var QuestionnaireForm = ({
|
|
|
1897
1922
|
},
|
|
1898
1923
|
option.value || option.label
|
|
1899
1924
|
)) });
|
|
1925
|
+
case "radio_with_other": {
|
|
1926
|
+
const isOtherSelected = responses[questionId] === "__other__" || responses[questionId] && !question?.options?.find(
|
|
1927
|
+
(opt) => (opt.value || opt.label) === responses[questionId]
|
|
1928
|
+
);
|
|
1929
|
+
return /* @__PURE__ */ jsx("div", { className: "space-y-3", children: question?.options?.map((option) => {
|
|
1930
|
+
const optionValue = option.value || option.label;
|
|
1931
|
+
const isOtherOption = optionValue === "__other__";
|
|
1932
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
1933
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-3 cursor-pointer group", children: [
|
|
1934
|
+
/* @__PURE__ */ jsx(
|
|
1935
|
+
"input",
|
|
1936
|
+
{
|
|
1937
|
+
type: "radio",
|
|
1938
|
+
name: questionId,
|
|
1939
|
+
value: optionValue,
|
|
1940
|
+
checked: isOtherOption ? isOtherSelected : responses[questionId] === optionValue,
|
|
1941
|
+
onChange: (e) => {
|
|
1942
|
+
if (isOtherOption) {
|
|
1943
|
+
handleChange(questionId, "__other__");
|
|
1944
|
+
setOtherInputs((prev) => ({
|
|
1945
|
+
...prev,
|
|
1946
|
+
[questionId]: ""
|
|
1947
|
+
}));
|
|
1948
|
+
} else {
|
|
1949
|
+
handleChange(questionId, e.target.value);
|
|
1950
|
+
}
|
|
1951
|
+
},
|
|
1952
|
+
className: "w-5 h-5 appearance-none cursor-pointer flex-shrink-0",
|
|
1953
|
+
style: {
|
|
1954
|
+
backgroundImage: (isOtherOption ? isOtherSelected : responses[questionId] === optionValue) ? "url(https://cdn.shopify.com/s/files/1/0569/5147/2268/files/SelectBox.png?v=1769507941)" : "url(https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Frame_2121235232_2.png?v=1769507995)",
|
|
1955
|
+
backgroundSize: "contain",
|
|
1956
|
+
backgroundRepeat: "no-repeat",
|
|
1957
|
+
backgroundPosition: "center"
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
),
|
|
1961
|
+
/* @__PURE__ */ jsx("span", { className: "text-base text-gray-900 dark:text-gray-900 font-bold group-hover:text-[#3ADB67] transition-colors", children: option.label })
|
|
1962
|
+
] }),
|
|
1963
|
+
isOtherOption && isOtherSelected && /* @__PURE__ */ jsx(
|
|
1964
|
+
"input",
|
|
1965
|
+
{
|
|
1966
|
+
type: "text",
|
|
1967
|
+
value: otherInputs[questionId] || "",
|
|
1968
|
+
onChange: (e) => handleOtherInputChange(questionId, e.target.value),
|
|
1969
|
+
placeholder: question.placeholder || "Please specify...",
|
|
1970
|
+
className: cn(
|
|
1971
|
+
"w-full ml-8 px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-gray-900",
|
|
1972
|
+
"focus:outline-none focus:ring-2 focus:ring-[#3ADB67] focus:border-transparent",
|
|
1973
|
+
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
1974
|
+
)
|
|
1975
|
+
}
|
|
1976
|
+
)
|
|
1977
|
+
] }, optionValue);
|
|
1978
|
+
}) });
|
|
1979
|
+
}
|
|
1900
1980
|
case "checkbox":
|
|
1901
1981
|
return /* @__PURE__ */ jsx("div", { className: "space-y-3", children: question?.options?.map((option) => {
|
|
1902
1982
|
const optionValue = option.value || option.label;
|
|
@@ -1920,9 +2000,7 @@ var QuestionnaireForm = ({
|
|
|
1920
2000
|
),
|
|
1921
2001
|
className: "w-5 h-5 text-[#3ADB67] focus:ring-[#3ADB67] focus:ring-2 rounded",
|
|
1922
2002
|
style: {
|
|
1923
|
-
|
|
1924
|
-
borderColor: "#D1D5DB",
|
|
1925
|
-
colorScheme: "light"
|
|
2003
|
+
accentColor: "#3ADB67"
|
|
1926
2004
|
}
|
|
1927
2005
|
}
|
|
1928
2006
|
),
|
|
@@ -1933,7 +2011,7 @@ var QuestionnaireForm = ({
|
|
|
1933
2011
|
);
|
|
1934
2012
|
}) });
|
|
1935
2013
|
case "select":
|
|
1936
|
-
return /* @__PURE__ */
|
|
2014
|
+
return /* @__PURE__ */ jsx(
|
|
1937
2015
|
"select",
|
|
1938
2016
|
{
|
|
1939
2017
|
value: responses[questionId] || "",
|
|
@@ -1944,17 +2022,14 @@ var QuestionnaireForm = ({
|
|
|
1944
2022
|
"cursor-pointer",
|
|
1945
2023
|
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
1946
2024
|
),
|
|
1947
|
-
children:
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
option.value || option.label
|
|
1956
|
-
))
|
|
1957
|
-
]
|
|
2025
|
+
children: question.options?.map((option) => /* @__PURE__ */ jsx(
|
|
2026
|
+
"option",
|
|
2027
|
+
{
|
|
2028
|
+
value: option.value || option.label,
|
|
2029
|
+
children: option.label
|
|
2030
|
+
},
|
|
2031
|
+
option.value || option.label
|
|
2032
|
+
))
|
|
1958
2033
|
}
|
|
1959
2034
|
);
|
|
1960
2035
|
default:
|
|
@@ -1975,7 +2050,14 @@ var QuestionnaireForm = ({
|
|
|
1975
2050
|
] }),
|
|
1976
2051
|
renderQuestion(question),
|
|
1977
2052
|
question.hint && !errors[questionId] && /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-500 font-bold", children: question.hint }),
|
|
1978
|
-
errors[questionId] && /* @__PURE__ */ jsx(
|
|
2053
|
+
errors[questionId] && /* @__PURE__ */ jsx(
|
|
2054
|
+
"p",
|
|
2055
|
+
{
|
|
2056
|
+
className: "text-sm font-bold",
|
|
2057
|
+
style: { color: "#FF4D4D" },
|
|
2058
|
+
children: errors[questionId]
|
|
2059
|
+
}
|
|
2060
|
+
)
|
|
1979
2061
|
] }, questionId);
|
|
1980
2062
|
}) }) }),
|
|
1981
2063
|
!!selectedTimeslotId && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center", children: [
|
|
@@ -1988,11 +2070,9 @@ var QuestionnaireForm = ({
|
|
|
1988
2070
|
id: `agreement-${index}`,
|
|
1989
2071
|
checked: agreements[index] || false,
|
|
1990
2072
|
onChange: (e) => handleAgreementChange(index, e.target.checked),
|
|
1991
|
-
className: "w-5 h-5 rounded text-[#
|
|
2073
|
+
className: "w-5 h-5 rounded text-[#3ADB67] focus:ring-[#3ADB67] cursor-pointer flex-shrink-0",
|
|
1992
2074
|
style: {
|
|
1993
|
-
|
|
1994
|
-
borderColor: "#D1D5DB",
|
|
1995
|
-
colorScheme: "light"
|
|
2075
|
+
accentColor: "#3ADB67"
|
|
1996
2076
|
}
|
|
1997
2077
|
}
|
|
1998
2078
|
),
|
|
@@ -2006,7 +2086,14 @@ var QuestionnaireForm = ({
|
|
|
2006
2086
|
}
|
|
2007
2087
|
)
|
|
2008
2088
|
] }, index)),
|
|
2009
|
-
agreementError && /* @__PURE__ */ jsx(
|
|
2089
|
+
agreementError && /* @__PURE__ */ jsx(
|
|
2090
|
+
"p",
|
|
2091
|
+
{
|
|
2092
|
+
className: "text-sm font-bold mt-2",
|
|
2093
|
+
style: { color: "#FF4D4D" },
|
|
2094
|
+
children: agreementError
|
|
2095
|
+
}
|
|
2096
|
+
)
|
|
2010
2097
|
] }),
|
|
2011
2098
|
/* @__PURE__ */ jsx(
|
|
2012
2099
|
"button",
|
|
@@ -2047,7 +2134,8 @@ var DateTimePicker = ({
|
|
|
2047
2134
|
bookingFailed: "Booking failed"
|
|
2048
2135
|
},
|
|
2049
2136
|
locale,
|
|
2050
|
-
onBookingSuccess
|
|
2137
|
+
onBookingSuccess,
|
|
2138
|
+
onQuestionnaireSubmit
|
|
2051
2139
|
}) => {
|
|
2052
2140
|
const { token } = theme.useToken();
|
|
2053
2141
|
const [selectedDate, setSelectedDate] = useState(null);
|
|
@@ -2285,7 +2373,7 @@ var DateTimePicker = ({
|
|
|
2285
2373
|
}
|
|
2286
2374
|
.calendar-custom-cell .ant-picker-cell-disabled .ant-picker-cell-inner {
|
|
2287
2375
|
background-color: #F5F5F5 !important;
|
|
2288
|
-
color: #
|
|
2376
|
+
color: #767880 !important;
|
|
2289
2377
|
border: none !important;
|
|
2290
2378
|
cursor: not-allowed !important;
|
|
2291
2379
|
box-shadow: none !important;
|
|
@@ -2332,7 +2420,7 @@ var DateTimePicker = ({
|
|
|
2332
2420
|
className: `ant-picker-cell-inner ${isSelected ? "ant-picker-cell-inner-selected" : ""} ${isToday ? "ant-picker-cell-inner-today" : ""}`,
|
|
2333
2421
|
style: {
|
|
2334
2422
|
backgroundColor: isSelected ? "#3ADB67" : void 0,
|
|
2335
|
-
color: isSelected ? "#080A0F" : isDisabled ? "#
|
|
2423
|
+
color: isSelected ? "#080A0F" : isDisabled ? "#767880" : void 0,
|
|
2336
2424
|
borderColor: isSelected ? "#3ADB67" : isToday ? "#3ADB67" : void 0
|
|
2337
2425
|
},
|
|
2338
2426
|
children: /* @__PURE__ */ jsx("div", { className: "ant-picker-calendar-date-value", children: date.date() })
|
|
@@ -2532,7 +2620,7 @@ var DateTimePicker = ({
|
|
|
2532
2620
|
)
|
|
2533
2621
|
] })
|
|
2534
2622
|
] }),
|
|
2535
|
-
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 mt-[40px] gap-4 l:mt-[16px] l:flex l:flex-col l:gap-2", children: timeslotsLoading ? /* @__PURE__ */ jsx("div", { className: "col-span-2 text-center text-[#
|
|
2623
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 mt-[40px] gap-4 l:mt-[16px] l:flex l:flex-col l:gap-2", children: timeslotsLoading ? /* @__PURE__ */ jsx("div", { className: "col-span-2 text-center text-[#767880] py-8", children: pageData.loadingTimeSlots }) : timeslotsError ? /* @__PURE__ */ jsx("div", { className: "col-span-2 text-center text-red-600 py-8", children: pageData.failedToLoadTimeSlots }) : dayTimeslots.length === 0 ? /* @__PURE__ */ jsx("div", { className: "col-span-2 text-center text-[#767880] py-8", children: pageData.noAvailableTimeSlots }) : dayTimeslots.map((slot) => {
|
|
2536
2624
|
const isAvailable = slot.status === "available";
|
|
2537
2625
|
const isFull = slot.status === "full";
|
|
2538
2626
|
const isSelected = selectedTimeslotId === slot.id;
|
|
@@ -2548,12 +2636,12 @@ var DateTimePicker = ({
|
|
|
2548
2636
|
className: `
|
|
2549
2637
|
rounded-[20px] w-full text-[18px] l:gap-2 l:text-[16px] flex items-center justify-center gap-4 h-[76px]
|
|
2550
2638
|
border text-center transition-colors
|
|
2551
|
-
${isSelected ? "border-[#3ADB67] bg-[#3ADB67] cursor-pointer" : isAvailable ? "border-[#E4E5E6] hover:border-[#3ADB67] hover:bg-[#3ADB67] cursor-pointer" : "border-[#E4E5E6] bg-[#F5F5F5] text-[#
|
|
2639
|
+
${isSelected ? "border-[#3ADB67] bg-[#3ADB67] cursor-pointer" : isAvailable ? "border-[#E4E5E6] hover:border-[#3ADB67] hover:bg-[#3ADB67] cursor-pointer" : "border-[#E4E5E6] bg-[#F5F5F5] text-[#767880] cursor-not-allowed"}
|
|
2552
2640
|
`,
|
|
2553
2641
|
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
|
|
2554
2642
|
/* @__PURE__ */ jsx("div", { children: formatTimeslot(slot) }),
|
|
2555
|
-
isFull && /* @__PURE__ */ jsx("div", { className: "text-[16px] l:text-[14px] text-[#
|
|
2556
|
-
isAvailable && !isSelected && /* @__PURE__ */ jsxs("div", { className: "text-[16px] l:text-[14px] text-[#
|
|
2643
|
+
isFull && /* @__PURE__ */ jsx("div", { className: "text-[16px] l:text-[14px] text-[#767880] mt-[2px]", children: pageData.full }),
|
|
2644
|
+
isAvailable && !isSelected && /* @__PURE__ */ jsxs("div", { className: "text-[16px] l:text-[14px] text-[#767880] mt-1", children: [
|
|
2557
2645
|
slot.capacity - slot.booked_count,
|
|
2558
2646
|
" ",
|
|
2559
2647
|
pageData.spotsLeft
|
|
@@ -2576,7 +2664,7 @@ var DateTimePicker = ({
|
|
|
2576
2664
|
] }),
|
|
2577
2665
|
/* @__PURE__ */ jsxs("div", { className: "mt-12", children: [
|
|
2578
2666
|
!!questionnaire?.questions?.length && /* @__PURE__ */ jsx("div", { className: "text-[48px] font-bold text-center mb-8 l:mb-[24px] l:text-[32px] l:text-left", children: pageData.fillOutForm }),
|
|
2579
|
-
questionnaireLoading ? /* @__PURE__ */ jsx("div", { className: "text-center text-[#
|
|
2667
|
+
questionnaireLoading ? /* @__PURE__ */ jsx("div", { className: "text-center text-[#767880] py-8", children: pageData.loadingQuestionnaire }) : /* @__PURE__ */ jsx(
|
|
2580
2668
|
QuestionnaireForm,
|
|
2581
2669
|
{
|
|
2582
2670
|
questions: questionnaire?.questions || [],
|
|
@@ -2584,6 +2672,9 @@ var DateTimePicker = ({
|
|
|
2584
2672
|
pageData,
|
|
2585
2673
|
selectedTimeslotId,
|
|
2586
2674
|
onSubmit: async (responses) => {
|
|
2675
|
+
if (onQuestionnaireSubmit) {
|
|
2676
|
+
await onQuestionnaireSubmit(responses);
|
|
2677
|
+
}
|
|
2587
2678
|
try {
|
|
2588
2679
|
const customerName = responses.name || responses.customer_name || "";
|
|
2589
2680
|
const customerEmail = responses.email || responses.customer_email || "";
|
|
@@ -2614,61 +2705,6 @@ var DateTimePicker = ({
|
|
|
2614
2705
|
] });
|
|
2615
2706
|
};
|
|
2616
2707
|
var DateTimePicker_default = DateTimePicker;
|
|
2617
|
-
var Navigation;
|
|
2618
|
-
var Pagination;
|
|
2619
|
-
var Autoplay;
|
|
2620
|
-
var swiperVersion = "11+";
|
|
2621
|
-
try {
|
|
2622
|
-
const modules = __require("swiper/modules");
|
|
2623
|
-
Navigation = modules.Navigation;
|
|
2624
|
-
Pagination = modules.Pagination;
|
|
2625
|
-
Autoplay = modules.Autoplay;
|
|
2626
|
-
swiperVersion = "11+";
|
|
2627
|
-
} catch (e) {
|
|
2628
|
-
try {
|
|
2629
|
-
const SwiperCore = __require("swiper");
|
|
2630
|
-
const SwiperNavigation = __require("swiper/modules/navigation");
|
|
2631
|
-
const SwiperPagination = __require("swiper/modules/pagination");
|
|
2632
|
-
const SwiperAutoplay = __require("swiper/modules/autoplay");
|
|
2633
|
-
const SwiperClass = SwiperCore.default || SwiperCore;
|
|
2634
|
-
if (SwiperClass && SwiperClass.use) {
|
|
2635
|
-
SwiperClass.use([
|
|
2636
|
-
SwiperNavigation.default || SwiperNavigation,
|
|
2637
|
-
SwiperPagination.default || SwiperPagination,
|
|
2638
|
-
SwiperAutoplay.default || SwiperAutoplay
|
|
2639
|
-
]);
|
|
2640
|
-
}
|
|
2641
|
-
Navigation = SwiperNavigation.default || SwiperNavigation;
|
|
2642
|
-
Pagination = SwiperPagination.default || SwiperPagination;
|
|
2643
|
-
Autoplay = SwiperAutoplay.default || SwiperAutoplay;
|
|
2644
|
-
swiperVersion = "8";
|
|
2645
|
-
} catch (e2) {
|
|
2646
|
-
console.warn("Failed to load swiper modules:", e2);
|
|
2647
|
-
}
|
|
2648
|
-
}
|
|
2649
|
-
if (typeof window !== "undefined") {
|
|
2650
|
-
try {
|
|
2651
|
-
__require("swiper/css");
|
|
2652
|
-
__require("swiper/css/navigation");
|
|
2653
|
-
__require("swiper/css/pagination");
|
|
2654
|
-
} catch (e) {
|
|
2655
|
-
try {
|
|
2656
|
-
__require("swiper/swiper.min.css");
|
|
2657
|
-
__require("swiper/modules/navigation/navigation.min.css");
|
|
2658
|
-
__require("swiper/modules/pagination/pagination.min.css");
|
|
2659
|
-
} catch (e2) {
|
|
2660
|
-
console.warn("Failed to load swiper styles");
|
|
2661
|
-
}
|
|
2662
|
-
}
|
|
2663
|
-
}
|
|
2664
|
-
var defaultDescriptions = [
|
|
2665
|
-
"Norem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis.",
|
|
2666
|
-
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos."
|
|
2667
|
-
];
|
|
2668
|
-
var defaultImages = [
|
|
2669
|
-
"https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
|
|
2670
|
-
"https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638"
|
|
2671
|
-
];
|
|
2672
2708
|
var DemoRoomDetail = ({
|
|
2673
2709
|
apiClient,
|
|
2674
2710
|
demoRoomCode,
|
|
@@ -2695,20 +2731,21 @@ var DemoRoomDetail = ({
|
|
|
2695
2731
|
} = useDemoRoom(apiClient, demoRoomCode || "", locale, {
|
|
2696
2732
|
enabled: !!apiClient && !!demoRoomCode
|
|
2697
2733
|
});
|
|
2698
|
-
const title = demoRoom?.name || titleProp || "
|
|
2699
|
-
const descriptions = demoRoom?.description ? [demoRoom.description] : descriptionsProp
|
|
2700
|
-
const devices = demoRoom?.equipment?.join(", ") || devicesProp || "
|
|
2701
|
-
const address = demoRoom?.address || addressProp || "
|
|
2702
|
-
const images = demoRoom?.images && demoRoom.images.length > 0 ? demoRoom.images : imagesProp ||
|
|
2734
|
+
const title = demoRoom?.name || titleProp || "";
|
|
2735
|
+
const descriptions = demoRoom?.description ? [demoRoom.description] : descriptionsProp;
|
|
2736
|
+
const devices = demoRoom?.equipment?.join(", ") || devicesProp || "";
|
|
2737
|
+
const address = demoRoom?.address || addressProp || "";
|
|
2738
|
+
const images = demoRoom?.images && demoRoom.images.length > 0 ? demoRoom.images : imagesProp || [];
|
|
2703
2739
|
const googleMapsLink = mapsLink || (() => {
|
|
2704
2740
|
if (demoRoom?.latitude && demoRoom?.longitude) {
|
|
2705
2741
|
return `https://www.google.com/maps/search/?api=1&query=${demoRoom.latitude},${demoRoom.longitude}`;
|
|
2706
|
-
} else {
|
|
2742
|
+
} else if (address) {
|
|
2707
2743
|
return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(address)}`;
|
|
2708
2744
|
}
|
|
2745
|
+
return "#";
|
|
2709
2746
|
})();
|
|
2710
2747
|
if (loading && apiClient && demoRoomCode) {
|
|
2711
|
-
return /* @__PURE__ */ jsx("div", { className: cn("w-full", className), ...props, children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-8 items-start", children: [
|
|
2748
|
+
return /* @__PURE__ */ jsx("div", { className: cn("w-full pb-4", className), ...props, children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-8 items-start", children: [
|
|
2712
2749
|
/* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
2713
2750
|
/* @__PURE__ */ jsx("div", { className: "h-12 bg-gray-200 rounded animate-pulse" }),
|
|
2714
2751
|
/* @__PURE__ */ jsx("div", { className: "h-24 bg-gray-200 rounded animate-pulse" }),
|
|
@@ -2723,10 +2760,13 @@ var DemoRoomDetail = ({
|
|
|
2723
2760
|
/* @__PURE__ */ jsx("p", { className: "text-sm mt-2", children: error.message })
|
|
2724
2761
|
] }) });
|
|
2725
2762
|
}
|
|
2726
|
-
return /* @__PURE__ */ jsx("div", { className: cn("w-full", className), ...props, children: /* @__PURE__ */ jsxs("div", { className:
|
|
2763
|
+
return /* @__PURE__ */ jsx("div", { className: cn("w-full", className), ...props, children: /* @__PURE__ */ jsxs("div", { className: cn(
|
|
2764
|
+
"gap-[80px] l:gap-[40px] l:flex l:flex-col-reverse items-start py-[24px] l:pb-[64px]",
|
|
2765
|
+
images.length > 0 ? "grid grid-cols-2" : "flex"
|
|
2766
|
+
), children: [
|
|
2727
2767
|
/* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
2728
2768
|
/* @__PURE__ */ jsx("h1", { className: "text-[48px] l:text-[32px] font-bold text-gray-900 leading-tight", children: title }),
|
|
2729
|
-
/* @__PURE__ */ jsx("div", { className: "mt-[20px]", children: descriptions
|
|
2769
|
+
/* @__PURE__ */ jsx("div", { className: "mt-[20px]", children: descriptions?.map((desc, index) => /* @__PURE__ */ jsx(
|
|
2730
2770
|
"p",
|
|
2731
2771
|
{
|
|
2732
2772
|
className: "text-base text-gray-600 leading-relaxed",
|
|
@@ -2841,67 +2881,62 @@ var DemoRoomDetail = ({
|
|
|
2841
2881
|
] })
|
|
2842
2882
|
] })
|
|
2843
2883
|
] }),
|
|
2844
|
-
/* @__PURE__ */
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
spaceBetween: 0,
|
|
2849
|
-
slidesPerView: 1,
|
|
2850
|
-
navigation: true,
|
|
2851
|
-
pagination: { clickable: true },
|
|
2852
|
-
autoplay: {
|
|
2853
|
-
delay: 3e3,
|
|
2854
|
-
disableOnInteraction: false
|
|
2855
|
-
},
|
|
2856
|
-
loop: true,
|
|
2857
|
-
className: "h-full rounded-2xl",
|
|
2858
|
-
children: images.map((img, index) => /* @__PURE__ */ jsx(SwiperSlide, { children: /* @__PURE__ */ jsx("div", { className: "relative w-full h-full bg-gray-100", children: /* @__PURE__ */ jsx(
|
|
2859
|
-
"img",
|
|
2860
|
-
{
|
|
2861
|
-
src: img,
|
|
2862
|
-
alt: `Demo room view ${index + 1}`,
|
|
2863
|
-
className: "w-full h-full object-cover"
|
|
2864
|
-
}
|
|
2865
|
-
) }) }, index))
|
|
2866
|
-
}
|
|
2867
|
-
) : /* @__PURE__ */ jsx("div", { className: "w-full h-full bg-gradient-to-br from-gray-100 to-gray-200 flex items-center justify-center rounded-2xl", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
2868
|
-
/* @__PURE__ */ jsx("div", { className: "w-16 h-16 mx-auto mb-3 rounded-full bg-white flex items-center justify-center", children: /* @__PURE__ */ jsxs(
|
|
2869
|
-
"svg",
|
|
2870
|
-
{
|
|
2871
|
-
width: "32",
|
|
2872
|
-
height: "32",
|
|
2873
|
-
viewBox: "0 0 32 32",
|
|
2874
|
-
fill: "none",
|
|
2875
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2876
|
-
children: [
|
|
2877
|
-
/* @__PURE__ */ jsx(
|
|
2878
|
-
"rect",
|
|
2879
|
-
{
|
|
2880
|
-
x: "4",
|
|
2881
|
-
y: "8",
|
|
2882
|
-
width: "24",
|
|
2883
|
-
height: "16",
|
|
2884
|
-
rx: "2",
|
|
2885
|
-
stroke: "currentColor",
|
|
2886
|
-
strokeWidth: "2"
|
|
2884
|
+
images.length > 0 && /* @__PURE__ */ jsxs("div", { className: "relative l:w-full min-l:h-[400px] rounded-2xl overflow-hidden demo-room-swiper", children: [
|
|
2885
|
+
/* @__PURE__ */ jsx("style", { children: `
|
|
2886
|
+
.demo-room-swiper .swiper-pagination-bullet {
|
|
2887
|
+
background-color: rgba(255, 255, 255, 0.5);
|
|
2887
2888
|
}
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
/* @__PURE__ */ jsx(
|
|
2891
|
-
"path",
|
|
2892
|
-
{
|
|
2893
|
-
d: "M28 20L22 14L16 20",
|
|
2894
|
-
stroke: "currentColor",
|
|
2895
|
-
strokeWidth: "2",
|
|
2896
|
-
strokeLinecap: "round",
|
|
2897
|
-
strokeLinejoin: "round"
|
|
2889
|
+
.demo-room-swiper .swiper-pagination-bullet-active {
|
|
2890
|
+
background-color: #3ADB67 !important;
|
|
2898
2891
|
}
|
|
2899
|
-
|
|
2900
|
-
|
|
2892
|
+
.demo-room-swiper .swiper-button-prev,
|
|
2893
|
+
.demo-room-swiper .swiper-button-next {
|
|
2894
|
+
width: 48px !important;
|
|
2895
|
+
height: 48px !important;
|
|
2896
|
+
background-size: contain !important;
|
|
2897
|
+
background-repeat: no-repeat !important;
|
|
2898
|
+
background-position: center !important;
|
|
2899
|
+
color: transparent !important;
|
|
2900
|
+
}
|
|
2901
|
+
.demo-room-swiper .swiper-button-prev::after,
|
|
2902
|
+
.demo-room-swiper .swiper-button-next::after {
|
|
2903
|
+
display: none !important;
|
|
2904
|
+
content: '' !important;
|
|
2905
|
+
}
|
|
2906
|
+
.demo-room-swiper .swiper-button-prev {
|
|
2907
|
+
background-image: url('https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Group_2121235586_572f0715-aa60-4188-9591-248f6ac53f40.svg?v=1736951731') !important;
|
|
2908
|
+
left: 16px !important;
|
|
2909
|
+
}
|
|
2910
|
+
.demo-room-swiper .swiper-button-next {
|
|
2911
|
+
background-image: url('https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Group_2121235583_3071dda3-e1ee-4fb8-b488-2402c8ea8018.svg?v=1736951731') !important;
|
|
2912
|
+
right: 16px !important;
|
|
2913
|
+
}
|
|
2914
|
+
` }),
|
|
2915
|
+
/* @__PURE__ */ jsx(
|
|
2916
|
+
Swiper,
|
|
2917
|
+
{
|
|
2918
|
+
modules: [Navigation, Pagination, Autoplay],
|
|
2919
|
+
spaceBetween: 0,
|
|
2920
|
+
slidesPerView: 1,
|
|
2921
|
+
navigation: images.length > 1,
|
|
2922
|
+
pagination: images.length > 1 ? { clickable: true } : false,
|
|
2923
|
+
autoplay: images.length > 1 ? {
|
|
2924
|
+
delay: 3e3,
|
|
2925
|
+
disableOnInteraction: false
|
|
2926
|
+
} : false,
|
|
2927
|
+
loop: images.length > 1,
|
|
2928
|
+
className: "h-full rounded-2xl",
|
|
2929
|
+
children: images.map((img, index) => /* @__PURE__ */ jsx(SwiperSlide, { children: /* @__PURE__ */ jsx("div", { className: "relative w-full h-full bg-gray-100", children: /* @__PURE__ */ jsx(
|
|
2930
|
+
"img",
|
|
2931
|
+
{
|
|
2932
|
+
src: img,
|
|
2933
|
+
alt: `Demo room view ${index + 1}`,
|
|
2934
|
+
className: "w-full h-full object-cover"
|
|
2935
|
+
}
|
|
2936
|
+
) }) }, index))
|
|
2901
2937
|
}
|
|
2902
|
-
)
|
|
2903
|
-
|
|
2904
|
-
] }) }) })
|
|
2938
|
+
)
|
|
2939
|
+
] })
|
|
2905
2940
|
] }) });
|
|
2906
2941
|
};
|
|
2907
2942
|
DemoRoomDetail.displayName = "DemoRoomDetail";
|
|
@@ -2913,6 +2948,7 @@ var BookingForm = ({
|
|
|
2913
2948
|
pageData,
|
|
2914
2949
|
timezone,
|
|
2915
2950
|
handleBookingSuccess,
|
|
2951
|
+
onQuestionnaireSubmit,
|
|
2916
2952
|
...props
|
|
2917
2953
|
}) => {
|
|
2918
2954
|
const apiClient = useMemo(
|
|
@@ -2945,6 +2981,7 @@ var BookingForm = ({
|
|
|
2945
2981
|
timezone,
|
|
2946
2982
|
locale: apiConfig.locale,
|
|
2947
2983
|
onBookingSuccess: handleBookingSuccess,
|
|
2984
|
+
onQuestionnaireSubmit,
|
|
2948
2985
|
pageData: dateTimePickerPageData
|
|
2949
2986
|
}
|
|
2950
2987
|
) }) })
|