Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #37

Merged
merged 76 commits into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
92ca2ef
Update README.md
lrljoe Mar 7, 2023
7c05acd
Update php-unit.yml
lrljoe Mar 7, 2023
6abbdc6
Update php-unit-pull.yml
lrljoe Mar 7, 2023
7808b39
Update .gitignore
lrljoe Mar 7, 2023
60c46dd
Update code coverage badge
github-actions[bot] Mar 7, 2023
3bafe47
Possibly Breaking Commit
lrljoe Mar 7, 2023
b5c9aff
Merge branch 'develop' of https://github.com/LowerRockLabs/LaravelLiv…
lrljoe Mar 7, 2023
42f0a96
Fix styling
lrljoe Mar 7, 2023
04cdb06
Remove Tat
lrljoe Mar 7, 2023
cb38e08
Merge branch 'develop' of https://github.com/LowerRockLabs/LaravelLiv…
lrljoe Mar 7, 2023
c376fd1
Dusk
lrljoe Mar 7, 2023
7d34f4f
S
lrljoe Mar 7, 2023
ee009e1
Update code coverage badge
github-actions[bot] Mar 7, 2023
68d83ec
Dusk Tests Returned
lrljoe Mar 8, 2023
a8456cd
Merge branch 'develop' of https://github.com/LowerRockLabs/LaravelLiv…
lrljoe Mar 8, 2023
b3c1841
Update code coverage badge
github-actions[bot] Mar 8, 2023
d58c772
Dusk Initial Tests
lrljoe Mar 8, 2023
8c4c6bd
Merge branch 'develop' of https://github.com/LowerRockLabs/LaravelLiv…
lrljoe Mar 8, 2023
9fb1ba1
Fix styling
lrljoe Mar 8, 2023
d7ed54c
Initial Dusk Tests
lrljoe Mar 8, 2023
2dd7c68
Merge branch 'develop' of https://github.com/LowerRockLabs/LaravelLiv…
lrljoe Mar 8, 2023
1168fde
Test Fixes
lrljoe Mar 8, 2023
c8d8818
Fix styling
lrljoe Mar 8, 2023
c352d52
Test Fixes
lrljoe Mar 8, 2023
8760809
Merge branch 'develop' of https://github.com/LowerRockLabs/LaravelLiv…
lrljoe Mar 8, 2023
dfbabab
Fix A non-empty PSR-4 prefix must end with a namespace separator
lrljoe Mar 8, 2023
2f6bd9f
Update code coverage badge
github-actions[bot] Mar 8, 2023
7f919e5
Add customisable width documentation
lrljoe Mar 9, 2023
2990a79
Merge branch 'develop' of https://github.com/LowerRockLabs/LaravelLiv…
lrljoe Mar 9, 2023
171cb76
Test fixes - customFilterMenuWidth
lrljoe Mar 9, 2023
530b9e2
Test fixes - customFilterMenuWidth
lrljoe Mar 9, 2023
c5a1c70
Update code coverage badge
github-actions[bot] Mar 9, 2023
6c167ce
Testing l8
lrljoe Mar 9, 2023
ad52cb8
Merge branch 'develop' of https://github.com/LowerRockLabs/LaravelLiv…
lrljoe Mar 9, 2023
a1d1a1e
Remove L8
lrljoe Mar 9, 2023
a5ba6a9
Update Readme
lrljoe Mar 9, 2023
f363847
Update code coverage badge
github-actions[bot] Mar 9, 2023
7f1022b
Cross-Check For Larastan
lrljoe Mar 9, 2023
5c13fdb
Merge branch 'develop' of https://github.com/LowerRockLabs/LaravelLiv…
lrljoe Mar 9, 2023
5fec087
Add L8 In
lrljoe Mar 9, 2023
ae19456
Add LaraStan 1.x support
lrljoe Mar 9, 2023
43e707d
Add Dusk 6.0
lrljoe Mar 9, 2023
0fcd345
Test
lrljoe Mar 9, 2023
6692834
Fix styling
lrljoe Mar 9, 2023
a0f471a
PHPUnit - Laravel 8 Support
lrljoe Mar 9, 2023
e095a91
Merge branch 'develop' of https://github.com/LowerRockLabs/LaravelLiv…
lrljoe Mar 9, 2023
b6b14b1
Removing Laravel 8 from Main Branch
lrljoe Mar 9, 2023
a9fad0c
Update code coverage badge
github-actions[bot] Mar 9, 2023
1dfd26e
Migrate to Ubuntu 22.04 for Tests
lrljoe Mar 9, 2023
c917018
Merge branch 'develop' of https://github.com/LowerRockLabs/LaravelLiv…
lrljoe Mar 9, 2023
e6cf146
Update code coverage badge
github-actions[bot] Mar 9, 2023
15429fd
Updated Readme
lrljoe Mar 9, 2023
cac0195
Merge branch 'develop' of https://github.com/LowerRockLabs/LaravelLiv…
lrljoe Mar 9, 2023
3761cc3
Update code coverage badge
github-actions[bot] Mar 9, 2023
dabcb31
Adding Images
lrljoe Mar 9, 2023
d4b3557
Merge branch 'develop' of https://github.com/LowerRockLabs/LaravelLiv…
lrljoe Mar 9, 2023
4d2f49a
Update code coverage badge
github-actions[bot] Mar 9, 2023
c23ca4a
Fixes
lrljoe Mar 10, 2023
407e8f5
Merge branch 'develop' of https://github.com/LowerRockLabs/LaravelLiv…
lrljoe Mar 10, 2023
f35b9dc
Update code coverage badge
github-actions[bot] Mar 10, 2023
69001e8
Fix CLover
lrljoe Mar 10, 2023
5f4330a
Merge branch 'develop' of https://github.com/LowerRockLabs/LaravelLiv…
lrljoe Mar 10, 2023
ac3e2af
Fixing Pills for SmartSelect
lrljoe Mar 10, 2023
db96d3a
Z-Index Fixes
lrljoe Mar 10, 2023
2e5535d
Test Fixes
lrljoe Mar 10, 2023
8405111
ReadMe Update - Demo Include
lrljoe Mar 10, 2023
398d786
Smart Fixes
lrljoe Mar 10, 2023
d5d97c4
Merge branch 'main' into develop
lrljoe Mar 10, 2023
d1291a1
Remove Ignore Images
lrljoe Mar 10, 2023
7b1b9b4
Update code coverage badge
github-actions[bot] Mar 10, 2023
715c4fb
Remove Ignore badgets
lrljoe Mar 10, 2023
da630b4
Merge branch 'develop' of https://github.com/LowerRockLabs/LaravelLiv…
lrljoe Mar 10, 2023
201e485
PHPStan L8
lrljoe Mar 10, 2023
38203ee
Update code coverage badge
github-actions[bot] Mar 10, 2023
69170fb
Table ReadMe Fixes
lrljoe Mar 10, 2023
332be1c
Merge branch 'develop' of https://github.com/LowerRockLabs/LaravelLiv…
lrljoe Mar 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ phpunit.txt
.php-cs-fixer.cache
src/DateRangeFilter.php
.phpunit.cache/*
docs/images/badges/phpunit-coverage-develop.svg
tests/Views/SmartSelectFilterTest.php
srcb/
/build/
Expand All @@ -29,6 +28,5 @@ srcb/
/build
build/coverage.txt
build/report.junit.xml
docs/images/badges/
clover.xml
clover.xml
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
![PHP Unit](https://github.com/LowerRockLabs/LaravelLivewireTablesAdvancedFilters/actions/workflows/php-unit-pull.yml/badge.svg)
![PHP Stan](https://github.com/LowerRockLabs/LaravelLivewireTablesAdvancedFilters/actions/workflows/php-unit-pull.yml/badge.svg)
![PHP Stan L8](https://github.com/LowerRockLabs/LaravelLivewireTablesAdvancedFilters/actions/workflows/php-stan-pull.yml/badge.svg)

Dev Branch
![PHP Unit](https://github.com/LowerRockLabs/LaravelLivewireTablesAdvancedFilters/actions/workflows/php-unit.yml/badge.svg?branch=develop)
![PHP Stan](https://github.com/LowerRockLabs/LaravelLivewireTablesAdvancedFilters/actions/workflows/php-stan.yml/badge.svg?branch=develop)

# LaravelLivewireTablesAdvancedFilters
Advanced filters for Rappasoft Laravel Livewire Tables v2.0 and above
Expand All @@ -14,10 +13,14 @@ Advanced filters for Rappasoft Laravel Livewire Tables v2.0 and above
* Smart Select (Select2 Style)
* Component Filter (Under Development)

Demo Available Here:
[http://tabledemo.lowerrocklabs.com/](http://tabledemo.lowerrocklabs.com/)

Package is currently under active development & testing, please use caution when using in a production environment.
# Current Status

| Filter | Tailwind 3 | Tailwind 2 | Bootstrap 4 | Bootstrap 5 |
| :--- | :---: | :---: | :---: |
| :--- | :---: | :---: | :---: | :---: |
| Number Range | ✓ | ✓ | ✓ | ✓ |
| Date Range | ✓ | ✓ | ✓ | ✓ |
| Date/Time Picker | ✓ | ✓ | ✓ | ✓ |
Expand Down
865 changes: 434 additions & 431 deletions clover.xml

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions docs/images/badges/phpunit-coverage-8.1-develop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions docs/images/badges/phpunit-coverage-8.2-develop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class="inline-block w-11/12 text-sm font-medium leading-5 text-gray-700 dark:tex

<!-- Start Existing Pop-Over -->
<div x-cloak
class="w-full rounded-md relative inline-flex place-items-end justify-items-end items-end pr-2 smartSelectExistingPopOverWrapper"
class="w-full z-50 rounded-md relative inline-flex place-items-end justify-items-end items-end pr-2 smartSelectExistingPopOverWrapper"
role="menu" aria-orientation="vertical" aria-labelledby="menu-button">
<x-livewiretablesadvancedfilters::elements.smartselect-popover :theme="$theme" :iconStyling="$iconStyling" />
</div>
Expand All @@ -142,7 +142,7 @@ class="w-full rounded-md relative inline-flex place-items-end justify-items-end
'border-solid border-2 rounded-md border-gray-300 dark:border-gray-600': currentFilteredList
.length > 0
}"
class="flex-col w-full overflow-visible z-50">
class="flex-col w-full overflow-visible z-30">
<ul class="bg-white dark:bg-gray-700 flex-col w-full ">
<template x-for="(filteredItem, index) in currentFilteredList" :key="filteredItem.id">
<li class="px-2 py-1 hover:bg-blue-500 dark:hover:bg-gray-400"
Expand Down
4 changes: 2 additions & 2 deletions src/SmartSelectFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ public function getFilterPillValue($value): ?string
$values = [];
if (is_array($value)) {
foreach ($value as $valItem) {
$values[] = implode(',', $this->generatePillArray($valItem));
$values[] = implode(' - ', $this->generatePillArray($valItem));
}
} else {
$values[] = $this->generatePillArray($value);
$values[] = implode(' - ', $this->generatePillArray($value));
}

return (is_array($values) && (count($values) > 0)) ? implode(', ', $values) : '';
Expand Down
10 changes: 4 additions & 6 deletions tests/Standard/Views/SmartSelectFilterComplexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,12 @@ public function can_get_filter_pill_value(): void

$this->assertSame('American Shorthair', $filter->getFilterPillValue(['1']));

$this->assertSame('American Shorthair', $filter->getFilterPillValue('1'));

$this->assertSame('', $filter->getFilterPillValue(['1457']));
$this->assertSame('1457 - test', $filter->getFilterPillValue([1457 => ['id' => '1457', 'name' => 'test']]));
$this->assertSame('', $filter->getFilterPillValue([1457 => ['id' => '1457', 'name' => 'test']]));

$filter->setFilterPillValues(['1' => 'Test']);

$this->assertSame('Test', $filter->getFilterPillValue(['1']));
$this->assertSame('American Shorthair', $filter->getFilterPillValue(['1']));
}

/** @test */
Expand All @@ -280,7 +278,7 @@ public function can_get_filter_pill_value_deep_array(): void

