phoenix_live_view 0.18.13 → 0.18.14
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/js.js +8 -2
- package/assets/package.json +1 -1
- package/package.json +1 -1
- package/priv/static/phoenix_live_view.cjs.js +7 -2
- package/priv/static/phoenix_live_view.cjs.js.map +2 -2
- package/priv/static/phoenix_live_view.esm.js +7 -2
- package/priv/static/phoenix_live_view.esm.js.map +2 -2
- package/priv/static/phoenix_live_view.js +7 -2
- package/priv/static/phoenix_live_view.min.js +4 -4
|
@@ -152,7 +152,8 @@ let JS = {
|
|
|
152
152
|
if(eventType === "remove"){ return }
|
|
153
153
|
let onStart = () => {
|
|
154
154
|
this.addOrRemoveClasses(el, inStartClasses, outClasses.concat(outStartClasses).concat(outEndClasses))
|
|
155
|
-
|
|
155
|
+
let stickyDisplay = display || this.defaultDisplay(el)
|
|
156
|
+
DOM.putSticky(el, "toggle", currentEl => currentEl.style.display = stickyDisplay)
|
|
156
157
|
window.requestAnimationFrame(() => {
|
|
157
158
|
this.addOrRemoveClasses(el, inClasses, [])
|
|
158
159
|
window.requestAnimationFrame(() => this.addOrRemoveClasses(el, inEndClasses, inStartClasses))
|
|
@@ -174,7 +175,8 @@ let JS = {
|
|
|
174
175
|
} else {
|
|
175
176
|
window.requestAnimationFrame(() => {
|
|
176
177
|
el.dispatchEvent(new Event("phx:show-start"))
|
|
177
|
-
|
|
178
|
+
let stickyDisplay = display || this.defaultDisplay(el)
|
|
179
|
+
DOM.putSticky(el, "toggle", currentEl => currentEl.style.display = stickyDisplay)
|
|
178
180
|
el.dispatchEvent(new Event("phx:show-end"))
|
|
179
181
|
})
|
|
180
182
|
}
|
|
@@ -225,6 +227,10 @@ let JS = {
|
|
|
225
227
|
|
|
226
228
|
filterToEls(sourceEl, {to}){
|
|
227
229
|
return to ? DOM.all(document, to) : [sourceEl]
|
|
230
|
+
},
|
|
231
|
+
|
|
232
|
+
defaultDisplay(el){
|
|
233
|
+
return {tr: "table-row", td: "table-cell"}[el.tagName.toLowerCase()] || "block"
|
|
228
234
|
}
|
|
229
235
|
}
|
|
230
236
|
|
package/assets/package.json
CHANGED
package/package.json
CHANGED
|
@@ -2310,7 +2310,8 @@ var JS = {
|
|
|
2310
2310
|
}
|
|
2311
2311
|
let onStart = () => {
|
|
2312
2312
|
this.addOrRemoveClasses(el, inStartClasses, outClasses.concat(outStartClasses).concat(outEndClasses));
|
|
2313
|
-
|
|
2313
|
+
let stickyDisplay = display || this.defaultDisplay(el);
|
|
2314
|
+
dom_default.putSticky(el, "toggle", (currentEl) => currentEl.style.display = stickyDisplay);
|
|
2314
2315
|
window.requestAnimationFrame(() => {
|
|
2315
2316
|
this.addOrRemoveClasses(el, inClasses, []);
|
|
2316
2317
|
window.requestAnimationFrame(() => this.addOrRemoveClasses(el, inEndClasses, inStartClasses));
|
|
@@ -2332,7 +2333,8 @@ var JS = {
|
|
|
2332
2333
|
} else {
|
|
2333
2334
|
window.requestAnimationFrame(() => {
|
|
2334
2335
|
el.dispatchEvent(new Event("phx:show-start"));
|
|
2335
|
-
|
|
2336
|
+
let stickyDisplay = display || this.defaultDisplay(el);
|
|
2337
|
+
dom_default.putSticky(el, "toggle", (currentEl) => currentEl.style.display = stickyDisplay);
|
|
2336
2338
|
el.dispatchEvent(new Event("phx:show-end"));
|
|
2337
2339
|
});
|
|
2338
2340
|
}
|
|
@@ -2377,6 +2379,9 @@ var JS = {
|
|
|
2377
2379
|
},
|
|
2378
2380
|
filterToEls(sourceEl, { to }) {
|
|
2379
2381
|
return to ? dom_default.all(document, to) : [sourceEl];
|
|
2382
|
+
},
|
|
2383
|
+
defaultDisplay(el) {
|
|
2384
|
+
return { tr: "table-row", td: "table-cell" }[el.tagName.toLowerCase()] || "block";
|
|
2380
2385
|
}
|
|
2381
2386
|
};
|
|
2382
2387
|
var js_default = JS;
|