@mmstack/router-core 19.3.12 → 20.0.0
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/fesm2022/mmstack-router-core.mjs +22 -21
- package/fesm2022/mmstack-router-core.mjs.map +1 -1
- package/index.d.ts +404 -6
- package/package.json +5 -4
- package/lib/breadcrumb/breadcrumb.config.d.ts +0 -73
- package/lib/breadcrumb/breadcrumb.resolver.d.ts +0 -58
- package/lib/breadcrumb/breadcrumb.store.d.ts +0 -44
- package/lib/breadcrumb/breadcrumb.type.d.ts +0 -57
- package/lib/breadcrumb/public_api.d.ts +0 -4
- package/lib/link.directive.d.ts +0 -51
- package/lib/preloading/index.d.ts +0 -2
- package/lib/preloading/preload.service.d.ts +0 -8
- package/lib/preloading/preload.strategy.d.ts +0 -11
- package/lib/preloading/public_api.d.ts +0 -1
- package/lib/query-param.d.ts +0 -78
- package/lib/title/public_api.d.ts +0 -2
- package/lib/title/title.config.d.ts +0 -31
- package/lib/title/title.store.d.ts +0 -23
- package/lib/url.d.ts +0 -32
- package/lib/util/create-route-predicate.d.ts +0 -1
- package/lib/util/find-path.d.ts +0 -2
- package/lib/util/index.d.ts +0 -4
- package/lib/util/leaf.store.d.ts +0 -21
- package/lib/util/snapshot-path.d.ts +0 -2
|
@@ -144,10 +144,10 @@ function leafRoutes() {
|
|
|
144
144
|
}
|
|
145
145
|
class RouteLeafStore {
|
|
146
146
|
leaves = leafRoutes();
|
|
147
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
148
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
147
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: RouteLeafStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
148
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: RouteLeafStore, providedIn: 'root' });
|
|
149
149
|
}
|
|
150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: RouteLeafStore, decorators: [{
|
|
151
151
|
type: Injectable,
|
|
152
152
|
args: [{
|
|
153
153
|
providedIn: 'root',
|
|
@@ -283,10 +283,10 @@ class BreadcrumbStore {
|
|
|
283
283
|
register(breadcrumb) {
|
|
284
284
|
this.map.inline((m) => m.set(breadcrumb.id, breadcrumb));
|
|
285
285
|
}
|
|
286
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
287
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
286
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: BreadcrumbStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
287
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: BreadcrumbStore, providedIn: 'root' });
|
|
288
288
|
}
|
|
289
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
289
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: BreadcrumbStore, decorators: [{
|
|
290
290
|
type: Injectable,
|
|
291
291
|
args: [{
|
|
292
292
|
providedIn: 'root',
|
|
@@ -359,7 +359,7 @@ function createBasePredicate(path) {
|
|
|
359
359
|
if (!configSegmentHasMatrixParams) {
|
|
360
360
|
return true;
|
|
361
361
|
}
|
|
362
|
-
return Object.entries(configMatrixParams).every(([key, value]) =>
|
|
362
|
+
return Object.entries(configMatrixParams).every(([key, value]) => Object.prototype.hasOwnProperty.call(linkMatrixParams, key) &&
|
|
363
363
|
linkMatrixParams[key] === value);
|
|
364
364
|
};
|
|
365
365
|
});
|
|
@@ -381,7 +381,8 @@ function createBasePredicate(path) {
|
|
|
381
381
|
};
|
|
382
382
|
}
|
|
383
383
|
function singleSegmentMatches(configSegment, linkSegment) {
|
|
384
|
-
if (configSegment.pathPart
|
|
384
|
+
if (configSegment.pathPart === ':') {
|
|
385
|
+
return true;
|
|
385
386
|
}
|
|
386
387
|
else if (configSegment.pathPart !== linkSegment.pathPart) {
|
|
387
388
|
return false;
|
|
@@ -389,7 +390,7 @@ function singleSegmentMatches(configSegment, linkSegment) {
|
|
|
389
390
|
const configMatrix = configSegment.matrixParams;
|
|
390
391
|
const linkMatrix = linkSegment.matrixParams;
|
|
391
392
|
for (const key in configMatrix) {
|
|
392
|
-
if (!
|
|
393
|
+
if (!Object.prototype.hasOwnProperty.call(linkMatrix, key) ||
|
|
393
394
|
linkMatrix[key] !== configMatrix[key]) {
|
|
394
395
|
return false;
|
|
395
396
|
}
|
|
@@ -576,10 +577,10 @@ class PreloadService {
|
|
|
576
577
|
startPreload(routePath) {
|
|
577
578
|
this.preloadOnDemand$.next(routePath);
|
|
578
579
|
}
|
|
579
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
580
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
580
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: PreloadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
581
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: PreloadService, providedIn: 'root' });
|
|
581
582
|
}
|
|
582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
583
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: PreloadService, decorators: [{
|
|
583
584
|
type: Injectable,
|
|
584
585
|
args: [{ providedIn: 'root' }]
|
|
585
586
|
}] });
|
|
@@ -619,10 +620,10 @@ class PreloadStrategy {
|
|
|
619
620
|
const predicate = createRoutePredicate(fp);
|
|
620
621
|
return this.svc.preloadRequested$.pipe(filter$1((path) => path === fp || predicate(path)), take(1), switchMap(() => load()), finalize(() => this.loading.delete(fp)));
|
|
621
622
|
}
|
|
622
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
623
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
623
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: PreloadStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
624
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: PreloadStrategy, providedIn: 'root' });
|
|
624
625
|
}
|
|
625
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
626
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: PreloadStrategy, decorators: [{
|
|
626
627
|
type: Injectable,
|
|
627
628
|
args: [{
|
|
628
629
|
providedIn: 'root',
|
|
@@ -742,10 +743,10 @@ class LinkDirective {
|
|
|
742
743
|
trigger(button, ctrlKey, shiftKey, altKey, metaKey) {
|
|
743
744
|
return this.routerLink?.onClick(button, ctrlKey, shiftKey, altKey, metaKey);
|
|
744
745
|
}
|
|
745
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
746
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
746
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: LinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
747
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.3", type: LinkDirective, isStandalone: true, selector: "[mmLink]", inputs: { target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, queryParams: { classPropertyName: "queryParams", publicName: "queryParams", isSignal: true, isRequired: false, transformFunction: null }, fragment: { classPropertyName: "fragment", publicName: "fragment", isSignal: true, isRequired: false, transformFunction: null }, queryParamsHandling: { classPropertyName: "queryParamsHandling", publicName: "queryParamsHandling", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, info: { classPropertyName: "info", publicName: "info", isSignal: true, isRequired: false, transformFunction: null }, relativeTo: { classPropertyName: "relativeTo", publicName: "relativeTo", isSignal: true, isRequired: false, transformFunction: null }, skipLocationChange: { classPropertyName: "skipLocationChange", publicName: "skipLocationChange", isSignal: true, isRequired: false, transformFunction: null }, replaceUrl: { classPropertyName: "replaceUrl", publicName: "replaceUrl", isSignal: true, isRequired: false, transformFunction: null }, mmLink: { classPropertyName: "mmLink", publicName: "mmLink", isSignal: true, isRequired: false, transformFunction: null }, preloadOn: { classPropertyName: "preloadOn", publicName: "preloadOn", isSignal: true, isRequired: false, transformFunction: null }, useMouseDown: { classPropertyName: "useMouseDown", publicName: "useMouseDown", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { preloading: "preloading" }, host: { listeners: { "mouseenter": "onHover()", "mousedown": "onMouseDown($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)", "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" } }, exportAs: ["mmLink"], hostDirectives: [{ directive: i1.RouterLink, inputs: ["routerLink", "mmLink", "target", "target", "queryParams", "queryParams", "fragment", "fragment", "queryParamsHandling", "queryParamsHandling", "state", "state", "relativeTo", "relativeTo", "skipLocationChange", "skipLocationChange", "replaceUrl", "replaceUrl"] }], ngImport: i0 });
|
|
747
748
|
}
|
|
748
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
749
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: LinkDirective, decorators: [{
|
|
749
750
|
type: Directive,
|
|
750
751
|
args: [{
|
|
751
752
|
selector: '[mmLink]',
|
|
@@ -952,10 +953,10 @@ class TitleStore {
|
|
|
952
953
|
register(id, titleFn) {
|
|
953
954
|
this.map.inline((m) => m.set(id, titleFn));
|
|
954
955
|
}
|
|
955
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
956
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
956
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TitleStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
957
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TitleStore, providedIn: 'root' });
|
|
957
958
|
}
|
|
958
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
959
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TitleStore, decorators: [{
|
|
959
960
|
type: Injectable,
|
|
960
961
|
args: [{
|
|
961
962
|
providedIn: 'root',
|