Skip to content

Commit 2fbec1f

Browse files
committed
Merge branch '4.x' into 5.x
2 parents c0373ac + 0213bbf commit 2fbec1f

14 files changed

Lines changed: 51 additions & 21 deletions

File tree

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
All notable changes to `inspirecms-support` will be documented in this file.
44

5+
## 4.0.7 - 2026-03-27
6+
7+
### What's Changed in 4.0.7
8+
9+
#### 🐛 Bug fixes
10+
11+
- Bug fix - failed to apply 'node' to the arguments of tree node's action (a072d9d)
12+
13+
### Installation
14+
15+
**Full Changelog**: https://github.com/solutionforest/inspirecms-support/compare/4.0.6...4.0.7
16+
17+
## 4.0.6 - 2026-03-27
18+
19+
<!-- Release notes generated using configuration in .github/release.yml at 4.x -->
20+
**Full Changelog**: https://github.com/solutionforest/inspirecms-support/compare/4.0.5...4.0.6
21+
522
## 4.0.5 - 2026-01-15
623

724
### What's Changed in 4.0.5
@@ -79,6 +96,8 @@ composer require solution-forest/inspirecms-support:^1.2.2
7996

8097

8198

99+
100+
82101
```
83102
## Sync version with core - 2025-08-19
84103

@@ -113,6 +132,8 @@ composer require solution-forest/inspirecms-support:^1.1.3
113132

114133

115134

135+
136+
116137
```
117138
## 1.1.2 - 2025-08-11
118139

