Laravel 11.35.0 Shift (#1906)

Co-authored-by: Shift <shift@laravelshift.com>
This commit is contained in:
Alex Justesen
2024-12-11 18:34:33 -05:00
committed by GitHub
parent c33e49c862
commit d706d4685c
9 changed files with 484 additions and 422 deletions
+8 -8
View File
@@ -18,17 +18,17 @@
"awcodes/filament-versions": "^2.0.1",
"chrisullyott/php-filesize": "^4.2.1",
"dragonmantank/cron-expression": "^3.4.0",
"filament/filament": "^3.2.125",
"filament/spatie-laravel-settings-plugin": "^3.2.125",
"filament/filament": "^3.2.130",
"filament/spatie-laravel-settings-plugin": "^3.2.130",
"geerlingguy/ping": "^1.2.1",
"guzzlehttp/guzzle": "^7.9.2",
"influxdata/influxdb-client-php": "^3.6",
"laravel-notification-channels/telegram": "^5.0",
"laravel/framework": "^11.34.2",
"laravel/framework": "^11.35",
"laravel/prompts": "^0.3.2",
"laravel/sanctum": "^4.0.5",
"laravel/sanctum": "^4.0.6",
"laravel/tinker": "^2.10.0",
"livewire/livewire": "^3.5.12",
"livewire/livewire": "^3.5.17",
"lorisleiva/laravel-actions": "^2.8.4",
"maennchen/zipstream-php": "^2.4",
"spatie/laravel-settings": "^3.4",
@@ -42,9 +42,9 @@
"laravel/telescope": "^5.2.6",
"mockery/mockery": "^1.6.12",
"nunomaduro/collision": "^8.5.0",
"phpunit/phpunit": "^11.4.4",
"spatie/laravel-ignition": "^2.8.0",
"tightenco/duster": "^3.0.3"
"phpunit/phpunit": "^11.5.1",
"spatie/laravel-ignition": "^2.9.0",
"tightenco/duster": "^3.1.0"
},
"autoload": {
"files": [
Generated
+396 -340
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
(()=>{})();
(()=>{function o(){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,t=null){this.$wire.set("selectedTableRecords",this.selectedRecords,!1),this.$wire.mountTableAction(e,t)},mountBulkAction:function(e){this.$wire.set("selectedTableRecords",this.selectedRecords,!1),this.$wire.mountTableBulkAction(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 r=s.indexOf(this.lastChecked),n=s.indexOf(t),l=[r,n].sort((i,d)=>i-d),c=[];for(let i=l[0];i<=l[1];i++)s[i].checked=t.checked,c.push(s[i].value);t.checked?this.selectRecords(c):this.deselectRecords(c)}this.lastChecked=t}}}document.addEventListener("alpine:init",()=>{window.Alpine.data("tableComponent",o)});})();