$filter = SmartSelectFilter::make('Active')
->options($this->breedQuery);
$this->assertSame('1457 - test - test', $filter->getFilterPillValue([1457 => ['id' => '1457', 'name' => 'test', 'first' => 'test']]));
$this->assertSame('', $filter->getFilterPillValue([1457 => ['id' => '1457', 'name' => 'test', 'first' => 'test']]));
}

/** @test */
Expand All @@ -295,7 +293,7 @@ public function can_get_filter_pill_value_array_key(): void

$filter = SmartSelectFilter::make('Active')
->options($this->breedQuery);
$this->assertSame('1457 - test - test', $filter->getFilterPillValue([3 => ['id' => '1457', 'name' => 'test', 'first' => 'test']]));
$this->assertSame('', $filter->getFilterPillValue([3 => ['id' => '1457', 'name' => 'test', 'first' => 'test']]));
}

/** @test */
Expand Down
4 changes: 2 additions & 2 deletions tests/Standard8/Views/SmartSelectFilterComplexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public function can_get_filter_pill_value_deep_array(): void

$filter = SmartSelectFilter::make('Active')
->options($this->breedQuery);
$this->assertSame('1457 - test - test', $filter->getFilterPillValue([1457 => ['id' => '1457', 'name' => 'test', 'first' => 'test']]));
$this->assertSame('', $filter->getFilterPillValue([1457 => ['id' => '1457', 'name' => 'test', 'first' => 'test']]));
}

/** @test */
Expand All @@ -295,7 +295,7 @@ public function can_get_filter_pill_value_array_key(): void

$filter = SmartSelectFilter::make('Active')
->options($this->breedQuery);
$this->assertSame('1457 - test - test', $filter->getFilterPillValue([3 => ['id' => '1457', 'name' => 'test', 'first' => 'test']]));
$this->assertSame('', $filter->getFilterPillValue([3 => ['id' => '1457', 'name' => 'test', 'first' => 'test']]));
}

/** @test */
Expand Down