diff --git a/CHANGELOG.md b/CHANGELOG.md index bbc08344b..32e719d3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,24 @@ All notable changes to `laravel-livewire-tables` will be documented in this file ## [Unreleased] +## [2.8.0] - 2022-07-24 + +### Added + +- Added functionality to bookmark or deep link column selection +- Added functionality to identify different datatable components as unique in column selection +- Added funcitonality to configure query string alias +- Added funcitonality to configure session key for column selection (dataTableFingerprint) +- Added functionality to select/desect all columns in column selection dropdown +- Added French translation - https://github.com/rappasoft/laravel-livewire-tables/pull/816 +- Added Malay translation - https://github.com/rappasoft/laravel-livewire-tables/pull/821 +- Added Dutch translation - https://github.com/rappasoft/laravel-livewire-tables/pull/834 +- Added Ukranian translation - https://github.com/rappasoft/laravel-livewire-tables/pull/840 + +### Changed + +- Fixed bug with sort callback on newer versions of Livewire - https://github.com/rappasoft/laravel-livewire-tables/pull/805 +- Fixed: Removed :mixed return type hint as it requires PHP8.0 - https://github.com/rappasoft/laravel-livewire-tables/pull/822 ## [2.7.0] - 2022-05-07 ### Added @@ -13,6 +31,7 @@ All notable changes to `laravel-livewire-tables` will be documented in this file - Added functionality to hide individual filters from the active filter count - Added functionality to say which filters get reset by the clear button - Added functionality to set filters as secondaryHeader or footer of columns +- Added Brazilian Portuguese translation - https://github.com/rappasoft/laravel-livewire-tables/pull/797 ## [2.6.0] - 2022-05-05 @@ -669,7 +688,8 @@ Ground Up Rebuild - Initial release -[Unreleased]: https://github.com/rappasoft/laravel-livewire-tables/compare/v2.7.0...development +[Unreleased]: https://github.com/rappasoft/laravel-livewire-tables/compare/v2.8.0...development +[2.8.0]: https://github.com/rappasoft/laravel-livewire-tables/compare/v2.7.0...v2.8.0 [2.7.0]: https://github.com/rappasoft/laravel-livewire-tables/compare/v2.6.0...v2.7.0 [2.6.0]: https://github.com/rappasoft/laravel-livewire-tables/compare/v2.5.0...v2.6.0 [2.5.0]: https://github.com/rappasoft/laravel-livewire-tables/compare/v2.4.0...v2.5.0 diff --git a/docs/columns/column-selection.md b/docs/columns/column-selection.md index 2dbb88e4e..625ef9f7a 100644 --- a/docs/columns/column-selection.md +++ b/docs/columns/column-selection.md @@ -95,4 +95,19 @@ public function configure(): void // Shorthand for $this->setRememberColumnSelectionStatus(false) $this->setRememberColumnSelectionDisabled(); } -``` \ No newline at end of file +``` + +### setDataTableFingerprint + +In order to idenfify each table and prevent conflicts on column selection, each table is given a unique fingerprint. +This fingerprint is generated using the static::class name of the component. If you are reusing +the same component in different parts of your application, you may need to set your own custom fingerprint. + +```php +public function configure(): void +{ + // Default fingerprint is output of protected method dataTableFingerprint() + // Below will prepend the current route name + $this->setDataTableFingerprint(route()->getName() . '-' . $this->dataTableFingerprint()); +} +``` diff --git a/docs/columns/other-column-types.md b/docs/columns/other-column-types.md index 3c2755899..f132eb563 100644 --- a/docs/columns/other-column-types.md +++ b/docs/columns/other-column-types.md @@ -142,7 +142,7 @@ ButtonGroupColumn::make('Actions') ->buttons([ LinkColumn::make('View') // make() has no effect in this case but needs to be set anyway ->title(fn($row) => 'View ' . $row->name) - ->location(fn($row) => route('user.show', $row)), + ->location(fn($row) => route('user.show', $row)) ->attributes(function($row) { return [ 'class' => 'underline text-blue-500 hover:no-underline', @@ -150,7 +150,7 @@ ButtonGroupColumn::make('Actions') }), LinkColumn::make('Edit') ->title(fn($row) => 'Edit ' . $row->name) - ->location(fn($row) => route('user.edit', $row)), + ->location(fn($row) => route('user.edit', $row)) ->attributes(function($row) { return [ 'target' => '_blank', @@ -158,4 +158,4 @@ ButtonGroupColumn::make('Actions') ]; }), ]), -``` \ No newline at end of file +``` diff --git a/docs/misc/multiple-tables.md b/docs/misc/multiple-tables.md index 64ba64359..026d8ca1b 100644 --- a/docs/misc/multiple-tables.md +++ b/docs/misc/multiple-tables.md @@ -92,3 +92,14 @@ public function configure(): void $this->setQueryStringDisabled(); } ``` + +## Disabling column selection for multiple of the same component + +You should also disable the columns selection for those components so the column selection state does not get replaced by one or the other: + +```php +public function configure(): void +{ + $this->setColumnSelectStatus(false); +} +``` diff --git a/resources/lang/fr.json b/resources/lang/fr.json new file mode 100644 index 000000000..7831c8af7 --- /dev/null +++ b/resources/lang/fr.json @@ -0,0 +1,27 @@ +{ + "All": "Tous", + "Applied Filters": "Filtres appliqués", + "Applied Sorting": "Tris appliqués", + "Bulk Actions": "Actions en masse", + "Clear": "Effacer", + "Columns": "Colonnes", + "Debugging Values": "Debugging Values", + "Done Reordering": "Réordonnancement terminé", + "Filters": "Filtres", + "Remove filter option": "Supprimer l'option de filtrage", + "Remove sort option": "Supprimer l'option de tri", + "Search": "Rechercher", + "Select All": "Tout sélectionner", + "Showing": "Montrant", + "Deselect All": "Tout désélectionner ", + "You are currently selecting all": "Vous êtes en train de sélectionner ", + "You are not connected to the internet.": "Vous n'êtes pas connecté à l'Internet.", + "You have selected": "Vous avez sélectionné", + "of": "sur", + "Reorder": "Réordonner", + "results": "résultats", + "rows": "lignes", + "rows, do you want to select all": "lignes, voulez-vous tout sélectionner ?", + "No items found. Try to broaden your search.": "Aucun élément trouvé. Essayez d'élargir votre recherche.", + "to": "à" +} diff --git a/resources/lang/ms.json b/resources/lang/ms.json new file mode 100644 index 000000000..f87759beb --- /dev/null +++ b/resources/lang/ms.json @@ -0,0 +1,26 @@ +{ + "All": "Semua", + "Applied Filters": "Tapisan Digunakan", + "Applied Sorting": "Susunan Digunakan", + "Bulk Actions": "Tindakan Pukal", + "Clear": "Kosongkan", + "Columns": "Kolum", + "Done Reordering": "Selesai Menyusun Semula", + "Filters": "Tapisan", + "Remove filter option": "Keluarkan pilihan tapisan", + "Remove sort option": "Keluarkan pilihan sususan", + "Search": "Carian", + "Select All": "Pilih Semua", + "Showing": "Menunjukkan", + "Deselect All": "Nyahpilih semua", + "You are currently selecting all": "Anda sedang memilih semua", + "You are not connected to the internet.": "Anda tidak disambungkan ke internet.", + "You have selected": "Anda telah memilih", + "of": "daripada", + "Reorder": "menyusun semula", + "results": "keputusan", + "rows": "barisan", + "rows, do you want to select all": "barisan, adakah anda mahu pilih semua?", + "No items found. Try to broaden your search.": "Tiada data ditemui. Sila perluaskan carian anda", + "to": "ke" +} diff --git a/resources/lang/nl.json b/resources/lang/nl.json new file mode 100644 index 000000000..aa6b4669f --- /dev/null +++ b/resources/lang/nl.json @@ -0,0 +1,27 @@ +{ + "All": "Alle", + "Applied Filters": "Toegepaste filters", + "Applied Sorting": "Toegepaste sortering", + "Bulk Actions": "Bulkacties", + "Clear": "Wissen", + "Columns": "Kolommen", + "Debugging Values": "Debugging waarden", + "Done Reordering": "Hersortering voltooid", + "Filters": "Filters", + "Remove filter option": "Filteroptie verwijderen", + "Remove sort option": "Sorteeroptie verwijderen", + "Search": "Zoeken", + "Select All": "Alles selecteren", + "Showing": "Toont", + "Deselect All": "Alles deselecteren", + "You are currently selecting all": "U selecteerde alle", + "You are not connected to the internet.": "U bent niet verbonden met het internet.", + "You have selected": "U selecteerde", + "of": "van", + "Reorder": "Hersorteren", + "results": "resultaten", + "rows": "rijen", + "rows, do you want to select all": "rijen, wilt u alles selecteren", + "No items found. Try to broaden your search.": "Geen items gevonden. Probeer uw zoekopdracht te verfijnen.", + "to": "tot" +} diff --git a/resources/lang/pt_BR.json b/resources/lang/pt_BR.json new file mode 100644 index 000000000..f31046b6e --- /dev/null +++ b/resources/lang/pt_BR.json @@ -0,0 +1,27 @@ +{ + "All": "Tudo", + "Applied Filters": "Filtros aplicados", + "Applied Sorting": "Ordenação aplicada", + "Bulk Actions": "Ações em massa", + "Clear": "Limpar", + "Columns": "Colunas", + "Done Reordering": "Ordenação finalizada", + "Filters": "Filtros", + "Remove filter option": "Remover opção de filtro", + "Remove sort option": "Remover opção de ordenação", + "Search": "Pesquisar", + "Select All": "Selecionar tudo", + "Showing": "Exibindo", + "Deselect All": "Desmarcar Tudo", + "You are currently selecting all": "Você selecionou tudo", + "You are not connected to the internet.": "Você não está conectado na internet.", + "You have selected": "Você selecionou", + "of": "de", + "Reorder": "Reordenar", + "results": "resultados", + "row": "linha", + "rows": "linhas", + "rows, do you want to select all": "linhas, você deseja selecionar tudo?", + "No items found. Try to broaden your search.": "Nenhum resultado encontrado. Tente ampliar a sua pesquisa.", + "to": "a" +} \ No newline at end of file diff --git a/resources/lang/uk.json b/resources/lang/uk.json new file mode 100644 index 000000000..851b1ec3f --- /dev/null +++ b/resources/lang/uk.json @@ -0,0 +1,26 @@ +{ + "All": "Всі", + "Applied Filters": "Застосовані фільтри", + "Applied Sorting": "Застосовані сортування", + "Bulk Actions": "Масові дії", + "Clear": "Очистити", + "Columns": "Колонки", + "Done Reordering": "Сортування виконанно", + "Filters": "Фільтри", + "Remove filter option": "Видалити опцію фільтра", + "Remove sort option": "Видалити параметр сортування", + "Search": "Пошук", + "Select All": "Вибрати все", + "Showing": "Показано", + "Unselect All": "Прибрати вибір усіх", + "You are currently selecting all": "Наразі ви вибираєте всі", + "You are not connected to the internet.": "Ви не підключені до Інтернету.", + "You have selected": "Ви вибрали", + "of": "від", + "Reorder": "Змінити порядок", + "results": "результатів", + "rows": "рядки", + "rows, do you want to select all": "рядків, ви хочете вибрати всі", + "No items found. Try to broaden your search.": "Немає елементів. Спробуйте розширити пошук.", + "to": "до" +} diff --git a/resources/views/components/tools/toolbar.blade.php b/resources/views/components/tools/toolbar.blade.php index d75208e06..ab1fff337 100644 --- a/resources/views/components/tools/toolbar.blade.php +++ b/resources/views/components/tools/toolbar.blade.php @@ -246,6 +246,26 @@ class="absolute right-0 z-50 mt-2 w-full bg-white rounded-md divide-y divide-gra >