You've already forked php-flasher
mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-04-05 20:42:56 +01:00
Compare commits
78 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b6afde2990 | |||
| e28123fb3c | |||
| 79717cae5c | |||
| 6fe3407fae | |||
| 8d0dff2224 | |||
| 8047c6f6fe | |||
| c6bdaca89c | |||
| 8e10065c25 | |||
| cd592be772 | |||
| 1a90c1347e | |||
| 0e3d300390 | |||
| e5507140c8 | |||
| cd43f73b88 | |||
| 8e026bea78 | |||
| a5308b85da | |||
| ed522d51a5 | |||
| d9c31820e0 | |||
| eb60a63200 | |||
| 58ca234a37 | |||
| ff2cd6e384 | |||
| 2012b6f5af | |||
| 889fc4701e | |||
| 74a71b36dc | |||
| ae0b5e8f9a | |||
| e44c1d675e | |||
| 61bd5f7a96 | |||
| faf827f248 | |||
| d59e37812d | |||
| 51dd7dc6fb | |||
| 2c2326a4a9 | |||
| fb34c1525d | |||
| d496046d50 | |||
| 1c5b47ab52 | |||
| 87f015341e | |||
| 6087a940c6 | |||
| be82ad0b69 | |||
| 88271276fc | |||
| 456e434474 | |||
| b28525d718 | |||
| a820277f25 | |||
| 10883353f2 | |||
| 6de67f7fb3 | |||
| b08161f9ec | |||
| c35e973524 | |||
| f985ea2999 | |||
| e42e91a1e0 | |||
| 08eb6089e1 | |||
| dd93f6e66d | |||
| b6989336e7 | |||
| 79c6fc3bcb | |||
| f61a7d83ce | |||
| b07c52e643 | |||
| 9d2ccc21c9 | |||
| c98a15dc0e | |||
| 8f4552bf4c | |||
| 87463be485 | |||
| 42eacbe570 | |||
| 6d9515d26c | |||
| 3d893a68eb | |||
| f34bd1385a | |||
| 1b2a778ba2 | |||
| 953fb78489 | |||
| 6d05508f97 | |||
| 5264899310 | |||
| c500acbc94 | |||
| 9123f481d8 | |||
| 9b356ac711 | |||
| 0bf6c57569 | |||
| 69e0f71d30 | |||
| 2805115fd7 | |||
| 47f6b54e06 | |||
| 6ac46e400e | |||
| 5476d33112 | |||
| 95beddfafc | |||
| bbccf0bc4e | |||
| c0709b0747 | |||
| 39f1f3885e | |||
| 816529029b |
@@ -85,6 +85,16 @@
|
||||
"contributions": [
|
||||
"design"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "AhmedGamal",
|
||||
"name": "Ahmed Gamal",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/11786167?v=4",
|
||||
"profile": "https://github.com/AhmedGamal",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
name: 🧪 Run Tests & 🛠️ Static Analysis
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 2.x
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 0 * * *' # Daily at midnight
|
||||
|
||||
jobs:
|
||||
static-analysis:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php: [ 8.2 ]
|
||||
|
||||
name: 🐘 PHP ${{ matrix.php }} Static Analysis
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 🔧 Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
coverage: none
|
||||
|
||||
- name: 🚚 Cache Composer Dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.composer/cache
|
||||
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('composer.json') }}
|
||||
restore-keys: ${{ runner.os }}-composer-${{ matrix.php }}-
|
||||
|
||||
- name: 📦 Install Dependencies
|
||||
run: |
|
||||
composer config --global allow-plugins true
|
||||
composer install
|
||||
|
||||
- name: 🧹 Run PHP CS Fixer (Code Style)
|
||||
run: vendor/bin/php-cs-fixer fix --dry-run
|
||||
|
||||
- name: 🔍 Run PHPStan (Static Analysis)
|
||||
run: vendor/bin/phpstan analyse
|
||||
|
||||
- name: 🚀 Run PHPLint (Syntax Check)
|
||||
run: vendor/bin/phplint
|
||||
|
||||
prime-test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- { php: 8.4, phpunit: 10.5.* }
|
||||
- { php: 8.3, phpunit: 10.5.* }
|
||||
- { php: 8.2, phpunit: 10.5.* }
|
||||
|
||||
name: 🐘 PHP ${{ matrix.php }}
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 🔧 Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
coverage: none
|
||||
|
||||
- name: 🚚 Cache dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.composer/cache
|
||||
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('composer.json') }}
|
||||
restore-keys: ${{ runner.os }}-composer-${{ matrix.php }}-
|
||||
|
||||
- name: 📦 Install dependencies
|
||||
run: |
|
||||
sed -i '/"require": {/,/},/d; /"require-dev": {/,/},/d' composer.json
|
||||
composer config --global allow-plugins true
|
||||
composer require "phpunit/phpunit:${{ matrix.phpunit }}" "mockery/mockery" "psr/container" --no-interaction --no-update
|
||||
composer update --prefer-lowest -W
|
||||
|
||||
- name: ✅ Execute tests
|
||||
run: vendor/bin/phpunit --testsuite prime
|
||||
|
||||
symfony-test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- { symfony: 7.2.*, php: 8.4, phpunit: 10.5.* }
|
||||
- { symfony: 7.2.*, php: 8.3, phpunit: 10.5.* }
|
||||
- { symfony: 7.2.*, php: 8.2, phpunit: 10.5.* }
|
||||
- { symfony: 7.1.*, php: 8.2, phpunit: 10.5.* }
|
||||
- { symfony: 7.0.*, php: 8.2, phpunit: 10.5.* }
|
||||
|
||||
name: 🌉 Symfony ${{ matrix.symfony }} PHP ${{ matrix.php }}
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 🔧 Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
coverage: none
|
||||
|
||||
- name: 🚚 Cache dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.composer/cache
|
||||
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('composer.json') }}
|
||||
restore-keys: ${{ runner.os }}-composer-${{ matrix.php }}-
|
||||
|
||||
- name: 📦 Install dependencies
|
||||
run: |
|
||||
sed -i '/"require": {/,/},/d; /"require-dev": {/,/},/d' composer.json
|
||||
composer config --global allow-plugins true
|
||||
composer config extra.symfony.require "${{ matrix.symfony }}"
|
||||
composer require "symfony/config:${{ matrix.symfony }}" "symfony/console:${{ matrix.symfony }}" "symfony/dependency-injection:${{ matrix.symfony }}" "symfony/framework-bundle:${{ matrix.symfony }}" "symfony/http-kernel:${{ matrix.symfony }}" "symfony/translation:${{ matrix.symfony }}" "symfony/twig-bundle:${{ matrix.symfony }}" "phpunit/phpunit:${{ matrix.phpunit }}" "mockery/mockery" "psr/container" "monolog/monolog" --no-interaction --no-update
|
||||
composer update --prefer-lowest -W
|
||||
|
||||
- name: ✅ Execute tests
|
||||
run: vendor/bin/phpunit --testsuite symfony
|
||||
|
||||
laravel-test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- { laravel: 11.*, testbench: 9.*, php: 8.3, phpunit: 10.5.* }
|
||||
- { laravel: 11.*, testbench: 9.*, php: 8.2, phpunit: 10.5.* }
|
||||
|
||||
name: 🏗 Laravel ${{ matrix.laravel }} PHP ${{ matrix.php }}
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 🔧 Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: fileinfo
|
||||
coverage: none
|
||||
|
||||
- name: 🚚 Cache dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.composer/cache
|
||||
key: ${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
|
||||
restore-keys: ${{ matrix.php }}-composer
|
||||
|
||||
- name: 📦 Install dependencies
|
||||
run: |
|
||||
sed -i '/\"require\": {/,/},/d; /\"require-dev\": {/,/},/d' composer.json
|
||||
composer config --global allow-plugins true
|
||||
composer require "laravel/framework:${{ matrix.laravel }}" "phpunit/phpunit:${{ matrix.phpunit }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
|
||||
composer update --prefer-lowest -W
|
||||
|
||||
- name: ✅ Execute tests
|
||||
run: vendor/bin/phpunit --testsuite laravel
|
||||
@@ -2,7 +2,11 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
use PhpCsFixer\Config;
|
||||
use PhpCsFixer\Finder;
|
||||
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
|
||||
|
||||
$finder = Finder::create()
|
||||
->in([
|
||||
__DIR__.'/src',
|
||||
__DIR__.'/tests',
|
||||
@@ -11,7 +15,8 @@ $finder = PhpCsFixer\Finder::create()
|
||||
->append([__FILE__])
|
||||
;
|
||||
|
||||
return (new PhpCsFixer\Config())
|
||||
return (new Config())
|
||||
->setParallelConfig(ParallelConfigFactory::detect())
|
||||
->setRiskyAllowed(true)
|
||||
->setRules([
|
||||
'@PSR12' => true,
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# CHANGELOG for 2.x
|
||||
|
||||
## [Unreleased](https://github.com/php-flasher/php-flasher/compare/v2.0.4...2.x)
|
||||
|
||||
## [v2.0.4](https://github.com/php-flasher/php-flasher/compare/v2.0.3...v2.0.4) - 2024-09-22
|
||||
|
||||
* bug [laravel] Changed HttpKernel import from `Illuminate\Foundation\Http\Kernel` to `Illuminate\Contracts\Http\Kernel` to use the contract interface instead of the concrete implementation. See [PR #197](https://github.com/php-flasher/php-flasher/pull/197) by [yoeunes](https://github.com/yoeunes)
|
||||
|
||||
## [v2.0.3](https://github.com/php-flasher/php-flasher/compare/v2.0.2...v2.0.3) - 2024-09-21
|
||||
|
||||
* remove border from flasher container by [yoeunes](https://github.com/yoeunes)
|
||||
|
||||
## [v2.0.2](https://github.com/php-flasher/php-flasher/compare/v2.0.1...v2.0.2) - 2024-09-19
|
||||
|
||||
* feature [Flasher] add escapeHtml option for secure HTML escaping in notifications. See [PR #196](https://github.com/php-flasher/php-flasher/pull/196) by [yoeunes](https://github.com/yoeunes)
|
||||
* feature [Flasher] add Default configuration options. See [PR #183](https://github.com/php-flasher/php-flasher/pull/183) by [AhmedGamal](https://github.com/AhmedGamal)
|
||||
* feature [Laravel] Refactor middleware to use Symfony's base response class, addressing compatibility issues. See [PR #184](https://github.com/php-flasher/php-flasher/pull/184) by [yoeunes](https://github.com/yoeunes)
|
||||
|
||||
## [v2.0.1](https://github.com/php-flasher/php-flasher/compare/v2.0.0...v2.0.1) - 2024-05-23
|
||||
|
||||
* bug [#176](https://github.com/php-flasher/php-flasher/issues/176) [Laravel] Correctly disable FlasherMiddleware when `inject_assets` is set to false. See [PR #177](https://github.com/php-flasher/php-flasher/pull/177) by [yoeunes](https://github.com/yoeunes)
|
||||
* bug [#176](https://github.com/php-flasher/php-flasher/issues/176) [Flasher] Ensure global `timeout` option applies to all requests. See [PR #180](https://github.com/php-flasher/php-flasher/pull/180) by [yoeunes](https://github.com/yoeunes)
|
||||
* bug [#176](https://github.com/php-flasher/php-flasher/issues/176) [Laravel] Allow disabling of default flash replacement by setting `flash_bag` to false. See [PR #181](https://github.com/php-flasher/php-flasher/pull/181) by [yoeunes](https://github.com/yoeunes)
|
||||
* bug [#176](https://github.com/php-flasher/php-flasher/issues/176) [Flasher] Ensure `flash_bag` option overrides default values instead of appending. See [PR #182](https://github.com/php-flasher/php-flasher/pull/182) by [yoeunes](https://github.com/yoeunes)
|
||||
@@ -1,3 +1,9 @@
|
||||
<div align="center">
|
||||
<a href="https://github.com/php-flasher/php-flasher/blob/2.x/docs/palestine.md">
|
||||
<img src="https://raw.githubusercontent.com/php-flasher/art/main/palestine-banner-support.svg" width="800px" alt="Help Palestine"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github-dark.png">
|
||||
@@ -36,7 +42,7 @@ Shining stars of our community:
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/younes-ennaji/"><img src="https://avatars.githubusercontent.com/u/10859693?v=4?s=100" width="100px;" alt="Younes ENNAJI"/><br /><sub><b>Younes ENNAJI</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Code">💻</a> <a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Documentation">📖</a> <a href="#maintenance-yoeunes" title="Maintenance">🚧</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/younes--ennaji/"><img src="https://avatars.githubusercontent.com/u/10859693?v=4?s=100" width="100px;" alt="Younes ENNAJI"/><br /><sub><b>Younes ENNAJI</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Code">💻</a> <a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Documentation">📖</a> <a href="#maintenance-yoeunes" title="Maintenance">🚧</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/salmayno"><img src="https://avatars.githubusercontent.com/u/27933199?v=4?s=100" width="100px;" alt="Salma Mourad"/><br /><sub><b>Salma Mourad</b></sub></a><br /><a href="#financial-salmayno" title="Financial">💵</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.youtube.com/rstacode"><img src="https://avatars.githubusercontent.com/u/35005761?v=4?s=100" width="100px;" alt="Nashwan Abdullah"/><br /><sub><b>Nashwan Abdullah</b></sub></a><br /><a href="#financial-codenashwan" title="Financial">💵</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://darvis.nl/"><img src="https://avatars.githubusercontent.com/u/7394837?v=4?s=100" width="100px;" alt="Arvid de Jong"/><br /><sub><b>Arvid de Jong</b></sub></a><br /><a href="#financial-darviscommerce" title="Financial">💵</a></td>
|
||||
@@ -46,7 +52,7 @@ Shining stars of our community:
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.instagram.com/lucas.maciel_z"><img src="https://avatars.githubusercontent.com/u/80225404?v=4?s=100" width="100px;" alt="Lucas Maciel"/><br /><sub><b>Lucas Maciel</b></sub></a><br /><a href="#design-LucasStorm" title="Design">🎨</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://siek.io/"><img src="https://avatars.githubusercontent.com/u/5730766?v=4?s=100" width="100px;" alt="Antoni Siek"/><br /><sub><b>Antoni Siek</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=ImJustToNy" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/AhmedGamal"><img src="https://avatars.githubusercontent.com/u/11786167?v=4?s=100" width="100px;" alt="Ahmed Gamal"/><br /><sub><b>Ahmed Gamal</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=AhmedGamal" title="Code">💻</a> <a href="https://github.com/php-flasher/php-flasher/commits?author=AhmedGamal" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
+18
-14
@@ -24,22 +24,26 @@
|
||||
"ext-intl": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"illuminate/contracts": "^11.0",
|
||||
"illuminate/routing": "^11.0",
|
||||
"illuminate/support": "^11.0",
|
||||
"larastan/larastan": "^2.9.5",
|
||||
"larastan/larastan": "^2.9",
|
||||
"laravel/octane": "^2.3",
|
||||
"livewire/livewire": "^3.3",
|
||||
"mockery/mockery": "^1.6.11",
|
||||
"orchestra/testbench": "^9.0.4",
|
||||
"overtrue/phplint": "^9.2.0",
|
||||
"php-cs-fixer/shim": "^3.54.0",
|
||||
"phpstan/phpstan": "^1.10.67",
|
||||
"phpstan/phpstan-mockery": "^1.1.2",
|
||||
"phpstan/phpstan-symfony": "^1.3.12",
|
||||
"phpunit/phpunit": "^10.5.13",
|
||||
"livewire/livewire": "^3.5",
|
||||
"mockery/mockery": "^1.6",
|
||||
"orchestra/testbench": "^9.4",
|
||||
"overtrue/phplint": "^9.4",
|
||||
"paragonie/random_compat": "^2.0",
|
||||
"php-cs-fixer/shim": "^3.64",
|
||||
"phpstan/phpstan": "^1.12",
|
||||
"phpstan/phpstan-mockery": "^1.1",
|
||||
"phpstan/phpstan-phpunit": "^1.4",
|
||||
"phpstan/phpstan-symfony": "^1.4",
|
||||
"phpunit/phpunit": "^10.5",
|
||||
"psr/container": "^1.1|^2.0",
|
||||
"rector/rector": "^1.0.4",
|
||||
"rector/swiss-knife": "^0.2.2",
|
||||
"rector/rector": "^1.2",
|
||||
"rector/swiss-knife": "^0.2",
|
||||
"spatie/ray": "^1.41",
|
||||
"symfony/config": "^7.0",
|
||||
"symfony/console": "^7.0",
|
||||
"symfony/dependency-injection": "^7.0",
|
||||
@@ -47,8 +51,8 @@
|
||||
"symfony/http-kernel": "^7.0",
|
||||
"symfony/translation": "^7.0",
|
||||
"symfony/twig-bundle": "^7.0",
|
||||
"symfony/ux-twig-component": "^2.14",
|
||||
"symplify/monorepo-builder": "^11.2.20"
|
||||
"symfony/ux-twig-component": "^2.19",
|
||||
"symplify/monorepo-builder": "^11.2"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
||||
Generated
+418
-211
File diff suppressed because it is too large
Load Diff
@@ -3,16 +3,20 @@
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Foundation\Configuration\Exceptions;
|
||||
use Illuminate\Foundation\Configuration\Middleware;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
return Application::configure(basePath: dirname(__DIR__))
|
||||
->withRouting(
|
||||
web: __DIR__.'/../routes/web.php',
|
||||
commands: __DIR__.'/../routes/console.php',
|
||||
health: '/up',
|
||||
then: function () {
|
||||
Route::middleware('web')->group(base_path('routes/issues.php'));
|
||||
},
|
||||
)
|
||||
->withMiddleware(function (Middleware $middleware) {
|
||||
$middleware->web(append: [
|
||||
\App\Http\Middleware\HandleInertiaRequests::class,
|
||||
App\Http\Middleware\HandleInertiaRequests::class,
|
||||
]);
|
||||
})
|
||||
->withExceptions(function (Exceptions $exceptions) {
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
"nunomaduro/collision": "^8.0",
|
||||
"pestphp/pest": "^2.34",
|
||||
"pestphp/pest-plugin-laravel": "^2.3",
|
||||
"spatie/laravel-ignition": "^2.4"
|
||||
"spatie/laravel-ignition": "^2.4",
|
||||
"spatie/ray": "^1.41"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@@ -49,13 +50,16 @@
|
||||
"scripts": {
|
||||
"post-autoload-dump": [
|
||||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||
"@php artisan package:discover --ansi"
|
||||
"@php artisan package:discover --ansi",
|
||||
"@php artisan flasher:install --symlink"
|
||||
],
|
||||
"post-update-cmd": [
|
||||
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
|
||||
"@php artisan vendor:publish --tag=laravel-assets --ansi --force",
|
||||
"@php artisan flasher:install --symlink"
|
||||
],
|
||||
"post-root-package-install": [
|
||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
|
||||
"@php artisan flasher:install --symlink"
|
||||
],
|
||||
"post-create-project-cmd": [
|
||||
"@php artisan key:generate --ansi",
|
||||
|
||||
Generated
+353
-333
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'inject_assets' => true,
|
||||
|
||||
'options' => [
|
||||
'timeout' => 5000, // in milliseconds
|
||||
'position' => 'top-right',
|
||||
],
|
||||
|
||||
'flash_bag' => [
|
||||
'success' => ['success', 'ok', 'completed', 'passed', 'achieved'],
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('/issues/190', function () {
|
||||
flash()->success('Your order has been placed successfully.');
|
||||
// Passing another success message with the view
|
||||
return redirect('/issues/190/redirect')->with('success', 'Your order will be delivered in 3-5 business days.');
|
||||
});
|
||||
|
||||
Route::get('/issues/190/redirect', function () {
|
||||
return view('welcome');
|
||||
});
|
||||
@@ -1,17 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use App\Entity\Book;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('/', function () {
|
||||
// sweetalert()->timerProgressBar()->success('hello from Home Controller');
|
||||
// noty()->layout('topCenter')->success('hello from Home Controller');
|
||||
// notyf()->ripple(false)->warning('hello from Home Controller');
|
||||
// toastr()->positionClass('toast-bottom-left')->error('hello from Home Controller');
|
||||
// flash()->use('flasher')->success('hello from flasher factory');
|
||||
|
||||
flash()->created(new Book('lord of the rings'));
|
||||
flash()->saved(new Book('harry potter'));
|
||||
|
||||
sweetalert()->timerProgressBar()->success('Your account has been successfully created!');
|
||||
noty()->layout('topCenter')->success('Welcome back, John Doe!');
|
||||
notyf()->ripple(false)->warning('Your subscription is about to expire in 3 days.');
|
||||
toastr()->positionClass('toast-bottom-left')->error('Payment failed. Please try again.');
|
||||
flash()->use('flasher')->success('Your profile has been updated successfully.');
|
||||
flash()->created(new Book('The Great Gatsby'));
|
||||
flash()->saved(new Book('1984'));
|
||||
session()->flash('success', 'Your settings have been saved.');
|
||||
return view('welcome');
|
||||
})->name('app_home');
|
||||
|
||||
Route::get('/redirect', function () {
|
||||
session()->flash('success', 'You have been redirected successfully.');
|
||||
return redirect('/destination');
|
||||
});
|
||||
|
||||
Route::get('/destination', function () {
|
||||
return view('welcome');
|
||||
});
|
||||
|
||||
@@ -61,7 +61,8 @@
|
||||
"scripts": {
|
||||
"auto-scripts": {
|
||||
"cache:clear": "symfony-cmd",
|
||||
"assets:install %PUBLIC_DIR%": "symfony-cmd"
|
||||
"assets:install %PUBLIC_DIR%": "symfony-cmd",
|
||||
"flasher:install": "symfony-cmd"
|
||||
},
|
||||
"post-install-cmd": [
|
||||
"@auto-scripts"
|
||||
@@ -80,6 +81,7 @@
|
||||
}
|
||||
},
|
||||
"require-dev": {
|
||||
"spatie/ray": "^1.41",
|
||||
"symfony/maker-bundle": "^1.58"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+754
-247
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,35 @@
|
||||
|
||||
flasher:
|
||||
# Default notification library (e.g., 'flasher', 'toastr', 'noty', etc.)
|
||||
default: flasher
|
||||
|
||||
# Path to the main JavaScript file of PHPFlasher
|
||||
main_script: '/vendor/flasher/flasher.min.js'
|
||||
|
||||
# Path to the stylesheets for PHPFlasher notifications
|
||||
styles:
|
||||
- '/vendor/flasher/flasher.min.css'
|
||||
|
||||
# Enable translation of PHPFlasher messages using Symfony's translator service
|
||||
translate: true
|
||||
|
||||
# Automatically inject PHPFlasher assets in HTML response
|
||||
inject_assets: true
|
||||
|
||||
# Global options
|
||||
options:
|
||||
# timeout in milliseconds
|
||||
timeout: 5000
|
||||
position: 'top-right'
|
||||
|
||||
# Map Symfony session keys to PHPFlasher notification types
|
||||
flash_bag:
|
||||
success: ['success']
|
||||
error: ['error', 'danger']
|
||||
warning: ['warning', 'alarm']
|
||||
info: ['info', 'notice', 'alert']
|
||||
|
||||
# Criteria to filter displayed notifications (limit, types)
|
||||
filter:
|
||||
# Limit number of displayed notifications
|
||||
limit: 5
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"dist/main.css": "/dist/main.73b25228.css",
|
||||
"dist/main.js": "/dist/main.09f63ce9.js",
|
||||
"dist/main.css": "/dist/main.816d3c07.css",
|
||||
"dist/main.js": "/dist/main.a8422ec5.js",
|
||||
"dist/455.3a7b4474.css": "/dist/455.3a7b4474.css",
|
||||
"dist/455.095e6545.js": "/dist/455.095e6545.js",
|
||||
"dist/411.29cd993e.css": "/dist/411.29cd993e.css",
|
||||
|
||||
@@ -3,3 +3,7 @@ version: "2.x"
|
||||
title: "Easily add flash messages to your #Laravel or #Symfony projects with PHPFlasher - a powerful, easy-to-use package for improved user engagement & experience"
|
||||
|
||||
description: "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution."
|
||||
|
||||
versions:
|
||||
2.x: "https://php-flasher.io/"
|
||||
1.x: "https://php-flasher.github.io/"
|
||||
|
||||
+31
-40
@@ -1,7 +1,6 @@
|
||||
## <i class="fa-duotone fa-list-radio"></i> Usage
|
||||
|
||||
To display a notification message, you can either use the `flash()` helper method or obtain an instance of `flasher` from the service container.
|
||||
Then, before returning a view or redirecting, call the `success()` method and pass in the desired message to be displayed.
|
||||
To show a notification message, you can use the `flash()` helper function or get an instance of `flasher` from the service container. Before you return a view or redirect, call one of the notification methods like `success()` and pass in the message you want to display.
|
||||
|
||||
{% assign id = '#/ PHPFlasher' %}
|
||||
{% assign type = 'success' %}
|
||||
@@ -24,7 +23,7 @@ class BookController
|
||||
|
||||
flash('{{ message }}');
|
||||
|
||||
// ... redirect or render the view
|
||||
// ... redirect or render a view
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -36,18 +35,16 @@ class BookController
|
||||
|
||||
$flasher->success('{{ site.data.messages["success"] | sample }}');
|
||||
|
||||
// ... redirect or render the view
|
||||
// ... redirect or render a view
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
It's important to choose a message that is clear and concise, and that accurately reflects the outcome of the operation. <br />
|
||||
In this case, `"Book has been created successfully!"` is already a good message,
|
||||
but you may want to tailor it to fit the specific context and language of your application.
|
||||
Choose a message that is clear and tells the user what happened. For example, `"Book has been created successfully!"` is a good message, but you can adjust it to fit your application's context and language.
|
||||
|
||||
> Using this package is actually pretty easy. Adding notifications to your application actually require only one line of code.
|
||||
> Using this package is easy. You can add notifications to your application with just one line of code.
|
||||
|
||||
{% assign id = '#/ usage success' %}
|
||||
{% assign type = 'success' %}
|
||||
@@ -99,8 +96,7 @@ flash()->{{ type }}('{{ message }}');
|
||||
|
||||
---
|
||||
|
||||
These four methods `success()`, `error()`, `warning()`, `info()` are simply convenience shortcuts for the `flash()` method,
|
||||
allowing you to specify the `type` and `message` in a single method call rather than having to pass both as separate arguments to the `flash()` method.
|
||||
These four methods — `success()`, `error()`, `warning()`, and `info()` — are shortcuts for the `flash()` method. They let you specify the `type` and `message` in one method call instead of passing them separately to `flash()`.
|
||||
|
||||
```php
|
||||
flash()->flash(string $type, string $message, string $title = null, array $options = [])
|
||||
@@ -118,22 +114,19 @@ flash()->flash(string $type, string $message, string $title = null, array $optio
|
||||
flash()->flash('{{ type }}', '{{ message }}');
|
||||
```
|
||||
|
||||
| param | description |
|
||||
|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `$type` | Notification type : <span class="text-white bg-green-600 px-2 py-1 rounded">success</span>, <span class="text-white bg-red-600 px-2 py-1 rounded">error</span>, <span class="text-white bg-yellow-600 px-2 py-1 rounded">warning</span>, <span class="text-white bg-blue-600 px-2 py-1 rounded">info</span> |
|
||||
| `$message` | The body of the message you want to deliver to your user. This may contain HTML. If you add links, be sure to add the appropriate classes for the framework you are using. |
|
||||
| `$title` | The notification title, Can also include HTML |
|
||||
| `$options` | Custom options for javascript libraries (toastr, noty, notyf ...etc) |
|
||||
|
||||
| Parameter | Description |
|
||||
|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `$type` | Notification type: <span class="text-white bg-green-600 px-2 py-1 rounded">success</span>, <span class="text-white bg-red-600 px-2 py-1 rounded">error</span>, <span class="text-white bg-yellow-600 px-2 py-1 rounded">warning</span>, <span class="text-white bg-blue-600 px-2 py-1 rounded">info</span> |
|
||||
| `$message` | The message you want to show to the user. This can include HTML. If you add links, make sure to add the right classes for your framework. |
|
||||
| `$title` | The notification title. Can also include HTML. |
|
||||
| `$options` | Custom options for JavaScript libraries (toastr, noty, notyf, etc.). |
|
||||
|
||||
---
|
||||
|
||||
<p id="method-options"><a href="#method-options" class="anchor"><i class="fa-duotone fa-link"></i> options</a></p>
|
||||
|
||||
The `options()` method allows you to set multiple options at once by passing an array of `key-value` pairs,
|
||||
while the `option()` method allows you to set a single option by specifying its name and value as separate arguments. <br /><br />
|
||||
The optional `$append` argument for the `options()` method can be used to specify whether the new options should be appended to any existing options,
|
||||
or whether they should overwrite them.
|
||||
The `options()` method lets you set multiple options at once by passing an array of key-value pairs. The `option()` method lets you set a single option by specifying its name and value. The `$append` argument for `options()` decides whether the new options should be added to existing ones (`true`) or replace them (`false`).
|
||||
|
||||
```php
|
||||
flash()->options(array $options, bool $append = true);
|
||||
@@ -160,7 +153,7 @@ flash()
|
||||
|
||||
<p id="method-option"><a href="#method-option" class="anchor"><i class="fa-duotone fa-link"></i> option</a></p>
|
||||
|
||||
Set a single option by specifying its name and value as separate arguments.
|
||||
To set a single option:
|
||||
|
||||
```php
|
||||
flash()->option(string $option, mixed $value);
|
||||
@@ -185,7 +178,7 @@ flash()
|
||||
|
||||
<p id="method-priority"><a href="#method-priority" class="anchor"><i class="fa-duotone fa-link"></i> priority</a></p>
|
||||
|
||||
Sets the priority of a flash message, the highest priority will be displayed first.
|
||||
Set the priority of a flash message. Messages with higher priority appear first.
|
||||
|
||||
```php
|
||||
flash()->priority(int $priority);
|
||||
@@ -246,17 +239,17 @@ flash()
|
||||
->info('{{ infoMessage }}');
|
||||
```
|
||||
|
||||
| param | description |
|
||||
|-------------|--------------------------------------------------------------------------------------------|
|
||||
| `$priority` | The priority of the notification, the higher the priority, the sooner it will be displayed |
|
||||
| param | description |
|
||||
|-------------|-------------------------------------------------------------------|
|
||||
| `$priority` | The priority of the notification. Higher numbers are shown first. |
|
||||
|
||||
---
|
||||
|
||||
<p id="method-hops"><a href="#method-hops" class="anchor"><i class="fa-duotone fa-link"></i> hops</a></p>
|
||||
|
||||
This method sets the number of requests that the flash message should persist for. By default, flash messages are only displayed for a single request and are then discarded. By setting the number of hops, the flash message will be persisted for multiple requests.
|
||||
The `hops()` method sets how many requests the flash message should last for. By default, flash messages show for one request. Setting the number of hops makes the message stay for multiple requests.
|
||||
|
||||
As an example, with a multi-page form, you may want to store messages until all pages have been filled.
|
||||
For example, in a multi-page form, you might want to keep messages until all pages are completed.
|
||||
|
||||
{% assign id = '#/ usage hops' %}
|
||||
{% assign type = site.data.messages.types | sample %}
|
||||
@@ -274,16 +267,15 @@ flash()
|
||||
->{{ type }}('{{ message }}');
|
||||
```
|
||||
|
||||
| param | description |
|
||||
|---------|---------------------------------------------------------------|
|
||||
| `$hops` | indicate how many requests the flash message will persist for |
|
||||
| param | description |
|
||||
|---------|-------------------------------------------------------|
|
||||
| `$hops` | Number of requests the flash message will persist for |
|
||||
|
||||
---
|
||||
|
||||
<p id="method-translate"><a href="#method-translate" class="anchor"><i class="fa-duotone fa-link"></i> translate</a></p>
|
||||
|
||||
This method sets the `locale` to be used for the translation of the flash message. If a non-null value is provided,
|
||||
the flash message will be translated into the specified language. If null is provided, the **default** `locale` will be used.
|
||||
The `translate()` method sets the `locale` for translating the flash message. If you provide a locale, the message will be translated to that language. If you pass `null`, it uses the default locale.
|
||||
|
||||
```php
|
||||
flash()->translate(string $locale = null);
|
||||
@@ -320,18 +312,17 @@ flash()
|
||||
->{{ type }}('Your request was processed successfully.', 'Congratulations!');
|
||||
```
|
||||
|
||||
| param | description |
|
||||
|-----------|------------------------------------------------------------------------------|
|
||||
| `$locale` | The locale to be used for the translation, or null to use the default locale |
|
||||
| param | description |
|
||||
|-----------|--------------------------------------------------------------|
|
||||
| `$locale` | The locale to use for translation, or `null` for the default |
|
||||
|
||||
It is **important** to note that the `translate()` method only sets the locale to be used for the translation of the flash message.
|
||||
It does not actually perform the translation itself.
|
||||
**Note:** The `translate()` method only sets the locale. It doesn't translate the message by itself.
|
||||
|
||||
In order to translate the flash message, you will need to provide the appropriate translation keys in your translation files.
|
||||
To translate the message, you need to add the translation keys in your translation files.
|
||||
|
||||
{% if page.framework == 'laravel' %}
|
||||
|
||||
In the above example, to translate the flash message into `Arabic`, you will need to add the following keys to the `resources/lang/ar/messages.php` file:
|
||||
For example, to translate the message into Arabic, add these keys to `resources/lang/ar/messages.php`:
|
||||
|
||||
```php
|
||||
return [
|
||||
@@ -342,7 +333,7 @@ return [
|
||||
|
||||
{% elsif page.framework == 'symfony' %}
|
||||
|
||||
In the above example, to translate the flash message into `Arabic`, you will need to add the following keys to the `translations/messages.ar.yaml` file:
|
||||
For example, to translate the message into Arabic, add these keys to `translations/messages.ar.yaml`:
|
||||
|
||||
```yaml
|
||||
Your request was processed successfully.: 'تمت العملية بنجاح.'
|
||||
|
||||
+14
-13
@@ -18,12 +18,14 @@
|
||||
<div class="h-16 z-10 top-0 w-screen bg-white border-b border-indigo-200 shadow">
|
||||
<div id="header-logo" class="lg:container lg:mx-auto px-4 py-2">
|
||||
<div class="flex items-center flex-no-shrink pt-1">
|
||||
<a href="/" class="flex items-center">
|
||||
<span class="pr-2 font-normal font-normal leading-none text-3xl text-indigo-900 hidden sm:block">
|
||||
<img class="fill-current h-8 mr-2" src="/static/images/php-flasher-logo.svg" />
|
||||
<sup class="text-xs relative text-grey-dark" style="top: -20px;">{{ site.data.project.version }}</sup>
|
||||
<div class="flex items-center">
|
||||
<span class="pr-2 font-normal leading-none text-3xl text-indigo-900 hidden sm:block">
|
||||
<img class="fill-current h-8 mr-2" src="/static/images/php-flasher-logo.svg" alt="PHPFlasher Logo" />
|
||||
{% for version in site.data.project.versions %}
|
||||
<a href="{{ version[1] }}" class="{% if forloop.first %}text-white bg-indigo-500{% else %}text-indigo-600{% endif %} p-1 rounded text-xs relative text-grey-dark hover:bg-indigo-500 hover:scale-110 hover:text-white" style="top: -20px;">{{ version[0] }}</a>
|
||||
{% endfor %}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex-grow"></div>
|
||||
<a href="#" id="menu-toggle" class="block lg:hidden h-8 w-8 border p-1 border-transparent text-gray-200 hover:text-grey menu-closed">
|
||||
<svg class="menu-closed:shown fill-current h-full w-full" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
||||
@@ -44,7 +46,7 @@
|
||||
<ul class="list-reset mb-8">
|
||||
{% for link in section[1] %}
|
||||
<li class="{% if page.url == link[1] %}bg-indigo-500 {% endif %}px-6 rounded">
|
||||
<a class="leading-loose text-md inline-block w-full {% if page.url == link[1] %}text-white{% else %}text-gray-900{% endif %}" href="{{ link[1] }}">{{ link[0] }}</a>
|
||||
<a href="{{ link[1] }}" class="leading-loose text-md inline-block w-full {% if page.url == link[1] %}text-white{% else %}text-gray-900{% endif %}">{{ link[0] }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@@ -56,13 +58,12 @@
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>
|
||||
If you find <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> useful,
|
||||
we would greatly appreciate your support in the form of a <strong>star</strong> rating ⭐
|
||||
on <a href="https://github.com/php-flasher/php-flasher"><i class="fab fa-github text-black"></i> GitHub</a>
|
||||
or by sharing the project on Twitter <a href="http://twitter.com/share?text=I%20really%20like%20this%20nice%20PHP%20package%2C%20that%20allows%20you%20to%20implement%20flash%20notifications%20in%20your%20app%20fast%20%F0%9F%9A%80%0A%0A%E2%86%92%20https%3A%2F%2Fphp-flasher.io%20by%20%40yoeunes%0A%0A%23php%20%23laravel%20%23symfony%20%23opensource"><i class="fab fa-twitter"></i> click here</a>.
|
||||
Your feedback helps us keep the package up-to-date and well-maintained. <strong>Thank you</strong> <i class="fa-solid fa-heart text-red-600"></i>
|
||||
</p>
|
||||
<p>
|
||||
If you find <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> useful,
|
||||
please consider giving it a <strong>⭐ star</strong> on <a href="https://github.com/php-flasher/php-flasher"><i class="fab fa-github text-black"></i> GitHub</a> 😊.
|
||||
If you spot any typos or have suggestions, feel free to contribute to the documentation 📝.
|
||||
Your feedback helps keep the project up-to-date and well-maintained. <strong>Thank you</strong> <i class="fa-solid fa-heart text-red-600"></i>
|
||||
</p>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
|
||||
Vendored
+2
-2
@@ -2,10 +2,10 @@
|
||||
"entrypoints": {
|
||||
"main": {
|
||||
"css": [
|
||||
"/dist/main.73b25228.css"
|
||||
"/dist/main.816d3c07.css"
|
||||
],
|
||||
"js": [
|
||||
"/dist/main.09f63ce9.js"
|
||||
"/dist/main.a8422ec5.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
-2
File diff suppressed because one or more lines are too long
Vendored
-2
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+2
File diff suppressed because one or more lines are too long
Generated
+185
-199
@@ -16,11 +16,11 @@
|
||||
"@flasher/flasher-toastr": "file:../src/Toastr/Prime/Resources",
|
||||
"@hotwired/stimulus": "^3.2.2",
|
||||
"@symfony/stimulus-bridge": "^3.2.2",
|
||||
"@symfony/webpack-encore": "^4.6.1",
|
||||
"@symfony/webpack-encore": "^4.7.0",
|
||||
"noty": "^3.2.0-beta-deprecated",
|
||||
"notyf": "^3.10.0",
|
||||
"prismjs": "^1.29.0",
|
||||
"sweetalert2": "^11.10.8",
|
||||
"sweetalert2": "^11.6.13",
|
||||
"toastr": "^2.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -29,7 +29,7 @@
|
||||
"node-ray": "^2.1.2",
|
||||
"postcss-import": "^16.1.0",
|
||||
"postcss-loader": "^7.3.4",
|
||||
"tailwindcss": "^3.4.3",
|
||||
"tailwindcss": "^3.4.12",
|
||||
"webpack-notifier": "^1.15.0"
|
||||
}
|
||||
},
|
||||
@@ -2170,9 +2170,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@symfony/webpack-encore": {
|
||||
"version": "4.6.1",
|
||||
"resolved": "https://registry.npmjs.org/@symfony/webpack-encore/-/webpack-encore-4.6.1.tgz",
|
||||
"integrity": "sha512-JbOjy0P6P9pcbgVE3nceFnCCneRO+tbcLUkQh9rpPj/sHtFl12foSjHz6uY93ZGZGAvTyqEslie+4MlD/rUtnQ==",
|
||||
"version": "4.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@symfony/webpack-encore/-/webpack-encore-4.7.0.tgz",
|
||||
"integrity": "sha512-vlvg1mYLVSaujTEUmkd/ucwK7LG7+89PHfOwfz/sJ53n2IFGtuAXyPyXL0igJ0tMcKvDuCShiWTX1nfnzT/Srw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@nuxt/friendly-errors-webpack-plugin": "^2.5.1",
|
||||
"assets-webpack-plugin": "7.0.*",
|
||||
@@ -2181,9 +2182,8 @@
|
||||
"clean-webpack-plugin": "^4.0.0",
|
||||
"css-loader": "^6.7.0",
|
||||
"css-minimizer-webpack-plugin": "^5.0.0",
|
||||
"fast-levenshtein": "^3.0.0",
|
||||
"fastest-levenshtein": "^1.0.16",
|
||||
"mini-css-extract-plugin": "^2.6.0",
|
||||
"pkg-up": "^3.1.0",
|
||||
"pretty-error": "^4.0.0",
|
||||
"resolve-url-loader": "^5.0.0",
|
||||
"semver": "^7.3.2",
|
||||
@@ -2209,6 +2209,7 @@
|
||||
"@babel/preset-typescript": "^7.0.0",
|
||||
"@symfony/stimulus-bridge": "^3.0.0",
|
||||
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
|
||||
"@vue/babel-plugin-jsx": "^1.0.0",
|
||||
"@vue/babel-preset-jsx": "^1.0.0",
|
||||
"@vue/compiler-sfc": "^2.6 || ^3.0.2",
|
||||
"eslint": "^8.0.0",
|
||||
@@ -2218,13 +2219,13 @@
|
||||
"handlebars": "^4.7.7",
|
||||
"handlebars-loader": "^1.7.0",
|
||||
"less": "^4.0.0",
|
||||
"less-loader": "^11.0.0",
|
||||
"less-loader": "^11.0.0 || ^12.2.0",
|
||||
"postcss": "^8.3.0",
|
||||
"postcss-loader": "^7.0.0",
|
||||
"postcss-loader": "^7.0.0 || ^8.1.0",
|
||||
"sass": "^1.17.0",
|
||||
"sass-loader": "^13.0.0 || ^14.0.0",
|
||||
"stylus": "^0.58.1",
|
||||
"stylus-loader": "^7.0.0",
|
||||
"stylus-loader": "^7.0.0 || ^8.1.0",
|
||||
"ts-loader": "^9.0.0",
|
||||
"typescript": "^4.2.2 || ^5.0.0",
|
||||
"vue": "^2.6 || ^3.2.14",
|
||||
@@ -2256,6 +2257,9 @@
|
||||
"@vue/babel-helper-vue-jsx-merge-props": {
|
||||
"optional": true
|
||||
},
|
||||
"@vue/babel-plugin-jsx": {
|
||||
"optional": true
|
||||
},
|
||||
"@vue/babel-preset-jsx": {
|
||||
"optional": true
|
||||
},
|
||||
@@ -2466,30 +2470,11 @@
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/eslint": {
|
||||
"version": "8.56.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.6.tgz",
|
||||
"integrity": "sha512-ymwc+qb1XkjT/gfoQwxIeHZ6ixH23A+tCT2ADSA/DPVKzAjwYkTXBMCQ/f6fe4wEa85Lhp26VPeUxI7wMhAi7A==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/estree": "*",
|
||||
"@types/json-schema": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/eslint-scope": {
|
||||
"version": "3.7.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz",
|
||||
"integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/eslint": "*",
|
||||
"@types/estree": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/estree": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
|
||||
"integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
|
||||
"integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@types/express": {
|
||||
@@ -2889,10 +2874,11 @@
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/acorn-import-assertions": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz",
|
||||
"integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==",
|
||||
"node_modules/acorn-import-attributes": {
|
||||
"version": "1.9.5",
|
||||
"resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz",
|
||||
"integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"peerDependencies": {
|
||||
"acorn": "^8"
|
||||
@@ -3059,10 +3045,11 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.6.8",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz",
|
||||
"integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==",
|
||||
"version": "1.7.7",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz",
|
||||
"integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.6",
|
||||
"form-data": "^4.0.0",
|
||||
@@ -3154,9 +3141,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/body-parser": {
|
||||
"version": "1.20.2",
|
||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz",
|
||||
"integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==",
|
||||
"version": "1.20.3",
|
||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz",
|
||||
"integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bytes": "3.1.2",
|
||||
"content-type": "~1.0.5",
|
||||
@@ -3166,7 +3154,7 @@
|
||||
"http-errors": "2.0.0",
|
||||
"iconv-lite": "0.4.24",
|
||||
"on-finished": "2.4.1",
|
||||
"qs": "6.11.0",
|
||||
"qs": "6.13.0",
|
||||
"raw-body": "2.5.2",
|
||||
"type-is": "~1.6.18",
|
||||
"unpipe": "1.0.0"
|
||||
@@ -3180,6 +3168,7 @@
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
||||
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
@@ -3188,6 +3177,7 @@
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
@@ -3195,7 +3185,8 @@
|
||||
"node_modules/body-parser/node_modules/ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/bonjour-service": {
|
||||
"version": "1.2.1",
|
||||
@@ -3221,11 +3212,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/braces": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
||||
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fill-range": "^7.0.1"
|
||||
"fill-range": "^7.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
@@ -3279,6 +3271,7 @@
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
|
||||
"integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0",
|
||||
"es-errors": "^1.3.0",
|
||||
@@ -3334,9 +3327,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001600",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001600.tgz",
|
||||
"integrity": "sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ==",
|
||||
"version": "1.0.30001662",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001662.tgz",
|
||||
"integrity": "sha512-sgMUVwLmGseH8ZIrm1d51UbrhqMCH3jvS7gF/M6byuHOnKyLOBL7W8yz5V02OHwgLGA36o/AFhWzzh4uc5aqTA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
@@ -3350,7 +3343,8 @@
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
]
|
||||
],
|
||||
"license": "CC-BY-4.0"
|
||||
},
|
||||
"node_modules/chalk": {
|
||||
"version": "2.4.2",
|
||||
@@ -3588,6 +3582,7 @@
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
|
||||
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
@@ -3987,6 +3982,7 @@
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
|
||||
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0",
|
||||
"es-errors": "^1.3.0",
|
||||
@@ -4037,6 +4033,7 @@
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
||||
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
@@ -4045,6 +4042,7 @@
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
|
||||
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8",
|
||||
"npm": "1.2.8000 || >= 1.4.16"
|
||||
@@ -4146,7 +4144,8 @@
|
||||
"node_modules/ee-first": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
||||
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.4.717",
|
||||
@@ -4167,17 +4166,19 @@
|
||||
}
|
||||
},
|
||||
"node_modules/encodeurl": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
||||
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
|
||||
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/enhanced-resolve": {
|
||||
"version": "5.16.0",
|
||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz",
|
||||
"integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==",
|
||||
"version": "5.17.1",
|
||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz",
|
||||
"integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.4",
|
||||
@@ -4228,6 +4229,7 @@
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
|
||||
"integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"get-intrinsic": "^1.2.4"
|
||||
},
|
||||
@@ -4239,6 +4241,7 @@
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
||||
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
@@ -4329,6 +4332,7 @@
|
||||
"version": "1.8.1",
|
||||
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
||||
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
@@ -4370,36 +4374,37 @@
|
||||
}
|
||||
},
|
||||
"node_modules/express": {
|
||||
"version": "4.19.2",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz",
|
||||
"integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==",
|
||||
"version": "4.21.0",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz",
|
||||
"integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"accepts": "~1.3.8",
|
||||
"array-flatten": "1.1.1",
|
||||
"body-parser": "1.20.2",
|
||||
"body-parser": "1.20.3",
|
||||
"content-disposition": "0.5.4",
|
||||
"content-type": "~1.0.4",
|
||||
"cookie": "0.6.0",
|
||||
"cookie-signature": "1.0.6",
|
||||
"debug": "2.6.9",
|
||||
"depd": "2.0.0",
|
||||
"encodeurl": "~1.0.2",
|
||||
"encodeurl": "~2.0.0",
|
||||
"escape-html": "~1.0.3",
|
||||
"etag": "~1.8.1",
|
||||
"finalhandler": "1.2.0",
|
||||
"finalhandler": "1.3.1",
|
||||
"fresh": "0.5.2",
|
||||
"http-errors": "2.0.0",
|
||||
"merge-descriptors": "1.0.1",
|
||||
"merge-descriptors": "1.0.3",
|
||||
"methods": "~1.1.2",
|
||||
"on-finished": "2.4.1",
|
||||
"parseurl": "~1.3.3",
|
||||
"path-to-regexp": "0.1.7",
|
||||
"path-to-regexp": "0.1.10",
|
||||
"proxy-addr": "~2.0.7",
|
||||
"qs": "6.11.0",
|
||||
"qs": "6.13.0",
|
||||
"range-parser": "~1.2.1",
|
||||
"safe-buffer": "5.2.1",
|
||||
"send": "0.18.0",
|
||||
"serve-static": "1.15.0",
|
||||
"send": "0.19.0",
|
||||
"serve-static": "1.16.2",
|
||||
"setprototypeof": "1.2.0",
|
||||
"statuses": "2.0.1",
|
||||
"type-is": "~1.6.18",
|
||||
@@ -4461,14 +4466,6 @@
|
||||
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
|
||||
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
|
||||
},
|
||||
"node_modules/fast-levenshtein": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-3.0.0.tgz",
|
||||
"integrity": "sha512-hKKNajm46uNmTlhHSyZkmToAc56uZJwYq7yrciZjqOxnlfQwERDQJmHPUp7m1m9wx8vgOe8IaCKZ5Kv2k1DdCQ==",
|
||||
"dependencies": {
|
||||
"fastest-levenshtein": "^1.0.7"
|
||||
}
|
||||
},
|
||||
"node_modules/fastest-levenshtein": {
|
||||
"version": "1.0.16",
|
||||
"resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz",
|
||||
@@ -4567,9 +4564,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
},
|
||||
@@ -4578,12 +4576,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/finalhandler": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
|
||||
"integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz",
|
||||
"integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"debug": "2.6.9",
|
||||
"encodeurl": "~1.0.2",
|
||||
"encodeurl": "~2.0.0",
|
||||
"escape-html": "~1.0.3",
|
||||
"on-finished": "2.4.1",
|
||||
"parseurl": "~1.3.3",
|
||||
@@ -4598,6 +4597,7 @@
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
@@ -4605,7 +4605,8 @@
|
||||
"node_modules/finalhandler/node_modules/ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/find-cache-dir": {
|
||||
"version": "4.0.0",
|
||||
@@ -4719,6 +4720,7 @@
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
|
||||
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
@@ -4767,6 +4769,7 @@
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
|
||||
"integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
@@ -4873,6 +4876,7 @@
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
|
||||
"integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"get-intrinsic": "^1.1.3"
|
||||
},
|
||||
@@ -4908,6 +4912,7 @@
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
|
||||
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0"
|
||||
},
|
||||
@@ -4919,6 +4924,7 @@
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
|
||||
"integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
@@ -4930,6 +4936,7 @@
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
|
||||
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
@@ -5028,6 +5035,7 @@
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
|
||||
"integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"depd": "2.0.0",
|
||||
"inherits": "2.0.4",
|
||||
@@ -5092,6 +5100,7 @@
|
||||
"version": "0.4.24",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"safer-buffer": ">= 2.1.2 < 3"
|
||||
},
|
||||
@@ -5322,6 +5331,7 @@
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.12.0"
|
||||
}
|
||||
@@ -5728,6 +5738,7 @@
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
"integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
@@ -5744,9 +5755,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/merge-descriptors": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
||||
"integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
|
||||
"integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/merge-stream": {
|
||||
"version": "2.0.0",
|
||||
@@ -5771,11 +5786,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/micromatch": {
|
||||
"version": "4.0.5",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
|
||||
"integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
|
||||
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"braces": "^3.0.2",
|
||||
"braces": "^3.0.3",
|
||||
"picomatch": "^2.3.1"
|
||||
},
|
||||
"engines": {
|
||||
@@ -5786,6 +5802,7 @@
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
|
||||
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"mime": "cli.js"
|
||||
},
|
||||
@@ -6071,9 +6088,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/object-inspect": {
|
||||
"version": "1.13.1",
|
||||
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",
|
||||
"integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==",
|
||||
"version": "1.13.2",
|
||||
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz",
|
||||
"integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
@@ -6087,6 +6108,7 @@
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
|
||||
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ee-first": "1.1.1"
|
||||
},
|
||||
@@ -6192,6 +6214,7 @@
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
|
||||
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
@@ -6294,9 +6317,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/path-to-regexp": {
|
||||
"version": "0.1.7",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
|
||||
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
|
||||
"version": "0.1.10",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz",
|
||||
"integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/path-type": {
|
||||
"version": "4.0.0",
|
||||
@@ -6373,73 +6397,6 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/pkg-up": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz",
|
||||
"integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==",
|
||||
"dependencies": {
|
||||
"find-up": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/pkg-up/node_modules/find-up": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
|
||||
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
|
||||
"dependencies": {
|
||||
"locate-path": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/pkg-up/node_modules/locate-path": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
|
||||
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
|
||||
"dependencies": {
|
||||
"p-locate": "^3.0.0",
|
||||
"path-exists": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/pkg-up/node_modules/p-limit": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
|
||||
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
|
||||
"dependencies": {
|
||||
"p-try": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/pkg-up/node_modules/p-locate": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
|
||||
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
|
||||
"dependencies": {
|
||||
"p-limit": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/pkg-up/node_modules/path-exists": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
|
||||
"integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.4.38",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz",
|
||||
@@ -7121,11 +7078,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/qs": {
|
||||
"version": "6.11.0",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
|
||||
"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
|
||||
"version": "6.13.0",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
|
||||
"integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"side-channel": "^1.0.4"
|
||||
"side-channel": "^1.0.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
@@ -7174,6 +7132,7 @@
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
|
||||
"integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bytes": "3.1.2",
|
||||
"http-errors": "2.0.0",
|
||||
@@ -7188,6 +7147,7 @@
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
||||
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
@@ -7487,7 +7447,8 @@
|
||||
"node_modules/safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/schema-utils": {
|
||||
"version": "4.2.0",
|
||||
@@ -7534,9 +7495,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/send": {
|
||||
"version": "0.18.0",
|
||||
"resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
|
||||
"integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
|
||||
"version": "0.19.0",
|
||||
"resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz",
|
||||
"integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"debug": "2.6.9",
|
||||
"depd": "2.0.0",
|
||||
@@ -7560,6 +7522,7 @@
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
@@ -7567,12 +7530,23 @@
|
||||
"node_modules/send/node_modules/debug/node_modules/ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/send/node_modules/encodeurl": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
||||
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/send/node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/serialize-javascript": {
|
||||
"version": "6.0.2",
|
||||
@@ -7653,14 +7627,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/serve-static": {
|
||||
"version": "1.15.0",
|
||||
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
|
||||
"integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
|
||||
"version": "1.16.2",
|
||||
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz",
|
||||
"integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"encodeurl": "~1.0.2",
|
||||
"encodeurl": "~2.0.0",
|
||||
"escape-html": "~1.0.3",
|
||||
"parseurl": "~1.3.3",
|
||||
"send": "0.18.0"
|
||||
"send": "0.19.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8.0"
|
||||
@@ -7670,6 +7645,7 @@
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
|
||||
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"define-data-property": "^1.1.4",
|
||||
"es-errors": "^1.3.0",
|
||||
@@ -7685,7 +7661,8 @@
|
||||
"node_modules/setprototypeof": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
||||
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
|
||||
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/shallow-clone": {
|
||||
"version": "3.0.1",
|
||||
@@ -7736,6 +7713,7 @@
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
|
||||
"integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"es-errors": "^1.3.0",
|
||||
@@ -7865,6 +7843,7 @@
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
|
||||
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
@@ -8157,9 +8136,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/sweetalert2": {
|
||||
"version": "11.10.8",
|
||||
"resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.10.8.tgz",
|
||||
"integrity": "sha512-oAkYROBfXBY+4sVbQEIcN+ZxAx69lsmz5WEBwdEpyS4m59vOBNlRU5/fJpAI1MVfiDwFZiGwVzB/KBpOyfLNtg==",
|
||||
"version": "11.6.13",
|
||||
"resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.6.13.tgz",
|
||||
"integrity": "sha512-n5yVF0FNx1lm4XzpPyb1HIaiptzODfVyeCzmB809tpK+1bPdoKoevKOxYjrtId75DV7xuIp4r6cjn8xUAB8dPQ==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/limonte"
|
||||
@@ -8174,10 +8154,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/tailwindcss": {
|
||||
"version": "3.4.3",
|
||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.3.tgz",
|
||||
"integrity": "sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==",
|
||||
"version": "3.4.12",
|
||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.12.tgz",
|
||||
"integrity": "sha512-Htf/gHj2+soPb9UayUNci/Ja3d8pTmu9ONTfh4QY8r3MATTZOzmv6UYWF7ZwikEIC8okpfqmGqrmDehua8mF8w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@alloc/quick-lru": "^5.2.0",
|
||||
"arg": "^5.0.2",
|
||||
@@ -8426,6 +8407,7 @@
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-number": "^7.0.0"
|
||||
},
|
||||
@@ -8445,6 +8427,7 @@
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
||||
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
}
|
||||
@@ -8459,6 +8442,7 @@
|
||||
"version": "1.6.18",
|
||||
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
||||
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"media-typer": "0.3.0",
|
||||
"mime-types": "~2.1.24"
|
||||
@@ -8516,6 +8500,7 @@
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
||||
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
@@ -8613,21 +8598,21 @@
|
||||
}
|
||||
},
|
||||
"node_modules/webpack": {
|
||||
"version": "5.91.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz",
|
||||
"integrity": "sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==",
|
||||
"version": "5.94.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz",
|
||||
"integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/eslint-scope": "^3.7.3",
|
||||
"@types/estree": "^1.0.5",
|
||||
"@webassemblyjs/ast": "^1.12.1",
|
||||
"@webassemblyjs/wasm-edit": "^1.12.1",
|
||||
"@webassemblyjs/wasm-parser": "^1.12.1",
|
||||
"acorn": "^8.7.1",
|
||||
"acorn-import-assertions": "^1.9.0",
|
||||
"acorn-import-attributes": "^1.9.5",
|
||||
"browserslist": "^4.21.10",
|
||||
"chrome-trace-event": "^1.0.2",
|
||||
"enhanced-resolve": "^5.16.0",
|
||||
"enhanced-resolve": "^5.17.1",
|
||||
"es-module-lexer": "^1.2.1",
|
||||
"eslint-scope": "5.1.1",
|
||||
"events": "^3.2.0",
|
||||
@@ -9074,9 +9059,10 @@
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.16.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz",
|
||||
"integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==",
|
||||
"version": "8.18.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz",
|
||||
"integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
|
||||
+3
-3
@@ -17,11 +17,11 @@
|
||||
"@flasher/flasher-toastr": "file:../src/Toastr/Prime/Resources",
|
||||
"@hotwired/stimulus": "^3.2.2",
|
||||
"@symfony/stimulus-bridge": "^3.2.2",
|
||||
"@symfony/webpack-encore": "^4.6.1",
|
||||
"@symfony/webpack-encore": "^4.7.0",
|
||||
"noty": "^3.2.0-beta-deprecated",
|
||||
"notyf": "^3.10.0",
|
||||
"prismjs": "^1.29.0",
|
||||
"sweetalert2": "^11.10.8",
|
||||
"sweetalert2": "^11.6.13",
|
||||
"toastr": "^2.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -30,7 +30,7 @@
|
||||
"node-ray": "^2.1.2",
|
||||
"postcss-import": "^16.1.0",
|
||||
"postcss-loader": "^7.3.4",
|
||||
"tailwindcss": "^3.4.3",
|
||||
"tailwindcss": "^3.4.12",
|
||||
"webpack-notifier": "^1.15.0"
|
||||
},
|
||||
"browserslist": [
|
||||
|
||||
+16
-16
@@ -1,6 +1,6 @@
|
||||
---
|
||||
permalink: /
|
||||
description: PHPFlasher is a robust, open-source tool for seamlessly adding flash messages to Laravel or Symfony projects, aimed at improving user interaction and feedback with minimal developer effort.
|
||||
description: PHPFlasher is an open-source tool for easily adding flash messages to Laravel or Symfony projects, improving user interaction with minimal effort.
|
||||
data-controller: flasher
|
||||
---
|
||||
|
||||
@@ -33,36 +33,36 @@ data-controller: flasher
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Introduction
|
||||
|
||||
<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> is a powerful, community-driven, open-source project designed to enhance your web applications by providing an intuitive way to display flash messages. These messages serve as immediate feedback for user actions, significantly improving user experience by confirming actions like form submissions, warnings, or errors.
|
||||
<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> is an open-source tool that helps you add flash messages to your web applications. Flash messages are short messages that give feedback to users after they do something, like submitting a form or encountering an error. These messages improve the user experience by letting users know what happened.
|
||||
|
||||
Flash messages are crucial for interactive applications, and <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> makes implementing them in <i class="fa-brands fa-laravel text-red-900 fa-xl"></i> <strong>Laravel</strong> or <i class="fa-brands fa-symfony text-black fa-xl"></i> <strong>Symfony</strong> projects straightforward. With support for session-based message storage, <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> ensures that messages can be easily set and then retrieved for display on subsequent pages, without complex setup.
|
||||
Flash messages are important for interactive applications. **<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>** makes it easy to add them to **<i class="fa-brands fa-laravel text-red-900 fa-xl"></i> Laravel** or **<i class="fa-brands fa-symfony text-black fa-xl"></i> Symfony** projects. It uses sessions to store messages, so you can set a message on one page and show it on another, without complex setup.
|
||||
|
||||
---
|
||||
|
||||
### <i class="fa-duotone fa-list-radio"></i> Notification Types
|
||||
|
||||
<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> can handle a variety of notification types to suit different feedback scenarios:
|
||||
**<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>** supports different types of notifications:
|
||||
|
||||
> <div class="mt-2"><span class="text-green-700"><i class="fa-solid fa-circle-check fa-xl"></i> success : </span> indicates successful completion of an action.</div>
|
||||
> <div class="mt-2"><span class="text-blue-600"><i class="fa-solid fa-circle-info fa-xl"></i> info : </span> provides informational messages to users.</div>
|
||||
> <div class="mt-2"><span class="text-yellow-600"><i class="fa-solid fa-circle-exclamation fa-xl"></i> warning : </span> alerts users to potential issues that are not errors.</div>
|
||||
> <div class="mt-2"><span class="text-red-600"><i class="fa-solid fa-circle-xmark fa-xl"></i> error : </span> notifies users of errors or problems encountered.</div>
|
||||
> <div class="mt-2"><span class="text-green-700"><i class="fa-solid fa-circle-check fa-xl"></i> Success</span>: Shows when something works well.</div>
|
||||
> <div class="mt-2"><span class="text-blue-600"><i class="fa-solid fa-circle-info fa-xl"></i> Info</span>: Gives information to the user.</div>
|
||||
> <div class="mt-2"><span class="text-yellow-600"><i class="fa-solid fa-circle-exclamation fa-xl"></i> Warning</span>: Alerts about potential issues.</div>
|
||||
> <div class="mt-2"><span class="text-red-600"><i class="fa-solid fa-circle-xmark fa-xl"></i> Error</span>: Tells the user about an error.</div>
|
||||
|
||||
---
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Why <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> ?
|
||||
## <i class="fa-duotone fa-list-radio"></i> Why **<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>**?
|
||||
|
||||
- **Broad Library Support**: PHPFlasher integrates with several popular notification libraries, including [toastr.js](/library/toastr/), [SweetAlert 2](/library/sweetalert/), [Noty](/library/noty/), and [Notyf](/library/notyf/).
|
||||
- **Ease of Use**: Designed with all levels of developers in mind, from beginners to experienced professionals.
|
||||
- **Flexibility**: Offers extensive customization options for notification styling and behaviors.
|
||||
- **Framework Compatibility**: Seamlessly integrates with <i class="fa-brands fa-laravel text-red-900 fa-xl"></i> <strong>Laravel</strong> and <i class="fa-brands fa-symfony text-black fa-xl"></i> <strong>Symfony</strong>, with options for custom adapter creation.
|
||||
- **Developer Friendly**: Features PHPStorm autocomplete for easier coding and integration.
|
||||
- **Supports Many Libraries**: Works with popular notification libraries like [toastr.js](/library/toastr/), [SweetAlert 2](/library/sweetalert/), [Noty](/library/noty/), and [Notyf](/library/notyf/).
|
||||
- **Easy to Use**: Designed for all developers, from beginners to experts.
|
||||
- **Flexible**: You can customize how the notifications look and behave.
|
||||
- **Framework Compatibility**: Integrates smoothly with <i class="fa-brands fa-laravel text-red-900 fa-xl"></i> <strong>Laravel</strong> and <i class="fa-brands fa-symfony text-black fa-xl"></i> <strong>Symfony</strong>. You can also create custom adapters.
|
||||
- **Developer-Friendly**: Features like autocomplete in PHPStorm make coding easier.
|
||||
|
||||
---
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Getting Started
|
||||
|
||||
Dive into <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> with our straightforward guides and documentation to seamlessly integrate flash messaging into your projects:
|
||||
Start using **<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>** with our easy guides:
|
||||
|
||||
- [**Symfony Guide**](/Symfony/)
|
||||
- [**Laravel Guide**](/Laravel/)
|
||||
@@ -73,4 +73,4 @@ Dive into <strong><span class="text-indigo-900">PHP<span class="text-indigo-500"
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Contributions
|
||||
|
||||
<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> thrives on community contributions. Your feedback, code contributions, and feature suggestions are invaluable to us. Explore our [GitHub repository](https://github.com/php-flasher/php-flasher) to see how you can become part of the <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> community. Let's build something great together <i class="fa-solid fa-heart text-red-600"></i>!
|
||||
**<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>** grows with help from the community. We welcome your feedback, code contributions, and ideas. Check out our [GitHub repository](https://github.com/php-flasher/php-flasher) to join the **<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>** community. Let's build something great together! <i class="fa-solid fa-heart text-red-600"></i>
|
||||
|
||||
@@ -4,13 +4,13 @@ title: Inertia
|
||||
description: Easily add flash notification messages to your Inertia application with PHPFlasher. Follow our step-by-step guide to install and use the library in your project, and start engaging and informing your users with powerful flash messages.
|
||||
---
|
||||
|
||||
<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> offers a solid integration with Inertia.js
|
||||
<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> works well with Inertia.js.
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Installation
|
||||
|
||||
To integrate <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> with Inertia.js, follow the same installation steps as for the [Laravel Installation](/laravel) package.
|
||||
To use **<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>** with Inertia.js, install it the same way as in the [Laravel Installation](/laravel) guide.
|
||||
|
||||
Additionally, include `@flasher/flasher` in your package.json by adding the following line:
|
||||
Also, add `@flasher/flasher` to your `package.json`:
|
||||
|
||||
```json
|
||||
"@flasher/flasher": "file:vendor/php-flasher/flasher/Resources"
|
||||
@@ -26,7 +26,7 @@ npm install --force
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Usage
|
||||
|
||||
Dispatch `notifications` from your `HandleInertiaRequests` middleware shared data.
|
||||
Send `notifications` from your `HandleInertiaRequests` middleware.
|
||||
|
||||
```php
|
||||
<?php
|
||||
@@ -37,7 +37,7 @@ class HandleInertiaRequests extends Middleware
|
||||
public function share(Request $request): array
|
||||
{
|
||||
return array_merge(parent::share($request), [
|
||||
'messages' => flash()->render([], 'array'),
|
||||
'messages' => flash()->render('array'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ class HandleInertiaRequests extends Middleware
|
||||
|
||||
---
|
||||
|
||||
Then render your `notifications` from your `Layout.vue` file like the following:
|
||||
Then, display your `notifications` in your `Layout.vue` file:
|
||||
|
||||
```html
|
||||
// resources/js/Shared/Layout.vue
|
||||
@@ -65,7 +65,7 @@ export default {
|
||||
</script>
|
||||
```
|
||||
|
||||
All you have to do now, is to trigger you notification from anywhere in your application.
|
||||
Now, you can trigger notifications from anywhere in your application.
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
+63
-56
@@ -8,9 +8,9 @@ framework: laravel
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Requirements
|
||||
|
||||
<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> offers a seamless way to incorporate flash notifications in <i class="fa-brands fa-laravel text-red-900 fa-xl"></i> <strong>Laravel</strong> projects, enhancing user feedback with minimal setup.
|
||||
**<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>** helps you easily add flash notifications to your **<i class="fa-brands fa-laravel text-red-900 fa-xl"></i> Laravel** projects, improving user feedback with minimal setup.
|
||||
|
||||
Requirements for using <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> with Laravel:
|
||||
To use **<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>** with Laravel, you need:
|
||||
|
||||
> <i class="fa-brands fa-php fa-2xl text-blue-900 mr-1 mb-1"></i> **PHP** v8.2 or higher
|
||||
> <i class="fa-brands fa-laravel fa-2xl text-red-900 mr-1 ml-4"></i> **Laravel** v11.0 or higher
|
||||
@@ -19,13 +19,15 @@ Requirements for using <strong><span class="text-indigo-900">PHP<span class="tex
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Installation
|
||||
|
||||
<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>'s modular design lets you select and install only the components your project needs.
|
||||
**PHPFlasher** is modular, so you can install only the parts you need.
|
||||
|
||||
Run this command to install it:
|
||||
|
||||
```shell
|
||||
composer require php-flasher/flasher-laravel
|
||||
```
|
||||
|
||||
After installation, you need to run another command to set up the necessary assets for <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>:
|
||||
After installing, run this command to set up the required assets:
|
||||
|
||||
```shell
|
||||
php artisan flasher:install
|
||||
@@ -39,13 +41,13 @@ php artisan flasher:install
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Configuration
|
||||
|
||||
As optional, if you want to modify the default configuration, you can publish the configuration file:
|
||||
If you want to change the default settings, you can publish the configuration file:
|
||||
|
||||
```bash
|
||||
php artisan flasher:install --config
|
||||
```
|
||||
|
||||
The configuration file will be located at `config/flasher.php` and will have the following content:
|
||||
This will create a file at `config/flasher.php` with the following content:
|
||||
|
||||
```php
|
||||
<?php // config/flasher.php
|
||||
@@ -68,6 +70,13 @@ return [
|
||||
// Automatically inject PHPFlasher assets in HTML response
|
||||
'inject_assets' => true,
|
||||
|
||||
// Global options
|
||||
'options' => [
|
||||
'timeout' => 5000, // in milliseconds
|
||||
'position' => 'top-right',
|
||||
'escapeHtml' => false,
|
||||
],
|
||||
|
||||
// Configuration for the flash bag (converting Laravel flash messages)
|
||||
// Map Laravel session keys to PHPFlasher types
|
||||
'flash_bag' => [
|
||||
@@ -88,11 +97,11 @@ return [
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Presets
|
||||
|
||||
You can create a preset for a custom notification that you want to reuse in multiple places by adding a presets entry in the configuration file.
|
||||
You can create a preset for a custom notification that you want to reuse in multiple places by adding a `presets` entry in the configuration file.
|
||||
|
||||
> You can think of a preset as a pre-defined message that you can use in multiple locations. <br>
|
||||
> A preset is like a pre-defined message you can use in many places.
|
||||
|
||||
For example, you can create a preset named `entity_saved` in the configuration file and then use
|
||||
For example, create a preset named `entity_saved`:
|
||||
|
||||
{% assign id = '#/ laravel preset' %}
|
||||
{% assign type = 'success' %}
|
||||
@@ -115,7 +124,7 @@ return [
|
||||
];
|
||||
```
|
||||
|
||||
To use the preset, you can call the `preset()` method and pass the name of the preset as the first argument:
|
||||
To use the preset, call the `preset()` method and pass the name of the preset:
|
||||
|
||||
```php
|
||||
{{ id }}
|
||||
@@ -139,7 +148,7 @@ class BookController
|
||||
|
||||
<p id="preset-variables"><a href="#preset-variables" class="anchor"><i class="fa-duotone fa-link"></i> Variables</a></p>
|
||||
|
||||
Presets can also contain variables that can be substituted by using the translation system. Take the following example where you have a preset showing a personalised welcome message to the user.
|
||||
Presets can also have variables that you can replace using the translation system. For example, you can have a preset that shows a personalized welcome message.
|
||||
|
||||
```php
|
||||
<?php // config/flasher.php
|
||||
@@ -154,7 +163,7 @@ return [
|
||||
];
|
||||
```
|
||||
|
||||
In the translations file you can define `welcome_back_user` with the message containing the variable `:username`.
|
||||
In your translation file, define `welcome_back_user` with a message containing the variable `:username`.
|
||||
|
||||
```php
|
||||
<?php // /resources/lang/vendor/flasher/en/messages.php
|
||||
@@ -164,7 +173,7 @@ return [
|
||||
];
|
||||
```
|
||||
|
||||
If you want to substitute the `:username` in the above translation with a username in the controller, you can achieve this by passing an array of values to be substituted as the second argument.
|
||||
To replace `:username` with the actual username in your controller, pass an array with the values to substitute as the second argument:
|
||||
|
||||
```php
|
||||
class BookController
|
||||
@@ -180,10 +189,9 @@ class BookController
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> RTL support
|
||||
|
||||
<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> makes it easy to incorporate <i class="fa-duotone fa-signs-post text-indigo-900 mr-1 fa-lg"></i> **right-to-left** languages like `Arabic` or `Hebrew`.
|
||||
it automatically detects the text direction and handles the necessary adjustments for you.
|
||||
<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> makes it easy to use <i class="fa-duotone fa-signs-post text-indigo-900 mr-1 fa-lg"></i> **right-to-left** languages like `Arabic` or `Hebrew`. It automatically detects the text direction and adjusts accordingly.
|
||||
|
||||
Simply make sure the translation service is enabled and let <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> handle the rest.
|
||||
Just make sure the translation service is enabled, and <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> will handle the rest.
|
||||
|
||||
{% assign id = '#/ phpflasher rtl' %}
|
||||
{% assign type = 'success' %}
|
||||
@@ -204,14 +212,13 @@ flash()
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Translation
|
||||
|
||||
<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> allows you to translate your notification `messages` and `presets`, it comes with `Arabic`, `English`, `French`, `German`, `Spanish`, `Portuguese`, `Russian`, and `Chinese` translations out of the box. but you can easily add your own translations.
|
||||
<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> lets you translate your notification `messages` and `presets`. It comes with translations for `Arabic`, `English`, `French`, `German`, `Spanish`, `Portuguese`, `Russian`, and `Chinese`. You can also add your own translations.
|
||||
|
||||
For example, to override the `English` translation strings for <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>, you can create a language file at the following location:
|
||||
**`/resources/lang/vendor/flasher/en/messages.php`**.
|
||||
To override the `English` translations for <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>, create a file at `/resources/lang/vendor/flasher/en/messages.php`.
|
||||
|
||||
In this file, you should **only** define the translation strings you want to override. Any translation strings that you don't override will still be loaded from <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>'s original language files.
|
||||
In this file, define only the translation strings you want to change. Any strings you don't override will use <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>'s default translations.
|
||||
|
||||
Here are examples of the default translation keys for `Arabic`, `English`, and `French` in <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>:
|
||||
Here are examples of the default translation keys for `Arabic`, `English`, and `French`:
|
||||
|
||||
```php
|
||||
<?php // /resources/lang/vendor/flasher/ar/messages.php
|
||||
@@ -267,7 +274,7 @@ return [
|
||||
];
|
||||
```
|
||||
|
||||
> These translation files facilitate localizing notifications to match user preferences and ensure that your applications can communicate effectively across different linguistic contexts.
|
||||
> These translation files help you localize notifications to match user preferences, so your application can communicate effectively in different languages.
|
||||
|
||||
{% assign id = '#/ laravel arabic translations' %}
|
||||
{% assign successMessage = 'تم إنشاء الملف' %}
|
||||
@@ -276,33 +283,33 @@ return [
|
||||
{% assign infoMessage = 'سيتم تحديث هذه الصفحة في غضون 10 دقائق.' %}
|
||||
|
||||
<script type="text/javascript">
|
||||
messages["{{ id }}"] = [
|
||||
messages['{{ id }}'] = [
|
||||
{
|
||||
handler: "flasher",
|
||||
type: "success",
|
||||
message: "{{ successMessage }}",
|
||||
title: "نجاح",
|
||||
handler: 'flasher',
|
||||
type: 'success',
|
||||
message: '{{ successMessage }}',
|
||||
title: 'نجاح',
|
||||
options: {},
|
||||
},
|
||||
{
|
||||
handler: "flasher",
|
||||
type: "error",
|
||||
message: "{{ errorMessage }}",
|
||||
title: "خطأ",
|
||||
handler: 'flasher',
|
||||
type: 'error',
|
||||
message: '{{ errorMessage }}',
|
||||
title: 'خطأ',
|
||||
options: {},
|
||||
},
|
||||
{
|
||||
handler: "flasher",
|
||||
type: "warning",
|
||||
message: "{{ warningMessage }}",
|
||||
title: "تحذير",
|
||||
handler: 'flasher',
|
||||
type: 'warning',
|
||||
message: '{{ warningMessage }}',
|
||||
title: 'تحذير',
|
||||
options: {},
|
||||
},
|
||||
{
|
||||
handler: "flasher",
|
||||
type: "info",
|
||||
message: "{{ infoMessage }}",
|
||||
title: "معلومة",
|
||||
handler: 'flasher',
|
||||
type: 'info',
|
||||
message: '{{ infoMessage }}',
|
||||
title: 'معلومة',
|
||||
options: {},
|
||||
},
|
||||
|
||||
@@ -332,33 +339,33 @@ flash()->info('{{ infoMessage }}');
|
||||
{% assign infoMessage = "Cette page sera mise à jour dans 10 minutes."%}
|
||||
|
||||
<script type="text/javascript">
|
||||
messages["{{ id }}"] = [
|
||||
messages['{{ id }}'] = [
|
||||
{
|
||||
handler: "flasher",
|
||||
type: "success",
|
||||
message: "{{ successMessage }}",
|
||||
title: "Succès",
|
||||
handler: 'flasher',
|
||||
type: 'success',
|
||||
message: '{{ successMessage }}',
|
||||
title: 'Succès',
|
||||
options: {},
|
||||
},
|
||||
{
|
||||
handler: "flasher",
|
||||
type: "error",
|
||||
message: "{{ errorMessage }}",
|
||||
title: "Erreur",
|
||||
handler: 'flasher',
|
||||
type: 'error',
|
||||
message: '{{ errorMessage }}',
|
||||
title: 'Erreur',
|
||||
options: {},
|
||||
},
|
||||
{
|
||||
handler: "flasher",
|
||||
type: "warning",
|
||||
message: "{{ warningMessage }}",
|
||||
title: "Avertissement",
|
||||
handler: 'flasher',
|
||||
type: 'warning',
|
||||
message: '{{ warningMessage }}',
|
||||
title: 'Avertissement',
|
||||
options: {},
|
||||
},
|
||||
{
|
||||
handler: "flasher",
|
||||
type: "info",
|
||||
message: "{{ infoMessage }}",
|
||||
title: "Information",
|
||||
handler: 'flasher',
|
||||
type: 'info',
|
||||
message: '{{ infoMessage }}',
|
||||
title: 'Information',
|
||||
options: {},
|
||||
},
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
permalink: /livewire/
|
||||
title: Livewire
|
||||
description: Learn how to seamlessly integrate flash notification messages into your Livewire application with PHPFlasher. Follow our step-by-step guide to install and use the library in your project, and start engaging and informing your users with powerful flash messages.
|
||||
description: Learn how to easily add flash notification messages to your Livewire application with PHPFlasher. Follow our step-by-step guide to install and use the library in your project, and start engaging and informing your users with powerful flash messages.
|
||||
adapter: flasher
|
||||
---
|
||||
|
||||
<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> provides a seamless integration with Livewire v3.
|
||||
**<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>** works seamlessly with Livewire v3.
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Requirements
|
||||
|
||||
@@ -16,13 +16,13 @@ adapter: flasher
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Installation
|
||||
|
||||
To integrate <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> with Livewire, follow the same installation steps as for the [Laravel Installation](/laravel) package.
|
||||
To use **<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>** with Livewire, follow the same installation steps as in the [Laravel Installation](/laravel) guide.
|
||||
|
||||
```shell
|
||||
composer require php-flasher/flasher-laravel
|
||||
```
|
||||
|
||||
After installation, you need to run another command to set up the necessary assets for <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>:
|
||||
After installing, run this command to set up the required assets:
|
||||
|
||||
```shell
|
||||
php artisan flasher:install
|
||||
@@ -64,7 +64,7 @@ class UserComponent extends Component
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Events
|
||||
|
||||
For sweetalert you can listen to `sweetalert:confirmed`, `sweetalert:denied` and `sweetalert:dismissed` from withing you component
|
||||
For SweetAlert, you can listen to `sweetalert:confirmed`, `sweetalert:denied`, and `sweetalert:dismissed` events within your component.
|
||||
|
||||
<script type="text/javascript">
|
||||
messages["#/ livewire events"] = {
|
||||
@@ -125,7 +125,7 @@ class UserComponent extends Component
|
||||
|
||||
### <i class="fa-duotone fa-list-radio"></i> event handlers context
|
||||
|
||||
Every listener method accept an **array $payload** parameter which contain the following data :
|
||||
Each listener method accepts an **array $payload** parameter, which contains:
|
||||
|
||||
```php
|
||||
public function sweetalertConfirmed(array $payload)
|
||||
@@ -135,6 +135,5 @@ public function sweetalertConfirmed(array $payload)
|
||||
}
|
||||
```
|
||||
|
||||
> **promise** : the resolved promise from **sweetalert**.
|
||||
|
||||
> **envelope** : the notification where the event happened.
|
||||
- **promise**: The resolved promise from **SweetAlert**.
|
||||
- **envelope**: The notification where the event happened.
|
||||
|
||||
+30
-23
@@ -7,9 +7,9 @@ framework: symfony
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Requirements
|
||||
|
||||
<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> offers a seamless way to incorporate flash notifications in <i class="fa-brands fa-symfony text-black fa-xl"></i> <strong>Symfony</strong> projects, enhancing user feedback with minimal setup.
|
||||
**<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>** helps you easily add flash notifications to your **<i class="fa-brands fa-symfony text-black fa-xl"></i> Symfony** projects, improving user feedback with minimal setup.
|
||||
|
||||
Requirements for using <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> with Symfony:
|
||||
To use **<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>** with Symfony, you need:
|
||||
|
||||
> <i class="fa-brands fa-php fa-2xl text-blue-900 mr-1 mb-1"></i> **PHP** v8.2 or higher
|
||||
> <i class="fa-brands fa-symfony fa-2xl text-black mr-1 ml-4"></i> **Symfony** v7.0 or higher
|
||||
@@ -18,13 +18,15 @@ Requirements for using <strong><span class="text-indigo-900">PHP<span class="tex
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Installation
|
||||
|
||||
<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>'s modular design lets you select and install only the components your project needs.
|
||||
**<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>** is modular. You can install only the parts you need.
|
||||
|
||||
Run this command to install it:
|
||||
|
||||
```shell
|
||||
composer require php-flasher/flasher-symfony
|
||||
```
|
||||
|
||||
After installation, you need to run another command to set up the necessary assets for <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>:
|
||||
After installing, run this command to set up the required assets:
|
||||
|
||||
```shell
|
||||
php bin/console flasher:install
|
||||
@@ -38,13 +40,13 @@ php bin/console flasher:install
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Configuration
|
||||
|
||||
As optional, if you want to modify the default configuration, you can publish the configuration file:
|
||||
If you want to change the default settings, you can publish the configuration file:
|
||||
|
||||
```bash
|
||||
php bin/console flasher:install --config
|
||||
```
|
||||
|
||||
The configuration file will be located at `config/packages/flasher.yaml` and will have the following content:
|
||||
This will create a file at `config/packages/flasher.yaml` with the following content:
|
||||
|
||||
```yaml
|
||||
# config/packages/flasher.yaml
|
||||
@@ -66,6 +68,13 @@ flasher:
|
||||
# Automatically inject PHPFlasher assets in HTML response
|
||||
inject_assets: true
|
||||
|
||||
# Global options
|
||||
options:
|
||||
# timeout in milliseconds
|
||||
timeout: 5000
|
||||
position: 'top-right'
|
||||
escapeHtml: false
|
||||
|
||||
# Map Symfony session keys to PHPFlasher notification types
|
||||
flash_bag:
|
||||
success: ['success']
|
||||
@@ -83,11 +92,11 @@ flasher:
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Presets
|
||||
|
||||
You can create a preset for a custom notification that you want to reuse in multiple places by adding a presets entry in the configuration file.
|
||||
You can create a preset for a custom notification that you want to reuse in multiple places. Add a `presets` entry in the configuration file.
|
||||
|
||||
> You can think of a preset as a pre-defined message that you can use in multiple locations. <br>
|
||||
> A preset is like a pre-defined message you can use in many places.
|
||||
|
||||
For example, you can create a preset named `entity_saved` in the configuration file and then use
|
||||
For example, create a preset named `entity_saved`:
|
||||
|
||||
{% assign id = '#/ symfony preset' %}
|
||||
{% assign type = 'success' %}
|
||||
@@ -107,7 +116,7 @@ flasher:
|
||||
title: '{{ title }}'
|
||||
```
|
||||
|
||||
To use the preset, you can call the `preset()` method and pass the name of the preset as the first argument:
|
||||
To use the preset, call the `preset()` method and pass the name of the preset:
|
||||
|
||||
```php
|
||||
{{ id }}
|
||||
@@ -119,7 +128,7 @@ class BookController
|
||||
flash()->preset('entity_saved');
|
||||
```
|
||||
|
||||
This is equivalent to:
|
||||
This is the same as:
|
||||
|
||||
```php
|
||||
class BookController
|
||||
@@ -131,7 +140,7 @@ class BookController
|
||||
|
||||
<p id="preset-variables"><a href="#preset-variables" class="anchor"><i class="fa-duotone fa-link"></i> Variables</a></p>
|
||||
|
||||
Presets can also contain variables that can be substituted by using the translation system. Take the following example where you have a preset showing a personalised welcome message to the user.
|
||||
Presets can also have variables that you can replace using the translation system. For example, you can have a preset that shows a personalized welcome message.
|
||||
|
||||
```yaml
|
||||
# config/packages/flasher.yaml
|
||||
@@ -143,7 +152,7 @@ flasher:
|
||||
message: welcome_back_user
|
||||
```
|
||||
|
||||
In the translations file you can define `welcome_back_user` with the message containing the variable `:username`.
|
||||
In your translation file, define `welcome_back_user` with a message containing the variable `:username`.
|
||||
|
||||
```yaml
|
||||
# translations/flasher.en.yaml
|
||||
@@ -151,7 +160,7 @@ In the translations file you can define `welcome_back_user` with the message con
|
||||
welcome_back_user: Welcome back :username
|
||||
```
|
||||
|
||||
If you want to substitute the `:username` in the above translation with a username in the controller, you can achieve this by passing an array of values to be substituted as the second argument.
|
||||
To replace `:username` with the actual username in your controller, pass an array with the values to substitute as the second argument:
|
||||
|
||||
```php
|
||||
class BookController
|
||||
@@ -169,10 +178,9 @@ class BookController
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> RTL support
|
||||
|
||||
<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> makes it easy to incorporate <i class="fa-duotone fa-signs-post text-indigo-900 mr-1 fa-lg"></i> **right-to-left** languages like `Arabic` or `Hebrew`.
|
||||
it automatically detects the text direction and handles the necessary adjustments for you.
|
||||
**<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>** makes it easy to use <i class="fa-duotone fa-signs-post text-indigo-900 mr-1 fa-lg"></i> **right-to-left** languages like `Arabic` or `Hebrew`. It automatically detects the text direction and adjusts accordingly.
|
||||
|
||||
Simply make sure the translation service is enabled and let <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> handle the rest.
|
||||
Just make sure the translation service is enabled, and **<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>** will handle the rest.
|
||||
|
||||
{% assign id = '#/ phpflasher rtl' %}
|
||||
{% assign type = 'success' %}
|
||||
@@ -193,14 +201,13 @@ flash()
|
||||
|
||||
## <i class="fa-duotone fa-list-radio"></i> Translation
|
||||
|
||||
<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> allows you to translate your notification `messages` and `presets`, it comes with `Arabic`, `English`, `French`, `German`, `Spanish`, `Portuguese`, `Russian`, and `Chinese` translations out of the box. but you can easily add your own translations.
|
||||
**<strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>** lets you translate your notification `messages` and `presets`. It comes with translations for `Arabic`, `English`, `French`, `German`, `Spanish`, `Portuguese`, `Russian`, and `Chinese`. You can also add your own translations.
|
||||
|
||||
For example, to override the `English` translation strings for <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>, you can create a language file at the following location:
|
||||
**`translations/flasher.en.yaml`**.
|
||||
To override the `English` translations for <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>, create a file at `translations/flasher.en.yaml`.
|
||||
|
||||
In this file, you should **only** define the translation strings you want to override. Any translation strings that you don't override will still be loaded from <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>'s original language files.
|
||||
In this file, define **only** the translation strings you want to change. Any strings you don't override will use <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>'s default translations.
|
||||
|
||||
Here are examples of the default translation keys for `Arabic`, `English`, and `French` in <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>:
|
||||
Here are examples of the default translation keys for `Arabic`, `English`, and `French`:
|
||||
|
||||
```yaml
|
||||
# translations/flasher.ar.yaml
|
||||
@@ -250,7 +257,7 @@ The resource was deleted: 'La ressource :resource a été supprimée'
|
||||
resource: ''
|
||||
```
|
||||
|
||||
> These translation files facilitate localizing notifications to match user preferences and ensure that your applications can communicate effectively across different linguistic contexts.
|
||||
> These translation files help you localize notifications to match user preferences, so your application can communicate effectively in different languages.
|
||||
|
||||
{% assign id = '#/ symfony arabic translations' %}
|
||||
{% assign successMessage = 'تم إنشاء الملف' %}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# Support Palestine
|
||||
|
||||
# Donate via trusted institutions
|
||||
|
||||
**Donate via trusted institutions**
|
||||
|
||||
The best way to financially support Palestine is by donating directly to one of the trusted institutions in your country.
|
||||
|
||||
**Donate to associations acting in Palestine**
|
||||
|
||||
- [Doctors without borders](https://donate.doctorswithoutborders.org/secure/rr-donate-monthly-web?source=ADU2011U0W46) : Provides medical help to palestinians.
|
||||
- [WFP - World Food Programme](https://donate.wfp.org/1244/donation/single/?campaign=3493) : Provides food to palestinians.
|
||||
- [Palestine red crescent society](https://www.palestinercs.org/en/Donation) : Provides medical help to palestinians.
|
||||
- [UNRWA - United Nations Relief and Works](https://donate.unrwa.org/-landing-page/en_EN) : Provides food and cash assistance to palestinians.
|
||||
- [Save the children](https://donate.savethechildren.org/en) : Provides protection for children.
|
||||
- [Alkhidmat](https://alkhidmat.org/donate) : Provides food and medical help to palestinians.
|
||||
|
||||
**Other way to support**
|
||||
|
||||
- 🗣 Don’t be silent:
|
||||
- Add banners to your open source project and profile.
|
||||
- Protest against the war in your city.
|
||||
- Demand severe sanctions against Israel and support for Palestine from your leaders.
|
||||
- Reach out to Palestinian friends, offer help.
|
||||
- ❌ Boycott Israeli businesses:
|
||||
- Cancel subscriptions and stop giving your money to Israeli software, dependencies and infrastructure companies.
|
||||
- Cancel subscriptions and stop giving your money to companies which support israel.
|
||||
- Suffocate Israeli economy to limit its ability to fund the war!
|
||||
- 📰 Resist propaganda:
|
||||
- Educate yourself and others on the Israeli threat.
|
||||
- Check out common misbeliefs.
|
||||
@@ -1,7 +1,6 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: [
|
||||
'./_site/**/*.html',
|
||||
'./_site/**/*.js',
|
||||
'./_site/**/*.{html,js}',
|
||||
],
|
||||
}
|
||||
|
||||
Generated
+1565
-859
File diff suppressed because it is too large
Load Diff
+17
-15
@@ -19,39 +19,41 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "2.12.2",
|
||||
"@babel/core": "^7.24.5",
|
||||
"@babel/preset-env": "^7.24.5",
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/preset-env": "^7.25.4",
|
||||
"@rollup/plugin-babel": "^6.0.4",
|
||||
"@rollup/plugin-commonjs": "^25.0.7",
|
||||
"@rollup/plugin-commonjs": "^25.0.8",
|
||||
"@rollup/plugin-eslint": "^9.0.5",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"@rollup/plugin-typescript": "^11.1.6",
|
||||
"@types/node": "^20.12.8",
|
||||
"@types/node": "^20.16.5",
|
||||
"@typescript-eslint/eslint-plugin": "7.5.0",
|
||||
"@typescript-eslint/parser": "^7.8.0",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"browserslist": "^4.23.0",
|
||||
"@typescript-eslint/parser": "^7.18.0",
|
||||
"all-contributors-cli": "^6.26.1",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"browserslist": "^4.23.3",
|
||||
"cross-env": "7.0.3",
|
||||
"cssnano": "^6.1.2",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-airbnb-typescript": "^18.0.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-import-resolver-typescript": "^3.6.1",
|
||||
"eslint-import-resolver-typescript": "^3.6.3",
|
||||
"eslint-plugin-babel": "5.3.1",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-import": "^2.30.0",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"postcss-discard-comments": "^6.0.2",
|
||||
"punycode": "2.3.1",
|
||||
"rollup": "^4.17.2",
|
||||
"rollup": "^4.22.4",
|
||||
"rollup-plugin-cleanup": "^3.2.1",
|
||||
"rollup-plugin-clear": "^2.0.7",
|
||||
"rollup-plugin-copy": "3.5.0",
|
||||
"rollup-plugin-filesize": "^10.0.0",
|
||||
"rollup-plugin-postcss": "^4.0.2",
|
||||
"sass": "^1.76.0",
|
||||
"rollup-plugin-progress": "^1.1.2",
|
||||
"sass": "^1.79.3",
|
||||
"ts-node": "^10.9.2",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.4.5"
|
||||
"tslib": "^2.7.0",
|
||||
"typescript": "^5.6.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
includes:
|
||||
- extension.neon
|
||||
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
|
||||
- vendor/phpstan/phpstan-symfony/extension.neon
|
||||
- vendor/phpstan/phpstan-symfony/rules.neon
|
||||
- vendor/larastan/larastan/extension.neon
|
||||
- vendor/phpstan/phpstan-mockery/extension.neon
|
||||
- vendor/phpstan/phpstan-phpunit/extension.neon
|
||||
- vendor/phpstan/phpstan-phpunit/rules.neon
|
||||
|
||||
rules:
|
||||
- Spatie\Ray\PHPStan\RemainingRayCallRule
|
||||
|
||||
parameters:
|
||||
level: 9
|
||||
@@ -13,3 +19,6 @@ parameters:
|
||||
- tests/
|
||||
|
||||
tmpDir: .cache/phpstan
|
||||
|
||||
ignoreErrors:
|
||||
- '#Call to method .+ with .+ will always evaluate to true.#'
|
||||
|
||||
+7
-14
@@ -2,13 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
|
||||
use Rector\PHPUnit\CodeQuality\Rector\Class_\AddSeeTestAnnotationRector;
|
||||
use Rector\PHPUnit\Set\PHPUnitSetList;
|
||||
use Rector\Set\ValueObject\SetList;
|
||||
|
||||
return RectorConfig::configure()
|
||||
return Rector\Config\RectorConfig::configure()
|
||||
->withPaths([
|
||||
__DIR__.'/src/',
|
||||
__DIR__.'/tests/',
|
||||
@@ -16,12 +10,11 @@ return RectorConfig::configure()
|
||||
])
|
||||
->withRootFiles()
|
||||
->withSets([
|
||||
SetList::PHP_82,
|
||||
PHPUnitSetList::PHPUNIT_100,
|
||||
PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES,
|
||||
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
|
||||
Rector\Set\ValueObject\SetList::PHP_82,
|
||||
Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_110,
|
||||
Rector\PHPUnit\Set\PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES,
|
||||
Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_CODE_QUALITY,
|
||||
])
|
||||
->withSkip([
|
||||
AddSeeTestAnnotationRector::class,
|
||||
StringClassNameToClassConstantRector::class,
|
||||
->withRules([
|
||||
Spatie\Ray\Rector\RemoveRayCallRector::class,
|
||||
]);
|
||||
|
||||
@@ -12,6 +12,7 @@ import postcss from 'rollup-plugin-postcss'
|
||||
import cssnano from 'cssnano'
|
||||
import autoprefixer from 'autoprefixer'
|
||||
import discardComments from 'postcss-discard-comments'
|
||||
import progress from 'rollup-plugin-progress'
|
||||
|
||||
const isProduction = process.env.NODE_ENV === 'production'
|
||||
|
||||
@@ -68,6 +69,7 @@ function createPlugins({ name, path, assets }) {
|
||||
: []
|
||||
|
||||
return [
|
||||
progress(),
|
||||
...(isProduction ? [clear({ targets: [`${path}/dist`, `${path}/public`] })] : []),
|
||||
postcss({ extract: filename, plugins: isProduction ? postcssPlugins : [] }),
|
||||
...commonPlugins(path),
|
||||
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
name: Auto Closer PR
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [ opened ]
|
||||
|
||||
jobs:
|
||||
run:
|
||||
name: 🤖 PR Auto-Closure
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: superbrothers/close-pull-request@v3
|
||||
with:
|
||||
comment: |
|
||||
Hi there 👋,
|
||||
|
||||
First off, thanks for your effort! 🎉 Unfortunately, this repository is read-only because it's split from our primary monorepo repository.
|
||||
|
||||
🙏 We kindly ask if you could direct your valuable contribution to our main repository at https://github.com/php-flasher/php-flasher.
|
||||
|
||||
Once you've moved your contribution there, we'll review it and provide feedback. 🕵️♂️
|
||||
|
||||
Thanks again for your understanding and cooperation. We really appreciate it! 🙌
|
||||
@@ -90,12 +90,12 @@ final class InstallCommand extends Command
|
||||
$this->publishConfig($plugin, $configFile);
|
||||
}
|
||||
|
||||
$status = sprintf('<fg=green;options=bold>%s</>', '\\' === \DIRECTORY_SEPARATOR ? 'OK' : "\xE2\x9C\x94" /* HEAVY CHECK MARK (U+2714) */);
|
||||
$output->writeln(sprintf(' %s <fg=blue;options=bold>%s</>', $status, $plugin->getAlias()));
|
||||
$status = \sprintf('<fg=green;options=bold>%s</>', '\\' === \DIRECTORY_SEPARATOR ? 'OK' : "\xE2\x9C\x94" /* HEAVY CHECK MARK (U+2714) */);
|
||||
$output->writeln(\sprintf(' %s <fg=blue;options=bold>%s</>', $status, $plugin->getAlias()));
|
||||
} catch (\Exception $e) {
|
||||
$exitCode = self::FAILURE;
|
||||
$status = sprintf('<fg=red;options=bold>%s</>', '\\' === \DIRECTORY_SEPARATOR ? 'ERROR' : "\xE2\x9C\x98" /* HEAVY BALLOT X (U+2718) */);
|
||||
$output->writeln(sprintf(' %s <fg=blue;options=bold>%s</> <error>%s</error>', $status, $plugin->getAlias(), $e->getMessage()));
|
||||
$status = \sprintf('<fg=red;options=bold>%s</>', '\\' === \DIRECTORY_SEPARATOR ? 'ERROR' : "\xE2\x9C\x98" /* HEAVY BALLOT X (U+2718) */);
|
||||
$output->writeln(\sprintf(' %s <fg=blue;options=bold>%s</> <error>%s</error>', $status, $plugin->getAlias(), $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ final class FlasherComponent extends Component
|
||||
{
|
||||
}
|
||||
|
||||
public function render()
|
||||
public function render(): string
|
||||
{
|
||||
/** @var array<string, mixed> $criteria */
|
||||
$criteria = json_decode($this->criteria, true, 512, \JSON_THROW_ON_ERROR) ?: [];
|
||||
|
||||
@@ -13,37 +13,32 @@ use Illuminate\Support\Facades\Facade;
|
||||
* @method static NotificationBuilder title(string $message)
|
||||
* @method static NotificationBuilder message(string $message)
|
||||
* @method static NotificationBuilder type(string $message)
|
||||
* @method static NotificationBuilder options(array $options, bool $merge = true)
|
||||
* @method static NotificationBuilder options(array<string, mixed> $options, bool $merge = true)
|
||||
* @method static NotificationBuilder option(string $name, $value)
|
||||
* @method static NotificationBuilder priority(int $priority)
|
||||
* @method static NotificationBuilder hops(int $amount)
|
||||
* @method static NotificationBuilder keep()
|
||||
* @method static NotificationBuilder delay(int $delay)
|
||||
* @method static NotificationBuilder translate(array $parameters = [], ?string $locale = null)
|
||||
* @method static NotificationBuilder translate(array<string, mixed> $parameters = [], ?string $locale = null)
|
||||
* @method static NotificationBuilder handler(string $handler)
|
||||
* @method static NotificationBuilder context(array $context)
|
||||
* @method static NotificationBuilder context(array<string, mixed> $context)
|
||||
* @method static NotificationBuilder when(bool|\Closure $condition)
|
||||
* @method static NotificationBuilder unless(bool|\Closure $condition)
|
||||
* @method static NotificationBuilder with(StampInterface[] $stamps = array())
|
||||
* @method static NotificationBuilder withStamp(StampInterface $stamp)
|
||||
* @method static Envelope success(string $message, array $options = [], ?string $title = null)
|
||||
* @method static Envelope error(string $message, array $options = [], ?string $title = null)
|
||||
* @method static Envelope info(string $message, array $options = [], ?string $title = null)
|
||||
* @method static Envelope warning(string $message, array $options = [], ?string $title = null)
|
||||
* @method static Envelope flash(?string $type = null, ?string $message = null, array $options = [], ?string $title = null)
|
||||
* @method static Envelope preset(string $preset, array $parameters = [])
|
||||
* @method static Envelope success(string $message, array<string, mixed> $options = [], ?string $title = null)
|
||||
* @method static Envelope error(string $message, array<string, mixed> $options = [], ?string $title = null)
|
||||
* @method static Envelope info(string $message, array<string, mixed> $options = [], ?string $title = null)
|
||||
* @method static Envelope warning(string $message, array<string, mixed> $options = [], ?string $title = null)
|
||||
* @method static Envelope flash(?string $type = null, ?string $message = null, array<string, mixed> $options = [], ?string $title = null)
|
||||
* @method static Envelope preset(string $preset, array<string, mixed> $parameters = [])
|
||||
* @method static Envelope operation(string $operation, string|object|null $resource = null)
|
||||
* @method static Envelope created(string|object|null $resource = null)
|
||||
* @method static Envelope updated(string|object|null $resource = null)
|
||||
* @method static Envelope saved(string|object|null $resource = null)
|
||||
* @method static Envelope deleted(string|object|null $resource = null)
|
||||
* @method static Envelope push()
|
||||
* @method static Envelope addSuccess(string $message, array $options = [], ?string $title = null)
|
||||
* @method static Envelope addError(string $message, array $options = [], ?string $title = null)
|
||||
* @method static Envelope addInfo(string $message, array $options = [], ?string $title = null)
|
||||
* @method static Envelope addWarning(string $message, array $options = [], ?string $title = null)
|
||||
* @method static Envelope addFlash(?string $type = null, ?string $message = null, array $options = [], ?string $title = null)
|
||||
* @method static Envelope addPreset(string $preset, array $parameters = [])
|
||||
* @method static Envelope addPreset(string $preset, array<string, mixed> $parameters = [])
|
||||
* @method static Envelope addCreated(string|object|null $resource = null)
|
||||
* @method static Envelope addUpdated(string|object|null $resource = null)
|
||||
* @method static Envelope addDeleted(string|object|null $resource = null)
|
||||
|
||||
@@ -35,9 +35,9 @@ use Flasher\Prime\Storage\Storage;
|
||||
use Flasher\Prime\Storage\StorageManager;
|
||||
use Illuminate\Container\Container;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
use Illuminate\Contracts\Http\Kernel as HttpKernel;
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Foundation\Console\AboutCommand;
|
||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||
use Illuminate\View\Compilers\BladeCompiler;
|
||||
use Laravel\Octane\Events\RequestReceived;
|
||||
use Livewire\LivewireManager;
|
||||
@@ -210,7 +210,7 @@ final class FlasherServiceProvider extends PluginServiceProvider
|
||||
|
||||
AboutCommand::add('PHPFlasher', [
|
||||
'Version' => Flasher::VERSION,
|
||||
'Factories' => implode(' <fg=gray;options=bold>/</> ', array_map(fn ($factory) => sprintf('<fg=yellow;options=bold>%s</>', $factory), $factories)),
|
||||
'Factories' => implode(' <fg=gray;options=bold>/</> ', array_map(fn ($factory) => \sprintf('<fg=yellow;options=bold>%s</>', $factory), $factories)),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -222,6 +222,10 @@ final class FlasherServiceProvider extends PluginServiceProvider
|
||||
|
||||
private function registerFlasherMiddleware(): void
|
||||
{
|
||||
if (!$this->getConfig('inject_assets')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->app->singleton(FlasherMiddleware::class, static function (Application $app) {
|
||||
$flasher = $app->make('flasher');
|
||||
$cspHandler = $app->make('flasher.csp_handler');
|
||||
@@ -232,6 +236,31 @@ final class FlasherServiceProvider extends PluginServiceProvider
|
||||
$this->pushMiddlewareToGroup(FlasherMiddleware::class);
|
||||
}
|
||||
|
||||
private function registerSessionMiddleware(): void
|
||||
{
|
||||
if (!$this->getConfig('flash_bag')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->app->singleton(SessionMiddleware::class, static function (Application $app) {
|
||||
$config = $app->make('config');
|
||||
|
||||
$flasher = $app->make('flasher');
|
||||
$mapping = $config->get('flasher.flash_bag', []) ?: [];
|
||||
|
||||
return new SessionMiddleware(new RequestExtension($flasher, $mapping));
|
||||
});
|
||||
|
||||
$this->pushMiddlewareToGroup(SessionMiddleware::class);
|
||||
}
|
||||
|
||||
private function pushMiddlewareToGroup(string $middleware): void
|
||||
{
|
||||
$this->callAfterResolving(HttpKernel::class, function (HttpKernel $kernel) use ($middleware) {
|
||||
$kernel->appendMiddlewareToGroup('web', $middleware);
|
||||
});
|
||||
}
|
||||
|
||||
private function registerCspHandler(): void
|
||||
{
|
||||
$this->app->singleton('flasher.csp_handler', static function () {
|
||||
@@ -249,27 +278,6 @@ final class FlasherServiceProvider extends PluginServiceProvider
|
||||
});
|
||||
}
|
||||
|
||||
private function registerSessionMiddleware(): void
|
||||
{
|
||||
$this->app->singleton(SessionMiddleware::class, static function (Application $app) {
|
||||
$config = $app->make('config');
|
||||
|
||||
$flasher = $app->make('flasher');
|
||||
$mapping = $config->get('flasher.flash_bag', []);
|
||||
|
||||
return new SessionMiddleware(new RequestExtension($flasher, $mapping));
|
||||
});
|
||||
|
||||
$this->pushMiddlewareToGroup(SessionMiddleware::class);
|
||||
}
|
||||
|
||||
private function pushMiddlewareToGroup(string $middleware): void
|
||||
{
|
||||
$this->callAfterResolving(HttpKernel::class, function (HttpKernel $kernel) use ($middleware) {
|
||||
$kernel->appendMiddlewareToGroup('web', $middleware);
|
||||
});
|
||||
}
|
||||
|
||||
private function registerBladeDirectives(BladeCompiler $blade): void
|
||||
{
|
||||
$blade->directive('flasher_render', function (string $expression = '') {
|
||||
|
||||
@@ -51,6 +51,7 @@ final readonly class Request implements RequestInterface
|
||||
{
|
||||
$session = $this->getSession();
|
||||
|
||||
/** @var false|string|string[] $type */
|
||||
$type = $session?->get($type);
|
||||
|
||||
if (!\is_string($type) && !\is_array($type)) {
|
||||
|
||||
@@ -5,12 +5,13 @@ declare(strict_types=1);
|
||||
namespace Flasher\Laravel\Http;
|
||||
|
||||
use Flasher\Prime\Http\ResponseInterface;
|
||||
use Illuminate\Http\JsonResponse as LaravelJsonResponse;
|
||||
use Illuminate\Http\Response as LaravelResponse;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse as SymfonyJsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
|
||||
|
||||
final readonly class Response implements ResponseInterface
|
||||
{
|
||||
public function __construct(private LaravelJsonResponse|LaravelResponse $response)
|
||||
public function __construct(private SymfonyResponse $response)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -21,7 +22,7 @@ final readonly class Response implements ResponseInterface
|
||||
|
||||
public function isJson(): bool
|
||||
{
|
||||
return $this->response instanceof LaravelJsonResponse;
|
||||
return $this->response instanceof SymfonyJsonResponse;
|
||||
}
|
||||
|
||||
public function isHtml(): bool
|
||||
@@ -39,7 +40,7 @@ final readonly class Response implements ResponseInterface
|
||||
{
|
||||
$contentDisposition = $this->response->headers->get('Content-Disposition', '');
|
||||
|
||||
if (!\is_string($contentDisposition)) {
|
||||
if (!$contentDisposition) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -66,7 +67,7 @@ final readonly class Response implements ResponseInterface
|
||||
$this->response->setContent($content);
|
||||
|
||||
// Restore original response (eg. the View or Ajax data)
|
||||
if ($original) {
|
||||
if ($original && $this->response instanceof LaravelResponse) {
|
||||
$this->response->original = $original;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,9 +7,8 @@ namespace Flasher\Laravel\Middleware;
|
||||
use Flasher\Laravel\Http\Request;
|
||||
use Flasher\Laravel\Http\Response;
|
||||
use Flasher\Prime\Http\ResponseExtensionInterface;
|
||||
use Illuminate\Http\JsonResponse as LaravelJsonResponse;
|
||||
use Illuminate\Http\Request as LaravelRequest;
|
||||
use Illuminate\Http\Response as LaravelResponse;
|
||||
use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
|
||||
|
||||
final readonly class FlasherMiddleware
|
||||
{
|
||||
@@ -21,7 +20,7 @@ final readonly class FlasherMiddleware
|
||||
{
|
||||
$response = $next($request);
|
||||
|
||||
if ($response instanceof LaravelJsonResponse || $response instanceof LaravelResponse) {
|
||||
if ($response instanceof SymfonyResponse) {
|
||||
$this->responseExtension->render(new Request($request), new Response($response));
|
||||
}
|
||||
|
||||
|
||||
@@ -7,9 +7,8 @@ namespace Flasher\Laravel\Middleware;
|
||||
use Flasher\Laravel\Http\Request;
|
||||
use Flasher\Laravel\Http\Response;
|
||||
use Flasher\Prime\Http\RequestExtensionInterface;
|
||||
use Illuminate\Http\JsonResponse as LaravelJsonResponse;
|
||||
use Illuminate\Http\Request as LaravelRequest;
|
||||
use Illuminate\Http\Response as LaravelResponse;
|
||||
use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
|
||||
|
||||
final readonly class SessionMiddleware
|
||||
{
|
||||
@@ -21,7 +20,7 @@ final readonly class SessionMiddleware
|
||||
{
|
||||
$response = $next($request);
|
||||
|
||||
if ($response instanceof LaravelJsonResponse || $response instanceof LaravelResponse) {
|
||||
if ($response instanceof SymfonyResponse) {
|
||||
$this->requestExtension->flash(new Request($request), new Response($response));
|
||||
}
|
||||
|
||||
|
||||
+100
-24
@@ -1,3 +1,9 @@
|
||||
<div align="center">
|
||||
<a href="https://github.com/php-flasher/php-flasher/blob/2.x/docs/palestine.md">
|
||||
<img src="https://raw.githubusercontent.com/php-flasher/art/main/palestine-banner-support.svg" width="800px" alt="Help Palestine"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github-dark.png">
|
||||
@@ -5,30 +11,102 @@
|
||||
</picture>
|
||||
</p>
|
||||
|
||||
## About PHPFlasher
|
||||
|
||||
PHPFlasher is a powerful and easy-to-use package that allows you to quickly and easily add flash messages to your Laravel or Symfony projects.
|
||||
Whether you need to alert users of a successful form submission, an error, or any other important information, flash messages are a simple and effective solution for providing feedback to your users.
|
||||
|
||||
With PHPFlasher, you can easily record and store messages within the session, making it simple to retrieve and display them on the current or next page.
|
||||
This improves user engagement and enhances the overall user experience on your website or application.
|
||||
|
||||
Whether you're a beginner or an experienced developer, PHPFlasher's intuitive and straightforward design makes it easy to integrate into your projects.
|
||||
So, if you're looking for a reliable, flexible and easy to use flash messages solution, PHPFlasher is the perfect choice.
|
||||
# PHPFlasher for Laravel
|
||||
|
||||
PHPFlasher provides a powerful and intuitive way to add flash notifications to your Laravel applications. With PHPFlasher, you can enhance user feedback efficiently and elegantly.
|
||||
|
||||
## Official Documentation
|
||||
|
||||
Documentation for PHPFlasher can be found on the [https://php-flasher.io](https://php-flasher.io).
|
||||
For more comprehensive documentation, please visit [PHPFlasher's Official Documentation](https://php-flasher.io).
|
||||
|
||||
## Contributors and sponsors
|
||||
## Requirements
|
||||
|
||||
Join our team of contributors and make a lasting impact on our project!
|
||||
- **PHP** v8.2 or higher
|
||||
- **Laravel** v11.0 or higher
|
||||
|
||||
We are always looking for passionate individuals who want to contribute their skills and ideas.
|
||||
Whether you're a developer, designer, or simply have a great idea, we welcome your participation and collaboration.
|
||||
## Installation
|
||||
|
||||
Shining stars of our community:
|
||||
To install PHPFlasher for Laravel, use Composer:
|
||||
|
||||
```bash
|
||||
composer require php-flasher/flasher-laravel
|
||||
```
|
||||
|
||||
After installation, publish the assets using:
|
||||
|
||||
```bash
|
||||
php artisan flasher:install
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Quickly integrate flash notifications in your Laravel project using the simple methods provided by PHPFlasher.
|
||||
|
||||
- Display a success message.
|
||||
|
||||
```php
|
||||
flash()->success('Operation completed successfully.');
|
||||
```
|
||||
|
||||
- Display an error message.
|
||||
|
||||
```php
|
||||
flash()->error('Oops, something went wrong.');
|
||||
```
|
||||
|
||||
- Display a warning message.
|
||||
|
||||
```php
|
||||
flash()->warning('Your account may have been compromised.');
|
||||
```
|
||||
|
||||
- Display an informational message.
|
||||
|
||||
```php
|
||||
flash()->info('This may take some time. Do not refresh the page.');
|
||||
```
|
||||
|
||||
- Set multiple options at once.
|
||||
|
||||
```php
|
||||
flash()
|
||||
->options(['timeout' => 5000, 'position' => 'top-right'])
|
||||
->success('Your profile has been updated.');
|
||||
```
|
||||
|
||||
- Set a single option.
|
||||
|
||||
```php
|
||||
flash()
|
||||
->option('timer', 5000)
|
||||
->success('Your reservation has been confirmed.');
|
||||
```
|
||||
|
||||
- Set the priority of the message.
|
||||
|
||||
```php
|
||||
flash()
|
||||
->priority(1)
|
||||
->success('Your subscription has been activated.');
|
||||
```
|
||||
|
||||
- Set how many requests a message should persist through.
|
||||
|
||||
```php
|
||||
flash()
|
||||
->hops(2)
|
||||
->info('Your account has been created, but requires verification.');
|
||||
```
|
||||
|
||||
- Translate a message into the specified language.
|
||||
|
||||
```php
|
||||
flash()
|
||||
->translate('ar')
|
||||
->success('Your message has been sent.');
|
||||
```
|
||||
|
||||
## Contributors
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:START -->
|
||||
<!-- prettier-ignore-start -->
|
||||
@@ -36,7 +114,7 @@ Shining stars of our community:
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/younes--ennaji//"><img src="https://avatars.githubusercontent.com/u/10859693?v=4?s=100" width="100px;" alt="Younes ENNAJI"/><br /><sub><b>Younes ENNAJI</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Code">💻</a> <a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Documentation">📖</a> <a href="#maintenance-yoeunes" title="Maintenance">🚧</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/younes-ennaji/"><img src="https://avatars.githubusercontent.com/u/10859693?v=4?s=100" width="100px;" alt="Younes ENNAJI"/><br /><sub><b>Younes ENNAJI</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Code">💻</a> <a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Documentation">📖</a> <a href="#maintenance-yoeunes" title="Maintenance">🚧</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/salmayno"><img src="https://avatars.githubusercontent.com/u/27933199?v=4?s=100" width="100px;" alt="Salma Mourad"/><br /><sub><b>Salma Mourad</b></sub></a><br /><a href="#financial-salmayno" title="Financial">💵</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.youtube.com/rstacode"><img src="https://avatars.githubusercontent.com/u/35005761?v=4?s=100" width="100px;" alt="Nashwan Abdullah"/><br /><sub><b>Nashwan Abdullah</b></sub></a><br /><a href="#financial-codenashwan" title="Financial">💵</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://darvis.nl/"><img src="https://avatars.githubusercontent.com/u/7394837?v=4?s=100" width="100px;" alt="Arvid de Jong"/><br /><sub><b>Arvid de Jong</b></sub></a><br /><a href="#financial-darviscommerce" title="Financial">💵</a></td>
|
||||
@@ -58,17 +136,15 @@ Shining stars of our community:
|
||||
|
||||
## Contact
|
||||
|
||||
PHPFlasher is being actively developed by <a href="https://github.com/yoeunes">yoeunes</a>.
|
||||
You can reach out with questions, bug reports, or feature requests on any of the following:
|
||||
For support, feature requests, or contributions, reach out via:
|
||||
|
||||
- [Github Issues](https://github.com/php-flasher/php-flasher/issues)
|
||||
- [Github](https://github.com/yoeunes)
|
||||
- [GitHub Issues](https://github.com/php-flasher/php-flasher/issues)
|
||||
- [Twitter](https://twitter.com/yoeunes)
|
||||
- [Linkedin](https://www.linkedin.com/in/younes--ennaji//)
|
||||
- [Email me directly](mailto:younes.ennaji.pro@gmail.com)
|
||||
- [LinkedIn](https://www.linkedin.com/in/younes--ennaji//)
|
||||
- [Email](mailto:younes.ennaji.pro@gmail.com)
|
||||
|
||||
## License
|
||||
|
||||
PHPFlasher is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
|
||||
PHPFlasher is licensed under the [MIT license](https://opensource.org/licenses/MIT).
|
||||
|
||||
<p align="center"> <b>Made with ❤️ by <a href="https://www.linkedin.com/in/younes--ennaji//">Younes ENNAJI</a> </b> </p>
|
||||
|
||||
@@ -22,6 +22,12 @@ return [
|
||||
// Automatically inject PHPFlasher assets into HTML response
|
||||
'inject_assets' => true,
|
||||
|
||||
// Global options
|
||||
'options' => [
|
||||
'timeout' => 5000, // in milliseconds
|
||||
'position' => 'top-right',
|
||||
],
|
||||
|
||||
// Configuration for the flash bag (converting Laravel flash messages)
|
||||
// Map Laravel session keys to PHPFlasher types
|
||||
'flash_bag' => [
|
||||
|
||||
@@ -6,6 +6,7 @@ namespace Flasher\Laravel\Support;
|
||||
|
||||
use Flasher\Prime\Factory\NotificationFactoryLocator;
|
||||
use Flasher\Prime\Plugin\PluginInterface;
|
||||
use Illuminate\Contracts\Config\Repository;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Contracts\Foundation\CachesConfiguration;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
@@ -35,6 +36,14 @@ abstract class PluginServiceProvider extends ServiceProvider
|
||||
return rtrim($this->getResourcesDir(), '/').'/config.php';
|
||||
}
|
||||
|
||||
protected function getConfig(?string $key = null, mixed $default = null): mixed
|
||||
{
|
||||
/** @var Repository $config */
|
||||
$config = $this->app->make('config');
|
||||
|
||||
return $key ? $config->get('flasher.'.$key, $default) : $config->get('flasher');
|
||||
}
|
||||
|
||||
protected function getResourcesDir(): string
|
||||
{
|
||||
$r = new \ReflectionClass($this);
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"require": {
|
||||
"php": ">=8.2",
|
||||
"illuminate/support": "^11.0",
|
||||
"php-flasher/flasher": "^2.0"
|
||||
"php-flasher/flasher": "^2.0.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
name: Auto Closer PR
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [ opened ]
|
||||
|
||||
jobs:
|
||||
run:
|
||||
name: 🤖 PR Auto-Closure
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: superbrothers/close-pull-request@v3
|
||||
with:
|
||||
comment: |
|
||||
Hi there 👋,
|
||||
|
||||
First off, thanks for your effort! 🎉 Unfortunately, this repository is read-only because it's split from our primary monorepo repository.
|
||||
|
||||
🙏 We kindly ask if you could direct your valuable contribution to our main repository at https://github.com/php-flasher/php-flasher.
|
||||
|
||||
Once you've moved your contribution there, we'll review it and provide feedback. 🕵️♂️
|
||||
|
||||
Thanks again for your understanding and cooperation. We really appreciate it! 🙌
|
||||
@@ -6,25 +6,18 @@ namespace Flasher\Noty\Laravel\Facade;
|
||||
|
||||
use Flasher\Noty\Prime\NotyBuilder;
|
||||
use Flasher\Prime\Notification\Envelope;
|
||||
use Flasher\Prime\Notification\NotificationInterface;
|
||||
use Flasher\Prime\Stamp\StampInterface;
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
|
||||
/**
|
||||
* @method static NotyBuilder addSuccess(string $message, array $options = array())
|
||||
* @method static NotyBuilder addError(string $message, array $options = array())
|
||||
* @method static NotyBuilder addWarning(string $message, array $options = array())
|
||||
* @method static NotyBuilder addInfo(string $message, array $options = array())
|
||||
* @method static NotyBuilder addFlash(NotificationInterface|string $type, string $message = null, array $options = array())
|
||||
* @method static NotyBuilder success(string $message, array<string, mixed> $options = array())
|
||||
* @method static NotyBuilder error(string $message, array<string, mixed> $options = array())
|
||||
* @method static NotyBuilder warning(string $message, array<string, mixed> $options = array())
|
||||
* @method static NotyBuilder info(string $message, array<string, mixed> $options = array())
|
||||
* @method static NotyBuilder flash(StampInterface[] $stamps = array())
|
||||
* @method static NotyBuilder type(string $type, string $message = null, array $options = array())
|
||||
* @method static NotyBuilder message(string $message)
|
||||
* @method static NotyBuilder options(array $options, bool $merge = true)
|
||||
* @method static NotyBuilder options(array<string, mixed> $options, bool $merge = true)
|
||||
* @method static NotyBuilder option(string $name, string $value)
|
||||
* @method static NotyBuilder success(string $message = null, array $options = array())
|
||||
* @method static NotyBuilder error(string $message = null, array $options = array())
|
||||
* @method static NotyBuilder info(string $message = null, array $options = array())
|
||||
* @method static NotyBuilder warning(string $message = null, array $options = array())
|
||||
* @method static NotyBuilder priority(int $priority)
|
||||
* @method static NotyBuilder hops(int $amount)
|
||||
* @method static NotyBuilder keep()
|
||||
@@ -35,12 +28,12 @@ use Illuminate\Support\Facades\Facade;
|
||||
* @method static NotyBuilder handler(string $handler)
|
||||
* @method static Envelope getEnvelope()
|
||||
* @method static NotyBuilder text(string $text)
|
||||
* @method static NotyBuilder alert(string $message = null, array $options = array())
|
||||
* @method static NotyBuilder alert(string $message = null, array<string, mixed> $options = array())
|
||||
* @method static NotyBuilder layout(string $layout)
|
||||
* @method static NotyBuilder theme(string $theme)
|
||||
* @method static NotyBuilder timeout(bool|int $timeout)
|
||||
* @method static NotyBuilder progressBar(bool $progressBar = false)
|
||||
* @method static NotyBuilder closeWith(array|string $closeWith)
|
||||
* @method static NotyBuilder closeWith(string|string[] $closeWith)
|
||||
* @method static NotyBuilder animation(string $animation, string $effect)
|
||||
* @method static NotyBuilder sounds(string $option, mixed $value)
|
||||
* @method static NotyBuilder docTitle(string $option, mixed $docTitle)
|
||||
@@ -50,7 +43,7 @@ use Illuminate\Support\Facades\Facade;
|
||||
* @method static NotyBuilder queue(string $queue)
|
||||
* @method static NotyBuilder killer(bool|string $killer)
|
||||
* @method static NotyBuilder container(bool|string $container)
|
||||
* @method static NotyBuilder buttons(array $buttons)
|
||||
* @method static NotyBuilder buttons(string[] $buttons)
|
||||
* @method static NotyBuilder visibilityControl(bool $visibilityControl)
|
||||
*/
|
||||
final class Noty extends Facade
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
<div align="center">
|
||||
<a href="https://github.com/php-flasher/php-flasher/blob/2.x/docs/palestine.md">
|
||||
<img src="https://raw.githubusercontent.com/php-flasher/art/main/palestine-banner-support.svg" width="800px" alt="Help Palestine"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github-dark.png">
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
"prefer-stable": true,
|
||||
"require": {
|
||||
"php": ">=8.2",
|
||||
"php-flasher/flasher-laravel": "^2.0",
|
||||
"php-flasher/flasher-noty": "^2.0"
|
||||
"php-flasher/flasher-laravel": "^2.0.1",
|
||||
"php-flasher/flasher-noty": "^2.0.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
name: Auto Closer PR
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [ opened ]
|
||||
|
||||
jobs:
|
||||
run:
|
||||
name: 🤖 PR Auto-Closure
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: superbrothers/close-pull-request@v3
|
||||
with:
|
||||
comment: |
|
||||
Hi there 👋,
|
||||
|
||||
First off, thanks for your effort! 🎉 Unfortunately, this repository is read-only because it's split from our primary monorepo repository.
|
||||
|
||||
🙏 We kindly ask if you could direct your valuable contribution to our main repository at https://github.com/php-flasher/php-flasher.
|
||||
|
||||
Once you've moved your contribution there, we'll review it and provide feedback. 🕵️♂️
|
||||
|
||||
Thanks again for your understanding and cooperation. We really appreciate it! 🙌
|
||||
@@ -23,7 +23,10 @@ final class NotyPlugin extends Plugin
|
||||
return NotyInterface::class;
|
||||
}
|
||||
|
||||
public function getScripts(): string|array
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getScripts(): array
|
||||
{
|
||||
return [
|
||||
'/vendor/flasher/noty.min.js',
|
||||
@@ -31,7 +34,10 @@ final class NotyPlugin extends Plugin
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string|array
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getStyles(): array
|
||||
{
|
||||
return [
|
||||
'/vendor/flasher/noty.css',
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
<div align="center">
|
||||
<a href="https://github.com/php-flasher/php-flasher/blob/2.x/docs/palestine.md">
|
||||
<img src="https://raw.githubusercontent.com/php-flasher/art/main/palestine-banner-support.svg" width="800px" alt="Help Palestine"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github-dark.png">
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"prefer-stable": true,
|
||||
"require": {
|
||||
"php": ">=8.2",
|
||||
"php-flasher/flasher": "^2.0"
|
||||
"php-flasher/flasher": "^2.0.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
name: Auto Closer PR
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [ opened ]
|
||||
|
||||
jobs:
|
||||
run:
|
||||
name: 🤖 PR Auto-Closure
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: superbrothers/close-pull-request@v3
|
||||
with:
|
||||
comment: |
|
||||
Hi there 👋,
|
||||
|
||||
First off, thanks for your effort! 🎉 Unfortunately, this repository is read-only because it's split from our primary monorepo repository.
|
||||
|
||||
🙏 We kindly ask if you could direct your valuable contribution to our main repository at https://github.com/php-flasher/php-flasher.
|
||||
|
||||
Once you've moved your contribution there, we'll review it and provide feedback. 🕵️♂️
|
||||
|
||||
Thanks again for your understanding and cooperation. We really appreciate it! 🙌
|
||||
@@ -1,3 +1,9 @@
|
||||
<div align="center">
|
||||
<a href="https://github.com/php-flasher/php-flasher/blob/2.x/docs/palestine.md">
|
||||
<img src="https://raw.githubusercontent.com/php-flasher/art/main/palestine-banner-support.svg" width="800px" alt="Help Palestine"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github-dark.png">
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
"prefer-stable": true,
|
||||
"require": {
|
||||
"php": ">=8.2",
|
||||
"php-flasher/flasher-noty": "^2.0",
|
||||
"php-flasher/flasher-symfony": "^2.0"
|
||||
"php-flasher/flasher-noty": "^2.0.1",
|
||||
"php-flasher/flasher-symfony": "^2.0.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
name: Auto Closer PR
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [ opened ]
|
||||
|
||||
jobs:
|
||||
run:
|
||||
name: 🤖 PR Auto-Closure
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: superbrothers/close-pull-request@v3
|
||||
with:
|
||||
comment: |
|
||||
Hi there 👋,
|
||||
|
||||
First off, thanks for your effort! 🎉 Unfortunately, this repository is read-only because it's split from our primary monorepo repository.
|
||||
|
||||
🙏 We kindly ask if you could direct your valuable contribution to our main repository at https://github.com/php-flasher/php-flasher.
|
||||
|
||||
Once you've moved your contribution there, we'll review it and provide feedback. 🕵️♂️
|
||||
|
||||
Thanks again for your understanding and cooperation. We really appreciate it! 🙌
|
||||
@@ -6,25 +6,18 @@ namespace Flasher\Notyf\Laravel\Facade;
|
||||
|
||||
use Flasher\Notyf\Prime\NotyfBuilder;
|
||||
use Flasher\Prime\Notification\Envelope;
|
||||
use Flasher\Prime\Notification\NotificationInterface;
|
||||
use Flasher\Prime\Stamp\StampInterface;
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
|
||||
/**
|
||||
* @method static NotyfBuilder addSuccess(string $message, array $options = array())
|
||||
* @method static NotyfBuilder addError(string $message, array $options = array())
|
||||
* @method static NotyfBuilder addWarning(string $message, array $options = array())
|
||||
* @method static NotyfBuilder addInfo(string $message, array $options = array())
|
||||
* @method static NotyfBuilder addFlash(NotificationInterface|string $type, string $message = null, array $options = array())
|
||||
* @method static NotyfBuilder success(string $message, array<string, mixed> $options = array())
|
||||
* @method static NotyfBuilder error(string $message, array<string, mixed> $options = array())
|
||||
* @method static NotyfBuilder warning(string $message, array<string, mixed> $options = array())
|
||||
* @method static NotyfBuilder info(string $message, array<string, mixed> $options = array())
|
||||
* @method static NotyfBuilder flash(StampInterface[] $stamps = array())
|
||||
* @method static NotyfBuilder type(string $type, string $message = null, array $options = array())
|
||||
* @method static NotyfBuilder message(string $message)
|
||||
* @method static NotyfBuilder options(array $options, bool $merge = true)
|
||||
* @method static NotyfBuilder options(array<string, mixed> $options, bool $merge = true)
|
||||
* @method static NotyfBuilder option(string $name, string $value)
|
||||
* @method static NotyfBuilder success(string $message = null, array $options = array())
|
||||
* @method static NotyfBuilder error(string $message = null, array $options = array())
|
||||
* @method static NotyfBuilder info(string $message = null, array $options = array())
|
||||
* @method static NotyfBuilder warning(string $message = null, array $options = array())
|
||||
* @method static NotyfBuilder priority(int $priority)
|
||||
* @method static NotyfBuilder hops(int $amount)
|
||||
* @method static NotyfBuilder keep()
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
<div align="center">
|
||||
<a href="https://github.com/php-flasher/php-flasher/blob/2.x/docs/palestine.md">
|
||||
<img src="https://raw.githubusercontent.com/php-flasher/art/main/palestine-banner-support.svg" width="800px" alt="Help Palestine"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github-dark.png">
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
"prefer-stable": true,
|
||||
"require": {
|
||||
"php": ">=8.2",
|
||||
"php-flasher/flasher-laravel": "^2.0",
|
||||
"php-flasher/flasher-notyf": "^2.0"
|
||||
"php-flasher/flasher-laravel": "^2.0.1",
|
||||
"php-flasher/flasher-notyf": "^2.0.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
name: Auto Closer PR
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [ opened ]
|
||||
|
||||
jobs:
|
||||
run:
|
||||
name: 🤖 PR Auto-Closure
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: superbrothers/close-pull-request@v3
|
||||
with:
|
||||
comment: |
|
||||
Hi there 👋,
|
||||
|
||||
First off, thanks for your effort! 🎉 Unfortunately, this repository is read-only because it's split from our primary monorepo repository.
|
||||
|
||||
🙏 We kindly ask if you could direct your valuable contribution to our main repository at https://github.com/php-flasher/php-flasher.
|
||||
|
||||
Once you've moved your contribution there, we'll review it and provide feedback. 🕵️♂️
|
||||
|
||||
Thanks again for your understanding and cooperation. We really appreciate it! 🙌
|
||||
@@ -23,14 +23,20 @@ final class NotyfPlugin extends Plugin
|
||||
return NotyfInterface::class;
|
||||
}
|
||||
|
||||
public function getScripts(): string|array
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getScripts(): array
|
||||
{
|
||||
return [
|
||||
'/vendor/flasher/flasher-notyf.min.js',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string|array
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getStyles(): array
|
||||
{
|
||||
return [
|
||||
'/vendor/flasher/flasher-notyf.min.css',
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
<div align="center">
|
||||
<a href="https://github.com/php-flasher/php-flasher/blob/2.x/docs/palestine.md">
|
||||
<img src="https://raw.githubusercontent.com/php-flasher/art/main/palestine-banner-support.svg" width="800px" alt="Help Palestine"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github-dark.png">
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -33,7 +33,7 @@
|
||||
"prefer-stable": true,
|
||||
"require": {
|
||||
"php": ">=8.2",
|
||||
"php-flasher/flasher": "^2.0"
|
||||
"php-flasher/flasher": "^2.0.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
name: Auto Closer PR
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [ opened ]
|
||||
|
||||
jobs:
|
||||
run:
|
||||
name: 🤖 PR Auto-Closure
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: superbrothers/close-pull-request@v3
|
||||
with:
|
||||
comment: |
|
||||
Hi there 👋,
|
||||
|
||||
First off, thanks for your effort! 🎉 Unfortunately, this repository is read-only because it's split from our primary monorepo repository.
|
||||
|
||||
🙏 We kindly ask if you could direct your valuable contribution to our main repository at https://github.com/php-flasher/php-flasher.
|
||||
|
||||
Once you've moved your contribution there, we'll review it and provide feedback. 🕵️♂️
|
||||
|
||||
Thanks again for your understanding and cooperation. We really appreciate it! 🙌
|
||||
@@ -1,3 +1,9 @@
|
||||
<div align="center">
|
||||
<a href="https://github.com/php-flasher/php-flasher/blob/2.x/docs/palestine.md">
|
||||
<img src="https://raw.githubusercontent.com/php-flasher/art/main/palestine-banner-support.svg" width="800px" alt="Help Palestine"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github-dark.png">
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
"prefer-stable": true,
|
||||
"require": {
|
||||
"php": ">=8.2",
|
||||
"php-flasher/flasher-notyf": "^2.0",
|
||||
"php-flasher/flasher-symfony": "^2.0"
|
||||
"php-flasher/flasher-notyf": "^2.0.1",
|
||||
"php-flasher/flasher-symfony": "^2.0.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
name: Auto Closer PR
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [ opened ]
|
||||
|
||||
jobs:
|
||||
run:
|
||||
name: 🤖 PR Auto-Closure
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: superbrothers/close-pull-request@v3
|
||||
with:
|
||||
comment: |
|
||||
Hi there 👋,
|
||||
|
||||
First off, thanks for your effort! 🎉 Unfortunately, this repository is read-only because it's split from our primary monorepo repository.
|
||||
|
||||
🙏 We kindly ask if you could direct your valuable contribution to our main repository at https://github.com/php-flasher/php-flasher.
|
||||
|
||||
Once you've moved your contribution there, we'll review it and provide feedback. 🕵️♂️
|
||||
|
||||
Thanks again for your understanding and cooperation. We really appreciate it! 🙌
|
||||
@@ -44,7 +44,7 @@ final class AssetManager implements AssetManagerInterface
|
||||
}
|
||||
|
||||
if (false === file_put_contents($this->manifestPath, json_encode($this->entries, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES))) {
|
||||
throw new \RuntimeException(sprintf('Failed to write manifest file to "%s"', $this->manifestPath));
|
||||
throw new \RuntimeException(\sprintf('Failed to write manifest file to "%s"', $this->manifestPath));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,10 +67,10 @@ final class AssetManager implements AssetManagerInterface
|
||||
$entries = json_decode($content ?: '', true);
|
||||
|
||||
if (!\is_array($entries)) {
|
||||
throw new \InvalidArgumentException(sprintf('There was a problem JSON decoding the "%s" file.', $this->manifestPath));
|
||||
throw new \InvalidArgumentException(\sprintf('There was a problem JSON decoding the "%s" file.', $this->manifestPath));
|
||||
}
|
||||
|
||||
return $this->entries = $entries;
|
||||
return $this->entries = $entries; // @phpstan-ignore-line
|
||||
}
|
||||
|
||||
private function computeHash(string $path): string
|
||||
|
||||
@@ -57,13 +57,13 @@ final class FlasherContainer
|
||||
public static function create(string $id): FlasherInterface|NotificationFactoryInterface
|
||||
{
|
||||
if (!self::has($id)) {
|
||||
throw new \InvalidArgumentException(sprintf('The container does not have the requested service "%s".', $id));
|
||||
throw new \InvalidArgumentException(\sprintf('The container does not have the requested service "%s".', $id));
|
||||
}
|
||||
|
||||
$factory = self::getContainer()->get($id);
|
||||
|
||||
if (!$factory instanceof FlasherInterface && !$factory instanceof NotificationFactoryInterface) {
|
||||
throw new \InvalidArgumentException(sprintf('Expected an instance of "%s" or "%s", got "%s".', FlasherInterface::class, NotificationFactoryInterface::class, get_debug_type($factory)));
|
||||
throw new \InvalidArgumentException(\sprintf('Expected an instance of "%s" or "%s", got "%s".', FlasherInterface::class, NotificationFactoryInterface::class, get_debug_type($factory)));
|
||||
}
|
||||
|
||||
return $factory;
|
||||
@@ -93,7 +93,7 @@ final class FlasherContainer
|
||||
$resolved = $container instanceof \Closure || \is_callable($container) ? $container() : $container;
|
||||
|
||||
if (!$resolved instanceof ContainerInterface) {
|
||||
throw new \InvalidArgumentException(sprintf('Expected an instance of "%s", got "%s".', ContainerInterface::class, get_debug_type($resolved)));
|
||||
throw new \InvalidArgumentException(\sprintf('Expected an instance of "%s", got "%s".', ContainerInterface::class, get_debug_type($resolved)));
|
||||
}
|
||||
|
||||
return $resolved;
|
||||
|
||||
@@ -34,7 +34,7 @@ final class EventDispatcher implements EventDispatcherInterface
|
||||
}
|
||||
|
||||
if (!\is_callable($listener)) {
|
||||
throw new \InvalidArgumentException(sprintf('Listener "%s" is not callable. Listeners must implement __invoke method.', $listener::class));
|
||||
throw new \InvalidArgumentException(\sprintf('Listener "%s" is not callable. Listeners must implement __invoke method.', $listener::class));
|
||||
}
|
||||
|
||||
$listener($event);
|
||||
|
||||
@@ -25,7 +25,10 @@ final readonly class AttachDefaultStampsListener implements EventListenerInterfa
|
||||
}
|
||||
}
|
||||
|
||||
public function getSubscribedEvents(): string|array
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getSubscribedEvents(): array
|
||||
{
|
||||
return [
|
||||
PersistEvent::class,
|
||||
|
||||
@@ -31,7 +31,7 @@ final class NotificationLoggerListener implements EventListenerInterface
|
||||
return $this->events;
|
||||
}
|
||||
|
||||
public function getSubscribedEvents(): string|array
|
||||
public function getSubscribedEvents(): string
|
||||
{
|
||||
return PresentationEvent::class;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ final readonly class TranslationListener implements EventListenerInterface
|
||||
|
||||
foreach ($preset->getParameters() as $key => $value) {
|
||||
if (!\is_string($value)) {
|
||||
throw new \InvalidArgumentException(sprintf('Value must be "string", got "%s".', get_debug_type($value)));
|
||||
throw new \InvalidArgumentException(\sprintf('Value must be "string", got "%s".', get_debug_type($value)));
|
||||
}
|
||||
|
||||
$parameters[$key] = $this->translator->translate($value, $parameters, $locale);
|
||||
|
||||
@@ -11,10 +11,10 @@ final class CriteriaNotRegisteredException extends \Exception
|
||||
*/
|
||||
public static function create(string $alias, array $availableCriteria = []): self
|
||||
{
|
||||
$message = sprintf('Criteria "%s" is not found, did you forget to register it?', $alias);
|
||||
$message = \sprintf('Criteria "%s" is not found, did you forget to register it?', $alias);
|
||||
|
||||
if ([] !== $availableCriteria) {
|
||||
$message .= sprintf(' Available criteria: [%s]', implode(', ', $availableCriteria));
|
||||
$message .= \sprintf(' Available criteria: [%s]', implode(', ', $availableCriteria));
|
||||
}
|
||||
|
||||
return new self($message);
|
||||
|
||||
@@ -11,10 +11,10 @@ final class FactoryNotFoundException extends \Exception
|
||||
*/
|
||||
public static function create(string $alias, array $availableFactories = []): self
|
||||
{
|
||||
$message = sprintf('Factory "%s" not found, did you forget to register it?', $alias);
|
||||
$message = \sprintf('Factory "%s" not found, did you forget to register it?', $alias);
|
||||
|
||||
if ([] !== $availableFactories) {
|
||||
$message .= sprintf(' Available factories: [%s]', implode(', ', $availableFactories));
|
||||
$message .= \sprintf(' Available factories: [%s]', implode(', ', $availableFactories));
|
||||
}
|
||||
|
||||
return new self($message);
|
||||
|
||||
@@ -11,10 +11,10 @@ final class PresenterNotFoundException extends \Exception
|
||||
*/
|
||||
public static function create(string $alias, array $availablePresenters = []): self
|
||||
{
|
||||
$message = sprintf('Presenter "%s" not found, did you forget to register it?', $alias);
|
||||
$message = \sprintf('Presenter "%s" not found, did you forget to register it?', $alias);
|
||||
|
||||
if ([] !== $availablePresenters) {
|
||||
$message .= sprintf(' Available presenters: [%s]', implode(', ', $availablePresenters));
|
||||
$message .= \sprintf(' Available presenters: [%s]', implode(', ', $availablePresenters));
|
||||
}
|
||||
|
||||
return new self($message);
|
||||
|
||||
@@ -12,10 +12,10 @@ final class PresetNotFoundException extends \Exception
|
||||
*/
|
||||
public static function create(string $preset, array $availablePresets = []): self
|
||||
{
|
||||
$message = sprintf('Preset "%s" not found, did you forget to register it?', $preset);
|
||||
$message = \sprintf('Preset "%s" not found, did you forget to register it?', $preset);
|
||||
|
||||
if ([] !== $availablePresets) {
|
||||
$message .= sprintf(' Available presets: "%s"', implode('", "', $availablePresets));
|
||||
$message .= \sprintf(' Available presets: "%s"', implode('", "', $availablePresets));
|
||||
}
|
||||
|
||||
return new self($message);
|
||||
|
||||
@@ -136,7 +136,7 @@ final class ContentSecurityPolicyHandler implements ContentSecurityPolicyHandler
|
||||
if (!\in_array('\'unsafe-inline\'', $headers[$header][$type], true)) {
|
||||
$headers[$header][$type][] = '\'unsafe-inline\'';
|
||||
}
|
||||
$headers[$header][$type][] = sprintf('\'nonce-%s\'', $nonces[$tokenName]);
|
||||
$headers[$header][$type][] = \sprintf('\'nonce-%s\'', $nonces[$tokenName]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ final class ContentSecurityPolicyHandler implements ContentSecurityPolicyHandler
|
||||
*/
|
||||
private function generateCspHeader(array $directives): string
|
||||
{
|
||||
return array_reduce(array_keys($directives), fn ($res, $name) => ('' !== $res ? $res.'; ' : '').sprintf('%s %s', $name, implode(' ', $directives[$name])), '');
|
||||
return array_reduce(array_keys($directives), fn ($res, $name) => ('' !== $res ? $res.'; ' : '').\sprintf('%s %s', $name, implode(' ', $directives[$name])), '');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -55,7 +55,7 @@ final readonly class ResponseExtension implements ResponseExtensionInterface
|
||||
}
|
||||
|
||||
if ($alreadyRendered) {
|
||||
$htmlResponse = sprintf('options.push(%s);', $htmlResponse);
|
||||
$htmlResponse = \sprintf('options.push(%s);', $htmlResponse);
|
||||
}
|
||||
|
||||
// $htmlResponse = "\n".str_replace("\n", '', (string) $htmlResponse)."\n";
|
||||
|
||||
@@ -160,7 +160,7 @@ trait NotificationBuilderMethods
|
||||
if (!\is_bool($condition)) {
|
||||
$type = \gettype($condition);
|
||||
|
||||
throw new \InvalidArgumentException(sprintf('The condition must be a boolean or a closure that returns a boolean. Got: %s', $type));
|
||||
throw new \InvalidArgumentException(\sprintf('The condition must be a boolean or a closure that returns a boolean. Got: %s', $type));
|
||||
}
|
||||
|
||||
return $condition;
|
||||
|
||||
@@ -69,7 +69,10 @@ final class FlasherPlugin extends Plugin
|
||||
return '/vendor/flasher/flasher.min.js';
|
||||
}
|
||||
|
||||
public function getScripts(): string|array
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getScripts(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
@@ -97,7 +100,11 @@ final class FlasherPlugin extends Plugin
|
||||
* scripts: string[],
|
||||
* styles: string[],
|
||||
* options: array<string, mixed>,
|
||||
* plugins?: array<string, array<string, mixed>>,
|
||||
* plugins?: array<string, array{
|
||||
* scripts?: string[],
|
||||
* styles?: string[],
|
||||
* options?: array<string, mixed>,
|
||||
* }>,
|
||||
* } $config
|
||||
*
|
||||
* @return array{
|
||||
@@ -267,11 +274,7 @@ final class FlasherPlugin extends Plugin
|
||||
return $config;
|
||||
}
|
||||
|
||||
foreach ($config['flash_bag'] as $key => $value) {
|
||||
$config['flash_bag'][$key] = array_values(array_unique(array_merge($mapping[$key] ?? [], (array) $value)));
|
||||
}
|
||||
|
||||
$config['flash_bag'] += $mapping;
|
||||
$config['flash_bag'] += array_merge($mapping, $config['flash_bag']);
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
<div align="center">
|
||||
<a href="https://github.com/php-flasher/php-flasher/blob/2.x/docs/palestine.md">
|
||||
<img src="https://raw.githubusercontent.com/php-flasher/art/main/palestine-banner-support.svg" width="800px" alt="Help Palestine"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github-dark.png">
|
||||
|
||||
@@ -7,7 +7,7 @@ import { AbstractPlugin } from './plugin'
|
||||
export default class FlasherPlugin extends AbstractPlugin {
|
||||
private theme: Theme
|
||||
private options = {
|
||||
timeout: 5000,
|
||||
timeout: null,
|
||||
timeouts: {
|
||||
success: 5000,
|
||||
info: 5000,
|
||||
@@ -19,6 +19,7 @@ export default class FlasherPlugin extends AbstractPlugin {
|
||||
direction: 'top',
|
||||
rtl: false,
|
||||
style: {} as Properties,
|
||||
escapeHtml: false,
|
||||
}
|
||||
|
||||
constructor(theme: Theme) {
|
||||
@@ -31,11 +32,12 @@ export default class FlasherPlugin extends AbstractPlugin {
|
||||
const render = () =>
|
||||
envelopes.forEach((envelope) => {
|
||||
// @ts-expect-error
|
||||
const typeTimeout = this.options.timeouts[envelope.type] ?? this.options.timeout
|
||||
const typeTimeout = this.options.timeout ?? this.options.timeouts[envelope.type] ?? 5000
|
||||
const options = {
|
||||
...this.options,
|
||||
...envelope.options,
|
||||
timeout: envelope.options.timeout ?? typeTimeout,
|
||||
escapeHtml: (envelope.options.escapeHtml ?? this.options.escapeHtml) as boolean,
|
||||
}
|
||||
|
||||
this.addToContainer(this.createContainer(options), envelope, options)
|
||||
@@ -64,7 +66,12 @@ export default class FlasherPlugin extends AbstractPlugin {
|
||||
return container
|
||||
}
|
||||
|
||||
private addToContainer(container: HTMLDivElement, envelope: Envelope, options: { direction: string, timeout: number, fps: number, rtl: boolean }): void {
|
||||
private addToContainer(container: HTMLDivElement, envelope: Envelope, options: { direction: string, timeout: number, fps: number, rtl: boolean, escapeHtml: boolean }): void {
|
||||
if (options.escapeHtml) {
|
||||
envelope.title = this.escapeHtml(envelope.title)
|
||||
envelope.message = this.escapeHtml(envelope.message)
|
||||
}
|
||||
|
||||
const notification = this.stringToHTML(this.theme.render(envelope))
|
||||
|
||||
notification.classList.add(...`fl-container${options.rtl ? ' fl-rtl' : ''}`.split(' '))
|
||||
@@ -126,4 +133,23 @@ export default class FlasherPlugin extends AbstractPlugin {
|
||||
template.innerHTML = str.trim()
|
||||
return template.content.firstElementChild as HTMLElement
|
||||
}
|
||||
|
||||
private escapeHtml(str: string | null | undefined): string {
|
||||
if (str == null) {
|
||||
return ''
|
||||
}
|
||||
|
||||
return str.replace(/[&<>"'`=\/]/g, (char) => {
|
||||
return {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
'\'': ''',
|
||||
'`': '`',
|
||||
'=': '=',
|
||||
'/': '/',
|
||||
}[char] as string
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@use "sass:color";
|
||||
|
||||
body.fl-dark .fl-flasher,
|
||||
html.fl-dark .fl-flasher {
|
||||
--background-color: var(--dark-background-color);
|
||||
@@ -13,7 +15,6 @@ html.fl-dark .fl-flasher {
|
||||
margin: 0.75em 0;
|
||||
position: relative;
|
||||
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
||||
border: 1px solid rgba(0, 0, 0, 0.03);
|
||||
border-bottom: none;
|
||||
|
||||
&.fl-rtl {
|
||||
@@ -69,7 +70,7 @@ html.fl-dark .fl-flasher {
|
||||
transition: color 0.3s ease, transform 0.3s ease;
|
||||
|
||||
&:hover {
|
||||
color: darken(#a8aaab, 10%);
|
||||
color: color.adjust(#a8aaab, $lightness: -10%);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,4 +15,5 @@ export default class FlasherPlugin extends AbstractPlugin {
|
||||
}): void;
|
||||
private removeNotification;
|
||||
private stringToHTML;
|
||||
private escapeHtml;
|
||||
}
|
||||
|
||||
+26
-4
@@ -80,7 +80,7 @@ class FlasherPlugin extends AbstractPlugin {
|
||||
constructor(theme) {
|
||||
super();
|
||||
this.options = {
|
||||
timeout: 5000,
|
||||
timeout: null,
|
||||
timeouts: {
|
||||
success: 5000,
|
||||
info: 5000,
|
||||
@@ -92,14 +92,15 @@ class FlasherPlugin extends AbstractPlugin {
|
||||
direction: 'top',
|
||||
rtl: false,
|
||||
style: {},
|
||||
escapeHtml: false,
|
||||
};
|
||||
this.theme = theme;
|
||||
}
|
||||
renderEnvelopes(envelopes) {
|
||||
const render = () => envelopes.forEach((envelope) => {
|
||||
var _a, _b;
|
||||
const typeTimeout = (_a = this.options.timeouts[envelope.type]) !== null && _a !== void 0 ? _a : this.options.timeout;
|
||||
const options = Object.assign(Object.assign(Object.assign({}, this.options), envelope.options), { timeout: (_b = envelope.options.timeout) !== null && _b !== void 0 ? _b : typeTimeout });
|
||||
var _a, _b, _c, _d;
|
||||
const typeTimeout = (_b = (_a = this.options.timeout) !== null && _a !== void 0 ? _a : this.options.timeouts[envelope.type]) !== null && _b !== void 0 ? _b : 5000;
|
||||
const options = Object.assign(Object.assign(Object.assign({}, this.options), envelope.options), { timeout: (_c = envelope.options.timeout) !== null && _c !== void 0 ? _c : typeTimeout, escapeHtml: ((_d = envelope.options.escapeHtml) !== null && _d !== void 0 ? _d : this.options.escapeHtml) });
|
||||
this.addToContainer(this.createContainer(options), envelope, options);
|
||||
});
|
||||
document.readyState === 'loading' ? document.addEventListener('DOMContentLoaded', render) : render();
|
||||
@@ -121,6 +122,10 @@ class FlasherPlugin extends AbstractPlugin {
|
||||
}
|
||||
addToContainer(container, envelope, options) {
|
||||
var _a;
|
||||
if (options.escapeHtml) {
|
||||
envelope.title = this.escapeHtml(envelope.title);
|
||||
envelope.message = this.escapeHtml(envelope.message);
|
||||
}
|
||||
const notification = this.stringToHTML(this.theme.render(envelope));
|
||||
notification.classList.add(...`fl-container${options.rtl ? ' fl-rtl' : ''}`.split(' '));
|
||||
options.direction === 'bottom' ? container.append(notification) : container.prepend(notification);
|
||||
@@ -170,6 +175,23 @@ class FlasherPlugin extends AbstractPlugin {
|
||||
template.innerHTML = str.trim();
|
||||
return template.content.firstElementChild;
|
||||
}
|
||||
escapeHtml(str) {
|
||||
if (str == null) {
|
||||
return '';
|
||||
}
|
||||
return str.replace(/[&<>"'`=\/]/g, (char) => {
|
||||
return {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
'\'': ''',
|
||||
'`': '`',
|
||||
'=': '=',
|
||||
'/': '/',
|
||||
}[char];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
class Flasher extends AbstractPlugin {
|
||||
|
||||
Vendored
+26
-4
@@ -86,7 +86,7 @@
|
||||
constructor(theme) {
|
||||
super();
|
||||
this.options = {
|
||||
timeout: 5000,
|
||||
timeout: null,
|
||||
timeouts: {
|
||||
success: 5000,
|
||||
info: 5000,
|
||||
@@ -98,14 +98,15 @@
|
||||
direction: 'top',
|
||||
rtl: false,
|
||||
style: {},
|
||||
escapeHtml: false,
|
||||
};
|
||||
this.theme = theme;
|
||||
}
|
||||
renderEnvelopes(envelopes) {
|
||||
const render = () => envelopes.forEach((envelope) => {
|
||||
var _a, _b;
|
||||
const typeTimeout = (_a = this.options.timeouts[envelope.type]) !== null && _a !== void 0 ? _a : this.options.timeout;
|
||||
const options = Object.assign(Object.assign(Object.assign({}, this.options), envelope.options), { timeout: (_b = envelope.options.timeout) !== null && _b !== void 0 ? _b : typeTimeout });
|
||||
var _a, _b, _c, _d;
|
||||
const typeTimeout = (_b = (_a = this.options.timeout) !== null && _a !== void 0 ? _a : this.options.timeouts[envelope.type]) !== null && _b !== void 0 ? _b : 5000;
|
||||
const options = Object.assign(Object.assign(Object.assign({}, this.options), envelope.options), { timeout: (_c = envelope.options.timeout) !== null && _c !== void 0 ? _c : typeTimeout, escapeHtml: ((_d = envelope.options.escapeHtml) !== null && _d !== void 0 ? _d : this.options.escapeHtml) });
|
||||
this.addToContainer(this.createContainer(options), envelope, options);
|
||||
});
|
||||
document.readyState === 'loading' ? document.addEventListener('DOMContentLoaded', render) : render();
|
||||
@@ -127,6 +128,10 @@
|
||||
}
|
||||
addToContainer(container, envelope, options) {
|
||||
var _a;
|
||||
if (options.escapeHtml) {
|
||||
envelope.title = this.escapeHtml(envelope.title);
|
||||
envelope.message = this.escapeHtml(envelope.message);
|
||||
}
|
||||
const notification = this.stringToHTML(this.theme.render(envelope));
|
||||
notification.classList.add(...`fl-container${options.rtl ? ' fl-rtl' : ''}`.split(' '));
|
||||
options.direction === 'bottom' ? container.append(notification) : container.prepend(notification);
|
||||
@@ -176,6 +181,23 @@
|
||||
template.innerHTML = str.trim();
|
||||
return template.content.firstElementChild;
|
||||
}
|
||||
escapeHtml(str) {
|
||||
if (str == null) {
|
||||
return '';
|
||||
}
|
||||
return str.replace(/[&<>"'`=\/]/g, (char) => {
|
||||
return {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
'\'': ''',
|
||||
'`': '`',
|
||||
'=': '=',
|
||||
'/': '/',
|
||||
}[char];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
class Flasher extends AbstractPlugin {
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user