Skip to content

Commit 54b836d

Browse files
committed
init commit
0 parents  commit 54b836d

22 files changed

+684
-0
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2

.gitattributes

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Ignore all test and documentation with "export-ignore".
5+
/.github export-ignore
6+
/.gitattributes export-ignore
7+
/.gitignore export-ignore
8+
/phpunit.xml.dist export-ignore
9+
/art export-ignore
10+
/docs export-ignore
11+
/tests export-ignore
12+
/.editorconfig export-ignore
13+
/.php_cs.dist.php export-ignore
14+
/psalm.xml export-ignore
15+
/psalm.xml.dist export-ignore
16+
/testbench.yaml export-ignore
17+
/UPGRADING.md export-ignore
18+
/phpstan.neon.dist export-ignore
19+
/phpstan-baseline.neon export-ignore

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Bug Report
2+
description: Report an Issue or Bug with the Package
3+
title: "[Bug]: "
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
We're sorry to hear you have a problem. Can you help us solve it by providing the following details.
10+
- type: textarea
11+
id: what-happened
12+
attributes:
13+
label: What happened?
14+
description: What did you expect to happen?
15+
placeholder: I cannot currently do X thing because when I do, it breaks X thing.
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: how-to-reproduce
20+
attributes:
21+
label: How to reproduce the bug
22+
description: How did this occur, please add any config values used and provide a set of reliable steps if possible.
23+
placeholder: When I do X I see Y.
24+
validations:
25+
required: true
26+
- type: input
27+
id: package-version
28+
attributes:
29+
label: Package Version
30+
description: What version of our Package are you running? Please be as specific as possible
31+
placeholder: 2.0.0
32+
validations:
33+
required: true
34+
- type: input
35+
id: php-version
36+
attributes:
37+
label: PHP Version
38+
description: What version of PHP are you running? Please be as specific as possible
39+
placeholder: 8.2.0
40+
validations:
41+
required: true
42+
- type: input
43+
id: laravel-version
44+
attributes:
45+
label: Laravel Version
46+
description: What version of Laravel are you running? Please be as specific as possible
47+
placeholder: 9.0.0
48+
validations:
49+
required: true
50+
- type: dropdown
51+
id: operating-systems
52+
attributes:
53+
label: Which operating systems does with happen with?
54+
description: You may select more than one.
55+
multiple: true
56+
options:
57+
- macOS
58+
- Windows
59+
- Linux
60+
- type: textarea
61+
id: notes
62+
attributes:
63+
label: Notes
64+
description: Use this field to provide any other notes that you feel might be relevant to the issue.
65+
validations:
66+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Ask a question
4+
url: https://github.com/icetalker/filament-table-repeatable-entry/discussions/new?category=q-a
5+
about: Ask the community for help
6+
- name: Request a feature
7+
url: https://github.com/icetalker/filament-table-repeatable-entry/discussions/new?category=ideas
8+
about: Share ideas for new features
9+
- name: Report a security issue
10+
url: https://github.com/icetalker/filament-table-repeatable-entry/security/policy
11+
about: Learn how to notify us for sensitive bugs

