Skip to content

Editor: format convertor (UBL, CII, FatturaPA, HTML) - #22

Draft
samlown wants to merge 2 commits into
mainfrom
convertor
Draft

Editor: format convertor (UBL, CII, FatturaPA, HTML)#22
samlown wants to merge 2 commits into
mainfrom
convertor

Conversation

@samlown

@samlown samlown commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Adds a format convertor to the browser editor: the viewer pane can render a GOBL envelope as UBL, CII, or an HTML preview, backed by new /_editor/convert and /_editor/formats routes plus a curated set of example invoices.

Contents

  • editor/convert.go — output formats and /_editor/convert / /_editor/formats handlers (UBL EN 16931 / Peppol / XRechnung / Peppol FR CIUS, CII / Factur-X / XRechnung, HTML preview).
  • editor/examples/ — curated starter invoices per country/addon (de, es, fr, gb, it, nl, pt, us, and profile variants).
  • editor/geo.go — country helpers.
  • Editor UI wiring (editor.templ, editor.js, editor-data.js, CSS).

Notes

This branch was rebased onto main (gobl v0.502.2) and adapted to the restructured APIs:

  • gobl/pkg/api removed upstream → uses the repo's own api.WriteError.
  • Converters upgraded: gobl.cii v0.39.0, gobl.ubl v0.56.0, gobl.html v0.101.0.

⚠️ FatturaPA temporarily disabled

gobl.fatturapa v0.69.0 still calls the removed xmldsig.WithXAdES and conflicts with gobl.ubl's xmldsig v0.14.0. The import, format entry, and test case are commented out with TODOs; re-enable once a gobl.fatturapa release migrated to WithXAdESConfig is available.

Still WIP — draft.

🤖 Generated with Claude Code

samlown and others added 2 commits July 14, 2026 11:03
Rebase brought in the gobl v0.502.2 upgrade, which restructured several
APIs used by the WIP convertor:

- github.com/invopop/gobl/pkg/api was removed upstream; use the repo's
  own api.WriteError instead.
- Upgrade converters to versions compatible with v0.502.2:
  gobl.cii v0.39.0, gobl.ubl v0.56.0, gobl.html v0.101.0.
- Temporarily disable FatturaPA: gobl.fatturapa v0.69.0 still calls the
  removed xmldsig.WithXAdES and conflicts with gobl.ubl's xmldsig
  v0.14.0. Import, format entry, and test case are commented out with
  TODOs to re-enable after a fatturapa release migrated to
  WithXAdESConfig.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant