@enyxs/wikex-components 0.8.12 → 0.8.14
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.js +58 -37
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +58 -37
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -689,6 +689,21 @@ var minimalUiBlocks = [
|
|
|
689
689
|
|
|
690
690
|
// src/minimal-ui/marketing-blocks.tsx
|
|
691
691
|
var import_react2 = require("react");
|
|
692
|
+
|
|
693
|
+
// src/list-items.ts
|
|
694
|
+
function cmsListItems(content, fallback, field = "items") {
|
|
695
|
+
const raw = content[field];
|
|
696
|
+
if (typeof raw !== "string") return fallback;
|
|
697
|
+
try {
|
|
698
|
+
const parsed = JSON.parse(raw);
|
|
699
|
+
if (!Array.isArray(parsed)) return fallback;
|
|
700
|
+
return parsed.filter((item) => Boolean(item) && typeof item === "object").map((item) => Object.fromEntries(Object.entries(item).map(([key, value6]) => [key, typeof value6 === "string" ? value6 : ""])));
|
|
701
|
+
} catch {
|
|
702
|
+
return fallback;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
// src/minimal-ui/marketing-blocks.tsx
|
|
692
707
|
var import_Accordion = __toESM(require("@mui/material/Accordion"));
|
|
693
708
|
var import_AccordionDetails = __toESM(require("@mui/material/AccordionDetails"));
|
|
694
709
|
var import_AccordionSummary = __toESM(require("@mui/material/AccordionSummary"));
|
|
@@ -812,6 +827,7 @@ function MetricsStrip({ content, editable, onChange }) {
|
|
|
812
827
|
);
|
|
813
828
|
}
|
|
814
829
|
function TestimonialGrid({ content, editable, onChange }) {
|
|
830
|
+
const listIndexes = cmsListItems(content, Array.from({ length: 3 }, () => ({}))).map((_, index) => index + 1);
|
|
815
831
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
816
832
|
import_Box3.default,
|
|
817
833
|
{
|
|
@@ -863,7 +879,7 @@ function TestimonialGrid({ content, editable, onChange }) {
|
|
|
863
879
|
mt: 3
|
|
864
880
|
}
|
|
865
881
|
},
|
|
866
|
-
children:
|
|
882
|
+
children: listIndexes.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
867
883
|
import_Box3.default,
|
|
868
884
|
{
|
|
869
885
|
sx: {
|
|
@@ -931,6 +947,7 @@ function TestimonialGrid({ content, editable, onChange }) {
|
|
|
931
947
|
}
|
|
932
948
|
function FaqSection({ content, editable, onChange }) {
|
|
933
949
|
const [expanded, setExpanded] = (0, import_react2.useState)(1);
|
|
950
|
+
const listIndexes = cmsListItems(content, Array.from({ length: 3 }, () => ({}))).map((_, index) => index + 1);
|
|
934
951
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
935
952
|
import_Box3.default,
|
|
936
953
|
{
|
|
@@ -984,7 +1001,7 @@ function FaqSection({ content, editable, onChange }) {
|
|
|
984
1001
|
}
|
|
985
1002
|
)
|
|
986
1003
|
] }),
|
|
987
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Box3.default, { children:
|
|
1004
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Box3.default, { children: listIndexes.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
988
1005
|
import_Accordion.default,
|
|
989
1006
|
{
|
|
990
1007
|
expanded: expanded === item,
|
|
@@ -3007,6 +3024,7 @@ var projectDefaults = {
|
|
|
3007
3024
|
project4Location: "B\xECnh D\u01B0\u01A1ng"
|
|
3008
3025
|
};
|
|
3009
3026
|
function FeaturedProjectsRenderer(props) {
|
|
3027
|
+
const listIndexes = cmsListItems(props.content, Array.from({ length: 4 }, () => ({}))).map((_, index) => index + 1);
|
|
3010
3028
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { component: "section", sx: { ...sectionSx, bgcolor: palette.cream, color: palette.ink }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { sx: { maxWidth: 1376, mx: "auto" }, children: [
|
|
3011
3029
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { sx: { display: "flex", alignItems: { xs: "flex-start", md: "flex-end" }, justifyContent: "space-between", flexDirection: { xs: "column", md: "row" }, gap: 3, mb: 6 }, children: [
|
|
3012
3030
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Stack3.default, { spacing: 2, children: [
|
|
@@ -3015,7 +3033,7 @@ function FeaturedProjectsRenderer(props) {
|
|
|
3015
3033
|
] }),
|
|
3016
3034
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: "intro", fallback: projectDefaults.intro, children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { maxWidth: 420, color: palette.muted, fontSize: 16, lineHeight: 1.8 }, children: node }) })
|
|
3017
3035
|
] }),
|
|
3018
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "repeat(12, 1fr)" }, gap: 2 }, children:
|
|
3036
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "repeat(12, 1fr)" }, gap: 2 }, children: listIndexes.map((index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { sx: { position: "relative", minHeight: { xs: 390, md: index < 3 ? 600 : 430 }, overflow: "hidden", bgcolor: "#59665C", color: "white", gridColumn: { xs: "1", md: index === 1 ? "span 7" : index === 2 ? "span 5" : "span 6" } }, children: [
|
|
3019
3037
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Image, { props, field: `project${index}Image`, fallback: projectDefaults[`project${index}Image`], alt: "D\u1EF1 \xE1n n\u1ED5i b\u1EADt" }),
|
|
3020
3038
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { position: "absolute", inset: 0, zIndex: 1, pointerEvents: "none", background: "linear-gradient(0deg, rgba(17,24,18,.88), transparent 64%)" } }),
|
|
3021
3039
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { position: "absolute", zIndex: 2, pointerEvents: "none", top: 20, right: 20, display: "grid", width: 44, height: 44, placeItems: "center", border: "1px solid rgba(255,255,255,.38)", borderRadius: "50%", bgcolor: "rgba(0,0,0,.12)", fontSize: 20 }, children: "\u2197" }),
|
|
@@ -3053,13 +3071,14 @@ var processDefaults = {
|
|
|
3053
3071
|
step4Description: "Nghi\u1EC7m thu chi ti\u1EBFt, b\u1EA3o h\xE0nh v\xE0 ch\u0103m s\xF3c c\xF4ng tr\xECnh l\xE2u d\xE0i."
|
|
3054
3072
|
};
|
|
3055
3073
|
function EstateProcessRenderer(props) {
|
|
3074
|
+
const listIndexes = cmsListItems(props.content, Array.from({ length: 4 }, () => ({}))).map((_, index) => index + 1);
|
|
3056
3075
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { component: "section", sx: { ...sectionSx, borderBlock: `1px solid ${palette.line}`, bgcolor: palette.pale, color: palette.ink }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { sx: { display: "grid", maxWidth: 1376, mx: "auto", gap: { xs: 5, md: 10 }, gridTemplateColumns: { xs: "1fr", md: ".75fr 1.25fr" } }, children: [
|
|
3057
3076
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Stack3.default, { spacing: 2.5, sx: { alignItems: "flex-start" }, children: [
|
|
3058
3077
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: "eyebrow", fallback: processDefaults.eyebrow, children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: outlinedEyebrowSx, children: node }) }),
|
|
3059
3078
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: "heading", fallback: processDefaults.heading, children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { component: "h2", sx: { ...headingSx, fontSize: { xs: 48, md: 78 } }, children: node }) }),
|
|
3060
3079
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: "body", fallback: processDefaults.body, children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { maxWidth: 450, color: palette.muted, fontSize: 16, lineHeight: 1.85 }, children: node }) })
|
|
3061
3080
|
] }),
|
|
3062
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Stack3.default, { component: "ol", sx: { m: 0, p: 0, listStyle: "none", borderTop: `1px solid ${palette.line}` }, children:
|
|
3081
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Stack3.default, { component: "ol", sx: { m: 0, p: 0, listStyle: "none", borderTop: `1px solid ${palette.line}` }, children: listIndexes.map((index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { component: "li", sx: { display: "grid", py: 3, gap: { xs: 1, md: 2 }, borderBottom: `1px solid ${palette.line}`, gridTemplateColumns: { xs: "36px 1fr", md: "56px 1fr 1fr" } }, children: [
|
|
3063
3082
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { sx: { color: palette.gold, fontFamily: "monospace", fontSize: 12, pt: 0.5 }, children: [
|
|
3064
3083
|
"0",
|
|
3065
3084
|
index
|
|
@@ -3100,6 +3119,7 @@ var servicesDefaults = {
|
|
|
3100
3119
|
service4Url: "#"
|
|
3101
3120
|
};
|
|
3102
3121
|
function EstateServicesRenderer(props) {
|
|
3122
|
+
const listIndexes = cmsListItems(props.content, Array.from({ length: 4 }, () => ({}))).map((_, index) => index + 1);
|
|
3103
3123
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { component: "section", sx: { ...sectionSx, bgcolor: palette.dark, color: "white" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { sx: { maxWidth: 1376, mx: "auto" }, children: [
|
|
3104
3124
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { sx: { display: "grid", gap: 4, gridTemplateColumns: { xs: "1fr", md: "1.1fr .9fr" }, alignItems: "end", mb: 6 }, children: [
|
|
3105
3125
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Stack3.default, { spacing: 2.5, children: [
|
|
@@ -3108,7 +3128,7 @@ function EstateServicesRenderer(props) {
|
|
|
3108
3128
|
] }),
|
|
3109
3129
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: "intro", fallback: servicesDefaults.intro, children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { maxWidth: 480, justifySelf: { md: "end" }, color: "rgba(255,255,255,.58)", fontSize: 16, lineHeight: 1.85 }, children: node }) })
|
|
3110
3130
|
] }),
|
|
3111
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" }, borderTop: "1px solid rgba(255,255,255,.14)", borderLeft: "1px solid rgba(255,255,255,.14)" }, children:
|
|
3131
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" }, borderTop: "1px solid rgba(255,255,255,.14)", borderLeft: "1px solid rgba(255,255,255,.14)" }, children: listIndexes.map((index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Stack3.default, { sx: { minHeight: { xs: 300, md: 370 }, p: { xs: 2.5, md: 4 }, borderRight: "1px solid rgba(255,255,255,.14)", borderBottom: "1px solid rgba(255,255,255,.14)", transition: "background .25s ease", "&:hover": { bgcolor: "#C2A268", color: palette.ink }, "&:hover .service-description": { color: "rgba(23,32,25,.72)" } }, children: [
|
|
3112
3132
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { sx: { display: "flex", justifyContent: "space-between", color: "#D8BD8A", fontFamily: "monospace", fontSize: 11 }, children: [
|
|
3113
3133
|
"0",
|
|
3114
3134
|
index,
|
|
@@ -3154,12 +3174,13 @@ var articlesDefaults = {
|
|
|
3154
3174
|
article3Url: "#"
|
|
3155
3175
|
};
|
|
3156
3176
|
function EstateArticlesRenderer(props) {
|
|
3177
|
+
const listIndexes = cmsListItems(props.content, Array.from({ length: 3 }, () => ({}))).map((_, index) => index + 1);
|
|
3157
3178
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { component: "section", sx: { ...sectionSx, bgcolor: "#DED7CA", color: palette.ink }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { sx: { maxWidth: 1376, mx: "auto" }, children: [
|
|
3158
3179
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Stack3.default, { spacing: 2.5, sx: { mb: 6 }, children: [
|
|
3159
3180
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: "eyebrow", fallback: articlesDefaults.eyebrow, children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: outlinedEyebrowSx, children: node }) }),
|
|
3160
3181
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: "heading", fallback: articlesDefaults.heading, children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { component: "h2", sx: headingSx, children: node }) })
|
|
3161
3182
|
] }),
|
|
3162
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "repeat(3, 1fr)" }, gap: "1px", bgcolor: palette.line }, children:
|
|
3183
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "repeat(3, 1fr)" }, gap: "1px", bgcolor: palette.line }, children: listIndexes.map((index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Stack3.default, { sx: { minHeight: 390, p: { xs: 2.5, md: 4 }, bgcolor: palette.cream, transition: "background .2s ease", "&:hover": { bgcolor: palette.pale } }, children: [
|
|
3163
3184
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: `article${index}Meta`, fallback: articlesDefaults[`article${index}Meta`], children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { color: palette.gold, fontSize: 11, fontWeight: 800, letterSpacing: ".13em", textTransform: "uppercase" }, children: node }) }),
|
|
3164
3185
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: `article${index}Title`, fallback: articlesDefaults[`article${index}Title`], children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { component: "h3", sx: { mt: 5, fontFamily: displayFont, fontSize: { xs: 31, md: 36 }, fontWeight: 400, letterSpacing: "-.04em", lineHeight: 1.06 }, children: node }) }),
|
|
3165
3186
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: `article${index}Excerpt`, fallback: articlesDefaults[`article${index}Excerpt`], children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { mt: 2, color: palette.muted, fontSize: 14, lineHeight: 1.75 }, children: node }) }),
|
|
@@ -3191,12 +3212,13 @@ var galleryDefaults = {
|
|
|
3191
3212
|
caption4: "M\u1ED9t g\xF3c th\u01B0 gi\xE3n ri\xEAng t\u01B0"
|
|
3192
3213
|
};
|
|
3193
3214
|
function PropertyGalleryRenderer(props) {
|
|
3215
|
+
const listIndexes = cmsListItems(props.content, Array.from({ length: 4 }, () => ({}))).map((_, index) => index + 1);
|
|
3194
3216
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { component: "section", sx: { ...sectionSx, bgcolor: palette.cream, color: palette.ink }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { sx: { maxWidth: 1376, mx: "auto" }, children: [
|
|
3195
3217
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Stack3.default, { spacing: 2, sx: { mb: 6 }, children: [
|
|
3196
3218
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: "eyebrow", fallback: galleryDefaults.eyebrow, children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: eyebrowSx, children: node }) }),
|
|
3197
3219
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: "heading", fallback: galleryDefaults.heading, children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { component: "h2", sx: headingSx, children: node }) })
|
|
3198
3220
|
] }),
|
|
3199
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", sm: "1fr 1fr", md: "repeat(3, 1fr)" }, gap: 2 }, children:
|
|
3221
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", sm: "1fr 1fr", md: "repeat(3, 1fr)" }, gap: 2 }, children: listIndexes.map((index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { children: [
|
|
3200
3222
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { aspectRatio: "4 / 3" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Image, { props, field: `image${index}`, fallback: galleryDefaults[`image${index}`], alt: "B\u1ED9 s\u01B0u t\u1EADp b\u1EA5t \u0111\u1ED9ng s\u1EA3n" }) }),
|
|
3201
3223
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: `caption${index}`, fallback: galleryDefaults[`caption${index}`], children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { pt: 1, color: palette.muted, fontSize: 12 }, children: node }) })
|
|
3202
3224
|
] }, index)) })
|
|
@@ -3227,12 +3249,13 @@ var amenitiesDefaults = {
|
|
|
3227
3249
|
amenity6Description: "S\u1EF1 an t\xE2m cho t\u1EEBng kho\u1EA3nh kh\u1EAFc t\u1EA1i nh\xE0."
|
|
3228
3250
|
};
|
|
3229
3251
|
function AmenitiesRenderer(props) {
|
|
3252
|
+
const listIndexes = cmsListItems(props.content, Array.from({ length: 6 }, () => ({}))).map((_, index) => index + 1);
|
|
3230
3253
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { component: "section", sx: { ...sectionSx, bgcolor: palette.dark, color: "#F7F2E8" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { sx: { maxWidth: 1376, mx: "auto" }, children: [
|
|
3231
3254
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Stack3.default, { spacing: 2, sx: { mb: 6 }, children: [
|
|
3232
3255
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: "eyebrow", fallback: amenitiesDefaults.eyebrow, children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { ...eyebrowSx, color: "#D5B77E" }, children: node }) }),
|
|
3233
3256
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: "heading", fallback: amenitiesDefaults.heading, children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { component: "h2", sx: { ...headingSx, color: "#F7F2E8" }, children: node }) })
|
|
3234
3257
|
] }),
|
|
3235
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", sm: "1fr 1fr", md: "repeat(3, 1fr)" }, borderTop: "1px solid rgba(255,255,255,.16)", borderLeft: "1px solid rgba(255,255,255,.16)" }, children:
|
|
3258
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", sm: "1fr 1fr", md: "repeat(3, 1fr)" }, borderTop: "1px solid rgba(255,255,255,.16)", borderLeft: "1px solid rgba(255,255,255,.16)" }, children: listIndexes.map((index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Stack3.default, { sx: { minHeight: 320, p: { xs: 2.5, md: 3.5 }, borderRight: "1px solid rgba(255,255,255,.16)", borderBottom: "1px solid rgba(255,255,255,.16)" }, children: [
|
|
3236
3259
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Stack3.default, { direction: "row", justifyContent: "space-between", children: [
|
|
3237
3260
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { sx: { color: "#C9AA72", fontFamily: "monospace", fontSize: 11 }, children: [
|
|
3238
3261
|
"0",
|
|
@@ -3269,12 +3292,13 @@ var testimonialsDefaults = {
|
|
|
3269
3292
|
role3: "C\u01B0 d\xE2n"
|
|
3270
3293
|
};
|
|
3271
3294
|
function TestimonialsRenderer(props) {
|
|
3295
|
+
const listIndexes = cmsListItems(props.content, Array.from({ length: 3 }, () => ({}))).map((_, index) => index + 1);
|
|
3272
3296
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { component: "section", sx: { ...sectionSx, bgcolor: palette.pale, color: palette.ink }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { sx: { maxWidth: 1376, mx: "auto" }, children: [
|
|
3273
3297
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Stack3.default, { spacing: 2, sx: { mb: 6 }, children: [
|
|
3274
3298
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: "eyebrow", fallback: testimonialsDefaults.eyebrow, children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: eyebrowSx, children: node }) }),
|
|
3275
3299
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: "heading", fallback: testimonialsDefaults.heading, children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { component: "h2", sx: headingSx, children: node }) })
|
|
3276
3300
|
] }),
|
|
3277
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "repeat(3, 1fr)" }, gap: 2 }, children:
|
|
3301
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "repeat(3, 1fr)" }, gap: 2 }, children: listIndexes.map((index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Stack3.default, { sx: { minHeight: 340, p: 3, bgcolor: palette.cream, border: `1px solid ${palette.line}` }, children: [
|
|
3278
3302
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { color: "#A17C43", fontFamily: displayFont, fontSize: 40, lineHeight: 0.6 }, children: "\u201C" }),
|
|
3279
3303
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: `quote${index}`, fallback: testimonialsDefaults[`quote${index}`], children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { mt: 3, fontFamily: displayFont, fontSize: 25, letterSpacing: "-.025em", lineHeight: 1.3 }, children: node }) }),
|
|
3280
3304
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { sx: { mt: "auto", pt: 3 }, children: [
|
|
@@ -3305,12 +3329,13 @@ var faqDefaults = {
|
|
|
3305
3329
|
answer4: "H\xE3y \u0111\u1EC3 l\u1EA1i th\xF4ng tin li\xEAn h\u1EC7 \u0111\u1EC3 \u0111\u1ED9i ng\u0169 t\u01B0 v\u1EA5n v\xE0 s\u1EAFp x\u1EBFp bu\u1ED5i trao \u0111\u1ED5i ph\xF9 h\u1EE3p."
|
|
3306
3330
|
};
|
|
3307
3331
|
function FAQRenderer(props) {
|
|
3332
|
+
const listIndexes = cmsListItems(props.content, Array.from({ length: 4 }, () => ({}))).map((_, index) => index + 1);
|
|
3308
3333
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { component: "section", sx: { ...sectionSx, bgcolor: palette.cream, color: palette.ink }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { sx: { display: "grid", maxWidth: 1376, mx: "auto", gap: { xs: 4, md: 10 }, gridTemplateColumns: { xs: "1fr", md: ".72fr 1.28fr" } }, children: [
|
|
3309
3334
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Stack3.default, { spacing: 2, children: [
|
|
3310
3335
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: "eyebrow", fallback: faqDefaults.eyebrow, children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: eyebrowSx, children: node }) }),
|
|
3311
3336
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { props, field: "heading", fallback: faqDefaults.heading, children: (node) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { component: "h2", sx: { ...headingSx, fontSize: { xs: 38, md: 56 } }, children: node }) })
|
|
3312
3337
|
] }),
|
|
3313
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { children:
|
|
3338
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { children: listIndexes.map((index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box5.default, { sx: { py: 2.5, borderTop: `1px solid ${palette.line}`, ...index === listIndexes.length && { borderBottom: `1px solid ${palette.line}` } }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Stack3.default, { direction: "row", spacing: 2, children: [
|
|
3314
3339
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { sx: { color: palette.gold, fontFamily: "monospace", fontSize: 11, pt: 0.5 }, children: [
|
|
3315
3340
|
"0",
|
|
3316
3341
|
index
|
|
@@ -3608,7 +3633,7 @@ var archiveDefaults = {
|
|
|
3608
3633
|
project3Year: "2025"
|
|
3609
3634
|
};
|
|
3610
3635
|
function archiveProjects(props) {
|
|
3611
|
-
|
|
3636
|
+
const legacy = [1, 2, 3].map((index) => ({
|
|
3612
3637
|
image: String(getValue(props, `project${index}Image`, archiveDefaults[`project${index}Image`])),
|
|
3613
3638
|
type: String(getValue(props, `project${index}Type`, archiveDefaults[`project${index}Type`])),
|
|
3614
3639
|
title: String(getValue(props, `project${index}Title`, archiveDefaults[`project${index}Title`])),
|
|
@@ -3618,6 +3643,7 @@ function archiveProjects(props) {
|
|
|
3618
3643
|
scope: String(getValue(props, `project${index}Scope`, archiveDefaults[`project${index}Scope`])),
|
|
3619
3644
|
year: String(getValue(props, `project${index}Year`, archiveDefaults[`project${index}Year`]))
|
|
3620
3645
|
}));
|
|
3646
|
+
return cmsListItems(props.content, legacy);
|
|
3621
3647
|
}
|
|
3622
3648
|
function EstateProjectsArchiveRenderer(props) {
|
|
3623
3649
|
const [query, setQuery] = (0, import_react5.useState)("");
|
|
@@ -3756,6 +3782,13 @@ var detailDefaults = {
|
|
|
3756
3782
|
ctaLabel: "Trao \u0111\u1ED5i c\xF9ng \u0111\u1ED9i ng\u0169"
|
|
3757
3783
|
};
|
|
3758
3784
|
function EstateProjectDetailRenderer(props) {
|
|
3785
|
+
const galleryIndexes = cmsListItems(props.content, Array.from({ length: 3 }, () => ({}))).map((_, index) => index + 1);
|
|
3786
|
+
const projectInformation = cmsListItems(props.content, [
|
|
3787
|
+
{ label: "\u0110\u1ECBa \u0111i\u1EC3m", value: String(props.content.location ?? detailDefaults.location) },
|
|
3788
|
+
{ label: "Ch\u1EE7 \u0111\u1EA7u t\u01B0", value: String(props.content.client ?? detailDefaults.client) },
|
|
3789
|
+
{ label: "Di\u1EC7n t\xEDch", value: String(props.content.area ?? detailDefaults.area) },
|
|
3790
|
+
{ label: "Quy m\xF4", value: String(props.content.floors ?? detailDefaults.floors) }
|
|
3791
|
+
], "information");
|
|
3759
3792
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_Box6.default, { sx: { bgcolor: palette2.cream, color: palette2.ink }, children: [
|
|
3760
3793
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(EstateProjectFonts, {}),
|
|
3761
3794
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_Box6.default, { component: "section", sx: { position: "relative", isolation: "isolate", minHeight: { xs: 650, md: 900 }, overflow: "hidden", bgcolor: palette2.dark, color: "#F8F5EF" }, children: [
|
|
@@ -3770,10 +3803,10 @@ function EstateProjectDetailRenderer(props) {
|
|
|
3770
3803
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_Box6.default, { component: "section", sx: { ...containerSx, display: "grid", py: { xs: 7, md: 12 }, gap: { xs: 5, md: 12 }, gridTemplateColumns: { xs: "1fr", md: ".68fr 1.32fr" } }, children: [
|
|
3771
3804
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_Box6.default, { children: [
|
|
3772
3805
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Box6.default, { sx: eyebrowSx2, children: "Th\xF4ng tin d\u1EF1 \xE1n" }),
|
|
3773
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Box6.default, { sx: { mt: 3, borderTop: `1px solid ${palette2.line}` }, children:
|
|
3774
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Box6.default, { sx: { color: palette2.muted, fontSize: 12 }, children: label }),
|
|
3775
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
3776
|
-
] },
|
|
3806
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Box6.default, { sx: { mt: 3, borderTop: `1px solid ${palette2.line}` }, children: projectInformation.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_Box6.default, { sx: { display: "flex", justifyContent: "space-between", gap: 2, py: 1.2, borderBottom: `1px solid ${palette2.line}` }, children: [
|
|
3807
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Box6.default, { sx: { color: palette2.muted, fontSize: 12 }, children: item.label || "M\u1EE5c m\u1EDBi" }),
|
|
3808
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Box6.default, { sx: { fontSize: 12, fontWeight: 700, textAlign: "right" }, children: item.value })
|
|
3809
|
+
] }, `${item.label}-${index}`)) })
|
|
3777
3810
|
] }),
|
|
3778
3811
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_Stack4.default, { spacing: 3, sx: { alignItems: "flex-start" }, children: [
|
|
3779
3812
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text2, { props, field: "storyEyebrow", fallback: detailDefaults.storyEyebrow, sx: eyebrowSx2 }),
|
|
@@ -3791,13 +3824,14 @@ function EstateProjectDetailRenderer(props) {
|
|
|
3791
3824
|
] }) }),
|
|
3792
3825
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_Box6.default, { component: "section", sx: { ...containerSx, py: { xs: 8, md: 13 } }, children: [
|
|
3793
3826
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text2, { props, field: "galleryHeading", fallback: detailDefaults.galleryHeading, component: "h2", sx: { maxWidth: 760, fontFamily: displayFont2, fontSize: { xs: 46, md: 76 }, fontWeight: 400, letterSpacing: "-.06em", lineHeight: 0.94 } }),
|
|
3794
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Stack4.default, { spacing: { xs: 5, md: 10 }, sx: { mt: { xs: 5, md: 8 } }, children:
|
|
3827
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Stack4.default, { spacing: { xs: 5, md: 10 }, sx: { mt: { xs: 5, md: 8 } }, children: galleryIndexes.map((index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_Box6.default, { sx: { display: "grid", alignItems: "center", gap: { xs: 2, md: 8 }, gridTemplateColumns: { xs: "1fr", md: index % 2 ? "1.45fr .55fr" : ".55fr 1.45fr" } }, children: [
|
|
3795
3828
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Box6.default, { sx: { order: { md: index % 2 ? 1 : 2 }, minHeight: { xs: 330, md: index === 2 ? 520 : 430 } }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Image2, { props, field: `gallery${index}Image`, fallback: detailDefaults[`gallery${index}Image`], alt: "H\xECnh \u1EA3nh d\u1EF1 \xE1n" }) }),
|
|
3796
3829
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_Stack4.default, { sx: { order: { md: index % 2 ? 2 : 1 }, alignItems: "flex-start", borderTop: `1px solid ${palette2.line}`, pt: 2 }, spacing: 1.5, children: [
|
|
3797
3830
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_Box6.default, { sx: { color: palette2.gold, fontFamily: "monospace", fontSize: 11 }, children: [
|
|
3798
3831
|
"0",
|
|
3799
3832
|
index,
|
|
3800
|
-
" /
|
|
3833
|
+
" / ",
|
|
3834
|
+
String(galleryIndexes.length).padStart(2, "0")
|
|
3801
3835
|
] }),
|
|
3802
3836
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text2, { props, field: `gallery${index}Caption`, fallback: detailDefaults[`gallery${index}Caption`], sx: { fontFamily: displayFont2, fontSize: { xs: 24, md: 30 }, letterSpacing: "-.035em", lineHeight: 1.18 } }),
|
|
3803
3837
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text2, { props, field: `gallery${index}Note`, fallback: detailDefaults[`gallery${index}Note`], sx: { color: palette2.muted, fontSize: 14, lineHeight: 1.72 } })
|
|
@@ -3842,20 +3876,9 @@ var estateProjectPageBlocks = [estateProjectsArchiveBlock, estateProjectDetailBl
|
|
|
3842
3876
|
var import_Box7 = __toESM(require("@mui/material/Box"));
|
|
3843
3877
|
var import_Button7 = __toESM(require("@mui/material/Button"));
|
|
3844
3878
|
var import_Stack5 = __toESM(require("@mui/material/Stack"));
|
|
3845
|
-
var import_Typography4 = __toESM(require("@mui/material/Typography"));
|
|
3846
3879
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
3847
3880
|
var allBlocks = [...estateBlocks, ...estateProjectPageBlocks, ...minimalMarketingBlocks];
|
|
3848
3881
|
var stringValue = (content, key) => String(content[key] ?? "");
|
|
3849
|
-
function parseItems(value6, fallback) {
|
|
3850
|
-
if (typeof value6 !== "string") return fallback;
|
|
3851
|
-
try {
|
|
3852
|
-
const items = JSON.parse(value6);
|
|
3853
|
-
if (!Array.isArray(items)) return fallback;
|
|
3854
|
-
return items.filter((item) => Boolean(item) && typeof item === "object").map((item) => Object.fromEntries(Object.entries(item).map(([key, itemValue]) => [key, typeof itemValue === "string" ? itemValue : ""])));
|
|
3855
|
-
} catch {
|
|
3856
|
-
return fallback;
|
|
3857
|
-
}
|
|
3858
|
-
}
|
|
3859
3882
|
function fields2(...items) {
|
|
3860
3883
|
return items.map(([key, label, type]) => ({ key, label, type, required: key === "title" || key === "question" }));
|
|
3861
3884
|
}
|
|
@@ -3890,15 +3913,19 @@ var configs = [
|
|
|
3890
3913
|
listConfig("faq-section", 3, /^item\d+(Question|Answer)$/, fields2(["question", "C\xE2u h\u1ECFi", "text"], ["answer", "Tr\u1EA3 l\u1EDDi", "textarea"]), "item", ["question", "answer"])
|
|
3891
3914
|
];
|
|
3892
3915
|
function DynamicListRenderer({ base, config, ...props }) {
|
|
3893
|
-
const items =
|
|
3894
|
-
const information = config.type === "estate-project-detail" ?
|
|
3916
|
+
const items = cmsListItems(props.content, config.legacy(props.content));
|
|
3917
|
+
const information = config.type === "estate-project-detail" ? cmsListItems(props.content, [
|
|
3895
3918
|
{ label: "\u0110\u1ECBa \u0111i\u1EC3m", value: stringValue(props.content, "location") },
|
|
3896
3919
|
{ label: "Ch\u1EE7 \u0111\u1EA7u t\u01B0", value: stringValue(props.content, "client") },
|
|
3897
3920
|
{ label: "Di\u1EC7n t\xEDch", value: stringValue(props.content, "area") },
|
|
3898
3921
|
{ label: "Quy m\xF4", value: stringValue(props.content, "floors") }
|
|
3899
3922
|
]) : [];
|
|
3900
3923
|
const BaseRenderer = base.Renderer;
|
|
3901
|
-
const content =
|
|
3924
|
+
const content = {
|
|
3925
|
+
...config.apply({ ...props.content, ...information.length ? { location: information[0]?.value ?? "", client: information[1]?.value ?? "", area: information[2]?.value ?? "", floors: information[3]?.value ?? "" } : {} }, items),
|
|
3926
|
+
items: JSON.stringify(items),
|
|
3927
|
+
...config.type === "estate-project-detail" ? { information: JSON.stringify(information) } : {}
|
|
3928
|
+
};
|
|
3902
3929
|
const add = (field, list, itemFields) => (event) => {
|
|
3903
3930
|
event.preventDefault();
|
|
3904
3931
|
event.stopPropagation();
|
|
@@ -3906,12 +3933,6 @@ function DynamicListRenderer({ base, config, ...props }) {
|
|
|
3906
3933
|
};
|
|
3907
3934
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
3908
3935
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(BaseRenderer, { ...props, content }),
|
|
3909
|
-
items.length > config.count && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_Box7.default, { sx: { px: { xs: 2, md: 4 }, py: 4, bgcolor: "#FAF8F3" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_Stack5.default, { sx: { maxWidth: 1376, mx: "auto" }, spacing: 1.5, children: items.slice(config.count).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_Box7.default, { sx: { p: 2.5, border: "1px solid rgba(32,40,32,.16)" }, children: [
|
|
3910
|
-
item.image && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_Box7.default, { component: "img", src: item.image, alt: item.title || "H\xECnh \u1EA3nh", sx: { display: "block", width: 1, maxHeight: 300, objectFit: "cover", mb: 2 } }),
|
|
3911
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_Typography4.default, { sx: { fontWeight: 700 }, children: item.question || item.title || "M\u1EE5c m\u1EDBi" }),
|
|
3912
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_Typography4.default, { sx: { mt: 0.75, color: "#687067" }, children: item.answer || item.description || item.quote || item.excerpt || "" })
|
|
3913
|
-
] }, `${item.title}-${index}`)) }) }),
|
|
3914
|
-
" ",
|
|
3915
3936
|
props.editable && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_Box7.default, { sx: { px: { xs: 2, md: 4 }, pb: 3, bgcolor: "#FAF8F3" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_Stack5.default, { direction: "row", spacing: 1, children: [
|
|
3916
3937
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_Button7.default, { size: "small", variant: "outlined", onClick: add("items", items, config.fields), children: "+ Th\xEAm item" }),
|
|
3917
3938
|
config.type === "estate-project-detail" && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_Button7.default, { size: "small", variant: "outlined", onClick: add("information", information, fields2(["label", "Nh\xE3n", "text"], ["value", "Gi\xE1 tr\u1ECB", "text"])), children: "+ Th\xEAm th\xF4ng tin" })
|