@geowiki/ui 0.16.9-dev.14 → 0.16.9-dev.15
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/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__require,
|
|
5
5
|
__spreadProps,
|
|
6
6
|
__spreadValues
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IIIL7C6U.mjs";
|
|
8
8
|
|
|
9
9
|
// src/index.tsx
|
|
10
10
|
export * from "@geowiki/design-system";
|
|
@@ -38,8 +38,7 @@ var NextImage = ({
|
|
|
38
38
|
import classNames from "classnames";
|
|
39
39
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
40
40
|
var HtmlLinkList = ({ links }) => {
|
|
41
|
-
if (!links)
|
|
42
|
-
return null;
|
|
41
|
+
if (!links) return null;
|
|
43
42
|
return /* @__PURE__ */ jsx2("div", { children: links == null ? void 0 : links.map((link) => {
|
|
44
43
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
45
44
|
return /* @__PURE__ */ jsx2(
|
|
@@ -229,8 +228,7 @@ function parseTitle(title, type) {
|
|
|
229
228
|
return parsedTitle.join("");
|
|
230
229
|
}
|
|
231
230
|
var isAdmin = (token) => {
|
|
232
|
-
if (!token)
|
|
233
|
-
return false;
|
|
231
|
+
if (!token) return false;
|
|
234
232
|
try {
|
|
235
233
|
const decodedToken = jwtDecode(token);
|
|
236
234
|
return decodedToken.role.includes(USER_ROLE.ADMIN) || decodedToken.role.includes(USER_ROLE.FARMER_CLUSTER_ADMIN);
|
|
@@ -703,7 +701,7 @@ var ProfileSettings = ({ data }) => {
|
|
|
703
701
|
const { handleSubmit, register } = useForm();
|
|
704
702
|
const { toast: toast2 } = useToast();
|
|
705
703
|
const queryClient = useQueryClient();
|
|
706
|
-
const onSubmit = (data2) => __async(
|
|
704
|
+
const onSubmit = (data2) => __async(null, null, function* () {
|
|
707
705
|
try {
|
|
708
706
|
yield ProfileService.profileUpdate(data2);
|
|
709
707
|
toast2({
|
|
@@ -787,7 +785,7 @@ var ChangePassword = () => {
|
|
|
787
785
|
newPassword: "",
|
|
788
786
|
confirmNewPassword: ""
|
|
789
787
|
});
|
|
790
|
-
const onSubmit = (data) => __async(
|
|
788
|
+
const onSubmit = (data) => __async(null, null, function* () {
|
|
791
789
|
if (shouldDisabled()) {
|
|
792
790
|
toast2({
|
|
793
791
|
title: "Password Incorrect",
|
|
@@ -904,7 +902,7 @@ var AccountEdit = ({ data, open, setOpen }) => {
|
|
|
904
902
|
const handleInputChange = () => {
|
|
905
903
|
setShowSaving(false);
|
|
906
904
|
};
|
|
907
|
-
const onSubmit = (data2) => __async(
|
|
905
|
+
const onSubmit = (data2) => __async(null, null, function* () {
|
|
908
906
|
try {
|
|
909
907
|
yield ProfileService3.profileUpdate(data2);
|
|
910
908
|
toast2({
|
|
@@ -1160,7 +1158,7 @@ var PasswordEdit = ({ open, setOpen }) => {
|
|
|
1160
1158
|
setIsSaving(false);
|
|
1161
1159
|
}
|
|
1162
1160
|
}, [formValues, hasInteracted]);
|
|
1163
|
-
const onSubmit = (data) => __async(
|
|
1161
|
+
const onSubmit = (data) => __async(null, null, function* () {
|
|
1164
1162
|
try {
|
|
1165
1163
|
setIsSaving(true);
|
|
1166
1164
|
const requestBody = data;
|
|
@@ -1456,7 +1454,7 @@ var TestEmail = ({ onDismiss }) => {
|
|
|
1456
1454
|
useEffect2(() => {
|
|
1457
1455
|
setOpen(true);
|
|
1458
1456
|
}, []);
|
|
1459
|
-
const onSubmit = (data) => __async(
|
|
1457
|
+
const onSubmit = (data) => __async(null, null, function* () {
|
|
1460
1458
|
try {
|
|
1461
1459
|
const payload = data;
|
|
1462
1460
|
yield EmailSettingsService.emailSettingsSendTestEmail(payload);
|
|
@@ -1545,7 +1543,7 @@ var Emailing = () => {
|
|
|
1545
1543
|
},
|
|
1546
1544
|
[emailSettingDto]
|
|
1547
1545
|
);
|
|
1548
|
-
const onSubmitEvent = () => __async(
|
|
1546
|
+
const onSubmitEvent = () => __async(null, null, function* () {
|
|
1549
1547
|
try {
|
|
1550
1548
|
yield EmailSettingsService2.emailSettingsUpdate(__spreadValues({}, emailSettingDto));
|
|
1551
1549
|
toast2({
|
|
@@ -1789,7 +1787,7 @@ var AddTenant = () => {
|
|
|
1789
1787
|
const { toast: toast2 } = useToast6();
|
|
1790
1788
|
const { handleSubmit, register } = useForm7();
|
|
1791
1789
|
const queryClient = useQueryClient5();
|
|
1792
|
-
const onSubmit = (data) => __async(
|
|
1790
|
+
const onSubmit = (data) => __async(null, null, function* () {
|
|
1793
1791
|
const newTenant = data;
|
|
1794
1792
|
try {
|
|
1795
1793
|
yield TenantService.tenantCreate(newTenant);
|
|
@@ -1904,7 +1902,7 @@ var TenantEdit = ({
|
|
|
1904
1902
|
setEnableHost(true);
|
|
1905
1903
|
}
|
|
1906
1904
|
}, [tenantDto, (_a = tenantDto == null ? void 0 : tenantDto.extraProperties) == null ? void 0 : _a.Host]);
|
|
1907
|
-
const onSubmit = (dto) => __async(
|
|
1905
|
+
const onSubmit = (dto) => __async(null, null, function* () {
|
|
1908
1906
|
const tenant = dto;
|
|
1909
1907
|
try {
|
|
1910
1908
|
yield TenantService2.tenantUpdate(tenantId, tenant);
|
|
@@ -2061,7 +2059,7 @@ var FeatureList = ({ onDismiss, tenantId }) => {
|
|
|
2061
2059
|
setEnableEmailSetting(value);
|
|
2062
2060
|
}
|
|
2063
2061
|
};
|
|
2064
|
-
const onSubmit = () => __async(
|
|
2062
|
+
const onSubmit = () => __async(null, null, function* () {
|
|
2065
2063
|
try {
|
|
2066
2064
|
const featureUpdateDto = {};
|
|
2067
2065
|
featureUpdateDto.features = [
|
|
@@ -2095,7 +2093,7 @@ var FeatureList = ({ onDismiss, tenantId }) => {
|
|
|
2095
2093
|
}
|
|
2096
2094
|
}
|
|
2097
2095
|
});
|
|
2098
|
-
const onResetToDefaultEvent = () => __async(
|
|
2096
|
+
const onResetToDefaultEvent = () => __async(null, null, function* () {
|
|
2099
2097
|
try {
|
|
2100
2098
|
yield FeaturesService.featuresDelete(PermissionProvider.T, tenantId);
|
|
2101
2099
|
toast2({
|
|
@@ -2194,8 +2192,7 @@ import {
|
|
|
2194
2192
|
import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2195
2193
|
var PermissionActions = ({ actions }) => {
|
|
2196
2194
|
const renderElement = (action) => {
|
|
2197
|
-
if (!action.showButton || action.visible)
|
|
2198
|
-
return false;
|
|
2195
|
+
if (!action.showButton || action.visible) return false;
|
|
2199
2196
|
return /* @__PURE__ */ jsx23(DropdownMenuItem, { children: /* @__PURE__ */ jsxs20(Button12, { variant: "secondary", onClick: action.callback, size: "sm", children: [
|
|
2200
2197
|
action.icon === "permission" && /* @__PURE__ */ jsxs20("div", { className: "flex items-center space-x-1", children: [
|
|
2201
2198
|
/* @__PURE__ */ jsx23(
|
|
@@ -2284,7 +2281,7 @@ var DeleteTenant = ({
|
|
|
2284
2281
|
}) => {
|
|
2285
2282
|
const { toast: toast2 } = useToast9();
|
|
2286
2283
|
const [open, setOpen] = useState13(false);
|
|
2287
|
-
const onYesEvent = () => __async(
|
|
2284
|
+
const onYesEvent = () => __async(null, null, function* () {
|
|
2288
2285
|
try {
|
|
2289
2286
|
yield TenantService3.tenantDelete(tenantId);
|
|
2290
2287
|
toast2({
|
|
@@ -2485,7 +2482,7 @@ var AddUser = ({ showButtonAdd }) => {
|
|
|
2485
2482
|
const { toast: toast2 } = useToast10();
|
|
2486
2483
|
const queryClient = useQueryClient9();
|
|
2487
2484
|
const { handleSubmit, register } = useForm10();
|
|
2488
|
-
const onSubmit = (data) => __async(
|
|
2485
|
+
const onSubmit = (data) => __async(null, null, function* () {
|
|
2489
2486
|
const user = data;
|
|
2490
2487
|
user.isActive = isActive;
|
|
2491
2488
|
user.lockoutEnabled = lockoutEnabled;
|
|
@@ -2616,7 +2613,7 @@ var DeleteUser = ({
|
|
|
2616
2613
|
}) => {
|
|
2617
2614
|
const { toast: toast2 } = useToast11();
|
|
2618
2615
|
const [open, setOpen] = useState16(false);
|
|
2619
|
-
const onYesEvent = () => __async(
|
|
2616
|
+
const onYesEvent = () => __async(null, null, function* () {
|
|
2620
2617
|
try {
|
|
2621
2618
|
yield UserService2.userDelete(userId);
|
|
2622
2619
|
toast2({
|
|
@@ -2797,8 +2794,7 @@ function formatUserAlias(userName) {
|
|
|
2797
2794
|
var _a, _b;
|
|
2798
2795
|
const parts = userName.split("_");
|
|
2799
2796
|
const first = ((_b = (_a = parts[0].at(0)) == null ? void 0 : _a.toUpperCase()) != null ? _b : "") + parts[0].substring(1);
|
|
2800
|
-
if (!parts[1])
|
|
2801
|
-
return first;
|
|
2797
|
+
if (!parts[1]) return first;
|
|
2802
2798
|
return first + "(" + parts[1].toUpperCase() + ")";
|
|
2803
2799
|
}
|
|
2804
2800
|
var UserEdit = ({ userDto, userId, onDismiss }) => {
|
|
@@ -2862,20 +2858,16 @@ var UserEdit = ({ userDto, userId, onDismiss }) => {
|
|
|
2862
2858
|
setRefreshData(false);
|
|
2863
2859
|
};
|
|
2864
2860
|
if ((updateUserRoleProjectResult == null ? void 0 : updateUserRoleProjectResult.success) == true) {
|
|
2865
|
-
if (userAlias != "")
|
|
2866
|
-
|
|
2867
|
-
if (userProjectRole.length != 0)
|
|
2868
|
-
setUserProjectRole([]);
|
|
2861
|
+
if (userAlias != "") setUserAlias("");
|
|
2862
|
+
if (userProjectRole.length != 0) setUserProjectRole([]);
|
|
2869
2863
|
}
|
|
2870
2864
|
if (setUserDetail && setUserDetail.success == true) {
|
|
2871
|
-
if (contractStartDate != "")
|
|
2872
|
-
|
|
2873
|
-
if (contractEndDate != "")
|
|
2874
|
-
setContractEndDate("");
|
|
2865
|
+
if (contractStartDate != "") setContractStartDate("");
|
|
2866
|
+
if (contractEndDate != "") setContractEndDate("");
|
|
2875
2867
|
setUpdateUserDetail(false);
|
|
2876
2868
|
setRefreshData(false);
|
|
2877
2869
|
}
|
|
2878
|
-
const updateUserRoleProject = () => __async(
|
|
2870
|
+
const updateUserRoleProject = () => __async(null, null, function* () {
|
|
2879
2871
|
setUserAlias(formatUserAlias(userDto.userName));
|
|
2880
2872
|
setUpdateUserProject(true);
|
|
2881
2873
|
});
|
|
@@ -2925,17 +2917,14 @@ var UserEdit = ({ userDto, userId, onDismiss }) => {
|
|
|
2925
2917
|
const paginationComponentOptions = {
|
|
2926
2918
|
noRowsPerPage: true
|
|
2927
2919
|
};
|
|
2928
|
-
const onSubmit = (data) => __async(
|
|
2920
|
+
const onSubmit = (data) => __async(null, null, function* () {
|
|
2929
2921
|
const user = data;
|
|
2930
2922
|
try {
|
|
2931
2923
|
if (evolandFeature) {
|
|
2932
|
-
if (!updateUserProject)
|
|
2933
|
-
yield updateUserRoleProject();
|
|
2924
|
+
if (!updateUserProject) yield updateUserRoleProject();
|
|
2934
2925
|
if (userCurrentProject && (userCurrentProject[0].contract_start_date != contractStartDate || userCurrentProject[0].contract_end_date != contractEndDate)) {
|
|
2935
|
-
if (contractStartDate == "")
|
|
2936
|
-
|
|
2937
|
-
if (contractEndDate == "")
|
|
2938
|
-
setContractEndDate(null);
|
|
2926
|
+
if (contractStartDate == "") setContractStartDate(null);
|
|
2927
|
+
if (contractEndDate == "") setContractEndDate(null);
|
|
2939
2928
|
if ((contractStartDate == "" || !contractStartDate) && contractEndDate || contractEndDate && contractStartDate && new Date(contractEndDate) < new Date(contractEndDate)) {
|
|
2940
2929
|
alert("Please provide correct date");
|
|
2941
2930
|
return;
|
|
@@ -2963,14 +2952,10 @@ var UserEdit = ({ userDto, userId, onDismiss }) => {
|
|
|
2963
2952
|
});
|
|
2964
2953
|
const onCloseEvent = () => {
|
|
2965
2954
|
setOpen(false);
|
|
2966
|
-
if (userAlias != "")
|
|
2967
|
-
|
|
2968
|
-
if (
|
|
2969
|
-
|
|
2970
|
-
if (contractStartDate != "")
|
|
2971
|
-
setContractStartDate("");
|
|
2972
|
-
if (contractEndDate != "")
|
|
2973
|
-
setContractEndDate("");
|
|
2955
|
+
if (userAlias != "") setUserAlias("");
|
|
2956
|
+
if (userProjectRole.length != 0) setUserProjectRole([]);
|
|
2957
|
+
if (contractStartDate != "") setContractStartDate("");
|
|
2958
|
+
if (contractEndDate != "") setContractEndDate("");
|
|
2974
2959
|
onDismiss();
|
|
2975
2960
|
};
|
|
2976
2961
|
useEffect9(() => {
|
|
@@ -3002,7 +2987,7 @@ var UserEdit = ({ userDto, userId, onDismiss }) => {
|
|
|
3002
2987
|
},
|
|
3003
2988
|
[roles]
|
|
3004
2989
|
);
|
|
3005
|
-
const onRoleAssignedSaveEvent = (e) => __async(
|
|
2990
|
+
const onRoleAssignedSaveEvent = (e) => __async(null, null, function* () {
|
|
3006
2991
|
var _a2;
|
|
3007
2992
|
e.preventDefault();
|
|
3008
2993
|
const updateUserDto = __spreadProps(__spreadValues({}, userDto), {
|
|
@@ -3087,8 +3072,7 @@ var UserEdit = ({ userDto, userId, onDismiss }) => {
|
|
|
3087
3072
|
onChange: (e) => {
|
|
3088
3073
|
if ((contractStartDate == "" || !contractStartDate) && e.target.value !== "" || new Date(contractStartDate) > new Date(e.target.value))
|
|
3089
3074
|
alert("Please provide correct start date");
|
|
3090
|
-
else
|
|
3091
|
-
setContractEndDate(e.target.value);
|
|
3075
|
+
else setContractEndDate(e.target.value);
|
|
3092
3076
|
}
|
|
3093
3077
|
})
|
|
3094
3078
|
)
|
|
@@ -3435,8 +3419,7 @@ var UserPermission = ({
|
|
|
3435
3419
|
var _a;
|
|
3436
3420
|
return (_a = g.permissions) == null ? void 0 : _a.every((p) => p.isGranted);
|
|
3437
3421
|
}).every((e) => e);
|
|
3438
|
-
if (hasAllPermissionGranted)
|
|
3439
|
-
setHasAllGranted(hasAllPermissionGranted);
|
|
3422
|
+
if (hasAllPermissionGranted) setHasAllGranted(hasAllPermissionGranted);
|
|
3440
3423
|
}
|
|
3441
3424
|
}, [permissionGroups]);
|
|
3442
3425
|
useEffect11(() => {
|
|
@@ -3500,7 +3483,7 @@ var UserPermission = ({
|
|
|
3500
3483
|
[hasAllGranted, permissionGroups]
|
|
3501
3484
|
);
|
|
3502
3485
|
const onSubmit = useCallback5(
|
|
3503
|
-
(e) => __async(
|
|
3486
|
+
(e) => __async(null, null, function* () {
|
|
3504
3487
|
e.preventDefault();
|
|
3505
3488
|
const payload = permissionGroups == null ? void 0 : permissionGroups.map(
|
|
3506
3489
|
(p) => p.permissions.map((grant) => ({
|
|
@@ -3856,7 +3839,7 @@ var DeleteRole = ({
|
|
|
3856
3839
|
}) => {
|
|
3857
3840
|
const { toast: toast2 } = useToast14();
|
|
3858
3841
|
const [open, setOpen] = useState21(false);
|
|
3859
|
-
const onYesEvent = () => __async(
|
|
3842
|
+
const onYesEvent = () => __async(null, null, function* () {
|
|
3860
3843
|
try {
|
|
3861
3844
|
yield RoleService.roleDelete(roleId);
|
|
3862
3845
|
toast2({
|
|
@@ -3917,7 +3900,7 @@ var RoleEdit = ({ roleDto, roleId, onDismiss }) => {
|
|
|
3917
3900
|
const { handleSubmit, register } = useForm12();
|
|
3918
3901
|
const [isDefault, setIsDefault] = useState22(roleDto.isDefault);
|
|
3919
3902
|
const [isPublic, setIsPublic] = useState22(roleDto.isPublic);
|
|
3920
|
-
const onSubmit = (data) => __async(
|
|
3903
|
+
const onSubmit = (data) => __async(null, null, function* () {
|
|
3921
3904
|
const role = data;
|
|
3922
3905
|
role.isDefault = isDefault;
|
|
3923
3906
|
role.isPublic = isPublic;
|
|
@@ -4080,8 +4063,7 @@ var RolePermission = ({ roleDto, onDismiss }) => {
|
|
|
4080
4063
|
var _a;
|
|
4081
4064
|
return (_a = g.permissions) == null ? void 0 : _a.every((p) => p.isGranted);
|
|
4082
4065
|
}).every((e) => e);
|
|
4083
|
-
if (hasAllPermissionGranted)
|
|
4084
|
-
setHasAllGranted(hasAllPermissionGranted);
|
|
4066
|
+
if (hasAllPermissionGranted) setHasAllGranted(hasAllPermissionGranted);
|
|
4085
4067
|
}
|
|
4086
4068
|
}, [permissionGroups]);
|
|
4087
4069
|
useEffect14(() => {
|
|
@@ -4145,7 +4127,7 @@ var RolePermission = ({ roleDto, onDismiss }) => {
|
|
|
4145
4127
|
[hasAllGranted, permissionGroups]
|
|
4146
4128
|
);
|
|
4147
4129
|
const onSubmit = useCallback6(
|
|
4148
|
-
(e) => __async(
|
|
4130
|
+
(e) => __async(null, null, function* () {
|
|
4149
4131
|
e.preventDefault();
|
|
4150
4132
|
const payload = permissionGroups == null ? void 0 : permissionGroups.map(
|
|
4151
4133
|
(p) => p.permissions.map((grant) => ({
|
|
@@ -4463,7 +4445,7 @@ var AddRole = ({ showButtonAdd }) => {
|
|
|
4463
4445
|
const { toast: toast2 } = useToast17();
|
|
4464
4446
|
const { handleSubmit, register } = useForm13();
|
|
4465
4447
|
const queryClient = useQueryClient14();
|
|
4466
|
-
const onSubmit = (data) => __async(
|
|
4448
|
+
const onSubmit = (data) => __async(null, null, function* () {
|
|
4467
4449
|
const newRole = data;
|
|
4468
4450
|
newRole.isDefault = isDefault;
|
|
4469
4451
|
newRole.isPublic = isPublic;
|
|
@@ -4686,13 +4668,11 @@ import { useCurrentUser as useCurrentUser2 } from "@geowiki/core";
|
|
|
4686
4668
|
import { Fragment as Fragment17, jsx as jsx43 } from "react/jsx-runtime";
|
|
4687
4669
|
var RequireRole = ({ roles, children }) => {
|
|
4688
4670
|
const currentUser = useCurrentUser2();
|
|
4689
|
-
if (!currentUser)
|
|
4690
|
-
return null;
|
|
4671
|
+
if (!currentUser) return null;
|
|
4691
4672
|
if (!(roles == null ? void 0 : roles.some((role) => {
|
|
4692
4673
|
var _a;
|
|
4693
4674
|
return (_a = currentUser.roles) == null ? void 0 : _a.includes(role);
|
|
4694
|
-
})))
|
|
4695
|
-
return null;
|
|
4675
|
+
}))) return null;
|
|
4696
4676
|
return /* @__PURE__ */ jsx43(Fragment17, { children });
|
|
4697
4677
|
};
|
|
4698
4678
|
|
|
@@ -4763,8 +4743,7 @@ var Sidebar = ({
|
|
|
4763
4743
|
(menu) => {
|
|
4764
4744
|
var _a2;
|
|
4765
4745
|
const m = (_a2 = menu.children) == null ? void 0 : _a2.find((c) => c.link === (router == null ? void 0 : router.asPath));
|
|
4766
|
-
if (m)
|
|
4767
|
-
return menu.name;
|
|
4746
|
+
if (m) return menu.name;
|
|
4768
4747
|
return "";
|
|
4769
4748
|
},
|
|
4770
4749
|
[router == null ? void 0 : router.asPath]
|
|
@@ -5032,8 +5011,13 @@ var HtmlView = (props) => {
|
|
|
5032
5011
|
};
|
|
5033
5012
|
|
|
5034
5013
|
// src/components/Elements/TopProgress.tsx
|
|
5035
|
-
import {
|
|
5014
|
+
import {
|
|
5015
|
+
motion as motionRaw,
|
|
5016
|
+
useScroll,
|
|
5017
|
+
useSpring
|
|
5018
|
+
} from "framer-motion";
|
|
5036
5019
|
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
5020
|
+
var motion = motionRaw;
|
|
5037
5021
|
var TopProgress = () => {
|
|
5038
5022
|
const { scrollYProgress } = useScroll();
|
|
5039
5023
|
const scaleX = useSpring(scrollYProgress, {
|
|
@@ -5163,8 +5147,7 @@ var CustomDropDown = (props) => {
|
|
|
5163
5147
|
}
|
|
5164
5148
|
return null;
|
|
5165
5149
|
});
|
|
5166
|
-
if (IsConfigSettingsLoaded)
|
|
5167
|
-
return /* @__PURE__ */ jsx51(LoaderFull2, {});
|
|
5150
|
+
if (IsConfigSettingsLoaded) return /* @__PURE__ */ jsx51(LoaderFull2, {});
|
|
5168
5151
|
return /* @__PURE__ */ jsx51(
|
|
5169
5152
|
AsyncSelect,
|
|
5170
5153
|
{
|
|
@@ -5307,11 +5290,9 @@ var CustomFilterSort = (props) => {
|
|
|
5307
5290
|
LabelLookUp: item.LabelLookUp,
|
|
5308
5291
|
Parameter: item.Parameter,
|
|
5309
5292
|
onValueChange: (currentvalue) => {
|
|
5310
|
-
if ((currentvalue == null ? void 0 : currentvalue.value) != void 0)
|
|
5311
|
-
skip = 0;
|
|
5293
|
+
if ((currentvalue == null ? void 0 : currentvalue.value) != void 0) skip = 0;
|
|
5312
5294
|
filterValues[item == null ? void 0 : item.Name.replace(new RegExp(" ", "g"), "")] = currentvalue == null ? void 0 : currentvalue.value;
|
|
5313
|
-
if (!props.showButtons)
|
|
5314
|
-
onSearch();
|
|
5295
|
+
if (!props.showButtons) onSearch();
|
|
5315
5296
|
}
|
|
5316
5297
|
},
|
|
5317
5298
|
index
|
|
@@ -5375,15 +5356,15 @@ var CustomFilterSort = (props) => {
|
|
|
5375
5356
|
// src/components/Elements/InfoCard.tsx
|
|
5376
5357
|
import { useConfigSettings as useConfigSettings2 } from "@geowiki/core";
|
|
5377
5358
|
import { Link as Link4 } from "@geowiki/core";
|
|
5378
|
-
import { motion as
|
|
5359
|
+
import { motion as motionRaw2 } from "framer-motion";
|
|
5379
5360
|
import { itemVariants } from "@geowiki/core";
|
|
5380
5361
|
import { LoaderFull as LoaderFull3 } from "@geowiki/design-system";
|
|
5381
5362
|
import { jsx as jsx53, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
5363
|
+
var motion2 = motionRaw2;
|
|
5382
5364
|
var InfoCard = (props) => {
|
|
5383
5365
|
var _a;
|
|
5384
5366
|
var { data: ConfigSettings, isLoading: IsConfigSettingsLoaded } = useConfigSettings2();
|
|
5385
|
-
if (IsConfigSettingsLoaded)
|
|
5386
|
-
return /* @__PURE__ */ jsx53(LoaderFull3, {});
|
|
5367
|
+
if (IsConfigSettingsLoaded) return /* @__PURE__ */ jsx53(LoaderFull3, {});
|
|
5387
5368
|
return /* @__PURE__ */ jsx53(
|
|
5388
5369
|
motion2.li,
|
|
5389
5370
|
{
|
|
@@ -5615,8 +5596,7 @@ var CmsImage = ({
|
|
|
5615
5596
|
showPlaceholder = true
|
|
5616
5597
|
}) => {
|
|
5617
5598
|
var { data: cmsImageUrl, isLoading } = useCmsImage(src);
|
|
5618
|
-
if (isLoading)
|
|
5619
|
-
return null;
|
|
5599
|
+
if (isLoading) return null;
|
|
5620
5600
|
if (width && height) {
|
|
5621
5601
|
if (!showPlaceholder)
|
|
5622
5602
|
return /* @__PURE__ */ jsx58(
|
|
@@ -6323,8 +6303,8 @@ var RichTextContent = (props) => {
|
|
|
6323
6303
|
const [hasContent, setHasContent] = useState31(
|
|
6324
6304
|
props.defaultValue ? true : false
|
|
6325
6305
|
);
|
|
6326
|
-
const loadQuill = () => __async(
|
|
6327
|
-
return new Promise((resolve) => __async(
|
|
6306
|
+
const loadQuill = () => __async(null, null, function* () {
|
|
6307
|
+
return new Promise((resolve) => __async(null, null, function* () {
|
|
6328
6308
|
const Quill = yield __require("react-quill").Quill;
|
|
6329
6309
|
const BlotFormatter = (yield __require("quill-blot-formatter")).default;
|
|
6330
6310
|
resolve({ Quill, BlotFormatter });
|
|
@@ -6479,8 +6459,7 @@ import { Link as Link8 } from "@geowiki/core";
|
|
|
6479
6459
|
import { Button as Button24 } from "@geowiki/design-system";
|
|
6480
6460
|
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
6481
6461
|
var ButtonList = ({ data }) => {
|
|
6482
|
-
if (!data)
|
|
6483
|
-
return null;
|
|
6462
|
+
if (!data) return null;
|
|
6484
6463
|
return data == null ? void 0 : data.map((button) => {
|
|
6485
6464
|
var _a;
|
|
6486
6465
|
return /* @__PURE__ */ jsx72(Button24, { children: /* @__PURE__ */ jsx72(
|
|
@@ -6703,7 +6682,7 @@ var NewsItemList = ({ newsItems }) => {
|
|
|
6703
6682
|
|
|
6704
6683
|
// src/components/Publications/PublicationList.tsx
|
|
6705
6684
|
import { listVariants as listVariants3 } from "@geowiki/core";
|
|
6706
|
-
import { motion as
|
|
6685
|
+
import { motion as motionRaw3 } from "framer-motion";
|
|
6707
6686
|
|
|
6708
6687
|
// src/components/Publications/PublicationItem.tsx
|
|
6709
6688
|
import { itemVariants as itemVariants3, useCmsUrl as useCmsUrl2 } from "@geowiki/core";
|
|
@@ -6760,6 +6739,7 @@ var PublicationItem = ({ publication }) => {
|
|
|
6760
6739
|
|
|
6761
6740
|
// src/components/Publications/PublicationList.tsx
|
|
6762
6741
|
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
6742
|
+
var motion7 = motionRaw3;
|
|
6763
6743
|
var PublicationList = ({ publications }) => {
|
|
6764
6744
|
publications.sort((a, b) => {
|
|
6765
6745
|
return new Date(b.PublishedUtc).getTime() - new Date(a.PublishedUtc).getTime();
|
|
@@ -6833,7 +6813,7 @@ import { dynamic as dynamic2 } from "@geowiki/core";
|
|
|
6833
6813
|
import { useState as useState34 } from "react";
|
|
6834
6814
|
import { jsx as jsx81, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
6835
6815
|
var MapWithNoSSR = dynamic2(
|
|
6836
|
-
() => import("./cluster-map-
|
|
6816
|
+
() => import("./cluster-map-VNFQJ56C.mjs").then((x) => x.FarmerClusterMap),
|
|
6837
6817
|
{
|
|
6838
6818
|
ssr: false
|
|
6839
6819
|
}
|
|
@@ -7064,7 +7044,7 @@ var UpdatePassword = (props) => {
|
|
|
7064
7044
|
reset({ confirmnewPassword: null });
|
|
7065
7045
|
}
|
|
7066
7046
|
};
|
|
7067
|
-
const onPasswordSubmit = () => __async(
|
|
7047
|
+
const onPasswordSubmit = () => __async(null, null, function* () {
|
|
7068
7048
|
try {
|
|
7069
7049
|
yield ProfileService5.profileChangePassword(PasswordData);
|
|
7070
7050
|
Swal.fire({
|
|
@@ -7267,7 +7247,7 @@ var UpdateUserProfile = ({
|
|
|
7267
7247
|
});
|
|
7268
7248
|
});
|
|
7269
7249
|
};
|
|
7270
|
-
const onProfileSubmit = () => __async(
|
|
7250
|
+
const onProfileSubmit = () => __async(null, null, function* () {
|
|
7271
7251
|
var result = yield ProfileService6.profileUpdate(UserData);
|
|
7272
7252
|
if (result.name === UserData.name && result.surname === UserData.surname) {
|
|
7273
7253
|
Swal2.fire({
|
|
@@ -7374,7 +7354,7 @@ import { toast } from "react-toastify";
|
|
|
7374
7354
|
import { jsx as jsx87, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
7375
7355
|
var SettingsItem = (props) => {
|
|
7376
7356
|
const [value, setValue] = useState37(props.value);
|
|
7377
|
-
const handleUpdateSettings = () => __async(
|
|
7357
|
+
const handleUpdateSettings = () => __async(null, null, function* () {
|
|
7378
7358
|
try {
|
|
7379
7359
|
yield SettingsService.settingsSetSettingForTenant(props.setting, value);
|
|
7380
7360
|
toast.success("Settings updated");
|
|
@@ -7420,8 +7400,7 @@ import { jsx as jsx88, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
|
7420
7400
|
var SettingsManagement = () => {
|
|
7421
7401
|
var _a;
|
|
7422
7402
|
var { data, isLoading } = useAppConfig3();
|
|
7423
|
-
if (isLoading)
|
|
7424
|
-
return /* @__PURE__ */ jsx88("div", { children: "Loading..." });
|
|
7403
|
+
if (isLoading) return /* @__PURE__ */ jsx88("div", { children: "Loading..." });
|
|
7425
7404
|
const keys = Object == null ? void 0 : Object.keys((_a = data == null ? void 0 : data.setting) == null ? void 0 : _a.values);
|
|
7426
7405
|
let settings = {
|
|
7427
7406
|
GeoWiki: keys.filter((key) => key.startsWith("GeoWiki")),
|
|
@@ -7432,10 +7411,8 @@ var SettingsManagement = () => {
|
|
|
7432
7411
|
return key.startsWith((_a2 = data == null ? void 0 : data.currentTenant) == null ? void 0 : _a2.name);
|
|
7433
7412
|
})
|
|
7434
7413
|
};
|
|
7435
|
-
if (!data)
|
|
7436
|
-
|
|
7437
|
-
if (!keys)
|
|
7438
|
-
return /* @__PURE__ */ jsx88("div", { children: "no keys" });
|
|
7414
|
+
if (!data) return /* @__PURE__ */ jsx88("div", { children: "no data" });
|
|
7415
|
+
if (!keys) return /* @__PURE__ */ jsx88("div", { children: "no keys" });
|
|
7439
7416
|
return /* @__PURE__ */ jsx88("div", { children: /* @__PURE__ */ jsx88("div", { className: "w-full px-2 py-16 sm:px-0", children: /* @__PURE__ */ jsxs73(Tab.Group, { children: [
|
|
7440
7417
|
/* @__PURE__ */ jsx88(Tab.List, { className: "flex p-1 space-x-1 rounded-xl", children: Object.keys(settings).map(
|
|
7441
7418
|
(key) => settings[key].length > 0 && /* @__PURE__ */ jsx88(
|
|
@@ -8555,8 +8532,7 @@ import { jsx as jsx99, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
|
8555
8532
|
var ListTagsGroup = ({ cluster }) => {
|
|
8556
8533
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
8557
8534
|
var { data: ConfigSettings, isLoading: IsConfigSettingsLoaded } = useConfigSettings3();
|
|
8558
|
-
if (IsConfigSettingsLoaded)
|
|
8559
|
-
return /* @__PURE__ */ jsx99(LoaderFull4, {});
|
|
8535
|
+
if (IsConfigSettingsLoaded) return /* @__PURE__ */ jsx99(LoaderFull4, {});
|
|
8560
8536
|
return /* @__PURE__ */ jsxs84("div", { className: "space-y-6 lg:space-y-10", children: [
|
|
8561
8537
|
/* @__PURE__ */ jsx99(
|
|
8562
8538
|
TagsGroup,
|
|
@@ -8724,8 +8700,7 @@ var ApiImage = ({
|
|
|
8724
8700
|
height = 0
|
|
8725
8701
|
}) => {
|
|
8726
8702
|
var { data, isLoading } = useApiImage(imageId);
|
|
8727
|
-
if (isLoading)
|
|
8728
|
-
return null;
|
|
8703
|
+
if (isLoading) return null;
|
|
8729
8704
|
if (width > 0 && height > 0) {
|
|
8730
8705
|
return /* @__PURE__ */ jsx100(
|
|
8731
8706
|
Image4,
|
|
@@ -9490,10 +9465,8 @@ var ClusterNews = ({
|
|
|
9490
9465
|
path: clusterNewsItem.imageId === "00000000-0000-0000-0000-000000000000" ? "/assets/img/noImage.png" : clusterNewsItem.imageId
|
|
9491
9466
|
};
|
|
9492
9467
|
});
|
|
9493
|
-
if (isLoading)
|
|
9494
|
-
|
|
9495
|
-
if (publishedItems.length == 0)
|
|
9496
|
-
return null;
|
|
9468
|
+
if (isLoading) return /* @__PURE__ */ jsx112(LocalLoader, {});
|
|
9469
|
+
if (publishedItems.length == 0) return null;
|
|
9497
9470
|
return /* @__PURE__ */ jsx112(Fragment26, { children: !isLoading && /* @__PURE__ */ jsx112("div", { className: "bg-grey-lightest lg:mt-[100px]", children: /* @__PURE__ */ jsx112("div", { className: "bg-grey-lightest mx-5 lg:mx-12", children: /* @__PURE__ */ jsxs93("div", { className: "container mx-auto space-y-6 py-6 lg:space-y-10 lg:py-16 px-0 lg:px-10 ", children: [
|
|
9498
9471
|
/* @__PURE__ */ jsxs93("div", { className: "lg:flex lg:justify-between lg:items-end", children: [
|
|
9499
9472
|
/* @__PURE__ */ jsx112(H4Design2, { className: "pb-4 lg:pb-0", children: "Cluster News" }),
|
|
@@ -9653,8 +9626,7 @@ import { useCountries } from "@geowiki/core";
|
|
|
9653
9626
|
import { jsx as jsx116, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
9654
9627
|
var H3Clusters = ({ clusters }) => {
|
|
9655
9628
|
const { data: countries, isLoading: isCountriesLoading } = useCountries();
|
|
9656
|
-
if (isCountriesLoading)
|
|
9657
|
-
return /* @__PURE__ */ jsx116("div", { children: "Loading..." });
|
|
9629
|
+
if (isCountriesLoading) return /* @__PURE__ */ jsx116("div", { children: "Loading..." });
|
|
9658
9630
|
return /* @__PURE__ */ jsxs95("div", { className: "lg:container mx-auto space-y-6 lg:space-y-10 ", children: [
|
|
9659
9631
|
/* @__PURE__ */ jsxs95("div", { className: "lg:flex lg:justify-between lg:items-end", children: [
|
|
9660
9632
|
/* @__PURE__ */ jsx116(H4Design3, { className: "pb-4 lg:pb-0", children: "Explore other Farmer Clusters" }),
|
|
@@ -10383,8 +10355,7 @@ var SubtitleH3Cluster4Column = ({
|
|
|
10383
10355
|
4
|
|
10384
10356
|
);
|
|
10385
10357
|
const { data: countries, isLoading: isCountriesLoading } = useCountries2();
|
|
10386
|
-
if (isClusterLoading || isCountriesLoading)
|
|
10387
|
-
return /* @__PURE__ */ jsx132("div", { children: "Loading..." });
|
|
10358
|
+
if (isClusterLoading || isCountriesLoading) return /* @__PURE__ */ jsx132("div", { children: "Loading..." });
|
|
10388
10359
|
return /* @__PURE__ */ jsxs110(
|
|
10389
10360
|
"div",
|
|
10390
10361
|
{
|