Skip to content

Commit

Permalink
bump build
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismccord committed May 26, 2023
1 parent 4938b55 commit 39f5221
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 30 deletions.
20 changes: 13 additions & 7 deletions priv/static/phoenix_live_view.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions priv/static/phoenix_live_view.cjs.js.map

Large diffs are not rendered by default.

20 changes: 13 additions & 7 deletions priv/static/phoenix_live_view.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions priv/static/phoenix_live_view.esm.js.map

Large diffs are not rendered by default.

20 changes: 13 additions & 7 deletions priv/static/phoenix_live_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,11 @@ var LiveView = (() => {
this.putPrivate(el, key, [currentCycle, trigger]);
return currentCycle;
},
maybeAddPrivateHooks(el, phxViewportTop, phxViewportBottom) {
if (el.hasAttribute && (el.hasAttribute(phxViewportTop) || el.hasAttribute(phxViewportBottom))) {
el.setAttribute("data-phx-hook", "Phoenix.InfiniteScroll");
}
},
maybeHideFeedback(container, input, phxFeedbackFor) {
if (!(this.private(input, PHX_HAS_FOCUSED) || this.private(input, PHX_HAS_SUBMITTED))) {
let feedbacks = [input.name];
Expand Down Expand Up @@ -1823,7 +1828,7 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
}
},
onBeforeNodeAdded: (el) => {
this.maybePrivateHooks(el, phxViewportTop, phxViewportBottom);
dom_default.maybeAddPrivateHooks(el, phxViewportTop, phxViewportBottom);
this.trackBefore("added", el);
return el;
},
Expand Down Expand Up @@ -1920,7 +1925,7 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
if (dom_default.isPhxUpdate(toEl, phxUpdate, ["append", "prepend"])) {
appendPrependUpdates.push(new DOMPostMorphRestorer(fromEl, toEl, toEl.getAttribute(phxUpdate)));
}
this.maybePrivateHooks(toEl, phxViewportTop, phxViewportBottom);
dom_default.maybeAddPrivateHooks(toEl, phxViewportTop, phxViewportBottom);
dom_default.syncAttrsToProps(toEl);
dom_default.applyStickyOperations(toEl);
if (toEl.getAttribute("name")) {
Expand Down Expand Up @@ -1960,11 +1965,6 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
}
this.trackAfter("discarded", el);
}
maybePrivateHooks(el, phxViewportTop, phxViewportBottom) {
if (el.hasAttribute && (el.hasAttribute(phxViewportTop) || el.hasAttribute(phxViewportBottom))) {
el.setAttribute("data-phx-hook", "Phoenix.InfiniteScroll");
}
}
maybePendingRemove(node) {
if (node.getAttribute && node.getAttribute(this.phxRemove) !== null) {
this.pendingRemoves.push(node);
Expand Down Expand Up @@ -2823,6 +2823,12 @@ within:
this.el.setAttribute(PHX_ROOT_ID, this.root.id);
}
execNewMounted() {
let phxViewportTop = this.binding(PHX_VIEWPORT_TOP);
let phxViewportBottom = this.binding(PHX_VIEWPORT_BOTTOM);
dom_default.all(this.el, `[${phxViewportTop}], [${phxViewportBottom}]`, (hookEl) => {
dom_default.maybeAddPrivateHooks(hookEl, phxViewportTop, phxViewportBottom);
this.maybeAddNewHook(hookEl);
});
dom_default.all(this.el, `[${this.binding(PHX_HOOK)}], [data-phx-${PHX_HOOK}]`, (hookEl) => {
this.maybeAddNewHook(hookEl);
});
Expand Down
Loading

0 comments on commit 39f5221

Please sign in to comment.