@m4l/gclick 0.3.7 → 0.3.8
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/components/ReportsViewer/subcomponents/ReportSheetMapFitBounds/ReportSheetMapFitBounds.d.ts +3 -2
- package/components/ReportsViewer/subcomponents/ReportSheetMapFitBounds/ReportSheetMapFitBounds.d.ts.map +1 -1
- package/components/ReportsViewer/subcomponents/ReportSheetMapFitBounds/ReportSheetMapFitBounds.js +16 -20
- package/components/index.d.ts +1 -0
- package/components/index.d.ts.map +1 -1
- package/components/maps/components/GpsMap/constants.d.ts +1 -0
- package/components/maps/components/GpsMap/constants.d.ts.map +1 -1
- package/components/maps/components/GpsMap/constants.js +16 -14
- package/components/maps/components/GpsMap/contexts/MapContext/MapContext.d.ts +2 -1
- package/components/maps/components/GpsMap/contexts/MapContext/MapContext.d.ts.map +1 -1
- package/components/maps/components/GpsMap/contexts/MapContext/helpers/featureObservability.d.ts +28 -0
- package/components/maps/components/GpsMap/contexts/MapContext/helpers/featureObservability.d.ts.map +1 -0
- package/components/maps/components/GpsMap/contexts/MapContext/helpers/featureObservability.js +111 -0
- package/components/maps/components/GpsMap/contexts/MapContext/helpers/geoJsonBounds.d.ts +9 -0
- package/components/maps/components/GpsMap/contexts/MapContext/helpers/geoJsonBounds.d.ts.map +1 -0
- package/components/maps/components/GpsMap/contexts/MapContext/helpers/geoJsonBounds.js +183 -0
- package/components/maps/components/GpsMap/contexts/MapContext/helpers/helpers.d.ts +112 -0
- package/components/maps/components/GpsMap/contexts/MapContext/helpers/helpers.d.ts.map +1 -0
- package/components/maps/components/GpsMap/contexts/MapContext/helpers/helpers.js +87 -0
- package/components/maps/components/GpsMap/contexts/MapContext/helpers/layerDataBounds.d.ts +10 -0
- package/components/maps/components/GpsMap/contexts/MapContext/helpers/layerDataBounds.d.ts.map +1 -0
- package/components/maps/components/GpsMap/contexts/MapContext/helpers/layerDataBounds.js +12 -0
- package/components/maps/components/GpsMap/contexts/MapContext/index.d.ts +2 -1
- package/components/maps/components/GpsMap/contexts/MapContext/index.d.ts.map +1 -1
- package/components/maps/components/GpsMap/contexts/MapContext/store.d.ts +6 -2
- package/components/maps/components/GpsMap/contexts/MapContext/store.d.ts.map +1 -1
- package/components/maps/components/GpsMap/contexts/MapContext/store.js +301 -123
- package/components/maps/components/GpsMap/contexts/MapContext/types.d.ts +191 -20
- package/components/maps/components/GpsMap/contexts/MapContext/types.d.ts.map +1 -1
- package/components/maps/components/GpsMap/contexts/MapContext/types.js +8 -0
- package/components/maps/components/GpsMap/featureRenders/CommonFeatureRender/index.d.ts.map +1 -1
- package/components/maps/components/GpsMap/featureRenders/CommonFeatureRender/index.js +93 -124
- package/components/maps/components/GpsMap/hooks/index.d.ts +3 -0
- package/components/maps/components/GpsMap/hooks/index.d.ts.map +1 -1
- package/components/maps/components/GpsMap/hooks/useAutoFocus/helpers.d.ts +12 -0
- package/components/maps/components/GpsMap/hooks/useAutoFocus/helpers.d.ts.map +1 -0
- package/components/maps/components/GpsMap/hooks/useAutoFocus/helpers.js +29 -0
- package/components/maps/components/GpsMap/hooks/useAutoFocus/index.d.ts +1 -4
- package/components/maps/components/GpsMap/hooks/useAutoFocus/index.d.ts.map +1 -1
- package/components/maps/components/GpsMap/hooks/useAutoFocus/index.js +32 -59
- package/components/maps/components/GpsMap/hooks/useAutoFocus/types.d.ts +4 -13
- package/components/maps/components/GpsMap/hooks/useAutoFocus/types.d.ts.map +1 -1
- package/components/maps/components/GpsMap/hooks/useMapInteractionCapture.d.ts +7 -0
- package/components/maps/components/GpsMap/hooks/useMapInteractionCapture.d.ts.map +1 -0
- package/components/maps/components/GpsMap/hooks/useMapInteractionCapture.js +42 -0
- package/components/maps/components/GpsMap/hooks/useMapInteractionCapture.types.d.ts +19 -0
- package/components/maps/components/GpsMap/hooks/useMapInteractionCapture.types.d.ts.map +1 -0
- package/components/maps/components/GpsMap/hooks/useObservableFeatureEventHandlers.d.ts +12 -0
- package/components/maps/components/GpsMap/hooks/useObservableFeatureEventHandlers.d.ts.map +1 -0
- package/components/maps/components/GpsMap/hooks/useObservableFeatureEventHandlers.js +43 -0
- package/components/maps/components/GpsMap/index.d.ts +1 -0
- package/components/maps/components/GpsMap/index.d.ts.map +1 -1
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/ButtonsToolsList/subcomponents/MeasureTool/constants.d.ts +5 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/ButtonsToolsList/subcomponents/MeasureTool/constants.d.ts.map +1 -1
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/ButtonsToolsList/subcomponents/MeasureTool/constants.js +20 -13
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/ButtonsToolsList/subcomponents/MeasureTool/hooks/useMeasure/index.d.ts +4 -3
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/ButtonsToolsList/subcomponents/MeasureTool/hooks/useMeasure/index.d.ts.map +1 -1
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/ButtonsToolsList/subcomponents/MeasureTool/hooks/useMeasure/index.js +175 -120
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/ButtonsToolsList/subcomponents/MeasureTool/hooks/useMeasure/types.d.ts +6 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/ButtonsToolsList/subcomponents/MeasureTool/hooks/useMeasure/types.d.ts.map +1 -1
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/ButtonsToolsList/subcomponents/MeasureTool/subcomponents/MyActions/MyActions.d.ts.map +1 -1
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/ButtonsToolsList/subcomponents/MeasureTool/subcomponents/MyActions/MyActions.js +26 -12
- package/components/maps/components/GpsMap/subcomponents/LayersContainer/subcomponents/Layer/Layer.js +1 -1
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/constants.d.ts +6 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/constants.d.ts.map +1 -1
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/constants.js +38 -26
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useDatagridFiltered.js +26 -26
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useFilterAndSort/useFilterAndSort.js +27 -27
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useMaster.js +4 -4
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useModuleDynamicActions.d.ts +1 -1
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useModuleDynamicActions.d.ts.map +1 -1
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useModuleDynamicActions.js +34 -28
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useRowActionsGetter.d.ts.map +1 -1
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useRowActionsGetter.js +41 -36
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useTabFiltered.js +17 -17
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/Form.d.ts.map +1 -1
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/Form.js +16 -18
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/hooks/useDrawing.d.ts +3 -2
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/hooks/useDrawing.d.ts.map +1 -1
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/hooks/useDrawing.js +136 -92
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/GeneralData.d.ts.map +1 -1
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/GeneralData.js +29 -23
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceFeatureRender/GeofenceFeatureRender.d.ts +1 -1
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceFeatureRender/GeofenceFeatureRender.d.ts.map +1 -1
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceFeatureRender/GeofenceFeatureRender.js +60 -95
- package/components/maps/index.d.ts +1 -0
- package/components/maps/index.d.ts.map +1 -1
- package/index.js +143 -136
- package/package.json +3 -4
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { devtools as u } from "zustand/middleware";
|
|
2
|
+
const s = 0.3, c = 16, d = 1, O = [50, 50], h = 22, m = 1e-4, E = 0.1, g = (e, t) => {
|
|
3
|
+
const { enabled: n = !1 } = t;
|
|
4
|
+
return n && process.env.NODE_ENV === "development" ? u(e, t) : e;
|
|
5
|
+
}, i = (e, t, n) => {
|
|
6
|
+
const r = e.ownersByChannel[t];
|
|
7
|
+
return r === void 0 || r === n;
|
|
8
|
+
}, V = (e, t, n) => t.every((r) => i(e, r, n)), w = (e, t, n) => {
|
|
9
|
+
n.forEach((r) => {
|
|
10
|
+
e.ownersByChannel[r] === t && delete e.ownersByChannel[r];
|
|
11
|
+
});
|
|
12
|
+
}, o = (e) => ({
|
|
13
|
+
ok: e === "success",
|
|
14
|
+
status: e
|
|
15
|
+
}), M = (e) => {
|
|
16
|
+
try {
|
|
17
|
+
return e() ?? o("success");
|
|
18
|
+
} catch {
|
|
19
|
+
return o("noop");
|
|
20
|
+
}
|
|
21
|
+
}, l = (e) => Number.isFinite(e.lat) && Number.isFinite(e.lng) && e.lat >= -90 && e.lat <= 90 && e.lng >= -180 && e.lng <= 180, D = (e) => l(e.southWest) && l(e.northEast) && e.southWest.lat <= e.northEast.lat && e.southWest.lng <= e.northEast.lng, _ = (e, t) => i(
|
|
22
|
+
e,
|
|
23
|
+
"viewport_control",
|
|
24
|
+
t
|
|
25
|
+
), N = (e, t, n) => _(t, n) ? e ? {
|
|
26
|
+
map: e,
|
|
27
|
+
result: o("success")
|
|
28
|
+
} : {
|
|
29
|
+
map: null,
|
|
30
|
+
result: o("map-unavailable")
|
|
31
|
+
} : {
|
|
32
|
+
map: null,
|
|
33
|
+
result: o("blocked")
|
|
34
|
+
}, C = (e, t) => {
|
|
35
|
+
t?.invalidateSize && e.invalidateSize();
|
|
36
|
+
}, p = (e = {}) => ({
|
|
37
|
+
...e,
|
|
38
|
+
animate: e.animate ?? !0,
|
|
39
|
+
duration: e.duration ?? s
|
|
40
|
+
}), S = (e = {}) => ({
|
|
41
|
+
...e,
|
|
42
|
+
animate: e.animate ?? !0,
|
|
43
|
+
duration: e.duration ?? s,
|
|
44
|
+
minZoom: e.minZoom ?? c,
|
|
45
|
+
zoomThreshold: e.zoomThreshold ?? d
|
|
46
|
+
}), f = (e = {}) => ({
|
|
47
|
+
...e,
|
|
48
|
+
animate: e.animate ?? !1,
|
|
49
|
+
duration: e.duration ?? s,
|
|
50
|
+
maxZoom: e.maxZoom ?? h,
|
|
51
|
+
padding: e.padding ?? O
|
|
52
|
+
}), a = (e, t, n = m) => Math.abs(e.lat - t.lat) <= n && Math.abs(e.lng - t.lng) <= n, A = (e, t, n = E) => Math.abs(e - t) <= n, I = (e, t, n) => {
|
|
53
|
+
const r = e.getCenter();
|
|
54
|
+
return a(t, {
|
|
55
|
+
lat: r.lat,
|
|
56
|
+
lng: r.lng
|
|
57
|
+
}) ? n === void 0 ? !0 : A(e.getZoom(), n) : !1;
|
|
58
|
+
}, L = (e, t) => {
|
|
59
|
+
const n = e.getBounds();
|
|
60
|
+
return a(t.southWest, {
|
|
61
|
+
lat: n.getSouth(),
|
|
62
|
+
lng: n.getWest()
|
|
63
|
+
}) && a(t.northEast, {
|
|
64
|
+
lat: n.getNorth(),
|
|
65
|
+
lng: n.getEast()
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
V as areInteractionChannelsAvailable,
|
|
70
|
+
a as areViewportPointsClose,
|
|
71
|
+
A as areViewportZoomLevelsClose,
|
|
72
|
+
_ as canRunViewportAction,
|
|
73
|
+
g as createDevtools,
|
|
74
|
+
o as createViewportActionResult,
|
|
75
|
+
N as getAllowedViewportMap,
|
|
76
|
+
C as invalidateViewportSizeIfNeeded,
|
|
77
|
+
L as isBoundsViewportAlreadyApplied,
|
|
78
|
+
i as isInteractionChannelAvailableForOwner,
|
|
79
|
+
I as isPointViewportAlreadyApplied,
|
|
80
|
+
D as isValidViewportBounds,
|
|
81
|
+
l as isValidViewportPoint,
|
|
82
|
+
w as releaseOwnedInteractionChannels,
|
|
83
|
+
f as resolveMoveToBoundsOptions,
|
|
84
|
+
p as resolveMoveToPointOptions,
|
|
85
|
+
S as resolveSmartMoveToPointOptions,
|
|
86
|
+
M as runViewportActionSafely
|
|
87
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LayerDataBounds, LayerStore } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns whether two serialized layer bounds objects represent the same area.
|
|
4
|
+
*/
|
|
5
|
+
export declare function areLayerDataBoundsEqual(leftBounds?: LayerDataBounds, rightBounds?: LayerDataBounds): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Recomputes one layer cached bounds and bumps the version only when the value changes.
|
|
8
|
+
*/
|
|
9
|
+
export declare function refreshLayerDataBounds(layer: LayerStore): void;
|
|
10
|
+
//# sourceMappingURL=layerDataBounds.d.ts.map
|
package/components/maps/components/GpsMap/contexts/MapContext/helpers/layerDataBounds.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layerDataBounds.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../packages/gclick/src/components/maps/components/GpsMap/contexts/MapContext/helpers/layerDataBounds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG5D;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,CAAC,EAAE,eAAe,EAC5B,WAAW,CAAC,EAAE,eAAe,WAgB9B;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,UAAU,QASvD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { computeGeoJsonBounds as a } from "./geoJsonBounds.js";
|
|
2
|
+
function s(t, o) {
|
|
3
|
+
return !t && !o ? !0 : !t || !o ? !1 : t.southWest[0] === o.southWest[0] && t.southWest[1] === o.southWest[1] && t.northEast[0] === o.northEast[0] && t.northEast[1] === o.northEast[1];
|
|
4
|
+
}
|
|
5
|
+
function e(t) {
|
|
6
|
+
const o = t.dataBoundsOverride ?? a(t.geoJsonObject);
|
|
7
|
+
s(t.dataBounds, o) || (t.dataBounds = o, t.dataBoundsVersion = (t.dataBoundsVersion ?? 0) + 1);
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
s as areLayerDataBoundsEqual,
|
|
11
|
+
e as refreshLayerDataBounds
|
|
12
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { MapProvider, MapContext } from './MapContext';
|
|
2
|
-
export
|
|
2
|
+
export { INTERACTION_CHANNELS } from './types';
|
|
3
|
+
export type { RendePropFeatureArgs, ComponentRenderPropFeature, DecimationFilter, DecimationFilterCache, DecimationFilterParams, LayerDecimationConfig, FeatureId, FeatureSelectionSource, LayerFeatureAnchorStrategy, LayerFeatureObservability, FeatureCollection, Feature, FeatureWithCoords, Geometry, Point as GeometryPoint, GeoJsonProperties, MapFeatureEventType, MapObservableFeatureAnchorPurpose, MapObservableFeatureAnchorResult, MapObservableFeatureConsumer, MapObservableFeatureEvent, MapObservableFeaturePickResult, MapObservableFeatureSubscriptionOptions, SelectedFeatureState, InteractionChannel, InteractionOwnerId, InteractionOwnershipState, ViewportPoint, ViewportBounds, LayerDataBounds, ViewportPadding, ViewportActionStatus, ViewportActionResult, ViewportActionBaseOptions, InvalidateViewportSizeOptions, MoveToPointOptions, SmartMoveToPointOptions, MoveToBoundsOptions, } from './types';
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/gclick/src/components/maps/components/GpsMap/contexts/MapContext/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACvD,YAAY,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,SAAS,EACT,sBAAsB,EACtB,iBAAiB,EACjB,OAAO,EACP,iBAAiB,EACjB,QAAQ,EACR,KAAK,IAAI,aAAa,EACtB,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/gclick/src/components/maps/components/GpsMap/contexts/MapContext/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,YAAY,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,SAAS,EACT,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,EACzB,iBAAiB,EACjB,OAAO,EACP,iBAAiB,EACjB,QAAQ,EACR,KAAK,IAAI,aAAa,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,iCAAiC,EACjC,gCAAgC,EAChC,4BAA4B,EAC5B,yBAAyB,EACzB,8BAA8B,EAC9B,uCAAuC,EACvC,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,EACzB,aAAa,EACb,cAAc,EACd,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,6BAA6B,EAC7B,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,SAAS,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { StoreApi } from 'zustand';
|
|
1
2
|
import { MapStateWithActions, InitialMapStoreProps } from './types';
|
|
2
3
|
/**
|
|
3
4
|
* Creates the map store instance with its initial state and actions.
|
|
4
5
|
*/
|
|
5
|
-
export
|
|
6
|
-
|
|
6
|
+
export type MapStore = StoreApi<MapStateWithActions>;
|
|
7
|
+
/**
|
|
8
|
+
* Creates the Zustand store that powers the shared `MapContext` API.
|
|
9
|
+
*/
|
|
10
|
+
export declare const createMapStore: (initProps: InitialMapStoreProps, storeDevtoolsEnabled?: boolean) => MapStore;
|
|
7
11
|
//# sourceMappingURL=store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/gclick/src/components/maps/components/GpsMap/contexts/MapContext/store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/gclick/src/components/maps/components/GpsMap/contexts/MapContext/store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKxC,OAAO,KAAK,EAEV,mBAAmB,EACnB,oBAAoB,EASrB,MAAM,SAAS,CAAC;AA0CjB;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,cAAc,GACzB,WAAW,oBAAoB,EAC/B,8BAA4B,KAC3B,QAgqBF,CAAC"}
|