@lexriver/dome 1.5.7 → 1.5.8

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.
@@ -13,7 +13,7 @@ export declare module DomeRouter {
13
13
  * @param previousPageIndex 0=previousPage, 1=previousPage-1, etc
14
14
  */
15
15
  function getPreviousPageUrl(previousPageIndex?: number): string | undefined;
16
- function resolveUrl(url?: string): void;
16
+ function resolveUrl(url?: string, addToHistory?: boolean): void;
17
17
  function onRoute(route: string, exactMatch: boolean, action: RouteAction): void;
18
18
  function onNotFound(action: () => void): void;
19
19
  /**
package/out/DomeRouter.js CHANGED
@@ -83,9 +83,10 @@ export var DomeRouter;
83
83
  // if(addToHistory) addUrlToHistory(url)
84
84
  // executeAsync(url, getScrollPositionForUrl(url)) // TODO: check
85
85
  // }
86
- function resolveUrl(url = window.location.pathname) {
87
- // if(addToHistory) addUrlToHistory(window.location.pathname)
88
- executeAsync(url, getScrollPositionForUrl(url)); // TODO: check
86
+ function resolveUrl(url = window.location.pathname, addToHistory = true) {
87
+ if (addToHistory)
88
+ addUrlToHistory(window.location.pathname);
89
+ executeAsync(url, getScrollPositionForUrl(url));
89
90
  }
90
91
  DomeRouter.resolveUrl = resolveUrl;
91
92
  function onRoute(route, exactMatch, action) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "sideEffects": false,
4
4
  "name": "@lexriver/dome",
5
- "version": "1.5.7",
5
+ "version": "1.5.8",
6
6
  "description": "",
7
7
  "main": "out/index.js",
8
8
  "types": "out/index.d.ts",
package/src/DomeRouter.ts CHANGED
@@ -112,9 +112,9 @@ export module DomeRouter {
112
112
  // executeAsync(url, getScrollPositionForUrl(url)) // TODO: check
113
113
  // }
114
114
 
115
- export function resolveUrl(url:string = window.location.pathname){
116
- // if(addToHistory) addUrlToHistory(window.location.pathname)
117
- executeAsync(url, getScrollPositionForUrl(url)) // TODO: check
115
+ export function resolveUrl(url:string = window.location.pathname, addToHistory = true){
116
+ if(addToHistory) addUrlToHistory(window.location.pathname)
117
+ executeAsync(url, getScrollPositionForUrl(url))
118
118
  }
119
119
 
120
120
  export function onRoute(route:string, exactMatch:boolean, action:RouteAction){