Update Livewire

This commit is contained in:
Marcus Moore 2024-06-18 15:10:59 -07:00
parent f0a11be0b8
commit 30dd8bcf2b
No known key found for this signature in database
6 changed files with 38 additions and 20 deletions

View file

@ -49,7 +49,7 @@
"laravelcollective/html": "^6.2",
"league/csv": "^9.7",
"league/flysystem-aws-s3-v3": "^3.0",
"livewire/livewire": "^3.0",
"livewire/livewire": "^3.5",
"neitanod/forceutf8": "^2.0",
"nesbot/carbon": "^2.32",
"nunomaduro/collision": "^6.1",

View file

@ -1594,7 +1594,7 @@ var require_module_cjs = __commonJS({
const target = objects.find((obj) => Object.prototype.hasOwnProperty.call(obj, name)) || objects[objects.length - 1];
const descriptor = Object.getOwnPropertyDescriptor(target, name);
if ((descriptor == null ? void 0 : descriptor.set) && (descriptor == null ? void 0 : descriptor.get))
return Reflect.set(target, name, value, thisProxy);
return descriptor.set.call(thisProxy, value) || true;
return Reflect.set(target, name, value);
}
};
@ -2861,7 +2861,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
get raw() {
return raw;
},
version: "3.14.0",
version: "3.14.1",
flushAndStopDeferringMutations,
dontAutoEvaluateFunctions,
disableEffectScheduling,
@ -7539,7 +7539,9 @@ var UploadManager = class {
unsetUploadLoading(this.component);
let uploadItem = this.uploadBag.first(name);
if (uploadItem) {
uploadItem.request.abort();
if (uploadItem.request) {
uploadItem.request.abort();
}
this.uploadBag.shift(name).cancelledCallback();
if (cancelledCallback)
cancelledCallback();
@ -8309,6 +8311,9 @@ var Component = class {
if (this.originalEffects.url) {
effects.url = this.originalEffects.url;
}
if (this.originalEffects.scripts) {
effects.scripts = this.originalEffects.scripts;
}
el.setAttribute("wire:effects", JSON.stringify(effects));
}
addCleanup(cleanup) {
@ -9271,13 +9276,15 @@ function history2(Alpine19) {
});
Alpine19.history = { track };
}
function track(name, initialSeedValue, alwaysShow = false) {
function track(name, initialSeedValue, alwaysShow = false, except = null) {
let { has, get, set, remove } = queryStringUtils();
let url = new URL(window.location.href);
let isInitiallyPresentInUrl = has(url, name);
let initialValue = isInitiallyPresentInUrl ? get(url, name) : initialSeedValue;
let initialValueMemo = JSON.stringify(initialValue);
let exceptValueMemo = [false, null, void 0].includes(except) ? initialSeedValue : JSON.stringify(except);
let hasReturnedToInitialValue = (newValue) => JSON.stringify(newValue) === initialValueMemo;
let hasReturnedToExceptValue = (newValue) => JSON.stringify(newValue) === exceptValueMemo;
if (alwaysShow)
url = set(url, name, initialValue);
replace(url, name, { value: initialValue });
@ -9290,6 +9297,8 @@ function track(name, initialSeedValue, alwaysShow = false) {
url2 = remove(url2, name);
} else if (newValue === void 0) {
url2 = remove(url2, name);
} else if (!alwaysShow && hasReturnedToExceptValue(newValue)) {
url2 = remove(url2, name);
} else {
url2 = set(url2, name, newValue);
}
@ -9950,7 +9959,7 @@ on("effect", ({ component, effects, cleanup }) => {
if (!as)
as = name;
let initialValue = [false, null, void 0].includes(except) ? dataGet(component.ephemeral, name) : except;
let { replace: replace2, push: push2, pop } = track(as, initialValue, alwaysShow);
let { replace: replace2, push: push2, pop } = track(as, initialValue, alwaysShow, except);
if (use === "replace") {
let effectReference = import_alpinejs10.default.effect(() => {
replace2(dataGet(component.reactive, name));

View file

@ -635,7 +635,9 @@
unsetUploadLoading(this.component);
let uploadItem = this.uploadBag.first(name);
if (uploadItem) {
uploadItem.request.abort();
if (uploadItem.request) {
uploadItem.request.abort();
}
this.uploadBag.shift(name).cancelledCallback();
if (cancelledCallback)
cancelledCallback();
@ -1011,7 +1013,7 @@
const target = objects.find((obj) => Object.prototype.hasOwnProperty.call(obj, name)) || objects[objects.length - 1];
const descriptor = Object.getOwnPropertyDescriptor(target, name);
if (descriptor?.set && descriptor?.get)
return Reflect.set(target, name, value, thisProxy);
return descriptor.set.call(thisProxy, value) || true;
return Reflect.set(target, name, value);
}
};
@ -2278,7 +2280,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
get raw() {
return raw;
},
version: "3.14.0",
version: "3.14.1",
flushAndStopDeferringMutations,
dontAutoEvaluateFunctions,
disableEffectScheduling,
@ -4567,6 +4569,9 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
if (this.originalEffects.url) {
effects.url = this.originalEffects.url;
}
if (this.originalEffects.scripts) {
effects.scripts = this.originalEffects.scripts;
}
el.setAttribute("wire:effects", JSON.stringify(effects));
}
addCleanup(cleanup2) {
@ -7914,13 +7919,15 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
});
Alpine3.history = { track: track2 };
}
function track2(name, initialSeedValue, alwaysShow = false) {
function track2(name, initialSeedValue, alwaysShow = false, except = null) {
let { has: has2, get: get3, set: set3, remove } = queryStringUtils();
let url = new URL(window.location.href);
let isInitiallyPresentInUrl = has2(url, name);
let initialValue = isInitiallyPresentInUrl ? get3(url, name) : initialSeedValue;
let initialValueMemo = JSON.stringify(initialValue);
let exceptValueMemo = [false, null, void 0].includes(except) ? initialSeedValue : JSON.stringify(except);
let hasReturnedToInitialValue = (newValue) => JSON.stringify(newValue) === initialValueMemo;
let hasReturnedToExceptValue = (newValue) => JSON.stringify(newValue) === exceptValueMemo;
if (alwaysShow)
url = set3(url, name, initialValue);
replace(url, name, { value: initialValue });
@ -7933,6 +7940,8 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
url2 = remove(url2, name);
} else if (newValue === void 0) {
url2 = remove(url2, name);
} else if (!alwaysShow && hasReturnedToExceptValue(newValue)) {
url2 = remove(url2, name);
} else {
url2 = set3(url2, name, newValue);
}
@ -9082,7 +9091,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
if (!as)
as = name;
let initialValue = [false, null, void 0].includes(except) ? dataGet(component.ephemeral, name) : except;
let { replace: replace2, push: push2, pop } = track2(as, initialValue, alwaysShow);
let { replace: replace2, push: push2, pop } = track2(as, initialValue, alwaysShow, except);
if (use === "replace") {
let effectReference = module_default.effect(() => {
replace2(dataGet(component.reactive, name));

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
{"/livewire.js":"07f22875"}
{"/livewire.js":"87e1046f"}