@geowiki/cms 0.16.9-dev.2 → 0.16.9-dev.20
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-4DBHV3S2.mjs → ContainerWidget-KTFFLHFA.mjs} +2 -2
- package/dist/{EntityListWidget-JC6UCIP5.mjs → EntityListWidget-6N4AXYWX.mjs} +1 -1
- package/dist/{H2BodyInternalLinkMapWidget-6FKP4AHO.mjs → H2BodyInternalLinkMapWidget-6VQYSAGG.mjs} +3 -3
- package/dist/{HeroMap-DJ7NARO3.mjs → HeroMap-RMHVOY4J.mjs} +8 -55
- package/dist/{LanguagesWidget-R7UBNG42.mjs → LanguagesWidget-STZWKVBG.mjs} +1 -1
- package/dist/{MapHeroWidget-WEVKITG5.mjs → MapHeroWidget-I5SP4J5M.mjs} +1 -1
- package/dist/{NewsFeedWidget-4W7T4H2P.mjs → NewsFeedWidget-BQTZYA6U.mjs} +1 -1
- package/dist/{QuestMapClient-B6LGGSGT.mjs → QuestMapClient-5IEELSN6.mjs} +1 -2
- package/dist/{QuestMapWidget-5JIFDDUO.mjs → QuestMapWidget-5234C7VP.mjs} +2 -2
- package/dist/{VideoWidget-YRR7FCDN.mjs → VideoWidget-E72DF4FB.mjs} +1 -1
- package/dist/{chunk-YGKPOYG6.mjs → chunk-G2IXHVKJ.mjs} +1 -1
- package/dist/{chunk-QLNZQFXF.mjs → chunk-O6JTQGXG.mjs} +9 -9
- package/dist/{chunk-4AG2CMM3.mjs → chunk-PTPZAQH2.mjs} +1 -2
- package/dist/{chunk-VTIR7GUQ.mjs → chunk-ZX5FKJYJ.mjs} +2 -2
- package/dist/index.js +277 -328
- package/dist/index.mjs +8 -8
- package/dist/styles.css +1 -1
- package/package.json +16 -16
package/dist/{H2BodyInternalLinkMapWidget-6FKP4AHO.mjs → H2BodyInternalLinkMapWidget-6VQYSAGG.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
// src/components/Section/H2BodyInternalLinkMapWidget.tsx
|
|
4
|
-
import Link from "
|
|
5
|
-
import dynamic from "
|
|
4
|
+
import { Link } from "@geowiki/core";
|
|
5
|
+
import { dynamic } from "@geowiki/core";
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import {
|
|
8
8
|
DesignButton,
|
|
@@ -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-RMHVOY4J.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);
|
|
@@ -74,12 +32,9 @@ var createClusterIcon = (color) => {
|
|
|
74
32
|
};
|
|
75
33
|
markers.forEach((marker) => {
|
|
76
34
|
const status = marker.feature?.properties?.Status?.trim().toLowerCase() || "default";
|
|
77
|
-
if (status === "ongoing")
|
|
78
|
-
|
|
79
|
-
else
|
|
80
|
-
statusCount.auxiliary++;
|
|
81
|
-
else
|
|
82
|
-
statusCount.default++;
|
|
35
|
+
if (status === "ongoing") statusCount.ongoing++;
|
|
36
|
+
else if (status === "auxiliary") statusCount.auxiliary++;
|
|
37
|
+
else statusCount.default++;
|
|
83
38
|
});
|
|
84
39
|
return divIcon({
|
|
85
40
|
html: `<div style=
|
|
@@ -105,12 +60,10 @@ var ClusterMarkers = (_props) => {
|
|
|
105
60
|
const { data: ConfigSettings, isLoading: IsConfigSettingsLoaded } = useConfigSettings();
|
|
106
61
|
const { data, error, isLoading } = useClusterMapInfo();
|
|
107
62
|
const fileUrl = useFileUrl();
|
|
108
|
-
if (error)
|
|
109
|
-
|
|
110
|
-
if (isLoading || IsConfigSettingsLoaded)
|
|
111
|
-
return /* @__PURE__ */ jsx(LoaderFull, {});
|
|
63
|
+
if (error) return null;
|
|
64
|
+
if (isLoading || IsConfigSettingsLoaded) return /* @__PURE__ */ jsx(LoaderFull, {});
|
|
112
65
|
if (ConfigSettings?.ConfigSettings?.FeaturesFarmerCluster?.Text) {
|
|
113
|
-
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
66
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(MarkerClusterGroup, { iconCreateFunction: createClusterIcon("#9999CC"), children: data?.map((cluster) => /* @__PURE__ */ jsx(
|
|
114
67
|
Marker,
|
|
115
68
|
{
|
|
116
69
|
icon: new DivIcon({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/components/Section/NewsFeedWidget.tsx
|
|
2
2
|
import { useNews } from "@geowiki/core";
|
|
3
3
|
import { NewsItemList } from "@geowiki/ui";
|
|
4
|
-
import { useRouter } from "
|
|
4
|
+
import { useRouter } from "@geowiki/core";
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
var NewsFeedWidget = () => {
|
|
@@ -104,8 +104,7 @@ var QuestMapClient = () => {
|
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
106
|
}, [isLoading]);
|
|
107
|
-
if (isLoading)
|
|
108
|
-
return /* @__PURE__ */ jsx(LoaderFull, {});
|
|
107
|
+
if (isLoading) return /* @__PURE__ */ jsx(LoaderFull, {});
|
|
109
108
|
return /* @__PURE__ */ jsx("div", { className: "w-full rounded-2xl overflow-hidden shadow bg-white", children: /* @__PURE__ */ jsx(
|
|
110
109
|
"div",
|
|
111
110
|
{
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/components/Section/GeoQuest/QuestMapWidget.tsx
|
|
2
|
-
import dynamic from "
|
|
2
|
+
import { dynamic } from "@geowiki/core";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var QuestMapClient = dynamic(
|
|
5
|
-
() => import("./QuestMapClient-
|
|
5
|
+
() => import("./QuestMapClient-5IEELSN6.mjs").then((mod) => mod.QuestMapClient),
|
|
6
6
|
{
|
|
7
7
|
ssr: false
|
|
8
8
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/components/Section/VideoWidget.tsx
|
|
2
|
-
import dynamic from "
|
|
2
|
+
import { dynamic } from "@geowiki/core";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var ReactPlayer = dynamic(() => import("react-player"), { ssr: false });
|
|
5
5
|
var VideoWidget = ({ data }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/components/SectionComponents.ts
|
|
2
|
-
import dynamic from "
|
|
3
|
-
var NewsFeedWidget = dynamic(() => import("./NewsFeedWidget-
|
|
2
|
+
import { dynamic } from "@geowiki/core";
|
|
3
|
+
var NewsFeedWidget = dynamic(() => import("./NewsFeedWidget-BQTZYA6U.mjs"));
|
|
4
4
|
var UpdateUserInfoWidget = dynamic(
|
|
5
5
|
() => import("./UpdateUserInfoWidget-4I6RJQ5M.mjs").then(
|
|
6
6
|
(mod) => mod.UpdateUserInfoWidget
|
|
@@ -31,7 +31,7 @@ var FarmerClusterFinderWidget = dynamic(
|
|
|
31
31
|
)
|
|
32
32
|
);
|
|
33
33
|
var EntityListWidget = dynamic(
|
|
34
|
-
() => import("./EntityListWidget-
|
|
34
|
+
() => import("./EntityListWidget-6N4AXYWX.mjs").then((mod) => mod.EntityListWidget)
|
|
35
35
|
);
|
|
36
36
|
var SpecialFeaturesWidget = dynamic(
|
|
37
37
|
() => import("./SpecialFeaturesWidget-ZWILQPVB.mjs").then(
|
|
@@ -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-I5SP4J5M.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-KTFFLHFA.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-6VQYSAGG.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-STZWKVBG.mjs").then((mod) => mod.LanguageWidget)
|
|
183
183
|
);
|
|
184
184
|
var SubtitleH3KeyResourcesWidget = dynamic(
|
|
185
185
|
() => import("./SubtitleH3KeyResourcesWidget-AGBBJ7ZJ.mjs").then(
|
|
@@ -187,7 +187,7 @@ var SubtitleH3KeyResourcesWidget = dynamic(
|
|
|
187
187
|
)
|
|
188
188
|
);
|
|
189
189
|
var VideoWidget = dynamic(
|
|
190
|
-
() => import("./VideoWidget-
|
|
190
|
+
() => import("./VideoWidget-E72DF4FB.mjs").then((mod) => mod.VideoWidget)
|
|
191
191
|
);
|
|
192
192
|
var SubtitleH2BodyVideoWidget = dynamic(
|
|
193
193
|
() => import("./SubtitleH2BodyVideoWidget-CP7T4FJ6.mjs").then(
|
|
@@ -218,7 +218,7 @@ var DownloadQuestWidget = dynamic(
|
|
|
218
218
|
)
|
|
219
219
|
);
|
|
220
220
|
var QuestMapWidget = dynamic(
|
|
221
|
-
() => import("./QuestMapWidget-
|
|
221
|
+
() => import("./QuestMapWidget-5234C7VP.mjs").then((mod) => mod.QuestMapWidget)
|
|
222
222
|
);
|
|
223
223
|
var SelectQuestWidget = dynamic(
|
|
224
224
|
() => import("./SelectQuestWidget-YGZ5TFLV.mjs").then(
|
|
@@ -16,8 +16,7 @@ var EntityListWidget = ({ data }) => {
|
|
|
16
16
|
Skip * NumberOfEntity,
|
|
17
17
|
NumberOfEntity
|
|
18
18
|
);
|
|
19
|
-
if (isLoading)
|
|
20
|
-
return /* @__PURE__ */ jsx(LoaderFull, {});
|
|
19
|
+
if (isLoading) return /* @__PURE__ */ jsx(LoaderFull, {});
|
|
21
20
|
if (!isLoading && clusterNews?.totalCount == 0)
|
|
22
21
|
return /* @__PURE__ */ jsx("span", { className: "flex items-center justify-center m-10", children: "No News" });
|
|
23
22
|
else
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// src/components/Section/MapHeroWidget.tsx
|
|
2
|
-
import dynamic from "
|
|
2
|
+
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-RMHVOY4J.mjs").then((x) => x.HeroMap),
|
|
7
7
|
{
|
|
8
8
|
ssr: false
|
|
9
9
|
}
|