@fleet-frontend/mower-maps 0.2.6-beta.5 → 0.2.6-beta.6
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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +71 -26
- package/dist/index.js +71 -26
- package/dist/render/MowerPartitionPickerMap.d.ts +1 -1
- package/dist/render/MowerPartitionPickerMap.d.ts.map +1 -1
- package/dist/render/partitionPicker/constants.d.ts +4 -0
- package/dist/render/partitionPicker/constants.d.ts.map +1 -1
- package/dist/render/partitionPicker/hooks/useMapViewport.d.ts +10 -1
- package/dist/render/partitionPicker/hooks/useMapViewport.d.ts.map +1 -1
- package/dist/render/partitionPicker/layers/PartitionNameLabels.d.ts +4 -2
- package/dist/render/partitionPicker/layers/PartitionNameLabels.d.ts.map +1 -1
- package/dist/render/partitionPicker/layers/PartitionPickerSvg.d.ts +2 -1
- package/dist/render/partitionPicker/layers/PartitionPickerSvg.d.ts.map +1 -1
- package/dist/render/partitionPicker/layers/SelectableBoundaryElement.d.ts +4 -2
- package/dist/render/partitionPicker/layers/SelectableBoundaryElement.d.ts.map +1 -1
- package/dist/render/partitionPicker/types.d.ts +23 -0
- package/dist/render/partitionPicker/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { default as MowerMapRenderer } from './render/MowerMapRenderer';
|
|
|
2
2
|
export { default as BoundarySvgRender } from './render/BoundarySvgRender';
|
|
3
3
|
export { default as MowerPartitionPickerMap } from './render/MowerPartitionPickerMap';
|
|
4
4
|
export { getIsolatedBoundaryIds } from './render/partitionPicker/hooks/useIsolatedBoundaryIds';
|
|
5
|
-
export type { MowerPartitionPickerMapProps, MowerPartitionPickerMapRef, CssLength, ScreenPaddingBox, ScreenPaddingInput, PartitionPickerMapTransform, } from './render/partitionPicker/types';
|
|
5
|
+
export type { MowerPartitionPickerMapProps, MowerPartitionPickerMapRef, CssLength, ScreenPaddingBox, ScreenPaddingInput, PartitionPickerMapTransform, IsolatedBoundaryTapPayload, } from './render/partitionPicker/types';
|
|
6
6
|
export type { PartitionPickerStyleConfig, PartitionPickerBoundaryColors, PartitionPickerLabelStyles, PartitionPickerGridStyle, ResolvedPartitionPickerStyles, } from './render/partitionPicker/constants';
|
|
7
7
|
export { resolvePartitionPickerStyles, getPartitionPickerColors, getPartitionPickerLabelStyles, PARTITION_PICKER_COLORS_WEB, PARTITION_PICKER_COLORS_H5, PARTITION_PICKER_LABEL_STYLES_WEB, PARTITION_PICKER_LABEL_STYLES_H5, } from './render/partitionPicker/constants';
|
|
8
8
|
export { DEFAULT_SCREEN_PADDING, normalizeScreenPadding, } from './render/partitionPicker/types';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE1E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AAC/F,YAAY,EACV,4BAA4B,EAC5B,0BAA0B,EAC1B,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE1E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAA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AC;AAG5B,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACjG,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/index.esm.js
CHANGED
|
@@ -30800,6 +30800,10 @@ const BoundarySvgRender = React__default.memo(({ mapJson, unStructMapData, id, m
|
|
|
30800
30800
|
|
|
30801
30801
|
/** ChannelClipPath 等内容裁剪使用的 SVG 坐标边距(与用户传入的屏幕 padding 无关) */
|
|
30802
30802
|
const PARTITION_PICKER_CONTENT_CLIP_PADDING = 0;
|
|
30803
|
+
/** 可选中地块 polygon / 标签 data 属性 */
|
|
30804
|
+
const PARTITION_BOUNDARY_ID_ATTR = 'data-partition-boundary-id';
|
|
30805
|
+
/** 孤立子地块命中标记(不可选中) */
|
|
30806
|
+
const PARTITION_ISOLATED_BOUNDARY_ID_ATTR = 'data-partition-isolated-boundary-id';
|
|
30803
30807
|
/** H5:子区域屏幕宽度超过该值才展示名称标签(px) */
|
|
30804
30808
|
const H5_PARTITION_LABEL_MIN_SCREEN_WIDTH_PX = 92;
|
|
30805
30809
|
/** H5:名称气泡总宽度(px) */
|
|
@@ -31222,9 +31226,9 @@ function useMapViewport({ mapJson, containerRef: externalContainerRef, width, he
|
|
|
31222
31226
|
/** 位移是否超过 PAN_CLICK_THRESHOLD_PX,超过则视为拖拽 */
|
|
31223
31227
|
const markPanMoved = (startX, startY, currentX, currentY) => Math.hypot(currentX - startX, currentY - startY) > PAN_CLICK_THRESHOLD_PX;
|
|
31224
31228
|
/** 触发点击回调(仅当未发生拖拽时) */
|
|
31225
|
-
const emitViewportTap = (tapTarget) => {
|
|
31229
|
+
const emitViewportTap = (tapTarget, clientX, clientY) => {
|
|
31226
31230
|
if (tapTarget) {
|
|
31227
|
-
onViewportTapRef.current?.(tapTarget);
|
|
31231
|
+
onViewportTapRef.current?.({ target: tapTarget, clientX, clientY });
|
|
31228
31232
|
}
|
|
31229
31233
|
};
|
|
31230
31234
|
// ── 绑定容器交互事件:滚轮缩放 / 桌面拖拽 / H5 pinch+单指平移 ──
|
|
@@ -31250,7 +31254,7 @@ function useMapViewport({ mapJson, containerRef: externalContainerRef, width, he
|
|
|
31250
31254
|
if (event) {
|
|
31251
31255
|
const state = pointerMapRef.current.get(event.pointerId);
|
|
31252
31256
|
if (state && !state.moved && state.tapTarget) {
|
|
31253
|
-
emitViewportTap(state.tapTarget);
|
|
31257
|
+
emitViewportTap(state.tapTarget, event.clientX, event.clientY);
|
|
31254
31258
|
}
|
|
31255
31259
|
pointerMapRef.current.delete(event.pointerId);
|
|
31256
31260
|
try {
|
|
@@ -31394,13 +31398,17 @@ function useMapViewport({ mapJson, containerRef: externalContainerRef, width, he
|
|
|
31394
31398
|
if (touchState && !touchState.moved) {
|
|
31395
31399
|
let tapTarget = touchState.tapTarget;
|
|
31396
31400
|
const touch = event.changedTouches[0];
|
|
31401
|
+
let clientX = touchState.startX;
|
|
31402
|
+
let clientY = touchState.startY;
|
|
31397
31403
|
if (touch) {
|
|
31404
|
+
clientX = touch.clientX;
|
|
31405
|
+
clientY = touch.clientY;
|
|
31398
31406
|
const hitTarget = document.elementFromPoint(touch.clientX, touch.clientY);
|
|
31399
31407
|
if (hitTarget instanceof Element) {
|
|
31400
31408
|
tapTarget = hitTarget;
|
|
31401
31409
|
}
|
|
31402
31410
|
}
|
|
31403
|
-
emitViewportTap(tapTarget);
|
|
31411
|
+
emitViewportTap(tapTarget, clientX, clientY);
|
|
31404
31412
|
}
|
|
31405
31413
|
if (pinchRef.current) {
|
|
31406
31414
|
pinchRef.current = null;
|
|
@@ -31848,12 +31856,11 @@ function usePartitionLabelItems(mapData, viewBox, containerWidth, containerHeigh
|
|
|
31848
31856
|
]);
|
|
31849
31857
|
}
|
|
31850
31858
|
|
|
31851
|
-
var css_248z = "@charset \"UTF-8\";\n/* 地图容器:裁剪溢出,禁用浏览器默认 touch 手势以便自定义 pinch */\n.index-module_container__nNYv7 {\n position: relative;\n overflow: hidden;\n touch-action: none;\n user-select: none;\n cursor: grab;\n /* H5 点击时不出现矩形 tap 高亮 */\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n}\n\n/* 网格 + 地块双层 SVG 叠放,共用 viewBox 保证平移/缩放同步 */\n.index-module_mapSvgStack__nz2s2 {\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 1;\n}\n\n.index-module_gridSvg__MoJD6 {\n position: absolute;\n inset: 0;\n display: block;\n pointer-events: none;\n}\n\n/* 地图 SVG:地块/通道,可绕 viewBox 中心旋转 */\n.index-module_mapSvg__vN0LV {\n position: absolute;\n inset: 0;\n display: block;\n pointer-events: none;\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n}\n\n/*
|
|
31859
|
+
var css_248z = "@charset \"UTF-8\";\n/* 地图容器:裁剪溢出,禁用浏览器默认 touch 手势以便自定义 pinch */\n.index-module_container__nNYv7 {\n position: relative;\n overflow: hidden;\n touch-action: none;\n user-select: none;\n cursor: grab;\n /* H5 点击时不出现矩形 tap 高亮 */\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n}\n\n/* 网格 + 地块双层 SVG 叠放,共用 viewBox 保证平移/缩放同步 */\n.index-module_mapSvgStack__nz2s2 {\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 1;\n}\n\n.index-module_gridSvg__MoJD6 {\n position: absolute;\n inset: 0;\n display: block;\n pointer-events: none;\n}\n\n/* 地图 SVG:地块/通道,可绕 viewBox 中心旋转 */\n.index-module_mapSvg__vN0LV {\n position: absolute;\n inset: 0;\n display: block;\n pointer-events: none;\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n}\n\n/* 可点击地块:悬停显示 pointer,与地图容器 grab 区分 */\n.index-module_boundaryPolygon__uHe-E {\n cursor: pointer;\n pointer-events: auto;\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n outline: none;\n -webkit-touch-callout: none;\n}\n\n.index-module_container__nNYv7:active {\n cursor: grabbing;\n}\n\n/* Map 模式:OverlayViewF 内根节点,铺满 overlay 像素区域 */\n.index-module_googleOverlayRoot__TQ3II {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n overflow: visible;\n}\n\n/* HTML overlay 层:CSS rotate 与 MowerMapRenderer OverlayViewF 一致,子元素自行反向补偿 */\n.index-module_mapOverlayLayer__7jTDy {\n position: absolute;\n inset: 0;\n transform-origin: 50% 50%;\n pointer-events: none;\n z-index: 2;\n}\n\n/* 分区名气泡层,绝对定位覆盖在 SVG 之上 */\n.index-module_labelsLayer__Rcikw {\n position: absolute;\n inset: 0;\n pointer-events: none;\n}\n\n.index-module_label__xo3Kc {\n position: absolute;\n display: flex;\n flex-direction: column;\n align-items: center;\n pointer-events: auto;\n cursor: pointer;\n white-space: nowrap;\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n outline: none;\n -webkit-touch-callout: none;\n}\n\n.index-module_labelOrderOnly__TDLBU {\n gap: 0;\n}\n\n/* H5 名称标签:气泡宽度 / 文案最大宽度由 constants.ts 内联样式控制 */\n.index-module_labelH5Wrap__Es5cA {\n white-space: normal;\n}\n\n.index-module_labelPill__7jnOo {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: none;\n}\n\n.index-module_labelPillH5__iPeHi {\n box-sizing: border-box;\n}\n\n.index-module_labelText__ialST {\n word-break: break-word;\n text-align: center;\n}\n\n.index-module_labelTextH5__jz8SO {\n max-width: 100%;\n white-space: normal;\n overflow-wrap: anywhere;\n line-height: 1.33;\n}\n\n/* 选中序号徽章:尺寸与颜色由 constants 按 platform 注入 */\n.index-module_selectionOrderBadge__uj7LX {\n flex-shrink: 0;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.index-module_boundaryPolygonIsolated__syN4V {\n cursor: not-allowed;\n}\n\n.index-module_boundaryPolygonIsolated__syN4V:active {\n cursor: grabbing;\n}\n\n.index-module_labelIsolated__K3WAB {\n cursor: not-allowed;\n pointer-events: auto;\n}\n\n.index-module_labelIsolated__K3WAB:active {\n cursor: grabbing;\n}\n\n.index-module_labelIsolatedLayout__k-rwI {\n gap: 4px;\n}\n\n.index-module_isolatedIconBelow__PuVIF {\n position: static;\n transform: none;\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n pointer-events: none;\n}\n\n.index-module_isolatedIconBelow__PuVIF.index-module_isolatedIconWeb__iPkYp {\n width: 20px;\n height: 20px;\n}\n\n.index-module_isolatedIcon__Vbxl0 {\n position: absolute;\n width: 24px;\n height: 24px;\n left: 50%;\n bottom: calc(100% + 4px);\n transform: translateX(-50%);\n}\n\n.index-module_isolatedIconWeb__iPkYp {\n width: 20px;\n height: 20px;\n bottom: calc(100% + 2px);\n}";
|
|
31852
31860
|
var styles = {"container":"index-module_container__nNYv7","mapSvgStack":"index-module_mapSvgStack__nz2s2","gridSvg":"index-module_gridSvg__MoJD6","mapSvg":"index-module_mapSvg__vN0LV","boundaryPolygon":"index-module_boundaryPolygon__uHe-E","googleOverlayRoot":"index-module_googleOverlayRoot__TQ3II","mapOverlayLayer":"index-module_mapOverlayLayer__7jTDy","labelsLayer":"index-module_labelsLayer__Rcikw","label":"index-module_label__xo3Kc","labelOrderOnly":"index-module_labelOrderOnly__TDLBU","labelH5Wrap":"index-module_labelH5Wrap__Es5cA","labelPill":"index-module_labelPill__7jnOo","labelPillH5":"index-module_labelPillH5__iPeHi","labelText":"index-module_labelText__ialST","labelTextH5":"index-module_labelTextH5__jz8SO","selectionOrderBadge":"index-module_selectionOrderBadge__uj7LX","boundaryPolygonIsolated":"index-module_boundaryPolygonIsolated__syN4V","labelIsolated":"index-module_labelIsolated__K3WAB","labelIsolatedLayout":"index-module_labelIsolatedLayout__k-rwI","isolatedIconBelow":"index-module_isolatedIconBelow__PuVIF","isolatedIconWeb":"index-module_isolatedIconWeb__iPkYp"};
|
|
31853
31861
|
styleInject(css_248z);
|
|
31854
31862
|
|
|
31855
|
-
const
|
|
31856
|
-
const SelectableBoundaryElement = ({ data, boundaryColors, boundaryStrokePx, isIsolated = false, selected, hovered, viewBoxWidth, viewBoxHeight, containerWidth, containerHeight, onHoverChange, onBoundaryClick, }) => {
|
|
31863
|
+
const SelectableBoundaryElement = ({ data, boundaryColors, boundaryStrokePx, isIsolated = false, selected, hovered, viewBoxWidth, viewBoxHeight, containerWidth, containerHeight, onHoverChange, onBoundaryClick, onIsolatedTap, }) => {
|
|
31857
31864
|
const style = data.style || {};
|
|
31858
31865
|
const boundaryId = Number(data.id);
|
|
31859
31866
|
const colors = boundaryColors;
|
|
@@ -31898,9 +31905,14 @@ const SelectableBoundaryElement = ({ data, boundaryColors, boundaryStrokePx, isI
|
|
|
31898
31905
|
viewBoxWidth,
|
|
31899
31906
|
]);
|
|
31900
31907
|
if (isIsolated) {
|
|
31901
|
-
return (jsx("polygon", { className: `${styles.boundaryPolygon} ${styles.boundaryPolygonIsolated}`, points: pointsString, fill: fillColor, stroke: strokeColor, strokeWidth: strokeWidth, strokeLinejoin: "round"
|
|
31908
|
+
return (jsx("polygon", { className: `${styles.boundaryPolygon} ${styles.boundaryPolygonIsolated}`, points: pointsString, fill: fillColor, stroke: strokeColor, strokeWidth: strokeWidth, strokeLinejoin: "round", [PARTITION_ISOLATED_BOUNDARY_ID_ATTR]: boundaryId, onClick: onIsolatedTap
|
|
31909
|
+
? (event) => {
|
|
31910
|
+
event.stopPropagation();
|
|
31911
|
+
onIsolatedTap(boundaryId, event.clientX, event.clientY);
|
|
31912
|
+
}
|
|
31913
|
+
: undefined }));
|
|
31902
31914
|
}
|
|
31903
|
-
return (jsx("polygon", { className: styles.boundaryPolygon, points: pointsString, fill: fillColor, stroke: strokeColor, strokeWidth: strokeWidth, strokeLinejoin: "round", [PARTITION_BOUNDARY_ID_ATTR
|
|
31915
|
+
return (jsx("polygon", { className: styles.boundaryPolygon, points: pointsString, fill: fillColor, stroke: strokeColor, strokeWidth: strokeWidth, strokeLinejoin: "round", [PARTITION_BOUNDARY_ID_ATTR]: boundaryId, onMouseEnter: () => onHoverChange(boundaryId), onMouseLeave: () => onHoverChange(null), onClick: onBoundaryClick
|
|
31904
31916
|
? (event) => {
|
|
31905
31917
|
event.stopPropagation();
|
|
31906
31918
|
onBoundaryClick(boundaryId);
|
|
@@ -31909,7 +31921,7 @@ const SelectableBoundaryElement = ({ data, boundaryColors, boundaryStrokePx, isI
|
|
|
31909
31921
|
};
|
|
31910
31922
|
var SelectableBoundaryElement$1 = memo(SelectableBoundaryElement);
|
|
31911
31923
|
|
|
31912
|
-
const PartitionPickerSvg = ({ svgElementDatas, viewBox, containerWidth, containerHeight, mapRotation = 0, boundaryColors, boundaryStrokePx, isolatedBoundaryIds, selectedIds, hoveredId, onHoverChange, onBoundaryClick, }) => {
|
|
31924
|
+
const PartitionPickerSvg = ({ svgElementDatas, viewBox, containerWidth, containerHeight, mapRotation = 0, boundaryColors, boundaryStrokePx, isolatedBoundaryIds, selectedIds, hoveredId, onHoverChange, onBoundaryClick, onIsolatedTap, }) => {
|
|
31913
31925
|
const boundaries = (svgElementDatas[DataType.BOUNDARY] || []);
|
|
31914
31926
|
const channels = (svgElementDatas[DataType.CHANNEL] || []);
|
|
31915
31927
|
const selectedIdSet = useMemo(() => new Set(selectedIds), [selectedIds]);
|
|
@@ -31921,7 +31933,7 @@ const PartitionPickerSvg = ({ svgElementDatas, viewBox, containerWidth, containe
|
|
|
31921
31933
|
}, [mapRotation, viewBox.x, viewBox.y, viewBox.width, viewBox.height]);
|
|
31922
31934
|
const mapContent = (jsxs(Fragment, { children: [jsx(GElement, { type: "boundary", children: boundaries.map((item) => {
|
|
31923
31935
|
const boundaryId = Number(item.id);
|
|
31924
|
-
return (jsx(SelectableBoundaryElement$1, { data: item, boundaryColors: boundaryColors, boundaryStrokePx: boundaryStrokePx, isIsolated: isolatedBoundaryIds.has(boundaryId), selected: selectedIdSet.has(boundaryId), hovered: hoveredId === boundaryId, viewBoxWidth: viewBox.width, viewBoxHeight: viewBox.height, containerWidth: containerWidth, containerHeight: containerHeight, onHoverChange: onHoverChange, onBoundaryClick: onBoundaryClick }, item.id));
|
|
31936
|
+
return (jsx(SelectableBoundaryElement$1, { data: item, boundaryColors: boundaryColors, boundaryStrokePx: boundaryStrokePx, isIsolated: isolatedBoundaryIds.has(boundaryId), selected: selectedIdSet.has(boundaryId), hovered: hoveredId === boundaryId, viewBoxWidth: viewBox.width, viewBoxHeight: viewBox.height, containerWidth: containerWidth, containerHeight: containerHeight, onHoverChange: onHoverChange, onBoundaryClick: onBoundaryClick, onIsolatedTap: onIsolatedTap }, item.id));
|
|
31925
31937
|
}) }), jsxs(GElement, { type: "channel", children: [jsx(ChannelClipPath, {}), channels.map((item) => (jsx(ChannelElement, { data: item }, item.id)))] })] }));
|
|
31926
31938
|
return (jsx("svg", { className: styles.mapSvg, xmlns: "http://www.w3.org/2000/svg", viewBox: viewBoxToString(viewBox), width: "100%", height: "100%", preserveAspectRatio: "xMidYMid meet", shapeRendering: "geometricPrecision", children: mapContentTransform ? (jsx("g", { transform: mapContentTransform, children: mapContent })) : (mapContent) }));
|
|
31927
31939
|
};
|
|
@@ -31980,7 +31992,7 @@ const PartitionPickerGridSvg = ({ viewBox, gridStyle }) => {
|
|
|
31980
31992
|
shapeRendering: "geometricPrecision", "aria-hidden": true, children: jsx(MapGridBackground$1, { viewBox: viewBox, gridStyle: gridStyle }) }));
|
|
31981
31993
|
};
|
|
31982
31994
|
|
|
31983
|
-
const PartitionNameLabels = ({ items, selectedIds, labelStyles, platform = PlatformType.WEB, showSelectionOrder = false, rotation = 0, onHoverChange, onBoundaryClick, }) => {
|
|
31995
|
+
const PartitionNameLabels = ({ items, selectedIds, labelStyles, platform = PlatformType.WEB, showSelectionOrder = false, rotation = 0, onHoverChange, onBoundaryClick, onIsolatedTap, }) => {
|
|
31984
31996
|
const isWeb = platform === PlatformType.WEB;
|
|
31985
31997
|
const orderBadgeStyle = useMemo(() => ({
|
|
31986
31998
|
width: labelStyles.selectionOrderBadge.width,
|
|
@@ -32019,27 +32031,34 @@ const PartitionNameLabels = ({ items, selectedIds, labelStyles, platform = Platf
|
|
|
32019
32031
|
const selectionOrderGapPx = isWeb
|
|
32020
32032
|
? WEB_SELECTION_ORDER_GAP_PX
|
|
32021
32033
|
: H5_SELECTION_ORDER_GAP_PX;
|
|
32022
|
-
const boundaryIdProps = isIsolated
|
|
32034
|
+
const boundaryIdProps = isIsolated
|
|
32035
|
+
? { [PARTITION_ISOLATED_BOUNDARY_ID_ATTR]: item.id }
|
|
32036
|
+
: { [PARTITION_BOUNDARY_ID_ATTR]: item.id };
|
|
32023
32037
|
return (jsxs("div", { className: labelClassName, style: {
|
|
32024
32038
|
left: `${item.leftPct}%`,
|
|
32025
32039
|
top: `${item.topPct}%`,
|
|
32026
32040
|
transform: `translate(-50%, -50%) rotate(${-rotation}deg)`,
|
|
32027
32041
|
...(showOrderWithName ? { gap: selectionOrderGapPx } : undefined),
|
|
32028
|
-
}, ...boundaryIdProps, onMouseEnter: isIsolated ? undefined : () => onHoverChange(item.id), onMouseLeave: isIsolated ? undefined : () => onHoverChange(null), onClick:
|
|
32029
|
-
?
|
|
32030
|
-
event
|
|
32031
|
-
|
|
32032
|
-
|
|
32033
|
-
|
|
32042
|
+
}, ...boundaryIdProps, onMouseEnter: isIsolated ? undefined : () => onHoverChange(item.id), onMouseLeave: isIsolated ? undefined : () => onHoverChange(null), onClick: isIsolated
|
|
32043
|
+
? onIsolatedTap
|
|
32044
|
+
? (event) => {
|
|
32045
|
+
event.stopPropagation();
|
|
32046
|
+
onIsolatedTap(item.id, event.clientX, event.clientY);
|
|
32047
|
+
}
|
|
32048
|
+
: undefined
|
|
32049
|
+
: onBoundaryClick
|
|
32050
|
+
? (event) => {
|
|
32051
|
+
event.stopPropagation();
|
|
32052
|
+
onBoundaryClick(item.id);
|
|
32053
|
+
}
|
|
32054
|
+
: undefined, children: [showOrderBadge && (jsx("div", { className: styles.selectionOrderBadge, style: orderBadgeStyle, children: selectionOrder })), showNameLabel && (jsx("div", { className: `${styles.labelPill} ${!isWeb ? styles.labelPillH5 : ''}`, style: pillStyle, children: jsx("span", { className: `${styles.labelText} ${!isWeb ? styles.labelTextH5 : ''}`, children: item.name }) })), isIsolated && (jsx("div", { className: `${styles.isolatedIconBelow} ${isWeb ? styles.isolatedIconWeb : ''}`, dangerouslySetInnerHTML: { __html: ISOLATED_BOUNDARY_SVG } }))] }, item.id));
|
|
32034
32055
|
}) }));
|
|
32035
32056
|
};
|
|
32036
32057
|
|
|
32037
32058
|
const DEFAULT_BACKGROUND = PARTITION_PICKER_GRID_BASE_COLOR;
|
|
32038
|
-
/** 地块 polygon / 标签上的 data 属性,供 viewport 点击命中与表格联动 */
|
|
32039
|
-
const PARTITION_BOUNDARY_ID_ATTR = 'data-partition-boundary-id';
|
|
32040
32059
|
/** Map 模式下 OverlayViewF 默认 z-index */
|
|
32041
32060
|
const DEFAULT_OVERLAY_Z_INDEX = 100;
|
|
32042
|
-
const MowerPartitionPickerMap = forwardRef(({ mapJson, mapConfig, pickerStyleConfig, sn = '', platform = PlatformType.WEB, width, height, padding = 0, backgroundColor = DEFAULT_BACKGROUND, defaultTransform, mapRef, minZoom = 0.5, maxZoom = 3, enablePanZoom = true, refitOnResize = true, onSizeChange, selectedBoundaryIds, defaultSelectedBoundaryIds, onSelectionChange, hoveredBoundaryId, defaultHoveredBoundaryId, onBoundaryHoverChange, showSelectionOrder = false, zIndex = DEFAULT_OVERLAY_Z_INDEX, className, style, }, ref) => {
|
|
32061
|
+
const MowerPartitionPickerMap = forwardRef(({ mapJson, mapConfig, pickerStyleConfig, sn = '', platform = PlatformType.WEB, width, height, padding = 0, backgroundColor = DEFAULT_BACKGROUND, defaultTransform, mapRef, minZoom = 0.5, maxZoom = 3, enablePanZoom = true, refitOnResize = true, onSizeChange, selectedBoundaryIds, defaultSelectedBoundaryIds, onSelectionChange, hoveredBoundaryId, defaultHoveredBoundaryId, onBoundaryHoverChange, showSelectionOrder = false, onIsolatedBoundaryTap, zIndex = DEFAULT_OVERLAY_Z_INDEX, className, style, }, ref) => {
|
|
32043
32062
|
/**
|
|
32044
32063
|
* 是否为 Map 模式(传入 mapRef 时为 true):
|
|
32045
32064
|
* - true:Google Maps 底图 + OverlayViewF,平移/缩放/fit 由底图负责
|
|
@@ -32098,6 +32117,24 @@ const MowerPartitionPickerMap = forwardRef(({ mapJson, mapConfig, pickerStyleCon
|
|
|
32098
32117
|
}, [mapJson]);
|
|
32099
32118
|
/** 孤立地块 id 列表(未连接到主地块的子地块) */
|
|
32100
32119
|
const isolatedBoundaryIds = useIsolatedBoundaryIds(mapJson);
|
|
32120
|
+
const boundaryNameById = useMemo(() => {
|
|
32121
|
+
const names = new Map();
|
|
32122
|
+
for (const boundary of generateBoundaryData(mapJson)) {
|
|
32123
|
+
names.set(boundary.id, boundary.name);
|
|
32124
|
+
}
|
|
32125
|
+
return names;
|
|
32126
|
+
}, [mapJson]);
|
|
32127
|
+
const handleIsolatedTap = useCallback((boundaryId, clientX, clientY) => {
|
|
32128
|
+
if (!onIsolatedBoundaryTap || !isolatedBoundaryIds.has(boundaryId))
|
|
32129
|
+
return;
|
|
32130
|
+
onIsolatedBoundaryTap({
|
|
32131
|
+
boundaryId,
|
|
32132
|
+
boundaryName: boundaryNameById.get(boundaryId),
|
|
32133
|
+
clientX,
|
|
32134
|
+
clientY,
|
|
32135
|
+
});
|
|
32136
|
+
}, [boundaryNameById, isolatedBoundaryIds, onIsolatedBoundaryTap]);
|
|
32137
|
+
const isolatedTapHandler = onIsolatedBoundaryTap ? handleIsolatedTap : undefined;
|
|
32101
32138
|
/** 选中地块 id 列表(受控/非受控)与切换选中回调 */
|
|
32102
32139
|
const { selectedIds, toggleBoundary, setSelectedIds } = useBoundarySelection({
|
|
32103
32140
|
selectedBoundaryIds,
|
|
@@ -32123,7 +32160,15 @@ const MowerPartitionPickerMap = forwardRef(({ mapJson, mapConfig, pickerStyleCon
|
|
|
32123
32160
|
toggleBoundary(id);
|
|
32124
32161
|
}, [isolatedBoundaryIds, toggleBoundary]);
|
|
32125
32162
|
/** Standalone 模式:由 viewport 统一处理点击(支持在地块上拖拽平移) */
|
|
32126
|
-
const handleViewportTap = useCallback((target) => {
|
|
32163
|
+
const handleViewportTap = useCallback(({ target, clientX, clientY }) => {
|
|
32164
|
+
const isolatedEl = target.closest(`[${PARTITION_ISOLATED_BOUNDARY_ID_ATTR}]`);
|
|
32165
|
+
if (isolatedEl) {
|
|
32166
|
+
const isolatedId = Number(isolatedEl.getAttribute(PARTITION_ISOLATED_BOUNDARY_ID_ATTR));
|
|
32167
|
+
if (Number.isFinite(isolatedId) && isolatedBoundaryIds.has(isolatedId)) {
|
|
32168
|
+
handleIsolatedTap(isolatedId, clientX, clientY);
|
|
32169
|
+
}
|
|
32170
|
+
return;
|
|
32171
|
+
}
|
|
32127
32172
|
const boundaryEl = target.closest(`[${PARTITION_BOUNDARY_ID_ATTR}]`);
|
|
32128
32173
|
if (!boundaryEl)
|
|
32129
32174
|
return;
|
|
@@ -32131,7 +32176,7 @@ const MowerPartitionPickerMap = forwardRef(({ mapJson, mapConfig, pickerStyleCon
|
|
|
32131
32176
|
if (!Number.isFinite(id) || isolatedBoundaryIds.has(id))
|
|
32132
32177
|
return;
|
|
32133
32178
|
toggleBoundary(id);
|
|
32134
|
-
}, [isolatedBoundaryIds, toggleBoundary]);
|
|
32179
|
+
}, [handleIsolatedTap, isolatedBoundaryIds, toggleBoundary]);
|
|
32135
32180
|
/**
|
|
32136
32181
|
* Map 模式 overlay 状态(bounds / viewBox / fitBounds / overlayScale)。
|
|
32137
32182
|
* 无 mapRef 时 hook 内部 enabled=false,返回值不参与渲染。
|
|
@@ -32240,12 +32285,12 @@ const MowerPartitionPickerMap = forwardRef(({ mapJson, mapConfig, pickerStyleCon
|
|
|
32240
32285
|
...(isMapMode ? {} : layoutStyle),
|
|
32241
32286
|
}), [isMapMode, layoutStyle, resolvedBackgroundColor, style]);
|
|
32242
32287
|
/** 地块 + 通道 SVG;Map 模式不在 SVG 内旋转(由 OverlayViewF rotate 处理) */
|
|
32243
|
-
const mapSvgLayer = viewBox && isLayersReady ? (jsx(PartitionPickerSvg, { svgElementDatas: svgElementDatas, viewBox: viewBox, containerWidth: overlayWidth, containerHeight: overlayHeight, mapRotation: isMapMode ? 0 : actureRotate, boundaryColors: mergedPickerStyles.boundary, boundaryStrokePx: mergedPickerStyles.boundaryStrokePx, isolatedBoundaryIds: isolatedBoundaryIds, selectedIds: selectedIds, hoveredId: hoveredId, onHoverChange: handleHoverChange, onBoundaryClick: isMapMode ? handleBoundaryClick : undefined })) : null;
|
|
32288
|
+
const mapSvgLayer = viewBox && isLayersReady ? (jsx(PartitionPickerSvg, { svgElementDatas: svgElementDatas, viewBox: viewBox, containerWidth: overlayWidth, containerHeight: overlayHeight, mapRotation: isMapMode ? 0 : actureRotate, boundaryColors: mergedPickerStyles.boundary, boundaryStrokePx: mergedPickerStyles.boundaryStrokePx, isolatedBoundaryIds: isolatedBoundaryIds, selectedIds: selectedIds, hoveredId: hoveredId, onHoverChange: handleHoverChange, onBoundaryClick: isMapMode ? handleBoundaryClick : undefined, onIsolatedTap: isMapMode ? isolatedTapHandler : undefined })) : null;
|
|
32244
32289
|
/**
|
|
32245
32290
|
* 分区标签 + 充电桩 HTML 层。
|
|
32246
32291
|
* Map 模式:平铺于 overlay 根节点;Standalone:包在 mapOverlayLayer 内做 CSS 旋转。
|
|
32247
32292
|
*/
|
|
32248
|
-
const overlayLayers = viewBox && isLayersReady ? (isMapMode ? (jsxs(Fragment, { children: [jsx(PartitionNameLabels, { items: labelItems, selectedIds: selectedIds, labelStyles: mergedPickerStyles.labels, platform: platform, showSelectionOrder: showSelectionOrder, rotation: actureRotate, onHoverChange: handleHoverChange, onBoundaryClick: handleBoundaryClick }), jsx(CharginPile, { viewBox: viewBox, rotation: actureRotate })] })) : (jsxs("div", { className: styles.mapOverlayLayer, style: mapOverlayLayerStyle, children: [jsx(PartitionNameLabels, { items: labelItems, selectedIds: selectedIds, labelStyles: mergedPickerStyles.labels, platform: platform, showSelectionOrder: showSelectionOrder, rotation: actureRotate, onHoverChange: handleHoverChange }), jsx(CharginPile, { viewBox: viewBox, rotation: actureRotate, viewRotationMode: "overlay-parent", containerWidth: overlayWidth, containerHeight: overlayHeight, sizeInSvgUnits: true, minDisplaySizePx: PARTITION_PICKER_CHARGING_PILE_MIN_DISPLAY_PX })] }))) : null;
|
|
32293
|
+
const overlayLayers = viewBox && isLayersReady ? (isMapMode ? (jsxs(Fragment, { children: [jsx(PartitionNameLabels, { items: labelItems, selectedIds: selectedIds, labelStyles: mergedPickerStyles.labels, platform: platform, showSelectionOrder: showSelectionOrder, rotation: actureRotate, onHoverChange: handleHoverChange, onBoundaryClick: handleBoundaryClick, onIsolatedTap: isolatedTapHandler }), jsx(CharginPile, { viewBox: viewBox, rotation: actureRotate })] })) : (jsxs("div", { className: styles.mapOverlayLayer, style: mapOverlayLayerStyle, children: [jsx(PartitionNameLabels, { items: labelItems, selectedIds: selectedIds, labelStyles: mergedPickerStyles.labels, platform: platform, showSelectionOrder: showSelectionOrder, rotation: actureRotate, onHoverChange: handleHoverChange, onIsolatedTap: isolatedTapHandler }), jsx(CharginPile, { viewBox: viewBox, rotation: actureRotate, viewRotationMode: "overlay-parent", containerWidth: overlayWidth, containerHeight: overlayHeight, sizeInSvgUnits: true, minDisplaySizePx: PARTITION_PICKER_CHARGING_PILE_MIN_DISPLAY_PX })] }))) : null;
|
|
32249
32294
|
/** Map 模式:渲染 OverlayViewF,底图为 Google Maps */
|
|
32250
32295
|
if (isMapMode && mapRef) {
|
|
32251
32296
|
return (jsx(CommonContextProvider, { value: commonValue, children: jsx(SvgEditContextProvider, { value: svgEditValue, children: jsx(OverlayViewF, { map: mapRef, mapPaneName: "overlayMouseTarget", bounds: googleOverlay.bounds ?? undefined, rotate: actureRotate, zIndex: zIndex, onDraw: googleOverlay.handleOverlayDraw, children: jsxs("div", { className: `${styles.googleOverlayRoot} ${className || ''}`, style: containerStyle, onMouseLeave: () => setHoveredId(null), children: [mapSvgLayer, overlayLayers] }) }) }) }));
|
package/dist/index.js
CHANGED
|
@@ -30820,6 +30820,10 @@ const BoundarySvgRender = React.memo(({ mapJson, unStructMapData, id, maxWidth =
|
|
|
30820
30820
|
|
|
30821
30821
|
/** ChannelClipPath 等内容裁剪使用的 SVG 坐标边距(与用户传入的屏幕 padding 无关) */
|
|
30822
30822
|
const PARTITION_PICKER_CONTENT_CLIP_PADDING = 0;
|
|
30823
|
+
/** 可选中地块 polygon / 标签 data 属性 */
|
|
30824
|
+
const PARTITION_BOUNDARY_ID_ATTR = 'data-partition-boundary-id';
|
|
30825
|
+
/** 孤立子地块命中标记(不可选中) */
|
|
30826
|
+
const PARTITION_ISOLATED_BOUNDARY_ID_ATTR = 'data-partition-isolated-boundary-id';
|
|
30823
30827
|
/** H5:子区域屏幕宽度超过该值才展示名称标签(px) */
|
|
30824
30828
|
const H5_PARTITION_LABEL_MIN_SCREEN_WIDTH_PX = 92;
|
|
30825
30829
|
/** H5:名称气泡总宽度(px) */
|
|
@@ -31242,9 +31246,9 @@ function useMapViewport({ mapJson, containerRef: externalContainerRef, width, he
|
|
|
31242
31246
|
/** 位移是否超过 PAN_CLICK_THRESHOLD_PX,超过则视为拖拽 */
|
|
31243
31247
|
const markPanMoved = (startX, startY, currentX, currentY) => Math.hypot(currentX - startX, currentY - startY) > PAN_CLICK_THRESHOLD_PX;
|
|
31244
31248
|
/** 触发点击回调(仅当未发生拖拽时) */
|
|
31245
|
-
const emitViewportTap = (tapTarget) => {
|
|
31249
|
+
const emitViewportTap = (tapTarget, clientX, clientY) => {
|
|
31246
31250
|
if (tapTarget) {
|
|
31247
|
-
onViewportTapRef.current?.(tapTarget);
|
|
31251
|
+
onViewportTapRef.current?.({ target: tapTarget, clientX, clientY });
|
|
31248
31252
|
}
|
|
31249
31253
|
};
|
|
31250
31254
|
// ── 绑定容器交互事件:滚轮缩放 / 桌面拖拽 / H5 pinch+单指平移 ──
|
|
@@ -31270,7 +31274,7 @@ function useMapViewport({ mapJson, containerRef: externalContainerRef, width, he
|
|
|
31270
31274
|
if (event) {
|
|
31271
31275
|
const state = pointerMapRef.current.get(event.pointerId);
|
|
31272
31276
|
if (state && !state.moved && state.tapTarget) {
|
|
31273
|
-
emitViewportTap(state.tapTarget);
|
|
31277
|
+
emitViewportTap(state.tapTarget, event.clientX, event.clientY);
|
|
31274
31278
|
}
|
|
31275
31279
|
pointerMapRef.current.delete(event.pointerId);
|
|
31276
31280
|
try {
|
|
@@ -31414,13 +31418,17 @@ function useMapViewport({ mapJson, containerRef: externalContainerRef, width, he
|
|
|
31414
31418
|
if (touchState && !touchState.moved) {
|
|
31415
31419
|
let tapTarget = touchState.tapTarget;
|
|
31416
31420
|
const touch = event.changedTouches[0];
|
|
31421
|
+
let clientX = touchState.startX;
|
|
31422
|
+
let clientY = touchState.startY;
|
|
31417
31423
|
if (touch) {
|
|
31424
|
+
clientX = touch.clientX;
|
|
31425
|
+
clientY = touch.clientY;
|
|
31418
31426
|
const hitTarget = document.elementFromPoint(touch.clientX, touch.clientY);
|
|
31419
31427
|
if (hitTarget instanceof Element) {
|
|
31420
31428
|
tapTarget = hitTarget;
|
|
31421
31429
|
}
|
|
31422
31430
|
}
|
|
31423
|
-
emitViewportTap(tapTarget);
|
|
31431
|
+
emitViewportTap(tapTarget, clientX, clientY);
|
|
31424
31432
|
}
|
|
31425
31433
|
if (pinchRef.current) {
|
|
31426
31434
|
pinchRef.current = null;
|
|
@@ -31868,12 +31876,11 @@ function usePartitionLabelItems(mapData, viewBox, containerWidth, containerHeigh
|
|
|
31868
31876
|
]);
|
|
31869
31877
|
}
|
|
31870
31878
|
|
|
31871
|
-
var css_248z = "@charset \"UTF-8\";\n/* 地图容器:裁剪溢出,禁用浏览器默认 touch 手势以便自定义 pinch */\n.index-module_container__nNYv7 {\n position: relative;\n overflow: hidden;\n touch-action: none;\n user-select: none;\n cursor: grab;\n /* H5 点击时不出现矩形 tap 高亮 */\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n}\n\n/* 网格 + 地块双层 SVG 叠放,共用 viewBox 保证平移/缩放同步 */\n.index-module_mapSvgStack__nz2s2 {\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 1;\n}\n\n.index-module_gridSvg__MoJD6 {\n position: absolute;\n inset: 0;\n display: block;\n pointer-events: none;\n}\n\n/* 地图 SVG:地块/通道,可绕 viewBox 中心旋转 */\n.index-module_mapSvg__vN0LV {\n position: absolute;\n inset: 0;\n display: block;\n pointer-events: none;\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n}\n\n/*
|
|
31879
|
+
var css_248z = "@charset \"UTF-8\";\n/* 地图容器:裁剪溢出,禁用浏览器默认 touch 手势以便自定义 pinch */\n.index-module_container__nNYv7 {\n position: relative;\n overflow: hidden;\n touch-action: none;\n user-select: none;\n cursor: grab;\n /* H5 点击时不出现矩形 tap 高亮 */\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n}\n\n/* 网格 + 地块双层 SVG 叠放,共用 viewBox 保证平移/缩放同步 */\n.index-module_mapSvgStack__nz2s2 {\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 1;\n}\n\n.index-module_gridSvg__MoJD6 {\n position: absolute;\n inset: 0;\n display: block;\n pointer-events: none;\n}\n\n/* 地图 SVG:地块/通道,可绕 viewBox 中心旋转 */\n.index-module_mapSvg__vN0LV {\n position: absolute;\n inset: 0;\n display: block;\n pointer-events: none;\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n}\n\n/* 可点击地块:悬停显示 pointer,与地图容器 grab 区分 */\n.index-module_boundaryPolygon__uHe-E {\n cursor: pointer;\n pointer-events: auto;\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n outline: none;\n -webkit-touch-callout: none;\n}\n\n.index-module_container__nNYv7:active {\n cursor: grabbing;\n}\n\n/* Map 模式:OverlayViewF 内根节点,铺满 overlay 像素区域 */\n.index-module_googleOverlayRoot__TQ3II {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n overflow: visible;\n}\n\n/* HTML overlay 层:CSS rotate 与 MowerMapRenderer OverlayViewF 一致,子元素自行反向补偿 */\n.index-module_mapOverlayLayer__7jTDy {\n position: absolute;\n inset: 0;\n transform-origin: 50% 50%;\n pointer-events: none;\n z-index: 2;\n}\n\n/* 分区名气泡层,绝对定位覆盖在 SVG 之上 */\n.index-module_labelsLayer__Rcikw {\n position: absolute;\n inset: 0;\n pointer-events: none;\n}\n\n.index-module_label__xo3Kc {\n position: absolute;\n display: flex;\n flex-direction: column;\n align-items: center;\n pointer-events: auto;\n cursor: pointer;\n white-space: nowrap;\n -webkit-tap-highlight-color: transparent;\n tap-highlight-color: transparent;\n outline: none;\n -webkit-touch-callout: none;\n}\n\n.index-module_labelOrderOnly__TDLBU {\n gap: 0;\n}\n\n/* H5 名称标签:气泡宽度 / 文案最大宽度由 constants.ts 内联样式控制 */\n.index-module_labelH5Wrap__Es5cA {\n white-space: normal;\n}\n\n.index-module_labelPill__7jnOo {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: none;\n}\n\n.index-module_labelPillH5__iPeHi {\n box-sizing: border-box;\n}\n\n.index-module_labelText__ialST {\n word-break: break-word;\n text-align: center;\n}\n\n.index-module_labelTextH5__jz8SO {\n max-width: 100%;\n white-space: normal;\n overflow-wrap: anywhere;\n line-height: 1.33;\n}\n\n/* 选中序号徽章:尺寸与颜色由 constants 按 platform 注入 */\n.index-module_selectionOrderBadge__uj7LX {\n flex-shrink: 0;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.index-module_boundaryPolygonIsolated__syN4V {\n cursor: not-allowed;\n}\n\n.index-module_boundaryPolygonIsolated__syN4V:active {\n cursor: grabbing;\n}\n\n.index-module_labelIsolated__K3WAB {\n cursor: not-allowed;\n pointer-events: auto;\n}\n\n.index-module_labelIsolated__K3WAB:active {\n cursor: grabbing;\n}\n\n.index-module_labelIsolatedLayout__k-rwI {\n gap: 4px;\n}\n\n.index-module_isolatedIconBelow__PuVIF {\n position: static;\n transform: none;\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n pointer-events: none;\n}\n\n.index-module_isolatedIconBelow__PuVIF.index-module_isolatedIconWeb__iPkYp {\n width: 20px;\n height: 20px;\n}\n\n.index-module_isolatedIcon__Vbxl0 {\n position: absolute;\n width: 24px;\n height: 24px;\n left: 50%;\n bottom: calc(100% + 4px);\n transform: translateX(-50%);\n}\n\n.index-module_isolatedIconWeb__iPkYp {\n width: 20px;\n height: 20px;\n bottom: calc(100% + 2px);\n}";
|
|
31872
31880
|
var styles = {"container":"index-module_container__nNYv7","mapSvgStack":"index-module_mapSvgStack__nz2s2","gridSvg":"index-module_gridSvg__MoJD6","mapSvg":"index-module_mapSvg__vN0LV","boundaryPolygon":"index-module_boundaryPolygon__uHe-E","googleOverlayRoot":"index-module_googleOverlayRoot__TQ3II","mapOverlayLayer":"index-module_mapOverlayLayer__7jTDy","labelsLayer":"index-module_labelsLayer__Rcikw","label":"index-module_label__xo3Kc","labelOrderOnly":"index-module_labelOrderOnly__TDLBU","labelH5Wrap":"index-module_labelH5Wrap__Es5cA","labelPill":"index-module_labelPill__7jnOo","labelPillH5":"index-module_labelPillH5__iPeHi","labelText":"index-module_labelText__ialST","labelTextH5":"index-module_labelTextH5__jz8SO","selectionOrderBadge":"index-module_selectionOrderBadge__uj7LX","boundaryPolygonIsolated":"index-module_boundaryPolygonIsolated__syN4V","labelIsolated":"index-module_labelIsolated__K3WAB","labelIsolatedLayout":"index-module_labelIsolatedLayout__k-rwI","isolatedIconBelow":"index-module_isolatedIconBelow__PuVIF","isolatedIconWeb":"index-module_isolatedIconWeb__iPkYp"};
|
|
31873
31881
|
styleInject(css_248z);
|
|
31874
31882
|
|
|
31875
|
-
const
|
|
31876
|
-
const SelectableBoundaryElement = ({ data, boundaryColors, boundaryStrokePx, isIsolated = false, selected, hovered, viewBoxWidth, viewBoxHeight, containerWidth, containerHeight, onHoverChange, onBoundaryClick, }) => {
|
|
31883
|
+
const SelectableBoundaryElement = ({ data, boundaryColors, boundaryStrokePx, isIsolated = false, selected, hovered, viewBoxWidth, viewBoxHeight, containerWidth, containerHeight, onHoverChange, onBoundaryClick, onIsolatedTap, }) => {
|
|
31877
31884
|
const style = data.style || {};
|
|
31878
31885
|
const boundaryId = Number(data.id);
|
|
31879
31886
|
const colors = boundaryColors;
|
|
@@ -31918,9 +31925,14 @@ const SelectableBoundaryElement = ({ data, boundaryColors, boundaryStrokePx, isI
|
|
|
31918
31925
|
viewBoxWidth,
|
|
31919
31926
|
]);
|
|
31920
31927
|
if (isIsolated) {
|
|
31921
|
-
return (jsxRuntime.jsx("polygon", { className: `${styles.boundaryPolygon} ${styles.boundaryPolygonIsolated}`, points: pointsString, fill: fillColor, stroke: strokeColor, strokeWidth: strokeWidth, strokeLinejoin: "round"
|
|
31928
|
+
return (jsxRuntime.jsx("polygon", { className: `${styles.boundaryPolygon} ${styles.boundaryPolygonIsolated}`, points: pointsString, fill: fillColor, stroke: strokeColor, strokeWidth: strokeWidth, strokeLinejoin: "round", [PARTITION_ISOLATED_BOUNDARY_ID_ATTR]: boundaryId, onClick: onIsolatedTap
|
|
31929
|
+
? (event) => {
|
|
31930
|
+
event.stopPropagation();
|
|
31931
|
+
onIsolatedTap(boundaryId, event.clientX, event.clientY);
|
|
31932
|
+
}
|
|
31933
|
+
: undefined }));
|
|
31922
31934
|
}
|
|
31923
|
-
return (jsxRuntime.jsx("polygon", { className: styles.boundaryPolygon, points: pointsString, fill: fillColor, stroke: strokeColor, strokeWidth: strokeWidth, strokeLinejoin: "round", [PARTITION_BOUNDARY_ID_ATTR
|
|
31935
|
+
return (jsxRuntime.jsx("polygon", { className: styles.boundaryPolygon, points: pointsString, fill: fillColor, stroke: strokeColor, strokeWidth: strokeWidth, strokeLinejoin: "round", [PARTITION_BOUNDARY_ID_ATTR]: boundaryId, onMouseEnter: () => onHoverChange(boundaryId), onMouseLeave: () => onHoverChange(null), onClick: onBoundaryClick
|
|
31924
31936
|
? (event) => {
|
|
31925
31937
|
event.stopPropagation();
|
|
31926
31938
|
onBoundaryClick(boundaryId);
|
|
@@ -31929,7 +31941,7 @@ const SelectableBoundaryElement = ({ data, boundaryColors, boundaryStrokePx, isI
|
|
|
31929
31941
|
};
|
|
31930
31942
|
var SelectableBoundaryElement$1 = React.memo(SelectableBoundaryElement);
|
|
31931
31943
|
|
|
31932
|
-
const PartitionPickerSvg = ({ svgElementDatas, viewBox, containerWidth, containerHeight, mapRotation = 0, boundaryColors, boundaryStrokePx, isolatedBoundaryIds, selectedIds, hoveredId, onHoverChange, onBoundaryClick, }) => {
|
|
31944
|
+
const PartitionPickerSvg = ({ svgElementDatas, viewBox, containerWidth, containerHeight, mapRotation = 0, boundaryColors, boundaryStrokePx, isolatedBoundaryIds, selectedIds, hoveredId, onHoverChange, onBoundaryClick, onIsolatedTap, }) => {
|
|
31933
31945
|
const boundaries = (svgElementDatas[exports.DataType.BOUNDARY] || []);
|
|
31934
31946
|
const channels = (svgElementDatas[exports.DataType.CHANNEL] || []);
|
|
31935
31947
|
const selectedIdSet = React.useMemo(() => new Set(selectedIds), [selectedIds]);
|
|
@@ -31941,7 +31953,7 @@ const PartitionPickerSvg = ({ svgElementDatas, viewBox, containerWidth, containe
|
|
|
31941
31953
|
}, [mapRotation, viewBox.x, viewBox.y, viewBox.width, viewBox.height]);
|
|
31942
31954
|
const mapContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(GElement, { type: "boundary", children: boundaries.map((item) => {
|
|
31943
31955
|
const boundaryId = Number(item.id);
|
|
31944
|
-
return (jsxRuntime.jsx(SelectableBoundaryElement$1, { data: item, boundaryColors: boundaryColors, boundaryStrokePx: boundaryStrokePx, isIsolated: isolatedBoundaryIds.has(boundaryId), selected: selectedIdSet.has(boundaryId), hovered: hoveredId === boundaryId, viewBoxWidth: viewBox.width, viewBoxHeight: viewBox.height, containerWidth: containerWidth, containerHeight: containerHeight, onHoverChange: onHoverChange, onBoundaryClick: onBoundaryClick }, item.id));
|
|
31956
|
+
return (jsxRuntime.jsx(SelectableBoundaryElement$1, { data: item, boundaryColors: boundaryColors, boundaryStrokePx: boundaryStrokePx, isIsolated: isolatedBoundaryIds.has(boundaryId), selected: selectedIdSet.has(boundaryId), hovered: hoveredId === boundaryId, viewBoxWidth: viewBox.width, viewBoxHeight: viewBox.height, containerWidth: containerWidth, containerHeight: containerHeight, onHoverChange: onHoverChange, onBoundaryClick: onBoundaryClick, onIsolatedTap: onIsolatedTap }, item.id));
|
|
31945
31957
|
}) }), jsxRuntime.jsxs(GElement, { type: "channel", children: [jsxRuntime.jsx(ChannelClipPath, {}), channels.map((item) => (jsxRuntime.jsx(ChannelElement, { data: item }, item.id)))] })] }));
|
|
31946
31958
|
return (jsxRuntime.jsx("svg", { className: styles.mapSvg, xmlns: "http://www.w3.org/2000/svg", viewBox: viewBoxToString(viewBox), width: "100%", height: "100%", preserveAspectRatio: "xMidYMid meet", shapeRendering: "geometricPrecision", children: mapContentTransform ? (jsxRuntime.jsx("g", { transform: mapContentTransform, children: mapContent })) : (mapContent) }));
|
|
31947
31959
|
};
|
|
@@ -32000,7 +32012,7 @@ const PartitionPickerGridSvg = ({ viewBox, gridStyle }) => {
|
|
|
32000
32012
|
shapeRendering: "geometricPrecision", "aria-hidden": true, children: jsxRuntime.jsx(MapGridBackground$1, { viewBox: viewBox, gridStyle: gridStyle }) }));
|
|
32001
32013
|
};
|
|
32002
32014
|
|
|
32003
|
-
const PartitionNameLabels = ({ items, selectedIds, labelStyles, platform = exports.PlatformType.WEB, showSelectionOrder = false, rotation = 0, onHoverChange, onBoundaryClick, }) => {
|
|
32015
|
+
const PartitionNameLabels = ({ items, selectedIds, labelStyles, platform = exports.PlatformType.WEB, showSelectionOrder = false, rotation = 0, onHoverChange, onBoundaryClick, onIsolatedTap, }) => {
|
|
32004
32016
|
const isWeb = platform === exports.PlatformType.WEB;
|
|
32005
32017
|
const orderBadgeStyle = React.useMemo(() => ({
|
|
32006
32018
|
width: labelStyles.selectionOrderBadge.width,
|
|
@@ -32039,27 +32051,34 @@ const PartitionNameLabels = ({ items, selectedIds, labelStyles, platform = expor
|
|
|
32039
32051
|
const selectionOrderGapPx = isWeb
|
|
32040
32052
|
? WEB_SELECTION_ORDER_GAP_PX
|
|
32041
32053
|
: H5_SELECTION_ORDER_GAP_PX;
|
|
32042
|
-
const boundaryIdProps = isIsolated
|
|
32054
|
+
const boundaryIdProps = isIsolated
|
|
32055
|
+
? { [PARTITION_ISOLATED_BOUNDARY_ID_ATTR]: item.id }
|
|
32056
|
+
: { [PARTITION_BOUNDARY_ID_ATTR]: item.id };
|
|
32043
32057
|
return (jsxRuntime.jsxs("div", { className: labelClassName, style: {
|
|
32044
32058
|
left: `${item.leftPct}%`,
|
|
32045
32059
|
top: `${item.topPct}%`,
|
|
32046
32060
|
transform: `translate(-50%, -50%) rotate(${-rotation}deg)`,
|
|
32047
32061
|
...(showOrderWithName ? { gap: selectionOrderGapPx } : undefined),
|
|
32048
|
-
}, ...boundaryIdProps, onMouseEnter: isIsolated ? undefined : () => onHoverChange(item.id), onMouseLeave: isIsolated ? undefined : () => onHoverChange(null), onClick:
|
|
32049
|
-
?
|
|
32050
|
-
event
|
|
32051
|
-
|
|
32052
|
-
|
|
32053
|
-
|
|
32062
|
+
}, ...boundaryIdProps, onMouseEnter: isIsolated ? undefined : () => onHoverChange(item.id), onMouseLeave: isIsolated ? undefined : () => onHoverChange(null), onClick: isIsolated
|
|
32063
|
+
? onIsolatedTap
|
|
32064
|
+
? (event) => {
|
|
32065
|
+
event.stopPropagation();
|
|
32066
|
+
onIsolatedTap(item.id, event.clientX, event.clientY);
|
|
32067
|
+
}
|
|
32068
|
+
: undefined
|
|
32069
|
+
: onBoundaryClick
|
|
32070
|
+
? (event) => {
|
|
32071
|
+
event.stopPropagation();
|
|
32072
|
+
onBoundaryClick(item.id);
|
|
32073
|
+
}
|
|
32074
|
+
: undefined, children: [showOrderBadge && (jsxRuntime.jsx("div", { className: styles.selectionOrderBadge, style: orderBadgeStyle, children: selectionOrder })), showNameLabel && (jsxRuntime.jsx("div", { className: `${styles.labelPill} ${!isWeb ? styles.labelPillH5 : ''}`, style: pillStyle, children: jsxRuntime.jsx("span", { className: `${styles.labelText} ${!isWeb ? styles.labelTextH5 : ''}`, children: item.name }) })), isIsolated && (jsxRuntime.jsx("div", { className: `${styles.isolatedIconBelow} ${isWeb ? styles.isolatedIconWeb : ''}`, dangerouslySetInnerHTML: { __html: ISOLATED_BOUNDARY_SVG } }))] }, item.id));
|
|
32054
32075
|
}) }));
|
|
32055
32076
|
};
|
|
32056
32077
|
|
|
32057
32078
|
const DEFAULT_BACKGROUND = PARTITION_PICKER_GRID_BASE_COLOR;
|
|
32058
|
-
/** 地块 polygon / 标签上的 data 属性,供 viewport 点击命中与表格联动 */
|
|
32059
|
-
const PARTITION_BOUNDARY_ID_ATTR = 'data-partition-boundary-id';
|
|
32060
32079
|
/** Map 模式下 OverlayViewF 默认 z-index */
|
|
32061
32080
|
const DEFAULT_OVERLAY_Z_INDEX = 100;
|
|
32062
|
-
const MowerPartitionPickerMap = React.forwardRef(({ mapJson, mapConfig, pickerStyleConfig, sn = '', platform = exports.PlatformType.WEB, width, height, padding = 0, backgroundColor = DEFAULT_BACKGROUND, defaultTransform, mapRef, minZoom = 0.5, maxZoom = 3, enablePanZoom = true, refitOnResize = true, onSizeChange, selectedBoundaryIds, defaultSelectedBoundaryIds, onSelectionChange, hoveredBoundaryId, defaultHoveredBoundaryId, onBoundaryHoverChange, showSelectionOrder = false, zIndex = DEFAULT_OVERLAY_Z_INDEX, className, style, }, ref) => {
|
|
32081
|
+
const MowerPartitionPickerMap = React.forwardRef(({ mapJson, mapConfig, pickerStyleConfig, sn = '', platform = exports.PlatformType.WEB, width, height, padding = 0, backgroundColor = DEFAULT_BACKGROUND, defaultTransform, mapRef, minZoom = 0.5, maxZoom = 3, enablePanZoom = true, refitOnResize = true, onSizeChange, selectedBoundaryIds, defaultSelectedBoundaryIds, onSelectionChange, hoveredBoundaryId, defaultHoveredBoundaryId, onBoundaryHoverChange, showSelectionOrder = false, onIsolatedBoundaryTap, zIndex = DEFAULT_OVERLAY_Z_INDEX, className, style, }, ref) => {
|
|
32063
32082
|
/**
|
|
32064
32083
|
* 是否为 Map 模式(传入 mapRef 时为 true):
|
|
32065
32084
|
* - true:Google Maps 底图 + OverlayViewF,平移/缩放/fit 由底图负责
|
|
@@ -32118,6 +32137,24 @@ const MowerPartitionPickerMap = React.forwardRef(({ mapJson, mapConfig, pickerSt
|
|
|
32118
32137
|
}, [mapJson]);
|
|
32119
32138
|
/** 孤立地块 id 列表(未连接到主地块的子地块) */
|
|
32120
32139
|
const isolatedBoundaryIds = useIsolatedBoundaryIds(mapJson);
|
|
32140
|
+
const boundaryNameById = React.useMemo(() => {
|
|
32141
|
+
const names = new Map();
|
|
32142
|
+
for (const boundary of generateBoundaryData(mapJson)) {
|
|
32143
|
+
names.set(boundary.id, boundary.name);
|
|
32144
|
+
}
|
|
32145
|
+
return names;
|
|
32146
|
+
}, [mapJson]);
|
|
32147
|
+
const handleIsolatedTap = React.useCallback((boundaryId, clientX, clientY) => {
|
|
32148
|
+
if (!onIsolatedBoundaryTap || !isolatedBoundaryIds.has(boundaryId))
|
|
32149
|
+
return;
|
|
32150
|
+
onIsolatedBoundaryTap({
|
|
32151
|
+
boundaryId,
|
|
32152
|
+
boundaryName: boundaryNameById.get(boundaryId),
|
|
32153
|
+
clientX,
|
|
32154
|
+
clientY,
|
|
32155
|
+
});
|
|
32156
|
+
}, [boundaryNameById, isolatedBoundaryIds, onIsolatedBoundaryTap]);
|
|
32157
|
+
const isolatedTapHandler = onIsolatedBoundaryTap ? handleIsolatedTap : undefined;
|
|
32121
32158
|
/** 选中地块 id 列表(受控/非受控)与切换选中回调 */
|
|
32122
32159
|
const { selectedIds, toggleBoundary, setSelectedIds } = useBoundarySelection({
|
|
32123
32160
|
selectedBoundaryIds,
|
|
@@ -32143,7 +32180,15 @@ const MowerPartitionPickerMap = React.forwardRef(({ mapJson, mapConfig, pickerSt
|
|
|
32143
32180
|
toggleBoundary(id);
|
|
32144
32181
|
}, [isolatedBoundaryIds, toggleBoundary]);
|
|
32145
32182
|
/** Standalone 模式:由 viewport 统一处理点击(支持在地块上拖拽平移) */
|
|
32146
|
-
const handleViewportTap = React.useCallback((target) => {
|
|
32183
|
+
const handleViewportTap = React.useCallback(({ target, clientX, clientY }) => {
|
|
32184
|
+
const isolatedEl = target.closest(`[${PARTITION_ISOLATED_BOUNDARY_ID_ATTR}]`);
|
|
32185
|
+
if (isolatedEl) {
|
|
32186
|
+
const isolatedId = Number(isolatedEl.getAttribute(PARTITION_ISOLATED_BOUNDARY_ID_ATTR));
|
|
32187
|
+
if (Number.isFinite(isolatedId) && isolatedBoundaryIds.has(isolatedId)) {
|
|
32188
|
+
handleIsolatedTap(isolatedId, clientX, clientY);
|
|
32189
|
+
}
|
|
32190
|
+
return;
|
|
32191
|
+
}
|
|
32147
32192
|
const boundaryEl = target.closest(`[${PARTITION_BOUNDARY_ID_ATTR}]`);
|
|
32148
32193
|
if (!boundaryEl)
|
|
32149
32194
|
return;
|
|
@@ -32151,7 +32196,7 @@ const MowerPartitionPickerMap = React.forwardRef(({ mapJson, mapConfig, pickerSt
|
|
|
32151
32196
|
if (!Number.isFinite(id) || isolatedBoundaryIds.has(id))
|
|
32152
32197
|
return;
|
|
32153
32198
|
toggleBoundary(id);
|
|
32154
|
-
}, [isolatedBoundaryIds, toggleBoundary]);
|
|
32199
|
+
}, [handleIsolatedTap, isolatedBoundaryIds, toggleBoundary]);
|
|
32155
32200
|
/**
|
|
32156
32201
|
* Map 模式 overlay 状态(bounds / viewBox / fitBounds / overlayScale)。
|
|
32157
32202
|
* 无 mapRef 时 hook 内部 enabled=false,返回值不参与渲染。
|
|
@@ -32260,12 +32305,12 @@ const MowerPartitionPickerMap = React.forwardRef(({ mapJson, mapConfig, pickerSt
|
|
|
32260
32305
|
...(isMapMode ? {} : layoutStyle),
|
|
32261
32306
|
}), [isMapMode, layoutStyle, resolvedBackgroundColor, style]);
|
|
32262
32307
|
/** 地块 + 通道 SVG;Map 模式不在 SVG 内旋转(由 OverlayViewF rotate 处理) */
|
|
32263
|
-
const mapSvgLayer = viewBox && isLayersReady ? (jsxRuntime.jsx(PartitionPickerSvg, { svgElementDatas: svgElementDatas, viewBox: viewBox, containerWidth: overlayWidth, containerHeight: overlayHeight, mapRotation: isMapMode ? 0 : actureRotate, boundaryColors: mergedPickerStyles.boundary, boundaryStrokePx: mergedPickerStyles.boundaryStrokePx, isolatedBoundaryIds: isolatedBoundaryIds, selectedIds: selectedIds, hoveredId: hoveredId, onHoverChange: handleHoverChange, onBoundaryClick: isMapMode ? handleBoundaryClick : undefined })) : null;
|
|
32308
|
+
const mapSvgLayer = viewBox && isLayersReady ? (jsxRuntime.jsx(PartitionPickerSvg, { svgElementDatas: svgElementDatas, viewBox: viewBox, containerWidth: overlayWidth, containerHeight: overlayHeight, mapRotation: isMapMode ? 0 : actureRotate, boundaryColors: mergedPickerStyles.boundary, boundaryStrokePx: mergedPickerStyles.boundaryStrokePx, isolatedBoundaryIds: isolatedBoundaryIds, selectedIds: selectedIds, hoveredId: hoveredId, onHoverChange: handleHoverChange, onBoundaryClick: isMapMode ? handleBoundaryClick : undefined, onIsolatedTap: isMapMode ? isolatedTapHandler : undefined })) : null;
|
|
32264
32309
|
/**
|
|
32265
32310
|
* 分区标签 + 充电桩 HTML 层。
|
|
32266
32311
|
* Map 模式:平铺于 overlay 根节点;Standalone:包在 mapOverlayLayer 内做 CSS 旋转。
|
|
32267
32312
|
*/
|
|
32268
|
-
const overlayLayers = viewBox && isLayersReady ? (isMapMode ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(PartitionNameLabels, { items: labelItems, selectedIds: selectedIds, labelStyles: mergedPickerStyles.labels, platform: platform, showSelectionOrder: showSelectionOrder, rotation: actureRotate, onHoverChange: handleHoverChange, onBoundaryClick: handleBoundaryClick }), jsxRuntime.jsx(CharginPile, { viewBox: viewBox, rotation: actureRotate })] })) : (jsxRuntime.jsxs("div", { className: styles.mapOverlayLayer, style: mapOverlayLayerStyle, children: [jsxRuntime.jsx(PartitionNameLabels, { items: labelItems, selectedIds: selectedIds, labelStyles: mergedPickerStyles.labels, platform: platform, showSelectionOrder: showSelectionOrder, rotation: actureRotate, onHoverChange: handleHoverChange }), jsxRuntime.jsx(CharginPile, { viewBox: viewBox, rotation: actureRotate, viewRotationMode: "overlay-parent", containerWidth: overlayWidth, containerHeight: overlayHeight, sizeInSvgUnits: true, minDisplaySizePx: PARTITION_PICKER_CHARGING_PILE_MIN_DISPLAY_PX })] }))) : null;
|
|
32313
|
+
const overlayLayers = viewBox && isLayersReady ? (isMapMode ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(PartitionNameLabels, { items: labelItems, selectedIds: selectedIds, labelStyles: mergedPickerStyles.labels, platform: platform, showSelectionOrder: showSelectionOrder, rotation: actureRotate, onHoverChange: handleHoverChange, onBoundaryClick: handleBoundaryClick, onIsolatedTap: isolatedTapHandler }), jsxRuntime.jsx(CharginPile, { viewBox: viewBox, rotation: actureRotate })] })) : (jsxRuntime.jsxs("div", { className: styles.mapOverlayLayer, style: mapOverlayLayerStyle, children: [jsxRuntime.jsx(PartitionNameLabels, { items: labelItems, selectedIds: selectedIds, labelStyles: mergedPickerStyles.labels, platform: platform, showSelectionOrder: showSelectionOrder, rotation: actureRotate, onHoverChange: handleHoverChange, onIsolatedTap: isolatedTapHandler }), jsxRuntime.jsx(CharginPile, { viewBox: viewBox, rotation: actureRotate, viewRotationMode: "overlay-parent", containerWidth: overlayWidth, containerHeight: overlayHeight, sizeInSvgUnits: true, minDisplaySizePx: PARTITION_PICKER_CHARGING_PILE_MIN_DISPLAY_PX })] }))) : null;
|
|
32269
32314
|
/** Map 模式:渲染 OverlayViewF,底图为 Google Maps */
|
|
32270
32315
|
if (isMapMode && mapRef) {
|
|
32271
32316
|
return (jsxRuntime.jsx(CommonContextProvider, { value: commonValue, children: jsxRuntime.jsx(SvgEditContextProvider, { value: svgEditValue, children: jsxRuntime.jsx(OverlayViewF, { map: mapRef, mapPaneName: "overlayMouseTarget", bounds: googleOverlay.bounds ?? undefined, rotate: actureRotate, zIndex: zIndex, onDraw: googleOverlay.handleOverlayDraw, children: jsxRuntime.jsxs("div", { className: `${styles.googleOverlayRoot} ${className || ''}`, style: containerStyle, onMouseLeave: () => setHoveredId(null), children: [mapSvgLayer, overlayLayers] }) }) }) }));
|
|
@@ -11,7 +11,7 @@ import React from 'react';
|
|
|
11
11
|
import { MowerPartitionPickerMapProps, MowerPartitionPickerMapRef } from './partitionPicker/types';
|
|
12
12
|
export declare const MowerPartitionPickerMap: React.ForwardRefExoticComponent<MowerPartitionPickerMapProps & React.RefAttributes<MowerPartitionPickerMapRef>>;
|
|
13
13
|
export default MowerPartitionPickerMap;
|
|
14
|
-
export type { MowerPartitionPickerMapProps, MowerPartitionPickerMapRef, CssLength, } from './partitionPicker/types';
|
|
14
|
+
export type { MowerPartitionPickerMapProps, MowerPartitionPickerMapRef, CssLength, IsolatedBoundaryTapPayload, } from './partitionPicker/types';
|
|
15
15
|
export type { PartitionPickerStyleConfig, PartitionPickerBoundaryColors, PartitionPickerLabelStyles, PartitionPickerGridStyle, ResolvedPartitionPickerStyles, } from './partitionPicker/constants';
|
|
16
16
|
export { resolvePartitionPickerStyles, getPartitionPickerColors, getPartitionPickerLabelStyles, PARTITION_PICKER_COLORS_WEB, PARTITION_PICKER_COLORS_H5, PARTITION_PICKER_LABEL_STYLES_WEB, PARTITION_PICKER_LABEL_STYLES_H5, } from './partitionPicker/constants';
|
|
17
17
|
//# sourceMappingURL=MowerPartitionPickerMap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MowerPartitionPickerMap.d.ts","sourceRoot":"","sources":["../../src/render/MowerPartitionPickerMap.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAON,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MowerPartitionPickerMap.d.ts","sourceRoot":"","sources":["../../src/render/MowerPartitionPickerMap.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAON,MAAM,OAAO,CAAC;AAqBf,OAAO,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAiBnG,eAAO,MAAM,uBAAuB,iHA8cnC,CAAC;AAIF,eAAe,uBAAuB,CAAC;AAEvC,YAAY,EACV,4BAA4B,EAC5B,0BAA0B,EAC1B,SAAS,EACT,0BAA0B,GAC3B,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,0BAA0B,EAC1B,6BAA6B,EAC7B,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,6BAA6B,EAC7B,2BAA2B,EAC3B,0BAA0B,EAC1B,iCAAiC,EACjC,gCAAgC,GACjC,MAAM,6BAA6B,CAAC"}
|
|
@@ -2,6 +2,10 @@ import { CSSProperties } from 'react';
|
|
|
2
2
|
import { MapConfig, PlatformType } from '../../types';
|
|
3
3
|
/** ChannelClipPath 等内容裁剪使用的 SVG 坐标边距(与用户传入的屏幕 padding 无关) */
|
|
4
4
|
export declare const PARTITION_PICKER_CONTENT_CLIP_PADDING = 0;
|
|
5
|
+
/** 可选中地块 polygon / 标签 data 属性 */
|
|
6
|
+
export declare const PARTITION_BOUNDARY_ID_ATTR = "data-partition-boundary-id";
|
|
7
|
+
/** 孤立子地块命中标记(不可选中) */
|
|
8
|
+
export declare const PARTITION_ISOLATED_BOUNDARY_ID_ATTR = "data-partition-isolated-boundary-id";
|
|
5
9
|
/** H5:子区域屏幕宽度超过该值才展示名称标签(px) */
|
|
6
10
|
export declare const H5_PARTITION_LABEL_MIN_SCREEN_WIDTH_PX = 92;
|
|
7
11
|
/** H5:名称气泡总宽度(px) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/render/partitionPicker/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEtD,6DAA6D;AAC7D,eAAO,MAAM,qCAAqC,IAAI,CAAC;AAEvD,gCAAgC;AAChC,eAAO,MAAM,sCAAsC,KAAK,CAAC;AAEzD,qBAAqB;AACrB,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAE9C,wEAAwE;AACxE,eAAO,MAAM,oCAAoC,KAAK,CAAC;AAEvD,0BAA0B;AAC1B,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C,yBAAyB;AACzB,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C,kEAAkE;AAClE,eAAO,MAAM,6CAA6C,KAAK,CAAC;AAEhE,oCAAoC;AACpC,eAAO,MAAM,gCAAgC;;;CAGnC,CAAC;AAEX,+BAA+B;AAC/B,eAAO,MAAM,+BAA+B;;;CAGlC,CAAC;AAEX;;;GAGG;AACH,gCAAgC;AAChC,eAAO,MAAM,gCAAgC,YAAY,CAAC;AAE1D,iDAAiD;AACjD,eAAO,MAAM,+BAA+B,KAAK,CAAC;AAElD,sCAAsC;AACtC,eAAO,MAAM,gCAAgC,MAAM,CAAC;AAEpD,qBA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EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,mCAAmC,EAAE,wBAQjD,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAClD,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,SAAS,CAAC,CAAC,CAAC;QACzD,QAAQ,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,UAAU,CAAC,CAAC,CAAC;QAC3D,mBAAmB,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,qBAAqB,CAAC,CAAC,CAAC;KAClF,CAAC;IACF,IAAI,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACzC,gBAAgB,CAAC,EAAE,OAAO,CAAC,+BAA+B,CAAC,CAAC;CAC7D;AAED,MAAM,WAAW,6BAA6B;IAC5C,oDAAoD;IACpD,QAAQ,EAAE,6BAA6B,CAAC;IACxC,uBAAuB;IACvB,MAAM,EAAE,0BAA0B,CAAC;IACnC,0BAA0B;IAC1B,IAAI,EAAE,wBAAwB,CAAC;IAC/B,gBAAgB,EAAE,+BAA+B,CAAC;CACnD;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,GAAE,YAA+B,EACzC,MAAM,CAAC,EAAE,0BAA0B,GAClC,6BAA6B,CAuB/B"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { type RefObject } from 'react';
|
|
2
2
|
import { MapData } from '@/types';
|
|
3
3
|
import { ViewBox, ScreenPaddingInput } from '../types';
|
|
4
|
+
/** Standalone 模式下容器内轻触/点击命中结果(未发生明显拖拽时) */
|
|
5
|
+
export interface ViewportTapPayload {
|
|
6
|
+
/** pointerdown / touchstart 时命中的 DOM 元素(touchend 时会用 elementFromPoint 修正) */
|
|
7
|
+
target: Element;
|
|
8
|
+
/** 抬起时指针相对视口的 X 坐标(px) */
|
|
9
|
+
clientX: number;
|
|
10
|
+
/** 抬起时指针相对视口的 Y 坐标(px) */
|
|
11
|
+
clientY: number;
|
|
12
|
+
}
|
|
4
13
|
interface UseMapViewportOptions {
|
|
5
14
|
/** 地图 JSON 数据,用于计算包围盒与初始 fit */
|
|
6
15
|
mapJson: MapData;
|
|
@@ -21,7 +30,7 @@ interface UseMapViewportOptions {
|
|
|
21
30
|
/** 容器尺寸变化时是否重新 fit,默认 true */
|
|
22
31
|
refitOnResize?: boolean;
|
|
23
32
|
/** 在容器内按下并抬起且未发生明显位移时触发(用于地块点击选中) */
|
|
24
|
-
onViewportTap?: (
|
|
33
|
+
onViewportTap?: (payload: ViewportTapPayload) => void;
|
|
25
34
|
/** 地图内容旋转角(度),用于修正平移方向与屏幕手势一致 */
|
|
26
35
|
mapRotationDeg?: number;
|
|
27
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMapViewport.d.ts","sourceRoot":"","sources":["../../../../src/render/partitionPicker/hooks/useMapViewport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAWvD,UAAU,qBAAqB;IAC7B,gCAAgC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAChD,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,OAAO,EAAE,kBAAkB,CAAC;IAC5B,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,8BAA8B;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qCAAqC;IACrC,aAAa,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"useMapViewport.d.ts","sourceRoot":"","sources":["../../../../src/render/partitionPicker/hooks/useMapViewport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAWvD,2CAA2C;AAC3C,MAAM,WAAW,kBAAkB;IACjC,6EAA6E;IAC7E,MAAM,EAAE,OAAO,CAAC;IAChB,0BAA0B;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,qBAAqB;IAC7B,gCAAgC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAChD,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,OAAO,EAAE,kBAAkB,CAAC;IAC5B,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,8BAA8B;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qCAAqC;IACrC,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACtD,iCAAiC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AA0CD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,YAAY,EAAE,oBAAoB,EAClC,KAAK,EACL,MAAM,EACN,OAAO,EACP,OAAa,EACb,OAAW,EACX,aAAoB,EACpB,aAAoB,EACpB,aAAa,EACb,cAAkB,GACnB,EAAE,qBAAqB;IA4hBpB,qBAAqB;;IAErB,gCAAgC;;IAEhC,oCAAoC;;IAEpC,6CAA6C;;IAE7C,mBAAmB;;IAEnB,gCAAgC;8BAxUjB,kBAAkB;EA2UpC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PlatformType } from '@/types';
|
|
2
|
-
import { PartitionLabelItem } from '../hooks/usePartitionLabelItems';
|
|
3
2
|
import { PartitionPickerLabelStyles } from '../constants';
|
|
3
|
+
import { PartitionLabelItem } from '../hooks/usePartitionLabelItems';
|
|
4
4
|
interface PartitionNameLabelsProps {
|
|
5
5
|
items: PartitionLabelItem[];
|
|
6
6
|
selectedIds: number[];
|
|
@@ -13,7 +13,9 @@ interface PartitionNameLabelsProps {
|
|
|
13
13
|
onHoverChange: (id: number | null) => void;
|
|
14
14
|
/** Map 模式:点击标签切换选中(Standalone 由 viewport 统一处理) */
|
|
15
15
|
onBoundaryClick?: (id: number) => void;
|
|
16
|
+
/** 点击孤立子地块标签或图标(Map 模式直接点击;Standalone 由 viewport 处理) */
|
|
17
|
+
onIsolatedTap?: (id: number, clientX: number, clientY: number) => void;
|
|
16
18
|
}
|
|
17
|
-
declare const PartitionNameLabels: ({ items, selectedIds, labelStyles, platform, showSelectionOrder, rotation, onHoverChange, onBoundaryClick, }: PartitionNameLabelsProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare const PartitionNameLabels: ({ items, selectedIds, labelStyles, platform, showSelectionOrder, rotation, onHoverChange, onBoundaryClick, onIsolatedTap, }: PartitionNameLabelsProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
20
|
export default PartitionNameLabels;
|
|
19
21
|
//# sourceMappingURL=PartitionNameLabels.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PartitionNameLabels.d.ts","sourceRoot":"","sources":["../../../../src/render/partitionPicker/layers/PartitionNameLabels.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"PartitionNameLabels.d.ts","sourceRoot":"","sources":["../../../../src/render/partitionPicker/layers/PartitionNameLabels.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAML,0BAA0B,EAE3B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAGrE,UAAU,wBAAwB;IAChC,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,4CAA4C;IAC5C,WAAW,EAAE,0BAA0B,CAAC;IACxC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC3C,kDAAkD;IAClD,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,wDAAwD;IACxD,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxE;AAED,QAAA,MAAM,mBAAmB,GAAI,6HAU1B,wBAAwB,4CAgH1B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -17,7 +17,8 @@ interface PartitionPickerSvgProps {
|
|
|
17
17
|
hoveredId: number | null;
|
|
18
18
|
onHoverChange: (id: number | null) => void;
|
|
19
19
|
onBoundaryClick?: (id: number) => void;
|
|
20
|
+
onIsolatedTap?: (id: number, clientX: number, clientY: number) => void;
|
|
20
21
|
}
|
|
21
|
-
declare const PartitionPickerSvg: ({ svgElementDatas, viewBox, containerWidth, containerHeight, mapRotation, boundaryColors, boundaryStrokePx, isolatedBoundaryIds, selectedIds, hoveredId, onHoverChange, onBoundaryClick, }: PartitionPickerSvgProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare const PartitionPickerSvg: ({ svgElementDatas, viewBox, containerWidth, containerHeight, mapRotation, boundaryColors, boundaryStrokePx, isolatedBoundaryIds, selectedIds, hoveredId, onHoverChange, onBoundaryClick, onIsolatedTap, }: PartitionPickerSvgProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
23
|
export default PartitionPickerSvg;
|
|
23
24
|
//# sourceMappingURL=PartitionPickerSvg.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PartitionPickerSvg.d.ts","sourceRoot":"","sources":["../../../../src/render/partitionPicker/layers/PartitionPickerSvg.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,EAChC,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGnC,UAAU,uBAAuB;IAC/B,eAAe,EAAE,gBAAgB,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,c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,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxE;AAED,QAAA,MAAM,kBAAkB,GAAI,2MAczB,uBAAuB,4CAgEzB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
import { BoundaryData } from '@/processor/unified';
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { PartitionPickerBoundaryColors, PartitionPickerBoundaryStrokePx } from '../constants';
|
|
11
|
-
export declare const PARTITION_BOUNDARY_ID_ATTR = "data-partition-boundary-id";
|
|
12
11
|
interface SelectableBoundaryElementProps {
|
|
13
12
|
data: BoundaryData;
|
|
14
13
|
/** 地块交互态配色(由 resolvePartitionPickerStyles 合并外部配置后传入) */
|
|
@@ -26,7 +25,10 @@ interface SelectableBoundaryElementProps {
|
|
|
26
25
|
onHoverChange: (id: number | null) => void;
|
|
27
26
|
/** Map 模式:直接点击地块切换选中(Standalone 由 viewport 统一处理) */
|
|
28
27
|
onBoundaryClick?: (id: number) => void;
|
|
28
|
+
/** Map 模式:点击孤立子地块(Standalone 由 viewport + data 属性处理) */
|
|
29
|
+
onIsolatedTap?: (id: number, clientX: number, clientY: number) => void;
|
|
29
30
|
}
|
|
30
|
-
declare const _default: React.MemoExoticComponent<({ data, boundaryColors, boundaryStrokePx, isIsolated, selected, hovered, viewBoxWidth, viewBoxHeight, containerWidth, containerHeight, onHoverChange, onBoundaryClick, }: SelectableBoundaryElementProps) => import("react/jsx-runtime").JSX.Element>;
|
|
31
|
+
declare const _default: React.MemoExoticComponent<({ data, boundaryColors, boundaryStrokePx, isIsolated, selected, hovered, viewBoxWidth, viewBoxHeight, containerWidth, containerHeight, onHoverChange, onBoundaryClick, onIsolatedTap, }: SelectableBoundaryElementProps) => import("react/jsx-runtime").JSX.Element>;
|
|
31
32
|
export default _default;
|
|
33
|
+
export { PARTITION_BOUNDARY_ID_ATTR, PARTITION_ISOLATED_BOUNDARY_ID_ATTR } from '../constants';
|
|
32
34
|
//# sourceMappingURL=SelectableBoundaryElement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectableBoundaryElement.d.ts","sourceRoot":"","sources":["../../../../src/render/partitionPicker/layers/SelectableBoundaryElement.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,
|
|
1
|
+
{"version":3,"file":"SelectableBoundaryElement.d.ts","sourceRoot":"","sources":["../../../../src/render/partitionPicker/layers/SelectableBoundaryElement.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,EAIhC,MAAM,cAAc,CAAC;AAItB,UAAU,8BAA8B;IACtC,IAAI,EAAE,YAAY,CAAC;IACnB,wDAAwD;IACxD,cAAc,EAAE,6BAA6B,CAAC;IAC9C,uCAAuC;IACvC,gBAAgB,CAAC,EAAE,+BAA+B,CAAC;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,4CAA4C;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC3C,oDAAoD;IACpD,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,wDAAwD;IACxD,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxE;4OAgBE,8BAA8B;AA+FjC,wBAA+C;AAE/C,OAAO,EAAE,0BAA0B,EAAE,mCAAmC,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -27,6 +27,22 @@ export type ScreenPaddingInput = number | [number, number] | [number, number, nu
|
|
|
27
27
|
export declare const DEFAULT_SCREEN_PADDING = 50;
|
|
28
28
|
export declare function normalizeScreenPadding(padding?: ScreenPaddingInput, defaultValue?: number): ScreenPaddingBox;
|
|
29
29
|
export declare function isZeroScreenPadding(padding: ScreenPaddingBox): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* 孤立子地块点击回调参数
|
|
32
|
+
*
|
|
33
|
+
* 地图包只负责识别点击并上报地块信息与指针坐标,不内置 Toast;
|
|
34
|
+
* 业务侧自行展示提示文案。
|
|
35
|
+
*/
|
|
36
|
+
export interface IsolatedBoundaryTapPayload {
|
|
37
|
+
/** 孤立子地块 id(与地图 JSON boundary id 一致) */
|
|
38
|
+
boundaryId: number;
|
|
39
|
+
/** 地块名称(来自地图 JSON),数据缺失时为 `undefined` */
|
|
40
|
+
boundaryName?: string;
|
|
41
|
+
/** 点击位置相对浏览器视口的 X 坐标(px) */
|
|
42
|
+
clientX: number;
|
|
43
|
+
/** 点击位置相对浏览器视口的 Y 坐标(px) */
|
|
44
|
+
clientY: number;
|
|
45
|
+
}
|
|
30
46
|
/** 地图叠加层默认偏移,与 MowerMapRenderer.defaultTransform 一致(Standalone 目前仅消费 rotation) */
|
|
31
47
|
export interface PartitionPickerMapTransform {
|
|
32
48
|
/** Web Mercator 米,预留 */
|
|
@@ -119,6 +135,13 @@ export interface MowerPartitionPickerMapProps {
|
|
|
119
135
|
* 序号按 selectedBoundaryIds 数组顺序从 1 开始
|
|
120
136
|
*/
|
|
121
137
|
showSelectionOrder?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* 孤立子地块点击回调(Web / H5 均触发)。
|
|
140
|
+
*
|
|
141
|
+
* Standalone 模式经 viewport 点击判定(与拖拽平移区分);Map 模式直接响应 polygon / 标签点击。
|
|
142
|
+
* 业务侧收到回调后自行 Toast 等提示,防抖策略由业务侧处理。
|
|
143
|
+
*/
|
|
144
|
+
onIsolatedBoundaryTap?: (payload: IsolatedBoundaryTapPayload) => void;
|
|
122
145
|
className?: string;
|
|
123
146
|
style?: React.CSSProperties;
|
|
124
147
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/render/partitionPicker/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAEzD,gEAAgE;AAChE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAExC,MAAM,WAAW,OAAO;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,kBAAkB;AAClB,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAC1B,MAAM,GACN,CAAC,MAAM,EAAE,MAAM,CAAC,GAChB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GACxB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAErC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,wBAAgB,sBAAsB,CACpC,OAAO,C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