crelte 0.4.1 → 0.4.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InnerRouter.d.ts","sourceRoot":"","sources":["../../src/routing/InnerRouter.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,eAAe,EAAe,MAAM,WAAW,CAAC;AAC/D,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,OAAO,OAAO,EAAE,EAAa,cAAc,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,MAAM,MAAM,eAAe,GAAG;IAC7B,kBAAkB,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,WAAW;IAC/B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd;;;;;OAKG;IACH,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAC7D,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAEpC,OAAO,CAAC,qBAAqB,CAAa;IAE1C;;;;;OAKG;gBACS,KAAK,EAAE,eAAe,EAAE,EAAE,IAAI,EAAE,eAAe;IAkB3D;;OAEG;IACH,UAAU;IAgBV;;OAEG;IACH,UAAU;IAEV;;;;OAIG;IACH,gBAAgB,CAAC,UAAU,GAAE,MAAM,GAAG,IAAW,GAAG,IAAI;IAsCxD;;OAEG;IACH,WAAW,IAAI,IAAI;IAInB;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAKjC;;;;;;OAMG;IACH,eAAe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GAAG,IAAI,GAAG,IAAI;IAKjC;;;;;;OAMG;IACH,eAAe,CACd,MAAM,EAAE,MAAM,GAAG,GAAG,GAAG,KAAK,GAAG,OAAO,EACtC,IAAI,GAAE,cAAmB,GACvB,OAAO;IA0BV;;;;;OAKG;IACH,YAAY,CAAC,OAAO,EAAE,GAAG,GAAG,KAAK;IAcjC,MAAM;IAiGN;;;;;;;;;OASG;IACH,IAAI,CAAC,GAAG,EAAE,OAAO;IA6CjB;;;;;;;OAOG;IACH,IAAI,CAAC,GAAG,EAAE,OAAO;IAuBjB;;;;;;;OAOG;IACH,OAAO,CAAC,GAAG,EAAE,OAAO;IAuBpB;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,GAAG,KAAK,GAAG,OAAO;IAW9C,QAAQ,CAAC,GAAG,EAAE,OAAO;CAsErB"}
|
|
@@ -176,12 +176,8 @@ export default class InnerRouter {
|
|
|
176
176
|
e.preventDefault();
|
|
177
177
|
const req = this.targetToRequest(link.href, { origin: 'click' });
|
|
178
178
|
const routeEq = this.route && this.route.eqUrl(req) && this.route.eqSearch(req);
|
|
179
|
-
// the route is the same
|
|
180
|
-
//
|
|
181
|
-
if (routeEq && this.route?.eqHash(req))
|
|
182
|
-
return;
|
|
183
|
-
// this means the hash did not match, so we wan't to just scroll but not load
|
|
184
|
-
// data
|
|
179
|
+
// this means the route is the same maybe with a different hash
|
|
180
|
+
// so it is not necessary to load the data again
|
|
185
181
|
if (routeEq) {
|
|
186
182
|
req.disableLoadData = true;
|
|
187
183
|
}
|
|
@@ -262,6 +258,7 @@ export default class InnerRouter {
|
|
|
262
258
|
throw new Error('Do not use open with push or replace');
|
|
263
259
|
}
|
|
264
260
|
const current = this.route;
|
|
261
|
+
// store scrollY
|
|
265
262
|
if (current) {
|
|
266
263
|
// if the scrollY would still be updated we clear the timeout
|
|
267
264
|
// since we should have the latest scrollY
|
package/package.json
CHANGED
|
@@ -208,12 +208,9 @@ export default class InnerRouter {
|
|
|
208
208
|
const req = this.targetToRequest(link.href, { origin: 'click' });
|
|
209
209
|
const routeEq =
|
|
210
210
|
this.route && this.route.eqUrl(req) && this.route.eqSearch(req);
|
|
211
|
-
// the route is the same don't do anything
|
|
212
|
-
// or maybe scroll the page to the hash? todo
|
|
213
|
-
if (routeEq && this.route?.eqHash(req)) return;
|
|
214
211
|
|
|
215
|
-
// this means the
|
|
216
|
-
// data
|
|
212
|
+
// this means the route is the same maybe with a different hash
|
|
213
|
+
// so it is not necessary to load the data again
|
|
217
214
|
if (routeEq) {
|
|
218
215
|
req.disableLoadData = true;
|
|
219
216
|
}
|
|
@@ -309,6 +306,7 @@ export default class InnerRouter {
|
|
|
309
306
|
}
|
|
310
307
|
|
|
311
308
|
const current = this.route;
|
|
309
|
+
// store scrollY
|
|
312
310
|
if (current) {
|
|
313
311
|
// if the scrollY would still be updated we clear the timeout
|
|
314
312
|
// since we should have the latest scrollY
|