pdf-catalog-generator 3.0.0 → 3.1.2
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 +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +420 -79
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +419 -80
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import React$1 from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
4
|
interface ProductData {
|
|
5
5
|
[key: string]: string | number | boolean | null | undefined;
|
|
6
6
|
}
|
|
7
|
-
type TemplateType = 'template1' | 'template2' | 'template3' | 'template4';
|
|
7
|
+
type TemplateType = 'template1' | 'template2' | 'template3' | 'template4' | 'template5' | 'template6';
|
|
8
8
|
interface CatalogConfig {
|
|
9
9
|
products: ProductData[];
|
|
10
10
|
companyLogo?: string | null;
|
|
@@ -80,6 +80,10 @@ declare const Template3: React.FC<TemplateProps>;
|
|
|
80
80
|
|
|
81
81
|
declare const Template4: React.FC<TemplateProps>;
|
|
82
82
|
|
|
83
|
+
declare const Template5: React$1.FC<TemplateProps>;
|
|
84
|
+
|
|
85
|
+
declare const Template6: React$1.FC<TemplateProps>;
|
|
86
|
+
|
|
83
87
|
/**
|
|
84
88
|
* Format field name to human-readable label
|
|
85
89
|
* Examples:
|
|
@@ -133,7 +137,7 @@ declare function getDescriptionField(product: ProductData): string | null;
|
|
|
133
137
|
* List of known field names (lowercase) that should be excluded from dynamic field display
|
|
134
138
|
* These are the common fields that templates typically handle specially
|
|
135
139
|
*/
|
|
136
|
-
declare const KNOWN_FIELD_NAMES_LOWER: readonly ["image", "imageurl", "img", "photo", "picture", "title", "name", "productname", "description", "details", "info", "desc", "price", "cost", "amount", "rating", "stars", "score", "link", "url", "producturl", "href"];
|
|
140
|
+
declare const KNOWN_FIELD_NAMES_LOWER: readonly ["image", "imageurl", "img", "photo", "picture", "title", "name", "productname", "description", "details", "info", "desc", "price", "cost", "amount", "rating", "stars", "score", "link", "url", "producturl", "href", "image2", "imageurl2", "img2", "photo2", "picture2"];
|
|
137
141
|
/**
|
|
138
142
|
* Extracted product fields for template rendering
|
|
139
143
|
*/
|
|
@@ -255,4 +259,4 @@ declare const DEFAULT_TEMPLATE_CONFIG: TemplateConfig;
|
|
|
255
259
|
*/
|
|
256
260
|
declare function mergeTemplateConfig(config?: Partial<TemplateConfig>): TemplateConfig;
|
|
257
261
|
|
|
258
|
-
export { type CatalogConfig, DEFAULT_TEMPLATE_CONFIG, type ExtractedFields, KNOWN_FIELD_NAMES_LOWER, type ProductData, Template1, Template2, Template3, Template4, type TemplateConfig, type TemplateProps, type TemplateType, dynamicFieldStyles, extractProductFields, formatFieldName, generateProductCatalog, getDescriptionField, getDisplayFields, getFieldValue, getImageUrl, getLinkField, getPriceField, getRatingField, getTitleField, hasValue, mergeTemplateConfig, parseCSVBuffer, parseCSVFile, parseExcelFile, parseJSON, renderBuyButton, renderDynamicFields, renderPrice, renderRating };
|
|
262
|
+
export { type CatalogConfig, DEFAULT_TEMPLATE_CONFIG, type ExtractedFields, KNOWN_FIELD_NAMES_LOWER, type ProductData, Template1, Template2, Template3, Template4, Template5, Template6, type TemplateConfig, type TemplateProps, type TemplateType, dynamicFieldStyles, extractProductFields, formatFieldName, generateProductCatalog, getDescriptionField, getDisplayFields, getFieldValue, getImageUrl, getLinkField, getPriceField, getRatingField, getTitleField, hasValue, mergeTemplateConfig, parseCSVBuffer, parseCSVFile, parseExcelFile, parseJSON, renderBuyButton, renderDynamicFields, renderPrice, renderRating };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import React$1 from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
4
|
interface ProductData {
|
|
5
5
|
[key: string]: string | number | boolean | null | undefined;
|
|
6
6
|
}
|
|
7
|
-
type TemplateType = 'template1' | 'template2' | 'template3' | 'template4';
|
|
7
|
+
type TemplateType = 'template1' | 'template2' | 'template3' | 'template4' | 'template5' | 'template6';
|
|
8
8
|
interface CatalogConfig {
|
|
9
9
|
products: ProductData[];
|
|
10
10
|
companyLogo?: string | null;
|
|
@@ -80,6 +80,10 @@ declare const Template3: React.FC<TemplateProps>;
|
|
|
80
80
|
|
|
81
81
|
declare const Template4: React.FC<TemplateProps>;
|
|
82
82
|
|
|
83
|
+
declare const Template5: React$1.FC<TemplateProps>;
|
|
84
|
+
|
|
85
|
+
declare const Template6: React$1.FC<TemplateProps>;
|
|
86
|
+
|
|
83
87
|
/**
|
|
84
88
|
* Format field name to human-readable label
|
|
85
89
|
* Examples:
|
|
@@ -133,7 +137,7 @@ declare function getDescriptionField(product: ProductData): string | null;
|
|
|
133
137
|
* List of known field names (lowercase) that should be excluded from dynamic field display
|
|
134
138
|
* These are the common fields that templates typically handle specially
|
|
135
139
|
*/
|
|
136
|
-
declare const KNOWN_FIELD_NAMES_LOWER: readonly ["image", "imageurl", "img", "photo", "picture", "title", "name", "productname", "description", "details", "info", "desc", "price", "cost", "amount", "rating", "stars", "score", "link", "url", "producturl", "href"];
|
|
140
|
+
declare const KNOWN_FIELD_NAMES_LOWER: readonly ["image", "imageurl", "img", "photo", "picture", "title", "name", "productname", "description", "details", "info", "desc", "price", "cost", "amount", "rating", "stars", "score", "link", "url", "producturl", "href", "image2", "imageurl2", "img2", "photo2", "picture2"];
|
|
137
141
|
/**
|
|
138
142
|
* Extracted product fields for template rendering
|
|
139
143
|
*/
|
|
@@ -255,4 +259,4 @@ declare const DEFAULT_TEMPLATE_CONFIG: TemplateConfig;
|
|
|
255
259
|
*/
|
|
256
260
|
declare function mergeTemplateConfig(config?: Partial<TemplateConfig>): TemplateConfig;
|
|
257
261
|
|
|
258
|
-
export { type CatalogConfig, DEFAULT_TEMPLATE_CONFIG, type ExtractedFields, KNOWN_FIELD_NAMES_LOWER, type ProductData, Template1, Template2, Template3, Template4, type TemplateConfig, type TemplateProps, type TemplateType, dynamicFieldStyles, extractProductFields, formatFieldName, generateProductCatalog, getDescriptionField, getDisplayFields, getFieldValue, getImageUrl, getLinkField, getPriceField, getRatingField, getTitleField, hasValue, mergeTemplateConfig, parseCSVBuffer, parseCSVFile, parseExcelFile, parseJSON, renderBuyButton, renderDynamicFields, renderPrice, renderRating };
|
|
262
|
+
export { type CatalogConfig, DEFAULT_TEMPLATE_CONFIG, type ExtractedFields, KNOWN_FIELD_NAMES_LOWER, type ProductData, Template1, Template2, Template3, Template4, Template5, Template6, type TemplateConfig, type TemplateProps, type TemplateType, dynamicFieldStyles, extractProductFields, formatFieldName, generateProductCatalog, getDescriptionField, getDisplayFields, getFieldValue, getImageUrl, getLinkField, getPriceField, getRatingField, getTitleField, hasValue, mergeTemplateConfig, parseCSVBuffer, parseCSVFile, parseExcelFile, parseJSON, renderBuyButton, renderDynamicFields, renderPrice, renderRating };
|