@enyxs/wikex-components 0.8.11 → 0.8.13
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.d.mts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +162 -48
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +162 -48
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
2
|
|
|
3
|
-
type CmsFieldType = "text" | "textarea" | "richText" | "image" | "link" | "number" | "select";
|
|
3
|
+
type CmsFieldType = "text" | "textarea" | "richText" | "image" | "link" | "number" | "select" | "list";
|
|
4
|
+
type CmsListItemField = {
|
|
5
|
+
key: string;
|
|
6
|
+
label: string;
|
|
7
|
+
type: "text" | "textarea" | "richText" | "link" | "image";
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
};
|
|
4
11
|
type CmsFieldDefinition = {
|
|
5
12
|
key: string;
|
|
6
13
|
label: string;
|
|
@@ -14,6 +21,7 @@ type CmsFieldDefinition = {
|
|
|
14
21
|
label: string;
|
|
15
22
|
}>;
|
|
16
23
|
hidden?: boolean;
|
|
24
|
+
itemFields?: CmsListItemField[];
|
|
17
25
|
};
|
|
18
26
|
type CmsComponentCategory = "minimal-ui" | "wikex" | "estate";
|
|
19
27
|
type CmsComponentPlacement = "header" | "content" | "footer";
|
|
@@ -55,4 +63,4 @@ declare const wikexComponents: CmsBlock[];
|
|
|
55
63
|
declare const estateComponents: CmsBlock[];
|
|
56
64
|
declare const wikexCmsBlocks: CmsBlock[];
|
|
57
65
|
|
|
58
|
-
export { type CmsBlock, type CmsComponentCategory, type CmsComponentDefinition, type CmsComponentPlacement, type CmsFieldDefinition, type CmsFieldType, type CmsRendererProps, estateBlocks, estateComponents, estateProjectPageBlocks, minimalMarketingBlocks, minimalUiBlocks, minimalUiComponents, siteChromeBlocks, wikexCmsBlocks, wikexComponents };
|
|
66
|
+
export { type CmsBlock, type CmsComponentCategory, type CmsComponentDefinition, type CmsComponentPlacement, type CmsFieldDefinition, type CmsFieldType, type CmsListItemField, type CmsRendererProps, estateBlocks, estateComponents, estateProjectPageBlocks, minimalMarketingBlocks, minimalUiBlocks, minimalUiComponents, siteChromeBlocks, wikexCmsBlocks, wikexComponents };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
2
|
|
|
3
|
-
type CmsFieldType = "text" | "textarea" | "richText" | "image" | "link" | "number" | "select";
|
|
3
|
+
type CmsFieldType = "text" | "textarea" | "richText" | "image" | "link" | "number" | "select" | "list";
|
|
4
|
+
type CmsListItemField = {
|
|
5
|
+
key: string;
|
|
6
|
+
label: string;
|
|
7
|
+
type: "text" | "textarea" | "richText" | "link" | "image";
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
};
|
|
4
11
|
type CmsFieldDefinition = {
|
|
5
12
|
key: string;
|
|
6
13
|
label: string;
|
|
@@ -14,6 +21,7 @@ type CmsFieldDefinition = {
|
|
|
14
21
|
label: string;
|
|
15
22
|
}>;
|
|
16
23
|
hidden?: boolean;
|
|
24
|
+
itemFields?: CmsListItemField[];
|
|
17
25
|
};
|
|
18
26
|
type CmsComponentCategory = "minimal-ui" | "wikex" | "estate";
|
|
19
27
|
type CmsComponentPlacement = "header" | "content" | "footer";
|
|
@@ -55,4 +63,4 @@ declare const wikexComponents: CmsBlock[];
|
|
|
55
63
|
declare const estateComponents: CmsBlock[];
|
|
56
64
|
declare const wikexCmsBlocks: CmsBlock[];
|
|
57
65
|
|
|
58
|
-
export { type CmsBlock, type CmsComponentCategory, type CmsComponentDefinition, type CmsComponentPlacement, type CmsFieldDefinition, type CmsFieldType, type CmsRendererProps, estateBlocks, estateComponents, estateProjectPageBlocks, minimalMarketingBlocks, minimalUiBlocks, minimalUiComponents, siteChromeBlocks, wikexCmsBlocks, wikexComponents };
|
|
66
|
+
export { type CmsBlock, type CmsComponentCategory, type CmsComponentDefinition, type CmsComponentPlacement, type CmsFieldDefinition, type CmsFieldType, type CmsListItemField, type CmsRendererProps, estateBlocks, estateComponents, estateProjectPageBlocks, minimalMarketingBlocks, minimalUiBlocks, minimalUiComponents, siteChromeBlocks, wikexCmsBlocks, wikexComponents };
|
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
|
|
@@ -3570,8 +3595,8 @@ function paragraphField2(key, label, group = "N\u1ED9i dung") {
|
|
|
3570
3595
|
function imageField2(key, label, group = "H\xECnh \u1EA3nh") {
|
|
3571
3596
|
return { key, label, type: "image", group };
|
|
3572
3597
|
}
|
|
3573
|
-
function estateDefinition(type, name, description, icon,
|
|
3574
|
-
return { kind: "cms-component", category: "estate", placement: "content", type, name, description, icon, fields:
|
|
3598
|
+
function estateDefinition(type, name, description, icon, fields3, defaults) {
|
|
3599
|
+
return { kind: "cms-component", category: "estate", placement: "content", type, name, description, icon, fields: fields3, defaults };
|
|
3575
3600
|
}
|
|
3576
3601
|
var archiveDefaults = {
|
|
3577
3602
|
eyebrow: "D\u1EF1 \xE1n ti\xEAu bi\u1EC3u",
|
|
@@ -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 } })
|
|
@@ -3838,6 +3872,84 @@ var estateProjectDetailBlock = {
|
|
|
3838
3872
|
};
|
|
3839
3873
|
var estateProjectPageBlocks = [estateProjectsArchiveBlock, estateProjectDetailBlock];
|
|
3840
3874
|
|
|
3875
|
+
// src/dynamic-list-blocks.tsx
|
|
3876
|
+
var import_Box7 = __toESM(require("@mui/material/Box"));
|
|
3877
|
+
var import_Button7 = __toESM(require("@mui/material/Button"));
|
|
3878
|
+
var import_Stack5 = __toESM(require("@mui/material/Stack"));
|
|
3879
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
3880
|
+
var allBlocks = [...estateBlocks, ...estateProjectPageBlocks, ...minimalMarketingBlocks];
|
|
3881
|
+
var stringValue = (content, key) => String(content[key] ?? "");
|
|
3882
|
+
function fields2(...items) {
|
|
3883
|
+
return items.map(([key, label, type]) => ({ key, label, type, required: key === "title" || key === "question" }));
|
|
3884
|
+
}
|
|
3885
|
+
function indexed(prefix, names) {
|
|
3886
|
+
return (content, items) => ({
|
|
3887
|
+
...content,
|
|
3888
|
+
...Object.fromEntries(items.slice(0, 12).flatMap((item, index) => names.map((name) => [prefix ? `${prefix}${index + 1}${name[0].toUpperCase()}${name.slice(1)}` : `${name}${index + 1}`, item[name] ?? ""])))
|
|
3889
|
+
});
|
|
3890
|
+
}
|
|
3891
|
+
function listConfig(type, count, fixedField, itemFields, prefix, names) {
|
|
3892
|
+
return {
|
|
3893
|
+
type,
|
|
3894
|
+
count,
|
|
3895
|
+
fixedField,
|
|
3896
|
+
fields: itemFields,
|
|
3897
|
+
legacy: (content) => Array.from({ length: count }, (_, index) => Object.fromEntries(names.map((name) => [name, stringValue(content, prefix ? `${prefix}${index + 1}${name[0].toUpperCase()}${name.slice(1)}` : `${name}${index + 1}`)]))),
|
|
3898
|
+
apply: indexed(prefix, names)
|
|
3899
|
+
};
|
|
3900
|
+
}
|
|
3901
|
+
var configs = [
|
|
3902
|
+
listConfig("faq", 4, /^(question|answer)\d+$/, fields2(["question", "C\xE2u h\u1ECFi", "text"], ["answer", "Tr\u1EA3 l\u1EDDi", "textarea"]), "", ["question", "answer"]),
|
|
3903
|
+
listConfig("testimonials", 3, /^(quote|author|role)\d+$/, fields2(["quote", "C\u1EA3m nh\u1EADn", "textarea"], ["author", "Kh\xE1ch h\xE0ng", "text"], ["role", "Ch\u1EE9c danh", "text"]), "", ["quote", "author", "role"]),
|
|
3904
|
+
listConfig("amenities", 6, /^amenity\d+(Title|Description)$/, fields2(["title", "T\xEAn ti\u1EC7n \xEDch", "text"], ["description", "M\xF4 t\u1EA3", "textarea"]), "amenity", ["title", "description"]),
|
|
3905
|
+
listConfig("property-gallery", 4, /^(image|caption)\d+$/, fields2(["image", "H\xECnh \u1EA3nh", "image"], ["caption", "Ch\xFA th\xEDch", "text"]), "", ["image", "caption"]),
|
|
3906
|
+
listConfig("estate-articles", 3, /^article\d+(Meta|Title|Excerpt|Label|Url)$/, fields2(["meta", "Nh\xE3n", "text"], ["title", "Ti\xEAu \u0111\u1EC1", "text"], ["excerpt", "T\xF3m t\u1EAFt", "textarea"], ["label", "Nh\xE3n li\xEAn k\u1EBFt", "text"], ["url", "\u0110\u01B0\u1EDDng d\u1EABn", "link"]), "article", ["meta", "title", "excerpt", "label", "url"]),
|
|
3907
|
+
listConfig("estate-process", 4, /^step\d+(Title|Description)$/, fields2(["title", "T\xEAn b\u01B0\u1EDBc", "text"], ["description", "M\xF4 t\u1EA3", "textarea"]), "step", ["title", "description"]),
|
|
3908
|
+
listConfig("estate-services", 4, /^service\d+(Title|Description|Label|Url)$/, fields2(["title", "T\xEAn d\u1ECBch v\u1EE5", "text"], ["description", "M\xF4 t\u1EA3", "textarea"], ["label", "Nh\xE3n li\xEAn k\u1EBFt", "text"], ["url", "\u0110\u01B0\u1EDDng d\u1EABn", "link"]), "service", ["title", "description", "label", "url"]),
|
|
3909
|
+
listConfig("featured-projects", 4, /^project\d+(Image|Type|Title|Location)$/, fields2(["image", "H\xECnh \u1EA3nh", "image"], ["type", "Lo\u1EA1i d\u1EF1 \xE1n", "text"], ["title", "T\xEAn d\u1EF1 \xE1n", "text"], ["location", "\u0110\u1ECBa \u0111i\u1EC3m", "text"]), "project", ["image", "type", "title", "location"]),
|
|
3910
|
+
listConfig("estate-projects-archive", 3, /^project\d+(Image|Type|Title|Summary|Location|Client|Scope|Year)$/, fields2(["image", "H\xECnh \u1EA3nh", "image"], ["type", "Lo\u1EA1i d\u1EF1 \xE1n", "text"], ["title", "T\xEAn d\u1EF1 \xE1n", "text"], ["summary", "M\xF4 t\u1EA3", "textarea"], ["location", "\u0110\u1ECBa \u0111i\u1EC3m", "text"], ["client", "Ch\u1EE7 \u0111\u1EA7u t\u01B0", "text"], ["scope", "Ph\u1EA1m vi", "text"], ["year", "N\u0103m", "text"]), "project", ["image", "type", "title", "summary", "location", "client", "scope", "year"]),
|
|
3911
|
+
listConfig("estate-project-detail", 3, /^gallery\d+(Image|Caption|Note)$/, fields2(["image", "H\xECnh \u1EA3nh", "image"], ["caption", "Caption", "text"], ["note", "Ghi ch\xFA", "textarea"]), "gallery", ["image", "caption", "note"]),
|
|
3912
|
+
listConfig("testimonial-grid", 3, /^item\d+(Quote|Name|Role)$/, fields2(["quote", "C\u1EA3m nh\u1EADn", "textarea"], ["name", "Kh\xE1ch h\xE0ng", "text"], ["role", "Ch\u1EE9c danh", "text"]), "item", ["quote", "name", "role"]),
|
|
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"])
|
|
3914
|
+
];
|
|
3915
|
+
function DynamicListRenderer({ base, config, ...props }) {
|
|
3916
|
+
const items = cmsListItems(props.content, config.legacy(props.content));
|
|
3917
|
+
const information = config.type === "estate-project-detail" ? cmsListItems(props.content, [
|
|
3918
|
+
{ label: "\u0110\u1ECBa \u0111i\u1EC3m", value: stringValue(props.content, "location") },
|
|
3919
|
+
{ label: "Ch\u1EE7 \u0111\u1EA7u t\u01B0", value: stringValue(props.content, "client") },
|
|
3920
|
+
{ label: "Di\u1EC7n t\xEDch", value: stringValue(props.content, "area") },
|
|
3921
|
+
{ label: "Quy m\xF4", value: stringValue(props.content, "floors") }
|
|
3922
|
+
]) : [];
|
|
3923
|
+
const BaseRenderer = base.Renderer;
|
|
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
|
+
};
|
|
3929
|
+
const add = (field, list, itemFields) => (event) => {
|
|
3930
|
+
event.preventDefault();
|
|
3931
|
+
event.stopPropagation();
|
|
3932
|
+
props.onChange?.(field, JSON.stringify([...list, Object.fromEntries(itemFields.map((itemField) => [itemField.key, itemField.key === "label" ? "M\u1EE5c m\u1EDBi" : ""]))]));
|
|
3933
|
+
};
|
|
3934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
3935
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(BaseRenderer, { ...props, content }),
|
|
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: [
|
|
3937
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_Button7.default, { size: "small", variant: "outlined", onClick: add("items", items, config.fields), children: "+ Th\xEAm item" }),
|
|
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" })
|
|
3939
|
+
] }) })
|
|
3940
|
+
] });
|
|
3941
|
+
}
|
|
3942
|
+
function createBlock(config) {
|
|
3943
|
+
const base = allBlocks.find((block) => block.definition.type === config.type);
|
|
3944
|
+
if (!base) throw new Error(`Missing list component: ${config.type}`);
|
|
3945
|
+
const defaults = { ...base.definition.defaults, items: JSON.stringify(config.legacy(base.definition.defaults)) };
|
|
3946
|
+
const detailInformation = config.type === "estate-project-detail" ? [{ key: "information", label: "Th\xF4ng tin d\u1EF1 \xE1n", type: "list", group: "Th\xF4ng tin", itemFields: fields2(["label", "Nh\xE3n", "text"], ["value", "Gi\xE1 tr\u1ECB", "text"]) }] : [];
|
|
3947
|
+
if (config.type === "estate-project-detail") defaults.information = JSON.stringify([{ label: "\u0110\u1ECBa \u0111i\u1EC3m", value: stringValue(defaults, "location") }, { label: "Ch\u1EE7 \u0111\u1EA7u t\u01B0", value: stringValue(defaults, "client") }, { label: "Di\u1EC7n t\xEDch", value: stringValue(defaults, "area") }, { label: "Quy m\xF4", value: stringValue(defaults, "floors") }]);
|
|
3948
|
+
return { definition: { ...base.definition, fields: [...base.definition.fields.filter((field) => !config.fixedField.test(field.key)), ...detailInformation, { key: "items", label: "Danh s\xE1ch", type: "list", group: "Danh s\xE1ch", itemFields: config.fields }], defaults }, Renderer: (props) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DynamicListRenderer, { ...props, base, config }) };
|
|
3949
|
+
}
|
|
3950
|
+
var dynamicListBlocks = configs.map(createBlock);
|
|
3951
|
+
var dynamicListTypes = new Set(dynamicListBlocks.map((block) => block.definition.type));
|
|
3952
|
+
|
|
3841
3953
|
// src/wikex/assets/download-section/footer-appstore-icon.svg
|
|
3842
3954
|
var footer_appstore_icon_default = 'data:image/svg+xml,<svg preserveAspectRatio="none" overflow="visible" style="display: block;" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="Icon">%0A<path id="&%2360;Path&%2362;" d="M18.7045 12.7631C18.7166 11.8432 18.9669 10.9413 19.4321 10.1412C19.8972 9.34108 20.5621 8.66885 21.3648 8.18702C20.8548 7.47597 20.1821 6.89081 19.4 6.478C18.6178 6.0652 17.7479 5.83613 16.8592 5.80898C14.9635 5.61471 13.1258 6.91644 12.1598 6.91644C11.1751 6.91644 9.68776 5.82827 8.08616 5.86044C7.05021 5.89311 6.04059 6.18722 5.15568 6.7141C4.27077 7.24099 3.54075 7.98268 3.03674 8.86691C0.853518 12.5573 2.48201 17.9809 4.57338 20.964C5.61975 22.4247 6.84264 24.0564 8.44279 23.9985C10.0086 23.9351 10.5934 23.0237 12.4835 23.0237C14.3561 23.0237 14.9048 23.9985 16.5374 23.9617C18.2176 23.9351 19.2762 22.4945 20.2859 21.02C21.0377 19.9792 21.6162 18.8288 22 17.6116C21.0238 17.2085 20.1908 16.5338 19.6048 15.6716C19.0187 14.8094 18.7056 13.7979 18.7045 12.7631Z" fill="%23F9FAFB"/>%0A<path id="&%2360;Path&%2362;_2" d="M15.621 3.84713C16.5372 2.77343 16.9885 1.39335 16.8792 0C15.4796 0.143519 14.1867 0.796596 13.2582 1.82911C12.8043 2.33351 12.4566 2.92033 12.235 3.55601C12.0135 4.19168 11.9224 4.86375 11.9671 5.5338C12.6672 5.54084 13.3597 5.3927 13.9927 5.10054C14.6256 4.80838 15.1824 4.37982 15.621 3.84713Z" fill="%23F9FAFB"/>%0A</g>%0A</svg>%0A';
|
|
3843
3955
|
|
|
@@ -3867,7 +3979,7 @@ var downloadAssets = {
|
|
|
3867
3979
|
};
|
|
3868
3980
|
|
|
3869
3981
|
// src/wikex/download-section.tsx
|
|
3870
|
-
var
|
|
3982
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
3871
3983
|
var value5 = (content, key) => content[key];
|
|
3872
3984
|
var inlineEditableSx = {
|
|
3873
3985
|
color: "inherit",
|
|
@@ -3893,16 +4005,16 @@ function DownloadSection({
|
|
|
3893
4005
|
const source = String(value5(content, key) ?? "");
|
|
3894
4006
|
return source && !source.startsWith("/landing-assets/") ? source : fallback;
|
|
3895
4007
|
};
|
|
3896
|
-
return /* @__PURE__ */ (0,
|
|
4008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { "data-wikex-download": true, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
3897
4009
|
"section",
|
|
3898
4010
|
{
|
|
3899
4011
|
className: "download section",
|
|
3900
4012
|
id: String(value5(content, "anchorId") ?? "download"),
|
|
3901
4013
|
children: [
|
|
3902
|
-
/* @__PURE__ */ (0,
|
|
3903
|
-
/* @__PURE__ */ (0,
|
|
3904
|
-
/* @__PURE__ */ (0,
|
|
3905
|
-
/* @__PURE__ */ (0,
|
|
4014
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("style", { children: compatibleStyles }),
|
|
4015
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "container download-card", children: [
|
|
4016
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "download-copy", children: [
|
|
4017
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { className: "download-mobile-title", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
3906
4018
|
EditableText,
|
|
3907
4019
|
{
|
|
3908
4020
|
component: "span",
|
|
@@ -3913,9 +4025,9 @@ function DownloadSection({
|
|
|
3913
4025
|
sx: inlineEditableSx
|
|
3914
4026
|
}
|
|
3915
4027
|
) }),
|
|
3916
|
-
/* @__PURE__ */ (0,
|
|
3917
|
-
/* @__PURE__ */ (0,
|
|
3918
|
-
/* @__PURE__ */ (0,
|
|
4028
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "download-offer-row", children: [
|
|
4029
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "reward", children: [
|
|
4030
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { className: "download-desktop-title", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
3919
4031
|
EditableText,
|
|
3920
4032
|
{
|
|
3921
4033
|
component: "span",
|
|
@@ -3926,8 +4038,8 @@ function DownloadSection({
|
|
|
3926
4038
|
sx: inlineEditableSx
|
|
3927
4039
|
}
|
|
3928
4040
|
) }),
|
|
3929
|
-
/* @__PURE__ */ (0,
|
|
3930
|
-
/* @__PURE__ */ (0,
|
|
4041
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "reward-amount", children: [
|
|
4042
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
3931
4043
|
EditableText,
|
|
3932
4044
|
{
|
|
3933
4045
|
component: "span",
|
|
@@ -3938,7 +4050,7 @@ function DownloadSection({
|
|
|
3938
4050
|
sx: inlineEditableSx
|
|
3939
4051
|
}
|
|
3940
4052
|
),
|
|
3941
|
-
/* @__PURE__ */ (0,
|
|
4053
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
3942
4054
|
EditableText,
|
|
3943
4055
|
{
|
|
3944
4056
|
component: "span",
|
|
@@ -3950,8 +4062,8 @@ function DownloadSection({
|
|
|
3950
4062
|
}
|
|
3951
4063
|
)
|
|
3952
4064
|
] }),
|
|
3953
|
-
/* @__PURE__ */ (0,
|
|
3954
|
-
/* @__PURE__ */ (0,
|
|
4065
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "reward-divider", "aria-hidden": "true" }),
|
|
4066
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
3955
4067
|
EditableText,
|
|
3956
4068
|
{
|
|
3957
4069
|
component: "span",
|
|
@@ -3963,9 +4075,9 @@ function DownloadSection({
|
|
|
3963
4075
|
}
|
|
3964
4076
|
) })
|
|
3965
4077
|
] }),
|
|
3966
|
-
/* @__PURE__ */ (0,
|
|
3967
|
-
/* @__PURE__ */ (0,
|
|
3968
|
-
/* @__PURE__ */ (0,
|
|
4078
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "download-qr-links", children: [
|
|
4079
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "download-qr", children: [
|
|
4080
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
3969
4081
|
EditableText,
|
|
3970
4082
|
{
|
|
3971
4083
|
component: "span",
|
|
@@ -3976,7 +4088,7 @@ function DownloadSection({
|
|
|
3976
4088
|
sx: inlineEditableSx
|
|
3977
4089
|
}
|
|
3978
4090
|
),
|
|
3979
|
-
/* @__PURE__ */ (0,
|
|
4091
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
3980
4092
|
"img",
|
|
3981
4093
|
{
|
|
3982
4094
|
src: image("qrImage", downloadAssets.downloadQr),
|
|
@@ -3984,16 +4096,16 @@ function DownloadSection({
|
|
|
3984
4096
|
}
|
|
3985
4097
|
) })
|
|
3986
4098
|
] }),
|
|
3987
|
-
/* @__PURE__ */ (0,
|
|
4099
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "download-links", children: badges.map(([platform, icon]) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
3988
4100
|
"a",
|
|
3989
4101
|
{
|
|
3990
4102
|
className: `download-badge download-badge--${platform === "appStore" ? "apple" : platform === "googlePlay" ? "google" : "web"}`,
|
|
3991
4103
|
href: String(value5(content, `${platform}Link`) ?? "#"),
|
|
3992
4104
|
"aria-label": String(value5(content, `${platform}Alt`) ?? ""),
|
|
3993
4105
|
children: [
|
|
3994
|
-
/* @__PURE__ */ (0,
|
|
3995
|
-
/* @__PURE__ */ (0,
|
|
3996
|
-
/* @__PURE__ */ (0,
|
|
4106
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("img", { src: image(`${platform}Icon`, icon), alt: "" }),
|
|
4107
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "download-badge-copy", children: [
|
|
4108
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
3997
4109
|
EditableText,
|
|
3998
4110
|
{
|
|
3999
4111
|
component: "span",
|
|
@@ -4004,7 +4116,7 @@ function DownloadSection({
|
|
|
4004
4116
|
sx: inlineEditableSx
|
|
4005
4117
|
}
|
|
4006
4118
|
) }),
|
|
4007
|
-
/* @__PURE__ */ (0,
|
|
4119
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("strong", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
4008
4120
|
EditableText,
|
|
4009
4121
|
{
|
|
4010
4122
|
component: "span",
|
|
@@ -4023,21 +4135,21 @@ function DownloadSection({
|
|
|
4023
4135
|
] })
|
|
4024
4136
|
] })
|
|
4025
4137
|
] }),
|
|
4026
|
-
/* @__PURE__ */ (0,
|
|
4138
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
4027
4139
|
"div",
|
|
4028
4140
|
{
|
|
4029
4141
|
className: "download-devices",
|
|
4030
4142
|
"aria-label": String(value5(content, "devicesAlt") ?? ""),
|
|
4031
4143
|
children: [
|
|
4032
|
-
/* @__PURE__ */ (0,
|
|
4144
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "download-laptop", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
4033
4145
|
"img",
|
|
4034
4146
|
{
|
|
4035
4147
|
src: image("laptopImage", downloadAssets.laptopImage),
|
|
4036
4148
|
alt: ""
|
|
4037
4149
|
}
|
|
4038
4150
|
) }),
|
|
4039
|
-
/* @__PURE__ */ (0,
|
|
4040
|
-
editable && /* @__PURE__ */ (0,
|
|
4151
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "download-phone", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("img", { src: image("phoneImage", downloadAssets.phoneImage), alt: "" }) }),
|
|
4152
|
+
editable && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
4041
4153
|
"button",
|
|
4042
4154
|
{
|
|
4043
4155
|
className: "download-replace",
|
|
@@ -4205,8 +4317,10 @@ var wikexComponents = [downloadSectionBlock];
|
|
|
4205
4317
|
var estateComponents = [...estateBlocks, ...estateProjectPageBlocks];
|
|
4206
4318
|
var wikexCmsBlocks = [
|
|
4207
4319
|
...wikexComponents,
|
|
4208
|
-
...estateComponents,
|
|
4209
|
-
|
|
4320
|
+
...[...estateComponents, ...minimalUiComponents].filter(
|
|
4321
|
+
(block) => !dynamicListTypes.has(block.definition.type)
|
|
4322
|
+
),
|
|
4323
|
+
...dynamicListBlocks
|
|
4210
4324
|
];
|
|
4211
4325
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4212
4326
|
0 && (module.exports = {
|