Skip to content

Commit b3becf1

Browse files
authored
Merge pull request #16 from codebar-ag/feature-filament-4
Feature filament 4
2 parents ad09134 + 89ee81d commit b3becf1

File tree

19 files changed

+840
-334
lines changed

19 files changed

+840
-334
lines changed

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ body:
99
label: Question or Feature?
1010
description: Enter a Question or Feature Request
1111
validations:
12-
required: true
12+
required: true

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
11
# Changelog
22

33
All notable changes to `filament-json-field` will be documented in this file.
4+
5+
## [Unreleased]
6+
7+
## [13.0.0] - 2025-01-15
8+
9+
### Added
10+
- **Filament 4.0 Support**: Updated package to support Filament 4.0
11+
- **Readonly Support**: Added readonly functionality to JSON input fields
12+
- **Enhanced Styling**: Improved styling and visual appearance of components
13+
- **Better CodeMirror Integration**: Enhanced CodeMirror configuration and behavior
14+
15+
### Changed
16+
- **Breaking**: Updated minimum Filament requirements to ^4.0
17+
- **Breaking**: Removed `filament/tables` dependency (no longer required)
18+
- **Breaking**: Updated `filament/forms` dependency to ^4.0
19+
- **Breaking**: Updated `filament/infolists` dependency to ^4.0
20+
- **Breaking**: Updated `filament/support` dependency to ^4.0
21+
- Updated package description to be more descriptive
22+
- Improved component structure and organization
23+
24+
### Fixed
25+
- Various styling issues and visual improvements
26+
- CodeMirror configuration and initialization
27+
- Component rendering and behavior
28+
29+
### Technical
30+
- Updated PHP version support to 8.2.*, 8.3.*, 8.4.*
31+
- Enhanced test coverage and component testing
32+
- Improved build process and asset compilation
33+
34+
## [12.2.0] - Previous Release
35+
36+
### Added
37+
- Initial Filament 3.x support
38+
- JSON input and display components
39+
- CodeMirror integration
40+
- Basic styling and configuration options

README.md

Lines changed: 37 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@
88

99
## 💡 What is Filament Json Field?
1010

11-
Filament Json Field is a Filament wrapper for Codemirror.
11+
Filament Json Field is a Laravel Filament JSON Field integration with CodeMirror support, providing a powerful and feature-rich JSON editor for your Filament forms and infolists.
1212

1313
## 🛠 Requirements
1414

15-
| Package | PHP | Laravel | Filament Infolists | Filament Support | Filament Tables |
16-
|-----------|------------------|---------------|--------------------|------------------|-----------------|
17-
| v12.0 | ^8.2, ^8.3, ^8.4 | ^12.0 | ^3.3 | ^3.3 | ^3.3 |
18-
| v2.0 | ^8.1 | ^11.0 | ^3.2 | ^3.2 | ^3.2 |
19-
| v1.0 | ^8.1 | ^10.45, ^11.0 | ^3.2 | ^3.2 | ^3.2 |
15+
| Package | PHP | Laravel | Filament Forms | Filament Infolists | Filament Support |
16+
|-----------|------------------|---------------|----------------|--------------------|------------------|
17+
| v13.0 | ^8.2, ^8.3, ^8.4 | ^12.0 | ^4.0 | ^4.0 | ^4.0 |
18+
| v12.0 | ^8.2, ^8.3, ^8.4 | ^12.0 | ^3.3 | ^3.3 | ^3.3 |
19+
| v2.0 | ^8.1 | ^11.0 | ^3.2 | ^3.2 | ^3.2 |
20+
| v1.0 | ^8.1 | ^10.45, ^11.0 | ^3.2 | ^3.2 | ^3.2 |
2021

2122

2223
## ⚙️ Installation
@@ -31,7 +32,8 @@ php artisan filament:assets
3132

3233
## Usage
3334

