@geowiki/ui 0.16.9-dev.9 → 0.16.9
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/{chunk-2KORXHVU.mjs → chunk-IIIL7C6U.mjs} +1 -2
- package/dist/{cluster-map-WZNS6WYH.mjs → cluster-map-YODMYBPK.mjs} +6 -8
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +160 -191
- package/dist/index.mjs +145 -170
- package/dist/styles.css +1 -1
- package/package.json +76 -76
package/dist/index.js
CHANGED
|
@@ -121,7 +121,7 @@ function getPropsAndEvents(props) {
|
|
|
121
121
|
}
|
|
122
122
|
function createMarkerClusterGroup(props, context) {
|
|
123
123
|
const { clusterProps, clusterEvents } = getPropsAndEvents(props);
|
|
124
|
-
const markerClusterGroup = new
|
|
124
|
+
const markerClusterGroup = new import_leaflet2.default.MarkerClusterGroup(clusterProps);
|
|
125
125
|
Object.entries(clusterEvents).forEach(([eventAsProp, callback]) => {
|
|
126
126
|
const clusterEvent = `cluster${eventAsProp.substring(2).toLowerCase()}`;
|
|
127
127
|
markerClusterGroup.on(clusterEvent, callback);
|
|
@@ -131,17 +131,17 @@ function createMarkerClusterGroup(props, context) {
|
|
|
131
131
|
(0, import_core74.extendContext)(context, { layerContainer: markerClusterGroup })
|
|
132
132
|
);
|
|
133
133
|
}
|
|
134
|
-
var import_core74,
|
|
134
|
+
var import_core74, import_leaflet2, import_leaflet3, updateMarkerCluster, MarkerClusterGroup;
|
|
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
|
-
|
|
141
|
-
|
|
140
|
+
import_leaflet2 = __toESM(require("leaflet"));
|
|
141
|
+
import_leaflet3 = require("leaflet.markercluster");
|
|
142
142
|
updateMarkerCluster = () => {
|
|
143
143
|
};
|
|
144
|
-
|
|
144
|
+
MarkerClusterGroup = (0, import_core74.createPathComponent)(
|
|
145
145
|
createMarkerClusterGroup,
|
|
146
146
|
updateMarkerCluster
|
|
147
147
|
);
|
|
@@ -153,12 +153,12 @@ 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
|
|
156
|
+
var import_leaflet4, 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_leaflet4 = 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");
|
|
@@ -174,25 +174,23 @@ var init_cluster_markers = __esm({
|
|
|
174
174
|
const { data: ConfigSettings, isLoading: IsConfigSettingsLoaded } = (0, import_core78.useConfigSettings)();
|
|
175
175
|
const { data, error, isLoading } = (0, import_core75.useClusterMapInfo)();
|
|
176
176
|
const fileUrl = (0, import_core77.useFileUrl)();
|
|
177
|
-
if (error)
|
|
178
|
-
|
|
179
|
-
if (isLoading || IsConfigSettingsLoaded)
|
|
180
|
-
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_design_system62.LoaderFull, {});
|
|
177
|
+
if (error) return null;
|
|
178
|
+
if (isLoading || IsConfigSettingsLoaded) return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_design_system62.LoaderFull, {});
|
|
181
179
|
if ((_b = (_a = ConfigSettings == null ? void 0 : ConfigSettings.ConfigSettings) == null ? void 0 : _a.FeaturesFarmerCluster) == null ? void 0 : _b.Text) {
|
|
182
|
-
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(MarkerClusterGroup, { children: data == null ? void 0 : data.map((cluster) => {
|
|
183
181
|
var _a2, _b2;
|
|
184
182
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
185
183
|
import_react_leaflet2.Marker,
|
|
186
184
|
{
|
|
187
|
-
icon: new
|
|
185
|
+
icon: new import_leaflet4.DivIcon({
|
|
188
186
|
iconSize: [30, 30],
|
|
189
187
|
html: `<div class='marker-pin' style="background:#467327;"></div><i>${getIcon()}</i>`,
|
|
190
188
|
className: "custom-div-icon"
|
|
191
189
|
}),
|
|
192
|
-
position: cluster.location ? new
|
|
190
|
+
position: cluster.location ? new import_leaflet4.LatLng(
|
|
193
191
|
(_a2 = cluster == null ? void 0 : cluster.location) == null ? void 0 : _a2.latitude,
|
|
194
192
|
(_b2 = cluster == null ? void 0 : cluster.location) == null ? void 0 : _b2.longitude
|
|
195
|
-
) : new
|
|
193
|
+
) : new import_leaflet4.LatLng(0, 0),
|
|
196
194
|
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_react_leaflet2.Popup, { maxWidth: 600, children: [
|
|
197
195
|
/* @__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
196
|
import_core76.Image,
|
|
@@ -234,18 +232,18 @@ __export(cluster_map_exports, {
|
|
|
234
232
|
FarmerClusterMap: () => FarmerClusterMap,
|
|
235
233
|
default: () => cluster_map_default
|
|
236
234
|
});
|
|
237
|
-
var import_react_leaflet3,
|
|
235
|
+
var import_react_leaflet3, import_leaflet5, import_leaflet6, import_jsx_runtime83, centerLocation, FarmerClusterMap, cluster_map_default;
|
|
238
236
|
var init_cluster_map = __esm({
|
|
239
237
|
"src/components/ClusterMap/cluster-map.tsx"() {
|
|
240
238
|
"use strict";
|
|
241
239
|
"use client";
|
|
242
240
|
import_react_leaflet3 = require("react-leaflet");
|
|
243
|
-
|
|
244
|
-
|
|
241
|
+
import_leaflet5 = require("leaflet/dist/leaflet.css");
|
|
242
|
+
import_leaflet6 = require("leaflet");
|
|
245
243
|
init_location_marker();
|
|
246
244
|
init_cluster_markers();
|
|
247
245
|
import_jsx_runtime83 = require("react/jsx-runtime");
|
|
248
|
-
centerLocation = new
|
|
246
|
+
centerLocation = new import_leaflet6.LatLng(48.2082, 16.3738);
|
|
249
247
|
FarmerClusterMap = (props) => {
|
|
250
248
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "w-full", children: [
|
|
251
249
|
props.enableLocationMarker && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "text-center text-xl pb-4", children: [
|
|
@@ -295,8 +293,8 @@ var init_cluster_map = __esm({
|
|
|
295
293
|
});
|
|
296
294
|
|
|
297
295
|
// src/index.tsx
|
|
298
|
-
var
|
|
299
|
-
__export(
|
|
296
|
+
var index_exports = {};
|
|
297
|
+
__export(index_exports, {
|
|
300
298
|
AccountDetail: () => AccountDetail,
|
|
301
299
|
AddRole: () => AddRole,
|
|
302
300
|
AddTenant: () => AddTenant,
|
|
@@ -435,8 +433,8 @@ __export(src_exports, {
|
|
|
435
433
|
tableCustomStyles: () => tableCustomStyles,
|
|
436
434
|
tableDesigntyles: () => tableDesigntyles
|
|
437
435
|
});
|
|
438
|
-
module.exports = __toCommonJS(
|
|
439
|
-
__reExport(
|
|
436
|
+
module.exports = __toCommonJS(index_exports);
|
|
437
|
+
__reExport(index_exports, require("@geowiki/design-system"), module.exports);
|
|
440
438
|
|
|
441
439
|
// src/components/ui/footer.tsx
|
|
442
440
|
var import_core2 = require("@geowiki/core");
|
|
@@ -467,8 +465,7 @@ var NextImage = ({
|
|
|
467
465
|
var import_classnames = __toESM(require("classnames"));
|
|
468
466
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
469
467
|
var HtmlLinkList = ({ links }) => {
|
|
470
|
-
if (!links)
|
|
471
|
-
return null;
|
|
468
|
+
if (!links) return null;
|
|
472
469
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { children: links == null ? void 0 : links.map((link) => {
|
|
473
470
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
474
471
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
@@ -658,8 +655,7 @@ function parseTitle(title, type) {
|
|
|
658
655
|
return parsedTitle.join("");
|
|
659
656
|
}
|
|
660
657
|
var isAdmin = (token) => {
|
|
661
|
-
if (!token)
|
|
662
|
-
return false;
|
|
658
|
+
if (!token) return false;
|
|
663
659
|
try {
|
|
664
660
|
const decodedToken = (0, import_jwt_decode.jwtDecode)(token);
|
|
665
661
|
return decodedToken.role.includes(import_core4.USER_ROLE.ADMIN) || decodedToken.role.includes(import_core4.USER_ROLE.FARMER_CLUSTER_ADMIN);
|
|
@@ -1123,7 +1119,7 @@ var ProfileSettings = ({ data }) => {
|
|
|
1123
1119
|
const { handleSubmit, register } = (0, import_react_hook_form.useForm)();
|
|
1124
1120
|
const { toast: toast2 } = (0, import_design_system5.useToast)();
|
|
1125
1121
|
const queryClient = (0, import_react_query.useQueryClient)();
|
|
1126
|
-
const onSubmit = (data2) => __async(
|
|
1122
|
+
const onSubmit = (data2) => __async(null, null, function* () {
|
|
1127
1123
|
try {
|
|
1128
1124
|
yield import_api_proxy.ProfileService.profileUpdate(data2);
|
|
1129
1125
|
toast2({
|
|
@@ -1207,7 +1203,7 @@ var ChangePassword = () => {
|
|
|
1207
1203
|
newPassword: "",
|
|
1208
1204
|
confirmNewPassword: ""
|
|
1209
1205
|
});
|
|
1210
|
-
const onSubmit = (data) => __async(
|
|
1206
|
+
const onSubmit = (data) => __async(null, null, function* () {
|
|
1211
1207
|
if (shouldDisabled()) {
|
|
1212
1208
|
toast2({
|
|
1213
1209
|
title: "Password Incorrect",
|
|
@@ -1324,7 +1320,7 @@ var AccountEdit = ({ data, open, setOpen }) => {
|
|
|
1324
1320
|
const handleInputChange = () => {
|
|
1325
1321
|
setShowSaving(false);
|
|
1326
1322
|
};
|
|
1327
|
-
const onSubmit = (data2) => __async(
|
|
1323
|
+
const onSubmit = (data2) => __async(null, null, function* () {
|
|
1328
1324
|
try {
|
|
1329
1325
|
yield import_api_proxy3.ProfileService.profileUpdate(data2);
|
|
1330
1326
|
toast2({
|
|
@@ -1575,7 +1571,7 @@ var PasswordEdit = ({ open, setOpen }) => {
|
|
|
1575
1571
|
setIsSaving(false);
|
|
1576
1572
|
}
|
|
1577
1573
|
}, [formValues, hasInteracted]);
|
|
1578
|
-
const onSubmit = (data) => __async(
|
|
1574
|
+
const onSubmit = (data) => __async(null, null, function* () {
|
|
1579
1575
|
try {
|
|
1580
1576
|
setIsSaving(true);
|
|
1581
1577
|
const requestBody = data;
|
|
@@ -1861,7 +1857,7 @@ var TestEmail = ({ onDismiss }) => {
|
|
|
1861
1857
|
(0, import_react16.useEffect)(() => {
|
|
1862
1858
|
setOpen(true);
|
|
1863
1859
|
}, []);
|
|
1864
|
-
const onSubmit = (data) => __async(
|
|
1860
|
+
const onSubmit = (data) => __async(null, null, function* () {
|
|
1865
1861
|
try {
|
|
1866
1862
|
const payload = data;
|
|
1867
1863
|
yield import_api_proxy5.EmailSettingsService.emailSettingsSendTestEmail(payload);
|
|
@@ -1950,7 +1946,7 @@ var Emailing = () => {
|
|
|
1950
1946
|
},
|
|
1951
1947
|
[emailSettingDto]
|
|
1952
1948
|
);
|
|
1953
|
-
const onSubmitEvent = () => __async(
|
|
1949
|
+
const onSubmitEvent = () => __async(null, null, function* () {
|
|
1954
1950
|
try {
|
|
1955
1951
|
yield import_api_proxy6.EmailSettingsService.emailSettingsUpdate(__spreadValues({}, emailSettingDto));
|
|
1956
1952
|
toast2({
|
|
@@ -2180,7 +2176,7 @@ var AddTenant = () => {
|
|
|
2180
2176
|
const { toast: toast2 } = (0, import_design_system21.useToast)();
|
|
2181
2177
|
const { handleSubmit, register } = (0, import_react_hook_form7.useForm)();
|
|
2182
2178
|
const queryClient = (0, import_react_query5.useQueryClient)();
|
|
2183
|
-
const onSubmit = (data) => __async(
|
|
2179
|
+
const onSubmit = (data) => __async(null, null, function* () {
|
|
2184
2180
|
const newTenant = data;
|
|
2185
2181
|
try {
|
|
2186
2182
|
yield import_api_proxy7.TenantService.tenantCreate(newTenant);
|
|
@@ -2283,7 +2279,7 @@ var TenantEdit = ({
|
|
|
2283
2279
|
setEnableHost(true);
|
|
2284
2280
|
}
|
|
2285
2281
|
}, [tenantDto, (_a = tenantDto == null ? void 0 : tenantDto.extraProperties) == null ? void 0 : _a.Host]);
|
|
2286
|
-
const onSubmit = (dto) => __async(
|
|
2282
|
+
const onSubmit = (dto) => __async(null, null, function* () {
|
|
2287
2283
|
const tenant = dto;
|
|
2288
2284
|
try {
|
|
2289
2285
|
yield import_api_proxy8.TenantService.tenantUpdate(tenantId, tenant);
|
|
@@ -2429,7 +2425,7 @@ var FeatureList = ({ onDismiss, tenantId }) => {
|
|
|
2429
2425
|
setEnableEmailSetting(value);
|
|
2430
2426
|
}
|
|
2431
2427
|
};
|
|
2432
|
-
const onSubmit = () => __async(
|
|
2428
|
+
const onSubmit = () => __async(null, null, function* () {
|
|
2433
2429
|
try {
|
|
2434
2430
|
const featureUpdateDto = {};
|
|
2435
2431
|
featureUpdateDto.features = [
|
|
@@ -2463,7 +2459,7 @@ var FeatureList = ({ onDismiss, tenantId }) => {
|
|
|
2463
2459
|
}
|
|
2464
2460
|
}
|
|
2465
2461
|
});
|
|
2466
|
-
const onResetToDefaultEvent = () => __async(
|
|
2462
|
+
const onResetToDefaultEvent = () => __async(null, null, function* () {
|
|
2467
2463
|
try {
|
|
2468
2464
|
yield import_api_proxy9.FeaturesService.featuresDelete(import_core14.PermissionProvider.T, tenantId);
|
|
2469
2465
|
toast2({
|
|
@@ -2551,8 +2547,7 @@ var import_design_system24 = require("@geowiki/design-system");
|
|
|
2551
2547
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2552
2548
|
var PermissionActions = ({ actions }) => {
|
|
2553
2549
|
const renderElement = (action) => {
|
|
2554
|
-
if (!action.showButton || action.visible)
|
|
2555
|
-
return false;
|
|
2550
|
+
if (!action.showButton || action.visible) return false;
|
|
2556
2551
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_design_system24.DropdownMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_design_system24.Button, { variant: "secondary", onClick: action.callback, size: "sm", children: [
|
|
2557
2552
|
action.icon === "permission" && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center space-x-1", children: [
|
|
2558
2553
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
@@ -2631,7 +2626,7 @@ var DeleteTenant = ({
|
|
|
2631
2626
|
}) => {
|
|
2632
2627
|
const { toast: toast2 } = (0, import_design_system25.useToast)();
|
|
2633
2628
|
const [open, setOpen] = (0, import_react23.useState)(false);
|
|
2634
|
-
const onYesEvent = () => __async(
|
|
2629
|
+
const onYesEvent = () => __async(null, null, function* () {
|
|
2635
2630
|
try {
|
|
2636
2631
|
yield import_api_proxy10.TenantService.tenantDelete(tenantId);
|
|
2637
2632
|
toast2({
|
|
@@ -2823,7 +2818,7 @@ var AddUser = ({ showButtonAdd }) => {
|
|
|
2823
2818
|
const { toast: toast2 } = (0, import_design_system28.useToast)();
|
|
2824
2819
|
const queryClient = (0, import_react_query9.useQueryClient)();
|
|
2825
2820
|
const { handleSubmit, register } = (0, import_react_hook_form10.useForm)();
|
|
2826
|
-
const onSubmit = (data) => __async(
|
|
2821
|
+
const onSubmit = (data) => __async(null, null, function* () {
|
|
2827
2822
|
const user = data;
|
|
2828
2823
|
user.isActive = isActive;
|
|
2829
2824
|
user.lockoutEnabled = lockoutEnabled;
|
|
@@ -2944,7 +2939,7 @@ var DeleteUser = ({
|
|
|
2944
2939
|
}) => {
|
|
2945
2940
|
const { toast: toast2 } = (0, import_design_system29.useToast)();
|
|
2946
2941
|
const [open, setOpen] = (0, import_react26.useState)(false);
|
|
2947
|
-
const onYesEvent = () => __async(
|
|
2942
|
+
const onYesEvent = () => __async(null, null, function* () {
|
|
2948
2943
|
try {
|
|
2949
2944
|
yield import_api_proxy12.UserService.userDelete(userId);
|
|
2950
2945
|
toast2({
|
|
@@ -3088,8 +3083,7 @@ function formatUserAlias(userName) {
|
|
|
3088
3083
|
var _a, _b;
|
|
3089
3084
|
const parts = userName.split("_");
|
|
3090
3085
|
const first = ((_b = (_a = parts[0].at(0)) == null ? void 0 : _a.toUpperCase()) != null ? _b : "") + parts[0].substring(1);
|
|
3091
|
-
if (!parts[1])
|
|
3092
|
-
return first;
|
|
3086
|
+
if (!parts[1]) return first;
|
|
3093
3087
|
return first + "(" + parts[1].toUpperCase() + ")";
|
|
3094
3088
|
}
|
|
3095
3089
|
var UserEdit = ({ userDto, userId, onDismiss }) => {
|
|
@@ -3153,20 +3147,16 @@ var UserEdit = ({ userDto, userId, onDismiss }) => {
|
|
|
3153
3147
|
setRefreshData(false);
|
|
3154
3148
|
};
|
|
3155
3149
|
if ((updateUserRoleProjectResult == null ? void 0 : updateUserRoleProjectResult.success) == true) {
|
|
3156
|
-
if (userAlias != "")
|
|
3157
|
-
|
|
3158
|
-
if (userProjectRole.length != 0)
|
|
3159
|
-
setUserProjectRole([]);
|
|
3150
|
+
if (userAlias != "") setUserAlias("");
|
|
3151
|
+
if (userProjectRole.length != 0) setUserProjectRole([]);
|
|
3160
3152
|
}
|
|
3161
3153
|
if (setUserDetail && setUserDetail.success == true) {
|
|
3162
|
-
if (contractStartDate != "")
|
|
3163
|
-
|
|
3164
|
-
if (contractEndDate != "")
|
|
3165
|
-
setContractEndDate("");
|
|
3154
|
+
if (contractStartDate != "") setContractStartDate("");
|
|
3155
|
+
if (contractEndDate != "") setContractEndDate("");
|
|
3166
3156
|
setUpdateUserDetail(false);
|
|
3167
3157
|
setRefreshData(false);
|
|
3168
3158
|
}
|
|
3169
|
-
const updateUserRoleProject = () => __async(
|
|
3159
|
+
const updateUserRoleProject = () => __async(null, null, function* () {
|
|
3170
3160
|
setUserAlias(formatUserAlias(userDto.userName));
|
|
3171
3161
|
setUpdateUserProject(true);
|
|
3172
3162
|
});
|
|
@@ -3216,18 +3206,15 @@ var UserEdit = ({ userDto, userId, onDismiss }) => {
|
|
|
3216
3206
|
const paginationComponentOptions = {
|
|
3217
3207
|
noRowsPerPage: true
|
|
3218
3208
|
};
|
|
3219
|
-
const onSubmit = (data) => __async(
|
|
3209
|
+
const onSubmit = (data) => __async(null, null, function* () {
|
|
3220
3210
|
const user = data;
|
|
3221
3211
|
try {
|
|
3222
3212
|
if (evolandFeature) {
|
|
3223
|
-
if (!updateUserProject)
|
|
3224
|
-
yield updateUserRoleProject();
|
|
3213
|
+
if (!updateUserProject) yield updateUserRoleProject();
|
|
3225
3214
|
if (userCurrentProject && (userCurrentProject[0].contract_start_date != contractStartDate || userCurrentProject[0].contract_end_date != contractEndDate)) {
|
|
3226
|
-
if (contractStartDate == "")
|
|
3227
|
-
|
|
3228
|
-
if (
|
|
3229
|
-
setContractEndDate(null);
|
|
3230
|
-
if ((contractStartDate == "" || !contractStartDate) && contractEndDate || contractEndDate && contractStartDate && new Date(contractEndDate) < new Date(contractEndDate)) {
|
|
3215
|
+
if (contractStartDate == "") setContractStartDate(null);
|
|
3216
|
+
if (contractEndDate == "") setContractEndDate(null);
|
|
3217
|
+
if ((contractStartDate == "" || !contractStartDate) && contractEndDate || contractEndDate && contractStartDate && new Date(contractEndDate) < new Date(contractStartDate)) {
|
|
3231
3218
|
alert("Please provide correct date");
|
|
3232
3219
|
return;
|
|
3233
3220
|
}
|
|
@@ -3254,14 +3241,10 @@ var UserEdit = ({ userDto, userId, onDismiss }) => {
|
|
|
3254
3241
|
});
|
|
3255
3242
|
const onCloseEvent = () => {
|
|
3256
3243
|
setOpen(false);
|
|
3257
|
-
if (userAlias != "")
|
|
3258
|
-
|
|
3259
|
-
if (
|
|
3260
|
-
|
|
3261
|
-
if (contractStartDate != "")
|
|
3262
|
-
setContractStartDate("");
|
|
3263
|
-
if (contractEndDate != "")
|
|
3264
|
-
setContractEndDate("");
|
|
3244
|
+
if (userAlias != "") setUserAlias("");
|
|
3245
|
+
if (userProjectRole.length != 0) setUserProjectRole([]);
|
|
3246
|
+
if (contractStartDate != "") setContractStartDate("");
|
|
3247
|
+
if (contractEndDate != "") setContractEndDate("");
|
|
3265
3248
|
onDismiss();
|
|
3266
3249
|
};
|
|
3267
3250
|
(0, import_react28.useEffect)(() => {
|
|
@@ -3293,7 +3276,7 @@ var UserEdit = ({ userDto, userId, onDismiss }) => {
|
|
|
3293
3276
|
},
|
|
3294
3277
|
[roles]
|
|
3295
3278
|
);
|
|
3296
|
-
const onRoleAssignedSaveEvent = (e) => __async(
|
|
3279
|
+
const onRoleAssignedSaveEvent = (e) => __async(null, null, function* () {
|
|
3297
3280
|
var _a2;
|
|
3298
3281
|
e.preventDefault();
|
|
3299
3282
|
const updateUserDto = __spreadProps(__spreadValues({}, userDto), {
|
|
@@ -3378,8 +3361,7 @@ var UserEdit = ({ userDto, userId, onDismiss }) => {
|
|
|
3378
3361
|
onChange: (e) => {
|
|
3379
3362
|
if ((contractStartDate == "" || !contractStartDate) && e.target.value !== "" || new Date(contractStartDate) > new Date(e.target.value))
|
|
3380
3363
|
alert("Please provide correct start date");
|
|
3381
|
-
else
|
|
3382
|
-
setContractEndDate(e.target.value);
|
|
3364
|
+
else setContractEndDate(e.target.value);
|
|
3383
3365
|
}
|
|
3384
3366
|
})
|
|
3385
3367
|
)
|
|
@@ -3712,8 +3694,7 @@ var UserPermission = ({
|
|
|
3712
3694
|
var _a;
|
|
3713
3695
|
return (_a = g.permissions) == null ? void 0 : _a.every((p) => p.isGranted);
|
|
3714
3696
|
}).every((e) => e);
|
|
3715
|
-
if (hasAllPermissionGranted)
|
|
3716
|
-
setHasAllGranted(hasAllPermissionGranted);
|
|
3697
|
+
if (hasAllPermissionGranted) setHasAllGranted(hasAllPermissionGranted);
|
|
3717
3698
|
}
|
|
3718
3699
|
}, [permissionGroups]);
|
|
3719
3700
|
(0, import_react31.useEffect)(() => {
|
|
@@ -3777,7 +3758,7 @@ var UserPermission = ({
|
|
|
3777
3758
|
[hasAllGranted, permissionGroups]
|
|
3778
3759
|
);
|
|
3779
3760
|
const onSubmit = (0, import_react31.useCallback)(
|
|
3780
|
-
(e) => __async(
|
|
3761
|
+
(e) => __async(null, null, function* () {
|
|
3781
3762
|
e.preventDefault();
|
|
3782
3763
|
const payload = permissionGroups == null ? void 0 : permissionGroups.map(
|
|
3783
3764
|
(p) => p.permissions.map((grant) => ({
|
|
@@ -4123,7 +4104,7 @@ var DeleteRole = ({
|
|
|
4123
4104
|
}) => {
|
|
4124
4105
|
const { toast: toast2 } = (0, import_design_system41.useToast)();
|
|
4125
4106
|
const [open, setOpen] = (0, import_react33.useState)(false);
|
|
4126
|
-
const onYesEvent = () => __async(
|
|
4107
|
+
const onYesEvent = () => __async(null, null, function* () {
|
|
4127
4108
|
try {
|
|
4128
4109
|
yield import_api_proxy15.RoleService.roleDelete(roleId);
|
|
4129
4110
|
toast2({
|
|
@@ -4175,7 +4156,7 @@ var RoleEdit = ({ roleDto, roleId, onDismiss }) => {
|
|
|
4175
4156
|
const { handleSubmit, register } = (0, import_react_hook_form12.useForm)();
|
|
4176
4157
|
const [isDefault, setIsDefault] = (0, import_react34.useState)(roleDto.isDefault);
|
|
4177
4158
|
const [isPublic, setIsPublic] = (0, import_react34.useState)(roleDto.isPublic);
|
|
4178
|
-
const onSubmit = (data) => __async(
|
|
4159
|
+
const onSubmit = (data) => __async(null, null, function* () {
|
|
4179
4160
|
const role = data;
|
|
4180
4161
|
role.isDefault = isDefault;
|
|
4181
4162
|
role.isPublic = isPublic;
|
|
@@ -4324,8 +4305,7 @@ var RolePermission = ({ roleDto, onDismiss }) => {
|
|
|
4324
4305
|
var _a;
|
|
4325
4306
|
return (_a = g.permissions) == null ? void 0 : _a.every((p) => p.isGranted);
|
|
4326
4307
|
}).every((e) => e);
|
|
4327
|
-
if (hasAllPermissionGranted)
|
|
4328
|
-
setHasAllGranted(hasAllPermissionGranted);
|
|
4308
|
+
if (hasAllPermissionGranted) setHasAllGranted(hasAllPermissionGranted);
|
|
4329
4309
|
}
|
|
4330
4310
|
}, [permissionGroups]);
|
|
4331
4311
|
(0, import_react35.useEffect)(() => {
|
|
@@ -4389,7 +4369,7 @@ var RolePermission = ({ roleDto, onDismiss }) => {
|
|
|
4389
4369
|
[hasAllGranted, permissionGroups]
|
|
4390
4370
|
);
|
|
4391
4371
|
const onSubmit = (0, import_react35.useCallback)(
|
|
4392
|
-
(e) => __async(
|
|
4372
|
+
(e) => __async(null, null, function* () {
|
|
4393
4373
|
e.preventDefault();
|
|
4394
4374
|
const payload = permissionGroups == null ? void 0 : permissionGroups.map(
|
|
4395
4375
|
(p) => p.permissions.map((grant) => ({
|
|
@@ -4698,7 +4678,7 @@ var AddRole = ({ showButtonAdd }) => {
|
|
|
4698
4678
|
const { toast: toast2 } = (0, import_design_system46.useToast)();
|
|
4699
4679
|
const { handleSubmit, register } = (0, import_react_hook_form13.useForm)();
|
|
4700
4680
|
const queryClient = (0, import_react_query14.useQueryClient)();
|
|
4701
|
-
const onSubmit = (data) => __async(
|
|
4681
|
+
const onSubmit = (data) => __async(null, null, function* () {
|
|
4702
4682
|
const newRole = data;
|
|
4703
4683
|
newRole.isDefault = isDefault;
|
|
4704
4684
|
newRole.isPublic = isPublic;
|
|
@@ -4910,13 +4890,11 @@ var import_core37 = require("@geowiki/core");
|
|
|
4910
4890
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
4911
4891
|
var RequireRole = ({ roles, children }) => {
|
|
4912
4892
|
const currentUser = (0, import_core37.useCurrentUser)();
|
|
4913
|
-
if (!currentUser)
|
|
4914
|
-
return null;
|
|
4893
|
+
if (!currentUser) return null;
|
|
4915
4894
|
if (!(roles == null ? void 0 : roles.some((role) => {
|
|
4916
4895
|
var _a;
|
|
4917
4896
|
return (_a = currentUser.roles) == null ? void 0 : _a.includes(role);
|
|
4918
|
-
})))
|
|
4919
|
-
return null;
|
|
4897
|
+
}))) return null;
|
|
4920
4898
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children });
|
|
4921
4899
|
};
|
|
4922
4900
|
|
|
@@ -4987,8 +4965,7 @@ var Sidebar = ({
|
|
|
4987
4965
|
(menu) => {
|
|
4988
4966
|
var _a2;
|
|
4989
4967
|
const m = (_a2 = menu.children) == null ? void 0 : _a2.find((c) => c.link === (router == null ? void 0 : router.asPath));
|
|
4990
|
-
if (m)
|
|
4991
|
-
return menu.name;
|
|
4968
|
+
if (m) return menu.name;
|
|
4992
4969
|
return "";
|
|
4993
4970
|
},
|
|
4994
4971
|
[router == null ? void 0 : router.asPath]
|
|
@@ -5251,6 +5228,7 @@ var HtmlView = (props) => {
|
|
|
5251
5228
|
// src/components/Elements/TopProgress.tsx
|
|
5252
5229
|
var import_framer_motion = require("framer-motion");
|
|
5253
5230
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
5231
|
+
var motion = import_framer_motion.motion;
|
|
5254
5232
|
var TopProgress = () => {
|
|
5255
5233
|
const { scrollYProgress } = (0, import_framer_motion.useScroll)();
|
|
5256
5234
|
const scaleX = (0, import_framer_motion.useSpring)(scrollYProgress, {
|
|
@@ -5258,7 +5236,7 @@ var TopProgress = () => {
|
|
|
5258
5236
|
damping: 30,
|
|
5259
5237
|
restDelta: 1e-3
|
|
5260
5238
|
});
|
|
5261
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
5239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(motion.div, { className: "progress-bar", style: { scaleX } }) });
|
|
5262
5240
|
};
|
|
5263
5241
|
|
|
5264
5242
|
// src/components/Elements/Pagination.tsx
|
|
@@ -5380,8 +5358,7 @@ var CustomDropDown = (props) => {
|
|
|
5380
5358
|
}
|
|
5381
5359
|
return null;
|
|
5382
5360
|
});
|
|
5383
|
-
if (IsConfigSettingsLoaded)
|
|
5384
|
-
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system52.LoaderFull, {});
|
|
5361
|
+
if (IsConfigSettingsLoaded) return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system52.LoaderFull, {});
|
|
5385
5362
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
5386
5363
|
import_async.default,
|
|
5387
5364
|
{
|
|
@@ -5524,11 +5501,9 @@ var CustomFilterSort = (props) => {
|
|
|
5524
5501
|
LabelLookUp: item.LabelLookUp,
|
|
5525
5502
|
Parameter: item.Parameter,
|
|
5526
5503
|
onValueChange: (currentvalue) => {
|
|
5527
|
-
if ((currentvalue == null ? void 0 : currentvalue.value) != void 0)
|
|
5528
|
-
skip = 0;
|
|
5504
|
+
if ((currentvalue == null ? void 0 : currentvalue.value) != void 0) skip = 0;
|
|
5529
5505
|
filterValues[item == null ? void 0 : item.Name.replace(new RegExp(" ", "g"), "")] = currentvalue == null ? void 0 : currentvalue.value;
|
|
5530
|
-
if (!props.showButtons)
|
|
5531
|
-
onSearch();
|
|
5506
|
+
if (!props.showButtons) onSearch();
|
|
5532
5507
|
}
|
|
5533
5508
|
},
|
|
5534
5509
|
index
|
|
@@ -5596,13 +5571,13 @@ var import_framer_motion2 = require("framer-motion");
|
|
|
5596
5571
|
var import_core52 = require("@geowiki/core");
|
|
5597
5572
|
var import_design_system53 = require("@geowiki/design-system");
|
|
5598
5573
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5574
|
+
var motion2 = import_framer_motion2.motion;
|
|
5599
5575
|
var InfoCard = (props) => {
|
|
5600
5576
|
var _a;
|
|
5601
5577
|
var { data: ConfigSettings, isLoading: IsConfigSettingsLoaded } = (0, import_core50.useConfigSettings)();
|
|
5602
|
-
if (IsConfigSettingsLoaded)
|
|
5603
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_design_system53.LoaderFull, {});
|
|
5578
|
+
if (IsConfigSettingsLoaded) return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_design_system53.LoaderFull, {});
|
|
5604
5579
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
5605
|
-
|
|
5580
|
+
motion2.li,
|
|
5606
5581
|
{
|
|
5607
5582
|
className: "h-full lg:h-full flex flex-col cursor-pointer",
|
|
5608
5583
|
variants: import_core52.itemVariants,
|
|
@@ -5831,9 +5806,7 @@ var CmsImage = ({
|
|
|
5831
5806
|
className = "relative w-full h-full",
|
|
5832
5807
|
showPlaceholder = true
|
|
5833
5808
|
}) => {
|
|
5834
|
-
|
|
5835
|
-
if (isLoading)
|
|
5836
|
-
return null;
|
|
5809
|
+
const cmsImageUrl = (0, import_core56.useCmsImage)(src);
|
|
5837
5810
|
if (width && height) {
|
|
5838
5811
|
if (!showPlaceholder)
|
|
5839
5812
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
@@ -6536,8 +6509,8 @@ var RichTextContent = (props) => {
|
|
|
6536
6509
|
const [hasContent, setHasContent] = (0, import_react47.useState)(
|
|
6537
6510
|
props.defaultValue ? true : false
|
|
6538
6511
|
);
|
|
6539
|
-
const loadQuill = () => __async(
|
|
6540
|
-
return new Promise((resolve) => __async(
|
|
6512
|
+
const loadQuill = () => __async(null, null, function* () {
|
|
6513
|
+
return new Promise((resolve) => __async(null, null, function* () {
|
|
6541
6514
|
const Quill = yield require("react-quill").Quill;
|
|
6542
6515
|
const BlotFormatter = (yield require("quill-blot-formatter")).default;
|
|
6543
6516
|
resolve({ Quill, BlotFormatter });
|
|
@@ -6692,8 +6665,7 @@ var import_core64 = require("@geowiki/core");
|
|
|
6692
6665
|
var import_design_system58 = require("@geowiki/design-system");
|
|
6693
6666
|
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
6694
6667
|
var ButtonList = ({ data }) => {
|
|
6695
|
-
if (!data)
|
|
6696
|
-
return null;
|
|
6668
|
+
if (!data) return null;
|
|
6697
6669
|
return data == null ? void 0 : data.map((button) => {
|
|
6698
6670
|
var _a;
|
|
6699
6671
|
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_design_system58.Button, { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
@@ -6855,7 +6827,6 @@ var NewsArticle = (props) => {
|
|
|
6855
6827
|
|
|
6856
6828
|
// src/components/News/NewsItemList.tsx
|
|
6857
6829
|
var import_core70 = require("@geowiki/core");
|
|
6858
|
-
var import_uuid8 = require("uuid");
|
|
6859
6830
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
6860
6831
|
var NewsItemList = ({ newsItems }) => {
|
|
6861
6832
|
const allLanguages = [
|
|
@@ -6898,19 +6869,22 @@ var NewsItemList = ({ newsItems }) => {
|
|
|
6898
6869
|
index
|
|
6899
6870
|
);
|
|
6900
6871
|
}) }) }) }) }),
|
|
6901
|
-
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "-my-8 divide-y-2 divide-gray-100 py-10 lg:py-16", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "mx-auto max-w-7xl", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "grid grid-cols-1 lg:grid-cols-4 gap-6", children: newsItems.map((newsArticle) =>
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6872
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "-my-8 divide-y-2 divide-gray-100 py-10 lg:py-16", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "mx-auto max-w-7xl", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "grid grid-cols-1 lg:grid-cols-4 gap-6", children: newsItems.map((newsArticle, index) => {
|
|
6873
|
+
var _a;
|
|
6874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6875
|
+
NewsArticle,
|
|
6876
|
+
{
|
|
6877
|
+
title: newsArticle.title,
|
|
6878
|
+
description: newsArticle.description,
|
|
6879
|
+
username: newsArticle.sourceName,
|
|
6880
|
+
time: newsArticle.publishDate,
|
|
6881
|
+
language: newsArticle.language,
|
|
6882
|
+
path: newsArticle.imageUrl,
|
|
6883
|
+
link: newsArticle.url
|
|
6884
|
+
},
|
|
6885
|
+
(_a = newsArticle.url) != null ? _a : `news-${index}`
|
|
6886
|
+
);
|
|
6887
|
+
}) }) }) })
|
|
6914
6888
|
] }) });
|
|
6915
6889
|
};
|
|
6916
6890
|
|
|
@@ -6973,19 +6947,20 @@ var PublicationItem = ({ publication }) => {
|
|
|
6973
6947
|
|
|
6974
6948
|
// src/components/Publications/PublicationList.tsx
|
|
6975
6949
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
6950
|
+
var motion7 = import_framer_motion7.motion;
|
|
6976
6951
|
var PublicationList = ({ publications }) => {
|
|
6977
|
-
publications.sort(
|
|
6978
|
-
|
|
6979
|
-
|
|
6952
|
+
const sorted = [...publications].sort(
|
|
6953
|
+
(a, b) => new Date(b.PublishedUtc).getTime() - new Date(a.PublishedUtc).getTime()
|
|
6954
|
+
);
|
|
6980
6955
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
6981
|
-
|
|
6956
|
+
motion7.ul,
|
|
6982
6957
|
{
|
|
6983
6958
|
className: "mx-auto mt-12 grid max-w-lg gap-5 lg:max-w-none lg:grid-cols-3",
|
|
6984
6959
|
initial: "initial",
|
|
6985
6960
|
animate: "enter",
|
|
6986
6961
|
exit: "exit",
|
|
6987
6962
|
variants: import_core73.listVariants,
|
|
6988
|
-
children:
|
|
6963
|
+
children: sorted.map((post) => {
|
|
6989
6964
|
var _a;
|
|
6990
6965
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(PublicationItem, { publication: post }, (_a = post.AutoroutePart) == null ? void 0 : _a.Path);
|
|
6991
6966
|
})
|
|
@@ -7277,7 +7252,7 @@ var UpdatePassword = (props) => {
|
|
|
7277
7252
|
reset({ confirmnewPassword: null });
|
|
7278
7253
|
}
|
|
7279
7254
|
};
|
|
7280
|
-
const onPasswordSubmit = () => __async(
|
|
7255
|
+
const onPasswordSubmit = () => __async(null, null, function* () {
|
|
7281
7256
|
try {
|
|
7282
7257
|
yield import_api_proxy19.ProfileService.profileChangePassword(PasswordData);
|
|
7283
7258
|
import_sweetalert2.default.fire({
|
|
@@ -7480,7 +7455,7 @@ var UpdateUserProfile = ({
|
|
|
7480
7455
|
});
|
|
7481
7456
|
});
|
|
7482
7457
|
};
|
|
7483
|
-
const onProfileSubmit = () => __async(
|
|
7458
|
+
const onProfileSubmit = () => __async(null, null, function* () {
|
|
7484
7459
|
var result = yield import_api_proxy20.ProfileService.profileUpdate(UserData);
|
|
7485
7460
|
if (result.name === UserData.name && result.surname === UserData.surname) {
|
|
7486
7461
|
import_sweetalert22.default.fire({
|
|
@@ -7488,7 +7463,7 @@ var UpdateUserProfile = ({
|
|
|
7488
7463
|
text: "Profile updated successfully",
|
|
7489
7464
|
icon: "success"
|
|
7490
7465
|
}).then(() => {
|
|
7491
|
-
|
|
7466
|
+
window.location.reload();
|
|
7492
7467
|
});
|
|
7493
7468
|
} else {
|
|
7494
7469
|
import_sweetalert22.default.fire({
|
|
@@ -7587,7 +7562,7 @@ var import_react_toastify = require("react-toastify");
|
|
|
7587
7562
|
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
7588
7563
|
var SettingsItem = (props) => {
|
|
7589
7564
|
const [value, setValue] = (0, import_react53.useState)(props.value);
|
|
7590
|
-
const handleUpdateSettings = () => __async(
|
|
7565
|
+
const handleUpdateSettings = () => __async(null, null, function* () {
|
|
7591
7566
|
try {
|
|
7592
7567
|
yield import_api_proxy21.SettingsService.settingsSetSettingForTenant(props.setting, value);
|
|
7593
7568
|
import_react_toastify.toast.success("Settings updated");
|
|
@@ -7633,8 +7608,7 @@ var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
|
7633
7608
|
var SettingsManagement = () => {
|
|
7634
7609
|
var _a;
|
|
7635
7610
|
var { data, isLoading } = (0, import_core81.useAppConfig)();
|
|
7636
|
-
if (isLoading)
|
|
7637
|
-
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { children: "Loading..." });
|
|
7611
|
+
if (isLoading) return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { children: "Loading..." });
|
|
7638
7612
|
const keys = Object == null ? void 0 : Object.keys((_a = data == null ? void 0 : data.setting) == null ? void 0 : _a.values);
|
|
7639
7613
|
let settings = {
|
|
7640
7614
|
GeoWiki: keys.filter((key) => key.startsWith("GeoWiki")),
|
|
@@ -7645,10 +7619,8 @@ var SettingsManagement = () => {
|
|
|
7645
7619
|
return key.startsWith((_a2 = data == null ? void 0 : data.currentTenant) == null ? void 0 : _a2.name);
|
|
7646
7620
|
})
|
|
7647
7621
|
};
|
|
7648
|
-
if (!data)
|
|
7649
|
-
|
|
7650
|
-
if (!keys)
|
|
7651
|
-
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { children: "no keys" });
|
|
7622
|
+
if (!data) return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { children: "no data" });
|
|
7623
|
+
if (!keys) return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { children: "no keys" });
|
|
7652
7624
|
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "w-full px-2 py-16 sm:px-0", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_react54.Tab.Group, { children: [
|
|
7653
7625
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react54.Tab.List, { className: "flex p-1 space-x-1 rounded-xl", children: Object.keys(settings).map(
|
|
7654
7626
|
(key) => settings[key].length > 0 && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
@@ -8639,6 +8611,7 @@ var FilterDropdown = ({
|
|
|
8639
8611
|
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
8640
8612
|
import_react60.Disclosure,
|
|
8641
8613
|
{
|
|
8614
|
+
as: "div",
|
|
8642
8615
|
"data-component": "FilterDropdown",
|
|
8643
8616
|
defaultOpen: filterValues.length > 0,
|
|
8644
8617
|
children: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
|
|
@@ -8713,7 +8686,7 @@ var DesignTestimonials = ({ testimonials }) => {
|
|
|
8713
8686
|
// src/components/DesignElements/BannerFollowLinks.tsx
|
|
8714
8687
|
var import_design_system78 = require("@geowiki/design-system");
|
|
8715
8688
|
var import_core89 = require("@geowiki/core");
|
|
8716
|
-
var
|
|
8689
|
+
var import_uuid8 = require("uuid");
|
|
8717
8690
|
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
8718
8691
|
var BannerFollowLinks = ({ title, links }) => {
|
|
8719
8692
|
return /* @__PURE__ */ (0, import_jsx_runtime101.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: [
|
|
@@ -8726,7 +8699,7 @@ var BannerFollowLinks = ({ title, links }) => {
|
|
|
8726
8699
|
rel: "noreferrer",
|
|
8727
8700
|
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_design_system78.H9Design, { children: link.text })
|
|
8728
8701
|
},
|
|
8729
|
-
(0,
|
|
8702
|
+
(0, import_uuid8.v4)()
|
|
8730
8703
|
)) })
|
|
8731
8704
|
] });
|
|
8732
8705
|
};
|
|
@@ -8739,8 +8712,7 @@ var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
|
8739
8712
|
var ListTagsGroup = ({ cluster }) => {
|
|
8740
8713
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
8741
8714
|
var { data: ConfigSettings, isLoading: IsConfigSettingsLoaded } = (0, import_core90.useConfigSettings)();
|
|
8742
|
-
if (IsConfigSettingsLoaded)
|
|
8743
|
-
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_design_system80.LoaderFull, {});
|
|
8715
|
+
if (IsConfigSettingsLoaded) return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_design_system80.LoaderFull, {});
|
|
8744
8716
|
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "space-y-6 lg:space-y-10", children: [
|
|
8745
8717
|
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
8746
8718
|
import_design_system79.TagsGroup,
|
|
@@ -8907,15 +8879,13 @@ var ApiImage = ({
|
|
|
8907
8879
|
width = 0,
|
|
8908
8880
|
height = 0
|
|
8909
8881
|
}) => {
|
|
8910
|
-
|
|
8911
|
-
if (isLoading)
|
|
8912
|
-
return null;
|
|
8882
|
+
const src = (0, import_core91.useApiImage)(imageId);
|
|
8913
8883
|
if (width > 0 && height > 0) {
|
|
8914
8884
|
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
8915
8885
|
import_core92.Image,
|
|
8916
8886
|
{
|
|
8917
8887
|
className,
|
|
8918
|
-
src
|
|
8888
|
+
src,
|
|
8919
8889
|
alt,
|
|
8920
8890
|
placeholder: `data:image/svg+xml;base64,${(0, import_core91.toBase64)((0, import_core91.shimmer)(700, 490))}`,
|
|
8921
8891
|
width,
|
|
@@ -8929,7 +8899,7 @@ var ApiImage = ({
|
|
|
8929
8899
|
import_core92.Image,
|
|
8930
8900
|
{
|
|
8931
8901
|
className: "object-cover rounded-xl",
|
|
8932
|
-
src
|
|
8902
|
+
src,
|
|
8933
8903
|
alt,
|
|
8934
8904
|
fill: true,
|
|
8935
8905
|
placeholder: `data:image/svg+xml;base64,${(0, import_core91.toBase64)((0, import_core91.shimmer)(700, 490))}`,
|
|
@@ -8942,7 +8912,7 @@ var ApiImage = ({
|
|
|
8942
8912
|
// src/components/DesignElements/SignUpBanner.tsx
|
|
8943
8913
|
var import_design_system81 = require("@geowiki/design-system");
|
|
8944
8914
|
var import_core93 = require("@geowiki/core");
|
|
8945
|
-
var
|
|
8915
|
+
var import_uuid9 = require("uuid");
|
|
8946
8916
|
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
8947
8917
|
var SignUpBanner = ({
|
|
8948
8918
|
title,
|
|
@@ -8981,7 +8951,7 @@ var SignUpBanner = ({
|
|
|
8981
8951
|
height: 172,
|
|
8982
8952
|
className: "w-[172px] h-[172px] rounded-xl object-cover"
|
|
8983
8953
|
},
|
|
8984
|
-
(0,
|
|
8954
|
+
(0, import_uuid9.v4)()
|
|
8985
8955
|
))
|
|
8986
8956
|
] }),
|
|
8987
8957
|
(button == null ? void 0 : button.text) && (button == null ? void 0 : button.link) && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "lg:hidden w-full", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
@@ -9117,7 +9087,6 @@ var import_react62 = require("react");
|
|
|
9117
9087
|
var import_react63 = require("@headlessui/react");
|
|
9118
9088
|
var import_outline7 = require("@heroicons/react/24/outline");
|
|
9119
9089
|
var import_core96 = require("@geowiki/core");
|
|
9120
|
-
var import_uuid11 = require("uuid");
|
|
9121
9090
|
var import_design_system83 = require("@geowiki/design-system");
|
|
9122
9091
|
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
9123
9092
|
function MobileFilterPopupOpened({
|
|
@@ -9222,27 +9191,30 @@ function MobileFilterPopupOpened({
|
|
|
9222
9191
|
}
|
|
9223
9192
|
) })
|
|
9224
9193
|
] }),
|
|
9225
|
-
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: " h-auto max-h-[calc(100vh-150px)] pt-3 px-5 bg-white space-y-4 overflow-y-auto ", children: list == null ? void 0 : list.map((item, index) =>
|
|
9226
|
-
|
|
9227
|
-
|
|
9228
|
-
|
|
9229
|
-
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
{
|
|
9236
|
-
|
|
9237
|
-
|
|
9238
|
-
|
|
9239
|
-
|
|
9240
|
-
|
|
9241
|
-
|
|
9242
|
-
|
|
9243
|
-
|
|
9244
|
-
|
|
9245
|
-
|
|
9194
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: " h-auto max-h-[calc(100vh-150px)] pt-3 px-5 bg-white space-y-4 overflow-y-auto ", children: list == null ? void 0 : list.map((item, index) => {
|
|
9195
|
+
var _a;
|
|
9196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
9197
|
+
"div",
|
|
9198
|
+
{
|
|
9199
|
+
className: " cursor-pointer ",
|
|
9200
|
+
onClick: () => handleClick(item.value),
|
|
9201
|
+
children: [
|
|
9202
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex justify-between", children: [
|
|
9203
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "pb-4 text-black text-base font-normal leading-snug", children: item.label }),
|
|
9204
|
+
checkValues.includes(item.value) && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
9205
|
+
import_outline7.CheckIcon,
|
|
9206
|
+
{
|
|
9207
|
+
className: "h-6 w-6 text-primary",
|
|
9208
|
+
"aria-hidden": "true"
|
|
9209
|
+
}
|
|
9210
|
+
) })
|
|
9211
|
+
] }),
|
|
9212
|
+
index !== list.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "w-full border-0 border-b border-grey-light" })
|
|
9213
|
+
]
|
|
9214
|
+
},
|
|
9215
|
+
(_a = item.value) != null ? _a : `item-${index}`
|
|
9216
|
+
);
|
|
9217
|
+
}) }),
|
|
9246
9218
|
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "absolute bottom-0 right-0 px-5 w-full pb-6 flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_design_system83.DesignButton, { className: "w-full ", onClick: handleShowResults, children: "View results" }) })
|
|
9247
9219
|
] })
|
|
9248
9220
|
}
|
|
@@ -9497,7 +9469,7 @@ var ClusterNewsItem = (props) => {
|
|
|
9497
9469
|
};
|
|
9498
9470
|
|
|
9499
9471
|
// src/components/DesignElements/ClusterNews/ClusterNewsList.tsx
|
|
9500
|
-
var
|
|
9472
|
+
var import_uuid10 = require("uuid");
|
|
9501
9473
|
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
9502
9474
|
var ClusterNewsList = ({ clusterNewsItems }) => {
|
|
9503
9475
|
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: "mx-auto", children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: "grid grid-cols-1 lg:grid-cols-3 gap-6", children: clusterNewsItems == null ? void 0 : clusterNewsItems.map((clusterNewsItem) => /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
@@ -9511,14 +9483,14 @@ var ClusterNewsList = ({ clusterNewsItems }) => {
|
|
|
9511
9483
|
clusterCountry: clusterNewsItem.clusterCountry,
|
|
9512
9484
|
path: clusterNewsItem.path
|
|
9513
9485
|
},
|
|
9514
|
-
(0,
|
|
9486
|
+
(0, import_uuid10.v4)()
|
|
9515
9487
|
)) }) });
|
|
9516
9488
|
};
|
|
9517
9489
|
|
|
9518
9490
|
// src/components/DesignElements/ClusterNews/ClusterStoryItem.tsx
|
|
9519
9491
|
var import_design_system88 = require("@geowiki/design-system");
|
|
9520
9492
|
var import_core100 = require("@geowiki/core");
|
|
9521
|
-
var
|
|
9493
|
+
var import_uuid11 = require("uuid");
|
|
9522
9494
|
var import_design_system89 = require("@geowiki/design-system");
|
|
9523
9495
|
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
9524
9496
|
var ClusterStoryItem = (props) => {
|
|
@@ -9539,7 +9511,7 @@ var ClusterStoryItem = (props) => {
|
|
|
9539
9511
|
}
|
|
9540
9512
|
const clusterNewsItems = clusterNewsDisplay == null ? void 0 : clusterNewsDisplay.slice(0, 3).map((clusterNewsItem) => {
|
|
9541
9513
|
return {
|
|
9542
|
-
key: (0,
|
|
9514
|
+
key: (0, import_uuid11.v4)(),
|
|
9543
9515
|
id: clusterNewsItem.id,
|
|
9544
9516
|
title: clusterNewsItem.title,
|
|
9545
9517
|
clusterName: props.ClusterName,
|
|
@@ -9633,7 +9605,7 @@ var ClusterStoryItem = (props) => {
|
|
|
9633
9605
|
var import_design_system90 = require("@geowiki/design-system");
|
|
9634
9606
|
var import_react67 = require("react");
|
|
9635
9607
|
var import_design_system91 = require("@geowiki/design-system");
|
|
9636
|
-
var
|
|
9608
|
+
var import_uuid12 = require("uuid");
|
|
9637
9609
|
var import_core101 = require("@geowiki/core");
|
|
9638
9610
|
var import_design_system92 = require("@geowiki/design-system");
|
|
9639
9611
|
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
@@ -9664,7 +9636,7 @@ var ClusterNews = ({
|
|
|
9664
9636
|
const clusterNewsDisplay = showAll ? currentItems : publishedItems == null ? void 0 : publishedItems.slice(0, 3);
|
|
9665
9637
|
const clusterNewsItems = clusterNewsDisplay == null ? void 0 : clusterNewsDisplay.map((clusterNewsItem) => {
|
|
9666
9638
|
return {
|
|
9667
|
-
key: (0,
|
|
9639
|
+
key: (0, import_uuid12.v4)(),
|
|
9668
9640
|
id: clusterNewsItem.id,
|
|
9669
9641
|
title: clusterNewsItem.title,
|
|
9670
9642
|
clusterName,
|
|
@@ -9674,10 +9646,8 @@ var ClusterNews = ({
|
|
|
9674
9646
|
path: clusterNewsItem.imageId === "00000000-0000-0000-0000-000000000000" ? "/assets/img/noImage.png" : clusterNewsItem.imageId
|
|
9675
9647
|
};
|
|
9676
9648
|
});
|
|
9677
|
-
if (isLoading)
|
|
9678
|
-
|
|
9679
|
-
if (publishedItems.length == 0)
|
|
9680
|
-
return null;
|
|
9649
|
+
if (isLoading) return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_design_system92.LocalLoader, {});
|
|
9650
|
+
if (publishedItems.length == 0) return null;
|
|
9681
9651
|
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_jsx_runtime115.Fragment, { children: !isLoading && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { className: "bg-grey-lightest lg:mt-[100px]", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { className: "bg-grey-lightest mx-5 lg:mx-12", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: "container mx-auto space-y-6 py-6 lg:space-y-10 lg:py-16 px-0 lg:px-10 ", children: [
|
|
9682
9652
|
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: "lg:flex lg:justify-between lg:items-end", children: [
|
|
9683
9653
|
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_design_system90.H4Design, { className: "pb-4 lg:pb-0", children: "Cluster News" }),
|
|
@@ -9712,7 +9682,7 @@ var ClusterNews = ({
|
|
|
9712
9682
|
|
|
9713
9683
|
// src/components/DesignElements/ClusterNews/SixClusterNews.tsx
|
|
9714
9684
|
var import_core102 = require("@geowiki/core");
|
|
9715
|
-
var
|
|
9685
|
+
var import_uuid13 = require("uuid");
|
|
9716
9686
|
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
9717
9687
|
var SixClusterNews = () => {
|
|
9718
9688
|
var _a, _b, _c;
|
|
@@ -9753,7 +9723,7 @@ var SixClusterNews = () => {
|
|
|
9753
9723
|
];
|
|
9754
9724
|
const clusterNews = (_a = clusterNewsArray.filter((item) => item != null).map(
|
|
9755
9725
|
(clusterNewsItem) => ({
|
|
9756
|
-
key: (0,
|
|
9726
|
+
key: (0, import_uuid13.v4)(),
|
|
9757
9727
|
id: clusterNewsItem.id,
|
|
9758
9728
|
title: clusterNewsItem.title,
|
|
9759
9729
|
clusterName: clusterNewsItem.clusterName,
|
|
@@ -9765,7 +9735,7 @@ var SixClusterNews = () => {
|
|
|
9765
9735
|
)) != null ? _a : [];
|
|
9766
9736
|
const firstClusterNews = (_c = (_b = news == null ? void 0 : news.items) == null ? void 0 : _b.map((clusterNewsItem) => {
|
|
9767
9737
|
return {
|
|
9768
|
-
key: (0,
|
|
9738
|
+
key: (0, import_uuid13.v4)(),
|
|
9769
9739
|
id: clusterNewsItem.id,
|
|
9770
9740
|
title: clusterNewsItem.title,
|
|
9771
9741
|
clusterName: clusterNewsItem.clusterName,
|
|
@@ -9832,13 +9802,12 @@ var ClusterList = ({ clusters }) => {
|
|
|
9832
9802
|
var import_design_system95 = require("@geowiki/design-system");
|
|
9833
9803
|
var import_design_system96 = require("@geowiki/design-system");
|
|
9834
9804
|
var import_core104 = require("@geowiki/core");
|
|
9835
|
-
var
|
|
9805
|
+
var import_uuid14 = require("uuid");
|
|
9836
9806
|
var import_core105 = require("@geowiki/core");
|
|
9837
9807
|
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
9838
9808
|
var H3Clusters = ({ clusters }) => {
|
|
9839
9809
|
const { data: countries, isLoading: isCountriesLoading } = (0, import_core105.useCountries)();
|
|
9840
|
-
if (isCountriesLoading)
|
|
9841
|
-
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { children: "Loading..." });
|
|
9810
|
+
if (isCountriesLoading) return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { children: "Loading..." });
|
|
9842
9811
|
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: "lg:container mx-auto space-y-6 lg:space-y-10 ", children: [
|
|
9843
9812
|
/* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: "lg:flex lg:justify-between lg:items-end", children: [
|
|
9844
9813
|
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_design_system95.H4Design, { className: "pb-4 lg:pb-0", children: "Explore other Farmer Clusters" }),
|
|
@@ -9857,7 +9826,7 @@ var H3Clusters = ({ clusters }) => {
|
|
|
9857
9826
|
clusters: clusters == null ? void 0 : clusters.slice(0, 4).map((cluster) => {
|
|
9858
9827
|
var _a;
|
|
9859
9828
|
return {
|
|
9860
|
-
key: (0,
|
|
9829
|
+
key: (0, import_uuid14.v4)(),
|
|
9861
9830
|
title: cluster.name,
|
|
9862
9831
|
imageId: cluster.coverImageId || "",
|
|
9863
9832
|
country: ((_a = countries == null ? void 0 : countries.find((c) => c.id === cluster.countryId)) == null ? void 0 : _a.country) || "Missing Country",
|
|
@@ -9907,7 +9876,7 @@ var GalleryCarouselOpen = ({
|
|
|
9907
9876
|
}) => {
|
|
9908
9877
|
const [defaultPhoto, setDefaultPhoto] = (0, import_react70.useState)(currentPhoto);
|
|
9909
9878
|
const [text, setDefaultText] = (0, import_react70.useState)("");
|
|
9910
|
-
|
|
9879
|
+
const data = (0, import_core106.useApiImage)(defaultPhoto.imageId);
|
|
9911
9880
|
(0, import_react70.useEffect)(() => {
|
|
9912
9881
|
setDefaultPhoto(currentPhoto);
|
|
9913
9882
|
}, [currentPhoto]);
|
|
@@ -10470,10 +10439,11 @@ var SubtitleH3BodyInternalLinkList = ({
|
|
|
10470
10439
|
return text.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'");
|
|
10471
10440
|
};
|
|
10472
10441
|
const addLinksStyles = (content) => {
|
|
10442
|
+
if (!content) return "";
|
|
10473
10443
|
const decodedContent = decodeHtmlEntities(content);
|
|
10474
10444
|
const textToAdd = " class='text-white font-semibold no-underline'";
|
|
10475
10445
|
const regex = /(<a(?=[^>]*>))/g;
|
|
10476
|
-
const modifiedText = decodedContent
|
|
10446
|
+
const modifiedText = decodedContent.replace(regex, `$1${textToAdd}`);
|
|
10477
10447
|
return modifiedText;
|
|
10478
10448
|
};
|
|
10479
10449
|
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
@@ -10544,7 +10514,7 @@ var SubtitleH3Faq = ({
|
|
|
10544
10514
|
// src/components/DesignElements/TextBlocks/subtitle-h3-cluster-4-column.tsx
|
|
10545
10515
|
var import_design_system113 = require("@geowiki/design-system");
|
|
10546
10516
|
var import_core115 = require("@geowiki/core");
|
|
10547
|
-
var
|
|
10517
|
+
var import_uuid15 = require("uuid");
|
|
10548
10518
|
var import_design_system114 = require("@geowiki/design-system");
|
|
10549
10519
|
var import_core116 = require("@geowiki/core");
|
|
10550
10520
|
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
@@ -10561,8 +10531,7 @@ var SubtitleH3Cluster4Column = ({
|
|
|
10561
10531
|
4
|
|
10562
10532
|
);
|
|
10563
10533
|
const { data: countries, isLoading: isCountriesLoading } = (0, import_core115.useCountries)();
|
|
10564
|
-
if (isClusterLoading || isCountriesLoading)
|
|
10565
|
-
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { children: "Loading..." });
|
|
10534
|
+
if (isClusterLoading || isCountriesLoading) return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { children: "Loading..." });
|
|
10566
10535
|
return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
|
|
10567
10536
|
"div",
|
|
10568
10537
|
{
|
|
@@ -10595,7 +10564,7 @@ var SubtitleH3Cluster4Column = ({
|
|
|
10595
10564
|
clusters: (_a = clusters == null ? void 0 : clusters.items) == null ? void 0 : _a.map((cluster) => {
|
|
10596
10565
|
var _a2;
|
|
10597
10566
|
return {
|
|
10598
|
-
key: (0,
|
|
10567
|
+
key: (0, import_uuid15.v4)(),
|
|
10599
10568
|
title: cluster.name,
|
|
10600
10569
|
imageId: cluster.coverImageId || "",
|
|
10601
10570
|
country: ((_a2 = countries == null ? void 0 : countries.find((x) => x.id === cluster.countryId)) == null ? void 0 : _a2.country) || "Missing Country",
|
|
@@ -10613,7 +10582,7 @@ var SubtitleH3Cluster4Column = ({
|
|
|
10613
10582
|
// src/components/DesignElements/TextBlocks/subtitle-h3-cluster-news-3-column.tsx
|
|
10614
10583
|
var import_design_system115 = require("@geowiki/design-system");
|
|
10615
10584
|
var import_core117 = require("@geowiki/core");
|
|
10616
|
-
var
|
|
10585
|
+
var import_uuid16 = require("uuid");
|
|
10617
10586
|
var import_design_system116 = require("@geowiki/design-system");
|
|
10618
10587
|
var import_core118 = require("@geowiki/core");
|
|
10619
10588
|
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
@@ -10626,7 +10595,7 @@ var SubtitleH3ClusterNews3Column = ({
|
|
|
10626
10595
|
const { data: news, isLoading } = (0, import_core117.useNewsFromAllClusters)(0, 3);
|
|
10627
10596
|
const clusterNewsItems = (_a = news == null ? void 0 : news.items) == null ? void 0 : _a.map((clusterNewsItem) => {
|
|
10628
10597
|
return {
|
|
10629
|
-
key: (0,
|
|
10598
|
+
key: (0, import_uuid16.v4)(),
|
|
10630
10599
|
id: clusterNewsItem.id,
|
|
10631
10600
|
title: clusterNewsItem.title,
|
|
10632
10601
|
clusterName: clusterNewsItem.clusterName,
|