Skip to content

Commit

Permalink
v3-Develop to v3-Master - Beta 004 (#1425)
Browse files Browse the repository at this point in the history
* Beta Fixes - Publishing Views/Localizations.  Beta Improvements - Search Options (#1324)

* Update setSearchDebounce, add setSearchThrottle/setSearchBlur

* Remove Lazy Test

* Remove Lazy Tests - Update Docs

* Update Views Publish Path

* Add Translations Publish Option

* Update ChangeLog

* Add Reusable Columns

* Add Tests for Prepend/Append Cols

---------

Co-authored-by: lrljoe <[email protected]>

* Bulk Actions Fix - v3 (#1326)

* Update setSearchDebounce, add setSearchThrottle/setSearchBlur

* Remove Lazy Test

* Remove Lazy Tests - Update Docs

* Update Views Publish Path

* Add Translations Publish Option

* Update ChangeLog

* Add Reusable Columns

* Add Tests for Prepend/Append Cols

* Column Select Fixes

* Fix test

* Add docs for setSearchPlaceholder

* Move Filter Specific Docs ino Filter-Types

* Fix styling

* Remove extraneous space

* Adjusting Selectable Test

* Fix For BulkActions Dropdown

* Fixes for ColumnSelect

* Update ChangeLog

* Test Fix for Selectable Columns

* Remove Faulty Test

---------

Co-authored-by: lrljoe <[email protected]>

* Fix Column Select - Select All state (#1333)

* Fix Column Select - All

* Update ChangeLog

* Add NonArray setAdditionalSelects Test (#1337)

* Test Additions (#1339)

* Add NonArray setAdditionalSelects Test

* Update for FrontendAssets Test

* Fix styling

---------

Co-authored-by: lrljoe <[email protected]>

* Add Third Party Tests (#1340)

* Add NonArray setAdditionalSelects Test

* Update for FrontendAssets Test

* Add ThirdPartyScripts/Styles to Test

* Fix styling

---------

Co-authored-by: lrljoe <[email protected]>

* Third Party Asset Tests (#1341)

* Add NonArray setAdditionalSelects Test

* Update for FrontendAssets Test

* Add ThirdPartyScripts/Styles to Test

* Add ThirdParty Tests

* Fix AutoInjection Issue

* Fix 3rd party test

* Set default back to remote 3rd party assets

* Add CodeCov YML

* Update CodeCov - 80% minimum

* Add Filter Custom Pills Blade Test

* Fix styling

* Add formatted column test

* Column - Get Formatted Contents Test

* Fix styling

---------

Co-authored-by: lrljoe <[email protected]>

* Lazy Loading Fix (#1355)

* Add fix for lazy loading

* Fix styling

---------

Co-authored-by: lrljoe <[email protected]>

* Spacing fixes

* v3 - Missing Tests - Pagination Related Tests (#1363)

* Add missing pagination helper tests


---------

Co-authored-by: lrljoe <[email protected]>

* v3 - Missing Tests - Broken Tables (Missing Primary Key/Builder) (#1362)

* Add missing component visuals tests & failed tables

* Update Exception Expectation

* Temporary test swapping to check Exception throwing

---------

Co-authored-by: lrljoe <[email protected]>

* v3 - Add setSearchFieldAttribute Options (#1361)

* Add setSearchFieldAttribute Options


---------

Co-authored-by: lrljoe <[email protected]>

* v3 - Column Select Fixes & Tweaks (#1360)

* ColumnSelect Fixes - Phase 1

* Update "Select All" to use counts

* Missing closing bracket

* All Are Selected -> Move to method in Helpers

* ColSelectFixes

* Ensure event fires

* Update ColumnsSelectedTest

* Fix superfluous empty array return

* Remove superfluous default return

* Adjust Tests - Include Coverage For ExcludeDeselectedCols

* Add Tests For AllColsSelected

* Fix styling

* Fixes for Deselected Cols

* Fix styling

* Updates to Changelog

* Removing ColumnSelected Event Test - Temporary

* Add default true to replace removed test

* Add improved test

---------

Co-authored-by: lrljoe <[email protected]>

* Fix ServiceProvider Fault (#1366)

* V3 Frontend Asset Tweaks (#1371)

* Check for "original" property

* Adjusting order of request validations

* Updates to Asset Injection Methods

* Fix assertViewIs is not working (#67)
Contribs By: Jackson Tong <[email protected]

* Tweaks for Auto Injection Options

* Test Updates - Frontend Assets

* Add ThirdParty Basic Header Tests

* Add Initial Debuggable DTO Test

* V3 - Reordering Fixes (#1373)

* Reordering Fixes - Performance & Toggling

* Fix styling

---------

Co-authored-by: lrljoe <[email protected]>

* Bundler Import Options (#1377)

* Add All Option

* Update Import Paths

* Add minified CSS Versions

* V3 Restore setTrAttributes (#1378)

* Add setTrAttributes back into use

* Fix styling

---------

Co-authored-by: lrljoe <[email protected]>

* Update Reorder Documentation (#1381)

* Update Reorder Documentation

* Update ChangeLog - Merge Unreleased

* Update Docs - Advanced Example, Add Including Assets (#1383)

* Fix DateRangeFilter Blade Items (#1394)

* Add setFilterLabelAttributes Capability (#1397)

* Add setFilterLabelAttributes Capability

* Update filter-label to use customLabelAttributes to avoid any potential conflicts

* Adjust documentation for setCustomFilterLabel

---------

Co-authored-by: lrljoe <[email protected]>

* v3 - Apply Reorder Sorting When Reordering (#1402)

* Fix for reorder sort not applying

* Fix styling

---------

Co-authored-by: lrljoe <[email protected]>

* v3 - Fix Unrequired Update Call (#1407)

* Fixes for Additional Update

* Increase cache time to 1 day from 1 hour

* Fix tests for cache time

* Update mapping to use min.css

---------

Co-authored-by: lrljoe <[email protected]>

* v3 - Adding CollapseAlways Option for Columns (#1403)

* Add CollapseAlways & Fix ReorderColumn

* Remove superfluous md:hidden from the icon

* Tweaks for Column Collapsing For BS4/BS5

* Fix Collapsed on Bootstrap

* Tweak Bootstrap Theme

---------

Co-authored-by: lrljoe <[email protected]>

* Minor tweaks to blades for reorder cols (#1411)

* V3 - Fix Reorder For Bootstrap (#1412)

* Minor tweaks to blades for reorder cols

* Bootstrap Reorder Toggle

* Add DiscordBot (#1413)

---------

Co-authored-by: Abdul Majeed Shehzad <[email protected]>

* Docs livewire namespace fix (#1420)

* Fixed Livewire namespace in docs

* Updated livewire url in docs

---------

Co-authored-by: lrljoe <[email protected]>

* V3  - Fix Localisation (#1424)

* Fix Localisations

* Fix styling

* Load Original and Publish Localisation Paths

* Fix styling

* v3 - Add Loading Placeholder (#1421)

* Initial Loading Placeholder Code, Use Hourglass Spinner

* Add wrappers, Class Merging, Colouring

* Renaming Traits - Adding LoadingPlaceholder Tests, Add Placeholder Test Table

* Update Docs for Placeholder

---------

Co-authored-by: lrljoe <[email protected]>

---------

Co-authored-by: lrljoe <[email protected]>
Co-authored-by: Anthony Rappa <[email protected]>
  • Loading branch information
3 people authored Oct 17, 2023
1 parent 11b7afc commit 707b6b8
Show file tree
Hide file tree
Showing 27 changed files with 736 additions and 25 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to `laravel-livewire-tables` will be documented in this file

## [3.0.0-beta.4] - 2023-10-17
- Introduction of Loading Placeholder
- Docs livewire namespace fix [Here](https://github.com/rappasoft/laravel-livewire-tables/pull/1420)
- Add CollapseAlways capability for Columns
- Fix localisation bug

## [3.0.0-beta.3] - 2023-10-13
- Fix for Livewire ^3.0.6 where the table loading causes an additional lifecycle
- Add unminified files to .gitattributes export-ignore
Expand Down Expand Up @@ -1000,4 +1006,4 @@ Ground Up Rebuild
[0.1.4]: https://github.com/rappasoft/laravel-livewire-tables/compare/v0.1.3...v0.1.4
[0.1.3]: https://github.com/rappasoft/laravel-livewire-tables/compare/v0.1.2...v0.1.3
[0.1.2]: https://github.com/rappasoft/laravel-livewire-tables/compare/v0.1.1...v0.1.2
[0.1.1]: https://github.com/rappasoft/laravel-livewire-tables/compare/v0.1.0...v0.1.1
[0.1.1]: https://github.com/rappasoft/laravel-livewire-tables/compare/v0.1.0...v0.1.1
80 changes: 80 additions & 0 deletions docs/datatable/loaders.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: Loaders
weight: 4
---

With the introduction of Livewire 3, there are several new methods available for use:

## Loading Placeholder
```php
public function configure(): void
{
$this->setLoadingPlaceholderBlade('');
}
```

### setLoadingPlaceholderStatus
```php
public function configure(): void
{
$this->setLoadingPlaceholderStatus(true);
}
```

### setLoadingPlaceholderEnabled
```php
public function configure(): void
{
$this->setLoadingPlaceholderEnabled();
}
```


### setLoadingPlaceholderDisabled
```php
public function configure(): void
{
$this->setLoadingPlaceholderDisabled();
}
```

### setLoadingPlaceholderContent
```php
public function configure(): void
{
$this->setLoadingPlaceholderContent('');
}
```

### setLoadingPlaceHolderAttributes
```php
public function configure(): void
{
$this->setLoadingPlaceHolderAttributes([]);
}
```

### setLoadingPlaceHolderIconAttributes
```php
public function configure(): void
{
$this->setLoadingPlacehosetLoadingPlaceHolderIconAttributeslderBlade([]);
}
```

### setLoadingPlaceHolderWrapperAttributes
```php
public function configure(): void
{
$this->setLoadingPlaceHolderWrapperAttributes([]);
}
```


### setLoadingPlaceholderBlade
```php
public function configure(): void
{
$this->setLoadingPlaceholderBlade('');
}
```
4 changes: 2 additions & 2 deletions docs/examples/advanced-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ weight: 2
```php
<?php

namespace App\Http\Livewire;
namespace App\Livewire;

use App\Models\{Tag,User};
use Illuminate\Database\Eloquent\Builder;
Expand Down Expand Up @@ -294,4 +294,4 @@ class UsersTable extends DataTableComponent
@endif
</div>
@endif
```
```
4 changes: 2 additions & 2 deletions docs/examples/basic-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ weight: 1
```php
<?php

namespace App\Http\Livewire;
namespace App\Livewire;

use App\Models\User;
use Rappasoft\LaravelLivewireTables\DataTableComponent;
Expand Down Expand Up @@ -37,4 +37,4 @@ class UsersTable extends DataTableComponent
];
}
}
```
```
4 changes: 2 additions & 2 deletions docs/misc/custom-markup.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Adding Custom Markup
weight: 3
weight: 4
---

If you would like to append any custom markup right before the end of the component, you may use the `customView` method and return a view.
Expand All @@ -12,4 +12,4 @@ public function customView(): string
{
return 'includes.custom';
}
```
```
2 changes: 1 addition & 1 deletion docs/misc/debugging.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Debugging
weight: 4
weight: 5
---

## Configuration
Expand Down
78 changes: 78 additions & 0 deletions docs/misc/loading-placeholder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
title: Loading Placeholder
weight: 2
---

When running complex filters or searches, or displaying larger number of records, you can make use of the built-in Loading Placeholder, this is disabled by default.

### setLoadingPlaceholderStatus
You may pass a boolean to this, which will either enable (true) or disable (false) the loading placeholder

```php
public function configure(): void
{
$this->setLoadingPlaceholderStatus(true);
}
```

### setLoadingPlaceholderEnabled

Use this method to enable the loading placeholder:

```php
public function configure(): void
{
$this->setLoadingPlaceholderEnabled();
}
```

### setLoadingPlaceholderDisabled

Use this method to disable the loading placeholder:

```php
public function configure(): void
{
$this->setLoadingPlaceholderDisabled();
}
```

### setLoadingPlaceholderContent

You may use this method to set custom text for the placeholder:

```php
public function configure(): void
{
$this->setLoadingPlaceholderContent('Text To Display');
}
```
### setLoadingPlaceHolderWrapperAttributes

This method allows you to customise the attributes for the &lt;tr&gt; element used as a Placeholder when the table is loading. Similar to other setAttribute methods, this accepts a range of attributes, and a boolean "default", which will enable/disable the default attributes.

```php
public function configure(): void
{
$this->setLoadingPlaceHolderWrapperAttributes([
'class' => 'text-bold',
'default' => false,
]);
}

```

### setLoadingPlaceHolderIconAttributes

This method allows you to customise the attributes for the &lt;div&gt; element that is used solely for the PlaceholderIcon. Similar to other setAttribute methods, this accepts a range of attributes, and a boolean "default", which will enable/disable the default attributes.

```php
public function configure(): void
{
$this->setLoadingPlaceHolderIconAttributes([
'class' => 'lds-hourglass',
'default' => false,
]);
}

```
2 changes: 1 addition & 1 deletion docs/misc/multiple-tables.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Multiple Tables Same Page
weight: 2
weight: 3
---

This feature works for mutiple tables on the same page that are **different** components.
Expand Down
2 changes: 1 addition & 1 deletion docs/misc/saving-state.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Saving Table State
weight: 5
weight: 6
---

There may be occasions that you'd like to save the table state, for example if you have a complex set of filters, search parameters, or simply to remember which page you were on!
Expand Down
4 changes: 2 additions & 2 deletions docs/start/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ weight: 6

To generate a new datatable component you can use the `make:datatable` command:

Create a new datatable component called `UserTable` in `App\Http\Livewire` that uses the `App\Models\User` model.
Create a new datatable component called `UserTable` in `App\Livewire` that uses the `App\Models\User` model.

```bash
php artisan make:datatable UserTable User
Expand All @@ -17,7 +17,7 @@ php artisan make:datatable UserTable User

You may pass a Custom Path to your model, should it not be contained within the "App" or "App\Models" namespaces:

Create a new datatable component called `TestTable` in `App\Http\Livewire` that uses the `App\Domains\Test\Models\Example` model.
Create a new datatable component called `TestTable` in `App\Livewire` that uses the `App\Domains\Test\Models\Example` model.

```bash
php artisan make:datatable TestTable example app/Domains/Test/Models/
Expand Down
6 changes: 3 additions & 3 deletions docs/start/rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ weight: 5

## Rendering Components

You render components the same way you [render](https://laravel-livewire.com/docs/2.x/rendering-components) any Livewire component.
You render components the same way you [render](https://livewire.laravel.com/docs/components#rendering-components) any Livewire component.

Your component at `App\Http\Livewire\UsersTable.php`
Your component at `App\Livewire\UsersTable.php`

```html
<livewire:users-table />
Expand All @@ -24,7 +24,7 @@ By default, all components will use the theme in the config file. But if for som

## Using sub-folders

If your component does not live in `App\Http\Livewire`, you can specify a different sub-folder. For example if your component lives in `App\Http\Livewire\Backend\Users` you would use the following:
If your component does not live in `App\Livewire`, you can specify a different sub-folder. For example if your component lives in `App\Livewire\Backend\Users` you would use the following:

```html
<livewire:backend.users.users-table />
Expand Down
2 changes: 1 addition & 1 deletion docs/start/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ The following are required to use this package regardless of what theme you choo

- PHP 8.1+
- [Laravel 10.x](https://laravel.com)
- [Laravel Livewire 3.x](https://laravel-livewire.com)
- [Laravel Livewire 3.x](https://livewire.laravel.com)
2 changes: 1 addition & 1 deletion docs/usage/creating-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This is what a bare bones component looks like before your customization:
```php
<?php

namespace App\Http\Livewire;
namespace App\Livewire;

use App\Models\User;
use Rappasoft\LaravelLivewireTables\DataTableComponent;
Expand Down
38 changes: 38 additions & 0 deletions resources/css/laravel-livewire-tables.css
Original file line number Diff line number Diff line change
Expand Up @@ -362,3 +362,41 @@ label[dir=rtl] .range-slider {
.superhide {
display: none;
}

.lds-hourglass {
display: inline-block;
position: relative;
width: 80px;
height: 80px;
}
.lds-hourglass:after {
content: " ";
display: block;
border-radius: 50%;
width: 0;
height: 0;
margin: 8px;
box-sizing: border-box;
border: 32px solid #000;
border-color: #fff transparent #fff transparent;
animation: lds-hourglass 1.2s infinite;
}
.dark .lds-hourglass:after {
border: 32px solid #FFF;

}


@keyframes lds-hourglass {
0% {
transform: rotate(0);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
50% {
transform: rotate(900deg);
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
100% {
transform: rotate(1800deg);
}
}
Loading

0 comments on commit 707b6b8

Please sign in to comment.