34-
Forms:
35+
### Forms
36+
3537
```php
3638
use CodebarAg\FilamentJsonField\Forms\Components\JsonInput;
3739

@@ -42,30 +44,31 @@ public function form(Form $form): Form
4244
return $form
4345
->schema([
4446
JsonInput::make('json')
45-
->label('JSON')
47+
->label('JSON Data')
4648
->lineNumbers(true)
4749
->lineWrapping(true)
4850
->autoCloseBrackets(true)
4951
->darkTheme(true)
5052
->foldingCode(true)
51-
->foldedCode(true), // Folded code will fold the code on form load
53+
->foldedCode(true) // Folded code will fold the code on form load
54+
->readOnly(false), // Set to true to make the field read-only
5255
]);
5356
}
54-
...
55-
````
57+
```
58+
59+
### Infolists
5660

57-
Infolists:
5861
```php
5962
use CodebarAg\FilamentJsonField\Infolists\Components\JsonEntry;
6063

6164
...
6265

63-
public function form(Form $form): Form
66+
public function infolist(Infolist $infolist): Infolist
6467
{
65-
return $form
68+
return $infolist
6669
->schema([
6770
JsonEntry::make('json')
68-
->label('JSON')
71+
->label('JSON Data')
6972
->lineNumbers(true)
7073
->lineWrapping(true)
7174
->autoCloseBrackets(true)
@@ -74,19 +77,30 @@ public function form(Form $form): Form
7477
->foldedCode(true), // Folded code will fold the code on form load
7578
]);
7679
}
77-
...
78-
````
80+
```
7981

8082
### Options
8183

8284
The following options are currently supported:
8385

84-
| Request | Supported |
85-
|---------------------|:-----------:|
86-
| Line Numbers | ✅ |
87-
| Auto Close Brackets | ✅ |
88-
| Dark Theme | ✅ |
89-
| Folding Code | ✅ |
86+
| Option | Supported | Description |
87+
|---------------------|:---------:|-------------|
88+
| Line Numbers || Display line numbers in the editor |
89+
| Line Wrapping || Enable line wrapping for long lines |
90+
| Auto Close Brackets || Automatically close brackets and quotes |
91+
| Dark Theme || Enable dark theme styling |
92+
| Folding Code || Enable code folding functionality |
93+
| Folded Code || Start with code folded (forms only) |
94+
| Read Only || Make the field read-only (forms only) |
95+
96+
### Features
97+
98+
- **CodeMirror Integration**: Powered by CodeMirror 5 for excellent JSON editing experience
99+
- **Syntax Highlighting**: Full JSON syntax highlighting with validation
100+
- **Error Handling**: Built-in JSON validation with user-friendly error messages
101+
- **Responsive Design**: Works seamlessly across different screen sizes
102+
- **Customizable**: Extensive configuration options for different use cases
103+
- **Filament 4.0 Ready**: Fully compatible with the latest Filament version
90104

91105
## 🚧 Testing
92106

bin/build.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as esbuild from 'esbuild';
22

3-
esbuild.build({
3+
// Build JavaScript
4+
await esbuild.build({
45
entryPoints: ['./resources/js/laravel-filament-json-field.js'],
56
outfile: './dist/laravel-filament-json-field.js',
67
bundle: true,
@@ -9,4 +10,4 @@ esbuild.build({
910
treeShaking: true,
1011
target: ['es2020'],
1112
minify: true,
12-
});
13+
});

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codebar-ag/laravel-filament-json-field",
3-
"description": "This is my package laravel-filament-json-field",
3+
"description": "A Laravel Filament JSON Field integration with CodeMirror support",
44
"keywords": [
55
"CodebarAg",
66
"laravel",
@@ -22,9 +22,9 @@
2222
],
2323
"require": {
2424
"php": "8.2.*|8.3.*|8.4.*",
25-
"filament/infolists": "^3.3",
26-
"filament/support": "^3.3",
27-
"filament/tables": "^3.3",
25+
"filament/forms": "^4.0",
26+
"filament/infolists": "^4.0",
27+
"filament/support": "^4.0",
2828
"illuminate/contracts": "^12.0",
2929
"livewire/livewire": "^3.6",
3030
"spatie/laravel-package-tools": "^1.19"

dist/laravel-filament-json-field.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)