@proulr/sdui-components 0.1.62 → 0.1.63
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
|
@@ -52,6 +52,8 @@ type DiscoverMapProps = LayoutProps & {
|
|
|
52
52
|
labelRef?: string;
|
|
53
53
|
pinsRef?: string;
|
|
54
54
|
height?: number;
|
|
55
|
+
/** When set, overrides default (interactive only while pins are empty). */
|
|
56
|
+
interactive?: boolean;
|
|
55
57
|
};
|
|
56
58
|
|
|
57
59
|
export const DiscoverMap: BdcComponent = (props) => layoutBlock('discover_map', props as DiscoverMapProps);
|
|
@@ -380,6 +380,9 @@ export function SduiDiscoverMapBlock({ block, data, onAction }: SduiBlockRenderP
|
|
|
380
380
|
const centerMoveToken =
|
|
381
381
|
typeof data.map_center_move_token === 'number' ? data.map_center_move_token : 0;
|
|
382
382
|
const pins = pinsRef ? readMapPins(data, pinsRef) : [];
|
|
383
|
+
const interactiveOverride = block.props.interactive;
|
|
384
|
+
const interactive =
|
|
385
|
+
typeof interactiveOverride === 'boolean' ? interactiveOverride : pins.length === 0;
|
|
383
386
|
|
|
384
387
|
if (hybrid.renderDiscoverMap) {
|
|
385
388
|
return (
|
|
@@ -389,7 +392,7 @@ export function SduiDiscoverMapBlock({ block, data, onAction }: SduiBlockRenderP
|
|
|
389
392
|
label: regionLabel,
|
|
390
393
|
height,
|
|
391
394
|
pins,
|
|
392
|
-
interactive
|
|
395
|
+
interactive,
|
|
393
396
|
centerMoveToken,
|
|
394
397
|
onCenterChange: hybrid.onDiscoverMapCenterChange ?? (() => {}),
|
|
395
398
|
onPinPress: (profileId) => onAction('open_profile', { profile_id: profileId }),
|