Skip to content

Commit 9966a97

Browse files
committed
fix(view): comments
1 parent f89fc59 commit 9966a97

File tree

2 files changed

+0
-138
lines changed

2 files changed

+0
-138
lines changed

resources/views/json.blade.php

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,3 @@
1-
{{--
2-
@php
3-
use Filament\Support\Enums\Alignment;
4-
use Filament\Support\Enums\FontFamily;
5-
use Filament\Support\Enums\FontWeight;
6-
use Filament\Support\Enums\IconPosition;
7-
use Filament\Tables\Columns\TextColumn\TextColumnSize;
8-
9-
$alignment = $getAlignment();
10-
$canWrap = $canWrap();
11-
$descriptionAbove = $getDescriptionAbove();
12-
$descriptionBelow = $getDescriptionBelow();
13-
$iconPosition = $getIconPosition();
14-
$isBadge = $isBadge();
15-
$isBulleted = $isBulleted();
16-
$isListWithLineBreaks = $isListWithLineBreaks();
17-
$isLimitedListExpandable = $isLimitedListExpandable();
18-
19-
$url = $getUrl();
20-
21-
if (!$alignment instanceof Alignment) {
22-
$alignment = filled($alignment) ? (Alignment::tryFrom($alignment) ?? $alignment) : null;
23-
}
24-
25-
$arrayState = $getState();
26-
27-
if ($arrayState instanceof \Illuminate\Support\Collection) {
28-
$arrayState = $arrayState->all();
29-
}
30-
31-
$listLimit = 1;
32-
33-
if (is_array($arrayState)) {
34-
if ($listLimit = $getListLimit()) {
35-
$limitedArrayStateCount = (count($arrayState) > $listLimit) ? (count($arrayState) - $listLimit) : 0;
36-
37-
if (!$isListWithLineBreaks) {
38-
$arrayState = array_slice($arrayState, 0, $listLimit);
39-
}
40-
}
41-
42-
$listLimit ??= count($arrayState);
43-
44-
if ((!$isListWithLineBreaks) && (!$isBadge)) {
45-
$arrayState = implode(
46-
', ',
47-
array_map(
48-
static fn($value) => $value instanceof \Filament\Support\Contracts\HasLabel ? $value->getLabel() : $value,
49-
$arrayState,
50-
),
51-
);
52-
}
53-
}
54-
55-
$arrayState = \Illuminate\Support\Arr::wrap($arrayState);
56-
57-
/** @var \App\Filament\Admin\Resources\ActivityResource\Pages\ListActivities $page */
58-
$page = $this;
59-
60-
$characterLimit = $getCharacterLimit();
61-
@endphp
62-
<div>
63-
@foreach($getState() as $variable => $value)
64-
@if(!empty($value))
65-
<p>
66-
<b>{{ $variable }}</b>: @if($characterLimit){{ str($value)->limit($characterLimit) }}@else{{ $value }}@endif
67-
&nbsp;
68-
</p>
69-
@endif
70-
@endforeach
71-
</div>
72-
--}}
731
@php
742
// /** @var \App\Filament\Admin\Resources\ActivityResource\Pages\ListActivities $page */
753
// $page = $this;

src/Columns/JsonColumn.php

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -87,70 +87,4 @@ public function getState(): mixed
8787

8888
return $state;
8989
}
90-
91-
// public function formatState(mixed $state): HtmlString
92-
// {
93-
// $html = '';
94-
// $isHtml = $this->isHtml();
95-
// /** @var \Illuminate\Support\Collection $stateCollection */
96-
// $stateCollection = $this->getState()->sliding(1);
97-
// // $listLimit = $this->getListLimit();
98-
// // foreach (range(1, $listLimit) as $key => $listRow) {
99-
// foreach ($this->getState() as $key => $item) {
100-
// // $item = $stateCollection->get($key)->first();
101-
// // $jsonKey = $stateCollection->get($key)->keys()->first();
102-
// $newState = $this->evaluate($this->formatStateUsing ?? $item, [
103-
// 'state' => $item,
104-
// ]);
105-
//
106-
// if ($characterLimit = $this->getCharacterLimit()) {
107-
// $newState = Str::limit($item, $characterLimit, $this->getCharacterLimitEnd());
108-
// }
109-
// if ($wordLimit = $this->getWordLimit()) {
110-
// $newState = Str::words($item, $wordLimit, $this->getWordLimitEnd());
111-
// }
112-
// if ($isHtml && $this->isMarkdown()) {
113-
// $newState = Str::markdown($item);
114-
// }
115-
//
116-
// $prefix = $this->getPrefix();
117-
// $suffix = $this->getSuffix();
118-
//
119-
// if (
120-
// (($prefix instanceof Htmlable) || ($suffix instanceof Htmlable)) &&
121-
// (!$isHtml)
122-
// ) {
123-
// $isHtml = true;
124-
// $newState = e($newState);
125-
// }
126-
// if (filled($prefix)) {
127-
// if ($prefix instanceof Htmlable) {
128-
// $prefix = $prefix->toHtml();
129-
// } elseif ($isHtml) {
130-
// $prefix = e($prefix);
131-
// }
132-
//
133-
// $newState = $prefix . $newState;
134-
// }
135-
// if (filled($suffix)) {
136-
// if ($suffix instanceof Htmlable) {
137-
// $suffix = $suffix->toHtml();
138-
// } elseif ($isHtml) {
139-
// $suffix = e($suffix);
140-
// }
141-
//
142-
// $newState .= $suffix;
143-
// }
144-
// if (!empty($newState)) {
145-
// $html .= "
146-
// <p>
147-
// <b>$key</b>: $newState
148-
// &nbsp;
149-
// </p>
150-
// ";
151-
// }
152-
// }
153-
//
154-
// return new HtmlString($html);
155-
// }
15690
}

0 commit comments

Comments
 (0)