diff --git a/lib/pdf-datasheet.tsx b/lib/pdf-datasheet.tsx index 30a37145..58b43a88 100644 --- a/lib/pdf-datasheet.tsx +++ b/lib/pdf-datasheet.tsx @@ -21,234 +21,149 @@ Font.register({ // Industrial/technical/restrained design - STYLEGUIDE.md compliant const styles = StyleSheet.create({ page: { - // Large margins for engineering documentation feel. - // Extra bottom padding reserves space for the fixed footer so content - // (esp. long descriptions) doesn't render underneath it. - paddingTop: 72, - paddingLeft: 72, - paddingRight: 72, - paddingBottom: 140, + color: '#111827', // Text Primary + lineHeight: 1.5, + backgroundColor: '#FFFFFF', + paddingTop: 0, + paddingBottom: 100, fontFamily: 'Helvetica', - fontSize: 10, - color: '#1F2933', // Dark gray text - lineHeight: 1.5, // Generous line height - backgroundColor: '#F8F9FA', // Almost white background }, - // Engineering documentation header + // Hero-style header + hero: { + backgroundColor: '#FFFFFF', + paddingTop: 24, + paddingBottom: 0, + paddingHorizontal: 72, + marginBottom: 20, + position: 'relative', + borderBottomWidth: 0, + borderBottomColor: '#e5e7eb', + }, + header: { flexDirection: 'row', justifyContent: 'space-between', - alignItems: 'flex-start', - marginBottom: 48, // Large spacing - paddingBottom: 24, - borderBottom: '2px solid #E6E9ED', // Light gray separator - }, - - // Logo area - industrial style - logoArea: { - flexDirection: 'column', - alignItems: 'flex-start', - }, - - // Optional image logo container (keeps header height stable) - logoContainer: { - width: 120, - height: 32, - justifyContent: 'center', - }, - - // Image logo (preferred when available) - logo: { - width: 110, - height: 28, - objectFit: 'contain', + alignItems: 'center', + marginBottom: 16, }, logoText: { - fontSize: 20, + fontSize: 24, fontWeight: 700, - color: '#0E2A47', // Dark navy + color: '#000d26', letterSpacing: 1, textTransform: 'uppercase', }, - logoSubtext: { - fontSize: 10, - fontWeight: 400, - color: '#6B7280', // Medium gray - letterSpacing: 0.5, - marginTop: 2, - }, - - // Document info - technical style - docInfo: { - textAlign: 'right', - alignItems: 'flex-end', - }, - docTitle: { - fontSize: 16, + fontSize: 10, fontWeight: 700, - color: '#0E2A47', // Dark navy - marginBottom: 8, - letterSpacing: 0.5, + color: '#001a4d', + letterSpacing: 2, textTransform: 'uppercase', }, - skuContainer: { - backgroundColor: '#E6E9ED', // Light gray background - paddingHorizontal: 16, - paddingVertical: 8, - border: '1px solid #E6E9ED', + productRow: { + flexDirection: 'row', + alignItems: 'center', + gap: 20, + }, + productInfoCol: { + flex: 1, + justifyContent: 'center', + }, + productImageCol: { + flex: 1, + height: 120, + justifyContent: 'center', + alignItems: 'center', + borderRadius: 8, + borderWidth: 1, + borderColor: '#e5e7eb', + backgroundColor: '#FFFFFF', + overflow: 'hidden', }, - skuLabel: { - fontSize: 8, - color: '#6B7280', // Medium gray - textTransform: 'uppercase', - letterSpacing: 0.5, - marginBottom: 4, - }, - - skuValue: { - fontSize: 14, - fontWeight: 700, - color: '#0E2A47', // Dark navy - }, - - // Product section - technical specification style - productSection: { - marginBottom: 40, - backgroundColor: '#FFFFFF', // White background for content blocks - padding: 24, - border: '1px solid #E6E9ED', + // Product Hero Info + productHero: { + marginTop: 0, }, productName: { fontSize: 24, fontWeight: 700, - color: '#0E2A47', // Dark navy - marginBottom: 12, - lineHeight: 1.2, + color: '#000d26', + marginBottom: 0, textTransform: 'uppercase', - letterSpacing: 0.5, + letterSpacing: -0.5, }, productMeta: { - fontSize: 12, - color: '#6B7280', // Medium gray - fontWeight: 500, + fontSize: 10, + color: '#4b5563', + fontWeight: 700, + textTransform: 'uppercase', + letterSpacing: 1, }, - // Content sections - rectangular blocks + heroImage: { + width: '100%', + height: '100%', + objectFit: 'contain', + }, + + noImage: { + fontSize: 8, + color: '#9ca3af', + textAlign: 'center', + }, + + // Content Area + content: { + paddingHorizontal: 72, + }, + + // Content sections section: { - marginBottom: 32, - backgroundColor: '#FFFFFF', - padding: 24, - border: '1px solid #E6E9ED', + marginBottom: 20, }, sectionTitle: { fontSize: 14, fontWeight: 700, - color: '#0E2A47', // Dark navy - marginBottom: 16, - letterSpacing: 0.5, + color: '#000d26', // Primary Dark + marginBottom: 8, textTransform: 'uppercase', - borderBottom: '1px solid #E6E9ED', - paddingBottom: 8, + letterSpacing: -0.2, + }, + + sectionAccent: { + width: 30, + height: 3, + backgroundColor: '#82ed20', // Accent Green + marginBottom: 8, + borderRadius: 1.5, }, - // Description - technical documentation style description: { - fontSize: 10, - lineHeight: 1.6, - color: '#1F2933', // Dark gray text - marginBottom: 0, + fontSize: 11, + lineHeight: 1.7, + color: '#4b5563', // Text Secondary }, - // Cross-section table - engineering specification style - table: { - marginTop: 16, - borderWidth: 1, - borderColor: '#E6E9ED', - }, - - tableHeader: { - flexDirection: 'row', - backgroundColor: '#E6E9ED', - borderBottomWidth: 1, - borderBottomColor: '#E6E9ED', - }, - - tableHeaderCell: { - flex: 1, - padding: 8, - fontSize: 10, - fontWeight: 700, - color: '#0E2A47', - textTransform: 'uppercase', - letterSpacing: 0.3, - }, - - tableHeaderCellLast: { - borderRightWidth: 0, - }, - - tableHeaderCellWithDivider: { - borderRightWidth: 1, - borderRightColor: '#E6E9ED', - }, - - tableRow: { - flexDirection: 'row', - borderBottomWidth: 1, - borderBottomColor: '#E6E9ED', - }, - - tableCell: { - flex: 1, - padding: 8, - fontSize: 10, - color: '#1F2933', - }, - - tableCellLast: { - borderRightWidth: 0, - }, - - tableCellWithDivider: { - borderRightWidth: 1, - borderRightColor: '#E6E9ED', - }, - - tableRowAlt: { - backgroundColor: '#F8F9FA', - }, - - // Specifications - technical data style - specsContainer: { - flexDirection: 'row', - flexWrap: 'wrap', - }, - - // Backwards-compatible alias used by the component markup - specsGrid: { - flexDirection: 'row', - flexWrap: 'wrap', - }, - - // Technical data table (used for the metagrid) + // Technical data table specsTable: { - borderWidth: 1, - borderColor: '#E6E9ED', + marginTop: 8, + border: '1px solid #e5e7eb', + borderRadius: 8, + overflow: 'hidden', }, specsTableRow: { flexDirection: 'row', borderBottomWidth: 1, - borderBottomColor: '#E6E9ED', + borderBottomColor: '#e5e7eb', }, specsTableRowLast: { @@ -256,63 +171,35 @@ const styles = StyleSheet.create({ }, specsTableLabelCell: { - flex: 3, - paddingVertical: 8, - paddingHorizontal: 8, - backgroundColor: '#F8F9FA', + flex: 1, + paddingVertical: 4, + paddingHorizontal: 16, + backgroundColor: '#f8f9fa', borderRightWidth: 1, - borderRightColor: '#E6E9ED', - justifyContent: 'center', + borderRightColor: '#e5e7eb', }, specsTableValueCell: { - flex: 4, - paddingVertical: 8, - paddingHorizontal: 8, - justifyContent: 'center', + flex: 1, + paddingVertical: 4, + paddingHorizontal: 16, }, specsTableLabelText: { fontSize: 9, fontWeight: 700, - color: '#0E2A47', + color: '#000d26', textTransform: 'uppercase', - letterSpacing: 0.3, - lineHeight: 1.2, + letterSpacing: 0.5, }, specsTableValueText: { fontSize: 10, - color: '#1F2933', - lineHeight: 1.4, + color: '#111827', + fontWeight: 500, }, - specColumn: { - width: '48%', - marginRight: '4%', - marginBottom: 16, - }, - - specItem: { - marginBottom: 12, - }, - - specLabel: { - fontSize: 9, - fontWeight: 700, - color: '#0E2A47', - marginBottom: 4, - textTransform: 'uppercase', - letterSpacing: 0.3, - }, - - specValue: { - fontSize: 10, - color: '#1F2933', - lineHeight: 1.4, - }, - - // Categories - technical classification + // Categories categories: { flexDirection: 'row', flexWrap: 'wrap', @@ -320,42 +207,48 @@ const styles = StyleSheet.create({ }, categoryTag: { - backgroundColor: '#E6E9ED', + backgroundColor: '#f8f9fa', paddingHorizontal: 12, paddingVertical: 6, - border: '1px solid #E6E9ED', + border: '1px solid #e5e7eb', + borderRadius: 100, }, categoryText: { - fontSize: 9, - color: '#6B7280', - fontWeight: 500, + fontSize: 8, + color: '#4b5563', + fontWeight: 700, textTransform: 'uppercase', - letterSpacing: 0.3, + letterSpacing: 0.5, }, - // Engineering documentation footer + // Footer footer: { position: 'absolute', - bottom: 48, + bottom: 40, left: 72, right: 72, flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', paddingTop: 24, - borderTop: '2px solid #E6E9ED', - fontSize: 9, - color: '#6B7280', + borderTop: '1px solid #e5e7eb', }, - footerLeft: { + footerText: { + fontSize: 8, + color: '#9ca3af', + fontWeight: 500, + textTransform: 'uppercase', + letterSpacing: 1, + }, + + footerBrand: { + fontSize: 10, fontWeight: 700, - color: '#0E2A47', - }, - - footerRight: { - color: '#6B7280', + color: '#000d26', + textTransform: 'uppercase', + letterSpacing: 1, }, }); @@ -364,6 +257,7 @@ interface ProductData { name: string; shortDescriptionHtml: string; descriptionHtml: string; + applicationHtml?: string; images: string[]; featuredImage: string | null; sku: string; @@ -418,99 +312,101 @@ export const PDFDatasheet: React.FC = ({ return ( - {/* Clean, minimal header */} - - - - {logoUrl ? ( - /* eslint-disable-next-line jsx-a11y/alt-text */ - - ) : ( - - KLZ - Cables - - )} + {/* Hero Header */} + + + + KLZ - - - {labels.productDatasheet} - - {labels.sku} - {product.sku} - - - {/* Product section - clean and prominent */} - - {product.name} - - {product.categories.map(cat => cat.name).join(' • ')} - - - - {/* Description section */} - {(product.shortDescriptionHtml || product.descriptionHtml) && ( - - {labels.description} - - {stripHtml(product.shortDescriptionHtml || product.descriptionHtml)} - - - )} - - {/* Technical specifications */} - {product.attributes && product.attributes.length > 0 && ( - - {labels.specifications} - - {product.attributes.map((attr, index) => ( - - - {attr.name} - - - - {attr.options.join(', ')} + + + + + {product.categories.map((cat, index) => ( + + {cat.name}{index < product.categories.length - 1 ? ' • ' : ''} - + ))} - ))} + {product.name} + + + + {product.featuredImage ? ( + + ) : ( + {labels.noImage} + )} - )} + - {/* Categories as clean tags */} - {product.categories && product.categories.length > 0 && ( - - {labels.categories} - - {product.categories.map((cat, index) => ( - - {cat.name} - - ))} + + {/* Description section */} + {(product.applicationHtml || product.shortDescriptionHtml || product.descriptionHtml) && ( + + {labels.description} + + + {stripHtml(product.applicationHtml || product.shortDescriptionHtml || product.descriptionHtml)} + - - )} + )} + + {/* Technical specifications */} + {product.attributes && product.attributes.length > 0 && ( + + {labels.specifications} + + + {product.attributes.map((attr, index) => ( + + + {attr.name} + + + + {attr.options.join(', ')} + + + + ))} + + + )} + + {/* Categories as clean tags */} + {product.categories && product.categories.length > 0 && ( + + {labels.categories} + + + {product.categories.map((cat, index) => ( + + {cat.name} + + ))} + + + )} + {/* Minimal footer */} - - {labels.sku}: {product.sku} - - + KLZ CABLES + {new Date().toLocaleDateString(locale === 'en' ? 'en-US' : 'de-DE', { year: 'numeric', month: 'long', diff --git a/public/datasheets/high-voltage/n2xfk2y-de.pdf b/public/datasheets/high-voltage/n2xfk2y-de.pdf index 185c16ca..6db9ba2f 100644 Binary files a/public/datasheets/high-voltage/n2xfk2y-de.pdf and b/public/datasheets/high-voltage/n2xfk2y-de.pdf differ diff --git a/public/datasheets/high-voltage/n2xfk2y-en.pdf b/public/datasheets/high-voltage/n2xfk2y-en.pdf index f457a903..22df457e 100644 Binary files a/public/datasheets/high-voltage/n2xfk2y-en.pdf and b/public/datasheets/high-voltage/n2xfk2y-en.pdf differ diff --git a/public/datasheets/high-voltage/n2xfkld2y-de.pdf b/public/datasheets/high-voltage/n2xfkld2y-de.pdf index 0fb81960..06f68580 100644 Binary files a/public/datasheets/high-voltage/n2xfkld2y-de.pdf and b/public/datasheets/high-voltage/n2xfkld2y-de.pdf differ diff --git a/public/datasheets/high-voltage/n2xfkld2y-en.pdf b/public/datasheets/high-voltage/n2xfkld2y-en.pdf index fa859e57..3f9e7b77 100644 Binary files a/public/datasheets/high-voltage/n2xfkld2y-en.pdf and b/public/datasheets/high-voltage/n2xfkld2y-en.pdf differ diff --git a/public/datasheets/high-voltage/na2xfk2y-de.pdf b/public/datasheets/high-voltage/na2xfk2y-de.pdf index 6b1e4422..d141c504 100644 Binary files a/public/datasheets/high-voltage/na2xfk2y-de.pdf and b/public/datasheets/high-voltage/na2xfk2y-de.pdf differ diff --git a/public/datasheets/high-voltage/na2xfk2y-en.pdf b/public/datasheets/high-voltage/na2xfk2y-en.pdf index 6dd3735d..8733e575 100644 Binary files a/public/datasheets/high-voltage/na2xfk2y-en.pdf and b/public/datasheets/high-voltage/na2xfk2y-en.pdf differ diff --git a/public/datasheets/high-voltage/na2xfkld2y-de.pdf b/public/datasheets/high-voltage/na2xfkld2y-de.pdf index 0dfd41cd..044b8d71 100644 Binary files a/public/datasheets/high-voltage/na2xfkld2y-de.pdf and b/public/datasheets/high-voltage/na2xfkld2y-de.pdf differ diff --git a/public/datasheets/high-voltage/na2xfkld2y-en.pdf b/public/datasheets/high-voltage/na2xfkld2y-en.pdf index 92729be4..96a122a3 100644 Binary files a/public/datasheets/high-voltage/na2xfkld2y-en.pdf and b/public/datasheets/high-voltage/na2xfkld2y-en.pdf differ diff --git a/public/datasheets/low-voltage/n2x2y-de.pdf b/public/datasheets/low-voltage/n2x2y-de.pdf index efe8aff9..44f77096 100644 Binary files a/public/datasheets/low-voltage/n2x2y-de.pdf and b/public/datasheets/low-voltage/n2x2y-de.pdf differ diff --git a/public/datasheets/low-voltage/n2x2y-en.pdf b/public/datasheets/low-voltage/n2x2y-en.pdf index b249cdb6..399ca231 100644 Binary files a/public/datasheets/low-voltage/n2x2y-en.pdf and b/public/datasheets/low-voltage/n2x2y-en.pdf differ diff --git a/public/datasheets/low-voltage/n2xy-de.pdf b/public/datasheets/low-voltage/n2xy-de.pdf index a60d4ea4..caa490ba 100644 Binary files a/public/datasheets/low-voltage/n2xy-de.pdf and b/public/datasheets/low-voltage/n2xy-de.pdf differ diff --git a/public/datasheets/low-voltage/n2xy-en.pdf b/public/datasheets/low-voltage/n2xy-en.pdf index 4a3d5bca..4de0d0b0 100644 Binary files a/public/datasheets/low-voltage/n2xy-en.pdf and b/public/datasheets/low-voltage/n2xy-en.pdf differ diff --git a/public/datasheets/low-voltage/na2x2y-de.pdf b/public/datasheets/low-voltage/na2x2y-de.pdf index 6e8ef378..cde0cd65 100644 Binary files a/public/datasheets/low-voltage/na2x2y-de.pdf and b/public/datasheets/low-voltage/na2x2y-de.pdf differ diff --git a/public/datasheets/low-voltage/na2x2y-en.pdf b/public/datasheets/low-voltage/na2x2y-en.pdf index be38b95e..98db771e 100644 Binary files a/public/datasheets/low-voltage/na2x2y-en.pdf and b/public/datasheets/low-voltage/na2x2y-en.pdf differ diff --git a/public/datasheets/low-voltage/na2xy-de.pdf b/public/datasheets/low-voltage/na2xy-de.pdf index 5f54e137..8b8e1889 100644 Binary files a/public/datasheets/low-voltage/na2xy-de.pdf and b/public/datasheets/low-voltage/na2xy-de.pdf differ diff --git a/public/datasheets/low-voltage/na2xy-en.pdf b/public/datasheets/low-voltage/na2xy-en.pdf index ead416d1..3cf49840 100644 Binary files a/public/datasheets/low-voltage/na2xy-en.pdf and b/public/datasheets/low-voltage/na2xy-en.pdf differ diff --git a/public/datasheets/low-voltage/nay2y-de.pdf b/public/datasheets/low-voltage/nay2y-de.pdf index 3c9b0f6c..80f2afca 100644 Binary files a/public/datasheets/low-voltage/nay2y-de.pdf and b/public/datasheets/low-voltage/nay2y-de.pdf differ diff --git a/public/datasheets/low-voltage/nay2y-en.pdf b/public/datasheets/low-voltage/nay2y-en.pdf index 8ed286b6..c806c3d0 100644 Binary files a/public/datasheets/low-voltage/nay2y-en.pdf and b/public/datasheets/low-voltage/nay2y-en.pdf differ diff --git a/public/datasheets/low-voltage/naycwy-de.pdf b/public/datasheets/low-voltage/naycwy-de.pdf index 291c82e8..a810c499 100644 Binary files a/public/datasheets/low-voltage/naycwy-de.pdf and b/public/datasheets/low-voltage/naycwy-de.pdf differ diff --git a/public/datasheets/low-voltage/naycwy-en.pdf b/public/datasheets/low-voltage/naycwy-en.pdf index ea823019..073790fd 100644 Binary files a/public/datasheets/low-voltage/naycwy-en.pdf and b/public/datasheets/low-voltage/naycwy-en.pdf differ diff --git a/public/datasheets/low-voltage/nayy-de.pdf b/public/datasheets/low-voltage/nayy-de.pdf index b9690254..c434a951 100644 Binary files a/public/datasheets/low-voltage/nayy-de.pdf and b/public/datasheets/low-voltage/nayy-de.pdf differ diff --git a/public/datasheets/low-voltage/nayy-en.pdf b/public/datasheets/low-voltage/nayy-en.pdf index e92db06d..bff17814 100644 Binary files a/public/datasheets/low-voltage/nayy-en.pdf and b/public/datasheets/low-voltage/nayy-en.pdf differ diff --git a/public/datasheets/low-voltage/ny2y-de.pdf b/public/datasheets/low-voltage/ny2y-de.pdf index 18db6aec..6917bea5 100644 Binary files a/public/datasheets/low-voltage/ny2y-de.pdf and b/public/datasheets/low-voltage/ny2y-de.pdf differ diff --git a/public/datasheets/low-voltage/ny2y-en.pdf b/public/datasheets/low-voltage/ny2y-en.pdf index 60998593..ab0b6bfc 100644 Binary files a/public/datasheets/low-voltage/ny2y-en.pdf and b/public/datasheets/low-voltage/ny2y-en.pdf differ diff --git a/public/datasheets/low-voltage/nycwy-de.pdf b/public/datasheets/low-voltage/nycwy-de.pdf index 1100871f..1eeebf5b 100644 Binary files a/public/datasheets/low-voltage/nycwy-de.pdf and b/public/datasheets/low-voltage/nycwy-de.pdf differ diff --git a/public/datasheets/low-voltage/nycwy-en.pdf b/public/datasheets/low-voltage/nycwy-en.pdf index e2def81c..80ecd807 100644 Binary files a/public/datasheets/low-voltage/nycwy-en.pdf and b/public/datasheets/low-voltage/nycwy-en.pdf differ diff --git a/public/datasheets/low-voltage/nyy-de.pdf b/public/datasheets/low-voltage/nyy-de.pdf index f8facd80..4c9a0dda 100644 Binary files a/public/datasheets/low-voltage/nyy-de.pdf and b/public/datasheets/low-voltage/nyy-de.pdf differ diff --git a/public/datasheets/low-voltage/nyy-en.pdf b/public/datasheets/low-voltage/nyy-en.pdf index e7b14eee..1c7b7253 100644 Binary files a/public/datasheets/low-voltage/nyy-en.pdf and b/public/datasheets/low-voltage/nyy-en.pdf differ diff --git a/public/datasheets/medium-voltage/n2xs2y-de.pdf b/public/datasheets/medium-voltage/n2xs2y-de.pdf index 892da72a..453e0c86 100644 Binary files a/public/datasheets/medium-voltage/n2xs2y-de.pdf and b/public/datasheets/medium-voltage/n2xs2y-de.pdf differ diff --git a/public/datasheets/medium-voltage/n2xs2y-en.pdf b/public/datasheets/medium-voltage/n2xs2y-en.pdf index c7559cc6..b6ec3050 100644 Binary files a/public/datasheets/medium-voltage/n2xs2y-en.pdf and b/public/datasheets/medium-voltage/n2xs2y-en.pdf differ diff --git a/public/datasheets/medium-voltage/n2xsf2y-de.pdf b/public/datasheets/medium-voltage/n2xsf2y-de.pdf index 6b8997d1..21800df7 100644 Binary files a/public/datasheets/medium-voltage/n2xsf2y-de.pdf and b/public/datasheets/medium-voltage/n2xsf2y-de.pdf differ diff --git a/public/datasheets/medium-voltage/n2xsf2y-en.pdf b/public/datasheets/medium-voltage/n2xsf2y-en.pdf index 748d6ef9..7b3498cd 100644 Binary files a/public/datasheets/medium-voltage/n2xsf2y-en.pdf and b/public/datasheets/medium-voltage/n2xsf2y-en.pdf differ diff --git a/public/datasheets/medium-voltage/n2xsfl2y-mv-de.pdf b/public/datasheets/medium-voltage/n2xsfl2y-mv-de.pdf new file mode 100644 index 00000000..9ebfb737 Binary files /dev/null and b/public/datasheets/medium-voltage/n2xsfl2y-mv-de.pdf differ diff --git a/public/datasheets/medium-voltage/n2xsfl2y-mv-en.pdf b/public/datasheets/medium-voltage/n2xsfl2y-mv-en.pdf new file mode 100644 index 00000000..c50d3935 Binary files /dev/null and b/public/datasheets/medium-voltage/n2xsfl2y-mv-en.pdf differ diff --git a/public/datasheets/medium-voltage/n2xsy-de.pdf b/public/datasheets/medium-voltage/n2xsy-de.pdf index b5973f7e..42beb951 100644 Binary files a/public/datasheets/medium-voltage/n2xsy-de.pdf and b/public/datasheets/medium-voltage/n2xsy-de.pdf differ diff --git a/public/datasheets/medium-voltage/n2xsy-en.pdf b/public/datasheets/medium-voltage/n2xsy-en.pdf index 27bc49b3..a28dde7f 100644 Binary files a/public/datasheets/medium-voltage/n2xsy-en.pdf and b/public/datasheets/medium-voltage/n2xsy-en.pdf differ diff --git a/public/datasheets/medium-voltage/na2xs2y-de.pdf b/public/datasheets/medium-voltage/na2xs2y-de.pdf index c060398f..d93983eb 100644 Binary files a/public/datasheets/medium-voltage/na2xs2y-de.pdf and b/public/datasheets/medium-voltage/na2xs2y-de.pdf differ diff --git a/public/datasheets/medium-voltage/na2xs2y-en.pdf b/public/datasheets/medium-voltage/na2xs2y-en.pdf index b0806cf3..3fd1ad27 100644 Binary files a/public/datasheets/medium-voltage/na2xs2y-en.pdf and b/public/datasheets/medium-voltage/na2xs2y-en.pdf differ diff --git a/public/datasheets/medium-voltage/na2xsf2y-de.pdf b/public/datasheets/medium-voltage/na2xsf2y-de.pdf index 6c518a36..d51a275a 100644 Binary files a/public/datasheets/medium-voltage/na2xsf2y-de.pdf and b/public/datasheets/medium-voltage/na2xsf2y-de.pdf differ diff --git a/public/datasheets/medium-voltage/na2xsf2y-en.pdf b/public/datasheets/medium-voltage/na2xsf2y-en.pdf index eb2df5ca..d5a79431 100644 Binary files a/public/datasheets/medium-voltage/na2xsf2y-en.pdf and b/public/datasheets/medium-voltage/na2xsf2y-en.pdf differ diff --git a/public/datasheets/medium-voltage/na2xsfl2y-mv-de.pdf b/public/datasheets/medium-voltage/na2xsfl2y-mv-de.pdf new file mode 100644 index 00000000..4d949c01 Binary files /dev/null and b/public/datasheets/medium-voltage/na2xsfl2y-mv-de.pdf differ diff --git a/public/datasheets/medium-voltage/na2xsfl2y-mv-en.pdf b/public/datasheets/medium-voltage/na2xsfl2y-mv-en.pdf new file mode 100644 index 00000000..9d0024ed Binary files /dev/null and b/public/datasheets/medium-voltage/na2xsfl2y-mv-en.pdf differ diff --git a/public/datasheets/medium-voltage/na2xsy-de.pdf b/public/datasheets/medium-voltage/na2xsy-de.pdf index afeb3e9d..0c1d2c82 100644 Binary files a/public/datasheets/medium-voltage/na2xsy-de.pdf and b/public/datasheets/medium-voltage/na2xsy-de.pdf differ diff --git a/public/datasheets/medium-voltage/na2xsy-en.pdf b/public/datasheets/medium-voltage/na2xsy-en.pdf index e6b996c5..9e9ae55e 100644 Binary files a/public/datasheets/medium-voltage/na2xsy-en.pdf and b/public/datasheets/medium-voltage/na2xsy-en.pdf differ diff --git a/public/datasheets/solar/h1z2z2-k-de.pdf b/public/datasheets/solar/h1z2z2-k-de.pdf index d1ef2ffb..406c38a9 100644 Binary files a/public/datasheets/solar/h1z2z2-k-de.pdf and b/public/datasheets/solar/h1z2z2-k-de.pdf differ diff --git a/public/datasheets/solar/h1z2z2-k-en.pdf b/public/datasheets/solar/h1z2z2-k-en.pdf index 97d7cc74..5461801f 100644 Binary files a/public/datasheets/solar/h1z2z2-k-en.pdf and b/public/datasheets/solar/h1z2z2-k-en.pdf differ diff --git a/scripts/generate-pdf-datasheets.ts b/scripts/generate-pdf-datasheets.ts index 45b0b0c8..f20448e8 100644 --- a/scripts/generate-pdf-datasheets.ts +++ b/scripts/generate-pdf-datasheets.ts @@ -39,6 +39,7 @@ type MdxProduct = { categories: string[]; images: string[]; descriptionHtml: string; + applicationHtml: string; }; type MdxIndex = Map; // key: normalized designation/title @@ -85,9 +86,10 @@ function buildMdxIndex(locale: 'en' | 'de'): MdxIndex { const images = Array.isArray(data.images) ? data.images.map((i: any) => normalizeValue(String(i))).filter(Boolean) : []; const descriptionHtml = extractDescriptionFromMdxFrontmatter(data); + const applicationHtml = normalizeValue(String(data?.application || '')); const slug = path.basename(file, '.mdx'); - idx.set(normalizeExcelKey(title), { slug, title, sku, categories, images, descriptionHtml }); + idx.set(normalizeExcelKey(title), { slug, title, sku, categories, images, descriptionHtml, applicationHtml }); } return idx; @@ -183,6 +185,7 @@ async function loadProductsFromExcelAndMdx(locale: 'en' | 'de'): Promise stripHtml(c.name)).join(' • '); - const descriptionText = stripHtml(args.product.shortDescriptionHtml || args.product.descriptionHtml || ''); + const descriptionText = stripHtml(args.product.applicationHtml || ''); const heroSrc = resolveMediaToLocalPath(args.product.featuredImage || args.product.images?.[0] || null); const productUrl = getProductUrl(args.product); @@ -1173,22 +1173,71 @@ export function buildDatasheetModel(args: { product: ProductData; locale: 'en' | productUrl, }, labels, - technicalItems: [ - ...(excelModel.ok ? excelModel.technicalItems : []), - ...(isMediumVoltageProduct(args.product) - ? args.locale === 'de' - ? [ - { label: 'Prüfspannung 6/10 kV', value: '21 kV' }, - { label: 'Prüfspannung 12/20 kV', value: '42 kV' }, - { label: 'Prüfspannung 18/30 kV', value: '63 kV' }, - ] - : [ - { label: 'Test voltage 6/10 kV', value: '21 kV' }, - { label: 'Test voltage 12/20 kV', value: '42 kV' }, - { label: 'Test voltage 18/30 kV', value: '63 kV' }, - ] - : []), - ], + technicalItems: (() => { + if (!isMediumVoltageProduct(args.product)) { + return excelModel.ok ? excelModel.technicalItems : []; + } + + const pn = normalizeDesignation(args.product.name || ''); + const isAl = /^NA/.test(pn); + const isFL = pn.includes('FL'); + const isF = !isFL && pn.includes('F'); + + const findExcelVal = (labelPart: string) => { + const found = excelModel.technicalItems.find(it => it.label.toLowerCase().includes(labelPart.toLowerCase())); + return found ? found.value : null; + }; + + const items: KeyValueItem[] = []; + if (args.locale === 'de') { + items.push({ label: 'Leitermaterial', value: isAl ? 'Aluminium' : 'Kupfer' }); + items.push({ label: 'Leiterklasse', value: isAl ? 'Klasse 1' : 'Klasse 2 mehrdrähtig' }); + items.push({ label: 'Aderisolation', value: 'VPE DIX8' }); + items.push({ label: 'Feldsteuerung', value: 'innere und äußere Leitschicht aus halbleitendem Kunststoff - 3-fach-extrudiert' }); + items.push({ label: 'Schirm', value: 'Kupferdrähte + Querleitwendel' }); + items.push({ label: 'Längswasserdichtigkeit', value: (isF || isFL) ? 'ja, mit Quellvliess' : 'nein' }); + items.push({ label: 'Querwasserdichtigkeit', value: isFL ? 'ja, Al-Band' : 'nein' }); + items.push({ label: 'Mantelmaterial', value: 'Polyethylen DMP2' }); + items.push({ label: 'Mantelfarbe', value: 'schwarz' }); + items.push({ label: 'Flammwidrigkeit', value: 'nein' }); + items.push({ label: 'UV-beständig', value: 'ja' }); + items.push({ label: 'Max. zulässige Leitertemperatur', value: findExcelVal('Leitertemperatur') || '90°C' }); + items.push({ label: 'Zul. Kabelaußentemperatur, fest verlegt', value: findExcelVal('fest verlegt') || '70°C' }); + items.push({ label: 'Zul. Kabelaußentemperatur, in Bewegung', value: findExcelVal('in Bewegung') || '-20 °C bis +70 °C' }); + items.push({ label: 'Maximale Kurzschlußtemperatur', value: findExcelVal('Kurzschlußtemperatur') || '+250 °C' }); + items.push({ label: 'Min. Biegeradius, fest verlegt', value: findExcelVal('Biegeradius') || '15 facher Durchmesser' }); + items.push({ label: 'Mindesttemperatur Verlegung', value: findExcelVal('Verlegung') || '-5 °C' }); + items.push({ label: 'Metermarkierung', value: 'ja' }); + items.push({ label: 'Teilentladung', value: findExcelVal('Teilentladung') || '2 pC' }); + items.push({ label: 'Prüfspannung 6/10 kV', value: '21 kV' }); + items.push({ label: 'Prüfspannung 12/20 kV', value: '42 kV' }); + items.push({ label: 'Prüfspannung 18/30 kV', value: '63 kV' }); + } else { + items.push({ label: 'Conductor material', value: isAl ? 'Aluminum' : 'Copper' }); + items.push({ label: 'Conductor class', value: isAl ? 'Class 1' : 'Class 2 stranded' }); + items.push({ label: 'Core insulation', value: 'XLPE DIX8' }); + items.push({ label: 'Field control', value: 'inner and outer semiconducting layer made of semiconducting plastic - 3-fold extruded' }); + items.push({ label: 'Screen', value: 'copper wires + transverse conductive helix' }); + items.push({ label: 'Longitudinal water tightness', value: (isF || isFL) ? 'yes, with swelling tape' : 'no' }); + items.push({ label: 'Transverse water tightness', value: isFL ? 'yes, Al-tape' : 'no' }); + items.push({ label: 'Sheath material', value: 'Polyethylene DMP2' }); + items.push({ label: 'Sheath color', value: 'black' }); + items.push({ label: 'Flame retardancy', value: 'no' }); + items.push({ label: 'UV resistant', value: 'yes' }); + items.push({ label: 'Max. permissible conductor temperature', value: findExcelVal('conductor temperature') || '90°C' }); + items.push({ label: 'Permissible cable outer temperature, fixed', value: findExcelVal('fixed') || '70°C' }); + items.push({ label: 'Permissible cable outer temperature, in motion', value: findExcelVal('in motion') || '-20 °C to +70 °C' }); + items.push({ label: 'Maximum short-circuit temperature', value: findExcelVal('short-circuit temperature') || '+250 °C' }); + items.push({ label: 'Min. bending radius, fixed', value: findExcelVal('bending radius') || '15 times diameter' }); + items.push({ label: 'Minimum laying temperature', value: findExcelVal('laying temperature') || '-5 °C' }); + items.push({ label: 'Meter marking', value: 'yes' }); + items.push({ label: 'Partial discharge', value: findExcelVal('Partial discharge') || '2 pC' }); + items.push({ label: 'Test voltage 6/10 kV', value: '21 kV' }); + items.push({ label: 'Test voltage 12/20 kV', value: '42 kV' }); + items.push({ label: 'Test voltage 18/30 kV', value: '63 kV' }); + } + return items; + })(), voltageTables, legendItems: crossSectionModel.legendItems || [], }; diff --git a/scripts/pdf/model/types.ts b/scripts/pdf/model/types.ts index 5919a1d8..c35b737e 100644 --- a/scripts/pdf/model/types.ts +++ b/scripts/pdf/model/types.ts @@ -3,6 +3,7 @@ export interface ProductData { name: string; shortDescriptionHtml: string; descriptionHtml: string; + applicationHtml: string; images: string[]; featuredImage: string | null; sku: string; diff --git a/scripts/pdf/react-pdf/DatasheetDocument.tsx b/scripts/pdf/react-pdf/DatasheetDocument.tsx index 1fd50259..c2291540 100644 --- a/scripts/pdf/react-pdf/DatasheetDocument.tsx +++ b/scripts/pdf/react-pdf/DatasheetDocument.tsx @@ -26,56 +26,62 @@ export function DatasheetDocument(props: { model: DatasheetModel; assets: Assets return ( -
-