app/assets/build/coco/app.js in coveragebook_components-0.8.1 vs app/assets/build/coco/app.js in coveragebook_components-0.8.2

- old
+ new

@@ -14036,11 +14036,11 @@ // ../../../package.json var package_default = { name: "coveragebook-components", type: "module", - version: "0.8.1", + version: "0.8.2", main: "index.js", repository: "git@github.com:coveragebook/coco.git", author: "Mark Perkins <mark@coveragebook.com>", license: "NO LICENSE", browserslist: [ @@ -23679,22 +23679,25 @@ module_default.plugin(notification_default); var alpine_default2 = module_default; // helpers/location.js function navigateTo(url, options = {}) { - if (window.Turbo && options.turbo === true) { - window.Turbo.visit(url, { action: options.action || "advance" }); + if (window.Turbo && options.turbo !== false) { + delete options.turbo; + turboOptions = Object.assign({ action: "advance" }, options); + window.Turbo.visit(url, turboOptions); } else { location.assign(url); } } // app/setup.js - window.addEventListener("navigate", (event) => { - const { url, turbo, action } = event.detail; + window.addEventListener("app:navigate", (event) => { + const url = event.detail.url; if (url) { - navigateTo(url, { turbo, action }); + delete event.detail.url; + navigateTo(url, event.detail); } }); function setAppHeightProperty() { document.documentElement.style.setProperty( "--app-height", @@ -24018,10 +24021,13 @@ }, dismiss(event) { if (this.$options.dismissable) this.hide(); }, + visit(url) { + navigateTo(url, { frame: this.frame.id }); + }, scrollTo(pos) { setTimeout(() => { this.$root.scrollTop = pos + this.contentOffsetTop; }, 10); }, @@ -24228,9 +24234,10 @@ }); var sidebar_nav_item_default = CocoComponent("appSidebarNavItem", () => { return { menu: null, init() { + this.navigateTo = navigateTo; if (this.$refs.menu) { this.menu = tippy_default(this.$el, { theme: "coco-naked-dropdown", placement: this.menuPlacement, arrow: false,