Skip to content

[PASO 2.12] Add files module (EXTENDED) — core@0.13.0#36

Merged
mfg1986 merged 13 commits into
developfrom
feature/PASO-2.12_files-module
May 21, 2026
Merged

[PASO 2.12] Add files module (EXTENDED) — core@0.13.0#36
mfg1986 merged 13 commits into
developfrom
feature/PASO-2.12_files-module

Conversation

@mfg1986
Copy link
Copy Markdown
Contributor

@mfg1986 mfg1986 commented May 21, 2026

Summary

  • Add files module as the first EXTENDED module in @fireflyframework/core
  • 6 injectable services: FileValidationService, FilePickerService, FileUploadService, FileDownloadService, FilePreviewService, FileExportService
  • 3 pure function exporters: CSV (pure JS), PDF (jspdf), Excel (exceljs)
  • provideFiles(config?) factory with makeEnvironmentProviders
  • Optional peer dependencies: jspdf, jspdf-autotable, exceljs (tree-shakeable via dynamic import)
  • Version bump: core 0.12.0 → 0.13.0

Commits (12)

  • STEP-2.12-001: Types, interfaces, config token
  • STEP-2.12-002: FileValidationService (MIME, size, extension)
  • STEP-2.12-003: FilePickerService (native file picker)
  • STEP-2.12-004: FileUploadService (HTTP progress tracking)
  • STEP-2.12-005: FileDownloadService (URL + blob download)
  • STEP-2.12-006: FilePreviewService (blob URL lifecycle)
  • STEP-2.12-007: CsvExporter (pure JS, BOM, configurable separator)
  • STEP-2.12-008: PdfExporter (jspdf dynamic import)
  • STEP-2.12-009: ExcelExporter (exceljs dynamic import)
  • STEP-2.12-010: FileExportService (orchestrator)
  • STEP-2.12-011: provideFiles() + barrel exports
  • STEP-2.12-012: Version bump 0.13.0 + CHANGELOG

Test plan

  • CI passes (nx test core — 725 tests, 50 suites)
  • Build passes (nx build core)
  • No console errors or warnings in CI logs

mfg1986 added 13 commits May 21, 2026 08:53
Define foundational types for the Files module (EXTENDED #17):
ExportFormat, UploadProgress, FileValidationConfig, ValidationResult,
ExportColumn, ExportConfig, FilesConfig, and FILES_CONFIG InjectionToken.
…ion validation

Validates files against configurable rules (maxSizeBytes, allowedMimeTypes,
allowedExtensions). Supports wildcard MIME patterns (image/*), case-insensitive
extensions, and falls back to FILES_CONFIG module defaults. 16 tests.
…tion

Programmatically creates hidden input[type=file], triggers click, and
resolves with selected files. Includes pickImage() shorthand for image/*
filtering. SSR-safe via inject(DOCUMENT). Cleanup after use. 11 tests.
Upload files via POST with real-time progress events using HttpClient
reportProgress. Includes upload() for single files, uploadMultiple()
for concurrent uploads, and FILES_CONFIG endpoint fallback.
…pport

Trigger file downloads programmatically using hidden anchor + click
trick. Includes downloadBlob() with automatic blob URL revocation
to prevent memory leaks. SSR-safe via inject(DOCUMENT).
…ment

Preview files in new browser tabs via window.open with blob URLs.
Tracks active URLs for bulk cleanup via revokeAll(). Respects
FILES_CONFIG.enablePreview setting. SSR-safe via inject(DOCUMENT).
…8 BOM

Pure JS CSV export function with no external dependencies. Supports
comma/semicolon/tab separators, RFC 4180 field escaping, and UTF-8
BOM for Excel compatibility.
… layout

Async PDF export using jspdf + jspdf-autotable as optional peer
dependencies loaded via dynamic import for tree-shaking. Supports
title, column widths, and automatic pagination.
@mfg1986 mfg1986 merged commit 9c901e5 into develop May 21, 2026
3 checks passed
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