@geowiki/recodo 0.16.9-dev.2 → 0.16.9-dev.21
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/{cluster-map-LVG5YKOI.mjs → cluster-map-D24GOWM4.mjs} +7 -50
- package/dist/index.d.mts +3 -10
- package/dist/index.d.ts +3 -10
- package/dist/index.js +639 -720
- package/dist/index.mjs +383 -418
- package/dist/styles.css +1 -1
- package/package.json +42 -44
package/dist/index.mjs
CHANGED
|
@@ -12,8 +12,7 @@ var ClusterViewNews = (props) => {
|
|
|
12
12
|
props.clusterId,
|
|
13
13
|
props.newsId
|
|
14
14
|
);
|
|
15
|
-
if (isNewsLoading || isClusterLoading)
|
|
16
|
-
return /* @__PURE__ */ jsx(LoaderFull, {});
|
|
15
|
+
if (isNewsLoading || isClusterLoading) return /* @__PURE__ */ jsx(LoaderFull, {});
|
|
17
16
|
return /* @__PURE__ */ jsx(
|
|
18
17
|
ClusterStoryItem,
|
|
19
18
|
{
|
|
@@ -45,7 +44,7 @@ import { i18n } from "@geowiki/core";
|
|
|
45
44
|
import { CoverImage, DesignButton as DesignButton2 } from "@geowiki/ui";
|
|
46
45
|
import { RichTextContent } from "@geowiki/ui";
|
|
47
46
|
import { LoaderFull as LoaderFull2 } from "@geowiki/ui";
|
|
48
|
-
import { useRouter } from "
|
|
47
|
+
import { useRouter } from "@geowiki/core";
|
|
49
48
|
import { useConfigSettings } from "@geowiki/core";
|
|
50
49
|
import { useFileUrl as useFileUrl2 } from "@geowiki/core";
|
|
51
50
|
import { useClusterGetNews as useClusterGetNews2 } from "@geowiki/core";
|
|
@@ -191,7 +190,7 @@ import { Dialog as Dialog2, Transition as Transition2 } from "@headlessui/react"
|
|
|
191
190
|
import { Fragment as Fragment2 } from "react";
|
|
192
191
|
import { XMarkIcon as XMarkIcon2 } from "@heroicons/react/24/outline";
|
|
193
192
|
import { H5Design, Body16, DesignButton } from "@geowiki/ui";
|
|
194
|
-
import Link from "
|
|
193
|
+
import { Link } from "@geowiki/core";
|
|
195
194
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
196
195
|
var FarmerClusterPopup = ({
|
|
197
196
|
title,
|
|
@@ -399,8 +398,7 @@ var ClusterEditNews = (props) => {
|
|
|
399
398
|
Swal.fire("Failed", i18n.t(error), "error");
|
|
400
399
|
}
|
|
401
400
|
};
|
|
402
|
-
if (isNewsLoading || IsConfigSettingsLoaded)
|
|
403
|
-
return /* @__PURE__ */ jsx4(LoaderFull2, {});
|
|
401
|
+
if (isNewsLoading || IsConfigSettingsLoaded) return /* @__PURE__ */ jsx4(LoaderFull2, {});
|
|
404
402
|
return /* @__PURE__ */ jsxs3("div", { children: [
|
|
405
403
|
/* @__PURE__ */ jsxs3("form", { className: "space-y-8 pt-5 ", onSubmit: handleSubmit(onSubmit), children: [
|
|
406
404
|
/* @__PURE__ */ jsx4("div", { className: "space-y-8", children: /* @__PURE__ */ jsxs3("div", { children: [
|
|
@@ -572,7 +570,7 @@ import { useState as useState2 } from "react";
|
|
|
572
570
|
import { ViewStatus as ViewStatus2 } from "@geowiki/core";
|
|
573
571
|
import { useClusterAllNews } from "@geowiki/core";
|
|
574
572
|
import DataTable from "react-data-table-component";
|
|
575
|
-
import { useTheme } from "
|
|
573
|
+
import { useTheme } from "@geowiki/core";
|
|
576
574
|
import {
|
|
577
575
|
DesignButton as DesignButton3,
|
|
578
576
|
LoaderFull as LoaderFull3,
|
|
@@ -645,8 +643,7 @@ var ClusterNewsList = (props) => {
|
|
|
645
643
|
limitNews,
|
|
646
644
|
""
|
|
647
645
|
);
|
|
648
|
-
if (IsAllNewsLoaded)
|
|
649
|
-
return /* @__PURE__ */ jsx5(LoaderFull3, {});
|
|
646
|
+
if (IsAllNewsLoaded) return /* @__PURE__ */ jsx5(LoaderFull3, {});
|
|
650
647
|
return /* @__PURE__ */ jsxs4("div", { children: [
|
|
651
648
|
props.status === ViewStatus2.List ? /* @__PURE__ */ jsx5("div", { className: "mt-3 sm:mt-3 sm:ml-4 flex ...", children: /* @__PURE__ */ jsx5(
|
|
652
649
|
DesignButton3,
|
|
@@ -704,10 +701,8 @@ import { ClusterStoryItem as ClusterStoryItem2, LoaderFull as LoaderFull4 } from
|
|
|
704
701
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
705
702
|
var ClusterNewsItem = ({ newsId }) => {
|
|
706
703
|
const { data, isLoading } = useClusterNewsWithId(newsId);
|
|
707
|
-
if (isLoading)
|
|
708
|
-
|
|
709
|
-
if (!data)
|
|
710
|
-
return null;
|
|
704
|
+
if (isLoading) return /* @__PURE__ */ jsx6(LoaderFull4, {});
|
|
705
|
+
if (!data) return null;
|
|
711
706
|
return /* @__PURE__ */ jsx6("div", { children: /* @__PURE__ */ jsx6(
|
|
712
707
|
ClusterStoryItem2,
|
|
713
708
|
{
|
|
@@ -728,7 +723,7 @@ var ClusterNewsItem = ({ newsId }) => {
|
|
|
728
723
|
// src/components/FarmerCluster/FarmerClusterBasicInfo.tsx
|
|
729
724
|
import { useEffect, useRef, useState as useState3 } from "react";
|
|
730
725
|
import { FormProvider, useForm as useForm2 } from "react-hook-form";
|
|
731
|
-
import dynamic from "
|
|
726
|
+
import { dynamic } from "@geowiki/core";
|
|
732
727
|
import Swal2 from "sweetalert2";
|
|
733
728
|
import {
|
|
734
729
|
ApiImage as ApiImage2,
|
|
@@ -763,7 +758,7 @@ import {
|
|
|
763
758
|
ClusterVerificationStatus as ClusterVerificationStatus2
|
|
764
759
|
} from "@geowiki/api-proxy";
|
|
765
760
|
import { LoaderFull as LoaderFull5 } from "@geowiki/ui";
|
|
766
|
-
import { useRouter as useRouter3 } from "
|
|
761
|
+
import { useRouter as useRouter3 } from "@geowiki/core";
|
|
767
762
|
|
|
768
763
|
// src/components/FarmerCluster/SectionHeader.tsx
|
|
769
764
|
import { HoverCard, HoverCardContent, HoverCardTrigger } from "@geowiki/ui";
|
|
@@ -972,7 +967,7 @@ import { useQueryClient } from "@tanstack/react-query";
|
|
|
972
967
|
import { Dialog as Dialog3, Transition as Transition3 } from "@headlessui/react";
|
|
973
968
|
import { Fragment as Fragment5 } from "react";
|
|
974
969
|
import { H5Design as H5Design2, Body16 as Body163, DesignButton as DesignButton4 } from "@geowiki/ui";
|
|
975
|
-
import { useRouter as useRouter2 } from "
|
|
970
|
+
import { useRouter as useRouter2 } from "@geowiki/core";
|
|
976
971
|
import { XMarkIcon as XMarkIcon3 } from "@heroicons/react/24/outline";
|
|
977
972
|
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
978
973
|
var CancelPopup = ({ open, setOpen }) => {
|
|
@@ -1061,7 +1056,7 @@ var CancelPopup = ({ open, setOpen }) => {
|
|
|
1061
1056
|
|
|
1062
1057
|
// src/components/FarmerCluster/FarmerClusterBasicInfo.tsx
|
|
1063
1058
|
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1064
|
-
var MapWithNoSSR = dynamic(() => import("./cluster-map-
|
|
1059
|
+
var MapWithNoSSR = dynamic(() => import("./cluster-map-D24GOWM4.mjs"), {
|
|
1065
1060
|
ssr: false
|
|
1066
1061
|
});
|
|
1067
1062
|
var FarmerClusterBasicInfo = () => {
|
|
@@ -1161,8 +1156,7 @@ var FarmerClusterBasicInfo = () => {
|
|
|
1161
1156
|
Swal2.fire("Cluster update failed", "error");
|
|
1162
1157
|
}
|
|
1163
1158
|
};
|
|
1164
|
-
if (isCountryLoading || isLoading)
|
|
1165
|
-
return /* @__PURE__ */ jsx10(LoaderFull5, {});
|
|
1159
|
+
if (isCountryLoading || isLoading) return /* @__PURE__ */ jsx10(LoaderFull5, {});
|
|
1166
1160
|
return /* @__PURE__ */ jsxs7("div", { className: "relative bg-white rounded-xl", children: [
|
|
1167
1161
|
/* @__PURE__ */ jsx10(FormProvider, { ...methods, children: /* @__PURE__ */ jsxs7("form", { className: "space-y-4 py-8 px-6", onSubmit: handleSubmit(onSubmit), children: [
|
|
1168
1162
|
/* @__PURE__ */ jsxs7("div", { children: [
|
|
@@ -1592,7 +1586,7 @@ import {
|
|
|
1592
1586
|
ClusterService as ClusterService3
|
|
1593
1587
|
} from "@geowiki/api-proxy";
|
|
1594
1588
|
import { LoaderFull as LoaderFull6 } from "@geowiki/ui";
|
|
1595
|
-
import { useRouter as useRouter4 } from "
|
|
1589
|
+
import { useRouter as useRouter4 } from "@geowiki/core";
|
|
1596
1590
|
|
|
1597
1591
|
// src/components/FarmerCluster/CharacteristicsSection.tsx
|
|
1598
1592
|
import { useFormContext } from "react-hook-form";
|
|
@@ -1777,8 +1771,7 @@ var FarmerClusterDescription = () => {
|
|
|
1777
1771
|
Swal3.fire("Cluster creation failed", "error");
|
|
1778
1772
|
}
|
|
1779
1773
|
};
|
|
1780
|
-
if (isConfigLoading || isClusterLoading)
|
|
1781
|
-
return /* @__PURE__ */ jsx12(LoaderFull6, {});
|
|
1774
|
+
if (isConfigLoading || isClusterLoading) return /* @__PURE__ */ jsx12(LoaderFull6, {});
|
|
1782
1775
|
return /* @__PURE__ */ jsxs9("div", { className: "relative bg-white rounded-xl", children: [
|
|
1783
1776
|
/* @__PURE__ */ jsx12(FormProvider2, { ...methods, children: /* @__PURE__ */ jsxs9("form", { className: "space-y-4 py-8 px-6", onSubmit: handleSubmit(onSubmit), children: [
|
|
1784
1777
|
/* @__PURE__ */ jsxs9("div", { children: [
|
|
@@ -1984,7 +1977,7 @@ import {
|
|
|
1984
1977
|
Notification
|
|
1985
1978
|
} from "@geowiki/ui";
|
|
1986
1979
|
import { ClusterService as ClusterService5 } from "@geowiki/api-proxy";
|
|
1987
|
-
import { useRouter as useRouter5 } from "
|
|
1980
|
+
import { useRouter as useRouter5 } from "@geowiki/core";
|
|
1988
1981
|
import { FormProvider as FormProvider3, useForm as useForm4 } from "react-hook-form";
|
|
1989
1982
|
import { zodResolver as zodResolver3 } from "@hookform/resolvers/zod";
|
|
1990
1983
|
import { v4 } from "uuid";
|
|
@@ -2260,8 +2253,7 @@ var FarmerClusterImages = () => {
|
|
|
2260
2253
|
toast2.error("Image deleted failed");
|
|
2261
2254
|
}
|
|
2262
2255
|
};
|
|
2263
|
-
if (isLoading)
|
|
2264
|
-
return /* @__PURE__ */ jsx15(LoaderFull7, {});
|
|
2256
|
+
if (isLoading) return /* @__PURE__ */ jsx15(LoaderFull7, {});
|
|
2265
2257
|
const onSubmit = handleSubmit(async (data) => {
|
|
2266
2258
|
setIsSaving(true);
|
|
2267
2259
|
let newlyAddedFiles = fileItems.filter((x) => x.isNew);
|
|
@@ -2481,7 +2473,7 @@ import classNames from "classnames";
|
|
|
2481
2473
|
import { ErrorMessage } from "@geowiki/ui";
|
|
2482
2474
|
import { LoaderFull as LoaderFull8 } from "@geowiki/ui";
|
|
2483
2475
|
import { QueryNames as QueryNames5 } from "@geowiki/core";
|
|
2484
|
-
import { useTheme as useTheme2 } from "
|
|
2476
|
+
import { useTheme as useTheme2 } from "@geowiki/core";
|
|
2485
2477
|
import DataTable2 from "react-data-table-component";
|
|
2486
2478
|
import { useQueryClient as useQueryClient5 } from "@tanstack/react-query";
|
|
2487
2479
|
import { Check, XCircle } from "lucide-react";
|
|
@@ -2526,10 +2518,8 @@ var FarmerRequests = (props) => {
|
|
|
2526
2518
|
cell: (row) => /* @__PURE__ */ jsx16("div", { className: "cursor-pointer p-2 rounded-lg hover:bg-slate-500", children: /* @__PURE__ */ jsx16(XCircle, { size: 30, onClick: () => reject(row.id) }) })
|
|
2527
2519
|
}
|
|
2528
2520
|
];
|
|
2529
|
-
if (isLoading)
|
|
2530
|
-
|
|
2531
|
-
if (isError)
|
|
2532
|
-
return /* @__PURE__ */ jsx16(ErrorMessage, {});
|
|
2521
|
+
if (isLoading) return /* @__PURE__ */ jsx16(LoaderFull8, {});
|
|
2522
|
+
if (isError) return /* @__PURE__ */ jsx16(ErrorMessage, {});
|
|
2533
2523
|
return /* @__PURE__ */ jsx16("div", { className: "mt-8", children: /* @__PURE__ */ jsx16(
|
|
2534
2524
|
DataTable2,
|
|
2535
2525
|
{
|
|
@@ -2978,14 +2968,14 @@ import Swal5 from "sweetalert2";
|
|
|
2978
2968
|
import { useConfigSettings as useConfigSettings4 } from "@geowiki/core";
|
|
2979
2969
|
import { DesignButton as DesignButton11, PermissionDisabled } from "@geowiki/ui";
|
|
2980
2970
|
import { FeatureDisabled } from "@geowiki/ui";
|
|
2981
|
-
import Link2 from "
|
|
2971
|
+
import { Link as Link2 } from "@geowiki/core";
|
|
2982
2972
|
import { useClusters } from "@geowiki/core";
|
|
2983
2973
|
import { ClusterService as ClusterService9 } from "@geowiki/api-proxy";
|
|
2984
2974
|
import { LoaderFull as LoaderFull10 } from "@geowiki/ui";
|
|
2985
2975
|
import { useQueryClient as useQueryClient6 } from "@tanstack/react-query";
|
|
2986
2976
|
import { QueryNames as QueryNames6 } from "@geowiki/core";
|
|
2987
2977
|
import DataTable3 from "react-data-table-component";
|
|
2988
|
-
import { useTheme as useTheme3 } from "
|
|
2978
|
+
import { useTheme as useTheme3 } from "@geowiki/core";
|
|
2989
2979
|
import { EditLinkButton } from "@geowiki/ui";
|
|
2990
2980
|
import { DeleteButton as DeleteButton3 } from "@geowiki/ui";
|
|
2991
2981
|
import { ViewLink as ViewLink2, tableDesigntyles as tableDesigntyles2, H4Design as H4Design2, Body16 as Body165 } from "@geowiki/ui";
|
|
@@ -3078,12 +3068,9 @@ var FarmerClusterList = () => {
|
|
|
3078
3068
|
}
|
|
3079
3069
|
}
|
|
3080
3070
|
};
|
|
3081
|
-
if (isLoading || IsConfigSettingsLoaded)
|
|
3082
|
-
|
|
3083
|
-
if (!
|
|
3084
|
-
return /* @__PURE__ */ jsx21(FeatureDisabled, {});
|
|
3085
|
-
if (!canViewFarmerClusterPermission)
|
|
3086
|
-
return /* @__PURE__ */ jsx21(PermissionDisabled, {});
|
|
3071
|
+
if (isLoading || IsConfigSettingsLoaded) return /* @__PURE__ */ jsx21(LoaderFull10, {});
|
|
3072
|
+
if (!farmerClusterEnabled) return /* @__PURE__ */ jsx21(FeatureDisabled, {});
|
|
3073
|
+
if (!canViewFarmerClusterPermission) return /* @__PURE__ */ jsx21(PermissionDisabled, {});
|
|
3087
3074
|
return /* @__PURE__ */ jsxs16("div", { children: [
|
|
3088
3075
|
/* @__PURE__ */ jsx21("div", { className: "container mx-auto", children: /* @__PURE__ */ jsx21("div", { className: "pb-8 mb-5", children: /* @__PURE__ */ jsxs16("div", { className: "pb-5", children: [
|
|
3089
3076
|
/* @__PURE__ */ jsx21("div", { children: /* @__PURE__ */ jsxs16("div", { className: "-ml-4 -mt-2 pb-8 items-center sm:flex-nowrap", children: [
|
|
@@ -3174,8 +3161,7 @@ import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
|
3174
3161
|
var ViewBasicInfo = ({ cluster }) => {
|
|
3175
3162
|
var arrayPos = 0;
|
|
3176
3163
|
var { data: ConfigSettings, isLoading: IsConfigSettingsLoaded } = useConfigSettings5();
|
|
3177
|
-
if (IsConfigSettingsLoaded)
|
|
3178
|
-
return /* @__PURE__ */ jsx22(LoaderFull11, {});
|
|
3164
|
+
if (IsConfigSettingsLoaded) return /* @__PURE__ */ jsx22(LoaderFull11, {});
|
|
3179
3165
|
return /* @__PURE__ */ jsx22("div", { className: "container mx-auto pt-4", children: /* @__PURE__ */ jsx22("section", { className: "px-2 py-5", children: /* @__PURE__ */ jsx22("div", { className: "shadow ", children: /* @__PURE__ */ jsxs17("div", { className: "border-t px-2 py-5", children: [
|
|
3180
3166
|
/* @__PURE__ */ jsxs17("dl", { className: "grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-3", children: [
|
|
3181
3167
|
cluster?.activityStatus != null && cluster?.activityStatus !== void 0 && /* @__PURE__ */ jsx22(
|
|
@@ -3368,8 +3354,8 @@ var ViewClusterImagesList_default = ViewClusterImagesList;
|
|
|
3368
3354
|
|
|
3369
3355
|
// src/components/FarmerCluster/ViewFarmerCluster.tsx
|
|
3370
3356
|
import { ContentGrid } from "@geowiki/ui";
|
|
3371
|
-
import dynamic2 from "
|
|
3372
|
-
import { useRouter as useRouter6 } from "
|
|
3357
|
+
import { dynamic as dynamic2 } from "@geowiki/core";
|
|
3358
|
+
import { useRouter as useRouter6 } from "@geowiki/core";
|
|
3373
3359
|
import { useAppConfig as useAppConfig2 } from "@geowiki/core";
|
|
3374
3360
|
import { useFileUrl as useFileUrl3 } from "@geowiki/core";
|
|
3375
3361
|
import { jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
@@ -3378,15 +3364,14 @@ var ViewFarmerCluster = ({ cluster }) => {
|
|
|
3378
3364
|
const fileUrl = useFileUrl3();
|
|
3379
3365
|
const router = useRouter6();
|
|
3380
3366
|
const [route, setRoute] = useState10(null);
|
|
3381
|
-
const MapWithNoSSR3 = dynamic2(() => import("./cluster-map-
|
|
3367
|
+
const MapWithNoSSR3 = dynamic2(() => import("./cluster-map-D24GOWM4.mjs"), {
|
|
3382
3368
|
ssr: false
|
|
3383
3369
|
});
|
|
3384
3370
|
var position = {
|
|
3385
3371
|
lat: cluster?.location?.latitude,
|
|
3386
3372
|
lng: cluster?.location?.longitude
|
|
3387
3373
|
};
|
|
3388
|
-
if (!cluster)
|
|
3389
|
-
return /* @__PURE__ */ jsx24("div", { children: "Cluster not found" });
|
|
3374
|
+
if (!cluster) return /* @__PURE__ */ jsx24("div", { children: "Cluster not found" });
|
|
3390
3375
|
var news = cluster?.clusterNews?.filter((x) => x.status == "Publish")?.map((news2) => ({
|
|
3391
3376
|
id: news2["id"],
|
|
3392
3377
|
url: appData?.currentUser?.id == cluster?.creatorId ? "/cluster/" + cluster.id + "/news/" + news2["id"] + "?view=edit" : "/cluster/" + cluster.id + "/news/" + news2["id"],
|
|
@@ -3543,7 +3528,7 @@ import {
|
|
|
3543
3528
|
MobileFilterPopupOpened
|
|
3544
3529
|
} from "@geowiki/ui";
|
|
3545
3530
|
import { XCircleIcon } from "@heroicons/react/24/outline";
|
|
3546
|
-
import { useRouter as useRouter7 } from "
|
|
3531
|
+
import { useRouter as useRouter7 } from "@geowiki/core";
|
|
3547
3532
|
import { v4 as v42 } from "uuid";
|
|
3548
3533
|
import { useState as useState11 } from "react";
|
|
3549
3534
|
import { jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
@@ -3821,9 +3806,9 @@ var FarmerClusterFinder = () => {
|
|
|
3821
3806
|
|
|
3822
3807
|
// src/components/FarmerCluster/RecodoViewFarmerCluster.tsx
|
|
3823
3808
|
import { useState as useState13 } from "react";
|
|
3824
|
-
import dynamic3 from "
|
|
3809
|
+
import { dynamic as dynamic3 } from "@geowiki/core";
|
|
3825
3810
|
import { LinkType } from "@geowiki/api-proxy";
|
|
3826
|
-
import { useRouter as useRouter8 } from "
|
|
3811
|
+
import { useRouter as useRouter8 } from "@geowiki/core";
|
|
3827
3812
|
import {
|
|
3828
3813
|
H2Design,
|
|
3829
3814
|
LastUpdatedTag,
|
|
@@ -4060,15 +4045,14 @@ var RecodoViewFarmerCluster = ({
|
|
|
4060
4045
|
const router = useRouter8();
|
|
4061
4046
|
const [route, setRoute] = useState13(null);
|
|
4062
4047
|
const [openContact, setOpenContact] = useState13(false);
|
|
4063
|
-
const MapWithNoSSR3 = dynamic3(() => import("./cluster-map-
|
|
4048
|
+
const MapWithNoSSR3 = dynamic3(() => import("./cluster-map-D24GOWM4.mjs"), {
|
|
4064
4049
|
ssr: false
|
|
4065
4050
|
});
|
|
4066
4051
|
var position = {
|
|
4067
4052
|
lat: cluster?.location?.latitude,
|
|
4068
4053
|
lng: cluster?.location?.longitude
|
|
4069
4054
|
};
|
|
4070
|
-
if (!cluster)
|
|
4071
|
-
return /* @__PURE__ */ jsx27("div", { children: "Cluster not found" });
|
|
4055
|
+
if (!cluster) return /* @__PURE__ */ jsx27("div", { children: "Cluster not found" });
|
|
4072
4056
|
if (cluster && route == null)
|
|
4073
4057
|
setRoute([
|
|
4074
4058
|
{ path: router.asPath, name: "View Farmer Cluster - " + cluster?.name }
|
|
@@ -4265,7 +4249,7 @@ import { useAudience } from "@geowiki/core";
|
|
|
4265
4249
|
import { useTopic } from "@geowiki/core";
|
|
4266
4250
|
import { useResourceType } from "@geowiki/core";
|
|
4267
4251
|
import { useLanguages } from "@geowiki/core";
|
|
4268
|
-
import Link3 from "
|
|
4252
|
+
import { Link as Link3 } from "@geowiki/core";
|
|
4269
4253
|
|
|
4270
4254
|
// src/components/Resource/ResourceIcon.tsx
|
|
4271
4255
|
import {
|
|
@@ -4330,32 +4314,8 @@ var ResourceIcon = ({
|
|
|
4330
4314
|
}
|
|
4331
4315
|
};
|
|
4332
4316
|
|
|
4333
|
-
// src/components/Resource/ResourceTag.tsx
|
|
4334
|
-
import { cn as cn2 } from "@geowiki/ui";
|
|
4335
|
-
import { cva } from "class-variance-authority";
|
|
4336
|
-
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
4337
|
-
var tagVariants = cva(
|
|
4338
|
-
"justify-center self-start px-4 py-2 mr-2 mt-1 text-sm font-medium text-white whitespace-nowrap rounded-[40px] first-letter:capitalize",
|
|
4339
|
-
{
|
|
4340
|
-
variants: {
|
|
4341
|
-
variant: {
|
|
4342
|
-
topic: "bg-tag-dark-blue",
|
|
4343
|
-
audience: "bg-tag-dark-green",
|
|
4344
|
-
keyword: "bg-tag-blue",
|
|
4345
|
-
language: "bg-tag-orange",
|
|
4346
|
-
resourceType: "bg-sky-500"
|
|
4347
|
-
}
|
|
4348
|
-
},
|
|
4349
|
-
defaultVariants: {
|
|
4350
|
-
variant: "topic"
|
|
4351
|
-
}
|
|
4352
|
-
}
|
|
4353
|
-
);
|
|
4354
|
-
var ResourceTag = ({ tag, type }) => {
|
|
4355
|
-
return /* @__PURE__ */ jsx29("span", { className: cn2(tagVariants({ variant: type })), children: tag });
|
|
4356
|
-
};
|
|
4357
|
-
|
|
4358
4317
|
// src/components/Resource/ResourceView.tsx
|
|
4318
|
+
import { ResourceTag } from "@geowiki/ui";
|
|
4359
4319
|
import {
|
|
4360
4320
|
H3Design as H3Design2,
|
|
4361
4321
|
Body16sb,
|
|
@@ -4364,17 +4324,17 @@ import {
|
|
|
4364
4324
|
Caption,
|
|
4365
4325
|
DesignButton as DesignButton14
|
|
4366
4326
|
} from "@geowiki/ui";
|
|
4367
|
-
import { Fragment as Fragment10, jsx as
|
|
4327
|
+
import { Fragment as Fragment10, jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4368
4328
|
var DetailRow = ({ label, value }) => {
|
|
4369
|
-
return /* @__PURE__ */
|
|
4370
|
-
/* @__PURE__ */
|
|
4371
|
-
/* @__PURE__ */
|
|
4329
|
+
return /* @__PURE__ */ jsx29(Fragment10, { children: /* @__PURE__ */ jsxs22("div", { className: "flex gap-2 lg:gap-5 lg:justify-between py-4 max-md:flex-wrap max-md:max-w-full lg:py-6 border-0 border-b border-grey-light", children: [
|
|
4330
|
+
/* @__PURE__ */ jsx29(Body167, { className: "text-grey", children: label }),
|
|
4331
|
+
/* @__PURE__ */ jsx29(Body16m, { className: "lg:text-righ max-md:max-w-full", children: value })
|
|
4372
4332
|
] }) });
|
|
4373
4333
|
};
|
|
4374
4334
|
var KeyValues = ({ name, keyValues, kind }) => {
|
|
4375
4335
|
return /* @__PURE__ */ jsxs22(Fragment10, { children: [
|
|
4376
|
-
/* @__PURE__ */
|
|
4377
|
-
/* @__PURE__ */
|
|
4336
|
+
/* @__PURE__ */ jsx29(Caption, { className: "text-grey", children: name }),
|
|
4337
|
+
/* @__PURE__ */ jsx29("div", { className: "flex items-center flex-wrap text-sm font-medium whitespace-nowrap mt-2 mb-6 lg:mt-4 lg:mb-10", children: keyValues.map((keyValue, index) => /* @__PURE__ */ jsx29(ResourceTag, { tag: keyValue.value, type: kind }, index)) })
|
|
4378
4338
|
] });
|
|
4379
4339
|
};
|
|
4380
4340
|
function ResourceView({
|
|
@@ -4399,8 +4359,8 @@ function ResourceView({
|
|
|
4399
4359
|
const currentTypes = types?.find((type) => type.key === resource.resourceType)?.value || resource.resourceType;
|
|
4400
4360
|
const link = resource.link || "";
|
|
4401
4361
|
const linkText = link.length > 70 ? `${link.slice(0, 70)}...` : link;
|
|
4402
|
-
return /* @__PURE__ */
|
|
4403
|
-
/* @__PURE__ */
|
|
4362
|
+
return /* @__PURE__ */ jsx29(Transition6.Root, { show: open, as: Fragment9, "data-component": "ResourceView", children: /* @__PURE__ */ jsxs22(Dialog7, { as: "div", className: "relative z-10", onClose: setOpen, children: [
|
|
4363
|
+
/* @__PURE__ */ jsx29(
|
|
4404
4364
|
Transition6.Child,
|
|
4405
4365
|
{
|
|
4406
4366
|
as: Fragment9,
|
|
@@ -4410,10 +4370,10 @@ function ResourceView({
|
|
|
4410
4370
|
leave: "ease-in duration-200",
|
|
4411
4371
|
leaveFrom: "opacity-100",
|
|
4412
4372
|
leaveTo: "opacity-0",
|
|
4413
|
-
children: /* @__PURE__ */
|
|
4373
|
+
children: /* @__PURE__ */ jsx29("div", { className: "fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" })
|
|
4414
4374
|
}
|
|
4415
4375
|
),
|
|
4416
|
-
/* @__PURE__ */
|
|
4376
|
+
/* @__PURE__ */ jsx29("div", { className: "fixed z-10 inset-0 overflow-y-auto text-black", children: /* @__PURE__ */ jsx29("div", { className: "flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0", children: /* @__PURE__ */ jsx29(
|
|
4417
4377
|
Transition6.Child,
|
|
4418
4378
|
{
|
|
4419
4379
|
as: Fragment9,
|
|
@@ -4424,15 +4384,15 @@ function ResourceView({
|
|
|
4424
4384
|
leaveFrom: "opacity-100 translate-y-0 sm:scale-100",
|
|
4425
4385
|
leaveTo: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
4426
4386
|
children: /* @__PURE__ */ jsxs22(Dialog7.Panel, { className: "relative bg-white rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-4xl sm:w-full sm:p-10", children: [
|
|
4427
|
-
/* @__PURE__ */
|
|
4387
|
+
/* @__PURE__ */ jsx29("div", { className: "absolute top-0 right-0 pt-10 pr-10", children: /* @__PURE__ */ jsxs22(
|
|
4428
4388
|
"button",
|
|
4429
4389
|
{
|
|
4430
4390
|
type: "button",
|
|
4431
4391
|
className: " rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 ",
|
|
4432
4392
|
onClick: () => setOpen(false),
|
|
4433
4393
|
children: [
|
|
4434
|
-
/* @__PURE__ */
|
|
4435
|
-
/* @__PURE__ */
|
|
4394
|
+
/* @__PURE__ */ jsx29("span", { className: "sr-only", children: "Close" }),
|
|
4395
|
+
/* @__PURE__ */ jsx29(
|
|
4436
4396
|
XMarkIcon6,
|
|
4437
4397
|
{
|
|
4438
4398
|
className: "h-4 w-4 lg:h-6 lg:w-6",
|
|
@@ -4445,12 +4405,12 @@ function ResourceView({
|
|
|
4445
4405
|
/* @__PURE__ */ jsxs22("div", { className: "p-5 lg:px-6 lg:py-2", children: [
|
|
4446
4406
|
/* @__PURE__ */ jsxs22("div", { children: [
|
|
4447
4407
|
/* @__PURE__ */ jsxs22("div", { className: "flex space-x-2 lg:block lg:space-x-0", children: [
|
|
4448
|
-
/* @__PURE__ */
|
|
4449
|
-
/* @__PURE__ */
|
|
4408
|
+
/* @__PURE__ */ jsx29(ResourceIcon, { type: resource.resourceType }),
|
|
4409
|
+
/* @__PURE__ */ jsx29(Body16sb, { className: "self-start mt-[10px] text-primary lg:mt-4", children: currentTypes })
|
|
4450
4410
|
] }),
|
|
4451
|
-
/* @__PURE__ */
|
|
4452
|
-
/* @__PURE__ */
|
|
4453
|
-
/* @__PURE__ */
|
|
4411
|
+
/* @__PURE__ */ jsx29(H3Design2, { className: "mt-6", children: resource.title }),
|
|
4412
|
+
/* @__PURE__ */ jsx29(Body167, { className: "mt-6", children: resource.description }),
|
|
4413
|
+
/* @__PURE__ */ jsx29("div", { className: " mt-6 whitespace-nowrap lg:mt-8", children: /* @__PURE__ */ jsx29(Link3, { href: link, target: "_blank", children: /* @__PURE__ */ jsx29(
|
|
4454
4414
|
DesignButton14,
|
|
4455
4415
|
{
|
|
4456
4416
|
variant: "externalLink",
|
|
@@ -4459,14 +4419,14 @@ function ResourceView({
|
|
|
4459
4419
|
}
|
|
4460
4420
|
) }) }),
|
|
4461
4421
|
/* @__PURE__ */ jsxs22("div", { className: "my-6 lg:my-10", children: [
|
|
4462
|
-
currentTypes && /* @__PURE__ */
|
|
4422
|
+
currentTypes && /* @__PURE__ */ jsx29(
|
|
4463
4423
|
DetailRow,
|
|
4464
4424
|
{
|
|
4465
4425
|
label: "Resource type:",
|
|
4466
4426
|
value: currentTypes
|
|
4467
4427
|
}
|
|
4468
4428
|
),
|
|
4469
|
-
resource.publisher && /* @__PURE__ */
|
|
4429
|
+
resource.publisher && /* @__PURE__ */ jsx29(
|
|
4470
4430
|
DetailRow,
|
|
4471
4431
|
{
|
|
4472
4432
|
label: "Publisher",
|
|
@@ -4474,7 +4434,7 @@ function ResourceView({
|
|
|
4474
4434
|
}
|
|
4475
4435
|
)
|
|
4476
4436
|
] }),
|
|
4477
|
-
currentTopics?.length > 0 && /* @__PURE__ */
|
|
4437
|
+
currentTopics?.length > 0 && /* @__PURE__ */ jsx29(
|
|
4478
4438
|
KeyValues,
|
|
4479
4439
|
{
|
|
4480
4440
|
name: "Topic",
|
|
@@ -4485,7 +4445,7 @@ function ResourceView({
|
|
|
4485
4445
|
kind: "topic"
|
|
4486
4446
|
}
|
|
4487
4447
|
),
|
|
4488
|
-
currentAudiences?.length > 0 && /* @__PURE__ */
|
|
4448
|
+
currentAudiences?.length > 0 && /* @__PURE__ */ jsx29(
|
|
4489
4449
|
KeyValues,
|
|
4490
4450
|
{
|
|
4491
4451
|
name: "Audience",
|
|
@@ -4497,8 +4457,8 @@ function ResourceView({
|
|
|
4497
4457
|
}
|
|
4498
4458
|
),
|
|
4499
4459
|
resource?.keywords && resource?.keywords?.length > 0 && /* @__PURE__ */ jsxs22("div", { children: [
|
|
4500
|
-
/* @__PURE__ */
|
|
4501
|
-
/* @__PURE__ */
|
|
4460
|
+
/* @__PURE__ */ jsx29(Caption, { className: "self-start lg:mt-10 tracking-wider text-grey", children: "Keywords" }),
|
|
4461
|
+
/* @__PURE__ */ jsx29("div", { className: "flex items-center flex-wrap mt-2 mb-6 lg:mt-4 lg:mb-10", children: resource.keywords?.map((keyword, index) => /* @__PURE__ */ jsx29(
|
|
4502
4462
|
ResourceTag,
|
|
4503
4463
|
{
|
|
4504
4464
|
tag: keyword,
|
|
@@ -4507,7 +4467,7 @@ function ResourceView({
|
|
|
4507
4467
|
index
|
|
4508
4468
|
)) })
|
|
4509
4469
|
] }),
|
|
4510
|
-
currentLanguages?.length > 0 && /* @__PURE__ */
|
|
4470
|
+
currentLanguages?.length > 0 && /* @__PURE__ */ jsx29(
|
|
4511
4471
|
KeyValues,
|
|
4512
4472
|
{
|
|
4513
4473
|
name: "Language",
|
|
@@ -4519,11 +4479,11 @@ function ResourceView({
|
|
|
4519
4479
|
}
|
|
4520
4480
|
)
|
|
4521
4481
|
] }),
|
|
4522
|
-
showResourcesButton && /* @__PURE__ */
|
|
4482
|
+
showResourcesButton && /* @__PURE__ */ jsx29("div", { className: "flex w-full justify-center", children: /* @__PURE__ */ jsx29(
|
|
4523
4483
|
Link3,
|
|
4524
4484
|
{
|
|
4525
4485
|
href: `/resources/resource-finder?topic=${selectedTopic}&audience=${selectedAudience}`,
|
|
4526
|
-
children: /* @__PURE__ */
|
|
4486
|
+
children: /* @__PURE__ */ jsx29(DesignButton14, { children: "View all Resources" })
|
|
4527
4487
|
}
|
|
4528
4488
|
) })
|
|
4529
4489
|
] })
|
|
@@ -4536,7 +4496,7 @@ var ResourceView_default = ResourceView;
|
|
|
4536
4496
|
|
|
4537
4497
|
// src/components/Resource/ResourceLink.tsx
|
|
4538
4498
|
import { Body16 as Body168 } from "@geowiki/ui";
|
|
4539
|
-
import { jsx as
|
|
4499
|
+
import { jsx as jsx30, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4540
4500
|
var ResourceLink = ({
|
|
4541
4501
|
resource,
|
|
4542
4502
|
selectedAudience,
|
|
@@ -4544,8 +4504,8 @@ var ResourceLink = ({
|
|
|
4544
4504
|
}) => {
|
|
4545
4505
|
const [open, setOpen] = useState14(false);
|
|
4546
4506
|
return /* @__PURE__ */ jsxs23("div", { children: [
|
|
4547
|
-
/* @__PURE__ */
|
|
4548
|
-
/* @__PURE__ */
|
|
4507
|
+
/* @__PURE__ */ jsx30("div", { onClick: () => setOpen(true), className: "cursor-pointer", children: /* @__PURE__ */ jsx30(Body168, { className: "underline text-left", children: resource.title }) }),
|
|
4508
|
+
/* @__PURE__ */ jsx30(
|
|
4549
4509
|
ResourceView_default,
|
|
4550
4510
|
{
|
|
4551
4511
|
resource,
|
|
@@ -4561,8 +4521,8 @@ var ResourceLink = ({
|
|
|
4561
4521
|
|
|
4562
4522
|
// src/components/FarmerCluster/ResourcesQuickFind.tsx
|
|
4563
4523
|
import { parseTitle } from "@geowiki/ui";
|
|
4564
|
-
import Link4 from "
|
|
4565
|
-
import { Fragment as Fragment11, jsx as
|
|
4524
|
+
import { Link as Link4 } from "@geowiki/core";
|
|
4525
|
+
import { Fragment as Fragment11, jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4566
4526
|
var ResourcesQuickFind = ({}) => {
|
|
4567
4527
|
const pageSize = 2;
|
|
4568
4528
|
const [selectedAudience, setSelectedAudience] = useState15();
|
|
@@ -4597,9 +4557,9 @@ var ResourcesQuickFind = ({}) => {
|
|
|
4597
4557
|
});
|
|
4598
4558
|
return updatedArray;
|
|
4599
4559
|
};
|
|
4600
|
-
return /* @__PURE__ */
|
|
4601
|
-
/* @__PURE__ */
|
|
4602
|
-
/* @__PURE__ */
|
|
4560
|
+
return /* @__PURE__ */ jsx31("section", { className: "flex justify-center items-center mt-6 p-5 bg-accent-light-purple rounded-xl lg:mt-12 lg:px-16 lg:py-20", children: /* @__PURE__ */ jsx31("div", { className: "lg:container mx-auto w-full max-w-[1116px] ", children: /* @__PURE__ */ jsxs24("div", { className: "lg:flex lg:gap-5 ", children: [
|
|
4561
|
+
/* @__PURE__ */ jsx31("div", { className: "flex flex-col lg:w-[57%] ", children: /* @__PURE__ */ jsxs24("div", { className: "flex flex-col text-gray-900 space-y-4 lg:space-y-6 lg:mt-2.5", children: [
|
|
4562
|
+
/* @__PURE__ */ jsx31(
|
|
4603
4563
|
HtmlView2,
|
|
4604
4564
|
{
|
|
4605
4565
|
cssClass: "m-0 pt-2 lg:pt-0",
|
|
@@ -4609,13 +4569,13 @@ var ResourcesQuickFind = ({}) => {
|
|
|
4609
4569
|
)
|
|
4610
4570
|
}
|
|
4611
4571
|
),
|
|
4612
|
-
/* @__PURE__ */
|
|
4613
|
-
/* @__PURE__ */
|
|
4572
|
+
/* @__PURE__ */ jsx31(Body182, { className: "lg:w-[65%]", children: "Tell us about what your looking for and we will recommend some resources to help you get started." }),
|
|
4573
|
+
/* @__PURE__ */ jsx31(
|
|
4614
4574
|
DesignButton15,
|
|
4615
4575
|
{
|
|
4616
4576
|
className: "h-auto p-0 lg:p-0 self-start",
|
|
4617
4577
|
variant: "internalLink",
|
|
4618
|
-
children: /* @__PURE__ */
|
|
4578
|
+
children: /* @__PURE__ */ jsx31(
|
|
4619
4579
|
Link4,
|
|
4620
4580
|
{
|
|
4621
4581
|
href: "/resources/resource-finder",
|
|
@@ -4627,8 +4587,8 @@ var ResourcesQuickFind = ({}) => {
|
|
|
4627
4587
|
}
|
|
4628
4588
|
)
|
|
4629
4589
|
] }) }),
|
|
4630
|
-
/* @__PURE__ */
|
|
4631
|
-
/* @__PURE__ */
|
|
4590
|
+
/* @__PURE__ */ jsx31("div", { className: "pt-6 flex flex-col w-full lg:ml-5 lg:w-[43%] lg:pt-0", children: /* @__PURE__ */ jsx31("form", { className: "flex flex-col grow w-full lg:w-full text-base font-medium leading-5 text-gray-900 rounded-xl bg-white bg-opacity-40 lg:min-w-[24rem] ", children: !isAudienceLoading && !isTopicsLoading && audiences && topics && /* @__PURE__ */ jsx31("div", { className: "w-full flex-col flex justify-center", children: /* @__PURE__ */ jsxs24("div", { className: " w-full lg:w-[20rem] p-8 bg-opacity-40 rounded-xl", children: [
|
|
4591
|
+
/* @__PURE__ */ jsx31(Body16m2, { className: "pb-1", children: "I am a" }),
|
|
4632
4592
|
/* @__PURE__ */ jsxs24(
|
|
4633
4593
|
DesignSelect3,
|
|
4634
4594
|
{
|
|
@@ -4636,8 +4596,8 @@ var ResourcesQuickFind = ({}) => {
|
|
|
4636
4596
|
handleAudienceChange(v);
|
|
4637
4597
|
},
|
|
4638
4598
|
children: [
|
|
4639
|
-
/* @__PURE__ */
|
|
4640
|
-
/* @__PURE__ */
|
|
4599
|
+
/* @__PURE__ */ jsx31(DesignSelectTrigger3, { className: "w-full lg:w-80 bg-white", children: /* @__PURE__ */ jsx31(DesignSelectValue3, { placeholder: "Select one" }) }),
|
|
4600
|
+
/* @__PURE__ */ jsx31(DesignSelectContent3, { children: /* @__PURE__ */ jsx31(DesignSelectGroup3, { children: audiences.map((audience) => /* @__PURE__ */ jsx31(
|
|
4641
4601
|
DesignSelectItem3,
|
|
4642
4602
|
{
|
|
4643
4603
|
value: audience.key,
|
|
@@ -4648,7 +4608,7 @@ var ResourcesQuickFind = ({}) => {
|
|
|
4648
4608
|
]
|
|
4649
4609
|
}
|
|
4650
4610
|
),
|
|
4651
|
-
/* @__PURE__ */
|
|
4611
|
+
/* @__PURE__ */ jsx31(Body16m2, { className: "pb-1 pt-8", children: "I'd like to learn more about" }),
|
|
4652
4612
|
/* @__PURE__ */ jsxs24(
|
|
4653
4613
|
DesignSelect3,
|
|
4654
4614
|
{
|
|
@@ -4656,8 +4616,8 @@ var ResourcesQuickFind = ({}) => {
|
|
|
4656
4616
|
handleTopicChange(v);
|
|
4657
4617
|
},
|
|
4658
4618
|
children: [
|
|
4659
|
-
/* @__PURE__ */
|
|
4660
|
-
/* @__PURE__ */
|
|
4619
|
+
/* @__PURE__ */ jsx31(DesignSelectTrigger3, { className: "w-full lg:w-80 bg-white", children: /* @__PURE__ */ jsx31(DesignSelectValue3, { placeholder: "Select one" }) }),
|
|
4620
|
+
/* @__PURE__ */ jsx31(DesignSelectContent3, { children: /* @__PURE__ */ jsx31(DesignSelectGroup3, { children: updateTopics().map((topic) => /* @__PURE__ */ jsx31(
|
|
4661
4621
|
DesignSelectItem3,
|
|
4662
4622
|
{
|
|
4663
4623
|
value: topic.key,
|
|
@@ -4668,9 +4628,9 @@ var ResourcesQuickFind = ({}) => {
|
|
|
4668
4628
|
]
|
|
4669
4629
|
}
|
|
4670
4630
|
),
|
|
4671
|
-
selectedAudience && selectedTopic && !isLoading && /* @__PURE__ */
|
|
4672
|
-
/* @__PURE__ */
|
|
4673
|
-
data?.items.map((item) => /* @__PURE__ */
|
|
4631
|
+
selectedAudience && selectedTopic && !isLoading && /* @__PURE__ */ jsx31(Fragment11, { children: data?.items?.length && data?.items?.length > 0 ? /* @__PURE__ */ jsxs24("div", { className: "space-y-2 pt-4", children: [
|
|
4632
|
+
/* @__PURE__ */ jsx31(Body16m2, { children: "Have a look at:" }),
|
|
4633
|
+
data?.items.map((item) => /* @__PURE__ */ jsx31(
|
|
4674
4634
|
ResourceLink,
|
|
4675
4635
|
{
|
|
4676
4636
|
resource: item,
|
|
@@ -4679,14 +4639,14 @@ var ResourcesQuickFind = ({}) => {
|
|
|
4679
4639
|
},
|
|
4680
4640
|
item.id
|
|
4681
4641
|
))
|
|
4682
|
-
] }) : /* @__PURE__ */
|
|
4642
|
+
] }) : /* @__PURE__ */ jsx31(Body169, { className: "pt-4", children: "No results available, please try a different search" }) })
|
|
4683
4643
|
] }) }) }) })
|
|
4684
4644
|
] }) }) });
|
|
4685
4645
|
};
|
|
4686
4646
|
|
|
4687
4647
|
// src/components/FarmerCluster/FarmerClusterLinkPartner.tsx
|
|
4688
4648
|
import { DesignInput as DesignInput4, DesignButton as DesignButton16 } from "@geowiki/ui";
|
|
4689
|
-
import { useRouter as useRouter9 } from "
|
|
4649
|
+
import { useRouter as useRouter9 } from "@geowiki/core";
|
|
4690
4650
|
import { useEffect as useEffect4, useState as useState16 } from "react";
|
|
4691
4651
|
import {
|
|
4692
4652
|
FormProvider as FormProvider4,
|
|
@@ -4702,7 +4662,7 @@ import {
|
|
|
4702
4662
|
import Swal6 from "sweetalert2";
|
|
4703
4663
|
import { QueryNames as QueryNames7, useClusterLinks } from "@geowiki/core";
|
|
4704
4664
|
import { useQueryClient as useQueryClient7 } from "@tanstack/react-query";
|
|
4705
|
-
import { jsx as
|
|
4665
|
+
import { jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4706
4666
|
var LinkRow = ({ linkName, url, index }) => {
|
|
4707
4667
|
const methods = useFormContext2();
|
|
4708
4668
|
const {
|
|
@@ -4714,8 +4674,8 @@ var LinkRow = ({ linkName, url, index }) => {
|
|
|
4714
4674
|
const linkErrors = errors?.links;
|
|
4715
4675
|
return /* @__PURE__ */ jsxs25("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
4716
4676
|
/* @__PURE__ */ jsxs25("div", { className: "flex flex-col min-w-96", children: [
|
|
4717
|
-
/* @__PURE__ */
|
|
4718
|
-
/* @__PURE__ */
|
|
4677
|
+
/* @__PURE__ */ jsx32("div", { className: "text-xs text-zinc-500 max-md:max-w-full", children: "Link name" }),
|
|
4678
|
+
/* @__PURE__ */ jsx32(
|
|
4719
4679
|
DesignInput4,
|
|
4720
4680
|
{
|
|
4721
4681
|
...register(`links.${index}.name`),
|
|
@@ -4726,7 +4686,7 @@ var LinkRow = ({ linkName, url, index }) => {
|
|
|
4726
4686
|
}
|
|
4727
4687
|
}
|
|
4728
4688
|
),
|
|
4729
|
-
/* @__PURE__ */
|
|
4689
|
+
/* @__PURE__ */ jsx32(
|
|
4730
4690
|
"input",
|
|
4731
4691
|
{
|
|
4732
4692
|
type: "hidden",
|
|
@@ -4734,11 +4694,11 @@ var LinkRow = ({ linkName, url, index }) => {
|
|
|
4734
4694
|
value: index
|
|
4735
4695
|
}
|
|
4736
4696
|
),
|
|
4737
|
-
linkErrors?.[index]?.name && /* @__PURE__ */
|
|
4697
|
+
linkErrors?.[index]?.name && /* @__PURE__ */ jsx32("div", { className: "text-red-500", children: linkErrors?.[index]?.name?.message })
|
|
4738
4698
|
] }),
|
|
4739
4699
|
/* @__PURE__ */ jsxs25("div", { className: "flex flex-col min-w-96", children: [
|
|
4740
|
-
/* @__PURE__ */
|
|
4741
|
-
/* @__PURE__ */
|
|
4700
|
+
/* @__PURE__ */ jsx32("div", { className: "text-xs text-zinc-500 max-md:max-w-full", children: "URL" }),
|
|
4701
|
+
/* @__PURE__ */ jsx32(
|
|
4742
4702
|
DesignInput4,
|
|
4743
4703
|
{
|
|
4744
4704
|
...register(`links.${index}.link`),
|
|
@@ -4750,7 +4710,7 @@ var LinkRow = ({ linkName, url, index }) => {
|
|
|
4750
4710
|
}
|
|
4751
4711
|
}
|
|
4752
4712
|
),
|
|
4753
|
-
linkErrors?.[index]?.link && /* @__PURE__ */
|
|
4713
|
+
linkErrors?.[index]?.link && /* @__PURE__ */ jsx32("div", { className: "text-red-500", children: linkErrors?.[index]?.link?.message })
|
|
4754
4714
|
] })
|
|
4755
4715
|
] });
|
|
4756
4716
|
};
|
|
@@ -4765,8 +4725,8 @@ var PartnerRow = ({ partnerName, url, index }) => {
|
|
|
4765
4725
|
const partnerErrors = errors?.partners;
|
|
4766
4726
|
return /* @__PURE__ */ jsxs25("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
4767
4727
|
/* @__PURE__ */ jsxs25("div", { className: "flex flex-col min-w-96", children: [
|
|
4768
|
-
/* @__PURE__ */
|
|
4769
|
-
/* @__PURE__ */
|
|
4728
|
+
/* @__PURE__ */ jsx32("div", { className: "text-xs text-zinc-500 max-md:max-w-full", children: "Partner name" }),
|
|
4729
|
+
/* @__PURE__ */ jsx32(
|
|
4770
4730
|
DesignInput4,
|
|
4771
4731
|
{
|
|
4772
4732
|
...register(`partners.${index}.name`),
|
|
@@ -4777,7 +4737,7 @@ var PartnerRow = ({ partnerName, url, index }) => {
|
|
|
4777
4737
|
}
|
|
4778
4738
|
}
|
|
4779
4739
|
),
|
|
4780
|
-
/* @__PURE__ */
|
|
4740
|
+
/* @__PURE__ */ jsx32(
|
|
4781
4741
|
"input",
|
|
4782
4742
|
{
|
|
4783
4743
|
type: "hidden",
|
|
@@ -4785,11 +4745,11 @@ var PartnerRow = ({ partnerName, url, index }) => {
|
|
|
4785
4745
|
value: index
|
|
4786
4746
|
}
|
|
4787
4747
|
),
|
|
4788
|
-
partnerErrors?.[index]?.name && /* @__PURE__ */
|
|
4748
|
+
partnerErrors?.[index]?.name && /* @__PURE__ */ jsx32("div", { className: "text-red-500", children: partnerErrors?.[index]?.name?.message })
|
|
4789
4749
|
] }),
|
|
4790
4750
|
/* @__PURE__ */ jsxs25("div", { className: "flex flex-col min-w-96", children: [
|
|
4791
|
-
/* @__PURE__ */
|
|
4792
|
-
/* @__PURE__ */
|
|
4751
|
+
/* @__PURE__ */ jsx32("div", { className: "text-xs text-zinc-500 max-md:max-w-full", children: "URL" }),
|
|
4752
|
+
/* @__PURE__ */ jsx32(
|
|
4793
4753
|
DesignInput4,
|
|
4794
4754
|
{
|
|
4795
4755
|
...register(`partners.${index}.link`),
|
|
@@ -4801,7 +4761,7 @@ var PartnerRow = ({ partnerName, url, index }) => {
|
|
|
4801
4761
|
}
|
|
4802
4762
|
}
|
|
4803
4763
|
),
|
|
4804
|
-
partnerErrors?.[index]?.link && /* @__PURE__ */
|
|
4764
|
+
partnerErrors?.[index]?.link && /* @__PURE__ */ jsx32("div", { className: "text-red-500", children: partnerErrors?.[index]?.link?.message })
|
|
4805
4765
|
] })
|
|
4806
4766
|
] });
|
|
4807
4767
|
};
|
|
@@ -4923,7 +4883,7 @@ var FarmerClusterLinkPartner = () => {
|
|
|
4923
4883
|
});
|
|
4924
4884
|
}, [isLoading]);
|
|
4925
4885
|
if (isLoading) {
|
|
4926
|
-
return /* @__PURE__ */
|
|
4886
|
+
return /* @__PURE__ */ jsx32("div", { children: "Loading..." });
|
|
4927
4887
|
}
|
|
4928
4888
|
return /* @__PURE__ */ jsxs25(FormProvider4, { ...methods, children: [
|
|
4929
4889
|
/* @__PURE__ */ jsxs25(
|
|
@@ -4933,7 +4893,7 @@ var FarmerClusterLinkPartner = () => {
|
|
|
4933
4893
|
onSubmit: methods.handleSubmit(onSubmit),
|
|
4934
4894
|
children: [
|
|
4935
4895
|
/* @__PURE__ */ jsxs25("div", { className: "right-6 top-6 flex gap-2 absolute", children: [
|
|
4936
|
-
/* @__PURE__ */
|
|
4896
|
+
/* @__PURE__ */ jsx32(
|
|
4937
4897
|
DesignButton16,
|
|
4938
4898
|
{
|
|
4939
4899
|
type: "button",
|
|
@@ -4943,10 +4903,10 @@ var FarmerClusterLinkPartner = () => {
|
|
|
4943
4903
|
children: "Cancel"
|
|
4944
4904
|
}
|
|
4945
4905
|
),
|
|
4946
|
-
/* @__PURE__ */
|
|
4906
|
+
/* @__PURE__ */ jsx32(DesignButton16, { type: "submit", size: "sm", children: "Save" })
|
|
4947
4907
|
] }),
|
|
4948
4908
|
/* @__PURE__ */ jsxs25("div", { className: "flex flex-col p-6 bg-white rounded-xl max-w-[936px] max-md:px-5", children: [
|
|
4949
|
-
/* @__PURE__ */
|
|
4909
|
+
/* @__PURE__ */ jsx32(
|
|
4950
4910
|
SectionHeader,
|
|
4951
4911
|
{
|
|
4952
4912
|
title: "Links",
|
|
@@ -4955,8 +4915,8 @@ var FarmerClusterLinkPartner = () => {
|
|
|
4955
4915
|
}
|
|
4956
4916
|
),
|
|
4957
4917
|
/* @__PURE__ */ jsxs25("main", { children: [
|
|
4958
|
-
/* @__PURE__ */
|
|
4959
|
-
/* @__PURE__ */
|
|
4918
|
+
/* @__PURE__ */ jsx32("div", { className: "space-y-4", children: linkFields.map((field, index) => /* @__PURE__ */ jsx32("div", { children: /* @__PURE__ */ jsxs25("section", { className: "space-y-4", children: [
|
|
4919
|
+
/* @__PURE__ */ jsx32(
|
|
4960
4920
|
LinkRow,
|
|
4961
4921
|
{
|
|
4962
4922
|
linkName: field.name,
|
|
@@ -4964,7 +4924,7 @@ var FarmerClusterLinkPartner = () => {
|
|
|
4964
4924
|
index
|
|
4965
4925
|
}
|
|
4966
4926
|
),
|
|
4967
|
-
/* @__PURE__ */
|
|
4927
|
+
/* @__PURE__ */ jsx32(
|
|
4968
4928
|
DesignButton16,
|
|
4969
4929
|
{
|
|
4970
4930
|
variant: "outlineGrey",
|
|
@@ -4977,7 +4937,7 @@ var FarmerClusterLinkPartner = () => {
|
|
|
4977
4937
|
}
|
|
4978
4938
|
)
|
|
4979
4939
|
] }) }, index)) }),
|
|
4980
|
-
/* @__PURE__ */
|
|
4940
|
+
/* @__PURE__ */ jsx32(
|
|
4981
4941
|
DesignButton16,
|
|
4982
4942
|
{
|
|
4983
4943
|
size: "sm",
|
|
@@ -4989,7 +4949,7 @@ var FarmerClusterLinkPartner = () => {
|
|
|
4989
4949
|
}
|
|
4990
4950
|
),
|
|
4991
4951
|
/* @__PURE__ */ jsxs25("section", { className: "mt-10", children: [
|
|
4992
|
-
/* @__PURE__ */
|
|
4952
|
+
/* @__PURE__ */ jsx32(
|
|
4993
4953
|
SectionHeader,
|
|
4994
4954
|
{
|
|
4995
4955
|
title: "Partners",
|
|
@@ -4997,8 +4957,8 @@ var FarmerClusterLinkPartner = () => {
|
|
|
4997
4957
|
info: "Does your Farmer Cluster work and collaborate with local or national partners? You can list and add links to your collaborators, friends and partner organisations on your Farmer Cluster profile."
|
|
4998
4958
|
}
|
|
4999
4959
|
),
|
|
5000
|
-
/* @__PURE__ */
|
|
5001
|
-
/* @__PURE__ */
|
|
4960
|
+
/* @__PURE__ */ jsx32("div", { className: "space-y-4", children: partnerFields.map((field, index) => /* @__PURE__ */ jsx32("div", { children: /* @__PURE__ */ jsxs25("section", { className: "space-y-4", children: [
|
|
4961
|
+
/* @__PURE__ */ jsx32(
|
|
5002
4962
|
PartnerRow,
|
|
5003
4963
|
{
|
|
5004
4964
|
partnerName: field.name,
|
|
@@ -5006,7 +4966,7 @@ var FarmerClusterLinkPartner = () => {
|
|
|
5006
4966
|
index
|
|
5007
4967
|
}
|
|
5008
4968
|
),
|
|
5009
|
-
/* @__PURE__ */
|
|
4969
|
+
/* @__PURE__ */ jsx32(
|
|
5010
4970
|
DesignButton16,
|
|
5011
4971
|
{
|
|
5012
4972
|
variant: "outlineGrey",
|
|
@@ -5019,7 +4979,7 @@ var FarmerClusterLinkPartner = () => {
|
|
|
5019
4979
|
}
|
|
5020
4980
|
)
|
|
5021
4981
|
] }) }, index)) }),
|
|
5022
|
-
/* @__PURE__ */
|
|
4982
|
+
/* @__PURE__ */ jsx32(
|
|
5023
4983
|
DesignButton16,
|
|
5024
4984
|
{
|
|
5025
4985
|
size: "sm",
|
|
@@ -5036,7 +4996,7 @@ var FarmerClusterLinkPartner = () => {
|
|
|
5036
4996
|
]
|
|
5037
4997
|
}
|
|
5038
4998
|
),
|
|
5039
|
-
/* @__PURE__ */
|
|
4999
|
+
/* @__PURE__ */ jsx32(
|
|
5040
5000
|
FarmerClusterPopup,
|
|
5041
5001
|
{
|
|
5042
5002
|
title: "Your changes have been saved",
|
|
@@ -5046,14 +5006,14 @@ var FarmerClusterLinkPartner = () => {
|
|
|
5046
5006
|
setOpen: setSavedPopupOpen
|
|
5047
5007
|
}
|
|
5048
5008
|
),
|
|
5049
|
-
/* @__PURE__ */
|
|
5009
|
+
/* @__PURE__ */ jsx32(CancelPopup, { open: isCancelPopupOpen, setOpen: setCancelPopupOpen })
|
|
5050
5010
|
] });
|
|
5051
5011
|
};
|
|
5052
5012
|
|
|
5053
5013
|
// src/components/FarmerCluster/FarmerClusterCreate.tsx
|
|
5054
5014
|
import { useEffect as useEffect5, useRef as useRef3, useState as useState17 } from "react";
|
|
5055
5015
|
import { FormProvider as FormProvider5, useForm as useForm8 } from "react-hook-form";
|
|
5056
|
-
import dynamic4 from "
|
|
5016
|
+
import { dynamic as dynamic4 } from "@geowiki/core";
|
|
5057
5017
|
import Swal7 from "sweetalert2";
|
|
5058
5018
|
import {
|
|
5059
5019
|
Calendar as Calendar2,
|
|
@@ -5073,7 +5033,7 @@ import {
|
|
|
5073
5033
|
PopoverTrigger as PopoverTrigger2,
|
|
5074
5034
|
RadioGroup as RadioGroup2,
|
|
5075
5035
|
RadioGroupItem as RadioGroupItem2,
|
|
5076
|
-
cn as
|
|
5036
|
+
cn as cn2
|
|
5077
5037
|
} from "@geowiki/ui";
|
|
5078
5038
|
import { useCountries as useCountries3 } from "@geowiki/core";
|
|
5079
5039
|
import { useConfigSettings as useConfigSettings6 } from "@geowiki/core";
|
|
@@ -5081,14 +5041,60 @@ import {
|
|
|
5081
5041
|
ClusterService as ClusterService11
|
|
5082
5042
|
} from "@geowiki/api-proxy";
|
|
5083
5043
|
import { LoaderFull as LoaderFull13 } from "@geowiki/ui";
|
|
5084
|
-
import { useRouter as useRouter10 } from "
|
|
5044
|
+
import { useRouter as useRouter10 } from "@geowiki/core";
|
|
5085
5045
|
import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
|
|
5086
5046
|
import { format as format2 } from "date-fns";
|
|
5087
5047
|
import { useDropzone as useDropzone5 } from "react-dropzone";
|
|
5088
|
-
import { jsx as
|
|
5089
|
-
var MapWithNoSSR2 = dynamic4(() => import("./cluster-map-
|
|
5048
|
+
import { jsx as jsx33, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5049
|
+
var MapWithNoSSR2 = dynamic4(() => import("./cluster-map-D24GOWM4.mjs"), {
|
|
5090
5050
|
ssr: false
|
|
5091
5051
|
});
|
|
5052
|
+
var CoverImageDropzone = ({ field, onFileSelected }) => {
|
|
5053
|
+
const coverImageDropzone = useDropzone5({
|
|
5054
|
+
accept: {
|
|
5055
|
+
"image/jpeg": [".jpeg", ".png"]
|
|
5056
|
+
},
|
|
5057
|
+
maxFiles: 1,
|
|
5058
|
+
multiple: false,
|
|
5059
|
+
onDrop: (acceptedFiles) => {
|
|
5060
|
+
const selectedFile = acceptedFiles[0];
|
|
5061
|
+
onFileSelected(selectedFile);
|
|
5062
|
+
field.onChange(selectedFile);
|
|
5063
|
+
}
|
|
5064
|
+
});
|
|
5065
|
+
return /* @__PURE__ */ jsx33("div", { className: "mt-1 sm:mt-0 sm:col-span-2 pt-6", children: /* @__PURE__ */ jsx33("div", { className: "w-[70%] py-12 pb-14 flex justify-center px-6 border-2 border-grey-light border-dashed rounded-md", children: /* @__PURE__ */ jsxs26("div", { ...coverImageDropzone.getRootProps(), children: [
|
|
5066
|
+
/* @__PURE__ */ jsx33("input", { ...coverImageDropzone.getInputProps({}) }),
|
|
5067
|
+
/* @__PURE__ */ jsxs26("div", { className: "w-full text-center flex-col flex items-center", children: [
|
|
5068
|
+
/* @__PURE__ */ jsx33("div", { className: "w-16 h-16 bg-accent-primary flex items-center justify-center rounded-full", children: /* @__PURE__ */ jsx33(
|
|
5069
|
+
"svg",
|
|
5070
|
+
{
|
|
5071
|
+
width: "32",
|
|
5072
|
+
height: "32",
|
|
5073
|
+
viewBox: "0 0 32 32",
|
|
5074
|
+
fill: "none",
|
|
5075
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5076
|
+
className: " fill-primary",
|
|
5077
|
+
children: /* @__PURE__ */ jsx33("path", { d: "M19.667 8V5L25.667 11H22.667C20.5603 11 19.667 10.1067 19.667 8ZM22.667 13C19.4403 13 17.667 11.2267 17.667 8V4H10.667C8.00033 4 6.66699 5.33333 6.66699 8V24C6.66699 26.6667 8.00033 28 10.667 28H22.667C25.3337 28 26.667 26.6667 26.667 24V13H22.667Z" })
|
|
5078
|
+
}
|
|
5079
|
+
) }),
|
|
5080
|
+
/* @__PURE__ */ jsxs26("div", { className: "pt-6 flex justify-center", children: [
|
|
5081
|
+
/* @__PURE__ */ jsx33("p", { className: "pr-1 text-lg font-normal", children: "Drop your files here or" }),
|
|
5082
|
+
/* @__PURE__ */ jsx33(
|
|
5083
|
+
"label",
|
|
5084
|
+
{
|
|
5085
|
+
htmlFor: "file-upload",
|
|
5086
|
+
className: "relative cursor-pointer rounded-md font-medium text-primary hover:text-primary-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-primary-500",
|
|
5087
|
+
children: /* @__PURE__ */ jsxs26("span", { className: "text-lg font-semibold", children: [
|
|
5088
|
+
" ",
|
|
5089
|
+
"browse"
|
|
5090
|
+
] })
|
|
5091
|
+
}
|
|
5092
|
+
)
|
|
5093
|
+
] }),
|
|
5094
|
+
/* @__PURE__ */ jsx33("p", { className: "text-sm font-normal text-grey pt-2", children: "PNG, JPG, GIF up to 10MB. Landscape mode, recommended size 1920x1080px." })
|
|
5095
|
+
] })
|
|
5096
|
+
] }) }) });
|
|
5097
|
+
};
|
|
5092
5098
|
var FarmerClusterCreate = () => {
|
|
5093
5099
|
const [openSevedPopup, setOpenSevedPopup] = useState17(false);
|
|
5094
5100
|
const [selectedFileUrl, setSelectedFileUrl] = useState17(null);
|
|
@@ -5194,12 +5200,11 @@ var FarmerClusterCreate = () => {
|
|
|
5194
5200
|
Swal7.fire("Cluster creation failed", "error");
|
|
5195
5201
|
}
|
|
5196
5202
|
};
|
|
5197
|
-
if (IsConfigSettingsLoaded || isCountryLoading)
|
|
5198
|
-
return /* @__PURE__ */ jsx34(LoaderFull13, {});
|
|
5203
|
+
if (IsConfigSettingsLoaded || isCountryLoading) return /* @__PURE__ */ jsx33(LoaderFull13, {});
|
|
5199
5204
|
return /* @__PURE__ */ jsxs26("div", { className: "relative bg-white rounded-xl", children: [
|
|
5200
|
-
/* @__PURE__ */
|
|
5205
|
+
/* @__PURE__ */ jsx33(FormProvider5, { ...methods, children: /* @__PURE__ */ jsxs26("form", { className: "space-y-8 py-8 px-6", onSubmit: handleSubmit(onSubmit), children: [
|
|
5201
5206
|
/* @__PURE__ */ jsxs26("div", { children: [
|
|
5202
|
-
/* @__PURE__ */
|
|
5207
|
+
/* @__PURE__ */ jsx33(
|
|
5203
5208
|
SectionHeader,
|
|
5204
5209
|
{
|
|
5205
5210
|
title: "Farmer Cluster details",
|
|
@@ -5207,7 +5212,7 @@ var FarmerClusterCreate = () => {
|
|
|
5207
5212
|
}
|
|
5208
5213
|
),
|
|
5209
5214
|
/* @__PURE__ */ jsxs26("div", { className: "right-6 top-6 flex gap-2 absolute", children: [
|
|
5210
|
-
/* @__PURE__ */
|
|
5215
|
+
/* @__PURE__ */ jsx33(
|
|
5211
5216
|
DesignButton17,
|
|
5212
5217
|
{
|
|
5213
5218
|
type: "button",
|
|
@@ -5217,18 +5222,18 @@ var FarmerClusterCreate = () => {
|
|
|
5217
5222
|
children: "Cancel"
|
|
5218
5223
|
}
|
|
5219
5224
|
),
|
|
5220
|
-
/* @__PURE__ */
|
|
5225
|
+
/* @__PURE__ */ jsx33(DesignButton17, { type: "submit", size: "sm", children: "Save" })
|
|
5221
5226
|
] })
|
|
5222
5227
|
] }),
|
|
5223
5228
|
/* @__PURE__ */ jsxs26("div", { children: [
|
|
5224
5229
|
/* @__PURE__ */ jsxs26("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-x-4 gap-y-8", children: [
|
|
5225
5230
|
/* @__PURE__ */ jsxs26("div", { children: [
|
|
5226
|
-
/* @__PURE__ */
|
|
5231
|
+
/* @__PURE__ */ jsx33(
|
|
5227
5232
|
FormField5,
|
|
5228
5233
|
{
|
|
5229
5234
|
control,
|
|
5230
5235
|
name: "name",
|
|
5231
|
-
render: ({ field }) => /* @__PURE__ */
|
|
5236
|
+
render: ({ field }) => /* @__PURE__ */ jsx33(
|
|
5232
5237
|
DesignInput5,
|
|
5233
5238
|
{
|
|
5234
5239
|
...field,
|
|
@@ -5237,21 +5242,21 @@ var FarmerClusterCreate = () => {
|
|
|
5237
5242
|
)
|
|
5238
5243
|
}
|
|
5239
5244
|
),
|
|
5240
|
-
errors.name && /* @__PURE__ */
|
|
5245
|
+
errors.name && /* @__PURE__ */ jsx33("span", { className: "text-red-500", children: errors.name.message })
|
|
5241
5246
|
] }),
|
|
5242
5247
|
/* @__PURE__ */ jsxs26("div", { children: [
|
|
5243
|
-
/* @__PURE__ */
|
|
5248
|
+
/* @__PURE__ */ jsx33(
|
|
5244
5249
|
FormField5,
|
|
5245
5250
|
{
|
|
5246
5251
|
control,
|
|
5247
5252
|
name: "email",
|
|
5248
|
-
render: ({ field }) => /* @__PURE__ */
|
|
5253
|
+
render: ({ field }) => /* @__PURE__ */ jsx33(DesignInput5, { ...field, placeholder: "Contact Email*" })
|
|
5249
5254
|
}
|
|
5250
5255
|
),
|
|
5251
|
-
errors.email && /* @__PURE__ */
|
|
5256
|
+
errors.email && /* @__PURE__ */ jsx33("span", { className: "text-red-500", children: errors.email.message })
|
|
5252
5257
|
] }),
|
|
5253
5258
|
/* @__PURE__ */ jsxs26("div", { children: [
|
|
5254
|
-
/* @__PURE__ */
|
|
5259
|
+
/* @__PURE__ */ jsx33(
|
|
5255
5260
|
FormField5,
|
|
5256
5261
|
{
|
|
5257
5262
|
control,
|
|
@@ -5263,9 +5268,9 @@ var FarmerClusterCreate = () => {
|
|
|
5263
5268
|
onValueChange: field.onChange,
|
|
5264
5269
|
defaultValue: field.value,
|
|
5265
5270
|
children: [
|
|
5266
|
-
/* @__PURE__ */
|
|
5267
|
-
/* @__PURE__ */
|
|
5268
|
-
return /* @__PURE__ */
|
|
5271
|
+
/* @__PURE__ */ jsx33(DesignSelectTrigger4, { variant: "input", className: "pl-0", children: /* @__PURE__ */ jsx33(DesignSelectValue4, { placeholder: "Country" }) }),
|
|
5272
|
+
/* @__PURE__ */ jsx33(DesignSelectContent4, { children: /* @__PURE__ */ jsx33(DesignSelectGroup4, { children: countries?.map((country) => {
|
|
5273
|
+
return /* @__PURE__ */ jsx33(
|
|
5269
5274
|
DesignSelectItem4,
|
|
5270
5275
|
{
|
|
5271
5276
|
value: country.id,
|
|
@@ -5280,10 +5285,10 @@ var FarmerClusterCreate = () => {
|
|
|
5280
5285
|
}
|
|
5281
5286
|
}
|
|
5282
5287
|
),
|
|
5283
|
-
errors.countryId && /* @__PURE__ */
|
|
5288
|
+
errors.countryId && /* @__PURE__ */ jsx33("span", { className: "text-red-500", children: errors.countryId.message })
|
|
5284
5289
|
] }),
|
|
5285
5290
|
/* @__PURE__ */ jsxs26("div", { children: [
|
|
5286
|
-
/* @__PURE__ */
|
|
5291
|
+
/* @__PURE__ */ jsx33(
|
|
5287
5292
|
FormField5,
|
|
5288
5293
|
{
|
|
5289
5294
|
control,
|
|
@@ -5294,10 +5299,10 @@ var FarmerClusterCreate = () => {
|
|
|
5294
5299
|
onValueChange: field.onChange,
|
|
5295
5300
|
defaultValue: field.value,
|
|
5296
5301
|
children: [
|
|
5297
|
-
/* @__PURE__ */
|
|
5298
|
-
/* @__PURE__ */
|
|
5302
|
+
/* @__PURE__ */ jsx33(DesignSelectTrigger4, { variant: "input", className: "pl-0", children: /* @__PURE__ */ jsx33(DesignSelectValue4, { placeholder: "Activity Status" }) }),
|
|
5303
|
+
/* @__PURE__ */ jsx33(DesignSelectContent4, { children: /* @__PURE__ */ jsx33(DesignSelectGroup4, { children: ConfigSettings?.ActivityStatus?.ContentItems?.map(
|
|
5299
5304
|
(activity) => {
|
|
5300
|
-
return /* @__PURE__ */
|
|
5305
|
+
return /* @__PURE__ */ jsx33(
|
|
5301
5306
|
DesignSelectItem4,
|
|
5302
5307
|
{
|
|
5303
5308
|
value: activity.KeyValueItem?.Key?.Text,
|
|
@@ -5312,10 +5317,10 @@ var FarmerClusterCreate = () => {
|
|
|
5312
5317
|
)
|
|
5313
5318
|
}
|
|
5314
5319
|
),
|
|
5315
|
-
errors.activityStatus && /* @__PURE__ */
|
|
5320
|
+
errors.activityStatus && /* @__PURE__ */ jsx33("span", { className: "text-red-500", children: errors.activityStatus.message })
|
|
5316
5321
|
] }),
|
|
5317
5322
|
/* @__PURE__ */ jsxs26("div", { children: [
|
|
5318
|
-
/* @__PURE__ */
|
|
5323
|
+
/* @__PURE__ */ jsx33(
|
|
5319
5324
|
FormField5,
|
|
5320
5325
|
{
|
|
5321
5326
|
control,
|
|
@@ -5323,17 +5328,17 @@ var FarmerClusterCreate = () => {
|
|
|
5323
5328
|
render: ({ field }) => {
|
|
5324
5329
|
var value = field.value && field.value.toString() !== "Invalid Date" ? new Date(field.value) : null;
|
|
5325
5330
|
return /* @__PURE__ */ jsxs26(Popover2, { children: [
|
|
5326
|
-
/* @__PURE__ */
|
|
5331
|
+
/* @__PURE__ */ jsx33(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx33(FormControl5, { children: /* @__PURE__ */ jsx33(
|
|
5327
5332
|
"button",
|
|
5328
5333
|
{
|
|
5329
|
-
className:
|
|
5334
|
+
className: cn2(
|
|
5330
5335
|
"w-full pt-1.5 pb-[5px] text-start bordered-0 text-sm lg:text-base bg-transparent border-0 border-b border-zinc-300 focus-within:border-b-2 focus-within:pb-[4px] focus-within:border-primary focus:ring-0 focus:outline-none",
|
|
5331
5336
|
!value && "text-muted-foreground"
|
|
5332
5337
|
),
|
|
5333
|
-
children: value ? format2(value, "PPP") : /* @__PURE__ */
|
|
5338
|
+
children: value ? format2(value, "PPP") : /* @__PURE__ */ jsx33("span", { children: "Cluster creation date" })
|
|
5334
5339
|
}
|
|
5335
5340
|
) }) }),
|
|
5336
|
-
/* @__PURE__ */
|
|
5341
|
+
/* @__PURE__ */ jsx33(PopoverContent2, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx33(
|
|
5337
5342
|
Calendar2,
|
|
5338
5343
|
{
|
|
5339
5344
|
mode: "single",
|
|
@@ -5347,15 +5352,15 @@ var FarmerClusterCreate = () => {
|
|
|
5347
5352
|
}
|
|
5348
5353
|
}
|
|
5349
5354
|
),
|
|
5350
|
-
errors.dateEstablished && /* @__PURE__ */
|
|
5355
|
+
errors.dateEstablished && /* @__PURE__ */ jsx33("span", { className: "text-red-500", children: errors.dateEstablished.message })
|
|
5351
5356
|
] }),
|
|
5352
5357
|
/* @__PURE__ */ jsxs26("div", { children: [
|
|
5353
|
-
/* @__PURE__ */
|
|
5358
|
+
/* @__PURE__ */ jsx33(
|
|
5354
5359
|
FormField5,
|
|
5355
5360
|
{
|
|
5356
5361
|
control,
|
|
5357
5362
|
name: "noOfFarms",
|
|
5358
|
-
render: ({ field }) => /* @__PURE__ */
|
|
5363
|
+
render: ({ field }) => /* @__PURE__ */ jsx33(
|
|
5359
5364
|
DesignInput5,
|
|
5360
5365
|
{
|
|
5361
5366
|
...field,
|
|
@@ -5365,15 +5370,15 @@ var FarmerClusterCreate = () => {
|
|
|
5365
5370
|
)
|
|
5366
5371
|
}
|
|
5367
5372
|
),
|
|
5368
|
-
errors.noOfFarms && /* @__PURE__ */
|
|
5373
|
+
errors.noOfFarms && /* @__PURE__ */ jsx33("span", { className: "text-red-500", children: errors.noOfFarms.message })
|
|
5369
5374
|
] }),
|
|
5370
5375
|
/* @__PURE__ */ jsxs26("div", { children: [
|
|
5371
|
-
/* @__PURE__ */
|
|
5376
|
+
/* @__PURE__ */ jsx33(
|
|
5372
5377
|
FormField5,
|
|
5373
5378
|
{
|
|
5374
5379
|
control,
|
|
5375
5380
|
name: "totalArea",
|
|
5376
|
-
render: ({ field }) => /* @__PURE__ */
|
|
5381
|
+
render: ({ field }) => /* @__PURE__ */ jsx33(
|
|
5377
5382
|
DesignInput5,
|
|
5378
5383
|
{
|
|
5379
5384
|
...field,
|
|
@@ -5383,15 +5388,15 @@ var FarmerClusterCreate = () => {
|
|
|
5383
5388
|
)
|
|
5384
5389
|
}
|
|
5385
5390
|
),
|
|
5386
|
-
errors.totalArea && /* @__PURE__ */
|
|
5391
|
+
errors.totalArea && /* @__PURE__ */ jsx33("span", { className: "text-red-500", children: errors.totalArea.message })
|
|
5387
5392
|
] }),
|
|
5388
5393
|
/* @__PURE__ */ jsxs26("div", { children: [
|
|
5389
|
-
/* @__PURE__ */
|
|
5394
|
+
/* @__PURE__ */ jsx33(
|
|
5390
5395
|
FormField5,
|
|
5391
5396
|
{
|
|
5392
5397
|
control,
|
|
5393
5398
|
name: "videoUrl",
|
|
5394
|
-
render: ({ field }) => /* @__PURE__ */
|
|
5399
|
+
render: ({ field }) => /* @__PURE__ */ jsx33(
|
|
5395
5400
|
DesignInput5,
|
|
5396
5401
|
{
|
|
5397
5402
|
...field,
|
|
@@ -5401,18 +5406,18 @@ var FarmerClusterCreate = () => {
|
|
|
5401
5406
|
)
|
|
5402
5407
|
}
|
|
5403
5408
|
),
|
|
5404
|
-
errors.videoUrl && /* @__PURE__ */
|
|
5409
|
+
errors.videoUrl && /* @__PURE__ */ jsx33("span", { className: "text-red-500", children: errors.videoUrl.message })
|
|
5405
5410
|
] })
|
|
5406
5411
|
] }),
|
|
5407
5412
|
/* @__PURE__ */ jsxs26("div", { className: "pt-12", children: [
|
|
5408
|
-
/* @__PURE__ */
|
|
5413
|
+
/* @__PURE__ */ jsx33(
|
|
5409
5414
|
SectionHeader,
|
|
5410
5415
|
{
|
|
5411
5416
|
title: "Contact Button",
|
|
5412
5417
|
subTitle: "Would you like to be reachable? If you enable <em>Show contact button</em> interested people can send you a message via Recodo."
|
|
5413
5418
|
}
|
|
5414
5419
|
),
|
|
5415
|
-
/* @__PURE__ */
|
|
5420
|
+
/* @__PURE__ */ jsx33(
|
|
5416
5421
|
RadioGroup2,
|
|
5417
5422
|
{
|
|
5418
5423
|
orientation: "horizontal",
|
|
@@ -5421,7 +5426,7 @@ var FarmerClusterCreate = () => {
|
|
|
5421
5426
|
required: true,
|
|
5422
5427
|
children: /* @__PURE__ */ jsxs26("div", { className: "pt-4 flex flex-row gap-x-6", children: [
|
|
5423
5428
|
/* @__PURE__ */ jsxs26("div", { className: "flex items-center space-x-2", children: [
|
|
5424
|
-
/* @__PURE__ */
|
|
5429
|
+
/* @__PURE__ */ jsx33(
|
|
5425
5430
|
RadioGroupItem2,
|
|
5426
5431
|
{
|
|
5427
5432
|
className: "h-5 w-5",
|
|
@@ -5429,10 +5434,10 @@ var FarmerClusterCreate = () => {
|
|
|
5429
5434
|
id: "r1"
|
|
5430
5435
|
}
|
|
5431
5436
|
),
|
|
5432
|
-
/* @__PURE__ */
|
|
5437
|
+
/* @__PURE__ */ jsx33(Label2, { htmlFor: "r1", children: "Show contact button" })
|
|
5433
5438
|
] }),
|
|
5434
5439
|
/* @__PURE__ */ jsxs26("div", { className: "flex items-center space-x-2", children: [
|
|
5435
|
-
/* @__PURE__ */
|
|
5440
|
+
/* @__PURE__ */ jsx33(
|
|
5436
5441
|
RadioGroupItem2,
|
|
5437
5442
|
{
|
|
5438
5443
|
className: "h-5 w-5",
|
|
@@ -5440,15 +5445,15 @@ var FarmerClusterCreate = () => {
|
|
|
5440
5445
|
id: "r2"
|
|
5441
5446
|
}
|
|
5442
5447
|
),
|
|
5443
|
-
/* @__PURE__ */
|
|
5448
|
+
/* @__PURE__ */ jsx33(Label2, { htmlFor: "r2", children: "Hide contact button" })
|
|
5444
5449
|
] })
|
|
5445
5450
|
] })
|
|
5446
5451
|
}
|
|
5447
5452
|
),
|
|
5448
|
-
errors.showContact && /* @__PURE__ */
|
|
5453
|
+
errors.showContact && /* @__PURE__ */ jsx33("span", { className: "text-red-500", children: errors.showContact.message })
|
|
5449
5454
|
] }),
|
|
5450
5455
|
/* @__PURE__ */ jsxs26("div", { className: "pt-12", children: [
|
|
5451
|
-
/* @__PURE__ */
|
|
5456
|
+
/* @__PURE__ */ jsx33(
|
|
5452
5457
|
SectionHeader,
|
|
5453
5458
|
{
|
|
5454
5459
|
title: "Cover Photo",
|
|
@@ -5456,63 +5461,25 @@ var FarmerClusterCreate = () => {
|
|
|
5456
5461
|
isRequired: true
|
|
5457
5462
|
}
|
|
5458
5463
|
),
|
|
5459
|
-
/* @__PURE__ */
|
|
5464
|
+
/* @__PURE__ */ jsx33(
|
|
5460
5465
|
FormField5,
|
|
5461
5466
|
{
|
|
5462
5467
|
control,
|
|
5463
5468
|
name: "coverImage",
|
|
5464
|
-
render: ({ field }) =>
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
onDrop: (acceptedFiles) => {
|
|
5472
|
-
let selectedFile2 = acceptedFiles[0];
|
|
5473
|
-
setSelectedFile(selectedFile2);
|
|
5474
|
-
let imgURL = URL.createObjectURL(selectedFile2);
|
|
5475
|
-
setSelectedFileUrl(imgURL);
|
|
5476
|
-
field.onChange(selectedFile2);
|
|
5469
|
+
render: ({ field }) => /* @__PURE__ */ jsx33(
|
|
5470
|
+
CoverImageDropzone,
|
|
5471
|
+
{
|
|
5472
|
+
field,
|
|
5473
|
+
onFileSelected: (file) => {
|
|
5474
|
+
setSelectedFile(file);
|
|
5475
|
+
setSelectedFileUrl(URL.createObjectURL(file));
|
|
5477
5476
|
}
|
|
5478
|
-
}
|
|
5479
|
-
|
|
5480
|
-
/* @__PURE__ */ jsx34("input", { ...coverImageDropzone.getInputProps({}) }),
|
|
5481
|
-
/* @__PURE__ */ jsxs26("div", { className: "w-full text-center flex-col flex items-center", children: [
|
|
5482
|
-
/* @__PURE__ */ jsx34("div", { className: "w-16 h-16 bg-accent-primary flex items-center justify-center rounded-full", children: /* @__PURE__ */ jsx34(
|
|
5483
|
-
"svg",
|
|
5484
|
-
{
|
|
5485
|
-
width: "32",
|
|
5486
|
-
height: "32",
|
|
5487
|
-
viewBox: "0 0 32 32",
|
|
5488
|
-
fill: "none",
|
|
5489
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
5490
|
-
className: " fill-primary",
|
|
5491
|
-
children: /* @__PURE__ */ jsx34("path", { d: "M19.667 8V5L25.667 11H22.667C20.5603 11 19.667 10.1067 19.667 8ZM22.667 13C19.4403 13 17.667 11.2267 17.667 8V4H10.667C8.00033 4 6.66699 5.33333 6.66699 8V24C6.66699 26.6667 8.00033 28 10.667 28H22.667C25.3337 28 26.667 26.6667 26.667 24V13H22.667Z" })
|
|
5492
|
-
}
|
|
5493
|
-
) }),
|
|
5494
|
-
/* @__PURE__ */ jsxs26("div", { className: "pt-6 flex justify-center", children: [
|
|
5495
|
-
/* @__PURE__ */ jsx34("p", { className: "pr-1 text-lg font-normal", children: "Drop your files here or" }),
|
|
5496
|
-
/* @__PURE__ */ jsx34(
|
|
5497
|
-
"label",
|
|
5498
|
-
{
|
|
5499
|
-
htmlFor: "file-upload",
|
|
5500
|
-
className: "relative cursor-pointer rounded-md font-medium text-primary hover:text-primary-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-primary-500",
|
|
5501
|
-
children: /* @__PURE__ */ jsxs26("span", { className: "text-lg font-semibold", children: [
|
|
5502
|
-
" ",
|
|
5503
|
-
"browse"
|
|
5504
|
-
] })
|
|
5505
|
-
}
|
|
5506
|
-
)
|
|
5507
|
-
] }),
|
|
5508
|
-
/* @__PURE__ */ jsx34("p", { className: "text-sm font-normal text-grey pt-2", children: "PNG, JPG, GIF up to 10MB. Landscape mode, recommended size 1920x1080px." })
|
|
5509
|
-
] })
|
|
5510
|
-
] }) }) });
|
|
5511
|
-
}
|
|
5477
|
+
}
|
|
5478
|
+
)
|
|
5512
5479
|
}
|
|
5513
5480
|
),
|
|
5514
|
-
errors.coverImage && typeof errors.coverImage.message === "string" && /* @__PURE__ */
|
|
5515
|
-
selectedFileUrl ? /* @__PURE__ */
|
|
5481
|
+
errors.coverImage && typeof errors.coverImage.message === "string" && /* @__PURE__ */ jsx33("span", { className: "text-red-500", children: errors.coverImage.message }),
|
|
5482
|
+
selectedFileUrl ? /* @__PURE__ */ jsx33("div", { className: "pt-5", children: /* @__PURE__ */ jsx33(
|
|
5516
5483
|
"img",
|
|
5517
5484
|
{
|
|
5518
5485
|
src: selectedFileUrl,
|
|
@@ -5522,14 +5489,14 @@ var FarmerClusterCreate = () => {
|
|
|
5522
5489
|
) }) : null
|
|
5523
5490
|
] }),
|
|
5524
5491
|
/* @__PURE__ */ jsxs26("div", { className: "pt-12", children: [
|
|
5525
|
-
/* @__PURE__ */
|
|
5492
|
+
/* @__PURE__ */ jsx33(
|
|
5526
5493
|
SectionHeader,
|
|
5527
5494
|
{
|
|
5528
5495
|
title: "Location",
|
|
5529
5496
|
subTitle: "Click on the map to place a pin where the Farmer Cluster is located."
|
|
5530
5497
|
}
|
|
5531
5498
|
),
|
|
5532
|
-
/* @__PURE__ */
|
|
5499
|
+
/* @__PURE__ */ jsx33("div", { children: /* @__PURE__ */ jsx33(
|
|
5533
5500
|
"div",
|
|
5534
5501
|
{
|
|
5535
5502
|
className: "pt-6",
|
|
@@ -5538,7 +5505,7 @@ var FarmerClusterCreate = () => {
|
|
|
5538
5505
|
style: {
|
|
5539
5506
|
color: position !== null && position !== void 0 ? "black" : ""
|
|
5540
5507
|
},
|
|
5541
|
-
children: /* @__PURE__ */
|
|
5508
|
+
children: /* @__PURE__ */ jsx33(
|
|
5542
5509
|
MapWithNoSSR2,
|
|
5543
5510
|
{
|
|
5544
5511
|
...{
|
|
@@ -5555,7 +5522,7 @@ var FarmerClusterCreate = () => {
|
|
|
5555
5522
|
) })
|
|
5556
5523
|
] }),
|
|
5557
5524
|
/* @__PURE__ */ jsxs26("div", { className: "pt-12", children: [
|
|
5558
|
-
/* @__PURE__ */
|
|
5525
|
+
/* @__PURE__ */ jsx33(
|
|
5559
5526
|
SectionHeader,
|
|
5560
5527
|
{
|
|
5561
5528
|
title: "About",
|
|
@@ -5564,12 +5531,12 @@ var FarmerClusterCreate = () => {
|
|
|
5564
5531
|
),
|
|
5565
5532
|
/* @__PURE__ */ jsxs26("div", { className: "grid grid-cols-1 gap-6 pt-4", children: [
|
|
5566
5533
|
/* @__PURE__ */ jsxs26("div", { children: [
|
|
5567
|
-
/* @__PURE__ */
|
|
5534
|
+
/* @__PURE__ */ jsx33(
|
|
5568
5535
|
FormField5,
|
|
5569
5536
|
{
|
|
5570
5537
|
control,
|
|
5571
5538
|
name: "description",
|
|
5572
|
-
render: ({ field }) => /* @__PURE__ */
|
|
5539
|
+
render: ({ field }) => /* @__PURE__ */ jsx33(
|
|
5573
5540
|
"textarea",
|
|
5574
5541
|
{
|
|
5575
5542
|
...field,
|
|
@@ -5580,15 +5547,15 @@ var FarmerClusterCreate = () => {
|
|
|
5580
5547
|
)
|
|
5581
5548
|
}
|
|
5582
5549
|
),
|
|
5583
|
-
errors.description && /* @__PURE__ */
|
|
5550
|
+
errors.description && /* @__PURE__ */ jsx33("span", { className: "text-red-500", children: errors.description.message })
|
|
5584
5551
|
] }),
|
|
5585
5552
|
/* @__PURE__ */ jsxs26("div", { children: [
|
|
5586
|
-
/* @__PURE__ */
|
|
5553
|
+
/* @__PURE__ */ jsx33(
|
|
5587
5554
|
FormField5,
|
|
5588
5555
|
{
|
|
5589
5556
|
control,
|
|
5590
5557
|
name: "outcomes",
|
|
5591
|
-
render: ({ field }) => /* @__PURE__ */
|
|
5558
|
+
render: ({ field }) => /* @__PURE__ */ jsx33(
|
|
5592
5559
|
"textarea",
|
|
5593
5560
|
{
|
|
5594
5561
|
...field,
|
|
@@ -5599,15 +5566,15 @@ var FarmerClusterCreate = () => {
|
|
|
5599
5566
|
)
|
|
5600
5567
|
}
|
|
5601
5568
|
),
|
|
5602
|
-
errors.outcomes && /* @__PURE__ */
|
|
5569
|
+
errors.outcomes && /* @__PURE__ */ jsx33("span", { className: "text-red-500", children: errors.outcomes.message })
|
|
5603
5570
|
] }),
|
|
5604
5571
|
/* @__PURE__ */ jsxs26("div", { children: [
|
|
5605
|
-
/* @__PURE__ */
|
|
5572
|
+
/* @__PURE__ */ jsx33(
|
|
5606
5573
|
FormField5,
|
|
5607
5574
|
{
|
|
5608
5575
|
control,
|
|
5609
5576
|
name: "bioDiversityEnhancingMeasures",
|
|
5610
|
-
render: ({ field }) => /* @__PURE__ */
|
|
5577
|
+
render: ({ field }) => /* @__PURE__ */ jsx33(
|
|
5611
5578
|
"textarea",
|
|
5612
5579
|
{
|
|
5613
5580
|
...field,
|
|
@@ -5618,12 +5585,12 @@ var FarmerClusterCreate = () => {
|
|
|
5618
5585
|
)
|
|
5619
5586
|
}
|
|
5620
5587
|
),
|
|
5621
|
-
errors.bioDiversityEnhancingMeasures && /* @__PURE__ */
|
|
5588
|
+
errors.bioDiversityEnhancingMeasures && /* @__PURE__ */ jsx33("span", { className: "text-red-500", children: errors.bioDiversityEnhancingMeasures.message })
|
|
5622
5589
|
] })
|
|
5623
5590
|
] })
|
|
5624
5591
|
] }),
|
|
5625
5592
|
/* @__PURE__ */ jsxs26("div", { className: "py-12", children: [
|
|
5626
|
-
/* @__PURE__ */
|
|
5593
|
+
/* @__PURE__ */ jsx33(
|
|
5627
5594
|
SectionHeader,
|
|
5628
5595
|
{
|
|
5629
5596
|
title: "Characteristics",
|
|
@@ -5631,7 +5598,7 @@ var FarmerClusterCreate = () => {
|
|
|
5631
5598
|
}
|
|
5632
5599
|
),
|
|
5633
5600
|
/* @__PURE__ */ jsxs26("div", { className: "flex flex-col justify-start items-start gap-y-8 pt-6", children: [
|
|
5634
|
-
/* @__PURE__ */
|
|
5601
|
+
/* @__PURE__ */ jsx33("div", { children: /* @__PURE__ */ jsx33(
|
|
5635
5602
|
CharacteristicsSection,
|
|
5636
5603
|
{
|
|
5637
5604
|
title: "Farming Systems",
|
|
@@ -5639,7 +5606,7 @@ var FarmerClusterCreate = () => {
|
|
|
5639
5606
|
name: "farmingSystem"
|
|
5640
5607
|
}
|
|
5641
5608
|
) }),
|
|
5642
|
-
/* @__PURE__ */
|
|
5609
|
+
/* @__PURE__ */ jsx33("div", { children: /* @__PURE__ */ jsx33(
|
|
5643
5610
|
CharacteristicsSection,
|
|
5644
5611
|
{
|
|
5645
5612
|
title: "Main agricultural areas",
|
|
@@ -5647,7 +5614,7 @@ var FarmerClusterCreate = () => {
|
|
|
5647
5614
|
name: "mainAgriculturalAreas"
|
|
5648
5615
|
}
|
|
5649
5616
|
) }),
|
|
5650
|
-
/* @__PURE__ */
|
|
5617
|
+
/* @__PURE__ */ jsx33("div", { children: /* @__PURE__ */ jsx33(
|
|
5651
5618
|
CharacteristicsSection,
|
|
5652
5619
|
{
|
|
5653
5620
|
title: "Main crops",
|
|
@@ -5655,7 +5622,7 @@ var FarmerClusterCreate = () => {
|
|
|
5655
5622
|
name: "mainCrops"
|
|
5656
5623
|
}
|
|
5657
5624
|
) }),
|
|
5658
|
-
/* @__PURE__ */
|
|
5625
|
+
/* @__PURE__ */ jsx33("div", { children: /* @__PURE__ */ jsx33(
|
|
5659
5626
|
CharacteristicsSection,
|
|
5660
5627
|
{
|
|
5661
5628
|
title: "Livestock",
|
|
@@ -5663,7 +5630,7 @@ var FarmerClusterCreate = () => {
|
|
|
5663
5630
|
name: "liveStock"
|
|
5664
5631
|
}
|
|
5665
5632
|
) }),
|
|
5666
|
-
/* @__PURE__ */
|
|
5633
|
+
/* @__PURE__ */ jsx33("div", { children: /* @__PURE__ */ jsx33(
|
|
5667
5634
|
CharacteristicsSection,
|
|
5668
5635
|
{
|
|
5669
5636
|
title: "Other landscape elements",
|
|
@@ -5671,7 +5638,7 @@ var FarmerClusterCreate = () => {
|
|
|
5671
5638
|
name: "otherLandScapeElements"
|
|
5672
5639
|
}
|
|
5673
5640
|
) }),
|
|
5674
|
-
/* @__PURE__ */
|
|
5641
|
+
/* @__PURE__ */ jsx33("div", { children: /* @__PURE__ */ jsx33(
|
|
5675
5642
|
CharacteristicsSection,
|
|
5676
5643
|
{
|
|
5677
5644
|
title: "Hunting management",
|
|
@@ -5679,7 +5646,7 @@ var FarmerClusterCreate = () => {
|
|
|
5679
5646
|
name: "huntingManagement"
|
|
5680
5647
|
}
|
|
5681
5648
|
) }),
|
|
5682
|
-
/* @__PURE__ */
|
|
5649
|
+
/* @__PURE__ */ jsx33("div", { children: /* @__PURE__ */ jsx33(
|
|
5683
5650
|
CharacteristicsSection,
|
|
5684
5651
|
{
|
|
5685
5652
|
title: "Cluster funding",
|
|
@@ -5691,7 +5658,7 @@ var FarmerClusterCreate = () => {
|
|
|
5691
5658
|
] })
|
|
5692
5659
|
] })
|
|
5693
5660
|
] }) }),
|
|
5694
|
-
/* @__PURE__ */
|
|
5661
|
+
/* @__PURE__ */ jsx33(
|
|
5695
5662
|
FarmerClusterPopup,
|
|
5696
5663
|
{
|
|
5697
5664
|
title: "Your information is being processed",
|
|
@@ -5709,8 +5676,8 @@ import { ResourceService } from "@geowiki/api-proxy";
|
|
|
5709
5676
|
import AsyncSelect from "react-select/async";
|
|
5710
5677
|
import { customSelectInputStyles } from "@geowiki/ui/src/lib/utils";
|
|
5711
5678
|
import Select from "react-select";
|
|
5712
|
-
import { useRouter as useRouter11 } from "
|
|
5713
|
-
import { jsx as
|
|
5679
|
+
import { useRouter as useRouter11 } from "@geowiki/core";
|
|
5680
|
+
import { jsx as jsx34, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5714
5681
|
var SearchFilter = ({ filter, setFilter }) => {
|
|
5715
5682
|
const router = useRouter11();
|
|
5716
5683
|
const inputRef = React7.useRef(null);
|
|
@@ -5894,7 +5861,7 @@ var SearchFilter = ({ filter, setFilter }) => {
|
|
|
5894
5861
|
];
|
|
5895
5862
|
return /* @__PURE__ */ jsxs27("div", { children: [
|
|
5896
5863
|
/* @__PURE__ */ jsxs27("form", { className: "pt-4", onSubmit: (e) => onSearch(e), children: [
|
|
5897
|
-
/* @__PURE__ */
|
|
5864
|
+
/* @__PURE__ */ jsx34(
|
|
5898
5865
|
"label",
|
|
5899
5866
|
{
|
|
5900
5867
|
htmlFor: "default-search",
|
|
@@ -5903,7 +5870,7 @@ var SearchFilter = ({ filter, setFilter }) => {
|
|
|
5903
5870
|
}
|
|
5904
5871
|
),
|
|
5905
5872
|
/* @__PURE__ */ jsxs27("div", { className: "relative", children: [
|
|
5906
|
-
/* @__PURE__ */
|
|
5873
|
+
/* @__PURE__ */ jsx34("div", { className: "flex absolute inset-y-0 left-0 items-center pl-3 pointer-events-none", children: /* @__PURE__ */ jsx34(
|
|
5907
5874
|
"svg",
|
|
5908
5875
|
{
|
|
5909
5876
|
"aria-hidden": "true",
|
|
@@ -5912,7 +5879,7 @@ var SearchFilter = ({ filter, setFilter }) => {
|
|
|
5912
5879
|
stroke: "currentColor",
|
|
5913
5880
|
viewBox: "0 0 24 24",
|
|
5914
5881
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5915
|
-
children: /* @__PURE__ */
|
|
5882
|
+
children: /* @__PURE__ */ jsx34(
|
|
5916
5883
|
"path",
|
|
5917
5884
|
{
|
|
5918
5885
|
strokeLinecap: "round",
|
|
@@ -5923,7 +5890,7 @@ var SearchFilter = ({ filter, setFilter }) => {
|
|
|
5923
5890
|
)
|
|
5924
5891
|
}
|
|
5925
5892
|
) }),
|
|
5926
|
-
/* @__PURE__ */
|
|
5893
|
+
/* @__PURE__ */ jsx34(
|
|
5927
5894
|
"input",
|
|
5928
5895
|
{
|
|
5929
5896
|
ref: inputRef,
|
|
@@ -5935,7 +5902,7 @@ var SearchFilter = ({ filter, setFilter }) => {
|
|
|
5935
5902
|
onChange: (e) => setSearchText(e.target.value)
|
|
5936
5903
|
}
|
|
5937
5904
|
),
|
|
5938
|
-
searchText && searchText.length ? /* @__PURE__ */
|
|
5905
|
+
searchText && searchText.length ? /* @__PURE__ */ jsx34(
|
|
5939
5906
|
"div",
|
|
5940
5907
|
{
|
|
5941
5908
|
onClick: () => clearSearch(),
|
|
@@ -5943,11 +5910,11 @@ var SearchFilter = ({ filter, setFilter }) => {
|
|
|
5943
5910
|
children: "Clear"
|
|
5944
5911
|
}
|
|
5945
5912
|
) : null,
|
|
5946
|
-
/* @__PURE__ */
|
|
5913
|
+
/* @__PURE__ */ jsx34("button", { className: "text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2", children: "Search" })
|
|
5947
5914
|
] })
|
|
5948
5915
|
] }),
|
|
5949
|
-
/* @__PURE__ */
|
|
5950
|
-
/* @__PURE__ */
|
|
5916
|
+
/* @__PURE__ */ jsx34("div", { className: "w-full mt-4", children: /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsxs27("div", { className: "grid grid-cols-2 md:grid-cols-3 xl:grid-cols-5 gap-4", children: [
|
|
5917
|
+
/* @__PURE__ */ jsx34(
|
|
5951
5918
|
Select,
|
|
5952
5919
|
{
|
|
5953
5920
|
placeholder: "Most Recent",
|
|
@@ -5957,7 +5924,7 @@ var SearchFilter = ({ filter, setFilter }) => {
|
|
|
5957
5924
|
isClearable: true
|
|
5958
5925
|
}
|
|
5959
5926
|
),
|
|
5960
|
-
/* @__PURE__ */
|
|
5927
|
+
/* @__PURE__ */ jsx34(
|
|
5961
5928
|
AsyncSelect,
|
|
5962
5929
|
{
|
|
5963
5930
|
placeholder: "Language",
|
|
@@ -5970,7 +5937,7 @@ var SearchFilter = ({ filter, setFilter }) => {
|
|
|
5970
5937
|
isClearable: true
|
|
5971
5938
|
}
|
|
5972
5939
|
),
|
|
5973
|
-
/* @__PURE__ */
|
|
5940
|
+
/* @__PURE__ */ jsx34(
|
|
5974
5941
|
AsyncSelect,
|
|
5975
5942
|
{
|
|
5976
5943
|
placeholder: "Topic",
|
|
@@ -5983,7 +5950,7 @@ var SearchFilter = ({ filter, setFilter }) => {
|
|
|
5983
5950
|
isClearable: true
|
|
5984
5951
|
}
|
|
5985
5952
|
),
|
|
5986
|
-
/* @__PURE__ */
|
|
5953
|
+
/* @__PURE__ */ jsx34(
|
|
5987
5954
|
AsyncSelect,
|
|
5988
5955
|
{
|
|
5989
5956
|
placeholder: "Resource Type",
|
|
@@ -5996,7 +5963,7 @@ var SearchFilter = ({ filter, setFilter }) => {
|
|
|
5996
5963
|
isClearable: true
|
|
5997
5964
|
}
|
|
5998
5965
|
),
|
|
5999
|
-
/* @__PURE__ */
|
|
5966
|
+
/* @__PURE__ */ jsx34(
|
|
6000
5967
|
AsyncSelect,
|
|
6001
5968
|
{
|
|
6002
5969
|
placeholder: "Audience",
|
|
@@ -6027,7 +5994,7 @@ import {
|
|
|
6027
5994
|
} from "@geowiki/ui";
|
|
6028
5995
|
import { useLanguages as useLanguages2, useResourceType as useResourceType2 } from "@geowiki/core";
|
|
6029
5996
|
import { useState as useState19 } from "react";
|
|
6030
|
-
import { jsx as
|
|
5997
|
+
import { jsx as jsx35, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6031
5998
|
var ResourceItem = ({ resource }) => {
|
|
6032
5999
|
const [open, setOpen] = useState19(false);
|
|
6033
6000
|
const languages = useLanguages2();
|
|
@@ -6044,15 +6011,15 @@ var ResourceItem = ({ resource }) => {
|
|
|
6044
6011
|
onClick: () => setOpen(true),
|
|
6045
6012
|
children: [
|
|
6046
6013
|
/* @__PURE__ */ jsxs28("div", { className: "pb-6 flex items-start justify-start ", children: [
|
|
6047
|
-
/* @__PURE__ */
|
|
6048
|
-
/* @__PURE__ */
|
|
6014
|
+
/* @__PURE__ */ jsx35(ResourceIcon, { type: resource.resourceType }),
|
|
6015
|
+
/* @__PURE__ */ jsx35("div", { className: "absolute right-6 flex items-start justify-start", children: /* @__PURE__ */ jsx35("div", { className: "py-[5px] px-2.5 bg-white rounded-2xl items-center justify-center gap-1", children: /* @__PURE__ */ jsx35(Body15sb, { className: "text-primary", children: language }) }) })
|
|
6049
6016
|
] }),
|
|
6050
|
-
/* @__PURE__ */
|
|
6017
|
+
/* @__PURE__ */ jsx35(Body16sb2, { className: "text-primary", children: type?.value }),
|
|
6051
6018
|
/* @__PURE__ */ jsxs28("div", { className: "w-full pt-2 space-y-2 flex-col justify-start items-start inline-flex lg:space-y-4", children: [
|
|
6052
|
-
/* @__PURE__ */
|
|
6053
|
-
/* @__PURE__ */
|
|
6019
|
+
/* @__PURE__ */ jsx35(H6Design, { className: "w-full line-clamp-4", children: resource.title }),
|
|
6020
|
+
/* @__PURE__ */ jsx35(Body1610, { className: "line-clamp-3 lg:line-clamp-4", children: resource.description })
|
|
6054
6021
|
] }),
|
|
6055
|
-
/* @__PURE__ */
|
|
6022
|
+
/* @__PURE__ */ jsx35("div", { className: "absolute bottom-6 ", children: resource.link && /* @__PURE__ */ jsx35(
|
|
6056
6023
|
DesignButton18,
|
|
6057
6024
|
{
|
|
6058
6025
|
variant: "externalLink",
|
|
@@ -6062,16 +6029,16 @@ var ResourceItem = ({ resource }) => {
|
|
|
6062
6029
|
children: "View Resource"
|
|
6063
6030
|
}
|
|
6064
6031
|
) }),
|
|
6065
|
-
/* @__PURE__ */
|
|
6032
|
+
/* @__PURE__ */ jsx35(ResourceView_default, { resource, open, setOpen })
|
|
6066
6033
|
]
|
|
6067
6034
|
}
|
|
6068
6035
|
);
|
|
6069
6036
|
};
|
|
6070
6037
|
|
|
6071
6038
|
// src/components/Resource/ResourceCard.tsx
|
|
6072
|
-
import { jsx as
|
|
6039
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
6073
6040
|
var ResourceCard = ({ resource }) => {
|
|
6074
|
-
return /* @__PURE__ */
|
|
6041
|
+
return /* @__PURE__ */ jsx36(motion.li, { variants: itemVariants, children: /* @__PURE__ */ jsx36(ResourceItem, { resource }) }, resource.id);
|
|
6075
6042
|
};
|
|
6076
6043
|
|
|
6077
6044
|
// src/components/Resource/ResourceCreate.tsx
|
|
@@ -6086,7 +6053,7 @@ import { OldCustomInput } from "@geowiki/ui";
|
|
|
6086
6053
|
import { MultiSelect } from "@geowiki/ui";
|
|
6087
6054
|
import { MultiSelectFreeText } from "@geowiki/ui";
|
|
6088
6055
|
import { TextArea } from "@geowiki/ui";
|
|
6089
|
-
import { jsx as
|
|
6056
|
+
import { jsx as jsx37, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6090
6057
|
var ResourceCreate = ({ resource }) => {
|
|
6091
6058
|
const { data: audience } = useAudience3();
|
|
6092
6059
|
const { data: topic } = useTopic3();
|
|
@@ -6148,9 +6115,9 @@ var ResourceCreate = ({ resource }) => {
|
|
|
6148
6115
|
});
|
|
6149
6116
|
}
|
|
6150
6117
|
};
|
|
6151
|
-
return /* @__PURE__ */
|
|
6152
|
-
/* @__PURE__ */
|
|
6153
|
-
/* @__PURE__ */
|
|
6118
|
+
return /* @__PURE__ */ jsx37("div", { className: "p-4", children: /* @__PURE__ */ jsxs29("form", { className: "space-y-8 pt-4", onSubmit: handleSubmit(onSubmit), children: [
|
|
6119
|
+
/* @__PURE__ */ jsx37("div", { children: /* @__PURE__ */ jsxs29("div", { className: "flex justify-end", children: [
|
|
6120
|
+
/* @__PURE__ */ jsx37(
|
|
6154
6121
|
PrimaryButton,
|
|
6155
6122
|
{
|
|
6156
6123
|
type: "button",
|
|
@@ -6159,10 +6126,10 @@ var ResourceCreate = ({ resource }) => {
|
|
|
6159
6126
|
onClick: () => location.href = "/admin/resource"
|
|
6160
6127
|
}
|
|
6161
6128
|
),
|
|
6162
|
-
/* @__PURE__ */
|
|
6129
|
+
/* @__PURE__ */ jsx37(PrimaryButton, { type: "submit", label: "Save", style: "primary" })
|
|
6163
6130
|
] }) }),
|
|
6164
|
-
/* @__PURE__ */
|
|
6165
|
-
/* @__PURE__ */
|
|
6131
|
+
/* @__PURE__ */ jsx37("div", { children: /* @__PURE__ */ jsxs29("div", { className: "grid grid-cols-6 gap-6", children: [
|
|
6132
|
+
/* @__PURE__ */ jsx37("div", { className: "col-span-6 sm:col-span-6 ", children: /* @__PURE__ */ jsx37(
|
|
6166
6133
|
OldCustomInput,
|
|
6167
6134
|
{
|
|
6168
6135
|
name: "title",
|
|
@@ -6176,7 +6143,7 @@ var ResourceCreate = ({ resource }) => {
|
|
|
6176
6143
|
isPlaceholderItalic: true
|
|
6177
6144
|
}
|
|
6178
6145
|
) }),
|
|
6179
|
-
/* @__PURE__ */
|
|
6146
|
+
/* @__PURE__ */ jsx37("div", { className: "col-span-6", children: /* @__PURE__ */ jsx37(
|
|
6180
6147
|
TextArea,
|
|
6181
6148
|
{
|
|
6182
6149
|
infoText: "description",
|
|
@@ -6191,7 +6158,7 @@ var ResourceCreate = ({ resource }) => {
|
|
|
6191
6158
|
row: 5
|
|
6192
6159
|
}
|
|
6193
6160
|
) }),
|
|
6194
|
-
/* @__PURE__ */
|
|
6161
|
+
/* @__PURE__ */ jsx37("div", { className: "col-span-6 sm:col-span-6 lg:col-span-2", children: /* @__PURE__ */ jsx37(
|
|
6195
6162
|
OldCustomInput,
|
|
6196
6163
|
{
|
|
6197
6164
|
name: "author",
|
|
@@ -6205,7 +6172,7 @@ var ResourceCreate = ({ resource }) => {
|
|
|
6205
6172
|
type: "text"
|
|
6206
6173
|
}
|
|
6207
6174
|
) }),
|
|
6208
|
-
/* @__PURE__ */
|
|
6175
|
+
/* @__PURE__ */ jsx37("div", { className: "col-span-6 sm:col-span-6 lg:col-span-2", children: /* @__PURE__ */ jsx37(
|
|
6209
6176
|
OldCustomInput,
|
|
6210
6177
|
{
|
|
6211
6178
|
name: "link",
|
|
@@ -6219,7 +6186,7 @@ var ResourceCreate = ({ resource }) => {
|
|
|
6219
6186
|
type: "text"
|
|
6220
6187
|
}
|
|
6221
6188
|
) }),
|
|
6222
|
-
/* @__PURE__ */
|
|
6189
|
+
/* @__PURE__ */ jsx37("div", { className: "col-span-6 sm:col-span-6 lg:col-span-2", children: /* @__PURE__ */ jsx37(
|
|
6223
6190
|
OldCustomInput,
|
|
6224
6191
|
{
|
|
6225
6192
|
name: "publisher",
|
|
@@ -6233,7 +6200,7 @@ var ResourceCreate = ({ resource }) => {
|
|
|
6233
6200
|
type: "text"
|
|
6234
6201
|
}
|
|
6235
6202
|
) }),
|
|
6236
|
-
/* @__PURE__ */
|
|
6203
|
+
/* @__PURE__ */ jsx37("div", { className: "col-span-6 sm:col-span-6 lg:col-span-2", children: /* @__PURE__ */ jsx37(
|
|
6237
6204
|
OldCustomInput,
|
|
6238
6205
|
{
|
|
6239
6206
|
name: "publishedDate",
|
|
@@ -6247,7 +6214,7 @@ var ResourceCreate = ({ resource }) => {
|
|
|
6247
6214
|
type: "date"
|
|
6248
6215
|
}
|
|
6249
6216
|
) }),
|
|
6250
|
-
/* @__PURE__ */
|
|
6217
|
+
/* @__PURE__ */ jsx37("div", { className: "col-span-6 sm:col-span-6 lg:col-span-2", children: /* @__PURE__ */ jsx37(
|
|
6251
6218
|
MultiSelect,
|
|
6252
6219
|
{
|
|
6253
6220
|
name: "resourceType",
|
|
@@ -6261,7 +6228,7 @@ var ResourceCreate = ({ resource }) => {
|
|
|
6261
6228
|
displayText: "Resource Type"
|
|
6262
6229
|
}
|
|
6263
6230
|
) }),
|
|
6264
|
-
/* @__PURE__ */
|
|
6231
|
+
/* @__PURE__ */ jsx37("div", { className: "col-span-6 sm:col-span-6 lg:col-span-2", children: /* @__PURE__ */ jsx37(
|
|
6265
6232
|
MultiSelectFreeText,
|
|
6266
6233
|
{
|
|
6267
6234
|
control,
|
|
@@ -6273,7 +6240,7 @@ var ResourceCreate = ({ resource }) => {
|
|
|
6273
6240
|
displayText: "Language"
|
|
6274
6241
|
}
|
|
6275
6242
|
) }),
|
|
6276
|
-
/* @__PURE__ */
|
|
6243
|
+
/* @__PURE__ */ jsx37("div", { className: "col-span-6 sm:col-span-6 lg:col-span-2", children: /* @__PURE__ */ jsx37(
|
|
6277
6244
|
MultiSelectFreeText,
|
|
6278
6245
|
{
|
|
6279
6246
|
control,
|
|
@@ -6285,7 +6252,7 @@ var ResourceCreate = ({ resource }) => {
|
|
|
6285
6252
|
displayText: "Keyword"
|
|
6286
6253
|
}
|
|
6287
6254
|
) }),
|
|
6288
|
-
/* @__PURE__ */
|
|
6255
|
+
/* @__PURE__ */ jsx37("div", { className: "col-span-6 sm:col-span-6 lg:col-span-2", children: /* @__PURE__ */ jsx37(
|
|
6289
6256
|
MultiSelect,
|
|
6290
6257
|
{
|
|
6291
6258
|
name: "topic",
|
|
@@ -6298,7 +6265,7 @@ var ResourceCreate = ({ resource }) => {
|
|
|
6298
6265
|
displayText: "Topic"
|
|
6299
6266
|
}
|
|
6300
6267
|
) }),
|
|
6301
|
-
/* @__PURE__ */
|
|
6268
|
+
/* @__PURE__ */ jsx37("div", { className: "col-span-6 sm:col-span-6 lg:col-span-2", children: /* @__PURE__ */ jsx37(
|
|
6302
6269
|
MultiSelect,
|
|
6303
6270
|
{
|
|
6304
6271
|
name: "audience",
|
|
@@ -6316,9 +6283,9 @@ var ResourceCreate = ({ resource }) => {
|
|
|
6316
6283
|
};
|
|
6317
6284
|
|
|
6318
6285
|
// src/components/Resource/ResourceEdit.tsx
|
|
6319
|
-
import { jsx as
|
|
6286
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
6320
6287
|
var ResourceEdit = (_props) => {
|
|
6321
|
-
return /* @__PURE__ */
|
|
6288
|
+
return /* @__PURE__ */ jsx38("div", { children: "Resource Edit" });
|
|
6322
6289
|
};
|
|
6323
6290
|
|
|
6324
6291
|
// src/components/Resource/ResourceList.tsx
|
|
@@ -6328,12 +6295,12 @@ import { useResourceType as useResourceType4 } from "@geowiki/core";
|
|
|
6328
6295
|
import { useTopic as useTopic4 } from "@geowiki/core";
|
|
6329
6296
|
import { QueryNames as QueryNames8 } from "@geowiki/core";
|
|
6330
6297
|
import { useQueryClient as useQueryClient8 } from "@tanstack/react-query";
|
|
6331
|
-
import { useTheme as useTheme4 } from "
|
|
6298
|
+
import { useTheme as useTheme4 } from "@geowiki/core";
|
|
6332
6299
|
import { useState as useState20 } from "react";
|
|
6333
6300
|
import DataTable4 from "react-data-table-component";
|
|
6334
6301
|
import Swal9 from "sweetalert2";
|
|
6335
6302
|
import { DeleteButton as DeleteButton4, tableDesigntyles as tableDesigntyles3 } from "@geowiki/ui";
|
|
6336
|
-
import { jsx as
|
|
6303
|
+
import { jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6337
6304
|
var ResourceList = () => {
|
|
6338
6305
|
const { theme } = useTheme4();
|
|
6339
6306
|
const queryClient = useQueryClient8();
|
|
@@ -6401,16 +6368,16 @@ var ResourceList = () => {
|
|
|
6401
6368
|
{
|
|
6402
6369
|
name: "Delete",
|
|
6403
6370
|
button: true,
|
|
6404
|
-
cell: (row) => /* @__PURE__ */
|
|
6371
|
+
cell: (row) => /* @__PURE__ */ jsx39(DeleteButton4, { onClick: () => deleteWithId(row.id) }),
|
|
6405
6372
|
right: true
|
|
6406
6373
|
}
|
|
6407
6374
|
];
|
|
6408
6375
|
const paginationComponentOptions = {
|
|
6409
6376
|
noRowsPerPage: true
|
|
6410
6377
|
};
|
|
6411
|
-
return /* @__PURE__ */
|
|
6412
|
-
/* @__PURE__ */
|
|
6413
|
-
/* @__PURE__ */
|
|
6378
|
+
return /* @__PURE__ */ jsx39("div", { children: /* @__PURE__ */ jsx39("div", { children: /* @__PURE__ */ jsx39("div", { className: "pb-8 mb-5", children: /* @__PURE__ */ jsxs30("div", { children: [
|
|
6379
|
+
/* @__PURE__ */ jsx39("div", { className: "pb-5", children: /* @__PURE__ */ jsx39("div", { className: "flex items-center justify-between flex-wrap sm:flex-nowrap", children: /* @__PURE__ */ jsx39("div", { className: "text-2xl lg:text-[1.75rem] font-semibold leading-[120%]", children: "Resource" }) }) }),
|
|
6380
|
+
/* @__PURE__ */ jsx39(
|
|
6414
6381
|
DataTable4,
|
|
6415
6382
|
{
|
|
6416
6383
|
theme: theme === "dark" ? "dark" : "default",
|
|
@@ -6431,34 +6398,34 @@ var ResourceList = () => {
|
|
|
6431
6398
|
|
|
6432
6399
|
// src/components/Resource/ResourceDisplayList.tsx
|
|
6433
6400
|
import { v4 as v43 } from "uuid";
|
|
6434
|
-
import { jsx as
|
|
6401
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
6435
6402
|
var ResourceDisplayList = ({ resources }) => {
|
|
6436
|
-
return /* @__PURE__ */
|
|
6403
|
+
return /* @__PURE__ */ jsx40("div", { className: "px-0", children: /* @__PURE__ */ jsx40("div", { className: "grid grid-cols-1 lg:grid-cols-4 gap-6", children: resources.map((resource) => /* @__PURE__ */ jsx40(ResourceItem, { resource }, v43())) }) });
|
|
6437
6404
|
};
|
|
6438
6405
|
|
|
6439
6406
|
// src/components/Resource/subtitle-h3-resource-collections.tsx
|
|
6440
6407
|
import { Body18 as Body183, H3Design as H3Design3 } from "@geowiki/ui";
|
|
6441
6408
|
|
|
6442
6409
|
// src/components/Resource/ResourceCollectionItem.tsx
|
|
6443
|
-
import Link5 from "
|
|
6410
|
+
import { Link as Link5 } from "@geowiki/core";
|
|
6444
6411
|
import { Body16sb as Body16sb3, H6Design as H6Design2, Body16 as Body1611, DesignButton as DesignButton19, Icon } from "@geowiki/ui";
|
|
6445
6412
|
import { ArrowRight } from "lucide-react";
|
|
6446
|
-
import { jsx as
|
|
6413
|
+
import { jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6447
6414
|
var ResourceCollectionItem = (props) => {
|
|
6448
6415
|
return /* @__PURE__ */ jsxs31("div", { className: "w-auto h-[19.375rem] relative bg-neutral-100 rounded-xl p-6 lg:h-[27.5rem]", children: [
|
|
6449
|
-
/* @__PURE__ */
|
|
6450
|
-
/* @__PURE__ */
|
|
6416
|
+
/* @__PURE__ */ jsx41("div", { className: "pb-2 flex items-start justify-start lg:pb-6", children: /* @__PURE__ */ jsx41(Icon, { type: props.icon }) }),
|
|
6417
|
+
/* @__PURE__ */ jsx41(Body16sb3, { className: "text-primary", children: props.type }),
|
|
6451
6418
|
/* @__PURE__ */ jsxs31("div", { className: "pt-2 flex-col justify-start items-start space-y-2 inline-flex lg:space-y-4", children: [
|
|
6452
|
-
/* @__PURE__ */
|
|
6453
|
-
/* @__PURE__ */
|
|
6419
|
+
/* @__PURE__ */ jsx41(H6Design2, { className: "line-clamp-2", children: props.title }),
|
|
6420
|
+
/* @__PURE__ */ jsx41(Body1611, { className: "line-clamp-6", children: props.text })
|
|
6454
6421
|
] }),
|
|
6455
|
-
/* @__PURE__ */
|
|
6422
|
+
/* @__PURE__ */ jsx41("div", { className: "absolute bottom-6 ", children: props.button?.link && /* @__PURE__ */ jsx41(DesignButton19, { variant: "circle", className: "w-12 h-12 p-2 lg:p-2", children: /* @__PURE__ */ jsx41(
|
|
6456
6423
|
Link5,
|
|
6457
6424
|
{
|
|
6458
6425
|
href: props.button.link,
|
|
6459
6426
|
target: props.button.isNewTab ? "_blank" : "_self",
|
|
6460
6427
|
rel: "noreferrer",
|
|
6461
|
-
children: /* @__PURE__ */
|
|
6428
|
+
children: /* @__PURE__ */ jsx41(ArrowRight, { className: "h-6 w-10" })
|
|
6462
6429
|
}
|
|
6463
6430
|
) }) })
|
|
6464
6431
|
] });
|
|
@@ -6466,11 +6433,11 @@ var ResourceCollectionItem = (props) => {
|
|
|
6466
6433
|
|
|
6467
6434
|
// src/components/Resource/ResourceCollectionDisplayList.tsx
|
|
6468
6435
|
import { v4 as v44 } from "uuid";
|
|
6469
|
-
import { jsx as
|
|
6436
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
6470
6437
|
var ResourceCollectionDisplayList = ({
|
|
6471
6438
|
resourceCollections
|
|
6472
6439
|
}) => {
|
|
6473
|
-
return /* @__PURE__ */
|
|
6440
|
+
return /* @__PURE__ */ jsx42("div", { className: "px-0", children: /* @__PURE__ */ jsx42("div", { className: "grid grid-cols-1 lg:grid-cols-4 gap-6", children: resourceCollections.map((resourceCollection) => /* @__PURE__ */ jsx42(
|
|
6474
6441
|
ResourceCollectionItem,
|
|
6475
6442
|
{
|
|
6476
6443
|
title: resourceCollection.title,
|
|
@@ -6484,7 +6451,7 @@ var ResourceCollectionDisplayList = ({
|
|
|
6484
6451
|
};
|
|
6485
6452
|
|
|
6486
6453
|
// src/components/Resource/subtitle-h3-resource-collections.tsx
|
|
6487
|
-
import { jsx as
|
|
6454
|
+
import { jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6488
6455
|
var SubtitleH3ResourceCollections = ({
|
|
6489
6456
|
title,
|
|
6490
6457
|
subtitle,
|
|
@@ -6497,11 +6464,11 @@ var SubtitleH3ResourceCollections = ({
|
|
|
6497
6464
|
"data-component": "SubtitleH3ResourceCollections",
|
|
6498
6465
|
children: [
|
|
6499
6466
|
/* @__PURE__ */ jsxs32("div", { className: "lg:flex lg:justify-between lg:items-start", children: [
|
|
6500
|
-
/* @__PURE__ */
|
|
6501
|
-
/* @__PURE__ */
|
|
6502
|
-
/* @__PURE__ */
|
|
6467
|
+
/* @__PURE__ */ jsx43(Body183, { className: "lg:w-[15%]", children: subtitle }),
|
|
6468
|
+
/* @__PURE__ */ jsx43(H3Design3, { className: " pt-2 pb-6 lg:py-0 lg:w-[50%]", children: title }),
|
|
6469
|
+
/* @__PURE__ */ jsx43("div", { className: "hidden lg:w-[15%] lg:inline" })
|
|
6503
6470
|
] }),
|
|
6504
|
-
/* @__PURE__ */
|
|
6471
|
+
/* @__PURE__ */ jsx43(
|
|
6505
6472
|
ResourceCollectionDisplayList,
|
|
6506
6473
|
{
|
|
6507
6474
|
resourceCollections
|
|
@@ -6519,9 +6486,9 @@ import {
|
|
|
6519
6486
|
useResourceType as useResourceType5,
|
|
6520
6487
|
useTopic as useTopic5
|
|
6521
6488
|
} from "@geowiki/core";
|
|
6522
|
-
import { useRouter as useRouter12 } from "
|
|
6489
|
+
import { useRouter as useRouter12 } from "@geowiki/core";
|
|
6523
6490
|
import XCircleIcon2 from "@heroicons/react/24/outline/XCircleIcon";
|
|
6524
|
-
import { jsx as
|
|
6491
|
+
import { jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6525
6492
|
var ResourcesSelectedTags = () => {
|
|
6526
6493
|
const router = useRouter12();
|
|
6527
6494
|
const selectedLanguages = router.query.language;
|
|
@@ -6554,12 +6521,12 @@ var ResourcesSelectedTags = () => {
|
|
|
6554
6521
|
router.push({ query });
|
|
6555
6522
|
};
|
|
6556
6523
|
return /* @__PURE__ */ jsxs33("div", { className: "flex flex-wrap gap-1", children: [
|
|
6557
|
-
selectedLanguagesArray && selectedLanguagesArray.length > 0 && /* @__PURE__ */
|
|
6524
|
+
selectedLanguagesArray && selectedLanguagesArray.length > 0 && /* @__PURE__ */ jsx44("div", { className: "flex flex-col justify-center px-2.5 py-2 text-sm leading-5 text-black border border-solid border-zinc-300 rounded-[40px]", children: /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-1", children: [
|
|
6558
6525
|
/* @__PURE__ */ jsxs33("label", { children: [
|
|
6559
|
-
/* @__PURE__ */
|
|
6560
|
-
/* @__PURE__ */
|
|
6526
|
+
/* @__PURE__ */ jsx44("span", { className: "font-medium", children: "Language " }),
|
|
6527
|
+
/* @__PURE__ */ jsx44("span", { children: selectedLanguagesArray?.map((language) => language.value).join(", ") })
|
|
6561
6528
|
] }),
|
|
6562
|
-
/* @__PURE__ */
|
|
6529
|
+
/* @__PURE__ */ jsx44(
|
|
6563
6530
|
XCircleIcon2,
|
|
6564
6531
|
{
|
|
6565
6532
|
className: "h-5 min-h-5 min-w-5 cursor-pointer",
|
|
@@ -6567,12 +6534,12 @@ var ResourcesSelectedTags = () => {
|
|
|
6567
6534
|
}
|
|
6568
6535
|
)
|
|
6569
6536
|
] }) }),
|
|
6570
|
-
selectedTopicsArray && selectedTopicsArray.length > 0 && /* @__PURE__ */
|
|
6537
|
+
selectedTopicsArray && selectedTopicsArray.length > 0 && /* @__PURE__ */ jsx44("div", { className: "flex flex-col justify-center px-2.5 py-2 text-sm leading-5 text-black border border-solid border-zinc-300 rounded-[40px]", children: /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-1", children: [
|
|
6571
6538
|
/* @__PURE__ */ jsxs33("label", { children: [
|
|
6572
|
-
/* @__PURE__ */
|
|
6573
|
-
/* @__PURE__ */
|
|
6539
|
+
/* @__PURE__ */ jsx44("span", { className: "font-medium", children: "Topic " }),
|
|
6540
|
+
/* @__PURE__ */ jsx44("span", { children: selectedTopicsArray?.map((topic) => topic.value).join(", ") })
|
|
6574
6541
|
] }),
|
|
6575
|
-
/* @__PURE__ */
|
|
6542
|
+
/* @__PURE__ */ jsx44(
|
|
6576
6543
|
XCircleIcon2,
|
|
6577
6544
|
{
|
|
6578
6545
|
className: "h-5 min-h-5 min-w-5 cursor-pointer",
|
|
@@ -6580,12 +6547,12 @@ var ResourcesSelectedTags = () => {
|
|
|
6580
6547
|
}
|
|
6581
6548
|
)
|
|
6582
6549
|
] }) }),
|
|
6583
|
-
selectedResourceTypesArray && selectedResourceTypesArray.length > 0 && /* @__PURE__ */
|
|
6550
|
+
selectedResourceTypesArray && selectedResourceTypesArray.length > 0 && /* @__PURE__ */ jsx44("div", { className: "flex flex-col justify-center px-2.5 py-2 text-sm leading-5 text-black border border-solid border-zinc-300 rounded-[40px]", children: /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-1", children: [
|
|
6584
6551
|
/* @__PURE__ */ jsxs33("label", { children: [
|
|
6585
|
-
/* @__PURE__ */
|
|
6586
|
-
/* @__PURE__ */
|
|
6552
|
+
/* @__PURE__ */ jsx44("span", { className: "font-medium", children: "Resource Type " }),
|
|
6553
|
+
/* @__PURE__ */ jsx44("span", { children: selectedResourceTypesArray?.map((type) => type.value).join(", ") })
|
|
6587
6554
|
] }),
|
|
6588
|
-
/* @__PURE__ */
|
|
6555
|
+
/* @__PURE__ */ jsx44(
|
|
6589
6556
|
XCircleIcon2,
|
|
6590
6557
|
{
|
|
6591
6558
|
className: "h-5 min-h-5 min-w-5 cursor-pointer",
|
|
@@ -6593,12 +6560,12 @@ var ResourcesSelectedTags = () => {
|
|
|
6593
6560
|
}
|
|
6594
6561
|
)
|
|
6595
6562
|
] }) }),
|
|
6596
|
-
selectedAudiencesArray && selectedAudiencesArray.length > 0 && /* @__PURE__ */
|
|
6563
|
+
selectedAudiencesArray && selectedAudiencesArray.length > 0 && /* @__PURE__ */ jsx44("div", { className: "flex flex-col justify-center px-2.5 py-2 text-sm leading-5 text-black border border-solid border-zinc-300 rounded-[40px]", children: /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-1", children: [
|
|
6597
6564
|
/* @__PURE__ */ jsxs33("label", { children: [
|
|
6598
|
-
/* @__PURE__ */
|
|
6599
|
-
/* @__PURE__ */
|
|
6565
|
+
/* @__PURE__ */ jsx44("span", { className: "font-medium", children: "Audience " }),
|
|
6566
|
+
/* @__PURE__ */ jsx44("span", { children: selectedAudiencesArray?.map((audience) => audience.value).join(", ") })
|
|
6600
6567
|
] }),
|
|
6601
|
-
/* @__PURE__ */
|
|
6568
|
+
/* @__PURE__ */ jsx44(
|
|
6602
6569
|
XCircleIcon2,
|
|
6603
6570
|
{
|
|
6604
6571
|
className: "h-5 min-h-5 min-w-5 cursor-pointer",
|
|
@@ -6606,12 +6573,12 @@ var ResourcesSelectedTags = () => {
|
|
|
6606
6573
|
}
|
|
6607
6574
|
)
|
|
6608
6575
|
] }) }),
|
|
6609
|
-
search && /* @__PURE__ */
|
|
6576
|
+
search && /* @__PURE__ */ jsx44("div", { className: "flex flex-col justify-center px-2.5 py-2 text-sm leading-5 text-black border border-solid border-zinc-300 rounded-[40px]", children: /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-1", children: [
|
|
6610
6577
|
/* @__PURE__ */ jsxs33("label", { children: [
|
|
6611
|
-
/* @__PURE__ */
|
|
6612
|
-
/* @__PURE__ */
|
|
6578
|
+
/* @__PURE__ */ jsx44("span", { className: "font-medium", children: "Search " }),
|
|
6579
|
+
/* @__PURE__ */ jsx44("span", { children: search })
|
|
6613
6580
|
] }),
|
|
6614
|
-
/* @__PURE__ */
|
|
6581
|
+
/* @__PURE__ */ jsx44(
|
|
6615
6582
|
XCircleIcon2,
|
|
6616
6583
|
{
|
|
6617
6584
|
className: "h-5 min-h-5 min-w-5 cursor-pointer",
|
|
@@ -6623,9 +6590,9 @@ var ResourcesSelectedTags = () => {
|
|
|
6623
6590
|
};
|
|
6624
6591
|
|
|
6625
6592
|
// src/components/Resource/KeyResourceItem.tsx
|
|
6626
|
-
import Link6 from "
|
|
6593
|
+
import { Link as Link6 } from "@geowiki/core";
|
|
6627
6594
|
import { ApiImage as ApiImage5, CmsImage, H9Design, Body16sb as Body16sb4 } from "@geowiki/ui";
|
|
6628
|
-
import { jsx as
|
|
6595
|
+
import { jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6629
6596
|
var KeyResourceItem = ({
|
|
6630
6597
|
title,
|
|
6631
6598
|
subtitle,
|
|
@@ -6633,8 +6600,8 @@ var KeyResourceItem = ({
|
|
|
6633
6600
|
imageId,
|
|
6634
6601
|
imagePath
|
|
6635
6602
|
}) => {
|
|
6636
|
-
return /* @__PURE__ */
|
|
6637
|
-
imageId && /* @__PURE__ */
|
|
6603
|
+
return /* @__PURE__ */ jsx45(Link6, { href: path, children: /* @__PURE__ */ jsxs34("div", { className: "w-full flex-col justify-start items-start inline-flex", children: [
|
|
6604
|
+
imageId && /* @__PURE__ */ jsx45(
|
|
6638
6605
|
ApiImage5,
|
|
6639
6606
|
{
|
|
6640
6607
|
imageId,
|
|
@@ -6643,7 +6610,7 @@ var KeyResourceItem = ({
|
|
|
6643
6610
|
className: "w-full h-[260px] rounded-xl object-cover"
|
|
6644
6611
|
}
|
|
6645
6612
|
),
|
|
6646
|
-
imagePath && /* @__PURE__ */
|
|
6613
|
+
imagePath && /* @__PURE__ */ jsx45(
|
|
6647
6614
|
CmsImage,
|
|
6648
6615
|
{
|
|
6649
6616
|
src: imagePath,
|
|
@@ -6653,16 +6620,16 @@ var KeyResourceItem = ({
|
|
|
6653
6620
|
className: "w-full h-[260px] rounded-xl object-cover"
|
|
6654
6621
|
}
|
|
6655
6622
|
),
|
|
6656
|
-
/* @__PURE__ */
|
|
6657
|
-
/* @__PURE__ */
|
|
6623
|
+
/* @__PURE__ */ jsx45(Body16sb4, { className: "pt-4 pb-2 text-primary", children: subtitle }),
|
|
6624
|
+
/* @__PURE__ */ jsx45(H9Design, { children: title })
|
|
6658
6625
|
] }) });
|
|
6659
6626
|
};
|
|
6660
6627
|
|
|
6661
6628
|
// src/components/Resource/KeyResourceItemList.tsx
|
|
6662
6629
|
import { v4 as v45 } from "uuid";
|
|
6663
|
-
import { jsx as
|
|
6630
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
6664
6631
|
var KeyResourceItemList = ({ keyResources }) => {
|
|
6665
|
-
return /* @__PURE__ */
|
|
6632
|
+
return /* @__PURE__ */ jsx46("div", { className: "container mx-auto px-0", children: /* @__PURE__ */ jsx46("div", { className: "grid grid-cols-1 lg:grid-cols-3 gap-x-6 gap-y-5 lg:gap-y-10", children: keyResources.map((keyResource) => /* @__PURE__ */ jsx46(
|
|
6666
6633
|
KeyResourceItem,
|
|
6667
6634
|
{
|
|
6668
6635
|
title: keyResource.title,
|
|
@@ -6677,7 +6644,7 @@ var KeyResourceItemList = ({ keyResources }) => {
|
|
|
6677
6644
|
|
|
6678
6645
|
// src/components/Resource/SubtitleH3KeyResources.tsx
|
|
6679
6646
|
import { Body18 as Body184, H3Design as H3Design4 } from "@geowiki/ui";
|
|
6680
|
-
import { jsx as
|
|
6647
|
+
import { jsx as jsx47, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
6681
6648
|
var SubtitleH3KeyResources = ({
|
|
6682
6649
|
title,
|
|
6683
6650
|
subtitle,
|
|
@@ -6690,22 +6657,22 @@ var SubtitleH3KeyResources = ({
|
|
|
6690
6657
|
"data-component": "SubtitleH3KeyResources",
|
|
6691
6658
|
children: [
|
|
6692
6659
|
/* @__PURE__ */ jsxs35("div", { className: "lg:flex lg:justify-between lg:items-start", children: [
|
|
6693
|
-
/* @__PURE__ */
|
|
6694
|
-
/* @__PURE__ */
|
|
6695
|
-
/* @__PURE__ */
|
|
6660
|
+
/* @__PURE__ */ jsx47(Body184, { className: "lg:w-[15%]", children: subtitle }),
|
|
6661
|
+
/* @__PURE__ */ jsx47(H3Design4, { className: " pt-2 pb-6 lg:py-0 lg:w-[50%]", children: title }),
|
|
6662
|
+
/* @__PURE__ */ jsx47("div", { className: "hidden lg:w-[15%] lg:inline" })
|
|
6696
6663
|
] }),
|
|
6697
|
-
/* @__PURE__ */
|
|
6664
|
+
/* @__PURE__ */ jsx47(KeyResourceItemList, { keyResources })
|
|
6698
6665
|
]
|
|
6699
6666
|
}
|
|
6700
6667
|
);
|
|
6701
6668
|
};
|
|
6702
6669
|
|
|
6703
6670
|
// src/components/User/index.tsx
|
|
6704
|
-
import { jsx as
|
|
6671
|
+
import { jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
6705
6672
|
var UserInfoPage = () => {
|
|
6706
|
-
return /* @__PURE__ */
|
|
6707
|
-
/* @__PURE__ */
|
|
6708
|
-
/* @__PURE__ */
|
|
6673
|
+
return /* @__PURE__ */ jsx48("div", { children: /* @__PURE__ */ jsx48("div", { className: "container mx-auto h-64", children: /* @__PURE__ */ jsx48("div", { className: "pt-5 mt-5 pb-24 px-4 py-5 lg:px-0 lg:py-2 md:px-2 md:py-2", children: /* @__PURE__ */ jsx48("div", { children: /* @__PURE__ */ jsxs36("div", { children: [
|
|
6674
|
+
/* @__PURE__ */ jsx48("strong", { children: "Welcome Back!" }),
|
|
6675
|
+
/* @__PURE__ */ jsx48("div", { className: "pt-5", children: "Here, you can manage your Farmer Clusters, add Farmer Cluster profiles, images, stories and news. You can also manage basic personal settings, such as changing your display name or password." })
|
|
6709
6676
|
] }) }) }) }) });
|
|
6710
6677
|
};
|
|
6711
6678
|
|
|
@@ -6716,28 +6683,27 @@ import { LoaderFull as LoaderFull14 } from "@geowiki/ui";
|
|
|
6716
6683
|
import { ChevronRightIcon, ChevronDownIcon } from "@heroicons/react/24/outline";
|
|
6717
6684
|
import { UpdateUserProfile } from "@geowiki/ui";
|
|
6718
6685
|
import { UpdatePassword } from "@geowiki/ui";
|
|
6719
|
-
import { jsx as
|
|
6686
|
+
import { jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6720
6687
|
var UpdateUser = () => {
|
|
6721
6688
|
const { data, isLoading } = useUserProfileGet();
|
|
6722
6689
|
const [ChangeDisplayName, setChangeDisplayName] = useState21(false);
|
|
6723
6690
|
const [ChangePassword, setChangePassword] = useState21(false);
|
|
6724
|
-
if (isLoading || data === void 0)
|
|
6725
|
-
|
|
6726
|
-
return /* @__PURE__ */ jsx50("div", { className: "container mx-auto", children: /* @__PURE__ */ jsx50("div", { className: "pt-4 px-4 py-5 lg:px-2 lg:py-2 md:px-2 md:py-2", children: /* @__PURE__ */ jsx50("div", { children: /* @__PURE__ */ jsxs37("div", { children: [
|
|
6691
|
+
if (isLoading || data === void 0) return /* @__PURE__ */ jsx49(LoaderFull14, {});
|
|
6692
|
+
return /* @__PURE__ */ jsx49("div", { className: "container mx-auto", children: /* @__PURE__ */ jsx49("div", { className: "pt-4 px-4 py-5 lg:px-2 lg:py-2 md:px-2 md:py-2", children: /* @__PURE__ */ jsx49("div", { children: /* @__PURE__ */ jsxs37("div", { children: [
|
|
6727
6693
|
/* @__PURE__ */ jsxs37("div", { className: "pt-5", children: [
|
|
6728
|
-
/* @__PURE__ */
|
|
6694
|
+
/* @__PURE__ */ jsx49("strong", { children: " Your Email Address" }),
|
|
6729
6695
|
" : ",
|
|
6730
6696
|
data.email
|
|
6731
6697
|
] }),
|
|
6732
6698
|
/* @__PURE__ */ jsxs37("div", { className: "pt-5", children: [
|
|
6733
|
-
/* @__PURE__ */
|
|
6699
|
+
/* @__PURE__ */ jsx49("strong", { children: "Your Display Name" }),
|
|
6734
6700
|
" : ",
|
|
6735
6701
|
data.name,
|
|
6736
6702
|
" ",
|
|
6737
6703
|
data.surname,
|
|
6738
|
-
/* @__PURE__ */
|
|
6704
|
+
/* @__PURE__ */ jsx49("div", { className: "text-xs", children: "Preferably, your display name is your First and Last Name." })
|
|
6739
6705
|
] }),
|
|
6740
|
-
/* @__PURE__ */
|
|
6706
|
+
/* @__PURE__ */ jsx49("div", { className: "pt-5", children: /* @__PURE__ */ jsx49(
|
|
6741
6707
|
"button",
|
|
6742
6708
|
{
|
|
6743
6709
|
className: ChangeDisplayName ? "focus:bg-primary-600 focus:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.3),0_4px_18px_0_rgba(59,113,202,0.2)] focus:outline-none focus:ring-0 inline-block rounded bg-secondary px-6 pb-2 pt-2.5 text-xs font-medium uppercase leading-normal text-white shadow-[0_4px_9px_-4px_#3b71ca] transition duration-150 ease-in-out hover:bg-primary-600 hover:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.3),0_4px_18px_0_rgba(59,113,202,0.2)] active:bg-primary-700 active:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.3),0_4px_18px_0_rgba(59,113,202,0.2)] dark:shadow-[0_4px_9px_-4px_rgba(59,113,202,0.5)] dark:hover:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.2),0_4px_18px_0_rgba(59,113,202,0.1)] dark:focus:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.2),0_4px_18px_0_rgba(59,113,202,0.1)] dark:active:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.2),0_4px_18px_0_rgba(59,113,202,0.1)]" : "inline-block rounded bg-secondary px-6 pb-2 pt-2.5 text-xs font-medium uppercase leading-normal text-white shadow-[0_4px_9px_-4px_#3b71ca] transition duration-150 ease-in-out hover:bg-primary-600 hover:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.3),0_4px_18px_0_rgba(59,113,202,0.2)] active:bg-primary-700 active:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.3),0_4px_18px_0_rgba(59,113,202,0.2)] dark:shadow-[0_4px_9px_-4px_rgba(59,113,202,0.5)] dark:hover:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.2),0_4px_18px_0_rgba(59,113,202,0.1)] dark:focus:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.2),0_4px_18px_0_rgba(59,113,202,0.1)] dark:active:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.2),0_4px_18px_0_rgba(59,113,202,0.1)]",
|
|
@@ -6745,11 +6711,11 @@ var UpdateUser = () => {
|
|
|
6745
6711
|
onClick: () => setChangeDisplayName(!ChangeDisplayName),
|
|
6746
6712
|
children: /* @__PURE__ */ jsxs37("div", { className: "flex", children: [
|
|
6747
6713
|
"Change Display Name",
|
|
6748
|
-
ChangeDisplayName ? /* @__PURE__ */
|
|
6714
|
+
ChangeDisplayName ? /* @__PURE__ */ jsx49(ChevronDownIcon, { className: "h-4 w-4 ml-5 text-white" }) : /* @__PURE__ */ jsx49(ChevronRightIcon, { className: "h-4 w-4 ml-5 text-white" })
|
|
6749
6715
|
] })
|
|
6750
6716
|
}
|
|
6751
6717
|
) }),
|
|
6752
|
-
ChangeDisplayName && /* @__PURE__ */
|
|
6718
|
+
ChangeDisplayName && /* @__PURE__ */ jsx49("div", { children: /* @__PURE__ */ jsx49(
|
|
6753
6719
|
UpdateUserProfile,
|
|
6754
6720
|
{
|
|
6755
6721
|
ShowProfile: ChangeDisplayName,
|
|
@@ -6757,7 +6723,7 @@ var UpdateUser = () => {
|
|
|
6757
6723
|
data
|
|
6758
6724
|
}
|
|
6759
6725
|
) }),
|
|
6760
|
-
/* @__PURE__ */
|
|
6726
|
+
/* @__PURE__ */ jsx49("div", { className: "pt-5", children: /* @__PURE__ */ jsx49(
|
|
6761
6727
|
"button",
|
|
6762
6728
|
{
|
|
6763
6729
|
className: ChangePassword ? "focus:bg-primary-600 focus:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.3),0_4px_18px_0_rgba(59,113,202,0.2)] focus:outline-none focus:ring-0 inline-block rounded bg-secondary px-6 pb-2 pt-2.5 text-xs font-medium uppercase leading-normal text-white shadow-[0_4px_9px_-4px_#3b71ca] transition duration-150 ease-in-out hover:bg-primary-600 hover:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.3),0_4px_18px_0_rgba(59,113,202,0.2)] active:bg-primary-700 active:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.3),0_4px_18px_0_rgba(59,113,202,0.2)] dark:shadow-[0_4px_9px_-4px_rgba(59,113,202,0.5)] dark:hover:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.2),0_4px_18px_0_rgba(59,113,202,0.1)] dark:focus:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.2),0_4px_18px_0_rgba(59,113,202,0.1)] dark:active:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.2),0_4px_18px_0_rgba(59,113,202,0.1)]" : "inline-block rounded bg-secondary px-6 pb-2 pt-2.5 text-xs font-medium uppercase leading-normal text-white shadow-[0_4px_9px_-4px_#3b71ca] transition duration-150 ease-in-out hover:bg-primary-600 hover:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.3),0_4px_18px_0_rgba(59,113,202,0.2)] active:bg-primary-700 active:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.3),0_4px_18px_0_rgba(59,113,202,0.2)] dark:shadow-[0_4px_9px_-4px_rgba(59,113,202,0.5)] dark:hover:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.2),0_4px_18px_0_rgba(59,113,202,0.1)] dark:focus:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.2),0_4px_18px_0_rgba(59,113,202,0.1)] dark:active:shadow-[0_8px_9px_-4px_rgba(59,113,202,0.2),0_4px_18px_0_rgba(59,113,202,0.1)]",
|
|
@@ -6765,11 +6731,11 @@ var UpdateUser = () => {
|
|
|
6765
6731
|
onClick: () => setChangePassword(!ChangePassword),
|
|
6766
6732
|
children: /* @__PURE__ */ jsxs37("div", { className: "flex", children: [
|
|
6767
6733
|
"Change Password",
|
|
6768
|
-
ChangePassword ? /* @__PURE__ */
|
|
6734
|
+
ChangePassword ? /* @__PURE__ */ jsx49(ChevronDownIcon, { className: "h-4 w-4 ml-5 text-white" }) : /* @__PURE__ */ jsx49(ChevronRightIcon, { className: "h-4 w-4 ml-5 text-white" })
|
|
6769
6735
|
] })
|
|
6770
6736
|
}
|
|
6771
6737
|
) }),
|
|
6772
|
-
ChangePassword && /* @__PURE__ */
|
|
6738
|
+
ChangePassword && /* @__PURE__ */ jsx49("div", { children: /* @__PURE__ */ jsx49(
|
|
6773
6739
|
UpdatePassword,
|
|
6774
6740
|
{
|
|
6775
6741
|
ShowUpdatePassword: ChangePassword,
|
|
@@ -6781,25 +6747,25 @@ var UpdateUser = () => {
|
|
|
6781
6747
|
|
|
6782
6748
|
// src/components/FeatureResources/FeatureResources.tsx
|
|
6783
6749
|
import { DesignButton as DesignButton20, H8Design, Body16 as Body1612, Body15sb as Body15sb2 } from "@geowiki/ui";
|
|
6784
|
-
import Link7 from "
|
|
6785
|
-
import { jsx as
|
|
6750
|
+
import { Link as Link7 } from "@geowiki/core";
|
|
6751
|
+
import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
6786
6752
|
var FeatureResources = (props) => {
|
|
6787
6753
|
return /* @__PURE__ */ jsxs38("div", { className: " w-auto h-[15rem] relative bg-white rounded-xl p-6 lg:h-[18rem] lg:max-w-[400px]", children: [
|
|
6788
6754
|
/* @__PURE__ */ jsxs38("div", { className: "flex items-start justify-between ", children: [
|
|
6789
|
-
/* @__PURE__ */
|
|
6790
|
-
/* @__PURE__ */
|
|
6755
|
+
/* @__PURE__ */ jsx50(ResourceIcon, { type: props.imageType }),
|
|
6756
|
+
/* @__PURE__ */ jsx50(Body15sb2, { className: "text-primary", children: props.tag })
|
|
6791
6757
|
] }),
|
|
6792
6758
|
/* @__PURE__ */ jsxs38("div", { className: "pt-4 flex-col justify-start items-start space-y-2 inline-flex lg:pt-6 lg:space-y-4", children: [
|
|
6793
|
-
/* @__PURE__ */
|
|
6794
|
-
/* @__PURE__ */
|
|
6759
|
+
/* @__PURE__ */ jsx50(H8Design, { children: props.title }),
|
|
6760
|
+
/* @__PURE__ */ jsx50(Body1612, { children: props.text })
|
|
6795
6761
|
] }),
|
|
6796
|
-
/* @__PURE__ */
|
|
6762
|
+
/* @__PURE__ */ jsx50("div", { className: "absolute bottom-6 ", children: props.button?.link && /* @__PURE__ */ jsx50(
|
|
6797
6763
|
DesignButton20,
|
|
6798
6764
|
{
|
|
6799
6765
|
variant: "externalLink",
|
|
6800
6766
|
size: "sm",
|
|
6801
6767
|
className: "h-auto p-0 lg:p-0",
|
|
6802
|
-
children: /* @__PURE__ */
|
|
6768
|
+
children: /* @__PURE__ */ jsx50(
|
|
6803
6769
|
Link7,
|
|
6804
6770
|
{
|
|
6805
6771
|
href: props.button.link,
|
|
@@ -6814,9 +6780,9 @@ var FeatureResources = (props) => {
|
|
|
6814
6780
|
};
|
|
6815
6781
|
|
|
6816
6782
|
// src/components/FeatureResources/FeatureResourcesList.tsx
|
|
6817
|
-
import { jsx as
|
|
6783
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
6818
6784
|
var FeatureResourcesList = ({ featureResources }) => {
|
|
6819
|
-
return /* @__PURE__ */
|
|
6785
|
+
return /* @__PURE__ */ jsx51("div", { className: "container mx-auto px-0", children: /* @__PURE__ */ jsx51("div", { className: "grid grid-cols-1 lg:grid-cols-3 gap-6", children: featureResources?.map((featureResource) => /* @__PURE__ */ jsx51(
|
|
6820
6786
|
FeatureResources,
|
|
6821
6787
|
{
|
|
6822
6788
|
title: featureResource.title,
|
|
@@ -6832,8 +6798,8 @@ var FeatureResourcesList = ({ featureResources }) => {
|
|
|
6832
6798
|
// src/components/FeatureResources/subtitle-h3-body-special-feature-resource-collections.tsx
|
|
6833
6799
|
import { H3Design as H3Design5, Body18 as Body185 } from "@geowiki/ui";
|
|
6834
6800
|
import { useEffect as useEffect6 } from "react";
|
|
6835
|
-
import { useRouter as useRouter13 } from "
|
|
6836
|
-
import { jsx as
|
|
6801
|
+
import { useRouter as useRouter13 } from "@geowiki/core";
|
|
6802
|
+
import { jsx as jsx52, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
6837
6803
|
var SubtitleH3BodySpecialFeatureResourceCollections = ({
|
|
6838
6804
|
title,
|
|
6839
6805
|
subtitle,
|
|
@@ -6853,17 +6819,17 @@ var SubtitleH3BodySpecialFeatureResourceCollections = ({
|
|
|
6853
6819
|
}
|
|
6854
6820
|
}, [router.asPath]);
|
|
6855
6821
|
return /* @__PURE__ */ jsxs39("div", { id: "special-feature-resources", children: [
|
|
6856
|
-
/* @__PURE__ */
|
|
6857
|
-
/* @__PURE__ */
|
|
6822
|
+
/* @__PURE__ */ jsx52("a", { href: "#special-feature-resources" }),
|
|
6823
|
+
/* @__PURE__ */ jsx52("div", { className: "bg-accent-secondary rounded-xl mt-6 lg:mt-20", children: /* @__PURE__ */ jsxs39("div", { className: "container mx-auto py-6 px-5 space-y-6 lg:pt-16 lg:pb-12 lg:px-12 lg:space-y-12", children: [
|
|
6858
6824
|
/* @__PURE__ */ jsxs39("div", { className: "lg:flex justify-between items-start", children: [
|
|
6859
|
-
/* @__PURE__ */
|
|
6825
|
+
/* @__PURE__ */ jsx52(Body185, { className: "pt-2 lg:pt-0 lg:w-[15%]", children: subtitle }),
|
|
6860
6826
|
/* @__PURE__ */ jsxs39("div", { className: "space-y-4 lg:w-[50%] lg:space-y-6", children: [
|
|
6861
|
-
/* @__PURE__ */
|
|
6862
|
-
/* @__PURE__ */
|
|
6827
|
+
/* @__PURE__ */ jsx52(H3Design5, { children: title }),
|
|
6828
|
+
/* @__PURE__ */ jsx52(Body185, { children: description })
|
|
6863
6829
|
] }),
|
|
6864
|
-
/* @__PURE__ */
|
|
6830
|
+
/* @__PURE__ */ jsx52("div", { className: "hidden lg:w-[15%] lg:inline" })
|
|
6865
6831
|
] }),
|
|
6866
|
-
/* @__PURE__ */
|
|
6832
|
+
/* @__PURE__ */ jsx52(FeatureResourcesList, { featureResources })
|
|
6867
6833
|
] }) })
|
|
6868
6834
|
] });
|
|
6869
6835
|
};
|
|
@@ -6894,7 +6860,6 @@ export {
|
|
|
6894
6860
|
ResourceIcon,
|
|
6895
6861
|
ResourceItem,
|
|
6896
6862
|
ResourceList,
|
|
6897
|
-
ResourceTag,
|
|
6898
6863
|
ResourcesQuickFind,
|
|
6899
6864
|
ResourcesSelectedTags,
|
|
6900
6865
|
SearchFilter,
|