@fleet-frontend/mower-maps 0.2.5-beta.13 → 0.2.5-beta.14
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
CHANGED
|
@@ -20048,12 +20048,12 @@ function styleInject(css, ref) {
|
|
|
20048
20048
|
}
|
|
20049
20049
|
}
|
|
20050
20050
|
|
|
20051
|
-
var css_248z$
|
|
20052
|
-
var styles$
|
|
20053
|
-
styleInject(css_248z$
|
|
20051
|
+
var css_248z$8 = ".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}";
|
|
20052
|
+
var styles$8 = {"edit":"index-module_edit__-5VvX","border":"index-module_border__JdNLM","drag":"index-module_drag__uvdPG","rotate":"index-module_rotate__H-KIZ","move":"index-module_move__mZF8s"};
|
|
20053
|
+
styleInject(css_248z$8);
|
|
20054
20054
|
|
|
20055
20055
|
const RotateHandle = ({ onRotateStart, isRotating }) => {
|
|
20056
|
-
return (jsx("div", { className: styles$
|
|
20056
|
+
return (jsx("div", { className: styles$8.rotate, onMouseDown: (e) => onRotateStart(e), onTouchStart: (e) => onRotateStart(e), style: { cursor: isRotating ? 'grabbing' : 'grab' }, dangerouslySetInnerHTML: { __html: DEFAULT_ROTATE_ICON } }));
|
|
20057
20057
|
};
|
|
20058
20058
|
|
|
20059
20059
|
/**
|
|
@@ -20130,7 +20130,7 @@ const DragHandle = ({ onDragStart, isDragging }) => {
|
|
|
20130
20130
|
if (!isMobileDevice()) {
|
|
20131
20131
|
return null;
|
|
20132
20132
|
}
|
|
20133
|
-
return (jsx("div", { className: styles$
|
|
20133
|
+
return (jsx("div", { className: styles$8.move, onMouseDown: (e) => {
|
|
20134
20134
|
onDragStart(e);
|
|
20135
20135
|
}, onTouchStart: (e) => onDragStart(e), onMouseUp: (e) => {
|
|
20136
20136
|
// onDragEnd(e);
|
|
@@ -20162,7 +20162,7 @@ const MapDrag = ({ map: _map, dragCallbacks, onBoundaryLabelsCollapse, onTransfo
|
|
|
20162
20162
|
if (!isDragMap) {
|
|
20163
20163
|
return null;
|
|
20164
20164
|
}
|
|
20165
|
-
return (jsxs("div", { ref: containerRef, className: styles$
|
|
20165
|
+
return (jsxs("div", { ref: containerRef, className: styles$8.edit, style: { cursor: isDragging ? 'grabbing' : 'move' }, children: [jsx("div", { className: styles$8.border }), canRotateMap && jsx(RotateHandle, { onRotateStart: handleRotateStart, isRotating: isRotating }), jsx("div", { className: styles$8.drag, onMouseDown: handleDragStartEvent, onTouchStart: handleDragStartEvent }), jsx(DragHandle, { onDragStart: handleDragStartEvent, isDragging: isDragging })] }));
|
|
20166
20166
|
};
|
|
20167
20167
|
|
|
20168
20168
|
const SvgEditContext = createContext({
|
|
@@ -23595,9 +23595,9 @@ const Magnifier = ({ visible, dragState, polygonPoints, fillColor = 'rgba(255, 1
|
|
|
23595
23595
|
return ReactDOM.createPortal(magnifierContent, document.body);
|
|
23596
23596
|
};
|
|
23597
23597
|
|
|
23598
|
-
var css_248z$
|
|
23599
|
-
var styles$
|
|
23600
|
-
styleInject(css_248z$
|
|
23598
|
+
var css_248z$7 = ".index-module_pointerCursor__Ee6pr {\n cursor: pointer;\n}\n\n.index-module_polygonPath__PynOn {\n pointer-events: stroke;\n cursor: pointer;\n}\n\n.index-module_dragging__xSFdO {\n cursor: grabbing;\n}\n\n.index-module_notCreate__bFnkV {\n cursor: no-drop;\n}";
|
|
23599
|
+
var styles$7 = {"pointerCursor":"index-module_pointerCursor__Ee6pr","polygonPath":"index-module_polygonPath__PynOn","dragging":"index-module_dragging__xSFdO","notCreate":"index-module_notCreate__bFnkV"};
|
|
23600
|
+
styleInject(css_248z$7);
|
|
23601
23601
|
|
|
23602
23602
|
/**
|
|
23603
23603
|
* 几何计算工具函数
|
|
@@ -24020,28 +24020,102 @@ const useCheckElement = () => {
|
|
|
24020
24020
|
};
|
|
24021
24021
|
};
|
|
24022
24022
|
|
|
24023
|
+
var css_248z$6 = ".Tooltip-module_tooltip__Wexlk {\n position: fixed;\n background-color: #fff;\n border-radius: 4px;\n height: 20px;\n line-height: 20px;\n font-size: 12px;\n color: #211F1F;\n padding: 0 4px;\n white-space: nowrap;\n z-index: 9999;\n cursor: pointer;\n user-select: none;\n}\n.Tooltip-module_tooltip__Wexlk.Tooltip-module_tooltipHover__Tfqme {\n height: 30px;\n padding: 5px 12px;\n}\n.Tooltip-module_tooltip__Wexlk.Tooltip-module_tooltipHover__Tfqme:hover {\n background-color: #FFEFE6;\n}";
|
|
24024
|
+
var styles$6 = {"tooltip":"Tooltip-module_tooltip__Wexlk","tooltipHover":"Tooltip-module_tooltipHover__Tfqme"};
|
|
24025
|
+
styleInject(css_248z$6);
|
|
24026
|
+
|
|
24027
|
+
var classnames = {exports: {}};
|
|
24028
|
+
|
|
24029
|
+
/*!
|
|
24030
|
+
Copyright (c) 2018 Jed Watson.
|
|
24031
|
+
Licensed under the MIT License (MIT), see
|
|
24032
|
+
http://jedwatson.github.io/classnames
|
|
24033
|
+
*/
|
|
24034
|
+
|
|
24035
|
+
(function (module) {
|
|
24036
|
+
/* global define */
|
|
24037
|
+
|
|
24038
|
+
(function () {
|
|
24039
|
+
|
|
24040
|
+
var hasOwn = {}.hasOwnProperty;
|
|
24041
|
+
|
|
24042
|
+
function classNames () {
|
|
24043
|
+
var classes = '';
|
|
24044
|
+
|
|
24045
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
24046
|
+
var arg = arguments[i];
|
|
24047
|
+
if (arg) {
|
|
24048
|
+
classes = appendClass(classes, parseValue(arg));
|
|
24049
|
+
}
|
|
24050
|
+
}
|
|
24051
|
+
|
|
24052
|
+
return classes;
|
|
24053
|
+
}
|
|
24054
|
+
|
|
24055
|
+
function parseValue (arg) {
|
|
24056
|
+
if (typeof arg === 'string' || typeof arg === 'number') {
|
|
24057
|
+
return arg;
|
|
24058
|
+
}
|
|
24059
|
+
|
|
24060
|
+
if (typeof arg !== 'object') {
|
|
24061
|
+
return '';
|
|
24062
|
+
}
|
|
24063
|
+
|
|
24064
|
+
if (Array.isArray(arg)) {
|
|
24065
|
+
return classNames.apply(null, arg);
|
|
24066
|
+
}
|
|
24067
|
+
|
|
24068
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
24069
|
+
return arg.toString();
|
|
24070
|
+
}
|
|
24071
|
+
|
|
24072
|
+
var classes = '';
|
|
24073
|
+
|
|
24074
|
+
for (var key in arg) {
|
|
24075
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
24076
|
+
classes = appendClass(classes, key);
|
|
24077
|
+
}
|
|
24078
|
+
}
|
|
24079
|
+
|
|
24080
|
+
return classes;
|
|
24081
|
+
}
|
|
24082
|
+
|
|
24083
|
+
function appendClass (value, newClass) {
|
|
24084
|
+
if (!newClass) {
|
|
24085
|
+
return value;
|
|
24086
|
+
}
|
|
24087
|
+
|
|
24088
|
+
if (value) {
|
|
24089
|
+
return value + ' ' + newClass;
|
|
24090
|
+
}
|
|
24091
|
+
|
|
24092
|
+
return value + newClass;
|
|
24093
|
+
}
|
|
24094
|
+
|
|
24095
|
+
if (module.exports) {
|
|
24096
|
+
classNames.default = classNames;
|
|
24097
|
+
module.exports = classNames;
|
|
24098
|
+
} else {
|
|
24099
|
+
window.classNames = classNames;
|
|
24100
|
+
}
|
|
24101
|
+
}());
|
|
24102
|
+
} (classnames));
|
|
24103
|
+
|
|
24104
|
+
var classnamesExports = classnames.exports;
|
|
24105
|
+
var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
24106
|
+
|
|
24023
24107
|
const Tooltip = ({ open, x, y, text, style, onClick }) => {
|
|
24024
24108
|
if (!open)
|
|
24025
24109
|
return null;
|
|
24026
24110
|
const tooltipStyle = {
|
|
24027
|
-
position: 'fixed',
|
|
24028
24111
|
left: x,
|
|
24029
24112
|
top: y,
|
|
24030
|
-
backgroundColor: '#fff',
|
|
24031
|
-
borderRadius: '4px',
|
|
24032
|
-
height: '20px',
|
|
24033
|
-
lineHeight: '16px',
|
|
24034
|
-
fontSize: '12px',
|
|
24035
|
-
color: '#211F1F',
|
|
24036
|
-
padding: '2px 4px',
|
|
24037
|
-
whiteSpace: 'nowrap',
|
|
24038
|
-
zIndex: 9999,
|
|
24039
|
-
cursor: 'pointer',
|
|
24040
|
-
userSelect: 'none',
|
|
24041
24113
|
...style,
|
|
24042
24114
|
};
|
|
24043
24115
|
// 使用 createPortal 挂载到 body
|
|
24044
|
-
return createPortal(jsx("div", {
|
|
24116
|
+
return createPortal(jsx("div", { className: classNames(styles$6.tooltip, {
|
|
24117
|
+
[styles$6.tooltipHover]: !!onClick,
|
|
24118
|
+
}), style: tooltipStyle, onClick: (e) => {
|
|
24045
24119
|
e.preventDefault();
|
|
24046
24120
|
e.stopPropagation();
|
|
24047
24121
|
onClick?.();
|
|
@@ -24187,6 +24261,7 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24187
24261
|
const [tooltipIndex, setTooltipIndex] = useState(null);
|
|
24188
24262
|
const [tooltipPos, setTooltipPos] = useState({ x: 0, y: 0 });
|
|
24189
24263
|
const [completeTooltipOpen, setCompleteTooltipOpen] = useState(false);
|
|
24264
|
+
const [moveTooltipOpen, setMoveTooltipOpen] = useState(false);
|
|
24190
24265
|
const updateTooltipPos = (target) => {
|
|
24191
24266
|
const rect = target.getBoundingClientRect();
|
|
24192
24267
|
setTooltipPos({
|
|
@@ -24455,8 +24530,8 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24455
24530
|
}, [dragState.currentPosition, checkCanNotCreateAtPosition, coordinates]);
|
|
24456
24531
|
const generateVertexClassName = useMemo(() => {
|
|
24457
24532
|
if (!dragState.isDragging)
|
|
24458
|
-
return styles$
|
|
24459
|
-
return showNotCreateCursor ? styles$
|
|
24533
|
+
return styles$7.pointerCursor;
|
|
24534
|
+
return showNotCreateCursor ? styles$7.notCreate : styles$7.dragging;
|
|
24460
24535
|
}, [dragState.isDragging, showNotCreateCursor]);
|
|
24461
24536
|
// 使用 useRef 来存储 requestAnimationFrame ID
|
|
24462
24537
|
const rafIdRef = useRef(null);
|
|
@@ -24747,7 +24822,7 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24747
24822
|
WebkitTouchCallout: 'none',
|
|
24748
24823
|
touchAction: 'none',
|
|
24749
24824
|
} })] }));
|
|
24750
|
-
})()] })), renderCoordinates.length >= 2 && (jsx("polygon", { className: canSelect ? styles$
|
|
24825
|
+
})()] })), renderCoordinates.length >= 2 && (jsx("polygon", { className: canSelect ? styles$7.pointerCursor : '', points: polygonPoints, fill: isHover ? hoverFillColor || fillColor : fillColor, fillOpacity: fillOpacity, stroke: "none" // 边框透明
|
|
24751
24826
|
, onClick: onPolygonClick })), jsx("g", { children: renderCoordinates.length >= 2 &&
|
|
24752
24827
|
pathSegments.map((segment, index) => {
|
|
24753
24828
|
if (segment.points.length < 2)
|
|
@@ -24755,14 +24830,14 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24755
24830
|
const pathData = createPathData(segment.points);
|
|
24756
24831
|
const isDash = segment.type === 1;
|
|
24757
24832
|
if (isDash && showStraddleBoundaryBorder) {
|
|
24758
|
-
return (jsx(DashPath, { className: canSelect ? styles$
|
|
24833
|
+
return (jsx(DashPath, { className: canSelect ? styles$7.polygonPath : '', points: segment.points, stroke: strokeColor, strokeWidth: isHover ? strokeWidth + 1 : strokeWidth, strokeOpacity: strokeOpacity }, index));
|
|
24759
24834
|
}
|
|
24760
24835
|
return (jsxs(Fragment, { children: [(editMode || createMode) && (jsx("path", { d: pathData, fill: "none", stroke: '#fff', strokeWidth: strokeWidth * 2, strokeOpacity: strokeOpacity, strokeLinecap: "round", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke", style: {
|
|
24761
24836
|
userSelect: 'none',
|
|
24762
24837
|
WebkitUserSelect: 'none',
|
|
24763
24838
|
WebkitTouchCallout: 'none',
|
|
24764
24839
|
touchAction: 'none',
|
|
24765
|
-
} }, 'warp' + index)), jsx("path", { d: pathData, fill: "none", stroke: strokeColor, strokeWidth: isHover ? strokeWidth + 1 : strokeWidth, strokeOpacity: strokeOpacity, strokeLinecap: "round", strokeLinejoin: "round", className: canSelect ? styles$
|
|
24840
|
+
} }, 'warp' + index)), jsx("path", { d: pathData, fill: "none", stroke: strokeColor, strokeWidth: isHover ? strokeWidth + 1 : strokeWidth, strokeOpacity: strokeOpacity, strokeLinecap: "round", strokeLinejoin: "round", className: canSelect ? styles$7.polygonPath : '', vectorEffect: "non-scaling-stroke", onClick: onPathClick, style: {
|
|
24766
24841
|
userSelect: 'none',
|
|
24767
24842
|
WebkitUserSelect: 'none',
|
|
24768
24843
|
WebkitTouchCallout: 'none',
|
|
@@ -24793,7 +24868,7 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24793
24868
|
: platform === PlatformType.H5
|
|
24794
24869
|
? strokeWidth * 2
|
|
24795
24870
|
: strokeWidth;
|
|
24796
|
-
return (jsx("line", { ...edgeLineCommon, stroke: edgeStroke, strokeWidth: edgeStrokeWidth, ...(isH5SolidHitOnly ? { strokeLinecap: 'round' } : {}), className: editMode ? styles$
|
|
24871
|
+
return (jsx("line", { ...edgeLineCommon, stroke: edgeStroke, strokeWidth: edgeStrokeWidth, ...(isH5SolidHitOnly ? { strokeLinecap: 'round' } : {}), className: editMode ? styles$7.pointerCursor : '', style: edgeLineStyle, vectorEffect: "non-scaling-stroke", ...(platform === PlatformType.H5
|
|
24797
24872
|
? {
|
|
24798
24873
|
onTouchStart: createReactEventHandler((e) => handleEdgeLongPressStart(e, index)),
|
|
24799
24874
|
onTouchEnd: createReactEventHandler(() => handleEdgeLongPressEnd()),
|
|
@@ -24863,7 +24938,7 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24863
24938
|
isDoubleClickingRef.current = false;
|
|
24864
24939
|
}, 300);
|
|
24865
24940
|
// 打开删除确认 Tooltip(仅在可编辑时)
|
|
24866
|
-
if (editMode || (createMode && completed)) {
|
|
24941
|
+
if ((editMode || (createMode && completed)) && renderCoordinates.length > 3) {
|
|
24867
24942
|
updateTooltipPos(e.target);
|
|
24868
24943
|
setTooltipIndex(idx);
|
|
24869
24944
|
}
|
|
@@ -24940,17 +25015,25 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24940
25015
|
}
|
|
24941
25016
|
}
|
|
24942
25017
|
},
|
|
24943
|
-
onMouseEnter:
|
|
24944
|
-
|
|
25018
|
+
onMouseEnter: (e) => {
|
|
25019
|
+
if (canComplete) {
|
|
24945
25020
|
setCompleteTooltipOpen(true);
|
|
25021
|
+
}
|
|
25022
|
+
if (editMode || (createMode && completed)) {
|
|
25023
|
+
setMoveTooltipOpen(true);
|
|
25024
|
+
}
|
|
25025
|
+
if (tooltipIndex === null) {
|
|
24946
25026
|
updateTooltipPos(e.target);
|
|
24947
25027
|
}
|
|
24948
|
-
|
|
24949
|
-
onMouseLeave:
|
|
24950
|
-
|
|
25028
|
+
},
|
|
25029
|
+
onMouseLeave: () => {
|
|
25030
|
+
if (canComplete) {
|
|
24951
25031
|
setCompleteTooltipOpen(false);
|
|
24952
25032
|
}
|
|
24953
|
-
|
|
25033
|
+
if (editMode || (createMode && completed)) {
|
|
25034
|
+
setMoveTooltipOpen(false);
|
|
25035
|
+
}
|
|
25036
|
+
},
|
|
24954
25037
|
}) }), platform === PlatformType.H5 && tooltipIndex === idx && coordinates.length > 3 && (jsxs("g", { transform: `translate(${coord[0] + 4 * overlayScale * 2}, ${coord[1] - 4 * overlayScale * 2}) scale(${overlayScale * 2})`, onClick: (e) => {
|
|
24955
25038
|
e.preventDefault();
|
|
24956
25039
|
e.stopPropagation();
|
|
@@ -24981,7 +25064,7 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24981
25064
|
onVertexDelete(renderCoordinates?.length - 1 - tooltipIndex);
|
|
24982
25065
|
}
|
|
24983
25066
|
setTooltipIndex(null);
|
|
24984
|
-
} })), platform === PlatformType.WEB && completeTooltipOpen && (jsx(Tooltip, { open: true, x: tooltipPos.x, y: tooltipPos.y, text: "Click to finish" }))] }));
|
|
25067
|
+
} })), platform === PlatformType.WEB && completeTooltipOpen && (jsx(Tooltip, { open: true, x: tooltipPos.x, y: tooltipPos.y, text: "Click to finish" })), platform === PlatformType.WEB && moveTooltipOpen && tooltipIndex === null && (jsx(Tooltip, { open: true, x: tooltipPos.x, y: tooltipPos.y, text: 'Drag to change' + (renderCoordinates.length > 3 ? ', double click to remove' : '') }))] }));
|
|
24985
25068
|
};
|
|
24986
25069
|
|
|
24987
25070
|
const MowPartitionContext = createContext({
|
|
@@ -28036,86 +28119,6 @@ var css_248z$1 = ".index-module_mapEdit__XC5Gw {\n position: absolute;\n left:
|
|
|
28036
28119
|
var styles$1 = {"mapEdit":"index-module_mapEdit__XC5Gw","createMode":"index-module_createMode__14EPH","notCreateCursor":"index-module_notCreateCursor__1-OjF"};
|
|
28037
28120
|
styleInject(css_248z$1);
|
|
28038
28121
|
|
|
28039
|
-
var classnames = {exports: {}};
|
|
28040
|
-
|
|
28041
|
-
/*!
|
|
28042
|
-
Copyright (c) 2018 Jed Watson.
|
|
28043
|
-
Licensed under the MIT License (MIT), see
|
|
28044
|
-
http://jedwatson.github.io/classnames
|
|
28045
|
-
*/
|
|
28046
|
-
|
|
28047
|
-
(function (module) {
|
|
28048
|
-
/* global define */
|
|
28049
|
-
|
|
28050
|
-
(function () {
|
|
28051
|
-
|
|
28052
|
-
var hasOwn = {}.hasOwnProperty;
|
|
28053
|
-
|
|
28054
|
-
function classNames () {
|
|
28055
|
-
var classes = '';
|
|
28056
|
-
|
|
28057
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
28058
|
-
var arg = arguments[i];
|
|
28059
|
-
if (arg) {
|
|
28060
|
-
classes = appendClass(classes, parseValue(arg));
|
|
28061
|
-
}
|
|
28062
|
-
}
|
|
28063
|
-
|
|
28064
|
-
return classes;
|
|
28065
|
-
}
|
|
28066
|
-
|
|
28067
|
-
function parseValue (arg) {
|
|
28068
|
-
if (typeof arg === 'string' || typeof arg === 'number') {
|
|
28069
|
-
return arg;
|
|
28070
|
-
}
|
|
28071
|
-
|
|
28072
|
-
if (typeof arg !== 'object') {
|
|
28073
|
-
return '';
|
|
28074
|
-
}
|
|
28075
|
-
|
|
28076
|
-
if (Array.isArray(arg)) {
|
|
28077
|
-
return classNames.apply(null, arg);
|
|
28078
|
-
}
|
|
28079
|
-
|
|
28080
|
-
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
28081
|
-
return arg.toString();
|
|
28082
|
-
}
|
|
28083
|
-
|
|
28084
|
-
var classes = '';
|
|
28085
|
-
|
|
28086
|
-
for (var key in arg) {
|
|
28087
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
28088
|
-
classes = appendClass(classes, key);
|
|
28089
|
-
}
|
|
28090
|
-
}
|
|
28091
|
-
|
|
28092
|
-
return classes;
|
|
28093
|
-
}
|
|
28094
|
-
|
|
28095
|
-
function appendClass (value, newClass) {
|
|
28096
|
-
if (!newClass) {
|
|
28097
|
-
return value;
|
|
28098
|
-
}
|
|
28099
|
-
|
|
28100
|
-
if (value) {
|
|
28101
|
-
return value + ' ' + newClass;
|
|
28102
|
-
}
|
|
28103
|
-
|
|
28104
|
-
return value + newClass;
|
|
28105
|
-
}
|
|
28106
|
-
|
|
28107
|
-
if (module.exports) {
|
|
28108
|
-
classNames.default = classNames;
|
|
28109
|
-
module.exports = classNames;
|
|
28110
|
-
} else {
|
|
28111
|
-
window.classNames = classNames;
|
|
28112
|
-
}
|
|
28113
|
-
}());
|
|
28114
|
-
} (classnames));
|
|
28115
|
-
|
|
28116
|
-
var classnamesExports = classnames.exports;
|
|
28117
|
-
var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
28118
|
-
|
|
28119
28122
|
/******************************************************************************
|
|
28120
28123
|
Copyright (c) Microsoft Corporation.
|
|
28121
28124
|
|
package/dist/index.js
CHANGED
|
@@ -20068,12 +20068,12 @@ function styleInject(css, ref) {
|
|
|
20068
20068
|
}
|
|
20069
20069
|
}
|
|
20070
20070
|
|
|
20071
|
-
var css_248z$
|
|
20072
|
-
var styles$
|
|
20073
|
-
styleInject(css_248z$
|
|
20071
|
+
var css_248z$8 = ".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}";
|
|
20072
|
+
var styles$8 = {"edit":"index-module_edit__-5VvX","border":"index-module_border__JdNLM","drag":"index-module_drag__uvdPG","rotate":"index-module_rotate__H-KIZ","move":"index-module_move__mZF8s"};
|
|
20073
|
+
styleInject(css_248z$8);
|
|
20074
20074
|
|
|
20075
20075
|
const RotateHandle = ({ onRotateStart, isRotating }) => {
|
|
20076
|
-
return (jsxRuntime.jsx("div", { className: styles$
|
|
20076
|
+
return (jsxRuntime.jsx("div", { className: styles$8.rotate, onMouseDown: (e) => onRotateStart(e), onTouchStart: (e) => onRotateStart(e), style: { cursor: isRotating ? 'grabbing' : 'grab' }, dangerouslySetInnerHTML: { __html: DEFAULT_ROTATE_ICON } }));
|
|
20077
20077
|
};
|
|
20078
20078
|
|
|
20079
20079
|
/**
|
|
@@ -20150,7 +20150,7 @@ const DragHandle = ({ onDragStart, isDragging }) => {
|
|
|
20150
20150
|
if (!isMobileDevice()) {
|
|
20151
20151
|
return null;
|
|
20152
20152
|
}
|
|
20153
|
-
return (jsxRuntime.jsx("div", { className: styles$
|
|
20153
|
+
return (jsxRuntime.jsx("div", { className: styles$8.move, onMouseDown: (e) => {
|
|
20154
20154
|
onDragStart(e);
|
|
20155
20155
|
}, onTouchStart: (e) => onDragStart(e), onMouseUp: (e) => {
|
|
20156
20156
|
// onDragEnd(e);
|
|
@@ -20182,7 +20182,7 @@ const MapDrag = ({ map: _map, dragCallbacks, onBoundaryLabelsCollapse, onTransfo
|
|
|
20182
20182
|
if (!isDragMap) {
|
|
20183
20183
|
return null;
|
|
20184
20184
|
}
|
|
20185
|
-
return (jsxRuntime.jsxs("div", { ref: containerRef, className: styles$
|
|
20185
|
+
return (jsxRuntime.jsxs("div", { ref: containerRef, className: styles$8.edit, style: { cursor: isDragging ? 'grabbing' : 'move' }, children: [jsxRuntime.jsx("div", { className: styles$8.border }), canRotateMap && jsxRuntime.jsx(RotateHandle, { onRotateStart: handleRotateStart, isRotating: isRotating }), jsxRuntime.jsx("div", { className: styles$8.drag, onMouseDown: handleDragStartEvent, onTouchStart: handleDragStartEvent }), jsxRuntime.jsx(DragHandle, { onDragStart: handleDragStartEvent, isDragging: isDragging })] }));
|
|
20186
20186
|
};
|
|
20187
20187
|
|
|
20188
20188
|
const SvgEditContext = React.createContext({
|
|
@@ -23615,9 +23615,9 @@ const Magnifier = ({ visible, dragState, polygonPoints, fillColor = 'rgba(255, 1
|
|
|
23615
23615
|
return ReactDOM.createPortal(magnifierContent, document.body);
|
|
23616
23616
|
};
|
|
23617
23617
|
|
|
23618
|
-
var css_248z$
|
|
23619
|
-
var styles$
|
|
23620
|
-
styleInject(css_248z$
|
|
23618
|
+
var css_248z$7 = ".index-module_pointerCursor__Ee6pr {\n cursor: pointer;\n}\n\n.index-module_polygonPath__PynOn {\n pointer-events: stroke;\n cursor: pointer;\n}\n\n.index-module_dragging__xSFdO {\n cursor: grabbing;\n}\n\n.index-module_notCreate__bFnkV {\n cursor: no-drop;\n}";
|
|
23619
|
+
var styles$7 = {"pointerCursor":"index-module_pointerCursor__Ee6pr","polygonPath":"index-module_polygonPath__PynOn","dragging":"index-module_dragging__xSFdO","notCreate":"index-module_notCreate__bFnkV"};
|
|
23620
|
+
styleInject(css_248z$7);
|
|
23621
23621
|
|
|
23622
23622
|
/**
|
|
23623
23623
|
* 几何计算工具函数
|
|
@@ -24040,28 +24040,102 @@ const useCheckElement = () => {
|
|
|
24040
24040
|
};
|
|
24041
24041
|
};
|
|
24042
24042
|
|
|
24043
|
+
var css_248z$6 = ".Tooltip-module_tooltip__Wexlk {\n position: fixed;\n background-color: #fff;\n border-radius: 4px;\n height: 20px;\n line-height: 20px;\n font-size: 12px;\n color: #211F1F;\n padding: 0 4px;\n white-space: nowrap;\n z-index: 9999;\n cursor: pointer;\n user-select: none;\n}\n.Tooltip-module_tooltip__Wexlk.Tooltip-module_tooltipHover__Tfqme {\n height: 30px;\n padding: 5px 12px;\n}\n.Tooltip-module_tooltip__Wexlk.Tooltip-module_tooltipHover__Tfqme:hover {\n background-color: #FFEFE6;\n}";
|
|
24044
|
+
var styles$6 = {"tooltip":"Tooltip-module_tooltip__Wexlk","tooltipHover":"Tooltip-module_tooltipHover__Tfqme"};
|
|
24045
|
+
styleInject(css_248z$6);
|
|
24046
|
+
|
|
24047
|
+
var classnames = {exports: {}};
|
|
24048
|
+
|
|
24049
|
+
/*!
|
|
24050
|
+
Copyright (c) 2018 Jed Watson.
|
|
24051
|
+
Licensed under the MIT License (MIT), see
|
|
24052
|
+
http://jedwatson.github.io/classnames
|
|
24053
|
+
*/
|
|
24054
|
+
|
|
24055
|
+
(function (module) {
|
|
24056
|
+
/* global define */
|
|
24057
|
+
|
|
24058
|
+
(function () {
|
|
24059
|
+
|
|
24060
|
+
var hasOwn = {}.hasOwnProperty;
|
|
24061
|
+
|
|
24062
|
+
function classNames () {
|
|
24063
|
+
var classes = '';
|
|
24064
|
+
|
|
24065
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
24066
|
+
var arg = arguments[i];
|
|
24067
|
+
if (arg) {
|
|
24068
|
+
classes = appendClass(classes, parseValue(arg));
|
|
24069
|
+
}
|
|
24070
|
+
}
|
|
24071
|
+
|
|
24072
|
+
return classes;
|
|
24073
|
+
}
|
|
24074
|
+
|
|
24075
|
+
function parseValue (arg) {
|
|
24076
|
+
if (typeof arg === 'string' || typeof arg === 'number') {
|
|
24077
|
+
return arg;
|
|
24078
|
+
}
|
|
24079
|
+
|
|
24080
|
+
if (typeof arg !== 'object') {
|
|
24081
|
+
return '';
|
|
24082
|
+
}
|
|
24083
|
+
|
|
24084
|
+
if (Array.isArray(arg)) {
|
|
24085
|
+
return classNames.apply(null, arg);
|
|
24086
|
+
}
|
|
24087
|
+
|
|
24088
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
24089
|
+
return arg.toString();
|
|
24090
|
+
}
|
|
24091
|
+
|
|
24092
|
+
var classes = '';
|
|
24093
|
+
|
|
24094
|
+
for (var key in arg) {
|
|
24095
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
24096
|
+
classes = appendClass(classes, key);
|
|
24097
|
+
}
|
|
24098
|
+
}
|
|
24099
|
+
|
|
24100
|
+
return classes;
|
|
24101
|
+
}
|
|
24102
|
+
|
|
24103
|
+
function appendClass (value, newClass) {
|
|
24104
|
+
if (!newClass) {
|
|
24105
|
+
return value;
|
|
24106
|
+
}
|
|
24107
|
+
|
|
24108
|
+
if (value) {
|
|
24109
|
+
return value + ' ' + newClass;
|
|
24110
|
+
}
|
|
24111
|
+
|
|
24112
|
+
return value + newClass;
|
|
24113
|
+
}
|
|
24114
|
+
|
|
24115
|
+
if (module.exports) {
|
|
24116
|
+
classNames.default = classNames;
|
|
24117
|
+
module.exports = classNames;
|
|
24118
|
+
} else {
|
|
24119
|
+
window.classNames = classNames;
|
|
24120
|
+
}
|
|
24121
|
+
}());
|
|
24122
|
+
} (classnames));
|
|
24123
|
+
|
|
24124
|
+
var classnamesExports = classnames.exports;
|
|
24125
|
+
var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
24126
|
+
|
|
24043
24127
|
const Tooltip = ({ open, x, y, text, style, onClick }) => {
|
|
24044
24128
|
if (!open)
|
|
24045
24129
|
return null;
|
|
24046
24130
|
const tooltipStyle = {
|
|
24047
|
-
position: 'fixed',
|
|
24048
24131
|
left: x,
|
|
24049
24132
|
top: y,
|
|
24050
|
-
backgroundColor: '#fff',
|
|
24051
|
-
borderRadius: '4px',
|
|
24052
|
-
height: '20px',
|
|
24053
|
-
lineHeight: '16px',
|
|
24054
|
-
fontSize: '12px',
|
|
24055
|
-
color: '#211F1F',
|
|
24056
|
-
padding: '2px 4px',
|
|
24057
|
-
whiteSpace: 'nowrap',
|
|
24058
|
-
zIndex: 9999,
|
|
24059
|
-
cursor: 'pointer',
|
|
24060
|
-
userSelect: 'none',
|
|
24061
24133
|
...style,
|
|
24062
24134
|
};
|
|
24063
24135
|
// 使用 createPortal 挂载到 body
|
|
24064
|
-
return ReactDOM.createPortal(jsxRuntime.jsx("div", {
|
|
24136
|
+
return ReactDOM.createPortal(jsxRuntime.jsx("div", { className: classNames(styles$6.tooltip, {
|
|
24137
|
+
[styles$6.tooltipHover]: !!onClick,
|
|
24138
|
+
}), style: tooltipStyle, onClick: (e) => {
|
|
24065
24139
|
e.preventDefault();
|
|
24066
24140
|
e.stopPropagation();
|
|
24067
24141
|
onClick?.();
|
|
@@ -24207,6 +24281,7 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24207
24281
|
const [tooltipIndex, setTooltipIndex] = React.useState(null);
|
|
24208
24282
|
const [tooltipPos, setTooltipPos] = React.useState({ x: 0, y: 0 });
|
|
24209
24283
|
const [completeTooltipOpen, setCompleteTooltipOpen] = React.useState(false);
|
|
24284
|
+
const [moveTooltipOpen, setMoveTooltipOpen] = React.useState(false);
|
|
24210
24285
|
const updateTooltipPos = (target) => {
|
|
24211
24286
|
const rect = target.getBoundingClientRect();
|
|
24212
24287
|
setTooltipPos({
|
|
@@ -24475,8 +24550,8 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24475
24550
|
}, [dragState.currentPosition, checkCanNotCreateAtPosition, coordinates]);
|
|
24476
24551
|
const generateVertexClassName = React.useMemo(() => {
|
|
24477
24552
|
if (!dragState.isDragging)
|
|
24478
|
-
return styles$
|
|
24479
|
-
return showNotCreateCursor ? styles$
|
|
24553
|
+
return styles$7.pointerCursor;
|
|
24554
|
+
return showNotCreateCursor ? styles$7.notCreate : styles$7.dragging;
|
|
24480
24555
|
}, [dragState.isDragging, showNotCreateCursor]);
|
|
24481
24556
|
// 使用 useRef 来存储 requestAnimationFrame ID
|
|
24482
24557
|
const rafIdRef = React.useRef(null);
|
|
@@ -24767,7 +24842,7 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24767
24842
|
WebkitTouchCallout: 'none',
|
|
24768
24843
|
touchAction: 'none',
|
|
24769
24844
|
} })] }));
|
|
24770
|
-
})()] })), renderCoordinates.length >= 2 && (jsxRuntime.jsx("polygon", { className: canSelect ? styles$
|
|
24845
|
+
})()] })), renderCoordinates.length >= 2 && (jsxRuntime.jsx("polygon", { className: canSelect ? styles$7.pointerCursor : '', points: polygonPoints, fill: isHover ? hoverFillColor || fillColor : fillColor, fillOpacity: fillOpacity, stroke: "none" // 边框透明
|
|
24771
24846
|
, onClick: onPolygonClick })), jsxRuntime.jsx("g", { children: renderCoordinates.length >= 2 &&
|
|
24772
24847
|
pathSegments.map((segment, index) => {
|
|
24773
24848
|
if (segment.points.length < 2)
|
|
@@ -24775,14 +24850,14 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24775
24850
|
const pathData = createPathData(segment.points);
|
|
24776
24851
|
const isDash = segment.type === 1;
|
|
24777
24852
|
if (isDash && showStraddleBoundaryBorder) {
|
|
24778
|
-
return (jsxRuntime.jsx(DashPath, { className: canSelect ? styles$
|
|
24853
|
+
return (jsxRuntime.jsx(DashPath, { className: canSelect ? styles$7.polygonPath : '', points: segment.points, stroke: strokeColor, strokeWidth: isHover ? strokeWidth + 1 : strokeWidth, strokeOpacity: strokeOpacity }, index));
|
|
24779
24854
|
}
|
|
24780
24855
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [(editMode || createMode) && (jsxRuntime.jsx("path", { d: pathData, fill: "none", stroke: '#fff', strokeWidth: strokeWidth * 2, strokeOpacity: strokeOpacity, strokeLinecap: "round", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke", style: {
|
|
24781
24856
|
userSelect: 'none',
|
|
24782
24857
|
WebkitUserSelect: 'none',
|
|
24783
24858
|
WebkitTouchCallout: 'none',
|
|
24784
24859
|
touchAction: 'none',
|
|
24785
|
-
} }, 'warp' + index)), jsxRuntime.jsx("path", { d: pathData, fill: "none", stroke: strokeColor, strokeWidth: isHover ? strokeWidth + 1 : strokeWidth, strokeOpacity: strokeOpacity, strokeLinecap: "round", strokeLinejoin: "round", className: canSelect ? styles$
|
|
24860
|
+
} }, 'warp' + index)), jsxRuntime.jsx("path", { d: pathData, fill: "none", stroke: strokeColor, strokeWidth: isHover ? strokeWidth + 1 : strokeWidth, strokeOpacity: strokeOpacity, strokeLinecap: "round", strokeLinejoin: "round", className: canSelect ? styles$7.polygonPath : '', vectorEffect: "non-scaling-stroke", onClick: onPathClick, style: {
|
|
24786
24861
|
userSelect: 'none',
|
|
24787
24862
|
WebkitUserSelect: 'none',
|
|
24788
24863
|
WebkitTouchCallout: 'none',
|
|
@@ -24813,7 +24888,7 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24813
24888
|
: platform === exports.PlatformType.H5
|
|
24814
24889
|
? strokeWidth * 2
|
|
24815
24890
|
: strokeWidth;
|
|
24816
|
-
return (jsxRuntime.jsx("line", { ...edgeLineCommon, stroke: edgeStroke, strokeWidth: edgeStrokeWidth, ...(isH5SolidHitOnly ? { strokeLinecap: 'round' } : {}), className: editMode ? styles$
|
|
24891
|
+
return (jsxRuntime.jsx("line", { ...edgeLineCommon, stroke: edgeStroke, strokeWidth: edgeStrokeWidth, ...(isH5SolidHitOnly ? { strokeLinecap: 'round' } : {}), className: editMode ? styles$7.pointerCursor : '', style: edgeLineStyle, vectorEffect: "non-scaling-stroke", ...(platform === exports.PlatformType.H5
|
|
24817
24892
|
? {
|
|
24818
24893
|
onTouchStart: createReactEventHandler((e) => handleEdgeLongPressStart(e, index)),
|
|
24819
24894
|
onTouchEnd: createReactEventHandler(() => handleEdgeLongPressEnd()),
|
|
@@ -24883,7 +24958,7 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24883
24958
|
isDoubleClickingRef.current = false;
|
|
24884
24959
|
}, 300);
|
|
24885
24960
|
// 打开删除确认 Tooltip(仅在可编辑时)
|
|
24886
|
-
if (editMode || (createMode && completed)) {
|
|
24961
|
+
if ((editMode || (createMode && completed)) && renderCoordinates.length > 3) {
|
|
24887
24962
|
updateTooltipPos(e.target);
|
|
24888
24963
|
setTooltipIndex(idx);
|
|
24889
24964
|
}
|
|
@@ -24960,17 +25035,25 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
24960
25035
|
}
|
|
24961
25036
|
}
|
|
24962
25037
|
},
|
|
24963
|
-
onMouseEnter:
|
|
24964
|
-
|
|
25038
|
+
onMouseEnter: (e) => {
|
|
25039
|
+
if (canComplete) {
|
|
24965
25040
|
setCompleteTooltipOpen(true);
|
|
25041
|
+
}
|
|
25042
|
+
if (editMode || (createMode && completed)) {
|
|
25043
|
+
setMoveTooltipOpen(true);
|
|
25044
|
+
}
|
|
25045
|
+
if (tooltipIndex === null) {
|
|
24966
25046
|
updateTooltipPos(e.target);
|
|
24967
25047
|
}
|
|
24968
|
-
|
|
24969
|
-
onMouseLeave:
|
|
24970
|
-
|
|
25048
|
+
},
|
|
25049
|
+
onMouseLeave: () => {
|
|
25050
|
+
if (canComplete) {
|
|
24971
25051
|
setCompleteTooltipOpen(false);
|
|
24972
25052
|
}
|
|
24973
|
-
|
|
25053
|
+
if (editMode || (createMode && completed)) {
|
|
25054
|
+
setMoveTooltipOpen(false);
|
|
25055
|
+
}
|
|
25056
|
+
},
|
|
24974
25057
|
}) }), platform === exports.PlatformType.H5 && tooltipIndex === idx && coordinates.length > 3 && (jsxRuntime.jsxs("g", { transform: `translate(${coord[0] + 4 * overlayScale * 2}, ${coord[1] - 4 * overlayScale * 2}) scale(${overlayScale * 2})`, onClick: (e) => {
|
|
24975
25058
|
e.preventDefault();
|
|
24976
25059
|
e.stopPropagation();
|
|
@@ -25001,7 +25084,7 @@ const PolygonElement = ({ canSelect = false, isHover = false, points, fillColor
|
|
|
25001
25084
|
onVertexDelete(renderCoordinates?.length - 1 - tooltipIndex);
|
|
25002
25085
|
}
|
|
25003
25086
|
setTooltipIndex(null);
|
|
25004
|
-
} })), platform === exports.PlatformType.WEB && completeTooltipOpen && (jsxRuntime.jsx(Tooltip, { open: true, x: tooltipPos.x, y: tooltipPos.y, text: "Click to finish" }))] }));
|
|
25087
|
+
} })), platform === exports.PlatformType.WEB && completeTooltipOpen && (jsxRuntime.jsx(Tooltip, { open: true, x: tooltipPos.x, y: tooltipPos.y, text: "Click to finish" })), platform === exports.PlatformType.WEB && moveTooltipOpen && tooltipIndex === null && (jsxRuntime.jsx(Tooltip, { open: true, x: tooltipPos.x, y: tooltipPos.y, text: 'Drag to change' + (renderCoordinates.length > 3 ? ', double click to remove' : '') }))] }));
|
|
25005
25088
|
};
|
|
25006
25089
|
|
|
25007
25090
|
const MowPartitionContext = React.createContext({
|
|
@@ -28056,86 +28139,6 @@ var css_248z$1 = ".index-module_mapEdit__XC5Gw {\n position: absolute;\n left:
|
|
|
28056
28139
|
var styles$1 = {"mapEdit":"index-module_mapEdit__XC5Gw","createMode":"index-module_createMode__14EPH","notCreateCursor":"index-module_notCreateCursor__1-OjF"};
|
|
28057
28140
|
styleInject(css_248z$1);
|
|
28058
28141
|
|
|
28059
|
-
var classnames = {exports: {}};
|
|
28060
|
-
|
|
28061
|
-
/*!
|
|
28062
|
-
Copyright (c) 2018 Jed Watson.
|
|
28063
|
-
Licensed under the MIT License (MIT), see
|
|
28064
|
-
http://jedwatson.github.io/classnames
|
|
28065
|
-
*/
|
|
28066
|
-
|
|
28067
|
-
(function (module) {
|
|
28068
|
-
/* global define */
|
|
28069
|
-
|
|
28070
|
-
(function () {
|
|
28071
|
-
|
|
28072
|
-
var hasOwn = {}.hasOwnProperty;
|
|
28073
|
-
|
|
28074
|
-
function classNames () {
|
|
28075
|
-
var classes = '';
|
|
28076
|
-
|
|
28077
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
28078
|
-
var arg = arguments[i];
|
|
28079
|
-
if (arg) {
|
|
28080
|
-
classes = appendClass(classes, parseValue(arg));
|
|
28081
|
-
}
|
|
28082
|
-
}
|
|
28083
|
-
|
|
28084
|
-
return classes;
|
|
28085
|
-
}
|
|
28086
|
-
|
|
28087
|
-
function parseValue (arg) {
|
|
28088
|
-
if (typeof arg === 'string' || typeof arg === 'number') {
|
|
28089
|
-
return arg;
|
|
28090
|
-
}
|
|
28091
|
-
|
|
28092
|
-
if (typeof arg !== 'object') {
|
|
28093
|
-
return '';
|
|
28094
|
-
}
|
|
28095
|
-
|
|
28096
|
-
if (Array.isArray(arg)) {
|
|
28097
|
-
return classNames.apply(null, arg);
|
|
28098
|
-
}
|
|
28099
|
-
|
|
28100
|
-
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
28101
|
-
return arg.toString();
|
|
28102
|
-
}
|
|
28103
|
-
|
|
28104
|
-
var classes = '';
|
|
28105
|
-
|
|
28106
|
-
for (var key in arg) {
|
|
28107
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
28108
|
-
classes = appendClass(classes, key);
|
|
28109
|
-
}
|
|
28110
|
-
}
|
|
28111
|
-
|
|
28112
|
-
return classes;
|
|
28113
|
-
}
|
|
28114
|
-
|
|
28115
|
-
function appendClass (value, newClass) {
|
|
28116
|
-
if (!newClass) {
|
|
28117
|
-
return value;
|
|
28118
|
-
}
|
|
28119
|
-
|
|
28120
|
-
if (value) {
|
|
28121
|
-
return value + ' ' + newClass;
|
|
28122
|
-
}
|
|
28123
|
-
|
|
28124
|
-
return value + newClass;
|
|
28125
|
-
}
|
|
28126
|
-
|
|
28127
|
-
if (module.exports) {
|
|
28128
|
-
classNames.default = classNames;
|
|
28129
|
-
module.exports = classNames;
|
|
28130
|
-
} else {
|
|
28131
|
-
window.classNames = classNames;
|
|
28132
|
-
}
|
|
28133
|
-
}());
|
|
28134
|
-
} (classnames));
|
|
28135
|
-
|
|
28136
|
-
var classnamesExports = classnames.exports;
|
|
28137
|
-
var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
28138
|
-
|
|
28139
28142
|
/******************************************************************************
|
|
28140
28143
|
Copyright (c) Microsoft Corporation.
|
|
28141
28144
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../../src/render/svgElement/PolygonELement/components/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../../src/render/svgElement/PolygonELement/components/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,UAAU,YAAY;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA2BnC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/PolygonELement/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAsBlG;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,aAAa,MAAM,EAAE,EAAE,KAAG,MAE7D,CAAC;AA+BF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GACjC,aAAa,MAAM,EAAE,EAAE,EACvB,YAAW,OAAc,KACxB,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,EAAE,CAAA;CAAE,CAyC5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,EAAE,EAAE,KAAG,MAUnD,CAAC;AAgBF,UAAU,mBAAmB;IAC3B,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC7D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAE3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,KAAK,IAAI,CAAC;IACxD,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAE/C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/svgElement/PolygonELement/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAsBlG;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,aAAa,MAAM,EAAE,EAAE,KAAG,MAE7D,CAAC;AA+BF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GACjC,aAAa,MAAM,EAAE,EAAE,EACvB,YAAW,OAAc,KACxB,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,EAAE,CAAA;CAAE,CAyC5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,EAAE,EAAE,KAAG,MAUnD,CAAC;AAgBF,UAAU,mBAAmB;IAC3B,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC7D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAE3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,KAAK,IAAI,CAAC;IACxD,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAE/C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0zCxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|