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

v3-Develop to v3-Master - Beta 004 #1425

Merged
merged 36 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1d1da19
Beta Fixes - Publishing Views/Localizations. Beta Improvements - Sea…
lrljoe Aug 31, 2023
135297e
Bulk Actions Fix - v3 (#1326)
lrljoe Sep 3, 2023
3967e15
Fix Column Select - Select All state (#1333)
lrljoe Sep 3, 2023
648a6ca
Merge branch 'v3-master' into v3-develop
lrljoe Sep 3, 2023
4ee351e
Add NonArray setAdditionalSelects Test (#1337)
lrljoe Sep 3, 2023
32556cd
Test Additions (#1339)
lrljoe Sep 3, 2023
9ec84f1
Add Third Party Tests (#1340)
lrljoe Sep 3, 2023
74b547c
Third Party Asset Tests (#1341)
lrljoe Sep 4, 2023
b68ab26
Lazy Loading Fix (#1355)
lrljoe Sep 17, 2023
e609f13
Spacing fixes
rappasoft Sep 18, 2023
d6e6512
v3 - Missing Tests - Pagination Related Tests (#1363)
lrljoe Sep 21, 2023
ae87ac2
v3 - Missing Tests - Broken Tables (Missing Primary Key/Builder) (#1362)
lrljoe Sep 21, 2023
e2a3199
v3 - Add setSearchFieldAttribute Options (#1361)
lrljoe Sep 22, 2023
e7c10c1
v3 - Column Select Fixes & Tweaks (#1360)
lrljoe Sep 22, 2023
62db217
Fix ServiceProvider Fault (#1366)
lrljoe Sep 23, 2023
65ce494
V3 Frontend Asset Tweaks (#1371)
lrljoe Sep 26, 2023
19b79b2
V3 - Reordering Fixes (#1373)
lrljoe Sep 26, 2023
9cdf451
Bundler Import Options (#1377)
lrljoe Sep 28, 2023
6c977c4
V3 Restore setTrAttributes (#1378)
lrljoe Oct 1, 2023
1e6c159
Update Reorder Documentation (#1381)
lrljoe Oct 3, 2023
32de139
Merge branch 'v3-master' into v3-develop
lrljoe Oct 3, 2023
66ece40
Update Docs - Advanced Example, Add Including Assets (#1383)
lrljoe Oct 4, 2023
154f726
Fix DateRangeFilter Blade Items (#1394)
lrljoe Oct 6, 2023
16ccfe1
Add setFilterLabelAttributes Capability (#1397)
lrljoe Oct 8, 2023
323deee
Merge branch 'v3-master' into v3-develop
lrljoe Oct 8, 2023
429b54f
v3 - Apply Reorder Sorting When Reordering (#1402)
lrljoe Oct 8, 2023
eff02e4
v3 - Fix Unrequired Update Call (#1407)
lrljoe Oct 13, 2023
1b1d574
v3 - Adding CollapseAlways Option for Columns (#1403)
lrljoe Oct 13, 2023
9d42d0f
Merge branch 'v3-master' into v3-develop
lrljoe Oct 13, 2023
31ae8fe
Minor tweaks to blades for reorder cols (#1411)
lrljoe Oct 13, 2023
c0f00ea
V3 - Fix Reorder For Bootstrap (#1412)
lrljoe Oct 13, 2023
bbd73cd
Add DiscordBot (#1413)
lrljoe Oct 13, 2023
94df54c
Docs livewire namespace fix (#1420)
amshehzad Oct 14, 2023
1cab8c4
V3 - Fix Localisation (#1424)
lrljoe Oct 17, 2023
cb2d9c9
v3 - Add Loading Placeholder (#1421)
lrljoe Oct 17, 2023
c972b20
Merge branch 'v3-master' into v3-develop
lrljoe Oct 17, 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
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