.github/workflows/run-tests.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: run-tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
os: [ubuntu-latest, windows-latest]
16+
php: [8.2, 8.1]
17+
laravel: [10.*]
18+
stability: [prefer-lowest, prefer-stable]
19+
include:
20+
- laravel: 10.*
21+
testbench: 8.*
22+
carbon: ^2.63
23+
24+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
25+
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v3
29+
30+
- name: Setup PHP
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
php-version: ${{ matrix.php }}
34+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
35+
coverage: none
36+
37+
- name: Setup problem matchers
38+
run: |
39+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
40+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
41+
42+
- name: Install dependencies
43+
run: |
44+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update
45+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
46+
47+
- name: List Installed Dependencies
48+
run: composer show -D
49+
50+
- name: Execute tests
51+
run: vendor/bin/pest

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.idea
2+
.phpunit.cache
3+
build
4+
composer.lock
5+
coverage
6+
docs
7+
phpunit.xml
8+
phpstan.neon
9+
testbench.yaml
10+
vendor
11+
node_modules

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changelog
2+
3+
All notable changes to `filament-table-repeatable-entry` will be documented in this file.

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) icetalker <termlong.com@gmail.com>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Display Filament RepeatableEntry as table
2+
3+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/icetalker/filament-table-repeatable-entry.svg?style=flat-square)](https://packagist.org/packages/icetalker/filament-table-repeatable-entry)
4+
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/icetalker/filament-table-repeatable-entry/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/icetalker/filament-table-repeatable-entry/actions?query=workflow%3Arun-tests+branch%3Amain)
5+
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/icetalker/filament-table-repeatable-entry/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/icetalker/filament-table-repeatable-entry/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
6+
[![Total Downloads](https://img.shields.io/packagist/dt/icetalker/filament-table-repeatable-entry.svg?style=flat-square)](https://packagist.org/packages/icetalker/filament-table-repeatable-entry)
7+
8+
This is a Filament InfolistS Component, use for display RepetableEntry as a table.
9+
10+
## Installation
11+
12+
You can install the package via composer:
13+
14+
```bash
15+
composer require icetalker/filament-table-repeatable-entry
16+
```
17+
18+
## Usage
19+
20+
```php
21+
namespace Icetalker\FilamentTableRepeater\Forms\Components;
22+
23+
TableRepeatableEntry::make('items')
24+
->schema([
25+
Infolists\Components\TextEntry::make('product'),
26+
Infolists\Components\TextEntry::make('quantity'),
27+
Infolists\Components\TextEntry::make('price'),
28+
])
29+
->columnSpan(2),
30+
```
31+
32+
### Striped Row
33+
34+
To enable striped table rows, you can use the `striped()` method:
35+
36+
```php
37+
namespace Icetalker\FilamentTableRepeater\Forms\Components;
38+
39+
TableRepeatableEntry::make('items')
40+
->schema([
41+
Infolists\Components\TextEntry::make('product'),
42+
Infolists\Components\TextEntry::make('quantity'),
43+
Infolists\Components\TextEntry::make('price'),
44+
])
45+
->striped()
46+
->columnSpan(2),
47+
```
48+
49+
### Show Index
50+
51+
To show table row index, please use `showIncdex()`:
52+
53+
```php
54+
namespace Icetalker\FilamentTableRepeater\Forms\Components;
55+
56+
TableRepeatableEntry::make('items')
57+
->schema([
58+
Infolists\Components\TextEntry::make('product'),
59+
Infolists\Components\TextEntry::make('quantity'),
60+
Infolists\Components\TextEntry::make('price'),
61+
])
62+
->striped()
63+
->columnSpan(2),
64+
```
65+
66+
67+
## Changelog
68+
69+
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
70+
71+
## Contributing
72+
73+
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
74+
75+
## Security Vulnerabilities
76+
77+
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
78+
79+
## Credits
80+
81+
- [Martin Hwang](https://github.com/icetalker)
82+
- [All Contributors](../../contributors)
83+
84+
## License
85+
86+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

composer.json

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"name": "icetalker/filament-table-repeatable-entry",
3+
"description": "Display Filament RepeatableEntry as table",
4+
"keywords": [
5+
"icetalker",
6+
"laravel",
7+
"filament-table-repeatable-entry"
8+
],
9+
"homepage": "https://github.com/icetalker/filament-table-repeatable-entry",
10+
"license": "MIT",
11+
"authors": [
12+
{
13+
"name": "Martin Hwang",
14+
"email": "termlong.com@gmail.com",
15+
"role": "Developer"
16+
}
17+
],
18+
"require": {
19+
"php": "^8.1",
20+
"filament/infolists":"3.0-stable",
21+
"spatie/laravel-package-tools": "^1.14.0",
22+
"illuminate/contracts": "^10.0"
23+
},
24+
"require-dev": {
25+
"laravel/pint": "^1.0",
26+
"nunomaduro/collision": "^7.9",
27+
"orchestra/testbench": "^8.0",
28+
"pestphp/pest": "^2.0",
29+
"pestphp/pest-plugin-arch": "^2.0",
30+
"pestphp/pest-plugin-laravel": "^2.0"
31+
},
32+
"autoload": {
33+
"psr-4": {
34+
"Icetalker\\FilamentTableRepeatableEntry\\": "src",
35+
"Icetalker\\FilamentTableRepeatableEntry\\Database\\Factories\\": "database/factories"
36+
}
37+
},
38+
"autoload-dev": {
39+
"psr-4": {
40+
"Icetalker\\FilamentTableRepeatableEntry\\Tests\\": "tests"
41+
}
42+
},
43+
"scripts": {
44+
"post-autoload-dump": "@php ./vendor/bin/testbench package:discover --ansi",
45+
"analyse": "vendor/bin/phpstan analyse",
46+
"test": "vendor/bin/pest",
47+
"test-coverage": "vendor/bin/pest --coverage",
48+
"format": "vendor/bin/pint"
49+
},
50+
"config": {
51+
"sort-packages": true,
52+
"allow-plugins": {
53+
"pestphp/pest-plugin": true,
54+
"phpstan/extension-installer": true
55+
}
56+
},
57+
"extra": {
58+
"laravel": {
59+
"providers": [
60+
"Icetalker\\FilamentTableRepeatableEntry\\FilamentTableRepeatableEntryServiceProvider"
61+
],
62+
"aliases": {
63+
"FilamentTableRepeatableEntry": "Icetalker\\FilamentTableRepeatableEntry\\Facades\\FilamentTableRepeatableEntry"
64+
}
65+
}
66+
},
67+
"minimum-stability": "dev",
68+
"prefer-stable": true
69+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
// config for Icetalker/FilamentTableRepeatableEntry
4+
return [
5+
6+
];

0 commit comments

Comments
 (0)