Skip to content

Commit ffd23f4

Browse files
authored
Merge pull request rappasoft#443 from rappasoft/develop
v1.13.0
2 parents ed03c58 + 846204f commit ffd23f4

File tree

9 files changed

+51
-24
lines changed

9 files changed

+51
-24
lines changed

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ All notable changes to `laravel-livewire-tables` will be documented in this file
44

55
## [Unreleased]
66

7+
## [1.13.0] - 2021-08-24
8+
9+
### Added
10+
11+
- [Spanish translation](https://github.com/rappasoft/laravel-livewire-tables/pull/433)
12+
13+
### Changed
14+
15+
- [Use package tool to register commands](https://github.com/rappasoft/laravel-livewire-tables/pull/434)
16+
- [Fix callback so it doesn't care about parameter names](https://github.com/rappasoft/laravel-livewire-tables/pull/438)
17+
- Changed default empty text
18+
719
## [1.12.0] - 2021-07-31
820

921
### Added
@@ -434,7 +446,8 @@ All notable changes to `laravel-livewire-tables` will be documented in this file
434446

435447
- Initial release
436448

437-
[Unreleased]: https://github.com/rappasoft/laravel-livewire-tables/compare/v1.12.0...development
449+
[Unreleased]: https://github.com/rappasoft/laravel-livewire-tables/compare/v1.13.0...development
450+
[1.13.0]: https://github.com/rappasoft/laravel-livewire-tables/compare/v1.12.0...v1.13.0
438451
[1.12.0]: https://github.com/rappasoft/laravel-livewire-tables/compare/v1.11.0...v1.12.0
439452
[1.11.0]: https://github.com/rappasoft/laravel-livewire-tables/compare/v1.10.4...v1.11.0
440453
[1.10.4]: https://github.com/rappasoft/laravel-livewire-tables/compare/v1.10.3...v1.10.4

resources/lang/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
"results": "results",
2222
"rows": "rows",
2323
"rows, do you want to select all": "rows, do you want to select all",
24-
"No items found. Try narrowing your search.": "No items found. Try narrowing your search.",
24+
"No items found. Try to broaden your search.": "No items found. Try to broaden your search.",
2525
"to": "to"
2626
}

resources/lang/es.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"All": "Todo",
3+
"Applied Filters": "Filtros Aplicados",
4+
"Applied Sorting": "Ordenamineto Aplicado",
5+
"Bulk Actions": "Acciones Masivas",
6+
"Clear": "Borrar",
7+
"Columns": "Columnas",
8+
"Done Reordering": "Reordenación finalizada",
9+
"Filters": "Filtros",
10+
"Remove filter option": "Remover opción de filtro",
11+
"Remove sort option": "Remover opción de ordenamineto",
12+
"Search": "Buscar",
13+
"Select All": "Seleccionar todo",
14+
"Showing": "Mostrando",
15+
"Unselect All": "Deseleccionar todo",
16+
"You are currently selecting all": "Actualmente está seleccionando todo",
17+
"You are not connected to the internet.": "No está conectado a Internet.",
18+
"You have selected": "Ha seleccionado",
19+
"of": "de",
20+
"Reorder": "Reordenar",
21+
"results": "resultados",
22+
"rows": "filas",
23+
"rows, do you want to select all": "filas, desea seleccionar todas",
24+
"No items found. Try to broaden your search.": "No se encontraron elementos. Intente ampliar la búsqueda.",
25+
"to": "a"
26+
}

resources/views/bootstrap-4/includes/bulk-select-row.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<span>
77
@lang('You have selected')
88
<strong>{{ count($selected) }}</strong>
9-
@lang(':rows', ['rows' => count($selected) === 1 ? 'row' : 'rows']).
9+
@lang(count($selected) === 1 ? 'row' : 'rows').
1010
</span>
1111

1212
<button
@@ -41,7 +41,7 @@ class="btn btn-primary btn-sm"
4141
<span>
4242
@lang('You have selected')
4343
<strong>{{ count($selected) }}</strong>
44-
@lang(':rows', ['rows' => count($selected) === 1 ? 'row' : 'rows']).
44+
@lang(count($selected) === 1 ? 'row' : 'rows').
4545
</span>
4646

4747
<button

resources/views/bootstrap-5/includes/bulk-select-row.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<span>
77
@lang('You have selected')
88
<strong>{{ count($selected) }}</strong>
9-
@lang(':rows', ['rows' => count($selected) === 1 ? 'row' : 'rows']).
9+
@lang(count($selected) === 1 ? 'row' : 'rows').
1010
</span>
1111

1212
<button
@@ -41,7 +41,7 @@ class="btn btn-primary btn-sm"
4141
<span>
4242
@lang('You have selected')
4343
<strong>{{ count($selected) }}</strong>
44-
@lang(':rows', ['rows' => count($selected) === 1 ? 'row' : 'rows']).
44+
@lang(count($selected) === 1 ? 'row' : 'rows').
4545
</span>
4646

4747
<button

resources/views/tailwind/includes/bulk-select-row.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<span>
77
@lang('You have selected')
88
<strong>{{ count($selected) }}</strong>
9-
@lang(':rows', ['rows' => count($selected) === 1 ? 'row' : 'rows']).
9+
@lang(count($selected) === 1 ? 'row' : 'rows').
1010
</span>
1111

1212
<button
@@ -41,7 +41,7 @@ class="ml-1 text-blue-600 underline text-gray-700 text-sm leading-5 font-medium
4141
<span>
4242
@lang('You have selected')
4343
<strong>{{ count($selected) }}</strong>
44-
@lang(':rows', ['rows' => count($selected) === 1 ? 'row' : 'rows']).
44+
@lang(count($selected) === 1 ? 'row' : 'rows').
4545
</span>
4646

4747
<button

src/DataTableComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ abstract class DataTableComponent extends Component
5959
*
6060
* @var string
6161
*/
62-
public string $emptyMessage = 'No items found. Try narrowing your search.';
62+
public string $emptyMessage = 'No items found. Try to broaden your search.';
6363

6464
/**
6565
* Name of the page parameter for pagination

src/LaravelLivewireTablesServiceProvider.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,6 @@ public function bootingPackage(): void
3333
Blade::component('livewire-tables::bootstrap-5.components.table.heading', 'livewire-tables::bs5.table.heading');
3434
Blade::component('livewire-tables::bootstrap-5.components.table.row', 'livewire-tables::bs5.table.row');
3535
Blade::component('livewire-tables::bootstrap-5.components.table.cell', 'livewire-tables::bs5.table.cell');
36-
37-
$this->registerCommands();
38-
}
39-
40-
protected function registerCommands(): void
41-
{
42-
if (! $this->app->runningInConsole()) {
43-
return;
44-
}
45-
46-
$this->commands([
47-
MakeCommand::class,
48-
]);
4936
}
5037

5138
/**
@@ -57,6 +44,7 @@ public function configurePackage(Package $package): void
5744
->name('laravel-livewire-tables')
5845
->hasConfigFile()
5946
->hasViews()
60-
->hasTranslations();
47+
->hasTranslations()
48+
->hasCommand(MakeCommand::class);
6149
}
6250
}

src/Views/Column.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ public function formatted($row, $column = null)
260260
$value = data_get($row, $columnName);
261261

262262
if ($this->formatCallback) {
263-
return app()->call($this->formatCallback, ['value' => $value, 'column' => $column, 'row' => $row]);
263+
$value = call_user_func($this->formatCallback, $value, $column, $row);
264264
}
265265

266266
return $value;

0 commit comments

Comments
 (0)