Skip to content

Releases: vaadin/router

v1.6.0

19 Dec 09:35
Compare
Choose a tag to compare

Live Demo →
API Documentation →

New features

  • b5b80ad feat: add router-ignore attribute to let the browser handle navigation (#421)

    Fixes: #325

    Makes Vaadin Router not handle the click events on links with the router-ignore attribute.

Other changes

  • 940df38 chore: update npm dependencies (#412).

    Includes a minor update to vaadin-usage-statistics.

  • 10c0553 chore(deps): use stylelint-config-vaadin 0.1.4

  • 540a838 chore(tsconfig): set skipLibCheck: true

v1.5.2

07 Nov 11:59
Compare
Choose a tag to compare

Live Demo →
API Documentation →

Bug fixes

  • e0da44a fix: change default baseUrl to be an absolute pathname (#410)

    Fixes #409. Previously, Vaadin Router taked base href as baseUrl which is later resolved against document.baseURI regardless it's a relative one or not. Semantically, baseUrl shouldn't be in relative form because it is the prefix of every route in the Router. With this change, it resolves the relative base href to be an absolute pathname before setting it as the baseUrl.

v1.5.1

23 Oct 08:21
Compare
Choose a tag to compare

Live Demo →
API Documentation →

Bug fixes

  • 1bfd0ae fix: ensure location-changed event is timed after window.location update (#407)

    Fixes #340. Makes sure window.location is up-to-date when vaadin-router-location-changed.

  • f2f9210 fix: add browser history states for non-initial redirects (#406)

    Fixes #324. Before the change, when Vaadin Router redirects, the new location was replacing the last browser history entry instead of adding a new one. With this change, only the initial Vaadin Router render, if redirects, replaces the last history entry, the second and subsequent renders always append history entries.

v1.5.0

07 Oct 10:44
Compare
Choose a tag to compare

Live Demo →
API Documentation →

New features

This release includes improvements on search query string and hash support (issue #56).

  • 63ee8d6 feat: support search and hash strings in Router.go (#400)

    The Router.go navigation API method now accepts pathname with search and hash strings in a single in-app URL string:

    Router.go('/path?searchParam=value#footnotes');

    as well as separately:

    Router.go({pathname: '/path', search: '?searchParam=value', hash: '#footnotes'});

    The search and hash strings do not participate in route matching, however they are available in the action’s context argument and the component’s location property objects (see #396).

  • 9341511 docs: add demos for search and hash usage (#397)

    This adds documentation on using search query string and hash string with Vaadin Router, including examples on how to access them from components and actions, and how to construct and parse search query strings using URLSearchParams native API.

Bug fixes

  • b64acd8 fix: Router.go string pathname parsing in IE (#401)

    Fixes a parsing bug concerning the search query string support in the URL API ponyfill Vaadin Router internally uses in browsers that lack native URL construction support.

  • 5a37eb4 fix: ensure search and hash in context, location, and lifecycle (#396)

    Makes search and hash strings consistently available in the Router API.

v1.4.3

17 Sep 08:53
Compare
Choose a tag to compare

Live Demo →
API Documentation →

Fixes

  • store previousContext when reusing element (#391)

  • do not remove layout content that is not part of the route chain (#392)

v1.4.2

12 Sep 14:16
Compare
Choose a tag to compare

Live Demo →
API Documentation →

New features

  • execute onBeforeLeave and onBeforeEnter when changing parameter

    Fixes #387.

Other changes

  • update documentation for onBeforeLeave and onBeforeEnter

  • rename misleading variable and strengthen isReusableElement check

  • show a progress bar when throttler is waiting

v1.4.1

02 Sep 11:31
Compare
Choose a tag to compare

This is a patch release to put the @vaadin/router npm package version in sync with the version reported through the Vaadin.registrations global at the run time.

v1.4.0

29 Aug 09:55
Compare
Choose a tag to compare

Live Demo →
API Documentation →

New features

  • add TypeScript declarations

    Fixes #304.

  • setRoutes has now the skipRender param and returns a Promise

  • router.location includes now search and hash parameters

Bug fixes

  • fix: keep the url when the context does not change

    Fixes #329.

    Previously, if navigation originating from pressing the back button was prevented, the browser was still changing the URL. The fix puts the original URL back in such a case.

  • fix: add prepare script to allow usage via git directly (#367)

    Adds prepare script in package.json that builds the router entrypoints from source. This allows convenient symlink / folder / github installation.

  • fix: preserve search and hash on the first render (#359)

    Fixes #356.

    The search and hash initial location state were discarded and stripped from the URL as a result of initial router render after first setRoutes call. The fix makes sure this does not happen.

  • fix: render correctly if reusing the same instance or same tagName (#375)

    Fixes #357.

    This supports reusing the same element instance in navigation, fixes issues with rendering the element and its content being removed.

  • fix: get search and hash only if given a context (#368)

    Fixes #366

    Before the fix, the string argument of render('/pathname') was mistreated as an object, and its .search and .hash key contents were taken into account. The fix makes sure that the string argument is treated as a pathname string only.

  • fix: events and detach/re-attach (#370)

    Fixes #355, #361, #360, #311, #331

    This fixes a few connected issues regarding lifecycle callbacks and detaching/re-attaching DOM elements when reusing same element instances.

Other changes

  • fix(docs): lifecycle callbacks on dynamicly imported routes (#369)

  • chore: update npm dependencies (#381)

    Fixes the security issues in eslint-utils (GHSA-3gx7-xhv7-5mx3).

v1.3.0

15 Aug 08:40
Compare
Choose a tag to compare

Live Demo →
API Documentation →

New features

  • #261 Preserve location.search and location.hash when navigating

    • Pass search and hash together with pathname to navigate from POPSTATE and CLICK navigation triggers to the router

    • Expose search and hash string keys in context object argument of route actions

Bug fixes

  • #342 enable rendering HTMLElement created without using context.component

  • #321 pass the correct route params to lifecycle callbacks in child routes (#322)

Other Changes

  • Update supported Node.js version to 10

  • Dependency updates

v1.2.1

13 Jun 10:07
Compare
Choose a tag to compare

Live Demo →
API Documentation →

Improvements:

  • Added "module" field to package.json for @pikapkg tools compatibility