ariefng/filament-calculator
A Filament plugin that adds a simple calculator tool to your admin panel. Useful for quick calculations while managing data, with easy installation and seamless integration into Filament pages and resources.
TextInput field functionality, aligning with Filament’s component-based architecture. It introduces a calculator modal as a reusable action, which fits well within Filament’s plugin ecosystem (e.g., Actions, Modals).TextInput rendering pipeline, which may introduce coupling.useModal, useForm), ensuring consistency with existing workflows.extendField() or modify() methods for integration, which are well-documented.TextInput internals change (e.g., modal handling, event names).Actions, Modals, and Form components.wire:model vs. Filament’s useForm).composer require ariefng/filament-calculator
Add to composer.json under require (not require-dev).TextInput in a resource/page:
use Ariefng\FilamentCalculator\CalculatorAction;
TextInput::make('price')
->extraActions([
CalculatorAction::make()
->label('Open Calculator')
->modalWidth('50%'),
]),
CalculatorAction methods (if exposed).resources/css/filament/calculator.css.TextInput actions (e.g., ActionGroups). Test for namespace collisions.TextInput may require updates if Filament changes its modal system.ariefng/filament-calculator (MIT license allows forks if needed).composer.json to avoid surprises:
"ariefng/filament-calculator": "^1.0"
useModal), the package may need a rewrite.README.md snippet for your team’s use case.TextInput internals (e.g., resources/views/vendor/filament/...).window.addEventListener('filament-calculator:error', ...)).DB::transaction).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| JavaScript disabled | Modal fails; field remains editable | Provide a fallback (e.g., static input). |
| Filament update breaks modal | UI breaks or calculations fail | Test against Filament’s release candidates. |
| XSS in user input | Malicious calculator input | Sanitize inputs server-side. |
| High latency in calculations | UI freezes or timeouts | Offload to backend via API. |
| CSS conflicts | Modal styling breaks | Scope styles with filament-calculator-*. |
How can I help you explore Laravel packages today?