@geowiki/recodo 0.0.0
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/LICENSE +201 -0
- package/README.md +58 -0
- package/dist/cluster-map-D24GOWM4.mjs +143 -0
- package/dist/index.d.mts +255 -0
- package/dist/index.d.ts +255 -0
- package/dist/index.js +6912 -0
- package/dist/index.mjs +6872 -0
- package/dist/styles.css +1 -0
- package/package.json +87 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# @geowiki/recodo
|
|
2
|
+
|
|
3
|
+
Farmer cluster and resource management components for the Recodo platform -- agricultural records, community features, and content management.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @geowiki/recodo
|
|
9
|
+
# or
|
|
10
|
+
pnpm add @geowiki/recodo
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Peer Dependencies
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install react react-dom next next-auth @tanstack/react-query react-toastify
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## CSS Setup
|
|
20
|
+
|
|
21
|
+
Import the pre-built Tailwind CSS file in your app entry point:
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import "@geowiki/recodo/styles.css";
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
import {
|
|
31
|
+
FarmerClusterList,
|
|
32
|
+
FarmerClusterFinder,
|
|
33
|
+
ResourceList,
|
|
34
|
+
} from "@geowiki/recodo";
|
|
35
|
+
|
|
36
|
+
function ClustersPage() {
|
|
37
|
+
return <FarmerClusterList />;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function ResourcesPage() {
|
|
41
|
+
return <ResourceList />;
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## What's Included
|
|
46
|
+
|
|
47
|
+
- **Farmer cluster components** -- `FarmerClusterBasicInfo`, `FarmerClusterDescription`, `FarmerClusterNews`, `FarmerClusterList`, `FarmerClusterFinder`, image management, and more
|
|
48
|
+
- **Resource components** -- `SearchFilter`, `ResourceCard`, `ResourceCreate`, `ResourceEdit`, `ResourceList`, `ResourceView`
|
|
49
|
+
- **User components** -- Profile and account management
|
|
50
|
+
- **Feature resources** -- Specialized resource collection components
|
|
51
|
+
|
|
52
|
+
## Dependencies
|
|
53
|
+
|
|
54
|
+
This package depends on `@geowiki/api-proxy`, `@geowiki/cms-proxy`, `@geowiki/core`, `@geowiki/map`, and `@geowiki/ui`.
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
MIT
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/components/ClusterMap/cluster-map.tsx
|
|
4
|
+
import { MapContainer, TileLayer, Marker as Marker2, useMapEvents } from "react-leaflet";
|
|
5
|
+
import "leaflet/dist/leaflet.css";
|
|
6
|
+
import { LatLng as LatLng2 } from "leaflet";
|
|
7
|
+
import L from "leaflet";
|
|
8
|
+
|
|
9
|
+
// src/components/ClusterMap/cluster-markers.tsx
|
|
10
|
+
import { DivIcon, LatLng } from "leaflet";
|
|
11
|
+
import { Marker, Popup } from "react-leaflet";
|
|
12
|
+
import { useClusterMapInfo } from "@geowiki/core";
|
|
13
|
+
import { LoaderFull } from "@geowiki/ui";
|
|
14
|
+
import { MarkerClusterGroup } from "@geowiki/map";
|
|
15
|
+
import { Image } from "@geowiki/core";
|
|
16
|
+
import { useFileUrl } from "@geowiki/core";
|
|
17
|
+
import InformationCircleIcon from "@heroicons/react/24/solid/InformationCircleIcon";
|
|
18
|
+
import { renderToString } from "react-dom/server";
|
|
19
|
+
import { useConfigSettings } from "@geowiki/core";
|
|
20
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
+
function getIcon() {
|
|
22
|
+
const MyIcon = InformationCircleIcon;
|
|
23
|
+
return renderToString(/* @__PURE__ */ jsx(MyIcon, { height: 24, color: "black" }));
|
|
24
|
+
}
|
|
25
|
+
var ClusterMarkers = (_props) => {
|
|
26
|
+
const { data: ConfigSettings, isLoading: IsConfigSettingsLoaded } = useConfigSettings();
|
|
27
|
+
const { data, error, isLoading } = useClusterMapInfo();
|
|
28
|
+
const fileUrl = useFileUrl();
|
|
29
|
+
if (error) return null;
|
|
30
|
+
if (isLoading || IsConfigSettingsLoaded) return /* @__PURE__ */ jsx(LoaderFull, {});
|
|
31
|
+
if (ConfigSettings?.ConfigSettings?.FeaturesFarmerCluster?.Text) {
|
|
32
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(MarkerClusterGroup, { children: data?.map((cluster) => /* @__PURE__ */ jsx(
|
|
33
|
+
Marker,
|
|
34
|
+
{
|
|
35
|
+
icon: new DivIcon({
|
|
36
|
+
iconSize: [30, 30],
|
|
37
|
+
html: `<div class='marker-pin' style="background:#467327;"></div><i>${getIcon()}</i>`,
|
|
38
|
+
className: "custom-div-icon"
|
|
39
|
+
}),
|
|
40
|
+
position: cluster.location ? new LatLng(
|
|
41
|
+
cluster?.location?.latitude,
|
|
42
|
+
cluster?.location?.longitude
|
|
43
|
+
) : new LatLng(0, 0),
|
|
44
|
+
children: /* @__PURE__ */ jsxs(Popup, { maxWidth: 600, children: [
|
|
45
|
+
/* @__PURE__ */ jsx("div", { className: "bg-no-repeat bg-cover ripple shadow-lg rounded-lg mb-6 object-cover", children: /* @__PURE__ */ jsx(
|
|
46
|
+
Image,
|
|
47
|
+
{
|
|
48
|
+
src: `${fileUrl}${cluster.coverImageId}`,
|
|
49
|
+
alt: "Image",
|
|
50
|
+
width: 600,
|
|
51
|
+
height: 256,
|
|
52
|
+
className: "rounded-md h-64 w-full object-cover"
|
|
53
|
+
}
|
|
54
|
+
) }),
|
|
55
|
+
/* @__PURE__ */ jsx("div", { className: "w-full font-bold", children: cluster.name }),
|
|
56
|
+
/* @__PURE__ */ jsx("div", { className: "line-clamp-3", children: cluster.description }),
|
|
57
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-center items-left mt-2", children: /* @__PURE__ */ jsx("div", { className: "flex float-left", children: /* @__PURE__ */ jsx(
|
|
58
|
+
"a",
|
|
59
|
+
{
|
|
60
|
+
href: `/cluster/view/${cluster.id}`,
|
|
61
|
+
rel: "noreferrer",
|
|
62
|
+
target: "_blank",
|
|
63
|
+
className: "!text-primary-400",
|
|
64
|
+
children: "View Cluster"
|
|
65
|
+
}
|
|
66
|
+
) }) })
|
|
67
|
+
] })
|
|
68
|
+
},
|
|
69
|
+
cluster.id
|
|
70
|
+
)) }) });
|
|
71
|
+
} else {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// src/components/ClusterMap/cluster-map.tsx
|
|
77
|
+
import { renderToString as renderToString2 } from "react-dom/server";
|
|
78
|
+
import { FarmerClusterPin } from "@geowiki/ui";
|
|
79
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
80
|
+
var centerLocation = new LatLng2(48.2082, 16.3738);
|
|
81
|
+
function getIcon2() {
|
|
82
|
+
return renderToString2(/* @__PURE__ */ jsx2(FarmerClusterPin, { height: 40, width: 40 }));
|
|
83
|
+
}
|
|
84
|
+
var icon = () => {
|
|
85
|
+
return new L.DivIcon({
|
|
86
|
+
iconSize: [40, 40],
|
|
87
|
+
iconAnchor: [28, 15],
|
|
88
|
+
html: `<i style="margin: 0px; margin-left: 7.5px; margin-top: -22px;">${getIcon2()}</i>`,
|
|
89
|
+
className: "custom-div-icon"
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
var LocationMarker = ({
|
|
93
|
+
setPosition
|
|
94
|
+
}) => {
|
|
95
|
+
useMapEvents({
|
|
96
|
+
click(e) {
|
|
97
|
+
setPosition(e.latlng);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
return null;
|
|
101
|
+
};
|
|
102
|
+
var FarmerClusterMap = (props) => {
|
|
103
|
+
const handleMarkerDragEnd = (event) => {
|
|
104
|
+
const newPosition = event.target.getLatLng();
|
|
105
|
+
props.setPosition(newPosition);
|
|
106
|
+
};
|
|
107
|
+
return /* @__PURE__ */ jsx2("div", { className: "w-full", children: /* @__PURE__ */ jsxs2(
|
|
108
|
+
MapContainer,
|
|
109
|
+
{
|
|
110
|
+
className: "position-relative z-10",
|
|
111
|
+
center: props.position == null ? centerLocation : props.position,
|
|
112
|
+
zoom: 4,
|
|
113
|
+
style: { height: props.height },
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ jsx2(
|
|
116
|
+
TileLayer,
|
|
117
|
+
{
|
|
118
|
+
attribution: '\xA9 <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
|
|
119
|
+
url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
props.position && /* @__PURE__ */ jsx2(
|
|
123
|
+
Marker2,
|
|
124
|
+
{
|
|
125
|
+
position: props.position,
|
|
126
|
+
icon: icon(),
|
|
127
|
+
draggable: true,
|
|
128
|
+
eventHandlers: {
|
|
129
|
+
dragend: handleMarkerDragEnd
|
|
130
|
+
},
|
|
131
|
+
interactive: false
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
/* @__PURE__ */ jsx2(LocationMarker, { setPosition: props.setPosition }),
|
|
135
|
+
props.showClusterMarkers ? /* @__PURE__ */ jsx2(ClusterMarkers, {}) : null
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
) });
|
|
139
|
+
};
|
|
140
|
+
var cluster_map_default = FarmerClusterMap;
|
|
141
|
+
export {
|
|
142
|
+
cluster_map_default as default
|
|
143
|
+
};
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import react__default, { FC } from 'react';
|
|
3
|
+
import { ViewStatus, DefaultSettings } from '@geowiki/core';
|
|
4
|
+
import { ClusterDto, ResourceFilterInput, ResourceDto, CreateUpdateResourceDto } from '@geowiki/api-proxy';
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
|
|
7
|
+
interface Props$9 {
|
|
8
|
+
clusterId: any;
|
|
9
|
+
newsId: any;
|
|
10
|
+
status?: ViewStatus;
|
|
11
|
+
setStatus?: any;
|
|
12
|
+
}
|
|
13
|
+
declare const ClusterViewNews: (props: Props$9) => react__default.JSX.Element;
|
|
14
|
+
|
|
15
|
+
interface Props$8 {
|
|
16
|
+
status: ViewStatus;
|
|
17
|
+
setStatus: any;
|
|
18
|
+
clusterId: any;
|
|
19
|
+
newsId: any;
|
|
20
|
+
settings: DefaultSettings;
|
|
21
|
+
refresh?: boolean;
|
|
22
|
+
setRefresh?: any;
|
|
23
|
+
}
|
|
24
|
+
declare const ClusterEditNews: (props: Props$8) => react__default.JSX.Element;
|
|
25
|
+
|
|
26
|
+
interface Props$7 {
|
|
27
|
+
status?: ViewStatus;
|
|
28
|
+
setStatus?: any;
|
|
29
|
+
onEdit?: any;
|
|
30
|
+
onDelete?: any;
|
|
31
|
+
refresh: boolean;
|
|
32
|
+
clusterId: string;
|
|
33
|
+
}
|
|
34
|
+
declare const ClusterNewsList: (props: Props$7) => react__default.JSX.Element;
|
|
35
|
+
|
|
36
|
+
declare const ClusterNewsItem: ({ newsId }: {
|
|
37
|
+
newsId: string;
|
|
38
|
+
}) => react.JSX.Element | null;
|
|
39
|
+
|
|
40
|
+
declare const FarmerClusterBasicInfo: () => react.JSX.Element;
|
|
41
|
+
|
|
42
|
+
declare const FarmerClusterDescription: () => react.JSX.Element;
|
|
43
|
+
|
|
44
|
+
declare const FarmerClusterImages: () => react.JSX.Element;
|
|
45
|
+
|
|
46
|
+
interface FarmerClusterMembersProps {
|
|
47
|
+
clusterId: string;
|
|
48
|
+
}
|
|
49
|
+
declare const FarmerClusterMembers: (props: FarmerClusterMembersProps) => react__default.JSX.Element;
|
|
50
|
+
|
|
51
|
+
interface FarmerClusterNewsProps {
|
|
52
|
+
clusterId: any;
|
|
53
|
+
route?: any;
|
|
54
|
+
setRoute?: any;
|
|
55
|
+
settings: any;
|
|
56
|
+
}
|
|
57
|
+
declare const FarmerClusterNews: (props: FarmerClusterNewsProps) => react__default.JSX.Element;
|
|
58
|
+
|
|
59
|
+
declare const FarmerClusterList: () => react__default.JSX.Element;
|
|
60
|
+
|
|
61
|
+
interface ViewFarmerClusterProps$1 {
|
|
62
|
+
cluster: ClusterDto;
|
|
63
|
+
}
|
|
64
|
+
declare const ViewFarmerCluster: ({ cluster }: ViewFarmerClusterProps$1) => react.JSX.Element;
|
|
65
|
+
|
|
66
|
+
type FarmerClusterFilterInput = {
|
|
67
|
+
pageSize: number;
|
|
68
|
+
currentPage: number;
|
|
69
|
+
skip: number;
|
|
70
|
+
take: number;
|
|
71
|
+
country: string;
|
|
72
|
+
activityStatus: string;
|
|
73
|
+
farmingSystem: string;
|
|
74
|
+
mainCrop: string;
|
|
75
|
+
mainAgriculturalAreas: string;
|
|
76
|
+
sort: string;
|
|
77
|
+
};
|
|
78
|
+
declare const FarmerClusterFinder: () => react.JSX.Element;
|
|
79
|
+
|
|
80
|
+
interface ViewFarmerClusterProps {
|
|
81
|
+
cluster: ClusterDto;
|
|
82
|
+
}
|
|
83
|
+
declare const RecodoViewFarmerCluster: ({ cluster, }: ViewFarmerClusterProps) => react.JSX.Element;
|
|
84
|
+
|
|
85
|
+
interface ResourcesQuickFindProps {
|
|
86
|
+
}
|
|
87
|
+
declare const ResourcesQuickFind: ({}: ResourcesQuickFindProps) => react.JSX.Element;
|
|
88
|
+
|
|
89
|
+
declare const LinkPartnerSchema: z.ZodObject<{
|
|
90
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
91
|
+
name: z.ZodString;
|
|
92
|
+
link: z.ZodString;
|
|
93
|
+
order: z.ZodNumber;
|
|
94
|
+
}, "strip", z.ZodTypeAny, {
|
|
95
|
+
link: string;
|
|
96
|
+
name: string;
|
|
97
|
+
order: number;
|
|
98
|
+
}, {
|
|
99
|
+
link: string;
|
|
100
|
+
name: string;
|
|
101
|
+
order: number;
|
|
102
|
+
}>, "many">>;
|
|
103
|
+
partners: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
104
|
+
name: z.ZodString;
|
|
105
|
+
link: z.ZodString;
|
|
106
|
+
order: z.ZodNumber;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
link: string;
|
|
109
|
+
name: string;
|
|
110
|
+
order: number;
|
|
111
|
+
}, {
|
|
112
|
+
link: string;
|
|
113
|
+
name: string;
|
|
114
|
+
order: number;
|
|
115
|
+
}>, "many">>;
|
|
116
|
+
}, "strip", z.ZodTypeAny, {
|
|
117
|
+
links?: {
|
|
118
|
+
link: string;
|
|
119
|
+
name: string;
|
|
120
|
+
order: number;
|
|
121
|
+
}[] | undefined;
|
|
122
|
+
partners?: {
|
|
123
|
+
link: string;
|
|
124
|
+
name: string;
|
|
125
|
+
order: number;
|
|
126
|
+
}[] | undefined;
|
|
127
|
+
}, {
|
|
128
|
+
links?: {
|
|
129
|
+
link: string;
|
|
130
|
+
name: string;
|
|
131
|
+
order: number;
|
|
132
|
+
}[] | undefined;
|
|
133
|
+
partners?: {
|
|
134
|
+
link: string;
|
|
135
|
+
name: string;
|
|
136
|
+
order: number;
|
|
137
|
+
}[] | undefined;
|
|
138
|
+
}>;
|
|
139
|
+
declare const FarmerClusterLinkPartner: () => react.JSX.Element;
|
|
140
|
+
|
|
141
|
+
declare const FarmerClusterCreate: () => react.JSX.Element;
|
|
142
|
+
|
|
143
|
+
interface SearchFilterProps {
|
|
144
|
+
filter: ResourceFilterInput;
|
|
145
|
+
setFilter: any;
|
|
146
|
+
}
|
|
147
|
+
declare const SearchFilter: ({ filter, setFilter }: SearchFilterProps) => react__default.JSX.Element;
|
|
148
|
+
|
|
149
|
+
interface ResourceCardProps {
|
|
150
|
+
resource: ResourceDto;
|
|
151
|
+
}
|
|
152
|
+
declare const ResourceCard: ({ resource }: ResourceCardProps) => react.JSX.Element;
|
|
153
|
+
|
|
154
|
+
interface ResourceCreateProps {
|
|
155
|
+
resource: CreateUpdateResourceDto;
|
|
156
|
+
setResource: react__default.Dispatch<react__default.SetStateAction<CreateUpdateResourceDto | undefined>>;
|
|
157
|
+
}
|
|
158
|
+
declare const ResourceCreate: ({ resource }: ResourceCreateProps) => react__default.JSX.Element;
|
|
159
|
+
|
|
160
|
+
interface ResourceEditProps {
|
|
161
|
+
}
|
|
162
|
+
declare const ResourceEdit: (_props: ResourceEditProps) => react__default.JSX.Element;
|
|
163
|
+
|
|
164
|
+
declare const ResourceList: () => react__default.JSX.Element;
|
|
165
|
+
|
|
166
|
+
interface ResourceProps {
|
|
167
|
+
resource: ResourceDto;
|
|
168
|
+
}
|
|
169
|
+
declare const ResourceItem: ({ resource }: ResourceProps) => react.JSX.Element;
|
|
170
|
+
|
|
171
|
+
interface Props$6 {
|
|
172
|
+
resources: ResourceDto[];
|
|
173
|
+
}
|
|
174
|
+
declare const ResourceDisplayList: ({ resources }: Props$6) => react.JSX.Element;
|
|
175
|
+
|
|
176
|
+
declare const ResourceIcon: ({ type, }: {
|
|
177
|
+
type: "Collection" | "Dataset" | "Event" | "Image" | "InteractiveResource" | "MovingImage" | "PhysicalObject" | "Service" | "Software" | "Sound" | "StillImage" | "TextBook" | "TextGuideline" | "TextGuidelines" | "TextCaseStudy" | "TextReport" | "TextPolicyBrief" | "TextScientificPublication" | "TextOther";
|
|
178
|
+
}) => react.JSX.Element;
|
|
179
|
+
|
|
180
|
+
interface ButtonProps$1 {
|
|
181
|
+
link: string;
|
|
182
|
+
isNewTab: boolean;
|
|
183
|
+
}
|
|
184
|
+
interface ResourceCollectionItemProps {
|
|
185
|
+
title: string;
|
|
186
|
+
text: string;
|
|
187
|
+
button: ButtonProps$1;
|
|
188
|
+
type: string;
|
|
189
|
+
icon: string;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
interface Props$5 {
|
|
193
|
+
title: string;
|
|
194
|
+
subtitle: string;
|
|
195
|
+
resourceCollections: ResourceCollectionItemProps[];
|
|
196
|
+
}
|
|
197
|
+
declare const SubtitleH3ResourceCollections: ({ title, subtitle, resourceCollections, }: Props$5) => react.JSX.Element;
|
|
198
|
+
|
|
199
|
+
declare const ResourcesSelectedTags: () => react.JSX.Element | null;
|
|
200
|
+
|
|
201
|
+
interface KeyResourceItemProps {
|
|
202
|
+
title: string | null | undefined;
|
|
203
|
+
subtitle: string | null | undefined;
|
|
204
|
+
path: string;
|
|
205
|
+
imageId?: string;
|
|
206
|
+
imagePath?: string;
|
|
207
|
+
}
|
|
208
|
+
declare const KeyResourceItem: ({ title, subtitle, path, imageId, imagePath, }: KeyResourceItemProps) => react.JSX.Element;
|
|
209
|
+
|
|
210
|
+
interface Props$4 {
|
|
211
|
+
keyResources: KeyResourceItemProps[];
|
|
212
|
+
}
|
|
213
|
+
declare const KeyResourceItemList: ({ keyResources }: Props$4) => react.JSX.Element;
|
|
214
|
+
|
|
215
|
+
interface Props$3 {
|
|
216
|
+
title: string;
|
|
217
|
+
subtitle: string;
|
|
218
|
+
keyResources: KeyResourceItemProps[];
|
|
219
|
+
}
|
|
220
|
+
declare const SubtitleH3KeyResources: ({ title, subtitle, keyResources, }: Props$3) => react.JSX.Element;
|
|
221
|
+
|
|
222
|
+
interface Props$2 {
|
|
223
|
+
}
|
|
224
|
+
declare const UserInfoPage: FC<Props$2>;
|
|
225
|
+
|
|
226
|
+
declare const UpdateUser: () => react__default.JSX.Element;
|
|
227
|
+
|
|
228
|
+
interface ButtonProps {
|
|
229
|
+
link: string;
|
|
230
|
+
isNewTab: boolean;
|
|
231
|
+
contents: React.ReactNode;
|
|
232
|
+
}
|
|
233
|
+
interface FeatureResourcesProps {
|
|
234
|
+
title: string;
|
|
235
|
+
tag: string;
|
|
236
|
+
text: string;
|
|
237
|
+
button: ButtonProps;
|
|
238
|
+
imageType: string;
|
|
239
|
+
}
|
|
240
|
+
declare const FeatureResources: (props: FeatureResourcesProps) => react.JSX.Element;
|
|
241
|
+
|
|
242
|
+
interface Props$1 {
|
|
243
|
+
featureResources: FeatureResourcesProps[];
|
|
244
|
+
}
|
|
245
|
+
declare const FeatureResourcesList: ({ featureResources }: Props$1) => react.JSX.Element;
|
|
246
|
+
|
|
247
|
+
interface Props {
|
|
248
|
+
title: string;
|
|
249
|
+
subtitle: string;
|
|
250
|
+
description: string;
|
|
251
|
+
featureResources: FeatureResourcesProps[];
|
|
252
|
+
}
|
|
253
|
+
declare const SubtitleH3BodySpecialFeatureResourceCollections: ({ title, subtitle, description, featureResources, }: Props) => react.JSX.Element;
|
|
254
|
+
|
|
255
|
+
export { ClusterEditNews, ClusterNewsItem, ClusterNewsList, ClusterViewNews, FarmerClusterBasicInfo, FarmerClusterCreate, FarmerClusterDescription, type FarmerClusterFilterInput, FarmerClusterFinder, FarmerClusterImages, FarmerClusterLinkPartner, FarmerClusterList, FarmerClusterMembers, FarmerClusterNews, FeatureResources, FeatureResourcesList, type FeatureResourcesProps, KeyResourceItem, KeyResourceItemList, type KeyResourceItemProps, LinkPartnerSchema, RecodoViewFarmerCluster, ResourceCard, ResourceCreate, ResourceDisplayList, ResourceEdit, ResourceIcon, ResourceItem, ResourceList, type ResourceProps, ResourcesQuickFind, ResourcesSelectedTags, SearchFilter, SubtitleH3BodySpecialFeatureResourceCollections, SubtitleH3KeyResources, SubtitleH3ResourceCollections, UpdateUser, UserInfoPage, ViewFarmerCluster };
|