@proulr/sdui-components 0.1.63 → 0.1.64
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/package.json
CHANGED
|
@@ -350,6 +350,13 @@ function readMapPins(data: Record<string, unknown>, ref: string) {
|
|
|
350
350
|
const lat = typeof row.lat === 'number' ? row.lat : Number(row.lat);
|
|
351
351
|
const lng = typeof row.lng === 'number' ? row.lng : Number(row.lng);
|
|
352
352
|
if (!id || !Number.isFinite(lat) || !Number.isFinite(lng)) return null;
|
|
353
|
+
const distanceRaw = row.distance_m;
|
|
354
|
+
const distance_m =
|
|
355
|
+
typeof distanceRaw === 'number' && Number.isFinite(distanceRaw)
|
|
356
|
+
? distanceRaw
|
|
357
|
+
: typeof distanceRaw === 'string' && Number.isFinite(Number(distanceRaw))
|
|
358
|
+
? Number(distanceRaw)
|
|
359
|
+
: null;
|
|
353
360
|
return {
|
|
354
361
|
id,
|
|
355
362
|
lat,
|
|
@@ -357,6 +364,11 @@ function readMapPins(data: Record<string, unknown>, ref: string) {
|
|
|
357
364
|
display_name: typeof row.display_name === 'string' ? row.display_name : null,
|
|
358
365
|
primary_photo_path:
|
|
359
366
|
typeof row.primary_photo_path === 'string' ? row.primary_photo_path : null,
|
|
367
|
+
is_online: row.is_online === true || row.is_online === false ? row.is_online : null,
|
|
368
|
+
is_hosting: row.is_hosting === true || row.is_hosting === false ? row.is_hosting : null,
|
|
369
|
+
mood_text: typeof row.mood_text === 'string' ? row.mood_text : null,
|
|
370
|
+
distance_m,
|
|
371
|
+
status_label: typeof row.status_label === 'string' ? row.status_label : null,
|
|
360
372
|
};
|
|
361
373
|
})
|
|
362
374
|
.filter((pin): pin is NonNullable<typeof pin> => Boolean(pin));
|
|
@@ -18,6 +18,11 @@ export type SduiHybridDiscoverMapPin = {
|
|
|
18
18
|
lng: number;
|
|
19
19
|
display_name?: string | null;
|
|
20
20
|
primary_photo_path?: string | null;
|
|
21
|
+
is_online?: boolean | null;
|
|
22
|
+
is_hosting?: boolean | null;
|
|
23
|
+
mood_text?: string | null;
|
|
24
|
+
distance_m?: number | null;
|
|
25
|
+
status_label?: string | null;
|
|
21
26
|
};
|
|
22
27
|
|
|
23
28
|
export type SduiHybridDiscoverMapProps = {
|