phoenix_live_view 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/js/phoenix_live_view/live_socket.js +3 -0
- package/assets/js/phoenix_live_view/view.js +45 -12
- package/assets/js/phoenix_live_view/view_hook.ts +2 -2
- package/assets/js/types/live_socket.d.ts +4 -1
- package/assets/js/types/view.d.ts +8 -2
- package/assets/js/types/view_hook.d.ts +2 -2
- package/package.json +3 -3
- package/priv/static/phoenix_live_view.cjs.js +15 -4
- package/priv/static/phoenix_live_view.cjs.js.map +2 -2
- package/priv/static/phoenix_live_view.esm.js +15 -4
- package/priv/static/phoenix_live_view.esm.js.map +2 -2
- package/priv/static/phoenix_live_view.js +15 -4
- package/priv/static/phoenix_live_view.min.js +6 -6
|
@@ -5588,9 +5588,20 @@ var View = class _View {
|
|
|
5588
5588
|
return dom_default.all(this.el, `form[${phxChange}]`).filter((form) => form.id).filter((form) => form.elements.length > 0).filter(
|
|
5589
5589
|
(form) => form.getAttribute(this.binding(PHX_AUTO_RECOVER)) !== "ignore"
|
|
5590
5590
|
).map((form) => {
|
|
5591
|
-
const clonedForm = form.cloneNode(
|
|
5592
|
-
|
|
5593
|
-
|
|
5591
|
+
const clonedForm = form.cloneNode(true);
|
|
5592
|
+
morphdom_esm_default(clonedForm, form, {
|
|
5593
|
+
onBeforeElUpdated: (fromEl, toEl) => {
|
|
5594
|
+
dom_default.copyPrivates(fromEl, toEl);
|
|
5595
|
+
return true;
|
|
5596
|
+
}
|
|
5597
|
+
});
|
|
5598
|
+
const externalElements = document.querySelectorAll(
|
|
5599
|
+
`[form="${form.id}"]`
|
|
5600
|
+
);
|
|
5601
|
+
Array.from(externalElements).forEach((el) => {
|
|
5602
|
+
if (form.contains(el)) {
|
|
5603
|
+
return;
|
|
5604
|
+
}
|
|
5594
5605
|
const clonedEl = el.cloneNode(true);
|
|
5595
5606
|
morphdom_esm_default(clonedEl, el);
|
|
5596
5607
|
dom_default.copyPrivates(clonedEl, el);
|
|
@@ -5731,7 +5742,7 @@ var LiveSocket = class {
|
|
|
5731
5742
|
}
|
|
5732
5743
|
// public
|
|
5733
5744
|
version() {
|
|
5734
|
-
return "1.1.
|
|
5745
|
+
return "1.1.3";
|
|
5735
5746
|
}
|
|
5736
5747
|
isProfileEnabled() {
|
|
5737
5748
|
return this.sessionStorage.getItem(PHX_LV_PROFILE) === "true";
|