From 8796e092d173ec4a503351b82a48ae5c857862c5 Mon Sep 17 00:00:00 2001 From: leandrocfe Date: Tue, 14 Mar 2023 01:12:48 +0000 Subject: [PATCH 1/2] Fix styling --- examples/Area/BasicAreaChart.php | 6 ------ examples/Bar/BasicBarChart.php | 6 ------ examples/Boxplot/BasicBoxPlotChart.php | 6 ------ examples/Bubble/BasicBubbleChart.php | 6 ------ examples/Candlestick/BasicCandlestickChart.php | 6 ------ examples/Column/BasicColumnChart.php | 6 ------ examples/Column/ColumnChartWithAnnotations.php | 6 ------ examples/Column/GradientColumnChart.php | 6 ------ examples/Column/RoundedColumnChart.php | 6 ------ examples/Heatmap/BasicHeatmapChart.php | 6 ------ examples/Line/BasicLineChart.php | 6 ------ examples/Mixed/LineColumnChart.php | 6 ------ examples/Pie/BasicPieChart.php | 6 ------ examples/Pie/DonutChart.php | 6 ------ examples/PolarArea/BasicPolarAreaChart.php | 6 ------ examples/Radar/BasicRadarChart.php | 6 ------ examples/Radialbar/BasicRadialBarChart.php | 6 ------ examples/Radialbar/GradientCircleChart.php | 6 ------ examples/RangeArea/BasicRangeAreaChart.php | 6 ------ examples/Scatter/BasicScatterChart.php | 6 ------ .../TimelineRangeBars/BasicTimelineRangeBarsChart.php | 6 ------ examples/Treemap/BasicTreemapChart.php | 6 ------ src/Commands/FilamentApexChartsCommand.php | 11 ----------- src/FilamentApexChartsServiceProvider.php | 6 +----- 24 files changed, 1 insertion(+), 148 deletions(-) diff --git a/examples/Area/BasicAreaChart.php b/examples/Area/BasicAreaChart.php index 1aab865..2b1fc39 100644 --- a/examples/Area/BasicAreaChart.php +++ b/examples/Area/BasicAreaChart.php @@ -8,23 +8,17 @@ class BasicAreaChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'basicAreaChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'BasicAreaChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/Bar/BasicBarChart.php b/examples/Bar/BasicBarChart.php index 77a00c2..714bb5b 100644 --- a/examples/Bar/BasicBarChart.php +++ b/examples/Bar/BasicBarChart.php @@ -8,23 +8,17 @@ class BasicBarChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'basicBarChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'BasicBarChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/Boxplot/BasicBoxPlotChart.php b/examples/Boxplot/BasicBoxPlotChart.php index ebcc0f1..a12e53b 100644 --- a/examples/Boxplot/BasicBoxPlotChart.php +++ b/examples/Boxplot/BasicBoxPlotChart.php @@ -8,23 +8,17 @@ class BasicBoxPlotChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'basicBoxPlotChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'BasicBoxPlotChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/Bubble/BasicBubbleChart.php b/examples/Bubble/BasicBubbleChart.php index 29bf427..0dfe8d5 100644 --- a/examples/Bubble/BasicBubbleChart.php +++ b/examples/Bubble/BasicBubbleChart.php @@ -8,23 +8,17 @@ class BasicBubbleChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'basicBubbleChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'BasicBubbleChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/Candlestick/BasicCandlestickChart.php b/examples/Candlestick/BasicCandlestickChart.php index 1f9bf22..fa03829 100644 --- a/examples/Candlestick/BasicCandlestickChart.php +++ b/examples/Candlestick/BasicCandlestickChart.php @@ -8,23 +8,17 @@ class BasicCandlestickChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'basicCandlestickChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'BasicCandlestickChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/Column/BasicColumnChart.php b/examples/Column/BasicColumnChart.php index a6d76e7..05074d0 100644 --- a/examples/Column/BasicColumnChart.php +++ b/examples/Column/BasicColumnChart.php @@ -8,23 +8,17 @@ class BasicColumnChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'basicColumnChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'BasicColumnChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/Column/ColumnChartWithAnnotations.php b/examples/Column/ColumnChartWithAnnotations.php index a3bde56..92a209c 100644 --- a/examples/Column/ColumnChartWithAnnotations.php +++ b/examples/Column/ColumnChartWithAnnotations.php @@ -8,23 +8,17 @@ class ColumnChartWithAnnotations extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'columnChartWithAnnotations'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'ColumnChartWithAnnotations'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/Column/GradientColumnChart.php b/examples/Column/GradientColumnChart.php index 9fdba63..3c34a56 100644 --- a/examples/Column/GradientColumnChart.php +++ b/examples/Column/GradientColumnChart.php @@ -8,23 +8,17 @@ class GradientColumnChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'gradientColumnChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'GradientColumnChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/Column/RoundedColumnChart.php b/examples/Column/RoundedColumnChart.php index 66a6ca8..3585288 100644 --- a/examples/Column/RoundedColumnChart.php +++ b/examples/Column/RoundedColumnChart.php @@ -8,23 +8,17 @@ class RoundedColumnChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'roundedColumnChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'RoundedColumnChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/Heatmap/BasicHeatmapChart.php b/examples/Heatmap/BasicHeatmapChart.php index f09fb78..5e884c5 100644 --- a/examples/Heatmap/BasicHeatmapChart.php +++ b/examples/Heatmap/BasicHeatmapChart.php @@ -8,23 +8,17 @@ class BasicHeatmapChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'basicHeatmapChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'BasicHeatmapChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/Line/BasicLineChart.php b/examples/Line/BasicLineChart.php index 6c36455..bf700da 100644 --- a/examples/Line/BasicLineChart.php +++ b/examples/Line/BasicLineChart.php @@ -8,23 +8,17 @@ class BasicLineChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'basicLineChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'BasicLineChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/Mixed/LineColumnChart.php b/examples/Mixed/LineColumnChart.php index 6b891d8..f9730ae 100644 --- a/examples/Mixed/LineColumnChart.php +++ b/examples/Mixed/LineColumnChart.php @@ -8,23 +8,17 @@ class LineColumnChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'lineColumnChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'LineColumnChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/Pie/BasicPieChart.php b/examples/Pie/BasicPieChart.php index aa95c1b..9f8812e 100644 --- a/examples/Pie/BasicPieChart.php +++ b/examples/Pie/BasicPieChart.php @@ -8,23 +8,17 @@ class BasicPieChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'basicPieChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'BasicPieChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/Pie/DonutChart.php b/examples/Pie/DonutChart.php index 9e6ecd5..f3e6f3d 100644 --- a/examples/Pie/DonutChart.php +++ b/examples/Pie/DonutChart.php @@ -8,23 +8,17 @@ class DonutChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'donutChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'DonutChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/PolarArea/BasicPolarAreaChart.php b/examples/PolarArea/BasicPolarAreaChart.php index ba40111..bdea658 100644 --- a/examples/PolarArea/BasicPolarAreaChart.php +++ b/examples/PolarArea/BasicPolarAreaChart.php @@ -8,23 +8,17 @@ class BasicPolarAreaChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'basicPolarAreaChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'BasicPolarAreaChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/Radar/BasicRadarChart.php b/examples/Radar/BasicRadarChart.php index 3d57c55..5a55912 100644 --- a/examples/Radar/BasicRadarChart.php +++ b/examples/Radar/BasicRadarChart.php @@ -8,23 +8,17 @@ class BasicRadarChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'basicRadarChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'BasicRadarChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/Radialbar/BasicRadialBarChart.php b/examples/Radialbar/BasicRadialBarChart.php index 7424fe2..bcc33a4 100644 --- a/examples/Radialbar/BasicRadialBarChart.php +++ b/examples/Radialbar/BasicRadialBarChart.php @@ -8,23 +8,17 @@ class BasicRadialBarChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'basicRadialBarChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'BasicRadialBarChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/Radialbar/GradientCircleChart.php b/examples/Radialbar/GradientCircleChart.php index 8ac90af..3af677b 100644 --- a/examples/Radialbar/GradientCircleChart.php +++ b/examples/Radialbar/GradientCircleChart.php @@ -8,23 +8,17 @@ class GradientCircleChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'gradientCircleChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'GradientCircleChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/RangeArea/BasicRangeAreaChart.php b/examples/RangeArea/BasicRangeAreaChart.php index d9914fa..665e4ca 100644 --- a/examples/RangeArea/BasicRangeAreaChart.php +++ b/examples/RangeArea/BasicRangeAreaChart.php @@ -8,23 +8,17 @@ class BasicRangeAreaChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'basicRangeAreaChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'BasicRangeAreaChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/Scatter/BasicScatterChart.php b/examples/Scatter/BasicScatterChart.php index d258ec3..b4d646d 100644 --- a/examples/Scatter/BasicScatterChart.php +++ b/examples/Scatter/BasicScatterChart.php @@ -8,23 +8,17 @@ class BasicScatterChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'basicScatterChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'BasicScatterChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/TimelineRangeBars/BasicTimelineRangeBarsChart.php b/examples/TimelineRangeBars/BasicTimelineRangeBarsChart.php index 87d8f7e..b05b670 100644 --- a/examples/TimelineRangeBars/BasicTimelineRangeBarsChart.php +++ b/examples/TimelineRangeBars/BasicTimelineRangeBarsChart.php @@ -8,23 +8,17 @@ class BasicTimelineRangeBarsChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'basicTimelineRangeBarsChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'BasicTimelineRangeBarsChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/examples/Treemap/BasicTreemapChart.php b/examples/Treemap/BasicTreemapChart.php index c03f567..5446da0 100644 --- a/examples/Treemap/BasicTreemapChart.php +++ b/examples/Treemap/BasicTreemapChart.php @@ -8,23 +8,17 @@ class BasicTreemapChart extends ApexChartWidget { /** * Chart Id - * - * @var string */ protected static string $chartId = 'basicTreemapChart'; /** * Widget Title - * - * @var string|null */ protected static ?string $heading = 'BasicTreemapChart'; /** * Chart options (series, labels, types, size, animations...) * https://apexcharts.com/docs/options - * - * @return array */ protected function getOptions(): array { diff --git a/src/Commands/FilamentApexChartsCommand.php b/src/Commands/FilamentApexChartsCommand.php index f26595a..c34d328 100644 --- a/src/Commands/FilamentApexChartsCommand.php +++ b/src/Commands/FilamentApexChartsCommand.php @@ -29,36 +29,26 @@ class FilamentApexChartsCommand extends Command /** * Filesystem instance - * - * @var Filesystem */ protected Filesystem $files; /** * Widget - * - * @var string */ private string $widget; /** * Chart Type - * - * @var string */ private string $chartType; /** * Chart options - * - * @var array */ private array $chartOptions; /** * Create a new command instance. - * - * @param Filesystem $files */ public function __construct(Filesystem $files) { @@ -150,7 +140,6 @@ public function getSourceFile() /** * Replace the stub variables(key) with the desire value * - * @param $stub * @param array $stubVariables * @return bool|mixed|string */ diff --git a/src/FilamentApexChartsServiceProvider.php b/src/FilamentApexChartsServiceProvider.php index 1809227..0d6d8b9 100644 --- a/src/FilamentApexChartsServiceProvider.php +++ b/src/FilamentApexChartsServiceProvider.php @@ -5,16 +5,12 @@ use Filament\PluginServiceProvider; use Illuminate\Support\Facades\Blade; use Leandrocfe\FilamentApexCharts\Commands\FilamentApexChartsCommand; -use Leandrocfe\FilamentApexCharts\Components\Chart; -use Leandrocfe\FilamentApexCharts\Components\FilterForm; -use Leandrocfe\FilamentApexCharts\Components\Header; -use Leandrocfe\FilamentApexCharts\Components\WidgetContent; use Spatie\LaravelPackageTools\Package; class FilamentApexChartsServiceProvider extends PluginServiceProvider { protected array $beforeCoreScripts = [ - 'filament-apex-charts-scripts' => __DIR__ . '/../dist/apexcharts.js', + 'filament-apex-charts-scripts' => __DIR__.'/../dist/apexcharts.js', ]; public function configurePackage(Package $package): void From 7b48acd2258eacb5759d5ede19b2883c07682bca Mon Sep 17 00:00:00 2001 From: Leandro Costa Ferreira Date: Fri, 2 Jun 2023 08:04:44 -0300 Subject: [PATCH 2/2] 1.0.3 --- CHANGELOG.md | 9 +++ .../views/widgets/components/header.blade.php | 58 ++++++++++--------- 2 files changed, 39 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 206e53c..2109d08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 1.0.3 + +### Fixed + +- Add x-cloak to dropdown filter by [howdu](https://github.com/howdu). +- Fix duplicate database queries by [howdu](https://github.com/howdu). +- ability to hide header content by [Valpuia](https://github.com/Valpuia). +- Fix dark mode if theme is not set by [billmn](https://github.com/billmn). + ## 1.0.2 ### Fixed diff --git a/resources/views/widgets/components/header.blade.php b/resources/views/widgets/components/header.blade.php index 4c5ae56..9f733f1 100644 --- a/resources/views/widgets/components/header.blade.php +++ b/resources/views/widgets/components/header.blade.php @@ -1,37 +1,39 @@
-
+ @if ($heading) +
- - {!! $heading !!} - + + {!! $heading !!} + -
+
-
- @if ($filters) - - @endif +
+ @if ($filters) + + @endif - @if ($filterForm) - - {!! $filterForm !!} - - @endif + @if ($filterForm) + + {!! $filterForm !!} + + @endif +
-
-
+
- + + @endif