@fleet-frontend/mower-maps 0.2.0-beta.20 → 0.2.0-beta.21
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.esm.js +78 -534
- package/dist/index.js +78 -534
- package/dist/render/MowerMapRenderer.d.ts.map +1 -1
- package/dist/render/svgEditMap/hooks/usePolygonDrawing.d.ts.map +1 -1
- package/dist/render/svgElement/PolygonELement/index.d.ts.map +1 -1
- package/package.json +1 -2
- package/dist/render/components/CustomModal/index.d.ts +0 -10
- package/dist/render/components/CustomModal/index.d.ts.map +0 -1
- package/dist/render/components/CutHeightSlider/index.d.ts +0 -11
- package/dist/render/components/CutHeightSlider/index.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/AddEntry/components/DoodleModal/index.d.ts +0 -19
- package/dist/render/svgEditMap/components/AddEntry/components/DoodleModal/index.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/AddEntry/index.d.ts +0 -8
- package/dist/render/svgEditMap/components/AddEntry/index.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/HandleElementInfo/boundary.d.ts +0 -6
- package/dist/render/svgEditMap/components/HandleElementInfo/boundary.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/HandleElementInfo/components/DirectionModal/component/MowDirection/DirectLine.d.ts +0 -7
- package/dist/render/svgEditMap/components/HandleElementInfo/components/DirectionModal/component/MowDirection/DirectLine.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/HandleElementInfo/components/DirectionModal/component/MowDirection/index.d.ts +0 -12
- package/dist/render/svgEditMap/components/HandleElementInfo/components/DirectionModal/component/MowDirection/index.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/HandleElementInfo/components/DirectionModal/component/MowDirection/util.d.ts +0 -2
- package/dist/render/svgEditMap/components/HandleElementInfo/components/DirectionModal/component/MowDirection/util.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/HandleElementInfo/components/DirectionModal/index.d.ts +0 -14
- package/dist/render/svgEditMap/components/HandleElementInfo/components/DirectionModal/index.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/HandleElementInfo/components/Header/index.d.ts +0 -11
- package/dist/render/svgEditMap/components/HandleElementInfo/components/Header/index.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/HandleElementInfo/components/HeightModal/index.d.ts +0 -16
- package/dist/render/svgEditMap/components/HandleElementInfo/components/HeightModal/index.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/HandleElementInfo/components/Item/index.d.ts +0 -7
- package/dist/render/svgEditMap/components/HandleElementInfo/components/Item/index.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/HandleElementInfo/components/MowingEdgeModal/index.d.ts +0 -9
- package/dist/render/svgEditMap/components/HandleElementInfo/components/MowingEdgeModal/index.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/HandleElementInfo/components/NameEdit/index.d.ts +0 -8
- package/dist/render/svgEditMap/components/HandleElementInfo/components/NameEdit/index.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/HandleElementInfo/components/NameEdit/nameModal.d.ts +0 -10
- package/dist/render/svgEditMap/components/HandleElementInfo/components/NameEdit/nameModal.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/HandleElementInfo/components/OtherInfo/index.d.ts +0 -12
- package/dist/render/svgEditMap/components/HandleElementInfo/components/OtherInfo/index.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/HandleElementInfo/components/TimePeriod/index.d.ts +0 -19
- package/dist/render/svgEditMap/components/HandleElementInfo/components/TimePeriod/index.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/HandleElementInfo/doodle.d.ts +0 -6
- package/dist/render/svgEditMap/components/HandleElementInfo/doodle.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/HandleElementInfo/index.d.ts +0 -3
- package/dist/render/svgEditMap/components/HandleElementInfo/index.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/HandleElementInfo/obstacle.d.ts +0 -6
- package/dist/render/svgEditMap/components/HandleElementInfo/obstacle.d.ts.map +0 -1
- package/dist/render/svgEditMap/components/HandleElementInfo/visionOff.d.ts +0 -6
- package/dist/render/svgEditMap/components/HandleElementInfo/visionOff.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var ReactDOM = require('react-dom');
|
|
6
|
-
var antd = require('antd');
|
|
7
6
|
|
|
8
7
|
function _interopNamespaceDefault(e) {
|
|
9
8
|
var n = Object.create(null);
|
|
@@ -222,7 +221,7 @@ class ObstacleData extends BaseData {
|
|
|
222
221
|
this.status = originalData?.status ?? 1;
|
|
223
222
|
this.start_timestamp = originalData?.start_timestamp;
|
|
224
223
|
this.end_timestamp = originalData?.end_timestamp;
|
|
225
|
-
this.name = originalData?.name || '
|
|
224
|
+
this.name = originalData?.name || '';
|
|
226
225
|
this.style = style;
|
|
227
226
|
}
|
|
228
227
|
}
|
|
@@ -8694,16 +8693,16 @@ function styleInject(css, ref) {
|
|
|
8694
8693
|
}
|
|
8695
8694
|
}
|
|
8696
8695
|
|
|
8697
|
-
var css_248z$
|
|
8698
|
-
var styles$
|
|
8699
|
-
styleInject(css_248z$
|
|
8696
|
+
var css_248z$6 = ".index-module_edit__-5VvX {\n position: absolute;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n pointer-events: auto;\n z-index: 1000;\n cursor: move;\n touch-action: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n.index-module_edit__-5VvX .index-module_border__JdNLM {\n position: absolute;\n inset: -10px;\n border: 2px dashed rgb(241, 102, 41);\n border-radius: 2px;\n pointer-events: none;\n}\n.index-module_edit__-5VvX .index-module_drag__uvdPG {\n position: absolute;\n inset: -10px;\n border-radius: 2px;\n}\n.index-module_edit__-5VvX .index-module_rotate__H-KIZ {\n position: absolute;\n top: -20px;\n right: -20px;\n width: 20px;\n height: 20px;\n cursor: grab;\n z-index: 1001;\n pointer-events: auto;\n}\n.index-module_edit__-5VvX .index-module_move__mZF8s {\n position: absolute;\n bottom: -20px;\n left: -20px;\n width: 20px;\n height: 20px;\n cursor: move;\n z-index: 1001;\n pointer-events: auto;\n}";
|
|
8697
|
+
var styles$6 = {"edit":"index-module_edit__-5VvX","border":"index-module_border__JdNLM","drag":"index-module_drag__uvdPG","move":"index-module_move__mZF8s"};
|
|
8698
|
+
styleInject(css_248z$6);
|
|
8700
8699
|
|
|
8701
8700
|
const DragHandle = ({ onDragStart, isDragging }) => {
|
|
8702
8701
|
// 在PC设备上隐藏拖拽手柄
|
|
8703
8702
|
if (!isMobileDevice()) {
|
|
8704
8703
|
return null;
|
|
8705
8704
|
}
|
|
8706
|
-
return (jsxRuntime.jsx("div", { className: styles$
|
|
8705
|
+
return (jsxRuntime.jsx("div", { className: styles$6.move, onMouseDown: (e) => {
|
|
8707
8706
|
onDragStart(e);
|
|
8708
8707
|
}, onTouchStart: (e) => onDragStart(e), onMouseUp: (e) => {
|
|
8709
8708
|
// onDragEnd(e);
|
|
@@ -8731,7 +8730,7 @@ const MapDrag = ({ map: _map, dragCallbacks, onBoundaryLabelsCollapse, onTransfo
|
|
|
8731
8730
|
if (!isDragMap) {
|
|
8732
8731
|
return null;
|
|
8733
8732
|
}
|
|
8734
|
-
return (jsxRuntime.jsxs("div", { ref: containerRef, className: styles$
|
|
8733
|
+
return (jsxRuntime.jsxs("div", { ref: containerRef, className: styles$6.edit, style: { cursor: isDragging ? 'grabbing' : 'move' }, children: [jsxRuntime.jsx("div", { className: styles$6.border }), jsxRuntime.jsx("div", { className: styles$6.drag, onMouseDown: handleDragStartEvent, onTouchStart: handleDragStartEvent }), jsxRuntime.jsx(DragHandle, { onDragStart: handleDragStartEvent, isDragging: isDragging })] }));
|
|
8735
8734
|
};
|
|
8736
8735
|
|
|
8737
8736
|
/**
|
|
@@ -14454,9 +14453,9 @@ const SvgMapComponent = React.forwardRef(({ editMap, rotate, mapData, pathData,
|
|
|
14454
14453
|
// 设置显示名称以便调试
|
|
14455
14454
|
SvgMapComponent.displayName = 'SvgMapComponent';
|
|
14456
14455
|
|
|
14457
|
-
var css_248z$
|
|
14458
|
-
var styles$
|
|
14459
|
-
styleInject(css_248z$
|
|
14456
|
+
var css_248z$5 = ".index-module_mowerPosition__yLpIU {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n width: 100%;\n height: 100%;\n}";
|
|
14457
|
+
var styles$5 = {"mowerPosition":"index-module_mowerPosition__yLpIU"};
|
|
14458
|
+
styleInject(css_248z$5);
|
|
14460
14459
|
|
|
14461
14460
|
const usePosition = ({ mowerPositionData, viewBox, modelType, hasEdger, mapData, realTimeData, onMowingPositionChange, }) => {
|
|
14462
14461
|
// DOM 元素引用,用于直接操作
|
|
@@ -14682,7 +14681,7 @@ const MowerPosition = React.memo(({ editMap, mowerPositionData, viewBox, modelTy
|
|
|
14682
14681
|
pointerEvents: 'none',
|
|
14683
14682
|
zIndex: 1000,
|
|
14684
14683
|
}), []);
|
|
14685
|
-
return (jsxRuntime.jsx("div", { className: styles$
|
|
14684
|
+
return (jsxRuntime.jsx("div", { className: styles$5.mowerPosition, style: containerStyle, children: jsxRuntime.jsx("div", { ref: elementRef, className: "mower-position", style: {
|
|
14686
14685
|
position: 'absolute',
|
|
14687
14686
|
width: 30,
|
|
14688
14687
|
height: 30,
|
|
@@ -14751,9 +14750,9 @@ const CharginPile = React.memo(({ mapData, mapConfig = {}, viewBox, rotation = 0
|
|
|
14751
14750
|
}, children: jsxRuntime.jsx("img", { src: item.imageSrc, style: { width: '100%', height: '100%', objectFit: 'contain', opacity: 1 } }) }, `pile-${idx}`))) }));
|
|
14752
14751
|
});
|
|
14753
14752
|
|
|
14754
|
-
var css_248z$
|
|
14755
|
-
var styles$
|
|
14756
|
-
styleInject(css_248z$
|
|
14753
|
+
var css_248z$4 = ".index-module_container__7IatW {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n\n.index-module_boundaryLabel__GDHFn {\n position: absolute;\n background-color: rgba(30, 30, 31, 0.6);\n color: rgb(255, 255, 255);\n padding: 6px;\n border-radius: 12px;\n font-size: 12px;\n font-weight: bold;\n max-width: 220px;\n pointer-events: auto;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);\n cursor: pointer;\n user-select: none;\n white-space: nowrap;\n}\n\n.index-module_base__qy2SG {\n font-size: 14px;\n}\n\n.index-module_extended__0TMAt {\n margin-top: 6px;\n font-size: 11px;\n opacity: 0.9;\n border-top: 1px solid rgba(255, 255, 255, 0.2);\n padding-top: 6px;\n}";
|
|
14754
|
+
var styles$4 = {"container":"index-module_container__7IatW","boundaryLabel":"index-module_boundaryLabel__GDHFn","base":"index-module_base__qy2SG","extended":"index-module_extended__0TMAt"};
|
|
14755
|
+
styleInject(css_248z$4);
|
|
14757
14756
|
|
|
14758
14757
|
const useBoundaryLabels = ({ mapData, pathData, unitType, viewBox, mowPartitionData, realTimeData = [], }) => {
|
|
14759
14758
|
const [processStateIsMowing, updateProcessStateIsMowing] = React.useState(false);
|
|
@@ -14907,7 +14906,7 @@ const BoundaryLabels = React.memo(({ editMap, mapData, pathData, unitType, langu
|
|
|
14907
14906
|
zIndex: expandedId != null ? 9999 : containerZIndex,
|
|
14908
14907
|
display: editMap ? 'none' : 'block',
|
|
14909
14908
|
}), [containerZIndex, expandedId, editMap]);
|
|
14910
|
-
return (jsxRuntime.jsx("div", { className: styles$
|
|
14909
|
+
return (jsxRuntime.jsx("div", { className: styles$4.container, style: containerStyle, children: items.map((item) => (jsxRuntime.jsxs("div", { className: `${styles$4.boundaryLabel} boundary-label`, "data-boundary-id": item.id, style: {
|
|
14911
14910
|
transform: `translate(-50%, -50%) rotate(${-rotation}deg)`,
|
|
14912
14911
|
left: `${item.leftPct}%`,
|
|
14913
14912
|
top: `${item.topPct}%`,
|
|
@@ -14917,12 +14916,12 @@ const BoundaryLabels = React.memo(({ editMap, mapData, pathData, unitType, langu
|
|
|
14917
14916
|
if (onlyRead)
|
|
14918
14917
|
return;
|
|
14919
14918
|
handleClick(item.id);
|
|
14920
|
-
}, children: [jsxRuntime.jsx("div", { className: styles$
|
|
14919
|
+
}, children: [jsxRuntime.jsx("div", { className: styles$4.base, children: item.baseText }), jsxRuntime.jsxs("div", { className: styles$4.extended, style: { display: expandedId === item.id ? 'block' : 'none' }, children: [jsxRuntime.jsx("div", { style: { marginBottom: 3, fontWeight: 'bold' }, children: item.coverageText }), jsxRuntime.jsx("div", { children: item.dateText })] })] }, item.id))) }));
|
|
14921
14920
|
});
|
|
14922
14921
|
|
|
14923
|
-
var css_248z$
|
|
14924
|
-
var styles$
|
|
14925
|
-
styleInject(css_248z$
|
|
14922
|
+
var css_248z$3 = ".index-module_container__gB52e {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n\n.index-module_item__zHoZP {\n position: absolute;\n pointer-events: auto;\n}\n\n.index-module_icon__CS56A {\n position: relative;\n width: 24px;\n height: 24px;\n cursor: pointer;\n transition: transform 0.2s ease;\n}\n\n.index-module_tooltip__NMCmR {\n position: absolute;\n bottom: 40px;\n left: 0;\n background-color: rgb(247, 251, 255);\n color: rgb(65, 93, 116);\n padding: 10px;\n border-radius: 16px;\n font-size: 14px;\n text-align: left;\n}";
|
|
14923
|
+
var styles$3 = {"container":"index-module_container__gB52e","item":"index-module_item__zHoZP","icon":"index-module_icon__CS56A","tooltip":"index-module_tooltip__NMCmR"};
|
|
14924
|
+
styleInject(css_248z$3);
|
|
14926
14925
|
|
|
14927
14926
|
const useAntennaInfo = (data = [], options = {}) => {
|
|
14928
14927
|
const { viewBox } = options;
|
|
@@ -15031,13 +15030,13 @@ const Antennas = React.memo(({ editMap, antennaConfig = [], viewBox, rotation =
|
|
|
15031
15030
|
document.addEventListener('pointerdown', handleOutside);
|
|
15032
15031
|
return () => document.removeEventListener('pointerdown', handleOutside);
|
|
15033
15032
|
}, []);
|
|
15034
|
-
return (jsxRuntime.jsx("div", { className: styles$
|
|
15033
|
+
return (jsxRuntime.jsx("div", { className: styles$3.container, style: containerStyle, children: items.map((item) => (jsxRuntime.jsxs("div", { className: `antenna-container-item ${styles$3.item}`, style: {
|
|
15035
15034
|
left: `${item.leftPct}%`,
|
|
15036
15035
|
top: `${item.topPct}%`,
|
|
15037
15036
|
transform: `translate(calc(-50% + ${item.offsetX || 0}px), calc(-50% + ${item.offsetY || 0}px)) rotate(${-rotation}deg)`,
|
|
15038
15037
|
zIndex: openType === item.type ? 10000 : containerZIndex,
|
|
15039
15038
|
pointerEvents: onlyRead ? 'none' : 'auto',
|
|
15040
|
-
}, children: [jsxRuntime.jsx("div", { className: `antenna vector-antenna antenna-${item.type} ${item.isOnline ? 'antenna-online' : 'antenna-offline'} ${styles$
|
|
15039
|
+
}, children: [jsxRuntime.jsx("div", { className: `antenna vector-antenna antenna-${item.type} ${item.isOnline ? 'antenna-online' : 'antenna-offline'} ${styles$3.icon}`, style: {}, onClick: (e) => {
|
|
15041
15040
|
e.stopPropagation();
|
|
15042
15041
|
if (onlyRead)
|
|
15043
15042
|
return;
|
|
@@ -15052,7 +15051,7 @@ const Antennas = React.memo(({ editMap, antennaConfig = [], viewBox, rotation =
|
|
|
15052
15051
|
return;
|
|
15053
15052
|
e.currentTarget.style.transform =
|
|
15054
15053
|
'scale(1)';
|
|
15055
|
-
}, children: jsxRuntime.jsx("img", { src: item.imageSrc, style: { width: '100%', height: '100%', objectFit: 'contain', opacity: 1 } }) }), jsxRuntime.jsxs("div", { className: styles$
|
|
15054
|
+
}, children: jsxRuntime.jsx("img", { src: item.imageSrc, style: { width: '100%', height: '100%', objectFit: 'contain', opacity: 1 } }) }), jsxRuntime.jsxs("div", { className: styles$3.tooltip, style: {
|
|
15056
15055
|
display: openType === item.type ? 'block' : 'none',
|
|
15057
15056
|
minWidth: item.tooltip.minWidth,
|
|
15058
15057
|
}, children: [jsxRuntime.jsx("div", { style: { marginBottom: 4, fontWeight: 600 }, children: item.tooltip.title }), jsxRuntime.jsxs("div", { style: { color: 'rgba(65, 93, 116, 1)', fontWeight: 400 }, children: [item.tooltip.statusText, item.tooltip.syncText || ''] })] })] }, `antenna-${item.type}`))) }));
|
|
@@ -15116,15 +15115,15 @@ const VertexElement = React.memo(({ r, stroke, fill, ...props }) => {
|
|
|
15116
15115
|
return (jsxRuntime.jsx("circle", { r: radius * overlayScale, stroke: stroke || '#fff', fill: fill || '#fff', strokeWidth: 4 * overlayScale, ...props }));
|
|
15117
15116
|
});
|
|
15118
15117
|
|
|
15119
|
-
var _path$
|
|
15120
|
-
function _extends$
|
|
15118
|
+
var _path$1;
|
|
15119
|
+
function _extends$5() { return _extends$5 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$5.apply(null, arguments); }
|
|
15121
15120
|
var SvgDelete = function SvgDelete(props) {
|
|
15122
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
15121
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
|
|
15123
15122
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15124
15123
|
width: 16,
|
|
15125
15124
|
height: 16,
|
|
15126
15125
|
fill: "none"
|
|
15127
|
-
}, props), _path$
|
|
15126
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
15128
15127
|
fill: "#FD494D",
|
|
15129
15128
|
d: "M6.667 12a.667.667 0 0 0 .666-.667v-4a.667.667 0 1 0-1.333 0v4a.667.667 0 0 0 .667.667m6.666-8h-2.666v-.667a2 2 0 0 0-2-2H7.333a2 2 0 0 0-2 2V4H2.667a.667.667 0 0 0 0 1.333h.666v7.334a2 2 0 0 0 2 2h5.334a2 2 0 0 0 2-2V5.333h.666a.667.667 0 1 0 0-1.333m-6.666-.667a.667.667 0 0 1 .666-.666h1.334a.667.667 0 0 1 .666.666V4H6.667zm4.666 9.334a.667.667 0 0 1-.666.666H5.333a.667.667 0 0 1-.666-.666V5.333h6.666zm-2-.667a.667.667 0 0 0 .667-.667v-4a.667.667 0 0 0-1.333 0v4a.667.667 0 0 0 .666.667"
|
|
15130
15129
|
})));
|
|
@@ -15302,9 +15301,9 @@ const DistanceLabels = ({ coordinates, createMode = false, editMode = false, com
|
|
|
15302
15301
|
} }))] }));
|
|
15303
15302
|
};
|
|
15304
15303
|
|
|
15305
|
-
var css_248z$
|
|
15306
|
-
var styles$
|
|
15307
|
-
styleInject(css_248z$
|
|
15304
|
+
var css_248z$2 = ".index-module_polygonPathG__S-Bpl {\n cursor: pointer;\n}\n\n.index-module_vertex__-Qb1u {\n cursor: pointer;\n}\n\n.index-module_dragging__xSFdO {\n cursor: grabbing;\n}\n\n.index-module_addVertex__hrF71 {\n cursor: pointer;\n}\n\n.index-module_polygonPath__PynOn {\n pointer-events: stroke;\n cursor: pointer;\n}\n\n.index-module_notCreate__bFnkV {\n cursor: no-drop;\n}";
|
|
15305
|
+
var styles$2 = {"polygonPathG":"index-module_polygonPathG__S-Bpl","vertex":"index-module_vertex__-Qb1u","dragging":"index-module_dragging__xSFdO","addVertex":"index-module_addVertex__hrF71","polygonPath":"index-module_polygonPath__PynOn","notCreate":"index-module_notCreate__bFnkV"};
|
|
15306
|
+
styleInject(css_248z$2);
|
|
15308
15307
|
|
|
15309
15308
|
exports.CreateStatus = void 0;
|
|
15310
15309
|
(function (CreateStatus) {
|
|
@@ -16171,8 +16170,8 @@ const PolygonElement = ({ canSelect = false, points, fillColor = 'rgba(0, 0, 0,
|
|
|
16171
16170
|
}, [dragState.currentPosition, checkCanNotCreateAtPosition, coordinates]);
|
|
16172
16171
|
const generateVertexClassName = React.useMemo(() => {
|
|
16173
16172
|
if (!dragState.isDragging)
|
|
16174
|
-
return styles$
|
|
16175
|
-
return showNotCreateCursor ? styles$
|
|
16173
|
+
return styles$2.vertex;
|
|
16174
|
+
return showNotCreateCursor ? styles$2.notCreate : styles$2.dragging;
|
|
16176
16175
|
}, [dragState.isDragging, showNotCreateCursor]);
|
|
16177
16176
|
// 使用 useRef 来存储 requestAnimationFrame ID
|
|
16178
16177
|
const rafIdRef = React.useRef(null);
|
|
@@ -16294,15 +16293,10 @@ const PolygonElement = ({ canSelect = false, points, fillColor = 'rgba(0, 0, 0,
|
|
|
16294
16293
|
? newCoordinates
|
|
16295
16294
|
: newCoordinates.reverse();
|
|
16296
16295
|
if (showNotCreateCursor) {
|
|
16297
|
-
|
|
16298
|
-
|
|
16299
|
-
|
|
16300
|
-
|
|
16301
|
-
});
|
|
16302
|
-
}
|
|
16303
|
-
else {
|
|
16304
|
-
antd.message.error('Unable to place here, please select a valid spot');
|
|
16305
|
-
}
|
|
16296
|
+
onHandleEvent?.(exports.ClickEventType.MOVE_OBSTACLE_POINT_ERROR, {
|
|
16297
|
+
result: true,
|
|
16298
|
+
code: exports.CheckObstaclePointErrorType.COMMON_ERROR,
|
|
16299
|
+
});
|
|
16306
16300
|
}
|
|
16307
16301
|
else {
|
|
16308
16302
|
onCoordinatesChange?.(result);
|
|
@@ -16470,14 +16464,14 @@ const PolygonElement = ({ canSelect = false, points, fillColor = 'rgba(0, 0, 0,
|
|
|
16470
16464
|
WebkitTouchCallout: 'none',
|
|
16471
16465
|
touchAction: 'none',
|
|
16472
16466
|
} })] }));
|
|
16473
|
-
})()] })), renderCoordinates.length >= 2 && (jsxRuntime.jsx("polygon", { className: canSelect ? styles$
|
|
16467
|
+
})()] })), renderCoordinates.length >= 2 && (jsxRuntime.jsx("polygon", { className: canSelect ? styles$2.polygonPathG : '', points: polygonPoints, fill: fillColor, fillOpacity: fillOpacity, stroke: "none" // 边框透明
|
|
16474
16468
|
, onClick: onPolygonClick })), jsxRuntime.jsxs("g", { children: [renderCoordinates.length >= 2 &&
|
|
16475
16469
|
pathSegments.map((segment, index) => {
|
|
16476
16470
|
if (segment.points.length < 2)
|
|
16477
16471
|
return null;
|
|
16478
16472
|
const pathData = createPathData(segment.points);
|
|
16479
16473
|
const isDash = segment.type === 1;
|
|
16480
|
-
return (jsxRuntime.jsx("path", { d: pathData, fill: "none", stroke: isDash ? 'none' : strokeColor, strokeWidth: strokeWidth, strokeOpacity: strokeOpacity, strokeLinecap: "round", strokeLinejoin: "round", className: canSelect ? styles$
|
|
16474
|
+
return (jsxRuntime.jsx("path", { d: pathData, fill: "none", stroke: isDash ? 'none' : strokeColor, strokeWidth: strokeWidth, strokeOpacity: strokeOpacity, strokeLinecap: "round", strokeLinejoin: "round", className: canSelect ? styles$2.polygonPath : '', vectorEffect: "non-scaling-stroke", onClick: onPathClick, style: {
|
|
16481
16475
|
userSelect: 'none',
|
|
16482
16476
|
WebkitUserSelect: 'none',
|
|
16483
16477
|
WebkitTouchCallout: 'none',
|
|
@@ -16487,13 +16481,13 @@ const PolygonElement = ({ canSelect = false, points, fillColor = 'rgba(0, 0, 0,
|
|
|
16487
16481
|
dashPaths.map((segment, index) => {
|
|
16488
16482
|
if (segment.points.length < 2)
|
|
16489
16483
|
return null;
|
|
16490
|
-
return (jsxRuntime.jsx(DashPath, { className: canSelect ? styles$
|
|
16484
|
+
return (jsxRuntime.jsx(DashPath, { className: canSelect ? styles$2.polygonPath : '', points: segment.points, stroke: strokeColor, strokeWidth: strokeWidth, strokeOpacity: strokeOpacity }, index));
|
|
16491
16485
|
})] }), (editMode || (createMode && completed)) &&
|
|
16492
16486
|
renderCoordinates.length >= 2 &&
|
|
16493
16487
|
renderCoordinates.map((coord, index) => {
|
|
16494
16488
|
const nextCoord = renderCoordinates[(index + 1) % renderCoordinates.length];
|
|
16495
16489
|
const isDashPath = coord[2] === 1;
|
|
16496
|
-
return (jsxRuntime.jsx("line", { x1: coord[0], y1: coord[1], x2: nextCoord[0], y2: nextCoord[1], stroke: isDashPath ? 'transparent' : strokeColor, strokeWidth: platform === exports.PlatformType.H5 ? strokeWidth * 3 : strokeWidth, className: editMode ? styles$
|
|
16490
|
+
return (jsxRuntime.jsx("line", { x1: coord[0], y1: coord[1], x2: nextCoord[0], y2: nextCoord[1], stroke: isDashPath ? 'transparent' : strokeColor, strokeWidth: platform === exports.PlatformType.H5 ? strokeWidth * 3 : strokeWidth, className: editMode ? styles$2.addVertex : '', style: {
|
|
16497
16491
|
userSelect: 'none',
|
|
16498
16492
|
WebkitUserSelect: 'none',
|
|
16499
16493
|
WebkitTouchCallout: 'none',
|
|
@@ -17327,15 +17321,15 @@ const useVisionOffTransform = (data, scaleConstraints
|
|
|
17327
17321
|
};
|
|
17328
17322
|
};
|
|
17329
17323
|
|
|
17330
|
-
var _g$
|
|
17331
|
-
function _extends$
|
|
17324
|
+
var _g$3, _defs$3;
|
|
17325
|
+
function _extends$4() { return _extends$4 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$4.apply(null, arguments); }
|
|
17332
17326
|
var SvgTransformDelete = function SvgTransformDelete(props) {
|
|
17333
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
17327
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
|
|
17334
17328
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17335
17329
|
width: 20,
|
|
17336
17330
|
height: 20,
|
|
17337
17331
|
fill: "none"
|
|
17338
|
-
}, props), _g$
|
|
17332
|
+
}, props), _g$3 || (_g$3 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
17339
17333
|
clipPath: "url(#transform-delete_svg__a)"
|
|
17340
17334
|
}, /*#__PURE__*/React__namespace.createElement("circle", {
|
|
17341
17335
|
cx: 10,
|
|
@@ -17358,7 +17352,7 @@ var SvgTransformDelete = function SvgTransformDelete(props) {
|
|
|
17358
17352
|
fill: "#fff",
|
|
17359
17353
|
rx: 0.8,
|
|
17360
17354
|
transform: "rotate(45 6.323 5.191)"
|
|
17361
|
-
}))), _defs$
|
|
17355
|
+
}))), _defs$3 || (_defs$3 = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
17362
17356
|
id: "transform-delete_svg__b",
|
|
17363
17357
|
x1: 17.727,
|
|
17364
17358
|
x2: -1.215,
|
|
@@ -17378,15 +17372,15 @@ var SvgTransformDelete = function SvgTransformDelete(props) {
|
|
|
17378
17372
|
})))));
|
|
17379
17373
|
};
|
|
17380
17374
|
|
|
17381
|
-
var _g$
|
|
17382
|
-
function _extends$
|
|
17375
|
+
var _g$2, _defs$2;
|
|
17376
|
+
function _extends$3() { return _extends$3 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$3.apply(null, arguments); }
|
|
17383
17377
|
var SvgTransformRotate = function SvgTransformRotate(props) {
|
|
17384
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
17378
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
17385
17379
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17386
17380
|
width: 21,
|
|
17387
17381
|
height: 20,
|
|
17388
17382
|
fill: "none"
|
|
17389
|
-
}, props), _g$
|
|
17383
|
+
}, props), _g$2 || (_g$2 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
17390
17384
|
clipPath: "url(#transform-rotate_svg__a)"
|
|
17391
17385
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
17392
17386
|
fill: "url(#transform-rotate_svg__b)",
|
|
@@ -17394,7 +17388,7 @@ var SvgTransformRotate = function SvgTransformRotate(props) {
|
|
|
17394
17388
|
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
17395
17389
|
fill: "#fff",
|
|
17396
17390
|
d: "M11.602 14.719a5.447 5.447 0 0 1-6.608-5.116l-.004-.205a.818.818 0 0 1 1.633-.084l.004.084.01.285a3.81 3.81 0 0 0 2.127 3.137l.26.115a3.8 3.8 0 0 0 2.227.184l.276-.071q.29-.088.561-.219l-1.147-.441a.817.817 0 0 1 .587-1.525l2.54.977a.817.817 0 0 1 .316 1.308l.001.001a5.45 5.45 0 0 1-2.783 1.57M8.623 4.548a5.447 5.447 0 0 1 6.608 5.116l.004.204a.818.818 0 0 1-1.633.084l-.004-.084-.01-.284a3.81 3.81 0 0 0-2.127-3.138l-.26-.115a3.8 3.8 0 0 0-2.227-.184l-.276.072q-.29.087-.561.218l1.147.442a.817.817 0 0 1-.586 1.524l-2.542-.976a.817.817 0 0 1-.315-1.309 5.45 5.45 0 0 1 2.782-1.57"
|
|
17397
|
-
}))), _defs$
|
|
17391
|
+
}))), _defs$2 || (_defs$2 = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
17398
17392
|
id: "transform-rotate_svg__b",
|
|
17399
17393
|
x1: 17.84,
|
|
17400
17394
|
x2: -1.103,
|
|
@@ -17414,15 +17408,15 @@ var SvgTransformRotate = function SvgTransformRotate(props) {
|
|
|
17414
17408
|
})))));
|
|
17415
17409
|
};
|
|
17416
17410
|
|
|
17417
|
-
var _g$
|
|
17418
|
-
function _extends$
|
|
17411
|
+
var _g$1, _defs$1;
|
|
17412
|
+
function _extends$2() { return _extends$2 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$2.apply(null, arguments); }
|
|
17419
17413
|
var SvgTransformScale = function SvgTransformScale(props) {
|
|
17420
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
17414
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
17421
17415
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17422
17416
|
width: 21,
|
|
17423
17417
|
height: 20,
|
|
17424
17418
|
fill: "none"
|
|
17425
|
-
}, props), _g$
|
|
17419
|
+
}, props), _g$1 || (_g$1 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
17426
17420
|
clipPath: "url(#transform-scale_svg__a)"
|
|
17427
17421
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
17428
17422
|
fill: "url(#transform-scale_svg__b)",
|
|
@@ -17430,7 +17424,7 @@ var SvgTransformScale = function SvgTransformScale(props) {
|
|
|
17430
17424
|
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
17431
17425
|
fill: "#fff",
|
|
17432
17426
|
d: "M5.078 8.265a.8.8 0 0 0 1.6.001v-.544l5.69 5.69h-.494a.8.8 0 0 0 0 1.6l2.474-.002a.8.8 0 0 0 .311-.062.8.8 0 0 0 .49-.738v-2.474a.8.8 0 1 0-1.6 0v.594L7.81 6.59h.544a.8.8 0 0 0 0-1.6H5.879a.8.8 0 0 0-.8.8z"
|
|
17433
|
-
}))), _defs$
|
|
17427
|
+
}))), _defs$1 || (_defs$1 = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
17434
17428
|
id: "transform-scale_svg__b",
|
|
17435
17429
|
x1: 17.84,
|
|
17436
17430
|
x2: -1.103,
|
|
@@ -17450,15 +17444,15 @@ var SvgTransformScale = function SvgTransformScale(props) {
|
|
|
17450
17444
|
})))));
|
|
17451
17445
|
};
|
|
17452
17446
|
|
|
17453
|
-
var _g
|
|
17454
|
-
function _extends$
|
|
17447
|
+
var _g, _defs;
|
|
17448
|
+
function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
|
|
17455
17449
|
var SvgTransformTranslate = function SvgTransformTranslate(props) {
|
|
17456
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
17450
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
17457
17451
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17458
17452
|
width: 20,
|
|
17459
17453
|
height: 20,
|
|
17460
17454
|
fill: "none"
|
|
17461
|
-
}, props), _g
|
|
17455
|
+
}, props), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
|
|
17462
17456
|
clipPath: "url(#transform-translate_svg__a)"
|
|
17463
17457
|
}, /*#__PURE__*/React__namespace.createElement("circle", {
|
|
17464
17458
|
cx: 10,
|
|
@@ -17468,7 +17462,7 @@ var SvgTransformTranslate = function SvgTransformTranslate(props) {
|
|
|
17468
17462
|
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
17469
17463
|
fill: "#fff",
|
|
17470
17464
|
d: "M16.18 10.758a.8.8 0 0 0-.105-1.218l-1.66-1.66a.801.801 0 0 0-1.132 1.132l.383.381h-2.96V6.418l.385.386a.8.8 0 1 0 1.131-1.13l-1.75-1.75a.8.8 0 0 0-1.222.11L7.594 5.689a.8.8 0 0 0 1.131 1.13l.381-.38v2.954H6.137l.381-.38a.8.8 0 1 0-1.13-1.132l-1.752 1.75a.8.8 0 0 0 .106 1.22l1.66 1.66a.801.801 0 0 0 1.132-1.133l-.386-.385h2.958v2.972l-.38-.38a.8.8 0 0 0-1.132 1.131l1.751 1.75a.8.8 0 0 0 1.223-.11l1.654-1.655a.8.8 0 1 0-1.13-1.131l-.386.386v-2.963h2.978l-.385.384a.8.8 0 1 0 1.131 1.131z"
|
|
17471
|
-
}))), _defs
|
|
17465
|
+
}))), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
17472
17466
|
id: "transform-translate_svg__b",
|
|
17473
17467
|
x1: 17.727,
|
|
17474
17468
|
x2: -1.215,
|
|
@@ -18650,9 +18644,9 @@ const GElement = ({ type, children }) => {
|
|
|
18650
18644
|
return jsxRuntime.jsx("g", { id: `layer-${type}`, children: children }, type);
|
|
18651
18645
|
};
|
|
18652
18646
|
|
|
18653
|
-
var css_248z$
|
|
18654
|
-
var styles$
|
|
18655
|
-
styleInject(css_248z$
|
|
18647
|
+
var css_248z$1 = ".index-module_mapEdit__XC5Gw {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n cursor: default;\n}\n.index-module_mapEdit__XC5Gw.index-module_createMode__14EPH {\n cursor: crosshair;\n}\n.index-module_mapEdit__XC5Gw.index-module_notCreateCursor__1-OjF {\n cursor: no-drop;\n}";
|
|
18648
|
+
var styles$1 = {"mapEdit":"index-module_mapEdit__XC5Gw","createMode":"index-module_createMode__14EPH","notCreateCursor":"index-module_notCreateCursor__1-OjF"};
|
|
18649
|
+
styleInject(css_248z$1);
|
|
18656
18650
|
|
|
18657
18651
|
var classnames = {exports: {}};
|
|
18658
18652
|
|
|
@@ -19644,7 +19638,7 @@ function getSvgPoint(svg, clientX, clientY) {
|
|
|
19644
19638
|
function usePolygonDrawing(options = {}) {
|
|
19645
19639
|
const { createMode = false } = options;
|
|
19646
19640
|
const [mousePos, setMousePos] = React.useState(null);
|
|
19647
|
-
const { editMapInfo, setEditMapInfo } = useMapEditContext();
|
|
19641
|
+
const { editMapInfo, setEditMapInfo, onHandleEvent } = useMapEditContext();
|
|
19648
19642
|
const { checkCanNotCreateAtPosition } = useCheckElement();
|
|
19649
19643
|
const { addHistory } = useHistoryHandle();
|
|
19650
19644
|
const points = React.useMemo(() => {
|
|
@@ -19676,7 +19670,10 @@ function usePolygonDrawing(options = {}) {
|
|
|
19676
19670
|
if (!p)
|
|
19677
19671
|
return;
|
|
19678
19672
|
if (checkCanNotCreateAtPosition(p)?.result) {
|
|
19679
|
-
|
|
19673
|
+
onHandleEvent?.(exports.ClickEventType.MOVE_OBSTACLE_POINT_ERROR, {
|
|
19674
|
+
result: true,
|
|
19675
|
+
code: exports.CheckObstaclePointErrorType.COMMON_ERROR,
|
|
19676
|
+
});
|
|
19680
19677
|
return;
|
|
19681
19678
|
}
|
|
19682
19679
|
setEditMapInfo((pre) => {
|
|
@@ -20204,9 +20201,9 @@ const SvgEditMap = React.forwardRef(({ mapJson, mapConfig, editMap, onEditInfoMa
|
|
|
20204
20201
|
return false;
|
|
20205
20202
|
return checkCanNotCreateAtPosition(mousePos)?.result ?? false;
|
|
20206
20203
|
}, [mousePos, checkCanNotCreateAtPosition]);
|
|
20207
|
-
return (jsxRuntime.jsx("div", { ref: containerRef, className: classNames(styles$
|
|
20208
|
-
[styles$
|
|
20209
|
-
[styles$
|
|
20204
|
+
return (jsxRuntime.jsx("div", { ref: containerRef, className: classNames(styles$1.mapEdit, {
|
|
20205
|
+
[styles$1.createMode]: isCreating,
|
|
20206
|
+
[styles$1.notCreateCursor]: showNotCreateCursor,
|
|
20210
20207
|
}), style: {
|
|
20211
20208
|
display: editMap ? 'block' : 'none',
|
|
20212
20209
|
}, children: jsxRuntime.jsxs("svg", { style: {
|
|
@@ -20305,15 +20302,15 @@ const SvgEditMap = React.forwardRef(({ mapJson, mapConfig, editMap, onEditInfoMa
|
|
|
20305
20302
|
});
|
|
20306
20303
|
SvgEditMap.displayName = 'SvgEditMap';
|
|
20307
20304
|
|
|
20308
|
-
var _path
|
|
20309
|
-
function _extends
|
|
20305
|
+
var _path;
|
|
20306
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
20310
20307
|
var SvgMobileAddPoint = function SvgMobileAddPoint(props) {
|
|
20311
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends
|
|
20308
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
20312
20309
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20313
20310
|
width: 36,
|
|
20314
20311
|
height: 36,
|
|
20315
20312
|
fill: "none"
|
|
20316
|
-
}, props), _path
|
|
20313
|
+
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
20317
20314
|
stroke: "#fff",
|
|
20318
20315
|
strokeLinecap: "round",
|
|
20319
20316
|
strokeLinejoin: "round",
|
|
@@ -20322,9 +20319,9 @@ var SvgMobileAddPoint = function SvgMobileAddPoint(props) {
|
|
|
20322
20319
|
})));
|
|
20323
20320
|
};
|
|
20324
20321
|
|
|
20325
|
-
var css_248z
|
|
20326
|
-
var styles
|
|
20327
|
-
styleInject(css_248z
|
|
20322
|
+
var css_248z = ".index-module_crosshair__etey6 {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 40px;\n height: 40px;\n pointer-events: none;\n z-index: 99999;\n display: flex;\n justify-content: center;\n align-items: center;\n}";
|
|
20323
|
+
var styles = {"crosshair":"index-module_crosshair__etey6"};
|
|
20324
|
+
styleInject(css_248z);
|
|
20328
20325
|
|
|
20329
20326
|
/**
|
|
20330
20327
|
* 十字准心组件
|
|
@@ -20341,460 +20338,7 @@ const Crosshair = () => {
|
|
|
20341
20338
|
}
|
|
20342
20339
|
return false;
|
|
20343
20340
|
}, [platform, editMapInfo]);
|
|
20344
|
-
return isVisible ? (jsxRuntime.jsx("div", { className: styles
|
|
20345
|
-
};
|
|
20346
|
-
|
|
20347
|
-
var css_248z$2 = ".index-module_addEntry__QsQHD {\n position: absolute;\n right: 8px;\n top: 8px;\n cursor: pointer;\n z-index: 10;\n}\n.index-module_addEntry__QsQHD .index-module_icon__qIgA4 {\n padding: 6px;\n border-radius: 8px;\n background: #fff;\n box-shadow: 2px 2px 12px 0px rgba(0, 0, 0, 0.2);\n}\n\n.index-module_addItem__mglwZ {\n display: flex;\n align-items: center;\n padding: 4px;\n justify-content: flex-start;\n cursor: pointer;\n}\n.index-module_addItem__mglwZ:hover {\n box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.25);\n border-radius: 4px;\n}\n.index-module_addItem__mglwZ:not(:last-child) {\n margin-bottom: 6px;\n}\n.index-module_addItem__mglwZ .index-module_icon__qIgA4 {\n width: 16px;\n height: 16px;\n}\n.index-module_addItem__mglwZ .index-module_label__QqZ-9 {\n font-weight: 500;\n font-size: 14px;\n line-height: 16px;\n color: rgb(158, 158, 158);\n margin-left: 4px;\n}";
|
|
20348
|
-
var styles$2 = {"addEntry":"index-module_addEntry__QsQHD","icon":"index-module_icon__qIgA4","addItem":"index-module_addItem__mglwZ","label":"index-module_label__QqZ-9"};
|
|
20349
|
-
styleInject(css_248z$2);
|
|
20350
|
-
|
|
20351
|
-
var _rect$2, _path$2, _defs$1;
|
|
20352
|
-
function _extends$4() { return _extends$4 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$4.apply(null, arguments); }
|
|
20353
|
-
var SvgAddEntry = function SvgAddEntry(props) {
|
|
20354
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
|
|
20355
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
20356
|
-
width: 24,
|
|
20357
|
-
height: 24,
|
|
20358
|
-
fill: "none"
|
|
20359
|
-
}, props), _rect$2 || (_rect$2 = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
20360
|
-
width: 10.95,
|
|
20361
|
-
height: 10.95,
|
|
20362
|
-
x: 10.613,
|
|
20363
|
-
y: 3.15,
|
|
20364
|
-
fill: "#1F1F1F",
|
|
20365
|
-
stroke: "url(#add-entry_svg__a)",
|
|
20366
|
-
strokeWidth: 0.3,
|
|
20367
|
-
opacity: 0.795,
|
|
20368
|
-
rx: 1.05
|
|
20369
|
-
})), /*#__PURE__*/React__namespace.createElement("foreignObject", {
|
|
20370
|
-
width: 23.468,
|
|
20371
|
-
height: 20.501,
|
|
20372
|
-
x: -1.543,
|
|
20373
|
-
y: 3.499
|
|
20374
|
-
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
20375
|
-
xmlns: "http://www.w3.org/1999/xhtml",
|
|
20376
|
-
style: {
|
|
20377
|
-
backdropFilter: "blur(1.63px)",
|
|
20378
|
-
clipPath: "url(#add-entry_svg__b)",
|
|
20379
|
-
height: "100%",
|
|
20380
|
-
width: "100%"
|
|
20381
|
-
}
|
|
20382
|
-
})), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
20383
|
-
fill: "#1F1F1F",
|
|
20384
|
-
stroke: "url(#add-entry_svg__c)",
|
|
20385
|
-
strokeWidth: 0.3,
|
|
20386
|
-
d: "M9.302 7.402a1.05 1.05 0 0 1 1.778 0l7.27 11.578a1.05 1.05 0 0 1-.89 1.608H2.92a1.05 1.05 0 0 1-.889-1.608z",
|
|
20387
|
-
"data-figma-bg-blur-radius": 3.262
|
|
20388
|
-
})), _defs$1 || (_defs$1 = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
20389
|
-
id: "add-entry_svg__a",
|
|
20390
|
-
x1: 16.851,
|
|
20391
|
-
x2: 20.384,
|
|
20392
|
-
y1: 10.392,
|
|
20393
|
-
y2: 4.767,
|
|
20394
|
-
gradientUnits: "userSpaceOnUse"
|
|
20395
|
-
}, /*#__PURE__*/React__namespace.createElement("stop", {
|
|
20396
|
-
stopColor: "#fff",
|
|
20397
|
-
stopOpacity: 0.01
|
|
20398
|
-
}), /*#__PURE__*/React__namespace.createElement("stop", {
|
|
20399
|
-
offset: 1,
|
|
20400
|
-
stopColor: "#fff"
|
|
20401
|
-
})), /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
20402
|
-
id: "add-entry_svg__c",
|
|
20403
|
-
x1: 21.47,
|
|
20404
|
-
x2: 12.314,
|
|
20405
|
-
y1: 15.036,
|
|
20406
|
-
y2: 5.769,
|
|
20407
|
-
gradientUnits: "userSpaceOnUse"
|
|
20408
|
-
}, /*#__PURE__*/React__namespace.createElement("stop", {
|
|
20409
|
-
stopColor: "#fff",
|
|
20410
|
-
stopOpacity: 0.01
|
|
20411
|
-
}), /*#__PURE__*/React__namespace.createElement("stop", {
|
|
20412
|
-
offset: 1,
|
|
20413
|
-
stopColor: "#fff"
|
|
20414
|
-
})), /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
20415
|
-
id: "add-entry_svg__b",
|
|
20416
|
-
transform: "translate(1.543 -3.499)"
|
|
20417
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
20418
|
-
d: "M9.302 7.402a1.05 1.05 0 0 1 1.778 0l7.27 11.578a1.05 1.05 0 0 1-.89 1.608H2.92a1.05 1.05 0 0 1-.889-1.608z"
|
|
20419
|
-
})))));
|
|
20420
|
-
};
|
|
20421
|
-
|
|
20422
|
-
var _path$1, _path2$1, _path3;
|
|
20423
|
-
function _extends$3() { return _extends$3 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$3.apply(null, arguments); }
|
|
20424
|
-
var SvgBoundary = function SvgBoundary(props) {
|
|
20425
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
20426
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
20427
|
-
width: 16,
|
|
20428
|
-
height: 16,
|
|
20429
|
-
fill: "none"
|
|
20430
|
-
}, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
20431
|
-
fill: "#1DBEAC",
|
|
20432
|
-
fillRule: "evenodd",
|
|
20433
|
-
d: "M3.385 2h9.23C13.38 2 14 2.62 14 3.385v9.23C14 13.38 13.38 14 12.615 14h-9.23C2.62 14 2 13.38 2 12.615v-9.23C2 2.62 2.62 2 3.385 2m9.692 1.385a.46.46 0 0 0-.462-.462h-9.23a.46.46 0 0 0-.462.462v9.23c0 .255.207.462.462.462h9.23a.46.46 0 0 0 .462-.462z",
|
|
20434
|
-
clipRule: "evenodd",
|
|
20435
|
-
opacity: 0.602
|
|
20436
|
-
})), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
20437
|
-
fill: "#1DBEAC",
|
|
20438
|
-
d: "M12.615 2.923c.255 0 .462.207.462.462v9.23a.46.46 0 0 1-.462.462h-9.23a.46.46 0 0 1-.462-.462v-9.23c0-.255.207-.462.462-.462z",
|
|
20439
|
-
opacity: 0.152
|
|
20440
|
-
})), _path3 || (_path3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
20441
|
-
fill: "#1DBEAC",
|
|
20442
|
-
fillRule: "evenodd",
|
|
20443
|
-
d: "M2.833 2a.833.833 0 1 0 0 1.667.833.833 0 0 0 0-1.667m0 10.333a.833.833 0 1 0 0 1.667.833.833 0 0 0 0-1.667m9.5-9.5a.833.833 0 1 1 1.667 0 .833.833 0 0 1-1.667 0m.834 9.5a.833.833 0 1 0 0 1.667.833.833 0 0 0 0-1.667M6.49 10.333s.335-4.388 3.451-5.666c-1.725 2.439-1.725 5.666-1.725 5.666zm2.305 0s.548-4.108 2.872-4.816c-1.071 1.7-1.071 4.816-1.071 4.816zM6.87 5.517c-2.384 1.42-2.537 4.816-2.537 4.816h1.582s-.21-2.698.955-4.816",
|
|
20444
|
-
clipRule: "evenodd"
|
|
20445
|
-
})));
|
|
20446
|
-
};
|
|
20447
|
-
|
|
20448
|
-
var _path, _path2, _rect$1, _rect2$1;
|
|
20449
|
-
function _extends$2() { return _extends$2 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$2.apply(null, arguments); }
|
|
20450
|
-
var SvgLimitIsland = function SvgLimitIsland(props) {
|
|
20451
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
20452
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
20453
|
-
width: 16,
|
|
20454
|
-
height: 16,
|
|
20455
|
-
fill: "none"
|
|
20456
|
-
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
20457
|
-
fill: "#FFA077",
|
|
20458
|
-
d: "M11.725 6.714c-1.019-.137-2.516-1.488-1.9-2.14.588-.621 1.91.344 1.9 2.14"
|
|
20459
|
-
})), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
20460
|
-
fill: "#FF5D17",
|
|
20461
|
-
d: "M11.195 3.637c-.863.109-.623 2.341.354 3.024 1.603.79 2.575-.099 2.517-.459-.072-.445-.983-1.014-2.029-.274.455-.92-.08-2.387-.842-2.291M10.004 9.084l.308.87c1.202.178 2.002.494 2.002.856 0 .556-1.887 1.007-4.215 1.007-2.329 0-4.216-.451-4.217-1.007 0-.334.683-.63 1.733-.812l.593-1.679zm-.777-2.197.518 1.463-3.312-.667.443-1.253zM7.467 4.76a.535.535 0 0 1 1.01 0l.493 1.398L7.1 5.794z"
|
|
20462
|
-
})), _rect$1 || (_rect$1 = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
20463
|
-
width: 14.237,
|
|
20464
|
-
height: 10.667,
|
|
20465
|
-
x: 0.882,
|
|
20466
|
-
y: 2.667,
|
|
20467
|
-
fill: "#F50",
|
|
20468
|
-
opacity: 0.15,
|
|
20469
|
-
rx: 2
|
|
20470
|
-
})), _rect2$1 || (_rect2$1 = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
20471
|
-
width: 14.237,
|
|
20472
|
-
height: 10.667,
|
|
20473
|
-
x: 0.882,
|
|
20474
|
-
y: 2.667,
|
|
20475
|
-
stroke: "#FF5D17",
|
|
20476
|
-
strokeWidth: 0.867,
|
|
20477
|
-
rx: 2
|
|
20478
|
-
})));
|
|
20479
|
-
};
|
|
20480
|
-
|
|
20481
|
-
var _rect, _rect2, _rect3, _rect4, _g$1;
|
|
20482
|
-
function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
|
|
20483
|
-
var SvgVisionFence = function SvgVisionFence(props) {
|
|
20484
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
20485
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
20486
|
-
width: 16,
|
|
20487
|
-
height: 16,
|
|
20488
|
-
fill: "none"
|
|
20489
|
-
}, props), _rect || (_rect = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
20490
|
-
width: 14.333,
|
|
20491
|
-
height: 10.667,
|
|
20492
|
-
x: 0.833,
|
|
20493
|
-
y: 2.667,
|
|
20494
|
-
fill: "#B1D9FF",
|
|
20495
|
-
rx: 2.667
|
|
20496
|
-
})), _rect2 || (_rect2 = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
20497
|
-
width: 13.333,
|
|
20498
|
-
height: 9.667,
|
|
20499
|
-
x: 1.333,
|
|
20500
|
-
y: 3.167,
|
|
20501
|
-
stroke: "#5C9DFF",
|
|
20502
|
-
strokeDasharray: "6.33 6.33",
|
|
20503
|
-
rx: 1.333
|
|
20504
|
-
})), _rect3 || (_rect3 = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
20505
|
-
width: 6,
|
|
20506
|
-
height: 6,
|
|
20507
|
-
x: 5,
|
|
20508
|
-
y: 4.833,
|
|
20509
|
-
fill: "#B1D9FF",
|
|
20510
|
-
rx: 3
|
|
20511
|
-
})), /*#__PURE__*/React__namespace.createElement("mask", {
|
|
20512
|
-
id: "visionFence_svg__a",
|
|
20513
|
-
width: 6,
|
|
20514
|
-
height: 6,
|
|
20515
|
-
x: 5,
|
|
20516
|
-
y: 5,
|
|
20517
|
-
maskUnits: "userSpaceOnUse",
|
|
20518
|
-
style: {
|
|
20519
|
-
maskType: "alpha"
|
|
20520
|
-
}
|
|
20521
|
-
}, _rect4 || (_rect4 = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
20522
|
-
width: 5.333,
|
|
20523
|
-
height: 5.333,
|
|
20524
|
-
x: 5.333,
|
|
20525
|
-
y: 5.5,
|
|
20526
|
-
fill: "#B1D9FF",
|
|
20527
|
-
rx: 2.667
|
|
20528
|
-
}))), _g$1 || (_g$1 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
20529
|
-
fill: "#5C9DFF",
|
|
20530
|
-
mask: "url(#visionFence_svg__a)"
|
|
20531
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
20532
|
-
d: "m8.838 3.395.636.636-5.42 5.421-.637-.636zM9.896 4.452l.637.637-5.422 5.42-.636-.635zM10.954 5.51l.636.637-5.421 5.421-.636-.636zM12.172 6.547l.636.637-5.421 5.42-.636-.635z"
|
|
20533
|
-
}))));
|
|
20534
|
-
};
|
|
20535
|
-
|
|
20536
|
-
var _g, _defs;
|
|
20537
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
20538
|
-
var SvgDoodle = function SvgDoodle(props) {
|
|
20539
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
20540
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
20541
|
-
width: 16,
|
|
20542
|
-
height: 16,
|
|
20543
|
-
fill: "none"
|
|
20544
|
-
}, props), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
|
|
20545
|
-
clipPath: "url(#doodle_svg__a)"
|
|
20546
|
-
}, /*#__PURE__*/React__namespace.createElement("g", {
|
|
20547
|
-
clipPath: "url(#doodle_svg__b)"
|
|
20548
|
-
}, /*#__PURE__*/React__namespace.createElement("rect", {
|
|
20549
|
-
width: 14.237,
|
|
20550
|
-
height: 10.667,
|
|
20551
|
-
x: 0.333,
|
|
20552
|
-
y: 4.332,
|
|
20553
|
-
fill: "#CBFCF7",
|
|
20554
|
-
stroke: "#9AEEE5",
|
|
20555
|
-
strokeWidth: 0.867,
|
|
20556
|
-
rx: 2
|
|
20557
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
20558
|
-
fill: "#F2FFFD",
|
|
20559
|
-
d: "M1.374 9.88a4 4 0 0 0 4 4h.546l.514-1.524c.073-.216-.087-.443-.312-.48-1.415-.229-3.6-1.485-4.399-4.639a.35.35 0 0 0-.135-.197c-.138.405-.214.84-.214 1.293z"
|
|
20560
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
20561
|
-
fill: "#50D0C2",
|
|
20562
|
-
d: "M15.814 2.13c-.352 2.267-6.501 9.305-8.003 9.43a.282.282 0 0 1-.238-.455L15.565.828c.398.332.293 1.015.249 1.303"
|
|
20563
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
20564
|
-
fill: "#50D0C2",
|
|
20565
|
-
d: "M14.208.95c-2.147.946-7.434 8.618-7.15 10.058a.2.2 0 0 0 .017.047.295.295 0 0 0 .498.051L15.565.826c-.437-.28-1.084.003-1.357.123"
|
|
20566
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
20567
|
-
fill: "#9CE7DE",
|
|
20568
|
-
d: "M7.76 11.558a.282.282 0 0 1-.187-.453.295.295 0 0 1-.498-.05.2.2 0 0 1-.016-.048c-.108-.55.598-2.01 1.63-3.658l2.297 1.689c-1.348 1.415-2.6 2.473-3.174 2.522a.2.2 0 0 1-.053-.002"
|
|
20569
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
20570
|
-
fill: "#50D0C2",
|
|
20571
|
-
d: "M5.602 11.02c.658-.873 1.769-1.145 2.482-.607.714.537.759 1.68.1 2.553-.657.873-2.733.94-2.733.94s-.507-2.013.15-2.886"
|
|
20572
|
-
})))), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
20573
|
-
id: "doodle_svg__a"
|
|
20574
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
20575
|
-
fill: "#fff",
|
|
20576
|
-
d: "M0 0h16v16H0z"
|
|
20577
|
-
})), /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
20578
|
-
id: "doodle_svg__b"
|
|
20579
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
20580
|
-
fill: "#fff",
|
|
20581
|
-
d: "M0 0h16v16H0z"
|
|
20582
|
-
})))));
|
|
20583
|
-
};
|
|
20584
|
-
|
|
20585
|
-
var HandleElementMapType;
|
|
20586
|
-
(function (HandleElementMapType) {
|
|
20587
|
-
HandleElementMapType["name"] = "name";
|
|
20588
|
-
HandleElementMapType["focus"] = "focus";
|
|
20589
|
-
HandleElementMapType["delete"] = "delete";
|
|
20590
|
-
HandleElementMapType["timePeriod"] = "timePeriod";
|
|
20591
|
-
HandleElementMapType["area"] = "area";
|
|
20592
|
-
HandleElementMapType["dooleExist"] = "dooleExist";
|
|
20593
|
-
})(HandleElementMapType || (HandleElementMapType = {}));
|
|
20594
|
-
const DATE_TYPE_MAP = [
|
|
20595
|
-
{ type: exports.DataType.BOUNDARY, label: 'Boundary', icon: jsxRuntime.jsx(SvgBoundary, {}) },
|
|
20596
|
-
{
|
|
20597
|
-
type: exports.DataType.OBSTACLE,
|
|
20598
|
-
paramType: exports.RecordTypeEnum.OBSTACLE,
|
|
20599
|
-
label: 'Off-limit island',
|
|
20600
|
-
icon: jsxRuntime.jsx(SvgLimitIsland, {}),
|
|
20601
|
-
},
|
|
20602
|
-
// { type: DataType.CHANNEL, label: 'Channel', icon: <ChannelIcon /> },
|
|
20603
|
-
{
|
|
20604
|
-
type: exports.DataType.VISION_OFF,
|
|
20605
|
-
paramType: exports.RecordTypeEnum.VISI_OFF,
|
|
20606
|
-
label: 'VisionFence-off zone',
|
|
20607
|
-
icon: jsxRuntime.jsx(SvgVisionFence, {}),
|
|
20608
|
-
},
|
|
20609
|
-
{
|
|
20610
|
-
type: exports.DataType.DOODLE,
|
|
20611
|
-
paramType: exports.RecordTypeEnum.DOODLE,
|
|
20612
|
-
label: 'Doodle',
|
|
20613
|
-
icon: jsxRuntime.jsx(SvgDoodle, {}),
|
|
20614
|
-
},
|
|
20615
|
-
];
|
|
20616
|
-
({
|
|
20617
|
-
[exports.DataType.BOUNDARY]: {
|
|
20618
|
-
},
|
|
20619
|
-
[exports.DataType.OBSTACLE]: {
|
|
20620
|
-
},
|
|
20621
|
-
[exports.DataType.CHANNEL]: {
|
|
20622
|
-
},
|
|
20623
|
-
[exports.DataType.VISION_OFF]: {
|
|
20624
|
-
},
|
|
20625
|
-
[exports.DataType.DOODLE]: {
|
|
20626
|
-
},
|
|
20627
|
-
[exports.DataType.PATH]: undefined,
|
|
20628
|
-
[exports.DataType.ANTENNA]: undefined,
|
|
20629
|
-
[exports.DataType.CHARGING_PILE]: undefined,
|
|
20630
|
-
});
|
|
20631
|
-
|
|
20632
|
-
var css_248z$1 = ".ant-modal .ant-modal-body .ant-modal-confirm-title {\n text-align: center;\n}\n.ant-modal .ant-modal-body .ant-modal-confirm-btns {\n margin-top: 24px;\n}\n.ant-modal .ant-modal-body .ant-modal-confirm-btns .ant-btn + .ant-btn {\n margin-left: 24px;\n}\n\n.index-module_modal__fkxhn.index-module_center__d461v .ant-modal-title {\n text-align: center;\n padding: 10px 20px 0;\n font-size: 18px;\n}\n.index-module_modal__fkxhn.index-module_center__d461v .ant-modal-header {\n margin-bottom: 24px;\n}\n.index-module_modal__fkxhn.index-module_center__d461v .ant-modal .ant-modal-footer {\n margin-top: 24px;\n}\n.index-module_modal__fkxhn.index-module_center__d461v .ant-modal .ant-modal-footer .ant-btn + .ant-btn {\n margin-left: 24px;\n}";
|
|
20633
|
-
var styles$1 = {"modal":"index-module_modal__fkxhn","center":"index-module_center__d461v"};
|
|
20634
|
-
styleInject(css_248z$1);
|
|
20635
|
-
|
|
20636
|
-
const CustomModal = ({ children, titleCenter, hasMinHeight, height, ...props }) => {
|
|
20637
|
-
return (jsxRuntime.jsx(antd.Modal, { centered: true, styles: {
|
|
20638
|
-
body: {
|
|
20639
|
-
maxHeight: height ? `${height}px` : 'calc(100vh - 200px)',
|
|
20640
|
-
minHeight: hasMinHeight ? '520px' : undefined,
|
|
20641
|
-
overflow: 'auto',
|
|
20642
|
-
},
|
|
20643
|
-
}, wrapClassName: classNames(styles$1.modal, {
|
|
20644
|
-
[styles$1.center]: titleCenter,
|
|
20645
|
-
}), cancelButtonProps: { color: 'primary', variant: 'outlined' }, cancelText: 'Cancel', ...props, children: children }));
|
|
20646
|
-
};
|
|
20647
|
-
|
|
20648
|
-
var css_248z = ".index-module_doodleModal__EGNPW .index-module_title__ViZuB {\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: rgb(29, 29, 29);\n}\n.index-module_doodleModal__EGNPW .index-module_content__h-60T {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n max-height: 230px;\n overflow-y: auto;\n width: 470px;\n margin: 20px auto 0;\n}\n.index-module_doodleModal__EGNPW .index-module_content__h-60T .index-module_item__dvoq7 {\n width: 70px;\n height: 70px;\n padding: 10px;\n border-radius: 8px;\n cursor: pointer;\n border: 2px solid transparent;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease;\n position: relative;\n background: rgb(233, 242, 241);\n}\n.index-module_doodleModal__EGNPW .index-module_content__h-60T .index-module_item__dvoq7:hover {\n background-color: rgba(0, 0, 0, 0.05);\n}\n.index-module_doodleModal__EGNPW .index-module_content__h-60T .index-module_item__dvoq7.index-module_active__1OHfd {\n border: 2px solid #ff5a00;\n background-color: rgba(110, 220, 207, 0.1);\n}\n.index-module_doodleModal__EGNPW .index-module_content__h-60T .index-module_item__dvoq7.index-module_active__1OHfd .index-module_selectIcon__EFQF- {\n display: block;\n}\n.index-module_doodleModal__EGNPW .index-module_content__h-60T .index-module_item__dvoq7 .index-module_svgImage__2OT8- {\n width: 100%;\n height: 100%;\n}\n.index-module_doodleModal__EGNPW .index-module_content__h-60T .index-module_item__dvoq7 .index-module_svgImage__2OT8- svg {\n width: 100%;\n height: 100%;\n}\n.index-module_doodleModal__EGNPW .index-module_content__h-60T .index-module_item__dvoq7 .index-module_selectIcon__EFQF- {\n position: absolute;\n bottom: 4px;\n right: 4px;\n display: none;\n}";
|
|
20649
|
-
var styles = {"doodleModal":"index-module_doodleModal__EGNPW","title":"index-module_title__ViZuB","content":"index-module_content__h-60T","item":"index-module_item__dvoq7","active":"index-module_active__1OHfd","svgImage":"index-module_svgImage__2OT8-"};
|
|
20650
|
-
styleInject(css_248z);
|
|
20651
|
-
|
|
20652
|
-
const DoodleModal = ({ open, onSelect, setOpen, doodleList, centerPoint }) => {
|
|
20653
|
-
const { editMapInfo, setEditMapInfo, onHandleEnterRecord } = useMapEditContext();
|
|
20654
|
-
const [selectedDoodle, setSelectedDoodle] = React.useState(null);
|
|
20655
|
-
const noNeed = React.useMemo(() => {
|
|
20656
|
-
return '1234567890QWERTYUIOPASDFGHJKLZXCVBNM';
|
|
20657
|
-
}, []);
|
|
20658
|
-
// 选择 Doodle
|
|
20659
|
-
const handleSelectDoodle = React.useCallback((item) => {
|
|
20660
|
-
setSelectedDoodle(item);
|
|
20661
|
-
}, []);
|
|
20662
|
-
// 确认选择
|
|
20663
|
-
const handleConfirm = React.useCallback(() => {
|
|
20664
|
-
if (selectedDoodle) {
|
|
20665
|
-
const newDoodle = initDoodle();
|
|
20666
|
-
const svg = selectedDoodle?.svgStr;
|
|
20667
|
-
const minLength = selectedDoodle.minLength;
|
|
20668
|
-
const parseSvg = SvgParserNative.parseSvg(svg);
|
|
20669
|
-
const svgMinLength = parseSvg.height / SCALE_FACTOR;
|
|
20670
|
-
// 使用获取到的 SVG 内容,如果没有获取到则使用 URL
|
|
20671
|
-
newDoodle.svg = svg;
|
|
20672
|
-
newDoodle.scale = minLength / svgMinLength;
|
|
20673
|
-
newDoodle.direction = 0;
|
|
20674
|
-
newDoodle.center = restorePoint(centerPoint);
|
|
20675
|
-
onHandleEnterRecord?.({
|
|
20676
|
-
type: 1,
|
|
20677
|
-
function: 0,
|
|
20678
|
-
})?.then(() => {
|
|
20679
|
-
setEditMapInfo({
|
|
20680
|
-
...editMapInfo,
|
|
20681
|
-
historyList: [
|
|
20682
|
-
{
|
|
20683
|
-
selectElement: newDoodle,
|
|
20684
|
-
},
|
|
20685
|
-
],
|
|
20686
|
-
currentHistoryIndex: 0,
|
|
20687
|
-
createMode: exports.CreateStatus.COMPLETED,
|
|
20688
|
-
elementType: exports.DataType.DOODLE,
|
|
20689
|
-
selectElement: newDoodle,
|
|
20690
|
-
isShowDrag: true,
|
|
20691
|
-
});
|
|
20692
|
-
setOpen(false);
|
|
20693
|
-
onSelect?.(svg);
|
|
20694
|
-
}, (error) => {
|
|
20695
|
-
antd.message.error('Save failed, please try again');
|
|
20696
|
-
});
|
|
20697
|
-
}
|
|
20698
|
-
}, [selectedDoodle, setEditMapInfo, editMapInfo, setOpen, onSelect, centerPoint]);
|
|
20699
|
-
return (jsxRuntime.jsx(CustomModal, { width: 560, title: "Create doodle", titleCenter: true, open: open, onOk: handleConfirm, onCancel: () => setOpen(false), okButtonProps: { disabled: !selectedDoodle }, afterClose: () => setSelectedDoodle(null), okText: "Create", cancelText: "Cancel", children: jsxRuntime.jsxs("div", { className: styles.doodleModal, children: [jsxRuntime.jsx("div", { className: styles.title, children: "Select the doodle that you want to create" }), jsxRuntime.jsx("div", { className: styles.content, children: doodleList
|
|
20700
|
-
?.filter((item) => !noNeed.includes(item.name))
|
|
20701
|
-
.map((item) => {
|
|
20702
|
-
return (jsxRuntime.jsx("div", { className: classNames(styles.item, {
|
|
20703
|
-
[styles.active]: selectedDoodle?.svg === item.svg,
|
|
20704
|
-
}), onClick: () => handleSelectDoodle(item), children: jsxRuntime.jsx("div", { className: styles.svgImage, dangerouslySetInnerHTML: { __html: item?.svgStr } }) }, item.id));
|
|
20705
|
-
}) })] }) }));
|
|
20706
|
-
};
|
|
20707
|
-
|
|
20708
|
-
const AddEntry = ({ doodleList, disabledObstacles, editMap }) => {
|
|
20709
|
-
const { svgRef } = useSvgEditContext();
|
|
20710
|
-
const { editMapInfo, setEditMapInfo, onHandleEnterRecord } = useMapEditContext();
|
|
20711
|
-
const divRef = React.useRef(null);
|
|
20712
|
-
const [open, setOpen] = React.useState(false);
|
|
20713
|
-
const [doodleOpen, setDoodleOpen] = React.useState(false);
|
|
20714
|
-
const centerPoint = React.useMemo(() => {
|
|
20715
|
-
if (!svgRef)
|
|
20716
|
-
return null;
|
|
20717
|
-
const baseVal = svgRef?.viewBox.baseVal;
|
|
20718
|
-
const center = [
|
|
20719
|
-
baseVal?.x + (baseVal?.width || 0) / 2,
|
|
20720
|
-
baseVal?.y + (baseVal?.height || 0) / 2,
|
|
20721
|
-
];
|
|
20722
|
-
return center;
|
|
20723
|
-
}, [svgRef?.viewBox?.baseVal?.x]);
|
|
20724
|
-
const centerBounds = React.useMemo(() => {
|
|
20725
|
-
if (!svgRef)
|
|
20726
|
-
return null;
|
|
20727
|
-
const elementWidth = 50 * 10;
|
|
20728
|
-
const [minX, minY, maxX, maxY] = [
|
|
20729
|
-
centerPoint[0] - elementWidth / 2,
|
|
20730
|
-
centerPoint[1] - elementWidth / 2,
|
|
20731
|
-
centerPoint[0] + elementWidth / 2,
|
|
20732
|
-
centerPoint[1] + elementWidth / 2,
|
|
20733
|
-
];
|
|
20734
|
-
const elementPoints = [
|
|
20735
|
-
[minX, minY],
|
|
20736
|
-
[minX, maxY],
|
|
20737
|
-
[maxX, maxY],
|
|
20738
|
-
[maxX, minY],
|
|
20739
|
-
];
|
|
20740
|
-
return elementPoints;
|
|
20741
|
-
}, [centerPoint]);
|
|
20742
|
-
const addNewElement = React.useCallback((type, item) => {
|
|
20743
|
-
setOpen(false);
|
|
20744
|
-
let newElement = null;
|
|
20745
|
-
if (type === exports.DataType.BOUNDARY) {
|
|
20746
|
-
newElement = initBoundary();
|
|
20747
|
-
}
|
|
20748
|
-
else if (type === exports.DataType.OBSTACLE) {
|
|
20749
|
-
newElement = initObstacle();
|
|
20750
|
-
}
|
|
20751
|
-
else if (type === exports.DataType.CHANNEL) {
|
|
20752
|
-
newElement = initChannel();
|
|
20753
|
-
}
|
|
20754
|
-
else if (type === exports.DataType.VISION_OFF) {
|
|
20755
|
-
newElement = initVisionOff();
|
|
20756
|
-
newElement.points = centerBounds;
|
|
20757
|
-
}
|
|
20758
|
-
else if (type === exports.DataType.DOODLE) {
|
|
20759
|
-
return setDoodleOpen(true);
|
|
20760
|
-
}
|
|
20761
|
-
onHandleEnterRecord?.({
|
|
20762
|
-
type: item?.paramType,
|
|
20763
|
-
function: item?.type === exports.DataType.OBSTACLE ? 0 : undefined,
|
|
20764
|
-
})?.then(() => {
|
|
20765
|
-
setEditMapInfo({
|
|
20766
|
-
...editMapInfo,
|
|
20767
|
-
historyList: [
|
|
20768
|
-
{
|
|
20769
|
-
selectElement: newElement,
|
|
20770
|
-
},
|
|
20771
|
-
],
|
|
20772
|
-
currentHistoryIndex: 0,
|
|
20773
|
-
createMode: type === exports.DataType.VISION_OFF ? exports.CreateStatus.COMPLETED : exports.CreateStatus.CREATING,
|
|
20774
|
-
elementType: type,
|
|
20775
|
-
selectElement: newElement,
|
|
20776
|
-
});
|
|
20777
|
-
}, (errorText) => {
|
|
20778
|
-
antd.message.error('Save failed, please try again');
|
|
20779
|
-
});
|
|
20780
|
-
}, [centerBounds]);
|
|
20781
|
-
const addItems = React.useMemo(() => {
|
|
20782
|
-
return DATE_TYPE_MAP?.filter((item) => {
|
|
20783
|
-
if (item.type === exports.DataType.OBSTACLE) {
|
|
20784
|
-
return !disabledObstacles;
|
|
20785
|
-
}
|
|
20786
|
-
return item.type !== exports.DataType.BOUNDARY;
|
|
20787
|
-
});
|
|
20788
|
-
}, [disabledObstacles]);
|
|
20789
|
-
// console.log('addEntry->', editMapInfo, editMap);
|
|
20790
|
-
if (editMapInfo.createMode || editMapInfo.editMap || !editMap) {
|
|
20791
|
-
return null;
|
|
20792
|
-
}
|
|
20793
|
-
return (jsxRuntime.jsxs("div", { ref: divRef, className: styles$2.addEntry, children: [jsxRuntime.jsx(antd.Popover, { open: open, onOpenChange: setOpen, arrow: false, placement: "leftTop", content: addItems?.map((item) => {
|
|
20794
|
-
return (jsxRuntime.jsxs("div", { className: styles$2.addItem, onClick: () => {
|
|
20795
|
-
addNewElement(item.type, item);
|
|
20796
|
-
}, children: [jsxRuntime.jsx("div", { className: styles$2.icon, children: item?.icon }), jsxRuntime.jsx("div", { className: styles$2.label, children: item?.label })] }, item.label));
|
|
20797
|
-
}), children: jsxRuntime.jsx("div", { className: styles$2.icon, children: jsxRuntime.jsx(SvgAddEntry, {}) }) }), jsxRuntime.jsx(DoodleModal, { centerPoint: centerPoint, doodleList: doodleList, open: doodleOpen, onOk: () => setDoodleOpen(false), setOpen: setDoodleOpen })] }));
|
|
20341
|
+
return isVisible ? (jsxRuntime.jsx("div", { className: styles.crosshair, children: jsxRuntime.jsx(SvgMobileAddPoint, {}) })) : null;
|
|
20798
20342
|
};
|
|
20799
20343
|
|
|
20800
20344
|
// 验证GPS坐标是否有效
|
|
@@ -21363,7 +20907,7 @@ modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onMapLoad, on
|
|
|
21363
20907
|
}
|
|
21364
20908
|
// console.log('mowerrender------->', svgViewBox);
|
|
21365
20909
|
// 使用goole maps自定义叠加层,返回debug信息(如果启用)
|
|
21366
|
-
return (jsxRuntime.jsx(CommonContextProvider, { value: commonValue, children: jsxRuntime.jsx(SvgEditContextProvider, { value: svgEditValue, children: jsxRuntime.jsxs(MapEditContextProvider, { value: mapEditValue, children: [platform !== exports.PlatformType.H5 && (jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
20910
|
+
return (jsxRuntime.jsx(CommonContextProvider, { value: commonValue, children: jsxRuntime.jsx(SvgEditContextProvider, { value: svgEditValue, children: jsxRuntime.jsxs(MapEditContextProvider, { value: mapEditValue, children: [platform !== exports.PlatformType.H5 && (jsxRuntime.jsx(jsxRuntime.Fragment, {})), platform === exports.PlatformType.H5 && jsxRuntime.jsx(Crosshair, {}), jsxRuntime.jsxs(OverlayViewF, { onLoad: (lay) => {
|
|
21367
20911
|
setOverlay(lay);
|
|
21368
20912
|
}, onDraw: (style) => {
|
|
21369
20913
|
const layout = Object.keys(style).reduce((pre, cur) => {
|