|  | 
| 1 | 1 | @aware([ 'tableName', 'primaryKey','isTailwind','isBootstrap', 'collapsingColumnDetails', 'rowPk','row', 'rowIndex','customAttributes', 'hasCollapsingColumns', 'colspanCount']) | 
| 2 | 2 | 
 | 
| 3 |  | -@if ($hasCollapsingColumns) | 
| 4 |  | -    <tr  data-id="tr-collapsed" x-data | 
| 5 |  | -        @toggle-row-content.window="($event.detail.tableName === '{{ $tableName }}' && $event.detail.row === {{ $rowIndex }}) ? $el.classList.toggle('{{ $isBootstrap ? 'd-none' : 'hidden' }}') : null" | 
| 6 |  | -        {{ | 
| 7 |  | -            $attributes->merge([ | 
| 8 |  | -                    'wire:loading.class.delay' => 'opacity-50 dark:bg-gray-900 dark:opacity-60', | 
| 9 |  | -                    'wire:key' => $tableName.'-row-'.$rowPk.'-collapsed-contents', | 
| 10 |  | -                ]) | 
| 11 |  | -                ->merge($customAttributes) | 
| 12 |  | -                ->class($isTailwind ? [ | 
| 13 |  | -                    'hidden rappasoft-striped-row' => $customAttributes['default'] ?? true, | 
| 14 |  | -                ] : [ | 
| 15 |  | -                    'd-none  rappasoft-striped-row' => ($rowIndex % 2 === 0 && ($customAttributes['default'] ?? true)), | 
| 16 |  | -                    'd-none  rappasoft-striped-row' => ($rowIndex % 2 !== 0 && ($customAttributes['default'] ?? true)), | 
| 17 |  | -                ]) | 
| 18 |  | -                ->except(['default','default-styling','default-colors']) | 
| 19 |  | -        }} | 
| 20 |  | -    > | 
| 21 |  | -        <td colspan="{{ $colspanCount }}" @class([ | 
| 22 |  | -                'text-left pt-4 pb-2 px-4' => $isTailwind, | 
| 23 |  | -                'text-start pt-3 p-2' => $isBootstrap, | 
| 24 |  | -        ])> | 
| 25 |  | -            <div> | 
|  | 3 | +<tr data-id="tr-collapsed" x-data x-show="showCollapsed" x-cloak {{ | 
|  | 4 | +        $attributes->merge([ | 
|  | 5 | +                'wire:loading.class.delay' => 'opacity-50 dark:bg-gray-900 dark:opacity-60', | 
|  | 6 | +                'wire:key' => $tableName.'-row-'.$rowPk.'-collapsed-contents', | 
|  | 7 | +            ]) | 
|  | 8 | +            ->merge($customAttributes) | 
|  | 9 | +            ->class($isTailwind ? [ | 
|  | 10 | +                'rappasoft-striped-row' => $customAttributes['default'] ?? true, | 
|  | 11 | +            ] : [ | 
|  | 12 | +                'rappasoft-striped-row' => ($rowIndex % 2 === 0 && ($customAttributes['default'] ?? true)), | 
|  | 13 | +                'rappasoft-striped-row' => ($rowIndex % 2 !== 0 && ($customAttributes['default'] ?? true)), | 
|  | 14 | +            ]) | 
|  | 15 | +            ->except(['default','default-styling','default-colors']) | 
|  | 16 | +    }} | 
|  | 17 | +> | 
|  | 18 | +    <td colspan="{{ $colspanCount }}" @class([ | 
|  | 19 | +            'text-left pt-4 pb-2 px-4' => $isTailwind, | 
|  | 20 | +            'text-start pt-3 p-2' => $isBootstrap, | 
|  | 21 | +    ])> | 
|  | 22 | +        <div> | 
| 26 | 23 | 
 | 
