mirror of
https://github.com/pelican-dev/panel.git
synced 2025-07-04 11:41:09 +02:00
upgrade to alpha6
This commit is contained in:
parent
c2364a845b
commit
ede9942dda
@ -13,7 +13,7 @@
|
||||
"chillerlan/php-qrcode": "^5.0.2",
|
||||
"dedoc/scramble": "^0.12.10",
|
||||
"doctrine/dbal": "~3.6.0",
|
||||
"filament/filament": "4.x-dev",
|
||||
"filament/filament": "v4.0.0-alpha6",
|
||||
"guzzlehttp/guzzle": "^7.9",
|
||||
"laravel/framework": "^12.10",
|
||||
"laravel/helpers": "^1.7",
|
||||
|
178
composer.lock
generated
178
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "4477560e0671cd2b797d2f1b9316afde",
|
||||
"content-hash": "59afebde219640d8bb14c7877054b649",
|
||||
"packages": [
|
||||
{
|
||||
"name": "amphp/amp",
|
||||
@ -2470,16 +2470,16 @@
|
||||
},
|
||||
{
|
||||
"name": "filament/actions",
|
||||
"version": "4.x-dev",
|
||||
"version": "v4.0.0-alpha6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/actions.git",
|
||||
"reference": "893609eee9d2a015cfc6e34a3f03ea6523f3afdc"
|
||||
"reference": "79c615ca12bd34b898adfef625fec5ec7af18ea6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/actions/zipball/893609eee9d2a015cfc6e34a3f03ea6523f3afdc",
|
||||
"reference": "893609eee9d2a015cfc6e34a3f03ea6523f3afdc",
|
||||
"url": "https://api.github.com/repos/filamentphp/actions/zipball/79c615ca12bd34b898adfef625fec5ec7af18ea6",
|
||||
"reference": "79c615ca12bd34b898adfef625fec5ec7af18ea6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2515,20 +2515,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2025-04-28T10:09:48+00:00"
|
||||
"time": "2025-05-07T15:28:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/filament",
|
||||
"version": "4.x-dev",
|
||||
"version": "v4.0.0-alpha6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/panels.git",
|
||||
"reference": "202a4273ffd2e6d89b15bddfd5ff7132668f426f"
|
||||
"reference": "476dcdab79b1bfed6107cf62faad9bcd7e2e718d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/panels/zipball/202a4273ffd2e6d89b15bddfd5ff7132668f426f",
|
||||
"reference": "202a4273ffd2e6d89b15bddfd5ff7132668f426f",
|
||||
"url": "https://api.github.com/repos/filamentphp/panels/zipball/476dcdab79b1bfed6107cf62faad9bcd7e2e718d",
|
||||
"reference": "476dcdab79b1bfed6107cf62faad9bcd7e2e718d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2572,20 +2572,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2025-04-29T19:20:26+00:00"
|
||||
"time": "2025-05-07T15:28:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/forms",
|
||||
"version": "4.x-dev",
|
||||
"version": "v4.0.0-alpha6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/forms.git",
|
||||
"reference": "cdaf42aa1dd1288b88009d34e135f61a0e7370c9"
|
||||
"reference": "1428a3e48ba636bc4494fc87158c281e305a5bf6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/forms/zipball/cdaf42aa1dd1288b88009d34e135f61a0e7370c9",
|
||||
"reference": "cdaf42aa1dd1288b88009d34e135f61a0e7370c9",
|
||||
"url": "https://api.github.com/repos/filamentphp/forms/zipball/1428a3e48ba636bc4494fc87158c281e305a5bf6",
|
||||
"reference": "1428a3e48ba636bc4494fc87158c281e305a5bf6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2622,26 +2622,27 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2025-04-29T19:20:25+00:00"
|
||||
"time": "2025-05-07T15:28:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/infolists",
|
||||
"version": "4.x-dev",
|
||||
"version": "v4.0.0-alpha6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/infolists.git",
|
||||
"reference": "ccb5e4f64a8d45846cc0289fd6d617aaa2c709c7"
|
||||
"reference": "a4c4e455aa05a50f967f3960c08dbfed1572ad4a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/infolists/zipball/ccb5e4f64a8d45846cc0289fd6d617aaa2c709c7",
|
||||
"reference": "ccb5e4f64a8d45846cc0289fd6d617aaa2c709c7",
|
||||
"url": "https://api.github.com/repos/filamentphp/infolists/zipball/a4c4e455aa05a50f967f3960c08dbfed1572ad4a",
|
||||
"reference": "a4c4e455aa05a50f967f3960c08dbfed1572ad4a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"filament/actions": "self.version",
|
||||
"filament/schemas": "self.version",
|
||||
"filament/support": "self.version",
|
||||
"phiki/phiki": "^1.1",
|
||||
"php": "^8.2"
|
||||
},
|
||||
"type": "library",
|
||||
@ -2667,11 +2668,11 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2025-04-28T10:09:47+00:00"
|
||||
"time": "2025-05-07T15:28:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/notifications",
|
||||
"version": "4.x-dev",
|
||||
"version": "v4.0.0-alpha6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/notifications.git",
|
||||
@ -2718,16 +2719,16 @@
|
||||
},
|
||||
{
|
||||
"name": "filament/schemas",
|
||||
"version": "4.x-dev",
|
||||
"version": "v4.0.0-alpha6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/schemas.git",
|
||||
"reference": "8109264f6e126f6f34d0e4136f1632ec086715cd"
|
||||
"reference": "09e80c36b370819e791a68ece60fc205cba7bdb1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/schemas/zipball/8109264f6e126f6f34d0e4136f1632ec086715cd",
|
||||
"reference": "8109264f6e126f6f34d0e4136f1632ec086715cd",
|
||||
"url": "https://api.github.com/repos/filamentphp/schemas/zipball/09e80c36b370819e791a68ece60fc205cba7bdb1",
|
||||
"reference": "09e80c36b370819e791a68ece60fc205cba7bdb1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2736,7 +2737,6 @@
|
||||
"filament/support": "self.version",
|
||||
"php": "^8.2"
|
||||
},
|
||||
"default-branch": true,
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
@ -2760,27 +2760,26 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2025-04-28T10:09:27+00:00"
|
||||
"time": "2025-05-07T15:28:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/support",
|
||||
"version": "4.x-dev",
|
||||
"version": "v4.0.0-alpha6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/support.git",
|
||||
"reference": "e8576fda6c00cd8f9946db0f10eba06ae24a1d6a"
|
||||
"reference": "f938b08ab6e8ffe30e8d2d478523e341debaa288"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/support/zipball/e8576fda6c00cd8f9946db0f10eba06ae24a1d6a",
|
||||
"reference": "e8576fda6c00cd8f9946db0f10eba06ae24a1d6a",
|
||||
"url": "https://api.github.com/repos/filamentphp/support/zipball/f938b08ab6e8ffe30e8d2d478523e341debaa288",
|
||||
"reference": "f938b08ab6e8ffe30e8d2d478523e341debaa288",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"blade-ui-kit/blade-heroicons": "^2.5",
|
||||
"danharrin/livewire-rate-limiting": "^2.0",
|
||||
"ext-intl": "*",
|
||||
"illuminate/contracts": "^11.15|^12.0",
|
||||
"illuminate/contracts": "^11.28|^12.0",
|
||||
"kirschbaum-development/eloquent-power-joins": "^4.0",
|
||||
"league/uri-components": "^7.0",
|
||||
"livewire/livewire": "^3.5",
|
||||
@ -2818,20 +2817,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2025-04-29T19:20:30+00:00"
|
||||
"time": "2025-05-07T15:28:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/tables",
|
||||
"version": "4.x-dev",
|
||||
"version": "v4.0.0-alpha6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/tables.git",
|
||||
"reference": "b7bc79135750b355e1accf4c96ed8ebe82a34c37"
|
||||
"reference": "f9abb53a3b16743edf1e4020804f25a5e4b5f14b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/tables/zipball/b7bc79135750b355e1accf4c96ed8ebe82a34c37",
|
||||
"reference": "b7bc79135750b355e1accf4c96ed8ebe82a34c37",
|
||||
"url": "https://api.github.com/repos/filamentphp/tables/zipball/f9abb53a3b16743edf1e4020804f25a5e4b5f14b",
|
||||
"reference": "f9abb53a3b16743edf1e4020804f25a5e4b5f14b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2863,11 +2862,11 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2025-04-29T19:20:36+00:00"
|
||||
"time": "2025-05-07T15:28:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/widgets",
|
||||
"version": "4.x-dev",
|
||||
"version": "v4.0.0-alpha6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/widgets.git",
|
||||
@ -3639,16 +3638,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v12.12.0",
|
||||
"version": "v12.13.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "8f6cd73696068c28f30f5964556ec9d14e5d90d7"
|
||||
"reference": "52b588bcd8efc6d01bc1493d2d67848f8065f269"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/8f6cd73696068c28f30f5964556ec9d14e5d90d7",
|
||||
"reference": "8f6cd73696068c28f30f5964556ec9d14e5d90d7",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/52b588bcd8efc6d01bc1493d2d67848f8065f269",
|
||||
"reference": "52b588bcd8efc6d01bc1493d2d67848f8065f269",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -3669,7 +3668,7 @@
|
||||
"guzzlehttp/uri-template": "^1.0",
|
||||
"laravel/prompts": "^0.3.0",
|
||||
"laravel/serializable-closure": "^1.3|^2.0",
|
||||
"league/commonmark": "^2.6",
|
||||
"league/commonmark": "^2.7",
|
||||
"league/flysystem": "^3.25.1",
|
||||
"league/flysystem-local": "^3.25.1",
|
||||
"league/uri": "^7.5.1",
|
||||
@ -3761,7 +3760,7 @@
|
||||
"php-http/discovery": "^1.15",
|
||||
"phpstan/phpstan": "^2.0",
|
||||
"phpunit/phpunit": "^10.5.35|^11.5.3|^12.0.1",
|
||||
"predis/predis": "^2.3",
|
||||
"predis/predis": "^2.3|^3.0",
|
||||
"resend/resend-php": "^0.10.0",
|
||||
"symfony/cache": "^7.2.0",
|
||||
"symfony/http-client": "^7.2.0",
|
||||
@ -3793,7 +3792,7 @@
|
||||
"pda/pheanstalk": "Required to use the beanstalk queue driver (^5.0).",
|
||||
"php-http/discovery": "Required to use PSR-7 bridging features (^1.15).",
|
||||
"phpunit/phpunit": "Required to use assertions and run tests (^10.5.35|^11.5.3|^12.0.1).",
|
||||
"predis/predis": "Required to use the predis connector (^2.3).",
|
||||
"predis/predis": "Required to use the predis connector (^2.3|^3.0).",
|
||||
"psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).",
|
||||
"pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).",
|
||||
"resend/resend-php": "Required to enable support for the Resend mail transport (^0.10.0).",
|
||||
@ -3850,7 +3849,7 @@
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2025-05-01T16:13:12+00:00"
|
||||
"time": "2025-05-07T17:29:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/helpers",
|
||||
@ -6160,31 +6159,31 @@
|
||||
},
|
||||
{
|
||||
"name": "nunomaduro/termwind",
|
||||
"version": "v2.3.0",
|
||||
"version": "v2.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nunomaduro/termwind.git",
|
||||
"reference": "52915afe6a1044e8b9cee1bcff836fb63acf9cda"
|
||||
"reference": "dfa08f390e509967a15c22493dc0bac5733d9123"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nunomaduro/termwind/zipball/52915afe6a1044e8b9cee1bcff836fb63acf9cda",
|
||||
"reference": "52915afe6a1044e8b9cee1bcff836fb63acf9cda",
|
||||
"url": "https://api.github.com/repos/nunomaduro/termwind/zipball/dfa08f390e509967a15c22493dc0bac5733d9123",
|
||||
"reference": "dfa08f390e509967a15c22493dc0bac5733d9123",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-mbstring": "*",
|
||||
"php": "^8.2",
|
||||
"symfony/console": "^7.1.8"
|
||||
"symfony/console": "^7.2.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"illuminate/console": "^11.33.2",
|
||||
"laravel/pint": "^1.18.2",
|
||||
"illuminate/console": "^11.44.7",
|
||||
"laravel/pint": "^1.22.0",
|
||||
"mockery/mockery": "^1.6.12",
|
||||
"pestphp/pest": "^2.36.0",
|
||||
"phpstan/phpstan": "^1.12.11",
|
||||
"phpstan/phpstan-strict-rules": "^1.6.1",
|
||||
"symfony/var-dumper": "^7.1.8",
|
||||
"pestphp/pest": "^2.36.0 || ^3.8.2",
|
||||
"phpstan/phpstan": "^1.12.25",
|
||||
"phpstan/phpstan-strict-rules": "^1.6.2",
|
||||
"symfony/var-dumper": "^7.2.6",
|
||||
"thecodingmachine/phpstan-strict-rules": "^1.0.0"
|
||||
},
|
||||
"type": "library",
|
||||
@ -6227,7 +6226,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nunomaduro/termwind/issues",
|
||||
"source": "https://github.com/nunomaduro/termwind/tree/v2.3.0"
|
||||
"source": "https://github.com/nunomaduro/termwind/tree/v2.3.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -6243,7 +6242,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-11-21T10:39:51+00:00"
|
||||
"time": "2025-05-08T08:14:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "openspout/openspout",
|
||||
@ -6455,6 +6454,60 @@
|
||||
},
|
||||
"time": "2020-10-15T08:29:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phiki/phiki",
|
||||
"version": "v1.1.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phikiphp/phiki.git",
|
||||
"reference": "30280485e06201b28532f4e441580c2c969e539e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phikiphp/phiki/zipball/30280485e06201b28532f4e441580c2c969e539e",
|
||||
"reference": "30280485e06201b28532f4e441580c2c969e539e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"league/commonmark": "^2.5.3",
|
||||
"php": "^8.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"illuminate/support": "^11.30",
|
||||
"laravel/pint": "^1.18.1",
|
||||
"pestphp/pest": "^3.5.1",
|
||||
"phpstan/extension-installer": "^1.4.3",
|
||||
"phpstan/phpstan": "^2.0",
|
||||
"symfony/var-dumper": "^7.1.6"
|
||||
},
|
||||
"bin": [
|
||||
"bin/phiki"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Phiki\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ryan Chandler",
|
||||
"email": "support@ryangjchandler.co.uk",
|
||||
"homepage": "https://ryangjchandler.co.uk",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Syntax highlighting using TextMate grammars in PHP.",
|
||||
"support": {
|
||||
"issues": "https://github.com/phikiphp/phiki/issues",
|
||||
"source": "https://github.com/phikiphp/phiki/tree/v1.1.5"
|
||||
},
|
||||
"time": "2025-04-06T23:40:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection",
|
||||
"version": "6.1.0",
|
||||
@ -16134,7 +16187,6 @@
|
||||
"aliases": [],
|
||||
"minimum-stability": "dev",
|
||||
"stability-flags": {
|
||||
"filament/filament": 20,
|
||||
"larastan/larastan": 20
|
||||
},
|
||||
"prefer-stable": true,
|
||||
|
File diff suppressed because one or more lines are too long
24
public/js/filament/forms/components/code-editor.js
Normal file
24
public/js/filament/forms/components/code-editor.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
function n(){return{checkboxClickController:null,collapsedGroups:[],isLoading:!1,selectedRecords:[],shouldCheckUniqueSelection:!0,lastCheckedRecord:null,livewireId:null,init:function(){this.livewireId=this.$root.closest("[wire\\:id]").attributes["wire:id"].value,this.$wire.$on("deselectAllTableRecords",()=>this.deselectAllRecords()),this.$watch("selectedRecords",()=>{if(!this.shouldCheckUniqueSelection){this.shouldCheckUniqueSelection=!0;return}this.selectedRecords=[...new Set(this.selectedRecords)],this.shouldCheckUniqueSelection=!1}),this.$nextTick(()=>this.watchForCheckboxClicks()),Livewire.hook("element.init",({component:e})=>{e.id===this.livewireId&&this.watchForCheckboxClicks()})},mountAction:function(...e){this.$wire.set("selectedTableRecords",this.selectedRecords,!1),this.$wire.mountAction(...e)},toggleSelectRecordsOnPage:function(){let e=this.getRecordsOnPage();if(this.areRecordsSelected(e)){this.deselectRecords(e);return}this.selectRecords(e)},toggleSelectRecordsInGroup:async function(e){if(this.isLoading=!0,this.areRecordsSelected(this.getRecordsInGroupOnPage(e))){this.deselectRecords(await this.$wire.getGroupedSelectableTableRecordKeys(e));return}this.selectRecords(await this.$wire.getGroupedSelectableTableRecordKeys(e)),this.isLoading=!1},getRecordsInGroupOnPage:function(e){let t=[];for(let s of this.$root?.getElementsByClassName("fi-ta-record-checkbox")??[])s.dataset.group===e&&t.push(s.value);return t},getRecordsOnPage:function(){let e=[];for(let t of this.$root?.getElementsByClassName("fi-ta-record-checkbox")??[])e.push(t.value);return e},selectRecords:function(e){for(let t of e)this.isRecordSelected(t)||this.selectedRecords.push(t)},deselectRecords:function(e){for(let t of e){let s=this.selectedRecords.indexOf(t);s!==-1&&this.selectedRecords.splice(s,1)}},selectAllRecords:async function(){this.isLoading=!0,this.selectedRecords=await this.$wire.getAllSelectableTableRecordKeys(),this.isLoading=!1},deselectAllRecords:function(){this.selectedRecords=[]},isRecordSelected:function(e){return this.selectedRecords.includes(e)},areRecordsSelected:function(e){return e.every(t=>this.isRecordSelected(t))},toggleCollapseGroup:function(e){if(this.isGroupCollapsed(e)){this.collapsedGroups.splice(this.collapsedGroups.indexOf(e),1);return}this.collapsedGroups.push(e)},isGroupCollapsed:function(e){return this.collapsedGroups.includes(e)},resetCollapsedGroups:function(){this.collapsedGroups=[]},watchForCheckboxClicks:function(){this.checkboxClickController&&this.checkboxClickController.abort(),this.checkboxClickController=new AbortController;let{signal:e}=this.checkboxClickController;this.$root?.addEventListener("click",t=>t.target?.matches(".fi-ta-record-checkbox")&&this.handleCheckboxClick(t,t.target),{signal:e})},handleCheckboxClick:function(e,t){if(!this.lastChecked){this.lastChecked=t;return}if(e.shiftKey){let s=Array.from(this.$root?.getElementsByClassName("fi-ta-record-checkbox")??[]);if(!s.includes(this.lastChecked)){this.lastChecked=t;return}let l=s.indexOf(this.lastChecked),r=s.indexOf(t),o=[l,r].sort((i,d)=>i-d),c=[];for(let i=o[0];i<=o[1];i++)s[i].checked=t.checked,c.push(s[i].value);t.checked?this.selectRecords(c):this.deselectRecords(c)}this.lastChecked=t}}}export{n as default};
|
||||
function n(){return{checkboxClickController:null,collapsedGroups:[],isLoading:!1,selectedRecords:new Set,deselectedRecords:new Set,isTrackingDeselectedRecords:!1,shouldCheckUniqueSelection:!0,lastCheckedRecord:null,livewireId:null,init:function(){this.livewireId=this.$root.closest("[wire\\:id]").attributes["wire:id"].value,this.$wire.$on("deselectAllTableRecords",()=>this.deselectAllRecords()),this.$watch("selectedRecords",()=>{if(!this.shouldCheckUniqueSelection){this.shouldCheckUniqueSelection=!0;return}this.shouldCheckUniqueSelection=!1}),this.$nextTick(()=>this.watchForCheckboxClicks()),Livewire.hook("element.init",({component:e})=>{e.id===this.livewireId&&this.watchForCheckboxClicks()})},mountAction:function(...e){this.$wire.set("isTrackingDeselectedTableRecords",this.isTrackingDeselectedRecords,!1),this.$wire.set("selectedTableRecords",[...this.selectedRecords],!1),this.$wire.set("deselectedTableRecords",[...this.deselectedRecords],!1),this.$wire.mountAction(...e)},toggleSelectRecordsOnPage:function(){let e=this.getRecordsOnPage();if(this.areRecordsSelected(e)){this.deselectRecords(e);return}this.selectRecords(e)},toggleSelectRecordsInGroup:async function(e){if(this.isLoading=!0,this.areRecordsSelected(this.getRecordsInGroupOnPage(e))){this.deselectRecords(await this.$wire.getGroupedSelectableTableRecordKeys(e));return}this.selectRecords(await this.$wire.getGroupedSelectableTableRecordKeys(e)),this.isLoading=!1},getRecordsInGroupOnPage:function(e){let t=[];for(let s of this.$root?.getElementsByClassName("fi-ta-record-checkbox")??[])s.dataset.group===e&&t.push(s.value);return t},getSelectedRecordsCount:function(){return this.isTrackingDeselectedRecords?(this.$refs.allSelectableRecordsCount?.value??this.deselectedRecords.size)-this.deselectedRecords.size:this.selectedRecords.size},getRecordsOnPage:function(){let e=[];for(let t of this.$root?.getElementsByClassName("fi-ta-record-checkbox")??[])e.push(t.value);return e},selectRecords:function(e){for(let t of e)if(!this.isRecordSelected(t)){if(this.isTrackingDeselectedRecords){this.deselectedRecords.delete(t);continue}this.selectedRecords.add(t)}},deselectRecords:function(e){for(let t of e){if(this.isTrackingDeselectedRecords){this.deselectedRecords.add(t);continue}this.selectedRecords.delete(t)}},toggleSelectedRecord:function(e){if(this.isRecordSelected(e)){this.deselectRecords([e]);return}this.selectRecords([e])},selectAllRecords:async function(){this.isTrackingDeselectedRecords=!0,this.selectedRecords=new Set,this.deselectedRecords=new Set},deselectAllRecords:function(){this.isTrackingDeselectedRecords=!1,this.selectedRecords=new Set,this.deselectedRecords=new Set},isRecordSelected:function(e){return this.isTrackingDeselectedRecords?!this.deselectedRecords.has(e):this.selectedRecords.has(e)},areRecordsSelected:function(e){return e.every(t=>this.isRecordSelected(t))},toggleCollapseGroup:function(e){if(this.isGroupCollapsed(e)){this.collapsedGroups.splice(this.collapsedGroups.indexOf(e),1);return}this.collapsedGroups.push(e)},isGroupCollapsed:function(e){return this.collapsedGroups.includes(e)},resetCollapsedGroups:function(){this.collapsedGroups=[]},watchForCheckboxClicks:function(){this.checkboxClickController&&this.checkboxClickController.abort(),this.checkboxClickController=new AbortController;let{signal:e}=this.checkboxClickController;this.$root?.addEventListener("click",t=>t.target?.matches(".fi-ta-record-checkbox")&&this.handleCheckboxClick(t,t.target),{signal:e})},handleCheckboxClick:function(e,t){if(!this.lastChecked){this.lastChecked=t;return}if(e.shiftKey){let s=Array.from(this.$root?.getElementsByClassName("fi-ta-record-checkbox")??[]);if(!s.includes(this.lastChecked)){this.lastChecked=t;return}let l=s.indexOf(this.lastChecked),r=s.indexOf(t),o=[l,r].sort((c,d)=>c-d),i=[];for(let c=o[0];c<=o[1];c++)s[c].checked=t.checked,i.push(s[c].value);t.checked?this.selectRecords(i):this.deselectRecords(i)}this.lastChecked=t}}}export{n as default};
|
||||
|
Loading…
x
Reference in New Issue
Block a user