Commit Graph
1259 Commits
Author SHA1 Message Date
Dan HarrinandAmp ea77942a70 Add JavaScript-rendered custom fields
Co-authored-by: Amp <amp@ampcode.com>
2026-09-21 21:29:36 +00:00
Sandro Gehri 38d684bbe5 add client-side searchable mentions (#20501) 2026-09-15 14:37:50 +01:00
3de50426bc RichEditor minHeight()/maxHeight() support (#20258)
* Rich Editor minRows()/maxRows() support

Signed-off-by: Dennis Koch <info@pixelarbeit.de>

* Docs: minRows()/maxRows()

Signed-off-by: Dennis Koch <info@pixelarbeit.de>

* Refactor minRows()/maxRows() to minHeight()/maxHeight()

Signed-off-by: Dennis Koch <info@pixelarbeit.de>

* Cleanup

Signed-off-by: Dennis Koch <info@pixelarbeit.de>

* fix: complete rich editor height constraints

Co-authored-by: Amp <amp@ampcode.com>

* fix: align markdown editor height constraints

Co-authored-by: Amp <amp@ampcode.com>

* test: cover clearing editor height constraints

Co-authored-by: Amp <amp@ampcode.com>

* fix: align editor default minimum heights

Co-authored-by: Amp <amp@ampcode.com>

* fix: include markdown editor padding in height constraints

Co-authored-by: Amp <amp@ampcode.com>

* docs: record EasyMDE accessibility customization

Co-authored-by: Amp <amp@ampcode.com>

* fix: align editor default and disabled heights

Co-authored-by: Amp <amp@ampcode.com>

* docs: refresh editor screenshots

Co-authored-by: Amp <amp@ampcode.com>

* fix: align cleared editor minimum heights

Co-authored-by: Amp <amp@ampcode.com>

* docs: prioritize editor height configuration

Co-authored-by: Amp <amp@ampcode.com>

---------

Signed-off-by: Dennis Koch <info@pixelarbeit.de>
Co-authored-by: Dan Harrin <git@danharrin.com>
Co-authored-by: Amp <amp@ampcode.com>
2026-09-04 17:17:48 +01:00
6c1217745d feat: defer schema loading (#19867)
* feat(builder): defer block schema rendering until expanded

* chore: fix code style

* feat(builder): optimize error handling and loading behavior

* feat(builder): add browser test for lazy block expand/collaps

* chore: fix code style

* feat(builder): improve clarity in lazy-loading items documentation

* feat(builder): merge lazy tests into BuilderTest

* feat(builder): add x-cloak directive for improved loading behavior

* feat(builder): update selectors in BuilderTest for improved reliability

* Revert lazy Builder loading implementation

Co-authored-by: Amp <amp@ampcode.com>

* feat: defer schema loading

Co-authored-by: Amp <amp@ampcode.com>

---------

Co-authored-by: Dan Harrin <git@danharrin.com>
Co-authored-by: Amp <amp@ampcode.com>
2026-09-04 09:26:48 +01:00
Dan HarrinandAmp 4f24961e14 docs: improve documentation section ordering (#20432)
Co-authored-by: Amp <amp@ampcode.com>
2026-09-01 20:55:08 +01:00
Dan Harrin 475924235e security: Table select modify query docs note (#20149) 2026-07-11 15:59:57 +01:00
Dan Harrin 6555a9eb1f Additional security docs / hardening 2026-05-21 18:10:05 +01:00
Dan Harrin db0dc4f4aa security: Introduce Str::sanitizeUrl() helper method (#19868) 2026-05-20 14:23:06 +01:00
Niklas WildenburgandDan Harrin 3f457910ba fix broken Cropper.js documentation link (#19790)
* fix broken Cropper.js documentation link

it seems the link changed with the Cropper.js update to v2 and they introduced a new website

Signed-off-by: Niklas Wildenburg <niklascanisius@me.com>

* Update FileUpload.php

---------

Signed-off-by: Niklas Wildenburg <niklascanisius@me.com>
Co-authored-by: Dan Harrin <git@danharrin.com>
2026-05-01 13:39:20 +01:00
Dan Harrin 059cd013cc Update 01-overview.md 2026-05-01 13:19:23 +01:00
Sngt25 d315251953 Document visibility in condition functions
Added section on using visibility in condition functions for relationship data.

Signed-off-by: Sngt25 <151845701+Sngt25@users.noreply.github.com>
2026-05-01 13:12:51 +01:00
Dan Harrin 61853ee76b fix: Invalid file path validation (#19759) 2026-04-23 11:43:22 +01:00
Dan Harrin d2a690d274 Clean up file path protection feature docs & naming 2026-04-21 12:02:12 +01:00
Dan Harrin 3b521d2ee7 feature: Styling custom block previews with prose (#19741) 2026-04-21 09:33:51 +01:00
Dan Harrin d4c0e0c385 feature: FileUpload/RichEditor file path protection (#19731)
* feature: `FileUpload`/`RIchEditor` file path protection

* more tests

* cs && build
2026-04-20 13:45:14 +01:00
Omar AlnabrisandDan Harrin 49bfa189e9 Evaluate badge color with badge state (#19706)
* Evaluate badge color with badge state

* missing places

* docs

* simplify

* cleanup

* Update HasBadge.php

* fix assertions

---------

Signed-off-by: Dan Harrin <git@danharrin.com>
Co-authored-by: Dan Harrin <git@danharrin.com>
2026-04-20 13:36:26 +01:00
7bf516d8af feat: expose TipTap/ProseMirror globals for custom rich editor extensions (#19559)
* feat: expose TipTap/ProseMirror globals for custom extensions

Custom extensions loaded via RichContentPlugin::getTipTapJsExtensions()
are fetched at runtime via dynamic import(). Each extension bundle must
currently include its own copy of TipTap/ProseMirror, leading to:

- Duplicate ProseMirror instances on the page
- instanceof checks failing across bundles (e.g. DecorationSet)
- ~150-200 KB of redundant JS per extension

This adds window.Filament.TipTap with the core ProseMirror modules
(@tiptap/core, @tiptap/pm/state, @tiptap/pm/view, @tiptap/pm/model)
already bundled in rich-editor.js. Custom extension builds can mark
@tiptap/* as external and resolve from this global at runtime,
sharing the same ProseMirror instance as the host editor.

Non-breaking: existing extensions that bundle their own TipTap
continue to work unchanged.

* Discard changes to packages/forms/dist/components/rich-editor.js

* chore: fix code style

* clean up & docs

---------

Co-authored-by: leek <leek@users.noreply.github.com>
Co-authored-by: Dan Harrin <git@danharrin.com>
2026-04-20 13:24:33 +01:00
d35bc5460e Feat: Add custom openable/downloadable URLs support for file uploads (#19481)
* Add openableUrl support for file uploads

Include server-provided openable URLs in uploaded file metadata and use them for the file open action. JS: add uploadedFile.metadata to the file options and prefer metadata.openableUrl (falling back to file.source) when generating the open link. PHP: introduce a getOpenableUrlUsing closure property and setter, and populate metadata.openableUrl for each stored file by evaluating the callback. This enables customizable/signed URLs or alternate domains for opening uploaded files.

* chore: fix code style

* Add downloadable URL support for file uploads

Support custom downloadable URLs for uploaded files. Backend: add a getDownloadableUrlUsing callback and property on BaseFileUpload, populate metadata.downloadableUrl when isDownloadable() and the callback is set, and ensure openable URL generation checks isOpenable(). Frontend: prefer metadata.downloadableUrl for the download anchor href (fallback to file.source behavior removed). This enables serving custom download links separate from the file source.

* Format conditionals in BaseFileUpload

Remove an extra blank line and standardize conditional formatting in BaseFileUpload: add consistent spacing and braces for the openable/downloadable URL checks and tidy up the getDownloadableUrlUsing method. Purely stylistic changes with no functional impact.

* run composer cs

* clean up

---------

Co-authored-by: Abdulmajeed-Jamaan <Abdulmajeed-Jamaan@users.noreply.github.com>
Co-authored-by: Dan Harrin <git@danharrin.com>
2026-04-20 13:24:23 +01:00
pintendandDan Harrin f618314662 feat: get item index in itemLabel on Repeater (#19430)
* pass index to getItemLabel

* tests, docs, builder

---------

Co-authored-by: Dan Harrin <git@danharrin.com>
2026-04-20 13:23:41 +01:00
Dan Harrin a0ebc37890 task: Easier HTML sanitizer extension (#19680) 2026-04-11 12:59:07 +01:00
Dan Harrin 3f5935f69a feature: Grouped custom rich editor blocks (#19653)
* feature: Grouped custom rich editor blocks

* screenshot

* Update RichContentAttribute.php
2026-04-08 08:55:33 +01:00
Dan Harrin 09aaea6d5d docs: More screenshots (#19548)
* screenshots

* fix cut off sidebar

* Screenshots

* Screenshots

* retake

* fix loading data issue

* retake

* screenshots

* Update custom-toolbar.jpg

* retake

* ss

* retake

* ss

* ss

* ss

* ss

* ss

* ss

* ss

* ss

* Update dashboard.jpg

* ss

* Update openable.jpg

* ss

* ss

* ss

* Update database.sqlite

* Update database.sqlite

* ss

* ss

* ss

* ss

* ss

* ss

* clean up

* cs
2026-03-23 08:29:46 +00:00
Dan Harrin 373943d001 Add more security docs 2026-03-20 09:06:00 +00:00
Dan Harrin 4c5aa4ba63 Update 10-rich-editor.md 2026-03-19 12:05:13 +00:00
Kenny HietbrinkandDan Harrin e8034d6d78 feat: Add afterCreateUsing callback to Repeater for relationship items (#19427)
* feat(forms): Add afterCreateUsing callback to Repeater for relationship items

Adds a new callback that is executed after a new relationship record is created and saved. This allows performing operations that require the record's ID, such as attaching pivot table data or creating related records.

The callback receives the original form data and the newly created model instance

* Update docs

* clean up

---------

Co-authored-by: Dan Harrin <git@danharrin.com>
2026-03-17 19:18:27 +00:00
Chris JonesandDan Harrin 24c771fc1b feat: add dropdown toolbar buttons to Rich Editor (#19278)
* feat: add dropdown toolbar buttons to Rich Editor

Add `ToolbarButtonGroup` config object and `RichEditorDropdownTool`
rendering component to group related toolbar buttons into compact
dropdown menus. Supports icon-based dropdowns and text-label select
mode via `textualButtons()`.

* Clean up

* Update InteractsWithToolbarButtons.php

* screenshots

* remove tests that don't really prove anything

* Update RichEditorTest.php

* Update InteractsWithToolbarButtons.php

---------

Co-authored-by: Dan Harrin <git@danharrin.com>
2026-03-17 18:41:52 +00:00
Dan Harrin 4cacb22642 feature: Additional rich editor heading tools (#19521) 2026-03-17 17:22:38 +00:00
3a3db66ba3 feat: ability for RichEditor plugins to provide enabled/disabled toolbar buttons (#19260)
* WIP

* chore: fix code style

* Fix tests

* fix and clean up

---------

Co-authored-by: ralphjsmit <ralphjsmit@users.noreply.github.com>
Co-authored-by: Dan Harrin <git@danharrin.com>
2026-02-28 22:12:31 +00:00
3d3833d3b1 feat: ability for RichEditor plugins to provide file attachment provider (#19187)
* WIP

* Update composer.lock

* WIP

* chore: fix code style

* fix perf and add better test

---------

Co-authored-by: ralphjsmit <ralphjsmit@users.noreply.github.com>
Co-authored-by: Dan Harrin <git@danharrin.com>
2026-02-28 19:11:50 +01:00
tdsat 0fde47bb27 Update 10-rich-editor.md (#19367)
Small fix in the `setUpRichContent()` example

Signed-off-by: tdsat <10864709+tdsat@users.noreply.github.com>
2026-02-27 12:33:21 +00:00
Dan Harrin 5256ec2138 docs: #[ExposedLivewireMethod] (#19133) 2026-01-29 17:53:47 +00:00
59fdacc54a [v4] tooltips support for ToggleButtons field (#18961)
* introduce tooltips support for ToggleButtons component

* chore: fix code style

* make phpstan happy

* add documentation

* Update HasTooltips.php

* Update 18-toggle-buttons.md

---------

Co-authored-by: CharlieEtienne <CharlieEtienne@users.noreply.github.com>
Co-authored-by: Dan Harrin <git@danharrin.com>
2026-01-22 18:18:32 +00:00
Dan Harrin eda5ecd6e3 feature: MorphToSelect type select toggle buttons (#19045) 2026-01-22 18:10:24 +00:00
Dan Harrin a4fd02e214 Update 09-file-upload.md 2026-01-07 12:56:02 +00:00
ebb61d68ed [4.x] Add mentions to rich editor (#17483)
* added mentions to rich editor

* Updated documentation

* updated doc

* Update rich-editor.blade.php

* Update RichEditor.php

* added to gitignore

* updated git ignore

* updated gitignore

* updated rich editor to allow multiple chars

* added multiple chars to mentions and limit results shown

* revert gitignore changes

* added the dist folder :/

* added possibilite to fetch data async from DB.

* updated docs

* implementation with MentionProvider and async fetch. Labels are fetched by the getOptionLabelUsing function.

* fix phpstan errors

* fixed extrainputs render

* compile

* cleanup

* rename mention provider

* Update extension-mention.js

* comments

* naming

* clean up

* fix labels not loading

* fix bug

* clean up

* fix

* fix

* clean up

* Update utilities.css

* tests and cs

* remove merge tag styling

* clean up

* Update 10-rich-editor.md

* Update 10-rich-editor.md

* Update RichEditorStateCast.php

* fix

* fix

* Update MentionExtension.php

* Update MentionExtension.php

* Update CanFormatState.php

* rebuild

* rebuild

* Update package-lock.json

---------

Signed-off-by: Bruno Pereira <main@bmscpereira.com>
Co-authored-by: Bruno Pereira <coolmanpt7+github@pm.me>
Co-authored-by: Dan Harrin <git@danharrin.com>
2026-01-07 11:42:06 +00:00
Dan Harrin 54b97943ef Rename jsAction() to actionJs() 2026-01-06 09:40:09 +00:00
Dan Harrin f512d88084 feature: File upload aspect ratio forced cropping and validation (#18850)
* feature: File upload aspect ratio validation

* automatic crop

* fix forcing aspect ratio

* fix

* clean up

* Update file-upload.blade.php

* Rename

* clean up
2026-01-04 12:31:40 +00:00
Dan Harrin 5e1e50d644 feature: Schema JS actions (#18840)
* feature: Schema JS actions

* Update 01-overview.md
2026-01-03 16:09:50 +00:00
Marc Jauvin b3583984e1 Add missing words in Field rendering section. (#18838)
Corrected the phrasing regarding Livewire component updates for clarity.

Signed-off-by: Marc Jauvin <marc.jauvin@gmail.com>
2026-01-03 15:35:45 +00:00
AlexisandDan Harrin df4cd4f91f Enable image resizing in RichEditor (#18517)
* fix: new image dimensions in ImageExtension

* Update ImageExtension.php

fix: Type declaration missing

* Update theme.css

* clean up

* make it configurable

* Update extension-image.js

---------

Co-authored-by: Dan Harrin <git@danharrin.com>
2026-01-02 20:39:08 +00:00
Dan Harrin bb66d793a6 feature: saved() control for schema components (#18797)
* feature: `saved()` control for schema components

* Update 04-building-a-standalone-plugin.md

* fix being able to prevent dehydration with saved(false) on field which only has a relationship sometimes

* Update 12-repeater.md

* test case names
2025-12-30 12:11:49 +00:00
d1673d9ffc Fix: Select with searchable and preloaded option empty state #18529 (#18641)
* Fix: Select with searchable and preloaded option empty state #18529
https://github.com/filamentphp/filament/issues/18529

comments

* Introduce isPreloaded in select fields (both forms and tables package).
Make use of isPreloaded to decide whether the showNoResultsMessage should be rendered immediately when the dropdown is opened.

* suggestions

---------

Co-authored-by: Χρήστος Γεωργούλης <chrisgeorgoulis@192.168.2.4>
Co-authored-by: Dan Harrin <git@danharrin.com>
2025-12-29 23:11:50 +00:00
Bas van DintherandDan Harrin 5a8dbf8266 feat: add sortable functionality to Select component (#18618)
* feat: add sortable functionality to Select component

* chore: remove debug console log

* style: fix code style

* rename sortable to reorderable

* fix: mismatch

* clean up

* Update select.blade.php

---------

Signed-off-by: Bas van Dinther <hello@baspa.dev>
Co-authored-by: Dan Harrin <git@danharrin.com>
2025-12-05 14:01:29 +00:00
HanasaandDan Harrin fdf6517612 Feat/wrapping code editor (#18478)
* feat: code editor wrapping

* fix: setup playground

* clean up

---------

Co-authored-by: Dan Harrin <git@danharrin.com>
2025-12-02 21:09:41 +00:00
fukuhara-trustandDan Harrin ffadddc6b7 feat(rich-editor): add table toggle header cell tool and icon (#18247)
* feat(rich-editor): add table toggle header cell tool and icon

* change table toggle header cell icon

* fix: update table toggle header cell SVG icon

---------

Co-authored-by: Dan Harrin <git@danharrin.com>
2025-12-02 20:05:44 +00:00
Dan Harrin 8e150b99cb Update broken docs links 2025-11-28 10:34:53 +00:00
Luca Castelnuovo 93605b4d1d Add getOptionDescriptionFromRecordUsing() to CheckboxList (#18443)
* Add getOptionDescriptionFromRecordUsing property

Signed-off-by: Luca Castelnuovo <luca@proculair.com>

* Update CheckboxList documentation

* Add methods for setting description callback in CheckboxList

* Fill descriptions array for all options using callback

* Fix PHPstan issue

---------

Signed-off-by: Luca Castelnuovo <luca@proculair.com>
2025-11-22 09:37:19 +00:00
7171050212 [4.x] Improved $get utility (#18228)
* Create FluentState.php

* Update HasState.php

* Add fluentState utility to Action.php

* Update Component.php

* Change condition to check for iterable state

* Remove constructor from FluentState class

Removed constructor from FluentState class.

* Update Action.php

* Delete packages/schemas/src/Components/Utilities/FluentState.php

* Update HasState.php

* Update Get.php

* Update Component.php

* Update Get.php

* chore: fix code style

* Refactor enum method to use BackedEnum type hinting

* Update Get.php

* Refactor Get class methods for improved error handling

Refactor methods to remove default parameters and handle exceptions.

* Update Get.php

* chore: fix code style

* Update Get.php

* Refactor date handling and improve error handling

* Fix Carbon import and improve string method return

* chore: fix code style

* Add filled and blank methods to Get class

* Remove unnecessary blank line in Get.php

* enum generic type

* Update 01-overview.md

* Update Get.php

* Update Get.php

* nullable returns

* change nullable default

---------

Co-authored-by: johanmolen <johanmolen@users.noreply.github.com>
Co-authored-by: Dan Harrin <git@danharrin.com>
2025-11-05 09:33:05 +00:00
Al Nahian 7f18e67fee docs: fix broken and outdated documentation links (#18281) 2025-10-20 14:07:38 +01:00
Daniel SpeichertandDan Harrin 297a010398 docs: Fixed documentation for $get() in repeaters (#18269)
* docs: Fixed documentation for $get() in repeaters

Clarified usage of $get() with examples for accessing client_id in repeater items.

Signed-off-by: Daniel Speichert <DSpeichert@users.noreply.github.com>

* Fix formatting in repeater documentation

---------

Signed-off-by: Daniel Speichert <DSpeichert@users.noreply.github.com>
Co-authored-by: Dan Harrin <git@danharrin.com>
2025-10-20 08:28:56 +01:00