@geowiki/cms 0.15.0-dev.1
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 +55 -0
- package/dist/BannerFollowLinksWidget-26TXCSTL.mjs +21 -0
- package/dist/CardGridWidget-VZIU6X63.mjs +7 -0
- package/dist/CardWidget-7UX7ACLE.mjs +7 -0
- package/dist/ColumnWidget-XEDFONE6.mjs +7 -0
- package/dist/ContactCardsWidget-KRR6IY4X.mjs +95 -0
- package/dist/ContactWidget-WJH7K4FN.mjs +7 -0
- package/dist/ContainerWidget-6T555RQD.mjs +8 -0
- package/dist/DownloadQuestWidget-EVKBU33Z.mjs +86 -0
- package/dist/EntityListWidget-JC6UCIP5.mjs +7 -0
- package/dist/FarmerClusterFinderWidget-YENEGEZN.mjs +7 -0
- package/dist/FeatureRowWidget-YXCRZBKZ.mjs +7 -0
- package/dist/FeatureRowWithImageWidget-RDAGTLCL.mjs +7 -0
- package/dist/FeatureRowWithMultipleImagesWidget-NWLWBI3L.mjs +7 -0
- package/dist/GalleryWidget-7A3FR3Y7.mjs +7 -0
- package/dist/H2BodyInternalLinkMapWidget-T7MARJTA.mjs +78 -0
- package/dist/HeaderBodyWidget-ZW2WYKNP.mjs +27 -0
- package/dist/HeaderWidget-DUNY7APY.mjs +7 -0
- package/dist/HeadingTextWidget-YC36BLDY.mjs +6 -0
- package/dist/HeroCenterTextWidget-5LDZNUBR.mjs +7 -0
- package/dist/HeroMap-AT3N4ZVZ.mjs +164 -0
- package/dist/HeroWidget-A4ODJCXZ.mjs +7 -0
- package/dist/IframeWidget-DPA25ZE2.mjs +17 -0
- package/dist/ImageLeftH3BodyLinkWidget-JMALBJVD.mjs +26 -0
- package/dist/ImageLefttH3BodyWidget-2YAEQZHJ.mjs +26 -0
- package/dist/ImageWidget-JWDKESIB.mjs +7 -0
- package/dist/LanguagesWidget-OENZMIFA.mjs +61 -0
- package/dist/MapHeroWidget-MLNO6KKC.mjs +7 -0
- package/dist/MarkdownWidget-QTTNNVQW.mjs +7 -0
- package/dist/NewContactUsWidget-R5TILYPP.mjs +237 -0
- package/dist/NewTestimonialsWidget-CVFZM2UI.mjs +17 -0
- package/dist/NewfeedPreviewWidget-VM6ZMYGO.mjs +25 -0
- package/dist/NewsFeedWidget-4W7T4H2P.mjs +22 -0
- package/dist/NewsLetterWidget-PMR355EB.mjs +7 -0
- package/dist/QuestMapClient-B6LGGSGT.mjs +120 -0
- package/dist/QuestMapWidget-5JIFDDUO.mjs +22 -0
- package/dist/ResourceCollectionItemWidget-QXAJEPCN.mjs +7 -0
- package/dist/ResourceCollectionsWidget-KZ5HD3PG.mjs +8 -0
- package/dist/ResourceQuickFindWidget-S3OJV3GF.mjs +9 -0
- package/dist/RowWidget-VSVZUIYH.mjs +7 -0
- package/dist/SelectQuestWidget-YGZ5TFLV.mjs +161 -0
- package/dist/SignUpBannerWidget-R77S5VSL.mjs +27 -0
- package/dist/SimpleActionListWidget-NF32S56W.mjs +7 -0
- package/dist/SimpleCallToActionWidget-3LI6HMJR.mjs +7 -0
- package/dist/SixClusterNewsWidget-5DDHGLAI.mjs +11 -0
- package/dist/SpecialFeaturesWidget-ZWILQPVB.mjs +7 -0
- package/dist/StatsWidget-4MISF6XB.mjs +7 -0
- package/dist/SubtitleH2BodyVideoWidget-CP7T4FJ6.mjs +24 -0
- package/dist/SubtitleH3BodyInternalLinkListWidget-KFP3TIKE.mjs +25 -0
- package/dist/SubtitleH3BodySpecialFeatureResourceCollectionsWidget-62SJ4J73.mjs +37 -0
- package/dist/SubtitleH3BodyWidget-7XGVXSMR.mjs +35 -0
- package/dist/SubtitleH3ChildrenWidget-CA3TR726.mjs +40 -0
- package/dist/SubtitleH3FaqWidget-VXVV7TUL.mjs +78 -0
- package/dist/SubtitleH3KeyResourcesWidget-AGBBJ7ZJ.mjs +24 -0
- package/dist/SubtitleH3ResourceCollectionsWidget-IBDVHMSC.mjs +37 -0
- package/dist/TestimonialListWidget-5OKZ5TQQ.mjs +7 -0
- package/dist/UpdateUserInfoWidget-4I6RJQ5M.mjs +7 -0
- package/dist/UserInfoWidget-AS53SE7B.mjs +7 -0
- package/dist/VideoWidget-YRR7FCDN.mjs +18 -0
- package/dist/chunk-4AG2CMM3.mjs +86 -0
- package/dist/chunk-AO6SFQGL.mjs +20 -0
- package/dist/chunk-AQKMITUZ.mjs +52 -0
- package/dist/chunk-DED6JF7X.mjs +335 -0
- package/dist/chunk-DMKIIBTI.mjs +11 -0
- package/dist/chunk-DVN7SXOC.mjs +131 -0
- package/dist/chunk-ECRLCFXK.mjs +65 -0
- package/dist/chunk-ER4KI2WR.mjs +24 -0
- package/dist/chunk-FQ57AT5X.mjs +51 -0
- package/dist/chunk-HLTYOLFG.mjs +20 -0
- package/dist/chunk-J7SY757T.mjs +44 -0
- package/dist/chunk-JJWETKAK.mjs +18 -0
- package/dist/chunk-JNVPTKNZ.mjs +20 -0
- package/dist/chunk-KR42WXX4.mjs +18 -0
- package/dist/chunk-LIPPN7U2.mjs +25 -0
- package/dist/chunk-MR3ABJDZ.mjs +30 -0
- package/dist/chunk-NSGNUHUW.mjs +28 -0
- package/dist/chunk-O6WFR4J5.mjs +10 -0
- package/dist/chunk-OCSKL7XJ.mjs +34 -0
- package/dist/chunk-QDEIIXMC.mjs +52 -0
- package/dist/chunk-QYIHQTW5.mjs +46 -0
- package/dist/chunk-RXVHS4OJ.mjs +24 -0
- package/dist/chunk-SNHJDG24.mjs +44 -0
- package/dist/chunk-UGGGP7ZA.mjs +166 -0
- package/dist/chunk-UYS3OVMP.mjs +9 -0
- package/dist/chunk-VFXOGW3A.mjs +10 -0
- package/dist/chunk-VFYJ2I2X.mjs +45 -0
- package/dist/chunk-VHLUUHQ3.mjs +43 -0
- package/dist/chunk-VKH6K2KB.mjs +33 -0
- package/dist/chunk-XF76SGFU.mjs +10 -0
- package/dist/chunk-XR7AIYAA.mjs +112 -0
- package/dist/html-section-CWKFJCXX.mjs +7 -0
- package/dist/index.d.mts +185 -0
- package/dist/index.d.ts +185 -0
- package/dist/index.js +3990 -0
- package/dist/index.mjs +343 -0
- package/dist/styles.css +1 -0
- package/package.json +79 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// src/components/Section/ColumnWidget.tsx
|
|
2
|
+
import { CmsImage } from "@geowiki/ui";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
var ColumnWidget = ({ data, cmsUrl }) => {
|
|
5
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("div", { className: "container mx-auto pt-12", children: [
|
|
6
|
+
data.TitlePart && /* @__PURE__ */ jsx("section", { className: "py-12 text-center", children: /* @__PURE__ */ jsx("h2", { className: "text-4xl font-bold", children: data.TitlePart?.Title }) }),
|
|
7
|
+
/* @__PURE__ */ jsx("div", { className: "grid lg:grid-cols-3 gap-6 xl:gap-x-12", children: data.BagPart?.ContentItems?.map((col, index) => /* @__PURE__ */ jsxs("div", { className: "mb-6 lg:mb-0", children: [
|
|
8
|
+
/* @__PURE__ */ jsx("div", { className: "relative overflow-hidden bg-no-repeat bg-cover ripple shadow-lg rounded-lg mb-6", children: /* @__PURE__ */ jsx(
|
|
9
|
+
CmsImage,
|
|
10
|
+
{
|
|
11
|
+
src: col.Card?.Image?.Paths[0],
|
|
12
|
+
className: "w-full h-full object-cover",
|
|
13
|
+
cmsUrl
|
|
14
|
+
}
|
|
15
|
+
) }),
|
|
16
|
+
/* @__PURE__ */ jsx("h5", { className: "text-xl font-bold mb-3 text-center", children: col.TitlePart?.Title }),
|
|
17
|
+
/* @__PURE__ */ jsx("p", { className: "text-lg", children: col.Card?.Description?.Text })
|
|
18
|
+
] }, index)) })
|
|
19
|
+
] }) });
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
ColumnWidget
|
|
24
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// src/components/Section/ResourceCollectionItemWidget.tsx
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
var ResourceCollectionItemWidget = (_props) => {
|
|
4
|
+
return /* @__PURE__ */ jsxs("div", { className: "container mx-auto relative p-5 rounded-sm", children: [
|
|
5
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col mb-2 lg:items-center lg:flex-row", children: [
|
|
6
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-10 h-10 mb-4 mr-2 rounded-full bg-primary-50 lg:mb-0", children: /* @__PURE__ */ jsx(
|
|
7
|
+
"svg",
|
|
8
|
+
{
|
|
9
|
+
fill: "none",
|
|
10
|
+
stroke: "currentColor",
|
|
11
|
+
strokeWidth: "1.5",
|
|
12
|
+
viewBox: "-8 -8 40 40",
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
"aria-hidden": "true",
|
|
15
|
+
children: /* @__PURE__ */ jsx(
|
|
16
|
+
"path",
|
|
17
|
+
{
|
|
18
|
+
strokeLinecap: "round",
|
|
19
|
+
strokeLinejoin: "round",
|
|
20
|
+
d: "M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
) }),
|
|
25
|
+
/* @__PURE__ */ jsx("h6", { className: "font-semibold leading-5", children: _props.data.ResourceCollectionItem?.Title?.Text })
|
|
26
|
+
] }),
|
|
27
|
+
/* @__PURE__ */ jsx("p", { className: "mb-2 text-sm ", children: _props.data.ResourceCollectionItem?.Description?.Text }),
|
|
28
|
+
/* @__PURE__ */ jsx(
|
|
29
|
+
"a",
|
|
30
|
+
{
|
|
31
|
+
href: _props.data.ResourceCollectionItem?.LinkUrl?.Url,
|
|
32
|
+
"aria-label": "",
|
|
33
|
+
rel: "noreferrer",
|
|
34
|
+
target: "_blank",
|
|
35
|
+
className: "inline-flex items-center text-sm font-semibold transition-colors duration-200 text-primary-500 hover:text-primary-800",
|
|
36
|
+
children: _props.data.ResourceCollectionItem?.LinkUrl?.Text
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
] });
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
ResourceCollectionItemWidget
|
|
44
|
+
};
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
// src/components/Section/ContactWidget.tsx
|
|
2
|
+
import { EmailManagementService } from "@geowiki/api-proxy";
|
|
3
|
+
import { useHosts, HostService } from "@geowiki/core";
|
|
4
|
+
import { useForm } from "react-hook-form";
|
|
5
|
+
import { toast } from "react-toastify";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
var ContactWidget = ({ data }) => {
|
|
8
|
+
const { data: hosts } = useHosts();
|
|
9
|
+
const {
|
|
10
|
+
register,
|
|
11
|
+
handleSubmit,
|
|
12
|
+
formState: { errors }
|
|
13
|
+
} = useForm();
|
|
14
|
+
const onSubmit = async (formData) => {
|
|
15
|
+
var tenantInfo = HostService.getCurrentHostInfo(hosts || []);
|
|
16
|
+
var tenantName = HostService.getTenantName(tenantInfo);
|
|
17
|
+
var subjectPrefix = "";
|
|
18
|
+
if (tenantName) {
|
|
19
|
+
subjectPrefix = tenantName + " - ";
|
|
20
|
+
}
|
|
21
|
+
var subject = subjectPrefix + "Contact form from - " + formData.first_name + " " + formData.last_name;
|
|
22
|
+
try {
|
|
23
|
+
await EmailManagementService.emailManagementSendEmail(
|
|
24
|
+
data?.Contact?.From?.Text,
|
|
25
|
+
data?.Contact?.To?.Text,
|
|
26
|
+
formData.from,
|
|
27
|
+
subject,
|
|
28
|
+
formData.message
|
|
29
|
+
);
|
|
30
|
+
toast.success("Email sent successfully!");
|
|
31
|
+
} catch (error) {
|
|
32
|
+
console.log(error);
|
|
33
|
+
toast.error("Failed to send email");
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
return /* @__PURE__ */ jsx("div", { className: "container mx-auto", children: /* @__PURE__ */ jsx("div", { className: "relative isolate py-24 px-6 sm:py-32 lg:px-8", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-xl lg:max-w-4xl", children: [
|
|
37
|
+
/* @__PURE__ */ jsx("h2", { className: "text-4xl font-bold tracking-tight", children: data.Contact?.MainText?.Text }),
|
|
38
|
+
/* @__PURE__ */ jsx("p", { className: "mt-2 text-lg leading-8 ", children: data.Contact?.SubText?.Text }),
|
|
39
|
+
/* @__PURE__ */ jsx("div", { className: "mt-16 flex flex-col gap-16 sm:gap-y-20 lg:flex-row", children: /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit(onSubmit), className: "lg:flex-auto", children: [
|
|
40
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
41
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
42
|
+
/* @__PURE__ */ jsxs(
|
|
43
|
+
"label",
|
|
44
|
+
{
|
|
45
|
+
htmlFor: "from",
|
|
46
|
+
className: "block text-sm font-semibold leading-6 ",
|
|
47
|
+
children: [
|
|
48
|
+
"Your email address ",
|
|
49
|
+
/* @__PURE__ */ jsx("span", { className: "text-red-500", children: "*" })
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ jsx("div", { className: "mt-2.5", children: /* @__PURE__ */ jsx(
|
|
54
|
+
"input",
|
|
55
|
+
{
|
|
56
|
+
type: "email",
|
|
57
|
+
id: "from",
|
|
58
|
+
autoComplete: "email",
|
|
59
|
+
...register("from", { required: true }),
|
|
60
|
+
className: "block w-full rounded-md border-0 py-2 px-3.5 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6"
|
|
61
|
+
}
|
|
62
|
+
) }),
|
|
63
|
+
errors.from && /* @__PURE__ */ jsx("span", { className: "text-red-500", children: "Email is required" })
|
|
64
|
+
] }),
|
|
65
|
+
/* @__PURE__ */ jsxs("div", { className: "pt-4", children: [
|
|
66
|
+
/* @__PURE__ */ jsxs(
|
|
67
|
+
"label",
|
|
68
|
+
{
|
|
69
|
+
htmlFor: "first_name",
|
|
70
|
+
className: "block text-sm font-semibold leading-6 ",
|
|
71
|
+
children: [
|
|
72
|
+
"First name ",
|
|
73
|
+
/* @__PURE__ */ jsx("span", { className: "text-red-500", children: "*" })
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ jsx("div", { className: "mt-2.5", children: /* @__PURE__ */ jsx(
|
|
78
|
+
"input",
|
|
79
|
+
{
|
|
80
|
+
id: "first_name",
|
|
81
|
+
autoComplete: "first_name",
|
|
82
|
+
...register("first_name", { required: true }),
|
|
83
|
+
className: "block w-full rounded-md border-0 py-2 px-3.5 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6"
|
|
84
|
+
}
|
|
85
|
+
) }),
|
|
86
|
+
errors.from && /* @__PURE__ */ jsxs("span", { className: "text-red-500", children: [
|
|
87
|
+
" ",
|
|
88
|
+
"First name is required"
|
|
89
|
+
] }),
|
|
90
|
+
/* @__PURE__ */ jsxs("div", { className: "pt-4", children: [
|
|
91
|
+
/* @__PURE__ */ jsxs(
|
|
92
|
+
"label",
|
|
93
|
+
{
|
|
94
|
+
htmlFor: "last_name",
|
|
95
|
+
className: "block text-sm font-semibold leading-6 ",
|
|
96
|
+
children: [
|
|
97
|
+
"Last name ",
|
|
98
|
+
/* @__PURE__ */ jsx("span", { className: "text-red-500", children: "*" })
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
),
|
|
102
|
+
/* @__PURE__ */ jsx("div", { className: "mt-2.5", children: /* @__PURE__ */ jsx(
|
|
103
|
+
"input",
|
|
104
|
+
{
|
|
105
|
+
id: "last_name",
|
|
106
|
+
autoComplete: "last_name",
|
|
107
|
+
...register("last_name", { required: true }),
|
|
108
|
+
className: "block w-full rounded-md border-0 py-2 px-3.5 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6"
|
|
109
|
+
}
|
|
110
|
+
) }),
|
|
111
|
+
errors.from && /* @__PURE__ */ jsx("span", { className: "text-red-500", children: "Last name is required" })
|
|
112
|
+
] })
|
|
113
|
+
] }),
|
|
114
|
+
/* @__PURE__ */ jsxs("div", { className: "pt-4", children: [
|
|
115
|
+
/* @__PURE__ */ jsxs(
|
|
116
|
+
"label",
|
|
117
|
+
{
|
|
118
|
+
htmlFor: "message",
|
|
119
|
+
className: "block text-sm font-semibold leading-6 ",
|
|
120
|
+
children: [
|
|
121
|
+
"Message ",
|
|
122
|
+
/* @__PURE__ */ jsx("span", { className: "text-red-500", children: "*" })
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
),
|
|
126
|
+
/* @__PURE__ */ jsx("div", { className: "mt-2.5", children: /* @__PURE__ */ jsx(
|
|
127
|
+
"textarea",
|
|
128
|
+
{
|
|
129
|
+
id: "message",
|
|
130
|
+
...register("message", { required: true }),
|
|
131
|
+
rows: 4,
|
|
132
|
+
className: "block w-full rounded-md border-0 py-2 px-3.5 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6",
|
|
133
|
+
defaultValue: ""
|
|
134
|
+
}
|
|
135
|
+
) }),
|
|
136
|
+
errors.message && /* @__PURE__ */ jsx("span", { className: "text-red-500", children: "Message is required" })
|
|
137
|
+
] })
|
|
138
|
+
] }),
|
|
139
|
+
/* @__PURE__ */ jsx("div", { className: "mt-10", children: /* @__PURE__ */ jsx(
|
|
140
|
+
"button",
|
|
141
|
+
{
|
|
142
|
+
type: "submit",
|
|
143
|
+
className: "block w-full rounded-md bg-primary-600 px-3.5 py-2.5 text-center text-sm font-semibold text-white shadow-sm hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600",
|
|
144
|
+
children: "Submit"
|
|
145
|
+
}
|
|
146
|
+
) }),
|
|
147
|
+
/* @__PURE__ */ jsxs("p", { className: "mt-4 text-sm leading-6", children: [
|
|
148
|
+
"By submitting this form, I agree to the",
|
|
149
|
+
" ",
|
|
150
|
+
/* @__PURE__ */ jsx(
|
|
151
|
+
"a",
|
|
152
|
+
{
|
|
153
|
+
href: data.Contact?.PrivacyUrl?.Text,
|
|
154
|
+
className: "font-semibold text-primary-600 cursor-pointer",
|
|
155
|
+
children: "Privacy\xA0Policy"
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
"."
|
|
159
|
+
] })
|
|
160
|
+
] }) })
|
|
161
|
+
] }) }) });
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
export {
|
|
165
|
+
ContactWidget
|
|
166
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// src/components/Section/MarkdownWidget.tsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
var MarkdownWidget = ({ data }) => {
|
|
4
|
+
return /* @__PURE__ */ jsx("div", { className: "mx-auto flex flex-col justify-center pt-4", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto", children: data.MarkdownBodyPart?.Markdown }) });
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
MarkdownWidget
|
|
9
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/components/Section/Recodo/UserInfoWidget.tsx
|
|
2
|
+
import { UserInfoPage } from "@geowiki/recodo";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
var UserInfoWidget = (_props) => {
|
|
5
|
+
return /* @__PURE__ */ jsx("div", { className: "container mx-auto", children: /* @__PURE__ */ jsx(UserInfoPage, {}) });
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
UserInfoWidget
|
|
10
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// src/components/Section/RowWidget.tsx
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import { CustomLink } from "@geowiki/ui";
|
|
4
|
+
import { CmsImage } from "@geowiki/ui";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var RowWidget = ({ data, cmsUrl }) => {
|
|
7
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
8
|
+
data.TitlePart && /* @__PURE__ */ jsx("section", { className: "py-12 text-center", children: /* @__PURE__ */ jsx("h2", { className: "text-4xl font-bold", children: data.TitlePart?.Title }) }),
|
|
9
|
+
/* @__PURE__ */ jsx("div", { className: "container mx-auto flex flex-col gap-12 py-12", children: data.BagPart?.ContentItems?.map((row, index) => /* @__PURE__ */ jsxs(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
className: classNames(
|
|
13
|
+
"flex flex-col justify-start md:justify-between md:items-center gap-10",
|
|
14
|
+
{
|
|
15
|
+
"lg:flex-row": index % 2 === 0,
|
|
16
|
+
"lg:flex-row-reverse": index % 2 === 1
|
|
17
|
+
}
|
|
18
|
+
),
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsxs("div", { className: "w-full lg:w-6/12 lg:pr-6 text-lg", children: [
|
|
21
|
+
/* @__PURE__ */ jsx("h3", { className: "text-2xl font-bold text-center", children: row.Card?.MainText?.Text }),
|
|
22
|
+
/* @__PURE__ */ jsx("p", { className: "my-6", children: row.Card?.Description?.Text }),
|
|
23
|
+
/* @__PURE__ */ jsx(CustomLink, { data: row.LinkPart })
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ jsx("div", { className: "w-full sm:9/12 lg:w-6/12 max-h-full", children: /* @__PURE__ */ jsx(
|
|
26
|
+
CmsImage,
|
|
27
|
+
{
|
|
28
|
+
className: "h-96",
|
|
29
|
+
src: row.Card?.Image?.Paths[0],
|
|
30
|
+
height: 384,
|
|
31
|
+
width: 900,
|
|
32
|
+
alt: row.Card?.MainText?.Text,
|
|
33
|
+
cmsUrl
|
|
34
|
+
}
|
|
35
|
+
) })
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
row.ContentItemId
|
|
39
|
+
)) })
|
|
40
|
+
] });
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
RowWidget
|
|
45
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// src/components/Section/FeatureRowWithMultipleImagesWidget.tsx
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
var FeatureRowWithMultipleImagesWidget = ({
|
|
4
|
+
data,
|
|
5
|
+
cmsUrl
|
|
6
|
+
}) => {
|
|
7
|
+
return /* @__PURE__ */ jsxs("div", { className: "container mx-auto px-4 py-16", children: [
|
|
8
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col mb-6", children: [
|
|
9
|
+
/* @__PURE__ */ jsxs("h2", { className: "max-w-lg mb-5 text-3xl font-bold tracking-tight sm:text-4xl sm:leading-none md:mb-6 group", children: [
|
|
10
|
+
/* @__PURE__ */ jsx("span", { className: "inline-block mb-1 sm:mb-4", children: data.FeatureRowWithMultipleImages?.MainText?.Text }),
|
|
11
|
+
/* @__PURE__ */ jsx("div", { className: "h-1 ml-auto duration-300 origin-left transform bg-deep-purple-accent-400 scale-x-30 group-hover:scale-x-100" })
|
|
12
|
+
] }),
|
|
13
|
+
/* @__PURE__ */ jsx("p", { className: "text-xl lg:max-w-md", children: data.FeatureRowWithMultipleImages?.SubText?.Text })
|
|
14
|
+
] }),
|
|
15
|
+
/* @__PURE__ */ jsx("div", { className: "grid gap-6 row-gap-5 mb-8 lg:grid-cols-4 sm:row-gap-6 sm:grid-cols-2", children: data?.Images?.ContentItems?.map(
|
|
16
|
+
(image, index) => {
|
|
17
|
+
return /* @__PURE__ */ jsx(
|
|
18
|
+
"a",
|
|
19
|
+
{
|
|
20
|
+
href: image?.ImageWithText?.LinkUrl?.Url,
|
|
21
|
+
"aria-label": "View Item",
|
|
22
|
+
children: /* @__PURE__ */ jsxs("div", { className: "relative overflow-hidden transition duration-200 transform rounded shadow-lg hover:-translate-y-2 hover:shadow-2xl", children: [
|
|
23
|
+
/* @__PURE__ */ jsx(
|
|
24
|
+
"img",
|
|
25
|
+
{
|
|
26
|
+
className: "object-cover w-full h-56 md:h-64 xl:h-80",
|
|
27
|
+
src: `${cmsUrl}/media/${image?.ImageWithText?.Image?.Paths?.[0]}?height=480&width=480`,
|
|
28
|
+
alt: ""
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-x-0 bottom-0 px-6 py-4 bg-primary bg-opacity-75", children: /* @__PURE__ */ jsx("p", { className: "text-sm font-medium tracking-wide text-white", children: image?.ImageWithText?.Text?.Text }) })
|
|
32
|
+
] })
|
|
33
|
+
},
|
|
34
|
+
index
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
) })
|
|
38
|
+
] });
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export {
|
|
42
|
+
FeatureRowWithMultipleImagesWidget
|
|
43
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// src/components/Section/FeatureRowWithImageWidget.tsx
|
|
2
|
+
import { FeatureItemElement } from "@geowiki/ui";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
var FeatureRowWithImageWidget = ({
|
|
5
|
+
data,
|
|
6
|
+
cmsUrl
|
|
7
|
+
}) => {
|
|
8
|
+
return /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-4", children: /* @__PURE__ */ jsxs("div", { className: "grid gap-5 row-gap-8 lg:grid-cols-2", children: [
|
|
9
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col justify-center", children: [
|
|
10
|
+
/* @__PURE__ */ jsxs("div", { className: "max-w-xl mb-6", children: [
|
|
11
|
+
/* @__PURE__ */ jsx("h2", { className: "max-w-lg mb-6 text-3xl font-bold tracking-tight sm:text-4xl sm:leading-none", children: data.FeatureRowWithImage?.MainText?.Text }),
|
|
12
|
+
/* @__PURE__ */ jsx("p", { className: "text-base md:text-lg", children: data.FeatureRowWithImage?.SubText?.Text })
|
|
13
|
+
] }),
|
|
14
|
+
/* @__PURE__ */ jsx("div", { className: "grid gap-5 row-gap-8 sm:grid-cols-2", children: data.FeatureItems?.ContentItems?.map(
|
|
15
|
+
(item, index) => {
|
|
16
|
+
return /* @__PURE__ */ jsx(FeatureItemElement, { item, cmsUrl }, index);
|
|
17
|
+
}
|
|
18
|
+
) })
|
|
19
|
+
] }),
|
|
20
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-center items-center ", children: /* @__PURE__ */ jsx(
|
|
21
|
+
"img",
|
|
22
|
+
{
|
|
23
|
+
className: "object-cover w-full h-96 rounded shadow-lg",
|
|
24
|
+
alt: data.FeatureRowWithImage?.Image?.Description?.Text,
|
|
25
|
+
src: `${cmsUrl}/media/${data.FeatureRowWithImage?.Image?.Paths?.[0]}?height=480&width=480`
|
|
26
|
+
}
|
|
27
|
+
) })
|
|
28
|
+
] }) });
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
FeatureRowWithImageWidget
|
|
33
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/components/Section/Recodo/FarmerClusterFinderWidget.tsx
|
|
2
|
+
import { FarmerClusterFinder } from "@geowiki/recodo";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
var FarmerClusterFinderWidget = (_props) => {
|
|
5
|
+
return /* @__PURE__ */ jsx("div", { className: "lg:container mx-auto", children: /* @__PURE__ */ jsx(FarmerClusterFinder, {}) });
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
FarmerClusterFinderWidget
|
|
10
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// src/components/Section/HeroWidget.tsx
|
|
2
|
+
import { HeroImage } from "@geowiki/ui";
|
|
3
|
+
import { HeroWidgetOld } from "@geowiki/ui";
|
|
4
|
+
import { HeroWithCenterText } from "@geowiki/ui";
|
|
5
|
+
import { HeroWithMap } from "@geowiki/ui";
|
|
6
|
+
import { HeroWithMultipleImage } from "@geowiki/ui";
|
|
7
|
+
import { HeroWithThreeImage } from "@geowiki/ui";
|
|
8
|
+
import { useCmsUrl } from "@geowiki/core";
|
|
9
|
+
import { HeroImageLeft, HeroImageRight } from "@geowiki/ui";
|
|
10
|
+
import { HeroWidgetMobileDevice } from "@geowiki/ui";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
var HeroWidget = ({ data }) => {
|
|
13
|
+
const type = data?.Hero?.Type?.Text;
|
|
14
|
+
var cmsUrl = useCmsUrl();
|
|
15
|
+
switch (type) {
|
|
16
|
+
case "image":
|
|
17
|
+
return /* @__PURE__ */ jsx(HeroImage, { path: data?.Hero?.Images?.Paths[0], cmsUrl });
|
|
18
|
+
case "withMultipleImages":
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
HeroWithMultipleImage,
|
|
21
|
+
{
|
|
22
|
+
paths: data?.Hero?.Images?.Paths,
|
|
23
|
+
contentItemId: data.ContentItemId,
|
|
24
|
+
title: data.Hero?.Title?.Text,
|
|
25
|
+
description: data.Hero?.Description?.Text,
|
|
26
|
+
links: data.Buttons?.ContentItems,
|
|
27
|
+
cmsUrl
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
case "withThreeImages":
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
32
|
+
HeroWithThreeImage,
|
|
33
|
+
{
|
|
34
|
+
paths: data?.Hero?.Images?.Paths,
|
|
35
|
+
title: data?.Hero?.Title?.Text,
|
|
36
|
+
description: data?.Hero?.Description?.Text,
|
|
37
|
+
links: data?.Buttons?.ContentItems,
|
|
38
|
+
cmsUrl
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
case "withCenterText":
|
|
42
|
+
return /* @__PURE__ */ jsx(
|
|
43
|
+
HeroWithCenterText,
|
|
44
|
+
{
|
|
45
|
+
paths: data?.Hero?.Images?.Paths,
|
|
46
|
+
title: data.Hero?.Title?.Text,
|
|
47
|
+
description: data.Hero?.Description?.Text,
|
|
48
|
+
links: data.Buttons?.ContentItems,
|
|
49
|
+
cmsUrl
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
case "withMap":
|
|
53
|
+
return /* @__PURE__ */ jsx(
|
|
54
|
+
HeroWithMap,
|
|
55
|
+
{
|
|
56
|
+
title: data.Hero?.Title?.Text,
|
|
57
|
+
description: data.Hero?.Description?.Text,
|
|
58
|
+
links: data.Buttons?.ContentItems
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
case "withImageLeft":
|
|
62
|
+
return /* @__PURE__ */ jsx(
|
|
63
|
+
HeroImageLeft,
|
|
64
|
+
{
|
|
65
|
+
logoPath: data?.Hero?.Logo?.Paths[0],
|
|
66
|
+
path: data?.Hero?.Images?.Paths[0],
|
|
67
|
+
text: data.Hero?.Description?.Text
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
case "withImageRight":
|
|
71
|
+
return /* @__PURE__ */ jsx(
|
|
72
|
+
HeroImageRight,
|
|
73
|
+
{
|
|
74
|
+
path: data?.Hero?.Images?.Paths[0],
|
|
75
|
+
title: data.Hero?.Title?.Text,
|
|
76
|
+
description: data.Hero?.Description?.Text
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
case "mobileDevice":
|
|
80
|
+
return /* @__PURE__ */ jsx(
|
|
81
|
+
HeroWidgetMobileDevice,
|
|
82
|
+
{
|
|
83
|
+
version: data.Hero?.LayoutVersion.Value ?? 1,
|
|
84
|
+
title: data.Hero?.Title?.Text,
|
|
85
|
+
description: data.Hero?.Description?.Text,
|
|
86
|
+
image: data.Hero?.Images?.Paths?.[0],
|
|
87
|
+
cmsUrl,
|
|
88
|
+
links: data?.Buttons?.ContentItems,
|
|
89
|
+
storeLinks: [
|
|
90
|
+
...data.Hero?.GooglePlayUrl.Text ? [{ url: data.Hero.GooglePlayUrl.Text, type: "google" }] : [],
|
|
91
|
+
...data.Hero?.AppStoreUrl.Text ? [{ url: data.Hero.AppStoreUrl.Text, type: "apple" }] : []
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
default:
|
|
96
|
+
return /* @__PURE__ */ jsx(
|
|
97
|
+
HeroWidgetOld,
|
|
98
|
+
{
|
|
99
|
+
paths: data?.HeroWidget.Images?.Paths,
|
|
100
|
+
contentItemId: data.ContentItemId,
|
|
101
|
+
mainText: data.HeroWidget.MainText.Text,
|
|
102
|
+
subText: data.HeroWidget.SubText.Text,
|
|
103
|
+
contentItems: data?.Buttons?.ContentItems,
|
|
104
|
+
cmsUrl
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export {
|
|
111
|
+
HeroWidget
|
|
112
|
+
};
|