Part-DB-server/assets/controllers
Jaime Laborda 218b394b13 Add optional direct thermal printing to Niimbot printers from the label generator
Adds a "Print to Niimbot" panel to the label generator dialog that sends the
generated label straight to a Niimbot thermal printer (e.g. B1) over Web
Bluetooth, without a PDF print dialog or printer driver.

The existing server-side DomPDF label is reused as-is: a new Stimulus controller
rasterizes the PDF preview page-by-page with pdf.js at the printer's native
resolution, converts it to a 1-bit bitmap and prints it via the niimbluelib
library. No changes to the PHP label pipeline are required.

The feature is disabled by default and gated behind the NIIMBOT_ENABLED
environment variable, since it is only useful for users who own such a printer.

- Add @mmote/niimbluelib and pdfjs-dist dependencies
- New assets/controllers/pages/niimbot_print_controller.js
- Print options (copies, density, label type, rotation, B/W threshold) in the
  label dialog, gracefully disabled when Web Bluetooth is unavailable
- NIIMBOT_ENABLED env flag (off by default), wired through parameters.yaml and a
  Twig global, documented in .env
- English translations and documentation

Requires a Chromium-based browser and a secure context (HTTPS or localhost).
2026-07-16 11:39:38 +02:00
..
common Moved alerts and dialogs from unsupported bootbox to Sweetalert2 library 2026-06-21 14:21:01 +02:00
elements Use upstream version of dataTables.select as the fix was merged 2026-06-21 14:41:56 +02:00
filters Added copyright/license info to files 2022-11-29 21:21:26 +01:00
helpers Allow to scan labels anywhere on the page 2026-03-01 16:48:29 +01:00
pages Add optional direct thermal printing to Niimbot printers from the label generator 2026-07-16 11:39:38 +02:00
backup_restore_controller.js Add backup restore feature 2026-01-30 23:24:48 +01:00
bulk_import_controller.js Add Quick Apply and batch update to bulk info provider import (#1316) 2026-05-04 21:56:18 +02:00
bulk_job_manage_controller.js Refactor bulk import functionality to make controller smaller (use services) add DTOs and use stimulus controllers on frontend 2025-09-09 20:30:27 +02:00
csrf_protection_controller.js Updated stimulus recipe 2025-11-30 15:07:59 +01:00
docker_update_progress_controller.js Add Docker update support via Watchtower integration (#1330) 2026-05-03 23:00:31 +02:00
field_mapping_controller.js Add Quick Apply and batch update to bulk info provider import (#1316) 2026-05-04 21:56:18 +02:00
toggle_password_controller.js Removed the deprecated symfony/ux-toggle-password package by replacing it by our own local versions 2025-08-30 21:57:57 +02:00
update_confirm_controller.js Fix update confirmation dialog not blocking form submission 2026-01-30 23:24:48 +01:00