Skip to content

Commit

Permalink
V3 develop (#1384)
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)

---------

Co-authored-by: lrljoe <[email protected]>
Co-authored-by: Anthony Rappa <[email protected]>
  • Loading branch information
3 people authored Oct 4, 2023
1 parent 04aa7bd commit a4fa8d6
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 64 deletions.
12 changes: 4 additions & 8 deletions docs/examples/advanced-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,12 @@ weight: 2

namespace App\Http\Livewire;

use App\Models\Tag;
use App\Models\User;
use App\Models\{Tag,User};
use Illuminate\Database\Eloquent\Builder;
use Rappasoft\LaravelLivewireTables\DataTableComponent;
use Rappasoft\LaravelLivewireTables\Views\Columns\BooleanColumn;
use Rappasoft\LaravelLivewireTables\Views\Column;
use Rappasoft\LaravelLivewireTables\Views\Columns\ImageColumn;
use Rappasoft\LaravelLivewireTables\Views\Filters\SelectFilter;
use Rappasoft\LaravelLivewireTables\Views\Filters\MultiSelectFilter;
use Rappasoft\LaravelLivewireTables\Views\Filters\DateFilter;
use Rappasoft\LaravelLivewireTables\Views\Columns\{BooleanColumn, ImageColumn};
use Rappasoft\LaravelLivewireTables\Views\Filters\{DateFilter, MultiSelectFilter, SelectFilter};

class UsersTable extends DataTableComponent
{
Expand Down Expand Up @@ -231,7 +227,7 @@ class UsersTable extends DataTableComponent
public function reorder($items): void
{
foreach ($items as $item) {
User::find((int)$item['value'])->update(['sort' => (int)$item['order']]);
User::find($item[$this->getPrimaryKey()])->update(['sort' => (int)$item[$this->getDefaultReorderColumn()]]);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/start/commands.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Commands
weight: 5
weight: 6
---

## Generating Datatable Components
Expand Down
15 changes: 1 addition & 14 deletions docs/start/configuration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Configuration
weight: 3
weight: 4
---

## Publishing Assets
Expand Down Expand Up @@ -81,16 +81,3 @@ You must also make sure you have this Alpine style available globally. Note that
[x-cloak] { display: none !important; }
</style>
```

## Package Specific Code

This package now makes use of two external files, one for AlpineJS methods, and one for Custom Styling. There are two options available to you:

### Injection (Default)
The package will automatically inject the relevant two files into your layout as part of the render process. This is the default behaviour, and mimics that of Livewire 3.0

### Build Include (Not Recommended)
If you wish to disable the injection, you may include the following file in your app.js, which will provide the relevant functionality and styling for the package to function.
```
import '../../vendor/rappasoft/laravel-livewire-tables-v3/resources/laravel-livewire-tables'
```
64 changes: 64 additions & 0 deletions docs/start/including-assets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: Including Assets
weight: 3
---

## Package Specific Code

This package now makes use of several external files, one for AlpineJS methods, and one for Custom Styling. In addition, Flatpickr is separately bundled with the package, and used for the DateRange Filter. These can be independently enabled/disabled.

### Injection (Default)
The package will automatically inject the relevant two files into your layout as part of the render process. This is the default behaviour, and mimics that of Livewire 3.0

#### Configuration
This is enabled by default, but to re-enable, enable the following options in the livewire-tables configuration file, to enable automatic injection:

```php

/**
* Enable or Disable automatic injection of core assets
*/
'inject_core_assets_enabled' => true,

/**
* Enable or Disable automatic injection of third-party assets
*/
'inject_third_party_assets_enabled' => true,
```

### Bundler Including
If you'd prefer to bundle the included JS and CSS files with your choice of bundler, this is provided by two files that can be included in your bundler (e.g. app.js)

#### Include Code (For Bundler)

To include only Core functions (Includes JS & CSS):
```js
import '../../vendor/rappasoft/laravel-livewire-tables/resources/imports/laravel-livewire-tables.js';
```

To include both Core and Third Party (Flatpickr) Libraries (Includes JS & CSS):
```js
import '../../vendor/rappasoft/laravel-livewire-tables/resources/imports/laravel-livewire-tables-all.js';
```

#### Configuration
Update the following options in the livewire-tables configuration file, to disable automatic injection:

```php

/**
* Enable or Disable automatic injection of core assets
*/
'inject_core_assets_enabled' => false,

/**
* Enable or Disable automatic injection of third-party assets
*/
'inject_third_party_assets_enabled' => false,

/**
* Enable Blade Directives (Not required if automatically injecting or using bundler approaches)
*/
'enable_blade_directives ' => false,

```
40 changes: 0 additions & 40 deletions docs/start/optional-packages.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/start/rendering.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Rendering
weight: 4
weight: 5
---

## Rendering Components
Expand Down

0 comments on commit a4fa8d6

Please sign in to comment.