wip
This commit is contained in:
1 parent
3376eb6d2e
commit
ec60adb074
9 files changed
+194
-195
No files matched your search
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions;
|
||||
|
||||
use App\Models\CompetitionGroup;
|
||||
use App\Models\StatisticFixtures;
|
||||
use App\Models\StatistikoEvent;
|
||||
|
||||
class LoadSeasons
|
||||
{
|
||||
public static function load($league_id)
|
||||
{
|
||||
// $res = CompetitionGroup::with('country')->where('id', $league_id)->first();
|
||||
// $season_mode = $res->country->season_mode;
|
||||
|
||||
$res = StatistikoEvent::where('league_id', $league_id)
|
||||
->groupBy('season')
|
||||
->orderBy('starttime', 'ASC')
|
||||
->get();
|
||||
|
||||
if (! $res) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$arr = [];
|
||||
foreach ($res as $val) {
|
||||
$arr[$val->season] = $val->season;
|
||||
}
|
||||
|
||||
return $arr;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Filament\Pages;
|
||||
|
||||
use App\Actions\LoadSeasons;
|
||||
use App\Actions\LoadStatisticFixturesLeaguesOptions;
|
||||
use App\Actions\LoadStatisticFixturesMatchOptions;
|
||||
use App\Models\Element;
|
||||
@@ -10,6 +11,7 @@ use App\Models\StatistikoDetail;
|
||||
use BackedEnum;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Forms\Components\DatePicker;
|
||||
use Filament\Forms\Components\Radio;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Slider;
|
||||
use Filament\Pages\Dashboard as BaseDashboard;
|
||||
@@ -21,7 +23,6 @@ use Filament\Schemas\Schema;
|
||||
use Filament\Support\RawJs;
|
||||
use Illuminate\Contracts\Support\Htmlable;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use PhpOption\None;
|
||||
|
||||
class Statistic extends BaseDashboard
|
||||
{
|
||||
@@ -56,8 +57,8 @@ class Statistic extends BaseDashboard
|
||||
->components([
|
||||
Grid::make([
|
||||
'default' => 1,
|
||||
'sm' => 2,
|
||||
'md' => 4,
|
||||
'sm' => 3,
|
||||
'md' => 5,
|
||||
])
|
||||
->columnSpanFull()
|
||||
->extraAttributes([
|
||||
@@ -102,8 +103,6 @@ class Statistic extends BaseDashboard
|
||||
return 'danger';
|
||||
}
|
||||
})
|
||||
// ->prefixIconColor(fn (Get $get): string => $get('similar_past_matches') == 'none' ? 'primary' : '')
|
||||
// ->hidden(fn (Get $get) => $get('similar_past_matches') != 'none')
|
||||
->prefixIcon('phosphor-users-three')
|
||||
->disabled(fn(Get $get) => $get('similar_past_matches') != 'none')
|
||||
->options(function (Get $get) {
|
||||
@@ -128,7 +127,6 @@ class Statistic extends BaseDashboard
|
||||
->hiddenLabel()
|
||||
->placeholder('Team Position')
|
||||
->prefix('Team Position')
|
||||
// ->prefixIconColor(fn (Get $get): string => $get('similar_past_matches') == 'none' ? 'primary' : '')
|
||||
->prefixIcon('phosphor-map-pin')
|
||||
->disabled(fn(Get $get) => $get('similar_past_matches') != 'none')
|
||||
->default('all')
|
||||
@@ -138,33 +136,20 @@ class Statistic extends BaseDashboard
|
||||
'home' => 'Home',
|
||||
'away' => 'Away',
|
||||
]),
|
||||
|
||||
DatePicker::make('start_date')
|
||||
Select::make('season')
|
||||
->hiddenLabel()
|
||||
->native(false)
|
||||
->placeholder('Season')
|
||||
->hidden(fn(Get $get) => $get('season_or_date') == 'date')
|
||||
->prefixIcon('phosphor-calendar-star')
|
||||
->prefixIconColor('primary')
|
||||
->prefixIcon('phosphor-calendar')
|
||||
->live()
|
||||
->prefix('Start')
|
||||
->suffixAction(
|
||||
Action::make('clear_start')
|
||||
->icon('phosphor-x')
|
||||
->color('gray')
|
||||
->action(fn(Set $set) => $set('start_date', null))
|
||||
),
|
||||
DatePicker::make('end_date')
|
||||
->hiddenLabel()
|
||||
->native(false)
|
||||
->prefixIconColor('primary')
|
||||
->prefixIcon('phosphor-calendar')
|
||||
->live()
|
||||
->prefix('End')
|
||||
->suffixAction(
|
||||
Action::make('clear_end')
|
||||
->icon('phosphor-x')
|
||||
->color('gray')
|
||||
->action(fn(Set $set) => $set('end_date', null))
|
||||
),
|
||||
->options(function (Get $get) {
|
||||
return LoadSeasons::load($get('league_id'));
|
||||
})
|
||||
->afterStateUpdated(function (callable $set) {
|
||||
$set('team_id', null);
|
||||
$set('tm_player_id', null);
|
||||
})
|
||||
->live(),
|
||||
Select::make('statistic_type')
|
||||
->hiddenLabel()
|
||||
->placeholder('Statistic Type')
|
||||
@@ -186,10 +171,10 @@ class Statistic extends BaseDashboard
|
||||
->placeholder('Similar Past Matches')
|
||||
->prefixIconColor('primary')
|
||||
->suffix(fn(Get $get): string|HtmlString => $get('similar_past_matches') != 'none' ? new HtmlString('<div class="text-center w-24 font-bold rounded p-1 bg-blue-600 dark:bg-blue-700 text-white dark:text-gray-300">± ' . $get('accuracy') . '</div>') : '')
|
||||
->columnSpan([
|
||||
'default' => 1,
|
||||
'xl' => 2,
|
||||
])
|
||||
// ->columnSpan([
|
||||
// 'default' => 1,
|
||||
// 'xl' => 2,
|
||||
// ])
|
||||
->prefixAction(
|
||||
Action::make('iconInfo')
|
||||
->icon('phosphor-question')
|
||||
@@ -204,9 +189,9 @@ class Statistic extends BaseDashboard
|
||||
$set('team_position', null);
|
||||
})
|
||||
->options([
|
||||
'none' => 'Similar Past Matches: None',
|
||||
'league' => 'Similar Past Matches: League',
|
||||
'all' => 'Similar Past Matches: All Database',
|
||||
'none' => 'SPM: None',
|
||||
'league' => 'SPM: League',
|
||||
'all' => 'SPM: All Database',
|
||||
]),
|
||||
Slider::make('accuracy')
|
||||
// ->label('Accuracy min: 0, max: 0.25, steps: 0.025')
|
||||
@@ -262,6 +247,44 @@ class Statistic extends BaseDashboard
|
||||
'substituted' => 'Substituted',
|
||||
])
|
||||
->live(),
|
||||
DatePicker::make('start_date')
|
||||
->hiddenLabel()
|
||||
->hidden(fn(Get $get) => $get('season_or_date') == 'season')
|
||||
->native(false)
|
||||
->prefixIconColor('primary')
|
||||
->prefixIcon('phosphor-calendar')
|
||||
->live()
|
||||
->prefix('Start')
|
||||
->suffixAction(
|
||||
Action::make('clear_start')
|
||||
->icon('phosphor-x')
|
||||
->color('gray')
|
||||
->action(fn(Set $set) => $set('start_date', null))
|
||||
),
|
||||
DatePicker::make('end_date')
|
||||
->hiddenLabel()
|
||||
->hidden(fn(Get $get) => $get('season_or_date') == 'season')
|
||||
->native(false)
|
||||
->prefixIconColor('primary')
|
||||
->prefixIcon('phosphor-calendar')
|
||||
->live()
|
||||
->prefix('End')
|
||||
->suffixAction(
|
||||
Action::make('clear_end')
|
||||
->icon('phosphor-x')
|
||||
->color('gray')
|
||||
->action(fn(Set $set) => $set('end_date', null))
|
||||
),
|
||||
Radio::make('season_or_date')
|
||||
->columnSpan(2)
|
||||
->inline()
|
||||
->live()
|
||||
->default('season')
|
||||
->hiddenLabel()
|
||||
->options([
|
||||
'season' => 'Season',
|
||||
'date' => 'Date Picker',
|
||||
]),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
@@ -269,6 +292,7 @@ class Statistic extends BaseDashboard
|
||||
protected function tooltip_similar_past_matches(): HtmlString
|
||||
{
|
||||
$str = '<div class="m-3 grid grid-cols-4 gap-2 max-w-lg">';
|
||||
$str .= '<div class="col-span-4 font-bold">Similar Past Matches (SMP)</div>';
|
||||
$str .= '<div class="font-bold">None</div>';
|
||||
$str .= '<div class="col-span-3"><u>Team</u> within selected league</div>';
|
||||
$str .= '<div class="font-bold">League</div>';
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Widgets\Data;
|
||||
|
||||
class HelperTeamPosition
|
||||
{
|
||||
public static function get($filter): string
|
||||
{
|
||||
$tmp = $filter['team_position'] ?? 'none';
|
||||
|
||||
return ucfirst($tmp);
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,10 @@ class LoadEvents
|
||||
|
||||
$team_id = (int) $filter['team_id'] ?? 0;
|
||||
|
||||
$season_or_date = $filter['season_or_date'] ?? 'season';
|
||||
|
||||
// dd($season_or_date);
|
||||
|
||||
$tm_player_id = (int) $filter['tm_player_id'] ?? 0;
|
||||
|
||||
$start = $filter['start_date'] ?? 0;
|
||||
@@ -511,7 +515,8 @@ class LoadEvents
|
||||
if ($res) {
|
||||
|
||||
$media_team = [];
|
||||
$media_league = [];
|
||||
$media_league_h = [];
|
||||
$media_league_a = [];
|
||||
|
||||
// 1) la media dei falli di tutte le partite giocate dal Flamengo
|
||||
// (esempio, giocate 6 partite con falli 17-11-15-14-15-12, la media è 14)
|
||||
@@ -557,39 +562,52 @@ class LoadEvents
|
||||
|
||||
switch ($statistic_type) {
|
||||
case 'gls':
|
||||
$media_league[] = (int) $value['gls_h'];
|
||||
$media_league[] = (int) $value['gls_a'];
|
||||
$media_league_h[] = (int) $value['gls_h'];
|
||||
$media_league_a[] = (int) $value['gls_a'];
|
||||
break;
|
||||
case 'crn':
|
||||
$media_league[] = (int) $value['crn_h'];
|
||||
$media_league[] = (int) $value['crn_a'];
|
||||
$media_league_h[] = (int) $value['crn_h'];
|
||||
$media_league_a[] = (int) $value['crn_a'];
|
||||
break;
|
||||
case 'fls':
|
||||
$media_league[] = (int) $value['fls_h'];
|
||||
$media_league[] = (int) $value['fls_a'];
|
||||
$media_league_h[] = (int) $value['fls_h'];
|
||||
$media_league_a[] = (int) $value['fls_a'];
|
||||
break;
|
||||
case 'ofs':
|
||||
$media_league[] = (int) $value['ofs_h'];
|
||||
$media_league[] = (int) $value['ofs_a'];
|
||||
$media_league_h[] = (int) $value['ofs_h'];
|
||||
$media_league_a[] = (int) $value['ofs_a'];
|
||||
break;
|
||||
case 'crd':
|
||||
$media_league[] = (int) $value['crd_h'];
|
||||
$media_league[] = (int) $value['crd_a'];
|
||||
$media_league_h[] = (int) $value['crd_h'];
|
||||
$media_league_a[] = (int) $value['crd_a'];
|
||||
break;
|
||||
case 'snt':
|
||||
$media_league[] = (int) $value['snt_h'];
|
||||
$media_league[] = (int) $value['snt_a'];
|
||||
$media_league_h[] = (int) $value['snt_h'];
|
||||
$media_league_a[] = (int) $value['snt_a'];
|
||||
break;
|
||||
case 'tsh':
|
||||
$media_league[] = (int) $value['tsh_h'];
|
||||
$media_league[] = (int) $value['tsh_a'];
|
||||
$media_league_h[] = (int) $value['tsh_h'];
|
||||
$media_league_a[] = (int) $value['tsh_a'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
$average_team = 0;
|
||||
if ($team_id)
|
||||
$average_team = round(array_sum($media_team) / \count($media_team), 2);
|
||||
$average_league = round(array_sum($media_league) / \count($media_league), 2);
|
||||
|
||||
switch ($team_position) {
|
||||
case 'home':
|
||||
$average_league = round(array_sum($media_league_h) / \count($media_league_h), 2);
|
||||
break;
|
||||
case 'away':
|
||||
$average_league = round(array_sum($media_league_a) / \count($media_league_a), 2);
|
||||
break;
|
||||
default:
|
||||
$media_league = $media_league_a + $media_league_h;
|
||||
$average_league = round(array_sum($media_league) / \count($media_league), 2);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$data_team = array_fill(0, count($labels), $average_team);
|
||||
$data_league = array_fill(0, count($labels), $average_league);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Filament\Widgets;
|
||||
|
||||
use App\Filament\Widgets\Data\HelperStatisticType;
|
||||
use App\Filament\Widgets\Data\HelperTeamPosition;
|
||||
use App\Filament\Widgets\Data\LoadEvents;
|
||||
use App\Utilities\Round;
|
||||
use Filament\Widgets\StatsOverviewWidget;
|
||||
@@ -30,6 +31,8 @@ class StatsMedianAverage extends StatsOverviewWidget
|
||||
{
|
||||
$data = LoadEvents::load($this->filters, false);
|
||||
|
||||
$team_position = HelperTeamPosition::get($this->filters);
|
||||
|
||||
if (!$data)
|
||||
return [];
|
||||
|
||||
@@ -71,17 +74,6 @@ class StatsMedianAverage extends StatsOverviewWidget
|
||||
$home_team = $data['home_team'];
|
||||
$away_team = $data['away_team'];
|
||||
}
|
||||
// dd($arr_home);
|
||||
// if (! $total_home) {
|
||||
// return [
|
||||
// Stat::make('Number of events', 0),
|
||||
// Stat::make('Average ' . $statistic_type, self::template(0, 0, $home_team, $away_team)),
|
||||
// Stat::make('Median ' . $statistic_type, self::template(0, 0, $home_team, $away_team)),
|
||||
// Stat::make('Win', 0),
|
||||
// Stat::make('Draw', 0),
|
||||
// Stat::make('Lost', 0),
|
||||
// ];
|
||||
// }
|
||||
|
||||
if ($arr_home)
|
||||
$median_home = self::getMedian($arr_home);
|
||||
@@ -112,15 +104,15 @@ class StatsMedianAverage extends StatsOverviewWidget
|
||||
$value_away = 0;
|
||||
|
||||
$boxes = [];
|
||||
$boxes[] = Stat::make('Events', new HtmlString('<div id="number-of-events">' . $total_home . '</div>'))->description('Number')->extraAttributes(['x-init' => "animate('number-of-events', $total_home, 0)"]);
|
||||
$boxes[] = Stat::make($statistic_type, self::template('avhome', 'avaway', $home_team, $away_team))->description('Average Team')->extraAttributes(['x-init' => "animate('avhome', $value_home); animate('avaway', $value_away, 0)"]);
|
||||
$boxes[] = Stat::make('Number', new HtmlString('<div id="number-of-events">' . $total_home . '</div>'))->description('Events')->extraAttributes(['x-init' => "animate('number-of-events', $total_home, 0)"]);
|
||||
$boxes[] = Stat::make('Average ' . $statistic_type, self::template('avhome', 'avaway', $home_team, $away_team))->description('Team ' . $team_position)->extraAttributes(['x-init' => "animate('avhome', $value_home); animate('avaway', $value_away, 0)"]);
|
||||
foreach ($data['datasets'] as $value) {
|
||||
if ($value['label'] == "Average League") {
|
||||
$str = $value['data'][0] ?? 0;
|
||||
$boxes[] = Stat::make($statistic_type, new HtmlString('<div id="number-of-events">' . $str . '</div>'))->description('Average League')->extraAttributes(['x-init' => "animate('number-of-events', $total_home, 0)"]);
|
||||
$boxes[] = Stat::make('Average ' . $statistic_type, new HtmlString('<div id="number-of-events">' . $str . '</div>'))->description('League ' . $team_position)->extraAttributes(['x-init' => "animate('number-of-events', $total_home, 0)"]);
|
||||
}
|
||||
}
|
||||
$boxes[] = Stat::make($statistic_type, self::template('mehome', 'meaway', $home_team, $away_team))->description('Median')->extraAttributes(['x-init' => "animate('mehome', $median_home); animate('meaway', $median_away, 0)"]);
|
||||
$boxes[] = Stat::make('Median ' . $statistic_type, self::template('mehome', 'meaway', $home_team, $away_team))->description($team_position)->extraAttributes(['x-init' => "animate('mehome', $median_home); animate('meaway', $median_away, 0)"]);
|
||||
$boxes[] = Stat::make($data['similar_past_matches'] != 'none' ? '1' : 'Win: ' . $data['results']['w'], new HtmlString('<div id="number-of-win">' . $win . '</div>'))->extraAttributes(['x-init' => "animate('number-of-win', $win, 1)"]);
|
||||
$boxes[] = Stat::make($data['similar_past_matches'] != 'none' ? 'X' : 'Draw: ' . $data['results']['d'], new HtmlString('<div id="number-of-draw">' . $draw . '</div>'))->extraAttributes(['x-init' => "animate('number-of-draw', $draw, 1)"]);
|
||||
$boxes[] = Stat::make($data['similar_past_matches'] != 'none' ? '2' : 'Lost: ' . $data['results']['l'], new HtmlString('<div id="number-of-lost">' . $lost . '</div>'))->extraAttributes(['x-init' => "animate('number-of-lost', $lost, 1)"]);
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
"codewithkyrian/filament-date-range": "^2.2",
|
||||
"filament/filament": "^5.3",
|
||||
"guava/filament-modal-relation-managers": "^3.0",
|
||||
"jaocero/radio-deck": "^3.0",
|
||||
"joaopaulolndev/filament-edit-profile": "^3.0",
|
||||
"laravel/framework": "*",
|
||||
"laravel/tinker": "*",
|
||||
|
||||
Generated
+41
-116
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "d784dfb38ac60f6f4bc9b96c04fbddf2",
|
||||
"content-hash": "f2008484d55fed9d274d3f2ad273d65f",
|
||||
"packages": [
|
||||
{
|
||||
"name": "agencetwogether/hookshelper",
|
||||
@@ -2196,22 +2196,22 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "7.11.1",
|
||||
"version": "7.12.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "5af96f374e0ab4ebd747b8310888c99d3adb0a8c"
|
||||
"reference": "eaa81598031cf57a9e36258c8546defffc994cba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/5af96f374e0ab4ebd747b8310888c99d3adb0a8c",
|
||||
"reference": "5af96f374e0ab4ebd747b8310888c99d3adb0a8c",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/eaa81598031cf57a9e36258c8546defffc994cba",
|
||||
"reference": "eaa81598031cf57a9e36258c8546defffc994cba",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/promises": "^2.5",
|
||||
"guzzlehttp/psr7": "^2.11",
|
||||
"guzzlehttp/psr7": "^2.12",
|
||||
"php": "^7.2.5 || ^8.0",
|
||||
"psr/http-client": "^1.0",
|
||||
"symfony/deprecation-contracts": "^2.5 || ^3.0",
|
||||
@@ -2304,7 +2304,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/guzzle/issues",
|
||||
"source": "https://github.com/guzzle/guzzle/tree/7.11.1"
|
||||
"source": "https://github.com/guzzle/guzzle/tree/7.12.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -2320,7 +2320,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-06-07T22:54:06+00:00"
|
||||
"time": "2026-06-16T22:11:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
@@ -2408,16 +2408,16 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "2.11.0",
|
||||
"version": "2.12.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "bbb5e61349fa5cb822b3e87842b951088b76b81f"
|
||||
"reference": "9b38012e7b54f594707e6db52c684dc0a74b3a43"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/bbb5e61349fa5cb822b3e87842b951088b76b81f",
|
||||
"reference": "bbb5e61349fa5cb822b3e87842b951088b76b81f",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/9b38012e7b54f594707e6db52c684dc0a74b3a43",
|
||||
"reference": "9b38012e7b54f594707e6db52c684dc0a74b3a43",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2507,7 +2507,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/psr7/issues",
|
||||
"source": "https://github.com/guzzle/psr7/tree/2.11.0"
|
||||
"source": "https://github.com/guzzle/psr7/tree/2.12.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -2523,7 +2523,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-06-02T12:30:48+00:00"
|
||||
"time": "2026-06-16T21:50:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/uri-template",
|
||||
@@ -2611,81 +2611,6 @@
|
||||
],
|
||||
"time": "2026-06-12T21:33:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jaocero/radio-deck",
|
||||
"version": "v3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/199ocero/radio-deck.git",
|
||||
"reference": "6ef5b16cfcc55f4c425f1fa303ca59f07919e393"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/199ocero/radio-deck/zipball/6ef5b16cfcc55f4c425f1fa303ca59f07919e393",
|
||||
"reference": "6ef5b16cfcc55f4c425f1fa303ca59f07919e393",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"filament/forms": "^4.0|^5.0",
|
||||
"illuminate/contracts": "^11.0|^12.0|^13.0",
|
||||
"php": "^8.2",
|
||||
"spatie/laravel-package-tools": "^1.15.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"laravel/pint": "^1.24",
|
||||
"nunomaduro/collision": "^8.1",
|
||||
"orchestra/testbench": "^9.0",
|
||||
"pestphp/pest": "^2.0",
|
||||
"pestphp/pest-plugin-arch": "^2.0",
|
||||
"pestphp/pest-plugin-laravel": "^2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"JaOcero\\RadioDeck\\RadioDeckServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"JaOcero\\RadioDeck\\": "src/",
|
||||
"JaOcero\\RadioDeck\\Database\\Factories\\": "database/factories/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jay-Are Ocero",
|
||||
"email": "199ocero@gmail.com",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Turn filament default radio button into a selectable card with icons, title and description.",
|
||||
"homepage": "https://github.com/jaocero/radio-deck",
|
||||
"keywords": [
|
||||
"filament-form",
|
||||
"filament-plugin",
|
||||
"filamentphp",
|
||||
"jaocero",
|
||||
"laravel",
|
||||
"radio-deck"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/jaocero/radio-deck/issues",
|
||||
"source": "https://github.com/jaocero/radio-deck"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/jaocero",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2026-04-04T12:36:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jaybizzle/crawler-detect",
|
||||
"version": "v1.4.0",
|
||||
@@ -4712,16 +4637,16 @@
|
||||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
"version": "3.11.4",
|
||||
"version": "3.12.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/CarbonPHP/carbon.git",
|
||||
"reference": "e890471a3494740f7d9326d72ce6a8c559ffee60"
|
||||
"reference": "6e7853a668c3107294aff38d42bf760ec02126b6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/e890471a3494740f7d9326d72ce6a8c559ffee60",
|
||||
"reference": "e890471a3494740f7d9326d72ce6a8c559ffee60",
|
||||
"url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/6e7853a668c3107294aff38d42bf760ec02126b6",
|
||||
"reference": "6e7853a668c3107294aff38d42bf760ec02126b6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4813,7 +4738,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-04-07T09:57:54+00:00"
|
||||
"time": "2026-06-14T20:41:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nette/php-generator",
|
||||
@@ -6737,16 +6662,16 @@
|
||||
},
|
||||
{
|
||||
"name": "spatie/simple-excel",
|
||||
"version": "3.9.0",
|
||||
"version": "3.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spatie/simple-excel.git",
|
||||
"reference": "67095053ff6037284fd213abd84259ea4faca7aa"
|
||||
"reference": "2aa4cd9da6f29a23e4f7b6f4c6944dce204ea47a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/spatie/simple-excel/zipball/67095053ff6037284fd213abd84259ea4faca7aa",
|
||||
"reference": "67095053ff6037284fd213abd84259ea4faca7aa",
|
||||
"url": "https://api.github.com/repos/spatie/simple-excel/zipball/2aa4cd9da6f29a23e4f7b6f4c6944dce204ea47a",
|
||||
"reference": "2aa4cd9da6f29a23e4f7b6f4c6944dce204ea47a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -6785,7 +6710,7 @@
|
||||
"spatie"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/spatie/simple-excel/tree/3.9.0"
|
||||
"source": "https://github.com/spatie/simple-excel/tree/3.10.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -6793,7 +6718,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2026-02-22T08:49:24+00:00"
|
||||
"time": "2026-06-15T06:21:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "stevebauman/location",
|
||||
@@ -10475,16 +10400,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/pint",
|
||||
"version": "v1.29.1",
|
||||
"version": "v1.29.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/pint.git",
|
||||
"reference": "0770e9b7fafd50d4586881d456d6eb41c9247a80"
|
||||
"reference": "da1d1111a6aa2e082d2a388b194afe1ba0a05d14"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/pint/zipball/0770e9b7fafd50d4586881d456d6eb41c9247a80",
|
||||
"reference": "0770e9b7fafd50d4586881d456d6eb41c9247a80",
|
||||
"url": "https://api.github.com/repos/laravel/pint/zipball/da1d1111a6aa2e082d2a388b194afe1ba0a05d14",
|
||||
"reference": "da1d1111a6aa2e082d2a388b194afe1ba0a05d14",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -10495,14 +10420,14 @@
|
||||
"php": "^8.2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^3.95.1",
|
||||
"illuminate/view": "^12.56.0",
|
||||
"larastan/larastan": "^3.9.6",
|
||||
"friendsofphp/php-cs-fixer": "^3.95.8",
|
||||
"illuminate/view": "^12.62.0",
|
||||
"larastan/larastan": "^3.10.0",
|
||||
"laravel-zero/framework": "^12.1.0",
|
||||
"laravel/agent-detector": "^2.0.2",
|
||||
"mockery/mockery": "^1.6.12",
|
||||
"nunomaduro/termwind": "^2.4.0",
|
||||
"pestphp/pest": "^3.8.6",
|
||||
"shipfastlabs/agent-detector": "^1.1.3"
|
||||
"pestphp/pest": "^3.8.6"
|
||||
},
|
||||
"bin": [
|
||||
"builds/pint"
|
||||
@@ -10539,7 +10464,7 @@
|
||||
"issues": "https://github.com/laravel/pint/issues",
|
||||
"source": "https://github.com/laravel/pint"
|
||||
},
|
||||
"time": "2026-04-20T15:26:14+00:00"
|
||||
"time": "2026-06-16T15:34:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/sail",
|
||||
@@ -13555,16 +13480,16 @@
|
||||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
"version": "2.4.0",
|
||||
"version": "2.4.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/webmozarts/assert.git",
|
||||
"reference": "9007ea6f45ecf352a9422b36644e4bfc039b9155"
|
||||
"reference": "2ccb7c2e821038c03a3e6e1700c570c158c55f70"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/webmozarts/assert/zipball/9007ea6f45ecf352a9422b36644e4bfc039b9155",
|
||||
"reference": "9007ea6f45ecf352a9422b36644e4bfc039b9155",
|
||||
"url": "https://api.github.com/repos/webmozarts/assert/zipball/2ccb7c2e821038c03a3e6e1700c570c158c55f70",
|
||||
"reference": "2ccb7c2e821038c03a3e6e1700c570c158c55f70",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -13615,9 +13540,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/webmozarts/assert/issues",
|
||||
"source": "https://github.com/webmozarts/assert/tree/2.4.0"
|
||||
"source": "https://github.com/webmozarts/assert/tree/2.4.1"
|
||||
},
|
||||
"time": "2026-05-20T13:07:01+00:00"
|
||||
"time": "2026-06-15T15:31:57+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
|
||||
@@ -1 +1 @@
|
||||
/*! tailwindcss v4.1.15 | MIT License | https://tailwindcss.com */@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-300:oklch(80.8% 0.114 19.571);--color-red-500:oklch(63.7% 0.237 25.331);--color-sky-400:oklch(74.6% 0.16 232.661);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-gray-950:oklch(13% 0.028 261.692);--color-black:#000;--color-white:#fff;--spacing:0.25rem;--breakpoint-sm:40rem;--breakpoint-md:48rem;--breakpoint-lg:64rem;--breakpoint-xl:80rem;--breakpoint-2xl:96rem;--container-3xs:16rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:0.75rem;--text-xs--line-height:calc(1 / 0.75);--text-sm:0.875rem;--text-sm--line-height:calc(1.25 / 0.875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-0.05em;--tracking-tight:-0.025em;--leading-loose:2;--radius-md:0.375rem;--radius-lg:0.5rem;--radius-xl:0.75rem;--ease-in:cubic-bezier(0.4,0,1,1);--ease-out:cubic-bezier(0,0,0.2,1);--ease-in-out:cubic-bezier(0.4,0,0.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(0.4,0,0.6,1) infinite;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-primary-50:var(--color-primary-50);--color-primary-100:var(--color-primary-100);--color-primary-200:var(--color-primary-200);--color-primary-300:var(--color-primary-300);--color-primary-400:var(--color-primary-400);--color-primary-500:var(--color-primary-500);--color-primary-600:var(--color-primary-600);--color-primary-700:var(--color-primary-700);--color-primary-800:var(--color-primary-800);--color-primary-900:var(--color-primary-900);--color-primary-950:var(--color-primary-950)}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inLine truncated
|
||||
/*! tailwindcss v4.1.15 | MIT License | https://tailwindcss.com */@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-300:oklch(80.8% 0.114 19.571);--color-red-500:oklch(63.7% 0.237 25.331);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-gray-950:oklch(13% 0.028 261.692);--color-black:#000;--color-white:#fff;--spacing:0.25rem;--text-sm:0.875rem;--text-sm--line-height:calc(1.25 / 0.875);--font-weight-normal:400;--font-weight-medium:500;--radius-lg:0.5rem;--ease-in-out:cubic-bezier(0.4,0,0.2,1);--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){&{color:color-mix(in oklab,currentcolor 50%,transparent)}}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.visible{visibility:visible}.static{position:static}.contents{display:contents}.grid{display:grid}.hidden{display:none}.inline{display:inline}.select-all{-webkit-user-select:all;user-select:all}}.fi-fo-checkbox-list{display:flex;flex-direction:column;& .fi-fo-checkbox-list-search-input-wrp{margin-bottom:calc(var(--spacing) * 4)}& .fi-fo-checkbox-actions{margin-bottom:calc(var(--spacing) * 2)}& .fi-fo-checkbox-options{border-color:var(--color-gray-200);border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:1px;display:flex;flex-direction:column;--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,rgba(0,0,0,.05));box-shadow:var(--tw-inset-shadow),var(-Line truncated
|
||||
@@ -1,5 +1,5 @@
|
||||
function animate(element, end, fixtotwo) {
|
||||
// console.log(element, end);
|
||||
function animate(element, end, duration = 500) {
|
||||
console.log(element, end);
|
||||
|
||||
var element = document.getElementById(element);
|
||||
const startTime = performance.now();
|
||||
@@ -10,7 +10,7 @@ function animate(element, end, fixtotwo) {
|
||||
|
||||
const updateCount = (currentTime) => {
|
||||
const elapsedTime = currentTime - startTime;
|
||||
let progress = elapsedTime / 500;
|
||||
let progress = elapsedTime / duration;
|
||||
|
||||
// Clamp progress to ensure it doesn't overshoot
|
||||
if (progress > 1) progress = 1;
|
||||
@@ -21,11 +21,7 @@ function animate(element, end, fixtotwo) {
|
||||
// Calculate current value and round to integer
|
||||
const currentCount = Math.round(end * easedProgress * 100) / 100;
|
||||
|
||||
if (fixtotwo) {
|
||||
element.innerHTML = currentCount.toFixed(2);
|
||||
} else {
|
||||
element.innerHTML = currentCount;
|
||||
}
|
||||
element.innerHTML = currentCount;
|
||||
|
||||
if (progress < 1) {
|
||||
requestAnimationFrame(updateCount);
|
||||
|
||||
Reference in new issue
Block a user