@anker-in/ui 0.1.10 → 0.1.12
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 +208 -177
- package/dist/demo-room.js.map +1 -1
- package/dist/demo-room.mjs +208 -177
- package/dist/demo-room.mjs.map +1 -1
- package/dist/index.d.mts +8 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.js +518 -431
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +518 -431
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -4
package/dist/demo-room.mjs
CHANGED
|
@@ -49,7 +49,7 @@ var StudioCard = ({
|
|
|
49
49
|
{
|
|
50
50
|
...props,
|
|
51
51
|
className: cn(
|
|
52
|
-
"p-6 cursor-pointer transition-colors duration-200",
|
|
52
|
+
"p-6 cursor-pointer transition-colors duration-200 border-b border-[#E4E5E6] last:border-b-0",
|
|
53
53
|
className
|
|
54
54
|
),
|
|
55
55
|
style: {
|
|
@@ -66,8 +66,8 @@ var StudioCard = ({
|
|
|
66
66
|
},
|
|
67
67
|
children: [
|
|
68
68
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between mb-4", children: [
|
|
69
|
-
/* @__PURE__ */ jsx("h3", { className: "text-
|
|
70
|
-
distance !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-
|
|
69
|
+
/* @__PURE__ */ jsx("h3", { className: "text-[24px] l:text-[20px] font-bold text-[#080A0F]", children: name }),
|
|
70
|
+
distance !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-[16px] l:text-[14px] font-medium text-[#2E8B57] bg-[#E8F5E9] px-3 py-1 rounded-full whitespace-nowrap ml-2", children: [
|
|
71
71
|
formatDistance(distance),
|
|
72
72
|
" ",
|
|
73
73
|
pageData.away
|
|
@@ -126,7 +126,7 @@ var StudioCard = ({
|
|
|
126
126
|
]
|
|
127
127
|
}
|
|
128
128
|
),
|
|
129
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("p", { className: "text-
|
|
129
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("p", { className: "text-[16px] l:text-[12px] text-[#2A2C32]", children: [
|
|
130
130
|
availableTime === pageData.noAvailableTime ? "" : pageData.available,
|
|
131
131
|
" ",
|
|
132
132
|
availableTime
|
|
@@ -162,7 +162,7 @@ var StudioCard = ({
|
|
|
162
162
|
]
|
|
163
163
|
}
|
|
164
164
|
),
|
|
165
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsx("p", { className: "text-
|
|
165
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsx("p", { className: "text-[16px] l:text-[14px] text-[#2A2C32] break-words", children: address }) })
|
|
166
166
|
] }),
|
|
167
167
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 mb-6", children: [
|
|
168
168
|
/* @__PURE__ */ jsxs(
|
|
@@ -170,55 +170,44 @@ var StudioCard = ({
|
|
|
170
170
|
{
|
|
171
171
|
width: "20",
|
|
172
172
|
height: "20",
|
|
173
|
-
viewBox: "0 0
|
|
173
|
+
viewBox: "0 0 24 24",
|
|
174
174
|
fill: "none",
|
|
175
175
|
xmlns: "http://www.w3.org/2000/svg",
|
|
176
176
|
className: "flex-shrink-0 mt-0.5",
|
|
177
177
|
children: [
|
|
178
|
-
/* @__PURE__ */ jsx(
|
|
179
|
-
"rect",
|
|
180
|
-
{
|
|
181
|
-
x: "3",
|
|
182
|
-
y: "5",
|
|
183
|
-
width: "14",
|
|
184
|
-
height: "10",
|
|
185
|
-
rx: "1.5",
|
|
186
|
-
stroke: "currentColor",
|
|
187
|
-
strokeWidth: "1.5"
|
|
188
|
-
}
|
|
189
|
-
),
|
|
190
178
|
/* @__PURE__ */ jsx(
|
|
191
179
|
"path",
|
|
192
180
|
{
|
|
193
|
-
d: "
|
|
181
|
+
d: "M14.4643 7.4929H9.65565M3.16391 18.7132H20.8171C22.0122 18.7132 22.981 17.7563 22.981 16.576L23 13.8348L22.981 6.42431C22.981 5.24396 22.0122 4.28711 20.8171 4.28711H3.16391C1.96882 4.28711 1 5.24396 1 6.42431V16.576C1 17.7563 1.96882 18.7132 3.16391 18.7132Z",
|
|
194
182
|
stroke: "currentColor",
|
|
195
|
-
strokeWidth: "
|
|
196
|
-
strokeLinecap: "round"
|
|
183
|
+
strokeWidth: "2",
|
|
184
|
+
strokeLinecap: "round",
|
|
185
|
+
strokeLinejoin: "round"
|
|
197
186
|
}
|
|
198
187
|
),
|
|
199
188
|
/* @__PURE__ */ jsx(
|
|
200
189
|
"path",
|
|
201
190
|
{
|
|
202
|
-
d: "
|
|
191
|
+
d: "M5.32812 18.2325V14.4238C5.32812 13.8715 5.77584 13.4238 6.32813 13.4238H17.7925C18.3447 13.4238 18.7925 13.8715 18.7925 14.4238V18.2325",
|
|
203
192
|
stroke: "currentColor",
|
|
204
|
-
strokeWidth: "
|
|
205
|
-
strokeLinecap: "round"
|
|
193
|
+
strokeWidth: "2",
|
|
194
|
+
strokeLinecap: "round",
|
|
195
|
+
strokeLinejoin: "round"
|
|
206
196
|
}
|
|
207
|
-
)
|
|
208
|
-
/* @__PURE__ */ jsx("circle", { cx: "10", cy: "10", r: "1.5", fill: "currentColor" })
|
|
197
|
+
)
|
|
209
198
|
]
|
|
210
199
|
}
|
|
211
200
|
),
|
|
212
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("p", { className: "text-
|
|
201
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("p", { className: "text-[16px] l:text-[14px] text-[#2A2C32]", children: euifyMakeModel }) })
|
|
213
202
|
] }),
|
|
214
203
|
/* @__PURE__ */ jsx(
|
|
215
204
|
"button",
|
|
216
205
|
{
|
|
217
206
|
onClick: handleScheduleClick,
|
|
218
207
|
className: cn(
|
|
219
|
-
"w-
|
|
220
|
-
"bg-white text-gray-900 border border-gray-900",
|
|
221
|
-
"font-
|
|
208
|
+
"w-fit px-[28px] l:px-[20px] l:py-[8px] py-3 rounded-full",
|
|
209
|
+
"bg-white text-gray-900 border-2 border-gray-900",
|
|
210
|
+
"font-bold text-[16px] l:text-[14px]",
|
|
222
211
|
"hover:bg-gray-900 hover:text-white",
|
|
223
212
|
"transition-all duration-200"
|
|
224
213
|
),
|
|
@@ -356,41 +345,53 @@ var StudioMap = ({
|
|
|
356
345
|
marker.addListener("click", () => {
|
|
357
346
|
setSelectedLocation(location);
|
|
358
347
|
const content = `
|
|
359
|
-
<div style="padding: 16px;
|
|
360
|
-
<h3 style="margin: 0 0
|
|
361
|
-
${location.availableTime ? `<div style="
|
|
362
|
-
<svg style="
|
|
363
|
-
<
|
|
348
|
+
<div style="padding: 0 16px 16px 16px; font-weight: 700; font-family: 'MontForAnker'; max-width: 420px;">
|
|
349
|
+
<h3 style="margin: 0 0 16px 0; font-size: 24px; color: #080A0F;">${location.name}</h3>
|
|
350
|
+
${location.availableTime ? `<div style="display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px;">
|
|
351
|
+
<svg style="flex-shrink: 0; margin-top: 2px;" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
352
|
+
<rect x="3" y="4" width="14" height="13" rx="2" stroke="currentColor" stroke-width="1.5"/>
|
|
353
|
+
<path d="M3 8H17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
|
354
|
+
<path d="M6 2V4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
|
355
|
+
<path d="M14 2V4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
|
364
356
|
</svg>
|
|
365
|
-
<
|
|
357
|
+
<div>
|
|
358
|
+
<p style="margin: 0; font-size: 16px; color: #2A2C32;">${location.availableTime === pageData?.noAvailableTime ? "" : pageData.available} ${location.availableTime}</p>
|
|
359
|
+
</div>
|
|
366
360
|
</div>` : ""}
|
|
367
|
-
<div style="
|
|
368
|
-
<svg style="
|
|
369
|
-
<path
|
|
361
|
+
<div style="display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px;">
|
|
362
|
+
<svg style="flex-shrink: 0; margin-top: 2px;" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
363
|
+
<path d="M10 10C11.1046 10 12 9.10457 12 8C12 6.89543 11.1046 6 10 6C8.89543 6 8 6.89543 8 8C8 9.10457 8.89543 10 10 10Z" stroke="currentColor" stroke-width="1.5"/>
|
|
364
|
+
<path d="M10 18C10 18 16 13 16 8C16 4.68629 13.3137 2 10 2C6.68629 2 4 4.68629 4 8C4 13 10 18 10 18Z" stroke="currentColor" stroke-width="1.5"/>
|
|
370
365
|
</svg>
|
|
371
|
-
<
|
|
366
|
+
<div style="flex: 1;">
|
|
367
|
+
<p style="margin: 0; font-size: 16px; color: #2A2C32; word-wrap: break-word;">${location.address}</p>
|
|
368
|
+
</div>
|
|
372
369
|
</div>
|
|
373
|
-
${location.euifyMakeModel ? `<div style="
|
|
374
|
-
<svg style="
|
|
375
|
-
<path d="
|
|
370
|
+
${location.euifyMakeModel ? `<div style="display: flex; align-items: flex-start; gap: 12px; margin-bottom: 24px;">
|
|
371
|
+
<svg style="flex-shrink: 0; margin-top: 2px;" width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
372
|
+
<path d="M14.4643 7.4929H9.65565M3.16391 18.7132H20.8171C22.0122 18.7132 22.981 17.7563 22.981 16.576L23 13.8348L22.981 6.42431C22.981 5.24396 22.0122 4.28711 20.8171 4.28711H3.16391C1.96882 4.28711 1 5.24396 1 6.42431V16.576C1 17.7563 1.96882 18.7132 3.16391 18.7132Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
373
|
+
<path d="M5.32812 18.2325V14.4238C5.32812 13.8715 5.77584 13.4238 6.32813 13.4238H17.7925C18.3447 13.4238 18.7925 13.8715 18.7925 14.4238V18.2325" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
376
374
|
</svg>
|
|
377
|
-
<
|
|
375
|
+
<div>
|
|
376
|
+
<p style="margin: 0; font-size: 16px; color: #2A2C32;">${location.euifyMakeModel}</p>
|
|
377
|
+
</div>
|
|
378
378
|
</div>` : ""}
|
|
379
379
|
<button
|
|
380
380
|
id="schedule-btn-${location.id}"
|
|
381
381
|
style="
|
|
382
|
-
width:
|
|
383
|
-
padding:
|
|
384
|
-
background: #
|
|
385
|
-
color: #
|
|
386
|
-
border:
|
|
387
|
-
border-radius:
|
|
388
|
-
font-weight:
|
|
382
|
+
width: fit-content;
|
|
383
|
+
padding: 12px 28px;
|
|
384
|
+
background: #fff;
|
|
385
|
+
color: #111827;
|
|
386
|
+
border: 2px solid #111827;
|
|
387
|
+
border-radius: 9999px;
|
|
388
|
+
font-weight: 700;
|
|
389
389
|
cursor: pointer;
|
|
390
|
-
font-size:
|
|
390
|
+
font-size: 16px;
|
|
391
|
+
transition: all 0.2s;
|
|
391
392
|
"
|
|
392
|
-
onmouseover="this.style.background='#
|
|
393
|
-
onmouseout="this.style.background='#
|
|
393
|
+
onmouseover="this.style.background='#111827'; this.style.color='#fff';"
|
|
394
|
+
onmouseout="this.style.background='#fff'; this.style.color='#111827';"
|
|
394
395
|
>
|
|
395
396
|
${pageData.scheduleNow}
|
|
396
397
|
</button>
|
|
@@ -442,41 +443,53 @@ var StudioMap = ({
|
|
|
442
443
|
const marker = markersRef.current[markerIndex];
|
|
443
444
|
if (location && marker) {
|
|
444
445
|
const content = `
|
|
445
|
-
<div style="padding: 16px;
|
|
446
|
-
<h3 style="margin: 0 0
|
|
447
|
-
${location.availableTime ? `<div style="
|
|
448
|
-
<svg style="
|
|
449
|
-
<
|
|
446
|
+
<div style="padding: 0 16px 16px 16px; font-weight: 700; font-family: 'MontForAnker'; max-width: 420px;">
|
|
447
|
+
<h3 style="margin: 0 0 16px 0; font-size: 24px; color: #080A0F;">${location.name}</h3>
|
|
448
|
+
${location.availableTime ? `<div style="display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px;">
|
|
449
|
+
<svg style="flex-shrink: 0; margin-top: 2px;" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
450
|
+
<rect x="3" y="4" width="14" height="13" rx="2" stroke="currentColor" stroke-width="1.5"/>
|
|
451
|
+
<path d="M3 8H17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
|
452
|
+
<path d="M6 2V4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
|
453
|
+
<path d="M14 2V4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
|
450
454
|
</svg>
|
|
451
|
-
<
|
|
455
|
+
<div>
|
|
456
|
+
<p style="margin: 0;font-size: 16px; color: #2A2C32;">${location.availableTime === pageData?.noAvailableTime ? "" : pageData.available} ${location.availableTime}</p>
|
|
457
|
+
</div>
|
|
452
458
|
</div>` : ""}
|
|
453
|
-
<div style="
|
|
454
|
-
<svg style="
|
|
455
|
-
<path
|
|
459
|
+
<div style="display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px;">
|
|
460
|
+
<svg style="flex-shrink: 0; margin-top: 2px;" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
461
|
+
<path d="M10 10C11.1046 10 12 9.10457 12 8C12 6.89543 11.1046 6 10 6C8.89543 6 8 6.89543 8 8C8 9.10457 8.89543 10 10 10Z" stroke="currentColor" stroke-width="1.5"/>
|
|
462
|
+
<path d="M10 18C10 18 16 13 16 8C16 4.68629 13.3137 2 10 2C6.68629 2 4 4.68629 4 8C4 13 10 18 10 18Z" stroke="currentColor" stroke-width="1.5"/>
|
|
456
463
|
</svg>
|
|
457
|
-
<
|
|
464
|
+
<div style="flex: 1;">
|
|
465
|
+
<p style="margin: 0; font-size: 16px; color: #2A2C32; word-wrap: break-word;">${location.address}</p>
|
|
466
|
+
</div>
|
|
458
467
|
</div>
|
|
459
|
-
${location.euifyMakeModel ? `<div style="
|
|
460
|
-
<svg style="
|
|
461
|
-
<path d="
|
|
468
|
+
${location.euifyMakeModel ? `<div style="display: flex; align-items: flex-start; gap: 12px; margin-bottom: 24px;">
|
|
469
|
+
<svg style="flex-shrink: 0; margin-top: 2px;" width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
470
|
+
<path d="M14.4643 7.4929H9.65565M3.16391 18.7132H20.8171C22.0122 18.7132 22.981 17.7563 22.981 16.576L23 13.8348L22.981 6.42431C22.981 5.24396 22.0122 4.28711 20.8171 4.28711H3.16391C1.96882 4.28711 1 5.24396 1 6.42431V16.576C1 17.7563 1.96882 18.7132 3.16391 18.7132Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
471
|
+
<path d="M5.32812 18.2325V14.4238C5.32812 13.8715 5.77584 13.4238 6.32813 13.4238H17.7925C18.3447 13.4238 18.7925 13.8715 18.7925 14.4238V18.2325" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
462
472
|
</svg>
|
|
463
|
-
<
|
|
473
|
+
<div>
|
|
474
|
+
<p style="margin: 0; font-size: 16px; color: #2A2C32;">${location.euifyMakeModel}</p>
|
|
475
|
+
</div>
|
|
464
476
|
</div>` : ""}
|
|
465
477
|
<button
|
|
466
478
|
id="schedule-btn-hover-${location.id}"
|
|
467
479
|
style="
|
|
468
|
-
width:
|
|
469
|
-
padding:
|
|
470
|
-
background: #
|
|
471
|
-
color: #
|
|
472
|
-
border:
|
|
473
|
-
border-radius:
|
|
474
|
-
font-weight:
|
|
480
|
+
width: fit-content;
|
|
481
|
+
padding: 12px 28px;
|
|
482
|
+
background: #fff;
|
|
483
|
+
color: #111827;
|
|
484
|
+
border: 2px solid #111827;
|
|
485
|
+
border-radius: 9999px;
|
|
486
|
+
font-weight: 700;
|
|
475
487
|
cursor: pointer;
|
|
476
|
-
font-size:
|
|
488
|
+
font-size: 16px;
|
|
489
|
+
transition: all 0.2s;
|
|
477
490
|
"
|
|
478
|
-
onmouseover="this.style.background='#
|
|
479
|
-
onmouseout="this.style.background='#
|
|
491
|
+
onmouseover="this.style.background='#111827'; this.style.color='#fff';"
|
|
492
|
+
onmouseout="this.style.background='#fff'; this.style.color='#111827';"
|
|
480
493
|
>
|
|
481
494
|
${pageData.scheduleNow}
|
|
482
495
|
</button>
|
|
@@ -509,7 +522,7 @@ var StudioMap = ({
|
|
|
509
522
|
"div",
|
|
510
523
|
{
|
|
511
524
|
className: cn(
|
|
512
|
-
"flex items-center justify-center bg-gray-100 rounded-
|
|
525
|
+
"flex items-center overflow-hidden justify-center bg-gray-100 rounded-[16px]",
|
|
513
526
|
className
|
|
514
527
|
),
|
|
515
528
|
style: { height: mapHeight },
|
|
@@ -521,7 +534,7 @@ var StudioMap = ({
|
|
|
521
534
|
return /* @__PURE__ */ jsxs(
|
|
522
535
|
"div",
|
|
523
536
|
{
|
|
524
|
-
className: cn("relative w-full rounded-
|
|
537
|
+
className: cn("relative w-full rounded-[16px] overflow-hidden", className),
|
|
525
538
|
...props,
|
|
526
539
|
children: [
|
|
527
540
|
/* @__PURE__ */ jsx("div", { ref: mapRef, style: { height: mapHeight } }),
|
|
@@ -730,6 +743,29 @@ var LocationFilter = ({
|
|
|
730
743
|
);
|
|
731
744
|
const showIndexBar = filteredItems.length >= 10;
|
|
732
745
|
const handleItemClick = (item) => {
|
|
746
|
+
if (item.code === "__all__") {
|
|
747
|
+
if (currentLevel === "country") {
|
|
748
|
+
onSelect?.({
|
|
749
|
+
level: "country"
|
|
750
|
+
});
|
|
751
|
+
onClose?.();
|
|
752
|
+
} else if (currentLevel === "state") {
|
|
753
|
+
onSelect?.({
|
|
754
|
+
level: "state",
|
|
755
|
+
country: selectedCountry
|
|
756
|
+
});
|
|
757
|
+
onClose?.();
|
|
758
|
+
} else if (currentLevel === "city") {
|
|
759
|
+
const parts = selectedState?.split("/") || [];
|
|
760
|
+
onSelect?.({
|
|
761
|
+
level: "city",
|
|
762
|
+
country: parts[0],
|
|
763
|
+
state: parts[1]
|
|
764
|
+
});
|
|
765
|
+
onClose?.();
|
|
766
|
+
}
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
733
769
|
if (currentLevel === "country") {
|
|
734
770
|
setSelectedCountry(item.code);
|
|
735
771
|
setCurrentLevel("state");
|
|
@@ -760,104 +796,104 @@ var LocationFilter = ({
|
|
|
760
796
|
return /* @__PURE__ */ jsxs(
|
|
761
797
|
"div",
|
|
762
798
|
{
|
|
763
|
-
style: { height: "
|
|
799
|
+
style: { height: "724px" },
|
|
764
800
|
className: cn(
|
|
765
|
-
"w-full rounded-[12px] absolute z-10
|
|
801
|
+
"w-full rounded-b-[12px] absolute z-10 bottom-[-2px] left-0 bg-white border border-[#E4E5E6]",
|
|
766
802
|
RoomsList_default.antdMobileScope
|
|
767
803
|
),
|
|
768
804
|
children: [
|
|
769
|
-
/* @__PURE__ */
|
|
805
|
+
/* @__PURE__ */ jsx(
|
|
770
806
|
"div",
|
|
771
807
|
{
|
|
772
808
|
style: { background: "#F8F8F8" },
|
|
773
|
-
className: "
|
|
774
|
-
children: [
|
|
775
|
-
/* @__PURE__ */ jsx(
|
|
809
|
+
className: "h-[76px] font-bold text-[14px] flex flex-col",
|
|
810
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center text-[16px] px-[20px] gap-[16px] py-[24px]", children: [
|
|
811
|
+
/* @__PURE__ */ jsx(
|
|
776
812
|
"button",
|
|
777
813
|
{
|
|
778
|
-
onClick:
|
|
779
|
-
className:
|
|
780
|
-
|
|
781
|
-
"
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
width: "24",
|
|
785
|
-
height: "24",
|
|
786
|
-
viewBox: "0 0 24 24",
|
|
787
|
-
fill: "none",
|
|
788
|
-
children: /* @__PURE__ */ jsx(
|
|
789
|
-
"path",
|
|
790
|
-
{
|
|
791
|
-
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",
|
|
792
|
-
fill: "#1D1D1F"
|
|
793
|
-
}
|
|
794
|
-
)
|
|
795
|
-
}
|
|
796
|
-
)
|
|
814
|
+
onClick: () => handleTabClick("country"),
|
|
815
|
+
className: cn(
|
|
816
|
+
"pb-[4px] transition-colors",
|
|
817
|
+
currentLevel === "country" ? "text-[#080A0F] border-b-2 border-[#3ADB67]" : "text-[#080A0F]"
|
|
818
|
+
),
|
|
819
|
+
children: pageData.country
|
|
797
820
|
}
|
|
798
|
-
)
|
|
799
|
-
/* @__PURE__ */
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
{
|
|
827
|
-
onClick: () => handleTabClick("city"),
|
|
828
|
-
disabled: !selectedState,
|
|
829
|
-
className: cn(
|
|
830
|
-
"pb-[4px] transition-colors",
|
|
831
|
-
currentLevel === "city" ? "text-[#1D1D1F] border-b-2 border-[#2E8B57]" : "text-[#767880]",
|
|
832
|
-
!selectedState && "opacity-50 cursor-not-allowed"
|
|
833
|
-
),
|
|
834
|
-
children: pageData.city
|
|
835
|
-
}
|
|
836
|
-
)
|
|
837
|
-
] })
|
|
838
|
-
]
|
|
821
|
+
),
|
|
822
|
+
/* @__PURE__ */ jsx(
|
|
823
|
+
"button",
|
|
824
|
+
{
|
|
825
|
+
onClick: () => handleTabClick("state"),
|
|
826
|
+
disabled: !selectedCountry,
|
|
827
|
+
className: cn(
|
|
828
|
+
"pb-[4px] transition-colors",
|
|
829
|
+
currentLevel === "state" ? "text-[#080A0F] border-b-2 border-[#3ADB67]" : "text-[#080A0F]",
|
|
830
|
+
!selectedCountry && "opacity-50 cursor-not-allowed"
|
|
831
|
+
),
|
|
832
|
+
children: pageData.state
|
|
833
|
+
}
|
|
834
|
+
),
|
|
835
|
+
/* @__PURE__ */ jsx(
|
|
836
|
+
"button",
|
|
837
|
+
{
|
|
838
|
+
onClick: () => handleTabClick("city"),
|
|
839
|
+
disabled: !selectedState,
|
|
840
|
+
className: cn(
|
|
841
|
+
"pb-[4px] transition-colors",
|
|
842
|
+
currentLevel === "city" ? "text-[#080A0F] border-b-2 border-[#3ADB67]" : "text-[#080A0F]",
|
|
843
|
+
!selectedState && "opacity-50 cursor-not-allowed"
|
|
844
|
+
),
|
|
845
|
+
children: pageData.city
|
|
846
|
+
}
|
|
847
|
+
)
|
|
848
|
+
] })
|
|
839
849
|
}
|
|
840
850
|
),
|
|
841
|
-
/* @__PURE__ */ jsx(AntdMobileIsolated, { style: { height: "calc(100% -
|
|
842
|
-
|
|
843
|
-
|
|
851
|
+
/* @__PURE__ */ jsx(AntdMobileIsolated, { style: { height: "calc(100% - 76px)" }, children: showIndexBar ? /* @__PURE__ */ jsxs("div", { style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
|
|
852
|
+
/* @__PURE__ */ jsx(List, { children: /* @__PURE__ */ jsx(
|
|
853
|
+
List.Item,
|
|
854
|
+
{
|
|
855
|
+
onClick: () => handleItemClick({ code: "__all__", name: pageData.allLocations || "All", count: filteredItems.length }),
|
|
856
|
+
className: "text-[16px] !pl-[24px] font-bold",
|
|
857
|
+
style: { cursor: "pointer", borderBottom: "1px solid #E4E5E6" },
|
|
858
|
+
children: pageData.allLocations
|
|
859
|
+
},
|
|
860
|
+
"__all__"
|
|
861
|
+
) }),
|
|
862
|
+
/* @__PURE__ */ jsx(IndexBar, { style: { flex: 1 }, children: groupedItems.map((group) => {
|
|
863
|
+
const { title, items } = group;
|
|
864
|
+
return /* @__PURE__ */ jsx(IndexBar.Panel, { index: title, title, children: /* @__PURE__ */ jsx(List, { children: items.map((item) => /* @__PURE__ */ jsx(
|
|
865
|
+
List.Item,
|
|
866
|
+
{
|
|
867
|
+
onClick: () => handleItemClick(item),
|
|
868
|
+
className: "text-[16px] !pl-[24px]",
|
|
869
|
+
style: { cursor: "pointer" },
|
|
870
|
+
children: item.name
|
|
871
|
+
},
|
|
872
|
+
item.code
|
|
873
|
+
)) }) }, title);
|
|
874
|
+
}) })
|
|
875
|
+
] }) : /* @__PURE__ */ jsx("div", { style: { height: "100%", overflow: "auto" }, children: /* @__PURE__ */ jsxs(List, { children: [
|
|
876
|
+
/* @__PURE__ */ jsx(
|
|
877
|
+
List.Item,
|
|
878
|
+
{
|
|
879
|
+
onClick: () => handleItemClick({ code: "__all__", name: pageData.allLocations || "All", count: filteredItems.length }),
|
|
880
|
+
className: "text-[16px] !pl-[24px] font-bold",
|
|
881
|
+
style: { cursor: "pointer", borderBottom: "1px solid #E4E5E6" },
|
|
882
|
+
children: pageData.allLocations
|
|
883
|
+
},
|
|
884
|
+
"__all__"
|
|
885
|
+
),
|
|
886
|
+
filteredItems.map((item) => /* @__PURE__ */ jsx(
|
|
844
887
|
List.Item,
|
|
845
888
|
{
|
|
846
889
|
onClick: () => handleItemClick(item),
|
|
890
|
+
className: "text-[16px] !pl-[24px]",
|
|
847
891
|
style: { cursor: "pointer" },
|
|
848
892
|
children: item.name
|
|
849
893
|
},
|
|
850
894
|
item.code
|
|
851
|
-
))
|
|
852
|
-
}) })
|
|
853
|
-
List.Item,
|
|
854
|
-
{
|
|
855
|
-
onClick: () => handleItemClick(item),
|
|
856
|
-
style: { cursor: "pointer" },
|
|
857
|
-
children: item.name
|
|
858
|
-
},
|
|
859
|
-
item.code
|
|
860
|
-
)) }) }) })
|
|
895
|
+
))
|
|
896
|
+
] }) }) })
|
|
861
897
|
]
|
|
862
898
|
}
|
|
863
899
|
);
|
|
@@ -1053,7 +1089,7 @@ var RoomsList = ({
|
|
|
1053
1089
|
lat: Number(room.latitude) || 0,
|
|
1054
1090
|
lng: Number(room.longitude) || 0,
|
|
1055
1091
|
availableTime: nextAvailableTimeslot ? `${nextAvailableTimeslot.start_time}` : mergedPageData.noAvailableTime,
|
|
1056
|
-
euifyMakeModel: room?.
|
|
1092
|
+
euifyMakeModel: room?.equipment?.join(", ") || ""
|
|
1057
1093
|
};
|
|
1058
1094
|
});
|
|
1059
1095
|
}, [demoRooms, mergedPageData.defaultCountry, mergedPageData.noAvailableTime]);
|
|
@@ -1083,10 +1119,6 @@ var RoomsList = ({
|
|
|
1083
1119
|
setSelectedLocation(selection);
|
|
1084
1120
|
setShowLocationFilter(false);
|
|
1085
1121
|
};
|
|
1086
|
-
const handleClearFilter = () => {
|
|
1087
|
-
setSelectedLocation(void 0);
|
|
1088
|
-
};
|
|
1089
|
-
console.log(filteredStudioLocations);
|
|
1090
1122
|
return /* @__PURE__ */ jsxs("div", { className, ...props, children: [
|
|
1091
1123
|
/* @__PURE__ */ jsx(Title, { title: mergedPageData.title }),
|
|
1092
1124
|
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 }) }) }),
|
|
@@ -1101,12 +1133,15 @@ var RoomsList = ({
|
|
|
1101
1133
|
className: "flex-none relative w-[420px] l:!w-full",
|
|
1102
1134
|
style: { height: "794px" },
|
|
1103
1135
|
children: [
|
|
1104
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
1136
|
+
/* @__PURE__ */ jsx("div", { className: cn(
|
|
1137
|
+
"mb-4 bg-white border border-[#E4E5E6] px-[20px] py-[16px]",
|
|
1138
|
+
showLocationFilter ? "rounded-t-[12px] rounded-b-none" : "rounded-[12px]"
|
|
1139
|
+
), children: /* @__PURE__ */ jsxs("div", { className: "h-[40px] font-bold text-[16px] l:text-[14px] gap-10 l:gap-4 flex items-center", children: [
|
|
1105
1140
|
/* @__PURE__ */ jsxs(
|
|
1106
1141
|
"button",
|
|
1107
1142
|
{
|
|
1108
|
-
className: "flex cursor-pointer items-center hover:text-[#
|
|
1109
|
-
onClick: () => setShowLocationFilter(
|
|
1143
|
+
className: "flex cursor-pointer items-center hover:text-[#3ADB67] transition-colors",
|
|
1144
|
+
onClick: () => setShowLocationFilter(!showLocationFilter),
|
|
1110
1145
|
children: [
|
|
1111
1146
|
/* @__PURE__ */ jsx("span", { className: "mr-1", children: getSelectedLocationName() }),
|
|
1112
1147
|
/* @__PURE__ */ jsx(
|
|
@@ -1117,6 +1152,10 @@ var RoomsList = ({
|
|
|
1117
1152
|
height: "24",
|
|
1118
1153
|
viewBox: "0 0 24 24",
|
|
1119
1154
|
fill: "none",
|
|
1155
|
+
className: cn(
|
|
1156
|
+
"transition-transform duration-300",
|
|
1157
|
+
showLocationFilter && "rotate-180"
|
|
1158
|
+
),
|
|
1120
1159
|
children: /* @__PURE__ */ jsx(
|
|
1121
1160
|
"path",
|
|
1122
1161
|
{
|
|
@@ -1129,14 +1168,7 @@ var RoomsList = ({
|
|
|
1129
1168
|
]
|
|
1130
1169
|
}
|
|
1131
1170
|
),
|
|
1132
|
-
selectedLocation &&
|
|
1133
|
-
"button",
|
|
1134
|
-
{
|
|
1135
|
-
onClick: handleClearFilter,
|
|
1136
|
-
className: "ml-auto text-[14px] text-[#2E8B57] hover:underline",
|
|
1137
|
-
children: mergedPageData.locationFilter.clear
|
|
1138
|
-
}
|
|
1139
|
-
),
|
|
1171
|
+
selectedLocation && false,
|
|
1140
1172
|
/* @__PURE__ */ jsxs("div", { className: "flex text-[#767880] cursor-not-allowed", children: [
|
|
1141
1173
|
mergedPageData.machine,
|
|
1142
1174
|
/* @__PURE__ */ jsx(
|
|
@@ -1162,7 +1194,7 @@ var RoomsList = ({
|
|
|
1162
1194
|
"div",
|
|
1163
1195
|
{
|
|
1164
1196
|
style: { maxHeight: "706px", overflow: "auto" },
|
|
1165
|
-
className: "rounded-[12px] bg-white border border-[#E4E5E6]",
|
|
1197
|
+
className: "rounded-[12px] bg-white border h-[706px] border-[#E4E5E6]",
|
|
1166
1198
|
children: filteredStudioLocations.length === 0 ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-[200px] text-[#767880]", children: mergedPageData.locationFilter.noStudiosFound }) : filteredStudioLocations.map((item) => {
|
|
1167
1199
|
return /* @__PURE__ */ jsx(
|
|
1168
1200
|
StudioCard,
|
|
@@ -1177,7 +1209,6 @@ var RoomsList = ({
|
|
|
1177
1209
|
euifyMakeModel: item?.euifyMakeModel || "",
|
|
1178
1210
|
onSchedule,
|
|
1179
1211
|
onMouseEnter: () => setHoveredRoomId(item.id),
|
|
1180
|
-
onMouseLeave: () => setHoveredRoomId(null),
|
|
1181
1212
|
pageData: {
|
|
1182
1213
|
...mergedPageData.studioCard,
|
|
1183
1214
|
noAvailableTime: mergedPageData?.noAvailableTime
|