@fleet-frontend/mower-maps 0.2.0-beta.49 → 0.2.0-beta.50
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 +21 -14
- package/dist/index.js +21 -14
- package/dist/render/BoundarySvgRender.d.ts +1 -1
- package/dist/render/BoundarySvgRender.d.ts.map +1 -1
- package/dist/render/charginPile/useChargingPile.d.ts.map +1 -1
- package/dist/render/svgEditMap/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -29358,7 +29358,7 @@ MowerMapRenderer.displayName = 'MowerMapRenderer';
|
|
|
29358
29358
|
|
|
29359
29359
|
// 默认配置
|
|
29360
29360
|
const defaultMapConfig = DEFAULT_STYLES;
|
|
29361
|
-
const BoundarySvgRender = React__default.memo(({ mapJson, unStructMapData, id, maxWidth = 300, mapConfig }) => {
|
|
29361
|
+
const BoundarySvgRender = React__default.memo(({ mapJson, unStructMapData, id, maxWidth = 300, mapConfig, sn }) => {
|
|
29362
29362
|
// 合并配置
|
|
29363
29363
|
const mergedMapConfig = useMemo(() => {
|
|
29364
29364
|
return merge$1(defaultMapConfig, mapConfig);
|
|
@@ -29414,6 +29414,12 @@ const BoundarySvgRender = React__default.memo(({ mapJson, unStructMapData, id, m
|
|
|
29414
29414
|
height,
|
|
29415
29415
|
};
|
|
29416
29416
|
}, [boundaryInfo]);
|
|
29417
|
+
const commonValue = useMemo(() => {
|
|
29418
|
+
return {
|
|
29419
|
+
sn,
|
|
29420
|
+
svgViewBox: boundaryViewBox,
|
|
29421
|
+
};
|
|
29422
|
+
}, [sn, boundaryViewBox]);
|
|
29417
29423
|
const style = useMemo(() => {
|
|
29418
29424
|
if (boundaryViewBox?.width > boundaryViewBox?.height) {
|
|
29419
29425
|
return {
|
|
@@ -29422,22 +29428,23 @@ const BoundarySvgRender = React__default.memo(({ mapJson, unStructMapData, id, m
|
|
|
29422
29428
|
};
|
|
29423
29429
|
}
|
|
29424
29430
|
return {
|
|
29425
|
-
width: maxWidth * (boundaryViewBox.
|
|
29431
|
+
width: maxWidth * (boundaryViewBox.width / boundaryViewBox.height),
|
|
29426
29432
|
height: maxWidth,
|
|
29427
29433
|
};
|
|
29428
29434
|
}, [boundaryViewBox, maxWidth]);
|
|
29429
|
-
return (jsx(SvgEditContextProvider, { value: svgEditValue, children: jsxs("div", { style: {
|
|
29430
|
-
|
|
29431
|
-
|
|
29432
|
-
|
|
29433
|
-
|
|
29434
|
-
|
|
29435
|
-
|
|
29436
|
-
|
|
29437
|
-
|
|
29438
|
-
|
|
29439
|
-
|
|
29440
|
-
|
|
29435
|
+
return (jsx(CommonContextProvider, { value: commonValue, children: jsx(SvgEditContextProvider, { value: svgEditValue, children: jsxs("div", { style: {
|
|
29436
|
+
position: 'relative',
|
|
29437
|
+
width: style.width,
|
|
29438
|
+
height: style.height,
|
|
29439
|
+
margin: '0 auto',
|
|
29440
|
+
overflow: 'visible',
|
|
29441
|
+
}, children: [jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: `${boundaryViewBox.x} ${boundaryViewBox.y} ${boundaryViewBox.width} ${boundaryViewBox.height}`, width: `${style.width}px`, height: `${style.height}px`, style: { position: 'absolute', inset: 0, pointerEvents: 'none' }, children: Object.keys(svgElementData)?.map((key) => {
|
|
29442
|
+
return svgElementData[key]?.map((element) => {
|
|
29443
|
+
if (key === DataType.VISION_OFF)
|
|
29444
|
+
return null;
|
|
29445
|
+
return (jsxs(GElement, { type: key, data: svgElementData[key], children: [key === 'channel' && jsx(ChannelClipPath, {}), jsx(SvgElement, { type: key, data: element }, element.id)] }, key));
|
|
29446
|
+
});
|
|
29447
|
+
}) }), jsx(CharginPile, { viewBox: boundaryViewBox || null, rotation: 0 })] }) }) }));
|
|
29441
29448
|
});
|
|
29442
29449
|
|
|
29443
29450
|
export { ALL_DIRECTION_SELECTED, AntennaData, BaseData, BoundaryData, BoundarySvgRender, ChannelData, ChargingPileData, CheckDoodleErrorType, CheckObstaclePointErrorType, ClickEventType, CreateStatus, DataType, DoodleData, MAX_DIRECTION_ANGLE, MIN_DIRECTION_ANGLE, MobileEditMode, MowGateData, MowerMapRenderer, ObstacleData, PathData, PlatformType, RecordFunctionEnum, RecordTypeEnum, RenderType, SCALE_FACTOR, SvgParserNative, UnifiedMapDataProcessor, VisionOffData, calculateMapGpsCenter, estimateGpsFromMapBounds, initBoundary, initChannel, initDoodle, initObstacle, initVisionOff, restorePointsFormat };
|
package/dist/index.js
CHANGED
|
@@ -29378,7 +29378,7 @@ MowerMapRenderer.displayName = 'MowerMapRenderer';
|
|
|
29378
29378
|
|
|
29379
29379
|
// 默认配置
|
|
29380
29380
|
const defaultMapConfig = DEFAULT_STYLES;
|
|
29381
|
-
const BoundarySvgRender = React.memo(({ mapJson, unStructMapData, id, maxWidth = 300, mapConfig }) => {
|
|
29381
|
+
const BoundarySvgRender = React.memo(({ mapJson, unStructMapData, id, maxWidth = 300, mapConfig, sn }) => {
|
|
29382
29382
|
// 合并配置
|
|
29383
29383
|
const mergedMapConfig = React.useMemo(() => {
|
|
29384
29384
|
return merge$1(defaultMapConfig, mapConfig);
|
|
@@ -29434,6 +29434,12 @@ const BoundarySvgRender = React.memo(({ mapJson, unStructMapData, id, maxWidth =
|
|
|
29434
29434
|
height,
|
|
29435
29435
|
};
|
|
29436
29436
|
}, [boundaryInfo]);
|
|
29437
|
+
const commonValue = React.useMemo(() => {
|
|
29438
|
+
return {
|
|
29439
|
+
sn,
|
|
29440
|
+
svgViewBox: boundaryViewBox,
|
|
29441
|
+
};
|
|
29442
|
+
}, [sn, boundaryViewBox]);
|
|
29437
29443
|
const style = React.useMemo(() => {
|
|
29438
29444
|
if (boundaryViewBox?.width > boundaryViewBox?.height) {
|
|
29439
29445
|
return {
|
|
@@ -29442,22 +29448,23 @@ const BoundarySvgRender = React.memo(({ mapJson, unStructMapData, id, maxWidth =
|
|
|
29442
29448
|
};
|
|
29443
29449
|
}
|
|
29444
29450
|
return {
|
|
29445
|
-
width: maxWidth * (boundaryViewBox.
|
|
29451
|
+
width: maxWidth * (boundaryViewBox.width / boundaryViewBox.height),
|
|
29446
29452
|
height: maxWidth,
|
|
29447
29453
|
};
|
|
29448
29454
|
}, [boundaryViewBox, maxWidth]);
|
|
29449
|
-
return (jsxRuntime.jsx(SvgEditContextProvider, { value: svgEditValue, children: jsxRuntime.jsxs("div", { style: {
|
|
29450
|
-
|
|
29451
|
-
|
|
29452
|
-
|
|
29453
|
-
|
|
29454
|
-
|
|
29455
|
-
|
|
29456
|
-
|
|
29457
|
-
|
|
29458
|
-
|
|
29459
|
-
|
|
29460
|
-
|
|
29455
|
+
return (jsxRuntime.jsx(CommonContextProvider, { value: commonValue, children: jsxRuntime.jsx(SvgEditContextProvider, { value: svgEditValue, children: jsxRuntime.jsxs("div", { style: {
|
|
29456
|
+
position: 'relative',
|
|
29457
|
+
width: style.width,
|
|
29458
|
+
height: style.height,
|
|
29459
|
+
margin: '0 auto',
|
|
29460
|
+
overflow: 'visible',
|
|
29461
|
+
}, children: [jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: `${boundaryViewBox.x} ${boundaryViewBox.y} ${boundaryViewBox.width} ${boundaryViewBox.height}`, width: `${style.width}px`, height: `${style.height}px`, style: { position: 'absolute', inset: 0, pointerEvents: 'none' }, children: Object.keys(svgElementData)?.map((key) => {
|
|
29462
|
+
return svgElementData[key]?.map((element) => {
|
|
29463
|
+
if (key === exports.DataType.VISION_OFF)
|
|
29464
|
+
return null;
|
|
29465
|
+
return (jsxRuntime.jsxs(GElement, { type: key, data: svgElementData[key], children: [key === 'channel' && jsxRuntime.jsx(ChannelClipPath, {}), jsxRuntime.jsx(SvgElement, { type: key, data: element }, element.id)] }, key));
|
|
29466
|
+
});
|
|
29467
|
+
}) }), jsxRuntime.jsx(CharginPile, { viewBox: boundaryViewBox || null, rotation: 0 })] }) }) }));
|
|
29461
29468
|
});
|
|
29462
29469
|
|
|
29463
29470
|
exports.ALL_DIRECTION_SELECTED = ALL_DIRECTION_SELECTED;
|
|
@@ -9,6 +9,6 @@ interface BoundarySvgRenderProps {
|
|
|
9
9
|
mapConfig?: MapConfig;
|
|
10
10
|
sn?: string;
|
|
11
11
|
}
|
|
12
|
-
declare const BoundarySvgRender: React.MemoExoticComponent<({ mapJson, unStructMapData, id, maxWidth, mapConfig }: BoundarySvgRenderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
12
|
+
declare const BoundarySvgRender: React.MemoExoticComponent<({ mapJson, unStructMapData, id, maxWidth, mapConfig, sn }: BoundarySvgRenderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
13
13
|
export default BoundarySvgRender;
|
|
14
14
|
//# sourceMappingURL=BoundarySvgRender.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoundarySvgRender.d.ts","sourceRoot":"","sources":["../../src/render/BoundarySvgRender.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAK9C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"BoundarySvgRender.d.ts","sourceRoot":"","sources":["../../src/render/BoundarySvgRender.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAK9C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAM3C,UAAU,sBAAsB;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,eAAe,CAAC;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAID,QAAA,MAAM,iBAAiB,wFAC6C,sBAAsB,6CA8HzF,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChargingPile.d.ts","sourceRoot":"","sources":["../../../src/render/charginPile/useChargingPile.ts"],"names":[],"mappings":"AAMA,UAAU,sBAAsB;IAC9B,OAAO,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,gBAAgB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,eAAe,GAAI,uBAA2B,sBAAsB,
|
|
1
|
+
{"version":3,"file":"useChargingPile.d.ts","sourceRoot":"","sources":["../../../src/render/charginPile/useChargingPile.ts"],"names":[],"mappings":"AAMA,UAAU,sBAAsB;IAC9B,OAAO,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,gBAAgB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,eAAe,GAAI,uBAA2B,sBAAsB,uBAmChF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/render/svgEditMap/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAOT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAE3B,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/render/svgEditMap/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAOT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAE3B,SAAS,EAET,KAAK,EACN,MAAM,SAAS,CAAC;AAajB,OAAO,EAEL,WAAW,EAEX,cAAc,EAEf,MAAM,mBAAmB,CAAC;AAe3B,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAE1E,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,MAAM,aAAa,GAAG,IAAI,CAAC;IAC1C,mBAAmB,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;IAE9C,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAC;IACvD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,WAAW,CAAC;IAEnC,sBAAsB,CAAC,EAAE,MAAM;QAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,2BAA2B,CAAC;KACpC,CAAC;IACF,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,uBAAuB,CAAC,EAAE,MAAM,KAAK,EAAE,CAAC;IACxC,2BAA2B,CAAC,EAAE,MAAM,MAAM,CAAC;IAC3C,yBAAyB,CAAC,EAAE,MAAM,IAAI,CAAC;IAEvC,sBAAsB,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IAExD,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAE/B,UAAU,CAAC,EAAE,MAAM;QACjB,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;IAEF,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC;IAElB,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC;IAElB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAE1B,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IAEpC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAEzC,WAAW,CAAC,EAAE,MAAM;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,oBAAoB,CAAA;KAAE,CAAC;IAEvF,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IAExD,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CAC1D;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAC;CAC1D;AAED,QAAA,MAAM,UAAU,2GAqdf,CAAC;AAIF,eAAe,UAAU,CAAC"}
|