@fleet-frontend/mower-maps 0.2.0-beta.20 → 0.2.0-beta.22
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 +79 -535
- package/dist/index.js +79 -535
- 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.esm.js
CHANGED
|
@@ -2,7 +2,6 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { memo, useMemo, useEffect, useState, useRef, useCallback, createContext, useContext, forwardRef, useImperativeHandle, useLayoutEffect } from 'react';
|
|
4
4
|
import ReactDOM from 'react-dom';
|
|
5
|
-
import { message, Modal, Popover } from 'antd';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* 常量和枚举类型定义
|
|
@@ -202,7 +201,7 @@ class ObstacleData extends BaseData {
|
|
|
202
201
|
this.status = originalData?.status ?? 1;
|
|
203
202
|
this.start_timestamp = originalData?.start_timestamp;
|
|
204
203
|
this.end_timestamp = originalData?.end_timestamp;
|
|
205
|
-
this.name = originalData?.name || '
|
|
204
|
+
this.name = originalData?.name || '';
|
|
206
205
|
this.style = style;
|
|
207
206
|
}
|
|
208
207
|
}
|
|
@@ -8674,16 +8673,16 @@ function styleInject(css, ref) {
|
|
|
8674
8673
|
}
|
|
8675
8674
|
}
|
|
8676
8675
|
|
|
8677
|
-
var css_248z$
|
|
8678
|
-
var styles$
|
|
8679
|
-
styleInject(css_248z$
|
|
8676
|
+
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}";
|
|
8677
|
+
var styles$6 = {"edit":"index-module_edit__-5VvX","border":"index-module_border__JdNLM","drag":"index-module_drag__uvdPG","move":"index-module_move__mZF8s"};
|
|
8678
|
+
styleInject(css_248z$6);
|
|
8680
8679
|
|
|
8681
8680
|
const DragHandle = ({ onDragStart, isDragging }) => {
|
|
8682
8681
|
// 在PC设备上隐藏拖拽手柄
|
|
8683
8682
|
if (!isMobileDevice()) {
|
|
8684
8683
|
return null;
|
|
8685
8684
|
}
|
|
8686
|
-
return (jsx("div", { className: styles$
|
|
8685
|
+
return (jsx("div", { className: styles$6.move, onMouseDown: (e) => {
|
|
8687
8686
|
onDragStart(e);
|
|
8688
8687
|
}, onTouchStart: (e) => onDragStart(e), onMouseUp: (e) => {
|
|
8689
8688
|
// onDragEnd(e);
|
|
@@ -8711,7 +8710,7 @@ const MapDrag = ({ map: _map, dragCallbacks, onBoundaryLabelsCollapse, onTransfo
|
|
|
8711
8710
|
if (!isDragMap) {
|
|
8712
8711
|
return null;
|
|
8713
8712
|
}
|
|
8714
|
-
return (jsxs("div", { ref: containerRef, className: styles$
|
|
8713
|
+
return (jsxs("div", { ref: containerRef, className: styles$6.edit, style: { cursor: isDragging ? 'grabbing' : 'move' }, children: [jsx("div", { className: styles$6.border }), jsx("div", { className: styles$6.drag, onMouseDown: handleDragStartEvent, onTouchStart: handleDragStartEvent }), jsx(DragHandle, { onDragStart: handleDragStartEvent, isDragging: isDragging })] }));
|
|
8715
8714
|
};
|
|
8716
8715
|
|
|
8717
8716
|
/**
|
|
@@ -14434,9 +14433,9 @@ const SvgMapComponent = forwardRef(({ editMap, rotate, mapData, pathData, modelT
|
|
|
14434
14433
|
// 设置显示名称以便调试
|
|
14435
14434
|
SvgMapComponent.displayName = 'SvgMapComponent';
|
|
14436
14435
|
|
|
14437
|
-
var css_248z$
|
|
14438
|
-
var styles$
|
|
14439
|
-
styleInject(css_248z$
|
|
14436
|
+
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}";
|
|
14437
|
+
var styles$5 = {"mowerPosition":"index-module_mowerPosition__yLpIU"};
|
|
14438
|
+
styleInject(css_248z$5);
|
|
14440
14439
|
|
|
14441
14440
|
const usePosition = ({ mowerPositionData, viewBox, modelType, hasEdger, mapData, realTimeData, onMowingPositionChange, }) => {
|
|
14442
14441
|
// DOM 元素引用,用于直接操作
|
|
@@ -14662,7 +14661,7 @@ const MowerPosition = React__default.memo(({ editMap, mowerPositionData, viewBox
|
|
|
14662
14661
|
pointerEvents: 'none',
|
|
14663
14662
|
zIndex: 1000,
|
|
14664
14663
|
}), []);
|
|
14665
|
-
return (jsx("div", { className: styles$
|
|
14664
|
+
return (jsx("div", { className: styles$5.mowerPosition, style: containerStyle, children: jsx("div", { ref: elementRef, className: "mower-position", style: {
|
|
14666
14665
|
position: 'absolute',
|
|
14667
14666
|
width: 30,
|
|
14668
14667
|
height: 30,
|
|
@@ -14731,9 +14730,9 @@ const CharginPile = React__default.memo(({ mapData, mapConfig = {}, viewBox, rot
|
|
|
14731
14730
|
}, children: jsx("img", { src: item.imageSrc, style: { width: '100%', height: '100%', objectFit: 'contain', opacity: 1 } }) }, `pile-${idx}`))) }));
|
|
14732
14731
|
});
|
|
14733
14732
|
|
|
14734
|
-
var css_248z$
|
|
14735
|
-
var styles$
|
|
14736
|
-
styleInject(css_248z$
|
|
14733
|
+
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}";
|
|
14734
|
+
var styles$4 = {"container":"index-module_container__7IatW","boundaryLabel":"index-module_boundaryLabel__GDHFn","base":"index-module_base__qy2SG","extended":"index-module_extended__0TMAt"};
|
|
14735
|
+
styleInject(css_248z$4);
|
|
14737
14736
|
|
|
14738
14737
|
const useBoundaryLabels = ({ mapData, pathData, unitType, viewBox, mowPartitionData, realTimeData = [], }) => {
|
|
14739
14738
|
const [processStateIsMowing, updateProcessStateIsMowing] = useState(false);
|
|
@@ -14887,7 +14886,7 @@ const BoundaryLabels = React__default.memo(({ editMap, mapData, pathData, unitTy
|
|
|
14887
14886
|
zIndex: expandedId != null ? 9999 : containerZIndex,
|
|
14888
14887
|
display: editMap ? 'none' : 'block',
|
|
14889
14888
|
}), [containerZIndex, expandedId, editMap]);
|
|
14890
|
-
return (jsx("div", { className: styles$
|
|
14889
|
+
return (jsx("div", { className: styles$4.container, style: containerStyle, children: items.map((item) => (jsxs("div", { className: `${styles$4.boundaryLabel} boundary-label`, "data-boundary-id": item.id, style: {
|
|
14891
14890
|
transform: `translate(-50%, -50%) rotate(${-rotation}deg)`,
|
|
14892
14891
|
left: `${item.leftPct}%`,
|
|
14893
14892
|
top: `${item.topPct}%`,
|
|
@@ -14897,12 +14896,12 @@ const BoundaryLabels = React__default.memo(({ editMap, mapData, pathData, unitTy
|
|
|
14897
14896
|
if (onlyRead)
|
|
14898
14897
|
return;
|
|
14899
14898
|
handleClick(item.id);
|
|
14900
|
-
}, children: [jsx("div", { className: styles$
|
|
14899
|
+
}, children: [jsx("div", { className: styles$4.base, children: item.baseText }), jsxs("div", { className: styles$4.extended, style: { display: expandedId === item.id ? 'block' : 'none' }, children: [jsx("div", { style: { marginBottom: 3, fontWeight: 'bold' }, children: item.coverageText }), jsx("div", { children: item.dateText })] })] }, item.id))) }));
|
|
14901
14900
|
});
|
|
14902
14901
|
|
|
14903
|
-
var css_248z$
|
|
14904
|
-
var styles$
|
|
14905
|
-
styleInject(css_248z$
|
|
14902
|
+
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}";
|
|
14903
|
+
var styles$3 = {"container":"index-module_container__gB52e","item":"index-module_item__zHoZP","icon":"index-module_icon__CS56A","tooltip":"index-module_tooltip__NMCmR"};
|
|
14904
|
+
styleInject(css_248z$3);
|
|
14906
14905
|
|
|
14907
14906
|
const useAntennaInfo = (data = [], options = {}) => {
|
|
14908
14907
|
const { viewBox } = options;
|
|
@@ -15011,13 +15010,13 @@ const Antennas = React__default.memo(({ editMap, antennaConfig = [], viewBox, ro
|
|
|
15011
15010
|
document.addEventListener('pointerdown', handleOutside);
|
|
15012
15011
|
return () => document.removeEventListener('pointerdown', handleOutside);
|
|
15013
15012
|
}, []);
|
|
15014
|
-
return (jsx("div", { className: styles$
|
|
15013
|
+
return (jsx("div", { className: styles$3.container, style: containerStyle, children: items.map((item) => (jsxs("div", { className: `antenna-container-item ${styles$3.item}`, style: {
|
|
15015
15014
|
left: `${item.leftPct}%`,
|
|
15016
15015
|
top: `${item.topPct}%`,
|
|
15017
15016
|
transform: `translate(calc(-50% + ${item.offsetX || 0}px), calc(-50% + ${item.offsetY || 0}px)) rotate(${-rotation}deg)`,
|
|
15018
15017
|
zIndex: openType === item.type ? 10000 : containerZIndex,
|
|
15019
15018
|
pointerEvents: onlyRead ? 'none' : 'auto',
|
|
15020
|
-
}, children: [jsx("div", { className: `antenna vector-antenna antenna-${item.type} ${item.isOnline ? 'antenna-online' : 'antenna-offline'} ${styles$
|
|
15019
|
+
}, children: [jsx("div", { className: `antenna vector-antenna antenna-${item.type} ${item.isOnline ? 'antenna-online' : 'antenna-offline'} ${styles$3.icon}`, style: {}, onClick: (e) => {
|
|
15021
15020
|
e.stopPropagation();
|
|
15022
15021
|
if (onlyRead)
|
|
15023
15022
|
return;
|
|
@@ -15032,7 +15031,7 @@ const Antennas = React__default.memo(({ editMap, antennaConfig = [], viewBox, ro
|
|
|
15032
15031
|
return;
|
|
15033
15032
|
e.currentTarget.style.transform =
|
|
15034
15033
|
'scale(1)';
|
|
15035
|
-
}, children: jsx("img", { src: item.imageSrc, style: { width: '100%', height: '100%', objectFit: 'contain', opacity: 1 } }) }), jsxs("div", { className: styles$
|
|
15034
|
+
}, children: jsx("img", { src: item.imageSrc, style: { width: '100%', height: '100%', objectFit: 'contain', opacity: 1 } }) }), jsxs("div", { className: styles$3.tooltip, style: {
|
|
15036
15035
|
display: openType === item.type ? 'block' : 'none',
|
|
15037
15036
|
minWidth: item.tooltip.minWidth,
|
|
15038
15037
|
}, children: [jsx("div", { style: { marginBottom: 4, fontWeight: 600 }, children: item.tooltip.title }), jsxs("div", { style: { color: 'rgba(65, 93, 116, 1)', fontWeight: 400 }, children: [item.tooltip.statusText, item.tooltip.syncText || ''] })] })] }, `antenna-${item.type}`))) }));
|
|
@@ -15096,15 +15095,15 @@ const VertexElement = React__default.memo(({ r, stroke, fill, ...props }) => {
|
|
|
15096
15095
|
return (jsx("circle", { r: radius * overlayScale, stroke: stroke || '#fff', fill: fill || '#fff', strokeWidth: 4 * overlayScale, ...props }));
|
|
15097
15096
|
});
|
|
15098
15097
|
|
|
15099
|
-
var _path$
|
|
15100
|
-
function _extends$
|
|
15098
|
+
var _path$1;
|
|
15099
|
+
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); }
|
|
15101
15100
|
var SvgDelete = function SvgDelete(props) {
|
|
15102
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
15101
|
+
return /*#__PURE__*/React.createElement("svg", _extends$5({
|
|
15103
15102
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15104
15103
|
width: 16,
|
|
15105
15104
|
height: 16,
|
|
15106
15105
|
fill: "none"
|
|
15107
|
-
}, props), _path$
|
|
15106
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
|
|
15108
15107
|
fill: "#FD494D",
|
|
15109
15108
|
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"
|
|
15110
15109
|
})));
|
|
@@ -15282,9 +15281,9 @@ const DistanceLabels = ({ coordinates, createMode = false, editMode = false, com
|
|
|
15282
15281
|
} }))] }));
|
|
15283
15282
|
};
|
|
15284
15283
|
|
|
15285
|
-
var css_248z$
|
|
15286
|
-
var styles$
|
|
15287
|
-
styleInject(css_248z$
|
|
15284
|
+
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}";
|
|
15285
|
+
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"};
|
|
15286
|
+
styleInject(css_248z$2);
|
|
15288
15287
|
|
|
15289
15288
|
var CreateStatus;
|
|
15290
15289
|
(function (CreateStatus) {
|
|
@@ -16151,8 +16150,8 @@ const PolygonElement = ({ canSelect = false, points, fillColor = 'rgba(0, 0, 0,
|
|
|
16151
16150
|
}, [dragState.currentPosition, checkCanNotCreateAtPosition, coordinates]);
|
|
16152
16151
|
const generateVertexClassName = useMemo(() => {
|
|
16153
16152
|
if (!dragState.isDragging)
|
|
16154
|
-
return styles$
|
|
16155
|
-
return showNotCreateCursor ? styles$
|
|
16153
|
+
return styles$2.vertex;
|
|
16154
|
+
return showNotCreateCursor ? styles$2.notCreate : styles$2.dragging;
|
|
16156
16155
|
}, [dragState.isDragging, showNotCreateCursor]);
|
|
16157
16156
|
// 使用 useRef 来存储 requestAnimationFrame ID
|
|
16158
16157
|
const rafIdRef = useRef(null);
|
|
@@ -16274,15 +16273,10 @@ const PolygonElement = ({ canSelect = false, points, fillColor = 'rgba(0, 0, 0,
|
|
|
16274
16273
|
? newCoordinates
|
|
16275
16274
|
: newCoordinates.reverse();
|
|
16276
16275
|
if (showNotCreateCursor) {
|
|
16277
|
-
|
|
16278
|
-
|
|
16279
|
-
|
|
16280
|
-
|
|
16281
|
-
});
|
|
16282
|
-
}
|
|
16283
|
-
else {
|
|
16284
|
-
message.error('Unable to place here, please select a valid spot');
|
|
16285
|
-
}
|
|
16276
|
+
onHandleEvent?.(ClickEventType.MOVE_OBSTACLE_POINT_ERROR, {
|
|
16277
|
+
result: true,
|
|
16278
|
+
code: CheckObstaclePointErrorType.COMMON_ERROR,
|
|
16279
|
+
});
|
|
16286
16280
|
}
|
|
16287
16281
|
else {
|
|
16288
16282
|
onCoordinatesChange?.(result);
|
|
@@ -16450,14 +16444,14 @@ const PolygonElement = ({ canSelect = false, points, fillColor = 'rgba(0, 0, 0,
|
|
|
16450
16444
|
WebkitTouchCallout: 'none',
|
|
16451
16445
|
touchAction: 'none',
|
|
16452
16446
|
} })] }));
|
|
16453
|
-
})()] })), renderCoordinates.length >= 2 && (jsx("polygon", { className: canSelect ? styles$
|
|
16447
|
+
})()] })), renderCoordinates.length >= 2 && (jsx("polygon", { className: canSelect ? styles$2.polygonPathG : '', points: polygonPoints, fill: fillColor, fillOpacity: fillOpacity, stroke: "none" // 边框透明
|
|
16454
16448
|
, onClick: onPolygonClick })), jsxs("g", { children: [renderCoordinates.length >= 2 &&
|
|
16455
16449
|
pathSegments.map((segment, index) => {
|
|
16456
16450
|
if (segment.points.length < 2)
|
|
16457
16451
|
return null;
|
|
16458
16452
|
const pathData = createPathData(segment.points);
|
|
16459
16453
|
const isDash = segment.type === 1;
|
|
16460
|
-
return (jsx("path", { d: pathData, fill: "none", stroke: isDash ? 'none' : strokeColor, strokeWidth: strokeWidth, strokeOpacity: strokeOpacity, strokeLinecap: "round", strokeLinejoin: "round", className: canSelect ? styles$
|
|
16454
|
+
return (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: {
|
|
16461
16455
|
userSelect: 'none',
|
|
16462
16456
|
WebkitUserSelect: 'none',
|
|
16463
16457
|
WebkitTouchCallout: 'none',
|
|
@@ -16467,13 +16461,13 @@ const PolygonElement = ({ canSelect = false, points, fillColor = 'rgba(0, 0, 0,
|
|
|
16467
16461
|
dashPaths.map((segment, index) => {
|
|
16468
16462
|
if (segment.points.length < 2)
|
|
16469
16463
|
return null;
|
|
16470
|
-
return (jsx(DashPath, { className: canSelect ? styles$
|
|
16464
|
+
return (jsx(DashPath, { className: canSelect ? styles$2.polygonPath : '', points: segment.points, stroke: strokeColor, strokeWidth: strokeWidth, strokeOpacity: strokeOpacity }, index));
|
|
16471
16465
|
})] }), (editMode || (createMode && completed)) &&
|
|
16472
16466
|
renderCoordinates.length >= 2 &&
|
|
16473
16467
|
renderCoordinates.map((coord, index) => {
|
|
16474
16468
|
const nextCoord = renderCoordinates[(index + 1) % renderCoordinates.length];
|
|
16475
16469
|
const isDashPath = coord[2] === 1;
|
|
16476
|
-
return (jsx("line", { x1: coord[0], y1: coord[1], x2: nextCoord[0], y2: nextCoord[1], stroke: isDashPath ? 'transparent' : strokeColor, strokeWidth: platform === PlatformType.H5 ? strokeWidth * 3 : strokeWidth, className: editMode ? styles$
|
|
16470
|
+
return (jsx("line", { x1: coord[0], y1: coord[1], x2: nextCoord[0], y2: nextCoord[1], stroke: isDashPath ? 'transparent' : strokeColor, strokeWidth: platform === PlatformType.H5 ? strokeWidth * 3 : strokeWidth, className: editMode ? styles$2.addVertex : '', style: {
|
|
16477
16471
|
userSelect: 'none',
|
|
16478
16472
|
WebkitUserSelect: 'none',
|
|
16479
16473
|
WebkitTouchCallout: 'none',
|
|
@@ -17307,15 +17301,15 @@ const useVisionOffTransform = (data, scaleConstraints
|
|
|
17307
17301
|
};
|
|
17308
17302
|
};
|
|
17309
17303
|
|
|
17310
|
-
var _g$
|
|
17311
|
-
function _extends$
|
|
17304
|
+
var _g$3, _defs$3;
|
|
17305
|
+
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); }
|
|
17312
17306
|
var SvgTransformDelete = function SvgTransformDelete(props) {
|
|
17313
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
17307
|
+
return /*#__PURE__*/React.createElement("svg", _extends$4({
|
|
17314
17308
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17315
17309
|
width: 20,
|
|
17316
17310
|
height: 20,
|
|
17317
17311
|
fill: "none"
|
|
17318
|
-
}, props), _g$
|
|
17312
|
+
}, props), _g$3 || (_g$3 = /*#__PURE__*/React.createElement("g", {
|
|
17319
17313
|
clipPath: "url(#transform-delete_svg__a)"
|
|
17320
17314
|
}, /*#__PURE__*/React.createElement("circle", {
|
|
17321
17315
|
cx: 10,
|
|
@@ -17338,7 +17332,7 @@ var SvgTransformDelete = function SvgTransformDelete(props) {
|
|
|
17338
17332
|
fill: "#fff",
|
|
17339
17333
|
rx: 0.8,
|
|
17340
17334
|
transform: "rotate(45 6.323 5.191)"
|
|
17341
|
-
}))), _defs$
|
|
17335
|
+
}))), _defs$3 || (_defs$3 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
17342
17336
|
id: "transform-delete_svg__b",
|
|
17343
17337
|
x1: 17.727,
|
|
17344
17338
|
x2: -1.215,
|
|
@@ -17358,15 +17352,15 @@ var SvgTransformDelete = function SvgTransformDelete(props) {
|
|
|
17358
17352
|
})))));
|
|
17359
17353
|
};
|
|
17360
17354
|
|
|
17361
|
-
var _g$
|
|
17362
|
-
function _extends$
|
|
17355
|
+
var _g$2, _defs$2;
|
|
17356
|
+
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); }
|
|
17363
17357
|
var SvgTransformRotate = function SvgTransformRotate(props) {
|
|
17364
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
17358
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3({
|
|
17365
17359
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17366
17360
|
width: 21,
|
|
17367
17361
|
height: 20,
|
|
17368
17362
|
fill: "none"
|
|
17369
|
-
}, props), _g$
|
|
17363
|
+
}, props), _g$2 || (_g$2 = /*#__PURE__*/React.createElement("g", {
|
|
17370
17364
|
clipPath: "url(#transform-rotate_svg__a)"
|
|
17371
17365
|
}, /*#__PURE__*/React.createElement("path", {
|
|
17372
17366
|
fill: "url(#transform-rotate_svg__b)",
|
|
@@ -17374,7 +17368,7 @@ var SvgTransformRotate = function SvgTransformRotate(props) {
|
|
|
17374
17368
|
}), /*#__PURE__*/React.createElement("path", {
|
|
17375
17369
|
fill: "#fff",
|
|
17376
17370
|
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"
|
|
17377
|
-
}))), _defs$
|
|
17371
|
+
}))), _defs$2 || (_defs$2 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
17378
17372
|
id: "transform-rotate_svg__b",
|
|
17379
17373
|
x1: 17.84,
|
|
17380
17374
|
x2: -1.103,
|
|
@@ -17394,15 +17388,15 @@ var SvgTransformRotate = function SvgTransformRotate(props) {
|
|
|
17394
17388
|
})))));
|
|
17395
17389
|
};
|
|
17396
17390
|
|
|
17397
|
-
var _g$
|
|
17398
|
-
function _extends$
|
|
17391
|
+
var _g$1, _defs$1;
|
|
17392
|
+
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); }
|
|
17399
17393
|
var SvgTransformScale = function SvgTransformScale(props) {
|
|
17400
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
17394
|
+
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
17401
17395
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17402
17396
|
width: 21,
|
|
17403
17397
|
height: 20,
|
|
17404
17398
|
fill: "none"
|
|
17405
|
-
}, props), _g$
|
|
17399
|
+
}, props), _g$1 || (_g$1 = /*#__PURE__*/React.createElement("g", {
|
|
17406
17400
|
clipPath: "url(#transform-scale_svg__a)"
|
|
17407
17401
|
}, /*#__PURE__*/React.createElement("path", {
|
|
17408
17402
|
fill: "url(#transform-scale_svg__b)",
|
|
@@ -17410,7 +17404,7 @@ var SvgTransformScale = function SvgTransformScale(props) {
|
|
|
17410
17404
|
}), /*#__PURE__*/React.createElement("path", {
|
|
17411
17405
|
fill: "#fff",
|
|
17412
17406
|
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"
|
|
17413
|
-
}))), _defs$
|
|
17407
|
+
}))), _defs$1 || (_defs$1 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
17414
17408
|
id: "transform-scale_svg__b",
|
|
17415
17409
|
x1: 17.84,
|
|
17416
17410
|
x2: -1.103,
|
|
@@ -17430,15 +17424,15 @@ var SvgTransformScale = function SvgTransformScale(props) {
|
|
|
17430
17424
|
})))));
|
|
17431
17425
|
};
|
|
17432
17426
|
|
|
17433
|
-
var _g
|
|
17434
|
-
function _extends$
|
|
17427
|
+
var _g, _defs;
|
|
17428
|
+
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); }
|
|
17435
17429
|
var SvgTransformTranslate = function SvgTransformTranslate(props) {
|
|
17436
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
17430
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
17437
17431
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17438
17432
|
width: 20,
|
|
17439
17433
|
height: 20,
|
|
17440
17434
|
fill: "none"
|
|
17441
|
-
}, props), _g
|
|
17435
|
+
}, props), _g || (_g = /*#__PURE__*/React.createElement("g", {
|
|
17442
17436
|
clipPath: "url(#transform-translate_svg__a)"
|
|
17443
17437
|
}, /*#__PURE__*/React.createElement("circle", {
|
|
17444
17438
|
cx: 10,
|
|
@@ -17448,7 +17442,7 @@ var SvgTransformTranslate = function SvgTransformTranslate(props) {
|
|
|
17448
17442
|
}), /*#__PURE__*/React.createElement("path", {
|
|
17449
17443
|
fill: "#fff",
|
|
17450
17444
|
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"
|
|
17451
|
-
}))), _defs
|
|
17445
|
+
}))), _defs || (_defs = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
17452
17446
|
id: "transform-translate_svg__b",
|
|
17453
17447
|
x1: 17.727,
|
|
17454
17448
|
x2: -1.215,
|
|
@@ -18630,9 +18624,9 @@ const GElement = ({ type, children }) => {
|
|
|
18630
18624
|
return jsx("g", { id: `layer-${type}`, children: children }, type);
|
|
18631
18625
|
};
|
|
18632
18626
|
|
|
18633
|
-
var css_248z$
|
|
18634
|
-
var styles$
|
|
18635
|
-
styleInject(css_248z$
|
|
18627
|
+
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}";
|
|
18628
|
+
var styles$1 = {"mapEdit":"index-module_mapEdit__XC5Gw","createMode":"index-module_createMode__14EPH","notCreateCursor":"index-module_notCreateCursor__1-OjF"};
|
|
18629
|
+
styleInject(css_248z$1);
|
|
18636
18630
|
|
|
18637
18631
|
var classnames = {exports: {}};
|
|
18638
18632
|
|
|
@@ -19624,7 +19618,7 @@ function getSvgPoint(svg, clientX, clientY) {
|
|
|
19624
19618
|
function usePolygonDrawing(options = {}) {
|
|
19625
19619
|
const { createMode = false } = options;
|
|
19626
19620
|
const [mousePos, setMousePos] = useState(null);
|
|
19627
|
-
const { editMapInfo, setEditMapInfo } = useMapEditContext();
|
|
19621
|
+
const { editMapInfo, setEditMapInfo, onHandleEvent } = useMapEditContext();
|
|
19628
19622
|
const { checkCanNotCreateAtPosition } = useCheckElement();
|
|
19629
19623
|
const { addHistory } = useHistoryHandle();
|
|
19630
19624
|
const points = useMemo(() => {
|
|
@@ -19656,7 +19650,10 @@ function usePolygonDrawing(options = {}) {
|
|
|
19656
19650
|
if (!p)
|
|
19657
19651
|
return;
|
|
19658
19652
|
if (checkCanNotCreateAtPosition(p)?.result) {
|
|
19659
|
-
|
|
19653
|
+
onHandleEvent?.(ClickEventType.MOVE_OBSTACLE_POINT_ERROR, {
|
|
19654
|
+
result: true,
|
|
19655
|
+
code: CheckObstaclePointErrorType.COMMON_ERROR,
|
|
19656
|
+
});
|
|
19660
19657
|
return;
|
|
19661
19658
|
}
|
|
19662
19659
|
setEditMapInfo((pre) => {
|
|
@@ -19902,7 +19899,7 @@ const useCreateVisionOffElement = () => {
|
|
|
19902
19899
|
const centerPoint = useMemo(() => {
|
|
19903
19900
|
if (!svgViewBox)
|
|
19904
19901
|
return null;
|
|
19905
|
-
const center = [svgViewBox.x + svgViewBox.width / 2,
|
|
19902
|
+
const center = [svgViewBox.x + svgViewBox.width / 2, svgViewBox.y + svgViewBox.height / 2];
|
|
19906
19903
|
return center;
|
|
19907
19904
|
}, [svgViewBox]);
|
|
19908
19905
|
const elementWidth = useMemo(() => {
|
|
@@ -20184,9 +20181,9 @@ const SvgEditMap = forwardRef(({ mapJson, mapConfig, editMap, onEditInfoMapChang
|
|
|
20184
20181
|
return false;
|
|
20185
20182
|
return checkCanNotCreateAtPosition(mousePos)?.result ?? false;
|
|
20186
20183
|
}, [mousePos, checkCanNotCreateAtPosition]);
|
|
20187
|
-
return (jsx("div", { ref: containerRef, className: classNames(styles$
|
|
20188
|
-
[styles$
|
|
20189
|
-
[styles$
|
|
20184
|
+
return (jsx("div", { ref: containerRef, className: classNames(styles$1.mapEdit, {
|
|
20185
|
+
[styles$1.createMode]: isCreating,
|
|
20186
|
+
[styles$1.notCreateCursor]: showNotCreateCursor,
|
|
20190
20187
|
}), style: {
|
|
20191
20188
|
display: editMap ? 'block' : 'none',
|
|
20192
20189
|
}, children: jsxs("svg", { style: {
|
|
@@ -20285,15 +20282,15 @@ const SvgEditMap = forwardRef(({ mapJson, mapConfig, editMap, onEditInfoMapChang
|
|
|
20285
20282
|
});
|
|
20286
20283
|
SvgEditMap.displayName = 'SvgEditMap';
|
|
20287
20284
|
|
|
20288
|
-
var _path
|
|
20289
|
-
function _extends
|
|
20285
|
+
var _path;
|
|
20286
|
+
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); }
|
|
20290
20287
|
var SvgMobileAddPoint = function SvgMobileAddPoint(props) {
|
|
20291
|
-
return /*#__PURE__*/React.createElement("svg", _extends
|
|
20288
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
20292
20289
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20293
20290
|
width: 36,
|
|
20294
20291
|
height: 36,
|
|
20295
20292
|
fill: "none"
|
|
20296
|
-
}, props), _path
|
|
20293
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
20297
20294
|
stroke: "#fff",
|
|
20298
20295
|
strokeLinecap: "round",
|
|
20299
20296
|
strokeLinejoin: "round",
|
|
@@ -20302,9 +20299,9 @@ var SvgMobileAddPoint = function SvgMobileAddPoint(props) {
|
|
|
20302
20299
|
})));
|
|
20303
20300
|
};
|
|
20304
20301
|
|
|
20305
|
-
var css_248z
|
|
20306
|
-
var styles
|
|
20307
|
-
styleInject(css_248z
|
|
20302
|
+
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}";
|
|
20303
|
+
var styles = {"crosshair":"index-module_crosshair__etey6"};
|
|
20304
|
+
styleInject(css_248z);
|
|
20308
20305
|
|
|
20309
20306
|
/**
|
|
20310
20307
|
* 十字准心组件
|
|
@@ -20321,460 +20318,7 @@ const Crosshair = () => {
|
|
|
20321
20318
|
}
|
|
20322
20319
|
return false;
|
|
20323
20320
|
}, [platform, editMapInfo]);
|
|
20324
|
-
return isVisible ? (jsx("div", { className: styles
|
|
20325
|
-
};
|
|
20326
|
-
|
|
20327
|
-
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}";
|
|
20328
|
-
var styles$2 = {"addEntry":"index-module_addEntry__QsQHD","icon":"index-module_icon__qIgA4","addItem":"index-module_addItem__mglwZ","label":"index-module_label__QqZ-9"};
|
|
20329
|
-
styleInject(css_248z$2);
|
|
20330
|
-
|
|
20331
|
-
var _rect$2, _path$2, _defs$1;
|
|
20332
|
-
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); }
|
|
20333
|
-
var SvgAddEntry = function SvgAddEntry(props) {
|
|
20334
|
-
return /*#__PURE__*/React.createElement("svg", _extends$4({
|
|
20335
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
20336
|
-
width: 24,
|
|
20337
|
-
height: 24,
|
|
20338
|
-
fill: "none"
|
|
20339
|
-
}, props), _rect$2 || (_rect$2 = /*#__PURE__*/React.createElement("rect", {
|
|
20340
|
-
width: 10.95,
|
|
20341
|
-
height: 10.95,
|
|
20342
|
-
x: 10.613,
|
|
20343
|
-
y: 3.15,
|
|
20344
|
-
fill: "#1F1F1F",
|
|
20345
|
-
stroke: "url(#add-entry_svg__a)",
|
|
20346
|
-
strokeWidth: 0.3,
|
|
20347
|
-
opacity: 0.795,
|
|
20348
|
-
rx: 1.05
|
|
20349
|
-
})), /*#__PURE__*/React.createElement("foreignObject", {
|
|
20350
|
-
width: 23.468,
|
|
20351
|
-
height: 20.501,
|
|
20352
|
-
x: -1.543,
|
|
20353
|
-
y: 3.499
|
|
20354
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
20355
|
-
xmlns: "http://www.w3.org/1999/xhtml",
|
|
20356
|
-
style: {
|
|
20357
|
-
backdropFilter: "blur(1.63px)",
|
|
20358
|
-
clipPath: "url(#add-entry_svg__b)",
|
|
20359
|
-
height: "100%",
|
|
20360
|
-
width: "100%"
|
|
20361
|
-
}
|
|
20362
|
-
})), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
|
|
20363
|
-
fill: "#1F1F1F",
|
|
20364
|
-
stroke: "url(#add-entry_svg__c)",
|
|
20365
|
-
strokeWidth: 0.3,
|
|
20366
|
-
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",
|
|
20367
|
-
"data-figma-bg-blur-radius": 3.262
|
|
20368
|
-
})), _defs$1 || (_defs$1 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
20369
|
-
id: "add-entry_svg__a",
|
|
20370
|
-
x1: 16.851,
|
|
20371
|
-
x2: 20.384,
|
|
20372
|
-
y1: 10.392,
|
|
20373
|
-
y2: 4.767,
|
|
20374
|
-
gradientUnits: "userSpaceOnUse"
|
|
20375
|
-
}, /*#__PURE__*/React.createElement("stop", {
|
|
20376
|
-
stopColor: "#fff",
|
|
20377
|
-
stopOpacity: 0.01
|
|
20378
|
-
}), /*#__PURE__*/React.createElement("stop", {
|
|
20379
|
-
offset: 1,
|
|
20380
|
-
stopColor: "#fff"
|
|
20381
|
-
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
20382
|
-
id: "add-entry_svg__c",
|
|
20383
|
-
x1: 21.47,
|
|
20384
|
-
x2: 12.314,
|
|
20385
|
-
y1: 15.036,
|
|
20386
|
-
y2: 5.769,
|
|
20387
|
-
gradientUnits: "userSpaceOnUse"
|
|
20388
|
-
}, /*#__PURE__*/React.createElement("stop", {
|
|
20389
|
-
stopColor: "#fff",
|
|
20390
|
-
stopOpacity: 0.01
|
|
20391
|
-
}), /*#__PURE__*/React.createElement("stop", {
|
|
20392
|
-
offset: 1,
|
|
20393
|
-
stopColor: "#fff"
|
|
20394
|
-
})), /*#__PURE__*/React.createElement("clipPath", {
|
|
20395
|
-
id: "add-entry_svg__b",
|
|
20396
|
-
transform: "translate(1.543 -3.499)"
|
|
20397
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
20398
|
-
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"
|
|
20399
|
-
})))));
|
|
20400
|
-
};
|
|
20401
|
-
|
|
20402
|
-
var _path$1, _path2$1, _path3;
|
|
20403
|
-
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); }
|
|
20404
|
-
var SvgBoundary = function SvgBoundary(props) {
|
|
20405
|
-
return /*#__PURE__*/React.createElement("svg", _extends$3({
|
|
20406
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
20407
|
-
width: 16,
|
|
20408
|
-
height: 16,
|
|
20409
|
-
fill: "none"
|
|
20410
|
-
}, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
|
|
20411
|
-
fill: "#1DBEAC",
|
|
20412
|
-
fillRule: "evenodd",
|
|
20413
|
-
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",
|
|
20414
|
-
clipRule: "evenodd",
|
|
20415
|
-
opacity: 0.602
|
|
20416
|
-
})), _path2$1 || (_path2$1 = /*#__PURE__*/React.createElement("path", {
|
|
20417
|
-
fill: "#1DBEAC",
|
|
20418
|
-
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",
|
|
20419
|
-
opacity: 0.152
|
|
20420
|
-
})), _path3 || (_path3 = /*#__PURE__*/React.createElement("path", {
|
|
20421
|
-
fill: "#1DBEAC",
|
|
20422
|
-
fillRule: "evenodd",
|
|
20423
|
-
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",
|
|
20424
|
-
clipRule: "evenodd"
|
|
20425
|
-
})));
|
|
20426
|
-
};
|
|
20427
|
-
|
|
20428
|
-
var _path, _path2, _rect$1, _rect2$1;
|
|
20429
|
-
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); }
|
|
20430
|
-
var SvgLimitIsland = function SvgLimitIsland(props) {
|
|
20431
|
-
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
20432
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
20433
|
-
width: 16,
|
|
20434
|
-
height: 16,
|
|
20435
|
-
fill: "none"
|
|
20436
|
-
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
20437
|
-
fill: "#FFA077",
|
|
20438
|
-
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"
|
|
20439
|
-
})), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
|
|
20440
|
-
fill: "#FF5D17",
|
|
20441
|
-
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"
|
|
20442
|
-
})), _rect$1 || (_rect$1 = /*#__PURE__*/React.createElement("rect", {
|
|
20443
|
-
width: 14.237,
|
|
20444
|
-
height: 10.667,
|
|
20445
|
-
x: 0.882,
|
|
20446
|
-
y: 2.667,
|
|
20447
|
-
fill: "#F50",
|
|
20448
|
-
opacity: 0.15,
|
|
20449
|
-
rx: 2
|
|
20450
|
-
})), _rect2$1 || (_rect2$1 = /*#__PURE__*/React.createElement("rect", {
|
|
20451
|
-
width: 14.237,
|
|
20452
|
-
height: 10.667,
|
|
20453
|
-
x: 0.882,
|
|
20454
|
-
y: 2.667,
|
|
20455
|
-
stroke: "#FF5D17",
|
|
20456
|
-
strokeWidth: 0.867,
|
|
20457
|
-
rx: 2
|
|
20458
|
-
})));
|
|
20459
|
-
};
|
|
20460
|
-
|
|
20461
|
-
var _rect, _rect2, _rect3, _rect4, _g$1;
|
|
20462
|
-
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); }
|
|
20463
|
-
var SvgVisionFence = function SvgVisionFence(props) {
|
|
20464
|
-
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
20465
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
20466
|
-
width: 16,
|
|
20467
|
-
height: 16,
|
|
20468
|
-
fill: "none"
|
|
20469
|
-
}, props), _rect || (_rect = /*#__PURE__*/React.createElement("rect", {
|
|
20470
|
-
width: 14.333,
|
|
20471
|
-
height: 10.667,
|
|
20472
|
-
x: 0.833,
|
|
20473
|
-
y: 2.667,
|
|
20474
|
-
fill: "#B1D9FF",
|
|
20475
|
-
rx: 2.667
|
|
20476
|
-
})), _rect2 || (_rect2 = /*#__PURE__*/React.createElement("rect", {
|
|
20477
|
-
width: 13.333,
|
|
20478
|
-
height: 9.667,
|
|
20479
|
-
x: 1.333,
|
|
20480
|
-
y: 3.167,
|
|
20481
|
-
stroke: "#5C9DFF",
|
|
20482
|
-
strokeDasharray: "6.33 6.33",
|
|
20483
|
-
rx: 1.333
|
|
20484
|
-
})), _rect3 || (_rect3 = /*#__PURE__*/React.createElement("rect", {
|
|
20485
|
-
width: 6,
|
|
20486
|
-
height: 6,
|
|
20487
|
-
x: 5,
|
|
20488
|
-
y: 4.833,
|
|
20489
|
-
fill: "#B1D9FF",
|
|
20490
|
-
rx: 3
|
|
20491
|
-
})), /*#__PURE__*/React.createElement("mask", {
|
|
20492
|
-
id: "visionFence_svg__a",
|
|
20493
|
-
width: 6,
|
|
20494
|
-
height: 6,
|
|
20495
|
-
x: 5,
|
|
20496
|
-
y: 5,
|
|
20497
|
-
maskUnits: "userSpaceOnUse",
|
|
20498
|
-
style: {
|
|
20499
|
-
maskType: "alpha"
|
|
20500
|
-
}
|
|
20501
|
-
}, _rect4 || (_rect4 = /*#__PURE__*/React.createElement("rect", {
|
|
20502
|
-
width: 5.333,
|
|
20503
|
-
height: 5.333,
|
|
20504
|
-
x: 5.333,
|
|
20505
|
-
y: 5.5,
|
|
20506
|
-
fill: "#B1D9FF",
|
|
20507
|
-
rx: 2.667
|
|
20508
|
-
}))), _g$1 || (_g$1 = /*#__PURE__*/React.createElement("g", {
|
|
20509
|
-
fill: "#5C9DFF",
|
|
20510
|
-
mask: "url(#visionFence_svg__a)"
|
|
20511
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
20512
|
-
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"
|
|
20513
|
-
}))));
|
|
20514
|
-
};
|
|
20515
|
-
|
|
20516
|
-
var _g, _defs;
|
|
20517
|
-
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); }
|
|
20518
|
-
var SvgDoodle = function SvgDoodle(props) {
|
|
20519
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
20520
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
20521
|
-
width: 16,
|
|
20522
|
-
height: 16,
|
|
20523
|
-
fill: "none"
|
|
20524
|
-
}, props), _g || (_g = /*#__PURE__*/React.createElement("g", {
|
|
20525
|
-
clipPath: "url(#doodle_svg__a)"
|
|
20526
|
-
}, /*#__PURE__*/React.createElement("g", {
|
|
20527
|
-
clipPath: "url(#doodle_svg__b)"
|
|
20528
|
-
}, /*#__PURE__*/React.createElement("rect", {
|
|
20529
|
-
width: 14.237,
|
|
20530
|
-
height: 10.667,
|
|
20531
|
-
x: 0.333,
|
|
20532
|
-
y: 4.332,
|
|
20533
|
-
fill: "#CBFCF7",
|
|
20534
|
-
stroke: "#9AEEE5",
|
|
20535
|
-
strokeWidth: 0.867,
|
|
20536
|
-
rx: 2
|
|
20537
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
20538
|
-
fill: "#F2FFFD",
|
|
20539
|
-
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"
|
|
20540
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
20541
|
-
fill: "#50D0C2",
|
|
20542
|
-
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"
|
|
20543
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
20544
|
-
fill: "#50D0C2",
|
|
20545
|
-
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"
|
|
20546
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
20547
|
-
fill: "#9CE7DE",
|
|
20548
|
-
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"
|
|
20549
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
20550
|
-
fill: "#50D0C2",
|
|
20551
|
-
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"
|
|
20552
|
-
})))), _defs || (_defs = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
20553
|
-
id: "doodle_svg__a"
|
|
20554
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
20555
|
-
fill: "#fff",
|
|
20556
|
-
d: "M0 0h16v16H0z"
|
|
20557
|
-
})), /*#__PURE__*/React.createElement("clipPath", {
|
|
20558
|
-
id: "doodle_svg__b"
|
|
20559
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
20560
|
-
fill: "#fff",
|
|
20561
|
-
d: "M0 0h16v16H0z"
|
|
20562
|
-
})))));
|
|
20563
|
-
};
|
|
20564
|
-
|
|
20565
|
-
var HandleElementMapType;
|
|
20566
|
-
(function (HandleElementMapType) {
|
|
20567
|
-
HandleElementMapType["name"] = "name";
|
|
20568
|
-
HandleElementMapType["focus"] = "focus";
|
|
20569
|
-
HandleElementMapType["delete"] = "delete";
|
|
20570
|
-
HandleElementMapType["timePeriod"] = "timePeriod";
|
|
20571
|
-
HandleElementMapType["area"] = "area";
|
|
20572
|
-
HandleElementMapType["dooleExist"] = "dooleExist";
|
|
20573
|
-
})(HandleElementMapType || (HandleElementMapType = {}));
|
|
20574
|
-
const DATE_TYPE_MAP = [
|
|
20575
|
-
{ type: DataType.BOUNDARY, label: 'Boundary', icon: jsx(SvgBoundary, {}) },
|
|
20576
|
-
{
|
|
20577
|
-
type: DataType.OBSTACLE,
|
|
20578
|
-
paramType: RecordTypeEnum.OBSTACLE,
|
|
20579
|
-
label: 'Off-limit island',
|
|
20580
|
-
icon: jsx(SvgLimitIsland, {}),
|
|
20581
|
-
},
|
|
20582
|
-
// { type: DataType.CHANNEL, label: 'Channel', icon: <ChannelIcon /> },
|
|
20583
|
-
{
|
|
20584
|
-
type: DataType.VISION_OFF,
|
|
20585
|
-
paramType: RecordTypeEnum.VISI_OFF,
|
|
20586
|
-
label: 'VisionFence-off zone',
|
|
20587
|
-
icon: jsx(SvgVisionFence, {}),
|
|
20588
|
-
},
|
|
20589
|
-
{
|
|
20590
|
-
type: DataType.DOODLE,
|
|
20591
|
-
paramType: RecordTypeEnum.DOODLE,
|
|
20592
|
-
label: 'Doodle',
|
|
20593
|
-
icon: jsx(SvgDoodle, {}),
|
|
20594
|
-
},
|
|
20595
|
-
];
|
|
20596
|
-
({
|
|
20597
|
-
[DataType.BOUNDARY]: {
|
|
20598
|
-
},
|
|
20599
|
-
[DataType.OBSTACLE]: {
|
|
20600
|
-
},
|
|
20601
|
-
[DataType.CHANNEL]: {
|
|
20602
|
-
},
|
|
20603
|
-
[DataType.VISION_OFF]: {
|
|
20604
|
-
},
|
|
20605
|
-
[DataType.DOODLE]: {
|
|
20606
|
-
},
|
|
20607
|
-
[DataType.PATH]: undefined,
|
|
20608
|
-
[DataType.ANTENNA]: undefined,
|
|
20609
|
-
[DataType.CHARGING_PILE]: undefined,
|
|
20610
|
-
});
|
|
20611
|
-
|
|
20612
|
-
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}";
|
|
20613
|
-
var styles$1 = {"modal":"index-module_modal__fkxhn","center":"index-module_center__d461v"};
|
|
20614
|
-
styleInject(css_248z$1);
|
|
20615
|
-
|
|
20616
|
-
const CustomModal = ({ children, titleCenter, hasMinHeight, height, ...props }) => {
|
|
20617
|
-
return (jsx(Modal, { centered: true, styles: {
|
|
20618
|
-
body: {
|
|
20619
|
-
maxHeight: height ? `${height}px` : 'calc(100vh - 200px)',
|
|
20620
|
-
minHeight: hasMinHeight ? '520px' : undefined,
|
|
20621
|
-
overflow: 'auto',
|
|
20622
|
-
},
|
|
20623
|
-
}, wrapClassName: classNames(styles$1.modal, {
|
|
20624
|
-
[styles$1.center]: titleCenter,
|
|
20625
|
-
}), cancelButtonProps: { color: 'primary', variant: 'outlined' }, cancelText: 'Cancel', ...props, children: children }));
|
|
20626
|
-
};
|
|
20627
|
-
|
|
20628
|
-
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}";
|
|
20629
|
-
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-"};
|
|
20630
|
-
styleInject(css_248z);
|
|
20631
|
-
|
|
20632
|
-
const DoodleModal = ({ open, onSelect, setOpen, doodleList, centerPoint }) => {
|
|
20633
|
-
const { editMapInfo, setEditMapInfo, onHandleEnterRecord } = useMapEditContext();
|
|
20634
|
-
const [selectedDoodle, setSelectedDoodle] = useState(null);
|
|
20635
|
-
const noNeed = useMemo(() => {
|
|
20636
|
-
return '1234567890QWERTYUIOPASDFGHJKLZXCVBNM';
|
|
20637
|
-
}, []);
|
|
20638
|
-
// 选择 Doodle
|
|
20639
|
-
const handleSelectDoodle = useCallback((item) => {
|
|
20640
|
-
setSelectedDoodle(item);
|
|
20641
|
-
}, []);
|
|
20642
|
-
// 确认选择
|
|
20643
|
-
const handleConfirm = useCallback(() => {
|
|
20644
|
-
if (selectedDoodle) {
|
|
20645
|
-
const newDoodle = initDoodle();
|
|
20646
|
-
const svg = selectedDoodle?.svgStr;
|
|
20647
|
-
const minLength = selectedDoodle.minLength;
|
|
20648
|
-
const parseSvg = SvgParserNative.parseSvg(svg);
|
|
20649
|
-
const svgMinLength = parseSvg.height / SCALE_FACTOR;
|
|
20650
|
-
// 使用获取到的 SVG 内容,如果没有获取到则使用 URL
|
|
20651
|
-
newDoodle.svg = svg;
|
|
20652
|
-
newDoodle.scale = minLength / svgMinLength;
|
|
20653
|
-
newDoodle.direction = 0;
|
|
20654
|
-
newDoodle.center = restorePoint(centerPoint);
|
|
20655
|
-
onHandleEnterRecord?.({
|
|
20656
|
-
type: 1,
|
|
20657
|
-
function: 0,
|
|
20658
|
-
})?.then(() => {
|
|
20659
|
-
setEditMapInfo({
|
|
20660
|
-
...editMapInfo,
|
|
20661
|
-
historyList: [
|
|
20662
|
-
{
|
|
20663
|
-
selectElement: newDoodle,
|
|
20664
|
-
},
|
|
20665
|
-
],
|
|
20666
|
-
currentHistoryIndex: 0,
|
|
20667
|
-
createMode: CreateStatus.COMPLETED,
|
|
20668
|
-
elementType: DataType.DOODLE,
|
|
20669
|
-
selectElement: newDoodle,
|
|
20670
|
-
isShowDrag: true,
|
|
20671
|
-
});
|
|
20672
|
-
setOpen(false);
|
|
20673
|
-
onSelect?.(svg);
|
|
20674
|
-
}, (error) => {
|
|
20675
|
-
message.error('Save failed, please try again');
|
|
20676
|
-
});
|
|
20677
|
-
}
|
|
20678
|
-
}, [selectedDoodle, setEditMapInfo, editMapInfo, setOpen, onSelect, centerPoint]);
|
|
20679
|
-
return (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: jsxs("div", { className: styles.doodleModal, children: [jsx("div", { className: styles.title, children: "Select the doodle that you want to create" }), jsx("div", { className: styles.content, children: doodleList
|
|
20680
|
-
?.filter((item) => !noNeed.includes(item.name))
|
|
20681
|
-
.map((item) => {
|
|
20682
|
-
return (jsx("div", { className: classNames(styles.item, {
|
|
20683
|
-
[styles.active]: selectedDoodle?.svg === item.svg,
|
|
20684
|
-
}), onClick: () => handleSelectDoodle(item), children: jsx("div", { className: styles.svgImage, dangerouslySetInnerHTML: { __html: item?.svgStr } }) }, item.id));
|
|
20685
|
-
}) })] }) }));
|
|
20686
|
-
};
|
|
20687
|
-
|
|
20688
|
-
const AddEntry = ({ doodleList, disabledObstacles, editMap }) => {
|
|
20689
|
-
const { svgRef } = useSvgEditContext();
|
|
20690
|
-
const { editMapInfo, setEditMapInfo, onHandleEnterRecord } = useMapEditContext();
|
|
20691
|
-
const divRef = useRef(null);
|
|
20692
|
-
const [open, setOpen] = useState(false);
|
|
20693
|
-
const [doodleOpen, setDoodleOpen] = useState(false);
|
|
20694
|
-
const centerPoint = useMemo(() => {
|
|
20695
|
-
if (!svgRef)
|
|
20696
|
-
return null;
|
|
20697
|
-
const baseVal = svgRef?.viewBox.baseVal;
|
|
20698
|
-
const center = [
|
|
20699
|
-
baseVal?.x + (baseVal?.width || 0) / 2,
|
|
20700
|
-
baseVal?.y + (baseVal?.height || 0) / 2,
|
|
20701
|
-
];
|
|
20702
|
-
return center;
|
|
20703
|
-
}, [svgRef?.viewBox?.baseVal?.x]);
|
|
20704
|
-
const centerBounds = useMemo(() => {
|
|
20705
|
-
if (!svgRef)
|
|
20706
|
-
return null;
|
|
20707
|
-
const elementWidth = 50 * 10;
|
|
20708
|
-
const [minX, minY, maxX, maxY] = [
|
|
20709
|
-
centerPoint[0] - elementWidth / 2,
|
|
20710
|
-
centerPoint[1] - elementWidth / 2,
|
|
20711
|
-
centerPoint[0] + elementWidth / 2,
|
|
20712
|
-
centerPoint[1] + elementWidth / 2,
|
|
20713
|
-
];
|
|
20714
|
-
const elementPoints = [
|
|
20715
|
-
[minX, minY],
|
|
20716
|
-
[minX, maxY],
|
|
20717
|
-
[maxX, maxY],
|
|
20718
|
-
[maxX, minY],
|
|
20719
|
-
];
|
|
20720
|
-
return elementPoints;
|
|
20721
|
-
}, [centerPoint]);
|
|
20722
|
-
const addNewElement = useCallback((type, item) => {
|
|
20723
|
-
setOpen(false);
|
|
20724
|
-
let newElement = null;
|
|
20725
|
-
if (type === DataType.BOUNDARY) {
|
|
20726
|
-
newElement = initBoundary();
|
|
20727
|
-
}
|
|
20728
|
-
else if (type === DataType.OBSTACLE) {
|
|
20729
|
-
newElement = initObstacle();
|
|
20730
|
-
}
|
|
20731
|
-
else if (type === DataType.CHANNEL) {
|
|
20732
|
-
newElement = initChannel();
|
|
20733
|
-
}
|
|
20734
|
-
else if (type === DataType.VISION_OFF) {
|
|
20735
|
-
newElement = initVisionOff();
|
|
20736
|
-
newElement.points = centerBounds;
|
|
20737
|
-
}
|
|
20738
|
-
else if (type === DataType.DOODLE) {
|
|
20739
|
-
return setDoodleOpen(true);
|
|
20740
|
-
}
|
|
20741
|
-
onHandleEnterRecord?.({
|
|
20742
|
-
type: item?.paramType,
|
|
20743
|
-
function: item?.type === DataType.OBSTACLE ? 0 : undefined,
|
|
20744
|
-
})?.then(() => {
|
|
20745
|
-
setEditMapInfo({
|
|
20746
|
-
...editMapInfo,
|
|
20747
|
-
historyList: [
|
|
20748
|
-
{
|
|
20749
|
-
selectElement: newElement,
|
|
20750
|
-
},
|
|
20751
|
-
],
|
|
20752
|
-
currentHistoryIndex: 0,
|
|
20753
|
-
createMode: type === DataType.VISION_OFF ? CreateStatus.COMPLETED : CreateStatus.CREATING,
|
|
20754
|
-
elementType: type,
|
|
20755
|
-
selectElement: newElement,
|
|
20756
|
-
});
|
|
20757
|
-
}, (errorText) => {
|
|
20758
|
-
message.error('Save failed, please try again');
|
|
20759
|
-
});
|
|
20760
|
-
}, [centerBounds]);
|
|
20761
|
-
const addItems = useMemo(() => {
|
|
20762
|
-
return DATE_TYPE_MAP?.filter((item) => {
|
|
20763
|
-
if (item.type === DataType.OBSTACLE) {
|
|
20764
|
-
return !disabledObstacles;
|
|
20765
|
-
}
|
|
20766
|
-
return item.type !== DataType.BOUNDARY;
|
|
20767
|
-
});
|
|
20768
|
-
}, [disabledObstacles]);
|
|
20769
|
-
// console.log('addEntry->', editMapInfo, editMap);
|
|
20770
|
-
if (editMapInfo.createMode || editMapInfo.editMap || !editMap) {
|
|
20771
|
-
return null;
|
|
20772
|
-
}
|
|
20773
|
-
return (jsxs("div", { ref: divRef, className: styles$2.addEntry, children: [jsx(Popover, { open: open, onOpenChange: setOpen, arrow: false, placement: "leftTop", content: addItems?.map((item) => {
|
|
20774
|
-
return (jsxs("div", { className: styles$2.addItem, onClick: () => {
|
|
20775
|
-
addNewElement(item.type, item);
|
|
20776
|
-
}, children: [jsx("div", { className: styles$2.icon, children: item?.icon }), jsx("div", { className: styles$2.label, children: item?.label })] }, item.label));
|
|
20777
|
-
}), children: jsx("div", { className: styles$2.icon, children: jsx(SvgAddEntry, {}) }) }), jsx(DoodleModal, { centerPoint: centerPoint, doodleList: doodleList, open: doodleOpen, onOk: () => setDoodleOpen(false), setOpen: setDoodleOpen })] }));
|
|
20321
|
+
return isVisible ? (jsx("div", { className: styles.crosshair, children: jsx(SvgMobileAddPoint, {}) })) : null;
|
|
20778
20322
|
};
|
|
20779
20323
|
|
|
20780
20324
|
// 验证GPS坐标是否有效
|
|
@@ -21343,7 +20887,7 @@ modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onMapLoad, on
|
|
|
21343
20887
|
}
|
|
21344
20888
|
// console.log('mowerrender------->', svgViewBox);
|
|
21345
20889
|
// 使用goole maps自定义叠加层,返回debug信息(如果启用)
|
|
21346
|
-
return (jsx(CommonContextProvider, { value: commonValue, children: jsx(SvgEditContextProvider, { value: svgEditValue, children: jsxs(MapEditContextProvider, { value: mapEditValue, children: [platform !== PlatformType.H5 && (jsx(Fragment, {
|
|
20890
|
+
return (jsx(CommonContextProvider, { value: commonValue, children: jsx(SvgEditContextProvider, { value: svgEditValue, children: jsxs(MapEditContextProvider, { value: mapEditValue, children: [platform !== PlatformType.H5 && (jsx(Fragment, {})), platform === PlatformType.H5 && jsx(Crosshair, {}), jsxs(OverlayViewF, { onLoad: (lay) => {
|
|
21347
20891
|
setOverlay(lay);
|
|
21348
20892
|
}, onDraw: (style) => {
|
|
21349
20893
|
const layout = Object.keys(style).reduce((pre, cur) => {
|