x
This commit is contained in:
1 parent
ac08f4490b
commit
f8da2cceaf
8 files changed
+427
-2
No files matched your search
@@ -24,6 +24,9 @@ const WEBSITE_PAGE_SECTION_TYPE_LIST = [
|
||||
"ARTICLE_FACTS",
|
||||
"ARTICLE_VIDEO",
|
||||
"ARTICLE_REFERENCES",
|
||||
"ARTICLE_TABLE",
|
||||
"ARTICLE_DOWNLOAD",
|
||||
"ARTICLE_CTA",
|
||||
"SCENT_NOTES_BREAKDOWN",
|
||||
"QUOTE_CALLOUT",
|
||||
"PRODUCT_CAROUSEL",
|
||||
@@ -418,6 +421,55 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
items: [{ title: { th: "เอกสารข้อมูลทางเทคนิค", en: "Technical documentation" }, note: { th: "ข้อมูลจากฝ่ายวิศวกรรม", en: "Engineering source material" } }],
|
||||
},
|
||||
},
|
||||
ARTICLE_TABLE: {
|
||||
type: "ARTICLE_TABLE",
|
||||
requiredFields: ["columns", "rows", "rows[].label", "rows[].cells"],
|
||||
optionalFields: ["title", "note"],
|
||||
renderedFields: ["title", "columns", "rows", "note"],
|
||||
storedOnlyFields: [],
|
||||
discoveryToolsNeeded: [],
|
||||
warnings: ["Use 2 to 6 columns and 1 to 20 rows. Every row must contain exactly one cell per column."],
|
||||
minimalPayload: {
|
||||
columns: [{ th: "หัวข้อ", en: "Item" }, { th: "รายละเอียด", en: "Details" }],
|
||||
rows: [{ label: localizedObjectExample, cells: [localizedObjectExample, localizedObjectExample] }],
|
||||
},
|
||||
recommendedPayload: {
|
||||
title: { th: "ข้อมูลเปรียบเทียบ", en: "Comparison" },
|
||||
columns: [{ th: "คุณสมบัติ", en: "Property" }, { th: "Fine Blanking", en: "Fine blanking" }],
|
||||
rows: [{ label: { th: "ผิวตัด", en: "Cut surface" }, cells: [{ th: "ผิวตัด", en: "Cut surface" }, { th: "เรียบและสม่ำเสมอ", en: "Smooth and consistent" }] }],
|
||||
},
|
||||
},
|
||||
ARTICLE_DOWNLOAD: {
|
||||
type: "ARTICLE_DOWNLOAD",
|
||||
requiredFields: ["files", "files[].title", "files[].url"],
|
||||
optionalFields: ["title", "description", "files[].fileType", "files[].fileSize"],
|
||||
renderedFields: ["title", "description", "files"],
|
||||
storedOnlyFields: [],
|
||||
discoveryToolsNeeded: ["Use verified HTTPS document URLs from the CMS media library."],
|
||||
warnings: ["Provide 1 to 10 files. File URLs must use HTTPS."],
|
||||
minimalPayload: { files: [{ title: localizedObjectExample, url: "https://example.com/document.pdf" }] },
|
||||
recommendedPayload: {
|
||||
title: { th: "ดาวน์โหลดเอกสาร", en: "Downloads" },
|
||||
files: [{ title: { th: "ข้อมูลผลิตภัณฑ์", en: "Product specification" }, url: "https://example.com/spec.pdf", fileType: "PDF" }],
|
||||
},
|
||||
},
|
||||
ARTICLE_CTA: {
|
||||
type: "ARTICLE_CTA",
|
||||
requiredFields: ["title", "primaryText", "primaryLink"],
|
||||
optionalFields: ["description", "secondaryText", "secondaryLink", "alignment"],
|
||||
renderedFields: ["title", "description", "primaryText", "primaryLink", "secondaryText", "secondaryLink", "alignment"],
|
||||
storedOnlyFields: [],
|
||||
discoveryToolsNeeded: [],
|
||||
warnings: ["Links must be website-relative paths or HTTPS URLs. secondaryLink is required with secondaryText."],
|
||||
minimalPayload: { title: localizedObjectExample, primaryText: localizedObjectExample, primaryLink: "/contact" },
|
||||
recommendedPayload: {
|
||||
title: { th: "ต้องการข้อมูลเพิ่มเติม?", en: "Need more information?" },
|
||||
description: { th: "ติดต่อทีมงานเพื่อสอบถามรายละเอียดผลิตภัณฑ์", en: "Contact our team for product details." },
|
||||
primaryText: { th: "ติดต่อเรา", en: "Contact us" },
|
||||
primaryLink: "/contact",
|
||||
alignment: "center",
|
||||
},
|
||||
},
|
||||
SCENT_NOTES_BREAKDOWN: {
|
||||
type: "SCENT_NOTES_BREAKDOWN",
|
||||
requiredFields: [],
|
||||
@@ -667,6 +719,18 @@ const ADD_PAGE_SECTION_GUIDANCE: Record<string, { required: string[]; example: s
|
||||
required: ["items", "items[].title"],
|
||||
example: `{ "items": [{ "title": ${localizedStringExample}, "url": "https://example.com/source" }] }`
|
||||
},
|
||||
ARTICLE_TABLE: {
|
||||
required: ["columns", "rows", "rows[].label", "rows[].cells"],
|
||||
example: `{ "columns": [${localizedStringExample}, ${localizedStringExample}], "rows": [{ "label": ${localizedStringExample}, "cells": [${localizedStringExample}, ${localizedStringExample}] }] }`
|
||||
},
|
||||
ARTICLE_DOWNLOAD: {
|
||||
required: ["files", "files[].title", "files[].url"],
|
||||
example: `{ "files": [{ "title": ${localizedStringExample}, "url": "https://example.com/document.pdf", "fileType": "PDF" }] }`
|
||||
},
|
||||
ARTICLE_CTA: {
|
||||
required: ["title", "primaryText", "primaryLink"],
|
||||
example: `{ "title": ${localizedStringExample}, "primaryText": ${localizedStringExample}, "primaryLink": "/contact", "alignment": "center" }`
|
||||
},
|
||||
SCENT_NOTES_BREAKDOWN: {
|
||||
required: [],
|
||||
example: `{ "title": ${localizedStringExample}, "topNotes": ${localizedStringListExample} }`
|
||||
|
||||
Reference in new issue
Block a user