|
7 | 7 | use Rappasoft\LaravelLivewireTables\Exceptions\DataTableConfigurationException; |
8 | 8 | use Rappasoft\LaravelLivewireTables\Traits\Configuration\ComponentConfiguration; |
9 | 9 | use Rappasoft\LaravelLivewireTables\Traits\Helpers\ComponentHelpers; |
| 10 | +use Rappasoft\LaravelLivewireTables\Traits\Core\Component\{HandlesComputedProperties,HandlesEmptyMessage, HandlesFingerprint, HandlesOfflineIndicator,HandlesTableName}; |
10 | 11 |
|
11 | 12 | trait ComponentUtilities |
12 | 13 | { |
13 | | - use ComponentConfiguration, |
| 14 | + use HandlesTableName, |
| 15 | + HandlesFingerprint, |
| 16 | + HandlesEmptyMessage, |
| 17 | + HandlesComputedProperties, |
| 18 | + HandlesOfflineIndicator, |
| 19 | + ComponentConfiguration, |
14 | 20 | ComponentHelpers; |
15 | | - |
| 21 | + |
16 | 22 | public array $table = []; |
17 | 23 |
|
18 | 24 | protected $model; |
19 | 25 |
|
20 | | - #[Locked] |
21 | | - public string $tableName = 'table'; |
22 | | - |
23 | | - #[Locked] |
24 | | - public ?string $dataTableFingerprint; |
25 | | - |
26 | | - protected bool $offlineIndicatorStatus = true; |
27 | | - |
28 | | - protected string $emptyMessage = 'No items found, try to broaden your search'; |
29 | | - |
30 | | - protected bool $useComputedProperties = true; |
31 | | - |
32 | 26 | protected bool $hasRunConfigure = false; |
33 | 27 |
|
34 | 28 | /** |
@@ -82,17 +76,6 @@ protected function runCoreConfiguration(): void |
82 | 76 | } |
83 | 77 | } |
84 | 78 |
|
85 | | - /** |
86 | | - * Returns a unique id for the table, used as an alias to identify one table from another session and query string to prevent conflicts |
87 | | - */ |
88 | | - protected function generateDataTableFingerprint(): string |
89 | | - { |
90 | | - $className = str_split(static::class); |
91 | | - $crc32 = sprintf('%u', crc32(serialize($className))); |
92 | | - |
93 | | - return base_convert($crc32, 10, 36); |
94 | | - } |
95 | | - |
96 | 79 | /** |
97 | 80 | * 1. After the sorting method is hit we need to tell the table to go back into reordering mode |
98 | 81 | */ |
|
0 commit comments