// console.log(methods)
if (! blacklistedComponent) {
return false
}
if (! blacklistedComponent.methods) {
return true;
}
return ! ! blacklistedComponent.methods.filter(item => methods.includes(item)).length
},
composeStackName: function(component, methods) {
return component + ‘-‘ + methods.join(‘-‘)
},
getMethodsTriggered: function(message) {
// console.log(message)
return message.updateQueue.map(item => {
// We catch methods, params (for wire model separated with -), prop names, events
const method = item.method === ‘$set’ ? ‘$set-‘ + item? .payload? .params[0] : item.method
return method || item.name || item.payload.event
})
}
}"
x-show.transition="loading || forceLoading"
x-cloak
@force-loading.window="forceLoading = $event.detail.loading; loading = ! $event.detail.loading ? false : loading;"
x-init="
Livewire.hook(‘message.sent’, (message, component) => {
const componentName = component.fingerprint.name
const methodsTriggered = getMethodsTriggered(message)
if (isOnBlacklist(componentName, methodsTriggered)) {
return
}
loadingStack.push(composeStackName(componentName, methodsTriggered))
loading = true
} );
Livewire.hook(‘message.processed’, (message, component) => {
const componentName = component.fingerprint.name
const methodsTriggered = getMethodsTriggered(message)
if (isOnBlacklist(componentName, methodsTriggered)) {
return
}
loadingStack = loadingStack.filter(item => item ! == composeStackName(componentName, methodsTriggered))
if (! loadingStack.length) {
loading = false
}
});
bodymovin.loadAnimation({
container: $refs.bodymovin,
renderer: ‘svg’,
loop: true,
autoplay: true,
path: ‘https://www.balluff.com/json/spinner.json’
});
"
wire:ignore="wire:ignore"
>