@smart-factor/gem-ui-map-component 0.0.4 → 0.0.5
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/{MapButtons-B_JIvR5e.js → MapButtons-PK3bGjqF.js} +16200 -16182
- package/dist/components/Map/Map.d.ts +1 -1
- package/dist/components/Map/types.d.ts +1 -0
- package/dist/components/MapButtons/index.js +1 -1
- package/dist/hooks/useSetupMap.d.ts +2 -2
- package/dist/main.js +25 -22
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MapExternalProps } from './types';
|
|
2
|
-
declare const MapWithProviders: ({ mapLayers, caseObjectId, sidebarConfig, mapButtonsConfig, mapElementsConfig, }: MapExternalProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const MapWithProviders: ({ mapLayers, caseObjectId, sidebarConfig, mapButtonsConfig, mapElementsConfig, setOuterDrawnGeometry, }: MapExternalProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default MapWithProviders;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MapLayer } from '../components/Map/types';
|
|
1
|
+
import { MapExternalProps, MapLayer } from '../components/Map/types';
|
|
2
2
|
export declare const GEOLOCATION_LAYER = "geolocationLayer";
|
|
3
|
-
export declare const useSetupMap: (mapLayers: MapLayer[], caseObjectId: number) => void;
|
|
3
|
+
export declare const useSetupMap: (mapLayers: MapLayer[], caseObjectId: number, setOuterDrawnGeometry: MapExternalProps['setOuterDrawnGeometry']) => void;
|
package/dist/main.js
CHANGED
|
@@ -14,7 +14,7 @@ var Yn = (t, e, r, n) => ({
|
|
|
14
14
|
import { jsx as m, jsxs as ae, Fragment as ft } from "react/jsx-runtime";
|
|
15
15
|
import * as G from "react";
|
|
16
16
|
import Ce, { useState as re, forwardRef as Al, useEffect as qe, createContext as Rl, useContext as Pl, useRef as fa, useMemo as ha, useCallback as Il } from "react";
|
|
17
|
-
import { a as Bn, b as Nl, r as Va, i as lo, c as co, t as Ll, d as uo, e as Ml, _ as rt, s as Vl, f as T, g as tt, h as Dl, j as Fl, k as $l, l as jl, u as zl, m as ii, n as Br, P as l, o as fo, p as Ge, q as oi, v as ta, w as Ul, x as Zl, y as Bl, z as Ft, A as $t, B as li, C as jt, D as zt, E as je, F as kr, G as hs, H as qn, I as ql, T as Wl, J as ps, K as Gl, L as ci, N as Hl, O as Ql, Q as ms, R as jr, S as Da, U as Wn, V as Kl, W as ye, X as Jn, Y as Yl, Z as Xn, $ as Ze, a0 as Ht, a1 as Jl, a2 as Xl, a3 as ho, a4 as ec, a5 as po, a6 as Hr, a7 as tc, a8 as rc, a9 as nc, aa as sc, ab as ra, ac as os, ad as na, ae as ac, af as tr, ag as ui, ah as di, ai as mo, aj as He, ak as ys, al as Mt, am as zr, an as Xt, ao as yo, ap as Gn, aq as ic, ar as oc, as as Gt, at as go, au as gs, av as lc, aw as cc, ax as uc, ay as dc, az as bn, aA as fc, aB as ls, aC as hc, aD as pc, aE as mc, aF as yc, aG as gc, aH as vc, aI as bc, aJ as _c, aK as xc, aL as wc, aM as kc, aN as Cc, M as Sc, aO as Tc, aP as Oc, aQ as Ec, aR as Ac } from "./MapButtons-
|
|
17
|
+
import { a as Bn, b as Nl, r as Va, i as lo, c as co, t as Ll, d as uo, e as Ml, _ as rt, s as Vl, f as T, g as tt, h as Dl, j as Fl, k as $l, l as jl, u as zl, m as ii, n as Br, P as l, o as fo, p as Ge, q as oi, v as ta, w as Ul, x as Zl, y as Bl, z as Ft, A as $t, B as li, C as jt, D as zt, E as je, F as kr, G as hs, H as qn, I as ql, T as Wl, J as ps, K as Gl, L as ci, N as Hl, O as Ql, Q as ms, R as jr, S as Da, U as Wn, V as Kl, W as ye, X as Jn, Y as Yl, Z as Xn, $ as Ze, a0 as Ht, a1 as Jl, a2 as Xl, a3 as ho, a4 as ec, a5 as po, a6 as Hr, a7 as tc, a8 as rc, a9 as nc, aa as sc, ab as ra, ac as os, ad as na, ae as ac, af as tr, ag as ui, ah as di, ai as mo, aj as He, ak as ys, al as Mt, am as zr, an as Xt, ao as yo, ap as Gn, aq as ic, ar as oc, as as Gt, at as go, au as gs, av as lc, aw as cc, ax as uc, ay as dc, az as bn, aA as fc, aB as ls, aC as hc, aD as pc, aE as mc, aF as yc, aG as gc, aH as vc, aI as bc, aJ as _c, aK as xc, aL as wc, aM as kc, aN as Cc, M as Sc, aO as Tc, aP as Oc, aQ as Ec, aR as Ac } from "./MapButtons-PK3bGjqF.js";
|
|
18
18
|
var mn = class {
|
|
19
19
|
constructor() {
|
|
20
20
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
@@ -11220,13 +11220,14 @@ const Pm = qn`
|
|
|
11220
11220
|
caseObjectId: t,
|
|
11221
11221
|
mapButtonsConfig: e,
|
|
11222
11222
|
mapElementsConfig: r,
|
|
11223
|
-
sidebarConfig: n
|
|
11223
|
+
sidebarConfig: n,
|
|
11224
|
+
setOuterDrawnGeometry: s
|
|
11224
11225
|
}) => {
|
|
11225
|
-
const { isMeasurementHidden:
|
|
11226
|
-
xc(
|
|
11227
|
-
const
|
|
11228
|
-
|
|
11229
|
-
|
|
11226
|
+
const { isMeasurementHidden: a, angleValue: i, isAngleHidden: o } = Da(), { mapLayers: c, isDrawing: u, isEditing: p, selectedGeometry: h } = Gn(), { distanceOverlayElement: v, angleOverlayElement: b, interactions: w } = Wn();
|
|
11227
|
+
xc(c, t, s);
|
|
11228
|
+
const _ = wc(
|
|
11229
|
+
h == null ? void 0 : h.value,
|
|
11230
|
+
c
|
|
11230
11231
|
);
|
|
11231
11232
|
return /* @__PURE__ */ ae(ft, { children: [
|
|
11232
11233
|
n.sidebarVisible && /* @__PURE__ */ m(Dm, { sidebarConfig: n }),
|
|
@@ -11242,33 +11243,33 @@ const Pm = qn`
|
|
|
11242
11243
|
/* @__PURE__ */ m(
|
|
11243
11244
|
Tc,
|
|
11244
11245
|
{
|
|
11245
|
-
ref:
|
|
11246
|
-
hidden:
|
|
11246
|
+
ref: v,
|
|
11247
|
+
hidden: a
|
|
11247
11248
|
}
|
|
11248
11249
|
),
|
|
11249
11250
|
/* @__PURE__ */ m(
|
|
11250
11251
|
qo,
|
|
11251
11252
|
{
|
|
11252
|
-
angle:
|
|
11253
|
-
ref:
|
|
11254
|
-
hidden:
|
|
11253
|
+
angle: i ?? 0,
|
|
11254
|
+
ref: b,
|
|
11255
|
+
hidden: o || typeof i != "number"
|
|
11255
11256
|
}
|
|
11256
11257
|
),
|
|
11257
11258
|
/* @__PURE__ */ m(Xt, { children: /* @__PURE__ */ m(Rh, {}) }),
|
|
11258
11259
|
r.mapElementsVisible && /* @__PURE__ */ ae(ft, { children: [
|
|
11259
|
-
|
|
11260
|
+
_ === "LineString" && r.items.drawCreator && /* @__PURE__ */ m(
|
|
11260
11261
|
vh,
|
|
11261
11262
|
{
|
|
11262
|
-
addDrawCreatorPoint: (
|
|
11263
|
+
addDrawCreatorPoint: (x) => {
|
|
11263
11264
|
Oc({
|
|
11264
|
-
...
|
|
11265
|
-
drawInteraction:
|
|
11265
|
+
...x,
|
|
11266
|
+
drawInteraction: w.current.draw
|
|
11266
11267
|
});
|
|
11267
11268
|
},
|
|
11268
|
-
onDrawEnd: () =>
|
|
11269
|
+
onDrawEnd: () => w.current.draw.finishDrawing()
|
|
11269
11270
|
}
|
|
11270
11271
|
),
|
|
11271
|
-
(
|
|
11272
|
+
(u || p) && r.items.snapBar && /* @__PURE__ */ m(jm, {})
|
|
11272
11273
|
] })
|
|
11273
11274
|
] })
|
|
11274
11275
|
}
|
|
@@ -11279,11 +11280,12 @@ const Pm = qn`
|
|
|
11279
11280
|
caseObjectId: e,
|
|
11280
11281
|
sidebarConfig: r,
|
|
11281
11282
|
mapButtonsConfig: n,
|
|
11282
|
-
mapElementsConfig: s
|
|
11283
|
+
mapElementsConfig: s,
|
|
11284
|
+
setOuterDrawnGeometry: a
|
|
11283
11285
|
}) => {
|
|
11284
11286
|
yc();
|
|
11285
|
-
const { initialized:
|
|
11286
|
-
return /* @__PURE__ */ m(ft, { children:
|
|
11287
|
+
const { initialized: i } = Wn();
|
|
11288
|
+
return /* @__PURE__ */ m(ft, { children: i ? /* @__PURE__ */ m(gc, { children: /* @__PURE__ */ m(vc, { children: /* @__PURE__ */ m(bc, { children: /* @__PURE__ */ m(
|
|
11287
11289
|
Vf,
|
|
11288
11290
|
{
|
|
11289
11291
|
mapLayers: _c(t),
|
|
@@ -11294,7 +11296,8 @@ const Pm = qn`
|
|
|
11294
11296
|
sidebarConfig: r,
|
|
11295
11297
|
mapButtonsConfig: n,
|
|
11296
11298
|
mapElementsConfig: s,
|
|
11297
|
-
caseObjectId: e || -1
|
|
11299
|
+
caseObjectId: e || -1,
|
|
11300
|
+
setOuterDrawnGeometry: a
|
|
11298
11301
|
}
|
|
11299
11302
|
) })
|
|
11300
11303
|
}
|