@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.js
CHANGED
|
@@ -15,6 +15,10 @@ var dayLocaleData = require('dayjs/plugin/localeData');
|
|
|
15
15
|
var weekday = require('dayjs/plugin/weekday');
|
|
16
16
|
var weekOfYear = require('dayjs/plugin/weekOfYear');
|
|
17
17
|
var react = require('swiper/react');
|
|
18
|
+
var modules = require('swiper/modules');
|
|
19
|
+
require('swiper/css');
|
|
20
|
+
require('swiper/css/navigation');
|
|
21
|
+
require('swiper/css/pagination');
|
|
18
22
|
|
|
19
23
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
24
|
|
|
@@ -26,12 +30,6 @@ var dayLocaleData__default = /*#__PURE__*/_interopDefault(dayLocaleData);
|
|
|
26
30
|
var weekday__default = /*#__PURE__*/_interopDefault(weekday);
|
|
27
31
|
var weekOfYear__default = /*#__PURE__*/_interopDefault(weekOfYear);
|
|
28
32
|
|
|
29
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
30
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
31
|
-
}) : x)(function(x) {
|
|
32
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
33
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
34
|
-
});
|
|
35
33
|
function cn(...inputs) {
|
|
36
34
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
37
35
|
}
|
|
@@ -352,12 +350,14 @@ var StudioMap = ({
|
|
|
352
350
|
const lng = Number(location.lng);
|
|
353
351
|
const svgIcon = {
|
|
354
352
|
url: `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(`
|
|
355
|
-
<svg
|
|
356
|
-
<
|
|
353
|
+
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
354
|
+
<circle cx="24" cy="24" r="22" fill="#00000010"/>
|
|
355
|
+
<circle cx="24" cy="24" r="10" fill="#000000"/>
|
|
356
|
+
<circle cx="24" cy="24" r="5" fill="#3ADB67"/>
|
|
357
357
|
</svg>
|
|
358
358
|
`)}`,
|
|
359
|
-
scaledSize: { width:
|
|
360
|
-
anchor: { x:
|
|
359
|
+
scaledSize: { width: 48, height: 48 },
|
|
360
|
+
anchor: { x: 24, y: 24 }
|
|
361
361
|
};
|
|
362
362
|
const marker = new google.maps.Marker({
|
|
363
363
|
position: { lat, lng },
|
|
@@ -545,7 +545,7 @@ var StudioMap = ({
|
|
|
545
545
|
"div",
|
|
546
546
|
{
|
|
547
547
|
className: cn(
|
|
548
|
-
"flex items-center justify-center bg-gray-100 rounded-
|
|
548
|
+
"flex items-center overflow-hidden justify-center bg-gray-100 rounded-[16px]",
|
|
549
549
|
className
|
|
550
550
|
),
|
|
551
551
|
style: { height: mapHeight },
|
|
@@ -557,7 +557,7 @@ var StudioMap = ({
|
|
|
557
557
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
558
558
|
"div",
|
|
559
559
|
{
|
|
560
|
-
className: cn("relative w-full rounded-
|
|
560
|
+
className: cn("relative w-full rounded-[16px] overflow-hidden", className),
|
|
561
561
|
...props,
|
|
562
562
|
children: [
|
|
563
563
|
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: mapRef, style: { height: mapHeight } }),
|
|
@@ -962,6 +962,29 @@ var LocationFilter = ({
|
|
|
962
962
|
);
|
|
963
963
|
const showIndexBar = filteredItems.length >= 10;
|
|
964
964
|
const handleItemClick = (item) => {
|
|
965
|
+
if (item.code === "__all__") {
|
|
966
|
+
if (currentLevel === "country") {
|
|
967
|
+
onSelect?.({
|
|
968
|
+
level: "country"
|
|
969
|
+
});
|
|
970
|
+
onClose?.();
|
|
971
|
+
} else if (currentLevel === "state") {
|
|
972
|
+
onSelect?.({
|
|
973
|
+
level: "state",
|
|
974
|
+
country: selectedCountry
|
|
975
|
+
});
|
|
976
|
+
onClose?.();
|
|
977
|
+
} else if (currentLevel === "city") {
|
|
978
|
+
const parts = selectedState?.split("/") || [];
|
|
979
|
+
onSelect?.({
|
|
980
|
+
level: "city",
|
|
981
|
+
country: parts[0],
|
|
982
|
+
state: parts[1]
|
|
983
|
+
});
|
|
984
|
+
onClose?.();
|
|
985
|
+
}
|
|
986
|
+
return;
|
|
987
|
+
}
|
|
965
988
|
if (currentLevel === "country") {
|
|
966
989
|
setSelectedCountry(item.code);
|
|
967
990
|
setCurrentLevel("state");
|
|
@@ -992,87 +1015,94 @@ var LocationFilter = ({
|
|
|
992
1015
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
993
1016
|
"div",
|
|
994
1017
|
{
|
|
995
|
-
style: { height: "
|
|
1018
|
+
style: { height: "724px" },
|
|
996
1019
|
className: cn(
|
|
997
|
-
"w-full rounded-[12px] absolute z-10
|
|
1020
|
+
"w-full rounded-b-[12px] absolute z-10 bottom-[-2px] left-0 bg-white border border-[#E4E5E6]",
|
|
998
1021
|
RoomsList_default.antdMobileScope
|
|
999
1022
|
),
|
|
1000
1023
|
children: [
|
|
1001
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1024
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1002
1025
|
"div",
|
|
1003
1026
|
{
|
|
1004
1027
|
style: { background: "#F8F8F8" },
|
|
1005
|
-
className: "
|
|
1006
|
-
children: [
|
|
1007
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1028
|
+
className: "h-[76px] font-bold text-[14px] flex flex-col",
|
|
1029
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center text-[16px] px-[20px] gap-[16px] py-[24px]", children: [
|
|
1030
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1008
1031
|
"button",
|
|
1009
1032
|
{
|
|
1010
|
-
onClick:
|
|
1011
|
-
className:
|
|
1012
|
-
|
|
1013
|
-
"
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
width: "24",
|
|
1017
|
-
height: "24",
|
|
1018
|
-
viewBox: "0 0 24 24",
|
|
1019
|
-
fill: "none",
|
|
1020
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1021
|
-
"path",
|
|
1022
|
-
{
|
|
1023
|
-
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",
|
|
1024
|
-
fill: "#1D1D1F"
|
|
1025
|
-
}
|
|
1026
|
-
)
|
|
1027
|
-
}
|
|
1028
|
-
)
|
|
1033
|
+
onClick: () => handleTabClick("country"),
|
|
1034
|
+
className: cn(
|
|
1035
|
+
"pb-[4px] transition-colors",
|
|
1036
|
+
currentLevel === "country" ? "text-[#080A0F] border-b-2 border-[#3ADB67]" : "text-[#080A0F]"
|
|
1037
|
+
),
|
|
1038
|
+
children: pageData.country
|
|
1029
1039
|
}
|
|
1030
|
-
)
|
|
1031
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
{
|
|
1059
|
-
onClick: () => handleTabClick("city"),
|
|
1060
|
-
disabled: !selectedState,
|
|
1061
|
-
className: cn(
|
|
1062
|
-
"pb-[4px] transition-colors",
|
|
1063
|
-
currentLevel === "city" ? "text-[#080A0F] border-b-2 border-[#3ADB67]" : "text-[#080A0F]",
|
|
1064
|
-
!selectedState && "opacity-50 cursor-not-allowed"
|
|
1065
|
-
),
|
|
1066
|
-
children: pageData.city
|
|
1067
|
-
}
|
|
1068
|
-
)
|
|
1069
|
-
] })
|
|
1070
|
-
]
|
|
1040
|
+
),
|
|
1041
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1042
|
+
"button",
|
|
1043
|
+
{
|
|
1044
|
+
onClick: () => handleTabClick("state"),
|
|
1045
|
+
disabled: !selectedCountry,
|
|
1046
|
+
className: cn(
|
|
1047
|
+
"pb-[4px] transition-colors",
|
|
1048
|
+
currentLevel === "state" ? "text-[#080A0F] border-b-2 border-[#3ADB67]" : "text-[#080A0F]",
|
|
1049
|
+
!selectedCountry && "opacity-50 cursor-not-allowed"
|
|
1050
|
+
),
|
|
1051
|
+
children: pageData.state
|
|
1052
|
+
}
|
|
1053
|
+
),
|
|
1054
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1055
|
+
"button",
|
|
1056
|
+
{
|
|
1057
|
+
onClick: () => handleTabClick("city"),
|
|
1058
|
+
disabled: !selectedState,
|
|
1059
|
+
className: cn(
|
|
1060
|
+
"pb-[4px] transition-colors",
|
|
1061
|
+
currentLevel === "city" ? "text-[#080A0F] border-b-2 border-[#3ADB67]" : "text-[#080A0F]",
|
|
1062
|
+
!selectedState && "opacity-50 cursor-not-allowed"
|
|
1063
|
+
),
|
|
1064
|
+
children: pageData.city
|
|
1065
|
+
}
|
|
1066
|
+
)
|
|
1067
|
+
] })
|
|
1071
1068
|
}
|
|
1072
1069
|
),
|
|
1073
|
-
/* @__PURE__ */ jsxRuntime.jsx(AntdMobileIsolated, { style: { height: "calc(100% -
|
|
1074
|
-
|
|
1075
|
-
|
|
1070
|
+
/* @__PURE__ */ jsxRuntime.jsx(AntdMobileIsolated, { style: { height: "calc(100% - 76px)" }, children: showIndexBar ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
|
|
1071
|
+
/* @__PURE__ */ jsxRuntime.jsx(List__default.default, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1072
|
+
List__default.default.Item,
|
|
1073
|
+
{
|
|
1074
|
+
onClick: () => handleItemClick({ code: "__all__", name: pageData.allLocations || "All", count: filteredItems.length }),
|
|
1075
|
+
className: "text-[16px] !pl-[24px] font-bold",
|
|
1076
|
+
style: { cursor: "pointer", borderBottom: "1px solid #E4E5E6" },
|
|
1077
|
+
children: pageData.allLocations
|
|
1078
|
+
},
|
|
1079
|
+
"__all__"
|
|
1080
|
+
) }),
|
|
1081
|
+
/* @__PURE__ */ jsxRuntime.jsx(IndexBar__default.default, { style: { flex: 1 }, children: groupedItems.map((group) => {
|
|
1082
|
+
const { title, items } = group;
|
|
1083
|
+
return /* @__PURE__ */ jsxRuntime.jsx(IndexBar__default.default.Panel, { index: title, title, children: /* @__PURE__ */ jsxRuntime.jsx(List__default.default, { children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1084
|
+
List__default.default.Item,
|
|
1085
|
+
{
|
|
1086
|
+
onClick: () => handleItemClick(item),
|
|
1087
|
+
className: "text-[16px] !pl-[24px]",
|
|
1088
|
+
style: { cursor: "pointer" },
|
|
1089
|
+
children: item.name
|
|
1090
|
+
},
|
|
1091
|
+
item.code
|
|
1092
|
+
)) }) }, title);
|
|
1093
|
+
}) })
|
|
1094
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: "100%", overflow: "auto" }, children: /* @__PURE__ */ jsxRuntime.jsxs(List__default.default, { children: [
|
|
1095
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1096
|
+
List__default.default.Item,
|
|
1097
|
+
{
|
|
1098
|
+
onClick: () => handleItemClick({ code: "__all__", name: pageData.allLocations || "All", count: filteredItems.length }),
|
|
1099
|
+
className: "text-[16px] !pl-[24px] font-bold",
|
|
1100
|
+
style: { cursor: "pointer", borderBottom: "1px solid #E4E5E6" },
|
|
1101
|
+
children: pageData.allLocations
|
|
1102
|
+
},
|
|
1103
|
+
"__all__"
|
|
1104
|
+
),
|
|
1105
|
+
filteredItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1076
1106
|
List__default.default.Item,
|
|
1077
1107
|
{
|
|
1078
1108
|
onClick: () => handleItemClick(item),
|
|
@@ -1081,17 +1111,8 @@ var LocationFilter = ({
|
|
|
1081
1111
|
children: item.name
|
|
1082
1112
|
},
|
|
1083
1113
|
item.code
|
|
1084
|
-
))
|
|
1085
|
-
}) })
|
|
1086
|
-
List__default.default.Item,
|
|
1087
|
-
{
|
|
1088
|
-
onClick: () => handleItemClick(item),
|
|
1089
|
-
className: "text-[16px] !pl-[24px]",
|
|
1090
|
-
style: { cursor: "pointer" },
|
|
1091
|
-
children: item.name
|
|
1092
|
-
},
|
|
1093
|
-
item.code
|
|
1094
|
-
)) }) }) })
|
|
1114
|
+
))
|
|
1115
|
+
] }) }) })
|
|
1095
1116
|
]
|
|
1096
1117
|
}
|
|
1097
1118
|
);
|
|
@@ -1317,10 +1338,6 @@ var RoomsList = ({
|
|
|
1317
1338
|
setSelectedLocation(selection);
|
|
1318
1339
|
setShowLocationFilter(false);
|
|
1319
1340
|
};
|
|
1320
|
-
const handleClearFilter = () => {
|
|
1321
|
-
setSelectedLocation(void 0);
|
|
1322
|
-
};
|
|
1323
|
-
console.log(filteredStudioLocations);
|
|
1324
1341
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, ...props, children: [
|
|
1325
1342
|
/* @__PURE__ */ jsxRuntime.jsx(Title, { title: mergedPageData.title }),
|
|
1326
1343
|
loading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-[794px]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-lg font-medium", children: mergedPageData.loadingText }) }) }),
|
|
@@ -1335,12 +1352,15 @@ var RoomsList = ({
|
|
|
1335
1352
|
className: "flex-none relative w-[420px] l:!w-full",
|
|
1336
1353
|
style: { height: "794px" },
|
|
1337
1354
|
children: [
|
|
1338
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1355
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
1356
|
+
"mb-4 bg-white border border-[#E4E5E6] px-[20px] py-[16px]",
|
|
1357
|
+
showLocationFilter ? "rounded-t-[12px] rounded-b-none" : "rounded-[12px]"
|
|
1358
|
+
), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-[40px] font-bold text-[16px] l:text-[14px] gap-10 l:gap-4 flex items-center", children: [
|
|
1339
1359
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1340
1360
|
"button",
|
|
1341
1361
|
{
|
|
1342
1362
|
className: "flex cursor-pointer items-center hover:text-[#3ADB67] transition-colors",
|
|
1343
|
-
onClick: () => setShowLocationFilter(
|
|
1363
|
+
onClick: () => setShowLocationFilter(!showLocationFilter),
|
|
1344
1364
|
children: [
|
|
1345
1365
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1", children: getSelectedLocationName() }),
|
|
1346
1366
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1351,6 +1371,10 @@ var RoomsList = ({
|
|
|
1351
1371
|
height: "24",
|
|
1352
1372
|
viewBox: "0 0 24 24",
|
|
1353
1373
|
fill: "none",
|
|
1374
|
+
className: cn(
|
|
1375
|
+
"transition-transform duration-300",
|
|
1376
|
+
showLocationFilter && "rotate-180"
|
|
1377
|
+
),
|
|
1354
1378
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1355
1379
|
"path",
|
|
1356
1380
|
{
|
|
@@ -1363,14 +1387,7 @@ var RoomsList = ({
|
|
|
1363
1387
|
]
|
|
1364
1388
|
}
|
|
1365
1389
|
),
|
|
1366
|
-
selectedLocation &&
|
|
1367
|
-
"button",
|
|
1368
|
-
{
|
|
1369
|
-
onClick: handleClearFilter,
|
|
1370
|
-
className: "ml-auto text-[14px] text-[#2E8B57] hover:underline",
|
|
1371
|
-
children: mergedPageData.locationFilter.clear
|
|
1372
|
-
}
|
|
1373
|
-
),
|
|
1390
|
+
selectedLocation && false,
|
|
1374
1391
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex text-[#767880] cursor-not-allowed", children: [
|
|
1375
1392
|
mergedPageData.machine,
|
|
1376
1393
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1411,7 +1428,6 @@ var RoomsList = ({
|
|
|
1411
1428
|
euifyMakeModel: item?.euifyMakeModel || "",
|
|
1412
1429
|
onSchedule,
|
|
1413
1430
|
onMouseEnter: () => setHoveredRoomId(item.id),
|
|
1414
|
-
onMouseLeave: () => setHoveredRoomId(null),
|
|
1415
1431
|
pageData: {
|
|
1416
1432
|
...mergedPageData.studioCard,
|
|
1417
1433
|
noAvailableTime: mergedPageData?.noAvailableTime
|
|
@@ -1667,6 +1683,7 @@ var QuestionnaireForm = ({
|
|
|
1667
1683
|
const [agreements, setAgreements] = React2.useState({});
|
|
1668
1684
|
const [agreementError, setAgreementError] = React2.useState("");
|
|
1669
1685
|
const [phoneCountryCodes, setPhoneCountryCodes] = React2.useState({});
|
|
1686
|
+
const [otherInputs, setOtherInputs] = React2.useState({});
|
|
1670
1687
|
const defaultCountryCodes = [
|
|
1671
1688
|
{ code: "+1", country: "US/CA" },
|
|
1672
1689
|
{ code: "+86", country: "CN" },
|
|
@@ -1727,6 +1744,13 @@ var QuestionnaireForm = ({
|
|
|
1727
1744
|
setAgreementError("");
|
|
1728
1745
|
}
|
|
1729
1746
|
};
|
|
1747
|
+
const handleOtherInputChange = (questionId, value) => {
|
|
1748
|
+
setOtherInputs((prev) => ({
|
|
1749
|
+
...prev,
|
|
1750
|
+
[questionId]: value
|
|
1751
|
+
}));
|
|
1752
|
+
handleChange(questionId, value);
|
|
1753
|
+
};
|
|
1730
1754
|
const validateForm = () => {
|
|
1731
1755
|
const newErrors = {};
|
|
1732
1756
|
questions.forEach((question) => {
|
|
@@ -1896,11 +1920,12 @@ var QuestionnaireForm = ({
|
|
|
1896
1920
|
value: option.value || option.label,
|
|
1897
1921
|
checked: responses[questionId] === (option.value || option.label),
|
|
1898
1922
|
onChange: (e) => handleChange(questionId, e.target.value),
|
|
1899
|
-
className: "w-5 h-5
|
|
1923
|
+
className: "w-5 h-5 appearance-none cursor-pointer flex-shrink-0",
|
|
1900
1924
|
style: {
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1925
|
+
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)",
|
|
1926
|
+
backgroundSize: "contain",
|
|
1927
|
+
backgroundRepeat: "no-repeat",
|
|
1928
|
+
backgroundPosition: "center"
|
|
1904
1929
|
}
|
|
1905
1930
|
}
|
|
1906
1931
|
),
|
|
@@ -1909,6 +1934,61 @@ var QuestionnaireForm = ({
|
|
|
1909
1934
|
},
|
|
1910
1935
|
option.value || option.label
|
|
1911
1936
|
)) });
|
|
1937
|
+
case "radio_with_other": {
|
|
1938
|
+
const isOtherSelected = responses[questionId] === "__other__" || responses[questionId] && !question?.options?.find(
|
|
1939
|
+
(opt) => (opt.value || opt.label) === responses[questionId]
|
|
1940
|
+
);
|
|
1941
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: question?.options?.map((option) => {
|
|
1942
|
+
const optionValue = option.value || option.label;
|
|
1943
|
+
const isOtherOption = optionValue === "__other__";
|
|
1944
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
1945
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-3 cursor-pointer group", children: [
|
|
1946
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1947
|
+
"input",
|
|
1948
|
+
{
|
|
1949
|
+
type: "radio",
|
|
1950
|
+
name: questionId,
|
|
1951
|
+
value: optionValue,
|
|
1952
|
+
checked: isOtherOption ? isOtherSelected : responses[questionId] === optionValue,
|
|
1953
|
+
onChange: (e) => {
|
|
1954
|
+
if (isOtherOption) {
|
|
1955
|
+
handleChange(questionId, "__other__");
|
|
1956
|
+
setOtherInputs((prev) => ({
|
|
1957
|
+
...prev,
|
|
1958
|
+
[questionId]: ""
|
|
1959
|
+
}));
|
|
1960
|
+
} else {
|
|
1961
|
+
handleChange(questionId, e.target.value);
|
|
1962
|
+
}
|
|
1963
|
+
},
|
|
1964
|
+
className: "w-5 h-5 appearance-none cursor-pointer flex-shrink-0",
|
|
1965
|
+
style: {
|
|
1966
|
+
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)",
|
|
1967
|
+
backgroundSize: "contain",
|
|
1968
|
+
backgroundRepeat: "no-repeat",
|
|
1969
|
+
backgroundPosition: "center"
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
),
|
|
1973
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base text-gray-900 dark:text-gray-900 font-bold group-hover:text-[#3ADB67] transition-colors", children: option.label })
|
|
1974
|
+
] }),
|
|
1975
|
+
isOtherOption && isOtherSelected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1976
|
+
"input",
|
|
1977
|
+
{
|
|
1978
|
+
type: "text",
|
|
1979
|
+
value: otherInputs[questionId] || "",
|
|
1980
|
+
onChange: (e) => handleOtherInputChange(questionId, e.target.value),
|
|
1981
|
+
placeholder: question.placeholder || "Please specify...",
|
|
1982
|
+
className: cn(
|
|
1983
|
+
"w-full ml-8 px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-gray-900",
|
|
1984
|
+
"focus:outline-none focus:ring-2 focus:ring-[#3ADB67] focus:border-transparent",
|
|
1985
|
+
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
1986
|
+
)
|
|
1987
|
+
}
|
|
1988
|
+
)
|
|
1989
|
+
] }, optionValue);
|
|
1990
|
+
}) });
|
|
1991
|
+
}
|
|
1912
1992
|
case "checkbox":
|
|
1913
1993
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: question?.options?.map((option) => {
|
|
1914
1994
|
const optionValue = option.value || option.label;
|
|
@@ -1932,9 +2012,7 @@ var QuestionnaireForm = ({
|
|
|
1932
2012
|
),
|
|
1933
2013
|
className: "w-5 h-5 text-[#3ADB67] focus:ring-[#3ADB67] focus:ring-2 rounded",
|
|
1934
2014
|
style: {
|
|
1935
|
-
|
|
1936
|
-
borderColor: "#D1D5DB",
|
|
1937
|
-
colorScheme: "light"
|
|
2015
|
+
accentColor: "#3ADB67"
|
|
1938
2016
|
}
|
|
1939
2017
|
}
|
|
1940
2018
|
),
|
|
@@ -1945,7 +2023,7 @@ var QuestionnaireForm = ({
|
|
|
1945
2023
|
);
|
|
1946
2024
|
}) });
|
|
1947
2025
|
case "select":
|
|
1948
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
2026
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1949
2027
|
"select",
|
|
1950
2028
|
{
|
|
1951
2029
|
value: responses[questionId] || "",
|
|
@@ -1956,17 +2034,14 @@ var QuestionnaireForm = ({
|
|
|
1956
2034
|
"cursor-pointer",
|
|
1957
2035
|
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
1958
2036
|
),
|
|
1959
|
-
children:
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
option.value || option.label
|
|
1968
|
-
))
|
|
1969
|
-
]
|
|
2037
|
+
children: question.options?.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2038
|
+
"option",
|
|
2039
|
+
{
|
|
2040
|
+
value: option.value || option.label,
|
|
2041
|
+
children: option.label
|
|
2042
|
+
},
|
|
2043
|
+
option.value || option.label
|
|
2044
|
+
))
|
|
1970
2045
|
}
|
|
1971
2046
|
);
|
|
1972
2047
|
default:
|
|
@@ -1987,7 +2062,14 @@ var QuestionnaireForm = ({
|
|
|
1987
2062
|
] }),
|
|
1988
2063
|
renderQuestion(question),
|
|
1989
2064
|
question.hint && !errors[questionId] && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-500 dark:text-gray-500 font-bold", children: question.hint }),
|
|
1990
|
-
errors[questionId] && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2065
|
+
errors[questionId] && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2066
|
+
"p",
|
|
2067
|
+
{
|
|
2068
|
+
className: "text-sm font-bold",
|
|
2069
|
+
style: { color: "#FF4D4D" },
|
|
2070
|
+
children: errors[questionId]
|
|
2071
|
+
}
|
|
2072
|
+
)
|
|
1991
2073
|
] }, questionId);
|
|
1992
2074
|
}) }) }),
|
|
1993
2075
|
!!selectedTimeslotId && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center", children: [
|
|
@@ -2000,11 +2082,9 @@ var QuestionnaireForm = ({
|
|
|
2000
2082
|
id: `agreement-${index}`,
|
|
2001
2083
|
checked: agreements[index] || false,
|
|
2002
2084
|
onChange: (e) => handleAgreementChange(index, e.target.checked),
|
|
2003
|
-
className: "w-5 h-5 rounded text-[#
|
|
2085
|
+
className: "w-5 h-5 rounded text-[#3ADB67] focus:ring-[#3ADB67] cursor-pointer flex-shrink-0",
|
|
2004
2086
|
style: {
|
|
2005
|
-
|
|
2006
|
-
borderColor: "#D1D5DB",
|
|
2007
|
-
colorScheme: "light"
|
|
2087
|
+
accentColor: "#3ADB67"
|
|
2008
2088
|
}
|
|
2009
2089
|
}
|
|
2010
2090
|
),
|
|
@@ -2018,7 +2098,14 @@ var QuestionnaireForm = ({
|
|
|
2018
2098
|
}
|
|
2019
2099
|
)
|
|
2020
2100
|
] }, index)),
|
|
2021
|
-
agreementError && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2101
|
+
agreementError && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2102
|
+
"p",
|
|
2103
|
+
{
|
|
2104
|
+
className: "text-sm font-bold mt-2",
|
|
2105
|
+
style: { color: "#FF4D4D" },
|
|
2106
|
+
children: agreementError
|
|
2107
|
+
}
|
|
2108
|
+
)
|
|
2022
2109
|
] }),
|
|
2023
2110
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2024
2111
|
"button",
|
|
@@ -2059,7 +2146,8 @@ var DateTimePicker = ({
|
|
|
2059
2146
|
bookingFailed: "Booking failed"
|
|
2060
2147
|
},
|
|
2061
2148
|
locale,
|
|
2062
|
-
onBookingSuccess
|
|
2149
|
+
onBookingSuccess,
|
|
2150
|
+
onQuestionnaireSubmit
|
|
2063
2151
|
}) => {
|
|
2064
2152
|
const { token } = antd.theme.useToken();
|
|
2065
2153
|
const [selectedDate, setSelectedDate] = React2.useState(null);
|
|
@@ -2297,7 +2385,7 @@ var DateTimePicker = ({
|
|
|
2297
2385
|
}
|
|
2298
2386
|
.calendar-custom-cell .ant-picker-cell-disabled .ant-picker-cell-inner {
|
|
2299
2387
|
background-color: #F5F5F5 !important;
|
|
2300
|
-
color: #
|
|
2388
|
+
color: #767880 !important;
|
|
2301
2389
|
border: none !important;
|
|
2302
2390
|
cursor: not-allowed !important;
|
|
2303
2391
|
box-shadow: none !important;
|
|
@@ -2344,7 +2432,7 @@ var DateTimePicker = ({
|
|
|
2344
2432
|
className: `ant-picker-cell-inner ${isSelected ? "ant-picker-cell-inner-selected" : ""} ${isToday ? "ant-picker-cell-inner-today" : ""}`,
|
|
2345
2433
|
style: {
|
|
2346
2434
|
backgroundColor: isSelected ? "#3ADB67" : void 0,
|
|
2347
|
-
color: isSelected ? "#080A0F" : isDisabled ? "#
|
|
2435
|
+
color: isSelected ? "#080A0F" : isDisabled ? "#767880" : void 0,
|
|
2348
2436
|
borderColor: isSelected ? "#3ADB67" : isToday ? "#3ADB67" : void 0
|
|
2349
2437
|
},
|
|
2350
2438
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ant-picker-calendar-date-value", children: date.date() })
|
|
@@ -2544,7 +2632,7 @@ var DateTimePicker = ({
|
|
|
2544
2632
|
)
|
|
2545
2633
|
] })
|
|
2546
2634
|
] }),
|
|
2547
|
-
/* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("div", { className: "col-span-2 text-center text-[#
|
|
2635
|
+
/* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("div", { className: "col-span-2 text-center text-[#767880] py-8", children: pageData.loadingTimeSlots }) : timeslotsError ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2 text-center text-red-600 py-8", children: pageData.failedToLoadTimeSlots }) : dayTimeslots.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2 text-center text-[#767880] py-8", children: pageData.noAvailableTimeSlots }) : dayTimeslots.map((slot) => {
|
|
2548
2636
|
const isAvailable = slot.status === "available";
|
|
2549
2637
|
const isFull = slot.status === "full";
|
|
2550
2638
|
const isSelected = selectedTimeslotId === slot.id;
|
|
@@ -2560,12 +2648,12 @@ var DateTimePicker = ({
|
|
|
2560
2648
|
className: `
|
|
2561
2649
|
rounded-[20px] w-full text-[18px] l:gap-2 l:text-[16px] flex items-center justify-center gap-4 h-[76px]
|
|
2562
2650
|
border text-center transition-colors
|
|
2563
|
-
${isSelected ? "border-[#3ADB67] bg-[#3ADB67] cursor-pointer" : isAvailable ? "border-[#E4E5E6] hover:border-[#3ADB67] hover:bg-[#3ADB67] cursor-pointer" : "border-[#E4E5E6] bg-[#F5F5F5] text-[#
|
|
2651
|
+
${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"}
|
|
2564
2652
|
`,
|
|
2565
2653
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
2566
2654
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: formatTimeslot(slot) }),
|
|
2567
|
-
isFull && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[16px] l:text-[14px] text-[#
|
|
2568
|
-
isAvailable && !isSelected && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[16px] l:text-[14px] text-[#
|
|
2655
|
+
isFull && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[16px] l:text-[14px] text-[#767880] mt-[2px]", children: pageData.full }),
|
|
2656
|
+
isAvailable && !isSelected && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[16px] l:text-[14px] text-[#767880] mt-1", children: [
|
|
2569
2657
|
slot.capacity - slot.booked_count,
|
|
2570
2658
|
" ",
|
|
2571
2659
|
pageData.spotsLeft
|
|
@@ -2588,7 +2676,7 @@ var DateTimePicker = ({
|
|
|
2588
2676
|
] }),
|
|
2589
2677
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-12", children: [
|
|
2590
2678
|
!!questionnaire?.questions?.length && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[48px] font-bold text-center mb-8 l:mb-[24px] l:text-[32px] l:text-left", children: pageData.fillOutForm }),
|
|
2591
|
-
questionnaireLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center text-[#
|
|
2679
|
+
questionnaireLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center text-[#767880] py-8", children: pageData.loadingQuestionnaire }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2592
2680
|
QuestionnaireForm,
|
|
2593
2681
|
{
|
|
2594
2682
|
questions: questionnaire?.questions || [],
|
|
@@ -2596,6 +2684,9 @@ var DateTimePicker = ({
|
|
|
2596
2684
|
pageData,
|
|
2597
2685
|
selectedTimeslotId,
|
|
2598
2686
|
onSubmit: async (responses) => {
|
|
2687
|
+
if (onQuestionnaireSubmit) {
|
|
2688
|
+
await onQuestionnaireSubmit(responses);
|
|
2689
|
+
}
|
|
2599
2690
|
try {
|
|
2600
2691
|
const customerName = responses.name || responses.customer_name || "";
|
|
2601
2692
|
const customerEmail = responses.email || responses.customer_email || "";
|
|
@@ -2626,61 +2717,6 @@ var DateTimePicker = ({
|
|
|
2626
2717
|
] });
|
|
2627
2718
|
};
|
|
2628
2719
|
var DateTimePicker_default = DateTimePicker;
|
|
2629
|
-
var Navigation;
|
|
2630
|
-
var Pagination;
|
|
2631
|
-
var Autoplay;
|
|
2632
|
-
var swiperVersion = "11+";
|
|
2633
|
-
try {
|
|
2634
|
-
const modules = __require("swiper/modules");
|
|
2635
|
-
Navigation = modules.Navigation;
|
|
2636
|
-
Pagination = modules.Pagination;
|
|
2637
|
-
Autoplay = modules.Autoplay;
|
|
2638
|
-
swiperVersion = "11+";
|
|
2639
|
-
} catch (e) {
|
|
2640
|
-
try {
|
|
2641
|
-
const SwiperCore = __require("swiper");
|
|
2642
|
-
const SwiperNavigation = __require("swiper/modules/navigation");
|
|
2643
|
-
const SwiperPagination = __require("swiper/modules/pagination");
|
|
2644
|
-
const SwiperAutoplay = __require("swiper/modules/autoplay");
|
|
2645
|
-
const SwiperClass = SwiperCore.default || SwiperCore;
|
|
2646
|
-
if (SwiperClass && SwiperClass.use) {
|
|
2647
|
-
SwiperClass.use([
|
|
2648
|
-
SwiperNavigation.default || SwiperNavigation,
|
|
2649
|
-
SwiperPagination.default || SwiperPagination,
|
|
2650
|
-
SwiperAutoplay.default || SwiperAutoplay
|
|
2651
|
-
]);
|
|
2652
|
-
}
|
|
2653
|
-
Navigation = SwiperNavigation.default || SwiperNavigation;
|
|
2654
|
-
Pagination = SwiperPagination.default || SwiperPagination;
|
|
2655
|
-
Autoplay = SwiperAutoplay.default || SwiperAutoplay;
|
|
2656
|
-
swiperVersion = "8";
|
|
2657
|
-
} catch (e2) {
|
|
2658
|
-
console.warn("Failed to load swiper modules:", e2);
|
|
2659
|
-
}
|
|
2660
|
-
}
|
|
2661
|
-
if (typeof window !== "undefined") {
|
|
2662
|
-
try {
|
|
2663
|
-
__require("swiper/css");
|
|
2664
|
-
__require("swiper/css/navigation");
|
|
2665
|
-
__require("swiper/css/pagination");
|
|
2666
|
-
} catch (e) {
|
|
2667
|
-
try {
|
|
2668
|
-
__require("swiper/swiper.min.css");
|
|
2669
|
-
__require("swiper/modules/navigation/navigation.min.css");
|
|
2670
|
-
__require("swiper/modules/pagination/pagination.min.css");
|
|
2671
|
-
} catch (e2) {
|
|
2672
|
-
console.warn("Failed to load swiper styles");
|
|
2673
|
-
}
|
|
2674
|
-
}
|
|
2675
|
-
}
|
|
2676
|
-
var defaultDescriptions = [
|
|
2677
|
-
"Norem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis.",
|
|
2678
|
-
"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."
|
|
2679
|
-
];
|
|
2680
|
-
var defaultImages = [
|
|
2681
|
-
"https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638",
|
|
2682
|
-
"https://cdn.shopify.com/s/files/1/0569/5147/2268/files/Component_3_1.png?v=1765274638"
|
|
2683
|
-
];
|
|
2684
2720
|
var DemoRoomDetail = ({
|
|
2685
2721
|
apiClient,
|
|
2686
2722
|
demoRoomCode,
|
|
@@ -2707,20 +2743,21 @@ var DemoRoomDetail = ({
|
|
|
2707
2743
|
} = useDemoRoom(apiClient, demoRoomCode || "", locale, {
|
|
2708
2744
|
enabled: !!apiClient && !!demoRoomCode
|
|
2709
2745
|
});
|
|
2710
|
-
const title = demoRoom?.name || titleProp || "
|
|
2711
|
-
const descriptions = demoRoom?.description ? [demoRoom.description] : descriptionsProp
|
|
2712
|
-
const devices = demoRoom?.equipment?.join(", ") || devicesProp || "
|
|
2713
|
-
const address = demoRoom?.address || addressProp || "
|
|
2714
|
-
const images = demoRoom?.images && demoRoom.images.length > 0 ? demoRoom.images : imagesProp ||
|
|
2746
|
+
const title = demoRoom?.name || titleProp || "";
|
|
2747
|
+
const descriptions = demoRoom?.description ? [demoRoom.description] : descriptionsProp;
|
|
2748
|
+
const devices = demoRoom?.equipment?.join(", ") || devicesProp || "";
|
|
2749
|
+
const address = demoRoom?.address || addressProp || "";
|
|
2750
|
+
const images = demoRoom?.images && demoRoom.images.length > 0 ? demoRoom.images : imagesProp || [];
|
|
2715
2751
|
const googleMapsLink = mapsLink || (() => {
|
|
2716
2752
|
if (demoRoom?.latitude && demoRoom?.longitude) {
|
|
2717
2753
|
return `https://www.google.com/maps/search/?api=1&query=${demoRoom.latitude},${demoRoom.longitude}`;
|
|
2718
|
-
} else {
|
|
2754
|
+
} else if (address) {
|
|
2719
2755
|
return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(address)}`;
|
|
2720
2756
|
}
|
|
2757
|
+
return "#";
|
|
2721
2758
|
})();
|
|
2722
2759
|
if (loading && apiClient && demoRoomCode) {
|
|
2723
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-8 items-start", children: [
|
|
2760
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full pb-4", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-8 items-start", children: [
|
|
2724
2761
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
2725
2762
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-12 bg-gray-200 rounded animate-pulse" }),
|
|
2726
2763
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-24 bg-gray-200 rounded animate-pulse" }),
|
|
@@ -2735,10 +2772,13 @@ var DemoRoomDetail = ({
|
|
|
2735
2772
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm mt-2", children: error.message })
|
|
2736
2773
|
] }) });
|
|
2737
2774
|
}
|
|
2738
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
2775
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(
|
|
2776
|
+
"gap-[80px] l:gap-[40px] l:flex l:flex-col-reverse items-start py-[24px] l:pb-[64px]",
|
|
2777
|
+
images.length > 0 ? "grid grid-cols-2" : "flex"
|
|
2778
|
+
), children: [
|
|
2739
2779
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
2740
2780
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-[48px] l:text-[32px] font-bold text-gray-900 leading-tight", children: title }),
|
|
2741
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-[20px]", children: descriptions
|
|
2781
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-[20px]", children: descriptions?.map((desc, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2742
2782
|
"p",
|
|
2743
2783
|
{
|
|
2744
2784
|
className: "text-base text-gray-600 leading-relaxed",
|
|
@@ -2853,67 +2893,62 @@ var DemoRoomDetail = ({
|
|
|
2853
2893
|
] })
|
|
2854
2894
|
] })
|
|
2855
2895
|
] }),
|
|
2856
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
spaceBetween: 0,
|
|
2861
|
-
slidesPerView: 1,
|
|
2862
|
-
navigation: true,
|
|
2863
|
-
pagination: { clickable: true },
|
|
2864
|
-
autoplay: {
|
|
2865
|
-
delay: 3e3,
|
|
2866
|
-
disableOnInteraction: false
|
|
2867
|
-
},
|
|
2868
|
-
loop: true,
|
|
2869
|
-
className: "h-full rounded-2xl",
|
|
2870
|
-
children: images.map((img, index) => /* @__PURE__ */ jsxRuntime.jsx(react.SwiperSlide, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full bg-gray-100", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2871
|
-
"img",
|
|
2872
|
-
{
|
|
2873
|
-
src: img,
|
|
2874
|
-
alt: `Demo room view ${index + 1}`,
|
|
2875
|
-
className: "w-full h-full object-cover"
|
|
2876
|
-
}
|
|
2877
|
-
) }) }, index))
|
|
2878
|
-
}
|
|
2879
|
-
) : /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
2880
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 mx-auto mb-3 rounded-full bg-white flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2881
|
-
"svg",
|
|
2882
|
-
{
|
|
2883
|
-
width: "32",
|
|
2884
|
-
height: "32",
|
|
2885
|
-
viewBox: "0 0 32 32",
|
|
2886
|
-
fill: "none",
|
|
2887
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2888
|
-
children: [
|
|
2889
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2890
|
-
"rect",
|
|
2891
|
-
{
|
|
2892
|
-
x: "4",
|
|
2893
|
-
y: "8",
|
|
2894
|
-
width: "24",
|
|
2895
|
-
height: "16",
|
|
2896
|
-
rx: "2",
|
|
2897
|
-
stroke: "currentColor",
|
|
2898
|
-
strokeWidth: "2"
|
|
2896
|
+
images.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative l:w-full min-l:h-[400px] rounded-2xl overflow-hidden demo-room-swiper", children: [
|
|
2897
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
2898
|
+
.demo-room-swiper .swiper-pagination-bullet {
|
|
2899
|
+
background-color: rgba(255, 255, 255, 0.5);
|
|
2899
2900
|
}
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2903
|
-
"path",
|
|
2904
|
-
{
|
|
2905
|
-
d: "M28 20L22 14L16 20",
|
|
2906
|
-
stroke: "currentColor",
|
|
2907
|
-
strokeWidth: "2",
|
|
2908
|
-
strokeLinecap: "round",
|
|
2909
|
-
strokeLinejoin: "round"
|
|
2901
|
+
.demo-room-swiper .swiper-pagination-bullet-active {
|
|
2902
|
+
background-color: #3ADB67 !important;
|
|
2910
2903
|
}
|
|
2911
|
-
|
|
2912
|
-
|
|
2904
|
+
.demo-room-swiper .swiper-button-prev,
|
|
2905
|
+
.demo-room-swiper .swiper-button-next {
|
|
2906
|
+
width: 48px !important;
|
|
2907
|
+
height: 48px !important;
|
|
2908
|
+
background-size: contain !important;
|
|
2909
|
+
background-repeat: no-repeat !important;
|
|
2910
|
+
background-position: center !important;
|
|
2911
|
+
color: transparent !important;
|
|
2912
|
+
}
|
|
2913
|
+
.demo-room-swiper .swiper-button-prev::after,
|
|
2914
|
+
.demo-room-swiper .swiper-button-next::after {
|
|
2915
|
+
display: none !important;
|
|
2916
|
+
content: '' !important;
|
|
2917
|
+
}
|
|
2918
|
+
.demo-room-swiper .swiper-button-prev {
|
|
2919
|
+
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;
|
|
2920
|
+
left: 16px !important;
|
|
2921
|
+
}
|
|
2922
|
+
.demo-room-swiper .swiper-button-next {
|
|
2923
|
+
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;
|
|
2924
|
+
right: 16px !important;
|
|
2925
|
+
}
|
|
2926
|
+
` }),
|
|
2927
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2928
|
+
react.Swiper,
|
|
2929
|
+
{
|
|
2930
|
+
modules: [modules.Navigation, modules.Pagination, modules.Autoplay],
|
|
2931
|
+
spaceBetween: 0,
|
|
2932
|
+
slidesPerView: 1,
|
|
2933
|
+
navigation: images.length > 1,
|
|
2934
|
+
pagination: images.length > 1 ? { clickable: true } : false,
|
|
2935
|
+
autoplay: images.length > 1 ? {
|
|
2936
|
+
delay: 3e3,
|
|
2937
|
+
disableOnInteraction: false
|
|
2938
|
+
} : false,
|
|
2939
|
+
loop: images.length > 1,
|
|
2940
|
+
className: "h-full rounded-2xl",
|
|
2941
|
+
children: images.map((img, index) => /* @__PURE__ */ jsxRuntime.jsx(react.SwiperSlide, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full bg-gray-100", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2942
|
+
"img",
|
|
2943
|
+
{
|
|
2944
|
+
src: img,
|
|
2945
|
+
alt: `Demo room view ${index + 1}`,
|
|
2946
|
+
className: "w-full h-full object-cover"
|
|
2947
|
+
}
|
|
2948
|
+
) }) }, index))
|
|
2913
2949
|
}
|
|
2914
|
-
)
|
|
2915
|
-
|
|
2916
|
-
] }) }) })
|
|
2950
|
+
)
|
|
2951
|
+
] })
|
|
2917
2952
|
] }) });
|
|
2918
2953
|
};
|
|
2919
2954
|
DemoRoomDetail.displayName = "DemoRoomDetail";
|
|
@@ -2925,6 +2960,7 @@ var BookingForm = ({
|
|
|
2925
2960
|
pageData,
|
|
2926
2961
|
timezone,
|
|
2927
2962
|
handleBookingSuccess,
|
|
2963
|
+
onQuestionnaireSubmit,
|
|
2928
2964
|
...props
|
|
2929
2965
|
}) => {
|
|
2930
2966
|
const apiClient = React2.useMemo(
|
|
@@ -2957,6 +2993,7 @@ var BookingForm = ({
|
|
|
2957
2993
|
timezone,
|
|
2958
2994
|
locale: apiConfig.locale,
|
|
2959
2995
|
onBookingSuccess: handleBookingSuccess,
|
|
2996
|
+
onQuestionnaireSubmit,
|
|
2960
2997
|
pageData: dateTimePickerPageData
|
|
2961
2998
|
}
|
|
2962
2999
|
) }) })
|