diff --git a/CHANGELOG.md b/CHANGELOG.md
index d9914d2..f11a9eb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## [2.1.0-3](https://github.com/nodecfdi/cfdi-to-pdf/compare/v2.1.0-2...v2.1.0-3) (2024-08-20)
+
+### Bug Fixes
+
+* :construction: handle default and not default for usage in browser ([479eb2f](https://github.com/nodecfdi/cfdi-to-pdf/commit/479eb2f34943bc6d65ede93020a49df17ab8aa0a))
## [2.1.0-2](https://github.com/nodecfdi/cfdi-to-pdf/compare/v2.1.0-1...v2.1.0-2) (2024-08-20)
### Bug Fixes
diff --git a/docs/classes/abstract_invoice_data.default.html b/docs/classes/abstract_invoice_data.default.html
index 63e852a..98d74b8 100644
--- a/docs/classes/abstract_invoice_data.default.html
+++ b/docs/classes/abstract_invoice_data.default.html
@@ -156,7 +156,7 @@
--md-sys-color-surface-container-high: #eae8e0;
--md-sys-color-surface-container-highest: #e4e3db
}
-
Index
Constructors
constructor
+
Constructors
Properties
Protected
_additionalFields
_additionalFields: undefined | {
title: string;
value: string;
}[]
Protected
_emisor
_emisor: XmlNodeInterface
Protected
_legendFooter
_legendFooter: string
Protected
_logo
_logo: undefined | string
Protected
_qrUrl
_qrUrl: string
Protected
_receptor
_receptor: XmlNodeInterface
Protected
_tfdSourceString
_tfdSourceString: string
Protected
_timbreFiscalDigital
_timbreFiscalDigital: XmlNodeInterface
Methods
additionalFields
- additionalFields(): undefined | {
title: string;
value: string;
}[] Returns undefined | {
title: string;
value: string;
}[]
buildTfdSource
- buildTfdSource(): void
Returns void
buildUrlQr
- buildUrlQr(node): void
Returns void
emisor
- emisor(): XmlNodeInterface
Returns XmlNodeInterface
legendFooter
- legendFooter(): string
Returns string
logo
- logo(): undefined | string
Returns undefined | string
qrUrl
- qrUrl(): string
Returns string
receptor
- receptor(): XmlNodeInterface
Returns XmlNodeInterface
setLegendFooter
- setLegendFooter(legendFooter): void
Returns void
tfdSourceString
- tfdSourceString(): string
Returns string
timbreFiscalDigital
- timbreFiscalDigital(): XmlNodeInterface
Returns XmlNodeInterface
Index
Constructors
constructor
+
Constructors
Properties
Protected
_bgGrayColor
_bgGrayColor: string = '#f8f8f8'
Protected
_defaultPageMargins
_defaultPageMargins: Margins = ...
Protected
_documentOptions
Protected
_documentTranslator
Protected
Optional
_options
_options?: BufferOptions
Protected
_primaryColor
_primaryColor: string = '#359136'
Methods
defaultDictionaryStyles
- defaultDictionaryStyles(): StyleDictionary
Returns StyleDictionary
defaultStyle
- defaultStyle(): Style
Returns Style
layouts
- layouts(): Record<string, CustomTableLayout>
Returns Record<string, CustomTableLayout>
setBgGrayColor
- setBgGrayColor(color): void
Returns void
setPrimaryColor
- setPrimaryColor(color): void
Returns void
Index
Constructors
constructor
+
Constructors
constructor
- new default<T>(documentTranslator, documentOptions?, catalogs?, overrideFonts?, overrideVFS?, options?): default<T>
Properties
Protected
_bgGrayColor
_bgGrayColor: string = '#f8f8f8'
Protected
_defaultPageMargins
_defaultPageMargins: Margins = ...
Protected
_documentOptions
Protected
_documentTranslator
Protected
Optional
_options
_options?: BufferOptions
Protected
_primaryColor
_primaryColor: string = '#359136'
Methods
buildBase64
- buildBase64(data): Promise<string>
Returns Promise<string>
Protected
buildPdf
- buildPdf(data): Promise<TCreatedPdf>
Returns Promise<TCreatedPdf>
buildRaw
- buildRaw(data): Promise<string>
Returns Promise<string>
defaultDictionaryStyles
- defaultDictionaryStyles(): StyleDictionary
Returns StyleDictionary
defaultStyle
- defaultStyle(): Style
Returns Style
layouts
- layouts(): Record<string, CustomTableLayout>
Returns Record<string, CustomTableLayout>
setBgGrayColor
- setBgGrayColor(color): void
Returns void
setPrimaryColor
- setPrimaryColor(color): void
Returns void
Index
Constructors
constructor
+
Constructors
constructor
- new default<T>(documentTranslator, documentOptions?, catalogs?, overrideFontDictionary?, options?): default<T>
Properties
Protected
_bgGrayColor
_bgGrayColor: string = '#f8f8f8'
Protected
_defaultPageMargins
_defaultPageMargins: Margins = ...
Protected
_documentOptions
Protected
_documentTranslator
Protected
Optional
_options
_options?: BufferOptions
Protected
_primaryColor
_primaryColor: string = '#359136'
Methods
build
- build(data, destination): Promise<void>
Parameters
- data: T
- destination: string
Returns Promise<void>
buildBase64
- buildBase64(data): Promise<string>
Returns Promise<string>
Protected
buildPdf
- buildPdf(data): PDFDocument
Returns PDFDocument
buildRaw
- buildRaw(data): Promise<string>
Returns Promise<string>
buildStream
- buildStream(data): ReadableStream
Returns ReadableStream
defaultDictionaryStyles
- defaultDictionaryStyles(): StyleDictionary
Returns StyleDictionary
defaultFontDictionary
- defaultFontDictionary(): TFontDictionary
Returns TFontDictionary
defaultStyle
- defaultStyle(): Style
Returns Style
layouts
- layouts(): Record<string, CustomTableLayout>
Returns Record<string, CustomTableLayout>
setBgGrayColor
- setBgGrayColor(color): void
Returns void
setPrimaryColor
- setPrimaryColor(color): void
Returns void
Index
Constructors
constructor
+
Constructors
constructor
- new default(comprobante, qrUrl?, tfdSourceString?, logo?, address?, additionalFields?): default
Parameters
- comprobante: XmlNodeInterface
Optional
qrUrl: null | stringOptional
tfdSourceString: null | stringOptional
logo: stringOptional
address: stringOptional
additionalFields: {
title: string;
value: string;
}[]
Properties
Protected
_additionalFields
_additionalFields: undefined | {
title: string;
value: string;
}[]
Protected
_emisor
_emisor: XmlNodeInterface
Protected
_legendFooter
_legendFooter: string
Protected
_logo
_logo: undefined | string
Protected
_qrUrl
_qrUrl: string
Protected
_receptor
_receptor: XmlNodeInterface
Protected
_tfdSourceString
_tfdSourceString: string
Protected
_timbreFiscalDigital
_timbreFiscalDigital: XmlNodeInterface
Methods
additionalFields
- additionalFields(): undefined | {
title: string;
value: string;
}[] Returns undefined | {
title: string;
value: string;
}[]
address
- address(): undefined | string
Returns undefined | string
buildTfdSource
- buildTfdSource(): void
Returns void
buildUrlQr
- buildUrlQr(node): void
Returns void
comprobante
- comprobante(): XmlNodeInterface
Returns XmlNodeInterface
emisor
- emisor(): XmlNodeInterface
Returns XmlNodeInterface
legendFooter
- legendFooter(): string
Returns string
logo
- logo(): undefined | string
Returns undefined | string
qrUrl
- qrUrl(): string
Returns string
receptor
- receptor(): XmlNodeInterface
Returns XmlNodeInterface
setLegendFooter
- setLegendFooter(legendFooter): void
Returns void
tfdSourceString
- tfdSourceString(): string
Returns string
timbreFiscalDigital
- timbreFiscalDigital(): XmlNodeInterface
Returns XmlNodeInterface
Index
Constructors
constructor
+
Constructors
constructor
- new default(retenciones, qrUrl?, tfdSourceString?, logo?, additionalFields?): default
Parameters
- retenciones: XmlNodeInterface
Optional
qrUrl: null | stringOptional
tfdSourceString: null | stringOptional
logo: stringOptional
additionalFields: {
title: string;
value: string;
}[]
Properties
Protected
_additionalFields
_additionalFields: undefined | {
title: string;
value: string;
}[]
Protected
_emisor
_emisor: XmlNodeInterface
Protected
_legendFooter
_legendFooter: string
Protected
_logo
_logo: undefined | string
Protected
_qrUrl
_qrUrl: string
Protected
_receptor
_receptor: XmlNodeInterface
Protected
_tfdSourceString
_tfdSourceString: string
Protected
_timbreFiscalDigital
_timbreFiscalDigital: XmlNodeInterface
Methods
additionalFields
- additionalFields(): undefined | {
title: string;
value: string;
}[] Returns undefined | {
title: string;
value: string;
}[]
buildTfdSource
- buildTfdSource(): void
Returns void
buildUrlQr
- buildUrlQr(node): void
Returns void
emisor
- emisor(): XmlNodeInterface
Returns XmlNodeInterface
legendFooter
- legendFooter(): string
Returns string
logo
- logo(): undefined | string
Returns undefined | string
periodo
- periodo(): XmlNodeInterface
Returns XmlNodeInterface
qrUrl
- qrUrl(): string
Returns string
receptor
- receptor(): XmlNodeInterface
Returns XmlNodeInterface
retenciones
- retenciones(): XmlNodeInterface
Returns XmlNodeInterface
setLegendFooter
- setLegendFooter(legendFooter): void
Returns void
tfdSourceString
- tfdSourceString(): string
Returns string
timbreFiscalDigital
- timbreFiscalDigital(): XmlNodeInterface
Returns XmlNodeInterface
totales
- totales(): XmlNodeInterface
Returns XmlNodeInterface
Index
Constructors
constructor
+
Constructors
Methods
Protected
genericSpace
- genericSpace(spaces?): Content
Returns Content
Index
Constructors
constructor
+
Constructors
Methods
Protected
genericSpace
- genericSpace(spaces?): Content
Returns Content
translate
- translate(data, documentOptions, catalogs, primaryColor, bgGrayColor): TDocumentDefinitions
Returns TDocumentDefinitions
Index
Constructors
constructor
+
Constructors
Methods
Protected
genericSpace
- genericSpace(spaces?): Content
Returns Content
translate
- translate(data, documentOptions, catalogs, primaryColor, bgGrayColor): TDocumentDefinitions
Returns TDocumentDefinitions
Function getKeyValueOfCatalog
- getKeyValueOfCatalog(catalog, value, source): string
Returns string
Function getKeyValueOfCatalog
- getKeyValueOfCatalog(catalog, value, source): string
Returns string
Function getValueOfCatalog
- getValueOfCatalog(catalog, value, source): string
Returns string
Function getValueOfCatalog
- getValueOfCatalog(catalog, value, source): string
Returns string
- defineCatalog<T>(fn): T[]
Returns T[]
- defineCatalog<T>(fn): T[]
Returns T[]
- default(impLocal10, primaryColor, bgGrayColor, tableTotales, totalesContent): void
Parameters
- impLocal10: XmlNodeInterface
- primaryColor: string
- bgGrayColor: string
- tableTotales: TableCell[][]
- totalesContent: TableCell[]
Returns void
- default(impLocal10, primaryColor, bgGrayColor, tableTotales, totalesContent): void
Parameters
- impLocal10: XmlNodeInterface
- primaryColor: string
- bgGrayColor: string
- tableTotales: TableCell[][]
- totalesContent: TableCell[]
Returns void
- default(pago10, currentContent, catalogs, primaryColor, bgGrayColor): void
Parameters
- pago10: XmlNodeInterface
- currentContent: Content[]
- catalogs: CatalogsData
- primaryColor: string
- bgGrayColor: string
Returns void
- default(pago10, currentContent, catalogs, primaryColor, bgGrayColor): void
Parameters
- pago10: XmlNodeInterface
- currentContent: Content[]
- catalogs: CatalogsData
- primaryColor: string
- bgGrayColor: string
Returns void
- default(pago20, currentContent, catalogs, primaryColor, bgGrayColor): void
Parameters
- pago20: XmlNodeInterface
- currentContent: Content[]
- catalogs: CatalogsData
- primaryColor: string
- bgGrayColor: string
Returns void
- default(pago20, currentContent, catalogs, primaryColor, bgGrayColor): void
Parameters
- pago20: XmlNodeInterface
- currentContent: Content[]
- catalogs: CatalogsData
- primaryColor: string
- bgGrayColor: string
Returns void
- default(concepto, catalogs, primaryColor, bgGrayColor): ContentTable
Parameters
- concepto: XmlNodeInterface
- catalogs: CatalogsData
- primaryColor: string
- bgGrayColor: string
Returns ContentTable
- default(concepto, catalogs, primaryColor, bgGrayColor): ContentTable
Parameters
- concepto: XmlNodeInterface
- catalogs: CatalogsData
- primaryColor: string
- bgGrayColor: string
Returns ContentTable
- default(comprobante, catalogs, primaryColor, bgGrayColor): Content
Parameters
- comprobante: XmlNodeInterface
- catalogs: CatalogsData
- primaryColor: string
- bgGrayColor: string
Returns Content
- default(comprobante, catalogs, primaryColor, bgGrayColor): Content
Parameters
- comprobante: XmlNodeInterface
- catalogs: CatalogsData
- primaryColor: string
- bgGrayColor: string
Returns Content
- default(comprobante, catalogs, primaryColor): Content
Parameters
- comprobante: XmlNodeInterface
- catalogs: CatalogsData
- primaryColor: string
Returns Content
- default(comprobante, catalogs, primaryColor): Content
Parameters
- comprobante: XmlNodeInterface
- catalogs: CatalogsData
- primaryColor: string
Returns Content
- default(informacionGlobal, catalogs, primaryColor, bgGrayColor): Content
Parameters
- informacionGlobal: XmlNodeInterface
- catalogs: CatalogsData
- primaryColor: string
- bgGrayColor: string
Returns Content
- default(informacionGlobal, catalogs, primaryColor, bgGrayColor): Content
Parameters
- informacionGlobal: XmlNodeInterface
- catalogs: CatalogsData
- primaryColor: string
- bgGrayColor: string
Returns Content
- default(relacionados, catalogs, primaryColor, bgGrayColor): Content
Parameters
- relacionados: XmlNodeInterface | XmlNodes
- catalogs: CatalogsData
- primaryColor: string
- bgGrayColor: string
Returns Content
- default(relacionados, catalogs, primaryColor, bgGrayColor): Content
Parameters
- relacionados: XmlNodeInterface | XmlNodes
- catalogs: CatalogsData
- primaryColor: string
- bgGrayColor: string
Returns Content
- default(comprobante, catalogs, primaryColor, bgGrayColor): Content
Parameters
- comprobante: XmlNodeInterface
- catalogs: CatalogsData
- primaryColor: string
- bgGrayColor: string
Returns Content
- default(comprobante, catalogs, primaryColor, bgGrayColor): Content
Parameters
- comprobante: XmlNodeInterface
- catalogs: CatalogsData
- primaryColor: string
- bgGrayColor: string
Returns Content
- default(data, catalogs, primaryColor, bgGrayColor): Content
Returns Content
- default(data, catalogs, primaryColor, bgGrayColor): Content
Returns Content
- default(currentPage, pageCount, data): Content
Returns Content
- default(currentPage, pageCount, data): Content
Returns Content
- default(data, catalogs, primaryColor, bgGrayColor): Content
Returns Content
- default(data, catalogs, primaryColor, bgGrayColor): Content
Returns Content
- default(periodo, isVersionOne, catalogs, primaryColor, bgGrayColor): Content
Parameters
- periodo: XmlNodeInterface
- isVersionOne: boolean
- catalogs: CatalogsData
- primaryColor: string
- bgGrayColor: string
Returns Content
- default(periodo, isVersionOne, catalogs, primaryColor, bgGrayColor): Content
Parameters
- periodo: XmlNodeInterface
- isVersionOne: boolean
- catalogs: CatalogsData
- primaryColor: string
- bgGrayColor: string
Returns Content
- default(totales, isVersionOne, catalogs, primaryColor, bgGrayColor): Content[]
Parameters
- totales: XmlNodeInterface
- isVersionOne: boolean
- catalogs: CatalogsData
- primaryColor: string
- bgGrayColor: string
Returns Content[]
- default(totales, isVersionOne, catalogs, primaryColor, bgGrayColor): Content[]
Parameters
- totales: XmlNodeInterface
- isVersionOne: boolean
- catalogs: CatalogsData
- primaryColor: string
- bgGrayColor: string
Returns Content[]
- default(tfd, tfdSourceString, qrUrl, primaryColor): Content
Parameters
- tfd: XmlNodeInterface
- tfdSourceString: string
- qrUrl: string
- primaryColor: string
Returns Content
- default(tfd, tfdSourceString, qrUrl, primaryColor): Content
Parameters
- tfd: XmlNodeInterface
- tfdSourceString: string
- qrUrl: string
- primaryColor: string
Returns Content
- default(data, catalogs, primaryColor): Content
Returns Content
- default(data, catalogs, primaryColor): Content
Returns Content
- default(raw, separator?): string
Parameters
- raw: string
- separator: string = '\u{200B}'
Returns string
- default(raw, separator?): string
Parameters
- raw: string
- separator: string = '\u{200B}'
Returns string
- formatCurrency(currency, currencyDisplay?): string
Parameters
- currency: string | number
- currencyDisplay: "symbol" | "code" = 'symbol'
Returns string
- formatCurrency(currency, currencyDisplay?): string
Parameters
- currency: string | number
- currencyDisplay: "symbol" | "code" = 'symbol'
Returns string
- toCurrency(initial, moneda?): string
Parameters
- initial: number
- moneda: string = 'MXN'
Returns string
- toCurrency(initial, moneda?): string
Parameters
- initial: number
- moneda: string = 'MXN'
Returns string
- toNumber(currency): number
Parameters
- currency: string | number
Returns number
- toNumber(currency): number
Parameters
- currency: string | number
Returns number
- default(value): string
Returns string
- default(value): string
Returns string
interface CatalogItem { id: string; texto: string; } Index
Properties
id
+
interface CatalogItem { id: string; texto: string; } Properties
Index
Properties
cfdi40Exportaciones
+
Properties
retenciones20ClavesRetencion
retenciones20Periodicidades
Module abstract_invoice_data
Index
Classes
default
+
Module abstract_invoice_data
Module builders/abstract_pdf_maker_builder
Index
Classes
default
+
Module builders/abstract_pdf_maker_builder
Index
References
PdfMakerBuilder
+
References
PdfMakerBuilder
Renames and re-exports defaultModule builders/browser/pdf_maker_builder
Index
Classes
default
+
Module builders/browser/pdf_maker_builder
Index
References
PdfMakerBuilder
+
References
PdfMakerBuilder
Renames and re-exports defaultModule builders/node/pdf_maker_builder
Index
Classes
default
+
Module builders/node/pdf_maker_builder
Module catalogs/catalogs_source
Index
Variables
catalogsSource
+
Module catalogs/catalogs_source
Module catalogs/cfdi40_exportaciones
Index
Variables
default
+
Module catalogs/cfdi40_exportaciones
Module catalogs/cfdi40_formas_pago
Index
Variables
default
+
Module catalogs/cfdi40_formas_pago
Module catalogs/cfdi40_impuestos
Index
Variables
default
+
Module catalogs/cfdi40_impuestos
Module catalogs/cfdi40_meses
Index
Variables
default
+
Module catalogs/cfdi40_meses
Module catalogs/cfdi40_metodos_pago
Index
Variables
default
+
Module catalogs/cfdi40_metodos_pago
Module catalogs/cfdi40_objetos_impuestos
Index
Variables
default
+
Module catalogs/cfdi40_objetos_impuestos
Module catalogs/cfdi40_periodicidades
Index
Variables
default
+
Module catalogs/cfdi40_periodicidades
Module catalogs/cfdi40_regimenes_fiscales
Index
Variables
default
+
Module catalogs/cfdi40_regimenes_fiscales
Module catalogs/cfdi40_tipos_comprobantes
Index
Variables
default
+
Module catalogs/cfdi40_tipos_comprobantes
Module catalogs/cfdi40_tipos_relaciones
Index
Variables
default
+
Module catalogs/cfdi40_tipos_relaciones
Module catalogs/cfdi40_usos_cfdi
Index
Variables
default
+
Module catalogs/cfdi40_usos_cfdi
Module catalogs/define_catalog
Index
Functions
buildItem
+
Module catalogs/define_catalog
Module catalogs/pagos_tipos_cadena_pago
Index
Variables
default
+
Module catalogs/pagos_tipos_cadena_pago
Module catalogs/retenciones20_claves_retencion
Index
Variables
default
+
Module catalogs/retenciones20_claves_retencion
Module catalogs/retenciones20_periodicidades
Index
Variables
default
+
Module catalogs/retenciones20_periodicidades
Module catalogs/retenciones20_periodos
Index
Variables
default
+
Module catalogs/retenciones20_periodos
Module catalogs/retenciones20_tipos_pago
Index
Variables
default
+
Module catalogs/retenciones20_tipos_pago