@geowiki/cms 0.16.9-dev.5 → 0.16.9-dev.7
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/{ContainerWidget-ANT6ARCQ.mjs → ContainerWidget-U6P5FFUM.mjs} +2 -2
- package/dist/{H2BodyInternalLinkMapWidget-A2K7DJHE.mjs → H2BodyInternalLinkMapWidget-75XPTZ6G.mjs} +1 -1
- package/dist/{HeroMap-DJ7NARO3.mjs → HeroMap-ZRJTD7HM.mjs} +3 -45
- package/dist/{LanguagesWidget-RU7CYGXP.mjs → LanguagesWidget-BBKTIGLB.mjs} +1 -1
- package/dist/{MapHeroWidget-FMPNYVCX.mjs → MapHeroWidget-ZNXXQOW6.mjs} +1 -1
- package/dist/{chunk-D2ZER6LM.mjs → chunk-KDNBFICK.mjs} +4 -4
- package/dist/{chunk-NO5VZWUG.mjs → chunk-MY5WRHNH.mjs} +1 -1
- package/dist/{chunk-4JQDHCXU.mjs → chunk-TARGC4JI.mjs} +1 -1
- package/dist/index.js +245 -289
- package/dist/index.mjs +3 -3
- package/dist/styles.css +1 -1
- package/package.json +9 -8
package/dist/{H2BodyInternalLinkMapWidget-A2K7DJHE.mjs → H2BodyInternalLinkMapWidget-75XPTZ6G.mjs}
RENAMED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "@geowiki/ui";
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
var MapWithNoSSR = dynamic(
|
|
15
|
-
() => import("./HeroMap-
|
|
15
|
+
() => import("./HeroMap-ZRJTD7HM.mjs").then((x) => x.HeroMap),
|
|
16
16
|
{
|
|
17
17
|
ssr: false
|
|
18
18
|
}
|
|
@@ -6,54 +6,12 @@ import "leaflet/dist/leaflet.css";
|
|
|
6
6
|
import { DivIcon, LatLng, divIcon } from "leaflet";
|
|
7
7
|
import { Marker, Popup } from "react-leaflet";
|
|
8
8
|
import { useClusterMapInfo } from "@geowiki/core";
|
|
9
|
-
import { DesignFarmerClusterPin, LoaderFull } from "@geowiki/ui";
|
|
10
|
-
|
|
11
|
-
// src/components/ClusterMap/MarkerClusterGroup.tsx
|
|
12
|
-
import {
|
|
13
|
-
extendContext,
|
|
14
|
-
createElementObject,
|
|
15
|
-
createPathComponent
|
|
16
|
-
} from "@react-leaflet/core";
|
|
17
|
-
import * as L from "leaflet";
|
|
18
|
-
import "leaflet.markercluster";
|
|
19
|
-
function getPropsAndEvents(props) {
|
|
20
|
-
let clusterProps = {};
|
|
21
|
-
let clusterEvents = {};
|
|
22
|
-
const { children, ...rest } = props;
|
|
23
|
-
Object.entries(rest).forEach(([propName, prop]) => {
|
|
24
|
-
if (propName.startsWith("on")) {
|
|
25
|
-
clusterEvents = { ...clusterEvents, [propName]: prop };
|
|
26
|
-
} else {
|
|
27
|
-
clusterProps = { ...clusterProps, [propName]: prop };
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
return { clusterProps, clusterEvents };
|
|
31
|
-
}
|
|
32
|
-
function createMarkerClusterGroup(props, context) {
|
|
33
|
-
const { clusterProps, clusterEvents } = getPropsAndEvents(props);
|
|
34
|
-
const markerClusterGroup = new L.MarkerClusterGroup(clusterProps);
|
|
35
|
-
Object.entries(clusterEvents).forEach(([eventAsProp, callback]) => {
|
|
36
|
-
const clusterEvent = `cluster${eventAsProp.substring(2).toLowerCase()}`;
|
|
37
|
-
markerClusterGroup.on(clusterEvent, callback);
|
|
38
|
-
});
|
|
39
|
-
return createElementObject(
|
|
40
|
-
markerClusterGroup,
|
|
41
|
-
extendContext(context, { layerContainer: markerClusterGroup })
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
var updateMarkerCluster = () => {
|
|
45
|
-
};
|
|
46
|
-
var MarkerClusterGroup2 = createPathComponent(
|
|
47
|
-
createMarkerClusterGroup,
|
|
48
|
-
updateMarkerCluster
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
// src/components/ClusterMap/cluster-markers.tsx
|
|
9
|
+
import { DesignFarmerClusterPin, LoaderFull, IconPaths } from "@geowiki/ui";
|
|
10
|
+
import { MarkerClusterGroup } from "@geowiki/map";
|
|
52
11
|
import { useFileUrl } from "@geowiki/core";
|
|
53
12
|
import MapPinIcon from "@heroicons/react/24/solid/MapPinIcon";
|
|
54
13
|
import { renderToString } from "react-dom/server";
|
|
55
14
|
import { useConfigSettings } from "@geowiki/core";
|
|
56
|
-
import { IconPaths } from "@geowiki/ui";
|
|
57
15
|
import { jsx } from "react/jsx-runtime";
|
|
58
16
|
function getIcon(color, name) {
|
|
59
17
|
const myIcon = IconPaths.find((icon) => icon.name === name);
|
|
@@ -110,7 +68,7 @@ var ClusterMarkers = (_props) => {
|
|
|
110
68
|
if (isLoading || IsConfigSettingsLoaded)
|
|
111
69
|
return /* @__PURE__ */ jsx(LoaderFull, {});
|
|
112
70
|
if (ConfigSettings?.ConfigSettings?.FeaturesFarmerCluster?.Text) {
|
|
113
|
-
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
71
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(MarkerClusterGroup, { iconCreateFunction: createClusterIcon("#9999CC"), children: data?.map((cluster) => /* @__PURE__ */ jsx(
|
|
114
72
|
Marker,
|
|
115
73
|
{
|
|
116
74
|
icon: new DivIcon({
|
|
@@ -91,7 +91,7 @@ var StatsWidget = dynamic(
|
|
|
91
91
|
() => import("./StatsWidget-4MISF6XB.mjs").then((mod) => mod.StatsWidget)
|
|
92
92
|
);
|
|
93
93
|
var MapHeroWidget = dynamic(
|
|
94
|
-
() => import("./MapHeroWidget-
|
|
94
|
+
() => import("./MapHeroWidget-ZNXXQOW6.mjs").then((mod) => mod.MapHeroWidget)
|
|
95
95
|
);
|
|
96
96
|
var HeroCenterTextWidget = dynamic(
|
|
97
97
|
() => import("./HeroCenterTextWidget-5LDZNUBR.mjs").then(
|
|
@@ -105,7 +105,7 @@ var MarkdownWidget = dynamic(
|
|
|
105
105
|
() => import("./MarkdownWidget-QTTNNVQW.mjs").then((mod) => mod.MarkdownWidget)
|
|
106
106
|
);
|
|
107
107
|
var ContainerWidget = dynamic(
|
|
108
|
-
() => import("./ContainerWidget-
|
|
108
|
+
() => import("./ContainerWidget-U6P5FFUM.mjs").then((mod) => mod.ContainerWidget)
|
|
109
109
|
);
|
|
110
110
|
var HeroWidget = dynamic(
|
|
111
111
|
() => import("./HeroWidget-A4ODJCXZ.mjs").then((mod) => mod.HeroWidget)
|
|
@@ -163,7 +163,7 @@ var SubtitleH3BodySpecialFeatureResourceCollectionsWidget = dynamic(
|
|
|
163
163
|
() => import("./SubtitleH3BodySpecialFeatureResourceCollectionsWidget-62SJ4J73.mjs").then((mod) => mod.SubtitleH3BodySpecialFeatureResourceCollectionsWidget)
|
|
164
164
|
);
|
|
165
165
|
var H2BodyInternalLinkMapWidget = dynamic(
|
|
166
|
-
() => import("./H2BodyInternalLinkMapWidget-
|
|
166
|
+
() => import("./H2BodyInternalLinkMapWidget-75XPTZ6G.mjs").then(
|
|
167
167
|
(mod) => mod.H2BodyInternalLinkMapWidget
|
|
168
168
|
)
|
|
169
169
|
);
|
|
@@ -179,7 +179,7 @@ var HeaderBodyWidget = dynamic(
|
|
|
179
179
|
() => import("./HeaderBodyWidget-ZW2WYKNP.mjs").then((mod) => mod.HeaderBodyWidget)
|
|
180
180
|
);
|
|
181
181
|
var LanguageWidget = dynamic(
|
|
182
|
-
() => import("./LanguagesWidget-
|
|
182
|
+
() => import("./LanguagesWidget-BBKTIGLB.mjs").then((mod) => mod.LanguageWidget)
|
|
183
183
|
);
|
|
184
184
|
var SubtitleH3KeyResourcesWidget = dynamic(
|
|
185
185
|
() => import("./SubtitleH3KeyResourcesWidget-AGBBJ7ZJ.mjs").then(
|
|
@@ -3,7 +3,7 @@ import { dynamic } from "@geowiki/core";
|
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
var MapWithNoSSR = dynamic(
|
|
6
|
-
() => import("./HeroMap-
|
|
6
|
+
() => import("./HeroMap-ZRJTD7HM.mjs").then((x) => x.HeroMap),
|
|
7
7
|
{
|
|
8
8
|
ssr: false
|
|
9
9
|
}
|