|  | 24 | +            @tableloop($collapsingColumnDetails as $colIndex => $columnData) | 
|  | 25 | +                <div wire:key="{{ $tableName }}-row-{{ $rowPk }}-collapsed-contents-{{ $colIndex }}" x-data="{ value: '',  | 
|  | 26 | +                        init() {  | 
|  | 27 | +                            $nextTick(() => {  | 
|  | 28 | +                                this.value = stripLivewireTags($refs.{{ $tableName . '_' . $rowIndex.'_'.$colIndex }}); | 
|  | 29 | +                            }); | 
|  | 30 | +                        } | 
|  | 31 | +                        }" @class($isTailwind ? [ | 
|  | 32 | +                            'block mb-2 hidden', | 
|  | 33 | +                            'sm:block' => $columnData['shouldCollapseAlways'], | 
|  | 34 | +                            'sm:block md:hidden' => !$columnData['shouldCollapseAlways'] && !$columnData['shouldCollapseOnTablet'] && $columnData['shouldCollapseOnMobile'], | 
|  | 35 | +                            'sm:block lg:hidden' => !$columnData['shouldCollapseAlways'] && ($columnData['shouldCollapseOnTablet'] || $columnData['shouldCollapseOnMobile']), | 
|  | 36 | +                    ] : [ | 
|  | 37 | +                            'd-block mb-2', | 
|  | 38 | +                            'd-sm-none' => !$columnData['shouldCollapseAlways'] && !$columnData['shouldCollapseOnTablet'] && !$columnData['shouldCollapseOnMobile'], | 
|  | 39 | +                            'd-md-none' => !$columnData['shouldCollapseAlways'] && !$columnData['shouldCollapseOnTablet'] && $columnData['shouldCollapseOnMobile'], | 
|  | 40 | +                            'd-lg-none' => !$columnData['shouldCollapseAlways'] && ($columnData['shouldCollapseOnTablet'] || $columnData['shouldCollapseOnMobile']), | 
| 27 | 41 | 
 | 
| 28 |  | -                @tableloop($collapsingColumnDetails as $colIndex => $columnData) | 
| 29 |  | -                    <div wire:key="{{ $tableName }}-row-{{ $rowPk }}-collapsed-contents-{{ $colIndex }}"  | 
| 30 |  | -                        x-data="{ value: '',  | 
| 31 |  | -                            init() {  | 
| 32 |  | -                                $nextTick(() => {  | 
| 33 |  | -                                    this.value = stripLivewireTags($refs.{{ $tableName . '_' . $rowIndex.'_'.$colIndex }}); | 
| 34 |  | -                                }); | 
| 35 |  | -                            } | 
| 36 |  | -                            }" @class($isTailwind ? [ | 
| 37 |  | -                                'block mb-2 hidden', | 
| 38 |  | -                                'sm:block' => $columnData['shouldCollapseAlways'], | 
| 39 |  | -                                'sm:block md:hidden' => !$columnData['shouldCollapseAlways'] && !$columnData['shouldCollapseOnTablet'] && $columnData['shouldCollapseOnMobile'], | 
| 40 |  | -                                'sm:block lg:hidden' => !$columnData['shouldCollapseAlways'] && ($columnData['shouldCollapseOnTablet'] || $columnData['shouldCollapseOnMobile']), | 
| 41 |  | -                        ] : [ | 
| 42 |  | -                                'd-block mb-2', | 
| 43 |  | -                                'd-sm-none' => !$columnData['shouldCollapseAlways'] && !$columnData['shouldCollapseOnTablet'] && !$columnData['shouldCollapseOnMobile'], | 
| 44 |  | -                                'd-md-none' => !$columnData['shouldCollapseAlways'] && !$columnData['shouldCollapseOnTablet'] && $columnData['shouldCollapseOnMobile'], | 
| 45 |  | -                                'd-lg-none' => !$columnData['shouldCollapseAlways'] && ($columnData['shouldCollapseOnTablet'] || $columnData['shouldCollapseOnMobile']), | 
| 46 |  | -
 | 
| 47 |  | -                        ])> | 
| 48 |  | -                                <strong>{{ $columnData['title'] }}</strong>: <br /> | 
| 49 |  | -                                <span @if($columnData['isHtml'])x-html="value" @else x-text="value"@endif></span> | 
| 50 |  | -                    </div> | 
| 51 |  | -                @endtableloop | 
| 52 |  | -            </div> | 
| 53 |  | -        </td> | 
| 54 |  | -    </tr> | 
| 55 |  | -@endif | 
|  | 42 | +                    ])> | 
|  | 43 | +                            <strong>{{ $columnData['title'] }}</strong>: <br /> | 
|  | 44 | +                            <span @if($columnData['isHtml'])x-html="value" @else x-text="value"@endif></span> | 
|  | 45 | +                </div> | 
|  | 46 | +            @endtableloop | 
|  | 47 | +        </div> | 
|  | 48 | +    </td> | 
|  | 49 | +</tr> | 
0 commit comments