@geowiki/ui 0.16.9-dev.4 → 0.16.9-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{cluster-map-4OQZMXJK.mjs → cluster-map-WZNS6WYH.mjs} +1 -1
- package/dist/index.js +323 -323
- package/dist/index.mjs +59 -59
- package/package.json +11 -14
package/dist/index.js
CHANGED
|
@@ -126,22 +126,22 @@ function createMarkerClusterGroup(props, context) {
|
|
|
126
126
|
const clusterEvent = `cluster${eventAsProp.substring(2).toLowerCase()}`;
|
|
127
127
|
markerClusterGroup.on(clusterEvent, callback);
|
|
128
128
|
});
|
|
129
|
-
return (0,
|
|
129
|
+
return (0, import_core74.createElementObject)(
|
|
130
130
|
markerClusterGroup,
|
|
131
|
-
(0,
|
|
131
|
+
(0, import_core74.extendContext)(context, { layerContainer: markerClusterGroup })
|
|
132
132
|
);
|
|
133
133
|
}
|
|
134
|
-
var
|
|
134
|
+
var import_core74, L, import_leaflet2, updateMarkerCluster, MarkerClusterGroup2;
|
|
135
135
|
var init_MarkerClusterGroup = __esm({
|
|
136
136
|
"src/components/ClusterMap/MarkerClusterGroup.tsx"() {
|
|
137
137
|
"use strict";
|
|
138
138
|
"use client";
|
|
139
|
-
|
|
139
|
+
import_core74 = require("@react-leaflet/core");
|
|
140
140
|
L = __toESM(require("leaflet"));
|
|
141
141
|
import_leaflet2 = require("leaflet.markercluster");
|
|
142
142
|
updateMarkerCluster = () => {
|
|
143
143
|
};
|
|
144
|
-
MarkerClusterGroup2 = (0,
|
|
144
|
+
MarkerClusterGroup2 = (0, import_core74.createPathComponent)(
|
|
145
145
|
createMarkerClusterGroup,
|
|
146
146
|
updateMarkerCluster
|
|
147
147
|
);
|
|
@@ -153,27 +153,27 @@ function getIcon() {
|
|
|
153
153
|
const MyIcon = import_InformationCircleIcon.default;
|
|
154
154
|
return (0, import_server.renderToString)(/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(MyIcon, { height: 24, color: "black" }));
|
|
155
155
|
}
|
|
156
|
-
var import_leaflet3, import_react_leaflet2,
|
|
156
|
+
var import_leaflet3, import_react_leaflet2, import_core75, import_design_system62, import_core76, import_core77, import_InformationCircleIcon, import_server, import_core78, import_jsx_runtime82, ClusterMarkers;
|
|
157
157
|
var init_cluster_markers = __esm({
|
|
158
158
|
"src/components/ClusterMap/cluster-markers.tsx"() {
|
|
159
159
|
"use strict";
|
|
160
160
|
"use client";
|
|
161
161
|
import_leaflet3 = require("leaflet");
|
|
162
162
|
import_react_leaflet2 = require("react-leaflet");
|
|
163
|
-
|
|
163
|
+
import_core75 = require("@geowiki/core");
|
|
164
164
|
import_design_system62 = require("@geowiki/design-system");
|
|
165
|
-
|
|
165
|
+
import_core76 = require("@geowiki/core");
|
|
166
166
|
init_MarkerClusterGroup();
|
|
167
|
-
|
|
167
|
+
import_core77 = require("@geowiki/core");
|
|
168
168
|
import_InformationCircleIcon = __toESM(require("@heroicons/react/24/solid/InformationCircleIcon"));
|
|
169
169
|
import_server = require("react-dom/server");
|
|
170
|
-
|
|
170
|
+
import_core78 = require("@geowiki/core");
|
|
171
171
|
import_jsx_runtime82 = require("react/jsx-runtime");
|
|
172
172
|
ClusterMarkers = (_props) => {
|
|
173
173
|
var _a, _b;
|
|
174
|
-
const { data: ConfigSettings, isLoading: IsConfigSettingsLoaded } = (0,
|
|
175
|
-
const { data, error, isLoading } = (0,
|
|
176
|
-
const fileUrl = (0,
|
|
174
|
+
const { data: ConfigSettings, isLoading: IsConfigSettingsLoaded } = (0, import_core78.useConfigSettings)();
|
|
175
|
+
const { data, error, isLoading } = (0, import_core75.useClusterMapInfo)();
|
|
176
|
+
const fileUrl = (0, import_core77.useFileUrl)();
|
|
177
177
|
if (error)
|
|
178
178
|
return null;
|
|
179
179
|
if (isLoading || IsConfigSettingsLoaded)
|
|
@@ -195,7 +195,7 @@ var init_cluster_markers = __esm({
|
|
|
195
195
|
) : new import_leaflet3.LatLng(0, 0),
|
|
196
196
|
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_react_leaflet2.Popup, { maxWidth: 600, children: [
|
|
197
197
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-no-repeat bg-cover ripple shadow-lg rounded-lg mb-6 object-cover", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
198
|
-
|
|
198
|
+
import_core76.Image,
|
|
199
199
|
{
|
|
200
200
|
src: `${fileUrl}${cluster.coverImageId}`,
|
|
201
201
|
alt: "Image",
|
|
@@ -441,10 +441,10 @@ module.exports = __toCommonJS(src_exports);
|
|
|
441
441
|
__reExport(src_exports, require("@geowiki/design-system"), module.exports);
|
|
442
442
|
|
|
443
443
|
// src/components/ui/footer.tsx
|
|
444
|
-
var
|
|
444
|
+
var import_core2 = require("@geowiki/core");
|
|
445
445
|
|
|
446
446
|
// src/components/Elements/NextImage.tsx
|
|
447
|
-
var
|
|
447
|
+
var import_core = require("@geowiki/core");
|
|
448
448
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
449
449
|
var NextImage = ({
|
|
450
450
|
src,
|
|
@@ -454,7 +454,7 @@ var NextImage = ({
|
|
|
454
454
|
className
|
|
455
455
|
}) => {
|
|
456
456
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
457
|
-
|
|
457
|
+
import_core.Image,
|
|
458
458
|
{
|
|
459
459
|
src,
|
|
460
460
|
width,
|
|
@@ -492,12 +492,12 @@ var HtmlLinkList = ({ links }) => {
|
|
|
492
492
|
var HtmlLinkList_default = HtmlLinkList;
|
|
493
493
|
|
|
494
494
|
// src/components/ui/footer.tsx
|
|
495
|
-
var
|
|
495
|
+
var import_core3 = require("@geowiki/core");
|
|
496
496
|
var import_design_system = require("@geowiki/design-system");
|
|
497
497
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
498
498
|
var Footer = ({ settings, sessionStatus }) => {
|
|
499
499
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
500
|
-
var cmsUrl = (0,
|
|
500
|
+
var cmsUrl = (0, import_core2.useCmsUrl)();
|
|
501
501
|
var imageUrl = `${cmsUrl}/media/${(_d = (_c = (_b = (_a = settings.fundingSettings) == null ? void 0 : _a.FundingSettings) == null ? void 0 : _b.Image) == null ? void 0 : _c.Paths) == null ? void 0 : _d[0]}`;
|
|
502
502
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("footer", { children: [
|
|
503
503
|
((_g = (_f = (_e = settings.fundingSettings) == null ? void 0 : _e.FundingSettings) == null ? void 0 : _f.IsVisible) == null ? void 0 : _g.Value) === true ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "container mx-auto flex flex-col pt-8", children: [
|
|
@@ -520,7 +520,7 @@ var Footer = ({ settings, sessionStatus }) => {
|
|
|
520
520
|
import_design_system.Button,
|
|
521
521
|
{
|
|
522
522
|
className: "mr-2 link",
|
|
523
|
-
onClick: () => (0,
|
|
523
|
+
onClick: () => (0, import_core3.signIn)(),
|
|
524
524
|
children: "Facilitator Login"
|
|
525
525
|
}
|
|
526
526
|
) : null : null
|
|
@@ -532,7 +532,7 @@ var Footer = ({ settings, sessionStatus }) => {
|
|
|
532
532
|
// src/lib/utils.ts
|
|
533
533
|
var import_design_system2 = require("@geowiki/design-system");
|
|
534
534
|
var import_jwt_decode = require("jwt-decode");
|
|
535
|
-
var
|
|
535
|
+
var import_core4 = require("@geowiki/core");
|
|
536
536
|
var getSelectTheme = (selectTheme, theme) => {
|
|
537
537
|
return __spreadProps(__spreadValues({}, selectTheme), {
|
|
538
538
|
colors: __spreadProps(__spreadValues({}, selectTheme.colors), {
|
|
@@ -664,7 +664,7 @@ var isAdmin = (token) => {
|
|
|
664
664
|
return false;
|
|
665
665
|
try {
|
|
666
666
|
const decodedToken = (0, import_jwt_decode.jwtDecode)(token);
|
|
667
|
-
return decodedToken.role.includes(
|
|
667
|
+
return decodedToken.role.includes(import_core4.USER_ROLE.ADMIN) || decodedToken.role.includes(import_core4.USER_ROLE.FARMER_CLUSTER_ADMIN);
|
|
668
668
|
} catch (error) {
|
|
669
669
|
return false;
|
|
670
670
|
}
|
|
@@ -675,10 +675,10 @@ var import_react = require("react");
|
|
|
675
675
|
var import_react2 = require("@headlessui/react");
|
|
676
676
|
var import_outline = require("@heroicons/react/24/outline");
|
|
677
677
|
var import_design_system3 = require("@geowiki/design-system");
|
|
678
|
-
var
|
|
678
|
+
var import_core5 = require("@geowiki/core");
|
|
679
679
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
680
680
|
var TopNavbar = ({ branding, mainMenu }) => {
|
|
681
|
-
var session = (0,
|
|
681
|
+
var session = (0, import_core5.useSession)();
|
|
682
682
|
const [mobileMenuOpen, setMobileMenuOpen] = (0, import_react.useState)(false);
|
|
683
683
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("header", { className: "bg-white", children: [
|
|
684
684
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
@@ -717,7 +717,7 @@ var TopNavbar = ({ branding, mainMenu }) => {
|
|
|
717
717
|
import_design_system3.Button,
|
|
718
718
|
{
|
|
719
719
|
className: "text-sm font-semibold leading-6",
|
|
720
|
-
onClick: () => (0,
|
|
720
|
+
onClick: () => (0, import_core5.signIn)(),
|
|
721
721
|
children: [
|
|
722
722
|
"Login ",
|
|
723
723
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "aria-hidden": "true", children: " \u2192" })
|
|
@@ -728,7 +728,7 @@ var TopNavbar = ({ branding, mainMenu }) => {
|
|
|
728
728
|
import_design_system3.Button,
|
|
729
729
|
{
|
|
730
730
|
className: "text-sm font-semibold leading-6",
|
|
731
|
-
onClick: () => (0,
|
|
731
|
+
onClick: () => (0, import_core5.signOut)(),
|
|
732
732
|
children: [
|
|
733
733
|
"Logout ",
|
|
734
734
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "aria-hidden": "true", children: " \u2192" })
|
|
@@ -923,7 +923,7 @@ function IconThree() {
|
|
|
923
923
|
|
|
924
924
|
// src/components/Navbar/TopNav4.tsx
|
|
925
925
|
var React = __toESM(require("react"));
|
|
926
|
-
var
|
|
926
|
+
var import_core6 = require("@geowiki/core");
|
|
927
927
|
var import_design_system4 = require("@geowiki/design-system");
|
|
928
928
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
929
929
|
var components = [
|
|
@@ -992,7 +992,7 @@ var TopNav4 = () => {
|
|
|
992
992
|
component.title
|
|
993
993
|
)) }) })
|
|
994
994
|
] }),
|
|
995
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_design_system4.NavigationMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
995
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_design_system4.NavigationMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core6.Link, { href: "/docs", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_design_system4.NavigationMenuLink, { className: (0, import_design_system4.navigationMenuTriggerStyle)(), children: "Documentation" }) }) })
|
|
996
996
|
] }) });
|
|
997
997
|
};
|
|
998
998
|
var ListItem = React.forwardRef((_a, ref) => {
|
|
@@ -1067,7 +1067,7 @@ var TopNav3 = () => {
|
|
|
1067
1067
|
};
|
|
1068
1068
|
|
|
1069
1069
|
// src/components/Profile/ProfileSettings.tsx
|
|
1070
|
-
var
|
|
1070
|
+
var import_core7 = require("@geowiki/core");
|
|
1071
1071
|
var import_api_proxy = require("@geowiki/api-proxy");
|
|
1072
1072
|
var import_react_query = require("@tanstack/react-query");
|
|
1073
1073
|
var import_react_hook_form = require("react-hook-form");
|
|
@@ -1133,7 +1133,7 @@ var ProfileSettings = ({ data }) => {
|
|
|
1133
1133
|
description: "Profile has been updated successfully.",
|
|
1134
1134
|
variant: "default"
|
|
1135
1135
|
});
|
|
1136
|
-
queryClient.invalidateQueries({ queryKey: [
|
|
1136
|
+
queryClient.invalidateQueries({ queryKey: [import_core7.QueryConstants.GetProfile] });
|
|
1137
1137
|
} catch (err) {
|
|
1138
1138
|
if (err instanceof Error) {
|
|
1139
1139
|
toast2({
|
|
@@ -1287,7 +1287,7 @@ var import_react14 = require("react");
|
|
|
1287
1287
|
var import_design_system16 = require("@geowiki/design-system");
|
|
1288
1288
|
|
|
1289
1289
|
// src/components/Profile/AccountEdit.tsx
|
|
1290
|
-
var
|
|
1290
|
+
var import_core8 = require("@geowiki/core");
|
|
1291
1291
|
var import_api_proxy3 = require("@geowiki/api-proxy");
|
|
1292
1292
|
var import_react_query2 = require("@tanstack/react-query");
|
|
1293
1293
|
var import_react_hook_form3 = require("react-hook-form");
|
|
@@ -1335,7 +1335,7 @@ var AccountEdit = ({ data, open, setOpen }) => {
|
|
|
1335
1335
|
variant: "default"
|
|
1336
1336
|
});
|
|
1337
1337
|
setShowSaving(true);
|
|
1338
|
-
queryClient.invalidateQueries({ queryKey: [
|
|
1338
|
+
queryClient.invalidateQueries({ queryKey: [import_core8.QueryConstants.GetProfile] });
|
|
1339
1339
|
} catch (err) {
|
|
1340
1340
|
if (err instanceof Error) {
|
|
1341
1341
|
toast2({
|
|
@@ -1814,7 +1814,7 @@ var AccountDetail = ({ data }) => {
|
|
|
1814
1814
|
};
|
|
1815
1815
|
|
|
1816
1816
|
// src/components/Settings/Emailing.tsx
|
|
1817
|
-
var
|
|
1817
|
+
var import_core10 = require("@geowiki/core");
|
|
1818
1818
|
var import_api_proxy6 = require("@geowiki/api-proxy");
|
|
1819
1819
|
var import_react_query4 = require("@tanstack/react-query");
|
|
1820
1820
|
var import_classnames2 = __toESM(require("classnames"));
|
|
@@ -1825,7 +1825,7 @@ var import_design_system18 = require("@geowiki/design-system");
|
|
|
1825
1825
|
// src/components/Settings/TestEmail.tsx
|
|
1826
1826
|
var import_react16 = require("react");
|
|
1827
1827
|
var import_api_proxy5 = require("@geowiki/api-proxy");
|
|
1828
|
-
var
|
|
1828
|
+
var import_core9 = require("@geowiki/core");
|
|
1829
1829
|
var import_design_system17 = require("@geowiki/design-system");
|
|
1830
1830
|
|
|
1831
1831
|
// src/components/Shared/Textarea.tsx
|
|
@@ -1873,7 +1873,7 @@ var TestEmail = ({ onDismiss }) => {
|
|
|
1873
1873
|
variant: "default"
|
|
1874
1874
|
});
|
|
1875
1875
|
queryClient.invalidateQueries({
|
|
1876
|
-
queryKey: [
|
|
1876
|
+
queryKey: [import_core9.QueryConstants.GetRoles]
|
|
1877
1877
|
});
|
|
1878
1878
|
onCloseEvent();
|
|
1879
1879
|
} catch (err) {
|
|
@@ -1935,7 +1935,7 @@ var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
|
1935
1935
|
var Emailing = () => {
|
|
1936
1936
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
1937
1937
|
const { toast: toast2 } = (0, import_design_system18.useToast)();
|
|
1938
|
-
const { data } = (0,
|
|
1938
|
+
const { data } = (0, import_core10.useEmailing)();
|
|
1939
1939
|
const queryClient = (0, import_react_query4.useQueryClient)();
|
|
1940
1940
|
const [openTestEmail, setOpenTestEmail] = (0, import_react17.useState)(false);
|
|
1941
1941
|
const { handleSubmit, register } = (0, import_react_hook_form6.useForm)();
|
|
@@ -1961,7 +1961,7 @@ var Emailing = () => {
|
|
|
1961
1961
|
variant: "default"
|
|
1962
1962
|
});
|
|
1963
1963
|
queryClient.invalidateQueries({
|
|
1964
|
-
queryKey: [
|
|
1964
|
+
queryKey: [import_core10.QueryConstants.GetEmailing]
|
|
1965
1965
|
});
|
|
1966
1966
|
} catch (err) {
|
|
1967
1967
|
if (err instanceof Error) {
|
|
@@ -2170,14 +2170,14 @@ var FeatureManagement = () => {
|
|
|
2170
2170
|
// src/components/Tenant/AddTenant.tsx
|
|
2171
2171
|
var import_react20 = require("react");
|
|
2172
2172
|
var import_api_proxy7 = require("@geowiki/api-proxy");
|
|
2173
|
-
var
|
|
2173
|
+
var import_core11 = require("@geowiki/core");
|
|
2174
2174
|
var import_lucide_react = require("lucide-react");
|
|
2175
2175
|
var import_design_system21 = require("@geowiki/design-system");
|
|
2176
2176
|
var import_react_hook_form7 = require("react-hook-form");
|
|
2177
2177
|
var import_react_query5 = require("@tanstack/react-query");
|
|
2178
2178
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2179
2179
|
var AddTenant = () => {
|
|
2180
|
-
const { can } = (0,
|
|
2180
|
+
const { can } = (0, import_core11.useGrantedPolicies)();
|
|
2181
2181
|
const [open, setOpen] = (0, import_react20.useState)(false);
|
|
2182
2182
|
const { toast: toast2 } = (0, import_design_system21.useToast)();
|
|
2183
2183
|
const { handleSubmit, register } = (0, import_react_hook_form7.useForm)();
|
|
@@ -2192,7 +2192,7 @@ var AddTenant = () => {
|
|
|
2192
2192
|
variant: "default"
|
|
2193
2193
|
});
|
|
2194
2194
|
queryClient.invalidateQueries({
|
|
2195
|
-
queryKey: [
|
|
2195
|
+
queryKey: [import_core11.QueryConstants.GetTenants]
|
|
2196
2196
|
});
|
|
2197
2197
|
setOpen(false);
|
|
2198
2198
|
} catch (err) {
|
|
@@ -2255,13 +2255,13 @@ var AddTenant = () => {
|
|
|
2255
2255
|
|
|
2256
2256
|
// src/components/Tenant/TenantList.tsx
|
|
2257
2257
|
var import_react24 = require("react");
|
|
2258
|
-
var
|
|
2258
|
+
var import_core15 = require("@geowiki/core");
|
|
2259
2259
|
var import_react_query8 = require("@tanstack/react-query");
|
|
2260
2260
|
var import_react_table = require("@tanstack/react-table");
|
|
2261
2261
|
|
|
2262
2262
|
// src/components/Tenant/TenantEdit.tsx
|
|
2263
2263
|
var import_api_proxy8 = require("@geowiki/api-proxy");
|
|
2264
|
-
var
|
|
2264
|
+
var import_core12 = require("@geowiki/core");
|
|
2265
2265
|
var import_react21 = require("react");
|
|
2266
2266
|
var import_react_query6 = require("@tanstack/react-query");
|
|
2267
2267
|
var import_design_system22 = require("@geowiki/design-system");
|
|
@@ -2315,7 +2315,7 @@ var TenantEdit = ({
|
|
|
2315
2315
|
setOpen(true);
|
|
2316
2316
|
return () => {
|
|
2317
2317
|
queryClient.invalidateQueries({
|
|
2318
|
-
queryKey: [
|
|
2318
|
+
queryKey: [import_core12.QueryConstants.GetTenants]
|
|
2319
2319
|
});
|
|
2320
2320
|
};
|
|
2321
2321
|
}, [queryClient]);
|
|
@@ -2377,18 +2377,18 @@ var TenantEdit = ({
|
|
|
2377
2377
|
};
|
|
2378
2378
|
|
|
2379
2379
|
// src/components/Tenant/FeatureList.tsx
|
|
2380
|
-
var
|
|
2380
|
+
var import_core13 = require("@geowiki/core");
|
|
2381
2381
|
var import_api_proxy9 = require("@geowiki/api-proxy");
|
|
2382
2382
|
var import_uuid = require("uuid");
|
|
2383
2383
|
var import_design_system23 = require("@geowiki/design-system");
|
|
2384
2384
|
var import_react22 = require("react");
|
|
2385
2385
|
var import_react_query7 = require("@tanstack/react-query");
|
|
2386
2386
|
var import_react_hook_form9 = require("react-hook-form");
|
|
2387
|
-
var
|
|
2387
|
+
var import_core14 = require("@geowiki/core");
|
|
2388
2388
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2389
2389
|
var FeatureList = ({ onDismiss, tenantId }) => {
|
|
2390
2390
|
var _a, _b;
|
|
2391
|
-
const { data } = (0,
|
|
2391
|
+
const { data } = (0, import_core13.useFeatures)(import_core14.PermissionProvider.T, tenantId);
|
|
2392
2392
|
const queryClient = (0, import_react_query7.useQueryClient)();
|
|
2393
2393
|
const [enableSetting, setEnableSetting] = (0, import_react22.useState)(false);
|
|
2394
2394
|
const [enableEmailSetting, setEnableEmailSetting] = (0, import_react22.useState)(false);
|
|
@@ -2414,13 +2414,13 @@ var FeatureList = ({ onDismiss, tenantId }) => {
|
|
|
2414
2414
|
});
|
|
2415
2415
|
return () => {
|
|
2416
2416
|
queryClient.invalidateQueries({
|
|
2417
|
-
queryKey: [
|
|
2417
|
+
queryKey: [import_core13.QueryConstants.GetFeatures]
|
|
2418
2418
|
});
|
|
2419
2419
|
queryClient.invalidateQueries({
|
|
2420
|
-
queryKey: [
|
|
2420
|
+
queryKey: [import_core13.QueryConstants.GetTenants]
|
|
2421
2421
|
});
|
|
2422
2422
|
queryClient.invalidateQueries({
|
|
2423
|
-
queryKey: [
|
|
2423
|
+
queryKey: [import_core14.PermissionProvider.T]
|
|
2424
2424
|
});
|
|
2425
2425
|
};
|
|
2426
2426
|
}, [onDismiss, data, queryClient]);
|
|
@@ -2445,7 +2445,7 @@ var FeatureList = ({ onDismiss, tenantId }) => {
|
|
|
2445
2445
|
}
|
|
2446
2446
|
];
|
|
2447
2447
|
yield import_api_proxy9.FeaturesService.featuresUpdate(
|
|
2448
|
-
|
|
2448
|
+
import_core14.PermissionProvider.T,
|
|
2449
2449
|
tenantId,
|
|
2450
2450
|
featureUpdateDto
|
|
2451
2451
|
);
|
|
@@ -2467,7 +2467,7 @@ var FeatureList = ({ onDismiss, tenantId }) => {
|
|
|
2467
2467
|
});
|
|
2468
2468
|
const onResetToDefaultEvent = () => __async(void 0, null, function* () {
|
|
2469
2469
|
try {
|
|
2470
|
-
yield import_api_proxy9.FeaturesService.featuresDelete(
|
|
2470
|
+
yield import_api_proxy9.FeaturesService.featuresDelete(import_core14.PermissionProvider.T, tenantId);
|
|
2471
2471
|
toast2({
|
|
2472
2472
|
title: "Success",
|
|
2473
2473
|
description: "Features has been set to default.",
|
|
@@ -2768,7 +2768,7 @@ var TenantList = ({
|
|
|
2768
2768
|
tenantId: tenantActionDialog.tenantId,
|
|
2769
2769
|
onDismiss: () => {
|
|
2770
2770
|
queryClient.invalidateQueries({
|
|
2771
|
-
queryKey: [
|
|
2771
|
+
queryKey: [import_core15.QueryConstants.GetTenants]
|
|
2772
2772
|
});
|
|
2773
2773
|
setTenantActionDialog(null);
|
|
2774
2774
|
}
|
|
@@ -2783,7 +2783,7 @@ var TenantList = ({
|
|
|
2783
2783
|
},
|
|
2784
2784
|
onDismiss: () => {
|
|
2785
2785
|
queryClient.invalidateQueries({
|
|
2786
|
-
queryKey: [
|
|
2786
|
+
queryKey: [import_core15.QueryConstants.GetTenants]
|
|
2787
2787
|
});
|
|
2788
2788
|
setTenantActionDialog(null);
|
|
2789
2789
|
}
|
|
@@ -2812,7 +2812,7 @@ var TenantList = ({
|
|
|
2812
2812
|
var import_react25 = require("react");
|
|
2813
2813
|
var import_react_query9 = require("@tanstack/react-query");
|
|
2814
2814
|
var import_api_proxy11 = require("@geowiki/api-proxy");
|
|
2815
|
-
var
|
|
2815
|
+
var import_core16 = require("@geowiki/core");
|
|
2816
2816
|
var import_classnames4 = __toESM(require("classnames"));
|
|
2817
2817
|
var import_lucide_react3 = require("lucide-react");
|
|
2818
2818
|
var import_design_system28 = require("@geowiki/design-system");
|
|
@@ -2837,7 +2837,7 @@ var AddUser = ({ showButtonAdd }) => {
|
|
|
2837
2837
|
variant: "default"
|
|
2838
2838
|
});
|
|
2839
2839
|
queryClient.invalidateQueries({
|
|
2840
|
-
queryKey: [
|
|
2840
|
+
queryKey: [import_core16.QueryConstants.GetUsers]
|
|
2841
2841
|
});
|
|
2842
2842
|
setOpen(false);
|
|
2843
2843
|
} catch (err) {
|
|
@@ -2984,22 +2984,22 @@ var DeleteUser = ({
|
|
|
2984
2984
|
};
|
|
2985
2985
|
|
|
2986
2986
|
// src/components/User/UserDropDown.tsx
|
|
2987
|
-
var
|
|
2988
|
-
var
|
|
2987
|
+
var import_core17 = require("@geowiki/core");
|
|
2988
|
+
var import_core18 = require("@geowiki/core");
|
|
2989
2989
|
var import_design_system30 = require("@geowiki/design-system");
|
|
2990
2990
|
var import_react27 = require("react");
|
|
2991
2991
|
var import_uuid3 = require("uuid");
|
|
2992
|
-
var
|
|
2993
|
-
var
|
|
2994
|
-
var
|
|
2992
|
+
var import_core19 = require("@geowiki/core");
|
|
2993
|
+
var import_core20 = require("@geowiki/core");
|
|
2994
|
+
var import_core21 = require("@geowiki/core");
|
|
2995
2995
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2996
2996
|
var UserDropDown = () => {
|
|
2997
2997
|
var _a, _b, _c, _d, _e;
|
|
2998
|
-
const session = (0,
|
|
2999
|
-
const currentUser = (0,
|
|
3000
|
-
const hasAdmin = (_a = currentUser == null ? void 0 : currentUser.roles) == null ? void 0 : _a.includes(
|
|
2998
|
+
const session = (0, import_core18.useSession)();
|
|
2999
|
+
const currentUser = (0, import_core19.useCurrentUser)();
|
|
3000
|
+
const hasAdmin = (_a = currentUser == null ? void 0 : currentUser.roles) == null ? void 0 : _a.includes(import_core20.USER_ROLE.ADMIN);
|
|
3001
3001
|
const picture = (_c = (_b = session.data) == null ? void 0 : _b.user) == null ? void 0 : _c.image;
|
|
3002
|
-
const isFeatureEnabled = (0,
|
|
3002
|
+
const isFeatureEnabled = (0, import_core21.useFeature)(import_core21.Features.FarmerCluster);
|
|
3003
3003
|
const menus = (0, import_react27.useMemo)(() => {
|
|
3004
3004
|
return [
|
|
3005
3005
|
{
|
|
@@ -3046,7 +3046,7 @@ var UserDropDown = () => {
|
|
|
3046
3046
|
currentUser.surName.charAt(0)
|
|
3047
3047
|
] }) : (_e = (_d = currentUser == null ? void 0 : currentUser.userName) == null ? void 0 : _d.slice(0, 2)) != null ? _e : "" })
|
|
3048
3048
|
] }) }),
|
|
3049
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_design_system30.DropdownMenuContent, { className: "w-[10rem]", children: (isFeatureEnabled ? menusRecodo : menus).map((m) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_design_system30.DropdownMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3049
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_design_system30.DropdownMenuContent, { className: "w-[10rem]", children: (isFeatureEnabled ? menusRecodo : menus).map((m) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_design_system30.DropdownMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core17.Link, { href: m.link, className: "w-full block", children: m.name }) }, (0, import_uuid3.v4)())) })
|
|
3050
3050
|
] }) });
|
|
3051
3051
|
};
|
|
3052
3052
|
|
|
@@ -3056,17 +3056,17 @@ var import_react_hook_form11 = require("react-hook-form");
|
|
|
3056
3056
|
var import_uuid4 = require("uuid");
|
|
3057
3057
|
var import_api_proxy13 = require("@geowiki/api-proxy");
|
|
3058
3058
|
var import_design_system31 = require("@geowiki/design-system");
|
|
3059
|
-
var
|
|
3059
|
+
var import_core23 = require("@geowiki/core");
|
|
3060
3060
|
var import_design_system32 = require("@geowiki/design-system");
|
|
3061
3061
|
var import_classnames5 = __toESM(require("classnames"));
|
|
3062
3062
|
var import_design_system33 = require("@geowiki/design-system");
|
|
3063
3063
|
|
|
3064
3064
|
// src/components/Elements/RequireFeature.tsx
|
|
3065
|
-
var
|
|
3065
|
+
var import_core22 = require("@geowiki/core");
|
|
3066
3066
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3067
3067
|
var RequireFeature = ({ children, feature }) => {
|
|
3068
3068
|
var _a;
|
|
3069
|
-
const { data: appConfig } = (0,
|
|
3069
|
+
const { data: appConfig } = (0, import_core22.useAppConfig)();
|
|
3070
3070
|
var grantedFeatures = appConfig == null ? void 0 : appConfig.features;
|
|
3071
3071
|
const granted = (_a = grantedFeatures == null ? void 0 : grantedFeatures.values) == null ? void 0 : _a[feature];
|
|
3072
3072
|
if ((granted == null ? void 0 : granted.toLowerCase()) === "true") {
|
|
@@ -3079,7 +3079,7 @@ var RequireFeature = ({ children, feature }) => {
|
|
|
3079
3079
|
var import_design_system34 = require("@geowiki/design-system");
|
|
3080
3080
|
var import_evoland_api_proxy = require("@geowiki/evoland-api-proxy");
|
|
3081
3081
|
var import_react_data_table_component = __toESM(require("react-data-table-component"));
|
|
3082
|
-
var
|
|
3082
|
+
var import_core24 = require("@geowiki/core");
|
|
3083
3083
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3084
3084
|
var TABS_NAME = {
|
|
3085
3085
|
USERS_EDIT: "user_edit",
|
|
@@ -3098,17 +3098,17 @@ var UserEdit = ({ userDto, userId, onDismiss }) => {
|
|
|
3098
3098
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
3099
3099
|
const [open, setOpen] = (0, import_react28.useState)(false);
|
|
3100
3100
|
const { toast: toast2 } = (0, import_design_system31.useToast)();
|
|
3101
|
-
const evolandFeature = (0,
|
|
3101
|
+
const evolandFeature = (0, import_core23.useFeature)("GeoWiki.EvoLand");
|
|
3102
3102
|
const { handleSubmit, register } = (0, import_react_hook_form11.useForm)();
|
|
3103
3103
|
const [roles, setRoles] = (0, import_react28.useState)([]);
|
|
3104
|
-
const userRole = (0,
|
|
3105
|
-
const assignableRoles = (0,
|
|
3104
|
+
const userRole = (0, import_core23.useUserRoles)({ userId });
|
|
3105
|
+
const assignableRoles = (0, import_core23.useAssignableRoles)();
|
|
3106
3106
|
const [refreshData, setRefreshData] = (0, import_react28.useState)(true);
|
|
3107
3107
|
const [updateUserProject, setUpdateUserProject] = (0, import_react28.useState)(false);
|
|
3108
3108
|
const [userAlias, setUserAlias] = (0, import_react28.useState)(() => formatUserAlias(userDto.userName));
|
|
3109
|
-
const { theme } = (0,
|
|
3110
|
-
const { data: projects } = (0,
|
|
3111
|
-
const { data: userCurrentProject } = (0,
|
|
3109
|
+
const { theme } = (0, import_core24.useTheme)();
|
|
3110
|
+
const { data: projects } = (0, import_core23.useProjects)(evolandFeature, 0, 50);
|
|
3111
|
+
const { data: userCurrentProject } = (0, import_core23.useGetUserProject)(
|
|
3112
3112
|
userId,
|
|
3113
3113
|
evolandFeature && refreshData == true
|
|
3114
3114
|
);
|
|
@@ -3119,14 +3119,14 @@ var UserEdit = ({ userDto, userId, onDismiss }) => {
|
|
|
3119
3119
|
const [userProjectRole, setUserProjectRole] = (0, import_react28.useState)(
|
|
3120
3120
|
[]
|
|
3121
3121
|
);
|
|
3122
|
-
const { data: updateUserRoleProjectResult } = (0,
|
|
3122
|
+
const { data: updateUserRoleProjectResult } = (0, import_core23.useAssignProjectToUser)(
|
|
3123
3123
|
userProjectRole,
|
|
3124
3124
|
updateUserProject
|
|
3125
3125
|
);
|
|
3126
3126
|
const [contractStartDate, setContractStartDate] = (0, import_react28.useState)("");
|
|
3127
3127
|
const [contractEndDate, setContractEndDate] = (0, import_react28.useState)("");
|
|
3128
3128
|
const [updateUserDetail, setUpdateUserDetail] = (0, import_react28.useState)(false);
|
|
3129
|
-
const { data: setUserDetail } = (0,
|
|
3129
|
+
const { data: setUserDetail } = (0, import_core23.useUpdateUserDetail)(
|
|
3130
3130
|
{
|
|
3131
3131
|
user_id: userId,
|
|
3132
3132
|
contract_start_date: contractStartDate,
|
|
@@ -3483,7 +3483,7 @@ var UserEdit = ({ userDto, userId, onDismiss }) => {
|
|
|
3483
3483
|
};
|
|
3484
3484
|
|
|
3485
3485
|
// src/components/User/UserList.tsx
|
|
3486
|
-
var
|
|
3486
|
+
var import_core27 = require("@geowiki/core");
|
|
3487
3487
|
var import_react32 = require("react");
|
|
3488
3488
|
var import_react_table2 = require("@tanstack/react-table");
|
|
3489
3489
|
var import_design_system38 = require("@geowiki/design-system");
|
|
@@ -3494,7 +3494,7 @@ var import_api_proxy14 = require("@geowiki/api-proxy");
|
|
|
3494
3494
|
var import_react_query10 = require("@tanstack/react-query");
|
|
3495
3495
|
var import_uuid5 = require("uuid");
|
|
3496
3496
|
var import_design_system37 = require("@geowiki/design-system");
|
|
3497
|
-
var
|
|
3497
|
+
var import_core25 = require("@geowiki/core");
|
|
3498
3498
|
|
|
3499
3499
|
// src/components/Permission/Permission.tsx
|
|
3500
3500
|
var import_classnames6 = __toESM(require("classnames"));
|
|
@@ -3674,7 +3674,7 @@ var TogglePermission = ({
|
|
|
3674
3674
|
};
|
|
3675
3675
|
|
|
3676
3676
|
// src/components/User/UserPermission.tsx
|
|
3677
|
-
var
|
|
3677
|
+
var import_core26 = require("@geowiki/core");
|
|
3678
3678
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3679
3679
|
var UserPermission = ({
|
|
3680
3680
|
userDto,
|
|
@@ -3683,17 +3683,17 @@ var UserPermission = ({
|
|
|
3683
3683
|
}) => {
|
|
3684
3684
|
const [open, setOpen] = (0, import_react31.useState)(false);
|
|
3685
3685
|
const { toast: toast2 } = (0, import_design_system37.useToast)();
|
|
3686
|
-
const userRoles = (0,
|
|
3686
|
+
const userRoles = (0, import_core25.useUserRoles)({ userId });
|
|
3687
3687
|
const [hasAllGranted, setHasAllGranted] = (0, import_react31.useState)(false);
|
|
3688
3688
|
const [currentPermissionGrant, setCurrentPermissionGrant] = (0, import_react31.useState)();
|
|
3689
|
-
const { data } = (0,
|
|
3689
|
+
const { data } = (0, import_core25.usePermissions)(import_core26.PermissionProvider.U, userId);
|
|
3690
3690
|
const queryClient = (0, import_react_query10.useQueryClient)();
|
|
3691
3691
|
const [permissionGroups, setPermissionGroups] = (0, import_react31.useState)([]);
|
|
3692
3692
|
(0, import_react31.useEffect)(() => {
|
|
3693
3693
|
setOpen(true);
|
|
3694
3694
|
return () => {
|
|
3695
3695
|
queryClient.invalidateQueries({
|
|
3696
|
-
queryKey: [
|
|
3696
|
+
queryKey: [import_core26.PermissionProvider.U]
|
|
3697
3697
|
});
|
|
3698
3698
|
};
|
|
3699
3699
|
}, [queryClient]);
|
|
@@ -3792,7 +3792,7 @@ var UserPermission = ({
|
|
|
3792
3792
|
};
|
|
3793
3793
|
try {
|
|
3794
3794
|
yield import_api_proxy14.PermissionsService.permissionsUpdate(
|
|
3795
|
-
|
|
3795
|
+
import_core26.PermissionProvider.U,
|
|
3796
3796
|
userId,
|
|
3797
3797
|
requestPayload
|
|
3798
3798
|
);
|
|
@@ -3802,7 +3802,7 @@ var UserPermission = ({
|
|
|
3802
3802
|
variant: "default"
|
|
3803
3803
|
});
|
|
3804
3804
|
queryClient.invalidateQueries({
|
|
3805
|
-
queryKey: [
|
|
3805
|
+
queryKey: [import_core26.PermissionProvider.U]
|
|
3806
3806
|
});
|
|
3807
3807
|
onCloseEvent();
|
|
3808
3808
|
} catch (err) {
|
|
@@ -3828,7 +3828,7 @@ var UserPermission = ({
|
|
|
3828
3828
|
return userRoles.data.items.filter(
|
|
3829
3829
|
(role) => {
|
|
3830
3830
|
var _a2;
|
|
3831
|
-
return (_a2 = role.name) == null ? void 0 : _a2.includes(
|
|
3831
|
+
return (_a2 = role.name) == null ? void 0 : _a2.includes(import_core26.USER_ROLE.ADMIN);
|
|
3832
3832
|
}
|
|
3833
3833
|
).length > 0;
|
|
3834
3834
|
}
|
|
@@ -3922,7 +3922,7 @@ var UserPermission = ({
|
|
|
3922
3922
|
// src/components/User/UserList.tsx
|
|
3923
3923
|
var import_react_query11 = require("@tanstack/react-query");
|
|
3924
3924
|
var import_design_system39 = require("@geowiki/design-system");
|
|
3925
|
-
var
|
|
3925
|
+
var import_core28 = require("@geowiki/core");
|
|
3926
3926
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3927
3927
|
var UserList = ({
|
|
3928
3928
|
data,
|
|
@@ -3976,7 +3976,7 @@ var UserList = ({
|
|
|
3976
3976
|
icon: "trash",
|
|
3977
3977
|
showButton: showButtonArray[2],
|
|
3978
3978
|
visible: (_a2 = info.row.original.userName) == null ? void 0 : _a2.includes(
|
|
3979
|
-
|
|
3979
|
+
import_core28.USER_ROLE.ADMIN
|
|
3980
3980
|
),
|
|
3981
3981
|
callback: () => {
|
|
3982
3982
|
setUserActionDialog({
|
|
@@ -4033,7 +4033,7 @@ var UserList = ({
|
|
|
4033
4033
|
userDto: userActionDialog.userDto,
|
|
4034
4034
|
onDismiss: () => {
|
|
4035
4035
|
queryClient.invalidateQueries({
|
|
4036
|
-
queryKey: [
|
|
4036
|
+
queryKey: [import_core27.QueryConstants.GetUsers]
|
|
4037
4037
|
});
|
|
4038
4038
|
setUserActionDialog(null);
|
|
4039
4039
|
}
|
|
@@ -4056,7 +4056,7 @@ var UserList = ({
|
|
|
4056
4056
|
},
|
|
4057
4057
|
onDismiss: () => {
|
|
4058
4058
|
queryClient.invalidateQueries({
|
|
4059
|
-
queryKey: [
|
|
4059
|
+
queryKey: [import_core27.QueryConstants.GetUsers]
|
|
4060
4060
|
});
|
|
4061
4061
|
setUserActionDialog(null);
|
|
4062
4062
|
}
|
|
@@ -4075,12 +4075,12 @@ var UserList = ({
|
|
|
4075
4075
|
};
|
|
4076
4076
|
|
|
4077
4077
|
// src/components/User/UserMenus.tsx
|
|
4078
|
-
var
|
|
4078
|
+
var import_core29 = require("@geowiki/core");
|
|
4079
4079
|
var import_cookies_next = require("cookies-next");
|
|
4080
4080
|
var import_design_system40 = require("@geowiki/design-system");
|
|
4081
4081
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
4082
4082
|
var UserMenus = ({}) => {
|
|
4083
|
-
var session = (0,
|
|
4083
|
+
var session = (0, import_core29.useSession)();
|
|
4084
4084
|
const renderElement = () => {
|
|
4085
4085
|
if (session.data) {
|
|
4086
4086
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(UserDropDown, {});
|
|
@@ -4093,7 +4093,7 @@ var UserMenus = ({}) => {
|
|
|
4093
4093
|
size: "sm",
|
|
4094
4094
|
className: "w-full mt-2 sm:w-1/2 sm:mt-0",
|
|
4095
4095
|
onClick: () => {
|
|
4096
|
-
(0,
|
|
4096
|
+
(0, import_core29.signIn)(void 0, void 0, {
|
|
4097
4097
|
__tenant: (0, import_cookies_next.getCookie)("__tenant")
|
|
4098
4098
|
});
|
|
4099
4099
|
},
|
|
@@ -4168,7 +4168,7 @@ var import_react_hook_form12 = require("react-hook-form");
|
|
|
4168
4168
|
var import_classnames8 = __toESM(require("classnames"));
|
|
4169
4169
|
var import_api_proxy16 = require("@geowiki/api-proxy");
|
|
4170
4170
|
var import_design_system42 = require("@geowiki/design-system");
|
|
4171
|
-
var
|
|
4171
|
+
var import_core30 = require("@geowiki/core");
|
|
4172
4172
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
4173
4173
|
var RoleEdit = ({ roleDto, roleId, onDismiss }) => {
|
|
4174
4174
|
var _a;
|
|
@@ -4218,7 +4218,7 @@ var RoleEdit = ({ roleDto, roleId, onDismiss }) => {
|
|
|
4218
4218
|
__spreadValues({
|
|
4219
4219
|
required: true,
|
|
4220
4220
|
label: "Name",
|
|
4221
|
-
disabled: roleDto.name.includes(
|
|
4221
|
+
disabled: roleDto.name.includes(import_core30.USER_ROLE.ADMIN),
|
|
4222
4222
|
defaultValue: (_a = roleDto.name) != null ? _a : ""
|
|
4223
4223
|
}, register("name"))
|
|
4224
4224
|
),
|
|
@@ -4280,7 +4280,7 @@ var RoleEdit = ({ roleDto, roleId, onDismiss }) => {
|
|
|
4280
4280
|
|
|
4281
4281
|
// src/components/Role/RoleList.tsx
|
|
4282
4282
|
var import_react36 = require("react");
|
|
4283
|
-
var
|
|
4283
|
+
var import_core33 = require("@geowiki/core");
|
|
4284
4284
|
var import_react_table3 = require("@tanstack/react-table");
|
|
4285
4285
|
var import_design_system44 = require("@geowiki/design-system");
|
|
4286
4286
|
|
|
@@ -4289,23 +4289,23 @@ var import_react35 = require("react");
|
|
|
4289
4289
|
var import_api_proxy17 = require("@geowiki/api-proxy");
|
|
4290
4290
|
var import_uuid6 = require("uuid");
|
|
4291
4291
|
var import_design_system43 = require("@geowiki/design-system");
|
|
4292
|
-
var
|
|
4292
|
+
var import_core31 = require("@geowiki/core");
|
|
4293
4293
|
var import_react_query12 = require("@tanstack/react-query");
|
|
4294
|
-
var
|
|
4294
|
+
var import_core32 = require("@geowiki/core");
|
|
4295
4295
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
4296
4296
|
var RolePermission = ({ roleDto, onDismiss }) => {
|
|
4297
4297
|
const [open, setOpen] = (0, import_react35.useState)(false);
|
|
4298
4298
|
const { toast: toast2 } = (0, import_design_system43.useToast)();
|
|
4299
4299
|
const [hasAllGranted, setHasAllGranted] = (0, import_react35.useState)(false);
|
|
4300
4300
|
const [currentPermissionGrant, setCurrentPermissionGrant] = (0, import_react35.useState)();
|
|
4301
|
-
const { data } = (0,
|
|
4301
|
+
const { data } = (0, import_core31.usePermissions)(import_core32.PermissionProvider.R, roleDto.name);
|
|
4302
4302
|
const queryClient = (0, import_react_query12.useQueryClient)();
|
|
4303
4303
|
const [permissionGroups, setPermissionGroups] = (0, import_react35.useState)([]);
|
|
4304
4304
|
(0, import_react35.useEffect)(() => {
|
|
4305
4305
|
setOpen(true);
|
|
4306
4306
|
return () => {
|
|
4307
4307
|
queryClient.invalidateQueries({
|
|
4308
|
-
queryKey: [
|
|
4308
|
+
queryKey: [import_core32.PermissionProvider.R]
|
|
4309
4309
|
});
|
|
4310
4310
|
};
|
|
4311
4311
|
}, [queryClient]);
|
|
@@ -4404,7 +4404,7 @@ var RolePermission = ({ roleDto, onDismiss }) => {
|
|
|
4404
4404
|
};
|
|
4405
4405
|
try {
|
|
4406
4406
|
yield import_api_proxy17.PermissionsService.permissionsUpdate(
|
|
4407
|
-
|
|
4407
|
+
import_core32.PermissionProvider.R,
|
|
4408
4408
|
roleDto.name,
|
|
4409
4409
|
requestPayload
|
|
4410
4410
|
);
|
|
@@ -4414,7 +4414,7 @@ var RolePermission = ({ roleDto, onDismiss }) => {
|
|
|
4414
4414
|
variant: "default"
|
|
4415
4415
|
});
|
|
4416
4416
|
queryClient.invalidateQueries({
|
|
4417
|
-
queryKey: [
|
|
4417
|
+
queryKey: [import_core32.PermissionProvider.R]
|
|
4418
4418
|
});
|
|
4419
4419
|
onCloseEvent();
|
|
4420
4420
|
} catch (err) {
|
|
@@ -4435,7 +4435,7 @@ var RolePermission = ({ roleDto, onDismiss }) => {
|
|
|
4435
4435
|
onDismiss();
|
|
4436
4436
|
}, [onDismiss]);
|
|
4437
4437
|
const hasAdmin = (0, import_react35.useMemo)(
|
|
4438
|
-
() => roleDto.name.includes(
|
|
4438
|
+
() => roleDto.name.includes(import_core32.USER_ROLE.ADMIN),
|
|
4439
4439
|
[roleDto]
|
|
4440
4440
|
);
|
|
4441
4441
|
const renderTogglePermission = (0, import_react35.useCallback)(() => {
|
|
@@ -4526,7 +4526,7 @@ var RolePermission = ({ roleDto, onDismiss }) => {
|
|
|
4526
4526
|
// src/components/Role/RoleList.tsx
|
|
4527
4527
|
var import_react_query13 = require("@tanstack/react-query");
|
|
4528
4528
|
var import_design_system45 = require("@geowiki/design-system");
|
|
4529
|
-
var
|
|
4529
|
+
var import_core34 = require("@geowiki/core");
|
|
4530
4530
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
4531
4531
|
var RoleList = ({
|
|
4532
4532
|
data,
|
|
@@ -4580,7 +4580,7 @@ var RoleList = ({
|
|
|
4580
4580
|
icon: "trash",
|
|
4581
4581
|
showButton: showButtonArray[2],
|
|
4582
4582
|
visible: (_a2 = info.row.original.name) == null ? void 0 : _a2.includes(
|
|
4583
|
-
|
|
4583
|
+
import_core34.USER_ROLE.ADMIN
|
|
4584
4584
|
),
|
|
4585
4585
|
callback: () => {
|
|
4586
4586
|
setRoleActionDialog({
|
|
@@ -4643,7 +4643,7 @@ var RoleList = ({
|
|
|
4643
4643
|
roleDto: roleActionDialog.roleDto,
|
|
4644
4644
|
onDismiss: () => {
|
|
4645
4645
|
queryClient.invalidateQueries({
|
|
4646
|
-
queryKey: [
|
|
4646
|
+
queryKey: [import_core33.QueryConstants.GetRoles]
|
|
4647
4647
|
});
|
|
4648
4648
|
setRoleActionDialog(null);
|
|
4649
4649
|
}
|
|
@@ -4658,7 +4658,7 @@ var RoleList = ({
|
|
|
4658
4658
|
},
|
|
4659
4659
|
onDismiss: () => {
|
|
4660
4660
|
queryClient.invalidateQueries({
|
|
4661
|
-
queryKey: [
|
|
4661
|
+
queryKey: [import_core33.QueryConstants.GetRoles]
|
|
4662
4662
|
});
|
|
4663
4663
|
setRoleActionDialog(null);
|
|
4664
4664
|
}
|
|
@@ -4686,7 +4686,7 @@ var RoleList = ({
|
|
|
4686
4686
|
// src/components/Role/AddRole.tsx
|
|
4687
4687
|
var import_react37 = require("react");
|
|
4688
4688
|
var import_api_proxy18 = require("@geowiki/api-proxy");
|
|
4689
|
-
var
|
|
4689
|
+
var import_core35 = require("@geowiki/core");
|
|
4690
4690
|
var import_classnames9 = __toESM(require("classnames"));
|
|
4691
4691
|
var import_lucide_react4 = require("lucide-react");
|
|
4692
4692
|
var import_design_system46 = require("@geowiki/design-system");
|
|
@@ -4712,7 +4712,7 @@ var AddRole = ({ showButtonAdd }) => {
|
|
|
4712
4712
|
variant: "default"
|
|
4713
4713
|
});
|
|
4714
4714
|
queryClient.invalidateQueries({
|
|
4715
|
-
queryKey: [
|
|
4715
|
+
queryKey: [import_core35.QueryConstants.GetRoles]
|
|
4716
4716
|
});
|
|
4717
4717
|
setOpen(false);
|
|
4718
4718
|
} catch (err) {
|
|
@@ -4799,7 +4799,7 @@ var AddRole = ({ showButtonAdd }) => {
|
|
|
4799
4799
|
var import_react_resizable_panels = require("react-resizable-panels");
|
|
4800
4800
|
var import_design_system47 = require("@geowiki/design-system");
|
|
4801
4801
|
var import_lucide_react5 = require("lucide-react");
|
|
4802
|
-
var
|
|
4802
|
+
var import_core36 = require("@geowiki/core");
|
|
4803
4803
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
4804
4804
|
var PanelMain = ({
|
|
4805
4805
|
direction = "horizontal",
|
|
@@ -4808,7 +4808,7 @@ var PanelMain = ({
|
|
|
4808
4808
|
middlePanel,
|
|
4809
4809
|
onResize
|
|
4810
4810
|
}) => {
|
|
4811
|
-
var panelStore = (0,
|
|
4811
|
+
var panelStore = (0, import_core36.usePanelStore)();
|
|
4812
4812
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_react_resizable_panels.PanelGroup, { autoSaveId: "conditional", direction, children: [
|
|
4813
4813
|
panelStore.isLeftPanelOpen && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
4814
4814
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
@@ -4900,18 +4900,18 @@ var import_react41 = require("react");
|
|
|
4900
4900
|
// src/components/Admin/Sidebar.tsx
|
|
4901
4901
|
var import_react38 = __toESM(require("react"));
|
|
4902
4902
|
var import_classnames10 = __toESM(require("classnames"));
|
|
4903
|
-
var
|
|
4903
|
+
var import_core38 = require("@geowiki/core");
|
|
4904
4904
|
var import_solid3 = require("@heroicons/react/24/solid");
|
|
4905
4905
|
var import_uuid7 = require("uuid");
|
|
4906
4906
|
var import_design_system48 = require("@geowiki/design-system");
|
|
4907
|
-
var
|
|
4907
|
+
var import_core39 = require("@geowiki/core");
|
|
4908
4908
|
var import_react39 = require("react");
|
|
4909
4909
|
|
|
4910
4910
|
// src/components/Admin/RequireRole.tsx
|
|
4911
|
-
var
|
|
4911
|
+
var import_core37 = require("@geowiki/core");
|
|
4912
4912
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
4913
4913
|
var RequireRole = ({ roles, children }) => {
|
|
4914
|
-
const currentUser = (0,
|
|
4914
|
+
const currentUser = (0, import_core37.useCurrentUser)();
|
|
4915
4915
|
if (!currentUser)
|
|
4916
4916
|
return null;
|
|
4917
4917
|
if (!(roles == null ? void 0 : roles.some((role) => {
|
|
@@ -4923,7 +4923,7 @@ var RequireRole = ({ roles, children }) => {
|
|
|
4923
4923
|
};
|
|
4924
4924
|
|
|
4925
4925
|
// src/components/Admin/Sidebar.tsx
|
|
4926
|
-
var
|
|
4926
|
+
var import_core40 = require("@geowiki/core");
|
|
4927
4927
|
var import_design_system49 = require("@geowiki/design-system");
|
|
4928
4928
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
4929
4929
|
var SidebarIcon = ({ type }) => {
|
|
@@ -4951,7 +4951,7 @@ var CustomLink = ({
|
|
|
4951
4951
|
icon: icon2,
|
|
4952
4952
|
className
|
|
4953
4953
|
}) => {
|
|
4954
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_core38.Link, { href: m.link, passHref: true, className: "block", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
4955
4955
|
"section",
|
|
4956
4956
|
{
|
|
4957
4957
|
className: (0, import_classnames10.default)(
|
|
@@ -4983,8 +4983,8 @@ var Sidebar = ({
|
|
|
4983
4983
|
generalSettings
|
|
4984
4984
|
}) => {
|
|
4985
4985
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
4986
|
-
const router = (0,
|
|
4987
|
-
const { data: appConfig, isLoading: isAppConfigLoading } = (0,
|
|
4986
|
+
const router = (0, import_core39.useRouter)();
|
|
4987
|
+
const { data: appConfig, isLoading: isAppConfigLoading } = (0, import_core40.useAppConfig)();
|
|
4988
4988
|
const getDefaultValue = (0, import_react39.useCallback)(
|
|
4989
4989
|
(menu) => {
|
|
4990
4990
|
var _a2;
|
|
@@ -5055,7 +5055,7 @@ var Sidebar = ({
|
|
|
5055
5055
|
),
|
|
5056
5056
|
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("section", { className: "h-full w-full", children: [
|
|
5057
5057
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("section", { className: "flex items-center", children: [
|
|
5058
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5058
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_core38.Link, { className: "normal-case text-xl px-4", href: "/", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex flex-row cursor-pointer h-full w-full", children: ((_b = (_a = generalSettings == null ? void 0 : generalSettings.GeoWikiSettings) == null ? void 0 : _a.Logo) == null ? void 0 : _b.Paths) && ((_e = (_d = (_c = generalSettings.GeoWikiSettings) == null ? void 0 : _c.Logo) == null ? void 0 : _d.Paths) == null ? void 0 : _e[0]) && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5059
5059
|
import_design_system48.CustomImage,
|
|
5060
5060
|
{
|
|
5061
5061
|
src: ((_f = generalSettings.GeoWikiSettings.Host) == null ? void 0 : _f.Text) + "/media/" + ((_i = (_h = (_g = generalSettings.GeoWikiSettings) == null ? void 0 : _g.Logo) == null ? void 0 : _h.Paths) == null ? void 0 : _i[0]),
|
|
@@ -5075,7 +5075,7 @@ var Sidebar = ({
|
|
|
5075
5075
|
}
|
|
5076
5076
|
)
|
|
5077
5077
|
] }),
|
|
5078
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("nav", { className: "mt-5", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("section", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_design_system48.Accordion, { type: "single", collapsible: true, children:
|
|
5078
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("nav", { className: "mt-5", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("section", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_design_system48.Accordion, { type: "single", collapsible: true, children: import_core40.AdminMenus.map(renderElements) }) }) })
|
|
5079
5079
|
] })
|
|
5080
5080
|
}
|
|
5081
5081
|
);
|
|
@@ -5084,12 +5084,12 @@ var Sidebar = ({
|
|
|
5084
5084
|
// src/components/Layouts/AdminLayout.tsx
|
|
5085
5085
|
var import_solid4 = require("@heroicons/react/24/solid");
|
|
5086
5086
|
var import_design_system51 = require("@geowiki/design-system");
|
|
5087
|
-
var
|
|
5087
|
+
var import_core42 = require("@geowiki/core");
|
|
5088
5088
|
|
|
5089
5089
|
// src/components/Shared/auth/AuthenticationFailure.tsx
|
|
5090
5090
|
var import_react40 = require("react");
|
|
5091
5091
|
var import_design_system50 = require("@geowiki/design-system");
|
|
5092
|
-
var
|
|
5092
|
+
var import_core41 = require("@geowiki/core");
|
|
5093
5093
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
5094
5094
|
var AuthenticationFailure = ({}) => {
|
|
5095
5095
|
const [open, setOpen] = (0, import_react40.useState)(false);
|
|
@@ -5117,7 +5117,7 @@ var AuthenticationFailure = ({}) => {
|
|
|
5117
5117
|
import_design_system50.Button,
|
|
5118
5118
|
{
|
|
5119
5119
|
onClick: () => {
|
|
5120
|
-
(0,
|
|
5120
|
+
(0, import_core41.signIn)();
|
|
5121
5121
|
},
|
|
5122
5122
|
variant: "default",
|
|
5123
5123
|
children: "Login"
|
|
@@ -5128,7 +5128,7 @@ var AuthenticationFailure = ({}) => {
|
|
|
5128
5128
|
};
|
|
5129
5129
|
|
|
5130
5130
|
// src/components/Layouts/AdminLayout.tsx
|
|
5131
|
-
var
|
|
5131
|
+
var import_core43 = require("@geowiki/core");
|
|
5132
5132
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
5133
5133
|
var AdminLayout = ({
|
|
5134
5134
|
children,
|
|
@@ -5136,14 +5136,14 @@ var AdminLayout = ({
|
|
|
5136
5136
|
}) => {
|
|
5137
5137
|
var _a, _b, _c, _d, _e;
|
|
5138
5138
|
const [toggleSidebar, setToggleSidebar] = (0, import_react41.useState)(false);
|
|
5139
|
-
const currentUser = (0,
|
|
5140
|
-
const { status: sessionStatus } = (0,
|
|
5139
|
+
const currentUser = (0, import_core42.useCurrentUser)();
|
|
5140
|
+
const { status: sessionStatus } = (0, import_core42.useSession)();
|
|
5141
5141
|
const cmsUrl = (_b = (_a = generalSettings == null ? void 0 : generalSettings.GeoWikiSettings) == null ? void 0 : _a.Host) == null ? void 0 : _b.Text;
|
|
5142
5142
|
var favicon = (_e = (_d = (_c = generalSettings == null ? void 0 : generalSettings.GeoWikiSettings) == null ? void 0 : _c.FavIcon) == null ? void 0 : _d.Paths) == null ? void 0 : _e[0];
|
|
5143
|
-
const faviconPath = cmsUrl
|
|
5143
|
+
const faviconPath = favicon && cmsUrl ? `${cmsUrl}/media/${favicon}` : "";
|
|
5144
5144
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("main", { children: [
|
|
5145
5145
|
sessionStatus === "unauthenticated" && currentUser && !(currentUser == null ? void 0 : currentUser.isAuthenticated) && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(AuthenticationFailure, {}),
|
|
5146
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
5146
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_core43.Head, { children: faviconPath && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("link", { rel: "icon", href: faviconPath }) }),
|
|
5147
5147
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
5148
5148
|
Sidebar,
|
|
5149
5149
|
{
|
|
@@ -5185,7 +5185,7 @@ var AdminLayout = ({
|
|
|
5185
5185
|
};
|
|
5186
5186
|
|
|
5187
5187
|
// src/components/Layouts/MapLayout.tsx
|
|
5188
|
-
var
|
|
5188
|
+
var import_core44 = require("@geowiki/core");
|
|
5189
5189
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
5190
5190
|
var MapLayout = ({ title, children, settings }) => {
|
|
5191
5191
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
@@ -5207,21 +5207,21 @@ var MapLayout = ({ title, children, settings }) => {
|
|
|
5207
5207
|
}
|
|
5208
5208
|
);
|
|
5209
5209
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { children: [
|
|
5210
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
5210
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_core44.Head, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("title", { children: title }) }),
|
|
5211
5211
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TopNavbar, { branding, mainMenu, canLogin: true }),
|
|
5212
5212
|
children
|
|
5213
5213
|
] });
|
|
5214
5214
|
};
|
|
5215
5215
|
|
|
5216
5216
|
// src/components/Elements/HtmlView.tsx
|
|
5217
|
-
var
|
|
5217
|
+
var import_core45 = require("@geowiki/core");
|
|
5218
5218
|
var import_html_react_parser = __toESM(require("html-react-parser"));
|
|
5219
5219
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
5220
5220
|
var HtmlView = (props) => {
|
|
5221
5221
|
const options = {
|
|
5222
5222
|
replace: (domNode) => {
|
|
5223
5223
|
var _a;
|
|
5224
|
-
const cmsUrl =
|
|
5224
|
+
const cmsUrl = import_core45.configStore.getState().cmsUrl;
|
|
5225
5225
|
if (domNode.type === "text") {
|
|
5226
5226
|
var node = domNode;
|
|
5227
5227
|
var data = node.data;
|
|
@@ -5264,7 +5264,7 @@ var TopProgress = () => {
|
|
|
5264
5264
|
};
|
|
5265
5265
|
|
|
5266
5266
|
// src/components/Elements/Pagination.tsx
|
|
5267
|
-
var
|
|
5267
|
+
var import_core46 = require("@geowiki/core");
|
|
5268
5268
|
var import_classnames11 = __toESM(require("classnames"));
|
|
5269
5269
|
var import_solid5 = require("@heroicons/react/20/solid");
|
|
5270
5270
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
@@ -5277,7 +5277,7 @@ var Pagination = ({
|
|
|
5277
5277
|
elementId,
|
|
5278
5278
|
scrollToTop = false
|
|
5279
5279
|
}) => {
|
|
5280
|
-
const paginationRange = (0,
|
|
5280
|
+
const paginationRange = (0, import_core46.usePagination)({
|
|
5281
5281
|
currentPage,
|
|
5282
5282
|
totalCount,
|
|
5283
5283
|
siblingCount,
|
|
@@ -5351,16 +5351,16 @@ var import_react_hook_form14 = require("react-hook-form");
|
|
|
5351
5351
|
|
|
5352
5352
|
// src/components/Elements/custom-dropdown.tsx
|
|
5353
5353
|
var import_async = __toESM(require("react-select/async"));
|
|
5354
|
-
var
|
|
5355
|
-
var
|
|
5356
|
-
var
|
|
5354
|
+
var import_core47 = require("@geowiki/core");
|
|
5355
|
+
var import_core48 = require("@geowiki/core");
|
|
5356
|
+
var import_core49 = require("@geowiki/core");
|
|
5357
5357
|
var import_design_system52 = require("@geowiki/design-system");
|
|
5358
5358
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
5359
5359
|
var CustomDropDown = (props) => {
|
|
5360
5360
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
5361
|
-
const { theme } = (0,
|
|
5362
|
-
var { data: ConfigSettings, isLoading: IsConfigSettingsLoaded } = (0,
|
|
5363
|
-
const { data } = (0,
|
|
5361
|
+
const { theme } = (0, import_core47.useTheme)();
|
|
5362
|
+
var { data: ConfigSettings, isLoading: IsConfigSettingsLoaded } = (0, import_core49.useConfigSettings)();
|
|
5363
|
+
const { data } = (0, import_core48.useLookUp)(
|
|
5364
5364
|
props.FetchDetail,
|
|
5365
5365
|
props.Parameter,
|
|
5366
5366
|
(_b = (_a = ConfigSettings == null ? void 0 : ConfigSettings.ConfigSettings) == null ? void 0 : _a.LookUpClusterCountries) == null ? void 0 : _b.Text,
|
|
@@ -5592,23 +5592,23 @@ var CustomFilterSort = (props) => {
|
|
|
5592
5592
|
};
|
|
5593
5593
|
|
|
5594
5594
|
// src/components/Elements/InfoCard.tsx
|
|
5595
|
-
var
|
|
5596
|
-
var
|
|
5595
|
+
var import_core50 = require("@geowiki/core");
|
|
5596
|
+
var import_core51 = require("@geowiki/core");
|
|
5597
5597
|
var import_framer_motion2 = require("framer-motion");
|
|
5598
|
-
var
|
|
5598
|
+
var import_core52 = require("@geowiki/core");
|
|
5599
5599
|
var import_design_system53 = require("@geowiki/design-system");
|
|
5600
5600
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5601
5601
|
var InfoCard = (props) => {
|
|
5602
5602
|
var _a;
|
|
5603
|
-
var { data: ConfigSettings, isLoading: IsConfigSettingsLoaded } = (0,
|
|
5603
|
+
var { data: ConfigSettings, isLoading: IsConfigSettingsLoaded } = (0, import_core50.useConfigSettings)();
|
|
5604
5604
|
if (IsConfigSettingsLoaded)
|
|
5605
5605
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_design_system53.LoaderFull, {});
|
|
5606
5606
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
5607
5607
|
import_framer_motion2.motion.li,
|
|
5608
5608
|
{
|
|
5609
5609
|
className: "h-full lg:h-full flex flex-col cursor-pointer",
|
|
5610
|
-
variants:
|
|
5611
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "m-2 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
5610
|
+
variants: import_core52.itemVariants,
|
|
5611
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "m-2 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_core51.Link, { href: props.url, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "container w-full h-full lg:h-full bg-no-repeat bg-cover ripple shadow-lg rounded-lg pb-6 lg:pb-2 md-pb-2 object-cover", children: [
|
|
5612
5612
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
5613
5613
|
"img",
|
|
5614
5614
|
{
|
|
@@ -5723,7 +5723,7 @@ var DialogWrapper = ({
|
|
|
5723
5723
|
var import_react45 = require("react");
|
|
5724
5724
|
var import_styles = require("react-multi-carousel/lib/styles.css");
|
|
5725
5725
|
var import_framer_motion3 = require("framer-motion");
|
|
5726
|
-
var
|
|
5726
|
+
var import_core53 = require("@geowiki/core");
|
|
5727
5727
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
5728
5728
|
var ContentGrid = (props) => {
|
|
5729
5729
|
var _a;
|
|
@@ -5740,7 +5740,7 @@ var ContentGrid = (props) => {
|
|
|
5740
5740
|
initial: "initial",
|
|
5741
5741
|
animate: "enter",
|
|
5742
5742
|
exit: "exit",
|
|
5743
|
-
variants:
|
|
5743
|
+
variants: import_core53.listVariants,
|
|
5744
5744
|
children: [
|
|
5745
5745
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
5746
5746
|
"ul",
|
|
@@ -5800,7 +5800,7 @@ var ShowTagItem = (props) => {
|
|
|
5800
5800
|
};
|
|
5801
5801
|
|
|
5802
5802
|
// src/components/Elements/PageNotFound.tsx
|
|
5803
|
-
var
|
|
5803
|
+
var import_core54 = require("@geowiki/core");
|
|
5804
5804
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5805
5805
|
var PageNotFound = (_props) => {
|
|
5806
5806
|
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: " min-h-screen px-4 py-16 sm:px-6 sm:py-24 md:grid md:place-items-center lg:px-8", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "max-w-max mx-auto", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("main", { className: "sm:flex", children: [
|
|
@@ -5810,7 +5810,7 @@ var PageNotFound = (_props) => {
|
|
|
5810
5810
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("h1", { className: "text-4xl font-extrabold tracking-tight sm:text-5xl", children: "Page not found" }),
|
|
5811
5811
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "mt-1 text-base ", children: "Please check the URL in the address bar and try again." })
|
|
5812
5812
|
] }),
|
|
5813
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "mt-10 flex space-x-3 sm:border-l sm:border-transparent sm:pl-6", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
5813
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "mt-10 flex space-x-3 sm:border-l sm:border-transparent sm:pl-6", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_core54.Link, { href: "/", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
5814
5814
|
"div",
|
|
5815
5815
|
{
|
|
5816
5816
|
className: "inline-flex items-center px-4 py-2 border text-white cursor-pointer\n border-transparent text-sm font-medium rounded-md shadow-sm\n bg-primary-600 hover:bg-primary-700 focus:outline-none\n focus:ring-2 focus:ring-offset-2 focus:ring-primary-500",
|
|
@@ -5822,8 +5822,8 @@ var PageNotFound = (_props) => {
|
|
|
5822
5822
|
};
|
|
5823
5823
|
|
|
5824
5824
|
// src/components/Elements/CmsImage.tsx
|
|
5825
|
-
var
|
|
5826
|
-
var
|
|
5825
|
+
var import_core55 = require("@geowiki/core");
|
|
5826
|
+
var import_core56 = require("@geowiki/core");
|
|
5827
5827
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5828
5828
|
var CmsImage = ({
|
|
5829
5829
|
src,
|
|
@@ -5833,13 +5833,13 @@ var CmsImage = ({
|
|
|
5833
5833
|
className = "relative w-full h-full",
|
|
5834
5834
|
showPlaceholder = true
|
|
5835
5835
|
}) => {
|
|
5836
|
-
var { data: cmsImageUrl, isLoading } = (0,
|
|
5836
|
+
var { data: cmsImageUrl, isLoading } = (0, import_core56.useCmsImage)(src);
|
|
5837
5837
|
if (isLoading)
|
|
5838
5838
|
return null;
|
|
5839
5839
|
if (width && height) {
|
|
5840
5840
|
if (!showPlaceholder)
|
|
5841
5841
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5842
|
-
|
|
5842
|
+
import_core55.Image,
|
|
5843
5843
|
{
|
|
5844
5844
|
className,
|
|
5845
5845
|
src: cmsImageUrl,
|
|
@@ -5851,12 +5851,12 @@ var CmsImage = ({
|
|
|
5851
5851
|
}
|
|
5852
5852
|
);
|
|
5853
5853
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5854
|
-
|
|
5854
|
+
import_core55.Image,
|
|
5855
5855
|
{
|
|
5856
5856
|
className,
|
|
5857
5857
|
src: cmsImageUrl,
|
|
5858
5858
|
alt,
|
|
5859
|
-
placeholder: `data:image/svg+xml;base64,${(0,
|
|
5859
|
+
placeholder: `data:image/svg+xml;base64,${(0, import_core56.toBase64)((0, import_core56.shimmer)(700, 490))}`,
|
|
5860
5860
|
width,
|
|
5861
5861
|
height,
|
|
5862
5862
|
quality: 90,
|
|
@@ -5866,7 +5866,7 @@ var CmsImage = ({
|
|
|
5866
5866
|
}
|
|
5867
5867
|
if (!showPlaceholder)
|
|
5868
5868
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5869
|
-
|
|
5869
|
+
import_core55.Image,
|
|
5870
5870
|
{
|
|
5871
5871
|
className,
|
|
5872
5872
|
src: cmsImageUrl,
|
|
@@ -5878,11 +5878,11 @@ var CmsImage = ({
|
|
|
5878
5878
|
}
|
|
5879
5879
|
);
|
|
5880
5880
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5881
|
-
|
|
5881
|
+
import_core55.Image,
|
|
5882
5882
|
{
|
|
5883
5883
|
className: "rounded-xl",
|
|
5884
5884
|
src: cmsImageUrl,
|
|
5885
|
-
placeholder: `data:image/svg+xml;base64,${(0,
|
|
5885
|
+
placeholder: `data:image/svg+xml;base64,${(0, import_core56.toBase64)((0, import_core56.shimmer)(700, 490))}`,
|
|
5886
5886
|
alt: src,
|
|
5887
5887
|
quality: 90,
|
|
5888
5888
|
fill: true,
|
|
@@ -5895,7 +5895,7 @@ var CmsImage = ({
|
|
|
5895
5895
|
};
|
|
5896
5896
|
|
|
5897
5897
|
// src/components/Elements/video.tsx
|
|
5898
|
-
var
|
|
5898
|
+
var import_core57 = require("@geowiki/core");
|
|
5899
5899
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5900
5900
|
var Video = ({
|
|
5901
5901
|
media,
|
|
@@ -5904,8 +5904,8 @@ var Video = ({
|
|
|
5904
5904
|
controls = true,
|
|
5905
5905
|
autoPlay = false
|
|
5906
5906
|
}) => {
|
|
5907
|
-
const fullVideoUrl = (0,
|
|
5908
|
-
const fullPosterUrl = (0,
|
|
5907
|
+
const fullVideoUrl = (0, import_core57.getMediaUrl)(media.url);
|
|
5908
|
+
const fullPosterUrl = (0, import_core57.getMediaUrl)(poster == null ? void 0 : poster.url);
|
|
5909
5909
|
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5910
5910
|
"video",
|
|
5911
5911
|
{
|
|
@@ -6004,13 +6004,13 @@ function News({ news }) {
|
|
|
6004
6004
|
}
|
|
6005
6005
|
|
|
6006
6006
|
// src/components/Elements/application-view.tsx
|
|
6007
|
-
var
|
|
6007
|
+
var import_core58 = require("@geowiki/core");
|
|
6008
6008
|
var import_framer_motion4 = require("framer-motion");
|
|
6009
6009
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
6010
6010
|
function ApplicationView({ app, cmsUrl }) {
|
|
6011
6011
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
6012
6012
|
var imageUrl = `${cmsUrl}/media/${(_c = (_b = (_a = app == null ? void 0 : app.Application) == null ? void 0 : _a.Image) == null ? void 0 : _b.Paths) == null ? void 0 : _c[0]}`;
|
|
6013
|
-
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_framer_motion4.motion.li, { variants:
|
|
6013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_framer_motion4.motion.li, { variants: import_core58.itemVariants, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "space-y-4", children: [
|
|
6014
6014
|
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
6015
6015
|
NextImage,
|
|
6016
6016
|
{
|
|
@@ -6301,7 +6301,7 @@ var UiTimer = ({
|
|
|
6301
6301
|
var import_react_multi_carousel = __toESM(require("react-multi-carousel"));
|
|
6302
6302
|
var import_styles2 = require("react-multi-carousel/lib/styles.css");
|
|
6303
6303
|
var import_framer_motion5 = require("framer-motion");
|
|
6304
|
-
var
|
|
6304
|
+
var import_core59 = require("@geowiki/core");
|
|
6305
6305
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
6306
6306
|
var ContentCarousel = (props) => {
|
|
6307
6307
|
var _a;
|
|
@@ -6313,11 +6313,11 @@ var ContentCarousel = (props) => {
|
|
|
6313
6313
|
initial: "initial",
|
|
6314
6314
|
animate: "enter",
|
|
6315
6315
|
exit: "exit",
|
|
6316
|
-
variants:
|
|
6316
|
+
variants: import_core59.listVariants,
|
|
6317
6317
|
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
6318
6318
|
import_react_multi_carousel.default,
|
|
6319
6319
|
{
|
|
6320
|
-
responsive:
|
|
6320
|
+
responsive: import_core59.Responsive,
|
|
6321
6321
|
className: "gd-carousel pb-5",
|
|
6322
6322
|
itemClass: "carouselItem",
|
|
6323
6323
|
renderButtonGroupOutside: true,
|
|
@@ -6476,11 +6476,11 @@ var CoverImage = (props) => {
|
|
|
6476
6476
|
};
|
|
6477
6477
|
|
|
6478
6478
|
// src/components/Input/RichTextContent.tsx
|
|
6479
|
-
var
|
|
6479
|
+
var import_core60 = require("@geowiki/core");
|
|
6480
6480
|
var import_react47 = require("react");
|
|
6481
6481
|
var import_quill_snow = require("react-quill/dist/quill.snow.css");
|
|
6482
6482
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
6483
|
-
var ReactQuill = (0,
|
|
6483
|
+
var ReactQuill = (0, import_core60.dynamic)(() => import("react-quill"), { ssr: false });
|
|
6484
6484
|
var modules = {
|
|
6485
6485
|
blotFormatter: {
|
|
6486
6486
|
align: {
|
|
@@ -6604,11 +6604,11 @@ var RichTextContent = (props) => {
|
|
|
6604
6604
|
|
|
6605
6605
|
// src/components/Input/MultiSelectFreeText.tsx
|
|
6606
6606
|
var import_creatable = __toESM(require("react-select/creatable"));
|
|
6607
|
-
var
|
|
6607
|
+
var import_core61 = require("@geowiki/core");
|
|
6608
6608
|
var import_react_hook_form15 = require("react-hook-form");
|
|
6609
6609
|
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
6610
6610
|
var MultiSelectFreeText = (props) => {
|
|
6611
|
-
const { theme } = (0,
|
|
6611
|
+
const { theme } = (0, import_core61.useTheme)();
|
|
6612
6612
|
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { children: [
|
|
6613
6613
|
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
6614
6614
|
"label",
|
|
@@ -6664,18 +6664,18 @@ var MultiSelectFreeText = (props) => {
|
|
|
6664
6664
|
};
|
|
6665
6665
|
|
|
6666
6666
|
// src/components/Button/EditLinkButton.tsx
|
|
6667
|
-
var
|
|
6667
|
+
var import_core62 = require("@geowiki/core");
|
|
6668
6668
|
var import_design_system57 = require("@geowiki/design-system");
|
|
6669
6669
|
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
6670
6670
|
var EditLinkButton = (props) => {
|
|
6671
|
-
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
6671
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_core62.Link, { href: props.href, passHref: true, onClick: props.onClick, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_design_system57.DesignButton, { variant: "outline", size: "xs", children: "Edit" }) }, props.href);
|
|
6672
6672
|
};
|
|
6673
6673
|
|
|
6674
6674
|
// src/components/Button/ViewLink.tsx
|
|
6675
|
-
var
|
|
6675
|
+
var import_core63 = require("@geowiki/core");
|
|
6676
6676
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
6677
6677
|
var ViewLink = (props) => {
|
|
6678
|
-
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
6678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_core63.Link, { href: props.href, passHref: true, target: "_blank", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
6679
6679
|
"svg",
|
|
6680
6680
|
{
|
|
6681
6681
|
width: "24",
|
|
@@ -6690,7 +6690,7 @@ var ViewLink = (props) => {
|
|
|
6690
6690
|
};
|
|
6691
6691
|
|
|
6692
6692
|
// src/components/Button/ButtonList.tsx
|
|
6693
|
-
var
|
|
6693
|
+
var import_core64 = require("@geowiki/core");
|
|
6694
6694
|
var import_design_system58 = require("@geowiki/design-system");
|
|
6695
6695
|
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
6696
6696
|
var ButtonList = ({ data }) => {
|
|
@@ -6699,7 +6699,7 @@ var ButtonList = ({ data }) => {
|
|
|
6699
6699
|
return data == null ? void 0 : data.map((button) => {
|
|
6700
6700
|
var _a;
|
|
6701
6701
|
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_design_system58.Button, { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6702
|
-
|
|
6702
|
+
import_core64.Link,
|
|
6703
6703
|
{
|
|
6704
6704
|
className: "m-1",
|
|
6705
6705
|
href: button.LinkMenuItemPart.Url,
|
|
@@ -6713,11 +6713,11 @@ var ButtonList = ({ data }) => {
|
|
|
6713
6713
|
|
|
6714
6714
|
// src/components/Shared/Error.tsx
|
|
6715
6715
|
var import_design_system59 = require("@geowiki/design-system");
|
|
6716
|
-
var
|
|
6717
|
-
var
|
|
6716
|
+
var import_core65 = require("@geowiki/core");
|
|
6717
|
+
var import_core66 = require("@geowiki/core");
|
|
6718
6718
|
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
6719
6719
|
var Error2 = () => {
|
|
6720
|
-
const router = (0,
|
|
6720
|
+
const router = (0, import_core65.useRouter)();
|
|
6721
6721
|
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "lg:px-24 lg:py-24 md:py-20 md:px-44 px-4 py-24 items-center flex justify-center flex-col-reverse lg:flex-row md:gap-28 gap-1 bg-base-200", children: [
|
|
6722
6722
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "w-full xl:w-1/2 relative lg:pb-0", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "absolute", children: [
|
|
6723
6723
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("h1", { className: "my-2 text-primary font-bold text-2xl", children: "Looks like you've found the doorway to the great nothing" }),
|
|
@@ -6734,7 +6734,7 @@ var Error2 = () => {
|
|
|
6734
6734
|
)
|
|
6735
6735
|
] }) }) }),
|
|
6736
6736
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6737
|
-
|
|
6737
|
+
import_core66.Image,
|
|
6738
6738
|
{
|
|
6739
6739
|
src: "/img/Group.png",
|
|
6740
6740
|
width: 500,
|
|
@@ -6747,7 +6747,7 @@ var Error2 = () => {
|
|
|
6747
6747
|
|
|
6748
6748
|
// src/components/Shared/CookieConsent.tsx
|
|
6749
6749
|
var import_react48 = require("react");
|
|
6750
|
-
var
|
|
6750
|
+
var import_core67 = require("@geowiki/core");
|
|
6751
6751
|
var import_cookies_next2 = require("cookies-next");
|
|
6752
6752
|
var import_design_system60 = require("@geowiki/design-system");
|
|
6753
6753
|
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
@@ -6781,13 +6781,13 @@ var CookieConsent = ({ gTagId }) => {
|
|
|
6781
6781
|
};
|
|
6782
6782
|
const analyticsScripts = hasAccepted && gTagId ? /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
|
|
6783
6783
|
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6784
|
-
|
|
6784
|
+
import_core67.Script,
|
|
6785
6785
|
{
|
|
6786
6786
|
src: `https://www.googletagmanager.com/gtag/js?id=${gTagId}`,
|
|
6787
6787
|
strategy: "afterInteractive"
|
|
6788
6788
|
}
|
|
6789
6789
|
),
|
|
6790
|
-
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6790
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_core67.Script, { id: "ga-init", strategy: "afterInteractive", children: `window.dataLayer = window.dataLayer || [];
|
|
6791
6791
|
function gtag(){dataLayer.push(arguments);}
|
|
6792
6792
|
gtag('js', new Date());
|
|
6793
6793
|
gtag('config', '${gTagId}');` })
|
|
@@ -6799,11 +6799,11 @@ gtag('config', '${gTagId}');` })
|
|
|
6799
6799
|
};
|
|
6800
6800
|
|
|
6801
6801
|
// src/components/News/NewsItemList.tsx
|
|
6802
|
-
var
|
|
6802
|
+
var import_core69 = require("@geowiki/core");
|
|
6803
6803
|
|
|
6804
6804
|
// src/components/DesignElements/NewsArticle/NewsArticle.tsx
|
|
6805
6805
|
var import_design_system61 = require("@geowiki/design-system");
|
|
6806
|
-
var
|
|
6806
|
+
var import_core68 = require("@geowiki/core");
|
|
6807
6807
|
var import_react49 = require("react");
|
|
6808
6808
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
6809
6809
|
var NewsArticle = (props) => {
|
|
@@ -6813,7 +6813,7 @@ var NewsArticle = (props) => {
|
|
|
6813
6813
|
setImageSrc("/assets/farmer-cluster/no-image-news-article.jpg");
|
|
6814
6814
|
setImageError(true);
|
|
6815
6815
|
};
|
|
6816
|
-
return props.link && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6816
|
+
return props.link && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_core68.Link, { href: props.link, target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "h-auto w-full flex-col flex items-start justify-start space-y-2 relative lg:space-y-4 ", children: [
|
|
6817
6817
|
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "w-full pb-1 h-60 rounded-2xl relative flex items-center justify-center lg:pb-0", children: [
|
|
6818
6818
|
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6819
6819
|
"img",
|
|
@@ -6856,7 +6856,7 @@ var NewsArticle = (props) => {
|
|
|
6856
6856
|
};
|
|
6857
6857
|
|
|
6858
6858
|
// src/components/News/NewsItemList.tsx
|
|
6859
|
-
var
|
|
6859
|
+
var import_core70 = require("@geowiki/core");
|
|
6860
6860
|
var import_uuid8 = require("uuid");
|
|
6861
6861
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
6862
6862
|
var NewsItemList = ({ newsItems }) => {
|
|
@@ -6865,7 +6865,7 @@ var NewsItemList = ({ newsItems }) => {
|
|
|
6865
6865
|
{ key: "en", value: "English" },
|
|
6866
6866
|
{ key: "fr", value: "Fran\xE7ais" }
|
|
6867
6867
|
];
|
|
6868
|
-
const router = (0,
|
|
6868
|
+
const router = (0, import_core70.useRouter)();
|
|
6869
6869
|
const { lang } = router.query;
|
|
6870
6870
|
var currentLang = "all";
|
|
6871
6871
|
if (lang) {
|
|
@@ -6877,7 +6877,7 @@ var NewsItemList = ({ newsItems }) => {
|
|
|
6877
6877
|
"div",
|
|
6878
6878
|
{
|
|
6879
6879
|
className: "my-2 lg:p-2 lg:border rounded-lg cursor-pointer lg:hover:bg-gray-100",
|
|
6880
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
6880
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_core69.Link, { href: `/news?lang=${lang2.key}`, children: [
|
|
6881
6881
|
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "label-text pr-2 lg:px-4", children: lang2.value }),
|
|
6882
6882
|
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "float-right md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "w-6 h-6 relative", children: [
|
|
6883
6883
|
lang2.key === currentLang && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
|
|
@@ -6917,20 +6917,20 @@ var NewsItemList = ({ newsItems }) => {
|
|
|
6917
6917
|
};
|
|
6918
6918
|
|
|
6919
6919
|
// src/components/Publications/PublicationList.tsx
|
|
6920
|
-
var
|
|
6920
|
+
var import_core73 = require("@geowiki/core");
|
|
6921
6921
|
var import_framer_motion7 = require("framer-motion");
|
|
6922
6922
|
|
|
6923
6923
|
// src/components/Publications/PublicationItem.tsx
|
|
6924
|
-
var
|
|
6924
|
+
var import_core71 = require("@geowiki/core");
|
|
6925
6925
|
var import_framer_motion6 = require("framer-motion");
|
|
6926
|
-
var
|
|
6926
|
+
var import_core72 = require("@geowiki/core");
|
|
6927
6927
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
6928
6928
|
var PublicationItem = ({ publication }) => {
|
|
6929
6929
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
6930
|
-
var cmsUrl = (0,
|
|
6930
|
+
var cmsUrl = (0, import_core71.useCmsUrl)();
|
|
6931
6931
|
var imageUrl = `${cmsUrl}/media/${(_c = (_b = (_a = publication.Publication) == null ? void 0 : _a.Image) == null ? void 0 : _b.Paths) == null ? void 0 : _c[0]}`;
|
|
6932
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_framer_motion6.motion.li, { variants:
|
|
6933
|
-
|
|
6932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_framer_motion6.motion.li, { variants: import_core71.itemVariants, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6933
|
+
import_core72.Link,
|
|
6934
6934
|
{
|
|
6935
6935
|
href: `/science/${(_d = publication.AutoroutePart) == null ? void 0 : _d.Path}`,
|
|
6936
6936
|
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
@@ -6986,7 +6986,7 @@ var PublicationList = ({ publications }) => {
|
|
|
6986
6986
|
initial: "initial",
|
|
6987
6987
|
animate: "enter",
|
|
6988
6988
|
exit: "exit",
|
|
6989
|
-
variants:
|
|
6989
|
+
variants: import_core73.listVariants,
|
|
6990
6990
|
children: publications && publications.map((post) => {
|
|
6991
6991
|
var _a;
|
|
6992
6992
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(PublicationItem, { publication: post }, (_a = post.AutoroutePart) == null ? void 0 : _a.Path);
|
|
@@ -7044,10 +7044,10 @@ var HeroWithCenterText = (props) => {
|
|
|
7044
7044
|
};
|
|
7045
7045
|
|
|
7046
7046
|
// src/components/Hero/HeroWithMap.tsx
|
|
7047
|
-
var
|
|
7047
|
+
var import_core79 = require("@geowiki/core");
|
|
7048
7048
|
var import_react50 = require("react");
|
|
7049
7049
|
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
7050
|
-
var MapWithNoSSR = (0,
|
|
7050
|
+
var MapWithNoSSR = (0, import_core79.dynamic)(
|
|
7051
7051
|
() => Promise.resolve().then(() => (init_cluster_map(), cluster_map_exports)).then((x) => x.FarmerClusterMap),
|
|
7052
7052
|
{
|
|
7053
7053
|
ssr: false
|
|
@@ -7249,7 +7249,7 @@ var import_design_system64 = require("@geowiki/design-system");
|
|
|
7249
7249
|
var import_api_proxy19 = require("@geowiki/api-proxy");
|
|
7250
7250
|
var import_sweetalert2 = __toESM(require("sweetalert2"));
|
|
7251
7251
|
var import_outline4 = require("@heroicons/react/24/outline");
|
|
7252
|
-
var
|
|
7252
|
+
var import_core80 = require("@geowiki/core");
|
|
7253
7253
|
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
7254
7254
|
var UpdatePassword = (props) => {
|
|
7255
7255
|
const {
|
|
@@ -7262,7 +7262,7 @@ var UpdatePassword = (props) => {
|
|
|
7262
7262
|
const [ConfirmPassword, setConfirmPassword] = (0, import_react51.useState)(false);
|
|
7263
7263
|
const [CurrentPasswordType, setCurrentPasswordType] = (0, import_react51.useState)("password");
|
|
7264
7264
|
const [NewPasswordType, setNewPasswordType] = (0, import_react51.useState)("password");
|
|
7265
|
-
const router = (0,
|
|
7265
|
+
const router = (0, import_core80.useRouter)();
|
|
7266
7266
|
const onPasswordChange = (key, value) => {
|
|
7267
7267
|
if (key !== "confirmnewPassword")
|
|
7268
7268
|
setPasswordData(() => {
|
|
@@ -7580,7 +7580,7 @@ var UpdateUserProfile = ({
|
|
|
7580
7580
|
};
|
|
7581
7581
|
|
|
7582
7582
|
// src/components/Admin/SettingsManagement.tsx
|
|
7583
|
-
var
|
|
7583
|
+
var import_core81 = require("@geowiki/core");
|
|
7584
7584
|
|
|
7585
7585
|
// src/components/Admin/SettingsItem.tsx
|
|
7586
7586
|
var import_api_proxy21 = require("@geowiki/api-proxy");
|
|
@@ -7634,7 +7634,7 @@ var import_clsx = __toESM(require("clsx"));
|
|
|
7634
7634
|
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
7635
7635
|
var SettingsManagement = () => {
|
|
7636
7636
|
var _a;
|
|
7637
|
-
var { data, isLoading } = (0,
|
|
7637
|
+
var { data, isLoading } = (0, import_core81.useAppConfig)();
|
|
7638
7638
|
if (isLoading)
|
|
7639
7639
|
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { children: "Loading..." });
|
|
7640
7640
|
const keys = Object == null ? void 0 : Object.keys((_a = data == null ? void 0 : data.setting) == null ? void 0 : _a.values);
|
|
@@ -7743,7 +7743,7 @@ var FAQ = ({ faqs, backgroundColor }) => {
|
|
|
7743
7743
|
};
|
|
7744
7744
|
|
|
7745
7745
|
// src/components/DesignElements/pagination.tsx
|
|
7746
|
-
var
|
|
7746
|
+
var import_core82 = require("@geowiki/core");
|
|
7747
7747
|
var import_classnames12 = __toESM(require("classnames"));
|
|
7748
7748
|
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
7749
7749
|
var DesignPagination = ({
|
|
@@ -7755,7 +7755,7 @@ var DesignPagination = ({
|
|
|
7755
7755
|
elementId,
|
|
7756
7756
|
scrollToTop = false
|
|
7757
7757
|
}) => {
|
|
7758
|
-
const paginationRange = (0,
|
|
7758
|
+
const paginationRange = (0, import_core82.usePagination)({
|
|
7759
7759
|
currentPage,
|
|
7760
7760
|
totalCount,
|
|
7761
7761
|
siblingCount,
|
|
@@ -7997,10 +7997,10 @@ var DesignFooter = (props) => {
|
|
|
7997
7997
|
var import_react58 = require("react");
|
|
7998
7998
|
var import_react59 = require("@headlessui/react");
|
|
7999
7999
|
var import_design_system70 = require("@geowiki/design-system");
|
|
8000
|
-
var
|
|
8000
|
+
var import_core83 = require("@geowiki/core");
|
|
8001
8001
|
var import_outline7 = require("@heroicons/react/24/outline");
|
|
8002
8002
|
var import_solid6 = require("@heroicons/react/20/solid");
|
|
8003
|
-
var
|
|
8003
|
+
var import_core84 = require("@geowiki/core");
|
|
8004
8004
|
|
|
8005
8005
|
// src/components/DesignElements/Notification.tsx
|
|
8006
8006
|
var import_react56 = require("@headlessui/react");
|
|
@@ -8096,7 +8096,7 @@ var Notification = ({
|
|
|
8096
8096
|
};
|
|
8097
8097
|
|
|
8098
8098
|
// src/components/DesignElements/header.tsx
|
|
8099
|
-
var
|
|
8099
|
+
var import_core85 = require("@geowiki/core");
|
|
8100
8100
|
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
8101
8101
|
var DesignHeader = ({
|
|
8102
8102
|
branding,
|
|
@@ -8110,9 +8110,9 @@ var DesignHeader = ({
|
|
|
8110
8110
|
var _a, _b, _c;
|
|
8111
8111
|
const [mobileMenuOpen, setMobileMenuOpen] = (0, import_react58.useState)(false);
|
|
8112
8112
|
const [openNotification, setOpenNotification] = (0, import_react58.useState)(false);
|
|
8113
|
-
const isFeatureEnabled = (0,
|
|
8113
|
+
const isFeatureEnabled = (0, import_core85.useFeature)(import_core85.Features.FarmerCluster);
|
|
8114
8114
|
let rootPath = "/";
|
|
8115
|
-
const { data: settings } = (0,
|
|
8115
|
+
const { data: settings } = (0, import_core85.useGeoWikiSettings)();
|
|
8116
8116
|
if (settings) {
|
|
8117
8117
|
rootPath = (_c = (_b = (_a = settings.GeoWikiSettings) == null ? void 0 : _a.RootUrl) == null ? void 0 : _b.Text) != null ? _c : "/";
|
|
8118
8118
|
}
|
|
@@ -8128,7 +8128,7 @@ var DesignHeader = ({
|
|
|
8128
8128
|
className: "flex items-center justify-between p-4 lg:px-12 min-h-12",
|
|
8129
8129
|
"aria-label": "Global",
|
|
8130
8130
|
children: [
|
|
8131
|
-
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "lg:flex lg:flex-1 hidden", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
8131
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "lg:flex lg:flex-1 hidden", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_core84.Link, { href: rootPath, className: "-m-1.5 p-1.5 min-h-16", children: [
|
|
8132
8132
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "sr-only", children: branding.title }),
|
|
8133
8133
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
8134
8134
|
CmsImage,
|
|
@@ -8144,7 +8144,7 @@ var DesignHeader = ({
|
|
|
8144
8144
|
)
|
|
8145
8145
|
] }) }),
|
|
8146
8146
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "flex lg:hidden w-full", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex items-center justify-between w-full", children: [
|
|
8147
|
-
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
8147
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_core84.Link, { href: rootPath, className: "flex-shrink-0", children: [
|
|
8148
8148
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "sr-only", children: branding.title }),
|
|
8149
8149
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
8150
8150
|
CmsImage,
|
|
@@ -8193,7 +8193,7 @@ var DesignHeader = ({
|
|
|
8193
8193
|
{
|
|
8194
8194
|
className: "group relative flex rounded-lg text-sm leading-tight",
|
|
8195
8195
|
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
8196
|
-
|
|
8196
|
+
import_core84.Link,
|
|
8197
8197
|
{
|
|
8198
8198
|
href: subItem.link,
|
|
8199
8199
|
className: "block font-medium min-w-[120px] hover:font-semibold ",
|
|
@@ -8205,7 +8205,7 @@ var DesignHeader = ({
|
|
|
8205
8205
|
subItem.text
|
|
8206
8206
|
)) }) })
|
|
8207
8207
|
] }, menuItem.text) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
8208
|
-
|
|
8208
|
+
import_core84.Link,
|
|
8209
8209
|
{
|
|
8210
8210
|
href: menuItem.link,
|
|
8211
8211
|
className: "text-base font-medium leading-tight",
|
|
@@ -8221,12 +8221,12 @@ var DesignHeader = ({
|
|
|
8221
8221
|
{
|
|
8222
8222
|
variant: "secondary",
|
|
8223
8223
|
size: "sm",
|
|
8224
|
-
onClick: () => (0,
|
|
8224
|
+
onClick: () => (0, import_core83.signIn)(),
|
|
8225
8225
|
children: "Login"
|
|
8226
8226
|
}
|
|
8227
8227
|
),
|
|
8228
8228
|
canSignup && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_design_system70.DesignButton, { variant: "secondary", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
8229
|
-
|
|
8229
|
+
import_core84.Link,
|
|
8230
8230
|
{
|
|
8231
8231
|
href: `${isFeatureEnabled ? "/signup" : "/register"}`,
|
|
8232
8232
|
children: "Sign up"
|
|
@@ -8235,7 +8235,7 @@ var DesignHeader = ({
|
|
|
8235
8235
|
] }),
|
|
8236
8236
|
sessionStatus === "authenticated" && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
|
|
8237
8237
|
isAdmin2 && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
8238
|
-
|
|
8238
|
+
import_core84.Link,
|
|
8239
8239
|
{
|
|
8240
8240
|
href: `${isFeatureEnabled ? "/admin/cluster" : "/admin"} `,
|
|
8241
8241
|
className: "rounded-full flex-col items-center justify-center disabled:pointer-events-none hover:brightness-90 text-primary border border-primary py-2.5 px-5 text-base font-medium",
|
|
@@ -8247,7 +8247,7 @@ var DesignHeader = ({
|
|
|
8247
8247
|
{
|
|
8248
8248
|
variant: "secondary",
|
|
8249
8249
|
size: "sm",
|
|
8250
|
-
onClick: () => (0,
|
|
8250
|
+
onClick: () => (0, import_core83.signOut)(),
|
|
8251
8251
|
children: "Logout"
|
|
8252
8252
|
}
|
|
8253
8253
|
)
|
|
@@ -8267,7 +8267,7 @@ var DesignHeader = ({
|
|
|
8267
8267
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "fixed inset-0 z-10" }),
|
|
8268
8268
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_react59.Dialog.Panel, { className: "fixed inset-y-0 right-0 z-10 flex w-full flex-col bg-white shadow-xl sm:max-w-sm", children: [
|
|
8269
8269
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex items-center justify-between p-4", children: [
|
|
8270
|
-
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
8270
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_core84.Link, { href: rootPath, className: "flex-shrink-0", children: [
|
|
8271
8271
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "sr-only", children: branding.title }),
|
|
8272
8272
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
8273
8273
|
CmsImage,
|
|
@@ -8297,7 +8297,7 @@ var DesignHeader = ({
|
|
|
8297
8297
|
] }),
|
|
8298
8298
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex-1 flex flex-col justify-between p-6", children: [
|
|
8299
8299
|
!mainMenu.some((menuItem) => menuItem.text === "Home") && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "py-2", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
8300
|
-
|
|
8300
|
+
import_core84.Link,
|
|
8301
8301
|
{
|
|
8302
8302
|
href: rootPath,
|
|
8303
8303
|
className: "block text-lg font-semibold text-gray-900 hover:text-gray-700 transition-colors duration-200",
|
|
@@ -8318,7 +8318,7 @@ var DesignHeader = ({
|
|
|
8318
8318
|
)
|
|
8319
8319
|
] }),
|
|
8320
8320
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react59.Popover.Panel, { className: "relative mt-2 ml-4", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "space-y-3", children: menuItem.subMenu.map((subItem) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
8321
|
-
|
|
8321
|
+
import_core84.Link,
|
|
8322
8322
|
{
|
|
8323
8323
|
href: subItem.link,
|
|
8324
8324
|
className: "block text-base text-gray-600 hover:text-gray-900 hover:font-medium transition-colors duration-200 py-1",
|
|
@@ -8328,7 +8328,7 @@ var DesignHeader = ({
|
|
|
8328
8328
|
}
|
|
8329
8329
|
) }, subItem.text)) }) })
|
|
8330
8330
|
] }, menuItem.text) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
8331
|
-
|
|
8331
|
+
import_core84.Link,
|
|
8332
8332
|
{
|
|
8333
8333
|
href: menuItem.link,
|
|
8334
8334
|
className: "block text-lg font-semibold text-gray-900 hover:text-gray-700 transition-colors duration-200 py-2",
|
|
@@ -8353,7 +8353,7 @@ var DesignHeader = ({
|
|
|
8353
8353
|
}
|
|
8354
8354
|
),
|
|
8355
8355
|
canSignup && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
8356
|
-
|
|
8356
|
+
import_core84.Link,
|
|
8357
8357
|
{
|
|
8358
8358
|
href: `${isFeatureEnabled ? "/signup" : "/register"}`,
|
|
8359
8359
|
className: "text-base font-medium text-gray-900 hover:text-gray-700 transition-colors duration-200",
|
|
@@ -8364,7 +8364,7 @@ var DesignHeader = ({
|
|
|
8364
8364
|
] }),
|
|
8365
8365
|
sessionStatus === "authenticated" && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "space-y-3 mb-4", children: [
|
|
8366
8366
|
isAdmin2 && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
8367
|
-
|
|
8367
|
+
import_core84.Link,
|
|
8368
8368
|
{
|
|
8369
8369
|
href: `${isFeatureEnabled ? "/admin/cluster" : "/admin"}`,
|
|
8370
8370
|
className: "block text-base font-medium text-gray-900 hover:text-gray-700 transition-colors duration-200",
|
|
@@ -8379,7 +8379,7 @@ var DesignHeader = ({
|
|
|
8379
8379
|
className: "text-base font-medium text-gray-900 hover:text-gray-700 transition-colors duration-200",
|
|
8380
8380
|
onClick: () => {
|
|
8381
8381
|
setMobileMenuOpen(false);
|
|
8382
|
-
(0,
|
|
8382
|
+
(0, import_core83.signOut)();
|
|
8383
8383
|
},
|
|
8384
8384
|
children: "Logout"
|
|
8385
8385
|
}
|
|
@@ -8387,7 +8387,7 @@ var DesignHeader = ({
|
|
|
8387
8387
|
] }),
|
|
8388
8388
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "pt-4", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex flex-wrap gap-4 text-sm text-gray-600", children: [
|
|
8389
8389
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
8390
|
-
|
|
8390
|
+
import_core84.Link,
|
|
8391
8391
|
{
|
|
8392
8392
|
href: "/page/terms-of-use",
|
|
8393
8393
|
className: "hover:text-gray-900 transition-colors duration-200",
|
|
@@ -8396,7 +8396,7 @@ var DesignHeader = ({
|
|
|
8396
8396
|
}
|
|
8397
8397
|
),
|
|
8398
8398
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
8399
|
-
|
|
8399
|
+
import_core84.Link,
|
|
8400
8400
|
{
|
|
8401
8401
|
href: "/page/privacy-policy",
|
|
8402
8402
|
className: "hover:text-gray-900 transition-colors duration-200",
|
|
@@ -8405,7 +8405,7 @@ var DesignHeader = ({
|
|
|
8405
8405
|
}
|
|
8406
8406
|
),
|
|
8407
8407
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
8408
|
-
|
|
8408
|
+
import_core84.Link,
|
|
8409
8409
|
{
|
|
8410
8410
|
href: "/page/language",
|
|
8411
8411
|
className: "hover:text-gray-900 transition-colors duration-200",
|
|
@@ -8516,7 +8516,7 @@ var SearchInput = ({
|
|
|
8516
8516
|
var DesignSearchInput = (0, import_react60.memo)(SearchInput);
|
|
8517
8517
|
|
|
8518
8518
|
// src/components/DesignElements/paginationDashboard.tsx
|
|
8519
|
-
var
|
|
8519
|
+
var import_core86 = require("@geowiki/core");
|
|
8520
8520
|
var import_classnames13 = __toESM(require("classnames"));
|
|
8521
8521
|
var import_design_system73 = require("@geowiki/design-system");
|
|
8522
8522
|
var import_design_system74 = require("@geowiki/design-system");
|
|
@@ -8531,7 +8531,7 @@ var DesignDashboardPagination = ({
|
|
|
8531
8531
|
scrollToTop = false,
|
|
8532
8532
|
pageSegments
|
|
8533
8533
|
}) => {
|
|
8534
|
-
const paginationRange = (0,
|
|
8534
|
+
const paginationRange = (0, import_core86.usePagination)({
|
|
8535
8535
|
currentPage,
|
|
8536
8536
|
totalCount,
|
|
8537
8537
|
siblingCount,
|
|
@@ -8650,11 +8650,11 @@ var DesignDashboardPagination = ({
|
|
|
8650
8650
|
|
|
8651
8651
|
// src/components/DesignElements/sort.tsx
|
|
8652
8652
|
var import_design_system75 = require("@geowiki/design-system");
|
|
8653
|
-
var
|
|
8653
|
+
var import_core87 = require("@geowiki/core");
|
|
8654
8654
|
var import_react61 = require("react");
|
|
8655
8655
|
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
8656
8656
|
var DesignSort = ({ totalCount, name }) => {
|
|
8657
|
-
const router = (0,
|
|
8657
|
+
const router = (0, import_core87.useRouter)();
|
|
8658
8658
|
const sortingTypes = ["Most recent", "Old to new"];
|
|
8659
8659
|
const [value, setValue] = (0, import_react61.useState)("Most recent");
|
|
8660
8660
|
(0, import_react61.useEffect)(() => {
|
|
@@ -8698,7 +8698,7 @@ var DesignSort = ({ totalCount, name }) => {
|
|
|
8698
8698
|
// src/components/DesignElements/filterDropdown.tsx
|
|
8699
8699
|
var import_react62 = require("@headlessui/react");
|
|
8700
8700
|
var import_lucide_react6 = require("lucide-react");
|
|
8701
|
-
var
|
|
8701
|
+
var import_core88 = require("@geowiki/core");
|
|
8702
8702
|
var import_design_system76 = require("@geowiki/design-system");
|
|
8703
8703
|
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
8704
8704
|
var FilterDropdown = ({
|
|
@@ -8706,7 +8706,7 @@ var FilterDropdown = ({
|
|
|
8706
8706
|
filterKey,
|
|
8707
8707
|
sortItems
|
|
8708
8708
|
}) => {
|
|
8709
|
-
const router = (0,
|
|
8709
|
+
const router = (0, import_core88.useRouter)();
|
|
8710
8710
|
const filterValue = router.query[filterKey];
|
|
8711
8711
|
const filterValues = (filterValue == null ? void 0 : filterValue.toString().split(",")) || [];
|
|
8712
8712
|
const handleCheckboxChange = (e, selectedItem) => {
|
|
@@ -8809,14 +8809,14 @@ var DesignTestimonials = ({ testimonials }) => {
|
|
|
8809
8809
|
|
|
8810
8810
|
// src/components/DesignElements/BannerFollowLinks.tsx
|
|
8811
8811
|
var import_design_system79 = require("@geowiki/design-system");
|
|
8812
|
-
var
|
|
8812
|
+
var import_core89 = require("@geowiki/core");
|
|
8813
8813
|
var import_uuid9 = require("uuid");
|
|
8814
8814
|
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
8815
8815
|
var BannerFollowLinks = ({ title, links }) => {
|
|
8816
8816
|
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: " py-8 mt-6 flex-col flex items-center justify-center bg-primary text-white rounded-2xl lg:pt-[100px] lg:mt-10 lg:pb-[88px] space-y-8", children: [
|
|
8817
8817
|
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_design_system79.H2Design, { className: "mx-auto max-w-5xl text-center", children: title }),
|
|
8818
8818
|
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "flex space-x-8", children: links.map((link) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
8819
|
-
|
|
8819
|
+
import_core89.Link,
|
|
8820
8820
|
{
|
|
8821
8821
|
href: link.href,
|
|
8822
8822
|
target: link.isNewTab ? "_blank" : "_self",
|
|
@@ -8830,12 +8830,12 @@ var BannerFollowLinks = ({ title, links }) => {
|
|
|
8830
8830
|
|
|
8831
8831
|
// src/components/DesignElements/ListTagsGroup.tsx
|
|
8832
8832
|
var import_design_system80 = require("@geowiki/design-system");
|
|
8833
|
-
var
|
|
8833
|
+
var import_core90 = require("@geowiki/core");
|
|
8834
8834
|
var import_design_system81 = require("@geowiki/design-system");
|
|
8835
8835
|
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
8836
8836
|
var ListTagsGroup = ({ cluster }) => {
|
|
8837
8837
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
8838
|
-
var { data: ConfigSettings, isLoading: IsConfigSettingsLoaded } = (0,
|
|
8838
|
+
var { data: ConfigSettings, isLoading: IsConfigSettingsLoaded } = (0, import_core90.useConfigSettings)();
|
|
8839
8839
|
if (IsConfigSettingsLoaded)
|
|
8840
8840
|
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_design_system81.LoaderFull, {});
|
|
8841
8841
|
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "space-y-6 lg:space-y-10", children: [
|
|
@@ -8994,8 +8994,8 @@ var ListTagsGroup = ({ cluster }) => {
|
|
|
8994
8994
|
};
|
|
8995
8995
|
|
|
8996
8996
|
// src/components/DesignElements/ApiImage.tsx
|
|
8997
|
-
var
|
|
8998
|
-
var
|
|
8997
|
+
var import_core91 = require("@geowiki/core");
|
|
8998
|
+
var import_core92 = require("@geowiki/core");
|
|
8999
8999
|
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
9000
9000
|
var ApiImage = ({
|
|
9001
9001
|
imageId,
|
|
@@ -9004,17 +9004,17 @@ var ApiImage = ({
|
|
|
9004
9004
|
width = 0,
|
|
9005
9005
|
height = 0
|
|
9006
9006
|
}) => {
|
|
9007
|
-
var { data, isLoading } = (0,
|
|
9007
|
+
var { data, isLoading } = (0, import_core91.useApiImage)(imageId);
|
|
9008
9008
|
if (isLoading)
|
|
9009
9009
|
return null;
|
|
9010
9010
|
if (width > 0 && height > 0) {
|
|
9011
9011
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
9012
|
-
|
|
9012
|
+
import_core92.Image,
|
|
9013
9013
|
{
|
|
9014
9014
|
className,
|
|
9015
9015
|
src: data,
|
|
9016
9016
|
alt,
|
|
9017
|
-
placeholder: `data:image/svg+xml;base64,${(0,
|
|
9017
|
+
placeholder: `data:image/svg+xml;base64,${(0, import_core91.toBase64)((0, import_core91.shimmer)(700, 490))}`,
|
|
9018
9018
|
width,
|
|
9019
9019
|
height,
|
|
9020
9020
|
quality: 90,
|
|
@@ -9023,13 +9023,13 @@ var ApiImage = ({
|
|
|
9023
9023
|
);
|
|
9024
9024
|
}
|
|
9025
9025
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
9026
|
-
|
|
9026
|
+
import_core92.Image,
|
|
9027
9027
|
{
|
|
9028
9028
|
className: "object-cover rounded-xl",
|
|
9029
9029
|
src: data,
|
|
9030
9030
|
alt,
|
|
9031
9031
|
fill: true,
|
|
9032
|
-
placeholder: `data:image/svg+xml;base64,${(0,
|
|
9032
|
+
placeholder: `data:image/svg+xml;base64,${(0, import_core91.toBase64)((0, import_core91.shimmer)(700, 490))}`,
|
|
9033
9033
|
quality: 90,
|
|
9034
9034
|
priority: true
|
|
9035
9035
|
}
|
|
@@ -9038,7 +9038,7 @@ var ApiImage = ({
|
|
|
9038
9038
|
|
|
9039
9039
|
// src/components/DesignElements/SignUpBanner.tsx
|
|
9040
9040
|
var import_design_system82 = require("@geowiki/design-system");
|
|
9041
|
-
var
|
|
9041
|
+
var import_core93 = require("@geowiki/core");
|
|
9042
9042
|
var import_uuid10 = require("uuid");
|
|
9043
9043
|
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
9044
9044
|
var SignUpBanner = ({
|
|
@@ -9058,7 +9058,7 @@ var SignUpBanner = ({
|
|
|
9058
9058
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "space-y-8", children: [
|
|
9059
9059
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_design_system82.Body18, { className: " max-w-sm", children: text }),
|
|
9060
9060
|
(button == null ? void 0 : button.text) && (button == null ? void 0 : button.link) && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "hidden lg:block", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
9061
|
-
|
|
9061
|
+
import_core93.Link,
|
|
9062
9062
|
{
|
|
9063
9063
|
href: button.link,
|
|
9064
9064
|
target: button.isNewTab ? "_blank" : "_self",
|
|
@@ -9082,7 +9082,7 @@ var SignUpBanner = ({
|
|
|
9082
9082
|
))
|
|
9083
9083
|
] }),
|
|
9084
9084
|
(button == null ? void 0 : button.text) && (button == null ? void 0 : button.link) && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "lg:hidden w-full", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
9085
|
-
|
|
9085
|
+
import_core93.Link,
|
|
9086
9086
|
{
|
|
9087
9087
|
href: button.link,
|
|
9088
9088
|
target: button.isNewTab ? "_blank" : "_self",
|
|
@@ -9096,13 +9096,13 @@ var SignUpBanner = ({
|
|
|
9096
9096
|
};
|
|
9097
9097
|
|
|
9098
9098
|
// src/components/DesignElements/RoutePagination.tsx
|
|
9099
|
-
var
|
|
9099
|
+
var import_core94 = require("@geowiki/core");
|
|
9100
9100
|
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
9101
9101
|
var RoutePagination = ({
|
|
9102
9102
|
pageSize,
|
|
9103
9103
|
total
|
|
9104
9104
|
}) => {
|
|
9105
|
-
const router = (0,
|
|
9105
|
+
const router = (0, import_core94.useRouter)();
|
|
9106
9106
|
const { page } = router.query;
|
|
9107
9107
|
const currentPage = parseInt(page) || 1;
|
|
9108
9108
|
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
@@ -9126,7 +9126,7 @@ var RoutePagination = ({
|
|
|
9126
9126
|
var import_react63 = require("react");
|
|
9127
9127
|
var import_design_system83 = require("@geowiki/design-system");
|
|
9128
9128
|
var import_lucide_react7 = require("lucide-react");
|
|
9129
|
-
var
|
|
9129
|
+
var import_core95 = require("@geowiki/core");
|
|
9130
9130
|
var import_cookies_next3 = require("cookies-next");
|
|
9131
9131
|
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
9132
9132
|
var cookieName2 = "recodo_language_popup";
|
|
@@ -9197,7 +9197,7 @@ var LanguagePopup = () => {
|
|
|
9197
9197
|
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_design_system83.Body16, { className: " text-grey", children: "Recodo has been developed to cater to number of diverse European countries. The majority of our content is user generated, and may not be available in your language." }),
|
|
9198
9198
|
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_design_system83.Body16, { className: " text-grey", children: "Our Languages page offers resources to help you learn more about translation options" })
|
|
9199
9199
|
] }),
|
|
9200
|
-
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "pt-4", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
9200
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "pt-4", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_core95.Link, { href: "/page/language", target: "_self", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_design_system83.DesignButton, { size: "sm", variant: "secondary", onClick: handleClose, children: "Learn more" }) }) })
|
|
9201
9201
|
] })
|
|
9202
9202
|
}
|
|
9203
9203
|
) : null;
|
|
@@ -9213,7 +9213,7 @@ var import_react68 = require("react");
|
|
|
9213
9213
|
var import_react64 = require("react");
|
|
9214
9214
|
var import_react65 = require("@headlessui/react");
|
|
9215
9215
|
var import_outline8 = require("@heroicons/react/24/outline");
|
|
9216
|
-
var
|
|
9216
|
+
var import_core96 = require("@geowiki/core");
|
|
9217
9217
|
var import_uuid11 = require("uuid");
|
|
9218
9218
|
var import_design_system84 = require("@geowiki/design-system");
|
|
9219
9219
|
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
@@ -9226,7 +9226,7 @@ function MobileFilterPopupOpened({
|
|
|
9226
9226
|
routerFiltername,
|
|
9227
9227
|
isMultiSelect
|
|
9228
9228
|
}) {
|
|
9229
|
-
const router = (0,
|
|
9229
|
+
const router = (0, import_core96.useRouter)();
|
|
9230
9230
|
const queryValue = router.query[routerFiltername];
|
|
9231
9231
|
const checkValues = typeof queryValue === "string" ? queryValue.split(",") : Array.isArray(queryValue) ? queryValue : [];
|
|
9232
9232
|
const handleShowResults = () => {
|
|
@@ -9351,7 +9351,7 @@ function MobileFilterPopupOpened({
|
|
|
9351
9351
|
|
|
9352
9352
|
// src/components/DesignElements/MobileFilterPopup.tsx
|
|
9353
9353
|
var import_design_system85 = require("@geowiki/design-system");
|
|
9354
|
-
var
|
|
9354
|
+
var import_core97 = require("@geowiki/core");
|
|
9355
9355
|
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
9356
9356
|
function MobileFilterPopup({
|
|
9357
9357
|
open,
|
|
@@ -9360,7 +9360,7 @@ function MobileFilterPopup({
|
|
|
9360
9360
|
filters,
|
|
9361
9361
|
isMultiSelect
|
|
9362
9362
|
}) {
|
|
9363
|
-
const router = (0,
|
|
9363
|
+
const router = (0, import_core97.useRouter)();
|
|
9364
9364
|
const [openStates, setOpenStates] = (0, import_react68.useState)(
|
|
9365
9365
|
filters.reduce((acc, filter) => {
|
|
9366
9366
|
acc[filter.filterName] = false;
|
|
@@ -9477,13 +9477,13 @@ function MobileFilterPopup({
|
|
|
9477
9477
|
}
|
|
9478
9478
|
|
|
9479
9479
|
// src/components/DesignElements/Link/Link.tsx
|
|
9480
|
-
var
|
|
9480
|
+
var import_core98 = require("@geowiki/core");
|
|
9481
9481
|
var import_design_system86 = require("@geowiki/design-system");
|
|
9482
9482
|
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
9483
9483
|
var DesignLink = ({ link, fillColor }) => {
|
|
9484
9484
|
fillColor = fillColor === void 0 ? "fill-black" : fillColor;
|
|
9485
9485
|
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
9486
|
-
|
|
9486
|
+
import_core98.Link,
|
|
9487
9487
|
{
|
|
9488
9488
|
href: link.href,
|
|
9489
9489
|
target: link.isNewTab ? "_blank" : "_self",
|
|
@@ -9568,12 +9568,12 @@ var DesignCustomLink = ({
|
|
|
9568
9568
|
};
|
|
9569
9569
|
|
|
9570
9570
|
// src/components/DesignElements/Link/SimpleLink.tsx
|
|
9571
|
-
var
|
|
9571
|
+
var import_core99 = require("@geowiki/core");
|
|
9572
9572
|
var import_design_system88 = require("@geowiki/design-system");
|
|
9573
9573
|
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
9574
9574
|
var SimpleLink = ({ link }) => {
|
|
9575
9575
|
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
9576
|
-
|
|
9576
|
+
import_core99.Link,
|
|
9577
9577
|
{
|
|
9578
9578
|
href: link.href,
|
|
9579
9579
|
target: link.isNewTab ? "_blank" : "_self",
|
|
@@ -9591,12 +9591,12 @@ var SimpleLink = ({ link }) => {
|
|
|
9591
9591
|
};
|
|
9592
9592
|
|
|
9593
9593
|
// src/components/DesignElements/ClusterNews/ClusterNewsItem.tsx
|
|
9594
|
-
var
|
|
9594
|
+
var import_core100 = require("@geowiki/core");
|
|
9595
9595
|
var import_design_system89 = require("@geowiki/design-system");
|
|
9596
9596
|
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
9597
9597
|
var ClusterNewsItem = (props) => {
|
|
9598
9598
|
var link = `/news/farmer-cluster/${props.id}`;
|
|
9599
|
-
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
9599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_core100.Link, { href: link, children: /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { className: "relative flex items-start justify-start", children: [
|
|
9600
9600
|
props.path && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
9601
9601
|
ApiImage,
|
|
9602
9602
|
{
|
|
@@ -9637,13 +9637,13 @@ var ClusterNewsList = ({ clusterNewsItems }) => {
|
|
|
9637
9637
|
|
|
9638
9638
|
// src/components/DesignElements/ClusterNews/ClusterStoryItem.tsx
|
|
9639
9639
|
var import_design_system90 = require("@geowiki/design-system");
|
|
9640
|
-
var
|
|
9640
|
+
var import_core101 = require("@geowiki/core");
|
|
9641
9641
|
var import_uuid13 = require("uuid");
|
|
9642
9642
|
var import_design_system91 = require("@geowiki/design-system");
|
|
9643
9643
|
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
9644
9644
|
var ClusterStoryItem = (props) => {
|
|
9645
9645
|
var _a, _b;
|
|
9646
|
-
const { data: clusterNews, isLoading } = (0,
|
|
9646
|
+
const { data: clusterNews, isLoading } = (0, import_core101.useClusterNews)(props.clusterId);
|
|
9647
9647
|
const index = (_a = clusterNews == null ? void 0 : clusterNews.items) == null ? void 0 : _a.findIndex(
|
|
9648
9648
|
(element) => element.id === props.newsId
|
|
9649
9649
|
);
|
|
@@ -9754,7 +9754,7 @@ var import_design_system92 = require("@geowiki/design-system");
|
|
|
9754
9754
|
var import_react69 = require("react");
|
|
9755
9755
|
var import_design_system93 = require("@geowiki/design-system");
|
|
9756
9756
|
var import_uuid14 = require("uuid");
|
|
9757
|
-
var
|
|
9757
|
+
var import_core102 = require("@geowiki/core");
|
|
9758
9758
|
var import_design_system94 = require("@geowiki/design-system");
|
|
9759
9759
|
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
9760
9760
|
var ClusterNews = ({
|
|
@@ -9763,7 +9763,7 @@ var ClusterNews = ({
|
|
|
9763
9763
|
clusterCountry
|
|
9764
9764
|
}) => {
|
|
9765
9765
|
var _a;
|
|
9766
|
-
const { data: clusterNews, isLoading } = (0,
|
|
9766
|
+
const { data: clusterNews, isLoading } = (0, import_core102.useClusterNews)(
|
|
9767
9767
|
clusterId,
|
|
9768
9768
|
"CreationTime desc",
|
|
9769
9769
|
0,
|
|
@@ -9831,12 +9831,12 @@ var ClusterNews = ({
|
|
|
9831
9831
|
};
|
|
9832
9832
|
|
|
9833
9833
|
// src/components/DesignElements/ClusterNews/SixClusterNews.tsx
|
|
9834
|
-
var
|
|
9834
|
+
var import_core103 = require("@geowiki/core");
|
|
9835
9835
|
var import_uuid15 = require("uuid");
|
|
9836
9836
|
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
9837
9837
|
var SixClusterNews = () => {
|
|
9838
9838
|
var _a, _b, _c;
|
|
9839
|
-
const { data: news, isLoading } = (0,
|
|
9839
|
+
const { data: news, isLoading } = (0, import_core103.useNewsFromAllClusters)(0, 6);
|
|
9840
9840
|
const indexArray = [
|
|
9841
9841
|
"3a17e7a4-0f3f-a5c5-0afc-fe4c198e97da",
|
|
9842
9842
|
"3a12cccc-927d-0fbe-0b31-2d4ca0114c92",
|
|
@@ -9845,22 +9845,22 @@ var SixClusterNews = () => {
|
|
|
9845
9845
|
"3a0f55b7-aa70-c62b-2f09-9bca2288a93e",
|
|
9846
9846
|
"3a10bf57-d49f-ccc9-1d4f-5606b3f08318"
|
|
9847
9847
|
];
|
|
9848
|
-
const { data: clusterNews0, isLoading: isLoading0 } = (0,
|
|
9848
|
+
const { data: clusterNews0, isLoading: isLoading0 } = (0, import_core103.useClusterNewsWithId)(
|
|
9849
9849
|
indexArray[0]
|
|
9850
9850
|
);
|
|
9851
|
-
const { data: clusterNews1, isLoading: isLoading1 } = (0,
|
|
9851
|
+
const { data: clusterNews1, isLoading: isLoading1 } = (0, import_core103.useClusterNewsWithId)(
|
|
9852
9852
|
indexArray[1]
|
|
9853
9853
|
);
|
|
9854
|
-
const { data: clusterNews2, isLoading: isLoading2 } = (0,
|
|
9854
|
+
const { data: clusterNews2, isLoading: isLoading2 } = (0, import_core103.useClusterNewsWithId)(
|
|
9855
9855
|
indexArray[2]
|
|
9856
9856
|
);
|
|
9857
|
-
const { data: clusterNews3, isLoading: isLoading3 } = (0,
|
|
9857
|
+
const { data: clusterNews3, isLoading: isLoading3 } = (0, import_core103.useClusterNewsWithId)(
|
|
9858
9858
|
indexArray[3]
|
|
9859
9859
|
);
|
|
9860
|
-
const { data: clusterNews4, isLoading: isLoading4 } = (0,
|
|
9860
|
+
const { data: clusterNews4, isLoading: isLoading4 } = (0, import_core103.useClusterNewsWithId)(
|
|
9861
9861
|
indexArray[4]
|
|
9862
9862
|
);
|
|
9863
|
-
const { data: clusterNews5, isLoading: isLoading5 } = (0,
|
|
9863
|
+
const { data: clusterNews5, isLoading: isLoading5 } = (0, import_core103.useClusterNewsWithId)(
|
|
9864
9864
|
indexArray[5]
|
|
9865
9865
|
);
|
|
9866
9866
|
const clusterNewsArray = [
|
|
@@ -9903,7 +9903,7 @@ var SixClusterNews = () => {
|
|
|
9903
9903
|
};
|
|
9904
9904
|
|
|
9905
9905
|
// src/components/DesignElements/Cluster/Cluster.tsx
|
|
9906
|
-
var
|
|
9906
|
+
var import_core104 = require("@geowiki/core");
|
|
9907
9907
|
var import_design_system95 = require("@geowiki/design-system");
|
|
9908
9908
|
var import_design_system96 = require("@geowiki/design-system");
|
|
9909
9909
|
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
@@ -9914,7 +9914,7 @@ var Cluster = ({
|
|
|
9914
9914
|
status,
|
|
9915
9915
|
imageId
|
|
9916
9916
|
}) => {
|
|
9917
|
-
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
9917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_core104.Link, { href: path, children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: "w-full flex-col justify-start items-start inline-flex", children: [
|
|
9918
9918
|
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
9919
9919
|
ApiImage,
|
|
9920
9920
|
{
|
|
@@ -9951,12 +9951,12 @@ var ClusterList = ({ clusters }) => {
|
|
|
9951
9951
|
// src/components/DesignElements/Cluster/H3Clusters.tsx
|
|
9952
9952
|
var import_design_system97 = require("@geowiki/design-system");
|
|
9953
9953
|
var import_design_system98 = require("@geowiki/design-system");
|
|
9954
|
-
var
|
|
9954
|
+
var import_core105 = require("@geowiki/core");
|
|
9955
9955
|
var import_uuid16 = require("uuid");
|
|
9956
|
-
var
|
|
9956
|
+
var import_core106 = require("@geowiki/core");
|
|
9957
9957
|
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
9958
9958
|
var H3Clusters = ({ clusters }) => {
|
|
9959
|
-
const { data: countries, isLoading: isCountriesLoading } = (0,
|
|
9959
|
+
const { data: countries, isLoading: isCountriesLoading } = (0, import_core106.useCountries)();
|
|
9960
9960
|
if (isCountriesLoading)
|
|
9961
9961
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { children: "Loading..." });
|
|
9962
9962
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "lg:container mx-auto space-y-6 lg:space-y-10 ", children: [
|
|
@@ -9967,7 +9967,7 @@ var H3Clusters = ({ clusters }) => {
|
|
|
9967
9967
|
{
|
|
9968
9968
|
variant: "internalLink",
|
|
9969
9969
|
className: "h-auto p-0 text-base lg:p-0",
|
|
9970
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
9970
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_core105.Link, { href: "/page/farmer-clusters/farmer-cluster-finder", children: "View all" })
|
|
9971
9971
|
}
|
|
9972
9972
|
)
|
|
9973
9973
|
] }),
|
|
@@ -10016,7 +10016,7 @@ var import_react71 = require("@headlessui/react");
|
|
|
10016
10016
|
var import_outline10 = require("@heroicons/react/24/outline");
|
|
10017
10017
|
var import_react72 = require("react");
|
|
10018
10018
|
var import_lucide_react8 = require("lucide-react");
|
|
10019
|
-
var
|
|
10019
|
+
var import_core107 = require("@geowiki/core");
|
|
10020
10020
|
var import_design_system99 = require("@geowiki/design-system");
|
|
10021
10021
|
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
10022
10022
|
var GalleryCarouselOpen = ({
|
|
@@ -10027,7 +10027,7 @@ var GalleryCarouselOpen = ({
|
|
|
10027
10027
|
}) => {
|
|
10028
10028
|
const [defaultPhoto, setDefaultPhoto] = (0, import_react72.useState)(currentPhoto);
|
|
10029
10029
|
const [text, setDefaultText] = (0, import_react72.useState)("");
|
|
10030
|
-
var { data } = (0,
|
|
10030
|
+
var { data } = (0, import_core107.useApiImage)(defaultPhoto.imageId);
|
|
10031
10031
|
(0, import_react72.useEffect)(() => {
|
|
10032
10032
|
setDefaultPhoto(currentPhoto);
|
|
10033
10033
|
}, [currentPhoto]);
|
|
@@ -10181,13 +10181,13 @@ var NewsArticleList = ({ newsArticles }) => {
|
|
|
10181
10181
|
};
|
|
10182
10182
|
|
|
10183
10183
|
// src/components/DesignElements/OpenPins/bioBlitzObservation.tsx
|
|
10184
|
-
var
|
|
10184
|
+
var import_core108 = require("@geowiki/core");
|
|
10185
10185
|
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
10186
10186
|
var BIO_BLITZ_LINK_COLOR = "#59AD31";
|
|
10187
10187
|
var BioBlitzObservationPin = ({ bioBlitzObservation }) => {
|
|
10188
10188
|
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "w-[230px] relative bg-white overflow-hidden rounded-3xl", children: [
|
|
10189
10189
|
bioBlitzObservation.path && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
10190
|
-
|
|
10190
|
+
import_core108.Image,
|
|
10191
10191
|
{
|
|
10192
10192
|
alt: "",
|
|
10193
10193
|
width: 230,
|
|
@@ -10221,8 +10221,8 @@ var BioBlitzObservationPin = ({ bioBlitzObservation }) => {
|
|
|
10221
10221
|
// src/components/DesignElements/OpenPins/farmerClusterPins.tsx
|
|
10222
10222
|
var import_design_system101 = require("@geowiki/design-system");
|
|
10223
10223
|
var import_design_system102 = require("@geowiki/design-system");
|
|
10224
|
-
var
|
|
10225
|
-
var
|
|
10224
|
+
var import_core109 = require("@geowiki/core");
|
|
10225
|
+
var import_core110 = require("@geowiki/core");
|
|
10226
10226
|
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
10227
10227
|
var DesignFarmerClusterPin = ({
|
|
10228
10228
|
farmerCluster,
|
|
@@ -10232,7 +10232,7 @@ var DesignFarmerClusterPin = ({
|
|
|
10232
10232
|
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex-col gap-3 py-4 px-3 flex justify-center items-start lg:w-[22rem] lg:py-0 lg:px-6", children: [
|
|
10233
10233
|
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_design_system102.Body18m, { children: farmerCluster.title }),
|
|
10234
10234
|
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_design_system102.Body14, { className: "line-clamp-3", children: farmerCluster.description }),
|
|
10235
|
-
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
10235
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_core110.Link, { href: farmerCluster.viewUrl, className: "internal-link ", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
10236
10236
|
import_design_system101.DesignButton,
|
|
10237
10237
|
{
|
|
10238
10238
|
variant: "internalLink",
|
|
@@ -10242,7 +10242,7 @@ var DesignFarmerClusterPin = ({
|
|
|
10242
10242
|
) })
|
|
10243
10243
|
] }),
|
|
10244
10244
|
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
10245
|
-
|
|
10245
|
+
import_core109.Image,
|
|
10246
10246
|
{
|
|
10247
10247
|
alt: "",
|
|
10248
10248
|
src: farmerCluster.path,
|
|
@@ -10257,7 +10257,7 @@ var DesignFarmerClusterPin = ({
|
|
|
10257
10257
|
// src/components/DesignElements/HeadingTextBlocks/LandingTitleBodyButton.tsx
|
|
10258
10258
|
var import_design_system103 = require("@geowiki/design-system");
|
|
10259
10259
|
var import_design_system104 = require("@geowiki/design-system");
|
|
10260
|
-
var
|
|
10260
|
+
var import_core111 = require("@geowiki/core");
|
|
10261
10261
|
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
10262
10262
|
var LandingTitleBodyButton = ({ title, textBody, button }) => {
|
|
10263
10263
|
const isNeedParse = /<em>(.*?)<\/em>/g.test(title);
|
|
@@ -10272,7 +10272,7 @@ var LandingTitleBodyButton = ({ title, textBody, button }) => {
|
|
|
10272
10272
|
!isNeedParse && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_design_system103.LandingTitle, { children: title }),
|
|
10273
10273
|
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_design_system103.Body18, { children: textBody }),
|
|
10274
10274
|
button.text && button.link && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
10275
|
-
|
|
10275
|
+
import_core111.Link,
|
|
10276
10276
|
{
|
|
10277
10277
|
href: button.link,
|
|
10278
10278
|
target: button.isNewTab ? "_blank" : "_self",
|
|
@@ -10286,14 +10286,14 @@ var LandingTitleBodyButton = ({ title, textBody, button }) => {
|
|
|
10286
10286
|
// src/components/DesignElements/HeadingTextBlocks/H1BodyButton.tsx
|
|
10287
10287
|
var import_design_system105 = require("@geowiki/design-system");
|
|
10288
10288
|
var import_design_system106 = require("@geowiki/design-system");
|
|
10289
|
-
var
|
|
10290
|
-
var
|
|
10289
|
+
var import_core112 = require("@geowiki/core");
|
|
10290
|
+
var import_core113 = require("@geowiki/core");
|
|
10291
10291
|
var import_html_react_parser2 = __toESM(require("html-react-parser"));
|
|
10292
10292
|
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
10293
10293
|
var HtmlView2 = (props) => {
|
|
10294
10294
|
const options = {
|
|
10295
10295
|
replace: (domNode) => {
|
|
10296
|
-
const cmsUrl =
|
|
10296
|
+
const cmsUrl = import_core113.configStore.getState().cmsUrl;
|
|
10297
10297
|
if (domNode.type === "text") {
|
|
10298
10298
|
var node = domNode;
|
|
10299
10299
|
var data = node.data;
|
|
@@ -10353,7 +10353,7 @@ var H1BodyButton = ({
|
|
|
10353
10353
|
}
|
|
10354
10354
|
),
|
|
10355
10355
|
(button == null ? void 0 : button.text) && (button == null ? void 0 : button.link) && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "pt-4 lg:pt-6", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
10356
|
-
|
|
10356
|
+
import_core112.Link,
|
|
10357
10357
|
{
|
|
10358
10358
|
href: button.link,
|
|
10359
10359
|
target: button.isNewTab ? "_blank" : "_self",
|
|
@@ -10377,7 +10377,7 @@ var H1BodyButton = ({
|
|
|
10377
10377
|
// src/components/DesignElements/HeadingTextBlocks/H2BodyButton.tsx
|
|
10378
10378
|
var import_design_system107 = require("@geowiki/design-system");
|
|
10379
10379
|
var import_design_system108 = require("@geowiki/design-system");
|
|
10380
|
-
var
|
|
10380
|
+
var import_core114 = require("@geowiki/core");
|
|
10381
10381
|
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
10382
10382
|
var H2BodyButton = ({
|
|
10383
10383
|
title,
|
|
@@ -10419,7 +10419,7 @@ var H2BodyButton = ({
|
|
|
10419
10419
|
}
|
|
10420
10420
|
),
|
|
10421
10421
|
button.text && button.link && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
10422
|
-
|
|
10422
|
+
import_core114.Link,
|
|
10423
10423
|
{
|
|
10424
10424
|
href: button.link,
|
|
10425
10425
|
target: button.isNewTab ? "_blank" : "_self",
|
|
@@ -10517,7 +10517,7 @@ var NewsHeading = () => {
|
|
|
10517
10517
|
// src/components/DesignElements/TextBlocks/subtitle-h3-body.tsx
|
|
10518
10518
|
var import_design_system111 = require("@geowiki/design-system");
|
|
10519
10519
|
var import_design_system112 = require("@geowiki/design-system");
|
|
10520
|
-
var
|
|
10520
|
+
var import_core115 = require("@geowiki/core");
|
|
10521
10521
|
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
10522
10522
|
var SubtitleH3Body = ({
|
|
10523
10523
|
title,
|
|
@@ -10554,7 +10554,7 @@ var SubtitleH3Body = ({
|
|
|
10554
10554
|
}
|
|
10555
10555
|
),
|
|
10556
10556
|
(button == null ? void 0 : button.text) && (button == null ? void 0 : button.link) && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
10557
|
-
|
|
10557
|
+
import_core115.Link,
|
|
10558
10558
|
{
|
|
10559
10559
|
href: button.link,
|
|
10560
10560
|
target: button.isNewTab ? "_blank" : "_self",
|
|
@@ -10663,10 +10663,10 @@ var SubtitleH3Faq = ({
|
|
|
10663
10663
|
|
|
10664
10664
|
// src/components/DesignElements/TextBlocks/subtitle-h3-cluster-4-column.tsx
|
|
10665
10665
|
var import_design_system115 = require("@geowiki/design-system");
|
|
10666
|
-
var
|
|
10666
|
+
var import_core116 = require("@geowiki/core");
|
|
10667
10667
|
var import_uuid17 = require("uuid");
|
|
10668
10668
|
var import_design_system116 = require("@geowiki/design-system");
|
|
10669
|
-
var
|
|
10669
|
+
var import_core117 = require("@geowiki/core");
|
|
10670
10670
|
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
10671
10671
|
var SubtitleH3Cluster4Column = ({
|
|
10672
10672
|
title,
|
|
@@ -10674,13 +10674,13 @@ var SubtitleH3Cluster4Column = ({
|
|
|
10674
10674
|
button
|
|
10675
10675
|
}) => {
|
|
10676
10676
|
var _a;
|
|
10677
|
-
const { data: clusters, isLoading: isClusterLoading } = (0,
|
|
10677
|
+
const { data: clusters, isLoading: isClusterLoading } = (0, import_core116.useClusters)(
|
|
10678
10678
|
true,
|
|
10679
10679
|
"",
|
|
10680
10680
|
0,
|
|
10681
10681
|
4
|
|
10682
10682
|
);
|
|
10683
|
-
const { data: countries, isLoading: isCountriesLoading } = (0,
|
|
10683
|
+
const { data: countries, isLoading: isCountriesLoading } = (0, import_core116.useCountries)();
|
|
10684
10684
|
if (isClusterLoading || isCountriesLoading)
|
|
10685
10685
|
return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { children: "Loading..." });
|
|
10686
10686
|
return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
|
|
@@ -10698,7 +10698,7 @@ var SubtitleH3Cluster4Column = ({
|
|
|
10698
10698
|
variant: "internalLink",
|
|
10699
10699
|
className: "h-auto p-0 text-base lg:p-0",
|
|
10700
10700
|
children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
10701
|
-
|
|
10701
|
+
import_core117.Link,
|
|
10702
10702
|
{
|
|
10703
10703
|
href: button.link,
|
|
10704
10704
|
target: button.isNewTab ? "_blank" : "_self",
|
|
@@ -10732,10 +10732,10 @@ var SubtitleH3Cluster4Column = ({
|
|
|
10732
10732
|
|
|
10733
10733
|
// src/components/DesignElements/TextBlocks/subtitle-h3-cluster-news-3-column.tsx
|
|
10734
10734
|
var import_design_system117 = require("@geowiki/design-system");
|
|
10735
|
-
var
|
|
10735
|
+
var import_core118 = require("@geowiki/core");
|
|
10736
10736
|
var import_uuid18 = require("uuid");
|
|
10737
10737
|
var import_design_system118 = require("@geowiki/design-system");
|
|
10738
|
-
var
|
|
10738
|
+
var import_core119 = require("@geowiki/core");
|
|
10739
10739
|
var import_jsx_runtime138 = require("react/jsx-runtime");
|
|
10740
10740
|
var SubtitleH3ClusterNews3Column = ({
|
|
10741
10741
|
title,
|
|
@@ -10743,7 +10743,7 @@ var SubtitleH3ClusterNews3Column = ({
|
|
|
10743
10743
|
button
|
|
10744
10744
|
}) => {
|
|
10745
10745
|
var _a;
|
|
10746
|
-
const { data: news, isLoading } = (0,
|
|
10746
|
+
const { data: news, isLoading } = (0, import_core118.useNewsFromAllClusters)(0, 3);
|
|
10747
10747
|
const clusterNewsItems = (_a = news == null ? void 0 : news.items) == null ? void 0 : _a.map((clusterNewsItem) => {
|
|
10748
10748
|
return {
|
|
10749
10749
|
key: (0, import_uuid18.v4)(),
|
|
@@ -10774,7 +10774,7 @@ var SubtitleH3ClusterNews3Column = ({
|
|
|
10774
10774
|
variant: "internalLink",
|
|
10775
10775
|
className: "h-auto p-0 text-base lg:p-0",
|
|
10776
10776
|
children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
10777
|
-
|
|
10777
|
+
import_core119.Link,
|
|
10778
10778
|
{
|
|
10779
10779
|
href: button.link,
|
|
10780
10780
|
target: button.isNewTab ? "_blank" : "_self",
|
|
@@ -10794,10 +10794,10 @@ var SubtitleH3ClusterNews3Column = ({
|
|
|
10794
10794
|
// src/components/DesignElements/TextBlocks/subtitle-h2-body-video.tsx
|
|
10795
10795
|
var import_design_system119 = require("@geowiki/design-system");
|
|
10796
10796
|
var import_design_system120 = require("@geowiki/design-system");
|
|
10797
|
-
var
|
|
10798
|
-
var
|
|
10797
|
+
var import_core120 = require("@geowiki/core");
|
|
10798
|
+
var import_core121 = require("@geowiki/core");
|
|
10799
10799
|
var import_jsx_runtime139 = require("react/jsx-runtime");
|
|
10800
|
-
var ReactPlayer = (0,
|
|
10800
|
+
var ReactPlayer = (0, import_core121.dynamic)(() => import("react-player"), { ssr: false });
|
|
10801
10801
|
var SubtitleH2BodyVideo = ({
|
|
10802
10802
|
title,
|
|
10803
10803
|
content,
|
|
@@ -10826,7 +10826,7 @@ var SubtitleH2BodyVideo = ({
|
|
|
10826
10826
|
}
|
|
10827
10827
|
),
|
|
10828
10828
|
(button == null ? void 0 : button.text) && (button == null ? void 0 : button.link) && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
10829
|
-
|
|
10829
|
+
import_core120.Link,
|
|
10830
10830
|
{
|
|
10831
10831
|
href: button.link,
|
|
10832
10832
|
target: button.isNewTab ? "_blank" : "_self",
|
|
@@ -10859,7 +10859,7 @@ var SubtitleH2BodyVideo = ({
|
|
|
10859
10859
|
// src/components/DesignElements/TextBlocks/image-left-h3-body.tsx
|
|
10860
10860
|
var import_design_system121 = require("@geowiki/design-system");
|
|
10861
10861
|
var import_design_system122 = require("@geowiki/design-system");
|
|
10862
|
-
var
|
|
10862
|
+
var import_core122 = require("@geowiki/core");
|
|
10863
10863
|
var import_jsx_runtime140 = require("react/jsx-runtime");
|
|
10864
10864
|
var ImageLeftH3BodyLink = ({
|
|
10865
10865
|
title,
|
|
@@ -10894,7 +10894,7 @@ var ImageLeftH3BodyLink = ({
|
|
|
10894
10894
|
}
|
|
10895
10895
|
),
|
|
10896
10896
|
(button == null ? void 0 : button.text) && (button == null ? void 0 : button.link) && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
10897
|
-
|
|
10897
|
+
import_core122.Link,
|
|
10898
10898
|
{
|
|
10899
10899
|
href: button.link,
|
|
10900
10900
|
target: button.isNewTab ? "_blank" : "_self",
|
|
@@ -10926,7 +10926,7 @@ var ImageLeftH3BodyLink = ({
|
|
|
10926
10926
|
// src/components/DesignElements/LandingPage/NewsfeedPreview.tsx
|
|
10927
10927
|
var import_design_system123 = require("@geowiki/design-system");
|
|
10928
10928
|
var import_design_system124 = require("@geowiki/design-system");
|
|
10929
|
-
var
|
|
10929
|
+
var import_core123 = require("@geowiki/core");
|
|
10930
10930
|
var import_jsx_runtime141 = require("react/jsx-runtime");
|
|
10931
10931
|
var NewsfeedPreview = ({ newsArticleData }) => {
|
|
10932
10932
|
return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "lg:container mx-auto space-y-6 mt-8 lg:space-y-10 lg:mt-12", children: [
|
|
@@ -10937,7 +10937,7 @@ var NewsfeedPreview = ({ newsArticleData }) => {
|
|
|
10937
10937
|
{
|
|
10938
10938
|
variant: "internalLink",
|
|
10939
10939
|
className: "h-auto pb-0 px-0 lg:pb-0 lg:px-0",
|
|
10940
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
10940
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_core123.Link, { href: "/news", children: "View all" })
|
|
10941
10941
|
}
|
|
10942
10942
|
)
|
|
10943
10943
|
] }),
|
|
@@ -11020,7 +11020,7 @@ var HeroImageRight = (props) => {
|
|
|
11020
11020
|
// src/components/DesignElements/Hero/ImageLeftH3Body.tsx
|
|
11021
11021
|
var import_design_system126 = require("@geowiki/design-system");
|
|
11022
11022
|
var import_design_system127 = require("@geowiki/design-system");
|
|
11023
|
-
var
|
|
11023
|
+
var import_core124 = require("@geowiki/core");
|
|
11024
11024
|
var import_jsx_runtime144 = require("react/jsx-runtime");
|
|
11025
11025
|
var ImageLefttH3Body = (props) => {
|
|
11026
11026
|
var _a, _b, _c, _d;
|
|
@@ -11041,7 +11041,7 @@ var ImageLefttH3Body = (props) => {
|
|
|
11041
11041
|
}
|
|
11042
11042
|
),
|
|
11043
11043
|
((_a = props.button) == null ? void 0 : _a.text) && ((_b = props.button) == null ? void 0 : _b.link) && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
11044
|
-
|
|
11044
|
+
import_core124.Link,
|
|
11045
11045
|
{
|
|
11046
11046
|
href: props.button.link,
|
|
11047
11047
|
target: props.button.isNewTab ? "_blank" : "_self",
|
|
@@ -11075,7 +11075,7 @@ var ImageLefttH3Body = (props) => {
|
|
|
11075
11075
|
}
|
|
11076
11076
|
),
|
|
11077
11077
|
((_c = props.button) == null ? void 0 : _c.text) && ((_d = props.button) == null ? void 0 : _d.link) && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
11078
|
-
|
|
11078
|
+
import_core124.Link,
|
|
11079
11079
|
{
|
|
11080
11080
|
href: props.button.link,
|
|
11081
11081
|
target: props.button.isNewTab ? "_blank" : "_self",
|
|
@@ -11490,10 +11490,10 @@ var import_react76 = require("react");
|
|
|
11490
11490
|
var import_react_hook_form19 = require("react-hook-form");
|
|
11491
11491
|
var import_zod5 = require("@hookform/resolvers/zod");
|
|
11492
11492
|
var z3 = __toESM(require("zod"));
|
|
11493
|
-
var
|
|
11493
|
+
var import_core125 = require("@geowiki/core");
|
|
11494
11494
|
var import_api_proxy22 = require("@geowiki/api-proxy");
|
|
11495
11495
|
var import_design_system129 = require("@geowiki/design-system");
|
|
11496
|
-
var
|
|
11496
|
+
var import_core126 = require("@geowiki/core");
|
|
11497
11497
|
var import_jsx_runtime148 = require("react/jsx-runtime");
|
|
11498
11498
|
var formSchema = z3.object({
|
|
11499
11499
|
userName: z3.string().min(2, "Username must be at least 2 characters"),
|
|
@@ -11515,11 +11515,11 @@ function RegisterForm({
|
|
|
11515
11515
|
className
|
|
11516
11516
|
}) {
|
|
11517
11517
|
var _a, _b, _c, _d, _e, _f;
|
|
11518
|
-
const router = (0,
|
|
11518
|
+
const router = (0, import_core125.useRouter)();
|
|
11519
11519
|
const [error, setError] = (0, import_react76.useState)(null);
|
|
11520
11520
|
const [isLoading, setIsLoading] = (0, import_react76.useState)(false);
|
|
11521
11521
|
const [success, setSuccess] = (0, import_react76.useState)(false);
|
|
11522
|
-
const { data: settings } = (0,
|
|
11522
|
+
const { data: settings } = (0, import_core126.useDefaultSettings)();
|
|
11523
11523
|
const termsUrl = (_c = (_b = (_a = settings == null ? void 0 : settings.footerSettings) == null ? void 0 : _a.Terms) == null ? void 0 : _b.Url) == null ? void 0 : _c.Text;
|
|
11524
11524
|
const privacyUrl = (_f = (_e = (_d = settings == null ? void 0 : settings.footerSettings) == null ? void 0 : _d.Privacy) == null ? void 0 : _e.Url) == null ? void 0 : _f.Text;
|
|
11525
11525
|
const form = (0, import_react_hook_form19.useForm)({
|