@performant-software/geospatial 2.2.23-beta.13 → 2.2.23-beta.15
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/build/index.js +2 -0
- package/build/index.js.map +1 -0
- package/build/main.css +127 -0
- package/dist/index.cjs14.js +1 -1
- package/dist/index.cjs15.js +1 -1
- package/dist/index.cjs16.js +1 -1
- package/dist/index.cjs17.js +1 -1
- package/dist/index.cjs19.js +1 -1
- package/dist/index.cjs198.js +1 -1
- package/dist/index.cjs233.js +1 -1
- package/dist/index.cjs233.js.map +1 -1
- package/dist/index.cjs234.js +1 -1
- package/dist/index.cjs234.js.map +1 -1
- package/dist/index.cjs235.js +1 -1
- package/dist/index.cjs235.js.map +1 -1
- package/dist/index.cjs26.js +1 -1
- package/dist/index.cjs52.js +1 -1
- package/dist/index.cjs59.js +1 -1
- package/dist/index.cjs6.js +1 -1
- package/dist/index.cjs6.js.map +1 -1
- package/dist/index.cjs60.js +9 -1
- package/dist/index.cjs60.js.map +1 -1
- package/dist/index.cjs61.js +19 -1
- package/dist/index.cjs61.js.map +1 -1
- package/dist/index.cjs62.js +1 -9
- package/dist/index.cjs62.js.map +1 -1
- package/dist/index.cjs63.js +1 -19
- package/dist/index.cjs63.js.map +1 -1
- package/dist/index.cjs67.js +1 -1
- package/dist/index.cjs67.js.map +1 -1
- package/dist/index.cjs68.js +1 -1
- package/dist/index.cjs68.js.map +1 -1
- package/dist/index.cjs69.js +1 -1
- package/dist/index.cjs69.js.map +1 -1
- package/dist/index.cjs70.js +1 -1
- package/dist/index.cjs70.js.map +1 -1
- package/dist/index.cjs71.js +1 -1
- package/dist/index.cjs71.js.map +1 -1
- package/dist/index.cjs72.js +1 -1
- package/dist/index.cjs72.js.map +1 -1
- package/dist/index.cjs73.js +1 -1
- package/dist/index.cjs73.js.map +1 -1
- package/dist/index.cjs74.js +1 -1
- package/dist/index.cjs74.js.map +1 -1
- package/dist/index.cjs75.js +1 -1
- package/dist/index.cjs75.js.map +1 -1
- package/dist/index.cjs76.js +1 -1
- package/dist/index.cjs76.js.map +1 -1
- package/dist/index.cjs77.js +1 -1
- package/dist/index.cjs77.js.map +1 -1
- package/dist/index.cjs78.js +1 -1
- package/dist/index.cjs78.js.map +1 -1
- package/dist/index.cjs79.js +1 -1
- package/dist/index.cjs79.js.map +1 -1
- package/dist/index.cjs80.js +1 -1
- package/dist/index.cjs80.js.map +1 -1
- package/dist/index.es14.js +2 -2
- package/dist/index.es15.js +9 -9
- package/dist/index.es16.js +1 -1
- package/dist/index.es17.js +3 -3
- package/dist/index.es19.js +2 -2
- package/dist/index.es198.js +2 -2
- package/dist/index.es233.js +46 -3
- package/dist/index.es233.js.map +1 -1
- package/dist/index.es234.js +22 -45
- package/dist/index.es234.js.map +1 -1
- package/dist/index.es235.js +3 -23
- package/dist/index.es235.js.map +1 -1
- package/dist/index.es26.js +1 -1
- package/dist/index.es52.js +6 -6
- package/dist/index.es59.js +2 -6
- package/dist/index.es59.js.map +1 -1
- package/dist/index.es6.js +19 -19
- package/dist/index.es6.js.map +1 -1
- package/dist/index.es60.js +30 -2
- package/dist/index.es60.js.map +1 -1
- package/dist/index.es61.js +602 -2
- package/dist/index.es61.js.map +1 -1
- package/dist/index.es62.js +5 -29
- package/dist/index.es62.js.map +1 -1
- package/dist/index.es63.js +2 -602
- package/dist/index.es63.js.map +1 -1
- package/dist/index.es64.js +2 -2
- package/dist/index.es67.js +2 -55
- package/dist/index.es67.js.map +1 -1
- package/dist/index.es68.js +4 -48
- package/dist/index.es68.js.map +1 -1
- package/dist/index.es69.js +28 -37
- package/dist/index.es69.js.map +1 -1
- package/dist/index.es70.js +56 -11
- package/dist/index.es70.js.map +1 -1
- package/dist/index.es71.js +47 -14
- package/dist/index.es71.js.map +1 -1
- package/dist/index.es72.js +38 -29
- package/dist/index.es72.js.map +1 -1
- package/dist/index.es73.js +8 -11
- package/dist/index.es73.js.map +1 -1
- package/dist/index.es74.js +14 -13
- package/dist/index.es74.js.map +1 -1
- package/dist/index.es75.js +29 -12
- package/dist/index.es75.js.map +1 -1
- package/dist/index.es76.js +13 -2
- package/dist/index.es76.js.map +1 -1
- package/dist/index.es77.js +14 -4
- package/dist/index.es77.js.map +1 -1
- package/dist/index.es78.js +49 -26
- package/dist/index.es78.js.map +1 -1
- package/dist/index.es79.js +58 -44
- package/dist/index.es79.js.map +1 -1
- package/dist/index.es80.js +10 -64
- package/dist/index.es80.js.map +1 -1
- package/package.json +1 -1
- package/src/components/LocationMarkers.js +11 -1
- package/types/components/LocationMarker.js.flow +82 -0
- package/types/components/LocationMarkers.js.flow +11 -1
package/dist/index.cjs79.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs79.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/
|
|
1
|
+
{"version":3,"file":"index.cjs79.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/source.js"],"sourcesContent":["import * as React from 'react';\nimport { useContext, useEffect, useMemo, useState, useRef } from 'react';\nimport { cloneElement } from 'react';\nimport { MapContext } from './map';\nimport assert from '../utils/assert';\nimport { deepEqual } from '../utils/deep-equal';\nlet sourceCounter = 0;\nfunction createSource(map, id, props) {\n // @ts-ignore\n if (map.style && map.style._loaded) {\n const options = { ...props };\n delete options.id;\n delete options.children;\n // @ts-ignore\n map.addSource(id, options);\n return map.getSource(id);\n }\n return null;\n}\n/* eslint-disable complexity */\nfunction updateSource(source, props, prevProps) {\n assert(props.id === prevProps.id, 'source id changed');\n assert(props.type === prevProps.type, 'source type changed');\n let changedKey = '';\n let changedKeyCount = 0;\n for (const key in props) {\n if (key !== 'children' && key !== 'id' && !deepEqual(prevProps[key], props[key])) {\n changedKey = key;\n changedKeyCount++;\n }\n }\n if (!changedKeyCount) {\n return;\n }\n const type = props.type;\n if (type === 'geojson') {\n source.setData(props.data);\n }\n else if (type === 'image') {\n source.updateImage({\n url: props.url,\n coordinates: props.coordinates\n });\n }\n else if ('setCoordinates' in source && changedKeyCount === 1 && changedKey === 'coordinates') {\n source.setCoordinates(props.coordinates);\n }\n else if ('setUrl' in source) {\n // Added in 1.12.0:\n // vectorTileSource.setTiles\n // vectorTileSource.setUrl\n switch (changedKey) {\n case 'url':\n source.setUrl(props.url);\n break;\n case 'tiles':\n source.setTiles(props.tiles);\n break;\n default:\n }\n }\n else {\n // eslint-disable-next-line\n console.warn(`Unable to update <Source> prop: ${changedKey}`);\n }\n}\n/* eslint-enable complexity */\nfunction Source(props) {\n const map = useContext(MapContext).map.getMap();\n const propsRef = useRef(props);\n const [, setStyleLoaded] = useState(0);\n const id = useMemo(() => props.id || `jsx-source-${sourceCounter++}`, []);\n useEffect(() => {\n if (map) {\n /* global setTimeout */\n const forceUpdate = () => setTimeout(() => setStyleLoaded(version => version + 1), 0);\n map.on('styledata', forceUpdate);\n forceUpdate();\n return () => {\n var _a;\n map.off('styledata', forceUpdate);\n // @ts-ignore\n if (map.style && map.style._loaded && map.getSource(id)) {\n // Parent effects are destroyed before child ones, see\n // https://github.com/facebook/react/issues/16728\n // Source can only be removed after all child layers are removed\n const allLayers = (_a = map.getStyle()) === null || _a === void 0 ? void 0 : _a.layers;\n if (allLayers) {\n for (const layer of allLayers) {\n // @ts-ignore (2339) source does not exist on all layer types\n if (layer.source === id) {\n map.removeLayer(layer.id);\n }\n }\n }\n map.removeSource(id);\n }\n };\n }\n return undefined;\n }, [map]);\n // @ts-ignore\n let source = map && map.style && map.getSource(id);\n if (source) {\n updateSource(source, props, propsRef.current);\n }\n else {\n source = createSource(map, id, props);\n }\n propsRef.current = props;\n return ((source &&\n React.Children.map(props.children, child => child &&\n cloneElement(child, {\n source: id\n }))) ||\n null);\n}\nexport default Source;\n//# sourceMappingURL=source.js.map"],"names":["sourceCounter","createSource","map","id","props","options","updateSource","source","prevProps","assert","changedKey","changedKeyCount","key","deepEqual","type","Source","useContext","MapContext","propsRef","useRef","setStyleLoaded","useState","useMemo","useEffect","forceUpdate","version","_a","allLayers","layer","React","child","cloneElement"],"mappings":"4ZAMA,IAAIA,EAAgB,EACpB,SAASC,EAAaC,EAAKC,EAAIC,EAAO,CAElC,GAAIF,EAAI,OAASA,EAAI,MAAM,QAAS,CAC1B,MAAAG,EAAU,CAAE,GAAGD,GACrB,cAAOC,EAAQ,GACf,OAAOA,EAAQ,SAEXH,EAAA,UAAUC,EAAIE,CAAO,EAClBH,EAAI,UAAUC,CAAE,CAC3B,CACO,OAAA,IACX,CAEA,SAASG,EAAaC,EAAQH,EAAOI,EAAW,CAC5CC,EAAOL,EAAM,KAAOI,EAAU,GAAI,mBAAmB,EACrDC,EAAOL,EAAM,OAASI,EAAU,KAAM,qBAAqB,EAC3D,IAAIE,EAAa,GACbC,EAAkB,EACtB,UAAWC,KAAOR,EACVQ,IAAQ,YAAcA,IAAQ,MAAQ,CAACC,EAAAA,UAAUL,EAAUI,CAAG,EAAGR,EAAMQ,CAAG,CAAC,IAC9DF,EAAAE,EACbD,KAGR,GAAI,CAACA,EACD,OAEJ,MAAMG,EAAOV,EAAM,KACnB,GAAIU,IAAS,UACFP,EAAA,QAAQH,EAAM,IAAI,UAEpBU,IAAS,QACdP,EAAO,YAAY,CACf,IAAKH,EAAM,IACX,YAAaA,EAAM,WAAA,CACtB,UAEI,mBAAoBG,GAAUI,IAAoB,GAAKD,IAAe,cACpEH,EAAA,eAAeH,EAAM,WAAW,UAElC,WAAYG,EAIjB,OAAQG,EAAY,CAChB,IAAK,MACMH,EAAA,OAAOH,EAAM,GAAG,EACvB,MACJ,IAAK,QACMG,EAAA,SAASH,EAAM,KAAK,EAC3B,KAER,MAIQ,QAAA,KAAK,mCAAmCM,CAAU,EAAE,CAEpE,CAEA,SAASK,EAAOX,EAAO,CACnB,MAAMF,EAAMc,EAAAA,WAAWC,EAAAA,UAAU,EAAE,IAAI,OAAO,EACxCC,EAAWC,SAAOf,CAAK,EACvB,EAAGgB,CAAc,EAAIC,WAAS,CAAC,EAC/BlB,EAAKmB,EAAAA,QAAQ,IAAMlB,EAAM,IAAM,cAAcJ,GAAe,GAAI,CAAA,CAAE,EACxEuB,EAAAA,UAAU,IAAM,CACZ,GAAIrB,EAAK,CAEC,MAAAsB,EAAc,IAAM,WAAW,IAAMJ,EAA0BK,GAAAA,EAAU,CAAC,EAAG,CAAC,EAChFvB,OAAAA,EAAA,GAAG,YAAasB,CAAW,EACnBA,IACL,IAAM,CACL,IAAAE,EAGA,GAFAxB,EAAA,IAAI,YAAasB,CAAW,EAE5BtB,EAAI,OAASA,EAAI,MAAM,SAAWA,EAAI,UAAUC,CAAE,EAAG,CAI/C,MAAAwB,GAAaD,EAAKxB,EAAI,SAAA,KAAgB,MAAQwB,IAAO,OAAS,OAASA,EAAG,OAChF,GAAIC,EACA,UAAWC,KAASD,EAEZC,EAAM,SAAWzB,GACbD,EAAA,YAAY0B,EAAM,EAAE,EAIpC1B,EAAI,aAAaC,CAAE,CACvB,CAAA,CAER,CACO,EACR,CAACD,CAAG,CAAC,EAER,IAAIK,EAASL,GAAOA,EAAI,OAASA,EAAI,UAAUC,CAAE,EACjD,OAAII,EACaD,EAAAC,EAAQH,EAAOc,EAAS,OAAO,EAGnCX,EAAAN,EAAaC,EAAKC,EAAIC,CAAK,EAExCc,EAAS,QAAUd,EACVG,GACLsB,EAAM,SAAS,IAAIzB,EAAM,SAAU0B,GAASA,GACxCC,EAAAA,aAAaD,EAAO,CAChB,OAAQ3B,CAAA,CACX,CAAC,GACN,IACR","x_google_ignoreList":[0]}
|
package/dist/index.cjs80.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),a=require("./index.cjs70.js");function c(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const s=c(o),u=s.createContext(null);function i(){var e;const n=(e=o.useContext(u))===null||e===void 0?void 0:e.maps,t=o.useContext(a.MapContext);return o.useMemo(()=>({...n,current:t==null?void 0:t.map}),[n,t])}exports.MountedMapsContext=u;exports.useMap=i;
|
|
2
2
|
//# sourceMappingURL=index.cjs80.js.map
|
package/dist/index.cjs80.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs80.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/
|
|
1
|
+
{"version":3,"file":"index.cjs80.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/use-map.js"],"sourcesContent":["import * as React from 'react';\nimport { useState, useCallback, useMemo, useContext } from 'react';\nimport { MapContext } from './map';\nexport const MountedMapsContext = React.createContext(null);\nexport const MapProvider = props => {\n const [maps, setMaps] = useState({});\n const onMapMount = useCallback((map, id = 'default') => {\n setMaps(currMaps => {\n if (id === 'current') {\n throw new Error(\"'current' cannot be used as map id\");\n }\n if (currMaps[id]) {\n throw new Error(`Multiple maps with the same id: ${id}`);\n }\n return { ...currMaps, [id]: map };\n });\n }, []);\n const onMapUnmount = useCallback((id = 'default') => {\n setMaps(currMaps => {\n if (currMaps[id]) {\n const nextMaps = { ...currMaps };\n delete nextMaps[id];\n return nextMaps;\n }\n return currMaps;\n });\n }, []);\n return (React.createElement(MountedMapsContext.Provider, { value: {\n maps,\n onMapMount,\n onMapUnmount\n } }, props.children));\n};\nexport function useMap() {\n var _a;\n const maps = (_a = useContext(MountedMapsContext)) === null || _a === void 0 ? void 0 : _a.maps;\n const currentMap = useContext(MapContext);\n const mapsWithCurrent = useMemo(() => {\n return { ...maps, current: currentMap === null || currentMap === void 0 ? void 0 : currentMap.map };\n }, [maps, currentMap]);\n return mapsWithCurrent;\n}\n//# sourceMappingURL=use-map.js.map"],"names":["MountedMapsContext","React","useMap","_a","maps","useContext","currentMap","MapContext","useMemo"],"mappings":"iaAGaA,EAAqBC,EAAM,cAAc,IAAI,EA8BnD,SAASC,GAAS,CACjB,IAAAC,EACE,MAAAC,GAAQD,EAAKE,EAAW,WAAAL,CAAkB,KAAO,MAAQG,IAAO,OAAS,OAASA,EAAG,KACrFG,EAAaD,aAAWE,EAAAA,UAAU,EAIjC,OAHiBC,EAAAA,QAAQ,KACrB,CAAE,GAAGJ,EAAM,QAASE,GAAe,KAAgC,OAASA,EAAW,GAAI,GACnG,CAACF,EAAME,CAAU,CAAC,CAEzB","x_google_ignoreList":[0]}
|
package/dist/index.es14.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { commonjsGlobal as Je, getDefaultExportFromCjs as oo } from "./index.
|
|
2
|
-
import { __module as Zn } from "./index.
|
|
1
|
+
import { commonjsGlobal as Je, getDefaultExportFromCjs as oo } from "./index.es62.js";
|
|
2
|
+
import { __module as Zn } from "./index.es64.js";
|
|
3
3
|
(function(Wn, ao) {
|
|
4
4
|
(function(ze, de) {
|
|
5
5
|
Wn.exports = de();
|
package/dist/index.es15.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import * as i from "react";
|
|
2
|
-
import p from "./index.
|
|
3
|
-
import "./index.es68.js";
|
|
4
|
-
import "./index.es69.js";
|
|
5
|
-
import "./index.es70.js";
|
|
2
|
+
import p from "./index.es70.js";
|
|
6
3
|
import "./index.es71.js";
|
|
7
4
|
import "./index.es72.js";
|
|
8
|
-
import
|
|
5
|
+
import "./index.es73.js";
|
|
9
6
|
import "./index.es74.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
7
|
+
import "./index.es75.js";
|
|
8
|
+
import m from "./index.es76.js";
|
|
9
|
+
import "./index.es77.js";
|
|
10
|
+
import a from "./index.es78.js";
|
|
11
|
+
import n from "./index.es79.js";
|
|
12
|
+
import { useMap as e } from "./index.es80.js";
|
|
13
13
|
function C() {
|
|
14
14
|
return e();
|
|
15
15
|
}
|
|
16
|
-
const f = import("./index.
|
|
16
|
+
const f = import("./index.es69.js").then((o) => o.i), N = i.forwardRef(function(r, t) {
|
|
17
17
|
return p(r, t, f);
|
|
18
18
|
}), R = m, S = a, b = n;
|
|
19
19
|
export {
|
package/dist/index.es16.js
CHANGED
package/dist/index.es17.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { __module as e } from "./index.
|
|
2
|
-
import { __require as r } from "./index.
|
|
3
|
-
import { __require as o } from "./index.
|
|
1
|
+
import { __module as e } from "./index.es59.js";
|
|
2
|
+
import { __require as r } from "./index.es60.js";
|
|
3
|
+
import { __require as o } from "./index.es61.js";
|
|
4
4
|
process.env.NODE_ENV === "production" ? e.exports = r() : e.exports = o();
|
|
5
5
|
var m = e.exports;
|
|
6
6
|
export {
|
package/dist/index.es19.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { commonjsGlobal as nd, getDefaultExportFromCjs as od } from "./index.
|
|
2
|
-
import { __module as lu } from "./index.
|
|
1
|
+
import { commonjsGlobal as nd, getDefaultExportFromCjs as od } from "./index.es62.js";
|
|
2
|
+
import { __module as lu } from "./index.es63.js";
|
|
3
3
|
function ld(an, vl) {
|
|
4
4
|
for (var Ur = 0; Ur < vl.length; Ur++) {
|
|
5
5
|
const cr = vl[Ur];
|
package/dist/index.es198.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { syncProjection as f, cloneTransform as T, applyViewStateToTransform as p, transformToViewState as _ } from "./index.
|
|
2
|
-
import { normalizeStyle as v } from "./index.
|
|
1
|
+
import { syncProjection as f, cloneTransform as T, applyViewStateToTransform as p, transformToViewState as _ } from "./index.es233.js";
|
|
2
|
+
import { normalizeStyle as v } from "./index.es234.js";
|
|
3
3
|
import { deepEqual as h } from "./index.es203.js";
|
|
4
4
|
const g = { version: 8, sources: {}, layers: [] }, y = {
|
|
5
5
|
mousedown: "onMouseDown",
|
package/dist/index.es233.js
CHANGED
|
@@ -1,6 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { deepEqual as c } from "./index.es203.js";
|
|
2
|
+
function g(n) {
|
|
3
|
+
const o = n.clone();
|
|
4
|
+
return o.pixelsToGLUnits = n.pixelsToGLUnits, o;
|
|
5
|
+
}
|
|
6
|
+
function r(n, o) {
|
|
7
|
+
if (!n.getProjection)
|
|
8
|
+
return;
|
|
9
|
+
const i = n.getProjection(), e = o.getProjection();
|
|
10
|
+
c(i, e) || o.setProjection(i);
|
|
11
|
+
}
|
|
12
|
+
function d(n) {
|
|
13
|
+
return {
|
|
14
|
+
longitude: n.center.lng,
|
|
15
|
+
latitude: n.center.lat,
|
|
16
|
+
zoom: n.zoom,
|
|
17
|
+
pitch: n.pitch,
|
|
18
|
+
bearing: n.bearing,
|
|
19
|
+
padding: n.padding
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function s(n, o) {
|
|
23
|
+
const i = o.viewState || o;
|
|
24
|
+
let e = !1;
|
|
25
|
+
if ("longitude" in i && "latitude" in i) {
|
|
26
|
+
const t = n.center;
|
|
27
|
+
n.center = new t.constructor(i.longitude, i.latitude), e = e || t !== n.center;
|
|
28
|
+
}
|
|
29
|
+
if ("zoom" in i) {
|
|
30
|
+
const t = n.zoom;
|
|
31
|
+
n.zoom = i.zoom, e = e || t !== n.zoom;
|
|
32
|
+
}
|
|
33
|
+
if ("bearing" in i) {
|
|
34
|
+
const t = n.bearing;
|
|
35
|
+
n.bearing = i.bearing, e = e || t !== n.bearing;
|
|
36
|
+
}
|
|
37
|
+
if ("pitch" in i) {
|
|
38
|
+
const t = n.pitch;
|
|
39
|
+
n.pitch = i.pitch, e = e || t !== n.pitch;
|
|
40
|
+
}
|
|
41
|
+
return i.padding && !n.isPaddingEqual(i.padding) && (e = !0, n.padding = i.padding), e;
|
|
42
|
+
}
|
|
3
43
|
export {
|
|
4
|
-
|
|
44
|
+
s as applyViewStateToTransform,
|
|
45
|
+
g as cloneTransform,
|
|
46
|
+
r as syncProjection,
|
|
47
|
+
d as transformToViewState
|
|
5
48
|
};
|
|
6
49
|
//# sourceMappingURL=index.es233.js.map
|
package/dist/index.es233.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es233.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"index.es233.js","sources":["../../../node_modules/react-map-gl/dist/esm/utils/transform.js"],"sourcesContent":["import { deepEqual } from './deep-equal';\n/**\n * Make a copy of a transform\n * @param tr\n */\nexport function cloneTransform(tr) {\n const newTransform = tr.clone();\n // Work around mapbox bug - this value is not assigned in clone(), only in resize()\n newTransform.pixelsToGLUnits = tr.pixelsToGLUnits;\n return newTransform;\n}\n/**\n * Copy projection from one transform to another. This only applies to mapbox-gl transforms\n * @param src the transform to copy projection settings from\n * @param dest to transform to copy projection settings to\n */\nexport function syncProjection(src, dest) {\n if (!src.getProjection) {\n return;\n }\n const srcProjection = src.getProjection();\n const destProjection = dest.getProjection();\n if (!deepEqual(srcProjection, destProjection)) {\n dest.setProjection(srcProjection);\n }\n}\n/**\n * Capture a transform's current state\n * @param transform\n * @returns descriptor of the view state\n */\nexport function transformToViewState(tr) {\n return {\n longitude: tr.center.lng,\n latitude: tr.center.lat,\n zoom: tr.zoom,\n pitch: tr.pitch,\n bearing: tr.bearing,\n padding: tr.padding\n };\n}\n/* eslint-disable complexity */\n/**\n * Mutate a transform to match the given view state\n * @param transform\n * @param viewState\n * @returns true if the transform has changed\n */\nexport function applyViewStateToTransform(tr, props) {\n const v = props.viewState || props;\n let changed = false;\n if ('longitude' in v && 'latitude' in v) {\n const center = tr.center;\n // @ts-ignore\n tr.center = new center.constructor(v.longitude, v.latitude);\n changed = changed || center !== tr.center;\n }\n if ('zoom' in v) {\n const zoom = tr.zoom;\n tr.zoom = v.zoom;\n changed = changed || zoom !== tr.zoom;\n }\n if ('bearing' in v) {\n const bearing = tr.bearing;\n tr.bearing = v.bearing;\n changed = changed || bearing !== tr.bearing;\n }\n if ('pitch' in v) {\n const pitch = tr.pitch;\n tr.pitch = v.pitch;\n changed = changed || pitch !== tr.pitch;\n }\n if (v.padding && !tr.isPaddingEqual(v.padding)) {\n changed = true;\n tr.padding = v.padding;\n }\n return changed;\n}\n//# sourceMappingURL=transform.js.map"],"names":["cloneTransform","tr","newTransform","syncProjection","src","dest","srcProjection","destProjection","deepEqual","transformToViewState","applyViewStateToTransform","props","v","changed","center","zoom","bearing","pitch"],"mappings":";AAKO,SAASA,EAAeC,GAAI;AACzB,QAAAC,IAAeD,EAAG;AAExB,SAAAC,EAAa,kBAAkBD,EAAG,iBAC3BC;AACX;AAMgB,SAAAC,EAAeC,GAAKC,GAAM;AAClC,MAAA,CAACD,EAAI;AACL;AAEE,QAAAE,IAAgBF,EAAI,iBACpBG,IAAiBF,EAAK;AAC5B,EAAKG,EAAUF,GAAeC,CAAc,KACxCF,EAAK,cAAcC,CAAa;AAExC;AAMO,SAASG,EAAqBR,GAAI;AAC9B,SAAA;AAAA,IACH,WAAWA,EAAG,OAAO;AAAA,IACrB,UAAUA,EAAG,OAAO;AAAA,IACpB,MAAMA,EAAG;AAAA,IACT,OAAOA,EAAG;AAAA,IACV,SAASA,EAAG;AAAA,IACZ,SAASA,EAAG;AAAA,EAAA;AAEpB;AAQgB,SAAAS,EAA0BT,GAAIU,GAAO;AAC3C,QAAAC,IAAID,EAAM,aAAaA;AAC7B,MAAIE,IAAU;AACV,MAAA,eAAeD,KAAK,cAAcA,GAAG;AACrC,UAAME,IAASb,EAAG;AAElB,IAAAA,EAAG,SAAS,IAAIa,EAAO,YAAYF,EAAE,WAAWA,EAAE,QAAQ,GAChDC,IAAAA,KAAWC,MAAWb,EAAG;AAAA,EACvC;AACA,MAAI,UAAUW,GAAG;AACb,UAAMG,IAAOd,EAAG;AAChB,IAAAA,EAAG,OAAOW,EAAE,MACFC,IAAAA,KAAWE,MAASd,EAAG;AAAA,EACrC;AACA,MAAI,aAAaW,GAAG;AAChB,UAAMI,IAAUf,EAAG;AACnB,IAAAA,EAAG,UAAUW,EAAE,SACLC,IAAAA,KAAWG,MAAYf,EAAG;AAAA,EACxC;AACA,MAAI,WAAWW,GAAG;AACd,UAAMK,IAAQhB,EAAG;AACjB,IAAAA,EAAG,QAAQW,EAAE,OACHC,IAAAA,KAAWI,MAAUhB,EAAG;AAAA,EACtC;AACA,SAAIW,EAAE,WAAW,CAACX,EAAG,eAAeW,EAAE,OAAO,MAC/BC,IAAA,IACVZ,EAAG,UAAUW,EAAE,UAEZC;AACX;","x_google_ignoreList":[0]}
|
package/dist/index.es234.js
CHANGED
|
@@ -1,49 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
function s(n, o) {
|
|
23
|
-
const i = o.viewState || o;
|
|
24
|
-
let e = !1;
|
|
25
|
-
if ("longitude" in i && "latitude" in i) {
|
|
26
|
-
const t = n.center;
|
|
27
|
-
n.center = new t.constructor(i.longitude, i.latitude), e = e || t !== n.center;
|
|
28
|
-
}
|
|
29
|
-
if ("zoom" in i) {
|
|
30
|
-
const t = n.zoom;
|
|
31
|
-
n.zoom = i.zoom, e = e || t !== n.zoom;
|
|
32
|
-
}
|
|
33
|
-
if ("bearing" in i) {
|
|
34
|
-
const t = n.bearing;
|
|
35
|
-
n.bearing = i.bearing, e = e || t !== n.bearing;
|
|
36
|
-
}
|
|
37
|
-
if ("pitch" in i) {
|
|
38
|
-
const t = n.pitch;
|
|
39
|
-
n.pitch = i.pitch, e = e || t !== n.pitch;
|
|
40
|
-
}
|
|
41
|
-
return i.padding && !n.isPaddingEqual(i.padding) && (e = !0, n.padding = i.padding), e;
|
|
1
|
+
const a = ["type", "source", "source-layer", "minzoom", "maxzoom", "filter", "layout"];
|
|
2
|
+
function c(r) {
|
|
3
|
+
if (!r)
|
|
4
|
+
return null;
|
|
5
|
+
if (typeof r == "string" || ("toJS" in r && (r = r.toJS()), !r.layers))
|
|
6
|
+
return r;
|
|
7
|
+
const t = {};
|
|
8
|
+
for (const e of r.layers)
|
|
9
|
+
t[e.id] = e;
|
|
10
|
+
const f = r.layers.map((e) => {
|
|
11
|
+
let n = null;
|
|
12
|
+
"interactive" in e && (n = Object.assign({}, e), delete n.interactive);
|
|
13
|
+
const o = t[e.ref];
|
|
14
|
+
if (o) {
|
|
15
|
+
n = n || Object.assign({}, e), delete n.ref;
|
|
16
|
+
for (const i of a)
|
|
17
|
+
i in o && (n[i] = o[i]);
|
|
18
|
+
}
|
|
19
|
+
return n || e;
|
|
20
|
+
});
|
|
21
|
+
return { ...r, layers: f };
|
|
42
22
|
}
|
|
43
23
|
export {
|
|
44
|
-
|
|
45
|
-
g as cloneTransform,
|
|
46
|
-
r as syncProjection,
|
|
47
|
-
d as transformToViewState
|
|
24
|
+
c as normalizeStyle
|
|
48
25
|
};
|
|
49
26
|
//# sourceMappingURL=index.es234.js.map
|
package/dist/index.es234.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es234.js","sources":["../../../node_modules/react-map-gl/dist/esm/utils/
|
|
1
|
+
{"version":3,"file":"index.es234.js","sources":["../../../node_modules/react-map-gl/dist/esm/utils/style-utils.js"],"sourcesContent":["const refProps = ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n// Prepare a map style object for diffing\n// If immutable - convert to plain object\n// Work around some issues in older styles that would fail Mapbox's diffing\nexport function normalizeStyle(style) {\n if (!style) {\n return null;\n }\n if (typeof style === 'string') {\n return style;\n }\n if ('toJS' in style) {\n style = style.toJS();\n }\n if (!style.layers) {\n return style;\n }\n const layerIndex = {};\n for (const layer of style.layers) {\n layerIndex[layer.id] = layer;\n }\n const layers = style.layers.map(layer => {\n let normalizedLayer = null;\n if ('interactive' in layer) {\n normalizedLayer = Object.assign({}, layer);\n // Breaks style diffing :(\n // @ts-ignore legacy field not typed\n delete normalizedLayer.interactive;\n }\n // Style diffing doesn't work with refs so expand them out manually before diffing.\n // @ts-ignore legacy field not typed\n const layerRef = layerIndex[layer.ref];\n if (layerRef) {\n normalizedLayer = normalizedLayer || Object.assign({}, layer);\n // @ts-ignore\n delete normalizedLayer.ref;\n // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/deref.js\n for (const propName of refProps) {\n if (propName in layerRef) {\n normalizedLayer[propName] = layerRef[propName];\n }\n }\n }\n return normalizedLayer || layer;\n });\n // Do not mutate the style object provided by the user\n return { ...style, layers };\n}\n//# sourceMappingURL=style-utils.js.map"],"names":["refProps","normalizeStyle","style","layerIndex","layer","layers","normalizedLayer","layerRef","propName"],"mappings":"AAAA,MAAMA,IAAW,CAAC,QAAQ,UAAU,gBAAgB,WAAW,WAAW,UAAU,QAAQ;AAIrF,SAASC,EAAeC,GAAO;AAClC,MAAI,CAACA;AACM,WAAA;AAQP,MANA,OAAOA,KAAU,aAGjB,UAAUA,MACVA,IAAQA,EAAM,SAEd,CAACA,EAAM;AACA,WAAAA;AAEX,QAAMC,IAAa,CAAA;AACR,aAAAC,KAASF,EAAM;AACX,IAAAC,EAAAC,EAAM,EAAE,IAAIA;AAE3B,QAAMC,IAASH,EAAM,OAAO,IAAI,CAASE,MAAA;AACrC,QAAIE,IAAkB;AACtB,IAAI,iBAAiBF,MACjBE,IAAkB,OAAO,OAAO,CAAC,GAAGF,CAAK,GAGzC,OAAOE,EAAgB;AAIrB,UAAAC,IAAWJ,EAAWC,EAAM,GAAG;AACrC,QAAIG,GAAU;AACV,MAAAD,IAAkBA,KAAmB,OAAO,OAAO,IAAIF,CAAK,GAE5D,OAAOE,EAAgB;AAEvB,iBAAWE,KAAYR;AACnB,QAAIQ,KAAYD,MACID,EAAAE,CAAQ,IAAID,EAASC,CAAQ;AAAA,IAGzD;AACA,WAAOF,KAAmBF;AAAA,EAAA,CAC7B;AAEM,SAAA,EAAE,GAAGF,GAAO,QAAAG;AACvB;","x_google_ignoreList":[0]}
|
package/dist/index.es235.js
CHANGED
|
@@ -1,26 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (!r)
|
|
4
|
-
return null;
|
|
5
|
-
if (typeof r == "string" || ("toJS" in r && (r = r.toJS()), !r.layers))
|
|
6
|
-
return r;
|
|
7
|
-
const t = {};
|
|
8
|
-
for (const e of r.layers)
|
|
9
|
-
t[e.id] = e;
|
|
10
|
-
const f = r.layers.map((e) => {
|
|
11
|
-
let n = null;
|
|
12
|
-
"interactive" in e && (n = Object.assign({}, e), delete n.interactive);
|
|
13
|
-
const o = t[e.ref];
|
|
14
|
-
if (o) {
|
|
15
|
-
n = n || Object.assign({}, e), delete n.ref;
|
|
16
|
-
for (const i of a)
|
|
17
|
-
i in o && (n[i] = o[i]);
|
|
18
|
-
}
|
|
19
|
-
return n || e;
|
|
20
|
-
});
|
|
21
|
-
return { ...r, layers: f };
|
|
22
|
-
}
|
|
1
|
+
import t from "./index.es206.js";
|
|
2
|
+
const a = t("Object");
|
|
23
3
|
export {
|
|
24
|
-
|
|
4
|
+
a as default
|
|
25
5
|
};
|
|
26
6
|
//# sourceMappingURL=index.es235.js.map
|
package/dist/index.es235.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es235.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"index.es235.js","sources":["../../../node_modules/underscore/modules/_hasObjectTag.js"],"sourcesContent":["import tagTester from './_tagTester.js';\n\nexport default tagTester('Object');\n"],"names":["hasObjectTag","tagTester"],"mappings":";AAEA,MAAeA,IAAAC,EAAU,QAAQ;","x_google_ignoreList":[0]}
|
package/dist/index.es26.js
CHANGED
package/dist/index.es52.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as m from "react";
|
|
2
|
-
import p from "./index.
|
|
3
|
-
import "./index.
|
|
4
|
-
import "./index.es69.js";
|
|
5
|
-
import "./index.es70.js";
|
|
6
|
-
import i from "./index.es71.js";
|
|
2
|
+
import p from "./index.es70.js";
|
|
3
|
+
import "./index.es71.js";
|
|
7
4
|
import "./index.es72.js";
|
|
8
5
|
import "./index.es73.js";
|
|
9
|
-
import "./index.es74.js";
|
|
6
|
+
import i from "./index.es74.js";
|
|
10
7
|
import "./index.es75.js";
|
|
8
|
+
import "./index.es76.js";
|
|
9
|
+
import "./index.es77.js";
|
|
10
|
+
import "./index.es80.js";
|
|
11
11
|
const n = import("./index.es19.js").then((r) => r.o);
|
|
12
12
|
m.forwardRef(function(o, t) {
|
|
13
13
|
return p(o, t, n);
|
package/dist/index.es59.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
function l(e) {
|
|
3
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
-
}
|
|
1
|
+
var e = { exports: {} };
|
|
5
2
|
export {
|
|
6
|
-
|
|
7
|
-
l as getDefaultExportFromCjs
|
|
3
|
+
e as __module
|
|
8
4
|
};
|
|
9
5
|
//# sourceMappingURL=index.es59.js.map
|
package/dist/index.es59.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es59.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es59.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index.es6.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useMap as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import
|
|
1
|
+
import { j as o } from "./index.es17.js";
|
|
2
|
+
import { useMap as l, PulsingMarkerLayer as u, GeoJSONLayer as f } from "@peripleo/maplibre";
|
|
3
|
+
import { useMemo as n, useEffect as d } from "react";
|
|
4
|
+
import s from "./index.es23.js";
|
|
5
5
|
import "./index.es24.js";
|
|
6
6
|
import "./index.es25.js";
|
|
7
7
|
import "./index.es26.js";
|
|
@@ -30,26 +30,26 @@ import "./index.es48.js";
|
|
|
30
30
|
import "./index.es49.js";
|
|
31
31
|
import "./index.es50.js";
|
|
32
32
|
import r from "./index.es13.js";
|
|
33
|
-
import
|
|
34
|
-
const
|
|
35
|
-
const
|
|
33
|
+
import c from "./index.es12.js";
|
|
34
|
+
const x = 2, y = (t) => {
|
|
35
|
+
const e = l(), i = n(() => s.isEmpty(t.data) ? null : t.data, [t.data]), a = n(() => t.cluster ? (console.log(i), !0) : !1, [i, t.cluster]);
|
|
36
36
|
return d(() => {
|
|
37
|
-
if (
|
|
38
|
-
const m =
|
|
39
|
-
m &&
|
|
37
|
+
if (e && i && t.fitBoundingBox) {
|
|
38
|
+
const m = c.getBoundingBox(i, t.buffer);
|
|
39
|
+
m && e.fitBounds(m, t.boundingBoxOptions, t.boundingBoxData);
|
|
40
40
|
}
|
|
41
|
-
}, [
|
|
42
|
-
t.animate && /* @__PURE__ */
|
|
43
|
-
|
|
41
|
+
}, [e, t.buffer, t.data, t.boundingBoxData, t.boundingBoxOptions, t.fitBoundingBox]), i ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
42
|
+
t.animate && /* @__PURE__ */ o.jsx(
|
|
43
|
+
u,
|
|
44
44
|
{
|
|
45
45
|
data: t.data,
|
|
46
46
|
id: t.layerId
|
|
47
47
|
}
|
|
48
48
|
),
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
|
|
49
|
+
/* @__PURE__ */ o.jsx(
|
|
50
|
+
f,
|
|
51
51
|
{
|
|
52
|
-
cluster:
|
|
52
|
+
cluster: a,
|
|
53
53
|
clusterMaxZoom: t.clusterMaxZoom,
|
|
54
54
|
clusterMinPoints: t.clusterMinPoints,
|
|
55
55
|
clusterProperties: t.clusterProperties,
|
|
@@ -63,14 +63,14 @@ const c = 2, x = (t) => {
|
|
|
63
63
|
)
|
|
64
64
|
] }) : null;
|
|
65
65
|
};
|
|
66
|
-
|
|
67
|
-
buffer:
|
|
66
|
+
y.defaultProps = {
|
|
67
|
+
buffer: x,
|
|
68
68
|
fillStyle: r.fill,
|
|
69
69
|
fitBoundingBox: !0,
|
|
70
70
|
pointStyle: r.point,
|
|
71
71
|
strokeStyle: r.stroke
|
|
72
72
|
};
|
|
73
73
|
export {
|
|
74
|
-
|
|
74
|
+
y as default
|
|
75
75
|
};
|
|
76
76
|
//# sourceMappingURL=index.es6.js.map
|
package/dist/index.es6.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es6.js","sources":["../src/components/LocationMarkers.js"],"sourcesContent":["// @flow\n\nimport { GeoJSONLayer, PulsingMarkerLayer, useMap } from '@peripleo/maplibre';\nimport React, { useEffect, useMemo } from 'react';\nimport _ from 'underscore';\nimport MapStyles from '../utils/MapStyles';\nimport MapUtils from '../utils/Map';\n\ntype Props = {\n /**\n * If `true`, the point marker will display with a pulsing animation.\n */\n animate?: boolean,\n\n /**\n * (Optional) data to pass to the fitToBounds function.\n */\n boundingBoxData?: any,\n\n /**\n * (Optional) options to pass to the fitToBounds function.\n * See [spec](https://maplibre.org/maplibre-gl-js/docs/API/types/FitBoundsOptions/).\n */\n boundingBoxOptions?: any,\n\n /**\n * The number of miles to buffer the GeoJSON data.\n */\n buffer: number,\n\n /**\n * If true, markers will be clustered before the specified zoom level.\n */\n cluster?: boolean,\n\n /**\n * Max zoom to cluster points on.\n */\n clusterMaxZoom?: number,\n\n /**\n * Minimum number of points necessary to form a cluster.\n */\n clusterMinPoints?: number,\n\n /**\n * An object defining custom properties on the generated clusters.\n */\n clusterProperties?: any,\n\n /**\n * Radius of each cluster when clustering point.\n */\n clusterRadius?: number,\n\n /**\n * The GeoJSON data representing the location.\n */\n data: { [key: string]: any },\n\n /**\n * GeoJSON layer fill style.\n */\n fillStyle?: { [key: string]: any },\n\n /**\n * If `true`, the map will fit the bounding box around the passed data.\n */\n fitBoundingBox?: boolean,\n\n /**\n * An ID value to apply to the layer.\n */\n layerId?: string,\n\n /**\n * GeoJSON layer point style.\n */\n pointStyle?: { [key: string]: any },\n\n /**\n * GeoJSON layer stroke style\n */\n strokeStyle?: { [key: string]: any }\n};\n\nconst DEFAULT_BUFFER = 2;\n\n/**\n * This component renders a location marker to be used in a Peripleo context.\n */\nconst LocationMarkers = (props: Props) => {\n const map = useMap();\n\n /**\n * Memo-izes the data prop.\n *\n * @type {{[p: string]: *}}\n */\n const data = useMemo(() => (_.isEmpty(props.data) ? null : props.data), [props.data]);\n\n /**\n * Sets the bounding box on the map.\n */\n useEffect(() => {\n if (map && data && props.fitBoundingBox) {\n const bbox = MapUtils.getBoundingBox(data, props.buffer);\n\n if (bbox) {\n map.fitBounds(bbox, props.boundingBoxOptions, props.boundingBoxData);\n }\n }\n }, [map, props.buffer, props.data, props.boundingBoxData, props.boundingBoxOptions, props.fitBoundingBox]);\n\n if (!data) {\n return null;\n }\n\n return (\n <>\n { props.animate && (\n <PulsingMarkerLayer\n data={props.data}\n id={props.layerId}\n />\n )}\n <GeoJSONLayer\n cluster={
|
|
1
|
+
{"version":3,"file":"index.es6.js","sources":["../src/components/LocationMarkers.js"],"sourcesContent":["// @flow\n\nimport { GeoJSONLayer, PulsingMarkerLayer, useMap } from '@peripleo/maplibre';\nimport React, { useEffect, useMemo } from 'react';\nimport _ from 'underscore';\nimport MapStyles from '../utils/MapStyles';\nimport MapUtils from '../utils/Map';\n\ntype Props = {\n /**\n * If `true`, the point marker will display with a pulsing animation.\n */\n animate?: boolean,\n\n /**\n * (Optional) data to pass to the fitToBounds function.\n */\n boundingBoxData?: any,\n\n /**\n * (Optional) options to pass to the fitToBounds function.\n * See [spec](https://maplibre.org/maplibre-gl-js/docs/API/types/FitBoundsOptions/).\n */\n boundingBoxOptions?: any,\n\n /**\n * The number of miles to buffer the GeoJSON data.\n */\n buffer: number,\n\n /**\n * If true, markers will be clustered before the specified zoom level.\n */\n cluster?: boolean,\n\n /**\n * Max zoom to cluster points on.\n */\n clusterMaxZoom?: number,\n\n /**\n * Minimum number of points necessary to form a cluster.\n */\n clusterMinPoints?: number,\n\n /**\n * An object defining custom properties on the generated clusters.\n */\n clusterProperties?: any,\n\n /**\n * Radius of each cluster when clustering point.\n */\n clusterRadius?: number,\n\n /**\n * The GeoJSON data representing the location.\n */\n data: { [key: string]: any },\n\n /**\n * GeoJSON layer fill style.\n */\n fillStyle?: { [key: string]: any },\n\n /**\n * If `true`, the map will fit the bounding box around the passed data.\n */\n fitBoundingBox?: boolean,\n\n /**\n * An ID value to apply to the layer.\n */\n layerId?: string,\n\n /**\n * GeoJSON layer point style.\n */\n pointStyle?: { [key: string]: any },\n\n /**\n * GeoJSON layer stroke style\n */\n strokeStyle?: { [key: string]: any }\n};\n\nconst DEFAULT_BUFFER = 2;\n\n/**\n * This component renders a location marker to be used in a Peripleo context.\n */\nconst LocationMarkers = (props: Props) => {\n const map = useMap();\n\n /**\n * Memo-izes the data prop.\n *\n * @type {{[p: string]: *}}\n */\n const data = useMemo(() => (_.isEmpty(props.data) ? null : props.data), [props.data]);\n\n const cluster = useMemo(() => {\n if (!props.cluster) {\n return false;\n }\n\n console.log(data);\n\n return true;\n }, [data, props.cluster]);\n\n /**\n * Sets the bounding box on the map.\n */\n useEffect(() => {\n if (map && data && props.fitBoundingBox) {\n const bbox = MapUtils.getBoundingBox(data, props.buffer);\n\n if (bbox) {\n map.fitBounds(bbox, props.boundingBoxOptions, props.boundingBoxData);\n }\n }\n }, [map, props.buffer, props.data, props.boundingBoxData, props.boundingBoxOptions, props.fitBoundingBox]);\n\n if (!data) {\n return null;\n }\n\n return (\n <>\n { props.animate && (\n <PulsingMarkerLayer\n data={props.data}\n id={props.layerId}\n />\n )}\n <GeoJSONLayer\n cluster={cluster}\n clusterMaxZoom={props.clusterMaxZoom}\n clusterMinPoints={props.clusterMinPoints}\n clusterProperties={props.clusterProperties}\n clusterRadius={props.clusterRadius}\n data={props.data}\n fillStyle={props.fillStyle}\n id={props.layerId}\n strokeStyle={props.strokeStyle}\n pointStyle={props.pointStyle}\n />\n </>\n );\n};\n\nLocationMarkers.defaultProps = {\n buffer: DEFAULT_BUFFER,\n fillStyle: MapStyles.fill,\n fitBoundingBox: true,\n pointStyle: MapStyles.point,\n strokeStyle: MapStyles.stroke\n};\n\nexport default LocationMarkers;\n"],"names":["DEFAULT_BUFFER","LocationMarkers","props","map","useMap","data","useMemo","_","cluster","useEffect","bbox","MapUtils","jsxs","Fragment","jsx","PulsingMarkerLayer","GeoJSONLayer","MapStyles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsFA,MAAMA,IAAiB,GAKjBC,IAAkB,CAACC,MAAiB;AACxC,QAAMC,IAAMC,KAONC,IAAOC,EAAQ,MAAOC,EAAE,QAAQL,EAAM,IAAI,IAAI,OAAOA,EAAM,MAAO,CAACA,EAAM,IAAI,CAAC,GAE9EM,IAAUF,EAAQ,MACjBJ,EAAM,WAIX,QAAQ,IAAIG,CAAI,GAET,MALE,IAMR,CAACA,GAAMH,EAAM,OAAO,CAAC;AAexB,SAVAO,EAAU,MAAM;AACV,QAAAN,KAAOE,KAAQH,EAAM,gBAAgB;AACvC,YAAMQ,IAAOC,EAAS,eAAeN,GAAMH,EAAM,MAAM;AAEvD,MAAIQ,KACFP,EAAI,UAAUO,GAAMR,EAAM,oBAAoBA,EAAM,eAAe;AAAA,IAEvE;AAAA,EACC,GAAA,CAACC,GAAKD,EAAM,QAAQA,EAAM,MAAMA,EAAM,iBAAiBA,EAAM,oBAAoBA,EAAM,cAAc,CAAC,GAEpGG,IAMCO,gBAAAA,EAAA,KAAAC,YAAA,EAAA,UAAA;AAAA,IAAAX,EAAM,WACNY,gBAAAA,EAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAMb,EAAM;AAAA,QACZ,IAAIA,EAAM;AAAA,MAAA;AAAA,IACZ;AAAA,IAEFY,gBAAAA,EAAA;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,SAAAR;AAAA,QACA,gBAAgBN,EAAM;AAAA,QACtB,kBAAkBA,EAAM;AAAA,QACxB,mBAAmBA,EAAM;AAAA,QACzB,eAAeA,EAAM;AAAA,QACrB,MAAMA,EAAM;AAAA,QACZ,WAAWA,EAAM;AAAA,QACjB,IAAIA,EAAM;AAAA,QACV,aAAaA,EAAM;AAAA,QACnB,YAAYA,EAAM;AAAA,MAAA;AAAA,IACpB;AAAA,EACF,EAAA,CAAA,IAvBO;AAyBX;AAEAD,EAAgB,eAAe;AAAA,EAC7B,QAAQD;AAAA,EACR,WAAWiB,EAAU;AAAA,EACrB,gBAAgB;AAAA,EAChB,YAAYA,EAAU;AAAA,EACtB,aAAaA,EAAU;AACzB;"}
|
package/dist/index.es60.js
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
import { __exports as t } from "./index.es67.js";
|
|
2
|
+
import R from "react";
|
|
3
|
+
var p;
|
|
4
|
+
function v() {
|
|
5
|
+
if (p)
|
|
6
|
+
return t;
|
|
7
|
+
p = 1;
|
|
8
|
+
/**
|
|
9
|
+
* @license React
|
|
10
|
+
* react-jsx-runtime.production.min.js
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the MIT license found in the
|
|
15
|
+
* LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/
|
|
17
|
+
var s = R, m = Symbol.for("react.element"), l = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, a = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function u(o, r, i) {
|
|
19
|
+
var e, n = {}, _ = null, f = null;
|
|
20
|
+
i !== void 0 && (_ = "" + i), r.key !== void 0 && (_ = "" + r.key), r.ref !== void 0 && (f = r.ref);
|
|
21
|
+
for (e in r)
|
|
22
|
+
c.call(r, e) && !d.hasOwnProperty(e) && (n[e] = r[e]);
|
|
23
|
+
if (o && o.defaultProps)
|
|
24
|
+
for (e in r = o.defaultProps, r)
|
|
25
|
+
n[e] === void 0 && (n[e] = r[e]);
|
|
26
|
+
return { $$typeof: m, type: o, key: _, ref: f, props: n, _owner: a.current };
|
|
27
|
+
}
|
|
28
|
+
return t.Fragment = l, t.jsx = u, t.jsxs = u, t;
|
|
29
|
+
}
|
|
2
30
|
export {
|
|
3
|
-
|
|
31
|
+
v as __require
|
|
4
32
|
};
|
|
5
33
|
//# sourceMappingURL=index.es60.js.map
|
package/dist/index.es60.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es60.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index.es60.js","sources":["../../../node_modules/react/cjs/react-jsx-runtime.production.min.js"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n"],"names":["f","require$$0","k","m","n","p","q","c","a","g","b","d","e","h","reactJsxRuntime_production_min"],"mappings":";;;;;;;EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASa,MAAIA,IAAEC,GAAiBC,IAAE,OAAO,IAAI,eAAe,GAAE,IAAE,OAAO,IAAI,gBAAgB,GAAEC,IAAE,OAAO,UAAU,gBAAeC,IAAEJ,EAAE,mDAAmD,mBAAkBK,IAAE,EAAC,KAAI,IAAG,KAAI,IAAG,QAAO,IAAG,UAAS,GAAE;AAClP,WAASC,EAAEC,GAAEC,GAAEC,GAAE;AAAC,QAAIC,GAAEC,IAAE,CAAG,GAAAC,IAAE,MAAKC,IAAE;AAAc,IAAAJ,MAAA,WAAIG,IAAE,KAAGH,IAAYD,EAAE,QAAX,WAAiBI,IAAE,KAAGJ,EAAE,MAAcA,EAAE,QAAF,WAAQK,IAAEL,EAAE;AAAK,SAAIE,KAAKF;AAAE,MAAAL,EAAE,KAAKK,GAAEE,CAAC,KAAG,CAACL,EAAE,eAAeK,CAAC,MAAIC,EAAED,CAAC,IAAEF,EAAEE,CAAC;AAAG,QAAGH,KAAGA,EAAE;AAAiB,WAAAG,KAAKF,IAAED,EAAE,cAAaC;AAAE,QAASG,EAAED,CAAC,MAAZ,WAAgBC,EAAED,CAAC,IAAEF,EAAEE,CAAC;AAAG,WAAM,EAAC,UAASR,GAAE,MAAKK,GAAE,KAAIK,GAAE,KAAIC,GAAE,OAAMF,GAAE,QAAOP,EAAE,QAAO;AAAA,EAAC;AAAkB,SAAAU,EAAA,WAAA,GAAcA,EAAA,MAAAR,GAAEQ,EAAA,OAAaR;;","x_google_ignoreList":[0]}
|