@fleet-frontend/mower-maps 0.2.0-beta.35 → 0.2.0-beta.36
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 +9 -122
- package/dist/index.js +9 -122
- package/dist/render/MowerMapRenderer.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/store/useCurrentMowingDataStore.d.ts +0 -4
- package/dist/store/useCurrentMowingDataStore.d.ts.map +0 -1
- package/dist/store/usePartitionDataStore.d.ts +0 -4
- package/dist/store/usePartitionDataStore.d.ts.map +0 -1
package/dist/index.esm.js
CHANGED
|
@@ -2673,7 +2673,7 @@ function toInteger(value) {
|
|
|
2673
2673
|
* console.log(_.identity(object) === object);
|
|
2674
2674
|
* // => true
|
|
2675
2675
|
*/
|
|
2676
|
-
function identity
|
|
2676
|
+
function identity(value) {
|
|
2677
2677
|
return value;
|
|
2678
2678
|
}
|
|
2679
2679
|
|
|
@@ -2964,7 +2964,7 @@ var defineProperty = (function() {
|
|
|
2964
2964
|
* @param {Function} string The `toString` result.
|
|
2965
2965
|
* @returns {Function} Returns `func`.
|
|
2966
2966
|
*/
|
|
2967
|
-
var baseSetToString = !defineProperty ? identity
|
|
2967
|
+
var baseSetToString = !defineProperty ? identity : function(func, string) {
|
|
2968
2968
|
return defineProperty(func, 'toString', {
|
|
2969
2969
|
'configurable': true,
|
|
2970
2970
|
'enumerable': false,
|
|
@@ -3165,7 +3165,7 @@ function overRest(func, start, transform) {
|
|
|
3165
3165
|
* @returns {Function} Returns the new function.
|
|
3166
3166
|
*/
|
|
3167
3167
|
function baseRest(func, start) {
|
|
3168
|
-
return setToString(overRest(func, start, identity
|
|
3168
|
+
return setToString(overRest(func, start, identity), func + '');
|
|
3169
3169
|
}
|
|
3170
3170
|
|
|
3171
3171
|
/** Used as references for various `Number` constants. */
|
|
@@ -8227,96 +8227,6 @@ const createReactEventHandler = (handler, platform) => {
|
|
|
8227
8227
|
};
|
|
8228
8228
|
};
|
|
8229
8229
|
|
|
8230
|
-
const createStoreImpl = (createState) => {
|
|
8231
|
-
let state;
|
|
8232
|
-
const listeners = /* @__PURE__ */ new Set();
|
|
8233
|
-
const setState = (partial, replace) => {
|
|
8234
|
-
const nextState = typeof partial === "function" ? partial(state) : partial;
|
|
8235
|
-
if (!Object.is(nextState, state)) {
|
|
8236
|
-
const previousState = state;
|
|
8237
|
-
state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
|
|
8238
|
-
listeners.forEach((listener) => listener(state, previousState));
|
|
8239
|
-
}
|
|
8240
|
-
};
|
|
8241
|
-
const getState = () => state;
|
|
8242
|
-
const getInitialState = () => initialState;
|
|
8243
|
-
const subscribe = (listener) => {
|
|
8244
|
-
listeners.add(listener);
|
|
8245
|
-
return () => listeners.delete(listener);
|
|
8246
|
-
};
|
|
8247
|
-
const api = { setState, getState, getInitialState, subscribe };
|
|
8248
|
-
const initialState = state = createState(setState, getState, api);
|
|
8249
|
-
return api;
|
|
8250
|
-
};
|
|
8251
|
-
const createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
|
|
8252
|
-
|
|
8253
|
-
const identity = (arg) => arg;
|
|
8254
|
-
function useStore(api, selector = identity) {
|
|
8255
|
-
const slice = React__default.useSyncExternalStore(
|
|
8256
|
-
api.subscribe,
|
|
8257
|
-
() => selector(api.getState()),
|
|
8258
|
-
() => selector(api.getInitialState())
|
|
8259
|
-
);
|
|
8260
|
-
React__default.useDebugValue(slice);
|
|
8261
|
-
return slice;
|
|
8262
|
-
}
|
|
8263
|
-
const createImpl = (createState) => {
|
|
8264
|
-
const api = createStore(createState);
|
|
8265
|
-
const useBoundStore = (selector) => useStore(api, selector);
|
|
8266
|
-
Object.assign(useBoundStore, api);
|
|
8267
|
-
return useBoundStore;
|
|
8268
|
-
};
|
|
8269
|
-
const create = (createState) => createState ? createImpl(createState) : createImpl;
|
|
8270
|
-
|
|
8271
|
-
const usePartitionDataStore = create((set, get) => ({
|
|
8272
|
-
subBoundaryBorder: {},
|
|
8273
|
-
// 追加单个数据
|
|
8274
|
-
addSubBoundaryBorder: (key, element) => set((state) => ({
|
|
8275
|
-
subBoundaryBorder: {
|
|
8276
|
-
...state.subBoundaryBorder,
|
|
8277
|
-
[key]: { ...element },
|
|
8278
|
-
},
|
|
8279
|
-
})),
|
|
8280
|
-
// 清空所有数据
|
|
8281
|
-
deleteSubBoundaryBorder: (key) => set((state) => {
|
|
8282
|
-
const newSubBoundaryBorder = { ...state.subBoundaryBorder };
|
|
8283
|
-
delete newSubBoundaryBorder[key];
|
|
8284
|
-
return {
|
|
8285
|
-
subBoundaryBorder: newSubBoundaryBorder,
|
|
8286
|
-
};
|
|
8287
|
-
}),
|
|
8288
|
-
// 障碍物
|
|
8289
|
-
obstacles: {},
|
|
8290
|
-
addObstacles: (key, element) => set((state) => ({
|
|
8291
|
-
obstacles: {
|
|
8292
|
-
...state.obstacles,
|
|
8293
|
-
[key]: element,
|
|
8294
|
-
},
|
|
8295
|
-
})),
|
|
8296
|
-
deleteObstacles: (key) => set((state) => {
|
|
8297
|
-
const newObstacles = { ...state.obstacles };
|
|
8298
|
-
delete newObstacles[key];
|
|
8299
|
-
return {
|
|
8300
|
-
obstacles: newObstacles,
|
|
8301
|
-
};
|
|
8302
|
-
}),
|
|
8303
|
-
// svg数据
|
|
8304
|
-
svgElements: {},
|
|
8305
|
-
addSvgElements: (key, element) => set((state) => ({
|
|
8306
|
-
svgElements: {
|
|
8307
|
-
...state.svgElements,
|
|
8308
|
-
[key]: element,
|
|
8309
|
-
},
|
|
8310
|
-
})),
|
|
8311
|
-
deleteSvgElements: (key) => set((state) => {
|
|
8312
|
-
const newSvgElements = { ...state.svgElements };
|
|
8313
|
-
delete newSvgElements[key];
|
|
8314
|
-
return {
|
|
8315
|
-
svgElements: newSvgElements,
|
|
8316
|
-
};
|
|
8317
|
-
}),
|
|
8318
|
-
}));
|
|
8319
|
-
|
|
8320
8230
|
function getOffsetOverride(containerElement, getPixelPositionOffset) {
|
|
8321
8231
|
return typeof getPixelPositionOffset === 'function'
|
|
8322
8232
|
? getPixelPositionOffset(containerElement.offsetWidth, containerElement.offsetHeight)
|
|
@@ -17678,17 +17588,9 @@ const defaultMapConfig = DEFAULT_STYLES;
|
|
|
17678
17588
|
// 地图渲染器组件
|
|
17679
17589
|
const MowerMapRenderer = forwardRef(({ sn, mowerIconConfig = {}, platform = PlatformType.WEB, edger = false, unitType = UnitsType.Imperial, language = 'en', onlyRead = false, mapConfig,
|
|
17680
17590
|
// pathConfig,
|
|
17681
|
-
modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig,
|
|
17591
|
+
modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onError, className, style, googleMapInstance: _googleMapInstance, dragMap = false, canRotateMap = false, dragCallbacks, defaultTransform, debug: _debug = false, doodleList = [], editMap = false, unStructMapData, disabledObstacles = false, onHandleEnterRecord, onHandleCompleteRecord, onHandleStopRecord, onHandleDeleteElement, onSaveBoundaryData, onSaveMap, onEditInfoMapChange, onUpdateBoundary, heightOptions, globalHeight, onHandleEvent, onSelectElement, }, ref) => {
|
|
17682
17592
|
const [currentError, setCurrentError] = useState(null);
|
|
17683
17593
|
// const mapRef = useMap();
|
|
17684
|
-
const { deleteSubBoundaryBorder, deleteObstacles, deleteSvgElements } = usePartitionDataStore();
|
|
17685
|
-
// const {
|
|
17686
|
-
// updateProcessStateIsMowing,
|
|
17687
|
-
// processStateIsMowing,
|
|
17688
|
-
// updateCurrentMowingPartitionId,
|
|
17689
|
-
// currentMowingPartitionId,
|
|
17690
|
-
// resetCurrentMowingPartitionId,
|
|
17691
|
-
// } = useCurrentMowingDataStore();
|
|
17692
17594
|
const [processStateIsMowing, setProcessStateIsMowing] = useState(false);
|
|
17693
17595
|
const [currentMowingPartitionId, setCurrentMowingPartitionId] = useState('');
|
|
17694
17596
|
const [mowPartitionData, setMowPartitionData] = useState(null);
|
|
@@ -17713,12 +17615,6 @@ modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onMapLoad, on
|
|
|
17713
17615
|
const minDistance = useMemo(() => {
|
|
17714
17616
|
return getMinSvgDistanceByModel(modelType);
|
|
17715
17617
|
}, [modelType]);
|
|
17716
|
-
// const {
|
|
17717
|
-
// updateProcessStateIsMowing,
|
|
17718
|
-
// processStateIsMowing,
|
|
17719
|
-
// updateCurrentMowingPartitionId,
|
|
17720
|
-
// currentMowingPartitionId,
|
|
17721
|
-
// } = useCurrentMowingDataStore();
|
|
17722
17618
|
const mapBounds = useMemo(() => {
|
|
17723
17619
|
return calculateMapBounds(mapJson);
|
|
17724
17620
|
}, [mapJson]);
|
|
@@ -17800,10 +17696,9 @@ modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onMapLoad, on
|
|
|
17800
17696
|
if (key === DataType.OBSTACLE) {
|
|
17801
17697
|
newSvgElementDatas[key] =
|
|
17802
17698
|
newSvgElementDatas[key].filter((item) => {
|
|
17803
|
-
return (item.status
|
|
17804
|
-
|
|
17805
|
-
|
|
17806
|
-
item.end_timestamp >= Date.now() / 1000));
|
|
17699
|
+
return (item.status === 1 &&
|
|
17700
|
+
item.start_timestamp <= Date.now() / 1000 &&
|
|
17701
|
+
item.end_timestamp >= Date.now() / 1000);
|
|
17807
17702
|
}) || [];
|
|
17808
17703
|
}
|
|
17809
17704
|
else if (key === DataType.DOODLE) {
|
|
@@ -17833,7 +17728,6 @@ modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onMapLoad, on
|
|
|
17833
17728
|
currentMowingPartitionId,
|
|
17834
17729
|
processStateIsMowing,
|
|
17835
17730
|
]);
|
|
17836
|
-
console.log('------->', svgElementDatas, svgViewElementDatas);
|
|
17837
17731
|
const commonValue = useMemo(() => {
|
|
17838
17732
|
return {
|
|
17839
17733
|
sn,
|
|
@@ -17994,13 +17888,6 @@ modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onMapLoad, on
|
|
|
17994
17888
|
rotation: e.rotate,
|
|
17995
17889
|
});
|
|
17996
17890
|
}, [overlay, bounds, drag]);
|
|
17997
|
-
useEffect(() => {
|
|
17998
|
-
return () => {
|
|
17999
|
-
deleteSubBoundaryBorder(sn);
|
|
18000
|
-
deleteObstacles(sn);
|
|
18001
|
-
deleteSvgElements(sn);
|
|
18002
|
-
};
|
|
18003
|
-
}, []);
|
|
18004
17891
|
useEffect(() => {
|
|
18005
17892
|
if (!realTimeData || realTimeData.length === 0 || !Array.isArray(realTimeData)) {
|
|
18006
17893
|
return;
|
|
@@ -18065,7 +17952,7 @@ modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onMapLoad, on
|
|
|
18065
17952
|
setCurrentMowingPartitionId(currentMowingPartition);
|
|
18066
17953
|
}
|
|
18067
17954
|
if (pathData) {
|
|
18068
|
-
svgMapRef.current
|
|
17955
|
+
svgMapRef.current?.updatePathData?.(pathData, curMowPartitionData);
|
|
18069
17956
|
}
|
|
18070
17957
|
}
|
|
18071
17958
|
else {
|
|
@@ -18079,7 +17966,7 @@ modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onMapLoad, on
|
|
|
18079
17966
|
if (currentMowingPartition !== currentMowingPartitionId) {
|
|
18080
17967
|
setCurrentMowingPartitionId(currentMowingPartition);
|
|
18081
17968
|
}
|
|
18082
|
-
svgMapRef.current
|
|
17969
|
+
svgMapRef.current?.updatePathData?.(pathData, curMowPartitionData);
|
|
18083
17970
|
}
|
|
18084
17971
|
}, [realTimeData, mapJson, pathJson, sn]);
|
|
18085
17972
|
useEffect(() => {
|
package/dist/index.js
CHANGED
|
@@ -2693,7 +2693,7 @@ function toInteger(value) {
|
|
|
2693
2693
|
* console.log(_.identity(object) === object);
|
|
2694
2694
|
* // => true
|
|
2695
2695
|
*/
|
|
2696
|
-
function identity
|
|
2696
|
+
function identity(value) {
|
|
2697
2697
|
return value;
|
|
2698
2698
|
}
|
|
2699
2699
|
|
|
@@ -2984,7 +2984,7 @@ var defineProperty = (function() {
|
|
|
2984
2984
|
* @param {Function} string The `toString` result.
|
|
2985
2985
|
* @returns {Function} Returns `func`.
|
|
2986
2986
|
*/
|
|
2987
|
-
var baseSetToString = !defineProperty ? identity
|
|
2987
|
+
var baseSetToString = !defineProperty ? identity : function(func, string) {
|
|
2988
2988
|
return defineProperty(func, 'toString', {
|
|
2989
2989
|
'configurable': true,
|
|
2990
2990
|
'enumerable': false,
|
|
@@ -3185,7 +3185,7 @@ function overRest(func, start, transform) {
|
|
|
3185
3185
|
* @returns {Function} Returns the new function.
|
|
3186
3186
|
*/
|
|
3187
3187
|
function baseRest(func, start) {
|
|
3188
|
-
return setToString(overRest(func, start, identity
|
|
3188
|
+
return setToString(overRest(func, start, identity), func + '');
|
|
3189
3189
|
}
|
|
3190
3190
|
|
|
3191
3191
|
/** Used as references for various `Number` constants. */
|
|
@@ -8247,96 +8247,6 @@ const createReactEventHandler = (handler, platform) => {
|
|
|
8247
8247
|
};
|
|
8248
8248
|
};
|
|
8249
8249
|
|
|
8250
|
-
const createStoreImpl = (createState) => {
|
|
8251
|
-
let state;
|
|
8252
|
-
const listeners = /* @__PURE__ */ new Set();
|
|
8253
|
-
const setState = (partial, replace) => {
|
|
8254
|
-
const nextState = typeof partial === "function" ? partial(state) : partial;
|
|
8255
|
-
if (!Object.is(nextState, state)) {
|
|
8256
|
-
const previousState = state;
|
|
8257
|
-
state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
|
|
8258
|
-
listeners.forEach((listener) => listener(state, previousState));
|
|
8259
|
-
}
|
|
8260
|
-
};
|
|
8261
|
-
const getState = () => state;
|
|
8262
|
-
const getInitialState = () => initialState;
|
|
8263
|
-
const subscribe = (listener) => {
|
|
8264
|
-
listeners.add(listener);
|
|
8265
|
-
return () => listeners.delete(listener);
|
|
8266
|
-
};
|
|
8267
|
-
const api = { setState, getState, getInitialState, subscribe };
|
|
8268
|
-
const initialState = state = createState(setState, getState, api);
|
|
8269
|
-
return api;
|
|
8270
|
-
};
|
|
8271
|
-
const createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
|
|
8272
|
-
|
|
8273
|
-
const identity = (arg) => arg;
|
|
8274
|
-
function useStore(api, selector = identity) {
|
|
8275
|
-
const slice = React.useSyncExternalStore(
|
|
8276
|
-
api.subscribe,
|
|
8277
|
-
() => selector(api.getState()),
|
|
8278
|
-
() => selector(api.getInitialState())
|
|
8279
|
-
);
|
|
8280
|
-
React.useDebugValue(slice);
|
|
8281
|
-
return slice;
|
|
8282
|
-
}
|
|
8283
|
-
const createImpl = (createState) => {
|
|
8284
|
-
const api = createStore(createState);
|
|
8285
|
-
const useBoundStore = (selector) => useStore(api, selector);
|
|
8286
|
-
Object.assign(useBoundStore, api);
|
|
8287
|
-
return useBoundStore;
|
|
8288
|
-
};
|
|
8289
|
-
const create = (createState) => createState ? createImpl(createState) : createImpl;
|
|
8290
|
-
|
|
8291
|
-
const usePartitionDataStore = create((set, get) => ({
|
|
8292
|
-
subBoundaryBorder: {},
|
|
8293
|
-
// 追加单个数据
|
|
8294
|
-
addSubBoundaryBorder: (key, element) => set((state) => ({
|
|
8295
|
-
subBoundaryBorder: {
|
|
8296
|
-
...state.subBoundaryBorder,
|
|
8297
|
-
[key]: { ...element },
|
|
8298
|
-
},
|
|
8299
|
-
})),
|
|
8300
|
-
// 清空所有数据
|
|
8301
|
-
deleteSubBoundaryBorder: (key) => set((state) => {
|
|
8302
|
-
const newSubBoundaryBorder = { ...state.subBoundaryBorder };
|
|
8303
|
-
delete newSubBoundaryBorder[key];
|
|
8304
|
-
return {
|
|
8305
|
-
subBoundaryBorder: newSubBoundaryBorder,
|
|
8306
|
-
};
|
|
8307
|
-
}),
|
|
8308
|
-
// 障碍物
|
|
8309
|
-
obstacles: {},
|
|
8310
|
-
addObstacles: (key, element) => set((state) => ({
|
|
8311
|
-
obstacles: {
|
|
8312
|
-
...state.obstacles,
|
|
8313
|
-
[key]: element,
|
|
8314
|
-
},
|
|
8315
|
-
})),
|
|
8316
|
-
deleteObstacles: (key) => set((state) => {
|
|
8317
|
-
const newObstacles = { ...state.obstacles };
|
|
8318
|
-
delete newObstacles[key];
|
|
8319
|
-
return {
|
|
8320
|
-
obstacles: newObstacles,
|
|
8321
|
-
};
|
|
8322
|
-
}),
|
|
8323
|
-
// svg数据
|
|
8324
|
-
svgElements: {},
|
|
8325
|
-
addSvgElements: (key, element) => set((state) => ({
|
|
8326
|
-
svgElements: {
|
|
8327
|
-
...state.svgElements,
|
|
8328
|
-
[key]: element,
|
|
8329
|
-
},
|
|
8330
|
-
})),
|
|
8331
|
-
deleteSvgElements: (key) => set((state) => {
|
|
8332
|
-
const newSvgElements = { ...state.svgElements };
|
|
8333
|
-
delete newSvgElements[key];
|
|
8334
|
-
return {
|
|
8335
|
-
svgElements: newSvgElements,
|
|
8336
|
-
};
|
|
8337
|
-
}),
|
|
8338
|
-
}));
|
|
8339
|
-
|
|
8340
8250
|
function getOffsetOverride(containerElement, getPixelPositionOffset) {
|
|
8341
8251
|
return typeof getPixelPositionOffset === 'function'
|
|
8342
8252
|
? getPixelPositionOffset(containerElement.offsetWidth, containerElement.offsetHeight)
|
|
@@ -17698,17 +17608,9 @@ const defaultMapConfig = DEFAULT_STYLES;
|
|
|
17698
17608
|
// 地图渲染器组件
|
|
17699
17609
|
const MowerMapRenderer = React.forwardRef(({ sn, mowerIconConfig = {}, platform = exports.PlatformType.WEB, edger = false, unitType = UnitsType.Imperial, language = 'en', onlyRead = false, mapConfig,
|
|
17700
17610
|
// pathConfig,
|
|
17701
|
-
modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig,
|
|
17611
|
+
modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onError, className, style, googleMapInstance: _googleMapInstance, dragMap = false, canRotateMap = false, dragCallbacks, defaultTransform, debug: _debug = false, doodleList = [], editMap = false, unStructMapData, disabledObstacles = false, onHandleEnterRecord, onHandleCompleteRecord, onHandleStopRecord, onHandleDeleteElement, onSaveBoundaryData, onSaveMap, onEditInfoMapChange, onUpdateBoundary, heightOptions, globalHeight, onHandleEvent, onSelectElement, }, ref) => {
|
|
17702
17612
|
const [currentError, setCurrentError] = React.useState(null);
|
|
17703
17613
|
// const mapRef = useMap();
|
|
17704
|
-
const { deleteSubBoundaryBorder, deleteObstacles, deleteSvgElements } = usePartitionDataStore();
|
|
17705
|
-
// const {
|
|
17706
|
-
// updateProcessStateIsMowing,
|
|
17707
|
-
// processStateIsMowing,
|
|
17708
|
-
// updateCurrentMowingPartitionId,
|
|
17709
|
-
// currentMowingPartitionId,
|
|
17710
|
-
// resetCurrentMowingPartitionId,
|
|
17711
|
-
// } = useCurrentMowingDataStore();
|
|
17712
17614
|
const [processStateIsMowing, setProcessStateIsMowing] = React.useState(false);
|
|
17713
17615
|
const [currentMowingPartitionId, setCurrentMowingPartitionId] = React.useState('');
|
|
17714
17616
|
const [mowPartitionData, setMowPartitionData] = React.useState(null);
|
|
@@ -17733,12 +17635,6 @@ modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onMapLoad, on
|
|
|
17733
17635
|
const minDistance = React.useMemo(() => {
|
|
17734
17636
|
return getMinSvgDistanceByModel(modelType);
|
|
17735
17637
|
}, [modelType]);
|
|
17736
|
-
// const {
|
|
17737
|
-
// updateProcessStateIsMowing,
|
|
17738
|
-
// processStateIsMowing,
|
|
17739
|
-
// updateCurrentMowingPartitionId,
|
|
17740
|
-
// currentMowingPartitionId,
|
|
17741
|
-
// } = useCurrentMowingDataStore();
|
|
17742
17638
|
const mapBounds = React.useMemo(() => {
|
|
17743
17639
|
return calculateMapBounds(mapJson);
|
|
17744
17640
|
}, [mapJson]);
|
|
@@ -17820,10 +17716,9 @@ modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onMapLoad, on
|
|
|
17820
17716
|
if (key === exports.DataType.OBSTACLE) {
|
|
17821
17717
|
newSvgElementDatas[key] =
|
|
17822
17718
|
newSvgElementDatas[key].filter((item) => {
|
|
17823
|
-
return (item.status
|
|
17824
|
-
|
|
17825
|
-
|
|
17826
|
-
item.end_timestamp >= Date.now() / 1000));
|
|
17719
|
+
return (item.status === 1 &&
|
|
17720
|
+
item.start_timestamp <= Date.now() / 1000 &&
|
|
17721
|
+
item.end_timestamp >= Date.now() / 1000);
|
|
17827
17722
|
}) || [];
|
|
17828
17723
|
}
|
|
17829
17724
|
else if (key === exports.DataType.DOODLE) {
|
|
@@ -17853,7 +17748,6 @@ modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onMapLoad, on
|
|
|
17853
17748
|
currentMowingPartitionId,
|
|
17854
17749
|
processStateIsMowing,
|
|
17855
17750
|
]);
|
|
17856
|
-
console.log('------->', svgElementDatas, svgViewElementDatas);
|
|
17857
17751
|
const commonValue = React.useMemo(() => {
|
|
17858
17752
|
return {
|
|
17859
17753
|
sn,
|
|
@@ -18014,13 +17908,6 @@ modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onMapLoad, on
|
|
|
18014
17908
|
rotation: e.rotate,
|
|
18015
17909
|
});
|
|
18016
17910
|
}, [overlay, bounds, drag]);
|
|
18017
|
-
React.useEffect(() => {
|
|
18018
|
-
return () => {
|
|
18019
|
-
deleteSubBoundaryBorder(sn);
|
|
18020
|
-
deleteObstacles(sn);
|
|
18021
|
-
deleteSvgElements(sn);
|
|
18022
|
-
};
|
|
18023
|
-
}, []);
|
|
18024
17911
|
React.useEffect(() => {
|
|
18025
17912
|
if (!realTimeData || realTimeData.length === 0 || !Array.isArray(realTimeData)) {
|
|
18026
17913
|
return;
|
|
@@ -18085,7 +17972,7 @@ modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onMapLoad, on
|
|
|
18085
17972
|
setCurrentMowingPartitionId(currentMowingPartition);
|
|
18086
17973
|
}
|
|
18087
17974
|
if (pathData) {
|
|
18088
|
-
svgMapRef.current
|
|
17975
|
+
svgMapRef.current?.updatePathData?.(pathData, curMowPartitionData);
|
|
18089
17976
|
}
|
|
18090
17977
|
}
|
|
18091
17978
|
else {
|
|
@@ -18099,7 +17986,7 @@ modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onMapLoad, on
|
|
|
18099
17986
|
if (currentMowingPartition !== currentMowingPartitionId) {
|
|
18100
17987
|
setCurrentMowingPartitionId(currentMowingPartition);
|
|
18101
17988
|
}
|
|
18102
|
-
svgMapRef.current
|
|
17989
|
+
svgMapRef.current?.updatePathData?.(pathData, curMowPartitionData);
|
|
18103
17990
|
}
|
|
18104
17991
|
}, [realTimeData, mapJson, pathJson, sn]);
|
|
18105
17992
|
React.useEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MowerMapRenderer.d.ts","sourceRoot":"","sources":["../../src/render/MowerMapRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAgBf,OAAO,EAGL,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"MowerMapRenderer.d.ts","sourceRoot":"","sources":["../../src/render/MowerMapRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAgBf,OAAO,EAGL,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AA0B3B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,GAAG,CAAC;KACb;CACF;AA8FD,eAAO,MAAM,gBAAgB,mGAksB5B,CAAC;AAIF,eAAe,gBAAgB,CAAC;AAChC,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ProcessMowingState } from '../types/store';
|
|
2
|
-
declare const useCurrentMowingDataStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ProcessMowingState>>;
|
|
3
|
-
export default useCurrentMowingDataStore;
|
|
4
|
-
//# sourceMappingURL=useCurrentMowingDataStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrentMowingDataStore.d.ts","sourceRoot":"","sources":["../../src/store/useCurrentMowingDataStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,QAAA,MAAM,yBAAyB,iFAiB5B,CAAC;AAEJ,eAAe,yBAAyB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePartitionDataStore.d.ts","sourceRoot":"","sources":["../../src/store/usePartitionDataStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAKpD,QAAA,MAAM,qBAAqB,iFAuDxB,CAAC;AAEJ,eAAe,qBAAqB,CAAC"}
|