src/Base/Models/Interfaces/HasRecursiveRelationshipsInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Illuminate\Database\Eloquent\Relations\BelongsTo;
77
use Illuminate\Database\Eloquent\Relations\HasMany;
88
use Illuminate\Support\Collection;
9+
use SolutionForest\InspireCms\Support\Models\Concerns\HasRecursiveRelationships;
910
use Staudenmeir\LaravelAdjacencyList\Eloquent\Relations\Ancestors;
1011
use Staudenmeir\LaravelAdjacencyList\Eloquent\Relations\Bloodline;
1112
use Staudenmeir\LaravelAdjacencyList\Eloquent\Relations\Descendants;
@@ -22,7 +23,7 @@
2223
* @property null | TModel $parent
2324
* @property Collection<TModel> $parentAndSelf
2425
*
25-
* @see \SolutionForest\InspireCms\Support\Models\Concerns\HasRecursiveRelationships
26+
* @see HasRecursiveRelationships
2627
*/
2728
interface HasRecursiveRelationshipsInterface
2829
{

src/Helpers/TreeNodeActionHelper.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Filament\Actions\Action;
77
use Filament\Actions\ActionGroup;
88
use Illuminate\Database\Eloquent\Model;
9+
use Livewire\Component;
910

1011
class TreeNodeActionHelper
1112
{
@@ -14,7 +15,7 @@ class TreeNodeActionHelper
1415
* @param Closure(Model|string|int|null):Model|null $resolveRecordUsing
1516
* @return array<Action|ActionGroup>
1617
*/
17-
public static function getNodeActions(array $node, array $livewireActions, ?Closure $resolveRecordUsing = null, string | Model | null $model = null, ?\Livewire\Component $livewire = null, string $idName = 'id', string $actionName = '__visibleActions'): array
18+
public static function getNodeActions(array $node, array $livewireActions, ?Closure $resolveRecordUsing = null, string | Model | null $model = null, ?Component $livewire = null, string $idName = 'id', string $actionName = '__visibleActions'): array
1819
{
1920
$actionNames = $node[$actionName] ?? [];
2021

@@ -36,7 +37,7 @@ public static function getNodeActions(array $node, array $livewireActions, ?Clos
3637
if ($action instanceof Action) {
3738
if (in_array($action->getName(), $actionNames)) {
3839

39-
$action = $action->arguments(['node' => $node]);
40+
$action = $action(['node' => $node]);
4041

4142
if ($model && is_string($model && is_a(Model::class, $model, true))) {
4243
$action = $action->model($model);

src/InspireCmsSupportServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function packageRegistered(): void
7575
});
7676
// Media library config END
7777

78-
\SolutionForest\InspireCms\Support\Facades\ResolverRegistry::register($this->app);
78+
Facades\ResolverRegistry::register($this->app);
7979
}
8080

8181
public function packageBooted(): void

src/Macros/BlueprintMarcos.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
namespace SolutionForest\InspireCms\Support\Macros;
44

5+
use Illuminate\Database\Schema\Blueprint;
6+
57
/**
6-
* @see \Illuminate\Database\Schema\Blueprint
8+
* @see Blueprint
79
*/
810
class BlueprintMarcos
911
{

src/MediaLibrary/Concerns/HasFilters.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use SolutionForest\InspireCms\Support\MediaLibrary\FilterType;
1111

1212
/**
13-
* @property \Filament\Schemas\Schema $filterForm
13+
* @property Schema $filterForm
1414
*/
1515
trait HasFilters
1616
{

src/MediaLibrary/Concerns/HasItemActions.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,9 @@ protected function getMediaItemActions(): array
5656

5757
public function getVisibleMediaItemActions(): array
5858
{
59-
return array_filter(
60-
$this->getMediaItemActions(),
61-
fn (Action | ActionGroup $action): bool => $action->isVisible(),
62-
);
59+
// Return cached (configured) actions so that record-based visibility
60+
// closures are evaluated per-item in the view (actions.blade.php).
61+
return array_values($this->cachedMediaItemActions);
6362
}
6463

6564
/**

src/MediaLibrary/Concerns/HasSorts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Illuminate\Database\Eloquent\Builder;
1111

1212
/**
13-
* @property \Filament\Schemas\Schema $sortForm
13+
* @property Schema $sortForm
1414
*/
1515
trait HasSorts
1616
{

src/MediaLibrary/Livewire/FolderBrowserComponent.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace SolutionForest\InspireCms\Support\MediaLibrary\Livewire;
44

5+
use Illuminate\Database\Eloquent\Collection;
56
use Illuminate\Database\Eloquent\Model;
67
use Livewire\Attributes\Lazy;
78
use Livewire\Attributes\Reactive;
@@ -25,7 +26,7 @@ class FolderBrowserComponent extends Component implements HasItemActions
2526

2627
public function boot()
2728
{
28-
if ($this->folders && $this->folders instanceof \Illuminate\Database\Eloquent\Collection) {
29+
if ($this->folders && $this->folders instanceof Collection) {
2930
$this->folders->loadCount('children');
3031
}
3132
}

src/MediaLibrary/Livewire/MediaLibraryComponent.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Filament\Support\Colors\Color;
1010
use Filament\Support\Facades\FilamentIcon;
1111
use Illuminate\Auth\Access\AuthorizationException;
12+
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
1213
use Illuminate\Database\Eloquent\Builder;
1314
use Illuminate\Database\Eloquent\Model;
1415
use Illuminate\Support\Collection;
@@ -38,7 +39,7 @@
3839
use function Filament\authorize;
3940

4041
/**
41-
* @property \Filament\Schemas\Schema $uploadForm
42+
* @property Schema $uploadForm
4243
*/
4344
class MediaLibraryComponent extends Component implements HasItemActions, HasItemBulkActions
4445
{
@@ -527,7 +528,7 @@ protected function mutateSortData(array $data): array
527528
/**
528529
* Get the media assets from the parent.
529530
*
530-
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<int, Model&MediaAsset>
531+
* @return LengthAwarePaginator<int, Model&MediaAsset>
531532
*/
532533
#[Computed(persist: true, seconds: 120)]
533534
public function assets()
@@ -664,7 +665,7 @@ protected function changeParent($key)
664665
}
665666

666667
/**
667-
* @return \Illuminate\Database\Eloquent\Model & MediaAsset |null
668+
* @return Model & MediaAsset |null
668669
*/
669670
protected function getParentRecord()
670671
{

0 commit comments

Comments
 (0)